PageSourceSearch

https://www.smart-copy.ai/assets/index-8UvCxERg.js

js smart-copy.ai collected 2026-10-05 12:38:21 UTC 2,101,006 bytes, 1,028 lines download raw bytes

vendor: 6,403 bytes, lines 1-9
1var N9=Object.defineProperty;var r3=t=>{throw TypeError(t)};var C9=(t,e,r)=>e in t?N9(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r;var Oi=(t,e,r)=>C9(t,typeof e!="symbol"?e+"":e,r),Cx=(t,e,r)=>e.has(t)||r3("Cannot "+r);var ie=(t,e,r)=>(Cx(t,e,"read from private field"),r?r.call(t):e.get(t)),$e=(t,e,r)=>e.has(t)?r3("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,r),Pe=(t,e,r,n)=>(Cx(t,e,"write to private field"),n?n.call(t,r):e.set(t,r),r),et=(t,e,r)=>(Cx(t,e,"access private method"),r);var Lf=(t,e,r,n)=>({set _(s){Pe(t,e,s,r)},get _(){return ie(t,e,n)}});function E9(t,e){for(var r=0;r<e.length;r++){const n=e[r];if(typeof n!="string"&&!Array.isArray(n)){for(const s in n)if(s!=="default"&&!(s in t)){const i=Object.getOwnPropertyDescriptor(n,s);i&&Object.defineProperty(t,s,i.get?i:{enumerable:!0,get:()=>n[s]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))n(s);new MutationObserver(s=>{for(const i of s)if(i.type==="childList")for(const a of i.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&n(a)}).observe(document,{childList:!0,subtree:!0});function r(s){const i={};return s.integrity&&(i.integrity=s.integrity),s.referrerPolicy&&(i.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?i.credentials="include":s.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function n(s){if(s.ep)return;s.ep=!0;const i=r(s);fetch(s.href,i)}})();var Bd=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function qo(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Oz={exports:{}},ny={},Rz={exports:{}},it={};/**
2 * @license React
3 * react.production.min.js
4 *
5 * Copyright (c) Facebook, Inc. and its affiliates.
6 *
7 * This source code is licensed under the MIT license found in the
8 * LICENSE file in the root directory of this source tree.
9 */var rf=Symbol.for("react.element"),T9=Symbol.for("react.portal"),A9=Symbol.for("react.fragment"),z9=Symbol.for("react.strict_mode"),P9=Symbol.for("react.profiler"),_9=Symbol.for("react.provider"),I9=Symbol.for("react.context"),O9=Symbol.for("react.forward_ref"),R9=Symbol.for("react.suspense"),L9=Symbol.for("react.memo"),M9=Symbol.for("react.lazy"),n3=Symbol.iterator;function D9(t){return t===null||typeof t!="object"?null:(t=n3&&t[n3]||t["@@iterator"],typeof t=="function"?t:null)}var Lz={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Mz=Object.assign,Dz={};function Sd(t,e,r){this.props=t,this.context=e,this.refs=Dz,this.updater=r||Lz}Sd.prototype.isReactComponent={};Sd.prototype.setState=function(t,e){if(typeof t!="object"&&typeof t!="function"&&t!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,t,e,"setState")};Sd.prototype.forceUpdate=function(t){this.updater.enqueueForceUpdate(this,t,"forceUpdate")};function Fz(){}Fz.prototype=Sd.prototype;function q2(t,e,r){this.props=t,this.context=e,this.refs=Dz,this.updater=r||Lz}var K2=q2.prototype=new Fz;K2.constructor=q2;Mz(K2,Sd.prototype);K2.isPureReactComponent=!0;var s3=Array.isArray,Bz=Object.prototype.hasOwnProperty,G2={current:null},$z={key:!0,ref:!0,__self:!0,__source:!0};function Uz(t,e,r){var n,s={},i=null,a=null;if(e!=null)for(n in e.ref!==void 0&&(a=e.ref),e.key!==void 0&&(i=""+e.key),e)Bz.call(e,n)&&!$z.hasOwnProperty(n)&&(s[n]=e[n]);var l=arguments.length-2;if(l===1)s.children=r;else if(1<l){for(var c=Array(l),u=0;u<l;u++)c[u]=arguments[u+2];s.children=c}if(t&&t.defaultProps)for(n in l=t.defaultProps,l)s[n]===void 0&&(s[n]=l[n]);return{$$typeof:rf,type:t,key:i,ref:a,props:s,_owner:G2.current}}function F9(t,e){return{$$typeof:rf,type:t.type,key:e,ref:t.ref,props:t.props,_owner:t._owner}}function Z2(t){return typeof t=="object"&&t!==null&&t.$$typeof===rf}function B9(t){var e={"=":"=0",":":"=2"};return"$"+t.replace(/[=:]/g,function(r){return e[r]})}var i3=/\/+/g;function Ex(t,e){return typeof t=="object"&&t!==null&&t.key!=null?B9(""+t.key):e.toString(36)}function Dm(t,e,r,n,s){var i=typeof t;(i==="undefined"||i==="boolean")&&(t=null);var a=!1;if(t===null)a=!0;else switch(i){case"string":case"number":a=!0;break;case"object":switch(t.$$typeof){case rf:case T9:a=!0}}if(a)return a=t,s=s(a),t=n===""?"."+Ex(a,0):n,s3(s)?(r="",t!=null&&(r=t.replace(i3,"$&/")+"/"),Dm(s,e,r,"",function(u){return u})):s!=null&&(Z2(s)&&(s=F9(s,r+(!s.key||a&&a.key===s.key?"":(""+s.key).replace(i3,"$&/")+"/")+t)),e.push(s)),1;if(a=0,n=n===""?".":n+":",s3(t))for(var l=0;l<t.length;l++){i=t[l];var c=n+Ex(i,l);a+=Dm(i,e,r,c,s)}else if(c=D9(t),typeof c=="function")for(t=c.call(t),l=0;!(i=t.next()).done;)i=i.value,c=n+Ex(i,l++),a+=Dm(i,e,r,c,s);else if(i==="object")throw e=String(t),Error("Objects are not valid as a React child (found: "+(e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)+"). If you meant to render a collection of children, use an array instead.");return a}function Mf(t,e,r){if(t==null)return t;var n=[],s=0;return Dm(t,n,"","",function(i){return e.call(r,i,s++)}),n}function $9(t){if(t._status===-1){var e=t._result;e=e(),e.then(function(r){(t._status===0||t._status===-1)&&(t._status=1,t._result=r)},function(r){(t._status===0||t._status===-1)&&(t._status=2,t._result=r)}),t._status===-1&&(t._status=0,t._result=e)}if(t._status===1)return t._result.default;throw t._result}var xn={current:null},Fm={transition:null},U9={ReactCurrentDispatcher:xn,ReactCurrentBatchConfig:Fm,ReactCurrentOwner:G2};function Wz(){throw Error("act(...) is not supported in production builds of React.")}it.Children={map:Mf,forEach:function(t,e,r){Mf(t,function(){e.apply(this,arguments)},r)},count:function(t){var e=0;return Mf(t,function(){e++}),e},toArray:function(t){return Mf(t,function(e){return e})||[]},only:function(t){if(!Z2(t))throw Error("React.Children.only expected to receive a single React element child.");return t}};it.Component=Sd;it.Fragment=A9;it.Profiler=P9;it.PureComponent=q2;it.StrictMode=z9;it.Suspense=R9;
vendor: 7,443 bytes, lines 9-25
9it.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=U9;it.act=Wz;it.cloneElement=function(t,e,r){if(t==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+t+".");var n=Mz({},t.props),s=t.key,i=t.ref,a=t._owner;if(e!=null){if(e.ref!==void 0&&(i=e.ref,a=G2.current),e.key!==void 0&&(s=""+e.key),t.type&&t.type.defaultProps)var l=t.type.defaultProps;for(c in e)Bz.call(e,c)&&!$z.hasOwnProperty(c)&&(n[c]=e[c]===void 0&&l!==void 0?l[c]:e[c])}var c=arguments.length-2;if(c===1)n.children=r;else if(1<c){l=Array(c);for(var u=0;u<c;u++)l[u]=arguments[u+2];n.children=l}return{$$typeof:rf,type:t.type,key:s,ref:i,props:n,_owner:a}};it.createContext=function(t){return t={$$typeof:I9,_currentValue:t,_currentValue2:t,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},t.Provider={$$typeof:_9,_context:t},t.Consumer=t};it.createElement=Uz;it.createFactory=function(t){var e=Uz.bind(null,t);return e.type=t,e};it.createRef=function(){return{current:null}};it.forwardRef=function(t){return{$$typeof:O9,render:t}};it.isValidElement=Z2;it.lazy=function(t){return{$$typeof:M9,_payload:{_status:-1,_result:t},_init:$9}};it.memo=function(t,e){return{$$typeof:L9,type:t,compare:e===void 0?null:e}};it.startTransition=function(t){var e=Fm.transition;Fm.transition={};try{t()}finally{Fm.transition=e}};it.unstable_act=Wz;it.useCallback=function(t,e){return xn.current.useCallback(t,e)};it.useContext=function(t){return xn.current.useContext(t)};it.useDebugValue=function(){};it.useDeferredValue=function(t){return xn.current.useDeferredValue(t)};it.useEffect=function(t,e){return xn.current.useEffect(t,e)};it.useId=function(){return xn.current.useId()};it.useImperativeHandle=function(t,e,r){return xn.current.useImperativeHandle(t,e,r)};it.useInsertionEffect=function(t,e){return xn.current.useInsertionEffect(t,e)};it.useLayoutEffect=function(t,e){return xn.current.useLayoutEffect(t,e)};it.useMemo=function(t,e){return xn.current.useMemo(t,e)};it.useReducer=function(t,e,r){return xn.current.useReducer(t,e,r)};it.useRef=function(t){return xn.current.useRef(t)};it.useState=function(t){return xn.current.useState(t)};it.useSyncExternalStore=function(t,e,r){return xn.current.useSyncExternalStore(t,e,r)};it.useTransition=function(){return xn.current.useTransition()};it.version="18.3.1";Rz.exports=it;var M=Rz.exports;const ut=qo(M),W9=E9({__proto__:null,default:ut},[M]);/**
10 * @license React
11 * react-jsx-runtime.production.min.js
12 *
13 * Copyright (c) Facebook, Inc. and its affiliates.
14 *
15 * This source code is licensed under the MIT license found in the
16 * LICENSE file in the root directory of this source tree.
17 */var V9=M,H9=Symbol.for("react.element"),q9=Symbol.for("react.fragment"),K9=Object.prototype.hasOwnProperty,G9=V9.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,Z9={key:!0,ref:!0,__self:!0,__source:!0};function Vz(t,e,r){var n,s={},i=null,a=null;r!==void 0&&(i=""+r),e.key!==void 0&&(i=""+e.key),e.ref!==void 0&&(a=e.ref);for(n in e)K9.call(e,n)&&!Z9.hasOwnProperty(n)&&(s[n]=e[n]);if(t&&t.defaultProps)for(n in e=t.defaultProps,e)s[n]===void 0&&(s[n]=e[n]);return{$$typeof:H9,type:t,key:i,ref:a,props:s,_owner:G9.current}}ny.Fragment=q9;ny.jsx=Vz;ny.jsxs=Vz;Oz.exports=ny;var o=Oz.exports,Y1={},Hz={exports:{}},Xn={},qz={exports:{}},Kz={};/**
18 * @license React
19 * scheduler.production.min.js
20 *
21 * Copyright (c) Facebook, Inc. and its affiliates.
22 *
23 * This source code is licensed under the MIT license found in the
24 * LICENSE file in the root directory of this source tree.
25 */(function(t){function e(D,J){var de=D.length;D.push(J);e:for(;0<de;){var G=de-1>>>1,B=D[G];if(0<s(B,J))D[G]=J,D[de]=B,de=G;else break e}}function r(D){return D.length===0?null:D[0]}function n(D){if(D.length===0)return null;var J=D[0],de=D.pop();if(de!==J){D[0]=de;e:for(var G=0,B=D.length,re=B>>>1;G<re;){var ae=2*(G+1)-1,ge=D[ae],ne=ae+1,O=D[ne];if(0>s(ge,de))ne<B&&0>s(O,ge)?(D[G]=O,D[ne]=de,G=ne):(D[G]=ge,D[ae]=de,G=ae);else if(ne<B&&0>s(O,de))D[G]=O,D[ne]=de,G=ne;else break e}}return J}function s(D,J){var de=D.sortIndex-J.sortIndex;return de!==0?de:D.id-J.id}if(typeof performance=="object"&&typeof performance.now=="function"){var i=performance;t.unstable_now=function(){return i.now()}}else{var a=Date,l=a.now();t.unstable_now=function(){return a.now()-l}}var c=[],u=[],d=1,h=null,p=3,f=!1,m=!1,y=!1,k=typeof setTimeout=="function"?setTimeout:null,g=typeof clearTimeout=="function"?clearTimeout:null,x=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function w(D){for(var J=r(u);J!==null;){if(J.callback===null)n(u);else if(J.startTime<=D)n(u),J.sortIndex=J.expirationTime,e(c,J);else break;J=r(u)}}function b(D){if(y=!1,w(D),!m)if(r(c)!==null)m=!0,Y(v);else{var J=r(u);J!==null&&$(b,J.startTime-D)}}function v(D,J){m=!1,y&&(y=!1,g(_),_=-1),f=!0;var de=p;try{for(w(J),h=r(c);h!==null&&(!(h.expirationTime>J)||D&&!K());){var G=h.callback;if(typeof G=="function"){h.callback=null,p=h.priorityLevel;var B=G(h.expirationTime<=J);J=t.unstable_now(),typeof B=="function"?h.callback=B:h===r(c)&&n(c),w(J)}else n(c);h=r(c)}if(h!==null)var re=!0;else{var ae=r(u);ae!==null&&$(b,ae.startTime-J),re=!1}return re}finally{h=null,p=de,f=!1}}var A=!1,C=null,_=-1,N=5,W=-1;function K(){return!(t.unstable_now()-W<N)}function T(){if(C!==null){var D=t.unstable_now();W=D;var J=!0;try{J=C(!0,D)}finally{J?F():(A=!1,C=null)}}else A=!1}var F;if(typeof x=="function")F=function(){x(T)};else if(typeof MessageChannel<"u"){var E=new MessageChannel,H=E.port2;E.port1.onmessage=T,F=function(){H.postMessage(null)}}else F=function(){k(T,0)};function Y(D){C=D,A||(A=!0,F())}function $(D,J){_=k(function(){D(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(D){D.callback=null},t.unstable_continueExecution=function(){m||f||(m=!0,Y(v))},t.unstable_forceFrameRate=function(D){0>D||125<D?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):N=0<D?Math.floor(1e3/D):5},t.unstable_getCurrentPriorityLevel=function(){return p},t.unstable_getFirstCallbackNode=function(){return r(c)},t.unstable_next=function(D){switch(p){case 1:case 2:case 3:var J=3;break;default:J=p}var de=p;p=J;try{return D()}finally{p=de}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=function(){},t.unstable_runWithPriority=function(D,J){switch(D){case 1:case 2:case 3:case 4:case 5:break;default:D=3}var de=p;p=D;try{return J()}finally{p=de}},t.unstable_scheduleCallback=function(D,J,de){var G=t.unstable_now();switch(typeof de=="object"&&de!==null?(de=de.delay,de=typeof de=="number"&&0<de?G+de:G):de=G,D){case 1:var B=-1;break;case 2:B=250;break;case 5:B=1073741823;break;case 4:B=1e4;break;default:B=5e3}return B=de+B,D={id:d++,callback:J,priorityLevel:D,startTime:de,expirationTime:B,sortIndex:-1},de>G?(D.sortIndex=de,e(u,D),r(c)===null&&D===r(u)&&(y?(g(_),_=-1):y=!0,$(b,de-G))):(D.sortIndex=B,e(c,D),m||f||(m=!0,Y(v))),D},t.unstable_shouldYield=K,t.unstable_wrapCallback=function(D){var J=p;return function(){var de=p;p=J;try{return D.apply(this,arguments)}finally{p=de}}}})(Kz);
vendor: 4,243 bytes, lines 25-33
25qz.exports=Kz;var Y9=qz.exports;/**
26 * @license React
27 * react-dom.production.min.js
28 *
29 * Copyright (c) Facebook, Inc. and its affiliates.
30 *
31 * This source code is licensed under the MIT license found in the
32 * LICENSE file in the root directory of this source tree.
33 */var J9=M,Zn=Y9;function Ee(t){for(var e="https://reactjs.org/docs/error-decoder.html?invariant="+t,r=1;r<arguments.length;r++)e+="&args[]="+encodeURIComponent(arguments[r]);return"Minified React error #"+t+"; visit "+e+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var Gz=new Set,np={};function kc(t,e){$u(t,e),$u(t+"Capture",e)}function $u(t,e){for(np[t]=e,t=0;t<e.length;t++)Gz.add(e[t])}var ua=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),J1=Object.prototype.hasOwnProperty,X9=/^[: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]*$/,a3={},o3={};function Q9(t){return J1.call(o3,t)?!0:J1.call(a3,t)?!1:X9.test(t)?o3[t]=!0:(a3[t]=!0,!1)}function e7(t,e,r,n){if(r!==null&&r.type===0)return!1;switch(typeof e){case"function":case"symbol":return!0;case"boolean":return n?!1:r!==null?!r.acceptsBooleans:(t=t.toLowerCase().slice(0,5),t!=="data-"&&t!=="aria-");default:return!1}}function t7(t,e,r,n){if(e===null||typeof e>"u"||e7(t,e,r,n))return!0;if(n)return!1;if(r!==null)switch(r.type){case 3:return!e;case 4:return e===!1;case 5:return isNaN(e);case 6:return isNaN(e)||1>e}return!1}function wn(t,e,r,n,s,i,a){this.acceptsBooleans=e===2||e===3||e===4,this.attributeName=n,this.attributeNamespace=s,this.mustUseProperty=r,this.propertyName=t,this.type=e,this.sanitizeURL=i,this.removeEmptyString=a}var Wr={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(t){Wr[t]=new wn(t,0,!1,t,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(t){var e=t[0];Wr[e]=new wn(e,1,!1,t[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(t){Wr[t]=new wn(t,2,!1,t.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(t){Wr[t]=new wn(t,2,!1,t,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(t){Wr[t]=new wn(t,3,!1,t.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(t){Wr[t]=new wn(t,3,!0,t,null,!1,!1)});["capture","download"].forEach(function(t){Wr[t]=new wn(t,4,!1,t,null,!1,!1)});["cols","rows","size","span"].forEach(function(t){Wr[t]=new wn(t,6,!1,t,null,!1,!1)});["rowSpan","start"].forEach(function(t){Wr[t]=new wn(t,5,!1,t.toLowerCase(),null,!1,!1)});var Y2=/[\-:]([a-z])/g;function J2(t){return t[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode
33-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(t){var e=t.replace(Y2,J2);Wr[e]=new wn(e,1,!1,t,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(t){var e=t.replace(Y2,J2);Wr[e]=new wn(e,1,!1,t,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(t){var e=t.replace(Y2,J2);Wr[e]=new wn(e,1,!1,t,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(t){Wr[t]=new wn(t,1,!1,t.toLowerCase(),null,!1,!1)});Wr.xlinkHref=new wn("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(t){Wr[t]=new wn(t,1,!1,t.toLowerCase(),null,!0,!0)});function X2(t,e,r,n){var s=Wr.hasOwnProperty(e)?Wr[e]:null;(s!==null?s.type!==0:n||!(2<e.length)||e[0]!=="o"&&e[0]!=="O"||e[1]!=="n"&&e[1]!=="N")&&(t7(e,r,s,n)&&(r=null),n||s===null?Q9(e)&&(r===null?t.removeAttribute(e):t.setAttribute(e,""+r)):s.mustUseProperty?t[s.propertyName]=r===null?s.type===3?!1:"":r:(e=s.attributeName,n=s.attributeNamespace,r===null?t.removeAttribute(e):(s=s.type,r=s===3||s===4&&r===!0?"":""+r,n?t.setAttributeNS(n,e,r):t.setAttribute(e,r))))}var ba=J9.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,Df=Symbol.for("react.element"),Yc=Symbol.for("react.portal"),Jc=Symbol.for("react.fragment"),Q2=Symbol.for("react.strict_mode"),X1=Symbol.for("react.profiler"),Zz=Symbol.for("react.provider"),Yz=Symbol.for("react.context"),ej=Symbol.for("react.forward_ref"),Q1=Symbol.for("react.suspense"),ek=Symbol.for("react.suspense_list"),tj=Symbol.for("react.memo"),Ra=Symbol.for("react.lazy"),Jz=Symbol.for("react.offscreen"),l3=Symbol.iterator;function $d(t){return t===null||typeof t!="object"?null:(t=l3&&t[l3]||t["@@iterator"],typeof t=="function"?t:null)}var Wt=Object.assign,Tx;function gh(t){if(Tx===void 0)try{throw Error()}catch(r){var e=r.stack.trim().match(/\n( *(at )?)/);Tx=e&&e[1]||""}return`
34`+Tx+t}var Ax=!1;function zx(t,e){if(!t||Ax)return"";Ax=!0;var r=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(e)if(e=function(){throw Error()},Object.defineProperty(e.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(e,[])}catch(u){var n=u}Reflect.construct(t,[],e)}else{try{e.call()}catch(u){n=u}t.call(e.prototype)}else{try{throw Error()}catch(u){n=u}t()}}catch(u){if(u&&n&&typeof u.stack=="string"){for(var s=u.stack.split(`
35`),i=n.stack.split(`
36`),a=s.length-1,l=i.length-1;1<=a&&0<=l&&s[a]!==i[l];)l--;for(;1<=a&&0<=l;a--,l--)if(s[a]!==i[l]){if(a!==1||l!==1)do if(a--,l--,0>l||s[a]!==i[l]){var c=`
37`+s[a].replace(" at new "," at ");return t.displayName&&c.includes("<anonymous>")&&(c=c.replace("<anonymous>",t.displayName)),c}while(1<=a&&0<=l);break}}}finally{Ax=!1,Error.prepareStackTrace=r}return(t=t?t.displayName||t.name:"")?gh(t):""}function r7(t){switch(t.tag){case 5:return gh(t.type);case 16:return gh("Lazy");case 13:return gh("Suspense");case 19:return gh("SuspenseList");case 0:case 2:case 15:return t=zx(t.type,!1),t;case 11:return t=zx(t.type.render,!1),t;case 1:return t=zx(t.type,!0),t;default:return""}}function tk(t){if(t==null)return null;if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t;switch(t){case Jc:return"Fragment";case Yc:return"Portal";case X1:return"Profiler";case Q2:return"StrictMode";case Q1:return"Suspense";case ek:return"SuspenseList"}if(typeof t=="object")switch(t.$$typeof){case Yz:return(t.displayName||"Context")+".Consumer";case Zz:return(t._context.displayName||"Context")+".Provider";case ej:var e=t.render;return t=t.displayName,t||(t=e.displayName||e.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case tj:return e=t.displayName||null,e!==null?e:tk(t.type)||"Memo";case Ra:e=t._payload,t=t._init;try{return tk(t(e))}catch{}}return null}function n7(t){var e=t.type;switch(t.tag){case 24:return"Cache";case 9:return(e.displayName||"Context")+".Consumer";case 10:return(e._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return t=e.render,t=t.displayName||t.name||"",e.displayName||(t!==""?"ForwardRef("+t+")":"ForwardRef");case 7:return"Fragment";case 5:return e;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return tk(e);case 8:return e===Q2?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e}return null}function _o(t){switch(typeof t){case"boolean":case"number":case"string":case"undefined":return t;case"object":return t;default:return""}}function Xz(t){var e=t.type;
vendor: 14,321 bytes, line 37
37return(t=t.nodeName)&&t.toLowerCase()==="input"&&(e==="checkbox"||e==="radio")}function s7(t){var e=Xz(t)?"checked":"value",r=Object.getOwnPropertyDescriptor(t.constructor.prototype,e),n=""+t[e];if(!t.hasOwnProperty(e)&&typeof r<"u"&&typeof r.get=="function"&&typeof r.set=="function"){var s=r.get,i=r.set;return Object.defineProperty(t,e,{configurable:!0,get:function(){return s.call(this)},set:function(a){n=""+a,i.call(this,a)}}),Object.defineProperty(t,e,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(a){n=""+a},stopTracking:function(){t._valueTracker=null,delete t[e]}}}}function Ff(t){t._valueTracker||(t._valueTracker=s7(t))}function Qz(t){if(!t)return!1;var e=t._valueTracker;if(!e)return!0;var r=e.getValue(),n="";return t&&(n=Xz(t)?t.checked?"true":"false":t.value),t=n,t!==r?(e.setValue(t),!0):!1}function p0(t){if(t=t||(typeof document<"u"?document:void 0),typeof t>"u")return null;try{return t.activeElement||t.body}catch{return t.body}}function rk(t,e){var r=e.checked;return Wt({},e,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:r??t._wrapperState.initialChecked})}function c3(t,e){var r=e.defaultValue==null?"":e.defaultValue,n=e.checked!=null?e.checked:e.defaultChecked;r=_o(e.value!=null?e.value:r),t._wrapperState={initialChecked:n,initialValue:r,controlled:e.type==="checkbox"||e.type==="radio"?e.checked!=null:e.value!=null}}function eP(t,e){e=e.checked,e!=null&&X2(t,"checked",e,!1)}function nk(t,e){eP(t,e);var r=_o(e.value),n=e.type;if(r!=null)n==="number"?(r===0&&t.value===""||t.value!=r)&&(t.value=""+r):t.value!==""+r&&(t.value=""+r);else if(n==="submit"||n==="reset"){t.removeAttribute("value");return}e.hasOwnProperty("value")?sk(t,e.type,r):e.hasOwnProperty("defaultValue")&&sk(t,e.type,_o(e.defaultValue)),e.checked==null&&e.defaultChecked!=null&&(t.defaultChecked=!!e.defaultChecked)}function u3(t,e,r){if(e.hasOwnProperty("value")||e.hasOwnProperty("defaultValue")){var n=e.type;if(!(n!=="submit"&&n!=="reset"||e.value!==void 0&&e.value!==null))return;e=""+t._wrapperState.initialValue,r||e===t.value||(t.value=e),t.defaultValue=e}r=t.name,r!==""&&(t.name=""),t.defaultChecked=!!t._wrapperState.initialChecked,r!==""&&(t.name=r)}function sk(t,e,r){(e!=="number"||p0(t.ownerDocument)!==t)&&(r==null?t.defaultValue=""+t._wrapperState.initialValue:t.defaultValue!==""+r&&(t.defaultValue=""+r))}var yh=Array.isArray;function pu(t,e,r,n){if(t=t.options,e){e={};for(var s=0;s<r.length;s++)e["$"+r[s]]=!0;for(r=0;r<t.length;r++)s=e.hasOwnProperty("$"+t[r].value),t[r].selected!==s&&(t[r].selected=s),s&&n&&(t[r].defaultSelected=!0)}else{for(r=""+_o(r),e=null,s=0;s<t.length;s++){if(t[s].value===r){t[s].selected=!0,n&&(t[s].defaultSelected=!0);return}e!==null||t[s].disabled||(e=t[s])}e!==null&&(e.selected=!0)}}function ik(t,e){if(e.dangerouslySetInnerHTML!=null)throw Error(Ee(91));return Wt({},e,{value:void 0,defaultValue:void 0,children:""+t._wrapperState.initialValue})}function d3(t,e){var r=e.value;if(r==null){if(r=e.children,e=e.defaultValue,r!=null){if(e!=null)throw Error(Ee(92));if(yh(r)){if(1<r.length)throw Error(Ee(93));r=r[0]}e=r}e==null&&(e=""),r=e}t._wrapperState={initialValue:_o(r)}}function tP(t,e){var r=_o(e.value),n=_o(e.defaultValue);r!=null&&(r=""+r,r!==t.value&&(t.value=r),e.defaultValue==null&&t.defaultValue!==r&&(t.defaultValue=r)),n!=null&&(t.defaultValue=""+n)}function h3(t){var e=t.textContent;e===t._wrapperState.initialValue&&e!==""&&e!==null&&(t.value=e)}function rP(t){switch(t){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function ak(t,e){return t==null||t==="http://www.w3.org/1999/xhtml"?rP(e):t==="http://www.w3.org/2000/svg"&&e==="foreignObject"?"http://www.w3.org/1999/xhtml":t}var Bf,nP=function(t){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(e,r,n,s){MSApp.execUnsafeLocalFunction(function(){return t(e,r,n,s)})}:t}(function(t,e){if(t.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in t)t.innerHTML=e;else{for(Bf=Bf||document.createElement("div"),Bf.innerHTML="<svg>"+e.valueOf().toString()+"</svg>",e=Bf.firstChild;t.firstChild;)t.removeChild(t.firstChild);for(;e.firstChild;)t.appendChild(e.firstChild)}});function sp(t,e){if(e){var r=t.firstChild;if(r&&r===t.lastChild&&r.nodeType===3){r.nodeValue=e;return}}t.textContent=e}var Eh={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},i7=["Webkit","ms","Moz","O"];Object.keys(Eh).forEach(function(t){i7.forEach(function(e){e=e+t.charAt(0).toUpperCase()+t.substring(1),Eh[e]=Eh[t]})});function sP(t,e,r){return e==null||typeof e=="boolean"||e===""?"":r||typeof e!="number"||e===0||Eh.hasOwnProperty(t)&&Eh[t]?(""+e).trim():e+"px"}function iP(t,e){t=t.style;for(var r in e)if(e.hasOwnProperty(r)){var n=r.indexOf("--")===0,s=sP(r,e[r],n);r==="float"&&(r="cssFloat"),n?t.setProperty(r,s):t[r]=s}}var a7=Wt({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function ok(t,e){if(e){if(a7[t]&&(e.children!=null||e.dangerouslySetInnerHTML!=null))throw Error(Ee(137,t));if(e.dangerouslySetInnerHTML!=null){if(e.children!=null)throw Error(Ee(60));if(typeof e.dangerouslySetInnerHTML!="object"||!("__html"in e.dangerouslySetInnerHTML))throw Error(Ee(61))}if(e.style!=null&&typeof e.style!="object")throw Error(Ee(62))}}function lk(t,e){if(t.indexOf("-")===-1)return typeof e.is=="string";switch(t){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 ck=null;function rj(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var uk=null,fu=null,mu=null;function p3(t){if(t=af(t)){if(typeof uk!="function")throw Error(Ee(280));var e=t.stateNode;e&&(e=ly(e),uk(t.stateNode,t.type,e))}}function aP(t){fu?mu?mu.push(t):mu=[t]:fu=t}function oP(){if(fu){var t=fu,e=mu;if(mu=fu=null,p3(t),e)for(t=0;t<e.length;t++)p3(e[t])}}function lP(t,e){return t(e)}function cP(){}var Px=!1;function uP(t,e,r){if(Px)return t(e,r);Px=!0;try{return lP(t,e,r)}finally{Px=!1,(fu!==null||mu!==null)&&(cP(),oP())}}function ip(t,e){var r=t.stateNode;if(r===null)return null;var n=ly(r);if(n===null)return null;r=n[e];e:switch(e){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(n=!n.disabled)||(t=t.type,n=!(t==="button"||t==="input"||t==="select"||t==="textarea")),t=!n;break e;default:t=!1}if(t)return null;if(r&&typeof r!="function")throw Error(Ee(231,e,typeof r));return r}var dk=!1;if(ua)try{var Ud={};Object.defineProperty(Ud,"passive",{get:function(){dk=!0}}),window.addEventListener("test",Ud,Ud),window.removeEventListener("test",Ud,Ud)}catch{dk=!1}function o7(t,e,r,n,s,i,a,l,c){var u=Array.prototype.slice.call(arguments,3);try{e.apply(r,u)}catch(d){this.onError(d)}}var Th=!1,f0=null,m0=!1,hk=null,l7={onError:function(t){Th=!0,f0=t}};function c7(t,e,r,n,s,i,a,l,c){Th=!1,f0=null,o7.apply(l7,arguments)}function u7(t,e,r,n,s,i,a,l,c){if(c7.apply(this,arguments),Th){if(Th){var u=f0;Th=!1,f0=null}else throw Error(Ee(198));m0||(m0=!0,hk=u)}}function vc(t){var e=t,r=t;if(t.alternate)for(;e.return;)e=e.return;else{t=e;do e=t,e.flags&4098&&(r=e.return),t=e.return;while(t)}return e.tag===3?r:null}function dP(t){if(t.tag===13){var e=t.memoizedState;if(e===null&&(t=t.alternate,t!==null&&(e=t.memoizedState)),e!==null)return e.dehydrated}return null}function f3(t){if(vc(t)!==t)throw Error(Ee(188))}function d7(t){var e=t.alternate;if(!e){if(e=vc(t),e===null)throw Error(Ee(188));return e!==t?null:t}for(var r=t,n=e;;){var s=r.return;if(s===null)break;var i=s.alternate;if(i===null){if(n=s.return,n!==null){r=n;continue}break}if(s.child===i.child){for(i=s.child;i;){if(i===r)return f3(s),t;if(i===n)return f3(s),e;i=i.sibling}throw Error(Ee(188))}if(r.return!==n.return)r=s,n=i;else{for(var a=!1,l=s.child;l;){if(l===r){a=!0,r=s,n=i;break}if(l===n){a=!0,n=s,r=i;break}l=l.sibling}if(!a){for(l=i.child;l;){if(l===r){a=!0,r=i,n=s;break}if(l===n){a=!0,n=i,r=s;break}l=l.sibling}if(!a)throw Error(Ee(189))}}if(r.alternate!==n)throw Error(Ee(190))}if(r.tag!==3)throw Error(Ee(188));return r.stateNode.current===r?t:e}function hP(t){return t=d7(t),t!==null?pP(t):null}function pP(t){if(t.tag===5||t.tag===6)return t;for(t=t.child;t!==null;){var e=pP(t);if(e!==null)return e;t=t.sibling}return null}var fP=Zn.unstable_scheduleCallback,m3=Zn.unstable_cancelCallback,h7=Zn.unstable_shouldYield,p7=Zn.unstable_requestPaint,nr=Zn.unstable_now,f7=Zn.unstable_getCurrentPriorityLevel,nj=Zn.unstable_ImmediatePriority,mP=Zn.unstable_UserBlockingPriority,g0=Zn.unstable_NormalPriority,m7=Zn.unstable_LowPriority,gP=Zn.unstable_IdlePriority,sy=null,Si=null;function g7(t){if(Si&&typeof Si.onCommitFiberRoot=="function")try{Si.onCommitFiberRoot(sy,t,void 0,(t.current.flags&128)===128)}catch{}}var Ws=Math.clz32?Math.clz32:w7,y7=Math.log,x7=Math.LN2;function w7(t){return t>>>=0,t===0?32:31-(y7(t)/x7|0)|0}var $f=64,Uf=4194304;function xh(t){switch(t&-t){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return t&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return t}}function y0(t,e){var r=t.pendingLanes;if(r===0)return 0;var n=0,s=t.suspendedLanes,i=t.pingedLanes,a=r&268435455;if(a!==0){var l=a&~s;l!==0?n=xh(l):(i&=a,i!==0&&(n=xh(i)))}else a=r&~s,a!==0?n=xh(a):i!==0&&(n=xh(i));if(n===0)return 0;if(e!==0&&e!==n&&!(e&s)&&(s=n&-n,i=e&-e,s>=i||s===16&&(i&4194240)!==0))return e;if(n&4&&(n|=r&16),e=t.entangledLanes,e!==0)for(t=t.entanglements,e&=n;0<e;)r=31-Ws(e),s=1<<r,n|=t[r],e&=~s;return n}function b7(t,e){switch(t){case 1:case 2:case 4:return e+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function k7(t,e){for(var r=t.suspendedLanes,n=t.pingedLanes,s=t.expirationTimes,i=t.pendingLanes;0<i;){var a=31-Ws(i),l=1<<a,c=s[a];c===-1?(!(l&r)||l&n)&&(s[a]=b7(l,e)):c<=e&&(t.expiredLanes|=l),i&=~l}}function pk(t){return t=t.pendingLanes&-1073741825,t!==0?t:t&1073741824?1073741824:0}function yP(){var t=$f;return $f<<=1,!($f&4194240)&&($f=64),t}function _x(t){for(var e=[],r=0;31>r;r++)e.push(t);return e}function nf(t,e,r){t.pendingLanes|=e,e!==536870912&&(t.suspendedLanes=0,t.pingedLanes=0),t=t.eventTimes,e=31-Ws(e),t[e]=r}function v7(t,e){var r=t.pendingLanes&~e;t.pendingLanes=e,t.suspendedLanes=0,t.pingedLanes=0,t.expiredLanes&=e,t.mutableReadLanes&=e,t.entangledLanes&=e,e=t.entanglements;var n=t.eventTimes;for(t=t.expirationTimes;0<r;){var s=31-Ws(r),i=1<<s;e[s]=0,n[s]=-1,t[s]=-1,r&=~i}}function sj(t,e){var r=t.entangledLanes|=e;for(t=t.entanglements;r;){var n=31-Ws(r),s=1<<n;s&e|t[n]&e&&(t[n]|=e),r&=~s}}var St=0;function xP(t){return t&=-t,1<t?4<t?t&268435455?16:536870912:4:1}var wP,ij,bP,kP,vP,fk=!1,Wf=[],fo=null,mo=null,go=null,ap=new Map,op=new Map,Va=[],j7="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function g3(t,e){switch(t){case"focusin":case"focusout":fo=null;break;case"dragenter":case"dragleave":mo=null;break;case"mouseover":case"mouseout":go=null;break;case"pointerover":case"pointerout":ap.delete(e.pointerId);break;case"gotpointercapture":case"lostpointercapture":op.delete(e.pointerId)}}function Wd(t,e,r,n,s,i){return t===null||t.nativeEvent!==i?(t={blockedOn:e,domEventName:r,eventSystemFlags:n,nativeEvent:i,targetContainers:[s]},e!==null&&(e=af(e),e!==null&&ij(e)),t):(t.eventSystemFlags|=n,e=t.targetContainers,s!==null&&e.indexOf(s)===-1&&e.push(s),t)}function S7(t,e,r,n,s){switch(e){case"focusin":return fo=Wd(fo,t,e,r,n,s),!0;case"dragenter":return mo=Wd(mo,t,e,r,n,s),!0;case"mouseover":return go=Wd(go,t,e,r,n,s),!0;case"pointerover":var i=s.pointerId;return ap.set(i,Wd(ap.get(i)||null,t,e,r,n,s)),!0;case"gotpointercapture":return i=s.pointerId,op.set(i,Wd(op.get(i)||null,t,e,r,n,s)),!0}return!1}function jP(t){var e=jl(t.target);if(e!==null){var r=vc(e);if(r!==null){if(e=r.tag,e===13){if(e=dP(r),e!==null){t.blockedOn=e,vP(t.priority,function(){bP(r)});return}}else if(e===3&&r.stateNode.current.memoizedState.isDehydrated){t.blockedOn=r.tag===3?r.stateNode.containerInfo:null;return}}}t.blockedOn=null}function Bm(t){if(t.blockedOn!==null)return!1;for(var e=t.targetContainers;0<e.length;){var r=mk(t.domEventName,t.eventSystemFlags,e[0],t.nativeEvent);if(r===null){r=t.nativeEvent;var n=new r.constructor(r.type,r);ck=n,r.target.dispatchEvent(n),ck=null}else return e=af(r),e!==null&&ij(e),t.blockedOn=r,!1;e.shift()}return!0}function y3(t,e,r){Bm(t)&&r.delete(e)}function N7(){fk=!1,fo!==null&&Bm(fo)&&(fo=null),mo!==null&&Bm(mo)&&(mo=null),go!==null&&Bm(go)&&(go=null),ap.forEac
vendor: 9,291 bytes, line 37
37h(y3),op.forEach(y3)}function Vd(t,e){t.blockedOn===e&&(t.blockedOn=null,fk||(fk=!0,Zn.unstable_scheduleCallback(Zn.unstable_NormalPriority,N7)))}function lp(t){function e(s){return Vd(s,t)}if(0<Wf.length){Vd(Wf[0],t);for(var r=1;r<Wf.length;r++){var n=Wf[r];n.blockedOn===t&&(n.blockedOn=null)}}for(fo!==null&&Vd(fo,t),mo!==null&&Vd(mo,t),go!==null&&Vd(go,t),ap.forEach(e),op.forEach(e),r=0;r<Va.length;r++)n=Va[r],n.blockedOn===t&&(n.blockedOn=null);for(;0<Va.length&&(r=Va[0],r.blockedOn===null);)jP(r),r.blockedOn===null&&Va.shift()}var gu=ba.ReactCurrentBatchConfig,x0=!0;function C7(t,e,r,n){var s=St,i=gu.transition;gu.transition=null;try{St=1,aj(t,e,r,n)}finally{St=s,gu.transition=i}}function E7(t,e,r,n){var s=St,i=gu.transition;gu.transition=null;try{St=4,aj(t,e,r,n)}finally{St=s,gu.transition=i}}function aj(t,e,r,n){if(x0){var s=mk(t,e,r,n);if(s===null)Ux(t,e,n,w0,r),g3(t,n);else if(S7(s,t,e,r,n))n.stopPropagation();else if(g3(t,n),e&4&&-1<j7.indexOf(t)){for(;s!==null;){var i=af(s);if(i!==null&&wP(i),i=mk(t,e,r,n),i===null&&Ux(t,e,n,w0,r),i===s)break;s=i}s!==null&&n.stopPropagation()}else Ux(t,e,n,null,r)}}var w0=null;function mk(t,e,r,n){if(w0=null,t=rj(n),t=jl(t),t!==null)if(e=vc(t),e===null)t=null;else if(r=e.tag,r===13){if(t=dP(e),t!==null)return t;t=null}else if(r===3){if(e.stateNode.current.memoizedState.isDehydrated)return e.tag===3?e.stateNode.containerInfo:null;t=null}else e!==t&&(t=null);return w0=t,null}function SP(t){switch(t){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(f7()){case nj:return 1;case mP:return 4;case g0:case m7:return 16;case gP:return 536870912;default:return 16}default:return 16}}var io=null,oj=null,$m=null;function NP(){if($m)return $m;var t,e=oj,r=e.length,n,s="value"in io?io.value:io.textContent,i=s.length;for(t=0;t<r&&e[t]===s[t];t++);var a=r-t;for(n=1;n<=a&&e[r-n]===s[i-n];n++);return $m=s.slice(t,1<n?1-n:void 0)}function Um(t){var e=t.keyCode;return"charCode"in t?(t=t.charCode,t===0&&e===13&&(t=13)):t=e,t===10&&(t=13),32<=t||t===13?t:0}function Vf(){return!0}function x3(){return!1}function Qn(t){function e(r,n,s,i,a){this._reactName=r,this._targetInst=s,this.type=n,this.nativeEvent=i,this.target=a,this.currentTarget=null;for(var l in t)t.hasOwnProperty(l)&&(r=t[l],this[l]=r?r(i):i[l]);return this.isDefaultPrevented=(i.defaultPrevented!=null?i.defaultPrevented:i.returnValue===!1)?Vf:x3,this.isPropagationStopped=x3,this}return Wt(e.prototype,{preventDefault:function(){this.defaultPrevented=!0;var r=this.nativeEvent;r&&(r.preventDefault?r.preventDefault():typeof r.returnValue!="unknown"&&(r.returnValue=!1),this.isDefaultPrevented=Vf)},stopPropagation:function(){var r=this.nativeEvent;r&&(r.stopPropagation?r.stopPropagation():typeof r.cancelBubble!="unknown"&&(r.cancelBubble=!0),this.isPropagationStopped=Vf)},persist:function(){},isPersistent:Vf}),e}var Nd={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(t){return t.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},lj=Qn(Nd),sf=Wt({},Nd,{view:0,detail:0}),T7=Qn(sf),Ix,Ox,Hd,iy=Wt({},sf,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:cj,button:0,buttons:0,relatedTarget:function(t){return t.relatedTarget===void 0?t.fromElement===t.srcElement?t.toElement:t.fromElement:t.relatedTarget},movementX:function(t){return"movementX"in t?t.movementX:(t!==Hd&&(Hd&&t.type==="mousemove"?(Ix=t.screenX-Hd.screenX,Ox=t.screenY-Hd.screenY):Ox=Ix=0,Hd=t),Ix)},movementY:function(t){return"movementY"in t?t.movementY:Ox}}),w3=Qn(iy),A7=Wt({},iy,{dataTransfer:0}),z7=Qn(A7),P7=Wt({},sf,{relatedTarget:0}),Rx=Qn(P7),_7=Wt({},Nd,{animationName:0,elapsedTime:0,pseudoElement:0}),I7=Qn(_7),O7=Wt({},Nd,{clipboardData:function(t){return"clipboardData"in t?t.clipboardData:window.clipboardData}}),R7=Qn(O7),L7=Wt({},Nd,{data:0}),b3=Qn(L7),M7={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},D7={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"},F7={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function B7(t){var e=this.nativeEvent;return e.getModifierState?e.getModifierState(t):(t=F7[t])?!!e[t]:!1}function cj(){return B7}var $7=Wt({},sf,{key:function(t){if(t.key){var e=M7[t.key]||t.key;if(e!=="Unidentified")return e}return t.type==="keypress"?(t=Um(t),t===13?"Enter":String.fromCharCode(t)):t.type==="keydown"||t.type==="keyup"?D7[t.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:cj,charCode:function(t){return t.type==="keypress"?Um(t):0},keyCode:function(t){return t.type==="keydown"||t.type==="keyup"?t.keyCode:0},which:function(t){return t.type==="keypress"?Um(t):t.type==="keydown"||t.type==="keyup"?t.keyCode:0}}),U7=Qn($7),W7=Wt({},iy,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),k3=Qn(W7),V7=Wt({},sf,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:cj}),H7=Qn(V7),q7=Wt({},Nd,{propertyName:0,elapsedTime:0,pseudoElement:0}),K7=Qn(q7),G7=Wt({},iy,{deltaX:function(t){return"deltaX"in t?t.deltaX:"wheelDeltaX"in t?-t.wheelDeltaX:0},deltaY:function(t){return"deltaY"in t?t.deltaY:"wheelDeltaY"in t?-t.wheelDeltaY:"wheelDelta"in t?-t.wheelDelta:0},deltaZ:0,deltaMode:0}),Z7=Qn(G7),Y7=[9,13,27,32],uj=ua&&"CompositionEvent"in window,Ah=null;ua&&"documentMode"in document&&(Ah=document.documentMode);var J7=ua&&"TextEvent"in window&&!Ah,CP=ua&&(!uj||Ah&&8<Ah&&11>=Ah),v3=" ",j3=!1;function EP(t,e){switch(t){case"keyup":return Y7.indexOf(e.keyCode)!==-1;case"keydown":return e.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function TP(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var Xc=!1;function X7(t,e){switch(t){case"compositionend":return TP(e);case"keypress":return e.which!==32?null:(j3=!0,v3);case"textInput":return t=e.data,t===v3&&j3?null:t;default:return null}}function Q7(t,e){if(Xc)return t==="compositionend"||!uj&&EP(t,e)?(t=NP(),$m=oj=io=null,Xc=!1,t):null;switch(t){case"paste":return null;case"keypress":if(!(e.ctrlKey||e.altKey||e.metaKey)||e.ctrlKey&&e.altKey){if(e.char&&1<e.char.length)return e.char;if(e.which)return String.fromCharCode(e.which)}return null;case"compositionend":return CP&&e.locale!=="ko"?null:e.data;default:return null}}var eF={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 S3(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e==="input"?!!eF[t.type]:e==="textarea"}function AP(t,e,r,n){aP(n),e=b0(e,"onChange"),0<e.length&&(r=new lj("onChange","change",null,r,n),t.push({event:r,listeners:e}))}var zh=null,cp=null;function tF(t){BP(t,0)}function ay(t){var e=tu(t);if(Qz(e))return t}function rF(t,e){if(t==="change")return e}var zP=!1;if(ua){var Lx;if(ua){var Mx="oninput"in document;if(!Mx){var N3=document.createElement("div");N3.setAttribute("oninput","return;"),Mx=typeof N3.oninput=="function"}Lx=Mx}else Lx=!1;zP=Lx&&(!document.documentMode||9<document.documentMode)}function C3(){zh&&(zh.detachEvent("onpropertychange",PP),cp=zh=null)}function PP(t){if(t.propertyName==="value"&&ay(cp)){var e=[];AP(e,cp,t,rj(t)),uP(tF,e)}}function nF(t,e,r){t==="focusin"?(C3(),zh=e,cp=r,zh.attachEvent("onpropertychange",PP)):t==="focusout"&&C3()}function sF(t){if(t==="selectionchange"||t==="keyup"||t==="keydown")return ay(cp)}function iF(t,e){if(t==="click")return ay(e)}function aF(t,e){if(t==="input"||t==="change")return ay(e)}function oF(t,e){return t===e&&(t!==0||1/t===1/e)||t!==t&&e!==e}var Hs=typeof Object.is=="function"?Object.is:oF;function up(t,e){if(Hs(t,e))return!0;
vendor: 4,808 bytes, line 37
37if(typeof t!="object"||t===null||typeof e!="object"||e===null)return!1;var r=Object.keys(t),n=Object.keys(e);if(r.length!==n.length)return!1;for(n=0;n<r.length;n++){var s=r[n];if(!J1.call(e,s)||!Hs(t[s],e[s]))return!1}return!0}function E3(t){for(;t&&t.firstChild;)t=t.firstChild;return t}function T3(t,e){var r=E3(t);t=0;for(var n;r;){if(r.nodeType===3){if(n=t+r.textContent.length,t<=e&&n>=e)return{node:r,offset:e-t};t=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=E3(r)}}function _P(t,e){return t&&e?t===e?!0:t&&t.nodeType===3?!1:e&&e.nodeType===3?_P(t,e.parentNode):"contains"in t?t.contains(e):t.compareDocumentPosition?!!(t.compareDocumentPosition(e)&16):!1:!1}function IP(){for(var t=window,e=p0();e instanceof t.HTMLIFrameElement;){try{var r=typeof e.contentWindow.location.href=="string"}catch{r=!1}if(r)t=e.contentWindow;else break;e=p0(t.document)}return e}function dj(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e&&(e==="input"&&(t.type==="text"||t.type==="search"||t.type==="tel"||t.type==="url"||t.type==="password")||e==="textarea"||t.contentEditable==="true")}function lF(t){var e=IP(),r=t.focusedElem,n=t.selectionRange;if(e!==r&&r&&r.ownerDocument&&_P(r.ownerDocument.documentElement,r)){if(n!==null&&dj(r)){if(e=n.start,t=n.end,t===void 0&&(t=e),"selectionStart"in r)r.selectionStart=e,r.selectionEnd=Math.min(t,r.value.length);else if(t=(e=r.ownerDocument||document)&&e.defaultView||window,t.getSelection){t=t.getSelection();var s=r.textContent.length,i=Math.min(n.start,s);n=n.end===void 0?i:Math.min(n.end,s),!t.extend&&i>n&&(s=n,n=i,i=s),s=T3(r,i);var a=T3(r,n);s&&a&&(t.rangeCount!==1||t.anchorNode!==s.node||t.anchorOffset!==s.offset||t.focusNode!==a.node||t.focusOffset!==a.offset)&&(e=e.createRange(),e.setStart(s.node,s.offset),t.removeAllRanges(),i>n?(t.addRange(e),t.extend(a.node,a.offset)):(e.setEnd(a.node,a.offset),t.addRange(e)))}}for(e=[],t=r;t=t.parentNode;)t.nodeType===1&&e.push({element:t,left:t.scrollLeft,top:t.scrollTop});for(typeof r.focus=="function"&&r.focus(),r=0;r<e.length;r++)t=e[r],t.element.scrollLeft=t.left,t.element.scrollTop=t.top}}var cF=ua&&"documentMode"in document&&11>=document.documentMode,Qc=null,gk=null,Ph=null,yk=!1;function A3(t,e,r){var n=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;yk||Qc==null||Qc!==p0(n)||(n=Qc,"selectionStart"in n&&dj(n)?n={start:n.selectionStart,end:n.selectionEnd}:(n=(n.ownerDocument&&n.ownerDocument.defaultView||window).getSelection(),n={anchorNode:n.anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset}),Ph&&up(Ph,n)||(Ph=n,n=b0(gk,"onSelect"),0<n.length&&(e=new lj("onSelect","select",null,e,r),t.push({event:e,listeners:n}),e.target=Qc)))}function Hf(t,e){var r={};return r[t.toLowerCase()]=e.toLowerCase(),r["Webkit"+t]="webkit"+e,r["Moz"+t]="moz"+e,r}var eu={animationend:Hf("Animation","AnimationEnd"),animationiteration:Hf("Animation","AnimationIteration"),animationstart:Hf("Animation","AnimationStart"),transitionend:Hf("Transition","TransitionEnd")},Dx={},OP={};ua&&(OP=document.createElement("div").style,"AnimationEvent"in window||(delete eu.animationend.animation,delete eu.animationiteration.animation,delete eu.animationstart.animation),"TransitionEvent"in window||delete eu.transitionend.transition);function oy(t){if(Dx[t])return Dx[t];if(!eu[t])return t;var e=eu[t],r;for(r in e)if(e.hasOwnProperty(r)&&r in OP)return Dx[t]=e[r];return t}var RP=oy("animationend"),LP=oy("animationiteration"),MP=oy("animationstart"),DP=oy("transitionend"),FP=new Map,z3="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function Ko(t,e){FP.set(t,e),kc(e,[t])}for(var Fx=0;Fx<z3.length;Fx++){var Bx=z3[Fx],uF=Bx.toLowerCase(),dF=Bx[0].toUpperCase()+Bx.slice(1);Ko(uF,"on"+dF)}Ko(RP,"onAnimationEnd");Ko(LP,"onAnimationIteration");Ko(MP,"onAnimationStart");Ko("dblclick","onDoubleClick");Ko("focusin","onFocus");Ko("focusout","onBlur");Ko(DP,"onTransitionEnd");$u("onMouseEnter",["mouseout","mouseover"]);$u("onMouseLeave",["mouseout","mouseover"]);$u("onPointerEnter",["pointerout","pointerover"]);$u("onPointerLeave",["pointerout","pointerover"]);kc("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));
vendor: 4,430 bytes, line 37
37kc("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));kc("onBeforeInput",["compositionend","keypress","textInput","paste"]);kc("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));kc("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));kc("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var wh="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(" "),hF=new Set("cancel close invalid load scroll toggle".split(" ").concat(wh));function P3(t,e,r){var n=t.type||"unknown-event";t.currentTarget=r,u7(n,e,void 0,t),t.currentTarget=null}function BP(t,e){e=(e&4)!==0;for(var r=0;r<t.length;r++){var n=t[r],s=n.event;n=n.listeners;e:{var i=void 0;if(e)for(var a=n.length-1;0<=a;a--){var l=n[a],c=l.instance,u=l.currentTarget;if(l=l.listener,c!==i&&s.isPropagationStopped())break e;P3(s,l,u),i=c}else for(a=0;a<n.length;a++){if(l=n[a],c=l.instance,u=l.currentTarget,l=l.listener,c!==i&&s.isPropagationStopped())break e;P3(s,l,u),i=c}}}if(m0)throw t=hk,m0=!1,hk=null,t}function _t(t,e){var r=e[vk];r===void 0&&(r=e[vk]=new Set);var n=t+"__bubble";r.has(n)||($P(e,t,2,!1),r.add(n))}function $x(t,e,r){var n=0;e&&(n|=4),$P(r,t,n,e)}var qf="_reactListening"+Math.random().toString(36).slice(2);function dp(t){if(!t[qf]){t[qf]=!0,Gz.forEach(function(r){r!=="selectionchange"&&(hF.has(r)||$x(r,!1,t),$x(r,!0,t))});var e=t.nodeType===9?t:t.ownerDocument;e===null||e[qf]||(e[qf]=!0,$x("selectionchange",!1,e))}}function $P(t,e,r,n){switch(SP(e)){case 1:var s=C7;break;case 4:s=E7;break;default:s=aj}r=s.bind(null,e,r,t),s=void 0,!dk||e!=="touchstart"&&e!=="touchmove"&&e!=="wheel"||(s=!0),n?s!==void 0?t.addEventListener(e,r,{capture:!0,passive:s}):t.addEventListener(e,r,!0):s!==void 0?t.addEventListener(e,r,{passive:s}):t.addEventListener(e,r,!1)}function Ux(t,e,r,n,s){var i=n;if(!(e&1)&&!(e&2)&&n!==null)e:for(;;){if(n===null)return;var a=n.tag;if(a===3||a===4){var l=n.stateNode.containerInfo;if(l===s||l.nodeType===8&&l.parentNode===s)break;if(a===4)for(a=n.return;a!==null;){var c=a.tag;if((c===3||c===4)&&(c=a.stateNode.containerInfo,c===s||c.nodeType===8&&c.parentNode===s))return;a=a.return}for(;l!==null;){if(a=jl(l),a===null)return;if(c=a.tag,c===5||c===6){n=i=a;continue e}l=l.parentNode}}n=n.return}uP(function(){var u=i,d=rj(r),h=[];e:{var p=FP.get(t);if(p!==void 0){var f=lj,m=t;switch(t){case"keypress":if(Um(r)===0)break e;case"keydown":case"keyup":f=U7;break;case"focusin":m="focus",f=Rx;break;case"focusout":m="blur",f=Rx;break;case"beforeblur":case"afterblur":f=Rx;break;case"click":if(r.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":f=w3;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":f=z7;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":f=H7;break;case RP:case LP:case MP:f=I7;break;case DP:f=K7;break;case"scroll":f=T7;break;case"wheel":f=Z7;break;case"copy":case"cut":case"paste":f=R7;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":f=k3}var y=(e&4)!==0,k=!y&&t==="scroll",g=y?p!==null?p+"Capture":null:p;y=[];for(var x=u,w;x!==null;){w=x;var b=w.stateNode;if(w.tag===5&&b!==null&&(w=b,g!==null&&(b=ip(x,g),b!=null&&y.push(hp(x,b,w)))),k)break;x=x.return}0<y.length&&(p=new f(p,m,null,r,d),h.push({event:p,listeners:y}))}}if(!(e&7)){e:{if(p=t==="mouseover"||t==="pointerover",f=t==="mouseout"||t==="pointerout",p&&r!==ck&&(m=r.relatedTarget||r.fromElement)&&(jl(m)||m[da]))break e;if((f||p)&&(p=d.window===d?d:(p=d.ownerDocument)?p.defaultView||p.parentWindow:window,f?(m=r.relatedTarget||r.toElement,f=u,m=m?jl(m):null,m!==null&&(k=vc(m),m!==k||m.tag!==5&&m.tag!==6)&&(m=null)):(f=null,m=u),f!==m)){if(y=w3,b="onMouseLeave",g="onMouseEnter",x="mouse",(t==="pointerout"||t==="pointerover")&&(y=k3,b="onPointerLeave",g="onPointerEnter",x="pointer"),k=f==null?p:tu(f),w=m==null?p:tu(m),p=new y(b,x+"leave",f,r,d),p.target=k,p.relatedTarget=w,b=null,jl(d
vendor: 4,115 bytes, lines 37-38
37)===u&&(y=new y(g,x+"enter",m,r,d),y.target=w,y.relatedTarget=k,b=y),k=b,f&&m)t:{for(y=f,g=m,x=0,w=y;w;w=Pc(w))x++;for(w=0,b=g;b;b=Pc(b))w++;for(;0<x-w;)y=Pc(y),x--;for(;0<w-x;)g=Pc(g),w--;for(;x--;){if(y===g||g!==null&&y===g.alternate)break t;y=Pc(y),g=Pc(g)}y=null}else y=null;f!==null&&_3(h,p,f,y,!1),m!==null&&k!==null&&_3(h,k,m,y,!0)}}e:{if(p=u?tu(u):window,f=p.nodeName&&p.nodeName.toLowerCase(),f==="select"||f==="input"&&p.type==="file")var v=rF;else if(S3(p))if(zP)v=aF;else{v=sF;var A=nF}else(f=p.nodeName)&&f.toLowerCase()==="input"&&(p.type==="checkbox"||p.type==="radio")&&(v=iF);if(v&&(v=v(t,u))){AP(h,v,r,d);break e}A&&A(t,p,u),t==="focusout"&&(A=p._wrapperState)&&A.controlled&&p.type==="number"&&sk(p,"number",p.value)}switch(A=u?tu(u):window,t){case"focusin":(S3(A)||A.contentEditable==="true")&&(Qc=A,gk=u,Ph=null);break;case"focusout":Ph=gk=Qc=null;break;case"mousedown":yk=!0;break;case"contextmenu":case"mouseup":case"dragend":yk=!1,A3(h,r,d);break;case"selectionchange":if(cF)break;case"keydown":case"keyup":A3(h,r,d)}var C;if(uj)e:{switch(t){case"compositionstart":var _="onCompositionStart";break e;case"compositionend":_="onCompositionEnd";break e;case"compositionupdate":_="onCompositionUpdate";break e}_=void 0}else Xc?EP(t,r)&&(_="onCompositionEnd"):t==="keydown"&&r.keyCode===229&&(_="onCompositionStart");_&&(CP&&r.locale!=="ko"&&(Xc||_!=="onCompositionStart"?_==="onCompositionEnd"&&Xc&&(C=NP()):(io=d,oj="value"in io?io.value:io.textContent,Xc=!0)),A=b0(u,_),0<A.length&&(_=new b3(_,t,null,r,d),h.push({event:_,listeners:A}),C?_.data=C:(C=TP(r),C!==null&&(_.data=C)))),(C=J7?X7(t,r):Q7(t,r))&&(u=b0(u,"onBeforeInput"),0<u.length&&(d=new b3("onBeforeInput","beforeinput",null,r,d),h.push({event:d,listeners:u}),d.data=C))}BP(h,e)})}function hp(t,e,r){return{instance:t,listener:e,currentTarget:r}}function b0(t,e){for(var r=e+"Capture",n=[];t!==null;){var s=t,i=s.stateNode;s.tag===5&&i!==null&&(s=i,i=ip(t,r),i!=null&&n.unshift(hp(t,i,s)),i=ip(t,e),i!=null&&n.push(hp(t,i,s))),t=t.return}return n}function Pc(t){if(t===null)return null;do t=t.return;while(t&&t.tag!==5);return t||null}function _3(t,e,r,n,s){for(var i=e._reactName,a=[];r!==null&&r!==n;){var l=r,c=l.alternate,u=l.stateNode;if(c!==null&&c===n)break;l.tag===5&&u!==null&&(l=u,s?(c=ip(r,i),c!=null&&a.unshift(hp(r,c,l))):s||(c=ip(r,i),c!=null&&a.push(hp(r,c,l)))),r=r.return}a.length!==0&&t.push({event:e,listeners:a})}var pF=/\r\n?/g,fF=/\u0000|\uFFFD/g;function I3(t){return(typeof t=="string"?t:""+t).replace(pF,`
38`).replace(fF,"")}function Kf(t,e,r){if(e=I3(e),I3(t)!==e&&r)throw Error(Ee(425))}function k0(){}var xk=null,wk=null;function bk(t,e){return t==="textarea"||t==="noscript"||typeof e.children=="string"||typeof e.children=="number"||typeof e.dangerouslySetInnerHTML=="object"&&e.dangerouslySetInnerHTML!==null&&e.dangerouslySetInnerHTML.__html!=null}var kk=typeof setTimeout=="function"?setTimeout:void 0,mF=typeof clearTimeout=="function"?clearTimeout:void 0,O3=typeof Promise=="function"?Promise:void 0,gF=typeof queueMicrotask=="function"?queueMicrotask:typeof O3<"u"?function(t){return O3.resolve(null).then(t).catch(yF)}:kk;function yF(t){setTimeout(function(){throw t})}function Wx(t,e){var r=e,n=0;do{var s=r.nextSibling;if(t.removeChild(r),s&&s.nodeType===8)if(r=s.data,r==="/$"){if(n===0){t.removeChild(s),lp(e);return}n--}else r!=="$"&&r!=="$?"&&r!=="$!"||n++;r=s}while(r);lp(e)}function yo(t){for(;t!=null;t=t.nextSibling){var e=t.nodeType;if(e===1||e===3)break;if(e===8){if(e=t.data,e==="$"||e==="$!"||e==="$?")break;if(e==="/$")return null}}return t}function R3(t){t=t.previousSibling;for(var e=0;t;){if(t.nodeType===8){var r=t.data;if(r==="$"||r==="$!"||r==="$?"){if(e===0)return t;e--}else r==="/$"&&e++}t=t.previousSibling}return null}var Cd=Math.random().toString(36).slice(2),gi="__reactFiber$"+Cd,pp="__reactProps$"+Cd,da="__reactContainer$"+Cd,vk="__reactEvents$"+Cd,xF="__reactListeners$"+Cd,wF="__reactHandles$"+Cd;function jl(t){var e=t[gi];if(e)return e;for(var r=t.parentNode;r;){if(e=r[da]||r[gi]){if(r=e.alternate,e.child!==null||r!==null&&r.child!==null)for(t=R3(t);t!==null;
vendor: 10,747 bytes, line 38
38){if(r=t[gi])return r;t=R3(t)}return e}t=r,r=t.parentNode}return null}function af(t){return t=t[gi]||t[da],!t||t.tag!==5&&t.tag!==6&&t.tag!==13&&t.tag!==3?null:t}function tu(t){if(t.tag===5||t.tag===6)return t.stateNode;throw Error(Ee(33))}function ly(t){return t[pp]||null}var jk=[],ru=-1;function Go(t){return{current:t}}function Ot(t){0>ru||(t.current=jk[ru],jk[ru]=null,ru--)}function zt(t,e){ru++,jk[ru]=t.current,t.current=e}var Io={},en=Go(Io),Pn=Go(!1),rc=Io;function Uu(t,e){var r=t.type.contextTypes;if(!r)return Io;var n=t.stateNode;if(n&&n.__reactInternalMemoizedUnmaskedChildContext===e)return n.__reactInternalMemoizedMaskedChildContext;var s={},i;for(i in r)s[i]=e[i];return n&&(t=t.stateNode,t.__reactInternalMemoizedUnmaskedChildContext=e,t.__reactInternalMemoizedMaskedChildContext=s),s}function _n(t){return t=t.childContextTypes,t!=null}function v0(){Ot(Pn),Ot(en)}function L3(t,e,r){if(en.current!==Io)throw Error(Ee(168));zt(en,e),zt(Pn,r)}function UP(t,e,r){var n=t.stateNode;if(e=e.childContextTypes,typeof n.getChildContext!="function")return r;n=n.getChildContext();for(var s in n)if(!(s in e))throw Error(Ee(108,n7(t)||"Unknown",s));return Wt({},r,n)}function j0(t){return t=(t=t.stateNode)&&t.__reactInternalMemoizedMergedChildContext||Io,rc=en.current,zt(en,t),zt(Pn,Pn.current),!0}function M3(t,e,r){var n=t.stateNode;if(!n)throw Error(Ee(169));r?(t=UP(t,e,rc),n.__reactInternalMemoizedMergedChildContext=t,Ot(Pn),Ot(en),zt(en,t)):Ot(Pn),zt(Pn,r)}var Ki=null,cy=!1,Vx=!1;function WP(t){Ki===null?Ki=[t]:Ki.push(t)}function bF(t){cy=!0,WP(t)}function Zo(){if(!Vx&&Ki!==null){Vx=!0;var t=0,e=St;try{var r=Ki;for(St=1;t<r.length;t++){var n=r[t];do n=n(!0);while(n!==null)}Ki=null,cy=!1}catch(s){throw Ki!==null&&(Ki=Ki.slice(t+1)),fP(nj,Zo),s}finally{St=e,Vx=!1}}return null}var nu=[],su=0,S0=null,N0=0,ps=[],fs=0,nc=null,Xi=1,Qi="";function hl(t,e){nu[su++]=N0,nu[su++]=S0,S0=t,N0=e}function VP(t,e,r){ps[fs++]=Xi,ps[fs++]=Qi,ps[fs++]=nc,nc=t;var n=Xi;t=Qi;var s=32-Ws(n)-1;n&=~(1<<s),r+=1;var i=32-Ws(e)+s;if(30<i){var a=s-s%5;i=(n&(1<<a)-1).toString(32),n>>=a,s-=a,Xi=1<<32-Ws(e)+s|r<<s|n,Qi=i+t}else Xi=1<<i|r<<s|n,Qi=t}function hj(t){t.return!==null&&(hl(t,1),VP(t,1,0))}function pj(t){for(;t===S0;)S0=nu[--su],nu[su]=null,N0=nu[--su],nu[su]=null;for(;t===nc;)nc=ps[--fs],ps[fs]=null,Qi=ps[--fs],ps[fs]=null,Xi=ps[--fs],ps[fs]=null}var Kn=null,qn=null,Mt=!1,Os=null;function HP(t,e){var r=gs(5,null,null,0);r.elementType="DELETED",r.stateNode=e,r.return=t,e=t.deletions,e===null?(t.deletions=[r],t.flags|=16):e.push(r)}function D3(t,e){switch(t.tag){case 5:var r=t.type;return e=e.nodeType!==1||r.toLowerCase()!==e.nodeName.toLowerCase()?null:e,e!==null?(t.stateNode=e,Kn=t,qn=yo(e.firstChild),!0):!1;case 6:return e=t.pendingProps===""||e.nodeType!==3?null:e,e!==null?(t.stateNode=e,Kn=t,qn=null,!0):!1;case 13:return e=e.nodeType!==8?null:e,e!==null?(r=nc!==null?{id:Xi,overflow:Qi}:null,t.memoizedState={dehydrated:e,treeContext:r,retryLane:1073741824},r=gs(18,null,null,0),r.stateNode=e,r.return=t,t.child=r,Kn=t,qn=null,!0):!1;default:return!1}}function Sk(t){return(t.mode&1)!==0&&(t.flags&128)===0}function Nk(t){if(Mt){var e=qn;if(e){var r=e;if(!D3(t,e)){if(Sk(t))throw Error(Ee(418));e=yo(r.nextSibling);var n=Kn;e&&D3(t,e)?HP(n,r):(t.flags=t.flags&-4097|2,Mt=!1,Kn=t)}}else{if(Sk(t))throw Error(Ee(418));t.flags=t.flags&-4097|2,Mt=!1,Kn=t}}}function F3(t){for(t=t.return;t!==null&&t.tag!==5&&t.tag!==3&&t.tag!==13;)t=t.return;Kn=t}function Gf(t){if(t!==Kn)return!1;if(!Mt)return F3(t),Mt=!0,!1;var e;if((e=t.tag!==3)&&!(e=t.tag!==5)&&(e=t.type,e=e!=="head"&&e!=="body"&&!bk(t.type,t.memoizedProps)),e&&(e=qn)){if(Sk(t))throw qP(),Error(Ee(418));for(;e;)HP(t,e),e=yo(e.nextSibling)}if(F3(t),t.tag===13){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(Ee(317));e:{for(t=t.nextSibling,e=0;t;){if(t.nodeType===8){var r=t.data;if(r==="/$"){if(e===0){qn=yo(t.nextSibling);break e}e--}else r!=="$"&&r!=="$!"&&r!=="$?"||e++}t=t.nextSibling}qn=null}}else qn=Kn?yo(t.stateNode.nextSibling):null;return!0}function qP(){for(var t=qn;t;)t=yo(t.nextSibling)}function Wu(){qn=Kn=null,Mt=!1}function fj(t){Os===null?Os=[t]:Os.push(t)}var kF=ba.ReactCurrentBatchConfig;function qd(t,e,r){if(t=r.ref,t!==null&&typeof t!="function"&&typeof t!="object"){if(r._owner){if(r=r._owner,r){if(r.tag!==1)throw Error(Ee(309));var n=r.stateNode}if(!n)throw Error(Ee(147,t));var s=n,i=""+t;return e!==null&&e.ref!==null&&typeof e.ref=="function"&&e.ref._stringRef===i?e.ref:(e=function(a){var l=s.refs;a===null?delete l[i]:l[i]=a},e._stringRef=i,e)}if(typeof t!="string")throw Error(Ee(284));if(!r._owner)throw Error(Ee(290,t))}return t}function Zf(t,e){throw t=Object.prototype.toString.call(e),Error(Ee(31,t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t))}function B3(t){var e=t._init;return e(t._payload)}function KP(t){function e(g,x){if(t){var w=g.deletions;w===null?(g.deletions=[x],g.flags|=16):w.push(x)}}function r(g,x){if(!t)return null;for(;x!==null;)e(g,x),x=x.sibling;return null}function n(g,x){for(g=new Map;x!==null;)x.key!==null?g.set(x.key,x):g.set(x.index,x),x=x.sibling;return g}function s(g,x){return g=ko(g,x),g.index=0,g.sibling=null,g}function i(g,x,w){return g.index=w,t?(w=g.alternate,w!==null?(w=w.index,w<x?(g.flags|=2,x):w):(g.flags|=2,x)):(g.flags|=1048576,x)}function a(g){return t&&g.alternate===null&&(g.flags|=2),g}function l(g,x,w,b){return x===null||x.tag!==6?(x=Jx(w,g.mode,b),x.return=g,x):(x=s(x,w),x.return=g,x)}function c(g,x,w,b){var v=w.type;return v===Jc?d(g,x,w.props.children,b,w.key):x!==null&&(x.elementType===v||typeof v=="object"&&v!==null&&v.$$typeof===Ra&&B3(v)===x.type)?(b=s(x,w.props),b.ref=qd(g,x,w),b.return=g,b):(b=Zm(w.type,w.key,w.props,null,g.mode,b),b.ref=qd(g,x,w),b.return=g,b)}function u(g,x,w,b){return x===null||x.tag!==4||x.stateNode.containerInfo!==w.containerInfo||x.stateNode.implementation!==w.implementation?(x=Xx(w,g.mode,b),x.return=g,x):(x=s(x,w.children||[]),x.return=g,x)}function d(g,x,w,b,v){return x===null||x.tag!==7?(x=Gl(w,g.mode,b,v),x.return=g,x):(x=s(x,w),x.return=g,x)}function h(g,x,w){if(typeof x=="string"&&x!==""||typeof x=="number")return x=Jx(""+x,g.mode,w),x.return=g,x;if(typeof x=="object"&&x!==null){switch(x.$$typeof){case Df:return w=Zm(x.type,x.key,x.props,null,g.mode,w),w.ref=qd(g,null,x),w.return=g,w;case Yc:return x=Xx(x,g.mode,w),x.return=g,x;case Ra:var b=x._init;return h(g,b(x._payload),w)}if(yh(x)||$d(x))return x=Gl(x,g.mode,w,null),x.return=g,x;Zf(g,x)}return null}function p(g,x,w,b){var v=x!==null?x.key:null;if(typeof w=="string"&&w!==""||typeof w=="number")return v!==null?null:l(g,x,""+w,b);if(typeof w=="object"&&w!==null){switch(w.$$typeof){case Df:return w.key===v?c(g,x,w,b):null;case Yc:return w.key===v?u(g,x,w,b):null;case Ra:return v=w._init,p(g,x,v(w._payload),b)}if(yh(w)||$d(w))return v!==null?null:d(g,x,w,b,null);Zf(g,w)}return null}function f(g,x,w,b,v){if(typeof b=="string"&&b!==""||typeof b=="number")return g=g.get(w)||null,l(x,g,""+b,v);if(typeof b=="object"&&b!==null){switch(b.$$typeof){case Df:return g=g.get(b.key===null?w:b.key)||null,c(x,g,b,v);case Yc:return g=g.get(b.key===null?w:b.key)||null,u(x,g,b,v);case Ra:var A=b._init;return f(g,x,w,A(b._payload),v)}if(yh(b)||$d(b))return g=g.get(w)||null,d(x,g,b,v,null);Zf(x,b)}return null}function m(g,x,w,b){for(var v=null,A=null,C=x,_=x=0,N=null;C!==null&&_<w.length;_++){C.index>_?(N=C,C=null):N=C.sibling;var W=p(g,C,w[_],b);if(W===null){C===null&&(C=N);break}t&&C&&W.alternate===null&&e(g,C),x=i(W,x,_),A===null?v=W:A.sibling=W,A=W,C=N}if(_===w.length)return r(g,C),Mt&&hl(g,_),v;if(C===null){for(;_<w.length;_++)C=h(g,w[_],b),C!==null&&(x=i(C,x,_),A===null?v=C:A.sibling=C,A=C);return Mt&&hl(g,_),v}for(C=n(g,C);_<w.length;_++)N=f(C,g,_,w[_],b),N!==null&&(t&&N.alternate!==null&&C.delete(N.key===null?_:N.key),x=i(N,x,_),A===null?v=N:A.sibling=N,A=N);return t&&C.forEach(function(K){return e(g,K)}),Mt&&hl(g,_),v}function y(g,x,w,b){var v=$d(w);if(typeof v!="function")throw Error(Ee(150));if(w=v.call(w),w==null)throw Error(Ee(151));for(var A=v=null,C=x,_=x=0,N=null,W=w.next();C!==null&&!W.done;_++,W=w.next()){C.index>_?(N=C,C=null):N=C.sibling;var K=p(g,C,W.value,b);if(K===null){C===null&&(C=N);break}t&&C&&K.alternate===null&&e(g,C),x=i(K,x,_),A===null?v=K:A.sibling=K,A=K,C=N}if(W.done)return r(g,C),Mt&&hl(g,_),v;if(C===null){for(;!W.done;_++,W=w.next())W=h(g,W.value,b),W!==null&&(x=i(W,x,_),A===null?v=W:A.sibling=W,A=W);return Mt&&hl(g,_),v}for(C=n(g,C);!W.done;_++,W=w.next())W=f(C,g,_,W.value,b),W!==null&&(t&&W.alternate!==null&&C.delete(W.key===null?_:W.key),x=i(W,x,_),A===null?v=W:A.sibling=W,A=W);return t&&C.forEach(function(T){return e(g,T)}),Mt&&hl(g,_),v}function k(g,x,w,b){if(typeof w=="object"&&w!==null&&w.type===Jc&&w.key===null&&(w=w.props.children),typeof w=="object"&&w!==null){switch(w.$$typeof){case Df:e:{for(var v=w.key,A=x;A!==null;){if(A.key===v){if(v=w.type,v===Jc){if(A.tag===7){r(g,A.sibling),x=s(A,w.props.children),x.return=g,g=x;break e}}else if(A.elementType===v||typeof v=="object"&&v!==null&&v.$$typeof===Ra&&B3(v)===A.type){r(g,A.sibling),x=s(A,w.props),x.ref=qd(g,A,w),x.return=g,g=x;break e}r(g,A);break}else e(g,A);A=A.sibling}w.type===Jc?(x=Gl(w.props.children,g.mode,b,w.key),x.return=g,g=x):(b=Zm(w.type,w.key,w.props,null,g.mode,b),b.ref=qd(g,x,w),b.return=g,g=b)}return a(g);case Yc:e:{for(A=w.key;x!==null;){if(x.key===A)if(x.tag===4&&x.stateNode.containerInfo===w.containerInfo&&x.stateNode.implementation===w.implementation){r(g,x.sibling),x=s(x,w.children||[]),x.return=g,g=x;break e}else{r(g,x);break}else e(g,x);x=x.sibling}x=Xx(w,g.mode,b),x.return=g,g=x}return a(g);case Ra:return A=w._init,k(g,x,A(w._payload),b)}if(yh(w))return m(g,x,w,b);if($d(w))return y(g,x,w,b);Zf(g,w)}return typeof w=="string"&&w!==""||typeof w=="number"?(w=""+w,x!==null&&x.tag===6?(r(g,x.sibling),x=s(x,w),x.return=g,g=x):(r(g,x),x=Jx(w,g.mode,b),x.return=g,g=x),a(g)):r(g,x)}return k}var Vu=KP(!0),GP=KP(!1),C0=Go(null),E0=null,iu=null,mj=null;function gj(){mj=iu=E0=null}function yj(t){var e=C0.current;Ot(C0),t._currentValue=e}function Ck(t,e,r){for(;t!==null;){var n=t.alternate;if((t.childLanes&e)!==e?(t.childLanes|=e,n!==null&&(n.childLanes|=e)):n!==null&&(n.childLanes&e)!==e&&(n.childLanes|=e),t===r)break;t=t.return}}function yu(t,e){E0=t,mj=iu=null,t=t.dependencies,t!==null&&t.firstContext!==null&&(t.lanes&e&&(zn=!0),t.firstContext=null)}function vs(t){var e=t._currentValue;if(mj!==t)if(t={context:t,memoizedValue:e,next:null},iu===null){if(E0===null)throw Error(Ee(308));iu=t,E0.dependencies={lanes:0,firstContext:t}}else iu=iu.next=t;return e}var Sl=null;function xj(t){Sl===null?Sl=[t]:Sl.push(t)}function ZP(t,e,r,n){var s=e.interleaved;
vendor: 12,304 bytes, line 38
38return s===null?(r.next=r,xj(e)):(r.next=s.next,s.next=r),e.interleaved=r,ha(t,n)}function ha(t,e){t.lanes|=e;var r=t.alternate;for(r!==null&&(r.lanes|=e),r=t,t=t.return;t!==null;)t.childLanes|=e,r=t.alternate,r!==null&&(r.childLanes|=e),r=t,t=t.return;return r.tag===3?r.stateNode:null}var La=!1;function wj(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function YP(t,e){t=t.updateQueue,e.updateQueue===t&&(e.updateQueue={baseState:t.baseState,firstBaseUpdate:t.firstBaseUpdate,lastBaseUpdate:t.lastBaseUpdate,shared:t.shared,effects:t.effects})}function sa(t,e){return{eventTime:t,lane:e,tag:0,payload:null,callback:null,next:null}}function xo(t,e,r){var n=t.updateQueue;if(n===null)return null;if(n=n.shared,ht&2){var s=n.pending;return s===null?e.next=e:(e.next=s.next,s.next=e),n.pending=e,ha(t,r)}return s=n.interleaved,s===null?(e.next=e,xj(n)):(e.next=s.next,s.next=e),n.interleaved=e,ha(t,r)}function Wm(t,e,r){if(e=e.updateQueue,e!==null&&(e=e.shared,(r&4194240)!==0)){var n=e.lanes;n&=t.pendingLanes,r|=n,e.lanes=r,sj(t,r)}}function $3(t,e){var r=t.updateQueue,n=t.alternate;if(n!==null&&(n=n.updateQueue,r===n)){var s=null,i=null;if(r=r.firstBaseUpdate,r!==null){do{var a={eventTime:r.eventTime,lane:r.lane,tag:r.tag,payload:r.payload,callback:r.callback,next:null};i===null?s=i=a:i=i.next=a,r=r.next}while(r!==null);i===null?s=i=e:i=i.next=e}else s=i=e;r={baseState:n.baseState,firstBaseUpdate:s,lastBaseUpdate:i,shared:n.shared,effects:n.effects},t.updateQueue=r;return}t=r.lastBaseUpdate,t===null?r.firstBaseUpdate=e:t.next=e,r.lastBaseUpdate=e}function T0(t,e,r,n){var s=t.updateQueue;La=!1;var i=s.firstBaseUpdate,a=s.lastBaseUpdate,l=s.shared.pending;if(l!==null){s.shared.pending=null;var c=l,u=c.next;c.next=null,a===null?i=u:a.next=u,a=c;var d=t.alternate;d!==null&&(d=d.updateQueue,l=d.lastBaseUpdate,l!==a&&(l===null?d.firstBaseUpdate=u:l.next=u,d.lastBaseUpdate=c))}if(i!==null){var h=s.baseState;a=0,d=u=c=null,l=i;do{var p=l.lane,f=l.eventTime;if((n&p)===p){d!==null&&(d=d.next={eventTime:f,lane:0,tag:l.tag,payload:l.payload,callback:l.callback,next:null});e:{var m=t,y=l;switch(p=e,f=r,y.tag){case 1:if(m=y.payload,typeof m=="function"){h=m.call(f,h,p);break e}h=m;break e;case 3:m.flags=m.flags&-65537|128;case 0:if(m=y.payload,p=typeof m=="function"?m.call(f,h,p):m,p==null)break e;h=Wt({},h,p);break e;case 2:La=!0}}l.callback!==null&&l.lane!==0&&(t.flags|=64,p=s.effects,p===null?s.effects=[l]:p.push(l))}else f={eventTime:f,lane:p,tag:l.tag,payload:l.payload,callback:l.callback,next:null},d===null?(u=d=f,c=h):d=d.next=f,a|=p;if(l=l.next,l===null){if(l=s.shared.pending,l===null)break;p=l,l=p.next,p.next=null,s.lastBaseUpdate=p,s.shared.pending=null}}while(!0);if(d===null&&(c=h),s.baseState=c,s.firstBaseUpdate=u,s.lastBaseUpdate=d,e=s.shared.interleaved,e!==null){s=e;do a|=s.lane,s=s.next;while(s!==e)}else i===null&&(s.shared.lanes=0);ic|=a,t.lanes=a,t.memoizedState=h}}function U3(t,e,r){if(t=e.effects,e.effects=null,t!==null)for(e=0;e<t.length;e++){var n=t[e],s=n.callback;if(s!==null){if(n.callback=null,n=r,typeof s!="function")throw Error(Ee(191,s));s.call(n)}}}var of={},Ni=Go(of),fp=Go(of),mp=Go(of);function Nl(t){if(t===of)throw Error(Ee(174));return t}function bj(t,e){switch(zt(mp,e),zt(fp,t),zt(Ni,of),t=e.nodeType,t){case 9:case 11:e=(e=e.documentElement)?e.namespaceURI:ak(null,"");break;default:t=t===8?e.parentNode:e,e=t.namespaceURI||null,t=t.tagName,e=ak(e,t)}Ot(Ni),zt(Ni,e)}function Hu(){Ot(Ni),Ot(fp),Ot(mp)}function JP(t){Nl(mp.current);var e=Nl(Ni.current),r=ak(e,t.type);e!==r&&(zt(fp,t),zt(Ni,r))}function kj(t){fp.current===t&&(Ot(Ni),Ot(fp))}var Ft=Go(0);function A0(t){for(var e=t;e!==null;){if(e.tag===13){var r=e.memoizedState;if(r!==null&&(r=r.dehydrated,r===null||r.data==="$?"||r.data==="$!"))return e}else if(e.tag===19&&e.memoizedProps.revealOrder!==void 0){if(e.flags&128)return e}else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break;for(;e.sibling===null;){if(e.return===null||e.return===t)return null;e=e.return}e.sibling.return=e.return,e=e.sibling}return null}var Hx=[];function vj(){for(var t=0;t<Hx.length;t++)Hx[t]._workInProgressVersionPrimary=null;Hx.length=0}var Vm=ba.ReactCurrentDispatcher,qx=ba.ReactCurrentBatchConfig,sc=0,Ut=null,kr=null,zr=null,z0=!1,_h=!1,gp=0,vF=0;function qr(){throw Error(Ee(321))}function jj(t,e){if(e===null)return!1;for(var r=0;r<e.length&&r<t.length;r++)if(!Hs(t[r],e[r]))return!1;return!0}function Sj(t,e,r,n,s,i){if(sc=i,Ut=e,e.memoizedState=null,e.updateQueue=null,e.lanes=0,Vm.current=t===null||t.memoizedState===null?CF:EF,t=r(n,s),_h){i=0;do{if(_h=!1,gp=0,25<=i)throw Error(Ee(301));i+=1,zr=kr=null,e.updateQueue=null,Vm.current=TF,t=r(n,s)}while(_h)}if(Vm.current=P0,e=kr!==null&&kr.next!==null,sc=0,zr=kr=Ut=null,z0=!1,e)throw Error(Ee(300));return t}function Nj(){var t=gp!==0;return gp=0,t}function ai(){var t={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return zr===null?Ut.memoizedState=zr=t:zr=zr.next=t,zr}function js(){if(kr===null){var t=Ut.alternate;t=t!==null?t.memoizedState:null}else t=kr.next;var e=zr===null?Ut.memoizedState:zr.next;if(e!==null)zr=e,kr=t;else{if(t===null)throw Error(Ee(310));kr=t,t={memoizedState:kr.memoizedState,baseState:kr.baseState,baseQueue:kr.baseQueue,queue:kr.queue,next:null},zr===null?Ut.memoizedState=zr=t:zr=zr.next=t}return zr}function yp(t,e){return typeof e=="function"?e(t):e}function Kx(t){var e=js(),r=e.queue;if(r===null)throw Error(Ee(311));r.lastRenderedReducer=t;var n=kr,s=n.baseQueue,i=r.pending;if(i!==null){if(s!==null){var a=s.next;s.next=i.next,i.next=a}n.baseQueue=s=i,r.pending=null}if(s!==null){i=s.next,n=n.baseState;var l=a=null,c=null,u=i;do{var d=u.lane;if((sc&d)===d)c!==null&&(c=c.next={lane:0,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),n=u.hasEagerState?u.eagerState:t(n,u.action);else{var h={lane:d,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null};c===null?(l=c=h,a=n):c=c.next=h,Ut.lanes|=d,ic|=d}u=u.next}while(u!==null&&u!==i);c===null?a=n:c.next=l,Hs(n,e.memoizedState)||(zn=!0),e.memoizedState=n,e.baseState=a,e.baseQueue=c,r.lastRenderedState=n}if(t=r.interleaved,t!==null){s=t;do i=s.lane,Ut.lanes|=i,ic|=i,s=s.next;while(s!==t)}else s===null&&(r.lanes=0);return[e.memoizedState,r.dispatch]}function Gx(t){var e=js(),r=e.queue;if(r===null)throw Error(Ee(311));r.lastRenderedReducer=t;var n=r.dispatch,s=r.pending,i=e.memoizedState;if(s!==null){r.pending=null;var a=s=s.next;do i=t(i,a.action),a=a.next;while(a!==s);Hs(i,e.memoizedState)||(zn=!0),e.memoizedState=i,e.baseQueue===null&&(e.baseState=i),r.lastRenderedState=i}return[i,n]}function XP(){}function QP(t,e){var r=Ut,n=js(),s=e(),i=!Hs(n.memoizedState,s);if(i&&(n.memoizedState=s,zn=!0),n=n.queue,Cj(r_.bind(null,r,n,t),[t]),n.getSnapshot!==e||i||zr!==null&&zr.memoizedState.tag&1){if(r.flags|=2048,xp(9,t_.bind(null,r,n,s,e),void 0,null),Ir===null)throw Error(Ee(349));sc&30||e_(r,e,s)}return s}function e_(t,e,r){t.flags|=16384,t={getSnapshot:e,value:r},e=Ut.updateQueue,e===null?(e={lastEffect:null,stores:null},Ut.updateQueue=e,e.stores=[t]):(r=e.stores,r===null?e.stores=[t]:r.push(t))}function t_(t,e,r,n){e.value=r,e.getSnapshot=n,n_(e)&&s_(t)}function r_(t,e,r){return r(function(){n_(e)&&s_(t)})}function n_(t){var e=t.getSnapshot;t=t.value;try{var r=e();return!Hs(t,r)}catch{return!0}}function s_(t){var e=ha(t,1);e!==null&&Vs(e,t,1,-1)}function W3(t){var e=ai();return typeof t=="function"&&(t=t()),e.memoizedState=e.baseState=t,t={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:yp,lastRenderedState:t},e.queue=t,t=t.dispatch=NF.bind(null,Ut,t),[e.memoizedState,t]}function xp(t,e,r,n){return t={tag:t,create:e,destroy:r,deps:n,next:null},e=Ut.updateQueue,e===null?(e={lastEffect:null,stores:null},Ut.updateQueue=e,e.lastEffect=t.next=t):(r=e.lastEffect,r===null?e.lastEffect=t.next=t:(n=r.next,r.next=t,t.next=n,e.lastEffect=t)),t}function i_(){return js().memoizedState}function Hm(t,e,r,n){var s=ai();Ut.flags|=t,s.memoizedState=xp(1|e,r,void 0,n===void 0?null:n)}function uy(t,e,r,n){var s=js();n=n===void 0?null:n;var i=void 0;if(kr!==null){var a=kr.memoizedState;if(i=a.destroy,n!==null&&jj(n,a.deps)){s.memoizedState=xp(e,r,i,n);return}}Ut.flags|=t,s.memoizedState=xp(1|e,r,i,n)}function V3(t,e){return Hm(8390656,8,t,e)}function Cj(t,e){return uy(2048,8,t,e)}function a_(t,e){return uy(4,2,t,e)}function o_(t,e){return uy(4,4,t,e)}function l_(t,e){if(typeof e=="function")return t=t(),e(t),function(){e(null)};if(e!=null)return t=t(),e.current=t,function(){e.current=null}}function c_(t,e,r){return r=r!=null?r.concat([t]):null,uy(4,4,l_.bind(null,e,t),r)}function Ej(){}function u_(t,e){var r=js();e=e===void 0?null:e;var n=r.memoizedState;return n!==null&&e!==null&&jj(e,n[1])?n[0]:(r.memoizedState=[t,e],t)}function d_(t,e){var r=js();e=e===void 0?null:e;var n=r.memoizedState;return n!==null&&e!==null&&jj(e,n[1])?n[0]:(t=t(),r.memoizedState=[t,e],t)}function h_(t,e,r){return sc&21?(Hs(r,e)||(r=yP(),Ut.lanes|=r,ic|=r,t.baseState=!0),e):(t.baseState&&(t.baseState=!1,zn=!0),t.memoizedState=r)}function jF(t,e){var r=St;St=r!==0&&4>r?r:4,t(!0);var n=qx.transition;qx.transition={};try{t(!1),e()}finally{St=r,qx.transition=n}}function p_(){return js().memoizedState}function SF(t,e,r){var n=bo(t);if(r={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null},f_(t))m_(e,r);else if(r=ZP(t,e,r,n),r!==null){var s=pn();Vs(r,t,n,s),g_(r,e,n)}}function NF(t,e,r){var n=bo(t),s={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null};if(f_(t))m_(e,s);else{var i=t.alternate;if(t.lanes===0&&(i===null||i.lanes===0)&&(i=e.lastRenderedReducer,i!==null))try{var a=e.lastRenderedState,l=i(a,r);if(s.hasEagerState=!0,s.eagerState=l,Hs(l,a)){var c=e.interleaved;c===null?(s.next=s,xj(e)):(s.next=c.next,c.next=s),e.interleaved=s;return}}catch{}finally{}r=ZP(t,e,s,n),r!==null&&(s=pn(),Vs(r,t,n,s),g_(r,e,n))}}function f_(t){var e=t.alternate;return t===Ut||e!==null&&e===Ut}function m_(t,e){_h=z0=!0;var r=t.pending;r===null?e.next=e:(e.next=r.next,r.next=e),t.pending=e}function g_(t,e,r){if(r&4194240){var n=e.lanes;n&=t.pendingLanes,r|=n,e.lanes=r,sj(t,r)}}var P0={readContext:vs,useCallback:qr,useContext:qr,useEffect:qr,useImperativeHandle:qr,useInsertionEffect:qr,useLayoutEffect:qr,useMemo:qr,useReducer:qr,useRef:qr,useState:qr,useDebugValue:qr,useDeferredValue:qr,useTransition:qr,useMutableSource:qr,useSyncExternalStore:qr,useId:qr,unstable_isNewReconciler:!1},CF={readContext:vs,useCallback:function(t,e){return ai().memoizedState=[t,e===void 0?null:e],t},useContext:vs,useEffect:V3,useImperativeHandle:function(t,e,r){return r=r!=null?r.concat([t]):null,Hm(4194308,4,l_.bind(null,e,t),r)},useLayoutEffect:function(t,e){return Hm(4194308,4,t,e)},useInsertionEffect:function(t,e){return Hm(4,2,t,e)},useMemo:function(t,e){var r=ai();return e=e===void 0?null:e,t=t(),r.memoizedState=[t,e],t},useReducer:function(t,e,r){var n=ai();return e=r!==void 0?r(e):e,n.memoizedState=n.baseState=e,t={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:e},n.queue=t,t=t.dispatch=SF.bind(null,Ut,t),[n.memoizedState,t]},useRef:function(t){var e=ai();return t={current:t},e.memoizedState=t},useState:W3,useDebugValue:Ej,useDeferredValue:function(t){return ai().memoizedState=t},useTransition:function(){var t=W3(!1),e=t[0];return t=jF.bind(null,t[1]),ai().memoizedState=t,[e,t]},useMutableSource:function(){},useSyncExternalStore:function(t,e,r){var n=Ut,s=ai();if(Mt){if(r===void 0)throw Error(Ee(407));r=r()}else{if(r=e(),Ir===null)throw Error(Ee(349));sc&30||e_(n,e,r)}s.memoizedState=r;var i={value:r,getSnapshot:e};return s.queue=i,V3(r_.bind(null,n,i,t),[t]),n.flags|=2048,xp(9,t_.bind(null,n,i,r,e),void 0,null),r},useId:function(){var t=ai(),e=Ir.identifierPrefix;if(Mt){var r=Qi,n=Xi;r=(n&~(1<<32-Ws(n)-1)).toString(32)+r,e=":"+e+"R"+r,r=gp++,0<r&&(e+="H"+r.toString(32)),e+=":"}else r=vF++,e=":"+e+"r"+r.toString(32)+":";return t.memoizedState=e},unstable_isNewReconciler:!1},EF={readContext:vs,useCallback:u_,useContext:vs,useEffect:Cj,useImperativeHandle:c_,useInsertionEffect:a_,useLayoutEffect:o_,useMemo:d_,useReducer:Kx,useRef
vendor: 6,411 bytes, lines 38-40
38:i_,useState:function(){return Kx(yp)},useDebugValue:Ej,useDeferredValue:function(t){var e=js();return h_(e,kr.memoizedState,t)},useTransition:function(){var t=Kx(yp)[0],e=js().memoizedState;return[t,e]},useMutableSource:XP,useSyncExternalStore:QP,useId:p_,unstable_isNewReconciler:!1},TF={readContext:vs,useCallback:u_,useContext:vs,useEffect:Cj,useImperativeHandle:c_,useInsertionEffect:a_,useLayoutEffect:o_,useMemo:d_,useReducer:Gx,useRef:i_,useState:function(){return Gx(yp)},useDebugValue:Ej,useDeferredValue:function(t){var e=js();return kr===null?e.memoizedState=t:h_(e,kr.memoizedState,t)},useTransition:function(){var t=Gx(yp)[0],e=js().memoizedState;return[t,e]},useMutableSource:XP,useSyncExternalStore:QP,useId:p_,unstable_isNewReconciler:!1};function zs(t,e){if(t&&t.defaultProps){e=Wt({},e),t=t.defaultProps;for(var r in t)e[r]===void 0&&(e[r]=t[r]);return e}return e}function Ek(t,e,r,n){e=t.memoizedState,r=r(n,e),r=r==null?e:Wt({},e,r),t.memoizedState=r,t.lanes===0&&(t.updateQueue.baseState=r)}var dy={isMounted:function(t){return(t=t._reactInternals)?vc(t)===t:!1},enqueueSetState:function(t,e,r){t=t._reactInternals;var n=pn(),s=bo(t),i=sa(n,s);i.payload=e,r!=null&&(i.callback=r),e=xo(t,i,s),e!==null&&(Vs(e,t,s,n),Wm(e,t,s))},enqueueReplaceState:function(t,e,r){t=t._reactInternals;var n=pn(),s=bo(t),i=sa(n,s);i.tag=1,i.payload=e,r!=null&&(i.callback=r),e=xo(t,i,s),e!==null&&(Vs(e,t,s,n),Wm(e,t,s))},enqueueForceUpdate:function(t,e){t=t._reactInternals;var r=pn(),n=bo(t),s=sa(r,n);s.tag=2,e!=null&&(s.callback=e),e=xo(t,s,n),e!==null&&(Vs(e,t,n,r),Wm(e,t,n))}};function H3(t,e,r,n,s,i,a){return t=t.stateNode,typeof t.shouldComponentUpdate=="function"?t.shouldComponentUpdate(n,i,a):e.prototype&&e.prototype.isPureReactComponent?!up(r,n)||!up(s,i):!0}function y_(t,e,r){var n=!1,s=Io,i=e.contextType;return typeof i=="object"&&i!==null?i=vs(i):(s=_n(e)?rc:en.current,n=e.contextTypes,i=(n=n!=null)?Uu(t,s):Io),e=new e(r,i),t.memoizedState=e.state!==null&&e.state!==void 0?e.state:null,e.updater=dy,t.stateNode=e,e._reactInternals=t,n&&(t=t.stateNode,t.__reactInternalMemoizedUnmaskedChildContext=s,t.__reactInternalMemoizedMaskedChildContext=i),e}function q3(t,e,r,n){t=e.state,typeof e.componentWillReceiveProps=="function"&&e.componentWillReceiveProps(r,n),typeof e.UNSAFE_componentWillReceiveProps=="function"&&e.UNSAFE_componentWillReceiveProps(r,n),e.state!==t&&dy.enqueueReplaceState(e,e.state,null)}function Tk(t,e,r,n){var s=t.stateNode;s.props=r,s.state=t.memoizedState,s.refs={},wj(t);var i=e.contextType;typeof i=="object"&&i!==null?s.context=vs(i):(i=_n(e)?rc:en.current,s.context=Uu(t,i)),s.state=t.memoizedState,i=e.getDerivedStateFromProps,typeof i=="function"&&(Ek(t,e,i,r),s.state=t.memoizedState),typeof e.getDerivedStateFromProps=="function"||typeof s.getSnapshotBeforeUpdate=="function"||typeof s.UNSAFE_componentWillMount!="function"&&typeof s.componentWillMount!="function"||(e=s.state,typeof s.componentWillMount=="function"&&s.componentWillMount(),typeof s.UNSAFE_componentWillMount=="function"&&s.UNSAFE_componentWillMount(),e!==s.state&&dy.enqueueReplaceState(s,s.state,null),T0(t,r,s,n),s.state=t.memoizedState),typeof s.componentDidMount=="function"&&(t.flags|=4194308)}function qu(t,e){try{var r="",n=e;do r+=r7(n),n=n.return;while(n);var s=r}catch(i){s=`
39Error generating stack: `+i.message+`
40`+i.stack}return{value:t,source:e,stack:s,digest:null}}function Zx(t,e,r){return{value:t,source:null,stack:r??null,digest:e??null}}function Ak(t,e){try{console.error(e.value)}catch(r){setTimeout(function(){throw r})}}var AF=typeof WeakMap=="function"?WeakMap:Map;function x_(t,e,r){r=sa(-1,r),r.tag=3,r.payload={element:null};var n=e.value;return r.callback=function(){I0||(I0=!0,Fk=n),Ak(t,e)},r}function w_(t,e,r){r=sa(-1,r),r.tag=3;var n=t.type.getDerivedStateFromError;if(typeof n=="function"){var s=e.value;r.payload=function(){return n(s)},r.callback=function(){Ak(t,e)}}var i=t.stateNode;return i!==null&&typeof i.componentDidCatch=="function"&&(r.callback=function(){Ak(t,e),typeof n!="function"&&(wo===null?wo=new Set([this]):wo.add(this));var a=e.stack;this.componentDidCatch(e.value,{componentStack:a!==null?a:""})}),r}function K3(t,e,r){var n=t.pingCache;if(n===null){n=t.pingCache=new AF;var s=new Set;n.set(e,s)}else s=n.get(e),s===void 0&&(s=new Set,n.set(e,s));s.has(r)||(s.add(r),t=WF.bind(null,t,e,r),e.then(t,t))}function G3(t){do{var e;if((e=t.tag===13)&&(e=t.memoizedState,e=e!==null?e.dehydrated!==null:!0),e)return t;t=t.return}while(t!==null);return null}function Z3(t,e,r,n,s){return t.mode&1?(t.flags|=65536,t.lanes=s,t):(t===e?t.flags|=65536:(t.flags|=128,r.flags|=131072,r.flags&=-52805,r.tag===1&&(r.alternate===null?r.tag=17:(e=sa(-1,1),e.tag=2,xo(r,e,1))),r.lanes|=1),t)}var zF=ba.ReactCurrentOwner,zn=!1;function ln(t,e,r,n){e.child=t===null?GP(e,null,r,n):Vu(e,t.child,r,n)}function Y3(t,e,r,n,s){r=r.render;var i=e.ref;return yu(e,s),n=Sj(t,e,r,n,i,s),r=Nj(),t!==null&&!zn?(e.updateQueue=t.updateQueue,e.flags&=-2053,t.lanes&=~s,pa(t,e,s)):(Mt&&r&&hj(e),e.flags|=1,ln(t,e,n,s),e.child)}function J3(t,e,r,n,s){if(t===null){var i=r.type;return typeof i=="function"&&!Rj(i)&&i.defaultProps===void 0&&r.compare===null&&r.defaultProps===void 0?(e.tag=15,e.type=i,b_(t,e,i,n,s)):(t=Zm(r.type,null,n,e,e.mode,s),t.ref=e.ref,t.return=e,e.child=t)}if(i=t.child,!(t.lanes&s)){var a=i.memoizedProps;if(r=r.compare,r=r!==null?r:up,r(a,n)&&t.ref===e.ref)return pa(t,e,s)}return e.flags|=1,t=ko(i,n),t.ref=e.ref,t.return=e,e.child=t}function b_(t,e,r,n,s){if(t!==null){var i=t.memoizedProps;if(up(i,n)&&t.ref===e.ref)if(zn=!1,e.pendingProps=n=i,(t.lanes&s)!==0)t.flags&131072&&(zn=!0);else return e.lanes=t.lanes,pa(t,e,s)}return zk(t,e,r,n,s)}function k_(t,e,r){var n=e.pendingProps,s=n.children,i=t!==null?t.memoizedState:null;if(n.mode==="hidden")if(!(e.mode&1))e.memoizedState={baseLanes:0,cachePool:null,transitions:null},zt(ou,Wn),Wn|=r;else{if(!(r&1073741824))return t=i!==null?i.baseLanes|r:r,e.lanes=e.childLanes=1073741824,e.memoizedState={baseLanes:t,cachePool:null,transitions:null},e.updateQueue=null,zt(ou,Wn),Wn|=t,null;e.memoizedState={baseLanes:0,cachePool:null,transitions:null},n=i!==null?i.baseLanes:r,zt(ou,Wn),Wn|=n}else i!==null?(n=i.baseLanes|r,e.memoizedState=null):n=r,zt(ou,Wn),Wn|=n;return ln(t,e,s,r),e.child}function v_(t,e){var r=e.ref;(t===null&&r!==null||t!==null&&t.ref!==r)&&(e.flags|=512,e.flags|=2097152)}
vendor: 4,711 bytes, line 40
40function zk(t,e,r,n,s){var i=_n(r)?rc:en.current;return i=Uu(e,i),yu(e,s),r=Sj(t,e,r,n,i,s),n=Nj(),t!==null&&!zn?(e.updateQueue=t.updateQueue,e.flags&=-2053,t.lanes&=~s,pa(t,e,s)):(Mt&&n&&hj(e),e.flags|=1,ln(t,e,r,s),e.child)}function X3(t,e,r,n,s){if(_n(r)){var i=!0;j0(e)}else i=!1;if(yu(e,s),e.stateNode===null)qm(t,e),y_(e,r,n),Tk(e,r,n,s),n=!0;else if(t===null){var a=e.stateNode,l=e.memoizedProps;a.props=l;var c=a.context,u=r.contextType;typeof u=="object"&&u!==null?u=vs(u):(u=_n(r)?rc:en.current,u=Uu(e,u));var d=r.getDerivedStateFromProps,h=typeof d=="function"||typeof a.getSnapshotBeforeUpdate=="function";h||typeof a.UNSAFE_componentWillReceiveProps!="function"&&typeof a.componentWillReceiveProps!="function"||(l!==n||c!==u)&&q3(e,a,n,u),La=!1;var p=e.memoizedState;a.state=p,T0(e,n,a,s),c=e.memoizedState,l!==n||p!==c||Pn.current||La?(typeof d=="function"&&(Ek(e,r,d,n),c=e.memoizedState),(l=La||H3(e,r,l,n,p,c,u))?(h||typeof a.UNSAFE_componentWillMount!="function"&&typeof a.componentWillMount!="function"||(typeof a.componentWillMount=="function"&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount=="function"&&a.UNSAFE_componentWillMount()),typeof a.componentDidMount=="function"&&(e.flags|=4194308)):(typeof a.componentDidMount=="function"&&(e.flags|=4194308),e.memoizedProps=n,e.memoizedState=c),a.props=n,a.state=c,a.context=u,n=l):(typeof a.componentDidMount=="function"&&(e.flags|=4194308),n=!1)}else{a=e.stateNode,YP(t,e),l=e.memoizedProps,u=e.type===e.elementType?l:zs(e.type,l),a.props=u,h=e.pendingProps,p=a.context,c=r.contextType,typeof c=="object"&&c!==null?c=vs(c):(c=_n(r)?rc:en.current,c=Uu(e,c));var f=r.getDerivedStateFromProps;(d=typeof f=="function"||typeof a.getSnapshotBeforeUpdate=="function")||typeof a.UNSAFE_componentWillReceiveProps!="function"&&typeof a.componentWillReceiveProps!="function"||(l!==h||p!==c)&&q3(e,a,n,c),La=!1,p=e.memoizedState,a.state=p,T0(e,n,a,s);var m=e.memoizedState;l!==h||p!==m||Pn.current||La?(typeof f=="function"&&(Ek(e,r,f,n),m=e.memoizedState),(u=La||H3(e,r,u,n,p,m,c)||!1)?(d||typeof a.UNSAFE_componentWillUpdate!="function"&&typeof a.componentWillUpdate!="function"||(typeof a.componentWillUpdate=="function"&&a.componentWillUpdate(n,m,c),typeof a.UNSAFE_componentWillUpdate=="function"&&a.UNSAFE_componentWillUpdate(n,m,c)),typeof a.componentDidUpdate=="function"&&(e.flags|=4),typeof a.getSnapshotBeforeUpdate=="function"&&(e.flags|=1024)):(typeof a.componentDidUpdate!="function"||l===t.memoizedProps&&p===t.memoizedState||(e.flags|=4),typeof a.getSnapshotBeforeUpdate!="function"||l===t.memoizedProps&&p===t.memoizedState||(e.flags|=1024),e.memoizedProps=n,e.memoizedState=m),a.props=n,a.state=m,a.context=c,n=u):(typeof a.componentDidUpdate!="function"||l===t.memoizedProps&&p===t.memoizedState||(e.flags|=4),typeof a.getSnapshotBeforeUpdate!="function"||l===t.memoizedProps&&p===t.memoizedState||(e.flags|=1024),n=!1)}return Pk(t,e,r,n,i,s)}function Pk(t,e,r,n,s,i){v_(t,e);var a=(e.flags&128)!==0;if(!n&&!a)return s&&M3(e,r,!1),pa(t,e,i);n=e.stateNode,zF.current=e;var l=a&&typeof r.getDerivedStateFromError!="function"?null:n.render();return e.flags|=1,t!==null&&a?(e.child=Vu(e,t.child,null,i),e.child=Vu(e,null,l,i)):ln(t,e,l,i),e.memoizedState=n.state,s&&M3(e,r,!0),e.child}function j_(t){var e=t.stateNode;e.pendingContext?L3(t,e.pendingContext,e.pendingContext!==e.context):e.context&&L3(t,e.context,!1),bj(t,e.containerInfo)}function Q3(t,e,r,n,s){return Wu(),fj(s),e.flags|=256,ln(t,e,r,n),e.child}var _k={dehydrated:null,treeContext:null,retryLane:0};function Ik(t){return{baseLanes:t,cachePool:null,transitions:null}}function S_(t,e,r){var n=e.pendingProps,s=Ft.current,i=!1,a=(e.flags&128)!==0,l;if((l=a)||(l=t!==null&&t.memoizedState===null?!1:(s&2)!==0),l?(i=!0,e.flags&=-129):(t===null||t.memoizedState!==null)&&(s|=1),zt(Ft,s&1),t===null)return Nk(e),t=e.memoizedState,t!==null&&(t=t.dehydrated,t!==null)?(e.mode&1?t.data==="$!"?e.lanes=8:e.lanes=1073741824:e.lanes=1,null):(a=n.children,t=n.fallback,i?(n=e.mode,i=e.child,a={mode:"hidden",children:a},!(n&1)&&i!==null?(i.childLanes=0,i.pendingProps=a):i=fy(a,n,0,null),t=Gl(t,n,r,null),i.return=e,t.return=e,i.sibling=t,e.child=i,e.child.memoizedState=Ik(r),e.memoizedState=_k,t):Tj(e,a));if(s=t.memoizedState,s!==null&&(l=s.dehydrated,l!==null))return PF(t,e,a,n,l,s,r);if(i){i=n.fallback,a=e.mode,s=t.child,l=s.sibling;var c={mode:"hidden",children:n.children};return!(a&1)&&e.child!==s?(n=e.child,n.childLanes=0,n.pendingProps=c,e.deletions=null):(n=ko(s,c),n.subtreeFlags=s.subtreeFlags&14680064),l!==null?i=ko(l,i):(i=Gl(i,a,r,null),i.flags|=2),i.return=e,n.return=e,n.sibling=i,e.child=n,n=i,i=e.child,a=t.child.memoizedState,a=a===null?Ik(r):{base
vendor: 8,923 bytes, line 40
40Lanes:a.baseLanes|r,cachePool:null,transitions:a.transitions},i.memoizedState=a,i.childLanes=t.childLanes&~r,e.memoizedState=_k,n}return i=t.child,t=i.sibling,n=ko(i,{mode:"visible",children:n.children}),!(e.mode&1)&&(n.lanes=r),n.return=e,n.sibling=null,t!==null&&(r=e.deletions,r===null?(e.deletions=[t],e.flags|=16):r.push(t)),e.child=n,e.memoizedState=null,n}function Tj(t,e){return e=fy({mode:"visible",children:e},t.mode,0,null),e.return=t,t.child=e}function Yf(t,e,r,n){return n!==null&&fj(n),Vu(e,t.child,null,r),t=Tj(e,e.pendingProps.children),t.flags|=2,e.memoizedState=null,t}function PF(t,e,r,n,s,i,a){if(r)return e.flags&256?(e.flags&=-257,n=Zx(Error(Ee(422))),Yf(t,e,a,n)):e.memoizedState!==null?(e.child=t.child,e.flags|=128,null):(i=n.fallback,s=e.mode,n=fy({mode:"visible",children:n.children},s,0,null),i=Gl(i,s,a,null),i.flags|=2,n.return=e,i.return=e,n.sibling=i,e.child=n,e.mode&1&&Vu(e,t.child,null,a),e.child.memoizedState=Ik(a),e.memoizedState=_k,i);if(!(e.mode&1))return Yf(t,e,a,null);if(s.data==="$!"){if(n=s.nextSibling&&s.nextSibling.dataset,n)var l=n.dgst;return n=l,i=Error(Ee(419)),n=Zx(i,n,void 0),Yf(t,e,a,n)}if(l=(a&t.childLanes)!==0,zn||l){if(n=Ir,n!==null){switch(a&-a){case 4:s=2;break;case 16:s=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:s=32;break;case 536870912:s=268435456;break;default:s=0}s=s&(n.suspendedLanes|a)?0:s,s!==0&&s!==i.retryLane&&(i.retryLane=s,ha(t,s),Vs(n,t,s,-1))}return Oj(),n=Zx(Error(Ee(421))),Yf(t,e,a,n)}return s.data==="$?"?(e.flags|=128,e.child=t.child,e=VF.bind(null,t),s._reactRetry=e,null):(t=i.treeContext,qn=yo(s.nextSibling),Kn=e,Mt=!0,Os=null,t!==null&&(ps[fs++]=Xi,ps[fs++]=Qi,ps[fs++]=nc,Xi=t.id,Qi=t.overflow,nc=e),e=Tj(e,n.children),e.flags|=4096,e)}function e4(t,e,r){t.lanes|=e;var n=t.alternate;n!==null&&(n.lanes|=e),Ck(t.return,e,r)}function Yx(t,e,r,n,s){var i=t.memoizedState;i===null?t.memoizedState={isBackwards:e,rendering:null,renderingStartTime:0,last:n,tail:r,tailMode:s}:(i.isBackwards=e,i.rendering=null,i.renderingStartTime=0,i.last=n,i.tail=r,i.tailMode=s)}function N_(t,e,r){var n=e.pendingProps,s=n.revealOrder,i=n.tail;if(ln(t,e,n.children,r),n=Ft.current,n&2)n=n&1|2,e.flags|=128;else{if(t!==null&&t.flags&128)e:for(t=e.child;t!==null;){if(t.tag===13)t.memoizedState!==null&&e4(t,r,e);else if(t.tag===19)e4(t,r,e);else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;t=t.return}t.sibling.return=t.return,t=t.sibling}n&=1}if(zt(Ft,n),!(e.mode&1))e.memoizedState=null;else switch(s){case"forwards":for(r=e.child,s=null;r!==null;)t=r.alternate,t!==null&&A0(t)===null&&(s=r),r=r.sibling;r=s,r===null?(s=e.child,e.child=null):(s=r.sibling,r.sibling=null),Yx(e,!1,s,r,i);break;case"backwards":for(r=null,s=e.child,e.child=null;s!==null;){if(t=s.alternate,t!==null&&A0(t)===null){e.child=s;break}t=s.sibling,s.sibling=r,r=s,s=t}Yx(e,!0,r,null,i);break;case"together":Yx(e,!1,null,null,void 0);break;default:e.memoizedState=null}return e.child}function qm(t,e){!(e.mode&1)&&t!==null&&(t.alternate=null,e.alternate=null,e.flags|=2)}function pa(t,e,r){if(t!==null&&(e.dependencies=t.dependencies),ic|=e.lanes,!(r&e.childLanes))return null;if(t!==null&&e.child!==t.child)throw Error(Ee(153));if(e.child!==null){for(t=e.child,r=ko(t,t.pendingProps),e.child=r,r.return=e;t.sibling!==null;)t=t.sibling,r=r.sibling=ko(t,t.pendingProps),r.return=e;r.sibling=null}return e.child}function _F(t,e,r){switch(e.tag){case 3:j_(e),Wu();break;case 5:JP(e);break;case 1:_n(e.type)&&j0(e);break;case 4:bj(e,e.stateNode.containerInfo);break;case 10:var n=e.type._context,s=e.memoizedProps.value;zt(C0,n._currentValue),n._currentValue=s;break;case 13:if(n=e.memoizedState,n!==null)return n.dehydrated!==null?(zt(Ft,Ft.current&1),e.flags|=128,null):r&e.child.childLanes?S_(t,e,r):(zt(Ft,Ft.current&1),t=pa(t,e,r),t!==null?t.sibling:null);zt(Ft,Ft.current&1);break;case 19:if(n=(r&e.childLanes)!==0,t.flags&128){if(n)return N_(t,e,r);e.flags|=128}if(s=e.memoizedState,s!==null&&(s.rendering=null,s.tail=null,s.lastEffect=null),zt(Ft,Ft.current),n)break;return null;case 22:case 23:return e.lanes=0,k_(t,e,r)}return pa(t,e,r)}var C_,Ok,E_,T_;C_=function(t,e){for(var r=e.child;r!==null;){if(r.tag===5||r.tag===6)t.appendChild(r.stateNode);else if(r.tag!==4&&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;r=r.return}r.sibling.return=r.return,r=r.sibling}};Ok=function(){};E_=function(t,e,r,n){var s=t.memoizedProps;if(s!==n){t=e.stateNode,Nl(Ni.current);var i=null;switch(r){case"input":s=rk(t,s),n=rk(t,n),i=[];break;case"select":s=Wt({},s,{value:void 0}),n=Wt({},n,{value:void 0}),i=[];break;case"textarea":s=ik(t,s),n=ik(t,n),i=[];break;default:typeof s.onClick!="function"&&typeof n.onClick=="function"&&(t.onclick=k0)}ok(r,n);var a;r=null;for(u in s)if(!n.hasOwnProperty(u)&&s.hasOwnProperty(u)&&s[u]!=null)if(u==="style"){var l=s[u];for(a in l)l.hasOwnProperty(a)&&(r||(r={}),r[a]="")}else u!=="dangerouslySetInnerHTML"&&u!=="children"&&u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&u!=="autoFocus"&&(np.hasOwnProperty(u)?i||(i=[]):(i=i||[]).push(u,null));for(u in n){var c=n[u];if(l=s!=null?s[u]:void 0,n.hasOwnProperty(u)&&c!==l&&(c!=null||l!=null))if(u==="style")if(l){for(a in l)!l.hasOwnProperty(a)||c&&c.hasOwnProperty(a)||(r||(r={}),r[a]="");for(a in c)c.hasOwnProperty(a)&&l[a]!==c[a]&&(r||(r={}),r[a]=c[a])}else r||(i||(i=[]),i.push(u,r)),r=c;else u==="dangerouslySetInnerHTML"?(c=c?c.__html:void 0,l=l?l.__html:void 0,c!=null&&l!==c&&(i=i||[]).push(u,c)):u==="children"?typeof c!="string"&&typeof c!="number"||(i=i||[]).push(u,""+c):u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&(np.hasOwnProperty(u)?(c!=null&&u==="onScroll"&&_t("scroll",t),i||l===c||(i=[])):(i=i||[]).push(u,c))}r&&(i=i||[]).push("style",r);var u=i;(e.updateQueue=u)&&(e.flags|=4)}};T_=function(t,e,r,n){r!==n&&(e.flags|=4)};function Kd(t,e){if(!Mt)switch(t.tailMode){case"hidden":e=t.tail;for(var r=null;e!==null;)e.alternate!==null&&(r=e),e=e.sibling;r===null?t.tail=null:r.sibling=null;break;case"collapsed":r=t.tail;for(var n=null;r!==null;)r.alternate!==null&&(n=r),r=r.sibling;n===null?e||t.tail===null?t.tail=null:t.tail.sibling=null:n.sibling=null}}function Kr(t){var e=t.alternate!==null&&t.alternate.child===t.child,r=0,n=0;if(e)for(var s=t.child;s!==null;)r|=s.lanes|s.childLanes,n|=s.subtreeFlags&14680064,n|=s.flags&14680064,s.return=t,s=s.sibling;else for(s=t.child;s!==null;)r|=s.lanes|s.childLanes,n|=s.subtreeFlags,n|=s.flags,s.return=t,s=s.sibling;return t.subtreeFlags|=n,t.childLanes=r,e}function IF(t,e,r){var n=e.pendingProps;switch(pj(e),e.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Kr(e),null;case 1:return _n(e.type)&&v0(),Kr(e),null;case 3:return n=e.stateNode,Hu(),Ot(Pn),Ot(en),vj(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(t===null||t.child===null)&&(Gf(e)?e.flags|=4:t===null||t.memoizedState.isDehydrated&&!(e.flags&256)||(e.flags|=1024,Os!==null&&(Uk(Os),Os=null))),Ok(t,e),Kr(e),null;case 5:kj(e);var s=Nl(mp.current);if(r=e.type,t!==null&&e.stateNode!=null)E_(t,e,r,n,s),t.ref!==e.ref&&(e.flags|=512,e.flags|=2097152);else{if(!n){if(e.stateNode===null)throw Error(Ee(166));return Kr(e),null}if(t=Nl(Ni.current),Gf(e)){n=e.stateNode,r=e.type;var i=e.memoizedProps;switch(n[gi]=e,n[pp]=i,t=(e.mode&1)!==0,r){case"dialog":_t("cancel",n),_t("close",n);break;case"iframe":case"object":case"embed":_t("load",n);break;case"video":case"audio":for(s=0;s<wh.length;s++)_t(wh[s],n);break;case"source":_t("error",n);break;case"img":case"image":case"link":_t("error",n),_t("load",n);break;case"details":_t("toggle",n);break;case"input":c3(n,i),_t("invalid",n);break;case"select":n._wrapperState={wasMultiple:!!i.multiple},_t("invalid",n);break;case"textarea":d3(n,i),_t("invalid",n)}ok(r,i),s=null;for(var a in i)if(i.hasOwnProperty(a)){var l=i[a];a==="children"?typeof l=="string"?n.textContent!==l&&(i.suppressHydrationWarning!==!0&&Kf(n.textContent,l,t),s=["children",l]):typeof l=="number"&&n.textContent!==""+l&&(i.suppressHydrationWarning!==!0&&Kf(n.textContent,l,t),s=["children",""+l]):np.hasOwnProperty(a)&&l!=null&&a==="onScroll"&&_t("scroll",n)}switch(r){case"input":Ff(n),u3(n,i,!0);break;case"textarea":Ff(n),h3(n);break;case"select":case"option":break;default:typeof i.onClick=="function"&&(n.onclick=k0)}n=s,e.updateQueue=n,n!==null&&(e.flags|=4)}else{a=s.nodeType===9?s:s.ownerDocument,t==="http://www.w3.org/1999/xhtml"&&(t=rP(r)),t==="http://www.w3.org/1999/xhtml"?r==="script"?(t=a.createElement("div"),t.innerHTML="<script><\/script>
40",t=t.removeChild(t.firstChild)):typeof n.is=="string"?t=a.createElement(r,{is:n.is}):(t=a.createElement(r),r==="select"&&(a=t,n.multiple?a.multiple=!0:n.size&&(a.size=n.size))):t=a.createElementNS(t,r),t[gi]=e,t[pp]=n,C_(t,e,!1,!1),e.stateNode=t;e:{switch(a=lk(r,n),r){case"dialog":_t("cancel",t),_t("close",t),s=n;break;case"iframe":case"object":case"embed":_t("load",t),s=n;break;case"video":case"audio":for(s=0;s<wh.length;s++)_t(wh[s],t);s=n;break;case"source":_t("error",t),s=n;break;case"img":case"image":case"link":_t("error",t),_t("load",t),s=n;break;case"details":_t("toggle",t),s=n;break;case"input":c3(t,n),s=rk(t,n),_t("invalid",t);break;case"option":s=n;break;case"select":t._wrapperState={wasMultiple:!!n.multiple},s=Wt({},n,{value:void 0}),_t("invalid",t);break;case"textarea":d3(t,n),s=ik(t,n),_t("invalid",t);break;default:s=n}ok(r,s),l=s;for(i in l)if(l.hasOwnProperty(i)){var c=l[i];i==="style"?iP(t,c):i==="dangerouslySetInnerHTML"?(c=c?c.__html:void 0,c!=null&&nP(t,c)):i==="children"?typeof c=="string"?(r!=="textarea"||c!=="")&&sp(t,c):typeof c=="number"&&sp(t,""+c):i!=="suppressContentEditableWarning"&&i!=="suppressHydrationWarning"&&i!=="autoFocus"&&(np.hasOwnProperty(i)?c!=null&&i==="onScroll"&&_t("scroll",t):c!=null&&X2(t,i,c,a))}switch(r){case"input":Ff(t),u3(t,n,!1);break;case"textarea":Ff(t),h3(t);break;case"option":n.value!=null&&t.setAttribute("value",""+_o(n.value));break;case"select":t.multiple=!!n.multiple,i=n.value,i!=null?pu(t,!!n.multiple,i,!1):n.defaultValue!=null&&pu(t,!!n.multiple,n.defaultValue,!0);break;default:typeof s.onClick=="function"&&(t.onclick=k0)}switch(r){case"button":case"input":case"select":case"textarea":n=!!n.autoFocus;break e;case"img":n=!0;break e;default:n=!1}}n&&(e.flags|=4)}e.ref!==null&&(e.flags|=512,e.flags|=2097152)}return Kr(e),null;case 6:if(t&&e.stateNode!=null)T_(t,e,t.memoizedProps,n);else{if(typeof n!="string"&&e.stateNode===null)throw Error(Ee(166));if(r=Nl(mp.current),Nl(Ni.current),Gf(e)){if(n=e.stateNode,r=e.memoizedProps,n[gi]=e,(i=n.nodeValue!==r)&&(t=Kn,t!==null))switch(t.tag){case 3:Kf(n.nodeValue,r,(t.mode&1)!==0);break;case 5:t.memoizedProps.suppressHydrationWarning!==!0&&Kf(n.nodeValue,r,(t.mode&1)!==0)}i&&(e.flags|=4)}else n=(r.nodeType===9?r:r.ownerDocument).createTextNode(n),n[gi]=e,e.stateNode=n}return Kr(e),null;case 13:if(Ot(Ft),n=e.memoizedState,t===null||t.memoizedState!==null&&t.memoizedState.dehydrated!==null){if(Mt&&qn!==null&&e.mode&1&&!(e.flags&128))qP(),Wu(),e.flags|=98560,i=!1;else if(i=Gf(e),n!==null&&n.dehydrated!==null){if(t===null){if(!i)throw Error(Ee(318));if(i=e.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(Ee(317));i[gi]=e}else Wu(),!(e.flags&128)&&(e.memoizedState=null),e.flags|=4;Kr(e),i=!1}else Os!==null&&(Uk(Os),Os=null),i=!0;if(!i)return e.flags&65536?e:null}return e.flags&128?(e.lanes=r,e):(n=n!==null,n!==(t!==null&&t.memoizedState!==null)&&n&&(e.child.flags|=8192,e.mode&1&&(t===null||Ft.current&1?Nr===0&&(Nr=3):Oj())),e.updateQueue!==null&&(e.flags|=4),Kr(e),null);case 4:return Hu(),Ok(t,e),t===null&&dp(e.stateNode.containerInfo),Kr(e),null;case 10:return yj(e.type._context),Kr(e),null;case 17:return _n(e.type)&&v0(),Kr(e),null;case 19:if(Ot(Ft),i=e.memoizedState,i===null)return Kr(e),null;if(n=(e.flags&128)!==0,a=i.rendering,a===null)if(n)Kd(i,!1);else{if(Nr!==0||t!==null&&t.flags&128)for(t=e.child;t!==null;){if(a=A0(t),a!==null){for(e.flags|=128,Kd(i,!1),n=a.updateQueue,n!==null&&(e.updateQueue=n,e.flags|=4),e.subtreeFlags=0,n=r,r=e.child;r!==null;)i=r,t=n,i.flags&=14680066,a=i.alternate,a===null?(i.childLanes=0,i.lanes=t,i.child=null,i.subtreeFlags=0,i.memoizedProps=null,i.memoizedState=null,i.updateQueue=null,i.dependencies=null,i.stateNode=null):(i.childLanes=a.childLanes,i.lanes=a.lanes,i.child=a.child,i.subtreeFlags=0,i.deletions=null,i.memoizedProps=a.memoizedProps,i.memoizedState=a.memoizedState,i.updateQueue=a.updateQueue,i.type=a.type,t=a.dependencies,i.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),r=r.sibling;return zt(Ft,Ft.current&1|2),e.child}t=t.sibling}i.tail!==null&&nr()>
vendor: 28,160 bytes, line 40
40Ku&&(e.flags|=128,n=!0,Kd(i,!1),e.lanes=4194304)}else{if(!n)if(t=A0(a),t!==null){if(e.flags|=128,n=!0,r=t.updateQueue,r!==null&&(e.updateQueue=r,e.flags|=4),Kd(i,!0),i.tail===null&&i.tailMode==="hidden"&&!a.alternate&&!Mt)return Kr(e),null}else 2*nr()-i.renderingStartTime>Ku&&r!==1073741824&&(e.flags|=128,n=!0,Kd(i,!1),e.lanes=4194304);i.isBackwards?(a.sibling=e.child,e.child=a):(r=i.last,r!==null?r.sibling=a:e.child=a,i.last=a)}return i.tail!==null?(e=i.tail,i.rendering=e,i.tail=e.sibling,i.renderingStartTime=nr(),e.sibling=null,r=Ft.current,zt(Ft,n?r&1|2:r&1),e):(Kr(e),null);case 22:case 23:return Ij(),n=e.memoizedState!==null,t!==null&&t.memoizedState!==null!==n&&(e.flags|=8192),n&&e.mode&1?Wn&1073741824&&(Kr(e),e.subtreeFlags&6&&(e.flags|=8192)):Kr(e),null;case 24:return null;case 25:return null}throw Error(Ee(156,e.tag))}function OF(t,e){switch(pj(e),e.tag){case 1:return _n(e.type)&&v0(),t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 3:return Hu(),Ot(Pn),Ot(en),vj(),t=e.flags,t&65536&&!(t&128)?(e.flags=t&-65537|128,e):null;case 5:return kj(e),null;case 13:if(Ot(Ft),t=e.memoizedState,t!==null&&t.dehydrated!==null){if(e.alternate===null)throw Error(Ee(340));Wu()}return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 19:return Ot(Ft),null;case 4:return Hu(),null;case 10:return yj(e.type._context),null;case 22:case 23:return Ij(),null;case 24:return null;default:return null}}var Jf=!1,Yr=!1,RF=typeof WeakSet=="function"?WeakSet:Set,Re=null;function au(t,e){var r=t.ref;if(r!==null)if(typeof r=="function")try{r(null)}catch(n){Gt(t,e,n)}else r.current=null}function Rk(t,e,r){try{r()}catch(n){Gt(t,e,n)}}var t4=!1;function LF(t,e){if(xk=x0,t=IP(),dj(t)){if("selectionStart"in t)var r={start:t.selectionStart,end:t.selectionEnd};else e:{r=(r=t.ownerDocument)&&r.defaultView||window;var n=r.getSelection&&r.getSelection();if(n&&n.rangeCount!==0){r=n.anchorNode;var s=n.anchorOffset,i=n.focusNode;n=n.focusOffset;try{r.nodeType,i.nodeType}catch{r=null;break e}var a=0,l=-1,c=-1,u=0,d=0,h=t,p=null;t:for(;;){for(var f;h!==r||s!==0&&h.nodeType!==3||(l=a+s),h!==i||n!==0&&h.nodeType!==3||(c=a+n),h.nodeType===3&&(a+=h.nodeValue.length),(f=h.firstChild)!==null;)p=h,h=f;for(;;){if(h===t)break t;if(p===r&&++u===s&&(l=a),p===i&&++d===n&&(c=a),(f=h.nextSibling)!==null)break;h=p,p=h.parentNode}h=f}r=l===-1||c===-1?null:{start:l,end:c}}else r=null}r=r||{start:0,end:0}}else r=null;for(wk={focusedElem:t,selectionRange:r},x0=!1,Re=e;Re!==null;)if(e=Re,t=e.child,(e.subtreeFlags&1028)!==0&&t!==null)t.return=e,Re=t;else for(;Re!==null;){e=Re;try{var m=e.alternate;if(e.flags&1024)switch(e.tag){case 0:case 11:case 15:break;case 1:if(m!==null){var y=m.memoizedProps,k=m.memoizedState,g=e.stateNode,x=g.getSnapshotBeforeUpdate(e.elementType===e.type?y:zs(e.type,y),k);g.__reactInternalSnapshotBeforeUpdate=x}break;case 3:var w=e.stateNode.containerInfo;w.nodeType===1?w.textContent="":w.nodeType===9&&w.documentElement&&w.removeChild(w.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(Ee(163))}}catch(b){Gt(e,e.return,b)}if(t=e.sibling,t!==null){t.return=e.return,Re=t;break}Re=e.return}return m=t4,t4=!1,m}function Ih(t,e,r){var n=e.updateQueue;if(n=n!==null?n.lastEffect:null,n!==null){var s=n=n.next;do{if((s.tag&t)===t){var i=s.destroy;s.destroy=void 0,i!==void 0&&Rk(e,r,i)}s=s.next}while(s!==n)}}function hy(t,e){if(e=e.updateQueue,e=e!==null?e.lastEffect:null,e!==null){var r=e=e.next;do{if((r.tag&t)===t){var n=r.create;r.destroy=n()}r=r.next}while(r!==e)}}function Lk(t){var e=t.ref;if(e!==null){var r=t.stateNode;switch(t.tag){case 5:t=r;break;default:t=r}typeof e=="function"?e(t):e.current=t}}function A_(t){var e=t.alternate;e!==null&&(t.alternate=null,A_(e)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(e=t.stateNode,e!==null&&(delete e[gi],delete e[pp],delete e[vk],delete e[xF],delete e[wF])),t.stateNode=null,t.return=null,t.dependencies=null,t.memoizedProps=null,t.memoizedState=null,t.pendingProps=null,t.stateNode=null,t.updateQueue=null}function z_(t){return t.tag===5||t.tag===3||t.tag===4}function r4(t){e:for(;;){for(;t.sibling===null;){if(t.return===null||z_(t.return))return null;t=t.return}for(t.sibling.return=t.return,t=t.sibling;t.tag!==5&&t.tag!==6&&t.tag!==18;){if(t.flags&2||t.child===null||t.tag===4)continue e;t.child.return=t,t=t.child}if(!(t.flags&2))return t.stateNode}}function Mk(t,e,r){var n=t.tag;if(n===5||n===6)t=t.stateNode,e?r.nodeType===8?r.parentNode.insertBefore(t,e):r.insertBefore(t,e):(r.nodeType===8?(e=r.parentNode,e.insertBefore(t,r)):(e=r,e.appendChild(t)),r=r._reactRootContainer,r!=null||e.onclick!==null||(e.onclick=k0));else if(n!==4&&(t=t.child,t!==null))for(Mk(t,e,r),t=t.sibling;t!==null;)Mk(t,e,r),t=t.sibling}function Dk(t,e,r){var n=t.tag;if(n===5||n===6)t=t.stateNode,e?r.insertBefore(t,e):r.appendChild(t);else if(n!==4&&(t=t.child,t!==null))for(Dk(t,e,r),t=t.sibling;t!==null;)Dk(t,e,r),t=t.sibling}var Mr=null,Is=!1;function Ea(t,e,r){for(r=r.child;r!==null;)P_(t,e,r),r=r.sibling}function P_(t,e,r){if(Si&&typeof Si.onCommitFiberUnmount=="function")try{Si.onCommitFiberUnmount(sy,r)}catch{}switch(r.tag){case 5:Yr||au(r,e);case 6:var n=Mr,s=Is;Mr=null,Ea(t,e,r),Mr=n,Is=s,Mr!==null&&(Is?(t=Mr,r=r.stateNode,t.nodeType===8?t.parentNode.removeChild(r):t.removeChild(r)):Mr.removeChild(r.stateNode));break;case 18:Mr!==null&&(Is?(t=Mr,r=r.stateNode,t.nodeType===8?Wx(t.parentNode,r):t.nodeType===1&&Wx(t,r),lp(t)):Wx(Mr,r.stateNode));break;case 4:n=Mr,s=Is,Mr=r.stateNode.containerInfo,Is=!0,Ea(t,e,r),Mr=n,Is=s;break;case 0:case 11:case 14:case 15:if(!Yr&&(n=r.updateQueue,n!==null&&(n=n.lastEffect,n!==null))){s=n=n.next;do{var i=s,a=i.destroy;i=i.tag,a!==void 0&&(i&2||i&4)&&Rk(r,e,a),s=s.next}while(s!==n)}Ea(t,e,r);break;case 1:if(!Yr&&(au(r,e),n=r.stateNode,typeof n.componentWillUnmount=="function"))try{n.props=r.memoizedProps,n.state=r.memoizedState,n.componentWillUnmount()}catch(l){Gt(r,e,l)}Ea(t,e,r);break;case 21:Ea(t,e,r);break;case 22:r.mode&1?(Yr=(n=Yr)||r.memoizedState!==null,Ea(t,e,r),Yr=n):Ea(t,e,r);break;default:Ea(t,e,r)}}function n4(t){var e=t.updateQueue;if(e!==null){t.updateQueue=null;var r=t.stateNode;r===null&&(r=t.stateNode=new RF),e.forEach(function(n){var s=HF.bind(null,t,n);r.has(n)||(r.add(n),n.then(s,s))})}}function Ts(t,e){var r=e.deletions;if(r!==null)for(var n=0;n<r.length;n++){var s=r[n];try{var i=t,a=e,l=a;e:for(;l!==null;){switch(l.tag){case 5:Mr=l.stateNode,Is=!1;break e;case 3:Mr=l.stateNode.containerInfo,Is=!0;break e;case 4:Mr=l.stateNode.containerInfo,Is=!0;break e}l=l.return}if(Mr===null)throw Error(Ee(160));P_(i,a,s),Mr=null,Is=!1;var c=s.alternate;c!==null&&(c.return=null),s.return=null}catch(u){Gt(s,e,u)}}if(e.subtreeFlags&12854)for(e=e.child;e!==null;)__(e,t),e=e.sibling}function __(t,e){var r=t.alternate,n=t.flags;switch(t.tag){case 0:case 11:case 14:case 15:if(Ts(e,t),ei(t),n&4){try{Ih(3,t,t.return),hy(3,t)}catch(y){Gt(t,t.return,y)}try{Ih(5,t,t.return)}catch(y){Gt(t,t.return,y)}}break;case 1:Ts(e,t),ei(t),n&512&&r!==null&&au(r,r.return);break;case 5:if(Ts(e,t),ei(t),n&512&&r!==null&&au(r,r.return),t.flags&32){var s=t.stateNode;try{sp(s,"")}catch(y){Gt(t,t.return,y)}}if(n&4&&(s=t.stateNode,s!=null)){var i=t.memoizedProps,a=r!==null?r.memoizedProps:i,l=t.type,c=t.updateQueue;if(t.updateQueue=null,c!==null)try{l==="input"&&i.type==="radio"&&i.name!=null&&eP(s,i),lk(l,a);var u=lk(l,i);for(a=0;a<c.length;a+=2){var d=c[a],h=c[a+1];d==="style"?iP(s,h):d==="dangerouslySetInnerHTML"?nP(s,h):d==="children"?sp(s,h):X2(s,d,h,u)}switch(l){case"input":nk(s,i);break;case"textarea":tP(s,i);break;case"select":var p=s._wrapperState.wasMultiple;s._wrapperState.wasMultiple=!!i.multiple;var f=i.value;f!=null?pu(s,!!i.multiple,f,!1):p!==!!i.multiple&&(i.defaultValue!=null?pu(s,!!i.multiple,i.defaultValue,!0):pu(s,!!i.multiple,i.multiple?[]:"",!1))}s[pp]=i}catch(y){Gt(t,t.return,y)}}break;case 6:if(Ts(e,t),ei(t),n&4){if(t.stateNode===null)throw Error(Ee(162));s=t.stateNode,i=t.memoizedProps;try{s.nodeValue=i}catch(y){Gt(t,t.return,y)}}break;case 3:if(Ts(e,t),ei(t),n&4&&r!==null&&r.memoizedState.isDehydrated)try{lp(e.containerInfo)}catch(y){Gt(t,t.return,y)}break;case 4:Ts(e,t),ei(t);break;case 13:Ts(e,t),ei(t),s=t.child,s.flags&8192&&(i=s.memoizedState!==null,s.stateNode.isHidden=i,!i||s.alternate!==null&&s.alternate.memoizedState!==null||(Pj=nr())),n&4&&n4(t);break;case 22:if(d=r!==null&&r.memoizedState!==null,t.mode&1?(Yr=(u=Yr)||d,Ts(e,t),Yr=u):Ts(e,t),ei(t),n&8192){if(u=t.memoizedState!==null,(t.stateNode.isHidden=u)&&!d&&t.mode&1)for(Re=t,d=t.child;d!==null;){for(h=Re=d;Re!==null;){switch(p=Re,f=p.child,p.tag){case 0:case 11:case 14:case 15:Ih(4,p,p.return);break;case 1:au(p,p.return);var m=p.stateNode;if(typeof m.componentWillUnmount=="function"){n=p,r=p.return;try{e=n,m.props=e.memoizedProps,m.state=e.memoizedState,m.componentWillUnmount()}catch(y){Gt(n,r,y)}}break;case 5:au(p,p.return);break;case 22:if(p.memoizedState!==null){i4(h);continue}}f!==null?(f.return=p,Re=f):i4(h)}d=d.sibling}e:for(d=null,h=t;;){if(h.tag===5){if(d===null){d=h;try{s=h.stateNode,u?(i=s.style,typeof i.setProperty=="function"?i.setProperty("display","none","important"):i.display="none"):(l=h.stateNode,c=h.memoizedProps.style,a=c!=null&&c.hasOwnProperty("display")?c.display:null,l.style.display=sP("display",a))}catch(y){Gt(t,t.return,y)}}}else if(h.tag===6){if(d===null)try{h.stateNode.nodeValue=u?"":h.memoizedProps}catch(y){Gt(t,t.return,y)}}else if((h.tag!==22&&h.tag!==23||h.memoizedState===null||h===t)&&h.child!==null){h.child.return=h,h=h.child;continue}if(h===t)break e;for(;h.sibling===null;){if(h.return===null||h.return===t)break e;d===h&&(d=null),h=h.return}d===h&&(d=null),h.sibling.return=h.return,h=h.sibling}}break;case 19:Ts(e,t),ei(t),n&4&&n4(t);break;case 21:break;default:Ts(e,t),ei(t)}}function ei(t){var e=t.flags;if(e&2){try{e:{for(var r=t.return;r!==null;){if(z_(r)){var n=r;break e}r=r.return}throw Error(Ee(160))}switch(n.tag){case 5:var s=n.stateNode;n.flags&32&&(sp(s,""),n.flags&=-33);var i=r4(t);Dk(t,i,s);break;case 3:case 4:var a=n.stateNode.containerInfo,l=r4(t);Mk(t,l,a);break;default:throw Error(Ee(161))}}catch(c){Gt(t,t.return,c)}t.flags&=-3}e&4096&&(t.flags&=-4097)}function MF(t,e,r){Re=t,I_(t)}function I_(t,e,r){for(var n=(t.mode&1)!==0;Re!==null;){var s=Re,i=s.child;if(s.tag===22&&n){var a=s.memoizedState!==null||Jf;if(!a){var l=s.alternate,c=l!==null&&l.memoizedState!==null||Yr;l=Jf;var u=Yr;if(Jf=a,(Yr=c)&&!u)for(Re=s;Re!==null;)a=Re,c=a.child,a.tag===22&&a.memoizedState!==null?a4(s):c!==null?(c.return=a,Re=c):a4(s);for(;i!==null;)Re=i,I_(i),i=i.sibling;Re=s,Jf=l,Yr=u}s4(t)}else s.subtreeFlags&8772&&i!==null?(i.return=s,Re=i):s4(t)}}function s4(t){for(;Re!==null;){var e=Re;if(e.flags&8772){var r=e.alternate;try{if(e.flags&8772)switch(e.tag){case 0:case 11:case 15:Yr||hy(5,e);break;case 1:var n=e.stateNode;if(e.flags&4&&!Yr)if(r===null)n.componentDidMount();else{var s=e.elementType===e.type?r.memoizedProps:zs(e.type,r.memoizedProps);n.componentDidUpdate(s,r.memoizedState,n.__reactInternalSnapshotBeforeUpdate)}var i=e.updateQueue;i!==null&&U3(e,i,n);break;case 3:var a=e.updateQueue;if(a!==null){if(r=null,e.child!==null)switch(e.child.tag){case 5:r=e.child.stateNode;break;case 1:r=e.child.stateNode}U3(e,a,r)}break;case 5:var l=e.stateNode;if(r===null&&e.flags&4){r=l;var c=e.memoizedProps;switch(e.type){case"button":case"input":case"select":case"textarea":c.autoFocus&&r.focus();break;case"img":c.src&&(r.src=c.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(e.memoizedState===null){var u=e.alternate;if(u!==null){var d=u.memoizedState;if(d!==null){var h=d.dehydrated;h!==null&&lp(h)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(Ee(163))}Yr||e.flags&512&&Lk(e)}catch(p){Gt(e,e.return,p)}}if(e===t){Re=null;break}if(r=e.sibling,r!==null){r.return=e.return,Re=r;break}Re=e.return}}function i4(t){for(;Re!==null;){var e=Re;if(e===t){Re=null;break}var r=e.sibling;if(r!==null){r.return=e.return,Re=r;break}Re=e.return}}function a4(t){for(;Re!==null;){var e=Re;try{switch(e.tag){case 0:case 11:case 15:var r=e.return;try{hy(4,e)}catch(c){Gt(e,r,c)}break;case 1:var n=e.stateNode;if(typeof n.componentDidMount=="function"){var s=e.return;try{n.componentDidMount()}catch(c){Gt(e,s,c)}}var i=e.return;try{Lk(e)}catch(c){Gt(e,i,c)}break;case 5:var a=e.return;try{Lk(e)}catch(c){Gt(e,a,c)}}}catch(c){Gt(e,e.return,c)}if(e===t){Re=null;break}var l=e.sibling;if(l!==null){l.return=e.return,Re=l;break}Re=e.return}}var DF=Math.ceil,_0=ba.ReactCurrentDispatcher,Aj=ba.ReactCurrentOwner,ys=ba.ReactCurrentBatchConfig,ht=0,Ir=null,pr=null,Ur=0,Wn=0,ou=Go(0),Nr=0,wp=null,ic=0,py=0,zj=0,Oh=null,Tn=null,Pj=0,Ku=1/0,Hi=null,I0=!1,Fk=null,wo=null,Xf=!1,ao=null,O0=0,Rh=0,Bk=null,Km=-1,Gm=0;function pn(){return ht&6?nr():Km!==-1?Km:Km=nr()}function bo(t){return t.mode&1?ht&2&&Ur!==0?Ur&-Ur:kF.transition!==null?(Gm===0&&(Gm=yP()),Gm):(t=St,t!==0||(t=window.event,t=t===void 0?16:SP(t.type)),t):1}function Vs(t,e,r,n){if(50<Rh)throw Rh=0,Bk=null,Error(Ee(185));nf(t,r,n),(!(ht&2)||t!==Ir)&&(t===Ir&&(!(ht&2)&&(py|=r),Nr===4&&Ha(t,Ur)),In(t,n),r===1&&ht===0&&!(e.mode&1)&&(Ku=nr()+500,cy&&Zo()))}function In(t,e){var r=t.callbackNode;k7(t,e);var n=y0(t,t===Ir?Ur:0);if(n===0)r!==null&&m3(r),t.callbackNode=null,t.callbackPriority=0;else if(e=n&-n,t.callbackPriority!==e){if(r!=null&&m3(r),e===1)t.tag===0?bF(o4.bind(null,t)):WP(o4.bind(null,t)),gF(function(){!(ht&6)&&Zo()}),r=null;else{switch(xP(n)){case 1:r=nj;break;case 4:r=mP;break;case 16:r=g0;break;case 536870912:r=gP;break;default:r=g0}r=$_(r,O_.bind(null,t))}t.callbackPriority=e,t.callbackNode=r}}function O_(t,e){if(Km=-1,Gm=0,ht&6)throw Error(Ee(327));var r=t.callbackNode;if(xu()&&t.callbackNode!==r)return null;var n=y0(t,t===Ir?Ur:0);if(n===0)return null;if(n&30||n&t.expiredLanes||e)e=R0(t,n);else{e=n;var s=ht;ht|=2;var i=L_();(Ir!==t||Ur!==e)&&(Hi=null,Ku=nr()+500,Kl(t,e));do try{$F();break}catch(l){R_(t,l)}while(!0);gj(),_0.current=i,ht=s,pr!==null?e=0:(Ir=null,Ur=0,e=Nr)}if(e!==0){if(e===2&&(s=pk(t),s!==0&&(n=s,e=$k(t,s))),e===1)throw r=wp,Kl(t,0),Ha(t,n),In(t,nr()),r;if(e===6)Ha(t,n);else{if(s=t.current.alternate,!(n&30)&&!FF(s)&&(e=R0(t,n),e===2&&(i=pk(t),i!==0&&(n=i,e=$k(t,i))),e===1))throw r=wp,Kl(t,0),Ha(t,n),In(t,nr()),r;switch(t.finishedWork=s,t.finishedLanes=n,e){case 0:case 1:throw Error(Ee(345));case 2:pl(t,Tn,Hi);break;case 3:if(Ha(t,n),(n&130023424)===n&&(e=Pj+500-nr(),10<e)){if(y0(t,0)!==0)break;if(s=t.suspendedLanes,(s&n)!==n){pn(),t.pingedLanes|=t.suspendedLanes&s;break}t.timeoutHandle=kk(pl.bind(null,t,Tn,Hi),e);break}pl(t,Tn,Hi);break;case 4:if(Ha(t,n),(n&4194240)===n)break;for(e=t.eventTimes,s=-1;0<n;){var a=31-Ws(n);i=1<<a,a=e[a],a>s&&(s=a),n&=~i}if(n=s,n=nr()-n,n=(120>n?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*DF(n/1960))-n,10<n){t.timeoutHandle=kk(pl.bind(null,t,Tn,Hi),n);break}pl(t,Tn,Hi);break;case 5:pl(t,Tn,Hi);break;default:throw Error(Ee(329))}}}return In(t,nr()),t.callbackNode===r?O_.bind(null,t):null}function $k(t,e){var r=Oh;return t.current.memoizedState.isDehydrated&&(Kl(t,e).flags|=256),t=R0(t,e),t!==2&&(e=Tn,Tn=r,e!==null&&Uk(e)),t}function Uk(t){Tn===null?Tn=t:Tn.push.apply(Tn,t)}function FF(t){for(var e=t;;){if(e.flags&16384){var r=e.updateQueue;if(r!==null&&(r=r.stores,r!==null))for(var n=0;n<r.length;n++){var s=r[n],i=s.getSnapshot;s=s.value;try{if(!Hs(i(),s))return!1}catch{return!1}}}if(r=e.child,e.subtreeFlags&16384&&r!==null)r.return=e,e=r;else{if(e===t)break;for(;e.sibling===null;){if(e.return===null||e.return===t)return!0;e=e.return}e.sibling.return=e.return,e=e.sibling}}return!0}function Ha(t,e){for(e&=~zj,e&=~py,t.suspendedLanes|=e,t.pingedLanes&=~e,t=t.expirationTimes;0<e;){var r=31-Ws(e),n=1<<r;t[r]=-1,e&=~n}}function o4(t){if(ht&6)throw Error(Ee(327));xu();var e=y0(t,0);if(!(e&1))return In(t,nr()),null;var r=R0(t,e);if(t.tag!==0&&r===2){var n=pk(t);n!==0&&(e=n,r=$k(t,n))}if(r===1)throw r=wp,Kl(t,0),Ha(t,e),In(t,nr()),r;if(r===6)throw Error(Ee(345));return t.finishedWork=t.current.alternate,t.finishedLanes=e,pl(t,Tn,Hi),In(t,nr()),null}function _j(t,e){var r=ht;ht|=1;try{return t(e)}finally{ht=r,ht===0&&(Ku=nr()+500,cy&&Zo())}}function ac(t){ao!==null&&ao.tag===0&&!(ht&6)&&xu();var e=ht;ht|=1;var r=ys.transition,n=St;try{if(ys.transition=null,St=1,t)return t()}finally{St=n,ys.transition=r,ht=e,!(ht&6)&&Zo()}}function Ij(){Wn=ou.current,Ot(ou)}function Kl(t,e){t.finishedWork=null,t.finishedLanes=0;var r=t.timeoutHandle;if(r!==-1&&(t.timeoutHandle=-1,mF(r)),pr!==null)for(r=pr.return;r!==null;){var n=r;switch(pj(n),n.tag){case 1:n=n.type.childContextTypes,n!=null&&v0();break;case 3:Hu(),Ot(Pn),Ot(en),vj();break;case 5:kj(n);break;case 4:Hu();break;case 13:Ot(Ft);break;case 19:Ot(Ft);break;case 10:yj(n.type._context);break;case 22:case 23:Ij()}r=r.return}if(Ir=t,pr=t=ko(t.current,null),Ur=Wn=e,Nr=0,wp=null,zj=py=ic=0,Tn=Oh=null,Sl!==null){for(e=0;e<Sl.length;e++)if(r=Sl[e],n=r.interleaved,n!==null){r.interleaved=null;var s=n.next,i=r.pending;if(i!==null){var a=i.next;i.next=s,n.next=a}r.pending=n}Sl=null}return t}function R_(t,e){do{var r=pr;try{if(gj(),Vm.current=P0,z0){for(var n=Ut.memoizedState;n!==null;){var s=n.queue;s!==null&&(s.pending=null),n=n.next}z0=!1}if(sc=0,zr=kr=Ut=null,_h=!1,gp=0,Aj.current=null,r===null||r.return===null){Nr=1,wp=e,pr=null;break}e:{var i=t,a=r.return,l=r,c=e;if(e=Ur,l.flags|=32768,c!==null&&typeof c=="object"&&typeof c.then=="function"){var u=c,d=l,h=d.tag;if(!(d.mode&1)&&(h===0||h===11||h===15)){var p=d.alternate;p?(d.updateQueue=p.updateQueue,d.memoizedState=p.memoizedState,d.lanes=p.lanes):(d.updateQueue=null,d.memoizedState=null)}var f=G3(a);if(f!==null){f.flags&=-257,Z3(f,a,l,i,e),f.mode&1&&K3(i,u,e),e=f,c=u;var m=e.updateQueue;if(m===null){var y=new Set;y.add(c),e.updateQueue=y}else m.add(c);break e}else{if(!(e&1)){K3(i,u,e),Oj();break e}c=Error(Ee(426))}}else if(Mt&&l.mode&1){var k=G3(a);if(k!==null){!(k.flags&65536)&&(k.flags|=256),Z3(k,a,l,i,e),fj(qu(c,l));break e}}i=c=qu(c,l),Nr!==4&&(Nr=2),Oh===null?Oh=[i]:Oh.push(i),i=a;do{switch(i.tag){case 3:i.flags|=65536,e&=-e,i.lanes|=e;var g=x_(i,c,e);$3(i,g);break e;case 1:l=c;var x=i.type,w=i.stateNode;if(!(i.flags&128)&&(typeof x.getDerivedStateFromError=="function"||w!==null&&typeof w.componentDidCatch=="function"&&(wo===null||!wo.has(w)))){i.flags|=65536,e&=-e,i.lanes|=e;var b=w_(i,l,e);$3(i,b);break e}}i=i.return}while(i!==null)}D_(r)}catch(v){e=v,pr===r&&r!==null&&(pr=r=r.return);continue}break}while(!0)}function L_(){var t=_0.current;return _0.current=P0,t===null?P0:t}function Oj(){(Nr===0||Nr===3||Nr===2)&&(Nr=4),Ir===null||!(ic&268435455)&&!(py&268435455)||Ha(Ir,Ur)}function R0(t,e){var r=ht;ht|=2;var n=L_();(Ir!==t||Ur!==e)&&(Hi=null,Kl(t,e));do try{BF();break}catch(s){R_(t,s)}while(!0);if(gj(),ht=r,_0.current=n,pr!==null)throw Error(Ee(261));return Ir=null,Ur=0,Nr}function BF(){for(;pr!==null;)M_(pr)}function $F(){for(;pr!==null&&!h7();)M_(pr)}function M_(t){var e=B_(t.alternate,t,Wn);t.memoizedProps=t.pendingProps,e===null?D_(t):pr=e,Aj.current=null}function D_(t){var e=t;do{var r=e.alternate;if(t=e.return,e.flags&32768){if(r=OF(r,e),r!==null){r.flags&=32767,pr=r;return}if(t!==null)t.flags|=32768,t.subtreeFlags=0,t.deletions=null;else{Nr=6,pr=null;return}}else if(r=IF(r,e,Wn),r!==null){pr=r;return}if(e=e.sibling,e!==null){pr=e;return}pr=e=t}while(e!==null);Nr===0&&(Nr=5)}function pl(t,e,r){var n=St,s=ys.transition;try{ys.transition=null,St=1,UF(t,e,r,n)}finally{ys.transition=s,St=n}return null}function UF(t,e,r,n){do xu();while(ao!==null);if(ht&6)throw Error(Ee(327));r=t.finishedWork;var s=t.finishedLanes;if(r===null)return null;if(t.finishedWork=null,t.finishedLanes=0,r===t.current)throw Error(Ee(177));t.callbackNode=null,t.callbackPriority=0;var i=r.lanes|r.childLanes;if(v7(t,i),t===Ir&&(pr=Ir=null,Ur=0),!(r.subtreeFlags&2064)&&!(r.flags&2064)||Xf||(Xf=!0,$_(g0,function(){return xu(),null})),i=(r.flags&15990)!==0,r.subtreeFlags&15990||i){i=ys.transition,ys.transition=null;var a=St;St=1;var l=ht;ht|=4,Aj.current=null,LF(t,r),__(r,t),lF(wk),x0=!!xk,wk=xk=null,t.current=r,MF(r),p7(),ht=l,St=a,ys.transition=i}else t.current=r;if(Xf&&(Xf=!1,ao=t,O0=s),i=t.pendingLanes,i===0&&(wo=null),g7(r.stateNode),In(t,nr()),e!==null)for(n=t.onRecoverableError,r=0;r<e.length;r++)s=e[r],n(s.value,{componentStack:s.stack,digest:s.digest});if(I0)throw I0=!1,t=Fk,Fk=null,t;return O0&1&&t.tag!==0&&xu(),i=t.pendingLanes,i&1?t===Bk?Rh++:(Rh=0,Bk=t):Rh=0,Zo(),null}function xu(){if(ao!==null){var t=xP(O0),e=ys.transition,r=St;try{if(ys.transition=null,St=16>t?16:t,ao===null)var n=!1;else{if(t=ao,ao=null,O0=0,ht&6)throw Error(Ee(331));var s=ht;for(ht|=4,Re=t.current;Re!==null;){var i=Re,a=i.child;if(Re.flags&16){var l=i.deletions;if(l!==null){for(var c=0;c<l.length;c++){var u=l[c];for(Re=u;Re!==null;){var d=Re;switch(d.tag){case 0:case 11:case 15:Ih(8,d,i)}var h=d.child;if(h!==null)h.return=d,Re=h;else for(;Re!==null;){d=Re;var p=d.sibling,f=d.return;if(A_(d),d===u){Re=null;break}if(p!==null){p.return=f,Re=p;break}Re=f}}}var m=i.alternate;if(m!==null){var y=m.child;if(y!==null){m.child=null;do{var k=y.sibling;y.sibling=null,y=k}while(y!==null)}}Re=i}}if(i.subtreeFlags&2064&&a!==null)a.return=i,Re=a;else e:for(;Re!==null;){if(i=Re,i.flags&2048)switch(i.tag){case 0:case 11:case 15:Ih(9,i,i.return)}var g=i.sibling;if(g!==null){g.return=i.return,Re=g;break e}Re=i.return}}var x=t.current;for(Re=x;Re!==null;){a=Re;var w=a.child;if(a.subtreeFlags&2064&&w!==null)w.return=a,Re=w;else e:for(a=x;Re!==null;){if(l=Re,l.flags&2048)try{switch(l.tag){case 0:case 11:case 15:hy(9,l)}}catch(v){Gt(l,l.return,v)}if(l===a){Re=null;break e}var b=l.sibling;if(b!==null){b.return=l.return,Re=b;break e}Re=l.return}}if(ht=s,Zo(),Si&&typeof Si.onPostCommitFiberRoot=="function")try{Si.onPostCommitFiberRoot(sy,t)}catch{}n=!0}return n}finally{St=r,ys.transition=e}}return!1}function l4(t,e,r){e=qu(r,e),e=x_(t,e,1),t=xo(t,e,1),e=pn(),t!==null&&(nf(t,1,e),In(t,e))}function Gt(t,e,r){if(t.tag===3)l4(t,t,r);else for(;e!==null;){if(e.tag===3){l4(e,t,r);break}else if(e.tag===1){var n=e.stateNode;if(typeof e.type.getDerivedStateFromError=="function"||typeof n.componentDidCatch=="function"&&(wo===null||!wo.has(n))){t=qu(r,t),t=w_(e,t,1),e=xo(e,t,1),t=pn(),e!==null&&(nf(e,1,t),In(e,t));break}}e=e.return}}function WF(t,e,r){var n=t.pingCache;n!==null&&n.delete(e),e=pn(),t.pingedLanes|=t.suspendedLanes&r,Ir===t&&(Ur&r)===r&&(Nr===4||Nr===3&&(Ur&130023424)===Ur&&500>nr()-Pj?Kl(t,0):zj|=r),In(t,e)}function F_(t,e){e===0&&(t.mode&1?(e=Uf,Uf<<=1,!(Uf&130023424)&&(Uf=4194304)):e=1);var r=pn();t=ha(t,e),t!==null&&(nf(t,e,r),In(t,r))}function VF(t){var e=t.memoizedState,r=0;e!==null&&(r=e.retryLane),F_(t,r)}function HF(t,e){var r=0;switch(t.tag){case 13:var n=t.stateNode,s=t.memoizedState;s!==null&&(r=s.retryLane);break;case 19:n=t.stateNode;break;default:throw Error(Ee(314))}n!==null&&n.delete(e),F_(t,r)}var B_;B_=function(t,e,r){if(t!==null)if(t.memoizedProps!==e.pendingProps||Pn.current)zn=!0;else{if(!(t.lanes&r)&&!(e.flags&128))return zn=!1,_F(t,e,r);zn=!!(t.flags&131072)}else zn=!1,Mt&&e.flags&1048576&&VP(e,N0,e.index);switch(e.lanes=0,e.tag){case 2:var n=e.type;qm(t,e),t=e.pendingProps;var s=Uu(e,en.current);yu(e,r),s=Sj(null,e,n,t,s,r);var i=Nj();return e.flags|=1,typeof s=="object"&&s!==null&&typeof s.render=="function"&&s.$$typeof===void 0?(e.tag=1,e.memoizedState=null,e.updateQueue=null,_n(n)?(i=!0,j0(e)):i=!1,e.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,wj(e),s.updater=dy,e.stateNode=s,s._reactInternals=e,Tk(e,n,t,r),e=Pk(null,e,n,!0,i,r)):(e.tag=0,Mt&&i&&hj(e),ln(null,e,s,r),e=e.child),e;case 16:n=e.elementType;e:{switch(qm(t,e),t=e.pendingProps,s=n._init,n=s(n._payload),e.type=n,s=e.tag=KF(n),t=zs(n,t),s){case 0:e=zk(null,e,n,t,r);break e;case 1:e=X3(null,e,n,t,r);break e;case 11:e=Y3(null,e,n,t,r);break e;case 14:e=J3(null,e,n,zs(n.type,t),r);break e}throw Error(Ee(306,n,""))}return e;case 0:return n=e.type,s=e.pendingProps,s=e.elementType===n?s:zs(n,s),zk(t,e,n,s,r);case 1:return n=e.type,s=e.pendingProps,s=e.elementType===n?s:zs(n,s),X3(t,e,n,s,r);case 3:e:{if(j_(e),t===null)throw Error(Ee(387));n=e.pendingProps,i=e.memoizedState,s=i.element,YP(t,e),T0(e,n,null,r);var a=e.memoizedState;if(n=a.element,i.isDehydrated)if(i={element:n,isDehydrated:!1,cache:a.cache,pendingSuspenseBoundaries:a.pendingSuspenseBoundaries,transitions:a.transitions},e.updateQueue.baseState=i,e.memoizedState=i,e.flags&256){s=qu(Error(Ee(423)),e),e=Q3(t,e,n,r,s);break e}else if(n!==s){s=qu(Error(Ee(424)),e),e=Q3(t,e,n,r,s);break e}else for(qn=yo(e.stateNode.containerInfo.firstChild),Kn=e,Mt=!0,Os=null,r=GP(e,null,n,r),e.child=r;r;)r.flags=r.flags&-3|4096,r=r.sibling;else{if(Wu(),n===s){e=pa(t,e,r);break e}ln(t,e,n,r)}e=e.child}return e;case 5:return JP(e),t===null&&Nk(e),n=e.type,s=e.pendingProps,i=t!==null?t.memoizedProps:null,a=s.children,bk(n,s)?a=null:i!==null&&bk(n,i)&&(e.flags|=32),v_(t,e),ln(t,e,a,r),e.child;case 6:return t===null&&Nk(e),null;case 13:return S_(t,e,r);case 4:return bj(e,e.stateNode.containerInfo),n=e.pendingProps,t===null?e.child=Vu(e,null,n,r):ln(t,e,n,r),e.child;case 11:return n=e.type,s=e.pendingProps,s=e.elementType===n?s:zs(n,s),Y3(t,e,n,s,r);case 7:return ln(t,e,e.pendingProps,r),e.child;case 8:return ln(t,e,e.pendingProps.children,r),e.child;case 12:return ln(t,e,e.pendingProps.children,r),e.child;case 10:e:{if(n=e.type._context,s=e.pendingProps,i=e.memoizedProps,a=s.value,zt(C0,n._currentValue),n._currentValue=a,i!==null)if(Hs(i.value,a)){if(i.children===s.children&&!Pn.current){e=pa(t,e,r);break e}}else for(i=e.child,i!==null&&(i.return=e);i!==null;){var l=i.dependencies;if(l!==null){a=i.child;for(var c=l.firstContext;c!==null;){if(c.context===n){if(i.tag===1){c=sa(-1,r&-r),c.tag=2;var u=i.updateQueue;if(u!==null){u=u.shared;var d=u.pending;d===null?c.next=c:(c.next=d.next,d.next=c),u.pending=c}}i.lanes|=r,c=i.alternate,c!==null&&(c.lanes|=r),Ck(i.return,r,e),l.lanes|=r;break}c=c.next}}else if(i.tag===10)a=i.type===e.type?null:i.child;else if(i.tag===18){if(a=i.return,a===null)throw Error(Ee(341));a.lanes|=r,l=a.alternate,l!==null&&(l.lanes|=r),Ck(a,r,e),a=i.sibling}else a=i.child;if(a!==null)a.return=i;else for(a=i;a!==null;){if(a===e){a=null;break}if(i=a.sibling,i!==null){i.return=a.return,a=i;break}a=a.return}i=a}ln(t,e,s.children,r),e=e.child}return e;case 9:return s=e.type,n=e.pendingProps.children,yu(e,r),s=vs(s),n=n(s),e.flags|=1,ln(t,e,n,r),e.child;case 14:return n=e.type,s=zs(n,e.pendingProps),s=zs(n.type,s),J3(t,e,n,s,r);case 15:return b_(t,e,e.type,e.pendingProps,r);case 17:return n=e.type,s=e.pendingProps,s=e.elementType===n?s:zs(n,s),qm(t,e),e.tag=1,_n(n)?(t=!0,j0(e)):t=!1,yu(e,r),y_(e,n,s),Tk(e,n,s,r),Pk(null,e,n,!0,t,r);case 19:return N_(t,e,r);case 22:return k_(t,e,r)}throw Error(Ee(156,e.tag))};function $_(t,e){return fP(t,e)}function qF(t,e,r,n){this.tag=t,this.key=r,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=e,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=n,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function gs(t,e,r,n){return new qF(t,e,r,n)}function Rj(t){return t=t.prototype,!(!t||!t.isReactComponent)}function KF(t){if(typeof t=="function")return Rj(t)?1:0;if(t!=null){if(t=t.$$typeof,t===ej)return 11;if(t===tj)return 14}return 2}function ko(t,e){var r=t.alternate;return r===null?(r=gs(t.tag,e,t.key,t.mode),r.elementType=t.elementType,r.type=t.type,r.stateNode=t.stateNode,r.alternate=t,t.alternate=r):(r.pendingProps=e,r.type=t.type,r.flags=0,r.subtreeFlags=0,r.deletions=null),r.flags=t.flags&14680064,r.childLanes=t.childLanes,r.lanes=t.lanes,r.child=t.child,r.memoizedProps=t.memoizedProps,r.memoizedState=t.memoizedState,r.updateQueue=t.updateQueue,e=t.dependencies,r.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext},r.sibling=t.sibling,r.index=t.index,r.ref=t.ref,r}function Zm(t,e,r,n,s,i){var a=2;if(n=t,typeof t=="function")Rj(t)&&(a=1);else if(typeof t=="string")a=5;
vendor: 6,400 bytes, line 40
40else e:switch(t){case Jc:return Gl(r.children,s,i,e);case Q2:a=8,s|=8;break;case X1:return t=gs(12,r,e,s|2),t.elementType=X1,t.lanes=i,t;case Q1:return t=gs(13,r,e,s),t.elementType=Q1,t.lanes=i,t;case ek:return t=gs(19,r,e,s),t.elementType=ek,t.lanes=i,t;case Jz:return fy(r,s,i,e);default:if(typeof t=="object"&&t!==null)switch(t.$$typeof){case Zz:a=10;break e;case Yz:a=9;break e;case ej:a=11;break e;case tj:a=14;break e;case Ra:a=16,n=null;break e}throw Error(Ee(130,t==null?t:typeof t,""))}return e=gs(a,r,e,s),e.elementType=t,e.type=n,e.lanes=i,e}function Gl(t,e,r,n){return t=gs(7,t,n,e),t.lanes=r,t}function fy(t,e,r,n){return t=gs(22,t,n,e),t.elementType=Jz,t.lanes=r,t.stateNode={isHidden:!1},t}function Jx(t,e,r){return t=gs(6,t,null,e),t.lanes=r,t}function Xx(t,e,r){return e=gs(4,t.children!==null?t.children:[],t.key,e),e.lanes=r,e.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},e}function GF(t,e,r,n,s){this.tag=e,this.containerInfo=t,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=_x(0),this.expirationTimes=_x(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=_x(0),this.identifierPrefix=n,this.onRecoverableError=s,this.mutableSourceEagerHydrationData=null}function Lj(t,e,r,n,s,i,a,l,c){return t=new GF(t,e,r,l,c),e===1?(e=1,i===!0&&(e|=8)):e=0,i=gs(3,null,null,e),t.current=i,i.stateNode=t,i.memoizedState={element:n,isDehydrated:r,cache:null,transitions:null,pendingSuspenseBoundaries:null},wj(i),t}function ZF(t,e,r){var n=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:Yc,key:n==null?null:""+n,children:t,containerInfo:e,implementation:r}}function U_(t){if(!t)return Io;t=t._reactInternals;e:{if(vc(t)!==t||t.tag!==1)throw Error(Ee(170));var e=t;do{switch(e.tag){case 3:e=e.stateNode.context;break e;case 1:if(_n(e.type)){e=e.stateNode.__reactInternalMemoizedMergedChildContext;break e}}e=e.return}while(e!==null);throw Error(Ee(171))}if(t.tag===1){var r=t.type;if(_n(r))return UP(t,r,e)}return e}function W_(t,e,r,n,s,i,a,l,c){return t=Lj(r,n,!0,t,s,i,a,l,c),t.context=U_(null),r=t.current,n=pn(),s=bo(r),i=sa(n,s),i.callback=e??null,xo(r,i,s),t.current.lanes=s,nf(t,s,n),In(t,n),t}function my(t,e,r,n){var s=e.current,i=pn(),a=bo(s);return r=U_(r),e.context===null?e.context=r:e.pendingContext=r,e=sa(i,a),e.payload={element:t},n=n===void 0?null:n,n!==null&&(e.callback=n),t=xo(s,e,a),t!==null&&(Vs(t,s,a,i),Wm(t,s,a)),a}function L0(t){if(t=t.current,!t.child)return null;switch(t.child.tag){case 5:return t.child.stateNode;default:return t.child.stateNode}}function c4(t,e){if(t=t.memoizedState,t!==null&&t.dehydrated!==null){var r=t.retryLane;t.retryLane=r!==0&&r<e?r:e}}function Mj(t,e){c4(t,e),(t=t.alternate)&&c4(t,e)}function YF(){return null}var V_=typeof reportError=="function"?reportError:function(t){console.error(t)};function Dj(t){this._internalRoot=t}gy.prototype.render=Dj.prototype.render=function(t){var e=this._internalRoot;if(e===null)throw Error(Ee(409));my(t,e,null,null)};gy.prototype.unmount=Dj.prototype.unmount=function(){var t=this._internalRoot;if(t!==null){this._internalRoot=null;var e=t.containerInfo;ac(function(){my(null,t,null,null)}),e[da]=null}};function gy(t){this._internalRoot=t}gy.prototype.unstable_scheduleHydration=function(t){if(t){var e=kP();t={blockedOn:null,target:t,priority:e};for(var r=0;r<Va.length&&e!==0&&e<Va[r].priority;r++);Va.splice(r,0,t),r===0&&jP(t)}};function Fj(t){return!(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)}function yy(t){return!(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11&&(t.nodeType!==8||t.nodeValue!==" react-mount-point-unstable "))}function u4(){}function JF(t,e,r,n,s){if(s){if(typeof n=="function"){var i=n;n=function(){var u=L0(a);i.call(u)}}var a=W_(e,n,t,0,null,!1,!1,"",u4);return t._reactRootContainer=a,t[da]=a.current,dp(t.nodeType===8?t.parentNode:t),ac(),a}for(;s=t.lastChild;)t.removeChild(s);if(typeof n=="function"){var l=n;n=function(){var u=L0(c);l.call(u)}}var c=Lj(t,0,!1,null,null,!1,!1,"",u4);return t._reactRootContainer=c,t[da]=c.current,dp(t.nodeType===8?t.parentNode:t),ac(function(){my(e,c,r,n)}),c}function xy(t,e,r,n,s){var i=r._reactRootContainer;if(i){var a=i;if(typeof s=="function"){var l=s;s=function(){var c=L0(a);l.call(c)}}my(e,a,t,s)}else a=JF(r,e,t,s,n);return L0(a)}wP=function(t){switch(t.tag){case 3:var e=t.stateNode;if(e.current.memoizedState.isDehydrated){var r=xh(e.pendingLanes);r!==0&&(sj(e,r|1),In(e,nr()),!(ht&6)&&(Ku=nr()+500,Zo()))}break;case 13:ac(function(){var n=ha(t,1);if(n!==null){var s=pn();Vs(n,t,1,s)}}),Mj(t,1)}};ij=function(t){if(t.tag===13){var e=ha(t,134217728);if(e!==null){var r=pn();Vs(e,t,134217728,r)}Mj(t,134217728)}};bP=function(t){if(t.tag===13){var e=bo(t),r=ha(t,e);if(r!==null){var n=pn();Vs(r,t,e,n)}Mj(t,e)}};kP=function(){return St};vP=function(t,e){var r=St;try{return St=t,e()}finally{St=r}};uk=function(t,e,r){switch(e){case"input":if(nk(t,r),e=r.name,r.type==="radio"&&e!=null){for(r=t;r.parentNode;)r=r.parentNode;for(r=r.querySelectorAll("input[name="+JSON.stringify(""+e)+'][type="radio"]'),e=0;e<r.length;e++){var n=r[e];if(n!==t&&n.form===t.form){var s=ly(n);if(!s)throw Error(Ee(90));Qz(n),nk(n,s)}}}break;case"textarea":tP(t,r);break;case"select":e=r.value,e!=null&&pu(t,!!r.multiple,e,!1)}};lP=_j;cP=ac;var XF={usingClientEntryPoint:!1,Events:[af,tu,ly,aP,oP,_j]},Gd={findFiberByHostInstance:jl,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},QF={bundleType:Gd.bundleType,version:Gd.version,rendererPackageName:Gd.rendererPackageName,rendererConfig:Gd.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:ba.ReactCurrentDispatcher,findHostInstanceByFiber:function(t){return t=hP(t),t===null?null:t.stateNode},findFiberByHostInstance:Gd.findFiberByHostInstance||YF,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};
40if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Qf=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Qf.isDisabled&&Qf.supportsFiber)try{sy=Qf.inject(QF),Si=Qf}catch{}}Xn.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=XF;Xn.createPortal=function(t,e){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Fj(e))throw Error(Ee(200));return ZF(t,e,null,r)};Xn.createRoot=function(t,e){if(!Fj(t))throw Error(Ee(299));var r=!1,n="",s=V_;return e!=null&&(e.unstable_strictMode===!0&&(r=!0),e.identifierPrefix!==void 0&&(n=e.identifierPrefix),e.onRecoverableError!==void 0&&(s=e.onRecoverableError)),e=Lj(t,1,!1,null,null,r,!1,n,s),t[da]=e.current,dp(t.nodeType===8?t.parentNode:t),new Dj(e)};Xn.findDOMNode=function(t){if(t==null)return null;if(t.nodeType===1)return t;var e=t._reactInternals;if(e===void 0)throw typeof t.render=="function"?Error(Ee(188)):(t=Object.keys(t).join(","),Error(Ee(268,t)));return t=hP(e),t=t===null?null:t.stateNode,t};Xn.flushSync=function(t){return ac(t)};Xn.hydrate=function(t,e,r){if(!yy(e))throw Error(Ee(200));return xy(null,t,e,!0,r)};Xn.hydrateRoot=function(t,e,r){if(!Fj(t))throw Error(Ee(405));var n=r!=null&&r.hydratedSources||null,s=!1,i="",a=V_;if(r!=null&&(r.unstable_strictMode===!0&&(s=!0),r.identifierPrefix!==void 0&&(i=r.identifierPrefix),r.onRecoverableError!==void 0&&(a=r.onRecoverableError)),e=W_(e,null,t,1,r??null,s,!1,i,a),t[da]=e.current,dp(t),n)for(t=0;t<n.length;t++)r=n[t],s=r._getVersion,s=s(r._source),e.mutableSourceEagerHydrationData==null?e.mutableSourceEagerHydrationData=[r,s]:e.mutableSourceEagerHydrationData.push(r,s);return new gy(e)};Xn.render=function(t,e,r){if(!yy(e))throw Error(Ee(200));return xy(null,t,e,!1,r)};Xn.unmountComponentAtNode=function(t){if(!yy(t))throw Error(Ee(40));return t._reactRootContainer?(ac(function(){xy(null,null,t,!1,function(){t._reactRootContainer=null,t[da]=null})}),!0):!1};Xn.unstable_batchedUpdates=_j;Xn.unstable_renderSubtreeIntoContainer=function(t,e,r,n){if(!yy(r))throw Error(Ee(200));if(t==null||t._reactInternals===void 0)throw Error(Ee(38));return xy(t,e,r,!1,n)};Xn.version="18.3.1-next-f1338f8080-20240426";function H_(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(H_)}catch(t){console.error(t)}}H_(),Hz.exports=Xn;var M0=Hz.exports;const eB=qo(M0);var d4=M0;Y1.createRoot=d4.createRoot,Y1.hydrateRoot=d4.hydrateRoot;/**
41 * @remix-run/router v1.23.0
42 *
43 * Copyright (c) Remix Software Inc.
44 *
45 * This source code is licensed under the MIT license found in the
46 * LICENSE.md file in the root directory of this source tree.
47 *
48 * @license MIT
49 */function bp(){return bp=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},bp.apply(this,arguments)}var oo;(function(t){t.Pop="POP",t.Push="PUSH",t.Replace="REPLACE"})(oo||(oo={}));const h4="popstate";function tB(t){t===void 0&&(t={});function e(n,s){let{pathname:i,search:a,hash:l}=n.location;return Wk("",{pathname:i,search:a,hash:l},s.state&&s.state.usr||null,s.state&&s.state.key||"default")}function r(n,s){return typeof s=="string"?s:D0(s)}return nB(e,r,null,t)}function ir(t,e){if(t===!1||t===null||typeof t>"u")throw new Error(e)}function q_(t,e){if(!t){typeof console<"u"&&console.warn(e);try{throw new Error(e)}catch{}}}function rB(){return Math.random().toString(36).substr(2,8)}function p4(t,e){return{usr:t.state,key:t.key,idx:e}}function Wk(t,e,r,n){return r===void 0&&(r=null),bp({pathname:typeof t=="string"?t:t.pathname,search:"",hash:""},typeof e=="string"?Ed(e):e,{state:r,key:e&&e.key||n||rB()})}function D0(t){let{pathname:e="/",search:r="",hash:n=""}=t;return r&&r!=="?"&&(e+=r.charAt(0)==="?"?r:"?"+r),n&&n!=="#"&&(e+=n.charAt(0)==="#"?n:"#"+n),e}function Ed(t){let e={};if(t){let r=t.indexOf("#");r>=0&&(e.hash=t.substr(r),t=t.substr(0,r));let n=t.indexOf("?");n>=0&&(e.search=t.substr(n),t=t.substr(0,n)),t&&(e.pathname=t)}return e}function nB(t,e,r,n){n===void 0&&(n={});let{window:s=document.defaultView,v5Compat:i=!1}=n,a=s.history,l=oo.Pop,c=null,u=d();u==null&&(u=0,a.replaceState(bp({},a.state,{idx:u}),""));function d(){return(a.state||{idx:null}).idx}function h(){l=oo.Pop;let k=d(),g=k==null?null:k-u;u=k,c&&c({action:l,location:y.location,delta:g})}function p(k,g){l=oo.Push;let x=Wk(y.location,k,g);u=d()+1;let w=p4(x,u),b=y.createHref(x);try{a.pushState(w,"",b)}catch(v){if(v instanceof DOMException&&v.name==="DataCloneError")throw v;s.location.assign(b)}i&&c&&c({action:l,location:y.location,delta:1})}function f(k,g){l=oo.Replace;let x=Wk(y.location,k,g);u=d();let w=p4(x,u),b=y.createHref(x);a.replaceState(w,"",b),i&&c&&c({action:l,location:y.location,delta:0})}function m(k){let g=s.location.origin!=="null"?s.location.origin:s.location.href,x=typeof k=="string"?k:D0(k);
vendor: 2,797 bytes, line 49
49return x=x.replace(/ $/,"%20"),ir(g,"No window.location.(origin|href) available to create URL for href: "+x),new URL(x,g)}let y={get action(){return l},get location(){return t(s,a)},listen(k){if(c)throw new Error("A history only accepts one active listener");return s.addEventListener(h4,h),c=k,()=>{s.removeEventListener(h4,h),c=null}},createHref(k){return e(s,k)},createURL:m,encodeLocation(k){let g=m(k);return{pathname:g.pathname,search:g.search,hash:g.hash}},push:p,replace:f,go(k){return a.go(k)}};return y}var f4;(function(t){t.data="data",t.deferred="deferred",t.redirect="redirect",t.error="error"})(f4||(f4={}));function sB(t,e,r){return r===void 0&&(r="/"),iB(t,e,r)}function iB(t,e,r,n){let s=typeof e=="string"?Ed(e):e,i=Bj(s.pathname||"/",r);if(i==null)return null;let a=K_(t);aB(a);let l=null;for(let c=0;l==null&&c<a.length;++c){let u=xB(i);l=mB(a[c],u)}return l}function K_(t,e,r,n){e===void 0&&(e=[]),r===void 0&&(r=[]),n===void 0&&(n="");let s=(i,a,l)=>{let c={relativePath:l===void 0?i.path||"":l,caseSensitive:i.caseSensitive===!0,childrenIndex:a,route:i};c.relativePath.startsWith("/")&&(ir(c.relativePath.startsWith(n),'Absolute route path "'+c.relativePath+'" nested under path '+('"'+n+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),c.relativePath=c.relativePath.slice(n.length));let u=vo([n,c.relativePath]),d=r.concat(c);i.children&&i.children.length>0&&(ir(i.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+u+'".')),K_(i.children,e,d,u)),!(i.path==null&&!i.index)&&e.push({path:u,score:pB(u,i.index),routesMeta:d})};return t.forEach((i,a)=>{var l;if(i.path===""||!((l=i.path)!=null&&l.includes("?")))s(i,a);else for(let c of G_(i.path))s(i,a,c)}),e}function G_(t){let e=t.split("/");if(e.length===0)return[];let[r,...n]=e,s=r.endsWith("?"),i=r.replace(/\?$/,"");if(n.length===0)return s?[i,""]:[i];let a=G_(n.join("/")),l=[];return l.push(...a.map(c=>c===""?i:[i,c].join("/"))),s&&l.push(...a),l.map(c=>t.startsWith("/")&&c===""?"/":c)}function aB(t){t.sort((e,r)=>e.score!==r.score?r.score-e.score:fB(e.routesMeta.map(n=>n.childrenIndex),r.routesMeta.map(n=>n.childrenIndex)))}const oB=/^:[\w-]+$/,lB=3,cB=2,uB=1,dB=10,hB=-2,m4=t=>t==="*";function pB(t,e){let r=t.split("/"),n=r.length;return r.some(m4)&&(n+=hB),e&&(n+=cB),r.filter(s=>!m4(s)).reduce((s,i)=>s+(oB.test(i)?lB:i===""?uB:dB),n)}function fB(t,e){return t.length===e.length&&t.slice(0,-1).every((n,s)=>n===e[s])?t[t.length-1]-e[e.length-1]:0}function mB(t,e,r){let{routesMeta:n}=t,s={},i="/",a=[];for(let l=0;l<n.length;++l){let c=n[l],u=l===n.length-1,d=i==="/"?e:e.slice(i.length)||"/",h=gB({path:c.relativePath,caseSensitive:c.caseSensitive,end:u},d),p=c.route;if(!h)return null;
vendor: 9,284 bytes, lines 49-58
49Object.assign(s,h.params),a.push({params:s,pathname:vo([i,h.pathname]),pathnameBase:vB(vo([i,h.pathnameBase])),route:p}),h.pathnameBase!=="/"&&(i=vo([i,h.pathnameBase]))}return a}function gB(t,e){typeof t=="string"&&(t={path:t,caseSensitive:!1,end:!0});let[r,n]=yB(t.path,t.caseSensitive,t.end),s=e.match(r);if(!s)return null;let i=s[0],a=i.replace(/(.)\/+$/,"$1"),l=s.slice(1);return{params:n.reduce((u,d,h)=>{let{paramName:p,isOptional:f}=d;if(p==="*"){let y=l[h]||"";a=i.slice(0,i.length-y.length).replace(/(.)\/+$/,"$1")}const m=l[h];return f&&!m?u[p]=void 0:u[p]=(m||"").replace(/%2F/g,"/"),u},{}),pathname:i,pathnameBase:a,pattern:t}}function yB(t,e,r){e===void 0&&(e=!1),r===void 0&&(r=!0),q_(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 n=[],s="^"+t.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(a,l,c)=>(n.push({paramName:l,isOptional:c!=null}),c?"/?([^\\/]+)?":"/([^\\/]+)"));return t.endsWith("*")?(n.push({paramName:"*"}),s+=t==="*"||t==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?s+="\\/*$":t!==""&&t!=="/"&&(s+="(?:(?=\\/|$))"),[new RegExp(s,e?void 0:"i"),n]}function xB(t){try{return t.split("/").map(e=>decodeURIComponent(e).replace(/\//g,"%2F")).join("/")}catch(e){return q_(!1,'The URL path "'+t+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+e+").")),t}}function Bj(t,e){if(e==="/")return t;if(!t.toLowerCase().startsWith(e.toLowerCase()))return null;let r=e.endsWith("/")?e.length-1:e.length,n=t.charAt(r);return n&&n!=="/"?null:t.slice(r)||"/"}function wB(t,e){e===void 0&&(e="/");let{pathname:r,search:n="",hash:s=""}=typeof t=="string"?Ed(t):t;return{pathname:r?r.startsWith("/")?r:bB(r,e):e,search:jB(n),hash:SB(s)}}function bB(t,e){let r=e.replace(/\/+$/,"").split("/");return t.split("/").forEach(s=>{s===".."?r.length>1&&r.pop():s!=="."&&r.push(s)}),r.length>1?r.join("/"):"/"}function Qx(t,e,r,n){return"Cannot include a '"+t+"' character in a manually specified "+("`to."+e+"` field ["+JSON.stringify(n)+"].  Please separate it out to the ")+("`to."+r+"` field. Alternatively you may provide the full path as ")+'a string in <Link to="..."> and the router will parse it for you.'}function kB(t){return t.filter((e,r)=>r===0||e.route.path&&e.route.path.length>0)}function $j(t,e){let r=kB(t);return e?r.map((n,s)=>s===r.length-1?n.pathname:n.pathnameBase):r.map(n=>n.pathnameBase)}function Uj(t,e,r,n){n===void 0&&(n=!1);let s;typeof t=="string"?s=Ed(t):(s=bp({},t),ir(!s.pathname||!s.pathname.includes("?"),Qx("?","pathname","search",s)),ir(!s.pathname||!s.pathname.includes("#"),Qx("#","pathname","hash",s)),ir(!s.search||!s.search.includes("#"),Qx("#","search","hash",s)));let i=t===""||s.pathname==="",a=i?"/":s.pathname,l;if(a==null)l=r;else{let h=e.length-1;if(!n&&a.startsWith("..")){let p=a.split("/");for(;p[0]==="..";)p.shift(),h-=1;s.pathname=p.join("/")}l=h>=0?e[h]:"/"}let c=wB(s,l),u=a&&a!=="/"&&a.endsWith("/"),d=(i||a===".")&&r.endsWith("/");return!c.pathname.endsWith("/")&&(u||d)&&(c.pathname+="/"),c}const vo=t=>t.join("/").replace(/\/\/+/g,"/"),vB=t=>t.replace(/\/+$/,"").replace(/^\/*/,"/"),jB=t=>!t||t==="?"?"":t.startsWith("?")?t:"?"+t,SB=t=>!t||t==="#"?"":t.startsWith("#")?t:"#"+t;function NB(t){return t!=null&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.internal=="boolean"&&"data"in t}const Z_=["post","put","patch","delete"];new Set(Z_);const CB=["get",...Z_];new Set(CB);/**
50 * React Router v6.30.1
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 */function kp(){return kp=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},kp.apply(this,arguments)}const Wj=M.createContext(null),EB=M.createContext(null),Yo=M.createContext(null),wy=M.createContext(null),ka=M.createContext({outlet:null,matches:[],isDataRoute:!1}),Y_=M.createContext(null);function TB(t,e){let{relative:r}=e===void 0?{}:e;Td()||ir(!1);let{basename:n,navigator:s}=M.useContext(Yo),{hash:i,pathname:a,search:l}=X_(t,{relative:r}),c=a;return n!=="/"&&(c=a==="/"?n:vo([n,a])),s.createHref({pathname:c,search:l,hash:i})}function Td(){return M.useContext(wy)!=null}function Ss(){return Td()||ir(!1),M.useContext(wy).location}function J_(t){M.useContext(Yo).static||M.useLayoutEffect(t)}function Vr(){let{isDataRoute:t}=M.useContext(ka);return t?$B():AB()}function AB(){Td()||ir(!1);let t=M.useContext(Wj),{basename:e,future:r,navigator:n}=M.useContext(Yo),{matches:s}=M.useContext(ka),{pathname:i}=Ss(),a=JSON.stringify($j(s,r.v7_relativeSplatPath)),l=M.useRef(!1);return J_(()=>{l.current=!0}),M.useCallback(function(u,d){if(d===void 0&&(d={}),!l.current)return;if(typeof u=="number"){n.go(u);return}let h=Uj(u,JSON.parse(a),i,d.relative==="path");t==null&&e!=="/"&&(h.pathname=h.pathname==="/"?e:vo([e,h.pathname])),(d.replace?n.replace:n.push)(h,d.state,d)},[e,n,a,i,t])}function lf(){let{matches:t}=M.useContext(ka),e=t[t.length-1];return e?e.params:{}}function X_(t,e){let{relative:r}=e===void 0?{}:e,{future:n}=M.useContext(Yo),{matches:s}=M.useContext(ka),{pathname:i}=Ss(),a=JSON.stringify($j(s,n.v7_relativeSplatPath));return M.useMemo(()=>Uj(t,JSON.parse(a),i,r==="path"),[t,a,i,r])}function zB(t,e){return PB(t,e)}function PB(t,e,r,n){Td()||ir(!1);let{navigator:s}=M.useContext(Yo),{matches:i}=M.useContext(ka),a=i[i.length-1],l=a?a.params:{};a&&a.pathname;let c=a?a.pathnameBase:"/";a&&a.route;let u=Ss(),d;if(e){var h;let k=typeof e=="string"?Ed(e):e;c==="/"||(h=k.pathname)!=null&&h.startsWith(c)||ir(!1),d=k}else d=u;let p=d.pathname||"/",f=p;if(c!=="/"){let k=c.replace(/^\//,"").split("/");f="/"+p.replace(/^\//,"").split("/").slice(k.length).join("/")}let m=sB(t,{pathname:f}),y=LB(m&&m.map(k=>Object.assign({},k,{params:Object.assign({},l,k.params),pathname:vo([c,s.encodeLocation?s.encodeLocation(k.pathname).pathname:k.pathname]),pathnameBase:k.pathnameBase==="/"?c:vo([c,s.encodeLocation?s.encodeLocation(k.pathnameBase).pathname:k.pathnameBase])})),i,r,n);return e&&y?M.createElement(wy.Provider,{value:{location:kp({pathname:"/",search:"",hash:"",state:null,key:"default"},d),navigationType:oo.Pop}},y):y}function _B(){let t=BB(),e=NB(t)?t.status+" "+t.statusText:t instanceof Error?t.message:JSON.stringify(t),r=t instanceof Error?t.stack:null,s={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return M.createElement(M.Fragment,null,M.createElement("h2",null,"Unexpected Application Error!"),M.createElement("h3",{style:{fontStyle:"italic"}},e),r?M.createElement("pre",{style:s},r):null,null)}const IB=M.createElement(_B,null);class OB extends M.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,r){return r.location!==e.location||r.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:r.error,location:r.location,revalidation:e.revalidation||r.revalidation}}componentDidCatch(e,r){console.error("React Router caught the following error during render",e,r)}render(){return this.state.error!==void 0?M.createElement(ka.Provider,{value:this.props.routeContext},M.createElement(Y_.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function RB(t){let{routeContext:e,match:r,children:n}=t,s=M.useContext(Wj);return s&&s.static&&s.staticContext&&(r.route.errorElement||r.route.ErrorBoundary)&&(s.staticContext._deepestRenderedBoundaryId=r.route.id),M.createElement(ka.Provider,{value:e},n)}function LB(t,e,r,n){var s;if(e===void 0&&(e=[]),r===void 0&&(r=null),n===void 0&&(n=null),t==null){var i;if(!r)return null;if(r.errors)t=r.matches;else if((i=n)!=null&&i.v7_partialHydration&&e.length===0&&!r.initialized&&r.matches.length>0)t=r.matches;else return null}let a=t,l=(s=r)==null?void 0:s.errors;if(l!=null){let d=a.findIndex(h=>h.route.id&&(l==null?void 0:l[h.route.id])!==void 0);d>=0||ir(!1),a=a.slice(0,Math.min(a.length,d+1))}let c=!1,u=-1;if(r&&n&&n.v7_partialHydration)for(let d=0;d<a.length;d++){let h=a[d];if((h.route.HydrateFallback||h.route.hydrateFallbackElement)&&(u=d),h.route.id){let{loaderData:p,errors:f}=r,m=h.route.loader&&p[h.route.id]===void 0&&(!f||f[h.route.id]===void 0);if(h.route.lazy||m){c=!0,u>=0?a=a.slice(0,u+1):a=[a[0]];break}}}return a.reduceRight((d,h,p)=>{let f,m=!1,y=null,k=null;r&&(f=l&&h.route.id?l[h.route.id]:void 0,y=h.route.errorElement||IB,c&&(u<0&&p===0?(UB("route-fallback"),m=!0,k=null):u===p&&(m=!0,k=h.route.hydrateFallbackElement||null)));let g=e.concat(a.slice(0,p+1)),x=()=>{let w;return f?w=y:m?w=k:h.route.Component?w=M.createElement(h.route.Component,null):h.route.element?w=h.route.element:w=d,M.createElement(RB,{match:h,routeC
58ontext:{outlet:d,matches:g,isDataRoute:r!=null},children:w})};return r&&(h.route.ErrorBoundary||h.route.errorElement||p===0)?M.createElement(OB,{location:r.location,revalidation:r.revalidation,component:y,error:f,children:x(),routeContext:{outlet:null,matches:g,isDataRoute:!0}}):x()},null)}var Q_=function(t){return t.UseBlocker="useBlocker",t.UseRevalidator="useRevalidator",t.UseNavigateStable="useNavigate",t}(Q_||{}),eI=function(t){return t.UseBlocker="useBlocker",t.UseLoaderData="useLoaderData",t.UseActionData="useActionData",t.UseRouteError="useRouteError",t.UseNavigation="useNavigation",t.UseRouteLoaderData="useRouteLoaderData",t.UseMatches="useMatches",t.UseRevalidator="useRevalidator",t.UseNavigateStable="useNavigate",t.UseRouteId="useRouteId",t}(eI||{});function MB(t){let e=M.useContext(Wj);return e||ir(!1),e}function DB(t){let e=M.useContext(EB);return e||ir(!1),e}function FB(t){let e=M.useContext(ka);return e||ir(!1),e}function tI(t){let e=FB(),r=e.matches[e.matches.length-1];return r.route.id||ir(!1),r.route.id}function BB(){var t;let e=M.useContext(Y_),r=DB(),n=tI();return e!==void 0?e:(t=r.errors)==null?void 0:t[n]}function $B(){let{router:t}=MB(Q_.UseNavigateStable),e=tI(eI.UseNavigateStable),r=M.useRef(!1);return J_(()=>{r.current=!0}),M.useCallback(function(s,i){i===void 0&&(i={}),r.current&&(typeof s=="number"?t.navigate(s):t.navigate(s,kp({fromRouteId:e},i)))},[t,e])}const g4={};function UB(t,e,r){g4[t]||(g4[t]=!0)}function WB(t,e){t==null||t.v7_startTransition,t==null||t.v7_relativeSplatPath}function lo(t){let{to:e,replace:r,state:n,relative:s}=t;Td()||ir(!1);let{future:i,static:a}=M.useContext(Yo),{matches:l}=M.useContext(ka),{pathname:c}=Ss(),u=Vr(),d=Uj(e,$j(l,i.v7_relativeSplatPath),c,s==="path"),h=JSON.stringify(d);return M.useEffect(()=>u(JSON.parse(h),{replace:r,state:n,relative:s}),[u,h,s,r,n]),null}function ct(t){ir(!1)}function VB(t){let{basename:e="/",children:r=null,location:n,navigationType:s=oo.Pop,navigator:i,static:a=!1,future:l}=t;Td()&&ir(!1);let c=e.replace(/^\/*/,"/"),u=M.useMemo(()=>({basename:c,navigator:i,static:a,future:kp({v7_relativeSplatPath:!1},l)}),[c,l,i,a]);typeof n=="string"&&(n=Ed(n));let{pathname:d="/",search:h="",hash:p="",state:f=null,key:m="default"}=n,y=M.useMemo(()=>{let k=Bj(d,c);return k==null?null:{location:{pathname:k,search:h,hash:p,state:f,key:m},navigationType:s}},[c,d,h,p,f,m,s]);return y==null?null:M.createElement(Yo.Provider,{value:u},M.createElement(wy.Provider,{children:r,value:y}))}function HB(t){let{children:e,location:r}=t;return zB(Vk(e),r)}new Promise(()=>{});function Vk(t,e){e===void 0&&(e=[]);let r=[];return M.Children.forEach(t,(n,s)=>{if(!M.isValidElement(n))return;let i=[...e,s];if(n.type===M.Fragment){r.push.apply(r,Vk(n.props.children,i));return}n.type!==ct&&ir(!1),!n.props.index||!n.props.children||ir(!1);let a={id:n.props.id||i.join("-"),caseSensitive:n.props.caseSensitive,element:n.props.element,Component:n.props.Component,index:n.props.index,path:n.props.path,loader:n.props.loader,action:n.props.action,errorElement:n.props.errorElement,ErrorBoundary:n.props.ErrorBoundary,hasErrorBoundary:n.props.ErrorBoundary!=null||n.props.errorElement!=null,shouldRevalidate:n.props.shouldRevalidate,handle:n.props.handle,lazy:n.props.lazy};n.props.children&&(a.children=Vk(n.props.children,i)),r.push(a)}),r}/**
59 * React Router DOM v6.30.1
60 *
61 * Copyright (c) Remix Software Inc.
62 *
63 * This source code is licensed under the MIT license found in the
64 * LICENSE.md file in the root directory of this source tree.
65 *
66 * @license MIT
67 */function Hk(){return Hk=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},Hk.apply(this,arguments)}function qB(t,e){if(t==null)return{};var r={},n=Object.keys(t),s,i;for(i=0;i<n.length;i++)s=n[i],!(e.indexOf(s)>=0)&&(r[s]=t[s]);return r}function KB(t){return!!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)}function GB(t,e){return t.button===0&&(!e||e==="_self")&&!KB(t)}function qk(t){return t===void 0&&(t=""),new URLSearchParams(typeof t=="string"||Array.isArray(t)||t instanceof URLSearchParams?t:Object.keys(t).reduce((e,r)=>{let n=t[r];return e.concat(Array.isArray(n)?n.map(s=>[r,s]):[[r,n]])},[]))}function ZB(t,e){let r=qk(t);return e&&e.forEach((n,s)=>
67{r.has(s)||e.getAll(s).forEach(i=>{r.append(s,i)})}),r}const YB=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],JB="6";try{window.__reactRouterVersion=JB}catch{}const XB="startTransition",y4=W9[XB];function QB(t){let{basename:e,children:r,future:n,window:s}=t,i=M.useRef();i.current==null&&(i.current=tB({window:s,v5Compat:!0}));let a=i.current,[l,c]=M.useState({action:a.action,location:a.location}),{v7_startTransition:u}=n||{},d=M.useCallback(h=>{u&&y4?y4(()=>c(h)):c(h)},[c,u]);return M.useLayoutEffect(()=>a.listen(d),[a,d]),M.useEffect(()=>WB(n),[n]),M.createElement(VB,{basename:e,children:r,location:l.location,navigationType:l.action,navigator:a,future:n})}const e$=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",t$=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,ze=M.forwardRef(function(e,r){let{onClick:n,relative:s,reloadDocument:i,replace:a,state:l,target:c,to:u,preventScrollReset:d,viewTransition:h}=e,p=qB(e,YB),{basename:f}=M.useContext(Yo),m,y=!1;if(typeof u=="string"&&t$.test(u)&&(m=u,e$))try{let w=new URL(window.location.href),b=u.startsWith("//")?new URL(w.protocol+u):new URL(u),v=Bj(b.pathname,f);b.origin===w.origin&&v!=null?u=v+b.search+b.hash:y=!0}catch{}let k=TB(u,{relative:s}),g=r$(u,{replace:a,state:l,target:c,preventScrollReset:d,relative:s,viewTransition:h});function x(w){n&&n(w),w.defaultPrevented||g(w)}return M.createElement("a",Hk({},p,{href:m||k,onClick:y||i?n:x,ref:r,target:c}))});var x4;(function(t){t.UseScrollRestoration="useScrollRestoration",t.UseSubmit="useSubmit",t.UseSubmitFetcher="useSubmitFetcher",t.UseFetcher="useFetcher",t.useViewTransitionState="useViewTransitionState"})(x4||(x4={}));var w4;(function(t){t.UseFetcher="useFetcher",t.UseFetchers="useFetchers",t.UseScrollRestoration="useScrollRestoration"})(w4||(w4={}));function r$(t,e){let{target:r,replace:n,state:s,preventScrollReset:i,relative:a,viewTransition:l}=e===void 0?{}:e,c=Vr(),u=Ss(),d=X_(t,{relative:a});return M.useCallback(h=>{if(GB(h,r)){h.preventDefault();let p=n!==void 0?n:D0(u)===D0(d);c(t,{replace:p,state:s,preventScrollReset:i,relative:a,viewTransition:l})}},[u,c,d,n,s,r,t,i,a,l])}function Ad(t){let e=M.useRef(qk(t)),r=M.useRef(!1),n=Ss(),s=M.useMemo(()=>ZB(n.search,r.current?null:e.current),[n.search]),i=Vr(),a=M.useCallback((l,c)=>{const u=qk(typeof l=="function"?l(s):l);r.current=!0,i("?"+u,c)},[i,s]);return[s,a]}var zd=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(){}},n$={setTimeout:(t,e)=>setTimeout(t,e),clearTimeout:t=>clearTimeout(t),setInterval:(t,e)=>setInterval(t,e),clearInterval:t=>clearInterval(t)},Ya,H2,jz,s$=(jz=class{constructor(){$e(this,Ya,n$);$e(this,H2,!1)}setTimeoutProvider(t){Pe(this,Ya,t)}setTimeout(t,e){return ie(this,Ya).setTimeout(t,e)}clearTimeout(t){ie(this,Ya).clearTimeout(t)}setInterval(t,e){return ie(this,Ya).setInterval(t,e)}clearInterval(t){ie(this,Ya).clearInterval(t)}},Ya=new WeakMap,H2=new WeakMap,jz),Cl=new s$;function i$(t){setTimeout(t,0)}var oc=typeof window>"u"||"Deno"in globalThis;function cn(){}function a$(t,e){return typeof t=="function"?t(e):t}function Kk(t){return typeof t=="number"&&t>=0&&t!==1/0}function rI(t,e){return Math.max(t+(e||0)-Date.now(),0)}function jo(t,e){return typeof t=="function"?t(e):t}function ds(t,e){return typeof t=="function"?t(e):t}function b4(t,e){const{type:r="all",exact:n,fetchStatus:s,predicate:i,queryKey:a,stale:l}=t;if(a){if(n){if(e.queryHash!==Vj(a,e.options))return!1}else if(!vp(e.queryKey,a))return!1}if(r!=="all"){const c=e.isActive();if(r==="active"&&!c||r==="inactive"&&c)return!1}return!(typeof l=="boolean"&&e.isStale()!==l||s&&s!==e.state.fetchStatus||i&&!i(e))}function k4(t,e){const{exact:r,status:n,predicate:s,mutationKey:i}=t;if(i){if(!e.options.mutationKey)return!1;if(r){if(lc(e.options.mutationKey)!==lc(i))return!1}else if(!vp(e.options.mutationKey,i))return!1}return!(n&&e.state.status!==n||s&&!s(e))}function Vj(t,e){return((e==null?void 0:e.queryKeyHashFn)||lc)(t)}function lc(t){return JSON.stringify(t,(e,r)=>Gk(r)?Object.keys(r).sort().reduce((n,s)=>(n[s]=r[s],n),{}):r)}function vp(t,e){return t===e?!0:typeof t!=typeof e?!1:t&&e&&typeof t=="object"&&typeof e=="object"?Object.keys(e).every(r=>vp(t[r],e[r])):!1}var o$=Object.prototype.hasOwnProperty;function nI(t,e){if(t===e)return t;const r=v4(t)&&v4(e);if(!r&&!(Gk(t)&&Gk(e)))return e;const s=(r?t:Object.keys(t)).length,i=r?e:Object.keys(e),a=i.length,l=r?new Array(a):{};let c=0;for(let u=0;u<a;u++){const d=r?u:i[u],h=t[d],p=e[d];if(h===p){l[d]=h,(r?u<s:o$.call(t,d))&&c++;continue}if(h===null||p===null||typeof h!="object"||typeof p!="object"){l[d]=p;continue}const f=nI(h,p);l[d]=f,f===h&&c++}return s===a&&c===s?t:l}function F0(t,e){if(!e||Object.keys(t).length!==Object.keys(e).length)return!1;for(const r in t)if(t[r]!==e[r])return!1;return!0}function v4(t){return Array.isArray(t)&&t.length===Object.keys(t).length}function Gk(t){if(!j4(t))return!1;const e=t.constructor;if(e===void 0)return!0;const r=e.prototype;return!(!j4(r)||!r.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(t)!==Object.prototype)}function j4(t){return Object.prototype.toString.call(t)==="[object Object]"}function l$(t){return new Promise(e=>{Cl.setTimeout(e,t)})}function Zk(t,e,r){return typeof r.structuralSharing=="function"?r.structuralSharing(t,e):r.structuralSharing!==!1?nI(t,e):e}function c$(t,e,r=0){const n=[...t,e];return r&&n.length>r?n.slice(1):n}function u$(t,e,r=0){const n=[e,...t];return r&&n.length>r?n.slice(0,-1):n}var Hj=Symbol();function sI(t,e){return!t.queryFn&&(e!=null&&e.initialPromise)?()=>e.initialPromise:!t.queryFn||t.queryFn===Hj?()=>Promise.reject(new Error(`Missing queryFn: '${t.queryHash}'`)):t.queryFn}function iI(t,e){return typeof t=="function"?t(...e):!!t}var Ml,Ja,Au,Sz,d$=(Sz=class extends zd{constructor(){super();$e(this,Ml);$e(this,Ja);$e(this,Au);Pe(this,Au,e=>{if(!oc&&window.addEventListener){const r=()=>e();return window.addEventListener("visibilitychange",r,!1),()=>{window.removeEventListener("visibilitychange",r)}}})}onSubscribe(){ie(this,Ja)||this.setEventListener(ie(this,Au))}onUnsubscribe(){var e;this.hasListeners()||((e=ie(this,Ja))==null||e.call(this),Pe(this,Ja,void 0))}setEventListener(e){var r;Pe(this,Au,e),(r=ie(this,Ja))==null||r.call(this),Pe(this,Ja,e(n=>{typeof n=="boolean"?this.setFocused(n):this.onFocus()}))}setFocused(e){ie(this,Ml)!==e&&(Pe(this,Ml,e),this.onFocus())}onFocus(){const e=this.isFocused();
vendor: 3,532 bytes, line 67
67this.listeners.forEach(r=>{r(e)})}isFocused(){var e;return typeof ie(this,Ml)=="boolean"?ie(this,Ml):((e=globalThis.document)==null?void 0:e.visibilityState)!=="hidden"}},Ml=new WeakMap,Ja=new WeakMap,Au=new WeakMap,Sz),qj=new d$;function Yk(){let t,e;const r=new Promise((s,i)=>{t=s,e=i});r.status="pending",r.catch(()=>{});function n(s){Object.assign(r,s),delete r.resolve,delete r.reject}return r.resolve=s=>{n({status:"fulfilled",value:s}),t(s)},r.reject=s=>{n({status:"rejected",reason:s}),e(s)},r}var h$=i$;function p$(){let t=[],e=0,r=l=>{l()},n=l=>{l()},s=h$;const i=l=>{e?t.push(l):s(()=>{r(l)})},a=()=>{const l=t;t=[],l.length&&s(()=>{n(()=>{l.forEach(c=>{r(c)})})})};return{batch:l=>{let c;e++;try{c=l()}finally{e--,e||a()}return c},batchCalls:l=>(...c)=>{i(()=>{l(...c)})},schedule:i,setNotifyFunction:l=>{r=l},setBatchNotifyFunction:l=>{n=l},setScheduler:l=>{s=l}}}var vr=p$(),zu,Xa,Pu,Nz,f$=(Nz=class extends zd{constructor(){super();$e(this,zu,!0);$e(this,Xa);$e(this,Pu);Pe(this,Pu,e=>{if(!oc&&window.addEventListener){const r=()=>e(!0),n=()=>e(!1);return window.addEventListener("online",r,!1),window.addEventListener("offline",n,!1),()=>{window.removeEventListener("online",r),window.removeEventListener("offline",n)}}})}onSubscribe(){ie(this,Xa)||this.setEventListener(ie(this,Pu))}onUnsubscribe(){var e;this.hasListeners()||((e=ie(this,Xa))==null||e.call(this),Pe(this,Xa,void 0))}setEventListener(e){var r;Pe(this,Pu,e),(r=ie(this,Xa))==null||r.call(this),Pe(this,Xa,e(this.setOnline.bind(this)))}setOnline(e){ie(this,zu)!==e&&(Pe(this,zu,e),this.listeners.forEach(n=>{n(e)}))}isOnline(){return ie(this,zu)}},zu=new WeakMap,Xa=new WeakMap,Pu=new WeakMap,Nz),B0=new f$;function m$(t){return Math.min(1e3*2**t,3e4)}function aI(t){return(t??"online")==="online"?B0.isOnline():!0}var Jk=class extends Error{constructor(t){super("CancelledError"),this.revert=t==null?void 0:t.revert,this.silent=t==null?void 0:t.silent}};function oI(t){let e=!1,r=0,n;const s=Yk(),i=()=>s.status!=="pending",a=y=>{var k;if(!i()){const g=new Jk(y);p(g),(k=t.onCancel)==null||k.call(t,g)}},l=()=>{e=!0},c=()=>{e=!1},u=()=>qj.isFocused()&&(t.networkMode==="always"||B0.isOnline())&&t.canRun(),d=()=>aI(t.networkMode)&&t.canRun(),h=y=>{i()||(n==null||n(),s.resolve(y))},p=y=>{i()||(n==null||n(),s.reject(y))},f=()=>new Promise(y=>{var k;n=g=>{(i()||u())&&y(g)},(k=t.onPause)==null||k.call(t)}).then(()=>{var y;n=void 0,i()||(y=t.onContinue)==null||y.call(t)}),m=()=>{if(i())return;let y;const k=r===0?t.initialPromise:void 0;try{y=k??t.fn()}catch(g){y=Promise.reject(g)}Promise.resolve(y).then(h).catch(g=>{var A;if(i())return;const x=t.retry??(oc?0:3),w=t.retryDelay??m$,b=typeof w=="function"?w(r,g):w,v=x===!0||typeof x=="number"&&r<x||typeof x=="function"&&x(r,g);if(e||!v){p(g);return}r++,(A=t.onFail)==null||A.call(t,r,g),l$(b).then(()=>u()?void 0:f()).then(()=>{e?p(g):m()})})};return{promise:s,status:()=>s.status,cancel:a,continue:()=>(n==null||n(),s),cancelRetry:l,continueRetry:c,canStart:d,start:()=>(d()?m():f().then(m),s)}}var Dl,Cz,lI=(Cz=class{constructor(){$e(this,Dl)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Kk(this.gcTime)&&Pe(this,Dl,Cl.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(t){this.gcTime=Math.max(this.gcTime||0,t??(oc?1/0:5*60*1e3))}clearGcTimeout(){ie(this,Dl)&&(Cl.clearTimeout(ie(this,Dl)),Pe(this,Dl,void 0))}},Dl=new WeakMap,Cz),Fl,_u,cs,Bl,Ar,Jp,$l,Ps,Ui,Ez,g$=(Ez=class extends lI{constructor(e){super();$e(this,Ps);$e(this,Fl);$e(this,_u);$e(this,cs);
67$e(this,Bl);$e(this,Ar);$e(this,Jp);$e(this,$l);Pe(this,$l,!1),Pe(this,Jp,e.defaultOptions),this.setOptions(e.options),this.observers=[],Pe(this,Bl,e.client),Pe(this,cs,ie(this,Bl).getQueryCache()),this.queryKey=e.queryKey,this.queryHash=e.queryHash,Pe(this,Fl,S4(this.options)),this.state=e.state??ie(this,Fl),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var e;return(e=ie(this,Ar))==null?void 0:e.promise}setOptions(e){if(this.options={...ie(this,Jp),...e},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const r=S4(this.options);r.data!==void 0&&(this.setData(r.data,{updatedAt:r.dataUpdatedAt,manual:!0}),Pe(this,Fl,r))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&ie(this,cs).remove(this)}setData(e,r){const n=Zk(this.state.data,e,this.options);return et(this,Ps,Ui).call(this,{data:n,type:"success",dataUpdatedAt:r==null?void 0:r.updatedAt,manual:r==null?void 0:r.manual}),n}setState(e,r){et(this,Ps,Ui).call(this,{type:"setState",state:e,setStateOptions:r})}cancel(e){var n,s;const r=(n=ie(this,Ar))==null?void 0:n.promise;return(s=ie(this,Ar))==null||s.cancel(e),r?r.then(cn).catch(cn):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(ie(this,Fl))}isActive(){return this.observers.some(e=>ds(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Hj||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(e=>jo(e.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(e=0){return this.state.data===void 0?!0:e==="static"?!1:this.state.isInvalidated?!0:!rI(this.state.dataUpdatedAt,e)}onFocus(){var r;const e=this.observers.find(n=>n.shouldFetchOnWindowFocus());e==null||e.refetch({cancelRefetch:!1}),(r=ie(this,Ar))==null||r.continue()}onOnline(){var r;const e=this.observers.find(n=>n.shouldFetchOnReconnect());e==null||e.refetch({cancelRefetch:!1}),(r=ie(this,Ar))==null||r.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),ie(this,cs).notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(r=>r!==e),this.observers.length||(ie(this,Ar)&&(ie(this,$l)?ie(this,Ar).cancel({revert:!0}):ie(this,Ar).cancelRetry()),this.scheduleGc()),ie(this,cs).notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||et(this,Ps,Ui).call(this,{type:"invalidate"})}async fetch(e,r){var c,u,d,h,p,f,m,y,k,g,x,w;if(this.state.fetchStatus!=="idle"&&((c=ie(this,Ar))==null?void 0:c.status())!=="rejected"){if(this.state.data!==void 0&&(r!=null&&r.cancelRefetch))this.cancel({silent:!0});else if(ie(this,Ar))return ie(this,Ar).continueRetry(),ie(this,Ar).promise}if(e&&this.setOptions(e),!this.options.queryFn){const b=this.observers.find(v=>v.options.queryFn);b&&this.setOptions(b.options)}const n=new AbortController,s=b=>{Object.defineProperty(b,"signal",{enumerable:!0,get:()=>(Pe(this,$l,!0),n.signal)})},i=()=>{const b=sI(this.options,r),A=(()=>{const C={client:ie(this,Bl),queryKey:this.queryKey,meta:this.meta};return s(C),C})();return Pe(this,$l,!1),this.options.persister?this.options.persister(b,A,this):b(A)},l=(()=>{const b={fetchOptions:r,options:this.options,queryKey:this.queryKey,client:ie(this,Bl),state:this.state,fetchFn:i};return s(b),b})();(u=this.options.behavior)==null||u.onFetch(l,this),Pe(this,_u,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((d=l.fetchOptions)==null?void 0:d.meta))&&et(this,Ps,Ui).call(this,{type:"fetch",meta:(h=l.fetchOptions)==null?void 0:h.meta}),Pe(this,Ar,oI({initialPromise:r==null?void 0:r.initialPromise,fn:l.fetchFn,onCancel:b=>{b instanceof Jk&&b.revert&&this.setState({...ie(this,_u),fetchStatus:"idle"}),n.abort()},onFail:(b,v)=>{et(this,Ps,Ui).call(this,{type:"failed",failureCount:b,error:v})},onPause:()=>{et(this,Ps,Ui).call(this,{type:"pause"})},onContinue:()=>{et(this,Ps,Ui).call(this,{type:"continue"})},retry:l.options.retry,retryDelay:l.options.retryDelay,networkMode:l.options.networkMode,canRun:()=>!0}));try{const b=await ie(this,Ar).start();if(b===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(b),(f=(p=ie(this,cs).config).onSuccess)==null||f.call(p,b,this),(y=(m=ie(this,cs).config).onSettled)==null||y.call(m,b,this.state.error,this),b}catch(b){if(b instanceof Jk){if(b.silent)return ie(this,Ar).promise;if(b.revert){if(this.state.data===void 0)throw b;return this.state.data}}throw et(this,Ps,Ui).call(this,{type:"error",error:b}),(g=(k=ie(this,cs).config).onError)==null||g.call(k,b,this),(w=(x=ie(this,cs).config).onSettled)==null||w.call(x,this.state.data,b,this),b}finally{this.scheduleGc()}}},Fl=new WeakMap,_u=new WeakMap,cs=new WeakMap,Bl=new WeakMap,Ar=new WeakMap,Jp=new WeakMap,$l=new WeakMap,Ps=new WeakSet,Ui=function(e){const r=n=>{switch(e.type){case"failed":return{...n,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...n,fetchStatus:"paused"};case"continue":return{...n,fetchStatus:"fetching"};case"fetch":return{...n,...cI(n.data,this.options),fetchMeta:e.meta??null};case"success":const s={...n,data:e.data,dataUpdateCount:n.dataUpdateCount+1,dataUpdatedAt:e.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return Pe(this,_u,e.manual?s:void 0),s;case"error":const i=e.error;
vendor: 13,874 bytes, line 67
67return{...n,error:i,errorUpdateCount:n.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:n.fetchFailureCount+1,fetchFailureReason:i,fetchStatus:"idle",status:"error"};case"invalidate":return{...n,isInvalidated:!0};case"setState":return{...n,...e.state}}};this.state=r(this.state),vr.batch(()=>{this.observers.forEach(n=>{n.onQueryUpdate()}),ie(this,cs).notify({query:this,type:"updated",action:e})})},Ez);function cI(t,e){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:aI(e.networkMode)?"fetching":"paused",...t===void 0&&{error:null,status:"pending"}}}function S4(t){const e=typeof t.initialData=="function"?t.initialData():t.initialData,r=e!==void 0,n=r?typeof t.initialDataUpdatedAt=="function"?t.initialDataUpdatedAt():t.initialDataUpdatedAt:0;return{data:e,dataUpdateCount:0,dataUpdatedAt:r?n??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:r?"success":"pending",fetchStatus:"idle"}}var Sn,at,Xp,sn,Ul,Iu,Gi,Qa,Qp,Ou,Ru,Wl,Vl,eo,Lu,xt,bh,Xk,Qk,ev,tv,rv,nv,sv,uI,Tz,y$=(Tz=class extends zd{constructor(e,r){super();$e(this,xt);$e(this,Sn);$e(this,at);$e(this,Xp);$e(this,sn);$e(this,Ul);$e(this,Iu);$e(this,Gi);$e(this,Qa);$e(this,Qp);$e(this,Ou);$e(this,Ru);$e(this,Wl);$e(this,Vl);$e(this,eo);$e(this,Lu,new Set);this.options=r,Pe(this,Sn,e),Pe(this,Qa,null),Pe(this,Gi,Yk()),this.bindMethods(),this.setOptions(r)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(ie(this,at).addObserver(this),N4(ie(this,at),this.options)?et(this,xt,bh).call(this):this.updateResult(),et(this,xt,tv).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return iv(ie(this,at),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return iv(ie(this,at),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,et(this,xt,rv).call(this),et(this,xt,nv).call(this),ie(this,at).removeObserver(this)}setOptions(e){const r=this.options,n=ie(this,at);if(this.options=ie(this,Sn).defaultQueryOptions(e),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof ds(this.options.enabled,ie(this,at))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");et(this,xt,sv).call(this),ie(this,at).setOptions(this.options),r._defaulted&&!F0(this.options,r)&&ie(this,Sn).getQueryCache().notify({type:"observerOptionsUpdated",query:ie(this,at),observer:this});const s=this.hasListeners();s&&C4(ie(this,at),n,this.options,r)&&et(this,xt,bh).call(this),this.updateResult(),s&&(ie(this,at)!==n||ds(this.options.enabled,ie(this,at))!==ds(r.enabled,ie(this,at))||jo(this.options.staleTime,ie(this,at))!==jo(r.staleTime,ie(this,at)))&&et(this,xt,Xk).call(this);const i=et(this,xt,Qk).call(this);s&&(ie(this,at)!==n||ds(this.options.enabled,ie(this,at))!==ds(r.enabled,ie(this,at))||i!==ie(this,eo))&&et(this,xt,ev).call(this,i)}getOptimisticResult(e){const r=ie(this,Sn).getQueryCache().build(ie(this,Sn),e),n=this.createResult(r,e);return w$(this,n)&&(Pe(this,sn,n),Pe(this,Iu,this.options),Pe(this,Ul,ie(this,at).state)),n}getCurrentResult(){return ie(this,sn)}trackResult(e,r){return new Proxy(e,{get:(n,s)=>(this.trackProp(s),r==null||r(s),s==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&ie(this,Gi).status==="pending"&&ie(this,Gi).reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(n,s))})}trackProp(e){ie(this,Lu).add(e)}getCurrentQuery(){return ie(this,at)}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){const r=ie(this,Sn).defaultQueryOptions(e),n=ie(this,Sn).getQueryCache().build(ie(this,Sn),r);return n.fetch().then(()=>this.createResult(n,r))}fetch(e){return et(this,xt,bh).call(this,{...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),ie(this,sn)))}createResult(e,r){var N;const n=ie(this,at),s=this.options,i=ie(this,sn),a=ie(this,Ul),l=ie(this,Iu),u=e!==n?e.state:ie(this,Xp),{state:d}=e;let h={...d},p=!1,f;if(r._optimisticResults){const W=this.hasListeners(),K=!W&&N4(e,r),T=W&&C4(e,n,r,s);(K||T)&&(h={...h,...cI(d.data,e.options)}),r._optimisticResults==="isRestoring"&&(h.fetchStatus="idle")}let{error:m,errorUpdatedAt:y,status:k}=h;f=h.data;let g=!1;if(r.placeholderData!==void 0&&f===void 0&&k==="pending"){let W;i!=null&&i.isPlaceholderData&&r.placeholderData===(l==null?void 0:l.placeholderData)?(W=i.data,g=!0):W=typeof r.placeholderData=="function"?r.placeholderData((N=ie(this,Ru))==null?void 0:N.state.data,ie(this,Ru)):r.placeholderData,W!==void 0&&(k="success",f=Zk(i==null?void 0:i.data,W,r),p=!0)}if(r.select&&f!==void 0&&!g)if(i&&f===(a==null?void 0:a.data)&&r.select===ie(this,Qp))f=ie(this,Ou);else try{Pe(this,Qp,r.select),f=r.select(f),f=Zk(i==null?void 0:i.data,f,r),Pe(this,Ou,f),Pe(this,Qa,null)}catch(W){Pe(this,Qa,W)}ie(this,Qa)&&(m=ie(this,Qa),f=ie(this,Ou),y=Date.now(),k="error");const x=h.fetchStatus==="fetching",w=k==="pending",b=k==="error",v=w&&x,A=f!==void 0,_={status:k,fetchStatus:h.fetchStatus,isPending:w,isSuccess:k==="success",isError:b,isInitialLoading:v,isLoading:v,data:f,dataUpdatedAt:h.dataUpdatedAt,error:m,errorUpdatedAt:y,failureCount:h.fetchFailureCount,failureReason:h.fetchFailureReason,errorUpdateCount:h.errorUpdateCount,isFetched:h.dataUpdateCount>0||h.errorUpdateCount>0,isFetchedAfterMount:h.dataUpdateCount>u.dataUpdateCount||h.errorUpdateCount>u.errorUpdateCount,isFetching:x,isRefetching:x&&!w,isLoadingError:b&&!A,isPaused:h.fetchStatus==="paused",isPlaceholderData:p,isRefetchError:b&&A,isStale:Kj(e,r),refetch:this.refetch,promise:ie(this,Gi),isEnabled:ds(r.enabled,e)!==!1};if(this.options.experimental_prefetchInRender){const W=F=>{_.status==="error"?F.reject(_.error):_.data!==void 0&&F.resolve(_.data)},K=()=>{const F=Pe(this,Gi,_.promise=Yk());W(F)},T=ie(this,Gi);switch(T.status){case"pending":e.queryHash===n.queryHash&&W(T);break;case"fulfilled":(_.status==="error"||_.data!==T.value)&&K();break;case"rejected":(_.status!=="error"||_.error!==T.reason)&&K();break}}return _}updateResult(){const e=ie(this,sn),r=this.createResult(ie(this,at),this.options);if(Pe(this,Ul,ie(this,at).state),Pe(this,Iu,this.options),ie(this,Ul).data!==void 0&&Pe(this,Ru,ie(this,at)),F0(r,e))return;Pe(this,sn,r);const n=()=>{if(!e)return!0;const{notifyOnChangeProps:s}=this.options,i=typeof s=="function"?s():s;if(i==="all"||!i&&!ie(this,Lu).size)return!0;const a=new Set(i??ie(this,Lu));return this.options.throwOnError&&a.add("error"),Object.keys(ie(this,sn)).some(l=>{const c=l;return ie(this,sn)[c]!==e[c]&&a.has(c)})};et(this,xt,uI).call(this,{listeners:n()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&et(this,xt,tv).call(this)}},Sn=new WeakMap,at=new WeakMap,Xp=new WeakMap,sn=new WeakMap,Ul=new WeakMap,Iu=new WeakMap,Gi=new WeakMap,Qa=new WeakMap,Qp=new WeakMap,Ou=new WeakMap,Ru=new WeakMap,Wl=new WeakMap,Vl=new WeakMap,eo=new WeakMap,Lu=new WeakMap,xt=new WeakSet,bh=function(e){et(this,xt,sv).call(this);let r=ie(this,at).fetch(this.options,e);return e!=null&&e.throwOnError||(r=r.catch(cn)),r},Xk=function(){et(this,xt,rv).call(this);const e=jo(this.options.staleTime,ie(this,at));if(oc||ie(this,sn).isStale||!Kk(e))return;const n=rI(ie(this,sn).dataUpdatedAt,e)+1;Pe(this,Wl,Cl.setTimeout(()=>{ie(this,sn).isStale||this.updateResult()},n))},Qk=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(ie(this,at)):this.options.refetchInterval)??!1},ev=function(e){et(this,xt,nv).call(this),Pe(this,eo,e),!(oc||ds(this.options.enabled,ie(this,at))===!1||!Kk(ie(this,eo))||ie(this,eo)===0)&&Pe(this,Vl,Cl.setInterval(()=>{(this.options.refetchIntervalInBackground||qj.isFocused())&&et(this,xt,bh).call(this)},ie(this,eo)))},tv=function(){et(this,xt,Xk).call(this),et(this,xt,ev).call(this,et(this,xt,Qk).call(this))},rv=function(){ie(this,Wl)&&(Cl.clearTimeout(ie(this,Wl)),Pe(this,Wl,void 0))},nv=function(){ie(this,Vl)&&(Cl.clearInterval(ie(this,Vl)),Pe(this,Vl,void 0))},sv=function(){const e=ie(this,Sn).getQueryCache().build(ie(this,Sn),this.options);if(e===ie(this,at))return;const r=ie(this,at);Pe(this,at,e),Pe(this,Xp,e.state),this.hasListeners()&&(r==null||r.removeObserver(this),e.addObserver(this))},uI=function(e){vr.batch(()=>{e.listeners&&this.listeners.forEach(r=>{r(ie(this,sn))}),ie(this,Sn).getQueryCache().notify({query:ie(this,at),type:"observerResultsUpdated"})})},Tz);function x$(t,e){return ds(e.enabled,t)!==!1&&t.state.data===void 0&&!(t.state.status==="error"&&e.retryOnMount===!1)}function N4(t,e){return x$(t,e)||t.state.data!==void 0&&iv(t,e,e.refetchOnMount)}function iv(t,e,r){if(ds(e.enabled,t)!==!1&&jo(e.staleTime,t)!=="static"){const n=typeof r=="function"?r(t):r;return n==="always"||n!==!1&&Kj(t,e)}return!1}function C4(t,e,r,n){return(t!==e||ds(n.enabled,t)===!1)&&(!r.suspense||t.state.status!=="error")&&Kj(t,r)}function Kj(t,e){return ds(e.enabled,t)!==!1&&t.isStaleByTime(jo(e.staleTime,t))}function w$(t,e){return!F0(t.getCurrentResult(),e)}function E4(t){return{onFetch:(e,r)=>{var d,h,p,f,m;const n=e.options,s=(p=(h=(d=e.fetchOptions)==null?void 0:d.meta)==null?void 0:h.fetchMore)==null?void 0:p.direction,i=((f=e.state.data)==null?void 0:f.pages)||[],a=((m=e.state.data)==null?void 0:m.pageParams)||[];let l={pages:[],pageParams:[]},c=0;const u=async()=>{let y=!1;const k=w=>{Object.defineProperty(w,"signal",{enumerable:!0,get:()=>(e.signal.aborted?y=!0:e.signal.addEventListener("abort",()=>{y=!0}),e.signal)})},g=sI(e.options,e.fetchOptions),x=async(w,b,v)=>{if(y)return Promise.reject();if(b==null&&w.pages.length)return Promise.resolve(w);const C=(()=>{const K={client:e.client,queryKey:e.queryKey,pageParam:b,direction:v?"backward":"forward",meta:e.options.meta};return k(K),K})(),_=await g(C),{maxPages:N}=e.options,W=v?u$:c$;return{pages:W(w.pages,_,N),pageParams:W(w.pageParams,b,N)}};if(s&&i.length){const w=s==="backward",b=w?b$:T4,v={pages:i,pageParams:a},A=b(n,v);l=await x(v,A,w)}else{const w=t??i.length;do{const b=c===0?a[0]??n.initialPageParam:T4(n,l);if(c>0&&b==null)break;l=await x(l,b),c++}while(c<w)}return l};e.options.persister?e.fetchFn=()=>{var y,k;return(k=(y=e.options).persister)==null?void 0:k.call(y,u,{client:e.client,queryKey:e.queryKey,meta:e.options.meta,signal:e.signal},r)}:e.fetchFn=u}}}function T4(t,{pages:e,pageParams:r}){const n=e.length-1;return e.length>0?t.getNextPageParam(e[n],e,r[n],r):void 0}function b$(t,{pages:e,pageParams:r}){var n;return e.length>0?(n=t.getPreviousPageParam)==null?void 0:n.call(t,e[0],e,r[0],r):void 0}var ef,hi,an,Hl,pi,_a,Az,k$=(Az=class extends lI{constructor(e){super();$e(this,pi);$e(this,ef);$e(this,hi);$e(this,an);$e(this,Hl);Pe(this,ef,e.client),this.mutationId=e.mutationId,Pe(this,an,e.mutationCache),Pe(this,hi,[]),this.state=e.state||dI(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){ie(this,hi).includes(e)||(ie(this,hi).push(e),this.clearGcTimeout(),ie(this,an).notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){Pe(this,hi,ie(this,hi).filter(r=>r!==e)),this.scheduleGc(),ie(this,an).notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){ie(this,hi).length||(this.state.status==="pending"?this.scheduleGc():ie(this,an).remove(this))}continue(){var e;return((e=ie(this,Hl))==null?void 0:e.continue())??this.execute(this.state.variables)}async execute(e){var a,l,c,u,d,h,p,f,m,y,k,g,x,w,b,v,A,C,_,N;const r=()=>{et(this,pi,_a).call(this,{type:"continue"})},n={client:ie(this,ef),meta:this.options.meta,mutationKey:this.options.mutationKey};Pe(this,Hl,oI({fn:()=>this.options.mutationFn?this.options.mutationFn(e,n):Promise.reject(new Error("No mutationFn found")),onFail:(W,K)=>{et(this,pi,_a).call(this,{type:"failed",failureCount:W,error:K})},onPause:()=>{et(this,pi,_a).call(this,{type:"pause"})},onContinue:r,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>ie(this,an).canRun(this)}));const s=this.state.status==="pending",i=!ie(this,Hl).canStart();try{if(s)r();else{et(this,pi,_a).call(this,{type:"pending",variables:e,isPaused:i}),await((l=(a=ie(this,an).config).onMutate)==null?void 0:l.call(a,e,this,n));const K=await((u=(c=this.options).onMutate)==null?void 0:u.call(c,e,n));K!==this.state.context&&et(this,pi,_a).call(this,{type:"pending",context:K,variables:e,isPaused:i})}const W=await ie(this,Hl).start();return await((h=(d=ie(this,an).config).onSuccess)==null?void 0:h.call(d,W,e,this.state.context,this,n)),await((f=(p=this.options).onSuccess)==null?void 0:f.call(p,W,e,this.state.context,n)),await((y=(m=ie(this,an).config).onSettled)==null?void 0:y.call(m,W,null,this.state.variables,this.state.context,this,n)),await((g=(k=this.options).onSettled)==null?void 0:g.call(k,W,null,e,this.state.context,n)),et(this,pi,_a).call(this,{type:"success",data:W}),W}catch(W){try{throw await((w=(x=ie(this,an).config).onError)==null?void 0:w.call(x,W,e,this.state.context,this,n)),await((v=(b=this.options).onError)==null?void 0:v.call(b,W,e,this.state.context,n)),await((C=(A=ie(this,an).config).onSettled)==null?void 0:C.call(A,void 0,W,this.state.variables,this.state.context,this,n)),await((N=(_=this.options).onSettled)==null?void 0:N.call(_,void 0,W,e,this.state.context,n)),W}finally{et(this,pi,_a).call(this,{type:"error",error:W})}}finally{ie(this,an).runNext(this)}}},ef=new WeakMap,hi=new WeakMap,an=new WeakMap,Hl=new WeakMap,pi=new WeakSet,_a=function(e){const r=n=>{switch(e.type){case"failed":return{...n,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...n,isPaused:!0};case"continue":return{...n,isPaused:!1};
67case"pending":return{...n,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:"pending",variables:e.variables,submittedAt:Date.now()};case"success":return{...n,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...n,data:void 0,error:e.error,failureCount:n.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}};this.state=r(this.state),vr.batch(()=>{ie(this,hi).forEach(n=>{n.onMutationUpdate(e)}),ie(this,an).notify({mutation:this,type:"updated",action:e})})},Az);function dI(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Zi,_s,tf,zz,v$=(zz=class extends zd{constructor(e={}){super();$e(this,Zi);$e(this,_s);$e(this,tf);this.config=e,Pe(this,Zi,new Set),Pe(this,_s,new Map),Pe(this,tf,0)}build(e,r,n){const s=new k$({client:e,mutationCache:this,mutationId:++Lf(this,tf)._,options:e.defaultMutationOptions(r),state:n});return this.add(s),s}add(e){ie(this,Zi).add(e);const r=em(e);if(typeof r=="string"){const n=ie(this,_s).get(r);n?n.push(e):ie(this,_s).set(r,[e])}this.notify({type:"added",mutation:e})}remove(e){if(ie(this,Zi).delete(e)){const r=em(e);if(typeof r=="string"){const n=ie(this,_s).get(r);if(n)if(n.length>1){const s=n.indexOf(e);s!==-1&&n.splice(s,1)}else n[0]===e&&ie(this,_s).delete(r)}}this.notify({type:"removed",mutation:e})}canRun(e){const r=em(e);if(typeof r=="string"){const n=ie(this,_s).get(r),s=n==null?void 0:n.find(i=>i.state.status==="pending");return!s||s===e}else return!0}runNext(e){var n;const r=em(e);if(typeof r=="string"){const s=(n=ie(this,_s).get(r))==null?void 0:n.find(i=>i!==e&&i.state.isPaused);return(s==null?void 0:s.continue())??Promise.resolve()}else return Promise.resolve()}clear(){vr.batch(()=>{ie(this,Zi).forEach(e=>{this.notify({type:"removed",mutation:e})}),ie(this,Zi).clear(),ie(this,_s).clear()})}getAll(){return Array.from(ie(this,Zi))}find(e){const r={exact:!0,...e};return this.getAll().find(n=>k4(r,n))}findAll(e={}){return this.getAll().filter(r=>k4(e,r))}notify(e){vr.batch(()=>{this.listeners.forEach(r=>{r(e)})})}resumePausedMutations(){const e=this.getAll().filter(r=>
vendor: 9,532 bytes, line 67
67r.state.isPaused);return vr.batch(()=>Promise.all(e.map(r=>r.continue().catch(cn))))}},Zi=new WeakMap,_s=new WeakMap,tf=new WeakMap,zz);function em(t){var e;return(e=t.options.scope)==null?void 0:e.id}var Yi,to,Nn,Ji,ca,Ym,av,Pz,j$=(Pz=class extends zd{constructor(r,n){super();$e(this,ca);$e(this,Yi);$e(this,to);$e(this,Nn);$e(this,Ji);Pe(this,Yi,r),this.setOptions(n),this.bindMethods(),et(this,ca,Ym).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(r){var s;const n=this.options;this.options=ie(this,Yi).defaultMutationOptions(r),F0(this.options,n)||ie(this,Yi).getMutationCache().notify({type:"observerOptionsUpdated",mutation:ie(this,Nn),observer:this}),n!=null&&n.mutationKey&&this.options.mutationKey&&lc(n.mutationKey)!==lc(this.options.mutationKey)?this.reset():((s=ie(this,Nn))==null?void 0:s.state.status)==="pending"&&ie(this,Nn).setOptions(this.options)}onUnsubscribe(){var r;this.hasListeners()||(r=ie(this,Nn))==null||r.removeObserver(this)}onMutationUpdate(r){et(this,ca,Ym).call(this),et(this,ca,av).call(this,r)}getCurrentResult(){return ie(this,to)}reset(){var r;(r=ie(this,Nn))==null||r.removeObserver(this),Pe(this,Nn,void 0),et(this,ca,Ym).call(this),et(this,ca,av).call(this)}mutate(r,n){var s;return Pe(this,Ji,n),(s=ie(this,Nn))==null||s.removeObserver(this),Pe(this,Nn,ie(this,Yi).getMutationCache().build(ie(this,Yi),this.options)),ie(this,Nn).addObserver(this),ie(this,Nn).execute(r)}},Yi=new WeakMap,to=new WeakMap,Nn=new WeakMap,Ji=new WeakMap,ca=new WeakSet,Ym=function(){var n;const r=((n=ie(this,Nn))==null?void 0:n.state)??dI();Pe(this,to,{...r,isPending:r.status==="pending",isSuccess:r.status==="success",isError:r.status==="error",isIdle:r.status==="idle",mutate:this.mutate,reset:this.reset})},av=function(r){vr.batch(()=>{var n,s,i,a,l,c,u,d;if(ie(this,Ji)&&this.hasListeners()){const h=ie(this,to).variables,p=ie(this,to).context,f={client:ie(this,Yi),meta:this.options.meta,mutationKey:this.options.mutationKey};(r==null?void 0:r.type)==="success"?((s=(n=ie(this,Ji)).onSuccess)==null||s.call(n,r.data,h,p,f),(a=(i=ie(this,Ji)).onSettled)==null||a.call(i,r.data,null,h,p,f)):(r==null?void 0:r.type)==="error"&&((c=(l=ie(this,Ji)).onError)==null||c.call(l,r.error,h,p,f),(d=(u=ie(this,Ji)).onSettled)==null||d.call(u,void 0,r.error,h,p,f))}this.listeners.forEach(h=>{h(ie(this,to))})})},Pz),fi,_z,S$=(_z=class extends zd{constructor(e={}){super();$e(this,fi);this.config=e,Pe(this,fi,new Map)}build(e,r,n){const s=r.queryKey,i=r.queryHash??Vj(s,r);let a=this.get(i);return a||(a=new g$({client:e,queryKey:s,queryHash:i,options:e.defaultQueryOptions(r),state:n,defaultOptions:e.getQueryDefaults(s)}),this.add(a)),a}add(e){ie(this,fi).has(e.queryHash)||(ie(this,fi).set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){const r=ie(this,fi).get(e.queryHash);r&&(e.destroy(),r===e&&ie(this,fi).delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){vr.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return ie(this,fi).get(e)}getAll(){return[...ie(this,fi).values()]}find(e){const r={exact:!0,...e};return this.getAll().find(n=>b4(r,n))}findAll(e={}){const r=this.getAll();return Object.keys(e).length>0?r.filter(n=>b4(e,n)):r}notify(e){vr.batch(()=>{this.listeners.forEach(r=>{r(e)})})}onFocus(){vr.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){vr.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},fi=new WeakMap,_z),qt,ro,no,Mu,Du,so,Fu,Bu,Iz,N$=(Iz=class{constructor(t={}){$e(this,qt);$e(this,ro);$e(this,no);$e(this,Mu);$e(this,Du);$e(this,so);$e(this,Fu);$e(this,Bu);Pe(this,qt,t.queryCache||new S$),Pe(this,ro,t.mutationCache||new v$),Pe(this,no,t.defaultOptions||{}),Pe(this,Mu,new Map),Pe(this,Du,new Map),Pe(this,so,0)}mount(){Lf(this,so)._++,ie(this,so)===1&&(Pe(this,Fu,qj.subscribe(async t=>{t&&(await this.resumePausedMutations(),ie(this,qt).onFocus())})),Pe(this,Bu,B0.subscribe(async t=>{t&&(await this.resumePausedMutations(),ie(this,qt).onOnline())})))}unmount(){var t,e;Lf(this,so)._--,ie(this,so)===0&&((t=ie(this,Fu))==null||t.call(this),Pe(this,Fu,void 0),(e=ie(this,Bu))==null||e.call(this),Pe(this,Bu,void 0))}isFetching(t){return ie(this,qt).findAll({...t,fetchStatus:"fetching"}).length}isMutating(t){return ie(this,ro).findAll({...t,status:"pending"}).length}getQueryData(t){var r;const e=this.defaultQueryOptions({queryKey:t});return(r=ie(this,qt).get(e.queryHash))==null?void 0:r.state.data}ensureQueryData(t){const e=this.defaultQueryOptions(t),r=ie(this,qt).build(this,e),n=r.state.data;return n===void 0?this.fetchQuery(t):(t.revalidateIfStale&&r.isStaleByTime(jo(e.staleTime,r))&&this.prefetchQuery(e),Promise.resolve(n))}getQueriesData(t){return ie(this,qt).findAll(t).map(({queryKey:e,state:r})=>{const n=r.data;return[e,n]})}setQueryData(t,e,r){const n=this.defaultQueryOptions({queryKey:t}),s=ie(this,qt).get(n.queryHash),i=s==null?void 0:s.state.data,a=a$(e,i);if(a!==void 0)return ie(this,qt).build(this,n).setData(a,{...r,manual:!0})}setQueriesData(t,e,r){return vr.batch(()=>ie(this,qt).findAll(t).map(({queryKey:n})=>[n,this.setQueryData(n,e,r)]))}getQueryState(t){var r;const e=this.defaultQueryOptions({queryKey:t});return(r=ie(this,qt).get(e.queryHash))==null?void 0:r.state}removeQueries(t){const e=ie(this,qt);vr.batch(()=>{e.findAll(t).forEach(r=>{e.remove(r)})})}resetQueries(t,e){const r=ie(this,qt);return vr.batch(()=>(r.findAll(t).forEach(n=>{n.reset()}),this.refetchQueries({type:"active",...t},e)))}cancelQueries(t,e={}){const r={revert:!0,...e},n=vr.batch(()=>ie(this,qt).findAll(t).map(s=>s.cancel(r)));return Promise.all(n).then(cn).catch(cn)}invalidateQueries(t,e={}){return vr.batch(()=>(ie(this,qt).findAll(t).forEach(r=>{r.invalidate()}),(t==null?void 0:t.refetchType)==="none"?Promise.resolve():this.refetchQueries({...t,type:(t==null?void 0:t.refetchType)??(t==null?void 0:t.type)??"active"},e)))}refetchQueries(t,e={}){const r={...e,cancelRefetch:e.cancelRefetch??!0},n=vr.batch(()=>ie(this,qt).findAll(t).filter(s=>!s.isDisabled()&&!s.isStatic()).map(s=>{let i=s.fetch(void 0,r);return r.throwOnError||(i=i.catch(cn)),s.state.fetchStatus==="paused"?Promise.resolve():i}));return Promise.all(n).then(cn)}fetchQuery(t){const e=this.defaultQueryOptions(t);e.retry===void 0&&(e.retry=!1);const r=ie(this,qt).build(this,e);return r.isStaleByTime(jo(e.staleTime,r))?r.fetch(e):Promise.resolve(r.state.data)}prefetchQuery(t){return this.fetchQuery(t).then(cn).catch(cn)}fetchInfiniteQuery(t){return t.behavior=E4(t.pages),this.fetchQuery(t)}prefetchInfiniteQuery(t){return this.fetchInfiniteQuery(t).then(cn).catch(cn)}ensureInfiniteQueryData(t){return t.behavior=E4(t.pages),this.ensureQueryData(t)}resumePausedMutations(){return B0.isOnline()?ie(this,ro).resumePausedMutations():Promise.resolve()}getQueryCache(){return ie(this,qt)}getMutationCache(){return ie(this,ro)}getDefaultOptions(){return ie(this,no)}setDefaultOptions(t){Pe(this,no,t)}setQueryDefaults(t,e){ie(this,Mu).set(lc(t),{queryKey:t,defaultOptions:e})}getQueryDefaults(t){const e=[...ie(this,Mu).values()],r={};return e.forEach(n=>{vp(t,n.queryKey)&&Object.assign(r,n.defaultOptions)}),r}setMutationDefaults(t,e){ie(this,Du).set(lc(t),{mutationKey:t,defaultOptions:e})}getMutationDefaults(t){const e=[...ie(this,Du).values()],r={};return e.forEach(n=>{vp(t,n.mutationKey)&&Object.assign(r,n.defaultOptions)}),r}defaultQueryOptions(t){if(t._defaulted)return t;const e={...ie(this,no).queries,...this.getQueryDefaults(t.queryKey),...t,_defaulted:!0};return e.queryHash||(e.queryHash=Vj(e.queryKey,e)),e.refetchOnReconnect===void 0&&(e.refetchOnReconnect=e.networkMode!=="always"),e.throwOnError===void 0&&(e.throwOnError=!!e.suspense),!e.networkMode&&e.persister&&(e.networkMode="offlineFirst"),e.queryFn===Hj&&(e.enabled=!1),e}defaultMutationOptions(t){return t!=null&&t._defaulted?t:{...ie(this,no).mutations,...(t==null?void 0:t.mutationKey)&&this.getMutationDefaults(t.mutationKey),...t,_defaulted:!0}}clear(){ie(this,qt).clear(),ie(this,ro).clear()}},qt=new WeakMap,ro=new WeakMap,no=new WeakMap,Mu=new WeakMap,Du=new WeakMap,so=new WeakMap,Fu=new WeakMap,Bu=new WeakMap,Iz),hI=M.createContext(void 0),Zs=t=>{const e=M.useContext(hI);if(!e)throw new Error("No QueryClient set, use QueryClientProvider to set one");return e},C$=({client:t,children:e})=>(M.useEffect(()=>(t.mount(),()=>{t.unmount()}),[t]),o.jsx(hI.Provider,{value:t,children:e})),pI=M.createContext(!1),E$=()=>M.useContext(pI);pI.Provider;function T$(){let t=!1;return{clearReset:()=>{t=!1},reset:()=>{t=!0},isReset:()=>t}}var A$=M.createContext(T$()),z$=()=>M.useContext(A$),P$=(t,e)=>{(t.suspense||t.throwOnError||t.experimental_prefetchInRender)&&(e.isReset()||(t.retryOnMount=!1))},_$=t=>{M.useEffect(()=>{t.clearReset()},[t])},I$=({result:t,errorResetBoundary:e,throwOnError:r,query:n,suspense:s})=>t.isError&&!e.isReset()&&!t.isFetching&&n&&(s&&t.data===void 0||iI(r,[t.error,n])),O$=t=>{if(t.suspense){const r=s=>s==="static"?s:Math.max(s??1e3,1e3),n=t.staleTime;t.staleTime=typeof n=="function"?(...s)=>r(n(...s)):r(n),typeof t.gcTime=="number"&&(t.gcTime=Math.max(t.gcTime,1e3))}},R$=(t,e)=>t.isLoading&&t.isFetching&&!e,L$=(t,e)=>(t==null?void 0:t.suspense)&&e.isPending,A4=(t,e,r)=>e.fetchOptimistic(t).catch(()=>{r.clearReset()});function M$(t,e,r){var h,p,f,m,y;const n=E$(),s=z$(),i=Zs(),a=i.defaultQueryOptions(t);(p=(h=i.getDefaultOptions().queries)==null?void 0:h._experimental_beforeQuery)==null||p.call(h,a),a._optimisticResults=n?"isRestoring":"optimistic",O$(a
67),P$(a,s),_$(s);const l=!i.getQueryCache().get(a.queryHash),[c]=M.useState(()=>new e(i,a)),u=c.getOptimisticResult(a),d=!n&&t.subscribed!==!1;if(M.useSyncExternalStore(M.useCallback(k=>{const g=d?c.subscribe(vr.batchCalls(k)):cn;return c.updateResult(),g},[c,d]),()=>c.getCurrentResult(),()=>c.getCurrentResult()),M.useEffect(()=>{c.setOptions(a)},[a,c]),L$(a,u))throw A4(a,c,s);if(I$({result:u,errorResetBoundary:s,throwOnError:a.throwOnError,query:i.getQueryCache().get(a.queryHash),suspense:a.suspense}))throw u.error;if((m=(f=i.getDefaultOptions().queries)==null?void 0:f._experimental_afterQuery)==null||m.call(f,a,u),a.experimental_prefetchInRender&&!oc&&R$(u,n)){const k=l?A4(a,c,s):(y=i.getQueryCache().get(a.queryHash))==null?void 0:y.promise;k==null||k.catch(cn).finally(()=>{c.updateResult()})}return a.notifyOnChangeProps?u:c.trackResult(u)}function mt(t,e){return M$(t,y$)}function Be(t,e){const r=Zs(),[n]=M.useState(()=>new j$(r,t));M.useEffect(()=>{n.setOptions(t)},[n,t]);const s=M.useSyncExternalStore(M.useCallback(a=>n.subscribe(vr.batchCalls(a)),[n]),()=>n.getCurrentResult(),()=>n.getCurrentResult()),i=M.useCallback((a,l)=>{n.mutate(a,l).catch(cn)},[n]);if(s.error&&iI(n.options.throwOnError,[s.error]))throw s.error;return{...s,mutate:i,mutateAsync:s.mutate}}const fI=M.createContext(void 0),D$=({children:t})=>{const[e,r]=M.useState(()=>localStorage.getItem("theme")||"light");M.useEffect(()=>{const s=document.documentElement;s.classList.remove("light","dark"),s.classList.add(e),localStorage.setItem("theme",e)},[e]);const n=()=>{r(s=>s==="light"?"dark":"light")};return o.jsx(fI.Provider,{value:{theme:e,toggleTheme:n},children:t})},cf=()=>{const t=M.useContext(fI);if(!t)throw new Error("useTheme must be used within ThemeProvider");return t};let F$={data:""},B$=t=>{if(typeof window=="object"){let e=(t?t.querySelector("#_goober"):window._goober)||Object.assign(document.createElement("style"),{innerHTML:" ",id:"_goober"});return e.nonce=window.__nonce__,e.parentNode||(t||document.head).appendChild(e),e.firstChild}return t||F$},$$=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,U$=/\/\*[^]*?\*\/|  +/g,z4=/\n+/g,qa=(t,e)=>{let r="",n="",s="";for(let i in t){let a=t[i];i[0]=="@"?i[1]=="i"?r=i+" "+a+";":n+=i[1]=="f"?qa(a,i):i+"{"+qa(a,i[1]=="k"?"":e)+"}":typeof a=="object"?n+=qa(a,e?e.replace(/([^,])+/g,l=>i.replace(/([^,]*:\S+\([^)]*\))|([^,])+/g,c=>/&/.test(c)?c.replace(/&/g,l):l?l+" "+c:c)):i):a!=null&&(i=/^--/.test(i)?i:i.replace(/[A-Z]/g,"-$&").toLowerCase(),s+=qa.p?qa.p(i,a):i+":"+a+";")}return r+(e&&s?e+"{"+s+"}":s)+n},Ri={},mI=t=>{if(typeof t=="object"){let e="";for(let r in t)e+=r+mI(t[r]);return e}return t},W$=(t,e,r,n,s)=>{let i=mI(t),a=Ri[i]||(Ri[i]=(c=>{let u=0,d=11;for(;u<c.length;)d=101*d+c.charCodeAt(u++)>>>0;return"go"+d})(i));if(!Ri[a]){let c=i!==t?t:(u=>{let d,h,p=[{}];for(;d=$$.exec(u.replace(U$,""));)d[4]?p.shift():d[3]?(h=d[3].replace(z4," ").trim(),p.unshift(p[0][h]=p[0][h]||{})):p[0][d[1]]=d[2].replace(z4," ").trim();return p[0]})(t);Ri[a]=qa(s?{["@keyframes "+a]:c}:c,r?"":"."+a)}let l=r&&Ri.g?Ri.g:null;return r&&(Ri.g=Ri[a]),((c,u,d,h)=>{h?u.data=u.data.replace(h,c):u.data.indexOf(c)===-1&&(u.data=d?c+u.data:u.data+c)})(Ri[a],e,n,l),a},V$=(t,e,r)=>t.reduce((n,s,i)=>{let a=e[i];if(a&&a.call){let l=a(r),c=l&&l.props&&l.props.className||/^go/.test(l)&&l;a=c?"."+c:l&&typeof l=="object"?l.props?"":qa(l,""):l===!1?"":l}return n+s+(a??"")},"");function by(t){let e=this||{},r=t.call?t(e.p):t;return W$(r.unshift?r.raw?V$(r,[].slice.call(arguments,1),e.p):r.reduce((n,s)=>Object.assign(n,s&&s.call?s(e.p):s),{}):r,B$(e.target),e.g,e.o,e.k)}let gI,ov,lv;by.bind({g:1});let fa=by.bind({k:1});function H$(t,e,r,n){qa.p=e,gI=t,ov=r,lv=n}function Jo(t,e){let r=this||{};return function(){let n=arguments;function s(i,a){let l=Object.assign({},i),c=l.className||s.className;r.p=Object.assign({theme:ov&&ov()},l),r.o=/ *go\d+/.test(c),l.className=by.apply(r,n)+(c?" "+c:"");let u=t;return t[0]&&(u=l.as||t,delete l.as),lv&&u[0]&&lv(l),gI(u,l)}return s}}var q$=t=>typeof t=="function",$0=(t,e)=>q$(t)?t(e):t,K$=(()=>{let t=0;return()=>(++t).toString()})(),yI=(()=>{let t;return()=>{if(t===void 0&&typeof window<"u"){let e=matchMedia("(prefers-reduced-motion: reduce)");t=!e||e.matches}return t}})(),G$=20,Gj="default",xI=(t,e)=>{let{toastLimit:r}=t.settings;switch(e.type){case 0:return{...t,toasts:[e.toast,...t.toasts].slice(0,r)};case 1:return{...t,toasts:t.toasts.map(a=>a.id===e.toast.id?{...a,...e.toast}:a)};case 2:let{toast:n}=e;return xI(t,{type:t.toasts.find(a=>a.id===n.id)?1:0,toast:n});case 3:let{toastId:s}=e;return{...t,toasts:t.toasts.map(a=>a.id===s||s===void 0?{...a,dismissed:!0,visible:!1}:a)};case 4:return e.toastId===void 0?{...t,toasts:[]}:{...t,toasts:t.toasts.filter(a=>a.id!==e.toastId)};case 5:return{...t,pausedAt:e.time};case 6:let i=e.time-(t.pausedAt||0);return{...t,pausedAt:void 0,toasts:t.toasts.map(a=>({...a,pauseDuration:a.pauseDuration+i}))}}},Jm=[],wI={toasts:[],pausedAt:void 0,settings:{toastLimit:G$}},bi={},bI=(t,e=Gj)=>{bi[e]=xI(bi[e]||wI,t),Jm.forEach(([r,n])=>{r===e&&n(bi[e])})},kI=t=>
67Object.keys(bi).forEach(e=>bI(t,e)),Z$=t=>Object.keys(bi).find(e=>bi[e].toasts.some(r=>r.id===t)),ky=(t=Gj)=>e=>{bI(e,t)},Y$={blank:4e3,error:4e3,success:2e3,loading:1/0,custom:4e3},J$=(t={},e=Gj)=>{let[r,n]=M.useState(bi[e]||wI),s=M.useRef(bi[e]);M.useEffect(()=>(s.current!==bi[e]&&n(bi[e]),Jm.push([e,n]),()=>{let a=Jm.findIndex(([l])=>l===e);a>-1&&Jm.splice(a,1)}),[e]);let i=r.toasts.map(a=>{var l,c,u;return{...t,...t[a.type],...a,removeDelay:a.removeDelay||((l=t[a.type])==null?void 0:l.removeDelay)||(t==null?void 0:t.removeDelay),duration:a.duration||((c=t[a.type])==null?void 0:c.duration)||(t==null?void 0:t.duration)||Y$[a.type],style:{...t.style,...(u=t[a.type])==null?void 0:u.style,...a.style}}});return{...r,toasts:i}},X$=(t,e="blank",r)=>({createdAt:Date.now(),visible:!0,dismissed:!1,type:e,ariaProps:{role:"status","aria-live":"polite"},message:t,pauseDuration:0,...r,id:(r==null?void 0:r.id)||K$()}),uf=t=>(e,r)=>{let n=X$(e,t,r);return ky(n.toasterId||Z$(n.id))({type:2,toast:n}),n.id},jr=(t,e)=>uf("blank")(t,e);jr.error=uf("error");jr.success=uf("success");jr.loading=uf("loading");jr.custom=uf("custom");jr.dismiss=(t,e)=>{let r={type:3,toastId:t};e?ky(e)(r):kI(r)};jr.dismissAll=t=>jr.dismiss(void 0,t);jr.remove=(t,e)=>{let r={type:4,toastId:t};e?ky(e)(r):kI(r)};jr.removeAll=t=>jr.remove(void 0,t);jr.promise=(t,e,r)=>{let n=jr.loading(e.loading,{...r,...r==null?void 0:r.loading});return typeof t=="function"&&(t=t()),t.then(s=>{let i=e.success?$0(e.success,s):void 0;return i?jr.success(i,{id:n,...r,...r==null?void 0:r.success}):jr.dismiss(n),s}).catch(s=>{let i=e.error?$0(e.error,s):void 0;i?jr.error(i,{id:n,...r,...r==null?void 0:r.error}):jr.dismiss(n)}),t};var Q$=1e3,eU=(t,e="default")=>{let{toasts:r,pausedAt:n}=J$(t,e),s=M.useRef(new Map).current,i=M.useCallback((h,p=Q$)=>{if(s.has(h))return;let f=setTimeout(()=>{s.delete(h),a({type:4,toastId:h})},p);s.set(h,f)},[]);M.useEffect(()=>{if(n)return;let h=Date.now(),p=r.map(f=>{if(f.duration===1/0)return;let m=(f.duration||0)+f.pauseDuration-(h-f.createdAt);if(m<0){f.visible&&jr.dismiss(f.id);return}return setTimeout(()=>jr.dismiss(f.id,e),m)});return()=>{p.forEach(f=>f&&clearTimeout(f))}},[r,n,e]);let a=M.useCallback(ky(e),[e]),l=M.useCallback(()=>{a({type:5,time:Date.now()})},[a]),c=M.useCallback((h,p)=>{a({type:1,toast:{id:h,height:p}})},[a]),u=M.useCallback(()=>{n&&a({type:6,time:Date.now()})},[n,a]),d=M.useCallback((h,p)=>{let{reverseOrder:f=!1,gutter:m=8,defaultPosition:y}=p||{},k=r.filter(w=>(w.position||y)===(h.position||y)&&w.height),g=k.findIndex(w=>w.id===h.id),x=k.filter((w,b)=>b<g&&w.visible).length;return k.filter(w=>w.visible).slice(...f?[x+1]:[0,x]).reduce((w,b)=>w+(b.height||0)+m,0)},[r]);return M.useEffect(()=>{r.forEach(h=>{if(h.dismissed)i(h.id,h.removeDelay);else{let p=s.get(h.id);p&&(clearTimeout(p),s.delete(h.id))}})},[r,i]),{toasts:r,handlers:{updateHeight:c,startPause:l,endPause:u,calculateOffset:d}}},tU=fa`
68from {
69  transform: scale(0) rotate(45deg);
70	opacity: 0;
71}
72to {
73 transform: scale(1) rotate(45deg);
74  opacity: 1;
75}`,rU=fa`
76from {
77  transform: scale(0);
78  opacity: 0;
79}
80to {
81  transform: scale(1);
82  opacity: 1;
83}`,nU=fa`
84from {
85  transform: scale(0) rotate(90deg);
86	opacity: 0;
87}
88to {
89  transform: scale(1) rotate(90deg);
90	opacity: 1;
91}`,sU=Jo("div")`
92  width: 20px;
93  opacity: 0;
94  height: 20px;
95  border-radius: 10px;
96  background: ${t=>t.primary||"#ff4b4b"};
97  position: relative;
98  transform: rotate(45deg);
99
100  animation: ${tU} 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275)
101    forwards;
102  animation-delay: 100ms;
103
104  &:after,
105  &:before {
106    content: '';
107    animation: ${rU} 0.15s ease-out forwards;
108    animation-delay: 150ms;
109    position: absolute;
110    border-radius: 3px;
111    opacity: 0;
112    background: ${t=>t.secondary||"#fff"};
113    bottom: 9px;
114    left: 4px;
115    height: 2px;
116    width: 12px;
117  }
118
119  &:before {
120    animation: ${nU} 0.15s ease-out forwards;
121    animation-delay: 180ms;
122    transform: rotate(90deg);
123  }
124`,iU=fa`
125  from {
126    transform: rotate(0deg);
127  }
128  to {
129    transform: rotate(360deg);
130  }
131`,aU=Jo("div")`
132  width: 12px;
133  height: 12px;
134  box-sizing: border-box;
135  border: 2px solid;
136  border-radius: 100%;
137  border-color: ${t=>
137t.secondary||"#e0e0e0"};
138  border-right-color: ${t=>t.primary||"#616161"};
139  animation: ${iU} 1s linear infinite;
140`,oU=fa`
141from {
142  transform: scale(0) rotate(45deg);
143	opacity: 0;
144}
145to {
146  transform: scale(1) rotate(45deg);
147	opacity: 1;
148}`,lU=fa`
1490% {
150	height: 0;
151	width: 0;
152	opacity: 0;
153}
15440% {
155  height: 0;
156	width: 6px;
157	opacity: 1;
158}
159100% {
160  opacity: 1;
161  height: 10px;
162}`,cU=Jo("div")`
163  width: 20px;
164  opacity: 0;
165  height: 20px;
166  border-radius: 10px;
167  background: ${t=>t.primary||"#61d345"};
168  position: relative;
169  transform: rotate(45deg);
170
171  animation: ${oU} 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275)
172    forwards;
173  animation-delay: 100ms;
174  &:after {
175    content: '';
176    box-sizing: border-box;
177    animation: ${lU} 0.2s ease-out forwards;
178    opacity: 0;
179    animation-delay: 200ms;
180    position: absolute;
181    border-right: 2px solid;
182    border-bottom: 2px solid;
183    border-color: ${t=>t.secondary||"#fff"};
184    bottom: 6px;
185    left: 6px;
186    height: 10px;
187    width: 6px;
188  }
189`,uU=Jo("div")`
190  position: absolute;
191`,dU=Jo("div")`
192  position: relative;
193  display: flex;
194  justify-content: center;
195  align-items: center;
196  min-width: 20px;
197  min-height: 20px;
198`,hU=fa`
199from {
200  transform: scale(0.6);
201  opacity: 0.4;
202}
203to {
204  transform: scale(1);
205  opacity: 1;
206}`,pU=Jo("div")`
207  position: relative;
208  transform: scale(0.6);
209  opacity: 0.4;
210  min-width: 20px;
211  animation: ${hU} 0.3s 0.12s cubic-bezier(0.175, 0.885, 0.32, 1.275)
212    forwards;
213`,fU=({toast:t})=>{let{icon:e,type:r,iconTheme:n}=t;return e!==void 0?typeof e=="string"?M.createElement(pU,null,e):e:r==="blank"?null:M.createElement(dU,null,M.createElement(aU,{...n}),r!=="loading"&&M.createElement(uU,null,r==="error"?M.createElement(sU,{...n}):M.createElement(cU,{...n})))},mU=t=>`
2140% {transform: translate3d(0,${t*-200}%,0) scale(.6); opacity:.5;}
215100% {transform: translate3d(0,0,0) scale(1); opacity:1;}
216`,gU=t=>`
2170% {transform: translate3d(0,0,-1px) scale(1); opacity:1;}
218100% {transform: translate3d(0,${t*-150}%,-1px) scale(.6); opacity:0;}
219`,yU="0%{opacity:0;} 100%{opacity:1;}",xU="0%{opacity:1;} 100%{opacity:0;}",wU=Jo("div")`
220  display: flex;
221  align-items: center;
222  background: #fff;
223  color: #363636;
224  line-height: 1.3;
225  will-change: transform;
226  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1), 0 3px 3px rgba(0, 0, 0, 0.05);
227  max-width: 350px;
228  pointer-events: auto;
229  padding: 8px 10px;
230  border-radius: 8px;
231`,bU=Jo("div")`
232  display: flex;
233  justify-content: center;
234  margin: 4px 10px;
235  color: inherit;
236  flex: 1 1 auto;
237  white-space: pre-line;
238`,kU=(t,e)=>{let r=t.includes("top")?1:-1,[n,s]=yI()?[yU,xU]:[mU(r),gU(r)];return{animation:e?`${fa(n)} 0.35s cubic-bezier(.21,1.02,.73,1) forwards`:`${fa(s)} 0.4s forwards cubic-bezier(.06,.71,.55,1)`}},vU=M.memo(({toast:t,position:e,style:r,children:n})=>{let s=t.height?kU(t.position||e||"top-center",t.visible):{opacity:0},i=M.createElement(fU,{toast:t}),a=M.createElement(bU,{...t.ariaProps},$0(t.message,t));return M.createElement(wU,{className:t.className,style:{...s,...r,...t.style}},typeof n=="function"?n({icon:i,message:a}):M.createElement(M.Fragment,null,i,a))});H$(M.createElement);var jU=({id:t,className:e,style:r,onHeightUpdate:n,children:s})=>{let i=M.useCallback(a=>
238{if(a){let l=()=>{let c=a.getBoundingClientRect().height;n(t,c)};l(),new MutationObserver(l).observe(a,{subtree:!0,childList:!0,characterData:!0})}},[t,n]);return M.createElement("div",{ref:i,className:e,style:r},s)},SU=(t,e)=>{let r=t.includes("top"),n=r?{top:0}:{bottom:0},s=t.includes("center")?{justifyContent:"center"}:t.includes("right")?{justifyContent:"flex-end"}:{};return{left:0,right:0,display:"flex",position:"absolute",transition:yI()?void 0:"all 230ms cubic-bezier(.21,1.02,.73,1)",transform:`translateY(${e*(r?1:-1)}px)`,...n,...s}},NU=by`
239  z-index: 9999;
240  > * {
241    pointer-events: auto;
242  }
243`,tm=16,CU=({reverseOrder:t,position:e="top-center",toastOptions:r,gutter:n,children:s,toasterId:i,containerStyle:a,containerClassName:l})=>{let{toasts:c,handlers:u}=eU(r,i);return M.createElement("div",{"data-rht-toaster":i||"",style:{position:"fixed",zIndex:9999,top:tm,left:tm,right:tm,bottom:tm,pointerEvents:"none",...a},className:l,onMouseEnter:u.startPause,onMouseLeave:u.endPause},c.map(d=>{let h=d.position||e,p=u.calculateOffset(d,{reverseOrder:t,gutter:n,defaultPosition:e}),f=SU(h,p);return M.createElement(jU,{id:d.id,key:d.id,onHeightUpdate:u.updateHeight,className:d.visible?NU:"",style:f},d.type==="custom"?$0(d.message,d):s?s(d):M.createElement(vU,{toast:d,position:h}))}))},le=jr,EU=typeof Element<"u",TU=typeof Map=="function",AU=typeof Set=="function",zU=typeof ArrayBuffer=="function"&&!!ArrayBuffer.isView;function Xm(t,e){if(t===e)return!0;if(t&&e&&typeof t=="object"&&typeof e=="object"){if(t.constructor!==e.constructor)return!1;var r,n,s;if(Array.isArray(t)){if(r=t.length,r!=e.length)return!1;for(n=r;n--!==0;)if(!Xm(t[n],e[n]))return!1;return!0}var i;if(TU&&t instanceof Map&&e instanceof Map){if(t.size!==e.size)return!1;for(i=t.entries();!(n=i.next()).done;)if(!e.has(n.value[0]))return!1;for(i=t.entries();!(n=i.next()).done;)if(!Xm(n.value[1],e.get(n.value[0])))return!1;return!0}if(AU&&t instanceof Set&&e instanceof Set){if(t.size!==e.size)return!1;for(i=t.entries();!(n=i.next()).done;)if(!e.has(n.value[0]))return!1;return!0}if(zU&&ArrayBuffer.isView(t)&&ArrayBuffer.isView(e)){if(r=t.length,r!=e.length)return!1;for(n=r;n--!==0;)if(t[n]!==e[n])return!1;return!0}if(t.constructor===RegExp)return t.source===e.source&&t.flags===e.flags;if(t.valueOf!==Object.prototype.valueOf&&typeof t.valueOf=="function"&&typeof e.valueOf=="function")return t.valueOf()===e.valueOf();if(t.toString!==Object.prototype.toString&&typeof t.toString=="function"&&typeof e.toString=="function")return t.toString()===e.toString();if(s=Object.keys(t),r=s.length,r!==Object.keys(e).length)return!1;for(n=r;n--!==0;)if(!Object.prototype.hasOwnProperty.call(e,s[n]))return!1;if(EU&&t instanceof Element)return!1;for(n=r;n--!==0;)if(!((s[n]==="_owner"||s[n]==="__v"||s[n]==="__o")&&t.$$typeof)&&!Xm(t[s[n]],e[s[n]]))return!1;return!0}return t!==t&&e!==e}var PU=function(e,r){try{return Xm(e,r)}catch(n){if((n.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw n}};const _U=qo(PU);var IU=function(t,e,r,n,s,i,a,l){if(!t){var c;if(e===void 0)c=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var u=[r,n,s,i,a,l],d=0;c=new Error(e.replace(/%s/g,function(){return u[d++]})),c.name="Invariant Violation"}throw c.framesToPop=1,c}},OU=IU;const P4=qo(OU);var RU=function(e,r,n,s){var i=n?n.call(s,e,r):void 0;if(i!==void 0)return!!i;if(e===r)return!0;if(typeof e!="object"||!e||typeof r!="object"||!r)return!1;var a=Object.keys(e),l=Object.keys(r);if(a.length!==l.length)return!1;for(var c=Object.prototype.hasOwnProperty.bind(r),u=0;u<a.length;u++){var d=a[u];if(!c(d))return!1;var h=e[d],p=r[d];if(i=n?n.call(s,h,p,d):void 0,i===!1||i===void 0&&h!==p)return!1}return!0};const LU=qo(RU);var vI=(t=>(t.BASE="base",t.BODY="body",t.HEAD="head",t.HTML="html",t.LINK="link",t.META="meta",t.NOSCRIPT="noscript",t.SCRIPT="script",t.STYLE="style",t.TITLE="title",t.FRAGMENT="Symbol(react.fragment)",t))(vI||{}),ew={link:{rel:["amphtml","canonical","alternate"]},script:{type:["application/ld+json"]}
243,meta:{charset:"",name:["generator","robots","description"],property:["og:type","og:title","og:url","og:image","og:image:alt","og:description","twitter:url","twitter:title","twitter:description","twitter:image","twitter:image:alt","twitter:card","twitter:site"]}},_4=Object.values(vI),Zj={accesskey:"accessKey",charset:"charSet",class:"className",contenteditable:"contentEditable",contextmenu:"contextMenu","http-equiv":"httpEquiv",itemprop:"itemProp",tabindex:"tabIndex"},MU=Object.entries(Zj).reduce((t,[e,r])=>(t[r]=e,t),{}),Fs="data-rh",wu={DEFAULT_TITLE:"defaultTitle",DEFER:"defer",ENCODE_SPECIAL_CHARACTERS:"encodeSpecialCharacters",ON_CHANGE_CLIENT_STATE:"onChangeClientState",TITLE_TEMPLATE:"titleTemplate",PRIORITIZE_SEO_TAGS:"prioritizeSeoTags"},bu=(t,e)=>{for(let r=t.length-1;r>=0;r-=1){const n=t[r];if(Object.prototype.hasOwnProperty.call(n,e))return n[e]}return null},DU=t=>{let e=bu(t,"title");const r=bu(t,wu.TITLE_TEMPLATE);if(Array.isArray(e)&&(e=e.join("")),r&&e)return r.replace(/%s/g,()=>e);const n=bu(t,wu.DEFAULT_TITLE);return e||n||void 0},FU=t=>bu(t,wu.ON_CHANGE_CLIENT_STATE)||(()=>{}),tw=(t,e)=>e.filter(r=>typeof r[t]<"u").map(r=>r[t]).reduce((r,n)=>({...r,...n}),{}),BU=(t,e)=>e.filter(r=>typeof r.base<"u").map(r=>r.base).reverse().reduce((r,n)=>{if(!r.length){const s=Object.keys(n);for(let i=0;i<s.length;i+=1){const l=s[i].toLowerCase();if(t.indexOf(l)!==-1&&n[l])return r.concat(n)}}return r},[]),$U=t=>console&&typeof console.warn=="function"&&console.warn(t),Zd=(t,e,r)=>{const n={};return r.filter(s=>Array.isArray(s[t])?!0:(typeof s[t]<"u"&&$U(`Helmet: ${t} should be of type "Array". Instead found type "${typeof s[t]}"`),!1)).map(s=>s[t]).reverse().reduce((s,i)=>{const a={};i.filter(c=>{let u;const d=Object.keys(c);for(let p=0;p<d.length;p+=1){const f=d[p],m=f.toLowerCase();e.indexOf(m)!==-1&&!(u==="rel"&&c[u].toLowerCase()==="canonical")&&!(m==="rel"&&c[m].toLowerCase()==="stylesheet")&&(u=m),e.indexOf(f)!==-1&&(f==="innerHTML"||f==="cssText"||f==="itemprop")&&(u=f)}if(!u||!c[u])return!1;const h=c[u].toLowerCase();return n[u]||(n[u]={}),a[u]||(a[u]={}),n[u][h]?!1:(a[u][h]=!0,!0)}).reverse().forEach(c=>s.push(c));const l=Object.keys(a);for(let c=0;c<l.length;c+=1){const u=l[c],d={...n[u],...a[u]};n[u]=d}return s},[]).reverse()},UU=(t,e)=>{if(Array.isArray(t)&&t.length){for(let r=0;r<t.length;r+=1)if(t[r][e])return!0}return!1},WU=t=>({baseTag:BU(["href"],t),bodyAttributes:tw("bodyAttributes",t),defer:bu(t,wu.DEFER),encode:bu(t,wu.ENCODE_SPECIAL_CHARACTERS),htmlAttributes:tw("htmlAttributes",t),linkTags:Zd("link",["rel","href"],t),metaTags:Zd("meta",["name","charset","http-equiv","property","itemprop"],t),noscriptTags:Zd("noscript",["innerHTML"],t),onChangeClientState:FU(t),scriptTags:Zd("script",["src","innerHTML"],t),styleTags:Zd("style",["cssText"],t),title:DU(t),titleAttributes:tw("titleAttributes",t),prioritizeSeoTags:UU(t,wu.PRIORITIZE_SEO_TAGS)}),jI=t=>Array.isArray(t)?t.join(""):t,VU=(t,e)=>{const r=Object.keys(t);for(let n=0;n<r.length;n+=1)if(e[r[n]]&&e[r[n]].includes(t[r[n]]))return!0;return!1},rw=(t,e)=>Array.isArray(t)?t.reduce((r,n)=>(VU(n,e)?r.priority.push(n):r.default.push(n),r),{priority:[],default:[]}):{default:t,priority:[]},I4=(t,e)=>({...t,[e]:void 0}),HU=["noscript","script","style"],cv=(t,e=!0)=>e===!1?String(t):String(t).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;"),SI=t=>Object.keys(t).reduce((e,r)=>{const n=typeof t[r]<"u"?`${r}="${t[r]}"`:`${r}`;return e?`${e} ${n}`:n},""),qU=(t,e,r,n)=>{const s=SI(r),i=jI(e);return s?`<${t} ${Fs}="true" ${s}>${cv(i,n)}</${t}>`:`<${t} ${Fs}="true">${cv(i,n)}</${t}>`},KU=(t,e,r=!0)=>e.reduce((n,s)=>{const i=s,a=Object.keys(i).filter(u=>!(u==="innerHTML"||u==="cssText")).reduce((u,d)=>{const h=typeof i[d]>"u"?d:`${d}="${cv(i[d],r)}"`;return u?`${u} ${h}`:h},""),l=i.innerHTML||i.cssText||"",c=HU.indexOf(t)===-1;return`${n}<${t} ${Fs}="true" ${a}${c?"/>":`>${l}</${t}>`}`},""),NI=(t,e={})=>Object.keys(t).reduce((r,n)=>{const s=Zj[n];return r[s||n]=t[n],r},e),GU=(t,e,r)=>{const n={key:e,[Fs]:!0},s=NI(r,n);return[ut.createElement("title",s,e)]},Qm=(t,e)=>e.map((r,n)=>{const s={key:n,[Fs]:!0};return Object.keys(r).forEach(i=>
243{const l=Zj[i]||i;if(l==="innerHTML"||l==="cssText"){const c=r.innerHTML||r.cssText;s.dangerouslySetInnerHTML={__html:c}}else s[l]=r[i]}),ut.createElement(t,s)}),ls=(t,e,r=!0)=>{switch(t){case"title":return{toComponent:()=>GU(t,e.title,e.titleAttributes),toString:()=>qU(t,e.title,e.titleAttributes,r)};case"bodyAttributes":case"htmlAttributes":return{toComponent:()=>NI(e),toString:()=>SI(e)};default:return{toComponent:()=>Qm(t,e),toString:()=>KU(t,e,r)}}},ZU=({metaTags:t,linkTags:e,scriptTags:r,encode:n})=>{const s=rw(t,ew.meta),i=rw(e,ew.link),a=rw(r,ew.script);return{priorityMethods:{toComponent:()=>[...Qm("meta",s.priority),...Qm("link",i.priority),...Qm("script",a.priority)],toString:()=>`${ls("meta",s.priority,n)} ${ls("link",i.priority,n)} ${ls("script",a.priority,n)}`},metaTags:s.default,linkTags:i.default,scriptTags:a.default}},YU=t=>{const{baseTag:e,bodyAttributes:r,encode:n=!0,htmlAttributes:s,noscriptTags:i,styleTags:a,title:l="",titleAttributes:c,prioritizeSeoTags:u}=t;let{linkTags:d,metaTags:h,scriptTags:p}=t,f={toComponent:()=>{},toString:()=>""};return u&&({priorityMethods:f,linkTags:d,metaTags:h,scriptTags:p}=ZU(t)),{priority:f,base:ls("base",e,n),bodyAttributes:ls("bodyAttributes",r,n),htmlAttributes:ls("htmlAttributes",s,n),link:ls("link",d,n),meta:ls("meta",h,n),noscript:ls("noscript",i,n),script:ls("script",p,n),style:ls("style",a,n),title:ls("title",{title:l,titleAttributes:c},n)}},uv=YU,rm=[],CI=!!(typeof window<"u"&&window.document&&window.document.createElement),dv=class{constructor(t,e){Oi(this,"instances",[]);Oi(this,"canUseDOM",CI);Oi(this,"context");Oi(this,"value",{setHelmet:t=>{this.context.helmet=t},helmetInstances:{get:()=>this.canUseDOM?rm:this.instances,add:t=>{(this.canUseDOM?rm:this.instances).push(t)},remove:t=>{const e=(this.canUseDOM?rm:this.instances).indexOf(t);(this.canUseDOM?rm:this.instances).splice(e,1)}}});this.context=t,this.canUseDOM=e||!1,e||(t.helmet=uv({baseTag:[],bodyAttributes:{},htmlAttributes:{},linkTags:[],metaTags:[],noscriptTags:[],scriptTags:[],styleTags:[],title:"",titleAttributes:{}}))}},JU={},EI=ut.createContext(JU),ql,TI=(ql=class extends M.Component{constructor(r){super(r);Oi(this,"helmetData");this.helmetData=new dv(this.props.context||{},ql.canUseDOM)}render(){return ut.createElement(EI.Provider,{value:this.helmetData.value},this.props.children)}},Oi(ql,"canUseDOM",CI),ql),_c=(t,e)=>{const r=document.head||document.querySelector("head"),n=r.querySelectorAll(`${t}[${Fs}]`),s=[].slice.call(n),i=[];let a;return e&&e.length&&e.forEach(l=>{const c=document.createElement(t);for(const u in l)if(Object.prototype.hasOwnProperty.call(l,u))if(u==="innerHTML")c.innerHTML=l.innerHTML;else if(u==="cssText")c.styleSheet?c.styleSheet.cssText=l.cssText:c.appendChild(document.createTextNode(l.cssText));else{const d=u,h=typeof l[d]>"u"?"":l[d];c.setAttribute(u,h)}c.setAttribute(Fs,"true"),s.some((u,d)=>(a=d,c.isEqualNode(u)))?s.splice(a,1):i.push(c)}),s.forEach(l=>{var c;return(c=l.parentNode)==null?void 0:c.removeChild(l)}),i.forEach(l=>r.appendChild(l)),{oldTags:s,newTags:i}},hv=(t,e)=>{const r=document.getElementsByTagName(t)[0];if(!r)return;const n=r.getAttribute(Fs),s=n?n.split(","):[],i=[...s],a=Object.keys(e);for(const l of a){const c=e[l]||"";r.getAttribute(l)!==c&&r.setAttribute(l,c),s.indexOf(l)===-1&&s.push(l);const u=i.indexOf(l);u!==-1&&i.splice(u,1)}for(let l=i.length-1;l>=0;l-=1)r.removeAttribute(i[l]);s.length===i.length?r.removeAttribute(Fs):r.getAttribute(Fs)!==a.join(",")&&r.setAttribute(Fs,a.join(","))},XU=(t,e)=>{typeof t<"u"&&document.title!==t&&(document.title=jI(t)),hv("title",e)},O4=(t,e)=>{const{baseTag:r,bodyAttributes:n,htmlAttributes:s,linkTags:i,metaTags:a,noscriptTags:l,onChangeClientState:c,scriptTags:u,styleTags:d,title:h,titleAttributes:p}=t;hv("body",n),hv("html",s),XU(h,p);const f={baseTag:_c("base",r),linkTags:_c("link",i),metaTags:_c("meta",a),noscriptTags:_c("noscript",l),scriptTags:_c("script",u),styleTags:_c("style",d)},m={},y={};Object.keys(f).forEach(k=>{const{newTags:g,oldTags:x}=f[k];g.length&&(m[k]=g),x.length&&(y[k]=f[k].oldTags)}),e&&e(),c(t,m,y)},Yd=null,QU=t=>{Yd&&cancelAnimationFrame(Yd),t.defer?Yd=requestAnimationFrame(()=>{O4(t,()=>{Yd=null})}):(O4(t),Yd=null)},eW=QU,R4=class extends M.Component{constructor(){super(...arguments);Oi(this,"rendered",!1)}shouldComponentUpdate(e){return!LU(e,this.props)}componentDidUpdate(){this.emitChange()}componentWillUnmount(){const{helmetInstances:e}=this.props.context;e.remove(this),this.emitChange()}emitChange(){const{helmetInstances:e,setHelmet:r}=this.props.context;let n=null;const s=WU(e.get().map(i=>{const a={...i.props};return delete a.context,a}));TI.canUseDOM?eW(s):uv&&(n=uv(s)),r(n)}init(){if(this.rendered)return;this.rendered=!0;const{helmetInstances:e}=this.props.context;e.add(this),this.emitChange()}render(){return this.init(),null}},Z1,Ys=(Z1=class extends M.Component{shouldComponentUpdate(t){return!_U(I4(this.props,"helmetData"),I4(t,"helmetData"))}mapNestedChildrenToProps(t,e){if(!e)return null;switch(t.type){case"script":case"noscript":return{innerHTML:e};case"style":return{cssText:e};default:throw new Error(`<${t.type} /> elements are self-closing and can not contain children. Refer to our API for more information.`)}}flattenArrayTypeChildren(t,e,r,n){return{...e,[t.type]:[...e[t.type]||[],{...r,...this.mapNestedChildrenToProps(t,n)}]}}mapObjectTypeChildren(t,e,r,n){switch(t.type){case"title":return{...e,[t.type]:n,titleAttributes:{...r}};case"body":return{...e,bodyAttributes:{...r}};case"html":return{...e,htmlAttributes:{...r}};default:return{...e,[t.type]:{...r}}}}mapArrayTypeChildrenToProps(t,e){let r={...e};return Object.keys(t).forEach(n=>{r={...r,[n]:t[n]}}),r}
243warnOnInvalidChildren(t,e){return P4(_4.some(r=>t.type===r),typeof t.type=="function"?"You may be attempting to nest <Helmet> components within each other, which is not allowed. Refer to our API for more information.":`Only elements types ${_4.join(", ")} are allowed. Helmet does not support rendering <${t.type}> elements. Refer to our API for more information.`),P4(!e||typeof e=="string"||Array.isArray(e)&&!e.some(r=>typeof r!="string"),`Helmet expects a string as a child of <${t.type}>. Did you forget to wrap your children in braces? ( <${t.type}>{\`\`}</${t.type}> ) Refer to our API for more information.`),!0}mapChildrenToProps(t,e){let r={};return ut.Children.forEach(t,n=>{if(!n||!n.props)return;const{children:s,...i}=n.props,a=Object.keys(i).reduce((c,u)=>(c[MU[u]||u]=i[u],c),{});let{type:l}=n;switch(typeof l=="symbol"?l=l.toString():this.warnOnInvalidChildren(n,s),l){case"Symbol(react.fragment)":e=this.mapChildrenToProps(s,e);break;case"link":case"meta":case"noscript":case"script":case"style":r=this.flattenArrayTypeChildren(n,r,a,s);break;default:e=this.mapObjectTypeChildren(n,e,a,s);break}}),this.mapArrayTypeChildrenToProps(r,e)}render(){const{children:t,...e}=this.props;let r={...e},{helmetData:n}=e;if(t&&(r=this.mapChildrenToProps(t,r)),n&&!(n instanceof dv)){const s=n;n=new dv(s.context,!0),delete r.helmetData}return n?ut.createElement(R4,{...r,context:n.value}):ut.createElement(EI.Consumer,null,s=>ut.createElement(R4,{...r,context:s}))}},Oi(Z1,"defaultProps",{defer:!0,encodeSpecialCharacters:!0,prioritizeSeoTags:!1}),Z1);const tW={},L4=t=>{let e;const r=new Set,n=(d,h)=>{const p=typeof d=="function"?d(e):d;if(!Object.is(p,e)){const f=e;e=h??(typeof p!="object"||p===null)?p:Object.assign({},e,p),r.forEach(m=>m(e,f))}},s=()=>e,c={setState:n,getState:s,getInitialState:()=>u,subscribe:d=>(r.add(d),()=>r.delete(d)),destroy:()=>{(tW?"production":void 0)!=="production"&&console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),r.clear()}},u=e=t(n,s,c);return c},rW=t=>t?L4(t):L4;var AI={exports:{}},zI={},PI={exports:{}},_I={};/**
244 * @license React
245 * use-sync-external-store-shim.production.js
246 *
247 * Copyright (c) Meta Platforms, Inc. and affiliates.
248 *
249 * This source code is licensed under the MIT license found in the
250 * LICENSE file in the root directory of this source tree.
251 */var Gu=M;function nW(t,e){return t===e&&(t!==0||1/t===1/e)||t!==t&&e!==e}var sW=typeof Object.is=="function"?Object.is:nW,iW=Gu.useState,aW=Gu.useEffect,oW=Gu.useLayoutEffect,lW=Gu.useDebugValue;function cW(t,e){var r=e(),n=iW({inst:{value:r,getSnapshot:e}}),s=n[0].inst,i=n[1];return oW(function(){s.value=r,s.getSnapshot=e,nw(s)&&i({inst:s})},[t,r,e]),aW(function(){return nw(s)&&i({inst:s}),t(function(){nw(s)&&i({inst:s})})},[t]),lW(r),r}function nw(t){var e=t.getSnapshot;t=t.value;try{var r=e();return!sW(t,r)}catch{return!0}}function uW(t,e){return e()}var dW=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?uW:cW;_I.useSyncExternalStore=Gu.useSyncExternalStore!==void 0?Gu.useSyncExternalStore:dW;PI.exports=_I;var vy=PI.exports;/**
252 * @license React
253 * use-sync-external-store-shim/with-selector.production.js
254 *
255 * Copyright (c) Meta Platforms, Inc. and affiliates.
256 *
257 * This source code is licensed under the MIT license found in the
258 * LICENSE file in the root directory of this source tree.
259 */var jy=M,hW=vy;function pW(t,e){return t===e&&(t!==0||1/t===1/e)||t!==t&&e!==e}var fW=typeof Object.is=="function"?Object.is:pW,mW=hW.useSyncExternalStore,gW=jy.useRef,yW=jy.useEffect,xW=jy.useMemo,wW=jy.useDebugValue;zI.useSyncExternalStoreWithSelector=function(t,e,r,n,s){var i=gW(null);if(i.current===null){var a={hasValue:!1,value:null};i.current=a}else a=i.current;i=xW(function(){function c(f){if(!u){if(u=!0,d=f,f=n(f),s!==void 0&&a.hasValue){var m=a.value;if(s(m,f))return h=m}return h=f}if(m=h,fW(d,f))return m;var y=n(f);return s!==void 0&&s(m,y)?(d=f,m):(d=f,h=y)}var u=!1,d,h,p=r===void 0?null:r;return[function(){return c(e())},p===null?void 0:function(){return c(p())}]},[e,r,n,s]);
259var l=mW(t,i[0],i[1]);return yW(function(){a.hasValue=!0,a.value=l},[l]),wW(l),l};AI.exports=zI;var II=AI.exports;const bW=qo(II),OI={},{useDebugValue:kW}=ut,{useSyncExternalStoreWithSelector:vW}=bW;let M4=!1;const jW=t=>t;function SW(t,e=jW,r){(OI?"production":void 0)!=="production"&&r&&!M4&&(console.warn("[DEPRECATED] Use `createWithEqualityFn` instead of `create` or use `useStoreWithEqualityFn` instead of `useStore`. They can be imported from 'zustand/traditional'. https://github.com/pmndrs/zustand/discussions/1937"),M4=!0);const n=vW(t.subscribe,t.getState,t.getServerState||t.getInitialState,e,r);return kW(n),n}const NW=t=>{(OI?"production":void 0)!=="production"&&typeof t!="function"&&console.warn("[DEPRECATED] Passing a vanilla store will be unsupported in a future version. Instead use `import { useStore } from 'zustand'`.");const e=typeof t=="function"?rW(t):t,r=(n,s)=>SW(e,n,s);return Object.assign(r,e),r},CW=t=>NW,EW={};function TW(t,e){let r;try{r=t()}catch{return}return{getItem:s=>{var i;const a=c=>c===null?null:JSON.parse(c,void 0),l=(i=r.getItem(s))!=null?i:null;return l instanceof Promise?l.then(a):a(l)},setItem:(s,i)=>r.setItem(s,JSON.stringify(i,void 0)),removeItem:s=>r.removeItem(s)}}const jp=t=>e=>{try{const r=t(e);return r instanceof Promise?r:{then(n){return jp(n)(r)},catch(n){return this}}}catch(r){return{then(n){return this},catch(n){return jp(n)(r)}}}},AW=(t,e)=>(r,n,s)=>{let i={getStorage:()=>localStorage,serialize:JSON.stringify,deserialize:JSON.parse,partialize:k=>k,version:0,merge:(k,g)=>({...g,...k}),...e},a=!1;const l=new Set,c=new Set;let u;try{u=i.getStorage()}catch{}if(!u)return t((...k)=>{console.warn(`[zustand persist middleware] Unable to update item '${i.name}', the given storage is currently unavailable.`),r(...k)},n,s);const d=jp(i.serialize),h=()=>{const k=i.partialize({...n()});let g;const x=d({state:k,version:i.version}).then(w=>u.setItem(i.name,w)).catch(w=>{g=w});if(g)throw g;return x},p=s.setState;s.setState=(k,g)=>{p(k,g),h()};const f=t((...k)=>{r(...k),h()},n,s);let m;const y=()=>{var k;if(!u)return;a=!1,l.forEach(x=>x(n()));const g=((k=i.onRehydrateStorage)==null?void 0:k.call(i,n()))||void 0;return jp(u.getItem.bind(u))(i.name).then(x=>{if(x)return i.deserialize(x)}).then(x=>{if(x)if(typeof x.version=="number"&&x.version!==i.version){if(i.migrate)return i.migrate(x.state,x.version);console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return x.state}).then(x=>{var w;return m=i.merge(x,(w=n())!=null?w:f),r(m,!0),h()}).then(()=>{g==null||g(m,void 0),a=!0,c.forEach(x=>x(m))}).catch(x=>{g==null||g(void 0,x)})};return s.persist={setOptions:k=>{i={...i,...k},k.getStorage&&(u=k.getStorage())},clearStorage:()=>{u==null||u.removeItem(i.name)},getOptions:()=>i,rehydrate:()=>y(),hasHydrated:()=>a,onHydrate:k=>(l.add(k),()=>{l.delete(k)}),onFinishHydration:k=>(c.add(k),()=>{c.delete(k)})},y(),m||f},zW=(t,e)=>(r,n,s)=>{let i={storage:TW(()=>localStorage),partialize:y=>y,version:0,merge:(y,k)=>({...k,...y}),...e},a=!1;const l=new Set,c=new Set;let u=i.storage;if(!u)return t((...y)=>{console.warn(`[zustand persist middleware] Unable to update item '${i.name}', the given storage is currently unavailable.`),r(...y)},n,s);const d=()=>{const y=i.partialize({...n()});return u.setItem(i.name,{state:y,version:i.version})},h=s.setState;s.setState=(y,k)=>{h(y,k),d()};const p=t((...y)=>{r(...y),d()},n,s);s.getInitialState=()=>p;let f;const m=()=>{var y,k;if(!u)return;a=!1,l.forEach(x=>{var w;return x((w=n())!=null?w:p)});const g=((k=i.onRehydrateStorage)==null?void 0:k.call(i,(y=n())!=null?y:p))||void 0;return jp(u.getItem.bind(u))(i.name).then(x=>{if(x)if(typeof x.version=="number"&&x.version!==i.version){if(i.migrate)return[!0,i.migrate(x.state,x.version)];console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return[!1,x.state];return[!1,void 0]}).then(x=>{var w;const[b,v]=x;if(f=i.merge(v,(w=n())!=null?w:p),r(f,!0),b)return d()}).then(()=>{g==null||g(f,void 0),f=n(),a=!0,c.forEach(x=>x(f))}).catch(x=>{g==null||g(void 0,x)})};return s.persist={setOptions:y=>{i={...i,...y},y.storage&&(u=y.storage)},clearStorage:()=>{u==null||u.removeItem(i.name)},getOptions:()=>i,rehydrate:()=>m(),hasHydrated:()=>a,onHydrate:y=>(l.add(y),()=>{l.delete(y)}),onFinishHydration:y=>(c.add(y),()=>{c.delete(y)})},i.skipHydration||m(),f||p},PW=(t,e)=>"getStorage"in e||"serialize"in e||"deserialize"in e?((EW?"production":void 0)!=="production"&&console.warn("[DEPRECATED] `getStorage`, `serialize` and `deserialize` options are deprecated. Use `storage` option instead."),AW(t,e)):zW(t,e),_W=PW,$r=CW()(_W(t=>({user:null,accessToken:null,refreshToken:null,isAuthenticated:!1,setAuth:(e,r,n)=>t({user:e,accessToken:r,refreshToken:n,isAuthenticated:!0}),setUser:e=>t({user:e}),logout:()=>t({user:null,accessToken:null,refreshToken:null,isAuthenticated:!1})}),{name:"smart-copy-auth"})),IW=()=>{const{pathname:t,hash:e}=Ss();return M.useEffect(()=>{e?setTimeout(()=>{const r=document.querySelector(e);r&&r.scrollIntoView({behavior:"smooth",block:"start"})},100):window.scrollTo(0,0)},[t,e]),null},nm="cookie-consent",sm="cookie-consent-timestamp",OW=365,Jd={necessary:!0,analytics:!1,marketing:!1},RI=M.createContext(void 0),RW=({children:t})=>
259{const[e,r]=M.useState(null),[n,s]=M.useState(Jd),[i,a]=M.useState(!1);M.useEffect(()=>{const h=localStorage.getItem(nm),p=localStorage.getItem(sm);if(h&&p){const f=parseInt(p),m=Date.now(),y=f+OW*24*60*60*1e3;if(m<y){const k=JSON.parse(h);s(k),r(!0),Xd(k)}else localStorage.removeItem(nm),localStorage.removeItem(sm),a(!0),r(!1),Xd(Jd)}else a(!0),r(!1),Xd(Jd)},[]);const l=M.useCallback(h=>{const p={...h,necessary:!0};localStorage.setItem(nm,JSON.stringify(p)),localStorage.setItem(sm,Date.now().toString()),s(p),r(!0),a(!1),Xd(p),window.location.reload()},[]),c=M.useCallback(()=>{l({necessary:!0,analytics:!0,marketing:!0})},[l]),u=M.useCallback(()=>{l({necessary:!0,analytics:!1,marketing:!1})},[l]),d=M.useCallback(()=>{localStorage.removeItem(nm),localStorage.removeItem(sm),s(Jd),r(!1),a(!0),Xd(Jd)},[]);return o.jsx(RI.Provider,{value:{hasConsent:e,consent:n,showBanner:i,saveConsent:l,acceptAll:c,rejectAll:u,clearConsent:d,setShowBanner:a},children:t})},LI=()=>{const t=M.useContext(RI);if(!t)throw new Error("useCookieConsent must be used within CookieConsentProvider");return t};function Xd(t){typeof window<"u"&&window.gtag&&window.gtag("consent","update",{ad_storage:t.marketing?"granted":"denied",ad_user_data:t.marketing?"granted":"denied",ad_personalization:t.marketing?"granted":"denied",analytics_storage:t.analytics?"granted":"denied",functionality_storage:"granted",personalization_storage:t.analytics?"granted":"denied",security_storage:"granted"})}const Ge=t=>typeof t=="string",Qd=()=>{let t,e;const r=new Promise((n,s)=>{t=n,e=s});return r.resolve=t,r.reject=e,r},D4=t=>t==null?"":""+t,LW=(t,e,r)=>{t.forEach(n=>{e[n]&&(r[n]=e[n])})},MW=/###/g,F4=t=>t&&t.indexOf("###")>-1?t.replace(MW,"."):t,B4=t=>!t||Ge(t),Lh=(t,e,r)=>{const n=Ge(e)?e.split("."):e;let s=0;for(;s<n.length-1;){if(B4(t))return{};const i=F4(n[s]);!t[i]&&r&&(t[i]=new r),Object.prototype.hasOwnProperty.call(t,i)?t=t[i]:t={},++s}return B4(t)?{}:{obj:t,k:F4(n[s])}},$4=(t,e,r)=>{const{obj:n,k:s}=Lh(t,e,Object);if(n!==void 0||e.length===1){n[s]=r;return}let i=e[e.length-1],a=e.slice(0,e.length-1),l=Lh(t,a,Object);for(;l.obj===void 0&&a.length;)i=`${a[a.length-1]}.${i}`,a=a.slice(0,a.length-1),l=Lh(t,a,Object),l!=null&&l.obj&&typeof l.obj[`${l.k}.${i}`]<"u"&&(l.obj=void 0);l.obj[`${l.k}.${i}`]=r},DW=(t,e,r,n)=>{const{obj:s,k:i}=Lh(t,e,Object);s[i]=s[i]||[],s[i].push(r)},U0=(t,e)=>{const{obj:r,k:n}=Lh(t,e);if(r&&Object.prototype.hasOwnProperty.call(r,n))return r[n]},FW=(t,e,r)=>{const n=U0(t,r);return n!==void 0?n:U0(e,r)},MI=(t,e,r)=>{for(const n in e)n!=="__proto__"&&n!=="constructor"&&(n in t?Ge(t[n])||t[n]instanceof String||Ge(e[n])||e[n]instanceof String?r&&(t[n]=e[n]):MI(t[n],e[n],r):t[n]=e[n]);return t},Ic=t=>t.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var BW={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};const $W=t=>Ge(t)?t.replace(/[&<>"'\/]/g,e=>BW[e]):t;class UW{constructor(e){this.capacity=e,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(e){const r=this.regExpMap.get(e);if(r!==void 0)return r;const n=new RegExp(e);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(e,n),this.regExpQueue.push(e),n}}const WW=[" ",",","?","!",";"],VW=new UW(20),HW=(t,e,r)=>{e=e||"",r=r||"";const n=WW.filter(a=>e.indexOf(a)<0&&r.indexOf(a)<0);if(n.length===0)return!0;const s=VW.getRegExp(`(${n.map(a=>a==="?"?"\\?":a).join("|")})`);let i=!s.test(t);if(!i){const a=t.indexOf(r);a>0&&!s.test(t.substring(0,a))&&(i=!0)}return i},pv=(t,e,r=".")=>{if(!t)return;if(t[e])return Object.prototype.hasOwnProperty.call(t,e)?t[e]:void 0;const n=e.split(r);let s=t;for(let i=0;i<n.length;){if(!s||typeof s!="object")return;let a,l="";for(let c=i;c<n.length;++c)if(c!==i&&(l+=r),l+=n[c],a=s[l],a!==void 0){if(["string","number","boolean"].indexOf(typeof a)>-1&&c<n.length-1)continue;i+=c-i+1;break}s=a}return s},Sp=t=>t==null?void 0:t.replace("_","-"),qW={type:"logger",log(t){this.output("log",t)},warn(t){this.output("warn",t)},error(t){this.output("error",t)},output(t,e){var r,n;(n=(r=console==null?void 0:console[t])==null?void 0:r.apply)==null||n.call(r,console,e)}};class W0{constructor(e,r={}){this.init(e,r)}init(e,r={}){this.prefix=r.prefix||"i18next:",this.logger=e||qW,this.options=r,this.debug=r.debug}log(...e){return this.forward(e,"log","",!0)}warn(...e){return this.forward(e,"warn","",!0)}error(...e){return this.forward(e,"error","")}deprecate(...e){return this.forward(e,"warn","WARNING DEPRECATED: ",!0)}forward(e,r,n,s){return s&&!this.debug?null:(Ge(e[0])&&(e[0]=`${n}${this.prefix} ${e[0]}`),this.logger[r](e))}create(e){return new W0(this.logger,{prefix:`${this.prefix}:${e}:`,...this.options})}clone(e){return e=e||this.options,e.prefix=e.prefix||this.prefix,new W0(this.logger,e)}}var ki=new W0;let Sy=class{constructor(){this.observers={}}on(e,r){return e.split(" ").forEach(n=>{this.observers[n]||(this.observers[n]=new Map);const s=this.observers[n].get(r)||0;this.observers[n].set(r,s+1)}),this}
vendor: 1,390 bytes, line 259
259off(e,r){if(this.observers[e]){if(!r){delete this.observers[e];return}this.observers[e].delete(r)}}emit(e,...r){this.observers[e]&&Array.from(this.observers[e].entries()).forEach(([s,i])=>{for(let a=0;a<i;a++)s(...r)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(([s,i])=>{for(let a=0;a<i;a++)s.apply(s,[e,...r])})}};class U4 extends Sy{constructor(e,r={ns:["translation"],defaultNS:"translation"}){super(),this.data=e||{},this.options=r,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(e){this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}removeNamespaces(e){const r=this.options.ns.indexOf(e);r>-1&&this.options.ns.splice(r,1)}getResource(e,r,n,s={}){var u,d;const i=s.keySeparator!==void 0?s.keySeparator:this.options.keySeparator,a=s.ignoreJSONStructure!==void 0?s.ignoreJSONStructure:this.options.ignoreJSONStructure;let l;e.indexOf(".")>-1?l=e.split("."):(l=[e,r],n&&(Array.isArray(n)?l.push(...n):Ge(n)&&i?l.push(...n.split(i)):l.push(n)));const c=U0(this.data,l);return!c&&!r&&!n&&e.indexOf(".")>-1&&(e=l[0],r=l[1],n=l.slice(2).join(".")),c||!a||!Ge(n)?c:pv((d=(u=this.data)==null?void 0:u[e])==null?void 0:d[r],n,i)}addResource(e,r,n,s,i={silent:!1}){const a=i.keySeparator!==void 0?i.keySeparator:this.options.keySeparator;let l=[e,r];
vendor: 1,825 bytes, line 259
259n&&(l=l.concat(a?n.split(a):n)),e.indexOf(".")>-1&&(l=e.split("."),s=r,r=l[1]),this.addNamespaces(r),$4(this.data,l,s),i.silent||this.emit("added",e,r,n,s)}addResources(e,r,n,s={silent:!1}){for(const i in n)(Ge(n[i])||Array.isArray(n[i]))&&this.addResource(e,r,i,n[i],{silent:!0});s.silent||this.emit("added",e,r,n)}addResourceBundle(e,r,n,s,i,a={silent:!1,skipCopy:!1}){let l=[e,r];e.indexOf(".")>-1&&(l=e.split("."),s=n,n=r,r=l[1]),this.addNamespaces(r);let c=U0(this.data,l)||{};a.skipCopy||(n=JSON.parse(JSON.stringify(n))),s?MI(c,n,i):c={...c,...n},$4(this.data,l,c),a.silent||this.emit("added",e,r,n)}removeResourceBundle(e,r){this.hasResourceBundle(e,r)&&delete this.data[e][r],this.removeNamespaces(r),this.emit("removed",e,r)}hasResourceBundle(e,r){return this.getResource(e,r)!==void 0}getResourceBundle(e,r){return r||(r=this.options.defaultNS),this.getResource(e,r)}getDataByLanguage(e){return this.data[e]}hasLanguageSomeTranslations(e){const r=this.getDataByLanguage(e);return!!(r&&Object.keys(r)||[]).find(s=>r[s]&&Object.keys(r[s]).length>0)}toJSON(){return this.data}}var DI={processors:{},addPostProcessor(t){this.processors[t.name]=t},handle(t,e,r,n,s){return t.forEach(i=>{var a;e=((a=this.processors[i])==null?void 0:a.process(e,r,n,s))??e}),e}};const FI=Symbol("i18next/PATH_KEY");function KW(){const t=[],e=Object.create(null);let r;return e.get=(n,s)=>{var i;return(i=r==null?void 0:r.revoke)==null||i.call(r),s===FI?t:(t.push(s),r=Proxy.revocable(n,e),r.proxy)},Proxy.revocable(Object.create(null),e).proxy}function fv(t,e){const{[FI]:r}=t(KW());return r.join((e==null?void 0:e.keySeparator)??".")}const W4={},sw=t=>!Ge(t)&&typeof t!="boolean"&&typeof t!="number";class V0 extends Sy{constructor(e,r={}){super(),LW(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","
259i18nFormat","utils"],e,this),this.options=r,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=ki.create("translator")}changeLanguage(e){e&&(this.language=e)}exists(e,r={interpolation:{}}){const n={...r};if(e==null)return!1;const s=this.resolve(e,n);if((s==null?void 0:s.res)===void 0)return!1;const i=sw(s.res);return!(n.returnObjects===!1&&i)}extractFromKey(e,r){let n=r.nsSeparator!==void 0?r.nsSeparator:this.options.nsSeparator;n===void 0&&(n=":");const s=r.keySeparator!==void 0?r.keySeparator:this.options.keySeparator;let i=r.ns||this.options.defaultNS||[];const a=n&&e.indexOf(n)>-1,l=!this.options.userDefinedKeySeparator&&!r.keySeparator&&!this.options.userDefinedNsSeparator&&!r.nsSeparator&&!HW(e,n,s);if(a&&!l){const c=e.match(this.interpolator.nestingRegexp);if(c&&c.length>0)return{key:e,namespaces:Ge(i)?[i]:i};const u=e.split(n);(n!==s||n===s&&this.options.ns.indexOf(u[0])>-1)&&(i=u.shift()),e=u.join(s)}return{key:e,namespaces:Ge(i)?[i]:i}}translate(e,r,n){let s=typeof r=="object"?{...r}:r;if(typeof s!="object"&&this.options.overloadTranslationOptionHandler&&(s=this.options.overloadTranslationOptionHandler(arguments)),typeof s=="object"&&(s={...s}),s||(s={}),e==null)return"";typeof e=="function"&&(e=fv(e,{...this.options,...s})),Array.isArray(e)||(e=[String(e)]);const i=s.returnDetails!==void 0?s.returnDetails:this.options.returnDetails,a=s.keySeparator!==void 0?s.keySeparator:this.options.keySeparator,{key:l,namespaces:c}=this.extractFromKey(e[e.length-1],s),u=c[c.length-1];let d=s.nsSeparator!==void 0?s.nsSeparator:this.options.nsSeparator;d===void 0&&(d=":");const h=s.lng||this.language,p=s.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if((h==null?void 0:h.toLowerCase())==="cimode")return p?i?{res:`${u}${d}${l}`,usedKey:l,exactUsedKey:l,usedLng:h,usedNS:u,usedParams:this.getUsedParamsDetails(s)}:`${u}${d}${l}`:i?{res:l,usedKey:l,exactUsedKey:l,usedLng:h,usedNS:u,usedParams:this.getUsedParamsDetails(s)}:l;const f=this.resolve(e,s);let m=f==null?void 0:f.res;const y=(f==null?void 0:f.usedKey)||l,k=(f==null?void 0:f.exactUsedKey)||l,g=["[object Number]","[object Function]","[object RegExp]"],x=s.joinArrays!==void 0?s.joinArrays:this.options.joinArrays,w=!this.i18nFormat||this.i18nFormat.handleAsObject,b=s.count!==void 0&&!Ge(s.count),v=V0.hasDefaultValue(s),A=b?this.pluralResolver.getSuffix(h,s.count,s):"",C=s.ordinal&&b?this.pluralResolver.getSuffix(h,s.count,{ordinal:!1}):"",_=b&&!s.ordinal&&s.count===0,N=_&&s[`defaultValue${this.options.pluralSeparator}zero`]||s[`defaultValue${A}`]||s[`defaultValue${C}`]||s.defaultValue;let W=m;w&&!m&&v&&(W=N);const K=sw(W),T=Object.prototype.toString.apply(W);if(w&&W&&K&&g.indexOf(T)<0&&!(Ge(x)&&Array.isArray(W))){if(!s.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const F=this.options.returnedObjectHandler?this.options.returnedObjectHandler(y,W,{...s,ns:c}):`key '${l} (${this.language})' returned an object instead of string.`;return i?(f.res=F,f.usedParams=this.getUsedParamsDetails(s),f):F}if(a){const F=Array.isArray(W),E=F?[]:{},H=F?k:y;for(const Y in W)if(Object.prototype.hasOwnProperty.call(W,Y)){const $=`${H}${a}${Y}`;v&&!m?E[Y]=this.translate($,{...s,defaultValue:sw(N)?N[Y]:void 0,joinArrays:!1,ns:c}):E[Y]=this.translate($,{...s,joinArrays:!1,ns:c}),E[Y]===$&&(E[Y]=W[Y])}m=E}}else if(w&&Ge(x)&&Array.isArray(m))m=m.join(x),m&&(m=this.extendTranslation(m,e,s,n));else{let F=!1,E=!1;!this.isValidLookup(m)&&v&&(F=!0,m=N),this.isValidLookup(m)||(E=!0,m=l);const Y=(s.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&E?void 0:m,$=v&&N!==m&&this.options.updateMissing;if(E||F||$){if(this.logger.log($?"updateKey":"missingKey",h,u,l,$?N:m),a){const G=this.resolve(l,{...s,keySeparator:!1});G&&G.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let D=[];const J=this.languageUtils.getFallbackCodes(this.options.fallbackLng,s.lng||this.language);if(this.options.saveMissingTo==="fallback"&&J&&J[0])for(let G=0;G<J.length;G++)D.push(J[G]);else this.options.saveMissingTo==="all"?D=this.languageUtils.toResolveHierarchy(s.lng||this.language):D.push(s.lng||this.language);const de=(G,B,re)=>{var ge;const ae=v&&re!==m?re:Y;this.options.missingKeyHandler?this.options.missingKeyHandler(G,u,B,ae,$,s):(ge=this.backendConnector)!=null&&ge.saveMissing&&this.backendConnector.saveMissing(G,u,B,ae,$,s),this.emit
vendor: 27,019 bytes, line 259
259("missingKey",G,u,B,m)};this.options.saveMissing&&(this.options.saveMissingPlurals&&b?D.forEach(G=>{const B=this.pluralResolver.getSuffixes(G,s);_&&s[`defaultValue${this.options.pluralSeparator}zero`]&&B.indexOf(`${this.options.pluralSeparator}zero`)<0&&B.push(`${this.options.pluralSeparator}zero`),B.forEach(re=>{de([G],l+re,s[`defaultValue${re}`]||N)})}):de(D,l,N))}m=this.extendTranslation(m,e,s,f,n),E&&m===l&&this.options.appendNamespaceToMissingKey&&(m=`${u}${d}${l}`),(E||F)&&this.options.parseMissingKeyHandler&&(m=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${u}${d}${l}`:l,F?m:void 0,s))}return i?(f.res=m,f.usedParams=this.getUsedParamsDetails(s),f):m}extendTranslation(e,r,n,s,i){var c,u;if((c=this.i18nFormat)!=null&&c.parse)e=this.i18nFormat.parse(e,{...this.options.interpolation.defaultVariables,...n},n.lng||this.language||s.usedLng,s.usedNS,s.usedKey,{resolved:s});else if(!n.skipInterpolation){n.interpolation&&this.interpolator.init({...n,interpolation:{...this.options.interpolation,...n.interpolation}});const d=Ge(e)&&(((u=n==null?void 0:n.interpolation)==null?void 0:u.skipOnVariables)!==void 0?n.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let h;if(d){const f=e.match(this.interpolator.nestingRegexp);h=f&&f.length}let p=n.replace&&!Ge(n.replace)?n.replace:n;if(this.options.interpolation.defaultVariables&&(p={...this.options.interpolation.defaultVariables,...p}),e=this.interpolator.interpolate(e,p,n.lng||this.language||s.usedLng,n),d){const f=e.match(this.interpolator.nestingRegexp),m=f&&f.length;h<m&&(n.nest=!1)}!n.lng&&s&&s.res&&(n.lng=this.language||s.usedLng),n.nest!==!1&&(e=this.interpolator.nest(e,(...f)=>(i==null?void 0:i[0])===f[0]&&!n.context?(this.logger.warn(`It seems you are nesting recursively key: ${f[0]} in key: ${r[0]}`),null):this.translate(...f,r),n)),n.interpolation&&this.interpolator.reset()}const a=n.postProcess||this.options.postProcess,l=Ge(a)?[a]:a;return e!=null&&(l!=null&&l.length)&&n.applyPostProcessor!==!1&&(e=DI.handle(l,e,r,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...s,usedParams:this.getUsedParamsDetails(n)},...n}:n,this)),e}resolve(e,r={}){let n,s,i,a,l;return Ge(e)&&(e=[e]),e.forEach(c=>{if(this.isValidLookup(n))return;const u=this.extractFromKey(c,r),d=u.key;s=d;let h=u.namespaces;this.options.fallbackNS&&(h=h.concat(this.options.fallbackNS));const p=r.count!==void 0&&!Ge(r.count),f=p&&!r.ordinal&&r.count===0,m=r.context!==void 0&&(Ge(r.context)||typeof r.context=="number")&&r.context!=="",y=r.lngs?r.lngs:this.languageUtils.toResolveHierarchy(r.lng||this.language,r.fallbackLng);h.forEach(k=>{var g,x;this.isValidLookup(n)||(l=k,!W4[`${y[0]}-${k}`]&&((g=this.utils)!=null&&g.hasLoadedNamespace)&&!((x=this.utils)!=null&&x.hasLoadedNamespace(l))&&(W4[`${y[0]}-${k}`]=!0,this.logger.warn(`key "${s}" for languages "${y.join(", ")}" won't get resolved as namespace "${l}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),y.forEach(w=>{var A;if(this.isValidLookup(n))return;a=w;const b=[d];if((A=this.i18nFormat)!=null&&A.addLookupKeys)this.i18nFormat.addLookupKeys(b,d,w,k,r);else{let C;p&&(C=this.pluralResolver.getSuffix(w,r.count,r));const _=`${this.options.pluralSeparator}zero`,N=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(p&&(r.ordinal&&C.indexOf(N)===0&&b.push(d+C.replace(N,this.options.pluralSeparator)),b.push(d+C),f&&b.push(d+_)),m){const W=`${d}${this.options.contextSeparator||"_"}${r.context}`;b.push(W),p&&(r.ordinal&&C.indexOf(N)===0&&b.push(W+C.replace(N,this.options.pluralSeparator)),b.push(W+C),f&&b.push(W+_))}}let v;for(;v=b.pop();)this.isValidLookup(n)||(i=v,n=this.getResource(w,k,v,r))}))})}),{res:n,usedKey:s,exactUsedKey:i,usedLng:a,usedNS:l}}isValidLookup(e){return e!==void 0&&!(!this.options.returnNull&&e===null)&&!(!this.options.returnEmptyString&&e==="")}getResource(e,r,n,s={}){var i;return(i=this.i18nFormat)!=null&&i.getResource?this.i18nFormat.getResource(e,r,n,s):this.resourceStore.getResource(e,r,n,s)}getUsedParamsDetails(e={}){const r=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],n=e.replace&&!Ge(e.replace);let s=n?e.replace:e;if(n&&typeof e.count<"u"&&(s.count=e.count),this.options.interpolation.defaultVariables&&(s={...this.options.interpolation.defaultVariables,...s}),!n){s={...s};for(const i of r)delete s[i]}return s}static hasDefaultValue(e){const r="defaultValue";for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&r===n.substring(0,r.length)&&e[n]!==void 0)return!0;return!1}}class V4{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=ki.create("languageUtils")}getScriptPartFromCode(e){if(e=Sp(e),!e||e.indexOf("-")<0)return null;const r=e.split("-");return r.length===2||(r.pop(),r[r.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(r.join("-"))}getLanguagePartFromCode(e){if(e=Sp(e),!e||e.indexOf("-")<0)return e;const r=e.split("-");return this.formatLanguageCode(r[0])}formatLanguageCode(e){if(Ge(e)&&e.indexOf("-")>-1){let r;try{r=Intl.getCanonicalLocales(e)[0]}catch{}return r&&this.options.lowerCaseLng&&(r=r.toLowerCase()),r||(this.options.lowerCaseLng?e.toLowerCase():e)}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}isSupportedCode(e){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(e)>-1}getBestMatchFromCodes(e){if(!e)return null;let r;return e.forEach(n=>{if(r)return;const s=this.formatLanguageCode(n);(!this.options.supportedLngs||this.isSupportedCode(s))&&(r=s)}),!r&&this.options.supportedLngs&&e.forEach(n=>{if(r)return;const s=this.getScriptPartFromCode(n);if(this.isSupportedCode(s))return r=s;const i=this.getLanguagePartFromCode(n);if(this.isSupportedCode(i))return r=i;r=this.options.supportedLngs.find(a=>{if(a===i)return a;if(!(a.indexOf("-")<0&&i.indexOf("-")<0)&&(a.indexOf("-")>0&&i.indexOf("-")<0&&a.substring(0,a.indexOf("-"))===i||a.indexOf(i)===0&&i.length>1))return a})}),r||(r=this.getFallbackCodes(this.options.fallbackLng)[0]),r}getFallbackCodes(e,r){if(!e)return[];if(typeof e=="function"&&(e=e(r)),Ge(e)&&(e=[e]),Array.isArray(e))return e;if(!r)return e.default||[];let n=e[r];return n||(n=e[this.getScriptPartFromCode(r)]),n||(n=e[this.formatLanguageCode(r)]),n||(n=e[this.getLanguagePartFromCode(r)]),n||(n=e.default),n||[]}toResolveHierarchy(e,r){const n=this.getFallbackCodes((r===!1?[]:r)||this.options.fallbackLng||[],e),s=[],i=a=>{a&&(this.isSupportedCode(a)?s.push(a):this.logger.warn(`rejecting language code not found in supportedLngs: ${a}`))};return Ge(e)&&(e.indexOf("-")>-1||e.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&i(this.formatLanguageCode(e)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&i(this.getScriptPartFromCode(e)),this.options.load!=="currentOnly"&&i(this.getLanguagePartFromCode(e))):Ge(e)&&i(this.formatLanguageCode(e)),n.forEach(a=>{s.indexOf(a)<0&&i(this.formatLanguageCode(a))}),s}}const H4={zero:0,one:1,two:2,few:3,many:4,other:5},q4={select:t=>t===1?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class GW{constructor(e,r={}){this.languageUtils=e,this.options=r,this.logger=ki.create("pluralResolver"),this.pluralRulesCache={}}clearCache(){this.pluralRulesCache={}}getRule(e,r={}){const n=Sp(e==="dev"?"en":e),s=r.ordinal?"ordinal":"cardinal",i=JSON.stringify({cleanedCode:n,type:s});if(i in this.pluralRulesCache)return this.pluralRulesCache[i];let a;try{a=new Intl.PluralRules(n,{type:s})}catch{if(!Intl)return this.logger.error("No Intl support, please use an Intl polyfill!"),q4;if(!e.match(/-|_/))return q4;const c=this.languageUtils.getLanguagePartFromCode(e);a=this.getRule(c,r)}return this.pluralRulesCache[i]=a,a}needsPlural(e,r={}){let n=this.getRule(e,r);return n||(n=this.getRule("dev",r)),(n==null?void 0:n.resolvedOptions().pluralCategories.length)>1}getPluralFormsOfKey(e,r,n={}){return this.getSuffixes(e,n).map(s=>`${r}${s}`)}getSuffixes(e,r={}){let n=this.getRule(e,r);return n||(n=this.getRule("dev",r)),n?n.resolvedOptions().pluralCategories.sort((s,i)=>H4[s]-H4[i]).map(s=>`${this.options.prepend}${r.ordinal?`ordinal${this.options.prepend}`:""}${s}`):[]}getSuffix(e,r,n={}){const s=this.getRule(e,n);return s?`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${s.select(r)}`:(this.logger.warn(`no plural rule found for: ${e}`),this.getSuffix("dev",r,n))}}const K4=(t,e,r,n=".",s=!0)=>{let i=FW(t,e,r);return!i&&s&&Ge(r)&&(i=pv(t,r,n),i===void 0&&(i=pv(e,r,n))),i},iw=t=>t.replace(/\$/g,"$$$$");class G4{constructor(e={}){var r;this.logger=ki.create("interpolator"),this.options=e,this.format=((r=e==null?void 0:e.interpolation)==null?void 0:r.format)||(n=>n),this.init(e)}init(e={}){e.interpolation||(e.interpolation={escapeValue:!0});const{escape:r,escapeValue:n,useRawValueToEscape:s,prefix:i,prefixEscaped:a,suffix:l,suffixEscaped:c,formatSeparator:u,unescapeSuffix:d,unescapePrefix:h,nestingPrefix:p,nestingPrefixEscaped:f,nestingSuffix:m,nestingSuffixEscaped:y,nestingOptionsSeparator:k,maxReplaces:g,alwaysFormat:x}=e.interpolation;this.escape=r!==void 0?r:$W,this.escapeValue=n!==void 0?n:!0,this.useRawValueToEscape=s!==void 0?s:!1,this.prefix=i?Ic(i):a||"{{",this.suffix=l?Ic(l):c||"}}",this.formatSeparator=u||",",this.unescapePrefix=d?"":h||"-",this.unescapeSuffix=this.unescapePrefix?"":d||"",this.nestingPrefix=p?Ic(p):f||Ic("$t("),this.nestingSuffix=m?Ic(m):y||Ic(")"),this.nestingOptionsSeparator=k||",",this.maxReplaces=g||1e3,this.alwaysFormat=x!==void 0?x:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const e=(r,n)=>(r==null?void 0:r.source)===n?(r.lastIndex=0,r):new RegExp(n,"g");this.regexp=e(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=e(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=e(this.nestingRegexp,`${this.nestingPrefix}((?:[^()"']+|"[^"]*"|'[^']*'|\\((?:[^()]|"[^"]*"|'[^']*')*\\))*?)${this.nestingSuffix}`)}interpolate(e,r,n,s){var f;let i,a,l;const c=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},u=m=>{if(m.indexOf(this.formatSeparator)<0){const x=K4(r,c,m,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(x,void 0,n,{...s,...r,interpolationkey:m}):x}const y=m.split(this.formatSeparator),k=y.shift().trim(),g=y.join(this.formatSeparator).trim();return this.format(K4(r,c,k,this.options.keySeparator,this.options.ignoreJSONStructure),g,n,{...s,...r,interpolationkey:k})};this.resetRegExp();const d=(s==null?void 0:s.missingInterpolationHandler)||this.options.missingInterpolationHandler,h=((f=s==null?void 0:s.interpolation)==null?void 0:f.skipOnVariables)!==void 0?s.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:m=>iw(m)},{regex:this.regexp,safeValue:m=>this.escapeValue?iw(this.escape(m)):iw(m)}].forEach(m=>{for(l=0;i=m.regex.exec(e);){const y=i[1].trim();if(a=u(y),a===void 0)if(typeof d=="function"){const g=d(e,i,s);a=Ge(g)?g:""}else if(s&&Object.prototype.hasOwnProperty.call(s,y))a="";else if(h){a=i[0];continue}else this.logger.warn(`missed to pass in variable ${y} for interpolating ${e}`),a="";else!Ge(a)&&!this.useRawValueToEscape&&(a=D4(a));const k=m.safeValue(a);if(e=e.replace(i[0],k),h?(m.regex.lastIndex+=a.length,m.regex.lastIndex-=i[0].length):m.regex.lastIndex=0,l++,l>=this.maxReplaces)break}}),e}nest(e,r,n={}){let s,i,a;const l=(c,u)=>{const d=this.nestingOptionsSeparator;if(c.indexOf(d)<0)return c;const h=c.split(new RegExp(`${d}[ ]*{`));let p=`{${h[1]}`;c=h[0],p=this.interpolate(p,a);const f=p.match(/'/g),m=p.match(/"/g);(((f==null?void 0:f.length)??0)%2===0&&!m||m.length%2!==0)&&(p=p.replace(/'/g,'"'));try{a=JSON.parse(p),u&&(a={...u,...a})}catch(y){return this.logger.warn(`failed parsing options string in nesting for key ${c}`,y),`${c}${d}${p}`}return a.defaultValue&&a.defaultValue.indexOf(this.prefix)>-1&&delete a.defaultValue,c};for(;s=this.nestingRegexp.exec(e);){let c=[];a={...n},a=a.replace&&!Ge(a.replace)?a.replace:a,a.applyPostProcessor=!1,delete a.defaultValue;const u=/{.*}/.test(s[1])?s[1].lastIndexOf("}")+1:s[1].indexOf(this.formatSeparator);if(u!==-1&&(c=s[1].slice(u).split(this.formatSeparator).map(d=>d.trim()).filter(Boolean),s[1]=s[1].slice(0,u)),i=r(l.call(this,s[1].trim(),a),a),i&&s[0]===e&&!Ge(i))return i;Ge(i)||(i=D4(i)),i||(this.logger.warn(`missed to resolve ${s[1]} for nesting ${e}`),i=""),c.length&&(i=c.reduce((d,h)=>this.format(d,h,n.lng,{...n,interpolationkey:s[1].trim()}),i.trim())),e=e.replace(s[0],i),this.regexp.lastIndex=0}return e}}const ZW=t=>{let e=t.toLowerCase().trim();const r={};if(t.indexOf("(")>-1){const n=t.split("(");e=n[0].toLowerCase().trim();const s=n[1].substring(0,n[1].length-1);e==="currency"&&s.indexOf(":")<0?r.currency||(r.currency=s.trim()):e==="relativetime"&&s.indexOf(":")<0?r.range||(r.range=s.trim()):s.split(";").forEach(a=>{if(a){const[l,...c]=a.split(":"),u=c.join(":").trim().replace(/^'+|'+$/g,""),d=l.trim();r[d]||(r[d]=u),u==="false"&&(r[d]=!1),u==="true"&&(r[d]=!0),isNaN(u)||(r[d]=parseInt(u,10))}})}return{formatName:e,formatOptions:r}},Z4=t=>{const e={};return(r,n,s)=>{let i=s;s&&s.interpolationkey&&s.formatParams&&s.formatParams[s.interpolationkey]&&s[s.interpolationkey]&&(i={...i,[s.interpolationkey]:void 0});const a=n+JSON.stringify(i);let l=e[a];return l||(l=t(Sp(n),s),e[a]=l),l(r)}},YW=t=>(e,r,n)=>t(Sp(r),n)(e);let JW=class{constructor(e={}){this.logger=ki.create("formatter"),this.options=e,this.init(e)}init(e,r={interpolation:{}}){this.formatSeparator=r.interpolation.formatSeparator||",";const n=r.cacheInBuiltFormats?Z4:YW;this.formats={number:n((s,i)=>{const a=new Intl.NumberFormat(s,{...i});return l=>a.format(l)}),currency:n((s,i)=>{const a=new Intl.NumberFormat(s,{...i,style:"currency"});return l=>a.format(l)}),datetime:n((s,i)=>{const a=new Intl.DateTimeFormat(s,{...i});return l=>a.format(l)}),relativetime:n((s,i)=>{const a=new Intl.RelativeTimeFormat(s,{...i});return l=>a.format(l,i.range||"day")}),list:n((s,i)=>{const a=new Intl.ListFormat(s,{...i});return l=>a.format(l)})}}add(e,r){this.formats[e.toLowerCase().trim()]=r}addCached(e,r){this.formats[e.toLowerCase().trim()]=Z4(r)}format(e,r,n,s={}){const i=r.split(this.formatSeparator);if(i.length>1&&i[0].indexOf("(")>1&&i[0].indexOf(")")<0&&i.find(l=>l.indexOf(")")>-1)){const l=i.findIndex(c=>c.indexOf(")")>-1);i[0]=[i[0],...i.splice(1,l)].join(this.formatSeparator)}return i.reduce((l,c)=>{var h;const{formatName:u,formatOptions:d}=ZW(c);if(this.formats[u]){let p=l;try{const f=((h=s==null?void 0:s.formatParams)==null?void 0:h[s.interpolationkey])||{},m=f.locale||f.lng||s.locale||s.lng||n;p=this.formats[u](l,m,{...d,...s,...f})}catch(f){this.logger.warn(f)}return p}else this.logger.warn(`there was no format function for ${u}`);return l},e)}};const XW=(t,e)=>{t.pending[e]!==void 0&&(delete t.pending[e],t.pendingCount--)};class QW extends Sy{constructor(e,r,n,s={}){var i,a;super(),this.backend=e,this.store=r,this.services=n,this.languageUtils=n.languageUtils,this.options=s,this.logger=ki.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=s.maxParallelReads||10,this.readingCalls=0,this.maxRetries=s.maxRetries>=0?s.maxRetries:5,this.retryTimeout=s.retryTimeout>=1?s.retryTimeout:350,this.state={},this.queue=[],(a=(i=this.backend)==null?void 0:i.init)==null||a.call(i,n,s.backend,s)}queueLoad(e,r,n,s){const i={},a={},l={},c={};return e.forEach(u=>{let d=!0;r.forEach(h=>{const p=`${u}|${h}`;!n.reload&&this.store.hasResourceBundle(u,h)?this.state[p]=2:this.state[p]<0||(this.state[p]===1?a[p]===void 0&&(a[p]=!0):(this.state[p]=1,d=!1,a[p]===void 0&&(a[p]=!0),i[p]===void 0&&(i[p]=!0),c[h]===void 0&&(c[h]=!0)))}),d||(l[u]=!0)}),(Object.keys(i).length||Object.keys(a).length)&&this.queue.push({pending:a,pendingCount:Object.keys(a).length,loaded:{},errors:[],callback:s}),{toLoad:Object.keys(i),pending:Object.keys(a),toLoadLanguages:Object.keys(l),toLoadNamespaces:Object.keys(c)}}loaded(e,r,n){const s=e.split("|"),i=s[0],a=s[1];r&&this.emit("failedLoading",i,a,r),!r&&n&&this.store.addResourceBundle(i,a,n,void 0,void 0,{skipCopy:!0}),this.state[e]=r?-1:2,r&&n&&(this.state[e]=0);const l={};this.queue.forEach(c=>{DW(c.loaded,[i],a),XW(c,e),r&&c.errors.push(r),c.pendingCount===0&&!c.done&&(Object.keys(c.loaded).forEach(u=>{l[u]||(l[u]={});const d=c.loaded[u];d.length&&d.forEach(h=>{l[u][h]===void 0&&(l[u][h]=!0)})}),c.done=!0,c.errors.length?c.callback(c.errors):c.callback())}),this.emit("loaded",l),this.queue=this.queue.filter(c=>!c.done)}read(e,r,n,s=0,i=this.retryTimeout,a){if(!e.length)return a(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:e,ns:r,fcName:n,tried:s,wait:i,callback:a});return}this.readingCalls++;const l=(u,d)=>{if(this.readingCalls--,this.waitingReads.length>0){const h=this.waitingReads.shift();this.read(h.lng,h.ns,h.fcName,h.tried,h.wait,h.callback)}if(u&&d&&s<this.maxRetries){setTimeout(()=>{this.read.call(this,e,r,n,s+1,i*2,a)},i);return}a(u,d)},c=this.backend[n].bind(this.backend);if(c.length===2){try{const u=c(e,r);u&&typeof u.then=="function"?u.then(d=>l(null,d)).catch(l):l(null,u)}catch(u){l(u)}return}return c(e,r,l)}prepareLoading(e,r,n={},s){if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),s&&s();Ge(e)&&(e=this.languageUtils.toResolveHierarchy(e)),Ge(r)&&(r=[r]);const i=this.queueLoad(e,r,n,s);if(!i.toLoad.length)return i.pending.length||s(),null;i.toLoad.forEach(a=>{this.loadOne(a)})}load(e,r,n){this.prepareLoading(e,r,{},n)}reload(e,r,n){this.prepareLoading(e,r,{reload:!0},n)}loadOne(e,r=""){const n=e.split("|"),s=n[0],i=n[1];this.read(s,i,"read",void 0,void 0,(a,l)=>{a&&this.logger.warn(`${r}loading namespace ${i} for language ${s} failed`,a),!a&&l&&this.logger.log(`${r}loaded namespace ${i} for language ${s}`,l),this.loaded(e,a,l)})}saveMissing(e,r,n,s,i,a={},l=()=>{}){var c,u,d,h,p;if((u=(c=this.services)==null?void 0:c.utils)!=null&&u.hasLoadedNamespace&&!((h=(d=this.services)==null?void 0:d.utils)!=null&&h.hasLoadedNamespace(r))){this.logger.warn(`did not save key "${n}" as the namespace "${r}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}if(!(n==null||n==="")){if((p=this.backend)!=null&&p.create){const f={...a,isUpdate:i},m=this.backend.create.bind(this.backend);if(m.length<6)try{let y;m.length===5?y=m(e,r,n,s,f):y=m(e,r,n,s),y&&typeof y.then=="function"?y.then(k=>l(null,k)).catch(l):l(null,y)}catch(y){l(y)}else m(e,r,n,s,l,f)}!e||!e[0]||this.store.addResource(e[0],r,n,s)}}}const aw=()=>({debug:!1,initAsync:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:t=>{let e={};if(typeof t[1]=="object"&&(e=t[1]),Ge(t[1])&&(e.defaultValue=t[1]),Ge(t[2])&&(e.tDescription=t[2]),typeof t[2]=="object"||typeof t[3]=="object"){const r=t[3]||t[2];Object.keys(r).forEach(n=>{e[n]=r[n]})}return e},interpolation:{escapeValue:!0,format:t=>t,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0},cacheInBuiltFormats:!0}),Y4=t=>{var e,r;return Ge(t.ns)&&(t.ns=[t.ns]),Ge(t.fallbackLng)&&(t.fallbackLng=[t.fallbackLng]),Ge(t.fallbackNS)&&(t.fallbackNS=[t.fallbackNS]),((r=(e=t.supportedLngs)==null?void 0:e.indexOf)==null?void 0:r.call(e,"cimode"))<0&&(t.supportedLngs=t.supportedLngs.concat(["cimode"])),typeof t.initImmediate=="boolean"&&(t.initAsync=t.initImmediate),t},im=()=>{},eV=t=>{Object.getOwnPropertyNames(Object.getPrototypeOf(t)).forEach(r=>{typeof t[r]=="function"&&(t[r]=t[r].bind(t))})};class Mh extends Sy{constructor(e={},r){if(super(),this.options=Y4(e),this.services={},this.logger=ki,this.modules={external:[]},eV(this),r&&!this.isInitialized&&!e.isClone){if(!this.options.initAsync)return this.init(e,r),this;setTimeout(()=>{this.init(e,r)},0)}}init(e={},r){this.isInitializing=!0,typeof e=="function"&&(r=e,e={}),e.defaultNS==null&&e.ns&&(Ge(e.ns)?e.defaultNS=e.ns:e.ns.indexOf("translation")<0&&(e.defaultNS=e.ns[0]));const n=aw();this.options={...n,...this.options,...Y4(e)},this.options.interpolation={...n.interpolation,...this.options.interpolation},e.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=e.keySeparator),e.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=e.nsSeparator),typeof this.options.overloadTranslationOptionHandler!="function"&&(this.options.overloadTranslationOptionHandler=n.overloadTranslationOptionHandler),this.options.debug===!0&&typeof console<"u"&&console.warn("i18next is maintained with support from locize.com — consider powering your project with managed localization (AI, CDN, integrations): https://locize.com");const s=u=>u?typeof u=="function"?new u:u:null;if(!this.options.isClone){this.modules.logger?ki.init(s(this.modules.logger),this.options):ki.init(null,this.options);let u;this.modules.formatter?u=this.modules.formatter:u=JW;const d=new V4(this.options);this.store=new U4(this.options.resources,this.options);const h=this.services;h.logger=ki,h.resourceStore=this.store,h.languageUtils=d,h.pluralResolver=new GW(d,{prepend:this.options.pluralSeparator,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),this.options.interpolation.format&&this.options.interpolation.format!==n.interpolation.format&&this.logger.deprecate("init: you are still using the legacy format function, please use the new approach: https://www.i18next.com/translation-function/formatting"),u&&(!this.options.interpolation.format||this.options.interpolation.format===n.interpolation.format)&&(h.formatter=s(u),h.formatter.init&&h.formatter.init(h,this.options),this.options.interpolation.format=h.formatter.format.bind(h.formatter)),h.interpolator=new G4(this.options),h.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},h.backendConnector=new QW(s(this.modules.backend),h.resourceStore,h,this.options),h.backendConnector.on("*",(f,...m)=>{this.emit(f,...m)}),this.modules.languageDetector&&(h.languageDetector=s(this.modules.languageDetector),h.languageDetector.init&&h.languageDetector.init(h,this.options.detection,this.options)),this.modules.i18nFormat&&(h.i18nFormat=s(this.modules.i18nFormat),h.i18nFormat.init&&h.i18nFormat.init(this)),this.translator=new V0(this.services,this.options),this.translator.on("*",(f,...m)=>{this.emit(f,...m)}),this.modules.external.forEach(f=>{f.init&&f.init(this)})}if(this.format=this.options.interpolation.format,r||(r=im),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const u=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);u.length>0&&u[0]!=="dev"&&(this.options.lng=u[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(u=>{this[u]=(...d)=>this.store[u](...d)}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(u=>{this[u]=(...d)=>(this.store[u](...d),this)});const l=Qd(),c=()=>{const u=(d,h)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),l.resolve(h),r(d,h)};if(this.languages&&!this.isInitialized)return u(null,this.t.bind(this));this.changeLanguage(this.options.lng,u)};return this.options.resources||!this.options.initAsync?c():setTimeout(c,0),l}loadResources(e,r=im){var i,a;let n=r;const s=Ge(e)?e:this.language;if(typeof e=="function"&&(n=e),!this.options.resources||this.options.partialBundledLanguages){if((s==null?void 0:s.toLowerCase())==="cimode"&&(!this.options.preload||this.options.preload.length===0))return n();const l=[],c=u=>{if(!u||u==="cimode")return;this.services.languageUtils.toResolveHierarchy(u).forEach(h=>{h!=="cimode"&&l.indexOf(h)<0&&l.push(h)})};s?c(s):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(d=>c(d)),(a=(i=this.options.preload)==null?void 0:i.forEach)==null||a.call(i,u=>c(u)),this.services.backendConnector.load(l,this.options.ns,u=>{!u&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),n(u)})}else n(null)}reloadResources(e,r,n){const s=Qd();return typeof e=="function"&&(n=e,e=void 0),typeof r=="function"&&(n=r,r=void 0),e||(e=this.languages),r||(r=this.options.ns),n||(n=im),this.services.backendConnector.reload(e,r,i=>{s.resolve(),n(i)}),s}use(e){if(!e)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!e.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return e.type==="backend"&&(this.modules.backend=e),(e.type==="logger"||e.log&&e.warn&&e.error)&&(this.modules.logger=e),e.type==="languageDetector"&&(this.modules.languageDetector=e),e.type==="i18nFormat"&&(this.modules.i18nFormat=e),e.type==="postProcessor"&&DI.addPostProcessor(e),e.type==="formatter"&&(this.modules.formatter=e),e.type==="3rdParty"&&this.modules.external.push(e),this}setResolvedLanguage(e){if(!(!e||!this.languages)&&!(["cimode","dev"].indexOf(e)>-1)){for(let r=0;r<this.languages.length;r++){const n=this.languages[r];if(!(["cimode","dev"].indexOf(n)>-1)&&this.store.hasLanguageSomeTranslations(n)){this.resolvedLanguage=n;break}}!this.resolvedLanguage&&this.languages.indexOf(e)<0&&this.store.hasLanguageSomeTranslations(e)&&(this.resolvedLanguage=e,this.languages.unshift(e))}}changeLanguage(e,r){this.isLanguageChangingTo=e;
vendor: 2,151 bytes, line 259
259const n=Qd();this.emit("languageChanging",e);const s=l=>{this.language=l,this.languages=this.services.languageUtils.toResolveHierarchy(l),this.resolvedLanguage=void 0,this.setResolvedLanguage(l)},i=(l,c)=>{c?this.isLanguageChangingTo===e&&(s(c),this.translator.changeLanguage(c),this.isLanguageChangingTo=void 0,this.emit("languageChanged",c),this.logger.log("languageChanged",c)):this.isLanguageChangingTo=void 0,n.resolve((...u)=>this.t(...u)),r&&r(l,(...u)=>this.t(...u))},a=l=>{var d,h;!e&&!l&&this.services.languageDetector&&(l=[]);const c=Ge(l)?l:l&&l[0],u=this.store.hasLanguageSomeTranslations(c)?c:this.services.languageUtils.getBestMatchFromCodes(Ge(l)?[l]:l);u&&(this.language||s(u),this.translator.language||this.translator.changeLanguage(u),(h=(d=this.services.languageDetector)==null?void 0:d.cacheUserLanguage)==null||h.call(d,u)),this.loadResources(u,p=>{i(p,u)})};return!e&&this.services.languageDetector&&!this.services.languageDetector.async?a(this.services.languageDetector.detect()):!e&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(a):this.services.languageDetector.detect(a):a(e),n}getFixedT(e,r,n){const s=(i,a,...l)=>{let c;typeof a!="object"?c=this.options.overloadTranslationOptionHandler([i,a].concat(l)):c={...a},c.lng=c.lng||s.lng,c.lngs=c.lngs||s.lngs,c.ns=c.ns||s.ns,c.keyPrefix!==""&&(c.keyPrefix=c.keyPrefix||n||s.keyPrefix);const u=this.options.keySeparator||".";let d;return c.keyPrefix&&Array.isArray(i)?d=i.map(h=>(typeof h=="function"&&(h=fv(h,{...this.options,...a})),`${c.keyPrefix}${u}${h}`)):(typeof i=="function"&&(i=fv(i,{...this.options,...a})),d=c.keyPrefix?`${c.keyPrefix}${u}${i}`:i),this.t(d,c)};return Ge(e)?s.lng=e:s.lngs=e,s.ns=r,s.keyPrefix=n,s}t(...e){var r;return(r=this.translator)==null?void 0:r.translate(...e)}exists(...e){var r;return(r=this.translator)==null?void 0:r.exists(...e)}setDefaultNamespace(e){this.options.defaultNS=e}hasLoadedNamespace(e,r={}){if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;
vendor: 4,266 bytes, line 259
259if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const n=r.lng||this.resolvedLanguage||this.languages[0],s=this.options?this.options.fallbackLng:!1,i=this.languages[this.languages.length-1];if(n.toLowerCase()==="cimode")return!0;const a=(l,c)=>{const u=this.services.backendConnector.state[`${l}|${c}`];return u===-1||u===0||u===2};if(r.precheck){const l=r.precheck(this,a);if(l!==void 0)return l}return!!(this.hasResourceBundle(n,e)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||a(n,e)&&(!s||a(i,e)))}loadNamespaces(e,r){const n=Qd();return this.options.ns?(Ge(e)&&(e=[e]),e.forEach(s=>{this.options.ns.indexOf(s)<0&&this.options.ns.push(s)}),this.loadResources(s=>{n.resolve(),r&&r(s)}),n):(r&&r(),Promise.resolve())}loadLanguages(e,r){const n=Qd();Ge(e)&&(e=[e]);const s=this.options.preload||[],i=e.filter(a=>s.indexOf(a)<0&&this.services.languageUtils.isSupportedCode(a));return i.length?(this.options.preload=s.concat(i),this.loadResources(a=>{n.resolve(),r&&r(a)}),n):(r&&r(),Promise.resolve())}dir(e){var s,i;if(e||(e=this.resolvedLanguage||(((s=this.languages)==null?void 0:s.length)>0?this.languages[0]:this.language)),!e)return"rtl";try{const a=new Intl.Locale(e);if(a&&a.getTextInfo){const l=a.getTextInfo();if(l&&l.direction)return l.direction}}catch{}const r=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"],n=((i=this.services)==null?void 0:i.languageUtils)||new V4(aw());return e.toLowerCase().indexOf("-latn")>1?"ltr":r.indexOf(n.getLanguagePartFromCode(e))>-1||e.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(e={},r){const n=new Mh(e,r);return n.createInstance=Mh.createInstance,n}cloneInstance(e={},r=im){const n=e.forkResourceStore;n&&delete e.forkResourceStore;const s={...this.options,...e,isClone:!0},i=new Mh(s);if((e.debug!==void 0||e.prefix!==void 0)&&(i.logger=i.logger.clone(e)),["store","services","language"].forEach(l=>{i[l]=this[l]}),i.services={...this.services},i.services.utils={hasLoadedNamespace:i.hasLoadedNamespace.bind(i)},n){const l=Object.keys(this.store.data).reduce((c,u)=>(c[u]={...this.store.data[u]},c[u]=Object.keys(c[u]).reduce((d,h)=>(d[h]={...c[u][h]},d),c[u]),c),{});i.store=new U4(l,s),i.services.resourceStore=i.store}if(e.interpolation){const c={...aw().interpolation,...this.options.interpolation,...e.interpolation},u={...s,interpolation:c};i.services.interpolator=new G4(u)}return i.translator=new V0(i.services,s),i.translator.on("*",(l,...c)=>{i.emit(l,...c)}),i.init(s,r),i.translator.options=s,i.translator.backendConnector.services.utils={hasLoadedNamespace:i.hasLoadedNamespace.bind(i)},i}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const Xt=Mh.createInstance();Xt.createInstance;Xt.dir;Xt.init;Xt.loadResources;Xt.reloadResources;Xt.use;Xt.changeLanguage;Xt.getFixedT;Xt.t;Xt.exists;Xt.setDefaultNamespace;Xt.hasLoadedNamespace;Xt.loadNamespaces;Xt.loadLanguages;const tV=(t,e,r,n)=>{var i,a,l,c;const s=[r,{code:e,...n||{}}];if((a=(i=t==null?void 0:t.services)==null?void 0:i.logger)!=null&&a.forward)return t.services.logger.forward(s,"warn","react-i18next::",!0);cc(s[0])&&(s[0]=`react-i18next:: ${s[0]}`),(c=(l=t==null?void 0:t.services)==null?void 0:l.logger)!=null&&c.warn?t.services.logger.warn(...s):console!=null&&console.warn&&console.warn(...s)},J4={},BI=(t,e,r,n)=>{cc(r)&&J4[r]||(cc(r)&&(J4[r]=new Date),tV(t,e,r,n))},$I=(t,e)=>()=>{if(t.isInitialized)e();else{const r=()=>{setTimeout(()=>{t.off("initialized",r)},0),e()};t.on("initialized",r)}},mv=(t,e,r)=>{t.loadNamespaces(e,$I(t,r))},X4=(t,e,r,n)=>{if(cc(r)&&(r=[r]),t.options.preload&&t.options.preload.indexOf(e)>-1)return mv(t,r,n);r.forEach(s=>{t.options.ns.indexOf(s)<0&&t.options.ns.push(s)}),t.loadLanguages(e,$I(t,n))},rV=(t,e,r={})=>
259!e.languages||!e.languages.length?(BI(e,"NO_LANGUAGES","i18n.languages were undefined or empty",{languages:e.languages}),!0):e.hasLoadedNamespace(t,{lng:r.lng,precheck:(n,s)=>{if(r.bindI18n&&r.bindI18n.indexOf("languageChanging")>-1&&n.services.backendConnector.backend&&n.isLanguageChangingTo&&!s(n.isLanguageChangingTo,t))return!1}}),cc=t=>typeof t=="string",nV=t=>typeof t=="object"&&t!==null,sV=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,iV={"&amp;":"&","&#38;":"&","&lt;":"<","&#60;":"<","&gt;":">","&#62;":">","&apos;":"'","&#39;":"'","&quot;":'"',"&#34;":'"',"&nbsp;":" ","&#160;":" ","&copy;":"©","&#169;":"©","&reg;":"®","&#174;":"®","&hellip;":"…","&#8230;":"…","&#x2F;":"/","&#47;":"/"},aV=t=>iV[t],oV=t=>t.replace(sV,aV);let gv={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:oV,transDefaultProps:void 0};const lV=(t={})=>{gv={...gv,...t}},cV=()=>gv;let UI;const uV=t=>{UI=t},dV=()=>UI,hV={type:"3rdParty",init(t){lV(t.options.react),uV(t)}},pV=M.createContext();class fV{constructor(){this.usedNamespaces={}}addUsedNamespaces(e){e.forEach(r=>{this.usedNamespaces[r]||(this.usedNamespaces[r]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}}const mV=(t,e)=>cc(e)?e:nV(e)&&cc(e.defaultValue)?e.defaultValue:Array.isArray(t)?t[t.length-1]:t,gV={t:mV,ready:!1},yV=()=>()=>{},He=(t,e={})=>{var N,W,K;const{i18n:r}=e,{i18n:n,defaultNS:s}=M.useContext(pV)||{},i=r||n||dV();i&&!i.reportNamespaces&&(i.reportNamespaces=new fV),i||BI(i,"NO_I18NEXT_INSTANCE","useTranslation: You will need to pass in an i18next instance by using initReactI18next");const a=M.useMemo(()=>{var T;return{...cV(),...(T=i==null?void 0:i.options)==null?void 0:T.react,...e}},[i,e]),{useSuspense:l,keyPrefix:c}=a,u=t||s||((N=i==null?void 0:i.options)==null?void 0:N.defaultNS),d=cc(u)?[u]:u||["translation"],h=M.useMemo(()=>d,d);(K=(W=i==null?void 0:i.reportNamespaces)==null?void 0:W.addUsedNamespaces)==null||K.call(W,h);const p=M.useRef(0),f=M.useCallback(T=>{if(!i)return yV;const{bindI18n:F,bindI18nStore:E}=a,H=()=>{p.current+=1,T()};return F&&i.on(F,H),E&&i.store.on(E,H),()=>{F&&F.split(" ").forEach(Y=>i.off(Y,H)),E&&E.split(" ").forEach(Y=>i.store.off(Y,H))}},[i,a]),m=M.useRef(),y=M.useCallback(()=>{if(!i)return gV;const T=!!(i.isInitialized||i.initializedStoreOnce)&&h.every(D=>rV(D,i,a)),F=e.lng||i.language,E=p.current,H=m.current;if(H&&H.ready===T&&H.lng===F&&H.keyPrefix===c&&H.revision===E)return H;const $={t:i.getFixedT(F,a.nsMode==="fallback"?h:h[0],c),ready:T,lng:F,keyPrefix:c,revision:E};return m.current=$,$},[i,h,c,a,e.lng]),[k,g]=M.useState(0),{t:x,ready:w}=vy.useSyncExternalStore(f,y,y);M.useEffect(()=>{if(i&&!w&&!l){const T=()=>g(F=>F+1);e.lng?X4(i,e.lng,h,T):mv(i,h,T)}},[i,e.lng,h,w,l,k]);const b=i||{},v=M.useRef(null),A=M.useRef(),C=T=>{const F=Object.getOwnPropertyDescriptors(T);F.__original&&delete F.__original;const E=Object.create(Object.getPrototypeOf(T),F);if(!Object.prototype.hasOwnProperty.call(E,"__original"))try{Object.defineProperty(E,"__original",{value:T,writable:!1,enumerable:!1,configurable:!1})}catch{}return E},_=M.useMemo(()=>{const T=b,F=T==null?void 0:T.language;let E=T;T&&(v.current&&v.current.__original===T?A.current!==F?(E=C(T),v.current=E,A.current=F):E=v.current:(E=C(T),v.current=E,A.current=F));const H=[x,E,w];return H.t=x,H.i18n=E,H.ready=w,H},[x,b,w,b.resolvedLanguage,b.language,b.languages]);if(i&&l&&!w)throw new Promise(T=>{const F=()=>T();e.lng?X4(i,e.lng,h,F):mv(i,h,F)});return _};/**
260 * @license lucide-react v0.303.0 - ISC
261 *
262 * This source code is licensed under the ISC license.
263 * See the LICENSE file in the root directory of this source tree.
264 */var xV={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"};/**
265 * @license lucide-react v0.303.0 - ISC
266 *
267 * This source code is licensed under the ISC license.
268 * See the LICENSE file in the root directory of this source tree.
269 */const wV=t=>t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase().trim(),Ne=(t,e)=>{const r=M.forwardRef(({color:n="currentColor",size:s=24,strokeWidth:i=2,absoluteStrokeWidth:a,className:l="",children:c,...u},d)=>M.createElement("svg",{ref:d,...xV,width:s,height:s,stroke:n,strokeWidth:a?Number(i)*24/Number(s):i,className:["lucide",`lucide-${wV(t)}`,l].join(" "),...u},[...e.map(([h,p])=>
269M.createElement(h,p)),...Array.isArray(c)?c:[c]]));return r.displayName=`${t}`,r};/**
270 * @license lucide-react v0.303.0 - ISC
271 *
272 * This source code is licensed under the ISC license.
273 * See the LICENSE file in the root directory of this source tree.
274 */const Dh=Ne("AlertCircle",[["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"}]]);/**
275 * @license lucide-react v0.303.0 - ISC
276 *
277 * This source code is licensed under the ISC license.
278 * See the LICENSE file in the root directory of this source tree.
279 */const Np=Ne("AlertTriangle",[["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-3Z",key:"c3ski4"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);/**
280 * @license lucide-react v0.303.0 - ISC
281 *
282 * This source code is licensed under the ISC license.
283 * See the LICENSE file in the root directory of this source tree.
284 */const ma=Ne("ArrowLeft",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);/**
285 * @license lucide-react v0.303.0 - ISC
286 *
287 * This source code is licensed under the ISC license.
288 * See the LICENSE file in the root directory of this source tree.
289 */const Sr=Ne("ArrowRight",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]);/**
290 * @license lucide-react v0.303.0 - ISC
291 *
292 * This source code is licensed under the ISC license.
293 * See the LICENSE file in the root directory of this source tree.
294 */const bV=Ne("ArrowUpDown",[["path",{d:"m21 16-4 4-4-4",key:"f6ql7i"}],["path",{d:"M17 20V4",key:"1ejh1v"}],["path",{d:"m3 8 4-4 4 4",key:"11wl7u"}],["path",{d:"M7 4v16",key:"1glfcx"}]]);/**
295 * @license lucide-react v0.303.0 - ISC
296 *
297 * This source code is licensed under the ISC license.
298 * See the LICENSE file in the root directory of this source tree.
299 */const WI=Ne("Award",[["circle",{cx:"12",cy:"8",r:"6",key:"1vp47v"}],["path",{d:"M15.477 12.89 17 22l-5-3-5 3 1.523-9.11",key:"em7aur"}]]);/**
300 * @license lucide-react v0.303.0 - ISC
301 *
302 * This source code is licensed under the ISC license.
303 * See the LICENSE file in the root directory of this source tree.
304 */const Ny=Ne("BarChart3",[["path",{d:"M3 3v18h18",key:"1s2lah"}],["path",{d:"M18 17V9",key:"2bz60n"}],["path",{d:"M13 17V5",key:"1frdt8"}],["path",{d:"M8 17v-3",key:"17ska0"}]]);/**
305 * @license lucide-react v0.303.0 - ISC
306 *
307 * This source code is licensed under the ISC license.
308 * See the LICENSE file in the root directory of this source tree.
309 */const Yj=Ne("BookOpen",[["path",{d:"M2 3h6a4 4 0 0 1 4 4v14a3 3 0 0 0-3-3H2z",key:"vv98re"}],["path",{d:"M22 3h-6a4 4 0 0 0-4 4v14a3 3 0 0 1 3-3h7z",key:"1cyq3y"}]]);/**
310 * @license lucide-react v0.303.0 - ISC
311 *
312 * This source code is licensed under the ISC license.
313 * See the LICENSE file in the root directory of this source tree.
314 */const VI=Ne("Boxes",[["path",{d:"M2.97 12.92A2 2 0 0 0 2 14.63v3.24a2 2 0 0 0 .97 1.71l3 1.8a2 2 0 0 0 2.06 0L12 19v-5.5l-5-3-4.03 2.42Z",key:"lc1i9w"}],["path",{d:"m7 16.5-4.74-2.85",key:"1o9zyk"}],["path",{d:"m7 16.5 5-3",key:"va8pkn"}],["path",{d:"M7 16.5v5.17",key:"jnp8gn"}],["path",{d:"M12 13.5V19l3.97 2.38a2 2 0 0 0 2.06 0l3-1.8a2 2 0 0 0 .97-1.71v-3.24a2 2 0 0 0-.97-1.71L17 10.5l-5 3Z",key:"8zsnat"}],["path",{d:"m17 16.5-5-3",key:"8arw3v"}],["path",{d:"m17 16.5 4.74-2.85",key:"8rfmw"}],["path",{d:"M17 16.5v5.17",key:"k6z78m"}],["path",{d:"M7.97 4.42A2 2 0 0 0 7 6.13v4.37l5 3 5-3V6.13a2 2 0 0 0-.97-1.71l-3-1.8a2 2 0 0 0-2.06 0l-3 1.8Z",key:"1xygjf"}],["path",{d:"M12 8 7.26 5.15",key:"1vbdud"}],["path",{d:"m12 8 4.74-2.85",key:"3rx089"}],["path",{d:"M12 13.5V8",key:"1io7kd"}]]);/**
315 * @license lucide-react v0.303.0 - ISC
316 *
317 * This source code is licensed under the ISC license.
318 * See the LICENSE file in the root directory of this source tree.
319 */const Jj=Ne("Brain",[["path",{d:"M9.5 2A2.5 2.5 0 0 1 12 4.5v15a2.5 2.5 0 0 1-4.96.44 2.5 2.5 0 0 1-2.96-3.08 3 3 0 0 1-.34-5.58 2.5 2.5 0 0 1 1.32-4.24 2.5 2.5 0 0 1 1.98-3A2.5 2.5 0 0 1 9.5 2Z",key:"1mhkh5"}],["path",{d:"M14.5 2A2.5 2.5 0 0 0 12 4.5v15a2.5 2.5 0 0 0 4.96.44 2.5 2.5 0 0 0 2.96-3.08 3 3 0 0 0 .34-5.58 2.5 2.5 0 0 0-1.32-4.24 2.5 2.5 0 0 0-1.98-3A2.5 2.5 0 0 0 14.5 2Z",key:"1d6s00"}]]);/**
320 * @license lucide-react v0.303.0 - ISC
321 *
322 * This source code is licensed under the ISC license.
323 * See the LICENSE file in the root directory of this source tree.
324 */const kV=Ne("Building2",[["path",{d:"M6 22V4a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v18Z",key:"1b4qmf"}],["path",{d:"M6 12H4a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2h2",key:"i71pzd"}],["path",{d:"M18 9h2a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2h-2",key:"10jefs"}],["path",{d:"M10 6h4",key:"1itunk"}],["path",{d:"M10 10h4",key:"tcdvrf"}
324],["path",{d:"M10 14h4",key:"kelpxr"}],["path",{d:"M10 18h4",key:"1ulq68"}]]);/**
325 * @license lucide-react v0.303.0 - ISC
326 *
327 * This source code is licensed under the ISC license.
328 * See the LICENSE file in the root directory of this source tree.
329 */const uc=Ne("Calendar",[["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",ry:"2",key:"eu3xkr"}],["line",{x1:"16",x2:"16",y1:"2",y2:"6",key:"m3sa8f"}],["line",{x1:"8",x2:"8",y1:"2",y2:"6",key:"18kwsl"}],["line",{x1:"3",x2:"21",y1:"10",y2:"10",key:"xt86sb"}]]);/**
330 * @license lucide-react v0.303.0 - ISC
331 *
332 * This source code is licensed under the ISC license.
333 * See the LICENSE file in the root directory of this source tree.
334 */const Bs=Ne("CheckCircle2",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/**
335 * @license lucide-react v0.303.0 - ISC
336 *
337 * This source code is licensed under the ISC license.
338 * See the LICENSE file in the root directory of this source tree.
339 */const Rt=Ne("CheckCircle",[["path",{d:"M22 11.08V12a10 10 0 1 1-5.93-9.14",key:"g774vq"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]);/**
340 * @license lucide-react v0.303.0 - ISC
341 *
342 * This source code is licensed under the ISC license.
343 * See the LICENSE file in the root directory of this source tree.
344 */const On=Ne("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/**
345 * @license lucide-react v0.303.0 - ISC
346 *
347 * This source code is licensed under the ISC license.
348 * See the LICENSE file in the root directory of this source tree.
349 */const Ti=Ne("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
350 * @license lucide-react v0.303.0 - ISC
351 *
352 * This source code is licensed under the ISC license.
353 * See the LICENSE file in the root directory of this source tree.
354 */const Xj=Ne("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);/**
355 * @license lucide-react v0.303.0 - ISC
356 *
357 * This source code is licensed under the ISC license.
358 * See the LICENSE file in the root directory of this source tree.
359 */const Pd=Ne("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/**
360 * @license lucide-react v0.303.0 - ISC
361 *
362 * This source code is licensed under the ISC license.
363 * See the LICENSE file in the root directory of this source tree.
364 */const Cy=Ne("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);/**
365 * @license lucide-react v0.303.0 - ISC
366 *
367 * This source code is licensed under the ISC license.
368 * See the LICENSE file in the root directory of this source tree.
369 */const qs=Ne("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]);/**
370 * @license lucide-react v0.303.0 - ISC
371 *
372 * This source code is licensed under the ISC license.
373 * See the LICENSE file in the root directory of this source tree.
374 */const vV=Ne("Code2",[["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"}]]);/**
375 * @license lucide-react v0.303.0 - ISC
376 *
377 * This source code is licensed under the ISC license.
378 * See the LICENSE file in the root directory of this source tree.
379 */const jV=Ne("Cookie",[["path",{d:"M12 2a10 10 0 1 0 10 10 4 4 0 0 1-5-5 4 4 0 0 1-5-5",key:"laymnq"}],["path",{d:"M8.5 8.5v.01",key:"ue8clq"}],["path",{d:"M16 15.5v.01",key:"14dtrp"}],["path",{d:"M12 12v.01",key:"u5ubse"}],["path",{d:"M11 17v.01",key:"1hyl5a"}],["path",{d:"M7 14v.01",key:"uct60s"}]]);/**
380 * @license lucide-react v0.303.0 - ISC
381 *
382 * This source code is licensed under the ISC license.
383 * See the LICENSE file in the root directory of this source tree.
384 */const Qj=Ne("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);/**
385 * @license lucide-react v0.303.0 - ISC
386 *
387 * This source code is licensed under the ISC license.
388 * See the LICENSE file in the root directory of this source tree.
389 */const yv=Ne("CreditCard",[["rect",{width:"20",height:"14",x:"2",y:"5",rx:"2",key:"ynyp8z"}],["line",{x1:"2",x2:"22",y1:"10",y2:"10",key:"1b3vmo"}]]);/**
390 * @license lucide-react v0.303.0 - ISC
391 *
392 * This source code is licensed under the ISC license.
393 * See the LICENSE file in the root directory of this source tree.
394 */const Ey=Ne("DollarSign",[["line",{x1:"12",x2:"12",y1:"2",y2:"22",key:"7eqyqh"}],["path",{d:"M17 5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6",key:"1b0p4s"}]]);/**
395 * @license lucide-react v0.303.0 - ISC
396 *
397 * This source code is licensed under the ISC license.
398 * See the LICENSE file in the root directory of this source tree.
399 */const Ty=Ne("Download",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"7 10 12 15 17 10",key:"2ggqvy"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3",key:"1vk2je"}]]);/**
400 * @license lucide-react v0.303.0 - ISC
401 *
402 * This source code is licensed under the ISC license.
403 * See the LICENSE file in the root directory of this source tree.
404 */const Oo=Ne("ExternalLink",[["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}],["polyline",{points:"15 3 21 3 21 9",key:"mznyad"}],["line",{x1:"10",x2:"21",y1:"14",y2:"3",key:"18c3s4"}]]);/**
405 * @license lucide-react v0.303.0 - ISC
406 *
407 * This source code is licensed under the ISC license.
408 * See the LICENSE file in the root directory of this source tree.
409 */const Cp=Ne("EyeOff",[["path",{d:"M9.88 9.88a3 3 0 1 0 4.24 4.24",key:"1jxqfv"}],["path",{d:"M10.73 5.08A10.43 10.43 0 0 1 12 5c7 0 10 7 10 7a13.16 13.16 0 0 1-1.67 2.68",key:"9wicm4"}],["path",{d:"M6.61 6.61A13.526 13.526 0 0 0 2 12s3 7 10 7a9.74 9.74 0 0 0 5.39-1.61",key:"1jreej"}],["line",{x1:"2",x2:"22",y1:"2",y2:"22",key:"a6p6uj"}]]);/**
410 * @license lucide-react v0.303.0 - ISC
411 *
412 * This source code is licensed under the ISC license.
413 * See the LICENSE file in the root directory of this source tree.
414 */const Ks=Ne("Eye",[["path",{d:"M2 12s3-7 10-7 10 7 10 7-3 7-10 7-10-7-10-7Z",key:"rwhkz3"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/**
415 * @license lucide-react v0.303.0 - ISC
416 *
417 * This source code is licensed under the ISC license.
418 * See the LICENSE file in the root directory of this source tree.
419 */const SV=Ne("FileDown",[["path",{d:"M14.5 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7.5L14.5 2z",key:"1nnpy2"}],["polyline",{points:"14 2 14 8 20 8",key:"1ew0cm"}],["path",{d:"M12 18v-6",key:"17g6i2"}],["path",{d:"m9 15 3 3 3-3",key:"1npd3o"}]]);/**
420 * @license lucide-react v0.303.0 - ISC
421 *
422 * This source code is licensed under the ISC license.
423 * See the LICENSE file in the root directory of this source tree.
424 */const Jt=Ne("FileText",[["path",{d:"M14.5 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7.5L14.5 2z",key:"1nnpy2"}],["polyline",{points:"14 2 14 8 20 8",key:"1ew0cm"}],["line",{x1:"16",x2:"8",y1:"13",y2:"13",key:"14keom"}],["line",{x1:"16",x2:"8",y1:"17",y2:"17",key:"17nazh"}],["line",{x1:"10",x2:"8",y1:"9",y2:"9",key:"1a5vjj"}]]);/**
425 * @license lucide-react v0.303.0 - ISC
426 *
427 * This source code is licensed under the ISC license.
428 * See the LICENSE file in the root directory of this source tree.
429 */const NV=Ne("Filter",[["polygon",{points:"22 3 2 3 10 12.46 10 19 14 21 14 12.46 22 3",key:"1yg77f"}]]);/**
430 * @license lucide-react v0.303.0 - ISC
431 *
432 * This source code is licensed under the ISC license.
433 * See the LICENSE file in the root directory of this source tree.
434 */const Gs=Ne("Globe",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]]);/**
435 * @license lucide-react v0.303.0 - ISC
436 *
437 * This source code is licensed under the ISC license.
438 * See the LICENSE file in the root directory of this source tree.
439 */const CV=Ne("GripVertical",[["circle",{cx:"9",cy:"12",r:"1",key:"1vctgf"}],["circle",{cx:"9",cy:"5",r:"1",key:"hp0tcf"}],["circle",{cx:"9",cy:"19",r:"1",key:"fkjjf6"}],["circle",{cx:"15",cy:"12",r:"1",key:"1tmaij"}],["circle",{cx:"15",cy:"5",r:"1",key:"19l28e"}],["circle",{cx:"15",cy:"19",r:"1",key:"f4zoj3"}]]);/**
440 * @license lucide-react v0.303.0 - ISC
441 *
442 * This source code is licensed under the ISC license.
443 * See the LICENSE file in the root directory of this source tree.
444 */const EV=Ne("History",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}],["path",{d:"M12 7v5l4 2",key:"1fdv2h"}]]);/**
445 * @license lucide-react v0.303.0 - ISC
446 *
447 * This source code is licensed under the ISC license.
448 * See the LICENSE file in the root directory of this source tree.
449 */const eS=Ne("Home",[["path",{d:"m3 9 9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",key:"y5dka4"}],["polyline",{points:"9 22 9 12 15 12 15 22",key:"e2us08"}]]);/**
450 * @license lucide-react v0.303.0 - ISC
451 *
452 * This source code is licensed under the ISC license.
453 * See the LICENSE file in the root directory of this source tree.
454 */const TV=Ne("Image",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]]);/**
455 * @license lucide-react v0.303.0 - ISC
456 *
457 * This source code is licensed under the ISC license.
458 * See the LICENSE file in the root directory of this source tree.
459 */const Ma=Ne("Info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);/**
460 * @license lucide-react v0.303.0 - ISC
461 *
462 * This source code is licensed under the ISC license.
463 * See the LICENSE file in the root directory of this source tree.
464 */const Zu=Ne("KeyRound",[["path",{d:"M2 18v3c0 .6.4 1 1 1h4v-3h3v-3h2l1.4-1.4a6.5 6.5 0 1 0-4-4Z",key:"167ctg"}],["circle",{cx:"16.5",cy:"7.5",r:".5",key:"1kog09"}]]);/**
465 * @license lucide-react v0.303.0 - ISC
466 *
467 * This source code is licensed under the ISC license.
468 * See the LICENSE file in the root directory of this source tree.
469 */const AV=Ne("Languages",[["path",{d:"m5 8 6 6",key:"1wu5hv"}],["path",{d:"m4 14 6-6 2-3",key:"1k1g8d"}],["path",{d:"M2 5h12",key:"or177f"}],["path",{d:"M7 2h1",key:"1t2jsx"}],["path",{d:"m22 22-5-10-5 10",key:"don7ne"}],["path",{d:"M14 18h6",key:"1m8k6r"}]]);/**
470 * @license lucide-react v0.303.0 - ISC
471 *
472 * This source code is licensed under the ISC license.
473 * See the LICENSE file in the root directory of this source tree.
474 */const tS=Ne("Layers",[["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:"8b97xw"}],["path",{d:"m22 17.65-9.17 4.16a2 2 0 0 1-1.66 0L2 17.65",key:"dd6zsq"}],["path",{d:"m22 12.65-9.17 4.16a2 2 0 0 1-1.66 0L2 12.65",key:"ep9fru"}]]);/**
475 * @license lucide-react v0.303.0 - ISC
476 *
477 * This source code is licensed under the ISC license.
478 * See the LICENSE file in the root directory of this source tree.
479 */const zV=Ne("LayoutDashboard",[["rect",{width:"7",height:"9",x:"3",y:"3",rx:"1",key:"10lvy0"}],["rect",{width:"7",height:"5",x:"14",y:"3",rx:"1",key:"16une8"}],["rect",{width:"7",height:"9",x:"14",y:"12",rx:"1",key:"1hutg5"}],["rect",{width:"7",height:"5",x:"3",y:"16",rx:"1",key:"ldoo1y"}]]);/**
480 * @license lucide-react v0.303.0 - ISC
481 *
482 * This source code is licensed under the ISC license.
483 * See the LICENSE file in the root directory of this source tree.
484 */const PV=Ne("Lightbulb",[["path",{d:"M15 14c.2-1 .7-1.7 1.5-2.5 1-.9 1.5-2.2 1.5-3.5A6 6 0 0 0 6 8c0 1 .2 2.2 1.5 3.5.7.7 1.3 1.5 1.5 2.5",key:"1gvzjb"}],["path",{d:"M9 18h6",key:"x1upvd"}],["path",{d:"M10 22h4",key:"ceow96"}]]);/**
485 * @license lucide-react v0.303.0 - ISC
486 *
487 * This source code is licensed under the ISC license.
488 * See the LICENSE file in the root directory of this source tree.
489 */const eh=Ne("Link",[["path",{d:"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71",key:"1cjeqo"}],["path",{d:"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71",key:"19qd67"}]]);/**
490 * @license lucide-react v0.303.0 - ISC
491 *
492 * This source code is licensed under the ISC license.
493 * See the LICENSE file in the root directory of this source tree.
494 */const _V=Ne("List",[["line",{x1:"8",x2:"21",y1:"6",y2:"6",key:"7ey8pc"}],["line",{x1:"8",x2:"21",y1:"12",y2:"12",key:"rjfblc"}],["line",{x1:"8",x2:"21",y1:"18",y2:"18",key:"c3b1m8"}],["line",{x1:"3",x2:"3.01",y1:"6",y2:"6",key:"1g7gq3"}],["line",{x1:"3",x2:"3.01",y1:"12",y2:"12",key:"1pjlvk"}],["line",{x1:"3",x2:"3.01",y1:"18",y2:"18",key:"28t2mc"}]]);/**
495 * @license lucide-react v0.303.0 - ISC
496 *
497 * This source code is licensed under the ISC license.
498 * See the LICENSE file in the root directory of this source tree.
499 */const dt=Ne("Loader2",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);/**
500 * @license lucide-react v0.303.0 - ISC
501 *
502 * This source code is licensed under the ISC license.
503 * See the LICENSE file in the root directory of this source tree.
504 */const ku=Ne("Lock",[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]]);/**
505 * @license lucide-react v0.303.0 - ISC
506 *
507 * This source code is licensed under the ISC license.
508 * See the LICENSE file in the root directory of this source tree.
509 */const HI=Ne("LogOut",[["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}],["polyline",{points:"16 17 21 12 16 7",key:"1gabdz"}],["line",{x1:"21",x2:"9",y1:"12",y2:"12",key:"1uyos4"}]]);/**
510 * @license lucide-react v0.303.0 - ISC
511 *
512 * This source code is licensed under the ISC license.
513 * See the LICENSE file in the root directory of this source tree.
514 */const dc=Ne("Mail",[["rect",{width:"20",height:"16",x:"2",y:"4",rx:"2",key:"18n3k1"}],["path",{d:"m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7",key:"1ocrg3"}]]);/**
515 * @license lucide-react v0.303.0 - ISC
516 *
517 * This source code is licensed under the ISC license.
518 * See the LICENSE file in the root directory of this source tree.
519 */const IV=Ne("Maximize2",[["polyline",{points:"15 3 21 3 21 9",key:"mznyad"}],["polyline",{points:"9 21 3 21 3 15",key:"1avn1i"}],["line",{x1:"21",x2:"14",y1:"3",y2:"10",key:"ota7mn"}],["line",{x1:"3",x2:"10",y1:"21",y2:"14",key:"1atl0r"}]]);/**
520 * @license lucide-react v0.303.0 - ISC
521 *
522 * This source code is licensed under the ISC license.
523 * See the LICENSE file in the root directory of this source tree.
524 */const qI=Ne("Menu",[["line",{x1:"4",x2:"20",y1:"12",y2:"12",key:"1e0a9i"}],["line",{x1:"4",x2:"20",y1:"6",y2:"6",key:"1owob3"}],["line",{x1:"4",x2:"20",y1:"18",y2:"18",key:"yk5zj1"}]]);/**
525 * @license lucide-react v0.303.0 - ISC
526 *
527 * This source code is licensed under the ISC license.
528 * See the LICENSE file in the root directory of this source tree.
529 */const OV=Ne("MessageSquare",[["path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z",key:"1lielz"}]]);/**
530 * @license lucide-react v0.303.0 - ISC
531 *
532 * This source code is licensed under the ISC license.
533 * See the LICENSE file in the root directory of this source tree.
534 */const Yu=Ne("Moon",[["path",{d:"M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z",key:"a7tn18"}]]);/**
535 * @license lucide-react v0.303.0 - ISC
536 *
537 * This source code is licensed under the ISC license.
538 * See the LICENSE file in the root directory of this source tree.
539 */const fn=Ne("Package",[["path",{d:"m7.5 4.27 9 5.15",key:"1c824w"}],["path",{d:"M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z",key:"hh9hay"}],["path",{d:"m3.3 7 8.7 5 8.7-5",key:"g66t2b"}],["path",{d:"M12 22V12",key:"d0xqtd"}]]);/**
540 * @license lucide-react v0.303.0 - ISC
541 *
542 * This source code is licensed under the ISC license.
543 * See the LICENSE file in the root directory of this source tree.
544 */const RV=Ne("PanelsTopLeft",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M3 9h18",key:"1pudct"}],["path",{d:"M9 21V9",key:"1oto5p"}]]);/**
545 * @license lucide-react v0.303.0 - ISC
546 *
547 * This source code is licensed under the ISC license.
548 * See the LICENSE file in the root directory of this source tree.
549 */const KI=Ne("Pause",[["rect",{width:"4",height:"16",x:"6",y:"4",key:"iffhe4"}],["rect",{width:"4",height:"16",x:"14",y:"4",key:"sjin7j"}]]);/**
550 * @license lucide-react v0.303.0 - ISC
551 *
552 * This source code is licensed under the ISC license.
553 * See the LICENSE file in the root directory of this source tree.
554 */const LV=Ne("PenLine",[["path",{d:"M12 20h9",key:"t2du7b"}],["path",{d:"M16.5 3.5a2.12 2.12 0 0 1 3 3L7 19l-4 1 1-4Z",key:"ymcmye"}]]);/**
555 * @license lucide-react v0.303.0 - ISC
556 *
557 * This source code is licensed under the ISC license.
558 * See the LICENSE file in the root directory of this source tree.
559 */const Ro=Ne("PenSquare",[["path",{d:"M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7",key:"1qinfi"}],["path",{d:"M18.5 2.5a2.12 2.12 0 0 1 3 3L12 15l-4 1 1-4Z",key:"w2jsv5"}]]);/**
560 * @license lucide-react v0.303.0 - ISC
561 *
562 * This source code is licensed under the ISC license.
563 * See the LICENSE file in the root directory of this source tree.
564 */const MV=Ne("PenTool",[["path",{d:"m12 19 7-7 3 3-7 7-3-3z",key:"rklqx2"}],["path",{d:"m18 13-1.5-7.5L2 2l3.5 14.5L13 18l5-5z",key:"1et58u"}],["path",{d:"m2 2 7.586 7.586",key:"etlp93"}],["circle",{cx:"11",cy:"11",r:"2",key:"xmgehs"}]]);/**
565 * @license lucide-react v0.303.0 - ISC
566 *
567 * This source code is licensed under the ISC license.
568 * See the LICENSE file in the root directory of this source tree.
569 */const Ep=Ne("Pen",[["path",{d:"M17 3a2.85 2.83 0 1 1 4 4L7.5 20.5 2 22l1.5-5.5Z",key:"5qss01"}]]);/**
570 * @license lucide-react v0.303.0 - ISC
571 *
572 * This source code is licensed under the ISC license.
573 * See the LICENSE file in the root directory of this source tree.
574 */const DV=Ne("Pencil",[["path",{d:"M17 3a2.85 2.83 0 1 1 4 4L7.5 20.5 2 22l1.5-5.5Z",key:"5qss01"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]]);/**
575 * @license lucide-react v0.303.0 - ISC
576 *
577 * This source code is licensed under the ISC license.
578 * See the LICENSE file in the root directory of this source tree.
579 */const FV=Ne("PlayCircle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polygon",{points:"10 8 16 12 10 16 10 8",key:"1cimsy"}]]);/**
580 * @license lucide-react v0.303.0 - ISC
581 *
582 * This source code is licensed under the ISC license.
583 * See the LICENSE file in the root directory of this source tree.
584 */const H0=Ne("Play",[["polygon",{points:"5 3 19 12 5 21 5 3",key:"191637"}]]);/**
585 * @license lucide-react v0.303.0 - ISC
586 *
587 * This source code is licensed under the ISC license.
588 * See the LICENSE file in the root directory of this source tree.
589 */const hc=Ne("Plug",[["path",{d:"M12 22v-5",key:"1ega77"}
589],["path",{d:"M9 8V2",key:"14iosj"}],["path",{d:"M15 8V2",key:"18g5xt"}],["path",{d:"M18 8v5a4 4 0 0 1-4 4h-4a4 4 0 0 1-4-4V8Z",key:"osxo6l"}]]);/**
590 * @license lucide-react v0.303.0 - ISC
591 *
592 * This source code is licensed under the ISC license.
593 * See the LICENSE file in the root directory of this source tree.
594 */const Q4=Ne("PlusCircle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M8 12h8",key:"1wcyev"}],["path",{d:"M12 8v8",key:"napkw2"}]]);/**
595 * @license lucide-react v0.303.0 - ISC
596 *
597 * This source code is licensed under the ISC license.
598 * See the LICENSE file in the root directory of this source tree.
599 */const Qr=Ne("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/**
600 * @license lucide-react v0.303.0 - ISC
601 *
602 * This source code is licensed under the ISC license.
603 * See the LICENSE file in the root directory of this source tree.
604 */const Lo=Ne("RefreshCw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]);/**
605 * @license lucide-react v0.303.0 - ISC
606 *
607 * This source code is licensed under the ISC license.
608 * See the LICENSE file in the root directory of this source tree.
609 */const BV=Ne("Repeat",[["path",{d:"m17 2 4 4-4 4",key:"nntrym"}],["path",{d:"M3 11v-1a4 4 0 0 1 4-4h14",key:"84bu3i"}],["path",{d:"m7 22-4-4 4-4",key:"1wqhfi"}],["path",{d:"M21 13v1a4 4 0 0 1-4 4H3",key:"1rx37r"}]]);/**
610 * @license lucide-react v0.303.0 - ISC
611 *
612 * This source code is licensed under the ISC license.
613 * See the LICENSE file in the root directory of this source tree.
614 */const ga=Ne("Rocket",[["path",{d:"M4.5 16.5c-1.5 1.26-2 5-2 5s3.74-.5 5-2c.71-.84.7-2.13-.09-2.91a2.18 2.18 0 0 0-2.91-.09z",key:"m3kijz"}],["path",{d:"m12 15-3-3a22 22 0 0 1 2-3.95A12.88 12.88 0 0 1 22 2c0 2.72-.78 7.5-6 11a22.35 22.35 0 0 1-4 2z",key:"1fmvmk"}],["path",{d:"M9 12H4s.55-3.03 2-4c1.62-1.08 5 0 5 0",key:"1f8sc4"}],["path",{d:"M12 15v5s3.03-.55 4-2c1.08-1.62 0-5 0-5",key:"qeys4"}]]);/**
615 * @license lucide-react v0.303.0 - ISC
616 *
617 * This source code is licensed under the ISC license.
618 * See the LICENSE file in the root directory of this source tree.
619 */const GI=Ne("RotateCcw",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]]);/**
620 * @license lucide-react v0.303.0 - ISC
621 *
622 * This source code is licensed under the ISC license.
623 * See the LICENSE file in the root directory of this source tree.
624 */const $V=Ne("Rss",[["path",{d:"M4 11a9 9 0 0 1 9 9",key:"pv89mb"}],["path",{d:"M4 4a16 16 0 0 1 16 16",key:"k0647b"}],["circle",{cx:"5",cy:"19",r:"1",key:"bfqh0e"}]]);/**
625 * @license lucide-react v0.303.0 - ISC
626 *
627 * This source code is licensed under the ISC license.
628 * See the LICENSE file in the root directory of this source tree.
629 */const rS=Ne("Save",[["path",{d:"M19 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h11l5 5v11a2 2 0 0 1-2 2z",key:"1owoqh"}],["polyline",{points:"17 21 17 13 7 13 7 21",key:"1md35c"}],["polyline",{points:"7 3 7 8 15 8",key:"8nz8an"}]]);/**
630 * @license lucide-react v0.303.0 - ISC
631 *
632 * This source code is licensed under the ISC license.
633 * See the LICENSE file in the root directory of this source tree.
634 */const _i=Ne("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/**
635 * @license lucide-react v0.303.0 - ISC
636 *
637 * This source code is licensed under the ISC license.
638 * See the LICENSE file in the root directory of this source tree.
639 */const xv=Ne("Settings2",[["path",{d:"M20 7h-9",key:"3s1dr2"}],["path",{d:"M14 17H5",key:"gfn3mx"}],["circle",{cx:"17",cy:"17",r:"3",key:"18b49y"}],["circle",{cx:"7",cy:"7",r:"3",key:"dfmy0x"}]]);/**
640 * @license lucide-react v0.303.0 - ISC
641 *
642 * This source code is licensed under the ISC license.
643 * See the LICENSE file in the root directory of this source tree.
644 */const ZI=Ne("Settings",[["path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z",key:"1qme2f"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/**
645 * @license lucide-react v0.303.0 - ISC
646 *
647 * This source code is licensed under the ISC license.
648 * See the LICENSE file in the root directory of this source tree.
649 */const Ju=Ne("ShieldCheck",[["path",{d:"M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10",key:"1irkt0"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/**
650 * @license lucide-react v0.303.0 - ISC
651 *
652 * This source code is licensed under the ISC license.
653 * See the LICENSE file in the root directory of this source tree.
654 */const UV=Ne("ShieldX",[["path",{d:"M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10",key:"1irkt0"}],["path",{d:"m14.5 9-5 5",key:"1m49dw"}],["path",{d:"m9.5 9 5 5",key:"wyx7zg"}]]);/**
655 * @license lucide-react v0.303.0 - ISC
656 *
657 * This source code is licensed under the ISC license.
658 * See the LICENSE file in the root directory of this source tree.
659 */const YI=Ne("Shield",[["path",{d:"M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10",key:"1irkt0"}]]);/**
660 * @license lucide-react v0.303.0 - ISC
661 *
662 * This source code is licensed under the ISC license.
663 * See the LICENSE file in the root directory of this source tree.
664 */const nS=Ne("ShoppingBag",[["path",{d:"M6 2 3 6v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V6l-3-4Z",key:"hou9p0"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M16 10a4 4 0 0 1-8 0",key:"1ltviw"}]]);/**
665 * @license lucide-react v0.303.0 - ISC
666 *
667 * This source code is licensed under the ISC license.
668 * See the LICENSE file in the root directory of this source tree.
669 */const sS=Ne("ShoppingCart",[["circle",{cx:"8",cy:"21",r:"1",key:"jimo8o"}
669],["circle",{cx:"19",cy:"21",r:"1",key:"13723u"}],["path",{d:"M2.05 2.05h2l2.66 12.42a2 2 0 0 0 2 1.58h9.78a2 2 0 0 0 1.95-1.57l1.65-7.43H5.12",key:"9zh506"}]]);/**
670 * @license lucide-react v0.303.0 - ISC
671 *
672 * This source code is licensed under the ISC license.
673 * See the LICENSE file in the root directory of this source tree.
674 */const dn=Ne("Sparkles",[["path",{d:"m12 3-1.912 5.813a2 2 0 0 1-1.275 1.275L3 12l5.813 1.912a2 2 0 0 1 1.275 1.275L12 21l1.912-5.813a2 2 0 0 1 1.275-1.275L21 12l-5.813-1.912a2 2 0 0 1-1.275-1.275L12 3Z",key:"17u4zn"}],["path",{d:"M5 3v4",key:"bklmnn"}],["path",{d:"M19 17v4",key:"iiml17"}],["path",{d:"M3 5h4",key:"nem4j1"}],["path",{d:"M17 19h4",key:"lbex7p"}]]);/**
675 * @license lucide-react v0.303.0 - ISC
676 *
677 * This source code is licensed under the ISC license.
678 * See the LICENSE file in the root directory of this source tree.
679 */const JI=Ne("Star",[["polygon",{points:"12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2",key:"8f66p6"}]]);/**
680 * @license lucide-react v0.303.0 - ISC
681 *
682 * This source code is licensed under the ISC license.
683 * See the LICENSE file in the root directory of this source tree.
684 */const iS=Ne("Store",[["path",{d:"m2 7 4.41-4.41A2 2 0 0 1 7.83 2h8.34a2 2 0 0 1 1.42.59L22 7",key:"ztvudi"}],["path",{d:"M4 12v8a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-8",key:"1b2hhj"}],["path",{d:"M15 22v-4a2 2 0 0 0-2-2h-2a2 2 0 0 0-2 2v4",key:"2ebpfo"}],["path",{d:"M2 7h20",key:"1fcdvo"}],["path",{d:"M22 7v3a2 2 0 0 1-2 2v0a2.7 2.7 0 0 1-1.59-.63.7.7 0 0 0-.82 0A2.7 2.7 0 0 1 16 12a2.7 2.7 0 0 1-1.59-.63.7.7 0 0 0-.82 0A2.7 2.7 0 0 1 12 12a2.7 2.7 0 0 1-1.59-.63.7.7 0 0 0-.82 0A2.7 2.7 0 0 1 8 12a2.7 2.7 0 0 1-1.59-.63.7.7 0 0 0-.82 0A2.7 2.7 0 0 1 4 12v0a2 2 0 0 1-2-2V7",key:"jon5kx"}]]);/**
685 * @license lucide-react v0.303.0 - ISC
686 *
687 * This source code is licensed under the ISC license.
688 * See the LICENSE file in the root directory of this source tree.
689 */const Xu=Ne("Sun",[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]]);/**
690 * @license lucide-react v0.303.0 - ISC
691 *
692 * This source code is licensed under the ISC license.
693 * See the LICENSE file in the root directory of this source tree.
694 */const aS=Ne("Tag",[["path",{d:"M12 2H2v10l9.29 9.29c.94.94 2.48.94 3.42 0l6.58-6.58c.94-.94.94-2.48 0-3.42L12 2Z",key:"14b2ls"}],["path",{d:"M7 7h.01",key:"7u93v4"}]]);/**
695 * @license lucide-react v0.303.0 - ISC
696 *
697 * This source code is licensed under the ISC license.
698 * See the LICENSE file in the root directory of this source tree.
699 */const _d=Ne("Target",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["circle",{cx:"12",cy:"12",r:"6",key:"1vlfrh"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}]]);/**
700 * @license lucide-react v0.303.0 - ISC
701 *
702 * This source code is licensed under the ISC license.
703 * See the LICENSE file in the root directory of this source tree.
704 */const WV=Ne("Timer",[["line",{x1:"10",x2:"14",y1:"2",y2:"2",key:"14vaq8"}],["line",{x1:"12",x2:"15",y1:"14",y2:"11",key:"17fdiu"}],["circle",{cx:"12",cy:"14",r:"8",key:"1e1u0o"}]]);/**
705 * @license lucide-react v0.303.0 - ISC
706 *
707 * This source code is licensed under the ISC license.
708 * See the LICENSE file in the root directory of this source tree.
709 */const Cr=Ne("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);/**
710 * @license lucide-react v0.303.0 - ISC
711 *
712 * This source code is licensed under the ISC license.
713 * See the LICENSE file in the root directory of this source tree.
714 */const Tp=Ne("TrendingUp",[["polyline",{points:"22 7 13.5 15.5 8.5 10.5 2 17",key:"126l90"}],["polyline",{points:"16 7 22 7 22 13",key:"kwv8wd"}]]);/**
715 * @license lucide-react v0.303.0 - ISC
716 *
717 * This source code is licensed under the ISC license.
718 * See the LICENSE file in the root directory of this source tree.
719 */const Ap=Ne("Upload",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"17 8 12 3 7 8",key:"t8dd8p"}],["line",{x1:"12",x2:"12",y1:"3",y2:"15",key:"widbto"}]]);/**
720 * @license lucide-react v0.303.0 - ISC
721 *
722 * This source code is licensed under the ISC license.
723 * See the LICENSE file in the root directory of this source tree.
724 */const Ay=Ne("User",[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]]);/**
725 * @license lucide-react v0.303.0 - ISC
726 *
727 * This source code is licensed under the ISC license.
728 * See the LICENSE file in the root directory of this source tree.
729 */const zp=Ne("Users",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["path",{d:"M16 3.13a4 4 0 0 1 0 7.75",key:"1da9ce"}]]);/**
730 * @license lucide-react v0.303.0 - ISC
731 *
732 * This source code is licensed under the ISC license.
733 * See the LICENSE file in the root directory of this source tree.
734 */const zy=Ne("Wallet",[["path",{d:"M21 12V7H5a2 2 0 0 1 0-4h14v4",key:"195gfw"}],["path",{d:"M3 5v14a2 2 0 0 0 2 2h16v-5",key:"195n9w"}],["path",{d:"M18 12a2 2 0 0 0 0 4h4v-4Z",key:"vllfpd"}]]);/**
735 * @license lucide-react v0.303.0 - ISC
736 *
737 * This source code is licensed under the ISC license.
738 * See the LICENSE file in the root directory of this source tree.
739 */const VV=Ne("Webhook",[["path",{d:"M18 16.98h-5.99c-1.1 0-1.95.94-2.48 1.9A4 4 0 0 1 2 17c.01-.7.2-1.4.57-2",key:"q3hayz"}],["path",{d:"m6 17 3.13-5.78c.53-.97.1-2.18-.5-3.1a4 4 0 1 1 6.89-4.06",key:"1go1hn"}],["path",{d:"m12 6 3.13 5.73C15.66 12.7 16.9 13 18 13a4 4 0 0 1 0 8",key:"qlwsc0"}]]);/**
740 * @license lucide-react v0.303.0 - ISC
741 *
742 * This source code is licensed under the ISC license.
743 * See the LICENSE file in the root directory of this source tree.
744 */const q0=Ne("XCircle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]);/**
745 * @license lucide-react v0.303.0 - ISC
746 *
747 * This source code is licensed under the ISC license.
748 * See the LICENSE file in the root directory of this source tree.
749 */const yt=Ne("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);/**
750 * @license lucide-react v0.303.0 - ISC
751 *
752 * This source code is licensed under the ISC license.
753 * See the LICENSE file in the root directory of this source tree.
754 */const Py=Ne("Zap",[["polygon",{points:"13 2 3 14 12 14 11 22 21 10 12 10 13 2",key:"45s27k"}]]),HV={tagline:"Twój AI Copywriter",nav:{home:"Strona główna",features:"Funkcje",pricing:"Cennik",tools:"Narzędzia AI",toolsCta:"Wypróbuj już teraz",aiCopywriter:"AI Copywriter",aiCopywriterDesc:"Teksty marketingowe i sprzedażowe",aiProductDescriptions:"Generator opisów produktów",aiProductDescriptionsDesc:"Unikalne opisy dla e-commerce",blog:"Blog",aiSeoWriter:"AI SEO Writer",aiSeoWriterDesc:"Treści zoptymalizowane pod SEO",automations:"Automatyzacje",automationsCta:"Zobacz wszystkie automatyzacje",api:"API",apiCta:"Przejdź do dokumentacji API",apiDocsName:"Dokumentacja",mobileApp:"Aplikacja mobilna",mobileAppDesc:"Android: zamawiaj i czytaj teksty z telefonu",apiDocsDesc:"Pełna referencja endpointów — quickstart, uwierzytelnianie, żądania i odpowiedzi, kody błędów."},auth:{dashboard:"Dashboard",admin:"Admin",login:"Zaloguj się",register:"Załóż konto",logout:"Wyloguj"},theme:{toggle:"Przełącz motyw",dark:"Dark Mode",light:"Light Mode"}},qV={description:"Twórz profesjonalne treści w kilka sekund dzięki sztucznej inteligencji. Oszczędzaj czas i zwiększaj produktywność.",sections:{product:"Produkt",legal:"Prawne",pages:"Strony",automations:"Automatyzacje",api:"API"},links:{features:"Funkcje",pricing:"Cennik",faq:"FAQ",aiSeoWriter:"AI SEO Writer",terms:"Regulamin",privacy:"Polityka prywatności",cookies:"Cookies",aiCopywriter:"AI copywriter",aiProductDescriptions:"AI generator opisów produktów",mobileApp:"Aplikacja na Androida"},getApp:"Pobierz aplikację",copyright:"Wszystkie prawa zastrzeżone.",madeBy:"Projekt, wykonanie i wdrożenie:",contact:"Kontakt"},KV={submit:"Wyślij",cancel:"Anuluj",save:"Zapisz",delete:"Usuń",edit:"Edytuj",loading:"Ładowanie..."},GV={header:HV,footer:qV,buttons:KV},ZV={title:"Złóż zamówienie"},YV={title:"Podgląd Twojego tekstu",titleMulti:"Podgląd zamówienia",subtitle:"Oto wstęp, który napisaliśmy dla Ciebie. Zapłać, żeby zobaczyć cały tekst.",subtitleMulti:"Wygenerowaliśmy wstęp dla pierwszego tekstu. Pozostałe zostaną wygenerowane po płatności.",restLocked:"Reszta tekstu dostępna po płatności",generationFailed:"Tekst zostanie wygenerowany po płatności.",remainingInfo:"Wstępy dla pozostałych {{count}} tekstów zostaną wygenerowane po złożeniu zamówienia.",pendingGeneration:"Po płatności",totalTexts:"{{count}} tekst(ów)",cancel:"Anuluj",payToSeeFullText:"Zapłać i zobacz cały tekst",processing:"Przetwarzanie...",generating:"Generuję podgląd tekstu...",generatingSubtitle:"To potrwa kilka sekund"},JV={title:"Tryb edycji aktywny",editing:"Edytujesz tekst #{{index}}: {{topic}}",cancel:"Anuluj edycję"},XV={title:"Teksty w zamówieniu",pages:"str.",characters:"znaków",ownSources:"własnych źródeł",editingBadge:"Edytujesz",editTooltip:"Edytuj tekst",removeTooltip:"Usuń tekst"},QV={topic:{label:"📝 Temat tekstu *",placeholder:"np. Jak AI zmienia marketing w 2025 roku"},length:{label:"📏 Długość tekstu *",pages:"Strony",characters:"Znaki",approx:"To jest około:",charactersLabel:"znaków",pagesLabel_one:"strona",pagesLabel_few:"strony",pagesLabel_many:"stron",presetLabel:"Gotowe długości",presetPlaceholder:"Wybierz gotową długość…"},language:{label:"🌍 Język tekstu *"},textType:{label:"📄 Rodzaj tekstu (opcjonalnie)",placeholder:"Wybierz rodzaj",customPlaceholder:"Wpisz własny rodzaj tekstu"},sources:{label:"📚 Dodaj własne źródła (opcjonalnie)",tooltip:"Smart-Copy uwzględni wskazane przez Ciebie strony lub dokumenty jako materiały źródłowe, na podstawie których napisze w pełni oryginalny tekst.",tooltipMax:"Maksymalnie 6 źródeł (linki + pliki).",addButton:"Dodaj źródła",editButton:"Edytuj źródła ({{count}}/6)"},guidelines:{label:"📋 Dodatkowe wytyczne (opcjonalnie)",placeholder:"Opisz szczegóły, ton komunikacji, grupy docelowe, miejsce publikacji..."},seo:{label:"🎯 Optymalizacja SEO (opcjonalnie)",tooltip:"Dodaj frazy kluczowe i linki SEO. Tekst zostanie naturalnie zoptymalizowany pod wskazane parametry.",addButton:"Dodaj frazy kluczowe i/lub linkowanie",editButton:"Edytuj sekcję SEO ({{count}} elementów)",keywordsLabel:"🔑 Frazy kluczowe",linksLabel:"🔗 Linki SEO"},outlineApproval:{label:"Chcę zatwierdzić konspekt przed napisaniem tekstu",hint:"Przygotujemy plan tekstu (tytuł + sekcje) i wyślemy Ci go do akceptacji. Pisanie ruszy po Twoim zatwierdzeniu."},image:{label:"Dodaj obraz wyróżniający (AI)",hint:"Fotograficzna grafika hero dopasowana do tematu — w cenie tekstu.",tooltip:"Obraz generuje model FLUX 1.1 Pro Ultra (tryb raw — naturalna fotografia) na podstawie promptu ułożonego pod Twój temat. Format 16:9, WebP, z gotowym opisem alternatywnym (alt). Jeśli generator obrazów będzie chwilowo niedostępny, tekst dostarczymy normalnie — bez obrazu."},wp:{label:"📤 Publikacja do WordPressa (opcjonalnie)",hint:"Po wygenerowaniu tekst (z obrazem wyróżniającym) trafi automatycznie na Twoją witrynę.",scheduleInvalid:"Wybierz datę publikacji co najmniej 15 minut w przyszłości"}},eH={title:"Podsumowanie",textsInOrder:"Teksty w zamówieniu:",textsSum:"Suma tekstów:",currentText:"Aktualny tekst:",editedText:"Edytowany tekst:",length:"Długość:",characters:"Znaki:",price:"Cena:",total:"Suma całkowita:",toPay:"Do zapłaty:",fillFormTip:"💡 Wypełnij formularz aby dodać kolejny tekst",updateText:"Zaktualizuj tekst",addNextText:"Dodaj kolejny tekst",limitReached:"Limit {{max}} tekstów",cancelEdit:"Anuluj edycję",submitOrder:"Złóż zamówienie",processing:"Przetwarzanie...",footerEdit:"Zaktualizuj lub anuluj edycję",footerTextsAndForm:"{{count}} tekstów + aktualny formularz",footerTexts_one:"{{count}} tekst w zamówieniu",footerTexts_few:"{{count}} teksty w zamówieniu",footerTexts_many:"{{count}} tekstów w zamówieniu",footerAddOrSubmit:"Dodaj do listy lub złóż zamówienie"},tH={title:"Wyrażam zgodę na natychmiastowe rozpoczęcie realizacji zamówienia i przyjmuję do wiadomości, że po rozpoczęciu prac utracę prawo odstąpienia od umowy",whyNoRefund:"Dlaczego nie mogę zwrócić zamówionego tekstu?",legalBasis:"Podstawa prawna: Art. 38 pkt 13 ustawy o prawach konsumenta",legalExplanation:"Zgodnie z polskim prawem, konsument nie ma prawa do odstąpienia od umowy o dostarczanie treści cyfrowych (takich jak teksty generowane przez AI), jeżeli:",legalPoint1:"przedsiębiorca rozpoczął świadczenie za wyraźną zgodą konsumenta",legalPoint2:"konsument został poinformowany o utracie prawa odstąpienia",legalPoint3:"konsument przyjął to do wiadomości",legalSummary:"Po złożeniu zamówienia i rozpoczęciu generowania tekstu przez AI, usługa zostaje spełniona i nie ma możliwości jej zwrotu - podobnie jak w przypadku pobrania e-booka czy dostępu do kursu online."},rH={title:"Dodaj własne źródła",sourcesCount:"{{count}}/6 źródeł",linksLabel:"Linki do stron internetowych",linkPlaceholder:"https://example.com/article",addButton:"Dodaj",filesLabel:"Pliki: dokumenty i zdjęcia produktu",filesButton:"Kliknij, aby wybrać pliki",filesLimit:"Osiągnięto limit 6 źródeł",infoTitle:"Maksymalnie 6 źródeł łącznie (linki + pliki).",infoDescription:"Smart-Copy wykorzysta wskazane materiały jako podstawę do napisania w pełni oryginalnego tekstu.",cancel:"Anuluj",confirm:"Zatwierdź",filesHint:"PDF, DOC i DOCX czytamy jako tekst. Zdjęcia (JPG, PNG, WEBP) generator ogląda — opisuje z nich kształt, materiał, wykończenie i widoczne oznaczenia, czyli rzeczy, których nie ma w opisie tekstowym. Bierzemy pod uwagę do 5 zdjęć; większe zmniejszamy sami, więc możesz wrzucać je prosto z telefonu."}
754,nH={title:"🎯 Optymalizacja SEO",stats:"{{keywords}} fraz • {{links}}/{{maxLinks}} linków",keywordsLabel:"🔑 Frazy kluczowe (max 10)",keywordsDescription:"Tekst zostanie naturalnie zoptymalizowany pod te frazy. Podaj najważniejsze słowa kluczowe.",keywordPlaceholder:"np. copywriting AI",linksLabel:"🔗 Linkowanie zewnętrzne (max {{max}} linków)",linksDescription:"Linki zostaną naturalnie wplecione w tekst z podanymi anchorami.",linksTooShort:"⚠️ Tekst zbyt krótki (min. 2000 znaków)",urlPlaceholder:"https://example.com/strona",anchorPlaceholder:"tekst anchora",addLinkButton:"Dodaj link ({{count}}/{{max}})",linkLimitReached:"Osiągnięto limit {{max}} linków",infoKeywords:"Frazy kluczowe: Będą naturalnie wplecione w tekst (tytuły, nagłówki, treść).",infoLinks:"Linki: Zostaną rozmieszczone równomiernie w tekście zgodnie z kontekstem.",infoLimits:"💡 Limity linków: ≤2000 znaków = 2 linki | 3000-5000 = 3 linki | >5000 = 5 linków",cancel:"Anuluj",confirm:"Zatwierdź"},sH={topicMin:"Temat musi mieć minimum 3 znaki",lengthMin:"Długość musi być większa od 0",guidelinesMax:"Wytyczne mogą mieć maksymalnie 100 000 znaków",languageRequired:"Wybierz język",charactersMin:"Minimalna liczba znaków to 2000",charactersMax:"Maksymalna liczba znaków to 300 000",pagesMax:"Maksymalna liczba stron to 150",termsRequired:"Musisz zaakceptować regulamin"},iH={textUpdated:"Tekst zaktualizowany",textAdded:"Tekst dodany do zamówienia",textRemoved:"Tekst usunięty",editCancelled:"Anulowano edycję",editing:"Edytujesz: {{topic}}",orderSuccess:"Zamówienie złożone pomyślnie!",redirectingPayment:"Przekierowuję do płatności...",paymentCancelled:"Płatność anulowana. Przywrócono formularz zamówienia.",paymentCancelledSimple:"Płatność anulowana",restoreFailed:"Nie udało się przywrócić formularza",consentRequired:"Musisz wyrazić zgodę na rozpoczęcie realizacji zamówienia",fillFormOrAddTexts:"Wypełnij formularz lub dodaj teksty do listy",maxTextsReached:"Maksymalnie {{max}} tekstów w jednym zamówieniu",topicError:"Podaj temat",lengthError:"Nieprawidłowa długość",languageError:"Wybierz język",fillAllFields:"Uzupełnij wszystkie wymagane pola",fillCurrentText:"Uzupełnij wszystkie wymagane pola aktualnego tekstu",linkAdded:"Link dodany",linkRemoved:"Link usunięty",keywordAdded:"Fraza dodana",keywordRemoved:"Fraza usunięta",keywordExists:"Ta fraza już została dodana",maxKeywords:"Maksymalnie 10 fraz kluczowych",maxLinksReached:"Maksymalnie {{max}} linków dla tej długości tekstu",invalidUrl:"Nieprawidłowy URL",provideUrlAndAnchor:"Podaj URL i anchor",sourcesSaved:"Zapisano {{count}} źródeł",sourceSaved:"Zapisano {{count}} źródło",seoSaved:"Zapisano {{count}} elementów SEO",seoSavedSingle:"Zapisano {{count}} element SEO",urlAdded:"Link dodany",urlExists:"Ten adres już został dodany",invalidPage:"Nieprawidłowy adres strony",urlRemoved:"Link usunięty",filesAdded:"Dodano {{count}} plików",fileAdded:"Dodano {{count}} plik",fileRemoved:"Plik usunięty",fileExists:"Plik już został dodany",fileFormat:"Nieobsługiwany format (tylko PDF, DOC, DOCX)",fileTooLarge:"Plik zbyt duży (max 50MB)",maxSourcesLimit:"Osiągnięto limit 6 źródeł",canAddMore:"Możesz dodać maksymalnie {{count}} więcej plików",lastLinkNotAdded:"Osiągnięto limit 6 źródeł - nie dodano ostatniego linku",invalidLinkNotAdded:"Nieprawidłowy link - nie został dodany"},aH={header:ZV,preview:YV,editMode:JV,textsList:XV,form:QV,summary:eH,consent:tH,sourcesModal:rH,seoModal:nH,validation:sH,toast:iH},oH={title:"Generator AI do pisania tekstów - Smart-Copy.ai",description:"Generator tekstów AI: artykuły, opisy produktów, e-booki i raporty po polsku i angielsku. Płacisz za znaki — od {{price}}/1000, bez abonamentu.",keywords:"generator tekstów AI, sztuczna inteligencja do tekstów, tworzenie tekstów AI, content generator, generowanie treści, generator treści AI, AI copywriting, automatyczne pisanie tekstów",ogTitle:"Generator tekstów AI | Sztuczna inteligencja do tworzenia treści",ogDescription:"Profesjonalny generator treści AI. Twórz researchowane artykuły, opisy produktów i raporty z obrazami. 10x szybciej i taniej niż tradycyjny copywriting.",twitterTitle:"Generator Tekstów AI | Smart-Copy.ai",twitterDescription:"Profesjonalny generator treści AI. Twórz researchowane artykuły z obrazami. 10x szybciej i taniej."},lH={badge:"Od tematu do publikacji na WordPressie",titleLine1:"Kompletny generator tekstów AI:",titleLine2:"research, pisanie, publikacja",subtitleStrong:"Inne AI tylko piszą.",subtitle:"Smart-Copy researchuje ze źródłami, pisze, dodaje obraz wyróżniający i publikuje na Twoim WordPressie. Od {{price}} za 1000 znaków, bez subskrypcji.",valueProps:{speed:"Prawdziwy research z widocznymi źródłami",original:"Obraz wyróżniający w cenie (FLUX 1.1 Ultra)",export:"Publikacja i harmonogram na WordPressie",editor:"Automatyczny zwrot za nieudane generowania"},cta:{register:"Załóż konto i przetestuj",seeHow:"Zobacz, jak działa"},publishedBadge:"Opublikowano na WordPressie",progressAlt:"Panel Smart-Copy — postęp generowania artykułu: wyszukiwanie źródeł, konspekt, pisanie sekcji, obraz wyróżniający",trustLine:"Płacisz za tekst, nie za miesiąc. Tekst do 30 000 znaków — nigdy więcej niż 29 zł."},cH={items:[{value:"1000+",label:"Wygenerowanych tekstów"},{value:"2-150",label:"Stron tekstu"},{value:"0 zł",label:"abonamentu i kart w tle"},{value:"10 min",label:"Średni czas generowania"}]},uH={title:"Od tematu do publikacji w kwadrans",subtitle:"Cztery kroki — a Twój udział kończy się na pierwszym. Wszystko poniżej to prawdziwe ekrany z panelu.",steps:[{title:"Zamawiasz tekst",description:"Temat, długość (znaki i strony w jednym selektorze), typ tekstu, wytyczne, frazy SEO, własne źródła — i opcjonalnie witryna WordPress, na której tekst ma się ukazać.",alt:"Formularz zamówienia tekstu w panelu Smart-Copy"},{title:"AI researchuje i pisze",description:"Generator tworzy zapytania, przeszukuje sieć (i źródła akademickie, jeśli chcesz), wybiera najlepsze materiały, buduje konspekt i pisze sekcja po sekcji. Cały postęp widzisz na żywo.",alt:"Postęp generowania: wyszukiwanie źródeł, konspekt, pisanie sekcji"},{title:"Dostajesz tekst ze źródłami i obrazem",description:"Gotowy artykuł ma widoczną listę źródeł, z których powstał, oraz obraz wyróżniający z FLUX 1.1 Pro Ultra — w cenie. Do pobrania jako PDF, DOCX, HTML.",alt:"Lista źródeł wykorzystanych w artykule"},{title:"Tekst publikuje się sam",description:"Jeśli wskazałeś witrynę — wpis ląduje na WordPressie automatycznie: od razu, jako szkic albo z zaplanowaną datą. Obraz ustawia się jako featured image.",alt:"Wpis opublikowany 
754na WordPressie"}]},dH={title:"Funkcje generatora treści AI",subtitle:"Wszystko, czego potrzebujesz do profesjonalnego generowania treści w jednym narzędziu",items:[{title:"Zaawansowane modele AI Claude",description:"Piszemy na modelu Claude Sonnet 5 od Anthropic — tym samym, którego używają największe firmy na świecie. Pisarz korzysta z narzędzi: sam sięga po źródła w trakcie pisania."},{title:"Automatyczne wyszukiwanie informacji",description:"Nasz generator tekstów AI automatycznie wyszukuje i analizuje źródła w internecie, aby stworzyć merytorycznie poprawną treść."},{title:"Własne źródła",description:"Jeśli chcesz, możesz dodać własne dokumenty i strony jako materiały źródłowe - AI wykorzysta je priorytetowo do generowania treści."},{title:"Polski i angielski — natywnie",description:"Teksty powstają natywnie po polsku lub angielsku — z researchem źródeł, poprawną gramatyką i naturalnym stylem. Wytyczne możesz podać w dowolnym z tych języków."},{title:"Edytor WYSIWYG",description:"Pełna kontrola nad treścią - edytuj w czasie rzeczywistym wygenerowany tekst w intuicyjnym edytorze z formatowaniem HTML."},{title:"Export do PDF i DOCX",description:"Pobieraj gotowy content w formatach PDF, DOCX, HTML lub kopiuj jako plain text - jak Ci wygodnie."}]},hH={badge:"PRZEWAGA KONKURENCYJNA",title:"Co wyróżnia",subtitle:"Generator tekstów inny niż wszystkie",cta:"Załóż konto",ctaSubtext:"Rejestracja bez karty kredytowej",items:[{title:"Bardzo długie teksty",subtitle:"Do 300 000 znaków w jednym zleceniu",description:"W przeciwieństwie do innych generatorów AI, które limitują długość, Smart-Copy.ai pozwala tworzyć kompleksowe treści do 300 000 znaków (około 150 stron A4). Idealne do długich raportów, e-booków, dokumentacji technicznej czy obszernych artykułów merytorycznych.",features:["Ebooki, analizy, opracowania, raporty do 150 stron","Spójność treści na całej długości","Automatyczna struktura i formatowanie","Optymalizacja SEO, poprawność językowa"]},{title:"Wiarygodne źródła i research",subtitle:"Proces weryfikacji w 4 krokach",description:"Nasza sztuczna inteligencja nie wymyśla informacji. Każdy tekst powstaje w oparciu o starannie zweryfikowane źródła internetowe, które są dobierane odpowiednio do Twojego tekstu.",isProcess:!0,processLabel:"PROCES RESEARCH",features:["Wyszukiwanie - AI przeszukuje Google i znajduje najlepsze źródła dla Twojego tematu","Scraping - Automatyczne pobieranie i ekstrakcja treści ze stron WWW","Analiza - AI weryfikuje rzetelność, aktualność i wiarygodność źródeł","Generowanie - Tworzenie oryginalnej treści z pełnym wykorzystaniem źródeł"]},{title:"Bez zobowiązań i subskrypcji",subtitle:"Płać tylko za to, czego używasz",description:"W przeciwieństwie do wielu innych platform AI działających w modelu subskrypcyjnym w Smart-Copy.ai oszczędzasz realne środki, bez żadnych miesięcznych zobowiązań.",features:["Brak miesięcznych opłat - tworzysz teksty, gdy potrzebujesz","Doładuj konto od {{minTopUp}} - bez minimalnych pakietów","Środki nie wygasają - wykorzystasz je, kiedy chcesz","Oszczędzaj pieniądze dzięki korzystnym cenom - tylko {{pricePerThousand}}/1000 znaków"],comparison:{othersLabel:"Inne aplikacje",usLabel:"Smart-Copy.ai",others:["Abonament 50-300 zł/mies","Limit słów miesięcznie","Abonament pozostaje niewykorzystany"],us:["0 zł stałych kosztów","Płacisz za napisane słowa","Środki bez daty ważności"]}},{title:"Własne źródła wiedzy",subtitle:"Linki + pliki = oryginalna treść",description:"Dodaj do 6 własnych materiałów źródłowych - linki do stron WWW lub pliki w formatach PDF, DOC, DOCX. AI wykorzysta je priorytetowo, tworząc unikalne treści w oparciu o wiedzę, którą Ty dostarczasz.",features:["Dokumenty firmowe - raporty, prezentacje, materiały wewnętrzne","Strony WWW - Twoja strona, konkurencja, artykuły branżowe","Materiały eksperckie - e-booki, white papers, case studies","100% oryginalność - AI nie kopiuje, tylko przetwarza i syntetyzuje"]}]},pH={title:"Zastosowania",subtitle:"Smart-Copy.ai to idealny generator do każdego rodzaju treści - od krótkich artykułów blogowych po rozległe opracowania naukowe",items:[{title:"Artykuły blogowe",description:"SEO-friendly AI content"},{title:"Opisy produktów",description:"Oryginalne i zoptymalizowane pod SEO opisy dla e-commerce"},{title:"Raporty i analizy",description:"Profesjonalne dokumenty biznesowe, naukowe, analityczne"},{title:"Content marketing",description:"Treści sprzedażowe i marketingowe"},{title:"Posty social media",description:"Angażujące treści na platformy społecznościowe"},{title:"Teksty na strony WWW",description:"Wartościowe treści na strony firmowe, do wizytówek, jako opisy"}]},fH={title:"Copywriter, czat AI czy",titleHighlight:"Smart-Copy?",subtitle:"Uczciwe porównanie trzech sposobów na artykuł, który ma się ukazać na Twoim blogu — z researchem, obrazem i publikacją.",headers:{aspect:"",copywriter:"Copywriter",chat:"Czat AI (abonament)",us:"Smart-Copy"},note:"Uczciwie: jeśli potrzebujesz samego surowego tekstu i masz czas na prompty, weryfikację źródeł, obraz i formatowanie — abonament czatu wyjdzie taniej. Smart-Copy kupujesz wtedy, gdy liczy się gotowy, opublikowany artykuł i Twój czas.",items:[{aspect:"Koszt artykułu 10-stronicowego (20 tys. znaków)",copywriter:"{{copywriterRange}}",chat:"W abonamencie (~100 zł/mies.)",us:"{{priceTenPages}}"},{aspect:"Twój czas przy jednym tekście",copywriter:"Brief + korekta, ~30 min",chat:"30-60 min: prompty, sklejanie, formatowanie",us:"2 minuty: temat i Enter"},{aspect:"Research ze źródłami",copywriter:"Ręczny, w cenie usługi",chat:"Zależy od promptu, źródła weryfikujesz sam",us:"Automatyczny, lista źródeł przy tekście"},{aspect:"Obraz wyróżniający",copywriter:"Osobne zlecenie albo stock",chat:"Osobny prompt, pobranie, wgranie",us:"W cenie, ustawiany automatycznie"},{aspect:"Publikacja na WordPressie",copywriter:"Wklejasz i formatujesz sam",chat:"Kopiuj-wklej-formatuj",us:"Automatyczna, także z harmonogramem"},{aspect:"Cały cykl bloga (plan tematów, regularność)",copywriter:"Osobny projekt i budżet",chat:"Ty wymyślasz i pilnujesz",us:"Autoblog planuje, pisze i publikuje"},{aspect:"Automatyzacja i podpięcie do własnych systemów",copywriter:"Nie dotyczy",chat:"Musisz zbudować samodzielnie",us:"Publiczne API i webhooki z podpisem"},{aspect:"Zobowiązanie",copywriter:"Umowa lub zlecenie",chat:"Abonament miesięczny",us:"Brak — płacisz za tekst"}]},mH={badge:"PRAWDZIWY PRZYKŁAD",title:"Artykuł ekspercki w",titleTime:"5 minut",titleFor:"za",subtitle:"Zobacz, jak Smart-Copy.AI wygenerował profesjonalny artykuł blogowy o automatyzacji biznesu — i oceń efekt sam",stats:{time:"Czas generowania",cost:"Koszt Smart-Copy.ai",words:"Słów w artykule",quality:"Ocena jakości"},article:{label:"Wygenerowany artykuł",category:"Kategoria: Automatyzacja biznesu",title:'"Automatyzacja procesów w małej firmie - jak zacząć?"',description:"Kompleksowy poradnik zawierający: przegląd narzędzi (Make.com, Zapier), tabelę porównawczą 7 rozwiązań z cenami, praktyczne case studies firm z Torunia i Bydgoszczy, listę pytań do audytu procesów...",tags:["Tabele porównawcze","Case studies","Listy checklistowe","SEO-optimized"],linkText:"Zobacz pełny artykuł na żywo"},comparisonCards:{copywriter:{title:"Copywriter",time:"2-3 dni robocze"},diy:{title:"Pisanie samemu",time:"4-6 godzin pracy"},smartcopy:{badge:"NAJLEPSZY WYBÓR"}},testimonial:{quote:"Smart-Copy wygenerował 80% gotowego artykułu w 5 minut. Dodałem swoje case study, poprawiłem kilka statystyk i po 30 minutach miałem profesjonalny content gotowy do publikacji. Oszczędzam 5+ godzin tygodniowo na tworzeniu treści.",author:"Karol",role:"Właściciel agencji webowej, Toruń"},bottomCta:{text:"Chcesz zobaczyć, jak Smart-Copy sprawdzi się dla Twojego biznesu?",button:"Wypróbuj już teraz"}},gH={title:"Przejrzyste ceny bez subskrypcji",subtitle:"Płać tylko za to, czego używasz. Generator tekstów AI bez ukrytych kosztów.",priceUnit:"za 1000 znaków (pół strony A4)",cta:"Załóż konto →",examples:{onePage:"1 strona (2000 znaków)",tenPages:"Artykuł 10-str (20k znaków)",fiftyPages:"Raport 50-str (100k znaków)"}},yH={title:"Najczęściej zadawane pytania",subtitle:"Wszystko, co chcesz wiedzieć o sztucznej inteligencji do pisania tekstów",items:[{question:"Czy generator tekstów AI tworzy oryginalne treści?",answer:"Tak! Nasza sztuczna inteligencja do tekstów nigdy nie kopiuje treści ze źródeł. AI analizuje informacje i pisze w pełni oryginalny tekst własnymi słowami, dostosowany do Twoich wytycznych."},{question:"W jakich językach działa Smart-Copy.AI?",answer:"Generator tworzy teksty po polsku i po angielsku. Oba języki obsługujemy natywnie — z researchem źródeł, poprawną gramatyką i naturalnym stylem; to nie są tłumaczenia maszynowe."},{question:"Jak długie teksty może wygenerować AI?",answer:"Smart-Copy obsługuje teksty od 2000 znaków (1 strona) do ok. 300 000 znaków (ok. 150 stron). Możesz zamówić krótkie opisy produktów, długie artykuł blogowe, tekst do ebooka czy raport analityczny."},{question:"Czy mogę dodać własne materiały źródłowe?",answer:"Tak! Możesz dodać do 6 własnych źródeł (linki do stron lub pliki PDF/DOC/DOCX). Content generator AI wykorzysta je priorytetowo, tworząc tekst oparty głównie na Twoich materiałach."}
754,{question:"Ile kosztuje generowanie treści?",answer:"Cena wynosi {{pricePerThousand}} za 1000 znaków. Przykładowo: 1 strona (2000 znaków) = {{priceOnePage}}, artykuł 10-stronicowy = {{priceTenPages}}. To 10 x tańsze niż tradycyjny copywriting!"},{question:"Czy treści są SEO-friendly?",answer:"Tak! Generator tekstów AI tworzy treści zoptymalizowane pod SEO - naturalne użycie słów kluczowych, poprawna struktura nagłówków H1-H3, wysoką unikalność i wartość merytoryczną."},{question:"Ile kosztuje długi artykuł?",answer:"Cennik jest degresywny: 1,99 zł za 1000 znaków do 5 tys., 1,19 zł do 15 tys. i 0,69 zł powyżej — a tekst do 30 000 znaków nigdy nie kosztuje więcej niż 29 zł. Przykład: artykuł 8000 znaków to 13,52 zł, a raport 30 000 znaków — 29 zł."},{question:"Czy Smart-Copy może publikować bezpośrednio na WordPressie?",answer:"Tak. Po połączeniu witryny darmową wtyczką każdy tekst może opublikować się automatycznie — od razu, jako szkic albo z zaplanowaną datą. Obraz wyróżniający ustawia się sam, a link do wpisu widzisz w panelu."},{question:"Skąd AI bierze informacje do tekstów?",answer:"Z prawdziwego researchu: generator przeszukuje Google, opcjonalnie źródła akademickie, i może korzystać z Twoich adresów URL lub plików. Lista wykorzystanych źródeł jest widoczna przy każdym tekście — nie musisz wierzyć na słowo."}]},xH={titleLine1:"Zacznij generować profesjonalne",titleLine2:"treści już dziś",subtitle:"Generator tekstów AI Smart-Copy.ai to najszybszy sposób na tworzenie wysokiej jakości contentu w doskonałych cenach. Załóż konto i zacznij oszczędzać na treściach bez kompromisów jakościowych!",cta:"Załóż konto",benefits:"✓ Bez karty kredytowej ✓ Bez zobowiązań ✓ {{price}}/1000 znaków"},wH={badge:"Autoblog",title:"Blog, który pisze się sam",subtitle:"Podajesz niszę (albo autoblog sam odczyta ją z Twojej witryny), a system planuje klaster 20 tematów, pisze w Twoim rytmie i publikuje prosto do WordPressa.",bullets:["Klaster tematów z analizy Twojej witryny i konkurencji","1–7 tekstów tygodniowo, z obrazami, wg harmonogramu","Kolejka tematów do edycji: zmieniaj, usuwaj, przeciągaj","Auto-doładowanie salda — seria nigdy się nie zatrzymuje"],imageAlt:"Seria autobloga w panelu Smart-Copy: klaster 20 zaplanowanych tematów",cta:"Uruchom autobloga"},bH={title:"Wpinasz, gdzie chcesz",subtitle:"Panel to dopiero początek — Smart-Copy działa tam, gdzie Ty pracujesz."},kH={title:"Policz swoją cenę",lengthLabel:"Długość tekstu",chars:"znaków",pages:"stron",price:"Cena tekstu",capNote:"Sufit ceny: tekst do 30 000 znaków nigdy nie kosztuje więcej niż 29 zł.",bonusNote:"Doładowania z bonusem: +5% od 100 zł, +10% od 200 zł, +15% od 500 zł, +20% od 1000 zł.",tiersNote:"Stawki maleją z długością: 1,99 zł do 5 tys. znaków, 1,19 zł do 15 tys., 0,69 zł powyżej."},vH={meta:oH,hero:lH,stats:cH,howItWorks:uH,features:dH,distinctions:hH,useCases:pH,comparison:fH,caseStudy:mH,pricing:gH,faq:yH,finalCta:xH,autoblog:wH,integrationsStrip:bH,pricingCalc:kH},jH={title:"AI Copywriter | Teksty sprzedażowe z AI - Smart-Copy.ai",description:"AI copywriter tworzy teksty sprzedażowe, artykuły i content marketing po polsku i angielsku. 12x taniej niż tradycyjny copywriter — od 1,99 zł/1000 znaków.",keywords:"AI copywriter, AI pisarz, AI writer, copy AI, sztuczna inteligencja copywriter, automatyczne pisanie tekstów, AI do copywritingu",ogTitle:"AI Copywriter | Profesjonalny AI pisarz - Smart-Copy.ai",ogDescription:"AI copywriter tworzy teksty sprzedażowe 12x taniej niż człowiek. Research źródeł i obrazy w cenie. Copywriting, content marketing, SEO."},SH={badge:"Profesjonalny copywriting z AI",titleLine1:"AI copywriter",titleLine2:"12x tańszy od człowieka",subtitleStrong:"AI pisarz",subtitle:"do tekstów sprzedażowych, content marketingu i SEO.",subtitleLine2:"Copy AI po polsku i angielsku - od {{price}} za 1000 znaków.",valueProps:{time:"5 minut vs 8 godzin pracy",cost:"40 zł vs 500-800 zł za artykuł",techniques:"AIDA, PAS, storytelling"},cta:{test:"Przetestuj AI copywritera już teraz",compare:"Zobacz różnice"},trust:"✓ Bez zobowiązań ✓ Od 1,99 zł/1000 znaków"},NH={title:"Dlaczego AI pisarz to przyszłość copywritingu?",subt
754itle:"Copy AI łączy szybkość maszyny z kreatywnością copywritera",items:[{title:"Oszczędność czasu",description:"AI copywriter tworzy w 5 minut to, co tradycyjny copywriter pisze 8 godzin."},{title:"Niższe koszty",description:"Płać {{articlePrice}} za artykuł zamiast {{copywriterPrice}} za copywritera. To 95% oszczędności!"},{title:"Kreatywność AI",description:"AI pisarz generuje pomysły i warianty tekstów, których człowiek by nie wymyślił."},{title:"Polski i angielski natywnie",description:"Copy AI pisze natywnie po polsku i angielsku — z researchem źródeł i naturalnym stylem."},{title:"Konwersyjna treść",description:"AI writer zna techniki copywritingu - AIDA, PAS, storytelling, CTA."},{title:"SEO-friendly",description:"AI copywriter automatycznie optymalizuje teksty pod wyszukiwarki Google."}]},CH={title:"Jak pracuje AI writer Smart-Copy?",subtitle:"Od briefu do gotowego tekstu w 4 prostych krokach",steps:[{title:"Briefing w 60 sekund",description:"Podajesz temat, grupę docelową, ton komunikacji i długość. AI copywriter zrozumie zadanie."},{title:"AI pisarz zbiera materiały",description:"Automatyczny research w internecie + Twoje własne materiały źródłowe (opcjonalnie)."},{title:"Copy AI pisze treść",description:"W 5-10 minut AI writer generuje gotowy, SEO-friendly tekst w wybranym stylu copywritingu."},{title:"Ty dopracowujesz szczegóły",description:"Edytujesz w WYSIWYG, dodajesz osobisty touch, eksportujesz PDF/DOCX."}]},EH={title:"Rodzaje tekstów od AI copywritera",subtitle:"Copy AI pisze każdy typ treści marketingowej i sprzedażowej",items:[{title:"Artykuły blogowe",examples:["Poradniki","Artykuły eksperckie","Listicles","Case studies"],price:"od 40 zł"},{title:"Copywriting sprzedażowy",examples:["Landing pages","Opisy produktów","Email marketing","Reklamy"],price:"od 20 zł"},{title:"Social media",examples:["Posty Facebook","Tweety","LinkedIn","Instagram"],price:"od 8 zł"},{title:"Content marketing",examples:["E-booki","White papers","Newslettery","Webinary"],price:"od 80 zł"},{title:"Teksty korporacyjne",examples:["O firmie","Misja/wizja","Raporty","Prezentacje"],price:"od 50 zł"},{title:"Content SEO",examples:["Artykuły SEO","Opisy kategorii","FAQ","Glossary"],price:"od 30 zł"}]},TH={title:"Copywriter człowiek vs",titleHighlight:"AI copywriter",subtitle:"Porównanie kosztów, czasu i możliwości tradycyjnego copywritingu z AI pisarzem",headers:{feature:"Porównanie",human:"Copywriter człowiek",ai:"AI copywriter"}
754,rows:[{feature:"Czas napisania 10-str artykułu",human:"8-12 godzin",ai:"5-10 minut"},{feature:"Koszt 10-stronicowego artykułu",human:"500-800 zł",ai:"~40 zł"},{feature:"Dostępność",human:"8h-18h (pn-pt)",ai:"24/7/365"},{feature:"Wielojęzyczność",human:"Wymaga tłumacza",ai:"Polski i angielski od ręki"},{feature:"Rewizje i poprawki",human:"2-3 dni",ai:"Natychmiast"},{feature:"Research źródeł",human:"2-4 godziny",ai:"Automatyczny"}]},AH={title:"Co mówią użytkownicy AI pisarza?",subtitle:"Prawdziwe opinie o copy AI Smart-Copy.ai",items:[{text:"AI copywriter Smart-Copy zastąpił mi agencję content marketingową. Oszczędzam 15,000 zł miesięcznie i dostaję teksty w ciągu minut zamiast tygodni.",author:"Marcin K.",role:"CEO, e-commerce"},{text:"Jako copywriter z 10-letnim doświadczeniem byłem sceptyczny. Ale ten AI pisarz tworzy lepsze first drafty niż połowa juniorów, z którymi pracowałem.",author:"Anna W.",role:"Senior Copywriter"},{text:"Copy AI pomógł nam skalować content z 4 artykułów miesięcznie do 50. To było niemożliwe z tradycyjnymi copywriterami przy naszym budżecie.",author:"Tomasz L.",role:"Marketing Manager"}]},zH={title:"Najczęstsze pytania o AI copywritera",subtitle:"Wszystko co musisz wiedzieć o AI pisarzu i copy AI",items:[{question:"Czy AI copywriter zastąpi ludzkiego copywritera?",answer:"AI pisarz nie zastąpi kreatywnych seniorów, ale doskonale radzi sobie z content marketingiem, SEO, opisami produktów i artykułami blogowymi. To idealne narzędzie dla copywriterów - tworzy first draft, który później dopracowujesz."},{question:"Jakie techniki copywritingu zna AI writer?",answer:"Nasz AI copywriter zna klasyczne techniki: AIDA (Attention, Interest, Desire, Action), PAS (Problem, Agitate, Solution), storytelling, call-to-action, power words, emotional triggers, benefit-driven writing i copywriting SEO."},{question:"Czy copy AI pisze tylko po polsku?",answer:"Nie! AI writer tworzy teksty po polsku i po angielsku — każdy tekst brzmi jak napisany przez native speakera, bo powstaje natywnie w wybranym języku, a nie przez tłumaczenie."}
754,{question:"Czy teksty AI copywritera są unikalne?",answer:"Tak! AI pisarz nigdy nie kopiuje treści ze źródeł. Analizuje informacje i tworzy w pełni oryginalny tekst własnymi słowami. Możesz sprawdzić unikalność w dowolnym plagiat checkerze - będzie 100%."},{question:"Ile kosztuje AI copywriter vs tradycyjny copywriter?",answer:"Tradycyjny copywriter: 50-100 zł za 1000 znaków. AI copywriter Smart-Copy: {{price}} za 1000 znaków. To 12-25x tańsze! Artykuł 10-stronicowy: copywriter 500-800 zł, copy AI ~40 zł."},{question:"Czy mogę edytować teksty wygenerowane przez AI writer?",answer:"Oczywiście! Po wygenerowaniu masz dostęp do edytora WYSIWYG - edytujesz tekst jak w Wordzie. Możesz dodać swoje przemyślenia, zmienić ton, poprawić szczegóły. AI copywriter to punkt startowy, nie końcowy."}]},PH={badge:"Ponad 10,000 copywriterów i marketerów już korzysta",titleLine1:"Wypróbuj AI copywritera",titleLine2:"i przekonaj się sam",subtitle:"AI pisarz Smart-Copy.ai to rewolucja w copywritingu. Copy AI tworzy profesjonalne teksty w minutach, nie w godzinach.",cta:{test:"Przetestuj już teraz",login:"Zaloguj się"},benefits:"✓ Bez karty kredytowej ✓ Test gratis ✓ Bez zobowiązań"},_H={meta:jH,hero:SH,benefits:NH,howItWorks:CH,copywritingTypes:EH,comparison:TH,testimonials:AH,faq:zH,finalCta:PH},IH={title:"Generator opisów produktów AI dla e-commerce - Smart-Copy.ai",description:"Unikalne, przyjazne SEO opisy produktów i kategorii dla sklepów internetowych po polsku i angielsku. Od {{price}}/1000 znaków, bez abonamentu.",keywords:"AI generator opisów produktów, sztuczna inteligencja opisy produktów, automatyczne opisy produktów, AI e-commerce, generator opisów sklepu, opisy kategorii AI",ogTitle:"AI generator opisów produktów | Smart-Copy.ai",ogDescription:"Generuj setki unikalnych opisów produktów w godzinę. AI dla e-commerce po polsku i angielsku. 10x taniej niż copywriter."},OH={badge:"AI dla sklepów internetowych",titleLine1:"AI generator",titleLine2:"opisów produktów",subtitleStrong:"Sztuczna inteligencja",subtitle:"tworzy unikalne opisy produktów i kategorii dla e-commerce.",subtitleLine2:"1000 opisów w godzinę. SEO-friendly. Polski i angielski. Od {{price}} za 1000 znaków.",valueProps:{cost:"100 opisów = ~{{hundredDescsCost}} (vs {{copywriterCost}} copywriter)",unique:"Unikalne, nie duplikaty",export:"Export CSV/JSON/XML"},cta:{start:"Zacznij generować opisy",howItWorks:"Zobacz jak działa"},trust:"✓ Doładuj od {{minTopUp}} ✓ Płać tylko za to czego używasz ✓ Bez subskrypcji"},RH={title:"Dlaczego AI generator opisów produktów?",subtitle:"Skaluj swój e-commerce bez wydawania fortuny na copywriterów",items:[{title:"1000 opisów w godzinę",description:"AI generator opisów produktów tworzy setki unikalnych opisów w czasie, który zajęłoby Ci napisanie jednego."},{title:"95% oszczędności kosztów",description:"{{price}} za opis zamiast {{copywriterPrice}} za copywritera. Przy 100 produktach to oszczędność {{savings}}."},{title:"SEO w każdym opisie",description:"Automatyczna optymalizacja pod Google - słowa kluczowe, nagłówki H1-H3, meta description."},{title:"Konwersyjny copywriting",description:"AI zna techniki sprzedażowe - benefit selling, storytelling, social proof, pilność."},{title:"Polski i angielski bez tłumacza",description:"Opisy produktów natywnie po polsku i angielsku. Idealne dla sklepów i marketplace."},{title:"Opisy kategorii i tagów",description:"Nie tylko produkty - AI pisze też opisy kategorii, kolekcji, brandów i atrybutów."}]},LH={title:"Jak działa generator opisów produktów?",subtitle:"Od importu danych do gotowych opisów w 4 krokach",steps:[{title:"Import danych produktowych",description:"Wklejasz CSV z nazwami produktów i podstawowymi atrybutami lub dodajesz ręcznie po kolei."},{title:"Wybór szablonu i tonu",description:"Określasz długość, styl (profesjonalny/casualowy/luksusowy) i język docelowy."},{title:"AI generuje opisy",description:"Sztuczna inteligencja do opisów produktów tworzy unikalne, SEO-friendly treści w kilka minut."},{title:"Edycja i export",description:"Poprawiasz szczegóły w edytorze, eksportujesz CSV/JSON do swojego sklepu."}]},MH={title:"AI dla każdej branży e-commerce",subtitle:"Sztuczna inteligencja zna specyfikę Twojej branży",items:[{title:"Sklepy fashion",examples:["Ubrania","Buty","Akcesoria","Biżuteria"],features:"Opisy materiałów, kroju, stylizacje"},{title:"Elektronika",examples:["Smartfony","Laptopy","AGD","RTV"],features:"Specyfikacje techniczne, porównania"},{title:"Dom i ogród",examples:["Meble","Dekoracje","Narzędzia","Rośliny"],features:"Wymiary, zastosowania, pielęgnacja"},{title:"Kosmetyki i zdrowie",examples:["Kosmetyki","Suplementy","Perfumy","Pielęgnacja"],features:"Składniki, efekty, sposób użycia"},{title:"Sport i hobby",examples:["Rower","Fitness","Gry","Książki"],features:"Parametry, zastosowanie, zalety"},{title:"Marketplace multi-brand",examples:["Allegro","Amazon","eBay","Aliexpress"],features:"Opisy dla różnych platform"}],generatesLabel:"AI generuje:"},DH={title:"Rodzaje i ceny opisów produktów",subtitle:"Wybierz długość i strukturę dopasowaną do Twojego 
754sklepu",items:[{type:"Opis krótki (300-500 znaków)",use:"Karty produktów, miniaturki, listy",elements:["Główna korzyść","USP","Call to action"]},{type:"Opis standardowy (1000-2000 znaków)",use:"Główne karty produktów",elements:["Nagłówek H1","Akapit wstępny","Lista cech","CTA"]},{type:"Opis rozbudowany (2000-5000 znaków)",use:"Produkty premium, SEO",elements:["Sekcje H2/H3","Storytelling","Szczegóły techniczne","FAQ"]}]},FH={title:"Funkcje AI generatora",subtitle:"Wszystko czego potrzebuje Twój e-commerce",items:["Unikalne opisy dla każdego wariantu produktu","Automatyczne wykorzystanie atrybutów (kolor, rozmiar, materiał)","Ton dostosowany do grupy docelowej","Wbudowane call-to-action","Zgodność z wytycznymi marketplace (Allegro, Amazon)","Export do CSV, XML, JSON dla WooCommerce, Shopify, PrestaShop","Bulk generation - masowe generowanie","Edytor WYSIWYG do szybkich poprawek"]},BH={title:"Ręczne vs",titleHighlight:"AI opisy produktów",subtitle:"Porównanie tradycyjnego copywritingu z generatorem AI",headers:{aspect:"Aspekt",manual:"Ręczne pisanie",ai:"Generator AI"},rows:[{aspect:"Czas napisania 100 opisów",manual:"2-3 tygodnie",ai:"1-2 godziny"},{aspect:"Koszt 100 opisów produktów",manual:"5,000-10,000 zł",ai:"~400 zł"},{aspect:"Opisy w wielu językach",manual:"Agencja tłumaczeniowa",ai:"Natychmiast po polsku i angielsku"},{aspect:"Aktualizacja po zmianie cen/stock",manual:"Ręcznie, czasochłonnie",ai:"Automatycznie"},{aspect:"Spójność tone of voice",manual:"Trudna przy wielu copywriterach",ai:"100% spójna"}]},$H={title:"Przykłady zastosowań",subtitle:"Jak AI generator oszczędza czas i pieniądze w e-commerce",challengeLabel:"Wyzwanie:",solutionLabel:"Rozwiązanie:",items:[{scenario:"Nowy sklep - 500 produktów",challenge:"Potrzebujesz opisać cały asortyment przed uruchomieniem sklepu",solution:"AI generator opisów produktów tworzy wszystkie opisy w 2 dni zamiast 3 miesięcy.",savings:"Oszczędność: ~25,000 zł i 3 miesiące"},{scenario:"Rozszerzenie na marketplace",challenge:"Wchodzisz na Allegro/Amazon i potrzebujesz dostosować opisy pod ich wytyczne",solution:"AI przepisuje opisy zgodnie z wymogami każdej platformy, optymalizując pod ich algorytmy.",savings:"Oszczędność: ~10,000 zł i 1 miesiąc"},{scenario:"Ekspansja zagraniczna",challenge:"Chcesz sprzedawać w Niemczech i UK - potrzebujesz tłumaczeń 1000 produktów",solution:"AI tworzy natywne opisy w niemieckim i angielskim, nie tłumaczenia maszynowe.",savings:"Oszczędność: ~30,000 zł i 2 miesiące"}]},UH={title:"Najczęstsze pytania",subtitle:"Wszystko o AI generatorze opisów produktów",items:[{question:"Czy AI generator opisów produktów tworzy unikalne treści?",answer:"Tak! Każdy opis jest w 100% unikalny. AI nie kopiuje ze źródeł ani z innych produktów. Możesz wkleić do plagiat checkera - będzie 100% oryginalności. Nawet dla podobnych produktów (np. różne kolory tej samej koszulki) AI tworzy odmienne opisy."},{question:"Jak AI wie, co napisać o moim produkcie?",answer:"Podajesz podstawowe dane: nazwę produktu, kategorię, atrybuty (np. materiał, kolor, rozmiar), cenę. AI analizuje te informacje, wyszukuje kontekst w internecie i tworzy profesjonalny opis. Możesz też dodać własne bullet pointy, które AI rozwinie w pełny tekst."},{question:"Czy opisy są zoptymalizowane pod Google?",answer:"Tak! Sztuczna inteligencja do opisów produktów automatycznie: wstawia słowa kluczowe naturalnie, tworzy strukturę H1-H3, optymalizuje długość (minimum 300 znaków dla SEO), dodaje wewnętrzne linki (jeśli podasz), generuje meta description."},{question:"Czy mogę generować opisy dla Allegro, Amazon, własnego sklepu?",answer:"Oczywiście! AI generator dostosowuje opisy do wymagań każdej platformy: Allegro (maksymalnie 50,000 znaków w HTML), Amazon (do 2000 znaków plain text, bullet pointy), WooCommerce/Shopify (pełny HTML z tagami). Możesz wygenerować różne wersje tego samego produktu."},{question:"Ile kosztuje wygenerowanie opisów 100 produktów?",answer:"Zależy od długości. Krótkie opisy (300-500 znaków): ~{{shortCost100}} za 100 sztuk. Standardowe (1000-2000 znaków): ~{{standardCost100}}. Długie SEO (3000-5000 znaków): ~{{longCost100}}. To 10-20x taniej niż copywriter (5000-10,000 zł za 100 opisów)."},{question:"Czy AI potrafi pisać w branżowym żargonie (np. technicznym)?",answer:"Tak! AI generator opisów produktów zna terminologię z: elektroniki (parametry techniczne, specyfikacje), mody (nazwy tkanin, kroje, style), kosmetyków (składniki INCI, działanie), sportu (parametry treningowe), motoryzacji (części, specyfikacje). Podajesz niszę, AI dostosowuje język."}]},WH={badge:"Skaluj swój sklep bez limitu",titleLine1:"Zacznij generować opisy",titleLine2:"produktów już dziś",subt
754itle:"AI generator opisów produktów Smart-Copy.ai - sztuczna inteligencja dla e-commerce. 1000 opisów w godzinę, 10x taniej niż copywriter.",cta:{register:"Stwórz konto i doładuj",login:"Mam już konto"},benefits:"✓ Doładuj od {{minTopUp}} ✓ {{price}} za 1000 znaków ✓ Bez zobowiązań"},VH={meta:IH,hero:OH,benefits:RH,howItWorks:LH,ecommerceTypes:MH,descriptionTypes:DH,features:FH,comparison:BH,useCases:$H,faq:UH,finalCta:WH},HH={title:"AI SEO Writer | Generator Treści SEO z AI - Smart-Copy.ai",description:"Generator treści SEO: zoptymalizowane artykuły, opisy kategorii i landing pages z automatycznym researchem. Od {{price}}/1000 znaków.",keywords:"AI SEO writer, generator treści SEO, SEO content generator, narzędzie do pisania SEO, AI generator artykułów SEO, automatyczne pisanie treści SEO, pozycjonowanie treści AI, content SEO generator",ogTitle:"AI SEO Writer | Generator Treści SEO z Inteligencją AI",ogDescription:"Generuj treści zoptymalizowane pod SEO z pomocą AI. Automatyczny research, dobór słów kluczowych, struktura nagłówków H1-H3 i unikalna treść. 10x szybciej niż ręczne pisanie.",ogUrl:"https://www.smart-copy.ai/ai-seo-writer"},qH={badge:"AI SEO Content Generator",titleLine1:"Treści SEO pisane",titleLine2:"przez AI",subtitleStrong:"Generator treści SEO oparty na AI",subtitle:"— twórz zoptymalizowane artykuły blogowe, opisy kategorii, landing pages i treści na strony, które pozycjonują się w Google.",subtitleLine2:"Automatyczny research, struktura nagłówków i naturalne słowa kluczowe — od {{price}} za 1000 znaków.",valueProps:{seo:"Struktura SEO (H1-H3, meta)",research:"Automatyczny research źródeł",unique:"100% unikalna treść",keywords:"Naturalne nasycenie frazami"},cta:{start:"Zacznij pisać treści SEO",howItWorks:"Zobacz, jak działa"},trust:"✓ Bez subskrypcji ✓ Doładowanie od {{minTopUp}} ✓ Środki nigdy nie wygasają"},KH={title:"Dlaczego AI SEO Writer?",subtitle:"Generuj treści, które nie tylko dobrze wyglądają, ale przede wszystkim pozycjonują się w wyszukiwarkach",items:[{title:"Optymalizacja SEO w locie",description:"Generator treści SEO automatycznie buduje poprawną strukturę nagłówków H1-H3, stosuje naturalne nasycenie frazami kluczowymi i tworzy treść przyjazną algorytmom Google."},{title:"10x taniej niż copywriter SEO",description:"Artykuł SEO 10-stronicowy za ~{{articlePrice}} zamiast {{copywriterPrice}} u specjalisty SEO. Oszczędzaj {{savings}}+ rocznie na content marketingu bez utraty jakości."},{title:"Research i weryfikacja źródeł",description:"AI przeszukuje internet, analizuje konkurencję i zbiera aktualne dane. Każdy tekst SEO opiera się na wiarygodnych źródłach — nie na wymyślonych informacjach."},{title:"Treść gotowa do publikacji",description:"Wygenerowane artykuły mają gotową strukturę do CMS: nagłówki, akapity, listy, wyróżnienia. Eksportuj jako HTML i wklej bezpośrednio do WordPressa czy Shopify."},{title:"Polski i angielski — natywna jakość SEO",description:"Twórz treści SEO w polskim, angielskim, niemieckim, hiszpańskim, francuskim, włoskim, ukraińskim i rosyjskim. Idealne do pozycjonowania wielojęzycznych serwisów."},{title:"Skaluj produkcję contentu",description:"Wygeneruj dziesiątki artykułów SEO w ciągu jednego dnia. Nasz AI SEO writer pozwala skalować content marketing jak nigdy wcześniej — bez rozbudowywania zespołu."}]},GH={title:"Jak działa AI SEO Writer?",subtitle:"Od tematu do gotowego artykułu SEO w 4 prostych krokach — 
754cały proces trwa kilka minut",steps:[{title:"Podaj temat i frazy kluczowe",description:"Wpisz temat artykułu, główne słowa kluczowe oraz opcjonalne wytyczne (ton, grupa docelowa, długość). AI SEO writer dostosuje się do Twoich potrzeb."},{title:"AI analizuje konkurencję",description:"Sztuczna inteligencja przeszukuje Google, analizuje treści konkurencji na pierwszych pozycjach i identyfikuje luki contentowe, które Twój artykuł może wypełnić."},{title:"Generowanie treści SEO",description:"AI tworzy unikalny, wartościowy artykuł z optymalną strukturą nagłówków, naturalnym rozmieszczeniem fraz kluczowych i angażującym stylem pisania."},{title:"Edycja, optymalizacja i export",description:"Dopracuj treść w edytorze WYSIWYG, dostosuj nagłówki i meta dane, a następnie pobierz jako HTML, PDF lub DOCX. Gotowe do publikacji w 5 minut."}]},ZH={title:"Rodzaje treści SEO, które wygenerujesz",subtitle:"AI SEO Writer tworzy każdy typ contentu potrzebny do skutecznej strategii pozycjonowania",generatesLabel:"Optymalizacja:",items:[{title:"Artykuły blogowe SEO",examples:["Poradniki how-to","Listy top 10","Artykuły eksperckie","Pillar pages"],features:"Struktura H1-H3, frazy long-tail, linkowanie wewnętrzne, meta description"},{title:"Opisy kategorii e-commerce",examples:["Kategorie produktów","Podkategorie","Kolekcje","Filtry"],features:"Nasycenie frazami produktowymi, CTA, opisy z wartością dla użytkownika"},{title:"Landing pages",examples:["Strony usług","Strony ofertowe","Strony lokalne","Kampanie PPC"],features:"Przekonujący copy, struktura konwersji, lokalne SEO, frazy transakcyjne"},{title:"Treści na strony firmowe",examples:["O nas","Usługi","Realizacje","FAQ"],features:"Frazy brandowe, budowanie autorytetu E-E-A-T, struktura informacyjna"},{title:"Opisy produktów SEO",examples:["Unikalne opisy","Specyfikacje","Porównania","Recenzje"],features:"Unikalne treści dla każdego produktu, frazy zakupowe, rich snippets"},{title:"Treści filarowe i klastry",examples:["Pillar content","Cluster articles","Hub pages","Cornerstone content"],features:"Strategia klastrowa, linkowanie wewnętrzne, pokrycie tematyczne, topical authority"}]},YH={title:"Funkcje SEO wbudowane w generator",subtitle:"Każda treść generowana przez AI SEO Writer jest automatycznie zoptymalizowana pod wyszukiwarki",items:["Poprawna hierarchia nagłówków H1 → H2 → H3","Naturalne nasycenie frazami kluczowymi (2-3%)","Frazy long-tail w nagłówkach i treści","Optymalna długość akapitów i czytelność","Listy i wyróżnienia zwiększające czytelność","Formatowanie gotowe do CMS (HTML)","Unikalna treść — 0% plagiatu","Struktura wspierająca featured snippets","Treść oparta na aktualnych źródłach","Spójny ton i styl na całej długości tekstu","Wsparcie dla treści E-E-A-T (Experience, Expertise, Authoritativeness, Trustworthiness)","Automatyczny research tematyczny z Google"]},JH={title:"Ręczne pisanie SEO vs",titleHighlight:"AI SEO Writer",subtitle:"Porównanie tradycyjnego tworzenia treści SEO z generowaniem przez sztuczną inteligencję",headers:{aspect:"Aspekt",manual:"Ręczne pisanie",ai:"AI SEO Writer"},rows:[{aspect:"Czas tworzenia artykułu 10-str",manual:"6-12 godzin",ai:"10-20 minut"},{aspect:"Analiza konkurencji i SERP",manual:"2-4 godziny",ai:"Automatyczna"},{aspect:"Koszt artykułu SEO",manual:"{{copywriterPrice}}",ai:"~{{articlePrice}}"},{aspect:"Struktura nagłówków SEO",manual:"Manualna optymalizacja",ai:"Automatyczna H1-H3"},{aspect:"Nasycenie frazami kluczowymi",manual:"Ręczne wstawianie i kontrola",ai:"Naturalne, automatyczne"},{aspect:"Skalowalność — 50 artykułów/mies",manual:"Wymaga zespołu 3-5 osób",ai:"1 osoba + AI"},{aspect:"Wielojęzyczność",manual:"Osobny copywriter na język",ai:"Polski i angielski natywnie"},{aspect:"Weryfikacja źródeł",manual:"Ręczna, czasochłonna",ai:"Automatyczna z internetu"}]},XH={title:"Kto korzysta z AI SEO Writera?",subtitle:"Sprawdzone przypadki użycia — od jednoosobowych blogów po agencje SEO obsługujące dziesiątki klientów",challengeLabel:"Wyzwanie:",solutionLabel:"Rozwiązanie z AI:",items:[{scenario:"Agencja SEO / Content Marketing",challenge:"Konieczność dostarczania 50-100 artykułów SEO miesięcznie dla wielu klientów. 
754Copywriterzy nie nadążają, koszty rosną.",solution:"AI SEO Writer generuje artykuły w 10-20 minut. Agencja skaluje produkcję contentu 10x bez zatrudniania nowych autorów.",savings:"💰 Oszczędność: 70-80% kosztów + 5x szybsze dostarczanie"},{scenario:"Sklep e-commerce / Dropshipping",challenge:"Setki produktów bez unikalnych opisów. Duplikacja treści obniża pozycje w Google.",solution:"Generowanie unikalnych opisów kategorii i produktów ze strukturą SEO. Każdy opis inny, z frazami zakupowymi.",savings:"💰 Oszczędność: 90% czasu na opisach + wzrost ruchu organicznego"},{scenario:"Bloger / Freelancer / Solopreneur",challenge:"Brak czasu na pisanie regularnych artykułów blogowych. Nieregularność publikacji osłabia SEO.",solution:"Generowanie 2-4 artykułów tygodniowo w kilka minut. Utrzymanie regularnego harmonogramu publikacji bez wysiłku.",savings:"💰 Oszczędność: 20+ godzin miesięcznie na pisaniu contentu"}]},QH={title:"Jak AI pomaga w pozycjonowaniu?",subtitle:"Zrozum, w jaki sposób generator treści SEO wspiera Twoją strategię content marketingu",items:[{title:"Topical Authority",description:"Regularne publikowanie merytorycznych treści buduje autorytet tematyczny w oczach Google. AI pozwala tworzyć kompleksowe klastry tematyczne szybciej niż kiedykolwiek."},{title:"Pokrycie fraz long-tail",description:"AI analizuje długie frazy kluczowe powiązane z Twoim tematem i naturalnie wplata je w treść. To przyciąga ruch z niszowych zapytań, które łatwiej pozycjonować."},{title:"Aktualność i świeżość treści",description:"Google premiuje aktualne treści. AI SEO Writer przeszukuje internet i tworzy artykuły oparte na najnowszych danych, statystykach i trendach branżowych."},{title:"Struktura pod Featured Snippets",description:"Treści generowane przez AI mają strukturę sprzyjającą pojawianiu się w featured snippets — listy, definicje, tabele i pytania z odpowiedziami."}]},eq={title:"Najczęściej zadawane pytania",subtitle:"Wszystko, co chcesz wiedzieć o generatorze treści SEO opartym na sztucznej inteligencji",items:[{question:"Czy AI SEO Writer naprawdę tworzy treści zoptymalizowane pod SEO?",answer:"Tak! Generator treści SEO automatycznie buduje poprawną strukturę nagłówków (H1, H2, H3), stosuje naturalne nasycenie frazami kluczowymi, zachowuje odpowiednią długość akapitów i tworzy treść wartościową merytorycznie. Artykuły są gotowe do publikacji w CMS."},{question:"Czy treści generowane przez AI są unikalne i nie będą karane przez Google?",answer:"Tak. Nasz AI nie kopiuje treści ze źródeł — analizuje informacje i pisze w pełni oryginalne teksty. Każdy artykuł przechodzi przez zaawansowany model językowy, który gwarantuje unikalność. Google nie karze treści za sam fakt wygenerowania przez AI, o ile są wartościowe i pomocne dla użytkowników."},{question:"Jak AI dobiera frazy kluczowe do treści SEO?",answer:"Podajesz główne frazy kluczowe przy składaniu zlecenia. AI naturalnie wplata je w treść, nagłówki i akapity, zach
754owując optymalne nasycenie (2-3%). Dodatkowo AI samodzielnie identyfikuje powiązane frazy long-tail na podstawie analizy tematu."},{question:"Czy mogę edytować wygenerowane treści SEO?",answer:"Tak! Każdy wygenerowany artykuł możesz edytować w wbudowanym edytorze WYSIWYG. Zmieniaj nagłówki, akapity, dodawaj własne fragmenty. Następnie eksportuj jako HTML (do WordPressa), PDF lub DOCX."},{question:"Ile kosztuje generowanie artykułu SEO?",answer:"Krótki artykuł blogowy (3000 znaków): ~{{shortCost}}. Artykuł SEO 10-stronicowy (20 000 znaków): ~{{articleCost}}. Obszerny poradnik (50 000+ znaków): ~{{longCost}}. To 10x taniej niż zamówienie u copywritera SEO."},{question:"Na jakie platformy mogę eksportować treści?",answer:"Eksportuj treści w formatach HTML (idealny do WordPress, Shopify, dowolnego CMS), PDF (raporty, prezentacje), DOCX (Word, Google Docs) lub kopiuj jako plain text. Formatowanie jest zachowane."},{question:"Czy AI może pisać artykuły pod lokalne SEO?",answer:"Tak! Podaj w wytycznych lokalizację (np. miasto, region) i frazy lokalne. AI wplecie je naturalnie w treść, tworząc content zoptymalizowany pod lokalne wyniki wyszukiwania."},{question:"Ile artykułów SEO mogę wygenerować dziennie?",answer:"Nie ma limitu! Możesz generować nieograniczoną liczbę artykułów SEO — płacisz tylko za wygenerowane znaki. Dzięki temu agencje SEO mogą skalować produkcję contentu do dowolnego poziomu."}]},tq={badge:"Zacznij pozycjonować się wyżej",titleLine1:"Generuj treści SEO,",titleLine2:"które pozycjonują się w Google",subtitle:"AI SEO Writer Smart-Copy.ai to najszybszy sposób na tworzenie zoptymalizowanych treści. Załóż konto i zacznij budować widoczność w wyszukiwarkach.",cta:{register:"Zacznij już teraz",login:"Zaloguj się"},benefits:"✓ Bez subskrypcji ✓ Doładuj od {{minTopUp}} ✓ {{price}}/1000 znaków ✓ Środki nie wygasają"},rq={meta:HH,hero:qH,benefits:KH,howItWorks:GH,seoContentTypes:ZH,seoFeatures:YH,comparison:JH,useCases:XH,seoTips:QH,faq:eq,finalCta:tq},nq={greeting:"Witaj, {{name}}! 👋",subtitle:"Stwórzmy dziś nowe treści!"},sq={title:"Szybkie akcje",newOrder:"Złóż nowe zamówienie",myOrders:"Moje zamówienia"},iq={orders:"Zamówienia",generatedTexts:"Wygenerowane teksty",spent:"Wydane środki"},aq={title:"Ostatnie zamówienia",viewAll:"Zobacz wszystkie",pages:{one:"strona",few:"strony",many:"stron"},characters:"znaków",empty:{title:"Jeszcze nie masz żadnych tekstów",cta:"Zamów pierwszy tekst"}},oq={paymentSuccess:"✅ Doładowanie zakończone sukcesem! Dodano {{amount}} na konto."},lq={welcome:nq,quickActions:sq,stats:iq,recentOrders:aq,toast:oq},cq={back:"Powrót",title:"Moje zamówienia",subtitle:"Zarządzaj swoimi zamówieniami treści AI",newOrder:"Nowe zamówienie",backToList:"Wróć do zamówień"},uq="Ładowanie zamówień...",dq={title:"Brak aktywnych zamówień",description:"Nie masz jeszcze żadnych zamówień w realizacji lub zakończonych. Złóż pierwsze zamówienie!",cta:"Złóż pierwsze zamówienie"}
754,hq={pending:"Oczekujące",inProgress:"W realizacji",completed:"Zakończone",cancelled:"Anulowane"},pq={waiting:"Oczekuje",completed:"Ukończony",error:"Błąd",generating:"Realizuję zamówienie..."},fq={texts:{one:"tekst",few:"teksty",many:"tekstów"},completedOf:"{{completed}}/{{total}} ukończonych",viewDetails:"Zobacz szczegóły",errorGenerating:"Wystąpił błąd podczas generowania"},mq={orderDate:"Data złożenia",textsCount:"Liczba tekstów",total:"Suma",orderedTexts:"Zamówione teksty",declared:"Deklarowana:",characters:"znaków",pages:"str.",generated:"Wygenerowana:"},gq={orderReady:'Zamówienie "{{title}}" gotowe! 🎉',paymentSuccess:"Zamówienie opłacone pomyślnie! 🎉"},yq={header:cq,loading:uq,empty:dq,status:hq,textStatus:pq,order:fq,modal:mq,toast:gq},xq={back:"Powrót",orderValue:"Wartość zamówienia"},wq="Ładowanie zamówienia...",bq={title:"Zamówienie nie znalezione",cta:"Wróć do zamówień"},kq={pending:"Oczekujące",inProgress:"W realizacji",completed:"Zakończone"},vq={title:"Podsumowanie zamówienia",orderDate:"Data złożenia",textsCount:"Liczba tekstów",status:"Status",languages:"Języki"},jq={title:"Zamówione teksty",declaredLength:"Deklarowana długość:",characters:"znaków",pages:"str.",generated:"Wygenerowano:",guidelines:"Wytyczne:",showLess:"Pokaż mniej",showMore:"Pokaż więcej",generating:"Generowanie..."},Sq={title:"Źródła",userSources:"Źródła użytkownika",searchSources:"Źródła z wyszukiwania",academicSources:"Źródła naukowe",failedSources:"Nieodczytane źródła",failedSourcesHint:"Tych materiałów nie udało się pobrać — nie zostały użyte w tekście:"},Nq={button:"Poproś o poprawkę",title:"Poproś o poprawkę",description:"Opisz, co chcesz zmienić w tekście. Poprawimy go bezpłatnie.",placeholder:"Np. skróć wstęp, dodaj więcej przykładów w sekcji o kosztach, zmień ton na bardziej formalny...",left:"Pozostałe bezpłatne poprawki: {{n}}",limitReached:"Wykorzystano limit bezpłatnych poprawek",submit:"Wyślij do poprawki",sending:"Wysyłanie...",cancel:"Anuluj"},Cq={placeholder:"Zacznij pisać...",list:"Lista",orderedList:"1. Lista",saving:"Zapisywanie...",save:"Zapisz",cancel:"Anuluj",saveSuccess:"Zmiany zapisane!",saveError:"Błąd zapisu zmian"},Eq={edit:"Edytuj",downloadPdf:"Pobierz PDF",downloadDocx:"Pobierz DOCX",copyText:"Kopiuj tekst",copyHtml:"Kopiuj HTML",saveToGoogleDocs:"Zapisz w Google Docs",openGoogleDoc:"Otwórz dokument"},Tq={generatingPdf:"Generowanie PDF...",pdfDownloaded:"PDF pobrany! 🎉",pdfError:"Błąd generowania PDF",generatingDocx:"Generowanie DOCX...",docxDownloaded:"DOCX pobrany!",docxError:"Błąd generowania DOCX",copied:"Skopiowano do schowka!",htmlCopied:"HTML skopiowany do schowka!",copyError:"Błąd kopiowania",revisionQueued:"Poprawka przyjęta! Tekst zaktualizuje się za kilka minut.",revisionError:"Nie udało się zlecić poprawki",googleDocsSaving:"Zapisuję w Google Docs…",googleDocsSaved:"Zapisano w Google Docs.",googleDocsNotConnected:"Najpierw podłącz konto Google w Integracjach.",googleDocsError:"Nie udało się zapisać w Google Docs."},Aq={title:"Konspekt czeka na Twoją akceptację",description:"Sprawdź plan tekstu. Po zatwierdzeniu od razu zaczniemy pisać.",sectionsLabel:"Planowane sekcje:",intro:"(wstęp)",approve:"Zatwierdź i pisz",approving:"Zatwierdzanie...",reworkLabel:"Masz uwagi? Opisz je, a przygotujemy nowy konspekt:",reworkPlaceholder:"Np. dodaj sekcję o kosztach, usuń sekcję 3, zmień kolejność...",rework:"Popraw konspekt",reworking:"Wysyłanie uwag...",reworkInProgress:"Przygotowujemy nowy konspekt według Twoich uwag..."},zq={download:"Pobierz obraz"},Pq={button:"Publikuj do WordPressa",modalTitle:"Publikacja do WordPressa",modalHint:"Tekst trafi na Twoją witrynę przez WP REST API — z obrazem wyróżniającym i altami.",siteLabel:"Witryna",sitePlaceholder:"— wybierz witrynę —",urlPlaceholder:"https://twojadomena.pl",userPlaceholder:"Login WordPress",passPlaceholder:"Hasło aplikacji (Application Password)",appPasswordHint:"Hasło aplikacji wygenerujesz w WP: Użytkownicy → Profil → Hasła aplikacji. To nie jest Twoje hasło logowania.",addSite:"Zweryfikuj i za
754pisz witrynę",verifying:"Weryfikuję połączenie...",addAnother:"+ dodaj inną witrynę",backToList:"← wróć do listy",asDraft:"jako szkic",asPublish:"opublikuj od razu",asSchedule:"zaplanuj publikację",scheduleHint:"WordPress opublikuje wpis automatycznie o wybranej godzinie (czas lokalny).",manage:{title:"Połączenie z witryną",statusConnected:"Połączono",statusConnectedAgo:"Połączono — wtyczka aktywna {{ago}} temu",statusStale:"Wtyczka nie zgłasza się (ostatnio {{ago}} temu)",statusPending:"Oczekuje na pierwszy kontakt wtyczki",checking:"Sprawdzam połączenie...",checkNow:"Sprawdź ponownie",checkOk:"Połączenie działa prawidłowo.",checkPending:"Serwer witryny blokuje test z naszej strony — o statusie decyduje wtyczka, która zgłasza się co 5 minut. Jeśli status nie zmieni się w ciągu 10 minut, wklej poniżej aktualny klucz z WP.",newKeyTitle:"Przeinstalowałeś wtyczkę?",newKeyHint:"Po ponownej instalacji wtyczka może wygenerować nowy klucz. Skopiuj go z WP (Ustawienia → Smart-Copy) i wklej tutaj:",newCredsTitle:"Zmień dane logowania",newKeySave:"Zapisz",keyUpdated:"Dane połączenia zaktualizowane ✔",keyUpdatedPending:"Klucz zapisany — wtyczka potwierdzi połączenie przy najbliższym zgłoszeniu (do 5 minut).",deleteTitle:"Usunąć integrację?",deleteBody:'Witryna „{{name}}" zostanie odłączona od Smart-Copy. Opublikowane wpisy zostają w WordPressie bez zmian.',deleteConfirm:"Usuń integrację",deleted:"Integracja usunięta"},publish:"Wyślij",publishing:"Wysyłanie...",published:"Opublikowano w WordPressie! 🎉",publishedList:"Publikacje WP",statusLive:"opublikowany",statusDraft:"szkic",siteAdded:"Witryna połączona!",error:"Publikacja nie powiodła się",noPublish:"— nie publikuj automatycznie —",noSitesYet:"Nie masz jeszcze podłączonej witryny WordPress. Podłącz ją raz — użyjesz jej w zamówieniach i w autoblogu.",connectFirst:"🔌 Podłącz witrynę WordPress",methodConnector:"Wtyczka Smart-Copy (zalecana)",methodAppPass:"Hasło aplikacji (zaawansowane)",connectorSteps:"1. W WP: Wtyczki → Dodaj nową → Wyślij plik → Aktywuj  →  2. Skopiuj klucz z Ustawienia → Smart-Copy i wklej poniżej.",downloadPlugin:"Wtyczka w katalogu WordPressa",connectorKeyPlaceholder:"Klucz połączenia (z Ustawienia → Smart-Copy)",connectorWhy:"Działa na każdym hostingu — bez konfiguracji serwera.",pendingVerification:'Witryna zapisana! Twój hosting blokuje weryfikację z naszej strony, więc połączenie potwierdzi sama wtyczka — kliknij w WP „Pobierz teksty teraz" (Ustawienia → Smart-Copy) albo poczekaj do 5 minut. Możesz już zamawiać teksty z publikacją.'},_q={header:xq,loading:wq,notFound:bq,status:kq,summary:vq,texts:jq,sources:Sq,revision:Nq,editor:Cq,actions:Eq,toast:Tq,outline:Aq,image:zq,wp:Pq},Iq={title:"404 - Strona nie znaleziona | Smart-Copy.ai",heading:"Strona nie została znaleziona",description:"Przepraszamy, ale strona której szukasz nie istnieje lub została przeniesiona.",backHome:"Strona główna"},Oq={title:"Doładuj konto",subtitle:"Dodaj środki na swoje konto Smart-Copy.ai",discounts:{title:"🎁 Bonusy do doładowań!",tier1:"💰 {{min}}–{{max}} →",tier2:"💎 {{min}}–{{max}} →",tier3:"🚀 {{min}}–{{max}} →",tier4:"👑 {{min}}+ →",discount5:"+5% bonusu",discount10:"+10% bonusu",discount15:"+15% bonusu",discount20:"+20% bonusu"},form:{chooseAmount:"Wybierz kwotę lub wpisz własną",customAmount:"Własna kwota",currency:"zł"},savings:{congratulations:"Gratulacje! Odbierasz +{{percent}}% bonusu!",topUp:"Wpłata:",discount:"Bonus (+{{percent}}%):",toPay:"Na saldo trafi:"},info:{title:"Informacje:",minAmount:"Minimalna kwota doładowania: {{amount}}",payments:"Płatności obsługuje Stripe (karta, BLIK, Google Pay, PayPal, Apple Pay)",instant:"Środki są dodawane natychmiast po płatności",payGet:"Wpłacasz {{pay}}, na saldo trafia {{get}}!"},button:{redirecting:"Przekierowywanie...",payAndGet:"Wpłać {{pay}} • Odbierz {{get}}",topUp:"Doładuj {{amount}}"},errors:{minAmount:"Minimalna kwota to {{amount}}",generic:"Błąd podczas doładowania"}},Rq={title:"Resetuj hasło"},Lq={meta:{title:"Polityka Cookies - Smart-Copy.AI",description:"Dowiedz się, jak wykorzystujemy pliki cookie na naszej stronie."},heading:"Polityka Cookies",lastUpdate:"Ostatnia aktualizacja:",currentSettings:{title:"Twoje aktualne ustawienia",necessary:"Niezbędne",alwaysActive:"Zawsze aktywne",anal
754ytics:"Analityczne",marketing:"Marketingowe",enabled:"Włączone",disabled:"Wyłączone",changeSettings:"Zmień ustawienia cookies"},whatAreCookies:{title:"Czym są pliki cookie?",description:"Pliki cookie to małe pliki tekstowe zapisywane na Twoim urządzeniu podczas przeglądania stron internetowych. Pomagają nam zapewnić lepsze doświadczenia użytkownika i analizować sposób korzystania z naszej strony."},typesTitle:"Jakie pliki cookie używamy?",necessary:{title:"Niezbędne pliki cookie",description:"Te pliki są wymagane do prawidłowego działania strony i nie mogą być wyłączone.",purpose:"Uwierzytelnianie, bezpieczeństwo, preferencje użytkownika",storage:"Sesja lub do 12 miesięcy",examples:"token uwierzytelniania, zgody na cookies"},analytics:{title:"Analityczne pliki cookie",description:"Pomagają nam zrozumieć, jak użytkownicy korzystają z naszej strony.",provider:"Google Analytics (GA4)",purpose:"Statystyki odwiedzin, źródła ruchu, zachowania użytkowników",storage:"Do 14 miesięcy",cookies:"_ga, _ga_*, _gid"},marketing:{title:"Marketingowe pliki cookie",description:"Wykorzystywane do personalizacji reklam i remarketingu.",providers:"Google Ads, Facebook",purpose:"Targetowanie reklam, pomiar konwersji",storage:"Do 90 dni",cookies:"_gcl_*, fr, _fbp"},labels:{purpose:"Cel:",storage:"Czas przechowywania:",examples:"Przykłady:",provider:"Dostawca:",providers:"Dostawcy:",cookies:"Cookies:"},management:{title:"Jak zarządzać plikami cookie?",description:'Możesz w każdej chwili zmienić swoje preferencje dotyczące plików cookie, klikając przycisk "Zmień ustawienia cookies" powyżej. Pamiętaj, że wyłączenie niektórych kategorii cookies może wpłynąć na funkcjonalność strony.'},thirdParty:{title:"Cookies stron trzecich",description:"Niektóre pliki cookie pochodzą od dostawców zewnętrznych (Google, Facebook). Nie mamy kontroli nad tymi plikami cookie. Zalecamy zapoznanie się z politykami prywatności tych dostawców:",googlePrivacy:"Polityka prywatności Google",facebookPrivacy:"Polityka prywatności Facebook"},contact:{title:"Kontakt",description:"Jeśli masz pytania dotyczące naszej polityki cookies, skontaktuj się z nami pod adresem:"},withdraw:{title:"Wycofaj wszystkie zgody",description:"Możesz w każdej chwili wycofać wszystkie zgody na wykorzystanie plików cookie. Spowoduje to usunięcie wszystkich zapisanych preferencji i ponowne wyświetlenie bannera cookies.",button:"Wycofaj wszystkie zgody",confirm:"Czy na pewno chcesz wycofać wszystkie zgody na cookies?"}},Mq={notFound:Iq,deposit:Oq,resetPassword:Rq,cookies:Lq},Dq={meta:{title:"Blog - Smart-Copy.AI | Artykuły o copywritingu i AI",description:"Czytaj najnowsze artykuły o copywritingu, content marketingu i wykorzystaniu sztucznej inteligencji w tworzeniu treści.",keywords:"blog copywriting, artykuły AI, content marketing, pisanie tekstów"},hero:{title:"Blog Smart-Copy.AI",subtitle:"Odkryj najlepsze praktyki copywritingu, content marketingu i wykorzystania AI w tworzeniu treści, które sprzedają."},readMore:"Czytaj więcej",featured:{latest:"Najnowszy artykuł",alsoNew:"Warto przeczytać"},sections:{morePosts:"Pozostałe artykuły",olderPosts:"Starsze artykuły"},pagination:{previous:"Poprzednia",next:"Następna",label:"Nawigacja po stronach bloga",page:"Strona",pageOf:"Strona {page} z {total}",metaTitle:"Blog Smart-Copy.AI – strona {page} z {total} | Artykuły o copywritingu i AI",metaDescription:"Strona {page} z {total} archiwum bloga. {description}"},empty:{title:"Brak artykułów",description:"Wkrótce pojawią się tutaj nowe artykuły"}},Fq={notFound:{title:"Artykuł nie został znaleziony",backToBlog:"Wróć do bloga"},backToBlog:"Wróć do bloga",views:"wyświetleń",share:{title:"Udostępnij artykuł"},relatedTools:{title:"Wypróbuj Smart-Copy.ai",subtitle:"Wygeneruj gotowe, researchowane treści AI — płacisz za znaki, bez abonamentu.",seoWriter:"AI SEO Writer",seoWriterDesc:"Artykuły i treści SEO z researchem i strukturą nagłówków",copywriter:"AI Copywriter",copywriterDesc:"Teksty sprzedażowe, artykuły i content marketing",productDescriptions:"Generator opisów produktów",productDescriptionsDesc:"Setki opisów produktów pod e-commerce i SEO",cta:"Załóż darmowe konto"},sidebar:{recentPosts:"Ostatnie artykuły",noPosts:"Brak artykułów",newsletter:{title:"Newsletter",description:"Otrzymuj najnowsze artykuły prosto na skrzynkę!",placeholder:"Twój email",submit:"Zapisz się"}},relatedPosts:{title:"Powiązane artykuły"}},Bq={list:Dq,post:Fq},$q={title:"Witaj ponownie!",subtitle:"Zaloguj się do swojego konta",or:"lub",email:{label:"Adres email",placeholder:"[email protected]",error:"Nieprawidłowy adres email",required:"Email jest wymagany"},password:{label:"Hasło",placeholder:"••••••••",required:"Hasło jest wymagane",forgot:"Zapomniałeś hasła?"},submit:"Zaloguj się",submitting:"Logowanie...",success:"Zalogowano pomyślnie!",noAccount:"Nie masz konta?",register:"Zarejestruj się",recaptcha:{protected:"Strona chroniona przez reCAPTCHA Google -",privacy:"Prywatność",and:"i",terms:"Warunki"}}
754,Uq={title:"Utwórz konto",subtitle:"Generuj wartościowe treści z AI",or:"lub",firstName:{label:"Imię (opcjonalne)",placeholder:"Jan"},lastName:{label:"Nazwisko (opcjonalne)",placeholder:"Kowalski"},email:{label:"Adres email",placeholder:"[email protected]",error:"Nieprawidłowy adres email",required:"Email jest wymagany"},password:{label:"Hasło",placeholder:"••••••••",minLength:"Hasło musi mieć minimum 8 znaków",uppercase:"Hasło musi zawierać wielką literę",lowercase:"Hasło musi zawierać małą literę",number:"Hasło musi zawierać cyfrę"},confirmPassword:{label:"Potwierdź hasło",placeholder:"••••••••",required:"Potwierdź hasło",mismatch:"Hasła nie są identyczne"},passwordStrength:{minLength:"Minimum 8 znaków",uppercase:"Wielka litera",lowercase:"Mała litera",number:"Cyfra"},terms:{accept:"Akceptuję",termsLink:"regulamin",and:"oraz",privacyLink:"politykę prywatności",required:"Musisz zaakceptować regulamin"},submit:"Utwórz konto",submitting:"Tworzenie konta...",success:"Konto utworzone pomyślnie!",googleSuccess:"Rejestracja przez Google pomyślna!",hasAccount:"Masz już konto?",login:"Zaloguj się",recaptcha:{protected:"Strona chroniona przez reCAPTCHA Google -",privacy:"Prywatność",and:"i",terms:"Warunki"}},Wq={title:"Sprawdź swoją skrzynkę",subtitle:"Wysłaliśmy kod weryfikacyjny na adres:",code:{label:"Kod weryfikacyjny",placeholder:"000000",error:"Kod musi mieć 6 cyfr"},submit:"Zweryfikuj email",submitting:"Weryfikacja...",success:"Email zweryfikowany pomyślnie!",resend:{question:"Nie otrzymałeś kodu?",button:"Wyślij kod ponownie",sending:"Wysyłanie...",countdown:"Wyślij ponownie ({{time}})",success:"Nowy kod weryfikacyjny został wysłany!"},backToRegister:"Wróć do rejestracji",noEmail:"Brak informacji o emailu. Rozpocznij rejestrację ponownie."},Vq={title:"Zapomniałeś hasła?",subtitle:"Nie martw się, wyślemy Ci link do resetowania",email:{label:"Adres email",placeholder:"[email protected]",error:"Nieprawidłowy adres email",required:"Email jest wymagany"},submit:"Wyślij link resetujący",submitting:"Wysyłanie...",success:"Link do resetowania hasła został wysłany!",backToLogin:"Wróć do logowania",sent:{title:"Sprawdź swoją skrzynkę",subtitle:"Wysłaliśmy link do resetowania hasła na adres:",info:"Link jest ważny przez 1 godzinę. Jeśli nie otrzymałeś wiadomości, sprawdź folder spam.",backToLogin:"Wróć do logowania"}},Hq={title:"Ustaw nowe hasło",subtitle:"Wprowadź nowe, silne hasło dla swojego konta",password:{label:"Nowe hasło",placeholder:"••••••••",minLength:"Hasło musi mieć minimum 8 znaków",uppercase:"Hasło musi zawierać wielką literę",lowercase:"Hasło musi zawierać małą literę",number:"Hasło musi zawierać cyfrę"},confirmPassword:{label:"Potwierdź hasło",placeholder:"••••••••",required:"Potwierdź hasło",mismatch:"Hasła nie są identyczne"},passwordStrength:{minLength:"Minimum 8 znaków",uppercase:"Wielka litera",lowercase:"Mała litera",number:"Cyfra"},submit:"Zresetuj hasło",submitting:"Resetowanie...",success:"Hasło zostało zmienione pomyślnie!",invalidToken:"Nieprawidłowy lub brakujący token resetowania hasła"},qq={title:"Ustawienia konta",password:"Zmiana hasła",passwordHint:"Nowe hasło zaczyna obowiązywać od razu. Sesje otwarte na innych urządzeniach pozostają aktywne do wygaśnięcia.",current:"Obecne hasło",new:"Nowe hasło",repeat:"Powtórz nowe hasło",rules:"Co najmniej 8 znaków, w tym wielka litera i cyfra.",mismatch:"Hasła nie są takie same.",submit:"Zmień hasło",changed:"Hasło zostało zmienione.",failed:"Nie udało się zmienić hasła.",appearance:"Wygląd",appearanceHint:"Ustawienie zapamiętujemy w tej przeglądarce.",toDark:"Włącz tryb ciemny",toLight:"Włącz tryb jasny",deleteTitle:"Usunięcie konta",deleteWhat:"Usuwamy konto, wszystkie teksty i zamówienia, paczki opisów, plany treści, połączone witryny WordPress, zapisane połączenia ze sklepami oraz klucze API. Operacja jest nieodwracalna, a niewykorzystane saldo przepada.",deleteKept:"Zachowujemy wyłącznie zapisy rozliczeniowe (kwoty i daty płatności), bez danych osobowych — wymagają tego przepisy podatkowe i mówi o tym nasza polityka prywatności.",deleteStart:"Chcę usunąć konto",deleteWarning:"Wpisz poniżej {{email}}
754, żeby potwierdzić. Po zatwierdzeniu zostaniesz od razu wylogowany.",deleteConfirm:"Usuń konto na zawsze",cancel:"Anuluj",deleted:"Konto i dane zostały usunięte.",deleteFailed:"Nie udało się usunąć konta."},Kq={login:{badge:"Research, pisanie i publikacja w jednym",headlineA:"Wracasz tam, gdzie tekst",headlineB:"pisze się sam.",lead:"Zaloguj się i sprawdź, co czeka w panelu — zamówione teksty, saldo i zaplanowane serie autobloga.",p1t:"Twoje teksty i historia zamówień",p1d:"Wszystko w jednym miejscu, z podglądem postępu każdej generacji",p2t:"Serie autobloga pod kontrolą",p2d:"Wstrzymasz i wznowisz jednym kliknięciem",p3t:"Saldo i faktury",p3d:"Płacisz za znaki, bez abonamentu i bez wygasania środków"},register:{badge:"Konto zakładasz w 30 sekund",headlineA:"Inne AI tylko piszą.",headlineB:"To najpierw czyta.",lead:"Smart-Copy szuka źródeł w sieci, pobiera pełne treści stron i dopiero wtedy pisze — z nagłówkami, obrazem wyróżniającym i publikacją na Twojej witrynie.",p1t:"Research ze źródeł, nie z pamięci modelu",p1d:"Szuka w Google, pobiera pełne strony i wybiera najlepsze — nie streszcza snippetów",p2t:"Teksty, których nie utnie w połowie",p2d:"Architektura wielu pisarzy pozwala pisać materiały na dziesiątki stron",p3t:"Prosto na WordPressa",p3d:"Wtyczka publikuje gotowy tekst z obrazem — od razu, jako szkic albo z datą"}},Gq={login:$q,register:Uq,verify:Wq,forgotPassword:Vq,resetPassword:Hq,settings:qq,panel:Kq},Zq={banner:{title:"Używamy plików cookie",description:"Ta strona używa plików cookie w celu poprawy komfortu korzystania z witryny oraz analizy ruchu. Możesz zarządzać swoimi preferencjami cookies w każdej chwili.",learnMore:"Dowiedz się więcej",settings:"Ustawienia",rejectAll:"Odrzuć wszystkie",acceptAll:"Akceptuj wszystkie"},settings:{title:"Ustawienia prywatności",necessary:{title:"Niezbędne pliki cookie",description:"Te pliki są wymagane do prawidłowego funkcjonowania strony. Nie mogą być wyłączone.",badge:"Zawsze aktywne"},analytics:{title:"Analityczne pliki cookie",description:"Pomagają nam zrozumieć, jak odwiedzający korzystają z naszej strony (Google Analytics).",providers:"Dostawcy: Google Analytics"},marketing:{title:"Marketingowe pliki cookie",description:"Wykorzystywane do targetowania reklam i remarketingu.",providers:"Dostawcy: Google Ads, Facebook Pixel"},rejectAll:"Odrzuć wszystkie",save:"Zapisz ustawienia"}},Yq={textTypes:{ARTICLE:"Artykuł",REPORT:"Raport",COMPANY_TEXT:"Tekst o firmie",ANALYSIS:"Analiza",BLOG_POST:"Post blogowy",PRODUCT_DESCRIPTION:"Opis produktu",CATEGORY_DESCRIPTION:"Opis kategorii",OTHER:"Inny - wpisz własny",SOCIAL_MEDIA:"Post do social media",EMAIL_MARKETING:"Mail marketingowy"},languages:{pl:"Polski",en:"Angielski",de:"Niemiecki",es:"Hiszpański",fr:"Francuski",it:"Włoski",pt:"Portugalski",uk:"Ukraiński",ru:"Rosyjski"}},Jq={footer:{contact:"Kontakt",app:"Aplikacja Android"},contact:{title:"Kontakt z supportem",email:"Twój e-mail",emailPlaceholder:"[email protected]",message:"Wiadomość",messagePlaceholder:"Opisz problem lub pytanie...",cancel:"Anuluj",send:"Wyślij",sending:"Wysyłanie...",success:"Wiadomość wysłana!",error:"Nie udało się wysłać. Spróbuj ponownie."},dashboard:"Dashboard",orderText:"Zamów tekst",yourOrders:"Twoje zamówienia",balance:{label:"Saldo konta",topUp:"Doładuj konto"},theme:{dark:"Tryb ciemny",light:"Tryb jasny"},user:{defaultName:"Użytkownik",logout:"Wyloguj się"},autoblog:"Autoblog",developers:"API",bulk:"Opisy produktów",settings:"Ustawienia",integrations:"Integracje"},Xq={home:"Strona główna",dashboard:"Dashboard",orders:"Zamówienia",order:"Zamówienie",new:"Nowe zamówienie",deposit:"Doładuj konto",login:"Logowanie",register:"Rejestracja","forgot-password":"Resetowanie hasła",verify:"Weryfikacja","ai-copywriter":"AI Copywriter","ai-product-descriptions":"Opisy produktów AI",blog:"Blog",privacy:"Polityka prywatności",terms:"Regulamin",cookies:"Polityka cookies"},Qq={initializing:{title:"Przygotowuję generator AI...",tips:["🤖 Inicjalizuję model Claude Sonnet 4.6...","🔍 Przygotowuję silnik wyszukiwania...","📚 Ładuję bazę wiedzy AI...","⚡ Optymalizuję parametry generowania...","🎯 Analizuję strukturę treści...","🌍 Konfiguruję wielojęzyczny model...","💡 Przygotowuję kreatywne algorytmy...","🚀 Uruchami
754am proces generowania...","✨ Rozgrzewam neurony AI...","🔬 Kalibruję parametry jakości..."],characters:"znaków",startingSoon:"Start za moment..."},stages:{query:"Tworzenie zapytań wyszukiwania",search:"Wyszukiwanie źródeł",scraping:"Pobieranie treści źródeł",selecting:"Wybór najlepszych źródeł",outline:"Budowanie konspektu",writing:"Pisanie sekcji",image:"Generowanie obrazu wyróżniającego"},inProgress:"Postęp generowania",finalizing:"Finalizacja...",finalizingGeneration:"Finalizacja generowania...",completed:{ready:"🎉 Twój tekst jest gotowy!",success:"Generowanie zakończone pomyślnie ✨",title:"✅ Tekst ukończony!",availableAfter:"Będzie dostępny po zakończeniu całego zamówienia"},info:{text:"Tekst:",characters:"znaków",estimatedTime:"Szacowany czas:"},time:{seconds:"sek.",minutes:"min.",hours:"godz."}},eK="Wróć do panelu",tK={cookieConsent:Zq,orderTypes:Yq,sidebar:Jq,breadcrumbs:Xq,progress:Qq,backToDashboard:eK},rK="Autoblog",nK="Seria artykułów dla Twojej witryny: planujemy klaster tematów, piszemy w Twoim rytmie i publikujemy prosto do WordPressa.",sK={button:"Nowa seria",title:"Nowa seria treści",nicheLabel:"Opisz swoją witrynę i tematykę",nichePlaceholder:"Np. sklep z akcesoriami do kawy — chcemy budować ruch na poradnikach o parzeniu, sprzęcie i wyborze ziaren. Grupa docelowa: domowi baristowie...",nameLabel:"Nazwa serii (opcjonalnie)",siteLabel:"Publikuj do witryny WordPress",noSite:"— nie publikuj automatycznie (tylko panel) —",freqLabel:"Tekstów tygodniowo",lengthLabel:"Długość tekstu (znaki)",typeLabel:"Typ tekstu",statusLabel:"Publikacja w WP",statusPublish:"od razu publiczna",statusDraft:"jako szkice",submit:"Zaplanuj serię",submitting:"Planuję klaster tematów...",created:"Seria utworzona! Klaster tematów generuje się w tle — pierwszy tekst ruszy za chwilę.",priceNote:"Rozliczenie z salda: {{price}} za tekst. Zawsze możesz spauzować serię.",imagesLabel:"Obrazy wyróżniające do artykułów (AI)",imagesHint:"FLUX 1.1 Pro Ultra, w cenie tekstów — trafiają też do WordPressa jako featured image."},iK={statusPlanning:"planowanie klastra...",statusActive:"aktywna",statusPaused:"wstrzymana",statusCompleted:"ukończona",statusFailed:"błąd planowania",progress:"Postęp",pause:"Wstrzymaj",resume:"Wznów",runNow:"Generuj następny teraz",delete:"Usuń serię",deleteConfirm:"Usunąć serię? Wygenerowane teksty zostaną w Twoich zamówieniach.",itemStatus:{planned:"zaplanowany",generating:"w produkcji",completed:"gotowy",published:"opublikowany",failed:"błąd"},generateNow:"Generuj teraz"},aK={paused:"Seria wstrzymana",resumed:"Seria wznowiona",runStarted:"Generowanie następnego tekstu ruszyło",deleted:"Seria usunięta",error:"Coś poszło nie tak"},oK={title:"Auto-doładowanie",subtitle:"Gdy saldo nie wystarczy na kolejny tekst serii, doładujemy je automatycznie z zapisanej karty — seria nigdy się nie zatrzyma.",enabled:"włączone",disabled:"wyłączone",amountLabel:"Kwota doładowania",cardLabel:"Karta",noCard:"brak zapisanej karty",changeCard:"Zmień kartę",enable:"Włącz auto-doładowanie",disable:"Wyłącz",consent:"Włączając, wyrażasz zgodę na automatyczne obciążanie zapisanej karty wybraną kwotą, gdy saldo nie wystarcza na kolejny tekst aktywnej serii. Zgodę możesz cofnąć w każdej chwili tym samym przełącznikiem.",cardSaved:"Karta zapisana — auto-doładowanie włączone! 💳",cardCancelled:"Zapisywanie karty anulowane",redirecting:"Przekierowuję do bezpiecznego formularza karty...",saved:"Ustawienia zapisane"},lK={week:"tydz.",pages:"str.",chars:"zn."},cK={edit:"Edytuj temat",save:"Zapisz",cancel:"Anuluj",delete:"Usuń temat",saved:"Temat zapisany",deleted:"Temat usunięty",dragHint:"Przeciągnij, aby zmienić kolejność"},uK={name:"Nazwa serii",wpStatus:"Publikacja WP",wpPublish:"od razu",wpDraft:"szkice",save:"Zapisz zmiany",saved:"Ustawienia serii zapisane"},dK={title:"Jeszcze nie masz żadnej serii",description:"Opisz swoją witrynę jednym akapitem, a zaplanujemy klaster 20 tematów. Zobaczysz go w całości, zanim powstanie pierwszy tekst."},hK={title:rK,subtitle:nK,create:sK,plan:iK,toast:aK,topup:oK,unit:lK,items:cK,settings:uK,empty:dK},pK="Masowe opisy produktów",fK="Wczytaj katalog, wskaż kolumny i odbierz gotowe opisy. Płacisz za produkt, nie za miesiąc.",mK={upload:"Plik CSV",feed:"Feed produktowy",baselinker:"Baselinker",shoper:"Shoper",idosell:"IdoSell"},gK={upload:"Eksport z panelu sklepu. Każda duża platforma go ma — i przyjmuje import z powrotem.",feed:"Adres feedu, który Twój sklep już wystawia na potrzeby reklam.",baselinker:"Katalog produktów prosto z Baselinkera, z zapisem opisów z powrotem.",shoper:"Katalog prosto ze sklepu Shoper, z zapisem opisów z powrotem.",idosell:"Katalog prosto ze sklepu IdoSell, z zapisem opisów z powrotem."},yK="Wszystkie źródła",xK="Odczytaj kolumny",wK="Znaleziono {{n}} produktów i {{k}} pól. Wskaż, które z nich są czym.",bK="Token API z Baselinkera (Moje konto → API)",kK="Wczytaj katalogi",vK="— wybierz katalog —",jK={topic:"Nazwa produktu",topicHint:"Na tej podstawie powstaje opis.",externalId:"Identyfikator (SKU)",externalIdHint:"Po nim wracamy z gotowym opisem. Wymagany do cyklicznych przebiegów.",skipIfFilled:"Kolumna z istniejącym opisem",skipIfFilledHint:"Produkty, które mają tu treść, zostaną pominięte — nie zapłacisz drugi raz.",guidelines:"Parametry do wytycznych",guidelinesHint:"Przytrzymaj Ctrl, żeby zaznaczyć kilka. Im więcej konkretów, tym lepszy opis.",images:"Kolumna ze zdjęciem",imagesHint:"Adres zdjęcia produktu. Generator OGLĄDA je i pisze o tym, co na nim widać — kształcie, materiale, wykończeniu, widocznych oznaczeniach. To rzeczy, których nie ma w żadnym polu tekstowym, więc opis z fotografią jest wyraźnie konkretniejszy. Katalogi sklepowe podpowiadają się same.",url:"Adres karty produktu",urlHint:"Kolumna z linkiem do produktu w sklepie. Nie idzie do generatora — służy do tego, żeby dało się kliknąć w produkt na liście i sprawdzić, o czym jest opis."},SK={length:"Długość opisu",chars:"znaków",language:"Język",interval:"Powtarzaj",once:"jednorazowo",daily:"codziennie",weekly:"co tydzień",guidelinesPlaceholder:"Wspólne wytyczne dla całej paczki — np. ton wypowiedzi, grupa docelowa, czego unikać.",lengthHint:"Docelowa długość każdego opisu. Cena idzie za znaki, więc 2000 znaków kosztuje dwa razy tyle co 1000 — przy dużym katalogu to realna różnica.",languageHint:"Język, w którym powstaną opisy. Nie musi być ten sam co język panelu — możesz przeglądać po polsku i zamówić opisy po angielsku.",intervalHint:"Czy paczka ma się odświeżać sama. Przy „codziennie” albo „co tydzień” sprawdzamy katalog o wskazanej porze i dopisujemy opisy tylko tym produktom, które doszły od ostatniego razu i wciąż ich nie mają. Nic nie jest pisane drugi raz."},NK="Policz koszt",CK={toGenerate:"do napisania",skipped:"pominiętych",discount:"rabat",total:"razem",lowBalance:"Saldo ({{balance}}) nie pokrywa całej paczki. Możesz ruszyć — opisy powstają po kolei, a przy braku środków paczka poczeka zamiast przepaść.",previewNote:"Próbka {{n}} pozycji z {{total}} — najpierw te, które zostaną napisane. Paczka obejmie wszystkie.",removeRow:"Wykreśl z paczki",restoreRow:"Przywróć do paczki",excludedNote:"Wykreśliłeś ręcznie {{n}}
754 pozycji — zostaną w paczce jako pominięte i można je przywrócić.",howMany:"Ile wziąć do paczki teraz",howManyAll:"wszystkie ({{n}})",howManyFirst:"pierwsze {{n}}",howManyHint:"Reszta nie przepada — czeka jako odłożona przy paczce i dobierasz ją przyciskiem „Dodaj kolejne”, bez przechodzenia kreatora od nowa. Płacisz tylko za to, co faktycznie zostanie napisane.",whySkipped:"Dlaczego {{n}} pozycji zostanie pominiętych"},EK={already_described:"ma opis",duplicate_id:"duplikat",no_topic:"brak nazwy",excluded:"wykreślona",deferred:"odłożona"},TK="Przygotuj listę",AK="Środki pobierane są za każdy opis osobno, w trakcie pisania — nie z góry za całość.",zK="Paczka utworzona",PK="Twoje paczki",_K="Nie masz jeszcze żadnej paczki.",IK="Uruchom",OK="Wznów",RK="Wstrzymaj",LK="Odśwież źródło",MK="Pobierz opisy (CSV)",DK="{{done}} z {{total}} gotowych",FK="co {{n}} godz.",BK="pobrano {{amount}}",$K={draft:"szkic",ready:"gotowa do startu",running:"w trakcie",paused:"wstrzymana",done:"ukończona",failed:"błąd",writing:"opisy się piszą"},UK="Zamówiono {{n}} opisów",WK="Zabrakło środków — paczka wstrzymana. Doładuj konto i wznów.",VK="Paczka wstrzymana",HK="Źródło odświeżone",qK="Paczka usunięta",KK={generic:"Coś poszło nie tak",nothingReady:"Żaden opis nie jest jeszcze gotowy — nie ma czego pobrać."},GK={save:"Zapamiętaj to połączenie, żeby nie wklejać tokena za każdym razem",remove:"Usuń zapisane połączenie"},ZK="{{failed}} nieudanych",YK="{{skipped}} pominiętych",JK="Lista gotowa — nic jeszcze nie zostało napisane",XK="Zapisaliśmy Twoje ustawienia: mapowanie kolumn, długości i wykreślenia. Nic nie zeszło z salda. Rozwiń listę poniżej, żeby ją poprawić — dopiero „Uruchom” zaczyna pisanie i pobiera opłatę, produkt po produkcie.",QK="Ustaw inne źródło",eG={toggle:"Pozycje ({{n}})",search:"Szukaj po nazwie produktu — Enter",all:"wszystkie",pending:"do napisania",skipped:"pominięte",completed:"gotowe",failed:"nieudane",ordered:"w trakcie",colId:"Identyfikator",colTopic:"Produkt",colState:"Stan",selectAll:"Zaznacz wszystkie na tej stronie",removeSelected:"Usuń zaznaczone ({{n}})",removed:"Usunięto pozycji: {{n}}",pauseFirst:"Najpierw zatrzymaj paczkę",loading:"Wczytuję pozycje…",none:"Brak pozycji spełniających warunki.",page:"Strona {{n}} z {{of}} · {{total}} pozycji",prev:"Wstecz",next:"Dalej",excludeSelected:"Wykreśl zaznaczone ({{n}})",restoreSelected:"Przywróć zaznaczone ({{n}})",excluded:"Wykreślono pozycji: {{n}}",restored:"Przywrócono pozycji: {{n}}",excludedFilter:"wykreślone ręcznie",deferredFilter:"odłożone",setLength:"Zmień długość ({{n}})…",chars:"znaków",colLength:"Znaków",lengthChanged:"Zmieniono długość {{n}} pozycji na {{length}} znaków.",count:"{{total}} pozycji"},tG="Ile pozycji napisać przy tym uruchomieniu",rG="kolejne {{n}}",nG="Dodaj kolejne",sG="Odłożonych czeka: {{n}}",iG="Dobrano {{n}} pozycji. Odłożonych zostało: {{left}}.",aG="{{deferred}} odłożonych",oG={already_described:"ma już opis w kolumnie, którą wskazałeś jako istniejący opis — nie zapłacisz za nie drugi raz",duplicate_id:"ma identyfikator powtórzony w źródle — piszemy tylko raz",no_topic:"nie ma nazwy produktu, więc nie ma z czego napisać opisu",excluded:"wykreśliłeś ręcznie (możesz je przywrócić)",deferred:"odłożonych na później — dobierzesz je przyciskiem „Dodaj kolejne”",invalid_item:"ma niekompletne dane i nie da się jej zamówić",other:"pominiętych z innego powodu",writeback_failed:"napisanych, ale nieudało się ich odesłać do katalogu"},lG="Pobierz gotowe opisy jako CSV",cG="Pobierz gotowe opisy jako JSON",uG="Zapisz gotowe opisy z powrotem w katalogu Baselinkera",dG="Każdy opis wraca do produktu zaraz po napisaniu, po jego identyfikatorze. Zmieniamy wyłącznie pole opisu — cen, stanów i wariantów nie ruszamy. Bez tego opisy pobierzesz jako CSV lub JSON.",hG="Format opisu w katalogu",pG="HTML zachowuje nagłówki, listy i tabelę parametrów — dobre dla własnego sklepu. Czysty tekst zdejmuje wszystkie znaczniki, tak jak robi to generator Base; bezpieczniejszy, gdy opis idzie dalej na marketplace'y o ograniczonej obsłudze HTML. W obu wariantach nagłówek z nazwą produktu schodzi o poziom, bo karta produktu ma już własny.",fG="HTML (nagłówki, listy, tabela)",mG="czysty tekst",gG={title:"Podłączone katalogi",notConfigured:"Połączenie zapisane, ale nie ma jeszcze ustawionej paczki.",configure:"Ustaw",reconfigure:"Zmień ustawienia",writesBack:"opisy wracają do katalogu",exportOnly:"bez zapisu zwrotnego",refreshHint:"Sprawdź katalog i dopisz produkty, które doszły od ostatniego razu",remaining:"pozostało {{amount}}"},yG={domainPlaceholder:"twojsklep.pl",tokenPlaceholder:"Token API ze sklepu",login:"Login konta administracyjnego",password:"Hasło",check:"Sprawdź połączenie",useLogin:"Mam login i hasło zamiast tokena",useToken:"Mam token API",connected:"Połączono. Produktów w sklepie
754: {{n}}.",where:"Token albo konto API znajdziesz w panelu sklepu: Konfiguracja → Ustawienia zaawansowane → Dostęp do API. Shoper wystawia jedną z dwóch odmian, zależnie od instalacji — jeśli token nie zadziała, spróbuj loginu i hasła."},xG="Zapisz gotowe opisy z powrotem w sklepie",wG="Każdy opis wraca do produktu zaraz po napisaniu, po jego identyfikatorze, i trafia DOKŁADNIE do tego pola, które wskazałeś wyżej jako istniejący opis. Cen, stanów magazynowych i pozostałych danych nie ruszamy. Bez tego opisy pobierzesz jako CSV lub JSON.",bG={domainPlaceholder:"twojsklep.iai-shop.com",keyPlaceholder:"Klucz API ze sklepu",connected:"Połączono. Produktów w sklepie: {{n}}.",where:"Klucz API tworzy się w panelu sklepu, w sekcji dla developerów. Domena to ten sam adres, pod którym logujesz się do panelu — bez https:// i bez /panel/. Opis trafia do opisu długiego produktu, czyli treści karty."},kG="Katalog sklepowy",vG="Baselinker, Shoper, IdoSell albo feed produktowy. Podłączasz raz w Integracjach, potem katalog czeka tutaj.",jG="Ustawiliśmy kolumny tak, jak ostatnio przy tym samym pliku.",SG={title:pK,subtitle:fK,sources:mK,sourceHints:gK,changeSource:yK,readColumns:xK,foundRows:wK,blTokenPlaceholder:bK,blLoad:kK,blPickInventory:vK,mapping:jK,defaults:SK,calculate:NK,est:CK,skip:EK,create:TK,chargeNote:AK,created:zK,jobs:PK,empty:_K,run:IK,resume:OK,pause:RK,refresh:LK,download:MK,delete:"Usuń paczkę",progress:DK,everyHours:FK,charged:BK,status:$K,started:UK,paused:WK,pausedOk:VK,refreshed:HK,deleted:qK,errors:KK,connections:GK,progressFailed:ZK,progressSkipped:YK,createdTitle:JK,createdHint:XK,createAnother:QK,items:eG,runHowMany:tG,runNext:rG,extend:nG,extendHint:sG,extended:iG,progressDeferred:aG,skipWhy:oG,downloadCsv:lG,downloadJson:cG,writeBack:uG,writeBackHint:dG,writeBackFormat:hG,writeBackFormatHint:pG,formatHtml:fG,formatText:mG,bl:gG,sh:yG,writeBackShoper:xG,writeBackShoperHint:wG,id:bG,connectShop:kG,connectShopHint:vG,mappingRemembered:jG},NG="API i integracje",CG="Klucze API, webhooki i aplikacje połączone z Twoim kontem.",EG={title:"Klucze API",hint:"Klucz osobisty daje pełny dostęp do API w imieniu Twojego konta (zamówienia rozliczane z salda). Traktuj go jak hasło.",empty:"Nie masz jeszcze żadnego klucza.",create:"Utwórz klucz",creating:"Tworzę...",namePlaceholder:"Nazwa klucza (np. Integracja z moim sklepem)",testLabel:"Klucz testowy (sc_test_)",testHint:"Te same walidacje i kształty odpowiedzi, ale zamówienia są symulowane — zero kosztów. Idealny do budowania integracji.",createdTitle:"Klucz utworzony — skopiuj go teraz",createdHint:"Ze względów bezpieczeństwa pokazujemy go tylko raz. W bazie trzymamy wyłącznie skrót.",copy:"Kopiuj",copied:"Skopiowano do schowka",done:"Zapisałem klucz",lastUsed:"ostatnio użyty {{ago}}",neverUsed:"nieużywany",revoke:"Odwołaj",revokeTitle:"Odwołać klucz?",revokeBody:'Integracje używające klucza „{{name}}" natychmiast stracą dostęp. Tej operacji nie można cofnąć.',revokeConfirm:"Odwołaj klucz",revoked:"Klucz odwołany",webhook:"Webhook",webhookPlaceholder:"https://twoja-aplikacja.pl/webhooks/smart-copy",webhookHint:"Wyślemy POST przy zdarzeniach text.completed / text.failed / outline.ready, podpisany nagłówkiem X-SmartCopy-Signature (HMAC-SHA256 sekretu poniżej).",webhookSave:"Zapisz webhook",webhookSaved:"Webhook zapisany",webhookSecret:"Sekret podpisu",docsLink:"Pełna dokumentacja API: https://www.smart-copy.ai/pl/docs/api — bazowy adres: https://www.smart-copy.ai/api/v1"},TG={title:"Konsola API",hint:"Wybierz klucz i buduj żądania klikaniem — z podglądem JSON-a, gotowym kodem i odpowiedzią na żywo. Dokładnie te same wywołania wykona każda integracja.",keySelectLabel:"Klucz",keySelectNone:"Utwórz najpierw klucz w sekcji powyżej — konsola wykona wywołania wybranym kluczem.",testBadge:"TEST",snippetsTitle:"Ten sam request w kodzie",snippetsHint:"Gotowe do wklejenia — podmień YOUR_API_KEY na swój klucz.",balanceBtn:"GET /balance — saldo",wpSitesBtn:"GET /wp-sites — witryny",topicPlaceholder:"Temat tekstu (np. Jak działa pompa ciepła)",lengthLabel:"Długość (znaki, 500–30000)",typeLabel:"Rodzaj tekstu",langLabel:"Język",imageLabel:"Obraz wyróżniający (AI)",outlineLabel:"Konspekt do akceptacji przed pisaniem",sourceModeLabel:"Źródła researchu",sourceModes:{auto:"auto (model decyduje)",web:"tylko web",academic:"tylko naukowe (Cytado)",hybrid:"web + naukowe"},sourceUrlsPlaceholder:"Własne źródła URL (jeden na linię, max 10) — opcjonalnie",keywordsPlaceholder:"Frazy SEO po przecinku (max 10) — opcjonalnie",linksPlaceholder:"Linki SEO: adres | anchor (jeden na linię, max 5) — opcjonalnie",guidelinesPlaceholder:"Wytyczne: ton, grupa docelowa, co uwzględnić — opcjonalnie",wpLabel:"Publikacja do WordPressa",wpNone:"bez publikacji",wpDraft:"szkic",wpPublish:"od razu",wpFuture:"zaplanuj",types:{ARTICLE:"Artykuł ekspercki",REPORT:"Raport",COMPANY_TEXT:"Tekst firmowy",ANALYSIS:"Analiza",BLOG_POST:"Wpis blogowy",SO
754CIAL_MEDIA:"Post social media",EMAIL_MARKETING:"E-mail marketingowy",PRODUCT_DESCRIPTION:"Opis produktu",OTHER:"Inny"},addText:"Dodaj tekst do żądania",basketTitle:"Żądanie ({{n}}/10 tekstów)",basketEmpty:"Dodaj co najmniej jeden tekst — poniżej zobaczysz JSON żądania.",remove:"usuń",total:"Razem",sendBtn:"Wyślij POST /v1/texts",orderConfirmTitle:"Złożyć płatne zamówienie?",orderConfirmBody:"To PRAWDZIWE zamówienie przez API — z salda zostanie pobrane {{price}} za {{n}} tekst(ów).",orderConfirmYes:"Tak, zamawiam",responseLabel:"Odpowiedź",requestLabel:"Żądanie",requestPreview:"Podgląd body żądania",statusOrdered:"Zamówiono! Teksty znajdziesz w „Twoje zamówienia”.",statusOrderedTest:"Symulacja klucza testowego — nic nie zostało pobrane ani wygenerowane.",checkStatusBtn:"GET /texts/{id} — status"},AG={title:"Historia wywołań API",hint:"Każde wywołanie Twoimi kluczami — z kodem odpowiedzi, kosztem i czasem.",empty:"Brak wywołań — użyj konsoli powyżej albo swojego klucza w integracji.",when:"Kiedy",request:"Wywołanie",status:"Status",cost:"Koszt",duration:"Czas",prev:"Poprzednia",next:"Następna",pageOf:"Strona {{page}} z {{pages}}"},zG={title:"Twoje aplikacje OAuth",hint:"Buduj integracje, które łączą się z kontami użytkowników Smart-Copy przez OAuth 2.0 (ekran zgody + tokeny).",empty:"Nie masz jeszcze żadnej aplikacji.",create:"Zarejestruj aplikację",namePlaceholder:"Nazwa aplikacji (widoczna na ekranie zgody)",typePublic:"Publiczna (PKCE)",typeConfidential:"Poufna (z sekretem)",typeHint:"Publiczna: aplikacje bez bezpiecznego backendu (SPA, wtyczki) — wymagane PKCE. Poufna: serwer z sekretem klienta.",redirectPlaceholder:"https://twoja-aplikacja.pl/callback (jeden adres na linię, max 5)",createdTitle:"Aplikacja zarejestrowana",createdSecretHint:"Sekret klienta pokazujemy tylko raz — zapisz go bezpiecznie.",clientId:"Client ID",clientSecret:"Sekret klienta",authorizeUrl:"Adres autoryzacji",redirects:"Redirect URI",save:"Zapisz",saved:"Zapisano",deleteTitle:"Usunąć aplikację?",deleteBody:'„{{name}}" straci dostęp, a wszystkie wydane jej tokeny zostaną unieważnione.',deleteConfirm:"Usuń aplikację",deleted:"Aplikacja usunięta"},PG={title:"Połączone aplikacje",hint:"Aplikacje, którym przyznano dostęp do konta przez OAuth.",empty:"Żadna aplikacja nie ma dostępu do Twojego konta.",grantedAt:"połączono {{date}}",revoke:"Odłącz",revokeTitle:"Odłączyć aplikację?",revokeBody:'„{{name}}" straci dostęp do Twojego konta. Możesz połączyć ją ponownie w każdej chwili.',revokeConfirm:"Odłącz aplikację",revoked:"Aplikacja odłączona",scopes:"Uprawnienia",zapierHint:"Smart-Copy jest w katalogu Zapiera — zobacz, jak podłączyć"},_G={"texts:read":"Odczyt tekstów i statusów generowania","texts:write":"Zamawianie tekstów (płatne z salda konta)","balance:read":"Odczyt salda konta","wp:read":"Lista podłączonych witryn WordPress"},IG={title:"{{app}} prosi o dostęp do Twojego konta Smart-Copy",willBeAble:"Aplikacja będzie mogła:",billing:"Zamówienia złożone przez tę aplikację są rozliczane z salda Twojego konta.",allow:"Zezwól",deny:"Odmów",loading:"Ładowanie...",invalid:"Nieprawidłowe żądanie autoryzacji ({{reason}}). Wróć do aplikacji, z której tu trafiłeś.",redirecting:"Przekierowuję z powrotem do aplikacji..."},OG={title:"Dokumentacja API",desc:"Quick start, pełna referencja endpointów, webhooki i OAuth 2.0 — wszystko z przykładami w cURL, Node.js, Pythonie i PHP.",cta:"Otwórz dokumentację",base:"Bazowy adres:"},RG={title:"Witryny WordPress",hint:"Witryny podłączone do Twojego konta. Tych samych integracji używasz w formularzu zamówienia, w autoblogu i przez API.",loading:"Wczytuję witryny...",empty:"Nie masz jeszcze podłączonej witryny WordPress. Podłącz ją raz — użyjesz jej wszędzie.",add:"Podłącz witrynę",manage:"Zarządzaj",remove:"Usuń witrynę",close:"Zamknij",cancel:"Anuluj",viaPlugin:"wtyczka",viaAppPassword:"hasło aplikacji"},LG="Anuluj",MG="Witryny WordPress i aplikacje, którym dałeś dostęp do konta, przeniosły się do Integracji.",DG="Przejdź do Integracji",FG={title:NG,subtitle:CG,keys:EG,playground:TG,history:AG,clients:zG,apps:PG,scopes:_G,consent:IG,docsBox:OG,wpSites:RG,cancel:LG,movedToIntegrations:MG,goToIntegrations:DG},BG="Integracje",$G="Wszystko, co jest podpięte do Twojego konta: katalogi sklepowe, witryny WordPress 
754i aplikacje, którym dałeś dostęp.",UG={title:"Katalogi sklepowe",hint:"Podłącz sklep raz. Opisy zamawiasz później, w sekcji opisów produktów — tam widać postęp i tam dopisujesz kolejne.",empty:"Nie masz jeszcze podłączonego żadnego katalogu.",connect:"Podłącz",cancel:"Anuluj",connected:"Połączenie zapisane.",connectedWith:"Połączenie zapisane. Produktów w katalogu: {{n}}.",failed:"Nie udało się połączyć.",disconnect:"Odłącz katalog",goToWork:"Pracuj",afterConnect:"Po podłączeniu katalog pojawi się w sekcji opisów produktów — tam wskażesz kolumny i zamówisz opisy."},WG={title:"Google Docs",hint:"Podłącz konto Google raz, a przy każdym gotowym tekście pojawi się przycisk „Zapisz w Google Docs”. Dokumenty trafiają do folderu „Smart-Copy” na Twoim Dysku.",empty:"Nie masz podłączonego konta Google.",connect:"Podłącz konto Google",connected:"Konto Google podłączone.",connectedGeneric:"Konto Google podłączone",disconnect:"Odłącz",disconnected:"Konto Google odłączone.",failed:"Nie udało się połączyć z Google.",folderNote:"Dokumenty zapisujemy w folderze „Smart-Copy” na Twoim Dysku.",scopeNote:"Prosimy wyłącznie o prawo do plików, które sami utworzymy. Reszty Twojego Dysku nie widzimy."},VG={title:BG,subtitle:$G,shops:UG,googleDocs:WG},HG={tagline:"Your AI Copywriter",nav:{home:"Home",features:"Features",pricing:"Pricing",tools:"AI Tools",toolsCta:"Try Smart-Copy.ai",aiCopywriter:"AI Copywriter",aiCopywriterDesc:"Marketing & sales copy",aiProductDescriptions:"Product Description Generator",aiProductDescriptionsDesc:"Unique descriptions for e-commerce",blog:"Blog",aiSeoWriter:"AI SEO Writer",aiSeoWriterDesc:"SEO-optimized content",automations:"Automations",automationsCta:"See all automations",api:"API",apiCta:"Read the API docs",apiDocsName:"Documentation",mobileApp:"Mobile app",mobileAppDesc:"Android: order and read texts on your phone",apiDocsDesc:"Full endpoint reference — quickstart, auth, requests and responses, error codes."},auth:{dashboard:"Dashboard",admin:"Admin",login:"Sign In",register:"Sign Up",logout:"Log Out"},theme:{toggle:"Toggle theme",dark:"Dark Mode",light:"Light Mode"}},qG={description:"Create professional content in seconds with artificial intelligence. Save time and boost your productivity.",sections:{product:"Product",legal:"Legal",pages:"Pages",automations:"Automations",api:"API"},links:{features:"Features",aiSeoWriter:"AI SEO Writer",pricing:"Pricing",faq:"FAQ",terms:"Terms of Service",privacy:"Privacy Policy",cookies:"Cookies",aiCopywriter:"AI Copywriter",aiProductDescriptions:"AI Product Description Generator",mobileApp:"Android app"},getApp:"Get the app",copyright:"All rights reserved.",madeBy:"Design, development and deployment:",contact:"Contact"},KG={submit:"Submit",cancel:"Cancel",save:"Save",delete:"Delete",edit:"Edit",loading:"Loading..."},GG={header:HG,footer:qG,buttons:KG},ZG={title:"Place an Order"},YG={title:"Edit mode active",editing:"Editing text #{{index}}: {{topic}}",cancel:"Cancel editing"},JG={title:"Preview of Your Text",titleMulti:"Order Preview",subtitle:"Here's the introduction we wrote for you. Pay to see the full text.",subtitleMulti:"We generated an introduction for the first text. The rest will be generated after payment.",restLocked:"Full text available after payment",generationFailed:"Text will be generated after payment.",remainingInfo:"Introductions for the remaining {{count}} texts will be generated after placing the order.",pendingGeneration:"After payment",totalTexts:"{{count}} text(s)",cancel:"Cancel",payToSeeFullText:"Pay and see full text",processing:"Processing...",generating:"Generating text preview...",generatingSubtitle:"This will take a few seconds"},XG={title:"Texts in Order",pages:"pg.",characters:"characters",ownSources:"own sources",editingBadge:"Editing",editTooltip:"Edit text",removeTooltip:"Remove text"},QG={topic:{label:"📝 Text Topic *",placeholder:"e.g., How AI is changing marketing in 2025"},length:{label:"📏 Text Length *",pages:"Pages",characters:"Characters",approx:"This is approximately:",charactersLabel:"characters",pagesLabel_one:"page",pagesLabel_few:"pages",pagesLabel_many:"pages",presetLabel:"Predefined lengths",presetPlaceholder:"Choose a predefined length…"},language:{label:"🌍 Text Language *"},textType:{label:"📄 Text Type (optional)",placeholder:"Select type",customPlaceholder:"Enter custom text type"},sources:{label:"📚 Add Your Own Sources (optional)",tooltip:"Smart-Copy will use the pages or documents you specify as source materials to write fully original text.",tooltipMax:"Maximum 6 sources (links + files).",addButton:"Add sources",editButton:"Edit sources ({{count}}/6)"},guidelines:{label:"📋 Additional Guidelines (optional)",placeholder:"Describe details, tone of voice, target audience, publication venue..."},seo:{label:"🎯 SEO Optimization (optional)",tooltip:"Add keywords and 
754SEO links. The text will be naturally optimized for the specified parameters.",addButton:"Add keywords and/or linking",editButton:"Edit SEO section ({{count}} elements)",keywordsLabel:"🔑 Keywords",linksLabel:"🔗 SEO Links"},outlineApproval:{label:"I want to approve the outline before writing",hint:"We'll prepare the text plan (title + sections) and send it for your approval. Writing starts once you approve."},image:{label:"Add a featured image (AI)",hint:"A photographic hero image matched to your topic — included in the price.",tooltip:"The image is generated by FLUX 1.1 Pro Ultra (raw mode — natural photography) from a prompt tailored to your topic. 16:9 WebP with a ready alt text. If the image generator is temporarily down, your text is delivered normally — just without the image."},wp:{label:"📤 Publish to WordPress (optional)",hint:"Once generated, the text (with its featured image) will be posted automatically to your site.",scheduleInvalid:"Pick a publication date at least 15 minutes in the future"}},eZ={title:"Summary",textsInOrder:"Texts in order:",textsSum:"Texts total:",currentText:"Current text:",editedText:"Edited text:",length:"Length:",characters:"Characters:",price:"Price:",total:"Total:",toPay:"To pay:",fillFormTip:"💡 Fill out the form to add another text",updateText:"Update text",addNextText:"Add another text",limitReached:"Limit {{max}} texts",cancelEdit:"Cancel editing",submitOrder:"Submit Order",processing:"Processing...",footerEdit:"Update or cancel editing",footerTextsAndForm:"{{count}} texts + current form",footerTexts_one:"{{count}} text in order",footerTexts_few:"{{count}} texts in order",footerTexts_many:"{{count}} texts in order",footerAddOrSubmit:"Add to list or submit order"},tZ={title:"I consent to the immediate commencement of order fulfillment and acknowledge that once work begins, I will lose the right to withdraw from the contract",whyNoRefund:"Why can't I return the ordered text?",legalBasis:"Legal basis: Article 38(13) of the Consumer Rights Act",legalExplanation:"According to EU consumer law, consumers do not have the right to withdraw from a contract for the supply of digital content (such as AI-generated texts) if:",legalPoint1:"the trader has begun performance with the consumer's express consent",legalPoint2:"the consumer has been informed about the loss of the right of withdrawal",legalPoint3:"the consumer has acknowledged this",legalSummary:"After placing an order and starting AI text generation, the service is considered fulfilled and cannot be refunded - similar to downloading an e-book or accessing an online course."},rZ={title:"Add Your Own Sources",sourcesCount:"{{count}}/6 sources",linksLabel:"Website Links",linkPlaceholder:"https://example.com/article",addButton:"Add",filesLabel:"Files: documents and product photos",filesButton:"Click to choose files",filesLimit:"6 sources limit reached",infoTitle:"Maximum 6 sources total (links + files).",infoDescription:"Smart-Copy will use the specified materials as a basis for writing fully original text.",cancel:"Cancel",confirm:"Confirm",filesHint:"PDF, DOC and DOCX are read as text. Photos (JPG, PNG, WEBP) the generator actually looks at — it describes shape, material, finish and visible markings, the things no text field holds. Up to 5 photos are used; we downscale larger ones ourselves, so you can upload straight from your phone."},nZ={title:"🎯 SEO Optimization",stats:"{{keywords}} phrases • {{links}}/{{maxLinks}} links",keywordsLabel:"🔑 Keywords (max 10)",keywordsDescription:"The text will be naturally optimized for these phrases. Provide the most important keywords.",keywordPlaceholder:"e.g., AI copywriting",linksLabel:"🔗 External Linking (max {{max}} links)",linksDescription:"Links will be naturally woven into the text with the provided anchors.",linksTooShort:"⚠️ Text too short (min. 2000 characters)",urlPlaceholder:"https://example.com/page",anchorPlaceholder:"anchor text",addLinkButton:"Add link ({{count}}/{{max}})",linkLimitReached:"Limit of {{max}} links reached",infoKeywords:"Keywords: Will be naturally woven into the text (titles, headings, content).",infoLinks:"Links: Will be evenly distributed throughout the text according to context.",infoLimits:"💡 Link limits: ≤2000 chars = 2 links | 3000-5000 = 3 links | >5000 = 5 links",cancel:"Cancel",confirm:"Confirm"},sZ={topicMin:"Topic must be at least 3 characters",lengthMin:"Length must be greater than 0",guidelinesMax:"Guidelines cannot exceed 100,000 characters",languageRequired:"Select a language",charactersMin:"Minimum number of characters is 2000",charactersMax:"Maximum number of characters is 300,000",pagesMax:"Maximum number of pages is 150",termsRequired:"You must accept the terms"},iZ={textUpdated:"Text updated",textAdded:"Text added to order",textRemoved:"Text removed",editCancelled:"Editing cancelled",editing:"Editing: {{topic}}",orderSuccess:"Order placed successfully!",redirectingPayment:"Redirecting to payment...",paymentCancelled:"Payment cancelled. Order form restored.",paymentCancelledSimple:"Payment cancelled",restoreFailed:"Failed to restore form",consentRequired:"You must consent to start order fulfillment",fillFormOrAddTexts:"Fill out the form or add texts to the list",maxTextsReached:"Maximum {{max}} texts per order",topicError:"Enter a topic",lengthError:"Invalid length",languageError:"Select a language",fillAllFields:"Fill in all required fields",fillCurrentText:"Fill in all required fields for the current text",linkAdded:"Link added",linkRemoved:"Link removed",keywordAdded:"Keyword added",keywordRemoved:"Keyword removed",keywordExists:"This keyword has already been added",maxKeywords:"Maximum 10 keywords",maxLinksReached:"Maximum {{max}}
754 links for this text length",invalidUrl:"Invalid URL",provideUrlAndAnchor:"Provide URL and anchor",sourcesSaved:"Saved {{count}} sources",sourceSaved:"Saved {{count}} source",seoSaved:"Saved {{count}} SEO elements",seoSavedSingle:"Saved {{count}} SEO element",urlAdded:"Link added",urlExists:"This address has already been added",invalidPage:"Invalid page address",urlRemoved:"Link removed",filesAdded:"Added {{count}} files",fileAdded:"Added {{count}} file",fileRemoved:"File removed",fileExists:"File has already been added",fileFormat:"Unsupported format (only PDF, DOC, DOCX)",fileTooLarge:"File too large (max 50MB)",maxSourcesLimit:"6 sources limit reached",canAddMore:"You can add maximum {{count}} more files",lastLinkNotAdded:"6 sources limit reached - last link not added",invalidLinkNotAdded:"Invalid link - not added"},aZ={header:ZG,editMode:YG,preview:JG,textsList:XG,form:QG,summary:eZ,consent:tZ,sourcesModal:rZ,seoModal:nZ,validation:sZ,toast:iZ},oZ={title:"AI Text Generator | AI Content Writing Tool - Smart-Copy.ai",description:"AI text generator for articles, product descriptions, e-books and reports with real research and featured images. Pay per character — from {{price}}/1000, no subscription.",keywords:"AI text generator, AI content writing, AI copywriting, content generator, AI writer, automated content creation, AI article generator, text generation AI",ogTitle:"AI Text Generator | Professional AI Content Writing",ogDescription:"Professional AI content generator. Create researched articles, product descriptions and reports with featured images. 10x faster and cheaper than traditional copywriting.",twitterTitle:"AI Text Generator | Smart-Copy.ai",twitterDescription:"Professional AI content generator. Create researched articles with featured images. 10x faster and cheaper."},lZ={badge:"From topic to a published WordPress post",titleLine1:"The complete AI content generator:",titleLine2:"research, writing, publishing",subtitleStrong:"Other AIs just write.",subtitle:"Smart-Copy researches with sources, writes, adds a featured image and publishes to your WordPress. From {{price}} per 1,000 characters, no subscription.",valueProps:{speed:"Real research with visible sources",original:"Featured image included (FLUX 1.1 Ultra)",export:"WordPress publishing & scheduling",editor:"Automatic refunds for failed generations"},cta:{register:"Create an account & try it",seeHow:"See how it works"},publishedBadge:"Published to WordPress",progressAlt:"Smart-Copy dashboard — article generation progress: source research, outline, section writing, featured image",trustLine:"Pay per text, not per month. A text up to 30,000 characters never costs more than 29 PLN."},cZ={items:[{value:"1000+",label:"Texts Generated"},{value:"2-150",label:"Pages of Text"},{value:"$0",label:"subscriptions and saved cards"},{value:"10 min",label:"Average Generation Time"}]},uZ={title:"From topic to a published post in minutes",subtitle:"Four steps — and your part ends after the first one. Everything below is a real screen from the dashboard.",steps:[{title:"You order a text",description:"Topic, length (characters and pages in one selector), text type, guidelines, SEO keywords, your own sources — and optionally the WordPress site where it should appear.",alt:"Order form in the Smart-Copy dashboard"},{title:"AI researches and writes",description:"The generator builds search queries, scans the web (and academic sources if you want), picks the best materials, outlines the piece and writes section by section. You watch the progress live.",alt:"Generation progress: source research, outline, section writing"},{title:"You get a text with sources and an image",description:"The finished article shows the list of sources it was built from, plus a featured image from FLUX 1.1 Pro Ultra — included. Download as PDF, DOCX or HTML.",alt:"List of sources used in the article"},{title:"It publishes itself",description:"If you picked a site, the post lands on your WordPress automatically — immediately, as a draft, or on a schedule. The image becomes the featured image.",alt:"Post published to WordPress"}]},dZ={title:"AI Content Generator Features",subtitle:"Everything you need for professional content generation in one tool",items:[{title:"Advanced Claude AI Models",description:"We write on Anthropic's Claude Sonnet 5 — the same AI used by the world's largest companies. The writer uses tools: it reaches for sources while writing."},{title:"Automatic Information Search",description:"Our AI text generator automatically searches and analyzes sources online to create factually accurate content."},{title:"Custom Sources",description:"Add your own documents and pages as source materials - AI will prioritize them when generating content."}
754,{title:"Native-quality writing",description:"Every article is written natively — with researched sources, correct grammar and a natural style that reads like a human writer."},{title:"WYSIWYG Editor",description:"Full control over content - edit generated text in real-time with an intuitive HTML formatting editor."},{title:"Export to PDF & DOCX",description:"Download ready content in PDF, DOCX, HTML formats or copy as plain text - whatever works for you."}]},hZ={badge:"COMPETITIVE ADVANTAGE",title:"What Makes",subtitle:"A text generator unlike any other",cta:"Sign Up",ctaSubtext:"No credit card required",items:[{title:"Extra-Long Content",subtitle:"Up to 300,000 characters per order",description:"Unlike other AI generators that limit length, Smart-Copy.ai lets you create comprehensive content up to 300,000 characters (about 150 pages). Perfect for long reports, ebooks, technical documentation or in-depth articles.",features:["Ebooks, analyses, studies, reports up to 150 pages","Content consistency throughout","Automatic structure and formatting","SEO optimization, language accuracy"]},{title:"Reliable Sources & Research",subtitle:"4-Step Verification Process",description:"Our AI doesn't make up information. Every text is based on carefully verified online sources selected specifically for your content.",isProcess:!0,processLabel:"RESEARCH PROCESS",features:["Search - AI searches Google and finds the best sources for your topic","Scraping - Automatic extraction of content from web pages","Analysis - AI verifies reliability, relevance and credibility of sources","Generation - Creating original content fully utilizing the sources"]},{title:"No Commitments or Subscriptions",subtitle:"Pay only for what you use",description:"Unlike many AI platforms with subscription models, Smart-Copy.ai saves you real money with no monthly commitments.",features:["No monthly fees - create content when you need it","Top up from {{minTopUp}} - no minimum packages","Credits never expire - use them whenever","Save money with competitive pricing - just {{pricePerThousand}}/1000 characters"],comparison:{othersLabel:"Other Apps",usLabel:"Smart-Copy.ai",others:["$15-100/month subscription","Monthly word limits","Unused subscription goes to waste"],us:["$0 fixed costs","Pay per word written","Credits never expire"]}},{title:"Custom Knowledge Sources",subtitle:"Links + Files = Original Content",description:"Add up to 6 custom source materials - website links or files in PDF, DOC, DOCX formats. AI will prioritize them, creating unique content based on knowledge you provide.",features:["Company documents - reports, presentations, internal materials","Websites - your site, competitors, industry articles","Expert materials - ebooks, white papers, case studies","100% originality - AI doesn't copy, it processes and synthesizes"]}]},pZ={title:"Use Cases",subtitle:"Smart-Copy.ai is the perfect generator for any type of content - from short blog posts to extensive research papers",items:[{title:"Blog Articles",description:"SEO-friendly AI content"},{title:"Product Descriptions",description:"Original, SEO-optimized descriptions for e-commerce"},{title:"Reports & Analyses",description:"Professional business, scientific, analytical documents"},{title:"Content Marketing",description:"Sales and marketing content"},{title:"Social Media Posts",description:"Engaging content for social platforms"},{title:"Website Copy",description:"Valuable content for company websites and landing pages"}]},fZ={title:"Copywriter, AI chat or",titleHighlight:"Smart-Copy?",subtitle:"An honest comparison of three ways to get an article onto your blog — with research, an image and publishing included.",headers:{aspect:"",copywriter:"Copywriter",chat:"AI chat (subscription)",us:"Smart-Copy"},note:"Honestly: if you only need raw text and have time for prompting, source checking, images and formatting — a chat subscription is cheaper. Smart-Copy is what you buy when the finished, published article and your time are what count.",items:[{aspect:"Cost of a 10-page article (20k characters)",copywriter:"{{copywriterRange}}",chat:"Included in subscription (~$20/mo)",us:"{{priceTenPages}}"},{aspect:"Your time per text",copywriter:"Brief + review, ~30 min",chat:"30-60 min: prompts, stitching, formatting",us:"2 minutes: topic and Enter"},{aspect:"Research with sources",copywriter:"Manual, included in the fee",chat:"Depends on the prompt, you verify sources",us:"Automatic, source list next to the text"},{aspect:"Featured image",copywriter:"Separate job or stock photo",chat:"Separate prompt, download, upload",us:"Included, set automatically"},{aspect:"WordPress publishing",copywriter:"You paste and format it",chat:"Copy-paste-format",us:"Automatic, with scheduling"},{aspect:"A whole blog cycle (topic plan, cadence)",copywriter:"A separate project and budget",chat:"You plan it and keep track",us:"Autoblog plans, writes and publishes"},{aspect:"Automation and hooking into your own systems",copywriter:"Not applicable",chat:"You have to build it yourself",us:"Public API and signed webhooks"},{aspect:"Commitment",copywriter:"Contract or per-job",chat:"Monthly subscription",us:"None — you pay per text"}]},mZ={badge:"REAL EXAMPLE",title:"Expert Article in",titleTime:"5 minutes",titleFor:"for",subtitle:"See how Smart-Copy.AI generated a professional blog article about business automation — judge the results yourself",stats:{time:"Generation Time",cost:"Smart-Copy.ai Cost",words:"Words in Article",quality:"Quality Score"},article:{label:"Generated Article",category:"Category: Business Automation",title:'"Process Automation for Small Business - How to Start?"',description:"Comprehensive guide including: tool overview (Make.com, Zapier), comparison table of 7 solutions with pricing, practical case studies, process audit checklist...",tags:["Comparison Tables","Case Studies","Checklists","SEO-optimized"],linkText:"See the full live article"},comparisonCards:{copywriter:{title:"Copywriter",time:"2-3 business days"},diy:{title:"Writing Yourself",time:"4-6 hours of work"},smartcopy:{badge:"BEST CHOICE"}},testimonial:{quote:"Smart-Copy generated 80% of the finished article in 5 minutes. I added my case study, adju
754sted a few stats and in 30 minutes had professional content ready to publish. I save 5+ hours per week on content creation.",author:"Karol",role:"Web Agency Owner"},bottomCta:{text:"Want to see how Smart-Copy works for your business?",button:"Try Smart-Copy.ai"}},gZ={title:"Transparent Pricing, No Subscriptions",subtitle:"Pay only for what you use. AI text generator with no hidden costs.",priceUnit:"per 1000 characters (half page)",cta:"Sign Up →",examples:{onePage:"1 page (2000 characters)",tenPages:"10-page article (20k characters)",fiftyPages:"50-page report (100k characters)"}},yZ={title:"Frequently Asked Questions",subtitle:"Everything you want to know about AI-powered text generation",items:[{question:"Does the AI text generator create original content?",answer:"Yes! Our AI never copies content from sources. It analyzes information and writes fully original text in its own words, tailored to your guidelines."},{question:"What languages does Smart-Copy support?",answer:"Smart-Copy currently writes in English and Polish. Every article is composed natively in the chosen language — with researched sources, correct grammar and a natural style — rather than machine-translated."},{question:"How long can AI-generated texts be?",answer:"Smart-Copy supports texts from 2,000 characters (1 page) to about 300,000 characters (about 150 pages). You can order short product descriptions, long blog articles, ebook content or analytical reports."},{question:"Can I add my own source materials?",answer:"Yes! You can add up to 6 custom sources (website links or PDF/DOC/DOCX files). The AI content generator will prioritize them, creating text based primarily on your materials."},{question:"How much does content generation cost?",answer:"The price is {{pricePerThousand}} per 1000 characters. For example: 1 page (2000 characters) = {{priceOnePage}}, 10-page article = {{priceTenPages}}. That's 10x cheaper than traditional copywriting!"},{question:"Is the content SEO-friendly?",answer:"Yes! The AI text generator creates SEO-optimized content - natural keyword usage, proper H1-H3 heading structure, high uniqueness and substantive value."},{question:"How much does a long article cost?",answer:"Pricing is degressive: 1.99 PLN per 1,000 characters up to 5k, 1.19 PLN up to 15k and 0.69 PLN above — and a text up to 30,000 characters never costs more than 29 PLN (~$8). Example: an 8,000-character article is 13.52 PLN (~$4), a 30,000-character report — 29 PLN."},{question:"Can Smart-Copy publish directly to WordPress?",answer:"Yes. Connect your site with the free plugin and every text can publish itself — immediately, as a draft, or on a schedule. The featured image is set automatically and the post link shows up in your dashboard."},{question:"Where does the AI get its information?",answer:"From real research: the generator searches Google, optionally academic sources, and can use your own URLs or files. The list of sources used is visible next to every text — no need to take our word for it."}]},xZ={titleLine1:"Start Generating Professional",titleLine2:"Content Today",subtitle:"Smart-Copy.ai AI text generator is the fastest way to create high-quality content at great prices. Sign up and start saving on content without compromising quality!",cta:"Sign Up",benefits:"✓ No credit card ✓ No commitments ✓ {{price}}/1000 characters"},wZ={badge:"Autoblog",title:"A blog that writes itself",subtitle:"Give it a niche (or let the autoblog read it from your website) and it plans a 20-topic cluster, writes at your pace and publishes straight to WordPress.",bullets:["Topic cluster built from your site and competitors","1–7 texts per week, with images, on schedule","Editable topic queue: rename, remove, drag to reorder","Balance auto-top-up — the series never stops"],imageAlt:"An autoblog series in the Smart-Copy dashboard: a cluster of 20 planned topics",cta:"Start autoblogging"},bZ={title:"Plug it in anywhere",subtitle:"The dashboard is just the start — Smart-Copy works where you work."},kZ={title:"Calculate your price",lengthLabel:"Text length",chars:"characters",pages:"pages",price:"Text price",capNote:"Price cap: a text up to 30,000 characters never costs more than 29 PLN (~$8).",bonusNote:"Top-up bonuses: +5% from 100 PLN, +10% from 200 PLN, +15% from 500 PLN, +20% from 1000 PLN.",tiersNote:"Rates decrease with length: 1.99 PLN up to 5k characters, 1.19 PLN up to 15k, 0.69 PLN above."},vZ={meta:oZ,hero:lZ,stats:cZ,howItWorks:uZ,features:dZ,distinctions:hZ,useCases:pZ,comparison:fZ,caseStudy:mZ,pricing:gZ,faq:yZ,finalCta:xZ,autoblog:wZ,integrationsStrip:bZ,pricingCalc:kZ},jZ={title:"AI Copywriter | AI Writer for Sales Copy - Smart-Copy.ai",de
754scription:"AI copywriter for sales copy, articles and content marketing with real research. 12x cheaper than a traditional copywriter — from $0.99/1000 characters.",keywords:"AI copywriter, AI writer, copy AI, artificial intelligence copywriter, automated copywriting, AI for copywriting",ogTitle:"AI Copywriter | Professional AI Writer - Smart-Copy.ai",ogDescription:"AI copywriter creates sales copy 12x cheaper than humans. Researched sources and featured images included. Copywriting, content marketing, SEO."},SZ={badge:"Professional AI-Powered Copywriting",titleLine1:"AI Copywriter",titleLine2:"12x Cheaper Than Human",subtitleStrong:"AI Writer",subtitle:"for sales copy, content marketing and SEO.",subtitleLine2:"Researched copy AI - from {{price}} per 1000 characters.",valueProps:{time:"5 minutes vs 8 hours of work",cost:"$10 vs $150-250 per article",techniques:"AIDA, PAS, storytelling"},cta:{test:"Try AI Copywriter",compare:"See the Difference"},trust:"✓ No commitments ✓ 10,000+ satisfied users"},NZ={title:"Why AI Writer is the Future of Copywriting?",subtitle:"Copy AI combines machine speed with copywriter creativity",items:[{title:"Time Savings",description:"AI copywriter creates in 5 minutes what a traditional copywriter writes in 8 hours."},{title:"Lower Costs",description:"Pay {{articlePrice}} per article instead of {{copywriterPrice}} for a copywriter. That's 95% savings!"},{title:"AI Creativity",description:"AI writer generates ideas and text variations that humans wouldn't think of."},{title:"8 Native Languages",description:"Copy AI writes in English, Polish, German, Spanish and 4 other languages."},{title:"Conversion-Focused",description:"AI writer knows copywriting techniques - AIDA, PAS, storytelling, CTA."},{title:"SEO-Friendly",description:"AI copywriter automatically optimizes texts for Google search engines."}]},CZ={title:"How Does Smart-Copy AI Writer Work?",subtitle:"From brief to finished text in 4 simple steps",steps:[{title:"60-Second Briefing",description:"Enter your topic, target audience, tone of voice and length. AI copywriter understands the task."},{title:"AI Writer Gathers Materials",description:"Automatic online research + your own source materials (optional)."},{title:"Copy AI Writes Content",description:"In 5-10 minutes AI writer generates ready, SEO-friendly text in your chosen copywriting style."},{title:"You Polish the Details",description:"Edit in WYSIWYG, add personal touch, export to PDF/DOCX."}]},EZ={title:"Types of Content from AI Copywriter",subtitle:"Copy AI writes every type of marketing and sales content",items:[{title:"Blog Articles",examples:["How-to guides","Expert articles","Listicles","Case studies"],price:"from $10"},{title:"Sales Copywriting",examples:["Landing pages","Product descriptions","Email marketing","Ads"],price:"from $5"},{title:"Social Media",examples:["Facebook posts","Tweets","LinkedIn","Instagram"],price:"from $2"},{title:"Content Marketing",examples:["E-books","White papers","Newsletters","Webinars"],price:"from $20"},{title:"Corporate Copy",examples:["About us","Mission/vision","Reports","Presentations"],price:"from $12"},{title:"SEO Content",examples:["SEO articles","Category descriptions","FAQ","Glossary"],price:"from $8"}]},TZ={title:"Human Copywriter vs",titleHighlight:"AI Copywriter",subtitle:"Comparing costs, time and capabilities of traditional copywriting with AI writer",headers:{feature:"Comparison",human:"Human Copywriter",ai:"AI Copywriter"},rows:[{feature:"Time to write 10-page article",human:"8-12 hours",ai:"5-10 minutes"},{feature:"Cost of 10-page article",human:"$150-250",ai:"~$10"},{feature:"Availability",human:"9am-5pm (Mon-Fri)",ai:"24/7/365"},{feature:"Multilingual",human:"Requires translator",ai:"Native-quality output instantly"},{feature:"Revisions & edits",human:"2-3 days",ai:"Instantly"},{feature:"Source research",human:"2-4 hours",ai:"Automatic"}]},AZ={title:"What AI Writer Users Say?",subtitle:"Real reviews of Smart-Copy.ai Copy AI",items:[{text:"Smart-Copy AI copywriter replaced my content marketing agency. I save $4,000 monthly and get texts in minutes instead of weeks.",author:"Mark K.",role:"CEO, e-commerce"},{text:"As a copywriter with 10 years of experience I was skeptical. But this AI writer creates better first drafts than half the juniors I've worked with.",author:"Anna W.",role:"Senior Copywriter"},{text:"Copy AI helped us scale content from 4 articles monthly to 50. This was impossible with traditional copywriters on our budget.",author:"Tom L.",role:"Marketing Manager"}]},zZ={title:"Frequently Asked Questions About AI Copywriter",subtitle:"Everything you need to know about AI writer and copy AI",items:[{question:"Will AI copywriter replace human copywriters?",answer:"AI writer won't replace creative seniors, but excels at content marketing, SEO, product descriptions and blog articles. It's the perfect tool for copywriters - creates a first draft that you then polish."}
754,{question:"What copywriting techniques does AI writer know?",answer:"Our AI copywriter knows classic techniques: AIDA (Attention, Interest, Desire, Action), PAS (Problem, Agitate, Solution), storytelling, call-to-action, power words, emotional triggers, benefit-driven writing and SEO copywriting."},{question:"Does copy AI only write in English?",answer:"No! The AI writer currently supports English and Polish. Each text sounds like it was written by a native speaker because it is composed natively in the chosen language, not translated."},{question:"Are AI copywriter texts unique?",answer:"Yes! AI writer never copies content from sources. It analyzes information and creates fully original text in its own words. You can check uniqueness in any plagiarism checker - it will be 100%."},{question:"How much does AI copywriter cost vs traditional copywriter?",answer:"Traditional copywriter: $15-30 per 1000 characters. AI copywriter Smart-Copy: {{price}} per 1000 characters. That's 12-25x cheaper! 10-page article: copywriter $150-250, copy AI ~$10."},{question:"Can I edit texts generated by AI writer?",answer:"Of course! After generation you have access to WYSIWYG editor - edit text like in Word. Add your insights, change tone, polish details. AI copywriter is a starting point, not the end."}]},PZ={badge:"Over 10,000 copywriters and marketers already use it",titleLine1:"Try AI Copywriter",titleLine2:"and See for Yourself",subtitle:"Smart-Copy.ai AI writer is a revolution in copywriting. Copy AI creates professional texts in minutes, not hours.",cta:{test:"Try Smart-Copy.ai",login:"Sign In"},benefits:"✓ No credit card ✓ No commitments"},_Z={meta:jZ,hero:SZ,benefits:NZ,howItWorks:CZ,copywritingTypes:EZ,comparison:TZ,testimonials:AZ,faq:zZ,finalCta:PZ},IZ={title:"AI Product Description Generator for E-commerce - Smart-Copy.ai",description:"Generate unique, SEO-friendly product and category descriptions for your store. From {{price}}/1000 characters, no subscription.",keywords:"AI product description generator, AI product descriptions, automated product descriptions, AI e-commerce, store description generator, AI category descriptions",ogTitle:"AI Product Description Generator | Smart-Copy.ai",ogDescription:"Generate hundreds of unique product descriptions per hour. AI for e-commerce. 10x cheaper than copywriter."},OZ={badge:"AI for Online Stores",titleLine1:"AI Product",titleLine2:"Description Generator",subtitleStrong:"Artificial Intelligence",subtitle:"creates unique product and category descriptions for e-commerce.",subtitleLine2:"1000 descriptions per hour. SEO-friendly. From {{price}} per 1000 characters.",valueProps:{cost:"100 descriptions = ~{{hundredDescsCost}} (vs {{copywriterCost}} copywriter)",unique:"Unique, not duplicates",export:"Export CSV/JSON/XML"},cta:{start:"Start Generating Descriptions",howItWorks:"See How It Works"},trust:"✓ Top up from {{minTopUp}} ✓ Pay only for what you use ✓ No subscriptions"},RZ={title:"Why AI Product Description Generator?",subtitle:"Scale your e-commerce without spending a fortune on copywriters",items:[{title:"1000 Descriptions Per Hour",description:"AI product description generator creates hundreds of unique descriptions in the time it would take you to write one."},{title:"95% Cost Savings",description:"{{price}} per description instead of {{copywriterPrice}} for a copywriter. For 100 products that's {{savings}} in savings."},{title:"SEO in Every Description",description:"Automatic Google optimization - keywords, H1-H3 headers, meta descriptions."},{title:"Conversion Copywriting",description:"AI knows sales techniques - benefit selling, storytelling, social proof, urgency."},{title:"Native-quality descriptions",description:"Unique, native-quality product descriptions. Perfect for stores and marketplaces."},{title:"Category & Tag Descriptions",description:"Not just products - AI also writes category, collection, brand and attribute descriptions."}]},LZ={title:"How Does the Product Description Generator Work?",subtitle:"From data import to finished descriptions in 4 steps",steps:[{title:"Import Product Data",description:"Paste CSV with product names and basic attributes or add them manually one by one."}
754,{title:"Choose Template & Tone",description:"Set length, style (professional/casual/luxury) and target language."},{title:"AI Generates Descriptions",description:"AI for product descriptions creates unique, SEO-friendly content in minutes."},{title:"Edit & Export",description:"Polish details in editor, export CSV/JSON to your store."}]},MZ={title:"AI for Every E-commerce Industry",subtitle:"Artificial intelligence knows your industry specifics",items:[{title:"Fashion Stores",examples:["Clothing","Shoes","Accessories","Jewelry"],features:"Material descriptions, cuts, styling"},{title:"Electronics",examples:["Smartphones","Laptops","Appliances","Audio/Video"],features:"Technical specs, comparisons"},{title:"Home & Garden",examples:["Furniture","Decor","Tools","Plants"],features:"Dimensions, uses, care"},{title:"Beauty & Health",examples:["Cosmetics","Supplements","Perfumes","Skincare"],features:"Ingredients, effects, usage"},{title:"Sports & Hobbies",examples:["Cycling","Fitness","Games","Books"],features:"Parameters, applications, benefits"},{title:"Multi-brand Marketplace",examples:["Amazon","eBay","Etsy","Walmart"],features:"Descriptions for different platforms"}],generatesLabel:"AI generates:"},DZ={title:"Product Description Types & Pricing",subtitle:"Choose the length and structure that fits your store",items:[{type:"Short Description (300-500 chars)",use:"Product cards, thumbnails, lists",elements:["Main benefit","USP","Call to action"]},{type:"Standard Description (1000-2000 chars)",use:"Main product cards",elements:["H1 Header","Intro paragraph","Feature list","CTA"]},{type:"Extended Description (2000-5000 chars)",use:"Premium products, SEO",elements:["H2/H3 Sections","Storytelling","Technical details","FAQ"]}]},FZ={title:"AI Generator Features",subtitle:"Everything your e-commerce needs",items:["Unique descriptions for every product variant","Automatic use of attributes (color, size, material)","Tone adapted to target audience","Built-in call-to-action","Compliance with marketplace guidelines (Amazon, eBay)","Export to CSV, XML, JSON for WooCommerce, Shopify, PrestaShop","Bulk generation - mass content creation","WYSIWYG editor for quick edits"]},BZ={title:"Manual vs",titleHighlight:"AI Product Descriptions",subtitle:"Comparing traditional copywriting with AI generator",headers:{aspect:"Aspect",manual:"Manual Writing",ai:"AI Generator"},rows:[{aspect:"Time to write 100 descriptions",manual:"2-3 weeks",ai:"1-2 hours"},{aspect:"Cost of 100 product descriptions",manual:"$1,500-3,000",ai:"~$100"},{aspect:"Descriptions in multiple languages",manual:"Translation agency",ai:"Instant, native-quality output"},{aspect:"Updates after price/stock changes",manual:"Manual, time-consuming",ai:"Automatic"},{aspect:"Tone of voice consistency",manual:"Difficult with multiple writers",ai:"100% consistent"}]},$Z={title:"Use Case Examples",subtitle:"How AI generator saves time and money in e-commerce",challengeLabel:"Challenge:",solutionLabel:"Solution:",items:[{scenario:"New Store - 500 Products",challenge:"Need to describe entire inventory before store launch",solution:"AI product description generator creates all descriptions in 2 days instead of 3 months.",savings:"Savings: ~$7,000 and 3 months"},{scenario:"Marketplace Expansion",challenge:"Entering Amazon/eBay and need to adapt descriptions to their guidelines",solution:"AI rewrites descriptions according to each platform's requirements, optimizing for their algorithms.",savings:"Savings: ~$3,000 and 1 month"},{scenario:"International Expansion",challenge:"Want to sell in Germany and UK - need translations for 1000 products",solution:"AI creates native descriptions in German and English, not machine translations.",savings:"Savings: ~$8,000 and 2 months"}]},UZ={title:"Frequently Asked Questions",subtitle:"Everything about AI product description generator",items:[{question:"Does AI product description generator create unique content?",answer:"Yes! Every description is 100% unique. AI doesn't copy from sources or other products. You can paste into any plagiarism checker - it will be 100% original. Even for similar products (e.g. different c
754olors of the same shirt) AI creates different descriptions."},{question:"How does AI know what to write about my product?",answer:"You provide basic data: product name, category, attributes (e.g. material, color, size), price. AI analyzes this information, searches for context online and creates a professional description. You can also add your own bullet points that AI will expand into full text."},{question:"Are descriptions optimized for Google?",answer:"Yes! AI for product descriptions automatically: inserts keywords naturally, creates H1-H3 structure, optimizes length (minimum 300 characters for SEO), adds internal links (if provided), generates meta descriptions."},{question:"Can I generate descriptions for Amazon, eBay, my own store?",answer:"Of course! AI generator adapts descriptions to each platform's requirements: Amazon (up to 2000 characters plain text, bullet points), eBay (HTML formatting), WooCommerce/Shopify (full HTML with tags). You can generate different versions of the same product."},{question:"How much does generating 100 product descriptions cost?",answer:"Depends on length. Short descriptions (300-500 chars): ~{{shortCost100}} for 100. Standard (1000-2000 chars): ~{{standardCost100}}. Long SEO (3000-5000 chars): ~{{longCost100}}. That's 10-20x cheaper than a copywriter ($1,500-3,000 for 100 descriptions)."},{question:"Can AI write in industry jargon (e.g. technical)?",answer:"Yes! AI product description generator knows terminology from: electronics (technical parameters, specs), fashion (fabric names, cuts, styles), cosmetics (INCI ingredients, effects), sports (training parameters), automotive (parts, specifications). You specify the niche, AI adapts the language."}]},WZ={badge:"Scale your store without limits",titleLine1:"Start Generating Product",titleLine2:"Descriptions Today",subtitle:"Smart-Copy.ai AI product description generator - artificial intelligence for e-commerce. 1000 descriptions per hour, 10x cheaper than copywriter.",cta:{register:"Create Account & Top Up",login:"I Have an Account"},benefits:"✓ Top up from {{minTopUp}} ✓ {{price}} per 1000 characters ✓ No commitments"},VZ={meta:IZ,hero:OZ,benefits:RZ,howItWorks:LZ,ecommerceTypes:MZ,descriptionTypes:DZ,features:FZ,comparison:BZ,useCases:$Z,faq:UZ,finalCta:WZ},HZ={title:"AI SEO Writer | SEO Content Generator Tool - Smart-Copy.ai",description:"Generate SEO-optimized articles, category descriptions and landing pages with automatic research. From {{price}}/1000 characters.",keywords:"AI SEO writer, SEO content generator, SEO writing tool, AI content generator, AI article writer SEO, automated SEO content, SEO copywriting AI, content writing tool",ogTitle:"AI SEO Writer | SEO Content Generator Powered by AI",ogDescription:"Generate SEO-optimized content with AI. Automatic research, keyword placement, H1-H3 heading structure and unique content. 10x faster than manual writing.",ogUrl:"https://en.smart-copy.ai/ai-seo-content-writer"},qZ={badge:"AI SEO Content Generator",titleLine1:"SEO Content Written",titleLine2:"by Artificial Intelligence",subtitleStrong:"AI-powered SEO content generator",subtitle:"— create optimized blog articles, category descriptions, landing pages and website copy that ranks on Google.",subtitleLine2:"Automatic research, heading structure and natural keyword placement — from {{price}} per 1000 characters.",valueProps:{seo:"SEO Structure (H1-H3, meta)",research:"Automatic Source Research",unique:"100% Unique Content",keywords:"Natural Keyword Density"},cta:{start:"Start Writing SEO Content",howItWorks:"See How It Works"},trust:"✓ No subscriptions ✓ Top up from {{minTopUp}} ✓ Credits never expire"},KZ={title:"Why AI SEO Writer?",subtitle:"Generate content that not only looks great but actually ranks in search engines",items:[{title:"Built-in SEO Optimization",description:"The SEO content generator automatically builds proper H1-H3 heading structure, applies natural keyword density and creates content that's friendly to Google's algorithms."},{title:"10x Cheaper Than an SEO Copywriter",description:"A 10-page SEO article for ~{{articlePrice}} instead of {{copywriterPrice}} from an SEO specialist. Save {{savings}}+ per year on content marketing without sacrificing quality."},{title:"Research & Source Verification",description:"AI scans the internet, analyzes competitors and gathers up-to-date data. Every SEO text is based on reliable sources — not fabricated information."},{title:"Publish-Ready Content",description:"Generated articles come with ready CMS structure: headings, paragraphs, lists, highlights. Export as HTML and paste directly into WordPress or Shopify."}
754,{title:"Native-quality SEO writing",description:"Create SEO content in English, Polish, German, Spanish, French, Italian, Ukrainian and Russian. Perfect for positioning multilingual websites."},{title:"Scale Content Production",description:"Generate dozens of SEO articles in a single day. Our AI SEO writer lets you scale content marketing like never before — without expanding your team."}]},GZ={title:"How Does AI SEO Writer Work?",subtitle:"From topic to publish-ready SEO article in 4 simple steps — the entire process takes just minutes",steps:[{title:"Enter Your Topic & Keywords",description:"Type in the article topic, main keywords and optional guidelines (tone, target audience, length). The AI SEO writer adapts to your needs."},{title:"AI Analyzes Competition",description:"Artificial intelligence searches Google, analyzes top-ranking competitor content and identifies content gaps your article can fill."},{title:"SEO Content Generation",description:"AI creates a unique, valuable article with optimal heading structure, natural keyword placement and an engaging writing style."},{title:"Edit, Optimize & Export",description:"Polish your content in the WYSIWYG editor, adjust headings and metadata, then download as HTML, PDF or DOCX. Ready to publish in 5 minutes."}]},ZZ={title:"Types of SEO Content You Can Generate",subtitle:"AI SEO Writer creates every type of content needed for an effective SEO strategy",generatesLabel:"Optimization:",items:[{title:"SEO Blog Articles",examples:["How-to Guides","Top 10 Lists","Expert Articles","Pillar Pages"],features:"H1-H3 structure, long-tail keywords, internal linking support, meta description"},{title:"E-commerce Category Descriptions",examples:["Product Categories","Subcategories","Collections","Filters"],features:"Product keyword density, CTAs, descriptions with user value"},{title:"Landing Pages",examples:["Service Pages","Offer Pages","Local Pages","PPC Campaigns"],features:"Persuasive copy, conversion structure, local SEO, transactional keywords"},{title:"Business Website Copy",examples:["About Us","Services","Portfolio","FAQ"],features:"Brand keywords, E-E-A-T authority building, informational structure"},{title:"SEO Product Descriptions",examples:["Unique Descriptions","Specifications","Comparisons","Reviews"],features:"Unique content for each product, buying keywords, rich snippets"},{title:"Pillar Content & Topic Clusters",examples:["Pillar Content","Cluster Articles","Hub Pages","Cornerstone Content"],features:"Cluster strategy, internal linking, topic coverage, topical authority"}]},YZ={title:"SEO Features Built Into the Generator",subtitle:"Every piece of content generated by AI SEO Writer is automatically optimized for search engines",items:["Proper heading hierarchy H1 → H2 → H3","Natural keyword density (2-3%)","Long-tail keywords in headings and body","Optimal paragraph length and readability","Lists and highlights for better readability","CMS-ready formatting (HTML)","Unique content — 0% plagiarism","Structure optimized for featured snippets","Content based on current sources","Consistent tone and style throughout","E-E-A-T content support (Experience, Expertise, Authoritativeness, Trustworthiness)","Automatic topic research from Google"]},JZ={title:"Manual SEO Writing vs",titleHighlight:"AI SEO Writer",subtitle:"Compare traditional SEO content creation with AI-powered generation",headers:{aspect:"Aspect",manual:"Manual Writing",ai:"AI SEO Writer"},rows:[{aspect:"Time to create 10-page article",manual:"6-12 hours",ai:"10-20 minutes"},{aspect:"Competition & SERP analysis",manual:"2-4 hours",ai:"Automatic"},{aspect:"Cost per SEO article",manual:"{{copywriterPrice}}",ai:"~{{articlePrice}}"},{aspect:"SEO heading structure",manual:"Manual optimization",ai:"Automatic H1-H3"},{aspect:"Keyword density control",manual:"Manual insertion & checking",ai:"Natural, automatic"},{aspect:"Scalability — 50 articles/month",manual:"Requires team of 3-5 people",ai:"1 person + AI"},{aspect:"Multilingual SEO",manual:"Separate writer per language",ai:"Native-quality writing"},{aspect:"Source verification",manual:"Manual, time-consuming",ai:"Automatic from internet"}]},XZ={title:"Who Uses AI SEO Writer?",subtitle:"Proven use cases — from solo bloggers to SEO agencies serving dozens of clients",challengeLabel:"Challenge:",solutionLabel:"Solution with AI:",items:[{scenario:"SEO Agency / Content Marketing",challenge:"Need to deliver 50-100 SEO articles per month for multiple clients. Copywriters can't keep up, costs are rising.",solution:"AI SEO Writer generates articles in 10-20 minutes. The agency scales content production 10x without hiring new writers.",savings:"💰 Savings: 70-80% cost reduction + 5x faster delivery"},{scenario:"E-commerce / Dropshipping Store",challenge:"Hundreds of products without unique descriptions. Content duplication hurts Google rankings.",solution:"Generate unique category and product descriptions with SEO structure. Each description is different, with buying keywords.",savings:"💰 Savings: 90% time saved on descriptions + organic traffic growth"},{scenario:"Blogger / Freelancer / Solopreneur",challenge:"No time to write regular blog articles. Irregular publishing weakens SEO.",solution:"Generate 2-4 articles per week in minutes. Maintain a regular publishing schedule effortlessly.",savings:"💰 Savings: 20+ hours per month on content writing"}]},QZ={title:"How AI Helps Your SEO Strategy",subtitle:"Understand how the SEO content generator supports your content marketing strategy",items:[{title:"Topical Authority",description:"Regularly publishing expert content builds topical authority in Google's eyes. AI lets you create comprehensive topic clusters faster than ever before."},{title:"Long-Tail Keyword Coverage",description:"AI analyzes long-tail keywords related to your topic and naturally weaves them into content. This attracts traffic from niche queries that are easier to rank for."},{title:"Content Freshness & Recency",description:"Google rewards fresh content. AI SEO Writer scans the internet and creates articles based on the latest data, statistics and industry trends."},{title:"Featured Snippet-Ready Structure",description:"AI-generated content has a structure that favors appearing in featured snippets — lists, definitions, tables and question-answer formats."}]},eY={title:"Frequently Asked Questions",subtitle:"Everything you need to know about the AI-powered SEO content generator",items:[{question:"Does AI SEO Writer really create search-engine-optimized content?",answer:"Yes! The SEO content generator automatically builds proper heading structure (H1, H2, H3), applies n
754atural keyword density, maintains appropriate paragraph length and creates substantively valuable content. Articles are ready to publish in any CMS."},{question:"Is AI-generated content unique and won't it be penalized by Google?",answer:"Yes. Our AI doesn't copy content from sources — it analyzes information and writes fully original texts. Each article passes through an advanced language model that guarantees uniqueness. Google doesn't penalize content simply for being AI-generated, as long as it's valuable and helpful to users."},{question:"How does AI select keywords for SEO content?",answer:"You provide the main keywords when placing your order. AI naturally weaves them into the content, headings and paragraphs, maintaining optimal density (2-3%). Additionally, AI independently identifies related long-tail keywords based on topic analysis."},{question:"Can I edit the generated SEO content?",answer:"Yes! You can edit every generated article in the built-in WYSIWYG editor. Change headings, paragraphs, add your own sections. Then export as HTML (for WordPress), PDF or DOCX."},{question:"How much does generating an SEO article cost?",answer:"Short blog article (3,000 characters): ~{{shortCost}}. 10-page SEO article (20,000 characters): ~{{articleCost}}. Comprehensive guide (50,000+ characters): ~{{longCost}}. That's 10x cheaper than hiring an SEO copywriter."},{question:"What platforms can I export content to?",answer:"Export content in HTML (ideal for WordPress, Shopify, any CMS), PDF (reports, presentations), DOCX (Word, Google Docs) or copy as plain text. Formatting is preserved."},{question:"Can AI write articles for local SEO?",answer:"Yes! Specify the location (e.g., city, region) and local keywords in your guidelines. AI will naturally weave them into the content, creating copy optimized for local search results."},{question:"How many SEO articles can I generate per day?",answer:"There's no limit! You can generate an unlimited number of SEO articles — you only pay for the characters generated. This allows SEO agencies to scale content production to any level."}]},tY={badge:"Start ranking higher",titleLine1:"Generate SEO Content",titleLine2:"That Ranks on Google",subtitle:"AI SEO Writer by Smart-Copy.ai is the fastest way to create optimized content. Sign up and start building your search visibility.",cta:{register:"Register",login:"Log In"},benefits:"✓ No subscriptions ✓ Top up from {{minTopUp}} ✓ {{price}}/1000 characters ✓ Credits never expire"},rY={meta:HZ,hero:qZ,benefits:KZ,howItWorks:GZ,seoContentTypes:ZZ,seoFeatures:YZ,comparison:JZ,useCases:XZ,seoTips:QZ,faq:eY,finalCta:tY},nY={greeting:"Welcome, {{name}}! 👋",subtitle:"Let's create some new content today!"},sY={title:"Quick Actions",newOrder:"Create New Order",myOrders:"My Orders"},iY={orders:"Orders",generatedTexts:"Generated Texts",spent:"Total Spent"},aY={title:"Recent Orders",viewAll:"View all",pages:{one:"page",few:"pages",many:"pages"},characters:"characters",empty:{title:"You don't have any texts yet",cta:"Order your first text"}},oY={paymentSuccess:"✅ Top-up successful! Added {{amount}} to your account."},lY={welcome:nY,quickActions:sY,stats:iY,recentOrders:aY,toast:oY},cY={back:"Back",title:"My Orders",subtitle:"Manage your AI content orders",newOrder:"New Order",backToList:"Back to orders"},uY="Loading orders...",dY={title:"No Active Orders",description:"You don't have any orders in progress or completed yet. Place your first order!",cta:"Place First Order"},hY={title:"Preview of your text",subtitle:"Here's the introduction we wrote for you. Pay to see the full text.",restLocked:"Rest of the text available after payment",generationFailed:"Preview generation failed. Text will be generated after payment.",totalTexts:"{{count}} text(s)",cancel:"Cancel",payToSeeFullText:"Pay & see full text",processing:"Processing...",generating:"Generating preview...",generatingSubtitle:"This will take a few seconds"},pY={pending:"Pending",inProgress:"In Progress",completed:"Completed",cancelled:"Cancelled"},fY={waiting:"Waiting",completed:"Completed",error:"Error",generating:"Generating content..."},mY={texts:{one:"text",few:"texts",many:"texts"},completedOf:"{{completed}}/{{total}} completed",viewDetails:"View details",errorGenerating:"An error occurred during generation"},gY={orderDate:"Order Date",textsCount:"Number of Texts",total:"Total",orderedTexts:"Ordered Texts",declared:"Declared:",characters:"characters",pages:"pages",generated:"Generated:"},yY={orderReady:'Order "{{title}}" is ready! 🎉',paymentSuccess:"Order paid successfully! 🎉"},xY={header:cY,loading:uY,empty:dY,preview:hY,status:pY,textStatus:fY,order:mY,modal:gY,toast:yY},wY={back:"Back",orderValue:"Order Value"},bY="Loading order...",kY={title:"Order Not Found",cta:"Back to Orders"},vY={pending:"Pending",inProgress:"In Progress",completed:"Completed"},jY={title:"Order Summary",orderDate:"Order Date",textsCount:"Number of Texts",status:"Status",languages:"Languages"},SY={title:"Ordered Texts",declaredLength:"Declared length:",characters:"characters",pages:"pages",generated:"Generated:",guidelines:"Guidelines:",showLess:"Show less",showMore:"Show more",generating:"Generating..."},NY={title:"Sources",userSources:"User Sources",searchSources:"Search Sources",academicSources:"Academic Sources",failedSources:"Unreadable Sources",failedSourcesHint:"We couldn't fetch these materials — they were not used in the text:"},CY={button:"Request a revision",title:"Request a revision",description:"Tell us what you'd like changed. We'll revise the text free of charge.",placeholder:"E.g. shorten the intro, add more examples in the costs section, make the tone more formal...",left:"Free revisions left: {{n}}",limitReached:"Free revision limit reached",submit:"Submit revision",sending:"Sending...",cancel:"Cancel"},EY={placeholder:"Start typing...",list:"List",orderedList:"1. List",saving:"Saving...",save:"Save",cancel:"Cancel",saveSuccess:"Changes saved!",saveError:"Error saving changes"},TY={edit:"Edit",downloadPdf:"Download PDF",downloadDocx:"Download DOCX",copyText:"Copy Text",copyHtml:"Copy HTML",saveToGoogleDocs:"Save to Google Docs",openGoogleDoc:"Open document"},AY={generatingPdf:"Generating PDF...",pdfDownloaded:"PDF downloaded! 🎉",pdfError:"Error generating PDF",generatingDocx:"Generating DOCX...",docx
754Downloaded:"DOCX downloaded!",docxError:"Error generating DOCX",copied:"Copied to clipboard!",htmlCopied:"HTML copied to clipboard!",copyError:"Copy error",revisionQueued:"Revision accepted! The text will update in a few minutes.",revisionError:"Failed to request revision",googleDocsSaving:"Saving to Google Docs…",googleDocsSaved:"Saved to Google Docs.",googleDocsNotConnected:"Connect your Google account in Integrations first.",googleDocsError:"Could not save to Google Docs."},zY={title:"Outline awaiting your approval",description:"Review the text plan. Writing starts as soon as you approve.",sectionsLabel:"Planned sections:",intro:"(introduction)",approve:"Approve & write",approving:"Approving...",reworkLabel:"Have comments? Describe them and we'll prepare a new outline:",reworkPlaceholder:"E.g. add a section about costs, remove section 3, reorder...",rework:"Revise outline",reworking:"Sending comments...",reworkInProgress:"Preparing a new outline based on your comments..."},PY={download:"Download image"},_Y={button:"Publish to WordPress",modalTitle:"Publish to WordPress",modalHint:"The text goes to your site via WP REST API — with featured image and alt texts.",siteLabel:"Site",sitePlaceholder:"— choose a site —",urlPlaceholder:"https://yourdomain.com",userPlaceholder:"WordPress login",passPlaceholder:"Application Password",appPasswordHint:"Generate an Application Password in WP: Users → Profile → Application Passwords. This is not your login password.",addSite:"Verify & save site",verifying:"Verifying connection...",addAnother:"+ add another site",backToList:"← back to list",asDraft:"as draft",asPublish:"publish immediately",asSchedule:"schedule for later",scheduleHint:"WordPress will publish the post automatically at the selected time (your local time).",manage:{title:"Site connection",statusConnected:"Connected",statusConnectedAgo:"Connected — plugin active {{ago}} ago",statusStale:"Plugin has gone quiet (last seen {{ago}} ago)",statusPending:"Waiting for the plugin's first check-in",checking:"Checking connection...",checkNow:"Check again",checkOk:"Connection is working.",checkPending:"The site's server blocks our test requests — status is determined by the plugin, which checks in every 5 minutes. If the status doesn't change within 10 minutes, paste the current key from WP below.",newKeyTitle:"Reinstalled the plugin?",newKeyHint:"After a reinstall the plugin may generate a new key. Copy it from WP (Settings → Smart-Copy) and paste it here:",newCredsTitle:"Update credentials",newKeySave:"Save",keyUpdated:"Connection details updated ✔",keyUpdatedPending:"Key saved — the plugin will confirm the connection on its next check-in (within 5 minutes).",deleteTitle:"Remove this integration?",deleteBody:'"{{name}}" will be disconnected from Smart-Copy. Posts already published stay in WordPress untouched.',deleteConfirm:"Remove integration",deleted:"Integration removed"},publish:"Send",publishing:"Sending...",published:"Published to WordPress! 🎉",publishedList:"WP publications",statusLive:"published",statusDraft:"draft",siteAdded:"Site connected!",error:"Publishing failed",noPublish:"— don't auto-publish —",noSitesYet:"No WordPress site connected yet. Connect it once — use it in orders and in autoblogging.",connectFirst:"🔌 Connect a WordPress site",methodConnector:"Smart-Copy plugin (recommended)",methodAppPass:"Application password (advanced)",connectorSteps:"1. In WP: Plugins → Add New → Upload → Activate  →  2. Copy the key from Settings → Smart-Copy and paste it below.",downloadPlugin:"Get it from the WordPress directory",connectorKeyPlaceholder:"Connection key (from Settings → Smart-Copy)",connectorWhy:"Works on any hosting — no server configuration.",pendingVerification:'Site saved! Your hosting blocks verification from our side, so the plugin will confirm the connection itself — click "Fetch texts now" in WP (Settings → Smart-Copy) or wait up to 5 minutes. You can already order texts with publishing.'},IY={header:wY,loading:bY,notFound:kY,status:vY,summary:jY,texts:SY,sources:NY,revision:CY,editor:EY,actions:TY,toast:AY,outline:zY,image:PY,wp:_Y},OY={title:"404 - Page Not Found | Smart-Copy.ai",heading:"Page Not Found",description:"Sorry, the page you're looking for doesn't exist or has been moved.",backHome:"Back to Home"},RY={title:"Top Up Account",subtitle:"Add funds to your Smart-Copy.ai account",discounts:{title:"
754🎁 Top-up bonuses!",tier1:"💰 {{min}}–{{max}} →",tier2:"💎 {{min}}–{{max}} →",tier3:"🚀 {{min}}–{{max}} →",tier4:"👑 {{min}}+ →",discount5:"+5% bonus",discount10:"+10% bonus",discount15:"+15% bonus",discount20:"+20% bonus"},form:{chooseAmount:"Choose amount or enter custom",customAmount:"Custom amount",currency:"$"},savings:{congratulations:"Congratulations! You get a +{{percent}}% bonus!",topUp:"You pay:",discount:"Bonus (+{{percent}}%):",toPay:"Credited to balance:"},info:{title:"Information:",minAmount:"Minimum top-up amount: {{amount}}",payments:"Payments powered by Stripe (card, Google Pay, PayPal, Apple Pay)",instant:"Funds are added instantly after payment",payGet:"Pay {{pay}}, get {{get}} credited!"},button:{redirecting:"Redirecting...",payAndGet:"Pay {{pay}} • Get {{get}}",topUp:"Top up {{amount}}"},errors:{minAmount:"Minimum amount is {{amount}}",generic:"Error during top-up"}},LY={title:"Reset Password"},MY={meta:{title:"Cookie Policy - Smart-Copy.AI",description:"Learn how we use cookies on our website."},heading:"Cookie Policy",lastUpdate:"Last updated:",currentSettings:{title:"Your Current Settings",necessary:"Necessary",alwaysActive:"Always active",analytics:"Analytics",marketing:"Marketing",enabled:"Enabled",disabled:"Disabled",changeSettings:"Change cookie settings"},whatAreCookies:{title:"What are cookies?",description:"Cookies are small text files stored on your device when browsing websites. They help us provide a better user experience and analyze how our site is used."},typesTitle:"What cookies do we use?",necessary:{title:"Necessary Cookies",description:"These cookies are required for the website to function properly and cannot be disabled.",purpose:"Authentication, security, user preferences",storage:"Session or up to 12 months",examples:"authentication token, cookie consent"},analytics:{title:"Analytics Cookies",description:"Help us understand how users interact with our website.",provider:"Google Analytics (GA4)",purpose:"Visit statistics, traffic sources, user behavior",storage:"Up to 14 months",cookies:"_ga, _ga_*, _gid"},marketing:{title:"Marketing Cookies",description:"Used for ad personalization and remarketing.",providers:"Google Ads, Facebook",purpose:"Ad targeting, conversion measurement",storage:"Up to 90 days",cookies:"_gcl_*, fr, _fbp"},labels:{purpose:"Purpose:",storage:"Storage duration:",examples:"Examples:",provider:"Provider:",providers:"Providers:",cookies:"Cookies:"},management:{title:"How to manage cookies?",description:'You can change your cookie preferences at any time by clicking the "Change cookie settings" button above. Note that disabling some cookie categories may affect site functionality.'},thirdParty:{title:"Third-party cookies",description:"Some cookies come from third-party providers (Google, Facebook). We have no control over these cookies. We recommend reviewing these providers' privacy policies:",googlePrivacy:"Google Privacy Policy",facebookPrivacy:"Facebook Privacy Policy"},contact:{title:"Contact",description:"If you have questions about our cookie policy, contact us at:"},withdraw:{title:"Withdraw All Consents",description:"You can withdraw all cookie consents at any time. This will delete all saved preferences and show the cookie banner again.",button:"Withdraw all consents",confirm:"Are you sure you want to withdraw all cookie consents?"}},DY={notFound:OY,deposit:RY,resetPassword:LY,cookies:MY},FY={meta:{title:"Blog - Smart-Copy.AI | Articles on Copywriting and AI",description:"Read the latest articles on copywriting, content marketing, and using artificial intelligence to create content.",keywords:"copywriting blog, AI articles, content marketing, writing"},hero:{title:"Smart-Copy.AI Blog",subtitle:"Discover best practices in copywriting, content marketing, and using AI to create content that sells."},readMore:"Read more",featured:{latest:"Latest article",alsoNew:"Worth reading"},sections:{morePosts:"More articles",olderPosts:"Older articles"},pagination:{previous:"Previous",next:"Next",label:"Blog pages navigation",page:"Page",pageOf:"Page {page} of {total}",metaTitle:"Smart-Copy.AI Blog – page {page} of {total} | Articles on Copywriting and AI",metaDescription:"Page {page} of {total} of the blog archive. {description}"}
754,empty:{title:"No Articles",description:"New articles will appear here soon"}},BY={notFound:{title:"Article Not Found",backToBlog:"Back to Blog"},backToBlog:"Back to Blog",views:"views",share:{title:"Share this article"},relatedTools:{title:"Try Smart-Copy.ai",subtitle:"Generate ready-to-publish, researched AI content — pay per character, no subscription.",seoWriter:"AI SEO Writer",seoWriterDesc:"SEO articles and content with research and heading structure",copywriter:"AI Copywriter",copywriterDesc:"Sales copy, articles and content marketing",productDescriptions:"Product Description Generator",productDescriptionsDesc:"Hundreds of product descriptions for e-commerce and SEO",cta:"Create a free account"},sidebar:{recentPosts:"Recent Articles",noPosts:"No articles",newsletter:{title:"Newsletter",description:"Get the latest articles delivered to your inbox!",placeholder:"Your email",submit:"Subscribe"}},relatedPosts:{title:"Related articles"}},$Y={list:FY,post:BY},UY={title:"Welcome back!",subtitle:"Sign in to your account",or:"or",email:{label:"Email address",placeholder:"[email protected]",error:"Invalid email address",required:"Email is required"},password:{label:"Password",placeholder:"••••••••",required:"Password is required",forgot:"Forgot password?"},submit:"Sign in",submitting:"Signing in...",success:"Signed in successfully!",noAccount:"Don't have an account?",register:"Sign up",recaptcha:{protected:"This site is protected by reCAPTCHA and the Google",privacy:"Privacy Policy",and:"and",terms:"Terms of Service"}},WY={title:"Create an account",subtitle:"Generate valuable content with AI",or:"or",firstName:{label:"First name (optional)",placeholder:"John"},lastName:{label:"Last name (optional)",placeholder:"Doe"},email:{label:"Email address",placeholder:"[email protected]",error:"Invalid email address",required:"Email is required"},password:{label:"Password",placeholder:"••••••••",minLength:"Password must be at least 8 characters",uppercase:"Password must contain an uppercase letter",lowercase:"Password must contain a lowercase letter",number:"Password must contain a number"},confirmPassword:{label:"Confirm password",placeholder:"••••••••",required:"Please confirm your password",mismatch:"Passwords do not match"},passwordStrength:{minLength:"Minimum 8 characters",uppercase:"Uppercase letter",lowercase:"Lowercase letter",number:"Number"},terms:{accept:"I accept the",termsLink:"terms of service",and:"and",privacyLink:"privacy policy",required:"You must accept the terms"},submit:"Create account",submitting:"Creating account...",success:"Account created successfully!",googleSuccess:"Google registration successful!",hasAccount:"Already have an account?",login:"Sign in",recaptcha:{protected:"This site is protected by reCAPTCHA and the Google",privacy:"Privacy Policy",and:"and",terms:"Terms of Service"}},VY={title:"Check your inbox",subtitle:"We sent a verification code to:",code:{label:"Verification code",placeholder:"000000",error:"Code must be 6 digits"},submit:"Verify email",submitting:"Verifying...",success:"Email verified successfully!",resend:{question:"Didn't receive the code?",button:"Resend code",sending:"Sending...",countdown:"Resend ({{time}})",success:"New verification code sent!"},backToRegister:"Back to registration",noEmail:"Missing email information. Please start registration again."},HY={title:"Forgot password?",subtitle:"Don't worry, we'll send you a reset link",email:{label:"Email address",placeholder:"[email protected]",error:"Invalid email address",required:"Email is required"},submit:"Send reset link",submitting:"Sending...",success:"Password reset link sent!",backToLogin:"Back to login",sent:{title:"Check your inbox",subtitle:"We sent a password reset link to:",info:"The link is valid for 1 hour. If you didn't receive the email, check your spam folder.",backToLogin:"Back to login"}},qY={title:"Set new password",subtitle:"Enter a new, strong password for your account",password:{label:"New password",placeholder:"••••••••",minLength:"Password must be at least 8 characters",uppercase:"Password must contain an uppercase letter",lowercase:"Password must contain a lowercase letter",number:"Password must contain a number"},confirmPassword:{label:"Confirm password",placeholder:"••••••••",required:"Please confirm your password",mismatch:"Passwords do not match"},passwordStrength:{minLength:"Minimum 8 characters",uppercase:"Uppercase letter",lowercase:"Lowercase letter",number:"Number"},submit:"Reset password",submitting:"Resetting...",success:"Password changed successfully!",invali
754dToken:"Invalid or missing password reset token"},KY={title:"Account settings",password:"Change password",passwordHint:"The new password takes effect immediately. Sessions open on other devices stay active until they expire.",current:"Current password",new:"New password",repeat:"Repeat new password",rules:"At least 8 characters, including an uppercase letter and a digit.",mismatch:"The passwords do not match.",submit:"Change password",changed:"Password changed.",failed:"Could not change the password.",appearance:"Appearance",appearanceHint:"The setting is remembered in this browser.",toDark:"Switch to dark mode",toLight:"Switch to light mode",deleteTitle:"Delete account",deleteWhat:"We delete the account, every text and order, description batches, content plans, connected WordPress sites, saved shop connections and API keys. This cannot be undone, and any remaining balance is forfeited.",deleteKept:"We keep only billing records (amounts and payment dates), stripped of personal data — tax law requires it and our privacy policy says so.",deleteStart:"I want to delete my account",deleteWarning:"Type {{email}} below to confirm. You will be signed out immediately.",deleteConfirm:"Delete account permanently",cancel:"Cancel",deleted:"The account and its data have been deleted.",deleteFailed:"Could not delete the account."},GY={login:{badge:"Research, writing and publishing in one",headlineA:"Back to where the writing",headlineB:"happens on its own.",lead:"Sign in to see what is waiting in your dashboard — ordered texts, balance and scheduled autoblog series.",p1t:"Your texts and order history",p1d:"All in one place, with live progress on every generation",p2t:"Autoblog series under control",p2d:"Pause and resume with a single click",p3t:"Balance and invoices",p3d:"Pay per character — no subscription, no expiring credits"},register:{badge:"Creating an account takes 30 seconds",headlineA:"Other AI just writes.",headlineB:"This one reads first.",lead:"Smart-Copy searches the web for sources, pulls the full pages and only then writes — with headings, a featured image and publishing straight to your site.",p1t:"Research from sources, not from memory",p1d:"Searches Google, fetches whole pages and picks the best — no snippet summarising",p2t:"Texts that do not stop mid-sentence",p2d:"A multi-writer architecture handles material running to dozens of pages",p3t:"Straight into WordPress",p3d:"The plugin publishes the finished text with its image — now, as a draft or on a date"}},ZY={login:UY,register:WY,verify:VY,forgotPassword:HY,resetPassword:qY,settings:KY,panel:GY},YY={banner:{title:"We use cookies",description:"This website uses cookies to improve your browsing experience and analyze traffic. You can manage your cookie preferences at any time.",learnMore:"Learn more",settings:"Settings",rejectAll:"Reject all",acceptAll:"Accept all"},settings:{title:"Privacy settings",necessary:{title:"Necessary cookies",description:"These cookies are required for the website to function properly. They cannot be disabled.",badge:"Always active"},analytics:{title:"Analytics cookies",description:"Help us understand how visitors use our website (Google Analytics).",providers:"Providers: Google Analytics"},marketing:{title:"Marketing cookies",description:"Used for ad targeting and remarketing.",providers:"Providers: Google Ads, Facebook Pixel"},rejectAll:"Reject all",save:"Save settings"}},JY={textTypes:{ARTICLE:"Article",REPORT:"Report",COMPANY_TEXT:"Company text",ANALYSIS:"Analysis",BLOG_POST:"Blog post",PRODUCT_DESCRIPTION:"Product description",CATEGORY_DESCRIPTION:"Category description",OTHER:"Other - enter custom",SOCIAL_MEDIA:"Social media post",EMAIL_MARKETING:"Marketing email"},languages:{pl:"Polish",en:"English",de:"German",es:"Spanish",fr:"French",it:"Italian",pt:"Portuguese",uk:"Ukrainian",ru:"Russian"}},XY={dashboard:"Dashboard",footer:{contact:"Contact",app:"Android app"},contact:{title:"Contact support",email:"Your email",emailPlaceholder:"[email protected]",message:"Message",messagePlaceholder:"Describe your issue or question...",cancel:"Cancel",send:"Send",sending:"Sending...",success:"Message sent!",error:"Failed to send. Please try again."},orderText:"Order Text",yourOrders:"Your Orders",balance:{label:"Account Balance",topUp:"Top Up"},theme:{dark:"Dark Mode",light:"Light Mode"},user:{defaultName:"User",logout:"Log out"},autoblog:"Autoblog",developers:"API",bulk:"Product descriptions",settings:"Settings",integrations:"Integrations"},QY={home:"Home",dashboard:"Dashboard",orders:"Orders",order:"Order",new:"New Order",deposit:"Top Up",login:"Login",register:"Register","forgot-password":"Reset Password",verify:"Verification","ai-copywriter":"AI Copywriter","ai-product-descriptions":"AI Product Descriptions",blog:"Blog",privacy:"Privacy Policy",terms:"Terms of Service",cookies:"Cookie Policy"},eJ={initializing:{title:"Preparing AI generator...",tips:["🤖 Initializing Claude Sonnet 4.6 model...","🔍 Preparing search engine...","📚 Loading AI knowledge base...","⚡ Optimizing generation parameters...","🎯 Analyzing content structure...","🌍 Configuring multilingual model...","💡 Preparing creative algorithms...","🚀 Starting generation process...","✨ Warming up AI neurons...","🔬 Calibrating quality parameters..."],characters:"characters",startingSoon:"Starting soon..."},stages:{query:"Creating search queries",search:"Searching sources",scraping:"Fetching source content",selecting:"Selecting best sources",outline:"Building the outline",writing:"Writing sections",image:"Generating featured image"},inProgress:"Generation progress",finalizing:"Finalizing...",finalizingGeneration:"Finalizing generation...",completed:{ready:"🎉 Your text is ready!",success:"Generation completed successfully ✨",title:"✅ Text completed!",availableAfter:"Will be available after the entire order is finished"},info:{text:"Text:",characters:"characters",estimatedTime:"Estimated time:"},time:{seconds:"sec.",minutes:"min.",hours:"hrs."}},tJ="Back to dashboard",rJ={cookieConsent:YY,orderTypes:JY,sidebar:XY,breadcrumbs:QY,progress:eJ,backToDashboard:tJ},nJ="Autoblog",sJ="An article series for your site: we plan a topic cluster, write at your pace and publish straight to WordPress.",iJ={button:"New series",title:"New content series",nicheLabel:"Describe your site and topics",nichePlaceholder:"E.g. a coffee gear store — we want traffic from brewing guides, equipment reviews and bean-buying advice. Audience: home baristas...",nameLabel:"Series n
754ame (optional)",siteLabel:"Publish to WordPress site",noSite:"— don't auto-publish (panel only) —",freqLabel:"Texts per week",lengthLabel:"Text length (characters)",typeLabel:"Text type",statusLabel:"WP publication",statusPublish:"publish immediately",statusDraft:"as drafts",submit:"Plan the series",submitting:"Planning the topic cluster...",created:"Series created! The topic cluster is being generated — the first text starts shortly.",priceNote:"Billed from balance: {{price}} per text. You can pause anytime.",imagesLabel:"Featured images for articles (AI)",imagesHint:"FLUX 1.1 Pro Ultra, included — also set as the WordPress featured image."},aJ={statusPlanning:"planning cluster...",statusActive:"active",statusPaused:"paused",statusCompleted:"completed",statusFailed:"planning failed",progress:"Progress",pause:"Pause",resume:"Resume",runNow:"Generate next now",delete:"Delete series",deleteConfirm:"Delete this series? Generated texts stay in your orders.",itemStatus:{planned:"planned",generating:"generating",completed:"ready",published:"published",failed:"failed"},generateNow:"Generate now"},oJ={paused:"Series paused",resumed:"Series resumed",runStarted:"Next text generation started",deleted:"Series deleted",error:"Something went wrong"},lJ={title:"Auto top-up",subtitle:"When your balance can't cover the next text in a series, we top it up automatically from your saved card — the series never stops.",enabled:"enabled",disabled:"disabled",amountLabel:"Top-up amount",cardLabel:"Card",noCard:"no saved card",changeCard:"Change card",enable:"Enable auto top-up",disable:"Disable",consent:"By enabling, you consent to automatic charges to your saved card for the selected amount whenever your balance can't cover the next text of an active series. You can withdraw consent anytime with the same toggle.",cardSaved:"Card saved — auto top-up enabled! 💳",cardCancelled:"Card setup cancelled",redirecting:"Redirecting to the secure card form...",saved:"Settings saved"},cJ={week:"wk",pages:"pages",chars:"chars"},uJ={edit:"Edit topic",save:"Save",cancel:"Cancel",delete:"Delete topic",saved:"Topic saved",deleted:"Topic deleted",dragHint:"Drag to reorder"},dJ={name:"Series name",wpStatus:"WP publishing",wpPublish:"immediately",wpDraft:"drafts",save:"Save changes",saved:"Series settings saved"},hJ={title:"No series yet",description:"Describe your site in one paragraph and we will plan a cluster of 20 topics. You will see all of it before the first text is written."},pJ={title:nJ,subtitle:sJ,create:iJ,plan:aJ,toast:oJ,topup:lJ,unit:cJ,items:uJ,settings:dJ,empty:hJ},fJ="Bulk product descriptions",mJ="Load your catalogue, point at the columns and collect finished descriptions. You pay per product, not per month.",gJ={upload:"CSV file",feed:"Product feed",baselinker:"Baselinker",shoper:"Shoper",idosell:"IdoSell"},yJ={upload:"An export from your shop admin. Every major platform has one — and takes an import back.",feed:"The feed URL your shop already publishes for advertising.",baselinker:"Products straight from Baselinker, with descriptions written back.",shoper:"The catalogue straight from your Shoper shop, with write-back.",idosell:"The catalogue straight from your IdoSell shop, with write-back."},xJ="All sources",wJ="Read the columns",bJ="Found {{n}} products and {{k}} fields. Tell us which is which.",kJ="Baselinker API token (My account → API)",vJ="Load catalogues",jJ="— pick a catalogue —",SJ={topic:"Product name",topicHint:"The description is written from this.",externalId:"Identifier (SKU)",externalIdHint:"We use it to return the finished description. Required for recurring runs.",skipIfFilled:"Existing description column",skipIfFilledHint:"Products with content here are skipped — you never pay twice.",guidelines:"Attributes for the brief",guidelinesHint:"Hold Ctrl to select several. The more specifics, the better the description.",images:"Image column",imagesHint:"URL of the product photo. The generator LOOKS at it and writes about what it sees — shape, material, finish, visible markings. None of that lives in any text field, so a de
754scription written with a photo is markedly more concrete. Shop catalogues fill this in automatically.",url:"Product page link",urlHint:"Column with the link to the product in your shop. It is not sent to the generator — it is there so you can click a product in the list and see what the description is about."},NJ={length:"Description length",chars:"characters",language:"Language",interval:"Repeat",once:"once",daily:"daily",weekly:"weekly",guidelinesPlaceholder:"Guidelines for the whole batch — tone, target customer, what to avoid.",lengthHint:"Target length of each description. You pay per character, so 2,000 characters costs twice as much as 1,000 — across a large catalogue that adds up.",languageHint:"The language the descriptions are written in. It need not match the panel language — you can browse in English and order Polish copy.",intervalHint:"Whether the batch refreshes itself. On “daily” or “weekly” we check the catalogue at that interval and write descriptions only for products added since the last run that still have none. Nothing is ever written twice."},CJ="Calculate the cost",EJ={toGenerate:"to write",skipped:"skipped",discount:"discount",total:"total",lowBalance:"Your balance ({{balance}}) does not cover the whole batch. You can still start — descriptions are written one by one, and if funds run out the batch waits instead of failing.",previewNote:"A sample of {{n}} out of {{total}} items, the ones to be written shown first. The batch covers all of them.",removeRow:"Drop from the batch",restoreRow:"Put back in the batch",excludedNote:"You dropped {{n}} items — they stay in the batch as skipped and can be put back.",howMany:"How many to take now",howManyAll:"all of them ({{n}})",howManyFirst:"first {{n}}",howManyHint:"The rest is not lost — it waits on hold with the batch and you pull it in with “Add more”, without walking through the wizard again. You only pay for what actually gets written.",whySkipped:"Why {{n}} items will be skipped"},TJ={already_described:"has a description",duplicate_id:"duplicate",no_topic:"no name",excluded:"dropped",deferred:"on hold"},AJ="Prepare the list",zJ="Each description is charged separately as it is written — never upfront for the whole batch.",PJ="Batch created",_J="Your batches",IJ="No batches yet.",OJ="Start",RJ="Resume",LJ="Pause",MJ="Refresh source",DJ="Download descriptions (CSV)",FJ="{{done}} of {{total}} done",BJ="every {{n}} h",$J="charged {{amount}}",UJ={draft:"draft",ready:"ready to start",running:"running",paused:"paused",done:"finished",failed:"error",writing:"writing descriptions"},WJ="Ordered {{n}} descriptions",VJ="Out of funds — batch paused. Top up and resume.",HJ="Batch paused",qJ="Source refreshed",KJ="Batch deleted",GJ={generic:"Something went wrong",nothingReady:"No description is finished yet — there is nothing to download."},ZJ={save:"Remember this connection so you don't paste the token every time",remove:"Remove saved connection"},YJ="{{failed}} failed",JJ="{{skipped}} skipped",XJ="List ready — nothing has been written yet",QJ="We saved your settings: column mapping, lengths and anything you dropped. Nothing has left your balance. Expand the list below to adjust it — only “Run” starts the writing and charges you, product by product.",eX="Set up another source",tX={toggle:"Items ({{n}})",search:"Search by product name — press Enter",all:"all",pending:"to write",skipped:"skipped",completed:"done",failed:"failed",ordered:"in progress",colId:"Identifier",colTopic:"Product",colState:"State",selectAll:"Select all on this page",removeSelected:"Remove selected ({{n}})",removed:"Items removed: {{n}}",pauseFirst:"Pause the batch first",loading:"Loading items…",none:"No items match.",page:"Page {{n}} of {{of}} · {{total}} items",prev:"Back",next:"Next",excludeSelected:"Drop selected ({{n}})",restoreSelected:"Restore selected ({{n}})",excluded:"Items dropped: {{n}}",restored:"Items restored: {{n}}",excludedFilter:"dropped by hand",deferredFilter:"on hold",setLength:"Change length ({{n}})…",chars:"characters",colLength:"Characters",lengthChanged:"Length of {{n}} items set to {{length}} characters.",count:"{{total}} items"},rX="How many items to write in this run",nX="next {{n}}",sX="Add more",iX="Waiting on hold: {{n}}",aX="Added {{n}} items. Still on hold: {{left}}.",oX="{{deferred}} on hold",lX={already_described:"already have text in the column you mapped as the existing description — you won't pay for them twice",duplicate_id:"have an identifier repeated in the source — we write it once",no_topic:"have no product name, so there is nothing to write from",excluded:"you dropped by hand (you can put them back)",deferred:"held for later — pull them in with “Add more”",
754invalid_item:"have incomplete data and cannot be ordered",other:"skipped for another reason",writeback_failed:"written, but could not be sent back to the catalogue"},cX="Download finished descriptions as CSV",uX="Download finished descriptions as JSON",dX="Write finished descriptions back into the Baselinker catalogue",hX="Each description returns to its product as soon as it is written, matched by identifier. Only the description field changes — prices, stock and variants are untouched. Without this you download the results as CSV or JSON.",pX="Description format in the catalogue",fX="HTML keeps headings, lists and the spec table — good for your own shop. Plain text strips every tag, the way Base's own generator writes; safer when the description travels on to marketplaces with limited HTML support. Either way the top heading is demoted, because the product page already has one.",mX="HTML (headings, lists, table)",gX="plain text",yX={title:"Connected catalogues",notConfigured:"Connection saved, but no batch is set up yet.",configure:"Set up",reconfigure:"Change settings",writesBack:"descriptions written back",exportOnly:"no write-back",refreshHint:"Check the catalogue and add products that appeared since the last run",remaining:"{{amount}} left"},xX={domainPlaceholder:"yourshop.com",tokenPlaceholder:"API token from the shop",login:"Admin account login",password:"Password",check:"Check the connection",useLogin:"I have a login and password instead of a token",useToken:"I have an API token",connected:"Connected. Products in the shop: {{n}}.",where:"The token or API account lives in the shop panel: Configuration → Advanced settings → API access. Shoper issues one of two variants depending on the installation — if the token does not work, try the login and password."},wX="Write finished descriptions back into the shop",bX="Each description returns to its product as soon as it is written, matched by identifier, and lands in EXACTLY the field you picked above as the existing description. Prices, stock and other data are untouched. Without this you download the results as CSV or JSON.",kX={domainPlaceholder:"yourshop.iai-shop.com",keyPlaceholder:"API key from the shop",connected:"Connected. Products in the shop: {{n}}.",where:"The API key is created in the shop panel, in the developer section. The domain is the same address you use to log into the panel — without https:// and without /panel/. Descriptions land in the product's long description, the body of the product page."},vX="Shop catalogue",jX="Baselinker, Shoper, IdoSell or a product feed. You connect it once in Integrations, then the catalogue waits here.",SX="We set the columns the way you did last time for this file.",NX={title:fJ,subtitle:mJ,sources:gJ,sourceHints:yJ,changeSource:xJ,readColumns:wJ,foundRows:bJ,blTokenPlaceholder:kJ,blLoad:vJ,blPickInventory:jJ,mapping:SJ,defaults:NJ,calculate:CJ,est:EJ,skip:TJ,create:AJ,chargeNote:zJ,created:PJ,jobs:_J,empty:IJ,run:OJ,resume:RJ,pause:LJ,refresh:MJ,download:DJ,delete:"Delete batch",progress:FJ,everyHours:BJ,charged:$J,status:UJ,started:WJ,paused:VJ,pausedOk:HJ,refreshed:qJ,deleted:KJ,errors:GJ,connections:ZJ,progressFailed:YJ,progressSkipped:JJ,createdTitle:XJ,createdHint:QJ,createAnother:eX,items:tX,runHowMany:rX,runNext:nX,extend:sX,extendHint:iX,extended:aX,progressDeferred:oX,skipWhy:lX,downloadCsv:cX,downloadJson:uX,writeBack:dX,writeBackHint:hX,writeBackFormat:pX,writeBackFormatHint:fX,formatHtml:mX,formatText:gX,bl:yX,sh:xX,writeBackShoper:wX,writeBackShoperHint:bX,id:kX,connectShop:vX,connectShopHint:jX,mappingRemembered:SX},CX="API & integrations",EX="API keys, webhooks and applications connected to your account.",TX={title:"API keys",hint:"A personal key grants full API access on behalf of your account (orders are billed from your balance). Treat it like a password.",empty:"You don't have any keys yet.",create:"Create key",creating:"Creating...",namePlaceholder:"Key name (e.g. My shop integration)",createdTitle:"Key created — copy it now",createdHint:"For security we show it only once. We store only a hash.",copy:"Copy",copied:"Copied to clipboard",done:"I saved the key",lastUsed:"last used {{ago}}",neverUsed:"never used",revoke:"Revoke",revokeTitle:"Revoke this key?",revokeBody:'Integrations using "{{name}}" will immediately lose access. This cannot be undone.',revokeConfirm:"Revoke key",revoked:"Key revoked",webhook:"Webhook",webhookPlaceholder:"https://your-app.com/webhooks/smart-copy",webhookHint:"We'll POST on text.completed / text.failed / outline.ready events, signed with the X-SmartCopy-Signature header (HMAC-SHA256 of the secret below).",webhookSave:"Save webhook",webhookSaved:"Webhook saved",webhookSecret:"Signing secret",docsLink:"Full API documentation: https://www.smart-copy.ai/d
754ocs/api — base URL: https://www.smart-copy.ai/api/v1",testLabel:"Test key (sc_test_)",testHint:"Same validations and response shapes, but orders are simulated — zero cost. Perfect for building integrations."},AX={title:"API console",hint:"Pick a key and build requests by clicking — with a live JSON preview, ready-to-paste code and live responses. These are the exact calls any integration makes.",balanceBtn:"GET /balance — balance",wpSitesBtn:"GET /wp-sites — sites",topicPlaceholder:"Text topic (e.g. How heat pumps work)",lengthLabel:"Length (characters, 500–30000)",typeLabel:"Text type",langLabel:"Language",imageLabel:"Featured image (AI)",outlineLabel:"Outline approval before writing",sourceModeLabel:"Research sources",sourceModes:{auto:"auto (model decides)",web:"web only",academic:"academic only (Cytado)",hybrid:"web + academic"},sourceUrlsPlaceholder:"Your source URLs (one per line, max 10) — optional",keywordsPlaceholder:"SEO keywords, comma separated (max 10) — optional",linksPlaceholder:"SEO links: url | anchor (one per line, max 5) — optional",guidelinesPlaceholder:"Guidelines: tone, audience, what to cover — optional",wpLabel:"Publish to WordPress",wpNone:"don't publish",wpDraft:"draft",wpPublish:"immediately",wpFuture:"schedule",types:{ARTICLE:"Expert article",REPORT:"Report",COMPANY_TEXT:"Company copy",ANALYSIS:"Analysis",BLOG_POST:"Blog post",SOCIAL_MEDIA:"Social media post",EMAIL_MARKETING:"Marketing email",PRODUCT_DESCRIPTION:"Product description",OTHER:"Other"},addText:"Add text to request",basketTitle:"Request ({{n}}/10 texts)",basketEmpty:"Add at least one text — the request JSON will appear below.",remove:"remove",total:"Total",sendBtn:"Send POST /v1/texts",orderConfirmTitle:"Place a real paid order?",orderConfirmBody:"This is a REAL API order — {{price}} will be deducted for {{n}} text(s).",orderConfirmYes:"Yes, order it",responseLabel:"Response",requestLabel:"Request",requestPreview:"Request body preview",statusOrdered:`Ordered! You'll find the texts in "Your orders".`,checkStatusBtn:"GET /texts/{id} — status",keySelectLabel:"Key",keySelectNone:"Create a key in the section above first — the console runs calls with the selected key.",testBadge:"TEST",snippetsTitle:"The same request in code",snippetsHint:"Ready to paste — replace YOUR_API_KEY with your key.",statusOrderedTest:"Test-key simulation — nothing was charged or generated."},zX={title:"Your OAuth applications",hint:"Build integrations that connect to Smart-Copy user accounts via OAuth 2.0 (consent screen + tokens).",empty:"You haven't registered any application yet.",create:"Register application",namePlaceholder:"Application name (shown on the consent screen)",typePublic:"Public (PKCE)",typeConfidential:"Confidential (with secret)",typeHint:"Public: apps without a secure backend (SPA, plugins) — PKCE required. Confidential: a server holding a client secret.",redirectPlaceholder:"https://your-app.com/callback (one URL per line, max 5)",createdTitle:"Ap
754plication registered",createdSecretHint:"We show the client secret only once — store it safely.",clientId:"Client ID",clientSecret:"Client secret",authorizeUrl:"Authorization URL",redirects:"Redirect URIs",save:"Save",saved:"Saved",deleteTitle:"Delete this application?",deleteBody:'"{{name}}" will lose access and all tokens issued to it will be revoked.',deleteConfirm:"Delete application",deleted:"Application deleted"},PX={title:"Connected applications",hint:"Applications granted access to your account via OAuth.",empty:"No application has access to your account.",grantedAt:"connected {{date}}",revoke:"Disconnect",revokeTitle:"Disconnect this application?",revokeBody:'"{{name}}" will lose access to your account. You can reconnect it anytime.',revokeConfirm:"Disconnect app",revoked:"Application disconnected",scopes:"Permissions",zapierHint:"Smart-Copy is in the Zapier directory — see how to connect it"},_X={"texts:read":"Read texts and generation status","texts:write":"Order texts (billed from your balance)","balance:read":"Read account balance","wp:read":"List connected WordPress sites"},IX={title:"{{app}} is requesting access to your Smart-Copy account",willBeAble:"The application will be able to:",billing:"Orders placed by this application are billed from your account balance.",allow:"Allow",deny:"Deny",loading:"Loading...",invalid:"Invalid authorization request ({{reason}}). Go back to the application that sent you here.",redirecting:"Redirecting you back to the application..."},OX={title:"API call history",hint:"Every call made with your keys — with response code, cost and duration.",empty:"No calls yet — use the console above or your key in an integration.",when:"When",request:"Request",status:"Status",cost:"Cost",duration:"Duration",prev:"Previous",next:"Next",pageOf:"Page {{page}} of {{pages}}"},RX={title:"API Documentation",desc:"Quick start, full endpoint reference, webhooks and OAuth 2.0 — all with cURL, Node.js, Python and PHP examples.",cta:"Open the docs",base:"Base URL:"},LX={title:"WordPress sites",hint:"Sites connected to your account. The same integrations are used in the order form, in autoblogging and through the API.",loading:"Loading sites...",empty:"No WordPress site connected yet. Connect it once — you will use it everywhere.",add:"Connect a site",manage:"Manage",remove:"Remove site",close:"Close",cancel:"Cancel",viaPlugin:"plugin",viaAppPassword:"app password"},MX="Cancel",DX="WordPress sites and the applications you granted access to have moved to Integrations.",FX="Go to Integrations",BX={title:CX,subtitle:EX,keys:TX,playground:AX,clients:zX,apps:PX,scopes:_X,consent:IX,history:OX,docsBox:RX,wpSites:LX,cancel:MX,movedToIntegrations:DX,goToIntegrations:FX},$X="Integrations",UX="Everything connected to your account: shop catalogues, WordPress sites and the applications you have granted access to.",WX={title:"Shop catalogues",hint:"Connect a shop once. You order descriptions later, in the product descriptions section — that is where you watch progress and add more.",empty:"You haven't connected a catalogue yet.",connect:"Connect",cancel:"Cancel",connected:"Connection saved.",connectedWith:"Connection saved. Products in the catalogue: {{n}}.",failed:"Could not connect.",disconnect:"Disconnect the catalogue",goToWork:"Work on it",afterConnect:"Once connected, the catalogue shows up in the product descriptions section — that is where you pick the columns and order descriptions."},VX={title:"Google Docs",hint:"Connect your Google account once and every finished text gets a “Save to Google Docs” button. Documents go to a “Smart-Copy” folder on your Drive.",empty:"No Google account connected.",connect:"Connect Google account",connected:"Google account connected.",connectedGeneric:"Google account connected",disconnect:"Disconnect",disconnected:"Google account disconnected.",failed:"Could not connect to Google.",folderNote:"Documents are saved to a “Smart-Copy” folder on your Drive.",scopeNote:"We only ask for access to files we create ourselves. The rest of your Drive stays invisible to us."},HX={title:$X,subtitle:UX,shops:WX,googleDocs:VX},qX={pl:{common:GV,home:vH,"ai-copywriter":_H,"ai-product-descriptions":VH,"ai-seo-writer":rq,dashboard:lq,"order-form":aH,orders:yq,"order-detail":_q,pages:Mq,blog:Bq,auth:Gq,components:tK,autoblog:hK,bulk:SG,developers:FG,integrations:VG},en:{common:GG,home:vZ,"ai-copywriter":_Z,"ai-product-descriptions":VZ,"ai-seo-writer":rY,dashboard:lY,"order-form":aZ,orders:xY,"order-detail":IY,pages:DY,blog:$Y,auth:ZY,components:rJ,autoblog:pJ,bulk:NX,developers:BX,integrations:HX}},KX=()=>{try{const t=localStorage.getItem("smart-copy-lang");if(t==="pl"||t==="en")return t}catch{}try{const t=document.referrer;if(t){const e=new URL(t);if(e.hostname===window.location.hostname&&(e.pathname==="/pl"||e.pathname.startsWith("/pl/")))return"pl"}}catch{}return"en"},GX=KX();Xt.use(hV).init({resources:qX,lng:GX,fallbackLng:"pl",ns:["common","home","ai-copywriter","ai-product-descriptions","ai-seo-writer","dashboard","orders","order-detail","pages","order-form","blog","auth","components","autoblog","developers","integrations"],defaultNS:"common",interpolation:{escapeValue:!1},debug:!1});const ZX="https://www.smart-copy.ai";function vu(t){var r;const e=(r=Xt.language)==null?void 0:r.startsWith("pl");return`${ZX}${e?"/pl":""}/${t}`}const YX=()=>{const{t}=He("components"),{showBanner:e,consent:r,saveConsent:n,acceptAll:s,rejectAll:i}=LI(),[a,l]=M.useState(!1),[c,u]=M.useState(r);if(!e)return null;const d=()=>{n(c)};return o.jsxs(o.Fragment,{children:[a&&o.jsx("div",{className:"fixed inset-0 bg-black/50 z-[9998]",onClick:()=>l(!1)}),o.jsx("div",{className:"fixed bottom-0 left-0 right-0 z-[9999] bg-white dark:bg-gray-800 border-t border-slate-200 dark:border-gray-700 shadow-2xl",children:o.jsx("div",{className:"max-w-7xl mx-auto px-4 py-6",children:a?o.jsxs("div",{className:"max-w-3xl mx-auto",children:[o.jsxs("div",{className:"flex items-center justify-between mb-6",children:[o.jsx("h3",{className:"text-xl font-bold text-slate-900 dark:text-white",children:t("cookieConsent.settings.title")}),o.jsx("button",{onClick:()=>
754l(!1),className:"text-slate-400 hover:text-slate-600 dark:hover:text-gray-300",children:o.jsx(yt,{className:"w-6 h-6"})})]}),o.jsxs("div",{className:"space-y-4 mb-6",children:[o.jsx("div",{className:"p-4 bg-slate-50 dark:bg-gray-700 rounded-lg border border-slate-200 dark:border-gray-600",children:o.jsxs("div",{className:"flex items-start justify-between",children:[o.jsxs("div",{className:"flex items-start gap-3 flex-1",children:[o.jsx(YI,{className:"w-5 h-5 text-green-600 dark:text-green-400 mt-0.5"}),o.jsxs("div",{children:[o.jsx("h4",{className:"font-semibold text-slate-900 dark:text-white mb-1",children:t("cookieConsent.settings.necessary.title")}),o.jsx("p",{className:"text-sm text-slate-600 dark:text-gray-300",children:t("cookieConsent.settings.necessary.description")})]})]}),o.jsx("div",{className:"flex items-center",children:o.jsx("span",{className:"text-xs font-medium text-green-600 dark:text-green-400 bg-green-100 dark:bg-green-900/30 px-3 py-1 rounded-full",children:t("cookieConsent.settings.necessary.badge")})})]})}),o.jsx("div",{className:"p-4 bg-white dark:bg-gray-800 rounded-lg border border-slate-200 dark:border-gray-600",children:o.jsxs("div",{className:"flex items-start justify-between",children:[o.jsxs("div",{className:"flex items-start gap-3 flex-1",children:[o.jsx(Ny,{className:"w-5 h-5 text-blue-600 dark:text-blue-400 mt-0.5"}),o.jsxs("div",{children:[o.jsx("h4",{className:"font-semibold text-slate-900 dark:text-white mb-1",children:t("cookieConsent.settings.analytics.title")}),o.jsx("p",{className:"text-sm text-slate-600 dark:text-gray-300 mb-2",children:t("cookieConsent.settings.analytics.description")}),o.jsx("p",{className:"text-xs text-slate-500 dark:text-gray-400",children:t("cookieConsent.settings.analytics.providers")})]})]}),o.jsxs("label",{className:"relative inline-flex items-center cursor-pointer",children:[o.jsx("input",{type:"checkbox",checked:c.analytics,onChange:h=>u({...c,analytics:h.target.checked}),className:"sr-only peer"}),o.jsx("div",{className:"w-11 h-6 bg-slate-200 dark:bg-gray-600 peer-focus:outline-none peer-focus:ring-4 peer-focus:ring-indigo-300 dark:peer-focus:ring-indigo-800 rounded-full peer peer-checked:after:translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-[2px] after:left-[2px] after:bg-white after:border-slate-300 after:border after:rounded-full after:h-5 after:w-5 after:transition-all peer-checked:bg-indigo-600"})]})]})}),o.jsx("div",{className:"p-4 bg-white dark:bg-gray-800 rounded-lg border border-slate-200 dark:border-gray-600",children:o.jsxs("div",{className:"flex items-start justify-between",children:[o.jsxs("div",{className:"flex items-start gap-3 flex-1",children:[o.jsx(_d,{className:"w-5 h-5 text-purple-600 dark:text-purple-400 mt-0.5"}),o.jsxs("div",{children:[o.jsx("h4",{className:"font-semibold text-slate-900 dark:text-white mb-1",children:t("cookieConsent.settings.marketing.title")}),o.jsx("p",{className:"text-sm text-slate-600 dark:text-gray-300 mb-2",children:t("cookieConsent.settings.marketing.description")}),o.jsx("p",{className:"text-xs text-slate-500 dark:text-gray-400",children:t("cookieConsent.settings.marketing.providers")})]})]}),o.jsxs("label",{className:"relative inline-flex items-center cursor-pointer",children:[o.jsx("input",{type:"checkbox",checked:c.marketing,onChange:h=>u({...c,marketing:h.target.checked}),className:"sr-only peer"}),o.jsx("div",{className:"w-11 h-6 bg-slate-200 dark:bg-gray-600 peer-focus:outline-none peer-focus:ring-4 peer-focus:ring-indigo-300 dark:peer-focus:ring-indigo-800 rounded-full peer peer-checked:after:translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-[2px] after:left-[2px] after:bg-white after:border-slate-300 after:border after:rounded-full after:h-5 after:w-5 after:transition-all peer-checked:bg-indigo-600"})]})]})})]}),o.jsxs("div",{className:"flex gap-3",children:[o.jsx("button",{onClick:()=>{u({necessary:!0,analytics:!1,marketing:!1})},className:"flex-1 px-4 py-2 border border-slate-300 dark:border-gray-600 text-slate-700 dark:text-gray-200 rounded-lg hover:bg-slate-50 dark:hover:bg-gray-700 transition-colors font-medium",children:t("cookieConsent.settings.rejectAll")}),o.jsx("button",{onClick:d,className:"flex-1 px-4 py-2 bg-indigo-600 dark:bg-indigo-500 text-white rounded-lg hover:bg-indigo-700 dark:hover:bg-indigo-600 transition-colors font-semibold shadow-lg",children:t("cookieConsent.settings.save")})]})]}):o.jsxs("div",{className:"flex flex-col md:flex-row items-start md:items-center gap-4",children:[o.jsxs("div",{className:"flex items-start gap-3 flex-1",children:[o.jsx(jV,{className:"w-6 h-6 text-indigo-600 dark:text-indigo-400 flex-shrink-0 mt-1"}),o.jsxs("div",{children:[o.jsx("h3",{className:"font-bold text-slate-900 dark:text-white mb-1",children:t("cookieConsent.banner.title")}
754),o.jsxs("p",{className:"text-sm text-slate-600 dark:text-gray-300",children:[t("cookieConsent.banner.description")," ",o.jsx("a",{href:vu("privacy"),target:"_blank",rel:"noopener noreferrer",className:"text-indigo-600 dark:text-indigo-400 hover:underline font-medium",children:t("cookieConsent.banner.learnMore")})]})]})]}),o.jsxs("div",{className:"flex flex-col sm:flex-row gap-3 w-full md:w-auto",children:[o.jsxs("button",{onClick:()=>l(!0),className:"px-4 py-2 border border-slate-300 dark:border-gray-600 text-slate-700 dark:text-gray-200 rounded-lg hover:bg-slate-50 dark:hover:bg-gray-700 transition-colors font-medium text-sm",children:[o.jsx(ZI,{className:"w-4 h-4 inline mr-2"}),t("cookieConsent.banner.settings")]}),o.jsx("button",{onClick:i,className:"px-4 py-2 border border-slate-300 dark:border-gray-600 text-slate-700 dark:text-gray-200 rounded-lg hover:bg-slate-50 dark:hover:bg-gray-700 transition-colors font-medium text-sm",children:t("cookieConsent.banner.rejectAll")}),o.jsx("button",{onClick:s,className:"px-6 py-2 bg-indigo-600 dark:bg-indigo-500 text-white rounded-lg hover:bg-indigo-700 dark:hover:bg-indigo-600 transition-colors font-semibold text-sm shadow-lg",children:t("cookieConsent.banner.acceptAll")})]})]})})})]})},XI=M.createContext(void 0),wv="nbp_usd_rate",JX=24*60*60*1e3,XX=()=>{try{const t=localStorage.getItem(wv);if(!t)return null;const e=JSON.parse(t);return Date.now()-e.timestamp>JX?(localStorage.removeItem(wv),null):e.rate}catch{return null}},QX=t=>{try{const e={rate:t,timestamp:Date.now()};localStorage.setItem(wv,JSON.stringify(e))}catch{}},eQ=async()=>{const t=await fetch("https://api.nbp.pl/api/exchangerates/rates/a/usd/?format=json");if(!t.ok)throw new Error("Failed to fetch exchange rate");return(await t.json()).rates[0].mid},tQ=({children:t})=>{const[e,r]=M.useState(null),[n,s]=M.useState(!0),[i,a]=M.useState(null),{i18n:l}=He(),u=(l.language||"").toLowerCase().startsWith("en")?"USD":"PLN",d=u==="USD"?"$":"zł";M.useEffect(()=>{(async()=>{const m=XX();if(m){r(m),s(!1);return}try{const y=await eQ();r(y),QX(y),a(null)}catch(y){console.error("Failed to fetch USD rate:",y),r(4),a("Using fallback exchange rate")}finally{s(!1)}})()},[]);const h=f=>e?f/e:f/4,p=f=>u==="PLN"?`${f.toFixed(2).replace(".",",")} zł`:`$${h(f).toFixed(2)}`;return o.jsx(XI.Provider,{value:{usdRate:e,isLoading:n,error:i,convertFromPLN:h,formatPrice:p,currency:u,currencySymbol:d},children:t})},bn=()=>{const t=M.useContext(XI);if(!t)throw new Error("useCurrency must be used within a CurrencyProvider");return t},Zt={PER_1000_CHARS:1.99,MIN_TOP_UP:20,ONE_PAGE:3.58,TEN_PAGES:15.9,FIFTY_PAGES:58,CASE_STUDY_COST:23.92,COPYWRITER_MIN:300,COPYWRITER_MAX:800},df=({type:t,data:e})=>{const r={"@context":"https://schema.org","@type":t,...e};return o.jsx(Ys,{children:o.jsx("script",{type:"application/ld+json",children:JSON.stringify(r)})})},rQ=()=>o.jsx(df,{type:"WebSite",data:{name:"Smart-Copy.ai",description:"Generator tekstów AI - profesjonalne tworzenie treści ze sztuczną inteligencją",url:"https://www.smart-copy.ai",potentialAction:{"@type":"SearchAction",target:{"@type":"EntryPoint",urlTemplate:"https://www.smart-copy.ai/blog?q={search_term_string}"},"query-input":"required name=search_term_string"}}}),nQ=()=>o.jsx(df,{type:"Organization",data:{name:"Smart-Copy.ai",legalName:"Smart-Copy.ai",url:"https://www.smart-copy.ai",logo:"https://www.smart-copy.ai/favicon.svg",foundingDate:"2024",founders:[{"@type":"Person",name:"Karol"}],address:{"@type":"PostalAddress",addressLocality:"Toruń",addressRegion:"Kujawsko-Pomorskie",addressCountry:"PL"},contactPoint:{"@type":"ContactPoint",contactType:"customer support",email:"[email protected]"},sameAs:[]}}),sQ=({faqs:t})=>o.jsx(df,{type:"FAQPage",data:{mainEntity:t.map(e=>({"@type":"Question",name:e.question,acceptedAnswer:{"@type":"Answer",text:e.answer}}))}}),iQ=()=>o.jsx(df,{type:"Product",data:{name:"Smart-Copy.ai Generator Tekstów AI",description:"Profesjonalny generator treści AI do tworzenia artykułów, opisów produktów i raportów",brand:{"@type":"Brand",name:"Smart-Copy.ai"},offers:{"@type":"Offer",url:"https://www.smart-copy.ai",priceCurrency:"PLN",price:"1.99",priceSpecification:{"@type":"UnitPriceSpecification",price:"1.99",priceCurrency:"PLN",referenceQuantity:{"@type":"QuantitativeValue",value:"1000",unitCode:"CHR"}},availability:"https://schema.org/InStock"}}}),aQ=()=>{const e=Ss().pathname.split("/").filter(n=>n),r={itemListElement:[{"@type":"ListItem",position:1,name:"Strona główna",item:"https://www.smart-copy.ai"},...e.map((n,s)=>{const i=`https://www.smart-copy.ai/${e.slice(0,s+1).join("/")}`;return{"@type":"ListItem",position:s+2,name:n.charAt(0).toUpperCase()+n.slice(1),item:i}})]};return e.length===0?null:o.jsxs(o.Fragment,{children:[o.jsx(df,{type:"BreadcrumbList",data:r}),o.jsx("nav",{className:"container-custom py-4",children:o.jsxs("ol",{className:"flex items-center gap-2 text-sm",children:[o.jsx("li",{children:o.jsx(ze,{to:"/",className:"flex items-center text-gray-600 dark:text-gray-400 hover:text-purple-600 dar
754k:hover:text-purple-400",children:o.jsx(eS,{className:"w-4 h-4"})})}),e.map((n,s)=>{const i=`/${e.slice(0,s+1).join("/")}`,a=s===e.length-1;return o.jsxs("li",{className:"flex items-center gap-2",children:[o.jsx(Pd,{className:"w-4 h-4 text-gray-400"}),a?o.jsx("span",{className:"text-gray-900 dark:text-white font-medium",children:n.charAt(0).toUpperCase()+n.slice(1)}):o.jsx(ze,{to:i,className:"text-gray-600 dark:text-gray-400 hover:text-purple-600 dark:hover:text-purple-400",children:n.charAt(0).toUpperCase()+n.slice(1)})]},n)})]})})]})},QI=M.createContext({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"}),_y=M.createContext({}),Iy=M.createContext(null),Oy=typeof document<"u",oS=Oy?M.useLayoutEffect:M.useEffect,eO=M.createContext({strict:!1}),lS=t=>t.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase(),oQ="framerAppearId",tO="data-"+lS(oQ);function lQ(t,e,r,n){const{visualElement:s}=M.useContext(_y),i=M.useContext(eO),a=M.useContext(Iy),l=M.useContext(QI).reducedMotion,c=M.useRef();n=n||i.renderer,!c.current&&n&&(c.current=n(t,{visualState:e,parent:s,props:r,presenceContext:a,blockInitialAnimation:a?a.initial===!1:!1,reducedMotionConfig:l}));const u=c.current;M.useInsertionEffect(()=>{u&&u.update(r,a)});const d=M.useRef(!!(r[tO]&&!window.HandoffComplete));return oS(()=>{u&&(u.render(),d.current&&u.animationState&&u.animationState.animateChanges())}),M.useEffect(()=>{u&&(u.updateFeatures(),!d.current&&u.animationState&&u.animationState.animateChanges(),d.current&&(d.current=!1,window.HandoffComplete=!0))}),u}function lu(t){return t&&typeof t=="object"&&Object.prototype.hasOwnProperty.call(t,"current")}function cQ(t,e,r){return M.useCallback(n=>{n&&t.mount&&t.mount(n),e&&(n?e.mount(n):e.unmount()),r&&(typeof r=="function"?r(n):lu(r)&&(r.current=n))},[e])}function Pp(t){return typeof t=="string"||Array.isArray(t)}function Ry(t){return t!==null&&typeof t=="object"&&typeof t.start=="function"}const cS=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],uS=["initial",...cS];function Ly(t){return Ry(t.animate)||uS.some(e=>Pp(t[e]))}function rO(t){return!!(Ly(t)||t.variants)}function uQ(t,e){if(Ly(t)){const{initial:r,animate:n}=t;return{initial:r===!1||Pp(r)?r:void 0,animate:Pp(n)?n:void 0}}return t.inherit!==!1?e:{}}function dQ(t){const{initial:e,animate:r}=uQ(t,M.useContext(_y));return M.useMemo(()=>({initial:e,animate:r}),[eC(e),eC(r)])}function eC(t){return Array.isArray(t)?t.join(" "):t}const tC={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},_p={};for(const t in tC)_p[t]={isEnabled:e=>tC[t].some(r=>!!e[r])};function hQ(t){for(const e in t)_p[e]={..._p[e],...t[e]}}const dS=M.createContext({}),nO=M.createContext({}),pQ=Symbol.for("motionComponentSymbol");function fQ({preloadedFeatures:t,createVisualElement:e,useRender:r,useVisualState:n,Component:s}){t&&hQ(t);function i(l,c){let u;const d={...M.useContext(QI),...l,layoutId:mQ(l)},{isStatic:h}=d,p=dQ(l),f=n(l,h);if(!h&&Oy){p.visualElement=lQ(s,f,d,e);const m=M.useContext(nO),y=M.useContext(eO).strict;p.visualElement&&(u=p.visualElement.loadFeatures(d,y,t,m))}return M.createElement(_y.Provider,{value:p},u&&p.visualElement?M.createElement(u,{visualElement:p.visualElement,...d}):null,r(s,l,cQ(f,p.visualElement,c),f,h,p.visualElement))}const a=M.forwardRef(i);return a[pQ]=s,a}function mQ({layoutId:t}){const e=M.useContext(dS).id;return e&&t!==void 0?e+"-"+t:t}function gQ(t){function e(n,s={}){return fQ(t(n,s))}if(typeof Proxy>"u")return e;const r=new Map;return new Proxy(e,{get:(n,s)=>(r.has(s)||r.set(s,e(s)),r.get(s))})}const yQ=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function hS(t){return typeof t!="string"||t.includes("-")?!1:!!(yQ.indexOf(t)>-1||/[A-Z]/.test(t))}const K0={};function xQ(t){Object.assign(K0,t)}const hf=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],jc=new Set(hf);function sO(t,{layout:e,layoutId:r}){return jc.has(t)||t.startsWith("origin")||(e||r!==void 0)&&(!!K0[t]||t==="opacity")}const Bn=t=>!!(t&&t.getVelocity),wQ={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},bQ=hf.length;function kQ(t,{enableHardwareAcceleration:e=!0,allowTransformNone:r=!0},n,s){let i="";for(let a=0;a<bQ;a++){const l=hf[a];if(t[l]!==void 0){const c=wQ[l]||l;i+=`${c}(${t[l]}
754) `}}return e&&!t.z&&(i+="translateZ(0)"),i=i.trim(),s?i=s(t,n?"":i):r&&n&&(i="none"),i}const iO=t=>e=>typeof e=="string"&&e.startsWith(t),aO=iO("--"),bv=iO("var(--"),vQ=/var\s*\(\s*--[\w-]+(\s*,\s*(?:(?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)+)?\s*\)/g,jQ=(t,e)=>e&&typeof t=="number"?e.transform(t):t,Mo=(t,e,r)=>Math.min(Math.max(r,t),e),Sc={test:t=>typeof t=="number",parse:parseFloat,transform:t=>t},Fh={...Sc,transform:t=>Mo(0,1,t)},am={...Sc,default:1},Bh=t=>Math.round(t*1e5)/1e5,My=/(-)?([\d]*\.?[\d])+/g,oO=/(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))/gi,SQ=/^(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))$/i;function pf(t){return typeof t=="string"}const ff=t=>({test:e=>pf(e)&&e.endsWith(t)&&e.split(" ").length===1,parse:parseFloat,transform:e=>`${e}${t}`}),Ia=ff("deg"),Ci=ff("%"),qe=ff("px"),NQ=ff("vh"),CQ=ff("vw"),rC={...Ci,parse:t=>Ci.parse(t)/100,transform:t=>Ci.transform(t*100)},nC={...Sc,transform:Math.round},lO={borderWidth:qe,borderTopWidth:qe,borderRightWidth:qe,borderBottomWidth:qe,borderLeftWidth:qe,borderRadius:qe,radius:qe,borderTopLeftRadius:qe,borderTopRightRadius:qe,borderBottomRightRadius:qe,borderBottomLeftRadius:qe,width:qe,maxWidth:qe,height:qe,maxHeight:qe,size:qe,top:qe,right:qe,bottom:qe,left:qe,padding:qe,paddingTop:qe,paddingRight:qe,paddingBottom:qe,paddingLeft:qe,margin:qe,marginTop:qe,marginRight:qe,marginBottom:qe,marginLeft:qe,rotate:Ia,rotateX:Ia,rotateY:Ia,rotateZ:Ia,scale:am,scaleX:am,scaleY:am,scaleZ:am,skew:Ia,skewX:Ia,skewY:Ia,distance:qe,translateX:qe,translateY:qe,translateZ:qe,x:qe,y:qe,z:qe,perspective:qe,transformPerspective:qe,opacity:Fh,originX:rC,originY:rC,originZ:qe,zIndex:nC,fillOpacity:Fh,strokeOpacity:Fh,numOctaves:nC};function pS(t,e,r,n){const{style:s,vars:i,transform:a,transformOrigin:l}=t;
754let c=!1,u=!1,d=!0;for(const h in e){const p=e[h];if(aO(h)){i[h]=p;continue}const f=lO[h],m=jQ(p,f);if(jc.has(h)){if(c=!0,a[h]=m,!d)continue;p!==(f.default||0)&&(d=!1)}else h.startsWith("origin")?(u=!0,l[h]=m):s[h]=m}if(e.transform||(c||n?s.transform=kQ(t.transform,r,d,n):s.transform&&(s.transform="none")),u){const{originX:h="50%",originY:p="50%",originZ:f=0}=l;s.transformOrigin=`${h} ${p} ${f}`}}const fS=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function cO(t,e,r){for(const n in e)!Bn(e[n])&&!sO(n,r)&&(t[n]=e[n])}function EQ({transformTemplate:t},e,r){return M.useMemo(()=>{const n=fS();return pS(n,e,{enableHardwareAcceleration:!r},t),Object.assign({},n.vars,n.style)},[e])}function TQ(t,e,r){const n=t.style||{},s={};return cO(s,n,t),Object.assign(s,EQ(t,e,r)),t.transformValues?t.transformValues(s):s}function AQ(t,e,r){const n={},s=TQ(t,e,r);return t.drag&&t.dragListener!==!1&&(n.draggable=!1,s.userSelect=s.WebkitUserSelect=s.WebkitTouchCallout="none",s.touchAction=t.drag===!0?"none":`pan-${t.drag==="x"?"y":"x"}`),t.tabIndex===void 0&&(t.onTap||t.onTapStart||t.whileTap)&&(n.tabIndex=0),n.style=s,n}const zQ=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","transformValues","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function G0(t){return t.startsWith("while")||t.startsWith("drag")&&t!=="draggable"||t.startsWith("layout")||t.startsWith("onTap")||t.startsWith("onPan")||t.startsWith("onLayout")||zQ.has(t)}let uO=t=>!G0(t);function PQ(t){t&&(uO=e=>e.startsWith("on")?!G0(e):t(e))}try{PQ(require("@emotion/is-prop-valid").default)}catch{}function _Q(t,e,r){const n={};for(const s in t)s==="values"&&typeof t.values=="object"||(uO(s)||r===!0&&G0(s)||!e&&!G0(s)||t.draggable&&s.startsWith("onDrag"))&&(n[s]=t[s]);return n}function sC(t,e,r){return typeof t=="string"?t:qe.transform(e+r*t)}function IQ(t,e,r){const n=sC(e,t.x,t.width),s=sC(r,t.y,t.height);return`${n} ${s}`}const OQ={offset:"stroke-dashoffset",array:"stroke-dasharray"},RQ={offset:"strokeDashoffset",array:"strokeDasharray"};function LQ(t,e,r=1,n=0,s=!0){t.pathLength=1;const i=s?OQ:RQ;t[i.offset]=qe.transform(-n);const a=qe.transform(e),l=qe.transform(r);t[i.array]=`${a} ${l}`}function mS(t,{attrX:e,attrY:r,attrScale:n,originX:s,originY:i,pathLength:a,pathSpacing:l=1,pathOffset:c=0,...u},d,h,p){if(pS(t,u,d,p),h){t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox);return}t.attrs=t.style,t.style={};const{attrs:f,style:m,dimensions:y}=t;f.transform&&(y&&(m.transform=f.transform),delete f.transform),y&&(s!==void 0||i!==void 0||m.transform)&&(m.transformOrigin=IQ(y,s!==void 0?s:.5,i!==void 0?i:.5)),e!==void 0&&(f.x=e),r!==void 0&&(f.y=r),n!==void 0&&(f.scale=n),a!==void 0&&LQ(f,a,l,c,!1)}const dO=()=>({...fS(),attrs:{}}),gS=t=>typeof t=="string"&&t.toLowerCase()==="svg";function MQ(t,e,r,n){const s=M.useMemo(()=>{const i=dO();return mS(i,e,{enableHardwareAcceleration:!1},gS(n),t.transformTemplate),{...i.attrs,style:{...i.style}}},[e]);if(t.style){const i={};cO(i,t.style,t),s.style={...i,...s.style}}return s}function DQ(t=!1){return(r,n,s,{latestValues:i},a)=>{const c=(hS(r)?MQ:AQ)(n,i,a,r),d={..._Q(n,typeof r=="string",t),...c,ref:s},{children:h}=n,p=M.useMemo(()=>Bn(h)?h.get():h,[h]);return M.createElement(r,{...d,children:p})}}function hO(t,{style:e,vars:r},n,s){Object.assign(t.style,e,s&&s.getProjectionStyles(n));for(const i in r)t.style.setProperty(i,r[i])}const pO=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function fO(t,e,r,n){hO(t,e,void 0,n);for(const s in e.attrs)t.setAttribute(pO.has(s)?s:lS(s),e.attrs[s])}function yS(t,e){const{style:r}=t,n={};for(const s in r)(Bn(r[s])||e.style&&Bn(e.style[s])||sO(s,t))&&(n[s]=r[s]);return n}function mO(t,e){const r=yS(t,e);for(const n in t)if(Bn(t[n])||Bn(e[n])){const s=hf.indexOf(n)!==-1?"attr"+n.charAt(0).toUpperCase()+n.substring(1):n;r[s]=t[n]}return r}function xS(t,e,r,n={},s={}){return typeof e=="function"&&(e=e(r!==void 0?r:t.custom,n,s)),typeof e=="string"&&(e=t.variants&&t.variants[e]),typeof e=="function"&&(e=e(r!==void 0?r:t.custom,n,s)),e}function gO(t){const e=M.useRef(null);return e.current===null&&(e.current=t()),e.current}const Z0=t=>Array.isArray(t),FQ=t=>!!(t&&typeof t=="object"&&t.mix&&t.toValue),BQ=t=>Z0(t)?t[t.length-1]||0:t;function e0(t){const e=Bn(t)?t.get():t;return FQ(e)?e.toValue():e}function $Q({scrapeMotionValuesFromProps:t,createRenderState:e,onMount:r},n,s,i){const a={latestValues:UQ(n,s,i,t),renderState:e()};return r&&(a.mount=l=>r(n,l,a)),a}const yO=t=>(e,r)=>{const n=M.useContext(_y),s=M.useContext(Iy),i=()=>$Q(t,e,n,s);return r?i():gO(i)};function UQ(t,e,r,n){const s={},i=n(t,{});for(const p in i)s[p]=e0(i[p]);let{initial:a,animate:l}=t;const c=Ly(t),u=rO(t);e&&u&&!c&&t.inherit!==!1&&(a===void 0&&(a=e.initial),l===void 0&&(l=e.animate));let d=r?r.initial===!1:!1;d=d||a===!1;const h=d?l:a;return h&&typeof h!="boolean"&&!Ry(h)&&(Array.isArray(h)?h:[h]).forEac
754h(f=>{const m=xS(t,f);if(!m)return;const{transitionEnd:y,transition:k,...g}=m;for(const x in g){let w=g[x];if(Array.isArray(w)){const b=d?w.length-1:0;w=w[b]}w!==null&&(s[x]=w)}for(const x in y)s[x]=y[x]}),s}const sr=t=>t;class iC{constructor(){this.order=[],this.scheduled=new Set}add(e){if(!this.scheduled.has(e))return this.scheduled.add(e),this.order.push(e),!0}remove(e){const r=this.order.indexOf(e);r!==-1&&(this.order.splice(r,1),this.scheduled.delete(e))}clear(){this.order.length=0,this.scheduled.clear()}}function WQ(t){let e=new iC,r=new iC,n=0,s=!1,i=!1;const a=new WeakSet,l={schedule:(c,u=!1,d=!1)=>{const h=d&&s,p=h?e:r;return u&&a.add(c),p.add(c)&&h&&s&&(n=e.order.length),c},cancel:c=>{r.remove(c),a.delete(c)},process:c=>{if(s){i=!0;return}if(s=!0,[e,r]=[r,e],r.clear(),n=e.order.length,n)for(let u=0;u<n;u++){const d=e.order[u];d(c),a.has(d)&&(l.schedule(d),t())}s=!1,i&&(i=!1,l.process(c))}};return l}const om=["prepare","read","update","preRender","render","postRender"],VQ=40;function HQ(t,e){let r=!1,n=!0;const s={delta:0,timestamp:0,isProcessing:!1},i=om.reduce((h,p)=>(h[p]=WQ(()=>r=!0),h),{}),a=h=>i[h].process(s),l=()=>{const h=performance.now();r=!1,s.delta=n?1e3/60:Math.max(Math.min(h-s.timestamp,VQ),1),s.timestamp=h,s.isProcessing=!0,om.forEach(a),s.isProcessing=!1,r&&e&&(n=!1,t(l))},c=()=>{r=!0,n=!0,s.isProcessing||t(l)};return{schedule:om.reduce((h,p)=>{const f=i[p];return h[p]=(m,y=!1,k=!1)=>(r||c(),f.schedule(m,y,k)),h},{}),cancel:h=>om.forEach(p=>i[p].cancel(h)),state:s,steps:i}}const{schedule:Pt,cancel:ya,state:Gr,steps:ow}=HQ(typeof requestAnimationFrame<"u"?requestAnimationFrame:sr,!0),qQ={useVisualState:yO({scrapeMotionValuesFromProps:mO,createRenderState:dO,onMount:(t,e,{renderState:r,latestValues:n})=>{Pt.read(()=>{try{r.dimensions=typeof e.getBBox=="function"?e.getBBox():e.getBoundingClientRect()}catch{r.dimensions={x:0,y:0,width:0,height:0}}}),Pt.render(()=>{mS(r,n,{enableHardwareAcceleration:!1},gS(e.tagName),t.transformTemplate),fO(e,r)})}})},KQ={useVisualState:yO({scrapeMotionValuesFromProps:yS,createRenderState:fS})};function GQ(t,{forwardMotionProps:e=!1},r,n){return{...hS(t)?qQ:KQ,preloadedFeatures:r,useRender:DQ(e),createVisualElement:n,Component:t}}function ea(t,e,r,n={passive:!0}){return t.addEventListener(e,r,n),()=>t.removeEventListener(e,r)}const xO=t=>t.pointerType==="mouse"?typeof t.button!="number"||t.button<=0:t.isPrimary!==!1;function Dy(t,e="page"){return{point:{x:t[e+"X"],y:t[e+"Y"]}}}const ZQ=t=>e=>xO(e)&&t(e,Dy(e));function ia(t,e,r,n){return ea(t,e,ZQ(r),n)}const YQ=(t,e)=>r=>e(t(r)),So=(...t)=>t.reduce(YQ);function wO(t){let e=null;return()=>{const r=()=>{e=null};return e===null?(e=t,r):!1}}const aC=wO("dragHorizontal"),oC=wO("dragVertical");function bO(t){let e=!1;if(t==="y")e=oC();else if(t==="x")e=aC();else{const r=aC(),n=oC();r&&n?e=()=>{r(),n()}:(r&&r(),n&&n())}return e}function kO(){const t=bO(!0);return t?(t(),!1):!0}class Xo{constructor(e){this.isMounted=!1,this.node=e}update(){}}function lC(t,e){const r="pointer"+(e?"enter":"leave"),n="onHover"+(e?"Start":"End"),s=(i,a)=>
754{if(i.pointerType==="touch"||kO())return;const l=t.getProps();t.animationState&&l.whileHover&&t.animationState.setActive("whileHover",e),l[n]&&Pt.update(()=>l[n](i,a))};return ia(t.current,r,s,{passive:!t.getProps()[n]})}class JQ extends Xo{mount(){this.unmount=So(lC(this.node,!0),lC(this.node,!1))}unmount(){}}class XQ extends Xo{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(":focus-visible")}catch{e=!0}!e||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=So(ea(this.node.current,"focus",()=>this.onFocus()),ea(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}const vO=(t,e)=>e?t===e?!0:vO(t,e.parentElement):!1;function lw(t,e){if(!e)return;const r=new PointerEvent("pointer"+t);e(r,Dy(r))}class QQ extends Xo{constructor(){super(...arguments),this.removeStartListeners=sr,this.removeEndListeners=sr,this.removeAccessibleListeners=sr,this.startPointerPress=(e,r)=>{if(this.isPressing)return;this.removeEndListeners();const n=this.node.getProps(),i=ia(window,"pointerup",(l,c)=>{if(!this.checkPressEnd())return;const{onTap:u,onTapCancel:d,globalTapTarget:h}=this.node.getProps();Pt.update(()=>{!h&&!vO(this.node.current,l.target)?d&&d(l,c):u&&u(l,c)})},{passive:!(n.onTap||n.onPointerUp)}),a=ia(window,"pointercancel",(l,c)=>this.cancelPress(l,c),{passive:!(n.onTapCancel||n.onPointerCancel)});this.removeEndListeners=So(i,a),this.startPress(e,r)},this.startAccessiblePress=()=>{const e=i=>{if(i.key!=="Enter"||this.isPressing)return;const a=l=>{l.key!=="Enter"||!this.checkPressEnd()||lw("up",(c,u)=>{const{onTap:d}=this.node.getProps();d&&Pt.update(()=>d(c,u))})};this.removeEndListeners(),this.removeEndListeners=ea(this.node.current,"keyup",a),lw("down",(l,c)=>{this.startPress(l,c)})},r=ea(this.node.current,"keydown",e),n=()=>{this.isPressing&&lw("cancel",(i,a)=>this.cancelPress(i,a))},s=ea(this.node.current,"blur",n);this.removeAccessibleListeners=So(r,s)}}startPress(e,r){this.isPressing=!0;const{onTapStart:n,whileTap:s}=this.node.getProps();s&&this.node.animationState&&this.node.animationState.setActive("whileTap",!0),n&&Pt.update(()=>n(e,r))}checkPressEnd(){return this.removeEndListeners(),this.isPressing=!1,this.node.getProps().whileTap&&this.node.animationState&&this.node.animationState.setActive("whileTap",!1),!kO()}cancelPress(e,r){if(!this.checkPressEnd())return;const{onTapCancel:n}=this.node.getProps();n&&Pt.update(()=>n(e,r))}mount(){const e=this.node.getProps(),r=ia(e.globalTapTarget?window:this.node.current,"pointerdown",this.startPointerPress,{passive:!(e.onTapStart||e.onPointerStart)}),n=ea(this.node.current,"focus",this.startAccessiblePress);this.removeStartListeners=So(r,n)}unmount(){this.removeStartListeners(),this.removeEndListeners(),this.removeAccessibleListeners()}}const kv=new WeakMap,cw=new WeakMap,eee=t=>{const e=kv.get(t.target);e&&e(t)},tee=t=>{t.forEach(eee)};function ree({root:t,...e}){const r=t||document;cw.has(r)||cw.set(r,{});const n=cw.get(r),s=JSON.stringify(e);return n[s]||(n[s]=new IntersectionObserver(tee,{root:t,...e})),n[s]}function nee(t,e,r){const n=ree(e);return kv.set(t,r),n.observe(t),()=>{kv.delete(t),n.unobserve(t)}}const see={some:0,all:1};class iee extends Xo{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:e={}}=this.node.getProps(),{root:r,margin:n,amount:s="some",once:i}=e,a={root:r?r.current:void 0,rootMargin:n,threshold:typeof s=="number"?s:see[s]},l=c=>{const{isIntersecting:u}=c;if(this.isInView===u||(this.isInView=u,i&&!u&&this.hasEnteredView))return;u&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",u);const{onViewportEnter:d,onViewportLeave:h}=this.node.getProps(),p=u?d:h;p&&p(c)};return nee(this.node.current,a,l)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:e,prevProps:r}=this.node;["amount","margin","root"].some(aee(e,r))&&this.startObserver()}unmount(){}}function aee({viewport:t={}},{viewport:e={}}={}){return r=>t[r]!==e[r]}const oee={inView:{Feature:iee},tap:{Feature:QQ},focus:{Feature:XQ},hover:{Feature:JQ}};function jO(t,e){if(!Array.isArray(e))return!1;const r=e.length;if(r!==t.length)return!1;for(let n=0;n<r;n++)if(e[n]!==t[n])return!1;return!0}function lee(t){const e={};
754return t.values.forEach((r,n)=>e[n]=r.get()),e}function cee(t){const e={};return t.values.forEach((r,n)=>e[n]=r.getVelocity()),e}function Fy(t,e,r){const n=t.getProps();return xS(n,e,r!==void 0?r:n.custom,lee(t),cee(t))}let wS=sr;const Zl=t=>t*1e3,aa=t=>t/1e3,uee={current:!1},SO=t=>Array.isArray(t)&&typeof t[0]=="number";function NO(t){return!!(!t||typeof t=="string"&&CO[t]||SO(t)||Array.isArray(t)&&t.every(NO))}const kh=([t,e,r,n])=>`cubic-bezier(${t}, ${e}, ${r}, ${n})`,CO={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:kh([0,.65,.55,1]),circOut:kh([.55,0,1,.45]),backIn:kh([.31,.01,.66,-.59]),backOut:kh([.33,1.53,.69,.99])};function EO(t){if(t)return SO(t)?kh(t):Array.isArray(t)?t.map(EO):CO[t]}function dee(t,e,r,{delay:n=0,duration:s,repeat:i=0,repeatType:a="loop",ease:l,times:c}={}){const u={[e]:r};c&&(u.offset=c);const d=EO(l);return Array.isArray(d)&&(u.easing=d),t.animate(u,{delay:n,duration:s,easing:Array.isArray(d)?"linear":d,fill:"both",iterations:i+1,direction:a==="reverse"?"alternate":"normal"})}function hee(t,{repeat:e,repeatType:r="loop"}){const n=e&&r!=="loop"&&e%2===1?0:t.length-1;return t[n]}const TO=(t,e,r)=>(((1-3*r+3*e)*t+(3*r-6*e))*t+3*e)*t,pee=1e-7,fee=12;function mee(t,e,r,n,s){let i,a,l=0;do a=e+(r-e)/2,i=TO(a,n,s)-t,i>0?r=a:e=a;while(Math.abs(i)>pee&&++l<fee);return a}function mf(t,e,r,n){if(t===e&&r===n)return sr;const s=i=>mee(i,0,1,t,r);return i=>i===0||i===1?i:TO(s(i),e,n)}const gee=mf(.42,0,1,1),yee=mf(0,0,.58,1),AO=mf(.42,0,.58,1),xee=t=>Array.isArray(t)&&typeof t[0]!="number",zO=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,PO=t=>e=>1-t(1-e),bS=t=>1-Math.sin(Math.acos(t)),_O=PO(bS),wee=zO(bS),IO=mf(.33,1.53,.69,.99),kS=PO(IO),bee=zO(kS),kee=t=>(t*=2)<1?.5*kS(t):.5*(2-Math.pow(2,-10*(t-1))),vee={linear:sr,easeIn:gee,easeInOut:AO,easeOut:yee,circIn:bS,circInOut:wee,circOut:_O,backIn:kS,backInOut:bee,backOut:IO,anticipate:kee},cC=t=>{if(Array.isArray(t)){wS(t.length===4);const[e,r,n,s]=t;return mf(e,r,n,s)}else if(typeof t=="string")return vee[t];return t},vS=(t,e)=>r=>!!(pf(r)&&SQ.test(r)&&r.startsWith(t)||e&&Object.prototype.hasOwnProperty.call(r,e)),OO=(t,e,r)=>n=>{if(!pf(n))return n;const[s,i,a,l]=n.match(My);return{[t]:parseFloat(s),[e]:parseFloat(i),[r]:parseFloat(a),alpha:l!==void 0?parseFloat(l):1}},jee=t=>Mo(0,255,t),uw={...Sc,transform:t=>Math.round(jee(t))},El={test:vS("rgb","red"),parse:OO("red","green","blue"),transform:({red:t,green:e,blue:r,alpha:n=1})=>"rgba("+uw.transform(t)+", "+uw.transform(e)+", "+uw.transform(r)+", "+Bh(Fh.transform(n))+")"};function See(t){let e="",r="",n="",s="";return t.length>5?(e=t.substring(1,3),r=t.substring(3,5),n=t.substring(5,7),s=t.substring(7,9)):(e=t.substring(1,2),r=t.substring(2,3),n=t.substring(3,4),s=t.substring(4,5),e+=e,r+=r,n+=n,s+=s),{red:parseInt(e,16),green:parseInt(r,16),blue:parseInt(n,16),alpha:s?parseInt(s,16)/255:1}}const vv={test:vS("#"),parse:See,transform:El.transform},cu={test:vS("hsl","hue"),parse:OO("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:r,alpha:n=1})=>"hsla("+Math.round(t)+", "+Ci.transform(Bh(e))+", "+Ci.transform(Bh(r))+", "+Bh(Fh.transform(n))+")"},on={test:t=>El.test(t)||vv.test(t)||cu.test(t),parse:t=>El.test(t)?El.parse(t):cu.test(t)?cu.parse(t):vv.parse(t),transform:t=>pf(t)?t:t.hasOwnProperty("red")?El.transform(t):cu.transform(t)},$t=(t,e,r)=>-r*t+r*e+t;function dw(t,e,r){return r<0&&(r+=1),r>1&&(r-=1),r<1/6?t+(e-t)*6*r:r<1/2?e:r<2/3?t+(e-t)*(2/3-r)*6:t}function Nee({hue:t,saturation:e,lightness:r,alpha:n}){t/=360,e/=100,r/=100;let s=0,i=0,a=0;if(!e)s=i=a=r;else{const l=r<.5?r*(1+e):r+e-r*e,c=2*r-l;s=dw(c,l,t+1/3),i=dw(c,l,t),a=dw(c,l,t-1/3)}return{red:Math.round(s*255),green:Math.round(i*255),blue:Math.round(a*255),alpha:n}}const hw=(t,e,r)=>{const n=t*t;return Math.sqrt(Math.max(0,r*(e*e-n)+n))},Cee=[vv,El,cu],Eee=t=>Cee.find(e=>e.test(t));function uC(t){const e=Eee(t);let r=e.parse(t);return e===cu&&(r=Nee(r)),r}const RO=(t,e)=>{const r=uC(t),n=uC(e),s={...r};return i=>(s.red=hw(r.red,n.red,i),s.green=hw(r.green,n.green,i),s.blue=hw(r.blue,n.blue,i),s.alpha=$t(r.alpha,n.alpha,i),El.transform(s))};function Tee(t){var e,r;return isNaN(t)&&pf(t)&&(((e=t.match(My))===null||e===void 0?void 0:e.length)||0)+(((r=t.match(oO))===null||r===void 0?void 0:r.length)||0)>0}const LO={regex:vQ,countKey:"Vars",token:"${v}",parse:sr},MO={regex:oO,countKey:"Colors",token:"${c}",parse:on.parse},DO={regex:My,countKey:"Numbers",token:"${n}",parse:Sc.parse};function pw(t,{regex:e,countKey:r,token:n,parse:s}){const i=t.tokenised.match(e);i&&(t["num"+r]=i.length,t.tokenised=t.tokenised.replace(e,n),t.values.push(...i.map(s)))}function Y0(t){const e=t.toString(),r={value:e,tokenised:e,values:[],numVars:0,numColors:0,numNumbers:0};return r.value.includes("var(--")&&pw(r,LO),pw(r,MO),pw(r,DO),r}function FO(t){return Y0(t).values}function BO(t){const{values:e,numColors:r,numVars:n,tokenised:s}=Y0(t),i=e.length;return a=>{let l=s;for(let c=0;c<i;c++)c<n?l=l.replace(LO.token,a[c]):c<n+r?l=l.replace(MO.token,on.transform(a[c])):l=l.replace(DO.token,Bh(a[c]));return l}}const Aee=t=>typeof t=="number"?0:t;function zee(t){const e=FO(t);return BO(t)(e.map(Aee))}const Do={test:Tee,parse:FO,createTransformer:BO,getAnimatableNone:zee},$O=(t,e)=>r=>`${r>0?e:t}`;function UO(t,e){return typeof t=="number"?r=>$t(t,e,r):on.test(t)?RO(t,e):t.startsWith("var(")?$O(t,e):VO(t,e)}const WO=(t,e)=>{const r=[...t],n=r.length,s=t.map((i,a)=>UO(i,e[a]));return i=>{for(let a=0;a<n;a++)r[a]=s[a](i);return r}},Pee=(t,e)=>{const r={...t,...e},n={};for(const s in r)t[s]!==void 0&&e[s]!==void 0&&(n[s]=UO(t[s],e[s]));return s=>{for(const i in n)r[i]=n[i](s);return r}},VO=(t,e)=>{const r=Do.createTransformer(e),n=Y0(t),s=Y0(e);return n.numVars===s.numVars&&n.numColors===s.numColors&&n.numNumbers>=s.numNumbers?So(WO(n.values,s.values),r):$O(t,e)},Ip=(t,e,r)=>{const n=e-t;return n===0?1:(r-t)/n},dC=(t,e)=>r=>$t(t,e,r);function _ee(t){return typeof t=="number"?dC:typeof t=="string"?on.test(t)?RO:VO:Array.isArray(t)?WO:typeof t=="object"?Pee:dC}function Iee(t,e,r){const n=[],s=r||_ee(t[0]),i=t.length-1;for(let a=0;a<i;a++){let l=s(t[a],t[a+1]);if(e){const c=Array.isArray(e)?e[a]||sr:e;l=So(c,l)}n.push(l)}return n}function HO(t,e,{clamp:r=!0,ease:n,mixer:s}={}){const i=t.length;if(wS(i===e.length),i===1)return()=>e[0];t[0]>t[i-1]&&(t=[...t].reverse(),e=[...e].reverse());const a=Iee(e,n,s),l=a.length,c=u=>{let d=0;if(l>1)for(;d<t.length-2&&!(u<t[d+1]);d++);const h=Ip(t[d],t[d+1],u);return a[d](h)};return r?u=>c(Mo(t[0],t[i-1],u)):c}function Oee(t,e){const r=t[t.length-1];for(let n=1;n<=e;n++){const s=Ip(0,e,n);t.push($t(r,1,s))}}function Ree(t){const e=[0];return Oee(e,t.length-1),e}function Lee(t,e){return t.map(r=>r*e)}function Mee(t,e){return t.map(()=>e||AO).splice(0,t.length-1)}function J0({duration:t=300,keyframes:e,times:r,ease:n="easeInOut"}){const s=xee(n)?n.map(cC):cC(n),i={done:!1,value:e[0]},a=Lee(r&&r.length===e.length?r:Ree(e),t),l=HO(a,e,{ease:Array.isArray(s)?s:Mee(e,s)});return{calculatedDuration:t,next:c=>(i.value=l(c),i.done=c>=t,i)}}function qO(t,e){return e?t*(1e3/e):0}const Dee=5;function KO(t,e,r){const n=Math.max(e-Dee,0);return qO(r-t(n),e-n)}const fw=.001,Fee=.01,Bee=10,$ee=.05,Uee=1;function Wee({duration:t=800,bounce:e=.25,velocity:r=0,mass:n=1}){let s,i,a=1-e;a=Mo($ee,Uee,a),t=Mo(Fee,Bee,aa(t)),a<1?(s=u=>{const d=u*a,h=d*t,p=d-r,f=jv(u,a),m=Math.exp(-h);return fw-p/f*m},i=u=>{const h=u*a*t,p=h*r+r,f=Math.pow(a,2)*Math.pow(u,2)*t,m=Math.exp(-h),y=jv(Math.pow(u,2),a);return(-s(u)+fw>0?-1:1)*((p-f)*m)/y}):(s=u=>{const d=Math.exp(-u*t),h=(u-r)*t+1;return-fw+d*h},i=u=>{const d=Math.exp(-u*t),h=(r-u)*(t*t);return d*h});const l=5/t,c=Hee(s,i,l);if(t=Zl(t),isNaN(c))return{stiffness:100,damping:10,duration:t};{const u=Math.pow(c,2)*n;return{stiffness:u,damping:a*2*Math.sqrt(n*u),duration:t}}}const Vee=12;function Hee(t,e,r){let n=r;for(let s=1;s<Vee;s++)n=n-t(n)/e(n);return n}function jv(t,e){return t*Math.sqrt(1-e*e)}const qee=["duration","bounce"],Kee=["stiffness","damping","mass"];function hC(t,e){return e.some(r=>t[r]!==void 0)}function Gee(t){let e={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...t};
754if(!hC(t,Kee)&&hC(t,qee)){const r=Wee(t);e={...e,...r,mass:1},e.isResolvedFromDuration=!0}return e}function GO({keyframes:t,restDelta:e,restSpeed:r,...n}){const s=t[0],i=t[t.length-1],a={done:!1,value:s},{stiffness:l,damping:c,mass:u,duration:d,velocity:h,isResolvedFromDuration:p}=Gee({...n,velocity:-aa(n.velocity||0)}),f=h||0,m=c/(2*Math.sqrt(l*u)),y=i-s,k=aa(Math.sqrt(l/u)),g=Math.abs(y)<5;r||(r=g?.01:2),e||(e=g?.005:.5);let x;if(m<1){const w=jv(k,m);x=b=>{const v=Math.exp(-m*k*b);return i-v*((f+m*k*y)/w*Math.sin(w*b)+y*Math.cos(w*b))}}else if(m===1)x=w=>i-Math.exp(-k*w)*(y+(f+k*y)*w);else{const w=k*Math.sqrt(m*m-1);x=b=>{const v=Math.exp(-m*k*b),A=Math.min(w*b,300);return i-v*((f+m*k*y)*Math.sinh(A)+w*y*Math.cosh(A))/w}}return{calculatedDuration:p&&d||null,next:w=>{const b=x(w);if(p)a.done=w>=d;else{let v=f;w!==0&&(m<1?v=KO(x,w,b):v=0);const A=Math.abs(v)<=r,C=Math.abs(i-b)<=e;a.done=A&&C}return a.value=a.done?i:b,a}}}function pC({keyframes:t,velocity:e=0,power:r=.8,timeConstant:n=325,bounceDamping:s=10,bounceStiffness:i=500,modifyTarget:a,min:l,max:c,restDelta:u=.5,restSpeed:d}){const h=t[0],p={done:!1,value:h},f=_=>l!==void 0&&_<l||c!==void 0&&_>c,m=_=>l===void 0?c:c===void 0||Math.abs(l-_)<Math.abs(c-_)?l:c;let y=r*e;const k=h+y,g=a===void 0?k:a(k);g!==k&&(y=g-h);const x=_=>-y*Math.exp(-_/n),w=_=>g+x(_),b=_=>{const N=x(_),W=w(_);p.done=Math.abs(N)<=u,p.value=p.done?g:W};let v,A;const C=_=>{f(p.value)&&(v=_,A=GO({keyframes:[p.value,m(p.value)],velocity:KO(w,_,p.value),damping:s,stiffness:i,restDelta:u,restSpeed:d}))};return C(0),{calculatedDuration:null,next:_=>{let N=!1;return!A&&v===void 0&&(N=!0,b(_),C(_)),v!==void 0&&_>v?A.next(_-v):(!N&&b(_),p)}}}const Zee=t=>{const e=({timestamp:r})=>t(r);return{start:()=>Pt.update(e,!0),stop:()=>ya(e),now:()=>Gr.isProcessing?Gr.timestamp:performance.now()}},fC=2e4;function mC(t){let e=0;const r=50;let n=t.next(e);for(;!n.done&&e<fC;)e+=r,n=t.next(e);return e>=fC?1/0:e}const Yee={decay:pC,inertia:pC,tween:J0,keyframes:J0,spring:GO};function X0({autoplay:t=!0,delay:e=0,driver:r=Zee,keyframes:n,type:s="keyframes",repeat:i=0,repeatDelay:a=0,repeatType:l="loop",onPlay:c,onStop:u,onComplete:d,onUpdate:h,...p}){let f=1,m=!1,y,k;const g=()=>{k=new Promise(G=>{y=G})};g();let x;const w=Yee[s]||J0;let b;w!==J0&&typeof n[0]!="number"&&(b=HO([0,100],n,{clamp:!1}),n=[0,100]);const v=w({...p,keyframes:n});let A;l==="mirror"&&(A=w({...p,keyframes:[...n].reverse(),velocity:-(p.velocity||0)}));let C="idle",_=null,N=null,W=null;v.calculatedDuration===null&&i&&(v.calculatedDuration=mC(v));const{calculatedDuration:K}=v;let T=1/0,F=1/0;K!==null&&(T=K+a,F=T*(i+1)-a);let E=0;const H=G=>{if(N===null)return;f>0&&(N=Math.min(N,G)),f<0&&(N=Math.min(G-F/f,N)),_!==null?E=_:E=Math.round(G-N)*f;const B=E-e*(f>=0?1:-1),re=f>=0?B<0:B>F;E=Math.max(B,0),C==="finished"&&_===null&&(E=F);let ae=E,ge=v;if(i){const ee=Math.min(E,F)/T;let Q=Math.floor(ee),q=ee%1;!q&&ee>=1&&(q=1),q===1&&Q--,Q=Math.min(Q,i+1),!!(Q%2)&&(l==="reverse"?(q=1-q,a&&(q-=a/T)):l==="mirror"&&(ge=A)),ae=Mo(0,1,q)*T}const ne=re?{done:!1,value:n[0]}:ge.next(ae);b&&(ne.value=b(ne.value));let{done:O}=ne;!re&&K!==null&&(O=f>=0?E>=F:E<=0);const I=_===null&&(C==="finished"||C==="running"&&O);return h&&h(ne.value),I&&D(),ne},Y=()=>{x&&x.stop(),x=void 0},$=()=>{C="idle",Y(),y(),g(),N=W=null},D=()=>{C="finished",d&&d(),Y(),y()},J=()=>{if(m)return;x||(x=r(H));const G=x.now();c&&c(),_!==null?N=G-_:(!N||C==="finished")&&(N=G),C==="finished"&&g(),W=N,_=null,C="running",x.start()};t&&J();const de={then(G,B){return k.then(G,B)},get time(){return aa(E)},set time(G){G=Zl(G),E=G,_!==null||!x||f===0?_=G:N=x.now()-G/f},get duration(){const G=v.calculatedDuration===null?mC(v):v.calculatedDuration;return aa(G)},get speed(){return f},set speed(G){G===f||!x||(f=G,de.time=aa(E))},get state(){return C},play:J,pause:()=>{C="paused",_=E},stop:()=>{m=!0,C!=="idle"&&(C="idle",u&&u(),$())},cancel:()=>{W!==null&&H(W),$()},complete:()=>{C="finished"},sample:G=>(N=0,H(G))};return de}function Jee(t){let e;return()=>(e===void 0&&(e=t()),e)}const Xee=Jee(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),Qee=new Set(["opacity","clipPath","filter","transform","backgroundColor"]),lm=10,ete=2e4,tte=(t,e)=>e.type==="spring"||t==="backgroundColor"||!NO(e.ease);function rte(t,e,{onUpdate:r,onComplete:n,...s}){if(!(Xee()&&Qee.has(e)&&!s.repeatDelay&&s.repeatType!=="mirror"&&s.damping!==0&&s.type!=="inertia"))return!1;let a=!1,l,c,u=!1;const d=()=>{c=new Promise(w=>{l=w})};d();let{keyframes:h,duration:p=300,ease:f,times:m}=s;if(tte(e,s)){const w=X0({...s,repeat:0,delay:0});let b={done:!1,value:h[0]};const v=[];let A=0;for(;!b.done&&A<ete;)b=w.sample(A),v.push(b.value),A+=lm;m=void 0,h=v,p=A-lm,f="linear"}const y=dee(t.owner.current,e,h,{...s,duration:p,ease:f,times:m}),k=()=>{u=!1,y.cancel()},g=()=>{u=!0,Pt.update(k),l(),d()};return y.onfinish=()=>{u||(t.set(hee(h,s)),n&&n(),g())},{then(w,b){return c.then(w,b)}
754,attachTimeline(w){return y.timeline=w,y.onfinish=null,sr},get time(){return aa(y.currentTime||0)},set time(w){y.currentTime=Zl(w)},get speed(){return y.playbackRate},set speed(w){y.playbackRate=w},get duration(){return aa(p)},play:()=>{a||(y.play(),ya(k))},pause:()=>y.pause(),stop:()=>{if(a=!0,y.playState==="idle")return;const{currentTime:w}=y;if(w){const b=X0({...s,autoplay:!1});t.setWithVelocity(b.sample(w-lm).value,b.sample(w).value,lm)}g()},complete:()=>{u||y.finish()},cancel:g}}function nte({keyframes:t,delay:e,onUpdate:r,onComplete:n}){const s=()=>(r&&r(t[t.length-1]),n&&n(),{time:0,speed:1,duration:0,play:sr,pause:sr,stop:sr,then:i=>(i(),Promise.resolve()),cancel:sr,complete:sr});return e?X0({keyframes:[0,1],duration:0,delay:e,onComplete:s}):s()}const ste={type:"spring",stiffness:500,damping:25,restSpeed:10},ite=t=>({type:"spring",stiffness:550,damping:t===0?2*Math.sqrt(550):30,restSpeed:10}),ate={type:"keyframes",duration:.8},ote={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},lte=(t,{keyframes:e})=>e.length>2?ate:jc.has(t)?t.startsWith("scale")?ite(e[1]):ste:ote,Sv=(t,e)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(Do.test(e)||e==="0")&&!e.startsWith("url(")),cte=new Set(["brightness","contrast","saturate","opacity"]);function ute(t){const[e,r]=t.slice(0,-1).split("(");if(e==="drop-shadow")return t;const[n]=r.match(My)||[];if(!n)return t;const s=r.replace(n,"");let i=cte.has(e)?1:0;return n!==r&&(i*=100),e+"("+i+s+")"}const dte=/([a-z-]*)\(.*?\)/g,Nv={...Do,getAnimatableNone:t=>{const e=t.match(dte);return e?e.map(ute).join(" "):t}},hte={...lO,color:on,backgroundColor:on,outlineColor:on,fill:on,stroke:on,borderColor:on,borderTopColor:on,borderRightColor:on,borderBottomColor:on,borderLeftColor:on,filter:Nv,WebkitFilter:Nv},jS=t=>hte[t];function ZO(t,e){let r=jS(t);return r!==Nv&&(r=Do),r.getAnimatableNone?r.getAnimatableNone(e):void 0}const YO=t=>/^0[^.\s]+$/.test(t);function pte(t){if(typeof t=="number")return t===0;if(t!==null)return t==="none"||t==="0"||YO(t)}function fte(t,e,r,n){const s=Sv(e,r);let i;Array.isArray(r)?i=[...r]:i=[null,r];const a=n.from!==void 0?n.from:t.get();let l;const c=[];for(let u=0;u<i.length;u++)i[u]===null&&(i[u]=u===0?a:i[u-1]),pte(i[u])&&c.push(u),typeof i[u]=="string"&&i[u]!=="none"&&i[u]!=="0"&&(l=i[u]);if(s&&c.length&&l)for(let u=0;u<c.length;u++){const d=c[u];i[d]=ZO(e,l)}return i}function mte({when:t,delay:e,delayChildren:r,staggerChildren:n,staggerDirection:s,repeat:i,repeatType:a,repeatDelay:l,from:c,elapsed:u,...d}){return!!Object.keys(d).length}function SS(t,e){return t[e]||t.default||t}const gte={skipAnimations:!1},NS=(t,e,r,n={})=>s=>{const i=SS(n,t)||{},a=i.delay||n.delay||0;let{elapsed:l=0}=n;l=l-Zl(a);const c=fte(e,t,r,i),u=c[0],d=c[c.length-1],h=Sv(t,u),p=Sv(t,d);let f={keyframes:c,velocity:e.getVelocity(),ease:"easeOut",...i,delay:-l,onUpdate:m=>{e.set(m),i.onUpdate&&i.onUpdate(m)},onComplete:()=>{s(),i.onComplete&&i.onComplete()}};if(mte(i)||(f={...f,...lte(t,f)}),f.duration&&(f.duration=Zl(f.duration)),f.repeatDelay&&(f.repeatDelay=Zl(f.repeatDelay)),!h||!p||uee.current||i.type===!1||gte.skipAnimations)return nte(f);if(!n.isHandoff&&e.owner&&e.owner.current instanceof HTMLElement&&!e.owner.getProps().onUpdate){const m=rte(e,t,f);if(m)return m}return X0(f)};function Q0(t){return!!(Bn(t)&&t.add)}const JO=t=>/^\-?\d*\.?\d+$/.test(t);function CS(t,e){t.indexOf(e)===-1&&t.push(e)}function ES(t,e){const r=t.indexOf(e);r>-1&&t.splice(r,1)}class TS{constructor(){this.subscriptions=[]}add(e){return CS(this.subscriptions,e),()=>ES(this.subscriptions,e)}notify(e,r,n){const s=this.subscriptions.length;if(s)if(s===1)this.subscriptions[0](e,r,n);else for(let i=0;i<s;i++){const a=this.subscriptions[i];a&&a(e,r,n)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const yte=t=>!isNaN(parseFloat(t));class xte{constructor(e,r={}){this.version="10.18.0",this.timeDelta=0,this.lastUpdated=0,this.canTrackVelocity=!1,this.events={},this.updateAndNotify=(n,s=!0)=>{this.prev=this.current,this.current=n;const{delta:i,timestamp:a}=Gr;this.lastUpdated!==a&&(this.timeDelta=i,this.lastUpdated=a,Pt.postRender(this.scheduleVelocityCheck)),this.prev!==this.current&&this.events.change&&this.events.change.notify(this.current),this.events.velocityChange&&this.events.velocityChange.notify(this.getVelocity()),s&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.scheduleVelocityCheck=()=>Pt.postRender(this.velocityCheck),this.velocityCheck=({timestamp:n})=>{n!==this.lastUpdated&&(this.prev=this.current,this.events.velocityChange&&this.events.velocityChange.notify(this.getVelocity()))},this.hasAnimated=!1,this.prev=this.current=e,this.canTrackVelocity=yte(this.current),this.owner=r.owner}onChange(e){return this.on("change",e)}on(e,r){this.events[e]||(this.events[e]=new TS);const n=this.events[e].add(r);return e==="change"?()=>{n(),Pt.read(()=>{this.events.change.getSize()||this.stop()})}:n}clearListeners(){for(const e in this.events)this.events[e].clear()}attach(e,r){this.passiveEffect=e,this.stopPassiveEffect=r}set(e,r=!0){!r||!this.passiveEffect?this.updateAndNotify(e,r):this.passiveEffect(e,this.updateAndNotify)}setWithVelocity(e,r,n){this.set(r),this.prev=e,this.timeDelta=n}jump(e){this.updateAndNotify(e),this.prev=e,this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return this.current}getPrevious(){return this.prev}getVelocity(){return this.canTrackVelocity?qO(parseFloat(this.current)-parseFloat(this.prev),this.timeDelta):0}start(e){return this.stop(),new Promise(r=>{this.hasAnimated=!0,this.animation=e(r),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Qu(t,e){return new xte(t,e)}const XO=t=>e=>e.test(t),wte={test:t=>t==="auto",parse:t=>t},QO=[Sc,qe,Ci,Ia,CQ,NQ,wte],th=t=>QO.find(XO(t)),bte=[...QO,on,Do],kte=t=>bte.find(XO(t));function vte(t,e,r){t.hasValue(e)?t.getValue(e).set(r):t.addValue(e,Qu(r))}function jte(t,e){const r=Fy(t,e);let{transitionEnd:n={},transition:s={},...i}=r?t.makeTargetAnimatable(r,!1):{};i={...i,...n};for(const a in i){const l=BQ(i[a]);vte(t,a,l)}}function Ste(t,e,r){var n,s;const i=Object.keys(e).filter(l=>!t.hasValue(l)),a=i.length;if(a)for(let l=0;l<a;l++){const c=i[l],u=e[c];let d=null;Array.isArray(u)&&(d=u[0]),d===null&&(d=(s=(n=r[c])!==null&&n!==void 0?n:t.readValue(c))!==null&&s!==void 0?s:e[c]),d!=null&&(typeof d=="str
754ing"&&(JO(d)||YO(d))?d=parseFloat(d):!kte(d)&&Do.test(u)&&(d=ZO(c,u)),t.addValue(c,Qu(d,{owner:t})),r[c]===void 0&&(r[c]=d),d!==null&&t.setBaseTarget(c,d))}}function Nte(t,e){return e?(e[t]||e.default||e).from:void 0}function Cte(t,e,r){const n={};for(const s in t){const i=Nte(s,e);if(i!==void 0)n[s]=i;else{const a=r.getValue(s);a&&(n[s]=a.get())}}return n}function Ete({protectedKeys:t,needsAnimating:e},r){const n=t.hasOwnProperty(r)&&e[r]!==!0;return e[r]=!1,n}function Tte(t,e){const r=t.get();if(Array.isArray(e)){for(let n=0;n<e.length;n++)if(e[n]!==r)return!0}else return r!==e}function e8(t,e,{delay:r=0,transitionOverride:n,type:s}={}){let{transition:i=t.getDefaultTransition(),transitionEnd:a,...l}=t.makeTargetAnimatable(e);const c=t.getValue("willChange");n&&(i=n);const u=[],d=s&&t.animationState&&t.animationState.getState()[s];for(const h in l){const p=t.getValue(h),f=l[h];if(!p||f===void 0||d&&Ete(d,h))continue;const m={delay:r,elapsed:0,...SS(i||{},h)};if(window.HandoffAppearAnimations){const g=t.getProps()[tO];if(g){const x=window.HandoffAppearAnimations(g,h,p,Pt);x!==null&&(m.elapsed=x,m.isHandoff=!0)}}let y=!m.isHandoff&&!Tte(p,f);if(m.type==="spring"&&(p.getVelocity()||m.velocity)&&(y=!1),p.animation&&(y=!1),y)continue;p.start(NS(h,p,f,t.shouldReduceMotion&&jc.has(h)?{type:!1}:m));const k=p.animation;Q0(c)&&(c.add(h),k.then(()=>c.remove(h))),u.push(k)}return a&&Promise.all(u).then(()=>{a&&jte(t,a)}),u}function Cv(t,e,r={}){const n=Fy(t,e,r.custom);let{transition:s=t.getDefaultTransition()||{}}=n||{};r.transitionOverride&&(s=r.transitionOverride);const i=n?()=>Promise.all(e8(t,n,r)):()=>Promise.resolve(),a=t.variantChildren&&t.variantChildren.size?(c=0)=>{const{delayChildren:u=0,staggerChildren:d,staggerDirection:h}=s;return Ate(t,e,u+c,d,h,r)}:()=>Promise.resolve(),{when:l}=s;if(l){const[c,u]=l==="beforeChildren"?[i,a]:[a,i];return c().then(()=>u())}else return Promise.all([i(),a(r.delay)])}function Ate(t,e,r=0,n=0,s=1,i){const a=[],l=(t.variantChildren.size-1)*n,c=s===1?(u=0)=>u*n:(u=0)=>l-u*n;return Array.from(t.variantChildren).sort(zte).forEach((u,d)=>{u.notify("AnimationStart",e),a.push(Cv(u,e,{...i,delay:r+c(d)}).then(()=>u.notify("AnimationComplete",e)))}),Promise.all(a)}function zte(t,e){return t.sortNodePosition(e)}function Pte(t,e,r={}){t.notify("AnimationStart",e);let n;if(Array.isArray(e)){const s=e.map(i=>Cv(t,i,r));n=Promise.all(s)}else if(typeof e=="string")n=Cv(t,e,r);else{const s=typeof e=="function"?Fy(t,e,r.custom):e;n=Promise.all(e8(t,s,r))}return n.then(()=>t.notify("AnimationComplete",e))}const _te=[...cS].reverse(),Ite=cS.length;function Ote(t){return e=>Promise.all(e.map(({animation:r,options:n})=>Pte(t,r,n)))}function Rte(t){let e=Ote(t);const r=Mte();let n=!0;const s=(c,u)=>{const d=Fy(t,u);if(d){const{transition:h,transitionEnd:p,...f}=d;c={...c,...f,...p}}return c};function i(c){e=c(t)}function a(c,u){const d=t.getProps(),h=t.getVariantContext(!0)||{},p=[],f=new Set;let m={},y=1/0;for(let g=0;g<Ite;g++){const x=_te[g],w=r[x],b=d[x]!==void 0?d[x]:h[x],v=Pp(b),A=x===u?w.isActive:null;A===!1&&(y=g);let C=b===h[x]&&b!==d[x]&&v;if(C&&n&&t.manuallyAnimateOnMount&&(C=!1),w.protectedKeys={...m},!w.isActive&&A===null||!b&&!w.prevProp||Ry(b)||typeof b=="boolean")continue;let N=Lte(w.prevProp,b)||x===u&&w.isActive&&!C&&v||g>y&&v,W=!1;const K=Array.isArray(b)?b:[b];let T=K.reduce(s,{});A===!1&&(T={});const{prevResolvedValues:F={}}=w,E={...F,...T},H=Y=>{N=!0,f.has(Y)&&(W=!0,f.delete(Y)),w.needsAnimating[Y]=!0};for(const Y in E){const $=T[Y],D=F[Y];if(m.hasOwnProperty(Y))continue;let J=!1;Z0($)&&Z0(D)?J=!jO($,D):J=$!==D,J?$!==void 0?H(Y):f.add(Y):$!==void 0&&f.has(Y)?H(Y):w.protectedKeys[Y]=!0}w.prevProp=b,w.prevResolvedValues=T,w.isActive&&(m={...m,...T}),n&&t.blockInitialAnimation&&(N=!1),N&&(!C||W)&&p.push(...K.map(Y=>({animation:Y,options:{type:x,...c}})))}if(f.size){const g={};f.forEach(x=>{const w=t.getBaseTarget(x);w!==void 0&&(g[x]=w)}),p.push({animation:g})}let k=!!p.length;return n&&(d.initial===!1||d.initial===d.animate)&&!t.manuallyAnimateOnMount&&(k=!1),n=!1,k?e(p):Promise.resolve()}function l(c,u,d){var h;if(r[c].isActive===u)return Promise.resolve();(h=t.variantChildren)===null||h===void 0||h.forEach(f=>{var m;return(m=f.animationState)===null||m===void 0?void 0:m.setActive(c,u)}),r[c].isActive=u;const p=a(d,c);for(const f in r)r[f].protectedKeys={};return p}
vendor: 43,539 bytes, line 754
754return{animateChanges:a,setActive:l,setAnimateFunction:i,getState:()=>r}}function Lte(t,e){return typeof e=="string"?e!==t:Array.isArray(e)?!jO(e,t):!1}function il(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Mte(){return{animate:il(!0),whileInView:il(),whileHover:il(),whileTap:il(),whileDrag:il(),whileFocus:il(),exit:il()}}class Dte extends Xo{constructor(e){super(e),e.animationState||(e.animationState=Rte(e))}updateAnimationControlsSubscription(){const{animate:e}=this.node.getProps();this.unmount(),Ry(e)&&(this.unmount=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:e}=this.node.getProps(),{animate:r}=this.node.prevProps||{};e!==r&&this.updateAnimationControlsSubscription()}unmount(){}}let Fte=0;class Bte extends Xo{constructor(){super(...arguments),this.id=Fte++}update(){if(!this.node.presenceContext)return;const{isPresent:e,onExitComplete:r,custom:n}=this.node.presenceContext,{isPresent:s}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===s)return;const i=this.node.animationState.setActive("exit",!e,{custom:n??this.node.getProps().custom});r&&!e&&i.then(()=>r(this.id))}mount(){const{register:e}=this.node.presenceContext||{};e&&(this.unmount=e(this.id))}unmount(){}}const $te={animation:{Feature:Dte},exit:{Feature:Bte}},gC=(t,e)=>Math.abs(t-e);function Ute(t,e){const r=gC(t.x,e.x),n=gC(t.y,e.y);return Math.sqrt(r**2+n**2)}class t8{constructor(e,r,{transformPagePoint:n,contextWindow:s,dragSnapToOrigin:i=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const h=gw(this.lastMoveEventInfo,this.history),p=this.startEvent!==null,f=Ute(h.offset,{x:0,y:0})>=3;if(!p&&!f)return;const{point:m}=h,{timestamp:y}=Gr;this.history.push({...m,timestamp:y});const{onStart:k,onMove:g}=this.handlers;p||(k&&k(this.lastMoveEvent,h),this.startEvent=this.lastMoveEvent),g&&g(this.lastMoveEvent,h)},this.handlePointerMove=(h,p)=>{this.lastMoveEvent=h,this.lastMoveEventInfo=mw(p,this.transformPagePoint),Pt.update(this.updatePoint,!0)},this.handlePointerUp=(h,p)=>{this.end();const{onEnd:f,onSessionEnd:m,resumeAnimation:y}=this.handlers;if(this.dragSnapToOrigin&&y&&y(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const k=gw(h.type==="pointercancel"?this.lastMoveEventInfo:mw(p,this.transformPagePoint),this.history);this.startEvent&&f&&f(h,k),m&&m(h,k)},!xO(e))return;this.dragSnapToOrigin=i,this.handlers=r,this.transformPagePoint=n,this.contextWindow=s||window;const a=Dy(e),l=mw(a,this.transformPagePoint),{point:c}=l,{timestamp:u}=Gr;this.history=[{...c,timestamp:u}];const{onSessionStart:d}=r;d&&d(e,gw(l,this.history)),this.removeListeners=So(ia(this.contextWindow,"pointermove",this.handlePointerMove),ia(this.contextWindow,"pointerup",this.handlePointerUp),ia(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),ya(this.updatePoint)}}function mw(t,e){return e?{point:e(t.point)}:t}function yC(t,e){return{x:t.x-e.x,y:t.y-e.y}}function gw({point:t},e){return{point:t,delta:yC(t,r8(e)),offset:yC(t,Wte(e)),velocity:Vte(e,.1)}}function Wte(t){return t[0]}function r8(t){return t[t.length-1]}function Vte(t,e){if(t.length<2)return{x:0,y:0};let r=t.length-1,n=null;const s=r8(t);for(;r>=0&&(n=t[r],!(s.timestamp-n.timestamp>Zl(e)));)r--;if(!n)return{x:0,y:0};const i=aa(s.timestamp-n.timestamp);if(i===0)return{x:0,y:0};const a={x:(s.x-n.x)/i,y:(s.y-n.y)/i};return a.x===1/0&&(a.x=0),a.y===1/0&&(a.y=0),a}function Yn(t){return t.max-t.min}function Ev(t,e=0,r=.01){return Math.abs(t-e)<=r}function xC(t,e,r,n=.5){t.origin=n,t.originPoint=$t(e.min,e.max,t.origin),t.scale=Yn(r)/Yn(e),(Ev(t.scale,1,1e-4)||isNaN(t.scale))&&(t.scale=1),t.translate=$t(r.min,r.max,t.origin)-t.originPoint,(Ev(t.translate)||isNaN(t.translate))&&(t.translate=0)}function $h(t,e,r,n){xC(t.x,e.x,r.x,n?n.originX:void 0),xC(t.y,e.y,r.y,n?n.originY:void 0)}function wC(t,e,r){t.min=r.min+e.min,t.max=t.min+Yn(e)}function Hte(t,e,r){wC(t.x,e.x,r.x),wC(t.y,e.y,r.y)}function bC(t,e,r){t.min=e.min-r.min,t.max=t.min+Yn(e)}function Uh(t,e,r){bC(t.x,e.x,r.x),bC(t.y,e.y,r.y)}function qte(t,{min:e,max:r},n){return e!==void 0&&t<e?t=n?$t(e,t,n.min):Math.max(t,e):r!==void 0&&t>r&&(t=n?$t(r,t,n.max):Math.min(t,r)),t}function kC(t,e,r){return{min:e!==void 0?t.min+e:void 0,max:r!==void 0?t.max+r-(t.max-t.min):void 0}}function Kte(t,{top:e,left:r,bottom:n,right:s}){return{x:kC(t.x,r,s),y:kC(t.y,e,n)}}function vC(t,e){let r=e.min-t.min,n=e.max-t.max;return e.max-e.min<t.max-t.min&&([r,n]=[n,r]),{min:r,max:n}}function Gte(t,e){return{x:vC(t.x,e.x),y:vC(t.y,e.y)}}function Zte(t,e){let r=.5;const n=Yn(t),s=Yn(e);return s>n?r=Ip(e.min,e.max-n,t.min):n>s&&(r=Ip(t.min,t.max-s,e.min)),Mo(0,1,r)}function Yte(t,e){const r={};return e.min!==void 0&&(r.min=e.min-t.min),e.max!==void 0&&(r.max=e.max-t.min),r}const Tv=.35;function Jte(t=Tv){return t===!1?t=0:t===!0&&(t=Tv),{x:jC(t,"left","right"),y:jC(t,"top","bottom")}}function jC(t,e,r){return{min:SC(t,e),max:SC(t,r)}}function SC(t,e){return typeof t=="number"?t:t[e]||0}const NC=()=>({translate:0,scale:1,origin:0,originPoint:0}),uu=()=>({x:NC(),y:NC()}),CC=()=>({min:0,max:0}),ur=()=>({x:CC(),y:CC()});function is(t){return[t("x"),t("y")]}function n8({top:t,left:e,right:r,bottom:n}){return{x:{min:e,max:r},y:{min:t,max:n}}}function Xte({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}}function Qte(t,e){if(!e)return t;const r=e({x:t.left,y:t.top}),n=e({x:t.right,y:t.bottom});return{top:r.y,left:r.x,bottom:n.y,right:n.x}}function yw(t){return t===void 0||t===1}function Av({scale:t,scaleX:e,scaleY:r}){return!yw(t)||!yw(e)||!yw(r)}function fl(t){return Av(t)||s8(t)||t.z||t.rotate||t.rotateX||t.rotateY}function s8(t){return EC(t.x)||EC(t.y)}function EC(t){return t&&t!=="0%"}function eg(t,e,r){const n=t-r,s=e*n;return r+s}function TC(t,e,r,n,s){return s!==void 0&&(t=eg(t,s,n)),eg(t,r,n)+e}function zv(t,e=0,r=1,n,s){t.min=TC(t.min,e,r,n,s),t.max=TC(t.max,e,r,n,s)}function i8(t,{x:e,y:r}){zv(t.x,e.translate,e.scale,e.originPoint),zv(t.y,r.translate,r.scale,r.originPoint)}function ere(t,e,r,n=!1){const s=r.length;if(!s)return;e.x=e.y=1;let i,a;for(let l=0;l<s;l++){i=r[l],a=i.projectionDelta;const c=i.instance;c&&c.style&&c.style.display==="contents"||(n&&i.options.layoutScroll&&i.scroll&&i!==i.root&&du(t,{x:-i.scroll.offset.x,y:-i.scroll.offset.y}),a&&(e.x*=a.x.scale,e.y*=a.y.scale,i8(t,a)),n&&fl(i.latestValues)&&du(t,i.latestValues))}e.x=AC(e.x),e.y=AC(e.y)}function AC(t){return Number.isInteger(t)||t>1.0000000000001||t<.999999999999?t:1}function Da(t,e){t.min=t.min+e,t.max=t.max+e}function zC(t,e,[r,n,s]){const i=e[s]!==void 0?e[s]:.5,a=$t(t.min,t.max,i);zv(t,e[r],e[n],a,e.scale)}const tre=["x","scaleX","originX"],rre=["y","scaleY","originY"];function du(t,e){zC(t.x,e,tre),zC(t.y,e,rre)}function a8(t,e){return n8(Qte(t.getBoundingClientRect(),e))}function nre(t,e,r){const n=a8(t,r),{scroll:s}=e;return s&&(Da(n.x,s.offset.x),Da(n.y,s.offset.y)),n}const o8=({current:t})=>t?t.ownerDocument.defaultView:null,sre=new WeakMap;class ire{constructor(e){this.openGlobalLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=ur(),this.visualElement=e}start(e,{snapToCursor:r=!1}={}){const{presenceContext:n}=this.visualElement;if(n&&n.isPresent===!1)return;const s=d=>{const{dragSnapToOrigin:h}=this.getProps();h?this.pauseAnimation():this.stopAnimation(),r&&this.snapToCursor(Dy(d,"page").point)},i=(d,h)=>{const{drag:p,dragPropagation:f,onDragStart:m}=this.getProps();if(p&&!f&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=bO(p),!this.openGlobalLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),is(k=>{let g=this.getAxisMotionValue(k).get()||0;if(Ci.test(g)){const{projection:x}=this.visualElement;if(x&&x.layout){const w=x.layout.layoutBox[k];w&&(g=Yn(w)*(parseFloat(g)/100))}}this.originPoint[k]=g}),m&&Pt.update(()=>m(d,h),!1,!0);const{animationState:y}=this.visualElement;y&&y.setActive("whileDrag",!0)},a=(d,h)=>{const{dragPropagation:p,dragDirectionLock:f,onDirectionLock:m,onDrag:y}=this.getProps();if(!p&&!this.openGlobalLock)return;const{offset:k}=h;if(f&&this.currentDirection===null){this.currentDirection=are(k),this.currentDirection!==null&&m&&m(this.currentDirection);return}this.updateAxis("x",h.point,k),this.updateAxis("y",h.point,k),this.visualElement.render(),y&&y(d,h)},l=(d,h)=>this.stop(d,h),c=()=>is(d=>{var h;return this.getAnimationState(d)==="paused"&&((h=this.getAxisMotionValue(d).animation)===null||h===void 0?void 0:h.play())}),{dragSnapToOrigin:u}=this.getProps();this.panSession=new t8(e,{onSessionStart:s,onStart:i,onMove:a,onSessionEnd:l,resumeAnimation:c},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:u,contextWindow:o8(this.visualElement)})}stop(e,r){const n=this.isDragging;if(this.cancel(),!n)return;const{velocity:s}=r;this.startAnimation(s);const{onDragEnd:i}=this.getProps();i&&Pt.update(()=>i(e,r))}cancel(){this.isDragging=!1;const{projection:e,animationState:r}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:n}=this.getProps();!n&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),r&&r.setActive("whileDrag",!1)}updateAxis(e,r,n){const{drag:s}=this.getProps();if(!n||!cm(e,s,this.currentDirection))return;const i=this.getAxisMotionValue(e);let a=this.originPoint[e]+n[e];this.constraints&&this.constraints[e]&&(a=qte(a,this.constraints[e],this.elastic[e])),i.set(a)}resolveConstraints(){var e;const{dragConstraints:r,dragElastic:n}=this.getProps(),s=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(e=this.visualElement.projection)===null||e===void 0?void 0:e.layout,i=this.constraints;r&&lu(r)?this.constraints||(this.constraints=this.resolveRefConstraints()):r&&s?this.constraints=Kte(s.layoutBox,r):this.constraints=!1,this.elastic=Jte(n),i!==this.constraints&&s&&this.constraints&&!this.hasMutatedConstraints&&is(a=>{this.getAxisMotionValue(a)&&(this.constraints[a]=Yte(s.layoutBox[a],this.constraints[a]))})}resolveRefConstraints(){const{dragConstraints:e,onMeasureDragConstraints:r}=this.getProps();if(!e||!lu(e))return!1;const n=e.current,{projection:s}=this.visualElement;if(!s||!s.layout)return!1;const i=nre(n,s.root,this.visualElement.getTransformPagePoint());let a=Gte(s.layout.layoutBox,i);if(r){const l=r(Xte(a));this.hasMutatedConstraints=!!l,l&&(a=n8(l))}return a}startAnimation(e){const{drag:r,dragMomentum:n,dragElastic:s,dragTransition:i,dragSnapToOrigin:a,onDragTransitionEnd:l}=this.getProps(),c=this.constraints||{},u=is(d=>{if(!cm(d,r,this.currentDirection))return;let h=c&&c[d]||{};a&&(h={min:0,max:0});const p=s?200:1e6,f=s?40:1e7,m={type:"inertia",velocity:n?e[d]:0,bounceStiffness:p,bounceDamping:f,timeConstant:750,restDelta:1,restSpeed:10,...i,...h};return this.startAxisValueAnimation(d,m)});return Promise.all(u).then(l)}startAxisValueAnimation(e,r){const n=this.getAxisMotionValue(e);return n.start(NS(e,n,0,r))}stopAnimation(){is(e=>this.getAxisMotionValue(e).stop())}pauseAnimation(){is(e=>{var r;return(r=this.getAxisMotionValue(e).animation)===null||r===void 0?void 0:r.pause()})}getAnimationState(e){var r;return(r=this.getAxisMotionValue(e).animation)===null||r===void 0?void 0:r.state}getAxisMotionValue(e){const r="_drag"+e.toUpperCase(),n=this.visualElement.getProps(),s=n[r];return s||this.visualElement.getValue(e,(n.initial?n.initial[e]:void 0)||0)}snapToCursor(e){is(r=>{const{drag:n}=this.getProps();if(!cm(r,n,this.currentDirection))return;const{projection:s}=this.visualElement,i=this.getAxisMotionValue(r);if(s&&s.layout){const{min:a,max:l}=s.layout.layoutBox[r];i.set(e[r]-$t(a,l,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:e,dragConstraints:r}=this.getProps(),{projection:n}=this.visualElement;if(!lu(r)||!n||!this.constraints)return;this.stopAnimation();const s={x:0,y:0};is(a=>{const l=this.getAxisMotionValue(a);if(l){const c=l.get();s[a]=Zte({min:c,max:c},this.constraints[a])}});const{transformTemplate:i}=this.visualElement.getProps();this.visualElement.current.style.transform=i?i({},""):"none",n.root&&n.root.updateScroll(),n.updateLayout(),this.resolveConstraints(),is(a=>{if(!cm(a,e,null))return;const l=this.getAxisMotionValue(a),{min:c,max:u}=this.constraints[a];l.set($t(c,u,s[a]))})}addListeners(){if(!this.visualElement.current)return;sre.set(this.visualElement,this);const e=this.visualElement.current,r=ia(e,"pointerdown",c=>{const{drag:u,dragListener:d=!0}=this.getProps();u&&d&&this.start(c)}),n=()=>{const{dragConstraints:c}=this.getProps();lu(c)&&(this.constraints=this.resolveRefConstraints())},{projection:s}=this.visualElement,i=s.addEventListener("measure",n);s&&!s.layout&&(s.root&&s.root.updateScroll(),s.updateLayout()),n();const a=ea(window,"resize",()=>this.scalePositionWithinConstraints()),l=s.addEventListener("didUpdate",({delta:c,hasLayoutChanged:u})=>{this.isDragging&&u&&(is(d=>{const h=this.getAxisMotionValue(d);h&&(this.originPoint[d]+=c[d].translate,h.set(h.get()+c[d].translate))}),this.visualElement.render())});return()=>{a(),r(),i(),l&&l()}}getProps(){const e=this.visualElement.getProps(),{drag:r=!1,dragDirectionLock:n=!1,dragPropagation:s=!1,dragConstraints:i=!1,dragElastic:a=Tv,dragMomentum:l=!0}=e;return{...e,drag:r,dragDirectionLock:n,dragPropagation:s,dragConstraints:i,dragElastic:a,dragMomentum:l}}}function cm(t,e,r){return(e===!0||e===t)&&(r===null||r===t)}function are(t,e=10){let r=null;return Math.abs(t.y)>e?r="y":Math.abs(t.x)>e&&(r="x"),r}class ore extends Xo{constructor(e){super(e),this.removeGroupControls=sr,this.removeListeners=sr,this.controls=new ire(e)}mount(){const{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||sr}unmount(){this.removeGroupControls(),this.removeListeners()}}const PC=t=>(e,r)=>{t&&Pt.update(()=>t(e,r))};class lre extends Xo{constructor(){super(...arguments),this.removePointerDownListener=sr}onPointerDown(e){this.session=new t8(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:o8(this.node)})}createPanHandlers(){const{onPanSessionStart:e,onPanStart:r,onPan:n,onPanEnd:s}=this.node.getProps();return{onSessionStart:PC(e),onStart:PC(r),onMove:n,onEnd:(i,a)=>{delete this.session,s&&Pt.update(()=>s(i,a))}}}mount(){this.removePointerDownListener=ia(this.node.current,"pointerdown",e=>this.onPointerDown(e))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}function cre(){const t=M.useContext(Iy);if(t===null)return[!0,null];const{isPresent:e,onExitComplete:r,register:n}=t,s=M.useId();return M.useEffect(()=>n(s),[]),!e&&r?[!1,()=>r&&r(s)]:[!0]}const t0={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function _C(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const rh={correct:(t,e)=>{if(!e.target)return t;if(typeof t=="string")if(qe.test(t))t=parseFloat(t);else return t;const r=_C(t,e.target.x),n=_C(t,e.target.y);return`${r}% ${n}%`}},ure={correct:(t,{treeScale:e,projectionDelta:r})=>{const n=t,s=Do.parse(t);if(s.length>5)return n;const i=Do.createTransformer(t),a=typeof s[0]!="number"?1:0,l=r.x.scale*e.x,c=r.y.scale*e.y;s[0+a]/=l,s[1+a]/=c;const u=$t(l,c,.5);return typeof s[2+a]=="number"&&(s[2+a]/=u),typeof s[3+a]=="number"&&(s[3+a]/=u),i(s)}};class dre extends ut.Component{componentDidMount(){const{visualElement:e,layoutGroup:r,switchLayoutGroup:n,layoutId:s}=this.props,{projection:i}=e;xQ(hre),i&&(r.group&&r.group.add(i),n&&n.register&&s&&n.register(i),i.root.didUpdate(),i.addEventListener("animationComplete",()=>{this.safeToRemove()}),i.setOptions({...i.options,onExitComplete:()=>this.safeToRemove()})),t0.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){const{layoutDependency:r,visualElement:n,drag:s,isPresent:i}=this.props,a=n.projection;return a&&(a.isPresent=i,s||e.layoutDependency!==r||r===void 0?a.willUpdate():this.safeToRemove(),e.isPresent!==i&&(i?a.promote():a.relegate()||Pt.postRender(()=>{const l=a.getStack();(!l||!l.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:e}=this.props.visualElement;e&&(e.root.didUpdate(),queueMicrotask(()=>{!e.currentAnimation&&e.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:e,layoutGroup:r,switchLayoutGroup:n}=this.props,{projection:s}=e;s&&(s.scheduleCheckAfterUnmount(),r&&r.group&&r.group.remove(s),n&&n.deregister&&n.deregister(s))}safeToRemove(){const{safeToRemove:e}=this.props;e&&e()}render(){return null}}function l8(t){const[e,r]=cre(),n=M.useContext(dS);return ut.createElement(dre,{...t,layoutGroup:n,switchLayoutGroup:M.useContext(nO),isPresent:e,safeToRemove:r})}const hre={borderRadius:{...rh,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:rh,borderTopRightRadius:rh,borderBottomLeftRadius:rh,borderBottomRightRadius:rh,boxShadow:ure},c8=["TopLeft","TopRight","BottomLeft","BottomRight"],pre=c8.length,IC=t=>typeof t=="string"?parseFloat(t):t,OC=t=>typeof t=="number"||qe.test(t);function fre(t,e,r,n,s,i){s?(t.opacity=$t(0,r.opacity!==void 0?r.opacity:1,mre(n)),t.opacityExit=$t(e.opacity!==void 0?e.opacity:1,0,gre(n))):i&&(t.opacity=$t(e.opacity!==void 0?e.opacity:1,r.opacity!==void 0?r.opacity:1,n));for(let a=0;a<pre;a++){const l=`border${c8[a]}Radius`;let c=RC(e,l),u=RC(r,l);if(c===void 0&&u===void 0)continue;c||(c=0),u||(u=0),c===0||u===0||OC(c)===OC(u)?(t[l]=Math.max($t(IC(c),IC(u),n),0),(Ci.test(u)||Ci.test(c))&&(t[l]+="%")):t[l]=u}(e.rotate||r.rotate)&&(t.rotate=$t(e.rotate||0,r.rotate||0,n))}function RC(t,e){return t[e]!==void 0?t[e]:t.borderRadius}const mre=u8(0,.5,_O),gre=u8(.5,.95,sr);function u8(t,e,r){return n=>n<t?0:n>e?1:r(Ip(t,e,n))}function LC(t,e){t.min=e.min,t.max=e.max}function rs(t,e){LC(t.x,e.x),LC(t.y,e.y)}function MC(t,e,r,n,s){return t-=e,t=eg(t,1/r,n),s!==void 0&&(t=eg(t,1/s,n)),t}function yre(t,e=0,r=1,n=.5,s,i=t,a=t){if(Ci.test(e)&&(e=parseFloat(e),e=$t(a.min,a.max,e/100)-a.min),typeof e!="number")return;let l=$t(i.min,i.max,n);t===i&&(l-=e),t.min=MC(t.min,e,r,l,s),t.max=MC(t.max,e,r,l,s)}function DC(t,e,[r,n,s],i,a){yre(t,e[r],e[n],e[s],e.scale,i,a)}const xre=["x","scaleX","originX"],wre=["y","scaleY","originY"];function FC(t,e,r,n){DC(t.x,e,xre,r?r.x:void 0,n?n.x:void 0),DC(t.y,e,wre,r?r.y:void 0,n?n.y:void 0)}function BC(t){return t.translate===0&&t.scale===1}function d8(t){return BC(t.x)&&BC(t.y)}function bre(t,e){return t.x.min===e.x.min&&t.x.max===e.x.max&&t.y.min===e.y.min&&t.y.max===e.y.max}function h8(t,e){return Math.round(t.x.min)===Math.round(e.x.min)&&Math.round(t.x.max)===Math.round(e.x.max)&&Math.round(t.y.min)===Math.round(e.y.min)&&Math.round(t.y.max)===Math.round(e.y.max)}function $C(t){return Yn(t.x)/Yn(t.y)}class kre{constructor(){this.members=[]}add(e){CS(this.members,e),e.scheduleRender()}remove(e){if(ES(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){const r=this.members[this.members.length-1];r&&this.promote(r)}}relegate(e){const r=this.members.findIndex(s=>e===s);if(r===0)return!1;let n;for(let s=r;s>=0;s--){const i=this.members[s];if(i.isPresent!==!1){n=i;break}}return n?(this.promote(n),!0):!1}promote(e,r){const n=this.lead;if(e!==n&&(this.prevLead=n,this.lead=e,e.show(),n)){n.instance&&n.scheduleRender(),e.scheduleRender(),e.resumeFrom=n,r&&(e.resumeFrom.preserveOpacity=!0),n.snapshot&&(e.snapshot=n.snapshot,e.snapshot.latestValues=n.animationValues||n.latestValues),e.root&&e.root.isUpdating&&(e.isLayoutDirty=!0);const{crossfade:s}=e.options;s===!1&&n.hide()}}exitAnimationComplete(){this.members.forEach(e=>{const{options:r,resumingFrom:n}=e;r.onExitComplete&&r.onExitComplete(),n&&n.options.onExitComplete&&n.options.onExitComplete()})}scheduleRender(){this.members.forEach(e=>{e.instance&&e.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function UC(t,e,r){let n="";const s=t.x.translate/e.x,i=t.y.translate/e.y;if((s||i)&&(n=`translate3d(${s}px, ${i}px, 0) `),(e.x!==1||e.y!==1)&&(n+=`scale(${1/e.x}, ${1/e.y}) `),r){const{rotate:c,rotateX:u,rotateY:d}=r;c&&(n+=`rotate(${c}deg) `),u&&(n+=`rotateX(${u}deg) `),d&&(n+=`rotateY(${d}deg) `)}const a=t.x.scale*e.x,l=t.y.scale*e.y;return(a!==1||l!==1)&&(n+=`scale(${a}, ${l})`),n||"none"}const vre=(t,e)=>t.depth-e.depth;class jre{constructor(){this.children=[],this.isDirty=!1}add(e){CS(this.children,e),this.isDirty=!0}remove(e){ES(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(vre),this.isDirty=!1,this.children.forEach(e)}}function Sre(t,e){const r=performance.now(),n=({timestamp:s})=>{const i=s-r;i>=e&&(ya(n),t(i-e))};return Pt.read(n,!0),()=>ya(n)}function Nre(t){window.MotionDebug&&window.MotionDebug.record(t)}function Cre(t){return t instanceof SVGElement&&t.tagName!=="svg"}function Ere(t,e,r){const n=Bn(t)?t:Qu(t);return n.start(NS("",n,e,r)),n.animation}const WC=["","X","Y","Z"],Tre={visibility:"hidden"},VC=1e3;let Are=0;const ml={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0};function p8({attachResizeListener:t,defaultParent:e,measureScroll:r,checkIsScrollRoot:n,resetTransform:s}){return class{constructor(a={},l=e==null?void 0:e()){this.id=Are++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,ml.totalNodes=ml.resolvedTargetDeltas=ml.recalculatedProjection=0,this.nodes.forEach(_re),this.nodes.forEach(Mre),this.nodes.forEach(Dre),this.nodes.forEach(Ire),Nre(ml)},this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=a,this.root=l?l.root||l:this,this.path=l?[...l.path,l]:[],this.parent=l,this.depth=l?l.depth+1:0;for(let c=0;c<this.path.length;c++)this.path[c].shouldResetTransform=!0;this.root===this&&(this.nodes=new jre)}addEventListener(a,l){return this.eventHandlers.has(a)||this.eventHandlers.set(a,new TS),this.eventHandlers.get(a).add(l)}notifyListeners(a,...l){const c=this.eventHandlers.get(a);c&&c.notify(...l)}hasListeners(a){return this.eventHandlers.has(a)}mount(a,l=this.root.hasTreeAnimated){if(this.instance)return;this.isSVG=Cre(a),this.instance=a;const{layoutId:c,layout:u,visualElement:d}=this.options;if(d&&!d.current&&d.mount(a),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),l&&(u||c)&&(this.isLayoutDirty=!0),t){let h;const p=()=>this.root.updateBlockedByResize=!1;t(a,()=>{this.root.updateBlockedByResize=!0,h&&h(),h=Sre(p,250),t0.hasAnimatedSinceResize&&(t0.hasAnimatedSinceResize=!1,this.nodes.forEach(qC))})}c&&this.root.registerSharedNode(c,this),this.options.animate!==!1&&d&&(c||u)&&this.addEventListener("didUpdate",({delta:h,hasLayoutChanged:p,hasRelativeTargetChanged:f,layout:m})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const y=this.options.transition||d.getDefaultTransition()||Wre,{onLayoutAnimationStart:k,onLayoutAnimationComplete:g}=d.getProps(),x=!this.targetLayout||!h8(this.targetLayout,m)||f,w=!p&&f;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||w||p&&(x||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(h,w);const b={...SS(y,"layout"),onPlay:k,onComplete:g};(d.shouldReduceMotion||this.options.layoutRoot)&&(b.delay=0,b.type=!1),this.startAnimation(b)}else p||qC(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=m})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const a=this.getStack();a&&a.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,ya(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(Fre),this.animationId++)}getTransformTemplate(){const{visualElement:a}=this.options;return a&&a.getProps().transformTemplate}willUpdate(a=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let d=0;d<this.path.length;d++){const h=this.path[d];h.shouldResetTransform=!0,h.updateScroll("snapshot"),h.options.layoutRoot&&h.willUpdate(!1)}const{layoutId:l,layout:c}=this.options;if(l===void 0&&!c)return;const u=this.getTransformTemplate();this.prevTransformTemplateValue=u?u(this.latestValues,""):void 0,this.updateSnapshot(),a&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(HC);return}this.isUpdating||this.nodes.forEach(Rre),this.isUpdating=!1,this.nodes.forEach(Lre),this.nodes.forEach(zre),this.nodes.forEach(Pre),this.clearAllSnapshots();const l=performance.now();Gr.delta=Mo(0,1e3/60,l-Gr.timestamp),Gr.timestamp=l,Gr.isProcessing=!0,ow.update.process(Gr),ow.preRender.process(Gr),ow.render.process(Gr),Gr.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,queueMicrotask(()=>this.update()))}clearAllSnapshots(){this.nodes.forEach(Ore),this.sharedNodes.forEach(Bre)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,Pt.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){Pt.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure())}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let c=0;c<this.path.length;c++)this.path[c].updateScroll();const a=this.layout;this.layout=this.measure(!1),this.layoutCorrected=ur(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:l}=this.options;l&&l.notify("LayoutMeasure",this.layout.layoutBox,a?a.layoutBox:void 0)}updateScroll(a="measure"){let l=!!(this.options.layoutScroll&&this.instance);this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===a&&(l=!1),l&&(this.scroll={animationId:this.root.animationId,phase:a,isRoot:n(this.instance),offset:r(this.instance)})}resetTransform(){if(!s)return;const a=this.isLayoutDirty||this.shouldResetTransform,l=this.projectionDelta&&!d8(this.projectionDelta),c=this.getTransformTemplate(),u=c?c(this.latestValues,""):void 0,d=u!==this.prevTransformTemplateValue;a&&(l||fl(this.latestValues)||d)&&(s(this.instance,u),this.shouldResetTransform=!1,this.scheduleRender())}measure(a=!0){const l=this.measurePageBox();let c=this.removeElementScroll(l);return a&&(c=this.removeTransform(c)),Vre(c),{animationId:this.root.animationId,measuredBox:l,layoutBox:c,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:a}=this.options;if(!a)return ur();const l=a.measureViewportBox(),{scroll:c}=this.root;return c&&(Da(l.x,c.offset.x),Da(l.y,c.offset.y)),l}removeElementScroll(a){const l=ur();rs(l,a);for(let c=0;c<this.path.length;c++){const u=this.path[c],{scroll:d,options:h}=u;if(u!==this.root&&d&&h.layoutScroll){if(d.isRoot){rs(l,a);const{scroll:p}=this.root;p&&(Da(l.x,-p.offset.x),Da(l.y,-p.offset.y))}Da(l.x,d.offset.x),Da(l.y,d.offset.y)}}return l}applyTransform(a,l=!1){const c=ur();rs(c,a);for(let u=0;u<this.path.length;u++){const d=this.path[u];!l&&d.options.layoutScroll&&d.scroll&&d!==d.root&&du(c,{x:-d.scroll.offset.x,y:-d.scroll.offset.y}),fl(d.latestValues)&&du(c,d.latestValues)}return fl(this.latestValues)&&du(c,this.latestValues),c}removeTransform(a){const l=ur();rs(l,a);for(let c=0;c<this.path.length;c++){const u=this.path[c];if(!u.instance||!fl(u.latestValues))continue;Av(u.latestValues)&&u.updateSnapshot();const d=ur(),h=u.measurePageBox();rs(d,h),FC(l,u.latestValues,u.snapshot?u.snapshot.layoutBox:void 0,d)}return fl(this.latestValues)&&FC(l,this.latestValues),l}setTargetDelta(a){this.targetDelta=a,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(a){this.options={...this.options,...a,crossfade:a.crossfade!==void 0?a.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==Gr.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(a=!1){var l;const c=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=c.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=c.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=c.isSharedProjectionDirty);const u=!!this.resumingFrom||this!==c;if(!(a||u&&this.isSharedProjectionDirty||this.isProjectionDirty||!((l=this.parent)===null||l===void 0)&&l.isProjectionDirty||this.attemptToResolveRelativeTarget))return;const{layout:h,layoutId:p}=this.options;if(!(!this.layout||!(h||p))){if(this.resolvedRelativeTargetAt=Gr.timestamp,!this.targetDelta&&!this.relativeTarget){const f=this.getClosestProjectingParent();f&&f.layout&&this.animationProgress!==1?(this.relativeParent=f,this.forceRelativeParentToResolveTarget(),this.relativeTarget=ur(),this.relativeTargetOrigin=ur(),Uh(this.relativeTargetOrigin,this.layout.layoutBox,f.layout.layoutBox),rs(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)){if(this.target||(this.target=ur(),this.targetWithTransforms=ur()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),Hte(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):rs(this.target,this.layout.layoutBox),i8(this.target,this.targetDelta)):rs(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget){this.attemptToResolveRelativeTarget=!1;const f=this.getClosestProjectingParent();f&&!!f.resumingFrom==!!this.resumingFrom&&!f.options.layoutScroll&&f.target&&this.animationProgress!==1?(this.relativeParent=f,this.forceRelativeParentToResolveTarget(),this.relativeTarget=ur(),this.relativeTargetOrigin=ur(),Uh(this.relativeTargetOrigin,this.target,f.target),rs(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}ml.resolvedTargetDeltas++}}}getClosestProjectingParent(){if(!(!this.parent||Av(this.parent.latestValues)||s8(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var a;const l=this.getLead(),c=!!this.resumingFrom||this!==l;let u=!0;if((this.isProjectionDirty||!((a=this.parent)===null||a===void 0)&&a.isProjectionDirty)&&(u=!1),c&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(u=!1),this.resolvedRelativeTargetAt===Gr.timestamp&&(u=!1),u)return;const{layout:d,layoutId:h}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(d||h))return;rs(this.layoutCorrected,this.layout.layoutBox);const p=this.treeScale.x,f=this.treeScale.y;ere(this.layoutCorrected,this.treeScale,this.path,c),l.layout&&!l.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(l.target=l.layout.layoutBox);const{target:m}=l;if(!m){this.projectionTransform&&(this.projectionDelta=uu(),this.projectionTransform="none",this.scheduleRender());return}this.projectionDelta||(this.projectionDelta=uu(),this.projectionDeltaWithTransform=uu());const y=this.projectionTransform;$h(this.projectionDelta,this.layoutCorrected,m,this.latestValues),this.projectionTransform=UC(this.projectionDelta,this.treeScale),(this.projectionTransform!==y||this.treeScale.x!==p||this.treeScale.y!==f)&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",m)),ml.recalculatedProjection++}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(a=!0){if(this.options.scheduleRender&&this.options.scheduleRender(),a){const l=this.getStack();l&&l.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}setAnimationOrigin(a,l=!1){const c=this.snapshot,u=c?c.latestValues:{},d={...this.latestValues},h=uu();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!l;const p=ur(),f=c?c.source:void 0,m=this.layout?this.layout.source:void 0,y=f!==m,k=this.getStack(),g=!k||k.members.length<=1,x=!!(y&&!g&&this.options.crossfade===!0&&!this.path.some(Ure));this.animationProgress=0;let w;this.mixTargetDelta=b=>{const v=b/1e3;KC(h.x,a.x,v),KC(h.y,a.y,v),this.setTargetDelta(h),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Uh(p,this.layout.layoutBox,this.relativeParent.layout.layoutBox),$re(this.relativeTarget,this.relativeTargetOrigin,p,v),w&&bre(this.relativeTarget,w)&&(this.isProjectionDirty=!1),w||(w=ur()),rs(w,this.relativeTarget)),y&&(this.animationValues=d,fre(d,u,this.latestValues,v,x,g)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=v},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(a){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(ya(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Pt.update(()=>{t0.hasAnimatedSinceResize=!0,this.currentAnimation=Ere(0,VC,{...a,onUpdate:l=>{this.mixTargetDelta(l),a.onUpdate&&a.onUpdate(l)},onComplete:()=>{a.onComplete&&a.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const a=this.getStack();a&&a.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(VC),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const a=this.getLead();let{targetWithTransforms:l,target:c,layout:u,latestValues:d}=a;if(!(!l||!c||!u)){if(this!==a&&this.layout&&u&&f8(this.options.animationType,this.layout.layoutBox,u.layoutBox)){c=this.target||ur();const h=Yn(this.layout.layoutBox.x);c.x.min=a.target.x.min,c.x.max=c.x.min+h;const p=Yn(this.layout.layoutBox.y);c.y.min=a.target.y.min,c.y.max=c.y.min+p}rs(l,c),du(l,d),$h(this.projectionDeltaWithTransform,this.layoutCorrected,l,d)}}registerSharedNode(a,l){this.sharedNodes.has(a)||this.sharedNodes.set(a,new kre),this.sharedNodes.get(a).add(l);const u=l.options.initialPromotionConfig;l.promote({transition:u?u.transition:void 0,preserveFollowOpacity:u&&u.shouldPreserveFollowOpacity?u.shouldPreserveFollowOpacity(l):void 0})}isLead(){const a=this.getStack();return a?a.lead===this:!0}getLead(){var a;const{layoutId:l}=this.options;return l?((a=this.getStack())===null||a===void 0?void 0:a.lead)||this:this}getPrevLead(){var a;const{layoutId:l}=this.options;return l?(a=this.getStack())===null||a===void 0?void 0:a.prevLead:void 0}getStack(){const{layoutId:a}=this.options;if(a)return this.root.sharedNodes.get(a)}promote({needsReset:a,transition:l,preserveFollowOpacity:c}={}){const u=this.getStack();u&&u.promote(this,c),a&&(this.projectionDelta=void 0,this.needsReset=!0),l&&this.setOptions({transition:l})}relegate(){const a=this.getStack();return a?a.relegate(this):!1}resetRotation(){const{visualElement:a}=this.options;if(!a)return;let l=!1;const{latestValues:c}=a;if((c.rotate||c.rotateX||c.rotateY||c.rotateZ)&&(l=!0),!l)return;const u={};for(let d=0;d<WC.length;d++){const h="rotate"+WC[d];c[h]&&(u[h]=c[h],a.setStaticValue(h,0))}a.render();for(const d in u)a.setStaticValue(d,u[d]);a.scheduleRender()}getProjectionStyles(a){var l,c;if(!this.instance||this.isSVG)return;if(!this.isVisible)return Tre;const u={visibility:""},d=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,u.opacity="",u.pointerEvents=e0(a==null?void 0:a.pointerEvents)||"",u.transform=d?d(this.latestValues,""):"none",u;const h=this.getLead();if(!this.projectionDelta||!this.layout||!h.target){const y={};return this.options.layoutId&&(y.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,y.pointerEvents=e0(a==null?void 0:a.pointerEvents)||""),this.hasProjected&&!fl(this.latestValues)&&(y.transform=d?d({},""):"none",this.hasProjected=!1),y}const p=h.animationValues||h.latestValues;this.applyTransformsToTarget(),u.transform=UC(this.projectionDeltaWithTransform,this.treeScale,p),d&&(u.transform=d(p,u.transform));const{x:f,y:m}=this.projectionDelta;u.transformOrigin=`${f.origin*100}% ${m.origin*100}% 0`,h.animationValues?u.opacity=h===this?(c=(l=p.opacity)!==null&&l!==void 0?l:this.latestValues.opacity)!==null&&c!==void 0?c:1:this.preserveOpacity?this.latestValues.opacity:p.opacityExit:u.opacity=h===this?p.opacity!==void 0?p.opacity:"":p.opacityExit!==void 0?p.opacityExit:0;for(const y in K0){if(p[y]===void 0)continue;const{correct:k,applyTo:g}=K0[y],x=u.transform==="none"?p[y]:k(p[y],h);if(g){const w=g.length;for(let b=0;b<w;b++)u[g[b]]=x}else u[y]=x}return this.options.layoutId&&(u.pointerEvents=h===this?e0(a==null?void 0:a.pointerEvents)||"":"none"),u}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(a=>{var l;return(l=a.currentAnimation)===null||l===void 0?void 0:l.stop()}),this.root.nodes.forEach(HC),this.root.sharedNodes.clear()}}}function zre(t){t.updateLayout()}function Pre(t){var e;const r=((e=t.resumeFrom)===null||e===void 0?void 0:e.snapshot)||t.snapshot;if(t.isLead()&&t.layout&&r&&t.hasListeners("didUpdate")){const{layoutBox:n,measuredBox:s}=t.layout,{animationType:i}=t.options,a=r.source!==t.layout.source;i==="size"?is(h=>{const p=a?r.measuredBox[h]:r.layoutBox[h],f=Yn(p);p.min=n[h].min,p.max=p.min+f}):f8(i,r.layoutBox,n)&&is(h=>{const p=a?r.measuredBox[h]:r.layoutBox[h],f=Yn(n[h]);p.max=p.min+f,t.relativeTarget&&!t.currentAnimation&&(t.isProjectionDirty=!0,t.relativeTarget[h].max=t.relativeTarget[h].min+f)});const l=uu();$h(l,n,r.layoutBox);const c=uu();a?$h(c,t.applyTransform(s,!0),r.measuredBox):$h(c,n,r.layoutBox);const u=!d8(l);let d=!1;if(!t.resumeFrom){const h=t.getClosestProjectingParent();if(h&&!h.resumeFrom){const{snapshot:p,layout:f}=h;if(p&&f){const m=ur();Uh(m,r.layoutBox,p.layoutBox);const y=ur();Uh(y,n,f.layoutBox),h8(m,y)||(d=!0),h.options.layoutRoot&&(t.relativeTarget=y,t.relativeTargetOrigin=m,t.relativeParent=h)}}}t.notifyListeners("didUpdate",{layout:n,snapshot:r,delta:c,layoutDelta:l,hasLayoutChanged:u,hasRelativeTargetChanged:d})}else if(t.isLead()){const{onExitComplete:n}=t.options;n&&n()}t.options.transition=void 0}function _re(t){ml.totalNodes++,t.parent&&(t.isProjecting()||(t.isProjectionDirty=t.parent.isProjectionDirty),t.isSharedProjectionDirty||(t.isSharedProjectionDirty=!!(t.isProjectionDirty||t.parent.isProjectionDirty||t.parent.isSharedProjectionDirty)),t.isTransformDirty||(t.isTransformDirty=t.parent.isTransformDirty))}function Ire(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function Ore(t){t.clearSnapshot()}function HC(t){t.clearMeasurements()}function Rre(t){t.isLayoutDirty=!1}function Lre(t){const{visualElement:e}=t.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function qC(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0,t.isProjectionDirty=!0}function Mre(t){t.resolveTargetDelta()}function Dre(t){t.calcProjection()}function Fre(t){t.resetRotation()}function Bre(t){t.removeLeadSnapshot()}function KC(t,e,r){t.translate=$t(e.translate,0,r),t.scale=$t(e.scale,1,r),t.origin=e.origin,t.originPoint=e.originPoint}function GC(t,e,r,n){t.min=$t(e.min,r.min,n),t.max=$t(e.max,r.max,n)}function $re(t,e,r,n){GC(t.x,e.x,r.x,n),GC(t.y,e.y,r.y,n)}function Ure(t){return t.animationValues&&t.animationValues.opacityExit!==void 0}const Wre={duration:.45,ease:[.4,0,.1,1]},ZC=t=>typeof navigator<"u"&&navigator.userAgent.toLowerCase().includes(t),YC=ZC("applewebkit/")&&!ZC("chrome/")?Math.round:sr;function JC(t){t.min=YC(t.min),t.max=YC(t.max)}function Vre(t){JC(t.x),JC(t.y)}function f8(t,e,r){return t==="position"||t==="preserve-aspect"&&!Ev($C(e),$C(r),.2)}const Hre=p8({attachResizeListener:(t,e)=>ea(t,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),xw={current:void 0},m8=p8({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!xw.current){const t=new Hre({});t.mount(window),t.setOptions({layoutScroll:!0}),xw.current=t}return xw.current},resetTransform:(t,e)=>{t.style.transform=e!==void 0?e:"none"},checkIsScrollRoot:t=>window.getComputedStyle(t).position==="fixed"}),qre={pan:{Feature:lre},drag:{Feature:ore,ProjectionNode:m8,MeasureLayout:l8}},Kre=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/;function Gre(t){const e=Kre.exec(t);if(!e)return[,];const[,r,n]=e;return[r,n]}function Pv(t,e,r=1){const[n,s]=Gre(t);if(!n)return;const i=window.getComputedStyle(e).getPropertyValue(n);if(i){const a=i.trim();return JO(a)?parseFloat(a):a}else return bv(s)?Pv(s,e,r+1):s}function Zre(t,{...e},r){const n=t.current;if(!(n instanceof Element))return{target:e,transitionEnd:r};r&&(r={...r}
754),t.values.forEach(s=>{const i=s.get();if(!bv(i))return;const a=Pv(i,n);a&&s.set(a)});for(const s in e){const i=e[s];if(!bv(i))continue;const a=Pv(i,n);a&&(e[s]=a,r||(r={}),r[s]===void 0&&(r[s]=i))}return{target:e,transitionEnd:r}}const Yre=new Set(["width","height","top","left","right","bottom","x","y","translateX","translateY"]),g8=t=>Yre.has(t),Jre=t=>Object.keys(t).some(g8),XC=t=>t===Sc||t===qe,QC=(t,e)=>parseFloat(t.split(", ")[e]),eE=(t,e)=>(r,{transform:n})=>{if(n==="none"||!n)return 0;const s=n.match(/^matrix3d\((.+)\)$/);if(s)return QC(s[1],e);{const i=n.match(/^matrix\((.+)\)$/);return i?QC(i[1],t):0}},Xre=new Set(["x","y","z"]),Qre=hf.filter(t=>!Xre.has(t));function ene(t){const e=[];return Qre.forEach(r=>{const n=t.getValue(r);n!==void 0&&(e.push([r,n.get()]),n.set(r.startsWith("scale")?1:0))}),e.length&&t.render(),e}const ed={width:({x:t},{paddingLeft:e="0",paddingRight:r="0"})=>t.max-t.min-parseFloat(e)-parseFloat(r),height:({y:t},{paddingTop:e="0",paddingBottom:r="0"})=>t.max-t.min-parseFloat(e)-parseFloat(r),top:(t,{top:e})=>parseFloat(e),left:(t,{left:e})=>parseFloat(e),bottom:({y:t},{top:e})=>parseFloat(e)+(t.max-t.min),right:({x:t},{left:e})=>parseFloat(e)+(t.max-t.min),x:eE(4,13),y:eE(5,14)};ed.translateX=ed.x;ed.translateY=ed.y;const tne=(t,e,r)=>{const n=e.measureViewportBox(),s=e.current,i=getComputedStyle(s),{display:a}=i,l={};a==="none"&&e.setStaticValue("display",t.display||"block"),r.forEach(u=>{l[u]=ed[u](n,i)}),e.render();const c=e.measureViewportBox();return r.forEach(u=>{const d=e.getValue(u);d&&d.jump(l[u]),t[u]=ed[u](c,i)}),t},rne=(t,e,r={},n={})=>{e={...e},n={...n};const s=Object.keys(e).filter(g8);let i=[],a=!1;const l=[];if(s.forEach(c=>{const u=t.getValue(c);if(!t.hasValue(c))return;let d=r[c],h=th(d);const p=e[c];let f;if(Z0(p)){const m=p.length,y=p[0]===null?1:0;d=p[y],h=th(d);for(let k=y;k<m&&p[k]!==null;k++)f?wS(th(p[k])===f):f=th(p[k])}else f=th(p);if(h!==f)if(XC(h)&&XC(f)){const m=u.get();typeof m=="string"&&u.set(parseFloat(m)),typeof p=="string"?e[c]=parseFloat(p):Array.isArray(p)&&f===qe&&(e[c]=p.map(parseFloat))}else h!=null&&h.transform&&(f!=null&&f.transform)&&(d===0||p===0)?d===0?u.set(f.transform(d)):e[c]=h.transform(p):(a||(i=ene(t),a=!0),l.push(c),n[c]=n[c]!==void 0?n[c]:e[c],u.jump(p))}),l.length){const c=l.indexOf("height")>=0?window.pageYOffset:null,u=tne(e,t,l);return i.length&&i.forEach(([d,h])=>{t.getValue(d).set(h)}),t.render(),Oy&&c!==null&&window.scrollTo({top:c}),{target:u,transitionEnd:n}}else return{target:e,transitionEnd:n}};function nne(t,e,r,n){return Jre(e)?rne(t,e,r,n):{target:e,transitionEnd:n}}const sne=(t,e,r,n)=>{const s=Zre(t,e,n);return e=s.target,n=s.transitionEnd,nne(t,e,r,n)},_v={current:null},y8={current:!1};function ine(){if(y8.current=!0,!!Oy)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>_v.current=t.matches;t.addListener(e),e()}else _v.current=!1}function ane(t,e,r){const{willChange:n}=e;for(const s in e){const i=e[s],a=r[s];if(Bn(i))t.addValue(s,i),Q0(n)&&n.add(s);else if(Bn(a))t.addValue(s,Qu(i,{owner:t})),Q0(n)&&n.remove(s);else if(a!==i)if(t.hasValue(s)){const l=t.getValue(s);!l.hasAnimated&&l.set(i)}else{const l=t.getStaticValue(s);t.addValue(s,Qu(l!==void 0?l:i,{owner:t}))}}for(const s in r)e[s]===void 0&&t.removeValue(s);return e}const tE=new WeakMap,x8=Object.keys(_p),one=x8.length,rE=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],lne=uS.length;class cne{constructor({parent:e,props:r,presenceContext:n,reducedMotionConfig:s,visualState:i},a={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.scheduleRender=()=>Pt.render(this.render,!1,!0);const{latestValues:l,renderState:c}=i;this.latestValues=l,this.baseTarget={...l},this.initialValues=r.initial?{...l}:{},this.renderState=c,this.parent=e,this.props=r,this.presenceContext=n,this.depth=e?e.depth+1:0,this.reducedMotionConfig=s,this.options=a,this.isControllingVariants=Ly(r),this.isVariantNode=rO(r),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);const{willChange:u,...d}=this.scrapeMotionValuesFromProps(r,{});for(const h in d){const p=d[h];l[h]!==void 0&&Bn(p)&&(p.set(l[h],!1),Q0(u)&&u.add(h))}}scrapeMotionValuesFromProps(e,r){return{}}mount(e){this.current=e,tE.set(e,this),this.projection&&!this.projection.instance&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEac
vendor: 6,646 bytes, line 754
754h((r,n)=>this.bindToMotionValue(n,r)),y8.current||ine(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:_v.current,this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){tE.delete(this.current),this.projection&&this.projection.unmount(),ya(this.notifyUpdate),ya(this.render),this.valueSubscriptions.forEach(e=>e()),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const e in this.events)this.events[e].clear();for(const e in this.features)this.features[e].unmount();this.current=null}bindToMotionValue(e,r){const n=jc.has(e),s=r.on("change",a=>{this.latestValues[e]=a,this.props.onUpdate&&Pt.update(this.notifyUpdate,!1,!0),n&&this.projection&&(this.projection.isTransformDirty=!0)}),i=r.on("renderRequest",this.scheduleRender);this.valueSubscriptions.set(e,()=>{s(),i()})}sortNodePosition(e){return!this.current||!this.sortInstanceNodePosition||this.type!==e.type?0:this.sortInstanceNodePosition(this.current,e.current)}loadFeatures({children:e,...r},n,s,i){let a,l;for(let c=0;c<one;c++){const u=x8[c],{isEnabled:d,Feature:h,ProjectionNode:p,MeasureLayout:f}=_p[u];p&&(a=p),d(r)&&(!this.features[u]&&h&&(this.features[u]=new h(this)),f&&(l=f))}if((this.type==="html"||this.type==="svg")&&!this.projection&&a){this.projection=new a(this.latestValues,this.parent&&this.parent.projection);const{layoutId:c,layout:u,drag:d,dragConstraints:h,layoutScroll:p,layoutRoot:f}=r;this.projection.setOptions({layoutId:c,layout:u,alwaysMeasureLayout:!!d||h&&lu(h),visualElement:this,scheduleRender:()=>this.scheduleRender(),animationType:typeof u=="string"?u:"both",initialPromotionConfig:i,layoutScroll:p,layoutRoot:f})}return l}updateFeatures(){for(const e in this.features){const r=this.features[e];r.isMounted?r.update():(r.mount(),r.isMounted=!0)}}triggerBuild(){this.build(this.renderState,this.latestValues,this.options,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):ur()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,r){this.latestValues[e]=r}makeTargetAnimatable(e,r=!0){return this.makeTargetAnimatableFromInstance(e,this.props,r)}update(e,r){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=r;for(let n=0;n<rE.length;n++){const s=rE[n];this.propEventSubscriptions[s]&&(this.propEventSubscriptions[s](),delete this.propEventSubscriptions[s]);const i=e["on"+s];i&&(this.propEventSubscriptions[s]=this.on(s,i))}this.prevMotionValues=ane(this,this.scrapeMotionValuesFromProps(e,this.prevProps),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(e){return this.props.variants?this.props.variants[e]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}getVariantContext(e=!1){if(e)return this.parent?this.parent.getVariantContext():void 0;if(!this.isControllingVariants){const n=this.parent?this.parent.getVariantContext()||{}:{};return this.props.initial!==void 0&&(n.initial=this.props.initial),n}const r={};for(let n=0;n<lne;n++){const s=uS[n],i=this.props[s];(Pp(i)||i===!1)&&(r[s]=i)}return r}addVariantChild(e){const r=this.getClosestVariantNode();if(r)return r.variantChildren&&r.variantChildren.add(e),()=>r.variantChildren.delete(e)}addValue(e,r){r!==this.values.get(e)&&(this.removeValue(e),this.bindToMotionValue(e,r)),this.values.set(e,r),this.latestValues[e]=r.get()}removeValue(e){this.values.delete(e);const r=this.valueSubscriptions.get(e);r&&(r(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,r){if(this.props.values&&this.props.values[e])return this.props.values[e];let n=this.values.get(e);return n===void 0&&r!==void 0&&(n=Qu(r,{owner:this}),this.addValue(e,n)),n}readValue(e){var r;return this.latestValues[e]!==void 0||!this.current?this.latestValues[e]:(r=this.getBaseTargetFromProps(this.props,e))!==null&&r!==void 0?r:this.readValueFromInstance(this.current,e,this.options)}setBaseTarget(e,r){this.baseTarget[e]=r}getBaseTarget(e){var r;const{initial:n}=this.props,s=typeof n=="string"||typeof n=="object"?(r=xS(this.props,n))===null||r===void 0?void 0:r[e]:void 0;if(n&&s!==void 0)return s;const i=this.getBaseTargetFromProps(this.props,e);return i!==void 0&&!Bn(i)?i:this.initialValues[e]!==void 0&&s===void 0?void 0:this.baseTarget[e]}on(e,r){return this.events[e]||(this.events[e]=new TS),this.events[e].add(r)}notify(e,...r){this.events[e]&&this.events[e].notify(...r)}}class w8 extends cne{sortInstanceNodePosition(e,r){return e.compareDocumentPosition(r)&2?1:-1}getBaseTargetFromProps(e,r){return e.style?e.style[r]:void 0}removeValueFromRenderState(e,{vars:r,style:n}){delete r[e],delete n[e]}makeTargetAnimatableFromInstance({transition:e,transitionEnd:r,...n},{transformValues:s},i){let a=Cte(n,e||{},this);if(s&&(r&&(r=s(r)),n&&(n=s(n)),a&&(a=s(a))),i){Ste(this,n,a);const l=sne(this,n,a,r);r=l.transitionEnd,n=l.target}return{transition:e,transitionEnd:r,...n}}}function une(t){return window.getComputedStyle(t)}class dne extends w8{constructor(){super(...arguments),this.type="html"}readValueFromInstance(e,r){if(jc.has(r)){const n=jS(r);return n&&n.default||0}else{const n=une(e),s=(aO(r)?n.getPropertyValue(r):n[r])||0;return typeof s=="string"?s.trim():s}}measureInstanceViewportBox(e,{transformPagePoint:r}){return a8(e,r)}build(e,r,n,s){pS(e,r,n,s.transformTemplate)}scrapeMotionValuesFromProps(e,r){return yS(e,r)}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:e}=this.props;Bn(e)&&(this.childSubscription=e.on("change",r=>{this.current&&(this.current.textContent=`${r}`)}))}renderInstance(e,r,n,s){hO(e,r,n,s)}}class hne extends w8{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1}getBaseTargetFromProps(e,r){return e[r]}readValueFromInstance(e,r){if(jc.has(r)){const n=jS(r);return n&&n.default||0}return r=pO.has(r)?r:lS(r),e.getAttribute(r)}measureInstanceViewportBox(){return ur()}scrapeMotionValuesFromProps(e,r){return mO(e,r)}build(e,r,n,s){mS(e,r,n,this.isSVGTag,s.transformTemplate)}renderInstance(e,r,n,s){fO(e,r,n,s)}mount(e){this.isSVGTag=gS(e.tagName),super.mount(e)}}
754const pne=(t,e)=>hS(t)?new hne(e,{enableHardwareAcceleration:!1}):new dne(e,{enableHardwareAcceleration:!0}),fne={layout:{ProjectionNode:m8,MeasureLayout:l8}},mne={...$te,...oee,...qre,...fne},ue=gQ((t,e)=>GQ(t,e,mne,pne));function b8(){const t=M.useRef(!1);return oS(()=>(t.current=!0,()=>{t.current=!1}),[]),t}function gne(){const t=b8(),[e,r]=M.useState(0),n=M.useCallback(()=>{t.current&&r(e+1)},[e]);return[M.useCallback(()=>Pt.postRender(n),[n]),e]}class yne extends M.Component{getSnapshotBeforeUpdate(e){const r=this.props.childRef.current;if(r&&e.isPresent&&!this.props.isPresent){const n=this.props.sizeRef.current;n.height=r.offsetHeight||0,n.width=r.offsetWidth||0,n.top=r.offsetTop,n.left=r.offsetLeft}return null}componentDidUpdate(){}render(){return this.props.children}}function xne({children:t,isPresent:e}){const r=M.useId(),n=M.useRef(null),s=M.useRef({width:0,height:0,top:0,left:0});return M.useInsertionEffect(()=>{const{width:i,height:a,top:l,left:c}=s.current;if(e||!n.current||!i||!a)return;n.current.dataset.motionPopId=r;const u=document.createElement("style");return document.head.appendChild(u),u.sheet&&u.sheet.insertRule(`
755          [data-motion-pop-id="${r}"] {
756            position: absolute !important;
757            width: ${i}px !important;
758            height: ${a}px !important;
759            top: ${l}px !important;
760            left: ${c}px !important;
761          }
762        `),()=>{document.head.removeChild(u)}},[e]),M.createElement(yne,{isPresent:e,childRef:n,sizeRef:s},M.cloneElement(t,{ref:n}))}const ww=({children:t,initial:e,isPresent:r,onExitComplete:n,custom:s,presenceAffectsLayout:i,mode:a})=>{const l=gO(wne),c=M.useId(),u=M.useMemo(()=>({id:c,initial:e,isPresent:r,custom:s,onExitComplete:d=>{l.set(d,!0);for(const h of l.values())if(!h)return;n&&n()},register:d=>(l.set(d,!1),()=>l.delete(d))}),i?void 0:[r]);return M.useMemo(()=>{l.forEach((d,h)=>l.set(h,!1))},[r]),M.useEffect(()=>{!r&&!l.size&&n&&n()},[r]),a==="popLayout"&&(t=M.createElement(xne,{isPresent:r},t)),M.createElement(Iy.Provider,{value:u},t)};function wne(){return new Map}function bne(t){return M.useEffect(()=>()=>t(),[])}const gl=t=>t.key||"";function kne(t,e){t.forEach(r=>{const n=gl(r);e.set(n,r)})}function vne(t){const e=[];return M.Children.forEach(t,r=>{M.isValidElement(r)&&e.push(r)}),e}const jt=({children:t,custom:e,initial:r=!0,onExitComplete:n,exitBeforeEnter:s,presenceAffectsLayout:i=!0,mode:a="sync"})=>{const l=M.useContext(dS).forceRender||gne()[0],c=b8(),u=vne(t);let d=u;const h=M.useRef(new Map).current,p=M.useRef(d),f=M.useRef(new Map).current,m=M.useRef(!0);if(oS(()=>{m.current=!1,kne(u,f),p.current=d}),bne(()=>{m.current=!0,f.clear(),h.clear()}),m.current)return M.createElement(M.Fragment,null,d.map(x=>M.createElement(ww,{key:gl(x),isPresent:!0,initial:r?void 0:!1,presenceAffectsLayout:i,mode:a},x)));d=[...d];const y=p.current.map(gl),k=u.map(gl),g=y.length;for(let x=0;x<g;x++){const w=y[x];k.indexOf(w)===-1&&!h.has(w)&&h.set(w,void 0)}return a==="wait"&&h.size&&(d=[]),h.forEach((x,w)=>{if(k.indexOf(w)!==-1)return;const b=f.get(w);if(!b)return;const v=y.indexOf(w);let A=x;if(!A){const C=()=>{h.delete(w);const _=Array.from(f.keys()).filter(N=>!k.includes(N));if(_.forEach(N=>f.delete(N)),p.current=u.filter(N=>{const W=gl(N);return W===w||_.includes(W)}),!h.size){if(c.current===!1)return;l(),n&&n()}};A=M.createElement(ww,{key:gl(b),isPresent:!1,onExitComplete:C,custom:e,presenceAffectsLayout:i,mode:a},b),h.set(w,A)}d.splice(v,0,A)}),d=d.map(x=>{const w=x.key;return h.has(w)?x:M.createElement(ww,{key:gl(x),isPresent:!0,presenceAffectsLayout:i,mode:a},x)}),M.createElement(M.Fragment,null,h.size?d:d.map(x=>M.cloneElement(x)))},jne="smart-copy-lang",nE=()=>{const{i18n:t}=He(),r=t.language==="pl",n=()=>{const s=r?"en":"pl";try{localStorage.setItem(jne,s)}catch{}t.changeLanguage(s)};return o.jsxs("button",{onClick:n,className:"flex items-center gap-2 px-3 py-2 rounded-lg hover:bg-gray-100 dark:hover:bg-gray-700 transition-colors text-gray-600 dark:text-gray-300 hover:text-purple-600 dark:hover:text-purple-400",title:r?"Switch to English":"Przełącz na Polski",children:[o.jsx(Gs,{className:"w-4 h-4"}),o.jsx("span",{className:"text-sm font-medium",children:r?"EN":"PL"})]})},Sne=()=>{const{t,i18n:e}=He("common"),{isAuthenticated:r,user:n,logout:s}=$r(),{theme:i,toggleTheme:a}=cf(),[l,c]=M.useState(!1),[u,d]=M.useState(!1),[h,p]=M.useState(!1),f=M.useRef(null),m=M.useRef(null),y=e.language==="pl",k=[{name:t("header.n
762av.aiCopywriter"),description:t("header.nav.aiCopywriterDesc"),href:"/ai-copywriter",icon:Ep,color:"from-indigo-500 to-purple-500"},{name:t("header.nav.aiProductDescriptions"),description:t("header.nav.aiProductDescriptionsDesc"),href:y?"/ai-generator-opisow-produktow":"/ai-product-description-generator",icon:sS,color:"from-emerald-500 to-teal-500"},{name:t("header.nav.aiSeoWriter"),description:t("header.nav.aiSeoWriterDesc"),href:y?"/ai-seo-writer":"/ai-seo-content-writer",icon:_i,color:"from-blue-500 to-cyan-500"}],g=[{name:t("header.nav.home"),href:"/"},{name:t("header.nav.pricing"),href:"/#pricing"},{name:t("header.nav.blog"),href:"/blog"}];M.useEffect(()=>{const b=v=>{f.current&&!f.current.contains(v.target)&&d(!1)};return document.addEventListener("mousedown",b),()=>document.removeEventListener("mousedown",b)},[]);const x=()=>{m.current&&clearTimeout(m.current),d(!0)},w=()=>{m.current=setTimeout(()=>{d(!1)},150)};return o.jsx("header",{className:"fixed top-0 left-0 right-0 z-50 bg-white/80 dark:bg-gray-900/90 backdrop-blur-lg border-b border-gray-200 dark:border-gray-700",children:o.jsxs("nav",{className:"container-custom",children:[o.jsxs("div",{className:"flex items-center justify-between h-16",children:[o.jsxs(ze,{to:"/",className:"flex items-center gap-2.5 group",children:[o.jsx("div",{className:"w-10 h-10 bg-gradient-to-br from-purple-600 to-indigo-600 rounded-xl flex items-center justify-center group-hover:scale-110 transition-transform",children:o.jsx(dn,{className:"w-6 h-6 text-white"})}),o.jsxs("div",{className:"flex flex-col",children:[o.jsx("span",{className:"text-xl font-bold bg-gradient-to-r from-purple-600 to-indigo-600 bg-clip-text text-transparent leading-tight",children:"Smart-Copy.ai"}),o.jsx("span",{className:"text-[11px] font-medium text-gray-500 dark:text-gray-400 tracking-wider leading-tight",children:t("header.tagline")})]})]}),o.jsxs("div",{className:"hidden md:flex items-center gap-6",children:[g.map(b=>o.jsx("a",{href:b.href,className:"text-gray-600 dark:text-gray-300 hover:text-purple-600 dark:hover:text-purple-400 transition-colors font-medium",children:b.name},b.name)),o.jsxs("div",{ref:f,className:"relative",onMouseEnter:x,onMouseLeave:w,children:[o.jsxs("button",{onClick:()=>d(b=>!b),className:"flex items-center gap-1.5 text-gray-600 dark:text-gray-300 hover:text-purple-600 dark:hover:text-purple-400 transition-colors font-medium",children:[t("header.nav.tools"),o.jsx(Ti,{className:`w-4 h-4 transition-transform duration-200 ${u?"rotate-180":""}`})]}),o.jsx(jt,{children:u&&o.jsxs(ue.div,{initial:{opacity:0,y:8,scale:.96},animate:{opacity:1,y:0,scale:1},exit:{opacity:0,y:8,scale:.96},transition:{duration:.15,ease:"easeOut"},className:"absolute top-full left-1/2 -translate-x-1/2 mt-3 w-80 bg-white dark:bg-gray-800 rounded-2xl shadow-2xl border border-gray-200 dark:border-gray-700 overflow-hidden",children:[o.jsx("div",{className:"absolute -top-2 left-1/2 -translate-x-1/2 w-4 h-4 bg-white dark:bg-gray-800 border-l border-t border-gray-200 dark:border-gray-700 rotate-45"}),o.jsx("div",{className:"relative p-2",children:k.map((b,v)=>{const A=b.icon;return o.jsxs(ze,{to:b.href,onClick:()=>d(!1),className:"flex items-center gap-4 p-3 rounded-xl hover:bg-gray-50 dark:hover:bg-gray-700/50 transition-colors group/item",children:[o.jsx("div",{className:`w-10 h-10 bg-gradient-to-br ${b.color} rounded-xl flex items-center justify-center flex-shrink-0 group-hover/item:scale-110 transition-transform`,children:o.jsx(A,{className:"w-5 h-5 text-white"})}),o.jsxs("div",{className:"flex-1 min-w-0",children:[o.jsx("div",{className:"font-semibold text-gray-900 dark:text-white text-sm",children:b.name}),o.jsx("div",{className:"text-xs text-gray-500 dark:text-gray-400 mt-0.5",children:b.description})]})]},v)})}),o.jsx("div",{className:"border-t border-gray-100 dark:border-gray-700 p-3",children:o.jsxs(ze,{to:"/register",onClick:()=>d(!1),className:"flex items-center justify-center gap-2 w-full py-2.5 bg-gradient-to-r from-purple-600 to-indigo-600 text-white rounded-xl text-sm font-semibold hover:from-purple-700 hover:to-indigo-700 transition-all",children:[o.jsx(dn,{className:"w-4 h-4"}
762),t("header.nav.toolsCta")]})})]})})]})]}),o.jsxs("div",{className:"hidden md:flex items-center gap-2",children:[o.jsx("button",{onClick:a,className:"p-2 rounded-lg hover:bg-gray-100 dark:hover:bg-gray-700 transition-colors","aria-label":t("header.theme.toggle"),children:i==="light"?o.jsx(Yu,{className:"w-5 h-5 text-gray-600 dark:text-gray-400"}):o.jsx(Xu,{className:"w-5 h-5 text-gray-400"})}),r?o.jsxs(o.Fragment,{children:[o.jsx(ze,{to:"/dashboard",className:"text-gray-600 dark:text-gray-300 hover:text-purple-600 dark:hover:text-purple-400 transition-colors font-medium px-3",children:t("header.auth.dashboard")}),(n==null?void 0:n.role)==="ADMIN"&&o.jsx(ze,{to:"/admin",className:"text-gray-600 dark:text-gray-300 hover:text-purple-600 dark:hover:text-purple-400 transition-colors font-medium px-3",children:t("header.auth.admin")}),o.jsxs("div",{className:"flex items-center gap-3 ml-2",children:[o.jsx("span",{className:"text-sm text-gray-600 dark:text-gray-400",children:(n==null?void 0:n.firstName)||(n==null?void 0:n.email)}),o.jsx("button",{onClick:s,className:"btn btn-secondary text-sm",children:t("header.auth.logout")})]})]}):o.jsxs(o.Fragment,{children:[o.jsx(ze,{to:"/login",className:"text-gray-600 dark:text-gray-300 hover:text-purple-600 dark:hover:text-purple-400 transition-colors font-medium px-3",children:t("header.auth.login")}),o.jsx(ze,{to:"/register",className:"btn btn-primary",children:t("header.auth.register")})]}),o.jsx(nE,{})]}),o.jsx("button",{onClick:()=>c(!l),className:"md:hidden p-2 text-gray-600 dark:text-gray-300 hover:text-purple-600 dark:hover:text-purple-400","aria-label":"Menu",children:l?o.jsx(yt,{className:"w-6 h-6"}):o.jsx(qI,{className:"w-6 h-6"})})]}),o.jsx(jt,{children:l&&o.jsx(ue.div,{initial:{opacity:0,height:0},animate:{opacity:1,height:"auto"},exit:{opacity:0,height:0},className:"md:hidden border-t border-gray-200 dark:border-gray-700 py-4",children:o.jsxs("div",{className:"flex flex-col gap-4",children:[o.jsxs("div",{className:"flex gap-2",children:[o.jsx(nE,{}),o.jsx("button",{onClick:a,className:"btn btn-secondary flex-1 justify-center",children:i==="light"?o.jsxs(o.Fragment,{children:[o.jsx(Yu,{className:"w-4 h-4 mr-2"})," ",t("header.theme.dark")]}):o.jsxs(o.Fragment,{children:[o.jsx(Xu,{className:"w-4 h-4 mr-2"})," ",t("header.theme.light")]})})]}),g.map(b=>o.jsx("a",{href:b.href,className:"text-gray-600 dark:text-gray-300 hover:text-purple-600 dark:hover:text-purple-400 transition-colors font-medium",onClick:()=>c(!1),children:b.name},b.name)),o.jsxs("div",{children:[o.jsxs("button",{onClick:()=>p(b=>!b),className:"flex items-center justify-between w-full text-gray-600 dark:text-gray-300 hover:text-purple-600 dark:hover:text-purple-400 transition-colors font-medium",children:[o.jsx("span",{children:t("header.nav.tools")}),o.jsx(Ti,{className:`w-4 h-4 transition-transform duration-200 ${h?"rotate-180":""}`})]}),o.jsx(jt,{children:h&&o.jsx(ue.div,{initial:{opacity:0,height:0},animate:{opacity:1,height:"auto"},exit:{opacity:0,height:0},transition:{duration:.2},className:"overflow-hidden",children:o.jsx("div",{className:"mt-3 ml-2 space-y-1",children:k.map((b,v)=>{const A=b.icon;return o.jsxs(ze,{to:b.href,onClick:()=>{c(!1),p(!1)},className:"flex items-center gap-3 p-3 rounded-xl hover:bg-gray-50 dark:hover:bg-gray-800 transition-colors",children:[o.jsx("div",{className:`w-9 h-9 bg-gradient-to-br ${b.color} rounded-lg flex items-center justify-center flex-shrink-0`,children:o.jsx(A,{className:"w-4 h-4 text-white"})}),o.jsxs("div",{children:[o.jsx("div",{className:"font-semibold text-gray-900 dark:text-white text-sm",children:b.name}),o.jsx("div",{className:"text-xs text-gray-500 dark:text-gray-400",children:b.description})]})]},v)})})})})]}),r?o.jsxs(o.Fragment,{children:[o.jsx(ze,{to:"/dashboard",className:"text-gray-600 dark:text-gray-300 hover:text-purple-600 dark:hover:text-purple-400 transition-colors font-medium",onClick:()=>c(!1),children:t("header.auth.dashboard")}),(n==null?void 0:n.role)==="ADMIN"&&o.jsx(ze,{to:"/admin",className:"text-gray-600 dark:text-gray-300 hover:text-purple-600 dar
762k:hover:text-purple-400 transition-colors font-medium",onClick:()=>c(!1),children:t("header.auth.admin")}),o.jsx("button",{onClick:()=>{s(),c(!1)},className:"btn btn-secondary text-left",children:t("header.auth.logout")})]}):o.jsxs(o.Fragment,{children:[o.jsx(ze,{to:"/login",className:"btn btn-secondary",onClick:()=>c(!1),children:t("header.auth.login")}),o.jsx(ze,{to:"/register",className:"btn btn-primary",onClick:()=>c(!1),children:t("header.auth.register")})]})]})})})]})})},Nne=()=>{const{t,i18n:e}=He("common"),r=new Date().getFullYear(),n=e.language==="pl",s={product:[{name:t("footer.links.features"),href:"/#features"},{name:t("footer.links.pricing"),href:"/#pricing"},{name:t("footer.links.faq"),href:"/#faq"}],legal:[{name:t("footer.links.terms"),href:vu("terms")},{name:t("footer.links.privacy"),href:vu("privacy")},{name:t("footer.links.cookies"),href:vu("cookies")}],pages:[{name:t("footer.links.aiCopywriter"),href:"/ai-copywriter"},{name:t("footer.links.aiProductDescriptions"),href:n?"/ai-generator-opisow-produktow":"/ai-product-description-generator"},{name:t("footer.links.aiSeoWriter"),href:n?"/ai-seo-writer":"/ai-seo-content-writer"}]};return o.jsx("footer",{className:"bg-gray-900 text-gray-300",children:o.jsxs("div",{className:"container-custom py-12",children:[o.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-5 gap-8",children:[o.jsxs("div",{className:"lg:col-span-2",children:[o.jsxs(ze,{to:"/",className:"flex items-center gap-2 mb-4 group",children:[o.jsx("div",{className:"w-10 h-10 bg-gradient-to-br from-purple-600 to-indigo-600 rounded-xl flex items-center justify-center",children:o.jsx(dn,{className:"w-6 h-6 text-white"})}),o.jsx("span",{className:"text-xl font-bold text-white",children:"Smart-Copy.ai"})]}),o.jsx("p",{className:"text-sm text-gray-400 mb-4 mr-4",children:t("footer.description")})]}),o.jsxs("div",{children:[o.jsx("h3",{className:"text-white font-semibold mb-4",children:t("footer.sections.product")}),o.jsx("ul",{className:"space-y-2",children:s.product.map(i=>o.jsx("li",{children:o.jsx("a",{href:i.href,className:"text-sm hover:text-purple-400 transition-colors",children:i.name})},i.name))})]}),o.jsxs("div",{children:[o.jsx("h3",{className:"text-white font-semibold mb-4",children:t("footer.sections.legal")}),o.jsx("ul",{className:"space-y-2",children:s.legal.map(i=>o.jsx("li",{children:o.jsx("a",{href:i.href,className:"text-sm hover:text-purple-400 transition-colors",children:i.name})},i.name))})]}),o.jsxs("div",{children:[o.jsx("h3",{className:"text-white font-semibold mb-4",children:t("footer.sections.pages")}),o.jsx("ul",{className:"space-y-2",children:s.pages.map(i=>o.jsx("li",{children:o.jsx(ze,{to:i.href,className:"text-sm hover:text-purple-400 transition-colors",children:i.name})},i.name))})]})]}),o.jsxs("div",{className:"border-t border-gray-800 mt-12 pt-8 flex flex-col md:flex-row justify-between items-center gap-4",children:[o.jsxs("div",{className:"flex flex-col sm:flex-row items-center gap-2 sm:gap-4 text-sm text-gray-400",children:[o.jsxs("p",{children:["© ",r," Smart-Copy.ai. ",t("footer.copyright")]}),o.jsx("span",{className:"hidden sm:inline text-gray-600",children:"|"}),o.jsxs("p",{children:[t("footer.madeBy")," ",o.jsx("a",{href:"https://www.karol-leszczynski.pl",target:"_blank",rel:"noopener noreferrer",className:"hover:text-purple-400 transition-colors",children:"Karol Leszczyński"})]})]}),o.jsxs("div",{className:"flex items-center gap-2 text-sm text-gray-400",children:[o.jsx(dc,{className:"w-4 h-4"}),o.jsx("a",{href:"mailto:[email protected]",className:"hover:text-purple-400 transition-colors",children:"[email protected]"})]})]})]})})},xs=({children:t,showFooter:e=!0,showBreadcrumbs:r=!1})=>o.jsxs("div",{className:"min-h-screen flex flex-col",children:[o.jsx(Sne,{}),r&&o.jsx(aQ,{}),o.jsx("main",{className:"flex-1 pt-16",children:t}),e&&o.jsx(Nne,{})]});function k8(t,e){return function(){return t.apply(e,arguments)}}const{toString:Cne}=Object.prototype,{getPrototypeOf:AS}=Object,{iterator:By,toStringTag:v8}=Symbol,$y=(t=>e=>{const r=Cne.call(e);return t[r]||(t[r]=r.slice(8,-1).toLowerCase())})(Object.create(null)),Js=t=>(t=t.toLowerCase(),e=>$y(e)===t),Uy=t=>e=>typeof e===t,{isArray:Id}=Array,td=Uy("undefined");function gf(t){return t!==null&&!td(t)&&t.constructor!==null&&!td(t.constructor)&&Rn(t.constructor.isBuffer)&&t.constructor.isBuffer(t)}const j8=Js("ArrayBuffer");function Ene(t){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(t):e=t&&t.buffer&&j8(t.buffer),e}const Tne=Uy("string"),Rn=Uy("function"),S8=Uy("number"),yf=t=>t!==null&&typeof t=="object",Ane=t=>t===!0||t===!1,r0=t=>{if($y(t)!=="object")return!1;const e=AS(t);
vendor: 4,686 bytes, line 762
762return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(v8 in t)&&!(By in t)},zne=t=>{if(!yf(t)||gf(t))return!1;try{return Object.keys(t).length===0&&Object.getPrototypeOf(t)===Object.prototype}catch{return!1}},Pne=Js("Date"),_ne=Js("File"),Ine=Js("Blob"),One=Js("FileList"),Rne=t=>yf(t)&&Rn(t.pipe),Lne=t=>{let e;return t&&(typeof FormData=="function"&&t instanceof FormData||Rn(t.append)&&((e=$y(t))==="formdata"||e==="object"&&Rn(t.toString)&&t.toString()==="[object FormData]"))},Mne=Js("URLSearchParams"),[Dne,Fne,Bne,$ne]=["ReadableStream","Request","Response","Headers"].map(Js),Une=t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function xf(t,e,{allOwnKeys:r=!1}={}){if(t===null||typeof t>"u")return;let n,s;if(typeof t!="object"&&(t=[t]),Id(t))for(n=0,s=t.length;n<s;n++)e.call(null,t[n],n,t);else{if(gf(t))return;const i=r?Object.getOwnPropertyNames(t):Object.keys(t),a=i.length;let l;for(n=0;n<a;n++)l=i[n],e.call(null,t[l],l,t)}}function N8(t,e){if(gf(t))return null;e=e.toLowerCase();const r=Object.keys(t);let n=r.length,s;for(;n-- >0;)if(s=r[n],e===s.toLowerCase())return s;return null}const Tl=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,C8=t=>!td(t)&&t!==Tl;function Iv(){const{caseless:t,skipUndefined:e}=C8(this)&&this||{},r={},n=(s,i)=>{const a=t&&N8(r,i)||i;r0(r[a])&&r0(s)?r[a]=Iv(r[a],s):r0(s)?r[a]=Iv({},s):Id(s)?r[a]=s.slice():(!e||!td(s))&&(r[a]=s)};for(let s=0,i=arguments.length;s<i;s++)arguments[s]&&xf(arguments[s],n);return r}const Wne=(t,e,r,{allOwnKeys:n}={})=>(xf(e,(s,i)=>{r&&Rn(s)?t[i]=k8(s,r):t[i]=s},{allOwnKeys:n}),t),Vne=t=>(t.charCodeAt(0)===65279&&(t=t.slice(1)),t),Hne=(t,e,r,n)=>{t.prototype=Object.create(e.prototype,n),t.prototype.constructor=t,Object.defineProperty(t,"super",{value:e.prototype}),r&&Object.assign(t.prototype,r)},qne=(t,e,r,n)=>{let s,i,a;const l={};if(e=e||{},t==null)return e;do{for(s=Object.getOwnPropertyNames(t),i=s.length;i-- >0;)a=s[i],(!n||n(a,t,e))&&!l[a]&&(e[a]=t[a],l[a]=!0);t=r!==!1&&AS(t)}while(t&&(!r||r(t,e))&&t!==Object.prototype);return e},Kne=(t,e,r)=>{t=String(t),(r===void 0||r>t.length)&&(r=t.length),r-=e.length;const n=t.indexOf(e,r);return n!==-1&&n===r},Gne=t=>{if(!t)return null;if(Id(t))return t;let e=t.length;if(!S8(e))return null;const r=new Array(e);for(;e-- >0;)r[e]=t[e];return r},Zne=(t=>e=>t&&e instanceof t)(typeof Uint8Array<"u"&&AS(Uint8Array)),Yne=(t,e)=>{const n=(t&&t[By]).call(t);let s;for(;(s=n.next())&&!s.done;){const i=s.value;e.call(t,i[0],i[1])}},Jne=(t,e)=>{let r;const n=[];for(;(r=t.exec(e))!==null;)n.push(r);return n},Xne=Js("HTMLFormElement"),Qne=t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(r,n,s){return n.toUpperCase()+s}),sE=(({hasOwnProperty:t})=>(e,r)=>t.call(e,r))(Object.prototype),ese=Js("RegExp"),E8=(t,e)=>{const r=Object.getOwnPropertyDescriptors(t),n={};xf(r,(s,i)=>{let a;(a=e(s,i,t))!==!1&&(n[i]=a||s)}),Object.defineProperties(t,n)},tse=t=>{E8(t,(e,r)=>{if(Rn(t)&&["arguments","caller","callee"].indexOf(r)!==-1)return!1;const n=t[r];if(Rn(n)){if(e.enumerable=!1,"writable"in e){e.writable=!1;return}e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")})}})},rse=(t,e)=>{const r={},n=s=>{s.forEach(i=>{r[i]=!0})};return Id(t)?n(t):n(String(t).split(e)),r},nse=()=>{},sse=(t,e)=>t!=null&&Number.isFinite(t=+t)?t:e;function ise(t){return!!(t&&Rn(t.append)&&t[v8]==="FormData"&&t[By])}const ase=t=>{const e=new Array(10),r=(n,s)=>{if(yf(n)){if(e.indexOf(n)>=0)return;if(gf(n))return n;if(!("toJSON"in n)){e[s]=n;const i=Id(n)?[]:{};return xf(n,(a,l)=>{const c=r(a,s+1);!td(c)&&(i[l]=c)}),e[s]=void 0,i}}return n};return r(t,0)},ose=Js("AsyncFunction"),lse=t=>t&&(yf(t)||Rn(t))&&Rn(t.then)&&Rn(t.catch),T8=((t,e)=>t?setImmediate:e?((r,n)=>(Tl.addEventListener("message",({source:s,data:i})=>{s===Tl&&i===r&&n.length&&n.shift()()},!1),s=>{n.push(s),Tl.postMessage(r,"*")}))(`axios@${Math.random()}`,[]):r=>setTimeout(r))(typeof setImmediate=="function",Rn(Tl.postMessage)),cse=typeof queueMicrotask<"u"?queueMicrotask.bind(Tl):typeof process<"u"&&process.nextTick||T8,use=t=>t!=null&&Rn(t[By]),ye={isArray:Id,isArrayBuffer:j8,isBuffer:gf,isFormData:Lne,isArrayBufferView:Ene,isString:Tne,isNumber:S8,isBoolean:Ane,isObject:yf,isPlainObject:r0,isEmptyObject:zne,isReadableStream:Dne,isRequest:Fne,isResponse:Bne,isHeaders:$ne,isUndefined:td,isDate:Pne,isFile:_ne,isBlob:Ine,isRegExp:ese,isFunction:Rn,isStream:Rne,isURLSearchParams:Mne,isTypedArray:Zne,isFileList:One,forEach:xf,merge:Iv,extend:Wne,trim:Une,stripBOM:Vne,inherits:Hne,toFlatObject:qne,kindOf:$y,kindOfTest:Js,endsWith:Kne,toArray:Gne,forEachEntry:Yne,matchAll:Jne,isHTMLF
vendor: 3,466 bytes, line 762
762orm:Xne,hasOwnProperty:sE,hasOwnProp:sE,reduceDescriptors:E8,freezeMethods:tse,toObjectSet:rse,toCamelCase:Qne,noop:nse,toFiniteNumber:sse,findKey:N8,global:Tl,isContextDefined:C8,isSpecCompliantForm:ise,toJSONObject:ase,isAsyncFn:ose,isThenable:lse,setImmediate:T8,asap:cse,isIterable:use};function Qe(t,e,r,n,s){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=t,this.name="AxiosError",e&&(this.code=e),r&&(this.config=r),n&&(this.request=n),s&&(this.response=s,this.status=s.status?s.status:null)}ye.inherits(Qe,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:ye.toJSONObject(this.config),code:this.code,status:this.status}}});const A8=Qe.prototype,z8={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(t=>{z8[t]={value:t}});Object.defineProperties(Qe,z8);Object.defineProperty(A8,"isAxiosError",{value:!0});Qe.from=(t,e,r,n,s,i)=>{const a=Object.create(A8);ye.toFlatObject(t,a,function(d){return d!==Error.prototype},u=>u!=="isAxiosError");const l=t&&t.message?t.message:"Error",c=e==null&&t?t.code:e;return Qe.call(a,l,c,r,n,s),t&&a.cause==null&&Object.defineProperty(a,"cause",{value:t,configurable:!0}),a.name=t&&t.name||"Error",i&&Object.assign(a,i),a};const dse=null;function Ov(t){return ye.isPlainObject(t)||ye.isArray(t)}function P8(t){return ye.endsWith(t,"[]")?t.slice(0,-2):t}function iE(t,e,r){return t?t.concat(e).map(function(s,i){return s=P8(s),!r&&i?"["+s+"]":s}).join(r?".":""):e}function hse(t){return ye.isArray(t)&&!t.some(Ov)}const pse=ye.toFlatObject(ye,{},null,function(e){return/^is[A-Z]/.test(e)});function Wy(t,e,r){if(!ye.isObject(t))throw new TypeError("target must be an object");e=e||new FormData,r=ye.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,function(y,k){return!ye.isUndefined(k[y])});const n=r.metaTokens,s=r.visitor||d,i=r.dots,a=r.indexes,c=(r.Blob||typeof Blob<"u"&&Blob)&&ye.isSpecCompliantForm(e);if(!ye.isFunction(s))throw new TypeError("visitor must be a function");function u(m){if(m===null)return"";if(ye.isDate(m))return m.toISOString();if(ye.isBoolean(m))return m.toString();if(!c&&ye.isBlob(m))throw new Qe("Blob is not supported. Use a Buffer instead.");return ye.isArrayBuffer(m)||ye.isTypedArray(m)?c&&typeof Blob=="function"?new Blob([m]):Buffer.from(m):m}function d(m,y,k){let g=m;if(m&&!k&&typeof m=="object"){if(ye.endsWith(y,"{}"))y=n?y:y.slice(0,-2),m=JSON.stringify(m);else if(ye.isArray(m)&&hse(m)||(ye.isFileList(m)||ye.endsWith(y,"[]"))&&(g=ye.toArray(m)))return y=P8(y),g.forEach(function(w,b){!(ye.isUndefined(w)||w===null)&&e.append(a===!0?iE([y],b,i):a===null?y:y+"[]",u(w))}),!1}return Ov(m)?!0:(e.append(iE(k,y,i),u(m)),!1)}const h=[],p=Object.assign(pse,{defaultVisitor:d,convertValue:u,isVisitable:Ov});function f(m,y){if(!ye.isUndefined(m)){if(h.indexOf(m)!==-1)throw Error("Circular reference detected in "+y.join("."));h.push(m),ye.forEach(m,function(g,x){(!(ye.isUndefined(g)||g===null)&&s.call(e,g,ye.isString(x)?x.trim():x,y,p))===!0&&f(g,y?y.concat(x):[x])}),h.pop()}}if(!ye.isObject(t))throw new TypeError("data must be an object");return f(t),e}
vendor: 5,437 bytes, lines 762-763
762function aE(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,function(n){return e[n]})}function zS(t,e){this._pairs=[],t&&Wy(t,this,e)}const _8=zS.prototype;_8.append=function(e,r){this._pairs.push([e,r])};_8.toString=function(e){const r=e?function(n){return e.call(this,n,aE)}:aE;return this._pairs.map(function(s){return r(s[0])+"="+r(s[1])},"").join("&")};function fse(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function I8(t,e,r){if(!e)return t;const n=r&&r.encode||fse;ye.isFunction(r)&&(r={serialize:r});const s=r&&r.serialize;let i;if(s?i=s(e,r):i=ye.isURLSearchParams(e)?e.toString():new zS(e,r).toString(n),i){const a=t.indexOf("#");a!==-1&&(t=t.slice(0,a)),t+=(t.indexOf("?")===-1?"?":"&")+i}return t}class oE{constructor(){this.handlers=[]}use(e,r,n){return this.handlers.push({fulfilled:e,rejected:r,synchronous:n?n.synchronous:!1,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){ye.forEach(this.handlers,function(n){n!==null&&e(n)})}}const O8={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},mse=typeof URLSearchParams<"u"?URLSearchParams:zS,gse=typeof FormData<"u"?FormData:null,yse=typeof Blob<"u"?Blob:null,xse={isBrowser:!0,classes:{URLSearchParams:mse,FormData:gse,Blob:yse},protocols:["http","https","file","blob","url","data"]},PS=typeof window<"u"&&typeof document<"u",Rv=typeof navigator=="object"&&navigator||void 0,wse=PS&&(!Rv||["ReactNative","NativeScript","NS"].indexOf(Rv.product)<0),bse=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",kse=PS&&window.location.href||"http://localhost",vse=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:PS,hasStandardBrowserEnv:wse,hasStandardBrowserWebWorkerEnv:bse,navigator:Rv,origin:kse},Symbol.toStringTag,{value:"Module"})),Jr={...vse,...xse};function jse(t,e){return Wy(t,new Jr.classes.URLSearchParams,{visitor:function(r,n,s,i){return Jr.isNode&&ye.isBuffer(r)?(this.append(n,r.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)},...e})}function Sse(t){return ye.matchAll(/\w+|\[(\w*)]/g,t).map(e=>e[0]==="[]"?"":e[1]||e[0])}function Nse(t){const e={},r=Object.keys(t);let n;const s=r.length;let i;for(n=0;n<s;n++)i=r[n],e[i]=t[i];return e}function R8(t){function e(r,n,s,i){let a=r[i++];if(a==="__proto__")return!0;const l=Number.isFinite(+a),c=i>=r.length;return a=!a&&ye.isArray(s)?s.length:a,c?(ye.hasOwnProp(s,a)?s[a]=[s[a],n]:s[a]=n,!l):((!s[a]||!ye.isObject(s[a]))&&(s[a]=[]),e(r,n,s[a],i)&&ye.isArray(s[a])&&(s[a]=Nse(s[a])),!l)}if(ye.isFormData(t)&&ye.isFunction(t.entries)){const r={};return ye.forEachEntry(t,(n,s)=>{e(Sse(n),s,r,0)}),r}return null}function Cse(t,e,r){if(ye.isString(t))try{return(e||JSON.parse)(t),ye.trim(t)}catch(n){if(n.name!=="SyntaxError")throw n}return(r||JSON.stringify)(t)}const wf={transitional:O8,adapter:["xhr","http","fetch"],transformRequest:[function(e,r){const n=r.getContentType()||"",s=n.indexOf("application/json")>-1,i=ye.isObject(e);if(i&&ye.isHTMLForm(e)&&(e=new FormData(e)),ye.isFormData(e))return s?JSON.stringify(R8(e)):e;if(ye.isArrayBuffer(e)||ye.isBuffer(e)||ye.isStream(e)||ye.isFile(e)||ye.isBlob(e)||ye.isReadableStream(e))return e;if(ye.isArrayBufferView(e))return e.buffer;if(ye.isURLSearchParams(e))return r.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let l;if(i){if(n.indexOf("application/x-www-form-urlencoded")>-1)return jse(e,this.formSerializer).toString();if((l=ye.isFileList(e))||n.indexOf("multipart/form-data")>-1){const c=this.env&&this.env.FormData;return Wy(l?{"files[]":e}:e,c&&new c,this.formSerializer)}}return i||s?(r.setContentType("application/json",!1),Cse(e)):e}],transformResponse:[function(e){const r=this.transitional||wf.transitional,n=r&&r.forcedJSONParsing,s=this.responseType==="json";if(ye.isResponse(e)||ye.isReadableStream(e))return e;if(e&&ye.isString(e)&&(n&&!this.responseType||s)){const a=!(r&&r.silentJSONParsing)&&s;try{return JSON.parse(e,this.parseReviver)}catch(l){if(a)throw l.name==="SyntaxError"?Qe.from(l,Qe.ERR_BAD_RESPONSE,this,null,this.response):l}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Jr.classes.FormData,Blob:Jr.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};ye.forEach(["delete","get","head","post","put","patch"],t=>{wf.headers[t]={}});const Ese=ye.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),Tse=t=>{const e={};let r,n,s;return t&&t.split(`
763`).forEach(function(a){s=a.indexOf(":"),r=a.substring(0,s).trim().toLowerCase(),n=a.substring(s+1).trim(),!(!r||e[r]&&Ese[r])&&(r==="set-cookie"?e[r]?e[r].push(n):e[r]=[n]:e[r]=e[r]?e[r]+", "+n:n)}),e},lE=Symbol("internals");function nh(t){return t&&String(t).trim().toLowerCase()}function n0(t){return t===!1||t==null?t:ye.isArray(t)?t.map(n0):String(t)}function Ase(t){const e=Object.create(null),r=/([^\s,;
763=]+)\s*(?:=\s*([^,;]+))?/g;let n;for(;n=r.exec(t);)e[n[1]]=n[2];return e}const zse=t=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());function bw(t,e,r,n,s){if(ye.isFunction(n))return n.call(this,e,r);if(s&&(e=r),!!ye.isString(e)){if(ye.isString(n))return e.indexOf(n)!==-1;if(ye.isRegExp(n))return n.test(e)}}function Pse(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,r,n)=>r.toUpperCase()+n)}function _se(t,e){const r=ye.toCamelCase(" "+e);["get","set","has"].forEach(n=>{Object.defineProperty(t,n+r,{value:function(s,i,a){return this[n].call(this,e,s,i,a)},configurable:!0})})}let Ln=class{constructor(e){e&&this.set(e)}set(e,r,n){const s=this;function i(l,c,u){const d=nh(c);if(!d)throw new Error("header name must be a non-empty string");const h=ye.findKey(s,d);(!h||s[h]===void 0||u===!0||u===void 0&&s[h]!==!1)&&(s[h||c]=n0(l))}const a=(l,c)=>ye.forEach(l,(u,d)=>i(u,d,c));if(ye.isPlainObject(e)||e instanceof this.constructor)a(e,r);else if(ye.isString(e)&&(e=e.trim())&&!zse(e))a(Tse(e),r);else if(ye.isObject(e)&&ye.isIterable(e)){let l={},c,u;for(const d of e){if(!ye.isArray(d))throw TypeError("Object iterator must return a key-value pair");l[u=d[0]]=(c=l[u])?ye.isArray(c)?[...c,d[1]]:[c,d[1]]:d[1]}a(l,r)}else e!=null&&i(r,e,n);return this}get(e,r){if(e=nh(e),e){const n=ye.findKey(this,e);if(n){const s=this[n];if(!r)return s;if(r===!0)return Ase(s);if(ye.isFunction(r))return r.call(this,s,n);if(ye.isRegExp(r))return r.exec(s);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,r){if(e=nh(e),e){const n=ye.findKey(this,e);return!!(n&&this[n]!==void 0&&(!r||bw(this,this[n],n,r)))}return!1}delete(e,r){const n=this;let s=!1;function i(a){if(a=nh(a),a){const l=ye.findKey(n,a);l&&(!r||bw(n,n[l],l,r))&&(delete n[l],s=!0)}}return ye.isArray(e)?e.forEach(i):i(e),s}clear(e){const r=Object.keys(this);let n=r.length,s=!1;for(;n--;){const i=r[n];(!e||bw(this,this[i],i,e,!0))&&(delete this[i],s=!0)}return s}normalize(e){const r=this,n={};return ye.forEach(this,(s,i)=>{const a=ye.findKey(n,i);if(a){r[a]=n0(s),delete r[i];return}const l=e?Pse(i):String(i).trim();l!==i&&delete r[i],r[l]=n0(s),n[l]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const r=Object.create(null);return ye.forEach(this,(n,s)=>{n!=null&&n!==!1&&(r[s]=e&&ye.isArray(n)?n.join(", "):n)}),r}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,r])=>e+": "+r).join(`
764`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...r){const n=new this(e);return r.forEach(s=>n.set(s)),n}static accessor(e){const n=(this[lE]=this[lE]={accessors:{}}).accessors,s=this.prototype;function i(a){const l=nh(a);n[l]||(_se(s,a),n[l]=!0)}return ye.isArray(e)?e.forEach(i):i(e),this}};Ln.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);ye.reduceDescriptors(Ln.prototype,({value:t},e)=>{let r=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(n){this[r]=n}}});ye.freezeMethods(Ln);function kw(t,e){const r=this||wf,n=e||r,s=Ln.from(n.headers);let i=n.data;return ye.forEach(t,function(l){i=l.call(r,i,s.normalize(),e?e.status:void 0)}),s.normalize(),i}function L8(t){return!!(t&&t.__CANCEL__)}function Od(t,e,r){Qe.call(this,t??"canceled",Qe.ERR_CANCELED,e,r),this.name="CanceledError"}ye.inherits(Od,Qe,{__CANCEL__:!0});function M8(t,e,r){const n=r.config.validateStatus;!r.status||!n||n(r.status)?t(r):e(new Qe("Request failed with status code "+r.status,[Qe.ERR_BAD_REQUEST,Qe.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r))}function Ise(t){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}function Ose(t,e){t=t||10;const r=new Array(t),n=new Array(t);let s=0,i=0,a;return e=e!==void 0?e:1e3,function(c){const u=Date.now(),d=n[i];a||(a=u),r[s]=c,n[s]=u;let h=i,p=0;for(;h!==s;)p+=r[h++],h=h%t;if(s=(s+1)%t,s===i&&(i=(i+1)%t),u-a<e)return;const f=d&&u-d;return f?Math.round(p*1e3/f):void 0}}function Rse(t,e){let r=0,n=1e3/e,s,i;const a=(u,d=Date.now())=>{r=d,s=null,i&&(clearTimeout(i),i=null),t(...u)};return[(...u)=>{const d=Date.now(),h=d-r;h>
vendor: 6,909 bytes, line 764
764=n?a(u,d):(s=u,i||(i=setTimeout(()=>{i=null,a(s)},n-h)))},()=>s&&a(s)]}const tg=(t,e,r=3)=>{let n=0;const s=Ose(50,250);return Rse(i=>{const a=i.loaded,l=i.lengthComputable?i.total:void 0,c=a-n,u=s(c),d=a<=l;n=a;const h={loaded:a,total:l,progress:l?a/l:void 0,bytes:c,rate:u||void 0,estimated:u&&l&&d?(l-a)/u:void 0,event:i,lengthComputable:l!=null,[e?"download":"upload"]:!0};t(h)},r)},cE=(t,e)=>{const r=t!=null;return[n=>e[0]({lengthComputable:r,total:t,loaded:n}),e[1]]},uE=t=>(...e)=>ye.asap(()=>t(...e)),Lse=Jr.hasStandardBrowserEnv?((t,e)=>r=>(r=new URL(r,Jr.origin),t.protocol===r.protocol&&t.host===r.host&&(e||t.port===r.port)))(new URL(Jr.origin),Jr.navigator&&/(msie|trident)/i.test(Jr.navigator.userAgent)):()=>!0,Mse=Jr.hasStandardBrowserEnv?{write(t,e,r,n,s,i,a){if(typeof document>"u")return;const l=[`${t}=${encodeURIComponent(e)}`];ye.isNumber(r)&&l.push(`expires=${new Date(r).toUTCString()}`),ye.isString(n)&&l.push(`path=${n}`),ye.isString(s)&&l.push(`domain=${s}`),i===!0&&l.push("secure"),ye.isString(a)&&l.push(`SameSite=${a}`),document.cookie=l.join("; ")},read(t){if(typeof document>"u")return null;const e=document.cookie.match(new RegExp("(?:^|; )"+t+"=([^;]*)"));return e?decodeURIComponent(e[1]):null},remove(t){this.write(t,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function Dse(t){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}function Fse(t,e){return e?t.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):t}function D8(t,e,r){let n=!Dse(e);return t&&(n||r==!1)?Fse(t,e):e}const dE=t=>t instanceof Ln?{...t}:t;function pc(t,e){e=e||{};const r={};function n(u,d,h,p){return ye.isPlainObject(u)&&ye.isPlainObject(d)?ye.merge.call({caseless:p},u,d):ye.isPlainObject(d)?ye.merge({},d):ye.isArray(d)?d.slice():d}function s(u,d,h,p){if(ye.isUndefined(d)){if(!ye.isUndefined(u))return n(void 0,u,h,p)}else return n(u,d,h,p)}function i(u,d){if(!ye.isUndefined(d))return n(void 0,d)}function a(u,d){if(ye.isUndefined(d)){if(!ye.isUndefined(u))return n(void 0,u)}else return n(void 0,d)}function l(u,d,h){if(h in e)return n(u,d);if(h in t)return n(void 0,u)}const c={url:i,method:i,data:i,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,withXSRFToken:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:l,headers:(u,d,h)=>s(dE(u),dE(d),h,!0)};return ye.forEach(Object.keys({...t,...e}),function(d){const h=c[d]||s,p=h(t[d],e[d],d);ye.isUndefined(p)&&h!==l||(r[d]=p)}),r}const F8=t=>{const e=pc({},t);let{data:r,withXSRFToken:n,xsrfHeaderName:s,xsrfCookieName:i,headers:a,auth:l}=e;if(e.headers=a=Ln.from(a),e.url=I8(D8(e.baseURL,e.url,e.allowAbsoluteUrls),t.params,t.paramsSerializer),l&&a.set("Authorization","Basic "+btoa((l.username||"")+":"+(l.password?unescape(encodeURIComponent(l.password)):""))),ye.isFormData(r)){if(Jr.hasStandardBrowserEnv||Jr.hasStandardBrowserWebWorkerEnv)a.setContentType(void 0);else if(ye.isFunction(r.getHeaders)){const c=r.getHeaders(),u=["content-type","content-length"];Object.entries(c).forEach(([d,h])=>{u.includes(d.toLowerCase())&&a.set(d,h)})}}if(Jr.hasStandardBrowserEnv&&(n&&ye.isFunction(n)&&(n=n(e)),n||n!==!1&&Lse(e.url))){const c=s&&i&&Mse.read(i);c&&a.set(s,c)}return e},Bse=typeof XMLHttpRequest<"u",$se=Bse&&function(t){return new Promise(function(r,n){const s=F8(t);let i=s.data;const a=Ln.from(s.headers).normalize();let{responseType:l,onUploadProgress:c,onDownloadProgress:u}=s,d,h,p,f,m;function y(){f&&f(),m&&m(),s.cancelToken&&s.cancelToken.unsubscribe(d),s.signal&&s.signal.removeEventListener("abort",d)}let k=new XMLHttpRequest;k.open(s.method.toUpperCase(),s.url,!0),k.timeout=s.timeout;function g(){if(!k)return;const w=Ln.from("getAllResponseHeaders"in k&&k.getAllResponseHeaders()),v={data:!l||l==="text"||l==="json"?k.responseText:k.response,status:k.status,statusText:k.statusText,headers:w,config:t,request:k};M8(function(C){r(C),y()},function(C){n(C),y()},v),k=null}"onloadend"in k?k.onloadend=g:k.onreadystatechange=function(){!k||k.readyState!==4||k.status===0&&!(k.responseURL&&k.responseURL.indexOf("file:")===0)||setTimeout(g)},k.onabort=function(){k&&(n(new Qe("Request aborted",Qe.ECONNABORTED,t,k)),k=null)},k.onerror=function(b){const v=b&&b.message?b.message:"Network Error",A=new Qe(v,Qe.ERR_NETWORK,t,k);A.event=b||null,n(A),k=null},k.ontimeout=function(){let b=s.timeout?"timeout of "+s.timeout+"ms exceeded":"timeout exceeded";const v=s.transitional||O8;s.timeoutErrorMessage&&(b=s.timeoutErrorMessage),n(new Qe(b,v.clarifyTimeoutError?Qe.ETIMEDOUT:Qe.ECONNABORTED,t,k)),k=null},i===void 0&&a.setContentType(null),"setRequestHeader"in k&&ye.forEach(a.toJSON(),function(b,v){k.setRequestHeader(v,b)}),ye.isUndefined(s.withCredentials)||(k.withCredentials=!!s.withCredentials),l&&l!=="json"&&(k.responseType=s.responseType),u&&([p,m]=tg(u,!0),k.addEventListener("progress",p)),c&&k.upload&&([h,f]=tg(c),k.upload.addEventListener("progress",h),k.upload.addEventListener("loadend",f)),(s.cancelToken||s.signal)&&(d=w=>{k&&(n(!w||w.type?new Od(null,t,k):w),k.abort(),k=null)},s.cancelToken&&s.cancelToken.subscribe(d),s.signal&&(s.signal.aborted?d():s.signal.addEventListener("abort",d)));const x=Ise(s.url);if(x&&Jr.protocols.indexOf(x)===-1){n(new Qe("Unsupported protocol "+x+":",Qe.ERR_BAD_REQUEST,t));return}k.send(i||null)})},Use=(t,e)=>{const{length:r}=t=t?t.filter(Boolean):[];if(e||r){let n=new AbortController,s;const i=function(u){if(!s){s=!0,l();const d=u instanceof Error?u:this.reason;n.abort(d instanceof Qe?d:new Od(d instanceof Error?d.message:d))}};let a=e&&setTimeout(()=>{a=null,i(new Qe(`timeout ${e} of ms exceeded`,Qe.ETIMEDOUT))},e);const l=()=>{t&&(a&&clearTimeout(a),a=null,t.forEach(u=>{u.unsubscribe?u.unsubscribe(i):u.removeEventListener("abort",i)}),t=null)};t.forEach(u=>u.addEventListener("abort",i));const{signal:c}=n;return c.unsubscribe=()=>ye.asap(l),c}},Wse=function*(t,e){let r=t.byteLength;if(r<e){yield t;return}let n=0,s;for(;n<r;)s=n+e,yield t.slice(n,s),n=s},Vse=async function*(t,e){for await(const r of Hse(t))yield*Wse(r,e)},Hse=async function*(t){if(t[Symbol.asyncIterator]){yield*t;return}const e=t.getReader();try{for(;;){const{done:r,value:n}=await e.read();if(r)break;yield n}}finally{await e.cancel()}},hE=(t,e,r,n)=>{const s=Vse(t,e);let i=0,a,l=c=>{a||(a=!0,n&&n(c))};return new ReadableStream({async pull(c){try{const{done:u,value:d}=await s.next();if(u){l(),c.close();return}let h=d.byteLength;if(r){let p=i+=h;r(p)}c.enqueue(new Uint8Array(d))}catch(u){throw l(u),u}},cancel(c){return l(c),s.return()}},{highWaterMark:2})},pE=64*1024,{isFunction:um}=ye,qse=(({Request:t,Response:e})=>({Request:t,Response:e}))(ye.global),{ReadableStream:fE,TextEncoder:mE}
vendor: 5,016 bytes, lines 764-766
764=ye.global,gE=(t,...e)=>{try{return!!t(...e)}catch{return!1}},Kse=t=>{t=ye.merge.call({skipUndefined:!0},qse,t);const{fetch:e,Request:r,Response:n}=t,s=e?um(e):typeof fetch=="function",i=um(r),a=um(n);if(!s)return!1;const l=s&&um(fE),c=s&&(typeof mE=="function"?(m=>y=>m.encode(y))(new mE):async m=>new Uint8Array(await new r(m).arrayBuffer())),u=i&&l&&gE(()=>{let m=!1;const y=new r(Jr.origin,{body:new fE,method:"POST",get duplex(){return m=!0,"half"}}).headers.has("Content-Type");return m&&!y}),d=a&&l&&gE(()=>ye.isReadableStream(new n("").body)),h={stream:d&&(m=>m.body)};s&&["text","arrayBuffer","blob","formData","stream"].forEach(m=>{!h[m]&&(h[m]=(y,k)=>{let g=y&&y[m];if(g)return g.call(y);throw new Qe(`Response type '${m}' is not supported`,Qe.ERR_NOT_SUPPORT,k)})});const p=async m=>{if(m==null)return 0;if(ye.isBlob(m))return m.size;if(ye.isSpecCompliantForm(m))return(await new r(Jr.origin,{method:"POST",body:m}).arrayBuffer()).byteLength;if(ye.isArrayBufferView(m)||ye.isArrayBuffer(m))return m.byteLength;if(ye.isURLSearchParams(m)&&(m=m+""),ye.isString(m))return(await c(m)).byteLength},f=async(m,y)=>{const k=ye.toFiniteNumber(m.getContentLength());return k??p(y)};return async m=>{let{url:y,method:k,data:g,signal:x,cancelToken:w,timeout:b,onDownloadProgress:v,onUploadProgress:A,responseType:C,headers:_,withCredentials:N="same-origin",fetchOptions:W}=F8(m),K=e||fetch;C=C?(C+"").toLowerCase():"text";let T=Use([x,w&&w.toAbortSignal()],b),F=null;const E=T&&T.unsubscribe&&(()=>{T.unsubscribe()});let H;try{if(A&&u&&k!=="get"&&k!=="head"&&(H=await f(_,g))!==0){let G=new r(y,{method:"POST",body:g,duplex:"half"}),B;if(ye.isFormData(g)&&(B=G.headers.get("content-type"))&&_.setContentType(B),G.body){const[re,ae]=cE(H,tg(uE(A)));g=hE(G.body,pE,re,ae)}}ye.isString(N)||(N=N?"include":"omit");const Y=i&&"credentials"in r.prototype,$={...W,signal:T,method:k.toUpperCase(),headers:_.normalize().toJSON(),body:g,duplex:"half",credentials:Y?N:void 0};F=i&&new r(y,$);let D=await(i?K(F,W):K(y,$));const J=d&&(C==="stream"||C==="response");if(d&&(v||J&&E)){const G={};["status","statusText","headers"].forEach(ge=>{G[ge]=D[ge]});const B=ye.toFiniteNumber(D.headers.get("content-length")),[re,ae]=v&&cE(B,tg(uE(v),!0))||[];D=new n(hE(D.body,pE,re,()=>{ae&&ae(),E&&E()}),G)}C=C||"text";let de=await h[ye.findKey(h,C)||"text"](D,m);return!J&&E&&E(),await new Promise((G,B)=>{M8(G,B,{data:de,headers:Ln.from(D.headers),status:D.status,statusText:D.statusText,config:m,request:F})})}catch(Y){throw E&&E(),Y&&Y.name==="TypeError"&&/Load failed|fetch/i.test(Y.message)?Object.assign(new Qe("Network Error",Qe.ERR_NETWORK,m,F),{cause:Y.cause||Y}):Qe.from(Y,Y&&Y.code,m,F)}}},Gse=new Map,B8=t=>{let e=t&&t.env||{};const{fetch:r,Request:n,Response:s}=e,i=[n,s,r];let a=i.length,l=a,c,u,d=Gse;for(;l--;)c=i[l],u=d.get(c),u===void 0&&d.set(c,u=l?new Map:Kse(e)),d=u;return u};B8();const _S={http:dse,xhr:$se,fetch:{get:B8}};ye.forEach(_S,(t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch{}Object.defineProperty(t,"adapterName",{value:e})}});const yE=t=>`- ${t}`,Zse=t=>ye.isFunction(t)||t===null||t===!1;function Yse(t,e){t=ye.isArray(t)?t:[t];const{length:r}=t;let n,s;const i={};for(let a=0;a<r;a++){n=t[a];let l;if(s=n,!Zse(n)&&(s=_S[(l=String(n)).toLowerCase()],s===void 0))throw new Qe(`Unknown adapter '${l}'`);if(s&&(ye.isFunction(s)||(s=s.get(e))))break;i[l||"#"+a]=s}if(!s){const a=Object.entries(i).map(([c,u])=>`adapter ${c} `+(u===!1?"is not supported by the environment":"is not available in the build"));let l=r?a.length>1?`since :
765`+a.map(yE).join(`
766`):" "+yE(a[0]):"as no adapter specified";throw new Qe("There is no suitable adapter to dispatch the request "+l,"ERR_NOT_SUPPORT")}return s}const $8={getAdapter:Yse,adapters:_S};function vw(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new Od(null,t)}function xE(t){return vw(t),t.headers=Ln.from(t.headers),t.data=kw.call(t,t.transformRequest),["post","put","patch"].indexOf(t.method)!==-1&&t.headers.setContentType("application/x-www-form-urlencoded",!1),$8.getAdapter(t.adapter||wf.adapter,t)(t).then(function(n){return vw(t),n.data=kw.call(t,t.transformResponse,n),n.headers=Ln.from(n.headers),n},function(n){return L8(n)||(vw(t),n&&n.response&&(n.response.data=kw.call(t,t.transformResponse,n.response),n.response.headers=Ln.from(n.response.headers))),Promise.reject(n)})}const U8="1.13.1",Vy={};["object","boolean","number","function","string","symbol"].forEach((t,e)=>{Vy[t]=function(n){return typeof n===t||"a"+(e<1?"n ":" ")+t}});const wE={};Vy.transitional=function(e,r,n){function s(i,a){return"[Axios v"+U8+"] Transitional option '"+i+"'"+a+(n?". "+n:"")}return(i,a,l)=>{if(e===!1)throw new Qe(s(a," has been removed"+(r?" in "+r:"")),Qe.ERR_DEPRECATED);return r&&!wE[a]&&(wE[a]=!0,console.warn(s(a," has been deprecated since v"+r+" and will be removed in the near future"))),e?e(i,a,l):!0}};Vy.spelling=function(e){return(r,n)=>(console.warn(`${n} is likely a misspelling of ${e}
766`),!0)};function Jse(t,e,r){if(typeof t!="object")throw new Qe("options must be an object",Qe.ERR_BAD_OPTION_VALUE);const n=Object.keys(t);let s=n.length;for(;s-- >0;){const i=n[s],a=e[i];if(a){const l=t[i],c=l===void 0||a(l,i,t);if(c!==!0)throw new Qe("option "+i+" must be "+c,Qe.ERR_BAD_OPTION_VALUE);continue}if(r!==!0)throw new Qe("Unknown option "+i,Qe.ERR_BAD_OPTION)}}const s0={assertOptions:Jse,validators:Vy},ti=s0.validators;let Yl=class{constructor(e){this.defaults=e||{},this.interceptors={request:new oE,response:new oE}}async request(e,r){try{return await this._request(e,r)}catch(n){if(n instanceof Error){let s={};Error.captureStackTrace?Error.captureStackTrace(s):s=new Error;const i=s.stack?s.stack.replace(/^.+\n/,""):"";try{n.stack?i&&!String(n.stack).endsWith(i.replace(/^.+\n.+\n/,""))&&(n.stack+=`
767`+i):n.stack=i}catch{}}throw n}}_request(e,r){typeof e=="string"?(r=r||{},r.url=e):r=e||{},r=pc(this.defaults,r);const{transitional:n,paramsSerializer:s,headers:i}=r;n!==void 0&&s0.assertOptions(n,{silentJSONParsing:ti.transitional(ti.boolean),forcedJSONParsing:ti.transitional(ti.boolean),clarifyTimeoutError:ti.transitional(ti.boolean)},!1),s!=null&&(ye.isFunction(s)?r.paramsSerializer={serialize:s}:s0.assertOptions(s,{encode:ti.function,serialize:ti.function},!0)),r.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?r.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:r.allowAbsoluteUrls=!0),s0.assertOptions(r,{baseUrl:ti.spelling("baseURL"),withXsrfToken:ti.spelling("withXSRFToken")},!0),r.method=(r.method||this.defaults.method||"get").toLowerCase();let a=i&&ye.merge(i.common,i[r.method]);i&&ye.forEach(["delete","get","head","post","put","patch","common"],m=>{delete i[m]}),r.headers=Ln.concat(a,i);const l=[];let c=!0;this.interceptors.request.forEach(function(y){typeof y.runWhen=="function"&&y.runWhen(r)===!1||(c=c&&y.synchronous,l.unshift(y.fulfilled,y.rejected))});const u=[];this.interceptors.response.forEach(function(y){u.push(y.fulfilled,y.rejected)});let d,h=0,p;if(!c){const m=[xE.bind(this),void 0];for(m.unshift(...l),m.push(...u),p=m.length,d=Promise.resolve(r);h<p;)d=d.then(m[h++],m[h++]);return d}p=l.length;let f=r;for(;h<p;){const m=l[h++],y=l[h++];try{f=m(f)}catch(k){y.call(this,k);break}}try{d=xE.call(this,f)}catch(m){return Promise.reject(m)}for(h=0,p=u.length;h<p;)d=d.then(u[h++],u[h++]);return d}getUri(e){e=pc(this.defaults,e);const r=D8(e.baseURL,e.url,e.allowAbsoluteUrls);return I8(r,e.params,e.paramsSerializer)}};ye.forEach(["delete","get","head","options"],function(e){Yl.prototype[e]=function(r,n){return this.request(pc(n||{},{method:e,url:r,data:(n||{}).data}))}});ye.forEach(["post","put","patch"],function(e){function r(n){return function(i,a,l){return this.request(pc(l||{},{method:e,headers:n?{"Content-Type":"multipart/form-data"}:{},url:i,data:a}))}}Yl.prototype[e]=r(),Yl.prototype[e+"Form"]=r(!0)});let Xse=class W8{constructor(e){if(typeof e!="function")throw new TypeError("executor must be a function.");let r;this.promise=new Promise(function(i){r=i});const n=this;this.promise.then(s=>{if(!n._listeners)return;let i=n._listeners.length;for(;i-- >0;)n._listeners[i](s);n._listeners=null}),this.promise.then=s=>{let i;const a=new Promise(l=>{n.subscribe(l),i=l}).then(s);return a.cancel=function(){n.unsubscribe(i)},a},e(function(i,a,l){n.reason||(n.reason=new Od(i,a,l),r(n.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const r=this._listeners.indexOf(e);r!==-1&&this._listeners.splice(r,1)}toAbortSignal(){const e=new AbortController,r=n=>{e.abort(n)};return this.subscribe(r),e.signal.unsubscribe=()=>this.unsubscribe(r),e.signal}static source(){let e;return{token:new W8(function(s){e=s}),cancel:e}}};function Qse(t){return function(r){return t.apply(null,r)}}function eie(t){return ye.isObject(t)&&t.isAxiosError===!0}const Lv={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,Re
767setContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(Lv).forEach(([t,e])=>{Lv[e]=t});function V8(t){const e=new Yl(t),r=k8(Yl.prototype.request,e);return ye.extend(r,Yl.prototype,e,{allOwnKeys:!0}),ye.extend(r,e,null,{allOwnKeys:!0}),r.create=function(s){return V8(pc(t,s))},r}const Qt=V8(wf);Qt.Axios=Yl;Qt.CanceledError=Od;Qt.CancelToken=Xse;Qt.isCancel=L8;Qt.VERSION=U8;Qt.toFormData=Wy;Qt.AxiosError=Qe;Qt.Cancel=Qt.CanceledError;Qt.all=function(e){return Promise.all(e)};Qt.spread=Qse;Qt.isAxiosError=eie;Qt.mergeConfig=pc;Qt.AxiosHeaders=Ln;Qt.formToJSON=t=>R8(ye.isHTMLForm(t)?new FormData(t):t);Qt.getAdapter=$8.getAdapter;Qt.HttpStatusCode=Lv;Qt.default=Qt;const{Axios:vve,AxiosError:jve,CanceledError:Sve,isCancel:Nve,CancelToken:Cve,VERSION:Eve,all:Tve,Cancel:Ave,isAxiosError:zve,spread:Pve,toFormData:_ve,AxiosHeaders:Ive,HttpStatusCode:Ove,formToJSON:Rve,getAdapter:Lve,mergeConfig:Mve}=Qt,tie=typeof window<"u"&&["localhost","127.0.0.1","[::1]"].includes(window.location.hostname),IS={apiUrl:!tie&&"/api"||"/api",recaptchaSiteKey:"6Lc1qGYpAAAAANdix_8SfM46knnrZpyz9dTFZerW"},al={auth:{register:"/auth/register",login:"/auth/login",verify:"/auth/verify",resendCode:"/auth/resend-code",forgotPassword:"/auth/forgot-password",resetPassword:"/auth/reset-password",me:"/auth/me"}},xe=Qt.create({baseURL:IS.apiUrl,headers:{"Content-Type":"application/json"}});let jw=!1,Mv=[];const bE=(t,e=null)=>{Mv.forEach(r=>{t?r.reject(t):r.resolve(e)}),Mv=[]};xe.interceptors.request.use(t=>{typeof FormData<"u"&&t.data instanceof FormData&&delete t.headers["Content-Type"],t.headers["Accept-Language"]=Xt.language,t.headers["X-Language"]=Xt.language;const e=localStorage.getItem("smart-copy-auth");if(e){const{state:r}=JSON.parse(e);r!=null&&r.accessToken&&(t.headers.Authorization=`Bearer ${r.accessToken}`)}return t},t=>Promise.reject(t));xe.interceptors.response.use(t=>t,async t=>{var r,n;const e=t.config;if(((r=t.response)==null?void 0:r.status)===401&&!e._retry){if((n=e.url)!=null&&n.includes("/auth/refresh"))return $r.getState().logout(),Promise.reject(t);if(jw)return new Promise((l,c)=>{Mv.push({resolve:l,reject:c})}).then(l=>(e.headers.Authorization=`Bearer ${l}`,xe(e))).catch(l=>Promise.reject(l));e._retry=!0,jw=!0;const s=localStorage.getItem("smart-copy-auth");if(!s)return $r.getState().logout(),Promise.reject(t);const{state:i}=JSON.parse(s),a=i==null?void 0:i.refreshToken;if(!a)return $r.getState().logout(),Promise.reject(t);try{const l=await Qt.post(`${IS.apiUrl}/auth/refresh`,{refreshToken:a}),{accessToken:c,refreshToken:u}=l.data,d=i.user;return $r.getState().setAuth(d,c,u),bE(null,c),e.headers.Authorization=`Bearer ${c}`,xe(e)}catch(l){return bE(l,null),$r.getState().logout(),Promise.reject(l)}finally{jw=!1}}return Promise.reject(t)});const Fo=t=>{var e,r;return(r=(e=t.response)==null?void 0:e.data)!=null&&r.error?t.response.data.error:"Wystąpił błąd. Spróbuj ponownie."},No={getPosts:async(t=1,e=12)=>{const{data:r}=await xe.get("/blog",{params:{page:t,limit:e}});return r},getRecentPosts:async(t=3)=>{const{data:e}=await xe.get("/blog/recent",{params:{limit:t}});return e},getPostBySlug:async t=>{const{data:e}=await xe.get(`/blog/${t}`);return e},admin:{getAllPosts:async(t=1,e=20,r)=>{const{data:n}=await xe.get("/admin/blog",{params:{page:t,limit:e,status:r}});return n},getPostById:async t=>{const{data:e}=await xe.get(`/admin/blog/${t}`);return e},createPost:async t=>{const{data:e}=await xe.post("/admin/blog",t,{headers:{"Content-Type":"multipart/form-data"}});return e},updatePost:async(t,e)=>{const{data:r}=await xe.put(`/admin/blog/${t}`,e,{headers:{"Content-Type":"multipart/form-data"}});return r},deletePost:async t=>{const{data:e}=await xe.delete(`/admin/blog/${t}`);return e}}};function Fa(t,e,r){if(r==="en"){const n=`${e}En`,s=t[n];if(s&&typeof s=="string"&&s.trim())return s}return t[e]||""}function H8(t,e){return e==="en"&&t.slugEn?t.slugEn:t.slug}function rie(t,e){return{...t,localTitle:Fa(t,"title",e),localSlug:H8(t,e),localExcerpt:Fa(t,"excerpt",e),localContent:Fa(t,"content",e),localMetaTitle:Fa(t,"metaTitle",e),localMetaDescription:Fa(t,"metaDescription",e),localKeywords:Fa(t,"keywords",e)}}function nie(t){return!!(t.titleEn&&t.contentEn)}const q8=6048e5,sie=864e5,kE=Symbol.for("constructDateFrom");function Bo(t,e){return typeof t=="function"?t(e):t&&typeof t=="object"&&kE in t?t[kE](e):t instanceof Date?new t.constructor(e):new Date(e)}function Xs(t,e){return Bo(e||t,t)}let iie={};function Hy(){return iie}function fc(t,e){var l,c,u,d;const r=Hy(),n=(e==null?void 0:e.weekStartsOn)??((c=(l=e==null?void 0:e.locale)==null?void 0:l.options)==null?void 0:c.weekStartsOn)??r.weekStartsOn??((d=(u=r.locale)==null?void 0:u.options)==null?void 0:d.weekStartsOn)??0,s=Xs(t,e==null?void 0:e.in),i=s.getDay(),a=(i<n?7:0)+i-n;return s.setDate(s.getDate()-a),s.setHours(0,0,0,0),s}function rg(t,e){return fc(t,{...e,weekStartsOn:1}
vendor: 4,121 bytes, line 767
767)}function K8(t,e){const r=Xs(t,e==null?void 0:e.in),n=r.getFullYear(),s=Bo(r,0);s.setFullYear(n+1,0,4),s.setHours(0,0,0,0);const i=rg(s),a=Bo(r,0);a.setFullYear(n,0,4),a.setHours(0,0,0,0);const l=rg(a);return r.getTime()>=i.getTime()?n+1:r.getTime()>=l.getTime()?n:n-1}function vE(t){const e=Xs(t),r=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return r.setUTCFullYear(e.getFullYear()),+t-+r}function G8(t,...e){const r=Bo.bind(null,t||e.find(n=>typeof n=="object"));return e.map(r)}function jE(t,e){const r=Xs(t,e==null?void 0:e.in);return r.setHours(0,0,0,0),r}function aie(t,e,r){const[n,s]=G8(r==null?void 0:r.in,t,e),i=jE(n),a=jE(s),l=+i-vE(i),c=+a-vE(a);return Math.round((l-c)/sie)}function oie(t,e){const r=K8(t,e),n=Bo(t,0);return n.setFullYear(r,0,4),n.setHours(0,0,0,0),rg(n)}function lie(t){return t instanceof Date||typeof t=="object"&&Object.prototype.toString.call(t)==="[object Date]"}function cie(t){return!(!lie(t)&&typeof t!="number"||isNaN(+Xs(t)))}function uie(t,e){const r=Xs(t,e==null?void 0:e.in);return r.setFullYear(r.getFullYear(),0,1),r.setHours(0,0,0,0),r}const die={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"}},hie=(t,e,r)=>{let n;const s=die[t];return typeof s=="string"?n=s:e===1?n=s.one:n=s.other.replace("{{count}}",e.toString()),r!=null&&r.addSuffix?r.comparison&&r.comparison>0?"in "+n:n+" ago":n};function ju(t){return(e={})=>{const r=e.width?String(e.width):t.defaultWidth;return t.formats[r]||t.formats[t.defaultWidth]}}const pie={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},fie={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},mie={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},gie={date:ju({formats:pie,defaultWidth:"full"}),time:ju({formats:fie,defaultWidth:"full"}),dateTime:ju({formats:mie,defaultWidth:"full"})},yie={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},xie=(t,e,r,n)=>yie[t];function yi(t){return(e,r)=>{const n=r!=null&&r.context?String(r.context):"standalone";let s;if(n==="formatting"&&t.formattingValues){const a=t.defaultFormattingWidth||t.defaultWidth,l=r!=null&&r.width?String(r.width):a;s=t.formattingValues[l]||t.formattingValues[a]}else{const a=t.defaultWidth,l=r!=null&&r.width?String(r.width):t.defaultWidth;s=t.values[l]||t.values[a]}const i=t.argumentCallback?t.argumentCallback(e):e;return s[i]}}const wie={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},bie={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},kie={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"]},vie={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Frid
767ay","Saturday"]},jie={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"}},Sie={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"}},Nie=(t,e)=>{const r=Number(t),n=r%100;if(n>20||n<10)switch(n%10){case 1:return r+"st";case 2:return r+"nd";case 3:return r+"rd"}return r+"th"},Cie={ordinalNumber:Nie,era:yi({values:wie,defaultWidth:"wide"}),quarter:yi({values:bie,defaultWidth:"wide",argumentCallback:t=>t-1}),month:yi({values:kie,defaultWidth:"wide"}),day:yi({values:vie,defaultWidth:"wide"}),dayPeriod:yi({values:jie,defaultWidth:"wide",formattingValues:Sie,defaultFormattingWidth:"wide"})};function xi(t){return(e,r={})=>{const n=r.width,s=n&&t.matchPatterns[n]||t.matchPatterns[t.defaultMatchWidth],i=e.match(s);if(!i)return null;const a=i[0],l=n&&t.parsePatterns[n]||t.parsePatterns[t.defaultParseWidth],c=Array.isArray(l)?Tie(l,h=>h.test(a)):Eie(l,h=>h.test(a));let u;u=t.valueCallback?t.valueCallback(c):c,u=r.valueCallback?r.valueCallback(u):u;const d=e.slice(a.length);return{value:u,rest:d}}}function Eie(t,e){for(const r in t)if(Object.prototype.hasOwnProperty.call(t,r)&&e(t[r]))return r}function Tie(t,e){for(let r=0;r<t.length;r++)if(e(t[r]))return r}function Z8(t){return(e,r={})=>{const n=e.match(t.matchPattern);if(!n)return null;const s=n[0],i=e.match(t.parsePattern);if(!i)return null;let a=t.valueCallback?t.valueCallback(i[0]):i[0];a=r.valueCallback?r.valueCallback(a):a;const l=e.slice(s.length);return{value:a,rest:l}}}const Aie=/^(\d+)(th|st|nd|rd)?/i,zie=/\d+/i,Pie={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},_ie={any:[/^b/i,/^(a|c)/i]},Iie={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},Oie={any:[/1/i,/2/i,/3/i,/4/i]},Rie={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},Lie={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]},Mie={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},Die={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]},Fie={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},Bie={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}},$ie={ordinalNumber:Z8({matchPattern:Aie,parsePattern:zie,valueCallback:t=>parseInt(t,10)}),era:xi({matchPatterns:Pie,defaultMatchWidth:"wide",parsePatterns:_ie,defaultParseWidth:"any"}),quarter:xi({matchPatterns:Iie,defaultMatchWidth:"wide",parsePatterns:Oie,defaultParseWidth:"any",valueCallback:t=>t+1}),month:xi({matchPatterns:Rie,defaultMatchWidth:"wide",parsePatterns:Lie,defaultParseWidth:"any"}),day:xi({matchPatterns:Mie,defaultMatchWidth:"wide",parsePatterns:Die,defaultParseWidth:"any"}),dayPeriod:xi({matchPatterns:Fie,defaultMatchWidth:"any",parsePatterns:Bie,defaultParseWidth:"any"})},OS={code:"en-US",formatDistance:hie,formatLong:gie,formatRelative:xie,localize:Cie,match:$ie,options:{weekStartsOn:0,firstWeekContainsDate:1}};function Uie(t,e){const r=Xs(t,e==null?void 0:e.in);return aie(r,uie(r))+1}function Wie(t,e){const r=Xs(t,e==null?void 0:e.in),n=+rg(r)-+oie(r);return Math.round(n/q8)+1}function Y8(t,e){var d,h,p,f;const r=Xs(t,e==null?void 0:e.in),n=r.getFullYear(),s=Hy(),i=(e==null?void 0:e.firstWeekContainsDate)??((h=(d=e==null?void 0:e.locale)==null?void 0:d.options)==null?void 0:h.firstWeekContainsDate)??s.firstWeekContainsDate??((f=(p=s.locale)==null?void 0:p.options)==null?void 0:f.firstWeekContainsDate)??1,a=Bo((e==null?void 0:e.in)||t,0);a.setFullYear(n+1,0,i),a.setHours(0,0,0,0);const l=fc(a,e),c=Bo((e==null?void 0:e.in)||t,0);c.setFullYear(n,0,i),c.setHours(0,0,0,0);const u=fc(c,e);return+r>=+l?n+1:+r>=+u?n:n-1}function Vie(t,e){var l,c,u,d;const r=Hy(),n=(e==null?void 0:e.firstWeekContainsDate)??((c=(l=e==null?void 0:e.locale)==null?void 0:l.options)==null?void 0:c.firstWeekContainsDate)??r.firstWeekContainsDate??((d=(u=r.locale)==null?void 0:u.options)==null?void 0:d.firstWeekContainsDate)??1,s=Y8(t,e),i=Bo((e==null?void 0:e.in)||t,0);return i.setFullYear(s,0,n),i.setHours(0,0,0,0),fc(i,e)}function Hie(t,e){const r=Xs(t,e==null?void 0:e.in),n=+fc(r,e)-+Vie(r,e);return Math.round(n/q8)+1}function vt(t,e){const r=t<0?"-":"",n=Math.abs(t).toString().padStart(e,"0");return r+n}const Ta={y(t,e){const r=t.getFullYear(),n=r>0?r:1-r;return vt(e==="yy"?n%100:n,e.length)},M(t,e){const r=t.getMonth();return e==="M"?String(r+1):vt(r+1,2)},d(t,e){return vt(t.getDate(),e.length)},a(t,e){const r=t.getHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return r.toUpperCase();case"aaa":return r;case"aaaaa":return r[0];case"aaaa":default:return r==="am"?"a.m.":"p.m."}},h(t,e){return vt(t.getHours()%12||12,e.length)},H(t,e){return vt(t.getHours(),e.length)},m(t,e){return vt(t.getMinutes(),e.length)},s(t,e){return vt(t.getSeconds(),e.length)},S(t,e){const r=e.length,n=t.getMilliseconds(),s=Math.trunc(n*Math.pow(10,r-3));return vt(s,e.length)}},Oc={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},SE={G:function(t,e,r){const n=t.getFullYear()>0?1:0;switch(e){case"G":case"GG":case"GGG":return r.era(n,{width:"abbreviated"});case"GGGGG":return r.era(n,{width:"narrow"});case"GGGG":default:return r.era(n,{width:"wide"})}},y:function(t,e,r){if(e==="yo"){const n=t.getFullYear(),s=n>0?n:1-n;return r.ordinalNumber(s,{unit:"year"})}return Ta.y(t,e)},Y:function(t,e,r,n){const s=Y8(t,n),i=s>0?s:1-s;if(e==="YY"){const a=i%100;return vt(a,2)}return e==="Yo"?r.ordinalNumber(i,{unit:"year"}):vt(i,e.length)},R:function(t,e){const r=K8(t);return vt(r,e.length)},u:function(t,e){const r=t.getFullYear();return vt(r,e.length)},Q:function(t,e,r){const n=Math.ceil((t.getMonth()+1)/3);switch(e){case"Q":return String(n);case"QQ":return vt(n,2);case"Qo":return r.ordinalNumber(n,{unit:"quarter"});case"QQQ":return r.quarter(n,{width:"abbreviated",context:"formatting"});case"QQQQQ":return r.quarter(n,{width:"narrow",context:"formatting"});case"QQQQ":default:return r.quarter(n,{width:"wide",context:"formatting"})}},q:function(t,e,r){const n=Math.ceil((t.getMonth()+1)/3);switch(e){case"q":return String(n);case"qq":return vt(n,2);case"qo":return r.ordinalNumber(n,{unit:"quarter"});case"qqq":return r.quarter(n,{width:"abbreviated",context:"standalone"});case"qqqqq":return r.quarter(n,{width:"narrow",context:"standalone"});case"qqqq":default:return r.quarter(n,{width:"wide",context:"standalone"})}},M:function(t,e,r){const n=t.getMonth();switch(e){case"M":case"MM":return Ta.M(t,e);case"Mo":return r.ordinalNumber(n+1,{unit:"month"});case"MMM":return r.month(n,{width:"abbreviated",context:"formatting"});case"MMMMM":return r.month(n,{width:"narrow",context:"formatting"});case"MMMM":default:return r.month(n,{width:"wide",context:"formatting"})}},L:function(t,e,r){const n=t.getMonth();switch(e){case"L":return String(n+1);case"LL":return vt(n+1,2);case"Lo":return r.ordinalNumber(n+1,{unit:"month"});case"LLL":return r.month(n,{width:"abbreviated",context:"standalone"});case"LLLLL":return r.month(n,{width:"narrow",context:"standalone"});case"LLLL":default:return r.month(n,{width:"wide",context:"standalone"})}},w:function(t,e,r,n){const s=Hie(t,n);return e==="wo"?r.ordinalNumber(s,{unit:"week"}):vt(s,e.length)},I:function(t,e,r){const n=Wie(t);return e==="Io"?r.ordinalNumber(n,{unit:"week"}):vt(n,e.length)},d:function(t,e,r){return e==="do"?r.ordinalNumber(t.getDate(),{unit:"date"}):Ta.d(t,e)},D:function(t,e,r){const n=Uie(t);return e==="Do"?r.ordinalNumber(n,{unit:"dayOfYear"}):vt(n,e.length)},E:function(t,e,r){const n=t.getDay();switch(e){case"E":case"EE":case"EEE":return r.day(n,{width:"abbreviated",context:"formatting"});case"EEEEE":return r.day(n,{width:"narrow",context:"formatting"});case"EEEEEE":return r.day(n,{width:"short",context:"formatting"});case"EEEE":default:return r.day(n,{width:"wide",context:"formatting"})}},e:function(t,e,r,n){const s=t.getDay(),i=(s-n.weekStartsOn+8)%7||7;switch(e){case"e":return String(i);case"ee":return vt(i,2);case"eo":return r.ordinalNumber(i,{unit:"day"});case"eee":return r.day(s,{width:"abbreviated",context:"formatting"});case"eeeee":return r.day(s,{width:"narrow",context:"formatting"});case"eeeeee":return r.day(s,{width:"short",context:"formatting"});case"eeee":default:return r.day(s,{width:"wide",context:"formatting"})}},c:function(t,e,r,n){const s=t.getDay(),i=(s-n.weekStartsOn+8)%7||7;switch(e){case"c":return String(i);case"cc":return vt(i,e.length);case"co":return r.ordinalNumber(i,{unit:"day"});case"ccc":return r.day(s,{width:"abbreviated",context:"standalone"});case"ccccc":return r.day(s,{width:"narrow",context:"standalone"});case"cccccc":return r.day(s,{width:"short",context:"standalone"});case"cccc":default:return r.day(s,{width:"wide",context:"standalone"})}},i:function(t,e,r){const n=t.getDay(),s=n===0?7:n;switch(e){case"i":return String(s);case"ii":return vt(s,e.length);case"io":return r.ordinalNumber(s,{unit:"day"});case"iii":return r.day(n,{width:"abbreviated",context:"formatting"});case"iiiii":return r.day(n,{width:"narrow",context:"formatting"});case"iiiiii":return r.day(n,{width:"short",context:"formatting"});case"iiii":default:return r.day(n,{width:"wide",context:"formatting"})}},a:function(t,e,r){const s=t.getHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return r.dayPeriod(s,{width:"abbreviated",context:"formatting"});case"aaa":return r.dayPeriod(s,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return r.dayPeriod(s,{width:"narrow",context:"formatting"});case"aaaa":default:return r.dayPeriod(s,{width:"wide",context:"formatting"})}},b:function(t,e,r){const n=t.getHours();let s;switch(n===12?s=Oc.noon:n===0?s=Oc.midnight:s=n/12>
vendor: 4,575 bytes, line 767
767=1?"pm":"am",e){case"b":case"bb":return r.dayPeriod(s,{width:"abbreviated",context:"formatting"});case"bbb":return r.dayPeriod(s,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return r.dayPeriod(s,{width:"narrow",context:"formatting"});case"bbbb":default:return r.dayPeriod(s,{width:"wide",context:"formatting"})}},B:function(t,e,r){const n=t.getHours();let s;switch(n>=17?s=Oc.evening:n>=12?s=Oc.afternoon:n>=4?s=Oc.morning:s=Oc.night,e){case"B":case"BB":case"BBB":return r.dayPeriod(s,{width:"abbreviated",context:"formatting"});case"BBBBB":return r.dayPeriod(s,{width:"narrow",context:"formatting"});case"BBBB":default:return r.dayPeriod(s,{width:"wide",context:"formatting"})}},h:function(t,e,r){if(e==="ho"){let n=t.getHours()%12;return n===0&&(n=12),r.ordinalNumber(n,{unit:"hour"})}return Ta.h(t,e)},H:function(t,e,r){return e==="Ho"?r.ordinalNumber(t.getHours(),{unit:"hour"}):Ta.H(t,e)},K:function(t,e,r){const n=t.getHours()%12;return e==="Ko"?r.ordinalNumber(n,{unit:"hour"}):vt(n,e.length)},k:function(t,e,r){let n=t.getHours();return n===0&&(n=24),e==="ko"?r.ordinalNumber(n,{unit:"hour"}):vt(n,e.length)},m:function(t,e,r){return e==="mo"?r.ordinalNumber(t.getMinutes(),{unit:"minute"}):Ta.m(t,e)},s:function(t,e,r){return e==="so"?r.ordinalNumber(t.getSeconds(),{unit:"second"}):Ta.s(t,e)},S:function(t,e){return Ta.S(t,e)},X:function(t,e,r){const n=t.getTimezoneOffset();if(n===0)return"Z";switch(e){case"X":return CE(n);case"XXXX":case"XX":return yl(n);case"XXXXX":case"XXX":default:return yl(n,":")}},x:function(t,e,r){const n=t.getTimezoneOffset();switch(e){case"x":return CE(n);case"xxxx":case"xx":return yl(n);case"xxxxx":case"xxx":default:return yl(n,":")}},O:function(t,e,r){const n=t.getTimezoneOffset();switch(e){case"O":case"OO":case"OOO":return"GMT"+NE(n,":");case"OOOO":default:return"GMT"+yl(n,":")}},z:function(t,e,r){const n=t.getTimezoneOffset();switch(e){case"z":case"zz":case"zzz":return"GMT"+NE(n,":");case"zzzz":default:return"GMT"+yl(n,":")}},t:function(t,e,r){const n=Math.trunc(+t/1e3);return vt(n,e.length)},T:function(t,e,r){return vt(+t,e.length)}};function NE(t,e=""){const r=t>0?"-":"+",n=Math.abs(t),s=Math.trunc(n/60),i=n%60;return i===0?r+String(s):r+String(s)+e+vt(i,2)}function CE(t,e){return t%60===0?(t>0?"-":"+")+vt(Math.abs(t)/60,2):yl(t,e)}function yl(t,e=""){const r=t>0?"-":"+",n=Math.abs(t),s=vt(Math.trunc(n/60),2),i=vt(n%60,2);return r+s+e+i}const EE=(t,e)=>{switch(t){case"P":return e.date({width:"short"});case"PP":return e.date({width:"medium"});case"PPP":return e.date({width:"long"});case"PPPP":default:return e.date({width:"full"})}},J8=(t,e)=>{switch(t){case"p":return e.time({width:"short"});case"pp":return e.time({width:"medium"});case"ppp":return e.time({width:"long"});case"pppp":default:return e.time({width:"full"})}},qie=(t,e)=>{const r=t.match(/(P+)(p+)?/)||[],n=r[1],s=r[2];if(!s)return EE(t,e);let i;switch(n){case"P":i=e.dateTime({width:"short"});break;case"PP":i=e.dateTime({width:"medium"});break;case"PPP":i=e.dateTime({width:"long"});break;case"PPPP":default:i=e.dateTime({width:"full"});break}return i.replace("{{date}}",EE(n,e)).replace("{{time}}",J8(s,e))},Kie={p:J8,P:qie},Gie=/^D+$/,Zie=/^Y+$/,Yie=["D","DD","YY","YYYY"];function Jie(t){return Gie.test(t)}function Xie(t){return Zie.test(t)}function Qie(t,e,r){const n=eae(t,e,r);if(console.warn(n),Yie.includes(t))throw new RangeError(n)}function eae(t,e,r){const n=t[0]==="Y"?"years":"days of the month";return`Use \`${t.toLowerCase()}\` instead of \`${t}\` (in \`${e}\`) for formatting ${n} to the input \`${r}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const tae=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,rae=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,nae=/^'([^]*?)'?$/,sae=/''/g,iae=/[a-zA-Z]/;function ng(t,e,r){var d,h,p,f,m,y,k,g;const n=Hy(),s=(r==null?void 0:r.locale)??n.locale??OS,i=(r==null?void 0:r.firstWeekContainsDate)??((h=(d=r==null?void 0:r.locale)==null?void 0:d.options)==null?void 0:h.firstWeekContainsDate)??n.firstWeekContainsDate??((f=(p=n.locale)==null?void 0:p.options)==null?void 0:f.firstWeekContainsDate)??1,a=(r==null?void 0:r.weekStartsOn)??((y=(m=r==null?void 0:r.locale)==null?void 0:m.options)==null?void 0:y.weekStartsOn)??n.weekStartsOn??((g=(k=n.locale)==null?void 0:k.options)==null?void 0:g.weekStartsOn)??0,l=Xs(t,r==null?void 0:r.in);if(!cie(l))throw new RangeError("Invalid time value");let c=e.match(rae).map(x=>{const w=x[0];if(w==="p"||w==="P"){const b=Kie[w];return b(x,s.formatLong)}return x}).join("").match(tae).map(x=>
767{if(x==="''")return{isToken:!1,value:"'"};const w=x[0];if(w==="'")return{isToken:!1,value:aae(x)};if(SE[w])return{isToken:!0,value:x};if(w.match(iae))throw new RangeError("Format string contains an unescaped latin alphabet character `"+w+"`");return{isToken:!1,value:x}});s.localize.preprocessor&&(c=s.localize.preprocessor(l,c));const u={firstWeekContainsDate:i,weekStartsOn:a,locale:s};return c.map(x=>{if(!x.isToken)return x.value;const w=x.value;(!(r!=null&&r.useAdditionalWeekYearTokens)&&Xie(w)||!(r!=null&&r.useAdditionalDayOfYearTokens)&&Jie(w))&&Qie(w,e,String(t));const b=SE[w[0]];return b(l,w,s.localize,u)}).join("")}function aae(t){const e=t.match(nae);return e?e[1].replace(sae,"'"):t}function oae(t,e,r){const[n,s]=G8(r==null?void 0:r.in,t,e);return+fc(n,r)==+fc(s,r)}const lae={lessThanXSeconds:{one:{regular:"mniej niż sekunda",past:"mniej niż sekundę",future:"mniej niż sekundę"},twoFour:"mniej niż {{count}} sekundy",other:"mniej niż {{count}} sekund"},xSeconds:{one:{regular:"sekunda",past:"sekundę",future:"sekundę"},twoFour:"{{count}} sekundy",other:"{{count}} sekund"},halfAMinute:{one:"pół minuty",twoFour:"pół minuty",other:"pół minuty"},lessThanXMinutes:{one:{regular:"mniej niż minuta",past:"mniej niż minutę",future:"mniej niż minutę"},twoFour:"mniej niż {{count}} minuty",other:"mniej niż {{count}} minut"},xMinutes:{one:{regular:"minuta",past:"minutę",future:"minutę"},twoFour:"{{count}} minuty",other:"{{count}} minut"},aboutXHours:{one:{regular:"około godziny",past:"około godziny",future:"około godzinę"},twoFour:"około {{count}} godziny",other:"około {{count}} godzin"},xHours:{one:{regular:"godzina",past:"godzinę",future:"godzinę"},twoFour:"{{count}} godziny",other:"{{count}} godzin"},xDays:{one:{regular:"dzień",past:"dzień",future:"1 dzień"},twoFour:"{{count}} dni",other:"{{count}} dni"},aboutXWeeks:{one:"około tygodnia",twoFour:"około {{count}} tygodni",other:"około {{count}} tygodni"},xWeeks:{one:"tydzień",twoFour:"{{count}} tygodnie",other:"{{count}} tygodni"},aboutXMonths:{one:"około miesiąc",twoFour:"około {{count}} miesiące",other:"około {{count}} miesięcy"},xMonths:{one:"miesiąc",twoFour:"{{count}} miesiące",other:"{{count}} miesięcy"},aboutXYears:{one:"około rok",twoFour:"około {{count}} lata",other:"około {{count}} lat"},xYears:{one:"rok",twoFour:"{{count}} lata",other:"{{count}} lat"},overXYears:{one:"ponad rok",twoFour:"ponad {{count}} lata",other:"ponad {{count}} lat"},almostXYears:{one:"prawie rok",twoFour:"prawie {{count}} lata",other:"prawie {{count}} lat"}};function cae(t,e){if(e===1)return t.one;const r=e%100;if(r<=20&&r>10)return t.other;const n=r%10;return n>=2&&n<=4?t.twoFour:t.other}function Sw(t,e,r){const n=cae(t,e);return(typeof n=="string"?n:n[r]).replace("{{count}}",String(e))}const uae=(t,e,r)=>{const n=lae[t];return r!=null&&r.addSuffix?r.comparison&&r.comparison>0?"za "+Sw(n,e,"future"):Sw(n,e,"past")+" temu":Sw(n,e,"regular")},dae={full:"EEEE, do MMMM y",long:"do MMMM y",medium:"do MMM y",short:"dd.MM.y"},hae={full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},pae={full:"{{date}} {{time}}",long:"{{date}} {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},fae={date:ju({formats:dae,defaultWidth:"full"}),time:ju({formats:hae,defaultWidth:"full"}),dateTime:ju({formats:pae,defaultWidth:"full"})},mae={masculine:"ostatni",feminine:"ostatnia"},gae={masculine:"ten",feminine:"ta"},yae={masculine:"następny",feminine:"następna"},xae={0:"feminine",1:"masculine",2:"masculine",3:"feminine",4:"masculine",5:"masculine",6:"feminine"};function TE(t,e,r,n){let s;if(oae(e,r,n))s=gae;else if(t==="lastWeek")s=mae;else if(t==="nextWeek")s=yae;else throw new Error(`Cannot determine adjectives for token ${t}`);const i=e.getDay(),a=xae[i];return`'${s[a]}' eeee 'o' p`}const wae={lastWeek:TE,yesterday:"'wczoraj o' p",today:"'dzisiaj o' p",tomorrow:"'jutro o' p",nextWeek:TE,other:"P"},bae=(t,e,r,n)=>{const s=wae[t];return typeof s=="function"?s(t,e,r,n):s},kae={narrow:["p.n.e.","n.e."],abbreviated:["p.n.e.","n.e."],wide:["przed naszą erą","
767naszej ery"]},vae={narrow:["1","2","3","4"],abbreviated:["I kw.","II kw.","III kw.","IV kw."],wide:["I kwartał","II kwartał","III kwartał","IV kwartał"]},jae={narrow:["S","L","M","K","M","C","L","S","W","P","L","G"],abbreviated:["sty","lut","mar","kwi","maj","cze","lip","sie","wrz","paź","lis","gru"],wide:["styczeń","luty","marzec","kwiecień","maj","czerwiec","lipiec","sierpień","wrzesień","październik","listopad","grudzień"]},Sae={narrow:["s","l","m","k","m","c","l","s","w","p","l","g"],abbreviated:["sty","lut","mar","kwi","maj","cze","lip","sie","wrz","paź","lis","gru"],wide:["stycznia","lutego","marca","kwietnia","maja","czerwca","lipca","sierpnia","września","października","listopada","grudnia"]},Nae={narrow:["N","P","W","Ś","C","P","S"],short:["nie","pon","wto","śro","czw","pią","sob"],abbreviated:["niedz.","pon.","wt.","śr.","czw.","pt.","sob."],wide:["niedziela","poniedziałek","wtorek","środa","czwartek","piątek","sobota"]},Cae={narrow:["n","p","w","ś","c","p","s"],short:["nie","pon","wto","śro","czw","pią","sob"],abbreviated:["niedz.","pon.","wt.","śr.","czw.","pt.","sob."],wide:["niedziela","poniedziałek","wtorek","środa","czwartek","piątek","sobota"]},Eae={narrow:{am:"a",pm:"p",midnight:"półn.",noon:"poł",morning:"rano",afternoon:"popoł.",evening:"wiecz.",night:"noc"},abbreviated:{am:"AM",pm:"PM",midnight:"północ",noon:"południe",morning:"rano",afternoon:"popołudnie",evening:"wieczór",night:"noc"},wide:{am:"AM",pm:"PM",midnight:"północ",noon:"południe",morning:"rano",afternoon:"popołudnie",evening:"wieczór",night:"noc"}},Tae={narrow:{am:"a",pm:"p",midnight:"o półn.",noon:"w poł.",morning:"rano",afternoon:"po poł.",evening:"wiecz.",night:"w nocy"},abbreviated:{am:"AM",pm:"PM",midnight:"o północy",noon:"w południe",morning:"rano",afternoon:"po południu",evening:"wieczorem",night:"w nocy"},wide:{am:"AM",pm:"PM",midnight:"o północy",noon:"w południe",morning:"rano",afternoon:"po południu",evening:"wieczorem",night:"w nocy"}},Aae=(t,e)=>String(t),zae={ordinalNumber:Aae,era:yi({values:kae,defaultWidth:"wide"}),quarter:yi({values:vae,defaultWidth:"wide",argumentCallback:t=>t-1}),month:yi({values:jae,defaultWidth:"wide",formattingValues:Sae,defaultFormattingWidth:"wide"}),day:yi({values:Nae,defaultWidth:"wide",formattingValues:Cae,defaultFormattingWidth:"wide"}),dayPeriod:yi({values:Eae,defaultWidth:"wide",formattingValues:Tae,defaultFormattingWidth:"wide"})},Pae=/^(\d+)?/i,_ae=/\d+/i,Iae={narrow:/^(p\.?\s*n\.?\s*e\.?\s*|n\.?\s*e\.?\s*)/i,abbreviated:/^(p\.?\s*n\.?\s*e\.?\s*|n\.?\s*e\.?\s*)/i,wide:/^(przed\s*nasz(ą|a)\s*er(ą|a)|naszej\s*ery)/i},Oae={any:[/^p/i,/^n/i]},Rae={narrow:/^[1234]/i,abbreviated:/^(I|II|III|IV)\s*kw\.?/i,wide:/^(I|II|III|IV)\s*kwarta(ł|l)/i},Lae={narrow:[/1/i,/2/i,/3/i,/4/i],any:[/^I kw/i,/^II kw/i,/^III kw/i,/^IV kw/i]},Mae={narrow:/^[slmkcwpg]/i,abbreviated:/^(sty|lut|mar|kwi|maj|cze|lip|sie|wrz|pa(ź|z)|lis|gru)/i,wide:/^(stycznia|stycze(ń|n)|lutego|luty|marca|marzec|kwietnia|kwiecie(ń|n)|maja|maj|czerwca|czerwiec|lipca|lipiec|sierpnia|sierpie(ń|n)|wrze(ś|s)nia|wrzesie(ń|n)|pa(ź|z)dziernika|pa(ź|z)dziernik|listopada|listopad|grudnia|grudzie(ń|n))/i},Dae={narrow:[/^s/i,/^l/i,/^m/i,/^k/i,/^m/i,/^c/i,/^l/i,/^s/i,/^w/i,/^p/i,/^l/i,/^g/i],any:[/^st/i,/^lu/i,/^mar/i,/^k/i,/^maj/i,/^c/i,/^lip/i,/^si/i,/^w/i,/^p/i,/^lis/i,/^g/i]},Fae={narrow:/^[npwścs]/i,short:/^(nie|pon|wto|(ś|s)ro|czw|pi(ą|a)|sob)/i,abbreviated:/^(niedz|pon|wt|(ś|s)r|czw|pt|sob)\.?/i,wide:/^(niedziela|poniedzia(ł|l)ek|wtorek|(ś|s)roda|czwartek|pi(ą|a)tek|sobota)/i}
767,Bae={narrow:[/^n/i,/^p/i,/^w/i,/^ś/i,/^c/i,/^p/i,/^s/i],abbreviated:[/^n/i,/^po/i,/^w/i,/^(ś|s)r/i,/^c/i,/^pt/i,/^so/i],any:[/^n/i,/^po/i,/^w/i,/^(ś|s)r/i,/^c/i,/^pi/i,/^so/i]},$ae={narrow:/^(^a$|^p$|pó(ł|l)n\.?|o\s*pó(ł|l)n\.?|po(ł|l)\.?|w\s*po(ł|l)\.?|po\s*po(ł|l)\.?|rano|wiecz\.?|noc|w\s*nocy)/i,any:/^(am|pm|pó(ł|l)noc|o\s*pó(ł|l)nocy|po(ł|l)udnie|w\s*po(ł|l)udnie|popo(ł|l)udnie|po\s*po(ł|l)udniu|rano|wieczór|wieczorem|noc|w\s*nocy)/i},Uae={narrow:{am:/^a$/i,pm:/^p$/i,midnight:/pó(ł|l)n/i,noon:/po(ł|l)/i,morning:/rano/i,afternoon:/po\s*po(ł|l)/i,evening:/wiecz/i,night:/noc/i},any:{am:/^am/i,pm:/^pm/i,midnight:/pó(ł|l)n/i,noon:/po(ł|l)/i,morning:/rano/i,afternoon:/po\s*po(ł|l)/i,evening:/wiecz/i,night:/noc/i}},Wae={ordinalNumber:Z8({matchPattern:Pae,parsePattern:_ae,valueCallback:t=>parseInt(t,10)}),era:xi({matchPatterns:Iae,defaultMatchWidth:"wide",parsePatterns:Oae,defaultParseWidth:"any"}),quarter:xi({matchPatterns:Rae,defaultMatchWidth:"wide",parsePatterns:Lae,defaultParseWidth:"any",valueCallback:t=>t+1}),month:xi({matchPatterns:Mae,defaultMatchWidth:"wide",parsePatterns:Dae,defaultParseWidth:"any"}),day:xi({matchPatterns:Fae,defaultMatchWidth:"wide",parsePatterns:Bae,defaultParseWidth:"any"}),dayPeriod:xi({matchPatterns:$ae,defaultMatchWidth:"any",parsePatterns:Uae,defaultParseWidth:"any"})},RS={code:"pl",formatDistance:uae,formatLong:fae,formatRelative:bae,localize:zae,match:Wae,options:{weekStartsOn:1,firstWeekContainsDate:4}},Vae=()=>{const{t,i18n:e}=He("blog"),[r,n]=M.useState(1),s=e.language,i=s==="pl"?RS:OS,{data:a,isLoading:l}=mt({queryKey:["blog","posts",r],queryFn:()=>No.getPosts(r)});return o.jsxs(o.Fragment,{children:[o.jsxs(Ys,{children:[o.jsx("title",{children:t("list.meta.title")}),o.jsx("meta",{name:"description",content:t("list.meta.description")}),o.jsx("meta",{name:"keywords",content:t("list.meta.keywords")})]}),o.jsx(xs,{children:o.jsxs("div",{className:"bg-gradient-to-b from-slate-50 to-white dark:from-gray-900 dark:to-gray-800",children:[o.jsx("div",{className:"bg-gradient-to-r from-indigo-600 to-purple-600 dark:from-indigo-700 dark:to-purple-700 text-white py-16",children:o.jsx("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:o.jsxs("div",{className:"max-w-3xl",children:[o.jsx("h1",{className:"text-4xl md:text-5xl font-bold mb-4",children:t("list.hero.title")}),o.jsx("p",{className:"text-xl text-indigo-100 dark:text-indigo-200 leading-relaxed",children:t("list.hero.subtitle")})]})})}),o.jsx("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-12",children:l?o.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-8",children:[1,2,3,4,5,6].map(c=>o.jsxs("div",{className:"animate-pulse",children:[o.jsx("div",{className:"bg-slate-200 dark:bg-gray-700 rounded-xl h-64 mb-4"}),o.jsxs("div",{className:"space-y-3",children:[o.jsx("div",{className:"bg-slate-200 dark:bg-gray-700 h-6 rounded w-3/4"}),o.jsx("div",{className:"bg-slate-200 dark:bg-gray-700 h-4 rounded w-full"}),o.jsx("div",{className:"bg-slate-200 dark:bg-gray-700 h-4 rounded w-5/6"})]})]},c))}):o.jsxs(o.Fragment,{children:[o.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-8 mb-12",children:a==null?void 0:a.posts.map(c=>{const u=Fa(c,"title",s),d=Fa(c,"excerpt",s),h=H8(c,s);return o.jsxs("article",{className:"bg-white dark:bg-gray-800 rounded-xl shadow-md overflow-hidden border border-slate-200 dark:border-gray-700 hover:shadow-xl dark:hover:shadow-2xl dark:hover:shadow-purple-500/10 transition-all duration-300 group flex flex-col h-full",children:[c.coverImage&&o.jsx(ze,{to:`/blog/${h}`,className:"block overflow-hidden",children:o.jsxs("div",{className:"relative h-56 overflow-hidden bg-slate-100 dark:bg-gray-700",children:[o.jsx("img",{src:c.coverImage,alt:u,className:"w-full h-full object-cover group-hover:scale-110 transition-transform duration-500"}),o.jsx("div",{className:"absolute inset-0 bg-gradient-to-t from-black/40 via-black/10 to-transparent opacity-0 group-hover:opacity-100 transition-opacity duration-300"})]})}),o.jsxs("div",{className:"p-6 flex flex-col flex-1",children:[o.jsxs("div",{className:"flex items-center gap-4 text-xs text-slate-500 dark:text-gray-400 mb-4",children:[o.jsxs("div",{className:"flex items-center gap-1.5",children:[o.jsx(uc,{className:"w-3.5 h-3.5"}),o.jsx("span",{className:"font-medium",children:ng(new Date(c.publishedAt),"d MMM yyyy",{locale:i})})]}),c.author&&o.jsxs("div",{className:"flex items-center gap-1.5",children:[o.jsx(Ay,{className:"w-3.5 h-3.5"}),o.jsxs("span",{className:"font-medium",children:[c.author.firstName," ",c.author.lastName]})]})]}),o.jsx(ze,{to:`/blog/${h}`,className:"mb-3 block",children:o.jsx("h2",{className:"text-xl font-bold text-slate-900 dark:text-white group-hover:text-indigo-600 dark:group-hover:text-indigo-400 transition-colors line-clamp-2 leading-tight",children:u})}
767),o.jsx("p",{className:"text-slate-600 dark:text-gray-300 mb-6 line-clamp-3 leading-relaxed text-sm flex-1",children:d}),o.jsxs(ze,{to:`/blog/${h}`,className:"inline-flex items-center gap-2 text-indigo-600 dark:text-indigo-400 font-semibold text-sm hover:text-indigo-700 dark:hover:text-indigo-300 transition-colors group/link mt-auto",children:[t("list.readMore"),o.jsx(Sr,{className:"w-4 h-4 group-hover/link:translate-x-1 transition-transform"})]})]})]},c.id)})}),a&&a.pagination.pages>1&&o.jsxs("div",{className:"flex items-center justify-center gap-3 pt-8 border-t border-slate-200 dark:border-gray-700",children:[o.jsxs("button",{onClick:()=>n(c=>Math.max(1,c-1)),disabled:r===1,className:"flex items-center gap-2 px-5 py-2.5 bg-white dark:bg-gray-800 rounded-lg shadow-sm border border-slate-300 dark:border-gray-600 text-slate-700 dark:text-gray-200 font-medium hover:bg-slate-50 dark:hover:bg-gray-700 hover:border-slate-400 dark:hover:border-gray-500 disabled:opacity-40 disabled:cursor-not-allowed transition-all",children:[o.jsx(Xj,{className:"w-5 h-5"}),t("list.pagination.previous")]}),o.jsx("div",{className:"flex items-center gap-2",children:Array.from({length:a.pagination.pages},(c,u)=>u+1).filter(c=>c===1||c===a.pagination.pages||Math.abs(c-r)<=1).map((c,u,d)=>o.jsxs("div",{className:"flex items-center",children:[u>0&&d[u-1]!==c-1&&o.jsx("span",{className:"px-2 text-slate-400 dark:text-gray-500 font-medium",children:"..."}),o.jsx("button",{onClick:()=>n(c),className:`min-w-[44px] h-11 rounded-lg font-semibold transition-all ${c===r?"bg-indigo-600 dark:bg-indigo-500 text-white shadow-lg shadow-indigo-600/30 dark:shadow-indigo-500/20 scale-105":"bg-white dark:bg-gray-800 text-slate-700 dark:text-gray-200 hover:bg-slate-50 dark:hover:bg-gray-700 border border-slate-300 dark:border-gray-600 hover:border-slate-400 dark:hover:border-gray-500"}`,children:c})]},c))}),o.jsxs("button",{onClick:()=>n(c=>Math.min(a.pagination.pages,c+1)),disabled:r===a.pagination.pages,className:"flex items-center gap-2 px-5 py-2.5 bg-white dark:bg-gray-800 rounded-lg shadow-sm border border-slate-300 dark:border-gray-600 text-slate-700 dark:text-gray-200 font-medium hover:bg-slate-50 dark:hover:bg-gray-700 hover:border-slate-400 dark:hover:border-gray-500 disabled:opacity-40 disabled:cursor-not-allowed transition-all",children:[t("list.pagination.next"),o.jsx(Pd,{className:"w-5 h-5"})]})]}),(a==null?void 0:a.posts.length)===0&&o.jsxs("div",{className:"text-center py-20",children:[o.jsx("div",{className:"inline-flex items-center justify-center w-16 h-16 bg-slate-100 dark:bg-gray-800 rounded-full mb-4",children:o.jsx("svg",{className:"w-8 h-8 text-slate-400 dark:text-gray-500",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:o.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 20H5a2 2 0 01-2-2V6a2 2 0 012-2h10a2 2 0 012 2v1m2 13a2 2 0 01-2-2V7m2 13a2 2 0 002-2V9a2 2 0 00-2-2h-2m-4-3H9M7 16h6M7 8h6v4H7V8z"})})}),o.jsx("h3",{className:"text-2xl font-bold text-slate-900 dark:text-white mb-2",children:t("list.empty.title")}),o.jsx("p",{className:"text-slate-600 dark:text-gray-400 text-lg",children:t("list.empty.description")})]})]})})]})})]})},Hae=()=>{const{t}=He("pages");return o.jsxs(o.Fragment,{children:[o.jsxs(Ys,{children:[o.jsx("title",{children:t("notFound.title")}),o.jsx("meta",{name:"robots",content:"noindex, follow"})]}),o.jsx(xs,{children:o.jsx("div",{className:"min-h-screen flex items-center justify-center bg-gray-50 dark:bg-gray-900 px-4",children:o.jsxs("div",{className:"text-center max-w-2xl",children:[o.jsx("div",{className:"text-9xl font-bold text-purple-600 dark:text-purple-400 mb-4",children:"404"}),o.jsx("h1",{className:"text-4xl font-bold text-gray-900 dark:text-white mb-4",children:t("notFound.heading")}),o.jsx("p",{className:"text-xl text-gray-600 dark:text-gray-300 mb-8",children:t("notFound.description")}),o.jsx("div",{className:"flex flex-col sm:flex-row gap-4 justify-center",children:o.jsxs(ze,{to:"/",className:"btn btn-primary flex items-center justify-center gap-2",children:[o.jsx(eS,{className:"w-5 h-5"}),t("notFound.backHome")]})})]})})})]})},qae=()=>{const{t,i18n:e}=He("blog"),{slug:r}=lf(),n=e.language,s=n==="pl"?RS:OS,{data:i,isLoading:a}=mt({queryKey:["blog","post",r],queryFn:()=>No.getPostBySlug(r),enabled:!!r}),{data:l}=mt({queryKey:["blog","recent"],queryFn:()=>No.getRecentPosts(3)});if(a)return o.jsx(xs,{children:o.jsx("div",{className:"max-w-7xl mx-auto px-4 py-12",children:o.jsxs("div",{className:"grid lg:grid-cols-[1fr_300px] gap-8",children:[o.jsxs("div",{className:"animate-pulse space-y-6",children:[o.jsx("div",{className:"bg-slate-200 dark:bg-gray-700 h-96 rounded-xl"}),o.jsxs("div",{className:"space-y-3",children:[o.jsx("div",{className:"bg-slate-200 dark:bg-gray-700 h-8 rounded w-3/4"}),o.jsx("div",{className:"bg-slate-200 dark:bg-gray-700 h-4 rounded w-1/2"})]})]}),o.jsx("aside",{className:"hidden lg:block",children:o.jsx("div",{className:"bg-slate-200 dark:bg-gray-700 h-64 roun
767ded-xl animate-pulse"})})]})})});if(!i)return o.jsx(xs,{children:o.jsxs("div",{className:"max-w-4xl mx-auto px-4 py-12 text-center",children:[o.jsx("h2",{className:"text-2xl font-bold text-slate-900 dark:text-white mb-4",children:t("post.notFound.title")}),o.jsxs(ze,{to:"/blog",className:"inline-flex items-center gap-2 text-indigo-600 dark:text-indigo-400 font-semibold hover:text-indigo-700 dark:hover:text-indigo-300",children:[o.jsx(ma,{className:"w-4 h-4"}),t("post.notFound.backToBlog")]})]})});const c=rie(i,n),u={"@context":"https://schema.org","@type":"BlogPosting",headline:c.localTitle,description:c.localExcerpt,image:i.coverImage,datePublished:i.publishedAt,dateModified:i.updatedAt,author:{"@type":"Person",name:`${i.author.firstName} ${i.author.lastName}`},publisher:{"@type":"Organization",name:"Smart-Copy.AI",logo:{"@type":"ImageObject",url:`${window.location.origin}/logo.png`}},...i.slugEn&&{inLanguage:n==="en"?"en":"pl"}};return o.jsxs(o.Fragment,{children:[o.jsxs(Ys,{children:[o.jsx("title",{children:c.localMetaTitle||c.localTitle}),o.jsx("meta",{name:"description",content:c.localMetaDescription||c.localExcerpt}),c.localKeywords&&o.jsx("meta",{name:"keywords",content:c.localKeywords}),o.jsx("meta",{property:"og:type",content:"article"}),o.jsx("meta",{property:"og:title",content:c.localTitle}),o.jsx("meta",{property:"og:description",content:c.localExcerpt}),i.coverImage&&o.jsx("meta",{property:"og:image",content:i.coverImage}),o.jsx("meta",{property:"og:url",content:`${window.location.origin}/blog/${c.localSlug}`}),o.jsx("meta",{property:"article:published_time",content:i.publishedAt}),o.jsx("meta",{property:"article:modified_time",content:i.updatedAt}),o.jsx("meta",{property:"article:author",content:`${i.author.firstName} ${i.author.lastName}`}),o.jsx("meta",{name:"twitter:card",content:"summary_large_image"}),o.jsx("meta",{name:"twitter:title",content:c.localTitle}),o.jsx("meta",{name:"twitter:description",content:c.localExcerpt}),i.coverImage&&o.jsx("meta",{name:"twitter:image",content:i.coverImage}),o.jsx("link",{rel:"canonical",href:`${window.location.origin}/blog/${c.localSlug}`}),o.jsx("link",{rel:"alternate",hrefLang:"pl",href:`${window.location.origin}/blog/${i.slug}`}),i.slugEn&&o.jsx("link",{rel:"alternate",hrefLang:"en",href:`${window.location.origin}/blog/${i.slugEn}`}),o.jsx("script",{type:"application/ld+json",children:JSON.stringify(u)})]}),o.jsx(xs,{children:o.jsx("div",{className:"bg-white dark:bg-gray-900 min-h-screen",children:o.jsx("div",{className:"max-w-7xl mx-auto px-4 py-12",children:o.jsxs("div",{className:"grid lg:grid-cols-[1fr_300px] gap-8",children:[o.jsxs("article",{className:"bg-white dark:bg-gray-800 rounded-xl shadow-lg overflow-hidden border border-slate-200 dark:border-gray-700",children:[i.coverImage&&o.jsxs("div",{className:"relative h-96 overflow-hidden",children:[o.jsx("img",{src:i.coverImage,alt:c.localTitle,className:"w-full h-full object-cover"}),o.jsx("div",{className:"absolute inset-0 bg-gradient-to-t from-black/40 to-transparent"})]}),o.jsxs("div",{className:"p-8 md:p-12",children:[o.jsxs(ze,{to:"/blog",className:"inline-flex items-center gap-2 text-indigo-600 dark:text-indigo-400 font-medium hover:text-indigo-700 dark:hover:text-indigo-300 transition-colors mb-6",children:[o.jsx(ma,{className:"w-4 h-4"}),t("post.backToBlog")]}),o.jsx("h1",{className:"text-4xl md:text-5xl font-bold text-slate-900 dark:text-white mb-6",children:c.localTitle}),o.jsxs("div",{className:"flex flex-wrap items-center gap-4 text-slate-600 dark:text-gray-400 mb-8 pb-8 border-b border-slate-200 dark:border-gray-700",children:[o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx(Ay,{className:"w-5 h-5"}),o.jsxs("span",{className:"font-medium",children:[i.author.firstName," ",i.author.lastName]})]}),o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx(uc,{className:"w-5 h-5"}),o.jsx("time",{dateTime:i.publishedAt,children:ng(new Date(i.publishedAt),"d MMMM yyyy",{locale:s})})]}),o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx(Ks,{className:"w-5 h-5"}),o.jsxs("span",{children:[i.viewCount," ",t("post.views")]})]})]}
767),o.jsx("p",{className:"text-xl text-slate-600 dark:text-gray-300 leading-relaxed mb-8 font-medium",children:c.localExcerpt}),o.jsx("div",{className:`prose prose-lg prose-slate dark:prose-invert max-w-none 
768                      prose-headings:font-bold prose-headings:text-slate-900 dark:prose-headings:text-white prose-headings:mt-8 prose-headings:mb-4
769                      prose-h1:text-4xl prose-h2:text-3xl prose-h3:text-2xl prose-h4:text-xl
770                      prose-p:text-slate-700 dark:prose-p:text-gray-300 prose-p:leading-relaxed prose-p:mb-4
771                      prose-a:text-indigo-600 dark:prose-a:text-indigo-400 prose-a:font-medium prose-a:no-underline hover:prose-a:underline
772                      prose-strong:text-slate-900 dark:prose-strong:text-white prose-strong:font-bold
773                      prose-em:text-slate-700 dark:prose-em:text-gray-300 prose-em:italic
774                      prose-ul:list-disc prose-ul:ml-6 prose-ul:my-4
775                      prose-ol:list-decimal prose-ol:ml-6 prose-ol:my-4
776                      prose-li:text-slate-700 dark:prose-li:text-gray-300 prose-li:my-2
777                      prose-blockquote:border-l-4 prose-blockquote:border-indigo-500 dark:prose-blockquote:border-indigo-400 prose-blockquote:pl-4 prose-blockquote:italic prose-blockquote:text-slate-600 dark:prose-blockquote:text-gray-400
778                      prose-code:text-indigo-600 dark:prose-code:text-indigo-400 prose-code:bg-slate-100 dark:prose-code:bg-gray-700 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-sm
779                      prose-pre:bg-slate-900 dark:prose-pre:bg-gray-950 prose-pre:text-slate-100 prose-pre:p-4 prose-pre:rounded-lg prose-pre:overflow-x-auto
780                      prose-img:rounded-xl prose-img:shadow-lg prose-img:my-8
781                      prose-hr:border-slate-300 dark:prose-hr:border-gray-600 prose-hr:my-8
782                      prose-table:border-collapse prose-table:w-full
783                      prose-th:bg-slate-100 dark:prose-th:bg-gray-700 prose-th:p-3 prose-th:text-left prose-th:font-bold dark:prose-th:text-white
784                      prose-td:border prose-td:border-slate-300 dark:prose-td:border-gray-600 prose-td:p-3 dark:prose-td:text-gray-300`,dangerouslySetInnerHTML:{__html:c.localContent}}),o.jsxs("div",{className:"mt-12 pt-8 border-t border-slate-200 dark:border-gray-700",children:[o.jsx("h3",{className:"text-lg font-semibold text-slate-900 dark:text-white mb-4",children:t("post.share.title")}),o.jsxs("div",{className:"flex gap-3",children:[o.jsx("a",{href:`https://www.facebook.com/sharer/sharer.php?u=${encodeURIComponent(window.location.href)}`,target:"_blank",rel:"noopener noreferrer",className:"px-4 py-2 bg-blue-600 text-white rounded-lg font-medium hover:bg-blue-700 transition-colors",children:"Facebook"}),o.jsx("a",{href:`https://twitter.com/intent/tweet?url=${encodeURIComponent(window.location.href)}&text=${encodeURIComponent(c.localTitle)}`,target:"_blank",rel:"noopener noreferrer",className:"px-4 py-2 bg-sky-500 text-white rounded-lg font-medium hover:bg-sky-600 transition-colors",children:"Twitter"}),o.jsx("a",{href:`https://www.linkedin.com/sharing/share-offsite/?url=${encodeURIComponent(window.location.href)}`,target:"_blank",rel:"noopener noreferrer",className:"px-4 py-2 bg-blue-700 text-white rounded-lg font-medium hover:bg-blue-800 transition-colors",children:"LinkedIn"})]})]})]})]}),o.jsxs("aside",{className:"hidden lg:block space-y-6",children:[o.jsxs("div",{className:"bg-white dark:bg-gray-800 rounded-xl shadow-lg border border-slate-200 dark:border-gray-700 p-6",children:[o.jsx("h3",{className:"text-lg font-bold text-slate-900 dark:text-white mb-4",children:t("post.sidebar.recentPosts")}),l&&l.length>0?o.jsx("div",{className:"space-y-4",children:l.map(d=>{const h=n==="en"&&d.titleEn?d.titleEn:d.title,p=n==="en"&&d.slugEn?d.slugEn:d.slug;return o.jsx(ze,{to:`/blog/${p}`,className:"block group",children:o.jsxs("div",{className:"flex gap-3",children:[d.coverImage&&o.jsx("img",{src:d.coverImage,alt:h,className:"w-20 h-20 object-cover rounded-lg"}),o.jsxs("div",{className:"flex-1",children:[o.jsx("h4",{className:"font-semibold text-slate-900 dark:text-white group-hover:text-indigo-600 dark:group-hover:text-indigo-400 transition-colors line-clamp-2 text-sm mb-1",children:h}),o.jsxs("div",{className:"flex items-center gap-1 text-xs text-slate-500 dark:text-gray-400",children:[o.jsx(qs,{className:"w-3 h-3"}),ng(new Date(d.publishedAt),"d MMM yyyy",{locale:s})]})]})]})},d.id)})}):o.jsx("p",{className:"text-sm text-slate-500 dark:text-gray-400",children:t("post.sidebar.noPosts")})]}),o.jsxs("div",{className:"bg-gradient-to-br from-indigo-600 to-purple-600 rounded-xl shadow-lg p-6 text-white",children:[o.jsx("h3",{className:"text-lg font-bold mb-2",children:t("post.sidebar.newsletter.title")}),o.jsx("p",{className:"text-sm opacity-90 mb-4",children:t("post.sidebar.newsletter.description")}),o.jsxs("form",{className:"space-y-3",children:[o.jsx("input",{type:"email",placeholder:t("post.sidebar.newsletter.placeholder"),className:"w-full px-4 py-2 rounded-lg text-slate-900 dark:text-white bg-white dark:bg-gray-800 focus:outline-none focus:ring-2 focus:ring-white"}),o.jsx("button",{type:"submit",className:"w-full bg-white text-indigo-600 font-semibold py-2 rounded-lg hover:bg-slate-100 dar
784k:hover:bg-gray-100 transition-colors",children:t("post.sidebar.newsletter.submit")})]})]})]})]})})})})]})},Mn=({children:t})=>{const{logout:e,user:r}=$r(),{theme:n,toggleTheme:s}=cf(),i=Vr(),a=Ss(),l=()=>{e(),i("/login")},c=u=>a.pathname.startsWith(u);return o.jsxs("div",{className:"min-h-screen bg-gray-50 dark:bg-gray-900",children:[o.jsx("nav",{className:"bg-white dark:bg-gray-800 border-b border-gray-200 dark:border-gray-700 sticky top-0 z-50 shadow-sm",children:o.jsxs("div",{className:"px-4 h-16 flex items-center justify-between",children:[o.jsxs("div",{className:"flex items-center gap-8",children:[o.jsx(ze,{to:"/admin",className:"text-xl font-bold text-indigo-600 dark:text-indigo-400",children:"Smart-Copy Admin"}),o.jsxs("div",{className:"flex gap-1",children:[o.jsxs(ze,{to:"/admin",className:`flex items-center gap-2 px-4 py-2 rounded-lg font-medium transition-colors ${a.pathname==="/admin"?"bg-indigo-50 dark:bg-indigo-900/20 text-indigo-600 dark:text-indigo-400":"text-gray-700 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-700"}`,children:[o.jsx(zV,{className:"w-4 h-4"}),"Dashboard"]}),o.jsxs(ze,{to:"/admin/users",className:`flex items-center gap-2 px-4 py-2 rounded-lg font-medium transition-colors ${c("/admin/users")?"bg-indigo-50 dark:bg-indigo-900/20 text-indigo-600 dark:text-indigo-400":"text-gray-700 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-700"}`,children:[o.jsx(zp,{className:"w-4 h-4"}),"Użytkownicy"]}),o.jsxs(ze,{to:"/admin/orders",className:`flex items-center gap-2 px-4 py-2 rounded-lg font-medium transition-colors ${c("/admin/orders")?"bg-indigo-50 dark:bg-indigo-900/20 text-indigo-600 dark:text-indigo-400":"text-gray-700 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-700"}`,children:[o.jsx(fn,{className:"w-4 h-4"}),"Zamówienia"]}),o.jsxs(ze,{to:"/admin/blog",className:`flex items-center gap-2 px-4 py-2 rounded-lg font-medium transition-colors ${c("/admin/blog")?"bg-indigo-50 dark:bg-indigo-900/20 text-indigo-600 dark:text-indigo-400":"text-gray-700 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-700"}`,children:[o.jsx(Jt,{className:"w-4 h-4"}),"Blog"]})]})]}),o.jsxs("div",{className:"flex items-center gap-4",children:[o.jsx("span",{className:"text-sm text-gray-600 dark:text-gray-400",children:r==null?void 0:r.email}),o.jsx("button",{onClick:s,className:"p-2 rounded-lg hover:bg-gray-100 dark:hover:bg-gray-700 transition-colors",title:n==="light"?"Tryb ciemny":"Tryb jasny",children:n==="light"?o.jsx(Yu,{className:"w-5 h-5"}):o.jsx(Xu,{className:"w-5 h-5"})}),o.jsxs("button",{onClick:l,className:"flex items-center gap-2 px-4 py-2 rounded-lg hover:bg-red-50 dark:hover:bg-red-900/20 text-red-600 dark:text-red-400 font-medium transition-colors",children:[o.jsx(HI,{className:"w-4 h-4"}),"Wyloguj"]})]})]})}),o.jsx("main",{className:"p-8",children:t})]})},Kae=()=>{const[t,e]=M.useState(1),[r,n]=M.useState(""),[s,i]=M.useState(""),a=Zs(),{data:l,isLoading:c}=mt({queryKey:["admin","blog",t,r],queryFn:()=>No.admin.getAllPosts(t,20,r)}),u=Be({mutationFn:No.admin.deletePost,onSuccess:()=>{le.success("Artykuł został usunięty"),a.invalidateQueries({queryKey:["admin","blog"]})},onError:()=>{le.error("Nie udało się usunąć artykułu")}}),d=(p,f)=>{window.confirm(`Czy na pewno chcesz usunąć artykuł "${f}"? Ta operacja jest nieodwracalna.`)&&u.mutate(p)},h=l==null?void 0:l.posts.filter(p=>p.title.toLowerCase().includes(s.toLowerCase())||p.titleEn&&p.titleEn.toLowerCase().includes(s.toLowerCase()));return o.jsx(Mn,{children:o.jsx("div",{className:"min-h-screen bg-slate-50",children:o.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-8",children:[o.jsxs("div",{className:"mb-8",children:[o.jsxs("div",{className:"flex items-center justify-between mb-6",children:[o.jsxs("div",{children:[o.jsx("h1",{className:"text-3xl font-bold text-slate-900",children:"Zarządzanie blogiem"}),o.jsx("p",{className:"text-slate-600 mt-1",children:"Twórz i edytuj artykuły blogowe (PL + EN)"})]}),o.jsxs(ze,{to:"/admin/blog/new",className:"flex items-center gap-2 px-6 py-3 bg-indigo-600 text-white rounded-lg hover:bg-indigo-700 transition-colors font-semibold shadow-lg",children:[o.jsx(Q4,{className:"w-5 h-5"}),"Nowy artykuł"]})]}),o.jsxs("div",{className:"bg-white rounded-lg shadow p-4 space-y-4 md:space-y-0 md:flex md:items-center md:gap-4",children:[o.jsxs("div",{className:"flex-1 relative",children:[o.jsx(_i,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-5 h-5 text-slate-400"}),o.jsx("input",{type:"text",placeholder:"Szukaj po tytule (PL lub EN)...",value:s,onChange:p=>i(p.target.value),className:"w-full pl-10 pr-4 py-2 border border-slate-300 rounded-lg focus:ring-2 focus:ring-indigo-500 focus:border-transparent"})]}),o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx(NV,{className:"w-5 h-5 text-slate-400"}),o.jsxs("select",{value:r,onChange:p=>{n(p.target.value),e(1)},className:"px-4 py-2 border border-slate-300 rounded-lg focus:ring-2 focus:ring-indigo-500 focus:border-transparent",children:[o.jsx("option",{value:"",children:"Wszystkie statusy"}),o.jsx("option",{value:"DRAFT",children:"Szkic"}),o.jsx("option",{value:"PUBLISHED",children:"Opublikowany"}),o.jsx("option",{value:"ARCHIVED",children:"Zarchiwizowany"})]})]})]})]}),c?o.jsx("div",{className:"grid grid-cols-1 gap-4",children:[1,2,3].map(p=>o.jsxs("div",{className:"bg-white rounded-lg shadow p-6 animate-pulse",children:[o.jsx("div",{className:"h-6 bg-slate-200 rounded w-3/4 mb-4"}),o.jsx("div",{className:"h-4 bg-slate-200 rounded w-1/2"})]},p))}):o.jsxs(o.Fragment,{children:[o.jsxs("div",{className:"bg-white rounded-lg shadow overflow-hidden",children:[o.jsx("div",{className:"overflow-x-auto",children:o.jsxs("table",{className:"w-full",children:[o.jsx("thead",{className:"bg-slate-50 border-b border-slate-200",children:o.jsxs("tr",{children:[o.jsx("th",{className:"px-6 py-3 text-left text-xs font-semibold text-slate-600 uppercase tracking-wider",children:"Tytuł"}),o.jsx("th",{className:"px-6 py-3 text-left text-xs font-semibold text-slate-600 uppercase tracking-wider",children:"Języki"}),o.jsx("th",{className:"px-6 py-3 text-left text-xs font-semibold text-slate-600 uppercase tracking-wider",children:"Status"}),o.jsx("th",{className:"px-6 py-3 text-left text-xs font-semibold text-slate-600 uppercase tracking-wider",children:"Opublikowany"}),o.jsx("th",{className:"px-6 py-3 text-left text-xs font-semibold text-slate-600 uppercase tracking-wider",children:"Wyświetlenia"}),o.jsx("th",{className:"px-6 py-3 text-right text-xs font-semibold text-slate-600 uppercase tracking-wider",children:"Akcje"})]})}),o.jsx("tbody",{className:"divide-y divide-slate-200",children:h==null?void 0:h.map(p=>o.jsxs("tr",{className:"hover:bg-slate-50",children:[o.jsx("td",{className:"px-6 py-4",children:o.jsxs("div",{className:"flex items-center gap-3",children:[p.coverImage&&o.jsx("img",{src:p.coverImage,alt:p.title,className:"w-12 h-12 rounded object-cover"}),o.jsxs("div",{children:[o.jsx("div",{className:"font-semibold text-slate-900",children:p.title}),p.titleEn&&o.jsxs("div",{className:"text-sm text-blue-600 mt-0.5",children:["EN: ",p.titleEn]}),o.jsxs("div",{className:"text-xs text-slate-400 mt-0.5",children:["/",p.slug,p.slugEn&&o.jsxs("span",{className:"ml-2 text-blue-400",children:["EN: /",p.slugEn]})]})]})]})}),o.jsx("td",{className:"px-6 py-4",children:o.jsxs("div",{className:"flex items-center gap-1.5",children:[o.jsx("span",{className:"inline-flex px-2 py-0.5 text-xs font-semibold rounded bg-green-100 text-green-700",title:"Wersja polska",children:"🇵🇱 PL"}),nie(p)?o.jsx("span",{className:"inline-flex px-2 py-0.5 text-xs font-semibold rounded bg-blue-100 text-blue-700",title:"Wersja angielska",children:"🇬🇧 EN"}):o.jsx("span",{className:"inline-flex px-2 py-0.5 text-xs font-semibold rounded bg-slate-100 text-slate-400",title:"Brak wersji angielskiej",children:"🇬🇧 —"})]})}),o.jsx("td",{className:"px-6 py-4",children:o.jsx("span",{className:`inline-flex px-2 py-1 text-xs font-semibold rounded-full ${p.status==="PUBLISHED"?"bg-green-100 text-green-800":p.status==="DRAFT"?"bg-yellow-100 text-yellow-800":"bg-slate-100 text-slate-800"}`,children:p.status==="PUBLISHED"?"Opublikowany":p.status==="DRAFT"?"Szkic":"Zarchiwizowany"})}),o.jsx("td",{className:"px-6 py-4 text-sm text-slate-600",children:p.publishedAt?o.jsxs("div",{className:"flex items-center gap-1",children:[o.jsx(uc,{className:"w-4 h-4"}),ng(new Date(p.publishedAt),"d MMM yyyy",{locale:RS})]}):o.jsx("span",{className:"text-slate-400",children:"-"})}),o.jsx("td",{className:"px-6 py-4 text-sm text-slate-600",children:o.jsxs("div",{className:"flex items-center gap-1",children:[o.jsx(Ks,{className:"w-4 h-4"}),p.viewCount]})}),o.jsx("td",{className:"px-6 py-4",children:o.jsxs("div",{className:"flex items-center justify-end gap-2",children:[p.status==="PUBLISHED"&&o.jsx("a",{href:`/blog/${p.slug}`,target:"_blank",rel:"noopener noreferrer",className:"p-2 text-slate-600 hover:bg-slate-100 rounded-lg transition-colors",title:"Zobacz artykuł (PL)",children:o.jsx(Ks,{className:"w-4 h-4"})}),o.jsx(ze,{to:`/admin/blog/${p.id}/edit`,className:"p-2 text-indigo-600 hover:bg-indigo-50 rounded-lg transition-colors",title:"Edytuj",children:o.jsx(Ro,{className:"w-4 h-4"})}),o.jsx("button",{onClick:()=>d(p.id,p.title),className:"p-2 text-red-600 hover:bg-red-50 rounded-lg transition-colors",title:"Usuń",children:o.jsx(Cr,{className:"w-4 h-4"})})]})})]}
784,p.id))})]})}),(h==null?void 0:h.length)===0&&o.jsxs("div",{className:"text-center py-12",children:[o.jsx("h3",{className:"text-lg font-semibold text-slate-900 mb-2",children:"Brak artykułów"}),o.jsx("p",{className:"text-slate-600 mb-4",children:"Zacznij tworzyć artykuły blogowe"}),o.jsxs(ze,{to:"/admin/blog/new",className:"inline-flex items-center gap-2 px-6 py-3 bg-indigo-600 text-white rounded-lg hover:bg-indigo-700 transition-colors font-semibold",children:[o.jsx(Q4,{className:"w-5 h-5"}),"Dodaj pierwszy artykuł"]})]})]}),l&&l.pagination.pages>1&&o.jsx("div",{className:"flex items-center justify-center gap-2 mt-6",children:Array.from({length:l.pagination.pages},(p,f)=>f+1).map(p=>o.jsx("button",{onClick:()=>e(p),className:`px-4 py-2 rounded-lg font-semibold transition-colors ${p===t?"bg-indigo-600 text-white":"bg-white text-slate-700 hover:bg-slate-50 border border-slate-200"}`,children:p},p))})]})]})})})},AE=()=>{const{id:t}=lf(),e=Vr(),r=!!t&&t!=="new",n=M.useRef(null),[s,i]=M.useState("pl"),[a,l]=M.useState({title:"",excerpt:"",content:"",metaTitle:"",metaDescription:"",keywords:"",titleEn:"",excerptEn:"",contentEn:"",metaTitleEn:"",metaDescriptionEn:"",keywordsEn:"",status:"DRAFT"}),[c,u]=M.useState(null),[d,h]=M.useState(""),{data:p}=mt({queryKey:["admin","blog","post",t],queryFn:()=>No.admin.getPostById(t),enabled:r});M.useEffect(()=>{p&&(l({title:p.title,excerpt:p.excerpt,content:p.content,metaTitle:p.metaTitle||"",metaDescription:p.metaDescription||"",keywords:p.keywords||"",titleEn:p.titleEn||"",excerptEn:p.excerptEn||"",contentEn:p.contentEn||"",metaTitleEn:p.metaTitleEn||"",metaDescriptionEn:p.metaDescriptionEn||"",keywordsEn:p.keywordsEn||"",status:p.status}),p.coverImage&&h(p.coverImage))},[p]);const f=Be({mutationFn:async g=>r&&t?No.admin.updatePost(t,g):No.admin.createPost(g),onSuccess:()=>{le.success(r?"Artykuł został zaktualizowany":"Artykuł został utworzony"),e("/admin/blog")},onError:()=>{le.error("Nie udało się zapisać artykułu")}}),m=g=>{var w;const x=(w=g.target.files)==null?void 0:w[0];if(x){if(x.size>5*1024*1024){le.error("Plik jest za duży. Maksymalny rozmiar to 5MB");return}u(x);const b=new FileReader;b.onloadend=()=>h(b.result),b.readAsDataURL(x)}},y=(g,x)=>{if(g.preventDefault(),!a.title.trim()){le.error("Tytuł (PL) jest wymagany"),i("pl");return}if(!a.excerpt.trim()){le.error("Zajawka (PL) jest wymagana"),i("pl");return}if(!a.content.trim()){le.error("Treść (PL) jest wymagana"),i("pl");return}if(a.titleEn.trim()&&!a.contentEn.trim()){le.error("Jeśli podajesz tytuł EN, treść EN jest również wymagana"),i("en");return}const w=new FormData;w.append("title",a.title),w.append("excerpt",a.excerpt),w.append("content",a.content),w.append("metaTitle",a.metaTitle||a.title),w.append("metaDescription",a.metaDescription||a.excerpt),w.append("keywords",a.keywords),w.append("titleEn",a.titleEn),w.append("excerptEn",a.excerptEn),w.append("contentEn",a.contentEn),w.append("metaTitleEn",a.metaTitleEn),w.append("metaDescriptionEn",a.metaDescriptionEn),w.append("keywordsEn",a.keywordsEn),w.append("status",x||a.status),c&&w.append("coverImage",c),f.mutate(w)},k=!!(a.titleEn.trim()&&a.contentEn.trim());return o.jsx(Mn,{children:o.jsx("div",{className:"min-h-screen bg-slate-50",children:o.jsxs("div",{className:"max-w-5xl mx-auto px-4 sm:px-6 lg:px-8 py-8",children:[o.jsxs("div",{className:"mb-8",children:[o.jsxs("button",{onClick:()=>e("/admin/blog"),className:"flex items-center gap-2 text-slate-600 hover:text-slate-900 transition-colors mb-4",children:[o.jsx(ma,{className:"w-4 h-4"}),"Powrót do listy artykułów"]}),o.jsxs("div",{className:"flex items-center justify-between",children:[o.jsx("h1",{className:"text-3xl font-bold text-slate-900",children:r?"Edytuj artykuł":"Nowy artykuł"}),o.jsxs("div",{className:"flex items-center gap-2 text-sm",children:[o.jsx(AV,{className:"w-4 h-4 text-slate-400"}),o.jsxs("span",{className:"text-slate-500",children:["PL: ✅ | EN: ",k?"✅":"❌"]})]})]})]}),o.jsxs("form",{onSubmit:g=>y(g),className:"space-y-6",children:[o.jsxs("div",{className:"bg-white rounded-lg shadow p-6",children:[o.jsx("label",{className:"block text-sm font-semibold text-slate-700 mb-3",children:"Zdjęcie główne (wspólne dla PL i EN)"}),o.jsxs("div",{className:"space-y-4",children:[d&&o.jsxs("div",{className:"relative",children:[o.jsx("img",{src:d,alt:"Cover preview",className:"w-full h-64 object-cover rounded-lg"}),o.jsx("button",{type:"button",onClick:()=>{u(null),h(""),n.current&&(n.current.value="")},className:"absolute top-2 right-2 p-2 bg-red-500 text-white rounded-lg hover:bg-red-600 transition-colors",children:o.jsx(yt,{className:"w-4 h-4"})})]}),o.jsx("input",{ref:n,type:"file",accept:"image/*",onChange:m,className:"hidden",id:"coverImage"}),o.jsxs("label",{htmlFor:"coverImage",className:"flex items-center justify-center gap-2 px-4 py-3 border-2 border-dashed border-slate-300 rounded-lg cursor-pointer hover:border-indigo-500 transition-colors",children:[o.jsx(Ap,{className:"w-5 h-5 text-slate-400"}),o.jsx("span",{className:"text-sm text-slate-600",children:d?"Zmień zdjęcie":"Dodaj zdjęcie (max 5MB)"})]})]})]}),o.jsxs("div",{className:"bg-white rounded-lg shadow overflow-hidden",children:[o.jsxs("div",{className:"flex border-b border-slate-200",children:[o.jsxs("button",{type:"button",onClick:()=>i("pl"),className:`flex-1 flex items-center justify-center gap-2 px-6 py-4 text-sm font-semibold transition-colors ${s==="pl"?"bg-white text-indigo-600 border-b-2 border-indigo-600":"bg-slate-50 text-slate-500 hover:text-slate-700 hover:bg-slate-100"}`,children:[o.jsx("span",{className:"text-lg",children:"🇵🇱"}),"Polski (bazowy)",o.jsx("span",{className:"ml-1 px-1.5 py-0.5 text-xs rounded bg-green-100 text-green-700",children:"wymagany"})]}),o.jsxs("button",{type:"button",onClick:()=>i("en"),className:`flex-1 flex items-center justify-center gap-2 px-6 py-4 text-sm font-semibold transition-colors ${s==="en"?"bg-white text-indigo-600 border-b-2 border-indigo-600":"bg-slate-50 text-slate-500 hover:text-slate-700 hover:bg-slate-100"}`,children:[o.jsx("span",{className:"text-lg",children:"🇬🇧"}),"English (optional)",k&&o.jsx("span",{className:"ml-1 px-1.5 py-0.5 text-xs rounded bg-blue-100 text-blue-700",children:"✓ filled"})]})]}),o.jsxs("div",{className:"p-6 space-y-4",children:[s==="pl"&&o.jsxs(o.Fragment,{children:[o.jsxs("div",{children:[o.jsx("label",{className:"block text-sm font-semibold text-slate-700 mb-2",children:"Tytuł artykułu *"}),o.jsx("input",{type:"text",value:a.title,onChange:g=>l({...a,title:g.target.value}),className:"w-full px-4 py-3 border border-slate-300 rounded-lg focus:ring-2 focus:ring-indigo-500 focus:border-transparent",placeholder:"Wprowadź tytuł artykułu"})]}),o.jsxs("div",{children:[o.jsx("label",{className:"block text-sm font-semibold text-slate-700 mb-2",children:"Zajawka / Excerpt *"}),o.jsx("textarea",{value:a.excerpt,onChange:g=>l({...a,excerpt:g.target.value}),rows:3,className:"w-full px-4 py-3 border border-slate-300 rounded-lg focus:ring-2 focus:ring-indigo-500 focus:border-transparent",placeholder:"Krótki opis artykułu 
784(1-2 zdania)"})]}),o.jsxs("div",{children:[o.jsx("label",{className:"block text-sm font-semibold text-slate-700 mb-2",children:"Treść artykułu * (HTML)"}),o.jsx("textarea",{value:a.content,onChange:g=>l({...a,content:g.target.value}),rows:20,className:"w-full px-4 py-3 border border-slate-300 rounded-lg focus:ring-2 focus:ring-indigo-500 focus:border-transparent font-mono text-sm",placeholder:"<p>Treść artykułu w formacie HTML...</p>"}),o.jsx("p",{className:"text-xs text-slate-500 mt-2",children:"Możesz używać HTML do formatowania tekstu"})]}),o.jsxs("div",{className:"pt-4 border-t border-slate-200",children:[o.jsxs("h4",{className:"text-md font-bold text-slate-800 mb-4 flex items-center gap-2",children:[o.jsx(Gs,{className:"w-4 h-4"}),"SEO — wersja polska"]}),o.jsxs("div",{className:"space-y-4",children:[o.jsxs("div",{children:[o.jsx("label",{className:"block text-sm font-semibold text-slate-700 mb-2",children:"Meta Title"}),o.jsx("input",{type:"text",value:a.metaTitle,onChange:g=>l({...a,metaTitle:g.target.value}),className:"w-full px-4 py-3 border border-slate-300 rounded-lg focus:ring-2 focus:ring-indigo-500 focus:border-transparent",placeholder:"Jeśli puste, użyty zostanie tytuł artykułu"})]}),o.jsxs("div",{children:[o.jsx("label",{className:"block text-sm font-semibold text-slate-700 mb-2",children:"Meta Description"}),o.jsx("textarea",{value:a.metaDescription,onChange:g=>l({...a,metaDescription:g.target.value}),rows:2,className:"w-full px-4 py-3 border border-slate-300 rounded-lg focus:ring-2 focus:ring-indigo-500 focus:border-transparent",placeholder:"Jeśli puste, użyta zostanie zajawka"})]}),o.jsxs("div",{children:[o.jsx("label",{className:"block text-sm font-semibold text-slate-700 mb-2",children:"Słowa kluczowe"}),o.jsx("input",{type:"text",value:a.keywords,onChange:g=>l({...a,keywords:g.target.value}),className:"w-full px-4 py-3 border border-slate-300 rounded-lg focus:ring-2 focus:ring-indigo-500 focus:border-transparent",placeholder:"copywriting, AI, content marketing"})]})]})]})]}),s==="en"&&o.jsxs(o.Fragment,{children:[o.jsx("div",{className:"bg-blue-50 border border-blue-200 rounded-lg p-4 mb-4",children:o.jsxs("p",{className:"text-sm text-blue-800",children:[o.jsx("strong",{children:"💡 English version is optional."})," If left empty, Polish content will be shown as fallback for English users. Fill in at least Title + Content to enable the English version."]})}),o.jsxs("div",{children:[o.jsx("label",{className:"block text-sm font-semibold text-slate-700 mb-2",children:"Title (EN)"}),o.jsx("input",{type:"text",value:a.titleEn,onChange:g=>l({...a,titleEn:g.target.value}),className:"w-full px-4 py-3 border border-slate-300 rounded-lg focus:ring-2 focus:ring-indigo-500 focus:border-transparent",placeholder:"Enter article title in English"})]}),o.jsxs("div",{children:[o.jsx("label",{className:"block text-sm font-semibold text-slate-700 mb-2",children:"Excerpt (EN)"}),o.jsx("textarea",{value:a.excerptEn,onChange:g=>l({...a,excerptEn:g.target.value}),rows:3,className:"w-full px-4 py-3 border border-slate-300 rounded-lg focus:ring-2 focus:ring-indigo-500 focus:border-transparent",placeholder:"Short description (1-2 sentences)"})]}),o.jsxs("div",{children:[o.jsx("label",{className:"block text-sm font-semibold text-slate-700 mb-2",children:"Content (EN) — HTML"}),o.jsx("textarea",{value:a.contentEn,onChange:g=>l({...a,contentEn:g.target.value}),rows:20,className:"w-full px-4 py-3 border border-slate-300 rounded-lg focus:ring-2 focus:ring-indigo-500 focus:border-transparent font-mono text-sm",placeholder:"<p>Article content in HTML format...</p>"})]}),o.jsxs("div",{className:"pt-4 border-t border-slate-200",children:[o.jsxs("h4",{className:"text-md font-bold text-slate-800 mb-4 flex items-center gap-2",children:[o.jsx(Gs,{className:"w-4 h-4"}),"SEO — English version"]}),o.jsxs("div",{className:"space-y-4",children:[o.jsxs("div",{children:[o.jsx("label",{className:"block text-sm font-semibold text-slate-700 mb-2",children:"Meta Title (EN)"}),o.jsx("input",{type:"text",value:a.metaTitleEn,onChange:g=>l({...a,metaTitleEn:g.target.value}),className:"w-full px-4 py-3 border border-slate-300 rounded-lg focus:ring-2 focus:ring-indigo-500 focus:border-transparent",placeholder:"Falls back to EN title if empty"})]}),o.jsxs("div",{children:[o.jsx("label",{className:"block text-sm font-semibold text-slate-700 mb-2",children:"Meta Description (EN)"}),o.jsx("textarea",{value:a.metaDescriptionEn,onChange:g=>l({...a,metaDescriptionEn:g.target.value}),rows:2,className:"w-full px-4 py-3 border border-slate-300 rounded-lg focus:ring-2 focus:ring-indigo-500 focus:border-transparent",placeholder:"Falls back to EN excerpt if empty"})]}),o.jsxs("div",{children:[o.jsx("label",{className:"block text-sm font-semibold text-slate-700 mb-2",children:"Keywords (EN)"}),o.jsx("input",{type:"text",value:a.keywordsEn,onChange:g=>l({...a,keywordsEn:g.target.value}),className:"w-full px-4 py-3 border border-slate-300 rounded-lg focus:ring-2 focus:ring-indigo-500 focus:border-transparent",placeholder:"copywriting, AI, content marketing"})]})]})]})]})]})]}),o.jsxs("div",{className:"flex items-center justify-between gap-4 bg-white rounded-lg shadow p-6",children:[o.jsxs("div",{children:[o.jsx("label",{className:"block text-sm font-semibold text-slate-700 mb-2",children:"Status"}),o.jsxs("select",{value:a.status,onChange:g=>l({...a,status:g.target.value}),className:"px-4 py-2 border border-slate-300 rounded-lg focus:ring-2 focus:ring-indigo-500 focus:border-transparent",children:[o.jsx("option",{value:"DRAFT",children:"Szkic"}),o.jsx("option",{value:"PUBLISHED",children:"Opublikowany"}),o.jsx("option",{value:"ARCHIVED",children:"Zarchiwizowany"})]})]}),o.jsxs("div",{className:"flex items-center gap-3",children:[o.jsxs("button",{type:"button",onClick:g=>y(g,"DRAFT"),disabled:f.isPending,className:"flex items-center gap-2 px-6 py-3 bg-slate-200 text-slate-700 rounded-lg hover:bg-slate-300 transition-colors font-semibold disabled:opacity-50",children:[o.jsx(rS,{className:"w-5 h-5"}),"Zapisz jako szkic"]}),o.jsxs("button",{type:"button",onClick:g=>y(g,"PUBLISHED"),disabled:f.isPending,className:"flex items-center gap-2 px-6 py-3 bg-indigo-600 text-white rounded-lg hover:bg-indigo-700 transition-colors font-semibold disabled:opacity-50",children:[o.jsx(Ks,{className:"w-5 h-5"}),"Opublikuj"]})]})]})]})]})})})},Gae=[qs,Ey,_i,_d,Gs,tS],Zae=[nS,fn,iS,sS,aS,_V],zE=()=>{const{t,i18n:e}=He("ai-product-descriptions"),{formatPrice:r}=bn(),n=e.language==="pl",s=n?"https://www.smart-copy.ai":"https://en.smart-copy.ai",i=n?"/ai-generator-opisow-produktow":"/ai-product-description-generator",a=r(Zt.PER_1000_CHARS),l=r(Zt.MIN_TOP_UP),c=r(Zt.PER_1000_CHARS*40),u=n?"5000 zł":"$1,500",d=r(2e4),h=`${r(4e4)}-${r(8e4)}`,p=`${r(12e4)}-${r(2e5)}`,f=r(5e5),m=t("benefits.items",{returnObjects:!0}),y=t("howItWorks.steps",{returnObjects:!0}),k=t("ecommerceTypes.items",{returnObjects:!0}),g=t("features.items",{returnObjects:!0}),x=t("comparison.rows",{returnObjects:!0}),w=t("useCases.items",{returnObjects:!0}),b=t("faq.items",{returnObjects:!0}),v=m.map((C,_)=>_===1?{...C,description:t("benefits.items.1.description",{price:a,copywriterPrice:n?"50-100 zł":"$15-30",savings:f})}:C),A=b.map((C,_)=>_===4?{...C,answer:t("faq.items.4.answer",{shortCost100:d,standardCost100:h,longCost100:p})}:C);return o.jsxs(o.Fragment,{children:[o.jsxs(Ys,{children:[o.jsx("title",{children:t("meta.title")}),o.jsx("meta",{name:"description",content:t("meta.description",{price:a})}),o.jsx("meta",{name:"keywords",content:t("meta.keywords")}),o.jsx("link",{rel:"canonical",href:`${s}${i}`}),o.jsx("meta",{property:"og:title",content:t("meta.ogTitle")}),o.jsx("meta",{property:"og:description",content:t("meta.ogDescription")}),o.jsx("meta",{property:"og:type",content:"website"}),o.jsx("meta",{property:"og:url",content:`${s}${i}`}),o.jsx("link",{rel:"alternate",hrefLang:"pl",href:"https://www.smart-copy.ai/ai-generator-opisow-produktow"}),o.jsx("link",{rel:"alternate",hrefLang:"en",href:"https://en.smart-copy.ai/ai-product-description-generator"}),o.jsx("link",{rel:"alternate",hrefLang:"x-default",href:"https://www.smart-copy.ai/ai-generator-opisow-produktow"})]}),o.jsxs(xs,{children:[o.jsxs("section",{className:"relative min-h-[95vh] flex items-center justify-center bg-gradient-to-br from-emerald-50 via-white to-teal-50 dark:from-gray-900 dark:via-gray-800 dark:to-gray-900 overflow-hidden",children:[o.jsxs("div",{className:"absolute inset-0",children:[o.jsx("div",{className:"absolute inset-0 bg-grid-pattern opacity-5"}),o.jsx(ue.div,{animate:{scale:[1,1.2,1],rotate:[0,-45,0]},transition:{duration:20,repeat:1/0,ease:"linear"},className:"absolute -top-1/2 -right-1/2 w-full h-full bg-gradient-to-br from-emerald-500/10 to-teal-500/10 rounded-full blur-3xl"})]}),o.jsx("div",{className:"container-custom py-20 relative z-10",children:o.jsxs(ue.div,{initial:{opacity:0,y:30}
784,animate:{opacity:1,y:0},transition:{duration:.8},className:"text-center max-w-5xl mx-auto",children:[o.jsxs(ue.div,{initial:{opacity:0,scale:.9},animate:{opacity:1,scale:1},transition:{delay:.2},className:"inline-flex items-center gap-2 bg-gradient-to-r from-emerald-100 to-teal-100 dark:from-emerald-900/30 dark:to-teal-900/30 text-emerald-700 dark:text-emerald-300 px-6 py-3 rounded-full mb-8 border border-emerald-200 dark:border-emerald-800",children:[o.jsx(sS,{className:"w-5 h-5"}),o.jsx("span",{className:"font-semibold",children:t("hero.badge")})]}),o.jsxs("h1",{className:"text-5xl md:text-7xl lg:text-8xl font-bold text-gray-900 dark:text-white mb-6 leading-tight",children:[t("hero.titleLine1"),o.jsx("br",{}),o.jsx("span",{className:"bg-gradient-to-r from-emerald-600 via-teal-600 to-cyan-600 bg-clip-text text-transparent",children:t("hero.titleLine2")})]}),o.jsxs("p",{className:"text-xl md:text-2xl lg:text-3xl text-gray-600 dark:text-gray-300 mb-6 max-w-3xl mx-auto font-light",children:[o.jsx("strong",{className:"font-semibold text-gray-900 dark:text-white",children:t("hero.subtitleStrong")})," ",t("hero.subtitle"),o.jsx("br",{className:"hidden md:block"}),t("hero.subtitleLine2",{price:a})]}),o.jsxs("div",{className:"flex flex-wrap justify-center gap-4 mb-10",children:[o.jsxs("div",{className:"flex items-center gap-2 bg-white dark:bg-gray-800 px-4 py-2 rounded-full shadow-sm",children:[o.jsx(Rt,{className:"w-5 h-5 text-green-500"}),o.jsx("span",{className:"text-gray-700 dark:text-gray-300 font-medium",children:t("hero.valueProps.cost",{hundredDescsCost:c,copywriterCost:u})})]}),o.jsxs("div",{className:"flex items-center gap-2 bg-white dark:bg-gray-800 px-4 py-2 rounded-full shadow-sm",children:[o.jsx(Rt,{className:"w-5 h-5 text-green-500"}),o.jsx("span",{className:"text-gray-700 dark:text-gray-300 font-medium",children:t("hero.valueProps.unique")})]}),o.jsxs("div",{className:"flex items-center gap-2 bg-white dark:bg-gray-800 px-4 py-2 rounded-full shadow-sm",children:[o.jsx(Rt,{className:"w-5 h-5 text-green-500"}),o.jsx("span",{className:"text-gray-700 dark:text-gray-300 font-medium",children:t("hero.valueProps.export")})]})]}),o.jsxs("div",{className:"flex flex-col sm:flex-row gap-4 justify-center mb-8",children:[o.jsx(ze,{to:"/register",className:"group btn btn-primary text-lg px-10 py-5 shadow-2xl hover:shadow-emerald-500/50 transform hover:scale-105 transition-all",children:o.jsxs("span",{className:"relative z-10 flex items-center gap-2",children:[t("hero.cta.start"),o.jsx(Sr,{className:"w-5 h-5 group-hover:translate-x-1 transition-transform"})]})}),o.jsx("a",{href:"#jak-dziala",className:"btn btn-secondary text-lg px-10 py-5 border-2",children:t("hero.cta.howItWorks")})]}),o.jsx("p",{className:"text-sm text-gray-500 dark:text-gray-400",children:t("hero.trust",{minTopUp:l})})]})})]}),o.jsx("section",{className:"py-24 bg-white dark:bg-gray-800",children:o.jsxs("div",{className:"container-custom",children:[o.jsxs(ue.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},transition:{duration:.6},viewport:{once:!0},className:"text-center mb-16",children:[o.jsx("h2",{className:"text-4xl md:text-5xl font-bold text-gray-900 dark:text-white mb-4",children:t("benefits.title")}),o.jsx("p",{className:"text-xl text-gray-600 dark:text-gray-300 max-w-3xl mx-auto",children:t("benefits.subtitle")})]}),o.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-8",children:v.map((C,_)=>{const N=Gae[_];return o.jsxs(ue.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},transition:{duration:.5,delay:_*.1},viewport:{once:!0},className:"group card dark:bg-gray-700 dark:border-gray-600 hover:shadow-2xl hover:border-emerald-500 dark:hover:border-emerald-500 transition-all",children:[o.jsx("div",{className:"w-14 h-14 bg-gradient-to-br from-emerald-600 to-teal-600 rounded-2xl flex items-center justify-center mb-5 group-hover:scale-110 transition-transform",children:o.jsx(N,{className:"w-7 h-7 text-white"})}),o.jsx("h3",{className:"text-xl font-bold text-gray-900 dark:text-white mb-3",children:C.title}),o.jsx("p",{className:"text-gray-600 dark:text-gray-300 leading-relaxed",children:C.description})]},_)})})]})}),o.jsx("section",{id:"jak-dziala",className:"py-24 bg-gradient-to-br from-gray-50 to-white dark:from-gray-900 dark:to-gray-800",children:o.jsxs("div",{className:"container-custom",children:[o.jsxs(ue.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},transition:{duration:.6},viewport:{once:!0},className:"text-center mb-16",children:[o.jsx("h2",{className:"text-4xl md:text-5xl font-bold text-gray-900 dark:text-white mb-4",children:t("howItWorks.title")}),o.jsx("p",{className:"text-xl text-gray-600 dark:text-gray-300 max-w-3xl mx-auto",children:t("howItWorks.subtitle")})]}),o.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-8",children:y.map((C,_)=>o.jsxs(ue.div,{initial:{opacity:0,y:30},whileInView:{opacity:1,y:0},transition:{duration:.5,delay:_*.15},viewport:{once:!0},className:"relative",children:[_<y.length-1&&o.jsx("div",{className:"hidden lg:block absolute top-12 left-full w-full h-0.5 bg-gradient-to-r from-emerald-300 to-transparent dark:from-emerald-700 -ml-4"}),o.jsxs("div",{className:"card dark:bg-gray-800 dark:border-gray-700 hover:shadow-xl transition-all h-full relative overflow-hidden group",children:[o.jsx("div",{className:"absolute -top-4 -right-4 w-20 h-20 bg-gradient-to-br from-emerald-600 to-teal-600 rounded-full flex items-center justify-center transform group-hover:scale-110 transition-transform",children:o.jsx("span",{className:"text-2xl font-bold text-white",children:String(_+1).padStart(2,"0")})}),o.jsxs("div",{className:"relative z-10",children:[o.jsx("h3",{className:"text-xl font-bold text-gray-900 dark:text-white mb-3 pr-16",children:C.title}),o.jsx("p",{className:"text-gray-600 dark:text-gray-300 leading-relaxed",children:C.description})]})]})]},_))})]})}),o.jsx("section",{className:"py-24 bg-white dark:bg-gray-800",children:o.jsxs("div",{className:"container-custom",children:[o.jsxs(ue.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},transition:{duration:.6},viewport:{once:!0},className:"text-center mb-16",children:[o.jsx("h2",{className:"text-4xl md:text-5xl font-bold text-gray-900 dark:text-white mb-4",children:t("ecommerceTypes.title")}),o.jsx("p",{className:"text-xl text-gray-600 dark:text-gray-300 max-w-3xl mx-auto",children:t("ecommerceTypes.subtitle")})]}),o.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6",children:k.map((C,_)=>{const N=Zae[_];return o.jsxs(ue.div,{initial:{opacity:0,scale:.95},whileInView:{opacity:1,scale:1},transition:{duration:.4,delay:_*.1},viewport:{once:!0},className:"group bg-gradient-to-br from-white to-gray-50 dark:from-gray-800 dark:to-gray-900 rounded-2xl p-6 shadow-lg hover:shadow-2xl transition-all border border-gray-100 dark:border-gray-700 hover:border-emerald-500 dark:hover:border-emerald-500",children:[o.jsx("div",{className:"w-12 h-12 bg-gradient-to-br from-emerald-500 to-teal-500 rounded-xl flex items-center justify-center mb-4",children:o.jsx(N,{className:"w-6 h-6 text-white"})}),o.jsx("h3",{className:"text-lg font-bold text-gray-900 dark:text-white mb-3",children:C.title}),o.jsx("div",{className:"flex flex-wrap gap-2 mb-4",children:C.examples.map((W,K)=>o.jsx("span",{className:"text-xs bg-emerald-50 dark:bg-emerald-900/30 text-emerald-700 dark:text-emerald-300 px-2 py-1 rounded-full",children:W},K))}),o.jsxs("p",{className:"text-sm text-gray-600 dark:text-gray-400",children:[o.jsx("strong",{className:"text-gray-900 dark:text-white",children:t("ecommerceTypes.generatesLabel")})," ",C.features]})]},_)})})]})}),o.jsx("section",{className:"py-24 bg-white dark:bg-gray-800",children:o.jsxs("div",{className:"container-custom",children:[o.jsxs(ue.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},transition:{duration:.6},viewport:{once:!0},className:"text-center mb-16",children:[o.jsx("h2",{className:"text-4xl md:text-5xl font-bold text-gray-900 dark:text-white mb-4",children:t("features.title")}),o.jsx("p",{className:"text-xl text-gray-600 dark:text-gray-300 max-w-3xl mx-auto",children:t("features.subtitle")})]}),o.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4 max-w-4xl mx-auto",children:g.map((C,_)=>o.jsxs(ue.div,{initial:{opacity:0,x:_%2===0?-20:20},whileInView:{opacity:1,x:0},transition:{duration:.4,delay:_*.05},viewport:{once:!0},className:"flex items-start gap-3 p-4 bg-gray-50 dark:bg-gray-900 rounded-xl",children:[o.jsx(Rt,{className:"w-5 h-5 text-emerald-500 flex-shrink-0 mt-0.5"}),o.jsx("span",{className:"text-gray-700 dark:text-gray-300 font-medium",children:C})]},_))})]})}),o.jsx("section",{className:"py-24 bg-gradient-to-br from-gray-50 to-white dark:from-gray-900 dark:to-gray-800",children:o.jsxs("div",{className:"container-custom",children:[o.jsxs(ue.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},transition:{duration:.6},viewport:{once:!0},className:"text-center mb-16",children:[o.jsxs("h2",{className:"text-4xl md:text-5xl font-bold text-gray-900 dark:text-white mb-4",children:[t("comparison.title")," ",o.jsx("span",{className:"text-emerald-600",children:t("comparison.titleHighlight")})]}),o.jsx("p",{className:"text-xl text-gray-600 dark:text-gray-300 max-w-3xl mx-auto",children:t("comparison.subtitle")})]}),o.jsx("div",{className:"max-w-5xl mx-auto",children:o.jsxs("div",{className:"bg-white dark:bg-gray-800 rounded-3xl shadow-2xl overflow-hidden",children:[o.jsxs("div",{className:"grid grid-cols-3 gap-4 p-6 bg-gradient-to-r from-emerald-600 to-teal-600 text-white",children:[o.jsx("div",{className:"font-bold text-lg",children:t("comparison.headers.aspect")}),o.jsx("div",{className:"font-bold text-lg text-center",children:t("comparison.headers.manual")}),o.jsx("div",{className:"font-bold text-lg text-center",children:t("comparison.headers.ai")})]}),x.map((C,_)=>o.jsxs(ue.div,{initial:{opacity:0,x:-20},whileInView:{opacity:1,x:0},transition:{duration:.4,delay:_*.1},viewport:{once:!0},className:`grid grid-cols-3 gap-4 p-6 ${_%2===0?"bg-gray-50 dark:bg-gray-900":"bg-white dark:bg-gray-800"}`,children:[o.jsx("div",{className:"font-semibold text-gray-900 dark:text-white",children:C.aspect}),o.jsx("div",{className:"text-center text-gray-600 dark:text-gray-400",children:C.manual}),o.jsx("div",{className:"text-center font-bold text-green-600 dark:text-green-400",children:C.ai})]},_))]})})]})}),o.jsx("section",{className:"py-24 bg-white dark:bg-gray-800",children:o.jsxs("div",{className:"container-custom",children:[o.jsxs(ue.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},transition:{duration:.6},viewport:{once:!0},className:"text-center mb-16",children:[o.jsx("h2",{className:"text-4xl md:text-5xl font-bold text-gray-900 dark:text-white mb-4",children:t("useCases.title")}),o.jsx("p",{className:"text-xl text-gray-600 dark:text-gray-300 max-w-3xl mx-auto",children:t("useCases.subtitle")})]}),o.jsx("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-8 max-w-6xl mx-auto",children:w.map((C,_)=>o.jsxs(ue.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},transition:{duration:.5,delay:_*.1},viewport:{once:!0},className:"card dark:bg-gray-700 dark:border-gray-600",children:[o.jsx("div",{className:"bg-gradient-to-br from-emerald-500 to-teal-500 text-white px-4 py-2 rounded-lg inline-block mb-4",children:o.jsx("span",{className:"font-bold",children:C.scenario})}),o.jsx("h4",{className:"font-bold text-gray-900 dark:text-white mb-2",children:t("useCases.challengeLabel")}),o.jsx("p",{className:"text-gray-600 dark:text-gray-300 mb-4 text-sm",children:C.challenge}),o.jsx("h4",{className:"font-bold text-gray-900 dark:text-white mb-2",children:t("useCases.solutionLabel")}),o.jsx("p",{className:"text-gray-600 dark:text-gray-300 mb-4 text-sm",children:C.solution}),o.jsx("div",{className:"bg-emerald-50 dark:bg-emerald-900/30 p-3 rounded-lg",children:o.jsx("p",{className:"text-sm font-bold text-emerald-700 dark:text-emerald-300",children:C.savings})})]},_))})]})}),o.jsx("section",{className:"py-24 bg-gradient-to-br from-gray-50 to-white dark:from-gray-900 dark:to-gray-800",children:o.jsxs("div",{className:"container-custom",children:[o.jsxs(ue.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},transition:{duration:.6},viewport:{once:!0},className:"text-center mb-16",children:[o.jsx("h2",{className:"text-4xl md:text-5xl font-bold text-gray-900 dark:text-white mb-4",children:t("faq.title")}),o.jsx("p",{className:"text-xl text-gray-600 dark:text-gray-300 max-w-3xl mx-auto",children:t("faq.subtitle")})]}
784),o.jsx("div",{className:"max-w-4xl mx-auto space-y-4",children:A.map((C,_)=>o.jsxs(ue.details,{initial:{opacity:0,y:10},whileInView:{opacity:1,y:0},transition:{duration:.4,delay:_*.1},viewport:{once:!0},className:"group bg-white dark:bg-gray-800 rounded-2xl p-6 hover:shadow-lg transition-all border border-gray-200 dark:border-gray-700",children:[o.jsxs("summary",{className:"flex items-center justify-between cursor-pointer list-none",children:[o.jsx("h3",{className:"text-lg font-bold text-gray-900 dark:text-white pr-4",children:C.question}),o.jsx("div",{className:"w-8 h-8 bg-emerald-600 rounded-full flex items-center justify-center flex-shrink-0 group-open:rotate-180 transition-transform",children:o.jsx(Sr,{className:"w-5 h-5 text-white transform rotate-90"})})]}),o.jsx("p",{className:"mt-4 text-gray-600 dark:text-gray-300 leading-relaxed",children:C.answer})]},_))})]})}),o.jsxs("section",{className:"py-24 bg-gradient-to-br from-emerald-600 via-teal-600 to-cyan-600 relative overflow-hidden",children:[o.jsx(ue.div,{animate:{scale:[1,1.2,1],opacity:[.3,.5,.3]},transition:{duration:8,repeat:1/0,ease:"easeInOut"},className:"absolute top-0 right-0 w-96 h-96 bg-white rounded-full blur-3xl"}),o.jsx("div",{className:"container-custom text-center relative z-10",children:o.jsxs(ue.div,{initial:{opacity:0,y:30},whileInView:{opacity:1,y:0},transition:{duration:.8},viewport:{once:!0},children:[o.jsxs("div",{className:"inline-flex items-center gap-2 bg-white/20 backdrop-blur-sm px-6 py-3 rounded-full mb-8",children:[o.jsx(fn,{className:"w-5 h-5 text-white"}),o.jsx("span",{className:"text-white font-semibold",children:t("finalCta.badge")})]}),o.jsxs("h2",{className:"text-4xl md:text-6xl font-bold text-white mb-6",children:[t("finalCta.titleLine1"),o.jsx("br",{}),t("finalCta.titleLine2")]}),o.jsx("p",{className:"text-xl md:text-2xl text-emerald-100 mb-10 max-w-3xl mx-auto",children:t("finalCta.subtitle")}),o.jsxs("div",{className:"flex flex-col sm:flex-row gap-4 justify-center mb-8",children:[o.jsxs(ze,{to:"/register",className:"inline-flex items-center justify-center gap-2 bg-white text-emerald-600 px-10 py-5 rounded-xl font-bold text-lg hover:bg-gray-100 transition-all shadow-2xl hover:scale-105 transform",children:[t("finalCta.cta.register"),o.jsx(ga,{className:"w-5 h-5"})]}),o.jsxs(ze,{to:"/login",className:"inline-flex items-center justify-center gap-2 bg-transparent border-2 border-white text-white px-10 py-5 rounded-xl font-bold text-lg hover:bg-white/10 transition-all",children:[t("finalCta.cta.login"),o.jsx(Sr,{className:"w-5 h-5"})]})]}),o.jsx("p",{className:"text-emerald-100",children:t("finalCta.benefits",{minTopUp:l,price:a})})]})})]})]})]})};function Al(t){return t&&t.charAt(0).toUpperCase()+t.slice(1)}function PE(t){if(!t.texts||t.texts.length===0)return"Zamówienie";const e=t.texts[0].topic,r=t.texts.length;if(r===1){const a=e.split(" ");if(a.length<=5)return Al(e);const l=a.slice(0,5).join(" ")+"...";return Al(l)}const n=e.split(" "),s=n.length<=3?Al(e):Al(n.slice(0,3).join(" ")+"..."),i=r-1;return r===2?`${s} + 1 więcej`:`${s} + ${i} więcej`}function Yae(t){return!t.texts||t.texts.length===0?"Zamówienie":Al(t.texts[0].topic)}const ws=()=>{const{t}=He("components"),{formatPrice:e}=bn(),{setShowBanner:r}=LI(),{theme:n,toggleTheme:s}=cf(),[i,a]=M.useState(!1),[l,c]=M.useState(()=>!(window.innerWidth<1024)),{logout:u,user:d}=$r(),h=Vr(),p=Ss(),[f]=Ad(),[m,y]=M.useState(!1),[k,g]=M.useState((d==null?void 0:d.email)||""),[x,w]=M.useState(""),[b,v]=M.useState(!1);M.useEffect(()=>{window.innerWidth<1024&&c(!1)},[p.pathname]),M.useEffect(()=>{const F=()=>{const E=window.innerWidth<1024;c(!E)};return window.addEventListener("resize",F),()=>window.removeEventListener("resize",F)},[]),M.useEffect(()=>{d!=null&&d.email&&!k&&g(d.email)},[d==null?void 0:d.email]);const{data:A}=mt({queryKey:["user-balance"],queryFn:async()=>(await xe.get("/auth/me")).data,refetchInterval:3e4}),C=A!=null&&A.balance?parseFloat(A.balance):0,_=()=>{u(),h("/login")},N=async()=>{if(!(!k.trim()||!x.trim())){v(!0);try{await xe.post("/contact/support",{email:k,message:x}),y(!1),w(""),le.success(t("sidebar.contact.success"))}catch{le.error(t("sidebar.contact.error"))}finally{v(!1)}}},W=()=>{r(!0)},K=[{name:t("sidebar.dashboard"),href:"/dashboard",icon:eS},{name:t("sidebar.orderText"),href:"/orders?mode=new",icon:Qr},{name:t("sidebar.yourOrders"),href:"/orders",icon:fn},{name:t("sidebar.autoblog"),href:"/autoblog",icon:ga},{name:t("sidebar.bulk"),href:"/bulk",icon:VI},{name:t("sidebar.developers"),href:"/developers",icon:vV}],T=F=>{const E=p.pathname;return F==="/orders?mode=new"?E==="/orders"&&f.get("mode")==="new":F==="/orders"?E==="/orders"&&f.get("mode")!=="new"||E.startsWith("/orders/"):E===F};return o.jsxs(o.Fragment,{children:[o.jsx("button",{onClick:()=>c(!l),className:"lg:hidden fixed top-4 right-4 z-50 p-3 rounded-lg bg-white dark:bg-gray-800 shadow-lg border border-gray-200 dark:border-gray-700",children:l?o.jsx(yt,{className:"w-5 h-5 text-gray-800 dark:text-gray-300"}):o.jsx(qI,{className:"w-5 h-5 text-gray-800 dark:text-gray-300"})}),o.jsx(jt,{initial:!1,children:l&&window.innerWidth<1024&&o.jsx(ue.div,{initial:{opacity:0}
784,animate:{opacity:1},exit:{opacity:0},onClick:()=>c(!1),className:"lg:hidden fixed inset-0 bg-black/50 z-30"})}),o.jsx(jt,{initial:!1,children:l&&o.jsx(ue.aside,{initial:{x:300},animate:{x:0},exit:{x:300},transition:{duration:.3},className:"fixed lg:sticky top-0 right-0 h-screen w-64 max-w-[80vw] lg:max-w-none bg-white dark:bg-gray-800 border-l border-gray-200 dark:border-gray-700 z-40 overflow-hidden flex flex-col",children:o.jsx("div",{className:"flex-1 overflow-y-auto sidebar-scrollbar",children:o.jsxs("div",{className:"p-4 flex flex-col h-full",children:[o.jsxs("div",{className:"flex items-center justify-between mb-8 pt-20 lg:pt-4",children:[o.jsxs(ze,{to:"/dashboard",className:"flex items-center gap-2 min-w-0",children:[o.jsx("div",{className:"w-8 h-8 bg-gradient-to-br from-purple-600 to-indigo-600 rounded-lg flex items-center justify-center flex-shrink-0",children:o.jsx(dn,{className:"w-5 h-5 text-white"})}),o.jsx("span",{className:"font-bold text-gray-900 dark:text-white truncate",children:"Smart-Copy.ai"})]}),o.jsx("button",{onClick:()=>c(!1),className:"hidden lg:block p-1 hover:bg-gray-100 dark:hover:bg-gray-700 rounded flex-shrink-0",children:o.jsx(Xj,{className:"w-5 h-5 text-gray-500"})})]}),o.jsx("nav",{className:"flex-1 space-y-1",children:K.map(F=>o.jsxs(ze,{to:F.href,className:`flex items-center gap-3 px-4 py-3 rounded-lg transition-colors overflow-hidden ${T(F.href)?"bg-purple-50 dark:bg-purple-900/20 text-purple-600 dark:text-purple-400":"text-gray-700 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-700"}`,children:[o.jsx(F.icon,{className:"w-5 h-5 flex-shrink-0"}),o.jsx("span",{className:"truncate",children:F.name})]},F.name))}),o.jsxs("div",{className:"mb-4 lg:mb-6 p-3 lg:p-4 bg-gradient-to-br from-purple-50 to-indigo-50 dark:from-purple-900/20 dark:to-indigo-900/20 rounded-lg border border-purple-200 dark:border-purple-800",children:[o.jsxs("div",{className:"flex items-center justify-between mb-2",children:[o.jsx("span",{className:"text-sm text-gray-600 dark:text-gray-400 truncate",children:t("sidebar.balance.label")}),o.jsx(zy,{className:"w-4 h-4 text-purple-600 dark:text-purple-400 flex-shrink-0"})]}),o.jsx("p",{className:"text-2xl font-bold text-purple-600 dark:text-purple-400 mb-3 truncate",children:e(C)}),o.jsxs(ze,{to:"/deposit",className:"btn btn-primary w-full flex items-center justify-center gap-2 text-sm py-2 overflow-hidden",children:[o.jsx(Qr,{className:"w-4 h-4 flex-shrink-0"}),o.jsx("span",{className:"truncate",children:t("sidebar.balance.topUp")})]})]}),o.jsxs("div",{className:"relative border-t border-gray-200 dark:border-gray-700 pt-4",children:[o.jsxs("button",{onClick:()=>a(F=>!F),"aria-expanded":i,className:"flex items-center gap-2 w-full px-4 py-2 rounded-lg hover:bg-gray-100 dark:hover:bg-gray-700 text-left overflow-hidden",children:[o.jsx("span",{className:"w-8 h-8 rounded-full bg-gradient-to-br from-purple-600 to-indigo-600 text-white text-xs font-bold flex items-center justify-center flex-shrink-0",children:((d==null?void 0:d.firstName)||(d==null?void 0:d.email)||"?").charAt(0).toUpperCase()}),o.jsxs("span",{className:"min-w-0 flex-1",children:[o.jsx("span",{className:"block text-xs lg:text-sm text-gray-700 dark:text-gray-200 truncate",children:(d==null?void 0:d.firstName)||t("sidebar.user.defaultName")}),o.jsx("span",{className:"block text-[11px] text-gray-500 truncate",children:d==null?void 0:d.email})]}),o.jsx(Cy,{className:`w-4 h-4 text-gray-400 flex-shrink-0 transition-transform ${i?"":"rotate-180"}`})]}),i&&o.jsxs("div",{className:"absolute bottom-full left-2 right-2 mb-1 z-50 rounded-xl border border-gray-200 dark:border-gray-700 bg-white dark:bg-gray-800 shadow-xl overflow-hidden",children:[o.jsxs("button",{onClick:s,className:"flex items-center gap-2 w-full px-4 py-2.5 text-sm text-gray-700 dark:text-gray-200 hover:bg-gray-100 dark:hover:bg-gray-700",children:[n==="light"?o.jsx(Yu,{className:"w-4 h-4 flex-shrink-0"}):o.jsx(Xu,{className:"w-4 h-4 flex-shrink-0"}),o.jsx("span",{className:"truncate",children:t(n==="light"?"sidebar.theme.dark":"sidebar.theme.light")})]}),o.jsxs(ze,{to:"/connections",onClick:()=>a(!1),className:"flex items-center gap-2 w-full px-4 py-2.5 text-sm text-gray-700 dark:text-gray-200 hover:bg-gray-100 dark:hover:bg-gray-700",children:[o.jsx(hc,{className:"w-4 h-4 flex-shrink-0"}),o.jsx("span",{className:"truncate",children:t("sidebar.integrations")})]}),o.jsxs(ze,{to:"/settings",onClick:()=>a(!1),className:"flex items-center gap-2 w-full px-4 py-2.5 text-sm text-gray-700 dark:text-gray-200 hover:bg-gray-100 dark:hover:bg-gray-700",children:[o.jsx(ZI,{className:"w-4 h-4 flex-shrink-0"}),o.jsx("span",{className:"truncate",children:t("sidebar.settings")})]}),o.jsxs("button",{onClick:_,className:"flex items-center gap-2 w-full px-4 py-2.5 text-sm text-red-600 dark:text-red-400 hover:bg-red-50 dark:hover:bg-red-900/20 border-t border-gray-200 dark:border-gray-700",children:[o.jsx(HI,{className:"w-4 h-4 flex-shrink-0"}),o.jsx("span",{className:"truncate",children:t("sidebar.user.logout")})]})]})]}),o.jsxs("div",{className:"flex items-center justify-center gap-2 px-4 pt-3 pb-4 lg:pb-2 text-[11px] text-gray-400 dark:text-gray-500",children:[o.jsx("button",{onClick:()=>y(!0),className:"hover:text-purple-500 dark:hover:text-purple-400 transition-colors",children:t("sidebar.footer.contact")}),o.jsx("span",{className:"text-gray-300 dark:text-gray-600",children:"•"}),o.jsx("button",{onClick:W,className:"hover:text-purple-500 dark:hover:text-purple-400 transition-colors",children:"Cookies"}),o.jsx("span",{className:"text-gray-300 dark:text-gray-600",children:"•"}),o.jsx("a",{href:"https://play.google.com/store/apps/details?id=ai.smartcopy.app",target:"_blank",rel:"noopener noreferrer",className:"hover:text-purple-500 dark:hover:text-purple-400 transition-colors",children:t("sidebar.footer.app")})]})]})})})}),!l&&o.jsx("button",{onClick:()=>c(!0),className:"hidden lg:block fixed top-20 left-0 z-40 p-2 rounded-r-lg bg-white dark:bg-gray-800 shadow-lg border border-l-0 border-gray-200 dark:border-gray-700",children:o.jsx(Pd,{className:"w-5 h-5 text-gray-500"})}),o.jsx(jt,{children:m&&o.jsx(ue.div,{initial:{opacity:0}
784,animate:{opacity:1},exit:{opacity:0},className:"fixed inset-0 bg-black/50 backdrop-blur-sm z-50 flex items-center justify-center p-4",onClick:()=>y(!1),children:o.jsxs(ue.div,{initial:{scale:.9,opacity:0},animate:{scale:1,opacity:1},exit:{scale:.9,opacity:0},onClick:F=>F.stopPropagation(),className:"bg-white dark:bg-gray-800 rounded-2xl max-w-md w-full shadow-2xl overflow-hidden",children:[o.jsxs("div",{className:"flex items-center justify-between p-5 border-b border-gray-200 dark:border-gray-700",children:[o.jsx("h3",{className:"text-lg font-bold text-gray-900 dark:text-white",children:t("sidebar.contact.title")}),o.jsx("button",{onClick:()=>y(!1),className:"p-1.5 hover:bg-gray-100 dark:hover:bg-gray-700 rounded-lg transition-colors",children:o.jsx(yt,{className:"w-5 h-5 text-gray-500"})})]}),o.jsxs("div",{className:"p-5 space-y-4",children:[o.jsxs("div",{children:[o.jsx("label",{className:"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1",children:t("sidebar.contact.email")}),o.jsx("input",{type:"email",value:k,onChange:F=>g(F.target.value),className:"input w-full bg-white dark:bg-gray-700 text-gray-900 dark:text-white",placeholder:t("sidebar.contact.emailPlaceholder")})]}),o.jsxs("div",{children:[o.jsx("label",{className:"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1",children:t("sidebar.contact.message")}),o.jsx("textarea",{value:x,onChange:F=>w(F.target.value),rows:4,className:"input w-full bg-white dark:bg-gray-700 text-gray-900 dark:text-white resize-none",placeholder:t("sidebar.contact.messagePlaceholder")})]})]}),o.jsxs("div",{className:"flex gap-3 p-5 border-t border-gray-200 dark:border-gray-700 bg-gray-50 dark:bg-gray-900/50",children:[o.jsx("button",{onClick:()=>y(!1),className:"btn btn-secondary flex-1",children:t("sidebar.contact.cancel")}),o.jsx("button",{disabled:!x.trim()||!k.trim()||b,onClick:N,className:"btn btn-primary flex-1 disabled:opacity-50",children:t(b?"sidebar.contact.sending":"sidebar.contact.send")})]})]})})})]})},Jae="/assets/mascot-explain-DzLWjbCJ.webp",Xae="/assets/mascot-sleep-EIJDPiAc.webp",Qae="/assets/mascot-focus-D-T_ua3E.webp",eoe="/assets/mascot-hand-BZBQWFFW.webp",toe="/assets/mascot-lost-kdvuBPSf.webp",roe={explain:Jae,sleep:Xae,focus:Qae,hand:eoe,lost:toe},noe={xs:"w-12",sm:"w-16",md:"w-28",lg:"w-40 md:w-48"};function rd({pose:t,size:e="md",grounded:r=!0,className:n=""}){return o.jsxs("div",{className:`relative ${noe[e]} ${n}`,"aria-hidden":"true",children:[r&&o.jsx("span",{className:"absolute left-1/2 -translate-x-1/2 bottom-0.5 w-3/5 h-2 rounded-[50%] bg-gray-900/15 dark:bg-black/50 blur-md"}),o.jsx("img",{src:roe[t],alt:"",loading:"lazy",draggable:!1,className:"relative w-full h-auto select-none drop-shadow-xl"})]})}const Dv=["query","search","scraping-all","selecting","outline","writing","image"],_E=5,soe=[qs,_i,Ks,Rt,Jj,dn,TV],LS=[5,10,15,10,45,0,20];function ioe(t){if(!t)return{stage:null};const e=t.match(/^writing:(\d+)\/(\d+)$/);return e?{stage:"writing",section:{current:Number(e[1]),total:Number(e[2])}}:{stage:{reading:"scraping-all",select:"selecting","user-sources-urls":"query","user-sources-files":"query","academic-sources":"search","outline-ready":"outline","outline-approved":"outline","outline-rework":"outline"}[t]||t}}function Fv(t){return Math.ceil(t/1500*60)}function MS(t){return LS.reduce((r,n)=>r+n,0)+Fv(t)}function X8(t,e,r){let n=0;for(let s=0;s<t;s++)n+=s===_E?Fv(e):LS[s];return t===_E&&r&&r.total>0&&(n+=(r.current-1)/r.total*Fv(e)),n}function IE(t,e,r,n){if(!t||t==="completed")return 0;const s=MS(e),i=Dv.findIndex(l=>l===t);if(i===-1)return s;let a=X8(i,e,n);if(r){const l=Math.floor((Date.now()-new Date(r).getTime())/1e3);a=Math.max(a,l)}return Math.max(0,Math.round(s-a))}function OE(t,e,r,n){if(t===-1)return 0;const s=MS(e);let i=X8(t,e,n);if(r){const a=Math.floor((Date.now()-new Date(r).getTime())/1e3);i=Math.max(i,a)}return Math.min(98,i/s*100)}const aoe=({textLength:t})=>{const{t:e}=He("components"),[r,n]=M.useState(0),[s,i]=M.useState(0),a=e("progress.initializing.tips",{returnObjects:!0});return M.useEffect(()=>{const l=setInterval(()=>{n(u=>(u+1)%a.length)},2e3),c=setInterval(()=>{i(u=>u>=90?u:u+1.5)},150);return()=>{clearInterval(l),clearInterval(c)}},[a.length]),o.jsxs(ue.div,{initial:{opacity:0,y:20}
784,animate:{opacity:1,y:0},exit:{opacity:0,y:-20},className:"mt-4 p-6 bg-gradient-to-br from-purple-50 via-indigo-50 to-blue-50 dark:from-purple-900/20 dark:via-indigo-900/20 dark:to-blue-900/20 rounded-xl border-2 border-purple-200 dark:border-purple-800 relative overflow-hidden",children:[o.jsx(ue.div,{animate:{backgroundPosition:["0% 0%","100% 100%"]},transition:{duration:3,repeat:1/0,repeatType:"reverse"},className:"absolute inset-0 opacity-30",style:{backgroundImage:"linear-gradient(45deg, transparent 25%, rgba(147, 51, 234, 0.1) 25%, rgba(147, 51, 234, 0.1) 50%, transparent 50%, transparent 75%, rgba(147, 51, 234, 0.1) 75%)",backgroundSize:"20px 20px"}}),o.jsxs("div",{className:"relative z-10",children:[o.jsxs("div",{className:"flex items-center justify-center gap-3 mb-4",children:[o.jsx(ue.div,{animate:{y:[0,-4,0]},transition:{duration:2.4,repeat:1/0,ease:"easeInOut"},children:o.jsx(rd,{pose:"focus",size:"xs",grounded:!1})}),o.jsx(ue.div,{animate:{rotate:[0,360],scale:[1,1.2,1]},transition:{duration:2,repeat:1/0,ease:"easeInOut"},children:o.jsx(Jj,{className:"w-8 h-8 text-purple-600 dark:text-purple-400"})}),o.jsx(ue.div,{animate:{scale:[1,1.3,1],opacity:[1,.5,1]},transition:{duration:1.5,repeat:1/0,ease:"easeInOut"},children:o.jsx(Py,{className:"w-6 h-6 text-yellow-500"})}),o.jsx(ue.div,{animate:{y:[0,-10,0]},transition:{duration:2,repeat:1/0,ease:"easeInOut"},children:o.jsx(ga,{className:"w-8 h-8 text-indigo-600 dark:text-indigo-400"})})]}),o.jsx("h3",{className:"text-xl font-bold text-center text-gray-900 dark:text-white mb-2",children:e("progress.initializing.title")}),o.jsx("div",{className:"h-6 mb-4 overflow-hidden",children:o.jsx(jt,{mode:"wait",children:o.jsx(ue.p,{initial:{y:20,opacity:0},animate:{y:0,opacity:1},exit:{y:-20,opacity:0},transition:{duration:.5},className:"text-center text-sm text-purple-600 dark:text-purple-400 font-medium",children:a[r]},r)})}),o.jsxs("div",{className:"relative h-3 bg-white dark:bg-gray-800 rounded-full overflow-hidden mb-4 shadow-inner",children:[o.jsx(ue.div,{className:"absolute inset-0 bg-gradient-to-r from-purple-500 via-indigo-500 to-blue-500",style:{width:`${s}%`},transition:{duration:.3}}),o.jsx(ue.div,{animate:{x:["-100%","200%"]},transition:{duration:1.5,repeat:1/0,ease:"linear"},className:"absolute inset-0 bg-gradient-to-r from-transparent via-white/30 to-transparent"})]}),o.jsxs("div",{className:"flex items-center justify-center gap-4 text-xs text-gray-600 dark:text-gray-400",children:[o.jsxs("span",{children:["📝 ",t.toLocaleString()," ",e("progress.initializing.characters")]}),o.jsx("span",{children:"•"}),o.jsxs("span",{children:["⏱️ ",e("progress.initializing.startingSoon")]})]}),o.jsx("div",{className:"flex justify-center gap-2 mt-4",children:[0,1,2].map(l=>o.jsx(ue.div,{animate:{scale:[1,1.5,1],opacity:[.3,1,.3]},transition:{duration:1.5,repeat:1/0,delay:l*.2},className:"w-2 h-2 bg-purple-600 dark:bg-purple-400 rounded-full"},l))})]})]})},qy=({progress:t,textLength:e,startTime:r})=>{const{t:n}=He("components"),[s,i]=M.useState(!1),[a,l]=M.useState(!1),{stage:c,section:u}=M.useMemo(()=>ioe(t),[t]),d=M.useMemo(()=>c?Dv.findIndex(g=>g===c):-1,[c]),[h,p]=M.useState(()=>IE(c,e,r,u)),[f,m]=M.useState(()=>OE(d,e,r,u)),y=g=>{if(g<60)return`${g} ${n("progress.time.seconds")}`;const x=Math.floor(g/60),w=g%60;if(x<60)return w>0?`${x} ${n("progress.time.minutes")} ${w} ${n("progress.time.seconds")}`:`${x} ${n("progress.time.minutes")}`;const b=Math.floor(x/60),v=x%60;return v>0?`${b} ${n("progress.time.hours")} ${v} ${n("progress.time.minutes")}`:`${b} ${n("progress.time.hours")}`},k=M.useMemo(()=>{const g=["query","search","scraping","selecting","outline","writing","image"];return Dv.map((x,w)=>({id:x,label:x==="writing"&&u?`${n("progress.stages.writing")} (${u.current}/${u.total})`:n(`progress.stages.${g[w]}`),icon:soe[w],duration:LS[w]}))},[n,u]);return M.useEffect(()=>{if(t==="completed"&&!s){i(!0);const g=setTimeout(()=>{l(!0)},4e3);return()=>clearTimeout(g)}},[t,s]),M.useEffect(()=>{if(!c||c==="completed")return;const g=setInterval(()=>{const x=IE(c,e,r,u),w=OE(d,e,r,u);p(x>0?x:0),m(w)},1e3);return()=>clearInterval(g)},[c,e,r,d,u]),t?t==="completed"?a?o.jsx(jt,{mode:"wait",children:o.jsx(ue.div,{initial:{opacity:0,scale:.9,y:20}
784,animate:{opacity:1,scale:1,y:0},transition:{duration:.8,ease:"easeOut"},className:"mt-4 p-4 bg-green-50 dark:bg-green-900/20 border border-green-200 dark:border-green-800 rounded-lg",children:o.jsxs("div",{className:"flex items-center gap-3",children:[o.jsx(ue.div,{initial:{scale:0,rotate:-180},animate:{scale:1,rotate:0},transition:{type:"spring",stiffness:200,damping:15,delay:.2},children:o.jsx(Rt,{className:"w-6 h-6 text-green-600 dark:text-green-400"})}),o.jsxs("div",{className:"flex-1",children:[o.jsx(ue.p,{initial:{opacity:0,x:-10},animate:{opacity:1,x:0},transition:{delay:.4},className:"text-sm font-bold text-green-700 dark:text-green-300",children:n("progress.completed.title")}),o.jsx(ue.p,{initial:{opacity:0,x:-10},animate:{opacity:1,x:0},transition:{delay:.6},className:"text-xs text-green-600 dark:text-green-400 mt-1",children:n("progress.completed.availableAfter")})]}),o.jsx(ue.div,{animate:{rotate:[0,10,-10,10,0]},transition:{duration:2,repeat:1/0,repeatDelay:3},children:o.jsx(dn,{className:"w-5 h-5 text-green-500"})})]})},"final-box")}):o.jsxs(ue.div,{initial:{opacity:0,scale:.95},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.95},className:"mt-4 p-4 bg-gradient-to-br from-green-50 via-emerald-50 to-teal-50 dark:from-green-900/20 dark:via-emerald-900/20 dark:to-teal-900/20 rounded-lg border-2 border-green-300 dark:border-green-700 relative overflow-hidden",children:[o.jsx(ue.div,{animate:{backgroundPosition:["0% 0%","100% 100%"]},transition:{duration:2,repeat:1/0,repeatType:"reverse"},className:"absolute inset-0 opacity-20",style:{backgroundImage:"linear-gradient(45deg, transparent 25%, rgba(34, 197, 94, 0.2) 25%, rgba(34, 197, 94, 0.2) 50%, transparent 50%, transparent 75%, rgba(34, 197, 94, 0.2) 75%)",backgroundSize:"20px 20px"}}),o.jsxs("div",{className:"relative z-10",children:[o.jsxs("div",{className:"flex items-center justify-between mb-3",children:[o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx(ue.div,{animate:{rotate:[0,360],scale:[1,1.2,1]},transition:{duration:2,repeat:1/0},children:o.jsx(dn,{className:"w-5 h-5 text-green-600 dark:text-green-400"})}),o.jsx("span",{className:"text-sm font-bold text-green-700 dark:text-green-300",children:n("progress.finalizingGeneration")})]}),o.jsxs(ue.span,{initial:{opacity:0,scale:0},animate:{opacity:1,scale:1},transition:{delay:.5},className:"text-sm font-bold text-green-700 dark:text-green-300",children:[o.jsx(ue.span,{initial:{opacity:0}
784,animate:{opacity:1},transition:{duration:.5},children:"98%"}),o.jsxs(ue.span,{initial:{opacity:0},animate:{opacity:1},transition:{delay:1,duration:.5},children:[" ","→ 100%"]})]})]}),o.jsx("div",{className:"h-3 bg-green-100 dark:bg-green-900/40 rounded-full overflow-hidden mb-4 shadow-inner",children:o.jsx(ue.div,{className:"h-full bg-gradient-to-r from-green-500 via-emerald-500 to-teal-500 relative",initial:{width:"98%"},animate:{width:"100%"},transition:{duration:3,ease:"easeOut"},children:o.jsx(ue.div,{animate:{x:["-100%","200%"]},transition:{duration:1.5,repeat:1/0,ease:"linear"},className:"absolute inset-0 bg-gradient-to-r from-transparent via-white/40 to-transparent"})})}),o.jsxs(ue.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},transition:{delay:2,duration:.8},className:"text-center",children:[o.jsxs(ue.div,{animate:{scale:[1,1.05,1]},transition:{duration:1.5,repeat:1/0},className:"flex items-center justify-center gap-2 text-green-700 dark:text-green-300",children:[o.jsx(Rt,{className:"w-6 h-6"}),o.jsx("span",{className:"text-lg font-bold",children:n("progress.completed.ready")}),o.jsx(Rt,{className:"w-6 h-6"})]}),o.jsx(ue.p,{initial:{opacity:0}
784,animate:{opacity:1},transition:{delay:2.5},className:"text-sm text-green-600 dark:text-green-400 mt-2",children:n("progress.completed.success")})]}),o.jsx("div",{className:"flex justify-center gap-3 mt-4",children:[0,1,2,3,4].map(g=>o.jsx(ue.div,{animate:{scale:[1,1.5,1],opacity:[.3,1,.3],rotate:[0,180,360]},transition:{duration:2,repeat:1/0,delay:g*.2},children:o.jsx(dn,{className:"w-4 h-4 text-green-500"})},g))})]})]}):o.jsxs(ue.div,{initial:{opacity:0,scale:.95},animate:{opacity:1,scale:1},transition:{duration:.5},className:"mt-4 p-4 bg-blue-50 dark:bg-blue-900/20 rounded-lg border border-blue-200 dark:border-blue-800",children:[o.jsxs("div",{className:"flex items-center justify-between mb-3",children:[o.jsx("span",{className:"text-sm font-medium text-blue-700 dark:text-blue-300",children:n("progress.inProgress")}),o.jsxs("div",{className:"flex items-center gap-3",children:[o.jsxs("span",{className:"text-sm font-bold text-blue-700 dark:text-blue-300",children:[Math.round(f),"%"]}),h>0&&o.jsxs("div",{className:"flex items-center gap-1 text-sm font-bold text-purple-700 dark:text-purple-300",children:[o.jsx(WV,{className:"w-4 h-4"}),o.jsx("span",{children:y(h)})]}),f>=98&&o.jsx("span",{className:"text-xs text-purple-600 dark:text-purple-400 font-medium animate-pulse",children:n("progress.finalizing")})]})]}),o.jsx("div",{className:"h-2 bg-blue-100 dark:bg-blue-900/40 rounded-full overflow-hidden mb-4",children:o.jsx(ue.div,{className:"h-full bg-gradient-to-r from-blue-500 to-purple-500",style:{width:`${f}%`},transition:{duration:1,ease:"linear"}})}),o.jsx("div",{className:"space-y-2",children:k.map((g,x)=>{const w=g.icon,b=x===d,v=x<d;return o.jsxs(ue.div,{initial:{opacity:0,x:-20},animate:{opacity:1,x:0},transition:{delay:x*.1},className:`flex items-center gap-3 p-2 rounded-lg transition-all duration-500 ${b?"bg-blue-100 dark:bg-blue-900/40":v?"bg-green-50 dark:bg-green-900/20":"opacity-50"}`,children:[o.jsx("div",{className:`w-8 h-8 rounded-full flex items-center justify-center transition-all duration-500 ${b?"bg-blue-500 text-white animate-pulse":v?"bg-green-500 text-white":"bg-gray-300 dark:bg-gray-600 text-gray-500"}`,children:v?o.jsx(Rt,{className:"w-5 h-5"}):o.jsx(w,{className:"w-5 h-5"})}),o.jsxs("span",{className:`text-sm font-medium transition-colors duration-500 ${b?"text-blue-700 dark:text-blue-300":v?"text-green-700 dark:text-green-300":"text-gray-500 dark:text-gray-400"}`,children:[g.label,b&&o.jsx("span",{className:"ml-2 inline-flex items-center",children:o.jsx("span",{className:"animate-bounce",children:"⚡"})})]})]},g.id)})}),o.jsx("div",{className:"mt-3 pt-3 border-t border-blue-200 dark:border-blue-700",children:o.jsxs("p",{className:"text-xs text-blue-600 dark:text-blue-400",children:["📝 ",n("progress.info.text")," ",e.toLocaleString()," ",n("progress.info.characters")," • ",n("progress.info.estimatedTime")," ",y(MS(e))]})})]}):o.jsx(aoe,{textLength:e})},xa=({to:t="/dashboard",label:e})=>{const{t:r}=He("components");return o.jsxs(ze,{to:t,className:"inline-flex items-center gap-1.5 text-sm text-gray-500 hover:text-purple-600 dark:text-gray-400 dark:hover:text-purple-400 transition-colors mb-2",children:[o.jsx(ma,{className:"w-4 h-4"}),e||r("backToDashboard")]})};function Dr(t){this.content=t}Dr.prototype={constructor:Dr,find:function(t){for(var e=0;e<this.content.length;e+=2)if(this.content[e]===t)return e;return-1},get:function(t){var e=this.find(t);return e==-1?void 0:this.content[e+1]},update:function(t,e,r){var n=r&&r!=t?this.remove(r):this,s=n.find(t),i=n.content.slice();return s==-1?i.push(r||t,e):(i[s+1]=e,r&&(i[s]=r)),new Dr(i)},remove:function(t){var e=this.find(t);if(e==-1)return this;var r=this.content.slice();return r.splice(e,2),new Dr(r)},addToStart:function(t,e){return new Dr([t,e].concat(this.remove(t).content))},addToEnd:function(t,e){var r=this.remove(t).content.slice();return r.push(t,e),new Dr(r)},addBefore:function(t,e,r){var n=this.remove(e),s=n.content.slice(),i=n.find(t);return s.splice(i==-1?s.length:i,0,e,r),new Dr(s)},forEach:function(t){for(var e=0;e<this.content.length;e+=2)t(this.content[e],this.content[e+1])},prepend:function(t){return t=Dr.from(t),t.size?new Dr(t.content.concat(this.subtract(t).content)):this},append:function(t){return t=Dr.from(t),t.size?new Dr(this.subtract(t).content.concat(t.content)):this},subtract:function(t){var e=this;t=Dr.from(t);for(var r=0;r<t.content.length;r+=2)e=e.remove(t.content[r]);return e},toObject:function(){var t={};return this.forEach(function(e,r){t[e]=r}),t},get size(){return this.content.length>>1}};Dr.from=function(t){if(t instanceof Dr)return t;var e=[];
vendor: 8,667 bytes, line 784
784if(t)for(var r in t)e.push(r,t[r]);return new Dr(e)};function Q8(t,e,r){for(let n=0;;n++){if(n==t.childCount||n==e.childCount)return t.childCount==e.childCount?null:r;let s=t.child(n),i=e.child(n);if(s==i){r+=s.nodeSize;continue}if(!s.sameMarkup(i))return r;if(s.isText&&s.text!=i.text){for(let a=0;s.text[a]==i.text[a];a++)r++;return r}if(s.content.size||i.content.size){let a=Q8(s.content,i.content,r+1);if(a!=null)return a}r+=s.nodeSize}}function eR(t,e,r,n){for(let s=t.childCount,i=e.childCount;;){if(s==0||i==0)return s==i?null:{a:r,b:n};let a=t.child(--s),l=e.child(--i),c=a.nodeSize;if(a==l){r-=c,n-=c;continue}if(!a.sameMarkup(l))return{a:r,b:n};if(a.isText&&a.text!=l.text){let u=0,d=Math.min(a.text.length,l.text.length);for(;u<d&&a.text[a.text.length-u-1]==l.text[l.text.length-u-1];)u++,r--,n--;return{a:r,b:n}}if(a.content.size||l.content.size){let u=eR(a.content,l.content,r-1,n-1);if(u)return u}r-=c,n-=c}}class Se{constructor(e,r){if(this.content=e,this.size=r||0,r==null)for(let n=0;n<e.length;n++)this.size+=e[n].nodeSize}nodesBetween(e,r,n,s=0,i){for(let a=0,l=0;l<r;a++){let c=this.content[a],u=l+c.nodeSize;if(u>e&&n(c,s+l,i||null,a)!==!1&&c.content.size){let d=l+1;c.nodesBetween(Math.max(0,e-d),Math.min(c.content.size,r-d),n,s+d)}l=u}}descendants(e){this.nodesBetween(0,this.size,e)}textBetween(e,r,n,s){let i="",a=!0;return this.nodesBetween(e,r,(l,c)=>{let u=l.isText?l.text.slice(Math.max(e,c)-c,r-c):l.isLeaf?s?typeof s=="function"?s(l):s:l.type.spec.leafText?l.type.spec.leafText(l):"":"";l.isBlock&&(l.isLeaf&&u||l.isTextblock)&&n&&(a?a=!1:i+=n),i+=u},0),i}append(e){if(!e.size)return this;if(!this.size)return e;let r=this.lastChild,n=e.firstChild,s=this.content.slice(),i=0;for(r.isText&&r.sameMarkup(n)&&(s[s.length-1]=r.withText(r.text+n.text),i=1);i<e.content.length;i++)s.push(e.content[i]);return new Se(s,this.size+e.size)}cut(e,r=this.size){if(e==0&&r==this.size)return this;let n=[],s=0;if(r>e)for(let i=0,a=0;a<r;i++){let l=this.content[i],c=a+l.nodeSize;c>e&&((a<e||c>r)&&(l.isText?l=l.cut(Math.max(0,e-a),Math.min(l.text.length,r-a)):l=l.cut(Math.max(0,e-a-1),Math.min(l.content.size,r-a-1))),n.push(l),s+=l.nodeSize),a=c}return new Se(n,s)}cutByIndex(e,r){return e==r?Se.empty:e==0&&r==this.content.length?this:new Se(this.content.slice(e,r))}replaceChild(e,r){let n=this.content[e];if(n==r)return this;let s=this.content.slice(),i=this.size+r.nodeSize-n.nodeSize;return s[e]=r,new Se(s,i)}addToStart(e){return new Se([e].concat(this.content),this.size+e.nodeSize)}addToEnd(e){return new Se(this.content.concat(e),this.size+e.nodeSize)}eq(e){if(this.content.length!=e.content.length)return!1;for(let r=0;r<this.content.length;r++)if(!this.content[r].eq(e.content[r]))return!1;return!0}get firstChild(){return this.content.length?this.content[0]:null}get lastChild(){return this.content.length?this.content[this.content.length-1]:null}get childCount(){return this.content.length}child(e){let r=this.content[e];if(!r)throw new RangeError("Index "+e+" out of range for "+this);return r}maybeChild(e){return this.content[e]||null}forEach(e){for(let r=0,n=0;r<this.content.length;r++){let s=this.content[r];e(s,n,r),n+=s.nodeSize}}findDiffStart(e,r=0){return Q8(this,e,r)}findDiffEnd(e,r=this.size,n=e.size){return eR(this,e,r,n)}findIndex(e){if(e==0)return dm(0,e);if(e==this.size)return dm(this.content.length,e);if(e>this.size||e<0)throw new RangeError(`Position ${e} outside of fragment (${this})`);for(let r=0,n=0;;r++){let s=this.child(r),i=n+s.nodeSize;if(i>=e)return i==e?dm(r+1,i):dm(r,n);n=i}}toString(){return"<"+this.toStringInner()+">"}toStringInner(){return this.content.join(", ")}toJSON(){return this.content.length?this.content.map(e=>e.toJSON()):null}static fromJSON(e,r){if(!r)return Se.empty;if(!Array.isArray(r))throw new RangeError("Invalid input for Fragment.fromJSON");return new Se(r.map(e.nodeFromJSON))}static fromArray(e){if(!e.length)return Se.empty;let r,n=0;for(let s=0;s<e.length;s++){let i=e[s];n+=i.nodeSize,s&&i.isText&&e[s-1].sameMarkup(i)?(r||(r=e.slice(0,s)),r[r.length-1]=i.withText(r[r.length-1].text+i.text)):r&&r.push(i)}return new Se(r||e,n)}static from(e){if(!e)return Se.empty;if(e instanceof Se)return e;if(Array.isArray(e))return this.fromArray(e);if(e.attrs)return new Se([e],e.nodeSize);throw new RangeError("Can not convert "+e+" to a Fragment"+(e.nodesBetween?" (looks like multiple versions of prosemirror-model were loaded)":""))}}Se.empty=new Se([],0);const Nw={index:0,offset:0};function dm(t,e){return Nw.index=t,Nw.offset=e,Nw}function sg(t,e){if(t===e)return!0;if(!(t&&typeof t=="object")||!(e&&typeof e=="object"))return!1;let r=Array.isArray(t);if(Array.isArray(e)!=r)return!1;if(r){if(t.length!=e.length)return!1;for(let n=0;n<t.length;n++)if(!sg(t[n],e[n]))return!1}else{for(let n in t)if(!(n in e)||!sg(t[n],e[n]))return!1;for(let n in e)if(!(n in t))return!1}return!0}let At=class Bv{constructor(e,r){this.type=e,this.attrs=r}addToSet(e){let r,n=!1;for(let s=0;s<e.length;s++){let i=e[s];if(this.eq(i))return e;if(this.type.excludes(i.type))r||(r=e.slice(0,s));else{if(i.type.excludes(this.type))return e;!n&&i.type.rank>this.type.rank&&(r||(r=e.slice(0,s)),r.push(this),n=!0),r&&r.push(i)}}return r||(r=e.slice()),n||r.push(this),r}removeFromSet(e){for(let r=0;r<e.length;r++)if(this.eq(e[r]))return e.slice(0,r).concat(e.slice(r+1));return e}isInSet(e){for(let r=0;r<e.length;r++)if(this.eq(e[r]))return!0;return!1}eq(e){return this==e||this.type==e.type&&sg(this.attrs,e.attrs)}toJSON(){let e={type:this.type.name};for(let r in this.attrs){e.attrs=this.attrs;break}return e}static fromJSON(e,r){if(!r)throw new RangeError("Invalid input for Mark.fromJSON");let n=e.marks[r.type];if(!n)throw new RangeError(`There is no mark type ${r.type} in this schema`);let s=n.create(r.attrs);return n.checkAttrs(s.attrs),s}static sameSet(e,r){if(e==r)return!0;if(e.length!=r.length)return!1;for(let n=0;n<e.length;n++)if(!e[n].eq(r[n]))return!1;return!0}static setFrom(e){if(!e||Array.isArray(e)&&e.length==0)return Bv.none;if(e instanceof Bv)return[e];let r=e.slice();return r.sort((n,s)=>n.type.rank-s.type.rank),r}};At.none=[];class ig extends Error{}class Ie{constructor(e,r,n){this.content=e,this.openStart=r,this.openEnd=n}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(e,r){let n=rR(this.content,e+this.openStart,r);return n&&new Ie(n,this.openStart,this.openEnd)}removeBetween(e,r){return new Ie(tR(this.content,e+this.openStart,r+this.openStart),this.openStart,this.openEnd)}eq(e){return this.content.eq(e.content)&&this.openStart==e.openStart&&this.openEnd==e.openEnd}toString(){return this.content+"("+this.openStart+","+this.openEnd+")"}toJSON(){if(!this.content.size)return null;let e={content:this.content.toJSON()};return this.openStart>0&&(e.openStart=this.openStart),this.openEnd>0&&(e.openEnd=this.openEnd),e}static fromJSON(e,r){if(!r)return Ie.empty;let n=r.openStart||0,s=r.openEnd||0;if(typeof n!="number"||typeof s!="number")throw new RangeError("Invalid input for Slice.fromJSON");return new Ie(Se.fromJSON(e,r.content),n,s)}static maxOpen(e,r=!0){let n=0,s=0;for(let i=e.firstChild;i&&!i.isLeaf&&(r||!i.type.spec.isolating);i=i.firstChild)n++;for(let i=e.lastChild;i&&!i.isLeaf&&(r||!i.type.spec.isolating);i=i.lastChild)s++;return new Ie(e,n,s)}}Ie.empty=new Ie(Se.empty,0,0);function tR(t,e,r){let{index:n,offset:s}=t.findIndex(e),i=t.maybeChild(n),{index:a,offset:l}=t.findIndex(r);if(s==e||i.isText){if(l!=r&&!t.child(a).isText)throw new RangeError("Removing non-flat range");return t.cut(0,e).append(t.cut(r))}if(n!=a)throw new RangeError("Removing non-flat range");return t.replaceChild(n,i.copy(tR(i.content,e-s-1,r-s-1)))}function rR(t,e,r,n){let{index:s,offset:i}=t.findIndex(e),a=t.maybeChild(s);if(i==e||a.isText)return n&&!n.canReplace(s,s,r)?null:t.cut(0,e).append(r).append(t.cut(e));let l=rR(a.content,e-i-1,r,a);return l&&t.replaceChild(s,a.copy(l))}function ooe(t,e,r){if(r.openStart>t.depth)throw new ig("Inserted content deeper than insertion position");if(t.depth-r.openStart!=e.depth-r.openEnd)throw new ig("Inconsistent open depths");return nR(t,e,r,0)}function nR(t,e,r,n){let s=t.index(n),i=t.node(n);if(s==e.index(n)&&n<t.depth-r.openStart){let a=nR(t,e,r,n+1);return i.copy(i.content.replaceChild(s,a))}else if(r.content.size)if(!r.openStart&&!r.openEnd&&t.depth==n&&e.depth==n){let a=t.parent,l=a.content;return Xl(a,l.cut(0,t.parentOffset).append(r.content).append(l.cut(e.parentOffset)))}else{let{start:a,end:l}=loe(r,t);return Xl(i,iR(t,a,l,e,n))}else return Xl(i,ag(t,e,n))}function sR(t,e){if(!e.type.compatibleContent(t.type))throw new ig("Cannot join "+e.type.name+" onto "+t.type.name)}
vendor: 10,918 bytes, line 784
784function $v(t,e,r){let n=t.node(r);return sR(n,e.node(r)),n}function Jl(t,e){let r=e.length-1;r>=0&&t.isText&&t.sameMarkup(e[r])?e[r]=t.withText(e[r].text+t.text):e.push(t)}function Wh(t,e,r,n){let s=(e||t).node(r),i=0,a=e?e.index(r):s.childCount;t&&(i=t.index(r),t.depth>r?i++:t.textOffset&&(Jl(t.nodeAfter,n),i++));for(let l=i;l<a;l++)Jl(s.child(l),n);e&&e.depth==r&&e.textOffset&&Jl(e.nodeBefore,n)}function Xl(t,e){return t.type.checkContent(e),t.copy(e)}function iR(t,e,r,n,s){let i=t.depth>s&&$v(t,e,s+1),a=n.depth>s&&$v(r,n,s+1),l=[];return Wh(null,t,s,l),i&&a&&e.index(s)==r.index(s)?(sR(i,a),Jl(Xl(i,iR(t,e,r,n,s+1)),l)):(i&&Jl(Xl(i,ag(t,e,s+1)),l),Wh(e,r,s,l),a&&Jl(Xl(a,ag(r,n,s+1)),l)),Wh(n,null,s,l),new Se(l)}function ag(t,e,r){let n=[];if(Wh(null,t,r,n),t.depth>r){let s=$v(t,e,r+1);Jl(Xl(s,ag(t,e,r+1)),n)}return Wh(e,null,r,n),new Se(n)}function loe(t,e){let r=e.depth-t.openStart,s=e.node(r).copy(t.content);for(let i=r-1;i>=0;i--)s=e.node(i).copy(Se.from(s));return{start:s.resolveNoCache(t.openStart+r),end:s.resolveNoCache(s.content.size-t.openEnd-r)}}class Op{constructor(e,r,n){this.pos=e,this.path=r,this.parentOffset=n,this.depth=r.length/3-1}resolveDepth(e){return e==null?this.depth:e<0?this.depth+e:e}get parent(){return this.node(this.depth)}get doc(){return this.node(0)}node(e){return this.path[this.resolveDepth(e)*3]}index(e){return this.path[this.resolveDepth(e)*3+1]}indexAfter(e){return e=this.resolveDepth(e),this.index(e)+(e==this.depth&&!this.textOffset?0:1)}start(e){return e=this.resolveDepth(e),e==0?0:this.path[e*3-1]+1}end(e){return e=this.resolveDepth(e),this.start(e)+this.node(e).content.size}before(e){if(e=this.resolveDepth(e),!e)throw new RangeError("There is no position before the top-level node");return e==this.depth+1?this.pos:this.path[e*3-1]}after(e){if(e=this.resolveDepth(e),!e)throw new RangeError("There is no position after the top-level node");return e==this.depth+1?this.pos:this.path[e*3-1]+this.path[e*3].nodeSize}get textOffset(){return this.pos-this.path[this.path.length-1]}get nodeAfter(){let e=this.parent,r=this.index(this.depth);if(r==e.childCount)return null;let n=this.pos-this.path[this.path.length-1],s=e.child(r);return n?e.child(r).cut(n):s}get nodeBefore(){let e=this.index(this.depth),r=this.pos-this.path[this.path.length-1];return r?this.parent.child(e).cut(0,r):e==0?null:this.parent.child(e-1)}posAtIndex(e,r){r=this.resolveDepth(r);let n=this.path[r*3],s=r==0?0:this.path[r*3-1]+1;for(let i=0;i<e;i++)s+=n.child(i).nodeSize;return s}marks(){let e=this.parent,r=this.index();if(e.content.size==0)return At.none;if(this.textOffset)return e.child(r).marks;let n=e.maybeChild(r-1),s=e.maybeChild(r);if(!n){let l=n;n=s,s=l}let i=n.marks;for(var a=0;a<i.length;a++)i[a].type.spec.inclusive===!1&&(!s||!i[a].isInSet(s.marks))&&(i=i[a--].removeFromSet(i));return i}marksAcross(e){let r=this.parent.maybeChild(this.index());if(!r||!r.isInline)return null;let n=r.marks,s=e.parent.maybeChild(e.index());for(var i=0;i<n.length;i++)n[i].type.spec.inclusive===!1&&(!s||!n[i].isInSet(s.marks))&&(n=n[i--].removeFromSet(n));return n}sharedDepth(e){for(let r=this.depth;r>0;r--)if(this.start(r)<=e&&this.end(r)>=e)return r;return 0}blockRange(e=this,r){if(e.pos<this.pos)return e.blockRange(this);for(let n=this.depth-(this.parent.inlineContent||this.pos==e.pos?1:0);n>=0;n--)if(e.pos<=this.end(n)&&(!r||r(this.node(n))))return new og(this,e,n);return null}sameParent(e){return this.pos-this.parentOffset==e.pos-e.parentOffset}max(e){return e.pos>this.pos?e:this}min(e){return e.pos<this.pos?e:this}toString(){let e="";for(let r=1;r<=this.depth;r++)e+=(e?"/":"")+this.node(r).type.name+"_"+this.index(r-1);return e+":"+this.parentOffset}static resolve(e,r){if(!(r>=0&&r<=e.content.size))throw new RangeError("Position "+r+" out of range");let n=[],s=0,i=r;for(let a=e;;){let{index:l,offset:c}=a.content.findIndex(i),u=i-c;if(n.push(a,l,s+c),!u||(a=a.child(l),a.isText))break;i=u-1,s+=c+1}return new Op(r,n,i)}static resolveCached(e,r){let n=RE.get(e);if(n)for(let i=0;i<n.elts.length;i++){let a=n.elts[i];if(a.pos==r)return a}else RE.set(e,n=new coe);let s=n.elts[n.i]=Op.resolve(e,r);return n.i=(n.i+1)%uoe,s}}class coe{constructor(){this.elts=[],this.i=0}}const uoe=12,RE=new WeakMap;class og{constructor(e,r,n){this.$from=e,this.$to=r,this.depth=n}get start(){return this.$from.before(this.depth+1)}get end(){return this.$to.after(this.depth+1)}get parent(){return this.$from.node(this.depth)}get startIndex(){return this.$from.index(this.depth)}get endIndex(){return this.$to.indexAfter(this.depth)}}const doe=Object.create(null);let Co=class Uv{constructor(e,r,n,s=At.none){this.type=e,this.attrs=r,this.marks=s,this.content=n||Se.empty}get children(){return this.content.content}get nodeSize(){return this.isLeaf?1:2+this.content.size}get childCount(){return this.content.childCount}child(e){return this.content.child(e)}maybeChild(e){return this.content.maybeChild(e)}forEach(e){this.content.forEach(e)}nodesBetween(e,r,n,s=0){this.content.nodesBetween(e,r,n,s,this)}descendants(e){this.nodesBetween(0,this.content.size,e)}get textContent(){return this.isLeaf&&this.type.spec.leafText?this.type.spec.leafText(this):this.textBetween(0,this.content.size,"")}textBetween(e,r,n,s){return this.content.textBetween(e,r,n,s)}get firstChild(){return this.content.firstChild}get lastChild(){return this.content.lastChild}eq(e){return this==e||this.sameMarkup(e)&&this.content.eq(e.content)}sameMarkup(e){return this.hasMarkup(e.type,e.attrs,e.marks)}hasMarkup(e,r,n){return this.type==e&&sg(this.attrs,r||e.defaultAttrs||doe)&&At.sameSet(this.marks,n||At.none)}copy(e=null){return e==this.content?this:new Uv(this.type,this.attrs,e,this.marks)}mark(e){return e==this.marks?this:new Uv(this.type,this.attrs,this.content,e)}cut(e,r=this.content.size){return e==0&&r==this.content.size?this:this.copy(this.content.cut(e,r))}slice(e,r=this.content.size,n=!1){if(e==r)return Ie.empty;let s=this.resolve(e),i=this.resolve(r),a=n?0:s.sharedDepth(r),l=s.start(a),u=s.node(a).content.cut(s.pos-l,i.pos-l);return new Ie(u,s.depth-a,i.depth-a)}replace(e,r,n){return ooe(this.resolve(e),this.resolve(r),n)}nodeAt(e){for(let r=this;;){let{index:n,offset:s}=r.content.findIndex(e);if(r=r.maybeChild(n),!r)return null;if(s==e||r.isText)return r;e-=s+1}}childAfter(e){let{index:r,offset:n}=this.content.findIndex(e);return{node:this.content.maybeChild(r),index:r,offset:n}}childBefore(e){if(e==0)return{node:null,index:0,offset:0};let{index:r,offset:n}=this.content.findIndex(e);if(n<e)return{node:this.content.child(r),index:r,offset:n};let s=this.content.child(r-1);return{node:s,index:r-1,offset:n-s.nodeSize}}resolve(e){return Op.resolveCached(this,e)}resolveNoCache(e){return Op.resolve(this,e)}rangeHasMark(e,r,n){let s=!1;return r>e&&this.nodesBetween(e,r,i=>(n.isInSet(i.marks)&&(s=!0),!s)),s}get isBlock(){return this.type.isBlock}get isTextblock(){return this.type.isTextblock}get inlineContent(){return this.type.inlineContent}get isInline(){return this.type.isInline}get isText(){return this.type.isText}get isLeaf(){return this.type.isLeaf}get isAtom(){return this.type.isAtom}toString(){if(this.type.spec.toDebugString)return this.type.spec.toDebugString(this);let e=this.type.name;return this.content.size&&(e+="("+this.content.toStringInner()+")"),aR(this.marks,e)}contentMatchAt(e){let r=this.type.contentMatch.matchFragment(this.content,0,e);if(!r)throw new Error("Called contentMatchAt on a node with invalid content");return r}canReplace(e,r,n=Se.empty,s=0,i=n.childCount){let a=this.contentMatchAt(e).matchFragment(n,s,i),l=a&&a.matchFragment(this.content,r);if(!l||!l.validEnd)return!1;for(let c=s;c<i;c++)if(!this.type.allowsMarks(n.child(c).marks))return!1;return!0}canReplaceWith(e,r,n,s){if(s&&!this.type.allowsMarks(s))return!1;let i=this.contentMatchAt(e).matchType(n),a=i&&i.matchFragment(this.content,r);return a?a.validEnd:!1}canAppend(e){return e.content.size?this.canReplace(this.childCount,this.childCount,e.content):this.type.compatibleContent(e.type)}check(){this.type.checkContent(this.content),this.type.checkAttrs(this.attrs);let e=At.none;for(let r=0;r<this.marks.length;r++){let n=this.marks[r];n.type.checkAttrs(n.attrs),e=n.addToSet(e)}if(!At.sameSet(e,this.marks))throw new RangeError(`Invalid collection of marks for node ${this.type.name}: ${this.marks.map(r=>r.type.name)}`);this.content.forEach(r=>r.check())}toJSON(){let e={type:this.type.name};for(let r in this.attrs){e.attrs=this.attrs;break}return this.content.size&&(e.content=this.content.toJSON()),this.marks.length&&(e.marks=this.marks.map(r=>r.toJSON())),e}static fromJSON(e,r){if(!r)throw new RangeError("Invalid input for Node.fromJSON");let n;if(r.marks){if(!Array.isArray(r.marks))throw new RangeError("Invalid mark data for Node.fromJSON");n=r.marks.map(e.markFromJSON)}if(r.type=="text"){if(typeof r.text!="string")throw new RangeError("Invalid text node in JSON");return e.text(r.text,n)}let s=Se.fromJSON(e,r.content),i=e.nodeType(r.type).create(r.attrs,s,n);return i.type.checkAttrs(i.attrs),i}};Co.prototype.text=void 0;class lg extends Co{constructor(e,r,n,s){if(super(e,r,null,s),!n)throw new RangeError("Empty text nodes are not allowed");this.text=n}toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):aR(this.marks,JSON.stringify(this.text))}get textContent(){return this.text}textBetween(e,r){return this.text.slice(e,r)}get nodeSize(){return this.text.length}mark(e){return e==this.marks?this:new lg(this.type,this.attrs,this.text,e)}withText(e){return e==this.text?this:new lg(this.type,this.attrs,e,this.marks)}cut(e=0,r=this.text.length){return e==0&&r==this.text.length?this:this.withText(this.text.slice(e,r))}eq(e){return this.sameMarkup(e)&&this.text==e.text}toJSON(){let e=super.toJSON();return e.text=this.text,e}}function aR(t,e){for(let r=t.length-1;r>=0;r--)e=t[r].type.name+"("+e+")";return e}class mc{constructor(e){this.validEnd=e,this.next=[],this.wrapCache=[]}static parse(e,r){let n=new hoe(e,r);if(n.next==null)return mc.empty;let s=oR(n);n.next&&n.err("Unexpected trailing text");let i=woe(xoe(s));return boe(i,n),i}matchType(e){for(let r=0;r<this.next.length;r++)if(this.next[r].type==e)return this.next[r].next;return null}matchFragment(e,r=0,n=e.childCount){let s=this;for(let i=r;s&&i<n;i++)s=s.matchType(e.child(i).type);return s}get inlineContent(){return this.next.length!=0&&this.next[0].type.isInline}get defaultType(){for(let e=0;e<this.next.length;e++){let{type:r}=this.next[e];if(!(r.isText||r.hasRequiredAttrs()))return r}return null}compatible(e){for(let r=0;r<this.next.length;r++)for(let n=0;n<e.next.length;n++)if(this.next[r].type==e.next[n].type)return!0;return!1}fillBefore(e,r=!1,n=0){let s=[this];function i(a,l){let c=a.matchFragment(e,n);if(c&&(!r||c.validEnd))return Se.from(l.map(u=>u.createAndFill()));for(let u=0;u<a.next.length;u++){let{type:d,next:h}=a.next[u];
vendor: 11,795 bytes, lines 784-785
784if(!(d.isText||d.hasRequiredAttrs())&&s.indexOf(h)==-1){s.push(h);let p=i(h,l.concat(d));if(p)return p}}return null}return i(this,[])}findWrapping(e){for(let n=0;n<this.wrapCache.length;n+=2)if(this.wrapCache[n]==e)return this.wrapCache[n+1];let r=this.computeWrapping(e);return this.wrapCache.push(e,r),r}computeWrapping(e){let r=Object.create(null),n=[{match:this,type:null,via:null}];for(;n.length;){let s=n.shift(),i=s.match;if(i.matchType(e)){let a=[];for(let l=s;l.type;l=l.via)a.push(l.type);return a.reverse()}for(let a=0;a<i.next.length;a++){let{type:l,next:c}=i.next[a];!l.isLeaf&&!l.hasRequiredAttrs()&&!(l.name in r)&&(!s.type||c.validEnd)&&(n.push({match:l.contentMatch,type:l,via:s}),r[l.name]=!0)}}return null}get edgeCount(){return this.next.length}edge(e){if(e>=this.next.length)throw new RangeError(`There's no ${e}th edge in this content match`);return this.next[e]}toString(){let e=[];function r(n){e.push(n);for(let s=0;s<n.next.length;s++)e.indexOf(n.next[s].next)==-1&&r(n.next[s].next)}return r(this),e.map((n,s)=>{let i=s+(n.validEnd?"*":" ")+" ";for(let a=0;a<n.next.length;a++)i+=(a?", ":"")+n.next[a].type.name+"->"+e.indexOf(n.next[a].next);return i}).join(`
785`)}}mc.empty=new mc(!0);class hoe{constructor(e,r){this.string=e,this.nodeTypes=r,this.inline=null,this.pos=0,this.tokens=e.split(/\s*(?=\b|\W|$)/),this.tokens[this.tokens.length-1]==""&&this.tokens.pop(),this.tokens[0]==""&&this.tokens.shift()}get next(){return this.tokens[this.pos]}eat(e){return this.next==e&&(this.pos++||!0)}err(e){throw new SyntaxError(e+" (in content expression '"+this.string+"')")}}function oR(t){let e=[];do e.push(poe(t));while(t.eat("|"));return e.length==1?e[0]:{type:"choice",exprs:e}}function poe(t){let e=[];do e.push(foe(t));while(t.next&&t.next!=")"&&t.next!="|");return e.length==1?e[0]:{type:"seq",exprs:e}}function foe(t){let e=yoe(t);for(;;)if(t.eat("+"))e={type:"plus",expr:e};else if(t.eat("*"))e={type:"star",expr:e};else if(t.eat("?"))e={type:"opt",expr:e};else if(t.eat("{"))e=moe(t,e);else break;return e}function LE(t){/\D/.test(t.next)&&t.err("Expected number, got '"+t.next+"'");let e=Number(t.next);return t.pos++,e}function moe(t,e){let r=LE(t),n=r;return t.eat(",")&&(t.next!="}"?n=LE(t):n=-1),t.eat("}")||t.err("Unclosed braced range"),{type:"range",min:r,max:n,expr:e}}function goe(t,e){let r=t.nodeTypes,n=r[e];if(n)return[n];let s=[];for(let i in r){let a=r[i];a.isInGroup(e)&&s.push(a)}return s.length==0&&t.err("No node type or group '"+e+"' found"),s}function yoe(t){if(t.eat("(")){let e=oR(t);return t.eat(")")||t.err("Missing closing paren"),e}else if(/\W/.test(t.next))t.err("Unexpected token '"+t.next+"'");else{let e=goe(t,t.next).map(r=>(t.inline==null?t.inline=r.isInline:t.inline!=r.isInline&&t.err("Mixing inline and block content"),{type:"name",value:r}));return t.pos++,e.length==1?e[0]:{type:"choice",exprs:e}}}function xoe(t){let e=[[]];return s(i(t,0),r()),e;function r(){return e.push([])-1}function n(a,l,c){let u={term:c,to:l};return e[a].push(u),u}function s(a,l){a.forEach(c=>c.to=l)}function i(a,l){if(a.type=="choice")return a.exprs.reduce((c,u)=>c.concat(i(u,l)),[]);if(a.type=="seq")for(let c=0;;c++){let u=i(a.exprs[c],l);if(c==a.exprs.length-1)return u;s(u,l=r())}else if(a.type=="star"){let c=r();return n(l,c),s(i(a.expr,c),c),[n(c)]}else if(a.type=="plus"){let c=r();return s(i(a.expr,l),c),s(i(a.expr,c),c),[n(c)]}else{if(a.type=="opt")return[n(l)].concat(i(a.expr,l));if(a.type=="range"){let c=l;for(let u=0;u<a.min;u++){let d=r();s(i(a.expr,c),d),c=d}if(a.max==-1)s(i(a.expr,c),c);else for(let u=a.min;u<a.max;u++){let d=r();n(c,d),s(i(a.expr,c),d),c=d}return[n(c)]}else{if(a.type=="name")return[n(l,void 0,a.value)];throw new Error("Unknown expr type")}}}}function lR(t,e){return e-t}function ME(t,e){let r=[];return n(e),r.sort(lR);function n(s){let i=t[s];if(i.length==1&&!i[0].term)return n(i[0].to);r.push(s);for(let a=0;a<i.length;a++){let{term:l,to:c}=i[a];!l&&r.indexOf(c)==-1&&n(c)}}}function woe(t){let e=Object.create(null);return r(ME(t,0));function r(n){let s=[];n.forEach(a=>{t[a].forEach(({term:l,to:c})=>{if(!l)return;let u;for(let d=0;d<s.length;d++)s[d][0]==l&&(u=s[d][1]);ME(t,c).forEach(d=>{u||s.push([l,u=[]]),u.indexOf(d)==-1&&u.push(d)})})});let i=e[n.join(",")]=new mc(n.indexOf(t.length-1)>-1);for(let a=0;a<s.length;a++){let l=s[a][1].sort(lR);i.next.push({type:s[a][0],next:e[l.join(",")]||r(l)})}return i}}function boe(t,e){for(let r=0,n=[t];r<n.length;r++){let s=n[r],i=!s.validEnd,a=[];for(let l=0;l<s.next.length;l++){let{type:c,next:u}=s.next[l];a.push(c.name),i&&!(c.isText||c.hasRequiredAttrs())&&(i=!1),n.indexOf(u)==-1&&n.push(u)}i&&e.err("Only non-generatable nodes ("+a.join(", ")+") in a required position (see https://prosemirror.net/docs/guide/#generatable)")}}function cR(t){let e=Object.create(null);for(let r in t){let n=t[r];if(!n.hasDefault)return null;e[r]=n.default}return e}function uR(t,e){let r=Object.create(null);for(let n in t){let s=e&&e[n];if(s===void 0){let i=t[n];if(i.hasDefault)s=i.default;else throw new RangeError("No value supplied for attribute "+n)}r[n]=s}return r}function dR(t,e,r,n){for(let s in e)if(!(s in t))throw new RangeError(`Unsupported attribute ${s} for ${r} of type ${s}`);for(let s in t){let i=t[s];i.validate&&i.validate(e[s])}}function hR(t,e){let r=Object.create(null);if(e)for(let n in e)r[n]=new voe(t,n,e[n]);return r}let DE=class pR{constructor(e,r,n){this.name=e,this.schema=r,this.spec=n,this.markSet=null,this.groups=n.group?n.group.split(" "):[],this.attrs=hR(e,n.attrs),this.defaultAttrs=cR(this.attrs),this.contentMatch=null,this.inlineContent=null,this.isBlock=!(n.inline||e=="text"),this.isText=e=="text"}get isInline(){return!this.isBlock}get isTextblock(){return this.isBlock&&this.inlineContent}get isLeaf(){return this.contentMatch==mc.empty}get isAtom(){return this.isLeaf||!!this.spec.atom}isInGroup(e){return this.groups.indexOf(e)>-1}get whitespace(){return this.spec.whitespace||(this.spec.code?"pre":"normal")}hasRequiredAttrs(){for(let e in this.attrs)if(this.attrs[e].isRequired)return!0;return!1}compatibleContent(e){return this==e||this.contentMatch.compatible(e.contentMatch)}computeAttrs(e){return!e&&this.defaultAttrs?this.defaultAttrs:uR(this.attrs,e)}create(e=null,r,n){if(this.isText)throw new Error("NodeType.create can't construct text nodes");return new Co(this,this.computeAttrs(e),Se.from(r),At.setFrom(n))}createChecked(e=null,r,n){return r=Se.from(r),this.checkContent(r),new Co(this,this.computeAttrs(e),r,At.setFrom(n))}createAndFill(e=null,r,n){if(e=this.computeAttrs(e),r=Se.from(r),r.size){let a=this.contentMatch.fillBefore(r);if(!a)return null;r=a.append(r)}let s=this.contentMatch.matchFragment(r),i=s&&s.fillBefore(Se.empty,!0);return i?new Co(this,e,r.append(i),At.setFrom(n)):null}validContent(e){let r=this.contentMatch.matchFragment(e);if(!r||!r.validEnd)return!1;for(let n=0;n<e.childCount;n++)if(!this.allowsMarks(e.child(n).marks))return!1;return!0}checkContent(e){if(!this.validContent(e))throw new RangeError(`Invalid content for node ${this.name}: ${e.toString().slice(0,50)}`)}checkAttrs(e){dR(this.attrs,e,"node",this.name)}allowsMarkType(e){return this.markSet==null||this.markSet.indexOf(e)>-1}allowsMarks(e){if(this.markSet==null)return!0;for(let r=0;r<e.length;r++)if(!this.allowsMarkType(e[r].type))return!1;return!0}allowedMarks(e){if(this.markSet==null)return e;let r;for(let n=0;n<e.length;n++)this.allowsMarkType(e[n].type)?r&&r.push(e[n]):r||(r=e.slice(0,n));return r?r.length?r:At.none:e}static compile(e,r){let n=Object.create(null);e.forEach((i,a)=>n[i]=new pR(i,r,a));let s=r.spec.topNode||"doc";if(!n[s])throw new RangeError("Schema is missing its top node type ('"+s+"')");if(!n.text)throw new RangeError("Every schema needs a 'text' type");for(let i in n.text.attrs)throw new RangeError("The text node type should not have attributes");return n}};function koe(t,e,r){let n=r.split("|");return s=>{let i=s===null?"null":typeof s;if(n.indexOf(i)<0)throw new RangeError(`Expected value of type ${n} for attribute ${e} on type ${t}, got ${i}`)}}class voe{constructor(e,r,n){this.hasDefault=Object.prototype.hasOwnProperty.call(n,"default"),this.default=n.default,this.validate=typeof n.validate=="string"?koe(e,r,n.validate):n.validate}get isRequired(){return!this.hasDefault}}class Ky{constructor(e,r,n,s){this.name=e,this.rank=r,this.schema=n,this.spec=s,this.attrs=hR(e,s.attrs),this.excluded=null;let i=cR(this.attrs);this.instance=i?new At(this,i):null}create(e=null){return!e&&this.instance?this.instance:new At(this,uR(this.attrs,e))}static compile(e,r){let n=Object.create(null),s=0;return e.forEach((i,a)=>n[i]=new Ky(i,s++,r,a)),n}removeFromSet(e){for(var r=0;r<e.length;r++)e[r].type==this&&(e=e.slice(0,r).concat(e.slice(r+1)),r--);return e}isInSet(e){for(let r=0;r<e.length;r++)if(e[r].type==this)return e[r]}checkAttrs(e){dR(this.attrs,e,"mark",this.name)}excludes(e){return this.excluded.indexOf(e)>-1}}class fR{constructor(e){this.linebreakReplacement=null,this.cached=Object.create(null);let r=this.spec={};for(let s in e)r[s]=e[s];r.nodes=Dr.from(e.nodes),r.marks=Dr.from(e.marks||{}),this.nodes=DE.compile(this.spec.nodes,this),this.marks=Ky.compile(this.spec.marks,this);let n=Object.create(null);for(let s in this.nodes){if(s in this.marks)throw new RangeError(s+" can not be both a node and a mark");let i=this.nodes[s],a=i.spec.content||"",l=i.spec.marks;if(i.contentMatch=n[a]||(n[a]=mc.parse(a,this.nodes)),i.inlineContent=i.contentMatch.inlineContent,i.spec.linebreakReplacement){if(this.linebreakReplacement)throw new RangeError("Multiple linebreak nodes defined");if(!i.isInline||!i.isLeaf)throw new RangeError("Linebreak replacement nodes must be inline leaf nodes");this.linebreakReplacement=i}i.markSet=l=="_"?null:l?FE(this,l.split(" ")):l==""||!i.inlineContent?[]:null}for(let s in this.marks){let i=this.marks[s],a=i.spec.excludes;i.excluded=a==null?[i]:a==""?[]:FE(this,a.split(" "))}this.nodeFromJSON=s=>Co.fromJSON(this,s),this.markFromJSON=s=>At.fromJSON(this,s),this.topNodeType=this.nodes[this.spec.topNode||"doc"],this.cached.wrappings=Object.create(null)}node(e,r=null,n,s){if(typeof e=="string")e=this.nodeType(e);else if(e instanceof DE){if(e.schema!=this)throw new RangeError("Node type from different schema used ("+e.name+")")}else throw new RangeError("Invalid node type: "+e);return e.createChecked(r,n,s)}text(e,r){let n=this.nodes.text;return new lg(n,n.defaultAttrs,e,At.setFrom(r))}mark(e,r){return typeof e=="string"&&(e=this.marks[e]),e.create(r)}nodeType(e){let r=this.nodes[e];if(!r)throw new RangeError("Unknown node type: "+e);return r}}function FE(t,e){let r=[];for(let n=0;n<e.length;n++){let s=e[n],i=t.marks[s],a=i;if(i)r.push(i);else for(let l in t.marks){let c=t.marks[l];(s=="_"||c.spec.group&&c.spec.group.split(" ").indexOf(s)>-1)&&r.push(a=c)}if(!a)throw new SyntaxError("Unknown mark type: '"+e[n]+"'")}return r}function joe(t){return t.tag!=null}function Soe(t){return t.style!=null}class Eo{constructor(e,r){this.schema=e,this.rules=r,this.tags=[],this.styles=[];let n=this.matchedStyles=[];r.forEach(s=>{if(joe(s))this.tags.push(s);else if(Soe(s)){let i=/[^=]*/.exec(s.style)[0];n.indexOf(i)<0&&n.push(i),this.styles.push(s)}}),this.normalizeLists=!this.tags.some(s=>{if(!/^(ul|ol)\b/.test(s.tag)||!s.node)return!1;let i=e.nodes[s.node];return i.contentMatch.matchType(i)})}parse(e,r={}){let n=new $E(this,r,!1);return n.addAll(e,At.none,r.from,r.to),n.finish()}parseSlice(e,r={}){let n=new $E(this,r,!0);return n.addAll(e,At.none,r.from,r.to),Ie.maxOpen(n.finish())}matchTag(e,r,n){for(let s=n?this.tags.indexOf(n)+1:0;s<this.tags.length;s++){let i=this.tags[s];if(Eoe(e,i.tag)&&(i.namespace===void 0||e.namespaceURI==i.namespace)&&(!i.context||r.matchesContext(i.context))){if(i.getAttrs
vendor: 4,065 bytes, lines 785-786
785){let a=i.getAttrs(e);if(a===!1)continue;i.attrs=a||void 0}return i}}}matchStyle(e,r,n,s){for(let i=s?this.styles.indexOf(s)+1:0;i<this.styles.length;i++){let a=this.styles[i],l=a.style;if(!(l.indexOf(e)!=0||a.context&&!n.matchesContext(a.context)||l.length>e.length&&(l.charCodeAt(e.length)!=61||l.slice(e.length+1)!=r))){if(a.getAttrs){let c=a.getAttrs(r);if(c===!1)continue;a.attrs=c||void 0}return a}}}static schemaRules(e){let r=[];function n(s){let i=s.priority==null?50:s.priority,a=0;for(;a<r.length;a++){let l=r[a];if((l.priority==null?50:l.priority)<i)break}r.splice(a,0,s)}for(let s in e.marks){let i=e.marks[s].spec.parseDOM;i&&i.forEach(a=>{n(a=UE(a)),a.mark||a.ignore||a.clearMark||(a.mark=s)})}for(let s in e.nodes){let i=e.nodes[s].spec.parseDOM;i&&i.forEach(a=>{n(a=UE(a)),a.node||a.ignore||a.mark||(a.node=s)})}return r}static fromSchema(e){return e.cached.domParser||(e.cached.domParser=new Eo(e,Eo.schemaRules(e)))}}const mR={address:!0,article:!0,aside:!0,blockquote:!0,canvas:!0,dd:!0,div:!0,dl:!0,fieldset:!0,figcaption:!0,figure:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,li:!0,noscript:!0,ol:!0,output:!0,p:!0,pre:!0,section:!0,table:!0,tfoot:!0,ul:!0},Noe={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},gR={ol:!0,ul:!0},Rp=1,Wv=2,Vh=4;function BE(t,e,r){return e!=null?(e?Rp:0)|(e==="full"?Wv:0):t&&t.whitespace=="pre"?Rp|Wv:r&~Vh}class hm{constructor(e,r,n,s,i,a){this.type=e,this.attrs=r,this.marks=n,this.solid=s,this.options=a,this.content=[],this.activeMarks=At.none,this.match=i||(a&Vh?null:e.contentMatch)}findWrapping(e){if(!this.match){if(!this.type)return[];let r=this.type.contentMatch.fillBefore(Se.from(e));if(r)this.match=this.type.contentMatch.matchFragment(r);else{let n=this.type.contentMatch,s;return(s=n.findWrapping(e.type))?(this.match=n,s):null}}return this.match.findWrapping(e.type)}finish(e){if(!(this.options&Rp)){let n=this.content[this.content.length-1],s;if(n&&n.isText&&(s=/[ \t\r\n\u000c]+$/.exec(n.text))){let i=n;n.text.length==s[0].length?this.content.pop():this.content[this.content.length-1]=i.withText(i.text.slice(0,i.text.length-s[0].length))}}let r=Se.from(this.content);return!e&&this.match&&(r=r.append(this.match.fillBefore(Se.empty,!0))),this.type?this.type.create(this.attrs,r,this.marks):r}inlineContext(e){return this.type?this.type.inlineContent:this.content.length?this.content[0].isInline:e.parentNode&&!mR.hasOwnProperty(e.parentNode.nodeName.toLowerCase())}}class $E{constructor(e,r,n){this.parser=e,this.options=r,this.isOpen=n,this.open=0,this.localPreserveWS=!1;let s=r.topNode,i,a=BE(null,r.preserveWhitespace,0)|(n?Vh:0);s?i=new hm(s.type,s.attrs,At.none,!0,r.topMatch||s.type.contentMatch,a):n?i=new hm(null,null,At.none,!0,null,a):i=new hm(e.schema.topNodeType,null,At.none,!0,null,a),this.nodes=[i],this.find=r.findPositions,this.needsBlock=!1}get top(){return this.nodes[this.open]}addDOM(e,r){e.nodeType==3?this.addTextNode(e,r):e.nodeType==1&&this.addElement(e,r)}addTextNode(e,r){let n=e.nodeValue,s=this.top,i=s.options&Wv?"full":this.localPreserveWS||(s.options&Rp)>0,{schema:a}=this.parser;if(i==="full"||s.inlineContext(e)||/[^ \t\r\n\u000c]/.test(n)){if(i)if(i==="full")n=n.replace(/\r\n?/g,`
786`);else if(a.linebreakReplacement&&/[\r\n]/.test(n)&&this.top.findWrapping(a.linebreakReplacement.create())){let l=n.split(/\r?\n|\r/);for(let c=0;c<l.length;c++)c&&this.insertNode(a.linebreakReplacement.create(),r,!0),l[c]&&this.insertNode(a.text(l[c]),r,!/\S/.test(l[c]));n=""}else n=n.replace(/\r?\n|\r/g," ");else if(n=n.replace(/[ \t\r\n\u000c]+/g," "),/^[ \t\r\n\u000c]/.test(n)&&this.open==this.nodes.length-1){let l=s.content[s.content.length-1],c=e.previousSibling;(!l||c&&c.nodeName=="BR"||l.isText&&/[ \t\r\n\u000c]$/.test(l.text))&&(n=n.slice(1))}n&&this.insertNode(a.text(n),r,!/\S/.test(n)),this.findInText(e)}else this.findInside(e)}addElement(e,r,n){let s=this.localPreserveWS,i=this.top;(e.tagName=="PRE"||/pre/.test(e.style&&e.style.whiteSpace))&&(this.localPreserveWS=!0);let a=e.nodeName.toLowerCase(),l;
vendor: 5,487 bytes, lines 786-787
786gR.hasOwnProperty(a)&&this.parser.normalizeLists&&Coe(e);let c=this.options.ruleFromNode&&this.options.ruleFromNode(e)||(l=this.parser.matchTag(e,this,n));e:if(c?c.ignore:Noe.hasOwnProperty(a))this.findInside(e),this.ignoreFallback(e,r);else if(!c||c.skip||c.closeParent){c&&c.closeParent?this.open=Math.max(0,this.open-1):c&&c.skip.nodeType&&(e=c.skip);let u,d=this.needsBlock;if(mR.hasOwnProperty(a))i.content.length&&i.content[0].isInline&&this.open&&(this.open--,i=this.top),u=!0,i.type||(this.needsBlock=!0);else if(!e.firstChild){this.leafFallback(e,r);break e}let h=c&&c.skip?r:this.readStyles(e,r);h&&this.addAll(e,h),u&&this.sync(i),this.needsBlock=d}else{let u=this.readStyles(e,r);u&&this.addElementByRule(e,c,u,c.consuming===!1?l:void 0)}this.localPreserveWS=s}leafFallback(e,r){e.nodeName=="BR"&&this.top.type&&this.top.type.inlineContent&&this.addTextNode(e.ownerDocument.createTextNode(`
787`),r)}ignoreFallback(e,r){e.nodeName=="BR"&&(!this.top.type||!this.top.type.inlineContent)&&this.findPlace(this.parser.schema.text("-"),r,!0)}readStyles(e,r){let n=e.style;if(n&&n.length)for(let s=0;s<this.parser.matchedStyles.length;s++){let i=this.parser.matchedStyles[s],a=n.getPropertyValue(i);if(a)for(let l=void 0;;){let c=this.parser.matchStyle(i,a,this,l);if(!c)break;if(c.ignore)return null;if(c.clearMark?r=r.filter(u=>!c.clearMark(u)):r=r.concat(this.parser.schema.marks[c.mark].create(c.attrs)),c.consuming===!1)l=c;else break}}return r}addElementByRule(e,r,n,s){let i,a;if(r.node)if(a=this.parser.schema.nodes[r.node],a.isLeaf)this.insertNode(a.create(r.attrs),n,e.nodeName=="BR")||this.leafFallback(e,n);else{let c=this.enter(a,r.attrs||null,n,r.preserveWhitespace);c&&(i=!0,n=c)}else{let c=this.parser.schema.marks[r.mark];n=n.concat(c.create(r.attrs))}let l=this.top;if(a&&a.isLeaf)this.findInside(e);else if(s)this.addElement(e,n,s);else if(r.getContent)this.findInside(e),r.getContent(e,this.parser.schema).forEach(c=>this.insertNode(c,n,!1));else{let c=e;typeof r.contentElement=="string"?c=e.querySelector(r.contentElement):typeof r.contentElement=="function"?c=r.contentElement(e):r.contentElement&&(c=r.contentElement),this.findAround(e,c,!0),this.addAll(c,n),this.findAround(e,c,!1)}i&&this.sync(l)&&this.open--}addAll(e,r,n,s){let i=n||0;for(let a=n?e.childNodes[n]:e.firstChild,l=s==null?null:e.childNodes[s];a!=l;a=a.nextSibling,++i)this.findAtPoint(e,i),this.addDOM(a,r);this.findAtPoint(e,i)}findPlace(e,r,n){let s,i;for(let a=this.open,l=0;a>=0;a--){let c=this.nodes[a],u=c.findWrapping(e);if(u&&(!s||s.length>u.length+l)&&(s=u,i=c,!u.length))break;if(c.solid){if(n)break;l+=2}}if(!s)return null;this.sync(i);for(let a=0;a<s.length;a++)r=this.enterInner(s[a],null,r,!1);return r}insertNode(e,r,n){if(e.isInline&&this.needsBlock&&!this.top.type){let i=this.textblockFromContext();i&&(r=this.enterInner(i,null,r))}let s=this.findPlace(e,r,n);if(s){this.closeExtra();let i=this.top;i.match&&(i.match=i.match.matchType(e.type));let a=At.none;for(let l of s.concat(e.marks))(i.type?i.type.allowsMarkType(l.type):WE(l.type,e.type))&&(a=l.addToSet(a));return i.content.push(e.mark(a)),!0}return!1}enter(e,r,n,s){let i=this.findPlace(e.create(r),n,!1);return i&&(i=this.enterInner(e,r,n,!0,s)),i}enterInner(e,r,n,s=!1,i){this.closeExtra();let a=this.top;a.match=a.match&&a.match.matchType(e);let l=BE(e,i,a.options);a.options&Vh&&a.content.length==0&&(l|=Vh);let c=At.none;return n=n.filter(u=>(a.type?a.type.allowsMarkType(u.type):WE(u.type,e))?(c=u.addToSet(c),!1):!0),this.nodes.push(new hm(e,r,c,s,null,l)),this.open++,n}closeExtra(e=!1){let r=this.nodes.length-1;if(r>this.open){for(;r>this.open;r--)this.nodes[r-1].content.push(this.nodes[r].finish(e));this.nodes.length=this.open+1}}finish(){return this.open=0,this.closeExtra(this.isOpen),this.nodes[0].finish(!!(this.isOpen||this.options.topOpen))}sync(e){for(let r=this.open;r>=0;r--){if(this.nodes[r]==e)return this.open=r,!0;this.localPreserveWS&&(this.nodes[r].options|=Rp)}return!1}get currentPos(){this.closeExtra();let e=0;for(let r=this.open;r>=0;r--){let n=this.nodes[r].content;for(let s=n.length-1;s>=0;s--)e+=n[s].nodeSize;r&&e++}return e}findAtPoint(e,r){if(this.find)for(let n=0;n<this.find.length;n++)this.find[n].node==e&&this.find[n].offset==r&&(this.find[n].pos=this.currentPos)}findInside(e){if(this.find)for(let r=0;r<this.find.length;r++)this.find[r].pos==null&&e.nodeType==1&&e.contains(this.find[r].node)&&(this.find[r].pos=this.currentPos)}findAround(e,r,n){if(e!=r&&this.find)for(let s=0;s<this.find.length;s++)this.find[s].pos==null&&e.nodeType==1&&e.contains(this.find[s].node)&&r.compareDocumentPosition(this.find[s].node)&(n?2:4)&&(this.find[s].pos=this.currentPos)}findInText(e){if(this.find)for(let r=0;r<this.find.length;r++)this.find[r].node==e&&(this.find[r].pos=this.currentPos-(e.nodeValue.length-this.find[r].offset))}matchesContext(e){if(e.indexOf("|")>-1)return e.split(/\s*\|\s*/).some(this.matchesContext,this);let r=e.split("/"),n=this.options.context,s=!this.isOpen&&(!n||n.parent.type==this.nodes[0].type),i=-(n?n.depth+1:0)+(s?0:1),a=(l,c)=>{for(;l>=0;l--){let u=r[l];if(u==""){if(l==r.length-1||l==0)continue;for(;c>=i;c--)if(a(l-1,c))return!0;return!1}else{let d=c>0||c==0&&s?this.nodes[c].type:n&&c>=i?n.node(c-i).type:null;if(!d||d.name!=u&&!d.isInGroup(u))return!1;c--}}return!0};return a(r.length-1,this.open)}textblockFromContext(){let e=this.options.context;if(e)for(let r=e.depth;r>=0;r--){let n=e.node(r).contentMatchAt(e.indexAfter(r)).defaultType;
vendor: 8,892 bytes, line 787
787if(n&&n.isTextblock&&n.defaultAttrs)return n}for(let r in this.parser.schema.nodes){let n=this.parser.schema.nodes[r];if(n.isTextblock&&n.defaultAttrs)return n}}}function Coe(t){for(let e=t.firstChild,r=null;e;e=e.nextSibling){let n=e.nodeType==1?e.nodeName.toLowerCase():null;n&&gR.hasOwnProperty(n)&&r?(r.appendChild(e),e=r):n=="li"?r=e:n&&(r=null)}}function Eoe(t,e){return(t.matches||t.msMatchesSelector||t.webkitMatchesSelector||t.mozMatchesSelector).call(t,e)}function UE(t){let e={};for(let r in t)e[r]=t[r];return e}function WE(t,e){let r=e.schema.nodes;for(let n in r){let s=r[n];if(!s.allowsMarkType(t))continue;let i=[],a=l=>{i.push(l);for(let c=0;c<l.edgeCount;c++){let{type:u,next:d}=l.edge(c);if(u==e||i.indexOf(d)<0&&a(d))return!0}};if(a(s.contentMatch))return!0}}class Nc{constructor(e,r){this.nodes=e,this.marks=r}serializeFragment(e,r={},n){n||(n=Cw(r).createDocumentFragment());let s=n,i=[];return e.forEach(a=>{if(i.length||a.marks.length){let l=0,c=0;for(;l<i.length&&c<a.marks.length;){let u=a.marks[c];if(!this.marks[u.type.name]){c++;continue}if(!u.eq(i[l][0])||u.type.spec.spanning===!1)break;l++,c++}for(;l<i.length;)s=i.pop()[1];for(;c<a.marks.length;){let u=a.marks[c++],d=this.serializeMark(u,a.isInline,r);d&&(i.push([u,s]),s.appendChild(d.dom),s=d.contentDOM||d.dom)}}s.appendChild(this.serializeNodeInner(a,r))}),n}serializeNodeInner(e,r){let{dom:n,contentDOM:s}=i0(Cw(r),this.nodes[e.type.name](e),null,e.attrs);if(s){if(e.isLeaf)throw new RangeError("Content hole not allowed in a leaf node spec");this.serializeFragment(e.content,r,s)}return n}serializeNode(e,r={}){let n=this.serializeNodeInner(e,r);for(let s=e.marks.length-1;s>=0;s--){let i=this.serializeMark(e.marks[s],e.isInline,r);i&&((i.contentDOM||i.dom).appendChild(n),n=i.dom)}return n}serializeMark(e,r,n={}){let s=this.marks[e.type.name];return s&&i0(Cw(n),s(e,r),null,e.attrs)}static renderSpec(e,r,n=null,s){return i0(e,r,n,s)}static fromSchema(e){return e.cached.domSerializer||(e.cached.domSerializer=new Nc(this.nodesFromSchema(e),this.marksFromSchema(e)))}static nodesFromSchema(e){let r=VE(e.nodes);return r.text||(r.text=n=>n.text),r}static marksFromSchema(e){return VE(e.marks)}}function VE(t){let e={};for(let r in t){let n=t[r].spec.toDOM;n&&(e[r]=n)}return e}function Cw(t){return t.document||window.document}const HE=new WeakMap;function Toe(t){let e=HE.get(t);return e===void 0&&HE.set(t,e=Aoe(t)),e}function Aoe(t){let e=null;function r(n){if(n&&typeof n=="object")if(Array.isArray(n))if(typeof n[0]=="string")e||(e=[]),e.push(n);else for(let s=0;s<n.length;s++)r(n[s]);else for(let s in n)r(n[s])}return r(t),e}function i0(t,e,r,n){if(typeof e=="string")return{dom:t.createTextNode(e)};if(e.nodeType!=null)return{dom:e};if(e.dom&&e.dom.nodeType!=null)return e;let s=e[0],i;if(typeof s!="string")throw new RangeError("Invalid array passed to renderSpec");if(n&&(i=Toe(n))&&i.indexOf(e)>-1)throw new RangeError("Using an array from an attribute object as a DOM spec. This may be an attempted cross site scripting attack.");let a=s.indexOf(" ");a>0&&(r=s.slice(0,a),s=s.slice(a+1));let l,c=r?t.createElementNS(r,s):t.createElement(s),u=e[1],d=1;if(u&&typeof u=="object"&&u.nodeType==null&&!Array.isArray(u)){d=2;for(let h in u)if(u[h]!=null){let p=h.indexOf(" ");p>0?c.setAttributeNS(h.slice(0,p),h.slice(p+1),u[h]):h=="style"&&c.style?c.style.cssText=u[h]:c.setAttribute(h,u[h])}}for(let h=d;h<e.length;h++){let p=e[h];if(p===0){if(h<e.length-1||h>d)throw new RangeError("Content hole must be the only child of its parent node");return{dom:c,contentDOM:c}}else{let{dom:f,contentDOM:m}=i0(t,p,r,n);if(c.appendChild(f),m){if(l)throw new RangeError("Multiple content holes");l=m}}}return{dom:c,contentDOM:l}}const yR=65535,xR=Math.pow(2,16);function zoe(t,e){return t+e*xR}function qE(t){return t&yR}function Poe(t){return(t-(t&yR))/xR}const wR=1,bR=2,a0=4,kR=8;class Vv{constructor(e,r,n){this.pos=e,this.delInfo=r,this.recover=n}get deleted(){return(this.delInfo&kR)>0}get deletedBefore(){return(this.delInfo&(wR|a0))>0}get deletedAfter(){return(this.delInfo&(bR|a0))>0}get deletedAcross(){return(this.delInfo&a0)>0}}class Vn{constructor(e,r=!1){if(this.ranges=e,this.inverted=r,!e.length&&Vn.empty)return Vn.empty}recover(e){let r=0,n=qE(e);if(!this.inverted)for(let s=0;s<n;s++)r+=this.ranges[s*3+2]-this.ranges[s*3+1];return this.ranges[n*3]+r+Poe(e)}mapResult(e,r=1){return this._map(e,r,!1)}map(e,r=1){return this._map(e,r,!0)}_map(e,r,n){let s=0,i=this.inverted?2:1,a=this.inverted?1:2;for(let l=0;l<this.ranges.length;l+=3){let c=this.ranges[l]-(this.inverted?s:0);if(c>e)break;let u=this.ranges[l+i],d=this.ranges[l+a],h=c+u;if(e<=h){let p=u?e==c?-1:e==h?1:r:r,f=c+s+(p<0?0:d);if(n)return f;let m=e==(r<0?c:h)?null:zoe(l/3,e-c),y=e==c?bR:e==h?wR:a0;return(r<0?e!=c:e!=h)&&(y|=kR),new Vv(f,y,m)}s+=d-u}return n?e+s:new Vv(e+s,0,null)}touches(e,r){let n=0,s=qE(r),i=this.inverted?2:1,a=this.inverted?1:2;for(let l=0;l<this.ranges.length;l+=3){let c=this.ranges[l]-(this.inverted?n:0);if(c>e)break;let u=this.ranges[l+i],d=c+u;if(e<=d&&l==s*3)return!0;n+=this.ranges[l+a]-u}return!1}forEach(e){let r=this.inverted?2:1,n=this.inverted?1:2;for(let s=0,i=0;s<this.ranges.length;s+=3){let a=this.ranges[s],l=a-(this.inverted?i:0),c=a+(this.inverted?0:i),u=this.ranges[s+r],d=this.ranges[s+n];e(l,l+u,c,c+d),i+=d-u}}invert(){return new Vn(this.ranges,!this.inverted)}toString(){return(this.inverted?"-":"")+JSON.stringify(this.ranges)}static offset(e){return e==0?Vn.empty:new Vn(e<0?[0,-e,0]:[0,0,e])}}Vn.empty=new Vn([]);class Lp{constructor(e,r,n=0,s=e?e.length:0){this.mirror=r,this.from=n,this.to=s,this._maps=e||[],this.ownData=!(e||r)}get maps(){return this._maps}slice(e=0,r=this.maps.length){return new Lp(this._maps,this.mirror,e,r)}appendMap(e,r){this.ownData||(this._maps=this._maps.slice(),this.mirror=this.mirror&&this.mirror.slice(),this.ownData=!0),this.to=this._maps.push(e),r!=null&&this.setMirror(this._maps.length-1,r)}appendMapping(e){for(let r=0,n=this._maps.length;r<e._maps.length;r++){let s=e.getMirror(r);this.appendMap(e._maps[r],s!=null&&s<r?n+s:void 0)}}getMirror(e){if(this.mirror){for(let r=0;r<this.mirror.length;r++)if(this.mirror[r]==e)return this.mirror[r+(r%2?-1:1)]}}setMirror(e,r){this.mirror||(this.mirror=[]),this.mirror.push(e,r)}appendMappingInverted(e){for(let r=e.maps.length-1,n=this._maps.length+e._maps.length;r>=0;r--){let s=e.getMirror(r);this.appendMap(e._maps[r].invert(),s!=null&&s>r?n-s-1:void 0)}}invert(){let e=new Lp;return e.appendMappingInverted(this),e}map(e,r=1){if(this.mirror)return this._map(e,r,!0);for(let n=this.from;n<this.to;n++)e=this._maps[n].map(e,r);return e}mapResult(e,r=1){return this._map(e,r,!1)}_map(e,r,n){let s=0;for(let i=this.from;i<this.to;i++){let a=this._maps[i],l=a.mapResult(e,r);if(l.recover!=null){let c=this.getMirror(i);if(c!=null&&c>i&&c<this.to){i=c,e=this._maps[c].recover(l.recover);continue}}s|=l.delInfo,e=l.pos}return n?e:new Vv(e,s,null)}}const Ew=Object.create(null);class tn{getMap(){return Vn.empty}merge(e){return null}static fromJSON(e,r){if(!r||!r.stepType)throw new RangeError("Invalid input for Step.fromJSON");let n=Ew[r.stepType];if(!n)throw new RangeError(`No step type ${r.stepType} defined`);return n.fromJSON(e,r)}static jsonID(e,r){if(e in Ew)throw new RangeError("Duplicate use of step JSON ID "+e);return Ew[e]=r,r.prototype.jsonID=e,r}}class fr{constructor(e,r){this.doc=e,this.failed=r}static ok(e){return new fr(e,null)}static fail(e){return new fr(null,e)}static fromReplace(e,r,n,s){try{return fr.ok(e.replace(r,n,s))}catch(i){if(i instanceof ig)return fr.fail(i.message);throw i}}}function DS(t,e,r){let n=[];for(let s=0;s<t.childCount;s++){let i=t.child(s);i.content.size&&(i=i.copy(DS(i.content,e,i))),i.isInline&&(i=e(i,r,s)),n.push(i)}return Se.fromArray(n)}class co extends tn{constructor(e,r,n){super(),this.from=e,this.to=r,this.mark=n}apply(e){let r=e.slice(this.from,this.to),n=e.resolve(this.from),s=n.node(n.sharedDepth(this.to)),i=new Ie(DS(r.content,(a,l)=>!a.isAtom||!l.type.allowsMarkType(this.mark.type)?a:a.mark(this.mark.addToSet(a.marks)),s),r.openStart,r.openEnd);return fr.fromReplace(e,this.from,this.to,i)}invert(){return new $s(this.from,this.to,this.mark)}map(e){let r=e.mapResult(this.from,1),n=e.mapResult(this.to,-1);return r.deleted&&n.deleted||r.pos>=n.pos?null:new co(r.pos,n.pos,this.mark)}merge(e){return e instanceof co&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new co(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark):null}toJSON(){return{stepType:"addMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(e,r){if(typeof r.from!="number"||typeof r.to!="number")throw new RangeError("Invalid input for AddMarkStep.fromJSON");return new co(r.from,r.to,e.markFromJSON(r.mark))}}tn.jsonID("addMark",co);class $s extends tn{constructor(e,r,n){super(),this.from=e,this.to=r,this.mark=n}
vendor: 6,492 bytes, line 787
787apply(e){let r=e.slice(this.from,this.to),n=new Ie(DS(r.content,s=>s.mark(this.mark.removeFromSet(s.marks)),e),r.openStart,r.openEnd);return fr.fromReplace(e,this.from,this.to,n)}invert(){return new co(this.from,this.to,this.mark)}map(e){let r=e.mapResult(this.from,1),n=e.mapResult(this.to,-1);return r.deleted&&n.deleted||r.pos>=n.pos?null:new $s(r.pos,n.pos,this.mark)}merge(e){return e instanceof $s&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new $s(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark):null}toJSON(){return{stepType:"removeMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(e,r){if(typeof r.from!="number"||typeof r.to!="number")throw new RangeError("Invalid input for RemoveMarkStep.fromJSON");return new $s(r.from,r.to,e.markFromJSON(r.mark))}}tn.jsonID("removeMark",$s);class uo extends tn{constructor(e,r){super(),this.pos=e,this.mark=r}apply(e){let r=e.nodeAt(this.pos);if(!r)return fr.fail("No node at mark step's position");let n=r.type.create(r.attrs,null,this.mark.addToSet(r.marks));return fr.fromReplace(e,this.pos,this.pos+1,new Ie(Se.from(n),0,r.isLeaf?0:1))}invert(e){let r=e.nodeAt(this.pos);if(r){let n=this.mark.addToSet(r.marks);if(n.length==r.marks.length){for(let s=0;s<r.marks.length;s++)if(!r.marks[s].isInSet(n))return new uo(this.pos,r.marks[s]);return new uo(this.pos,this.mark)}}return new gc(this.pos,this.mark)}map(e){let r=e.mapResult(this.pos,1);return r.deletedAfter?null:new uo(r.pos,this.mark)}toJSON(){return{stepType:"addNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(e,r){if(typeof r.pos!="number")throw new RangeError("Invalid input for AddNodeMarkStep.fromJSON");return new uo(r.pos,e.markFromJSON(r.mark))}}tn.jsonID("addNodeMark",uo);class gc extends tn{constructor(e,r){super(),this.pos=e,this.mark=r}apply(e){let r=e.nodeAt(this.pos);if(!r)return fr.fail("No node at mark step's position");let n=r.type.create(r.attrs,null,this.mark.removeFromSet(r.marks));return fr.fromReplace(e,this.pos,this.pos+1,new Ie(Se.from(n),0,r.isLeaf?0:1))}invert(e){let r=e.nodeAt(this.pos);return!r||!this.mark.isInSet(r.marks)?this:new uo(this.pos,this.mark)}map(e){let r=e.mapResult(this.pos,1);return r.deletedAfter?null:new gc(r.pos,this.mark)}toJSON(){return{stepType:"removeNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(e,r){if(typeof r.pos!="number")throw new RangeError("Invalid input for RemoveNodeMarkStep.fromJSON");return new gc(r.pos,e.markFromJSON(r.mark))}}tn.jsonID("removeNodeMark",gc);class Pr extends tn{constructor(e,r,n,s=!1){super(),this.from=e,this.to=r,this.slice=n,this.structure=s}apply(e){return this.structure&&Hv(e,this.from,this.to)?fr.fail("Structure replace would overwrite content"):fr.fromReplace(e,this.from,this.to,this.slice)}getMap(){return new Vn([this.from,this.to-this.from,this.slice.size])}invert(e){return new Pr(this.from,this.from+this.slice.size,e.slice(this.from,this.to))}map(e){let r=e.mapResult(this.from,1),n=e.mapResult(this.to,-1);return r.deletedAcross&&n.deletedAcross?null:new Pr(r.pos,Math.max(r.pos,n.pos),this.slice,this.structure)}merge(e){if(!(e instanceof Pr)||e.structure||this.structure)return null;if(this.from+this.slice.size==e.from&&!this.slice.openEnd&&!e.slice.openStart){let r=this.slice.size+e.slice.size==0?Ie.empty:new Ie(this.slice.content.append(e.slice.content),this.slice.openStart,e.slice.openEnd);return new Pr(this.from,this.to+(e.to-e.from),r,this.structure)}else if(e.to==this.from&&!this.slice.openStart&&!e.slice.openEnd){let r=this.slice.size+e.slice.size==0?Ie.empty:new Ie(e.slice.content.append(this.slice.content),e.slice.openStart,this.slice.openEnd);return new Pr(e.from,this.to,r,this.structure)}else return null}toJSON(){let e={stepType:"replace",from:this.from,to:this.to};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e}static fromJSON(e,r){if(typeof r.from!="number"||typeof r.to!="number")throw new RangeError("Invalid input for ReplaceStep.fromJSON");return new Pr(r.from,r.to,Ie.fromJSON(e,r.slice),!!r.structure)}}tn.jsonID("replace",Pr);class Or extends tn{constructor(e,r,n,s,i,a,l=!1){super(),this.from=e,this.to=r,this.gapFrom=n,this.gapTo=s,this.slice=i,this.insert=a,this.structure=l}apply(e){if(this.structure&&(Hv(e,this.from,this.gapFrom)||Hv(e,this.gapTo,this.to)))return fr.fail("Structure gap-replace would overwrite content");let r=e.slice(this.gapFrom,this.gapTo);if(r.openStart||r.openEnd)return fr.fail("Gap is not a flat range");let n=this.slice.insertAt(this.insert,r.content);return n?fr.fromReplace(e,this.from,this.to,n):fr.fail("Content does not fit in gap")}getMap(){return new Vn([this.from,this.gapFrom-this.from,this.insert,this.gapTo,this.to-this.gapTo,this.slice.size-this.insert])}invert(e){let r=this.gapTo-this.gapFrom;return new Or(this.from,this.from+this.slice.size+r,this.from+this.insert,this.from+this.insert+r,e.slice(this.from,this.to).removeBetween(this.gapFrom-this.from,this.gapTo-this.from),this.gapFrom-this.from,this.structure)}map(e){let r=e.mapResult(this.from,1),n=e.mapResult(this.to,-1),s=this.from==this.gapFrom?r.pos:e.map(this.gapFrom,-1),i=this.to==this.gapTo?n.pos:e.map(this.gapTo,1);return r.deletedAcross&&n.deletedAcross||s<r.pos||i>n.pos?null:new Or(r.pos,n.pos,s,i,this.slice,this.insert,this.structure)}toJSON(){let e={stepType:"replaceAround",from:this.from,to:this.to,gapFrom:this.gapFrom,gapTo:this.gapTo,insert:this.insert};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e}static fromJSON(e,r){if(typeof r.from!="number"||typeof r.to!="number"||typeof r.gapFrom!="number"||typeof r.gapTo!="number"||typeof r.insert!="number")throw new RangeError("Invalid input for ReplaceAroundStep.fromJSON");return new Or(r.from,r.to,r.gapFrom,r.gapTo,Ie.fromJSON(e,r.slice),r.insert,!!r.structure)}}tn.jsonID("replaceAround",Or);function Hv(t,e,r){let n=t.resolve(e),s=r-e,i=n.depth;for(;s>0&&i>0&&n.indexAfter(i)==n.node(i).childCount;)i--,s--;if(s>0){let a=n.node(i).maybeChild(n.indexAfter(i));for(;s>0;){if(!a||a.isLeaf)return!0;a=a.firstChild,s--}}return!1}function _oe(t,e,r,n){let s=[],i=[],a,l;t.doc.nodesBetween(e,r,(c,u,d)=>{if(!c.isInline)return;let h=c.marks;if(!n.isInSet(h)&&d.type.allowsMarkType(n.type)){let p=Math.max(u,e),f=Math.min(u+c.nodeSize,r),m=n.addToSet(h);for(let y=0;y<h.length;y++)h[y].isInSet(m)||(a&&a.to==p&&a.mark.eq(h[y])?a.to=f:s.push(a=new $s(p,f,h[y])));l&&l.to==p?l.to=f:i.push(l=new co(p,f,n))}}
vendor: 17,073 bytes, lines 787-788
787),s.forEach(c=>t.step(c)),i.forEach(c=>t.step(c))}function Ioe(t,e,r,n){let s=[],i=0;t.doc.nodesBetween(e,r,(a,l)=>{if(!a.isInline)return;i++;let c=null;if(n instanceof Ky){let u=a.marks,d;for(;d=n.isInSet(u);)(c||(c=[])).push(d),u=d.removeFromSet(u)}else n?n.isInSet(a.marks)&&(c=[n]):c=a.marks;if(c&&c.length){let u=Math.min(l+a.nodeSize,r);for(let d=0;d<c.length;d++){let h=c[d],p;for(let f=0;f<s.length;f++){let m=s[f];m.step==i-1&&h.eq(s[f].style)&&(p=m)}p?(p.to=u,p.step=i):s.push({style:h,from:Math.max(l,e),to:u,step:i})}}}),s.forEach(a=>t.step(new $s(a.from,a.to,a.style)))}function FS(t,e,r,n=r.contentMatch,s=!0){let i=t.doc.nodeAt(e),a=[],l=e+1;for(let c=0;c<i.childCount;c++){let u=i.child(c),d=l+u.nodeSize,h=n.matchType(u.type);if(!h)a.push(new Pr(l,d,Ie.empty));else{n=h;for(let p=0;p<u.marks.length;p++)r.allowsMarkType(u.marks[p].type)||t.step(new $s(l,d,u.marks[p]));if(s&&u.isText&&r.whitespace!="pre"){let p,f=/\r?\n|\r/g,m;for(;p=f.exec(u.text);)m||(m=new Ie(Se.from(r.schema.text(" ",r.allowedMarks(u.marks))),0,0)),a.push(new Pr(l+p.index,l+p.index+p[0].length,m))}}l=d}if(!n.validEnd){let c=n.fillBefore(Se.empty,!0);t.replace(l,l,new Ie(c,0,0))}for(let c=a.length-1;c>=0;c--)t.step(a[c])}function Ooe(t,e,r){return(e==0||t.canReplace(e,t.childCount))&&(r==t.childCount||t.canReplace(0,r))}function Rd(t){let r=t.parent.content.cutByIndex(t.startIndex,t.endIndex);for(let n=t.depth;;--n){let s=t.$from.node(n),i=t.$from.index(n),a=t.$to.indexAfter(n);if(n<t.depth&&s.canReplace(i,a,r))return n;if(n==0||s.type.spec.isolating||!Ooe(s,i,a))break}return null}function Roe(t,e,r){let{$from:n,$to:s,depth:i}=e,a=n.before(i+1),l=s.after(i+1),c=a,u=l,d=Se.empty,h=0;for(let m=i,y=!1;m>r;m--)y||n.index(m)>0?(y=!0,d=Se.from(n.node(m).copy(d)),h++):c--;let p=Se.empty,f=0;for(let m=i,y=!1;m>r;m--)y||s.after(m+1)<s.end(m)?(y=!0,p=Se.from(s.node(m).copy(p)),f++):u++;t.step(new Or(c,u,a,l,new Ie(d.append(p),h,f),d.size-h,!0))}function BS(t,e,r=null,n=t){let s=Loe(t,e),i=s&&Moe(n,e);return i?s.map(KE).concat({type:e,attrs:r}).concat(i.map(KE)):null}function KE(t){return{type:t,attrs:null}}function Loe(t,e){let{parent:r,startIndex:n,endIndex:s}=t,i=r.contentMatchAt(n).findWrapping(e);if(!i)return null;let a=i.length?i[0]:e;return r.canReplaceWith(n,s,a)?i:null}function Moe(t,e){let{parent:r,startIndex:n,endIndex:s}=t,i=r.child(n),a=e.contentMatch.findWrapping(i.type);if(!a)return null;let c=(a.length?a[a.length-1]:e).contentMatch;for(let u=n;c&&u<s;u++)c=c.matchType(r.child(u).type);return!c||!c.validEnd?null:a}function Doe(t,e,r){let n=Se.empty;for(let a=r.length-1;a>=0;a--){if(n.size){let l=r[a].type.contentMatch.matchFragment(n);if(!l||!l.validEnd)throw new RangeError("Wrapper type given to Transform.wrap does not form valid content of its parent wrapper")}n=Se.from(r[a].type.create(r[a].attrs,n))}let s=e.start,i=e.end;t.step(new Or(s,i,s,i,new Ie(n,0,0),r.length,!0))}function Foe(t,e,r,n,s){if(!n.isTextblock)throw new RangeError("Type given to setBlockType should be a textblock");let i=t.steps.length;t.doc.nodesBetween(e,r,(a,l)=>{let c=typeof s=="function"?s(a):s;if(a.isTextblock&&!a.hasMarkup(n,c)&&Boe(t.doc,t.mapping.slice(i).map(l),n)){let u=null;if(n.schema.linebreakReplacement){let f=n.whitespace=="pre",m=!!n.contentMatch.matchType(n.schema.linebreakReplacement);f&&!m?u=!1:!f&&m&&(u=!0)}u===!1&&jR(t,a,l,i),FS(t,t.mapping.slice(i).map(l,1),n,void 0,u===null);let d=t.mapping.slice(i),h=d.map(l,1),p=d.map(l+a.nodeSize,1);return t.step(new Or(h,p,h+1,p-1,new Ie(Se.from(n.create(c,null,a.marks)),0,0),1,!0)),u===!0&&vR(t,a,l,i),!1}})}function vR(t,e,r,n){e.forEach((s,i)=>{if(s.isText){let a,l=/\r?\n|\r/g;for(;a=l.exec(s.text);){let c=t.mapping.slice(n).map(r+1+i+a.index);t.replaceWith(c,c+1,e.type.schema.linebreakReplacement.create())}}})}function jR(t,e,r,n){e.forEach((s,i)=>{if(s.type==s.type.schema.linebreakReplacement){let a=t.mapping.slice(n).map(r+1+i);t.replaceWith(a,a+1,e.type.schema.text(`
788`))}})}function Boe(t,e,r){let n=t.resolve(e),s=n.index();return n.parent.canReplaceWith(s,s+1,r)}function $oe(t,e,r,n,s){let i=t.doc.nodeAt(e);if(!i)throw new RangeError("No node at given position");r||(r=i.type);let a=r.create(n,null,s||i.marks);if(i.isLeaf)return t.replaceWith(e,e+i.nodeSize,a);if(!r.validContent(i.content))throw new RangeError("Invalid content for node type "+r.name);t.step(new Or(e,e+i.nodeSize,e+1,e+i.nodeSize-1,new Ie(Se.from(a),0,0),1,!0))}function oa(t,e,r=1,n){let s=t.resolve(e),i=s.depth-r,a=n&&n[n.length-1]||s.parent;if(i<0||s.parent.type.spec.isolating||!s.parent.canReplace(s.index(),s.parent.childCount)||!a.type.validContent(s.parent.content.cutByIndex(s.index(),s.parent.childCount)))return!1;for(let u=s.depth-1,d=r-2;u>i;u--,d--){let h=s.node(u),p=s.index(u);if(h.type.spec.isolating)return!1;let f=h.content.cutByIndex(p,h.childCount),m=n&&n[d+1];m&&(f=f.replaceChild(0,m.type.create(m.attrs)));let y=n&&n[d]||h;if(!h.canReplace(p+1,h.childCount)||!y.type.validContent(f))return!1}let l=s.indexAfter(i),c=n&&n[0];return s.node(i).canReplaceWith(l,l,c?c.type:s.node(i+1).type)}function Uoe(t,e,r=1,n){let s=t.doc.resolve(e),i=Se.empty,a=Se.empty;for(let l=s.depth,c=s.depth-r,u=r-1;l>c;l--,u--){i=Se.from(s.node(l).copy(i));let d=n&&n[u];a=Se.from(d?d.type.create(d.attrs,a):s.node(l).copy(a))}t.step(new Pr(e,e,new Ie(i.append(a),r,r),!0))}function Qo(t,e){let r=t.resolve(e),n=r.index();return SR(r.nodeBefore,r.nodeAfter)&&r.parent.canReplace(n,n+1)}function Woe(t,e){e.content.size||t.type.compatibleContent(e.type);let r=t.contentMatchAt(t.childCount),{linebreakReplacement:n}=t.type.schema;for(let s=0;s<e.childCount;s++){let i=e.child(s),a=i.type==n?t.type.schema.nodes.text:i.type;if(r=r.matchType(a),!r||!t.type.allowsMarks(i.marks))return!1}return r.validEnd}function SR(t,e){return!!(t&&e&&!t.isLeaf&&Woe(t,e))}function Gy(t,e,r=-1){let n=t.resolve(e);for(let s=n.depth;;s--){let i,a,l=n.index(s);if(s==n.depth?(i=n.nodeBefore,a=n.nodeAfter):r>0?(i=n.node(s+1),l++,a=n.node(s).maybeChild(l)):(i=n.node(s).maybeChild(l-1),a=n.node(s+1)),i&&!i.isTextblock&&SR(i,a)&&n.node(s).canReplace(l,l+1))return e;if(s==0)break;e=r<0?n.before(s):n.after(s)}}function Voe(t,e,r){let n=null,{linebreakReplacement:s}=t.doc.type.schema,i=t.doc.resolve(e-r),a=i.node().type;if(s&&a.inlineContent){let d=a.whitespace=="pre",h=!!a.contentMatch.matchType(s);d&&!h?n=!1:!d&&h&&(n=!0)}let l=t.steps.length;if(n===!1){let d=t.doc.resolve(e+r);jR(t,d.node(),d.before(),l)}a.inlineContent&&FS(t,e+r-1,a,i.node().contentMatchAt(i.index()),n==null);let c=t.mapping.slice(l),u=c.map(e-r);if(t.step(new Pr(u,c.map(e+r,-1),Ie.empty,!0)),n===!0){let d=t.doc.resolve(u);vR(t,d.node(),d.before(),t.steps.length)}return t}function Hoe(t,e,r){let n=t.resolve(e);if(n.parent.canReplaceWith(n.index(),n.index(),r))return e;if(n.parentOffset==0)for(let s=n.depth-1;s>=0;s--){let i=n.index(s);if(n.node(s).canReplaceWith(i,i,r))return n.before(s+1);if(i>0)return null}if(n.parentOffset==n.parent.content.size)for(let s=n.depth-1;s>=0;s--){let i=n.indexAfter(s);if(n.node(s).canReplaceWith(i,i,r))return n.after(s+1);if(i<n.node(s).childCount)return null}return null}function NR(t,e,r){let n=t.resolve(e);if(!r.content.size)return e;let s=r.content;for(let i=0;i<r.openStart;i++)s=s.firstChild.content;for(let i=1;i<=(r.openStart==0&&r.size?2:1);i++)for(let a=n.depth;a>=0;a--){let l=a==n.depth?0:n.pos<=(n.start(a+1)+n.end(a+1))/2?-1:1,c=n.index(a)+(l>0?1:0),u=n.node(a),d=!1;if(i==1)d=u.canReplace(c,c,s);else{let h=u.contentMatchAt(c).findWrapping(s.firstChild.type);d=h&&u.canReplaceWith(c,c,h[0])}if(d)return l==0?n.pos:l<0?n.before(a+1):n.after(a+1)}return null}function Zy(t,e,r=e,n=Ie.empty){if(e==r&&!n.size)return null;let s=t.resolve(e),i=t.resolve(r);return CR(s,i,n)?new Pr(e,r,n):new qoe(s,i,n).fit()}function CR(t,e,r){return!r.openStart&&!r.openEnd&&t.start()==e.start()&&t.parent.canReplace(t.index(),e.index(),r.content)}class qoe{constructor(e,r,n){this.$from=e,this.$to=r,this.unplaced=n,this.frontier=[],this.placed=Se.empty;for(let s=0;s<=e.depth;s++){let i=e.node(s);this.frontier.push({type:i.type,match:i.contentMatchAt(e.indexAfter(s))})}for(let s=e.depth;s>0;s--)this.placed=Se.from(e.node(s).copy(this.placed))}get depth(){return this.frontier.length-1}fit(){for(;this.unplaced.size;){let u=this.findFittable();u?this.placeNodes(u):this.openMore()||this.dropNode()}let e=this.mustMoveInline(),r=this.placed.size-this.depth-this.$from.depth,n=this.$from,s=this.close(e<0?this.$to:n.doc.resolve(e));if(!s)return null;let i=this.placed,a=n.depth,l=s.depth;for(;a&&l&&i.childCount==1;)i=i.firstChild.content,a--,l--;let c=new Ie(i,a,l);return e>-1?new Or(n.pos,e,this.$to.pos,this.$to.end(),c,r):c.size||n.pos!=this.$to.pos?new Pr(n.pos,s.pos,c):null}findFittable(){let e=this.unplaced.openStart;for(let r=this.unplaced.content,n=0,s=this.unplaced.openEnd;n<e;n++){let i=r.firstChild;if(r.childCount>1&&(s=0),i.type.spec.isolating&&s<=n){e=n;break}r=i.content}for(let r=1;r<=2;r++)for(let n=r==1?e:this.unplaced.openStart;n>=0;n--){let s,i=null;n?(i=Tw(this.unplaced.content,n-1).firstChild,s=i.content):s=this.unplaced.content;let a=s.firstChild;for(let l=this.depth;l>=0;l--){let{type:c,match:u}=this.frontier[l],d,h=null;if(r==1&&(a?u.matchType(a.type)||(h=u.fillBefore(Se.from(a),!1)):i&&c.compatibleContent(i.type)))return{sliceDepth:n,frontierDepth:l,parent:i,inject:h};if(r==2&&a&&(d=u.findWrapping(a.type)))return{sliceDepth:n,frontierDepth:l,parent:i,wrap:d};if(i&&u.matchType(i.type))break}}}openMore(){let{content:e,openStart:r,openEnd:n}=this.unplaced,s=Tw(e,r);return!s.childCount||s.firstChild.isLeaf?!1:(this.unplaced=new Ie(e,r+1,Math.max(n,s.size+r>=e.size-n?r+1:0)),!0)}dropNode(){let{content:e,openStart:r,openEnd:n}=this.unplaced,s=Tw(e,r);if(s.childCount<=1&&r>0){let i=e.size-r<=r+s.size;this.unplaced=new Ie(vh(e,r-1,1),r-1,i?r-1:n)}else this.unplaced=new Ie(vh(e,r,1),r,n)}placeNodes({sliceDepth:e,frontierDepth:r,parent:n,inject:s,wrap:i}){for(;this.depth>r;)this.closeFrontierNode();if(i)for(let y=0;y<i.length;y++)this.openFrontierNode(i[y]);let a=this.unplaced,l=n?n.content:a.content,c=a.openStart-e,u=0,d=[],{match:h,type:p}=this.frontier[r];if(s){for(let y=0;y<s.childCount;y++)d.push(s.child(y));h=h.matchFragment(s)}let f=l.size+e-(a.content.size-a.openEnd);for(;u<l.childCount;){let y=l.child(u),k=h.matchType(y.type);if(!k)break;u++,(u>1||c==0||y.content.size)&&(h=k,d.push(ER(y.mark(p.allowedMarks(y.marks)),u==1?c:0,u==l.childCount?f:-1)))}let m=u==l.childCount;m||(f=-1),this.placed=jh(this.placed,r,Se.from(d)),this.frontier[r].match=h,m&&f<0&&n&&n.type==this.frontier[this.depth].type&&this.frontier.length>1&&this.closeFrontierNode();for(let y=0,k=l;y<f;y++){let g=k.lastChild;this.frontier.push({type:g.type,match:g.contentMatchAt(g.childCount)}),k=g.content}this.unplaced=m?e==0?Ie.empty:new Ie(vh(a.content,e-1,1),e-1,f<0?a.openEnd:e-1):new Ie(vh(a.content,e,u),a.openStart,a.openEnd)}mustMoveInline(){if(!this.$to.parent.isTextblock)return-1;let e=this.frontier[this.depth],r;if(!e.type.isTextblock||!Aw(this.$to,this.$to.depth,e.type,e.match,!1)||this.$to.depth==this.depth&&(r=this.findCloseLevel(this.$to))&&r.depth==this.depth)return-1;let{depth:n}=this.$to,s=this.$to.after(n);for(;n>1&&s==this.$to.end(--n);)++s;return s}findCloseLevel(e){e:for(let r=Math.min(this.depth,e.depth);r>=0;r--){let{match:n,type:s}=this.frontier[r],i=r<e.depth&&e.end(r+1)==e.pos+(e.depth-(r+1)),a=Aw(e,r,s,n,i);if(a){for(let l=r-1;l>=0;l--){let{match:c,type:u}=this.frontier[l],d=Aw(e,l,u,c,!0);if(!d||d.childCount)continue e}return{depth:r,fit:a,move:i?e.doc.resolve(e.after(r+1)):e}}}}close(e){let r=this.findCloseLevel(e);if(!r)return null;for(;this.depth>r.depth;)this.closeFrontierNode();r.fit.childCount&&(this.placed=jh(this.placed,r.depth,r.fit)),e=r.move;for(let n=r.depth+1;n<=e.depth;n++){let s=e.node(n),i=s.type.contentMatch.fillBefore(s.content,!0,e.index(n));this.openFrontierNode(s.type,s.attrs,i)}return e}openFrontierNode(e,r=null,n){let s=this.frontier[this.depth];s.match=s.match.matchType(e),this.placed=jh(this.placed,this.depth,Se.from(e.create(r,n))),this.frontier.push({type:e,match:e.contentMatch})}closeFrontierNode(){let r=this.frontier.pop().match.fillBefore(Se.empty,!0);r.childCount&&(this.placed=jh(this.placed,this.frontier.length,r))}}function vh(t,e,r){return e==0?t.cutByIndex(r,t.childCount):t.replaceChild(0,t.firstChild.copy(vh(t.firstChild.content,e-1,r)))}function jh(t,e,r){return e==0?t.append(r):t.replaceChild(t.childCount-1,t.lastChild.copy(jh(t.lastChild.content,e-1,r)))}function Tw(t,e){for(let r=0;r<e;r++)t=t.firstChild.content;return t}function ER(t,e,r){if(e<=0)return t;let n=t.content;return e>1&&(n=n.replaceChild(0,ER(n.firstChild,e-1,n.childCount==1?r-1:0))),e>0&&(n=t.type.contentMatch.fillBefore(n).append(n),r<=0&&(n=n.append(t.type.contentMatch.matchFragment(n).fillBefore(Se.empty,!0)))),t.copy(n)}function Aw(t,e,r,n,s){let i=t.node(e),a=s?t.indexAfter(e):t.index(e);if(a==i.childCount&&!r.compatibleContent(i.type))return null;let l=n.fillBefore(i.content,!0,a);return l&&!Koe(r,i.content,a)?l:null}function Koe(t,e,r){for(let n=r;n<e.childCount;n++)if(!t.allowsMarks(e.child(n).marks))return!0;return!1}function Goe(t){return t.spec.defining||t.spec.definingForContent}function Zoe(t,e,r,n){if(!n.size)return t.deleteRange(e,r);let s=t.doc.resolve(e),i=t.doc.resolve(r);if(CR(s,i,n))return t.step(new Pr(e,r,n));let a=AR(s,t.doc.resolve(r));a[a.length-1]==0&&a.pop();let l=-(s.depth+1);a.unshift(l);for(let p=s.depth,f=s.pos-1;p>0;p--,f--){let m=s.node(p).type.spec;if(m.defining||m.definingAsContext||m.isolating)break;a.indexOf(p)>-1?l=p:s.before(p)==f&&a.splice(1,0,-p)}let c=a.indexOf(l),u=[],d=n.openStart;for(let p=n.content,f=0;;f++){let m=p.firstChild;if(u.push(m),f==n.openStart)break;p=m.content}for(let p=d-1;p>=0;p--){let f=u[p],m=Goe(f.type);if(m&&!f.sameMarkup(s.node(Math.abs(l)-1)))d=p;else if(m||!f.type.isTextblock)break}for(let p=n.openStart;p>=0;p--){let f=(p+d+1)%(n.openStart+1),m=u[f];if(m)for(let y=0;y<a.length;y++){let k=a[(y+c)%a.length],g=!0;k<0&&(g=!1,k=-k);let x=s.node(k-1),w=s.index(k-1);if(x.canReplaceWith(w,w,m.type,m.marks))return t.replace(s.before(k),g?i.after(k):r,new Ie(TR(n.content,0,n.openStart,f),f,n.openEnd))}}let h=t.steps.length;for(let p=a.length-1;p>=0&&(t.replace(e,r,n),!(t.steps.length>h));p--){let f=a[p];f<0||(e=s.before(f),r=i.after(f))}}function TR(t,e,r,n,s){if(e<r){let i=t.firstChild;t=t.replaceChild(0,i.copy(TR(i.content,e+1,r,n,i)))}if(e>n){let i=s.contentMatchAt(0),a=i.fillBefore(t).append(t);t=a.append(i.matchFragment(a).fillBefore(Se.empty,!0))}return t}function Yoe(t,e,r,n){if(!n.isInline&&e==r&&t.doc.resolve(e).parent.content.size){let s=Hoe(t.doc,e,n.type);s!=null&&(e=r=s)}t.replaceRange(e,r,new Ie(Se.from(n),0,0))}function Joe(t,e,r){let n=t.doc.resolve(e),s=t.doc.resolve(r),i=AR(n,s);for(let a=0;a<i.length;a++){let l=i[a],c=a==i.length-1;if(c&&l==0||n.node(l).type.contentMatch.validEnd)return t.delete(n.start(l),s.end(l));if(l>0&&(c||n.node(l-1).canReplace(n.index(l-1),s.indexAfter(l-1))))return t.delete(n.before(l),s.after(l))}for(let a=1;a<=n.depth&&a<=s.depth;a++)if(e-n.start(a)==n.depth-a&&r>n.end(a)&&s.end(a)-r!=s.depth-a&&n.start(a-1)==s.start(a-1)&&n.node(a-1).canReplace(n.index(a-1),s.index(a-1)))return t.delete(n.before(a),r);t.delete(e,r)}function AR(t,e){let r=[],n=Math.min(t.depth,e.depth);for(let s=n;s>=0;s--){let i=t.start(s);if(i<t.pos-(t.depth-s)||e.end(s)>e.pos+(e.depth-s)||t.node(s).type.spec.isolating||e.node(s).type.spec.isolating)break;(i==e.start(s)||s==t.depth&&s==e.depth&&t.parent.inlineContent&&e.parent.inlineContent&&s&&e.start(s-1)==i-1)&&r.push(s)}return r}class Su extends tn{constructor(e,r,n){super(),this.pos=e,this.attr=r,this.value=n}apply(e){let r=e.nodeAt(this.pos);if(!r)return fr.fail("No node at attribute step's position");let n=Object.create(null);for(let i in r.attrs)n[i]=r.attrs[i];n[this.attr]=this.value;let s=r.type.create(n,null,r.marks);return fr.fromReplace(e,this.pos,this.pos+1,new Ie(Se.from(s),0,r.isLeaf?0:1))}getMap(){return Vn.empty}invert(e){return new Su(this.pos,this.attr,e.nodeAt(this.pos).attrs[this.attr])}map(e){let r=e.mapResult(this.pos,1);return r.deletedAfter?null:new Su(r.pos,this.attr,this.value)}toJSON(){return{stepType:"attr",pos:this.pos,attr:this.attr,value:this.value}}static fromJSON(e,r){if(typeof r.pos!="number"||typeof r.attr!="string")throw new RangeError("Invalid input for AttrStep.fromJSON");return new Su(r.pos,r.attr,r.value)}}tn.jsonID("attr",Su);class Mp extends tn{constructor(e,r){super(),this.attr=e,this.value=r}apply(e){let r=Object.create(null);for(let s in e.attrs)r[s]=e.attrs[s];r[this.attr]=this.value;let n=e.type.create(r,e.content,e.marks);return fr.ok(n)}getMap(){return Vn.empty}invert(e){return new Mp(this.attr,e.attrs[this.attr])}map(e){return this}toJSON(){return{stepType:"docAttr",attr:this.attr,value:this.value}}static fromJSON(e,r){if(typeof r.attr!="string")throw new RangeError("Invalid input for DocAttrStep.fromJSON");return new Mp(r.attr,r.value)}}tn.jsonID("docAttr",Mp);
vendor: 4,189 bytes, line 788
788let nd=class extends Error{};nd=function t(e){let r=Error.call(this,e);return r.__proto__=t.prototype,r};nd.prototype=Object.create(Error.prototype);nd.prototype.constructor=nd;nd.prototype.name="TransformError";class zR{constructor(e){this.doc=e,this.steps=[],this.docs=[],this.mapping=new Lp}get before(){return this.docs.length?this.docs[0]:this.doc}step(e){let r=this.maybeStep(e);if(r.failed)throw new nd(r.failed);return this}maybeStep(e){let r=e.apply(this.doc);return r.failed||this.addStep(e,r.doc),r}get docChanged(){return this.steps.length>0}addStep(e,r){this.docs.push(this.doc),this.steps.push(e),this.mapping.appendMap(e.getMap()),this.doc=r}replace(e,r=e,n=Ie.empty){let s=Zy(this.doc,e,r,n);return s&&this.step(s),this}replaceWith(e,r,n){return this.replace(e,r,new Ie(Se.from(n),0,0))}delete(e,r){return this.replace(e,r,Ie.empty)}insert(e,r){return this.replaceWith(e,e,r)}replaceRange(e,r,n){return Zoe(this,e,r,n),this}replaceRangeWith(e,r,n){return Yoe(this,e,r,n),this}deleteRange(e,r){return Joe(this,e,r),this}lift(e,r){return Roe(this,e,r),this}join(e,r=1){return Voe(this,e,r),this}wrap(e,r){return Doe(this,e,r),this}setBlockType(e,r=e,n,s=null){return Foe(this,e,r,n,s),this}setNodeMarkup(e,r,n=null,s){return $oe(this,e,r,n,s),this}setNodeAttribute(e,r,n){return this.step(new Su(e,r,n)),this}setDocAttribute(e,r){return this.step(new Mp(e,r)),this}addNodeMark(e,r){return this.step(new uo(e,r)),this}removeNodeMark(e,r){let n=this.doc.nodeAt(e);if(!n)throw new RangeError("No node at position "+e);if(r instanceof At)r.isInSet(n.marks)&&this.step(new gc(e,r));else{let s=n.marks,i,a=[];for(;i=r.isInSet(s);)a.push(new gc(e,i)),s=i.removeFromSet(s);for(let l=a.length-1;l>=0;l--)this.step(a[l])}return this}split(e,r=1,n){return Uoe(this,e,r,n),this}addMark(e,r,n){return _oe(this,e,r,n),this}removeMark(e,r,n){return Ioe(this,e,r,n),this}clearIncompatible(e,r,n){return FS(this,e,r,n),this}}const zw=Object.create(null);class rt{constructor(e,r,n){this.$anchor=e,this.$head=r,this.ranges=n||[new Xoe(e.min(r),e.max(r))]}get anchor(){return this.$anchor.pos}get head(){return this.$head.pos}get from(){return this.$from.pos}get to(){return this.$to.pos}get $from(){return this.ranges[0].$from}get $to(){return this.ranges[0].$to}get empty(){let e=this.ranges;for(let r=0;r<e.length;r++)if(e[r].$from.pos!=e[r].$to.pos)return!1;return!0}content(){return this.$from.doc.slice(this.from,this.to,!0)}replace(e,r=Ie.empty){let n=r.content.lastChild,s=null;for(let l=0;l<r.openEnd;l++)s=n,n=n.lastChild;let i=e.steps.length,a=this.ranges;for(let l=0;l<a.length;l++){let{$from:c,$to:u}=a[l],d=e.mapping.slice(i);e.replaceRange(d.map(c.pos),d.map(u.pos),l?Ie.empty:r),l==0&&YE(e,i,(n?n.isInline:s&&s.isTextblock)?-1:1)}}replaceWith(e,r){let n=e.steps.length,s=this.ranges;for(let i=0;i<s.length;i++){let{$from:a,$to:l}=s[i],c=e.mapping.slice(n),u=c.map(a.pos),d=c.map(l.pos);i?e.deleteRange(u,d):(e.replaceRangeWith(u,d,r),YE(e,n,r.isInline?-1:1))}}static findFrom(e,r,n=!1){let s=e.parent.inlineContent?new Ze(e):Uc(e.node(0),e.parent,e.pos,e.index(),r,n);if(s)return s;for(let i=e.depth-1;i>=0;i--){let a=r<0?Uc(e.node(0),e.node(i),e.before(i+1),e.index(i),r,n):Uc(e.node(0),e.node(i),e.after(i+1),e.index(i)+1,r,n);if(a)return a}return null}static near(e,r=1){return this.findFrom(e,r)||this.findFrom(e,-r)||new Gn(e.node(0))}static atStart(e){return Uc(e,e,0,0,1)||new Gn(e)}static atEnd(e){return Uc(e,e,e.content.size,e.childCount,-1)||new Gn(e)}static fromJSON(e,r){if(!r||!r.type)throw new RangeError("Invalid input for Selection.fromJSON");let n=zw[r.type];if(!n)throw new RangeError(`No selection type ${r.type} defined`);return n.fromJSON(e,r)}static jsonID(e,r){if(e in zw)throw new RangeError("Duplicate use of selection JSON ID "+e);return zw[e]=r,r.prototype.jsonID=e,r}getBookmark(){return Ze.between(this.$anchor,this.$head).getBookmark()}}rt.prototype.visible=!0;class Xoe{constructor(e,r){this.$from=e,this.$to=r}}let GE=!1;function ZE(t){!GE&&!t.parent.inlineContent&&(GE=!0,console.warn("TextSelection endpoint not pointing into a node with inline content ("+t.parent.type.name+")"))}class Ze extends rt{constructor(e,r=e){ZE(e),ZE(r),super(e,r)}
vendor: 5,617 bytes, line 788
788get $cursor(){return this.$anchor.pos==this.$head.pos?this.$head:null}map(e,r){let n=e.resolve(r.map(this.head));if(!n.parent.inlineContent)return rt.near(n);let s=e.resolve(r.map(this.anchor));return new Ze(s.parent.inlineContent?s:n,n)}replace(e,r=Ie.empty){if(super.replace(e,r),r==Ie.empty){let n=this.$from.marksAcross(this.$to);n&&e.ensureMarks(n)}}eq(e){return e instanceof Ze&&e.anchor==this.anchor&&e.head==this.head}getBookmark(){return new Yy(this.anchor,this.head)}toJSON(){return{type:"text",anchor:this.anchor,head:this.head}}static fromJSON(e,r){if(typeof r.anchor!="number"||typeof r.head!="number")throw new RangeError("Invalid input for TextSelection.fromJSON");return new Ze(e.resolve(r.anchor),e.resolve(r.head))}static create(e,r,n=r){let s=e.resolve(r);return new this(s,n==r?s:e.resolve(n))}static between(e,r,n){let s=e.pos-r.pos;if((!n||s)&&(n=s>=0?1:-1),!r.parent.inlineContent){let i=rt.findFrom(r,n,!0)||rt.findFrom(r,-n,!0);if(i)r=i.$head;else return rt.near(r,n)}return e.parent.inlineContent||(s==0?e=r:(e=(rt.findFrom(e,-n,!0)||rt.findFrom(e,n,!0)).$anchor,e.pos<r.pos!=s<0&&(e=r))),new Ze(e,r)}}rt.jsonID("text",Ze);class Yy{constructor(e,r){this.anchor=e,this.head=r}map(e){return new Yy(e.map(this.anchor),e.map(this.head))}resolve(e){return Ze.between(e.resolve(this.anchor),e.resolve(this.head))}}class Ve extends rt{constructor(e){let r=e.nodeAfter,n=e.node(0).resolve(e.pos+r.nodeSize);super(e,n),this.node=r}map(e,r){let{deleted:n,pos:s}=r.mapResult(this.anchor),i=e.resolve(s);return n?rt.near(i):new Ve(i)}content(){return new Ie(Se.from(this.node),0,0)}eq(e){return e instanceof Ve&&e.anchor==this.anchor}toJSON(){return{type:"node",anchor:this.anchor}}getBookmark(){return new $S(this.anchor)}static fromJSON(e,r){if(typeof r.anchor!="number")throw new RangeError("Invalid input for NodeSelection.fromJSON");return new Ve(e.resolve(r.anchor))}static create(e,r){return new Ve(e.resolve(r))}static isSelectable(e){return!e.isText&&e.type.spec.selectable!==!1}}Ve.prototype.visible=!1;rt.jsonID("node",Ve);class $S{constructor(e){this.anchor=e}map(e){let{deleted:r,pos:n}=e.mapResult(this.anchor);return r?new Yy(n,n):new $S(n)}resolve(e){let r=e.resolve(this.anchor),n=r.nodeAfter;return n&&Ve.isSelectable(n)?new Ve(r):rt.near(r)}}class Gn extends rt{constructor(e){super(e.resolve(0),e.resolve(e.content.size))}replace(e,r=Ie.empty){if(r==Ie.empty){e.delete(0,e.doc.content.size);let n=rt.atStart(e.doc);n.eq(e.selection)||e.setSelection(n)}else super.replace(e,r)}toJSON(){return{type:"all"}}static fromJSON(e){return new Gn(e)}map(e){return new Gn(e)}eq(e){return e instanceof Gn}getBookmark(){return Qoe}}rt.jsonID("all",Gn);const Qoe={map(){return this},resolve(t){return new Gn(t)}};function Uc(t,e,r,n,s,i=!1){if(e.inlineContent)return Ze.create(t,r);for(let a=n-(s>0?0:1);s>0?a<e.childCount:a>=0;a+=s){let l=e.child(a);if(l.isAtom){if(!i&&Ve.isSelectable(l))return Ve.create(t,r-(s<0?l.nodeSize:0))}else{let c=Uc(t,l,r+s,s<0?l.childCount:0,s,i);if(c)return c}r+=l.nodeSize*s}return null}function YE(t,e,r){let n=t.steps.length-1;if(n<e)return;let s=t.steps[n];if(!(s instanceof Pr||s instanceof Or))return;let i=t.mapping.maps[n],a;i.forEach((l,c,u,d)=>{a==null&&(a=d)}),t.setSelection(rt.near(t.doc.resolve(a),r))}const JE=1,pm=2,XE=4;class ele extends zR{constructor(e){super(e.doc),this.curSelectionFor=0,this.updated=0,this.meta=Object.create(null),this.time=Date.now(),this.curSelection=e.selection,this.storedMarks=e.storedMarks}get selection(){return this.curSelectionFor<this.steps.length&&(this.curSelection=this.curSelection.map(this.doc,this.mapping.slice(this.curSelectionFor)),this.curSelectionFor=this.steps.length),this.curSelection}setSelection(e){if(e.$from.doc!=this.doc)throw new RangeError("Selection passed to setSelection must point at the current document");return this.curSelection=e,this.curSelectionFor=this.steps.length,this.updated=(this.updated|JE)&~pm,this.storedMarks=null,this}get selectionSet(){return(this.updated&JE)>0}setStoredMarks(e){return this.storedMarks=e,this.updated|=pm,this}ensureMarks(e){return At.sameSet(this.storedMarks||this.selection.$from.marks(),e)||this.setStoredMarks(e),this}addStoredMark(e){return this.ensureMarks(e.addToSet(this.storedMarks||this.selection.$head.marks()))}removeStoredMark(e){return this.ensureMarks(e.removeFromSet(this.storedMarks||this.selection.$head.marks()))}get storedMarksSet(){return(this.updated&pm)>0}addStep(e,r){super.addStep(e,r),this.updated=this.updated&~pm,this.storedMarks=null}setTime(e){return this.time=e,this}replaceSelection(e){return this.selection.replace(this,e),this}replaceSelectionWith(e,r=!0){let n=this.selection;return r&&(e=e.mark(this.storedMarks||(n.empty?n.$from.marks():n.$from.marksAcross(n.$to)||At.none))),n.replaceWith(this,e),this}deleteSelection(){return this.selection.replace(this),this}insertText(e,r,n){let s=this.doc.type.schema;if(r==null)return e?this.replaceSelectionWith(s.text(e),!0):this.deleteSelection();{if(n==null&&(n=r),!e)return this.deleteRange(r,n);let i=this.storedMarks;if(!i){let a=this.doc.resolve(r);i=n==r?a.marks():a.marksAcross(this.doc.resolve(n))}return this.replaceRangeWith(r,n,s.text(e,i)),!this.selection.empty&&this.selection.to==r+e.length&&this.setSelection(rt.near(this.selection.$to)),this}}setMeta(e,r){return this.meta[typeof e=="string"?e:e.key]=r,this}getMeta(e){return this.meta[typeof e=="string"?e:e.key]}get isGeneric(){for(let e in this.meta)return!1;return!0}scrollIntoView(){return this.updated|=XE,this}get scrolledIntoView(){return(this.updated&XE)>0}}function QE(t,e){return!e||!t?t:t.bind(e)}
vendor: 4,416 bytes, line 788
788class Sh{constructor(e,r,n){this.name=e,this.init=QE(r.init,n),this.apply=QE(r.apply,n)}}const tle=[new Sh("doc",{init(t){return t.doc||t.schema.topNodeType.createAndFill()},apply(t){return t.doc}}),new Sh("selection",{init(t,e){return t.selection||rt.atStart(e.doc)},apply(t){return t.selection}}),new Sh("storedMarks",{init(t){return t.storedMarks||null},apply(t,e,r,n){return n.selection.$cursor?t.storedMarks:null}}),new Sh("scrollToSelection",{init(){return 0},apply(t,e){return t.scrolledIntoView?e+1:e}})];class Pw{constructor(e,r){this.schema=e,this.plugins=[],this.pluginsByKey=Object.create(null),this.fields=tle.slice(),r&&r.forEach(n=>{if(this.pluginsByKey[n.key])throw new RangeError("Adding different instances of a keyed plugin ("+n.key+")");this.plugins.push(n),this.pluginsByKey[n.key]=n,n.spec.state&&this.fields.push(new Sh(n.key,n.spec.state,n))})}}class hu{constructor(e){this.config=e}get schema(){return this.config.schema}get plugins(){return this.config.plugins}apply(e){return this.applyTransaction(e).state}filterTransaction(e,r=-1){for(let n=0;n<this.config.plugins.length;n++)if(n!=r){let s=this.config.plugins[n];if(s.spec.filterTransaction&&!s.spec.filterTransaction.call(s,e,this))return!1}return!0}applyTransaction(e){if(!this.filterTransaction(e))return{state:this,transactions:[]};let r=[e],n=this.applyInner(e),s=null;for(;;){let i=!1;for(let a=0;a<this.config.plugins.length;a++){let l=this.config.plugins[a];if(l.spec.appendTransaction){let c=s?s[a].n:0,u=s?s[a].state:this,d=c<r.length&&l.spec.appendTransaction.call(l,c?r.slice(c):r,u,n);if(d&&n.filterTransaction(d,a)){if(d.setMeta("appendedTransaction",e),!s){s=[];for(let h=0;h<this.config.plugins.length;h++)s.push(h<a?{state:n,n:r.length}:{state:this,n:0})}r.push(d),n=n.applyInner(d),i=!0}s&&(s[a]={state:n,n:r.length})}}if(!i)return{state:n,transactions:r}}}applyInner(e){if(!e.before.eq(this.doc))throw new RangeError("Applying a mismatched transaction");let r=new hu(this.config),n=this.config.fields;for(let s=0;s<n.length;s++){let i=n[s];r[i.name]=i.apply(e,this[i.name],this,r)}return r}get tr(){return new ele(this)}static create(e){let r=new Pw(e.doc?e.doc.type.schema:e.schema,e.plugins),n=new hu(r);for(let s=0;s<r.fields.length;s++)n[r.fields[s].name]=r.fields[s].init(e,n);return n}reconfigure(e){let r=new Pw(this.schema,e.plugins),n=r.fields,s=new hu(r);for(let i=0;i<n.length;i++){let a=n[i].name;s[a]=this.hasOwnProperty(a)?this[a]:n[i].init(e,s)}return s}toJSON(e){let r={doc:this.doc.toJSON(),selection:this.selection.toJSON()};if(this.storedMarks&&(r.storedMarks=this.storedMarks.map(n=>n.toJSON())),e&&typeof e=="object")for(let n in e){if(n=="doc"||n=="selection")throw new RangeError("The JSON fields `doc` and `selection` are reserved");let s=e[n],i=s.spec.state;i&&i.toJSON&&(r[n]=i.toJSON.call(s,this[s.key]))}return r}static fromJSON(e,r,n){if(!r)throw new RangeError("Invalid input for EditorState.fromJSON");if(!e.schema)throw new RangeError("Required config field 'schema' missing");let s=new Pw(e.schema,e.plugins),i=new hu(s);return s.fields.forEach(a=>{if(a.name=="doc")i.doc=Co.fromJSON(e.schema,r.doc);else if(a.name=="selection")i.selection=rt.fromJSON(i.doc,r.selection);else if(a.name=="storedMarks")r.storedMarks&&(i.storedMarks=r.storedMarks.map(e.schema.markFromJSON));else{if(n)for(let l in n){let c=n[l],u=c.spec.state;if(c.key==a.name&&u&&u.fromJSON&&Object.prototype.hasOwnProperty.call(r,l)){i[a.name]=u.fromJSON.call(c,e,r[l],i);return}}i[a.name]=a.init(e,i)}}),i}}function PR(t,e,r){for(let n in t){let s=t[n];s instanceof Function?s=s.bind(e):n=="handleDOMEvents"&&(s=PR(s,e,{})),r[n]=s}return r}class er{constructor(e){this.spec=e,this.props={},e.props&&PR(e.props,this,this.props),this.key=e.key?e.key.key:_R("plugin")}getState(e){return e[this.key]}}const _w=Object.create(null);function _R(t){return t in _w?t+"$"+ ++_w[t]:(_w[t]=0,t+"$")}class Lr{constructor(e="key"){this.key=_R(e)}get(e){return e.config.pluginsByKey[this.key]}getState(e){return e[this.key]}}const US=(t,e)=>t.selection.empty?!1:(e&&e(t.tr.deleteSelection().scrollIntoView()),!0);function IR(t,e){let{$cursor:r}=t.selection;return!r||(e?!e.endOfTextblock("backward",t):r.parentOffset>0)?null:r}const OR=(t,e,r)=>{let n=IR(t,r);if(!n)return!1;let s=WS(n);if(!s){let a=n.blockRange(),l=a&&Rd(a);return l==null?!1:(e&&e(t.tr.lift(a,l).scrollIntoView()),!0)}let i=s.nodeBefore;if(WR(t,s,e,-1))return!0;
vendor: 7,179 bytes, lines 788-789
788if(n.parent.content.size==0&&(sd(i,"end")||Ve.isSelectable(i)))for(let a=n.depth;;a--){let l=Zy(t.doc,n.before(a),n.after(a),Ie.empty);if(l&&l.slice.size<l.to-l.from){if(e){let c=t.tr.step(l);c.setSelection(sd(i,"end")?rt.findFrom(c.doc.resolve(c.mapping.map(s.pos,-1)),-1):Ve.create(c.doc,s.pos-i.nodeSize)),e(c.scrollIntoView())}return!0}if(a==1||n.node(a-1).childCount>1)break}return i.isAtom&&s.depth==n.depth-1?(e&&e(t.tr.delete(s.pos-i.nodeSize,s.pos).scrollIntoView()),!0):!1},rle=(t,e,r)=>{let n=IR(t,r);if(!n)return!1;let s=WS(n);return s?RR(t,s,e):!1},nle=(t,e,r)=>{let n=MR(t,r);if(!n)return!1;let s=VS(n);return s?RR(t,s,e):!1};function RR(t,e,r){let n=e.nodeBefore,s=n,i=e.pos-1;for(;!s.isTextblock;i--){if(s.type.spec.isolating)return!1;let d=s.lastChild;if(!d)return!1;s=d}let a=e.nodeAfter,l=a,c=e.pos+1;for(;!l.isTextblock;c++){if(l.type.spec.isolating)return!1;let d=l.firstChild;if(!d)return!1;l=d}let u=Zy(t.doc,i,c,Ie.empty);if(!u||u.from!=i||u instanceof Pr&&u.slice.size>=c-i)return!1;if(r){let d=t.tr.step(u);d.setSelection(Ze.create(d.doc,i)),r(d.scrollIntoView())}return!0}function sd(t,e,r=!1){for(let n=t;n;n=e=="start"?n.firstChild:n.lastChild){if(n.isTextblock)return!0;if(r&&n.childCount!=1)return!1}return!1}const LR=(t,e,r)=>{let{$head:n,empty:s}=t.selection,i=n;if(!s)return!1;if(n.parent.isTextblock){if(r?!r.endOfTextblock("backward",t):n.parentOffset>0)return!1;i=WS(n)}let a=i&&i.nodeBefore;return!a||!Ve.isSelectable(a)?!1:(e&&e(t.tr.setSelection(Ve.create(t.doc,i.pos-a.nodeSize)).scrollIntoView()),!0)};function WS(t){if(!t.parent.type.spec.isolating)for(let e=t.depth-1;e>=0;e--){if(t.index(e)>0)return t.doc.resolve(t.before(e+1));if(t.node(e).type.spec.isolating)break}return null}function MR(t,e){let{$cursor:r}=t.selection;return!r||(e?!e.endOfTextblock("forward",t):r.parentOffset<r.parent.content.size)?null:r}const DR=(t,e,r)=>{let n=MR(t,r);if(!n)return!1;let s=VS(n);if(!s)return!1;let i=s.nodeAfter;if(WR(t,s,e,1))return!0;if(n.parent.content.size==0&&(sd(i,"start")||Ve.isSelectable(i))){let a=Zy(t.doc,n.before(),n.after(),Ie.empty);if(a&&a.slice.size<a.to-a.from){if(e){let l=t.tr.step(a);l.setSelection(sd(i,"start")?rt.findFrom(l.doc.resolve(l.mapping.map(s.pos)),1):Ve.create(l.doc,l.mapping.map(s.pos))),e(l.scrollIntoView())}return!0}}return i.isAtom&&s.depth==n.depth-1?(e&&e(t.tr.delete(s.pos,s.pos+i.nodeSize).scrollIntoView()),!0):!1},FR=(t,e,r)=>{let{$head:n,empty:s}=t.selection,i=n;if(!s)return!1;if(n.parent.isTextblock){if(r?!r.endOfTextblock("forward",t):n.parentOffset<n.parent.content.size)return!1;i=VS(n)}let a=i&&i.nodeAfter;return!a||!Ve.isSelectable(a)?!1:(e&&e(t.tr.setSelection(Ve.create(t.doc,i.pos)).scrollIntoView()),!0)};function VS(t){if(!t.parent.type.spec.isolating)for(let e=t.depth-1;e>=0;e--){let r=t.node(e);if(t.index(e)+1<r.childCount)return t.doc.resolve(t.after(e+1));if(r.type.spec.isolating)break}return null}const sle=(t,e)=>{let r=t.selection,n=r instanceof Ve,s;if(n){if(r.node.isTextblock||!Qo(t.doc,r.from))return!1;s=r.from}else if(s=Gy(t.doc,r.from,-1),s==null)return!1;if(e){let i=t.tr.join(s);n&&i.setSelection(Ve.create(i.doc,s-t.doc.resolve(s).nodeBefore.nodeSize)),e(i.scrollIntoView())}return!0},ile=(t,e)=>{let r=t.selection,n;if(r instanceof Ve){if(r.node.isTextblock||!Qo(t.doc,r.to))return!1;n=r.to}else if(n=Gy(t.doc,r.to,1),n==null)return!1;return e&&e(t.tr.join(n).scrollIntoView()),!0},ale=(t,e)=>{let{$from:r,$to:n}=t.selection,s=r.blockRange(n),i=s&&Rd(s);return i==null?!1:(e&&e(t.tr.lift(s,i).scrollIntoView()),!0)},BR=(t,e)=>{let{$head:r,$anchor:n}=t.selection;return!r.parent.type.spec.code||!r.sameParent(n)?!1:(e&&e(t.tr.insertText(`
789`).scrollIntoView()),!0)};function HS(t){for(let e=0;e<t.edgeCount;e++){let{type:r}=t.edge(e);if(r.isTextblock&&!r.hasRequiredAttrs())return r}return null}const ole=(t,e)=>{let{$head:r,$anchor:n}=t.selection;if(!r.parent.type.spec.code||!r.sameParent(n))return!1;let s=r.node(-1),i=r.indexAfter(-1),a=HS(s.contentMatchAt(i));if(!a||!s.canReplaceWith(i,i,a))return!1;if(e){let l=r.after(),c=t.tr.replaceWith(l,l,a.createAndFill());c.setSelection(rt.near(c.doc.resolve(l),1)),e(c.scrollIntoView())}return!0},$R=(t,e)=>{let r=t.selection,{$from:n,$to:s}=r;if(r instanceof Gn||n.parent.inlineContent||s.parent.inlineContent)return!1;let i=HS(s.parent.contentMatchAt(s.indexAfter()));if(!i||!i.isTextblock)return!1;if(e){let a=(!n.parentOffset&&s.index()<s.parent.childCount?n:s).pos,l=t.tr.insert(a,i.createAndFill());l.setSelection(Ze.create(l.doc,a+1)),e(l.scrollIntoView())}return!0},UR=(t,e)=>{let{$cursor:r}=t.selection;if(!r||r.parent.content.size)return!1;if(r.depth>1&&r.after()!=r.end(-1)){let i=r.before();if(oa(t.doc,i))return e&&e(t.tr.split(i).scrollIntoView()),!0}let n=r.blockRange(),s=n&&Rd(n);return s==null?!1:(e&&e(t.tr.lift(n,s).scrollIntoView()),!0)};function lle(t){return(e,r)=>{let{$from:n,$to:s}=e.selection;if(e.selection instanceof Ve&&e.selection.node.isBlock)return!n.parentOffset||!oa(e.doc,n.pos)?!1:(r&&r(e.tr.split(n.pos).scrollIntoView()),!0);if(!n.depth)return!1;let i=[],a,l,c=!1,u=!1;for(let f=n.depth;;f--)if(n.node(f).isBlock){c=n.end(f)==n.pos+(n.depth-f),u=n.start(f)==n.pos-(n.depth-f),l=HS(n.node(f-1).contentMatchAt(n.indexAfter(f-1))),i.unshift(c&&l?{type:l}:null),a=f;break}else{if(f==1)return!1;i.unshift(null)}let d=e.tr;(e.selection instanceof Ze||e.selection instanceof Gn)&&d.deleteSelection();let h=d.mapping.map(n.pos),p=oa(d.doc,h,i.length,i);if(p||(i[0]=l?{type:l}:null,p=oa(d.doc,h,i.length,i)),!p)return!1;if(d.split(h,i.length,i),!c&&u&&n.node(a).type!=l){let f=d.mapping.map(n.before(a)),m=d.doc.resolve(f);l&&n.node(a-1).canReplaceWith(m.index(),m.index()+1,l)&&d.setNodeMarkup(d.mapping.map(n.before(a)),l)}return r&&r(d.scrollIntoView()),!0}}const cle=lle(),ule=(t,e)=>{let{$from:r,to:n}=t.selection,s,i=r.sharedDepth(n);return i==0?!1:(s=r.before(i),e&&e(t.tr.setSelection(Ve.create(t.doc,s))),!0)};function dle(t,e,r){let n=e.nodeBefore,s=e.nodeAfter,i=e.index();return!n||!s||!n.type.compatibleContent(s.type)?!1:!n.content.size&&e.parent.canReplace(i-1,i)?(r&&r(t.tr.delete(e.pos-n.nodeSize,e.pos).scrollIntoView()),!0):!e.parent.canReplace(i,i+1)||!(s.isTextblock||Qo(t.doc,e.pos))?!1:(r&&r(t.tr.join(e.pos).scrollIntoView()),!0)}function WR(t,e,r,n){let s=e.nodeBefore,i=e.nodeAfter,a,l,c=s.type.spec.isolating||i.type.spec.isolating;if(!c&&dle(t,e,r))return!0;let u=!c&&e.parent.canReplace(e.index(),e.index()+1);if(u&&(a=(l=s.contentMatchAt(s.childCount)).findWrapping(i.type))&&l.matchType(a[0]||i.type).validEnd){if(r){let f=e.pos+i.nodeSize,m=Se.empty;for(let g=a.length-1;g>=0;g--)m=Se.from(a[g].create(null,m));m=Se.from(s.copy(m));let y=t.tr.step(new Or(e.pos-1,f,e.pos,f,new Ie(m,1,0),a.length,!0)),k=y.doc.resolve(f+2*a.length);k.nodeAfter&&k.nodeAfter.type==s.type&&Qo(y.doc,k.pos)&&y.join(k.pos),r(y.scrollIntoView())}return!0}let d=i.type.spec.isolating||n>0&&c?null:rt.findFrom(e,1),h=d&&d.$from.blockRange(d.$to),p=h&&Rd(h);if(p!=null&&p>=e.depth)return r&&r(t.tr.lift(h,p).scrollIntoView()),!0;if(u&&sd(i,"start",!0)&&sd(s,"end")){let f=s,m=[];for(;m.push(f),!f.isTextblock;)f=f.lastChild;let y=i,k=1;for(;!y.isTextblock;y=y.firstChild)k++;
vendor: 4,631 bytes, line 789
789if(f.canReplace(f.childCount,f.childCount,y.content)){if(r){let g=Se.empty;for(let w=m.length-1;w>=0;w--)g=Se.from(m[w].copy(g));let x=t.tr.step(new Or(e.pos-m.length,e.pos+i.nodeSize,e.pos+k,e.pos+i.nodeSize-k,new Ie(g,m.length,0),0,!0));r(x.scrollIntoView())}return!0}}return!1}function VR(t){return function(e,r){let n=e.selection,s=t<0?n.$from:n.$to,i=s.depth;for(;s.node(i).isInline;){if(!i)return!1;i--}return s.node(i).isTextblock?(r&&r(e.tr.setSelection(Ze.create(e.doc,t<0?s.start(i):s.end(i)))),!0):!1}}const hle=VR(-1),ple=VR(1);function fle(t,e=null){return function(r,n){let{$from:s,$to:i}=r.selection,a=s.blockRange(i),l=a&&BS(a,t,e);return l?(n&&n(r.tr.wrap(a,l).scrollIntoView()),!0):!1}}function e5(t,e=null){return function(r,n){let s=!1;for(let i=0;i<r.selection.ranges.length&&!s;i++){let{$from:{pos:a},$to:{pos:l}}=r.selection.ranges[i];r.doc.nodesBetween(a,l,(c,u)=>{if(s)return!1;if(!(!c.isTextblock||c.hasMarkup(t,e)))if(c.type==t)s=!0;else{let d=r.doc.resolve(u),h=d.index();s=d.parent.canReplaceWith(h,h+1,t)}})}if(!s)return!1;if(n){let i=r.tr;for(let a=0;a<r.selection.ranges.length;a++){let{$from:{pos:l},$to:{pos:c}}=r.selection.ranges[a];i.setBlockType(l,c,t,e)}n(i.scrollIntoView())}return!0}}function qS(...t){return function(e,r,n){for(let s=0;s<t.length;s++)if(t[s](e,r,n))return!0;return!1}}qS(US,OR,LR);qS(US,DR,FR);qS(BR,$R,UR,cle);typeof navigator<"u"?/Mac|iP(hone|[oa]d)/.test(navigator.platform):typeof os<"u"&&os.platform&&os.platform()=="darwin";function mle(t,e=null){return function(r,n){let{$from:s,$to:i}=r.selection,a=s.blockRange(i);if(!a)return!1;let l=n?r.tr:null;return gle(l,a,t,e)?(n&&n(l.scrollIntoView()),!0):!1}}function gle(t,e,r,n=null){let s=!1,i=e,a=e.$from.doc;if(e.depth>=2&&e.$from.node(e.depth-1).type.compatibleContent(r)&&e.startIndex==0){if(e.$from.index(e.depth-1)==0)return!1;let c=a.resolve(e.start-2);i=new og(c,c,e.depth),e.endIndex<e.parent.childCount&&(e=new og(e.$from,a.resolve(e.$to.end(e.depth)),e.depth)),s=!0}let l=BS(i,r,n,e);return l?(t&&yle(t,e,l,s,r),!0):!1}function yle(t,e,r,n,s){let i=Se.empty;for(let d=r.length-1;d>=0;d--)i=Se.from(r[d].type.create(r[d].attrs,i));t.step(new Or(e.start-(n?2:0),e.end,e.start,e.end,new Ie(i,0,0),r.length,!0));let a=0;for(let d=0;d<r.length;d++)r[d].type==s&&(a=d+1);let l=r.length-a,c=e.start+r.length-(n?2:0),u=e.parent;for(let d=e.startIndex,h=e.endIndex,p=!0;d<h;d++,p=!1)!p&&oa(t.doc,c,l)&&(t.split(c,l),c+=2*l),c+=u.child(d).nodeSize;return t}function xle(t){return function(e,r){let{$from:n,$to:s}=e.selection,i=n.blockRange(s,a=>a.childCount>0&&a.firstChild.type==t);return i?r?n.node(i.depth-1).type==t?wle(e,r,t,i):ble(e,r,i):!0:!1}}function wle(t,e,r,n){let s=t.tr,i=n.end,a=n.$to.end(n.depth);i<a&&(s.step(new Or(i-1,a,i,a,new Ie(Se.from(r.create(null,n.parent.copy())),1,0),1,!0)),n=new og(s.doc.resolve(n.$from.pos),s.doc.resolve(a),n.depth));const l=Rd(n);if(l==null)return!1;s.lift(n,l);let c=s.doc.resolve(s.mapping.map(i,-1)-1);return Qo(s.doc,c.pos)&&c.nodeBefore.type==c.nodeAfter.type&&s.join(c.pos),e(s.scrollIntoView()),!0}function ble(t,e,r){let n=t.tr,s=r.parent;for(let f=r.end,m=r.endIndex-1,y=r.startIndex;m>y;m--)f-=s.child(m).nodeSize,n.delete(f-1,f+1);let i=n.doc.resolve(r.start),a=i.nodeAfter;if(n.mapping.map(r.end)!=r.start+i.nodeAfter.nodeSize)return!1;let l=r.startIndex==0,c=r.endIndex==s.childCount,u=i.node(-1),d=i.index(-1);if(!u.canReplace(d+(l?0:1),d+1,a.content.append(c?Se.empty:Se.from(s))))return!1;let h=i.pos,p=h+a.nodeSize;return n.step(new Or(h-(l?1:0),p+(c?1:0),h+1,p-1,new Ie((l?Se.empty:Se.from(s.copy(Se.empty))).append(c?Se.empty:Se.from(s.copy(Se.empty))),l?0:1,c?0:1),l?0:1)),e(n.scrollIntoView()),!0}function kle(t){return function(e,r){let{$from:n,$to:s}=e.selection,i=n.blockRange(s,u=>u.childCount>0&&u.firstChild.type==t);if(!i)return!1;let a=i.startIndex;if(a==0)return!1;let l=i.parent,c=l.child(a-1);if(c.type!=t)return!1;if(r){let u=c.lastChild&&c.lastChild.type==l.type,d=Se.from(u?t.create():null),h=new Ie(Se.from(t.create(null,Se.from(l.type.create(null,d)))),u?3:1,0),p=i.start,f=i.end;r(e.tr.step(new Or(p-(u?3:1),f,p,f,h,1,!0)).scrollIntoView())}return!0}}const Fr=function(t){for(var e=0;;e++)if(t=t.previousSibling,!t)return e},id=function(t){let e=t.assignedSlot||t.parentNode;return e&&e.nodeType==11?e.host:e};let qv=null;const qi=function(t,e,r){let n=qv||(qv=document.createRange());return n.setEnd(t,r??t.nodeValue.length),n.setStart(t,e||0),n},vle=function(){qv=null},yc=function(t,e,r,n){return r&&(t5(t,e,r,n,-1)||t5(t,e,r,n,1))},jle=/^(img|br|input|textarea|hr)$/i;function t5(t,e,r,n,s){for(var i;;){if(t==r&&e==n)return!0;
vendor: 18,361 bytes, lines 789-790
789if(e==(s<0?0:ms(t))){let a=t.parentNode;if(!a||a.nodeType!=1||bf(t)||jle.test(t.nodeName)||t.contentEditable=="false")return!1;e=Fr(t)+(s<0?0:1),t=a}else if(t.nodeType==1){let a=t.childNodes[e+(s<0?-1:0)];if(a.nodeType==1&&a.contentEditable=="false")if(!((i=a.pmViewDesc)===null||i===void 0)&&i.ignoreForSelection)e+=s;else return!1;else t=a,e=s<0?ms(t):0}else return!1}}function ms(t){return t.nodeType==3?t.nodeValue.length:t.childNodes.length}function Sle(t,e){for(;;){if(t.nodeType==3&&e)return t;if(t.nodeType==1&&e>0){if(t.contentEditable=="false")return null;t=t.childNodes[e-1],e=ms(t)}else if(t.parentNode&&!bf(t))e=Fr(t),t=t.parentNode;else return null}}function Nle(t,e){for(;;){if(t.nodeType==3&&e<t.nodeValue.length)return t;if(t.nodeType==1&&e<t.childNodes.length){if(t.contentEditable=="false")return null;t=t.childNodes[e],e=0}else if(t.parentNode&&!bf(t))e=Fr(t)+1,t=t.parentNode;else return null}}function Cle(t,e,r){for(let n=e==0,s=e==ms(t);n||s;){if(t==r)return!0;let i=Fr(t);if(t=t.parentNode,!t)return!1;n=n&&i==0,s=s&&i==ms(t)}}function bf(t){let e;for(let r=t;r&&!(e=r.pmViewDesc);r=r.parentNode);return e&&e.node&&e.node.isBlock&&(e.dom==t||e.contentDOM==t)}const Jy=function(t){return t.focusNode&&yc(t.focusNode,t.focusOffset,t.anchorNode,t.anchorOffset)};function wl(t,e){let r=document.createEvent("Event");return r.initEvent("keydown",!0,!0),r.keyCode=t,r.key=r.code=e,r}function Ele(t){let e=t.activeElement;for(;e&&e.shadowRoot;)e=e.shadowRoot.activeElement;return e}function Tle(t,e,r){if(t.caretPositionFromPoint)try{let n=t.caretPositionFromPoint(e,r);if(n)return{node:n.offsetNode,offset:Math.min(ms(n.offsetNode),n.offset)}}catch{}if(t.caretRangeFromPoint){let n=t.caretRangeFromPoint(e,r);if(n)return{node:n.startContainer,offset:Math.min(ms(n.startContainer),n.startOffset)}}}const Ai=typeof navigator<"u"?navigator:null,r5=typeof document<"u"?document:null,el=Ai&&Ai.userAgent||"",Kv=/Edge\/(\d+)/.exec(el),HR=/MSIE \d/.exec(el),Gv=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(el),Dn=!!(HR||Gv||Kv),To=HR?document.documentMode:Gv?+Gv[1]:Kv?+Kv[1]:0,bs=!Dn&&/gecko\/(\d+)/i.test(el);bs&&+(/Firefox\/(\d+)/.exec(el)||[0,0])[1];const Zv=!Dn&&/Chrome\/(\d+)/.exec(el),Xr=!!Zv,qR=Zv?+Zv[1]:0,mn=!Dn&&!!Ai&&/Apple Computer/.test(Ai.vendor),ad=mn&&(/Mobile\/\w+/.test(el)||!!Ai&&Ai.maxTouchPoints>2),hs=ad||(Ai?/Mac/.test(Ai.platform):!1),Ale=Ai?/Win/.test(Ai.platform):!1,ta=/Android \d/.test(el),kf=!!r5&&"webkitFontSmoothing"in r5.documentElement.style,zle=kf?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0;function Ple(t){let e=t.defaultView&&t.defaultView.visualViewport;return e?{left:0,right:e.width,top:0,bottom:e.height}:{left:0,right:t.documentElement.clientWidth,top:0,bottom:t.documentElement.clientHeight}}function Li(t,e){return typeof t=="number"?t:t[e]}function _le(t){let e=t.getBoundingClientRect(),r=e.width/t.offsetWidth||1,n=e.height/t.offsetHeight||1;return{left:e.left,right:e.left+t.clientWidth*r,top:e.top,bottom:e.top+t.clientHeight*n}}function n5(t,e,r){let n=t.someProp("scrollThreshold")||0,s=t.someProp("scrollMargin")||5,i=t.dom.ownerDocument;for(let a=r||t.dom;a;){if(a.nodeType!=1){a=id(a);continue}let l=a,c=l==i.body,u=c?Ple(i):_le(l),d=0,h=0;if(e.top<u.top+Li(n,"top")?h=-(u.top-e.top+Li(s,"top")):e.bottom>u.bottom-Li(n,"bottom")&&(h=e.bottom-e.top>u.bottom-u.top?e.top+Li(s,"top")-u.top:e.bottom-u.bottom+Li(s,"bottom")),e.left<u.left+Li(n,"left")?d=-(u.left-e.left+Li(s,"left")):e.right>u.right-Li(n,"right")&&(d=e.right-u.right+Li(s,"right")),d||h)if(c)i.defaultView.scrollBy(d,h);else{let f=l.scrollLeft,m=l.scrollTop;h&&(l.scrollTop+=h),d&&(l.scrollLeft+=d);let y=l.scrollLeft-f,k=l.scrollTop-m;e={left:e.left-y,top:e.top-k,right:e.right-y,bottom:e.bottom-k}}let p=c?"fixed":getComputedStyle(a).position;if(/^(fixed|sticky)$/.test(p))break;a=p=="absolute"?a.offsetParent:id(a)}}function Ile(t){let e=t.dom.getBoundingClientRect(),r=Math.max(0,e.top),n,s;for(let i=(e.left+e.right)/2,a=r+1;a<Math.min(innerHeight,e.bottom);a+=5){let l=t.root.elementFromPoint(i,a);if(!l||l==t.dom||!t.dom.contains(l))continue;let c=l.getBoundingClientRect();if(c.top>=r-20){n=l,s=c.top;break}}return{refDOM:n,refTop:s,stack:KR(t.dom)}}function KR(t){let e=[],r=t.ownerDocument;for(let n=t;n&&(e.push({dom:n,top:n.scrollTop,left:n.scrollLeft}),t!=r);n=id(n));return e}function Ole({refDOM:t,refTop:e,stack:r}){let n=t?t.getBoundingClientRect().top:0;GR(r,n==0?0:n-e)}function GR(t,e){for(let r=0;r<t.length;r++){let{dom:n,top:s,left:i}=t[r];n.scrollTop!=s+e&&(n.scrollTop=s+e),n.scrollLeft!=i&&(n.scrollLeft=i)}}let Rc=null;function Rle(t){if(t.setActive)return t.setActive();if(Rc)return t.focus(Rc);let e=KR(t);t.focus(Rc==null?{get preventScroll(){return Rc={preventScroll:!0},!0}}:void 0),Rc||(Rc=!1,GR(e,0))}function ZR(t,e){let r,n=2e8,s,i=0,a=e.top,l=e.top,c,u;for(let d=t.firstChild,h=0;d;d=d.nextSibling,h++){let p;if(d.nodeType==1)p=d.getClientRects();else if(d.nodeType==3)p=qi(d).getClientRects();else continue;for(let f=0;f<p.length;f++){let m=p[f];if(m.top<=a&&m.bottom>=l){a=Math.max(m.bottom,a),l=Math.min(m.top,l);let y=m.left>e.left?m.left-e.left:m.right<e.left?e.left-m.right:0;if(y<n){r=d,n=y,s=y&&r.nodeType==3?{left:m.right<e.left?m.right:m.left,top:e.top}:e,d.nodeType==1&&y&&(i=h+(e.left>=(m.left+m.right)/2?1:0));continue}}else m.top>e.top&&!c&&m.left<=e.left&&m.right>=e.left&&(c=d,u={left:Math.max(m.left,Math.min(m.right,e.left)),top:m.top});!r&&(e.left>=m.right&&e.top>=m.top||e.left>=m.left&&e.top>=m.bottom)&&(i=h+1)}}return!r&&c&&(r=c,s=u,n=0),r&&r.nodeType==3?Lle(r,s):!r||n&&r.nodeType==1?{node:t,offset:i}:ZR(r,s)}function Lle(t,e){let r=t.nodeValue.length,n=document.createRange();for(let s=0;s<r;s++){n.setEnd(t,s+1),n.setStart(t,s);let i=Oa(n,1);if(i.top!=i.bottom&&KS(e,i))return{node:t,offset:s+(e.left>=(i.left+i.right)/2?1:0)}}return{node:t,offset:0}}function KS(t,e){return t.left>=e.left-1&&t.left<=e.right+1&&t.top>=e.top-1&&t.top<=e.bottom+1}function Mle(t,e){let r=t.parentNode;return r&&/^li$/i.test(r.nodeName)&&e.left<t.getBoundingClientRect().left?r:t}function Dle(t,e,r){let{node:n,offset:s}=ZR(e,r),i=-1;if(n.nodeType==1&&!n.firstChild){let a=n.getBoundingClientRect();i=a.left!=a.right&&r.left>(a.left+a.right)/2?1:-1}return t.docView.posFromDOM(n,s,i)}function Fle(t,e,r,n){let s=-1;for(let i=e,a=!1;i!=t.dom;){let l=t.docView.nearestDesc(i,!0),c;if(!l)return null;if(l.dom.nodeType==1&&(l.node.isBlock&&l.parent||!l.contentDOM)&&((c=l.dom.getBoundingClientRect()).width||c.height)&&(l.node.isBlock&&l.parent&&!/^T(R|BODY|HEAD|FOOT)$/.test(l.dom.nodeName)&&(!a&&c.left>n.left||c.top>n.top?s=l.posBefore:(!a&&c.right<n.left||c.bottom<n.top)&&(s=l.posAfter),a=!0),!l.contentDOM&&s<0&&!l.node.isText))return(l.node.isBlock?n.top<(c.top+c.bottom)/2:n.left<(c.left+c.right)/2)?l.posBefore:l.posAfter;i=l.dom.parentNode}return s>-1?s:t.docView.posFromDOM(e,r,-1)}function YR(t,e,r){let n=t.childNodes.length;if(n&&r.top<r.bottom)for(let s=Math.max(0,Math.min(n-1,Math.floor(n*(e.top-r.top)/(r.bottom-r.top))-2)),i=s;;){let a=t.childNodes[i];if(a.nodeType==1){let l=a.getClientRects();for(let c=0;c<l.length;c++){let u=l[c];if(KS(e,u))return YR(a,e,u)}}if((i=(i+1)%n)==s)break}return t}function Ble(t,e){let r=t.dom.ownerDocument,n,s=0,i=Tle(r,e.left,e.top);i&&({node:n,offset:s}=i);let a=(t.root.elementFromPoint?t.root:r).elementFromPoint(e.left,e.top),l;if(!a||!t.dom.contains(a.nodeType!=1?a.parentNode:a)){let u=t.dom.getBoundingClientRect();if(!KS(e,u)||(a=YR(t.dom,e,u),!a))return null}if(mn)for(let u=a;n&&u;u=id(u))u.draggable&&(n=void 0);if(a=Mle(a,e),n){if(bs&&n.nodeType==1&&(s=Math.min(s,n.childNodes.length),s<n.childNodes.length)){let d=n.childNodes[s],h;d.nodeName=="IMG"&&(h=d.getBoundingClientRect()).right<=e.left&&h.bottom>e.top&&s++}let u;kf&&s&&n.nodeType==1&&(u=n.childNodes[s-1]).nodeType==1&&u.contentEditable=="false"&&u.getBoundingClientRect().top>=e.top&&s--,n==t.dom&&s==n.childNodes.length-1&&n.lastChild.nodeType==1&&e.top>n.lastChild.getBoundingClientRect().bottom?l=t.state.doc.content.size:(s==0||n.nodeType!=1||n.childNodes[s-1].nodeName!="BR")&&(l=Fle(t,n,s,e))}l==null&&(l=Dle(t,a,e));let c=t.docView.nearestDesc(a,!0);return{pos:l,inside:c?c.posAtStart-c.border:-1}}function s5(t){return t.top<t.bottom||t.left<t.right}function Oa(t,e){let r=t.getClientRects();if(r.length){let n=r[e<0?0:r.length-1];if(s5(n))return n}return Array.prototype.find.call(r,s5)||t.getBoundingClientRect()}const $le=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/;function JR(t,e,r){let{node:n,offset:s,atom:i}=t.docView.domFromPos(e,r<0?-1:1),a=kf||bs;if(n.nodeType==3)if(a&&($le.test(n.nodeValue)||(r<0?!s:s==n.nodeValue.length))){let c=Oa(qi(n,s,s),r);if(bs&&s&&/\s/.test(n.nodeValue[s-1])&&s<n.nodeValue.length){let u=Oa(qi(n,s-1,s-1),-1);if(u.top==c.top){let d=Oa(qi(n,s,s+1),-1);if(d.top!=c.top)return sh(d,d.left<u.left)}}return c}else{let c=s,u=s,d=r<0?1:-1;return r<0&&!s?(u++,d=-1):r>=0&&s==n.nodeValue.length?(c--,d=1):r<0?c--:u++,sh(Oa(qi(n,c,u),d),d<0)}if(!t.state.doc.resolve(e-(i||0)).parent.inlineContent){if(i==null&&s&&(r<0||s==ms(n))){let c=n.childNodes[s-1];if(c.nodeType==1)return Iw(c.getBoundingClientRect(),!1)}if(i==null&&s<ms(n)){let c=n.childNodes[s];if(c.nodeType==1)return Iw(c.getBoundingClientRect(),!0)}return Iw(n.getBoundingClientRect(),r>=0)}if(i==null&&s&&(r<0||s==ms(n))){let c=n.childNodes[s-1],u=c.nodeType==3?qi(c,ms(c)-(a?0:1)):c.nodeType==1&&(c.nodeName!="BR"||!c.nextSibling)?c:null;if(u)return sh(Oa(u,1),!1)}if(i==null&&s<ms(n)){let c=n.childNodes[s];for(;c.pmViewDesc&&c.pmViewDesc.ignoreForCoords;)c=c.nextSibling;let u=c?c.nodeType==3?qi(c,0,a?0:1):c.nodeType==1?c:null:null;if(u)return sh(Oa(u,-1),!0)}return sh(Oa(n.nodeType==3?qi(n):n,-r),r>=0)}function sh(t,e){if(t.width==0)return t;let r=e?t.left:t.right;return{top:t.top,bottom:t.bottom,left:r,right:r}}function Iw(t,e){if(t.height==0)return t;let r=e?t.top:t.bottom;return{top:r,bottom:r,left:t.left,right:t.right}}function XR(t,e,r){let n=t.state,s=t.root.activeElement;n!=e&&t.updateState(e),s!=t.dom&&t.focus();try{return r()}finally{n!=e&&t.updateState(n),s!=t.dom&&s&&s.focus()}}function Ule(t,e,r){let n=e.selection,s=r=="up"?n.$from:n.$to;return XR(t,e,()=>{let{node:i}=t.docView.domFromPos(s.pos,r=="up"?-1:1);for(;;){let l=t.docView.nearestDesc(i,!0);if(!l)break;if(l.node.isBlock){i=l.contentDOM||l.dom;break}i=l.dom.parentNode}let a=JR(t,s.pos,1);for(let l=i.firstChild;l;l=l.nextSibling){let c;if(l.nodeType==1)c=l.getClientRects();else if(l.nodeType==3)c=qi(l,0,l.nodeValue.length).getClientRects();else continue;for(let u=0;u<c.length;u++){let d=c[u];if(d.bottom>d.top+1&&(r=="up"?a.top-d.top>(d.bottom-a.top)*2:d.bottom-a.bottom>(a.bottom-d.top)*2))return!1}}return!0})}const Wle=/[\u0590-\u08ac]/;function Vle(t,e,r){let{$head:n}=e.selection;if(!n.parent.isTextblock)return!1;let s=n.parentOffset,i=!s,a=s==n.parent.content.size,l=t.domSelection();return l?!Wle.test(n.parent.textContent)||!l.modify?r=="left"||r=="backward"?i:a:XR(t,e,()=>{let{focusNode:c,focusOffset:u,anchorNode:d,anchorOffset:h}=t.domSelectionRange(),p=l.caretBidiLevel;l.modify("move",r,"character");let f=n.depth?t.docView.domAfterPos(n.before()):t.dom,{focusNode:m,focusOffset:y}=t.domSelectionRange(),k=m&&!f.contains(m.nodeType==1?m:m.parentNode)||c==m&&u==y;try{l.collapse(d,h),c&&(c!=d||u!=h)&&l.extend&&l.extend(c,u)}catch{}return p!=null&&(l.caretBidiLevel=p),k}):n.pos==n.start()||n.pos==n.end()}let i5=null,a5=null,o5=!1;function Hle(t,e,r){return i5==e&&a5==r?o5:(i5=e,a5=r,o5=r=="up"||r=="down"?Ule(t,e,r):Vle(t,e,r))}const ks=0,l5=1,zl=2,zi=3;class vf{constructor(e,r,n,s){this.parent=e,this.children=r,this.dom=n,this.contentDOM=s,this.dirty=ks,n.pmViewDesc=this}matchesWidget(e){return!1}matchesMark(e){return!1}matchesNode(e,r,n){return!1}matchesHack(e){return!1}parseRule(){return null}stopEvent(e){return!1}get size(){let e=0;for(let r=0;r<this.children.length;r++)e+=this.children[r].size;return e}get border(){return 0}destroy(){this.parent=void 0,this.dom.pmViewDesc==this&&(this.dom.pmViewDesc=void 0);for(let e=0;e<this.children.length;e++)this.children[e].destroy()}posBeforeChild(e){for(let r=0,n=this.posAtStart;;r++){let s=this.children[r];if(s==e)return n;n+=s.size}}get posBefore(){return this.parent.posBeforeChild(this)}get posAtStart(){return this.parent?this.parent.posBeforeChild(this)+this.border:0}get posAfter(){return this.posBefore+this.size}get posAtEnd(){return this.posAtStart+this.size-2*this.border}localPosFromDOM(e,r,n){if(this.contentDOM&&this.contentDOM.contains(e.nodeType==1?e:e.parentNode))if(n<0){let i,a;if(e==this.contentDOM)i=e.childNodes[r-1];else{for(;e.parentNode!=this.contentDOM;)e=e.parentNode;i=e.previousSibling}for(;i&&!((a=i.pmViewDesc)&&a.parent==this);)i=i.previousSibling;return i?this.posBeforeChild(a)+a.size:this.posAtStart}else{let i,a;if(e==this.contentDOM)i=e.childNodes[r];else{for(;e.parentNode!=this.contentDOM;)e=e.parentNode;i=e.nextSibling}for(;i&&!((a=i.pmViewDesc)&&a.parent==this);)i=i.nextSibling;return i?this.posBeforeChild(a):this.posAtEnd}let s;if(e==this.dom&&this.contentDOM)s=r>Fr(this.contentDOM);else if(this.contentDOM&&this.contentDOM!=this.dom&&this.dom.contains(this.contentDOM))s=e.compareDocumentPosition(this.contentDOM)&2;else if(this.dom.firstChild){if(r==0)for(let i=e;;i=i.parentNode){if(i==this.dom){s=!1;break}if(i.previousSibling)break}if(s==null&&r==e.childNodes.length)for(let i=e;;i=i.parentNode){if(i==this.dom){s=!0;break}if(i.nextSibling)break}}return s??n>0?this.posAtEnd:this.posAtStart}nearestDesc(e,r=!1){for(let n=!0,s=e;s;s=s.parentNode){let i=this.getDesc(s),a;if(i&&(!r||i.node))if(n&&(a=i.nodeDOM)&&!(a.nodeType==1?a.contains(e.nodeType==1?e:e.parentNode):a==e))n=!1;else return i}}getDesc(e){let r=e.pmViewDesc;for(let n=r;n;n=n.parent)if(n==this)return r}posFromDOM(e,r,n){for(let s=e;s;s=s.parentNode){let i=this.getDesc(s);if(i)return i.localPosFromDOM(e,r,n)}return-1}descAt(e){for(let r=0,n=0;r<this.children.length;r++){let s=this.children[r],i=n+s.size;if(n==e&&i!=n){for(;!s.border&&s.children.length;)for(let a=0;a<s.children.length;a++){let l=s.children[a];if(l.size){s=l;break}}return s}if(e<i)return s.descAt(e-n-s.border);n=i}}domFromPos(e,r){if(!this.contentDOM)return{node:this.dom,offset:0,atom:e+1};let n=0,s=0;for(let i=0;n<this.children.length;n++){let a=this.children[n],l=i+a.size;if(l>e||a instanceof eL){s=e-i;break}i=l}if(s)return this.children[n].domFromPos(s-this.children[n].border,r);for(let i;n&&!(i=this.children[n-1]).size&&i instanceof QR&&i.side>=0;n--);if(r<=0){let i,a=!0;for(;i=n?this.children[n-1]:null,!(!i||i.dom.parentNode==this.contentDOM);n--,a=!1);return i&&r&&a&&!i.border&&!i.domAtom?i.domFromPos(i.size,r):{node:this.contentDOM,offset:i?Fr(i.dom)+1:0}}else{let i,a=!0;for(;i=n<this.children.length?this.children[n]:null,!(!i||i.dom.parentNode==this.contentDOM);n++,a=!1);return i&&a&&!i.border&&!i.domAtom?i.domFromPos(0,r):{node:this.contentDOM,offset:i?Fr(i.dom):this.contentDOM.childNodes.length}}}parseRange(e,r,n=0){if(this.children.length==0)return{node:this.contentDOM,from:e,to:r,fromOffset:0,toOffset:this.contentDOM.childNodes.length};let s=-1,i=-1;for(let a=n,l=0;;l++){let c=this.children[l],u=a+c.size;if(s==-1&&e<=u){let d=a+c.border;if(e>=d&&r<=u-c.border&&c.node&&c.contentDOM&&this.contentDOM.contains(c.contentDOM))return c.parseRange(e,r,d);e=a;for(let h=l;h>0;h--){let p=this.children[h-1];if(p.size&&p.dom.parentNode==this.contentDOM&&!p.emptyChildAt(1)){s=Fr(p.dom)+1;break}e-=p.size}s==-1&&(s=0)}if(s>-1&&(u>r||l==this.children.length-1)){r=u;for(let d=l+1;d<this.children.length;d++){let h=this.children[d];if(h.size&&h.dom.parentNode==this.contentDOM&&!h.emptyChildAt(-1)){i=Fr(h.dom);break}r+=h.size}i==-1&&(i=this.contentDOM.childNodes.length);break}a=u}return{node:this.contentDOM,from:e,to:r,fromOffset:s,toOffset:i}}emptyChildAt(e){if(this.border||!this.contentDOM||!this.children.length)return!1;let r=this.children[e<0?0:this.children.length-1];return r.size==0||r.emptyChildAt(e)}domAfterPos(e){let{node:r,offset:n}=this.domFromPos(e,0);if(r.nodeType!=1||n==r.childNodes.length)throw new RangeError("No node after pos "+e);return r.childNodes[n]}setSelection(e,r,n,s=!1){let i=Math.min(e,r),a=Math.max(e,r);for(let f=0,m=0;f<this.children.length;f++){let y=this.children[f],k=m+y.size;if(i>m&&a<k)return y.setSelection(e-m-y.border,r-m-y.border,n,s);m=k}let l=this.domFromPos(e,e?-1:1),c=r==e?l:this.domFromPos(r,r?-1:1),u=n.root.getSelection(),d=n.domSelectionRange(),h=!1;if((bs||mn)&&e==r){let{node:f,offset:m}=l;if(f.nodeType==3){if(h=!!(m&&f.nodeValue[m-1]==`
790`),h&&m==f.nodeValue.length)for(let y=f,k;y;y=y.parentNode){if(k=y.nextSibling){k.nodeName=="BR"&&(l=c={node:k.parentNode,offset:Fr(k)+1});break}let g=y.pmViewDesc;if(g&&g.node&&g.node.isBlock)break}}else{let y=f.childNodes[m-1];h=y&&(y.nodeName=="BR"||y.contentEditable=="false")}}if(bs&&d.focusNode&&d.focusNode!=c.node&&d.focusNode.nodeType==1){let f=d.focusNode.childNodes[d.focusOffset];f&&f.contentEditable=="false"&&(s=!0)}if(!(s||h&&mn)&&yc(l.node,l.offset,d.anchorNode,d.anchorOffset)&&yc(c.node,c.offset,d.focusNode,d.focusOffset))return;let p=!1;if((u.extend||e==r)&&!(h&&bs)){u.collapse(l.node,l.offset);try{e!=r&&u.extend(c.node,c.offset),p=!0}catch{}}if(!p){if(e>r){let m=l;l=c,c=m}let f=document.createRange();f.setEnd(c.node,c.offset),f.setStart(l.node,l.offset),u.removeAllRanges(),u.addRange(f)}}ignoreMutation(e){return!this.contentDOM&&e.type!="selection"}get contentLost(){return this.contentDOM&&this.contentDOM!=this.dom&&!this.dom.contains(this.contentDOM)}markDirty(e,r){for(let n=0,s=0;s<this.children.length;s++){let i=this.children[s],a=n+i.size;if(n==a?e<=a&&r>=n:e<a&&r>n){let l=n+i.border,c=a-i.border;if(e>=l&&r<=c){this.dirty=e==n||r==a?zl:l5,e==l&&r==c&&(i.contentLost||i.dom.parentNode!=this.contentDOM)?i.dirty=zi:i.markDirty(e-l,r-l);return}else i.dirty=i.dom==i.contentDOM&&i.dom.parentNode==this.contentDOM&&!i.children.length?zl:zi}n=a}this.dirty=zl}markParentsDirty(){let e=1;for(let r=this.parent;r;r=r.parent,e++){let n=e==1?zl:l5;r.dirty<n&&(r.dirty=n)}}get domAtom(){return!1}get ignoreForCoords(){return!1}get ignoreForSelection(){return!1}isText(e){return!1}}class QR extends vf{constructor(e,r,n,s){let i,a=r.type.toDOM;if(typeof a=="function"&&(a=a(n,()=>{if(!i)return s;if(i.parent)return i.parent.posBeforeChild(i)}
vendor: 4,618 bytes, line 790
790)),!r.type.spec.raw){if(a.nodeType!=1){let l=document.createElement("span");l.appendChild(a),a=l}a.contentEditable="false",a.classList.add("ProseMirror-widget")}super(e,[],a,null),this.widget=r,this.widget=r,i=this}matchesWidget(e){return this.dirty==ks&&e.type.eq(this.widget.type)}parseRule(){return{ignore:!0}}stopEvent(e){let r=this.widget.spec.stopEvent;return r?r(e):!1}ignoreMutation(e){return e.type!="selection"||this.widget.spec.ignoreSelection}destroy(){this.widget.type.destroy(this.dom),super.destroy()}get domAtom(){return!0}get ignoreForSelection(){return!!this.widget.type.spec.relaxedSide}get side(){return this.widget.type.side}}class qle extends vf{constructor(e,r,n,s){super(e,[],r,null),this.textDOM=n,this.text=s}get size(){return this.text.length}localPosFromDOM(e,r){return e!=this.textDOM?this.posAtStart+(r?this.size:0):this.posAtStart+r}domFromPos(e){return{node:this.textDOM,offset:e}}ignoreMutation(e){return e.type==="characterData"&&e.target.nodeValue==e.oldValue}}class xc extends vf{constructor(e,r,n,s,i){super(e,[],n,s),this.mark=r,this.spec=i}static create(e,r,n,s){let i=s.nodeViews[r.type.name],a=i&&i(r,s,n);return(!a||!a.dom)&&(a=Nc.renderSpec(document,r.type.spec.toDOM(r,n),null,r.attrs)),new xc(e,r,a.dom,a.contentDOM||a.dom,a)}parseRule(){return this.dirty&zi||this.mark.type.spec.reparseInView?null:{mark:this.mark.type.name,attrs:this.mark.attrs,contentElement:this.contentDOM}}matchesMark(e){return this.dirty!=zi&&this.mark.eq(e)}markDirty(e,r){if(super.markDirty(e,r),this.dirty!=ks){let n=this.parent;for(;!n.node;)n=n.parent;n.dirty<this.dirty&&(n.dirty=this.dirty),this.dirty=ks}}slice(e,r,n){let s=xc.create(this.parent,this.mark,!0,n),i=this.children,a=this.size;r<a&&(i=Jv(i,r,a,n)),e>0&&(i=Jv(i,0,e,n));for(let l=0;l<i.length;l++)i[l].parent=s;return s.children=i,s}ignoreMutation(e){return this.spec.ignoreMutation?this.spec.ignoreMutation(e):super.ignoreMutation(e)}destroy(){this.spec.destroy&&this.spec.destroy(),super.destroy()}}class Ao extends vf{constructor(e,r,n,s,i,a,l,c,u){super(e,[],i,a),this.node=r,this.outerDeco=n,this.innerDeco=s,this.nodeDOM=l}static create(e,r,n,s,i,a){let l=i.nodeViews[r.type.name],c,u=l&&l(r,i,()=>{if(!c)return a;if(c.parent)return c.parent.posBeforeChild(c)},n,s),d=u&&u.dom,h=u&&u.contentDOM;if(r.isText){if(!d)d=document.createTextNode(r.text);else if(d.nodeType!=3)throw new RangeError("Text must be rendered as a DOM text node")}else d||({dom:d,contentDOM:h}=Nc.renderSpec(document,r.type.spec.toDOM(r),null,r.attrs));!h&&!r.isText&&d.nodeName!="BR"&&(d.hasAttribute("contenteditable")||(d.contentEditable="false"),r.type.spec.draggable&&(d.draggable=!0));let p=d;return d=nL(d,n,r),u?c=new Kle(e,r,n,s,d,h||null,p,u,i,a+1):r.isText?new Xy(e,r,n,s,d,p,i):new Ao(e,r,n,s,d,h||null,p,i,a+1)}parseRule(){if(this.node.type.spec.reparseInView)return null;let e={node:this.node.type.name,attrs:this.node.attrs};if(this.node.type.whitespace=="pre"&&(e.preserveWhitespace="full"),!this.contentDOM)e.getContent=()=>this.node.content;else if(!this.contentLost)e.contentElement=this.contentDOM;else{for(let r=this.children.length-1;r>=0;r--){let n=this.children[r];if(this.dom.contains(n.dom.parentNode)){e.contentElement=n.dom.parentNode;break}}e.contentElement||(e.getContent=()=>Se.empty)}return e}matchesNode(e,r,n){return this.dirty==ks&&e.eq(this.node)&&cg(r,this.outerDeco)&&n.eq(this.innerDeco)}get size(){return this.node.nodeSize}get border(){return this.node.isLeaf?0:1}updateChildren(e,r){let n=this.node.inlineContent,s=r,i=e.composing?this.localCompositionInfo(e,r):null,a=i&&i.pos>-1?i:null,l=i&&i.pos<0,c=new Zle(this,a&&a.node,e);Xle(this.node,this.innerDeco,(u,d,h)=>{u.spec.marks?c.syncToMarks(u.spec.marks,n,e):u.type.side>=0&&!h&&c.syncToMarks(d==this.node.childCount?At.none:this.node.child(d).marks,n,e),c.placeWidget(u,e,s)},(u,d,h,p)=>{c.syncToMarks(u.marks,n,e);let f;c.findNodeMatch(u,d,h,p)||l&&e.state.selection.from>s&&e.state.selection.to<s+u.nodeSize&&(f=c.findIndexWithChild(i.node))>-1&&c.updateNodeAt(u,d,h,f,e)||c.updateNextNode(u,d,h,e,p,s)||c.addNode(u,d,h,e,s),s+=u.nodeSize}),c.syncToMarks([],n,e),this.node.isTextblock&&c.addTextblockHacks(),c.destroyRest(),(c.changed||this.dirty==zl)&&(a&&this.protectLocalComposition(e,a),tL(this.contentDOM,this.children,e),ad&&Qle(this.dom))}localCompositionInfo(e,r){let{from:n,to:s}=e.state.selection;if(!(e.state.selection instanceof Ze)||n<r||s>r+this.node.content.size)return null;let i=e.input.compositionNode;if(!i||!this.dom.contains(i.parentNode))return null;if(this.node.inlineContent){let a=i.nodeValue,l=ece(this.node.content,a,n-r,s-r);
vendor: 20,764 bytes, line 790
790return l<0?null:{node:i,pos:l,text:a}}else return{node:i,pos:-1,text:""}}protectLocalComposition(e,{node:r,pos:n,text:s}){if(this.getDesc(r))return;let i=r;for(;i.parentNode!=this.contentDOM;i=i.parentNode){for(;i.previousSibling;)i.parentNode.removeChild(i.previousSibling);for(;i.nextSibling;)i.parentNode.removeChild(i.nextSibling);i.pmViewDesc&&(i.pmViewDesc=void 0)}let a=new qle(this,i,r,s);e.input.compositionNodes.push(a),this.children=Jv(this.children,n,n+s.length,e,a)}update(e,r,n,s){return this.dirty==zi||!e.sameMarkup(this.node)?!1:(this.updateInner(e,r,n,s),!0)}updateInner(e,r,n,s){this.updateOuterDeco(r),this.node=e,this.innerDeco=n,this.contentDOM&&this.updateChildren(s,this.posAtStart),this.dirty=ks}updateOuterDeco(e){if(cg(e,this.outerDeco))return;let r=this.nodeDOM.nodeType!=1,n=this.dom;this.dom=rL(this.dom,this.nodeDOM,Yv(this.outerDeco,this.node,r),Yv(e,this.node,r)),this.dom!=n&&(n.pmViewDesc=void 0,this.dom.pmViewDesc=this),this.outerDeco=e}selectNode(){this.nodeDOM.nodeType==1&&(this.nodeDOM.classList.add("ProseMirror-selectednode"),(this.contentDOM||!this.node.type.spec.draggable)&&(this.nodeDOM.draggable=!0))}deselectNode(){this.nodeDOM.nodeType==1&&(this.nodeDOM.classList.remove("ProseMirror-selectednode"),(this.contentDOM||!this.node.type.spec.draggable)&&this.nodeDOM.removeAttribute("draggable"))}get domAtom(){return this.node.isAtom}}function c5(t,e,r,n,s){nL(n,e,t);let i=new Ao(void 0,t,e,r,n,n,n,s,0);return i.contentDOM&&i.updateChildren(s,0),i}class Xy extends Ao{constructor(e,r,n,s,i,a,l){super(e,r,n,s,i,null,a,l,0)}parseRule(){let e=this.nodeDOM.parentNode;for(;e&&e!=this.dom&&!e.pmIsDeco;)e=e.parentNode;return{skip:e||!0}}update(e,r,n,s){return this.dirty==zi||this.dirty!=ks&&!this.inParent()||!e.sameMarkup(this.node)?!1:(this.updateOuterDeco(r),(this.dirty!=ks||e.text!=this.node.text)&&e.text!=this.nodeDOM.nodeValue&&(this.nodeDOM.nodeValue=e.text,s.trackWrites==this.nodeDOM&&(s.trackWrites=null)),this.node=e,this.dirty=ks,!0)}inParent(){let e=this.parent.contentDOM;for(let r=this.nodeDOM;r;r=r.parentNode)if(r==e)return!0;return!1}domFromPos(e){return{node:this.nodeDOM,offset:e}}localPosFromDOM(e,r,n){return e==this.nodeDOM?this.posAtStart+Math.min(r,this.node.text.length):super.localPosFromDOM(e,r,n)}ignoreMutation(e){return e.type!="characterData"&&e.type!="selection"}slice(e,r,n){let s=this.node.cut(e,r),i=document.createTextNode(s.text);return new Xy(this.parent,s,this.outerDeco,this.innerDeco,i,i,n)}markDirty(e,r){super.markDirty(e,r),this.dom!=this.nodeDOM&&(e==0||r==this.nodeDOM.nodeValue.length)&&(this.dirty=zi)}get domAtom(){return!1}isText(e){return this.node.text==e}}class eL extends vf{parseRule(){return{ignore:!0}}matchesHack(e){return this.dirty==ks&&this.dom.nodeName==e}get domAtom(){return!0}get ignoreForCoords(){return this.dom.nodeName=="IMG"}}class Kle extends Ao{constructor(e,r,n,s,i,a,l,c,u,d){super(e,r,n,s,i,a,l,u,d),this.spec=c}update(e,r,n,s){if(this.dirty==zi)return!1;if(this.spec.update&&(this.node.type==e.type||this.spec.multiType)){let i=this.spec.update(e,r,n);return i&&this.updateInner(e,r,n,s),i}else return!this.contentDOM&&!e.isLeaf?!1:super.update(e,r,n,s)}selectNode(){this.spec.selectNode?this.spec.selectNode():super.selectNode()}deselectNode(){this.spec.deselectNode?this.spec.deselectNode():super.deselectNode()}setSelection(e,r,n,s){this.spec.setSelection?this.spec.setSelection(e,r,n.root):super.setSelection(e,r,n,s)}destroy(){this.spec.destroy&&this.spec.destroy(),super.destroy()}stopEvent(e){return this.spec.stopEvent?this.spec.stopEvent(e):!1}ignoreMutation(e){return this.spec.ignoreMutation?this.spec.ignoreMutation(e):super.ignoreMutation(e)}}function tL(t,e,r){let n=t.firstChild,s=!1;for(let i=0;i<e.length;i++){let a=e[i],l=a.dom;if(l.parentNode==t){for(;l!=n;)n=u5(n),s=!0;n=n.nextSibling}else s=!0,t.insertBefore(l,n);if(a instanceof xc){let c=n?n.previousSibling:t.lastChild;tL(a.contentDOM,a.children,r),n=c?c.nextSibling:t.firstChild}}for(;n;)n=u5(n),s=!0;s&&r.trackWrites==t&&(r.trackWrites=null)}const Hh=function(t){t&&(this.nodeName=t)};Hh.prototype=Object.create(null);const Pl=[new Hh];function Yv(t,e,r){if(t.length==0)return Pl;let n=r?Pl[0]:new Hh,s=[n];for(let i=0;i<t.length;i++){let a=t[i].type.attrs;if(a){a.nodeName&&s.push(n=new Hh(a.nodeName));for(let l in a){let c=a[l];c!=null&&(r&&s.length==1&&s.push(n=new Hh(e.isInline?"span":"div")),l=="class"?n.class=(n.class?n.class+" ":"")+c:l=="style"?n.style=(n.style?n.style+";":"")+c:l!="nodeName"&&(n[l]=c))}}}return s}function rL(t,e,r,n){if(r==Pl&&n==Pl)return e;let s=e;for(let i=0;i<n.length;i++){let a=n[i],l=r[i];if(i){let c;l&&l.nodeName==a.nodeName&&s!=t&&(c=s.parentNode)&&c.nodeName.toLowerCase()==a.nodeName||(c=document.createElement(a.nodeName),c.pmIsDeco=!0,c.appendChild(s),l=Pl[0]),s=c}Gle(s,l||Pl[0],a)}return s}function Gle(t,e,r){for(let n in e)n!="class"&&n!="style"&&n!="nodeName"&&!(n in r)&&t.removeAttribute(n);for(let n in r)n!="class"&&n!="style"&&n!="nodeName"&&r[n]!=e[n]&&t.setAttribute(n,r[n]);if(e.class!=r.class){let n=e.class?e.class.split(" ").filter(Boolean):[],s=r.class?r.class.split(" ").filter(Boolean):[];for(let i=0;i<n.length;i++)s.indexOf(n[i])==-1&&t.classList.remove(n[i]);for(let i=0;i<s.length;i++)n.indexOf(s[i])==-1&&t.classList.add(s[i]);t.classList.length==0&&t.removeAttribute("class")}if(e.style!=r.style){if(e.style){let n=/\s*([\w\-\xa1-\uffff]+)\s*:(?:"(?:\\.|[^"])*"|'(?:\\.|[^'])*'|\(.*?\)|[^;])*/g,s;for(;s=n.exec(e.style);)t.style.removeProperty(s[1])}r.style&&(t.style.cssText+=r.style)}}function nL(t,e,r){return rL(t,t,Pl,Yv(e,r,t.nodeType!=1))}function cg(t,e){if(t.length!=e.length)return!1;for(let r=0;r<t.length;r++)if(!t[r].type.eq(e[r].type))return!1;return!0}function u5(t){let e=t.nextSibling;return t.parentNode.removeChild(t),e}class Zle{constructor(e,r,n){this.lock=r,this.view=n,this.index=0,this.stack=[],this.changed=!1,this.top=e,this.preMatch=Yle(e.node.content,e)}destroyBetween(e,r){if(e!=r){for(let n=e;n<r;n++)this.top.children[n].destroy();this.top.children.splice(e,r-e),this.changed=!0}}destroyRest(){this.destroyBetween(this.index,this.top.children.length)}syncToMarks(e,r,n){let s=0,i=this.stack.length>>1,a=Math.min(i,e.length);for(;s<a&&(s==i-1?this.top:this.stack[s+1<<1]).matchesMark(e[s])&&e[s].type.spec.spanning!==!1;)s++;for(;s<i;)this.destroyRest(),this.top.dirty=ks,this.index=this.stack.pop(),this.top=this.stack.pop(),i--;for(;i<e.length;){this.stack.push(this.top,this.index+1);let l=-1;for(let c=this.index;c<Math.min(this.index+3,this.top.children.length);c++){let u=this.top.children[c];if(u.matchesMark(e[i])&&!this.isLocked(u.dom)){l=c;break}}if(l>-1)l>this.index&&(this.changed=!0,this.destroyBetween(this.index,l)),this.top=this.top.children[this.index];else{let c=xc.create(this.top,e[i],r,n);this.top.children.splice(this.index,0,c),this.top=c,this.changed=!0}this.index=0,i++}}findNodeMatch(e,r,n,s){let i=-1,a;if(s>=this.preMatch.index&&(a=this.preMatch.matches[s-this.preMatch.index]).parent==this.top&&a.matchesNode(e,r,n))i=this.top.children.indexOf(a,this.index);else for(let l=this.index,c=Math.min(this.top.children.length,l+5);l<c;l++){let u=this.top.children[l];if(u.matchesNode(e,r,n)&&!this.preMatch.matched.has(u)){i=l;break}}return i<0?!1:(this.destroyBetween(this.index,i),this.index++,!0)}updateNodeAt(e,r,n,s,i){let a=this.top.children[s];return a.dirty==zi&&a.dom==a.contentDOM&&(a.dirty=zl),a.update(e,r,n,i)?(this.destroyBetween(this.index,s),this.index++,!0):!1}findIndexWithChild(e){for(;;){let r=e.parentNode;if(!r)return-1;if(r==this.top.contentDOM){let n=e.pmViewDesc;if(n){for(let s=this.index;s<this.top.children.length;s++)if(this.top.children[s]==n)return s}return-1}e=r}}updateNextNode(e,r,n,s,i,a){for(let l=this.index;l<this.top.children.length;l++){let c=this.top.children[l];if(c instanceof Ao){let u=this.preMatch.matched.get(c);if(u!=null&&u!=i)return!1;let d=c.dom,h,p=this.isLocked(d)&&!(e.isText&&c.node&&c.node.isText&&c.nodeDOM.nodeValue==e.text&&c.dirty!=zi&&cg(r,c.outerDeco));if(!p&&c.update(e,r,n,s))return this.destroyBetween(this.index,l),c.dom!=d&&(this.changed=!0),this.index++,!0;if(!p&&(h=this.recreateWrapper(c,e,r,n,s,a)))return this.destroyBetween(this.index,l),this.top.children[this.index]=h,h.contentDOM&&(h.dirty=zl,h.updateChildren(s,a+1),h.dirty=ks),this.changed=!0,this.index++,!0;break}}return!1}recreateWrapper(e,r,n,s,i,a){if(e.dirty||r.isAtom||!e.children.length||!e.node.content.eq(r.content)||!cg(n,e.outerDeco)||!s.eq(e.innerDeco))return null;let l=Ao.create(this.top,r,n,s,i,a);if(l.contentDOM){l.children=e.children,e.children=[];for(let c of l.children)c.parent=l}return e.destroy(),l}addNode(e,r,n,s,i){let a=Ao.create(this.top,e,r,n,s,i);a.contentDOM&&a.updateChildren(s,i+1),this.top.children.splice(this.index++,0,a),this.changed=!0}placeWidget(e,r,n){let s=this.index<this.top.children.length?this.top.children[this.index]:null;if(s&&s.matchesWidget(e)&&(e==s.widget||!s.widget.type.toDOM.parentNode))this.index++;else{let i=new QR(this.top,e,r,n);this.top.children.splice(this.index++,0,i),this.changed=!0}}addTextblockHacks(){let e=this.top.children[this.index-1],r=this.top;for(;e instanceof xc;)r=e,e=r.children[r.children.length-1];(!e||!(e instanceof Xy)||/\n$/.test(e.node.text)||this.view.requiresGeckoHackNode&&/\s$/.test(e.node.text))&&((mn||Xr)&&e&&e.dom.contentEditable=="false"&&this.addHackNode("IMG",r),this.addHackNode("BR",this.top))}addHackNode(e,r){if(r==this.top&&this.index<r.children.length&&r.children[this.index].matchesHack(e))this.index++;else{let n=document.createElement(e);e=="IMG"&&(n.className="ProseMirror-separator",n.alt=""),e=="BR"&&(n.className="ProseMirror-trailingBreak");let s=new eL(this.top,[],n,null);r!=this.top?r.children.push(s):r.children.splice(this.index++,0,s),this.changed=!0}}isLocked(e){return this.lock&&(e==this.lock||e.nodeType==1&&e.contains(this.lock.parentNode))}}function Yle(t,e){let r=e,n=r.children.length,s=t.childCount,i=new Map,a=[];e:for(;s>0;){let l;for(;;)if(n){let u=r.children[n-1];if(u instanceof xc)r=u,n=u.children.length;else{l=u,n--;break}}else{if(r==e)break e;n=r.parent.children.indexOf(r),r=r.parent}let c=l.node;if(c){if(c!=t.child(s-1))break;--s,i.set(l,s),a.push(l)}}return{index:s,matched:i,matches:a.reverse()}}function Jle(t,e){return t.type.side-e.type.side}function Xle(t,e,r,n){let s=e.locals(t),i=0;if(s.length==0){for(let u=0;u<t.childCount;u++){let d=t.child(u);n(d,s,e.forChild(i,d),u),i+=d.nodeSize}return}let a=0,l=[],c=null;for(let u=0;;){let d,h;for(;a<s.length&&s[a].to==i;){let k=s[a++];k.widget&&(d?(h||(h=[d])).push(k):d=k)}if(d)if(h){h.sort(Jle);for(let k=0;k<h.length;k++)r(h[k],u,!!c)}else r(d,u,!!c);let p,f;if(c)f=-1,p=c,c=null;else if(u<t.childCount)f=u,p=t.child(u++);else break;for(let k=0;k<l.length;k++)l[k].to<=i&&l.splice(k--,1);for(;a<s.length&&s[a].from<=i&&s[a].to>i;)l.push(s[a++]);let m=i+p.nodeSize;if(p.isText){let k=m;a<s.length&&s[a].from<k&&(k=s[a].from);for(let g=0;g<l.length;g++)l[g].to<k&&(k=l[g].to);k<m&&(c=p.cut(k-i),p=p.cut(0,k-i),m=k,f=-1)}else for(;a<s.length&&s[a].to<m;)a++;let y=p.isInline&&!p.isLeaf?l.filter(k=>!k.inline):l.slice();n(p,y,e.forChild(i,p),f),i=m}}function Qle(t){if(t.nodeName=="UL"||t.nodeName=="OL"){let e=t.style.cssText;t.style.cssText=e+"; list-style: square !important",window.getComputedStyle(t).listStyle,t.style.cssText=e}}function ece(t,e,r,n){for(let s=0,i=0;s<t.childCount&&i<=n;){let a=t.child(s++),l=i;if(i+=a.nodeSize,!a.isText)continue;let c=a.text;for(;s<t.childCount;){let u=t.child(s++);if(i+=u.nodeSize,!u.isText)break;c+=u.text}if(i>=r){if(i>=n&&c.slice(n-e.length-l,n-l)==e)return n-e.length;let u=l<n?c.lastIndexOf(e,n-l-1):-1;if(u>=0&&u+e.length+l>=r)return l+u;if(r==n&&c.length>=n+e.length-l&&c.slice(n-l,n-l+e.length)==e)return n}}return-1}function Jv(t,e,r,n,s){let i=[];for(let a=0,l=0;a<t.length;a++){let c=t[a],u=l,d=l+=c.size;u>=r||d<=e?i.push(c):(u<e&&i.push(c.slice(0,e-u,n)),s&&(i.push(s),s=void 0),d>r&&i.push(c.slice(r-u,c.size,n)))}return i}function GS(t,e=null){let r=t.domSelectionRange(),n=t.state.doc;if(!r.focusNode)return null;let s=t.docView.nearestDesc(r.focusNode),i=s&&s.size==0,a=t.docView.posFromDOM(r.focusNode,r.focusOffset,1);if(a<0)return null;let l=n.resolve(a),c,u;if(Jy(r)){for(c=a;s&&!s.node;)s=s.parent;let h=s.node;if(s&&h.isAtom&&Ve.isSelectable(h)&&s.parent&&!(h.isInline&&Cle(r.focusNode,r.focusOffset,s.dom))){let p=s.posBefore;u=new Ve(a==p?l:n.resolve(p))}}else{if(r instanceof t.dom.ownerDocument.defaultView.Selection&&r.rangeCount>1){let h=a,p=a;for(let f=0;f<r.rangeCount;f++){let m=r.getRangeAt(f);h=Math.min(h,t.docView.posFromDOM(m.startContainer,m.startOffset,1)),p=Math.max(p,t.docView.posFromDOM(m.endContainer,m.endOffset,-1))}if(h<0)return null;[c,a]=p==t.state.selection.anchor?[p,h]:[h,p],l=n.resolve(a)}else c=t.docView.posFromDOM(r.anchorNode,r.anchorOffset,1);if(c<0)return null}let d=n.resolve(c);if(!u){let h=e=="pointer"||t.state.selection.head<l.pos&&!i?1:-1;u=ZS(t,d,l,h)}return u}function sL(t){return t.editable?t.hasFocus():aL(t)&&document.activeElement&&document.activeElement.contains(t.dom)}function la(t,e=!1){let r=t.state.selection;if(iL(t,r),!!sL(t)){if(!e&&t.input.mouseDown&&t.input.mouseDown.allowDefault&&Xr){let n=t.domSelectionRange(),s=t.domObserver.currentSelection;if(n.anchorNode&&s.anchorNode&&yc(n.anchorNode,n.anchorOffset,s.anchorNode,s.anchorOffset)){t.input.mouseDown.delayedSelectionSync=!0,t.domObserver.setCurSelection();return}}if(t.domObserver.disconnectSelection(),t.cursorWrapper)rce(t);else{let{anchor:n,head:s}=r,i,a;d5&&!(r instanceof Ze)&&(r.$from.parent.inlineContent||(i=h5(t,r.from)),!r.empty&&!r.$from.parent.inlineContent&&(a=h5(t,r.to))),t.docView.setSelection(n,s,t,e),d5&&(i&&p5(i),a&&p5(a)),r.visible?t.dom.classList.remove("ProseMirror-hideselection"):(t.dom.classList.add("ProseMirror-hideselection"),"onselectionchange"in document&&tce(t))}t.domObserver.setCurSelection(),t.domObserver.connectSelection()}}const d5=mn||Xr&&qR<63;function h5(t,e){let{node:r,offset:n}=t.docView.domFromPos(e,0),s=n<r.childNodes.length?r.childNodes[n]:null,i=n?r.childNodes[n-1]:null;if(mn&&s&&s.contentEditable=="false")return Ow(s);if((!s||s.contentEditable=="false")&&(!i||i.contentEditable=="false")){if(s)return Ow(s);if(i)return Ow(i)}}function Ow(t){return t.contentEditable="true",mn&&t.draggable&&(t.draggable=!1,t.wasDraggable=!0),t}function p5(t){t.contentEditable="false",t.wasDraggable&&(t.draggable=!0,t.wasDraggable=null)}function tce(t){let e=t.dom.ownerDocument;e.removeEventListener("selectionchange",t.input.hideSelectionGuard);let r=t.domSelectionRange(),n=r.anchorNode,s=r.anchorOffset;e.addEventListener("selectionchange",t.input.hideSelectionGuard=()=>{(r.anchorNode!=n||r.anchorOffset!=s)&&(e.removeEventListener("selectionchange",t.input.hideSelectionGuard),setTimeout(()=>{(!sL(t)||t.state.selection.visible)&&t.dom.classList.remove("ProseMirror-hideselection")},20))})}function rce(t){let e=t.domSelection();if(!e)return;let r=t.cursorWrapper.dom,n=r.nodeName=="IMG";n?e.collapse(r.parentNode,Fr(r)+1):e.collapse(r,0),!n&&!t.state.selection.visible&&Dn&&To<=11&&(r.disabled=!0,r.disabled=!1)}function iL(t,e){if(e instanceof Ve){let r=t.docView.descAt(e.from);r!=t.lastSelectedViewDesc&&(f5(t),r&&r.selectNode(),t.lastSelectedViewDesc=r)}else f5(t)}function f5(t){t.lastSelectedViewDesc&&(t.lastSelectedViewDesc.parent&&t.lastSelectedViewDesc.deselectNode(),t.lastSelectedViewDesc=void 0)}function ZS(t,e,r,n){return t.someProp("createSelectionBetween",s=>s(t,e,r))||Ze.between(e,r,n)}function m5(t){return t.editable&&!t.hasFocus()?!1:aL(t)}function aL(t){let e=t.domSelectionRange();if(!e.anchorNode)return!1;try{return t.dom.contains(e.anchorNode.nodeType==3?e.anchorNode.parentNode:e.anchorNode)&&(t.editable||t.dom.contains(e.focusNode.nodeType==3?e.focusNode.parentNode:e.focusNode))}catch{return!1}}function nce(t){let e=t.docView.domFromPos(t.state.selection.anchor,0),r=t.domSelectionRange();return yc(e.node,e.offset,r.anchorNode,r.anchorOffset)}function Xv(t,e){let{$anchor:r,$head:n}=t.selection,s=e>0?r.max(n):r.min(n),i=s.parent.inlineContent?s.depth?t.doc.resolve(e>0?s.after():s.before()):null:s;return i&&rt.findFrom(i,e)}function Ba(t,e){return t.dispatch(t.state.tr.setSelection(e).scrollIntoView()),!0}function g5(t,e,r){let n=t.state.selection;if(n instanceof Ze)if(r.indexOf("s")>-1){let{$head:s}=n,i=s.textOffset?null:e<0?s.nodeBefore:s.nodeAfter;if(!i||i.isText||!i.isLeaf)return!1;let a=t.state.doc.resolve(s.pos+i.nodeSize*(e<0?-1:1));return Ba(t,new Ze(n.$anchor,a))}else if(n.empty){if(t.endOfTextblock(e>0?"forward":"backward")){let s=Xv(t.state,e);return s&&s instanceof Ve?Ba(t,s):!1}else if(!(hs&&r.indexOf("m")>-1)){let s=n.$head,i=s.textOffset?null:e<0?s.nodeBefore:s.nodeAfter,a;if(!i||i.isText)return!1;let l=e<0?s.pos-i.nodeSize:s.pos;return i.isAtom||(a=t.docView.descAt(l))&&!a.contentDOM?Ve.isSelectable(i)?Ba(t,new Ve(e<0?t.state.doc.resolve(s.pos-i.nodeSize):s)):kf?Ba(t,new Ze(t.state.doc.resolve(e<0?l:l+i.nodeSize))):!1:!1}}else return!1;else{if(n instanceof Ve&&n.node.isInline)return Ba(t,new Ze(e>0?n.$to:n.$from));{let s=Xv(t.state,e);return s?Ba(t,s):!1}}}function ug(t){return t.nodeType==3?t.nodeValue.length:t.childNodes.length}function qh(t,e){let r=t.pmViewDesc;return r&&r.size==0&&(e<0||t.nextSibling||t.nodeName!="BR")}function Lc(t,e){return e<0?sce(t):ice(t)}function sce(t){let e=t.domSelectionRange(),r=e.focusNode,n=e.focusOffset;if(!r)return;let s,i,a=!1;for(bs&&r.nodeType==1&&n<ug(r)&&qh(r.childNodes[n],-1)&&(a=!0);;)if(n>0){if(r.nodeType!=1)break;{let l=r.childNodes[n-1];if(qh(l,-1))s=r,i=--n;else if(l.nodeType==3)r=l,n=r.nodeValue.length;else break}}else{if(oL(r))break;{let l=r.previousSibling;for(;l&&qh(l,-1);)s=r.parentNode,i=Fr(l),l=l.previousSibling;if(l)r=l,n=ug(r);else{if(r=r.parentNode,r==t.dom)break;n=0}}}a?Qv(t,r,n):s&&Qv(t,s,i)}function ice(t){let e=t.domSelectionRange(),r=e.focusNode,n=e.focusOffset;if(!r)return;let s=ug(r),i,a;for(;;)if(n<s){if(r.nodeType!=1)break;let l=r.childNodes[n];if(qh(l,1))i=r,a=++n;else break}else{if(oL(r))break;{let l=r.nextSibling;for(;l&&qh(l,1);)i=l.parentNode,a=Fr(l)+1,l=l.nextSibling;if(l)r=l,n=0,s=ug(r);else{if(r=r.parentNode,r==t.dom)break;n=s=0}}}i&&Qv(t,i,a)}function oL(t){let e=t.pmViewDesc;return e&&e.node&&e.node.isBlock}function ace(t,e){for(;t&&e==t.childNodes.length&&!bf(t);)e=Fr(t)+1,t=t.parentNode;for(;t&&e<t.childNodes.length;){let r=t.childNodes[e];if(r.nodeType==3)return r;if(r.nodeType==1&&r.contentEditable=="false")break;t=r,e=0}}function oce(t,e){for(;t&&!e&&!bf(t);)e=Fr(t),t=t.parentNode;for(;t&&e;){let r=t.childNodes[e-1];if(r.nodeType==3)return r;if(r.nodeType==1&&r.contentEditable=="false")break;t=r,e=t.childNodes.length}}function Qv(t,e,r){if(e.nodeType!=3){let i,a;(a=ace(e,r))?(e=a,r=0):(i=oce(e,r))&&(e=i,r=i.nodeValue.length)}let n=t.domSelection();if(!n)return;if(Jy(n)){let i=document.createRange();i.setEnd(e,r),i.setStart(e,r),n.removeAllRanges(),n.addRange(i)}else n.extend&&n.extend(e,r);t.domObserver.setCurSelection();let{state:s}=t;setTimeout(()=>{t.state==s&&la(t)},50)}function y5(t,e){let r=t.state.doc.resolve(e);if(!(Xr||Ale)&&r.parent.inlineContent){let s=t.coordsAtPos(e);if(e>r.start()){let i=t.coordsAtPos(e-1),a=(i.top+i.bottom)/2;if(a>s.top&&a<s.bottom&&Math.abs(i.left-s.left)>1)return i.left<s.left?"ltr":"rtl"}if(e<r.end()){let i=t.coordsAtPos(e+1),a=(i.top+i.bottom)/2;if(a>s.top&&a<s.bottom&&Math.abs(i.left-s.left)>1)return i.left>s.left?"ltr":"rtl"}}return getComputedStyle(t.dom).direction=="rtl"?"rtl":"ltr"}function x5(t,e,r){let n=t.state.selection;if(n instanceof Ze&&!n.empty||r.indexOf("s")>-1||hs&&r.indexOf("m")>-1)return!1;let{$from:s,$to:i}=n;if(!s.parent.inlineContent||t.endOfTextblock(e<0?"up":"down")){let a=Xv(t.state,e);if(a&&a instanceof Ve)return Ba(t,a)}if(!s.parent.inlineContent){let a=e<0?s:i,l=n instanceof Gn?rt.near(a,e):rt.findFrom(a,e);return l?Ba(t,l):!1}return!1}function w5(t,e){if(!(t.state.selection instanceof Ze))return!0;let{$head:r,$anchor:n,empty:s}=t.state.selection;if(!r.sameParent(n))return!0;if(!s)return!1;if(t.endOfTextblock(e>0?"forward":"backward"))return!0;let i=!r.textOffset&&(e<0?r.nodeBefore:r.nodeAfter);if(i&&!i.isText){let a=t.state.tr;return e<0?a.delete(r.pos-i.nodeSize,r.pos):a.delete(r.pos,r.pos+i.nodeSize),t.dispatch(a),!0}return!1}function b5(t,e,r){t.domObserver.stop(),e.contentEditable=r,t.domObserver.start()}function lce(t){if(!mn||t.state.selection.$head.parentOffset>0)return!1;let{focusNode:e,focusOffset:r}=t.domSelectionRange();if(e&&e.nodeType==1&&r==0&&e.firstChild&&e.firstChild.contentEditable=="false"){let n=e.firstChild;b5(t,n,"true"),setTimeout(()=>b5(t,n,"false"),20)}return!1}function cce(t){let e="";
vendor: 4,166 bytes, lines 790-793
790return t.ctrlKey&&(e+="c"),t.metaKey&&(e+="m"),t.altKey&&(e+="a"),t.shiftKey&&(e+="s"),e}function uce(t,e){let r=e.keyCode,n=cce(e);if(r==8||hs&&r==72&&n=="c")return w5(t,-1)||Lc(t,-1);if(r==46&&!e.shiftKey||hs&&r==68&&n=="c")return w5(t,1)||Lc(t,1);if(r==13||r==27)return!0;if(r==37||hs&&r==66&&n=="c"){let s=r==37?y5(t,t.state.selection.from)=="ltr"?-1:1:-1;return g5(t,s,n)||Lc(t,s)}else if(r==39||hs&&r==70&&n=="c"){let s=r==39?y5(t,t.state.selection.from)=="ltr"?1:-1:1;return g5(t,s,n)||Lc(t,s)}else{if(r==38||hs&&r==80&&n=="c")return x5(t,-1,n)||Lc(t,-1);if(r==40||hs&&r==78&&n=="c")return lce(t)||x5(t,1,n)||Lc(t,1);if(n==(hs?"m":"c")&&(r==66||r==73||r==89||r==90))return!0}return!1}function YS(t,e){t.someProp("transformCopied",f=>{e=f(e,t)});let r=[],{content:n,openStart:s,openEnd:i}=e;for(;s>1&&i>1&&n.childCount==1&&n.firstChild.childCount==1;){s--,i--;let f=n.firstChild;r.push(f.type.name,f.attrs!=f.type.defaultAttrs?f.attrs:null),n=f.content}let a=t.someProp("clipboardSerializer")||Nc.fromSchema(t.state.schema),l=pL(),c=l.createElement("div");c.appendChild(a.serializeFragment(n,{document:l}));let u=c.firstChild,d,h=0;for(;u&&u.nodeType==1&&(d=hL[u.nodeName.toLowerCase()]);){for(let f=d.length-1;f>=0;f--){let m=l.createElement(d[f]);for(;c.firstChild;)m.appendChild(c.firstChild);c.appendChild(m),h++}u=c.firstChild}u&&u.nodeType==1&&u.setAttribute("data-pm-slice",`${s} ${i}${h?` -${h}`:""} ${JSON.stringify(r)}`);let p=t.someProp("clipboardTextSerializer",f=>f(e,t))||e.content.textBetween(0,e.content.size,`
791
792`);return{dom:c,text:p,slice:e}}function lL(t,e,r,n,s){let i=s.parent.type.spec.code,a,l;if(!r&&!e)return null;let c=!!e&&(n||i||!r);if(c){if(t.someProp("transformPastedText",p=>{e=p(e,i||n,t)}),i)return l=new Ie(Se.from(t.state.schema.text(e.replace(/\r\n?/g,`
793`))),0,0),t.someProp("transformPasted",p=>{l=p(l,t,!0)}),l;let h=t.someProp("clipboardTextParser",p=>p(e,s,n,t));if(h)l=h;else{let p=s.marks(),{schema:f}=t.state,m=Nc.fromSchema(f);a=document.createElement("div"),e.split(/(?:\r\n?|\n)+/).forEach(y=>{let k=a.appendChild(document.createElement("p"));y&&k.appendChild(m.serializeNode(f.text(y,p)))})}}else t.someProp("transformPastedHTML",h=>{r=h(r,t)}),a=fce(r),kf&&mce(a);let u=a&&a.querySelector("[data-pm-slice]"),d=u&&/^(\d+) (\d+)(?: -(\d+))? (.*)/.exec(u.getAttribute("data-pm-slice")||"");if(d&&d[3])for(let h=+d[3];h>0;h--){let p=a.firstChild;for(;p&&p.nodeType!=1;)p=p.nextSibling;if(!p)break;a=p}if(l||(l=(t.someProp("clipboardParser")||t.someProp("domParser")||Eo.fromSchema(t.state.schema)).parseSlice(a,{preserveWhitespace:!!(c||d),context:s,ruleFromNode(p){return p.nodeName=="BR"&&!p.nextSibling&&p.parentNode&&!dce.test(p.parentNode.nodeName)?{ignore:!0}:null}})),d)l=gce(k5(l,+d[1],+d[2]),d[4]);else if(l=Ie.maxOpen(hce(l.content,s),!0),l.openStart||l.openEnd){let h=0,p=0;for(let f=l.content.firstChild;h<l.openStart&&!f.type.spec.isolating;h++,f=f.firstChild);for(let f=l.content.lastChild;p<l.openEnd&&!f.type.spec.isolating;p++,f=f.lastChild);l=k5(l,h,p)}return t.someProp("transformPasted",h=>{l=h(l,t,c)}),l}const dce=/^(a|abbr|acronym|b|cite|code|del|em|i|ins|kbd|label|output|q|ruby|s|samp|span|strong|sub|sup|time|u|tt|var)$/i;function hce(t,e){if(t.childCount<2)return t;for(let r=e.depth;r>=0;r--){let s=e.node(r).contentMatchAt(e.index(r)),i,a=[];if(t.forEach(l=>{if(!a)return;let c=s.findWrapping(l.type),u;if(!c)return a=null;if(u=a.length&&i.length&&uL(c,i,l,a[a.length-1],0))a[a.length-1]=u;else{a.length&&(a[a.length-1]=dL(a[a.length-1],i.length));let d=cL(l,c);a.push(d),s=s.matchType(d.type),i=c}}),a)return Se.from(a)}return t}function cL(t,e,r=0){for(let n=e.length-1;n>=r;n--)t=e[n].create(null,Se.from(t));return t}function uL(t,e,r,n,s){if(s<t.length&&s<e.length&&t[s]==e[s]){let i=uL(t,e,r,n.lastChild,s+1);if(i)return n.copy(n.content.replaceChild(n.childCount-1,i));if(n.contentMatchAt(n.childCount).matchType(s==t.length-1?r.type:t[s+1]))return n.copy(n.content.append(Se.from(cL(r,t,s+1))))}}function dL(t,e){if(e==0)return t;let r=t.content.replaceChild(t.childCount-1,dL(t.lastChild,e-1)),n=t.contentMatchAt(t.childCount).fillBefore(Se.empty,!0);return t.copy(r.append(n))}
vendor: 4,978 bytes, line 793
793function e2(t,e,r,n,s,i){let a=e<0?t.firstChild:t.lastChild,l=a.content;return t.childCount>1&&(i=0),s<n-1&&(l=e2(l,e,r,n,s+1,i)),s>=r&&(l=e<0?a.contentMatchAt(0).fillBefore(l,i<=s).append(l):l.append(a.contentMatchAt(a.childCount).fillBefore(Se.empty,!0))),t.replaceChild(e<0?0:t.childCount-1,a.copy(l))}function k5(t,e,r){return e<t.openStart&&(t=new Ie(e2(t.content,-1,e,t.openStart,0,t.openEnd),e,t.openEnd)),r<t.openEnd&&(t=new Ie(e2(t.content,1,r,t.openEnd,0,0),t.openStart,r)),t}const hL={thead:["table"],tbody:["table"],tfoot:["table"],caption:["table"],colgroup:["table"],col:["table","colgroup"],tr:["table","tbody"],td:["table","tbody","tr"],th:["table","tbody","tr"]};let v5=null;function pL(){return v5||(v5=document.implementation.createHTMLDocument("title"))}let Rw=null;function pce(t){let e=window.trustedTypes;return e?(Rw||(Rw=e.defaultPolicy||e.createPolicy("ProseMirrorClipboard",{createHTML:r=>r})),Rw.createHTML(t)):t}function fce(t){let e=/^(\s*<meta [^>]*>)*/.exec(t);e&&(t=t.slice(e[0].length));let r=pL().createElement("div"),n=/<([a-z][^>\s]+)/i.exec(t),s;if((s=n&&hL[n[1].toLowerCase()])&&(t=s.map(i=>"<"+i+">").join("")+t+s.map(i=>"</"+i+">").reverse().join("")),r.innerHTML=pce(t),s)for(let i=0;i<s.length;i++)r=r.querySelector(s[i])||r;return r}function mce(t){let e=t.querySelectorAll(Xr?"span:not([class]):not([style])":"span.Apple-converted-space");for(let r=0;r<e.length;r++){let n=e[r];n.childNodes.length==1&&n.textContent==" "&&n.parentNode&&n.parentNode.replaceChild(t.ownerDocument.createTextNode(" "),n)}}function gce(t,e){if(!t.size)return t;let r=t.content.firstChild.type.schema,n;try{n=JSON.parse(e)}catch{return t}let{content:s,openStart:i,openEnd:a}=t;for(let l=n.length-2;l>=0;l-=2){let c=r.nodes[n[l]];if(!c||c.hasRequiredAttrs())break;s=Se.from(c.create(n[l+1],s)),i++,a++}return new Ie(s,i,a)}const gn={},yn={},yce={touchstart:!0,touchmove:!0};class xce{constructor(){this.shiftKey=!1,this.mouseDown=null,this.lastKeyCode=null,this.lastKeyCodeTime=0,this.lastClick={time:0,x:0,y:0,type:"",button:0},this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastIOSEnter=0,this.lastIOSEnterFallbackTimeout=-1,this.lastFocus=0,this.lastTouch=0,this.lastChromeDelete=0,this.composing=!1,this.compositionNode=null,this.composingTimeout=-1,this.compositionNodes=[],this.compositionEndedAt=-2e8,this.compositionID=1,this.compositionPendingChanges=0,this.domChangeCount=0,this.eventHandlers=Object.create(null),this.hideSelectionGuard=null}}function wce(t){for(let e in gn){let r=gn[e];t.dom.addEventListener(e,t.input.eventHandlers[e]=n=>{kce(t,n)&&!JS(t,n)&&(t.editable||!(n.type in yn))&&r(t,n)},yce[e]?{passive:!0}:void 0)}mn&&t.dom.addEventListener("input",()=>null),t2(t)}function ho(t,e){t.input.lastSelectionOrigin=e,t.input.lastSelectionTime=Date.now()}function bce(t){t.domObserver.stop();for(let e in t.input.eventHandlers)t.dom.removeEventListener(e,t.input.eventHandlers[e]);clearTimeout(t.input.composingTimeout),clearTimeout(t.input.lastIOSEnterFallbackTimeout)}function t2(t){t.someProp("handleDOMEvents",e=>{for(let r in e)t.input.eventHandlers[r]||t.dom.addEventListener(r,t.input.eventHandlers[r]=n=>JS(t,n))})}function JS(t,e){return t.someProp("handleDOMEvents",r=>{let n=r[e.type];return n?n(t,e)||e.defaultPrevented:!1})}function kce(t,e){if(!e.bubbles)return!0;if(e.defaultPrevented)return!1;for(let r=e.target;r!=t.dom;r=r.parentNode)if(!r||r.nodeType==11||r.pmViewDesc&&r.pmViewDesc.stopEvent(e))return!1;return!0}function vce(t,e){!JS(t,e)&&gn[e.type]&&(t.editable||!(e.type in yn))&&gn[e.type](t,e)}yn.keydown=(t,e)=>{let r=e;if(t.input.shiftKey=r.keyCode==16||r.shiftKey,!mL(t,r)&&(t.input.lastKeyCode=r.keyCode,t.input.lastKeyCodeTime=Date.now(),!(ta&&Xr&&r.keyCode==13)))if(r.keyCode!=229&&t.domObserver.forceFlush(),ad&&r.keyCode==13&&!r.ctrlKey&&!r.altKey&&!r.metaKey){let n=Date.now();t.input.lastIOSEnter=n,t.input.lastIOSEnterFallbackTimeout=setTimeout(()=>{t.input.lastIOSEnter==n&&(t.someProp("handleKeyDown",s=>s(t,wl(13,"Enter"))),t.input.lastIOSEnter=0)},200)}else t.someProp("handleKeyDown",n=>n(t,r))||uce(t,r)?r.preventDefault():ho(t,"key")};yn.keyup=(t,e)=>{e.keyCode==16&&(t.input.shiftKey=!1)};yn.keypress=(t,e)=>{let r=e;if(mL(t,r)||!r.charCode||r.ctrlKey&&!r.altKey||hs&&r.metaKey)return;if(t.someProp("handleKeyPress",s=>s(t,r))){r.preventDefault();return}let n=t.state.selection;if(!(n instanceof Ze)||!n.$from.sameParent(n.$to)){let s=String.fromCharCode(r.charCode),i=()=>t.state.tr.insertText(s).scrollIntoView();!/[\r\n]/.test(s)&&!t.someProp("handleTextInput",a=>a(t,n.$from.pos,n.$to.pos,s,i))&&t.dispatch(i()),r.preventDefault()}};function Qy(t){return{left:t.clientX,top:t.clientY}}function jce(t,e){let r=e.x-t.clientX,n=e.y-t.clientY;return r*r+n*n<100}function XS(t,e,r,n,s){if(n==-1)return!1;let i=t.state.doc.resolve(n);for(let a=i.depth+1;a>0;a--)if(t.someProp(e,l=>a>i.depth?l(t,r,i.nodeAfter,i.before(a),s,!0):l(t,r,i.node(a),i.before(a),s,!1)))return!0;return!1}
vendor: 28,141 bytes, line 793
793function Nu(t,e,r){if(t.focused||t.focus(),t.state.selection.eq(e))return;let n=t.state.tr.setSelection(e);n.setMeta("pointer",!0),t.dispatch(n)}function Sce(t,e){if(e==-1)return!1;let r=t.state.doc.resolve(e),n=r.nodeAfter;return n&&n.isAtom&&Ve.isSelectable(n)?(Nu(t,new Ve(r)),!0):!1}function Nce(t,e){if(e==-1)return!1;let r=t.state.selection,n,s;r instanceof Ve&&(n=r.node);let i=t.state.doc.resolve(e);for(let a=i.depth+1;a>0;a--){let l=a>i.depth?i.nodeAfter:i.node(a);if(Ve.isSelectable(l)){n&&r.$from.depth>0&&a>=r.$from.depth&&i.before(r.$from.depth+1)==r.$from.pos?s=i.before(r.$from.depth):s=i.before(a);break}}return s!=null?(Nu(t,Ve.create(t.state.doc,s)),!0):!1}function Cce(t,e,r,n,s){return XS(t,"handleClickOn",e,r,n)||t.someProp("handleClick",i=>i(t,e,n))||(s?Nce(t,r):Sce(t,r))}function Ece(t,e,r,n){return XS(t,"handleDoubleClickOn",e,r,n)||t.someProp("handleDoubleClick",s=>s(t,e,n))}function Tce(t,e,r,n){return XS(t,"handleTripleClickOn",e,r,n)||t.someProp("handleTripleClick",s=>s(t,e,n))||Ace(t,r,n)}function Ace(t,e,r){if(r.button!=0)return!1;let n=t.state.doc;if(e==-1)return n.inlineContent?(Nu(t,Ze.create(n,0,n.content.size)),!0):!1;let s=n.resolve(e);for(let i=s.depth+1;i>0;i--){let a=i>s.depth?s.nodeAfter:s.node(i),l=s.before(i);if(a.inlineContent)Nu(t,Ze.create(n,l+1,l+1+a.content.size));else if(Ve.isSelectable(a))Nu(t,Ve.create(n,l));else continue;return!0}}function QS(t){return dg(t)}const fL=hs?"metaKey":"ctrlKey";gn.mousedown=(t,e)=>{let r=e;t.input.shiftKey=r.shiftKey;let n=QS(t),s=Date.now(),i="singleClick";s-t.input.lastClick.time<500&&jce(r,t.input.lastClick)&&!r[fL]&&t.input.lastClick.button==r.button&&(t.input.lastClick.type=="singleClick"?i="doubleClick":t.input.lastClick.type=="doubleClick"&&(i="tripleClick")),t.input.lastClick={time:s,x:r.clientX,y:r.clientY,type:i,button:r.button};let a=t.posAtCoords(Qy(r));a&&(i=="singleClick"?(t.input.mouseDown&&t.input.mouseDown.done(),t.input.mouseDown=new zce(t,a,r,!!n)):(i=="doubleClick"?Ece:Tce)(t,a.pos,a.inside,r)?r.preventDefault():ho(t,"pointer"))};class zce{constructor(e,r,n,s){this.view=e,this.pos=r,this.event=n,this.flushed=s,this.delayedSelectionSync=!1,this.mightDrag=null,this.startDoc=e.state.doc,this.selectNode=!!n[fL],this.allowDefault=n.shiftKey;let i,a;if(r.inside>-1)i=e.state.doc.nodeAt(r.inside),a=r.inside;else{let d=e.state.doc.resolve(r.pos);i=d.parent,a=d.depth?d.before():0}const l=s?null:n.target,c=l?e.docView.nearestDesc(l,!0):null;this.target=c&&c.nodeDOM.nodeType==1?c.nodeDOM:null;let{selection:u}=e.state;(n.button==0&&i.type.spec.draggable&&i.type.spec.selectable!==!1||u instanceof Ve&&u.from<=a&&u.to>a)&&(this.mightDrag={node:i,pos:a,addAttr:!!(this.target&&!this.target.draggable),setUneditable:!!(this.target&&bs&&!this.target.hasAttribute("contentEditable"))}),this.target&&this.mightDrag&&(this.mightDrag.addAttr||this.mightDrag.setUneditable)&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&(this.target.draggable=!0),this.mightDrag.setUneditable&&setTimeout(()=>{this.view.input.mouseDown==this&&this.target.setAttribute("contentEditable","false")},20),this.view.domObserver.start()),e.root.addEventListener("mouseup",this.up=this.up.bind(this)),e.root.addEventListener("mousemove",this.move=this.move.bind(this)),ho(e,"pointer")}done(){this.view.root.removeEventListener("mouseup",this.up),this.view.root.removeEventListener("mousemove",this.move),this.mightDrag&&this.target&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&this.target.removeAttribute("draggable"),this.mightDrag.setUneditable&&this.target.removeAttribute("contentEditable"),this.view.domObserver.start()),this.delayedSelectionSync&&setTimeout(()=>la(this.view)),this.view.input.mouseDown=null}up(e){if(this.done(),!this.view.dom.contains(e.target))return;let r=this.pos;this.view.state.doc!=this.startDoc&&(r=this.view.posAtCoords(Qy(e))),this.updateAllowDefault(e),this.allowDefault||!r?ho(this.view,"pointer"):Cce(this.view,r.pos,r.inside,e,this.selectNode)?e.preventDefault():e.button==0&&(this.flushed||mn&&this.mightDrag&&!this.mightDrag.node.isAtom||Xr&&!this.view.state.selection.visible&&Math.min(Math.abs(r.pos-this.view.state.selection.from),Math.abs(r.pos-this.view.state.selection.to))<=2)?(Nu(this.view,rt.near(this.view.state.doc.resolve(r.pos))),e.preventDefault()):ho(this.view,"pointer")}move(e){this.updateAllowDefault(e),ho(this.view,"pointer"),e.buttons==0&&this.done()}updateAllowDefault(e){!this.allowDefault&&(Math.abs(this.event.x-e.clientX)>4||Math.abs(this.event.y-e.clientY)>4)&&(this.allowDefault=!0)}}gn.touchstart=t=>{t.input.lastTouch=Date.now(),QS(t),ho(t,"pointer")};gn.touchmove=t=>{t.input.lastTouch=Date.now(),ho(t,"pointer")};gn.contextmenu=t=>QS(t);function mL(t,e){return t.composing?!0:mn&&Math.abs(e.timeStamp-t.input.compositionEndedAt)<500?(t.input.compositionEndedAt=-2e8,!0):!1}const Pce=ta?5e3:-1;yn.compositionstart=yn.compositionupdate=t=>{if(!t.composing){t.domObserver.flush();let{state:e}=t,r=e.selection.$to;if(e.selection instanceof Ze&&(e.storedMarks||!r.textOffset&&r.parentOffset&&r.nodeBefore.marks.some(n=>n.type.spec.inclusive===!1)))t.markCursor=t.state.storedMarks||r.marks(),dg(t,!0),t.markCursor=null;else if(dg(t,!e.selection.empty),bs&&e.selection.empty&&r.parentOffset&&!r.textOffset&&r.nodeBefore.marks.length){let n=t.domSelectionRange();for(let s=n.focusNode,i=n.focusOffset;s&&s.nodeType==1&&i!=0;){let a=i<0?s.lastChild:s.childNodes[i-1];if(!a)break;if(a.nodeType==3){let l=t.domSelection();l&&l.collapse(a,a.nodeValue.length);break}else s=a,i=-1}}t.input.composing=!0}gL(t,Pce)};yn.compositionend=(t,e)=>{t.composing&&(t.input.composing=!1,t.input.compositionEndedAt=e.timeStamp,t.input.compositionPendingChanges=t.domObserver.pendingRecords().length?t.input.compositionID:0,t.input.compositionNode=null,t.input.compositionPendingChanges&&Promise.resolve().then(()=>t.domObserver.flush()),t.input.compositionID++,gL(t,20))};function gL(t,e){clearTimeout(t.input.composingTimeout),e>-1&&(t.input.composingTimeout=setTimeout(()=>dg(t),e))}function yL(t){for(t.composing&&(t.input.composing=!1,t.input.compositionEndedAt=Ice());t.input.compositionNodes.length>0;)t.input.compositionNodes.pop().markParentsDirty()}function _ce(t){let e=t.domSelectionRange();if(!e.focusNode)return null;let r=Sle(e.focusNode,e.focusOffset),n=Nle(e.focusNode,e.focusOffset);if(r&&n&&r!=n){let s=n.pmViewDesc,i=t.domObserver.lastChangedTextNode;if(r==i||n==i)return i;if(!s||!s.isText(n.nodeValue))return n;if(t.input.compositionNode==n){let a=r.pmViewDesc;if(!(!a||!a.isText(r.nodeValue)))return n}}return r||n}function Ice(){let t=document.createEvent("Event");return t.initEvent("event",!0,!0),t.timeStamp}function dg(t,e=!1){if(!(ta&&t.domObserver.flushingSoon>=0)){if(t.domObserver.forceFlush(),yL(t),e||t.docView&&t.docView.dirty){let r=GS(t),n=t.state.selection;return r&&!r.eq(n)?t.dispatch(t.state.tr.setSelection(r)):(t.markCursor||e)&&!n.$from.node(n.$from.sharedDepth(n.to)).inlineContent?t.dispatch(t.state.tr.deleteSelection()):t.updateState(t.state),!0}return!1}}function Oce(t,e){if(!t.dom.parentNode)return;let r=t.dom.parentNode.appendChild(document.createElement("div"));r.appendChild(e),r.style.cssText="position: fixed; left: -10000px; top: 10px";let n=getSelection(),s=document.createRange();s.selectNodeContents(e),t.dom.blur(),n.removeAllRanges(),n.addRange(s),setTimeout(()=>{r.parentNode&&r.parentNode.removeChild(r),t.focus()},50)}const Dp=Dn&&To<15||ad&&zle<604;gn.copy=yn.cut=(t,e)=>{let r=e,n=t.state.selection,s=r.type=="cut";if(n.empty)return;let i=Dp?null:r.clipboardData,a=n.content(),{dom:l,text:c}=YS(t,a);i?(r.preventDefault(),i.clearData(),i.setData("text/html",l.innerHTML),i.setData("text/plain",c)):Oce(t,l),s&&t.dispatch(t.state.tr.deleteSelection().scrollIntoView().setMeta("uiEvent","cut"))};function Rce(t){return t.openStart==0&&t.openEnd==0&&t.content.childCount==1?t.content.firstChild:null}function Lce(t,e){if(!t.dom.parentNode)return;let r=t.input.shiftKey||t.state.selection.$from.parent.type.spec.code,n=t.dom.parentNode.appendChild(document.createElement(r?"textarea":"div"));r||(n.contentEditable="true"),n.style.cssText="position: fixed; left: -10000px; top: 10px",n.focus();let s=t.input.shiftKey&&t.input.lastKeyCode!=45;setTimeout(()=>{t.focus(),n.parentNode&&n.parentNode.removeChild(n),r?Fp(t,n.value,null,s,e):Fp(t,n.textContent,n.innerHTML,s,e)},50)}function Fp(t,e,r,n,s){let i=lL(t,e,r,n,t.state.selection.$from);if(t.someProp("handlePaste",c=>c(t,s,i||Ie.empty)))return!0;if(!i)return!1;let a=Rce(i),l=a?t.state.tr.replaceSelectionWith(a,n):t.state.tr.replaceSelection(i);return t.dispatch(l.scrollIntoView().setMeta("paste",!0).setMeta("uiEvent","paste")),!0}function xL(t){let e=t.getData("text/plain")||t.getData("Text");if(e)return e;let r=t.getData("text/uri-list");return r?r.replace(/\r?\n/g," "):""}yn.paste=(t,e)=>{let r=e;if(t.composing&&!ta)return;let n=Dp?null:r.clipboardData,s=t.input.shiftKey&&t.input.lastKeyCode!=45;n&&Fp(t,xL(n),n.getData("text/html"),s,r)?r.preventDefault():Lce(t,r)};class wL{constructor(e,r,n){this.slice=e,this.move=r,this.node=n}}const Mce=hs?"altKey":"ctrlKey";function bL(t,e){let r=t.someProp("dragCopies",n=>!n(e));return r??!e[Mce]}gn.dragstart=(t,e)=>{let r=e,n=t.input.mouseDown;if(n&&n.done(),!r.dataTransfer)return;let s=t.state.selection,i=s.empty?null:t.posAtCoords(Qy(r)),a;if(!(i&&i.pos>=s.from&&i.pos<=(s instanceof Ve?s.to-1:s.to))){if(n&&n.mightDrag)a=Ve.create(t.state.doc,n.mightDrag.pos);else if(r.target&&r.target.nodeType==1){let h=t.docView.nearestDesc(r.target,!0);h&&h.node.type.spec.draggable&&h!=t.docView&&(a=Ve.create(t.state.doc,h.posBefore))}}let l=(a||t.state.selection).content(),{dom:c,text:u,slice:d}=YS(t,l);(!r.dataTransfer.files.length||!Xr||qR>120)&&r.dataTransfer.clearData(),r.dataTransfer.setData(Dp?"Text":"text/html",c.innerHTML),r.dataTransfer.effectAllowed="copyMove",Dp||r.dataTransfer.setData("text/plain",u),t.dragging=new wL(d,bL(t,r),a)};gn.dragend=t=>{let e=t.dragging;window.setTimeout(()=>{t.dragging==e&&(t.dragging=null)},50)};yn.dragover=yn.dragenter=(t,e)=>e.preventDefault();yn.drop=(t,e)=>{let r=e,n=t.dragging;if(t.dragging=null,!r.dataTransfer)return;let s=t.posAtCoords(Qy(r));if(!s)return;let i=t.state.doc.resolve(s.pos),a=n&&n.slice;a?t.someProp("transformPasted",m=>{a=m(a,t,!1)}):a=lL(t,xL(r.dataTransfer),Dp?null:r.dataTransfer.getData("text/html"),!1,i);let l=!!(n&&bL(t,r));if(t.someProp("handleDrop",m=>m(t,r,a||Ie.empty,l))){r.preventDefault();return}if(!a)return;r.preventDefault();let c=a?NR(t.state.doc,i.pos,a):i.pos;c==null&&(c=i.pos);let u=t.state.tr;if(l){let{node:m}=n;m?m.replace(u):u.deleteSelection()}let d=u.mapping.map(c),h=a.openStart==0&&a.openEnd==0&&a.content.childCount==1,p=u.doc;if(h?u.replaceRangeWith(d,d,a.content.firstChild):u.replaceRange(d,d,a),u.doc.eq(p))return;let f=u.doc.resolve(d);if(h&&Ve.isSelectable(a.content.firstChild)&&f.nodeAfter&&f.nodeAfter.sameMarkup(a.content.firstChild))u.setSelection(new Ve(f));else{let m=u.mapping.map(c);u.mapping.maps[u.mapping.maps.length-1].forEach((y,k,g,x)=>m=x),u.setSelection(ZS(t,f,u.doc.resolve(m)))}t.focus(),t.dispatch(u.setMeta("uiEvent","drop"))};gn.focus=t=>{t.input.lastFocus=Date.now(),t.focused||(t.domObserver.stop(),t.dom.classList.add("ProseMirror-focused"),t.domObserver.start(),t.focused=!0,setTimeout(()=>{t.docView&&t.hasFocus()&&!t.domObserver.currentSelection.eq(t.domSelectionRange())&&la(t)},20))};gn.blur=(t,e)=>{let r=e;t.focused&&(t.domObserver.stop(),t.dom.classList.remove("ProseMirror-focused"),t.domObserver.start(),r.relatedTarget&&t.dom.contains(r.relatedTarget)&&t.domObserver.currentSelection.clear(),t.focused=!1)};gn.beforeinput=(t,e)=>{if(Xr&&ta&&e.inputType=="deleteContentBackward"){t.domObserver.flushSoon();let{domChangeCount:n}=t.input;setTimeout(()=>{if(t.input.domChangeCount!=n||(t.dom.blur(),t.focus(),t.someProp("handleKeyDown",i=>i(t,wl(8,"Backspace")))))return;let{$cursor:s}=t.state.selection;s&&s.pos>0&&t.dispatch(t.state.tr.delete(s.pos-1,s.pos).scrollIntoView())},50)}};for(let t in yn)gn[t]=yn[t];function Bp(t,e){if(t==e)return!0;for(let r in t)if(t[r]!==e[r])return!1;for(let r in e)if(!(r in t))return!1;return!0}class hg{constructor(e,r){this.toDOM=e,this.spec=r||Ql,this.side=this.spec.side||0}map(e,r,n,s){let{pos:i,deleted:a}=e.mapResult(r.from+s,this.side<0?-1:1);return a?null:new hn(i-n,i-n,this)}valid(){return!0}eq(e){return this==e||e instanceof hg&&(this.spec.key&&this.spec.key==e.spec.key||this.toDOM==e.toDOM&&Bp(this.spec,e.spec))}destroy(e){this.spec.destroy&&this.spec.destroy(e)}}class zo{constructor(e,r){this.attrs=e,this.spec=r||Ql}map(e,r,n,s){let i=e.map(r.from+s,this.spec.inclusiveStart?-1:1)-n,a=e.map(r.to+s,this.spec.inclusiveEnd?1:-1)-n;return i>=a?null:new hn(i,a,this)}valid(e,r){return r.from<r.to}eq(e){return this==e||e instanceof zo&&Bp(this.attrs,e.attrs)&&Bp(this.spec,e.spec)}static is(e){return e.type instanceof zo}destroy(){}}class eN{constructor(e,r){this.attrs=e,this.spec=r||Ql}map(e,r,n,s){let i=e.mapResult(r.from+s,1);if(i.deleted)return null;let a=e.mapResult(r.to+s,-1);return a.deleted||a.pos<=i.pos?null:new hn(i.pos-n,a.pos-n,this)}valid(e,r){let{index:n,offset:s}=e.content.findIndex(r.from),i;return s==r.from&&!(i=e.child(n)).isText&&s+i.nodeSize==r.to}eq(e){return this==e||e instanceof eN&&Bp(this.attrs,e.attrs)&&Bp(this.spec,e.spec)}destroy(){}}class hn{constructor(e,r,n){this.from=e,this.to=r,this.type=n}copy(e,r){return new hn(e,r,this.type)}eq(e,r=0){return this.type.eq(e.type)&&this.from+r==e.from&&this.to+r==e.to}map(e,r,n){return this.type.map(e,this,r,n)}static widget(e,r,n){return new hn(e,e,new hg(r,n))}static inline(e,r,n,s){return new hn(e,r,new zo(n,s))}static node(e,r,n,s){return new hn(e,r,new eN(n,s))}get spec(){return this.type.spec}get inline(){return this.type instanceof zo}get widget(){return this.type instanceof hg}}const Wc=[],Ql={};class Bt{constructor(e,r){this.local=e.length?e:Wc,this.children=r.length?r:Wc}static create(e,r){return r.length?pg(r,e,0,Ql):Zr}find(e,r,n){let s=[];return this.findInner(e??0,r??1e9,s,0,n),s}findInner(e,r,n,s,i){for(let a=0;a<this.local.length;a++){let l=this.local[a];l.from<=r&&l.to>=e&&(!i||i(l.spec))&&n.push(l.copy(l.from+s,l.to+s))}for(let a=0;a<this.children.length;a+=3)if(this.children[a]<r&&this.children[a+1]>e){let l=this.children[a]+1;this.children[a+2].findInner(e-l,r-l,n,s+l,i)}}map(e,r,n){return this==Zr||e.maps.length==0?this:this.mapInner(e,r,0,0,n||Ql)}mapInner(e,r,n,s,i){let a;for(let l=0;l<this.local.length;l++){let c=this.local[l].map(e,n,s);c&&c.type.valid(r,c)?(a||(a=[])).push(c):i.onRemove&&i.onRemove(this.local[l].spec)}return this.children.length?Dce(this.children,a||[],e,r,n,s,i):a?new Bt(a.sort(ec),Wc):Zr}add(e,r){return r.length?this==Zr?Bt.create(e,r):this.addInner(e,r,0):this}addInner(e,r,n){let s,i=0;e.forEach((l,c)=>{let u=c+n,d;if(d=vL(r,l,u)){for(s||(s=this.children.slice());i<s.length&&s[i]<c;)i+=3;s[i]==c?s[i+2]=s[i+2].addInner(l,d,u+1):s.splice(i,0,c,c+l.nodeSize,pg(d,l,u+1,Ql)),i+=3}});let a=kL(i?jL(r):r,-n);for(let l=0;l<a.length;l++)a[l].type.valid(e,a[l])||a.splice(l--,1);return new Bt(a.length?this.local.concat(a).sort(ec):this.local,s||this.children)}remove(e){return e.length==0||this==Zr?this:this.removeInner(e,0)}removeInner(e,r){let n=this.children,s=this.local;for(let i=0;i<n.length;i+=3){let a,l=n[i]+r,c=n[i+1]+r;for(let d=0,h;d<e.length;d++)(h=e[d])&&h.from>l&&h.to<c&&(e[d]=null,(a||(a=[])).push(h));if(!a)continue;n==this.children&&(n=this.children.slice());let u=n[i+2].removeInner(a,l+1);u!=Zr?n[i+2]=u:(n.splice(i,3),i-=3)}if(s.length){for(let i=0,a;i<e.length;i++)if(a=e[i])for(let l=0;l<s.length;l++)s[l].eq(a,r)&&(s==this.local&&(s=this.local.slice()),s.splice(l--,1))}return n==this.children&&s==this.local?this:s.length||n.length?new Bt(s,n):Zr}forChild(e,r){if(this==Zr)return this;if(r.isLeaf)return Bt.empty;let n,s;for(let l=0;l<this.children.length;l+=3)if(this.children[l]>=e){this.children[l]==e&&(n=this.children[l+2]);break}let i=e+1,a=i+r.content.size;for(let l=0;l<this.local.length;l++){let c=this.local[l];if(c.from<a&&c.to>i&&c.type instanceof zo){let u=Math.max(i,c.from)-i,d=Math.min(a,c.to)-i;u<d&&(s||(s=[])).push(c.copy(u,d))}}if(s){let l=new Bt(s.sort(ec),Wc);return n?new Ka([l,n]):l}return n||Zr}eq(e){if(this==e)return!0;if(!(e instanceof Bt)||this.local.length!=e.local.length||this.children.length!=e.children.length)return!1;for(let r=0;r<this.local.length;r++)if(!this.local[r].eq(e.local[r]))return!1;for(let r=0;r<this.children.length;r+=3)if(this.children[r]!=e.children[r]||this.children[r+1]!=e.children[r+1]||!this.children[r+2].eq(e.children[r+2]))return!1;return!0}locals(e){return tN(this.localsInner(e))}localsInner(e){if(this==Zr)return Wc;if(e.inlineContent||!this.local.some(zo.is))return this.local;let r=[];for(let n=0;n<this.local.length;n++)this.local[n].type instanceof zo||r.push(this.local[n]);return r}forEachSet(e){e(this)}}Bt.empty=new Bt([],[]);Bt.removeOverlap=tN;const Zr=Bt.empty;class Ka{constructor(e){this.members=e}map(e,r){const n=this.members.map(s=>s.map(e,r,Ql));return Ka.from(n)}forChild(e,r){if(r.isLeaf)return Bt.empty;let n=[];for(let s=0;s<this.members.length;s++){let i=this.members[s].forChild(e,r);i!=Zr&&(i instanceof Ka?n=n.concat(i.members):n.push(i))}return Ka.from(n)}eq(e){if(!(e instanceof Ka)||e.members.length!=this.members.length)return!1;for(let r=0;r<this.members.length;r++)if(!this.members[r].eq(e.members[r]))return!1;return!0}locals(e){let r,n=!0;for(let s=0;s<this.members.length;s++){let i=this.members[s].localsInner(e);if(i.length)if(!r)r=i;else{n&&(r=r.slice(),n=!1);for(let a=0;a<i.length;a++)r.push(i[a])}}return r?tN(n?r:r.sort(ec)):Wc}static from(e){switch(e.length){case 0:return Zr;case 1:return e[0];default:return new Ka(e.every(r=>r instanceof Bt)?e:e.reduce((r,n)=>r.concat(n instanceof Bt?n:n.members),[]))}}forEachSet(e){for(let r=0;r<this.members.length;r++)this.members[r].forEachSet(e)}}function Dce(t,e,r,n,s,i,a){let l=t.slice();for(let u=0,d=i;u<r.maps.length;u++){let h=0;r.maps[u].forEach((p,f,m,y)=>{let k=y-m-(f-p);for(let g=0;g<l.length;g+=3){let x=l[g+1];if(x<0||p>x+d-h)continue;let w=l[g]+d-h;f>=w?l[g+1]=p<=w?-2:-1:p>=d&&k&&(l[g]+=k,l[g+1]+=k)}h+=k}),d=r.maps[u].map(d,-1)}let c=!1;for(let u=0;u<l.length;u+=3)if(l[u+1]<0){if(l[u+1]==-2){c=!0,l[u+1]=-1;continue}let d=r.map(t[u]+i),h=d-s;if(h<0||h>=n.content.size){c=!0;continue}let p=r.map(t[u+1]+i,-1),f=p-s,{index:m,offset:y}=n.content.findIndex(h),k=n.maybeChild(m);if(k&&y==h&&y+k.nodeSize==f){let g=l[u+2].mapInner(r,k,d+1,t[u]+i+1,a);g!=Zr?(l[u]=h,l[u+1]=f,l[u+2]=g):(l[u+1]=-2,c=!0)}else c=!0}if(c){let u=Fce(l,t,e,r,s,i,a),d=pg(u,n,0,a);e=d.local;for(let h=0;h<l.length;h+=3)l[h+1]<0&&(l.splice(h,3),h-=3);for(let h=0,p=0;h<d.children.length;h+=3){let f=d.children[h];for(;p<l.length&&l[p]<f;)p+=3;l.splice(p,0,d.children[h],d.children[h+1],d.children[h+2])}}return new Bt(e.sort(ec),l)}function kL(t,e){if(!e||!t.length)return t;let r=[];for(let n=0;n<t.length;n++){let s=t[n];r.push(new hn(s.from+e,s.to+e,s.type))}return r}function Fce(t,e,r,n,s,i,a){function l(c,u){for(let d=0;d<c.local.length;d++){let h=c.local[d].map(n,s,u);h?r.push(h):a.onRemove&&a.onRemove(c.local[d].spec)}for(let d=0;d<c.children.length;d+=3)l(c.children[d+2],c.children[d]+u+1)}for(let c=0;c<t.length;c+=3)t[c+1]==-1&&l(t[c+2],e[c]+i+1);return r}function vL(t,e,r){if(e.isLeaf)return null;let n=r+e.nodeSize,s=null;for(let i=0,a;i<t.length;i++)(a=t[i])&&a.from>r&&a.to<n&&((s||(s=[])).push(a),t[i]=null);return s}function jL(t){let e=[];for(let r=0;r<t.length;r++)t[r]!=null&&e.push(t[r]);return e}function pg(t,e,r,n){let s=[],i=!1;e.forEach((l,c)=>{let u=vL(t,l,c+r);if(u){i=!0;let d=pg(u,l,r+c+1,n);d!=Zr&&s.push(c,c+l.nodeSize,d)}});let a=kL(i?jL(t):t,-r).sort(ec);for(let l=0;l<a.length;l++)a[l].type.valid(e,a[l])||(n.onRemove&&n.onRemove(a[l].spec),a.splice(l--,1));return a.length||s.length?new Bt(a,s):Zr}function ec(t,e){return t.from-e.from||t.to-e.to}function tN(t){let e=t;for(let r=0;r<e.length-1;r++){let n=e[r];if(n.from!=n.to)for(let s=r+1;s<e.length;s++){let i=e[s];if(i.from==n.from){i.to!=n.to&&(e==t&&(e=t.slice()),e[s]=i.copy(i.from,n.to),j5(e,s+1,i.copy(n.to,i.to)));continue}else{i.from<n.to&&(e==t&&(e=t.slice()),e[r]=n.copy(n.from,i.from),j5(e,s,n.copy(i.from,n.to)));break}}}return e}function j5(t,e,r){for(;e<t.length&&ec(r,t[e])>0;)e++;t.splice(e,0,r)}function Lw(t){let e=[];return t.someProp("decorations",r=>{let n=r(t.state);n&&n!=Zr&&e.push(n)}),t.cursorWrapper&&e.push(Bt.create(t.state.doc,[t.cursorWrapper.deco])),Ka.from(e)}const Bce={childList:!0,characterData:!0,characterDataOldValue:!0,attributes:!0,attributeOldValue:!0,subtree:!0},$ce=Dn&&To<=11;class Uce{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}set(e){this.anchorNode=e.anchorNode,this.anchorOffset=e.anchorOffset,this.focusNode=e.focusNode,this.focusOffset=e.focusOffset}clear(){this.anchorNode=this.focusNode=null}eq(e){return e.anchorNode==this.anchorNode&&e.anchorOffset==this.anchorOffset&&e.focusNode==this.focusNode&&e.focusOffset==this.focusOffset}}class Wce{constructor(e,r){this.view=e,this.handleDOMChange=r,this.queue=[],this.flushingSoon=-1,this.observer=null,this.currentSelection=new Uce,this.onCharData=null,this.suppressingSelectionUpdates=!1,this.lastChangedTextNode=null,this.observer=window.MutationObserver&&new window.MutationObserver(n=>{for(let s=0;s<n.length;s++)this.queue.push(n[s]);Dn&&To<=11&&n.some(s=>s.type=="childList"&&s.removedNodes.length||s.type=="characterData"&&s.oldValue.length>s.target.nodeValue.length)?this.flushSoon():this.flush()}),$ce&&(this.onCharData=n=>{this.queue.push({target:n.target,type:"characterData",oldValue:n.prevValue}),this.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this)}flushSoon(){this.flushingSoon<0&&(this.flushingSoon=window.setTimeout(()=>{this.flushingSoon=-1,this.flush()},20))}forceFlush(){this.flushingSoon>-1&&(window.clearTimeout(this.flushingSoon),this.flushingSoon=-1,this.flush())}start(){this.observer&&(this.observer.takeRecords(),this.observer.observe(this.view.dom,Bce)),this.onCharData&&this.view.dom.addEventListener("DOMCharacterDataModified",this.onCharData),this.connectSelection()}stop(){if(this.observer){let e=this.observer.takeRecords();if(e.length){for(let r=0;r<e.length;r++)this.queue.push(e[r]);window.setTimeout(()=>this.flush(),20)}this.observer.disconnect()}this.onCharData&&this.view.dom.removeEventListener("DOMCharacterDataModified",this.onCharData),this.disconnectSelection()}connectSelection(){this.view.dom.ownerDocument.addEventListener("selectionchange",this.onSelectionChange)}disconnectSelection(){this.view.dom.ownerDocument.removeEventListener("selectionchange",this.onSelectionChange)}suppressSelectionUpdates(){this.suppressingSelectionUpdates=!0,setTimeout(()=>this.suppressingSelectionUpdates=!1,50)}onSelectionChange(){if(m5(this.view)){if(this.suppressingSelectionUpdates)return la(this.view);if(Dn&&To<=11&&!this.view.state.selection.empty){let e=this.view.domSelectionRange();if(e.focusNode&&yc(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset))return this.flushSoon()}this.flush()}}setCurSelection(){this.currentSelection.set(this.view.domSelectionRange())}ignoreSelectionChange(e){if(!e.focusNode)return!0;let r=new Set,n;for(let i=e.focusNode;i;i=id(i))r.add(i);for(let i=e.anchorNode;i;i=id(i))if(r.has(i)){n=i;break}let s=n&&this.view.docView.nearestDesc(n);if(s&&s.ignoreMutation({type:"selection",target:n.nodeType==3?n.parentNode:n}))return this.setCurSelection(),!0}pendingRecords(){if(this.observer)for(let e of this.observer.takeRecords())this.queue.push(e);return this.queue}flush(){let{view:e}=this;if(!e.docView||this.flushingSoon>-1)return;let r=this.pendingRecords();r.length&&(this.queue=[]);let n=e.domSelectionRange(),s=!this.suppressingSelectionUpdates&&!this.currentSelection.eq(n)&&m5(e)&&!this.ignoreSelectionChange(n),i=-1,a=-1,l=!1,c=[];if(e.editable)for(let d=0;d<r.length;d++){let h=this.registerMutation(r[d],c);h&&(i=i<0?h.from:Math.min(h.from,i),a=a<0?h.to:Math.max(h.to,a),h.typeOver&&(l=!0))}if(bs&&c.length){let d=c.filter(h=>h.nodeName=="BR");if(d.length==2){let[h,p]=d;h.parentNode&&h.parentNode.parentNode==p.parentNode?p.remove():h.remove()}else{let{focusNode:h}=this.currentSelection;for(let p of d){let f=p.parentNode;f&&f.nodeName=="LI"&&(!h||qce(e,h)!=f)&&p.remove()}}}let u=null;i<0&&s&&e.input.lastFocus>Date.now()-200&&Math.max(e.input.lastTouch,e.input.lastClick.time)<Date.now()-300&&Jy(n)&&(u=GS(e))&&u.eq(rt.near(e.state.doc.resolve(0),1))?(e.input.lastFocus=0,la(e),this.currentSelection.set(n),e.scrollToSelection()):(i>-1||s)&&(i>-1&&(e.docView.markDirty(i,a),Vce(e)),this.handleDOMChange(i,a,l,c),e.docView&&e.docView.dirty?e.updateState(e.state):this.currentSelection.eq(n)||la(e),this.currentSelection.set(n))}registerMutation(e,r){if(r.indexOf(e.target)>-1)return null;let n=this.view.docView.nearestDesc(e.target);if(e.type=="attributes"&&(n==this.view.docView||e.attributeName=="contenteditable"||e.attributeName=="style"&&!e.oldValue&&!e.target.getAttribute("style"))||!n||n.ignoreMutation(e))return null;if(e.type=="childList"){for(let d=0;d<e.addedNodes.length;d++){let h=e.addedNodes[d];r.push(h),h.nodeType==3&&(this.lastChangedTextNode=h)}if(n.contentDOM&&n.contentDOM!=n.dom&&!n.contentDOM.contains(e.target))return{from:n.posBefore,to:n.posAfter};let s=e.previousSibling,i=e.nextSibling;if(Dn&&To<=11&&e.addedNodes.length)for(let d=0;d<e.addedNodes.length;d++){let{previousSibling:h,nextSibling:p}=e.addedNodes[d];(!h||Array.prototype.indexOf.call(e.addedNodes,h)<0)&&(s=h),(!p||Array.prototype.indexOf.call(e.addedNodes,p)<0)&&(i=p)}let a=s&&s.parentNode==e.target?Fr(s)+1:0,l=n.localPosFromDOM(e.target,a,-1),c=i&&i.parentNode==e.target?Fr(i):e.target.childNodes.length,u=n.localPosFromDOM(e.target,c,1);return{from:l,to:u}}else return e.type=="attributes"?{from:n.posAtStart-n.border,to:n.posAtEnd+n.border}:(this.lastChangedTextNode=e.target,{from:n.posAtStart,to:n.posAtEnd,typeOver:e.target.nodeValue==e.oldValue})}}let S5=new WeakMap,N5=!1;function Vce(t){if(!S5.has(t)&&(S5.set(t,null),["normal","nowrap","pre-line"].indexOf(getComputedStyle(t.dom).whiteSpace)!==-1)){if(t.requiresGeckoHackNode=bs,N5)return;console.warn("ProseMirror expects the CSS white-space property to be set, preferably to 'pre-wrap'. It is recommended to load style/prosemirror.css from the prosemirror-view package."),N5=!0}}function C5(t,e){let r=e.startContainer,n=e.startOffset,s=e.endContainer,i=e.endOffset,a=t.domAtPos(t.state.selection.anchor);return yc(a.node,a.offset,s,i)&&([r,n,s,i]=[s,i,r,n]),{anchorNode:r,anchorOffset:n,focusNode:s,focusOffset:i}}function Hce(t,e){if(e.getComposedRanges){let s=e.getComposedRanges(t.root)[0];if(s)return C5(t,s)}let r;function n(s){s.preventDefault(),s.stopImmediatePropagation(),r=s.getTargetRanges()[0]}return t.dom.addEventListener("beforeinput",n,!0),document.execCommand("indent"),t.dom.removeEventListener("beforeinput",n,!0),r?C5(t,r):null}function qce(t,e){for(let r=e.parentNode;r&&r!=t.dom;r=r.parentNode){let n=t.docView.nearestDesc(r,!0);if(n&&n.node.isBlock)return r}return null}function Kce(t,e,r){let{node:n,fromOffset:s,toOffset:i,from:a,to:l}=t.docView.parseRange(e,r),c=t.domSelectionRange(),u,d=c.anchorNode;if(d&&t.dom.contains(d.nodeType==1?d:d.parentNode)&&(u=[{node:d,offset:c.anchorOffset}],Jy(c)||u.push({node:c.focusNode,offset:c.focusOffset})),Xr&&t.input.lastKeyCode===8)for(let k=i;k>s;k--){let g=n.childNodes[k-1],x=g.pmViewDesc;if(g.nodeName=="BR"&&!x){i=k;break}if(!x||x.size)break}let h=t.state.doc,p=t.someProp("domParser")||Eo.fromSchema(t.state.schema),f=h.resolve(a),m=null,y=p.parse(n,{topNode:f.parent,topMatch:f.parent.contentMatchAt(f.index()),topOpen:!0,from:s,to:i,preserveWhitespace:f.parent.type.whitespace=="pre"?"full":!0,findPositions:u,ruleFromNode:Gce,context:f});if(u&&u[0].pos!=null){let k=u[0].pos,g=u[1]&&u[1].pos;g==null&&(g=k),m={anchor:k+a,head:g+a}}return{doc:y,sel:m,from:a,to:l}}function Gce(t){let e=t.pmViewDesc;if(e)return e.parseRule();
vendor: 4,387 bytes, line 793
793if(t.nodeName=="BR"&&t.parentNode){if(mn&&/^(ul|ol)$/i.test(t.parentNode.nodeName)){let r=document.createElement("div");return r.appendChild(document.createElement("li")),{skip:r}}else if(t.parentNode.lastChild==t||mn&&/^(tr|table)$/i.test(t.parentNode.nodeName))return{ignore:!0}}else if(t.nodeName=="IMG"&&t.getAttribute("mark-placeholder"))return{ignore:!0};return null}const Zce=/^(a|abbr|acronym|b|bd[io]|big|br|button|cite|code|data(list)?|del|dfn|em|i|img|ins|kbd|label|map|mark|meter|output|q|ruby|s|samp|small|span|strong|su[bp]|time|u|tt|var)$/i;function Yce(t,e,r,n,s){let i=t.input.compositionPendingChanges||(t.composing?t.input.compositionID:0);if(t.input.compositionPendingChanges=0,e<0){let C=t.input.lastSelectionTime>Date.now()-50?t.input.lastSelectionOrigin:null,_=GS(t,C);if(_&&!t.state.selection.eq(_)){if(Xr&&ta&&t.input.lastKeyCode===13&&Date.now()-100<t.input.lastKeyCodeTime&&t.someProp("handleKeyDown",W=>W(t,wl(13,"Enter"))))return;let N=t.state.tr.setSelection(_);C=="pointer"?N.setMeta("pointer",!0):C=="key"&&N.scrollIntoView(),i&&N.setMeta("composition",i),t.dispatch(N)}return}let a=t.state.doc.resolve(e),l=a.sharedDepth(r);e=a.before(l+1),r=t.state.doc.resolve(r).after(l+1);let c=t.state.selection,u=Kce(t,e,r),d=t.state.doc,h=d.slice(u.from,u.to),p,f;t.input.lastKeyCode===8&&Date.now()-100<t.input.lastKeyCodeTime?(p=t.state.selection.to,f="end"):(p=t.state.selection.from,f="start"),t.input.lastKeyCode=null;let m=Qce(h.content,u.doc.content,u.from,p,f);if(m&&t.input.domChangeCount++,(ad&&t.input.lastIOSEnter>Date.now()-225||ta)&&s.some(C=>C.nodeType==1&&!Zce.test(C.nodeName))&&(!m||m.endA>=m.endB)&&t.someProp("handleKeyDown",C=>C(t,wl(13,"Enter")))){t.input.lastIOSEnter=0;return}if(!m)if(n&&c instanceof Ze&&!c.empty&&c.$head.sameParent(c.$anchor)&&!t.composing&&!(u.sel&&u.sel.anchor!=u.sel.head))m={start:c.from,endA:c.to,endB:c.to};else{if(u.sel){let C=E5(t,t.state.doc,u.sel);if(C&&!C.eq(t.state.selection)){let _=t.state.tr.setSelection(C);i&&_.setMeta("composition",i),t.dispatch(_)}}return}t.state.selection.from<t.state.selection.to&&m.start==m.endB&&t.state.selection instanceof Ze&&(m.start>t.state.selection.from&&m.start<=t.state.selection.from+2&&t.state.selection.from>=u.from?m.start=t.state.selection.from:m.endA<t.state.selection.to&&m.endA>=t.state.selection.to-2&&t.state.selection.to<=u.to&&(m.endB+=t.state.selection.to-m.endA,m.endA=t.state.selection.to)),Dn&&To<=11&&m.endB==m.start+1&&m.endA==m.start&&m.start>u.from&&u.doc.textBetween(m.start-u.from-1,m.start-u.from+1)=="  "&&(m.start--,m.endA--,m.endB--);let y=u.doc.resolveNoCache(m.start-u.from),k=u.doc.resolveNoCache(m.endB-u.from),g=d.resolve(m.start),x=y.sameParent(k)&&y.parent.inlineContent&&g.end()>=m.endA;if((ad&&t.input.lastIOSEnter>Date.now()-225&&(!x||s.some(C=>C.nodeName=="DIV"||C.nodeName=="P"))||!x&&y.pos<u.doc.content.size&&(!y.sameParent(k)||!y.parent.inlineContent)&&y.pos<k.pos&&!/\S/.test(u.doc.textBetween(y.pos,k.pos,"","")))&&t.someProp("handleKeyDown",C=>C(t,wl(13,"Enter")))){t.input.lastIOSEnter=0;return}if(t.state.selection.anchor>m.start&&Xce(d,m.start,m.endA,y,k)&&t.someProp("handleKeyDown",C=>C(t,wl(8,"Backspace")))){ta&&Xr&&t.domObserver.suppressSelectionUpdates();return}Xr&&m.endB==m.start&&(t.input.lastChromeDelete=Date.now()),ta&&!x&&y.start()!=k.start()&&k.parentOffset==0&&y.depth==k.depth&&u.sel&&u.sel.anchor==u.sel.head&&u.sel.head==m.endA&&(m.endB-=2,k=u.doc.resolveNoCache(m.endB-u.from),setTimeout(()=>{t.someProp("handleKeyDown",function(C){return C(t,wl(13,"Enter"))})},20));let w=m.start,b=m.endA,v=C=>{let _=C||t.state.tr.replace(w,b,u.doc.slice(m.start-u.from,m.endB-u.from));if(u.sel){let N=E5(t,_.doc,u.sel);N&&!(Xr&&t.composing&&N.empty&&(m.start!=m.endB||t.input.lastChromeDelete<Date.now()-100)&&(N.head==w||N.head==_.mapping.map(b)-1)||Dn&&N.empty&&N.head==w)&&_.setSelection(N)}return i&&_.setMeta("composition",i),_.scrollIntoView()},A;if(x)if(y.pos==k.pos){Dn&&To<=11&&y.parentOffset==0&&(t.domObserver.suppressSelectionUpdates(),setTimeout(()=>la(t),20));let C=v(t.state.tr.delete(w,b)),_=d.resolve(m.start).marksAcross(d.resolve(m.endA));_&&C.ensureMarks(_),t.dispatch(C)}else if(m.endA==m.endB&&(A=Jce(y.parent.content.cut(y.parentOffset,k.parentOffset),g.parent.content.cut(g.parentOffset,m.endA-g.start())))){let C=v(t.state.tr);A.type=="add"?C.addMark(w,b,A.mark):C.removeMark(w,b,A.mark),t.dis
vendor: 11,628 bytes, line 793
793patch(C)}else if(y.parent.child(y.index()).isText&&y.index()==k.index()-(k.textOffset?0:1)){let C=y.parent.textBetween(y.parentOffset,k.parentOffset),_=()=>v(t.state.tr.insertText(C,w,b));t.someProp("handleTextInput",N=>N(t,w,b,C,_))||t.dispatch(_())}else t.dispatch(v());else t.dispatch(v())}function E5(t,e,r){return Math.max(r.anchor,r.head)>e.content.size?null:ZS(t,e.resolve(r.anchor),e.resolve(r.head))}function Jce(t,e){let r=t.firstChild.marks,n=e.firstChild.marks,s=r,i=n,a,l,c;for(let d=0;d<n.length;d++)s=n[d].removeFromSet(s);for(let d=0;d<r.length;d++)i=r[d].removeFromSet(i);if(s.length==1&&i.length==0)l=s[0],a="add",c=d=>d.mark(l.addToSet(d.marks));else if(s.length==0&&i.length==1)l=i[0],a="remove",c=d=>d.mark(l.removeFromSet(d.marks));else return null;let u=[];for(let d=0;d<e.childCount;d++)u.push(c(e.child(d)));if(Se.from(u).eq(t))return{mark:l,type:a}}function Xce(t,e,r,n,s){if(r-e<=s.pos-n.pos||Mw(n,!0,!1)<s.pos)return!1;let i=t.resolve(e);if(!n.parent.isTextblock){let l=i.nodeAfter;return l!=null&&r==e+l.nodeSize}if(i.parentOffset<i.parent.content.size||!i.parent.isTextblock)return!1;let a=t.resolve(Mw(i,!0,!0));return!a.parent.isTextblock||a.pos>r||Mw(a,!0,!1)<r?!1:n.parent.content.cut(n.parentOffset).eq(a.parent.content)}function Mw(t,e,r){let n=t.depth,s=e?t.end():t.pos;for(;n>0&&(e||t.indexAfter(n)==t.node(n).childCount);)n--,s++,e=!1;if(r){let i=t.node(n).maybeChild(t.indexAfter(n));for(;i&&!i.isLeaf;)i=i.firstChild,s++}return s}function Qce(t,e,r,n,s){let i=t.findDiffStart(e,r);if(i==null)return null;let{a,b:l}=t.findDiffEnd(e,r+t.size,r+e.size);if(s=="end"){let c=Math.max(0,i-Math.min(a,l));n-=a+c-i}if(a<i&&t.size<e.size){let c=n<=i&&n>=a?i-n:0;i-=c,i&&i<e.size&&T5(e.textBetween(i-1,i+1))&&(i+=c?1:-1),l=i+(l-a),a=i}else if(l<i){let c=n<=i&&n>=l?i-n:0;i-=c,i&&i<t.size&&T5(t.textBetween(i-1,i+1))&&(i+=c?1:-1),a=i+(a-l),l=i}return{start:i,endA:a,endB:l}}function T5(t){if(t.length!=2)return!1;let e=t.charCodeAt(0),r=t.charCodeAt(1);return e>=56320&&e<=57343&&r>=55296&&r<=56319}class SL{constructor(e,r){this._root=null,this.focused=!1,this.trackWrites=null,this.mounted=!1,this.markCursor=null,this.cursorWrapper=null,this.lastSelectedViewDesc=void 0,this.input=new xce,this.prevDirectPlugins=[],this.pluginViews=[],this.requiresGeckoHackNode=!1,this.dragging=null,this._props=r,this.state=r.state,this.directPlugins=r.plugins||[],this.directPlugins.forEach(I5),this.dispatch=this.dispatch.bind(this),this.dom=e&&e.mount||document.createElement("div"),e&&(e.appendChild?e.appendChild(this.dom):typeof e=="function"?e(this.dom):e.mount&&(this.mounted=!0)),this.editable=P5(this),z5(this),this.nodeViews=_5(this),this.docView=c5(this.state.doc,A5(this),Lw(this),this.dom,this),this.domObserver=new Wce(this,(n,s,i,a)=>Yce(this,n,s,i,a)),this.domObserver.start(),wce(this),this.updatePluginViews()}get composing(){return this.input.composing}get props(){if(this._props.state!=this.state){let e=this._props;this._props={};for(let r in e)this._props[r]=e[r];this._props.state=this.state}return this._props}update(e){e.handleDOMEvents!=this._props.handleDOMEvents&&t2(this);let r=this._props;this._props=e,e.plugins&&(e.plugins.forEach(I5),this.directPlugins=e.plugins),this.updateStateInner(e.state,r)}setProps(e){let r={};for(let n in this._props)r[n]=this._props[n];r.state=this.state;for(let n in e)r[n]=e[n];this.update(r)}updateState(e){this.updateStateInner(e,this._props)}updateStateInner(e,r){var n;let s=this.state,i=!1,a=!1;e.storedMarks&&this.composing&&(yL(this),a=!0),this.state=e;let l=s.plugins!=e.plugins||this._props.plugins!=r.plugins;if(l||this._props.plugins!=r.plugins||this._props.nodeViews!=r.nodeViews){let f=_5(this);tue(f,this.nodeViews)&&(this.nodeViews=f,i=!0)}(l||r.handleDOMEvents!=this._props.handleDOMEvents)&&t2(this),this.editable=P5(this),z5(this);let c=Lw(this),u=A5(this),d=s.plugins!=e.plugins&&!s.doc.eq(e.doc)?"reset":e.scrollToSelection>s.scrollToSelection?"to selection":"preserve",h=i||!this.docView.matchesNode(e.doc,u,c);(h||!e.selection.eq(s.selection))&&(a=!0);let p=d=="preserve"&&a&&this.dom.style.overflowAnchor==null&&Ile(this);if(a){this.domObserver.stop();let f=h&&(Dn||Xr)&&!this.composing&&!s.selection.empty&&!e.selection.empty&&eue(s.selection,e.selection);if(h){let m=Xr?this.trackWrites=this.domSelectionRange().focusNode:null;this.composing&&(this.input.compositionNode=_ce(this)),(i||!this.docView.update(e.doc,u,c,this))&&(this.docView.updateOuterDeco(u),this.docView.destroy(),this.docView=c5(e.doc,u,c,this.dom,this)),m&&!this.trackWrites&&(f=!0)}f||!(this.input.mouseDown&&this.domObserver.currentSelection.eq(this.domSelectionRange())&&nce(this))?la(this,f):(iL(this,e.selection),this.domObserver.setCurSelection()),this.domObserver.start()}this.updatePluginViews(s),!((n=this.dragging)===null||n===void 0)&&n.node&&!s.doc.eq(e.doc)&&this.updateDraggedNode(this.dragging,s),d=="reset"?this.dom.scrollTop=0:d=="to selection"?this.scrollToSelection():p&&Ole(p)}scrollToSelection(){let e=this.domSelectionRange().focusNode;if(!(!e||!this.dom.contains(e.nodeType==1?e:e.parentNode))){if(!this.someProp("handleScrollToSelection",r=>r(this)))if(this.state.selection instanceof Ve){let r=this.docView.domAfterPos(this.state.selection.from);r.nodeType==1&&n5(this,r.getBoundingClientRect(),e)}else n5(this,this.coordsAtPos(this.state.selection.head,1),e)}}destroyPluginViews(){let e;for(;e=this.pluginViews.pop();)e.destroy&&e.destroy()}updatePluginViews(e){if(!e||e.plugins!=this.state.plugins||this.directPlugins!=this.prevDirectPlugins){this.prevDirectPlugins=this.directPlugins,this.destroyPluginViews();for(let r=0;r<this.directPlugins.length;r++){let n=this.directPlugins[r];n.spec.view&&this.pluginViews.push(n.spec.view(this))}for(let r=0;r<this.state.plugins.length;r++){let n=this.state.plugins[r];n.spec.view&&this.pluginViews.push(n.spec.view(this))}}else for(let r=0;r<this.pluginViews.length;r++){let n=this.pluginViews[r];n.update&&n.update(this,e)}}updateDraggedNode(e,r){let n=e.node,s=-1;if(this.state.doc.nodeAt(n.from)==n.node)s=n.from;else{let i=n.from+(this.state.doc.content.size-r.doc.content.size);(i>0&&this.state.doc.nodeAt(i))==n.node&&(s=i)}this.dragging=new wL(e.slice,e.move,s<0?void 0:Ve.create(this.state.doc,s))}someProp(e,r){let n=this._props&&this._props[e],s;if(n!=null&&(s=r?r(n):n))return s;for(let a=0;a<this.directPlugins.length;a++){let l=this.directPlugins[a].props[e];if(l!=null&&(s=r?r(l):l))return s}let i=this.state.plugins;if(i)for(let a=0;a<i.length;a++){let l=i[a].props[e];if(l!=null&&(s=r?r(l):l))return s}}hasFocus(){if(Dn){let e=this.root.activeElement;if(e==this.dom)return!0;if(!e||!this.dom.contains(e))return!1;for(;e&&this.dom!=e&&this.dom.contains(e);){if(e.contentEditable=="false")return!1;e=e.parentElement}return!0}return this.root.activeElement==this.dom}focus(){this.domObserver.stop(),this.editable&&Rle(this.dom),la(this),this.domObserver.start()}get root(){let e=this._root;if(e==null){for(let r=this.dom.parentNode;r;r=r.parentNode)if(r.nodeType==9||r.nodeType==11&&r.host)return r.getSelection||(Object.getPrototypeOf(r).getSelection=()=>r.ownerDocument.getSelection()),this._root=r}return e||document}updateRoot(){this._root=null}posAtCoords(e){return Ble(this,e)}coordsAtPos(e,r=1){return JR(this,e,r)}domAtPos(e,r=0){return this.docView.domFromPos(e,r)}nodeDOM(e){let r=this.docView.descAt(e);return r?r.nodeDOM:null}posAtDOM(e,r,n=-1){let s=this.docView.posFromDOM(e,r,n);if(s==null)throw new RangeError("DOM position not inside the editor");return s}endOfTextblock(e,r){return Hle(this,r||this.state,e)}pasteHTML(e,r){return Fp(this,"",e,!1,r||new ClipboardEvent("paste"))}pasteText(e,r){return Fp(this,e,null,!0,r||new ClipboardEvent("paste"))}serializeForClipboard(e){return YS(this,e)}destroy(){this.docView&&(bce(this),this.destroyPluginViews(),this.mounted?(this.docView.update(this.state.doc,[],Lw(this),this),this.dom.textContent=""):this.dom.parentNode&&this.dom.parentNode.removeChild(this.dom),this.docView.destroy(),this.docView=null,vle())}get isDestroyed(){return this.docView==null}dispatchEvent(e){return vce(this,e)}domSelectionRange(){let e=this.domSelection();return e?mn&&this.root.nodeType===11&&Ele(this.dom.ownerDocument)==this.dom&&Hce(this,e)||e:{focusNode:null,focusOffset:0,anchorNode:null,anchorOffset:0}}domSelection(){return this.root.getSelection()}}SL.prototype.dispatch=function(t){let e=this._props.dispatchTransaction;e?e.call(this,t):this.updateState(this.state.apply(t))};function A5(t){let e=Object.create(null);return e.class="ProseMirror",e.contenteditable=String(t.editable),t.someProp("attributes",r=>{if(typeof r=="function"&&(r=r(t.state)),r)for(let n in r)n=="class"?e.class+=" "+r[n]:n=="style"?e.style=(e.style?e.style+";":"")+r[n]:!e[n]&&n!="contenteditable"&&n!="nodeName"&&(e[n]=String(r[n]))}),e.translate||(e.translate="no"),[hn.node(0,t.state.doc.content.size,e)]}function z5(t){if(t.markCursor){let e=document.createElement("img");e.className="ProseMirror-separator",e.setAttribute("mark-placeholder","true"),e.setAttribute("alt",""),t.cursorWrapper={dom:e,deco:hn.widget(t.state.selection.from,e,{raw:!0,marks:t.markCursor})}}else t.cursorWrapper=null}function P5(t){return!t.someProp("editable",e=>e(t.state)===!1)}function eue(t,e){let r=Math.min(t.$anchor.sharedDepth(t.head),e.$anchor.sharedDepth(e.head));return t.$anchor.start(r)!=e.$anchor.start(r)}function _5(t){let e=Object.create(null);function r(n){for(let s in n)Object.prototype.hasOwnProperty.call(e,s)||(e[s]=n[s])}return t.someProp("nodeViews",r),t.someProp("markViews",r),e}function tue(t,e){let r=0,n=0;for(let s in t){if(t[s]!=e[s])return!0;r++}for(let s in e)n++;return r!=n}function I5(t){if(t.spec.state||t.spec.filterTransaction||t.spec.appendTransaction)throw new RangeError("Plugins passed directly to the view must not have a state component")}var $o={8:"Backspace",9:"Tab",10:"Enter",12:"NumLock",13:"Enter",16:"Shift",17:"Control",18:"Alt",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",44:"PrintScreen",45:"Insert",46:"Delete",59:";",61:"=",91:"Meta",92:"Meta",106:"*",107:"+",108:",",109:"-",110:".",111:"/",144:"NumLock",145:"ScrollLock",160:"Shift",161:"Shift",162:"Control",163:"Control",164:"Alt",165:"Alt",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},fg={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},rue=typeof navigator<"u"&&/Mac/.test(navigator.platform),nue=typeof navigator<"u"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent);for(var Br=0;Br<10;Br++)$o[48+Br]=$o[96+Br]=String(Br);for(var Br=1;Br<=24;Br++)$o[Br+111]="F"+Br;for(var Br=65;Br<=90;Br++)$o[Br]=String.fromCharCode(Br+32),fg[Br]=String.fromCharCode(Br);for(var Dw in $o)fg.hasOwnProperty(Dw)||(fg[Dw]=$o[Dw]);function sue(t){var e=rue&&t.metaKey&&t.shiftKey&&!t.ctrlKey&&!t.altKey||nue&&t.shiftKey&&t.key&&t.key.length==1||t.key=="Unidentified",r=!e&&t.key||(t.shiftKey?fg:$o)[t.keyCode]||t.key||"Unidentified";return r=="Esc"&&(r="Escape"),r=="Del"&&(r="Delete"),r=="Left"&&(r="ArrowLeft"),r=="Up"&&(r="ArrowUp"),r=="Right"&&(r="ArrowRight"),r=="Down"&&(r="ArrowDown"),r}const iue=typeof navigator<"u"&&/Mac|iP(hone|[oa]d)/.test(navigator.platform),aue=typeof navigator<"u"&&/Win/.test(navigator.platform);function oue(t){let e=t.split(/-(?!$)/),r=e[e.length-1];r=="Space"&&(r=" ");let n,s,i,a;for(let l=0;l<e.length-1;l++){let c=e[l];
vendor: 22,086 bytes, lines 793-794
793if(/^(cmd|meta|m)$/i.test(c))a=!0;else if(/^a(lt)?$/i.test(c))n=!0;else if(/^(c|ctrl|control)$/i.test(c))s=!0;else if(/^s(hift)?$/i.test(c))i=!0;else if(/^mod$/i.test(c))iue?a=!0:s=!0;else throw new Error("Unrecognized modifier name: "+c)}return n&&(r="Alt-"+r),s&&(r="Ctrl-"+r),a&&(r="Meta-"+r),i&&(r="Shift-"+r),r}function lue(t){let e=Object.create(null);for(let r in t)e[oue(r)]=t[r];return e}function Fw(t,e,r=!0){return e.altKey&&(t="Alt-"+t),e.ctrlKey&&(t="Ctrl-"+t),e.metaKey&&(t="Meta-"+t),r&&e.shiftKey&&(t="Shift-"+t),t}function cue(t){return new er({props:{handleKeyDown:NL(t)}})}function NL(t){let e=lue(t);return function(r,n){let s=sue(n),i,a=e[Fw(s,n)];if(a&&a(r.state,r.dispatch,r))return!0;if(s.length==1&&s!=" "){if(n.shiftKey){let l=e[Fw(s,n,!1)];if(l&&l(r.state,r.dispatch,r))return!0}if((n.altKey||n.metaKey||n.ctrlKey)&&!(aue&&n.ctrlKey&&n.altKey)&&(i=$o[n.keyCode])&&i!=s){let l=e[Fw(i,n)];if(l&&l(r.state,r.dispatch,r))return!0}}return!1}}var uue=Object.defineProperty,rN=(t,e)=>{for(var r in e)uue(t,r,{get:e[r],enumerable:!0})};function ex(t){const{state:e,transaction:r}=t;let{selection:n}=r,{doc:s}=r,{storedMarks:i}=r;return{...e,apply:e.apply.bind(e),applyTransaction:e.applyTransaction.bind(e),plugins:e.plugins,schema:e.schema,reconfigure:e.reconfigure.bind(e),toJSON:e.toJSON.bind(e),get storedMarks(){return i},get selection(){return n},get doc(){return s},get tr(){return n=r.selection,s=r.doc,i=r.storedMarks,r}}}var tx=class{constructor(t){this.editor=t.editor,this.rawCommands=this.editor.extensionManager.commands,this.customState=t.state}get hasCustomState(){return!!this.customState}get state(){return this.customState||this.editor.state}get commands(){const{rawCommands:t,editor:e,state:r}=this,{view:n}=e,{tr:s}=r,i=this.buildProps(s);return Object.fromEntries(Object.entries(t).map(([a,l])=>[a,(...u)=>{const d=l(...u)(i);return!s.getMeta("preventDispatch")&&!this.hasCustomState&&n.dispatch(s),d}]))}get chain(){return()=>this.createChain()}get can(){return()=>this.createCan()}createChain(t,e=!0){const{rawCommands:r,editor:n,state:s}=this,{view:i}=n,a=[],l=!!t,c=t||s.tr,u=()=>(!l&&e&&!c.getMeta("preventDispatch")&&!this.hasCustomState&&i.dispatch(c),a.every(h=>h===!0)),d={...Object.fromEntries(Object.entries(r).map(([h,p])=>[h,(...m)=>{const y=this.buildProps(c,e),k=p(...m)(y);return a.push(k),d}])),run:u};return d}createCan(t){const{rawCommands:e,state:r}=this,n=!1,s=t||r.tr,i=this.buildProps(s,n);return{...Object.fromEntries(Object.entries(e).map(([l,c])=>[l,(...u)=>c(...u)({...i,dispatch:void 0})])),chain:()=>this.createChain(s,n)}}buildProps(t,e=!0){const{rawCommands:r,editor:n,state:s}=this,{view:i}=n,a={tr:t,editor:n,view:i,state:ex({state:s,transaction:t}),dispatch:e?()=>{}:void 0,chain:()=>this.createChain(t,e),can:()=>this.createCan(t),get commands(){return Object.fromEntries(Object.entries(r).map(([l,c])=>[l,(...u)=>c(...u)(a)]))}};return a}},CL={};rN(CL,{blur:()=>due,clearContent:()=>hue,clearNodes:()=>pue,command:()=>fue,createParagraphNear:()=>mue,cut:()=>gue,deleteCurrentNode:()=>yue,deleteNode:()=>xue,deleteRange:()=>wue,deleteSelection:()=>bue,enter:()=>kue,exitCode:()=>vue,extendMarkRange:()=>jue,first:()=>Sue,focus:()=>Cue,forEach:()=>Eue,insertContent:()=>Tue,insertContentAt:()=>Pue,joinBackward:()=>Oue,joinDown:()=>Iue,joinForward:()=>Rue,joinItemBackward:()=>Lue,joinItemForward:()=>Mue,joinTextblockBackward:()=>Due,joinTextblockForward:()=>Fue,joinUp:()=>_ue,keyboardShortcut:()=>$ue,lift:()=>Uue,liftEmptyBlock:()=>Wue,liftListItem:()=>Vue,newlineInCode:()=>Hue,resetAttributes:()=>que,scrollIntoView:()=>Kue,selectAll:()=>Gue,selectNodeBackward:()=>Zue,selectNodeForward:()=>Yue,selectParentNode:()=>Jue,selectTextblockEnd:()=>Xue,selectTextblockStart:()=>Que,setContent:()=>ede,setMark:()=>xde,setMeta:()=>wde,setNode:()=>bde,setNodeSelection:()=>kde,setTextSelection:()=>vde,sinkListItem:()=>jde,splitBlock:()=>Sde,splitListItem:()=>Nde,toggleList:()=>Cde,toggleMark:()=>Ede,toggleNode:()=>Tde,toggleWrap:()=>Ade,undoInputRule:()=>zde,unsetAllMarks:()=>Pde,unsetMark:()=>_de,updateAttributes:()=>Ide,wrapIn:()=>Ode,wrapInList:()=>Rde});var due=()=>({editor:t,view:e})=>(requestAnimationFrame(()=>{var r;t.isDestroyed||(e.dom.blur(),(r=window==null?void 0:window.getSelection())==null||r.removeAllRanges())}),!0),hue=(t=!0)=>({commands:e})=>e.setContent("",{emitUpdate:t}),pue=()=>({state:t,tr:e,dispatch:r})=>{const{selection:n}=e,{ranges:s}=n;return r&&s.forEach(({$from:i,$to:a})=>{t.doc.nodesBetween(i.pos,a.pos,(l,c)=>{if(l.type.isText)return;const{doc:u,mapping:d}=e,h=u.resolve(d.map(c)),p=u.resolve(d.map(c+l.nodeSize)),f=h.blockRange(p);if(!f)return;const m=Rd(f);if(l.type.isTextblock){const{defaultType:y}=h.parent.contentMatchAt(h.index());e.setNodeMarkup(f.start,y)}(m||m===0)&&e.lift(f,m)})}),!0},fue=t=>e=>t(e),mue=()=>({state:t,dispatch:e})=>$R(t,e),gue=(t,e)=>({editor:r,tr:n})=>{const{state:s}=r,i=s.doc.slice(t.from,t.to);n.deleteRange(t.from,t.to);const a=n.mapping.map(e);return n.insert(a,i.content),n.setSelection(new Ze(n.doc.resolve(Math.max(a-1,0)))),!0},yue=()=>({tr:t,dispatch:e})=>{const{selection:r}=t,n=r.$anchor.node();if(n.content.size>0)return!1;const s=t.selection.$anchor;for(let i=s.depth;i>0;i-=1)if(s.node(i).type===n.type){if(e){const l=s.before(i),c=s.after(i);t.delete(l,c).scrollIntoView()}return!0}return!1};function gr(t,e){if(typeof t=="string"){if(!e.nodes[t])throw Error(`There is no node type named '${t}'. Maybe you forgot to add the extension?`);return e.nodes[t]}return t}var xue=t=>({tr:e,state:r,dispatch:n})=>{const s=gr(t,r.schema),i=e.selection.$anchor;for(let a=i.depth;a>0;a-=1)if(i.node(a).type===s){if(n){const c=i.before(a),u=i.after(a);e.delete(c,u).scrollIntoView()}return!0}return!1},wue=t=>({tr:e,dispatch:r})=>{const{from:n,to:s}=t;return r&&e.delete(n,s),!0},bue=()=>({state:t,dispatch:e})=>US(t,e),kue=()=>({commands:t})=>t.keyboardShortcut("Enter"),vue=()=>({state:t,dispatch:e})=>ole(t,e);function nN(t){return Object.prototype.toString.call(t)==="[object RegExp]"}function mg(t,e,r={strict:!0}){const n=Object.keys(e);return n.length?n.every(s=>r.strict?e[s]===t[s]:nN(e[s])?e[s].test(t[s]):e[s]===t[s]):!0}function EL(t,e,r={}){return t.find(n=>n.type===e&&mg(Object.fromEntries(Object.keys(r).map(s=>[s,n.attrs[s]])),r))}function O5(t,e,r={}){return!!EL(t,e,r)}function sN(t,e,r){var n;if(!t||!e)return;let s=t.parent.childAfter(t.parentOffset);if((!s.node||!s.node.marks.some(d=>d.type===e))&&(s=t.parent.childBefore(t.parentOffset)),!s.node||!s.node.marks.some(d=>d.type===e)||(r=r||((n=s.node.marks[0])==null?void 0:n.attrs),!EL([...s.node.marks],e,r)))return;let a=s.index,l=t.start()+s.offset,c=a+1,u=l+s.node.nodeSize;for(;a>0&&O5([...t.parent.child(a-1).marks],e,r);)a-=1,l-=t.parent.child(a).nodeSize;for(;c<t.parent.childCount&&O5([...t.parent.child(c).marks],e,r);)u+=t.parent.child(c).nodeSize,c+=1;return{from:l,to:u}}function va(t,e){if(typeof t=="string"){if(!e.marks[t])throw Error(`There is no mark type named '${t}'. Maybe you forgot to add the extension?`);return e.marks[t]}return t}var jue=(t,e={})=>({tr:r,state:n,dispatch:s})=>{const i=va(t,n.schema),{doc:a,selection:l}=r,{$from:c,from:u,to:d}=l;if(s){const h=sN(c,i,e);if(h&&h.from<=u&&h.to>=d){const p=Ze.create(a,h.from,h.to);r.setSelection(p)}}return!0},Sue=t=>e=>{const r=typeof t=="function"?t(e):t;for(let n=0;n<r.length;n+=1)if(r[n](e))return!0;return!1};function TL(t){return t instanceof Ze}function _l(t=0,e=0,r=0){return Math.min(Math.max(t,e),r)}function AL(t,e=null){if(!e)return null;const r=rt.atStart(t),n=rt.atEnd(t);if(e==="start"||e===!0)return r;if(e==="end")return n;const s=r.from,i=n.to;return e==="all"?Ze.create(t,_l(0,s,i),_l(t.content.size,s,i)):Ze.create(t,_l(e,s,i),_l(e,s,i))}function Nue(){return navigator.platform==="Android"||/android/i.test(navigator.userAgent)}function iN(){return["iPad Simulator","iPhone Simulator","iPod Simulator","iPad","iPhone","iPod"].includes(navigator.platform)||navigator.userAgent.includes("Mac")&&"ontouchend"in document}var Cue=(t=null,e={})=>({editor:r,view:n,tr:s,dispatch:i})=>{e={scrollIntoView:!0,...e};const a=()=>{(iN()||Nue())&&n.dom.focus(),requestAnimationFrame(()=>{r.isDestroyed||(n.focus(),e!=null&&e.scrollIntoView&&r.commands.scrollIntoView())})};if(n.hasFocus()&&t===null||t===!1)return!0;if(i&&t===null&&!TL(r.state.selection))return a(),!0;const l=AL(s.doc,t)||r.state.selection,c=r.state.selection.eq(l);return i&&(c||s.setSelection(l),c&&s.storedMarks&&s.setStoredMarks(s.storedMarks),a()),!0},Eue=(t,e)=>r=>t.every((n,s)=>e(n,{...r,index:s})),Tue=(t,e)=>({tr:r,commands:n})=>n.insertContentAt({from:r.selection.from,to:r.selection.to},t,e),zL=t=>{const e=t.childNodes;for(let r=e.length-1;r>=0;r-=1){const n=e[r];n.nodeType===3&&n.nodeValue&&/^(\n\s\s|\n)$/.test(n.nodeValue)?t.removeChild(n):n.nodeType===1&&zL(n)}return t};function fm(t){if(typeof window>"u")throw new Error("[tiptap error]: there is no window object available, so this function cannot be used");const e=`<body>${t}</body>`,r=new window.DOMParser().parseFromString(e,"text/html").body;return zL(r)}function $p(t,e,r){if(t instanceof Co||t instanceof Se)return t;r={slice:!0,parseOptions:{},...r};const n=typeof t=="object"&&t!==null,s=typeof t=="string";if(n)try{if(Array.isArray(t)&&t.length>0)return Se.fromArray(t.map(l=>e.nodeFromJSON(l)));const a=e.nodeFromJSON(t);return r.errorOnInvalidContent&&a.check(),a}catch(i){if(r.errorOnInvalidContent)throw new Error("[tiptap error]: Invalid JSON content",{cause:i});return console.warn("[tiptap warn]: Invalid content.","Passed value:",t,"Error:",i),$p("",e,r)}if(s){if(r.errorOnInvalidContent){let a=!1,l="";const c=new fR({topNode:e.spec.topNode,marks:e.spec.marks,nodes:e.spec.nodes.append({__tiptap__private__unknown__catch__all__node:{content:"inline*",group:"block",parseDOM:[{tag:"*",getAttrs:u=>(a=!0,l=typeof u=="string"?u:u.outerHTML,null)}]}})});if(r.slice?Eo.fromSchema(c).parseSlice(fm(t),r.parseOptions):Eo.fromSchema(c).parse(fm(t),r.parseOptions),r.errorOnInvalidContent&&a)throw new Error("[tiptap error]: Invalid HTML content",{cause:new Error(`Invalid element found: ${l}`)})}const i=Eo.fromSchema(e);return r.slice?i.parseSlice(fm(t),r.parseOptions).content:i.parse(fm(t),r.parseOptions)}return $p("",e,r)}function Aue(t,e,r){const n=t.steps.length-1;if(n<e)return;const s=t.steps[n];if(!(s instanceof Pr||s instanceof Or))return;const i=t.mapping.maps[n];let a=0;i.forEach((l,c,u,d)=>{a===0&&(a=d)}),t.setSelection(rt.near(t.doc.resolve(a),r))}var zue=t=>!("type"in t),Pue=(t,e,r)=>({tr:n,dispatch:s,editor:i})=>{var a;if(s){r={parseOptions:i.options.parseOptions,updateSelection:!0,applyInputRules:!1,applyPasteRules:!1,...r};let l;const c=k=>{i.emit("contentError",{editor:i,error:k,disableCollaboration:()=>{"collaboration"in i.storage&&typeof i.storage.collaboration=="object"&&i.storage.collaboration&&(i.storage.collaboration.isDisabled=!0)}})},u={preserveWhitespace:"full",...r.parseOptions};if(!r.errorOnInvalidContent&&!i.options.enableContentCheck&&i.options.emitContentError)try{$p(e,i.schema,{parseOptions:u,errorOnInvalidContent:!0})}catch(k){c(k)}try{l=$p(e,i.schema,{parseOptions:u,errorOnInvalidContent:(a=r.errorOnInvalidContent)!=null?a:i.options.enableContentCheck})}catch(k){return c(k),!1}let{from:d,to:h}=typeof t=="number"?{from:t,to:t}:{from:t.from,to:t.to},p=!0,f=!0;if((zue(l)?l:[l]).forEach(k=>{k.check(),p=p?k.isText&&k.marks.length===0:!1,f=f?k.isBlock:!1}),d===h&&f){const{parent:k}=n.doc.resolve(d);k.isTextblock&&!k.type.spec.code&&!k.childCount&&(d-=1,h+=1)}let y;if(p){if(Array.isArray(e))y=e.map(k=>k.text||"").join("");else if(e instanceof Se){let k="";e.forEach(g=>{g.text&&(k+=g.text)}),y=k}else typeof e=="object"&&e&&e.text?y=e.text:y=e;n.insertText(y,d,h)}else{y=l;const k=n.doc.resolve(d),g=k.node(),x=k.parentOffset===0,w=g.isText||g.isTextblock,b=g.content.size>0;x&&w&&b&&(d=Math.max(0,d-1)),n.replaceWith(d,h,y)}r.updateSelection&&Aue(n,n.steps.length-1,-1),r.applyInputRules&&n.setMeta("applyInputRules",{from:d,text:y}),r.applyPasteRules&&n.setMeta("applyPasteRules",{from:d,text:y})}return!0},_ue=()=>({state:t,dispatch:e})=>sle(t,e),Iue=()=>({state:t,dispatch:e})=>ile(t,e),Oue=()=>({state:t,dispatch:e})=>OR(t,e),Rue=()=>({state:t,dispatch:e})=>DR(t,e),Lue=()=>({state:t,dispatch:e,tr:r})=>{try{const n=Gy(t.doc,t.selection.$from.pos,-1);return n==null?!1:(r.join(n,2),e&&e(r),!0)}catch{return!1}},Mue=()=>({state:t,dispatch:e,tr:r})=>{try{const n=Gy(t.doc,t.selection.$from.pos,1);return n==null?!1:(r.join(n,2),e&&e(r),!0)}catch{return!1}},Due=()=>({state:t,dispatch:e})=>rle(t,e),Fue=()=>({state:t,dispatch:e})=>nle(t,e);function PL(){return typeof navigator<"u"?/Mac/.test(navigator.platform):!1}function Bue(t){const e=t.split(/-(?!$)/);let r=e[e.length-1];r==="Space"&&(r=" ");let n,s,i,a;for(let l=0;l<e.length-1;l+=1){const c=e[l];if(/^(cmd|meta|m)$/i.test(c))a=!0;else if(/^a(lt)?$/i.test(c))n=!0;else if(/^(c|ctrl|control)$/i.test(c))s=!0;else if(/^s(hift)?$/i.test(c))i=!0;else if(/^mod$/i.test(c))iN()||PL()?a=!0:s=!0;else throw new Error(`Unrecognized modifier name: ${c}`)}return n&&(r=`Alt-${r}`),s&&(r=`Ctrl-${r}`),a&&(r=`Meta-${r}`),i&&(r=`Shift-${r}`),r}var $ue=t=>({editor:e,view:r,tr:n,dispatch:s})=>{const i=Bue(t).split(/-(?!$)/),a=i.find(u=>!["Alt","Ctrl","Meta","Shift"].includes(u)),l=new KeyboardEvent("keydown",{key:a==="Space"?" ":a,altKey:i.includes("Alt"),ctrlKey:i.includes("Ctrl"),metaKey:i.includes("Meta"),shiftKey:i.includes("Shift"),bubbles:!0,cancelable:!0}),c=e.captureTransaction(()=>{r.someProp("handleKeyDown",u=>u(r,l))});return c==null||c.steps.forEach(u=>{const d=u.map(n.mapping);d&&s&&n.maybeStep(d)}),!0};function Uo(t,e,r={}){const{from:n,to:s,empty:i}=t.selection,a=e?gr(e,t.schema):null,l=[];t.doc.nodesBetween(n,s,(h,p)=>{if(h.isText)return;const f=Math.max(n,p),m=Math.min(s,p+h.nodeSize);l.push({node:h,from:f,to:m})});const c=s-n,u=l.filter(h=>a?a.name===h.node.type.name:!0).filter(h=>mg(h.node.attrs,r,{strict:!1}));return i?!!u.length:u.reduce((h,p)=>h+p.to-p.from,0)>=c}var Uue=(t,e={})=>({state:r,dispatch:n})=>{const s=gr(t,r.schema);return Uo(r,s,e)?ale(r,n):!1},Wue=()=>({state:t,dispatch:e})=>UR(t,e),Vue=t=>({state:e,dispatch:r})=>{const n=gr(t,e.schema);return xle(n)(e,r)},Hue=()=>({state:t,dispatch:e})=>BR(t,e);function rx(t,e){return e.nodes[t]?"node":e.marks[t]?"mark":null}function R5(t,e){const r=typeof e=="string"?[e]:e;return Object.keys(t).reduce((n,s)=>(r.includes(s)||(n[s]=t[s]),n),{})}var que=(t,e)=>({tr:r,state:n,dispatch:s})=>{let i=null,a=null;const l=rx(typeof t=="string"?t:t.name,n.schema);return l?(l==="node"&&(i=gr(t,n.schema)),l==="mark"&&(a=va(t,n.schema)),s&&r.selection.ranges.forEach(c=>{n.doc.nodesBetween(c.$from.pos,c.$to.pos,(u,d)=>{i&&i===u.type&&r.setNodeMarkup(d,void 0,R5(u.attrs,e)),a&&u.marks.length&&u.marks.forEach(h=>{a===h.type&&r.addMark(d,d+u.nodeSize,a.create(R5(h.attrs,e)))})})}),!0):!1},Kue=()=>({tr:t,dispatch:e})=>(e&&t.scrollIntoView(),!0),Gue=()=>({tr:t,dispatch:e})=>{if(e){const r=new Gn(t.doc);t.setSelection(r)}return!0},Zue=()=>({state:t,dispatch:e})=>LR(t,e),Yue=()=>({state:t,dispatch:e})=>FR(t,e),Jue=()=>({state:t,dispatch:e})=>ule(t,e),Xue=()=>({state:t,dispatch:e})=>ple(t,e),Que=()=>({state:t,dispatch:e})=>hle(t,e);function r2(t,e,r={},n={}){return $p(t,e,{slice:!1,parseOptions:r,errorOnInvalidContent:n.errorOnInvalidContent})}var ede=(t,{errorOnInvalidContent:e,emitUpdate:r=!0,parseOptions:n={}}={})=>({editor:s,tr:i,dispatch:a,commands:l})=>{const{doc:c}=i;if(n.preserveWhitespace!=="full"){const u=r2(t,s.schema,n,{errorOnInvalidContent:e??s.options.enableContentCheck});return a&&i.replaceWith(0,c.content.size,u).setMeta("preventUpdate",!r),!0}return a&&i.setMeta("preventUpdate",!r),l.insertContentAt({from:0,to:c.content.size},t,{parseOptions:n,errorOnInvalidContent:e??s.options.enableContentCheck})};function _L(t,e){const r=va(e,t.schema),{from:n,to:s,empty:i}=t.selection,a=[];i?(t.storedMarks&&a.push(...t.storedMarks),a.push(...t.selection.$head.marks())):t.doc.nodesBetween(n,s,c=>{a.push(...c.marks)});const l=a.find(c=>c.type.name===r.name);return l?{...l.attrs}:{}}function IL(t,e){const r=new zR(t);return e.forEach(n=>{n.steps.forEach(s=>{r.step(s)})}),r}function tde(t){for(let e=0;e<t.edgeCount;e+=1){const{type:r}=t.edge(e);if(r.isTextblock&&!r.hasRequiredAttrs())return r}return null}function rde(t,e,r){const n=[];return t.nodesBetween(e.from,e.to,(s,i)=>{r(s)&&n.push({node:s,pos:i})}),n}function nde(t,e){for(let r=t.depth;r>0;r-=1){const n=t.node(r);if(e(n))return{pos:r>0?t.before(r):0,start:t.start(r),depth:r,node:n}}}function nx(t){return e=>nde(e.$from,t)}function Ue(t,e,r){return t.config[e]===void 0&&t.parent?Ue(t.parent,e,r):typeof t.config[e]=="function"?t.config[e].bind({...r,parent:t.parent?Ue(t.parent,e,r):null}):t.config[e]}function aN(t){return t.map(e=>{const r={name:e.name,options:e.options,storage:e.storage},n=Ue(e,"addExtensions",r);return n?[e,...aN(n())]:e}).flat(10)}function oN(t,e){const r=Nc.fromSchema(e).serializeFragment(t),s=document.implementation.createHTMLDocument().createElement("div");return s.appendChild(r),s.innerHTML}function OL(t){return typeof t=="function"}function kt(t,e=void 0,...r){return OL(t)?e?t.bind(e)(...r):t(...r):t}function sde(t={}){return Object.keys(t).length===0&&t.constructor===Object}function Up(t){const e=t.filter(s=>s.type==="extension"),r=t.filter(s=>s.type==="node"),n=t.filter(s=>s.type==="mark");return{baseExtensions:e,nodeExtensions:r,markExtensions:n}}function RL(t){const e=[],{nodeExtensions:r,markExtensions:n}=Up(t),s=[...r,...n],i={default:null,validate:void 0,rendered:!0,renderHTML:null,parseHTML:null,keepOnSplit:!0,isRequired:!1};return t.forEach(a=>{const l={name:a.name,options:a.options,storage:a.storage,extensions:s},c=Ue(a,"addGlobalAttributes",l);if(!c)return;c().forEach(d=>{d.types.forEach(h=>{Object.entries(d.attributes).forEach(([p,f])=>{e.push({type:h,name:p,attribute:{...i,...f}})})})})}),s.forEach(a=>{const l={name:a.name,options:a.options,storage:a.storage},c=Ue(a,"addAttributes",l);if(!c)return;const u=c();Object.entries(u).forEach(([d,h])=>{const p={...i,...h};typeof(p==null?void 0:p.default)=="function"&&(p.default=p.default()),p!=null&&p.isRequired&&(p==null?void 0:p.default)===void 0&&delete p.default,e.push({type:a.name,name:d,attribute:p})})}),e}function yr(...t){return t.filter(e=>!!e).reduce((e,r)=>{const n={...e};return Object.entries(r).forEach(([s,i])=>{if(!n[s]){n[s]=i;return}if(s==="class"){const l=i?String(i).split(" "):[],c=n[s]?n[s].split(" "):[],u=l.filter(d=>!c.includes(d));n[s]=[...c,...u].join(" ")}else if(s==="style"){const l=i?i.split(";").map(d=>d.trim()).filter(Boolean):[],c=n[s]?n[s].split(";").map(d=>d.trim()).filter(Boolean):[],u=new Map;c.forEach(d=>{const[h,p]=d.split(":").map(f=>f.trim());u.set(h,p)}),l.forEach(d=>{const[h,p]=d.split(":").map(f=>f.trim());u.set(h,p)}),n[s]=Array.from(u.entries()).map(([d,h])=>`${d}: ${h}`).join("; ")}else n[s]=i}),n},{})}function gg(t,e){return e.filter(r=>r.type===t.type.name).filter(r=>r.attribute.rendered).map(r=>r.attribute.renderHTML?r.attribute.renderHTML(t.attrs)||{}:{[r.name]:t.attrs[r.name]}).reduce((r,n)=>yr(r,n),{})}function ide(t){return typeof t!="string"?t:t.match(/^[+-]?(?:\d*\.)?\d+$/)?Number(t):t==="true"?!0:t==="false"?!1:t}function L5(t,e){return"style"in t?t:{...t,getAttrs:r=>{const n=t.getAttrs?t.getAttrs(r):t.attrs;if(n===!1)return!1;const s=e.reduce((i,a)=>{const l=a.attribute.parseHTML?a.attribute.parseHTML(r):ide(r.getAttribute(a.name));return l==null?i:{...i,[a.name]:l}},{});return{...n,...s}}}}function M5(t){return Object.fromEntries(Object.entries(t).filter(([e,r])=>e==="attrs"&&sde(r)?!1:r!=null))}function ade(t,e){var r;const n=RL(t),{nodeExtensions:s,markExtensions:i}=Up(t),a=(r=s.find(u=>Ue(u,"topNode")))==null?void 0:r.name,l=Object.fromEntries(s.map(u=>{const d=n.filter(g=>g.type===u.name),h={name:u.name,options:u.options,storage:u.storage,editor:e},p=t.reduce((g,x)=>{const w=Ue(x,"extendNodeSchema",h);return{...g,...w?w(u):{}}},{}),f=M5({...p,content:kt(Ue(u,"content",h)),marks:kt(Ue(u,"marks",h)),group:kt(Ue(u,"group",h)),inline:kt(Ue(u,"inline",h)),atom:kt(Ue(u,"atom",h)),selectable:kt(Ue(u,"selectable",h)),draggable:kt(Ue(u,"draggable",h)),code:kt(Ue(u,"code",h)),whitespace:kt(Ue(u,"whitespace",h)),linebreakReplacement:kt(Ue(u,"linebreakReplacement",h)),defining:kt(Ue(u,"defining",h)),isolating:kt(Ue(u,"isolating",h)),attrs:Object.fromEntries(d.map(g=>{var x,w;return[g.name,{default:(x=g==null?void 0:g.attribute)==null?void 0:x.default,validate:(w=g==null?void 0:g.attribute)==null?void 0:w.validate}]}))}),m=kt(Ue(u,"parseHTML",h));m&&(f.parseDOM=m.map(g=>L5(g,d)));const y=Ue(u,"renderHTML",h);y&&(f.toDOM=g=>y({node:g,HTMLAttributes:gg(g,d)}));const k=Ue(u,"renderText",h);return k&&(f.toText=k),[u.name,f]})),c=Object.fromEntries(i.map(u=>{const d=n.filter(k=>k.type===u.name),h={name:u.name,options:u.options,storage:u.storage,editor:e},p=t.reduce((k,g)=>{const x=Ue(g,"extendMarkSchema",h);return{...k,...x?x(u):{}}},{}),f=M5({...p,inclusive:kt(Ue(u,"inclusive",h)),excludes:kt(Ue(u,"excludes",h)),group:kt(Ue(u,"group",h)),spanning:kt(Ue(u,"spanning",h)),code:kt(Ue(u,"code",h)),attrs:Object.fromEntries(d.map(k=>{var g,x;return[k.name,{default:(g=k==null?void 0:k.attribute)==null?void 0:g.default,validate:(x=k==null?void 0:k.attribute)==null?void 0:x.validate}]}))}),m=kt(Ue(u,"parseHTML",h));m&&(f.parseDOM=m.map(k=>L5(k,d)));const y=Ue(u,"renderHTML",h);return y&&(f.toDOM=k=>y({mark:k,HTMLAttributes:gg(k,d)})),[u.name,f]}));return new fR({topNode:a,nodes:l,marks:c})}function ode(t){const e=t.filter((r,n)=>t.indexOf(r)!==n);return Array.from(new Set(e))}function lN(t){return t.sort((r,n)=>{const s=Ue(r,"priority")||100,i=Ue(n,"priority")||100;return s>i?-1:s<i?1:0})}function LL(t){const e=lN(aN(t)),r=ode(e.map(n=>n.name));return r.length&&console.warn(`[tiptap warn]: Duplicate extension names found: [${r.map(n=>`'${n}'`).join(", ")}]. This can lead to issues.`),e}function ML(t,e,r){const{from:n,to:s}=e,{blockSeparator:i=`
794
795`,textSerializers:a={}}=r||{};let l="";return t.nodesBetween(n,s,(c,u,d,h)=>{var p;c.isBlock&&u>n&&(l+=i);const f=a==null?void 0:a[c.type.name];if(f)return d&&(l+=f({node:c,pos:u,parent:d,index:h,range:e})),!1;c.isText&&(l+=(p=c==null?void 0:c.text)==null?void 0:p.slice(Math.max(n,u)-u,s-u))}),l}function lde(t,e){const r={from:0,to:t.content.size};return ML(t,r,e)}function DL(t){return Object.fromEntries(Object.entries(t.nodes).filter(([,e])=>e.spec.toText).map(([e,r])=>[e,r.spec.toText]))}function cde(t,e){const r=gr(e,t.schema),{from:n,to:s}=t.selection,i=[];t.doc.nodesBetween(n,s,l=>{i.push(l)});const a=i.reverse().find(l=>l.type.name===r.name);return a?{...a.attrs}:{}}function FL(t,e){const r=rx(typeof e=="string"?e:e.name,t.schema);return r==="node"?cde(t,e):r==="mark"?_L(t,e):{}}function ude(t,e=JSON.stringify){const r={};return t.filter(n=>{const s=e(n);return Object.prototype.hasOwnProperty.call(r,s)?!1:r[s]=!0})}function dde(t){const e=ude(t);return e.length===1?e:e.filter((r,n)=>!e.filter((i,a)=>a!==n).some(i=>r.oldRange.from>=i.oldRange.from&&r.oldRange.to<=i.oldRange.to&&r.newRange.from>=i.newRange.from&&r.newRange.to<=i.newRange.to))}function BL(t){const{mapping:e,steps:r}=t,n=[];return e.maps.forEach((s,i)=>{const a=[];if(s.ranges.length)s.forEach((l,c)=>{a.push({from:l,to:c})});else{const{from:l,to:c}=r[i];if(l===void 0||c===void 0)return;a.push({from:l,to:c})}a.forEach(({from:l,to:c})=>{const u=e.slice(i).map(l,-1),d=e.slice(i).map(c),h=e.invert().map(u,-1),p=e.invert().map(d);n.push({oldRange:{from:h,to:p},newRange:{from:u,to:d}})})}),dde(n)}function cN(t,e,r){const n=[];return t===e?r.resolve(t).marks().forEach(s=>{const i=r.resolve(t),a=sN(i,s.type);a&&n.push({mark:s,...a})}):r.nodesBetween(t,e,(s,i)=>{!s||(s==null?void 0:s.nodeSize)===void 0||n.push(...s.marks.map(a=>({from:i,to:i+s.nodeSize,mark:a})))}),n}var hde=(t,e,r,n=20)=>{const s=t.doc.resolve(r);let i=n,a=null;for(;i>0&&a===null;){const l=s.node(i);(l==null?void 0:l.type.name)===e?a=l:i-=1}return[a,i]};function Bw(t,e){return e.nodes[t]||e.marks[t]||null}function o0(t,e,r){return Object.fromEntries(Object.entries(r).filter(([n])=>{const s=t.find(i=>i.type===e&&i.name===n);return s?s.attribute.keepOnSplit:!1}))}var pde=(t,e=500)=>{let r="";const n=t.parentOffset;return t.parent.nodesBetween(Math.max(0,n-e),n,(s,i,a,l)=>{var c,u;const d=((u=(c=s.type.spec).toText)==null?void 0:u.call(c,{node:s,pos:i,parent:a,index:l}))||s.textContent||"%leaf%";r+=s.isAtom&&!s.isText?d:d.slice(0,Math.max(0,n-i))}),r};function n2(t,e,r={}){const{empty:n,ranges:s}=t.selection,i=e?va(e,t.schema):null;if(n)return!!(t.storedMarks||t.selection.$from.marks()).filter(h=>i?i.name===h.type.name:!0).find(h=>mg(h.attrs,r,{strict:!1}));let a=0;const l=[];if(s.forEach(({$from:h,$to:p})=>{const f=h.pos,m=p.pos;t.doc.nodesBetween(f,m,(y,k)=>{if(!y.isText&&!y.marks.length)return;const g=Math.max(f,k),x=Math.min(m,k+y.nodeSize),w=x-g;a+=w,l.push(...y.marks.map(b=>({mark:b,from:g,to:x})))})}),a===0)return!1;const c=l.filter(h=>i?i.name===h.mark.type.name:!0).filter(h=>mg(h.mark.attrs,r,{strict:!1})).reduce((h,p)=>h+p.to-p.from,0),u=l.filter(h=>i?h.mark.type!==i&&h.mark.type.excludes(i):!0).reduce((h,p)=>h+p.to-p.from,0);return(c>0?c+u:c)>=a}function fde(t,e,r={}){if(!e)return Uo(t,null,r)||n2(t,null,r);const n=rx(e,t.schema);return n==="node"?Uo(t,e,r):n==="mark"?n2(t,e,r):!1}var mde=(t,e)=>{const{$from:r,$to:n,$anchor:s}=t.selection;if(e){const i=nx(l=>l.type.name===e)(t.selection);if(!i)return!1;const a=t.doc.resolve(i.pos+1);return s.pos+1===a.end()}return!(n.parentOffset<n.parent.nodeSize-2||r.pos!==n.pos)},gde=t=>{const{$from:e,$to:r}=t.selection;return!(e.parentOffset>0||e.pos!==r.pos)};function D5(t,e){return Array.isArray(e)?e.some(r=>(typeof r=="string"?r:r.name)===t.name):e}function F5(t,e){const{nodeExtensions:r}=Up(e),n=r.find(a=>a.name===t);if(!n)return!1;const s={name:n.name,options:n.options,storage:n.storage},i=kt(Ue(n,"group",s));return typeof i!="string"?!1:i.split(" ").includes("list")}function sx(t,{checkChildren:e=!0,ignoreWhitespace:r=!1}={}){var n;if(r){if(t.type.name==="hardBreak")return!0;
vendor: 44,962 bytes, lines 795-874
795if(t.isText)return/^\s*$/m.test((n=t.text)!=null?n:"")}if(t.isText)return!t.text;if(t.isAtom||t.isLeaf)return!1;if(t.content.childCount===0)return!0;if(e){let s=!0;return t.content.forEach(i=>{s!==!1&&(sx(i,{ignoreWhitespace:r,checkChildren:e})||(s=!1))}),s}return!1}function $L(t){return t instanceof Ve}function yde(t,e,r){var n;const{selection:s}=e;let i=null;if(TL(s)&&(i=s.$cursor),i){const l=(n=t.storedMarks)!=null?n:i.marks();return i.parent.type.allowsMarkType(r)&&(!!r.isInSet(l)||!l.some(u=>u.type.excludes(r)))}const{ranges:a}=s;return a.some(({$from:l,$to:c})=>{let u=l.depth===0?t.doc.inlineContent&&t.doc.type.allowsMarkType(r):!1;return t.doc.nodesBetween(l.pos,c.pos,(d,h,p)=>{if(u)return!1;if(d.isInline){const f=!p||p.type.allowsMarkType(r),m=!!r.isInSet(d.marks)||!d.marks.some(y=>y.type.excludes(r));u=f&&m}return!u}),u})}var xde=(t,e={})=>({tr:r,state:n,dispatch:s})=>{const{selection:i}=r,{empty:a,ranges:l}=i,c=va(t,n.schema);if(s)if(a){const u=_L(n,c);r.addStoredMark(c.create({...u,...e}))}else l.forEach(u=>{const d=u.$from.pos,h=u.$to.pos;n.doc.nodesBetween(d,h,(p,f)=>{const m=Math.max(f,d),y=Math.min(f+p.nodeSize,h);p.marks.find(g=>g.type===c)?p.marks.forEach(g=>{c===g.type&&r.addMark(m,y,c.create({...g.attrs,...e}))}):r.addMark(m,y,c.create(e))})});return yde(n,r,c)},wde=(t,e)=>({tr:r})=>(r.setMeta(t,e),!0),bde=(t,e={})=>({state:r,dispatch:n,chain:s})=>{const i=gr(t,r.schema);let a;return r.selection.$anchor.sameParent(r.selection.$head)&&(a=r.selection.$anchor.parent.attrs),i.isTextblock?s().command(({commands:l})=>e5(i,{...a,...e})(r)?!0:l.clearNodes()).command(({state:l})=>e5(i,{...a,...e})(l,n)).run():(console.warn('[tiptap warn]: Currently "setNode()" only supports text block nodes.'),!1)},kde=t=>({tr:e,dispatch:r})=>{if(r){const{doc:n}=e,s=_l(t,0,n.content.size),i=Ve.create(n,s);e.setSelection(i)}return!0},vde=t=>({tr:e,dispatch:r})=>{if(r){const{doc:n}=e,{from:s,to:i}=typeof t=="number"?{from:t,to:t}:t,a=Ze.atStart(n).from,l=Ze.atEnd(n).to,c=_l(s,a,l),u=_l(i,a,l),d=Ze.create(n,c,u);e.setSelection(d)}return!0},jde=t=>({state:e,dispatch:r})=>{const n=gr(t,e.schema);return kle(n)(e,r)};function B5(t,e){const r=t.storedMarks||t.selection.$to.parentOffset&&t.selection.$from.marks();if(r){const n=r.filter(s=>e==null?void 0:e.includes(s.type.name));t.tr.ensureMarks(n)}}var Sde=({keepMarks:t=!0}={})=>({tr:e,state:r,dispatch:n,editor:s})=>{const{selection:i,doc:a}=e,{$from:l,$to:c}=i,u=s.extensionManager.attributes,d=o0(u,l.node().type.name,l.node().attrs);if(i instanceof Ve&&i.node.isBlock)return!l.parentOffset||!oa(a,l.pos)?!1:(n&&(t&&B5(r,s.extensionManager.splittableMarks),e.split(l.pos).scrollIntoView()),!0);if(!l.parent.isBlock)return!1;const h=c.parentOffset===c.parent.content.size,p=l.depth===0?void 0:tde(l.node(-1).contentMatchAt(l.indexAfter(-1)));let f=h&&p?[{type:p,attrs:d}]:void 0,m=oa(e.doc,e.mapping.map(l.pos),1,f);if(!f&&!m&&oa(e.doc,e.mapping.map(l.pos),1,p?[{type:p}]:void 0)&&(m=!0,f=p?[{type:p,attrs:d}]:void 0),n){if(m&&(i instanceof Ze&&e.deleteSelection(),e.split(e.mapping.map(l.pos),1,f),p&&!h&&!l.parentOffset&&l.parent.type!==p)){const y=e.mapping.map(l.before()),k=e.doc.resolve(y);l.node(-1).canReplaceWith(k.index(),k.index()+1,p)&&e.setNodeMarkup(e.mapping.map(l.before()),p)}t&&B5(r,s.extensionManager.splittableMarks),e.scrollIntoView()}return m},Nde=(t,e={})=>({tr:r,state:n,dispatch:s,editor:i})=>{var a;const l=gr(t,n.schema),{$from:c,$to:u}=n.selection,d=n.selection.node;if(d&&d.isBlock||c.depth<2||!c.sameParent(u))return!1;const h=c.node(-1);if(h.type!==l)return!1;const p=i.extensionManager.attributes;if(c.parent.content.size===0&&c.node(-1).childCount===c.indexAfter(-1)){if(c.depth===2||c.node(-3).type!==l||c.index(-2)!==c.node(-2).childCount-1)return!1;if(s){let g=Se.empty;const x=c.index(-1)?1:c.index(-2)?2:3;for(let _=c.depth-x;_>=c.depth-3;_-=1)g=Se.from(c.node(_).copy(g));const w=c.indexAfter(-1)<c.node(-2).childCount?1:c.indexAfter(-2)<c.node(-3).childCount?2:3,b={...o0(p,c.node().type.name,c.node().attrs),...e},v=((a=l.contentMatch.defaultType)==null?void 0:a.createAndFill(b))||void 0;g=g.append(Se.from(l.createAndFill(null,v)||void 0));const A=c.before(c.depth-(x-1));r.replace(A,c.after(-w),new Ie(g,4-x,0));let C=-1;r.doc.nodesBetween(A,r.doc.content.size,(_,N)=>{if(C>-1)return!1;_.isTextblock&&_.content.size===0&&(C=N+1)}),C>-1&&r.setSelection(Ze.near(r.doc.resolve(C))),r.scrollIntoView()}return!0}const f=u.pos===c.end()?h.contentMatchAt(0).defaultType:null,m={...o0(p,h.type.name,h.attrs),...e},y={...o0(p,c.node().type.name,c.node().attrs),...e};r.delete(c.pos,u.pos);const k=f?[{type:l,attrs:m},{type:f,attrs:y}]:[{type:l,attrs:m}];if(!oa(r.doc,c.pos,2))return!1;if(s){const{selection:g,storedMarks:x}=n,{splittableMarks:w}=i.extensionManager,b=x||g.$to.parentOffset&&g.$from.marks();if(r.split(c.pos,2,k).scrollIntoView(),!b||!s)return!0;const v=b.filter(A=>w.includes(A.type.name));r.ensureMarks(v)}return!0},$w=(t,e)=>{const r=nx(a=>a.type===e)(t.selection);if(!r)return!0;const n=t.doc.resolve(Math.max(0,r.pos-1)).before(r.depth);if(n===void 0)return!0;const s=t.doc.nodeAt(n);return r.node.type===(s==null?void 0:s.type)&&Qo(t.doc,r.pos)&&t.join(r.pos),!0},Uw=(t,e)=>{const r=nx(a=>a.type===e)(t.selection);if(!r)return!0;const n=t.doc.resolve(r.start).after(r.depth);if(n===void 0)return!0;const s=t.doc.nodeAt(n);return r.node.type===(s==null?void 0:s.type)&&Qo(t.doc,n)&&t.join(n),!0},Cde=(t,e,r,n={})=>({editor:s,tr:i,state:a,dispatch:l,chain:c,commands:u,can:d})=>{const{extensions:h,splittableMarks:p}=s.extensionManager,f=gr(t,a.schema),m=gr(e,a.schema),{selection:y,storedMarks:k}=a,{$from:g,$to:x}=y,w=g.blockRange(x),b=k||y.$to.parentOffset&&y.$from.marks();if(!w)return!1;const v=nx(A=>F5(A.type.name,h))(y);if(w.depth>=1&&v&&w.depth-v.depth<=1){if(v.node.type===f)return u.liftListItem(m);if(F5(v.node.type.name,h)&&f.validContent(v.node.content)&&l)return c().command(()=>(i.setNodeMarkup(v.pos,f),!0)).command(()=>$w(i,f)).command(()=>Uw(i,f)).run()}return!r||!b||!l?c().command(()=>d().wrapInList(f,n)?!0:u.clearNodes()).wrapInList(f,n).command(()=>$w(i,f)).command(()=>Uw(i,f)).run():c().command(()=>{const A=d().wrapInList(f,n),C=b.filter(_=>p.includes(_.type.name));return i.ensureMarks(C),A?!0:u.clearNodes()}).wrapInList(f,n).command(()=>$w(i,f)).command(()=>Uw(i,f)).run()},Ede=(t,e={},r={})=>({state:n,commands:s})=>{const{extendEmptyMarkRange:i=!1}=r,a=va(t,n.schema);return n2(n,a,e)?s.unsetMark(a,{extendEmptyMarkRange:i}):s.setMark(a,e)},Tde=(t,e,r={})=>({state:n,commands:s})=>{const i=gr(t,n.schema),a=gr(e,n.schema),l=Uo(n,i,r);let c;return n.selection.$anchor.sameParent(n.selection.$head)&&(c=n.selection.$anchor.parent.attrs),l?s.setNode(a,c):s.setNode(i,{...c,...r})},Ade=(t,e={})=>({state:r,commands:n})=>{const s=gr(t,r.schema);return Uo(r,s,e)?n.lift(s):n.wrapIn(s,e)},zde=()=>({state:t,dispatch:e})=>{const r=t.plugins;for(let n=0;n<r.length;n+=1){const s=r[n];let i;if(s.spec.isInputRules&&(i=s.getState(t))){if(e){const a=t.tr,l=i.transform;for(let c=l.steps.length-1;c>=0;c-=1)a.step(l.steps[c].invert(l.docs[c]));if(i.text){const c=a.doc.resolve(i.from).marks();a.replaceWith(i.from,i.to,t.schema.text(i.text,c))}else a.delete(i.from,i.to)}return!0}}return!1},Pde=()=>({tr:t,dispatch:e})=>{const{selection:r}=t,{empty:n,ranges:s}=r;return n||e&&s.forEach(i=>{t.removeMark(i.$from.pos,i.$to.pos)}),!0},_de=(t,e={})=>({tr:r,state:n,dispatch:s})=>{var i;const{extendEmptyMarkRange:a=!1}=e,{selection:l}=r,c=va(t,n.schema),{$from:u,empty:d,ranges:h}=l;if(!s)return!0;if(d&&a){let{from:p,to:f}=l;const m=(i=u.marks().find(k=>k.type===c))==null?void 0:i.attrs,y=sN(u,c,m);y&&(p=y.from,f=y.to),r.removeMark(p,f,c)}else h.forEach(p=>{r.removeMark(p.$from.pos,p.$to.pos,c)});return r.removeStoredMark(c),!0},Ide=(t,e={})=>({tr:r,state:n,dispatch:s})=>{let i=null,a=null;const l=rx(typeof t=="string"?t:t.name,n.schema);return l?(l==="node"&&(i=gr(t,n.schema)),l==="mark"&&(a=va(t,n.schema)),s&&r.selection.ranges.forEach(c=>{const u=c.$from.pos,d=c.$to.pos;let h,p,f,m;r.selection.empty?n.doc.nodesBetween(u,d,(y,k)=>{i&&i===y.type&&(f=Math.max(k,u),m=Math.min(k+y.nodeSize,d),h=k,p=y)}):n.doc.nodesBetween(u,d,(y,k)=>{k<u&&i&&i===y.type&&(f=Math.max(k,u),m=Math.min(k+y.nodeSize,d),h=k,p=y),k>=u&&k<=d&&(i&&i===y.type&&r.setNodeMarkup(k,void 0,{...y.attrs,...e}),a&&y.marks.length&&y.marks.forEach(g=>{if(a===g.type){const x=Math.max(k,u),w=Math.min(k+y.nodeSize,d);r.addMark(x,w,a.create({...g.attrs,...e}))}}))}),p&&(h!==void 0&&r.setNodeMarkup(h,void 0,{...p.attrs,...e}),a&&p.marks.length&&p.marks.forEach(y=>{a===y.type&&r.addMark(f,m,a.create({...y.attrs,...e}))}))}),!0):!1},Ode=(t,e={})=>({state:r,dispatch:n})=>{const s=gr(t,r.schema);return fle(s,e)(r,n)},Rde=(t,e={})=>({state:r,dispatch:n})=>{const s=gr(t,r.schema);return mle(s,e)(r,n)},Lde=class{constructor(){this.callbacks={}}on(t,e){return this.callbacks[t]||(this.callbacks[t]=[]),this.callbacks[t].push(e),this}emit(t,...e){const r=this.callbacks[t];return r&&r.forEach(n=>n.apply(this,e)),this}off(t,e){const r=this.callbacks[t];return r&&(e?this.callbacks[t]=r.filter(n=>n!==e):delete this.callbacks[t]),this}once(t,e){const r=(...n)=>{this.off(t,r),e.apply(this,n)};return this.on(t,r)}removeAllListeners(){this.callbacks={}}},ix=class{constructor(t){var e;this.find=t.find,this.handler=t.handler,this.undoable=(e=t.undoable)!=null?e:!0}},Mde=(t,e)=>{if(nN(e))return e.exec(t);const r=e(t);if(!r)return null;const n=[r.text];return n.index=r.index,n.input=t,n.data=r.data,r.replaceWith&&(r.text.includes(r.replaceWith)||console.warn('[tiptap warn]: "inputRuleMatch.replaceWith" must be part of "inputRuleMatch.text".'),n.push(r.replaceWith)),n};function mm(t){var e;const{editor:r,from:n,to:s,text:i,rules:a,plugin:l}=t,{view:c}=r;if(c.composing)return!1;const u=c.state.doc.resolve(n);if(u.parent.type.spec.code||(e=u.nodeBefore||u.nodeAfter)!=null&&e.marks.find(p=>p.type.spec.code))return!1;let d=!1;const h=pde(u)+i;return a.forEach(p=>{if(d)return;const f=Mde(h,p.find);if(!f)return;const m=c.state.tr,y=ex({state:c.state,transaction:m}),k={from:n-(f[0].length-i.length),to:s},{commands:g,chain:x,can:w}=new tx({editor:r,state:y});p.handler({state:y,range:k,match:f,commands:g,chain:x,can:w})===null||!m.steps.length||(p.undoable&&m.setMeta(l,{transform:m,from:n,to:s,text:i}),c.dispatch(m),d=!0)}),d}function Dde(t){const{editor:e,rules:r}=t,n=new er({state:{init(){return null},apply(s,i,a){const l=s.getMeta(n);if(l)return l;const c=s.getMeta("applyInputRules");return!!c&&setTimeout(()=>{let{text:d}=c;typeof d=="string"?d=d:d=oN(Se.from(d),a.schema);const{from:h}=c,p=h+d.length;mm({editor:e,from:h,to:p,text:d,rules:r,plugin:n})}),s.selectionSet||s.docChanged?null:i}},props:{handleTextInput(s,i,a,l){return mm({editor:e,from:i,to:a,text:l,rules:r,plugin:n})},handleDOMEvents:{compositionend:s=>(setTimeout(()=>{const{$cursor:i}=s.state.selection;i&&mm({editor:e,from:i.pos,to:i.pos,text:"",rules:r,plugin:n})}),!1)},handleKeyDown(s,i){if(i.key!=="Enter")return!1;const{$cursor:a}=s.state.selection;return a?mm({editor:e,from:a.pos,to:a.pos,text:`
796`,rules:r,plugin:n}):!1}},isInputRules:!0});return n}function Fde(t){return Object.prototype.toString.call(t).slice(8,-1)}function gm(t){return Fde(t)!=="Object"?!1:t.constructor===Object&&Object.getPrototypeOf(t)===Object.prototype}function UL(t,e){const r={...t};return gm(t)&&gm(e)&&Object.keys(e).forEach(n=>{gm(e[n])&&gm(t[n])?r[n]=UL(t[n],e[n]):r[n]=e[n]}),r}var uN=class{constructor(t={}){this.type="extendable",this.parent=null,this.child=null,this.name="",this.config={name:this.name},this.config={...this.config,...t},this.name=this.config.name}get options(){return{...kt(Ue(this,"addOptions",{name:this.name}))||{}}}get storage(){return{...kt(Ue(this,"addStorage",{name:this.name,options:this.options}))||{}}}configure(t={}){const e=this.extend({...this.config,addOptions:()=>UL(this.options,t)});return e.name=this.name,e.parent=this.parent,e}extend(t={}){const e=new this.constructor({...this.config,...t});return e.parent=this,this.child=e,e.name="name"in t?t.name:e.parent.name,e}},Cc=class WL extends uN{constructor(){super(...arguments),this.type="mark"}static create(e={}){const r=typeof e=="function"?e():e;return new WL(r)}static handleExit({editor:e,mark:r}){const{tr:n}=e.state,s=e.state.selection.$from;if(s.pos===s.end()){const a=s.marks();if(!!!a.find(u=>(u==null?void 0:u.type.name)===r.name))return!1;const c=a.find(u=>(u==null?void 0:u.type.name)===r.name);return c&&n.removeStoredMark(c),n.insertText(" ",s.pos),e.view.dispatch(n),!0}return!1}configure(e){return super.configure(e)}extend(e){const r=typeof e=="function"?e():e;return super.extend(r)}};function Bde(t){return typeof t=="number"}var $de=class{constructor(t){this.find=t.find,this.handler=t.handler}},Ude=(t,e,r)=>{if(nN(e))return[...t.matchAll(e)];const n=e(t,r);return n?n.map(s=>{const i=[s.text];return i.index=s.index,i.input=t,i.data=s.data,s.replaceWith&&(s.text.includes(s.replaceWith)||console.warn('[tiptap warn]: "pasteRuleMatch.replaceWith" must be part of "pasteRuleMatch.text".'),i.push(s.replaceWith)),i}):[]};function Wde(t){const{editor:e,state:r,from:n,to:s,rule:i,pasteEvent:a,dropEvent:l}=t,{commands:c,chain:u,can:d}=new tx({editor:e,state:r}),h=[];return r.doc.nodesBetween(n,s,(f,m)=>{var y,k,g,x,w;if((k=(y=f.type)==null?void 0:y.spec)!=null&&k.code||!(f.isText||f.isTextblock||f.isInline))return;const b=(w=(x=(g=f.content)==null?void 0:g.size)!=null?x:f.nodeSize)!=null?w:0,v=Math.max(n,m),A=Math.min(s,m+b);if(v>=A)return;const C=f.isText?f.text||"":f.textBetween(v-m,A-m,void 0,"");Ude(C,i.find,a).forEach(N=>{if(N.index===void 0)return;const W=v+N.index+1,K=W+N[0].length,T={from:r.tr.mapping.map(W),to:r.tr.mapping.map(K)},F=i.handler({state:r,range:T,match:N,commands:c,chain:u,can:d,pasteEvent:a,dropEvent:l});h.push(F)})}),h.every(f=>f!==null)}var ym=null,Vde=t=>{var e;const r=new ClipboardEvent("paste",{clipboardData:new DataTransfer});return(e=r.clipboardData)==null||e.setData("text/html",t),r};function Hde(t){const{editor:e,rules:r}=t;let n=null,s=!1,i=!1,a=typeof ClipboardEvent<"u"?new ClipboardEvent("paste"):null,l;try{l=typeof DragEvent<"u"?new DragEvent("drop"):null}catch{l=null}const c=({state:d,from:h,to:p,rule:f,pasteEvt:m})=>{const y=d.tr,k=ex({state:d,transaction:y});if(!(!Wde({editor:e,state:k,from:Math.max(h-1,0),to:p.b-1,rule:f,pasteEvent:m,dropEvent:l})||!y.steps.length)){try{l=typeof DragEvent<"u"?new DragEvent("drop"):null}catch{l=null}return a=typeof ClipboardEvent<"u"?new ClipboardEvent("paste"):null,y}};return r.map(d=>new er({view(h){const p=m=>{var y;n=(y=h.dom.parentElement)!=null&&y.contains(m.target)?h.dom.parentElement:null,n&&(ym=e)},f=()=>{ym&&(ym=null)};return window.addEventListener("dragstart",p),window.addEventListener("dragend",f),{destroy(){window.removeEventListener("dragstart",p),window.removeEventListener("dragend",f)}}},props:{handleDOMEvents:{drop:(h,p)=>{if(i=n===h.dom.parentElement,l=p,!i){const f=ym;f!=null&&f.isEditable&&setTimeout(()=>{const m=f.state.selection;m&&f.commands.deleteRange({from:m.from,to:m.to})},10)}return!1},paste:(h,p)=>{var f;const m=(f=p.clipboardData)==null?void 0:f.getData("text/html");return a=p,s=!!(m!=null&&m.includes("data-pm-slice")),!1}}},appendTransaction:(h,p,f)=>{const m=h[0],y=m.getMeta("uiEvent")==="paste"&&!s,k=m.getMeta("uiEvent")==="drop"&&!i,g=m.getMeta("applyPasteRules"),x=!!g;if(!y&&!k&&!x)return;if(x){let{text:v}=g;typeof v=="string"?v=v:v=oN(Se.from(v),f.schema);const{from:A}=g,C=A+v.length,_=Vde(v);return c({rule:d,state:f,from:A,to:{b:C},pasteEvt:_})}const w=p.doc.content.findDiffStart(f.doc.content),b=p.doc.content.findDiffEnd(f.doc.content);if(!(!Bde(w)||!b||w===b.b))return c({rule:d,state:f,from:w,to:b,pasteEvt:a})}}))}var ax=class{constructor(t,e){this.splittableMarks=[],this.editor=e,this.baseExtensions=t,this.extensions=LL(t),this.schema=ade(this.extensions,e),this.setupExtensions()}get commands(){return this.extensions.reduce((t,e)=>{const r={name:e.name,options:e.options,storage:this.editor.extensionStorage[e.name],editor:this.editor,type:Bw(e.name,this.schema)},n=Ue(e,"addCommands",r);return n?{...t,...n()}:t},{})}get plugins(){const{editor:t}=this;return lN([...this.extensions].reverse()).flatMap(n=>{const s={name:n.name,options:n.options,storage:this.editor.extensionStorage[n.name],editor:t,type:Bw(n.name,this.schema)},i=[],a=Ue(n,"addKeyboardShortcuts",s);let l={};if(n.type==="mark"&&Ue(n,"exitable",s)&&(l.ArrowRight=()=>Cc.handleExit({editor:t,mark:n})),a){const p=Object.fromEntries(Object.entries(a()).map(([f,m])=>[f,()=>m({editor:t})]));l={...l,...p}}const c=cue(l);i.push(c);const u=Ue(n,"addInputRules",s);if(D5(n,t.options.enableInputRules)&&u){const p=u();if(p&&p.length){const f=Dde({editor:t,rules:p}),m=Array.isArray(f)?f:[f];i.push(...m)}}const d=Ue(n,"addPasteRules",s);if(D5(n,t.options.enablePasteRules)&&d){const p=d();if(p&&p.length){const f=Hde({editor:t,rules:p});i.push(...f)}}const h=Ue(n,"addProseMirrorPlugins",s);if(h){const p=h();i.push(...p)}return i})}get attributes(){return RL(this.extensions)}get nodeViews(){const{editor:t}=this,{nodeExtensions:e}=Up(this.extensions);return Object.fromEntries(e.filter(r=>!!Ue(r,"addNodeView")).map(r=>{const n=this.attributes.filter(l=>l.type===r.name),s={name:r.name,options:r.options,storage:this.editor.extensionStorage[r.name],editor:t,type:gr(r.name,this.schema)},i=Ue(r,"addNodeView",s);if(!i)return[];const a=(l,c,u,d,h)=>{const p=gg(l,n);return i()({node:l,view:c,getPos:u,decorations:d,innerDecorations:h,editor:t,extension:r,HTMLAttributes:p})};return[r.name,a]}))}get markViews(){const{editor:t}=this,{markExtensions:e}=Up(this.extensions);return Object.fromEntries(e.filter(r=>!!Ue(r,"addMarkView")).map(r=>{const n=this.attributes.filter(l=>l.type===r.name),s={name:r.name,options:r.options,storage:this.editor.extensionStorage[r.name],editor:t,type:va(r.name,this.schema)},i=Ue(r,"addMarkView",s);if(!i)return[];const a=(l,c,u)=>{const d=gg(l,n);return i()({mark:l,view:c,inline:u,editor:t,extension:r,HTMLAttributes:d,updateAttributes:h=>{ihe(l,t,h)}})};return[r.name,a]}))}setupExtensions(){const t=this.extensions;this.editor.extensionStorage=Object.fromEntries(t.map(e=>[e.name,e.storage])),t.forEach(e=>{var r;const n={name:e.name,options:e.options,storage:this.editor.extensionStorage[e.name],editor:this.editor,type:Bw(e.name,this.schema)};e.type==="mark"&&((r=kt(Ue(e,"keepOnSplit",n)))==null||r)&&this.splittableMarks.push(e.name);const s=Ue(e,"onBeforeCreate",n),i=Ue(e,"onCreate",n),a=Ue(e,"onUpdate",n),l=Ue(e,"onSelectionUpdate",n),c=Ue(e,"onTransaction",n),u=Ue(e,"onFocus",n),d=Ue(e,"onBlur",n),h=Ue(e,"onDestroy",n);s&&this.editor.on("beforeCreate",s),i&&this.editor.on("create",i),a&&this.editor.on("update",a),l&&this.editor.on("selectionUpdate",l),c&&this.editor.on("transaction",c),u&&this.editor.on("focus",u),d&&this.editor.on("blur",d),h&&this.editor.on("destroy",h)})}};ax.resolve=LL;ax.sort=lN;ax.flatten=aN;var qde={};rN(qde,{ClipboardTextSerializer:()=>HL,Commands:()=>qL,Delete:()=>KL,Drop:()=>GL,Editable:()=>ZL,FocusEvents:()=>JL,Keymap:()=>XL,Paste:()=>QL,Tabindex:()=>eM,focusEventsPluginKey:()=>YL});var xr=class VL extends uN{constructor(){super(...arguments),this.type="extension"}static create(e={}){const r=typeof e=="function"?e():e;return new VL(r)}configure(e){return super.configure(e)}extend(e){const r=typeof e=="function"?e():e;return super.extend(r)}},HL=xr.create({name:"clipboardTextSerializer",addOptions(){return{blockSeparator:void 0}},addProseMirrorPlugins(){return[new er({key:new Lr("clipboardTextSerializer"),props:{clipboardTextSerializer:()=>{const{editor:t}=this,{state:e,schema:r}=t,{doc:n,selection:s}=e,{ranges:i}=s,a=Math.min(...i.map(d=>d.$from.pos)),l=Math.max(...i.map(d=>d.$to.pos)),c=DL(r);return ML(n,{from:a,to:l},{...this.options.blockSeparator!==void 0?{blockSeparator:this.options.blockSeparator}:{},textSerializers:c})}}})]}}),qL=xr.create({name:"commands",addCommands(){return{...CL}}}),KL=xr.create({name:"delete",onUpdate({transaction:t,appendedTransactions:e}){var r,n,s;const i=()=>{var a,l,c,u;if((u=(c=(l=(a=this.editor.options.coreExtensionOptions)==null?void 0:a.delete)==null?void 0:l.filterTransaction)==null?void 0:c.call(l,t))!=null?u:t.getMeta("y-sync$"))return;const d=IL(t.before,[t,...e]);BL(d).forEach(f=>{d.mapping.mapResult(f.oldRange.from).deletedAfter&&d.mapping.mapResult(f.oldRange.to).deletedBefore&&d.before.nodesBetween(f.oldRange.from,f.oldRange.to,(m,y)=>{const k=y+m.nodeSize-2,g=f.oldRange.from<=y&&k<=f.oldRange.to;this.editor.emit("delete",{type:"node",node:m,from:y,to:k,newFrom:d.mapping.map(y),newTo:d.mapping.map(k),deletedRange:f.oldRange,newRange:f.newRange,partial:!g,editor:this.editor,transaction:t,combinedTransform:d})})});const p=d.mapping;d.steps.forEach((f,m)=>{var y,k;if(f instanceof $s){const g=p.slice(m).map(f.from,-1),x=p.slice(m).map(f.to),w=p.invert().map(g,-1),b=p.invert().map(x),v=(y=d.doc.nodeAt(g-1))==null?void 0:y.marks.some(C=>C.eq(f.mark)),A=(k=d.doc.nodeAt(x))==null?void 0:k.marks.some(C=>C.eq(f.mark));this.editor.emit("delete",{type:"mark",mark:f.mark,from:f.from,to:f.to,deletedRange:{from:w,to:b},newRange:{from:g,to:x},partial:!!(A||v),editor:this.editor,transaction:t,combinedTransform:d})}})};(s=(n=(r=this.editor.options.coreExtensionOptions)==null?void 0:r.delete)==null?void 0:n.async)==null||s?setTimeout(i,0):i()}}),GL=xr.create({name:"drop",addProseMirrorPlugins(){return[new er({key:new Lr("tiptapDrop"),props:{handleDrop:(t,e,r,n)=>{this.editor.emit("drop",{editor:this.editor,event:e,slice:r,moved:n})}}})]}}),ZL=xr.create({name:"editable",addProseMirrorPlugins(){return[new er({key:new Lr("editable"),props:{editable:()=>this.editor.options.editable}})]}}),YL=new Lr("focusEvents"),JL=xr.create({name:"focusEvents",addProseMirrorPlugins(){const{editor:t}=this;return[new er({key:YL,props:{handleDOMEvents:{focus:(e,r)=>{t.isFocused=!0;const n=t.state.tr.setMeta("focus",{event:r}).setMeta("addToHistory",!1);return e.dispatch(n),!1},blur:(e,r)=>{t.isFocused=!1;const n=t.state.tr.setMeta("blur",{event:r}).setMeta("addToHistory",!1);return e.dispatch(n),!1}}}})]}}),XL=xr.create({name:"keymap",addKeyboardShortcuts(){const t=()=>this.editor.commands.first(({commands:a})=>[()=>a.undoInputRule(),()=>a.command(({tr:l})=>{const{selection:c,doc:u}=l,{empty:d,$anchor:h}=c,{pos:p,parent:f}=h,m=h.parent.isTextblock&&p>0?l.doc.resolve(p-1):h,y=m.parent.type.spec.isolating,k=h.pos-h.parentOffset,g=y&&m.parent.childCount===1?k===h.pos:rt.atStart(u).from===p;return!d||!f.type.isTextblock||f.textContent.length||!g||g&&h.parent.type.name==="paragraph"?!1:a.clearNodes()}),()=>a.deleteSelection(),()=>a.joinBackward(),()=>a.selectNodeBackward()]),e=()=>this.editor.commands.first(({commands:a})=>[()=>a.deleteSelection(),()=>a.deleteCurrentNode(),()=>a.joinForward(),()=>a.selectNodeForward()]),n={Enter:()=>this.editor.commands.first(({commands:a})=>[()=>a.newlineInCode(),()=>a.createParagraphNear(),()=>a.liftEmptyBlock(),()=>a.splitBlock()]),"Mod-Enter":()=>this.editor.commands.exitCode(),Backspace:t,"Mod-Backspace":t,"Shift-Backspace":t,Delete:e,"Mod-Delete":e,"Mod-a":()=>this.editor.commands.selectAll()},s={...n},i={...n,"Ctrl-h":t,"Alt-Backspace":t,"Ctrl-d":e,"Ctrl-Alt-Backspace":e,"Alt-Delete":e,"Alt-d":e,"Ctrl-a":()=>this.editor.commands.selectTextblockStart(),"Ctrl-e":()=>this.editor.commands.selectTextblockEnd()};return iN()||PL()?i:s},addProseMirrorPlugins(){return[new er({key:new Lr("clearDocument"),appendTransaction:(t,e,r)=>{if(t.some(y=>y.getMeta("composition")))return;const n=t.some(y=>y.docChanged)&&!e.doc.eq(r.doc),s=t.some(y=>y.getMeta("preventClearDocument"));if(!n||s)return;const{empty:i,from:a,to:l}=e.selection,c=rt.atStart(e.doc).from,u=rt.atEnd(e.doc).to;if(i||!(a===c&&l===u)||!sx(r.doc))return;const p=r.tr,f=ex({state:r,transaction:p}),{commands:m}=new tx({editor:this.editor,state:f});if(m.clearNodes(),!!p.steps.length)return p}})]}}),QL=xr.create({name:"paste",addProseMirrorPlugins(){return[new er({key:new Lr("tiptapPaste"),props:{handlePaste:(t,e,r)=>{this.editor.emit("paste",{editor:this.editor,event:e,slice:r})}}})]}}),eM=xr.create({name:"tabindex",addProseMirrorPlugins(){return[new er({key:new Lr("tabindex"),props:{attributes:()=>this.editor.isEditable?{tabindex:"0"}:{}}})]}}),Kde=class Vc{constructor(e,r,n=!1,s=null){this.currentNode=null,this.actualDepth=null,this.isBlock=n,this.resolvedPos=e,this.editor=r,this.currentNode=s}get name(){return this.node.type.name}get node(){return this.currentNode||this.resolvedPos.node()}get element(){return this.editor.view.domAtPos(this.pos).node}get depth(){var e;return(e=this.actualDepth)!=null?e:this.resolvedPos.depth}get pos(){return this.resolvedPos.pos}get content(){return this.node.content}set content(e){let r=this.from,n=this.to;if(this.isBlock){if(this.content.size===0){console.error(`You can’t set content on a block node. Tried to set content on ${this.name} at ${this.pos}`);return}r=this.from+1,n=this.to-1}this.editor.commands.insertContentAt({from:r,to:n},e)}get attributes(){return this.node.attrs}get textContent(){return this.node.textContent}get size(){return this.node.nodeSize}get from(){return this.isBlock?this.pos:this.resolvedPos.start(this.resolvedPos.depth)}get range(){return{from:this.from,to:this.to}}get to(){return this.isBlock?this.pos+this.size:this.resolvedPos.end(this.resolvedPos.depth)+(this.node.isText?0:1)}get parent(){if(this.depth===0)return null;const e=this.resolvedPos.start(this.resolvedPos.depth-1),r=this.resolvedPos.doc.resolve(e);return new Vc(r,this.editor)}get before(){let e=this.resolvedPos.doc.resolve(this.from-(this.isBlock?1:2));return e.depth!==this.depth&&(e=this.resolvedPos.doc.resolve(this.from-3)),new Vc(e,this.editor)}get after(){let e=this.resolvedPos.doc.resolve(this.to+(this.isBlock?2:1));return e.depth!==this.depth&&(e=this.resolvedPos.doc.resolve(this.to+3)),new Vc(e,this.editor)}get children(){const e=[];return this.node.content.forEach((r,n)=>{const s=r.isBlock&&!r.isTextblock,i=r.isAtom&&!r.isText,a=this.pos+n+(i?0:1);if(a<0||a>this.resolvedPos.doc.nodeSize-2)return;const l=this.resolvedPos.doc.resolve(a);if(!s&&l.depth<=this.depth)return;const c=new Vc(l,this.editor,s,s?r:null);s&&(c.actualDepth=this.depth+1),e.push(new Vc(l,this.editor,s,s?r:null))}),e}get firstChild(){return this.children[0]||null}get lastChild(){const e=this.children;return e[e.length-1]||null}closest(e,r={}){let n=null,s=this.parent;for(;s&&!n;){if(s.node.type.name===e)if(Object.keys(r).length>0){const i=s.node.attrs,a=Object.keys(r);for(let l=0;l<a.length;l+=1){const c=a[l];if(i[c]!==r[c])break}}else n=s;s=s.parent}return n}querySelector(e,r={}){return this.querySelectorAll(e,r,!0)[0]||null}querySelectorAll(e,r={},n=!1){let s=[];if(!this.children||this.children.length===0)return s;const i=Object.keys(r);return this.children.forEach(a=>{n&&s.length>0||(a.node.type.name===e&&i.every(c=>r[c]===a.node.attrs[c])&&s.push(a),!(n&&s.length>0)&&(s=s.concat(a.querySelectorAll(e,r,n))))}),s}setAttribute(e){const{tr:r}=this.editor.state;r.setNodeMarkup(this.from,void 0,{...this.node.attrs,...e}),this.editor.view.dispatch(r)}},Gde=`.ProseMirror {
797  position: relative;
798}
799
800.ProseMirror {
801  word-wrap: break-word;
802  white-space: pre-wrap;
803  white-space: break-spaces;
804  -webkit-font-variant-ligatures: none;
805  font-variant-ligatures: none;
806  font-feature-settings: "liga" 0; /* the above doesn't seem to work in Edge */
807}
808
809.ProseMirror [contenteditable="false"] {
810  white-space: normal;
811}
812
813.ProseMirror [contenteditable="false"] [contenteditable="true"] {
814  white-space: pre-wrap;
815}
816
817.ProseMirror pre {
818  white-space: pre-wrap;
819}
820
821img.ProseMirror-separator {
822  display: inline !important;
823  border: none !important;
824  margin: 0 !important;
825  width: 0 !important;
826  height: 0 !important;
827}
828
829.ProseMirror-gapcursor {
830  display: none;
831  pointer-events: none;
832  position: absolute;
833  margin: 0;
834}
835
836.ProseMirror-gapcursor:after {
837  content: "";
838  display: block;
839  position: absolute;
840  top: -2px;
841  width: 20px;
842  border-top: 1px solid black;
843  animation: ProseMirror-cursor-blink 1.1s steps(2, start) infinite;
844}
845
846@keyframes ProseMirror-cursor-blink {
847  to {
848    visibility: hidden;
849  }
850}
851
852.ProseMirror-hideselection *::selection {
853  background: transparent;
854}
855
856.ProseMirror-hideselection *::-moz-selection {
857  background: transparent;
858}
859
860.ProseMirror-hideselection * {
861  caret-color: transparent;
862}
863
864.ProseMirror-focused .ProseMirror-gapcursor {
865  display: block;
866}`;function Zde(t,e,r){const n=document.querySelector("style[data-tiptap-style]");if(n!==null)return n;const s=document.createElement("style");return e&&s.setAttribute("nonce",e),s.setAttribute("data-tiptap-style",""),s.innerHTML=t,document.getElementsByTagName("head")[0].appendChild(s),s}var Yde=class extends Lde{constructor(t={}){super(),this.css=null,this.className="tiptap",this.editorView=null,this.isFocused=!1,this.isInitialized=!1,this.extensionStorage={},this.instanceId=Math.random().toString(36).slice(2,9),this.options={element:typeof document<"u"?document.createElement("div"):null,content:"",injectCSS:!0,injectNonce:void 0,extensions:[],autofocus:!1,editable:!0,editorProps:{},parseOptions:{},coreExtensionOptions:{},enableInputRules:!0,enablePasteRules:!0,enableCoreExtensions:!0,enableContentCheck:!1,emitContentError:!1,onBeforeCreate:()=>null,onCreate:()=>null,onMount:()=>null,onUnmount:()=>null,onUpdate:()=>null,onSelectionUpdate:()=>null,onTransaction:()=>null,onFocus:()=>null,onBlur:()=>null,onDestroy:()=>null,onContentError:({error:n})=>{throw n},onPaste:()=>null,onDrop:()=>null,onDelete:()=>null},this.isCapturingTransaction=!1,this.capturedTransaction=null,this.setOptions(t),this.createExtensionManager(),this.createCommandManager(),this.createSchema(),this.on("beforeCreate",this.options.onBeforeCreate),this.emit("beforeCreate",{editor:this}),this.on("mount",this.options.onMount),this.on("unmount",this.options.onUnmount),this.on("contentError",this.options.onContentError),this.on("create",this.options.onCreate),this.on("update",this.options.onUpdate),this.on("selectionUpdate",this.options.onSelectionUpdate),this.on("transaction",this.options.onTransaction),this.on("focus",this.options.onFocus),this.on("blur",this.options.onBlur),this.on("destroy",this.options.onDestroy),this.on("drop",({event:n,slice:s,moved:i})=>this.options.onDrop(n,s,i)),this.on("paste",({event:n,slice:s})=>this.options.onPaste(n,s)),this.on("delete",this.options.onDelete);const e=this.createDoc(),r=AL(e,this.options.autofocus);this.editorState=hu.create({doc:e,schema:this.schema,selection:r||void 0}),this.options.element&&this.mount(this.options.element)}mount(t){if(typeof document>"u")throw new Error("[tiptap error]: The editor cannot be mounted because there is no 'document' defined in this environment.");this.createView(t),this.emit("mount",{editor:this}),this.css&&!document.head.contains(this.css)&&document.head.appendChild(this.css),window.setTimeout(()=>{this.isDestroyed||(this.commands.focus(this.options.autofocus),this.emit("create",{editor:this}),this.isInitialized=!0)},0)}unmount(){if(this.editorView){const t=this.editorView.dom;t!=null&&t.editor&&delete t.editor,this.editorView.destroy()}if(this.editorView=null,this.isInitialized=!1,this.css&&!document.querySelectorAll(`.${this.className}`).length)try{typeof this.css.remove=="function"?this.css.remove():this.css.parentNode&&this.css.parentNode.removeChild(this.css)}catch(t){console.warn("Failed to remove CSS element:",t)}this.css=null,this.emit("unmount",{editor:this})}get storage(){return this.extensionStorage}get commands(){return this.commandManager.commands}chain(){return this.commandManager.chain()}can(){return this.commandManager.can()}injectCSS(){this.options.injectCSS&&typeof document<"u"&&(this.css=Zde(Gde,this.options.injectNonce))}setOptions(t={}){this.options={...this.options,...t},!(!this.editorView||!this.state||this.isDestroyed)&&(this.options.editorProps&&this.view.setProps(this.options.editorProps),this.view.updateState(this.state))}setEditable(t,e=!0){this.setOptions({editable:t}),e&&this.emit("update",{editor:this,transaction:this.state.tr,appendedTransactions:[]})}get isEditable(){return this.options.editable&&this.view&&this.view.editable}get view(){return this.editorView?this.editorView:new Proxy({state:this.editorState,updateState:t=>{this.editorState=t},dispatch:t=>{this.dispatchTransaction(t)},composing:!1,dragging:null,editable:!0,isDestroyed:!1},{get:(t,e)=>{if(this.editorView)return this.editorView[e];if(e==="state")return this.editorState;if(e in t)return Reflect.get(t,e);throw new Error(`[tiptap error]: The editor view is not available. Cannot access view['${e}']. The editor may not be mounted yet.`)}})}get state(){return this.editorView&&(this.editorState=this.view.state),this.editorState}registerPlugin(t,e){const r=OL(e)?e(t,[...this.state.plugins]):[...this.state.plugins,t],n=this.state.reconfigure({plugins:r});return this.view.updateState(n),n}unregisterPlugin(t){if(this.isDestroyed)return;const e=this.state.plugins;let r=e;if([].concat(t).forEach(s=>{const i=typeof s=="string"?`${s}$`:s.key;r=r.filter(a=>!a.key.startsWith(i))}),e.length===r.length)return;const n=this.state.reconfigure({plugins:r});return this.view.updateState(n),n}createExtensionManager(){var t,e;const n=[...this.options.enableCoreExtensions?[ZL,HL.configure({blockSeparator:(e=(t=this.options.coreExtensionOptions)==null?void 0:t.clipboardTextSerializer)==null?void 0:e.blockSeparator}),qL,JL,XL,eM,GL,QL,KL].filter(s=>typeof this.options.enableCoreExtensions=="object"?this.options.enableCoreExtensions[s.name]!==!1:!0):[],...this.options.extensions].filter(s=>["extension","node","mark"].includes(s==null?void 0:s.type));this.extensionManager=new ax(n,this)}createCommandManager(){this.commandManager=new tx({editor:this})}createSchema(){this.schema=this.extensionManager.schema}createDoc(){let t;try{t=r2(this.options.content,this.schema,this.options.parseOptions,{errorOnInvalidContent:this.options.enableContentCheck})}catch(e){if(!(e instanceof Error)||!["[tiptap error]: Invalid JSON content","[tiptap error]: Invalid HTML content"].includes(e.message))throw e;this.emit("contentError",{editor:this,error:e,disableCollaboration:()=>{"collaboration"in this.storage&&typeof this.storage.collaboration=="object"&&this.storage.collaboration&&(this.storage.collaboration.isDisabled=!0),this.options.extensions=this.options.extensions.filter(r=>r.name!=="collaboration"),this.createExtensionManager()}}),t=r2(this.options.content,this.schema,this.options.parseOptions,{errorOnInvalidContent:!1})}return t}createView(t){var e;this.editorView=new SL(t,{...this.options.editorProps,attributes:{role:"textbox",...(e=this.options.editorProps)==null?void 0:e.attributes},dispatchTransaction:this.dispatchTransaction.bind(this),state:this.editorState,markViews:this.extensionManager.markViews,nodeViews:this.extensionManager.nodeViews});const r=this.state.reconfigure({plugins:this.extensionManager.plugins});this.view.updateState(r),this.prependClass(),this.injectCSS();const n=this.view.dom;n.editor=this}createNodeViews(){this.view.isDestroyed||this.view.setProps({markViews:this.extensionManager.markViews,nodeViews:this.extensionManager.nodeViews})}prependClass(){this.view.dom.className=`${this.className} ${this.view.dom.className}`}captureTransaction(t){this.isCapturingTransaction=!0,t(),this.isCapturingTransaction=!1;const e=this.capturedTransaction;return this.capturedTransaction=null,e}dispatchTransaction(t){if(this.view.isDestroyed)return;if(this.isCapturingTransaction){if(!this.capturedTransaction){this.capturedTransaction=t;return}t.steps.forEach(u=>{var d;return(d=this.capturedTransaction)==null?void 0:d.step(u)});return}const{state:e,transactions:r}=this.state.applyTransaction(t),n=!this.state.selection.eq(e.selection),s=r.includes(t),i=this.state;if(this.emit("beforeTransaction",{editor:this,transaction:t,nextState:e}),!s)return;this.view.updateState(e),this.emit("transaction",{editor:this,transaction:t,appendedTransactions:r.slice(1)}),n&&this.emit("selectionUpdate",{editor:this,transaction:t});const a=r.findLast(u=>u.getMeta("focus")||u.getMeta("blur")),l=a==null?void 0:a.getMeta("focus"),c=a==null?void 0:a.getMeta("blur");l&&this.emit("focus",{editor:this,event:l.event,transaction:a}),c&&this.emit("blur",{editor:this,event:c.event,transaction:a}),!(t.getMeta("preventUpdate")||!r.some(u=>u.docChanged)||i.doc.eq(e.doc))&&this.emit("update",{editor:this,transaction:t,appendedTransactions:r.slice(1)})}getAttributes(t){return FL(this.state,t)}isActive(t,e){const r=typeof t=="string"?t:null,n=typeof t=="string"?e:t;return fde(this.state,r,n)}getJSON(){return this.state.doc.toJSON()}getHTML(){return oN(this.state.doc.content,this.schema)}getText(t){const{blockSeparator:e=`
867
868`,textSerializers:r={}}=t||{};return lde(this.state.doc,{blockSeparator:e,textSerializers:{...DL(this.schema),...r}})}get isEmpty(){return sx(this.state.doc)}destroy(){this.emit("destroy"),this.unmount(),this.removeAllListeners()}get isDestroyed(){var t,e;return(e=(t=this.editorView)==null?void 0:t.isDestroyed)!=null?e:!0}$node(t,e){var r;return((r=this.$doc)==null?void 0:r.querySelector(t,e))||null}$nodes(t,e){var r;return((r=this.$doc)==null?void 0:r.querySelectorAll(t,e))||null}$pos(t){const e=this.state.doc.resolve(t);return new Kde(e,this)}get $doc(){return this.$pos(0)}};function od(t){return new ix({find:t.find,handler:({state:e,range:r,match:n})=>{const s=kt(t.getAttributes,void 0,n);if(s===!1||s===null)return null;const{tr:i}=e,a=n[n.length-1],l=n[0];if(a){const c=l.search(/\S/),u=r.from+l.indexOf(a),d=u+a.length;if(cN(r.from,r.to,e.doc).filter(f=>f.mark.type.excluded.find(y=>y===t.type&&y!==f.mark.type)).filter(f=>f.to>u).length)return null;d<r.to&&i.delete(d,r.to),u>r.from&&i.delete(r.from+c,u);const p=r.from+c+a.length;i.addMark(r.from+c,p,t.type.create(s||{})),i.removeStoredMark(t.type)}},undoable:t.undoable})}function Jde(t){return new ix({find:t.find,handler:({state:e,range:r,match:n})=>{const s=kt(t.getAttributes,void 0,n)||{},{tr:i}=e,a=r.from;let l=r.to;const c=t.type.create(s);if(n[1]){const u=n[0].lastIndexOf(n[1]);let d=a+u;d>l?d=l:l=d+n[1].length;const h=n[0][n[0].length-1];i.insertText(h,a+n[0].length-1),i.replaceWith(d,l,c)}else if(n[0]){const u=t.type.isInline?a:a-1;i.insert(u,t.type.create(s)).delete(i.mapping.map(a),i.mapping.map(l))}i.scrollIntoView()},undoable:t.undoable})}function s2(t){return new ix({find:t.find,handler:({state:e,range:r,match:n})=>{const s=e.doc.resolve(r.from),i=kt(t.getAttributes,void 0,n)||{};if(!s.node(-1).canReplaceWith(s.index(-1),s.indexAfter(-1),t.type))return null;e.tr.delete(r.from,r.to).setBlockType(r.from,r.from,t.type,i)},undoable:t.undoable})}function ld(t){return new ix({find:t.find,handler:({state:e,range:r,match:n,chain:s})=>{const i=kt(t.getAttributes,void 0,n)||{},a=e.tr.delete(r.from,r.to),c=a.doc.resolve(r.from).blockRange(),u=c&&BS(c,t.type,i);if(!u)return null;if(a.wrap(c,u),t.keepMarks&&t.editor){const{selection:h,storedMarks:p}=e,{splittableMarks:f}=t.editor.extensionManager,m=p||h.$to.parentOffset&&h.$from.marks();if(m){const y=m.filter(k=>f.includes(k.type.name));a.ensureMarks(y)}}if(t.keepAttributes){const h=t.type.name==="bulletList"||t.type.name==="orderedList"?"listItem":"taskList";s().updateAttributes(h,i).run()}const d=a.doc.resolve(r.from-1).nodeBefore;d&&d.type===t.type&&Qo(a.doc,r.from-1)&&(!t.joinPredicate||t.joinPredicate(n,d))&&a.join(r.from-1)},undoable:t.undoable})}function Xde(t,e){const{selection:r}=t,{$from:n}=r;if(r instanceof Ve){const i=n.index();return n.parent.canReplaceWith(i,i+1,e)}let s=n.depth;for(;s>=0;){const i=n.index(s);if(n.node(s).contentMatchAt(i).matchType(e))return!0;s-=1}return!1}var Qde={};rN(Qde,{createAtomBlockMarkdownSpec:()=>ehe,createBlockMarkdownSpec:()=>the,createInlineMarkdownSpec:()=>she,parseAttributes:()=>dN,parseIndentedBlocks:()=>i2,renderNestedMarkdownContent:()=>pN,serializeAttributes:()=>hN});function dN(t){if(!(t!=null&&t.trim()))return{};const e={},r=[],n=t.replace(/["']([^"']*)["']/g,u=>(r.push(u),`__QUOTED_${r.length-1}__`)),s=n.match(/(?:^|\s)\.([a-zA-Z][\w-]*)/g);if(s){const u=s.map(d=>d.trim().slice(1));e.class=u.join(" ")}const i=n.match(/(?:^|\s)#([a-zA-Z][\w-]*)/);i&&(e.id=i[1]);const a=/([a-zA-Z][\w-]*)\s*=\s*(__QUOTED_\d+__)/g;Array.from(n.matchAll(a)).forEach(([,u,d])=>{var h;const p=parseInt(((h=d.match(/__QUOTED_(\d+)__/))==null?void 0:h[1])||"0",10),f=r[p];f&&(e[u]=f.slice(1,-1))});const c=n.replace(/(?:^|\s)\.([a-zA-Z][\w-]*)/g,"").replace(/(?:^|\s)#([a-zA-Z][\w-]*)/g,"").replace(/([a-zA-Z][\w-]*)\s*=\s*__QUOTED_\d+__/g,"").trim();return c&&c.split(/\s+/).filter(Boolean).forEach(d=>{d.match(/^[a-zA-Z][\w-]*$/)&&(e[d]=!0)}),e}function hN(t){if(!t||Object.keys(t).length===0)return"";const e=[];return t.class&&String(t.class).split(/\s+/).filter(Boolean).forEach(n=>e.push(`.${n}`)),t.id&&e.push(`#${t.id}`),Object.entries(t).forEach(([r,n])=>{r==="class"||r==="id"||(n===!0?e.push(r):n!==!1&&n!=null&&e.push(`${r}="${String(n)}"`))}),e.join(" ")}function ehe(t){const{nodeName:e,name:r,parseAttributes:n=dN,serializeAttributes:s=hN,defaultAttributes:i={},requiredAttributes:a=[],allowedAttributes:l}=t,c=r||e,u=d=>{if(!l)return d;const h={};return l.forEach(p=>{p in d&&(h[p]=d[p])}),h};return{parseMarkdown:(d,h)=>{const p={...i,...d.attributes};return h.createNode(e,p,[])},markdownTokenizer:{name:e,level:"block",start(d){var h;const p=new RegExp(`^:::${c}(?:\\s|$)`,"m"),f=(h=d.match(p))==null?void 0:h.index;return f!==void 0?f:-1},tokenize(d,h,p){const f=new RegExp(`^:::${c}(?:\\s+\\{([^}]*)\\})?\\s*:::(?:\\n|$)`),m=d.match(f);if(!m)return;const y=m[1]||"",k=n(y);if(!a.find(x=>!(x in k)))return{type:e,raw:m[0],attributes:k}}},renderMarkdown:d=>{const h=u(d.attrs||{}),p=s(h),f=p?` {${p}}`:"";return`:::${c}${f} :::`}}}function the(t){const{nodeName:e,name:r,getContent:n,parseAttributes:s=dN,serializeAttributes:i=hN,defaultAttributes:a={},content:l="block",allowedAttributes:c}=t,u=r||e,d=h=>{if(!c)return h;const p={};return c.forEach(f=>{f in h&&(p[f]=h[f])}),p};return{parseMarkdown:(h,p)=>{let f;if(n){const y=n(h);f=typeof y=="string"?[{type:"text",text:y}]:y}else l==="block"?f=p.parseChildren(h.tokens||[]):f=p.parseInline(h.tokens||[]);const m={...a,...h.attributes};return p.createNode(e,m,f)},markdownTokenizer:{name:e,level:"block",start(h){var p;const f=new RegExp(`^:::${u}`,"m"),m=(p=h.match(f))==null?void 0:p.index;return m!==void 0?m:-1},tokenize(h,p,f){var m;const y=new RegExp(`^:::${u}(?:\\s+\\{([^}]*)\\})?\\s*\\n`),k=h.match(y);if(!k)return;const[g,x=""]=k,w=s(x);let b=1;const v=g.length;let A="";const C=/^:::([\w-]*)(\s.*)?/gm,_=h.slice(v);for(C.lastIndex=0;;){const N=C.exec(_);if(N===null)break;const W=N.index,K=N[1];if(!((m=N[2])!=null&&m.endsWith(":::"))){if(K)b+=1;else if(b-=1,b===0){const T=_.slice(0,W);A=T.trim();const F=h.slice(0,v+W+N[0].length);let E=[];if(A)if(l==="block")for(E=f.blockTokens(T),E.forEach(H=>{H.text&&(!H.tokens||H.tokens.length===0)&&(H.tokens=f.inlineTokens(H.text))});E.length>0;){const H=E[E.length-1];if(H.type==="paragraph"&&(!H.text||H.text.trim()===""))E.pop();else break}else E=f.inlineTokens(A);return{type:e,raw:F,attributes:w,content:A,tokens:E}}}}}},renderMarkdown:(h,p)=>{const f=d(h.attrs||{}),m=i(f),y=m?` {${m}}`:"",k=p.renderChildren(h.content||[],`
869
870`);return`:::${u}${y}
871
872${k}
873
874:::`}}}function rhe(t){if(!t.trim())return{};const e={},r=/(\w+)=(?:"([^"]*)"|'([^']*)')/g;let n=r.exec(t);for(;n!==null;){const[,s,i,a]=n;e[s]=i||a,n=r.exec(t)}return e}function nhe(t){return Object.entries(t).filter(([,e])=>e!=null).map(([e,r])=>`${e}="${r}"`).join(" ")}function she(t){const{nodeName:e,name:r,getContent:n,parseAttributes:s=rhe,serializeAttributes:i=nhe,defaultAttributes:a={},selfClosing:l=!1,allowedAttributes:c}=t,u=r||e,d=p=>{if(!c)return p;const f={};return c.forEach(m=>{m in p&&(f[m]=p[m])}),f},h=u.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");return{parseMarkdown:(p,f)=>{const m={...a,...p.attributes};if(l)return f.createNode(e,m);const y=n?n(p):p.content||"";return y?f.createNode(e,m,[f.createTextNode(y)]):f.createNode(e,m,[])},markdownTokenizer:{name:e,level:"inline",start(p){const f=l?new RegExp(`\\[${h}\\s*[^\\]]*\\]`):new RegExp(`\\[${h}\\s*[^\\]]*\\][\\s\\S]*?\\[\\/${h}\\]`),m=p.match(f),y=m==null?void 0:m.index;return y!==void 0?y:-1},tokenize(p,f,m){const y=l?new RegExp(`^\\[${h}\\s*([^\\]]*)\\]`):new RegExp(`^\\[${h}\\s*([^\\]]*)\\]([\\s\\S]*?)\\[\\/${h}\\]`),k=p.match(y);if(!k)return;let g="",x="";if(l){const[,b]=k;x=b}else{const[,b,v]=k;x=b,g=v||""}const w=s(x.trim());return{type:e,raw:k[0],content:g.trim(),attributes:w}}},renderMarkdown:p=>{let f="";n?f=n(p):p.content&&p.content.length>0&&(f=p.content.filter(g=>g.type==="text").map(g=>g.text).join(""));const m=d(p.attrs||{}),y=i(m),k=y?` ${y}`:"";return l?`[${u}${k}]`:`[${u}${k}]${f}[/${u}]`}}
874}function i2(t,e,r){var n,s,i,a;const l=t.split(`
875`),c=[];let u="",d=0;const h=e.baseIndentSize||2;for(;d<l.length;){const p=l[d],f=p.match(e.itemPattern);if(!f){if(c.length>0)break;if(p.trim()===""){d+=1;continue}else return}const m=e.extractItemData(f),{indentLevel:y,mainContent:k}=m;u=`${u}${p}
876`;const g=[k];for(d+=1;d<l.length;){const v=l[d];if(v.trim()===""){const C=l.slice(d+1).findIndex(W=>W.trim()!=="");if(C===-1)break;if((((s=(n=l[d+1+C].match(/^(\s*)/))==null?void 0:n[1])==null?void 0:s.length)||0)>y){g.push(v),u=`${u}${v}
877`,d+=1;continue}else break}if((((a=(i=v.match(/^(\s*)/))==null?void 0:i[1])==null?void 0:a.length)||0)>y)g.push(v),u=`${u}${v}
878`,d+=1;else break}let x;const w=g.slice(1);if(w.length>0){const v=w.map(A=>A.slice(y+h)).join(`
879`);v.trim()&&(e.customNestedParser?x=e.customNestedParser(v):x=r.blockTokens(v))}const b=e.createToken(m,x);c.push(b)}if(c.length!==0)return{items:c,raw:u.trim()}}function pN(t,e,r,n){if(!t||!Array.isArray(t.content))return"";const s=typeof r=="function"?r(n):r,[i,...a]=t.content,l=e.renderChildren([i]),c=[`${s}${l}`];return a&&a.length>0&&a.forEach(u=>{const d=e.renderChildren([u]);if(d){const h=d.split(`
880`).map(p=>p?e.indent(p):"").join(`
881`);c.push(h)}}),c.join(`
882`)}function ihe(t,e,r={}){const{state:n}=e,{doc:s,tr:i}=n,a=t;s.descendants((l,c)=>{const u=i.mapping.map(c),d=i.mapping.map(c)+l.nodeSize;let h=null;if(l.marks.forEach(f=>{if(f!==a)return!1;h=f}),!h)return;let p=!1;if(Object.keys(r).forEach(f=>{r[f]!==h.attrs[f]&&(p=!0)}),p){const f=t.type.create({...t.attrs,...r});i.removeMark(u,d,t.type),i.addMark(u,d,f)}}),i.docChanged&&e.view.dispatch(i)}var es=class tM extends uN{constructor(){super(...arguments),this.type="node"}static create(e={}){const r=typeof e=="function"?e():e;return new tM(r)}configure(e){return super.configure(e)}extend(e){const r=typeof e=="function"?e():e;return super.extend(r)}};function wc(t){return new $de({find:t.find,handler:({state:e,range:r,match:n,pasteEvent:s})=>{const i=kt(t.getAttributes,void 0,n,s);if(i===!1||i===null)return null;const{tr:a}=e,l=n[n.length-1],c=n[0];let u=r.to;if(l){const d=c.search(/\S/),h=r.from+c.indexOf(l),p=h+l.length;if(cN(r.from,r.to,e.doc).filter(m=>m.mark.type.excluded.find(k=>k===t.type&&k!==m.mark.type)).filter(m=>m.to>h).length)return null;p<r.to&&a.delete(p,r.to),h>r.from&&a.delete(r.from+d,h),u=r.from+d+l.length,a.addMark(r.from+d,u,t.type.create(i||{})),a.removeStoredMark(t.type)}}})}var ahe=function t(e,r){if(e===r)return!0;if(e&&r&&typeof e=="object"&&typeof r=="object"){if(e.constructor!==r.constructor)return!1;var n,s,i;if(Array.isArray(e)){if(n=e.length,n!=r.length)return!1;for(s=n;s--!==0;)if(!t(e[s],r[s]))return!1;return!0}if(e instanceof Map&&r instanceof Map){if(e.size!==r.size)return!1;for(s of e.entries())if(!r.has(s[0]))return!1;for(s of e.entries())if(!t(s[1],r.get(s[0])))return!1;return!0}if(e instanceof Set&&r instanceof Set){if(e.size!==r.size)return!1;for(s of e.entries())if(!r.has(s[0]))return!1;return!0}if(ArrayBuffer.isView(e)&&ArrayBuffer.isView(r)){if(n=e.length,n!=r.length)return!1;for(s=n;s--!==0;)if(e[s]!==r[s])return!1;return!0}if(e.constructor===RegExp)return e.source===r.source&&e.flags===r.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===r.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===r.toString();if(i=Object.keys(e),n=i.length,n!==Object.keys(r).length)return!1;for(s=n;s--!==0;)if(!Object.prototype.hasOwnProperty.call(r,i[s]))return!1;for(s=n;s--!==0;){var a=i[s];if(!(a==="_owner"&&e.$$typeof)&&!t(e[a],r[a]))return!1}return!0}return e!==e&&r!==r};const ohe=qo(ahe);var lhe=(...t)=>e=>{t.forEach(r=>{typeof r=="function"?r(e):r&&(r.current=e)})},che=({contentComponent:t})=>{const e=vy.useSyncExternalStore(t.subscribe,t.getSnapshot,t.getServerSnapshot);return o.jsx(o.Fragment,{children:Object.values(e)})};function uhe(){const t=new Set;let e={};return{subscribe(r){return t.add(r),()=>{t.delete(r)}},getSnapshot(){return e},getServerSnapshot(){return e},setRenderer(r,n){e={...e,[r]:eB.createPortal(n.reactElement,n.element,r)},t.forEach(s=>s())},removeRenderer(r){const n={...e};delete n[r],e=n,t.forEach(s=>s())}}}var dhe=class extends ut.Component{constructor(t){var e;super(t),this.editorContentRef=ut.createRef(),this.initialized=!1,this.state={hasContentComponentInitialized:!!((e=t.editor)!=null&&e.contentComponent)}}componentDidMount(){this.init()}componentDidUpdate(){this.init()}init(){const t=this.props.editor;if(t&&!t.isDestroyed&&t.options.element){if(t.contentComponent)return;const e=this.editorContentRef.current;e.append(t.view.dom),t.setOptions({element:e}),t.contentComponent=uhe(),this.state.hasContentComponentInitialized||(this.unsubscribeToContentComponent=t.contentComponent.subscribe(()=>{this.setState(r=>r.hasContentComponentInitialized?r:{hasContentComponentInitialized:!0}),this.unsubscribeToContentComponent&&this.unsubscribeToContentComponent()})),t.createNodeViews(),this.initialized=!0}}componentWillUnmount(){var t;const e=this.props.editor;if(e){this.initialized=!1,e.isDestroyed||e.view.setProps({nodeViews:{}}),this.unsubscribeToContentComponent&&this.unsubscribeToContentComponent(),e.contentComponent=null;try{if(!((t=e.view.dom)!=null&&t.firstChild))return;const r=document.createElement("div");r.append(e.view.dom),e.setOptions({element:r})}catch{}}}render(){const{editor:t,innerRef:e,...r}=this.props;return o.jsxs(o.Fragment,{children:[o.jsx("div",{ref:lhe(e,this.editorContentRef),...r}),(t==null?void 0:t.contentComponent)&&o.jsx(che,{contentComponent:t.contentComponent})]})}},hhe=M.forwardRef((t,e)=>{const r=ut.useMemo(()=>Math.floor(Math.random()*4294967295).toString(),[t.editor]);return ut.createElement(dhe,{key:r,innerRef:e,...t})}),rM=ut.memo(hhe),phe=typeof window<"u"?M.useLayoutEffect:M.useEffect,fhe=class{constructor(t){this.transactionNumber=0,this.lastTransactionNumber=0,this.subscribers=new Set,this.editor=t,this.lastSnapshot={editor:t,transactionNumber:0}
882,this.getSnapshot=this.getSnapshot.bind(this),this.getServerSnapshot=this.getServerSnapshot.bind(this),this.watch=this.watch.bind(this),this.subscribe=this.subscribe.bind(this)}getSnapshot(){return this.transactionNumber===this.lastTransactionNumber?this.lastSnapshot:(this.lastTransactionNumber=this.transactionNumber,this.lastSnapshot={editor:this.editor,transactionNumber:this.transactionNumber},this.lastSnapshot)}getServerSnapshot(){return{editor:null,transactionNumber:0}}subscribe(t){return this.subscribers.add(t),()=>{this.subscribers.delete(t)}}watch(t){if(this.editor=t,this.editor){const e=()=>{this.transactionNumber+=1,this.subscribers.forEach(n=>n())},r=this.editor;return r.on("transaction",e),()=>{r.off("transaction",e)}}}};function mhe(t){var e;const[r]=M.useState(()=>new fhe(t.editor)),n=II.useSyncExternalStoreWithSelector(r.subscribe,r.getSnapshot,r.getServerSnapshot,t.selector,(e=t.equalityFn)!=null?e:ohe);return phe(()=>r.watch(t.editor),[t.editor,r]),M.useDebugValue(n),n}var ghe=!1,a2=typeof window>"u",yhe=a2||!!(typeof window<"u"&&window.next),xhe=class nM{constructor(e){this.editor=null,this.subscriptions=new Set,this.isComponentMounted=!1,this.previousDeps=null,this.instanceId="",this.options=e,this.subscriptions=new Set,this.setEditor(this.getInitialEditor()),this.scheduleDestroy(),this.getEditor=this.getEditor.bind(this),this.getServerSnapshot=this.getServerSnapshot.bind(this),this.subscribe=this.subscribe.bind(this),this.refreshEditorInstance=this.refreshEditorInstance.bind(this),this.scheduleDestroy=this.scheduleDestroy.bind(this),this.onRender=this.onRender.bind(this),this.createEditor=this.createEditor.bind(this)}setEditor(e){this.editor=e,this.instanceId=Math.random().toString(36).slice(2,9),this.subscriptions.forEach(r=>r())}getInitialEditor(){return this.options.current.immediatelyRender===void 0?a2||yhe?null:this.createEditor():(this.options.current.immediatelyRender,this.options.current.immediatelyRender?this.createEditor():null)}createEditor(){const e={...this.options.current,onBeforeCreate:(...n)=>{var s,i;return(i=(s=this.options.current).onBeforeCreate)==null?void 0:i.call(s,...n)},onBlur:(...n)=>{var s,i;return(i=(s=this.options.current).onBlur)==null?void 0:i.call(s,...n)},onCreate:(...n)=>{var s,i;return(i=(s=this.options.current).onCreate)==null?void 0:i.call(s,...n)},onDestroy:(...n)=>{var s,i;return(i=(s=this.options.current).onDestroy)==null?void 0:i.call(s,...n)},onFocus:(...n)=>{var s,i;return(i=(s=this.options.current).onFocus)==null?void 0:i.call(s,...n)},onSelectionUpdate:(...n)=>{var s,i;return(i=(s=this.options.current).onSelectionUpdate)==null?void 0:i.call(s,...n)},onTransaction:(...n)=>{var s,i;return(i=(s=this.options.current).onTransaction)==null?void 0:i.call(s,...n)},onUpdate:(...n)=>{var s,i;return(i=(s=this.options.current).onUpdate)==null?void 0:i.call(s,...n)},onContentError:(...n)=>{var s,i;return(i=(s=this.options.current).onContentError)==null?void 0:i.call(s,...n)},onDrop:(...n)=>{var s,i;return(i=(s=this.options.current).onDrop)==null?void 0:i.call(s,...n)},onPaste:(...n)=>{var s,i;return(i=(s=this.options.current).onPaste)==null?void 0:i.call(s,...n)},onDelete:(...n)=>{var s,i;return(i=(s=this.options.current).onDelete)==null?void 0:i.call(s,...n)}};return new Yde(e)}getEditor(){return this.editor}getServerSnapshot(){return null}subscribe(e){return this.subscriptions.add(e),()=>{this.subscriptions.delete(e)}}static compareOptions(e,r){return Object.keys(e).every(n=>["onCreate","onBeforeCreate","onDestroy","onUpdate","onTransaction","onFocus","onBlur","onSelectionUpdate","onContentError","onDrop","onPaste"].includes(n)?!0:n==="extensions"&&e.extensions&&r.extensions?e.extensions.length!==r.extensions.length?!1:e.extensions.every((s,i)=>{var a;return s===((a=r.extensions)==null?void 0:a[i])}):e[n]===r[n])}onRender(e){return()=>(this.isComponentMounted=!0,clearTimeout(this.scheduledDestructionTimeout),this.editor&&!this.editor.isDestroyed&&e.length===0?nM.compareOptions(this.options.current,this.editor.options)||this.editor.setOptions({...this.options.current,editable:this.editor.isEditable}
882):this.refreshEditorInstance(e),()=>{this.isComponentMounted=!1,this.scheduleDestroy()})}refreshEditorInstance(e){if(this.editor&&!this.editor.isDestroyed){if(this.previousDeps===null){this.previousDeps=e;return}if(this.previousDeps.length===e.length&&this.previousDeps.every((n,s)=>n===e[s]))return}this.editor&&!this.editor.isDestroyed&&this.editor.destroy(),this.setEditor(this.createEditor()),this.previousDeps=e}scheduleDestroy(){const e=this.instanceId,r=this.editor;this.scheduledDestructionTimeout=setTimeout(()=>{if(this.isComponentMounted&&this.instanceId===e){r&&r.setOptions(this.options.current);return}r&&!r.isDestroyed&&(r.destroy(),this.instanceId===e&&this.setEditor(null))},1)}};function sM(t={},e=[]){const r=M.useRef(t);r.current=t;const[n]=M.useState(()=>new xhe(r)),s=vy.useSyncExternalStore(n.subscribe,n.getEditor,n.getServerSnapshot);return M.useDebugValue(s),M.useEffect(n.onRender(e)),mhe({editor:s,selector:({transactionNumber:i})=>t.shouldRerenderOnTransaction===!1||t.shouldRerenderOnTransaction===void 0?null:t.immediatelyRender&&i===0?0:i+1}),s}var whe=M.createContext({editor:null});whe.Consumer;var bhe=M.createContext({onDragStart:()=>{},nodeViewContentChildren:void 0,nodeViewContentRef:()=>{}}),khe=()=>M.useContext(bhe);ut.forwardRef((t,e)=>{const{onDragStart:r}=khe(),n=t.as||"div";return o.jsx(n,{...t,ref:e,"data-node-view-wrapper":"",onDragStart:r,style:{whiteSpace:"normal",...t.style}})});ut.createContext({markViewContentRef:()=>{}});var yg=(t,e)=>{if(t==="slot")return 0;if(t instanceof Function)return t(e);const{children:r,...n}=e??{};if(t==="svg")throw new Error("SVG elements are not supported in the JSX syntax, use the array syntax instead");return[t,n,r]},vhe=/^\s*>\s$/,jhe=es.create({name:"blockquote",addOptions(){return{HTMLAttributes:{}}},content:"block+",group:"block",defining:!0,parseHTML(){return[{tag:"blockquote"}]},renderHTML({HTMLAttributes:t}){return yg("blockquote",{...yr(this.options.HTMLAttributes,t),children:yg("slot",{})})},parseMarkdown:(t,e)=>e.createNode("blockquote",void 0,e.parseChildren(t.tokens||[])),renderMarkdown:(t,e)=>{if(!t.content)return"";const r=[];return t.content.forEach(s=>{const a=e.renderChildren(s).split(`
883`).map(l=>`> ${l}`).join(`
884`);r.push(a)}),r.flatMap(s=>[s,"> "]).slice(0,-1).join(`
885`)},addCommands(){return{setBlockquote:()=>({commands:t})=>t.wrapIn(this.name),toggleBlockquote:()=>({commands:t})=>t.toggleWrap(this.name),unsetBlockquote:()=>({commands:t})=>t.lift(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-b":()=>this.editor.commands.toggleBlockquote()}},addInputRules(){return[ld({find:vhe,type:this.type})]}}),She=/(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))$/,Nhe=/(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))/g,Che=/(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))$/,Ehe=/(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))/g,The=Cc.create({name:"bold",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"strong"},{tag:"b",getAttrs:t=>t.style.fontWeight!=="normal"&&null},{style:"font-weight=400",clearMark:t=>t.type.name===this.name},{style:"font-weight",getAttrs:t=>/^(bold(er)?|[5-9]\d{2,})$/.test(t)&&null}]},renderHTML({HTMLAttributes:t}){return yg("strong",{...yr(this.options.HTMLAttributes,t),children:yg("slot",{})})},markdownTokenName:"strong",parseMarkdown:(t,e)=>e.applyMark("bold",e.parseInline(t.tokens||[])),renderMarkdown:(t,e)=>`**${e.renderChildren(t)}**`,addCommands(){return{setBold:()=>({commands:t})=>t.setMark(this.name),toggleBold:()=>({commands:t})=>t.toggleMark(this.name),unsetBold:()=>({commands:t})=>t.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-b":()=>this.editor.commands.toggleBold(),"Mod-B":()=>this.editor.commands.toggleBold()}},addInputRules(){return[od({find:She,type:this.type}),od({find:Che,type:this.type})]},addPasteRules(){return[wc({find:Nhe,type:this.type}),wc({find:Ehe,type:this.type})]}}),Ahe=/(^|[^`])`([^`]+)`(?!`)$/,zhe=/(^|[^`])`([^`]+)`(?!`)/g,Phe=Cc.create({name:"code",addOptions(){return{HTMLAttributes:{}}},excludes:"_",code:!0,exitable:!0,parseHTML(){return[{tag:"code"}]},renderHTML({HTMLAttributes:t}){return["code",yr(this.options.HTMLAttributes,t),0]},markdownTokenName:"codespan",parseMarkdown:(t,e)=>
vendor: 7,325 bytes, lines 885-906
885e.applyMark("code",[{type:"text",text:t.text||""}]),renderMarkdown:(t,e)=>t.content?`\`${e.renderChildren(t.content)}\``:"",addCommands(){return{setCode:()=>({commands:t})=>t.setMark(this.name),toggleCode:()=>({commands:t})=>t.toggleMark(this.name),unsetCode:()=>({commands:t})=>t.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-e":()=>this.editor.commands.toggleCode()}},addInputRules(){return[od({find:Ahe,type:this.type})]},addPasteRules(){return[wc({find:zhe,type:this.type})]}}),Ww=4,_he=/^```([a-z]+)?[\s\n]$/,Ihe=/^~~~([a-z]+)?[\s\n]$/,Ohe=es.create({name:"codeBlock",addOptions(){return{languageClassPrefix:"language-",exitOnTripleEnter:!0,exitOnArrowDown:!0,defaultLanguage:null,enableTabIndentation:!1,tabSize:Ww,HTMLAttributes:{}}},content:"text*",marks:"",group:"block",code:!0,defining:!0,addAttributes(){return{language:{default:this.options.defaultLanguage,parseHTML:t=>{var e;const{languageClassPrefix:r}=this.options;if(!r)return null;const i=[...((e=t.firstElementChild)==null?void 0:e.classList)||[]].filter(a=>a.startsWith(r)).map(a=>a.replace(r,""))[0];return i||null},rendered:!1}}},parseHTML(){return[{tag:"pre",preserveWhitespace:"full"}]},renderHTML({node:t,HTMLAttributes:e}){return["pre",yr(this.options.HTMLAttributes,e),["code",{class:t.attrs.language?this.options.languageClassPrefix+t.attrs.language:null},0]]},markdownTokenName:"code",parseMarkdown:(t,e)=>{var r;return((r=t.raw)==null?void 0:r.startsWith("```"))===!1&&t.codeBlockStyle!=="indented"?[]:e.createNode("codeBlock",{language:t.lang||null},t.text?[e.createTextNode(t.text)]:[])},renderMarkdown:(t,e)=>{var r;let n="";const s=((r=t.attrs)==null?void 0:r.language)||"";return t.content?n=[`\`\`\`${s}`,e.renderChildren(t.content),"```"].join(`
886`):n=`\`\`\`${s}
887
888\`\`\``,n},addCommands(){return{setCodeBlock:t=>({commands:e})=>e.setNode(this.name,t),toggleCodeBlock:t=>({commands:e})=>e.toggleNode(this.name,"paragraph",t)}},addKeyboardShortcuts(){return{"Mod-Alt-c":()=>this.editor.commands.toggleCodeBlock(),Backspace:()=>{const{empty:t,$anchor:e}=this.editor.state.selection,r=e.pos===1;return!t||e.parent.type.name!==this.name?!1:r||!e.parent.textContent.length?this.editor.commands.clearNodes():!1},Tab:({editor:t})=>{var e;if(!this.options.enableTabIndentation)return!1;const r=(e=this.options.tabSize)!=null?e:Ww,{state:n}=t,{selection:s}=n,{$from:i,empty:a}=s;if(i.parent.type!==this.type)return!1;const l=" ".repeat(r);return a?t.commands.insertContent(l):t.commands.command(({tr:c})=>{const{from:u,to:d}=s,f=n.doc.textBetween(u,d,`
889`,`
890`).split(`
891`).map(m=>l+m).join(`
892`);return c.replaceWith(u,d,n.schema.text(f)),!0})},"Shift-Tab":({editor:t})=>{var e;if(!this.options.enableTabIndentation)return!1;const r=(e=this.options.tabSize)!=null?e:Ww,{state:n}=t,{selection:s}=n,{$from:i,empty:a}=s;return i.parent.type!==this.type?!1:a?t.commands.command(({tr:l})=>{var c;const{pos:u}=i,d=i.start(),h=i.end(),f=n.doc.textBetween(d,h,`
893`,`
894`).split(`
895`);let m=0,y=0;const k=u-d;for(let A=0;A<f.length;A+=1){if(y+f[A].length>=k){m=A;break}y+=f[A].length+1}const x=((c=f[m].match(/^ */))==null?void 0:c[0])||"",w=Math.min(x.length,r);if(w===0)return!0;let b=d;for(let A=0;A<m;A+=1)b+=f[A].length+1;return l.delete(b,b+w),u-b<=w&&l.setSelection(Ze.create(l.doc,b)),!0}):t.commands.command(({tr:l})=>{const{from:c,to:u}=s,p=n.doc.textBetween(c,u,`
896`,`
897`).split(`
898`).map(f=>{var m;const y=((m=f.match(/^ */))==null?void 0:m[0])||"",k=Math.min(y.length,r);return f.slice(k)}).join(`
899`);return l.replaceWith(c,u,n.schema.text(p)),!0})},Enter:({editor:t})=>{if(!this.options.exitOnTripleEnter)return!1;const{state:e}=t,{selection:r}=e,{$from:n,empty:s}=r;if(!s||n.parent.type!==this.type)return!1;const i=n.parentOffset===n.parent.nodeSize-2,a=n.parent.textContent.endsWith(`
900
901`);return!i||!a?!1:t.chain().command(({tr:l})=>(l.delete(n.pos-2,n.pos),!0)).exitCode().run()},ArrowDown:({editor:t})=>{if(!this.options.exitOnArrowDown)return!1;const{state:e}=t,{selection:r,doc:n}=e,{$from:s,empty:i}=r;if(!i||s.parent.type!==this.type||!(s.parentOffset===s.parent.nodeSize-2))return!1;const l=s.after();return l===void 0?!1:n.nodeAt(l)?t.commands.command(({tr:u})=>(u.setSelection(rt.near(n.resolve(l))),!0)):t.commands.exitCode()}}},addInputRules(){return[s2({find:_he,type:this.type,getAttributes:t=>({language:t[1]})}),s2({find:Ihe,type:this.type,getAttributes:t=>({language:t[1]})})]},addProseMirrorPlugins(){return[new er({key:new Lr("codeBlockVSCodeHandler"),props:{handlePaste:(t,e)=>{if(!e.clipboardData||this.editor.isActive(this.type.name))return!1;const r=e.clipboardData.getData("text/plain"),n=e.clipboardData.getData("vscode-editor-data"),s=n?JSON.parse(n):void 0,i=s==null?void 0:s.mode;if(!r||!i)return!1;const{tr:a,schema:l}=t.state,c=l.text(r.replace(/\r\n?/g,`
902`));return a.replaceSelectionWith(this.type.create({language:i},c)),a.selection.$from.parent.type!==this.type&&a.setSelection(Ze.near(a.doc.resolve(Math.max(0,a.selection.from-2)))),a.setMeta("paste",!0),t.dispatch(a),!0}}})]}}),Rhe=es.create({name:"doc",topNode:!0,content:"block+",renderMarkdown:(t,e)=>t.content?e.renderChildren(t.content,`
903
904`):""}),Lhe=es.create({name:"hardBreak",markdownTokenName:"br",addOptions(){return{keepMarks:!0,HTMLAttributes:{}}},inline:!0,group:"inline",selectable:!1,linebreakReplacement:!0,parseHTML(){return[{tag:"br"}]},renderHTML({HTMLAttributes:t}){return["br",yr(this.options.HTMLAttributes,t)]},renderText(){return`
905`},renderMarkdown:(t,e)=>e.indent(`
906`),parseMarkdown:()=>({type:"hardBreak"}),addCommands(){return{setHardBreak:()=>({commands:t,chain:e,state:r,editor:n})=>t.first([()=>t.exitCode(),()=>t.command(()=>{const{selection:s,storedMarks:i}=r;if(s.$from.parent.type.spec.isolating)return!1;const{keepMarks:a}=this.options,{splittableMarks:l}=n.extensionManager,c=i||s.$to.parentOffset&&s.$from.marks();return e().insertContent({type:this.name}).command(({tr:u,dispatch:d})=>{if(d&&c&&a){const h=c.filter(p=>l.includes(p.type.name));u.ensureMarks(h)}return!0}).run()})])}},addKeyboardShortcuts(){return{"Mod-Enter":()=>this.editor.commands.setHardBreak(),"Shift-Enter":()=>this.editor.commands.setHardBreak()}}}),Mhe=es.create({name:"heading",addOptions(){return{levels:[1,2,3,4,5,6],HTMLAttributes:{}}},content:"inline*",group:"block",defining:!0,addAttributes(){return{level:{default:1,rendered:!1}}},parseHTML(){return this.options.levels.map(t=>({tag:`h${t}`,attrs:{level:t}}))},renderHTML({node:t,HTMLAttributes:e}){return[`h${this.options.levels.includes(t.attrs.level)?t.attrs.level:this.options.levels[0]}`,yr(this.options.HTMLAttributes,e),0]},parseMarkdown:(t,e)=>e.createNode("heading",{level:t.depth||1},e.parseInline(t.tokens||[])),renderMarkdown:(t,e)=>{var r;const n=(r=t.attrs)!=null&&r.level?parseInt(t.attrs.level,10):1,s="#".repeat(n);return t.content?`${s} ${e.renderChildren(t.content)}`:""},addCommands(){return{setHeading:t=>({commands:e})=>this.options.levels.includes(t.level)?e.setNode(this.name,t):!1,toggleHeading:t=>({commands:e})=>this.options.levels.includes(t.level)?e.toggleNode(this.name,"paragraph",t):!1}},addKeyboardShortcuts(){return this.options.levels.reduce((t,e)=>({...t,[`Mod-Alt-${e}`]:()=>this.editor.commands.toggleHeading({level:e})}),{})},addInputRules(){return this.options.levels.map(t=>s2({find:new RegExp(`^(#{${Math.min(...this.options.levels)},${t}}
906)\\s$`),type:this.type,getAttributes:{level:t}}))}}),Dhe=es.create({name:"horizontalRule",addOptions(){return{HTMLAttributes:{},nextNodeType:"paragraph"}},group:"block",parseHTML(){return[{tag:"hr"}]},renderHTML({HTMLAttributes:t}){return["hr",yr(this.options.HTMLAttributes,t)]},markdownTokenName:"hr",parseMarkdown:(t,e)=>e.createNode("horizontalRule"),renderMarkdown:()=>"---",addCommands(){return{setHorizontalRule:()=>({chain:t,state:e})=>{if(!Xde(e,e.schema.nodes[this.name]))return!1;const{selection:r}=e,{$to:n}=r,s=t();return $L(r)?s.insertContentAt(n.pos,{type:this.name}):s.insertContent({type:this.name}),s.command(({state:i,tr:a,dispatch:l})=>{if(l){const{$to:c}=a.selection,u=c.end();if(c.nodeAfter)c.nodeAfter.isTextblock?a.setSelection(Ze.create(a.doc,c.pos+1)):c.nodeAfter.isBlock?a.setSelection(Ve.create(a.doc,c.pos)):a.setSelection(Ze.create(a.doc,c.pos));else{const d=i.schema.nodes[this.options.nextNodeType]||c.parent.type.contentMatch.defaultType,h=d==null?void 0:d.create();h&&(a.insert(u,h),a.setSelection(Ze.create(a.doc,u+1)))}a.scrollIntoView()}return!0}).run()}}},addInputRules(){return[Jde({find:/^(?:---|—-|___\s|\*\*\*\s)$/,type:this.t
vendor: 4,463 bytes, line 906
906ype})]}}),Fhe=/(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))$/,Bhe=/(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))/g,$he=/(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))$/,Uhe=/(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))/g,Whe=Cc.create({name:"italic",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"em"},{tag:"i",getAttrs:t=>t.style.fontStyle!=="normal"&&null},{style:"font-style=normal",clearMark:t=>t.type.name===this.name},{style:"font-style=italic"}]},renderHTML({HTMLAttributes:t}){return["em",yr(this.options.HTMLAttributes,t),0]},addCommands(){return{setItalic:()=>({commands:t})=>t.setMark(this.name),toggleItalic:()=>({commands:t})=>t.toggleMark(this.name),unsetItalic:()=>({commands:t})=>t.unsetMark(this.name)}},markdownTokenName:"em",parseMarkdown:(t,e)=>e.applyMark("italic",e.parseInline(t.tokens||[])),renderMarkdown:(t,e)=>`*${e.renderChildren(t)}*`,addKeyboardShortcuts(){return{"Mod-i":()=>this.editor.commands.toggleItalic(),"Mod-I":()=>this.editor.commands.toggleItalic()}},addInputRules(){return[od({find:Fhe,type:this.type}),od({find:$he,type:this.type})]},addPasteRules(){return[wc({find:Bhe,type:this.type}),wc({find:Uhe,type:this.type})]}});const Vhe="aaa1rp3bb0ott3vie4c1le2ogado5udhabi7c0ademy5centure6ountant0s9o1tor4d0s1ult4e0g1ro2tna4f0l1rica5g0akhan5ency5i0g1rbus3force5tel5kdn3l0ibaba4pay4lfinanz6state5y2sace3tom5m0azon4ericanexpress7family11x2fam3ica3sterdam8nalytics7droid5quan4z2o0l2partments8p0le4q0uarelle8r0ab1mco4chi3my2pa2t0e3s0da2ia2sociates9t0hleta5torney7u0ction5di0ble3o3spost5thor3o0s4w0s2x0a2z0ure5ba0by2idu3namex4d1k2r0celona5laycard4s5efoot5gains6seball5ketball8uhaus5yern5b0c1t1va3cg1n2d1e0ats2uty4er2rlin4st0buy5t2f1g1h0arti5i0ble3d1ke2ng0o3o1z2j1lack0friday9ockbuster8g1omberg7ue3m0s1w2n0pparibas9o0ats3ehringer8fa2m1nd2o0k0ing5sch2tik2on4t1utique6x2r0adesco6idgestone9oadway5ker3ther5ussels7s1t1uild0ers6siness6y1zz3v1w1y1z0h3ca0b1fe2l0l1vinklein9m0era3p2non3petown5ital0one8r0avan4ds2e0er0s4s2sa1e1h1ino4t0ering5holic7ba1n1re3c1d1enter4o1rn3f0a1d2g1h0anel2nel4rity4se2t2eap3intai5ristmas6ome4urch5i0priani6rcle4sco3tadel4i0c2y3k1l0aims4eaning6ick2nic1que6othing5ud3ub0med6m1n1o0ach3des3ffee4llege4ogne5m0mbank4unity6pany2re3uter5sec4ndos3struction8ulting7tact3ractors9oking4l1p2rsica5untry4pon0s4rses6pa2r0edit0card4union9icket5own3s1uise0s6u0isinella9v1w1x1y0mru3ou3z2dad1nce3ta1e1ing3sun4y2clk3ds2e0al0er2s3gree4livery5l1oitte5ta3mocrat6ntal2ist5si0gn4v2hl2iamonds6et2gital5rect0ory7scount3ver5h2y2j1k1m1np2o0cs1tor4g1mains5t1wnload7rive4tv2ubai3nlop4pont4rban5vag2r2z2earth3t2c0o2deka3u0cation8e1g1mail3erck5nergy4gineer0ing9terprises10pson4quipment8r0icsson6ni3s0q1tate5t1u0rovision8s2vents5xchange6pert3osed4ress5traspace10fage2il1rwinds6th3mily4n0s2rm0ers5shion4t3edex3edback6rrari3ero6i0delity5o2lm2nal1nce1ial7re0stone6mdale6sh0ing5t0ness6j1k1lickr3ghts4r2orist4wers5y2m1o0o0d1tball6rd1ex2sale4um3undation8x2r0ee1senius7l1ogans4ntier7tr2ujitsu5n0d2rniture7tbol5yi3ga0l0lery3o1up4me0s3p1rden4y2b0iz3d0n2e0a1nt0ing5orge5f1g0ee3h1i0ft0s3ves2ing5l0ass3e1obal2o4m0ail3bh2o1x2n1odaddy5ld0point6f2o0dyear5g0le4p1t1v2p1q1r0ainger5phics5tis4een3ipe3ocery4up4s1t1u0cci3ge2ide2tars5ru3w1y2hair2mburg5ngout5us3bo2dfc0bank7ealth0care8lp1sinki6re1mes5iphop4samitsu7tachi5v2k0t2m1n1ockey4ldings5iday5medepot5goods5s0ense7nda3rse3spital5t0ing5t0els3mail5use3w2r1sbc3t1u0ghes5yatt3undai7ibm2cbc2e1u2d1e0ee3fm2kano4l1m0amat4db2mo0bilien9n0c1dustries8finiti5o2g1k1stitute6urance4e4t0ernational10uit4vestments10o1piranga7q1r0ish4s0maili5t0anbul7t0au2v3jaguar4va3cb2e0ep2tzt3welry6io2ll2m0p2nj2o0bs1urg4t1y2p0morgan6rs3uegos4niper7kaufen5ddi3e0rryhotels6properties14fh2g1h1i0a1ds2m1ndle4tchen5wi3m1n1oeln3matsu5sher5p0mg2n2r0d1ed3uokgroup8w1y0oto4z2la0caixa5mborghini8er3nd0rover6xess5salle5t0ino3robe5w0yer5b1c1ds2ease3clerc5frak4gal2o2xus4gbt3i0dl2fe0insurance9style7ghting6ke2lly3mited4o2ncoln4k2ve1ing5k1lc1p2oan0s3cker3us3l1ndon4tte1o3ve3pl0financial11r1s1t0d0a3u0ndbeck6xe1ury5v1y2ma0drid4if1son4keup4n0agement7go3p1rket0ing3s4riott5shalls7ttel5ba2c0kinsey7d1e0d0ia3et2lbourne7me1orial6n0u2rckmsd7g1h1iami3crosoft7l1ni1t2t0subishi9k1l0b1s2m0a2n1o0bi0le4da2e1i1m1nash3ey2ster5rmon3tgage6scow4to0rcycles9v0ie4p1q1r1s0d2t0n1r2u0seum3ic4v1w1x1y1z2na0b1goya4me2vy3ba2c1e0c1t0bank4flix4work5ustar5w0s2xt0direct7us4f0l2g0o2hk2i0co2ke1on3nja3ssan1y5l1o0kia3rton4w0ruz3tv4p1r0a1w2tt2u1yc2z2obi1server7ffice5kinawa6layan0group9lo3m0ega4ne1g1l0ine5oo2pen3racle3nge4g0anic5igins6saka4tsuka4t2vh3pa0ge2nasonic7ris2s1tners4s1y3y2
906ccw3e0t2f0izer5g1h0armacy6d1ilips5one2to0graphy6s4ysio5ics1tet2ures6d1n0g1k2oneer5zza4k1l0ace2y0station9umbing5s3m1n0c2ohl2ker3litie5rn2st3r0axi3ess3ime3o0d0uctions8f1gressive8mo2perties3y5tection8u0dential9s1t1ub2w0c2y2qa1pon3uebec3st5racing4dio4e0ad1lestate6tor2y4cipes5d0stone5umbrella9hab3ise0n3t2liance6n0t0als5pair3ort3ublican8st0aurant8view0s5xroth6ich0ardli6oh3l1o1p2o0cks3deo3gers4om3s0vp3u0gby3hr2n2w0e2yukyu6sa0arland6fe0ty4kura4le1on3msclub4ung5ndvik0coromant12ofi4p1rl2s1ve2xo3b0i1s2c0b1haeffler7midt4olarships8ol3ule3warz5ience5ot3d1e0arch3t2cure1ity6ek2lect4ner3rvices6ven3w1x0y3fr2g1h0angrila6rp3ell3ia1ksha5oes2p0ping5uji3w3i0lk2na1gles5te3j1k0i0n2y0pe4l0ing4m0art3ile4n0cf3o0ccer3ial4ftbank4ware6hu2lar2utions7ng1y2y2pa0ce3ort2t3r0l2s1t0ada2ples4r1tebank4farm7c0group6ockholm6rage3e3ream4udio2y3yle4u0cks3pplies3y2ort5rf1gery5zuki5v1watch4iss4x1y0dney4stems6z2tab1ipei4lk2obao4rget4tamotors6r2too4x0i3c0i2d0k2eam2ch0nology8l1masek5nnis4va3f1g1h0d1eater2re6iaa2ckets5enda4ps2res2ol4j0maxx4x2k0maxx5l1m0all4n1o0day3kyo3ols3p1ray3shiba5tal3urs3wn2yota3s3r0ade1ing4ining5vel0ers0insurance16ust3v2t1ube2i1nes3shu4v0s2w1z2ua1bank3s2g1k1nicom3versity8o2ol2ps2s1y1z2va0cations7na1guard7c1e0gas3ntures6risign5mögensberater2ung14sicherung10t2g1i0ajes4deo3g1king4llas4n1p1rgin4sa1ion4va1o3laanderen9n1odka3lvo3te1ing3o2yage5u2wales2mart4ter4ng0gou5tch0es6eather0channel12bcam3er2site5d0ding5ibo2r3f1hoswho6ien2ki2lliamhill9n0dows4e1ners6me2olterskluwer11odside6rk0s2ld3w2s1tc1f3xbox3erox4ihuan4n2xx2yz3yachts4hoo3maxun5ndex5e1odobashi7ga2kohama6u0tube6t1un3za0ppos4ra3ero3ip2m1one3uerich6w2",Hhe="ελ1υ2бг1ел3дети4ею2католик6ом3мÐ
906ºÐ´2он1сква6онлайн5рг3рус2ф2сайт3рб3укр3қаз3Õ°Õ¡Õµ3ישראל5קום3ابوظبي5رامكو5لاردن4بحرين5جزائر5سعودية6عليان5مغرب5مارات5یران5بارت2زار4يتك3ھارت5تونس4سودان3رية5شبكة4عراق2ب2مان4فلسطين6قطر3كاثوليك6وم3مصر2ليسيا5وريتانيا7قع4همراه5پاکستان7ڀارت4कॉम3नेट3भारत0म्3ोत5संगठन5বাংলা5ভারত2ৰত4ਭਾਰਤ4ભારત4ଭାରତ4இந்தியா6லங்கை6சிங்கப்பூர்11భారత్5ಭಾರತ4ഭാരതം5ලංකා4คอม3ไทย3ລາວ3გე2みんな3アマゾン4クラウド4グーグル4コム2ストア3セール3ファッション6ポイント4世界2中信1国1國1文网3亚马逊3企业2佛山2信息2健康2八卦2公司1益2台湾1灣2商城1店1标2嘉里0大酒店5在线2大拿2天主教3娱乐2家電2广东2微博2慈善2我爱你3手机2招聘2政务1府2新加坡2闻2时尚2書籍2机构2淡马锡3游戏2澳門2点看2移动2组织机构4网址1店1站1络2联通2谷歌2购物2通販2集团2電訊盈科4飞利浦3食品2餐厅2香格里拉3港2닷넷1ì»´2삼성2한국2",o2="numeric",l2="ascii",c2="alpha",Kh="asciinumeric",Nh="alphanumeric",u2="domain",iM="emoji",qhe="scheme",Khe="slashscheme",Vw="whitespace";function Ghe(t,e){return t in e||(e[t]=[]),e[t]}function Il(t,e,r){e[o2]&&(e[Kh]=!0,e[Nh]=!0),e[l2]&&(e[Kh]=!0,e[c2]=!0),e[Kh]&&(e[Nh]=!0),e[c2]&&(e[Nh]=!0),e[Nh]&&(e[u2]=!0),e[iM]&&(e[u2]=!0);for(const n in e){const s=Ghe(n,r);s.indexOf(t)<0&&s.push(t)}}function Zhe(t,e){const r={};for(const n in e)e[n].indexOf(t)>=0&&(r[n]=!0);return r}function An(t=null){this.j={},this.jr=[],this.jd=null,this.t=t}An.groups={};An.prototype={accepts(){return!!this.t},go(t){const e=this,r=e.j[t];if(r)return r;for(let n=0;n<e.jr.length;n++){const s=e.jr[n][0],i=e.jr[n][1];if(i&&s.test(t))return i}return e.jd},has(t,e=!1){return e?t in this.j:!!this.go(t)},ta(t,e,r,n){for(let s=0;s<t.length;s++)this.tt(t[s],e,r,n)},tr(t,e,r,n){n=n||An.groups;let s;return e&&e.j?s=e:(s=new An(e),r&&n&&Il(e,r,n)),this.jr.push([t,s]),s},ts(t,e,r,n){let s=this;const i=t.length;if(!i)return s;for(let a=0;a<i-1;a++)s=s.tt(t[a]);return s.tt(t[i-1],e,r,n)},tt(t,e,r,n){n=n||An.groups;const s=this;if(e&&e.j)return s.j[t]=e,e;const i=e;let a,l=s.go(t);if(l?(a=new An,Object.assign(a.j,l.j),a.jr.push.apply(a.jr,l.jr),a.jd=l.jd,a.t=l.t):a=new An,i){if(n)if(a.t&&typeof a.t=="string"){const c=Object.assign(Zhe(a.t,n),r);Il(i,c,n)}else r&&Il(i,r,n);a.t=i}return s.j[t]=a,a}};const tt=(t,e,r,n,s)=>t.ta(e,r,n,s),Vt=(t,e,r,n,s)=>t.tr(e,r,n,s),$5=(t,e,r,n,s)=>t.ts(e,r,n,s),Ce=(t,e,r,n,s)=>t.tt(e,r,n,s),Wi="WORD",d2="UWORD",aM="ASCIINUMERICAL",oM="ALPHANUMERICAL",Wp="LOCALHOST",h2="TLD",p2="UTLD",l0="SCHEME",Hc="SLASH_SCHEME",fN="NUM",f2="WS",mN="NL",Gh="OPENBRACE",Zh="CLOSEBRACE",xg="OPENBRACKET",wg="CLOSEBRACKET",bg="OPENPAREN",kg="CLOSEPAREN",vg="OPENANGLEBRACKET",jg="CLOSEANGLEBRACKET",Sg="FULLWIDTHLEFTPAREN",Ng="FULLWIDTHRIGHTPAREN",Cg="LEFTCORNERBRACKET",Eg="RIGHTCORNERBRACKET",Tg="LEFTWHITECORNERBRACKET",Ag="RIGHTWHITECORNERBRACKET",zg="FULLWIDTHLESSTHAN",Pg="FULLWIDTHGREATERTHAN",_g="AMPERSAND",Ig="APOSTROPHE",Og="ASTERISK",$a="AT",Rg="BACKSLASH",Lg="BACKTICK",Mg="CARET",Ga="COLON",gN="COMMA",Dg="DOLLAR",oi="DOT",Fg="EQUALS",yN="EXCLAMATION",as="HYPHEN",Yh="PERCENT",Bg="PIPE",$g="PLUS",Ug="POUND",Jh="QUERY",xN="QUOTE",lM="FULLWIDTHMIDDLEDOT",wN="SEMI",li="SLASH",Xh="TILDE",Wg="UNDERSCORE",cM="EMOJI",Vg="SYM";var uM=Object.freeze({__proto__:null,ALPHANUMERICAL:oM,AMPERSAND:_g,APOSTROPHE:Ig,ASCIINUMERICAL:aM,ASTERISK:Og,AT:$a,BACKSLASH:Rg,BACKTICK:Lg,CARET:Mg,CLOSEANGLEBRACKET:jg,CLOSEBRACE:Zh,CLOSEBRACKET:wg,CLOSEPAREN:kg,COLON:Ga,COMMA:gN,DOLLAR:Dg,DOT:oi,EMOJI:cM,EQUALS:Fg,EXCLAMATION:yN,FULLWIDTHGREATERTHAN:Pg,FULLWIDTHLEFTPAREN:Sg,FULLWIDTHLESSTHAN:zg,FULLWIDTHMIDDLEDOT:lM,FULLWIDTHRIGHTPAREN:Ng,HYPHEN:as,LEFTCORNERBRACKET:Cg,LEFTWHITECORNERBRACKET:Tg,LOCALHOST:Wp,NL:mN,NUM:fN,OPENANGLEBRACKET:vg,OPENBRACE:Gh,OPENBRACKET:xg,OPENPAREN:bg,PERCENT:Yh,PIPE:Bg,PLUS:$g,POUND:Ug,QUERY:Jh,QUOTE:xN,RIGHTCORNERBRACKET:Eg,RIGHTWHITECORNERBRACKET:Ag,SCHEME:l0,SEMI:wN,SLASH:li,SLASH_SCHEME:Hc,SYM:Vg,TILDE:Xh,TLD:h2,UNDERSCORE:Wg,UTLD:p2,UWORD:d2,WORD:Wi,WS:f2});const Mi=/[a-z]/,ih=new RegExp("\\p{L}","u"),Hw=new RegExp("\\p{Emoji}","u"),Di=/\d/,qw=/\s/,U5="\r",Kw=`
907`,Yhe="️",Jhe="‍",Gw="";let xm=null,wm=null;function Xhe(t=[]){const e={};An.groups=e;const r=new An;xm==null&&(xm=W5(Vhe)),wm==null&&(wm=W5(Hhe)),Ce(r,"'",Ig),Ce(r,"{",Gh),Ce(r,"}",Zh),Ce(r,"[",xg),Ce(r,"]",wg),Ce(r,"(",bg),Ce(r,")",kg),Ce(r,"<",vg),Ce(r,">",jg),Ce(r,"(",Sg),Ce(r,")",Ng),Ce(r,"「",Cg),Ce(r,"」",Eg),Ce(r,"『",Tg),Ce(r,"』",Ag),Ce(r,"<",zg),Ce(r,">",Pg),Ce(r,"&",_g),Ce(r,"*",Og),Ce(r,"@",$a),Ce(r,"`",Lg),Ce(r,"^",Mg),Ce(r,":",Ga),Ce(r,",",gN),Ce(r,"$",Dg),Ce(r,".",oi),Ce(r,"=",Fg),Ce(r,"!",yN),Ce(r,"-",as),Ce(r,"%",Yh),Ce(r,"|",Bg),Ce(r,"+",$g),Ce(r,"#",Ug),Ce(r,"?",Jh),Ce(r,'"',xN),Ce(r,"/",li),Ce(r,";",wN),Ce(r,"~",Xh),Ce(r,"_",Wg),Ce(r,"\\",Rg),Ce(r,"・",lM);const n=Vt(r,Di,fN,{[o2]:!0});Vt(n,Di,n);const s=Vt(n,Mi,aM,{[Kh]:!0}),i=Vt(n,ih,oM,{[Nh]:!0}),a=Vt(r,Mi,Wi,{[l2]:!0});Vt(a,Di,s),Vt(a,Mi,a),Vt(s,Di,s),Vt(s,Mi,s);const l=Vt(r,ih,d2,{[c2]:!0});Vt(l,Mi),Vt(l,Di,i),Vt(l,ih,l),Vt(i,Di,i),Vt(i,Mi),Vt(i,ih,i);const c=Ce(r,Kw,mN,{[Vw]:!0}),u=Ce(r,U5,f2,{[Vw]:!0}),d=Vt(r,qw,f2,{[Vw]:!0});Ce(r,Gw,d),Ce(u,Kw,c),Ce(u,Gw,d),Vt(u,qw,d),Ce(d,U5),Ce(d,Kw),Vt(d,qw,d),Ce(d,Gw,d);const h=Vt(r,Hw,cM,{[iM]:!0});Ce(h,"#"),Vt(h,Hw,h),Ce(h,Yhe,h);const p=Ce(h,Jhe);Ce(p,"#"),Vt(p,Hw,h);const f=[[Mi,a],[Di,s]],m=[[Mi,null],[ih,l],[Di,i]];for(let y=0;y<xm.length;y++)Aa(r,xm[y],h2,Wi,f);for(let y=0;y<wm.length;y++)Aa(r,wm[y],p2,d2,m);Il(h2,{tld:!0,ascii:!0},e),Il(p2,{utld:!0,alpha:!0},e),Aa(r,"file",l0,Wi,f),Aa(r,"mailto",l0,Wi,f),Aa(r,"http",Hc,Wi,f),Aa(r,"https",Hc,Wi,f),Aa(r,"ftp",Hc,Wi,f),Aa(r,"ftps",Hc,Wi,f),Il(l0,{scheme:!0,ascii:!0},e),Il(Hc,{slashscheme:!0,ascii:!0},e),t=t.sort((y,k)=>y[0]>k[0]?1:-1);for(let y=0;y<t.length;y++){const k=t[y][0],x=t[y][1]?{[qhe]:!0}:{[Khe]:!0};k.indexOf("-")>=0?x[u2]=!0:Mi.test(k)?Di.test(k)?x[Kh]=!0:x[l2]=!0:x[o2]=!0,$5(r,k,k,x)}return $5(r,"localhost",Wp,{ascii:!0}),r.jd=new An(Vg),{start:r,tokens:Object.assign({groups:e},uM)}}function dM(t,e){const r=Qhe(e.replace(/[A-Z]/g,l=>l.toLowerCase())),n=r.length,s=[];let i=0,a=0;for(;a<n;){let l=t,c=null,u=0,d=null,h=-1,p=-1;for(;a<n&&(c=l.go(r[a]));)l=c,l.accepts()?(h=0,p=0,d=l):h>=0&&(h+=r[a].length,p++),u+=r[a].length,i+=r[a].length,a++;i-=h,a-=p,u-=h,s.push({t:d.t,v:e.slice(i-u,i),s:i-u,e:i})}return s}function Qhe(t){const e=[],r=t.length;let n=0;for(;n<r;){let s=t.charCodeAt(n),i,a=s<55296||s>56319||n+1===r||(i=t.charCodeAt(n+1))<56320||i>57343?t[n]:t.slice(n,n+2);e.push(a),n+=a.length}return e}function Aa(t,e,r,n,s){let i;const a=e.length;for(let l=0;l<a-1;l++){const c=e[l];t.j[c]?i=t.j[c]:(i=new An(n),i.jr=s.slice(),t.j[c]=i),t=i}return i=new An(r),i.jr=s.slice(),t.j[e[a-1]]=i,i}function W5(t){const e=[],r=[];let n=0,s="0123456789";for(;n<t.length;){let i=0;for(;s.indexOf(t[n+i])>=0;)i++;if(i>0){e.push(r.join(""));for(let a=parseInt(t.substring(n,n+i),10);a>0;a--)r.pop();n+=i}else r.push(t[n]),n++}return e}const Vp={defaultProtocol:"http",events:null,format:V5,formatHref:V5,nl2br:!1,tagName:"a",target:null,rel:null,validate:!0,truncate:1/0,className:null,attributes:null,ignoreTags:[],render:null};function bN(t,e=null){let r=Object.assign({},Vp);t&&(r=Object.assign(r,t instanceof bN?t.o:t));const n=r.ignoreTags,s=[];for(let i=0;i<n.length;i++)s.push(n[i].toUpperCase());this.o=r,e&&(this.defaultRender=e),this.ignoreTags=s}bN.prototype={o:Vp,ignoreTags:[],defaultRender(t){return t},check(t){return this.get("validate",t.toString(),t)},get(t,e,r){const n=e!=null;let s=this.o[t];return s&&(typeof s=="object"?(s=r.t in s?s[r.t]:Vp[t],typeof s=="function"&&n&&(s=s(e,r))):typeof s=="function"&&n&&(s=s(e,r.t,r)),s)},getObj(t,e,r){let n=this.o[t];return typeof n=="function"&&e!=null&&(n=n(e,r.t,r)),n},render(t){const e=t.render(this);return(this.get("render",null,t)||this.defaultRender)(e,t.t,t)}};function V5(t){return t}function hM(t,e){this.t="token",this.v=t,this.tk=e}hM.prototype={isLink:!1,toString(){return this.v},toHref(t){return this.toString()},toFormattedString(t){const e=this.toString(),r=t.get("truncate",e,this),n=t.get("format",e,this);return r&&n.length>r?n.substring(0,r)+"…":n},toFormattedHref(t){return t.get("formatHref",this.toHref(t.get("defaultProtocol")),this)},startIndex(){return this.tk[0].s},endIndex(){return this.tk[this.tk.length-1].e},toObject(t=Vp.defaultProtocol){return{type:this.t,value:this.toString(),isLink:this.isLink,href:this.toHref(t),start:this.startIndex(),end:this.endIndex()}},toFormattedObject(t){return{type:this.t,value:this.toFormattedString(t),isLink:this.isLink,href:this.toFormattedHref(t),start:this.startIndex(),end:this.endIndex()}},validate(t){return t.get("validate",this.toString(),this)},render(t){const e=this,r=this.toHref(t.get("defaultProtocol")),n=t.get("formatHref",r,this),s=t.get("tagName",r,e),i=this.toFormattedString(t),a={},l=t.get("className",r,e),c=t.get("target",r,e),u=t.get("rel",r,e),d=t.getObj("attributes",r,e),h=t.getObj("events",r,e);return a.href=n,l&&(a.class=l),c&&(a.target=c),u&&(a.rel=u),d&&Object.assign(a,d),{tagName:s,attributes:a,content:i,eventListeners:h}}};function ox(t,e){class r extends hM{constructor(s,i){super(s,i),this.t=t}}for(const n in e)r.prototype[n]=e[n];return r.t=t,r}const H5=ox("email",{isLink:!0,toHref(){return"mailto:"+this.toString()}}),q5=ox("text"),epe=ox("nl"),bm=ox("url",{isLink:!0,toHref(t=Vp.defaultProtocol){return this.hasProtocol()?this.v:`${t}://${this.v}`},hasProtocol(){const t=this.tk;return t.length>=2&&t[0].t!==Wp&&t[1].t===Ga}}),ns=t=>new An(t);function tpe({groups:t}){const e=t.domain.concat([_g,Og,$a,Rg,Lg,Mg,Dg,Fg,as,fN,Yh,Bg,$g,Ug,li,Vg,Xh,Wg]),r=[Ig,Ga,gN,oi,yN,Yh,Jh,xN,wN,vg,jg,Gh,Zh,wg,xg,bg,kg,Sg,Ng,Cg,Eg,Tg,Ag,zg,Pg],n=[_g,Ig,Og,Rg,Lg,Mg,Dg,Fg,as,Gh,Zh,Yh,Bg,$g,Ug,Jh,li,Vg,Xh,Wg],s=ns(),i=Ce(s,Xh);tt(i,n,i),tt(i,t.domain,i);const a=ns(),l=ns(),c=ns();tt(s,t.domain,a),tt(s,t.scheme,l),tt(s,t.slashscheme,c),tt(a,n,i),tt(a,t.domain,a);const u=Ce(a,$a);Ce(i,$a,u),Ce(l,$a,u),Ce(c,$a,u);const d=Ce(i,oi);tt(d,n,i),tt(d,t.domain,i);const h=ns();tt(u,t.domain,h),tt(h,t.domain,h);const p=Ce(h,oi);tt(p,t.domain,h);const f=ns(H5);tt(p,t.tld,f),tt(p,t.utld,f),Ce(u,Wp,f);const m=Ce(h,as);Ce(m,as,m),tt(m,t.domain,h),tt(f,t.domain,h),Ce(f,oi,p),Ce(f,as,m);const y=Ce(f,Ga);tt(y,t.numeric,H5);const k=Ce(a,as),g=Ce(a,oi);
vendor: 46,293 bytes, lines 907-921
907Ce(k,as,k),tt(k,t.domain,a),tt(g,n,i),tt(g,t.domain,a);const x=ns(bm);tt(g,t.tld,x),tt(g,t.utld,x),tt(x,t.domain,a),tt(x,n,i),Ce(x,oi,g),Ce(x,as,k),Ce(x,$a,u);const w=Ce(x,Ga),b=ns(bm);tt(w,t.numeric,b);const v=ns(bm),A=ns();tt(v,e,v),tt(v,r,A),tt(A,e,v),tt(A,r,A),Ce(x,li,v),Ce(b,li,v);const C=Ce(l,Ga),_=Ce(c,Ga),N=Ce(_,li),W=Ce(N,li);tt(l,t.domain,a),Ce(l,oi,g),Ce(l,as,k),tt(c,t.domain,a),Ce(c,oi,g),Ce(c,as,k),tt(C,t.domain,v),Ce(C,li,v),Ce(C,Jh,v),tt(W,t.domain,v),tt(W,e,v),Ce(W,li,v);const K=[[Gh,Zh],[xg,wg],[bg,kg],[vg,jg],[Sg,Ng],[Cg,Eg],[Tg,Ag],[zg,Pg]];for(let T=0;T<K.length;T++){const[F,E]=K[T],H=Ce(v,F);Ce(A,F,H),Ce(H,E,v);const Y=ns(bm);tt(H,e,Y);const $=ns();tt(H,r),tt(Y,e,Y),tt(Y,r,$),tt($,e,Y),tt($,r,$),Ce(Y,E,v),Ce($,E,v)}return Ce(s,Wp,x),Ce(s,mN,epe),{start:s,tokens:uM}}function rpe(t,e,r){let n=r.length,s=0,i=[],a=[];for(;s<n;){let l=t,c=null,u=null,d=0,h=null,p=-1;for(;s<n&&!(c=l.go(r[s].t));)a.push(r[s++]);for(;s<n&&(u=c||l.go(r[s].t));)c=null,l=u,l.accepts()?(p=0,h=l):p>=0&&p++,s++,d++;if(p<0)s-=d,s<n&&(a.push(r[s]),s++);else{a.length>0&&(i.push(Zw(q5,e,a)),a=[]),s-=p,d-=p;const f=h.t,m=r.slice(s-d,s);i.push(Zw(f,e,m))}}return a.length>0&&i.push(Zw(q5,e,a)),i}function Zw(t,e,r){const n=r[0].s,s=r[r.length-1].e,i=e.slice(n,s);return new t(i,r)}const npe=typeof console<"u"&&console&&console.warn||(()=>{}),spe="until manual call of linkify.init(). Register all schemes and plugins before invoking linkify the first time.",It={scanner:null,parser:null,tokenQueue:[],pluginQueue:[],customSchemes:[],initialized:!1};function ipe(){return An.groups={},It.scanner=null,It.parser=null,It.tokenQueue=[],It.pluginQueue=[],It.customSchemes=[],It.initialized=!1,It}function K5(t,e=!1){if(It.initialized&&npe(`linkifyjs: already initialized - will not register custom scheme "${t}" ${spe}`),!/^[0-9a-z]+(-[0-9a-z]+)*$/.test(t))throw new Error(`linkifyjs: incorrect scheme format.
9081. Must only contain digits, lowercase ASCII letters or "-"
9092. Cannot start or end with "-"
9103. "-" cannot repeat`);It.customSchemes.push([t,e])}function ape(){It.scanner=Xhe(It.customSchemes);for(let t=0;t<It.tokenQueue.length;t++)It.tokenQueue[t][1]({scanner:It.scanner});It.parser=tpe(It.scanner.tokens);for(let t=0;t<It.pluginQueue.length;t++)It.pluginQueue[t][1]({scanner:It.scanner,parser:It.parser});return It.initialized=!0,It}function kN(t){return It.initialized||ape(),rpe(It.parser.start,t,dM(It.scanner.start,t))}kN.scan=dM;function pM(t,e=null,r=null){if(e&&typeof e=="object"){if(r)throw Error(`linkifyjs: Invalid link type ${e}; must be a string`);r=e,e=null}const n=new bN(r),s=kN(t),i=[];for(let a=0;a<s.length;a++){const l=s[a];l.isLink&&(!e||l.t===e)&&n.check(l)&&i.push(l.toFormattedObject(n))}return i}var vN="[\0-   ᠎ -\u2029  ]",ope=new RegExp(vN),lpe=new RegExp(`${vN}$`),cpe=new RegExp(vN,"g");function upe(t){return t.length===1?t[0].isLink:t.length===3&&t[1].isLink?["()","[]"].includes(t[0].value+t[2].value):!1}function dpe(t){return new er({key:new Lr("autolink"),appendTransaction:(e,r,n)=>{const s=e.some(u=>u.docChanged)&&!r.doc.eq(n.doc),i=e.some(u=>u.getMeta("preventAutolink"));if(!s||i)return;const{tr:a}=n,l=IL(r.doc,[...e]);if(BL(l).forEach(({newRange:u})=>{const d=rde(n.doc,u,f=>f.isTextblock);let h,p;if(d.length>1)h=d[0],p=n.doc.textBetween(h.pos,h.pos+h.node.nodeSize,void 0," ");else if(d.length){const f=n.doc.textBetween(u.from,u.to," "," ");if(!lpe.test(f))return;h=d[0],p=n.doc.textBetween(h.pos,u.to,void 0," ")}if(h&&p){const f=p.split(ope).filter(Boolean);if(f.length<=0)return!1;const m=f[f.length-1],y=h.pos+p.lastIndexOf(m);if(!m)return!1;const k=kN(m).map(g=>g.toObject(t.defaultProtocol));if(!upe(k))return!1;k.filter(g=>g.isLink).map(g=>({...g,from:y+g.start+1,to:y+g.end+1})).filter(g=>n.schema.marks.code?!n.doc.rangeHasMark(g.from,g.to,n.schema.marks.code):!0).filter(g=>t.validate(g.value)).filter(g=>t.shouldAutoLink(g.value)).forEach(g=>{cN(g.from,g.to,n.doc).some(x=>x.mark.type===t.type)||a.addMark(g.from,g.to,t.type.create({href:g.href}))})}}),!!a.steps.length)return a}})}function hpe(t){return new er({key:new Lr("handleClickLink"),props:{handleClick:(e,r,n)=>{var s,i;if(n.button!==0||!e.editable)return!1;let a=null;if(n.target instanceof HTMLAnchorElement)a=n.target;else{let d=n.target;const h=[];for(;d.nodeName!=="DIV";)h.push(d),d=d.parentNode;a=h.find(p=>p.nodeName==="A")}if(!a)return!1;const l=FL(e.state,t.type.name),c=(s=a==null?void 0:a.href)!=null?s:l.href,u=(i=a==null?void 0:a.target)!=null?i:l.target;return t.enableClickSelection&&t.editor.commands.extendMarkRange(t.type.name),a&&c?(window.open(c,u),!0):!1}}})}function ppe(t){return new er({key:new Lr("handlePasteLink"),props:{handlePaste:(e,r,n)=>{const{shouldAutoLink:s}=t,{state:i}=e,{selection:a}=i,{empty:l}=a;if(l)return!1;let c="";n.content.forEach(d=>{c+=d.textContent});const u=pM(c,{defaultProtocol:t.defaultProtocol}).find(d=>d.isLink&&d.value===c);return!c||!u||s!==void 0&&!s(u.href)?!1:t.editor.commands.setMark(t.type,{href:u.href})}}})}function ol(t,e){const r=["http","https","ftp","ftps","mailto","tel","callto","sms","cid","xmpp"];return e&&e.forEach(n=>{const s=typeof n=="string"?n:n.scheme;s&&r.push(s)}),!t||t.replace(cpe,"").match(new RegExp(`^(?:(?:${r.join("|")}):|[^a-z]|[a-z0-9+.-]+(?:[^a-z+.-:]|$))`,"i"))}var fpe=Cc.create({name:"link",priority:1e3,keepOnSplit:!1,exitable:!0,onCreate(){this.options.validate&&!this.options.shouldAutoLink&&(this.options.shouldAutoLink=this.options.validate,console.warn("The `validate` option is deprecated. Rename to the `shouldAutoLink` option instead.")),this.options.protocols.forEach(t=>{if(typeof t=="string"){K5(t);return}K5(t.scheme,t.optionalSlashes)})},onDestroy(){ipe()},inclusive(){return this.options.autolink},addOptions(){return{openOnClick:!0,enableClickSelection:!1,linkOnPaste:!0,autolink:!0,protocols:[],defaultProtocol:"http",HTMLAttributes:{target:"_blank",rel:"noopener noreferrer nofollow",class:null},isAllowedUri:(t,e)=>!!ol(t,e.protocols),validate:t=>!!t,shouldAutoLink:t=>!!t}},addAttributes(){return{href:{default:null,parseHTML(t){return t.getAttribute("href")}},target:{default:this.options.HTMLAttributes.target},rel:{default:this.options.HTMLAttributes.rel},class:{default:this.options.HTMLAttributes.class}}},parseHTML(){return[{tag:"a[href]",getAttrs:t=>{const e=t.getAttribute("href");return!e||!this.options.isAllowedUri(e,{defaultValidate:r=>!!ol(r,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?!1:null}}]},renderHTML({HTMLAttributes:t}){return this.options.isAllowedUri(t.href,{defaultValidate:e=>!!ol(e,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?["a",yr(this.options.HTMLAttributes,t),0]:["a",yr(this.options.HTMLAttributes,{...t,href:""}),0]},markdownTokenName:"link",parseMarkdown:(t,e)=>e.applyMark("link",e.parseInline(t.tokens||[]),{href:t.href,title:t.title||null}),renderMarkdown:(t,e)=>{var r;const n=((r=t.attrs)==null?void 0:r.href)||"";return`[${e.renderChildren(t)}](${n})`},addCommands(){return{setLink:t=>({chain:e})=>{const{href:r}=t;return this.options.isAllowedUri(r,{defaultValidate:n=>!!ol(n,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?e().setMark(this.name,t).setMeta("preventAutolink",!0).run():!1},toggleLink:t=>({chain:e})=>{const{href:r}=t||{};return r&&!this.options.isAllowedUri(r,{defaultValidate:n=>!!ol(n,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?!1:e().toggleMark(this.name,t,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run()},unsetLink:()=>({chain:t})=>t().unsetMark(this.name,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run()}},addPasteRules(){return[wc({find:t=>{const e=[];if(t){const{protocols:r,defaultProtocol:n}=this.options,s=pM(t).filter(i=>i.isLink&&this.options.isAllowedUri(i.value,{defaultValidate:a=>!!ol(a,r),protocols:r,defaultProtocol:n}));s.length&&s.forEach(i=>{this.options.shouldAutoLink(i.value)&&e.push({text:i.value,data:{href:i.href},index:i.start})})}return e},type:this.type,getAttributes:t=>{var e;return{href:(e=t.data)==null?void 0:e.href}}})]},addProseMirrorPlugins(){const t=[],{protocols:e,defaultProtocol:r}=this.options;return this.options.autolink&&t.push(dpe({type:this.type,defaultProtocol:this.options.defaultProtocol,validate:n=>this.options.isAllowedUri(n,{defaultValidate:s=>!!ol(s,e),protocols:e,defaultProtocol:r}),shouldAutoLink:this.options.shouldAutoLink})),this.options.openOnClick===!0&&t.push(hpe({type:this.type,editor:this.editor,enableClickSelection:this.options.enableClickSelection})),this.options.linkOnPaste&&t.push(ppe({editor:this.editor,defaultProtocol:this.options.defaultProtocol,type:this.type,shouldAutoLink:this.options.shouldAutoLink})),t}}),mpe=Object.defineProperty,gpe=(t,e)=>{for(var r in e)mpe(t,r,{get:e[r],enumerable:!0})},ype="listItem",G5="textStyle",Z5=/^\s*([-+*])\s$/,fM=es.create({name:"bulletList",addOptions(){return{itemTypeName:"listItem",HTMLAttributes:{},keepMarks:!1,keepAttributes:!1}},group:"block list",content(){return`${this.options.itemTypeName}+`},parseHTML(){return[{tag:"ul"}]},renderHTML({HTMLAttributes:t}){return["ul",yr(this.options.HTMLAttributes,t),0]},markdownTokenName:"list",parseMarkdown:(t,e)=>t.type!=="list"||t.ordered?[]:{type:"bulletList",content:t.items?e.parseChildren(t.items):[]},renderMarkdown:(t,e)=>t.content?e.renderChildren(t.content,`
911`):"",markdownOptions:{indentsContent:!0},addCommands(){return{toggleBulletList:()=>({commands:t,chain:e})=>this.options.keepAttributes?e().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes(ype,this.editor.getAttributes(G5)).run():t.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-8":()=>this.editor.commands.toggleBulletList()}},addInputRules(){let t=ld({find:Z5,type:this.type});return(this.options.keepMarks||this.options.keepAttributes)&&(t=ld({find:Z5,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:()=>this.editor.getAttributes(G5),editor:this.editor})),[t]}}),mM=es.create({name:"listItem",addOptions(){return{HTMLAttributes:{},bulletListTypeName:"bulletList",orderedListTypeName:"orderedList"}},content:"paragraph block*",defining:!0,parseHTML(){return[{tag:"li"}]},renderHTML({HTMLAttributes:t}){return["li",yr(this.options.HTMLAttributes,t),0]},markdownTokenName:"list_item",parseMarkdown:(t,e)=>{if(t.type!=="list_item")return[];let r=[];if(t.tokens&&t.tokens.length>0)if(t.tokens.some(s=>s.type==="paragraph"))r=e.parseChildren(t.tokens);else{const s=t.tokens[0];if(s&&s.type==="text"&&s.tokens&&s.tokens.length>0){if(r=[{type:"paragraph",content:e.parseInline(s.tokens)}],t.tokens.length>1){const a=t.tokens.slice(1),l=e.parseChildren(a);r.push(...l)}}else r=e.parseChildren(t.tokens)}return r.length===0&&(r=[{type:"paragraph",content:[]}]),{type:"listItem",content:r}},renderMarkdown:(t,e,r)=>pN(t,e,n=>n.parentType==="bulletList"?"- ":n.parentType==="orderedList"?`${n.index+1}. `:"- ",r),addKeyboardShortcuts(){return{Enter:()=>this.editor.commands.splitListItem(this.name),Tab:()=>this.editor.commands.sinkListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)}}}),xpe={};gpe(xpe,{findListItemPos:()=>jf,getNextListDepth:()=>jN,handleBackspace:()=>m2,handleDelete:()=>g2,hasListBefore:()=>gM,hasListItemAfter:()=>wpe,hasListItemBefore:()=>yM,listItemHasSubList:()=>xM,nextListIsDeeper:()=>wM,nextListIsHigher:()=>bM});var jf=(t,e)=>{const{$from:r}=e.selection,n=gr(t,e.schema);let s=null,i=r.depth,a=r.pos,l=null;for(;i>0&&l===null;)s=r.node(i),s.type===n?l=i:(i-=1,a-=1);return l===null?null:{$pos:e.doc.resolve(a),depth:l}},jN=(t,e)=>{const r=jf(t,e);if(!r)return!1;const[,n]=hde(e,t,r.$pos.pos+4);return n},gM=(t,e,r)=>{const{$anchor:n}=t.selection,s=Math.max(0,n.pos-2),i=t.doc.resolve(s).node();return!(!i||!r.includes(i.type.name))},yM=(t,e)=>{var r;const{$anchor:n}=e.selection,s=e.doc.resolve(n.pos-2);return!(s.index()===0||((r=s.nodeBefore)==null?void 0:r.type.name)!==t)},xM=(t,e,r)=>{if(!r)return!1;const n=gr(t,e.schema);let s=!1;return r.descendants(i=>{i.type===n&&(s=!0)}),s},m2=(t,e,r)=>{if(t.commands.undoInputRule())return!0;if(t.state.selection.from!==t.state.selection.to)return!1;if(!Uo(t.state,e)&&gM(t.state,e,r)){const{$anchor:l}=t.state.selection,c=t.state.doc.resolve(l.before()-1),u=[];c.node().descendants((p,f)=>{p.type.name===e&&u.push({node:p,pos:f})});const d=u.at(-1);if(!d)return!1;const h=t.state.doc.resolve(c.start()+d.pos+1);return t.chain().cut({from:l.start()-1,to:l.end()+1},h.end()).joinForward().run()}if(!Uo(t.state,e)||!gde(t.state))return!1;const n=jf(e,t.state);if(!n)return!1;const i=t.state.doc.resolve(n.$pos.pos-2).node(n.depth),a=xM(e,t.state,i);return yM(e,t.state)&&!a?t.commands.joinItemBackward():t.chain().liftListItem(e).run()},wM=(t,e)=>{const r=jN(t,e),n=jf(t,e);return!n||!r?!1:r>n.depth},bM=(t,e)=>{const r=jN(t,e),n=jf(t,e);return!n||!r?!1:r<n.depth},g2=(t,e)=>{if(!Uo(t.state,e)||!mde(t.state,e))return!1;const{selection:r}=t.state,{$from:n,$to:s}=r;return!r.empty&&n.sameParent(s)?!1:wM(e,t.state)?t.chain().focus(t.state.selection.from+4).lift(e).joinBackward().run():bM(e,t.state)?t.chain().joinForward().joinBackward().run():t.commands.joinItemForward()},wpe=(t,e)=>{var r;const{$anchor:n}=e.selection,s=e.doc.resolve(n.pos-n.parentOffset-2);return!(s.index()===s.parent.childCount-1||((r=s.nodeAfter)==null?void 0:r.type.name)!==t)},kM=xr.create({name:"listKeymap",addOptions(){return{listTypes:[{itemName:"listItem",wrapperNames:["bulletList","orderedList"]},{itemName:"taskItem",wrapperNames:["taskList"]}]}},addKeyboardShortcuts(){return{Delete:({editor:t})=>{let e=!1;return this.options.listTypes.forEach(({itemName:r})=>{t.state.schema.nodes[r]!==void 0&&g2(t,r)&&(e=!0)}),e},"Mod-Delete":({editor:t})=>{let e=!1;return this.options.listTypes.forEach(({itemName:r})=>{t.state.schema.nodes[r]!==void 0&&g2(t,r)&&(e=!0)}),e},Backspace:({editor:t})=>{let e=!1;return this.options.listTypes.forEach(({itemName:r,wrapperNames:n})=>{t.state.schema.nodes[r]!==void 0&&m2(t,r,n)&&(e=!0)}),e},"Mod-Backspace":({editor:t})=>{let e=!1;return this.options.listTypes.forEach(({itemName:r,wrapperNames:n})=>{t.state.schema.nodes[r]!==void 0&&m2(t,r,n)&&(e=!0)}),e}}}}),Y5=/^(\s*)(\d+)\.\s+(.*)$/,bpe=/^\s/;function kpe(t){const e=[];let r=0,n=0;for(;r<t.length;){const s=t[r],i=s.match(Y5);if(!i)break;const[,a,l,c]=i,u=a.length;let d=c,h=r+1;const p=[s];for(;h<t.length;){const f=t[h];if(f.match(Y5))break;if(f.trim()==="")p.push(f),d+=`
912`,h+=1;else if(f.match(bpe))p.push(f),d+=`
913${f.slice(u+2)}`,h+=1;else break}e.push({indent:u,number:parseInt(l,10),content:d.trim(),raw:p.join(`
914`)}),n=h,r=h}return[e,n]}function vM(t,e,r){var n;const s=[];let i=0;for(;i<t.length;){const a=t[i];if(a.indent===e){const l=a.content.split(`
915`),c=((n=l[0])==null?void 0:n.trim())||"",u=[];c&&u.push({type:"paragraph",raw:c,tokens:r.inlineTokens(c)});const d=l.slice(1).join(`
916`).trim();if(d){const f=r.blockTokens(d);u.push(...f)}let h=i+1;const p=[];for(;h<t.length&&t[h].indent>e;)p.push(t[h]),h+=1;if(p.length>0){const f=Math.min(...p.map(y=>y.indent)),m=vM(p,f,r);u.push({type:"list",ordered:!0,start:p[0].number,items:m,raw:p.map(y=>y.raw).join(`
917`)})}s.push({type:"list_item",raw:a.raw,tokens:u}),i=h}else i+=1}return s}function vpe(t,e){return t.map(r=>{if(r.type!=="list_item")return e.parseChildren([r])[0];const n=[];return r.tokens&&r.tokens.length>0&&r.tokens.forEach(s=>{if(s.type==="paragraph"||s.type==="list"||s.type==="blockquote"||s.type==="code")n.push(...e.parseChildren([s]));else if(s.type==="text"&&s.tokens){const i=e.parseChildren([s]);n.push({type:"paragraph",content:i})}else{const i=e.parseChildren([s]);i.length>0&&n.push(...i)}}),{type:"listItem",content:n}})}var jpe="listItem",J5="textStyle",X5=/^(\d+)\.\s$/,jM=es.create({name:"orderedList",addOptions(){return{itemTypeName:"listItem",HTMLAttributes:{},keepMarks:!1,keepAttributes:!1}},group:"block list",content(){return`${this.options.itemTypeName}+`},addAttributes(){return{start:{default:1,parseHTML:t=>t.hasAttribute("start")?parseInt(t.getAttribute("start")||"",10):1},type:{default:null,parseHTML:t=>t.getAttribute("type")}}},parseHTML(){return[{tag:"ol"}]},renderHTML({HTMLAttributes:t}){const{start:e,...r}=t;return e===1?["ol",yr(this.options.HTMLAttributes,r),0]:["ol",yr(this.options.HTMLAttributes,t),0]},markdownTokenName:"list",parseMarkdown:(t,e)=>{if(t.type!=="list"||!t.ordered)return[];const r=t.start||1,n=t.items?vpe(t.items,e):[];return r!==1?{type:"orderedList",attrs:{start:r},content:n}:{type:"orderedList",content:n}},renderMarkdown:(t,e)=>t.content?e.renderChildren(t.content,`
918`):"",markdownTokenizer:{name:"orderedList",level:"block",start:t=>{const e=t.match(/^(\s*)(\d+)\.\s+/),r=e==null?void 0:e.index;return r!==void 0?r:-1},tokenize:(t,e,r)=>{var n;const s=t.split(`
919`),[i,a]=kpe(s);if(i.length===0)return;const l=vM(i,0,r);return l.length===0?void 0:{type:"list",ordered:!0,start:((n=i[0])==null?void 0:n.number)||1,items:l,raw:s.slice(0,a).join(`
920`)}}},markdownOptions:{indentsContent:!0},addCommands(){return{toggleOrderedList:()=>({commands:t,chain:e})=>this.options.keepAttributes?e().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes(jpe,this.editor.getAttributes(J5)).run():t.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-7":()=>this.editor.commands.toggleOrderedList()}},addInputRules(){let t=ld({find:X5,type:this.type,getAttributes:e=>({start:+e[1]}),joinPredicate:(e,r)=>r.childCount+r.attrs.start===+e[1]});return(this.options.keepMarks||this.options.keepAttributes)&&(t=ld({find:X5,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:e=>({start:+e[1],...this.editor.getAttributes(J5)}),joinPredicate:(e,r)=>r.childCount+r.attrs.start===+e[1],editor:this.editor})),[t]}}),Spe=/^\s*(\[([( |x])?\])\s$/,Npe=es.create({name:"taskItem",addOptions(){return{nested:!1,HTMLAttributes:{},taskListTypeName:"taskList",a11y:void 0}},content(){return this.options.nested?"paragraph block*":"paragraph+"},defining:!0,addAttributes(){return{checked:{default:!1,keepOnSplit:!1,parseHTML:t=>{const e=t.getAttribute("data-checked");return e===""||e==="true"},renderHTML:t=>({"data-checked":t.checked})}}},parseHTML(){return[{tag:`li[data-type="${this.name}"]`,priority:51}]},renderHTML({node:t,HTMLAttributes:e}){return["li",yr(this.options.HTMLAttributes,e,{"data-type":this.name}),["label",["input",{type:"checkbox",checked:t.attrs.checked?"checked":null}],["span"]],["div",0]]},parseMarkdown:(t,e)=>{const r=[];if(t.tokens&&t.tokens.length>0?r.push(e.createNode("paragraph",{},e.parseInline(t.tokens))):t.text?r.push(e.createNode("paragraph",{},[e.createNode("text",{text:t.text})])):r.push(e.createNode("paragraph",{},[])),t.nestedTokens&&t.nestedTokens.length>0){const n=e.parseChildren(t.nestedTokens);r.push(...n)}return e.createNode("taskItem",{checked:t.checked||!1},r)},renderMarkdown:(t,e)=>{var r;const s=`- [${(r=t.attrs)!=null&&r.checked?"x":" "}] `;return pN(t,e,s)},addKeyboardShortcuts(){const t={Enter:()=>this.editor.commands.splitListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)};return this.options.nested?{...t,Tab:()=>this.editor.commands.sinkListItem(this.name)}:t},addNodeView(){return({node:t,HTMLAttributes:e,getPos:r,editor:n})=>{const s=document.createElement("li"),i=document.createElement("label"),a=document.createElement("span"),l=document.createElement("input"),c=document.createElement("div"),u=d=>{var h,p;l.ariaLabel=((p=(h=this.options.a11y)==null?void 0:h.checkboxLabel)==null?void 0:p.call(h,d,l.checked))||`Task item checkbox for ${d.textContent||"empty task item"}`};return u(t),i.contentEditable="false",l.type="checkbox",l.addEventListener("mousedown",d=>d.preventDefault()),l.addEventListener("change",d=>{if(!n.isEditable&&!this.options.onReadOnlyChecked){l.checked=!l.checked;return}const{checked:h}=d.target;n.isEditable&&typeof r=="function"&&n.chain().focus(void 0,{scrollIntoView:!1}).command(({tr:p})=>{const f=r();if(typeof f!="number")return!1;const m=p.doc.nodeAt(f);return p.setNodeMarkup(f,void 0,{...m==null?void 0:m.attrs,checked:h}),!0}).run(),!n.isEditable&&this.options.onReadOnlyChecked&&(this.options.onReadOnlyChecked(t,h)||(l.checked=!l.checked))}),Object.entries(this.options.HTMLAttributes).forEach(([d,h])=>{s.setAttribute(d,h)}),s.dataset.checked=t.attrs.checked,l.checked=t.attrs.checked,i.append(l,a),s.append(i,c),Object.entries(e).forEach(([d,h])=>{s.setAttribute(d,h)}),{dom:s,contentDOM:c,update:d=>d.type!==this.type?!1:(s.dataset.checked=d.attrs.checked,l.checked=d.attrs.checked,u(d),!0)}}},addInputRules(){return[ld({find:Spe,type:this.type,getAttributes:t=>({checked:t[t.length-1]==="x"})})]}}),Cpe=es.create({name:"taskList",addOptions(){return{itemTypeName:"taskItem",HTMLAttributes:{}}},group:"block list",content(){return`${this.options.itemTypeName}+`},parseHTML(){return[{tag:`ul[data-type="${this.name}"]`,priority:51}]},renderHTML({HTMLAttributes:t}){return["ul",yr(this.options.HTMLAttributes,t,{"data-type":this.name}),0]},parseMarkdown:(t,e)=>e.createNode("taskList",{},e.parseChildren(t.items||[])),renderMarkdown:(t,e)=>t.content?e.renderChildren(t.content,`
921`):"",markdownTokenizer:{name:"taskList",level:"block",start(t){var e;const r=(e=t.match(/^\s*[-+*]\s+\[([ xX])\]\s+/))==null?void 0:e.index;return r!==void 0?r:-1},tokenize(t,e,r){const n=i=>{const a=i2(i,{itemPattern:/^(\s*)([-+*])\s+\[([ xX])\]\s+(.*)$/,extractItemData:l=>({indentLevel:l[1].length,mainContent:l[4],checked:l[3].toLowerCase()==="x"}),createToken:(l,c)=>({type:"taskItem",raw:"",mainContent:l.mainContent,indentLevel:l.indentLevel,checked:l.checked,text:l.mainContent,tokens:r.inlineTokens(l.mainContent),nestedTokens:c}),customNestedParser:n},r);return a?[{type:"taskList",raw:a.raw,items:a.items}]:r.blockTokens(i)},s=i2(t,{itemPattern:/^(\s*)([-+*])\s+\[([ xX])\]\s+(.*)$/,extractItemData:i=>({indentLevel:i[1].length,mainContent:i[4],checked:i[3].toLowerCase()==="x"}),createToken:(i,a)=>({type:"taskItem",raw:"",mainContent:i.mainContent,indentLevel:i.indentLevel,checked:i.checked,text:i.mainContent,tokens:r.inlineTokens(i.mainContent),nestedTokens:a}),customNestedParser:n},r);if(s)return{type:"taskList",raw:s.raw,items:s.items}}},markdownOptions:{indentsContent:!0},addCommands(){return{toggleTaskList:()=>({commands:t})=>t.toggleList(this.name,this.options.itemTypeName)}},addKeyboardShortcuts(){return{"Mod-Shift-9":()=>this.editor.commands.toggleTaskList()}}});xr.create({name:"listKit",addExtensions(){const t=[];return this.options.bulletList!==!1&&t.push(fM.configure(this.options.bulletList)),this.options.listItem!==!1&&t.push(mM.configure(this.options.listItem)),this.options.listKeymap!==!1&&t.push(kM.configure(this.options.listKeymap)),this.options.orderedList!==!1&&t.push(jM.configure(this.options.orderedList)),this.options.taskItem!==!1&&t.push(Npe.configure(this.options.taskItem)),this.options.taskList!==!1&&t.push(Cpe.configure(this.options.taskList)),t}});var Epe=es.create({name:"paragraph",priority:1e3,addOptions(){return{HTMLAttributes:{}}},group:"block",content:"inline*",parseHTML(){return[{tag:"p"}]},renderHTML({HTMLAttributes:t}){return["p",yr(this.options.HTMLAttributes,t),0]},parseMarkdown:(t,e)=>{const r=t.tokens||[];return r.length===1&&r[0].type==="image"?e.parseChildren([r[0]]):e.createNode("paragraph",void 0,e.parseInline(r))},renderMarkdown:(t,e)=>!t||!Array.isArray(t.content)?"":e.renderChildren(t.content),addCommands(){return{setParagraph:()=>({commands:t})=>t.setNode(this.name)}},addKeyboardShortcuts(){return{"Mod-Alt-0":()=>this.editor.commands.setParagraph()}}}),Tpe=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))$/,Ape=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))/g,zpe=Cc.create({name:"strike",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"s"},{tag:"del"},{tag:"strike"},{style:"text-decoration",consuming:!1,getAttrs:t=>t.includes("line-through")?{}:!1}]},renderHTML({HTMLAttributes:t}){return["s",yr(this.options.HTMLAttributes,t),0]},markdownTokenName:"del",parseMarkdown:(t,e)=>e.applyMark("strike",e.parseInline(t.tokens||[])),renderMarkdown:(t,e)=>`~~${e.renderChildren(t)}~~`,addCommands(){return{setStrike:()=>({commands:t})=>t.setMark(this.name),toggleStrike:()=>({commands:t})=>t.toggleMark(this.name),unsetStrike:()=>({commands:t})=>t.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-s":()=>this.editor.commands.toggleStrike()}},addInputRules(){return[od({find:Tpe,type:this.type})]},addPasteRules(){return[wc({find:Ape,type:this.type})]}}),Ppe=es.create({name:"text",group:"inline",parseMarkdown:t=>({type:"text",text:t.text||""}),renderMarkdown:t=>t.text||""}),_pe=Cc.create({name:"underline",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"u"},{style:"text-decoration",consuming:!1,getAttrs:t=>t.includes("underline")?{}:!1}]},renderHTML({HTMLAttributes:t}){return["u",yr(this.options.HTMLAttributes,t),0]},parseMarkdown(t,e){return e.applyMark(this.name||"underline",e.parseInline(t.tokens||[]))},renderMarkdown(t,e){return`++${e.renderChildren(t)}++`},markdownTokenizer:{name:"underline",level:"inline",start(t){return t.indexOf("++")},tokenize(t,e,r){const s=/^(\+\+)([\s\S]+?)(\+\+)/.exec(t);if(!s)return;const i=s[2].trim();return{type:"underline",raw:s[0],text:i,tokens:r.inlineTokens(i)}}},addCommands(){return{setUnderline:()=>({commands:t})=>t.setMark(this.name),toggleUnderline:()=>({commands:t})=>t.toggleMark(this.name),unsetUnderline:()=>({commands:t})=>t.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-u":()=>this.editor.commands.toggleUnderline(),"Mod-U":()=>this.editor.commands.toggleUnderline()}}});function Ipe(t={}){return new er({view(e){return new Ope(e,t)}})}class Ope{constructor(e,r){var n;this.editorView=e,this.cursorPos=null,this.element=null,this.timeout=-1,this.width=(n=r.width)!==null&&n!==void 0?n:1,this.color=r.color===!1?void 0:r.color||"black",this.class=r.class,this.handlers=["dragover","dragend","drop","dragleave"].map(s=>{let i=a=>{this[s](a)};return e.dom.addEventListener(s,i),{name:s,handler:i}})}destroy(){this.handlers.forEach(({name:e,handler:r})=>this.editorView.dom.removeEventListener(e,r))}update(e,r){this.cursorPos!=null&&r.doc!=e.state.doc&&(this.cursorPos>e.state.doc.content.size?this.setCursor(null):this.updateOverlay())}setCursor(e){e!=this.cursorPos&&(this.cursorPos=e,e==null?(this.element.parentNode.removeChild(this.element),this.element=null):this.updateOverlay())}updateOverlay(){let e=this.editorView.state.doc.resolve(this.cursorPos),r=!e.parent.inlineContent,n,s=this.editorView.dom,i=s.getBoundingClientRect(),a=i.width/s.offsetWidth,l=i.height/s.offsetHeight;if(r){let h=e.nodeBefore,p=e.nodeAfter;if(h||p){let f=this.editorView.nodeDOM(this.cursorPos-(h?h.nodeSize:0));if(f){let m=f.getBoundingClientRect(),y=h?m.bottom:m.top;h&&p&&(y=(y+this.editorView.nodeDOM(this.cursorPos).getBoundingClientRect().top)/2);let k=this.width/2*l;n={left:m.left,right:m.right,top:y-k,bottom:y+k}}}}if(!n){let h=this.editorView.coordsAtPos(this.cursorPos),p=this.width/2*a;n={left:h.left-p,right:h.left+p,top:h.top,bottom:h.bottom}}let c=this.editorView.dom.offsetParent;this.element||(this.element=c.appendChild(document.createElement("div")),this.class&&(this.element.className=this.class),this.element.style.cssText="position: absolute; z-index: 50; pointer-events: none;",this.color&&(this.element.style.backgroundColor=this.color)),this.element.classList.toggle("prosemirror-dropcursor-block",r),this.element.classList.toggle("prosemirror-dropcursor-inline",!r);let u,d;if(!c||c==document.body&&getComputedStyle(c).position=="static")u=-pageXOffset,d=-pageYOffset;else{let h=c.getBoundingClientRect(),p=h.width/c.offsetWidth,f=h.height/c.offsetHeight;u=h.left-c.scrollLeft*p,d=h.top-c.scrollTop*f}this.element.style.left=(n.left-u)/a+"px",this.element.style.top=(n.top-d)/l+"px",this.element.style.width=(n.right-n.left)/a+"px",this.element.style.height=(n.bottom-n.top)/l+"px"}scheduleRemoval(e){clearTimeout(this.timeout),this.timeout=setTimeout(()=>this.setCursor(null),e)}dragover(e){if(!this.editorView.editable)return;let r=this.editorView.posAtCoords({left:e.clientX,top:e.clientY}),n=r&&r.inside>=0&&this.editorView.state.doc.nodeAt(r.inside),s=n&&n.type.spec.disableDropCursor,i=typeof s=="function"?s(this.editorView,r,e):s;if(r&&!i){let a=r.pos;if(this.editorView.dragging&&this.editorView.dragging.slice){let l=NR(this.editorView.state.doc,a,this.editorView.dragging.slice);l!=null&&(a=l)}this.setCursor(a),this.scheduleRemoval(5e3)}}dragend(){this.scheduleRemoval(20)}drop(){this.scheduleRemoval(20)}dragleave(e){this.editorView.dom.contains(e.relatedTarget)||this.setCursor(null)}}class Yt extends rt{constructor(e){super(e,e)}map(e,r){let n=e.resolve(r.map(this.head));return Yt.valid(n)?new Yt(n):rt.near(n)}content(){return Ie.empty}eq(e){return e instanceof Yt&&e.head==this.head}toJSON(){return{type:"gapcursor",pos:this.head}}static fromJSON(e,r){if(typeof r.pos!="number")throw new RangeError("Invalid input for GapCursor.fromJSON");return new Yt(e.resolve(r.pos))}getBookmark(){return new SN(this.anchor)}static valid(e){let r=e.parent;if(r.isTextblock||!Rpe(e)||!Lpe(e))return!1;let n=r.type.spec.allowGapCursor;if(n!=null)return n;let s=r.contentMatchAt(e.index()).defaultType;return s&&s.isTextblock}static findGapCursorFrom(e,r,n=!1){e:for(;;){if(!n&&Yt.valid(e))return e;let s=e.pos,i=null;for(let a=e.depth;;a--){let l=e.node(a);if(r>0?e.indexAfter(a)<l.childCount:e.index(a)>0){i=l.child(r>0?e.indexAfter(a):e.index(a)-1);break}else if(a==0)return null;s+=r;let c=e.doc.resolve(s);if(Yt.valid(c))return c}for(;;){let a=r>0?i.firstChild:i.lastChild;if(!a){if(i.isAtom&&!i.isText&&!Ve.isSelectable(i)){e=e.doc.resolve(s+i.nodeSize*r),n=!1;continue e}break}i=a,s+=r;let l=e.doc.resolve(s);if(Yt.valid(l))return l}return null}}}Yt.prototype.visible=!1;Yt.findFrom=Yt.findGapCursorFrom;rt.jsonID("gapcursor",Yt);class SN{constructor(e){this.pos=e}map(e){return new SN(e.map(this.pos))}resolve(e){let r=e.resolve(this.pos);return Yt.valid(r)?new Yt(r):rt.near(r)}}function SM(t){return t.isAtom||t.spec.isolating||t.spec.createGapCursor}function Rpe(t){for(let e=t.depth;e>=0;e--){let r=t.index(e),n=t.node(e);if(r==0){if(n.type.spec.isolating)return!0;continue}for(let s=n.child(r-1);;s=s.lastChild){if(s.childCount==0&&!s.inlineContent||SM(s.type))return!0;if(s.inlineContent)return!1}}return!0}function Lpe(t){for(let e=t.depth;e>=0;e--){let r=t.indexAfter(e),n=t.node(e);if(r==n.childCount){if(n.type.spec.isolating)return!0;continue}for(let s=n.child(r);;s=s.firstChild){if(s.childCount==0&&!s.inlineContent||SM(s.type))return!0;if(s.inlineContent)return!1}}return!0}function Mpe(){return new er({props:{decorations:$pe,createSelectionBetween(t,e,r){return e.pos==r.pos&&Yt.valid(r)?new Yt(r):null},handleClick:Fpe,handleKeyDown:Dpe,handleDOMEvents:{beforeinput:Bpe}}})}const Dpe=NL({ArrowLeft:km("horiz",-1),ArrowRight:km("horiz",1),ArrowUp:km("vert",-1),ArrowDown:km("vert",1)});function km(t,e){const r=t=="vert"?e>0?"down":"up":e>0?"right":"left";return function(n,s,i){let a=n.selection,l=e>0?a.$to:a.$from,c=a.empty;if(a instanceof Ze){if(!i.endOfTextblock(r)||l.depth==0)return!1;c=!1,l=n.doc.resolve(e>0?l.after():l.before())}let u=Yt.findGapCursorFrom(l,e,c);return u?(s&&s(n.tr.setSelection(new Yt(u))),!0):!1}}function Fpe(t,e,r){if(!t||!t.editable)return!1;let n=t.state.doc.resolve(e);if(!Yt.valid(n))return!1;let s=t.posAtCoords({left:r.clientX,top:r.clientY});return s&&s.inside>-1&&Ve.isSelectable(t.state.doc.nodeAt(s.inside))?!1:(t.dispatch(t.state.tr.setSelection(new Yt(n))),!0)}function Bpe(t,e){if(e.inputType!="insertCompositionText"||!(t.state.selection instanceof Yt))return!1;let{$from:r}=t.state.selection,n=r.parent.contentMatchAt(r.index()).findWrapping(t.state.schema.nodes.text);if(!n)return!1;let s=Se.empty;for(let a=n.length-1;a>=0;a--)s=Se.from(n[a].createAndFill(null,s));let i=t.state.tr.replace(r.pos,r.pos,new Ie(s,0,0));return i.setSelection(Ze.near(i.doc.resolve(r.pos+1))),t.dispatch(i),!1}function $pe(t){if(!(t.selection instanceof Yt))return null;let e=document.createElement("div");return e.className="ProseMirror-gapcursor",Bt.create(t.doc,[hn.widget(t.selection.head,e,{key:"gapcursor"})])}var Hg=200,Rr=function(){};Rr.prototype.append=function(e){return e.length?(e=Rr.from(e),!this.length&&e||e.length<Hg&&this.leafAppend(e)||this.length<Hg&&e.leafPrepend(this)||this.appendInner(e)):this};Rr.prototype.prepend=function(e){return e.length?Rr.from(e).append(this):this};Rr.prototype.appendInner=function(e){return new Upe(this,e)};Rr.prototype.slice=function(e,r){return e===void 0&&(e=0),r===void 0&&(r=this.length),e>=r?Rr.empty:this.sliceInner(Math.max(0,e),Math.min(this.length,r))};Rr.prototype.get=function(e){if(!(e<0||e>=this.length))return this.getInner(e)};Rr.prototype.forEach=function(e,r,n){r===void 0&&(r=0),n===void 0&&(n=this.length),r<=n?this.forEachInner(e,r,n,0):this.forEachInvertedInner(e,r,n,0)};Rr.prototype.map=function(e,r,n){r===void 0&&(r=0),n===void 0&&(n=this.length);var s=[];return this.forEach(function(i,a){return s.push(e(i,a))},r,n),s};Rr.from=function(e){return e instanceof Rr?e:e&&e.length?new NM(e):Rr.empty};var NM=function(t){function e(n){t.call(this),this.values=n}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={length:{configurable:!0},depth:{configurable:!0}};return e.prototype.flatten=function(){return this.values},e.prototype.sliceInner=function(s,i){return s==0&&i==this.length?this:new e(this.values.slice(s,i))},e.prototype.getInner=function(s){return this.values[s]},e.prototype.forEachInner=function(s,i,a,l){for(var c=i;c<a;c++)if(s(this.values[c],l+c)===!1)return!1},e.prototype.forEachInvertedInner=function(s,i,a,l){for(var c=i-1;c>=a;c--)if(s(this.values[c],l+c)===!1)return!1},e.prototype.leafAppend=function(s){if(this.length+s.length<=Hg)return new e(this.values.concat(s.flatten()))},e.prototype.leafPrepend=function(s){if(this.length+s.length<=Hg)return new e(s.flatten().concat(this.values))},r.length.get=function(){return this.values.length},r.depth.get=function(){return 0},Object.defineProperties(e.prototype,r),e}(Rr);Rr.empty=new NM([]);var Upe=function(t){function e(r,n){t.call(this),this.left=r,this.right=n,this.length=r.length+n.length,this.depth=Math.max(r.depth,n.depth)+1}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.flatten=function(){return this.left.flatten().concat(this.right.flatten())},e.prototype.getInner=function(n){return n<this.left.length?this.left.get(n):this.right.get(n-this.left.length)},e.prototype.forEachInner=function(n,s,i,a){var l=this.left.length;if(s<l&&this.left.forEachInner(n,s,Math.min(i,l),a)===!1||i>l&&this.right.forEachInner(n,Math.max(s-l,0),Math.min(this.length,i)-l,a+l)===!1)return!1},e.prototype.forEachInvertedInner=function(n,s,i,a){var l=this.left.length;if(s>l&&this.right.forEachInvertedInner(n,s-l,Math.max(i,l)-l,a+l)===!1||i<l&&this.left.forEachInvertedInner(n,Math.min(s,l),i,a)===!1)return!1},e.prototype.sliceInner=function(n,s){if(n==0&&s==this.length)return this;var i=this.left.length;return s<=i?this.left.slice(n,s):n>=i?this.right.slice(n-i,s-i):this.left.slice(n,i).append(this.right.slice(0,s-i))},e.prototype.leafAppend=function(n){var s=this.right.leafAppend(n);if(s)return new e(this.left,s)},e.prototype.leafPrepend=function(n){var s=this.left.leafPrepend(n);if(s)return new e(s,this.right)},e.prototype.appendInner=function(n){return this.left.depth>=Math.max(this.right.depth,n.depth)+1?new e(this.left,new e(this.right,n)):new e(this,n)},e}(Rr);const Wpe=500;class Rs{constructor(e,r){this.items=e,this.eventCount=r}popEvent(e,r){if(this.eventCount==0)return null;let n=this.items.length;for(;;n--)if(this.items.get(n-1).selection){--n;break}let s,i;r&&(s=this.remapping(n,this.items.length),i=s.maps.length);let a=e.tr,l,c,u=[],d=[];return this.items.forEach((h,p)=>{if(!h.step){s||(s=this.remapping(n,p+1),i=s.maps.length),i--,d.push(h);return}if(s){d.push(new za(h.map));let f=h.step.map(s.slice(i)),m;f&&a.maybeStep(f).doc&&(m=a.mapping.maps[a.mapping.maps.length-1],u.push(new za(m,void 0,void 0,u.length+d.length))),i--,m&&s.appendMap(m,i)}else a.maybeStep(h.step);if(h.selection)return l=s?h.selection.map(s.slice(i)):h.selection,c=new Rs(this.items.slice(0,n).append(d.reverse().concat(u)),this.eventCount-1),!1},this.items.length,0),{remaining:c,transform:a,selection:l}}addTransform(e,r,n,s){let i=[],a=this.eventCount,l=this.items,c=!s&&l.length?l.get(l.length-1):null;for(let d=0;d<e.steps.length;d++){let h=e.steps[d].invert(e.docs[d]),p=new za(e.mapping.maps[d],h,r),f;(f=c&&c.merge(p))&&(p=f,d?i.pop():l=l.slice(0,l.length-1)),i.push(p),r&&(a++,r=void 0),s||(c=p)}let u=a-n.depth;return u>Hpe&&(l=Vpe(l,u),a-=u),new Rs(l.append(i),a)}remapping(e,r){let n=new Lp;return this.items.forEach((s,i)=>{let a=s.mirrorOffset!=null&&i-s.mirrorOffset>=e?n.maps.length-s.mirrorOffset:void 0;n.appendMap(s.map,a)},e,r),n}addMaps(e){return this.eventCount==0?this:new Rs(this.items.append(e.map(r=>new za(r))),this.eventCount)}rebased(e,r){if(!this.eventCount)return this;let n=[],s=Math.max(0,this.items.length-r),i=e.mapping,a=e.steps.length,l=this.eventCount;this.items.forEach(p=>{p.selection&&l--},s);let c=r;this.items.forEach(p=>{let f=i.getMirror(--c);if(f==null)return;a=Math.min(a,f);let m=i.maps[f];if(p.step){let y=e.steps[f].invert(e.docs[f]),k=p.selection&&p.selection.map(i.slice(c+1,f));k&&l++,n.push(new za(m,y,k))}else n.push(new za(m))},s);let u=[];for(let p=r;p<a;p++)u.push(new za(i.maps[p]));let d=this.items.slice(0,s).append(u).append(n),h=new Rs(d,l);return h.emptyItemCount()>Wpe&&(h=h.compress(this.items.length-n.length)),h}emptyItemCount(){let e=0;return this.items.forEach(r=>{r.step||e++}),e}compress(e=this.items.length){let r=this.remapping(0,e),n=r.maps.length,s=[],i=0;return this.items.forEach((a,l)=>{if(l>=e)s.push(a),a.selection&&i++;else if(a.step){let c=a.step.map(r.slice(n)),u=c&&c.getMap();if(n--,u&&r.appendMap(u,n),c){let d=a.selection&&a.selection.map(r.slice(n));d&&i++;let h=new za(u.invert(),c,d),p,f=s.length-1;(p=s.length&&s[f].merge(h))?s[f]=p:s.push(h)}}else a.map&&n--},this.items.length,0),new Rs(Rr.from(s.reverse()),i)}}Rs.empty=new Rs(Rr.empty,0);function Vpe(t,e){let r;return t.forEach((n,s)=>{if(n.selection&&e--==0)return r=s,!1}),t.slice(r)}let za=class CM{constructor(e,r,n,s){this.map=e,this.step=r,this.selection=n,this.mirrorOffset=s}merge(e){if(this.step&&e.step&&!e.selection){let r=e.step.merge(this.step);if(r)return new CM(r.getMap().invert(),r,this.selection)}}};class Ua{constructor(e,r,n,s,i){this.done=e,this.undone=r,this.prevRanges=n,this.prevTime=s,this.prevComposition=i}}const Hpe=20;function qpe(t,e,r,n){let s=r.getMeta(tc),i;if(s)return s.historyState;r.getMeta(Zpe)&&(t=new Ua(t.done,t.undone,null,0,-1));let a=r.getMeta("appendedTransaction");if(r.steps.length==0)return t;if(a&&a.getMeta(tc))return a.getMeta(tc).redo?new Ua(t.done.addTransform(r,void 0,n,c0(e)),t.undone,Q5(r.mapping.maps),t.prevTime,t.prevComposition):new Ua(t.done,t.undone.addTransform(r,void 0,n,c0(e)),null,t.prevTime,t.prevComposition);if(r.getMeta("addToHistory")!==!1&&!(a&&a.getMeta("addToHistory")===!1)){let l=r.getMeta("composition"),c=t.prevTime==0||!a&&t.prevComposition!=l&&(t.prevTime<(r.time||0)-n.newGroupDelay||!Kpe(r,t.prevRanges)),u=a?Yw(t.prevRanges,r.mapping):Q5(r.mapping.maps);return new Ua(t.done.addTransform(r,c?e.selection.getBookmark():void 0,n,c0(e)),Rs.empty,u,r.time,l??t.prevComposition)}else return(i=r.getMeta("rebased"))?new Ua(t.done.rebased(r,i),t.undone.rebased(r,i),Yw(t.prevRanges,r.mapping),t.prevTime,t.prevComposition):new Ua(t.done.addMaps(r.mapping.maps),t.undone.addMaps(r.mapping.maps),Yw(t.prevRanges,r.mapping),t.prevTime,t.prevComposition)}function Kpe(t,e){if(!e)return!1;if(!t.docChanged)return!0;let r=!1;return t.mapping.maps[0].forEach((n,s)=>{for(let i=0;i<e.length;i+=2)n<=e[i+1]&&s>=e[i]&&(r=!0)}),r}function Q5(t){let e=[];for(let r=t.length-1;r>=0&&e.length==0;r--)t[r].forEach((n,s,i,a)=>e.push(i,a));return e}function Yw(t,e){if(!t)return null;let r=[];for(let n=0;n<t.length;n+=2){let s=e.map(t[n],1),i=e.map(t[n+1],-1);s<=i&&r.push(s,i)}return r}function Gpe(t,e,r){let n=c0(e),s=tc.get(e).spec.config,i=(r?t.undone:t.done).popEvent(e,n);if(!i)return null;let a=i.selection.resolve(i.transform.doc),l=(r?t.done:t.undone).addTransform(i.transform,e.selection.getBookmark(),s,n),c=new Ua(r?l:i.remaining,r?i.remaining:l,null,0,-1);return i.transform.setSelection(a).setMeta(tc,{redo:r,historyState:c})}let Jw=!1,eT=null;function c0(t){let e=t.plugins;if(eT!=e){Jw=!1,eT=e;for(let r=0;r<e.length;r++)if(e[r].spec.historyPreserveItems){Jw=!0;break}}return Jw}const tc=new Lr("history"),Zpe=new Lr("closeHistory");function Ype(t={}){return t={depth:t.depth||100,newGroupDelay:t.newGroupDelay||500},new er({key:tc,state:{init(){return new Ua(Rs.empty,Rs.empty,null,0,-1)},apply(e,r,n){return qpe(r,n,e,t)}},config:t,props:{handleDOMEvents:{beforeinput(e,r){let n=r.inputType,s=n=="historyUndo"?TM:n=="historyRedo"?AM:null;return s?(r.preventDefault(),s(e.state,e.dispatch)):!1}}}})}function EM(t,e){return(r,n)=>{let s=tc.getState(r);if(!s||(t?s.undone:s.done).eventCount==0)return!1;if(n){let i=Gpe(s,r,t);i&&n(e?i.scrollIntoView():i)}return!0}}const TM=EM(!1,!0),AM=EM(!0,!0);xr.create({name:"characterCount",addOptions(){return{limit:null,mode:"textSize",textCounter:t=>t.length,wordCounter:t=>t.split(" ").filter(e=>e!=="").length}},addStorage(){return{characters:()=>0,words:()=>0}},onBeforeCreate(){this.storage.characters=t=>{const e=(t==null?void 0:t.node)||this.editor.state.doc;if(((t==null?void 0:t.mode)||this.options.mode)==="textSize"){const n=e.textBetween(0,e.content.size,void 0," ");return this.options.textCounter(n)}return e.nodeSize},this.storage.words=t=>{const e=(t==null?void 0:t.node)||this.editor.state.doc,r=e.textBetween(0,e.content.size," "," ");return this.options.wordCounter(r)}},addProseMirrorPlugins(){let t=!1;return[new er({key:new Lr("characterCount"),appendTransaction:(e,r,n)=>{if(t)return;const s=this.options.limit;if(s==null||s===0){t=!0;return}const i=this.storage.characters({node:n.doc});if(i>s){const a=i-s,l=0,c=a;console.warn(`[CharacterCount] Initial content exceeded limit of ${s} characters. Content was automatically trimmed.`);const u=n.tr.deleteRange(l,c);return t=!0,u}t=!0},filterTransaction:(e,r)=>{const n=this.options.limit;if(!e.docChanged||n===0||n===null||n===void 0)return!0;const s=this.storage.characters({node:r.doc}),i=this.storage.characters({node:e.doc});if(i<=n||s>n&&i>n&&i<=s)return!0;if(s>n&&i>n&&i>s||!e.getMeta("paste"))return!1;const l=e.selection.$head.pos,c=i-n,u=l-c,d=l;return e.deleteRange(u,d),!(this.storage.characters({node:e.doc})>n)}})]}});var Jpe=xr.create({name:"dropCursor",addOptions(){return{color:"currentColor",width:1,class:void 0}},addProseMirrorPlugins(){return[Ipe(this.options)]}});xr.create({name:"focus",addOptions(){return{className:"has-focus",mode:"all"}},addProseMirrorPlugins(){return[new er({key:new Lr("focus"),props:{decorations:({doc:t,selection:e})=>{const{isEditable:r,isFocused:n}=this.editor,{anchor:s}=e,i=[];if(!r||!n)return Bt.create(t,[]);let a=0;this.options.mode==="deepest"&&t.descendants((c,u)=>{if(c.isText)return;if(!(s>=u&&s<=u+c.nodeSize-1))return!1;a+=1});let l=0;return t.descendants((c,u)=>{if(c.isText||!(s>=u&&s<=u+c.nodeSize-1))return!1;if(l+=1,this.options.mode==="deepest"&&a-l>0||this.options.mode==="shallowest"&&l>1)return this.options.mode==="deepest";i.push(hn.node(u,u+c.nodeSize,{class:this.options.className}))}),Bt.create(t,i)}}})]}});var Xpe=xr.create({name:"gapCursor",addProseMirrorPlugins(){return[Mpe()]},extendNodeSchema(t){var e;const r={name:t.name,options:t.options,storage:t.storage};return{allowGapCursor:(e=kt(Ue(t,"allowGapCursor",r)))!=null?e:null}}}),Qpe=xr.create({name:"placeholder",addOptions(){return{emptyEditorClass:"is-editor-empty",emptyNodeClass:"is-empty",placeholder:"Write something …",showOnlyWhenEditable:!0,showOnlyCurrent:!0,includeChildren:!1}},addProseMirrorPlugins(){return[new er({key:new Lr("placeholder"),props:{decorations:({doc:t,selection:e})=>{const r=this.editor.isEditable||!this.options.showOnlyWhenEditable,{anchor:n}=e,s=[];if(!r)return null;const i=this.editor.isEmpty;return t.descendants((a,l)=>{const c=n>=l&&n<=l+a.nodeSize,u=!a.isLeaf&&sx(a);if((c||!this.options.showOnlyCurrent)&&u){const d=[this.options.emptyNodeClass];i&&d.push(this.options.emptyEditorClass);const h=hn.node(l,l+a.nodeSize,{class:d.join(" "),"data-placeholder":typeof this.options.placeholder=="function"?this.options.placeholder({editor:this.editor,node:a,pos:l,hasAnchor:c}):this.options.placeholder});s.push(h)}return this.options.includeChildren}),Bt.create(t,s)}}})]}});xr.create({name:"selection",addOptions(){return{className:"selection"}},addProseMirrorPlugins(){const{editor:t,options:e}=this;return[new er({key:new Lr("selection"),props:{decorations(r){return r.selection.empty||t.isFocused||!t.isEditable||$L(r.selection)||t.view.dragging?null:Bt.create(r.doc,[hn.inline(r.selection.from,r.selection.to,{class:e.className})])}}})]}});function tT({types:t,node:e}){return e&&Array.isArray(t)&&t.includes(e.type)||(e==null?void 0:e.type)===t}var efe=xr.create({name:"trailingNode",addOptions(){return{node:void 0,notAfter:[]}},addProseMirrorPlugins(){var t;const e=new Lr(this.name),r=((t=this.editor.schema.topNodeType.contentMatch.defaultType)==null?void 0:t.name)||this.options.node||"paragraph",n=Object.entries(this.editor.schema.nodes).map(([,s])=>s).filter(s=>(this.options.notAfter||[]).concat(r).includes(s.name));return[new er({key:e,appendTransaction:(s,i,a)=>{const{doc:l,tr:c,schema:u}=a,d=e.getState(a),h=l.content.size,p=u.nodes[r];if(d)return c.insert(h,p.create())},state:{init:(s,i)=>{const a=i.tr.doc.lastChild;
921return!tT({node:a,types:n})},apply:(s,i)=>{if(!s.docChanged)return i;const a=s.doc.lastChild;return!tT({node:a,types:n})}}})]}}),tfe=xr.create({name:"undoRedo",addOptions(){return{depth:100,newGroupDelay:500}},addCommands(){return{undo:()=>({state:t,dispatch:e})=>TM(t,e),redo:()=>({state:t,dispatch:e})=>AM(t,e)}},addProseMirrorPlugins(){return[Ype(this.options)]},addKeyboardShortcuts(){return{"Mod-z":()=>this.editor.commands.undo(),"Shift-Mod-z":()=>this.editor.commands.redo(),"Mod-y":()=>this.editor.commands.redo(),"Mod-я":()=>this.editor.commands.undo(),"Shift-Mod-я":()=>this.editor.commands.redo()}}}),rfe=xr.create({name:"starterKit",addExtensions(){var t,e,r,n;const s=[];return this.options.bold!==!1&&s.push(The.configure(this.options.bold)),this.options.blockquote!==!1&&s.push(jhe.configure(this.options.blockquote)),this.options.bulletList!==!1&&s.push(fM.configure(this.options.bulletList)),this.options.code!==!1&&s.push(Phe.configure(this.options.code)),this.options.codeBlock!==!1&&s.push(Ohe.configure(this.options.codeBlock)),this.options.document!==!1&&s.push(Rhe.configure(this.options.document)),this.options.dropcursor!==!1&&s.push(Jpe.configure(this.options.dropcursor)),this.options.gapcursor!==!1&&s.push(Xpe.configure(this.options.gapcursor)),this.options.hardBreak!==!1&&s.push(Lhe.configure(this.options.hardBreak)),this.options.heading!==!1&&s.push(Mhe.configure(this.options.heading)),this.options.undoRedo!==!1&&s.push(tfe.configure(this.options.undoRedo)),this.options.horizontalRule!==!1&&s.push(Dhe.configure(this.options.horizontalRule)),this.options.italic!==!1&&s.push(Whe.configure(this.options.italic)),this.options.listItem!==!1&&s.push(mM.configure(this.options.listItem)),this.options.listKeymap!==!1&&s.push(kM.configure((t=this.options)==null?void 0:t.listKeymap)),this.options.link!==!1&&s.push(fpe.configure((e=this.options)==null?void 0:e.link)),this.options.orderedList!==!1&&s.push(jM.configure(this.options.orderedList)),this.options.paragraph!==!1&&s.push(Epe.configure(this.options.paragraph)),this.options.strike!==!1&&s.push(zpe.configure(this.options.strike)),this.options.text!==!1&&s.push(Ppe.configure(this.options.text)),this.options.underline!==!1&&s.push(_pe.configure((r=this.options)==null?void 0:r.underline)),this.options.trailingNode!==!1&&s.push(efe.configure((n=this.options)==null?void 0:n.trailingNode)),s}}),zM=rfe,nfe=Qpe,sfe=Object.defineProperty,ife=Object.defineProperties,afe=Object.getOwnPropertyDescriptors,rT=Object.getOwnPropertySymbols,ofe=Object.prototype.hasOwnProperty,lfe=Object.prototype.propertyIsEnumerable,y2=(t,e,r)=>e in t?sfe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,ot=(t,e)=>{for(var r in e||(e={}))ofe.call(e,r)&&y2(t,r,e[r]);if(rT)for(var r of rT(e))lfe.call(e,r)&&y2(t,r,e[r]);return t},cd=(t,e)=>ife(t,afe(e)),be=(t,e,r)=>y2(t,typeof e!="symbol"?e+"":e,r),cfe=(t,e,r)=>new Promise((n,s)=>{var i=c=>{try{l(r.next(c))}catch(u){s(u)}},a=c=>{try{l(r.throw(c))}catch(u){s(u)}},l=c=>c.done?n(c.value):Promise.resolve(c.value).then(i,a);l((r=r.apply(t,e)).next())});class qg{constructor(e){be(this,"rootKey"),this.rootKey=e}}const ufe=Object.seal({});class ve extends qg{constructor(e){super(e),be(this,"root"),this.root=new Array}prepForXml(e){var r;e.stack.push(this);const n=this.root.map(s=>s instanceof qg?s.prepForXml(e):s).filter(s=>s!==void 0);return e.stack.pop(),{[this.rootKey]:n.length?n.length===1&&((r=n[0])!=null&&r._attr)?n[0]:n:ufe}}addChildElement(e){return this.root.push(e),this}}class lx extends ve{prepForXml(e){const r=super.prepForXml(e);if(r&&(typeof r[this.rootKey]!="object"||Object.keys(r[this.rootKey]).length))return r}}class Ke extends qg{constructor(e){super("_attr"),be(this,"xmlKeys"),this.root=e}prepForXml(e){const r={};return Object.entries(this.root).forEach(([n,s])=>{if(s!==void 0){const i=this.xmlKeys&&this.xmlKeys[n]||n;r[i]=s}}),{_attr:r}}}class cx extends qg{constructor(e){super("_attr"),this.root=e}prepForXml(e){return{_attr:Object.values(this.root).filter(({value:n})=>n!==void 0).reduce((n,{key:s,value:i})=>cd(ot({},n),{[s]:i}),{})}}}class ar extends Ke{constructor(){super(...arguments),be(this,"xmlKeys",{val:"w:val",color:"w:color",fill:"w:fill",space:"w:space",sz:"w:sz",type:"w:type",rsidR:"w:rsidR",rsidRPr:"w:rsidRPr",rsidSect:"w:rsidSect",w:"w:w",h:"w:h",top:"w:top",right:"w:right",bottom:"w:bottom",left:"w:left",header:"w:header",footer:"w:footer",gutter:"w:gutter",linePitch:"w:linePitch",pos:"w:pos"})}}var vi=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 Xw={},vm={exports:{}},nT;function NN(){if(nT)return vm.exports;nT=1;var t=typeof Reflect=="object"?Reflect:null,e=t&&typeof t.apply=="function"?t.apply:function(v,A,C){return Function.prototype.apply.call(v,A,C)},r;t&&typeof t.ownKeys=="function"?r=t.ownKeys:Object.getOwnPropertySymbols?r=function(v){return Object.getOwnPropertyNames(v).concat(Object.getOwnPropertySymbols(v))}:r=function(v){return Object.getOwnPropertyNames(v)};function n(b){console&&console.warn&&console.warn(b)}var s=Number.isNaN||function(v){return v!==v};function i(){i.init.call(this)}vm.exports=i,vm.exports.once=g,i.EventEmitter=i,i.prototype._events=void 0,i.prototype._eventsCount=0,i.prototype._maxListeners=void 0;var a=10;function l(b){if(typeof b!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof b)}Object.defineProperty(i,"defaultMaxListeners",{enumerable:!0,get:function(){return a}
vendor: 4,651 bytes, line 921
921,set:function(b){if(typeof b!="number"||b<0||s(b))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+b+".");a=b}}),i.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},i.prototype.setMaxListeners=function(v){if(typeof v!="number"||v<0||s(v))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+v+".");return this._maxListeners=v,this};function c(b){return b._maxListeners===void 0?i.defaultMaxListeners:b._maxListeners}i.prototype.getMaxListeners=function(){return c(this)},i.prototype.emit=function(v){for(var A=[],C=1;C<arguments.length;C++)A.push(arguments[C]);var _=v==="error",N=this._events;if(N!==void 0)_=_&&N.error===void 0;else if(!_)return!1;if(_){var W;if(A.length>0&&(W=A[0]),W instanceof Error)throw W;var K=new Error("Unhandled error."+(W?" ("+W.message+")":""));throw K.context=W,K}var T=N[v];if(T===void 0)return!1;if(typeof T=="function")e(T,this,A);else for(var F=T.length,E=m(T,F),C=0;C<F;++C)e(E[C],this,A);return!0};function u(b,v,A,C){var _,N,W;if(l(A),N=b._events,N===void 0?(N=b._events=Object.create(null),b._eventsCount=0):(N.newListener!==void 0&&(b.emit("newListener",v,A.listener?A.listener:A),N=b._events),W=N[v]),W===void 0)W=N[v]=A,++b._eventsCount;else if(typeof W=="function"?W=N[v]=C?[A,W]:[W,A]:C?W.unshift(A):W.push(A),_=c(b),_>0&&W.length>_&&!W.warned){W.warned=!0;var K=new Error("Possible EventEmitter memory leak detected. "+W.length+" "+String(v)+" listeners added. Use emitter.setMaxListeners() to increase limit");K.name="MaxListenersExceededWarning",K.emitter=b,K.type=v,K.count=W.length,n(K)}return b}i.prototype.addListener=function(v,A){return u(this,v,A,!1)},i.prototype.on=i.prototype.addListener,i.prototype.prependListener=function(v,A){return u(this,v,A,!0)};function d(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function h(b,v,A){var C={fired:!1,wrapFn:void 0,target:b,type:v,listener:A},_=d.bind(C);return _.listener=A,C.wrapFn=_,_}i.prototype.once=function(v,A){return l(A),this.on(v,h(this,v,A)),this},i.prototype.prependOnceListener=function(v,A){return l(A),this.prependListener(v,h(this,v,A)),this},i.prototype.removeListener=function(v,A){var C,_,N,W,K;if(l(A),_=this._events,_===void 0)return this;if(C=_[v],C===void 0)return this;if(C===A||C.listener===A)--this._eventsCount===0?this._events=Object.create(null):(delete _[v],_.removeListener&&this.emit("removeListener",v,C.listener||A));else if(typeof C!="function"){for(N=-1,W=C.length-1;W>=0;W--)if(C[W]===A||C[W].listener===A){K=C[W].listener,N=W;break}if(N<0)return this;N===0?C.shift():y(C,N),C.length===1&&(_[v]=C[0]),_.removeListener!==void 0&&this.emit("removeListener",v,K||A)}return this},i.prototype.off=i.prototype.removeListener,i.prototype.removeAllListeners=function(v){var A,C,_;if(C=this._events,C===void 0)return this;if(C.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):C[v]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete C[v]),this;if(arguments.length===0){var N=Object.keys(C),W;for(_=0;_<N.length;++_)W=N[_],W!=="removeListener"&&this.removeAllListeners(W);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(A=C[v],typeof A=="function")this.removeListener(v,A);else if(A!==void 0)for(_=A.length-1;_>=0;_--)this.removeListener(v,A[_]);return this};function p(b,v,A){var C=b._events;if(C===void 0)return[];var _=C[v];return _===void 0?[]:typeof _=="function"?A?[_.listener||_]:[_]:A?k(_):m(_,_.length)}i.prototype.listeners=function(v){return p(this,v,!0)},i.prototype.rawListeners=function(v){return p(this,v,!1)},i.listenerCount=function(b,v){return typeof b.listenerCount=="function"?b.listenerCount(v):f.call(b,v)},i.prototype.listenerCount=f;function f(b){var v=this._events;if(v!==void 0){var A=v[b];if(typeof A=="function")return 1;if(A!==void 0)return A.length}return 0}i.prototype.eventNames=function(){return this._eventsCount>0?r(this._events):[]};function m(b,v){for(var A=new Array(v),C=0;C<v;++C)A[C]=b[C];return A}function y(b,v){for(;v+1<b.length;v++)b[v]=b[v+1];b.pop()}function k(b){for(var v=new Array(b.length),A=0;A<v.length;++A)v[A]=b[A].listener||b[A];return v}function g(b,v){return new Promise(function(A,C){function _(W){b.removeListener(v,N),
vendor: 4,202 bytes, line 921
921C(W)}function N(){typeof b.removeListener=="function"&&b.removeListener("error",_),A([].slice.call(arguments))}w(b,v,N,{once:!0}),v!=="error"&&x(b,_,{once:!0})})}function x(b,v,A){typeof b.on=="function"&&w(b,"error",v,A)}function w(b,v,A,C){if(typeof b.on=="function")C.once?b.once(v,A):b.on(v,A);else if(typeof b.addEventListener=="function")b.addEventListener(v,function _(N){C.once&&b.removeEventListener(v,_),A(N)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof b)}return vm.exports}var jm={exports:{}},sT;function tl(){return sT||(sT=1,typeof Object.create=="function"?jm.exports=function(e,r){r&&(e.super_=r,e.prototype=Object.create(r.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:jm.exports=function(e,r){if(r){e.super_=r;var n=function(){};n.prototype=r.prototype,e.prototype=new n,e.prototype.constructor=e}}),jm.exports}function dfe(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var _M={exports:{}},or=_M.exports={},ci,ui;function x2(){throw new Error("setTimeout has not been defined")}function w2(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?ci=setTimeout:ci=x2}catch{ci=x2}try{typeof clearTimeout=="function"?ui=clearTimeout:ui=w2}catch{ui=w2}})();function IM(t){if(ci===setTimeout)return setTimeout(t,0);if((ci===x2||!ci)&&setTimeout)return ci=setTimeout,setTimeout(t,0);try{return ci(t,0)}catch{try{return ci.call(null,t,0)}catch{return ci.call(this,t,0)}}}function hfe(t){if(ui===clearTimeout)return clearTimeout(t);if((ui===w2||!ui)&&clearTimeout)return ui=clearTimeout,clearTimeout(t);try{return ui(t)}catch{try{return ui.call(null,t)}catch{return ui.call(this,t)}}}var ra=[],Cu=!1,Ol,u0=-1;function pfe(){!Cu||!Ol||(Cu=!1,Ol.length?ra=Ol.concat(ra):u0=-1,ra.length&&OM())}function OM(){if(!Cu){var t=IM(pfe);Cu=!0;for(var e=ra.length;e;){for(Ol=ra,ra=[];++u0<e;)Ol&&Ol[u0].run();u0=-1,e=ra.length}Ol=null,Cu=!1,hfe(t)}}or.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)e[r-1]=arguments[r];ra.push(new RM(t,e)),ra.length===1&&!Cu&&IM(OM)};function RM(t,e){this.fun=t,this.array=e}RM.prototype.run=function(){this.fun.apply(null,this.array)};or.title="browser";or.browser=!0;or.env={};or.argv=[];or.version="";or.versions={};function ja(){}or.on=ja;or.addListener=ja;or.once=ja;or.off=ja;or.removeListener=ja;or.removeAllListeners=ja;or.emit=ja;or.prependListener=ja;or.prependOnceListener=ja;or.listeners=function(t){return[]};or.binding=function(t){throw new Error("process.binding is not supported")};or.cwd=function(){return"/"};or.chdir=function(t){throw new Error("process.chdir is not supported")};or.umask=function(){return 0};var ffe=_M.exports;const nt=dfe(ffe);var Qw,iT;function LM(){return iT||(iT=1,Qw=NN().EventEmitter),Qw}var eb={},ah={},aT;function mfe(){if(aT)return ah;aT=1,ah.byteLength=l,ah.toByteArray=u,ah.fromByteArray=p;for(var t=[],e=[],r=typeof Uint8Array<"u"?Uint8Array:Array,n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0,i=n.length;s<i;++s)t[s]=n[s],e[n.charCodeAt(s)]=s;e[45]=62,e[95]=63;function a(f){var m=f.length;if(m%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var y=f.indexOf("=");y===-1&&(y=m);var k=y===m?0:4-y%4;return[y,k]}function l(f){var m=a(f),y=m[0],k=m[1];return(y+k)*3/4-k}function c(f,m,y){return(m+y)*3/4-y}function u(f){var m,y=a(f),k=y[0],g=y[1],x=new r(c(f,k,g)),w=0,b=g>0?k-4:k,v;for(v=0;v<b;v+=4)m=e[f.charCodeAt(v)]<<18|e[f.charCodeAt(v+1)]<<12|e[f.charCodeAt(v+2)]<<6|e[f.charCodeAt(v+3)],x[w++]=m>>16&255,x[w++]=m>>8&255,x[w++]=m&255;return g===2&&(m=e[f.charCodeAt(v)]<<2|e[f.charCodeAt(v+1)]>>4,x[w++]=m&255),g===1&&(m=e[f.charCodeAt(v)]<<10|e[f.charCodeAt(v+1)]<<4|e[f.charCodeAt(v+2)]>>2,x[w++]=m>>8&255,x[w++]=m&255),x}function d(f){return t[f>>18&63]+t[f>>12&63]+t[f>>6&63]+t[f&63]}function h(f,m,y){for(var k,g=[],x=m;x<y;x+=3)k=(f[x]<<16&16711680)+(f[x+1]<<8&65280)+(f[x+2]&255),g.push(d(k));return g.join("")}function p(f){for(var m,y=f.length,k=y%3,g=[],x=16383,w=0,b=y-k;w<b;w+=x)g.push(h(f,w,w+x>b?b:w+x));
vendor: 4,066 bytes, lines 921-926
921return k===1?(m=f[y-1],g.push(t[m>>2]+t[m<<4&63]+"==")):k===2&&(m=(f[y-2]<<8)+f[y-1],g.push(t[m>>10]+t[m>>4&63]+t[m<<2&63]+"=")),g.join("")}return ah}var Sm={};/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */var oT;function gfe(){return oT||(oT=1,Sm.read=function(t,e,r,n,s){var i,a,l=s*8-n-1,c=(1<<l)-1,u=c>>1,d=-7,h=r?s-1:0,p=r?-1:1,f=t[e+h];for(h+=p,i=f&(1<<-d)-1,f>>=-d,d+=l;d>0;i=i*256+t[e+h],h+=p,d-=8);for(a=i&(1<<-d)-1,i>>=-d,d+=n;d>0;a=a*256+t[e+h],h+=p,d-=8);if(i===0)i=1-u;else{if(i===c)return a?NaN:(f?-1:1)*(1/0);a=a+Math.pow(2,n),i=i-u}return(f?-1:1)*a*Math.pow(2,i-n)},Sm.write=function(t,e,r,n,s,i){var a,l,c,u=i*8-s-1,d=(1<<u)-1,h=d>>1,p=s===23?Math.pow(2,-24)-Math.pow(2,-77):0,f=n?0:i-1,m=n?1:-1,y=e<0||e===0&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(l=isNaN(e)?1:0,a=d):(a=Math.floor(Math.log(e)/Math.LN2),e*(c=Math.pow(2,-a))<1&&(a--,c*=2),a+h>=1?e+=p/c:e+=p*Math.pow(2,1-h),e*c>=2&&(a++,c/=2),a+h>=d?(l=0,a=d):a+h>=1?(l=(e*c-1)*Math.pow(2,s),a=a+h):(l=e*Math.pow(2,h-1)*Math.pow(2,s),a=0));s>=8;t[r+f]=l&255,f+=m,l/=256,s-=8);for(a=a<<s|l,u+=s;u>0;t[r+f]=a&255,f+=m,a/=256,u-=8);t[r+f-m]|=y*128}),Sm}/*!
922 * The buffer module from node.js, for the browser.
923 *
924 * @author   Feross Aboukhadijeh <https://feross.org>
925 * @license  MIT
926 */var lT;function ux(){return lT||(lT=1,function(t){var e=mfe(),r=gfe(),n=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;t.Buffer=l,t.SlowBuffer=x,t.INSPECT_MAX_BYTES=50;var s=2147483647;t.kMaxLength=s,l.TYPED_ARRAY_SUPPORT=i(),!l.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function i(){try{var R=new Uint8Array(1),j={foo:function(){return 42}};return Object.setPrototypeOf(j,Uint8Array.prototype),Object.setPrototypeOf(R,j),R.foo()===42}catch{return!1}}Object.defineProperty(l.prototype,"parent",{enumerable:!0,get:function(){if(l.isBuffer(this))return this.buffer}}),Object.defineProperty(l.prototype,"offset",{enumerable:!0,get:function(){if(l.isBuffer(this))return this.byteOffset}});function a(R){if(R>s)throw new RangeError('The value "'+R+'" is invalid for option "size"');var j=new Uint8Array(R);return Object.setPrototypeOf(j,l.prototype),j}function l(R,j,S){if(typeof R=="number"){if(typeof j=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return h(R)}return c(R,j,S)}l.poolSize=8192;function c(R,j,S){if(typeof R=="string")return p(R,j);if(ArrayBuffer.isView(R))return m(R);if(R==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof R);if(me(R,ArrayBuffer)||R&&me(R.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(me(R,SharedArrayBuffer)||R&&me(R.buffer,SharedArrayBuffer)))return y(R,j,S);if(typeof R=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');var P=R.valueOf&&R.valueOf();if(P!=null&&P!==R)return l.from(P,j,S);var L=k(R);if(L)return L;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof R[Symbol.toPrimitive]=="function")return l.from(R[Symbol.toPrimitive]("string"),j,S);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof R)}l.from=function(R,j,S){return c(R,j,S)},Object.setPrototypeOf(l.prototype,Uint8Array.prototype),Object.setPrototypeOf(l,Uint8Array);function u(R){if(typeof R!="number")throw new TypeError('"size" argument must be of type number');if(R<0)throw new RangeError('The value "'+R+'" is invalid for option "size"')}function d(R,j,S){return u(R),R<=0?a(R):j!==void 0?typeof S=="string"?a(R).fill(j,S):a(R).fill(j):a(R)}l.alloc=function(R,j,S){return d(R,j,S)};function h(R){return u(R),a(R<0?0:g(R)|0)}l.allocUnsafe=function(R){return h(R)},l.allocUnsafeSlow=function(R){return h(R)};
vendor: 8,812 bytes, line 926
926function p(R,j){if((typeof j!="string"||j==="")&&(j="utf8"),!l.isEncoding(j))throw new TypeError("Unknown encoding: "+j);var S=w(R,j)|0,P=a(S),L=P.write(R,j);return L!==S&&(P=P.slice(0,L)),P}function f(R){for(var j=R.length<0?0:g(R.length)|0,S=a(j),P=0;P<j;P+=1)S[P]=R[P]&255;return S}function m(R){if(me(R,Uint8Array)){var j=new Uint8Array(R);return y(j.buffer,j.byteOffset,j.byteLength)}return f(R)}function y(R,j,S){if(j<0||R.byteLength<j)throw new RangeError('"offset" is outside of buffer bounds');if(R.byteLength<j+(S||0))throw new RangeError('"length" is outside of buffer bounds');var P;return j===void 0&&S===void 0?P=new Uint8Array(R):S===void 0?P=new Uint8Array(R,j):P=new Uint8Array(R,j,S),Object.setPrototypeOf(P,l.prototype),P}function k(R){if(l.isBuffer(R)){var j=g(R.length)|0,S=a(j);return S.length===0||R.copy(S,0,0,j),S}if(R.length!==void 0)return typeof R.length!="number"||z(R.length)?a(0):f(R);if(R.type==="Buffer"&&Array.isArray(R.data))return f(R.data)}function g(R){if(R>=s)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s.toString(16)+" bytes");return R|0}function x(R){return+R!=R&&(R=0),l.alloc(+R)}l.isBuffer=function(j){return j!=null&&j._isBuffer===!0&&j!==l.prototype},l.compare=function(j,S){if(me(j,Uint8Array)&&(j=l.from(j,j.offset,j.byteLength)),me(S,Uint8Array)&&(S=l.from(S,S.offset,S.byteLength)),!l.isBuffer(j)||!l.isBuffer(S))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(j===S)return 0;for(var P=j.length,L=S.length,V=0,U=Math.min(P,L);V<U;++V)if(j[V]!==S[V]){P=j[V],L=S[V];break}return P<L?-1:L<P?1:0},l.isEncoding=function(j){switch(String(j).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},l.concat=function(j,S){if(!Array.isArray(j))throw new TypeError('"list" argument must be an Array of Buffers');if(j.length===0)return l.alloc(0);var P;if(S===void 0)for(S=0,P=0;P<j.length;++P)S+=j[P].length;var L=l.allocUnsafe(S),V=0;for(P=0;P<j.length;++P){var U=j[P];if(me(U,Uint8Array))V+U.length>L.length?l.from(U).copy(L,V):Uint8Array.prototype.set.call(L,U,V);else if(l.isBuffer(U))U.copy(L,V);else throw new TypeError('"list" argument must be an Array of Buffers');V+=U.length}return L};function w(R,j){if(l.isBuffer(R))return R.length;if(ArrayBuffer.isView(R)||me(R,ArrayBuffer))return R.byteLength;if(typeof R!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof R);var S=R.length,P=arguments.length>2&&arguments[2]===!0;if(!P&&S===0)return 0;for(var L=!1;;)switch(j){case"ascii":case"latin1":case"binary":return S;case"utf8":case"utf-8":return I(R).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return S*2;case"hex":return S>>>1;case"base64":return q(R).length;default:if(L)return P?-1:I(R).length;j=(""+j).toLowerCase(),L=!0}}l.byteLength=w;function b(R,j,S){var P=!1;if((j===void 0||j<0)&&(j=0),j>this.length||((S===void 0||S>this.length)&&(S=this.length),S<=0)||(S>>>=0,j>>>=0,S<=j))return"";for(R||(R="utf8");;)switch(R){case"hex":return J(this,j,S);case"utf8":case"utf-8":return E(this,j,S);case"ascii":return $(this,j,S);case"latin1":case"binary":return D(this,j,S);case"base64":return F(this,j,S);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return de(this,j,S);default:if(P)throw new TypeError("Unknown encoding: "+R);R=(R+"").toLowerCase(),P=!0}}l.prototype._isBuffer=!0;function v(R,j,S){var P=R[j];R[j]=R[S],R[S]=P}l.prototype.swap16=function(){var j=this.length;if(j%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var S=0;S<j;S+=2)v(this,S,S+1);return this},l.prototype.swap32=function(){var j=this.length;if(j%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var S=0;S<j;S+=4)v(this,S,S+3),v(this,S+1,S+2);return this},l.prototype.swap64=function(){var j=this.length;if(j%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var S=0;S<j;S+=8)v(this,S,S+7),v(this,S+1,S+6),v(this,S+2,S+5),v(this,S+3,S+4);return this},l.prototype.toString=function(){var j=this.length;return j===0?"":arguments.length===0?E(this,0,j):b.apply(this,arguments)},l.prototype.toLocaleString=l.prototype.toString,l.prototype.equals=function(j){if(!l.isBuffer(j))throw new TypeError("Argument must be a Buffer");return this===j?!0:l.compare(this,j)===0},l.prototype.inspect=function(){var j="",S=t.INSPECT_MAX_BYTES;return j=this.toString("hex",0,S).replace(/(.{2})/g,"$1 ").trim(),this.length>S&&(j+=" ... "),"<Buffer "+j+">"},n&&(l.prototype[n]=l.prototype.inspect),l.prototype.compare=function(j,S,P,L,V){if(me(j,Uint8Array)&&(j=l.from(j,j.offset,j.byteLength)),!l.isBuffer(j))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof j);if(S===void 0&&(S=0),P===void 0&&(P=j?j.length:0),L===void 0&&(L=0),V===void 0&&(V=this.length),S<0||P>j.length||L<0||V>this.length)throw new RangeError("out of range index");if(L>=V&&S>=P)return 0;if(L>=V)return-1;if(S>=P)return 1;if(S>>>=0,P>>>=0,L>>>=0,V>>>=0,this===j)return 0;for(var U=V-L,oe=P-S,ce=Math.min(U,oe),X=this.slice(L,V),he=j.slice(S,P),we=0;we<ce;++we)if(X[we]!==he[we]){U=X[we],oe=he[we];break}return U<oe?-1:oe<U?1:0};function A(R,j,S,P,L){if(R.length===0)return-1;if(typeof S=="string"?(P=S,S=0):S>2147483647?S=2147483647:S<-2147483648&&(S=-2147483648),S=+S,z(S)&&(S=L?0:R.length-1),S<0&&(S=R.length+S),S>=R.length){if(L)return-1;S=R.length-1}else if(S<0)if(L)S=0;else return-1;if(typeof j=="string"&&(j=l.from(j,P)),l.isBuffer(j))return j.length===0?-1:C(R,j,S,P,L);if(typeof j=="number")return j=j&255,typeof Uint8Array.prototype.indexOf=="function"?L?Uint8Array.prototype.indexOf.call(R,j,S):Uint8Array.prototype.lastIndexOf.call(R,j,S):C(R,[j],S,P,L);throw new TypeError("val must be string, number or Buffer")}function C(R,j,S,P,L){var V=1,U=R.length,oe=j.length;if(P!==void 0&&(P=String(P).toLowerCase(),P==="ucs2"||P==="ucs-2"||P==="utf16le"||P==="utf-16le")){if(R.length<2||j.length<2)return-1;V=2,U/=2,oe/=2,S/=2}function ce(Ye,bt){return V===1?Ye[bt]:Ye.readUInt16BE(bt*V)}var X;if(L){var he=-1;for(X=S;X<U;X++)if(ce(R,X)===ce(j,he===-1?0:X-he)){if(he===-1&&(he=X),X-he+1===oe)return he*V}else he!==-1&&(X-=X-he),he=-1}else for(S+oe>U&&(S=U-oe),X=S;X>=0;X--){for(var we=!0,Te=0;Te<oe;Te++)if(ce(R,X+Te)!==ce(j,Te)){we=!1;break}if(we)return X}return-1}l.prototype.includes=function(j,S,P){return this.indexOf(j,S,P)!==-1},l.prototype.indexOf=function(j,S,P){return A(this,j,S,P,!0)},l.prototype.lastIndexOf=function(j,S,P){return A(this,j,S,P,!1)};function _(R,j,S,P){S=Number(S)||0;var L=R.length-S;P?(P=Number(P),P>L&&(P=L)):P=L;var V=j.length;P>V/2&&(P=V/2);for(var U=0;U<P;++U){var oe=parseInt(j.substr(U*2,2),16);if(z(oe))return U;R[S+U]=oe}return U}function N(R,j,S,P){return Z(I(j,R.length-S),R,S,P)}function W(R,j,S,P){return Z(ee(j),R,S,P)}function K(R,j,S,P){return Z(q(j),R,S,P)}function T(R,j,S,P){return Z(Q(j,R.length-S),R,S,P)}l.prototype.write=function(j,S,P,L){if(S===void 0)L="utf8",P=this.length,S=0;else if(P===void 0&&typeof S=="string")L=S,P=this.length,S=0;else if(isFinite(S))S=S>>>0,isFinite(P)?(P=P>>>0,L===void 0&&(L="utf8")):(L=P,P=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var V=this.length-S;if((P===void 0||P>V)&&(P=V),j.length>0&&(P<0||S<0)||S>this.length)throw new RangeError("Attempt to write outside buffer bounds");L||(L="utf8");for(var U=!1;;)switch(L){case"hex":return _(this,j,S,P);case"utf8":case"utf-8":return N(this,j,S,P);case"ascii":case"latin1":case"binary":return W(this,j,S,P);case"base64":return K(this,j,S,P);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return T(this,j,S,P);default:if(U)throw new TypeError("Unknown encoding: "+L);L=(""+L).toLowerCase(),U=!0}},l.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function F(R,j,S){return j===0&&S===R.length?e.fromByteArray(R):e.fromByteArray(R.slice(j,S))}function E(R,j,S){S=Math.min(R.length,S);for(var P=[],L=j;L<S;){var V=R[L],U=null,oe=V>239?4:V>223?3:V>191?2:1;if(L+oe<=S){var ce,X,he,we;switch(oe){case 1:V<128&&(U=V);break;case 2:ce=R[L+1],(ce&192)===128&&(we=(V&31)<<6|ce&63,we>127&&(U=we));break;case 3:ce=R[L+1],X=R[L+2],(ce&192)===128&&(X&192)===128&&(we=(V&15)<<12|(ce&63)<<6|X&63,we>2047&&(we<55296||we>57343)&&(U=we));break;case 4:ce=R[L+1],X=R[L+2],he=R[L+3],(ce&192)===128&&(X&192)===128&&(he&192)===128&&(we=(V&15)<<18|(ce&63)<<12|(X&63)<<6|he&63,we>65535&&we<1114112&&(U=we))}}U===null?(U=65533,oe=1):U>65535&&(U-=65536,P.push(U>>>10&1023|55296),U=56320|U&1023),P.push(U),L+=oe}return Y(P)}var H=4096;function Y(R){var j=R.length;
vendor: 7,401 bytes, line 926
926if(j<=H)return String.fromCharCode.apply(String,R);for(var S="",P=0;P<j;)S+=String.fromCharCode.apply(String,R.slice(P,P+=H));return S}function $(R,j,S){var P="";S=Math.min(R.length,S);for(var L=j;L<S;++L)P+=String.fromCharCode(R[L]&127);return P}function D(R,j,S){var P="";S=Math.min(R.length,S);for(var L=j;L<S;++L)P+=String.fromCharCode(R[L]);return P}function J(R,j,S){var P=R.length;(!j||j<0)&&(j=0),(!S||S<0||S>P)&&(S=P);for(var L="",V=j;V<S;++V)L+=fe[R[V]];return L}function de(R,j,S){for(var P=R.slice(j,S),L="",V=0;V<P.length-1;V+=2)L+=String.fromCharCode(P[V]+P[V+1]*256);return L}l.prototype.slice=function(j,S){var P=this.length;j=~~j,S=S===void 0?P:~~S,j<0?(j+=P,j<0&&(j=0)):j>P&&(j=P),S<0?(S+=P,S<0&&(S=0)):S>P&&(S=P),S<j&&(S=j);var L=this.subarray(j,S);return Object.setPrototypeOf(L,l.prototype),L};function G(R,j,S){if(R%1!==0||R<0)throw new RangeError("offset is not uint");if(R+j>S)throw new RangeError("Trying to access beyond buffer length")}l.prototype.readUintLE=l.prototype.readUIntLE=function(j,S,P){j=j>>>0,S=S>>>0,P||G(j,S,this.length);for(var L=this[j],V=1,U=0;++U<S&&(V*=256);)L+=this[j+U]*V;return L},l.prototype.readUintBE=l.prototype.readUIntBE=function(j,S,P){j=j>>>0,S=S>>>0,P||G(j,S,this.length);for(var L=this[j+--S],V=1;S>0&&(V*=256);)L+=this[j+--S]*V;return L},l.prototype.readUint8=l.prototype.readUInt8=function(j,S){return j=j>>>0,S||G(j,1,this.length),this[j]},l.prototype.readUint16LE=l.prototype.readUInt16LE=function(j,S){return j=j>>>0,S||G(j,2,this.length),this[j]|this[j+1]<<8},l.prototype.readUint16BE=l.prototype.readUInt16BE=function(j,S){return j=j>>>0,S||G(j,2,this.length),this[j]<<8|this[j+1]},l.prototype.readUint32LE=l.prototype.readUInt32LE=function(j,S){return j=j>>>0,S||G(j,4,this.length),(this[j]|this[j+1]<<8|this[j+2]<<16)+this[j+3]*16777216},l.prototype.readUint32BE=l.prototype.readUInt32BE=function(j,S){return j=j>>>0,S||G(j,4,this.length),this[j]*16777216+(this[j+1]<<16|this[j+2]<<8|this[j+3])},l.prototype.readIntLE=function(j,S,P){j=j>>>0,S=S>>>0,P||G(j,S,this.length);for(var L=this[j],V=1,U=0;++U<S&&(V*=256);)L+=this[j+U]*V;return V*=128,L>=V&&(L-=Math.pow(2,8*S)),L},l.prototype.readIntBE=function(j,S,P){j=j>>>0,S=S>>>0,P||G(j,S,this.length);for(var L=S,V=1,U=this[j+--L];L>0&&(V*=256);)U+=this[j+--L]*V;return V*=128,U>=V&&(U-=Math.pow(2,8*S)),U},l.prototype.readInt8=function(j,S){return j=j>>>0,S||G(j,1,this.length),this[j]&128?(255-this[j]+1)*-1:this[j]},l.prototype.readInt16LE=function(j,S){j=j>>>0,S||G(j,2,this.length);var P=this[j]|this[j+1]<<8;return P&32768?P|4294901760:P},l.prototype.readInt16BE=function(j,S){j=j>>>0,S||G(j,2,this.length);var P=this[j+1]|this[j]<<8;return P&32768?P|4294901760:P},l.prototype.readInt32LE=function(j,S){return j=j>>>0,S||G(j,4,this.length),this[j]|this[j+1]<<8|this[j+2]<<16|this[j+3]<<24},l.prototype.readInt32BE=function(j,S){return j=j>>>0,S||G(j,4,this.length),this[j]<<24|this[j+1]<<16|this[j+2]<<8|this[j+3]},l.prototype.readFloatLE=function(j,S){return j=j>>>0,S||G(j,4,this.length),r.read(this,j,!0,23,4)},l.prototype.readFloatBE=function(j,S){return j=j>>>0,S||G(j,4,this.length),r.read(this,j,!1,23,4)},l.prototype.readDoubleLE=function(j,S){return j=j>>>0,S||G(j,8,this.length),r.read(this,j,!0,52,8)},l.prototype.readDoubleBE=function(j,S){return j=j>>>0,S||G(j,8,this.length),r.read(this,j,!1,52,8)};function B(R,j,S,P,L,V){if(!l.isBuffer(R))throw new TypeError('"buffer" argument must be a Buffer instance');if(j>L||j<V)throw new RangeError('"value" argument is out of bounds');if(S+P>R.length)throw new RangeError("Index out of range")}l.prototype.writeUintLE=l.prototype.writeUIntLE=function(j,S,P,L){if(j=+j,S=S>>>0,P=P>>>0,!L){var V=Math.pow(2,8*P)-1;B(this,j,S,P,V,0)}var U=1,oe=0;for(this[S]=j&255;++oe<P&&(U*=256);)this[S+oe]=j/U&255;return S+P},l.prototype.writeUintBE=l.prototype.writeUIntBE=function(j,S,P,L){if(j=+j,S=S>>>0,P=P>>>0,!L){var V=Math.pow(2,8*P)-1;B(this,j,S,P,V,0)}var U=P-1,oe=1;for(this[S+U]=j&255;--U>=0&&(oe*=256);)this[S+U]=j/oe&255;return S+P},l.prototype.writeUint8=l.prototype.writeUInt8=function(j,S,P){return j=+j,S=S>>>0,P||B(this,j,S,1,255,0),this[S]=j&255,S+1},l.prototype.writeUint16LE=l.prototype.writeUInt16LE=function(j,S,P){return j=+j,S=S>>>0,P||B(this,j,S,2,65535,0),this[S]=j&255,this[S+1]=j>>>8,S+2},l.prototype.writeUint16BE=l.prototype.writeUInt16BE=function(j,S,P){return j=+j,S=S>>>0,P||B(this,j,S,2,65535,0),this[S]=j>>>8,this[S+1]=j&255,S+2},l.prototype.writeUint32LE=l.prototype.writeUInt32LE=function(j,S,P){return j=+j,S=S>>>0,P||B(this,j,S,4,4294967295,0),this[S+3]=j>>>24,this[S+2]=j>>>16,this[S+1]=j>>>8,this[S]=j&255,S+4},l.prototype.writeUint32BE=l.prototype.writeUInt32BE=function(j,S,P){return j=+j,S=S>>>0,P||B(this,j,S,4,4294967295,0),this[S]=j>>>24,this[S+1]=j>>>16,this[S+2]=j>>>8,this[S+3]=j&255,S+4},l.prototype.writeIntLE=function(j,S,P,L){if(j=+j,S=S>>>0,!L){var V=Math.pow(2,8*P-1);B(this,j,S,P,V-1,-V)}var U=0,oe=1,ce=0;for(this[S]=j&255;++U<P&&(oe*=256);)j<0&&ce===0&&this[S+U-1]!==0&&(ce=1),this[S+U]=(j/oe>>0)-ce&255;return S+P},l.prototype.writeIntBE=function(j,S,P,L){if(j=+j,S=S>>>0,!L){var V=Math.pow(2,8*P-1);B(this,j,S,P,V-1,-V)}var U=P-1,oe=1,ce=0;for(this[S+U]=j&255;--U>=0&&(oe*=256);)j<0&&ce===0&&this[S+U+1]!==0&&(ce=1),this[S+U]=(j/oe>>0)-ce&255;return S+P},l.prototype.writeInt8=function(j,S,P){return j=+j,S=S>>>0,P||B(this,j,S,1,127,-128),j<0&&(j=255+j+1),this[S]=j&255,S+1},l.prototype.writeInt16LE=function(j,S,P){return j=+j,S=S>>>0,P||B(this,j,S,2,32767,-32768),this[S]=j&255,this[S+1]=j>>>8,S+2},l.prototype.writeInt16BE=function(j,S,P){return j=+j,S=S>>>0,P||B(this,j,S,2,32767,-32768),this[S]=j>>>8,this[S+1]=j&255,S+2},l.prototype.writeInt32LE=function(j,S,P){return j=+j,S=S>>>0,P||B(this,j,S,4,2147483647,-2147483648),this[S]=j&255,this[S+1]=j>>>8,this[S+2]=j>>>16,this[S+3]=j>>>24,S+4},l.prototype.writeInt32BE=function(j,S,P){return j=+j,S=S>>>0,P||B(this,j,S,4,2147483647,-2147483648),j<0&&(j=4294967295+j+1),this[S]=j>>>24,this[S+1]=j>>>16,this[S+2]=j>>>8,this[S+3]=j&255,S+4};function re(R,j,S,P,L,V){if(S+P>R.length)throw new RangeError("Index out of range");if(S<0)throw new RangeError("Index out of range")}function ae(R,j,S,P,L){return j=+j,S=S>>>0,L||re(R,j,S,4),r.write(R,j,S,P,23,4),S+4}l.prototype.writeFloatLE=function(j,S,P){return ae(this,j,S,!0,P)},l.prototype.writeFloatBE=function(j,S,P){return ae(this,j,S,!1,P)};function ge(R,j,S,P,L){return j=+j,S=S>>>0,L||re(R,j,S,8),r.write(R,j,S,P,52,8),S+8}l.prototype.writeDoubleLE=function(j,S,P){return ge(this,j,S,!0,P)},l.prototype.writeDoubleBE=function(j,S,P){return ge(this,j,S,!1,P)},l.prototype.copy=function(j,S,P,L){if(!l.isBuffer(j))throw new TypeError("argument should be a Buffer");if(P||(P=0),!L&&L!==0&&(L=this.length),S>=j.length&&(S=j.length),S||(S=0),L>0&&L<P&&(L=P),L===P||j.length===0||this.length===0)return 0;if(S<0)throw new RangeError("targetStart out of bounds");if(P<0||P>=this.length)throw new RangeError("Index out of range");if(L<0)throw new RangeError("sourceEnd out of bounds");L>this.length&&(L=this.length),j.length-S<L-P&&(L=j.length-S+P);var V=L-P;return this===j&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(S,P,L):Uint8Array.prototype.set.call(j,this.subarray(P,L),S),V},l.prototype.fill=function(j,S,P,L){if(typeof j=="string"){if(typeof S=="string"?(L=S,S=0,P=this.length):typeof P=="string"&&(L=P,P=this.length),L!==void 0&&typeof L!="str
926ing")throw new TypeError("encoding must be a string");if(typeof L=="string"&&!l.isEncoding(L))throw new TypeError("Unknown encoding: "+L);if(j.length===1){var V=j.charCodeAt(0);(L==="utf8"&&V<128||L==="latin1")&&(j=V)}}else typeof j=="number"?j=j&255:typeof j=="boolean"&&(j=Number(j));if(S<0||this.length<S||this.length<P)throw new RangeError("Out of range index");if(P<=S)return this;S=S>>>0,P=P===void 0?this.length:P>>>0,j||(j=0);var U;if(typeof j=="number")for(U=S;U<P;++U)this[U]=j;else{var oe=l.isBuffer(j)?j:l.from(j,L),ce=oe.length;if(ce===0)throw new TypeError('The value "'+j+'" is invalid for argument "value"');for(U=0;U<P-S;++U)this[U+S]=oe[U%ce]}return this};var ne=/[^+/0-9A-Za-z-_]/g;function O(R){if(R=R.split("=")[0],R=R.trim().replace(ne,""),R.length<2)return"";for(;R.length%4!==0;)R=R+"=";return R}function I(R,j){j=j||1/0;for(var S,P=R.length,L=null,V=[],U=0;U<P;++U){if(S=R.charCodeAt(U),S>55295&&S<57344){if(!L){if(S>56319){(j-=3)>-1&&V.push(239,191,189);continue}else if(U+1===P){(j-=3)>-1&&V.push(239,191,189);continue}L=S;continue}if(S<56320){(j-=3)>-1&&V.push(239,191,189),L=S;continue}S=(L-55296<<10|S-56320)+65536}else L&&(j-=3)>-1&&V.push(239,191,189);if(L=null,S<128){if((j-=1)<0)break;V.push(S)}else if(S<2048){if((j-=2)<0)break;V.push(S>>6|192,S&63|128)}else if(S<65536){if((j-=3)<0)break;V.push(S>>12|224,S>>6&63|128,S&63|128)}else if(S<1114112){if((j-=4)<0)break;V.push(S>>18|240,S>>12&63|128,S>>6&63|128,S&63|128)}else throw new Error("Invalid code point")}return V}function ee(R){for(var j=[],S=0;S<R.length;++S)j.push(R.charCodeAt(S)&255);return j}function Q(R,j){for(var S,P,L,V=[],U=0;U<R.length&&!((j-=2)<0);++U)S=R.charCodeAt(U),P=S>>8,L=S%256,V.push(L),V.push(P);return V}function q(R){return e.toByteArray(O(R))}function Z(R,j,S,P){for(var L=0;L<P&&!(L+S>=j.length||L>=R.length);++L)j[L+S]=R[L];return L}function me(R,j){return R instanceof j||R!=null&&R.constructor!=null&&R.constructor.name!=null&&R.constructor.name===j.name}function z(R){return R!==R}var fe=function(){for(var R="0123456789abcdef",j=new Array(256),S=0;S<16;++S)for(var P=S*16,L=0;L<16;++L)j[P+L]=R[S]+R[L];return j}()}(eb)),eb}var tb={},rb={},nb,cT;function MM(){return cT||(cT=1,nb=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var e={},r=Symbol("test"),n=Object(r);if(typeof r=="string"||Object.prototype.toString.call(r)!=="[object Symbol]"||Object.prototype.toString.call(n)!=="[object Symbol]")return!1;var s=42;e[r]=s;for(var i in e)return!1;if(typeof Object.keys=="function"&&Object.keys(e).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(e).length!==0)return!1;var a=Object.getOwnPropertySymbols(e);if(a.length!==1||a[0]!==r||!Object.prototype.propertyIsEnumerable.call(e,r))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var l=Object.getOwnPropertyDescriptor(e,r);if(l.value!==s||l.enumerable!==!0)return!1}return!0}),nb}var sb,uT;function CN(){if(uT)return sb;uT=1;var t=MM();return sb=function(){return t()&&!!Symbol.toStringTag},sb}var ib,dT;function DM(){return dT||(dT=1,ib=Object),ib}var ab,hT;function yfe(){return hT||(hT=1,ab=Error),ab}var ob,pT;function xfe(){return pT||(pT=1,ob=EvalError),ob}var lb,fT;function wfe(){return fT||(fT=1,lb=RangeError),lb}var cb,mT;function bfe(){return mT||(mT=1,cb=ReferenceError),cb}var ub,gT;function FM(){return gT||(gT=1,ub=SyntaxError),ub}var db,yT;function Sf(){return yT||(yT=1,db=TypeError),db}var hb,xT;function kfe(){return xT||(xT=1,hb=URIError),hb}var pb,wT;function vfe(){return wT||(wT=1,pb=Math.abs),pb}var fb,bT;function jfe(){return bT||(bT=1,fb=Math.floor),fb}var mb,kT;function Sfe(){return kT||(kT=1,mb=Math.max),mb}var gb,vT;function Nfe(){return vT||(vT=1,gb=Math.min),gb}var yb,jT;function Cfe(){return jT||(jT=1,yb=Math.pow),yb}var xb,ST;function Efe(){return ST||(ST=1,xb=Math.round),xb}var wb,NT;function Tfe(){return NT||(NT=1,wb=Number.isNaN||function(e){return e!==e}),wb}var bb,CT;function Afe(){if(CT)return bb;CT=1;var t=Tfe();return bb=function(r){return t(r)||r===0?r:r<0?-1:1},bb}var kb,ET;function zfe(){return ET||(ET=1,kb=Object.getOwnPropertyDescriptor),kb}var vb,TT;function Nf(){if(TT)return vb;TT=1;var t=zfe();if(t)try{t([],"length")}catch{t=null}return vb=t,vb}var jb,AT;function dx(){if(AT)return jb;AT=1;var t=Object.defineProperty||!1;if(t)try{t({},"a",{value:1})}catch{t=!1}return jb=t,jb}var Sb,zT;function Pfe(){if(zT)return Sb;zT=1;var t=typeof Symbol<"u"&&Symbol,e=MM();return Sb=function(){return typeof t!="function"||typeof Symbol!="function"||typeof t("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:e()},Sb}var Nb,PT;function BM(){return PT||(PT=1,Nb=typeof Reflect<"u"&&Reflect.getPrototypeOf||null),Nb}var Cb,_T;function $M(){if(_T)return Cb;_T=1;var t=DM();return Cb=t.getPrototypeOf||null,Cb}var Eb,IT;function _fe(){if(IT)return Eb;IT=1;var t="Function.prototype.bind called on incompatible ",e=Object.prototype.toString,r=Math.max,n="[object Function]",s=function(c,u){for(var d=[],h=0;h<c.length;h+=1)d[h]=c[h];for(var p=0;p<u.length;p+=1)d[p+c.length]=u[p];return d},i=function(c,u){for(var d=[],h=u,p=0;h<c.length;h+=1,p+=1)d[p]=c[h];return d},a=function(l,c){for(var u="",d=0;d<l.length;d+=1)u+=l[d],d+1<l.length&&(u+=c);return u};return Eb=function(c){var u=this;if(typeof u!="function"||e.apply(u)!==n)throw new TypeError(t+u);
vendor: 10,342 bytes, line 926
926for(var d=i(arguments,1),h,p=function(){if(this instanceof h){var g=u.apply(this,s(d,arguments));return Object(g)===g?g:this}return u.apply(c,s(d,arguments))},f=r(0,u.length-d.length),m=[],y=0;y<f;y++)m[y]="$"+y;if(h=Function("binder","return function ("+a(m,",")+"){ return binder.apply(this,arguments); }")(p),u.prototype){var k=function(){};k.prototype=u.prototype,h.prototype=new k,k.prototype=null}return h},Eb}var Tb,OT;function Cf(){if(OT)return Tb;OT=1;var t=_fe();return Tb=Function.prototype.bind||t,Tb}var Ab,RT;function EN(){return RT||(RT=1,Ab=Function.prototype.call),Ab}var zb,LT;function UM(){return LT||(LT=1,zb=Function.prototype.apply),zb}var Pb,MT;function Ife(){return MT||(MT=1,Pb=typeof Reflect<"u"&&Reflect&&Reflect.apply),Pb}var _b,DT;function Ofe(){if(DT)return _b;DT=1;var t=Cf(),e=UM(),r=EN(),n=Ife();return _b=n||t.call(r,e),_b}var Ib,FT;function Rfe(){if(FT)return Ib;FT=1;var t=Cf(),e=Sf(),r=EN(),n=Ofe();return Ib=function(i){if(i.length<1||typeof i[0]!="function")throw new e("a function is required");return n(t,r,i)},Ib}var Ob,BT;function Lfe(){if(BT)return Ob;BT=1;var t=Rfe(),e=Nf(),r;try{r=[].__proto__===Array.prototype}catch(a){if(!a||typeof a!="object"||!("code"in a)||a.code!=="ERR_PROTO_ACCESS")throw a}var n=!!r&&e&&e(Object.prototype,"__proto__"),s=Object,i=s.getPrototypeOf;return Ob=n&&typeof n.get=="function"?t([n.get]):typeof i=="function"?function(l){return i(l==null?l:s(l))}:!1,Ob}var Rb,$T;function Mfe(){if($T)return Rb;$T=1;var t=BM(),e=$M(),r=Lfe();return Rb=t?function(s){return t(s)}:e?function(s){if(!s||typeof s!="object"&&typeof s!="function")throw new TypeError("getProto: not an object");return e(s)}:r?function(s){return r(s)}:null,Rb}var Lb,UT;function Dfe(){if(UT)return Lb;UT=1;var t=Function.prototype.call,e=Object.prototype.hasOwnProperty,r=Cf();return Lb=r.call(t,e),Lb}var Mb,WT;function TN(){if(WT)return Mb;WT=1;var t,e=DM(),r=yfe(),n=xfe(),s=wfe(),i=bfe(),a=FM(),l=Sf(),c=kfe(),u=vfe(),d=jfe(),h=Sfe(),p=Nfe(),f=Cfe(),m=Efe(),y=Afe(),k=Function,g=function(ee){try{return k('"use strict"; return ('+ee+").constructor;")()}catch{}},x=Nf(),w=dx(),b=function(){throw new l},v=x?function(){try{return arguments.callee,b}catch{try{return x(arguments,"callee").get}catch{return b}}}():b,A=Pfe()(),C=Mfe(),_=$M(),N=BM(),W=UM(),K=EN(),T={},F=typeof Uint8Array>"u"||!C?t:C(Uint8Array),E={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?t:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?t:ArrayBuffer,"%ArrayIteratorPrototype%":A&&C?C([][Symbol.iterator]()):t,"%AsyncFromSyncIteratorPrototype%":t,"%AsyncFunction%":T,"%AsyncGenerator%":T,"%AsyncGeneratorFunction%":T,"%AsyncIteratorPrototype%":T,"%Atomics%":typeof Atomics>"u"?t:Atomics,"%BigInt%":typeof BigInt>"u"?t:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?t:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?t:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?t:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":r,"%eval%":eval,"%EvalError%":n,"%Float16Array%":typeof Float16Array>"u"?t:Float16Array,"%Float32Array%":typeof Float32Array>"u"?t:Float32Array,"%Float64Array%":typeof Float64Array>"u"?t:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?t:FinalizationRegistry,"%Function%":k,"%GeneratorFunction%":T,"%Int8Array%":typeof Int8Array>"u"?t:Int8Array,"%Int16Array%":typeof Int16Array>"u"?t:Int16Array,"%Int32Array%":typeof Int32Array>"u"?t:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":A&&C?C(C([][Symbol.iterator]())):t,"%JSON%":typeof JSON=="object"?JSON:t,"%Map%":typeof Map>"u"?t:Map,"%MapIteratorPrototype%":typeof Map>"u"||!A||!C?t:C(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":e,"%Object.getOwnPropertyDescriptor%":x,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?t:Promise,"%Proxy%":typeof Proxy>"u"?t:Proxy,"%RangeError%":s,"%ReferenceError%":i,"%Reflect%":typeof Reflect>"u"?t:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?t:Set,"%SetIteratorPrototype%":typeof Set>"u"||!A||!C?t:C(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?t:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":A&&C?C(""[Symbol.iterator]()):t,"%Symbol%":A?Symbol:t,"%SyntaxError%":a,"%ThrowTypeError%":v,"%TypedArray%":F,"%TypeError%":l,"%Uint8Array%":typeof Uint8Array>"u"?t:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?t:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?t:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?t:Uint32Array,"%URIError%":c,"%WeakMap%":typeof WeakMap>"u"?t:WeakMap,"%WeakRef%":typeof WeakRef>"u"?t:WeakRef,"%WeakSet%":typeof WeakSet>"u"?t:WeakSet,"%Function.prototype.call%":K,"%Function.prototype.apply%":W,"%Object.defineProperty%":w,"%Object.getPrototypeOf%":_,"%Math.abs%":u,"%Math.floor%":d,"%Math.max%":h,"%Math.min%":p,"%Math.pow%":f,"%Math.round%":m,"%Math.sign%":y,"%Reflect.getPrototypeOf%":N};if(C)try{null.error}catch(ee){var H=C(C(ee));E["%Error.prototype%"]=H}var Y=function ee(Q){var q;if(Q==="%AsyncFunction%")q=g("async function () {}");else if(Q==="%GeneratorFunction%")q=g("function* () {}");else if(Q==="%AsyncGeneratorFunction%")q=g("async function* () {}");else if(Q==="%AsyncGenerator%"){var Z=ee("%AsyncGeneratorFunction%");Z&&(q=Z.prototype)}else if(Q==="%AsyncIteratorPrototype%"){var me=ee("%AsyncGenerator%");me&&C&&(q=C(me.prototype))}return E[Q]=q,q},$={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},D=Cf(),J=Dfe(),de=D.call(K,Array.prototype.concat),G=D.call(W,Array.prototype.splice),B=D.call(K,String.prototype.replace),re=D.call(K,String.prototype.slice),ae=D.call(K,RegExp.prototype.exec),ge=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,ne=/\\(\\)?/g,O=function(Q){var q=re(Q,0,1),Z=re(Q,-1);if(q==="%"&&Z!=="%")throw new a("invalid intrinsic syntax, expected closing `%`");if(Z==="%"&&q!=="%")throw new a("invalid intrinsic syntax, expected opening `%`");var me=[];return B(Q,ge,function(z,fe,R,j){me[me.length]=R?B(j,ne,"$1"):fe||z}),me},I=function(Q,q){var Z=Q,me;if(J($,Z)&&(me=$[Z],Z="%"+me[0]+"%"),J(E,Z)){var z=E[Z];if(z===T&&(z=Y(Z)),typeof z>"u"&&!q)throw new l("intrinsic "+Q+" exists, but is not available. Please file an issue!");return{alias:me,name:Z,value:z}}throw new a("intrinsic "+Q+" does not exist!")};return Mb=function(Q,q){if(typeof Q!="string"||Q.length===0)throw new l("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof q!="boolean")throw new l('"allowMissing" argument must be a boolean');if(ae(/^%?[^%]*%?$/,Q)===null)throw new a("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var Z=O(Q),me=Z.length>0?Z[0]:"",z=I("%"+me+"%",q),fe=z.name,R=z.value,j=!1,S=z.alias;S&&(me=S[0],G(Z,de([0,1],S)));for(var P=1,L=!0;P<Z.length;P+=1){var V=Z[P],U=re(V,0,1),oe=re(V,-1);if((U==='"'||U==="'"||U==="`"||oe==='"'||oe==="'"||oe==="`")&&U!==oe)throw new a("property names with quotes must have matching quotes");if((V==="constructor"||!L)&&(j=!0),me+="."+V,fe="%"+me+"%",J(E,fe))R=E[fe];else if(R!=null){if(!(V in R)){if(!q)throw new l("base intrinsic for "+Q+" exists, but the property is not available.");return}if(x&&P+1>=Z.length){var ce=x(R,V);L=!!ce,L&&"get"in ce&&!("originalValue"in ce.get)?R=ce.get:R=R[V]}else L=J(R,V),R=R[V];L&&!j&&(E[fe]=R)}}return R},Mb}var Db={exports:{}},Fb,VT;function Ffe(){if(VT)return Fb;VT=1;var t=dx(),e=FM(),r=Sf(),n=Nf();return Fb=function(i,a,l){if(!i||typeof i!="object"&&typeof i!="function")throw new r("`obj` must be an object or a function`");if(typeof a!="string"&&typeof a!="symbol")throw new r("`property` must be a string or a symbol`");
926if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new r("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new r("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new r("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new r("`loose`, if provided, must be a boolean");var c=arguments.length>3?arguments[3]:null,u=arguments.length>4?arguments[4]:null,d=arguments.length>5?arguments[5]:null,h=arguments.length>6?arguments[6]:!1,p=!!n&&n(i,a);if(t)t(i,a,{configurable:d===null&&p?p.configurable:!d,enumerable:c===null&&p?p.enumerable:!c,value:l,writable:u===null&&p?p.writable:!u});else if(h||!c&&!u&&!d)i[a]=l;else throw new e("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")},Fb}var Bb,HT;function Bfe(){if(HT)return Bb;HT=1;var t=dx(),e=function(){return!!t};return e.hasArrayLengthDefineBug=function(){if(!t)return null;try{return t([],"length",{value:1}).length!==1}catch{return!0}},Bb=e,Bb}var $b,qT;function $fe(){if(qT)return $b;qT=1;var t=TN(),e=Ffe(),r=Bfe()(),n=Nf(),s=Sf(),i=t("%Math.floor%");return $b=function(l,c){if(typeof l!="function")throw new s("`fn` is not a function");if(typeof c!="number"||c<0||c>4294967295||i(c)!==c)throw new s("`length` must be a positive 32-bit integer");var u=arguments.length>2&&!!arguments[2],d=!0,h=!0;if("length"in l&&n){var p=n(l,"length");p&&!p.configurable&&(d=!1),p&&!p.writable&&(h=!1)}return(d||h||!u)&&(r?e(l,"length",c,!0,!0):e(l,"length",c)),l},$b}var KT;function WM(){return KT||(KT=1,function(t){var e=Cf(),r=TN(),n=$fe(),s=Sf(),i=r("%Function.prototype.apply%"),a=r("%Function.prototype.call%"),l=r("%Reflect.apply%",!0)||e.call(a,i),c=dx(),u=r("%Math.max%");t.exports=function(p){if(typeof p!="function")throw new s("a function is required");var f=l(e,a,arguments);return n(f,1+u(0,p.length-(arguments.length-1)),!0)};var d=function(){return l(e,i,arguments)};c?c(t.exports,"apply",{value:d}):t.exports.apply=d}(Db)),Db.exports}var Ub,GT;function VM(){if(GT)return Ub;GT=1;var t=TN(),e=WM(),r=e(t("String.prototype.indexOf"));return Ub=function(s,i){var a=t(s,!!i);return typeof a=="function"&&r(s,".prototype.")>-1?e(a):a},Ub}var Wb,ZT;function Ufe(){if(ZT)return Wb;ZT=1;var t=CN()(),e=VM(),r=e("Object.prototype.toString"),n=function(l){return t&&l&&typeof l=="object"&&Symbol.toStringTag in l?!1:r(l)==="[object Arguments]"},s=function(l){return n(l)?!0:l!==null&&typeof l=="object"&&typeof l.length=="number"&&l.length>=0&&r(l)!=="[object Array]"&&r(l.callee)==="[object Function]"},i=function(){return n(arguments)}();return n.isLegacyArguments=s,Wb=i?n:s,Wb}var Vb,YT;function Wfe(){if(YT)return Vb;YT=1;var t=Object.prototype.toString,e=Function.prototype.toString,r=/^\s*(?:function)?\*/,n=CN()(),s=Object.getPrototypeOf,i=function(){if(!n)return!1;try{return Function("return function*() {}")()}catch{}},a;return Vb=function(c){if(typeof c!="function")return!1;if(r.test(e.call(c)))return!0;if(!n){var u=t.call(c);return u==="[object GeneratorFunction]"}if(!s)return!1;if(typeof a>"u"){var d=i();a=d?s(d):!1}return s(c)===a},Vb}var Hb,JT;function Vfe(){if(JT)return Hb;JT=1;var t=Function.prototype.toString,e=typeof Reflect=="object"&&Reflect!==null&&Reflect.apply,r,n;if(typeof e=="function"&&typeof Object.defineProperty=="function")try{r=Object.defineProperty({},"length",{get:function(){throw n}}),n={},e(function(){throw 42},null,r)}catch(x){x!==n&&(e=null)}else e=null;var s=/^\s*class\b/,i=function(w){try{var b=t.call(w);return s.test(b)}catch{return!1}},a=function(w){try{return i(w)?!1:(t.call(w),!0)}catch{return!1}},l=Object.prototype.toString,c="[object Object]",u="[object Function]",d="[object GeneratorFunction]",h="[object HTMLAllCollection]",p="[object HTML document.all class]",f="[object HTMLCollection]",m=typeof Symbol=="function"&&!!Symbol.toStringTag,y=!(0 in[,]),k=function(){return!1};if(typeof document=="object"){var g=document.all;l.call(g)===l.call(document.all)&&(k=function(w){if((y||!w)&&(typeof w>"u"||typeof w=="object"))try{var b=l.call(w);return(b===h||b===p||b===f||b===c)&&w("")==null}catch{}return!1})}return Hb=e?function(w){if(k(w))return!0;
926if(!w||typeof w!="function"&&typeof w!="object")return!1;try{e(w,null,r)}catch(b){if(b!==n)return!1}return!i(w)&&a(w)}:function(w){if(k(w))return!0;if(!w||typeof w!="function"&&typeof w!="object")return!1;if(m)return a(w);if(i(w))return!1;var b=l.call(w);return b!==u&&b!==d&&!/^\[object HTML/.test(b)?!1:a(w)},Hb}var qb,XT;function Hfe(){if(XT)return qb;XT=1;var t=Vfe(),e=Object.prototype.toString,r=Object.prototype.hasOwnProperty,n=function(c,u,d){for(var h=0,p=c.length;h<p;h++)r.call(c,h)&&(d==null?u(c[h],h,c):u.call(d,c[h],h,c))},s=function(c,u,d){for(var h=0,p=c.length;h<p;h++)d==null?u(c.charAt(h),h,c):u.call(d,c.charAt(h),h,c)},i=function(c,u,d){for(var h in c)r.call(c,h)&&(d==null?u(c[h],h,c):u.call(d,c[h],h,c))},a=function(c,u,d){if(!t(u))throw new TypeError("iterator must be a function");var h;arguments.length>=3&&(h=d),e.call(c)==="[object Array]"?n(c,u,h):typeof c=="string"?s(c,u,h):i(c,u,h)};return qb=a,qb}var Kb,QT;function qfe(){return QT||(QT=1,Kb=["Float32Array","Float64Array","Int8Array","Int16Array","Int32Array","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array"]),Kb}var Gb,e6;function Kfe(){if(e6)return Gb;e6=1;var t=qfe(),e=typeof globalThis>"u"?vi:globalThis;return Gb=function(){for(var n=[],s=0;s<t.length;s++)typeof e[t[s]]=="function"&&(n[n.length]=t[s]);return n},Gb}var Zb,t6;function HM(){if(t6)return Zb;t6=1;var t=Hfe(),e=Kfe(),r=WM(),n=VM(),s=Nf(),i=n("Object.prototype.toString"),a=CN()(),l=typeof globalThis>"u"?vi:globalThis,c=e(),u=n("String.prototype.slice"),d=Object.getPrototypeOf,h=n("Array.prototype.indexOf",!0)||function(k,g){for(var x=0;x<k.length;x+=1)if(k[x]===g)return x;return-1},p={__proto__:null};a&&s&&d?t(c,function(y){var k=new l[y];if(Symbol.toStringTag in k){var g=d(k),x=s(g,Symbol.toStringTag);if(!x){var w=d(g);x=s(w,Symbol.toStringTag)}p["$"+y]=r(x.get)}}):t(c,function(y){var k=new l[y],g=k.slice||k.set;g&&(p["$"+y]=r(g))});var f=function(k){var g=!1;return t(p,function(x,w){if(!g)try{"$"+x(k)===w&&(g=u(w,1))}catch{}}),g},m=function(k){var g=!1;return t(p,function(x,w){if(!g)try{x(k),g=u(w,1)}catch{}}),g};return Zb=function(k){if(!k||typeof k!="object")return!1;if(!a){var g=u(i(k),8,-1);return h(c,g)>-1?g:g!=="Object"?!1:m(k)}return s?f(k):null},Zb}var Yb,r6;function Gfe(){if(r6)return Yb;r6=1;var t=HM();return Yb=function(r){return!!t(r)},Yb}var n6;function Zfe(){return n6||(n6=1,function(t){var e=Ufe(),r=Wfe(),n=HM(),s=Gfe();function i(P){return P.call.bind(P)}var a=typeof BigInt<"u",l=typeof Symbol<"u",c=i(Object.prototype.toString),u=i(Number.prototype.valueOf),d=i(String.prototype.valueOf),h=i(Boolean.prototype.valueOf);if(a)var p=i(BigInt.prototype.valueOf);if(l)var f=i(Symbol.prototype.valueOf);function m(P,L){if(typeof P!="object")return!1;try{return L(P),!0}catch{return!1}}t.isArgumentsObject=e,t.isGeneratorFunction=r,t.isTypedArray=s;function y(P){return typeof Promise<"u"&&P instanceof Promise||P!==null&&typeof P=="object"&&typeof P.then=="function"&&typeof P.catch=="function"}t.isPromise=y;function k(P){return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?ArrayBuffer.isView(P):s(P)||re(P)}t.isArrayBufferView=k;function g(P){return n(P)==="Uint8Array"}t.isUint8Array=g;function x(P){return n(P)==="Uint8ClampedArray"}t.isUint8ClampedArray=x;function w(P){return n(P)==="Uint16Array"}t.isUint16Array=w;function b(P){return n(P)==="Uint32Array"}t.isUint32Array=b;function v(P){return n(P)==="Int8Array"}t.isInt8Array=v;function A(P){return n(P)==="Int16Array"}t.isInt16Array=A;function C(P){return n(P)==="Int32Array"}t.isInt32Array=C;function _(P){return n(P)==="Float32Array"}t.isFloat32Array=_;function N(P){return n(P)==="Float64Array"}t.isFloat64Array=N;function W(P){return n(P)==="BigInt64Array"}t.isBigInt64Array=W;function K(P){return n(P)==="BigUint64Array"}t.isBigUint64Array=K;function T(P){return c(P)==="[object Map]"}T.working=typeof Map<"u"&&T(new Map);function F(P){return typeof Map>"u"?!1:T.working?T(P):P instanceof Map}t.isMap=F;function E(P){return c(P)==="[object Set]"}E.working=typeof Set<"u"&&E(new Set);function H(P){return typeof Set>"u"?!1:E.working?E(P):P instanceof Set}t.isSet=H;function Y(P){return c(P)==="[object WeakMap]"}Y.working=typeof WeakMap<"u"&&Y(new WeakMap);function $(P){return typeof WeakMap>"u"?!1:Y.working?Y(P):P instanceof WeakMap}t.isWeakMap=$;function D(P){return c(P)==="[object WeakSet]"}D.working=typeof WeakSet<"u"&&D(new WeakSet);function J(P){return D(P)}t.isWeakSet=J;function de(P){return c(P)==="[object ArrayBuffer]"}de.working=typeof ArrayBuffer<"u"&&de(new ArrayBuffer);function G(P){return typeof ArrayBuffer>"u"?!1:de.working?de(P):P instanceof ArrayBuffer}t.isArrayBuffer=G;function B(P){return c(P)==="[object DataView]"}B.working=typeof ArrayBuffer<"u"&&typeof DataView<"u"&&B(new DataView(new ArrayBuffer(1),0,1));function re(P){return typeof DataView>"u"?!1:B.working?B(P):P instanceof DataView}t.isDataView=re;var ae=typeof SharedArrayBuffer<"u"?SharedArrayBuffer:void 0;function ge(P){return c(P)==="[object SharedArrayBuffer]"}function ne(P){return typeof ae>"u"?!1:(typeof ge.working>"u"&&(ge.working=ge(new ae)),ge.working?ge(P):P instanceof ae)}t.isSharedArrayBuffer=ne;function O(P){return c(P)==="[object AsyncFunction]"}t.isAsyncFunction=O;function I(P){return c(P)==="[object Map Iterator]"}t.isMapIterator=I;function ee(P){return c(P)==="[object Set Iterator]"}t.isSetIterator=ee;function Q(P){return c(P)==="[object Generator]"}t.isGeneratorObject=Q;function q(P){return c(P)==="[object WebAssembly.Module]"}t.isWebAssemblyCompiledModule=q;function Z(P){return m(P,u)}t.isNumberObject=Z;function me(P){return m(P,d)}t.isStringObject=me;function z(P){return m(P,h)}t.isBooleanObject=z;function fe(P){return a&&m(P,p)}t.isBigIntObject=fe;function R(P){return l&&m(P,f)}t.isSymbolObject=R;function j(P){return Z(P)||me(P)||z(P)||fe(P)||R(P)}t.isBoxedPrimitive=j;function S(P){return typeof Uint8Array<"u"&&(G(P)||ne(P))}t.isAnyArrayBuffer=S,["isProxy","isExternal","isModuleNamespaceObject"].forEach(function(P){Object.defineProperty(t,P,{enumerable:!1,value:function(){throw new Error(P+" is not supported in userland")}})})}(rb)),rb}var Jb,s6;function Yfe(){return s6||(s6=1,Jb=function(e){return e&&typeof e=="object"&&typeof e.copy=="function"&&typeof e.fill=="function"&&typeof e.readUInt8=="function"}),Jb}var i6;function qM(){return i6||(i6=1,function(t){var e=Object.getOwnPropertyDescriptors||function(re){for(var ae=Object.keys(re),ge={},ne=0;ne<ae.length;ne++)ge[ae[ne]]=Object.getOwnPropertyDescriptor(re,ae[ne]);return ge},r=/%[sdj%]/g;t.format=function(B){if(!v(B)){for(var re=[],ae=0;ae<arguments.length;ae++)re.push(a(arguments[ae]));return re.join(" ")}for(var ae=1,ge=arguments,ne=ge.length,O=String(B).replace(r,function(ee){if(ee==="%%")return"%";if(ae>=ne)return ee;switch(ee){case"%s":return String(ge[ae++]);case"%d":return Number(ge[ae++]);case"%j":try{return JSON.stringify(ge[ae++])}catch{return"[Circular]"}default:return ee}}),I=ge[ae];ae<ne;I=ge[++ae])x(I)||!N(I)?O+=" "+I:O+=" "+a(I);return O},t.deprecate=function(B,re){if(typeof nt<"u"&&nt.noDeprecation===!0)return B;if(typeof nt>"u")return function(){return t.deprecate(B,re).apply(this,arguments)};var ae=!1;function ge(){if(!ae){if(nt.throwDeprecation)throw new Error(re);nt.traceDeprecation?console.trace(re):console.error(re),ae=!0}return B.apply(this,arguments)}return ge};var n={},s=/^$/;if(nt.env.NODE_DEBUG){var i=nt.env.NODE_DEBUG;i=i.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^").toUpperCase(),s=new RegExp("^"+i+"$","i")}
vendor: 11,514 bytes, lines 926-935
926t.debuglog=function(B){if(B=B.toUpperCase(),!n[B])if(s.test(B)){var re=nt.pid;n[B]=function(){var ae=t.format.apply(t,arguments);console.error("%s %d: %s",B,re,ae)}}else n[B]=function(){};return n[B]};function a(B,re){var ae={seen:[],stylize:c};return arguments.length>=3&&(ae.depth=arguments[2]),arguments.length>=4&&(ae.colors=arguments[3]),g(re)?ae.showHidden=re:re&&t._extend(ae,re),C(ae.showHidden)&&(ae.showHidden=!1),C(ae.depth)&&(ae.depth=2),C(ae.colors)&&(ae.colors=!1),C(ae.customInspect)&&(ae.customInspect=!0),ae.colors&&(ae.stylize=l),d(ae,B,ae.depth)}t.inspect=a,a.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},a.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function l(B,re){var ae=a.styles[re];return ae?"\x1B["+a.colors[ae][0]+"m"+B+"\x1B["+a.colors[ae][1]+"m":B}function c(B,re){return B}function u(B){var re={};return B.forEach(function(ae,ge){re[ae]=!0}),re}function d(B,re,ae){if(B.customInspect&&re&&T(re.inspect)&&re.inspect!==t.inspect&&!(re.constructor&&re.constructor.prototype===re)){var ge=re.inspect(ae,B);return v(ge)||(ge=d(B,ge,ae)),ge}var ne=h(B,re);if(ne)return ne;var O=Object.keys(re),I=u(O);if(B.showHidden&&(O=Object.getOwnPropertyNames(re)),K(re)&&(O.indexOf("message")>=0||O.indexOf("description")>=0))return p(re);if(O.length===0){if(T(re)){var ee=re.name?": "+re.name:"";return B.stylize("[Function"+ee+"]","special")}if(_(re))return B.stylize(RegExp.prototype.toString.call(re),"regexp");if(W(re))return B.stylize(Date.prototype.toString.call(re),"date");if(K(re))return p(re)}var Q="",q=!1,Z=["{","}"];if(k(re)&&(q=!0,Z=["[","]"]),T(re)){var me=re.name?": "+re.name:"";Q=" [Function"+me+"]"}if(_(re)&&(Q=" "+RegExp.prototype.toString.call(re)),W(re)&&(Q=" "+Date.prototype.toUTCString.call(re)),K(re)&&(Q=" "+p(re)),O.length===0&&(!q||re.length==0))return Z[0]+Q+Z[1];if(ae<0)return _(re)?B.stylize(RegExp.prototype.toString.call(re),"regexp"):B.stylize("[Object]","special");B.seen.push(re);var z;return q?z=f(B,re,ae,I,O):z=O.map(function(fe){return m(B,re,ae,I,fe,q)}),B.seen.pop(),y(z,Q,Z)}function h(B,re){if(C(re))return B.stylize("undefined","undefined");if(v(re)){var ae="'"+JSON.stringify(re).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return B.stylize(ae,"string")}if(b(re))return B.stylize(""+re,"number");if(g(re))return B.stylize(""+re,"boolean");if(x(re))return B.stylize("null","null")}function p(B){return"["+Error.prototype.toString.call(B)+"]"}function f(B,re,ae,ge,ne){for(var O=[],I=0,ee=re.length;I<ee;++I)D(re,String(I))?O.push(m(B,re,ae,ge,String(I),!0)):O.push("");return ne.forEach(function(Q){Q.match(/^\d+$/)||O.push(m(B,re,ae,ge,Q,!0))}),O}function m(B,re,ae,ge,ne,O){var I,ee,Q;if(Q=Object.getOwnPropertyDescriptor(re,ne)||{value:re[ne]},Q.get?Q.set?ee=B.stylize("[Getter/Setter]","special"):ee=B.stylize("[Getter]","special"):Q.set&&(ee=B.stylize("[Setter]","special")),D(ge,ne)||(I="["+ne+"]"),ee||(B.seen.indexOf(Q.value)<0?(x(ae)?ee=d(B,Q.value,null):ee=d(B,Q.value,ae-1),ee.indexOf(`
927`)>-1&&(O?ee=ee.split(`
928`).map(function(q){return"  "+q}).join(`
929`).slice(2):ee=`
930`+ee.split(`
931`).map(function(q){return"   "+q}).join(`
932`))):ee=B.stylize("[Circular]","special")),C(I)){if(O&&ne.match(/^\d+$/))return ee;I=JSON.stringify(""+ne),I.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(I=I.slice(1,-1),I=B.stylize(I,"name")):(I=I.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),I=B.stylize(I,"string"))}return I+": "+ee}function y(B,re,ae){var ge=B.reduce(function(ne,O){return O.indexOf(`
933`)>=0,ne+O.replace(/\u001b\[\d\d?m/g,"").length+1},0);return ge>60?ae[0]+(re===""?"":re+`
934 `)+" "+B.join(`,
935  `)+" "+ae[1]:ae[0]+re+" "+B.join(", ")+" "+ae[1]}t.types=Zfe();function k(B){return Array.isArray(B)}t.isArray=k;function g(B){return typeof B=="boolean"}t.isBoolean=g;function x(B){return B===null}t.isNull=x;function w(B){return B==null}t.isNullOrUndefined=w;function b(B){return typeof B=="number"}t.isNumber=b;function v(B){return typeof B=="string"}t.isString=v;function A(B){return typeof B=="symbol"}t.isSymbol=A;function C(B){return B===void 0}t.isUndefined=C;function _(B){return N(B)&&E(B)==="[object RegExp]"}t.isRegExp=_,t.types.isRegExp=_;function N(B){return typeof B=="object"&&B!==null}t.isObject=N;function W(B){return N(B)&&E(B)==="[object Date]"}t.isDate=W,t.types.isDate=W;function K(B){return N(B)&&(E(B)==="[object Error]"||B instanceof Error)}t.isError=K,t.types.isNativeError=K;function T(B){return typeof B=="function"}t.isFunction=T;function F(B){return B===null||typeof B=="boolean"||typeof B=="number"||typeof B=="string"||typeof B=="symbol"||typeof B>"u"}t.isPrimitive=F,t.isBuffer=Yfe();function E(B){return Object.prototype.toString.call(B)}function H(B){return B<10?"0"+B.toString(10):B.toString(10)}var Y=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function $(){var B=new Date,re=[H(B.getHours()),H(B.getMinutes()),H(B.getSeconds())].join(":");return[B.getDate(),Y[B.getMonth()],re].join(" ")}t.log=function(){console.log("%s - %s",$(),t.format.apply(t,arguments))},t.inherits=tl(),t._extend=function(B,re){if(!re||!N(re))return B;for(var ae=Object.keys(re),ge=ae.length;ge--;)B[ae[ge]]=re[ae[ge]];return B};function D(B,re){return Object.prototype.hasOwnProperty.call(B,re)}var J=typeof Symbol<"u"?Symbol("util.promisify.custom"):void 0;t.promisify=function(re){if(typeof re!="function")throw new TypeError('The "original" argument must be of type Function');if(J&&re[J]){var ae=re[J];if(typeof ae!="function")throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(ae,J,{value:ae,enumerable:!1,writable:!1,configurable:!0}),ae}function ae(){for(var ge,ne,O=new Promise(function(Q,q){ge=Q,ne=q}),I=[],ee=0;ee<arguments.length;ee++)I.push(arguments[ee]);I.push(function(Q,q){Q?ne(Q):ge(q)});try{re.apply(this,I)}catch(Q){ne(Q)}return O}return Object.setPrototypeOf(ae,Object.getPrototypeOf(re)),J&&Object.defineProperty(ae,J,{value:ae,enumerable:!1,writable:!1,configurable:!0}),Object.defineProperties(ae,e(re))},t.promisify.custom=J;function de(B,re){if(!B){var ae=new Error("Promise was rejected with a falsy value");ae.reason=B,B=ae}return re(B)}function G(B){if(typeof B!="function")throw new TypeError('The "original" argument must be of type Function');function re(){for(var ae=[],ge=0;ge<arguments.length;ge++)ae.push(arguments[ge]);var ne=ae.pop();if(typeof ne!="function")throw new TypeError("The last argument must be of type Function");var O=this,I=function(){return ne.apply(O,arguments)};B.apply(this,ae).then(function(ee){nt.nextTick(I.bind(null,null,ee))},function(ee){nt.nextTick(de.bind(null,ee,I))})}return Object.setPrototypeOf(re,Object.getPrototypeOf(B)),Object.defineProperties(re,e(B)),re}t.callbackify=G}(tb)),tb}var Xb,a6;function Jfe(){if(a6)return Xb;a6=1;function t(p,f){var m=Object.keys(p);if(Object.getOwnPropertySymbols){var y=Object.getOwnPropertySymbols(p);f&&(y=y.filter(function(k){return Object.getOwnPropertyDescriptor(p,k).enumerable})),m.push.apply(m,y)}return m}function e(p){for(var f=1;f<arguments.length;f++){var m=arguments[f]!=null?arguments[f]:{};f%2?t(Object(m),!0).forEach(function(y){r(p,y,m[y])}):Object.getOwnPropertyDescriptors?Object.defineProperties(p,Object.getOwnPropertyDescriptors(m)):t(Object(m)).forEach(function(y){Object.defineProperty(p,y,Object.getOwnPropertyDescriptor(m,y))})}return p}function r(p,f,m){return f in p?Object.defineProperty(p,f,{value:m,enumerable:!0,configurable:!0,writable:!0}):p[f]=m,p}function n(p,f){if(!(p instanceof f))throw new TypeError("Cannot call a class as a function")}function s(p,f){for(var m=0;m<f.length;m++){var y=f[m];y.enumerable=y.enumerable||!1,y.configurable=!0,"value"in y&&(y.writable=!0),Object.defineProperty(p,y.key,y)}}function i(p,f,m){return f&&s(p.prototype,f),p}var a=ux(),l=a.Buffer,c=qM(),u=c.inspect,d=u&&u.custom||"inspect";function h(p,f,m){l.prototype.copy.call(p,f,m)}return Xb=function(){function p(){n(this,p),this.head=null,this.tail=null,this.length=0}return i(p,[{key:"push",value:function(m){var y={data:m,next:null};this.length>0?this.tail.next=y:this.head=y,this.tail=y,++this.length}},{key:"unshift",value:function(m){var y={data:m,next:this.head};this.length===0&&(this.tail=y),this.head=y,++this.length}},{key:"shift",value:function(){if(this.length!==0){var m=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,m}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(m){if(this.length===0)return"";for(var y=this.head,k=""+y.data;y=y.next;)k+=m+y.data;return k}},{key:"concat",value:function(m){if(this.length===0)return l.alloc(0);for(var y=l.allocUnsafe(m>>>0),k=this.head,g=0;k;)h(k.data,y,g),g+=k.data.length,k=k.next;return y}},{key:"consume",value:function(m,y){var k;return m<this.head.data.length?(k=this.head.data.slice(0,m),this.head.data=this.head.data.slice(m)):m===this.head.data.length?k=this.shift():k=y?this._getString(m):this._getBuffer(m),k}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(m){var y=this.head,k=1,g=y.data;for(m-=g.length;y=y.next;){var x=y.data,w=m>x.length?x.length:m;if(w===x.length?g+=x:g+=x.slice(0,m),m-=w,m===0){w===x.length?(++k,y.next?this.head=y.next:this.head=this.tail=null):(this.head=y,y.data=x.slice(w));break}++k}return this.length-=k,g}},{key:"_getBuffer",value:function(m){var y=l.allocUnsafe(m),k=this.head,g=1;for(k.data.copy(y),m-=k.data.length;k=k.next;){var x=k.data,w=m>x.length?x.length:m;if(x.copy(y,y.length-m,0,w),m-=w,m===0){w===x.length?(++g,k.next?this.head=k.next:this.head=this.tail=null):(this.head=k,k.data=x.slice(w));break}++g}return this.length-=g,y}},{key:d,value:function(m,y){return u(this,e({},y,{depth:0,customInspect:!1}))}}]),p}(),Xb}var Qb,o6;function KM(){if(o6)return Qb;o6=1;function t(a,l){var c=this,u=this._readableState&&this._readableState.destroyed,d=this._writableState&&this._writableState.destroyed;return u||d?(l?l(a):a&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,nt.nextTick(s,this,a)):nt.nextTick(s,this,a)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(a||null,function(h){!l&&h?c._writableState?c._writableState.errorEmitted?nt.nextTick(r,c):(c._writableState.errorEmitted=!0,nt.nextTick(e,c,h)):nt.nextTick(e,c,h):l?(nt.nextTick(r,c),l(h)):nt.nextTick(r,c)}),this)}function e(a,l){s(a,l),r(a)}function r(a){a._writableState&&!a._writableState.emitClose||a._readableState&&!a._readableState.emitClose||a.emit("close")}function n(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function s(a,l){a.emit("error",l)}function i(a,l){var c=a._readableState,u=a._writableState;c&&c.autoDestroy||u&&u.autoDestroy?a.destroy(l):a.emit("error",l)}return Qb={destroy:t,undestroy:n,errorOrDestroy:i},Qb}var e1={},l6;
vendor: 14,453 bytes, line 935
935function Ld(){if(l6)return e1;l6=1;function t(l,c){l.prototype=Object.create(c.prototype),l.prototype.constructor=l,l.__proto__=c}var e={};function r(l,c,u){u||(u=Error);function d(p,f,m){return typeof c=="string"?c:c(p,f,m)}var h=function(p){t(f,p);function f(m,y,k){return p.call(this,d(m,y,k))||this}return f}(u);h.prototype.name=u.name,h.prototype.code=l,e[l]=h}function n(l,c){if(Array.isArray(l)){var u=l.length;return l=l.map(function(d){return String(d)}),u>2?"one of ".concat(c," ").concat(l.slice(0,u-1).join(", "),", or ")+l[u-1]:u===2?"one of ".concat(c," ").concat(l[0]," or ").concat(l[1]):"of ".concat(c," ").concat(l[0])}else return"of ".concat(c," ").concat(String(l))}function s(l,c,u){return l.substr(0,c.length)===c}function i(l,c,u){return(u===void 0||u>l.length)&&(u=l.length),l.substring(u-c.length,u)===c}function a(l,c,u){return typeof u!="number"&&(u=0),u+c.length>l.length?!1:l.indexOf(c,u)!==-1}return r("ERR_INVALID_OPT_VALUE",function(l,c){return'The value "'+c+'" is invalid for option "'+l+'"'},TypeError),r("ERR_INVALID_ARG_TYPE",function(l,c,u){var d;typeof c=="string"&&s(c,"not ")?(d="must not be",c=c.replace(/^not /,"")):d="must be";var h;if(i(l," argument"))h="The ".concat(l," ").concat(d," ").concat(n(c,"type"));else{var p=a(l,".")?"property":"argument";h='The "'.concat(l,'" ').concat(p," ").concat(d," ").concat(n(c,"type"))}return h+=". Received type ".concat(typeof u),h},TypeError),r("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),r("ERR_METHOD_NOT_IMPLEMENTED",function(l){return"The "+l+" method is not implemented"}),r("ERR_STREAM_PREMATURE_CLOSE","Premature close"),r("ERR_STREAM_DESTROYED",function(l){return"Cannot call "+l+" after a stream was destroyed"}),r("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),r("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),r("ERR_STREAM_WRITE_AFTER_END","write after end"),r("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),r("ERR_UNKNOWN_ENCODING",function(l){return"Unknown encoding: "+l},TypeError),r("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),e1.codes=e,e1}var t1,c6;function GM(){if(c6)return t1;c6=1;var t=Ld().codes.ERR_INVALID_OPT_VALUE;function e(n,s,i){return n.highWaterMark!=null?n.highWaterMark:s?n[i]:null}function r(n,s,i,a){var l=e(s,a,i);if(l!=null){if(!(isFinite(l)&&Math.floor(l)===l)||l<0){var c=a?i:"highWaterMark";throw new t(c,l)}return Math.floor(l)}return n.objectMode?16:16*1024}return t1={getHighWaterMark:r},t1}var r1,u6;function Xfe(){if(u6)return r1;u6=1,r1=t;function t(r,n){if(e("noDeprecation"))return r;var s=!1;function i(){if(!s){if(e("throwDeprecation"))throw new Error(n);e("traceDeprecation")?console.trace(n):console.warn(n),s=!0}return r.apply(this,arguments)}return i}function e(r){try{if(!vi.localStorage)return!1}catch{return!1}var n=vi.localStorage[r];return n==null?!1:String(n).toLowerCase()==="true"}return r1}var n1,d6;function ZM(){if(d6)return n1;d6=1,n1=_;function t(ne){var O=this;this.next=null,this.entry=null,this.finish=function(){ge(O,ne)}}var e;_.WritableState=A;var r={deprecate:Xfe()},n=LM(),s=ux().Buffer,i=vi.Uint8Array||function(){};function a(ne){return s.from(ne)}function l(ne){return s.isBuffer(ne)||ne instanceof i}var c=KM(),u=GM(),d=u.getHighWaterMark,h=Ld().codes,p=h.ERR_INVALID_ARG_TYPE,f=h.ERR_METHOD_NOT_IMPLEMENTED,m=h.ERR_MULTIPLE_CALLBACK,y=h.ERR_STREAM_CANNOT_PIPE,k=h.ERR_STREAM_DESTROYED,g=h.ERR_STREAM_NULL_VALUES,x=h.ERR_STREAM_WRITE_AFTER_END,w=h.ERR_UNKNOWN_ENCODING,b=c.errorOrDestroy;tl()(_,n);function v(){}function A(ne,O,I){e=e||ud(),ne=ne||{},typeof I!="boolean"&&(I=O instanceof e),this.objectMode=!!ne.objectMode,I&&(this.objectMode=this.objectMode||!!ne.writableObjectMode),this.highWaterMark=d(this,ne,"writableHighWaterMark",I),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var ee=ne.decodeStrings===!1;this.decodeStrings=!ee,this.defaultEncoding=ne.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(Q){Y(O,Q)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=ne.emitClose!==!1,this.autoDestroy=!!ne.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new t(this)}A.prototype.getBuffer=function(){for(var O=this.bufferedRequest,I=[];O;)I.push(O),O=O.next;return I},function(){try{Object.defineProperty(A.prototype,"buffer",{get:r.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}}();var C;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(C=Function.prototype[Symbol.hasInstance],Object.defineProperty(_,Symbol.hasInstance,{value:function(O){return C.call(this,O)?!0:this!==_?!1:O&&O._writableState instanceof A}})):C=function(O){return O instanceof this};function _(ne){e=e||ud();var O=this instanceof e;if(!O&&!C.call(_,this))return new _(ne);this._writableState=new A(ne,this,O),this.writable=!0,ne&&(typeof ne.write=="function"&&(this._write=ne.write),typeof ne.writev=="function"&&(this._writev=ne.writev),typeof ne.destroy=="function"&&(this._destroy=ne.destroy),typeof ne.final=="function"&&(this._final=ne.final)),n.call(this)}_.prototype.pipe=function(){b(this,new y)};function N(ne,O){var I=new x;b(ne,I),nt.nextTick(O,I)}function W(ne,O,I,ee){var Q;return I===null?Q=new g:typeof I!="string"&&!O.objectMode&&(Q=new p("chunk",["string","Buffer"],I)),Q?(b(ne,Q),nt.nextTick(ee,Q),!1):!0}_.prototype.write=function(ne,O,I){var ee=this._writableState,Q=!1,q=!ee.objectMode&&l(ne);return q&&!s.isBuffer(ne)&&(ne=a(ne)),typeof O=="function"&&(I=O,O=null),q?O="buffer":O||(O=ee.defaultEncoding),typeof I!="function"&&(I=v),ee.ending?N(this,I):(q||W(this,ee,ne,I))&&(ee.pendingcb++,Q=T(this,ee,q,ne,O,I)),Q},_.prototype.cork=function(){this._writableState.corked++},_.prototype.uncork=function(){var ne=this._writableState;ne.corked&&(ne.corked--,!ne.writing&&!ne.corked&&!ne.bufferProcessing&&ne.bufferedRequest&&J(this,ne))},_.prototype.setDefaultEncoding=function(O){if(typeof O=="string"&&(O=O.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((O+"").toLowerCase())>-1))throw new w(O);return this._writableState.defaultEncoding=O,this},Object.defineProperty(_.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function K(ne,O,I){return!ne.objectMode&&ne.decodeStrings!==!1&&typeof O=="string"&&(O=s.from(O,I)),O}Object.defineProperty(_.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function T(ne,O,I,ee,Q,q){if(!I){var Z=K(O,ee,Q);ee!==Z&&(I=!0,Q="buffer",ee=Z)}var me=O.objectMode?1:ee.length;O.length+=me;var z=O.length<O.highWaterMark;if(z||(O.needDrain=!0),O.writing||O.corked){var fe=O.lastBufferedRequest;O.lastBufferedRequest={chunk:ee,encoding:Q,isBuf:I,callback:q,next:null},fe?fe.next=O.lastBufferedRequest:O.bufferedRequest=O.lastBufferedRequest,O.bufferedRequestCount+=1}else F(ne,O,!1,me,ee,Q,q);return z}function F(ne,O,I,ee,Q,q,Z){O.writelen=ee,O.writecb=Z,O.writing=!0,O.sync=!0,O.destroyed?O.onwrite(new k("write")):I?ne._writev(Q,O.onwrite):ne._write(Q,q,O.onwrite),O.sync=!1}function E(ne,O,I,ee,Q){--O.pendingcb,I?(nt.nextTick(Q,ee),nt.nextTick(re,ne,O),ne._writableState.errorEmitted=!0,b(ne,ee)):(Q(ee),ne._writableState.errorEmitted=!0,b(ne,ee),re(ne,O))}function H(ne){ne.writing=!1,ne.writecb=null,ne.length-=ne.writelen,ne.writelen=0}function Y(ne,O){var I=ne._writableState,ee=I.sync,Q=I.writecb;if(typeof Q!="function")throw new m;if(H(I),O)E(ne,I,ee,O,Q);else{var q=de(I)||ne.destroyed;!q&&!I.corked&&!I.bufferProcessing&&I.bufferedRequest&&J(ne,I),ee?nt.nextTick($,ne,I,q,Q):$(ne,I,q,Q)}}function $(ne,O,I,ee){I||D(ne,O),O.pendingcb--,ee(),re(ne,O)}function D(ne,O){O.length===0&&O.needDrain&&(O.needDrain=!1,ne.emit("drain"))}function J(ne,O){O.bufferProcessing=!0;var I=O.bufferedRequest;if(ne._writev&&I&&I.next){var ee=O.bufferedRequestCount,Q=new Array(ee),q=O.corkedRequestsFree;q.entry=I;for(var Z=0,me=!0;I;)Q[Z]=I,I.isBuf||(me=!1),I=I.next,Z+=1;Q.allBuffers=me,F(ne,O,!0,O.length,Q,"",q.finish),O.pendingcb++,O.lastBufferedRequest=null,q.next?(O.corkedRequestsFree=q.next,q.next=null):O.corkedRequestsFree=new t(O),O.bufferedRequestCount=0}else{for(;I;){var z=I.chunk,fe=I.encoding,R=I.callback,j=O.objectMode?1:z.length;if(F(ne,O,!1,j,z,fe,R),I=I.next,O.bufferedRequestCount--,O.writing)break}I===null&&(O.lastBufferedRequest=null)}O.bufferedRequest=I,O.bufferProcessing=!1}_.prototype._write=function(ne,O,I){I(new f("_write()"))},_.prototype._writev=null,_.prototype.end=function(ne,O,I){var ee=this._writableState;return typeof ne=="function"?(I=ne,ne=null,O=null):typeof O=="function"&&(I=O,O=null),ne!=null&&this.write(ne,O),ee.corked&&(ee.corked=1,this.uncork()),ee.ending||ae(this,ee,I),this},Object.defineProperty(_.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function de(ne){return ne.ending&&ne.length===0&&ne.bufferedRequest===null&&!ne.finished&&!ne.writing}function G(ne,O){ne._final(function(I){O.pendingcb--,I&&b(ne,I),O.prefinished=!0,ne.emit("prefinish"),re(ne,O)})}function B(ne,O){!O.prefinished&&!O.finalCalled&&(typeof ne._final=="function"&&!O.destroyed?(O.pendingcb++,O.finalCalled=!0,nt.nextTick(G,ne,O)):(O.prefinished=!0,ne.emit("prefinish")))}function re(ne,O){var I=de(O);if(I&&(B(ne,O),O.pendingcb===0&&(O.finished=!0,ne.emit("finish"),O.autoDestroy))){var ee=ne._readableState;(!ee||ee.autoDestroy&&ee.endEmitted)&&ne.destroy()}return I}function ae(ne,O,I){O.ending=!0,re(ne,O),I&&(O.finished?nt.nextTick(I):ne.once("finish",I)),O.ended=!0,ne.writable=!1}function ge(ne,O,I){var ee=ne.entry;for(ne.entry=null;ee;){var Q=ee.callback;O.pendingcb--,Q(I),ee=ee.next}O.corkedRequestsFree.next=ne}return Object.defineProperty(_.prototype,"destroyed",{enumerable:!1,get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(O){this._writableState&&(this._writableState.destroyed=O)}}),_.prototype.destroy=c.destroy,_.prototype._undestroy=c.undestroy,_.prototype._destroy=function(ne,O){O(ne)},n1}var s1,h6;function ud(){if(h6)return s1;h6=1;var t=Object.keys||function(u){var d=[];for(var h in u)d.push(h);return d};s1=a;var e=YM(),r=ZM();tl()(a,e);for(var n=t(r.prototype),s=0;s<n.length;s++){var i=n[s];a.prototype[i]||(a.prototype[i]=r.prototype[i])}function a(u){if(!(this instanceof a))return new a(u);e.call(this,u),r.call(this,u),this.allowHalfOpen=!0,u&&(u.readable===!1&&(this.readable=!1),u.writable===!1&&(this.writable=!1),u.allowHalfOpen===!1&&(this.allowHalfOpen=!1,this.once("end",l)))}Object.defineProperty(a.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(a.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(a.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function l(){this._writableState.ended||nt.nextTick(c,this)}function c(u){u.end()}return Object.defineProperty(a.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set:function(d){this._readableState===void 0||this._writableState===void 0||(this._readableState.destroyed=d,this._writableState.destroyed=d)}}),s1}var i1={},Nm={exports:{}},p6;function Qfe(){return p6||(p6=1,function(t,e){var r=ux(),n=r.Buffer;function s(a,l){for(var c in a)l[c]=a[c]}n.from&&n.alloc&&n.allocUnsafe&&n.allocUnsafeSlow?t.exports=r:(s(r,e),e.Buffer=i);function i(a,l,c){return n(a,l,c)}s(n,i),i.from=function(a,l,c){if(typeof a=="number")throw new TypeError("Argument must not be a number");return n(a,l,c)},i.alloc=function(a,l,c){if(typeof a!="number")throw new TypeError("Argument must be a number");var u=n(a);return l!==void 0?typeof c=="string"?u.fill(l,c):u.fill(l):u.fill(0),u},i.allocUnsafe=function(a){if(typeof a!="number")throw new TypeError("Argument must be a number");return n(a)},i.allocUnsafeSlow=function(a){if(typeof a!="number")throw new TypeError("Argument must be a number");return r.SlowBuffer(a)}}(Nm,Nm.exports)),Nm.exports}var f6;function b2(){if(f6)return i1;f6=1;var t=Qfe().Buffer,e=t.isEncoding||function(g){switch(g=""+g,g&&g.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function r(g){if(!g)return"utf8";for(var x;;)switch(g){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return g;default:if(x)return;g=(""+g).toLowerCase(),x=!0}}function n(g){var x=r(g);if(typeof x!="string"&&(t.isEncoding===e||!e(g)))throw new Error("Unknown encoding: "+g);return x||g}i1.StringDecoder=s;function s(g){this.encoding=n(g);var x;switch(this.encoding){case"utf16le":this.text=h,this.end=p,x=4;break;case"utf8":this.fillLast=c,x=4;break;case"base64":this.text=f,this.end=m,x=3;break;default:this.write=y,this.end=k;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=t.allocUnsafe(x)}s.prototype.write=function(g){if(g.length===0)return"";var x,w;if(this.lastNeed){if(x=this.fillLast(g),x===void 0)return"";w=this.lastNeed,this.lastNeed=0}else w=0;return w<g.length?x?x+this.text(g,w):this.text(g,w):x||""},s.prototype.end=d,s.prototype.text=u,s.prototype.fillLast=function(g){if(this.lastNeed<=g.length)return g.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);g.copy(this.lastChar,this.lastTotal-this.lastNeed,0,g.length),this.lastNeed-=g.length};function i(g){return g<=127?0:g>>5===6?2:g>>4===14?3:g>>3===30?4:g>>6===2?-1:-2}function a(g,x,w){var b=x.length-1;if(b<w)return 0;var v=i(x[b]);return v>=0?(v>0&&(g.lastNeed=v-1),v):--b<w||v===-2?0:(v=i(x[b]),v>=0?(v>0&&(g.lastNeed=v-2),v):--b<w||v===-2?0:(v=i(x[b]),v>=0?(v>0&&(v===2?v=0:g.lastNeed=v-3),v):0))}
vendor: 9,839 bytes, line 935
935function l(g,x,w){if((x[0]&192)!==128)return g.lastNeed=0,"�";if(g.lastNeed>1&&x.length>1){if((x[1]&192)!==128)return g.lastNeed=1,"�";if(g.lastNeed>2&&x.length>2&&(x[2]&192)!==128)return g.lastNeed=2,"�"}}function c(g){var x=this.lastTotal-this.lastNeed,w=l(this,g);if(w!==void 0)return w;if(this.lastNeed<=g.length)return g.copy(this.lastChar,x,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);g.copy(this.lastChar,x,0,g.length),this.lastNeed-=g.length}function u(g,x){var w=a(this,g,x);if(!this.lastNeed)return g.toString("utf8",x);this.lastTotal=w;var b=g.length-(w-this.lastNeed);return g.copy(this.lastChar,0,b),g.toString("utf8",x,b)}function d(g){var x=g&&g.length?this.write(g):"";return this.lastNeed?x+"�":x}function h(g,x){if((g.length-x)%2===0){var w=g.toString("utf16le",x);if(w){var b=w.charCodeAt(w.length-1);if(b>=55296&&b<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=g[g.length-2],this.lastChar[1]=g[g.length-1],w.slice(0,-1)}return w}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=g[g.length-1],g.toString("utf16le",x,g.length-1)}function p(g){var x=g&&g.length?this.write(g):"";if(this.lastNeed){var w=this.lastTotal-this.lastNeed;return x+this.lastChar.toString("utf16le",0,w)}return x}function f(g,x){var w=(g.length-x)%3;return w===0?g.toString("base64",x):(this.lastNeed=3-w,this.lastTotal=3,w===1?this.lastChar[0]=g[g.length-1]:(this.lastChar[0]=g[g.length-2],this.lastChar[1]=g[g.length-1]),g.toString("base64",x,g.length-w))}function m(g){var x=g&&g.length?this.write(g):"";return this.lastNeed?x+this.lastChar.toString("base64",0,3-this.lastNeed):x}function y(g){return g.toString(this.encoding)}function k(g){return g&&g.length?this.write(g):""}return i1}var a1,m6;function AN(){if(m6)return a1;m6=1;var t=Ld().codes.ERR_STREAM_PREMATURE_CLOSE;function e(i){var a=!1;return function(){if(!a){a=!0;for(var l=arguments.length,c=new Array(l),u=0;u<l;u++)c[u]=arguments[u];i.apply(this,c)}}}function r(){}function n(i){return i.setHeader&&typeof i.abort=="function"}function s(i,a,l){if(typeof a=="function")return s(i,null,a);a||(a={}),l=e(l||r);var c=a.readable||a.readable!==!1&&i.readable,u=a.writable||a.writable!==!1&&i.writable,d=function(){i.writable||p()},h=i._writableState&&i._writableState.finished,p=function(){u=!1,h=!0,c||l.call(i)},f=i._readableState&&i._readableState.endEmitted,m=function(){c=!1,f=!0,u||l.call(i)},y=function(w){l.call(i,w)},k=function(){var w;if(c&&!f)return(!i._readableState||!i._readableState.ended)&&(w=new t),l.call(i,w);if(u&&!h)return(!i._writableState||!i._writableState.ended)&&(w=new t),l.call(i,w)},g=function(){i.req.on("finish",p)};return n(i)?(i.on("complete",p),i.on("abort",k),i.req?g():i.on("request",g)):u&&!i._writableState&&(i.on("end",d),i.on("close",d)),i.on("end",m),i.on("finish",p),a.error!==!1&&i.on("error",y),i.on("close",k),function(){i.removeListener("complete",p),i.removeListener("abort",k),i.removeListener("request",g),i.req&&i.req.removeListener("finish",p),i.removeListener("end",d),i.removeListener("close",d),i.removeListener("finish",p),i.removeListener("end",m),i.removeListener("error",y),i.removeListener("close",k)}}return a1=s,a1}var o1,g6;function eme(){if(g6)return o1;g6=1;var t;function e(g,x,w){return x in g?Object.defineProperty(g,x,{value:w,enumerable:!0,configurable:!0,writable:!0}):g[x]=w,g}var r=AN(),n=Symbol("lastResolve"),s=Symbol("lastReject"),i=Symbol("error"),a=Symbol("ended"),l=Symbol("lastPromise"),c=Symbol("handlePromise"),u=Symbol("stream");function d(g,x){return{value:g,done:x}}function h(g){var x=g[n];if(x!==null){var w=g[u].read();w!==null&&(g[l]=null,g[n]=null,g[s]=null,x(d(w,!1)))}}function p(g){nt.nextTick(h,g)}function f(g,x){return function(w,b){g.then(function(){if(x[a]){w(d(void 0,!0));return}x[c](w,b)},b)}}var m=Object.getPrototypeOf(function(){}),y=Object.setPrototypeOf((t={get stream(){return this[u]},next:function(){var x=this,w=this[i];if(w!==null)return Promise.reject(w);if(this[a])return Promise.resolve(d(void 0,!0));if(this[u].destroyed)return new Promise(function(C,_){nt.nextTick(function(){x[i]?_(x[i]):C(d(void 0,!0))})});var b=this[l],v;if(b)v=new Promise(f(b,this));else{var A=this[u].read();if(A!==null)return Promise.resolve(d(A,!1));v=new Promise(this[c])}return this[l]=v,v}},e(t,Symbol.asyncIterator,function(){return this}),e(t,"return",function(){var x=this;return new Promise(function(w,b){x[u].destroy(null,function(v){if(v){b(v);return}w(d(void 0,!0))})})}),t),m),k=function(x){var w,b=Object.create(y,(w={},e(w,u,{value:x,writable:!0}),e(w,n,{value:null,writable:!0}),e(w,s,{value:null,writable:!0}),e(w,i,{value:null,writable:!0}),e(w,a,{value:x._readableState.endEmitted,writable:!0}),e(w,c,{value:function(A,C){var _=b[u].read();_?(b[l]=null,b[n]=null,b[s]=null,A(d(_,!1))):(b[n]=A,b[s]=C)},writable:!0}),w));return b[l]=null,r(x,function(v){if(v&&v.code!=="ERR_STREAM_PREMATURE_CLOSE"){var A=b[s];A!==null&&(b[l]=null,b[n]=null,b[s]=null,A(v)),b[i]=v;return}var C=b[n];C!==null&&(b[l]=null,b[n]=null,b[s]=null,C(d(void 0,!0))),b[a]=!0}),x.on("readable",p.bind(null,b)),b};return o1=k,o1}var l1,y6;function tme(){return y6||(y6=1,l1=function(){throw new Error("Readable.from is not available in the browser")}),l1}var c1,x6;function YM(){if(x6)return c1;x6=1,c1=N;var t;N.ReadableState=_,NN().EventEmitter;var e=function(Z,me){return Z.listeners(me).length},r=LM(),n=ux().Buffer,s=vi.Uint8Array||function(){};function i(q){return n.from(q)}function a(q){return n.isBuffer(q)||q instanceof s}var l=qM(),c;l&&l.debuglog?c=l.debuglog("stream"):c=function(){};var u=Jfe(),d=KM(),h=GM(),p=h.getHighWaterMark,f=Ld().codes,m=f.ERR_INVALID_ARG_TYPE,y=f.ERR_STREAM_PUSH_AFTER_EOF,k=f.ERR_METHOD_NOT_IMPLEMENTED,g=f.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,x,w,b;tl()(N,r);var v=d.errorOrDestroy,A=["error","close","destroy","pause","resume"];function C(q,Z,me){if(typeof q.prependListener=="function")return q.prependListener(Z,me);!q._events||!q._events[Z]?q.on(Z,me):Array.isArray(q._events[Z])?q._events[Z].unshift(me):q._events[Z]=[me,q._events[Z]]}function _(q,Z,me){t=t||ud(),q=q||{},typeof me!="boolean"&&(me=Z instanceof t),this.objectMode=!!q.objectMode,me&&(this.objectMode=this.objectMode||!!q.readableObjectMode),this.highWaterMark=p(this,q,"readableHighWaterMark",me),this.buffer=new u,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=q.emitClose!==!1,this.autoDestroy=!!q.autoDestroy,this.destroyed=!1,this.defaultEncoding=q.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,q.encoding&&(x||(x=b2().StringDecoder),this.decoder=new x(q.encoding),this.encoding=q.encoding)}function N(q){if(t=t||ud(),!(this instanceof N))return new N(q);var Z=this instanceof t;this._readableState=new _(q,this,Z),this.readable=!0,q&&(typeof q.read=="function"&&(this._read=q.read),typeof q.destroy=="function"&&(this._destroy=q.destroy)),r.call(this)}Object.defineProperty(N.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(Z){this._readableState&&(this._readableState.destroyed=Z)}}),N.prototype.destroy=d.destroy,N.prototype._undestroy=d.undestroy,N.prototype._destroy=function(q,Z){Z(q)},N.prototype.push=function(q,Z){var me=this._readableState,z;return me.objectMode?z=!0:typeof q=="string"&&(Z=Z||me.defaultEncoding,Z!==me.encoding&&(q=n.from(q,Z),Z=""),z=!0),W(this,q,Z,!1,z)},N.prototype.unshift=function(q){return W(this,q,null,!0,!1)};function W(q,Z,me,z,fe){c("readableAddChunk",Z);var R=q._readableState;if(Z===null)R.reading=!1,Y(q,R);else{var j;if(fe||(j=T(R,Z)),j)v(q,j);else if(R.objectMode||Z&&Z.length>0)if(typeof Z!="string"&&!R.objectMode&&Object.getPrototypeOf(Z)!==n.prototype&&(Z=i(Z)),z)R.endEmitted?v(q,new g):K(q,R,Z,!0);else if(R.ended)v(q,new y);else{if(R.destroyed)return!1;R.reading=!1,R.decoder&&!me?(Z=R.decoder.write(Z),R.objectMode||Z.length!==0?K(q,R,Z,!1):J(q,R)):K(q,R,Z,!1)}else z||(R.reading=!1,J(q,R))}return!R.ended&&(R.length<R.highWaterMark||R.length===0)}function K(q,Z,me,z){Z.flowing&&Z.length===0&&!Z.sync?(Z.awaitDrain=0,q.emit("data",me)):(Z.length+=Z.objectMode?1:me.length,z?Z.buffer.unshift(me):Z.buffer.push(me),Z.needReadable&&$(q)),J(q,Z)}function T(q,Z){var me;return!a(Z)&&typeof Z!="string"&&Z!==void 0&&!q.objectMode&&(me=new m("chunk",["string","Buffer","Uint8Array"],Z)),me}N.prototype.isPaused=function(){return this._readableState.flowing===!1},N.prototype.setEncoding=function(q){x||(x=b2().StringDecoder);var Z=new x(q);this._readableState.decoder=Z,this._readableState.encoding=this._readableState.decoder.encoding;for(var me=this._readableState.buffer.head,z="";me!==null;)z+=Z.write(me.data),me=me.next;return this._readableState.buffer.clear(),z!==""&&this._readableState.buffer.push(z),this._readableState.length=z.length,this};var F=1073741824;function E(q){return q>=F?q=F:(q--,q|=q>>>1,q|=q>>>2,q|=q>>>4,q|=q>>>8,q|=q>>>16,q++),q}function H(q,Z){return q<=0||Z.length===0&&Z.ended?0:Z.objectMode?1:q!==q?Z.flowing&&Z.length?Z.buffer.head.data.length:Z.length:(q>Z.highWaterMark&&(Z.highWaterMark=E(q)),q<=Z.length?q:Z.ended?Z.length:(Z.needReadable=!0,0))}N.prototype.read=function(q){c("read",q),q=parseInt(q,10);var Z=this._readableState,me=q;if(q!==0&&(Z.emittedReadable=!1),q===0&&Z.needReadable&&((Z.highWaterMark!==0?Z.length>=Z.highWaterMark:Z.length>0)||Z.ended))return c("read: emitReadable",Z.length,Z.ended),Z.length===0&&Z.ended?I(this):$(this),null;if(q=H(q,Z),q===0&&Z.ended)return Z.length===0&&I(this),null;var z=Z.needReadable;c("need readable",z),(Z.length===0||Z.length-q<Z.highWaterMark)&&
vendor: 5,102 bytes, line 935
935(z=!0,c("length less than watermark",z)),Z.ended||Z.reading?(z=!1,c("reading or ended",z)):z&&(c("do read"),Z.reading=!0,Z.sync=!0,Z.length===0&&(Z.needReadable=!0),this._read(Z.highWaterMark),Z.sync=!1,Z.reading||(q=H(me,Z)));var fe;return q>0?fe=O(q,Z):fe=null,fe===null?(Z.needReadable=Z.length<=Z.highWaterMark,q=0):(Z.length-=q,Z.awaitDrain=0),Z.length===0&&(Z.ended||(Z.needReadable=!0),me!==q&&Z.ended&&I(this)),fe!==null&&this.emit("data",fe),fe};function Y(q,Z){if(c("onEofChunk"),!Z.ended){if(Z.decoder){var me=Z.decoder.end();me&&me.length&&(Z.buffer.push(me),Z.length+=Z.objectMode?1:me.length)}Z.ended=!0,Z.sync?$(q):(Z.needReadable=!1,Z.emittedReadable||(Z.emittedReadable=!0,D(q)))}}function $(q){var Z=q._readableState;c("emitReadable",Z.needReadable,Z.emittedReadable),Z.needReadable=!1,Z.emittedReadable||(c("emitReadable",Z.flowing),Z.emittedReadable=!0,nt.nextTick(D,q))}function D(q){var Z=q._readableState;c("emitReadable_",Z.destroyed,Z.length,Z.ended),!Z.destroyed&&(Z.length||Z.ended)&&(q.emit("readable"),Z.emittedReadable=!1),Z.needReadable=!Z.flowing&&!Z.ended&&Z.length<=Z.highWaterMark,ne(q)}function J(q,Z){Z.readingMore||(Z.readingMore=!0,nt.nextTick(de,q,Z))}function de(q,Z){for(;!Z.reading&&!Z.ended&&(Z.length<Z.highWaterMark||Z.flowing&&Z.length===0);){var me=Z.length;if(c("maybeReadMore read 0"),q.read(0),me===Z.length)break}Z.readingMore=!1}N.prototype._read=function(q){v(this,new k("_read()"))},N.prototype.pipe=function(q,Z){var me=this,z=this._readableState;switch(z.pipesCount){case 0:z.pipes=q;break;case 1:z.pipes=[z.pipes,q];break;default:z.pipes.push(q);break}z.pipesCount+=1,c("pipe count=%d opts=%j",z.pipesCount,Z);var fe=(!Z||Z.end!==!1)&&q!==nt.stdout&&q!==nt.stderr,R=fe?S:he;z.endEmitted?nt.nextTick(R):me.once("end",R),q.on("unpipe",j);function j(we,Te){c("onunpipe"),we===me&&Te&&Te.hasUnpiped===!1&&(Te.hasUnpiped=!0,V())}function S(){c("onend"),q.end()}var P=G(me);q.on("drain",P);var L=!1;function V(){c("cleanup"),q.removeListener("close",ce),q.removeListener("finish",X),q.removeListener("drain",P),q.removeListener("error",oe),q.removeListener("unpipe",j),me.removeListener("end",S),me.removeListener("end",he),me.removeListener("data",U),L=!0,z.awaitDrain&&(!q._writableState||q._writableState.needDrain)&&P()}me.on("data",U);function U(we){c("ondata");var Te=q.write(we);c("dest.write",Te),Te===!1&&((z.pipesCount===1&&z.pipes===q||z.pipesCount>1&&Q(z.pipes,q)!==-1)&&!L&&(c("false write response, pause",z.awaitDrain),z.awaitDrain++),me.pause())}function oe(we){c("onerror",we),he(),q.removeListener("error",oe),e(q,"error")===0&&v(q,we)}C(q,"error",oe);function ce(){q.removeListener("finish",X),he()}q.once("close",ce);function X(){c("onfinish"),q.removeListener("close",ce),he()}q.once("finish",X);function he(){c("unpipe"),me.unpipe(q)}return q.emit("pipe",me),z.flowing||(c("pipe resume"),me.resume()),q};function G(q){return function(){var me=q._readableState;c("pipeOnDrain",me.awaitDrain),me.awaitDrain&&me.awaitDrain--,me.awaitDrain===0&&e(q,"data")&&(me.flowing=!0,ne(q))}}N.prototype.unpipe=function(q){var Z=this._readableState,me={hasUnpiped:!1};if(Z.pipesCount===0)return this;if(Z.pipesCount===1)return q&&q!==Z.pipes?this:(q||(q=Z.pipes),Z.pipes=null,Z.pipesCount=0,Z.flowing=!1,q&&q.emit("unpipe",this,me),this);if(!q){var z=Z.pipes,fe=Z.pipesCount;Z.pipes=null,Z.pipesCount=0,Z.flowing=!1;for(var R=0;R<fe;R++)z[R].emit("unpipe",this,{hasUnpiped:!1});return this}var j=Q(Z.pipes,q);return j===-1?this:(Z.pipes.splice(j,1),Z.pipesCount-=1,Z.pipesCount===1&&(Z.pipes=Z.pipes[0]),q.emit("unpipe",this,me),this)},N.prototype.on=function(q,Z){var me=r.prototype.on.call(this,q,Z),z=this._readableState;return q==="data"?(z.readableListening=this.listenerCount("readable")>0,z.flowing!==!1&&this.resume()):q==="readable"&&!z.endEmitted&&!z.readableListening&&(z.readableListening=z.needReadable=!0,z.flowing=!1,z.emittedReadable=!1,c("on readable",z.length,z.reading),z.length?$(this):z.reading||nt.nextTick(re,this)),me},N.prototype.addListener=N.prototype.on,N.prototype.removeListener=function(q,Z){var me=r.prototype.removeListener.call(this,q,Z);return q==="readable"&&nt.nextTick(B,this),me},N.prototype.removeAllListeners=function(q){var Z=r.prototype.removeAllListeners.apply(this,arguments);return(q==="readable"||q===void 0)&&nt.nextTick(B,this),Z};function B(q){var Z=q._readableState;Z.readableListening=q.listenerCount("readable")>0,Z.resumeScheduled&&!Z.paused?Z.flowing=!0:q.listenerCount("data")>0&&q.resume()}function re(q){c("readable nexttick read 0"),q.read(0)}N.prototype.resume=function(){var q=this._readableState;return q.flowing||(c("resume"),q.flowing=!q.readableListening,ae(this,q)),q.paused=!1,this};function ae(q,Z){Z.resumeScheduled||(Z.resumeScheduled=!0,nt.nextTick(ge,q,Z))}function ge(q,Z){c("resume",Z.reading),Z.reading||q.read(0),Z.resumeScheduled=!1,q.emit("resume"),ne(q),Z.flowing&&!Z.reading&&q.read(0)}N.prototype.pause=function(){return c("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(c("pause"),this._readableState.flowing=!1,this.emit
vendor: 4,551 bytes, line 935
935("pause")),this._readableState.paused=!0,this};function ne(q){var Z=q._readableState;for(c("flow",Z.flowing);Z.flowing&&q.read()!==null;);}N.prototype.wrap=function(q){var Z=this,me=this._readableState,z=!1;q.on("end",function(){if(c("wrapped end"),me.decoder&&!me.ended){var j=me.decoder.end();j&&j.length&&Z.push(j)}Z.push(null)}),q.on("data",function(j){if(c("wrapped data"),me.decoder&&(j=me.decoder.write(j)),!(me.objectMode&&j==null)&&!(!me.objectMode&&(!j||!j.length))){var S=Z.push(j);S||(z=!0,q.pause())}});for(var fe in q)this[fe]===void 0&&typeof q[fe]=="function"&&(this[fe]=function(S){return function(){return q[S].apply(q,arguments)}}(fe));for(var R=0;R<A.length;R++)q.on(A[R],this.emit.bind(this,A[R]));return this._read=function(j){c("wrapped _read",j),z&&(z=!1,q.resume())},this},typeof Symbol=="function"&&(N.prototype[Symbol.asyncIterator]=function(){return w===void 0&&(w=eme()),w(this)}),Object.defineProperty(N.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(N.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(N.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(Z){this._readableState&&(this._readableState.flowing=Z)}}),N._fromList=O,Object.defineProperty(N.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}});function O(q,Z){if(Z.length===0)return null;var me;return Z.objectMode?me=Z.buffer.shift():!q||q>=Z.length?(Z.decoder?me=Z.buffer.join(""):Z.buffer.length===1?me=Z.buffer.first():me=Z.buffer.concat(Z.length),Z.buffer.clear()):me=Z.buffer.consume(q,Z.decoder),me}function I(q){var Z=q._readableState;c("endReadable",Z.endEmitted),Z.endEmitted||(Z.ended=!0,nt.nextTick(ee,Z,q))}function ee(q,Z){if(c("endReadableNT",q.endEmitted,q.length),!q.endEmitted&&q.length===0&&(q.endEmitted=!0,Z.readable=!1,Z.emit("end"),q.autoDestroy)){var me=Z._writableState;(!me||me.autoDestroy&&me.finished)&&Z.destroy()}}typeof Symbol=="function"&&(N.from=function(q,Z){return b===void 0&&(b=tme()),b(N,q,Z)});function Q(q,Z){for(var me=0,z=q.length;me<z;me++)if(q[me]===Z)return me;return-1}return c1}var u1,w6;function JM(){if(w6)return u1;w6=1,u1=l;var t=Ld().codes,e=t.ERR_METHOD_NOT_IMPLEMENTED,r=t.ERR_MULTIPLE_CALLBACK,n=t.ERR_TRANSFORM_ALREADY_TRANSFORMING,s=t.ERR_TRANSFORM_WITH_LENGTH_0,i=ud();tl()(l,i);function a(d,h){var p=this._transformState;p.transforming=!1;var f=p.writecb;if(f===null)return this.emit("error",new r);p.writechunk=null,p.writecb=null,h!=null&&this.push(h),f(d);var m=this._readableState;m.reading=!1,(m.needReadable||m.length<m.highWaterMark)&&this._read(m.highWaterMark)}function l(d){if(!(this instanceof l))return new l(d);i.call(this,d),this._transformState={afterTransform:a.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,d&&(typeof d.transform=="function"&&(this._transform=d.transform),typeof d.flush=="function"&&(this._flush=d.flush)),this.on("prefinish",c)}function c(){var d=this;typeof this._flush=="function"&&!this._readableState.destroyed?this._flush(function(h,p){u(d,h,p)}):u(this,null,null)}l.prototype.push=function(d,h){return this._transformState.needTransform=!1,i.prototype.push.call(this,d,h)},l.prototype._transform=function(d,h,p){p(new e("_transform()"))},l.prototype._write=function(d,h,p){var f=this._transformState;if(f.writecb=p,f.writechunk=d,f.writeencoding=h,!f.transforming){var m=this._readableState;(f.needTransform||m.needReadable||m.length<m.highWaterMark)&&this._read(m.highWaterMark)}},l.prototype._read=function(d){var h=this._transformState;h.writechunk!==null&&!h.transforming?(h.transforming=!0,this._transform(h.writechunk,h.writeencoding,h.afterTransform)):h.needTransform=!0},l.prototype._destroy=function(d,h){i.prototype._destroy.call(this,d,function(p){h(p)})};function u(d,h,p){if(h)return d.emit("error",h);if(p!=null&&d.push(p),d._writableState.length)throw new s;if(d._transformState.transforming)throw new n;return d.push(null)}return u1}var d1,b6;function rme(){if(b6)return d1;b6=1,d1=e;var t=JM();tl()(e,t);function e(r){if(!(this instanceof e))return new e(r);t.call(this,r)}return e.prototype._transform=function(r,n,s){s(null,r)},d1}var h1,k6;function nme(){if(k6)return h1;k6=1;var t;function e(p){var f=!1;return function(){f||(f=!0,p.apply(void 0,arguments))}}
935var r=Ld().codes,n=r.ERR_MISSING_ARGS,s=r.ERR_STREAM_DESTROYED;function i(p){if(p)throw p}function a(p){return p.setHeader&&typeof p.abort=="function"}function l(p,f,m,y){y=e(y);var k=!1;p.on("close",function(){k=!0}),t===void 0&&(t=AN()),t(p,{readable:f,writable:m},function(x){if(x)return y(x);k=!0,y()});var g=!1;return function(x){if(!k&&!g){if(g=!0,a(p))return p.abort();if(typeof p.destroy=="function")return p.destroy();y(x||new s("pipe"))}}}function c(p){p()}function u(p,f){return p.pipe(f)}function d(p){return!p.length||typeof p[p.length-1]!="function"?i:p.pop()}function h(){for(var p=arguments.length,f=new Array(p),m=0;m<p;m++)f[m]=arguments[m];var y=d(f);if(Array.isArray(f[0])&&(f=f[0]),f.length<2)throw new n("streams");var k,g=f.map(function(x,w){var b=w<f.length-1,v=w>0;return l(x,b,v,function(A){k||(k=A),A&&g.forEach(c),!b&&(g.forEach(c),y(k))})});return f.reduce(u)}return h1=h,h1}var p1,v6;function zN(){if(v6)return p1;v6=1,p1=r;var t=NN().EventEmitter,e=tl();e(r,t),r.Readable=YM(),r.Writable=ZM(),r.Duplex=ud(),r.Transform=JM(),r.PassThrough=rme(),r.finished=AN(),r.pipeline=nme(),r.Stream=r;function r(){t.call(this)}return r.prototype.pipe=function(n,s){var i=this;function a(f){n.writable&&n.write(f)===!1&&i.pause&&i.pause()}i.on("data",a);function l(){i.readable&&i.resume&&i.resume()}n.on("drain",l),!n._isStdio&&(!s||s.end!==!1)&&(i.on("end",u),i.on("close",d));var c=!1;function u(){c||(c=!0,n.end())}function d(){c||(c=!0,typeof n.destroy=="function"&&n.destroy())}function h(f){if(p(),t.listenerCount(this,"error")===0)throw f}i.on("error",h),n.on("error",h);function p(){i.removeListener("data",a),n.removeListener("drain",l),i.removeListener("end",u),i.removeListener("close",d),i.removeListener("error",h),n.removeListener("error",h),i.removeListener("end",p),i.removeListener("close",p),n.removeListener("close",p)}return i.on("end",p),i.on("close",p),n.on("close",p),n.emit("pipe",i),n},p1}var j6;function sme(){return j6||(j6=1,function(t){(function(e){e.parser=function(O,I){return new n(O,I)},e.SAXParser=n,e.SAXStream=d,e.createStream=u,e.MAX_BUFFER_LENGTH=64*1024;var r=["comment","sgmlDecl","textNode","tagName","doctype","procInstName","procInstBody","entity","attribName","attribValue","cdata","script"];e.EVENTS=["text","processinginstruction","sgmldeclaration","doctype","comment","opentagstart","attribute","opentag","closetag","opencdata","cdata","closecdata","error","end","ready","script","opennamespace","closenamespace"];function n(O,I){if(!(this instanceof n))return new n(O,I);var ee=this;i(ee),ee.q=ee.c="",ee.bufferCheckPosition=e.MAX_BUFFER_LENGTH,ee.opt=I||{},ee.opt.lowercase=ee.opt.lowercase||ee.opt.lowercasetags,ee.looseCase=ee.opt.lowercase?"toLowerCase":"toUpperCase",ee.tags=[],ee.closed=ee.closedRoot=ee.sawRoot=!1,ee.tag=ee.error=null,ee.strict=!!O,ee.noscript=!!(O||ee.opt.noscript),ee.state=N.BEGIN,ee.strictEntities=ee.opt.strictEntities,ee.ENTITIES=ee.strictEntities?Object.create(e.XML_ENTITIES):Object.create(e.ENTITIES),ee.attribList=[],ee.opt.xmlns&&(ee.ns=Object.create(y)),ee.trackPosition=ee.opt.position!==!1,ee.trackPosition&&(ee.position=ee.line=ee.column=0),K(ee,"onready")}Object.create||(Object.create=function(O){function I(){}I.prototype=O;var ee=new I;return ee}),Object.keys||(Object.keys=function(O){var I=[];for(var ee in O)O.hasOwnProperty(ee)&&I.push(ee);return I});function s(O){for(var I=Math.max(e.MAX_BUFFER_LENGTH,10),ee=0,Q=0,q=r.length;Q<q;Q++){var Z=O[r[Q]].length;if(Z>I)switch(r[Q]){case"textNode":F(O);break;case"cdata":T(O,"oncdata",O.cdata),O.cdata="";break;case"script":T(O,"onscript",O.script),O.script="";break;default:H(O,"Max buffer length exceeded: "+r[Q])}ee=Math.max(ee,Z)}var me=e.MAX_BUFFER_LENGTH-ee;O.bufferCheckPosition=me+O.position}function i(O){for(var I=0,ee=r.length;I<ee;I++)O[r[I]]=""}function a(O){F(O),O.cdata!==""&&(T(O,"oncdata",O.cdata),O.cdata=""),O.script!==""&&(T(O,"onscript",O.script),O.script="")}n.prototype={end:function(){Y(this)},write:ne,resume:function(){return this.error=null,this},close:function(){return this.write(null)},flush:function(){a(this)}};var l;try{l=zN().Stream}catch{l=function(){}}var c=e.EVENTS.filter(function(O){return O!=="error"&&O!=="end"});function u(O,I){return new d(O,I)}function d(O,I){if(!(this instanceof d))return new d(O,I);l.apply(this),this._parser=new n(O,I),this.writable=!0,this.readable=!0;var ee=this;this._parser.onend=function(){ee.emit("end")},this._parser.onerror=function(Q){ee.emit("error",Q),ee._parser.error=null}
vendor: 29,582 bytes, lines 935-945
935,this._decoder=null,c.forEach(function(Q){Object.defineProperty(ee,"on"+Q,{get:function(){return ee._parser["on"+Q]},set:function(q){if(!q)return ee.removeAllListeners(Q),ee._parser["on"+Q]=q,q;ee.on(Q,q)},enumerable:!0,configurable:!1})})}d.prototype=Object.create(l.prototype,{constructor:{value:d}}),d.prototype.write=function(O){if(typeof Buffer=="function"&&typeof Buffer.isBuffer=="function"&&Buffer.isBuffer(O)){if(!this._decoder){var I=b2().StringDecoder;this._decoder=new I("utf8")}O=this._decoder.write(O)}return this._parser.write(O.toString()),this.emit("data",O),!0},d.prototype.end=function(O){return O&&O.length&&this.write(O),this._parser.end(),!0},d.prototype.on=function(O,I){var ee=this;return!ee._parser["on"+O]&&c.indexOf(O)!==-1&&(ee._parser["on"+O]=function(){var Q=arguments.length===1?[arguments[0]]:Array.apply(null,arguments);Q.splice(0,0,O),ee.emit.apply(ee,Q)}),l.prototype.on.call(ee,O,I)};var h="[CDATA[",p="DOCTYPE",f="http://www.w3.org/XML/1998/namespace",m="http://www.w3.org/2000/xmlns/",y={xml:f,xmlns:m},k=/[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,g=/[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040.\d-]/,x=/[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,w=/[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040.\d-]/;function b(O){return O===" "||O===`
936`||O==="\r"||O==="	"}function v(O){return O==='"'||O==="'"}function A(O){return O===">"||b(O)}function C(O,I){return O.test(I)}function _(O,I){return!C(O,I)}var N=0;e.STATE={BEGIN:N++,BEGIN_WHITESPACE:N++,TEXT:N++,TEXT_ENTITY:N++,OPEN_WAKA:N++,SGML_DECL:N++,SGML_DECL_QUOTED:N++,DOCTYPE:N++,DOCTYPE_QUOTED:N++,DOCTYPE_DTD:N++,DOCTYPE_DTD_QUOTED:N++,COMMENT_STARTING:N++,COMMENT:N++,COMMENT_ENDING:N++,COMMENT_ENDED:N++,CDATA:N++,CDATA_ENDING:N++,CDATA_ENDING_2:N++,PROC_INST:N++,PROC_INST_BODY:N++,PROC_INST_ENDING:N++,OPEN_TAG:N++,OPEN_TAG_SLASH:N++,ATTRIB:N++,ATTRIB_NAME:N++,ATTRIB_NAME_SAW_WHITE:N++,ATTRIB_VALUE:N++,ATTRIB_VALUE_QUOTED:N++,ATTRIB_VALUE_CLOSED:N++,ATTRIB_VALUE_UNQUOTED:N++,ATTRIB_VALUE_ENTITY_Q:N++,ATTRIB_VALUE_ENTITY_U:N++,CLOSE_TAG:N++,CLOSE_TAG_SAW_WHITE:N++,SCRIPT:N++,SCRIPT_ENDING:N++},e.XML_ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'"},e.ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'",AElig:198,Aacute:193,Acirc:194,Agrave:192,Aring:197,Atilde:195,Auml:196,Ccedil:199,ETH:208,Eacute:201,Ecirc:202,Egrave:200,Euml:203,Iacute:205,Icirc:206,Igrave:204,Iuml:207,Ntilde:209,Oacute:211,Ocirc:212,Ograve:210,Oslash:216,Otilde:213,Ouml:214,THORN:222,Uacute:218,Ucirc:219,Ugrave:217,Uuml:220,Yacute:221,aacute:225,acirc:226,aelig:230,agrave:224,aring:229,atilde:227,auml:228,ccedil:231,eacute:233,ecirc:234,egrave:232,eth:240,euml:235,iacute:237,icirc:238,igrave:236,iuml:239,ntilde:241,oacute:243,ocirc:244,ograve:242,oslash:248,otilde:245,ouml:246,szlig:223,thorn:254,uacute:250,ucirc:251,ugrave:249,uuml:252,yacute:253,yuml:255,copy:169,reg:174,nbsp:160,iexcl:161,cent:162,pound:163,curren:164,yen:165,brvbar:166,sect:167,uml:168,ordf:170,laquo:171,not:172,shy:173,macr:175,deg:176,plusmn:177,sup1:185,sup2:178,sup3:179,acute:180,micro:181,para:182,middot:183,cedil:184,ordm:186,raquo:187,frac14:188,frac12:189,frac34:190,iquest:191,times:215,divide:247,OElig:338,oelig:339,Scaron:352,scaron:353,Yuml:376,fnof:402,circ:710,tilde:732,Alpha:913,Beta:914,Gamma:915,Delta:916,Epsilon:917,Zeta:918,Eta:919,Theta:920,Iota:921,Kappa:922,Lambda:923,Mu:924,Nu:925,Xi:926,Omicron:927,Pi:928,Rho:929,Sigma:931,Tau:932,Upsilon:933,Phi:934,Chi:935,Psi:936,Omega:937,alpha:945,beta:946,gamma:947,delta:948,epsilon:949,zeta:950,eta:951,theta:952,iota:953,kappa:954,lambda:955,mu:956,nu:957,xi:958,omicron:959,pi:960,rho:961,sigmaf:962,sigma:963,tau:964,upsilon:965,phi:966,chi:967,psi:968,omega:969,thetasym:977,upsih:978,piv:982,ensp:8194,emsp:8195,thinsp:8201,zwnj:8204,zwj:8205,lrm:8206,rlm:8207,ndash:8211,mdash:8212,lsquo:8216,rsquo:8217,sbquo:8218,ldquo:8220,rdquo:8221,bdquo:8222,dagger:8224,Dagger:8225,bull:8226,hellip:8230,permil:8240,prime:8242,Prime:8243,lsaquo:8249,rsaquo:8250,oline:8254,frasl:8260,euro:8364,image:8465,weierp:8472,real:8476,trade:8482,alefsym:8501,larr:8592,uarr:8593,rarr:8594,darr:8595,harr:8596,crarr:8629,lArr:8656,uArr:8657,rArr:8658,dArr:8659,hArr:8660,forall:8704,part:8706,exist:8707,empty:8709,nabla:8711,isin:8712,notin:8713,ni:8715,prod:8719,sum:8721,minus:8722,lowast:8727,radic:8730,prop:8733,infin:8734,ang:8736,and:8743,or:8744,cap:8745,cup:8746,int:8747,there4:8756,sim:8764,cong:8773,asymp:8776,ne:8800,equiv:8801,le:8804,ge:8805,sub:8834,sup:8835,nsub:8836,sube:8838,supe:8839,oplus:8853,otimes:8855,perp:8869,sdot:8901,lceil:8968,rceil:8969,lfloor:8970,rfloor:8971,lang:9001,rang:9002,loz:9674,spades:9824,clubs:9827,hearts:9829,diams:9830},Object.keys(e.ENTITIES).forEach(function(O){var I=e.ENTITIES[O],ee=typeof I=="number"?String.fromCharCode(I):I;e.ENTITIES[O]=ee});for(var W in e.STATE)e.STATE[e.STATE[W]]=W;N=e.STATE;function K(O,I,ee){O[I]&&O[I](ee)}function T(O,I,ee){O.textNode&&F(O),K(O,I,ee)}function F(O){O.textNode=E(O.opt,O.textNode),O.textNode&&K(O,"ontext",O.textNode),O.textNode=""}function E(O,I){return O.trim&&(I=I.trim()),O.normalize&&(I=I.replace(/\s+/g," ")),I}function H(O,I){return F(O),O.trackPosition&&(I+=`
937Line: `+O.line+`
938Column: `+O.column+`
939Char: `+O.c),I=new Error(I),O.error=I,K(O,"onerror",I),O}function Y(O){return O.sawRoot&&!O.closedRoot&&$(O,"Unclosed root tag"),O.state!==N.BEGIN&&O.state!==N.BEGIN_WHITESPACE&&O.state!==N.TEXT&&H(O,"Unexpected end"),F(O),O.c="",O.closed=!0,K(O,"onend"),n.call(O,O.strict,O.opt),O}function $(O,I){if(typeof O!="object"||!(O instanceof n))throw new Error("bad call to strictFail");O.strict&&H(O,I)}function D(O){O.strict||(O.tagName=O.tagName[O.looseCase]());var I=O.tags[O.tags.length-1]||O,ee=O.tag={name:O.tagName,attributes:{}};O.opt.xmlns&&(ee.ns=I.ns),O.attribList.length=0,T(O,"onopentagstart",ee)}function J(O,I){var ee=O.indexOf(":"),Q=ee<0?["",O]:O.split(":"),q=Q[0],Z=Q[1];return I&&O==="xmlns"&&(q="xmlns",Z=""),{prefix:q,local:Z}}function de(O){if(O.strict||(O.attribName=O.attribName[O.looseCase]()),O.attribList.indexOf(O.attribName)!==-1||O.tag.attributes.hasOwnProperty(O.attribName)){O.attribName=O.attribValue="";return}if(O.opt.xmlns){var I=J(O.attribName,!0),ee=I.prefix,Q=I.local;if(ee==="xmlns")if(Q==="xml"&&O.attribValue!==f)$(O,"xml: prefix must be bound to "+f+`
940Actual: `+O.attribValue);else if(Q==="xmlns"&&O.attribValue!==m)$(O,"xmlns: prefix must be bound to "+m+`
941Actual: `+O.attribValue);else{var q=O.tag,Z=O.tags[O.tags.length-1]||O;q.ns===Z.ns&&(q.ns=Object.create(Z.ns)),q.ns[Q]=O.attribValue}O.attribList.push([O.attribName,O.attribValue])}else O.tag.attributes[O.attribName]=O.attribValue,T(O,"onattribute",{name:O.attribName,value:O.attribValue});O.attribName=O.attribValue=""}function G(O,I){if(O.opt.xmlns){var ee=O.tag,Q=J(O.tagName);ee.prefix=Q.prefix,ee.local=Q.local,ee.uri=ee.ns[Q.prefix]||"",ee.prefix&&!ee.uri&&($(O,"Unbound namespace prefix: "+JSON.stringify(O.tagName)),ee.uri=Q.prefix);var q=O.tags[O.tags.length-1]||O;ee.ns&&q.ns!==ee.ns&&Object.keys(ee.ns).forEach(function(U){T(O,"onopennamespace",{prefix:U,uri:ee.ns[U]})});for(var Z=0,me=O.attribList.length;Z<me;Z++){var z=O.attribList[Z],fe=z[0],R=z[1],j=J(fe,!0),S=j.prefix,P=j.local,L=S===""?"":ee.ns[S]||"",V={name:fe,value:R,prefix:S,local:P,uri:L};S&&S!=="xmlns"&&!L&&($(O,"Unbound namespace prefix: "+JSON.stringify(S)),V.uri=S),O.tag.attributes[fe]=V,T(O,"onattribute",V)}O.attribList.length=0}O.tag.isSelfClosing=!!I,O.sawRoot=!0,O.tags.push(O.tag),T(O,"onopentag",O.tag),I||(!O.noscript&&O.tagName.toLowerCase()==="script"?O.state=N.SCRIPT:O.state=N.TEXT,O.tag=null,O.tagName=""),O.attribName=O.attribValue="",O.attribList.length=0}function B(O){if(!O.tagName){$(O,"Weird empty close tag."),O.textNode+="</>",O.state=N.TEXT;return}if(O.script){if(O.tagName!=="script"){O.script+="</"+O.tagName+">",O.tagName="",O.state=N.SCRIPT;return}T(O,"onscript",O.script),O.script=""}var I=O.tags.length,ee=O.tagName;O.strict||(ee=ee[O.looseCase]());for(var Q=ee;I--;){var q=O.tags[I];if(q.name!==Q)$(O,"Unexpected close tag");else break}if(I<0){$(O,"Unmatched closing tag: "+O.tagName),O.textNode+="</"+O.tagName+">",O.state=N.TEXT;return}O.tagName=ee;for(var Z=O.tags.length;Z-- >I;){var me=O.tag=O.tags.pop();O.tagName=O.tag.name,T(O,"onclosetag",O.tagName);var z={};for(var fe in me.ns)z[fe]=me.ns[fe];var R=O.tags[O.tags.length-1]||O;O.opt.xmlns&&me.ns!==R.ns&&Object.keys(me.ns).forEach(function(j){var S=me.ns[j];T(O,"onclosenamespace",{prefix:j,uri:S})})}I===0&&(O.closedRoot=!0),O.tagName=O.attribValue=O.attribName="",O.attribList.length=0,O.state=N.TEXT}function re(O){var I=O.entity,ee=I.toLowerCase(),Q,q="";return O.ENTITIES[I]?O.ENTITIES[I]:O.ENTITIES[ee]?O.ENTITIES[ee]:(I=ee,I.charAt(0)==="#"&&(I.charAt(1)==="x"?(I=I.slice(2),Q=parseInt(I,16),q=Q.toString(16)):(I=I.slice(1),Q=parseInt(I,10),q=Q.toString(10))),I=I.replace(/^0+/,""),isNaN(Q)||q.toLowerCase()!==I?($(O,"Invalid character entity"),"&"+O.entity+";"):String.fromCodePoint(Q))}function ae(O,I){I==="<"?(O.state=N.OPEN_WAKA,O.startTagPosition=O.position):b(I)||($(O,"Non-whitespace before first tag."),O.textNode=I,O.state=N.TEXT)}function ge(O,I){var ee="";return I<O.length&&(ee=O.charAt(I)),ee}function ne(O){var I=this;if(this.error)throw this.error;if(I.closed)return H(I,"Cannot write after close. Assign an onready handler.");if(O===null)return Y(I);typeof O=="object"&&(O=O.toString());for(var ee=0,Q="";Q=ge(O,ee++),I.c=Q,!!Q;)switch(I.trackPosition&&(I.position++,Q===`
942`?(I.line++,I.column=0):I.column++),I.state){case N.BEGIN:if(I.state=N.BEGIN_WHITESPACE,Q==="\uFEFF")continue;ae(I,Q);continue;case N.BEGIN_WHITESPACE:ae(I,Q);continue;case N.TEXT:if(I.sawRoot&&!I.closedRoot){for(var q=ee-1;Q&&Q!=="<"&&Q!=="&";)Q=ge(O,ee++),Q&&I.trackPosition&&(I.position++,Q===`
943`?(I.line++,I.column=0):I.column++);I.textNode+=O.substring(q,ee-1)}Q==="<"&&!(I.sawRoot&&I.closedRoot&&!I.strict)?(I.state=N.OPEN_WAKA,I.startTagPosition=I.position):(!b(Q)&&(!I.sawRoot||I.closedRoot)&&$(I,"Text data outside of root node."),Q==="&"?I.state=N.TEXT_ENTITY:I.textNode+=Q);continue;case N.SCRIPT:Q==="<"?I.state=N.SCRIPT_ENDING:I.script+=Q;continue;case N.SCRIPT_ENDING:Q==="/"?I.state=N.CLOSE_TAG:(I.script+="<"+Q,I.state=N.SCRIPT);continue;case N.OPEN_WAKA:if(Q==="!")I.state=N.SGML_DECL,I.sgmlDecl="";else if(!b(Q))if(C(k,Q))I.state=N.OPEN_TAG,I.tagName=Q;else if(Q==="/")I.state=N.CLOSE_TAG,I.tagName="";else if(Q==="?")I.state=N.PROC_INST,I.procInstName=I.procInstBody="";else{if($(I,"Unencoded <"),I.startTagPosition+1<I.position){var Z=I.position-I.startTagPosition;Q=new Array(Z).join(" ")+Q}I.textNode+="<"+Q,I.state=N.TEXT}continue;case N.SGML_DECL:(I.sgmlDecl+Q).toUpperCase()===h?(T(I,"onopencdata"),I.state=N.CDATA,I.sgmlDecl="",I.cdata=""):I.sgmlDecl+Q==="--"?(I.state=N.COMMENT,I.comment="",I.sgmlDecl=""):(I.sgmlDecl+Q).toUpperCase()===p?(I.state=N.DOCTYPE,(I.doctype||I.sawRoot)&&$(I,"Inappropriately located doctype declaration"),I.doctype="",I.sgmlDecl=""):Q===">"?(T(I,"onsgmldeclaration",I.sgmlDecl),I.sgmlDecl="",I.state=N.TEXT):(v(Q)&&(I.state=N.SGML_DECL_QUOTED),I.sgmlDecl+=Q);continue;case N.SGML_DECL_QUOTED:Q===I.q&&(I.state=N.SGML_DECL,I.q=""),I.sgmlDecl+=Q;continue;case N.DOCTYPE:Q===">"?(I.state=N.TEXT,T(I,"ondoctype",I.doctype),I.doctype=!0):(I.doctype+=Q,Q==="["?I.state=N.DOCTYPE_DTD:v(Q)&&(I.state=N.DOCTYPE_QUOTED,I.q=Q));continue;case N.DOCTYPE_QUOTED:I.doctype+=Q,Q===I.q&&(I.q="",I.state=N.DOCTYPE);continue;case N.DOCTYPE_DTD:I.doctype+=Q,Q==="]"?I.state=N.DOCTYPE:v(Q)&&(I.state=N.DOCTYPE_DTD_QUOTED,I.q=Q);continue;case N.DOCTYPE_DTD_QUOTED:I.doctype+=Q,Q===I.q&&(I.state=N.DOCTYPE_DTD,I.q="");continue;case N.COMMENT:Q==="-"?I.state=N.COMMENT_ENDING:I.comment+=Q;continue;case N.COMMENT_ENDING:Q==="-"?(I.state=N.COMMENT_ENDED,I.comment=E(I.opt,I.comment),I.comment&&T(I,"oncomment",I.comment),I.comment=""):(I.comment+="-"+Q,I.state=N.COMMENT);continue;case N.COMMENT_ENDED:Q!==">"?($(I,"Malformed comment"),I.comment+="--"+Q,I.state=N.COMMENT):I.state=N.TEXT;continue;case N.CDATA:Q==="]"?I.state=N.CDATA_ENDING:I.cdata+=Q;continue;case N.CDATA_ENDING:Q==="]"?I.state=N.CDATA_ENDING_2:(I.cdata+="]"+Q,I.state=N.CDATA);continue;case N.CDATA_ENDING_2:Q===">"?(I.cdata&&T(I,"oncdata",I.cdata),T(I,"onclosecdata"),I.cdata="",I.state=N.TEXT):Q==="]"?I.cdata+="]":(I.cdata+="]]"+Q,I.state=N.CDATA);continue;case N.PROC_INST:Q==="?"?I.state=N.PROC_INST_ENDING:b(Q)?I.state=N.PROC_INST_BODY:I.procInstName+=Q;continue;case N.PROC_INST_BODY:if(!I.procInstBody&&b(Q))continue;Q==="?"?I.state=N.PROC_INST_ENDING:I.procInstBody+=Q;continue;case N.PROC_INST_ENDING:Q===">"?(T(I,"onprocessinginstruction",{name:I.procInstName,body:I.procInstBody}),I.procInstName=I.procInstBody="",I.state=N.TEXT):(I.procInstBody+="?"+Q,I.state=N.PROC_INST_BODY);continue;case N.OPEN_TAG:C(g,Q)?I.tagName+=Q:(D(I),Q===">"?G(I):Q==="/"?I.state=N.OPEN_TAG_SLASH:(b(Q)||$(I,"Invalid character in tag name"),I.state=N.ATTRIB));continue;case N.OPEN_TAG_SLASH:Q===">"?(G(I,!0),B(I)):($(I,"Forward-slash in opening tag not followed by >"),I.state=N.ATTRIB);continue;case N.ATTRIB:if(b(Q))continue;Q===">"?G(I):Q==="/"?I.state=N.OPEN_TAG_SLASH:C(k,Q)?(I.attribName=Q,I.attribValue="",I.state=N.ATTRIB_NAME):$(I,"Invalid attribute name");continue;case N.ATTRIB_NAME:Q==="="?I.state=N.ATTRIB_VALUE:Q===">"?($(I,"Attribute without value"),I.attribValue=I.attribName,de(I),G(I)):b(Q)?I.state=N.ATTRIB_NAME_SAW_WHITE:C(g,Q)?I.attribName+=Q:$(I,"Invalid attribute name");continue;case N.ATTRIB_NAME_SAW_WHITE:if(Q==="=")I.state=N.ATTRIB_VALUE;else{if(b(Q))continue;$(I,"Attribute without value"),I.tag.attributes[I.attribName]="",I.attribValue="",T(I,"onattribute",{name:I.attribName,value:""}),I.attribName="",Q===">"?G(I):C(k,Q)?(I.attribName=Q,I.state=N.ATTRIB_NAME):($(I,"Invalid attribute name"),I.state=N.ATTRIB)}continue;case N.ATTRIB_VALUE:if(b(Q))continue;v(Q)?(I.q=Q,I.state=N.ATTRIB_VALUE_QUOTED):($(I,"Unquoted attribute value"),I.state=N.ATTRIB_VALUE_UNQUOTED,I.attribValue=Q);continue;case N.ATTRIB_VALUE_QUOTED:if(Q!==I.q){Q==="&"?I.state=N.ATTRIB_VALUE_ENTITY_Q:I.attribValue+=Q;continue}de(I),I.q="",I.state=N.ATTRIB_VALUE_CLOSED;continue;case N.ATTRIB_VALUE_CLOSED:b(Q)?I.state=N.ATTRIB:Q===">"?G(I):Q==="/"?I.state=N.OPEN_TAG_SLASH:C(k,Q)?($(I,"No whitespace between attributes"),I.attribName=Q,I.attribValue="",I.state=N.ATTRIB_NAME):$(I,"Invalid attribute name");continue;case N.ATTRIB_VALUE_UNQUOTED:if(!A(Q)){Q==="&"?I.state=N.ATTRIB_VALUE_ENTITY_U:I.attribValue+=Q;continue}de(I),Q===">"?G(I):I.state=N.ATTRIB;continue;case N.CLOSE_TAG:if(I.tagName)Q===">"?B(I):C(g,Q)?I.tagName+=Q:I.script?(I.script+="</"+I.tagName,I.tagName="",I.state=N.SCRIPT):(b(Q)||$(I,"Invalid tagname in closing tag"),I.state=N.CLOSE_TAG_SAW_WHITE);else{if(b(Q))continue;_(k,Q)?I.script?(I.script+="</"+Q,I.state=N.SCRIPT):$(I,"Invalid tagname in closing tag."):I.tagName=Q}continue;case N.CLOSE_TAG_SAW_WHITE:if(b(Q))continue;Q===">"?B(I):$(I,"Invalid characters in closing tag");continue;case N.TEXT_ENTITY:case N.ATTRIB_VALUE_ENTITY_Q:case N.ATTRIB_VALUE_ENTITY_U:var me,z;switch(I.state){case N.TEXT_ENTITY:me=N.TEXT,z="textNode";break;case N.ATTRIB_VALUE_ENTITY_Q:me=N.ATTRIB_VALUE_QUOTED,z="attribValue";break;case N.ATTRIB_VALUE_ENTITY_U:me=N.ATTRIB_VALUE_UNQUOTED,z="attribValue";break}Q===";"?(I[z]+=re(I),I.entity="",I.state=me):C(I.entity.length?w:x,Q)?I.entity+=Q:($(I,"Invalid character in entity name"),I[z]+="&"+I.entity+Q,I.entity="",I.state=me);continue;default:throw new Error(I,"Unknown state: "+I.state)}return I.position>=I.bufferCheckPosition&&s(I),I}/*! http://mths.be/fromcodepoint v0.1.0 by @mathias */String.fromCodePoint||function(){var O=String.fromCharCode,I=Math.floor,ee=function(){var Q=16384,q=[],Z,me,z=-1,fe=arguments.length;if(!fe)return"";for(var R="";++z<fe;){var j=Number(arguments[z]);if(!isFinite(j)||j<0||j>1114111||I(j)!==j)throw RangeError("Invalid code point: "+j);j<=65535?q.push(j):(j-=65536,Z=(j>>10)+55296,me=j%1024+56320,q.push(Z,me)),(z+1===fe||q.length>Q)&&(R+=O.apply(null,q),q.length=0)}return R};Object.defineProperty?Object.defineProperty(String,"fromCodePoint",{value:ee,configurable:!0,writable:!0}):String.fromCodePoint=ee}()})(t)}(Xw)),Xw}var f1,S6;function PN(){return S6||(S6=1,f1={isArray:function(t){return Array.isArray?Array.isArray(t):Object.prototype.toString.call(t)==="[object Array]"}}),f1}var m1,N6;function _N(){if(N6)return m1;N6=1;var t=PN().isArray;return m1={copyOptions:function(e){var r,n={};for(r in e)e.hasOwnProperty(r)&&(n[r]=e[r]);return n},ensureFlagExists:function(e,r){(!(e in r)||typeof r[e]!="boolean")&&(r[e]=!1)},ensureSpacesExists:function(e){(!("spaces"in e)||typeof e.spaces!="number"&&typeof e.spaces!="string")&&(e.spaces=0)},ensureAlwaysArrayExists:function(e){(!("alwaysArray"in e)||typeof e.alwaysArray!="boolean"&&!t(e.alwaysArray))&&(e.alwaysArray=!1)},ensureKeyExists:function(e,r){(!(e+"Key"in r)||typeof r[e+"Key"]!="string")&&(r[e+"Key"]=r.compact?"_"+e:e)},checkFnExists:function(e,r){return e+"Fn"in r}},m1}var g1,C6;function XM(){if(C6)return g1;C6=1;var t=sme(),e=_N(),r=PN().isArray,n,s;function i(g){return n=e.copyOptions(g),e.ensureFlagExists("ignoreDeclaration",n),e.ensureFlagExists("ignoreInstruction",n),e.ensureFlagExists("ignoreAttributes",n),e.ensureFlagExists("ignoreText",n),e.ensureFlagExists("ignoreComment",n),e.ensureFlagExists("ignoreCdata",n),e.ensureFlagExists("ignoreDoctype",n),e.ensureFlagExists("compact",n),e.ensureFlagExists("alwaysChildren",n),e.ensureFlagExists("addParent",n),e.ensureFlagExists("trim",n),e.ensureFlagExists("nativeType",n),e.ensureFlagExists("nativeTypeAttributes",n),e.ensureFlagExists("sanitize",n),e.ensureFlagExists("instructionHasAttributes",n),e.ensureFlagExists("captureSpacesBetweenElements",n),e.ensureAlwaysArrayExists(n),e.ensureKeyExists("declaration",n),e.ensureKeyExists("instruction",n),e.ensureKeyExists("attributes",n),e.ensureKeyExists("text",n),e.ensureKeyExists("comment",n),e.ensureKeyExists("cdata",n),e.ensureKeyExists("doctype",n),e.ensureKeyExists("type",n),e.ensureKeyExists("name",n),e.ensureKeyExists("elements",n),e.ensureKeyExists("parent",n),e.checkFnExists("doctype",n),e.checkFnExists("instruction",n),e.checkFnExists("cdata",n),e.checkFnExists("comment",n),e.checkFnExists("text",n),e.checkFnExists("instructionName",n),e.checkFnExists("elementName",n),e.checkFnExists("attributeName",n),e.checkFnExists("attributeValue",n),e.checkFnExists("attributes",n),n}function a(g){var x=Number(g);if(!isNaN(x))return x;var w=g.toLowerCase();return w==="true"?!0:w==="false"?!1:g}function l(g,x){var w;if(n.compact){if(!s[n[g+"Key"]]&&(r(n.alwaysArray)?n.alwaysArray.indexOf(n[g+"Key"])!==-1:n.alwaysArray)&&(s[n[g+"Key"]]=[]),s[n[g+"Key"]]&&!r(s[n[g+"Key"]])&&(s[n[g+"Key"]]=[s[n[g+"Key"]]]),g+"Fn"in n&&typeof x=="string"&&(x=n[g+"Fn"](x,s)),g==="instruction"&&("instructionFn"in n||"instructionNameFn"in n)){for(w in x)if(x.hasOwnProperty(w))if("instructionFn"in n)x[w]=n.instructionFn(x[w],w,s);else{var b=x[w];delete x[w],x[n.instructionNameFn(w,b,s)]=b}}r(s[n[g+"Key"]])?s[n[g+"Key"]].push(x):s[n[g+"Key"]]=x}else{s[n.elementsKey]||(s[n.elementsKey]=[]);var v={};if(v[n.typeKey]=g,g==="instruction"){for(w in x)if(x.hasOwnProperty(w))break;v[n.nameKey]="instructionNameFn"in n?n.instructionNameFn(w,x,s):w,n.instructionHasAttributes?(v[n.attributesKey]=x[w][n.attributesKey],"instructionFn"in n&&(v[n.attributesKey]=n.instructionFn(v[n.attributesKey],w,s))):("instructionFn"in n&&(x[w]=n.instructionFn(x[w],w,s)),v[n.instructionKey]=x[w])}else g+"Fn"in n&&(x=n[g+"Fn"](x,s)),v[n[g+"Key"]]=x;n.addParent&&(v[n.parentKey]=s),s[n.elementsKey].push(v)}}function c(g){if("attributesFn"in n&&g&&(g=n.attributesFn(g,s)),(n.trim||"attributeValueFn"in n||"attributeNameFn"in n||n.nativeTypeAttributes)&&g){var x;for(x in g)if(g.hasOwnProperty(x)&&(n.trim&&(g[x]=g[x].trim()),n.nativeTypeAttributes&&(g[x]=a(g[x])),"attributeValueFn"in n&&(g[x]=n.attributeValueFn(g[x],x,s)),"attributeNameFn"in n)){var w=g[x];delete g[x],g[n.attributeNameFn(x,g[x],s)]=w}}return g}function u(g){var x={};if(g.body&&(g.name.toLowerCase()==="xml"||n.instructionHasAttributes)){for(var w=/([\w:-]+)\s*=\s*(?:"([^"]*)"|'([^']*)'|(\w+))\s*/g,b;(b=w.exec(g.body))!==null;)x[b[1]]=b[2]||b[3]||b[4];x=c(x)}if(g.name.toLowerCase()==="xml"){if(n.ignoreDeclaration)return;s[n.declarationKey]={},Object.keys(x).length&&(s[n.declarationKey][n.attributesKey]=x),n.addParent&&(s[n.declarationKey][n.parentKey]=s)}else{if(n.ignoreInstruction)return;n.trim&&(g.body=g.body.trim());var v={};n.instructionHasAttributes&&Object.keys(x).length?(v[g.name]={},v[g.name][n.attributesKey]=x):v[g.name]=g.body,l("instruction",v)}}function d(g,x){var w;if(typeof g=="object"&&(x=g.attributes,g=g.name),x=c(x),"elementNameFn"in n&&(g=n.elementNameFn(g,s)),n.compact){if(w={},!n.ignoreAttributes&&x&&Object.keys(x).length){w[n.attributesKey]={};var b;for(b in x)x.hasOwnProperty(b)&&(w[n.attributesKey][b]=x[b])}!(g in s)&&(r(n.alwaysArray)?n.alwaysArray.indexOf(g)!==-1:n.alwaysArray)&&(s[g]=[]),s[g]&&!r(s[g])&&(s[g]=[s[g]]),r(s[g])?s[g].push(w):s[g]=w}else s[n.elementsKey]||(s[n.elementsKey]=[]),w={},w[n.typeKey]="element",w[n.nameKey]=g,!n.ignoreAttributes&&x&&Object.keys(x).length&&(w[n.attributesKey]=x),n.alwaysChildren&&(w[n.elementsKey]=[]),s[n.elementsKey].push(w);w[n.parentKey]=s,s=w}function h(g){n.ignoreText||!g.trim()&&!n.captureSpacesBetweenElements||(n.trim&&(g=g.trim()),n.nativeType&&(g=a(g)),n.sanitize&&(g=g.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;")),l("text",g))}function p(g){n.ignoreComment||(n.trim&&(g=g.trim()),l("comment",g))}function f(g){var x=s[n.parentKey];n.addParent||delete s[n.parentKey],s=x}function m(g){n.ignoreCdata||(n.trim&&(g=g.trim()),l("cdata",g))}function y(g){n.ignoreDoctype||(g=g.replace(/^ /,""),n.trim&&(g=g.trim()),l("doctype",g))}function k(g){g.note=g}return g1=function(g,x){var w=t.parser(!0,{}),b={};if(s=b,n=i(x),w.opt={strictEntities:!0},w.onopentag=d,w.ontext=h,w.oncomment=p,w.onclosetag=f,w.onerror=k,w.oncdata=m,w.ondoctype=y,w.onprocessinginstruction=u,w.write(g).close(),b[n.elementsKey]){var v=b[n.elementsKey];delete b[n.elementsKey],b[n.elementsKey]=v,delete b.text}return b},g1}var y1,E6;function ime(){if(E6)return y1;E6=1;var t=_N(),e=XM();function r(n){var s=t.copyOptions(n);return t.ensureSpacesExists(s),s}return y1=function(n,s){var i,a,l,c;return i=r(s),a=e(n,i),c="compact"in i&&i.compact?"_parent":"parent","addParent"in i&&i.addParent?l=JSON.stringify(a,function(u,d){return u===c?"_":d},i.spaces):l=JSON.stringify(a,null,i.spaces),l.replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")},y1}var x1,T6;function QM(){if(T6)return x1;T6=1;var t=_N(),e=PN().isArray,r,n;function s(w){var b=t.copyOptions(w);return t.ensureFlagExists("ignoreDeclaration",b),t.ensureFlagExists("ignoreInstruction",b),t.ensureFlagExists("ignoreAttributes",b),t.ensureFlagExists("ignoreText",b),t.ensureFlagExists("ignoreComment",b),t.ensureFlagExists("ignoreCdata",b),t.ensureFlagExists("ignoreDoctype",b),t.ensureFlagExists("compact",b),t.ensureFlagExists("indentText",b),t.ensureFlagExists("indentCdata",b),t.ensureFlagExists("indentAttributes",b),t.ensureFlagExists("indentInstruction",b),t.ensureFlagExists("fullTagEmptyElement",b),t.ensureFlagExists("noQuotesForNativeAttributes",b),t.ensureSpacesExists(b),typeof b.spaces=="number"&&(b.spaces=Array(b.spaces+1).join(" ")),t.ensureKeyExists("declaration",b),t.ensureKeyExists("instruction",b),t.ensureKeyExists("attributes",b),t.ensureKeyExists("text",b),t.ensureKeyExists("comment",b),t.ensureKeyExists("cdata",b),t.ensureKeyExists("doctype",b),t.ensureKeyExists("type",b),t.ensureKeyExists("name",b),t.ensureKeyExists("elements",b),t.checkFnExists("doctype",b),t.checkFnExists("instruction",b),t.checkFnExists("cdata",b),t.checkFnExists("comment",b),t.checkFnExists("text",b),t.checkFnExists("instructionName",b),t.checkFnExists("elementName",b),t.checkFnExists("attributeName",b),t.checkFnExists("attributeValue",b),t.checkFnExists("attributes",b),t.checkFnExists("fullTagEmptyElement",b),b}function i(w,b,v){return(!v&&w.spaces?`
944`:"")+Array(b+1).join(w.spaces)}function a(w,b,v){if(b.ignoreAttributes)return"";"attributesFn"in b&&(w=b.attributesFn(w,n,r));var A,C,_,N,W=[];for(A in w)w.hasOwnProperty(A)&&w[A]!==null&&w[A]!==void 0&&(N=b.noQuotesForNativeAttributes&&typeof w[A]!="string"?"":'"',C=""+w[A],C=C.replace(/"/g,"&quot;"),_="attributeNameFn"in b?b.attributeNameFn(A,C,n,r):A,W.push(b.spaces&&b.indentAttributes?i(b,v+1,!1):" "),W.push(_+"="+N+("attributeValueFn"in b?b.attributeValueFn(C,A,n,r):C)+N));return w&&Object.keys(w).length&&b.spaces&&b.indentAttributes&&W.push(i(b,v,!1)),W.join("")}function l(w,b,v){return r=w,n="xml",b.ignoreDeclaration?"":"<?xml"+a(w[b.attributesKey],b,v)+"?>"}function c(w,b,v){if(b.ignoreInstruction)return"";var A;for(A in w)if(w.hasOwnProperty(A))break;var C="instructionNameFn"in b?b.instructionNameFn(A,w[A],n,r):A;if(typeof w[A]=="object")return r=w,n=C,"<?"+C+a(w[A][b.attributesKey],b,v)+"?>";var _=w[A]?w[A]:"";return"instructionFn"in b&&(_=b.instructionFn(_,A,n,r)),"<?"+C+(_?" "+_:"")+"?>"}function u(w,b){return b.ignoreComment?"":"<!--"+("commentFn"in b?b.commentFn(w,n,r):w)+"-->"}function d(w,b){return b.ignoreCdata?"":"<![CDATA["+("cdataFn"in b?b.cdataFn(w,n,r):w.replace("]]>","]]]]><![CDATA[>"))+"]]>"}function h(w,b){return b.ignoreDoctype?"":"<!DOCTYPE "+("doctypeFn"in b?b.doctypeFn(w,n,r):w)+">"}function p(w,b){return b.ignoreText?"":(w=""+w,w=w.replace(/&amp;/g,"&"),w=w.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;"),"textFn"in b?b.textFn(w,n,r):w)}function f(w,b){var v;if(w.elements&&w.elements.length)for(v=0;v<w.elements.length;++v)switch(w.elements[v][b.typeKey]){case"text":if(b.indentText)return!0;break;case"cdata":if(b.indentCdata)return!0;break;case"instruction":if(b.indentInstruction)return!0;break;case"doctype":case"comment":case"element":return!0;default:return!0}return!1}function m(w,b,v){r=w,n=w.name;var A=[],C="elementNameFn"in b?b.elementNameFn(w.name,w):w.name;A.push("<"+C),w[b.attributesKey]&&A.push(a(w[b.attributesKey],b,v));var _=w[b.elementsKey]&&w[b.elementsKey].length||w[b.attributesKey]&&w[b.attributesKey]["xml:space"]==="preserve";return _||("fullTagEmptyElementFn"in b?_=b.fullTagEmptyElementFn(w.name,w):_=b.fullTagEmptyElement),_?(A.push(">"),w[b.elementsKey]&&w[b.elementsKey].length&&(A.push(y(w[b.elementsKey],b,v+1)),r=w,n=w.name),A.push(b.spaces&&f(w,b)?`
945`+Array(v+1).join(b.spaces):""),A.push("</"+C+">")):A.push("/>"),A.join("")}function y(w,b,v,A){return w.reduce(function(C,_){var N=i(b,v,A&&!C);switch(_.type){case"element":return C+N+m(_,b,v);case"comment":return C+N+u(_[b.commentKey],b);case"doctype":return C+N+h(_[b.doctypeKey],b);case"cdata":return C+(b.indentCdata?N:"")+d(_[b.cdataKey],b);case"text":return C+(b.indentText?N:"")+p(_[b.textKey],b);case"instruction":var W={};return W[_[b.nameKey]]=_[b.attributesKey]?_:_[b.instructionKey],C+(b.indentInstruction?N:"")+c(W,b,v)}},"")}function k(w,b,v){var A;for(A in w)if(w.hasOwnProperty(A))switch(A){case b.parentKey:case b.attributesKey:break;case b.textKey:if(b.indentText||v)return!0;break;case b.cdataKey:if(b.indentCdata||v)return!0;break;case b.instructionKey:if(b.indentInstruction||v)return!0;break;case b.doctypeKey:case b.commentKey:return!0;default:return!0}return!1}function g(w,b,v,A,C){r=w,n=b;var _="elementNameFn"in v?v.elementNameFn(b,w):b;if(typeof w>"u"||w===null||w==="")return"fullTagEmptyElementFn"in v&&v.fullTagEmptyElementFn(b,w)||v.fullTagEmptyElement?"<"+_+"></"+_+">":"<"+_+"/>";var N=[];if(b){if(N.push("<"+_),typeof w!="object")return N.push(">"+p(w,v)+"</"+_+">"),N.join("");w[v.attributesKey]&&N.push(a(w[v.attributesKey],v,A));var W=k(w,v,!0)||w[v.attributesKey]&&w[v.attributesKey]["xml:space"]==="preserve";if(W||("fullTagEmptyElementFn"in v?W=v.fullTagEmptyElementFn(b,w):W=v.fullTagEmptyElement),W)N.push(">");else return N.push("/>"),N.join("")}return N.push(x(w,v,A+1,!1)),r=w,n=b,b&&N.push((C?i(v,A,!1):"")+"</"+_+">"),N.join("")}function x(w,b,v,A){var C,_,N,W=[];for(_ in w)if(w.hasOwnProperty(_))for(N=e(w[_])?w[_]:[w[_]],C=0;C<N.length;++C){switch(_){case b.declarationKey:W.push(l(N[C],b,v));break;case b.instructionKey:W.push((b.indentInstruction?i(b,v,A):"")+c(N[C],b,v));break;case b.attributesKey:case b.parentKey:break;case b.textKey:W.push((b.indentText?i(b,v,A):"")+p(N[C],b));break;case b.cdataKey:W.push((b.indentCdata?i(b,v,A):"")+d(N[C],b));break;case b.doctypeKey:W.push(i(b,v,A)+h(N[C],b));break;case b.commentKey:W.push(i(b,v,A)+u(N[C],b));break;default:W.push(i(b,v,A)+g(N[C],_,b,v,k(N[C],b)))}A=A&&!W.length}return W.join("")}return x1=function(w,b){b=s(b);var v=[];return r=w,n="_root_",b.compact?v.push(x(w,b,0,!0)):(w[b.declarationKey]&&v.push(l(w[b.declarationKey],b,0)),w[b.elementsKey]&&w[b.elementsKey].length&&v.push(y(w[b.elementsKey],b,0,!v.length))),v.join("")},x1}var w1,A6;function ame(){if(A6)return w1;A6=1;var t=QM();return w1=function(e,r){e instanceof Buffer&&(e=e.toString());var n=null;if(typeof e=="string")try{n=JSON.parse(e)}
945catch{throw new Error("The JSON structure is invalid")}else n=e;return t(n,r)},w1}var b1,z6;function ome(){if(z6)return b1;z6=1;var t=XM(),e=ime(),r=QM(),n=ame();return b1={xml2js:t,xml2json:e,js2xml:r,json2xml:n},b1}var eD=ome();const IN=t=>{switch(t.type){case void 0:case"element":const e=new cme(t.name,t.attributes),r=t.elements||[];for(const n of r){const s=IN(n);s!==void 0&&e.push(s)}return e;case"text":return t.text;default:return}};class lme extends Ke{}class cme extends ve{static fromXmlString(e){const r=eD.xml2js(e,{compact:!1});return IN(r)}constructor(e,r){super(e),r&&this.root.push(new lme(r))}push(e){this.root.push(e)}}class ume extends ve{constructor(e){super(""),this._attr=e}prepForXml(e){return{_attr:this._attr}}}class tD extends ve{constructor(e,r){super(e),r&&(this.root=r.root)}}const $n=t=>{if(isNaN(t))throw new Error(`Invalid value '${t}' specified. Must be an integer.`);return Math.floor(t)},hx=t=>{const e=$n(t);if(e<0)throw new Error(`Invalid value '${t}' specified. Must be a positive integer.`);return e},rD=(t,e)=>{const r=e*2;if(t.length!==r||isNaN(+`0x${t}`))throw new Error(`Invalid hex value '${t}'. Expected ${r} digit hex value`);return t},P6=t=>rD(t,1),nD=t=>{const e=t.slice(-2),r=t.substring(0,t.length-2);return`${Number(r)}${e}`},sD=t=>{const e=nD(t);if(parseFloat(e)<0)throw new Error(`Invalid value '${e}' specified. Expected a positive number.`);return e},dd=t=>{if(t==="auto")return t;const e=t.charAt(0)==="#"?t.substring(1):t;return rD(e,3)},Rl=t=>typeof t=="string"?nD(t):$n(t),dme=t=>typeof t=="string"?sD(t):hx(t),Ls=t=>typeof t=="string"?sD(t):hx(t),hme=hx,pme=hx,fme=t=>t.toISOString();class je extends ve{constructor(e,r=!0){super(e),r!==!0&&this.root.push(new ar({val:r}))}}class k1 extends ve{constructor(e,r){super(e),this.root.push(new ar({val:dme(r)}))}}class Eu extends ve{constructor(e,r){super(e),this.root.push(new ar({val:r}))}}const oh=(t,e)=>new Pi({name:t,attributes:{value:{key:"w:val",value:e}}});class Qh extends ve{constructor(e,r){super(e),this.root.push(new ar({val:r}))}}class ll extends ve{constructor(e,r){super(e),this.root.push(r)}}class Pi extends ve{constructor({name:e,attributes:r,children:n}){super(e),r&&this.root.push(new cx(r)),n&&this.root.push(...n)}}const ii={START:"start",LEFT:"left"};class mme extends Ke{constructor(){super(...arguments),be(this,"xmlKeys",{val:"w:val"})}}class gme extends ve{constructor(e){super("w:jc"),this.root.push(new mme({val:e}))}}class Kt extends ve{constructor(e,{color:r,size:n,space:s,style:i}){super(e),this.root.push(new yme({style:i,color:r===void 0?void 0:dd(r),size:n===void 0?void 0:hme(n),space:s===void 0?void 0:pme(s)}))}}class yme extends Ke{constructor(){super(...arguments),be(this,"xmlKeys",{style:"w:val",color:"w:color",size:"w:sz",space:"w:space"})}}const ON={SINGLE:"single",NONE:"none"};class xme extends lx{constructor(e){super("w:pBdr"),e.top&&this.root.push(new Kt("w:top",e.top)),e.bottom&&this.root.push(new Kt("w:bottom",e.bottom)),e.left&&this.root.push(new Kt("w:left",e.left)),e.right&&this.root.push(new Kt("w:right",e.right))}}class wme extends ve{constructor(){super("w:pBdr");const e=new Kt("w:bottom",{color:"auto",space:1,style:ON.SINGLE,size:6});this.root.push(e)}}class bme extends ve{constructor({start:e,end:r,left:n,right:s,hanging:i,firstLine:a}){super("w:ind"),this.root.push(new cx({start:{key:"w:start",value:e===void 0?void 0:Rl(e)},end:{key:"w:end",value:r===void 0?void 0:Rl(r)}
945,left:{key:"w:left",value:n===void 0?void 0:Rl(n)},right:{key:"w:right",value:s===void 0?void 0:Rl(s)},hanging:{key:"w:hanging",value:i===void 0?void 0:Ls(i)},firstLine:{key:"w:firstLine",value:a===void 0?void 0:Ls(a)}}))}}let kme=class extends ve{constructor(){super("w:br")}};const RN={BEGIN:"begin",END:"end",SEPARATE:"separate"};class LN extends Ke{constructor(){super(...arguments),be(this,"xmlKeys",{type:"w:fldCharType",dirty:"w:dirty"})}}class Cm extends ve{constructor(e){super("w:fldChar"),this.root.push(new LN({type:RN.BEGIN,dirty:e}))}}class Em extends ve{constructor(e){super("w:fldChar"),this.root.push(new LN({type:RN.SEPARATE,dirty:e}))}}class Tm extends ve{constructor(e){super("w:fldChar"),this.root.push(new LN({type:RN.END,dirty:e}))}}const hd={DEFAULT:"default",PRESERVE:"preserve"};class pd extends Ke{constructor(){super(...arguments),be(this,"xmlKeys",{space:"xml:space"})}}class vme extends ve{constructor(){super("w:instrText"),this.root.push(new pd({space:hd.PRESERVE})),this.root.push("PAGE")}}class jme extends ve{constructor(){super("w:instrText"),this.root.push(new pd({space:hd.PRESERVE})),this.root.push("NUMPAGES")}}class Sme extends ve{constructor(){super("w:instrText"),this.root.push(new pd({space:hd.PRESERVE})),this.root.push("SECTIONPAGES")}}class Nme extends ve{constructor(){super("w:instrText"),this.root.push(new pd({space:hd.PRESERVE})),this.root.push("SECTION")}}class Cme extends Ke{constructor(){super(...arguments),be(this,"xmlKeys",{fill:"w:fill",color:"w:color",type:"w:val"})}}class iD extends ve{constructor({fill:e,color:r,type:n}){super("w:shd"),this.root.push(new Cme({fill:e===void 0?void 0:dd(e),color:r===void 0?void 0:dd(r),type:n}))}}class Eme extends Ke{constructor(){super(...arguments),be(this,"xmlKeys",{id:"w:id",author:"w:author",date:"w:date"})}}const Tme={DOT:"dot"};class Ame extends ve{constructor(e){super("w:em"),this.root.push(new ar({val:e}))}}class zme extends Ame{constructor(e=Tme.DOT){super(e)}}class Pme extends ve{constructor(e){super("w:spacing"),this.root.push(new ar({val:Rl(e)}))}}class _me extends ve{constructor(e){super("w:color"),this.root.push(new ar({val:dd(e)}))}}class Ime extends ve{constructor(e){super("w:highlight"),this.root.push(new ar({val:e}))}}class Ome extends ve{constructor(e){super("w:highlightCs"),this.root.push(new ar({val:e}))}}const Rme=t=>new Pi({name:"w:lang",attributes:{value:{key:"w:val",value:t.value},eastAsia:{key:"w:eastAsia",value:t.eastAsia},bidirectional:{key:"w:bidi",value:t.bidirectional}}});class _6 extends Ke{constructor(){super(...arguments),be(this,"xmlKeys",{ascii:"w:ascii",cs:"w:cs",eastAsia:"w:eastAsia",hAnsi:"w:hAnsi",hint:"w:hint"})}}class v1 extends ve{constructor(e,r){if(super("w:rFonts"),typeof e=="string"){const n=e;this.root.push(new _6({ascii:n,cs:n,eastAsia:n,hAnsi:n,hint:r}))}else{const n=e;this.root.push(new _6(n))}}}let aD=class extends ve{constructor(e){super("w:vertAlign"),this.root.push(new ar({val:e}))}};class Lme extends aD{constructor(){super("superscript")}}class Mme extends aD{constructor(){super("subscript")}}const oD={SINGLE:"single"};class Dme extends ve{constructor(e=oD.SINGLE,r){super("w:u"),this.root.push(new ar({val:e,color:r===void 0?void 0:dd(r)}))}}class Ec extends lx{constructor(e){var r,n;if(super("w:rPr"),!e)return;e.style&&this.push(new Eu("w:rStyle",e.style)),e.font&&(typeof e.font=="string"?this.push(new v1(e.font)):"name"in e.font?this.push(new v1(e.font.name,e.font.hint)):this.push(new v1(e.font))),e.bold!==void 0&&this.push(new je("w:b",e.bold)),(e.boldComplexScript===void 0&&e.bold!==void 0||e.boldComplexScript)&&this.push(new je("w:bCs",(r=e.boldComplexScript)!=null?r:e.bold)),e.italics!==void 0&&this.push(new je("w:i",e.italics)),(e.italicsComplexScript===void 0&&e.italics!==void 0||e.italicsComplexScript)&&this.push(new je("w:iCs",(n=e.italicsComplexScript)!=null?n:e.italics)),e.smallCaps!==void 0?this.push(new je("w:smallCaps",e.smallCaps)):e.allCaps!==void 0&&this.push(new je("w:caps",e.allCaps)),e.strike!==void 0&&this.push(new je("w:strike",e.strike)),e.doubleStrike!==void 0&&this.push(new je("w:dstrike",e.doubleStrike)),e.emboss!==void 0&&this.push(new je("w:emboss",e.emboss)),e.imprint!==void 0&&this.push(new je("w:imprint",e.imprint)),e.noProof!==void 0&&this.push(new je("w:noProof",e.noProof)),e.snapToGri
945d!==void 0&&this.push(new je("w:snapToGrid",e.snapToGrid)),e.vanish&&this.push(new je("w:vanish",e.vanish)),e.color&&this.push(new _me(e.color)),e.characterSpacing&&this.push(new Pme(e.characterSpacing)),e.scale!==void 0&&this.push(new Qh("w:w",e.scale)),e.kern&&this.push(new k1("w:kern",e.kern)),e.position&&this.push(new Eu("w:position",e.position)),e.size!==void 0&&this.push(new k1("w:sz",e.size));const s=e.sizeComplexScript===void 0||e.sizeComplexScript===!0?e.size:e.sizeComplexScript;s&&this.push(new k1("w:szCs",s)),e.highlight&&this.push(new Ime(e.highlight));const i=e.highlightComplexScript===void 0||e.highlightComplexScript===!0?e.highlight:e.highlightComplexScript;i&&this.push(new Ome(i)),e.underline&&this.push(new Dme(e.underline.type,e.underline.color)),e.effect&&this.push(new Eu("w:effect",e.effect)),e.border&&this.push(new Kt("w:bdr",e.border)),e.shading&&this.push(new iD(e.shading)),e.subScript&&this.push(new Mme),e.superScript&&this.push(new Lme),e.rightToLeft!==void 0&&this.push(new je("w:rtl",e.rightToLeft)),e.emphasisMark&&this.push(new zme(e.emphasisMark.type)),e.language&&this.push(Rme(e.language)),e.specVanish&&this.push(new je("w:specVanish",e.vanish)),e.math&&this.push(new je("w:oMath",e.math)),e.revision&&this.push(new Fme(e.revision))}push(e){this.root.push(e)}}class Fme extends ve{constructor(e){super("w:rPrChange"),this.root.push(new Eme({id:e.id,author:e.author,date:e.date})),this.addChildElement(new Ec(e))}}let I6=class extends ve{constructor(e){var r;super("w:t"),typeof e=="string"?(this.root.push(new pd({space:hd.PRESERVE})),this.root.push(e)):(this.root.push(new pd({space:(r=e.space)!=null?r:hd.DEFAULT})),this.root.push(e.text))}};const Am={CURRENT:"CURRENT",TOTAL_PAGES:"TOTAL_PAGES",TOTAL_PAGES_IN_SECTION:"TOTAL_PAGES_IN_SECTION",CURRENT_SECTION:"SECTION"};class px extends ve{constructor(e){if(super("w:r"),be(this,"properties"),this.properties=new Ec(e),this.root.push(this.properties),e.break)for(let r=0;r<e.break;r++)this.root.push(new kme);if(e.children)for(const r of e.children){if(typeof r=="string"){switch(r){case Am.CURRENT:this.root.push(new Cm),this.root.push(new vme),this.root.push(new Em),this.root.push(new Tm);break;case Am.TOTAL_PAGES:this.root.push(new Cm),this.root.push(new jme),this.root.push(new Em),this.root.push(new Tm);break;case Am.TOTAL_PAGES_IN_SECTION:this.root.push(new Cm),this.root.push(new Sme),this.root.push(new Em),this.root.push(new Tm);break;case Am.CURRENT_SECTION:this.root.push(new Cm),this.root.push(new Nme),this.root.push(new Em),this.root.push(new Tm);break;default:this.root.push(new I6(r));break}continue}this.root.push(r)}else e.text!==void 0&&this.root.push(new I6(e.text))}}class ep extends px{constructor(e){super(typeof e=="string"?{text:e}:e)}}var j1={},Nt={},S1,O6;function Ef(){if(O6)return S1;O6=1,S1=t;function t(e,r){if(!e)throw new Error(r||"Assertion failed")}return t.equal=function(r,n,s){if(r!=n)throw new Error(s||"Assertion failed: "+r+" != "+n)},S1}var R6;function Ii(){if(R6)return Nt;R6=1;var t=Ef(),e=tl();Nt.inherits=e;function r(T,F){return(T.charCodeAt(F)&64512)!==55296||F<0||F+1>=T.length?!1:(T.charCodeAt(F+1)&64512)===56320}
945function n(T,F){if(Array.isArray(T))return T.slice();if(!T)return[];var E=[];if(typeof T=="string")if(F){if(F==="hex")for(T=T.replace(/[^a-z0-9]+/ig,""),T.length%2!==0&&(T="0"+T),Y=0;Y<T.length;Y+=2)E.push(parseInt(T[Y]+T[Y+1],16))}else for(var H=0,Y=0;Y<T.length;Y++){var $=T.charCodeAt(Y);$<128?E[H++]=$:$<2048?(E[H++]=$>>6|192,E[H++]=$&63|128):r(T,Y)?($=65536+(($&1023)<<10)+(T.charCodeAt(++Y)&1023),E[H++]=$>>18|240,E[H++]=$>>12&63|128,E[H++]=$>>6&63|128,E[H++]=$&63|128):(E[H++]=$>>12|224,E[H++]=$>>6&63|128,E[H++]=$&63|128)}else for(Y=0;Y<T.length;Y++)E[Y]=T[Y]|0;return E}Nt.toArray=n;function s(T){for(var F="",E=0;E<T.length;E++)F+=l(T[E].toString(16));return F}Nt.toHex=s;function i(T){var F=T>>>24|T>>>8&65280|T<<8&16711680|(T&255)<<24;return F>>>0}Nt.htonl=i;function a(T,F){for(var E="",H=0;H<T.length;H++){var Y=T[H];F==="little"&&(Y=i(Y)),E+=c(Y.toString(16))}return E}Nt.toHex32=a;function l(T){return T.length===1?"0"+T:T}Nt.zero2=l;function c(T){return T.length===7?"0"+T:T.length===6?"00"+T:T.length===5?"000"+T:T.length===4?"0000"+T:T.length===3?"00000"+T:T.length===2?"000000"+T:T.length===1?"0000000"+T:T}Nt.zero8=c;function u(T,F,E,H){var Y=E-F;t(Y%4===0);for(var $=new Array(Y/4),D=0,J=F;D<$.length;D++,J+=4){var de;H==="big"?de=T[J]<<24|T[J+1]<<16|T[J+2]<<8|T[J+3]:de=T[J+3]<<24|T[J+2]<<16|T[J+1]<<8|T[J],$[D]=de>>>0}return $}Nt.join32=u;function d(T,F){for(var E=new Array(T.length*4),H=0,Y=0;H<T.length;H++,Y+=4){var $=T[H];F==="big"?(E[Y]=$>>>24,E[Y+1]=$>>>16&255,E[Y+2]=$>>>8&255,E[Y+3]=$&255):(E[Y+3]=$>>>24,E[Y+2]=$>>>16&255,E[Y+1]=$>>>8&255,E[Y]=$&255)}return E}Nt.split32=d;function h(T,F){return T>>>F|T<<32-F}Nt.rotr32=h;function p(T,F){return T<<F|T>>>32-F}Nt.rotl32=p;function f(T,F){return T+F>>>0}Nt.sum32=f;function m(T,F,E){return T+F+E>>>0}Nt.sum32_3=m;function y(T,F,E,H){return T+F+E+H>>>0}Nt.sum32_4=y;function k(T,F,E,H,Y){return T+F+E+H+Y>>>0}Nt.sum32_5=k;function g(T,F,E,H){var Y=T[F],$=T[F+1],D=H+$>>>0,J=(D<H?1:0)+E+Y;T[F]=J>>>0,T[F+1]=D}Nt.sum64=g;function x(T,F,E,H){var Y=F+H>>>0,$=(Y<F?1:0)+T+E;return $>>>0}Nt.sum64_hi=x;function w(T,F,E,H){var Y=F+H;return Y>>>0}Nt.sum64_lo=w;function b(T,F,E,H,Y,$,D,J){var de=0,G=F;G=G+H>>>0,de+=G<F?1:0,G=G+$>>>0,de+=G<$?1:0,G=G+J>>>0,de+=G<J?1:0;var B=T+E+Y+D+de;return B>>>0}Nt.sum64_4_hi=b;function v(T,F,E,H,Y,$,D,J){var de=F+H+$+J;return de>>>0}Nt.sum64_4_lo=v;function A(T,F,E,H,Y,$,D,J,de,G){var B=0,re=F;re=re+H>>>0,B+=re<F?1:0,re=re+$>>>0,B+=re<$?1:0,re=re+J>>>0,B+=re<J?1:0,re=re+G>>>0,B+=re<G?1:0;var ae=T+E+Y+D+de+B;return ae>>>0}Nt.sum64_5_hi=A;function C(T,F,E,H,Y,$,D,J,de,G){var B=F+H+$+J+G;return B>>>0}Nt.sum64_5_lo=C;function _(T,F,E){var H=F<<32-E|T>>>E;return H>>>0}Nt.rotr64_hi=_;function N(T,F,E){var H=T<<32-E|F>>>E;return H>>>0}Nt.rotr64_lo=N;function W(T,F,E){return T>>>E}Nt.shr64_hi=W;function K(T,F,E){var H=T<<32-E|F>>>E;return H>>>0}return Nt.shr64_lo=K,Nt}var N1={},L6;function Tf(){if(L6)return N1;L6=1;var t=Ii(),e=Ef();function r(){this.pending=null,this.pendingTotal=0,this.blockSize=this.constructor.blockSize,this.outSize=this.constructor.outSize,this.hmacStrength=this.constructor.hmacStrength,this.padLength=this.constructor.padLength/8,this.endian="big",this._delta8=this.blockSize/8,this._delta32=this.blockSize/32}return N1.BlockHash=r,r.prototype.update=function(s,i){if(s=t.toArray(s,i),this.pending?this.pending=this.pending.concat(s):this.pending=s,this.pendingTotal+=s.length,this.pending.length>=this._delta8){s=this.pending;var a=s.length%this._delta8;this.pending=s.slice(s.length-a,s.length),this.pending.length===0&&(this.pending=null),s=t.join32(s,0,s.length-a,this.endian);for(var l=0;l<s.length;l+=this._delta32)this._update(s,l,l+this._delta32)}return this},r.prototype.digest=function(s){return this.update(this._pad()),e(this.pending===null),this._digest(s)},r.prototype._pad=function(){var s=this.pendingTotal,i=this._delta8,a=i-(s+this.padLength)%i,l=new Array(a+this.padLength);l[0]=128;for(var c=1;c<a;c++)l[c]=0;if(s<<=3,this.endian==="big"){for(var u=8;u<this.padLength;u++)l[c++]=0;l[c++]=0,l[c++]=0,l[c++]=0,l[c++]=0,l[c++]=s>>>24&255,l[c++]=s>>>16&255,l[c++]=s>>>8&255,l[c++]=s&255}else for(l[c++]=s&255,l[c++]=s>>>8&255,l[c++]=s>>>16&255,l[c++]=s>>>24&255,l[c++]=0,l[c++]=0,l[c++]=0,l[c++]=0,u=8;u<this.padLength;u++)l[c++]=0;return l},N1}var cl={},ri={},M6;function lD(){if(M6)return ri;M6=1;var t=Ii(),e=t.rotr32;function r(d,h,p,f){if(d===0)return n(h,p,f);
945if(d===1||d===3)return i(h,p,f);if(d===2)return s(h,p,f)}ri.ft_1=r;function n(d,h,p){return d&h^~d&p}ri.ch32=n;function s(d,h,p){return d&h^d&p^h&p}ri.maj32=s;function i(d,h,p){return d^h^p}ri.p32=i;function a(d){return e(d,2)^e(d,13)^e(d,22)}ri.s0_256=a;function l(d){return e(d,6)^e(d,11)^e(d,25)}ri.s1_256=l;function c(d){return e(d,7)^e(d,18)^d>>>3}ri.g0_256=c;function u(d){return e(d,17)^e(d,19)^d>>>10}return ri.g1_256=u,ri}var C1,D6;function Bme(){if(D6)return C1;D6=1;var t=Ii(),e=Tf(),r=lD(),n=t.rotl32,s=t.sum32,i=t.sum32_5,a=r.ft_1,l=e.BlockHash,c=[1518500249,1859775393,2400959708,3395469782];function u(){if(!(this instanceof u))return new u;l.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}return t.inherits(u,l),C1=u,u.blockSize=512,u.outSize=160,u.hmacStrength=80,u.padLength=64,u.prototype._update=function(h,p){for(var f=this.W,m=0;m<16;m++)f[m]=h[p+m];for(;m<f.length;m++)f[m]=n(f[m-3]^f[m-8]^f[m-14]^f[m-16],1);var y=this.h[0],k=this.h[1],g=this.h[2],x=this.h[3],w=this.h[4];for(m=0;m<f.length;m++){var b=~~(m/20),v=i(n(y,5),a(b,k,g,x),w,f[m],c[b]);w=x,x=g,g=n(k,30),k=y,y=v}this.h[0]=s(this.h[0],y),this.h[1]=s(this.h[1],k),this.h[2]=s(this.h[2],g),this.h[3]=s(this.h[3],x),this.h[4]=s(this.h[4],w)},u.prototype._digest=function(h){return h==="hex"?t.toHex32(this.h,"big"):t.split32(this.h,"big")},C1}var E1,F6;function cD(){if(F6)return E1;F6=1;var t=Ii(),e=Tf(),r=lD(),n=Ef(),s=t.sum32,i=t.sum32_4,a=t.sum32_5,l=r.ch32,c=r.maj32,u=r.s0_256,d=r.s1_256,h=r.g0_256,p=r.g1_256,f=e.BlockHash,m=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298];function y(){if(!(this instanceof y))return new y;f.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=m,this.W=new Array(64)}return t.inherits(y,f),E1=y,y.blockSize=512,y.outSize=256,y.hmacStrength=192,y.padLength=64,y.prototype._update=function(g,x){for(var w=this.W,b=0;b<16;b++)w[b]=g[x+b];for(;b<w.length;b++)w[b]=i(p(w[b-2]),w[b-7],h(w[b-15]),w[b-16]);var v=this.h[0],A=this.h[1],C=this.h[2],_=this.h[3],N=this.h[4],W=this.h[5],K=this.h[6],T=this.h[7];for(n(this.k.length===w.length),b=0;b<w.length;b++){var F=a(T,d(N),l(N,W,K),this.k[b],w[b]),E=s(u(v),c(v,A,C));T=K,K=W,W=N,N=s(_,F),_=C,C=A,A=v,v=s(F,E)}this.h[0]=s(this.h[0],v),this.h[1]=s(this.h[1],A),this.h[2]=s(this.h[2],C),this.h[3]=s(this.h[3],_),this.h[4]=s(this.h[4],N),this.h[5]=s(this.h[5],W),this.h[6]=s(this.h[6],K),this.h[7]=s(this.h[7],T)},y.prototype._digest=function(g){return g==="hex"?t.toHex32(this.h,"big"):t.split32(this.h,"big")},E1}var T1,B6;function $me(){if(B6)return T1;B6=1;var t=Ii(),e=cD();function r(){if(!(this instanceof r))return new r;e.call(this),this.h=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]}return t.inherits(r,e),T1=r,r.blockSize=512,r.outSize=224,r.hmacStrength=192,r.padLength=64,r.prototype._digest=function(s){return s==="hex"?t.toHex32(this.h.slice(0,7),"big"):t.split32(this.h.slice(0,7),"big")},T1}var A1,$6;function uD(){if($6)return A1;$6=1;var t=Ii(),e=Tf(),r=Ef(),n=t.rotr64_hi,s=t.rotr64_lo,i=t.shr64_hi,a=t.shr64_lo,l=t.sum64,c=t.sum64_hi,u=t.sum64_lo,d=t.sum64_4_hi,h=t.sum64_4_lo,p=t.sum64_5_hi,f=t.sum64_5_lo,m=e.BlockHash,y=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,
9451322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591];function k(){if(!(this instanceof k))return new k;m.call(this),this.h=[1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209],this.k=y,this.W=new Array(160)}t.inherits(k,m),A1=k,k.blockSize=1024,k.outSize=512,k.hmacStrength=192,k.padLength=128,k.prototype._prepareBlock=function(E,H){for(var Y=this.W,$=0;$<32;$++)Y[$]=E[H+$];for(;$<Y.length;$+=2){var D=K(Y[$-4],Y[$-3]),J=T(Y[$-4],Y[$-3]),de=Y[$-14],G=Y[$-13],B=N(Y[$-30],Y[$-29]),re=W(Y[$-30],Y[$-29]),ae=Y[$-32],ge=Y[$-31];Y[$]=d(D,J,de,G,B,re,ae,ge),Y[$+1]=h(D,J,de,G,B,re,ae,ge)}},k.prototype._update=function(E,H){this._prepareBlock(E,H);var Y=this.W,$=this.h[0],D=this.h[1],J=this.h[2],de=this.h[3],G=this.h[4],B=this.h[5],re=this.h[6],ae=this.h[7],ge=this.h[8],ne=this.h[9],O=this.h[10],I=this.h[11],ee=this.h[12],Q=this.h[13],q=this.h[14],Z=this.h[15];r(this.k.length===Y.length);for(var me=0;me<Y.length;me+=2){var z=q,fe=Z,R=C(ge,ne),j=_(ge,ne),S=g(ge,ne,O,I,ee),P=x(ge,ne,O,I,ee,Q),L=this.k[me],V=this.k[me+1],U=Y[me],oe=Y[me+1],ce=p(z,fe,R,j,S,P,L,V,U,oe),X=f(z,fe,R,j,S,P,L,V,U,oe);z=v($,D),fe=A($,D),R=w($,D,J,de,G),j=b($,D,J,de,G,B);var he=c(z,fe,R,j),we=u(z,fe,R,j);q=ee,Z=Q,ee=O,Q=I,O=ge,I=ne,ge=c(re,ae,ce,X),ne=u(ae,ae,ce,X),re=G,ae=B,G=J,B=de,J=$,de=D,$=c(ce,X,he,we),D=u(ce,X,he,we)}l(this.h,0,$,D),l(this.h,2,J,de),l(this.h,4,G,B),l(this.h,6,re,ae),l(this.h,8,ge,ne),l(this.h,10,O,I),l(this.h,12,ee,Q),l(this.h,14,q,Z)},k.prototype._digest=function(E){return E==="hex"?t.toHex32(this.h,"big"):t.split32(this.h,"big")};function g(F,E,H,Y,$){var D=F&H^~F&$;return D<0&&(D+=4294967296),D}function x(F,E,H,Y,$,D){var J=E&Y^~E&D;return J<0&&(J+=4294967296),J}function w(F,E,H,Y,$){var D=F&H^F&$^H&$;return D<0&&(D+=4294967296),D}function b(F,E,H,Y,$,D){var J=E&Y^E&D^Y&D;return J<0&&(J+=4294967296),J}function v(F,E){var H=n(F,E,28),Y=n(E,F,2),$=n(E,F,7),D=H^Y^$;return D<0&&(D+=4294967296),D}function A(F,E){var H=s(F,E,28),Y=s(E,F,2),$=s(E,F,7),D=H^Y^$;return D<0&&(D+=4294967296),D}function C(F,E){var H=n(F,E,14),Y=n(F,E,18),$=n(E,F,9),D=H^Y^$;return D<0&&(D+=4294967296),D}function _(F,E){var H=s(F,E,14),Y=s(F,E,18),$=s(E,F,9),D=H^Y^$;return D<0&&(D+=4294967296),D}function N(F,E){var H=n(F,E,1),Y=n(F,E,8),$=i(F,E,7),D=H^Y^$;return D<0&&(D+=4294967296),D}function W(F,E){var H=s(F,E,1),Y=s(F,E,8),$=a(F,E,7),D=H^Y^$;return D<0&&(D+=4294967296),D}function K(F,E){var H=n(F,E,19),Y=n(E,F,29),$=i(F,E,6),D=H^Y^$;return D<0&&(D+=4294967296),D}function T(F,E){var H=s(F,E,19),Y=s(E,F,29),$=a(F,E,6),D=H^Y^$;return D<0&&(D+=4294967296),D}return A1}var z1,U6;function Ume(){if(U6)return z1;U6=1;var t=Ii(),e=uD();function r(){if(!(this instanceof r))return new r;e.call(this),this.h=[3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]}return t.inherits(r,e),z1=r,r.blockSize=1024,r.outSize=384,r.hmacStrength=192,r.padLength=128,r.prototype._digest=function(s){return s==="hex"?t.toHex32(this.h.slice(0,12),"big"):t.split32(this.h.slice(0,12),"big")},z1}var W6;function Wme(){return W6||(W6=1,cl.sha1=Bme(),cl.sha224=$me(),cl.sha256=cD(),cl.sha384=Ume(),cl.sha512=uD()),cl}var P1={},V6;function Vme(){if(V6)return P1;V6=1;var t=Ii(),e=Tf(),r=t.rotl32,n=t.sum32,s=t.sum32_3,i=t.sum32_4,a=e.BlockHash;function l(){if(!(this instanceof l))return new l;a.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.endian="little"}t.inherits(l,a),P1.ripemd160=l,l.blockSize=512,l.outSize=160,l.hmacStrength=192,l.padLength=64,l.prototype._update=function(k,g){for(var x=this.h[0],w=this.h[1],b=this.h[2],v=this.h[3],A=this.h[4],C=x,_=w,N=b,W=v,K=A,T=0;T<80;T++){var F=n(r(i(x,c(T,w,b,v),k[h[T]+g],u(T)),f[T]),A);
945x=A,A=v,v=r(b,10),b=w,w=F,F=n(r(i(C,c(79-T,_,N,W),k[p[T]+g],d(T)),m[T]),K),C=K,K=W,W=r(N,10),N=_,_=F}F=s(this.h[1],b,W),this.h[1]=s(this.h[2],v,K),this.h[2]=s(this.h[3],A,C),this.h[3]=s(this.h[4],x,_),this.h[4]=s(this.h[0],w,N),this.h[0]=F},l.prototype._digest=function(k){return k==="hex"?t.toHex32(this.h,"little"):t.split32(this.h,"little")};function c(y,k,g,x){return y<=15?k^g^x:y<=31?k&g|~k&x:y<=47?(k|~g)^x:y<=63?k&x|g&~x:k^(g|~x)}function u(y){return y<=15?0:y<=31?1518500249:y<=47?1859775393:y<=63?2400959708:2840853838}function d(y){return y<=15?1352829926:y<=31?1548603684:y<=47?1836072691:y<=63?2053994217:0}var h=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],p=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],f=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],m=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11];return P1}var _1,H6;function Hme(){if(H6)return _1;H6=1;var t=Ii(),e=Ef();function r(n,s,i){if(!(this instanceof r))return new r(n,s,i);this.Hash=n,this.blockSize=n.blockSize/8,this.outSize=n.outSize/8,this.inner=null,this.outer=null,this._init(t.toArray(s,i))}return _1=r,r.prototype._init=function(s){s.length>this.blockSize&&(s=new this.Hash().update(s).digest()),e(s.length<=this.blockSize);for(var i=s.length;i<this.blockSize;i++)s.push(0);for(i=0;i<s.length;i++)s[i]^=54;for(this.inner=new this.Hash().update(s),i=0;i<s.length;i++)s[i]^=106;this.outer=new this.Hash().update(s)},r.prototype.update=function(s,i){return this.inner.update(s,i),this},r.prototype.digest=function(s){return this.outer.update(this.inner.digest()),this.outer.digest(s)},_1}var q6;function qme(){return q6||(q6=1,function(t){var e=t;e.utils=Ii(),e.common=Tf(),e.sha=Wme(),e.ripemd=Vme(),e.hmac=Hme(),e.sha1=e.sha.sha1,e.sha256=e.sha.sha256,e.sha224=e.sha.sha224,e.sha384=e.sha.sha384,e.sha512=e.sha.sha512,e.ripemd160=e.ripemd.ripemd160}(j1)),j1}qme();let Kme="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",Gme=(t,e=21)=>(r=e)=>{let n="",s=r|0;for(;s--;)n+=t[Math.random()*t.length|0];return n},Zme=(t=21)=>{let e="",r=t|0;for(;r--;)e+=Kme[Math.random()*64|0];return e};const As=t=>Math.floor(t*72*20),MN=(t=0)=>{let e=t;return()=>++e},Yme=()=>MN(),Jme=()=>MN(1),Xme=()=>MN(),Qme=()=>Zme().toLowerCase(),lh=t=>Gme("1234567890abcdef",t)(),e0e=()=>`${lh(8)}-${lh(4)}-${lh(4)}-${lh(4)}-${lh(12)}`;class t0e extends Ke{constructor(){super(...arguments),be(this,"xmlKeys",{xmlns:"xmlns"})}}class r0e extends Ke{constructor(){super(...arguments),be(this,"xmlKeys",{id:"Id",type:"Type",target:"Target",targetMode:"TargetMode"})}}const n0e={EXTERNAL:"External"};class s0e extends ve{constructor(e,r,n,s){super("Relationship"),this.root.push(new r0e({id:e,type:r,target:n,targetMode:s}))}}class Tc extends ve{constructor(){super("Relationships"),this.root.push(new t0e({xmlns:"http://schemas.openxmlformats.org/package/2006/relationships"}))}createRelationship(e,r,n,s){const i=new s0e(`rId${e}`,r,n,s);return this.root.push(i),i}get RelationshipCount(){return this.root.length-1}}class i0e extends Ke{constructor(){super(...arguments),be(this,"xmlKeys",{id:"w:id",initials:"w:initials",author:"w:author",date:"w:date"})}}class a0e extends Ke{constructor(){super(...arguments),be(this,"xmlKeys",{"xmlns:cx":"xmlns:cx","xmlns:cx1":"xmlns:cx1","xmlns:cx2":"xmlns:cx2","xmlns:cx3":"xmlns:cx3","xmlns:cx4":"xmlns:cx4","xmlns:cx5":"xmlns:cx5","xmlns:cx6":"xmlns:cx6","xmlns:cx7":"xmlns:cx7","xmlns:cx8":"xmlns:cx8","xmlns:mc":"xmlns:mc","xmlns:aink":"xmlns:aink","xmlns:am3d":"xmlns:am3d","xmlns:o":"xmlns:o","xmlns:r":"xmlns:r","xmlns:m":"xmlns:m","xmlns:v":"xmlns:v","xmlns:wp14":"xmlns:wp14","xmlns:wp":"xmlns:wp","xmlns:w10":"xmlns:w10","xmlns:w":"xmlns:w","xmlns:w14":"xmlns:w14","xmlns:w15":"xmlns:w15","xmlns:w16cex":"xmlns:w16cex","xmlns:w16cid":"xmlns:w16cid","xmlns:w16":"xmlns:w16","xmlns:w16sdtdh":"xmlns:w16sdtdh","xmlns:w16se":"xmlns:w16se","xmlns:wpg":"xmlns:wpg","xmlns:wpi":"xmlns:wpi","xmlns:wne":"xmlns:wne","xmlns:wps":"xmlns:wps"})}}let o0e=class extends ve{constructor({id:e,initials:r,author:n,date:s=new Date,children:i}){super("w:comment"),this.root.push(new i0e({id:e,initials:r,author:n,date:s.toISOString()}));for(const a of i)this.root.push(a)}};class l0e extends ve{constructor({children:e}){super("w:comments"),be(this,"relationships"),this.root.push(new a0e({"xmlns:cx":"http://schemas.microsoft.com/office/drawing/2014/chartex","xmlns:cx1":"http://schemas.microsoft.com/office/drawing/2015/9/8/chartex","xmlns:cx2":"http://schemas.microsoft.com/office/drawing/2015/10/21/chartex","xmlns:cx3":"http://schemas.microsoft.com/office/drawing/2016/5/9/chartex","xmlns:cx4":"http://schemas.microsoft.com/office/drawing/2016/5/10/chartex","xmlns:cx5":"http://schemas.microsoft.com/office/drawing/2016/5/11/chartex","xmlns:cx6":"http://schemas.microsoft.com/office/drawing/2016/5/12/chartex","xmlns:cx7":"http://schemas.microsoft.com/office/drawing/2016/5/13/chartex","xmlns:cx8":"http://schemas.microsoft.com/office/drawing/2016/5/14/chartex","xmlns:mc":"http://schemas.openxmlformats.org/markup-compatibility/2006","xmlns:aink":"http://schemas.microsoft.com/office/drawing/2016/ink","xmlns:am3d":"http://schemas.microsoft.com/office/drawing/2017/model3d","xmlns:o":"urn:schemas-microsoft-com:office:office","xmlns:r":"http://schemas.openxmlformats.org/officeDocument/2006/relationships","xmlns:m":"http://schemas.openxmlformats.org/officeDocument/2006/math","xmlns:v":"urn:schemas-microsoft-com:vml","xmlns:wp14":"http://schemas.microsoft.com/office/word/2010/wordprocessingDrawing","xmlns:wp":"http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing","xmlns:w10":"urn:schemas-microsoft-com:office:word","xmlns:w":"http://schemas.openxmlformats.org/wordprocessingml/2006/main","xmlns:w14":"http://schemas.microsoft.com/office/word/2010/wordml","xmlns:w15":"http://schemas.microsoft.com/office/word/2012/wordml","xmlns:w16cex":"http://schemas.microsoft.com/office/word/2018/wordml/cex","xmlns:w16cid":"http://schemas.microsoft.com/office/word/2016/wordml/cid","xmlns:w16":"http://schemas.microsoft.com/office/word/2018/wordml","xmlns:w16sdtdh":"http://schemas.microsoft.com/office/word/2020/wordml/sdtdatahash","xmlns:w16se":"http://schemas.microsoft.com/office/word/2015/wordml/symex","xmlns:wpg":"http://schemas.microsoft.com/office/word/2010/wordprocessingGroup","xmlns:wpi":"http://schemas.microsoft.com/office/word/2010/wordprocessingInk","xmlns:wne":"http://schemas.microsoft.com/office/word/2006/wordml","xmlns:wps":"http://schemas.microsoft.com/office/word/2010/wordprocessingShape"}));for(const r of e)this.root.push(new o0e(r));this.relationships=new Tc}get Relationships(){return this.relationships}}class c0e extends ve{constructor(){super("w:pageBreakBefore")}}const k2={AUTO:"auto"};class u0e extends Ke{constructor(){super(...arguments),be(this,"xmlKeys",{after:"w:after",before:"w:before",line:"w:line",lineRule:"w:lineRule",beforeAutoSpacing:"w:beforeAutospacing",afterAutoSpacing:"w:afterAutospacing"})}}class d0e extends ve{constructor(e){super("w:spacing"),this.root.push(new u0e(e))}}const I1={HEADING_1:"Heading1",HEADING_2:"Heading2",HEADING_3:"Heading3"};let zm=class extends ve{constructor(e){super("w:pStyle"),this.root.push(new ar({val:e}))}};class h0e extends ve{constructor(e){super("w:tabs");for(const r of e)this.root.push(new f0e(r))}}const K6={LEFT:"left",RIGHT:"right"};class p0e extends Ke{constructor(){super(...arguments),be(this,"xmlKeys",{val:"w:val",pos:"w:pos",leader:"w:leader"})}}class f0e extends ve{constructor({type:e,position:r,leader:n}){super("w:tab"),this.root.push(new p0e({val:e,pos:r,leader:n}))}}class O1 extends ve{constructor(e,r){super("w:numPr"),this.root.push(new m0e(r)),this.root.push(new g0e(e))}}
945class m0e extends ve{constructor(e){if(super("w:ilvl"),e>9)throw new Error("Level cannot be greater than 9. Read more here: https://answers.microsoft.com/en-us/msoffice/forum/all/does-word-support-more-than-9-list-levels/d130fdcd-1781-446d-8c84-c6c79124e4d7");this.root.push(new ar({val:e}))}}class g0e extends ve{constructor(e){super("w:numId"),this.root.push(new ar({val:typeof e=="string"?`{${e}}`:e}))}}class y0e extends ve{constructor(){super(...arguments),be(this,"fileChild",Symbol())}}class x0e extends Ke{constructor(){super(...arguments),be(this,"xmlKeys",{id:"r:id",history:"w:history",anchor:"w:anchor"})}}class w0e extends ve{constructor(e,r,n){super("w:hyperlink"),be(this,"linkId"),this.linkId=r;const s={history:1,anchor:n||void 0,id:n?void 0:`rId${this.linkId}`},i=new x0e(s);this.root.push(i),e.forEach(a=>{this.root.push(a)})}}class b0e extends ve{constructor(e){super("w:externalHyperlink"),this.options=e}}class k0e extends Ke{constructor(){super(...arguments),be(this,"xmlKeys",{id:"w:id",name:"w:name"})}}class v0e extends Ke{constructor(){super(...arguments),be(this,"xmlKeys",{id:"w:id"})}}class j0e{constructor(e){be(this,"bookmarkUniqueNumericId",Xme()),be(this,"start"),be(this,"children"),be(this,"end");const r=this.bookmarkUniqueNumericId();this.start=new S0e(e.id,r),this.children=e.children,this.end=new N0e(r)}}class S0e extends ve{constructor(e,r){super("w:bookmarkStart");const n=new k0e({name:e,id:r});this.root.push(n)}}class N0e extends ve{constructor(e){super("w:bookmarkEnd");const r=new v0e({id:e});this.root.push(r)}}class C0e extends ve{constructor(e){super("w:outlineLvl"),this.level=e,this.root.push(new ar({val:e}))}}const E0e={TOP:"top",CENTER:"center",BOTTOM:"bottom"};cd(ot({},E0e),{BOTH:"both"});class T0e extends Ke{constructor(){super(...arguments),be(this,"xmlKeys",{verticalAlign:"w:val"})}}class A0e extends ve{constructor(e){super("w:vAlign"),this.root.push(new T0e({verticalAlign:e}))}}class z0e extends ve{constructor({space:e,count:r,separate:n,equalWidth:s,children:i}){super("w:cols"),this.root.push(new cx({space:{key:"w:space",value:e===void 0?void 0:Ls(e)},count:{key:"w:num",value:r===void 0?void 0:$n(r)},separate:{key:"w:sep",value:n},equalWidth:{key:"w:equalWidth",value:s}})),!s&&i&&i.forEach(a=>this.addChildElement(a))}}const P0e=({type:t,linePitch:e,charSpace:r})=>new Pi({name:"w:docGrid",attributes:{type:{key:"w:type",value:t},linePitch:{key:"w:linePitch",value:$n(e)},charSpace:{key:"w:charSpace",value:r?$n(r):void 0}}}),Tu={DEFAULT:"default",FIRST:"first",EVEN:"even"};class _0e extends Ke{constructor(){super(...arguments),be(this,"xmlKeys",{type:"w:type",id:"r:id"})}}const G6={HEADER:"w:headerReference",FOOTER:"w:footerReference"};class R1 extends ve{constructor(e,r){super(e),this.root.push(new _0e({type:r.type||Tu.DEFAULT,id:`rId${r.id}`}))}}const I0e=({countBy:t,start:e,restart:r,distance:n})=>new Pi({name:"w:lnNumType",attributes:{countBy:{key:"w:countBy",value:t===void 0?void 0:$n(t)},start:{key:"w:start",value:e===void 0?void 0:$n(e)},restart:{key:"w:restart",value:r},distance:{key:"w:distance",value:n===void 0?void 0:Ls(n)}}});class Z6 extends Ke{constructor(){super(...arguments),be(this,"xmlKeys",{display:"w:display",offsetFrom:"w:offsetFrom",zOrder:"w:zOrder"})}}class O0e extends lx{constructor(e){if(super("w:pgBorders"),!e)return this;e.pageBorders?this.root.push(new Z6({display:e.pageBorders.display,offsetFrom:e.pageBorders.offsetFrom,zOrder:e.pageBorders.zOrder})):this.root.push(new Z6({})),e.pageBorderTop&&this.root.push(new Kt("w:top",e.pageBorderTop)),e.pageBorderLeft&&this.root.push(new Kt("w:left",e.pageBorderLeft)),e.pageBorderBottom&&this.root.push(new Kt("w:bottom",e.pageBorderBottom)),e.pageBorderRight&&this.root.push(new Kt("w:right",e.pageBorderRight))}}class R0e extends ve{constructor(e,r,n,s,i,a,l){super("w:pgMar"),this.root.push(new cx({top:{key:"w:top",value:Rl(e)},right:{key:"w:right",value:Ls(r)},bottom:{key:"w:bottom",value:Rl(n)},left:{key:"w:left",value:Ls(s)},header:{key:"w:header",value:Ls(i)},footer:{key:"w:footer",value:Ls(a)},gutter:{key:"w:gutter",value:Ls(l)}}))}}class L0e extends Ke{constructor(){super(...arguments),be(this,"xmlKeys",{start:"w:start",formatType:"w:fmt",separator:"w:chapSep"})}}class M0e extends ve{constructor({start:e,formatType:r,separator:n}
945){super("w:pgNumType"),this.root.push(new L0e({start:e===void 0?void 0:$n(e),formatType:r,separator:n}))}}const v2={PORTRAIT:"portrait",LANDSCAPE:"landscape"},D0e=({width:t,height:e,orientation:r,code:n})=>{const s=Ls(t),i=Ls(e);return new Pi({name:"w:pgSz",attributes:{width:{key:"w:w",value:r===v2.LANDSCAPE?i:s},height:{key:"w:h",value:r===v2.LANDSCAPE?s:i},orientation:{key:"w:orient",value:r},code:{key:"w:code",value:n}}})};class F0e extends Ke{constructor(){super(...arguments),be(this,"xmlKeys",{val:"w:val"})}}class B0e extends ve{constructor(e){super("w:textDirection"),this.root.push(new F0e({val:e}))}}class $0e extends Ke{constructor(){super(...arguments),be(this,"xmlKeys",{val:"w:val"})}}class U0e extends ve{constructor(e){super("w:type"),this.root.push(new $0e({val:e}))}}const ul={TOP:1440,RIGHT:1440,BOTTOM:1440,LEFT:1440,HEADER:708,FOOTER:708,GUTTER:0},L1={WIDTH:11906,HEIGHT:16838,ORIENTATION:v2.PORTRAIT};class W0e extends ve{constructor({page:{size:{width:e=L1.WIDTH,height:r=L1.HEIGHT,orientation:n=L1.ORIENTATION}={},margin:{top:s=ul.TOP,right:i=ul.RIGHT,bottom:a=ul.BOTTOM,left:l=ul.LEFT,header:c=ul.HEADER,footer:u=ul.FOOTER,gutter:d=ul.GUTTER}={},pageNumbers:h={},borders:p,textDirection:f}={},grid:{linePitch:m=360,charSpace:y,type:k}={},headerWrapperGroup:g={},footerWrapperGroup:x={},lineNumbers:w,titlePage:b,verticalAlign:v,column:A,type:C}={}){super("w:sectPr"),this.addHeaderFooterGroup(G6.HEADER,g),this.addHeaderFooterGroup(G6.FOOTER,x),C&&this.root.push(new U0e(C)),this.root.push(D0e({width:e,height:r,orientation:n})),this.root.push(new R0e(s,i,a,l,c,u,d)),p&&this.root.push(new O0e(p)),w&&this.root.push(I0e(w)),this.root.push(new M0e(h)),A&&this.root.push(new z0e(A)),v&&this.root.push(new A0e(v)),b!==void 0&&this.root.push(new je("w:titlePg",b)),f&&this.root.push(new B0e(f)),this.root.push(P0e({linePitch:m,charSpace:y,type:k}))}addHeaderFooterGroup(e,r){r.default&&this.root.push(new R1(e,{type:Tu.DEFAULT,id:r.default.View.ReferenceId})),r.first&&this.root.push(new R1(e,{type:Tu.FIRST,id:r.first.View.ReferenceId})),r.even&&this.root.push(new R1(e,{type:Tu.EVEN,id:r.even.View.ReferenceId}))}}class V0e extends ve{constructor(){super("w:body"),be(this,"sections",[])}addSection(e){const r=this.sections.pop();this.root.push(this.createSectionParagraph(r)),this.sections.push(new W0e(e))}prepForXml(e){return this.sections.length===1&&(this.root.splice(0,1),this.root.push(this.sections.pop())),super.prepForXml(e)}push(e){this.root.push(e)}createSectionParagraph(e){const r=new us({}),n=new fd({});return n.push(e),r.addChildElement(n),r}}const Y6={wpc:"http://schemas.microsoft.com/office/word/2010/wordprocessingCanvas",mc:"http://schemas.openxmlformats.org/markup-compatibility/2006",o:"urn:schemas-microsoft-com:office:office",r:"http://schemas.openxmlformats.org/officeDocument/2006/relationships",m:"http://schemas.openxmlformats.org/officeDocument/2006/math",v:"urn:schemas-microsoft-com:vml",wp14:"http://schemas.microsoft.com/office/word/2010/wordprocessingDrawing",wp:"http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing",w10:"urn:schemas-microsoft-com:office:word",w:"http://schemas.openxmlformats.org/wordprocessingml/2006/main",w14:"http://schemas.microsoft.com/office/word/2010/wordml",w15:"http://schemas.microsoft.com/office/word/2012/wordml",wpg:"http://schemas.microsoft.com/office/word/2010/wordprocessingGroup",wpi:"http://schemas.microsoft.com/office/word/2010/wordprocessingInk",wne:"http://schemas.microsoft.com/office/word/2006/wordml",wps:"http://schemas.microsoft.com/office/word/2010/wordprocessingShape",cp:"http://schemas.openxmlformats.org/package/2006/metadata/core-properties",dc:"http://purl.org/dc/elements/1.1/",dcterms:"http://purl.org/dc/terms/",dcmitype:"http://purl.org/dc/dcmitype/",xsi:"http://www.w3.org/2001/XMLSchema-instance",cx:"http://schemas.microsoft.com/office/drawing/2014/chartex",cx1:"http://schemas.microsoft.com/office/drawing/2015/9/8/chartex",cx2:"http://schemas.microsoft.com/office/drawing/2015/10/21/chartex",cx3:"http://schemas.microsoft.com/office/drawing/2016/5/9/chartex",cx4:"http://schemas.microsoft.com/office/drawing/2016/5/10/chartex",cx5:"http://schemas.microsoft.com/office/drawing/2016/5/11/chartex",cx6:"http://schemas.microsoft.com/office/drawing/2016/5/12/chartex",cx7:"http://schemas.microsoft.com/office/drawing/2016/5/13/chartex",cx8:"http://schemas.microsoft.com/office/drawing/2016/5/14/chartex",aink:"http://schemas.microsoft.com/office/drawing/2016/ink",am3d:"http://schemas.microsoft.com/office/drawing/2017/model3d",w16cex:"http://schemas.microsoft.com/office/word/2018/wordml/cex",w16cid:"http://schemas.microsoft.com/office/word/2016/wordml/cid",w16:"http://schemas.microsoft.com/office/word/2018/wordml",w16sdtdh:"http://schemas.microsoft.com/office/word/2020/wordml/sdtdatahash",w16se:"http://schemas.microsoft.com/office/word/2015/wordml/symex"};class fx extends Ke{constructor(e,r){super(ot({Ignorable:r},Object.fromEntries(e.map(n=>[n,Y6[n]])))),be(this,"xmlKeys",ot({Ignorable:"mc:Ignorable"},Object.fromEntries(Object.keys(Y6).map(n=>[n,`xmlns:${n}`]))))}}class H0e extends Ke{constructor(){super(...arguments),be(this,"xmlKeys",{color:"w:color",themeColor:"w:themeColor",themeShade:"w:themeShade",themeTint:"w:themeTint"})}}class q0e extends ve{constructor(e){super("w:background"),this.root.push(new H0e({color:e.color===void 0?void 0:dd(e.color),themeColor:e.themeColor,themeShade:e.themeShade===void 0?void 0:P6(e.themeShade),themeTint:e.themeTint===void 0?void 0:P6(e.themeTint)}))}}let K0e=class extends ve{constructor(e){super("w:document"),be(this,"body"),this.root.push(new fx(["wpc","mc","o","r","m","v","wp14","wp","w10","w","w14","w15","wpg","wpi","wne","wps","cx","cx1","cx2","cx3","cx4","cx5","cx6","cx7","cx8","aink","am3d","w16cex","w16cid","w16","w16sdtdh","w16se"],"w14 w15 wp14")),this.body=new V0e,e.background&&this.root.push(new q0e(e.background)),this.root.push(this.body)}add(e){return this.body.push(e),this}get Body(){return this.body}};class dD{constructor(e){be(this,"document"),be(this,"relationships"),this.document=new K0e(e),this.relationships=new Tc}get View(){return this.document}get Relationships(){return this.relationships}}class G0e extends Ke{constructor(){super(...arguments),be(this,"xmlKeys",{val:"w:val"})}}class Z0e extends ve{constructor(){super("w:wordWrap"),this.root.push(new G0e({val:0}))}}const Y0e=t=>{var e,r;return new Pi({name:"w:framePr",attributes:{anchorLock:{key:"w:anchorLock",value:t.anchorLock},dropCap:{key:"w:dropCap",value:t.dropCap},width:{key:"w:w",value:t.width},height:{key:"w:h",value:t.height},x:{key:"w:x",value:t.position?t.position.x:void 0},y:{key:"w:y",value:t.position?t.position.y:void 0},anchorHorizontal:{key:"w:hAnchor",value:t.anchor.horizontal},anchorVertical:{key:"w:vAnchor",value:t.anchor.vertical},spaceHorizontal:{key:"w:hSpace",value:(e=t.space)==null?void 0:e.horizontal},spaceVertical:{key:"w:vSpace",value:(r=t.space)==null?void 0:r.vertical},rule:{key:"w:hRule",value:t.rule},alignmentX:{key:"w:xAlign",value:t.alignment?t.alignment.x:void 0},alignmentY:{key:"w:yAlign",value:t.alignment?t.alignment.y:void 0},lines:{key:"w:lines",value:t.lines},wrap:{key:"w:wrap",value:t.wrap}}})};class fd extends lx{constructor(e){var r,n;if(super("w:pPr"),be(this,"numberingReferences",[]),!e)return this;e.heading&&this.push(new zm(e.heading)),e.bullet&&this.push(new zm("ListParagraph")),e.numbering&&!e.style&&!e.heading&&(e.numbering.custom||this.push(new zm("ListParagraph"))),e.style&&this.push(new zm(e.style)),e.keepNext!==void 0&&this.push(new je("w:keepNext",e.keepNext)),e.keepLines!==void 0&&this.push(new je("w:keepLines",e.keepLines)),e.pageBreakBefore&&this.push(new c0e),e.frame&&this.push(Y0e(e.frame)),e.widowControl!==void 0&&this.push(new je("w:widowControl",e.widowControl)),e.bullet&&this.push(new O1(1,e.bullet.level)),e.numbering?(this.numberingReferences.push({reference:e.numbering.reference,instance:(r=e.numbering.instance)!=null?r:0}),this.push(new O1(`${e.numbering.reference}-${(n=e.numbering.instance)!=null?n:0}`,e.numbering.level))):e.numbering===!1&&this.push(new O1(0,0)),e.border&&this.push(new xme(e.border)),e.thematicBreak&&this.push(new wme),e.shading&&this.push(new iD(e.shading)),e.wordWrap&&this.push(new Z0e),e.overflowPunctuation&&this.push(new je("w:overflowPunct",e.overflowPunctuation));const s=[...e.rightTabStop!==void 0?[{type:K6.RIGHT,position:e.rightTabStop}]:[],...e.tabStops?e.tabStops:[],...e.leftTabStop!==void 0?[{type:K6.LEFT,position:e.leftTabStop}]:[]];s.length>0&&this.push(new h0e(s)),e.bidirectional!==void 0&&this.push(new je("w:bidi",e.bidirectional)),e.spacing&&this.push(new d0e(e.spacing)),e.indent&&this.push(new bme(e.indent)),e.contextualSpacing!==void 0&&this.push(new je("w:contextualSpacing",e.contextualSpacing)),e.alignment&&this.push(new gme(e.alignment)),e.outlineLevel!==void 0&&this.push(new C0e(e.outlineLevel)),e.suppressLineNumbers!==void 0&&this.push(new je("w:suppressLineNumbers",e.suppressLineNumbers)),e.autoSpaceEastAsianText!==void 0&&this.push(new je("w:autoSpaceDN",e.autoSpaceEastAsianText)),e.run&&this.push(new Ec(e.run))}push(e){this.root.push(e)}prepForXml(e){if(e.viewWrapper instanceof dD)for(const r of this.numberingReferences)e.file.Numbering.createConcreteNumberingInstance(r.reference,r.instance);return super.prepForXml(e)}}class us extends y0e{constructor(e){if(super("w:p"),be(this,"properties"),typeof e=="string")return this.properties=new fd({}),this.root.push(this.properties),this.root.push(new ep(e)),this;if(this.properties=new fd(e),this.root.push(this.properties),e.text&&this.root.push(new ep(e.text)),e.children)for(const r of e.children){if(r instanceof j0e){this.root.push(r.start);for(const n of r.children)this.root.push(n);
945this.root.push(r.end);continue}this.root.push(r)}}prepForXml(e){for(const r of this.root)if(r instanceof b0e){const n=this.root.indexOf(r),s=new w0e(r.options.children,Qme());e.viewWrapper.Relationships.createRelationship(s.linkId,"http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink",r.options.link,n0e.EXTERNAL),this.root[n]=s}return super.prepForXml(e)}addRunToFront(e){return this.root.splice(1,0,e),this}}const Mc={style:ON.NONE,size:0,color:"auto"},Dc={style:ON.SINGLE,size:4,color:"auto"};class J0e extends ve{constructor(e){super("w:tblBorders"),e.top?this.root.push(new Kt("w:top",e.top)):this.root.push(new Kt("w:top",Dc)),e.left?this.root.push(new Kt("w:left",e.left)):this.root.push(new Kt("w:left",Dc)),e.bottom?this.root.push(new Kt("w:bottom",e.bottom)):this.root.push(new Kt("w:bottom",Dc)),e.right?this.root.push(new Kt("w:right",e.right)):this.root.push(new Kt("w:right",Dc)),e.insideHorizontal?this.root.push(new Kt("w:insideH",e.insideHorizontal)):this.root.push(new Kt("w:insideH",Dc)),e.insideVertical?this.root.push(new Kt("w:insideV",e.insideVertical)):this.root.push(new Kt("w:insideV",Dc))}}be(J0e,"NONE",{top:Mc,bottom:Mc,left:Mc,right:Mc,insideHorizontal:Mc,insideVertical:Mc});class X0e extends Ke{constructor(){super(...arguments),be(this,"xmlKeys",{xmlns:"xmlns",vt:"xmlns:vt"})}}class Q0e extends ve{constructor(){super("Properties"),this.root.push(new X0e({xmlns:"http://schemas.openxmlformats.org/officeDocument/2006/extended-properties",vt:"http://schemas.openxmlformats.org/officeDocument/2006/docPropsVTypes"}))}}class ege extends Ke{constructor(){super(...arguments),be(this,"xmlKeys",{xmlns:"xmlns"})}}class tge extends Ke{constructor(){super(...arguments),be(this,"xmlKeys",{contentType:"ContentType",extension:"Extension"})}}class Fi extends ve{constructor(e,r){super("Default"),this.root.push(new tge({contentType:e,extension:r}))}}class rge extends Ke{constructor(){super(...arguments),be(this,"xmlKeys",{contentType:"ContentType",partName:"PartName"})}}class ss extends ve{constructor(e,r){super("Override"),this.root.push(new rge({contentType:e,partName:r}))}}class nge extends ve{constructor(){super("Types"),this.root.push(new ege({xmlns:"http://schemas.openxmlformats.org/package/2006/content-types"})),this.root.push(new Fi("image/png","png")),this.root.push(new Fi("image/jpeg","jpeg")),this.root.push(new Fi("image/jpeg","jpg")),this.root.push(new Fi("image/bmp","bmp")),this.root.push(new Fi("image/gif","gif")),this.root.push(new Fi("image/svg+xml","svg")),this.root.push(new Fi("application/vnd.openxmlformats-package.relationships+xml","rels")),this.root.push(new Fi("application/xml","xml")),this.root.push(new Fi("application/vnd.openxmlformats-officedocument.obfuscatedFont","odttf")),this.root.push(new ss("application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml","/word/document.xml")),this.root.push(new ss("application/vnd.openxmlformats-officedocument.wordprocessingml.styles+xml","/word/styles.xml")),this.root.push(new ss("application/vnd.openxmlformats-package.core-properties+xml","/docProps/core.xml")),this.root.push(new ss("application/vnd.openxmlformats-officedocument.custom-properties+xml","/docProps/custom.xml")),this.root.push(new ss("application/vnd.openxmlformats-officedocument.extended-properties+xml","/docProps/app.xml")),this.root.push(new ss("application/vnd.openxmlformats-officedocument.wordprocessingml.numbering+xml","/word/numbering.xml")),this.root.push(new ss("application/vnd.openxmlformats-officedocument.wordprocessingml.footnotes+xml","/word/footnotes.xml")),this.root.push(new ss("application/vnd.openxmlformats-officedocument.wordprocessingml.settings+xml","/word/settings.xml")),this.root.push(new ss("application/vnd.openxmlformats-officedocument.wordprocessingml.comments+xml","/word/comments.xml")),this.root.push(new ss("application/vnd.openxmlformats-officedocument.wordprocessingml.fontTable+xml","/word/fontTable.xml"))}addFooter(e){this.root.push(new ss("application/vnd.openxmlformats-officedocument.wordprocessingml.footer+xml",`/word/footer${e}.xml`))}addHeader(e){this.root.push(new ss("application/vnd.openxmlformats-officedocument.wordprocessingml.header+xml",`/word/header${e}.xml`))}}class sge extends ve{constructor(e){super("cp:coreProperties"),this.root.push(new fx(["cp","dc","dcterms","dcmitype","xsi"])),e.title&&this.root.push(new ll("dc:title",e.title)),e.subject&&this.root.push(new ll("dc:subject",e.subject)),e.creator&&this.root.push(new ll("dc:creator",e.creator)),e.keywords&&this.root.push(new ll("cp:keywords",e.keywords)),e.description&&this.root.push(new ll("dc:description",e.description)),e.lastModifiedBy&&this.root.push(new ll("cp:lastModifiedBy",e.lastModifiedBy)),e.revision&&this.root.push(new ll("cp:revision",String(e.revision))),this.root.push(new J6("dcterms:created")),this.root.push(new J6("dcterms:modified"))}}class ige extends Ke{constructor(){super(...arguments),be(this,"xmlKeys",{type:"xsi:type"})}}class J6 extends ve{constructor(e){super(e),this.root.push(new ige({type:"dcterms:W3CDTF"})),this.root.push(fme(new Date))}}class age extends Ke{constructor(){super(...arguments),be(this,"xmlKeys",{xmlns:"xmlns",vt:"xmlns:vt"})}}class oge extends Ke{constructor(){super(...arguments),be(this,"xmlKeys",{fmtid:"fmtid",pid:"pid",name:"name"})}}class lge extends ve{constructor(e,r){super("property"),this.root.push(new oge({fmtid:"{D5CDD505-2E9C-101B-9397-08002B2CF9AE}",pid:e.toString(),name:r.name})),this.root.push(new cge(r.value))}}class cge extends ve{constructor(e){super("vt:lpwstr"),this.root.push(e)}}class uge extends ve{constructor(e){super("Properties"),be(this,"nextId"),be(this,"properties",[]),this.root.push(new age({xmlns:"http://schemas.openxmlformats.org/officeDocument/2006/custom-properties",vt:"http://schemas.openxmlformats.org/officeDocument/2006/docPropsVTypes"})),this.nextId=2;
945for(const r of e)this.addCustomProperty(r)}prepForXml(e){return this.properties.forEach(r=>this.root.push(r)),super.prepForXml(e)}addCustomProperty(e){this.properties.push(new lge(this.nextId++,e))}}const Pm=({id:t,fontKey:e,subsetted:r},n)=>new Pi({name:n,attributes:ot({id:{key:"r:id",value:t}},e?{fontKey:{key:"w:fontKey",value:`{${e}}`}}:{}),children:[...r?[new je("w:subsetted",r)]:[]]}),dge=({name:t,altName:e,panose1:r,charset:n,family:s,notTrueType:i,pitch:a,sig:l,embedRegular:c,embedBold:u,embedItalic:d,embedBoldItalic:h})=>new Pi({name:"w:font",attributes:{name:{key:"w:name",value:t}},children:[...e?[oh("w:altName",e)]:[],...r?[oh("w:panose1",r)]:[],...n?[oh("w:charset",n)]:[],oh("w:family",s),...i?[new je("w:notTrueType",i)]:[],oh("w:pitch",a),...l?[new Pi({name:"w:sig",attributes:{usb0:{key:"w:usb0",value:l.usb0},usb1:{key:"w:usb1",value:l.usb1},usb2:{key:"w:usb2",value:l.usb2},usb3:{key:"w:usb3",value:l.usb3},csb0:{key:"w:csb0",value:l.csb0},csb1:{key:"w:csb1",value:l.csb1}}})]:[],...c?[Pm(c,"w:embedRegular")]:[],...u?[Pm(u,"w:embedBold")]:[],...d?[Pm(d,"w:embedItalic")]:[],...h?[Pm(h,"w:embedBoldItalic")]:[]]}),hge=({name:t,index:e,fontKey:r,characterSet:n})=>dge({name:t,sig:{usb0:"E0002AFF",usb1:"C000247B",usb2:"00000009",usb3:"00000000",csb0:"000001FF",csb1:"00000000"},charset:n,family:"auto",pitch:"variable",embedRegular:{fontKey:r,id:`rId${e}`}}),pge=t=>new Pi({name:"w:fonts",attributes:{mc:{key:"xmlns:mc",value:"http://schemas.openxmlformats.org/markup-compatibility/2006"},r:{key:"xmlns:r",value:"http://schemas.openxmlformats.org/officeDocument/2006/relationships"},w:{key:"xmlns:w",value:"http://schemas.openxmlformats.org/wordprocessingml/2006/main"},w14:{key:"xmlns:w14",value:"http://schemas.microsoft.com/office/word/2010/wordml"},w15:{key:"xmlns:w15",value:"http://schemas.microsoft.com/office/word/2012/wordml"},w16cex:{key:"xmlns:w16cex",value:"http://schemas.microsoft.com/office/word/2018/wordml/cex"},w16cid:{key:"xmlns:w16cid",value:"http://schemas.microsoft.com/office/word/2016/wordml/cid"},w16:{key:"xmlns:w16",value:"http://schemas.microsoft.com/office/word/2018/wordml"},w16sdtdh:{key:"xmlns:w16sdtdh",value:"http://schemas.microsoft.com/office/word/2020/wordml/sdtdatahash"},w16se:{key:"xmlns:w16se",value:"http://schemas.microsoft.com/office/word/2015/wordml/symex"},Ignorable:{key:"mc:Ignorable",value:"w14 w15 w16se w16cid w16 w16cex w16sdtdh"}},children:t.map((e,r)=>hge({name:e.name,index:r+1,fontKey:e.fontKey}))});class fge{constructor(e){be(this,"fontTable"),be(this,"relationships"),be(this,"fontOptionsWithKey",[]),this.options=e,this.fontOptionsWithKey=e.map(r=>cd(ot({},r),{fontKey:e0e()})),this.fontTable=pge(this.fontOptionsWithKey),this.relationships=new Tc;for(let r=0;r<e.length;r++)this.relationships.createRelationship(r+1,"http://schemas.openxmlformats.org/officeDocument/2006/relationships/font",`fonts/${e[r].name}.odttf`)}get View(){return this.fontTable}get Relationships(){return this.relationships}}class mge extends Ke{constructor(){super(...arguments),be(this,"xmlKeys",{wpc:"xmlns:wpc",mc:"xmlns:mc",o:"xmlns:o",r:"xmlns:r",m:"xmlns:m",v:"xmlns:v",wp14:"xmlns:wp14",wp:"xmlns:wp",w10:"xmlns:w10",w:"xmlns:w",w14:"xmlns:w14",w15:"xmlns:w15",wpg:"xmlns:wpg",wpi:"xmlns:wpi",wne:"xmlns:wne",wps:"xmlns:wps",cp:"xmlns:cp",dc:"xmlns:dc",dcterms:"xmlns:dcterms",dcmitype:"xmlns:dcmitype",xsi:"xmlns:xsi",type:"xsi:type"})}}let gge=class extends tD{constructor(e,r){super("w:ftr",r),be(this,"refId"),this.refId=e,r||this.root.push(new mge({wpc:"http://schemas.microsoft.com/office/word/2010/wordprocessingCanvas",mc:"http://schemas.openxmlformats.org/markup-compatibility/2006",o:"urn:schemas-microsoft-com:office:office",r:"http://schemas.openxmlformats.org/officeDocument/2006/relationships",m:"http://schemas.openxmlformats.org/officeDocument/2006/math",v:"urn:schemas-microsoft-com:vml",wp14:"http://schemas.microsoft.com/office/word/2010/wordprocessingDrawing",wp:"http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing",w10:"urn:schemas-microsoft-com:office:word",w:"http://schemas.openxmlformats.org/wordprocessingml/2006/main",w14:"http://schemas.microsoft.com/office/word/2010/wordml",w15:"http://schemas.microsoft.com/office/word/2012/wordml",wpg:"http://schemas.microsoft.com/office/word/2010/wordprocessingGroup",wpi:"http://schemas.microsoft.com/office/word/2010/wordprocessingInk",wne:"http://schemas.microsoft.com/office/word/2006/wordml",wps:"http://schemas.microsoft.com/office/word/2010/wordprocessingShape"}))}get ReferenceId(){return this.refId}add(e){this.root.push(e)}};
945class yge{constructor(e,r,n){be(this,"footer"),be(this,"relationships"),this.media=e,this.footer=new gge(r,n),this.relationships=new Tc}add(e){this.footer.add(e)}addChildElement(e){this.footer.addChildElement(e)}get View(){return this.footer}get Relationships(){return this.relationships}get Media(){return this.media}}class xge extends Ke{constructor(){super(...arguments),be(this,"xmlKeys",{type:"w:type",id:"w:id"})}}class wge extends ve{constructor(){super("w:footnoteRef")}}class bge extends px{constructor(){super({style:"FootnoteReference"}),this.root.push(new wge)}}const X6={SEPERATOR:"separator",CONTINUATION_SEPERATOR:"continuationSeparator"};class M1 extends ve{constructor(e){super("w:footnote"),this.root.push(new xge({type:e.type,id:e.id}));for(let r=0;r<e.children.length;r++){const n=e.children[r];r===0&&n.addRunToFront(new bge),this.root.push(n)}}}class kge extends ve{constructor(){super("w:continuationSeparator")}}class vge extends px{constructor(){super({}),this.root.push(new kge)}}class jge extends ve{constructor(){super("w:separator")}}class Sge extends px{constructor(){super({}),this.root.push(new jge)}}class Nge extends Ke{constructor(){super(...arguments),be(this,"xmlKeys",{wpc:"xmlns:wpc",mc:"xmlns:mc",o:"xmlns:o",r:"xmlns:r",m:"xmlns:m",v:"xmlns:v",wp14:"xmlns:wp14",wp:"xmlns:wp",w10:"xmlns:w10",w:"xmlns:w",w14:"xmlns:w14",w15:"xmlns:w15",wpg:"xmlns:wpg",wpi:"xmlns:wpi",wne:"xmlns:wne",wps:"xmlns:wps",Ignorable:"mc:Ignorable"})}}class Cge extends ve{constructor(){super("w:footnotes"),this.root.push(new Nge({wpc:"http://schemas.microsoft.com/office/word/2010/wordprocessingCanvas",mc:"http://schemas.openxmlformats.org/markup-compatibility/2006",o:"urn:schemas-microsoft-com:office:office",r:"http://schemas.openxmlformats.org/officeDocument/2006/relationships",m:"http://schemas.openxmlformats.org/officeDocument/2006/math",v:"urn:schemas-microsoft-com:vml",wp14:"http://schemas.microsoft.com/office/word/2010/wordprocessingDrawing",wp:"http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing",w10:"urn:schemas-microsoft-com:office:word",w:"http://schemas.openxmlformats.org/wordprocessingml/2006/main",w14:"http://schemas.microsoft.com/office/word/2010/wordml",w15:"http://schemas.microsoft.com/office/word/2012/wordml",wpg:"http://schemas.microsoft.com/office/word/2010/wordprocessingGroup",wpi:"http://schemas.microsoft.com/office/word/2010/wordprocessingInk",wne:"http://schemas.microsoft.com/office/word/2006/wordml",wps:"http://schemas.microsoft.com/office/word/2010/wordprocessingShape",Ignorable:"w14 w15 wp14"}));const e=new M1({id:-1,type:X6.SEPERATOR,children:[new us({spacing:{after:0,line:240,lineRule:k2.AUTO},children:[new Sge]})]});this.root.push(e);
945const r=new M1({id:0,type:X6.CONTINUATION_SEPERATOR,children:[new us({spacing:{after:0,line:240,lineRule:k2.AUTO},children:[new vge]})]});this.root.push(r)}createFootNote(e,r){const n=new M1({id:e,children:r});this.root.push(n)}}class Ege{constructor(){be(this,"footnotess"),be(this,"relationships"),this.footnotess=new Cge,this.relationships=new Tc}get View(){return this.footnotess}get Relationships(){return this.relationships}}class Tge extends Ke{constructor(){super(...arguments),be(this,"xmlKeys",{wpc:"xmlns:wpc",mc:"xmlns:mc",o:"xmlns:o",r:"xmlns:r",m:"xmlns:m",v:"xmlns:v",wp14:"xmlns:wp14",wp:"xmlns:wp",w10:"xmlns:w10",w:"xmlns:w",w14:"xmlns:w14",w15:"xmlns:w15",wpg:"xmlns:wpg",wpi:"xmlns:wpi",wne:"xmlns:wne",wps:"xmlns:wps",cp:"xmlns:cp",dc:"xmlns:dc",dcterms:"xmlns:dcterms",dcmitype:"xmlns:dcmitype",xsi:"xmlns:xsi",type:"xsi:type",cx:"xmlns:cx",cx1:"xmlns:cx1",cx2:"xmlns:cx2",cx3:"xmlns:cx3",cx4:"xmlns:cx4",cx5:"xmlns:cx5",cx6:"xmlns:cx6",cx7:"xmlns:cx7",cx8:"xmlns:cx8",w16cid:"xmlns:w16cid",w16se:"xmlns:w16se"})}}let Age=class extends tD{constructor(e,r){super("w:hdr",r),be(this,"refId"),this.refId=e,r||this.root.push(new Tge({wpc:"http://schemas.microsoft.com/office/word/2010/wordprocessingCanvas",mc:"http://schemas.openxmlformats.org/markup-compatibility/2006",o:"urn:schemas-microsoft-com:office:office",r:"http://schemas.openxmlformats.org/officeDocument/2006/relationships",m:"http://schemas.openxmlformats.org/officeDocument/2006/math",v:"urn:schemas-microsoft-com:vml",wp14:"http://schemas.microsoft.com/office/word/2010/wordprocessingDrawing",wp:"http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing",w10:"urn:schemas-microsoft-com:office:word",w:"http://schemas.openxmlformats.org/wordprocessingml/2006/main",w14:"http://schemas.microsoft.com/office/word/2010/wordml",w15:"http://schemas.microsoft.com/office/word/2012/wordml",wpg:"http://schemas.microsoft.com/office/word/2010/wordprocessingGroup",wpi:"http://schemas.microsoft.com/office/word/2010/wordprocessingInk",wne:"http://schemas.microsoft.com/office/word/2006/wordml",wps:"http://schemas.microsoft.com/office/word/2010/wordprocessingShape",cx:"http://schemas.microsoft.com/office/drawing/2014/chartex",cx1:"http://schemas.microsoft.com/office/drawing/2015/9/8/chartex",cx2:"http://schemas.microsoft.com/office/drawing/2015/10/21/chartex",cx3:"http://schemas.microsoft.com/office/drawing/2016/5/9/chartex",cx4:"http://schemas.microsoft.com/office/drawing/2016/5/10/chartex",cx5:"http://schemas.microsoft.com/office/drawing/2016/5/11/chartex",cx6:"http://schemas.microsoft.com/office/drawing/2016/5/12/chartex",cx7:"http://schemas.microsoft.com/office/drawing/2016/5/13/chartex",cx8:"http://schemas.microsoft.com/office/drawing/2016/5/14/chartex",w16cid:"http://schemas.microsoft.com/office/word/2016/wordml/cid",w16se:"http://schemas.microsoft.com/office/word/2015/wordml/symex"}))}get ReferenceId(){return this.refId}add(e){this.root.push(e)}};class zge{constructor(e,r,n){be(this,"header"),be(this,"relationships"),this.media=e,this.header=new Age(r,n),this.relationships=new Tc}add(e){return this.header.add(e),this}addChildElement(e){this.header.addChildElement(e)}get View(){return this.header}get Relationships(){return this.relationships}get Media(){return this.media}}class Pge{constructor(){be(this,"map"),this.map=new Map}addImage(e,r){this.map.set(e,r)}get Array(){return Array.from(this.map.values())}}const Bi={BULLET:"bullet"};class _ge extends Ke{constructor(){super(...arguments),be(this,"xmlKeys",{ilvl:"w:ilvl",tentative:"w15:tentative"})}}class Ige extends ve{constructor(e){super("w:numFmt"),this.root.push(new ar({val:e}))}}class Oge extends ve{constructor(e){super("w:lvlText"),this.root.push(new ar({val:e}))}}class Rge extends ve{constructor(e){super("w:lvlJc"),this.root.push(new ar({val:e}))}}class Lge extends ve{constructor(e){super("w:suff"),this.root.push(new ar({val:e}))}}class Mge extends ve{constructor(){super("w:isLgl")}}class Dge extends ve{constructor({level:e,format:r,text:n,alignment:s=ii.START,start:i=1,style:a,suffix:l,isLegalNumberingStyle:c}
945){if(super("w:lvl"),be(this,"paragraphProperties"),be(this,"runProperties"),this.root.push(new Qh("w:start",$n(i))),r&&this.root.push(new Ige(r)),l&&this.root.push(new Lge(l)),c&&this.root.push(new Mge),n&&this.root.push(new Oge(n)),this.root.push(new Rge(s)),this.paragraphProperties=new fd(a&&a.paragraph),this.runProperties=new Ec(a&&a.run),this.root.push(this.paragraphProperties),this.root.push(this.runProperties),e>9)throw new Error("Level cannot be greater than 9. Read more here: https://answers.microsoft.com/en-us/msoffice/forum/all/does-word-support-more-than-9-list-levels/d130fdcd-1781-446d-8c84-c6c79124e4d7");this.root.push(new _ge({ilvl:$n(e),tentative:1}))}}class Fge extends Dge{}class Bge extends ve{constructor(e){super("w:multiLevelType"),this.root.push(new ar({val:e}))}}class $ge extends Ke{constructor(){super(...arguments),be(this,"xmlKeys",{abstractNumId:"w:abstractNumId",restartNumberingAfterBreak:"w15:restartNumberingAfterBreak"})}}class Q6 extends ve{constructor(e,r){super("w:abstractNum"),be(this,"id"),this.root.push(new $ge({abstractNumId:$n(e),restartNumberingAfterBreak:0})),this.root.push(new Bge("hybridMultilevel")),this.id=e;for(const n of r)this.root.push(new Fge(n))}}class Uge extends ve{constructor(e){super("w:abstractNumId"),this.root.push(new ar({val:e}))}}class Wge extends Ke{constructor(){super(...arguments),be(this,"xmlKeys",{numId:"w:numId"})}}class eA extends ve{constructor(e){if(super("w:num"),be(this,"numId"),be(this,"reference"),be(this,"instance"),this.numId=e.numId,this.reference=e.reference,this.instance=e.instance,this.root.push(new Wge({numId:$n(e.numId)})),this.root.push(new Uge($n(e.abstractNumId))),e.overrideLevels&&e.overrideLevels.length)for(const r of e.overrideLevels)this.root.push(new Hge(r.num,r.start))}}class Vge extends Ke{constructor(){super(...arguments),be(this,"xmlKeys",{ilvl:"w:ilvl"})}}class Hge extends ve{constructor(e,r){super("w:lvlOverride"),this.root.push(new Vge({ilvl:e})),r!==void 0&&this.root.push(new Kge(r))}}class qge extends Ke{constructor(){super(...arguments),be(this,"xmlKeys",{val:"w:val"})}}class Kge extends ve{constructor(e){super("w:startOverride"),this.root.push(new qge({val:e}))}}class Gge extends ve{constructor(e){super("w:numbering"),be(this,"abstractNumberingMap",new Map),be(this,"concreteNumberingMap",new Map),be(this,"referenceConfigMap",new Map),be(this,"abstractNumUniqueNumericId",Yme()),be(this,"concreteNumUniqueNumericId",Jme()),this.root.push(new fx(["wpc","mc","o","r","m","v","wp14","wp","w10","w","w14","w15","wpg","wpi","wne","wps"],"w14 w15 wp14"));const r=new Q6(this.abstractNumUniqueNumericId(),[{level:0,format:Bi.BULLET,text:"●",alignment:ii.LEFT,style:{paragraph:{indent:{left:As(.5),hanging:As(.25)}}}},{level:1,format:Bi.BULLET,text:"○",alignment:ii.LEFT,style:{paragraph:{indent:{left:As(1),hanging:As(.25)}}}},{level:2,format:Bi.BULLET,text:"■",alignment:ii.LEFT,style:{paragraph:{indent:{left:2160,hanging:As(.25)}}}},{level:3,format:Bi.BULLET,text:"●",alignment:ii.LEFT,style:{paragraph:{indent:{left:2880,hanging:As(.25)}}}},{level:4,format:Bi.BULLET,text:"○",alignment:ii.LEFT,style:{paragraph:{indent:{left:3600,hanging:As(.25)}}}},{level:5,format:Bi.BULLET,text:"■",alignment:ii.LEFT,style:{paragraph:{indent:{left:4320,hanging:As(.25)}}}},{level:6,format:Bi.BULLET,text:"●",alignment:ii.LEFT,style:{paragraph:{indent:{left:5040,hanging:As(.25)}}}},{level:7,format:Bi.BULLET,text:"●",alignment:ii.LEFT,style:{paragraph:{indent:{left:5760,hanging:As(.25)}}}},{level:8,format:Bi.BULLET,text:"●",alignment:ii.LEFT,style:{paragraph:{indent:{left:6480,hanging:As(.25)}}}}]);this.concreteNumberingMap.set("default-bullet-numbering",new eA({numId:1,abstractNumId:r.id,reference:"default-bullet-numbering",instance:0,overrideLevels:[{num:0,start:1}]})),this.abstractNumberingMap.set("default-bullet-numbering",r);for(const n of e.config)this.abstractNumberingMap.set(n.reference,new Q6(this.abstractNumUniqueNumericId(),n.levels)),this.referenceConfigMap.set(n.reference,n.levels)}prepForXml(e){for(const r of this.abstractNumberingMap.values())this.root.push(r);for(const r of this.concreteNumberingMap.values())this.root.push(r);return super.prepForXml(e)}createConcreteNumberingInstance(e,r){const n=this.abstractNumberingMap.get(e);if(!n)return;const s=`${e}-${r}`;if(this.concreteNumberingMap.has(s))return;const i=this.referenceConfigMap.get(e),a=i&&i[0].start,l={numId:this.concreteNumUniqueNumericId(),abstractNumId:n.id,reference:e,instance:r,overrideLevels:[a&&Number.isInteger(a)?{num:0,start:a}:{num:0,start:1}]};this.concreteNumberingMap.set(s,new eA(l))}get ConcreteNumbering(){return Array.from(this.concreteNumberingMap.values())}get ReferenceConfig(){return Array.from(this.referenceConfigMap.values())}}class Zge extends Ke{constructor(){super(...arguments),be(this,"xmlKeys",{version:"w:val",n
945ame:"w:name",uri:"w:uri"})}}class Yge extends ve{constructor(e){super("w:compatSetting"),this.root.push(new Zge({version:e,uri:"http://schemas.microsoft.com/office/word",name:"compatibilityMode"}))}}class Jge extends ve{constructor(e){super("w:compat"),e.version&&this.root.push(new Yge(e.version)),e.useSingleBorderforContiguousCells&&this.root.push(new je("w:useSingleBorderforContiguousCells",e.useSingleBorderforContiguousCells)),e.wordPerfectJustification&&this.root.push(new je("w:wpJustification",e.wordPerfectJustification)),e.noTabStopForHangingIndent&&this.root.push(new je("w:noTabHangInd",e.noTabStopForHangingIndent)),e.noLeading&&this.root.push(new je("w:noLeading",e.noLeading)),e.spaceForUnderline&&this.root.push(new je("w:spaceForUL",e.spaceForUnderline)),e.noColumnBalance&&this.root.push(new je("w:noColumnBalance",e.noColumnBalance)),e.balanceSingleByteDoubleByteWidth&&this.root.push(new je("w:balanceSingleByteDoubleByteWidth",e.balanceSingleByteDoubleByteWidth)),e.noExtraLineSpacing&&this.root.push(new je("w:noExtraLineSpacing",e.noExtraLineSpacing)),e.doNotLeaveBackslashAlone&&this.root.push(new je("w:doNotLeaveBackslashAlone",e.doNotLeaveBackslashAlone)),e.underlineTrailingSpaces&&this.root.push(new je("w:ulTrailSpace",e.underlineTrailingSpaces)),e.doNotExpandShiftReturn&&this.root.push(new je("w:doNotExpandShiftReturn",e.doNotExpandShiftReturn)),e.spacingInWholePoints&&this.root.push(new je("w:spacingInWholePoints",e.spacingInWholePoints)),e.lineWrapLikeWord6&&this.root.push(new je("w:lineWrapLikeWord6",e.lineWrapLikeWord6)),e.printBodyTextBeforeHeader&&this.root.push(new je("w:printBodyTextBeforeHeader",e.printBodyTextBeforeHeader)),e.printColorsBlack&&this.root.push(new je("w:printColBlack",e.printColorsBlack)),e.spaceWidth&&this.root.push(new je("w:wpSpaceWidth",e.spaceWidth)),e.showBreaksInFrames&&this.root.push(new je("w:showBreaksInFrames",e.showBreaksInFrames)),e.subFontBySize&&this.root.push(new je("w:subFontBySize",e.subFontBySize)),e.suppressBottomSpacing&&this.root.push(new je("w:suppressBottomSpacing",e.suppressBottomSpacing)),e.suppressTopSpacing&&this.root.push(new je("w:suppressTopSpacing",e.suppressTopSpacing)),e.suppressSpacingAtTopOfPage&&this.root.push(new je("w:suppressSpacingAtTopOfPage",e.suppressSpacingAtTopOfPage)),e.suppressTopSpacingWP&&this.root.push(new je("w:suppressTopSpacingWP",e.suppressTopSpacingWP)),e.suppressSpBfAfterPgBrk&&this.root.push(new je("w:suppressSpBfAfterPgBrk",e.suppressSpBfAfterPgBrk)),e.swapBordersFacingPages&&this.root.push(new je("w:swapBordersFacingPages",e.swapBordersFacingPages)),e.convertMailMergeEsc&&this.root.push(new je("w:convMailMergeEsc",e.convertMailMergeEsc)),e.truncateFontHeightsLikeWP6&&this.root.push(new je("w:truncateFontHeightsLikeWP6",e.truncateFontHeightsLikeWP6)),e.macWordSmallCaps&&this.root.push(new je("w:mwSmallCaps",e.macWordSmallCaps)),e.usePrinterMetrics&&this.root.push(new je("w:usePrinterMetrics",e.usePrinterMetrics)),e.doNotSuppressParagraphBorders&&this.root.push(new je("w:doNotSuppressParagraphBorders",e.doNotSuppressParagraphBorders)),e.wrapTrailSpaces&&this.root.push(new je("w:wrapTrailSpaces",e.wrapTrailSpaces)),e.footnoteLayoutLikeWW8&&this.root.push(new je("w:footnoteLayoutLikeWW8",e.footnoteLayoutLikeWW8)),e.shapeLayoutLikeWW8&&this.root.push(new je("w:shapeLayoutLikeWW8",e.shapeLayoutLikeWW8)),e.alignTablesRowByRow&&this.root.push(new je("w:alignTablesRowByRow",e.alignTablesRowByRow)),e.forgetLastTabAlignment&&this.root.push(new je("w:forgetLastTabAlignment",e.forgetLastTabAlignment)),e.adjustLineHeightInTable&&this.root.push(new je("w:adjustLineHeightInTable",e.adjustLineHeightInTable)),e.autoSpaceLikeWord95&&this.root.push(new je("w:autoSpaceLikeWord95",e.autoSpaceLikeWord95)),e.noSpaceRaiseLower&&this.root.push(new je("w:noSpaceRaiseLower",e.noSpaceRaiseLower)),e.doNotUseHTMLParagraphAutoSpacing&&this.root.push(new je("w:doNotUseHTMLParagraphAutoSpacing",e.doNotUseHTMLParagraphAutoSpacing)),e.layoutRawTableWidth&&this.root.push(new je("w:layoutRawTableWidth",e.layoutRawTableWidth)),e.layoutTableRowsApart&&this.root.push(new je("w:layoutTableRowsApart",e.layoutTableRowsApart)),e.useWord97LineBreakRules&&this.root.push(new je("w:useWord97LineBreakRules",e.useWord97LineBreakRules)),e.doNotBreakWrappedTables&&this.root.push(new je("w:doNotBreakWrappedTables",e.doNotBreakWrappedTables)),e.doNotSnapToGri
945dInCell&&this.root.push(new je("w:doNotSnapToGridInCell",e.doNotSnapToGridInCell)),e.selectFieldWithFirstOrLastCharacter&&this.root.push(new je("w:selectFldWithFirstOrLastChar",e.selectFieldWithFirstOrLastCharacter)),e.applyBreakingRules&&this.root.push(new je("w:applyBreakingRules",e.applyBreakingRules)),e.doNotWrapTextWithPunctuation&&this.root.push(new je("w:doNotWrapTextWithPunct",e.doNotWrapTextWithPunctuation)),e.doNotUseEastAsianBreakRules&&this.root.push(new je("w:doNotUseEastAsianBreakRules",e.doNotUseEastAsianBreakRules)),e.useWord2002TableStyleRules&&this.root.push(new je("w:useWord2002TableStyleRules",e.useWord2002TableStyleRules)),e.growAutofit&&this.root.push(new je("w:growAutofit",e.growAutofit)),e.useFELayout&&this.root.push(new je("w:useFELayout",e.useFELayout)),e.useNormalStyleForList&&this.root.push(new je("w:useNormalStyleForList",e.useNormalStyleForList)),e.doNotUseIndentAsNumberingTabStop&&this.root.push(new je("w:doNotUseIndentAsNumberingTabStop",e.doNotUseIndentAsNumberingTabStop)),e.useAlternateEastAsianLineBreakRules&&this.root.push(new je("w:useAltKinsokuLineBreakRules",e.useAlternateEastAsianLineBreakRules)),e.allowSpaceOfSameStyleInTable&&this.root.push(new je("w:allowSpaceOfSameStyleInTable",e.allowSpaceOfSameStyleInTable)),e.doNotSuppressIndentation&&this.root.push(new je("w:doNotSuppressIndentation",e.doNotSuppressIndentation)),e.doNotAutofitConstrainedTables&&this.root.push(new je("w:doNotAutofitConstrainedTables",e.doNotAutofitConstrainedTables)),e.autofitToFirstFixedWidthCell&&this.root.push(new je("w:autofitToFirstFixedWidthCell",e.autofitToFirstFixedWidthCell)),e.underlineTabInNumberingList&&this.root.push(new je("w:underlineTabInNumList",e.underlineTabInNumberingList)),e.displayHangulFixedWidth&&this.root.push(new je("w:displayHangulFixedWidth",e.displayHangulFixedWidth)),e.splitPgBreakAndParaMark&&this.root.push(new je("w:splitPgBreakAndParaMark",e.splitPgBreakAndParaMark)),e.doNotVerticallyAlignCellWithSp&&this.root.push(new je("w:doNotVertAlignCellWithSp",e.doNotVerticallyAlignCellWithSp)),e.doNotBreakConstrainedForcedTable&&this.root.push(new je("w:doNotBreakConstrainedForcedTable",e.doNotBreakConstrainedForcedTable)),e.ignoreVerticalAlignmentInTextboxes&&this.root.push(new je("w:doNotVertAlignInTxbx",e.ignoreVerticalAlignmentInTextboxes)),e.useAnsiKerningPairs&&this.root.push(new je("w:useAnsiKerningPairs",e.useAnsiKerningPairs)),e.cachedColumnBalance&&this.root.push(new je("w:cachedColBalance",e.cachedColumnBalance))}}class Xge extends Ke{constructor(){super(...arguments),be(this,"xmlKeys",{wpc:"xmlns:wpc",mc:"xmlns:mc",o:"xmlns:o",r:"xmlns:r",m:"xmlns:m",v:"xmlns:v",wp14:"xmlns:wp14",wp:"xmlns:wp",w10:"xmlns:w10",w:"xmlns:w",w14:"xmlns:w14",w15:"xmlns:w15",wpg:"xmlns:wpg",wpi:"xmlns:wpi",wne:"xmlns:wne",wps:"xmlns:wps",Ignorable:"mc:Ignorable"})}}class Qge extends ve{constructor(e){var r,n,s,i,a,l,c,u;super("w:settings"),this.root.push(new Xge({wpc:"http://schemas.microsoft.com/office/word/2010/wordprocessingCanvas",mc:"http://schemas.openxmlformats.org/markup-compatibility/2006",o:"urn:schemas-microsoft-com:office:office",r:"http://schemas.openxmlformats.org/officeDocument/2006/relationships",m:"http://schemas.openxmlformats.org/officeDocument/2006/math",v:"urn:schemas-microsoft-com:vml",wp14:"http://schemas.microsoft.com/office/word/2010/wordprocessingDrawing",wp:"http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing",w10:"urn:schemas-microsoft-com:office:word",w:"http://schemas.openxmlformats.org/wordprocessingml/2006/main",w14:"http://schemas.microsoft.com/office/word/2010/wordml",w15:"http://schemas.microsoft.com/office/word/2012/wordml",wpg:"http://schemas.microsoft.com/office/word/2010/wordprocessingGroup",wpi:"http://schemas.microsoft.com/office/word/2010/wordprocessingInk",wne:"http://schemas.microsoft.com/office/word/2006/wordml",wps:"http://schemas.microsoft.com/office/word/2010/wordprocessingShape",Ignorable:"w14 w15 wp14"})),this.root.push(new je("w:displayBackgroundShape",!0)),e.trackRevisions!==void 0&&this.root.push(new je("w:trackRevisions",e.trackRevisions)),e.evenAndOddHeaders!==void 0&&this.root.push(new je("w:evenAndOddHeaders",e.evenAndOddHeaders)),e.updateFields!==void 0&&this.root.push(new je("w:updateFields",e.updateFields)),e.defaultTabStop!==void 0&&this.root.push(new Qh("w:defaultTabStop",e.defaultTabStop)),((r=e.hyphenation)==null?void 0:r.autoHyphenation)!==void 0&&this.root.push(new je("w:autoHyphenation",e.hyphenation.autoHyphenation)),((n=e.hyphenation)==null?void 0:n.hyphenationZone)!==void 0&&this.root.push(new Qh("w:hyphenationZone",e.hyphenation.hyphenationZone)),((s=e.hyphenation)==null?void 0:s.consecutiveHyphenLimit)!==void 0&&this.root.push(new Qh("w:consecutiveHyphenLimit",e.hyphenation.consecutiveHyphenLimit)),((i=e.hyphenation)==null?void 0:i.doNotHyphenate
945Caps)!==void 0&&this.root.push(new je("w:doNotHyphenateCaps",e.hyphenation.doNotHyphenateCaps)),this.root.push(new Jge(cd(ot({},(a=e.compatibility)!=null?a:{}),{version:(u=(c=(l=e.compatibility)==null?void 0:l.version)!=null?c:e.compatibilityModeVersion)!=null?u:15})))}}class hD extends Ke{constructor(){super(...arguments),be(this,"xmlKeys",{val:"w:val"})}}class eye extends ve{constructor(e){super("w:name"),this.root.push(new hD({val:e}))}}class tye extends ve{constructor(e){super("w:uiPriority"),this.root.push(new hD({val:$n(e)}))}}class rye extends Ke{constructor(){super(...arguments),be(this,"xmlKeys",{type:"w:type",styleId:"w:styleId",default:"w:default",customStyle:"w:customStyle"})}}class pD extends ve{constructor(e,r){super("w:style"),this.root.push(new rye(e)),r.name&&this.root.push(new eye(r.name)),r.basedOn&&this.root.push(new Eu("w:basedOn",r.basedOn)),r.next&&this.root.push(new Eu("w:next",r.next)),r.link&&this.root.push(new Eu("w:link",r.link)),r.uiPriority!==void 0&&this.root.push(new tye(r.uiPriority)),r.semiHidden!==void 0&&this.root.push(new je("w:semiHidden",r.semiHidden)),r.unhideWhenUsed!==void 0&&this.root.push(new je("w:unhideWhenUsed",r.unhideWhenUsed)),r.quickFormat!==void 0&&this.root.push(new je("w:qFormat",r.quickFormat))}}class mx extends pD{constructor(e){super({type:"paragraph",styleId:e.id},e),be(this,"paragraphProperties"),be(this,"runProperties"),this.paragraphProperties=new fd(e.paragraph),this.runProperties=new Ec(e.run),this.root.push(this.paragraphProperties),this.root.push(this.runProperties)}}class gx extends pD{constructor(e){super({type:"character",styleId:e.id},ot({uiPriority:99,unhideWhenUsed:!0},e)),be(this,"runProperties"),this.runProperties=new Ec(e.run),this.root.push(this.runProperties)}}class rl extends mx{constructor(e){super(ot({basedOn:"Normal",next:"Normal",quickFormat:!0},e))}}class nye extends rl{constructor(e){super(ot({id:"Title",name:"Title"},e))}}class sye extends rl{constructor(e){super(ot({id:"Heading1",name:"Heading 1"},e))}}class iye extends rl{constructor(e){super(ot({id:"Heading2",name:"Heading 2"},e))}}class aye extends rl{constructor(e){super(ot({id:"Heading3",name:"Heading 3"},e))}}class oye extends rl{constructor(e){super(ot({id:"Heading4",name:"Heading 4"},e))}}class lye extends rl{constructor(e){super(ot({id:"Heading5",name:"Heading 5"},e))}}class cye extends rl{constructor(e){super(ot({id:"Heading6",name:"Heading 6"},e))}}class uye extends rl{constructor(e){super(ot({id:"Strong",name:"Strong"},e))}}class dye extends mx{constructor(e){super(ot({id:"ListParagraph",name:"List Paragraph",basedOn:"Normal",quickFormat:!0},e))}}class hye extends mx{constructor(e){super(ot({id:"FootnoteText",name:"footnote text",link:"FootnoteTextChar",basedOn:"Normal",uiPriority:99,semiHidden:!0,unhideWhenUsed:!0,paragraph:{spacing:{after:0,line:240,lineRule:k2.AUTO}},run:{size:20}},e))}}class pye extends gx{constructor(e){super(ot({id:"FootnoteReference",name:"footnote reference",basedOn:"DefaultParagraphFont",semiHidden:!0,run:{superScript:!0}},e))}}class fye extends gx{constructor(e){super(ot({id:"FootnoteTextChar",name:"Footnote Text Char",basedOn:"DefaultParagraphFont",link:"FootnoteText",semiHidden:!0,run:{size:20}},e))}}class mye extends gx{constructor(e){super(ot({id:"Hyperlink",name:"Hyperlink",basedOn:"DefaultParagraphFont",run:{color:"0563C1",underline:{type:oD.SINGLE}}},e))}}class j2 extends ve{constructor(e){if(super("w:styles"),e.initialStyles&&this.root.push(e.initialStyles),e.importedStyles)for(const r of e.importedStyles)this.root.push(r);if(e.paragraphStyles)for(const r of e.paragraphStyles)this.root.push(new mx(r));if(e.characterStyles)for(const r of e.characterStyles)this.root.push(new gx(r))}}class gye extends ve{constructor(e){super("w:pPrDefault"),this.root.push(new fd(e))}}class yye extends ve{constructor(e){super("w:rPrDefault"),this.root.push(new Ec(e))}}class xye extends ve{constructor(e){super("w:docDefaults"),be(this,"runPropertiesDefaults"),be(this,"paragraphPropertiesDefaults"),this.runPropertiesDefaults=new yye(e.run),this.paragraphPropertiesDefaults=new gye(e.paragraph),this.root.push(this.runPropertiesDefaults),this.root.push(this.paragraphPropertiesDefaults)}}class wye{newInstance(e){const r=eD.xml2js(e,{compact:!1});let n;for(const a of r.elements||[])a.name==="w:styles"&&(n=a);if(n===void 0)throw new Error("can not find styles element");const s=n.elements||[];return new j2({initialStyles:new ume(n.attributes),importedStyles:s.map(a=>IN(a))})}}class tA{newInstance(e={}){var r;return{initialStyles:new fx(["mc","r","w","w14","w15"],"w14 w15"),importedStyles:[new xye((r=e.document)!=null?r:{}),new nye(ot({run:{size:56}}
945,e.title)),new sye(ot({run:{color:"2E74B5",size:32}},e.heading1)),new iye(ot({run:{color:"2E74B5",size:26}},e.heading2)),new aye(ot({run:{color:"1F4D78",size:24}},e.heading3)),new oye(ot({run:{color:"2E74B5",italics:!0}},e.heading4)),new lye(ot({run:{color:"2E74B5"}},e.heading5)),new cye(ot({run:{color:"1F4D78"}},e.heading6)),new uye(ot({run:{bold:!0}},e.strong)),new dye(e.listParagraph||{}),new mye(e.hyperlink||{}),new pye(e.footnoteReference||{}),new hye(e.footnoteText||{}),new fye(e.footnoteTextChar||{})]}}}class bye{constructor(e){be(this,"currentRelationshipId",1),be(this,"documentWrapper"),be(this,"headers",[]),be(this,"footers",[]),be(this,"coreProperties"),be(this,"numbering"),be(this,"media"),be(this,"fileRelationships"),be(this,"footnotesWrapper"),be(this,"settings"),be(this,"contentTypes"),be(this,"customProperties"),be(this,"appProperties"),be(this,"styles"),be(this,"comments"),be(this,"fontWrapper");var r,n,s,i,a,l,c,u,d,h,p,f;if(this.coreProperties=new sge(cd(ot({},e),{creator:(r=e.creator)!=null?r:"Un-named",revision:(n=e.revision)!=null?n:1,lastModifiedBy:(s=e.lastModifiedBy)!=null?s:"Un-named"})),this.numbering=new Gge(e.numbering?e.numbering:{config:[]}),this.comments=new l0e((i=e.comments)!=null?i:{children:[]}),this.fileRelationships=new Tc,this.customProperties=new uge((a=e.customProperties)!=null?a:[]),this.appProperties=new Q0e,this.footnotesWrapper=new Ege,this.contentTypes=new nge,this.documentWrapper=new dD({background:e.background}),this.settings=new Qge({compatibilityModeVersion:e.compatabilityModeVersion,compatibility:e.compatibility,evenAndOddHeaders:!!e.evenAndOddHeaderAndFooters,trackRevisions:(l=e.features)==null?void 0:l.trackRevisions,updateFields:(c=e.features)==null?void 0:c.updateFields,defaultTabStop:e.defaultTabStop,hyphenation:{autoHyphenation:(u=e.hyphenation)==null?void 0:u.autoHyphenation,hyphenationZone:(d=e.hyphenation)==null?void 0:d.hyphenationZone,consecutiveHyphenLimit:(h=e.hyphenation)==null?void 0:h.consecutiveHyphenLimit,doNotHyphenateCaps:(p=e.hyphenation)==null?void 0:p.doNotHyphenateCaps}}),this.media=new Pge,e.externalStyles!==void 0){const m=new wye;this.styles=m.newInstance(e.externalStyles)}else if(e.styles){const y=new tA().newInstance(e.styles.default);this.styles=new j2(ot(ot({},y),e.styles))}else{const m=new tA;this.styles=new j2(m.newInstance())}this.addDefaultRelationships();for(const m of e.sections)this.addSection(m);if(e.footnotes)for(const m in e.footnotes)this.footnotesWrapper.View.createFootNote(parseFloat(m),e.footnotes[m].children);this.fontWrapper=new fge((f=e.fonts)!=null?f:[])}addSection({headers:e={},footers:r={},children:n,properties:s}){this.documentWrapper.View.Body.addSection(cd(ot({},s),{headerWrapperGroup:{default:e.default?this.createHeader(e.default):void 0,first:e.first?this.createHeader(e.first):void 0,even:e.even?this.createHeader(e.even):void 0},footerWrapperGroup:{default:r.default?this.createFooter(r.default):void 0,first:r.first?this.createFooter(r.first):void 0,even:r.even?this.createFooter(r.even):void 0}}));for(const i of n)this.documentWrapper.View.add(i)}createHeader(e){const r=new zge(this.media,this.currentRelationshipId++);for(const n of e.options.children)r.add(n);return this.addHeaderToDocument(r),r}createFooter(e){const r=new yge(this.media,this.currentRelationshipId++);for(const n of e.options.children)r.add(n);return this.addFooterToDocument(r),r}addHeaderToDocument(e,r=Tu.DEFAULT){this.headers.push({header:e,type:r}),this.documentWrapper.Relationships.createRelationship(e.View.ReferenceId,"http://schemas.openxmlformats.org/officeDocument/2006/relationships/header",`header${this.headers.length}.xml`),this.contentTypes.addHeader(this.headers.length)}addFooterToDocument(e,r=Tu.DEFAULT){this.footers.push({footer:e,type:r}),this.documentWrapper.Relationships.createRelationship(e.View.ReferenceId,"http://schemas.openxmlformats.org/officeDocument/2006/relationships/footer",`footer${this.footers.length}.xml`),this.contentTypes.addFooter(this.footers.length)}addDefaultRelationships(){this.fileRelationships.createRelationship(1,"http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument","word/document.xml"),this.fileRelationships.createRelationship(2,"http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties","docProps/core.xml"),this.fileRelationships.createRelationship(3,"http://schemas.openxmlformats.org/officeDocument/2006/relationships/extended-properties","docProps/app.xml"),this.fileRelationships.createRelationship(4,"http://schemas.openxmlformats.org/officeDocument/2006/relationships/custom-properties","docProps/custom.xml"),this.documentWrapper.Relationships.createRelationship(this.currentRelationshipId++,"http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles","styles.xml"),this.documentWrapper.Relationships.createRelationship(this.currentRelationshipId++,"http://schemas.openxmlformats.org/officeDocument/2006/relationships/numbering","numbering.xml"),this.documentWrapper.Relationships.createRelationship(this.currentRelationshipId++,"http://schemas.openxmlformats.org/officeDocument/2006/relationships/footnotes","footnotes.xml"),this.documentWrapper.Relationships.createRelationship(this.currentRelationshipId++,"http://schemas.openxmlformats.org/officeDocument/2006/relationships/settings","settings.xml"),this.documentWrapper.Relationships.createRelationship(this.currentRelationshipId++,"http://schemas.openxmlformats.org/officeDocument/2006/relationships/comments","comments.xml")}get Document(){return this.documentWrapper}get Styles(){return this.styles}get CoreProperties(){return this.coreProperties}get Numbering(){return this.numbering}get Media(){return this.media}get FileRelationships(){return this.fileRelationships}get Headers(){return this.headers.map(e=>e.header)}get Footers(){return this.footers.map(e=>e.footer)}get ContentTypes(){return this.contentTypes}get CustomProperties(){return this.customProperties}get AppProperties(){return this.appProperties}get FootNotes(){return this.footnotesWrapper}get Settings(){return this.settings}get Comments(){return this.comments}get FontTable(){return this.fontWrapper}}var kye=zN();function _m(t){throw new Error('Could not dynamically require "'+t+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var D1={exports:{}},rA;function vye(){return rA||(rA=1,function(t,e){(function(r){t.exports=r()})(function(){return function r(n,s,i){function a(u,d){if(!s[u]){if(!n[u]){var h=typeof _m=="function"&&_m;if(!d&&h)return h(u,!0);if(l)return l(u,!0);var p=new Error("Cannot find module '"+u+"'");throw p.code="MODULE_NOT_FOUND",p}var f=s[u]={exports:{}};n[u][0].call(f.exports,function(m){var y=n[u][1][m];return a(y||m)},f,f.exports,r,n,s,i)}return s[u].exports}for(var l=typeof _m=="function"&&_m,c=0;c<i.length;c++)a(i[c]);return a}({1:[function(r,n,s){var i=r("./utils"),a=r("./support"),l="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789
vendor: 10,595 bytes, lines 945-946
945+/=";s.encode=function(c){for(var u,d,h,p,f,m,y,k=[],g=0,x=c.length,w=x,b=i.getTypeOf(c)!=="string";g<c.length;)w=x-g,h=b?(u=c[g++],d=g<x?c[g++]:0,g<x?c[g++]:0):(u=c.charCodeAt(g++),d=g<x?c.charCodeAt(g++):0,g<x?c.charCodeAt(g++):0),p=u>>2,f=(3&u)<<4|d>>4,m=1<w?(15&d)<<2|h>>6:64,y=2<w?63&h:64,k.push(l.charAt(p)+l.charAt(f)+l.charAt(m)+l.charAt(y));return k.join("")},s.decode=function(c){var u,d,h,p,f,m,y=0,k=0,g="data:";if(c.substr(0,g.length)===g)throw new Error("Invalid base64 input, it looks like a data url.");var x,w=3*(c=c.replace(/[^A-Za-z0-9+/=]/g,"")).length/4;if(c.charAt(c.length-1)===l.charAt(64)&&w--,c.charAt(c.length-2)===l.charAt(64)&&w--,w%1!=0)throw new Error("Invalid base64 input, bad content length.");for(x=a.uint8array?new Uint8Array(0|w):new Array(0|w);y<c.length;)u=l.indexOf(c.charAt(y++))<<2|(p=l.indexOf(c.charAt(y++)))>>4,d=(15&p)<<4|(f=l.indexOf(c.charAt(y++)))>>2,h=(3&f)<<6|(m=l.indexOf(c.charAt(y++))),x[k++]=u,f!==64&&(x[k++]=d),m!==64&&(x[k++]=h);return x}},{"./support":30,"./utils":32}],2:[function(r,n,s){var i=r("./external"),a=r("./stream/DataWorker"),l=r("./stream/Crc32Probe"),c=r("./stream/DataLengthProbe");function u(d,h,p,f,m){this.compressedSize=d,this.uncompressedSize=h,this.crc32=p,this.compression=f,this.compressedContent=m}u.prototype={getContentWorker:function(){var d=new a(i.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new c("data_length")),h=this;return d.on("end",function(){if(this.streamInfo.data_length!==h.uncompressedSize)throw new Error("Bug : uncompressed data size mismatch")}),d},getCompressedWorker:function(){return new a(i.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize",this.compressedSize).withStreamInfo("uncompressedSize",this.uncompressedSize).withStreamInfo("crc32",this.crc32).withStreamInfo("compression",this.compression)}},u.createWorkerFrom=function(d,h,p){return d.pipe(new l).pipe(new c("uncompressedSize")).pipe(h.compressWorker(p)).pipe(new c("compressedSize")).withStreamInfo("compression",h)},n.exports=u},{"./external":6,"./stream/Crc32Probe":25,"./stream/DataLengthProbe":26,"./stream/DataWorker":27}],3:[function(r,n,s){var i=r("./stream/GenericWorker");s.STORE={magic:"\0\0",compressWorker:function(){return new i("STORE compression")},uncompressWorker:function(){return new i("STORE decompression")}},s.DEFLATE=r("./flate")},{"./flate":7,"./stream/GenericWorker":28}],4:[function(r,n,s){var i=r("./utils"),a=function(){for(var l,c=[],u=0;u<256;u++){l=u;for(var d=0;d<8;d++)l=1&l?3988292384^l>>>1:l>>>1;c[u]=l}return c}();n.exports=function(l,c){return l!==void 0&&l.length?i.getTypeOf(l)!=="string"?function(u,d,h,p){var f=a,m=p+h;u^=-1;for(var y=p;y<m;y++)u=u>>>8^f[255&(u^d[y])];return-1^u}(0|c,l,l.length,0):function(u,d,h,p){var f=a,m=p+h;u^=-1;for(var y=p;y<m;y++)u=u>>>8^f[255&(u^d.charCodeAt(y))];return-1^u}(0|c,l,l.length,0):0}},{"./utils":32}],5:[function(r,n,s){s.base64=!1,s.binary=!1,s.dir=!1,s.createFolders=!0,s.date=null,s.compression=null,s.compressionOptions=null,s.comment=null,s.unixPermissions=null,s.dosPermissions=null},{}],6:[function(r,n,s){var i=null;i=typeof Promise<"u"?Promise:r("lie"),n.exports={Promise:i}},{lie:37}],7:[function(r,n,s){var i=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Uint32Array<"u",a=r("pako"),l=r("./utils"),c=r("./stream/GenericWorker"),u=i?"uint8array":"array";function d(h,p){c.call(this,"FlateWorker/"+h),this._pako=null,this._pakoAction=h,this._pakoOptions=p,this.meta={}}s.magic="\b\0",l.inherits(d,c),d.prototype.processChunk=function(h){this.meta=h.meta,this._pako===null&&this._createPako(),this._pako.push(l.transformTo(u,h.data),!1)},d.prototype.flush=function(){c.prototype.flush.call(this),this._pako===null&&this._createPako(),this._pako.push([],!0)},d.prototype.cleanUp=function(){c.prototype.cleanUp.call(this),this._pako=null},d.prototype._createPako=function(){this._pako=new a[this._pakoAction]({raw:!0,level:this._pakoOptions.level||-1});var h=this;this._pako.onData=function(p){h.push({data:p,meta:h.meta})}},s.compressWorker=function(h){return new d("Deflate",h)},s.uncompressWorker=function(){return new d("Inflate",{})}},{"./stream/GenericWorker":28,"./utils":32,pako:38}],8:[function(r,n,s){function i(f,m){var y,k="";for(y=0;y<m;y++)k+=String.fromCharCode(255&f),f>>>=8;return k}function a(f,m,y,k,g,x){var w,b,v=f.file,A=f.compression,C=x!==u.utf8encode,_=l.transformTo("string",x(v.name)),N=l.transformTo("string",u.utf8encode(v.name)),W=v.comment,K=l.transformTo("string",x(W)),T=l.transformTo("string",u.utf8encode(W)),F=N.length!==v.name.length,E=T.length!==W.length,H="",Y="",$="",D=v.dir,J=v.date,de={crc32:0,compressedSize:0,uncompressedSize:0};m&&!y||(de.crc32=f.crc32,de.compressedSize=f.compressedSize,de.uncompressedSize=f.uncompressedSize);var G=0;m&&(G|=8),C||!F&&!E||(G|=2048);var B=0,re=0;D&&(B|=16),g==="UNIX"?(re=798,B|=function(ge,ne){var O=ge;return ge||(O=ne?16893:33204),(65535&O)<<16}(v.unixPermissions,D)):(re=20,B|=function(ge){return 63&(ge||0)}(v.dosPermissions)),w=J.getUTCHours(),w<<=6,w|=J.getUTCMinutes(),w<<=5,w|=J.getUTCSeconds()/2,b=J.getUTCFullYear()-1980,b<<=4,b|=J.getUTCMonth()+1,b<<=5,b|=J.getUTCDate(),F&&(Y=i(1,1)+i(d(_),4)+N,H+="up"+i(Y.length,2)+Y),E&&($=i(1,1)+i(d(K),4)+T,H+="uc"+i($.length,2)+$);var ae="";return ae+=`
946\0`,ae+=i(G,2),ae+=A.magic,ae+=i(w,2),ae+=i(b,2),ae+=i(de.crc32,4),ae+=i(de.compressedSize,4),ae+=i(de.uncompressedSize,4),ae+=i(_.length,2),ae+=i(H.length,2),{fileRecord:h.LOCAL_FILE_HEADER+ae+_+H,dirRecord:h.CENTRAL_FILE_HEADER+i(re,2)+ae+i(K.length,2)+"\0\0\0\0"+i(B,4)+i(k,4)+_+H+K}}var l=r("../utils"),c=r("../stream/GenericWorker"),u=r("../utf8"),d=r("../crc32"),h=r("../signature");function p(f,m,y,k){c.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=m,this.zipPlatform=y,this.encodeFileName=k,this.streamFiles=f,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}l.inherits(p,c),p.prototype.push=function(f){var m=f.meta.percent||0,y=this.entriesCount,k=this._sources.length;this.accumulate?this.contentBuffer.push(f):(this.bytesWritten+=f.data.length,c.prototype.push.call(this,{data:f.data,meta:{currentFile:this.currentFile,percent:y?(m+100*(y-k-1))/y:100}}))},p.prototype.openedSource=function(f){this.currentSourceOffset=this.bytesWritten,this.currentFile=f.file.name;var m=this.streamFiles&&!f.file.dir;if(m){var y=a(f,m,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:y.fileRecord,meta:{percent:0}})}else this.accumulate=!0},p.prototype.closedSource=function(f){this.accumulate=!1;var m=this.streamFiles&&!f.file.dir,y=a(f,m,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(y.dirRecord),m)this.push({data:function(k){return h.DATA_DESCRIPTOR+i(k.crc32,4)+i(k.compressedSize,4)+i(k.uncompressedSize,4)}(f),meta:{percent:100}});else for(this.push({data:y.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},p.prototype.flush=function(){for(var f=this.bytesWritten,m=0;m<this.dirRecords.length;m++)this.push({data:this.dirRecords[m],meta:{percent:100}});var y=this.bytesWritten-f,k=function(g,x,w,b,v){var A=l.transformTo("string",v(b));return h.CENTRAL_DIRECTORY_END+"\0\0\0\0"+i(g,2)+i(g,2)+i(x,4)+i(w,4)+i(A.length,2)+A}(this.dirRecords.length,y,f,this.zipComment,this.encodeFileName);this.push({data:k,meta:{percent:100}})},p.prototype.prepareNextSource=function(){this.previous=this._sources.shift(),this.openedSource(this.previous.streamInfo),this.isPaused?this.previous.pause():this.previous.resume()},p.prototype.registerPrevious=function(f){this._sources.push(f);var m=this;return f.on("data",function(y){m.processChunk(y)}),f.on("end",function(){m.closedSource(m.previous.streamInfo),m._sources.length?m.prepareNextSource():m.end()}),f.on("error",function(y){m.error(y)}),this},p.prototype.resume=function(){return!!c.prototype.resume.call(this)&&(!this.previous&&this._sources.length?(this.prepareNextSource(),!0):this.previous||this._sources.length||this.generatedError?void 0:(this.end(),!0))},p.prototype.error=function(f){var m=this._sources;if(!c.prototype.error.call(this,f))return!1;for(var y=0;y<m.length;y++)try{m[y].error(f)}catch{}return!0},p.prototype.lock=function(){c.prototype.lock.call(this);for(var f=this._sources,m=0;m<f.length;m++)f[m].lock()},n.exports=p},{"../crc32":4,"../signature":23,"../stream/GenericWorker":28,"../utf8":31,"../utils":32}],9:[function(r,n,s){var i=r("../compressions"),a=r("./ZipFileWorker");s.generateWorker=function(l,c,u){var d=new a(c.streamFiles,u,c.platform,c.encodeFileName),h=0;try{l.forEach(function(p,f){h++;var m=function(x,w){var b=x||w,v=i[b];if(!v)throw new Error(b+" is not a valid compression method !");return v}(f.options.compression,c.compression),y=f.options.compressionOptions||c.compressionOptions||{},k=f.dir,g=f.date;f._compressWorker(m,y).withStreamInfo("file",{name:p,dir:k,date:g,comment:f.comment||"",unixPermissions:f.unixPermissions,dosPermissions:f.dosPermissions}).pipe(d)}),d.entriesCount=h}catch(p){d.error(p)}return d}},{"../compressions":3,"./ZipFileWorker":8}],10:[function(r,n,s){function i(){if(!(this instanceof i))return new i;if(arguments.length)throw new Error("The constructor with parameters has been removed in JSZip 3.0, please check the upgrade guide.");this.files=Object.create(null),this.comment=null,this.root="",this.clone=function(){var a=new i;for(var l in this)typeof this[l]!="function"&&(a[l]=this[l]);return a}}(i.prototype=r("./object")).loadAsync=r("./load"),i.support=r("./support"),i.defaults=r("./defaults"),i.version="3.10.1",i.loadAsync=function(a,l){return new i().loadAsync(a,l)},i.external=r("./external"),n.exports=i},{"./defaults":5,"./external":6,"./load":11,"./object":15,"./support":30}],11:[function(r,n,s){var i=r("./utils"),a=r("./external"),l=r("./utf8"),c=r("./zipEntries"),u=r("./stream/Crc32Probe"),d=r("./nodejsUtils");function h(p){return new a.Promise(function(f,m){var y=p.decompressed.getContentWorker().pipe(new u);y.on("error",function(k){m(k)}).on("end",function(){y.streamInfo.crc32!==p.decompressed.crc32?m(new Error("Corrupted zip : CRC32 mismatch")):f()}).resume()})}n.exports=function(p,f){var m=this;return f=i.extend(f||{},{base64:!1,checkCRC32:!1,optimizedBinaryString:!1,createFolders:!1,decodeFileName:l.utf8decode}),d.isNode&&d.isStream(p)?a.Promise.reject(new Error("JSZip can't accept a stream when loading a zip file.")):i.prepareContent("the loaded zip f
946ile",p,!0,f.optimizedBinaryString,f.base64).then(function(y){var k=new c(f);return k.load(y),k}).then(function(y){var k=[a.Promise.resolve(y)],g=y.files;if(f.checkCRC32)for(var x=0;x<g.length;x++)k.push(h(g[x]));return a.Promise.all(k)}).then(function(y){for(var k=y.shift(),g=k.files,x=0;x<g.length;x++){var w=g[x],b=w.fileNameStr,v=i.resolve(w.fileNameStr);m.file(v,w.decompressed,{binary:!0,optimizedBinaryString:!0,date:w.date,dir:w.dir,comment:w.fileCommentStr.length?w.fileCommentStr:null,unixPermissions:w.unixPermissions,dosPermissions:w.dosPermissions,createFolders:f.createFolders}),w.dir||(m.file(v).unsafeOriginalName=b)}return k.zipComment.length&&(m.comment=k.zipComment),m})}},{"./external":6,"./nodejsUtils":14,"./stream/Crc32Probe":25,"./utf8":31,"./utils":32,"./zipEntries":33}],12:[function(r,n,s){var i=r("../utils"),a=r("../stream/GenericWorker");function l(c,u){a.call(this,"Nodejs stream input adapter for "+c),this._upstreamEnded=!1,this._bindStream(u)}i.inherits(l,a),l.prototype._bindStream=function(c){var u=this;(this._stream=c).pause(),c.on("data",function(d){u.push({data:d,meta:{percent:0}})}).on("error",function(d){u.isPaused?this.generatedError=d:u.error(d)}).on("end",function(){u.isPaused?u._upstreamEnded=!0:u.end()})},l.prototype.pause=function(){return!!a.prototype.pause.call(this)&&(this._stream.pause(),!0)},l.prototype.resume=function(){return!!a.prototype.resume.call(this)&&(this._upstreamEnded?this.end():this._stream.resume(),!0)},n.exports=l},{"../stream/GenericWorker":28,"../utils":32}],13:[function(r,n,s){var i=r("readable-stream").Readable;function a(l,c,u){i.call(this,c),this._helper=l;var d=this;l.on("data",function(h,p){d.push(h)||d._helper.pause(),u&&u(p)}).on("error",function(h){d.emit("error",h)}).on("end",function(){d.push(null)})}r("../utils").inherits(a,i),a.prototype._read=function(){this._helper.resume()},n.exports=a},{"../utils":32,"readable-stream":16}],14:[function(r,n,s){n.exports={isNode:typeof Buffer<"u",newBufferFrom:function(i,a){if(Buffer.from&&Buffer.from!==Uint8Array.from)return Buffer.from(i,a);if(typeof i=="number")throw new Error('The "data" argument must not be a number');return new Buffer(i,a)},allocBuffer:function(i){if(Buffer.alloc)return Buffer.alloc(i);var a=new Buffer(i);return a.fill(0),a},isBuffer:function(i){return Buffer.isBuffer(i)},isStream:function(i){return i&&typeof i.on=="function"&&typeof i.pause=="function"&&typeof i.resume=="function"}}},{}],15:[function(r,n,s){function i(v,A,C){var _,N=l.getTypeOf(A),W=l.extend(C||{},d);W.date=W.date||new Date,W.compression!==null&&(W.compression=W.compression.toUpperCase()),typeof W.unixPermissions=="string"&&(W.unixPermissions=parseInt(W.unixPermissions,8)),W.unixPermissions&&16384&W.unixPermissions&&(W.dir=!0),W.dosPermissions&&16&W.dosPermissions&&(W.dir=!0),W.dir&&(v=g(v)),W.createFolders&&(_=k(v))&&x.call(this,_,!0);var K=N==="string"&&W.binary===!1&&W.base64===!1;C&&C.binary!==void 0||(W.binary=!K),(A instanceof h&&A.uncompressedSize===0||W.dir||!A||A.length===0)&&(W.base64=!1,W.binary=!0,A="",W.compression="STORE",N="string");var T=null;T=A instanceof h||A instanceof c?A:m.isNode&&m.isStream(A)?new y(v,A):l.prepareContent(v,A,W.binary,W.optimizedBinaryString,W.base64);var F=new p(v,T,W);this.files[v]=F}var a=r("./utf8"),l=r("./utils"),c=r("./stream/GenericWorker"),u=r("./stream/StreamHelper"),d=r("./defaults"),h=r("./compressedObject"),p=r("./zipObject"),f=r("./generate"),m=r("./nodejsUtils"),y=r("./nodejs/NodejsStreamInputAdapter"),k=function(v){v.slice(-1)==="/"&&(v=v.substring(0,v.length-1));var A=v.lastIndexOf("/");return 0<A?v.substring(0,A):""},g=function(v){return v.slice(-1)!=="/"&&(v+="/"),v},x=function(v,A){return A=A!==void 0?A:d.createFolders,v=g(v),this.files[v]||i.call(this,v,null,{dir:!0,createFolders:A}),this.files[v]};function w(v){return Object.prototype.toString.call(v)==="[object RegExp]"}var b={load:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},forEach:function(v){var A,C,_;for(A in this.files)_=this.files[A],(C=A.slice(this.root.length,A.length))&&A.slice(0,this.root.length)===this.root&&v(C,_)},filter:function(v){var A=[];return this.forEach(function(C,_){v(C,_)&&A.push(_)}),A},file:function(v,A,C){if(arguments.length!==1)return v=this.root+v,i.call(this,v,A,C),this;if(w(v)){var _=v;return this.filter(function(W,K){return!K.dir&&_.test(W)})}var N=this.files[this.root+v];return N&&!N.dir?N:null},folder:function(v){if(!v)return this;if(w(v))return this.filter(function(N,W){return W.dir&&v.test(N)});var A=this.root+v,C=x.call(this,A),_=this.clone();return _.root=C.name,_},remove:function(v){v=this.root+v;var A=this.files[v];if(A||(v.slice(-1)!=="/"&&(v+="/"),A=this.files[v]),A&&!A.dir)delete this.files[v];else for(var C=this.filter(function(N,W){return W.name.slice(0,v.length)===v}),_=0;_<C.length;_++)delete this.files[C[_].name];return this},generate:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")}
vendor: 33,885 bytes, line 946
946,generateInternalStream:function(v){var A,C={};try{if((C=l.extend(v||{},{streamFiles:!1,compression:"STORE",compressionOptions:null,type:"",platform:"DOS",comment:null,mimeType:"application/zip",encodeFileName:a.utf8encode})).type=C.type.toLowerCase(),C.compression=C.compression.toUpperCase(),C.type==="binarystring"&&(C.type="string"),!C.type)throw new Error("No output type specified.");l.checkSupport(C.type),C.platform!=="darwin"&&C.platform!=="freebsd"&&C.platform!=="linux"&&C.platform!=="sunos"||(C.platform="UNIX"),C.platform==="win32"&&(C.platform="DOS");var _=C.comment||this.comment||"";A=f.generateWorker(this,C,_)}catch(N){(A=new c("error")).error(N)}return new u(A,C.type||"string",C.mimeType)},generateAsync:function(v,A){return this.generateInternalStream(v).accumulate(A)},generateNodeStream:function(v,A){return(v=v||{}).type||(v.type="nodebuffer"),this.generateInternalStream(v).toNodejsStream(A)}};n.exports=b},{"./compressedObject":2,"./defaults":5,"./generate":9,"./nodejs/NodejsStreamInputAdapter":12,"./nodejsUtils":14,"./stream/GenericWorker":28,"./stream/StreamHelper":29,"./utf8":31,"./utils":32,"./zipObject":35}],16:[function(r,n,s){n.exports=r("stream")},{stream:void 0}],17:[function(r,n,s){var i=r("./DataReader");function a(l){i.call(this,l);for(var c=0;c<this.data.length;c++)l[c]=255&l[c]}r("../utils").inherits(a,i),a.prototype.byteAt=function(l){return this.data[this.zero+l]},a.prototype.lastIndexOfSignature=function(l){for(var c=l.charCodeAt(0),u=l.charCodeAt(1),d=l.charCodeAt(2),h=l.charCodeAt(3),p=this.length-4;0<=p;--p)if(this.data[p]===c&&this.data[p+1]===u&&this.data[p+2]===d&&this.data[p+3]===h)return p-this.zero;return-1},a.prototype.readAndCheckSignature=function(l){var c=l.charCodeAt(0),u=l.charCodeAt(1),d=l.charCodeAt(2),h=l.charCodeAt(3),p=this.readData(4);return c===p[0]&&u===p[1]&&d===p[2]&&h===p[3]},a.prototype.readData=function(l){if(this.checkOffset(l),l===0)return[];var c=this.data.slice(this.zero+this.index,this.zero+this.index+l);return this.index+=l,c},n.exports=a},{"../utils":32,"./DataReader":18}],18:[function(r,n,s){var i=r("../utils");function a(l){this.data=l,this.length=l.length,this.index=0,this.zero=0}a.prototype={checkOffset:function(l){this.checkIndex(this.index+l)},checkIndex:function(l){if(this.length<this.zero+l||l<0)throw new Error("End of data reached (data length = "+this.length+", asked index = "+l+"). Corrupted zip ?")},setIndex:function(l){this.checkIndex(l),this.index=l},skip:function(l){this.setIndex(this.index+l)},byteAt:function(){},readInt:function(l){var c,u=0;for(this.checkOffset(l),c=this.index+l-1;c>=this.index;c--)u=(u<<8)+this.byteAt(c);return this.index+=l,u},readString:function(l){return i.transformTo("string",this.readData(l))},readData:function(){},lastIndexOfSignature:function(){},readAndCheckSignature:function(){},readDate:function(){var l=this.readInt(4);return new Date(Date.UTC(1980+(l>>25&127),(l>>21&15)-1,l>>16&31,l>>11&31,l>>5&63,(31&l)<<1))}},n.exports=a},{"../utils":32}],19:[function(r,n,s){var i=r("./Uint8ArrayReader");function a(l){i.call(this,l)}r("../utils").inherits(a,i),a.prototype.readData=function(l){this.checkOffset(l);var c=this.data.slice(this.zero+this.index,this.zero+this.index+l);return this.index+=l,c},n.exports=a},{"../utils":32,"./Uint8ArrayReader":21}],20:[function(r,n,s){var i=r("./DataReader");function a(l){i.call(this,l)}r("../utils").inherits(a,i),a.prototype.byteAt=function(l){return this.data.charCodeAt(this.zero+l)},a.prototype.lastIndexOfSignature=function(l){return this.data.lastIndexOf(l)-this.zero},a.prototype.readAndCheckSignature=function(l){return l===this.readData(4)},a.prototype.readData=function(l){this.checkOffset(l);var c=this.data.slice(this.zero+this.index,this.zero+this.index+l);return this.index+=l,c},n.exports=a},{"../utils":32,"./DataReader":18}],21:[function(r,n,s){var i=r("./ArrayReader");function a(l){i.call(this,l)}r("../utils").inherits(a,i),a.prototype.readData=function(l){if(this.checkOffset(l),l===0)return new Uint8Array(0);var c=this.data.subarray(this.zero+this.index,this.zero+this.index+l);return this.index+=l,c},n.exports=a},{"../utils":32,"./ArrayReader":17}],22:[function(r,n,s){var i=r("../utils"),a=r("../support"),l=r("./ArrayReader"),c=r("./StringReader"),u=r("./NodeBufferReader"),d=r("./Uint8ArrayReader");n.exports=function(h){var p=i.getTypeOf(h);return i.checkSupport(p),p!=="string"||a.uint8array?p==="nodebuffer"?new u(h):a.uint8array?new d(i.transformTo("uint8array",h)):new l(i.transformTo("array",h)):new c(h)}},{"../support":30,"../utils":32,"./ArrayReader":17,"./NodeBufferReader":19,"./StringReader":20,"./Uint8ArrayReader":21}],23:[function(r,n,s){s.LOCAL_FILE_HEADER="PK��",s.CENTRAL_FILE_HEADER="PK��",s.CENTRAL_DIRECTORY_END="PK��",s.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK�\x07",s.ZIP64_CENTRAL_DIRECTORY_END="PK��",s.DATA_DESCRIPTOR="PK\x07\b"},{}],24:[function(r,n,s){var i=r("./GenericWorker"),a=r("../utils");function l(c){i.call(this,"ConvertWorker to "+c),this.destType=c}a.inherits(l,i),l.prototype.processChunk=function(c){this.push({data:a.transformTo(this.destType,c.data),meta:c.meta})},n.exports=l},{"../utils":32,"./GenericWorker":28}],25:[function(r,n,s){var i=r("./GenericWorker"),a=r("../crc32");function l(){i.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0)}r("../utils").inherits(l,i),l.prototype.processChunk=function(c){this.streamInfo.crc32=a(c.data,this.streamInfo.crc32||0),this.push(c)},n.exports=l},{"../crc32":4,"../utils":32,"./GenericWorker":28}],26:[function(r,n,s){var i=r("../utils"),a=r("./GenericWorker");function l(c){a.call(this,"DataLengthProbe for "+c),this.propName=c,this.withStreamInfo(c,0)}i.inherits(l,a),l.prototype.processChunk=function(c){if(c){var u=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=u+c.data.length}a.prototype.processChunk.call(this,c)},n.exports=l},{"../utils":32,"./GenericWorker":28}],27:[function(r,n,s){var i=r("../utils"),a=r("./GenericWorker");function l(c){a.call(this,"DataWorker");var u=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type="",this._tickScheduled=!1,c.then(function(d){u.dataIsReady=!0,u.data=d,u.max=d&&d.length||0,u.type=i.getTypeOf(d),u.isPaused||u._tickAndRepeat()},function(d){u.error(d)})}i.inherits(l,a),l.prototype.cleanUp=function(){a.prototype.cleanUp.call(this),this.data=null},l.prototype.resume=function(){return!!a.prototype.resume.call(this)&&(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=!0,i.delay(this._tickAndRepeat,[],this)),!0)},l.prototype._tickAndRepeat=function(){this._tickScheduled=!1,this.isPaused||this.isFinished||(this._tick(),this.isFinished||(i.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0))},l.prototype._tick=function(){if(this.isPaused||this.isFinished)return!1;var c=null,u=Math.min(this.max,this.index+16384);if(this.index>=this.max)return this.end();switch(this.type){case"string":c=this.data.substring(this.index,u);break;case"uint8array":c=this.data.subarray(this.index,u);break;case"array":case"nodebuffer":c=this.data.slice(this.index,u)}return this.index=u,this.push({data:c,meta:{percent:this.max?this.index/this.max*100:0}})},n.exports=l},{"../utils":32,"./GenericWorker":28}],28:[function(r,n,s){function i(a){this.name=a||"default",this.streamInfo={},this.generatedError=null,this.extraStreamInfo={},this.isPaused=!0,this.isFinished=!1,this.isLocked=!1,this._listeners={data:[],end:[],error:[]},this.previous=null}i.prototype={push:function(a){this.emit("data",a)},end:function(){if(this.isFinished)return!1;this.flush();try{this.emit("end"),this.cleanUp(),this.isFinished=!0}catch(a){this.emit("error",a)}return!0},error:function(a){return!this.isFinished&&(this.isPaused?this.generatedError=a:(this.isFinished=!0,this.emit("error",a),this.previous&&this.previous.error(a),this.cleanUp()),!0)},on:function(a,l){return this._listeners[a].push(l),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[]},emit:function(a,l){if(this._listeners[a])for(var c=0;c<this._listeners[a].length;c++)this._listeners[a][c].call(this,l)},pipe:function(a){return a.registerPrevious(this)},registerPrevious:function(a){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.streamInfo=a.streamInfo,this.mergeStreamInfo(),this.previous=a;var l=this;return a.on("data",function(c){l.processChunk(c)}),a.on("end",function(){l.end()}),a.on("error",function(c){l.error(c)}),this},pause:function(){return!this.isPaused&&!this.isFinished&&(this.isPaused=!0,this.previous&&this.previous.pause(),!0)},resume:function(){if(!this.isPaused||this.isFinished)return!1;var a=this.isPaused=!1;return this.generatedError&&(this.error(this.generatedError),a=!0),this.previous&&this.previous.resume(),!a},flush:function(){},processChunk:function(a){this.push(a)},withStreamInfo:function(a,l){return this.extraStreamInfo[a]=l,this.mergeStreamInfo(),this},mergeStreamInfo:function(){for(var a in this.extraStreamInfo)Object.prototype.hasOwnProperty.call(this.extraStreamInfo,a)&&(this.streamInfo[a]=this.extraStreamInfo[a])},lock:function(){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.isLocked=!0,this.previous&&this.previous.lock()},toString:function(){var a="Worker "+this.name;return this.previous?this.previous+" -> "+a:a}},n.exports=i},{}],29:[function(r,n,s){var i=r("../utils"),a=r("./ConvertWorker"),l=r("./GenericWorker"),c=r("../base64"),u=r("../support"),d=r("../external"),h=null;if(u.nodestream)try{h=r("../nodejs/NodejsStreamOutputAdapter")}catch{}function p(m,y){return new d.Promise(function(k,g){var x=[],w=m._internalType,b=m._outputType,v=m._mimeType;m.on("data",function(A,C){x.push(A),y&&y(C)}).on("error",function(A){x=[],g(A)}).on("end",function(){try{var A=function(C,_,N){switch(C){case"blob":return i.newBlob(i.transformTo("arraybuffer",_),N);case"base64":return c.encode(_);default:return i.transformTo(C,_)}}(b,function(C,_){var N,W=0,K=null,T=0;for(N=0;N<_.length;N++)T+=_[N].length;switch(C){case"string":return _.join("");case"array":return Array.prototype.concat.apply([],_);case"uint8array":for(K=new Uint8Array(T),N=0;N<_.length;N++)K.set(_[N],W),W+=_[N].length;return K;case"nodebuffer":return Buffer.concat(_);default:throw new Error("concat : unsupported type '"+C+"'")}}(w,x),v);k(A)}catch(C){g(C)}x=[]}).resume()})}function f(m,y,k){var g=y;switch(y){case"blob":case"arraybuffer":g="uint8array";break;case"base64":g="string"}try{this._internalType=g,this._outputType=y,this._mimeType=k,i.checkSupport(g),this._worker=m.pipe(new a(g)),m.lock()}catch(x){this._worker=new l("error"),this._worker.error(x)}}f.prototype={accumulate:function(m){return p(this,m)},on:function(m,y){var k=this;return m==="data"?this._worker.on(m,function(g){y.call(k,g.data,g.meta)}):this._worker.on(m,function(){i.delay(y,arguments,k)}),this},resume:function(){return i.delay(this._worker.resume,[],this._worker),this},pause:function(){return this._worker.pause(),this},toNodejsStream:function(m){if(i.checkSupport("nodestream"),this._outputType!=="nodebuffer")throw new Error(this._outputType+" is not supported by this method");return new h(this,{objectMode:this._outputType!=="nodebuffer"},m)}},n.exports=f},{"../base64":1,"../external":6,"../nodejs/NodejsStreamOutputAdapter":13,"../support":30,"../utils":32,"./ConvertWorker":24,"./GenericWorker":28}],30:[function(r,n,s){if(s.base64=!0,s.array=!0,s.string=!0,s.arraybuffer=typeof ArrayBuffer<"u"&&typeof Uint8Array<"u",s.nodebuffer=typeof Buffer<"u",s.uint8array=typeof Uint8Array<"u",typeof ArrayBuffer>"u")s.blob=!1;else{var i=new ArrayBuffer(0);try{s.blob=new Blob([i],{type:"application/zip"}).size===0}catch{try{var a=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);a.append(i),s.blob=a.getBlob("application/zip").size===0}catch{s.blob=!1}}}try{s.nodestream=!!r("readable-stream").Readable}catch{s.nodestream=!1}},{"readable-stream":16}],31:[function(r,n,s){for(var i=r("./utils"),a=r("./support"),l=r("./nodejsUtils"),c=r("./stream/GenericWorker"),u=new Array(256),d=0;d<256;d++)u[d]=252<=d?6:248<=d?5:240<=d?4:224<=d?3:192<=d?2:1;u[254]=u[254]=1;function h(){c.call(this,"utf-8 decode"),this.leftOver=null}function p(){c.call(this,"utf-8 encode")}s.utf8encode=function(f){return a.nodebuffer?l.newBufferFrom(f,"utf-8"):function(m){var y,k,g,x,w,b=m.length,v=0;for(x=0;x<b;x++)(64512&(k=m.charCodeAt(x)))==55296&&x+1<b&&(64512&(g=m.charCodeAt(x+1)))==56320&&(k=65536+(k-55296<<10)+(g-56320),x++),v+=k<128?1:k<2048?2:k<65536?3:4;for(y=a.uint8array?new Uint8Array(v):new Array(v),x=w=0;w<v;x++)(64512&(k=m.charCodeAt(x)))==55296&&x+1<b&&(64512&(g=m.charCodeAt(x+1)))==56320&&(k=65536+(k-55296<<10)+(g-56320),x++),k<128?y[w++]=k:(k<2048?y[w++]=192|k>>>6:(k<65536?y[w++]=224|k>>>12:(y[w++]=240|k>>>18,y[w++]=128|k>>>12&63),y[w++]=128|k>>>6&63),y[w++]=128|63&k);return y}(f)},s.utf8decode=function(f){return a.nodebuffer?i.transformTo("nodebuffer",f).toString("utf-8"):function(m){var y,k,g,x,w=m.length,b=new Array(2*w);for(y=k=0;y<w;)if((g=m[y++])<128)b[k++]=g;else if(4<(x=u[g]))b[k++]=65533,y+=x-1;else{for(g&=x===2?31:x===3?15:7;1<x&&y<w;)g=g<<6|63&m[y++],x--;1<x?b[k++]=65533:g<65536?b[k++]=g:(g-=65536,b[k++]=55296|g>>10&1023,b[k++]=56320|1023&g)}return b.length!==k&&(b.subarray?b=b.subarray(0,k):b.length=k),i.applyFromCharCode(b)}(f=i.transformTo(a.uint8array?"uint8array":"array",f))},i.inherits(h,c),h.prototype.processChunk=function(f){var m=i.transformTo(a.uint8array?"uint8array":"array",f.data);if(this.leftOver&&this.leftOver.length){if(a.uint8array){var y=m;(m=new Uint8Array(y.length+this.leftOver.length)).set(this.leftOver,0),m.set(y,this.leftOver.length)}else m=this.leftOver.concat(m);this.leftOver=null}var k=function(x,w){var b;for((w=w||x.length)>x.length&&(w=x.length),b=w-1;0<=b&&(192&x[b])==128;)b--;return b<0||b===0?w:b+u[x[b]]>w?b:w}(m),g=m;k!==m.length&&(a.uint8array?(g=m.subarray(0,k),this.leftOver=m.subarray(k,m.length)):(g=m.slice(0,k),this.leftOver=m.slice(k,m.length))),this.push({data:s.utf8decode(g),meta:f.meta})},h.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:s.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},s.Utf8DecodeWorker=h,i.inherits(p,c),p.prototype.processChunk=function(f){this.push({data:s.utf8encode(f.data),meta:f.meta})},s.Utf8EncodeWorker=p},{"./nodejsUtils":14,"./stream/GenericWorker":28,"./support":30,"./utils":32}],32:[function(r,n,s){var i=r("./support"),a=r("./base64"),l=r("./nodejsUtils"),c=r("./external");function u(y){return y}function d(y,k){for(var g=0;g<y.length;++g)k[g]=255&y.charCodeAt(g);return k}r("setimmediate"),s.newBlob=function(y,k){s.checkSupport("blob");try{return new Blob([y],{type:k})}catch{try{var g=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);return g.append(y),g.getBlob(k)}catch{throw new Error("Bug : can't construct the Blob.")}}};var h={stringifyByChunk:function(y,k,g){var x=[],w=0,b=y.length;if(b<=g)return String.fromCharCode.apply(null,y);for(;w<b;)k==="array"||k==="nodebuffer"?x.push(String.fromCharCode.apply(null,y.slice(w,Math.min(w+g,b)))):x.push(String.fromCharCode.apply(null,y.subarray(w,Math.min(w+g,b)))),w+=g;return x.join("")},stringifyByChar:function(y){for(var k="",g=0;g<y.length;g++)k+=String.fromCharCode(y[g]);return k},applyCanBeUsed:{uint8array:function(){try{return i.uint8array&&String.fromCharCode.apply(null,new Uint8Array(1)).length===1}catch{return!1}}(),nodebuffer:function(){try{return i.nodebuffer&&String.fromCharCode.apply(null,l.allocBuffer(1)).length===1}catch{return!1}}()}};function p(y){var k=65536,g=s.getTypeOf(y),x=!0;if(g==="uint8array"?x=h.applyCanBeUsed.uint8array:g==="nodebuffer"&&(x=h.applyCanBeUsed.nodebuffer),x)for(;1<k;)try{return h.stringifyByChunk(y,g,k)}catch{k=Math.floor(k/2)}return h.stringifyByChar(y)}function f(y,k){for(var g=0;g<y.length;g++)k[g]=y[g];return k}s.applyFromCharCode=p;var m={};m.string={string:u,array:function(y){return d(y,new Array(y.length))},arraybuffer:function(y){return m.string.uint8array(y).buffer},uint8array:function(y){return d(y,new Uint8Array(y.length))},nodebuffer:function(y){return d(y,l.allocBuffer(y.length))}},m.array={string:p,array:u,arraybuffer:function(y){return new Uint8Array(y).buffer},uint8array:function(y){return new Uint8Array(y)},nodebuffer:function(y){return l.newBufferFrom(y)}},m.arraybuffer={string:function(y){return p(new Uint8Array(y))},array:function(y){return f(new Uint8Array(y),new Array(y.byteLength))},arraybuffer:u,uint8array:function(y){return new Uint8Array(y)},nodebuffer:function(y){return l.newBufferFrom(new Uint8Array(y))}},m.uint8array={string:p,array:function(y){return f(y,new Array(y.length))},arraybuffer:function(y){return y.buffer},uint8array:u,nodebuffer:function(y){return l.newBufferFrom(y)}},m.nodebuffer={string:p,array:function(y){return f(y,new Array(y.length))},arraybuffer:function(y){return m.nodebuffer.uint8array(y).buffer},uint8array:function(y){return f(y,new Uint8Array(y.length))},nodebuffer:u},s.transformTo=function(y,k){if(k=k||"",!y)return k;s.checkSupport(y);var g=s.getTypeOf(k);return m[g][y](k)},s.resolve=function(y){for(var k=y.split("/"),g=[],x=0;x<k.length;x++){var w=k[x];w==="."||w===""&&x!==0&&x!==k.length-1||(w===".."?g.pop():g.push(w))}return g.join("/")},s.getTypeOf=function(y){return typeof y=="string"?"string":Object.prototype.toString.call(y)==="[object Array]"?"array":i.nodebuffer&&l.isBuffer(y)?"nodebuffer":i.uint8array&&y instanceof Uint8Array?"uint8array":i.arraybuffer&&y instanceof ArrayBuffer?"arraybuffer":void 0},s.checkSupport=function(y){if(!i[y.toLowerCase()])throw new Error(y+" is not supported by this platform")},s.MAX_VALUE_16BITS=65535,s.MAX_VALUE_32BITS=-1,s.pretty=function(y){var k,g,x="";for(g=0;g<(y||"").length;g++)x+="\\x"+((k=y.charCodeAt(g))<16?"0":"")+k.toString(16).toUpperCase();return x},s.delay=function(y,k,g){setImmediate(function(){y.apply(g||null,k||[])})},s.inherits=function(y,k){function g(){}g.prototype=k.prototype,y.prototype=new g},s.extend=function(){var y,k,g={};for(y=0;y<arguments.length;y++)for(k in arguments[y])Object.prototype.hasOwnProperty.call(arguments[y],k)&&g[k]===void 0&&(g[k]=arguments[y][k]);return g},s.prepareContent=function(y,k,g,x,w){return c.Promise.resolve(k).then(function(b){return i.blob&&(b instanceof Blob||["[object File]","[object Blob]"].indexOf(Object.prototype.toString.call(b))!==-1)&&typeof FileReader<"u"?new c.Promise(function(v,A){var C=new FileReader;C.onload=function(_){v(_.target.result)},C.onerror=function(_){A(_.target.error)},C.readAsArrayBuffer(b)}):b}).then(function(b){var v=s.getTypeOf(b);return v?(v==="arraybuffer"?b=s.transformTo("uint8array",b):v==="string"&&(w?b=a.decode(b):g&&x!==!0&&(b=function(A){return d(A,i.uint8array?new Uint8Array(A.length):new Array(A.length))}(b))),b):c.Promise.reject(new Error("Can't read the data of '"+y+"'. Is it in a supported JavaScript type (String, Blob, ArrayBuffer, etc) ?"))})}},{"./base64":1,"./external":6,"./nodejsUtils":14,"./support":30,setimmediate:54}],33:[function(r,n,s){var i=r("./reader/readerFor"),a=r("./utils"),l=r("./signature"),c=r("./zipEntry"),u=r("./support");function d(h){this.files=[],this.loadOptions=h}d.prototype={checkSignature:function(h){if(!this.reader.readAndCheckSignature(h)){this.reader.index-=4;var p=this.reader.readString(4);throw new Error("Corrupted zip or bug: unexpected signature ("+a.pretty(p)+", expected "+a.pretty(h)+")")}},isSignature:function(h,p){var f=this.reader.index;this.reader.setIndex(h);var m=this.reader.readString(4)===p;return this.reader.setIndex(f),m},readBlockEndOfCentral:function(){this.diskNumber=this.reader.readInt(2),this.diskWithCentralDirStart=this.reader.readInt(2),this.centralDirRecordsOnThisDisk=this.reader.readInt(2),this.centralDirRecords=this.reader.readInt(2),this.centralDirSize=this.reader.readInt(4),this.centralDirOffset=this.reader.readInt(4),this.zipCommentLength=this.reader.readInt(2);var h=this.reader.readData(this.zipCommentLength),p=u.uint8array?"uint8array":"array",f=a.transformTo(p,h);this.zipComment=this.loadOptions.decodeFileName(f)},readBlockZip64EndOfCentral:function(){this.zip64EndOfCentralSize=this.reader.readInt(8),this.reader.skip(4),this.diskNumber=this.reader.readInt(4),this.diskWithCentralDirStart=this.reader.readInt(4),this.centralDirRecordsOnThisDisk=this.reader.readInt(8),this.centralDirRecords=this.reader.readInt(8),this.centralDirSize=this.reader.readInt(8),this.centralDirOffset=this.reader.readInt(8),this.zip64ExtensibleData={};for(var h,p,f,m=this.zip64EndOfCentralSize-44;0<m;)h=this.reader.readInt(2),p=this.reader.readInt(4),f=this.reader.readData(p),this.zip64ExtensibleData[h]={id:h,length:p,value:f}},readBlockZip64EndOfCentralLocator:function(){if(this.diskWithZip64CentralDirStart=this.reader.readInt(4),this.relativeOffsetEndOfZip64CentralDir=this.reader.readInt(8),this.disksCount=this.reader.readInt(4),1<this.disksCount)throw new Error("Multi-volumes zip are not supported")},readLocalFiles:function(){var h,p;for(h=0;h<this.files.length;h++)p=this.files[h],this.reader.setIndex(p.localHeaderOffset),this.checkSignature(l.LOCAL_FILE_HEADER),p.readLocalPart(this.reader),p.handleUTF8(),p.processAttributes()},readCentralDir:function(){var h;for(this.reader.setIndex(this.centralDirOffset);this.reader.readAndCheckSignature(l.CENTRAL_FILE_HEADER);)(h=new c({zip64:this.zip64},this.loadOptions)).readCentralPart(this.reader),this.files.push(h);if(this.centralDirRecords!==this.files.length&&this.centralDirRecords!==0&&this.files.length===0)throw new Error("Corrupted zip or bug: expected "+this.centralDirRecords+" records in central dir, got "+this.files.length)},readEndOfCentral:function(){var h=this.reader.lastIndexOfSignature(l.CENTRAL_DIRECTORY_END);if(h<0)throw this.isSignature(0,l.LOCAL_FILE_HEADER)?new Error("Corrupted zip: can't find end of central directory"):new Error("Can't find end of central directory : is this a zip file ? If it is, see https://stuk.github.io/jszip/documentation/howto/read_zip.html");this.reader.setIndex(h);var p=h;if(this.checkSignature(l.CENTRAL_DIRECTORY_END),this.readBlockEndOfCentral(),this.diskNumber===a.MAX_VALUE_16BITS||this.diskWithCentralDirStart===a.MAX_VALUE_16BITS||this.centralDirRecordsOnThisDisk===a.MAX_VALUE_16BITS||this.centralDirRecords===a.MAX_VALUE_16BITS||this.centralDirSize===a.MAX_VALUE_32BITS||this.centralDirOffset===a.MAX_VALUE_32BITS){if(this.zip64=!0,(h=this.reader.lastIndexOfSignature(l.ZIP64_CENTRAL_DIRECTORY_LOCATOR))<0)throw new Error("Corrupted zip: can't find the ZIP64 end of central directory locator");if(this.reader.setIndex(h),this.checkSignature(l.ZIP64_CENTRAL_DIRECTORY_LOCATOR),this.readBlockZip64EndOfCentralLocator(),!this.isSignature(this.relativeOffsetEndOfZip64CentralDir,l.ZIP64_CENTRAL_DIRECTORY_END)&&(this.relativeOffsetEndOfZip64CentralDir=this.reader.lastIndexOfSignature(l.ZIP64_CENTRAL_DIRECTORY_END),this.relativeOffsetEndOfZip64CentralDir<0))throw new Error("Corrupted zip: can't find the ZIP64 end of central directory");this.reader.setIndex(this.relativeOffsetEndOfZip64CentralDir),this.checkSignature(l.ZIP64_CENTRAL_DIRECTORY_END),this.readBlockZip64EndOfCentral()}var f=this.centralDirOffset+this.centralDirSize;this.zip64&&(f+=20,f+=12+this.zip64EndOfCentralSize);var m=p-f;if(0<m)this.isSignature(p,l.CENTRAL_FILE_HEADER)||(this.reader.zero=m);else if(m<0)throw new Error("Corrupted zip: missing "+Math.abs(m)+" bytes.")},prepareReader:function(h){this.reader=i(h)},load:function(h){this.prepareReader(h),this.readEndOfCentral(),this.readCentralDir(),this.readLocalFiles()}},n.exports=d},{"./reader/readerFor":22,"./signature":23,"./support":30,"./utils":32,"./zipEntry":34}],34:[function(r,n,s){var i=r("./reader/readerFor"),a=r("./utils"),l=r("./compressedObject"),c=r("./crc32"),u=r("./utf8"),d=r("./compressions"),h=r("./support");function p(f,m){this.options=f,this.loadOptions=m}p.prototype={isEncrypted:function(){return(1&this.bitFlag)==1},useUTF8:function(){return(2048&this.bitFlag)==2048},readLocalPart:function(f){var m,y;if(f.skip(22),this.fileNameLength=f.readInt(2),y=f.readInt(2),this.fileName=f.readData(this.fileNameLength),f.skip(y),this.compressedSize===-1||this.uncompressedSize===-1)throw new Error("Bug or corrupted zip : didn't get enough information from the central directory (compressedSize === -1 || uncompressedSize === -1)");if((m=function(k){for(var g in d)if(Object.prototype.hasOwnProperty.call(d,g)&&d[g].magic===k)return d[g];return null}(this.compressionMethod))===null)throw new Error("Corrupted zip : compression "+a.pretty(this.compressionMethod)+" unknown (inner file : "+a.transformTo("string",this.fileName)+")");this.decompressed=new l(this.compressedSize,this.uncompressedSize,this.crc32,m,f.readData(this.compressedSize))},readCentralPart:function(f){this.versionMadeBy=f.readInt(2),f.skip(2),this.bitFlag=f.readInt(2),this.compressionMethod=f.readString(2),this.date=f.readDate(),this.crc32=f.readInt(4),this.compressedSize=f.readInt(4),this.uncompressedSize=f.readInt(4);var m=f.readInt(2);if(this.extraFieldsLength=f.readInt(2),this.fileCommentLength=f.readInt(2),this.diskNumberStart=f.readInt(2),this.internalFileAttributes=f.readInt(2),this.externalFileAttributes=f.readInt(4),this.localHeaderOffset=f.readInt(4),this.isEncrypted())throw new Error("Encrypted zip are not supported");f.skip(m),this.readExtraFields(f),this.parseZIP64ExtraField(f),this.fileComment=f.readData(this.fileCommentLength)},processAttributes:function(){this.unixPermissions=null,this.dosPermissions=null;var f=this.versionMadeBy>>8;this.dir=!!(16&this.externalFileAttributes),f==0&&(this.dosPermissions=63&this.externalFileAttributes),f==3&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||this.fileNameStr.slice(-1)!=="/"||(this.dir=!0)},parseZIP64ExtraField:function(){if(this.extraFields[1]){var f=i(this.extraFields[1].value);this.uncompressedSize===a.MAX_VALUE_32BITS&&(this.uncompressedSize=f.readInt(8)),this.compressedSize===a.MAX_VALUE_32BITS&&(this.compressedSize=f.readInt(8)),this.localHeaderOffset===a.MAX_VALUE_32BITS&&(this.localHeaderOffset=f.readInt(8)),this.diskNumberStart===a.MAX_VALUE_32BITS&&(this.diskNumberStart=f.readInt(4))}},readExtraFields:function(f){var m,y,k,g=f.index+this.extraFieldsLength;for(this.extraFields||(this.extraFields={});f.index+4<g;)m=f.readInt(2),y=f.readInt(2),k=f.readData(y),this.extraFields[m]={id:m,length:y,value:k};f.setIndex(g)},handleUTF8:function(){var f=h.uint8array?"uint8array":"array";if(this.useUTF8())this.fileNameStr=u.utf8decode(this.fileName),this.fileCommentStr=u.utf8decode(this.fileComment);else{var m=this.findExtraFieldUnicodePath();if(m!==null)this.fileNameStr=m;else{var y=a.transformTo(f,this.fileName);this.fileNameStr=this.loadOptions.decodeFileName(y)}var k=this.findExtraFieldUnicodeComment();if(k!==null)this.fileCommentStr=k;else{var g=a.transformTo(f,this.fileComment);this.fileCommentStr=this.loadOptions.decodeFileName(g)}}},findExtraFieldUnicodePath:function(){var f=this.extraFields[28789];if(f){var m=i(f.value);return m.readInt(1)!==1||c(this.fileName)!==m.readInt(4)?null:u.utf8decode(m.readData(f.length-5))}return null},findExtraFieldUnicodeComment:function(){var f=this.extraFields[25461];if(f){var m=i(f.value);return m.readInt(1)!==1||c(this.fileComment)!==m.readInt(4)?null:u.utf8decode(m.readData(f.length-5))}return null}},n.exports=p},{"./compressedObject":2,"./compressions":3,"./crc32":4,"./reader/readerFor":22,"./support":30,"./utf8":31,"./utils":32}],35:[function(r,n,s){function i(m,y,k){this.name=m,this.dir=k.dir,this.date=k.date,this.comment=k.comment,this.unixPermissions=k.unixPermissions,this.dosPermissions=k.dosPermissions,this._data=y,this._dataBinary=k.binary,this.options={compression:k.compression,compressionOptions:k.compressionOptions}}var a=r("./stream/StreamHelper"),l=r("./stream/DataWorker"),c=r("./utf8"),u=r("./compressedObject"),d=r("./stream/GenericWorker");i.prototype={internalStream:function(m){var y=null,k="string";try{if(!m)throw new Error("No output type specified.");var g=(k=m.toLowerCase())==="string"||k==="text";k!=="binarystring"&&k!=="text"||(k="string"),y=this._decompressWorker();var x=!this._dataBinary;x&&!g&&(y=y.pipe(new c.Utf8EncodeWorker)),!x&&g&&(y=y.pipe(new c.Utf8DecodeWorker))}catch(w){(y=new d("error")).error(w)}return new a(y,k,"")},async:function(m,y){return this.internalStream(m).accumulate(y)},nodeStream:function(m,y){return this.internalStream(m||"nodebuffer").toNodejsStream(y)},_compressWorker:function(m,y){if(this._data instanceof u&&this._data.compression.magic===m.magic)return this._data.getCompressedWorker();var k=this._decompressWorker();return this._dataBinary||(k=k.pipe(new c.Utf8EncodeWorker)),u.createWorkerFrom(k,m,y)},_decompressWorker:function(){return this._data instanceof u?this._data.getContentWorker():this._data instanceof d?this._data:new l(this._data)}};for(var h=["asText","asBinary","asNodeBuffer","asUint8Array","asArrayBuffer"],p=function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},f=0;f<h.length;f++)i.prototype[h[f]]=p;n.exports=i},{"./compressedObject":2,"./stream/DataWorker":27,"./stream/GenericWorker":28,"./stream/StreamHelper":29,"./utf8":31}],36:[function(r,n,s){(function(i){var a,l,c=i.MutationObserver||i.WebKitMutationObserver;if(c){var u=0,d=new c(m),h=i.document.createTextNode("");d.observe(h,{characterData:!0}),a=function(){h.data=u=++u%2}}else if(i.setImmediate||i.MessageChannel===void 0)a="document"in i&&"onreadystatechange"in i.document.createElement("script")?function(){var y=i.document.createElement("script");y.onreadystatechange=function(){m(),y.onreadystatechange=null,y.parentNode.removeChild(y),y=null},i.document.documentElement.appendChild(y)}:function(){setTimeout(m,0)};else{var p=new i.MessageChannel;p.port1.onmessage=m,a=function(){p.port2.postMessage(0)}}var f=[];function m(){var y,k;l=!0;for(var g=f.length;g;){for(k=f,f=[],y=-1;++y<g;)k[y]();g=f.length}l=!1}n.exports=function(y){f.push(y)!==1||l||a()}}).call(this,typeof vi<"u"?vi:typeof self<"u"?self:typeof window<"u"?window:{})},{}],37:[function(r,n,s){var i=r("immediate");function a(){}var l={},c=["REJECTED"],u=["FULFILLED"],d=["PENDING"];function h(g){if(typeof g!="function")throw new TypeError("resolver must be a function");this.state=d,this.queue=[],this.outcome=void 0,g!==a&&y(this,g)}function p(g,x,w){this.promise=g,typeof x=="function"&&(this.onFulfilled=x,this.callFulfilled=this.otherCallFulfilled),typeof w=="function"&&(this.onRejected=w,this.callRejected=this.otherCallRejected)}function f(g,x,w){i(function(){var b;try{b=x(w)}catch(v){return l.reject(g,v)}b===g?l.reject(g,new TypeError("Cannot resolve promise with itself")):l.resolve(g,b)})}function m(g){var x=g&&g.then;if(g&&(typeof g=="object"||typeof g=="function")&&typeof x=="function")return function(){x.apply(g,arguments)}}function y(g,x){var w=!1;function b(C){w||(w=!0,l.reject(g,C))}function v(C){w||(w=!0,l.resolve(g,C))}var A=k(function(){x(v,b)});A.status==="error"&&b(A.value)}function k(g,x){var w={};try{w.value=g(x),w.status="success"}catch(b){w.status="error",w.value=b}return w}(n.exports=h).prototype.finally=function(g){if(typeof g!="function")return this;var x=this.constructor;return this.then(function(w){return x.resolve(g()).then(function(){return w})},function(w){return x.resolve(g()).then(function(){throw w})})},h.prototype.catch=function(g){return this.then(null,g)},h.prototype.then=function(g,x){if(typeof g!="function"&&this.state===u||typeof x!="function"&&this.state===c)return this;var w=new this.constructor(a);return this.state!==d?f(w,this.state===u?g:x,this.outcome):this.queue.push(new p(w,g,x)),w},p.prototype.callFulfilled=function(g){l.resolve(this.promise,g)},p.prototype.otherCallFulfilled=function(g){f(this.promise,this.onFulfilled,g)},p.prototype.callRejected=function(g){l.reject(this.promise,g)},p.prototype.otherCallRejected=function(g){f(this.promise,this.onRejected,g)},l.resolve=function(g,x){var w=k(m,x);if(w.status==="error")return l.reject(g,w.value);var b=w.value;if(b)y(g,b);else{g.state=u,g.outcome=x;for(var v=-1,A=g.queue.length;++v<A;)g.queue[v].callFulfilled(x)}return g},l.reject=function(g,x){g.state=c,g.outcome=x;for(var w=-1,b=g.queue.length;++w<b;)g.queue[w].callRejected(x);return g},h.resolve=function(g){return g instanceof this?g:l.resolve(new this(a),g)},h.reject=function(g){var x=new this(a);return l.reject(x,g)},h.all=function(g){var x=this;if(Object.prototype.toString.call(g)!=="[object Array]")return this.reject(new TypeError("must be an array"));var w=g.length,b=!1;if(!w)return this.resolve([]);for(var v=new Array(w),A=0,C=-1,_=new this(a);++C<w;)N(g[C],C);return _;function N(W,K){x.resolve(W).then(function(T){v[K]=T,++A!==w||b||(b=!0,l.resolve(_,v))},function(T){b||(b=!0,l.reject(_,T))})}},h.race=function(g){var x=this;if(Object.prototype.toString.call(g)!=="[object Array]")return this.reject(new TypeError("must be an array"));var w=g.length,b=!1;if(!w)return this.resolve([]);for(var v=-1,A=new this(a);++v<w;)C=g[v],x.resolve(C).then(function(_){b||(b=!0,l.resolve(A,_))},function(_){b||(b=!0,l.reject(A,_))});var C;return A}},{immediate:36}],38:[function(r,n,s){var i={};(0,r("./lib/utils/common").assign)(i,r("./lib/deflate"),r("./lib/inflate"),r("./lib/zlib/constants")),n.exports=i},{"./lib/deflate":39,"./lib/inflate":40,"./lib/utils/common":41,"./lib/zlib/constants":44}],39:[function(r,n,s){var i=r("./zlib/deflate"),a=r("./utils/common"),l=r("./utils/strings"),c=r("./zlib/messages"),u=r("./zlib/zstream"),d=Object.prototype.toString,h=0,p=-1,f=0,m=8;function y(g){if(!(this instanceof y))return new y(g);this.options=a.assign({level:p,method:m,chunkSize:16384,windowBits:15,memLevel:8,strategy:f,to:""},g||{});var x=this.options;
vendor: 4,869 bytes, line 946
946x.raw&&0<x.windowBits?x.windowBits=-x.windowBits:x.gzip&&0<x.windowBits&&x.windowBits<16&&(x.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new u,this.strm.avail_out=0;var w=i.deflateInit2(this.strm,x.level,x.method,x.windowBits,x.memLevel,x.strategy);if(w!==h)throw new Error(c[w]);if(x.header&&i.deflateSetHeader(this.strm,x.header),x.dictionary){var b;if(b=typeof x.dictionary=="string"?l.string2buf(x.dictionary):d.call(x.dictionary)==="[object ArrayBuffer]"?new Uint8Array(x.dictionary):x.dictionary,(w=i.deflateSetDictionary(this.strm,b))!==h)throw new Error(c[w]);this._dict_set=!0}}function k(g,x){var w=new y(x);if(w.push(g,!0),w.err)throw w.msg||c[w.err];return w.result}y.prototype.push=function(g,x){var w,b,v=this.strm,A=this.options.chunkSize;if(this.ended)return!1;b=x===~~x?x:x===!0?4:0,typeof g=="string"?v.input=l.string2buf(g):d.call(g)==="[object ArrayBuffer]"?v.input=new Uint8Array(g):v.input=g,v.next_in=0,v.avail_in=v.input.length;do{if(v.avail_out===0&&(v.output=new a.Buf8(A),v.next_out=0,v.avail_out=A),(w=i.deflate(v,b))!==1&&w!==h)return this.onEnd(w),!(this.ended=!0);v.avail_out!==0&&(v.avail_in!==0||b!==4&&b!==2)||(this.options.to==="string"?this.onData(l.buf2binstring(a.shrinkBuf(v.output,v.next_out))):this.onData(a.shrinkBuf(v.output,v.next_out)))}while((0<v.avail_in||v.avail_out===0)&&w!==1);return b===4?(w=i.deflateEnd(this.strm),this.onEnd(w),this.ended=!0,w===h):b!==2||(this.onEnd(h),!(v.avail_out=0))},y.prototype.onData=function(g){this.chunks.push(g)},y.prototype.onEnd=function(g){g===h&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=a.flattenChunks(this.chunks)),this.chunks=[],this.err=g,this.msg=this.strm.msg},s.Deflate=y,s.deflate=k,s.deflateRaw=function(g,x){return(x=x||{}).raw=!0,k(g,x)},s.gzip=function(g,x){return(x=x||{}).gzip=!0,k(g,x)}},{"./utils/common":41,"./utils/strings":42,"./zlib/deflate":46,"./zlib/messages":51,"./zlib/zstream":53}],40:[function(r,n,s){var i=r("./zlib/inflate"),a=r("./utils/common"),l=r("./utils/strings"),c=r("./zlib/constants"),u=r("./zlib/messages"),d=r("./zlib/zstream"),h=r("./zlib/gzheader"),p=Object.prototype.toString;function f(y){if(!(this instanceof f))return new f(y);this.options=a.assign({chunkSize:16384,windowBits:0,to:""},y||{});var k=this.options;k.raw&&0<=k.windowBits&&k.windowBits<16&&(k.windowBits=-k.windowBits,k.windowBits===0&&(k.windowBits=-15)),!(0<=k.windowBits&&k.windowBits<16)||y&&y.windowBits||(k.windowBits+=32),15<k.windowBits&&k.windowBits<48&&!(15&k.windowBits)&&(k.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new d,this.strm.avail_out=0;var g=i.inflateInit2(this.strm,k.windowBits);if(g!==c.Z_OK)throw new Error(u[g]);this.header=new h,i.inflateGetHeader(this.strm,this.header)}function m(y,k){var g=new f(k);if(g.push(y,!0),g.err)throw g.msg||u[g.err];return g.result}f.prototype.push=function(y,k){var g,x,w,b,v,A,C=this.strm,_=this.options.chunkSize,N=this.options.dictionary,W=!1;if(this.ended)return!1;x=k===~~k?k:k===!0?c.Z_FINISH:c.Z_NO_FLUSH,typeof y=="string"?C.input=l.binstring2buf(y):p.call(y)==="[object ArrayBuffer]"?C.input=new Uint8Array(y):C.input=y,C.next_in=0,C.avail_in=C.input.length;do{if(C.avail_out===0&&(C.output=new a.Buf8(_),C.next_out=0,C.avail_out=_),(g=i.inflate(C,c.Z_NO_FLUSH))===c.Z_NEED_DICT&&N&&(A=typeof N=="string"?l.string2buf(N):p.call(N)==="[object ArrayBuffer]"?new Uint8Array(N):N,g=i.inflateSetDictionary(this.strm,A)),g===c.Z_BUF_ERROR&&W===!0&&(g=c.Z_OK,W=!1),g!==c.Z_STREAM_END&&g!==c.Z_OK)return this.onEnd(g),!(this.ended=!0);C.next_out&&(C.avail_out!==0&&g!==c.Z_STREAM_END&&(C.avail_in!==0||x!==c.Z_FINISH&&x!==c.Z_SYNC_FLUSH)||(this.options.to==="string"?(w=l.utf8border(C.output,C.next_out),b=C.next_out-w,v=l.buf2string(C.output,w),C.next_out=b,C.avail_out=_-b,b&&a.arraySet(C.output,C.output,w,b,0),this.onData(v)):this.onData(a.shrinkBuf(C.output,C.next_out)))),C.avail_in===0&&C.avail_out===0&&(W=!0)}while((0<C.avail_in||C.avail_out===0)&&g!==c.Z_STREAM_END);return g===c.Z_STREAM_END&&(x=c.Z_FINISH),x===c.Z_FINISH?(g=i.inflateEnd(this.strm),this.onEnd(g),this.ended=!0,g===c.Z_OK):x!==c.Z_SYNC_FLUSH||(this.onEnd(c.Z_OK),!(C.avail_out=0))},f.prototype.onData=function(y){this.chunks.push(y)},f.prototype.onEnd=function(y){y===c.Z_OK&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=a.flattenChunks(this.chunks)),this.chunks=[],this.err=y,this.msg=this.strm.msg},s.Inflate=f,s.inflate=m,s.inflateRaw=function(y,k){return(k=k||{}).raw=!0,m(y,k)},s.ungzip=m},{"./utils/common":41,"./utils/strings":42,"./zlib/constants":44,"./zlib/gzheader":47,"./zlib/inflate":49,"./zlib/messages":51,"./zlib/zstream":53}],41:[function(r,n,s){var i=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Int32Array<"u";s.assign=function(c){for(var u=Array.prototype.slice.call(arguments,1
vendor: 14,549 bytes, line 946
946);u.length;){var d=u.shift();if(d){if(typeof d!="object")throw new TypeError(d+"must be non-object");for(var h in d)d.hasOwnProperty(h)&&(c[h]=d[h])}}return c},s.shrinkBuf=function(c,u){return c.length===u?c:c.subarray?c.subarray(0,u):(c.length=u,c)};var a={arraySet:function(c,u,d,h,p){if(u.subarray&&c.subarray)c.set(u.subarray(d,d+h),p);else for(var f=0;f<h;f++)c[p+f]=u[d+f]},flattenChunks:function(c){var u,d,h,p,f,m;for(u=h=0,d=c.length;u<d;u++)h+=c[u].length;for(m=new Uint8Array(h),u=p=0,d=c.length;u<d;u++)f=c[u],m.set(f,p),p+=f.length;return m}},l={arraySet:function(c,u,d,h,p){for(var f=0;f<h;f++)c[p+f]=u[d+f]},flattenChunks:function(c){return[].concat.apply([],c)}};s.setTyped=function(c){c?(s.Buf8=Uint8Array,s.Buf16=Uint16Array,s.Buf32=Int32Array,s.assign(s,a)):(s.Buf8=Array,s.Buf16=Array,s.Buf32=Array,s.assign(s,l))},s.setTyped(i)},{}],42:[function(r,n,s){var i=r("./common"),a=!0,l=!0;try{String.fromCharCode.apply(null,[0])}catch{a=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch{l=!1}for(var c=new i.Buf8(256),u=0;u<256;u++)c[u]=252<=u?6:248<=u?5:240<=u?4:224<=u?3:192<=u?2:1;function d(h,p){if(p<65537&&(h.subarray&&l||!h.subarray&&a))return String.fromCharCode.apply(null,i.shrinkBuf(h,p));for(var f="",m=0;m<p;m++)f+=String.fromCharCode(h[m]);return f}c[254]=c[254]=1,s.string2buf=function(h){var p,f,m,y,k,g=h.length,x=0;for(y=0;y<g;y++)(64512&(f=h.charCodeAt(y)))==55296&&y+1<g&&(64512&(m=h.charCodeAt(y+1)))==56320&&(f=65536+(f-55296<<10)+(m-56320),y++),x+=f<128?1:f<2048?2:f<65536?3:4;for(p=new i.Buf8(x),y=k=0;k<x;y++)(64512&(f=h.charCodeAt(y)))==55296&&y+1<g&&(64512&(m=h.charCodeAt(y+1)))==56320&&(f=65536+(f-55296<<10)+(m-56320),y++),f<128?p[k++]=f:(f<2048?p[k++]=192|f>>>6:(f<65536?p[k++]=224|f>>>12:(p[k++]=240|f>>>18,p[k++]=128|f>>>12&63),p[k++]=128|f>>>6&63),p[k++]=128|63&f);return p},s.buf2binstring=function(h){return d(h,h.length)},s.binstring2buf=function(h){for(var p=new i.Buf8(h.length),f=0,m=p.length;f<m;f++)p[f]=h.charCodeAt(f);return p},s.buf2string=function(h,p){var f,m,y,k,g=p||h.length,x=new Array(2*g);for(f=m=0;f<g;)if((y=h[f++])<128)x[m++]=y;else if(4<(k=c[y]))x[m++]=65533,f+=k-1;else{for(y&=k===2?31:k===3?15:7;1<k&&f<g;)y=y<<6|63&h[f++],k--;1<k?x[m++]=65533:y<65536?x[m++]=y:(y-=65536,x[m++]=55296|y>>10&1023,x[m++]=56320|1023&y)}return d(x,m)},s.utf8border=function(h,p){var f;for((p=p||h.length)>h.length&&(p=h.length),f=p-1;0<=f&&(192&h[f])==128;)f--;return f<0||f===0?p:f+c[h[f]]>p?f:p}},{"./common":41}],43:[function(r,n,s){n.exports=function(i,a,l,c){for(var u=65535&i|0,d=i>>>16&65535|0,h=0;l!==0;){for(l-=h=2e3<l?2e3:l;d=d+(u=u+a[c++]|0)|0,--h;);u%=65521,d%=65521}return u|d<<16|0}},{}],44:[function(r,n,s){n.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},{}],45:[function(r,n,s){var i=function(){for(var a,l=[],c=0;c<256;c++){a=c;for(var u=0;u<8;u++)a=1&a?3988292384^a>>>1:a>>>1;l[c]=a}return l}();n.exports=function(a,l,c,u){var d=i,h=u+c;a^=-1;for(var p=u;p<h;p++)a=a>>>8^d[255&(a^l[p])];return-1^a}},{}],46:[function(r,n,s){var i,a=r("../utils/common"),l=r("./trees"),c=r("./adler32"),u=r("./crc32"),d=r("./messages"),h=0,p=4,f=0,m=-2,y=-1,k=4,g=2,x=8,w=9,b=286,v=30,A=19,C=2*b+1,_=15,N=3,W=258,K=W+N+1,T=42,F=113,E=1,H=2,Y=3,$=4;function D(z,fe){return z.msg=d[fe],fe}function J(z){return(z<<1)-(4<z?9:0)}function de(z){for(var fe=z.length;0<=--fe;)z[fe]=0}function G(z){var fe=z.state,R=fe.pending;R>z.avail_out&&(R=z.avail_out),R!==0&&(a.arraySet(z.output,fe.pending_buf,fe.pending_out,R,z.next_out),z.next_out+=R,fe.pending_out+=R,z.total_out+=R,z.avail_out-=R,fe.pending-=R,fe.pending===0&&(fe.pending_out=0))}function B(z,fe){l._tr_flush_block(z,0<=z.block_start?z.block_start:-1,z.strstart-z.block_start,fe),z.block_start=z.strstart,G(z.strm)}function re(z,fe){z.pending_buf[z.pending++]=fe}function ae(z,fe){z.pending_buf[z.pending++]=fe>>>8&255,z.pending_buf[z.pending++]=255&fe}function ge(z,fe){var R,j,S=z.max_chain_length,P=z.strstart,L=z.prev_length,V=z.nice_match,U=z.strstart>z.w_size-K?z.strstart-(z.w_size-K):0,oe=z.window,ce=z.w_mask,X=z.prev,he=z.strstart+W,we=oe[P+L-1],Te=oe[P+L];z.prev_length>=z.good_match&&(S>>=2),V>z.lookahead&&(V=z.lookahead);do if(oe[(R=fe)+L]===Te&&oe[R+L-1]===we&&oe[R]===oe[P]&&oe[++R]===oe[P+1]){P+=2,R++;do;while(oe[++P]===oe[++R]&&oe[++P]===oe[++R]&&oe[++P]===oe[++R]&&oe[++P]===oe[++R]&&oe[++P]===oe[++R]&&oe[++P]===oe[++R]&&oe[++P]===oe[++R]&&oe[++P]===oe[++R]&&P<he);if(j=W-(he-P),P=he-W,L<j){if(z.match_start=fe,V<=(L=j))break;we=oe[P+L-1],Te=oe[P+L]}}while((fe=X[fe&ce])>U&&--S!=0);return L<=z.lookahead?L:z.lookahead}function ne(z){var fe,R,j,S,P,L,V,U,oe,ce,X=z.w_size;do{if(S=z.window_size-z.lookahead-z.strstart,z.strstart>=X+(X-K)){for(a.arraySet(z.window,z.window,X,X,0),z.match_start-=X,z.strstart-=X,z.block_start-=X,fe=R=z.hash_size;j=z.head[--fe],z.head[fe]=X<=j?j-X:0,--R;);for(fe=R=X;j=z.prev[--fe],z.prev[fe]=X<=j?j-X:0,--R;);S+=X}if(z.strm.avail_in===0)break;if(L=z.strm,V=z.window,U=z.strstart+z.lookahead,oe=S,ce=void 0,ce=L.avail_in,oe<ce&&(ce=oe),R=ce===0?0:(L.avail_in-=ce,a.arraySet(V,L.input,L.next_in,ce,U),L.state.wrap===1?L.adler=c(L.adler,V,ce,U):L.state.wrap===2&&(L.adler=u(L.adler,V,ce,U)),L.next_in+=ce,L.total_in+=ce,ce),z.lookahead+=R,z.lookahead+z.insert>=N)for(P=z.strstart-z.insert,z.ins_h=z.window[P],z.ins_h=(z.ins_h<<z.hash_shift^z.window[P+1])&z.hash_mask;z.insert&&(z.ins_h=(z.ins_h<<z.hash_shift^z.window[P+N-1])&z.hash_mask,z.prev[P&z.w_mask]=z.head[z.ins_h],z.head[z.ins_h]=P,P++,z.insert--,!(z.lookahead+z.insert<N)););}while(z.lookahead<K&&z.strm.avail_in!==0)}function O(z,fe){for(var R,j;;){if(z.lookahead<K){if(ne(z),z.lookahead<K&&fe===h)return E;if(z.lookahead===0)break}if(R=0,z.lookahead>=N&&(z.ins_h=(z.ins_h<<z.hash_shift^z.window[z.strstart+N-1])&z.hash_mask,R=z.prev[z.strstart&z.w_mask]=z.head[z.ins_h],z.head[z.ins_h]=z.strstart),R!==0&&z.strstart-R<=z.w_size-K&&(z.match_length=ge(z,R)),z.match_length>=N)if(j=l._tr_tally(z,z.strstart-z.match_start,z.match_length-N),z.lookahead-=z.match_length,z.match_length<=z.max_lazy_match&&z.lookahead>=N){for(z.match_length--;z.strstart++,z.ins_h=(z.ins_h<<z.hash_shift^z.window[z.strstart+N-1])&z.hash_mask,R=z.prev[z.strstart&z.w_mask]=z.head[z.ins_h],z.head[z.ins_h]=z.strstart,--z.match_length!=0;);z.strstart++}else z.strstart+=z.match_length,z.match_length=0,z.ins_h=z.window[z.strstart],z.ins_h=(z.ins_h<<z.hash_shift^z.window[z.strstart+1])&z.hash_mask;else j=l._tr_tally(z,0,z.window[z.strstart]),z.lookahead--,z.strstart++;if(j&&(B(z,!1),z.strm.avail_out===0))return E}return z.insert=z.strstart<N-1?z.strstart:N-1,fe===p?(B(z,!0),z.strm.avail_out===0?Y:$):z.last_lit&&(B(z,!1),z.strm.avail_out===0)?E:H}function I(z,fe){for(var R,j,S;;){if(z.lookahead<K){if(ne(z),z.lookahead<K&&fe===h)return E;if(z.lookahead===0)break}if(R=0,z.lookahead>=N&&(z.ins_h=(z.ins_h<<z.hash_shift^z.window[z.strstart+N-1])&z.hash_mask,R=z.prev[z.strstart&z.w_mask]=z.head[z.ins_h],z.head[z.ins_h]=z.strstart),z.prev_length=z.match_length,z.prev_match=z.match_start,z.match_length=N-1,R!==0&&z.prev_length<z.max_lazy_match&&z.strstart-R<=z.w_size-K&&(z.match_length=ge(z,R),z.match_length<=5&&(z.strategy===1||z.match_length===N&&4096<z.strstart-z.match_start)&&(z.match_length=N-1)),z.prev_length>=N&&z.match_length<=z.prev_length){for(S=z.strstart+z.lookahead-N,j=l._tr_tally(z,z.strstart-1-z.prev_match,z.prev_length-N),z.lookahead-=z.prev_length-1,z.prev_length-=2;++z.strstart<=S&&(z.ins_h=(z.ins_h<<z.hash_shift^z.window[z.strstart+N-1])&z.hash_mask,R=z.prev[z.strstart&z.w_mask]=z.head[z.ins_h],z.head[z.ins_h]=z.strstart),--z.prev_length!=0;);if(z.match_available=0,z.match_length=N-1,z.strstart++,j&&(B(z,!1),z.strm.avail_out===0))return E}else if(z.match_available){if((j=l._tr_tally(z,0,z.window[z.strstart-1]))&&B(z,!1),z.strstart++,z.lookahead--,z.strm.avail_out===0)return E}else z.match_available=1,z.strstart++,z.lookahead--}return z.match_available&&(j=l._tr_tally(z,0,z.window[z.strstart-1]),z.match_available=0),z.insert=z.strstart<N-1?z.strstart:N-1,fe===p?(B(z,!0),z.strm.avail_out===0?Y:$):z.last_lit&&(B(z,!1),z.strm.avail_out===0)?E:H}function ee(z,fe,R,j,S){this.good_length=z,this.max_lazy=fe,this.nice_length=R,this.max_chain=j,this.func=S}function Q(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=x,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new a.Buf16(2*C),this.dyn_dtree=new a.Buf16(2*(2*v+1)),this.bl_tree=new a.Buf16(2*(2*A+1)),de(this.dyn_ltree),de(this.dyn_dtree),de(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new a.Buf16(_+1),this.heap=new a.Buf16(2*b+1),de(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new a.Buf16(2*b+1),de(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function q(z){var fe;return z&&z.state?(z.total_in=z.total_out=0,z.data_type=g,(fe=z.state).pending=0,fe.pending_out=0,fe.wrap<0&&(fe.wrap=-fe.wrap),fe.status=fe.wrap?T:F,z.adler=fe.wrap===2?0:1,fe.last_flush=h,l._tr_init(fe),f):D(z,m)}function Z(z){var fe=q(z);return fe===f&&function(R){R.window_size=2*R.w_size,de(R.head),R.max_lazy_match=i[R.level].max_lazy,R.good_match=i[R.level].good_length,R.nice_match=i[R.level].nice_length,R.max_chain_length=i[R.level].max_chain,R.strstart=0,R.block_start=0,R.lookahead=0,R.insert=0,R.match_length=R.prev_length=N-1,R.match_available=0,R.ins_h=0}(z.state),fe}function me(z,fe,R,j,S,P){if(!z)return m;var L=1;if(fe===y&&(fe=6),j<0?(L=0,j=-j):15<j&&(L=2,j-=16),S<1||w<S||R!==x||j<8||15<j||fe<0||9<fe||P<0||k<P)return D(z,m);j===8&&(j=9);var V=new Q;return(z.state=V).strm=z,V.wrap=L,V.gzhead=null,V.w_bits=j,V.w_size=1<<V.w_bits,V.w_mask=V.w_size-1,V.hash_bits=S+7,V.hash_size=1<<V.hash_bits,V.hash_mask=V.hash_size-1,V.hash_shift=~~((V.hash_bits+N-1)/N),V.window=new a.Buf8(2*V.w_size),V.head=new a.Buf16(V.hash_size),V.prev=new a.Buf16(V.w_size),V.lit_bufsize=1<<S+6,V.pending_buf_size=4*V.lit_bufsize,V.pending_buf=new a.Buf8(V.pending_buf_size),V.d_buf=1*V.lit_bufsize,V.l_buf=3*V.lit_bufsize,V.level=fe,V.strategy=P,V.method=R,Z(z)}i=[new ee(0,0,0,0,function(z,fe){var R=65535;for(R>z.pending_buf_size-5&&(R=z.pending_buf_size-5);;){if(z.lookahead<=1){if(ne(z),z.lookahead===0&&fe===h)return E;if(z.lookahead===0)break}z.strstart+=z.lookahead,z.lookahead=0;var j=z.block_start+R;if((z.strstart===0||z.strstart>=j)&&(z.lookahead=z.strstart-j,z.strstart=j,B(z,!1),z.strm.avail_out===0)||z.strstart-z.block_start>=z.w_size-K&&(B(z,!1),z.strm.avail_out===0))return E}return z.insert=0,fe===p?(B(z,!0),z.strm.avail_out===0?Y:$):(z.strstart>z.block_start&&(B(z,!1),z.strm.avail_out),E)}),new ee(4,4,8,4,O),new ee(4,5,16,8,O),new ee(4,6,32,32,O),new ee(4,4,16,16,I),new ee(8,16,32,32,I),new ee(8,16,128,128,I),new ee(8,32,128,256,I),new ee(32,128,258,1024,I),new ee(32,258,258,4096,I)],s.deflateInit=function(z,fe){return me(z,fe,x,15,8,0)},s.deflateInit2=me,s.deflateReset=Z,s.deflateResetKeep=q,s.deflateSetHeader=function(z,fe){return z&&z.state?z.state.wrap!==2?m:(z.state.gzhead=fe,f):m},s.deflate=function(z,fe){var R,j,S,P;if(!z||!z.state||5<fe||fe<0)return z?D(z,m):m;if(j=z.state,!z.output||!z.input&&z.avail_in!==0||j.status===666&&fe!==p)return D(z,z.avail_out===0?-5:m);if(j.strm=z,R=j.last_flush,j.last_flush=fe,j.status===T)if(j.wrap===2)z.adler=0,re(j,31),re(j,139),re(j,8),j.gzhead?(re(j,(j.gzhead.text?1:0)+(j.gzhead.hcrc?2:0)+(j.gzhead.extra?4:0)+(j.gzhead.name?8:0)+(j.gzhead.comment?16:0)),re(j,255&j.gzhead.time),re(j,j.gzhead.time>>8&255),re(j,j.gzhead.time>>16&255),re(j,j.gzhead.time>>24&255),re(j,j.level===9?2:2<=j.strategy||j.level<2?4:0),re(j,255&j.gzhead.os),j.gzhead.extra&&j.gzhead.extra.length&&(re(j,255&j.gzhead.extra.length),re(j,j.gzhead.extra.length>>8&255)),j.gzhead.hcrc&&(z.adler=u(z.adler,j.pending_buf,j.pending,0)),j.gzindex=0,j.status=69):(re(j,0),re(j,0),re(j,0),re(j,0),re(j,0),re(j,j.level===9?2:2<=j.strategy||j.level<2?4:0),re(j,3),j.status=F);else{var L=x+(j.w_bits-8<<4)<<8;L|=(2<=j.strategy||j.level<2?0:j.level<6?1:j.level===6?2:3)<<6,j.strstart!==0&&(L|=32),L+=31-L%31,j.status=F,ae(j,L),j.strstart!==0&&(ae(j,z.adler>>>16),ae(j,65535&z.adler)),z.adler=1}if(j.status===69)if(j.gzhead.extra){for(S=j.pending;j.gzindex<(65535&j.gzhead.extra.length)&&(j.pending!==j.pending_buf_size||(j.gzhead.hcrc&&j.pending>S&&(z.adler=u(z.adler,j.pending_buf,j.pending-S,S)),G(z),S=j.pending,j.pending!==j.pending_buf_size));)re(j,255&j.gzhead.extra[j.gzindex]),j.gzindex++;j.gzhead.hcrc&&j.pending>S&&(z.adler=u(z.adler,j.pending_buf,j.pending-S,S)),j.gzindex===j.gzhead.extra.length&&(j.gzindex=0,j.status=73)}else j.status=73;if(j.status===73)if(j.gzhead.name){S=j.pending;do{if(j.pending===j.pending_buf_size&&(j.gzhead.hcrc&&j.pending>S&&(z.adler=u(z.adler,j.pending_buf,j.pending-S,S)),G(z),S=j.pending,j.pending===j.pending_buf_size)){P=1;break}P=j.gzindex<j.gzhead.name.length?255&j.gzhead.name.charCodeAt(j.gzindex++):0,re(j,P)}while(P!==0);j.gzhead.hcrc&&j.pending>S&&(z.adler=u(z.adler,j.pending_buf,j.pending-S,S)),P===0&&(j.gzindex=0,j.status=91)}else j.status=91;if(j.status===91)if(j.gzhead.comment){S=j.pending;do{if(j.pending===j.pending_buf_size&&(j.gzhead.hcrc&&j.pending>S&&(z.adler=u(z.adler,j.pending_buf,j.pending-S,S)),G(z),S=j.pending,j.pending===j.pending_buf_size)){P=1;break}P=j.gzindex<j.gzhead.comment.length?255&j.gzhead.comment.charCodeAt(j.gzindex++):0,re(j,P)}while(P!==0);j.gzhead.hcrc&&j.pending>S&&(z.adler=u(z.adler,j.pending_buf,j.pending-S,S)),P===0&&(j.status=103)}else j.status=103;if(j.status===103&&(j.gzhead.hcrc?(j.pending+2>j.pending_buf_size&&G(z),j.pending+2<=j.pending_buf_size&&(re(j,255&z.adler),re(j,z.adler>>
vendor: 20,997 bytes, line 946
9468&255),z.adler=0,j.status=F)):j.status=F),j.pending!==0){if(G(z),z.avail_out===0)return j.last_flush=-1,f}else if(z.avail_in===0&&J(fe)<=J(R)&&fe!==p)return D(z,-5);if(j.status===666&&z.avail_in!==0)return D(z,-5);if(z.avail_in!==0||j.lookahead!==0||fe!==h&&j.status!==666){var V=j.strategy===2?function(U,oe){for(var ce;;){if(U.lookahead===0&&(ne(U),U.lookahead===0)){if(oe===h)return E;break}if(U.match_length=0,ce=l._tr_tally(U,0,U.window[U.strstart]),U.lookahead--,U.strstart++,ce&&(B(U,!1),U.strm.avail_out===0))return E}return U.insert=0,oe===p?(B(U,!0),U.strm.avail_out===0?Y:$):U.last_lit&&(B(U,!1),U.strm.avail_out===0)?E:H}(j,fe):j.strategy===3?function(U,oe){for(var ce,X,he,we,Te=U.window;;){if(U.lookahead<=W){if(ne(U),U.lookahead<=W&&oe===h)return E;if(U.lookahead===0)break}if(U.match_length=0,U.lookahead>=N&&0<U.strstart&&(X=Te[he=U.strstart-1])===Te[++he]&&X===Te[++he]&&X===Te[++he]){we=U.strstart+W;do;while(X===Te[++he]&&X===Te[++he]&&X===Te[++he]&&X===Te[++he]&&X===Te[++he]&&X===Te[++he]&&X===Te[++he]&&X===Te[++he]&&he<we);U.match_length=W-(we-he),U.match_length>U.lookahead&&(U.match_length=U.lookahead)}if(U.match_length>=N?(ce=l._tr_tally(U,1,U.match_length-N),U.lookahead-=U.match_length,U.strstart+=U.match_length,U.match_length=0):(ce=l._tr_tally(U,0,U.window[U.strstart]),U.lookahead--,U.strstart++),ce&&(B(U,!1),U.strm.avail_out===0))return E}return U.insert=0,oe===p?(B(U,!0),U.strm.avail_out===0?Y:$):U.last_lit&&(B(U,!1),U.strm.avail_out===0)?E:H}(j,fe):i[j.level].func(j,fe);if(V!==Y&&V!==$||(j.status=666),V===E||V===Y)return z.avail_out===0&&(j.last_flush=-1),f;if(V===H&&(fe===1?l._tr_align(j):fe!==5&&(l._tr_stored_block(j,0,0,!1),fe===3&&(de(j.head),j.lookahead===0&&(j.strstart=0,j.block_start=0,j.insert=0))),G(z),z.avail_out===0))return j.last_flush=-1,f}return fe!==p?f:j.wrap<=0?1:(j.wrap===2?(re(j,255&z.adler),re(j,z.adler>>8&255),re(j,z.adler>>16&255),re(j,z.adler>>24&255),re(j,255&z.total_in),re(j,z.total_in>>8&255),re(j,z.total_in>>16&255),re(j,z.total_in>>24&255)):(ae(j,z.adler>>>16),ae(j,65535&z.adler)),G(z),0<j.wrap&&(j.wrap=-j.wrap),j.pending!==0?f:1)},s.deflateEnd=function(z){var fe;return z&&z.state?(fe=z.state.status)!==T&&fe!==69&&fe!==73&&fe!==91&&fe!==103&&fe!==F&&fe!==666?D(z,m):(z.state=null,fe===F?D(z,-3):f):m},s.deflateSetDictionary=function(z,fe){var R,j,S,P,L,V,U,oe,ce=fe.length;if(!z||!z.state||(P=(R=z.state).wrap)===2||P===1&&R.status!==T||R.lookahead)return m;for(P===1&&(z.adler=c(z.adler,fe,ce,0)),R.wrap=0,ce>=R.w_size&&(P===0&&(de(R.head),R.strstart=0,R.block_start=0,R.insert=0),oe=new a.Buf8(R.w_size),a.arraySet(oe,fe,ce-R.w_size,R.w_size,0),fe=oe,ce=R.w_size),L=z.avail_in,V=z.next_in,U=z.input,z.avail_in=ce,z.next_in=0,z.input=fe,ne(R);R.lookahead>=N;){for(j=R.strstart,S=R.lookahead-(N-1);R.ins_h=(R.ins_h<<R.hash_shift^R.window[j+N-1])&R.hash_mask,R.prev[j&R.w_mask]=R.head[R.ins_h],R.head[R.ins_h]=j,j++,--S;);R.strstart=j,R.lookahead=N-1,ne(R)}return R.strstart+=R.lookahead,R.block_start=R.strstart,R.insert=R.lookahead,R.lookahead=0,R.match_length=R.prev_length=N-1,R.match_available=0,z.next_in=V,z.input=U,z.avail_in=L,R.wrap=P,f},s.deflateInfo="pako deflate (from Nodeca project)"},{"../utils/common":41,"./adler32":43,"./crc32":45,"./messages":51,"./trees":52}],47:[function(r,n,s){n.exports=function(){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}},{}],48:[function(r,n,s){n.exports=function(i,a){var l,c,u,d,h,p,f,m,y,k,g,x,w,b,v,A,C,_,N,W,K,T,F,E,H;l=i.state,c=i.next_in,E=i.input,u=c+(i.avail_in-5),d=i.next_out,H=i.output,h=d-(a-i.avail_out),p=d+(i.avail_out-257),f=l.dmax,m=l.wsize,y=l.whave,k=l.wnext,g=l.window,x=l.hold,w=l.bits,b=l.lencode,v=l.distcode,A=(1<<l.lenbits)-1,C=(1<<l.distbits)-1;e:do{w<15&&(x+=E[c++]<<w,w+=8,x+=E[c++]<<w,w+=8),_=b[x&A];t:for(;;){if(x>>>=N=_>>>24,w-=N,(N=_>>>16&255)===0)H[d++]=65535&_;else{if(!(16&N)){if(!(64&N)){_=b[(65535&_)+(x&(1<<N)-1)];continue t}if(32&N){l.mode=12;break e}i.msg="invalid literal/length code",l.mode=30;break e}W=65535&_,(N&=15)&&(w<N&&(x+=E[c++]<<w,w+=8),W+=x&(1<<N)-1,x>>>=N,w-=N),w<15&&(x+=E[c++]<<w,w+=8,x+=E[c++]<<w,w+=8),_=v[x&C];r:for(;;){if(x>>>=N=_>>>24,w-=N,!(16&(N=_>>>16&255))){if(!(64&N)){_=v[(65535&_)+(x&(1<<N)-1)];continue r}i.msg="invalid distance code",l.mode=30;break e}if(K=65535&_,w<(N&=15)&&(x+=E[c++]<<w,(w+=8)<N&&(x+=E[c++]<<w,w+=8)),f<(K+=x&(1<<N)-1)){i.msg="invalid distance too far back",l.mode=30;break e}if(x>>>=N,w-=N,(N=d-h)<K){if(y<(N=K-N)&&l.sane){i.msg="invalid distance too far back",l.mode=30;break e}if(F=g,(T=0)===k){if(T+=m-N,N<W){for(W-=N;H[d++]=g[T++],--N;);T=d-K,F=H}}else if(k<N){if(T+=m+k-N,(N-=k)<W){for(W-=N;H[d++]=g[T++],--N;);if(T=0,k<W){for(W-=N=k;H[d++]=g[T++],--N;);T=d-K,F=H}}}else if(T+=k-N,N<W){for(W-=N;H[d++]=g[T++],--N;);T=d-K,F=H}for(;2<W;)H[d++]=F[T++],H[d++]=F[T++],H[d++]=F[T++],W-=3;W&&(H[d++]=F[T++],1<W&&(H[d++]=F[T++]))}else{for(T=d-K;H[d++]=H[T++],H[d++]=H[T++],H[d++]=H[T++],2<(W-=3););W&&(H[d++]=H[T++],1<W&&(H[d++]=H[T++]))}break}}break}}while(c<u&&d<p);c-=W=w>>3,x&=(1<<(w-=W<<3))-1,i.next_in=c,i.next_out=d,i.avail_in=c<u?u-c+5:5-(c-u),i.avail_out=d<p?p-d+257:257-(d-p),l.hold=x,l.bits=w}},{}],49:[function(r,n,s){var i=r("../utils/common"),a=r("./adler32"),l=r("./crc32"),c=r("./inffast"),u=r("./inftrees"),d=1,h=2,p=0,f=-2,m=1,y=852,k=592;function g(T){return(T>>>24&255)+(T>>>8&65280)+((65280&T)<<8)+((255&T)<<24)}function x(){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 i.Buf16(320),this.work=new i.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function w(T){var F;return T&&T.state?(F=T.state,T.total_in=T.total_out=F.total=0,T.msg="",F.wrap&&(T.adler=1&F.wrap),F.mode=m,F.last=0,F.havedict=0,F.dmax=32768,F.head=null,F.hold=0,F.bits=0,F.lencode=F.lendyn=new i.Buf32(y),F.distcode=F.distdyn=new i.Buf32(k),F.sane=1,F.back=-1,p):f}function b(T){var F;return T&&T.state?((F=T.state).wsize=0,F.whave=0,F.wnext=0,w(T)):f}function v(T,F){var E,H;return T&&T.state?(H=T.state,F<0?(E=0,F=-F):(E=1+(F>>4),F<48&&(F&=15)),F&&(F<8||15<F)?f:(H.window!==null&&H.wbits!==F&&(H.window=null),H.wrap=E,H.wbits=F,b(T))):f}function A(T,F){var E,H;return T?(H=new x,(T.state=H).window=null,(E=v(T,F))!==p&&(T.state=null),E):f}var C,_,N=!0;function W(T){if(N){var F;for(C=new i.Buf32(512),_=new i.Buf32(32),F=0;F<144;)T.lens[F++]=8;for(;F<256;)T.lens[F++]=9;for(;F<280;)T.lens[F++]=7;for(;F<288;)T.lens[F++]=8;for(u(d,T.lens,0,288,C,0,T.work,{bits:9}),F=0;F<32;)T.lens[F++]=5;u(h,T.lens,0,32,_,0,T.work,{bits:5}),N=!1}T.lencode=C,T.lenbits=9,T.distcode=_,T.distbits=5}function K(T,F,E,H){var Y,$=T.state;return $.window===null&&($.wsize=1<<$.wbits,$.wnext=0,$.whave=0,$.window=new i.Buf8($.wsize)),H>=$.wsize?(i.arraySet($.window,F,E-$.wsize,$.wsize,0),$.wnext=0,$.whave=$.wsize):(H<(Y=$.wsize-$.wnext)&&(Y=H),i.arraySet($.window,F,E-H,Y,$.wnext),(H-=Y)?(i.arraySet($.window,F,E-H,H,0),$.wnext=H,$.whave=$.wsize):($.wnext+=Y,$.wnext===$.wsize&&($.wnext=0),$.whave<$.wsize&&($.whave+=Y))),0}s.inflateReset=b,s.inflateReset2=v,s.inflateResetKeep=w,s.inflateInit=function(T){return A(T,15)},s.inflateInit2=A,s.inflate=function(T,F){var E,H,Y,$,D,J,de,G,B,re,ae,ge,ne,O,I,ee,Q,q,Z,me,z,fe,R,j,S=0,P=new i.Buf8(4),L=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!T||!T.state||!T.output||!T.input&&T.avail_in!==0)return f;(E=T.state).mode===12&&(E.mode=13),D=T.next_out,Y=T.output,de=T.avail_out,$=T.next_in,H=T.input,J=T.avail_in,G=E.hold,B=E.bits,re=J,ae=de,fe=p;e:for(;;)switch(E.mode){case m:if(E.wrap===0){E.mode=13;break}for(;B<16;){if(J===0)break e;J--,G+=H[$++]<<B,B+=8}if(2&E.wrap&&G===35615){P[E.check=0]=255&G,P[1]=G>>>8&255,E.check=l(E.check,P,2,0),B=G=0,E.mode=2;break}if(E.flags=0,E.head&&(E.head.done=!1),!(1&E.wrap)||(((255&G)<<8)+(G>>8))%31){T.msg="incorrect header check",E.mode=30;break}if((15&G)!=8){T.msg="unknown compression method",E.mode=30;break}if(B-=4,z=8+(15&(G>>>=4)),E.wbits===0)E.wbits=z;else if(z>E.wbits){T.msg="invalid window size",E.mode=30;break}E.dmax=1<<z,T.adler=E.check=1,E.mode=512&G?10:12,B=G=0;break;case 2:for(;B<16;){if(J===0)break e;J--,G+=H[$++]<<B,B+=8}if(E.flags=G,(255&E.flags)!=8){T.msg="unknown compression method",E.mode=30;break}if(57344&E.flags){T.msg="unknown header flags set",E.mode=30;break}E.head&&(E.head.text=G>>8&1),512&E.flags&&(P[0]=255&G,P[1]=G>>>8&255,E.check=l(E.check,P,2,0)),B=G=0,E.mode=3;case 3:for(;B<32;){if(J===0)break e;J--,G+=H[$++]<<B,B+=8}E.head&&(E.head.time=G),512&E.flags&&(P[0]=255&G,P[1]=G>>>8&255,P[2]=G>>>16&255,P[3]=G>>>24&255,E.check=l(E.check,P,4,0)),B=G=0,E.mode=4;case 4:for(;B<16;){if(J===0)break e;J--,G+=H[$++]<<B,B+=8}E.head&&(E.head.xflags=255&G,E.head.os=G>>8),512&E.flags&&(P[0]=255&G,P[1]=G>>>8&255,E.check=l(E.check,P,2,0)),B=G=0,E.mode=5;case 5:if(1024&E.flags){for(;B<16;){if(J===0)break e;J--,G+=H[$++]<<B,B+=8}E.length=G,E.head&&(E.head.extra_len=G),512&E.flags&&(P[0]=255&G,P[1]=G>>>8&255,E.check=l(E.check,P,2,0)),B=G=0}else E.head&&(E.head.extra=null);E.mode=6;case 6:if(1024&E.flags&&(J<(ge=E.length)&&(ge=J),ge&&(E.head&&(z=E.head.extra_len-E.length,E.head.extra||(E.head.extra=new Array(E.head.extra_len)),i.arraySet(E.head.extra,H,$,ge,z)),512&E.flags&&(E.check=l(E.check,H,ge,$)),J-=ge,$+=ge,E.length-=ge),E.length))break e;E.length=0,E.mode=7;case 7:if(2048&E.flags){if(J===0)break e;for(ge=0;z=H[$+ge++],E.head&&z&&E.length<65536&&(E.head.name+=String.fromCharCode(z)),z&&ge<J;);if(512&E.flags&&(E.check=l(E.check,H,ge,$)),J-=ge,$+=ge,z)break e}else E.head&&(E.head.name=null);E.length=0,E.mode=8;case 8:if(4096&E.flags){if(J===0)break e;for(ge=0;z=H[$+ge++],E.head&&z&&E.length<65536&&(E.head.comment+=String.fromCharCode(z)),z&&ge<J;);if(512&E.flags&&(E.check=l(E.check,H,ge,$)),J-=ge,$+=ge,z)break e}else E.head&&(E.head.comment=null);E.mode=9;case 9:if(512&E.flags){for(;B<16;){if(J===0)break e;J--,G+=H[$++]<<B,B+=8}if(G!==(65535&E.check)){T.msg="header crc mismatch",E.mode=30;break}B=G=0}E.head&&(E.head.hcrc=E.flags>>9&1,E.head.done=!0),T.adler=E.check=0,E.mode=12;break;case 10:for(;B<32;){if(J===0)break e;J--,G+=H[$++]<<B,B+=8}T.adler=E.check=g(G),B=G=0,E.mode=11;case 11:if(E.havedict===0)return T.next_out=D,T.avail_out=de,T.next_in=$,T.avail_in=J,E.hold=G,E.bits=B,2;T.adler=E.check=1,E.mode=12;case 12:if(F===5||F===6)break e;case 13:if(E.last){G>>>=7&B,B-=7&B,E.mode=27;break}for(;B<3;){if(J===0)break e;J--,G+=H[$++]<<B,B+=8}switch(E.last=1&G,B-=1,3&(G>>>=1)){case 0:E.mode=14;break;case 1:if(W(E),E.mode=20,F!==6)break;G>>>=2,B-=2;break e;case 2:E.mode=17;break;case 3:T.msg="invalid block type",E.mode=30}G>>>=2,B-=2;break;case 14:for(G>>>=7&B,B-=7&B;B<32;){if(J===0)break e;J--,G+=H[$++]<<B,B+=8}if((65535&G)!=(G>>>16^65535)){T.msg="invalid stored block lengths",E.mode=30;break}if(E.length=65535&G,B=G=0,E.mode=15,F===6)break e;case 15:E.mode=16;case 16:if(ge=E.length){if(J<ge&&(ge=J),de<ge&&(ge=de),ge===0)break e;i.arraySet(Y,H,$,ge,D),J-=ge,$+=ge,de-=ge,D+=ge,E.length-=ge;break}E.mode=12;break;case 17:for(;B<14;){if(J===0)break e;J--,G+=H[$++]<<B,B+=8}if(E.nlen=257+(31&G),G>>>=5,B-=5,E.ndist=1+(31&G),G>>>=5,B-=5,E.ncode=4+(15&G),G>>>=4,B-=4,286<E.nlen||30<E.ndist){T.msg="too many length or distance symbols",E.mode=30;break}E.have=0,E.mode=18;case 18:for(;E.have<E.ncode;){for(;B<3;){if(J===0)break e;J--,G+=H[$++]<<B,B+=8}E.lens[L[E.have++]]=7&G,G>>>=3,B-=3}for(;E.have<19;)E.lens[L[E.have++]]=0;if(E.lencode=E.lendyn,E.lenbits=7,R={bits:E.lenbits},fe=u(0,E.lens,0,19,E.lencode,0,E.work,R),E.lenbits=R.bits,fe){T.msg="invalid code lengths set",E.mode=30;break}E.have=0,E.mode=19;case 19:for(;E.have<E.nlen+E.ndist;){for(;ee=(S=E.lencode[G&(1<<E.lenbits)-1])>>>16&255,Q=65535&S,!((I=S>>>24)<=B);){if(J===0)break e;J--,G+=H[$++]<<B,B+=8}if(Q<16)G>>>=I,B-=I,E.lens[E.have++]=Q;else{if(Q===16){for(j=I+2;B<j;){if(J===0)break e;J--,G+=H[$++]<<B,B+=8}if(G>>>=I,B-=I,E.have===0){T.msg="invalid bit length repeat",E.mode=30;break}z=E.lens[E.have-1],ge=3+(3&G),G>>>=2,B-=2}else if(Q===17){for(j=I+3;B<j;){if(J===0)break e;J--,G+=H[$++]<<B,B+=8}B-=I,z=0,ge=3+(7&(G>>>=I)),G>>>=3,B-=3}else{for(j=I+7;B<j;){if(J===0)break e;J--,G+=H[$++]<<B,B+=8}B-=I,z=0,ge=11+(127&(G>>>=I)),G>>>=7,B-=7}if(E.have+ge>E.nlen+E.ndist){T.msg="invalid bit length repeat",E.mode=30;break}for(;ge--;)E.lens[E.have++]=z}}if(E.mode===30)break;if(E.lens[256]===0){T.msg="invalid code -- missing end-of-block",E.mode=30;break}if(E.lenbits=9,R={bits:E.lenbits},fe=u(d,E.lens,0,E.nlen,E.lencode,0,E.work,R),E.lenbits=R.bits,fe){T.msg="invalid literal/lengths set",E.mode=30;break}if(E.distbits=6,E.distcode=E.distdyn,R={bits:E.distbits},fe=u(h,E.lens,E.nlen,E.ndist,E.distcode,0,E.work,R),E.distbits=R.bits,fe){T.msg="invalid distances set",E.mode=30;break}if(E.mode=20,F===6)break e;case 20:E.mode=21;case 21:if(6<=J&&258<=de){T.next_out=D,T.avail_out=de,T.next_in=$,T.avail_in=J,E.hold=G,E.bits=B,c(T,ae),D=T.next_out,Y=T.output,de=T.avail_out,$=T.next_in,H=T.input,J=T.avail_in,G=E.hold,B=E.bits,E.mode===12&&(E.back=-1);break}for(E.back=0;ee=(S=E.lencode[G&(1<<E.lenbits)-1])>>>16&255,Q=65535&S,!((I=S>>>24)<=B);){if(J===0)break e;J--,G+=H[$++]<<B,B+=8}if(ee&&!(240&ee)){for(q=I,Z=ee,me=Q;ee=(S=E.lencode[me+((G&(1<<q+Z)-1)>>q)])>>>16&255,Q=65535&S,!(q+(I=S>>>24)<=B);){if(J===0)break e;J--,G+=H[$++]<<B,B+=8}G>>>=q,B-=q,E.back+=q}if(G>>>=I,B-=I,E.back+=I,E.length=Q,ee===0){E.mode=26;break}if(32&ee){E.back=-1,E.mode=12;break}if(64&ee){T.msg="invalid literal/length code",E.mode=30;break}E.extra=15&ee,E.mode=22;case 22:if(E.extra){for(j=E.extra;B<j;){if(J===0)break e;J--,G+=H[$++]<<B,B+=8}E.length+=G&(1<<E.extra)-1,G>>>=E.extra,B-=E.extra,E.back+=E.extra}E.was=E.length,E.mode=23;case 23:for(;ee=(S=E.distcode[G&(1<<E.distbits)-1])>>>16&255,Q=65535&S,!((I=S>>>24)<=B);){if(J===0)break e;J--,G+=H[$++]<<B,B+=8}if(!(240&ee)){for(q=I,Z=ee,me=Q;ee=(S=E.distcode[me+((G&(1<<q+Z)-1)>>q)])>>>16&255,Q=65535&S,!(q+(I=S>>>24)<=B);){if(J===0)break e;J--,G+=H[$++]<<B,B+=8}G>>>=q,B-=q,E.back+=q}if(G>>>=I,B-=I,E.back+=I,64&ee){T.msg="invalid distance code",E.mode=30;break}E.offset=Q,E.extra=15&ee,E.mode=24;case 24:if(E.extra){for(j=E.extra;B<j;){if(J===0)break e;J--,G+=H[$++]<<B,B+=8}E.offset+=G&(1<<E.extra)-1,G>>>=E.extra,B-=E.extra,E.back+=E.extra}if(E.offset>E.dmax){T.msg="invalid distance too far back",E.mode=30;break}E.mode=25;case 25:if(de===0)break e;if(ge=ae-de,E.offset>ge){if((ge=E.offset-ge)>E.whave&&E.sane){T.msg="invalid distance too far back",E.mode=30;break}ne=ge>E.wnext?(ge-=E.wnext,E.wsize-ge):E.wnext-ge,ge>E.length&&(ge=E.length),O=E.window}else O=Y,ne=D-E.offset,ge=E.length;for(de<ge&&(ge=de),de-=ge,E.length-=ge;Y[D++]=O[ne++],--ge;);E.length===0&&(E.mode=21);break;case 26:if(de===0)break e;Y[D++]=E.length,de--,E.mode=21;break;case 27:if(E.wrap){for(;B<32;){if(J===0)break e;J--,G|=H[$++]<<B,B+=8}if(ae-=de,T.total_out+=ae,E.total+=ae,ae&&(T.adler=E.check=E.flags?l(E.check,Y,ae,D-ae):a(E.check,Y,ae,D-ae)),ae=de,(E.flags?G:g(G))!==E.check){T.msg="incorrect data check",E.mode=30;break}B=G=0}E.mode=28;case 28:if(E.wrap&&E.flags){for(;B<32;){if(J===0)break e;J--,G+=H[$++]<<B,B+=8}if(G!==(4294967295&E.total)){T.msg="incorrect length check",E.mode=30;break}B=G=0}E.mode=29;case 29:fe=1;break e;case 30:fe=-3;break e;case 31:return-4;case 32:default:return f}return T.next_out=D,T.avail_out=de,T.next_in=$,T.avail_in=J,E.hold=G,E.bits=B,(E.wsize||ae!==T.avail_out&&E.mode<30&&(E.mode<27||F!==4))&&K(T,T.output,T.next_out,ae-T.avail_out)?(E.mode=31,-4):(re-=T.avail_in,ae-=T.avail_out,T.total_in+=re,T.total_out+=ae,E.total+=ae,E.wrap&&ae&&(T.adler=E.check=E.flags?l(E.check,Y,ae,T.next_out-ae):a(E.check,Y,ae,T.next_out-ae)),T.data_type=E.bits+(E.last?64:0)+(E.mode===12?128:0)+(E.mode===20||E.mode===15?256:0),(re==0&&ae===0||F===4)&&fe===p&&(fe=-5),fe)},s.inflateEnd=function(T){if(!T||!T.state)return f;var F=T.state;return F.window&&(F.window=null),T.state=null,p},s.inflateGetHeader=function(T,F){var E;return T&&T.state&&2&(E=T.state).wrap?((E.head=F).done=!1,p):f},s.inflateSetDictionary=function(T,F){var E,H=F.length;return T&&T.state?(E=T.state).wrap!==0&&E.mode!==11?f:E.mode===11&&a(1,F,H,0)!==E.check?-3:K(T,F,H,H)?(E.mode=31,-4):(E.havedict=1,p):f},s.inflateInfo="pako inflate (from Nodeca project)"},{"../utils/common":41,"./adler32":43,"./crc32":45,"./inffast":48,"./inftrees":50}],50:[function(r,n,s){var i=r("../utils/common"),a=[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],l=[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],c=[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],u=[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];n.exports=function(d,h,p,f,m,y,k,g){var x,w,b,v,A,C,_,N,W,K=g.bits,T=0,F=0,E=0,H=0,Y=0,$=0,D=0,J=0,de=0,G=0,B=null,re=0,ae=new i.Buf16(16),ge=new i.Buf16(16),ne=null,O=0;for(T=0;T<=15;T++)ae[T]=0;for(F=0;F<f;F++)ae[h[p+F]]++;for(Y=K,H=15;1<=H&&ae[H]===0;H--);if(H<Y&&(Y=H),H===0)return m[y++]=20971520,m[y++]=20971520,g.bits=1,0;for(E=1;E<H&&ae[E]===0;E++);for(Y<E&&(Y=E),T=J=1;T<=15;T++)if(J<<=1,(J-=ae[T])<0)return-1;if(0<J&&(d===0||H!==1))return-1;for(ge[1]=0,T=1;T<15;T++)ge[T+1]=ge[T]+ae[T];for(F=0;F<f;F++)h[p+F]!==0&&(k[ge[h[p+F]]++]=F);if(C=d===0?(B=ne=k,19):d===1?(B=a,re-=257,ne=l,O-=257,256):(B=c,ne=u,-1),T=E,A=y,D=F=G=0,b=-1,v=(de=1<<($=Y))-1,d===1&&852<de||d===2&&592<de)return 1;for(;;){for(_=T-D,W=k[F]<C?(N=0,k[F]):k[F]>C?(N=ne[O+k[F]],B[re+k[F]]):(N=96,0),x=1<<T-D,E=w=1<<$;m[A+(G>>D)+(w-=x)]=_<<24|N<<16|W|0,w!==0;);for(x=1<<T-1;G&x;)x>>=1;if(x!==0?(G&=x-1,G+=x):G=0,F++,--ae[T]==0){if(T===H)break;T=h[p+k[F]]}if(Y<T&&(G&v)!==b){for(D===0&&(D=Y),A+=E,J=1<<($=T-D);$+D<H&&!((J-=ae[$+D])<=0);)$++,J<<=1;if(de+=1<<$,d===1&&852<de||d===2&&592<de)return 1;m[b=G&v]=Y<<24|$<<16|A-y|0}}return G!==0&&(m[A+G]=T-D<<24|64<<16|0),g.bits=Y,0}},{"../utils/common":41}],51:[function(r,n,s){n.exports={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"}},{}],52:[function(r,n,s){var i=r("../utils/common"),a=0,l=1;function c(S){for(var P=S.length;0<=--P;)S[P]=0}var u=0,d=29,h=256,p=h+1+d,f=30,m=19,y=2*p+1,k=15,g=16,x=7,w=256,b=16,v=17,A=18,C=[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,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],N=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],W=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],K=new Array(2*(p+2));c(K);var T=new Array(2*f);c(T);var F=new Array(512);c(F);var E=new Array(256);c(E);var H=new Array(d);c(H);var Y,$,D,J=new Array(f);function de(S,P,L,V,U){this.static_tree=S,this.extra_bits=P,this.extra_base=L,this.elems=V,this.max_length=U,this.has_stree=S&&S.length}function G(S,P){this.dyn_tree=S,this.max_code=0,this.stat_desc=P}function B(S){return S<256?F[S]:F[256+(S>>>7)]}function re(S,P){S.pending_buf[S.pending++]=255&P,S.pending_buf[S.pending++]=P>>>8&255}function ae(S,P,L){S.bi_valid>g-L?(S.bi_buf|=P<<S.bi_valid&65535,re(S,S.bi_buf),S.bi_buf=P>>g-S.bi_valid,S.bi_valid+=L-g):(S.bi_buf|=P<<S.bi_valid&65535,S.bi_valid+=L)}function ge(S,P,L){ae(S,L[2*P],L[2*P+1])}function ne(S,P){for(var L=0;L|=1&S,S>>>=1,L<<=1,0<--P;);return L>>>1}function O(S,P,L){var V,U,oe=new Array(k+1),ce=0;for(V=1;V<=k;V++)oe[V]=ce=ce+L[V-1]<<1;for(U=0;U<=P;U++){var X=S[2*U+1];X!==0&&(S[2*U]=ne(oe[X]++,X))}}function I(S){var P;for(P=0;P<p;P++)S.dyn_ltree[2*P]=0;for(P=0;P<f;P++)S.dyn_dtree[2*P]=0;for(P=0;P<m;P++)S.bl_tree[2*P]=0;S.dyn_ltree[2*w]=1,S.opt_len=S.static_len=0,S.last_lit=S.matches=0}function ee(S){8<S.bi_valid?re(S,S.bi_buf):0<S.bi_valid&&(S.pending_buf[S.pending++]=S.bi_buf),S.bi_buf=0,S.bi_valid=0}function Q(S,P,L,V){var U=2*P,oe=2*L;return S[U]<S[oe]||S[U]===S[oe]&&V[P]<=V[L]}function q(S,P,L){for(var V=S.heap[L],U=L<<1;U<=S.heap_len&&(U<S.heap_len&&Q(P,S.heap[U+1],S.heap[U],S.depth)&&U++,!Q(P,V,S.heap[U],S.depth));)S.heap[L]=S.heap[U],L=U,U<<=1;S.heap[L]=V}function Z(S,P,L){var V,U,oe,ce,X=0;if(S.last_lit!==0)for(;V=S.pending_buf[S.d_buf+2*X]<<8|S.pending_buf[S.d_buf+2*X+1],U=S.pending_buf[S.l_buf+X],X++,V===0?ge(S,U,P):(ge(S,(oe=E[U])+h+1,P),(ce=C[oe])!==0&&ae(S,U-=H[oe],ce),ge(S,oe=B(--V),L),(ce=_[oe])!==0&&ae(S,V-=J[oe],ce)),X<S.last_lit;);ge(S,w,P)}function me(S,P){var L,V,U,oe=P.dyn_tree,ce=P.stat_desc.static_tree,X=P.stat_desc.has_stree,he=P.stat_desc.elems,we=-1;for(S.heap_len=0,S.heap_max=y,L=0;L<he;L++)oe[2*L]!==0?(S.heap[++S.heap_len]=we=L,S.depth[L]=0):oe[2*L+1]=0;for(;S.heap_len<2;)oe[2*(U=S.heap[++S.heap_len]=we<2?++we:0)]=1,S.depth[U]=0,S.opt_len--,X&&
vendor: 4,208 bytes, line 946
946(S.static_len-=ce[2*U+1]);for(P.max_code=we,L=S.heap_len>>1;1<=L;L--)q(S,oe,L);for(U=he;L=S.heap[1],S.heap[1]=S.heap[S.heap_len--],q(S,oe,1),V=S.heap[1],S.heap[--S.heap_max]=L,S.heap[--S.heap_max]=V,oe[2*U]=oe[2*L]+oe[2*V],S.depth[U]=(S.depth[L]>=S.depth[V]?S.depth[L]:S.depth[V])+1,oe[2*L+1]=oe[2*V+1]=U,S.heap[1]=U++,q(S,oe,1),2<=S.heap_len;);S.heap[--S.heap_max]=S.heap[1],function(Te,Ye){var bt,Et,kn,gt,Hr,Cs,wr=Ye.dyn_tree,Es=Ye.max_code,Un=Ye.stat_desc.static_tree,Qs=Ye.stat_desc.has_stree,nl=Ye.stat_desc.extra_bits,sl=Ye.stat_desc.extra_base,ts=Ye.stat_desc.max_length,Na=0;for(gt=0;gt<=k;gt++)Te.bl_count[gt]=0;for(wr[2*Te.heap[Te.heap_max]+1]=0,bt=Te.heap_max+1;bt<y;bt++)ts<(gt=wr[2*wr[2*(Et=Te.heap[bt])+1]+1]+1)&&(gt=ts,Na++),wr[2*Et+1]=gt,Es<Et||(Te.bl_count[gt]++,Hr=0,sl<=Et&&(Hr=nl[Et-sl]),Cs=wr[2*Et],Te.opt_len+=Cs*(gt+Hr),Qs&&(Te.static_len+=Cs*(Un[2*Et+1]+Hr)));if(Na!==0){do{for(gt=ts-1;Te.bl_count[gt]===0;)gt--;Te.bl_count[gt]--,Te.bl_count[gt+1]+=2,Te.bl_count[ts]--,Na-=2}while(0<Na);for(gt=ts;gt!==0;gt--)for(Et=Te.bl_count[gt];Et!==0;)Es<(kn=Te.heap[--bt])||(wr[2*kn+1]!==gt&&(Te.opt_len+=(gt-wr[2*kn+1])*wr[2*kn],wr[2*kn+1]=gt),Et--)}}(S,P),O(oe,we,S.bl_count)}function z(S,P,L){var V,U,oe=-1,ce=P[1],X=0,he=7,we=4;for(ce===0&&(he=138,we=3),P[2*(L+1)+1]=65535,V=0;V<=L;V++)U=ce,ce=P[2*(V+1)+1],++X<he&&U===ce||(X<we?S.bl_tree[2*U]+=X:U!==0?(U!==oe&&S.bl_tree[2*U]++,S.bl_tree[2*b]++):X<=10?S.bl_tree[2*v]++:S.bl_tree[2*A]++,oe=U,we=(X=0)===ce?(he=138,3):U===ce?(he=6,3):(he=7,4))}function fe(S,P,L){var V,U,oe=-1,ce=P[1],X=0,he=7,we=4;for(ce===0&&(he=138,we=3),V=0;V<=L;V++)if(U=ce,ce=P[2*(V+1)+1],!(++X<he&&U===ce)){if(X<we)for(;ge(S,U,S.bl_tree),--X!=0;);else U!==0?(U!==oe&&(ge(S,U,S.bl_tree),X--),ge(S,b,S.bl_tree),ae(S,X-3,2)):X<=10?(ge(S,v,S.bl_tree),ae(S,X-3,3)):(ge(S,A,S.bl_tree),ae(S,X-11,7));oe=U,we=(X=0)===ce?(he=138,3):U===ce?(he=6,3):(he=7,4)}}c(J);var R=!1;function j(S,P,L,V){ae(S,(u<<1)+(V?1:0),3),function(U,oe,ce,X){ee(U),re(U,ce),re(U,~ce),i.arraySet(U.pending_buf,U.window,oe,ce,U.pending),U.pending+=ce}(S,P,L)}s._tr_init=function(S){R||(function(){var P,L,V,U,oe,ce=new Array(k+1);for(U=V=0;U<d-1;U++)for(H[U]=V,P=0;P<1<<C[U];P++)E[V++]=U;for(E[V-1]=U,U=oe=0;U<16;U++)for(J[U]=oe,P=0;P<1<<_[U];P++)F[oe++]=U;for(oe>>=7;U<f;U++)for(J[U]=oe<<7,P=0;P<1<<_[U]-7;P++)F[256+oe++]=U;for(L=0;L<=k;L++)ce[L]=0;for(P=0;P<=143;)K[2*P+1]=8,P++,ce[8]++;for(;P<=255;)K[2*P+1]=9,P++,ce[9]++;for(;P<=279;)K[2*P+1]=7,P++,ce[7]++;for(;P<=287;)K[2*P+1]=8,P++,ce[8]++;for(O(K,p+1,ce),P=0;P<f;P++)T[2*P+1]=5,T[2*P]=ne(P,5);Y=new de(K,C,h+1,p,k),$=new de(T,_,0,f,k),D=new de(new Array(0),N,0,m,x)}(),R=!0),S.l_desc=new G(S.dyn_ltree,Y),S.d_desc=new G(S.dyn_dtree,$),S.bl_desc=new G(S.bl_tree,D),S.bi_buf=0,S.bi_valid=0,I(S)},s._tr_stored_block=j,s._tr_flush_block=function(S,P,L,V){var U,oe,ce=0;0<S.level?(S.strm.data_type===2&&(S.strm.data_type=function(X){var he,we=4093624447;for(he=0;he<=31;he++,we>>>=1)if(1&we&&X.dyn_ltree[2*he]!==0)return a;if(X.dyn_ltree[18]!==0||X.dyn_ltree[20]!==0||X.dyn_ltree[26]!==0)return l;for(he=32;he<h;he++)if(X.dyn_ltree[2*he]!==0)return l;return a}(S)),me(S,S.l_desc),me(S,S.d_desc),ce=function(X){var he;for(z(X,X.dyn_ltree,X.l_desc.max_code),z(X,X.dyn_dtree,X.d_desc.max_code),me(X,X.bl_desc),he=m-1;3<=he&&X.bl_tree[2*W[he]+1]===0;he--);return X.opt_len+=3*(he+1)+5+5+4,he}(S),U=S.opt_len+3+7>>>3,(oe=S.static_len+3+7>>>3)<=U&&(U=oe)):U=oe=L+5,L+4<=U&&P!==-1?j(S,P,L,V):S.strategy===4||oe===U?(ae(S,2+(V?1:0),3),Z(S,K,T)):(ae(S,4+(V?1:0),3),function(X,he,we,Te){var Ye;for(ae(X,he-257,5),ae(X,we-1,5),ae(X,Te-4,4),Ye=0;Ye<Te;Ye++)ae(X,X.bl_tree[2*W[Ye]+1],3);fe(X,X.dyn_ltree,he-1),fe(X,X.dyn_dtree,we-1)}(S,S.l_desc.max_code+1,S.d_desc.max_code+1,ce+1),Z(S,S.dyn_ltree,S.dyn_dtree)),I(S),V&&ee(S)},s._tr_tally=function(S,P,L){return S.pending_buf[S.d_buf+2*S.last_lit]=P>>>8&255,S.pending_buf[S.d_buf+2*S.last_lit+1]=255&P,S.pending_buf[S.l_buf+S.last_lit]=255&L,S.last_lit++,P===0?S.dyn_ltree[2*L]++:(S.matches++,P--,S.dyn_ltree[2*(E[L]+h+1)]++,S.dyn_dtree[2*B(P)]++),S.last_lit===S.lit_bufsize-1},s._tr_align=function(S){ae(S,2,3),ge(S,w,K),function(P){P.bi_valid===16?(re(P,P.bi_buf),P.bi_buf=0,P.bi_valid=0):8<=P.bi_valid&&(P.pen
946ding_buf[P.pending++]=255&P.bi_buf,P.bi_buf>>=8,P.bi_valid-=8)}(S)}},{"../utils/common":41}],53:[function(r,n,s){n.exports=function(){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}},{}],54:[function(r,n,s){(function(i){(function(a,l){if(!a.setImmediate){var c,u,d,h,p=1,f={},m=!1,y=a.document,k=Object.getPrototypeOf&&Object.getPrototypeOf(a);k=k&&k.setTimeout?k:a,c={}.toString.call(a.process)==="[object process]"?function(b){nt.nextTick(function(){x(b)})}:function(){if(a.postMessage&&!a.importScripts){var b=!0,v=a.onmessage;return a.onmessage=function(){b=!1},a.postMessage("","*"),a.onmessage=v,b}}()?(h="setImmediate$"+Math.random()+"$",a.addEventListener?a.addEventListener("message",w,!1):a.attachEvent("onmessage",w),function(b){a.postMessage(h+b,"*")}):a.MessageChannel?((d=new MessageChannel).port1.onmessage=function(b){x(b.data)},function(b){d.port2.postMessage(b)}):y&&"onreadystatechange"in y.createElement("script")?(u=y.documentElement,function(b){var v=y.createElement("script");v.onreadystatechange=function(){x(b),v.onreadystatechange=null,u.removeChild(v),v=null},u.appendChild(v)}):function(b){setTimeout(x,0,b)},k.setImmediate=function(b){typeof b!="function"&&(b=new Function(""+b));for(var v=new Array(arguments.length-1),A=0;A<v.length;A++)v[A]=arguments[A+1];var C={callback:b,args:v};return f[p]=C,c(p),p++},k.clearImmediate=g}function g(b){delete f[b]}function x(b){if(m)setTimeout(x,0,b);else{var v=f[b];if(v){m=!0;try{(function(A){var C=A.callback,_=A.args;switch(_.length){case 0:C();break;case 1:C(_[0]);break;case 2:C(_[0],_[1]);break;case 3:C(_[0],_[1],_[2]);break;default:C.apply(l,_)}})(v)}finally{g(b),m=!1}}}}function w(b){b.source===a&&typeof b.data=="string"&&b.data.indexOf(h)===0&&x(+b.data.slice(h.length))}})(typeof self>"u"?i===void 0?this:i:self)}).call(this,typeof vi<"u"?vi:typeof self<"u"?self:typeof window<"u"?window:{})},{}]},{},[10])(10)})}(D1)),D1.exports}var jye=vye();const Sye=PM(jye);var ch={exports:{}},F1,nA;function Nye(){if(nA)return F1;nA=1;var t={"&":"&amp;",'"':"&quot;","'":"&apos;","<":"&lt;",">":"&gt;"};function e(r){return r&&r.replace?r.replace(/([&"<>'])/g,function(n,s){return t[s]}):r}return F1=e,F1}var sA;function Cye(){if(sA)return ch.exports;sA=1;var t=Nye(),e=zN().Stream,r="    ";function n(u,d){typeof d!="object"&&(d={indent:d});var h=d.stream?new e:null,p="",f=!1,m=d.indent?d.indent===!0?r:d.indent:"",y=!0;function k(v){y?nt.nextTick(v):v()}function g(v,A){if(A!==void 0&&(p+=A),v&&!f&&(h=h||new e,f=!0),v&&f){var C=p;k(function(){h.emit("data",C)}),p=""}}function x(v,A){l(g,a(v,m,m?1:0),A)}function w(){if(h){var v=p;k(function(){h.emit("data",v),h.emit("end"),h.readable=!1,h.emit("close")})}}function b(v){var A=v.encoding||"UTF-8",C={version:"1.0",encoding:A};v.standalone&&(C.standalone=v.standalone),x({"?xml":{_attr:C}}),p=p.replace("/>","?>")}return k(function(){y=!1}),d.declaration&&b(d.declaration),u&&u.forEach?u.forEach(function(v,A){var C;A+1===u.length&&(C=w),x(v,C)}):x(u,w),h?(h.readable=!0,h):p}function s(){var u=Array.prototype.slice.call(arguments),d={_elem:a(u)};return d.push=function(h){if(!this.append)throw new Error("not assigned to a parent!");var p=this,f=this._elem.indent;l(this.append,a(h,f,this._elem.icount+(f?1:0)),function(){p.append(!0)})},d.close=function(h){h!==void 0&&this.push(h),this.end&&this.end()},d}function i(u,d){return new Array(d||0).join(u||"")}function a(u,d,h){h=h||0;var p=i(d,h),f,m=u,y=!1;if(typeof u=="object"){var k=Object.keys(u);if(f=k[0],m=u[f],m&&m._elem)return m._elem.name=f,m._elem.icount=h,m._elem.indent=d,m._elem.indents=p,m._elem.interrupt=m,m._elem}var g=[],x=[],w;function b(v){var A=Object.keys(v);A.forEach(function(C){g.push(c(C,v[C]))})}switch(typeof m){case"object":if(m===null)break;m._attr&&b(m._attr),m._cdata&&x.push(("<![CDATA["+m._cdata).replace(/\]\]>/g,"]]]]><![CDATA[>")+"]]>"),m.forEach&&(w=!1,x.push(""),m.forEach(function(v){if(typeof v=="object"){var A=Object.keys(v)[0];A=="_attr"?b(v._attr):x.push(a(v,d,h+1))}else x.pop(),w=!0,x.push(t(v))}),w||x.push(""));break;default:x.push(t(m))}return{name:f,interrupt:y,attributes:g,content:x,icount:h,indents:p,indent:d}}function l(u,d,h){if(typeof d!="object")return u(!1,d);var p=d.interrupt?1:d.content.length;function f(){for(;d.content.length;){var y=d.content.shift();if(y!==void 0){if(m(y))return;l(u,y)}}u(!1,(p>1?d.indents:"")+(d.name?"</"+d.name+">":"")+(d.indent&&!h?`
947`:"")),h&&h()}function m(y){return y.interrupt?(y.interrupt.append=u,y.interrupt.end=f,y.interrupt=!1,u(!0),!0):!1}if(u(!1,d.indents+(d.name?"<"+d.name:"")+(d.attributes.length?" "+d.attributes.join(" "):"")+(p?d.name?">":"":d.name?"/>":"")+(d.indent&&p>1?`
948`:"")),!p)return u(!1,d.indent?`
949`:"");m(d)||f()}
949function c(u,d){return u+'="'+t(d)+'"'}return ch.exports=n,ch.exports.element=ch.exports.Element=s,ch.exports}var Eye=Cye();const Ht=PM(Eye),uh=0,B1=32,Tye=32,Aye=(t,e)=>{const r=e.replace(/-/g,"");if(r.length!==Tye)throw new Error(`Error: Cannot extract GUID from font filename: ${e}`);const s=r.replace(/(..)/g,"$1 ").trim().split(" ").map(c=>parseInt(c,16));s.reverse();const a=t.slice(uh,B1).map((c,u)=>c^s[u%s.length]),l=new Uint8Array(uh+a.length+Math.max(0,t.length-B1));return l.set(t.slice(0,uh)),l.set(a,uh),l.set(t.slice(B1),uh+a.length),l};class zye{format(e,r={stack:[]}){const n=e.prepForXml(r);if(n)return n;throw Error("XMLComponent did not format correctly")}}class Pye{replace(e,r,n){let s=e;return r.forEach((i,a)=>{s=s.replace(new RegExp(`{${i.fileName}}`,"g"),(n+a).toString())}),s}getMediaData(e,r){return r.Array.filter(n=>e.search(`{${n.fileName}}`)>0)}}class _ye{replace(e,r){let n=e;for(const s of r)n=n.replace(new RegExp(`{${s.reference}-${s.instance}}`,"g"),s.numId.toString());return n}}class Iye{constructor(){be(this,"formatter"),be(this,"imageReplacer"),be(this,"numberingReplacer"),this.formatter=new zye,this.imageReplacer=new Pye,this.numberingReplacer=new _ye}compile(e,r,n=[]){const s=new Sye,i=this.xmlifyFile(e,r),a=new Map(Object.entries(i));for(const[,l]of a)if(Array.isArray(l))for(const c of l)s.file(c.path,c.data);else s.file(l.path,l.data);for(const l of n)s.file(l.path,l.data);for(const l of e.Media.Array)l.type!=="svg"?s.file(`word/media/${l.fileName}`,l.data):(s.file(`word/media/${l.fileName}`,l.data),s.file(`word/media/${l.fallback.fileName}`,l.fallback.data));for(const{data:l,name:c,fontKey:u}of e.FontTable.fontOptionsWithKey){const[d]=c.split(".");s.file(`word/fonts/${d}.odttf`,Aye(l,u))}return s}xmlifyFile(e,r){const n=e.Document.Relationships.RelationshipCount+1,s=Ht(this.formatter.format(e.Document.View,{viewWrapper:e.Document,file:e,stack:[]}),{indent:r,declaration:{standalone:"yes",encoding:"UTF-8"}}),i=e.Comments.Relationships.RelationshipCount+1,a=Ht(this.formatter.format(e.Comments,{viewWrapper:{View:e.Comments,Relationships:e.Comments.Relationships},file:e,stack:[]}),{indent:r,declaration:{standalone:"yes",encoding:"UTF-8"}}),l=this.imageReplacer.getMediaData(s,e.Media),c=this.imageReplacer.getMediaData(a,e.Media);return{Relationships:{data:(l.forEach((u,d)=>{e.Document.Relationships.createRelationship(n+d,"http://schemas.openxmlformats.org/officeDocument/2006/relationships/image",`media/${u.fileName}`)}),e.Document.Relationships.createRelationship(e.Document.Relationships.RelationshipCount+1,"http://schemas.openxmlformats.org/officeDocument/2006/relationships/fontTable","fontTable.xml"),Ht(this.formatter.format(e.Document.Relationships,{viewWrapper:e.Document,file:e,stack:[]}),{indent:r,declaration:{encoding:"UTF-8"}})),path:"word/_rels/document.xml.rels"},Document:{data:(()=>{const u=this.imageReplacer.replace(s,l,n);return this.numberingReplacer.replace(u,e.Numbering.ConcreteNumbering)})(),path:"word/document.xml"},Styles:{data:(()=>{const u=Ht(this.formatter.format(e.Styles,{viewWrapper:e.Document,file:e,stack:[]}),{indent:r,declaration:{standalone:"yes",encoding:"UTF-8"}});return this.numberingReplacer.replace(u,e.Numbering.ConcreteNumbering)})(),path:"word/styles.xml"},Properties:{data:Ht(this.formatter.format(e.CoreProperties,{viewWrapper:e.Document,file:e,stack:[]}),{indent:r,declaration:{standalone:"yes",encoding:"UTF-8"}}),path:"docProps/core.xml"},Numbering:{data:Ht(this.formatter.format(e.Numbering,{viewWrapper:e.Document,file:e,stack:[]}),{indent:r,declaration:{standalone:"yes",encoding:"UTF-8"}}),path:"word/numbering.xml"},FileRelationships:{data:Ht(this.formatter.format(e.FileRelationships,{viewWrapper:e.Document,file:e,stack:[]}),{indent:r,declaration:{encoding:"UTF-8"}}),path:"_rels/.rels"},HeaderRelationships:e.Headers.map((u,d)=>{const h=Ht(this.formatter.format(u.View,{viewWrapper:u,file:e,stack:[]}),{indent:r,declaration:{encoding:"UTF-8"}});return this.imageReplacer.getMediaData(h,e.Media).forEach((f,m)=>{u.Relationships.createRelationship(m,"http://schemas.openxmlformats.org/officeDocument/2006/relationships/image",`media/${f.fileName}`)}),{data:Ht(this.formatter.format(u.Relationships,{viewWrapper:u,file:e,stack:[]}),{indent:r,declaration:{encoding:"UTF-8"}}),path:`word/_rels/header${d+1}.xml.rels`}}),FooterRelationships:e.Footers.map((u,d)=>{const h=Ht(this.formatter.format(u.View,{viewWrapper:u,file:e,stack:[]}),{indent:r,declaration:{encoding:"UTF-8"}});
949return this.imageReplacer.getMediaData(h,e.Media).forEach((f,m)=>{u.Relationships.createRelationship(m,"http://schemas.openxmlformats.org/officeDocument/2006/relationships/image",`media/${f.fileName}`)}),{data:Ht(this.formatter.format(u.Relationships,{viewWrapper:u,file:e,stack:[]}),{indent:r,declaration:{encoding:"UTF-8"}}),path:`word/_rels/footer${d+1}.xml.rels`}}),Headers:e.Headers.map((u,d)=>{const h=Ht(this.formatter.format(u.View,{viewWrapper:u,file:e,stack:[]}),{indent:r,declaration:{encoding:"UTF-8"}}),p=this.imageReplacer.getMediaData(h,e.Media),f=this.imageReplacer.replace(h,p,0);return{data:this.numberingReplacer.replace(f,e.Numbering.ConcreteNumbering),path:`word/header${d+1}.xml`}}),Footers:e.Footers.map((u,d)=>{const h=Ht(this.formatter.format(u.View,{viewWrapper:u,file:e,stack:[]}),{indent:r,declaration:{encoding:"UTF-8"}}),p=this.imageReplacer.getMediaData(h,e.Media),f=this.imageReplacer.replace(h,p,0);return{data:this.numberingReplacer.replace(f,e.Numbering.ConcreteNumbering),path:`word/footer${d+1}.xml`}}),ContentTypes:{data:Ht(this.formatter.format(e.ContentTypes,{viewWrapper:e.Document,file:e,stack:[]}),{indent:r,declaration:{encoding:"UTF-8"}}),path:"[Content_Types].xml"},CustomProperties:{data:Ht(this.formatter.format(e.CustomProperties,{viewWrapper:e.Document,file:e,stack:[]}),{indent:r,declaration:{standalone:"yes",encoding:"UTF-8"}}),path:"docProps/custom.xml"},AppProperties:{data:Ht(this.formatter.format(e.AppProperties,{viewWrapper:e.Document,file:e,stack:[]}),{indent:r,declaration:{standalone:"yes",encoding:"UTF-8"}}),path:"docProps/app.xml"},FootNotes:{data:Ht(this.formatter.format(e.FootNotes.View,{viewWrapper:e.FootNotes,file:e,stack:[]}),{indent:r,declaration:{encoding:"UTF-8"}}),path:"word/footnotes.xml"},FootNotesRelationships:{data:Ht(this.formatter.format(e.FootNotes.Relationships,{viewWrapper:e.FootNotes,file:e,stack:[]}),{indent:r,declaration:{encoding:"UTF-8"}}),path:"word/_rels/footnotes.xml.rels"},Settings:{data:Ht(this.formatter.format(e.Settings,{viewWrapper:e.Document,file:e,stack:[]}),{indent:r,declaration:{standalone:"yes",encoding:"UTF-8"}}),path:"word/settings.xml"},Comments:{data:(()=>{const u=this.imageReplacer.replace(a,c,i);return this.numberingReplacer.replace(u,e.Numbering.ConcreteNumbering)})(),path:"word/comments.xml"},CommentsRelationships:{data:(c.forEach((u,d)=>{e.Comments.Relationships.createRelationship(i+d,"http://schemas.openxmlformats.org/officeDocument/2006/relationships/image",`media/${u.fileName}`)}),Ht(this.formatter.format(e.Comments.Relationships,{viewWrapper:{View:e.Comments,Relationships:e.Comments.Relationships},file:e,stack:[]}),{indent:r,declaration:{encoding:"UTF-8"}})),path:"word/_rels/comments.xml.rels"},FontTable:{data:Ht(this.formatter.format(e.FontTable.View,{viewWrapper:e.Document,file:e,stack:[]}),{indent:r,declaration:{standalone:"yes",encoding:"UTF-8"}}),path:"word/fontTable.xml"},FontTableRelationships:{data:Ht(this.formatter.format(e.FontTable.Relationships,{viewWrapper:e.Document,file:e,stack:[]}),{indent:r,declaration:{encoding:"UTF-8"}}),path:"word/_rels/fontTable.xml.rels"}}}}const Oye={WITH_2_BLANKS:"  "},iA=t=>t===!0?Oye.WITH_2_BLANKS:t===!1?void 0:t,fD=class qc{static pack(e,r,n){return cfe(this,arguments,function*(s,i,a,l=[]){return this.compiler.compile(s,iA(a),l).generateAsync({type:i,mimeType:"application/vnd.openxmlformats-officedocument.wordprocessingml.document",compression:"DEFLATE"})})}static toString(e,r,n=[]){return qc.pack(e,"string",r,n)}static toBuffer(e,r,n=[]){return qc.pack(e,"nodebuffer",r,n)}static toBase64String(e,r,n=[]){return qc.pack(e,"base64",r,n)}static toBlob(e,r,n=[]){return qc.pack(e,"blob",r,n)}static toArrayBuffer(e,r,n=[]){return qc.pack(e,"arraybuffer",r,n)}static toStream(e,r,n=[]){const s=new kye.Stream;return this.compiler.compile(e,iA(r),n).generateAsync({type:"nodebuffer",mimeType:"application/vnd.openxmlformats-officedocument.wordprocessingml.document",compression:"DEFLATE"}).then(a=>{s.emit("data",a),s.emit("end")}),s}};be(fD,"compiler",new Iye);let Rye=fD;var mD={exports:{}};(function(t,e){(function(r,n){n()})(Bd,function(){function r(u,d){return typeof d>"u"?d={autoBom:!1}:typeof d!="object"&&(console.warn("Deprecated: Expected third argument to be a object"),d={autoBom:!d}),d.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(u.type)?new Blob(["\uFEFF",u],{type:u.type}):u}function n(u,d,h){var p=new XMLHttpRequest;p.open("GET",u),p.responseType="blob",p.onload=function(){c(p.response,d,h)},p.onerror=function(){console.error("could not download file")},p.send()}function s(u){var d=new XMLHttpRequest;d.open("HEAD",u,!1);try{d.send()}catch{}return 200<=d.status&&299>=d.status}function i(u){try{u.dispatchEvent(new MouseEvent("click"))}catch{var d=document.createEvent("MouseEvents");
949d.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),u.dispatchEvent(d)}}var a=typeof window=="object"&&window.window===window?window:typeof self=="object"&&self.self===self?self:typeof Bd=="object"&&Bd.global===Bd?Bd:void 0,l=a.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),c=a.saveAs||(typeof window!="object"||window!==a?function(){}:"download"in HTMLAnchorElement.prototype&&!l?function(u,d,h){var p=a.URL||a.webkitURL,f=document.createElement("a");d=d||u.name||"download",f.download=d,f.rel="noopener",typeof u=="string"?(f.href=u,f.origin===location.origin?i(f):s(f.href)?n(u,d,h):i(f,f.target="_blank")):(f.href=p.createObjectURL(u),setTimeout(function(){p.revokeObjectURL(f.href)},4e4),setTimeout(function(){i(f)},0))}:"msSaveOrOpenBlob"in navigator?function(u,d,h){if(d=d||u.name||"download",typeof u!="string")navigator.msSaveOrOpenBlob(r(u,h),d);else if(s(u))n(u,d,h);else{var p=document.createElement("a");p.href=u,p.target="_blank",setTimeout(function(){i(p)})}}:function(u,d,h,p){if(p=p||open("","_blank"),p&&(p.document.title=p.document.body.innerText="downloading..."),typeof u=="string")return n(u,d,h);var f=u.type==="application/octet-stream",m=/constructor/i.test(a.HTMLElement)||a.safari,y=/CriOS\/[\d]+/.test(navigator.userAgent);if((y||f&&m||l)&&typeof FileReader<"u"){var k=new FileReader;k.onloadend=function(){var w=k.result;w=y?w:w.replace(/^data:[^;]*;/,"data:attachment/file;"),p?p.location.href=w:location=w,p=null},k.readAsDataURL(u)}else{var g=a.URL||a.webkitURL,x=g.createObjectURL(u);p?p.location=x:location.href=x,p=null,setTimeout(function(){g.revokeObjectURL(x)},4e4)}});a.saveAs=c.saveAs=c,t.exports=c})})(mD);var aA=mD.exports,wt;(function(t){t.Root="root",t.Text="text",t.Directive="directive",t.Comment="comment",t.Script="script",t.Style="style",t.Tag="tag",t.CDATA="cdata",t.Doctype="doctype"})(wt||(wt={}));function Lye(t){return t.type===wt.Tag||t.type===wt.Script||t.type===wt.Style}const Mye=wt.Root,Dye=wt.Text,Fye=wt.Directive,Bye=wt.Comment,$ye=wt.Script,Uye=wt.Style,Wye=wt.Tag,Vye=wt.CDATA,Hye=wt.Doctype;let gD=class{constructor(){this.parent=null,this.prev=null,this.next=null,this.startIndex=null,this.endIndex=null}get parentNode(){return this.parent}set parentNode(e){this.parent=e}get previousSibling(){return this.prev}set previousSibling(e){this.prev=e}get nextSibling(){return this.next}set nextSibling(e){this.next=e}cloneNode(e=!1){return kD(this,e)}};class DN extends gD{constructor(e){super(),this.data=e}get nodeValue(){return this.data}set nodeValue(e){this.data=e}}class S2 extends DN{constructor(){super(...arguments),this.type=wt.Text}get nodeType(){return 3}}class yD extends DN{constructor(){super(...arguments),this.type=wt.Comment}get nodeType(){return 8}}class xD extends DN{constructor(e,r){super(r),this.name=e,this.type=wt.Directive}get nodeType(){return 1}}class FN extends gD{constructor(e){super(),this.children=e}get firstChild(){var e;return(e=this.children[0])!==null&&e!==void 0?e:null}get lastChild(){return this.children.length>0?this.children[this.children.length-1]:null}get childNodes(){return this.children}set childNodes(e){this.children=e}}class wD extends FN{constructor(){super(...arguments),this.type=wt.CDATA}get nodeType(){return 4}}class N2 extends FN{constructor(){super(...arguments),this.type=wt.Root}get nodeType(){return 9}}let bD=class extends FN{constructor(e,r,n=[],s=e==="script"?wt.Script:e==="style"?wt.Style:wt.Tag){super(n),this.name=e,this.attribs=r,this.type=s}get nodeType(){return 1}get tagName(){return this.name}set tagName(e){this.name=e}get attributes(){return Object.keys(this.attribs).map(e=>{var r,n;return{name:e,value:this.attribs[e],namespace:(r=this["x-attribsNamespace"])===null||r===void 0?void 0:r[e],prefix:(n=this["x-attribsPrefix"])===null||n===void 0?void 0:n[e]}})}};function BN(t){return Lye(t)}function qye(t){return t.type===wt.CDATA}function Kye(t){return t.type===wt.Text}function Gye(t){return t.type===wt.Comment}function Zye(t){return t.type===wt.Directive}function Yye(t){return t.type===wt.Root}function kD(t,e=!1){let r;if(Kye(t))r=new S2(t.data);else if(Gye(t))r=new yD(t.data);else if(BN(t)){const n=e?$1(t.children):[],s=new bD(t.name,{...t.attribs},n);
949n.forEach(i=>i.parent=s),t.namespace!=null&&(s.namespace=t.namespace),t["x-attribsNamespace"]&&(s["x-attribsNamespace"]={...t["x-attribsNamespace"]}),t["x-attribsPrefix"]&&(s["x-attribsPrefix"]={...t["x-attribsPrefix"]}),r=s}else if(qye(t)){const n=e?$1(t.children):[],s=new wD(n);n.forEach(i=>i.parent=s),r=s}else if(Yye(t)){const n=e?$1(t.children):[],s=new N2(n);n.forEach(i=>i.parent=s),t["x-mode"]&&(s["x-mode"]=t["x-mode"]),r=s}else if(Zye(t)){const n=new xD(t.name,t.data);t["x-name"]!=null&&(n["x-name"]=t["x-name"],n["x-publicId"]=t["x-publicId"],n["x-systemId"]=t["x-systemId"]),r=n}else throw new Error(`Not implemented yet: ${t.type}`);return r.startIndex=t.startIndex,r.endIndex=t.endIndex,t.sourceCodeLocation!=null&&(r.sourceCodeLocation=t.sourceCodeLocation),r}function $1(t){const e=t.map(r=>kD(r,!0));for(let r=1;r<e.length;r++)e[r].prev=e[r-1],e[r-1].next=e[r];return e}const oA={withStartIndices:!1,withEndIndices:!1,xmlMode:!1};class Jye{constructor(e,r,n){this.dom=[],this.root=new N2(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null,typeof r=="function"&&(n=r,r=oA),typeof e=="object"&&(r=e,e=void 0),this.callback=e??null,this.options=r??oA,this.elementCB=n??null}onparserinit(e){this.parser=e}onreset(){this.dom=[],this.root=new N2(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null}onend(){this.done||(this.done=!0,this.parser=null,this.handleCallback(null))}onerror(e){this.handleCallback(e)}onclosetag(){this.lastNode=null;const e=this.tagStack.pop();this.options.withEndIndices&&(e.endIndex=this.parser.endIndex),this.elementCB&&this.elementCB(e)}onopentag(e,r){const n=this.options.xmlMode?wt.Tag:void 0,s=new bD(e,r,void 0,n);this.addNode(s),this.tagStack.push(s)}ontext(e){const{lastNode:r}=this;if(r&&r.type===wt.Text)r.data+=e,this.options.withEndIndices&&(r.endIndex=this.parser.endIndex);else{const n=new S2(e);this.addNode(n),this.lastNode=n}}oncomment(e){if(this.lastNode&&this.lastNode.type===wt.Comment){this.lastNode.data+=e;return}const r=new yD(e);this.addNode(r),this.lastNode=r}oncommentend(){this.lastNode=null}oncdatastart(){const e=new S2(""),r=new wD([e]);this.addNode(r),e.parent=r,this.lastNode=e}oncdataend(){this.lastNode=null}onprocessinginstruction(e,r){const n=new xD(e,r);this.addNode(n)}handleCallback(e){if(typeof this.callback=="function")this.callback(e,this.dom);else if(e)throw e}addNode(e){const r=this.tagStack[this.tagStack.length-1],n=r.children[r.children.length-1];this.options.withStartIndices&&(e.startIndex=this.parser.startIndex),this.options.withEndIndices&&(e.endIndex=this.parser.endIndex),r.children.push(e),n&&(e.prev=n,n.next=e),e.parent=r,this.lastNode=null}}const Xye=/\n/g;function Qye(t){const e=[...t.matchAll(Xye)].map(n=>n.index||0);e.unshift(-1);const r=C2(e,0,e.length);return n=>vD(r,n)}function C2(t,e,r){if(r-e==1)return{offset:t[e],index:e+1};const n=Math.ceil((e+r)/2),s=C2(t,e,n),i=C2(t,n,r);return{offset:s.offset,low:s,high:i}}function vD(t,e){return function(r){return Object.prototype.hasOwnProperty.call(r,"index")}(t)?{line:t.index,column:e-t.offset}:vD(t.high.offset<e?t.high:t.low,e)}function jD(t,e="",r={}){const n=typeof e!="string"?e:r,s=typeof e=="string"?e:"",i=t.map(exe),a=!!n.lineNumbers;return function(l,c=0){const u=a?Qye(l):()=>({line:0,column:0});let d=c;const h=[];e:for(;d<l.length;){let p=!1;for(const f of i){f.regex.lastIndex=d;const m=f.regex.exec(l);if(m&&m[0].length>0){if(!f.discard){const y=u(d),k=typeof f.replace=="string"?m[0].replace(new RegExp(f.regex.source,f.regex.flags),f.replace):m[0];h.push({state:s,name:f.name,text:k,offset:d,len:m[0].length,line:y.line,column:y.column})}if(d=f.regex.lastIndex,p=!0,f.push){const y=f.push(l,d);h.push(...y.tokens),d=y.offset}if(f.pop)break e;break}}if(!p)break}return{tokens:h,offset:d,complete:l.length<=d}}}function exe(t,e){return{...t,regex:txe(t,e)}}function txe(t,e){if(t.name.length===0)throw new Error(`Rule #${e} has empty name, which is not allowed.`);if(function(r){return Object.prototype.hasOwnProperty.call(r,"regex")}(t))return function(r){if(r.global)throw new Error(`Regular expression /${r.source}/${r.flags} contains the global flag, which is not allowed.`);return r.sticky?r:new RegExp(r.source,r.flags+"y")}(t.regex);if(function(r){return Object.prototype.hasOwnProperty.call(r,"str")}(t)){if(t.str.length===0)throw new Error(`Rule #${e} ("${t.name}") has empty "str" property, which is not allowed.`);return new RegExp(lA(t.str),"y")}return new RegExp(lA(t.name),"y")}function lA(t){return t.replace(/[-[\]{}()*+!<=:?./\\^$|#\s,]/g,"\\$&")}function Sa(t,e){return(r,n)=>{let s=n,i;return n<r.tokens.length&&(i=t(r.tokens[n],r,n),i!==void 0&&s++),i===void 0?{matched:!1}:{matched:!0,position:s,value:i}}}function $N(t,e){return t.matched?{matched:!0,position:t.position,value:e(t.value,t.position)}:t}function Kg(t,e){return t.matched?e(t):t}function Fn(t,e){return(r,n)=>$N(t(r,n),(s,i)=>e(s,r,n,i))}function Gg(t,e){return(r,n)=>{const s=t(r,n);return s.matched?s:{matched:!0,position:n,value:e}}}function yx(...t){return(e,r)=>{for(const n of t){const s=n(e,r);if(s.matched)return s}return{matched:!1}}}function Ac(t,e){return(r,n)=>{const s=t(r,n);return s.matched?s:e(r,n)}}function rxe(t,e){return(r,n)=>{const s=[];let i=!0;do{const a=t(r,n);a.matched&&e(a.value,s.length+1,r,n,a.position)?(s.push(a.value),n=a.position):i=!1}while(i);return{matched:!0,position:n,value:s}}}function UN(t){return rxe(t,()=>!0)}function nxe(t){return un(t,UN(t),(e,r)=>[e,...r])}function un(t,e,r){return(n,s)=>Kg(t(n,s),i=>$N(e(n,i.position),(a,l)=>r(i.value,a,n,s,l)))}function sxe(t,e){return un(t,e,r=>r)}function cA(t,e){return un(t,e,(r,n)=>n)}function WN(t,e,r,n){return(s,i)=>Kg(t(s,i),a=>Kg(e(s,a.position),l=>$N(r(s,l.position),(c,u)=>n(a.value,l.value,c,s,i,u))))}function SD(t,e,r){return WN(t,e,r,(n,s)=>s)}function ixe(...t){return(e,r)=>{const n=[];let s=r;for(const i of t){const a=i(e,s);if(a.matched)n.push(a.value),s=a.position;else return{matched:!1}}return{matched:!0,position:s,value:n}}}function axe(...t){return oxe(ixe(...t))}function oxe(t){return Fn(t,e=>e.flatMap(r=>r))}function lxe(t,e){return(r,n)=>{let s=!0,i=t,a=n;do{const l=e(i,r,a)(r,a);l.matched?(i=l.value,a=l.position):s=!1}while(s);return{matched:!0,position:a,value:i}}}function cxe(t,e,r){return lxe(t,n=>Fn(e,(s,i,a,l)=>r(n,s,i,a,l)))}function uxe(t,e,r){return dxe(t,n=>cxe(n,un(e,r,(s,i)=>[s,i]),(s,[i,a])=>i(s,a)))}function dxe(t,e){return(r,n)=>Kg(t(r,n),s=>e(s.value,r,n,s.position)(r,s.position))}const hxe="(?:[ \\t\\r\\n\\f]*)",ND="(?:\\n|\\r\\n|\\r|\\f)",xx="[^\\x00-\\x7F]",Af="(?:\\\\[0-9a-f]{1,6}(?:\\r\\n|[ \\n\\r\\t\\f])?)",zf="(?:\\\\[^\\n\\r\\f0-9a-f])",pxe=`(?:[_a-z]|${xx}|${Af}|${zf})`,CD=`(?:[_a-z0-9-]|${xx}|${Af}|${zf})`,fxe=`(?:${CD}+)`,mxe=`(?:[-]?${pxe}${CD}*)`,gxe=`'([^\\n\\r\\f\\\\']|\\\\${ND}|${xx}|${Af}|${zf})*'`,yxe=`"([^\\n\\r\\f\\\\"]|\\\\${ND}|${xx}|${Af}|${zf})*"`,xxe=jD([{name:"ws",regex:new RegExp(hxe)},{name:"hash",regex:new RegExp(`#${fxe}`,"i")},{name:"ident",regex:new RegExp(mxe,"i")},{name:"str1",regex:new RegExp(gxe,"i")},{name:"str2",regex:new RegExp(yxe,"i")},{name:"*"},{name:"."},{name:","},{name:"["},{name:"]"},{name:"="},{name:">"},{name:"|"},{name:"+"},{name:"~"},{name:"^"},{name:"$"}]),wxe=jD([{name:"unicode",regex:new RegExp(Af,"i")},{name:"escape",regex:new RegExp(zf,"i")},{name:"any",regex:new RegExp("[\\s\\S]","i")}]);function ED([t,e,r],[n,s,i]){return[t+n,e+s,r+i]}function bxe(t){return t.reduce(ED,[0,0,0])}const kxe=Sa(t=>t.name==="unicode"?String.fromCodePoint(parseInt(t.text.slice(1),16)):void 0),vxe=Sa(t=>t.name==="escape"?t.text.slice(1):void 0),jxe=Sa(t=>t.name==="any"?t.text:void 0),Sxe=Fn(UN(yx(kxe,vxe,jxe)),t=>t.join(""));function VN(t){const e=wxe(t);return Sxe({tokens:e.tokens,options:void 0},0).value}function Lt(t){return Sa(e=>e.name===t?!0:void 0)}const HN=Sa(t=>t.name==="ws"?null:void 0),E2=Gg(HN,null);function Hp(t){return SD(E2,t,E2)}const qp=Sa(t=>t.name==="ident"?VN(t.text):void 0),Nxe=Sa(t=>t.name==="hash"?VN(t.text.slice(1)):void 0),Cxe=Sa(t=>t.name.startsWith("str")?VN(t.text.slice(1,-1)):void 0),TD=sxe(Gg(qp,""),Lt("|")),qN=Ac(un(TD,qp,(t,e)=>({name:e,namespace:t})),Fn(qp,t=>({name:t,namespace:null}))),Exe=Ac(un(TD,Lt("*"),t=>({type:"universal",namespace:t,specificity:[0,0,0]})),Fn(Lt("*"),()=>({type:"universal",namespace:null,specificity:[0,0,0]}))),Txe=Fn(qN,({name:t,namespace:e})=>({type:"tag",name:t,namespace:e,specificity:[0,0,1]})),Axe=un(Lt("."),qp,(t,e)=>({type:"class",name:e,specificity:[0,1,0]})),zxe=Fn(Nxe,t=>({type:"id",name:t,specificity:[1,0,0]})),uA=Sa(t=>{if(t.name==="ident"){if(t.text==="i"||t.text==="I")return"i";if(t.text==="s"||t.text==="S")return"s"}}),Pxe=Ac(un(Cxe,Gg(cA(E2,uA),null),(t,e)=>({value:t,modifier:e})),un(qp,Gg(cA(HN,uA),null),(t,e)=>({value:t,modifier:e}))),_xe=yx(Fn(Lt("="),()=>"="),un(Lt("~"),Lt("="),()=>"~="),un(Lt("|"),Lt("="),()=>"|="),un(Lt("^"),Lt("="),()=>"^="),un(Lt("$"),Lt("="),()=>"$="),un(Lt("*"),Lt("="),()=>"*=")),Ixe=WN(Lt("["),Hp(qN),Lt("]"),(t,{name:e,namespace:r})=>({type:"attrPresence",name:e,namespace:r,specificity:[0,1,0]})),Oxe=SD(Lt("["),WN(Hp(qN),_xe,Hp(Pxe),({name:t,namespace:e},r,{value:n,modifier:s})=>({type:"attrValue",name:t,namespace:e,matcher:r,value:n,modifier:s,specificity:[0,1,0]})),Lt("]")),Rxe=Ac(Ixe,Oxe),Lxe=Ac(Exe,Txe),dA=yx(zxe,Axe,Rxe),hA=Fn(Ac(axe(Lxe,UN(dA)),nxe(dA)),t=>({type:"compound",list:t,specificity:bxe(t.map(e=>e.specificity))})),Mxe=yx(Fn(Lt(">"),()=>">"),Fn(Lt("+"),()=>"+"),Fn(Lt("~"),()=>"~"),un(Lt("|"),Lt("|"),()=>"||")),Dxe=Ac(Hp(Mxe),Fn(HN,()=>" ")),Fxe=uxe(hA,Fn(Dxe,t=>(e,r)=>({type:"compound",list:[...r.list,{type:"combinator",combinator:t,left:e,specificity:e.specificity}],specificity:ED(e.specificity,r.specificity)})),hA);function Bxe(t,e){if(!(typeof e=="string"||e instanceof String))throw new Error("Expected a selector string. Actual input is not a string!");const r=xxe(e);if(!r.complete)throw new Error(`The input "${e}" was only partially tokenized, stopped at offset ${r.offset}!
950`+pA(e,r.offset));const n=Hp(t)({tokens:r.tokens,options:void 0},0);if(!n.matched)throw new Error(`No match for "${e}" input!`);if(n.position<r.tokens.length){const s=r.tokens[n.position];throw new Error(`The input "${e}" was only partially parsed, stopped at offset ${s.offset}!
951`+pA(e,s.offset,s.len))}return n.value}function pA(t,e,r=1){return`${t.replace(/(\t)|(\r)|(\n)/g,(n,s,i)=>s?"␉":i?"␍":"␊")}
952${"".padEnd(e)}${"^".repeat(r)}`}function $xe(t){return Bxe(Fxe,t)}function ji(t){if(!t.type)throw new Error("This is not an AST node.");switch(t.type){case"universal":return Im(t.namespace)+"*";case"tag":return Im(t.namespace)+Kc(t.name);case"class":return"."+Kc(t.name);case"id":return"#"+Kc(t.name);case"attrPresence":return`[${Im(t.namespace)}${Kc(t.name)}]`;case"attrValue":return`[${Im(t.namespace)}${Kc(t.name)}${t.matcher}"${Uxe(t.value)}"${t.modifier?t.modifier:""}]`;case"combinator":return ji(t.left)+t.combinator;case"compound":return t.list.reduce((e,r)=>r.type==="combinator"?ji(r)+e:e+ji(r),"");case"list":return t.list.map(ji).join(",")}}function Im(t){return t||t===""?Kc(t)+"|":""}function d0(t){return`\\${t.codePointAt(0).toString(16)} `}function Kc(t){return t.replace(/(^[0-9])|(^-[0-9])|(^-$)|([-0-9a-zA-Z_]|[^\x00-\x7F])|(\x00)|([\x01-\x1f]|\x7f)|([\s\S])/g,(e,r,n,s,i,a,l,c)=>r?d0(r):n?"-"+d0(n.slice(1)):s?"\\-":i||(a?"�":l?d0(l):"\\"+c))}function Uxe(t){return t.replace(/(")|(\\)|(\x00)|([\x01-\x1f]|\x7f)/g,(e,r,n,s,i)=>r?'\\"':n?"\\\\":s?"�":d0(i))}function h0(t){if(!t.type)throw new Error("This is not an AST node.");switch(t.type){case"compound":{t.list.forEach(h0),t.list.sort((e,r)=>zD(fA(e),fA(r)));break}case"combinator":{h0(t.left);break}case"list":{t.list.forEach(h0),t.list.sort((e,r)=>ji(e)<ji(r)?-1:1);break}}return t}function fA(t){switch(t.type){case"universal":return[1];case"tag":return[1];case"id":return[2];case"class":return[3,t.name];case"attrPresence":return[4,ji(t)];case"attrValue":return[5,ji(t)];case"combinator":return[15,ji(t)]}}function AD(t,e){return zD(t,e)}function zD(t,e){if(!Array.isArray(t)||!Array.isArray(e))throw new Error("Arguments must be arrays.");const r=t.length<e.length?t.length:e.length;for(let n=0;n<r;n++)if(t[n]!==e[n])return t[n]<e[n]?-1:1;return t.length-e.length}class mA{constructor(e){this.branches=md(Wxe(e))}build(e){return e(this.branches)}}function Wxe(t){const e=t.length,r=new Array(e);for(let n=0;n<e;n++){const[s,i]=t[n],a=Vxe($xe(s));r[n]={ast:a,terminal:{type:"terminal",valueContainer:{index:n,value:i,specificity:a.specificity}}}}return r}function Vxe(t){return PD(t),h0(t),t}function PD(t){const e=[];t.list.forEach(r=>{switch(r.type){case"class":e.push({matcher:"~=",modifier:null,name:"class",namespace:null,specificity:r.specificity,type:"attrValue",value:r.name});break;
952case"id":e.push({matcher:"=",modifier:null,name:"id",namespace:null,specificity:r.specificity,type:"attrValue",value:r.name});break;case"combinator":PD(r.left),e.push(r);break;case"universal":break;default:e.push(r);break}}),t.list=e}function md(t){const e=[];for(;t.length;){const r=OD(t,a=>!0,_D),{matches:n,nonmatches:s,empty:i}=qxe(t,r);t=s,n.length&&e.push(Kxe(r,n)),i.length&&e.push(...Hxe(i))}return e}function Hxe(t){const e=[];for(const r of t){const n=r.terminal;if(n.type==="terminal")e.push(n);else{const{matches:s,rest:i}=Xxe(n.cont,a=>a.type==="terminal");s.forEach(a=>e.push(a)),i.length&&(n.cont=i,e.push(n))}}return e}function qxe(t,e){const r=[],n=[],s=[];for(const i of t){const a=i.ast.list;a.length?(a.some(c=>_D(c)===e)?r:n).push(i):s.push(i)}return{matches:r,nonmatches:n,empty:s}}function _D(t){switch(t.type){case"attrPresence":return`attrPresence ${t.name}`;case"attrValue":return`attrValue ${t.name}`;case"combinator":return`combinator ${t.combinator}`;default:return t.type}}function Kxe(t,e){if(t==="tag")return Gxe(e);if(t.startsWith("attrValue "))return Yxe(t.substring(10),e);if(t.startsWith("attrPresence "))return Zxe(t.substring(13),e);if(t==="combinator >")return gA(">",e);if(t==="combinator +")return gA("+",e);throw new Error(`Unsupported selector kind: ${t}`)}function Gxe(t){const e=KN(t,n=>n.type==="tag",n=>n.name);return{type:"tagName",variants:Object.entries(e).map(([n,s])=>({type:"variant",value:n,cont:md(s.items)}))}}function Zxe(t,e){for(const r of e)ID(r,n=>n.type==="attrPresence"&&n.name===t);return{type:"attrPresence",name:t,cont:md(e)}}function Yxe(t,e){const r=KN(e,s=>s.type==="attrValue"&&s.name===t,s=>`${s.matcher} ${s.modifier||""} ${s.value}`),n=[];for(const s of Object.values(r)){const i=s.oneSimpleSelector,a=Jxe(i),l=md(s.items);n.push({type:"matcher",matcher:i.matcher,modifier:i.modifier,value:i.value,predicate:a,cont:l})}return{type:"attrValue",name:t,matchers:n}}function Jxe(t){if(t.modifier==="i"){const e=t.value.toLowerCase();switch(t.matcher){case"=":return r=>e===r.toLowerCase();case"~=":return r=>r.toLowerCase().split(/[ \t]+/).includes(e);case"^=":return r=>r.toLowerCase().startsWith(e);case"$=":return r=>r.toLowerCase().endsWith(e);case"*=":return r=>r.toLowerCase().includes(e);case"|=":return r=>{const n=r.toLowerCase();return e===n||n.startsWith(e)&&n[e.length]==="-"}}}else{const e=t.value;switch(t.matcher){case"=":return r=>e===r;case"~=":return r=>r.split(/[ \t]+/).includes(e);case"^=":return r=>r.startsWith(e);case"$=":return r=>r.endsWith(e);case"*=":return r=>r.includes(e);case"|=":return r=>e===r||r.startsWith(e)&&r[e.length]==="-"}}}function gA(t,e){const r=KN(e,s=>s.type==="combinator"&&s.combinator===t,s=>ji(s.left)),n=[];for(const s of Object.values(r)){const i=md(s.items),a=s.oneSimpleSelector.left;n.push({ast:a,terminal:{type:"popElement",cont:i}})}return{type:"pushElement",combinator:t,cont:md(n)}}function KN(t,e,r){const n={};for(;t.length;){const s=OD(t,e,r),i=d=>e(d)&&r(d)===s,a=d=>d.ast.list.some(i),{matches:l,rest:c}=Qxe(t,a);let u=null;for(const d of l){const h=ID(d,i);u||(u=h)}if(u==null)throw new Error("No simple selector is found.");n[s]={oneSimpleSelector:u,items:l},t=c}return n}function ID(t,e){const r=t.ast.list,n=new Array(r.length);let s=-1;for(let a=r.length;a-- >0;
952)e(r[a])&&(n[a]=!0,s=a);if(s==-1)throw new Error("Couldn't find the required simple selector.");const i=r[s];return t.ast.list=r.filter((a,l)=>!n[l]),i}function OD(t,e,r){const n={};for(const a of t){const l={};for(const c of a.ast.list.filter(e))l[r(c)]=!0;for(const c of Object.keys(l))n[c]?n[c]++:n[c]=1}let s="",i=0;for(const a of Object.entries(n))a[1]>i&&(s=a[0],i=a[1]);return s}function Xxe(t,e){const r=[],n=[];for(const s of t)e(s)?r.push(s):n.push(s);return{matches:r,rest:n}}function Qxe(t,e){const r=[],n=[];for(const s of t)e(s)?r.push(s):n.push(s);return{matches:r,rest:n}}class ewe{constructor(e){this.f=e}pickAll(e){return this.f(e)}pick1(e,r=!1){const n=this.f(e),s=n.length;if(s===0)return null;if(s===1)return n[0].value;const i=r?twe:rwe;let a=n[0];for(let l=1;l<s;l++){const c=n[l];i(a,c)&&(a=c)}return a.value}}function twe(t,e){const r=AD(e.specificity,t.specificity);return r>0||r===0&&e.index<t.index}function rwe(t,e){const r=AD(e.specificity,t.specificity);return r>0||r===0&&e.index>t.index}function yA(t){return new ewe(Md(t))}function Md(t){const e=t.map(nwe);return(r,...n)=>e.flatMap(s=>s(r,...n))}function nwe(t){switch(t.type){case"terminal":{const e=[t.valueContainer];return(r,...n)=>e}case"tagName":return swe(t);case"attrValue":return awe(t);case"attrPresence":return iwe(t);case"pushElement":return owe(t);case"popElement":return cwe(t)}}function swe(t){const e={};for(const r of t.variants)e[r.value]=Md(r.cont);return(r,...n)=>{const s=e[r.name];return s?s(r,...n):[]}}function iwe(t){const e=t.name,r=Md(t.cont);return(n,...s)=>Object.prototype.hasOwnProperty.call(n.attribs,e)?r(n,...s):[]}function awe(t){const e=[];for(const n of t.matchers){const s=n.predicate,i=Md(n.cont);e.push((a,l,...c)=>s(a)?i(l,...c):[])}const r=t.name;return(n,...s)=>{const i=n.attribs[r];return i||i===""?e.flatMap(a=>a(i,n,...s)):[]}}function owe(t){const e=Md(t.cont),r=t.combinator==="+"?RD:lwe;return(n,...s)=>{const i=r(n);return i===null?[]:e(i,n,...s)}}const RD=t=>{const e=t.prev;return e===null?null:BN(e)?e:RD(e)},lwe=t=>{const e=t.parent;return e&&BN(e)?e:null};function cwe(t){const e=Md(t.cont);return(r,n,...s)=>e(n,...s)}const LD
vendor: 8,319 bytes, line 952
952=new Uint16Array('ᵁ<Õıʊҝջאٵ۞ޢߖࠏ੊ઑඡ๭༉༦჊ረዡᐕᒝᓃᓟᔥ\0\0\0\0\0\0ᕫᛍᦍᰒᷝ὾⁠↰⊍⏀⏻⑂⠤⤒ⴈ⹈⿎〖㊺㘹㞬㣾㨨㩱㫠㬮ࠀEMabcfglmnoprstu\\bfms�„‹•˜¦³¹ÈÏlig耻Æ䃆P耻&䀦cute耻Á䃁reve;䄂Āiyx}rc耻Â䃂;䐐r;쀀𝔄rave耻À䃀pha;䎑acr;䄀d;橓Āgp¡on;䄄f;쀀𝔸plyFunction;恡ing耻Å䃅Ācs¾Ãr;쀀𝒜ign;扔ilde耻Ã䃃ml耻Ä䃄ЀaceforsuåûþėĜĢħĪĀcrêòkslash;或Ŷöø;æ«§ed;挆y;䐑ƀcrtąċĔause;戵noullis;愬a;䎒r;쀀𝔅pf;쀀𝔹eve;䋘còēmpeq;扎܀HOacdefhilorsuōőŖƀƞƢƵƷƺǜȕɳɸɾcy;䐧PY耻©䂩ƀcpyŝŢźute;䄆Ā;iŧŨ拒talDifferentialD;慅leys;愭ȀaeioƉƎƔƘron;䄌dil耻Ç䃇rc;䄈nint;戰ot;䄊ĀdnƧƭilla;䂸terDot;䂷òſi;䎧rcleȀDMPTLJNjǑǖot;抙inus;抖lus;投imes;抗oĀcsǢǸkwiseContourIntegral;戲eCurlyĀDQȃȏoubleQuote;思uote;怙ȀlnpuȞȨɇɕonĀ;eȥȦ户;橴ƀgitȯȶȺruent;扡nt;戯ourIntegral;戮ĀfrɌɎ;愂oduct;成nterClockwiseContourIntegral;戳oss;樯cr;쀀𝒞pĀ;Cʄʅ拓ap;才րDJSZacefiosʠʬʰʴʸˋ˗ˡ˦̳ҍĀ;oŹʥtrahd;椑cy;䐂cy;䐅cy;䐏ƀgrsʿ˄ˇger;怡r;憡hv;櫤Āayː˕ron;䄎;䐔lĀ;t˝˞戇a;䎔r;쀀𝔇Āaf˫̧Ācm˰̢riticalȀADGT̖̜̀̆cute;䂴oŴ̋̍;䋙bleAcute;䋝rave;䁠ilde;䋜ond;拄ferentialD;慆Ѱ̽\0\0\0͔͂\0Ѕf;쀀𝔻ƀ;DE͈͉͍䂨ot;惜qual;扐blèCDLRUVͣͲ΂ϏϢϸontourIntegraìȹoɴ͹\0\0ͻ»͉nArrow;懓Āeo·ΤftƀARTΐΖΡrrow;懐ightArrow;懔eåˊngĀLRΫτeftĀARγιrrow;柸ightArrow;柺ightArrow;柹ightĀATϘϞrrow;懒ee;抨pɁϩ\0\0ϯrrow;懑ownArrow;懕erticalBar;戥ǹABLRTaВЪаўѿͼrrowƀ;BUНОТ憓ar;椓pArrow;懵reve;䌑eft˒к\0ц\0ѐightVector;楐eeVector;楞ectorĀ;Bљњ憽ar;楖ightǔѧ\0ѱeeVector;楟ectorĀ;BѺѻ懁ar;楗eeĀ;A҆҇护rrow;憧ĀctҒҗr;쀀𝒟rok;䄐ࠀNTacdfglmopqstuxҽӀӄӋӞӢӧӮӵԡԯԶՒ՝ՠեG;䅊H耻Ð䃐cute耻É䃉ƀaiyӒӗӜron;䄚rc耻Ê䃊;䐭ot;䄖r;쀀𝔈rave耻È䃈ement;戈ĀapÓºÓ¾cr;䄒tyɓԆ\0\0ԒmallSquare;旻erySmallSquare;斫ĀgpÔ¦Ôªon;䄘f;쀀𝔼silon;䎕uĀaiԼՉlĀ;TՂՃ橵ilde;扂librium;懌Āci՗՚r;愰m;橳a;䎗ml耻Ë䃋ĀipÕªÕ¯sts;戃onentialE;慇ʀcfiosօֈ֍ֲ׌y;䐤r;쀀𝔉lledɓ֗\0\0Ö£mallSquare;旼erySmallSquare;斪Ͱֺ\0Ö¿\0\0ׄf;쀀𝔽All;戀riertrf;愱cò׋؀JTabcdfgorstר׬ׯ׺؀ؒؖ؛؝أ٬ٲcy;䐃耻>䀾mmaĀ;d׷׸䎓;䏜reve;䄞ƀeiy؇،ؐdil;䄢rc;䄜;䐓ot;䄠r;쀀𝔊;拙pf;쀀𝔾eater̀EFGLSTصلَٖٛ٦qualĀ;Lؾؿ扥ess;招ullEqual;执reater;檢ess;扷lantEqual;橾ilde;扳cr;쀀𝒢;扫ЀAacfiosuڅڋږڛڞڪھۊRDcy;䐪Āctڐڔek;䋇;䁞irc;䄤r;愌lbertSpace;愋ǰگ\0Ú²f;愍izontalLine;攀Āctۃۅòکrok;䄦mpńېۘownHumðįqual;扏܀EJOacdfgmnostuۺ۾܃܇܎ܚܞܡܨ݄ݸދޏޕcy;䐕lig;䄲cy;䐁cute耻Í䃍Āiyܓܘrc耻Î䃎;䐘ot;䄰r;愑rave耻Ì䃌ƀ;apܠܯܿĀcgÜ´Ü·r;䄪inaryI;慈lieóϝǴ݉\0ݢĀ;eݍݎ戬Āgrݓݘral;戫section;拂isibleĀCTݬݲomma;恣imes;恢ƀgptݿރވon;䄮f;쀀𝕀a;䎙cr;愐ilde;䄨ǫޚ\0ޞcy;䐆l耻Ï䃏ʀcfosuެ޷޼߂ߐĀiyÞ±Þµrc;䄴;䐙r;쀀𝔍pf;쀀𝕁ǣ߇\0ߌr;쀀𝒥rcy;䐈kcy;䐄΀HJacfosߤߨ߽߬߱ࠂࠈcy;䐥cy;䐌ppa;䎚Āeyß¶ß»dil;䄶;䐚r;쀀𝔎pf;쀀𝕂cr;쀀𝒦րJTaceflmostࠥࠩࠬࡐࡣ঳সে্਷ੇcy;䐉耻<䀼ʀcmnpr࠷࠼ࡁࡄࡍute;䄹bda;䎛g;柪lacetrf;愒r;憞ƀaeyࡗ࡜ࡡron;䄽dil;䄻;䐛Āfsࡨ॰tԀACDFRTUVarࡾࢩࢱࣦ࣠ࣼयज़ΐ४Ānrࢃ࢏gleBracket;柨rowƀ;BR࢙࢚࢞憐ar;懤ightArrow;懆eiling;挈oǵࢷ\0ࣃbleBracket;柦nǔࣈ\0࣒eeVector;楡ectorĀ;Bࣛࣜ懃ar;楙loor;挊ightĀAV࣯ࣵrrow;憔ector;楎Āerँगeƀ;AVउऊऐ抣rrow;憤ector;楚iangleƀ;BEतथऩ抲ar;槏qual;抴pƀDTVषूौownVector;楑eeVector;楠ectorĀ;Bॖॗ憿ar;楘ectorĀ;B॥०憼ar;楒ightáΜs̀EFGLSTॾঋকঝঢভqualGreater;拚ullEqual;扦reater;扶ess;檡lantEqual;橽ilde;扲r;쀀𝔏Ā;eঽা拘ftarrow;懚idot;䄿ƀnpw৔ਖਛgȀLRlr৞৷ਂਐeftĀAR০৬rrow;柵ightArrow;柷ightArrow;柶eftĀarγਊightáοightáϊf;쀀𝕃erĀLRਢਬeftArrow;憙ightArrow;憘ƀchtਾੀੂòࡌ;憰rok;䅁;扪Ѐacefiosuਗ਼੝੠੷੼અઋ઎p;椅y;䐜Ādl੥੯iumSpace;恟lintrf;愳r;쀀𝔐nusPlus;戓pf;쀀𝕄cò੶;䎜ҀJacefostuણધભીଔଙඑ඗ඞcy;䐊cute;䅃ƀaey઴હાron;䅇dil;䅅;䐝ƀgswે૰଎ativeƀMTV૓૟૨ediumSpace;怋hiĀcn૦૘ë૙eryThiî૙tedĀGL૸ଆreaterGreateòٳessLesóੈLine;䀊r;쀀𝔑ȀBnptଢନଷ଺reak;恠BreakingSpace;䂠f;愕ڀ;CDEGHLNPRSTV୕ୖ୪୼஡௫ఄ౞಄ದ೘ൡඅ櫬Āou୛୤ngruent;扢pCap;扭oubleVerticalBar;戦ƀlqxஃஊ஛ement;戉ualĀ;Tஒஓ扠ilde;쀀≂̸ists;戄reater΀;EFGLSTஶஷ஽௉௓௘௥扯qual;扱ullEqual;쀀≧̸reater;쀀≫̸ess;批lantEqual;쀀⩾̸ilde;扵umpń௲௽ownHump;쀀≎̸qual;쀀≏̸eĀfsఊధtTriangleƀ;BEచఛడ拪ar;쀀⧏̸qual;括s̀;EGLSTవశ఼ౄోౘ扮qual;扰reater;扸ess;쀀≪̸lantEqual;쀀⩽̸ilde;扴estedĀGL౨౹reaterGreater;쀀⪢̸essLess;쀀⪡̸recedesƀ;ESಒಓಛ技qual;쀀⪯̸lantEqual;拠ĀeiಫಹverseElement;戌ghtTriangleƀ;BEೋೌ೒拫ar;쀀⧐̸qual;拭ĀquೝഌuareSuĀbp೨೹setĀ;E೰ೳ쀀⊏̸qual;拢ersetĀ;Eഃആ쀀⊐̸qual;拣ƀbcpഓതൎsetĀ;Eഛഞ쀀⊂⃒qual;抈ceedsȀ;ESTലള഻െ抁qual;쀀⪰̸lantEqual;拡ilde;쀀≿̸ersetĀ;E൘൛쀀⊃⃒qual;抉ildeȀ;EFT൮൯൵ൿ扁qual;扄ullEqual;扇ilde;扉erticalBar;戤cr;쀀𝒩ilde耻Ñ䃑;䎝܀Eacdfgmoprstuvලෂ෉෕ෛ෠෧෼ขภยา฿ไlig;䅒cute耻Ó䃓Āiy෎ීrc耻Ô䃔;䐞blac;䅐r;쀀𝔒rave耻Ò䃒ƀaei෮ෲ෶cr;䅌ga;䎩cron;䎟pf;쀀𝕆enCurlyĀDQฎบoubleQuote;怜uote;怘;橔Āclวฬr;쀀𝒪ash耻Ø䃘iŬื฼de耻Õ䃕es;樷ml耻Ö䃖erĀBP๋๠Āar๐๓r;怾acĀek๚๜;揞et;掴arenthesis;揜Ҁacfhilors๿ງຊຏຒດຝະ໼rtialD;戂y;䐟r;쀀𝔓i;䎦;䎠usMinus;䂱Āipຢອncareplanåڝf;愙Ȁ;eio຺ູ໠໤檻cedesȀ;EST່້໏໚扺qual;檯lantEqual;扼ilde;找me;怳Ādp໩໮uct;戏ortionĀ;aȥ໹l;戝Āci༁༆r;쀀𝒫;䎨ȀUfos༑༖༛༟OT耻"䀢r;쀀𝔔pf;愚cr;쀀𝒬؀BEacefhiorsu༾གྷཇའཱིྦྷྪྭ႖ႩႴႾarr;椐G耻®䂮ƀcnrཎནབute;䅔g;柫rĀ;tཛྷཝ憠l;椖ƀaeyཧཬཱron;䅘dil;䅖;䐠Ā;vླྀཹ愜erseĀEUྂྙĀlq྇ྎement;戋uilibrium;懋pEquilibrium;楯r»ཹo;䎡ghtЀACDFTUVa࿁࿫࿳ဢဨၛႇϘĀnr࿆࿒gleBracket;柩rowƀ;BL࿜࿝࿡憒ar;懥eftArrow;懄eiling;按oǵ࿹\0စbleBracket;柧nǔည\0နeeVector;楝ectorĀ;Bဝသ懂ar;楕loor;挋Āerိ၃eƀ;AVဵံြ抢rrow;憦ector;楛iangleƀ;BEၐၑၕ抳ar;槐qual;抵pƀDTVၣၮၸownVector;楏eeVector;楜ectorĀ;Bႂႃ憾ar;楔ectorĀ;B႑႒懀ar;楓Āpuႛ႞f;愝ndImplies;楰ightarrow;懛ĀchႹႼr;愛;憱leDelayed;槴ڀHOacfhimoqstuფჱჷჽᄙᄞᅑᅖᅡᅧᆵᆻᆿĀCcჩხHcy;䐩y;䐨FTcy;䐬cute;䅚ʀ;aeiyᄈᄉᄎᄓᄗ檼ron;䅠dil;䅞rc;䅜;䐡r;쀀𝔖ortȀDLRUᄪᄴᄾᅉownArrow»ОeftArrow»࢚ightArrow»࿝pArrow;憑gma;䎣allCircle;战pf;쀀𝕊ɲᅭ\0\0ᅰt;戚areȀ;ISUᅻᅼᆉᆯ斡ntersection;抓uĀbpᆏᆞsetĀ;Eᆗᆘ抏qual;抑ersetĀ;Eᆨᆩ抐qual;抒nion;抔cr;쀀𝒮ar;拆ȀbcmpᇈᇛሉላĀ;sᇍᇎ拐etĀ;Eᇍᇕqual;抆ĀchᇠህeedsȀ;ESTᇭᇮᇴᇿ扻qual;檰lantEqual;扽ilde;承Tháྌ;我ƀ;esሒሓሣ拑rsetĀ;Eሜም抃qual;抇et»ሓրHRSacfhiorsሾቄ቉ቕ቞ቱቶኟዂወዑORN耻Þ䃞ADE;愢ĀHc቎ቒcy;䐋y;䐦Ābuቚቜ;䀉;䎤ƀaeyብቪቯron;䅤dil;䅢;䐢r;쀀𝔗Āeiቻ኉Dzኀ\0ኇefore;戴a;䎘Ācn኎ኘkSpace;쀀  Space;怉ldeȀ;EFTካኬኲኼ戼qual;扃ullEqual;扅ilde;扈pf;쀀𝕋ipleDot;惛Āctዖዛr;쀀𝒯rok;䅦ૡዷጎጚጦ\0ጬጱ\0\0\0\0\0ጸጽ፷ᎅ\0᏿ᐄᐊᐐĀcrዻጁute耻Ú䃚rĀ;oጇገ憟cir;楉rǣጓ\0጖y;䐎ve;䅬Āiyጞጣrc耻Û䃛;䐣blac;䅰r;쀀𝔘rave耻Ù䃙acr;䅪Ādiፁ፩erĀBPፈ፝Āarፍፐr;䁟acĀekፗፙ;揟et;掵arenthesis;揝onĀ;P፰፱拃lus;抎Āgp፻፿on;䅲f;쀀𝕌ЀADETadps᎕ᎮᎸᏄϨᏒᏗᏳrrowƀ;BDᅐᎠᎤar;椒ownArrow;懅ownArrow;憕quilibrium;楮eeĀ;AᏋᏌ报rrow;憥ownáϳerĀLRᏞᏨeftArrow;憖ightArrow;憗iĀ;lᏹᏺ䏒on;䎥ing;䅮cr;쀀𝒰ilde;䅨ml耻Ü䃜ҀDbcdefosvᐧᐬᐰᐳᐾᒅᒊᒐᒖash;披ar;æ««y;䐒ashĀ;lᐻᐼ抩;櫦Āerᑃᑅ;拁ƀbtyᑌᑐᑺar;怖Ā;iᑏᑕcalȀBLSTᑡᑥᑪᑴar;戣ine;䁼eparator;杘ilde;所ThinSpace;怊r;쀀𝔙pf;쀀𝕍cr;쀀𝒱dash;抪ʀcefosᒧᒬᒱᒶᒼirc;䅴dge;拀r;
vendor: 7,828 bytes, line 952
952쀀𝔚pf;쀀𝕎cr;쀀𝒲Ȁfiosᓋᓐᓒᓘr;쀀𝔛;䎞pf;쀀𝕏cr;쀀𝒳ҀAIUacfosuᓱᓵᓹᓽᔄᔏᔔᔚᔠcy;䐯cy;䐇cy;䐮cute耻Ý䃝Āiyᔉᔍrc;䅶;䐫r;쀀𝔜pf;쀀𝕐cr;쀀𝒴ml;䅸ЀHacdefosᔵᔹᔿᕋᕏᕝᕠᕤcy;䐖cute;䅹Āayᕄᕉron;䅽;䐗ot;䅻Dzᕔ\0ᕛoWidtè૙a;䎖r;愨pf;愤cr;쀀𝒵௡ᖃᖊᖐ\0ᖰᖶᖿ\0\0\0\0ᗆᗛᗫᙟ᙭\0ᚕ᚛ᚲᚹ\0ᚾcute耻á䃡reve;䄃̀;Ediuyᖜᖝᖡᖣᖨᖭ戾;쀀∾̳;房rc耻â䃢te肻´̆;䐰lig耻æ䃦Ā;r²ᖺ;쀀𝔞rave耻à䃠ĀepᗊᗖĀfpᗏᗔsym;愵èᗓha;䎱ĀapᗟcĀclᗤᗧr;䄁g;樿ɤᗰ\0\0ᘊʀ;adsvᗺᗻᗿᘁᘇ戧nd;橕;橜lope;橘;橚΀;elmrszᘘᘙᘛᘞᘿᙏᙙ戠;榤e»ᘙsdĀ;aᘥᘦ戡ѡᘰᘲᘴᘶᘸᘺᘼᘾ;榨;榩;榪;榫;榬;榭;榮;榯tĀ;vᙅᙆ戟bĀ;dᙌᙍ抾;榝Āptᙔᙗh;戢»¹arr;捼Āgpᙣᙧon;䄅f;쀀𝕒΀;Eaeiop዁ᙻᙽᚂᚄᚇᚊ;橰cir;橯;扊d;手s;䀧roxĀ;e዁ᚒñᚃing耻å䃥ƀctyᚡᚦᚨr;쀀𝒶;䀪mpĀ;e዁ᚯñʈilde耻ã䃣ml耻ä䃤Āciᛂᛈoninôɲnt;樑ࠀNabcdefiklnoprsu᛭ᛱᜰ᜼ᝃᝈ᝸᝽០៦ᠹᡐᜍ᤽᥈ᥰot;櫭Ācrᛶ᜞kȀcepsᜀᜅᜍᜓong;扌psilon;䏶rime;怵imĀ;e᜚᜛戽q;拍Ŷᜢᜦee;抽edĀ;gᜬᜭ挅e»ᜭrkĀ;t፜᜷brk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓ᝛ᝡᝤᝨausĀ;eĊĉptyv;榰séᜌnoõēƀahwᝯ᝱ᝳ;䎲;愶een;扬r;쀀𝔟g΀costuvwឍឝឳេ៕៛៞ƀaiuបពរðݠrc;旯p»፱ƀdptឤឨឭot;樀lus;樁imes;樂ɱឹ\0\0ើcup;樆ar;昅riangleĀdu៍្own;施p;斳plus;樄eåᑄåᒭarow;植ƀako៭ᠦᠵĀcn៲ᠣkƀlst៺֫᠂ozenge;槫riangleȀ;dlr᠒᠓᠘᠝斴own;斾eft;旂ight;斸k;搣Ʊᠫ\0ᠳƲᠯ\0ᠱ;斒;斑4;斓ck;斈ĀeoᠾᡍĀ;qᡃᡆ쀀=⃥uiv;쀀≡⃥t;挐Ȁptwxᡙᡞᡧᡬf;쀀𝕓Ā;tᏋᡣom»Ꮜtie;拈؀DHUVbdhmptuvᢅᢖᢪᢻᣗᣛᣬ᣿ᤅᤊᤐᤡȀLRlrᢎᢐᢒᢔ;敗;敔;敖;敓ʀ;DUduᢡᢢᢤᢦᢨ敐;敦;敩;敤;敧ȀLRlrᢳᢵᢷᢹ;敝;敚;敜;教΀;HLRhlrᣊᣋᣍᣏᣑᣓᣕ救;敬;散;敠;敫;敢;敟ox;槉ȀLRlrᣤᣦᣨᣪ;敕;敒;攐;攌ʀ;DUduڽ᣷᣹᣻᣽;敥;敨;攬;攴inus;抟lus;択imes;抠ȀLRlrᤙᤛᤝ᤟;敛;敘;攘;攔΀;HLRhlrᤰᤱᤳᤵᤷ᤻᤹攂;敪;敡;敞;攼;攤;攜Āevģ᥂bar耻¦䂦Ȁceioᥑᥖᥚᥠr;쀀𝒷mi;恏mĀ;e᜚᜜lƀ;bhᥨᥩᥫ䁜;槅sub;柈Ŭᥴ᥾lĀ;e᥹᥺怢t»᥺pƀ;Eeįᦅᦇ;檮Ā;qۜۛೡᦧ\0᧨ᨑᨕᨲ\0ᨷᩐ\0\0᪴\0\0᫁\0\0ᬡᬮ᭍᭒\0᯽\0ᰌƀcpr᦭ᦲ᧝ute;䄇̀;abcdsᦿᧀᧄ᧊᧕᧙戩nd;橄rcup;橉Āau᧏᧒p;橋p;橇ot;橀;쀀∩︀Āeo᧢᧥t;恁îړȀaeiu᧰᧻ᨁᨅǰ᧵\0᧸s;橍on;䄍dil耻ç䃧rc;䄉psĀ;sᨌᨍ橌m;橐ot;䄋ƀdmnᨛᨠᨦil肻¸ƭptyv;榲t脀¢;eᨭᨮ䂢räƲr;쀀𝔠ƀceiᨽᩀᩍy;䑇ckĀ;mᩇᩈ朓ark»ᩈ;䏇r΀;Ecefms᩟᩠ᩢᩫ᪤᪪᪮旋;槃ƀ;elᩩᩪᩭ䋆q;扗eɡᩴ\0\0᪈rrowĀlr᩼᪁eft;憺ight;憻ʀRSacd᪒᪔᪖᪚᪟»ཇ;擈st;抛irc;抚ash;抝nint;樐id;櫯cir;槂ubsĀ;u᪻᪼晣it»᪼ˬ᫇᫔᫺\0ᬊonĀ;eᫍᫎ䀺Ā;qÇÆɭ᫙\0\0᫢aĀ;t᫞᫟䀬;䁀ƀ;fl᫨᫩᫫戁îᅠeĀmx᫱᫶ent»᫩eóɍǧ᫾\0ᬇĀ;dኻᬂot;橭nôɆƀfryᬐᬔᬗ;쀀𝕔oäɔ脀©;sŕᬝr;愗Āaoᬥᬩrr;憵ss;朗Ācuᬲᬷr;쀀𝒸Ābpᬼ᭄Ā;eᭁᭂ櫏;櫑Ā;eᭉᭊ櫐;櫒dot;拯΀delprvw᭠᭬᭷ᮂᮬᯔ᯹arrĀlr᭨᭪;椸;椵ɰ᭲\0\0᭵r;拞c;拟arrĀ;p᭿ᮀ憶;椽̀;bcdosᮏᮐᮖᮡᮥᮨ截rcap;橈Āauᮛᮞp;橆p;橊ot;抍r;橅;쀀∪︀Ȁalrv᮵ᮿᯞᯣrrĀ;mᮼᮽ憷;椼yƀevwᯇᯔᯘqɰᯎ\0\0ᯒreã᭳uã᭵ee;拎edge;拏en耻¤䂤earrowĀlrᯮ᯳eft»ᮀight»ᮽeäᯝĀciᰁᰇoninôǷnt;戱lcty;挭ঀAHabcdefhijlorstuwz᰸᰻᰿ᱝᱩᱵᲊᲞᲬᲷ᳻᳿ᴍᵻᶑᶫᶻ᷆᷍rò΁ar;楥Ȁglrs᱈ᱍ᱒᱔ger;怠eth;愸òᄳhĀ;vᱚᱛ怐»ऊūᱡᱧarow;椏aã̕Āayᱮᱳron;䄏;䐴ƀ;ao̲ᱼᲄĀgrʿᲁr;懊tseq;橷ƀglmᲑᲔᲘ耻°䂰ta;䎴ptyv;榱ĀirᲣᲨsht;楿;쀀𝔡arĀlrᲳᲵ»ࣜ»သʀaegsv᳂͸᳖᳜᳠mƀ;oș᳊᳔ndĀ;ș᳑uit;晦amma;䏝in;拲ƀ;io᳧᳨᳸䃷de脀÷;o᳧ᳰntimes;拇nø᳷cy;䑒cɯᴆ\0\0ᴊrn;挞op;挍ʀlptuwᴘᴝᴢᵉᵕlar;䀤f;쀀𝕕ʀ;emps̋ᴭᴷᴽᵂqĀ;d͒ᴳot;扑inus;戸lus;戔quare;抡blebarwedgåúnƀadhᄮᵝᵧownarrowóᲃarpoonĀlrᵲᵶefôᲴighôᲶŢᵿᶅkaro÷གɯᶊ\0\0ᶎrn;挟op;挌ƀcotᶘᶣᶦĀryᶝᶡ;쀀𝒹;䑕l;槶rok;䄑Ādrᶰᶴot;拱iĀ;fᶺ᠖斿Āah᷀᷃ròЩaòྦangle;榦Āci᷒ᷕy;䑟grarr;柿ऀDacdefglmnopqrstuxḁḉḙḸոḼṉṡṾấắẽỡἪἷὄ὎὚ĀDoḆᴴoôᲉĀcsḎḔute耻é䃩ter;橮ȀaioyḢḧḱḶron;䄛rĀ;cḭḮ扖耻ê䃪lon;払;䑍ot;䄗ĀDrṁṅot;扒;쀀𝔢ƀ;rsṐṑṗ檚ave耻è䃨Ā;dṜṝ檖ot;檘Ȁ;ilsṪṫṲṴ檙nters;揧;愓Ā;dṹṺ檕ot;檗ƀapsẅẉẗcr;䄓tyƀ;svẒẓẕ戅et»ẓpĀ1;ẝẤijạả;怄;怅怃ĀgsẪẬ;䅋p;怂ĀgpẴẸon;䄙f;쀀𝕖ƀalsỄỎỒrĀ;sỊị拕l;槣us;橱iƀ;lvỚớở䎵on»ớ;䏵ȀcsuvỪỳἋἣĀioữḱrc»Ḯɩỹ\0\0ỻíՈantĀglἂἆtr»ṝess»Ṻƀaeiἒ἖Ἒls;䀽st;扟vĀ;DȵἠD;橸parsl;槥ĀDaἯἳot;打rr;楱ƀcdiἾὁỸr;愯oô͒ĀahὉὋ;䎷耻ð䃰Āmrὓὗl耻ë䃫o;悬ƀcipὡὤὧl;䀡sôծĀeoὬὴctatioîՙnentialåչৡᾒ\0ᾞ\0ᾡᾧ\0\0ῆῌ\0ΐ\0ῦῪ \0 ⁚llingdotseñṄy;䑄male;晀ƀilrᾭᾳ῁lig;耀ffiɩᾹ\0\0᾽g;耀ffig;耀ffl;쀀𝔣lig;耀filig;쀀fjƀaltῙ῜ῡt;晭ig;耀flns;斱of;䆒ǰ΅\0ῳf;쀀𝕗ĀakֿῷĀ;vῼ´拔;櫙artint;樍Āao‌⁕Ācs‑⁒ႉ‸⁅⁈\0⁐β•‥‧‪‬\0‮耻½䂽;慓耻¼䂼;慕;慙;慛Ƴ‴\0‶;慔;慖ʴ‾⁁\0\0⁃耻¾䂾;慗;慜5;慘ƶ⁌\0⁎;慚;慝8;慞l;恄wn;挢cr;쀀𝒻ࢀEabcdefgijlnorstv₂₉₟₥₰₴⃰⃵⃺⃿℃ℒℸ̗ℾ⅒↞Ā;lٍ₇;檌ƀcmpₐₕ₝ute;䇵maĀ;dₜ᳚䎳;檆reve;䄟Āiy₪₮rc;䄝;䐳ot;䄡Ȁ;lqsؾق₽⃉ƀ;qsؾٌ⃄lanô٥Ȁ;cdl٥⃒⃥⃕c;檩otĀ;o⃜⃝檀Ā;l⃢⃣檂;檄Ā;e⃪⃭쀀⋛︀s;檔r;쀀𝔤Ā;gٳ؛mel;愷cy;䑓Ȁ;Eajٚℌℎℐ;檒;檥;檤ȀEaesℛℝ℩ℴ;扩pĀ;p℣ℤ檊rox»ℤĀ;q℮ℯ檈Ā;q℮ℛim;拧pf;쀀𝕘Āci⅃ⅆr;愊mƀ;el٫ⅎ⅐;檎;檐茀>;cdlqr׮ⅠⅪⅮⅳⅹĀciⅥⅧ;檧r;橺ot;拗Par;榕uest;橼ʀadelsↄⅪ←ٖ↛ǰ↉\0↎proø₞r;楸qĀlqؿ↖lesó₈ií٫Āen↣↭rtneqq;쀀≩︀Å↪ԀAabcefkosy⇄⇇⇱⇵⇺∘∝∯≨≽ròΠȀilmr⇐⇔⇗⇛rsðᒄf»․ilôکĀdr⇠⇤cy;䑊ƀ;cwࣴ⇫⇯ir;楈;憭ar;意irc;䄥ƀalr∁∎∓rtsĀ;u∉∊晥it»∊lip;怦con;抹r;쀀𝔥sĀew∣∩arow;椥arow;椦ʀamopr∺∾≃≞≣rr;懿tht;戻kĀlr≉≓eftarrow;憩ightarrow;憪f;쀀𝕙bar;怕ƀclt≯≴≸r;쀀𝒽asè⇴rok;䄧Ābp⊂⊇ull;恃hen»ᱛૡ⊣\0⊪\0⊸⋅⋎\0⋕⋳\0\0⋸⌢⍧⍢⍿\0⎆⎪⎴cute耻í䃭ƀ;iyݱ⊰⊵rc耻î䃮;䐸Ācx⊼⊿y;䐵cl耻¡䂡ĀfrΟ⋉;쀀𝔦rave耻ì䃬Ȁ;inoܾ⋝⋩⋮Āin⋢⋦nt;樌t;戭fin;槜ta;愩lig;䄳ƀaop⋾⌚⌝ƀcgt⌅⌈⌗r;䄫ƀelpܟ⌏⌓inåގarôܠh;䄱f;抷ed;䆵ʀ;cfotӴ⌬⌱⌽⍁are;愅inĀ;t⌸⌹戞ie;槝doô⌙ʀ;celpݗ⍌⍐⍛⍡al;抺Āgr⍕⍙eróᕣã⍍arhk;樗rod;樼Ȁcgpt⍯⍲⍶⍻y;䑑on;䄯f;쀀𝕚a;䎹uest耻¿䂿Āci⎊⎏r;쀀𝒾nʀ;EdsvӴ⎛⎝⎡ӳ;拹ot;拵Ā;v⎦⎧拴;拳Ā;iݷ⎮lde;䄩ǫ⎸\0⎼cy;䑖l耻ï䃯̀cfmosu⏌⏗⏜⏡⏧⏵Āiy⏑⏕rc;䄵;䐹r;쀀𝔧ath;䈷pf;쀀𝕛ǣ⏬\0⏱r;쀀𝒿rcy;䑘kcy;䑔Ѐacfghjos␋␖␢␧␭␱␵␻ppaĀ;v␓␔䎺;䏰Āey␛␠dil;䄷;䐺r;쀀𝔨reen;䄸cy;䑅cy;䑜pf;쀀𝕜cr;쀀𝓀஀ABEHabcdefghjlmnoprstuv⑰⒁⒆⒍⒑┎┽╚▀♎♞♥♹♽⚚⚲⛘❝❨➋⟀⠁⠒ƀart⑷⑺⑼rò৆òΕail;椛arr;椎Ā;gঔ⒋;檋ar;楢ॣ⒥\0⒪\0⒱\0\0\0\0\0⒵Ⓔ\0ⓆⓈⓍ\0⓹ute;䄺mptyv;榴raîࡌbda;䎻gƀ;dlࢎⓁⓃ;榑åࢎ;檅uo耻«䂫rЀ;bfhlpst࢙ⓞⓦⓩ⓫⓮⓱⓵Ā;f࢝ⓣs;椟s;椝ë≒p;憫l;椹im;楳l;憢ƀ;ae⓿─┄檫il;椙Ā;s┉┊檭;쀀⪭︀ƀabr┕┙┝rr;椌rk;杲Āak┢┬cĀek┨┪;䁻;䁛Āes┱┳;榋lĀdu┹┻;榏;榍Ȁaeuy╆╋╖╘ron;䄾Ādi═╔il;䄼ìࢰâ┩;
vendor: 4,294 bytes, line 952
952䐻Ȁcqrs╣╦╭╽a;椶uoĀ;rนᝆĀdu╲╷har;楧shar;楋h;憲ʀ;fgqs▋▌উ◳◿扤tʀahlrt▘▤▷◂◨rrowĀ;t࢙□aé⓶arpoonĀdu▯▴own»њp»०eftarrows;懇ightƀahs◍◖◞rrowĀ;sࣴࢧarpoonó྘quigarro÷⇰hreetimes;拋ƀ;qs▋ও◺lanôবʀ;cdgsব☊☍☝☨c;檨otĀ;o☔☕橿Ā;r☚☛檁;檃Ā;e☢☥쀀⋚︀s;檓ʀadegs☳☹☽♉♋pproøⓆot;拖qĀgq♃♅ôউgtò⒌ôছiíলƀilr♕࣡♚sht;楼;쀀𝔩Ā;Eজ♣;檑š♩♶rĀdu▲♮Ā;l॥♳;楪lk;斄cy;䑙ʀ;achtੈ⚈⚋⚑⚖rò◁orneòᴈard;楫ri;旺Āio⚟⚤dot;䅀ustĀ;a⚬⚭掰che»⚭ȀEaes⚻⚽⛉⛔;扨pĀ;p⛃⛄檉rox»⛄Ā;q⛎⛏檇Ā;q⛎⚻im;拦Ѐabnoptwz⛩⛴⛷✚✯❁❇❐Ānr⛮⛱g;柬r;懽rëࣁgƀlmr⛿✍✔eftĀar০✇ightá৲apsto;柼ightá৽parrowĀlr✥✩efô⓭ight;憬ƀafl✶✹✽r;榅;쀀𝕝us;樭imes;樴š❋❏st;戗áፎƀ;ef❗❘᠀旊nge»❘arĀ;l❤❥䀨t;榓ʀachmt❳❶❼➅➇ròࢨorneòᶌarĀ;d྘➃;業;怎ri;抿̀achiqt➘➝ੀ➢➮➻quo;怹r;쀀𝓁mƀ;egল➪➬;檍;檏Ābu┪➳oĀ;rฟ➹;怚rok;䅂萀<;cdhilqrࠫ⟒☹⟜⟠⟥⟪⟰Āci⟗⟙;檦r;橹reå◲mes;拉arr;楶uest;橻ĀPi⟵⟹ar;榖ƀ;ef⠀भ᠛旃rĀdu⠇⠍shar;楊har;楦Āen⠗⠡rtneqq;쀀≨︀Å⠞܀Dacdefhilnopsu⡀⡅⢂⢎⢓⢠⢥⢨⣚⣢⣤ઃ⣳⤂Dot;戺Ȁclpr⡎⡒⡣⡽r耻¯䂯Āet⡗⡙;時Ā;e⡞⡟朠se»⡟Ā;sျ⡨toȀ;dluျ⡳⡷⡻owîҌefôएðᏑker;斮Āoy⢇⢌mma;権;䐼ash;怔asuredangle»ᘦr;쀀𝔪o;愧ƀcdn⢯⢴⣉ro耻µ䂵Ȁ;acdᑤ⢽⣀⣄sôᚧir;櫰ot肻·Ƶusƀ;bd⣒ᤃ⣓戒Ā;uᴼ⣘;横ţ⣞⣡p;櫛ò−ðઁĀdp⣩⣮els;抧f;쀀𝕞Āct⣸⣽r;쀀𝓂pos»ᖝƀ;lm⤉⤊⤍䎼timap;抸ఀGLRVabcdefghijlmoprstuvw⥂⥓⥾⦉⦘⧚⧩⨕⨚⩘⩝⪃⪕⪤⪨⬄⬇⭄⭿⮮ⰴⱧⱼ⳩Āgt⥇⥋;쀀⋙̸Ā;v⥐௏쀀≫⃒ƀelt⥚⥲⥶ftĀar⥡⥧rrow;懍ightarrow;懎;쀀⋘̸Ā;v⥻ే쀀≪⃒ightarrow;懏ĀDd⦎⦓ash;抯ash;抮ʀbcnpt⦣⦧⦬⦱⧌la»˞ute;䅄g;쀀∠⃒ʀ;Eiop඄⦼⧀⧅⧈;쀀⩰̸d;쀀≋̸s;䅉roø඄urĀ;a⧓⧔普lĀ;s⧓ସdz⧟\0⧣p肻 ଷmpĀ;e௹ఀʀaeouy⧴⧾⨃⨐⨓ǰ⧹\0⧻;橃on;䅈dil;䅆ngĀ;dൾ⨊ot;쀀⩭̸p;橂;䐽ash;怓΀;Aadqsxஒ⨩⨭⨻⩁⩅⩐rr;懗rĀhr⨳⨶k;椤Ā;oᏲᏰot;쀀≐̸uiöୣĀei⩊⩎ar;椨í஘istĀ;s஠டr;쀀𝔫ȀEest௅⩦⩹⩼ƀ;qs஼⩭௡ƀ;qs஼௅⩴lanô௢ií௪Ā;rஶ⪁»ஷƀAap⪊⪍⪑rò⥱rr;憮ar;櫲ƀ;svྍ⪜ྌĀ;d⪡⪢拼;拺cy;䑚΀AEadest⪷⪺⪾⫂⫅⫶⫹rò⥦;쀀≦̸rr;憚r;急Ȁ;fqs఻⫎⫣⫯tĀar⫔⫙rro÷⫁ightarro÷⪐ƀ;qs఻⪺⫪lanôౕĀ;sౕ⫴»శiíౝĀ;rవ⫾iĀ;eచథiäඐĀpt⬌⬑f;쀀𝕟膀¬;in⬙⬚⬶䂬nȀ;Edvஉ⬤⬨⬮;쀀⋹̸ot;쀀⋵̸ǡஉ⬳⬵;拷;拶iĀ;vಸ⬼ǡಸ⭁⭃;拾;拽ƀaor⭋⭣⭩rȀ;ast୻⭕⭚⭟lleì୻l;쀀⫽⃥;쀀∂̸lint;樔ƀ;ceಒ⭰⭳uåಥĀ;cಘ⭸Ā;eಒ⭽ñಘȀAait⮈⮋⮝⮧rò⦈rrƀ;cw⮔⮕⮙憛;쀀⤳̸;쀀↝̸ghtarrow»⮕riĀ;eೋೖ΀chimpqu⮽⯍⯙⬄୸⯤⯯Ȁ;cerല⯆ഷ⯉uå൅;쀀𝓃ortɭ⬅\0\0⯖ará⭖mĀ;e൮⯟Ā;q൴൳suĀbp⯫⯭å೸åഋƀbcp⯶ⰑⰙȀ;Ees⯿ⰀഢⰄ抄;쀀⫅̸etĀ;eഛⰋqĀ;qണⰀcĀ;eലⰗñസȀ;EesⰢⰣൟⰧ抅;쀀⫆̸etĀ;e൘ⰮqĀ;qൠⰣȀgilrⰽⰿⱅⱇìௗlde耻ñ䃱çృiangleĀlrⱒⱜeftĀ;eచⱚñదightĀ;eೋⱥñ೗Ā;mⱬⱭ䎽ƀ;esⱴⱵⱹ䀣ro;愖p;怇ҀDHadgilrsⲏⲔⲙⲞⲣⲰⲶⳓⳣash;抭arr;椄p;쀀≍⃒ash;抬ĀetⲨⲬ;쀀≥⃒;쀀>⃒nfin;槞ƀAetⲽⳁⳅrr;椂;쀀≤⃒Ā;rⳊⳍ쀀<⃒ie;쀀⊴⃒ĀAtⳘⳜrr;椃rie;쀀⊵⃒im;쀀∼⃒ƀAan⳰⳴ⴂrr;懖rĀhr⳺⳽k;椣Ā;oᏧᏥear;椧ቓ᪕\0\0\0\0\0\0\0\0\0\0\0\0\0ⴭ\0ⴸⵈⵠⵥ⵲ⶄᬇ\0\0ⶍⶫ\0ⷈⷎ\0ⷜ⸙⸫⸾⹃Ācsⴱ᪗ute耻ó䃳ĀiyⴼⵅrĀ;c᪞ⵂ耻ô䃴;䐾ʀabios᪠ⵒⵗLjⵚlac;䅑v;樸old;榼lig;䅓Ācr⵩⵭ir;榿;쀀𝔬ͯ⵹\0\0⵼\0ⶂn;䋛ave耻ò䃲;槁Ābmⶈ෴ar;榵Ȁacitⶕ⶘ⶥⶨrò᪀Āir⶝ⶠr;榾oss;榻nå๒;槀ƀaeiⶱⶵⶹcr;䅍ga;䏉ƀcdnⷀⷅǍron;䎿;榶pf;쀀𝕠ƀaelⷔ⷗ǒr;榷rp;榹΀;adiosvⷪⷫⷮ⸈⸍⸐⸖戨rò᪆Ȁ;efmⷷⷸ⸂⸅橝rĀ;oⷾⷿ愴f»ⷿ耻ª䂪耻º䂺gof;抶r;橖lope;橗;橛ƀclo⸟⸡⸧ò⸁ash耻ø䃸l;折iŬⸯ⸴de耻õ䃵esĀ;aǛ⸺s;樶ml耻ö䃶bar;挽ૡ⹞\0⹽\0⺀⺝\0⺢⺹\0\0⻋ຜ\0⼓\0\0⼫⾼\0⿈rȀ;
vendor: 6,210 bytes, line 952
952astЃ⹧⹲຅脀¶;l⹭⹮䂶leìЃɩ⹸\0\0⹻m;櫳;櫽y;䐿rʀcimpt⺋⺏⺓ᡥ⺗nt;䀥od;䀮il;怰enk;怱r;쀀𝔭ƀimo⺨⺰⺴Ā;v⺭⺮䏆;䏕maô੶ne;明ƀ;tv⺿⻀⻈䏀chfork»´;䏖Āau⻏⻟nĀck⻕⻝kĀ;h⇴⻛;愎ö⇴sҀ;abcdemst⻳⻴ᤈ⻹⻽⼄⼆⼊⼎䀫cir;樣ir;樢Āouᵀ⼂;樥;橲n肻±ຝim;樦wo;樧ƀipu⼙⼠⼥ntint;樕f;쀀𝕡nd耻£䂣Ԁ;Eaceinosu່⼿⽁⽄⽇⾁⾉⾒⽾⾶;檳p;檷uå໙Ā;c໎⽌̀;acens່⽙⽟⽦⽨⽾pproø⽃urlyeñ໙ñ໎ƀaes⽯⽶⽺pprox;檹qq;檵im;拨iíໟmeĀ;s⾈ຮ怲ƀEas⽸⾐⽺ð⽵ƀdfp໬⾙⾯ƀals⾠⾥⾪lar;挮ine;挒urf;挓Ā;t໻⾴ï໻rel;抰Āci⿀⿅r;쀀𝓅;䏈ncsp;怈̀fiopsu⿚⋢⿟⿥⿫⿱r;쀀𝔮pf;쀀𝕢rime;恗cr;쀀𝓆ƀaeo⿸〉〓tĀei⿾々rnionóڰnt;樖stĀ;e【】䀿ñἙô༔઀ABHabcdefhilmnoprstux぀けさすムㄎㄫㅇㅢㅲㆎ㈆㈕㈤㈩㉘㉮㉲㊐㊰㊷ƀartぇおがròႳòϝail;検aròᱥar;楤΀cdenqrtとふへみわゔヌĀeuねぱ;쀀∽̱te;䅕iãᅮmptyv;榳gȀ;del࿑らるろ;榒;榥å࿑uo耻»䂻rր;abcfhlpstw࿜ガクシスゼゾダッデナp;極Ā;f࿠ゴs;椠;椳s;椞ë≝ð✮l;楅im;楴l;憣;憝Āaiパフil;椚oĀ;nホボ戶aló༞ƀabrョリヮrò៥rk;杳ĀakンヽcĀekヹ・;䁽;䁝Āes㄂㄄;榌lĀduㄊㄌ;榎;榐Ȁaeuyㄗㄜㄧㄩron;䅙Ādiㄡㄥil;䅗ì࿲âヺ;䑀Ȁclqsㄴㄷㄽㅄa;椷dhar;楩uoĀ;rȎȍh;憳ƀacgㅎㅟངlȀ;ipsླྀㅘㅛႜnåႻarôྩt;断ƀilrㅩဣㅮsht;楽;쀀𝔯ĀaoㅷㆆrĀduㅽㅿ»ѻĀ;l႑ㆄ;楬Ā;vㆋㆌ䏁;䏱ƀgns㆕ㇹㇼht̀ahlrstㆤㆰ㇂㇘㇤㇮rrowĀ;t࿜ㆭaéトarpoonĀduㆻㆿowîㅾp»႒eftĀah㇊㇐rrowó࿪arpoonóՑightarrows;應quigarro÷ニhreetimes;拌g;䋚ingdotseñἲƀahm㈍㈐㈓rò࿪aòՑ;怏oustĀ;a㈞㈟掱che»㈟mid;櫮Ȁabpt㈲㈽㉀㉒Ānr㈷㈺g;柭r;懾rëဃƀafl㉇㉊㉎r;榆;쀀𝕣us;樮imes;樵Āap㉝㉧rĀ;g㉣㉤䀩t;榔olint;樒arò㇣Ȁachq㉻㊀Ⴜ㊅quo;怺r;쀀𝓇Ābu・㊊oĀ;rȔȓƀhir㊗㊛㊠reåㇸmes;拊iȀ;efl㊪ၙᠡ㊫方tri;槎luhar;楨;愞ൡ㋕㋛㋟㌬㌸㍱\0㍺㎤\0\0㏬㏰\0㐨㑈㑚㒭㒱㓊㓱\0㘖\0\0㘳cute;䅛quï➺Ԁ;Eaceinpsyᇭ㋳㋵㋿㌂㌋㌏㌟㌦㌩;檴ǰ㋺\0㋼;檸on;䅡uåᇾĀ;dᇳ㌇il;䅟rc;䅝ƀEas㌖㌘㌛;檶p;檺im;择olint;樓iíሄ;䑁otƀ;be㌴ᵇ㌵担;橦΀Aacmstx㍆㍊㍗㍛㍞㍣㍭rr;懘rĀhr㍐㍒ë∨Ā;oਸ਼਴t耻§䂧i;䀻war;椩mĀin㍩ðnuóñt;朶rĀ;o㍶⁕쀀𝔰Ȁacoy㎂㎆㎑㎠rp;景Āhy㎋㎏cy;䑉;䑈rtɭ㎙\0\0㎜iäᑤaraì⹯耻­䂭Āgm㎨㎴maƀ;fv㎱㎲㎲䏃;䏂Ѐ;deglnprካ㏅㏉㏎㏖㏞㏡㏦ot;橪Ā;q኱ኰĀ;E㏓㏔檞;檠Ā;E㏛㏜檝;檟e;扆lus;樤arr;楲aròᄽȀaeit㏸㐈㐏㐗Āls㏽㐄lsetmé㍪hp;樳parsl;槤Ādlᑣ㐔e;挣Ā;e㐜㐝檪Ā;s㐢㐣檬;쀀⪬︀ƀflp㐮㐳㑂tcy;䑌Ā;b㐸㐹䀯Ā;a㐾㐿槄r;挿f;쀀𝕤aĀdr㑍ЂesĀ;u㑔㑕晠it»㑕ƀcsu㑠㑹㒟Āau㑥㑯pĀ;sᆈ㑫;쀀⊓︀pĀ;sᆴ㑵;쀀⊔︀uĀbp㑿㒏ƀ;esᆗᆜ㒆etĀ;eᆗ㒍ñᆝƀ;esᆨᆭ㒖etĀ;eᆨ㒝ñᆮƀ;afᅻ㒦ְrť㒫ֱ»ᅼaròᅈȀcemt㒹㒾㓂㓅r;쀀𝓈tmîñiì㐕aræᆾĀar㓎㓕rĀ;f㓔ឿ昆Āan㓚㓭ightĀep㓣㓪psiloîỠhé⺯s»⡒ʀbcmnp㓻㕞ሉ㖋㖎Ҁ;Edemnprs㔎㔏㔑㔕㔞㔣㔬㔱㔶抂;櫅ot;檽Ā;dᇚ㔚ot;櫃ult;櫁ĀEe㔨㔪;櫋;把lus;檿arr;楹ƀeiu㔽㕒㕕tƀ;en㔎㕅㕋qĀ;qᇚ㔏eqĀ;q㔫㔨m;櫇Ābp㕚㕜;櫕;櫓c̀;acensᇭ㕬㕲㕹㕻㌦pproø㋺urlyeñᇾñᇳƀaes㖂㖈㌛pproø㌚qñ㌗g;晪ڀ123;Edehlmnps㖩㖬㖯ሜ㖲㖴㗀㗉㗕㗚㗟㗨㗭耻¹䂹耻²䂲耻³䂳;櫆Āos㖹㖼t;檾ub;櫘Ā;dሢ㗅ot;櫄sĀou㗏㗒l;柉b;櫗arr;楻ult;櫂ĀEe㗤㗦;櫌;抋lus;櫀ƀeiu㗴㘉㘌tƀ;enሜ㗼㘂qĀ;qሢ㖲eqĀ;q㗧㗤m;櫈Ābp㘑㘓;櫔;櫖ƀAan㘜㘠㘭rr;懙rĀhr㘦㘨ë∮Ā;oਫ਩war;椪lig耻ß䃟௡㙑㙝㙠ዎ㙳㙹\0㙾㛂\0\0\0\0\0㛛㜃\0㜉㝬\0\0\0㞇ɲ㙖\0\0㙛get;挖;䏄rë๟ƀaey㙦㙫㙰ron;䅥dil;䅣;䑂lrec;挕r;쀀𝔱Ȁeiko㚆㚝㚵㚼Dz㚋\0㚑eĀ4fኄኁaƀ;sv㚘㚙㚛䎸ym;䏑Ācn㚢㚲kĀas㚨㚮pproø዁im»ኬsðኞĀas㚺㚮ð዁rn耻þ䃾Ǭ̟㛆⋧es膀×;bd㛏㛐㛘䃗Ā;aᤏ㛕r;樱;樰ƀeps㛡㛣㜀á⩍Ȁ;bcf҆㛬㛰㛴ot;挶ir;櫱Ā;o㛹㛼쀀𝕥rk;櫚á㍢rime;怴ƀaip㜏㜒㝤dåቈ΀adempst㜡㝍㝀㝑㝗㝜㝟ngleʀ;dlqr㜰㜱㜶㝀㝂斵own»ᶻeftĀ;e⠀㜾ñम;扜ightĀ;e㊪㝋ñၚot;旬inus;樺lus;樹b;槍ime;樻ezium;揢ƀcht㝲㝽㞁Āry㝷㝻;쀀𝓉;䑆cy;䑛rok;䅧Āio㞋㞎xô᝷headĀlr㞗㞠eftarro÷ࡏightarrow»ཝऀAHabcdfghlmoprstuw㟐㟓㟗㟤㟰㟼㠎㠜㠣㠴㡑㡝㡫㢩㣌㣒㣪㣶ròϭar;楣Ācr㟜㟢ute耻ú䃺òᅐrǣ㟪\0㟭y;䑞ve;䅭Āiy㟵㟺rc耻û䃻;䑃ƀabh㠃㠆㠋ròᎭlac;䅱aòᏃĀir㠓㠘sht;楾;쀀𝔲rave耻ù䃹š㠧㠱rĀlr㠬㠮»ॗ»ႃlk;斀Āct㠹㡍ɯ㠿\0\0㡊rnĀ;e㡅㡆挜r»㡆op;挏ri;旸Āal㡖㡚cr;䅫肻¨͉Āgp㡢㡦on;䅳f;쀀𝕦̀adhlsuᅋ㡸㡽፲㢑㢠ownáᎳarpoonĀlr㢈㢌efô㠭ighô㠯iƀ;hl㢙㢚㢜䏅»ᏺon»㢚parrows;懈ƀcit㢰㣄㣈ɯ㢶\0\0㣁rnĀ;e㢼㢽挝r»㢽op;挎ng;䅯ri;旹cr;쀀𝓊ƀdir㣙㣝㣢ot;拰lde;䅩iĀ;f㜰㣨»᠓Āam㣯㣲rò㢨l耻ü䃼angle;榧ހABDacdeflnoprsz㤜㤟㤩㤭㦵㦸㦽㧟㧤㧨㧳㧹㧽㨁㨠ròϷarĀ;v㤦㤧櫨;櫩asèϡĀnr㤲㤷grt;榜΀eknprst㓣㥆㥋㥒㥝㥤㦖appá␕othinçẖƀhir㓫⻈㥙opô⾵Ā;hᎷ㥢ïㆍĀiu㥩㥭gmá㎳Ābp㥲㦄setneqĀ;q㥽㦀쀀⊊︀;쀀⫋︀setneqĀ;q㦏㦒쀀⊋︀;쀀⫌︀Āhr㦛㦟etá㚜iangleĀlr㦪㦯eft»थight»ၑy;䐲ash»ံƀelr㧄㧒㧗ƀ;beⷪ㧋㧏ar;抻q;扚lip;拮Ābt㧜ᑨaòᑩr;쀀𝔳tré㦮suĀbp㧯㧱»ജ»൙pf;쀀𝕧roð໻tré㦴Ācu㨆㨋r;쀀𝓋Ābp㨐㨘nĀEe㦀㨖»㥾nĀEe㦒㨞»㦐igzag;榚΀cefoprs㨶㨻㩖㩛㩔㩡㩪irc;䅵Ādi㩀㩑Ābg㩅㩉ar;機eĀ;qᗺ㩏;扙erp;愘r;쀀𝔴pf;쀀𝕨Ā;eᑹ㩦atèᑹcr;쀀𝓌ૣណ㪇\0㪋\0㪐㪛\0\0㪝㪨㪫㪯\0\0㫃㫎\0㫘ៜ៟tré៑r;쀀𝔵ĀAa㪔㪗ròσrò৶;䎾ĀAa㪡㪤ròθrò৫að✓is;拻ƀdptឤ㪵㪾Āfl㪺ឩ;쀀𝕩imåឲĀAa㫇㫊ròώròਁĀcq㫒ីr;쀀𝓍Āpt៖㫜ré។Ѐacefiosu㫰㫽㬈㬌㬑㬕㬛㬡cĀuy㫶㫻te耻ý䃽;䑏Āiy㬂㬆rc;䅷;䑋n耻¥䂥r;쀀𝔶cy;䑗pf;쀀𝕪cr;쀀𝓎Ācm㬦㬩y;䑎l耻ÿ䃿Ԁacdefhiosw㭂㭈㭔㭘㭤㭩㭭㭴㭺㮀cute;䅺Āay㭍㭒ron;䅾;䐷ot;䅼Āet㭝㭡træᕟa;䎶r;쀀𝔷cy;䐶grarr;懝pf;쀀𝕫cr;쀀𝓏Ājn㮅㮇;怍j;怌
952'.split("").map(t=>t.charCodeAt(0))),MD=new Uint16Array("Ȁaglq	��\x1BÉ­�\0\0�p;䀦os;䀧t;䀾t;䀼uot;䀢".split("").map(t=>t.charCodeAt(0)));var U1;const uwe=new Map([[0,65533],[128,8364],[130,8218],[131,402],[132,8222],[133,8230],[134,8224],[135,8225],[136,710],[137,8240],[138,352],[139,8249],[140,338],[142,381],[145,8216],[146,8217],[147,8220],[148,8221],[149,8226],[150,8211],[151,8212],[152,732],[153,8482],[154,353],[155,8250],[156,339],[158,382],[159,376]]),T2=(U1=String.fromCodePoint)!==null&&U1!==void 0?U1:function(t){let e="";return t>65535&&(t-=65536,e+=String.fromCharCode(t>>>10&1023|55296),t=56320|t&1023),e+=String.fromCharCode(t),e};function DD(t){var e;return t>=55296&&t<=57343||t>1114111?65533:(e=uwe.get(t))!==null&&e!==void 0?e:t}var _r;(function(t){t[t.NUM=35]="NUM",t[t.SEMI=59]="SEMI",t[t.EQUALS=61]="EQUALS",t[t.ZERO=48]="ZERO",t[t.NINE=57]="NINE",t[t.LOWER_A=97]="LOWER_A",t[t.LOWER_F=102]="LOWER_F",t[t.LOWER_X=120]="LOWER_X",t[t.LOWER_Z=122]="LOWER_Z",t[t.UPPER_A=65]="UPPER_A",t[t.UPPER_F=70]="UPPER_F",t[t.UPPER_Z=90]="UPPER_Z"})(_r||(_r={}));const dwe=32;var Us;(function(t){t[t.VALUE_LENGTH=49152]="VALUE_LENGTH",t[t.BRANCH_LENGTH=16256]="BRANCH_LENGTH",t[t.JUMP_TABLE=127]="JUMP_TABLE"})(Us||(Us={}));function A2(t){return t>=_r.ZERO&&t<=_r.NINE}function hwe(t){return t>=_r.UPPER_A&&t<=_r.UPPER_F||t>=_r.LOWER_A&&t<=_r.LOWER_F}function pwe(t){return t>=_r.UPPER_A&&t<=_r.UPPER_Z||t>=_r.LOWER_A&&t<=_r.LOWER_Z||A2(t)}function fwe(t){return t===_r.EQUALS||pwe(t)}var Tr;(function(t){t[t.EntityStart=0]="EntityStart",t[t.NumericStart=1]="NumericStart",t[t.NumericDecimal=2]="NumericDecimal",t[t.NumericHex=3]="NumericHex",t[t.NamedEntity=4]="NamedEntity"})(Tr||(Tr={}));var bl;(function(t){t[t.Legacy=0]="Legacy",t[t.Strict=1]="Strict",t[t.Attribute=2]="Attribute"})(bl||(bl={}));class mwe{constructor(e,r,n){this.decodeTree=e,this.emitCodePoint=r,this.errors=n,this.state=Tr.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=bl.Strict}startEntity(e){this.decodeMode=e,this.state=Tr.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(e,r){switch(this.state){case Tr.EntityStart:return e.charCodeAt(r)===_r.NUM?(this.state=Tr.NumericStart,this.consumed+=1,this.stateNumericStart(e,r+1)):(this.state=Tr.NamedEntity,this.stateNamedEntity(e,r));case Tr.NumericStart:return this.stateNumericStart(e,r);case Tr.NumericDecimal:return this.stateNumericDecimal(e,r);case Tr.NumericHex:return this.stateNumericHex(e,r);case Tr.NamedEntity:return this.stateNamedEntity(e,r)}}stateNumericStart(e,r){return r>=e.length?-1:(e.charCodeAt(r)|dwe)===_r.LOWER_X?(this.state=Tr.NumericHex,this.consumed+=1,this.stateNumericHex(e,r+1)):(this.state=Tr.NumericDecimal,this.stateNumericDecimal(e,r))}addToNumericResult(e,r,n,s){if(r!==n){const i=n-r;this.result=this.result*Math.pow(s,i)+parseInt(e.substr(r,i),s),this.consumed+=i}}stateNumericHex(e,r){const n=r;for(;r<e.length;){const s=e.charCodeAt(r);if(A2(s)||hwe(s))r+=1;else return this.addToNumericResult(e,n,r,16),this.emitNumericEntity(s,3)}return this.addToNumericResult(e,n,r,16),-1}stateNumericDecimal(e,r){const n=r;for(;r<e.length;){const s=e.charCodeAt(r);if(A2(s))r+=1;else return this.addToNumericResult(e,n,r,10),this.emitNumericEntity(s,2)}return this.addToNumericResult(e,n,r,10),-1}emitNumericEntity(e,r){var n;if(this.consumed<=r)return(n=this.errors)===null||n===void 0||n.absenceOfDigitsInNumericCharacterReference(this.consumed),0;if(e===_r.SEMI)this.consumed+=1;else if(this.decodeMode===bl.Strict)return 0;return this.emitCodePoint(DD(this.result),this.consumed),this.errors&&(e!==_r.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}stateNamedEntity(e,r){const{decodeTree:n}=this;let s=n[this.treeIndex],i=(s&Us.VALUE_LENGTH)>>14;for(;r<e.length;r++,this.excess++){const a=e.charCodeAt(r);if(this.treeIndex=BD(n,s,this.treeIndex+Math.max(1,i),a),this.treeIndex<0)return this.result===0||this.decodeMode===bl.Attribute&&(i===0||fwe(a))?0:this.emitNotTerminatedNamedEntity();if(s=n[this.treeIndex],i=(s&Us.VALUE_LENGTH)>>14,i!==0){if(a===_r.SEMI)return this.emitNamedEntityData(this.treeIndex,i,this.consumed+this.excess);this.decodeMode!==bl.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1}emitNotTerminatedNamedEntity(){var e;const{result:r,decodeTree:n}=this,s=(n[r]&Us.VALUE_LENGTH)>>14;return this.emitNamedEntityData(r,s,this.consumed),(e=this.errors)===null||e===void 0||e.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(e,r,n){const{decodeTree:s}=this;return this.emitCodePoint(r===1?s[e]&~Us.VALUE_LENGTH:s[e+1],n),r===3&&this.emitCodePoint(s[e+2],n),n}end(){var e;switch(this.state){case Tr.NamedEntity:return this.result!==0&&(this.decodeMode!==bl.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case Tr.NumericDecimal:return this.emitNumericEntity(0,2);case Tr.NumericHex:return this.emitNumericEntity(0,3);case Tr.NumericStart:return(e=this.errors)===null||e===void 0||e.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case Tr.EntityStart:return 0}}}function FD(t){let e="";const r=new mwe(t,n=>e+=T2(n));return function(s,i){let a=0,l=0;for(;(l=s.indexOf("&",l))>=0;){e+=s.slice(a,l),r.startEntity(i);const u=r.write(s,l+1);if(u<0){a=l+r.end();break}a=l+u,l=u===0?a+1:a}const c=e+s.slice(a);return e="",c}}function BD(t,e,r,n){const s=(e&Us.BRANCH_LENGTH)>>7,i=e&Us.JUMP_TABLE;if(s===0)return i!==0&&n===i?r:-1;if(i){const c=n-i;return c<0||c>=s?-1:t[r+c]-1}let a=r,l=a+s-1;for(;a<=l;){const c=a+l>>>1,u=t[c];if(u<n)a=c+1;else if(u>n)l=c-1;else return t[c+s]}return-1}FD(LD);FD(MD);var Oe;(function(t){t[t.Tab=9]="Tab",t[t.NewLine=10]="NewLine",t[t.FormFeed=12]="FormFeed",t[t.CarriageReturn=13]="CarriageReturn",t[t.Space=32]="Space",t[t.ExclamationMark=33]="ExclamationMark",t[t.Number=35]="Number",t[t.Amp=38]="Amp",t[t.SingleQuote=39]="SingleQuote",t[t.DoubleQuote=34]="DoubleQuote",t[t.Dash=45]="Dash",t[t.Slash=47]="Slash",t[t.Zero=48]="Zero",t[t.Nine=57]="Nine",t[t.Semi=59]="Semi",t[t.Lt=60]="Lt",t[t.Eq=61]="Eq",t[t.Gt=62]="Gt",t[t.Questionmark=63]="Questionmark",t[t.UpperA=65]="UpperA",t[t.LowerA=97]="LowerA",t[t.UpperF=70]="UpperF",t[t.LowerF=102]="LowerF",t[t.UpperZ=90]="UpperZ",t[t.LowerZ=122]="LowerZ",t[t.LowerX=120]="LowerX",t[t.OpeningSquareBracket=91]="OpeningSquareBracket"})(Oe||(Oe={}));var ke;(function(t){t[t.Text=1]="Text",t[t.BeforeTagName=2]="BeforeTagName",t[t.InTagName=3]="InTagName",t[t.InSelfClosingTag=4]="InSelfClosingTag",t[t.BeforeClosingTagName=5]="BeforeClosingTagName",t[t.InClosingTagName=6]="InClosingTagName",t[t.AfterClosingTagName=7]="AfterClosingTagName",t[t.BeforeAttributeName=8]="BeforeAttributeName",t[t.InAttributeName=9]="InAttributeName",t[t.AfterAttributeName=10]="AfterAttributeName",t[t.BeforeAttributeValue=11]="BeforeAttributeValue",t[t.InAttributeValueDq=12]="InAttributeValueDq",t[t.InAttributeValueSq=13]="InAttributeValueSq",t[t.InAttributeValueNq=14]="InAttributeValueNq",t[t.BeforeDeclaration=15]="BeforeDeclaration",t[t.InDeclaration=16]="InDeclaration",t[t.InProcessingInstruction=17]="InProcessingInstruction",t[t.BeforeComment=18]="BeforeComment",t[t.CDATASequence=19]="CDATASequence",t[t.InSpecialComment=20]="InSpecialComment",t[t.InCommentLike=21]="InCommentLike",t[t.BeforeSpecialS=22]="BeforeSpecialS",t[t.SpecialStartSequence=23]="SpecialStartSequence",t[t.InSpecialTag=24]="InSpecialTag",t[t.BeforeEntity=25]="BeforeEntity",t[t.BeforeNumericEntity=26]="BeforeNumericEntity",t[t.InNamedEntity=27]="InNamedEntity",t[t.InNumericEntity=28]="InNumericEntity",t[t.InHexEntity=29]="InHexEntity"})(ke||(ke={}));function Vi(t){return t===Oe.Space||t===Oe.NewLine||t===Oe.Tab||t===Oe.FormFeed||t===Oe.CarriageReturn}
952function Om(t){return t===Oe.Slash||t===Oe.Gt||Vi(t)}function xA(t){return t>=Oe.Zero&&t<=Oe.Nine}function gwe(t){return t>=Oe.LowerA&&t<=Oe.LowerZ||t>=Oe.UpperA&&t<=Oe.UpperZ}function ywe(t){return t>=Oe.UpperA&&t<=Oe.UpperF||t>=Oe.LowerA&&t<=Oe.LowerF}var wi;(function(t){t[t.NoValue=0]="NoValue",t[t.Unquoted=1]="Unquoted",t[t.Single=2]="Single",t[t.Double=3]="Double"})(wi||(wi={}));const jn={Cdata:new Uint8Array([67,68,65,84,65,91]),CdataEnd:new Uint8Array([93,93,62]),CommentEnd:new Uint8Array([45,45,62]),ScriptEnd:new Uint8Array([60,47,115,99,114,105,112,116]),StyleEnd:new Uint8Array([60,47,115,116,121,108,101]),TitleEnd:new Uint8Array([60,47,116,105,116,108,101])};class xwe{constructor({xmlMode:e=!1,decodeEntities:r=!0},n){this.cbs=n,this.state=ke.Text,this.buffer="",this.sectionStart=0,this.index=0,this.baseState=ke.Text,this.isSpecial=!1,this.running=!0,this.offset=0,this.currentSequence=void 0,this.sequenceIndex=0,this.trieIndex=0,this.trieCurrent=0,this.entityResult=0,this.entityExcess=0,this.xmlMode=e,this.decodeEntities=r,this.entityTrie=e?MD:LD}reset(){this.state=ke.Text,this.buffer="",this.sectionStart=0,this.index=0,this.baseState=ke.Text,this.currentSequence=void 0,this.running=!0,this.offset=0}write(e){this.offset+=this.buffer.length,this.buffer=e,this.parse()}end(){this.running&&this.finish()}pause(){this.running=!1}resume(){this.running=!0,this.index<this.buffer.length+this.offset&&this.parse()}getIndex(){return this.index}getSectionStart(){return this.sectionStart}stateText(e){e===Oe.Lt||!this.decodeEntities&&this.fastForwardTo(Oe.Lt)?(this.index>this.sectionStart&&this.cbs.ontext(this.sectionStart,this.index),this.state=ke.BeforeTagName,this.sectionStart=this.index):this.decodeEntities&&e===Oe.Amp&&(this.state=ke.BeforeEntity)}stateSpecialStartSequence(e){const r=this.sequenceIndex===this.currentSequence.length;if(!(r?Om(e):(e|32)===this.currentSequence[this.sequenceIndex]))this.isSpecial=!1;else if(!r){this.sequenceIndex++;return}this.sequenceIndex=0,this.state=ke.InTagName,this.stateInTagName(e)}stateInSpecialTag(e){if(this.sequenceIndex===this.currentSequence.length){if(e===Oe.Gt||Vi(e)){const r=this.index-this.currentSequence.length;if(this.sectionStart<r){const n=this.index;this.index=r,this.cbs.ontext(this.sectionStart,r),this.index=n}this.isSpecial=!1,this.sectionStart=r+2,this.stateInClosingTagName(e);return}this.sequenceIndex=0}(e|32)===this.currentSequence[this.sequenceIndex]?this.sequenceIndex+=1:this.sequenceIndex===0?this.currentSequence===jn.TitleEnd?this.decodeEntities&&e===Oe.Amp&&(this.state=ke.BeforeEntity):this.fastForwardTo(Oe.Lt)&&(this.sequenceIndex=1):this.sequenceIndex=+(e===Oe.Lt)}stateCDATASequence(e){e===jn.Cdata[this.sequenceIndex]?++this.sequenceIndex===jn.Cdata.length&&(this.state=ke.InCommentLike,this.currentSequence=jn.CdataEnd,this.sequenceIndex=0,this.sectionStart=this.index+1):(this.sequenceIndex=0,this.state=ke.InDeclaration,this.stateInDeclaration(e))}fastForwardTo(e){for(;++this.index<this.buffer.length+this.offset;)if(this.buffer.charCodeAt(this.index-this.offset)===e)return!0;return this.index=this.buffer.length+this.offset-1,!1}stateInCommentLike(e){e===this.currentSequence[this.sequenceIndex]?++this.sequenceIndex===this.currentSequence.length&&(this.currentSequence===jn.CdataEnd?this.cbs.oncdata(this.sectionStart,this.index,2):this.cbs.oncomment(this.sectionStart,this.index,2),this.sequenceIndex=0,this.sectionStart=this.index+1,this.state=ke.Text):this.sequenceIndex===0?this.fastForwardTo(this.currentSequence[0])&&(this.sequenceIndex=1):e!==this.currentSequence[this.sequenceIndex-1]&&(this.sequenceIndex=0)}isTagStartChar(e){return this.xmlMode?!Om(e):gwe(e)}startSpecial(e,r){this.isSpecial=!0,this.currentSequence=e,this.sequenceIndex=r,this.state=ke.SpecialStartSequence}stateBeforeTagName(e){if(e===Oe.ExclamationMark)this.state=ke.BeforeDeclaration,this.sectionStart=this.index+1;else if(e===Oe.Questionmark)this.state=ke.InProcessingInstruction,this.sectionStart=this.index+1;else if(this.isTagStartChar(e)){const r=e|32;this.sectionStart=this.index,!this.xmlMode&&r===jn.TitleEnd[2]?this.startSpecial(jn.TitleEnd,3):this.state=!this.xmlMode&&r===jn.ScriptEnd[2]?ke.BeforeSpecialS:ke.InTagName}else e===Oe.Slash?this.state=ke.BeforeClosingTagName:(this.state=ke.Text,this.stateText(e))}stateInTagName(e){Om(e)&&(this.cbs.onopentagname(this.sectionStart,this.index),this.sectionStart=-1,this.state=ke.BeforeAttributeName,this.stateBeforeAttributeName(e))}stateBeforeClosingTagName(e){Vi(e)||(e===Oe.Gt?this.state=ke.Text:(this.state=this.isTagStartChar(e)?ke.InClosingTagName:ke.InSpecialComment,this.sectionStart=this.index))}stateInClosingTagName(e){(e===Oe.Gt||Vi(e))&&(this.cbs.onclosetag(this.sectionStart,this.index),this.sectionStart=-1,this.state=ke.AfterClosingTagName,this.stateAfterClosingTagName(e))}stateAfterClosingTagName(e){(e===Oe.Gt||this.fastForwardTo(Oe.Gt))&&(this.state=ke.Text,this.baseState=ke.Text,this.sectionStart=this.index+1)}stateBeforeAttributeName(e){e===Oe.Gt?(this.cbs.onopentagend(this.index),this.isSpecial?(this.state=ke.InSpecialTag,this.sequenceIndex=0):this.state=ke.Text,this.baseState=this.state,this.sectionStart=this.index+1):e===Oe.Slash?this.state=ke.InSelfClosingTag:Vi(e)||(this.state=ke.InAttributeName,this.sectionStart=this.index)}stateInSelfClosingTag(e){e===Oe.Gt?(this.cbs.onselfclosingtag(this.index),this.state=ke.Text,this.baseState=ke.Text,this.sectionStart=this.index+1,this.isSpecial=!1):Vi(e)||(this.state=ke.BeforeAttributeName,this.stateBeforeAttributeName(e))}stateInAttributeName(e){(e===Oe.Eq||Om(e))&&(this.cbs.onattribname(this.sectionStart,this.index),this.sectionStart=-1,this.state=ke.AfterAttributeName,this.stateAfterAttributeName(e))}stateAfterAttributeName(e){e===Oe.Eq?this.state=ke.BeforeAttributeValue:e===Oe.Slash||e===Oe.Gt?(this.cbs.onattribend(wi.NoValue,this.index),this.state=ke.BeforeAttributeName,this.stateBeforeAttributeName(e)):Vi(e)||(this.cbs.onattribend(wi.NoValue,this.index),this.state=ke.InAttributeName,this.sectionStart=this.index)}stateBeforeAttributeValue(e){e===Oe.DoubleQuote?(this.state=ke.InAttributeValueDq,this.sectionStart=this.index+1):e===Oe.SingleQuote?(this.state=ke.InAttributeValueSq,this.sectionStart=this.index+1):Vi(e)||(this.sectionStart=this.index,this.state=ke.InAttributeValueNq,this.stateInAttributeValueNoQuotes(e))}handleInAttributeValue(e,r){e===r||!this.decodeEntities&&this.fastForwardTo(r)?(this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=-1,this.cbs.onattribend(r===Oe.DoubleQuote?wi.Double:wi.Single,this.index),this.state=ke.BeforeAttributeName):this.decodeEntities&&e===Oe.Amp&&(this.baseState=this.state,this.state=ke.BeforeEntity)}stateInAttributeValueDoubleQuotes(e){this.handleInAttributeValue(e,Oe.DoubleQuote)}stateInAttributeValueSingleQuotes(e){this.handleInAttributeValue(e,Oe.SingleQuote)}stateInAttributeValueNoQuotes(e){Vi(e)||e===Oe.Gt?(this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=-1,this.cbs.onattribend(wi.Unquoted,this.index),this.state=ke.BeforeAttributeName,this.stateBeforeAttributeName(e)):this.decodeEntities&&e===Oe.Amp&&(this.baseState=this.state,this.state=ke.BeforeEntity)}stateBeforeDeclaration(e){e===Oe.OpeningSquareBracket?(this.state=ke.CDATASequence,this.sequenceIndex=0):this.state=e===Oe.Dash?ke.BeforeComment:ke.InDeclaration}stateInDeclaration(e){(e===Oe.Gt||this.fastForwardTo(Oe.Gt))&&(this.cbs.ondeclaration(this.sectionStart,this.index),this.state=ke.Text,this.sectionStart=this.index+1)}stateInProcessingInstruction(e){(e===Oe.Gt||this.fastForwardTo(Oe.Gt))&&(this.cbs.onprocessinginstruction(this.sectionStart,this.index),this.state=ke.Text,this.sectionStart=this.index+1)}stateBeforeComment(e){e===Oe.Dash?(this.state=ke.InCommentLike,this.currentSequence=jn.CommentEnd,this.sequenceIndex=2,this.sectionStart=this.index+1):this.state=ke.InDeclaration}stateInSpecialComment(e){(e===Oe.Gt||this.fastForwardTo(Oe.Gt))&&(this.cbs.oncomment(this.sectionStart,this.index,0),this.state=ke.Text,this.sectionStart=this.index+1)}stateBeforeSpecialS(e){const r=e|32;r===jn.ScriptEnd[3]?this.startSpecial(jn.ScriptEnd,4):r===jn.StyleEnd[3]?this.startSpecial(jn.StyleEnd,4):(this.state=ke.InTagName,this.stateInTagName(e))}stateBeforeEntity(e){this.entityExcess=1,this.entityResult=0,e===Oe.Number?this.state=ke.BeforeNumericEntity:e===Oe.Amp||(this.trieIndex=0,this.trieCurrent=this.entityTrie[0],this.state=ke.InNamedEntity,this.stateInNamedEntity(e))}stateInNamedEntity(e){if(this.entityExcess+=1,this.trieIndex=BD(this.entityTrie,this.trieCurrent,this.trieIndex+1,e),this.trieIndex<0){this.emitNamedEntity(),this.index--;return}this.trieCurrent=this.entityTrie[this.trieIndex];const r=this.trieCurrent&Us.VALUE_LENGTH;if(r){const n=(r>>14)-1;if(!this.allowLegacyEntity()&&e!==Oe.Semi)this.trieIndex+=n;else{const s=this.index-this.entityExcess+1;s>this.sectionStart&&this.emitPartial(this.sectionStart,s),this.entityResult=this.trieIndex,this.trieIndex+=n,this.entityExcess=0,this.sectionStart=this.index+1,n===0&&this.emitNamedEntity()}}}emitNamedEntity(){if(this.state=this.baseState,this.entityResult===0)return;switch((this.entityTrie[this.entityResult]&Us.VALUE_LENGTH)>>14){case 1:{this.emitCodePoint(this.entityTrie[this.entityResult]&~Us.VALUE_LENGTH);break}case 2:{this.emitCodePoint(this.entityTrie[this.entityResult+1]);break}case 3:this.emitCodePoint(this.entityTrie[this.entityResult+1]),this.emitCodePoint(this.entityTrie[this.entityResult+2])}}stateBeforeNumericEntity(e){(e|32)===Oe.LowerX?(this.entityExcess++,this.state=ke.InHexEntity):(this.state=ke.InNumericEntity,this.stateInNumericEntity(e))}emitNumericEntity(e){const r=this.index-this.entityExcess-1;r+2+ +(this.state===ke.InHexEntity)!==this.index&&(r>this.sectionStart&&this.emitPartial(this.sectionStart,r),this.sectionStart=this.index+Number(e),this.emitCodePoint(DD(this.entityResult))),this.state=this.baseState}stateInNumericEntity(e){e===Oe.Semi?this.emitNumericEntity(!0):xA(e)?(this.entityResult=this.entityResult*10+(e-Oe.Zero),this.entityExcess++):(this.allowLegacyEntity()?this.emitNumericEntity(!1):this.state=this.baseState,this.index--)}stateInHexEntity(e){e===Oe.Semi?this.emitNumericEntity(!0):xA(e)?(this.entityResult=this.entityResult*16+(e-Oe.Zero),this.entityExcess++):ywe(e)?(this.entityResult=this.entityResult*16+((e|32)-Oe.LowerA+10),this.entityExcess++):(this.allowLegacyEntity()?this.emitNumericEntity(!1):this.state=this.baseState,this.index--)}allowLegacyEntity(){return!this.xmlMode&&(this.baseState===ke.Text||this.baseState===ke.InSpecialTag)}cleanup(){this.running&&this.sectionStart!==this.index&&(this.state===ke.Text||this.state===ke.InSpecialTag&&this.sequenceIndex===0?(this.cbs.ontext(this.sectionStart,this.index),this.sectionStart=this.index):(this.state===ke.InAttributeValueDq||this.state===ke.InAttributeValueSq||this.state===ke.InAttributeValueNq)&&(this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=this.index))}shouldContinue(){return this.index<this.buffer.length+this.offset&&this.running}parse(){for(;this.shouldContinue();){const e=this.buffer.charCodeAt(this.index-this.offset);switch(this.state){case ke.Text:{this.stateText(e);break}case ke.SpecialStartSequence:{this.stateSpecialStartSequence(e);break}case ke.InSpecialTag:{this.stateInSpecialTag(e);break}case ke.CDATASequence:{this.stateCDATASequence(e);break}case ke.InAttributeValueDq:{this.stateInAttributeValueDoubleQuotes(e);break}case ke.InAttributeName:{this.stateInAttributeName(e);break}case ke.InCommentLike:{this.stateInCommentLike(e);break}case ke.InSpecialComment:{this.stateInSpecialComment(e);break}case ke.BeforeAttributeName:{this.stateBeforeAttributeName(e);break}case ke.InTagName:{this.stateInTagName(e);break}case ke.InClosingTagName:{this.stateInClosingTagName(e);break}case ke.BeforeTagName:{this.stateBeforeTagName(e);break}case ke.AfterAttributeName:{this.stateAfterAttributeName(e);break}case ke.InAttributeValueSq:{this.stateInAttributeValueSingleQuotes(e);break}case ke.BeforeAttributeValue:{this.stateBeforeAttributeValue(e);break}case ke.BeforeClosingTagName:{this.stateBeforeClosingTagName(e);break}case ke.AfterClosingTagName:{this.stateAfterClosingTagName(e);break}case ke.BeforeSpecialS:{this.stateBeforeSpecialS(e);break}case ke.InAttributeValueNq:{this.stateInAttributeValueNoQuotes(e);break}case ke.InSelfClosingTag:{this.stateInSelfClosingTag(e);break}case ke.InDeclaration:{this.stateInDeclaration(e);break}case ke.BeforeDeclaration:{this.stateBeforeDeclaration(e);break}case ke.BeforeComment:{this.stateBeforeComment(e);break}case ke.InProcessingInstruction:{this.stateInProcessingInstruction(e);break}case ke.InNamedEntity:{this.stateInNamedEntity(e);break}case ke.BeforeEntity:{this.stateBeforeEntity(e);break}case ke.InHexEntity:{this.stateInHexEntity(e);break}case ke.InNumericEntity:{this.stateInNumericEntity(e);break}default:this.stateBeforeNumericEntity(e)}this.index++}this.cleanup()}finish(){this.state===ke.InNamedEntity&&this.emitNamedEntity(),this.sectionStart<this.index&&this.handleTrailingData(),this.cbs.onend()}handleTrailingData(){const e=this.buffer.length+this.offset;this.state===ke.InCommentLike?this.currentSequence===jn.CdataEnd?this.cbs.oncdata(this.sectionStart,e,0):this.cbs.oncomment(this.sectionStart,e,0):this.state===ke.InNumericEntity&&this.allowLegacyEntity()?this.emitNumericEntity(!1):this.state===ke.InHexEntity&&this.allowLegacyEntity()?this.emitNumericEntity(!1):this.state===ke.InTagName||this.state===ke.BeforeAttributeName||this.state===ke.BeforeAttributeValue||this.state===ke.AfterAttributeName||this.state===ke.InAttributeName||this.state===ke.InAttributeValueSq||this.state===ke.InAttributeValueDq||this.state===ke.InAttributeValueNq||this.state===ke.InClosingTagName||this.cbs.ontext(this.sectionStart,e)}emitPartial(e,r){this.baseState!==ke.Text&&this.baseState!==ke.InSpecialTag?this.cbs.onattribdata(e,r):this.cbs.ontext(e,r)}
952emitCodePoint(e){this.baseState!==ke.Text&&this.baseState!==ke.InSpecialTag?this.cbs.onattribentity(e):this.cbs.ontextentity(e)}}const Fc=new Set(["input","option","optgroup","select","button","datalist","textarea"]),Ct=new Set(["p"]),wA=new Set(["thead","tbody"]),bA=new Set(["dd","dt"]),kA=new Set(["rt","rp"]),wwe=new Map([["tr",new Set(["tr","th","td"])],["th",new Set(["th"])],["td",new Set(["thead","th","td"])],["body",new Set(["head","link","script"])],["li",new Set(["li"])],["p",Ct],["h1",Ct],["h2",Ct],["h3",Ct],["h4",Ct],["h5",Ct],["h6",Ct],["select",Fc],["input",Fc],["output",Fc],["button",Fc],["datalist",Fc],["textarea",Fc],["option",new Set(["option"])],["optgroup",new Set(["optgroup","option"])],["dd",bA],["dt",bA],["address",Ct],["article",Ct],["aside",Ct],["blockquote",Ct],["details",Ct],["div",Ct],["dl",Ct],["fieldset",Ct],["figcaption",Ct],["figure",Ct],["footer",Ct],["form",Ct],["header",Ct],["hr",Ct],["main",Ct],["nav",Ct],["ol",Ct],["pre",Ct],["section",Ct],["table",Ct],["ul",Ct],["rt",kA],["rp",kA],["tbody",wA],["tfoot",wA]]),bwe=new Set(["area","base","basefont","br","col","command","embed","frame","hr","img","input","isindex","keygen","link","meta","param","source","track","wbr"]),vA=new Set(["math","svg"]),jA=new Set(["mi","mo","mn","ms","mtext","annotation-xml","foreignobject","desc","title"]),kwe=/\s|\//;class vwe{constructor(e,r={}){var n,s,i,a,l;this.options=r,this.startIndex=0,this.endIndex=0,this.openTagStart=0,this.tagname="",this.attribname="",this.attribvalue="",this.attribs=null,this.stack=[],this.foreignContext=[],this.buffers=[],this.bufferOffset=0,this.writeIndex=0,this.ended=!1,this.cbs=e??{},this.lowerCaseTagNames=(n=r.lowerCaseTags)!==null&&n!==void 0?n:!r.xmlMode,this.lowerCaseAttributeNames=(s=r.lowerCaseAttributeNames)!==null&&s!==void 0?s:!r.xmlMode,this.tokenizer=new((i=r.Tokenizer)!==null&&i!==void 0?i:xwe)(this.options,this),(l=(a=this.cbs).onparserinit)===null||l===void 0||l.call(a,this)}ontext(e,r){var n,s;const i=this.getSlice(e,r);this.endIndex=r-1,(s=(n=this.cbs).ontext)===null||s===void 0||s.call(n,i),this.startIndex=r}ontextentity(e){var r,n;const s=this.tokenizer.getSectionStart();this.endIndex=s-1,(n=(r=this.cbs).ontext)===null||n===void 0||n.call(r,T2(e)),this.startIndex=s}isVoidElement(e){return!this.options.xmlMode&&bwe.has(e)}onopentagname(e,r){this.endIndex=r;let n=this.getSlice(e,r);this.lowerCaseTagNames&&(n=n.toLowerCase()),this.emitOpenTag(n)}emitOpenTag(e){var r,n,s,i;this.openTagStart=this.startIndex,this.tagname=e;const a=!this.options.xmlMode&&wwe.get(e);if(a)for(;this.stack.length>0&&a.has(this.stack[this.stack.length-1]);){const l=this.stack.pop();(n=(r=this.cbs).onclosetag)===null||n===void 0||n.call(r,l,!0)}this.isVoidElement(e)||(this.stack.push(e),vA.has(e)?this.foreignContext.push(!0):jA.has(e)&&this.foreignContext.push(!1)),(i=(s=this.cbs).onopentagname)===null||i===void 0||i.call(s,e),this.cbs.onopentag&&(this.attribs={})}endOpenTag(e){var r,n;this.startIndex=this.openTagStart,this.attribs&&((n=(r=this.cbs).onopentag)===null||n===void 0||n.call(r,this.tagname,this.attribs,e),this.attribs=null),this.cbs.onclosetag&&this.isVoidElement(this.tagname)&&this.cbs.onclosetag(this.tagname,!0),this.tagname=""}onopentagend(e){this.endIndex=e,this.endOpenTag(!1),this.startIndex=e+1}onclosetag(e,r){var n,s,i,a,l,c;this.endIndex=r;let u=this.getSlice(e,r);if(this.lowerCaseTagNames&&(u=u.toLowerCase()),(vA.has(u)||jA.has(u))&&this.foreignContext.pop(),this.isVoidElement(u))!this.options.xmlMode&&u==="br"&&((s=(n=this.cbs).onopentagname)===null||s===void 0||s.call(n,"br"),(a=(i=this.cbs).onopentag)===null||a===void 0||a.call(i,"br",{},!0),(c=(l=this.cbs).onclosetag)===null||c===void 0||c.call(l,"br",!1));else{const d=this.stack.lastIndexOf(u);if(d!==-1)if(this.cbs.onclosetag){let h=this.stack.length-d;for(;h--;)this.cbs.onclosetag(this.stack.pop(),h!==0)}else this.stack.length=d;else!this.options.xmlMode&&u==="p"&&(this.emitOpenTag("p"),this.closeCurrentTag(!0))}this.startIndex=r+1}onselfclosingtag(e){this.endIndex=e,this.options.xmlMode||this.options.recognizeSelfClosing||this.foreignContext[this.foreignContext.length-1]?(this.closeCurrentTag(!1),this.startIndex=e+1):this.onopentagend(e)}closeCurrentTag(e){var r,n;const s=this.tagname;this.endOpenTag(e),this.stack[this.stack.length-1]===s&&((n=(r=this.cbs).onclosetag)===null||n===void 0||n.call(r,s,!e),this.stack.pop())}onattribname(e,r){this.startIndex=e;const n=this.getSlice(e,r);this.attribname=this.lowerCaseAttributeNames?n.toLowerCase():n}onattribdata(e,r){this.attribvalue+=this.getSlice(e,r)}onattribentity(e){this.attribvalue+=T2(e)}onattribend(e,r){var n,s;this.endIndex=r,(s=(n=this.cbs).onattribute)===null||s===void 0||s.call(n,this.attribname,this.attribvalue,e===wi.Double?'"':e===wi.Single?"'":e===wi.NoValue?void 0:null),this.attribs&&!Object.prototype.hasOwnProperty.call(this.attribs,this.attribname)&&(this.attribs[this.attribname]=this.attribvalue),this.attribvalue=""}getInstructionName(e){const r=e.search(kwe);let n=r<0?e:e.substr(0,r);return this.lowerCaseTagNames&&(n=n.toLowerCase()),n}ondeclaration(e,r){this.endIndex=r;const n=this.getSlice(e,r);if(this.cbs.onprocessinginstruction){const s=this.getInstructionName(n);this.cbs.onprocessinginstruction(`!${s}`,`!${n}`)}this.startIndex=r+1}
952onprocessinginstruction(e,r){this.endIndex=r;const n=this.getSlice(e,r);if(this.cbs.onprocessinginstruction){const s=this.getInstructionName(n);this.cbs.onprocessinginstruction(`?${s}`,`?${n}`)}this.startIndex=r+1}oncomment(e,r,n){var s,i,a,l;this.endIndex=r,(i=(s=this.cbs).oncomment)===null||i===void 0||i.call(s,this.getSlice(e,r-n)),(l=(a=this.cbs).oncommentend)===null||l===void 0||l.call(a),this.startIndex=r+1}oncdata(e,r,n){var s,i,a,l,c,u,d,h,p,f;this.endIndex=r;const m=this.getSlice(e,r-n);this.options.xmlMode||this.options.recognizeCDATA?((i=(s=this.cbs).oncdatastart)===null||i===void 0||i.call(s),(l=(a=this.cbs).ontext)===null||l===void 0||l.call(a,m),(u=(c=this.cbs).oncdataend)===null||u===void 0||u.call(c)):((h=(d=this.cbs).oncomment)===null||h===void 0||h.call(d,`[CDATA[${m}]]`),(f=(p=this.cbs).oncommentend)===null||f===void 0||f.call(p)),this.startIndex=r+1}onend(){var e,r;if(this.cbs.onclosetag){this.endIndex=this.startIndex;for(let n=this.stack.length;n>0;this.cbs.onclosetag(this.stack[--n],!0));}(r=(e=this.cbs).onend)===null||r===void 0||r.call(e)}reset(){var e,r,n,s;(r=(e=this.cbs).onreset)===null||r===void 0||r.call(e),this.tokenizer.reset(),this.tagname="",this.attribname="",this.attribs=null,this.stack.length=0,this.startIndex=0,this.endIndex=0,(s=(n=this.cbs).onparserinit)===null||s===void 0||s.call(n,this),this.buffers.length=0,this.bufferOffset=0,this.writeIndex=0,this.ended=!1}parseComplete(e){this.reset(),this.end(e)}getSlice(e,r){for(;e-this.bufferOffset>=this.buffers[0].length;)this.shiftBuffer();let n=this.buffers[0].slice(e-this.bufferOffset,r-this.bufferOffset);for(;r-this.bufferOffset>this.buffers[0].length;)this.shiftBuffer(),n+=this.buffers[0].slice(0,r-this.bufferOffset);return n}shiftBuffer(){this.bufferOffset+=this.buffers[0].length,this.writeIndex--,this.buffers.shift()}write(e){var r,n;if(this.ended){(n=(r=this.cbs).onerror)===null||n===void 0||n.call(r,new Error(".write() after done!"));return}this.buffers.push(e),this.tokenizer.running&&(this.tokenizer.write(e),this.writeIndex++)}end(e){var r,n;if(this.ended){(n=(r=this.cbs).onerror)===null||n===void 0||n.call(r,new Error(".end() after done!"));return}e&&this.write(e),this.ended=!0,this.tokenizer.end()}pause(){this.tokenizer.pause()}resume(){for(this.tokenizer.resume();this.tokenizer.running&&this.writeIndex<this.buffers.length;)this.tokenizer.write(this.buffers[this.writeIndex++]);this.ended&&this.tokenizer.end()}parseChunk(e){this.write(e)}done(e){this.end(e)}}const SA=/["&'<>$\x80-\uFFFF]/g,jwe=new Map([[34,"&quot;"],[38,"&amp;"],[39,"&apos;"],[60,"&lt;"],[62,"&gt;"]]),Swe=String.prototype.codePointAt!=null?(t,e)=>t.codePointAt(e):(t,e)=>(t.charCodeAt(e)&64512)===55296?(t.charCodeAt(e)-55296)*1024+t.charCodeAt(e+1)-56320+65536:t.charCodeAt(e);function $D(t){let e="",r=0,n;for(;(n=SA.exec(t))!==null;){const s=n.index,i=t.charCodeAt(s),a=jwe.get(i);a!==void 0?(e+=t.substring(r,s)+a,r=s+1):(e+=`${t.substring(r,s)}&#x${Swe(t,s).toString(16)};`,r=SA.lastIndex+=+((i&64512)===55296))}return e+t.substr(r)}function UD(t,e){return function(n){let s,i=0,a="";for(;s=t.exec(n);)i!==s.index&&(a+=n.substring(i,s.index)),a+=e.get(s[0].charCodeAt(0)),i=s.index+1;return a+n.substring(i)}}const Nwe=UD(/["&\u00A0]/g,new Map([[34,"&quot;"],[38,"&amp;"],[160,"&nbsp;"]])),Cwe=UD(/[&<>\u00A0]/g,new Map([[38,"&amp;"],[60,"&lt;"],[62,"&gt;"],[160,"&nbsp;"]])),Ewe=new Map(["altGlyph","altGlyphDef","altGlyphItem","animateColor","animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","glyphRef","linearGradient","radialGradient","textPath"].map(t=>[t.toLowerCase(),t])),Twe=new Map(["definitionURL","attributeName","attributeType","baseFrequency","baseProfile","calcMode","clipPathUnits","diffuseConstant","edgeMode","filterUnits","glyphRef","gradientTransform","gradientUnits","kernelMatrix","kernelUnitLength","keyPoints","keySplines","keyTimes","lengthAdjust","limitingConeAngle","markerHeight","markerUnits","markerWidth","maskContentUnits","maskUnits","numOctaves","pathLength","patternContentUnits","patternTransform","patternUnits","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","refX","refY","repeatCount","repeatDur","requiredExtensions","requiredFeatures","specularConstant","specularExponent","spreadMethod","startOffset","stdDeviation","stitchTiles","surfaceScale","systemLanguage","tableValues","targetX","targetY","textLength","viewBox","viewTarget","xChannelSelector","yChannelSelector","zoomAndPan"].map(t=>[t.toLowerCase(),t])),Awe=new Set(["style","script","xmp","iframe","noembed","noframes","plaintext","noscript"]);function zwe(t){return t.replace(/"/g,"&quot;")}function Pwe(t,e){var r;if(!t)return;const n=((r=e.encodeEntities)!==null&&r!==void 0?r:e.decodeEntities)===!1?zwe:e.xmlMode||e.encodeEntities!=="utf8"?$D:Nwe;return Object.keys(t).map(s=>{var i,a;const l=(i=t[s])!==null&&i!==void 0?i:"";return e.xmlMode==="foreign"&&(s=(a=Twe.get(s))!==null&&a!==void 0?a:s),!e.emptyAttrs&&!e.xmlMode&&l===""?s:`${s}="${n(l)}"`}).join(" ")}const NA=new Set(["area","base","basefont","br","col","command","embed","frame","hr","
952img","input","isindex","keygen","link","meta","param","source","track","wbr"]);function wx(t,e={}){const r="length"in t?t:[t];let n="";for(let s=0;s<r.length;s++)n+=_we(r[s],e);return n}function _we(t,e){switch(t.type){case Mye:return wx(t.children,e);case Hye:case Fye:return Lwe(t);case Bye:return Fwe(t);case Vye:return Dwe(t);case $ye:case Uye:case Wye:return Rwe(t,e);case Dye:return Mwe(t,e)}}const Iwe=new Set(["mi","mo","mn","ms","mtext","annotation-xml","foreignObject","desc","title"]),Owe=new Set(["svg","math"]);function Rwe(t,e){var r;e.xmlMode==="foreign"&&(t.name=(r=Ewe.get(t.name))!==null&&r!==void 0?r:t.name,t.parent&&Iwe.has(t.parent.name)&&(e={...e,xmlMode:!1})),!e.xmlMode&&Owe.has(t.name)&&(e={...e,xmlMode:"foreign"});let n=`<${t.name}`;const s=Pwe(t.attribs,e);return s&&(n+=` ${s}`),t.children.length===0&&(e.xmlMode?e.selfClosingTags!==!1:e.selfClosingTags&&NA.has(t.name))?(e.xmlMode||(n+=" "),n+="/>"):(n+=">",t.children.length>0&&(n+=wx(t.children,e)),(e.xmlMode||!NA.has(t.name))&&(n+=`</${t.name}>`)),n}function Lwe(t){return`<${t.data}>`}function Mwe(t,e){var r;let n=t.data||"";return((r=e.encodeEntities)!==null&&r!==void 0?r:e.decodeEntities)!==!1&&!(!e.xmlMode&&t.parent&&Awe.has(t.parent.name))&&(n=e.xmlMode||e.encodeEntities!=="utf8"?$D(n):Cwe(n)),n}function Dwe(t){return`<![CDATA[${t.children[0].data}]]>`}function Fwe(t){return`<!--${t.data}-->`}function Bwe(t,e){const r=new Jye(void 0,e);return new vwe(r,e).end(t),r.root}var $we=function(e){return Uwe(e)&&!Wwe(e)};function Uwe(t){return!!t&&typeof t=="object"}function Wwe(t){var e=Object.prototype.toString.call(t);return e==="[object RegExp]"||e==="[object Date]"||qwe(t)}var Vwe=typeof Symbol=="function"&&Symbol.for,Hwe=Vwe?Symbol.for("react.element"):60103;function qwe(t){return t.$$typeof===Hwe}function Kwe(t){return Array.isArray(t)?[]:{}}function Kp(t,e){return e.clone!==!1&&e.isMergeableObject(t)?gd(Kwe(t),t,e):t}function Gwe(t,e,r){return t.concat(e).map(function(n){return Kp(n,r)})}function Zwe(t,e){if(!e.customMerge)return gd;var r=e.customMerge(t);return typeof r=="function"?r:gd}function Ywe(t){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(t).filter(function(e){return Object.propertyIsEnumerable.call(t,e)}):[]}function CA(t){return Object.keys(t).concat(Ywe(t))}function WD(t,e){try{return e in t}catch{return!1}}function Jwe(t,e){return WD(t,e)&&!(Object.hasOwnProperty.call(t,e)&&Object.propertyIsEnumerable.call(t,e))}function Xwe(t,e,r){var n={};return r.isMergeableObject(t)&&CA(t).forEach(function(s){n[s]=Kp(t[s],r)}),CA(e).forEach(function(s){Jwe(t,s)||(WD(t,s)&&r.isMergeableObject(e[s])?n[s]=Zwe(s,r)(t[s],e[s],r):n[s]=Kp(e[s],r))}),n}function gd(t,e,r){r=r||{},r.arrayMerge=r.arrayMerge||Gwe,r.isMergeableObject=r.isMergeableObject||$we,r.cloneUnlessOtherwiseSpecified=Kp;var n=Array.isArray(e),s=Array.isArray(t),i=n===s;return i?n?r.arrayMerge(t,e,r):Xwe(t,e,r):Kp(e,r)}gd.all=function(e,r){if(!Array.isArray(e))throw new Error("first argument should be an array");return e.reduce(function(n,s){return gd(n,s,r)},{})};var Qwe=gd,ebe=Qwe;const VD=qo(ebe);function GN(t,e,r=()=>{}){if(t===void 0){const n=function(...s){return e(n,...s)};return n}return t>=0?function(...n){return e(GN(t-1,e,r),...n)}:r}function HD(t,e){let r=0,n=t.length;for(;r<n&&t[r]===e;)++r;for(;n>r&&t[n-1]===e;)--n;return r>0||n<t.length?t.substring(r,n):t}function tbe(t,e){let r=t.length;for(;r>0&&t[r-1]===e;)--r;return r<t.length?t.substring(0,r):t}function rbe(t){return t.replace(/[\s\S]/g,e=>"\\u"+e.charCodeAt().toString(16).padStart(4,"0"))}function qD(t,e){const r=new Map;for(let n=t.length;n-- >0;){const s=t[n],i=e(s);r.set(i,r.has(i)?VD(s,r.get(i),{arrayMerge:nbe}):s)}return[...r.values()].reverse()}const nbe=(t,e,r)=>[...e];function yd(t,e){for(const r of e){if(!t)return;t=t[r]}return t}function EA(t,e="a",r=26){const n=[];do t-=1,n.push(t%r),t=t/r>>0;while(t>0);const s=e.charCodeAt(0);return n.reverse().map(i=>String.fromCharCode(s+i)).join("")}const W1=["I","X","C","M"],TA=["V","L","D"];function AA(t){return[...t+""].map(e=>+e).reverse().map((e,r)=>e%5<4?(e<5?"":TA[r])+W1[r].repeat(e%5):W1[r]+(e<5?TA[r]:W1[r+1])).reverse().join("")}class KD{constructor(e,r=void 0){this.lines=[],this.nextLineWords=[],this.maxLineLength=r||e.wordwrap||Number.MAX_VALUE,this.nextLineAvailableChars=this.maxLineLength,this.wrapCharacters=yd(e,["longWordSplit","wrapCharacters"])||[],this.forceWrapOnLimit=yd(e,["longWordSplit","forceWrapOnLimit"])||!1,this.stashedSpace=!1,this.wordBreakOpportunity=!1}pushWord(e,r=!1){this.nextLineAvailableChars<=0&&!r&&this.startNewLine();const n=this.nextLineWords.length===0,s=e.length+(n?0:1);if(s<=this.nextLineAvailableChars||r)this.nextLineWords.push(e),this.nextLineAvailableChars-=s;else{const[i,...a]=this.splitLongWord(e);n||this.startNewLine(),this.nextLineWords.push(i),this.nextLineAvailableChars-=i.length;for(const l of a)this.startNewLine(),this.nextLineWords.push(l),this.nextLineAvailableChars-=l.length}}popWord(){const e=this.nextLineWords.pop();if(e!==void 0){const r=this.nextLineWords.length===0,n=e.length+(r?0:1);this.nextLineAvailableChars+=n}return e}concatWord(e,r=!1){if(this.wordBreakOpportunity&&e.length>this.nextLineAvailableChars)this.pushWord(e,r),this.wordBreakOpportunity=!1;else{const n=this.popWord();this.pushWord(n?n.concat(e):e,r)}}startNewLine(e=1){this.lines.push(this.nextLineWords),e>1&&this.lines.push(...Array.from({length:e-1},()=>[])),this.nextLineWords=[],this.nextLineAvailableChars=this.maxLineLength}isEmpty(){return this.lines.length===0&&this.nextLineWords.length===0}clear(){this.lines.length=0,this.nextLineWords.length=0,this.nextLineAvailableChars=this.maxLineLength}toString(){return[...this.lines,this.nextLineWords].map(e=>e.join(" ")).join(`
953`)}splitLongWord(e){const r=[];let n=0;for(;e.length>this.maxLineLength;){const s=e.substring(0,this.maxLineLength),i=e.substring(this.maxLineLength),a=s.lastIndexOf(this.wrapCharacters[n]);if(a>-1)e=s.substring(a+1)+i,r.push(s.substring(0,a+1));else if(n++,n<this.wrapCharacters.length)e=s+i;else{if(this.forceWrapOnLimit){if(r.push(s),e=i,e.length>this.maxLineLength)continue}else e=s+i;break}}return r.push(e),r}}class Pf{constructor(e=null){this.next=e}getRoot(){return this.next?this.next:this}}class mi extends Pf{constructor(e,r=null,n=1,s=void 0){super(r),this.leadingLineBreaks=n,this.inlineTextBuilder=new KD(e,s),this.rawText="",this.stashedLineBreaks=0,this.isPre=r&&r.isPre,this.isNoWrap=r&&r.isNoWrap}}class zA extends mi{constructor(e,r=null,{interRowLineBreaks:n=1,leadingLineBreaks:s=2,maxLineLength:i=void 0,maxPrefixLength:a=0,prefixAlign:l="left"}={}){super(e,r,s,i),this.maxPrefixLength=a,this.prefixAlign=l,this.interRowLineBreaks=n}}class kl extends mi{constructor(e,r=null,{leadingLineBreaks:n=1,maxLineLength:s=void 0,prefix:i=""}={}){super(e,r,n,s),this.prefix=i}}class PA extends Pf{constructor(e=null){super(e),this.rows=[],this.isPre=e&&e.isPre,this.isNoWrap=e&&e.isNoWrap}}class _A extends Pf{constructor(e=null){super(e),this.cells=[],this.isPre=e&&e.isPre,this.isNoWrap=e&&e.isNoWrap}}class vl extends Pf{constructor(e,r=null,n=void 0){super(r),this.inlineTextBuilder=new KD(e,n),this.rawText="",this.stashedLineBreaks=0,this.isPre=r&&r.isPre,this.isNoWrap=r&&r.isNoWrap}}class sbe extends Pf{constructor(e=null,r){super(e),this.transform=r}}function ibe(t){return[...t].map(e=>"\\u"+e.charCodeAt(0).toString(16).padStart(4,"0")).join("")}class abe{constructor(e){this.whitespaceChars=e.preserveNewlines?e.whitespaceCharacters.replace(/\n/g,""):e.whitespaceCharacters;const r=ibe(this.whitespaceChars);if(this.leadingWhitespaceRe=new RegExp(`^[${r}]`),this.trailingWhitespaceRe=new RegExp(`[${r}]$`),this.allWhitespaceOrEmptyRe=new RegExp(`^[${r}]*$`),this.newlineOrNonWhitespaceRe=new RegExp(`(\\n|[^\\n${r}])`,"g"),this.newlineOrNonNewlineStringRe=new RegExp("(\\n|[^\\n]+)","g"),e.preserveNewlines){const n=new RegExp(`\\n|[^\\n${r}]+`,"gm");this.shrinkWrapAdd=function(s,i,a=c=>c,l=!1){if(!s)return;const c=i.stashedSpace;let u=!1,d=n.exec(s);if(d)for(u=!0,d[0]===`
954`?i.startNewLine():c||this.testLeadingWhitespace(s)?i.pushWord(a(d[0]),l):i.concatWord(a(d[0]),l);(d=n.exec(s))!==null;)d[0]===`
955`?i.startNewLine():i.pushWord(a(d[0]),l);i.stashedSpace=c&&!u||this.testTrailingWhitespace(s)}}else{const n=new RegExp(`[^${r}]+`,"g");this.shrinkWrapAdd=function(s,i,a=c=>c,l=!1){if(!s)return;const c=i.stashedSpace;let u=!1,d=n.exec(s);if(d)for(u=!0,c||this.testLeadingWhitespace(s)?i.pushWord(a(d[0]),l):i.concatWord(a(d[0]),l);(d=n.exec(s))!==null;)i.pushWord(a(d[0]),l);i.stashedSpace=c&&!u||this.testTrailingWhitespace(s)}}}
955addLiteral(e,r,n=!0){if(!e)return;const s=r.stashedSpace;let i=!1,a=this.newlineOrNonNewlineStringRe.exec(e);if(a)for(i=!0,a[0]===`
956`?r.startNewLine():s?r.pushWord(a[0],n):r.concatWord(a[0],n);(a=this.newlineOrNonNewlineStringRe.exec(e))!==null;)a[0]===`
957`?r.startNewLine():r.pushWord(a[0],n);r.stashedSpace=s&&!i}testLeadingWhitespace(e){return this.leadingWhitespaceRe.test(e)}testTrailingWhitespace(e){return this.trailingWhitespaceRe.test(e)}testContainsWords(e){return!this.allWhitespaceOrEmptyRe.test(e)}countNewlinesNoWords(e){this.newlineOrNonWhitespaceRe.lastIndex=0;let r=0,n;for(;(n=this.newlineOrNonWhitespaceRe.exec(e))!==null;)if(n[0]===`
958`)r++;else return 0;return r}}class obe{constructor(e,r,n=void 0){this.options=e,this.picker=r,this.metadata=n,this.whitespaceProcessor=new abe(e),this._stackItem=new mi(e),this._wordTransformer=void 0}pushWordTransform(e){this._wordTransformer=new sbe(this._wordTransformer,e)}popWordTransform(){if(!this._wordTransformer)return;const e=this._wordTransformer.transform;return this._wordTransformer=this._wordTransformer.next,e}startNoWrap(){this._stackItem.isNoWrap=!0}stopNoWrap(){this._stackItem.isNoWrap=!1}_getCombinedWordTransformer(){const e=this._wordTransformer?n=>GD(n,this._wordTransformer):void 0,r=this.options.encodeCharacters;return e?r?n=>r(e(n)):e:r}_popStackItem(){const e=this._stackItem;return this._stackItem=e.next,e}addLineBreak(){(this._stackItem instanceof mi||this._stackItem instanceof kl||this._stackItem instanceof vl)&&(this._stackItem.isPre?this._stackItem.rawText+=`
959`:this._stackItem.inlineTextBuilder.startNewLine())}addWordBreakOpportunity(){(this._stackItem instanceof mi||this._stackItem instanceof kl||this._stackItem instanceof vl)&&(this._stackItem.inlineTextBuilder.wordBreakOpportunity=!0)}addInline(e,{noWordTransform:r=!1}={}){if(this._stackItem instanceof mi||this._stackItem instanceof kl||this._stackItem instanceof vl){if(this._stackItem.isPre){this._stackItem.rawText+=e;return}if(!(e.length===0||this._stackItem.stashedLineBreaks&&!this.whitespaceProcessor.testContainsWords(e))){if(this.options.preserveNewlines){const n=this.whitespaceProcessor.countNewlinesNoWords(e);if(n>0){this._stackItem.inlineTextBuilder.startNewLine(n);return}}this._stackItem.stashedLineBreaks&&this._stackItem.inlineTextBuilder.startNewLine(this._stackItem.stashedLineBreaks),this.whitespaceProcessor.shrinkWrapAdd(e,this._stackItem.inlineTextBuilder,r?void 0:this._getCombinedWordTransformer(),this._stackItem.isNoWrap),this._stackItem.stashedLineBreaks=0}}}addLiteral(e){if((this._stackItem instanceof mi||this._stackItem instanceof kl||this._stackItem instanceof vl)&&e.length!==0){if(this._stackItem.isPre){this._stackItem.rawText+=e;return}this._stackItem.stashedLineBreaks&&this._stackItem.inlineTextBuilder.startNewLine(this._stackItem.stashedLineBreaks),this.whitespaceProcessor.addLiteral(e,this._stackItem.inlineTextBuilder,this._stackItem.isNoWrap),this._stackItem.stashedLineBreaks=0}}openBlock({leadingLineBreaks:e=1,reservedLineLength:r=0,isPre:n=!1}={}){const s=Math.max(20,this._stackItem.inlineTextBuilder.maxLineLength-r);this._stackItem=new mi(this.options,this._stackItem,e,s),n&&(this._stackItem.isPre=!0)}closeBlock({trailingLineBreaks:e=1,blockTransform:r=void 0}={}){const n=this._popStackItem(),s=r?r(xl(n)):xl(n);Rm(this._stackItem,s,n.leadingLineBreaks,Math.max(n.stashedLineBreaks,e))}openList({maxPrefixLength:e=0,prefixAlign:r="left",interRowLineBreaks:n=1,leadingLineBreaks:s=2}={}){this._stackItem=new zA(this.options,this._stackItem,{interRowLineBreaks:n,leadingLineBreaks:s,maxLineLength:this._stackItem.inlineTextBuilder.maxLineLength,maxPrefixLength:e,prefixAlign:r})}openListItem({prefix:e=""}={}){if(!(this._stackItem instanceof zA))throw new Error("Can't add a list item to something that is not a list! Check the formatter.");const r=this._stackItem,n=Math.max(e.length,r.maxPrefixLength),s=Math.max(20,r.inlineTextBuilder.maxLineLength-n);this._stackItem=new kl(this.options,r,{prefix:e,maxLineLength:s,leadingLineBreaks:r.interRowLineBreaks})}closeListItem(){const e=this._popStackItem(),r=e.next,n=Math.max(e.prefix.length,r.maxPrefixLength),s=`
960`+" ".repeat(n),a=(r.prefixAlign==="right"?e.prefix.padStart(n):e.prefix.padEnd(n))+xl(e).replace(/\n/g,s);Rm(r,a,e.leadingLineBreaks,Math.max(e.stashedLineBreaks,r.interRowLineBreaks))}closeList({trailingLineBreaks:e=2}={}){const r=this._popStackItem(),n=xl(r);n&&Rm(this._stackItem,n,r.leadingLineBreaks,e)}openTable(){this._stackItem=new PA(this._stackItem)}openTableRow(){if(!(this._stackItem instanceof PA))throw new Error("Can't add a table row to something that is not a table! Check the formatter.");this._stackItem=new _A(this._stackItem)}openTableCell({maxColumnWidth:e=void 0}={}){if(!(this._stackItem instanceof _A))throw new Error("Can't add a table cell to something that is not a table row! Check the formatter.");this._stackItem=new vl(this.options,this._stackItem,e)}closeTableCell({colspan:e=1,rowspan:r=1}={}){const n=this._popStackItem(),s=HD(xl(n),`
961`);
961n.next.cells.push({colspan:e,rowspan:r,text:s})}closeTableRow(){const e=this._popStackItem();e.next.rows.push(e.cells)}closeTable({tableToString:e,leadingLineBreaks:r=2,trailingLineBreaks:n=2}){const s=this._popStackItem(),i=e(s.rows);i&&Rm(this._stackItem,i,r,n)}toString(){return xl(this._stackItem.getRoot())}}function xl(t){if(!(t instanceof mi||t instanceof kl||t instanceof vl))throw new Error("Only blocks, list items and table cells can be requested for text contents.");return t.inlineTextBuilder.isEmpty()?t.rawText:t.rawText+t.inlineTextBuilder.toString()}function Rm(t,e,r,n){if(!(t instanceof mi||t instanceof kl||t instanceof vl))throw new Error("Only blocks, list items and table cells can contain text.");const s=xl(t),i=Math.max(t.stashedLineBreaks,r);t.inlineTextBuilder.clear(),s?t.rawText=s+`
962`.repeat(i)+e:(t.rawText=e,t.leadingLineBreaks=i),t.stashedLineBreaks=n}function GD(t,e){return e?GD(e.transform(t),e.next):t}function lbe(t={}){const e=t.selectors.filter(a=>!a.format);if(e.length)throw new Error("Following selectors have no specified format: "+e.map(a=>`\`${a.selector}\``).join(", "));const r=new mA(t.selectors.map(a=>[a.selector,a])).build(yA);typeof t.encodeCharacters!="function"&&(t.encodeCharacters=hbe(t.encodeCharacters));const n=new mA(t.baseElements.selectors.map((a,l)=>[a,l+1])).build(yA);function s(a){return ube(a,t,n)}const i=GN(t.limits.maxDepth,dbe,function(a,l){l.addInline(t.limits.ellipsis||"")});return function(a,l=void 0){return cbe(a,l,t,r,s,i)}}function cbe(t,e,r,n,s,i){const a=r.limits.maxInputLength;a&&t&&t.length>a&&(console.warn(`Input length ${t.length} is above allowed limit of ${a}. Truncating without ellipsis.`),t=t.substring(0,a));const l=Bwe(t,{decodeEntities:r.decodeEntities}),c=s(l.children),u=new obe(r,n,e);return i(c,u),u.toString()}function ube(t,e,r){const n=[];function s(a,l){l=l.slice(0,e.limits.maxChildNodes);for(const c of l){if(c.type!=="tag")continue;const u=r.pick1(c);if(u>0?n.push({selectorIndex:u,element:c}):c.children&&a(c.children),n.length>=e.limits.maxBaseElements)return}}return GN(e.limits.maxDepth,s)(t),e.baseElements.orderBy!=="occurrence"&&n.sort((a,l)=>a.selectorIndex-l.selectorIndex),e.baseElements.returnDomByDefault&&n.length===0?t:n.map(a=>a.element)}function dbe(t,e,r){if(!e)return;const n=r.options;e.length>n.limits.maxChildNodes&&(e=e.slice(0,n.limits.maxChildNodes),e.push({data:n.limits.ellipsis,type:"text"}));for(const i of e)switch(i.type){case"text":{r.addInline(i.data);break}case"tag":{const a=r.picker.pick1(i),l=n.formatters[a.format];l(i,t,r,a.options||{});break}}}function hbe(t){if(!t||Object.keys(t).length===0)return;const e=Object.entries(t).filter(([,i])=>i!==!1),r=new RegExp(e.map(([i])=>`(${rbe([...i][0])})`).join("|"),"g"),n=e.map(([,i])=>i),s=(i,...a)=>n[a.findIndex(l=>l)];return i=>i.replace(r,s)}function pbe(t,e,r,n){}function fbe(t,e,r,n){r.addLiteral(n.string||"")}function mbe(t,e,r,n){r.openBlock({leadingLineBreaks:n.leadingLineBreaks||2}),r.addLiteral(n.string||""),r.closeBlock({trailingLineBreaks:n.trailingLineBreaks||2})}function gbe(t,e,r,n){e(t.children,r)}function ybe(t,e,r,n){r.openBlock({leadingLineBreaks:n.leadingLineBreaks||2}),e(t.children,r),r.closeBlock({trailingLineBreaks:n.trailingLineBreaks||2})}function ZD(t){const e=t.attribs&&t.attribs.length?" "+Object.entries(t.attribs).map(([r,n])=>n===""?r:`${r}=${n.replace(/"/g,"&quot;")}`).join(" "):"";return`<${t.name}${e}>`}function YD(t){return`</${t.name}>`}function xbe(t,e,r,n){r.startNoWrap(),r.addLiteral(ZD(t)),r.stopNoWrap(),e(t.children,r),r.startNoWrap(),r.addLiteral(YD(t)),r.stopNoWrap()}function wbe(t,e,r,n){r.openBlock({leadingLineBreaks:n.leadingLineBreaks||2}),r.startNoWrap(),r.addLiteral(ZD(t)),r.stopNoWrap(),e(t.children,r),r.startNoWrap(),r.addLiteral(YD(t)),r.stopNoWrap(),r.closeBlock({trailingLineBreaks:n.trailingLineBreaks||2})}function bbe(t,e,r,n){r.startNoWrap(),r.addLiteral(wx(t,{decodeEntities:r.options.decodeEntities})),r.stopNoWrap()}function kbe(t,e,r,n){r.openBlock({leadingLineBreaks:n.leadingLineBreaks||2}),r.startNoWrap(),r.addLiteral(wx(t,{decodeEntities:r.options.decodeEntities}
962)),r.stopNoWrap(),r.closeBlock({trailingLineBreaks:n.trailingLineBreaks||2})}function vbe(t,e,r,n){r.addLiteral(n.prefix||""),e(t.children,r),r.addLiteral(n.suffix||"")}var jbe=Object.freeze({__proto__:null,block:ybe,blockHtml:kbe,blockString:mbe,blockTag:wbe,inline:gbe,inlineHtml:bbe,inlineString:fbe,inlineSurround:vbe,inlineTag:xbe,skip:pbe});function Zg(t,e){return t[e]||(t[e]=[]),t[e]}function Sbe(t,e=0){for(;t[e];)e++;return e}function Nbe(t,e){for(let r=0;r<e;r++){const n=Zg(t,r);for(let s=0;s<r;s++){const i=Zg(t,s);if(n[s]||i[r]){const a=n[s];n[s]=i[r],i[r]=a}}}}function Cbe(t,e,r,n){for(let s=0;s<t.rowspan;s++){const i=Zg(e,r+s);for(let a=0;a<t.colspan;a++)i[n+a]=t}}function z2(t,e){return t[e]===void 0&&(t[e]=e===0?0:1+z2(t,e-1)),t[e]}function IA(t,e,r,n){t[e+r]=Math.max(z2(t,e+r),z2(t,e)+n)}function Ebe(t,e,r){const n=[];let s=0;const i=t.length,a=[0];for(let u=0;u<i;u++){const d=Zg(n,u),h=t[u];let p=0;for(let f=0;f<h.length;f++){const m=h[f];p=Sbe(d,p),Cbe(m,n,u,p),p+=m.colspan,m.lines=m.text.split(`
963`);const y=m.lines.length;IA(a,u,m.rowspan,y+e)}s=d.length>s?d.length:s}Nbe(n,i>s?i:s);const l=[],c=[0];for(let u=0;u<s;u++){let d=0,h;const p=Math.min(i,n[u].length);for(;d<p;)if(h=n[u][d],h){if(!h.rendered){let f=0;for(let m=0;m<h.lines.length;m++){const y=h.lines[m],k=a[d]+m;l[k]=(l[k]||"").padEnd(c[u])+y,f=y.length>f?y.length:f}IA(c,u,h.colspan,f+r),h.rendered=!0}d+=h.rowspan}
963else{const f=a[d];l[f]=l[f]||"",d++}}return l.join(`
964`)}function Tbe(t,e,r,n){r.addLineBreak()}function Abe(t,e,r,n){r.addWordBreakOpportunity()}function zbe(t,e,r,n){r.openBlock({leadingLineBreaks:n.leadingLineBreaks||2}),r.addInline("-".repeat(n.length||r.options.wordwrap||40)),r.closeBlock({trailingLineBreaks:n.trailingLineBreaks||2})}function Pbe(t,e,r,n){r.openBlock({leadingLineBreaks:n.leadingLineBreaks||2}),e(t.children,r),r.closeBlock({trailingLineBreaks:n.trailingLineBreaks||2})}function _be(t,e,r,n){r.openBlock({isPre:!0,leadingLineBreaks:n.leadingLineBreaks||2}),e(t.children,r),r.closeBlock({trailingLineBreaks:n.trailingLineBreaks||2})}function Ibe(t,e,r,n){r.openBlock({leadingLineBreaks:n.leadingLineBreaks||2}),n.uppercase!==!1?(r.pushWordTransform(s=>s.toUpperCase()),e(t.children,r),r.popWordTransform()):e(t.children,r),r.closeBlock({trailingLineBreaks:n.trailingLineBreaks||2})}function Obe(t,e,r,n){r.openBlock({leadingLineBreaks:n.leadingLineBreaks||2,reservedLineLength:2}),e(t.children,r),r.closeBlock({trailingLineBreaks:n.trailingLineBreaks||2,blockTransform:s=>(n.trimEmptyLines!==!1?HD(s,`
965`):s).split(`
966`).map(i=>"> "+i).join(`
967`)})}function P2(t,e){if(!e)return t;const r=typeof e[0]=="string"?e[0]:"[",n=typeof e[1]=="string"?e[1]:"]";return r+t+n}function JD(t,e,r,n,s){const i=typeof e=="function"?e(t,n,s):t;return i[0]==="/"&&r?tbe(r,"/")+i:i}function Rbe(t,e,r,n){const s=t.attribs||{},i=s.alt?s.alt:"",a=s.src?JD(s.src,n.pathRewrite,n.baseUrl,r.metadata,t):"",l=a?i?i+" "+P2(a,n.linkBrackets):P2(a,n.linkBrackets):i;r.addInline(l,{noWordTransform:!0})}function Lbe(t,e,r,n){function s(){if(n.ignoreHref||!t.attribs||!t.attribs.href)return"";let a=t.attribs.href.replace(/^mailto:/,"");return n.noAnchorUrl&&a[0]==="#"?"":(a=JD(a,n.pathRewrite,n.baseUrl,r.metadata,t),a)}const i=s();if(!i)e(t.children,r);else{let a="";r.pushWordTransform(c=>(c&&(a+=c),c)),e(t.children,r),r.popWordTransform(),n.hideLinkHrefIfSameAsText&&i===a||r.addInline(a?" "+P2(i,n.linkBrackets):i,{noWordTransform:!0})}}function XD(t,e,r,n,s){const i=yd(t,["parent","name"])==="li";let a=0;const l=(t.children||[]).filter(c=>c.type!=="text"||!/^\s*$/.test(c.data)).map(function(c){if(c.name!=="li")return{node:c,prefix:""};const u=i?s().trimStart():s();return u.length>a&&(a=u.length),{node:c,prefix:u}});if(l.length){r.openList({interRowLineBreaks:1,leadingLineBreaks:i?1:n.leadingLineBreaks||2,maxPrefixLength:a,prefixAlign:"left"});for(const{node:c,prefix:u}of l)r.openListItem({prefix:u}),e([c],r),r.closeListItem();r.closeList({trailingLineBreaks:i?1:n.trailingLineBreaks||2})}}function Mbe(t,e,r,n){const s=n.itemPrefix||" * ";return XD(t,e,r,n,()=>s)}function Dbe(t,e,r,n){let s=Number(t.attribs.start||"1");const i=Fbe(t.attribs.type);return XD(t,e,r,n,()=>" "+i(s++)+". ")}function Fbe(t="1"){switch(t){case"a":return e=>EA(e,"a");case"A":return e=>EA(e,"A");case"i":return e=>AA(e).toLowerCase();case"I":return e=>AA(e);case"1":default:return e=>e.toString()}}function Bbe(t){const e=[],r=[];for(const n of t)n.startsWith(".")?e.push(n.substring(1)):n.startsWith("#")&&r.push(n.substring(1));return{classes:e,ids:r}}function $be(t,e){if(e===!0)return!0;if(!t)return!1;const{classes:r,ids:n}=Bbe(e),s=(t.class||"").split(" "),i=(t.id||"").split(" ");return s.some(a=>r.includes(a))||i.some(a=>n.includes(a))}function Ube(t,e,r,n){return $be(t.attribs,r.options.tables)?QD(t,e,r,n):Wbe(t,e,r,n)}function Wbe(t,e,r,n){r.openBlock({leadingLineBreaks:n.leadingLineBreaks}),e(t.children,r),r.closeBlock({trailingLineBreaks:n.trailingLineBreaks})}function QD(t,e,r,n){r.openTable(),t.children.forEach(i),r.closeTable({tableToString:a=>Ebe(a,n.rowSpacing??0,n.colSpacing??3),leadingLineBreaks:n.leadingLineBreaks,trailingLineBreaks:n.trailingLineBreaks});function s(a){const l=+yd(a,["attribs","colspan"])||1,c=+yd(a,["attribs","rowspan"])||1;r.openTableCell({maxColumnWidth:n.maxColumnWidth}),e(a.children,r),r.closeTableCell({colspan:l,rowspan:c})}function i(a){if(a.type!=="tag")return;const l=n.uppercaseHeaderCells!==!1?c=>{r.pushWordTransform(u=>u.toUpperCase()),s(c),r.popWordTransform()}:s;switch(a.name){case"thead":case"tbody":case"tfoot":case"center":a.children.forEac
967h(i);return;case"tr":{r.openTableRow();for(const c of a.children)if(c.type==="tag")switch(c.name){case"th":{l(c);break}case"td":{s(c);break}}r.closeTableRow();break}}}}var Vbe=Object.freeze({__proto__:null,anchor:Lbe,blockquote:Obe,dataTable:QD,heading:Ibe,horizontalLine:zbe,image:Rbe,lineBreak:Tbe,orderedList:Dbe,paragraph:Pbe,pre:_be,table:Ube,unorderedList:Mbe,wbr:Abe});const Hbe={baseElements:{selectors:["body"],orderBy:"selectors",returnDomByDefault:!0},decodeEntities:!0,encodeCharacters:{},formatters:{},limits:{ellipsis:"...",maxBaseElements:void 0,maxChildNodes:void 0,maxDepth:void 0,maxInputLength:1<<24},longWordSplit:{forceWrapOnLimit:!1,wrapCharacters:[]},preserveNewlines:!1,selectors:[{selector:"*",format:"inline"},{selector:"a",format:"anchor",options:{baseUrl:null,hideLinkHrefIfSameAsText:!1,ignoreHref:!1,linkBrackets:["[","]"],noAnchorUrl:!0}},{selector:"article",format:"block",options:{leadingLineBreaks:1,trailingLineBreaks:1}},{selector:"aside",format:"block",options:{leadingLineBreaks:1,trailingLineBreaks:1}},{selector:"blockquote",format:"blockquote",options:{leadingLineBreaks:2,trailingLineBreaks:2,trimEmptyLines:!0}},{selector:"br",format:"lineBreak"},{selector:"div",format:"block",options:{leadingLineBreaks:1,trailingLineBreaks:1}},{selector:"footer",format:"block",options:{leadingLineBreaks:1,trailingLineBreaks:1}},{selector:"form",format:"block",options:{leadingLineBreaks:1,trailingLineBreaks:1}},{selector:"h1",format:"heading",options:{leadingLineBreaks:3,trailingLineBreaks:2,uppercase:!0}},{selector:"h2",format:"heading",options:{leadingLineBreaks:3,trailingLineBreaks:2,uppercase:!0}},{selector:"h3",format:"heading",options:{leadingLineBreaks:3,trailingLineBreaks:2,uppercase:!0}},{selector:"h4",format:"heading",options:{leadingLineBreaks:2,trailingLineBreaks:2,uppercase:!0}},{selector:"h5",format:"heading",options:{leadingLineBreaks:2,trailingLineBreaks:2,uppercase:!0}},{selector:"h6",format:"heading",options:{leadingLineBreaks:2,trailingLineBreaks:2,uppercase:!0}},{selector:"header",format:"block",options:{leadingLineBreaks:1,trailingLineBreaks:1}},{selector:"hr",format:"horizontalLine",options:{leadingLineBreaks:2,length:void 0,trailingLineBreaks:2}},{selector:"img",format:"image",options:{baseUrl:null,linkBrackets:["[","]"]}},{selector:"main",format:"block",options:{leadingLineBreaks:1,trailingLineBreaks:1}},{selector:"nav",format:"block",options:{leadingLineBreaks:1,trailingLineBreaks:1}},{selector:"ol",format:"orderedList",options:{leadingLineBreaks:2,trailingLineBreaks:2}},{selector:"p",format:"paragraph",options:{leadingLineBreaks:2,trailingLineBreaks:2}},{selector:"pre",format:"pre",options:{leadingLineBreaks:2,trailingLineBreaks:2}},{selector:"section",format:"block",options:{leadingLineBreaks:1,trailingLineBreaks:1}},{selector:"table",format:"table",options:{colSpacing:3,leadingLineBreaks:2,maxColumnWidth:60,rowSpacing:0,trailingLineBreaks:2,uppercaseHeaderCells:!0}},{selector:"ul",format:"unorderedList",options:{itemPrefix:" * ",leadingLineBreaks:2,trailingLineBreaks:2}},{selector:"wbr",format:"wbr"}],tables:[],whitespaceCharacters:` 	\r
968\f​`,wordwrap:80},qbe=(t,e,r)=>[...t,...e],e9=(t,e,r)=>[...e],Kbe=(t,e,r)=>t.some(n=>typeof n=="object")?qbe(t,e):e9(t,e);function Gbe(t={}){return t=VD(Hbe,t,{arrayMerge:e9,customMerge:e=>e==="selectors"?Kbe:void 0}),t.formatters=Object.assign({},jbe,Vbe,t.formatters),t.selectors=qD(t.selectors,e=>e.selector),Ybe(t),lbe(t)}function Zbe(t,e={},r=void 0){return Gbe(e)(t,r)}function Ybe(t){if(t.tags){const r=Object.entries(t.tags).map(([n,s])=>({...s,selector:n||"*"}));t.selectors.push(...r),t.selectors=qD(t.selectors,n=>n.selector)}function e(r,n,s){const i=n.pop();for(const a of n){let l=r[a];l||(l={},r[a]=l),r=l}r[i]=s}if(t.baseElement){const r=t.baseElement;e(t,["baseElements","selectors"],Array.isArray(r)?r:[r])}t.returnDomByDefault!==void 0&&e(t,["baseElements","returnDomByDefault"],t.returnDomByDefault);for(const r of t.selectors)r.format==="anchor"&&yd(r,["options","noLinkBrackets"])&&e(r,["options","linkBrackets"],!1)}const Jbe="smart-copy-google";async function t9(){const t=window.open("",Jbe,"width=520,height=680");try{const{url:e}=(await xe.post("/google/connect")).data;t?t.location.href=e:window.location.href=e}catch(e){throw t==null||t.close(),e}}function Xbe(t=18e4){return new Promise(e=>{const r=i=>{window.removeEventListener("message",n),clearTimeout(s),e(i)},n=i=>{var a;i.origin===window.location.origin&&((a=i.data)==null?void 0:a.source)==="smart-copy-google"&&r(!!i.data.ok)};window.addEventListener("message",n);const s=setTimeout(()=>r(!1),t)})}const Qbe=`
969  .prose h1 {
970    font-size: 1.875rem;
971    font-weight: 700;
972    margin-top: 1.5rem;
973    margin-bottom: 1rem;
974    color: inherit;
975  }
976  .prose h2 {
977    font-size: 1.5rem;
978    font-weight: 700;
979    margin-top: 1.25rem;
980    margin-bottom: 0.75rem;
981    color: inherit;
982  }
983  .prose h3 {
984    font-size: 1.25rem;
985    font-weight: 600;
986    margin-top: 1rem;
987    margin-bottom: 0.5rem;
988    color: inherit;
989  }
990  .prose p {
991    margin-top: 0.75rem;
992    margin-bottom: 0.75rem;
993    line-height: 1.75;
994  }
995  .prose ul, .prose ol {
996    margin-top: 0.75rem;
997    margin-bottom: 0.75rem;
998    padding-left: 1.5rem;
999  }
1000  .prose li {
1001    margin-top: 0.25rem;
1002    margin-bottom: 0.25rem;
1003  }
1004  .prose strong {
1005    font-weight: 600;
1006    color: inherit;
1007  }
1008  .prose em {
1009    font-style: italic;
1010  }
1011`,OA=({status:t})=>{const{t:e}=He("order-detail"),r={PENDING:{bg:"bg-yellow-100 dark:bg-yellow-900/30",text:"text-yellow-700 dark:text-yellow-300",icon:qs,label:e("status.pending")}
1011,IN_PROGRESS:{bg:"bg-blue-100 dark:bg-blue-900/30",text:"text-blue-700 dark:text-blue-300",icon:fn,label:e("status.inProgress")},COMPLETED:{bg:"bg-green-100 dark:bg-green-900/30",text:"text-green-700 dark:text-green-300",icon:Rt,label:e("status.completed")}},n=r[t]||r.PENDING,s=n.icon;return o.jsxs("span",{className:`inline-flex items-center gap-1.5 px-3 py-1 rounded-full text-xs font-medium ${n.bg} ${n.text}`,children:[o.jsx(s,{className:"w-3.5 h-3.5"}),n.label]})};function e1e(t){const e=document.createElement("div");e.innerHTML=t;const r=[],n=s=>{var i,a;if(s.nodeType===Node.TEXT_NODE){const l=(i=s.textContent)==null?void 0:i.trim();return l?new ep({text:l}):null}if(s.nodeType===Node.ELEMENT_NODE){const l=s,c=l.tagName.toLowerCase(),u=[];switch(l.childNodes.forEach(d=>{const h=n(d);h&&(Array.isArray(h)?u.push(...h):u.push(h))}),c){case"h1":return r.push(new us({text:l.textContent||"",heading:I1.HEADING_1,spacing:{before:400,after:200}})),null;case"h2":return r.push(new us({text:l.textContent||"",heading:I1.HEADING_2,spacing:{before:300,after:150}})),null;case"h3":return r.push(new us({text:l.textContent||"",heading:I1.HEADING_3,spacing:{before:200,after:100}})),null;case"p":return u.length>0?r.push(new us({children:u,spacing:{after:150}})):(a=l.textContent)!=null&&a.trim()&&r.push(new us({text:l.textContent.trim(),spacing:{after:150}})),null;case"strong":case"b":return new ep({text:l.textContent||"",bold:!0});case"em":case"i":return new ep({text:l.textContent||"",italics:!0});case"ul":return l.querySelectorAll("li").forEach(d=>{var h;r.push(new us({text:`• ${((h=d.textContent)==null?void 0:h.trim())||""}`,spacing:{after:100},indent:{left:720}}))}),null;case"ol":return l.querySelectorAll("li").forEach((d,h)=>{var p;r.push(new us({text:`${h+1}. ${((p=d.textContent)==null?void 0:p.trim())||""}`,spacing:{after:100},indent:{left:720}}))}),null;case"br":return r.push(new us({text:""})),null;default:return u}}return null};return e.childNodes.forEach(s=>n(s)),r}const t1e=({text:t,index:e,orderId:r,expandedGuidelines:n,toggleGuidelines:s,truncateText:i})=>{var oe,ce;const{t:a}=He("order-detail"),{formatPrice:l}=bn(),c=n.has(t.id),u=t.guidelines&&t.guidelines.length>50,[d,h]=M.useState(!1),[p,f]=M.useState(!1),m=Zs(),[y,k]=M.useState(null),{data:g}=mt({queryKey:["google-export",t.id],queryFn:async()=>(await xe.get(`/google/exports/${t.id}`)).data,enabled:!!t.generatedContent}),x=y||(g==null?void 0:g.doc_url)||null,w=t.generatedContent||"",b=!!w,v=Zbe(w,{wordwrap:!1,limits:{maxInputLength:1/0}}),A=w.length>1e3,C=sM({extensions:[zM,nfe.configure({placeholder:a("editor.placeholder")})],content:w,editorProps:{attributes:{class:"prose prose-sm dark:prose-invert max-w-none focus:outline-none min-h-[400px] p-4"}}}),_=Be({mutationFn:async X=>(await xe.put(`/texts/${t.id}`,{content:X})).data,onSuccess:()=>
1011{le.success(a("editor.saveSuccess")),m.invalidateQueries({queryKey:["order",r]})},onError:()=>{le.error(a("editor.saveError"))}}),N=()=>{if(C){const X=C.getHTML();_.mutate(X)}},W=()=>{C&&C.commands.setContent(w),h(!1)},K=async()=>{var X,he;try{le.loading(a("toast.generatingPdf"),{id:"pdf-gen"});const Te=(await xe.get(`/texts/${t.id}/pdf`,{responseType:"blob"})).data,Ye=window.URL.createObjectURL(Te),bt=document.createElement("a");bt.href=Ye,bt.download=`${t.topic.replace(/[^a-z0-9]/gi,"_")}.pdf`,document.body.appendChild(bt),bt.click(),document.body.removeChild(bt),window.URL.revokeObjectURL(Ye),le.success(a("toast.pdfDownloaded"),{id:"pdf-gen"})}catch(we){console.error("PDF Error:",we),le.error(((he=(X=we.response)==null?void 0:X.data)==null?void 0:he.error)||a("toast.pdfError"),{id:"pdf-gen",duration:5e3})}},T=async()=>{try{le.loading(a("toast.generatingDocx"),{id:"docx-gen"});const X=await xe.get(`/texts/${t.id}/docx`,{responseType:"blob"});aA.saveAs(X.data,`${t.topic.replace(/[^a-z0-9]/gi,"_")}.docx`),le.success(a("toast.docxDownloaded"),{id:"docx-gen"})}catch{try{const he=e1e(w);he.length===0&&he.push(new us({text:v}));const we=new bye({sections:[{properties:{page:{margin:{top:1440,right:1440,bottom:1440,left:1440}}},children:he}]}),Te=await Rye.toBlob(we);aA.saveAs(Te,`${t.topic.replace(/[^a-z0-9]/gi,"_")}.docx`),le.success(a("toast.docxDownloaded"),{id:"docx-gen"})}catch(he){console.error(he),le.error(a("toast.docxError"),{id:"docx-gen"})}}},F=async()=>{try{await navigator.clipboard.writeText(v),le.success(a("toast.copied"))}catch{le.error(a("toast.copyError"))}},E=async()=>{try{await navigator.clipboard.writeText(w),le.success(a("toast.htmlCopied"))}catch{le.error(a("toast.copyError"))}},H=async(X=!1)=>{var he,we,Te;le.loading(a("toast.googleDocsSaving"),{id:"gdoc"});try{const{data:Ye}=await xe.post(`/texts/${t.id}/google-doc`);le.dismiss("gdoc"),k(Ye.doc_url),window.open(Ye.doc_url,"_blank","noopener"),le.success(a("toast.googleDocsSaved"))}catch(Ye){if(((he=Ye.response)==null?void 0:he.status)===409&&!X)return le.dismiss("gdoc"),await t9(),await Xbe()?H(!0):void 0;le.error(((Te=(we=Ye.response)==null?void 0:we.data)==null?void 0:Te.error)==="not_connected"?a("toast.googleDocsNotConnected"):a("toast.googleDocsError"),{id:"gdoc"})}},$=(()=>{if(!t.sources)return null;const{userSources:X,googleSources:he,academicSources:we,failedUserSources:Te}=t.sources;return(!X||X.length===0)&&(!he||he.length===0)&&(!we||we.length===0)&&(!Te||Te.length===0)?null:{userSources:X||[],googleSources:he||[],academicSources:we||[],failedUserSources:Te||[]}})(),[D,J]=M.useState(!1),[de,G]=M.useState(""),B=t.revisionsUsed||0,ae=Math.max(0,3-B),ge=Be({mutationFn:async X=>(await xe.post(`/texts/${t.id}/revision`,{feedback:X})).data,onSuccess:()=>{le.success(a("toast.revisionQueued"),{duration:6e3}),J(!1),G(""),m.invalidateQueries({queryKey:["order",r]})},onError:X=>{var he,we;le.error(((we=(he=X.response)==null?void 0:he.data)==null?void 0:we.error)||a("toast.revisionError"))}}),[ne,O]=M.useState(!1),[I,ee]=M.useState(""),[Q,q]=M.useState("draft"),[Z,me]=M.useState({baseUrl:"",wpUsername:"",appPassword:""}),[z,fe]=M.useState(!1),{data:R,refetch:j}=mt({queryKey:["wp-sites"],queryFn:async()=>(await xe.get("/wp/sites")).data,enabled:ne}),S=Be({mutationFn:async()=>(await xe.post("/wp/sites",Z)).data,onSuccess:X=>{le.success(a("wp.siteAdded")),fe(!1),me({baseUrl:"",wpUsername:"",appPassword:""}),j().then(()=>ee(X.id))},onError:X=>{var he,we;le.error(((we=(he=X.response)==null?void 0:he.data)==null?void 0:we.error)||a("wp.error"))}}),P=Be({mutationFn:async()=>(await xe.post("/wp/publish",{textId:t.id,siteId:I,status:Q})).data,onSuccess:X=>{le.success(a("wp.published"),{duration:6e3}
1011),O(!1),m.invalidateQueries({queryKey:["order",r]}),X.link&&window.open(X.link,"_blank")},onError:X=>{var he,we;le.error(((we=(he=X.response)==null?void 0:he.data)==null?void 0:we.error)||a("wp.error"),{duration:6e3})}}),[L,V]=M.useState(""),U=Be({mutationFn:async X=>(await xe.post(`/texts/${t.id}/outline-decision`,X)).data,onSuccess:()=>{V(""),m.invalidateQueries({queryKey:["order",r]})},onError:X=>{var he,we;le.error(((we=(he=X.response)==null?void 0:he.data)==null?void 0:we.error)||a("toast.revisionError"))}});return o.jsxs(ue.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:e*.1},className:"card dark:bg-gray-800 dark:border-gray-700",children:[o.jsxs("div",{className:"flex items-start justify-between mb-4",children:[o.jsxs("div",{className:"flex-1",children:[o.jsxs("div",{className:"flex items-center gap-3 mb-2",children:[o.jsx("span",{className:"w-8 h-8 bg-purple-600 text-white rounded-full flex items-center justify-center text-sm font-bold",children:e+1}),o.jsx("h3",{className:"text-xl font-bold text-gray-900 dark:text-white",children:Al(t.topic)}),b&&o.jsx(Rt,{className:"w-5 h-5 text-green-500"})]}),o.jsxs("div",{className:"flex flex-wrap gap-4 text-sm text-gray-600 dark:text-gray-400 ml-11",children:[o.jsxs("span",{className:"flex items-center gap-1 font-medium text-gray-700 dark:text-gray-200",children:["📋 ",a("texts.declaredLength")," ",t.length.toLocaleString()," ",a("texts.characters")," (",t.pages," ",a("texts.pages"),")"]}),w&&o.jsxs("span",{className:"flex items-center gap-1 font-medium text-green-600 dark:text-green-400",children:["✅ ",a("texts.generated")," ",w.replace(/<[^>]*>/g,"").length.toLocaleString()," ",a("texts.characters")]}),o.jsxs("span",{className:"flex items-center gap-1",children:["🌍 ",t.language.toUpperCase()]})]}),t.guidelines&&o.jsxs("div",{className:"ml-11 mt-3 p-3 bg-gray-50 dark:bg-gray-700 rounded-lg",children:[o.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400 font-semibold mb-1",children:a("texts.guidelines")}),o.jsx("p",{className:"text-sm text-gray-700 dark:text-gray-300 whitespace-pre-wrap break-words",children:c||!u?t.guidelines:i(t.guidelines,50)}),u&&o.jsx("button",{onClick:()=>s(t.id),className:"mt-2 text-xs font-medium text-purple-600 dark:text-purple-400 hover:text-purple-700 dark:hover:text-purple-300 transition-colors inline-flex items-center gap-1 group",children:c?o.jsxs(o.Fragment,{children:[a("texts.showLess"),o.jsx("svg",{className:"w-3 h-3 transform group-hover:-translate-y-0.5 transition-transform",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:o.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 15l7-7 7 7"})})]}):o.jsxs(o.Fragment,{children:[a("texts.showMore")," (",t.guidelines.length," ",a("texts.characters"),")",o.jsx("svg",{className:"w-3 h-3 transform group-hover:translate-y-0.5 transition-transform",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:o.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]})})]})]}),o.jsx("div",{className:"text-right ml-4",children:o.jsx("p",{className:"text-xl font-bold text-purple-600 dark:text-purple-400",children:l(parseFloat(t.price.toString()))})})]}),b&&o.jsxs(o.Fragment,{children:[!d&&((oe=t.featuredImage)==null?void 0:oe.url)&&o.jsxs("div",{className:"mb-4 relative group",children:[o.jsx("img",{src:t.featuredImage.url,alt:t.featuredImage.alt||t.topic,loading:"lazy",className:"w-full max-h-72 object-cover rounded-lg border border-gray-200 dark:border-gray-700"}),o.jsx("a",{href:t.featuredImage.url,target:"_blank",rel:"noopener noreferrer",download:!0,className:"absolute bottom-3 right-3 px-3 py-1.5 text-xs rounded-lg bg-black/60 text-white opacity-0 group-hover:opacity-100 transition-opacity",children:a("image.download")})]}),!d&&o.jsxs("div",{className:"mb-4",children:[o.jsx("div",{className:"p-4 bg-white dark:bg-gray-900 rounded-lg border border-gray-200 dark:border-gray-700 text-gray-700 dark:text-gray-300",children:o.jsx(jt,{mode:"wait",children:p?o.jsx(ue.div,{initial:{opacity:0}
1011,animate:{opacity:1},exit:{opacity:0},transition:{duration:.2},className:"prose prose-sm dark:prose-invert max-w-none text-gray-700 dark:text-gray-300",dangerouslySetInnerHTML:{__html:w}},"full"):o.jsxs(ue.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.2},className:"prose prose-sm dark:prose-invert max-w-none text-gray-700 dark:text-gray-300",style:{maxHeight:"300px",overflow:"hidden",position:"relative"},children:[o.jsx("div",{dangerouslySetInnerHTML:{__html:w}}),A&&o.jsx("div",{className:"absolute bottom-0 left-0 right-0 h-20 bg-gradient-to-t from-white dark:from-gray-900 to-transparent pointer-events-none"})]},"preview")})}),A&&o.jsx("button",{onClick:()=>f(!p),className:"mt-2 text-sm text-purple-600 dark:text-purple-400 hover:underline flex items-center gap-1",children:p?o.jsxs(o.Fragment,{children:[o.jsx("span",{children:a("texts.showLess")}),o.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:o.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 15l7-7 7 7"})})]}):o.jsxs(o.Fragment,{children:[o.jsx("span",{children:a("texts.showMore")}),o.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:o.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]})}),$&&o.jsxs("div",{className:"mt-4 p-4 bg-gray-50 dark:bg-gray-700/50 rounded-lg border border-gray-200 dark:border-gray-600",children:[o.jsxs("h4",{className:"text-sm font-semibold text-gray-700 dark:text-gray-300 mb-3 flex items-center gap-2",children:[o.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:o.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 6.253v13m0-13C10.832 5.477 9.246 5 7.5 5S4.168 5.477 3 6.253v13C4.168 18.477 5.754 18 7.5 18s3.332.477 4.5 1.253m0-13C13.168 5.477 14.754 5 16.5 5c1.747 0 3.332.477 4.5 1.253v13C19.832 18.477 18.247 18 16.5 18c-1.746 0-3.332.477-4.5 1.253"})}),a("sources.title")," (",$.userSources.length+$.googleSources.length+$.academicSources.length,")"]}),$.academicSources.length>0&&o.jsxs("div",{className:"mb-3",children:[o.jsxs("p",{className:"text-xs font-medium text-indigo-600 dark:text-indigo-400 mb-2",children:["🎓 ",a("sources.academicSources")," (",$.academicSources.length,")"]}),o.jsx("ul",{className:"space-y-1",children:$.academicSources.map((X,he)=>o.jsx("li",{className:"text-xs",children:o.jsx("a",{href:X.url,target:"_blank",rel:"noopener noreferrer",className:"text-blue-600 dark:text-blue-400 hover:underline break-all",children:X.url.length>80?X.url.substring(0,80)+"...":X.url})},`academic-${he}`))})]}),$.failedUserSources.length>0&&o.jsxs("div",{className:"mb-3 p-2 bg-amber-50 dark:bg-amber-900/20 rounded border border-amber-200 dark:border-amber-800",children:[o.jsxs("p",{className:"text-xs font-medium text-amber-700 dark:text-amber-400 mb-1",children:["⚠️ ",a("sources.failedSources")," (",$.failedUserSources.length,")"]}),o.jsx("p",{className:"text-xs text-amber-600 dark:text-amber-500 mb-2",children:a("sources.failedSourcesHint")}),o.jsx("ul",{className:"space-y-1",children:$.failedUserSources.map((X,he)=>o.jsx("li",{className:"text-xs text-amber-700 dark:text-amber-400 break-all",children:X.url.length>80?X.url.substring(0,80)+"...":X.url},`failed-${he}`))})]}),$.userSources.length>0&&o.jsxs("div",{className:"mb-3",children:[o.jsxs("p",{className:"text-xs font-medium text-purple-600 dark:text-purple-400 mb-2",children:["📎 ",a("sources.userSources")," (",$.userSources.length,")"]}),o.jsx("ul",{className:"space-y-1",children:$.userSources.map((X,he)=>o.jsx("li",{className:"text-xs",children:o.jsx("a",{href:X.url,target:"_blank",rel:"noopener noreferrer",className:"text-blue-600 dark:text-blue-400 hover:underline break-all",children:X.url.length>80?X.url.substring(0,80)+"...":X.url})},`user-${he}`))})]}),$.googleSources.length>0&&o.jsxs("div",{children:[o.jsxs("p",{className:"text-xs font-medium text-green-600 dark:text-green-400 mb-2",children:["🔍 ",a("sources.searchSources")," (",$.googleSources.length,")"]}),o.jsx("ul",{className:"space-y-1",children:$.googleSources.map((X,he)=>o.jsx("li",{className:"text-xs",children:o.jsx("a",{href:X.url,target:"_blank",rel:"noopener noreferrer",className:"text-blue-600 dar
1011k:text-blue-400 hover:underline break-all",children:X.url.length>80?X.url.substring(0,80)+"...":X.url})},`google-${he}`))})]})]})]}),o.jsx(jt,{children:d&&C&&o.jsxs(ue.div,{initial:{opacity:0,height:0},animate:{opacity:1,height:"auto"},exit:{opacity:0,height:0},className:"mb-4",children:[o.jsxs("div",{className:"border-2 border-purple-500 dark:border-purple-600 rounded-lg overflow-hidden",children:[o.jsxs("div",{className:"bg-gray-100 dark:bg-gray-800 border-b border-gray-300 dark:border-gray-700 p-2 flex gap-2 flex-wrap",children:[o.jsx("button",{onClick:()=>C.chain().focus().toggleBold().run(),className:`px-3 py-1 rounded text-sm ${C.isActive("bold")?"bg-purple-600 text-white":"bg-white dark:bg-gray-700 text-gray-700 dark:text-gray-300"}`,children:o.jsx("strong",{children:"B"})}),o.jsx("button",{onClick:()=>C.chain().focus().toggleItalic().run(),className:`px-3 py-1 rounded text-sm ${C.isActive("italic")?"bg-purple-600 text-white":"bg-white dark:bg-gray-700 text-gray-700 dark:text-gray-300"}`,children:o.jsx("em",{children:"I"})}),o.jsx("button",{onClick:()=>C.chain().focus().toggleHeading({level:2}).run(),className:`px-3 py-1 rounded text-sm ${C.isActive("heading",{level:2})?"bg-purple-600 text-white":"bg-white dark:bg-gray-700 text-gray-700 dark:text-gray-300"}`,children:"H2"}),o.jsx("button",{onClick:()=>C.chain().focus().toggleHeading({level:3}).run(),className:`px-3 py-1 rounded text-sm ${C.isActive("heading",{level:3})?"bg-purple-600 text-white":"bg-white dark:bg-gray-700 text-gray-700 dark:text-gray-300"}`,children:"H3"}),o.jsx("button",{onClick:()=>C.chain().focus().toggleBulletList().run(),className:`px-3 py-1 rounded text-sm ${C.isActive("bulletList")?"bg-purple-600 text-white":"bg-white dark:bg-gray-700 text-gray-700 dark:text-gray-300"}`,children:a("editor.list")}),o.jsx("button",{onClick:()=>C.chain().focus().toggleOrderedList().run(),className:`px-3 py-1 rounded text-sm ${C.isActive("orderedList")?"bg-purple-600 text-white":"bg-white dark:bg-gray-700 text-gray-700 dark:text-gray-300"}`,children:a("editor.orderedList")})]}),o.jsx("div",{className:"bg-white dark:bg-gray-900 max-h-[600px] overflow-y-auto text-gray-700 dark:text-gray-300",children:o.jsx(rM,{editor:C})})]}),o.jsxs("div",{className:"flex gap-2 mt-3",children:[o.jsxs("button",{onClick:N,disabled:_.isPending,className:"btn btn-primary flex items-center gap-2",children:[o.jsx(rS,{className:"w-4 h-4"}),_.isPending?a("editor.saving"):a("editor.save")]}),o.jsxs("button",{onClick:W,className:"btn btn-secondary flex items-center gap-2",children:[o.jsx(yt,{className:"w-4 h-4"}),a("editor.cancel")]})]})]})}),!d&&o.jsxs("div",{className:"flex flex-wrap gap-2",children:[o.jsxs("button",{onClick:()=>h(!0),className:"btn btn-primary flex items-center gap-2 text-sm",children:[o.jsx(Ro,{className:"w-4 h-4"}),a("actions.edit")]}),o.jsxs("button",{onClick:K,className:"btn btn-secondary flex items-center gap-2 text-sm",children:[o.jsx(SV,{className:"w-4 h-4"}),a("actions.downloadPdf")]}),o.jsxs("button",{onClick:T,className:"btn btn-secondary flex items-center gap-2 text-sm",children:[o.jsx(Ty,{className:"w-4 h-4"}),a("actions.downloadDocx")]}),o.jsxs("button",{onClick:F,className:"btn btn-secondary flex items-center gap-2 text-sm",children:[o.jsx(Qj,{className:"w-4 h-4"}),a("actions.copyText")]}),o.jsxs("button",{onClick:E,className:"btn btn-secondary flex items-center gap-2 text-sm",children:[o.jsx(Jt,{className:"w-4 h-4"}),a("actions.copyHtml")]}),o.jsxs("button",{onClick:()=>H(),className:"btn btn-secondary flex items-center gap-2 text-sm",children:[o.jsx(Jt,{className:"w-4 h-4"}),a("actions.saveToGoogleDocs")]}),x&&o.jsxs("a",{href:x,target:"_blank",rel:"noopener noreferrer",className:"btn btn-secondary flex items-center gap-2 text-sm",children:[o.jsx(Oo,{className:"w-4 h-4"}),a("actions.openGoogleDoc")]}),o.jsxs("button",{onClick:()=>O(!0),className:"btn btn-secondary flex items-center gap-2 text-sm",children:[o.jsx(Gs,{className:"w-4 h-4"}),a("wp.button")]}),o.jsxs("button",{onClick:()=>J(X=>!X),disabled:ae===0,title:ae===0?a("revision.limitReached"):void 0,className:`btn flex items-center gap-2 text-sm ${ae===0?"btn-secondary opacity-50 cursor-not-allowed":"btn-secondary"}`,children:[o.jsx(Ro,{className:"w-4 h-4"}),a("revision.button")]})]}),(((ce=t.wpPublications)==null?void 0:ce.length)??0)>0&&o.jsxs("div",{className:"mt-3 text-xs text-gray-600 dark:text-gray-400",children:[a("wp.publishedList"),":"," ",t.wpPublications.map((X,he)=>o.jsxs("a",{href:X.link,target:"_blank",rel:"noopener noreferrer",className:"text-purple-600 dar
1011k:text-purple-400 hover:underline mr-2",children:[X.siteName," (",X.status==="publish"?a("wp.statusLive"):a("wp.statusDraft"),")"]},he))]}),o.jsx(jt,{children:ne&&o.jsx(ue.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},className:"fixed inset-0 bg-black/50 z-50 flex items-center justify-center p-4",onClick:()=>O(!1),children:o.jsxs(ue.div,{initial:{scale:.95,opacity:0},animate:{scale:1,opacity:1},exit:{scale:.95,opacity:0},onClick:X=>X.stopPropagation(),className:"bg-white dark:bg-gray-800 rounded-xl p-6 w-full max-w-md shadow-2xl",children:[o.jsx("h3",{className:"text-lg font-bold text-gray-900 dark:text-white mb-1",children:a("wp.modalTitle")}),o.jsx("p",{className:"text-xs text-gray-500 dark:text-gray-400 mb-4",children:a("wp.modalHint")}),((R==null?void 0:R.length)??0)>0&&!z&&o.jsxs(o.Fragment,{children:[o.jsx("label",{className:"block text-xs font-medium text-gray-700 dark:text-gray-300 mb-1",children:a("wp.siteLabel")}),o.jsxs("select",{value:I,onChange:X=>ee(X.target.value),className:"input w-full mb-3 bg-white dark:bg-gray-800 text-gray-900 dark:text-white",children:[o.jsx("option",{value:"",children:a("wp.sitePlaceholder")}),R.map(X=>o.jsx("option",{value:X.id,children:X.name},X.id))]})]}),(z||((R==null?void 0:R.length)??0)===0)&&o.jsxs("div",{className:"space-y-2 mb-3",children:[o.jsx("input",{type:"text",placeholder:a("wp.urlPlaceholder"),value:Z.baseUrl,onChange:X=>me({...Z,baseUrl:X.target.value}),className:"input w-full bg-white dark:bg-gray-800 text-gray-900 dark:text-white"}),o.jsx("input",{type:"text",placeholder:a("wp.userPlaceholder"),value:Z.wpUsername,onChange:X=>me({...Z,wpUsername:X.target.value}),className:"input w-full bg-white dark:bg-gray-800 text-gray-900 dark:text-white"}),o.jsx("input",{type:"password",placeholder:a("wp.passPlaceholder"),value:Z.appPassword,onChange:X=>me({...Z,appPassword:X.target.value}),className:"input w-full bg-white dark:bg-gray-800 text-gray-900 dark:text-white"}),o.jsx("p",{className:"text-[11px] text-gray-500 dark:text-gray-400",children:a("wp.appPasswordHint")}),o.jsx("button",{onClick:()=>S.mutate(),disabled:!Z.baseUrl||!Z.wpUsername||!Z.appPassword||S.isPending,className:"btn btn-secondary text-sm w-full disabled:opacity-50",children:S.isPending?a("wp.verifying"):a("wp.addSite")})]}),((R==null?void 0:R.length)??0)>0&&o.jsx("button",{onClick:()=>fe(X=>!X),className:"text-xs text-purple-600 dark:text-purple-400 hover:underline mb-3",children:a(z?"wp.backToList":"wp.addAnother")}),o.jsxs("div",{className:"flex items-center gap-4 mb-4",children:[o.jsxs("label",{className:"flex items-center gap-1.5 text-sm text-gray-700 dark:text-gray-300",children:[o.jsx("input",{type:"radio",checked:Q==="draft",onChange:()=>q("draft")}),a("wp.asDraft")]}),o.jsxs("label",{className:"flex items-center gap-1.5 text-sm text-gray-700 dark:text-gray-300",children:[o.jsx("input",{type:"radio",checked:Q==="publish",onChange:()=>q("publish")}),a("wp.asPublish")]})]}),o.jsxs("div",{className:"flex gap-2",children:[o.jsx("button",{onClick:()=>P.mutate(),disabled:!I||P.isPending,className:"btn btn-primary text-sm disabled:opacity-50",children:P.isPending?a("wp.publishing"):a("wp.publish")}),o.jsx("button",{onClick:()=>O(!1),className:"btn btn-secondary text-sm",children:a("revision.cancel")})]})]})})}),o.jsx(jt,{children:D&&o.jsxs(ue.div,{initial:{opacity:0,height:0},animate:{opacity:1,height:"auto"},exit:{opacity:0,height:0},className:"mt-4 p-4 bg-purple-50 dark:bg-purple-900/20 rounded-lg border border-purple-200 dark:border-purple-800",children:[o.jsx("h4",{className:"text-sm font-semibold text-gray-800 dark:text-gray-200 mb-1",children:a("revision.title")}),o.jsx("p",{className:"text-xs text-gray-600 dark:text-gray-400 mb-1",children:a("revision.description")}),o.jsx("p",{className:"text-xs text-purple-600 dark:text-purple-400 mb-3",children:a("revision.left",{n:ae})}),o.jsx("textarea",{value:de,onChange:X=>G(X.target.value),placeholder:a("revision.placeholder"),rows:4,maxLength:5e3,className:"w-full p-3 text-sm rounded-lg border border-gray-300 dark:border-gray-600 bg-white dark:bg-gray-800 text-gray-800 dark:text-gray-200 focus:ring-2 focus:ring-purple-500 focus:outline-none"}),o.jsxs("div",{className:"flex gap-2 mt-3",children:[o.jsx("button",{onClick:()=>ge.mutate(de),disabled:de.trim().length<10||ge.isPending,className:"btn btn-primary text-sm disabled:opacity-50",children:ge.isPending?a("revision.sending"):a("revision.submit")}),o.jsx("button",{onClick:()=>{J(!1),G("")},className:"btn btn-secondary text-sm",children:a("revision.cancel")})]})]})})]}),!b&&t.progress==="outline-ready"&&t.outline&&o.jsxs("div",{className:"mt-2 p-4 bg-indigo-50 dark:bg-indigo-900/20 rounded-lg border-2 border-indigo-300 dark:border-indigo-700",children:[o.jsxs("h4",{className:"text-sm font-bold text-indigo-800 dark:text-indigo-300 mb-1",children:["📋 ",a("outline.title")]}),o.jsx("p",{className:"text-xs text-gray-600 dark:text-gray-400 mb-3",children:a("outline.description")}),o.jsx("p",{className:"text-sm font-semibold text-gray-900 dark:text-white mb-2",children:t.outline.title}),o.jsx("p",{className:"text-xs font-medium text-gray-700 dark:text-gray-300 mb-1",children:a("outline.sectionsLabel")}),o.jsx("ol",{className:"list-decimal list-inside space-y-0.5 mb-4",children:t.outline.sections.map((X,he)=>o.jsx("li",{className:"text-sm text-gray-700 dark:text-gray-300",children:X.heading||a("outline.intro")},he))}),o.jsxs("div",{className:"flex flex-col gap-3",children:[o.jsx("button",{onClick:()=>U.mutate({action:"approve"}),disabled:U.isPending,className:"btn btn-primary text-sm w-fit",children:U.isPending?a("outline.approv
1011ing"):a("outline.approve")}),o.jsxs("div",{children:[o.jsx("p",{className:"text-xs text-gray-600 dark:text-gray-400 mb-1",children:a("outline.reworkLabel")}),o.jsx("textarea",{value:L,onChange:X=>V(X.target.value),placeholder:a("outline.reworkPlaceholder"),rows:2,maxLength:3e3,className:"w-full p-2 text-sm rounded-lg border border-gray-300 dark:border-gray-600 bg-white dark:bg-gray-800 text-gray-800 dark:text-gray-200"}),o.jsx("button",{onClick:()=>U.mutate({action:"rework",notes:L}),disabled:L.trim().length<5||U.isPending,className:"btn btn-secondary text-sm mt-2 disabled:opacity-50",children:U.isPending?a("outline.reworking"):a("outline.rework")})]})]})]}),!b&&t.progress==="outline-rework"&&o.jsx("div",{className:"text-sm text-indigo-600 dark:text-indigo-400 text-center py-4",children:a("outline.reworkInProgress")}),!b&&t.progress!=="outline-ready"&&t.progress!=="outline-rework"&&(t.progress==="error"||t.progress==="refunded"?o.jsx("div",{className:"text-sm text-gray-500 dark:text-gray-400 text-center py-4",children:a("texts.generating")}):o.jsx(qy,{progress:t.progress,textLength:t.length,startTime:t.startTime}))]})},r1e=()=>{const{t}=He("order-detail"),{formatPrice:e}=bn(),{id:r}=lf(),n=Vr(),[s,i]=M.useState(new Set),a=d=>{i(h=>{const p=new Set(h);return p.has(d)?p.delete(d):p.add(d),p})},l=(d,h)=>d.length<=h?d:d.slice(0,h)+"...",{data:c,isLoading:u}=mt({queryKey:["order",r],queryFn:async()=>(await xe.get(`/orders/${r}`)).data,refetchInterval:d=>{const h=d.state.data;return(h==null?void 0:h.status)==="IN_PROGRESS"?5e3:!1}});return u?o.jsxs("div",{className:"min-h-screen bg-gray-50 dark:bg-gray-900 flex",children:[o.jsx(ws,{}),o.jsx("div",{className:"flex-1 flex items-center justify-center",children:o.jsx("div",{className:"text-gray-600 dark:text-gray-400",children:t("loading")})})]}):c?o.jsxs("div",{className:"min-h-screen bg-gray-50 dark:bg-gray-900 flex",children:[o.jsx(ws,{}),o.jsx("div",{className:"flex-1 min-w-0 p-4 sm:p-6 lg:p-8",children:o.jsxs("div",{className:"max-w-7xl mx-auto",children:[o.jsxs("div",{className:"mb-8",children:[o.jsx(xa,{to:"/orders",label:t("header.back")}),o.jsxs("div",{className:"flex items-center justify-between",children:[o.jsxs("div",{children:[o.jsx("h1",{className:"text-4xl font-bold text-gray-900 dark:text-white mb-2",children:Yae(c)}),o.jsxs("div",{className:"flex items-center gap-4",children:[o.jsx(OA,{status:c.status}),o.jsxs("span",{className:"text-sm text-gray-600 dark:text-gray-400",children:[c.orderNumber,c.source&&o.jsxs("span",{className:"ml-2 inline-flex items-center px-1.5 py-0.5 rounded text-[10px] font-bold bg-indigo-100 dark:bg-indigo-900/40 text-indigo-700 dark:text-indigo-300 align-middle",children:["⚡ ",c.source]})]})]})]}),o.jsxs("div",{className:"text-right",children:[o.jsx("div",{className:"text-sm text-gray-600 dark:text-gray-400 mb-1",children:t("header.orderValue")}),o.jsx("div",{className:"text-3xl font-bold text-purple-600 dark:text-purple-400",children:e(parseFloat(c.totalPrice.toString()))})]})]})]}),o.jsxs(ue.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},className:"card dark:bg-gray-800 dark:border-gray-700 mb-6",children:[o.jsx("style",{children:Qbe}),o.jsx("h2",{className:"text-xl font-bold text-gray-900 dark:text-white mb-4",children:t("summary.title")}),o.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-6",children:[o.jsxs("div",{children:[o.jsxs("div",{className:"flex items-center gap-2 text-gray-600 dark:text-gray-400 mb-2",children:[o.jsx(uc,{className:"w-4 h-4"}),o.jsx("span",{className:"text-sm",children:t("summary.orderDate")})]}),o.jsx("p",{className:"text-lg font-semibold text-gray-900 dark:text-white",children:new Date(c.createdAt).toLocaleDateString()})]}),o.jsxs("div",{children:[o.jsxs("div",{className:"flex items-center gap-2 text-gray-600 dark:text-gray-400 mb-2",children:[o.jsx(Jt,{className:"w-4 h-4"}),o.jsx("span",{className:"text-sm",children:t("summary.textsCount")})]}),o.jsx("p",{className:"text-lg font-semibold text-gray-900 dark:text-white",children:c.texts.length})]}),o.jsxs("div",{children:[o.jsxs("div",{className:"flex items-center gap-2 text-gray-600 dark:text-gray-400 mb-2",children:[o.jsx(Ro,{className:"w-4 h-4"}),o.jsx("span",{className:"text-sm",children:t("summary.status")})]}),o.jsx(OA,{status:c.status})]}),o.jsxs("div",{children:[o.jsxs("div",{className:"flex items-center gap-2 text-gray-600 dark:text-gray-400 mb-2",children:[o.jsx(Gs,{className:"w-4 h-4"}),o.jsx("span",{className:"text-sm",children:t("summary.languages")})]}),o.jsx("p",{className:"text-lg font-semibold text-gray-900 dark:text-white",children:[...new Set(c.texts.map(d=>d.language.toUpperCase()))].join(", ")})]})]})]}),o.jsxs("div",{className:"space-y-4",children:[o.jsxs("h2",{className:"text-2xl font-bold text-gray-900 dark:text-white mb-4",children:[t("texts.title")," (",c.texts.length,")"]}),c.texts.map((d,h)=>o.jsx(t1e,{text:d,index:h,orderId:r,expandedGuidelines:s,toggleGuidelines:a,truncateText:l},d.id))]})]})})]}):o.jsxs("div",{className:"min-h-screen bg-gray-50 dark:bg-gray-900 flex",children:[o.jsx(ws,{}),o.jsx("div",{className:"flex-1 flex items-center justify-center",children:o.jsxs("div",{className:"text-center",children:[o.jsx("h2",{className:"text-2xl font-bold text-gray-900 dark:text-white mb-4",children:t("notFound.title")}),o.jsx("button",{onClick:()=>n("/orders"),className:"btn btn-primary",children:t("notFound.cta")})]})})]})},n1e=()=>{const{t}=He("pages"),{formatPrice:e,currency:r,currencySymbol:n,usdRate:s,convertFromPLN:i}=bn(),[a,l]=M.useState(100),[c,u]=M.useState(!1),d=[50,100,200,500,1e3],h=C=>C>=1e3?.2:C>=500?.15:C>=200?.1:C>=100?.05:0,p=h(a),f=Math.round(a*p*100)/100,m=a,y=Math.round((a+f)*100)/100,k=f,g=5,x=s||4,w=r==="USD"?Number(i(a).toFixed(2)):a,b=C=>{const _=parseFloat(C)||0;l(r==="USD"?Math.round(_*x*100)/100:_)},v=async()=>{var C,_;if(a<g){le.error(t("deposit.errors.minAmount",{amount:e(g)}));return}u(!0);try{const N=await xe.post("/orders/deposit",{amount:a,currency:"PLN"});N.data.stripeUrl&&(window.location.href=N.data.stripeUrl)}catch(N){le.error(((_=(C=N.response)==null?void 0:C.data)==null?void 0:_.error)||t("deposit.errors.generic"))}finally{u(!1)}},A=C=>e(C);return o.jsxs("div",{className:"min-h-screen bg-gray-50 dark:bg-gray-900 flex",children:[o.jsx(ws,{}),o.jsx("div",{className:"flex-1 min-w-0 p-4 sm:p-6 lg:p-8",children:o.jsx("div",{className:"max-w-2xl mx-auto",children:o.jsxs(ue.div,{initial:{opacity:0,y:20}
1011,animate:{opacity:1,y:0},children:[o.jsxs("div",{className:"text-center mb-8",children:[o.jsx("div",{className:"w-16 h-16 bg-gradient-to-br from-purple-600 to-indigo-600 rounded-2xl flex items-center justify-center mx-auto mb-4",children:o.jsx(zy,{className:"w-8 h-8 text-white"})}),o.jsx(xa,{}),o.jsx("h1",{className:"text-3xl font-bold text-gray-900 dark:text-white mb-2",children:t("deposit.title")}),o.jsx("p",{className:"text-gray-600 dark:text-gray-300",children:t("deposit.subtitle")})]}),o.jsx("div",{className:"card dark:bg-gray-800 dark:border-gray-700 mb-6 bg-gradient-to-br from-purple-50 to-indigo-50 dark:from-purple-900/20 dark:to-indigo-900/20",children:o.jsxs("div",{className:"flex items-start gap-3",children:[o.jsx(aS,{className:"w-6 h-6 text-purple-600 dark:text-purple-400 flex-shrink-0 mt-1"}),o.jsxs("div",{children:[o.jsx("h3",{className:"font-bold text-gray-900 dark:text-white mb-2",children:t("deposit.discounts.title")}),o.jsxs("div",{className:"space-y-1 text-sm",children:[o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx("span",{className:"text-gray-700 dark:text-gray-300",children:t("deposit.discounts.tier1",{min:e(100),max:e(199)})}),o.jsx("span",{className:"font-bold text-green-600 dark:text-green-400",children:t("deposit.discounts.discount5")})]}),o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx("span",{className:"text-gray-700 dark:text-gray-300",children:t("deposit.discounts.tier2",{min:e(200),max:e(499)})}),o.jsx("span",{className:"font-bold text-green-600 dark:text-green-400",children:t("deposit.discounts.discount10")})]}),o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx("span",{className:"text-gray-700 dark:text-gray-300",children:t("deposit.discounts.tier3",{min:e(500),max:e(999)})}),o.jsx("span",{className:"font-bold text-green-600 dark:text-green-400",children:t("deposit.discounts.discount15")})]}),o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx("span",{className:"text-gray-700 dark:text-gray-300",children:t("deposit.discounts.tier4",{min:e(1e3)})}),o.jsx("span",{className:"font-bold text-green-600 dark:text-green-400",children:t("deposit.discounts.discount20")})]})]})]})]})}),o.jsxs("div",{className:"card dark:bg-gray-800 dark:border-gray-700",children:[o.jsx("label",{className:"block text-sm font-bold text-gray-900 dark:text-white mb-3",children:t("deposit.form.chooseAmount")}),o.jsx("div",{className:"grid grid-cols-5 gap-2 mb-6",children:d.map(C=>o.jsxs("button",{onClick:()=>l(C),className:`py-3 px-4 rounded-lg font-semibold transition-all relative ${a===C?"bg-purple-600 text-white":"bg-gray-100 dark:bg-gray-700 text-gray-700 dark:text-gray-300 hover:bg-gray-200 dark:hover:bg-gray-600"}`,children:[A(C),h(C)>0&&o.jsxs("span",{className:"absolute -top-2 -right-2 bg-green-500 text-white text-xs font-bold px-1.5 py-0.5 rounded-full",children:["+",(h(C)*100).toFixed(0),"%"]})]},C))}),o.jsx("label",{className:"block text-sm font-bold text-gray-900 dark:text-white mb-3",children:t("deposit.form.customAmount")}),o.jsxs("div",{className:"relative mb-6",children:[o.jsx("input",{type:"number",min:r==="USD"?(g/x).toFixed(2):g,step:r==="USD"?"0.01":"1",value:w,onChange:C=>b(C.target.value),className:"input w-full text-2xl font-bold text-center"}),o.jsx("span",{className:"absolute right-4 top-1/2 -translate-y-1/2 text-2xl font-bold text-gray-400",children:n})]}),p>0&&o.jsxs(ue.div,{initial:{opacity:0,scale:.95},animate:{opacity:1,scale:1},className:"p-4 bg-green-50 dark:bg-green-900/20 border-2 border-green-500 dark:border-green-600 rounded-lg mb-6",children:[o.jsxs("div",{className:"flex items-center gap-2 mb-3",children:[o.jsx(Tp,{className:"w-5 h-5 text-green-600 dark:text-green-400"}),o.jsx("span",{className:"font-bold text-green-900 dark:text-green-300",children:t("deposit.savings.congratulations",{percent:(p*100).toFixed(0)})})]}),o.jsxs("div",{className:"space-y-2 text-sm",children:[o.jsxs("div",{className:"flex justify-between",children:[o.jsx("span",{className:"text-gray-700 dark:text-gray-300",children:t("deposit.savings.topUp")}),o.jsx("span",{className:"font-bold text-gray-900 dark:text-white",children:A(a)})]}),o.jsxs("div",{className:"flex justify-between",children:[o.jsx("span",{className:"text-green-700 dark:text-green-300",children:t("deposit.savings.discount",{percent:(p*100).toFixed(0)})}),o.jsxs("span",{className:"font-bold text-green-600 dark:text-green-400",children:["+",A(k)]})]}),o.jsxs("div",{className:"border-t border-green-200 dark:border-green-800 pt-2 flex justify-between",children:[o.jsx("span",{className:"font-bold text-gray-900 dark:text-white",children:t("deposit.savings.toPay")}),o.jsx("span",{className:"text-2xl font-bold text-purple-600 dar
1011k:text-purple-400",children:A(y)})]})]})]}),o.jsxs("div",{className:"flex items-start gap-3 p-4 bg-blue-50 dark:bg-blue-900/20 rounded-lg mb-6",children:[o.jsx(Dh,{className:"w-5 h-5 text-blue-600 dark:text-blue-400 flex-shrink-0 mt-0.5"}),o.jsxs("div",{className:"text-sm text-blue-900 dark:text-blue-300",children:[o.jsx("p",{className:"font-semibold mb-1",children:t("deposit.info.title")}),o.jsxs("ul",{className:"list-disc list-inside space-y-1",children:[o.jsx("li",{children:t("deposit.info.minAmount",{amount:e(g)})}),o.jsx("li",{children:t("deposit.info.payments")}),o.jsx("li",{children:t("deposit.info.instant")}),p>0&&o.jsx("li",{className:"font-bold text-green-700 dark:text-green-400",children:t("deposit.info.payGet",{pay:A(m),get:A(y)})})]})]})]}),o.jsx("button",{onClick:v,disabled:c||a<g,className:"btn btn-primary w-full py-4 text-lg flex items-center justify-center gap-2",children:c?t("deposit.button.redirecting"):o.jsxs(o.Fragment,{children:[o.jsx(Qr,{className:"w-5 h-5"}),p>0?t("deposit.button.payAndGet",{pay:A(m),get:A(y)}):t("deposit.button.topUp",{amount:A(a)})]})})]})]})})})]})},s1e=[qs,Ey,PV,Gs,_d,Ny],i1e=[Jt,_d,OV,Yj,WI,Ep],a1e=()=>{const{t,i18n:e}=He("ai-copywriter"),{formatPrice:r}=bn(),s=e.language==="pl"?"https://www.smart-copy.ai":"https://en.smart-copy.ai",i=r(Zt.PER_1000_CHARS),a=r(Zt.TEN_PAGES),l=r(Zt.COPYWRITER_MIN),c=r(Zt.COPYWRITER_MAX),u=`${l}-${c}`,d=t("benefits.items",{returnObjects:!0}),h=t("howItWorks.steps",{returnObjects:!0}),p=t("copywritingTypes.items",{returnObjects:!0}),f=t("comparison.rows",{returnObjects:!0}),m=t("faq.items",{returnObjects:!0}),y=d.map((g,x)=>x===1?{...g,description:t("benefits.items.1.description",{articlePrice:a,copywriterPrice:u})}:g),k=m.map((g,x)=>x===4?{...g,answer:t("faq.items.4.answer",{price:i})}:g);return o.jsxs(o.Fragment,{children:[o.jsxs(Ys,{children:[o.jsx("title",{children:t("meta.title")}),o.jsx("meta",{name:"description",content:t("meta.description")}),o.jsx("meta",{name:"keywords",content:t("meta.keywords")}),o.jsx("link",{rel:"canonical",href:`${s}/ai-copywriter`}),o.jsx("meta",{property:"og:title",content:t("meta.ogTitle")}),o.jsx("meta",{property:"og:description",content:t("meta.ogDescription")}),o.jsx("meta",{property:"og:type",content:"website"}),o.jsx("meta",{property:"og:url",content:`${s}/ai-copywriter`}),o.jsx("link",{rel:"alternate",hrefLang:"pl",href:"https://www.smart-copy.ai/ai-copywriter"}),o.jsx("link",{rel:"alternate",hrefLang:"en",href:"https://en.smart-copy.ai/ai-copywriter"}),o.jsx("link",{rel:"alternate",hrefLang:"x-default",href:"https://www.smart-copy.ai/ai-copywriter"})]}),o.jsxs(xs,{children:[o.jsxs("section",{className:"relative min-h-[95vh] flex items-center justify-center bg-gradient-to-br from-indigo-50 via-white to-purple-50 dark:from-gray-900 dark:via-gray-800 dark:to-gray-900 overflow-hidden",children:[o.jsxs("div",{className:"absolute inset-0",children:[o.jsx("div",{className:"absolute inset-0 bg-grid-pattern opacity-5"}),o.jsx(ue.div,{animate:{scale:[1,1.2,1],rotate:[0,45,0]},transition:{duration:20,repeat:1/0,ease:"linear"},className:"absolute -top-1/2 -left-1/2 w-full h-full bg-gradient-to-br from-indigo-500/10 to-purple-500/10 rounded-full blur-3xl"})]}),o.jsx("div",{className:"container-custom py-20 relative z-10",children:o.jsxs(ue.div,{initial:{opacity:0,y:30},animate:{opacity:1,y:0},transition:{duration:.8},className:"text-center max-w-5xl mx-auto",children:[o.jsxs(ue.div,{initial:{opacity:0,scale:.9},animate:{opacity:1,scale:1},transition:{delay:.2},className:"inline-flex items-center gap-2 bg-gradient-to-r from-indigo-100 to-purple-100 dark:from-indigo-900/30 dark:to-purple-900/30 text-indigo-700 dark:text-indigo-300 px-6 py-3 rounded-full mb-8 border border-indigo-200 dark:border-indigo-800",children:[o.jsx(Ep,{className:"w-5 h-5"}),o.jsx("span",{className:"font-semibold",children:t("hero.badge")})]}),o.jsxs("h1",{className:"text-5xl md:text-7xl lg:text-8xl font-bold text-gray-900 dark:text-white mb-6 leading-tight",children:[t("hero.titleLine1"),o.jsx("br",{}),o.jsx("span",{className:"bg-gradient-to-r from-indigo-600 via-purple-600 to-pink-600 bg-clip-text text-transparent",children:t("hero.titleLine2")})]}),o.jsxs("p",{className:"text-xl md:text-2xl lg:text-3xl text-gray-600 dark:text-gray-300 mb-6 max-w-3xl mx-auto font-light",children:[o.jsx("strong",{className:"font-semibold text-gray-900 dark:text-white",children:t("hero.subtitleStrong")})," ",t("hero.subtitle"),o.jsx("br",{className:"hidden md:block"}),t("hero.subtitleLine2",{price:i})]}),o.jsxs("div",{className:"flex flex-wrap justify-center gap-4 mb-10",children:[o.jsxs("div",{className:"flex items-center gap-2 bg-white dark:bg-gray-800 px-4 py-2 rounded-full shadow-sm",children:[o.jsx(Rt,{className:"w-5 h-5 text-green-500"}),o.jsx("span",{className:"text-gray-700 dark:text-gray-300 font-medium",children:t("hero.valueProps.time")}
1011)]}),o.jsxs("div",{className:"flex items-center gap-2 bg-white dark:bg-gray-800 px-4 py-2 rounded-full shadow-sm",children:[o.jsx(Rt,{className:"w-5 h-5 text-green-500"}),o.jsx("span",{className:"text-gray-700 dark:text-gray-300 font-medium",children:t("hero.valueProps.cost")})]}),o.jsxs("div",{className:"flex items-center gap-2 bg-white dark:bg-gray-800 px-4 py-2 rounded-full shadow-sm",children:[o.jsx(Rt,{className:"w-5 h-5 text-green-500"}),o.jsx("span",{className:"text-gray-700 dark:text-gray-300 font-medium",children:t("hero.valueProps.techniques")})]})]}),o.jsxs("div",{className:"flex flex-col sm:flex-row gap-4 justify-center mb-8",children:[o.jsx(ze,{to:"/register",className:"group btn btn-primary text-lg px-10 py-5 shadow-2xl hover:shadow-indigo-500/50 transform hover:scale-105 transition-all relative overflow-hidden",children:o.jsxs("span",{className:"relative z-10 flex items-center gap-2",children:[t("hero.cta.test"),o.jsx(Sr,{className:"w-5 h-5 group-hover:translate-x-1 transition-transform"})]})}),o.jsx("a",{href:"#porownanie",className:"btn btn-secondary text-lg px-10 py-5 border-2",children:t("hero.cta.compare")})]}),o.jsx("p",{className:"text-sm text-gray-500 dark:text-gray-400",children:t("hero.trust")})]})})]}),o.jsx("section",{className:"py-24 bg-white dark:bg-gray-800",children:o.jsxs("div",{className:"container-custom",children:[o.jsxs(ue.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},transition:{duration:.6},viewport:{once:!0},className:"text-center mb-16",children:[o.jsx("h2",{className:"text-4xl md:text-5xl font-bold text-gray-900 dark:text-white mb-4",children:t("benefits.title")}),o.jsx("p",{className:"text-xl text-gray-600 dark:text-gray-300 max-w-3xl mx-auto",children:t("benefits.subtitle")})]}),o.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-8",children:y.map((g,x)=>{const w=s1e[x];return o.jsxs(ue.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},transition:{duration:.5,delay:x*.1},viewport:{once:!0},className:"group card dark:bg-gray-700 dark:border-gray-600 hover:shadow-2xl hover:border-indigo-500 dark:hover:border-indigo-500 transition-all",children:[o.jsx("div",{className:"w-14 h-14 bg-gradient-to-br from-indigo-600 to-purple-600 rounded-2xl flex items-center justify-center mb-5 group-hover:scale-110 transition-transform",children:o.jsx(w,{className:"w-7 h-7 text-white"})}),o.jsx("h3",{className:"text-xl font-bold text-gray-900 dark:text-white mb-3",children:g.title}),o.jsx("p",{className:"text-gray-600 dark:text-gray-300 leading-relaxed",children:g.description})]},x)})})]})}),o.jsx("section",{className:"py-24 bg-gradient-to-br from-gray-50 to-white dark:from-gray-900 dark:to-gray-800",children:o.jsxs("div",{className:"container-custom",children:[o.jsxs(ue.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},transition:{duration:.6},viewport:{once:!0},className:"text-center mb-16",children:[o.jsx("h2",{className:"text-4xl md:text-5xl font-bold text-gray-900 dark:text-white mb-4",children:t("howItWorks.title")}),o.jsx("p",{className:"text-xl text-gray-600 dark:text-gray-300 max-w-3xl mx-auto",children:t("howItWorks.subtitle")})]}),o.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-8",children:h.map((g,x)=>o.jsxs(ue.div,{initial:{opacity:0,y:30},whileInView:{opacity:1,y:0},transition:{duration:.5,delay:x*.15},viewport:{once:!0},className:"relative",children:[x<h.length-1&&o.jsx("div",{className:"hidden lg:block absolute top-12 left-full w-full h-0.5 bg-gradient-to-r from-indigo-300 to-transparent dark:from-indigo-700 -ml-4"}),o.jsxs("div",{className:"card dark:bg-gray-800 dark:border-gray-700 hover:shadow-xl transition-all h-full relative overflow-hidden group",children:[o.jsx("div",{className:"absolute -top-4 -right-4 w-20 h-20 bg-gradient-to-br from-indigo-600 to-purple-600 rounded-full flex items-center justify-center transform group-hover:scale-110 transition-transform",children:o.jsx("span",{className:"text-2xl font-bold text-white",children:String(x+1).padStart(2,"0")})}),o.jsxs("div",{className:"relative z-10",children:[o.jsx("h3",{className:"text-xl font-bold text-gray-900 dark:text-white mb-3 pr-16",children:g.title}),o.jsx("p",{className:"text-gray-600 dark:text-gray-300 leading-relaxed",children:g.description})]})]})]},x))})]})}),o.jsx("section",{className:"py-24 bg-white dark:bg-gray-800",children:o.jsxs("div",{className:"container-custom",children:[o.jsxs(ue.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},transition:{duration:.6},viewport:{once:!0},className:"text-center mb-16",children:[o.jsx("h2",{className:"text-4xl md:text-5xl font-bold text-gray-900 dark:text-white mb-4",children:t("copywritingTypes.title")}),o.jsx("p",{className:"text-xl text-gray-600 dark:text-gray-300 max-w-3xl mx-auto",children:t("copywritingTypes.subtitle")})]}),o.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6",children:p.map((g,x)=>{const w=i1e[x];return o.jsxs(ue.div,{initial:{opacity:0,scale:.95},whileInView:{opacity:1,scale:1},transition:{duration:.4,delay:x*.1},viewport:{once:!0},className:"group bg-gradient-to-br from-white to-gray-50 dark:from-gray-800 dark:to-gray-900 rounded-2xl p-6 shadow-lg hover:shadow-2xl transition-all border border-gray-100 dark:border-gray-700 hover:border-indigo-500 dark:hover:border-indigo-500",children:[o.jsxs("div",{className:"flex items-start justify-between mb-4",children:[o.jsx("div",{className:"w-12 h-12 bg-gradient-to-br from-indigo-500 to-purple-500 rounded-xl flex items-center justify-center flex-shrink-0",children:o.jsx(w,{className:"w-6 h-6 text-white"})}),o.jsx("span",{className:"text-sm font-bold text-indigo-600 dark:text-indigo-400 bg-indigo-50 dark:bg-indigo-900/30 px-3 py-1 rounded-full",children:g.price})]}),o.jsx("h3",{className:"text-lg font-bold text-gray-900 dark:text-white mb-3",children:g.title}),o.jsx("ul",{className:"space-y-2",children:g.examples.map((b,v)=>o.jsxs("li",{className:"flex items-center gap-2 text-sm text-gray-600 dark:text-gray-300",children:[o.jsx(Rt,{className:"w-4 h-4 text-green-500 flex-shrink-0"}),o.jsx("span",{children:b})]},v))})]},x)})})]})}),o.jsx("section",{id:"porownanie",className:"py-24 bg-gradient-to-br from-indigo-50 to-purple-50 dark:from-gray-900 dark:to-gray-800",children:o.jsxs("div",{className:"container-custom",children:[o.jsxs(ue.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},transition:{duration:.6},viewport:{once:!0},className:"text-center mb-16",children:[o.jsxs("h2",{className:"text-4xl md:text-5xl font-bold text-gray-900 dark:text-white mb-4",children:[t("comparison.title")," ",o.jsx("span",{className:"text-indigo-600",children:t("comparison.titleHighlight")})]}),o.jsx("p",{className:"text-xl text-gray-600 dark:text-gray-300 max-w-3xl mx-auto",children:t("comparison.subtitle")})]}),o.jsx("div",{className:"max-w-5xl mx-auto",children:o.jsxs("div",{className:"bg-white dark:bg-gray-800 rounded-3xl shadow-2xl overflow-hidden",children:[o.jsxs("div",{className:"grid grid-cols-3 gap-4 p-6 bg-gradient-to-r from-indigo-600 to-purple-600 text-white",children:[o.jsx("div",{className:"font-bold text-lg",children:t("comparison.headers.feature")}),o.jsx("div",{className:"font-bold text-lg text-center",children:t("comparison.headers.human")}),o.jsx("div",{className:"font-bold text-lg text-center",children:t("comparison.headers.ai")})]}),f.map((g,x)=>o.jsxs(ue.div,{initial:{opacity:0,x:-20},whileInView:{opacity:1,x:0},transition:{duration:.4,delay:x*.1},viewport:{once:!0},className:`grid grid-cols-3 gap-4 p-6 ${x%2===0?"bg-gray-50 dark:bg-gray-900":"bg-white dark:bg-gray-800"}`,children:[o.jsx("div",{className:"font-semibold text-gray-900 dark:text-white",children:g.feature}),o.jsx("div",{className:"text-center text-gray-600 dark:text-gray-400",children:g.human}),o.jsx("div",{className:"text-center font-bold text-green-600 dark:text-green-400",children:g.ai})]},x))]})})]})}),o.jsx("section",{className:"py-24 bg-gradient-to-br from-gray-50 to-white dark:from-gray-900 dark:to-gray-800",children:o.jsxs("div",{className:"container-custom",children:[o.jsxs(ue.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},transition:{duration:.6},viewport:{once:!0},className:"text-center mb-16",children:[o.jsx("h2",{className:"text-4xl md:text-5xl font-bold text-gray-900 dark:text-white mb-4",children:t("faq.title")}),o.jsx("p",{className:"text-xl text-gray-600 dark:text-gray-300 max-w-3xl mx-auto",children:t("faq.subtitle")})]}
1011),o.jsx("div",{className:"max-w-4xl mx-auto space-y-4",children:k.map((g,x)=>o.jsxs(ue.details,{initial:{opacity:0,y:10},whileInView:{opacity:1,y:0},transition:{duration:.4,delay:x*.1},viewport:{once:!0},className:"group bg-white dark:bg-gray-800 rounded-2xl p-6 hover:shadow-lg transition-all border border-gray-200 dark:border-gray-700",children:[o.jsxs("summary",{className:"flex items-center justify-between cursor-pointer list-none",children:[o.jsx("h3",{className:"text-lg font-bold text-gray-900 dark:text-white pr-4",children:g.question}),o.jsx("div",{className:"w-8 h-8 bg-indigo-600 rounded-full flex items-center justify-center flex-shrink-0 group-open:rotate-180 transition-transform",children:o.jsx(Sr,{className:"w-5 h-5 text-white transform rotate-90"})})]}),o.jsx("p",{className:"mt-4 text-gray-600 dark:text-gray-300 leading-relaxed",children:g.answer})]},x))})]})}),o.jsxs("section",{className:"py-24 bg-gradient-to-br from-indigo-600 via-purple-600 to-pink-600 relative overflow-hidden",children:[o.jsx(ue.div,{animate:{scale:[1,1.2,1],opacity:[.3,.5,.3]},transition:{duration:8,repeat:1/0,ease:"easeInOut"},className:"absolute top-0 left-0 w-96 h-96 bg-white rounded-full blur-3xl"}),o.jsx("div",{className:"container-custom text-center relative z-10",children:o.jsxs(ue.div,{initial:{opacity:0,y:30},whileInView:{opacity:1,y:0},transition:{duration:.8},viewport:{once:!0},children:[o.jsxs("div",{className:"inline-flex items-center gap-2 bg-white/20 backdrop-blur-sm px-6 py-3 rounded-full mb-8",children:[o.jsx(zp,{className:"w-5 h-5 text-white"}),o.jsx("span",{className:"text-white font-semibold",children:t("finalCta.badge")})]}),o.jsxs("h2",{className:"text-4xl md:text-6xl font-bold text-white mb-6",children:[t("finalCta.titleLine1"),o.jsx("br",{}),t("finalCta.titleLine2")]}),o.jsx("p",{className:"text-xl md:text-2xl text-purple-100 mb-10 max-w-3xl mx-auto",children:t("finalCta.subtitle")}),o.jsxs("div",{className:"flex flex-col sm:flex-row gap-4 justify-center mb-8",children:[o.jsxs(ze,{to:"/register",className:"inline-flex items-center justify-center gap-2 bg-white text-indigo-600 px-10 py-5 rounded-xl font-bold text-lg hover:bg-gray-100 transition-all shadow-2xl hover:scale-105 transform",children:[t("finalCta.cta.test"),o.jsx(ga,{className:"w-5 h-5"})]}),o.jsxs(ze,{to:"/login",className:"inline-flex items-center justify-center gap-2 bg-transparent border-2 border-white text-white px-10 py-5 rounded-xl font-bold text-lg hover:bg-white/10 transition-all",children:[t("finalCta.cta.login"),o.jsx(Sr,{className:"w-5 h-5"})]})]}),o.jsx("p",{className:"text-purple-100",children:t("finalCta.benefits")})]})})]})]})]})},o1e=[{upTo:5e3,per1k:1.99},{upTo:15e3,per1k:1.19},{upTo:1/0,per1k:.69}],l1e=29,V1=3e4;function H1(t){let e=0,r=0;for(const n of o1e){if(t<=r)break;const s=Math.min(t,n.upTo)-r;e+=s/1e3*n.per1k,r=n.upTo}return e}function Gp(t){const e=Math.min(t,V1);let r=Math.min(H1(e),l1e);return t>V1&&(r+=H1(t)-H1(V1)),Math.round(r*100)/100}const c1e=[_i,Ey,Ny,Jt,Gs,tS],u1e=[MV,nS,RV,kV,aS,Yj],d1e=[WI,_d,Lo,Py],RA=()=>{const{t,i18n:e}=He("ai-seo-writer"),{formatPrice:r}=bn(),n=e.language==="pl",s=n?"https://www.smart-copy.ai":"https://en.smart-copy.ai",i=n?"/ai-seo-writer":"/ai-seo-content-writer",a=r(Zt.PER_1000_CHARS),l=r(Zt.MIN_TOP_UP),c=r(Zt.TEN_PAGES),u=r(Zt.COPYWRITER_MIN),d=r(Zt.COPYWRITER_MAX),h=`${u}-${d}`,p=r(5e5),f=r(Zt.ONE_PAGE*1.5),m=r(Zt.TEN_PAGES),y=r(Gp(25e3)),k=t("benefits.items",{returnObjects:!0}),g=t("howItWorks.steps",{returnObjects:!0}),x=t("seoContentTypes.items",{returnObjects:!0}),w=t("comparison.rows",{returnObjects:!0}),b=t("useCases.items",{returnObjects:!0}),v=t("seoTips.items",{returnObjects:!0}),A=t("seoFeatures.items",{returnObjects:!0}),C=t("faq.items",{returnObjects:!0}),_=k.map((K,T)=>T===1?{...K,description:t("benefits.items.1.description",{articlePrice:c,copywriterPrice:h,savings:p})}:K),N=w.map((K,T)=>T===2?{...K,manual:h,ai:`~${c}`}:K),W=C.map((K,T)=>T===4?{...K,answer:t("faq.items.4.answer",{shortCost:f,articleCost:m,longCost:y})}:K);return o.jsxs(o.Fragment,{children:[o.jsxs(Ys,{children:[o.jsx("title",{children:t("meta.title")}),o.jsx("meta",{name:"description",content:t("meta.description",{price:a})}),o.jsx("meta",{name:"keywords",content:t("meta.keywords")}),o.jsx("link",{rel:"canonical",href:`${s}${i}`}),o.jsx("meta",{property:"og:title",content:t("meta.ogTitle")}),o.jsx("meta",{property:"og:description",content:t("meta.ogDescription")}),o.jsx("meta",{property:"og:type",content:"website"}),o.jsx("meta",{property:"og:url",content:t("meta.ogUrl",{defaultValue:`${s}${i}`})}),o.jsx("link",{rel:"alternate",hrefLang:"pl",href:"https://www.smart-copy.ai/ai-seo-writer"}),o.jsx("link",{rel:"alternate",hrefLang:"en",href:"https://en.smart-copy.ai/ai-seo-content-writer"}),o.jsx("link",{rel:"alternate",hrefLang:"x-default",href:"https://www.smart-copy.ai/ai-seo-writer"})]}),o.jsxs(xs,{children:[o.jsxs("section",{className:"relative min-h-[95vh] flex items-center justify-center bg-gradient-to-br from-blue-50 via-white to-cyan-50 dark:from-gray-900 dark:via-gray-800 dark:to-gray-900 overflow-hidden",children:[o.jsxs("div",{className:"absolute inset-0",children:[o.jsx("div",{className:"absolute inset-0 bg-grid-pattern opacity-5"}),o.jsx(ue.div,{animate:{scale:[1,1.2,1],rotate:[0,-60,0]},transition:{duration:20,repeat:1/0,ease:"linear"},className:"absolute -top-1/2 -right-1/2 w-full h-full bg-gradient-to-br from-blue-500/10 to-cyan-500/10 rounded-full blur-3xl"})]}),o.jsx("div",{className:"container-custom py-20 relative z-10",children:o.jsxs(ue.div,{initial:{opacity:0,y:30}
1011,animate:{opacity:1,y:0},transition:{duration:.8},className:"text-center max-w-5xl mx-auto",children:[o.jsxs(ue.div,{initial:{opacity:0,scale:.9},animate:{opacity:1,scale:1},transition:{delay:.2},className:"inline-flex items-center gap-2 bg-gradient-to-r from-blue-100 to-cyan-100 dark:from-blue-900/30 dark:to-cyan-900/30 text-blue-700 dark:text-blue-300 px-6 py-3 rounded-full mb-8 border border-blue-200 dark:border-blue-800",children:[o.jsx(_i,{className:"w-5 h-5"}),o.jsx("span",{className:"font-semibold",children:t("hero.badge")})]}),o.jsxs("h1",{className:"text-5xl md:text-7xl lg:text-8xl font-bold text-gray-900 dark:text-white mb-6 leading-tight",children:[t("hero.titleLine1"),o.jsx("br",{}),o.jsx("span",{className:"bg-gradient-to-r from-blue-600 via-cyan-600 to-teal-600 bg-clip-text text-transparent",children:t("hero.titleLine2")})]}),o.jsxs("p",{className:"text-xl md:text-2xl lg:text-3xl text-gray-600 dark:text-gray-300 mb-6 max-w-3xl mx-auto font-light",children:[o.jsx("strong",{className:"font-semibold text-gray-900 dark:text-white",children:t("hero.subtitleStrong")})," ",t("hero.subtitle"),o.jsx("br",{className:"hidden md:block"}),t("hero.subtitleLine2",{price:a})]}),o.jsx("div",{className:"flex flex-wrap justify-center gap-4 mb-10",children:["seo","research","unique","keywords"].map(K=>o.jsxs("div",{className:"flex items-center gap-2 bg-white dark:bg-gray-800 px-4 py-2 rounded-full shadow-sm",children:[o.jsx(Rt,{className:"w-5 h-5 text-green-500"}),o.jsx("span",{className:"text-gray-700 dark:text-gray-300 font-medium",children:t(`hero.valueProps.${K}`)})]},K))}),o.jsxs("div",{className:"flex flex-col sm:flex-row gap-4 justify-center mb-8",children:[o.jsx(ze,{to:"/register",className:"group btn btn-primary text-lg px-10 py-5 shadow-2xl hover:shadow-blue-500/50 transform hover:scale-105 transition-all",children:o.jsxs("span",{className:"relative z-10 flex items-center gap-2",children:[t("hero.cta.start"),o.jsx(Sr,{className:"w-5 h-5 group-hover:translate-x-1 transition-transform"})]})}),o.jsx("a",{href:"#jak-dziala",className:"btn btn-secondary text-lg px-10 py-5 border-2",children:t("hero.cta.howItWorks")})]}),o.jsx("p",{className:"text-sm text-gray-500 dark:text-gray-400",children:t("hero.trust",{minTopUp:l})})]})})]}),o.jsx("section",{className:"py-24 bg-white dark:bg-gray-800",children:o.jsxs("div",{className:"container-custom",children:[o.jsxs(ue.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},transition:{duration:.6},viewport:{once:!0},className:"text-center mb-16",children:[o.jsx("h2",{className:"text-4xl md:text-5xl font-bold text-gray-900 dark:text-white mb-4",children:t("benefits.title")}),o.jsx("p",{className:"text-xl text-gray-600 dark:text-gray-300 max-w-3xl mx-auto",children:t("benefits.subtitle")})]}),o.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-8",children:_.map((K,T)=>{const F=c1e[T];return o.jsxs(ue.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},transition:{duration:.5,delay:T*.1},viewport:{once:!0},className:"group card dark:bg-gray-700 dark:border-gray-600 hover:shadow-2xl hover:border-blue-500 dark:hover:border-blue-500 transition-all",children:[o.jsx("div",{className:"w-14 h-14 bg-gradient-to-br from-blue-600 to-cyan-600 rounded-2xl flex items-center justify-center mb-5 group-hover:scale-110 transition-transform",children:o.jsx(F,{className:"w-7 h-7 text-white"})}),o.jsx("h3",{className:"text-xl font-bold text-gray-900 dark:text-white mb-3",children:K.title}),o.jsx("p",{className:"text-gray-600 dark:text-gray-300 leading-relaxed",children:K.description})]},T)})})]})}),o.jsx("section",{id:"jak-dziala",className:"py-24 bg-gradient-to-br from-gray-50 to-white dark:from-gray-900 dark:to-gray-800",children:o.jsxs("div",{className:"container-custom",children:[o.jsxs(ue.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},transition:{duration:.6},viewport:{once:!0},className:"text-center mb-16",children:[o.jsx("h2",{className:"text-4xl md:text-5xl font-bold text-gray-900 dark:text-white mb-4",children:t("howItWorks.title")}),o.jsx("p",{className:"text-xl text-gray-600 dark:text-gray-300 max-w-3xl mx-auto",children:t("howItWorks.subtitle")})]}),o.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-8",children:g.map((K,T)=>o.jsxs(ue.div,{initial:{opacity:0,y:30},whileInView:{opacity:1,y:0},transition:{duration:.5,delay:T*.15},viewport:{once:!0},className:"relative",children:[T<g.length-1&&o.jsx("div",{className:"hidden lg:block absolute top-12 left-full w-full h-0.5 bg-gradient-to-r from-blue-300 to-transparent dark:from-blue-700 -ml-4"}),o.jsxs("div",{className:"card dark:bg-gray-800 dark:border-gray-700 hover:shadow-xl transition-all h-full relative overflow-hidden group",children:[o.jsx("div",{className:"absolute -top-4 -right-4 w-20 h-20 bg-gradient-to-br from-blue-600 to-cyan-600 rounded-full flex items-center justify-center transform group-hover:scale-110 transition-transform",children:o.jsx("span",{className:"text-2xl font-bold text-white",children:String(T+1).padStart(2,"0")})}),o.jsxs("div",{className:"relative z-10",children:[o.jsx("h3",{className:"text-xl font-bold text-gray-900 dark:text-white mb-3 pr-16",children:K.title}),o.jsx("p",{className:"text-gray-600 dark:text-gray-300 leading-relaxed",children:K.description})]})]})]},T))})]})}),o.jsx("section",{className:"py-24 bg-white dark:bg-gray-800",children:o.jsxs("div",{className:"container-custom",children:[o.jsxs(ue.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},transition:{duration:.6},viewport:{once:!0},className:"text-center mb-16",children:[o.jsx("h2",{className:"text-4xl md:text-5xl font-bold text-gray-900 dark:text-white mb-4",children:t("seoContentTypes.title")}),o.jsx("p",{className:"text-xl text-gray-600 dark:text-gray-300 max-w-3xl mx-auto",children:t("seoContentTypes.subtitle")})]}),o.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6",children:x.map((K,T)=>{const F=u1e[T];return o.jsxs(ue.div,{initial:{opacity:0,scale:.95},whileInView:{opacity:1,scale:1},transition:{duration:.4,delay:T*.1},viewport:{once:!0},className:"group bg-gradient-to-br from-white to-gray-50 dark:from-gray-800 dark:to-gray-900 rounded-2xl p-6 shadow-lg hover:shadow-2xl transition-all border border-gray-100 dark:border-gray-700 hover:border-blue-500 dark:hover:border-blue-500",children:[o.jsx("div",{className:"w-12 h-12 bg-gradient-to-br from-blue-500 to-cyan-500 rounded-xl flex items-center justify-center mb-4",children:o.jsx(F,{className:"w-6 h-6 text-white"})}),o.jsx("h3",{className:"text-lg font-bold text-gray-900 dark:text-white mb-3",children:K.title}),o.jsx("div",{className:"flex flex-wrap gap-2 mb-4",children:K.examples.map((E,H)=>o.jsx("span",{className:"text-xs bg-blue-50 dark:bg-blue-900/30 text-blue-700 dark:text-blue-300 px-2 py-1 rounded-full",children:E},H))}),o.jsxs("p",{className:"text-sm text-gray-600 dark:text-gray-400",children:[o.jsx("strong",{className:"text-gray-900 dark:text-white",children:t("seoContentTypes.generatesLabel")})," ",K.features]})]},T)})})]})}),o.jsx("section",{className:"py-24 bg-gradient-to-br from-blue-50 to-cyan-50 dark:from-gray-900 dark:to-gray-800",children:o.jsxs("div",{className:"container-custom",children:[o.jsxs(ue.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},transition:{duration:.6},viewport:{once:!0},className:"text-center mb-16",children:[o.jsx("h2",{className:"text-4xl md:text-5xl font-bold text-gray-900 dark:text-white mb-4",children:t("seoFeatures.title")}),o.jsx("p",{className:"text-xl text-gray-600 dark:text-gray-300 max-w-3xl mx-auto",children:t("seoFeatures.subtitle")})]}),o.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4 max-w-4xl mx-auto",children:A.map((K,T)=>o.jsxs(ue.div,{initial:{opacity:0,x:T%2===0?-20:20},whileInView:{opacity:1,x:0},transition:{duration:.4,delay:T*.05},viewport:{once:!0},className:"flex items-start gap-3 p-4 bg-white dark:bg-gray-800 rounded-xl shadow-sm",children:[o.jsx(Rt,{className:"w-5 h-5 text-blue-500 flex-shrink-0 mt-0.5"}),o.jsx("span",{className:"text-gray-700 dark:text-gray-300 font-medium",children:K})]},T))})]})}),o.jsx("section",{className:"py-24 bg-white dark:bg-gray-800",children:o.jsxs("div",{className:"container-custom",children:[o.jsxs(ue.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},transition:{duration:.6},viewport:{once:!0},className:"text-center mb-16",children:[o.jsxs("h2",{className:"text-4xl md:text-5xl font-bold text-gray-900 dark:text-white mb-4",children:[t("comparison.title")," ",o.jsx("span",{className:"text-blue-600",children:t("comparison.titleHighlight")})]}),o.jsx("p",{className:"text-xl text-gray-600 dark:text-gray-300 max-w-3xl mx-auto",children:t("comparison.subtitle")})]}),o.jsx("div",{className:"max-w-5xl mx-auto",children:o.jsxs("div",{className:"bg-white dark:bg-gray-800 rounded-3xl shadow-2xl overflow-hidden border border-gray-200 dark:border-gray-700",children:[o.jsxs("div",{className:"grid grid-cols-3 gap-4 p-6 bg-gradient-to-r from-blue-600 to-cyan-600 text-white",children:[o.jsx("div",{className:"font-bold text-lg",children:t("comparison.headers.aspect")}),o.jsx("div",{className:"font-bold text-lg text-center",children:t("comparison.headers.manual")}),o.jsx("div",{className:"font-bold text-lg text-center",children:t("comparison.headers.ai")})]}),N.map((K,T)=>o.jsxs(ue.div,{initial:{opacity:0,x:-20},whileInView:{opacity:1,x:0},transition:{duration:.4,delay:T*.1},viewport:{once:!0},className:`grid grid-cols-3 gap-4 p-6 ${T%2===0?"bg-gray-50 dark:bg-gray-900":"bg-white dark:bg-gray-800"}`,children:[o.jsx("div",{className:"font-semibold text-gray-900 dark:text-white",children:K.aspect}),o.jsx("div",{className:"text-center text-gray-600 dark:text-gray-400",children:K.manual}),o.jsx("div",{className:"text-center font-bold text-green-600 dark:text-green-400",children:K.ai})]},T))]})})]})}),o.jsx("section",{className:"py-24 bg-gradient-to-br from-gray-50 to-white dark:from-gray-900 dark:to-gray-800",children:o.jsxs("div",{className:"container-custom",children:[o.jsxs(ue.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},transition:{duration:.6},viewport:{once:!0},className:"text-center mb-16",children:[o.jsx("h2",{className:"text-4xl md:text-5xl font-bold text-gray-900 dark:text-white mb-4",children:t("useCases.title")}),o.jsx("p",{className:"text-xl text-gray-600 dark:text-gray-300 max-w-3xl mx-auto",children:t("useCases.subtitle")})]}),o.jsx("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-8 max-w-6xl mx-auto",children:b.map((K,T)=>o.jsxs(ue.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},transition:{duration:.5,delay:T*.1},viewport:{once:!0},className:"card dark:bg-gray-700 dark:border-gray-600",children:[o.jsx("div",{className:"bg-gradient-to-br from-blue-500 to-cyan-500 text-white px-4 py-2 rounded-lg inline-block mb-4",children:o.jsx("span",{className:"font-bold",children:K.scenario})}),o.jsx("h4",{className:"font-bold text-gray-900 dark:text-white mb-2",children:t("useCases.challengeLabel")}),o.jsx("p",{className:"text-gray-600 dark:text-gray-300 mb-4 text-sm",children:K.challenge}),o.jsx("h4",{className:"font-bold text-gray-900 dark:text-white mb-2",children:t("useCases.solutionLabel")}),o.jsx("p",{className:"text-gray-600 dark:text-gray-300 mb-4 text-sm",children:K.solution}),o.jsx("div",{className:"bg-blue-50 dark:bg-blue-900/30 p-3 rounded-lg",children:o.jsx("p",{className:"text-sm font-bold text-blue-700 dark:text-blue-300",children:K.savings})})]},T))})]})}),o.jsx("section",{className:"py-24 bg-white dark:bg-gray-800",children:o.jsxs("div",{className:"container-custom",children:[o.jsxs(ue.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},transition:{duration:.6},viewport:{once:!0},className:"text-center mb-16",children:[o.jsx("h2",{className:"text-4xl md:text-5xl font-bold text-gray-900 dark:text-white mb-4",children:t("seoTips.title")}),o.jsx("p",{className:"text-xl text-gray-600 dark:text-gray-300 max-w-3xl mx-auto",children:t("seoTips.subtitle")})]}),o.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-8 max-w-5xl mx-auto",children:v.map((K,T)=>{const F=d1e[T];return o.jsxs(ue.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},transition:{duration:.5,delay:T*.15},viewport:{once:!0},className:"group flex gap-5 bg-gradient-to-br from-white to-blue-50 dark:from-gray-800 dark:to-gray-900 rounded-2xl p-6 shadow-lg hover:shadow-xl transition-all border border-gray-100 dark:border-gray-700 hover:border-blue-400 dark:hover:border-blue-500",children:[o.jsx("div",{className:"w-14 h-14 bg-gradient-to-br from-blue-600 to-cyan-600 rounded-2xl flex items-center justify-center flex-shrink-0 group-hover:scale-110 transition-transform",children:o.jsx(F,{className:"w-7 h-7 text-white"})}),o.jsxs("div",{children:[o.jsx("h3",{className:"text-lg font-bold text-gray-900 dark:text-white mb-2",children:K.title}),o.jsx("p",{className:"text-gray-600 dark:text-gray-300 leading-relaxed text-sm",children:K.description})]})]},T)})})]})}),o.jsx("section",{className:"py-24 bg-gradient-to-br from-gray-50 to-white dark:from-gray-900 dark:to-gray-800",children:o.jsxs("div",{className:"container-custom",children:[o.jsxs(ue.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},transition:{duration:.6},viewport:{once:!0},className:"text-center mb-16",children:[o.jsx("h2",{className:"text-4xl md:text-5xl font-bold text-gray-900 dark:text-white mb-4",children:t("faq.title")}),o.jsx("p",{className:"text-xl text-gray-600 dark:text-gray-300 max-w-3xl mx-auto",children:t("faq.subtitle")})]}
1011),o.jsx("div",{className:"max-w-4xl mx-auto space-y-4",children:W.map((K,T)=>o.jsxs(ue.details,{initial:{opacity:0,y:10},whileInView:{opacity:1,y:0},transition:{duration:.4,delay:T*.1},viewport:{once:!0},className:"group bg-white dark:bg-gray-800 rounded-2xl p-6 hover:shadow-lg transition-all border border-gray-200 dark:border-gray-700",children:[o.jsxs("summary",{className:"flex items-center justify-between cursor-pointer list-none",children:[o.jsx("h3",{className:"text-lg font-bold text-gray-900 dark:text-white pr-4",children:K.question}),o.jsx("div",{className:"w-8 h-8 bg-blue-600 rounded-full flex items-center justify-center flex-shrink-0 group-open:rotate-180 transition-transform",children:o.jsx(Sr,{className:"w-5 h-5 text-white transform rotate-90"})})]}),o.jsx("p",{className:"mt-4 text-gray-600 dark:text-gray-300 leading-relaxed",children:K.answer})]},T))})]})}),o.jsxs("section",{className:"py-24 bg-gradient-to-br from-blue-600 via-cyan-600 to-teal-600 relative overflow-hidden",children:[o.jsx(ue.div,{animate:{scale:[1,1.2,1],opacity:[.3,.5,.3]},transition:{duration:8,repeat:1/0,ease:"easeInOut"},className:"absolute top-0 right-0 w-96 h-96 bg-white rounded-full blur-3xl"}),o.jsx(ue.div,{animate:{scale:[1,1.3,1],opacity:[.2,.4,.2]},transition:{duration:10,repeat:1/0,ease:"easeInOut"},className:"absolute bottom-0 left-0 w-96 h-96 bg-blue-400 rounded-full blur-3xl"}),o.jsx("div",{className:"container-custom text-center relative z-10",children:o.jsxs(ue.div,{initial:{opacity:0,y:30},whileInView:{opacity:1,y:0},transition:{duration:.8},viewport:{once:!0},children:[o.jsxs("div",{className:"inline-flex items-center gap-2 bg-white/20 backdrop-blur-sm px-6 py-3 rounded-full mb-8",children:[o.jsx(Tp,{className:"w-5 h-5 text-white"}),o.jsx("span",{className:"text-white font-semibold",children:t("finalCta.badge")})]}),o.jsxs("h2",{className:"text-4xl md:text-6xl font-bold text-white mb-6",children:[t("finalCta.titleLine1"),o.jsx("br",{}),t("finalCta.titleLine2")]}),o.jsx("p",{className:"text-xl md:text-2xl text-blue-100 mb-10 max-w-3xl mx-auto",children:t("finalCta.subtitle")}),o.jsxs("div",{className:"flex flex-col sm:flex-row gap-4 justify-center mb-8",children:[o.jsxs(ze,{to:"/register",className:"inline-flex items-center justify-center gap-2 bg-white text-blue-600 px-10 py-5 rounded-xl font-bold text-lg hover:bg-gray-100 transition-all shadow-2xl hover:scale-105 transform",children:[t("finalCta.cta.register"),o.jsx(ga,{className:"w-5 h-5"})]}),o.jsxs(ze,{to:"/login",className:"inline-flex items-center justify-center gap-2 bg-transparent border-2 border-white text-white px-10 py-5 rounded-xl font-bold text-lg hover:bg-white/10 transition-all",children:[t("finalCta.cta.login"),o.jsx(Sr,{className:"w-5 h-5"})]})]}),o.jsx("p",{className:"text-blue-100",children:t("finalCta.benefits",{minTopUp:l,price:a})})]})})]})]})]})},h1e=()=>{const{data:t,isLoading:e}=mt({queryKey:["admin","dashboard","stats"],queryFn:async()=>{const{data:r}=await xe.get("/admin/stats");return r}});return e?o.jsx(Mn,{children:o.jsxs("div",{className:"animate-pulse space-y-6",children:[o.jsx("div",{className:"h-8 bg-gray-200 dark:bg-gray-700 rounded w-64"}),o.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-6",children:[1,2,3,4].map(r=>o.jsx("div",{className:"h-32 bg-gray-200 dark:bg-gray-700 rounded-xl"},r))})]})}):o.jsx(Mn,{children:o.jsxs("div",{className:"space-y-8",children:[o.jsxs("div",{children:[o.jsx("h1",{className:"text-3xl font-bold text-gray-900 dark:text-white",children:"Dashboard"}),o.jsx("p",{className:"text-gray-600 dark:text-gray-400 mt-1",children:"Przegląd systemu Smart-Copy.AI"})]}),o.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-6",children:[o.jsxs(ze,{to:"/admin/users",className:"bg-white dark:bg-gray-800 rounded-xl p-6 border border-gray-200 dark:border-gray-700 hover:shadow-lg transition-all",children:[o.jsxs("div",{className:"flex items-center justify-between mb-4",children:[o.jsx("div",{className:"p-3 bg-blue-100 dark:bg-blue-900/20 rounded-lg",children:o.jsx(zp,{className:"w-6 h-6 text-blue-600 dar
1011k:text-blue-400"})}),o.jsx(Tp,{className:"w-5 h-5 text-green-500"})]}),o.jsx("h3",{className:"text-2xl font-bold text-gray-900 dark:text-white mb-1",children:(t==null?void 0:t.users.total)||0}),o.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400 mb-2",children:"Użytkownicy"}),o.jsxs("div",{className:"flex gap-4 text-xs",children:[o.jsxs("span",{className:"text-green-600 dark:text-green-400",children:["✓ ",(t==null?void 0:t.users.verified)||0," zweryfikowanych"]}),o.jsxs("span",{className:"text-gray-500",children:[(t==null?void 0:t.users.unverified)||0," oczekujących"]})]})]}),o.jsxs(ze,{to:"/admin/orders",className:"bg-white dark:bg-gray-800 rounded-xl p-6 border border-gray-200 dark:border-gray-700 hover:shadow-lg transition-all",children:[o.jsxs("div",{className:"flex items-center justify-between mb-4",children:[o.jsx("div",{className:"p-3 bg-purple-100 dark:bg-purple-900/20 rounded-lg",children:o.jsx(fn,{className:"w-6 h-6 text-purple-600 dark:text-purple-400"})}),o.jsx(qs,{className:"w-5 h-5 text-orange-500"})]}),o.jsx("h3",{className:"text-2xl font-bold text-gray-900 dark:text-white mb-1",children:(t==null?void 0:t.orders.total)||0}),o.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400 mb-2",children:"Zamówienia"}),o.jsxs("div",{className:"flex gap-4 text-xs",children:[o.jsxs("span",{className:"text-green-600 dark:text-green-400",children:["✓ ",(t==null?void 0:t.orders.completed)||0," ukończonych"]}),o.jsxs("span",{className:"text-orange-500",children:[(t==null?void 0:t.orders.pending)||0," w toku"]})]})]}),o.jsxs(ze,{to:"/admin/blog",className:"bg-white dark:bg-gray-800 rounded-xl p-6 border border-gray-200 dark:border-gray-700 hover:shadow-lg transition-all",children:[o.jsxs("div",{className:"flex items-center justify-between mb-4",children:[o.jsx("div",{className:"p-3 bg-indigo-100 dark:bg-indigo-900/20 rounded-lg",children:o.jsx(Jt,{className:"w-6 h-6 text-indigo-600 dark:text-indigo-400"})}),o.jsx(Rt,{className:"w-5 h-5 text-green-500"})]}),o.jsx("h3",{className:"text-2xl font-bold text-gray-900 dark:text-white mb-1",children:(t==null?void 0:t.blog.total)||0}),o.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400 mb-2",children:"Artykuły"}),o.jsxs("div",{className:"flex gap-4 text-xs",children:[o.jsxs("span",{className:"text-green-600 dark:text-green-400",children:["✓ ",(t==null?void 0:t.blog.published)||0," opublikowanych"]}),o.jsxs("span",{className:"text-gray-500",children:[(t==null?void 0:t.blog.drafts)||0," szkiców"]})]})]}),o.jsxs("div",{className:"bg-gradient-to-br from-green-500 to-emerald-600 rounded-xl p-6 text-white shadow-lg",children:[o.jsxs("div",{className:"flex items-center justify-between mb-4",children:[o.jsx("div",{className:"p-3 bg-white/20 rounded-lg",children:o.jsx(Ey,{className:"w-6 h-6"})}),o.jsx(Tp,{className:"w-5 h-5"})]}),o.jsxs("h3",{className:"text-2xl font-bold mb-1",children:[(t==null?void 0:t.revenue.total)||0," PLN"]}),o.jsx("p",{className:"text-sm text-green-100 mb-2",children:"Przychody całkowite"}),o.jsxs("div",{className:"text-xs text-green-100",children:["Ten miesiąc: ",(t==null?void 0:t.revenue.thisMonth)||0," PLN"]})]})]}),o.jsxs("div",{className:"bg-white dark:bg-gray-800 rounded-xl p-6 border border-gray-200 dark:border-gray-700",children:[o.jsx("h2",{className:"text-xl font-bold text-gray-900 dark:text-white mb-4",children:"Szybkie akcje"}),o.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[o.jsxs(ze,{to:"/admin/blog/new",className:"flex items-center gap-3 p-4 bg-indigo-50 dark:bg-indigo-900/20 rounded-lg hover:bg-indigo-100 dark:hover:bg-indigo-900/30 transition-colors",children:[o.jsx(Jt,{className:"w-5 h-5 text-indigo-600 dark:text-indigo-400"}),o.jsx("span",{className:"font-medium text-gray-900 dark:text-white",children:"Nowy artykuł"})]}),o.jsxs(ze,{to:"/admin/users",className:"flex items-center gap-3 p-4 bg-blue-50 dark:bg-blue-900/20 rounded-lg hover:bg-blue-100 dark:hover:bg-blue-900/30 transition-colors",children:[o.jsx(zp,{className:"w-5 h-5 text-blue-600 dark:text-blue-400"}),o.jsx("span",{className:"font-medium text-gray-900 dark:text-white",children:"Zarządzaj użytkownikami"})]}),o.jsxs(ze,{to:"/admin/orders",className:"flex items-center gap-3 p-4 bg-purple-50 dark:bg-purple-900/20 rounded-lg hover:bg-purple-100 dar
1011k:hover:bg-purple-900/30 transition-colors",children:[o.jsx(fn,{className:"w-5 h-5 text-purple-600 dark:text-purple-400"}),o.jsx("span",{className:"font-medium text-gray-900 dark:text-white",children:"Zobacz zamówienia"})]})]})]}),o.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-6",children:[o.jsxs("div",{className:"bg-white dark:bg-gray-800 rounded-xl p-6 border border-gray-200 dark:border-gray-700",children:[o.jsxs("div",{className:"flex items-center justify-between mb-4",children:[o.jsx("h2",{className:"text-lg font-bold text-gray-900 dark:text-white",children:"Ostatnie zamówienia"}),o.jsx(ze,{to:"/admin/orders",className:"text-sm text-indigo-600 dark:text-indigo-400 hover:underline",children:"Zobacz wszystkie"})]}),o.jsx("div",{className:"space-y-3",children:o.jsxs("div",{className:"flex items-center gap-3 p-3 bg-gray-50 dark:bg-gray-700/50 rounded-lg",children:[o.jsx(Dh,{className:"w-5 h-5 text-orange-500"}),o.jsxs("div",{className:"flex-1",children:[o.jsx("p",{className:"text-sm font-medium text-gray-900 dark:text-white",children:"Zamówienie #1234"}),o.jsx("p",{className:"text-xs text-gray-600 dark:text-gray-400",children:"W trakcie realizacji"})]})]})})]}),o.jsxs("div",{className:"bg-white dark:bg-gray-800 rounded-xl p-6 border border-gray-200 dark:border-gray-700",children:[o.jsxs("div",{className:"flex items-center justify-between mb-4",children:[o.jsx("h2",{className:"text-lg font-bold text-gray-900 dark:text-white",children:"Ostatnie artykuły"}),o.jsx(ze,{to:"/admin/blog",className:"text-sm text-indigo-600 dark:text-indigo-400 hover:underline",children:"Zobacz wszystkie"})]}),o.jsx("div",{className:"space-y-3",children:o.jsxs("div",{className:"flex items-center gap-3 p-3 bg-gray-50 dark:bg-gray-700/50 rounded-lg",children:[o.jsx(Jt,{className:"w-5 h-5 text-indigo-600"}),o.jsxs("div",{className:"flex-1",children:[o.jsx("p",{className:"text-sm font-medium text-gray-900 dark:text-white",children:"Brak artykułów"}),o.jsx("p",{className:"text-xs text-gray-600 dark:text-gray-400",children:"Dodaj pierwszy artykuł"})]})]})})]})]})]})})},LA=t=>t?t.toUpperCase().split("").map(e=>String.fromCodePoint(127397+e.charCodeAt(0))).join(""):"🌍",p1e=()=>{const t=Zs(),[e,r]=M.useState(null),[n,s]=M.useState(null),[i,a]=M.useState(0),[l,c]=M.useState(""),[u,d]=M.useState(""),[h,p]=M.useState("createdAt"),[f,m]=M.useState("desc"),[y,k]=M.useState("ALL"),[g,x]=M.useState("ALL"),{data:w,isLoading:b}=mt({queryKey:["admin-users"],queryFn:async()=>(await xe.get("/admin/users")).data}),{data:v,isLoading:A}=mt({queryKey:["admin-user-details",e],queryFn:async()=>e?(await xe.get(`/admin/users/${e}`)).data:null,enabled:!!e}),C=Be({mutationFn:async Y=>{await xe.delete(`/admin/users/${Y}`)},onSuccess:()=>{t.invalidateQueries({queryKey:["admin-users"]}),le.success("Użytkownik usunięty")},onError:()=>{le.error("Błąd podczas usuwania użytkownika")}}),_=Be({mutationFn:async({userId:Y,amount:$,reason:D})=>{await xe.patch(`/admin/users/${Y}/balance`,{amount:$,reason:D})},onSuccess:()=>{t.invalidateQueries({queryKey:["admin-users"]}),t.invalidateQueries({queryKey:["admin-user-details"]}),le.success("Saldo zaktualizowane"),s(null),a(0),c("")},onError:()=>{le.error("Błąd podczas aktualizacji salda")}}),N=()=>{if(!l.trim()){le.error("Podaj powód zmiany salda");return}_.mutate({userId:n.id,amount:i,reason:l})},W=(w||[]).filter(Y=>{const $=u.toLowerCase(),D=!$||Y.email.toLowerCase().includes($)||(Y.firstName||"").toLowerCase().includes($)||(Y.lastName||"").toLowerCase().includes($),J=y==="ALL"||Y.role===y,de=g==="ALL"||g==="VERIFIED"&&Y.isVerified||g==="UNVERIFIED"&&!Y.isVerified;return D&&J&&de}).sort((Y,$)=>{var J,de;let D=0;switch(h){case"email":D=Y.email.localeCompare($.email);break;case"balance":D=parseFloat(Y.balance)-parseFloat($.balance);break;case"orders":D=(((J=Y._count)==null?void 0:J.orders)||0)-(((de=$._count)==null?void 0:de.orders)||0);break;case"lastLoginAt":D=new Date(Y.lastLoginAt||0).getTime()-new Date($.lastLoginAt||0).getTime();break;case"createdAt":default:D=new Date(Y.createdAt).getTime()-new Date($.createdAt).getTime();break}return f==="desc"?-D:D}),K=Y=>{h===Y?m(f==="asc"?"desc":"asc"):(p(Y),m("desc"))},T=Y=>Y?new Date(Y).toLocaleDateString("pl-PL",{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"}):"—",F=Y=>Y?new Date(Y).toLocaleDateString("pl-PL",{day:"2-digit",month:"2-digit",year:"numeric"}):"—",E=Y=>{if(!Y)return"nigdy";const $=new Date,D=new Date(Y),J=$.getTime()-D.getTime(),de=Math.floor(J/6e4),G=Math.floor(J/36e5),B=Math.floor(J/864e5);return de<1?"przed chwilą":de<60?`${de} min temu`:G<24?`${G} godz. temu`:B<7?`${B} dni temu`:F(Y)},H=({field:Y,children:$})=>o.jsxs("button",{onClick:()=>K(Y),className:"flex items-center gap-1 text-left text-sm font-semibold text-gray-900 dark:text-white hover:text-purple-600 dar
1011k:hover:text-purple-400 transition-colors",children:[$,o.jsx(bV,{className:`w-3 h-3 ${h===Y?"text-purple-600 dark:text-purple-400":"text-gray-400"}`})]});return b?o.jsx(Mn,{children:o.jsxs("div",{className:"animate-pulse space-y-4",children:[o.jsx("div",{className:"h-8 bg-gray-200 dark:bg-gray-700 rounded w-48"}),o.jsx("div",{className:"h-12 bg-gray-200 dark:bg-gray-700 rounded"}),[1,2,3,4].map(Y=>o.jsx("div",{className:"h-16 bg-gray-200 dark:bg-gray-700 rounded"},Y))]})}):o.jsxs(Mn,{children:[o.jsx("div",{className:"flex items-center justify-between mb-6",children:o.jsxs("div",{children:[o.jsx("h1",{className:"text-3xl font-bold text-gray-900 dark:text-white",children:"Użytkownicy"}),o.jsxs("p",{className:"text-sm text-gray-500 dark:text-gray-400 mt-1",children:["Łącznie: ",(w==null?void 0:w.length)||0," użytkowników"]})]})}),o.jsx("div",{className:"bg-white dark:bg-gray-800 rounded-lg shadow border border-gray-200 dark:border-gray-700 p-4 mb-6",children:o.jsxs("div",{className:"flex flex-wrap items-center gap-4",children:[o.jsxs("div",{className:"relative flex-1 min-w-[250px]",children:[o.jsx(_i,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-gray-400"}),o.jsx("input",{type:"text",placeholder:"Szukaj po email, imieniu lub nazwisku...",value:u,onChange:Y=>d(Y.target.value),className:"w-full pl-10 pr-8 py-2 rounded-lg border border-gray-300 dark:border-gray-600 bg-white dark:bg-gray-700 text-gray-900 dark:text-white text-sm focus:ring-2 focus:ring-purple-500 focus:border-transparent outline-none"}),u&&o.jsx("button",{onClick:()=>d(""),className:"absolute right-2 top-1/2 -translate-y-1/2 p-1 hover:bg-gray-200 dark:hover:bg-gray-600 rounded",children:o.jsx(yt,{className:"w-3 h-3 text-gray-400"})})]}),o.jsxs("select",{value:y,onChange:Y=>k(Y.target.value),className:"px-3 py-2 rounded-lg border border-gray-300 dark:border-gray-600 bg-white dark:bg-gray-700 text-gray-900 dark:text-white text-sm focus:ring-2 focus:ring-purple-500 outline-none",children:[o.jsx("option",{value:"ALL",children:"Wszystkie role"}),o.jsx("option",{value:"USER",children:"USER"}),o.jsx("option",{value:"ADMIN",children:"ADMIN"})]}),o.jsxs("select",{value:g,onChange:Y=>x(Y.target.value),className:"px-3 py-2 rounded-lg border border-gray-300 dark:border-gray-600 bg-white dark:bg-gray-700 text-gray-900 dark:text-white text-sm focus:ring-2 focus:ring-purple-500 outline-none",children:[o.jsx("option",{value:"ALL",children:"Wszystkie statusy"}),o.jsx("option",{value:"VERIFIED",children:"Zweryfikowani"}),o.jsx("option",{value:"UNVERIFIED",children:"Niezweryfikowani"})]}),o.jsxs("span",{className:"text-xs text-gray-500 dark:text-gray-400",children:["Wyniki: ",W.length]})]})}),o.jsxs("div",{className:"bg-white dark:bg-gray-800 rounded-lg shadow border border-gray-200 dark:border-gray-700 overflow-hidden",children:[o.jsx("div",{className:"overflow-x-auto",children:o.jsxs("table",{className:"w-full",children:[o.jsx("thead",{className:"bg-gray-50 dark:bg-gray-700",children:o.jsxs("tr",{children:[o.jsx("th",{className:"px-4 py-3 text-left",children:o.jsx(H,{field:"email",children:"Email"})}),o.jsx("th",{className:"px-4 py-3 text-left text-sm font-semibold text-gray-900 dark:text-white",children:"Imię / Nazwisko"}),o.jsx("th",{className:"px-4 py-3 text-left text-sm font-semibold text-gray-900 dark:text-white",children:"Rola"}),o.jsx("th",{className:"px-4 py-3 text-left text-sm font-semibold text-gray-900 dark:text-white",children:"Status"}),o.jsx("th",{className:"px-4 py-3 text-left text-sm font-semibold text-gray-900 dark:text-white",children:"Kraj"}),o.jsx("th",{className:"px-4 py-3 text-left",children:o.jsx(H,{field:"balance",children:"Saldo"})}),o.jsx("th",{className:"px-4 py-3 text-left",children:o.jsx(H,{field:"orders",children:"Zamówienia"})}),o.jsx("th",{className:"px-4 py-3 text-left",children:o.jsx(H,{field:"createdAt",children:"Rejestracja"})}),o.jsx("th",{className:"px-4 py-3 text-left",children:o.jsx(H,{field:"lastLoginAt",children:"Ostatnie logowanie"})}),o.jsx("th",{className:"px-4 py-3 text-left text-sm font-semibold text-gray-900 dark:text-white",children:"Akcje"})]})}),o.jsx("tbody",{className:"divide-y divide-gray-200 dark:divide-gray-700",children:W.map(Y=>o.jsx(f1e,{user:Y,isExpanded:e===Y.id,userDetails:e===Y.id?v:null,isLoadingDetails:e===Y.id&&A,onToggleExpand:()=>r(e===Y.id?null:Y.id),onEditBalance:()=>s(Y),onDelete:()=>{confirm(`Usunąć użytkownika ${Y.email}?`)&&C.mutate(Y.id)},formatDate:T,formatDateShort:F,timeAgo:E},Y.id))})]})}),W.length===0&&o.jsx("div",{className:"text-center py-12 text-gray-500 dark:text-gray-400",children:"Brak użytkowników spełniających kryteria"})]}),o.jsx(jt,{children:n&&o.jsx(ue.div,{initial:{opacity:0}
1011,animate:{opacity:1},exit:{opacity:0},className:"fixed inset-0 bg-black/50 flex items-center justify-center z-50",onClick:()=>s(null),children:o.jsxs(ue.div,{initial:{scale:.95,opacity:0},animate:{scale:1,opacity:1},exit:{scale:.95,opacity:0},className:"bg-white dark:bg-gray-800 p-6 rounded-xl max-w-md w-full shadow-2xl border border-gray-200 dark:border-gray-700",onClick:Y=>Y.stopPropagation(),children:[o.jsx("h3",{className:"text-xl font-bold mb-1 text-gray-900 dark:text-white",children:"Edytuj saldo"}),o.jsx("p",{className:"text-sm text-gray-500 dark:text-gray-400 mb-6",children:n.email}),o.jsxs("div",{className:"bg-gray-50 dark:bg-gray-700/50 rounded-lg p-3 mb-6",children:[o.jsx("span",{className:"text-xs text-gray-500 dark:text-gray-400",children:"Aktualne saldo"}),o.jsxs("p",{className:"text-2xl font-bold text-purple-600",children:[parseFloat(n.balance).toFixed(2)," zł"]})]}),o.jsx("label",{className:"block mb-1.5 text-sm font-semibold text-gray-900 dark:text-white",children:"Kwota zmiany (zł):"}),o.jsx("input",{type:"number",value:i,onChange:Y=>a(parseFloat(Y.target.value)||0),className:"w-full mb-4 px-3 py-2 rounded-lg border border-gray-300 dark:border-gray-600 bg-white dark:bg-gray-700 text-gray-900 dark:text-white text-sm focus:ring-2 focus:ring-purple-500 outline-none",placeholder:"np. 100 lub -50"}),i!==0&&o.jsxs("div",{className:"mb-4 text-sm",children:["Nowe saldo:"," ",o.jsxs("span",{className:`font-bold ${parseFloat(n.balance)+i>=0?"text-green-600":"text-red-600"}`,children:[(parseFloat(n.balance)+i).toFixed(2)," ","zł"]})]}),o.jsx("label",{className:"block mb-1.5 text-sm font-semibold text-gray-900 dark:text-white",children:"Powód:"}),o.jsx("input",{type:"text",value:l,onChange:Y=>c(Y.target.value),className:"w-full mb-6 px-3 py-2 rounded-lg border border-gray-300 dark:border-gray-600 bg-white dark:bg-gray-700 text-gray-900 dark:text-white text-sm focus:ring-2 focus:ring-purple-500 outline-none",placeholder:"np. Korekta salda, Bonus powitalny"}),o.jsxs("div",{className:"flex gap-3",children:[o.jsx("button",{onClick:N,disabled:_.isPending,className:"flex-1 bg-purple-600 hover:bg-purple-700 disabled:opacity-50 text-white font-medium py-2.5 px-4 rounded-lg transition-colors",children:_.isPending?"Zapisywanie...":"Zapisz"}),o.jsx("button",{onClick:()=>s(null),className:"flex-1 bg-gray-100 dark:bg-gray-700 hover:bg-gray-200 dark:hover:bg-gray-600 text-gray-900 dark:text-white font-medium py-2.5 px-4 rounded-lg transition-colors",children:"Anuluj"})]})]})})})]})},f1e=({user:t,isExpanded:e,userDetails:r,isLoadingDetails:n,onToggleExpand:s,onEditBalance:i,onDelete:a,formatDate:l,timeAgo:c})=>{var y,k,g,x,w;const[u,d]=M.useState("info"),h=b=>{switch(b){case"COMPLETED":return"bg-green-100 text-green-700 dark:bg-green-900/30 dark:text-green-400";case"IN_PROGRESS":return"bg-blue-100 text-blue-700 dark:bg-blue-900/30 dark:text-blue-400";case"PENDING":return"bg-yellow-100 text-yellow-700 dark:bg-yellow-900/30 dark:text-yellow-400";case"CANCELLED":return"bg-red-100 text-red-700 dark:bg-red-900/30 dark:text-red-400";default:return"bg-gray-100 text-gray-700 dark:bg-gray-700 dark:text-gray-300"}},p=b=>{switch(b){case"COMPLETED":return"Ukończone";case"IN_PROGRESS":return"W toku";case"PENDING":return"Oczekujące";case"CANCELLED":return"Anulowane";default:return b}},f=b=>{switch(b){case"DEPOSIT":return"Doładowanie";case"ORDER_PAYMENT":return"Płatność";case"REFUND":return"Zwrot";default:return b}},m=b=>{switch(b){case"DEPOSIT":return"text-green-600 dark:text-green-400";case"ORDER_PAYMENT":return"text-red-600 dark:text-red-400";case"REFUND":return"text-blue-600 dark:text-blue-400";default:return"text-gray-600"}};return o.jsxs(o.Fragment,{children:[o.jsxs("tr",{className:`hover:bg-gray-50 dark:hover:bg-gray-700/50 transition-colors ${e?"bg-purple-50/50 dark:bg-purple-900/10":""}`,children:[o.jsx("td",{className:"px-4 py-3",children:o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx("div",{className:"w-8 h-8 rounded-full bg-purple-100 dark:bg-purple-900/30 flex items-center justify-center text-purple-600 dar
1011k:text-purple-400 text-xs font-bold shrink-0",children:(t.firstName||t.email)[0].toUpperCase()}),o.jsx("span",{className:"text-sm font-medium text-gray-900 dark:text-white truncate max-w-[200px]",children:t.email})]})}),o.jsx("td",{className:"px-4 py-3 text-sm text-gray-900 dark:text-white",children:t.firstName||t.lastName?o.jsxs("span",{children:[t.firstName||""," ",t.lastName||""]}):o.jsx("span",{className:"text-gray-400",children:"—"})}),o.jsx("td",{className:"px-4 py-3",children:o.jsx("span",{className:`inline-flex items-center px-2 py-0.5 rounded-full text-xs font-medium ${t.role==="ADMIN"?"bg-purple-100 text-purple-700 dark:bg-purple-900/30 dark:text-purple-400":"bg-gray-100 text-gray-600 dark:bg-gray-700 dark:text-gray-400"}`,children:t.role})}),o.jsx("td",{className:"px-4 py-3",children:t.isVerified?o.jsxs("span",{className:"inline-flex items-center gap-1 text-xs text-green-600 dark:text-green-400",children:[o.jsx(Ju,{className:"w-3.5 h-3.5"}),"Zweryfikowany"]}):o.jsxs("span",{className:"inline-flex items-center gap-1 text-xs text-red-500 dark:text-red-400",children:[o.jsx(UV,{className:"w-3.5 h-3.5"}),"Niezweryfikowany"]})}),o.jsx("td",{className:"px-4 py-3",children:t.country?o.jsxs("span",{className:"text-sm",title:t.country,children:[LA(t.country)," ",t.country]}):o.jsx("span",{className:"text-gray-400 text-sm",children:"—"})}),o.jsx("td",{className:"px-4 py-3",children:o.jsxs("div",{className:"flex items-center gap-1.5",children:[o.jsxs("span",{className:"text-sm font-bold text-purple-600 dark:text-purple-400",children:[parseFloat(t.balance).toFixed(2)," zł"]}),o.jsx("button",{onClick:i,className:"p-1 hover:bg-gray-200 dark:hover:bg-gray-600 rounded transition-colors",title:"Edytuj saldo",children:o.jsx(Ro,{className:"w-3.5 h-3.5 text-gray-500 dark:text-gray-400"})})]})}),o.jsx("td",{className:"px-4 py-3",children:o.jsxs("button",{onClick:s,className:"flex items-center gap-1.5 text-sm text-purple-600 dark:text-purple-400 hover:underline font-medium",children:[o.jsx(fn,{className:"w-3.5 h-3.5"}),((y=t._count)==null?void 0:y.orders)||0,e?o.jsx(Cy,{className:"w-3.5 h-3.5"}):o.jsx(Ti,{className:"w-3.5 h-3.5"})]})}),o.jsx("td",{className:"px-4 py-3",children:o.jsx("div",{className:"text-xs text-gray-600 dark:text-gray-400",title:l(t.createdAt),children:o.jsxs("div",{className:"flex items-center gap-1",children:[o.jsx(uc,{className:"w-3 h-3"}),l(t.createdAt)]})})}),o.jsx("td",{className:"px-4 py-3",children:o.jsx("div",{className:"text-xs text-gray-600 dark:text-gray-400",title:l(t.lastLoginAt),children:o.jsxs("div",{className:"flex items-center gap-1",children:[o.jsx(qs,{className:"w-3 h-3"}),t.lastLoginAt?c(t.lastLoginAt):"nigdy"]})})}),o.jsx("td",{className:"px-4 py-3",children:o.jsx("button",{onClick:a,className:"p-1.5 hover:bg-red-50 dark:hover:bg-red-900/20 rounded transition-colors text-red-500 hover:text-red-700",title:"Usuń użytkownika",children:o.jsx(Cr,{className:"w-4 h-4"})})})]}),o.jsx(jt,{children:e&&o.jsx(ue.tr,{initial:{opacity:0}
1011,animate:{opacity:1},exit:{opacity:0},transition:{duration:.2},children:o.jsx("td",{colSpan:10,className:"px-4 py-0 bg-gray-50 dark:bg-gray-900/50",children:o.jsx(ue.div,{initial:{height:0},animate:{height:"auto"},exit:{height:0},className:"overflow-hidden",children:o.jsxs("div",{className:"py-4",children:[o.jsx("div",{className:"flex gap-1 mb-4 bg-gray-100 dark:bg-gray-800 rounded-lg p-1 w-fit",children:[{key:"info",label:"Szczegóły",icon:Ay},{key:"orders",label:"Zamówienia",icon:fn},{key:"transactions",label:"Transakcje",icon:yv}].map(({key:b,label:v,icon:A})=>o.jsxs("button",{onClick:()=>d(b),className:`flex items-center gap-1.5 px-3 py-1.5 rounded-md text-sm font-medium transition-colors ${u===b?"bg-white dark:bg-gray-700 text-purple-600 dark:text-purple-400 shadow-sm":"text-gray-600 dark:text-gray-400 hover:text-gray-900 dark:hover:text-white"}`,children:[o.jsx(A,{className:"w-3.5 h-3.5"}),v]},b))}),n?o.jsxs("div",{className:"flex items-center gap-2 py-8 justify-center text-gray-500",children:[o.jsx(Lo,{className:"w-4 h-4 animate-spin"}),"Ładowanie szczegółów..."]}):o.jsxs(o.Fragment,{children:[u==="info"&&o.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",children:[o.jsx(nn,{label:"ID",value:t.id,mono:!0}),o.jsx(nn,{label:"Email",value:t.email,icon:o.jsx(dc,{className:"w-4 h-4"})}),o.jsx(nn,{label:"Imię",value:t.firstName||"—"}),o.jsx(nn,{label:"Nazwisko",value:t.lastName||"—"}),o.jsx(nn,{label:"Rola",value:t.role}),o.jsx(nn,{label:"Status weryfikacji",value:t.isVerified?"✅ Zweryfikowany":"❌ Niezweryfikowany"}),o.jsx(nn,{label:"Kraj",value:t.country?`${LA(t.country)} ${t.country}`:"Nieznany"}),o.jsx(nn,{label:"Saldo",value:`${parseFloat(t.balance).toFixed(2)} zł`,highlight:!0}),o.jsx(nn,{label:"Data rejestracji",value:l(t.createdAt),icon:o.jsx(uc,{className:"w-4 h-4"})}),o.jsx(nn,{label:"Ostatnie logowanie",value:t.lastLoginAt?`${l(t.lastLoginAt)} (${c(t.lastLoginAt)})`:"Nigdy",icon:o.jsx(qs,{className:"w-4 h-4"})}),o.jsx(nn,{label:"Google ID",value:r!=null&&r.googleId?"Połączone":"Brak"}),o.jsx(nn,{label:"IP rejestracji",value:(r==null?void 0:r.registrationIp)||"—",mono:!0}),o.jsx(nn,{label:"Ostatnie IP",value:(r==null?void 0:r.lastLoginIp)||"—",mono:!0}),o.jsx(nn,{label:"Liczba zamówień",value:String(((k=t._count)==null?void 0:k.orders)||0)}),o.jsx(nn,{label:"Liczba transakcji",value:String(((g=t._count)==null?void 0:g.transactions)||0)})]}),u==="orders"&&o.jsx("div",{className:"space-y-2",children:((x=r==null?void 0:r.orders)==null?void 0:x.length)>0?o.jsxs(o.Fragment,{children:[o.jsxs("div",{className:"text-sm text-gray-500 dark:text-gray-400 mb-3",children:[r.orders.length," zamówień"]}),r.orders.map(b=>{var v,A;return o.jsxs("div",{className:"bg-white dark:bg-gray-800 rounded-lg border border-gray-200 dark:border-gray-700 p-4 hover:shadow-sm transition-shadow",children:[o.jsxs("div",{className:"flex items-center justify-between mb-2",children:[o.jsxs("div",{className:"flex items-center gap-3",children:[o.jsxs(ze,{to:`/admin/orders/${b.id}`,className:"text-sm font-bold text-purple-600 dark:text-purple-400 hover:underline flex items-center gap-1",children:[b.orderNumber,o.jsx(Oo,{className:"w-3 h-3"})]}),o.jsx("span",{className:`px-2 py-0.5 rounded-full text-xs font-medium ${h(b.status)}`,children:p(b.status)})]}),o.jsxs("span",{className:"text-sm font-bold text-gray-900 dark:text-white",children:[parseFloat(b.totalPrice).toFixed(2)," ","zł"]})]}),o.jsxs("div",{className:"flex items-center gap-4 text-xs text-gray-500 dark:text-gray-400",children:[o.jsxs("span",{children:["📄 ",((v=b.texts)==null?void 0:v.length)||0," tekstów"]}),o.jsxs("span",{children:["📅 ",l(b.createdAt)]}),(A=b.texts)==null?void 0:A.map(C=>{var _,N;return o.jsxs("span",{className:"bg-gray-100 dark:bg-gray-700 px-2 py-0.5 rounded text-xs",children:[(_=C.topic)==null?void 0:_.substring(0,40),((N=C.topic)==null?void 0:N.length)>40?"...":""]},C.id)})]})]},b.id)})]}):o.jsxs("div",{className:"text-center py-8 text-gray-500 dark:text-gray-400",children:[o.jsx(fn,{className:"w-8 h-8 mx-auto mb-2 opacity-30"}),"Brak zamówień"]})}),u==="transactions"&&o.jsx("div",{className:"space-y-1",children:((w=r==null?void 0:r.transactions)==null?void 0:w.length)>0?o.jsxs(o.Fragment,{children:[o.jsxs("div",{className:"text-sm text-gray-500 dark:text-gray-400 mb-3",children:["Ostatnie ",r.transactions.length," ","transakcji"]}),o.jsx("div",{className:"bg-white dark:bg-gray-800 rounded-lg border border-gray-200 dark:border-gray-700 overflow-hidden",children:o.jsxs("table",{className:"w-full text-sm",children:[o.jsx("thead",{className:"bg-gray-50 dark:bg-gray-700/50",children:o.jsxs("tr",{children:[o.jsx("th",{className:"px-3 py-2 text-left text-xs font-medium text-gray-500 dark:text-gray-400",children:"Data"}),o.jsx("th",{className:"px-3 py-2 text-left text-xs font-medium text-gray-500 dark:text-gray-400",children:"Typ"}),o.jsx("th",{className:"px-3 py-2 text-right text-xs font-medium text-gray-500 dark:text-gray-400",children:"Kwota"}),o.jsx("th",{className:"px-3 py-2 text-right text-xs font-medium text-gray-500 dark:text-gray-400",children:"Saldo przed"}),o.jsx("th",{className:"px-3 py-2 text-right text-xs font-medium text-gray-500 dark:text-gray-400",children:"Saldo po"}),o.jsx("th",{className:"px-3 py-2 text-left text-xs font-medium text-gray-500 dark:text-gray-400",children:"Opis"})]})}),o.jsx("tbody",{className:"divide-y divide-gray-100 dark:divide-gray-700",children:r.transactions.map(b=>o.jsxs("tr",{className:"hover:bg-gray-50 dark:hover:bg-gray-700/30",children:[o.jsx("td",{className:"px-3 py-2 text-xs text-gray-600 dark:text-gray-400 whitespace-nowrap",children:l(b.createdAt)}),o.jsx("td",{className:"px-3 py-2",children:o.jsx("span",{className:`text-xs font-medium ${m(b.type)}`,children:f(b.type)})}),o.jsxs("td",{className:`px-3 py-2 text-right text-xs font-bold ${b.type==="ORDER_PAYMENT"?"text-red-600":"text-green-600"}`,children:[b.type==="ORDER_PAYMENT"?"-":"+",parseFloat(b.amount).toFixed(2)," zł"]}),o.jsxs("td",{className:"px-3 py-2 text-right text-xs text-gray-500",children:[parseFloat(b.balanceBefore).toFixed(2)," ","zł"]}),o.jsxs("td",{className:"px-3 py-2 text-right text-xs text-gray-500",children:[parseFloat(b.balanceAfter).toFixed(2)," ","zł"]}),o.jsx("td",{className:"px-3 py-2 text-xs text-gray-600 dark:text-gray-400 max-w-[200px] truncate",children:b.description||"—"})]},b.id))})]})})]}):o.jsxs("div",{className:"text-center py-8 text-gray-500 dark:text-gray-400",children:[o.jsx(yv,{className:"w-8 h-8 mx-auto mb-2 opacity-30"}),"Brak transakcji"]})})]})]})})})})})]})},nn=({label:t,value:e,icon:r,mono:n,highlight:s})=>o.jsxs("div",{className:"bg-white dark:bg-gray-800 rounded-lg border border-gray-200 dark:border-gray-700 p-3",children:[o.jsxs("div",{className:"flex items-center gap-1.5 mb-1",children:[r&&o.jsx("span",{className:"text-gray-400 dark:text-gray-500",children:r}),o.jsx("span",{className:"text-xs text-gray-500 dark:text-gray-400 font-medium",children:t})]}
1011),o.jsx("p",{className:`text-sm ${s?"text-purple-600 dark:text-purple-400 font-bold":"text-gray-900 dark:text-white font-medium"} ${n?"font-mono text-xs break-all":""}`,children:e})]}),m1e=()=>{const{id:t}=lf(),e=Vr(),{data:r,isLoading:n}=mt({queryKey:["admin-order",t],queryFn:async()=>(await xe.get(`/admin/orders/${t}`)).data,refetchInterval:s=>{const i=s.state.data;return(i==null?void 0:i.status)==="IN_PROGRESS"?5e3:!1}});return n?o.jsx(Mn,{children:o.jsx("div",{className:"flex items-center justify-center h-64",children:"Ładowanie..."})}):r?o.jsx(Mn,{children:o.jsxs("div",{className:"max-w-7xl mx-auto",children:[o.jsxs("button",{onClick:()=>e("/admin/orders"),className:"flex items-center gap-2 text-purple-600 hover:underline mb-4",children:[o.jsx(ma,{className:"w-4 h-4"}),"Powrót do zamówień"]}),o.jsxs("div",{className:"mb-6",children:[o.jsx("h1",{className:"text-3xl font-bold text-gray-900 dark:text-white mb-2",children:r.orderNumber}),o.jsxs("p",{className:"text-gray-600 dark:text-gray-400",children:["Użytkownik: ",r.user.email]}),o.jsxs("p",{className:"text-gray-600 dark:text-gray-400",children:["Data: ",new Date(r.createdAt).toLocaleDateString("pl-PL")]})]}),o.jsxs("div",{className:"space-y-4",children:[o.jsxs("h2",{className:"text-2xl font-bold mb-4",children:["Teksty (",r.texts.length,")"]}),r.texts.map((s,i)=>o.jsxs(ue.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:i*.1},className:"bg-white dark:bg-gray-800 rounded-lg p-6 border border-gray-200 dark:border-gray-700",children:[o.jsxs("div",{className:"flex items-start justify-between mb-4",children:[o.jsxs("div",{className:"flex-1",children:[o.jsxs("div",{className:"flex items-center gap-3 mb-2",children:[o.jsx("span",{className:"w-8 h-8 bg-purple-600 text-white rounded-full flex items-center justify-center text-sm font-bold",children:i+1}),o.jsx("h3",{className:"text-xl font-bold",children:s.topic})]}),o.jsxs("div",{className:"flex flex-wrap gap-4 text-sm text-gray-600 dark:text-gray-400 ml-11",children:[o.jsxs("span",{children:["📄 ",s.pages," stron"]}),o.jsxs("span",{children:["✍️ ",s.length.toLocaleString()," znaków"]}),o.jsxs("span",{children:["🌍 ",s.language.toUpperCase()]}),o.jsxs("span",{children:["📝 ",s.textType]})]})]}),o.jsxs("button",{onClick:()=>e(`/admin/texts/${s.id}`),className:"btn btn-primary flex items-center gap-2 text-sm",children:[o.jsx(Jt,{className:"w-4 h-4"}),"Szczegóły"]})]}),s.progress&&s.progress!=="completed"&&o.jsx(qy,{progress:s.progress,textLength:s.length,startTime:s.startTime})]},s.id))]})]})}):o.jsx(Mn,{children:o.jsxs("div",{className:"text-center",children:[o.jsx("h2",{className:"text-2xl font-bold mb-4",children:"Zamówienie nie znalezione"}),o.jsx("button",{onClick:()=>e("/admin/orders"),className:"btn btn-primary",children:"Wróć do zamówień"})]})})},Lm=({title:t,prompt:e,response:r,defaultExpanded:n=!1})=>{const[s,i]=M.useState(n);return!e&&!r?null:o.jsxs("div",{className:"bg-gray-50 dark:bg-gray-900 rounded-lg border border-gray-200 dark:border-gray-700 overflow-hidden",children:[o.jsxs("button",{onClick:()=>i(!s),className:"w-full px-4 py-3 flex items-center justify-between hover:bg-gray-100 dark:hover:bg-gray-800 transition-colors",children:[o.jsx("h4",{className:"font-semibold text-gray-900 dark:text-white",children:t}),s?o.jsx(Cy,{className:"w-5 h-5 text-gray-600 dark:text-gray-400"}):o.jsx(Ti,{className:"w-5 h-5 text-gray-600 dark:text-gray-400"})]}),o.jsx(jt,{children:s&&o.jsxs(ue.div,{initial:{height:0,opacity:0},animate:{height:"auto",opacity:1},exit:{height:0,opacity:0},className:"border-t border-gray-200 dark:border-gray-700",children:[e&&o.jsxs("div",{className:"p-4 border-b border-gray-200 dark:border-gray-700",children:[o.jsx("h5",{className:"text-sm font-semibold text-purple-600 dark:text-purple-400 mb-2",children:"📤 Prompt:"}),o.jsx("pre",{className:"text-xs bg-white dark:bg-gray-800 p-3 rounded border border-gray-200 dark:border-gray-700 overflow-x-auto whitespace-pre-wrap text-gray-900 dark:text-gray-300",children:e})]}),r&&o.jsxs("div",{className:"p-4",children:[o.jsx("h5",{className:"text-sm font-semibold text-green-600 dark:text-green-400 mb-2",children:"📥 Odpowiedź:"}),o.jsx("pre",{className:"text-xs bg-white dark:bg-gray-800 p-3 rounded border border-gray-200 dark:border-gray-700 overflow-x-auto whitespace-pre-wrap text-gray-900 dark:text-gray-300",children:r})]})]})})]})},g1e=()=>{const{id:t}=lf(),e=Vr(),r=Zs(),[n,s]=M.useState(!1),[i,a]=M.useState("content"),{data:l,isLoading:c}=mt({queryKey:["admin-text",t],queryFn:async()=>(await xe.get(`/admin/texts/${t}/details`)).data,refetchInterval:g=>{const x=g.state.data;return x!=null&&x.progress&&x.progress!=="completed"?5e3:!1}}),u=l!=null&&l.content?JSON.parse(l.content):null,d=(u==null?void 0:u.generatedContent)||"",h=l!=null&&l.writerPrompts?JSON.parse(l.writerPrompts):[],p=l!=null&&l.writerResponses?JSON.parse(l.writerResponses):[],f=sM({extensions:[zM],content:d,editorProps:{attributes:{class:"prose prose-sm dark:prose-invert max-w-none focus:outline-none min-h-[400px] p-4"}}}),m=Be({mutationFn:async g=>{await xe.patch(`/admin/texts/${t}/content`,{htmlContent:g})},onSuccess:()=>{le.success("Treść zapisana!"),r.invalidateQueries({queryKey:["admin-text",t]}),s(!1)},onError:()=>{le.error("Błąd zapisu treści")}}),y=()=>
1011{if(f){const g=f.getHTML();m.mutate(g)}},k=()=>{f&&f.commands.setContent(d),s(!1)};return c?o.jsx(Mn,{children:o.jsx("div",{className:"flex items-center justify-center h-64",children:"Ładowanie..."})}):l?o.jsx(Mn,{children:o.jsxs("div",{className:"max-w-7xl mx-auto",children:[o.jsxs("button",{onClick:()=>e(`/admin/orders/${l.order.id}`),className:"flex items-center gap-2 text-purple-600 hover:underline mb-4",children:[o.jsx(ma,{className:"w-4 h-4"}),"Powrót do zamówienia"]}),o.jsxs("div",{className:"mb-6",children:[o.jsx("h1",{className:"text-3xl font-bold text-gray-900 dark:text-white mb-2",children:l.topic}),o.jsxs("div",{className:"flex flex-wrap gap-4 text-sm text-gray-600 dark:text-gray-400",children:[o.jsxs("span",{children:["📄 ",l.pages," stron"]}),o.jsxs("span",{children:["✍️ ",l.length.toLocaleString()," znaków"]}),o.jsxs("span",{children:["🌍 ",l.language.toUpperCase()]}),o.jsxs("span",{children:["📝 ",l.textType]})]}),o.jsxs("p",{className:"text-gray-600 dark:text-gray-400 mt-2",children:["Zamówienie: ",l.order.orderNumber," • Użytkownik:"," ",l.order.user.email]})]}),l.progress&&l.progress!=="completed"&&o.jsx("div",{className:"mb-6",children:o.jsx(qy,{progress:l.progress,textLength:l.length,startTime:l.startTime})}),o.jsx("div",{className:"mb-6 border-b border-gray-200 dark:border-gray-700",children:o.jsxs("nav",{className:"flex gap-4",children:[o.jsx("button",{onClick:()=>a("content"),className:`px-4 py-2 border-b-2 font-medium transition-colors ${i==="content"?"border-purple-600 text-purple-600 dark:text-purple-400":"border-transparent text-gray-600 dark:text-gray-400 hover:text-gray-900 dark:hover:text-white"}`,children:"Treść"}),o.jsx("button",{onClick:()=>a("prompts"),className:`px-4 py-2 border-b-2 font-medium transition-colors ${i==="prompts"?"border-purple-600 text-purple-600 dark:text-purple-400":"border-transparent text-gray-600 dark:text-gray-400 hover:text-gray-900 dark:hover:text-white"}`,children:"Prompty i odpowiedzi"}),o.jsx("button",{onClick:()=>a("sources"),className:`px-4 py-2 border-b-2 font-medium transition-colors ${i==="sources"?"border-purple-600 text-purple-600 dark:text-purple-400":"border-transparent text-gray-600 dark:text-gray-400 hover:text-gray-900 dark:hover:text-white"}`,children:"Źródła"})]})}),i==="content"&&o.jsxs("div",{className:"bg-white dark:bg-gray-800 rounded-lg border border-gray-200 dark:border-gray-700 p-6",children:[!d&&l.progress!=="completed"&&o.jsx("div",{className:"text-center py-8 text-gray-600 dark:text-gray-400",children:"Treść jest w trakcie generowania..."}),!d&&l.progress==="completed"&&o.jsx("div",{className:"text-center py-8 text-gray-600 dark:text-gray-400",children:"Brak wygenerowanej treści"}),d&&!n&&o.jsxs("div",{children:[o.jsx("div",{className:"flex justify-end mb-4",children:o.jsxs("button",{onClick:()=>s(!0),className:"btn btn-primary flex items-center gap-2",children:[o.jsx(Ro,{className:"w-4 h-4"}),"Edytuj treść"]})}),o.jsx("div",{className:"prose prose-sm dark:prose-invert max-w-none",dangerouslySetInnerHTML:{__html:d}})]}),d&&n&&f&&o.jsxs("div",{children:[o.jsxs("div",{className:"border-2 border-purple-500 dark:border-purple-600 rounded-lg overflow-hidden mb-4",children:[o.jsxs("div",{className:"bg-gray-100 dark:bg-gray-800 border-b border-gray-300 dark:border-gray-700 p-2 flex gap-2 flex-wrap",children:[o.jsx("button",{onClick:()=>f.chain().focus().toggleBold().run(),className:`px-3 py-1 rounded text-sm ${f.isActive("bold")?"bg-purple-600 text-white":"bg-white dark:bg-gray-700 text-gray-700 dark:text-gray-300"}`,children:o.jsx("strong",{children:"B"})}),o.jsx("button",{onClick:()=>f.chain().focus().toggleItalic().run(),className:`px-3 py-1 rounded text-sm ${f.isActive("italic")?"bg-purple-600 text-white":"bg-white dark:bg-gray-700 text-gray-700 dark:text-gray-300"}`,children:o.jsx("em",{children:"I"})}),o.jsx("button",{onClick:()=>f.chain().focus().toggleHeading({level:2}).run(),className:`px-3 py-1 rounded text-sm ${f.isActive("heading",{level:2})?"bg-purple-600 text-white":"bg-white dark:bg-gray-700 text-gray-700 dark:text-gray-300"}`,children:"H2"}),o.jsx("button",{onClick:()=>f.chain().focus().toggleHeading({level:3}).run(),className:`px-3 py-1 rounded text-sm ${f.isActive("heading",{level:3})?"bg-purple-600 text-white":"bg-white dark:bg-gray-700 text-gray-700 dark:text-gray-300"}`,children:"H3"}),o.jsx("button",{onClick:()=>f.chain().focus().toggleBulletList().run(),className:`px-3 py-1 rounded text-sm ${f.isActive("bulletList")?"bg-purple-600 text-white":"bg-white dark:bg-gray-700 text-gray-700 dark:text-gray-300"}`,children:"Lista"}),o.jsx("button",{onClick:()=>f.chain().focus().toggleOrderedList().run(),className:`px-3 py-1 rounded text-sm ${f.isActive("orderedList")?"bg-purple-600 text-white":"bg-white dark:bg-gray-700 text-gray-700 dark:text-gray-300"}`,children:"1. Lista"})]}),o.jsx("div",{className:"bg-white dark:bg-gray-900 max-h-[600px] overflow-y-auto",children:o.jsx(rM,{editor:f})})]}),o.jsxs("div",{className:"flex gap-2",children:[o.jsxs("button",{onClick:y,disabled:m.isPending,className:"btn btn-primary flex items-center gap-2",children:[o.jsx(rS,{className:"w-4 h-4"}),m.isPending?"Zapisywanie...":"Zapisz"]}),o.jsxs("button",{onClick:k,className:"btn btn-secondary flex items-center gap-2",children:[o.jsx(yt,{className:"w-4 h-4"}),"Anuluj"]})]})]})]}),i==="prompts"&&o.jsxs("div",{className:"space-y-4",children:[o.jsx("h2",{className:"text-2xl font-bold text-gray-900 dark:text-white mb-4",children:"Prompty i odpowiedzi Claude"}),o.jsx(Lm,{title:"1️⃣ Generowanie zapytania Google",prompt:l.queryPrompt,response:l.queryResponse,defaultExpanded:!0}),o.jsx(Lm,{title:"2️⃣ Wybór najlepszych źródeł",prompt:l.selectPrompt,response:l.selectResponse}),l.structurePrompt&&o.jsx(Lm,{title:"3️⃣ Tworzenie struktury tekstu (Kierownik)",prompt:l.structurePrompt,response:l.structureResponse}),h.length>0&&o.jsxs("div",{className:"space-y-4",children:[o.jsx("h3",{className:"text-xl font-bold text-gray-900 dark:text-white",children:"Pisarze (generowanie treści):"}),h.map((g,x)=>o.jsx(Lm,{title:`${l.structurePrompt?"4️⃣":"3️⃣"} Pisarz ${x+1}${h.length>1?` / ${h.length}`:""}`,prompt:g,response:p[x]},x))]}),!l.queryPrompt&&!l.selectPrompt&&!l.structurePrompt&&h.length===0&&o.jsx("div",{className:"text-center py-8 text-gray-600 dark:text-gray-400",children:"Brak zapisanych promptów (tekst nie został 
1011jeszcze wygenerowany)"})]}),i==="sources"&&o.jsxs("div",{className:"space-y-4",children:[o.jsx("h2",{className:"text-2xl font-bold text-gray-900 dark:text-white mb-4",children:"Źródła wykorzystane do generowania"}),(u==null?void 0:u.googleQuery)&&o.jsxs("div",{className:"bg-blue-50 dark:bg-blue-900/20 rounded-lg p-4 border border-blue-200 dark:border-blue-800",children:[o.jsx("h3",{className:"font-semibold text-blue-900 dark:text-blue-300 mb-2",children:"🔍 Zapytanie Google:"}),o.jsx("p",{className:"text-blue-800 dark:text-blue-200 font-mono",children:u.googleQuery})]}),(u==null?void 0:u.selectedSources)&&u.selectedSources.length>0&&o.jsxs("div",{children:[o.jsxs("h3",{className:"font-semibold text-gray-900 dark:text-white mb-3",children:["✅ Wybrane źródła (",u.selectedSources.length,"):"]}),o.jsx("div",{className:"space-y-2",children:u.selectedSources.map((g,x)=>o.jsxs("div",{className:"bg-green-50 dark:bg-green-900/20 rounded-lg p-4 border border-green-200 dark:border-green-800",children:[o.jsxs("div",{className:"font-semibold text-green-900 dark:text-green-300 mb-1",children:[x+1,". ",g.title]}),o.jsx("a",{href:g.link,target:"_blank",rel:"noopener noreferrer",className:"text-sm text-green-700 dark:text-green-400 hover:underline break-all",children:g.link})]},x))})]}),(u==null?void 0:u.scrapedContent)&&u.scrapedContent.length>0&&o.jsxs("div",{children:[o.jsx("h3",{className:"font-semibold text-gray-900 dark:text-white mb-3",children:"📄 Zescrapowana treść:"}),o.jsx("div",{className:"space-y-2",children:u.scrapedContent.map((g,x)=>o.jsxs("details",{className:"bg-gray-50 dark:bg-gray-900 rounded-lg border border-gray-200 dark:border-gray-700",children:[o.jsxs("summary",{className:"px-4 py-3 cursor-pointer hover:bg-gray-100 dark:hover:bg-gray-800 transition-colors",children:[o.jsxs("span",{className:"font-semibold",children:[x+1,". ",g.url]}),o.jsxs("span",{className:"ml-2 text-sm text-gray-600 dark:text-gray-400",children:["(",g.length.toLocaleString()," znaków)"]})]}),o.jsx("div",{className:"p-4 border-t border-gray-200 dark:border-gray-700",children:o.jsxs("pre",{className:"text-xs bg-white dark:bg-gray-800 p-3 rounded overflow-x-auto whitespace-pre-wrap text-gray-900 dark:text-gray-300",children:[g.text.substring(0,2e3),g.text.length>2e3&&"..."]})})]},x))})]}),!u&&o.jsx("div",{className:"text-center py-8 text-gray-600 dark:text-gray-400",children:"Brak danych o źródłach (tekst nie został jeszcze wygenerowany)"})]})]})}):o.jsx(Mn,{children:o.jsxs("div",{className:"text-center",children:[o.jsx("h2",{className:"text-2xl font-bold mb-4",children:"Tekst nie znaleziony"}),o.jsx("button",{onClick:()=>e("/admin/orders"),className:"btn btn-primary",children:"Wróć do zamówień"})]})})},y1e=({texts:t,orderId:e,onNavigate:r})=>{const[n,s]=M.useState(!1);if(!t||t.length===0)return o.jsx("span",{children:"Brak tekstów"});const i=t[0].topic,a=i.split(" "),l=a.length<=5?i:a.slice(0,5).join(" "),c=a.length>5;return o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsxs("button",{onClick:()=>r(e),className:"font-medium hover:text-purple-600 text-left",children:[n?i:l,!n&&c&&"..."]}),c&&o.jsx("button",{onClick:u=>{u.stopPropagation(),s(!n)},className:"text-purple-600 hover:text-purple-700 text-xs",children:n?o.jsx(Cy,{className:"w-3 h-3"}):o.jsx(Ti,{className:"w-3 h-3"})})]})},x1e=()=>{const t=Zs(),e=Vr(),[r,n]=M.useState(null),{data:s,isLoading:i}=mt({queryKey:["admin-orders"],queryFn:async()=>(await xe.get("/admin/orders")).data}),a=Be({mutationFn:async({id:c,status:u,notes:d})=>{await xe.patch(`/admin/orders/${c}`,{status:u,notes:d})},onSuccess:()=>{t.invalidateQueries({queryKey:["admin-orders"]}),le.success("Zamówienie zaktualizowane"),n(null)}}),l=Be({mutationFn:async c=>{await xe.delete(`/admin/orders/${c}`)},onSuccess:()=>{t.invalidateQueries({queryKey:["admin-orders"]}),le.success("Zamówienie usunięte")}});return i?o.jsx(Mn,{children:o.jsx("div",{className:"flex items-center justify-center h-64",children:"Loading..."})}):o.jsxs(Mn,{children:[o.jsx("h1",{className:"text-3xl font-bold mb-8",children:"Zamówienia"}),o.jsx("div",{className:"bg-white dark:bg-gray-800 rounded-lg shadow border overflow-hidden",children:o.jsxs("table",{className:"w-full",children:[o.jsx("thead",{className:"bg-gray-50 dark:bg-gray-700",children:o.jsxs("tr",{children:[o.jsx("th",{className:"px-6 py-3 text-left text-sm font-semibold text-gray-900 dark:text-white",children:"Numer"}),o.jsx("th",{className:"px-6 py-3 text-left text-sm font-semibold text-gray-900 dark:text-white",children:"Tytuł"}),o.jsx("th",{className:"px-6 py-3 text-left text-sm font-semibold text-gray-900 dark:text-white",children:"Użytkownik"}),o.jsx("th",{className:"px-6 py-3 text-left text-sm font-semibold text-gray-900 dark:text-white",children:"Status"}),o.jsx("th",{className:"px-6 py-3 text-left text-sm font-semibold text-gray-900 dark:text-white",children:"Teksty"}),o.jsx("th",{className:"px-6 py-3 text-left text-sm font-semibold text-gray-900 dark:text-white",children:"Cena"}),o.jsx("th",{className:"px-6 py-3 text-left text-sm font-semibold text-gray-900 dark:text-white",children:"Data"}),o.jsx("th",{className:"px-6 py-3 text-left text-sm font-semibold text-gray-900 dark:text-white",children:"Akcje"})]})}),o.jsx("tbody",{className:"divide-y divide-gray-200 dark:divide-gray-700",children:s==null?void 0:s.map(c=>o.jsxs("tr",{className:"hover:bg-gray-50 dark:hover:bg-gray-700",children:[o.jsx("td",{className:"px-6 py-4 text-sm font-semibold text-gray-900 dark:text-white",children:c.orderNumber}),o.jsx("td",{className:"px-6 py-4 text-sm text-gray-900 dark:text-white",children:o.jsx(y1e,{texts:c.texts,orderId:c.id,onNavigate:u=>e(`/admin/orders/${u}`)})}),o.jsx("td",{className:"px-6 py-4 text-sm text-gray-900 dark:text-white",children:c.user.email}),o.jsx("td",{className:"px-6 py-4 text-sm",children:o.jsx("span",{className:`px-2 py-1 rounded-full text-xs font-medium ${c.status==="COMPLETED"?"bg-green-100 text-green-700":c.status==="IN_PROGRESS"?"bg-blue-100 text-blue-700":c.status==="PENDING"?"bg-yellow-100 text-yellow-700":"bg-red-100 text-red-700"}`,children:c.status})}),o.jsx("td",{className:"px-6 py-4 text-sm text-gray-900 dark:text-white",children:c.texts.length}),o.jsxs("td",{className:"px-6 py-4 text-sm font-bold text-purple-600",children:[parseFloat(c.totalPrice).toFixed(2)," zł"]}),o.jsx("td",{className:"px-6 py-4 text-sm text-gray-900 dark:text-white",children:new Date(c.createdAt).toLocaleDateString("pl-PL")}),o.jsx("td",{className:"px-6 py-4 text-sm",children:o.jsxs("div",{className:"flex gap-2",children:[o.jsx("button",{onClick:()=>e(`/admin/orders/${c.id}`),className:"text-blue-600 hover:underline",title:"Zobacz szczegóły",children:o.jsx(Ks,{className:"w-4 h-4"})}),o.jsx("button",{onClick:u=>{u.stopPropagation(),n(c)},className:"text-purple-600 hover:underline",title:"Edytuj",children:o.jsx(Ro,{className:"w-4 h-4"})}),o.jsx("button",{onClick:u=>{u.stopPropagation(),confirm(`Usunąć zamówienie ${c.orderNumber}? ${c.status!=="PENDING"?"Środki zostaną zwrócone użytkownikowi.":""}`)&&l.mutate(c.id)},className:"text-red-600 hover:underline",title:"Usuń",children:o.jsx(Cr,{className:"w-4 h-4"})})]})})]},c.id))})]})}),r&&o.jsx("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-50",onClick:()=>n(null),children:o.jsxs("div",{className:"bg-white dark:bg-gray-800 p-6 rounded-lg max-w-md w-full",onClick:c=>c.stopPropagation(),children:[o.jsxs("h3",{className:"text-xl font-bold mb-4 text-gray-900 dark:text-white",children:["Edytuj ",r.orderNumber]}),o.jsx("label",{className:"block mb-2 font-semibold text-gray-900 dark:text-white",children:"Status:"}),o.jsxs("select",{value:r.status,onChange:c=>n({...r,status:c.target.value}),className:"input w-full mb-4",children:[o.jsx("option",{value:"PENDING",children:"PENDING"}),o.jsx("option",{value:"IN_PROGRESS",children:"IN_PROGRESS"}),o.jsx("option",{value:"COMPLETED",children:"COMPLETED"}),o.jsx("option",{value:"CANCELLED",children:"CANCELLED"})]}),o.jsx("label",{className:"block mb-2 font-semibold text-gray-900 dark:text-white",children:"Notatki:"}),o.jsx("textarea",{value:r.notes||"",onChange:c=>n({...r,notes:c.target.value}),className:"input w-full mb-4",rows:3}),o.jsxs("div",{className:"flex gap-3",children:[o.jsx("button",{onClick:()=>a.mutate({id:r.id,status:r.status,notes:r.notes}),className:"btn btn-primary flex-1",children:"Zapisz"}),o.jsx("button",{onClick:()=>n(null),className:"btn btn-secondary flex-1",children:"Anuluj"})]})]})})]})},w1e=[Jj,_i,Jt,Gs,LV,Ty],b1e=[Jt,_d,Ny,zp,ga,JI],k1e=[IV,Ju,zy,Ap],v1e=()=>{const{t,i18n:e}=He("home"),{formatPrice:r,currency:n}=bn(),s=e.language==="pl",i=s?"https://www.smart-copy.ai":"https://en.smart-copy.ai",a=r(Zt.PER_1000_CHARS),l=r(Zt.ONE_PAGE),c=r(Zt.TEN_PAGES),u=r(Zt.FIFTY_PAGES),d=r(Zt.CASE_STUDY_COST),h=`${r(Zt.COPYWRITER_MIN)}-${r(Zt.COPYWRITER_MAX)}`,p=r(Zt.MIN_TOP_UP),f="https://www.torweb.pl/blog/automatyzacja-procesow-w-malej-firmie/",m=t("stats.items",{returnObjects:!0}),y=t("howItWorks.steps",{returnObjects:!0}),k=t("features.items",{returnObjects:!0}),g=t("useCases.items",{returnObjects:!0}),x=t("faq.items",{returnObjects:!0}),w=t("distinctions.items",{returnObjects:!0}),b=[{aspect:t("comparison.rows.time.aspect"),traditional:t("comparison.rows.time.traditional"),ai:t("comparison.rows.time.ai")},{aspect:t("comparison.rows.research.aspect"),traditional:t("comparison.rows.research.traditional"),ai:t("comparison.rows.research.ai")},{aspect:t("comparison.rows.cost.aspect"),traditional:h,ai:`~${c}`},{aspect:t("comparison.rows.multilingual.aspect"),traditional:t("comparison.rows.multilingual.traditional"),ai:t("comparison.rows.multilingual.ai")},{aspect:t("comparison.rows.availability.aspect"),traditional:t("comparison.rows.availability.traditional"),ai:t("comparison.rows.availability.ai")}],v=[{price:`~${l}`,description:t("pricing.examples.onePage")},{price:`~${c}`,description:t("pricing.examples.tenPages")}
1011,{price:`~${u}`,description:t("pricing.examples.fiftyPages")}],A=x.map((C,_)=>_===4?{...C,answer:t("faq.items.4.answer",{pricePerThousand:a,priceOnePage:l,priceTenPages:c})}:C);return o.jsxs(o.Fragment,{children:[o.jsxs(Ys,{children:[o.jsx("title",{children:t("meta.title")}),o.jsx("meta",{name:"description",content:t("meta.description",{price:a})}),o.jsx("meta",{name:"keywords",content:t("meta.keywords")}),o.jsx("link",{rel:"canonical",href:i}),o.jsx("meta",{property:"og:title",content:t("meta.ogTitle")}),o.jsx("meta",{property:"og:description",content:t("meta.ogDescription")}),o.jsx("meta",{property:"og:type",content:"website"}),o.jsx("meta",{property:"og:url",content:i}),o.jsx("meta",{name:"robots",content:"index, follow, max-image-preview:large, max-snippet:-1, max-video-preview:-1"}),o.jsx("meta",{name:"googlebot",content:"index, follow"}),o.jsx("meta",{name:"twitter:card",content:"summary_large_image"}),o.jsx("meta",{name:"twitter:title",content:t("meta.twitterTitle")}),o.jsx("meta",{name:"twitter:description",content:t("meta.twitterDescription")}),o.jsx("meta",{name:"twitter:image",content:`${i}/og-image.png`}),o.jsx("meta",{property:"og:image",content:`${i}/og-image.png`}),o.jsx("meta",{property:"og:image:width",content:"1200"}),o.jsx("meta",{property:"og:image:height",content:"630"}),o.jsx("meta",{property:"og:locale",content:s?"pl_PL":"en_US"}),o.jsx("meta",{property:"og:site_name",content:"Smart-Copy.ai"}),o.jsx("link",{rel:"sitemap",type:"application/xml",href:`${i}/sitemap.xml`}),o.jsx("link",{rel:"alternate",hrefLang:"pl",href:"https://www.smart-copy.ai"}),o.jsx("link",{rel:"alternate",hrefLang:"en",href:"https://en.smart-copy.ai"}),o.jsx("link",{rel:"alternate",hrefLang:"x-default",href:"https://www.smart-copy.ai"})]}),o.jsx(rQ,{}),o.jsx(nQ,{}),o.jsx(iQ,{}),o.jsx(sQ,{faqs:A}),o.jsxs(xs,{children:[o.jsxs("section",{className:"relative min-h-[95vh] flex items-center justify-center bg-gradient-to-br from-purple-50 via-white to-indigo-50 dark:from-gray-900 dark:via-gray-800 dark:to-gray-900 overflow-hidden",children:[o.jsxs("div",{className:"absolute inset-0",children:[o.jsx("div",{className:"absolute inset-0 bg-grid-pattern opacity-5"}),o.jsx(ue.div,{animate:{scale:[1,1.2,1],rotate:[0,90,0]},transition:{duration:20,repeat:1/0,ease:"linear"},className:"absolute -top-1/2 -right-1/2 w-full h-full bg-gradient-to-br from-purple-500/10 to-indigo-500/10 rounded-full blur-3xl"})]}),o.jsx("div",{className:"container-custom py-20 relative z-10",children:o.jsxs(ue.div,{initial:{opacity:0,y:30},animate:{opacity:1,y:0},transition:{duration:.8},className:"text-center max-w-5xl mx-auto",children:[o.jsxs(ue.div,{initial:{opacity:0,scale:.9},animate:{opacity:1,scale:1},transition:{delay:.2},className:"inline-flex items-center gap-2 bg-gradient-to-r from-purple-100 to-indigo-100 dark:from-purple-900/30 dark:to-indigo-900/30 text-purple-700 dark:text-purple-300 px-6 py-3 rounded-full mb-8 border border-purple-200 dark:border-purple-800",children:[o.jsx(dn,{className:"w-5 h-5"}),o.jsx("span",{className:"font-semibold",children:t("hero.badge")})]}),o.jsxs("h1",{className:"text-5xl md:text-7xl lg:text-8xl font-bold text-gray-900 dark:text-white mb-6 leading-tight",children:[t("hero.titleLine1"),o.jsx("br",{}),o.jsx("span",{className:"bg-gradient-to-r from-purple-600 via-indigo-600 to-blue-600 bg-clip-text text-transparent",children:t("hero.titleLine2")})]}),o.jsxs("p",{className:"text-xl md:text-2xl lg:text-3xl text-gray-600 dark:text-gray-300 mb-6 max-w-3xl mx-auto font-light",children:[o.jsx("strong",{className:"font-semibold text-gray-900 dark:text-white",children:t("hero.subtitleStrong")})," ",t("hero.subtitle",{price:a})]}),o.jsxs("div",{className:"flex flex-wrap justify-center gap-4 mb-10",children:[o.jsxs("div",{className:"flex items-center gap-2 bg-white dark:bg-gray-800 px-4 py-2 rounded-full shadow-sm",children:[o.jsx(Rt,{className:"w-5 h-5 text-green-500"}),o.jsx("span",{className:"text-gray-700 dark:text-gray-300 font-medium",children:t("hero.valueProps.speed")})]}),o.jsxs("div",{className:"flex items-center gap-2 bg-white dark:bg-gray-800 px-4 py-2 rounded-full shadow-sm",children:[o.jsx(Rt,{className:"w-5 h-5 text-green-500"}),o.jsx("span",{className:"text-gray-700 dark:text-gray-300 font-medium",children:t("hero.valueProps.original")})]}),o.jsxs("div",{className:"flex items-center gap-2 bg-white dark:bg-gray-800 px-4 py-2 rounded-full shadow-sm",children:[o.jsx(Rt,{className:"w-5 h-5 text-green-500"}),o.jsx("span",{className:"text-gray-700 dark:text-gray-300 font-medium",children:t("hero.valueProps.export")})]}),o.jsxs("div",{className:"flex items-center gap-2 bg-white dark:bg-gray-800 px-4 py-2 rounded-full shadow-sm",children:[o.jsx(Ro,{className:"w-5 h-5 text-green-500"}),o.jsx("span",{className:"text-gray-700 dark:text-gray-300 font-medium",children:t("hero.valueProps.editor")})]})]}),o.jsxs("div",{className:"flex flex-col sm:flex-row gap-4 justify-center mb-8",children:[o.jsxs(ze,{to:"/register",className:"group btn btn-primary text-lg px-10 py-5 shadow-2xl hover:shadow-
1011purple-500/50 transform hover:scale-105 transition-all relative overflow-hidden",children:[o.jsxs("span",{className:"relative z-10 flex items-center gap-2",children:[t("hero.cta.register"),o.jsx(Sr,{className:"w-5 h-5 group-hover:translate-x-1 transition-transform"})]}),o.jsx("div",{className:"absolute inset-0 bg-gradient-to-r from-purple-600 to-indigo-600 opacity-0 group-hover:opacity-100 transition-opacity"})]}),o.jsx("a",{href:"#jak-dziala",className:"btn btn-secondary text-lg px-10 py-5 border-2 hover:bg-gray-50 dark:hover:bg-gray-200 text-gray-700 dark:text-gray-700",children:t("hero.cta.seeHow")})]})]})})]}),o.jsx("section",{className:"py-16 bg-white dark:bg-gray-800 border-y border-gray-200 dark:border-gray-700",children:o.jsx("div",{className:"container-custom",children:o.jsx("div",{className:"grid grid-cols-2 lg:grid-cols-4 gap-8",children:m.map((C,_)=>o.jsxs(ue.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},transition:{duration:.5,delay:_*.1},viewport:{once:!0},className:"text-center",children:[o.jsx("div",{className:"text-4xl md:text-5xl font-bold bg-gradient-to-r from-purple-600 to-indigo-600 bg-clip-text text-transparent mb-2",children:C.value}),o.jsx("div",{className:"text-gray-600 dark:text-gray-400 font-medium",children:C.label})]},_))})})}),o.jsx("section",{id:"jak-dziala",className:"py-24 bg-gradient-to-br from-gray-50 to-white dark:from-gray-900 dark:to-gray-800",children:o.jsxs("div",{className:"container-custom",children:[o.jsxs(ue.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},transition:{duration:.6},viewport:{once:!0},className:"text-center mb-16",children:[o.jsxs("h2",{className:"text-4xl md:text-5xl font-bold text-gray-900 dark:text-white mb-4",children:[t("howItWorks.title")," ",o.jsx("span",{className:"text-purple-600",children:"Smart-Copy.ai"}),"?"]}),o.jsx("p",{className:"text-xl text-gray-600 dark:text-gray-300 max-w-3xl mx-auto",children:t("howItWorks.subtitle")})]}),o.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-8",children:y.map((C,_)=>o.jsxs(ue.div,{initial:{opacity:0,y:30},whileInView:{opacity:1,y:0},transition:{duration:.5,delay:_*.15},viewport:{once:!0},className:"relative",children:[_<y.length-1&&o.jsx("div",{className:"hidden lg:block absolute top-12 left-full w-full h-0.5 bg-gradient-to-r from-purple-300 to-transparent dark:from-purple-700 -ml-4"}),o.jsxs("div",{className:"card dark:bg-gray-800 dark:border-gray-700 hover:shadow-xl transition-all h-full relative overflow-hidden group",children:[o.jsx("div",{className:"absolute -top-4 -right-4 w-20 h-20 bg-gradient-to-br from-purple-600 to-indigo-600 rounded-full flex items-center justify-center transform group-hover:scale-110 transition-transform",children:o.jsx("span",{className:"text-2xl font-bold text-white",children:C.number})}),o.jsxs("div",{className:"relative z-10",children:[o.jsx("h3",{className:"text-xl font-bold text-gray-900 dark:text-white mb-3 pr-16",children:C.title}),o.jsx("p",{className:"text-gray-600 dark:text-gray-300 leading-relaxed",children:C.description})]})]})]},_))})]})}),o.jsx("section",{id:"features",className:"py-24 bg-white dark:bg-gray-800",children:o.jsxs("div",{className:"container-custom",children:[o.jsxs(ue.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},transition:{duration:.6},viewport:{once:!0},className:"text-center mb-16",children:[o.jsx("h2",{className:"text-4xl md:text-5xl font-bold text-gray-900 dark:text-white mb-4",children:t("features.title")}),o.jsx("p",{className:"text-xl text-gray-600 dark:text-gray-300 max-w-3xl mx-auto",children:t("features.subtitle")})]}),o.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-8",children:k.map((C,_)=>{const N=w1e[_];return o.jsxs(ue.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},transition:{duration:.5,delay:_*.1},viewport:{once:!0},className:"group card dark:bg-gray-700 dark:border-gray-600 hover:shadow-2xl hover:border-purple-500 dark:hover:border-purple-500 transition-all",children:[o.jsx("div",{className:"w-14 h-14 bg-gradient-to-br from-purple-600 to-indigo-600 rounded-2xl flex items-center justify-center mb-5 group-hover:scale-110 transition-transform",children:o.jsx(N,{className:"w-7 h-7 text-white"})}),o.jsx("h3",{className:"text-xl font-bold text-gray-900 dark:text-white mb-3",children:C.title}),o.jsx("p",{className:"text-gray-600 dark:text-gray-300 leading-relaxed",children:C.description})]},_)})})]})}),o.jsxs("section",{className:"py-24 bg-gradient-to-br from-purple-50 via-indigo-50 to-blue-50 dark:from-gray-900 dark:via-indigo-950 dark:to-purple-950 relative overflow-hidden",children:[o.jsxs("div",{className:"absolute inset-0 opacity-30",children:[o.jsx(ue.div,{animate:{scale:[1,1.3,1],rotate:[0,180,360]},transition:{duration:25,repeat:1/0,ease:"linear"},className:"absolute top-1/4 left-1/4 w-96 h-96 bg-purple-500 rounded-full blur-3xl"}),o.jsx(ue.div,{animate:{scale:[1,1.2,1],rotate:[360,180,0]},transition:{duration:30,repeat:1/0,ease:"linear"},className:"absolute bottom-1/4 right-1/4 w-96 h-96 bg-indigo-500 rounded-full blur-3xl"})]}),o.jsxs("div",{className:"container-custom relative z-10",children:[o.jsxs(ue.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},transition:{duration:.6},viewport:{once:!0},className:"text-center mb-20",children:[o.jsx("div",{className:"inline-block mb-6",children:o.jsxs("div",{className:"inline-flex items-center gap-2 bg-gradient-to-r from-purple-600 to-indigo-600 text-white px-6 py-3 rounded-full font-bold shadow-lg",children:[o.jsx(JI,{className:"w-5 h-5"}),t("distinctions.badge")]})}),o.jsxs("h2",{className:"text-4xl md:text-6xl font-bold text-gray-900 dark:text-white mb-6",children:[t("distinctions.title")," ",o.jsx("span",{className:"bg-gradient-to-r from-purple-600 via-indigo-600 to-blue-600 bg-clip-text text-transparent",children:"Smart-Copy.ai"}),"?"]}),o.jsx("p",{className:"text-xl text-gray-700 dark:text-gray-300 max-w-4xl mx-auto",children:t("distinctions.subtitle")})]}),o.jsx("div",{className:"space-y-12",children:w.map((C,_)=>{const N=k1e[_];let W=C.features;return _===2&&(W=[t("distinctions.items.2.features.0"),t("distinctions.items.2.features.1",{minTopUp:p}),t("distinctions.items.2.features.2"),t("distinctions.items.2.features.3",{pricePerThousand:a})]),o.jsx(ue.div,{initial:{opacity:0,y:40},whileInView:{opacity:1,y:0},transition:{duration:.7,delay:_*.2},viewport:{once:!0},className:"group",children:o.jsx("div",{className:"bg-white dark:bg-gray-800 rounded-3xl shadow-2xl overflow-hidden border-2 border-gray-200 dark:border-gray-700 hover:border-purple-500 dark:hover:border-purple-500 transition-all",children:o.jsxs("div",{className:"grid lg:grid-cols-2 gap-0",children:[o.jsxs("div",{className:"p-8 md:p-12 flex flex-col justify-center",children:[o.jsxs("div",{className:"flex items-center gap-4 mb-6",children:[o.jsx("div",{className:"w-16 h-16 bg-gradient-to-br from-purple-600 to-indigo-600 rounded-2xl flex items-center justify-center flex-shrink-0 group-hover:scale-110 transition-transform",children:o.jsx(N,{className:"w-8 h-8 text-white"})}),o.jsxs("div",{children:[o.jsx("h3",{className:"text-2xl md:text-3xl font-bold text-gray-900 dark:text-white",children:C.title}
1011),o.jsx("p",{className:"text-purple-600 dark:text-purple-400 font-semibold mt-1",children:C.subtitle})]})]}),o.jsx("p",{className:"text-lg text-gray-700 dark:text-gray-300 leading-relaxed mb-6",children:C.description}),C.comparison&&o.jsx("div",{className:"bg-gradient-to-br from-gray-50 to-gray-100 dark:from-gray-900 dark:to-gray-800 rounded-2xl p-6 mb-6",children:o.jsxs("div",{className:"grid grid-cols-2 gap-6",children:[o.jsxs("div",{children:[o.jsxs("div",{className:"flex items-center gap-2 mb-4",children:[o.jsx(yt,{className:"w-5 h-5 text-red-500"}),o.jsx("span",{className:"font-bold text-gray-900 dark:text-white",children:C.comparison.othersLabel})]}),o.jsx("ul",{className:"space-y-2",children:C.comparison.others.map((K,T)=>o.jsxs("li",{className:"flex items-start gap-2 text-sm text-gray-600 dark:text-gray-400",children:[o.jsx(yt,{className:"w-4 h-4 text-red-500 mt-0.5 flex-shrink-0"}),o.jsx("span",{children:K})]},T))})]}),o.jsxs("div",{children:[o.jsxs("div",{className:"flex items-center gap-2 mb-4",children:[o.jsx(On,{className:"w-5 h-5 text-green-500"}),o.jsx("span",{className:"font-bold text-gray-900 dark:text-white",children:C.comparison.usLabel})]}),o.jsx("ul",{className:"space-y-2",children:C.comparison.us.map((K,T)=>o.jsxs("li",{className:"flex items-start gap-2 text-sm text-gray-700 dark:text-gray-300 font-medium",children:[o.jsx(On,{className:"w-4 h-4 text-green-500 mt-0.5 flex-shrink-0"}),o.jsx("span",{children:K})]},T))})]})]})})]}),o.jsx("div",{className:"bg-gradient-to-br from-purple-600/10 to-indigo-600/10 dark:from-purple-900/20 dark:to-indigo-900/20 p-8 md:p-12 flex flex-col justify-center",children:C.isProcess?o.jsxs("div",{className:"space-y-6",children:[o.jsx("div",{className:"mb-4",children:o.jsx("div",{className:"inline-block bg-white dark:bg-gray-800 px-4 py-2 rounded-full",children:o.jsx("span",{className:"text-sm font-bold text-purple-600 dark:text-purple-400",children:C.processLabel})})}),C.features.map((K,T)=>o.jsxs(ue.div,{initial:{opacity:0,x:20},whileInView:{opacity:1,x:0},transition:{duration:.5,delay:T*.1},viewport:{once:!0},className:"flex items-start gap-4",children:[o.jsx("div",{className:"w-10 h-10 bg-gradient-to-br from-purple-600 to-indigo-600 rounded-full flex items-center justify-center flex-shrink-0 text-white font-bold shadow-lg",children:T+1}),o.jsx("div",{className:"flex-1",children:o.jsx("p",{className:"text-gray-800 dark:text-gray-200 font-medium leading-relaxed",children:K})})]},T))]}):o.jsx("ul",{className:"space-y-5",children:W.map((K,T)=>o.jsxs(ue.li,{initial:{opacity:0,x:20},whileInView:{opacity:1,x:0},transition:{duration:.5,delay:T*.1},viewport:{once:!0},className:"flex items-start gap-4 bg-white dark:bg-gray-800 p-4 rounded-xl shadow-md hover:shadow-lg transition-shadow",children:[o.jsx("div",{className:"w-6 h-6 bg-gradient-to-br from-green-500 to-emerald-500 rounded-full flex items-center justify-center flex-shrink-0 mt-0.5",children:o.jsx(On,{className:"w-4 h-4 text-white"})}),o.jsx("span",{className:"text-gray-700 dark:text-gray-300 font-medium leading-relaxed",children:K})]},T))})})]})})},_)})}),o.jsxs(ue.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},transition:{duration:.6,delay:.8},viewport:{once:!0},className:"text-center mt-16",children:[o.jsxs(ze,{to:"/register",className:"inline-flex items-center gap-3 bg-gradient-to-r from-purple-600 via-indigo-600 to-blue-600 text-white px-10 py-5 rounded-2xl font-bold text-lg shadow-2xl hover:shadow-purple-500/50 transform hover:scale-105 transition-all",children:[o.jsx(ga,{className:"w-6 h-6"}),t("distinctions.cta"),o.jsx(Sr,{className:"w-6 h-6"})]}),o.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400 mt-4",children:t("distinctions.ctaSubtext")})]})]})]}),o.jsx("section",{className:"py-24 bg-white dark:bg-gray-800",children:o.jsxs("div",{className:"container-custom",children:[o.jsxs(ue.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},transition:{duration:.6},viewport:{once:!0},className:"text-center mb-16",children:[o.jsx("h2",{className:"text-4xl md:text-5xl font-bold text-gray-900 dark:text-white mb-4",children:t("useCases.title")}),o.jsx("p",{className:"text-xl text-gray-600 dark:text-gray-300 max-w-3xl mx-auto",children:t("useCases.subtitle")})]}),o.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6",children:g.map((C,_)=>{const N=b1e[_];return o.jsx(ue.div,{initial:{opacity:0,scale:.95},whileInView:{opacity:1,scale:1},transition:{duration:.4,delay:_*.1},viewport:{once:!0},className:"group bg-white dark:bg-gray-700 rounded-2xl p-6 shadow-lg hover:shadow-2xl transition-all border border-gray-100 dark:border-gray-600 hover:border-purple-500 dark:hover:border-purple-500",children:o.jsxs("div",{className:"flex items-start gap-4",children:[o.jsx("div",{className:"w-12 h-12 bg-gradient-to-br from-purple-500 to-indigo-500 rounded-xl flex items-center justify-center flex-shrink-0 group-hover:scale-110 transition-transform",children:o.jsx(N,{className:"w-6 h-6 text-white"})}),o.jsxs("div",{children:[o.jsx("h3",{className:"text-lg font-bold text-gray-900 dark:text-white mb-2",children:C.title}),o.jsx("p",{className:"text-gray-600 dark:text-gray-300 text-sm",children:C.description})]})]})},_)})})]})}),o.jsx("section",{className:"py-24 bg-gradient-to-br from-gray-50 to-white dark:from-gray-900 dark:to-gray-800",children:o.jsxs("div",{className:"container-custom",children:[o.jsxs(ue.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},transition:{duration:.6},viewport:{once:!0},className:"text-center mb-16",children:[o.jsxs("h2",{className:"text-4xl md:text-5xl font-bold text-gray-900 dark:text-white mb-4",children:[t("comparison.title")," ",o.jsx("span",{className:"text-purple-600",children:t("comparison.titleHighlight")})]}),o.jsx("p",{className:"text-xl text-gray-600 dark:text-gray-300 max-w-3xl mx-auto",children:t("comparison.subtitle")})]}),o.jsx("div",{className:"max-w-5xl mx-auto",children:o.jsxs("div",{className:"bg-white dark:bg-gray-800 rounded-3xl shadow-2xl overflow-hidden border border-gray-200 dark:border-gray-700",children:[o.jsxs("div",{className:"grid grid-cols-3 gap-4 p-6 bg-gradient-to-r from-purple-600 to-indigo-600 text-white",children:[o.jsx("div",{className:"font-bold text-lg",children:t("comparison.headers.aspect")}),o.jsx("div",{className:"font-bold text-lg text-center",children:t("comparison.headers.traditional")}),o.jsx("div",{className:"font-bold text-lg text-center",children:t("comparison.headers.ai")})]}),b.map((C,_)=>o.jsxs(ue.div,{initial:{opacity:0,x:-20},whileInView:{opacity:1,x:0},transition:{duration:.4,delay:_*.1},viewport:{once:!0},className:`grid grid-cols-3 gap-4 p-6 ${_%2===0?"bg-gray-50 dark:bg-gray-900":"bg-white dark:bg-gray-800"}`,children:[o.jsx("div",{className:"font-semibold text-gray-900 dark:text-white",children:C.aspect}),o.jsx("div",{className:"text-center text-gray-600 dark:text-gray-400",children:C.traditional}),o.jsx("div",{className:"text-center font-bold text-green-600 dark:text-green-400",children:C.ai})]},_))]})})]})}),o.jsx("section",{className:"py-24 bg-white dark:bg-gray-800",children:o.jsxs("div",{className:"container-custom",children:[o.jsxs(ue.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},transition:{duration:.6},viewport:{once:!0},className:"text-center mb-16",children:[o.jsxs("div",{className:"inline-flex items-center gap-2 bg-green-100 dark:bg-green-900/30 text-green-700 dark:text-green-300 px-4 py-2 rounded-full text-sm font-semibold mb-4",children:[o.jsx(Tp,{className:"w-4 h-4"}),t("caseStudy.badge")]}),o.jsxs("h2",{className:"text-4xl md:text-5xl font-bold text-gray-900 dark:text-white mb-4",children:[t("caseStudy.title")," ",o.jsx("span",{className:"text-purple-600",children:t("caseStudy.titleTime")})," ",t("caseStudy.titleFor")," ",o.jsx("span",{className:"text-green-600",children:d})]}),o.jsx("p",{className:"text-xl text-gray-600 dark:text-gray-300 max-w-3xl mx-auto",children:t("caseStudy.subtitle")})]}),o.jsx("div",{className:"max-w-5xl mx-auto",children:o.jsxs(ue.div,{initial:{opacity:0,y:30},whileInView:{opacity:1,y:0},transition:{duration:.7},viewport:{once:!0},className:"bg-gradient-to-br from-gray-50 to-white dark:from-gray-900 dark:to-gray-800 rounded-3xl shadow-2xl overflow-hidden border border-gray-200 dark:border-gray-700",children:[o.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-4 p-6 bg-gradient-to-r from-purple-600 to-indigo-600",children:[o.jsxs("div",{className:"text-center",children:[o.jsx("div",{className:"text-3xl font-bold text-white",children:"5 min"}),o.jsx("div",{className:"text-purple-200 text-sm",children:t("caseStudy.stats.time")}
1011)]}),o.jsxs("div",{className:"text-center",children:[o.jsx("div",{className:"text-3xl font-bold text-white",children:d}),o.jsx("div",{className:"text-purple-200 text-sm",children:t("caseStudy.stats.cost")})]}),o.jsxs("div",{className:"text-center",children:[o.jsx("div",{className:"text-3xl font-bold text-white",children:"2800"}),o.jsx("div",{className:"text-purple-200 text-sm",children:t("caseStudy.stats.words")})]}),o.jsxs("div",{className:"text-center",children:[o.jsx("div",{className:"text-3xl font-bold text-white",children:"8/10"}),o.jsx("div",{className:"text-purple-200 text-sm",children:t("caseStudy.stats.quality")})]})]}),o.jsxs("div",{className:"p-8 md:p-12",children:[o.jsxs("div",{className:"mb-10",children:[o.jsxs("div",{className:"flex items-center gap-3 mb-4",children:[o.jsx("div",{className:"w-10 h-10 bg-purple-100 dark:bg-purple-900/30 rounded-lg flex items-center justify-center",children:o.jsx(Jt,{className:"w-5 h-5 text-purple-600"})}),o.jsxs("div",{children:[o.jsx("h3",{className:"font-bold text-gray-900 dark:text-white",children:t("caseStudy.article.label")}),o.jsx("p",{className:"text-sm text-gray-500",children:t("caseStudy.article.category")})]})]}),o.jsx("a",{href:f,target:"_blank",rel:"noopener noreferrer",className:"block group",children:o.jsxs("div",{className:"bg-white dark:bg-gray-800 border-2 border-gray-200 dark:border-gray-700 rounded-xl p-6 hover:border-purple-500 dark:hover:border-purple-500 transition-all hover:shadow-lg",children:[o.jsxs("div",{className:"flex items-start justify-between gap-4 mb-3",children:[o.jsx("h4",{className:"text-xl font-bold text-gray-900 dark:text-white group-hover:text-purple-600 transition-colors",children:t("caseStudy.article.title")}),o.jsx("div",{className:"flex-shrink-0 w-10 h-10 bg-purple-100 dark:bg-purple-900/30 rounded-full flex items-center justify-center group-hover:bg-purple-600 transition-colors",children:o.jsx(Sr,{className:"w-5 h-5 text-purple-600 group-hover:text-white transition-colors"})})]}),o.jsx("p",{className:"text-gray-600 dark:text-gray-400 mb-4",children:t("caseStudy.article.description")}),o.jsx("div",{className:"flex flex-wrap gap-2 mb-4",children:t("caseStudy.article.tags",{returnObjects:!0}).map((C,_)=>o.jsx("span",{className:`px-3 py-1 rounded-full text-xs font-medium ${_===0?"bg-purple-100 dark:bg-purple-900/30 text-purple-700 dark:text-purple-300":_===1?"bg-indigo-100 dark:bg-indigo-900/30 text-indigo-700 dark:text-indigo-300":_===2?"bg-blue-100 dark:bg-blue-900/30 text-blue-700 dark:text-blue-300":"bg-green-100 dark:bg-green-900/30 text-green-700 dark:text-green-300"}`,children:C},_))}),o.jsxs("div",{className:"flex items-center gap-2 text-purple-600 dark:text-purple-400 font-semibold",children:[o.jsx("span",{children:t("caseStudy.article.linkText")}),o.jsx(Sr,{className:"w-4 h-4 group-hover:translate-x-1 transition-transform"})]})]})})]}),o.jsxs("div",{className:"grid md:grid-cols-3 gap-6 mb-10",children:[o.jsxs("div",{className:"bg-red-50 dark:bg-red-900/10 border border-red-200 dark:border-red-800 rounded-xl p-6 text-center",children:[o.jsx(yt,{className:"w-8 h-8 text-red-500 mx-auto mb-3"}),o.jsx("h4",{className:"font-bold text-gray-900 dark:text-white mb-2",children:t("caseStudy.comparisonCards.copywriter.title")}),o.jsx("div",{className:"text-2xl font-bold text-red-600 mb-1",children:h}),o.jsx("div",{className:"text-sm text-gray-500",children:t("caseStudy.comparisonCards.copywriter.time")})]}),o.jsxs("div",{className:"bg-yellow-50 dark:bg-yellow-900/10 border border-yellow-200 dark:border-yellow-800 rounded-xl p-6 text-center",children:[o.jsx(qs,{className:"w-8 h-8 text-yellow-500 mx-auto mb-3"}),o.jsx("h4",{className:"font-bold text-gray-900 dark:text-white mb-2",children:t("caseStudy.comparisonCards.diy.title")}),o.jsx("div",{className:"text-2xl font-bold text-yellow-600 mb-1",children:n==="PLN"?"0 zł":"$0"}),o.jsx("div",{className:"text-sm text-gray-500",children:t("caseStudy.comparisonCards.diy.time")})]}),o.jsxs("div",{className:"bg-green-50 dark:bg-green-900/10 border-2 border-green-500 rounded-xl p-6 text-center relative",children:[o.jsx("div",{className:"absolute -top-3 left-1/2 transform -translate-x-1/2 bg-green-500 text-white px-3 py-1 rounded-full text-xs font-bold",children:t("caseStudy.comparisonCards.smartcopy.badge")}),o.jsx(Py,{className:"w-8 h-8 text-green-500 mx-auto mb-3"}),o.jsx("h4",{className:"font-bold text-gray-900 dark:text-white mb-2",children:"Smart-Copy.AI"}),o.jsxs("div",{className:"text-2xl font-bold text-green-600 mb-1",children:["~",d]}),o.jsx("div",{className:"text-sm text-gray-500",children:"5 min"})]})]})]})]})}),o.jsxs(ue.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},transition:{duration:.6,delay:.3},viewport:{once:!0},className:"text-center mt-12",children:[o.jsx("p",{className:"text-gray-600 dark:text-gray-400 mb-4",children:t("caseStudy.bottomCta.text")}),o.jsxs(ze,{to:"/register",className:"inline-flex items-center gap-2 bg-gradient-to-r from-purple-600 to-indigo-600 text-white px-8 py-4 rounded-xl font-bold text-lg shadow-xl hover:shadow-
1011purple-500/30 transform hover:scale-105 transition-all",children:[t("caseStudy.bottomCta.button"),o.jsx(Sr,{className:"w-5 h-5"})]})]})]})}),o.jsx("section",{id:"pricing",className:"py-24 bg-white dark:bg-gray-800",children:o.jsxs("div",{className:"container-custom",children:[o.jsxs(ue.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},transition:{duration:.6},viewport:{once:!0},className:"text-center mb-16",children:[o.jsx("h2",{className:"text-4xl md:text-5xl font-bold text-gray-900 dark:text-white mb-4",children:t("pricing.title")}),o.jsx("p",{className:"text-xl text-gray-600 dark:text-gray-300 max-w-3xl mx-auto",children:t("pricing.subtitle")})]}),o.jsx("div",{className:"max-w-4xl mx-auto",children:o.jsxs(ue.div,{initial:{opacity:0,scale:.95},whileInView:{opacity:1,scale:1},transition:{duration:.6},viewport:{once:!0},className:"bg-white dark:bg-gray-700 rounded-3xl shadow-2xl p-8 md:p-12 border-2 border-purple-500",children:[o.jsxs("div",{className:"text-center mb-8",children:[o.jsx("div",{className:"text-6xl font-bold text-gray-900 dark:text-white mb-2",children:a}),o.jsx("div",{className:"text-xl text-gray-600 dark:text-gray-400",children:t("pricing.priceUnit")})]}),o.jsx("div",{className:"grid md:grid-cols-3 gap-6 mb-8",children:v.map((C,_)=>o.jsxs("div",{className:`text-center p-4 rounded-xl ${_===0?"bg-purple-50 dark:bg-purple-900/20":_===1?"bg-indigo-50 dark:bg-indigo-900/20":"bg-blue-50 dark:bg-blue-900/20"}`,children:[o.jsx("div",{className:`text-2xl font-bold mb-1 ${_===0?"text-purple-600 dark:text-purple-400":_===1?"text-indigo-600 dark:text-indigo-400":"text-blue-600 dark:text-blue-400"}`,children:C.price}),o.jsx("div",{className:"text-sm text-gray-600 dark:text-gray-400",children:C.description})]},_))}),o.jsx(ze,{to:"/register",className:"block w-full btn btn-primary text-lg py-4 text-center",children:t("pricing.cta")})]})})]})}),o.jsx("section",{className:"py-24 bg-gradient-to-br from-gray-50 to-white dark:from-gray-900 dark:to-gray-800",children:o.jsxs("div",{className:"container-custom",children:[o.jsxs(ue.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},transition:{duration:.6},viewport:{once:!0},className:"text-center mb-16",children:[o.jsx("h2",{className:"text-4xl md:text-5xl font-bold text-gray-900 dark:text-white mb-4",children:t("faq.title")}),o.jsx("p",{className:"text-xl text-gray-600 dark:text-gray-300 max-w-3xl mx-auto",children:t("faq.subtitle")})]}),o.jsx("div",{className:"max-w-4xl mx-auto space-y-4",children:A.map((C,_)=>o.jsxs(ue.details,{initial:{opacity:0,y:10},whileInView:{opacity:1,y:0},transition:{duration:.4,delay:_*.1},viewport:{once:!0},className:"group bg-white dark:bg-gray-800 rounded-2xl p-6 hover:bg-gray-50 dark:hover:bg-gray-700 transition-colors shadow-md",children:[o.jsxs("summary",{className:"flex items-center justify-between cursor-pointer list-none",children:[o.jsx("h3",{className:"text-lg font-bold text-gray-900 dark:text-white pr-4",children:C.question}),o.jsx("div",{className:"w-8 h-8 bg-purple-600 rounded-full flex items-center justify-center flex-shrink-0 group-open:rotate-180 transition-transform",children:o.jsx(Sr,{className:"w-5 h-5 text-white transform rotate-90"})})]}),o.jsx("p",{className:"mt-4 text-gray-600 dark:text-gray-300 leading-relaxed",children:C.answer})]},_))})]})}),o.jsxs("section",{className:"py-24 bg-gradient-to-br from-purple-600 via-indigo-600 to-blue-600 relative overflow-hidden",children:[o.jsx(ue.div,{animate:{scale:[1,1.2,1],opacity:[.3,.5,.3]},transition:{duration:8,repeat:1/0,ease:"easeInOut"},className:"absolute top-0 left-0 w-96 h-96 bg-white rounded-full blur-3xl"}),o.jsx(ue.div,{animate:{scale:[1,1.3,1],opacity:[.2,.4,.2]},transition:{duration:10,repeat:1/0,ease:"easeInOut"},className:"absolute bottom-0 right-0 w-96 h-96 bg-purple-400 rounded-full blur-3xl"}),o.jsx("div",{className:"container-custom text-center relative z-10",children:o.jsxs(ue.div,{initial:{opacity:0,y:30},whileInView:{opacity:1,y:0},transition:{duration:.8},viewport:{once:!0},children:[o.jsxs("h2",{className:"text-4xl md:text-6xl font-bold text-white mb-6",children:[t("finalCta.titleLine1"),o.jsx("br",{}),t("finalCta.titleLine2")]}),o.jsx("p",{className:"text-xl md:text-2xl text-purple-100 mb-10 max-w-3xl mx-auto",children:t("finalCta.subtitle")}),o.jsx("div",{className:"flex flex-col sm:flex-row gap-4 justify-center mb-8",children:o.jsxs(ze,{to:"/register",className:"inline-flex items-center justify-center gap-2 bg-white text-purple-600 px-10 py-5 rounded-xl font-bold text-lg hover:bg-gray-100 transition-all shadow-2xl hover:scale-105 transform",children:[t("finalCta.cta"),o.jsx(ga,{className:"w-5 h-5"})]})}),o.jsx("p",{className:"text-purple-100",children:t("finalCta.benefits",{price:a})})]})})]})]})]})},r9=({title:t,subtitle:e,badge:r,headline:n,lead:s,points:i,children:a})=>{const{theme:l,toggleTheme:c}=cf();return o.jsxs("div",{className:"flex min-h-screen bg-white dark:bg-gray-900",children:[o.jsxs("div",{className:"flex w-full flex-col lg:w-[48%]",children:[o.jsxs("div",{className:"flex items-center justify-between px-6 py-5 sm:px-10",children:[o.jsxs(ze,{to:"/",className:"group flex items-center gap-2.5",children:[o.jsx("div",{className:"flex h-10 w-10 items-center justify-center rounded-xl bg-gradient-to-br from-purple-600 to-indigo-600 transition-transform group-hover:scale-105",children:o.jsx(dn,{className:"h-5 w-5 text-white"})}),o.jsx("div",{className:"flex flex-col leading-tight",children:o.jsx("span",{className:"bg-gradient-to-r from-purple-600 to-indigo-600 bg-clip-text text-lg font-bold text-transparent",children:"Smart-Copy.ai"})})]}),o.jsx("button",{type:"button",onClick:c,"aria-label":"Motyw",className:"rounded-lg p-2 text-gray-500 transition-colors hover:bg-gray-100 hover:text-gray-900 dark:text-gray-400 dark:hover:bg-gray-800 dark:hover:text-gray-100",children:l==="dark"?o.jsx(Xu,{className:"h-5 w-5"}):o.jsx(Yu,{className:"h-5 w-5"})})]}),o.jsx("div",{className:"flex flex-1 items-start justify-center px-4 pb-16 pt-4 sm:items-center sm:pt-0",children:o.jsxs(ue.div,{initial:{opacity:0,x:-16}
1011,animate:{opacity:1,x:0},transition:{duration:.4,ease:"easeOut"},className:"w-full max-w-md",children:[o.jsxs("div",{className:"mb-7",children:[o.jsx("h1",{className:"text-3xl font-bold tracking-tight text-gray-900 dark:text-white",children:t}),o.jsx("p",{className:"mt-1.5 text-sm text-gray-500 dark:text-gray-400",children:e})]}),a]})})]}),o.jsxs("div",{className:"relative hidden overflow-hidden lg:flex lg:w-[52%] bg-[linear-gradient(135deg,#7C2FD4_0%,#6D3AE8_38%,#4F46E5_72%,#3730A3_100%)]",children:[o.jsx("div",{className:"absolute inset-0 opacity-[0.07]",style:{backgroundImage:"linear-gradient(rgba(255,255,255,.6) 1px,transparent 1px),linear-gradient(90deg,rgba(255,255,255,.6) 1px,transparent 1px)",backgroundSize:"44px 44px"}}),o.jsx(dn,{className:"pointer-events-none absolute -right-10 top-10 h-72 w-72 text-white/[0.07] [animation:sc-float_9s_ease-in-out_infinite]"}),o.jsx(dn,{className:"pointer-events-none absolute bottom-8 right-40 h-40 w-40 text-white/[0.06] [animation:sc-float_7s_ease-in-out_infinite_1s]"}),o.jsx(dn,{className:"pointer-events-none absolute -left-6 bottom-1/3 h-28 w-28 text-white/[0.05] [animation:sc-float_11s_ease-in-out_infinite_2s]"}),o.jsxs(ue.div,{initial:{opacity:0,x:16},animate:{opacity:1,x:0},transition:{duration:.45,delay:.05,ease:"easeOut"},className:"relative z-10 mx-auto flex w-full max-w-lg flex-col justify-center px-12 py-16 xl:px-16",children:[o.jsxs("span",{className:"mb-5 inline-flex w-fit items-center gap-2 rounded-full border border-white/20 bg-white/10 px-3 py-1.5 text-xs font-semibold text-white/85 backdrop-blur-sm",children:[o.jsx("span",{className:"h-1.5 w-1.5 animate-pulse rounded-full bg-emerald-400"}),r]}),o.jsx("h2",{className:"mb-4 text-3xl font-bold leading-tight text-white xl:text-4xl",children:n}),o.jsx("p",{className:"mb-8 text-sm leading-relaxed text-white/70",children:s}),o.jsx("div",{className:"space-y-2.5",children:i.map(u=>o.jsxs("div",{className:"flex items-start gap-3 rounded-2xl border border-white/12 bg-white/[0.08] px-4 py-3 backdrop-blur-sm transition-colors hover:bg-white/[0.14]",children:[o.jsx("span",{className:"mt-0.5 shrink-0 text-white/90",children:u.icon}),o.jsxs("div",{children:[o.jsx("div",{className:"text-[13px] font-semibold text-white",children:u.title}),o.jsx("div",{className:"text-[11px] leading-relaxed text-white/55",children:u.desc})]})]},u.title))})]})]})]})};var _f=t=>t.type==="checkbox",Ll=t=>t instanceof Date,En=t=>t==null;const n9=t=>typeof t=="object";var mr=t=>!En(t)&&!Array.isArray(t)&&n9(t)&&!Ll(t),j1e=t=>mr(t)&&t.target?_f(t.target)?t.target.checked:t.target.value:t,S1e=t=>t.substring(0,t.search(/\.\d+(\.|$)/))||t,N1e=(t,e)=>t.has(S1e(e)),C1e=t=>{const e=t.constructor&&t.constructor.prototype;return mr(e)&&e.hasOwnProperty("isPrototypeOf")},ZN=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function Er(t){let e;const r=Array.isArray(t),n=typeof FileList<"u"?t instanceof FileList:!1;if(t instanceof Date)e=new Date(t);else if(!(ZN&&(t instanceof Blob||n))&&(r||mr(t)))if(e=r?[]:Object.create(Object.getPrototypeOf(t)),!r&&!C1e(t))e=t;
1011else for(const s in t)t.hasOwnProperty(s)&&(e[s]=Er(t[s]));else return t;return e}var bx=t=>/^\w*$/.test(t),rr=t=>t===void 0,YN=t=>Array.isArray(t)?t.filter(Boolean):[],JN=t=>YN(t.replace(/["|']|\]/g,"").split(/\.|\[/)),Le=(t,e,r)=>{if(!e||!mr(t))return r;const n=(bx(e)?[e]:JN(e)).reduce((s,i)=>En(s)?s:s[i],t);return rr(n)||n===t?rr(t[e])?r:t[e]:n},di=t=>typeof t=="boolean",Tt=(t,e,r)=>{let n=-1;const s=bx(e)?[e]:JN(e),i=s.length,a=i-1;for(;++n<i;){const l=s[n];let c=r;if(n!==a){const u=t[l];c=mr(u)||Array.isArray(u)?u:isNaN(+s[n+1])?{}:[]}if(l==="__proto__"||l==="constructor"||l==="prototype")return;t[l]=c,t=t[l]}};const MA={BLUR:"blur",FOCUS_OUT:"focusout"},Ms={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},$i={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},E1e=ut.createContext(null);E1e.displayName="HookFormContext";var T1e=(t,e,r,n=!0)=>{const s={defaultValues:e._defaultValues};for(const i in t)Object.defineProperty(s,i,{get:()=>{const a=i;return e._proxyFormState[a]!==Ms.all&&(e._proxyFormState[a]=!n||Ms.all),t[a]}});return s};const A1e=typeof window<"u"?ut.useLayoutEffect:ut.useEffect;var Hn=t=>typeof t=="string",z1e=(t,e,r,n,s)=>Hn(t)?(n&&e.watch.add(t),Le(r,t,s)):Array.isArray(t)?t.map(i=>(n&&e.watch.add(i),Le(r,i))):(n&&(e.watchAll=!0),r),_2=t=>En(t)||!n9(t);function Za(t,e,r=new WeakSet){if(_2(t)||_2(e))return t===e;if(Ll(t)&&Ll(e))return t.getTime()===e.getTime();const n=Object.keys(t),s=Object.keys(e);if(n.length!==s.length)return!1;if(r.has(t)||r.has(e))return!0;r.add(t),r.add(e);for(const i of n){const a=t[i];if(!s.includes(i))return!1;if(i!=="ref"){const l=e[i];
vendor: 7,510 bytes, line 1011
1011if(Ll(a)&&Ll(l)||mr(a)&&mr(l)||Array.isArray(a)&&Array.isArray(l)?!Za(a,l,r):a!==l)return!1}}return!0}var s9=(t,e,r,n,s)=>e?{...r[t],types:{...r[t]&&r[t].types?r[t].types:{},[n]:s||!0}}:{},tp=t=>Array.isArray(t)?t:[t],DA=()=>{let t=[];return{get observers(){return t},next:s=>{for(const i of t)i.next&&i.next(s)},subscribe:s=>(t.push(s),{unsubscribe:()=>{t=t.filter(i=>i!==s)}}),unsubscribe:()=>{t=[]}}};function i9(t,e){const r={};for(const n in t)if(t.hasOwnProperty(n)){const s=t[n],i=e[n];if(s&&mr(s)&&i){const a=i9(s,i);mr(a)&&(r[n]=a)}else t[n]&&(r[n]=i)}return r}var Cn=t=>mr(t)&&!Object.keys(t).length,XN=t=>t.type==="file",Ds=t=>typeof t=="function",Yg=t=>{if(!ZN)return!1;const e=t?t.ownerDocument:0;return t instanceof(e&&e.defaultView?e.defaultView.HTMLElement:HTMLElement)},a9=t=>t.type==="select-multiple",QN=t=>t.type==="radio",P1e=t=>QN(t)||_f(t),q1=t=>Yg(t)&&t.isConnected;function _1e(t,e){const r=e.slice(0,-1).length;let n=0;for(;n<r;)t=rr(t)?n++:t[e[n++]];return t}function I1e(t){for(const e in t)if(t.hasOwnProperty(e)&&!rr(t[e]))return!1;return!0}function cr(t,e){const r=Array.isArray(e)?e:bx(e)?[e]:JN(e),n=r.length===1?t:_1e(t,r),s=r.length-1,i=r[s];return n&&delete n[i],s!==0&&(mr(n)&&Cn(n)||Array.isArray(n)&&I1e(n))&&cr(t,r.slice(0,-1)),t}var O1e=t=>{for(const e in t)if(Ds(t[e]))return!0;return!1};function o9(t){return Array.isArray(t)||mr(t)&&!O1e(t)}function I2(t,e={}){for(const r in t)o9(t[r])?(e[r]=Array.isArray(t[r])?[]:{},I2(t[r],e[r])):rr(t[r])||(e[r]=!0);return e}function Gc(t,e,r){r||(r=I2(e));for(const n in t)o9(t[n])?rr(e)||_2(r[n])?r[n]=I2(t[n],Array.isArray(t[n])?[]:{}):Gc(t[n],En(e)?{}:e[n],r[n]):r[n]=!Za(t[n],e[n]);return r}const FA={value:!1,isValid:!1},BA={value:!0,isValid:!0};var l9=t=>{if(Array.isArray(t)){if(t.length>1){const e=t.filter(r=>r&&r.checked&&!r.disabled).map(r=>r.value);return{value:e,isValid:!!e.length}}return t[0].checked&&!t[0].disabled?t[0].attributes&&!rr(t[0].attributes.value)?rr(t[0].value)||t[0].value===""?BA:{value:t[0].value,isValid:!0}:BA:FA}return FA},c9=(t,{valueAsNumber:e,valueAsDate:r,setValueAs:n})=>rr(t)?t:e?t===""?NaN:t&&+t:r&&Hn(t)?new Date(t):n?n(t):t;const $A={isValid:!1,value:null};var u9=t=>Array.isArray(t)?t.reduce((e,r)=>r&&r.checked&&!r.disabled?{isValid:!0,value:r.value}:e,$A):$A;function UA(t){const e=t.ref;return XN(e)?e.files:QN(e)?u9(t.refs).value:a9(e)?[...e.selectedOptions].map(({value:r})=>r):_f(e)?l9(t.refs).value:c9(rr(e.value)?t.ref.value:e.value,t)}var R1e=(t,e,r,n)=>{const s={};for(const i of t){const a=Le(e,i);a&&Tt(s,i,a._f)}return{criteriaMode:r,names:[...t],fields:s,shouldUseNativeValidation:n}},Jg=t=>t instanceof RegExp,dh=t=>rr(t)?t:Jg(t)?t.source:mr(t)?Jg(t.value)?t.value.source:t.value:t,WA=t=>({isOnSubmit:!t||t===Ms.onSubmit,isOnBlur:t===Ms.onBlur,isOnChange:t===Ms.onChange,isOnAll:t===Ms.all,isOnTouch:t===Ms.onTouched});const VA="AsyncFunction";var L1e=t=>!!t&&!!t.validate&&!!(Ds(t.validate)&&t.validate.constructor.name===VA||mr(t.validate)&&Object.values(t.validate).find(e=>e.constructor.name===VA)),M1e=t=>t.mount&&(t.required||t.min||t.max||t.maxLength||t.minLength||t.pattern||t.validate),HA=(t,e,r)=>!r&&(e.watchAll||e.watch.has(t)||[...e.watch].some(n=>t.startsWith(n)&&/^\.\w+/.test(t.slice(n.length))));const rp=(t,e,r,n)=>{for(const s of r||Object.keys(t)){const i=Le(t,s);if(i){const{_f:a,...l}=i;if(a){if(a.refs&&a.refs[0]&&e(a.refs[0],s)&&!n)return!0;if(a.ref&&e(a.ref,a.name)&&!n)return!0;if(rp(l,e))break}else if(mr(l)&&rp(l,e))break}}};function qA(t,e,r){const n=Le(t,r);if(n||bx(r))return{error:n,name:r};const s=r.split(".");for(;s.length;){const i=s.join("."),a=Le(e,i),l=Le(t,i);if(a&&!Array.isArray(a)&&r!==i)return{name:r};if(l&&l.type)return{name:i,error:l};if(l&&l.root&&l.root.type)return{name:`${i}.root`,error:l.root};s.pop()}return{name:r}}var D1e=(t,e,r,n)=>{r(t);const{name:s,...i}=t;return Cn(i)||Object.keys(i).length>=Object.keys(e).length||Object.keys(i).find(a=>e[a]===(!n||Ms.all))},F1e=(t,e,r)=>!t||!e||t===e||tp(t).some(n=>n&&(r?n===e:n.startsWith(e)||e.startsWith(n))),B1e=(t,e,r,n,s)=>s.isOnAll?!1:!r&&s.isOnTouch?!(e||t):(r?n.isOnBlur:s.isOnBlur)?!t:(r?n.isOnChange:s.isOnChange)?t:!0,$1e=(t,e)=>!YN(Le(t,e)).length&&cr(t,e),U1e=(t,e,r)=>{const n=tp(Le(t,r));return Tt(n,"root",e[r]),Tt(t,r,n),t};function KA(t,e,r="validate"){if(Hn(t)||Array.isArray(t)&&t.every(Hn)||di(t)&&!t)return{type:r,message:Hn(t)?t:"",ref:e}}var Bc=t=>mr(t)&&!Jg(t)?t:{value:t,message:""},GA=async(t,e,r,n,s,i)=>{const{ref:a,refs:l,required:c,maxLength:u,minLength:d,min:h,max:p,pattern:f,validate:m,name:y,valueAsNumber:k,mount:g}=t._f,x=Le(r,y);if(!g||e.has(y))return{};const w=l?l[0]:a,b=T=>{s&&w.reportValidity&&(w.setCustomValidity(di(T)?"":T||""),w.reportValidity())},v={},A=QN(a),C=_f(a),_=A||C,N=(k||XN(a))&&rr(a.value)&&rr(x)||Yg(a)&&a.value===""||x===""||Array.isArray(x)&&!x.length,W=s9.bind(null,y,n,v),K=(T,F,E,H=$i.maxLength,Y=$i.minLength)=>{const $=T?F:E;v[y]={type:T?H:Y,message:$,ref:a,...W(T?H:Y,$)}};if(i?!Array.isArray(x)||!x.length:c&&(!_&&(N||En(x))||di(x)&&!x||C&&!l9(l).isValid||A&&!u9(l).isValid)){const{value:T,message:F}=Hn(c)?{value:!!c,message:c}:Bc(c);if(T&&(v[y]={type:$i.required,message:F,ref:w,...W($i.required,F)},!n))return b(F),v}if(!N&&(!En(h)||!En(p))){let T,F;const E=Bc(p),H=Bc(h);if(!En(x)&&!isNaN(x)){const Y=a.valueAsNumber||x&&+x;En(E.value)||(T=Y>E.value),En(H.value)||(F=Y<H.value)}else{const Y=a.valueAsDate||new Date(x),$=de=>new Date(new Date().toDateString()+" "+de),D=a.type=="time",J=a.type=="week";Hn(E.value)&&x&&(T=D?$(x)>$(E.value):J?x>E.value:Y>new Date(E.value)),Hn(H.value)&&x&&(F=D?$(x)<$(H.value):J?x<H.value:Y<new Date(H.value))}if((T||F)&&(K(!!T,E.message,H.message,$i.max,$i.min),!n))return b(v[y].message),v}if((u||d)&&!N&&(Hn(x)||i&&Array.isArray(x))){const T=Bc(u),F=Bc(d),E=!En(T.value)&&x.length>+T.value,H=!En(F.value)&&x.length<+F.value;if((E||H)&&(K(E,T.message,F.message),!n))return b(v[y].message),v}if(f&&!N&&Hn(x)){const{value:T,message:F}=Bc(f);if(Jg(T)&&!x.match(T)&&(v[y]={type:$i.pattern,message:F,ref:a,...W($i.pattern,F)},!n))return b(F),v}if(m){if(Ds(m)){const T=await m(x,r),F=KA(T,w);if(F&&(v[y]={...F,...W($i.validate,F.message)},!n))return b(F.message),v}else if(mr(m)){let T={};for(const F in m){if(!Cn(T)&&!n)break;const E=KA(await m[F](x,r),w,F);E&&(T={...E,...W(F,E.message)},b(E.message),n&&(v[y]=T))}if(!Cn(T)&&(v[y]={ref:w,...T},!n))return v}}return b(!0),v};const W1e={mode:Ms.onSubmit,reValidateMode:Ms.onChange,shouldFocusError:!0};function V1e(t={}){let e={...W1e,...t},r={submitCount:0,isDirty:!1,isReady:!1,isLoading:Ds(e.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:e.errors||{},disabled:e.disabled||!1},n={},s=mr(e.defaultValues)||mr(e.values)?Er(e.defaultValues||e.values)||{}:{},i=e.shouldUnregister?{}:Er(s),a={action:!1,mount:!1,watch:!1},l={mount:new Set,disabled:new Set,unMount:new Set,array:new Set,watch:new Set},c,u=0;const d={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1};let h={...d};const p={array:DA(),state:DA()},f=e.criteriaMode===Ms.all,m=L=>V=>{clearTimeout(u),u=setTimeout(L,V)},y=async L=>{if(!e.disabled&&(d.isValid||h.isValid||L)){const V=e.resolver?Cn((await C()).errors):await N(n,!0);V!==r.isValid&&p.state.next({isValid:V})}},k=(L,V)=>{!e.disabled&&(d.isValidating||d.validatingFields||h.isValidating||h.validatingFields)&&((L||Array.from(l.mount)).forEac
vendor: 12,394 bytes, line 1011
1011h(U=>{U&&(V?Tt(r.validatingFields,U,V):cr(r.validatingFields,U))}),p.state.next({validatingFields:r.validatingFields,isValidating:!Cn(r.validatingFields)}))},g=(L,V=[],U,oe,ce=!0,X=!0)=>{if(oe&&U&&!e.disabled){if(a.action=!0,X&&Array.isArray(Le(n,L))){const he=U(Le(n,L),oe.argA,oe.argB);ce&&Tt(n,L,he)}if(X&&Array.isArray(Le(r.errors,L))){const he=U(Le(r.errors,L),oe.argA,oe.argB);ce&&Tt(r.errors,L,he),$1e(r.errors,L)}if((d.touchedFields||h.touchedFields)&&X&&Array.isArray(Le(r.touchedFields,L))){const he=U(Le(r.touchedFields,L),oe.argA,oe.argB);ce&&Tt(r.touchedFields,L,he)}(d.dirtyFields||h.dirtyFields)&&(r.dirtyFields=Gc(s,i)),p.state.next({name:L,isDirty:K(L,V),dirtyFields:r.dirtyFields,errors:r.errors,isValid:r.isValid})}else Tt(i,L,V)},x=(L,V)=>{Tt(r.errors,L,V),p.state.next({errors:r.errors})},w=L=>{r.errors=L,p.state.next({errors:r.errors,isValid:!1})},b=(L,V,U,oe)=>{const ce=Le(n,L);if(ce){const X=Le(i,L,rr(U)?Le(s,L):U);rr(X)||oe&&oe.defaultChecked||V?Tt(i,L,V?X:UA(ce._f)):E(L,X),a.mount&&y()}},v=(L,V,U,oe,ce)=>{let X=!1,he=!1;const we={name:L};if(!e.disabled){if(!U||oe){(d.isDirty||h.isDirty)&&(he=r.isDirty,r.isDirty=we.isDirty=K(),X=he!==we.isDirty);const Te=Za(Le(s,L),V);he=!!Le(r.dirtyFields,L),Te?cr(r.dirtyFields,L):Tt(r.dirtyFields,L,!0),we.dirtyFields=r.dirtyFields,X=X||(d.dirtyFields||h.dirtyFields)&&he!==!Te}if(U){const Te=Le(r.touchedFields,L);Te||(Tt(r.touchedFields,L,U),we.touchedFields=r.touchedFields,X=X||(d.touchedFields||h.touchedFields)&&Te!==U)}X&&ce&&p.state.next(we)}return X?we:{}},A=(L,V,U,oe)=>{const ce=Le(r.errors,L),X=(d.isValid||h.isValid)&&di(V)&&r.isValid!==V;if(e.delayError&&U?(c=m(()=>x(L,U)),c(e.delayError)):(clearTimeout(u),c=null,U?Tt(r.errors,L,U):cr(r.errors,L)),(U?!Za(ce,U):ce)||!Cn(oe)||X){const he={...oe,...X&&di(V)?{isValid:V}:{},errors:r.errors,name:L};r={...r,...he},p.state.next(he)}},C=async L=>{k(L,!0);const V=await e.resolver(i,e.context,R1e(L||l.mount,n,e.criteriaMode,e.shouldUseNativeValidation));return k(L),V},_=async L=>{const{errors:V}=await C(L);if(L)for(const U of L){const oe=Le(V,U);oe?Tt(r.errors,U,oe):cr(r.errors,U)}else r.errors=V;return V},N=async(L,V,U={valid:!0})=>{for(const oe in L){const ce=L[oe];if(ce){const{_f:X,...he}=ce;if(X){const we=l.array.has(X.name),Te=ce._f&&L1e(ce._f);Te&&d.validatingFields&&k([X.name],!0);const Ye=await GA(ce,l.disabled,i,f,e.shouldUseNativeValidation&&!V,we);if(Te&&d.validatingFields&&k([X.name]),Ye[X.name]&&(U.valid=!1,V))break;!V&&(Le(Ye,X.name)?we?U1e(r.errors,Ye,X.name):Tt(r.errors,X.name,Ye[X.name]):cr(r.errors,X.name))}!Cn(he)&&await N(he,V,U)}}return U.valid},W=()=>{for(const L of l.unMount){const V=Le(n,L);V&&(V._f.refs?V._f.refs.every(U=>!q1(U)):!q1(V._f.ref))&&O(L)}l.unMount=new Set},K=(L,V)=>!e.disabled&&(L&&V&&Tt(i,L,V),!Za(de(),s)),T=(L,V,U)=>z1e(L,l,{...a.mount?i:rr(V)?s:Hn(L)?{[L]:V}:V},U,V),F=L=>YN(Le(a.mount?i:s,L,e.shouldUnregister?Le(s,L,[]):[])),E=(L,V,U={})=>{const oe=Le(n,L);let ce=V;if(oe){const X=oe._f;X&&(!X.disabled&&Tt(i,L,c9(V,X)),ce=Yg(X.ref)&&En(V)?"":V,a9(X.ref)?[...X.ref.options].forEach(he=>he.selected=ce.includes(he.value)):X.refs?_f(X.ref)?X.refs.forEach(he=>{(!he.defaultChecked||!he.disabled)&&(Array.isArray(ce)?he.checked=!!ce.find(we=>we===he.value):he.checked=ce===he.value||!!ce)}):X.refs.forEach(he=>he.checked=he.value===ce):XN(X.ref)?X.ref.value="":(X.ref.value=ce,X.ref.type||p.state.next({name:L,values:Er(i)})))}(U.shouldDirty||U.shouldTouch)&&v(L,ce,U.shouldTouch,U.shouldDirty,!0),U.shouldValidate&&J(L)},H=(L,V,U)=>{for(const oe in V){if(!V.hasOwnProperty(oe))return;const ce=V[oe],X=L+"."+oe,he=Le(n,X);(l.array.has(L)||mr(ce)||he&&!he._f)&&!Ll(ce)?H(X,ce,U):E(X,ce,U)}},Y=(L,V,U={})=>{const oe=Le(n,L),ce=l.array.has(L),X=Er(V);Tt(i,L,X),ce?(p.array.next({name:L,values:Er(i)}),(d.isDirty||d.dirtyFields||h.isDirty||h.dirtyFields)&&U.shouldDirty&&p.state.next({name:L,dirtyFields:Gc(s,i),isDirty:K(L,X)})):oe&&!oe._f&&!En(X)?H(L,X,U):E(L,X,U),HA(L,l)&&p.state.next({...r,name:L}),p.state.next({name:a.mount?L:void 0,values:Er(i)})},$=async L=>{a.mount=!0;const V=L.target;let U=V.name,oe=!0;const ce=Le(n,U),X=Te=>{oe=Number.isNaN(Te)||Ll(Te)&&isNaN(Te.getTime())||Za(Te,Le(i,U,Te))},he=WA(e.mode),we=WA(e.reValidateMode);if(ce){let Te,Ye;const bt=V.type?UA(ce._f):j1e(L),Et=L.type===MA.BLUR||L.type===MA.FOCUS_OUT,kn=!M1e(ce._f)&&!e.resolver&&!Le(r.errors,U)&&!ce._f.deps||B1e(Et,Le(r.touchedFields,U),r.isSubmitted,we,he),gt=HA(U,l,Et);Tt(i,U,bt),Et?(!V||!V.readOnly)&&(ce._f.onBlur&&ce._f.onBlur(L),c&&c(0)):ce._f.onChange&&ce._f.onChange(L);const Hr=v(U,bt,Et),Cs=!Cn(Hr)||gt;if(!Et&&p.state.next({name:U,type:L.type,values:Er(i)}),kn)return(d.isValid||h.isValid)&&(e.mode==="onBlur"?Et&&y():Et||y()),Cs&&p.state.next({name:U,...gt?{}:Hr});if(!Et&&gt&&p.state.next({...r}),e.resolver){const{errors:wr}=await C([U]);if(X(bt),oe){const Es=qA(r.errors,n,U),Un=qA(wr,n,Es.name||U);Te=Un.error,U=Un.name,Ye=Cn(wr)}}else k([U],!0),Te=(await GA(ce,l.disabled,i,f,e.shouldUseNativeValidation))[U],k([U]),X(bt),oe&&(Te?Ye=!1:(d.isValid||h.isValid)&&(Ye=await N(n,!0)));oe&&(ce._f.deps&&(!Array.isArray(ce._f.deps)||ce._f.deps.length>0)&&J(ce._f.deps),A(U,Ye,Te,Hr))}},D=(L,V)=>{if(Le(r.errors,V)&&L.focus)return L.focus(),1},J=async(L,V={})=>{let U,oe;const ce=tp(L);if(e.resolver){const X=await _(rr(L)?L:ce);U=Cn(X),oe=L?!ce.some(he=>Le(X,he)):U}else L?(oe=(await Promise.all(ce.map(async X=>{const he=Le(n,X);return await N(he&&he._f?{[X]:he}:he)}))).every(Boolean),!(!oe&&!r.isValid)&&y()):oe=U=await N(n);return p.state.next({...!Hn(L)||(d.isValid||h.isValid)&&U!==r.isValid?{}:{name:L},...e.resolver||!L?{isValid:U}:{},errors:r.errors}),V.shouldFocus&&!oe&&rp(n,D,L?ce:l.mount),oe},de=(L,V)=>{let U={...a.mount?i:s};return V&&(U=i9(V.dirtyFields?r.dirtyFields:r.touchedFields,U)),rr(L)?U:Hn(L)?Le(U,L):L.map(oe=>Le(U,oe))},G=(L,V)=>({invalid:!!Le((V||r).errors,L),isDirty:!!Le((V||r).dirtyFields,L),error:Le((V||r).errors,L),isValidating:!!Le(r.validatingFields,L),isTouched:!!Le((V||r).touchedFields,L)}),B=L=>{L&&tp(L).forEach(V=>cr(r.errors,V)),p.state.next({errors:L?r.errors:{}})},re=(L,V,U)=>{const oe=(Le(n,L,{_f:{}})._f||{}).ref,ce=Le(r.errors,L)||{},{ref:X,message:he,type:we,...Te}=ce;Tt(r.errors,L,{...Te,...V,ref:oe}),p.state.next({name:L,errors:r.errors,isValid:!1}),U&&U.shouldFocus&&oe&&oe.focus&&oe.focus()},ae=(L,V)=>Ds(L)?p.state.subscribe({next:U=>"values"in U&&L(T(void 0,V),U)}):T(L,V,!0),ge=L=>p.state.subscribe({next:V=>{F1e(L.name,V.name,L.exact)&&D1e(V,L.formState||d,j,L.reRenderRoot)&&L.callback({values:{...i},...r,...V,defaultValues:s})}}).unsubscribe,ne=L=>(a.mount=!0,h={...h,...L.formState},ge({...L,formState:h})),O=(L,V={})=>{for(const U of L?tp(L):l.mount)l.mount.delete(U),l.array.delete(U),V.keepValue||(cr(n,U),cr(i,U)),!V.keepError&&cr(r.errors,U),!V.keepDirty&&cr(r.dirtyFields,U),!V.keepTouched&&cr(r.touchedFields,U),!V.keepIsValidating&&cr(r.validatingFields,U),!e.shouldUnregister&&!V.keepDefaultValue&&cr(s,U);p.state.next({values:Er(i)}),p.state.next({...r,...V.keepDirty?{isDirty:K()}:{}}),!V.keepIsValid&&y()},I=({disabled:L,name:V})=>{(di(L)&&a.mount||L||l.disabled.has(V))&&(L?l.disabled.add(V):l.disabled.delete(V))},ee=(L,V={})=>{let U=Le(n,L);const oe=di(V.disabled)||di(e.disabled);return Tt(n,L,{...U||{},_f:{...U&&U._f?U._f:{ref:{name:L}},name:L,mount:!0,...V}}),l.mount.add(L),U?I({disabled:di(V.disabled)?V.disabled:e.disabled,name:L}):b(L,!0,V.value),{...oe?{disabled:V.disabled||e.disabled}:{},...e.progressive?{required:!!V.required,min:dh(V.min),max:dh(V.max),minLength:dh(V.minLength),maxLength:dh(V.maxLength),pattern:dh(V.pattern)}:{},name:L,onChange:$,onBlur:$,ref:ce=>{if(ce){ee(L,V),U=Le(n,L);const X=rr(ce.value)&&ce.querySelectorAll&&ce.querySelectorAll("input,select,textarea")[0]||ce,he=P1e(X),we=U._f.refs||[];if(he?we.find(Te=>Te===X):X===U._f.ref)return;Tt(n,L,{_f:{...U._f,...he?{refs:[...we.filter(q1),X,...Array.isArray(Le(s,L))?[{}]:[]],ref:{type:X.type,name:L}}:{ref:X}}}),b(L,!1,void 0,X)}else U=Le(n,L,{}),U._f&&(U._f.mount=!1),(e.shouldUnregister||V.shouldUnregister)&&!(N1e(l.array,L)&&a.action)&&l.unMount.add(L)}}},Q=()=>e.shouldFocusError&&rp(n,D,l.mount),q=L=>{di(L)&&(p.state.next({disabled:L}),rp(n,(V,U)=>{const oe=Le(n,U);oe&&(V.disabled=oe._f.disabled||L,Array.isArray(oe._f.refs)&&oe._f.refs.forEach(ce=>{ce.disabled=oe._f.disabled||L}))},0,!1))},Z=(L,V)=>async U=>{let oe;U&&(U.preventDefault&&U.preventDefault(),U.persist&&U.persist());let ce=Er(i);if(p.state.next({isSubmitting:!0}),e.resolver){const{errors:X,values:he}=await C();r.errors=X,ce=Er(he)}else await N(n);if(l.disabled.size)for(const X of l.disabled)cr(ce,X);if(cr(r.errors,"root"),Cn(r.errors)){p.state.next({errors:{}});try{await L(ce,U)}catch(X){oe=X}}else V&&await V({...r.errors},U),Q(),setTimeout(Q);if(p.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:Cn(r.errors)&&!oe,submitCount:r.submitCount+1,errors:r.errors}),oe)throw oe},me=(L,V={})=>{Le(n,L)&&(rr(V.defaultValue)?Y(L,Er(Le(s,L))):(Y(L,V.defaultValue),Tt(s,L,Er(V.defaultValue))),V.keepTouched||cr(r.touchedFields,L),V.keepDirty||(cr(r.dirtyFields,L),r.isDirty=V.defaultValue?K(L,Er(Le(s,L))):K()),V.keepError||(cr(r.errors,L),d.isValid&&y()),p.state.next({...r}))},z=(L,V={})=>{const U=L?Er(L):s,oe=Er(U),ce=Cn(L),X=ce?s:oe;if(V.keepDefaultValues||(s=U),!V.keepValues){if(V.keepDirtyValues){const he=new Set([...l.mount,...Object.keys(Gc(s,i))]);for(const we of Array.from(he))Le(r.dirtyFields,we)?Tt(X,we,Le(i,we)):Y(we,Le(X,we))}else{if(ZN&&rr(L))for(const he of l.mount){const we=Le(n,he);if(we&&we._f){const Te=Array.isArray(we._f.refs)?we._f.refs[0]:we._f.ref;if(Yg(Te)){const Ye=Te.closest("form");if(Ye){Ye.reset();break}}}}if(V.keepFieldsRef)for(const he of l.mount)Y(he,Le(X,he));else n={}}i=e.shouldUnregister?V.keepDefaultValues?Er(s):{}:Er(X),p.array.next({values:{...X}}),p.state.next({values:{...X}})}l={mount:V.keepDirtyValues?l.mount:new Set,unMount:new Set,array:new Set,disabled:new Set,watch:new Set,watchAll:!1,focus:""},a.mount=!d.isValid||!!V.keepIsValid||!!V.keepDirtyValues,a.watch=!!e.shouldUnregister,p.state.next({submitCount:V.keepSubmitCount?r.submitCount:0,isDirty:ce?!1:V.keepDirty?r.isDirty:!!(V.keepDefaultValues&&!Za(L,s)),isSubmitted:V.keepIsSubmitted?r.isSubmitted:!1,dirtyFields:ce?{}:V.keepDirtyValues?V.keepDefaultValues&&i?Gc(s,i):r.dirtyFields:V.keepDefaultValues&&L?Gc(s,L):V.keepDirty?r.dirtyFields:{},touchedFields:V.keepTouched?r.touchedFields:{},errors:V.keepErrors?r.errors:{},isSubmitSuccessful:V.keepIsSubmitSuccessful?r.isSubmitSuccessful:!1,isSubmitting:!1,defaultValues:s})},fe=(L,V)=>z(Ds(L)?L(i):L,V),R=(L,V={})=>{const U=Le(n,L),oe=U&&U._f;if(oe){const ce=oe.refs?oe.refs[0]:oe.ref;ce.focus&&(ce.focus(),V.shouldSelect&&Ds(ce.select)&&ce.select())}},j=L=>{r={...r,...L}},P={control:{register:ee,unregister:O,getFieldState:G,handleSubmit:Z,setError:re,_subscribe:ge,_runSchema:C,_focusError:Q,_getWatch:T,_getDirty:K,_setValid:y,_setFieldArray:g,_setDisabledField:I,_setErrors:w,_getFieldArray:F,_reset:z,_resetDefaultValues:()=>Ds(e.defaultValues)&&e.defaultValues().then(L=>{fe(L,e.resetOptions),p.state.next({isLoading:!1})}),_removeUnmounted:W,_disableForm:q,_subjects:p,_proxyFormState:d,get _fields(){return n},get _formValues(){return i},get _state(){return a},set _state(L){a=L},get _defaultValues(){return s},get _names(){return l},set _names(L){l=L},get _formState(){return r},get _options(){return e},set _options(L){e={...e,...L}}},subscribe:ne,trigger:J,register:ee,handleSubmit:Z,watch:ae,setValue:Y,getValues:de,reset:fe,resetField:me,clearErrors:B,unregister:O,setError:re,setFocus:R,getFieldState:G};return{...P,formControl:P}}function Dd(t={}){const e=ut.useRef(void 0),r=ut.useRef(void 0),[n,s]=ut.useState({isDirty:!1,isValidating:!1,isLoading:Ds(t.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},validatingFields:{},errors:t.errors||{},disabled:t.disabled||!1,isReady:!1,defaultValues:Ds(t.defaultValues)?void 0:t.defaultValues});if(!e.current)if(t.formControl)e.current={...t.formControl,formState:n},t.defaultValues&&!Ds(t.defaultValues)&&t.formControl.reset(t.defaultValues,t.resetOptions);else{const{formControl:a,...l}=V1e(t);e.current={...l,formState:n}}const i=e.current.control;return i._options=t,A1e(()=>{const a=i._subscribe({formState:i._proxyFormState,callback:()=>s({...i._formState}
vendor: 4,787 bytes, line 1011
1011),reRenderRoot:!0});return s(l=>({...l,isReady:!0})),i._formState.isReady=!0,a},[i]),ut.useEffect(()=>i._disableForm(t.disabled),[i,t.disabled]),ut.useEffect(()=>{t.mode&&(i._options.mode=t.mode),t.reValidateMode&&(i._options.reValidateMode=t.reValidateMode)},[i,t.mode,t.reValidateMode]),ut.useEffect(()=>{t.errors&&(i._setErrors(t.errors),i._focusError())},[i,t.errors]),ut.useEffect(()=>{t.shouldUnregister&&i._subjects.state.next({values:i._getWatch()})},[i,t.shouldUnregister]),ut.useEffect(()=>{if(i._proxyFormState.isDirty){const a=i._getDirty();a!==n.isDirty&&i._subjects.state.next({isDirty:a})}},[i,n.isDirty]),ut.useEffect(()=>{t.values&&!Za(t.values,r.current)?(i._reset(t.values,{keepFieldsRef:!0,...i._options.resetOptions}),r.current=t.values,s(a=>({...a}))):i._resetDefaultValues()},[i,t.values]),ut.useEffect(()=>{i._state.mount||(i._setValid(),i._state.mount=!0),i._state.watch&&(i._state.watch=!1,i._subjects.state.next({...i._formState})),i._removeUnmounted()}),e.current.formState=T1e(n,i),e.current}const ZA=(t,e,r)=>{if(t&&"reportValidity"in t){const n=Le(r,e);t.setCustomValidity(n&&n.message||""),t.reportValidity()}},d9=(t,e)=>{for(const r in e.fields){const n=e.fields[r];n&&n.ref&&"reportValidity"in n.ref?ZA(n.ref,r,t):n.refs&&n.refs.forEach(s=>ZA(s,r,t))}},H1e=(t,e)=>{e.shouldUseNativeValidation&&d9(t,e);const r={};for(const n in t){const s=Le(e.fields,n),i=Object.assign(t[n]||{},{ref:s&&s.ref});if(q1e(e.names||Object.keys(t),n)){const a=Object.assign({},Le(r,n));Tt(a,"root",i),Tt(r,n,a)}else Tt(r,n,i)}return r},q1e=(t,e)=>t.some(r=>r.startsWith(e+"."));var K1e=function(t,e){for(var r={};t.length;){var n=t[0],s=n.code,i=n.message,a=n.path.join(".");if(!r[a])if("unionErrors"in n){var l=n.unionErrors[0].errors[0];r[a]={message:l.message,type:l.code}}else r[a]={message:i,type:s};if("unionErrors"in n&&n.unionErrors.forEach(function(d){return d.errors.forEach(function(h){return t.push(h)})}),e){var c=r[a].types,u=c&&c[n.code];r[a]=s9(a,e,r,s,u?[].concat(u,n.message):n.message)}t.shift()}return r},Fd=function(t,e,r){return r===void 0&&(r={}),function(n,s,i){try{return Promise.resolve(function(a,l){try{var c=Promise.resolve(t[r.mode==="sync"?"parse":"parseAsync"](n,e)).then(function(u){return i.shouldUseNativeValidation&&d9({},i),{errors:{},values:r.raw?n:u}})}catch(u){return l(u)}return c&&c.then?c.then(void 0,l):c}(0,function(a){if(function(l){return Array.isArray(l==null?void 0:l.errors)}(a))return{values:{},errors:H1e(K1e(a.errors,!i.shouldUseNativeValidation&&i.criteriaMode==="all"),i)};throw a}))}catch(a){return Promise.reject(a)}}};function h9(t){let e=!1;const r=Date.now(),n=15e3,s=()=>{if(e)return;const i=document.getElementById(t.elementId);if(window.google&&i){window.google.accounts.id.initialize({client_id:"958716858025-4618n7tq7mt7porgb21k6br8adabaeqh.apps.googleusercontent.com",callback:t.callback}),window.google.accounts.id.renderButton(i,{theme:"outline",size:"large",width:"100%",text:t.text,shape:"rectangular"});return}Date.now()-r<n&&setTimeout(s,150)};return s(),()=>{e=!0}}var ft;(function(t){t.assertEqual=s=>{};function e(s){}t.assertIs=e;function r(s){throw new Error}t.assertNever=r,t.arrayToEnum=s=>{const i={};for(const a of s)i[a]=a;return i},t.getValidEnumValues=s=>{const i=t.objectKeys(s).filter(l=>typeof s[s[l]]!="number"),a={};for(const l of i)a[l]=s[l];return t.objectValues(a)},t.objectValues=s=>t.objectKeys(s).map(function(i){return s[i]}),t.objectKeys=typeof Object.keys=="function"?s=>Object.keys(s):s=>{const i=[];for(const a in s)Object.prototype.hasOwnProperty.call(s,a)&&i.push(a);return i},t.find=(s,i)=>{for(const a of s)if(i(a))return a},t.isInteger=typeof Number.isInteger=="function"?s=>Number.isInteger(s):s=>typeof s=="number"&&Number.isFinite(s)&&Math.floor(s)===s;function n(s,i=" | "){return s.map(a=>typeof a=="string"?`'${a}'`:a).join(i)}t.joinValues=n,t.jsonStringifyReplacer=(s,i)=>typeof i=="bigint"?i.toString():i})(ft||(ft={}));var YA;(function(t){t.mergeShapes=(e,r)=>({...e,...r})})(YA||(YA={}));const De=ft.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),Wa=t=>{switch(typeof t){case"undefined":return De.undefined;case"string":return De.string;case"number":return Number.isNaN(t)?De.nan:De.number;case"boolean":return De.boolean;case"function":return De.function;case"bigint":return De.bigint;case"symbol":return De.symbol;case"object":return Array.isArray(t)?De.array:t===null?De.null:t.then&&typeof t.then=="function"&&t.catch&&typeof t.catch=="function"?De.promise:typeof Map<"u"&&t instanceof Map?De.map:typeof Set<"u"&&t instanceof Set?De.set:typeof Date<"u"&&t instanceof Date?De.date:De.object;default:return De.unknown}}
vendor: 4,379 bytes, line 1011
1011,Ae=ft.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);class wa extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=n=>{this.issues=[...this.issues,n]},this.addIssues=(n=[])=>{this.issues=[...this.issues,...n]};const r=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,r):this.__proto__=r,this.name="ZodError",this.issues=e}format(e){const r=e||function(i){return i.message},n={_errors:[]},s=i=>{for(const a of i.issues)if(a.code==="invalid_union")a.unionErrors.map(s);else if(a.code==="invalid_return_type")s(a.returnTypeError);else if(a.code==="invalid_arguments")s(a.argumentsError);else if(a.path.length===0)n._errors.push(r(a));else{let l=n,c=0;for(;c<a.path.length;){const u=a.path[c];c===a.path.length-1?(l[u]=l[u]||{_errors:[]},l[u]._errors.push(r(a))):l[u]=l[u]||{_errors:[]},l=l[u],c++}}};return s(this),n}static assert(e){if(!(e instanceof wa))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,ft.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=r=>r.message){const r={},n=[];for(const s of this.issues)if(s.path.length>0){const i=s.path[0];r[i]=r[i]||[],r[i].push(e(s))}else n.push(e(s));return{formErrors:n,fieldErrors:r}}get formErrors(){return this.flatten()}}wa.create=t=>new wa(t);const O2=(t,e)=>{let r;switch(t.code){case Ae.invalid_type:t.received===De.undefined?r="Required":r=`Expected ${t.expected}, received ${t.received}`;break;case Ae.invalid_literal:r=`Invalid literal value, expected ${JSON.stringify(t.expected,ft.jsonStringifyReplacer)}`;break;case Ae.unrecognized_keys:r=`Unrecognized key(s) in object: ${ft.joinValues(t.keys,", ")}`;break;case Ae.invalid_union:r="Invalid input";break;case Ae.invalid_union_discriminator:r=`Invalid discriminator value. Expected ${ft.joinValues(t.options)}`;break;case Ae.invalid_enum_value:r=`Invalid enum value. Expected ${ft.joinValues(t.options)}, received '${t.received}'`;break;case Ae.invalid_arguments:r="Invalid function arguments";break;case Ae.invalid_return_type:r="Invalid function return type";break;case Ae.invalid_date:r="Invalid date";break;case Ae.invalid_string:typeof t.validation=="object"?"includes"in t.validation?(r=`Invalid input: must include "${t.validation.includes}"`,typeof t.validation.position=="number"&&(r=`${r} at one or more positions greater than or equal to ${t.validation.position}`)):"startsWith"in t.validation?r=`Invalid input: must start with "${t.validation.startsWith}"`:"endsWith"in t.validation?r=`Invalid input: must end with "${t.validation.endsWith}"`:ft.assertNever(t.validation):t.validation!=="regex"?r=`Invalid ${t.validation}`:r="Invalid";break;case Ae.too_small:t.type==="array"?r=`Array must contain ${t.exact?"exactly":t.inclusive?"at least":"more than"} ${t.minimum} element(s)`:t.type==="string"?r=`String must contain ${t.exact?"exactly":t.inclusive?"at least":"over"} ${t.minimum} character(s)`:t.type==="number"?r=`Number must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${t.minimum}`:t.type==="bigint"?r=`Number must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${t.minimum}`:t.type==="date"?r=`Date must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(t.minimum))}`:r="Invalid input";break;case Ae.too_big:t.type==="array"?r=`Array must contain ${t.exact?"exactly":t.inclusive?"at most":"less than"} ${t.maximum} element(s)`:t.type==="string"?r=`String must contain ${t.exact?"exactly":t.inclusive?"at most":"under"} ${t.maximum} character(s)`:t.type==="number"?r=`Number must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="bigint"?r=`BigInt must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="date"?r=`Date must be ${t.exact?"exactly":t.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(t.maximum))}`:r="Invalid input";break;case Ae.custom:r="Invalid input";break;
vendor: 5,147 bytes, line 1011
1011case Ae.invalid_intersection_types:r="Intersection results could not be merged";break;case Ae.not_multiple_of:r=`Number must be a multiple of ${t.multipleOf}`;break;case Ae.not_finite:r="Number must be finite";break;default:r=e.defaultError,ft.assertNever(t)}return{message:r}};let G1e=O2;function Z1e(){return G1e}const Y1e=t=>{const{data:e,path:r,errorMaps:n,issueData:s}=t,i=[...r,...s.path||[]],a={...s,path:i};if(s.message!==void 0)return{...s,path:i,message:s.message};let l="";const c=n.filter(u=>!!u).slice().reverse();for(const u of c)l=u(a,{data:e,defaultError:l}).message;return{...s,path:i,message:l}};function _e(t,e){const r=Z1e(),n=Y1e({issueData:e,data:t.data,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,r,r===O2?void 0:O2].filter(s=>!!s)});t.common.issues.push(n)}class Jn{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(e,r){const n=[];for(const s of r){if(s.status==="aborted")return Je;s.status==="dirty"&&e.dirty(),n.push(s.value)}return{status:e.value,value:n}}static async mergeObjectAsync(e,r){const n=[];for(const s of r){const i=await s.key,a=await s.value;n.push({key:i,value:a})}return Jn.mergeObjectSync(e,n)}static mergeObjectSync(e,r){const n={};for(const s of r){const{key:i,value:a}=s;if(i.status==="aborted"||a.status==="aborted")return Je;i.status==="dirty"&&e.dirty(),a.status==="dirty"&&e.dirty(),i.value!=="__proto__"&&(typeof a.value<"u"||s.alwaysSet)&&(n[i.value]=a.value)}return{status:e.value,value:n}}}const Je=Object.freeze({status:"aborted"}),Ch=t=>({status:"dirty",value:t}),Ns=t=>({status:"valid",value:t}),JA=t=>t.status==="aborted",XA=t=>t.status==="dirty",xd=t=>t.status==="valid",Xg=t=>typeof Promise<"u"&&t instanceof Promise;var Fe;(function(t){t.errToObj=e=>typeof e=="string"?{message:e}:e||{},t.toString=e=>typeof e=="string"?e:e==null?void 0:e.message})(Fe||(Fe={}));class Wo{constructor(e,r,n,s){this._cachedPath=[],this.parent=e,this.data=r,this._path=n,this._key=s}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const QA=(t,e)=>{if(xd(e))return{success:!0,data:e.value};if(!t.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const r=new wa(t.common.issues);return this._error=r,this._error}}};function st(t){if(!t)return{};const{errorMap:e,invalid_type_error:r,required_error:n,description:s}=t;if(e&&(r||n))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return e?{errorMap:e,description:s}:{errorMap:(a,l)=>{const{message:c}=t;return a.code==="invalid_enum_value"?{message:c??l.defaultError}:typeof l.data>"u"?{message:c??n??l.defaultError}:a.code!=="invalid_type"?{message:l.defaultError}:{message:c??r??l.defaultError}},description:s}}class pt{get description(){return this._def.description}_getType(e){return Wa(e.data)}_getOrReturnCtx(e,r){return r||{common:e.parent.common,data:e.data,parsedType:Wa(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new Jn,ctx:{common:e.parent.common,data:e.data,parsedType:Wa(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){const r=this._parse(e);if(Xg(r))throw new Error("Synchronous parse encountered promise.");return r}_parseAsync(e){const r=this._parse(e);return Promise.resolve(r)}parse(e,r){const n=this.safeParse(e,r);if(n.success)return n.data;throw n.error}safeParse(e,r){const n={common:{issues:[],async:(r==null?void 0:r.async)??!1,contextualErrorMap:r==null?void 0:r.errorMap},path:(r==null?void 0:r.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:Wa(e)},s=this._parseSync({data:e,path:n.path,parent:n});return QA(n,s)}"~validate"(e){var n,s;const r={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:Wa(e)};if(!this["~standard"].async)try{const i=this._parseSync({data:e,path:[],parent:r});return xd(i)?{value:i.value}:{issues:r.common.issues}}catch(i){(s=(n=i==null?void 0:i.message)==null?void 0:n.toLowerCase())!=null&&s.includes("encountered")&&(this["~standard"].async=!0),r.common={issues:[],async:!0}}return this._parseAsync({data:e,path:[],parent:r}).then(i=>xd(i)?{value:i.value}:{issues:r.common.issues})}async parseAsync(e,r){const n=await this.safeParseAsync(e,r);if(n.success)return n.data;throw n.error}async safeParseAsync(e,r){const n={common:{issues:[],contextualErrorMap:r==null?void 0:r.errorMap,async:!0},path:(r==null?void 0:r.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:Wa(e)},s=this._parse({data:e,path:n.path,parent:n}),i=await(Xg(s)?s:Promise.resolve(s));return QA(n,i)}refine(e,r){const n=s=>typeof r=="string"||typeof r>"u"?{message:r}:typeof r=="function"?r(s):r;return this._refinement((s,i)=>{const a=e(s),l=()=>i.addIssue({code:Ae.custom,...n(s)});
vendor: 6,114 bytes, line 1011
1011return typeof Promise<"u"&&a instanceof Promise?a.then(c=>c?!0:(l(),!1)):a?!0:(l(),!1)})}refinement(e,r){return this._refinement((n,s)=>e(n)?!0:(s.addIssue(typeof r=="function"?r(n,s):r),!1))}_refinement(e){return new kd({schema:this,typeName:Xe.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:r=>this["~validate"](r)}}optional(){return Po.create(this,this._def)}nullable(){return vd.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Ei.create(this)}promise(){return ry.create(this,this._def)}or(e){return ey.create([this,e],this._def)}and(e){return ty.create(this,e,this._def)}transform(e){return new kd({...st(this._def),schema:this,typeName:Xe.ZodEffects,effect:{type:"transform",transform:e}})}default(e){const r=typeof e=="function"?e:()=>e;return new D2({...st(this._def),innerType:this,defaultValue:r,typeName:Xe.ZodDefault})}brand(){return new wke({typeName:Xe.ZodBranded,type:this,...st(this._def)})}catch(e){const r=typeof e=="function"?e:()=>e;return new F2({...st(this._def),innerType:this,catchValue:r,typeName:Xe.ZodCatch})}describe(e){const r=this.constructor;return new r({...this._def,description:e})}pipe(e){return e3.create(this,e)}readonly(){return B2.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const J1e=/^c[^\s-]{8,}$/i,X1e=/^[0-9a-z]+$/,Q1e=/^[0-9A-HJKMNP-TV-Z]{26}$/i,eke=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,tke=/^[a-z0-9_-]{21}$/i,rke=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,nke=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,ske=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,ike="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let K1;const ake=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,oke=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,lke=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,cke=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,uke=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,dke=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,p9="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",hke=new RegExp(`^${p9}$`);function f9(t){let e="[0-5]\\d";t.precision?e=`${e}\\.\\d{${t.precision}}`:t.precision==null&&(e=`${e}(\\.\\d+)?`);const r=t.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${e})${r}`}function pke(t){return new RegExp(`^${f9(t)}$`)}function fke(t){let e=`${p9}T${f9(t)}`;const r=[];return r.push(t.local?"Z?":"Z"),t.offset&&r.push("([+-]\\d{2}:?\\d{2})"),e=`${e}(${r.join("|")})`,new RegExp(`^${e}$`)}function mke(t,e){return!!((e==="v4"||!e)&&ake.test(t)||(e==="v6"||!e)&&lke.test(t))}function gke(t,e){if(!rke.test(t))return!1;try{const[r]=t.split(".");if(!r)return!1;const n=r.replace(/-/g,"+").replace(/_/g,"/").padEnd(r.length+(4-r.length%4)%4,"="),s=JSON.parse(atob(n));return!(typeof s!="object"||s===null||"typ"in s&&(s==null?void 0:s.typ)!=="JWT"||!s.alg||e&&s.alg!==e)}catch{return!1}}function yke(t,e){return!!((e==="v4"||!e)&&oke.test(t)||(e==="v6"||!e)&&cke.test(t))}class po extends pt{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==De.string){const i=this._getOrReturnCtx(e);
vendor: 17,372 bytes, line 1011
1011return _e(i,{code:Ae.invalid_type,expected:De.string,received:i.parsedType}),Je}const n=new Jn;let s;for(const i of this._def.checks)if(i.kind==="min")e.data.length<i.value&&(s=this._getOrReturnCtx(e,s),_e(s,{code:Ae.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),n.dirty());else if(i.kind==="max")e.data.length>i.value&&(s=this._getOrReturnCtx(e,s),_e(s,{code:Ae.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),n.dirty());else if(i.kind==="length"){const a=e.data.length>i.value,l=e.data.length<i.value;(a||l)&&(s=this._getOrReturnCtx(e,s),a?_e(s,{code:Ae.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}):l&&_e(s,{code:Ae.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}),n.dirty())}else if(i.kind==="email")ske.test(e.data)||(s=this._getOrReturnCtx(e,s),_e(s,{validation:"email",code:Ae.invalid_string,message:i.message}),n.dirty());else if(i.kind==="emoji")K1||(K1=new RegExp(ike,"u")),K1.test(e.data)||(s=this._getOrReturnCtx(e,s),_e(s,{validation:"emoji",code:Ae.invalid_string,message:i.message}),n.dirty());else if(i.kind==="uuid")eke.test(e.data)||(s=this._getOrReturnCtx(e,s),_e(s,{validation:"uuid",code:Ae.invalid_string,message:i.message}),n.dirty());else if(i.kind==="nanoid")tke.test(e.data)||(s=this._getOrReturnCtx(e,s),_e(s,{validation:"nanoid",code:Ae.invalid_string,message:i.message}),n.dirty());else if(i.kind==="cuid")J1e.test(e.data)||(s=this._getOrReturnCtx(e,s),_e(s,{validation:"cuid",code:Ae.invalid_string,message:i.message}),n.dirty());else if(i.kind==="cuid2")X1e.test(e.data)||(s=this._getOrReturnCtx(e,s),_e(s,{validation:"cuid2",code:Ae.invalid_string,message:i.message}),n.dirty());else if(i.kind==="ulid")Q1e.test(e.data)||(s=this._getOrReturnCtx(e,s),_e(s,{validation:"ulid",code:Ae.invalid_string,message:i.message}),n.dirty());else if(i.kind==="url")try{new URL(e.data)}catch{s=this._getOrReturnCtx(e,s),_e(s,{validation:"url",code:Ae.invalid_string,message:i.message}),n.dirty()}else i.kind==="regex"?(i.regex.lastIndex=0,i.regex.test(e.data)||(s=this._getOrReturnCtx(e,s),_e(s,{validation:"regex",code:Ae.invalid_string,message:i.message}),n.dirty())):i.kind==="trim"?e.data=e.data.trim():i.kind==="includes"?e.data.includes(i.value,i.position)||(s=this._getOrReturnCtx(e,s),_e(s,{code:Ae.invalid_string,validation:{includes:i.value,position:i.position},message:i.message}),n.dirty()):i.kind==="toLowerCase"?e.data=e.data.toLowerCase():i.kind==="toUpperCase"?e.data=e.data.toUpperCase():i.kind==="startsWith"?e.data.startsWith(i.value)||(s=this._getOrReturnCtx(e,s),_e(s,{code:Ae.invalid_string,validation:{startsWith:i.value},message:i.message}),n.dirty()):i.kind==="endsWith"?e.data.endsWith(i.value)||(s=this._getOrReturnCtx(e,s),_e(s,{code:Ae.invalid_string,validation:{endsWith:i.value},message:i.message}),n.dirty()):i.kind==="datetime"?fke(i).test(e.data)||(s=this._getOrReturnCtx(e,s),_e(s,{code:Ae.invalid_string,validation:"datetime",message:i.message}),n.dirty()):i.kind==="date"?hke.test(e.data)||(s=this._getOrReturnCtx(e,s),_e(s,{code:Ae.invalid_string,validation:"date",message:i.message}),n.dirty()):i.kind==="time"?pke(i).test(e.data)||(s=this._getOrReturnCtx(e,s),_e(s,{code:Ae.invalid_string,validation:"time",message:i.message}),n.dirty()):i.kind==="duration"?nke.test(e.data)||(s=this._getOrReturnCtx(e,s),_e(s,{validation:"duration",code:Ae.invalid_string,message:i.message}),n.dirty()):i.kind==="ip"?mke(e.data,i.version)||(s=this._getOrReturnCtx(e,s),_e(s,{validation:"ip",code:Ae.invalid_string,message:i.message}),n.dirty()):i.kind==="jwt"?gke(e.data,i.alg)||(s=this._getOrReturnCtx(e,s),_e(s,{validation:"jwt",code:Ae.invalid_string,message:i.message}),n.dirty()):i.kind==="cidr"?yke(e.data,i.version)||(s=this._getOrReturnCtx(e,s),_e(s,{validation:"cidr",code:Ae.invalid_string,message:i.message}),n.dirty()):i.kind==="base64"?uke.test(e.data)||(s=this._getOrReturnCtx(e,s),_e(s,{validation:"base64",code:Ae.invalid_string,message:i.message}),n.dirty()):i.kind==="base64url"?dke.test(e.data)||(s=this._getOrReturnCtx(e,s),_e(s,{validation:"base64url",code:Ae.invalid_string,message:i.message}),n.dirty()):ft.assertNever(i);return{status:n.value,value:e.data}}_regex(e,r,n){return this.refinement(s=>e.test(s),{validation:r,code:Ae.invalid_string,...Fe.errToObj(n)})}_addCheck(e){return new po({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...Fe.errToObj(e)})}url(e){return this._addCheck({kind:"url",...Fe.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...Fe.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...Fe.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...Fe.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...Fe.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...Fe.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...Fe.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...Fe.errToObj(e)})}base64url(e){return this._addCheck({kind:"base64url",...Fe.errToObj(e)})}jwt(e){return this._addCheck({kind:"jwt",...Fe.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...Fe.errToObj(e)})}cidr(e){return this._addCheck({kind:"cidr",...Fe.errToObj(e)})}datetime(e){return typeof e=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:"datetime",precision:typeof(e==null?void 0:e.precision)>"u"?null:e==null?void 0:e.precision,offset:(e==null?void 0:e.offset)??!1,local:(e==null?void 0:e.local)??!1,...Fe.errToObj(e==null?void 0:e.message)})}date(e){return this._addCheck({kind:"date",message:e})}time(e){return typeof e=="string"?this._addCheck({kind:"time",precision:null,message:e}):this._addCheck({kind:"time",precision:typeof(e==null?void 0:e.precision)>"u"?null:e==null?void 0:e.precision,...Fe.errToObj(e==null?void 0:e.message)})}duration(e){return this._addCheck({kind:"duration",...Fe.errToObj(e)})}regex(e,r){return this._addCheck({kind:"regex",regex:e,...Fe.errToObj(r)})}includes(e,r){return this._addCheck({kind:"includes",value:e,position:r==null?void 0:r.position,...Fe.errToObj(r==null?void 0:r.message)})}startsWith(e,r){return this._addCheck({kind:"startsWith",value:e,...Fe.errToObj(r)})}endsWith(e,r){return this._addCheck({kind:"endsWith",value:e,...Fe.errToObj(r)})}min(e,r){return this._addCheck({kind:"min",value:e,...Fe.errToObj(r)})}max(e,r){return this._addCheck({kind:"max",value:e,...Fe.errToObj(r)})}length(e,r){return this._addCheck({kind:"length",value:e,...Fe.errToObj(r)})}nonempty(e){return this.min(1,Fe.errToObj(e))}trim(){return new po({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new po({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new po({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(e=>e.kind==="datetime")}get isDate(){return!!this._def.checks.find(e=>e.kind==="date")}get isTime(){return!!this._def.checks.find(e=>e.kind==="time")}get isDuration(){return!!this._def.checks.find(e=>e.kind==="duration")}get isEmail(){return!!this._def.checks.find(e=>e.kind==="email")}get isURL(){return!!this._def.checks.find(e=>e.kind==="url")}get isEmoji(){return!!this._def.checks.find(e=>e.kind==="emoji")}get isUUID(){return!!this._def.checks.find(e=>e.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(e=>e.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(e=>e.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(e=>e.kind==="cuid2")}get isULID(){return!!this._def.checks.find(e=>e.kind==="ulid")}get isIP(){return!!this._def.checks.find(e=>e.kind==="ip")}get isCIDR(){return!!this._def.checks.find(e=>e.kind==="cidr")}get isBase64(){return!!this._def.checks.find(e=>e.kind==="base64")}get isBase64url(){return!!this._def.checks.find(e=>e.kind==="base64url")}get minLength(){let e=null;for(const r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e}get maxLength(){let e=null;for(const r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e}}po.create=t=>new po({checks:[],typeName:Xe.ZodString,coerce:(t==null?void 0:t.coerce)??!1,...st(t)});function xke(t,e){const r=(t.toString().split(".")[1]||"").length,n=(e.toString().split(".")[1]||"").length,s=r>n?r:n,i=Number.parseInt(t.toFixed(s).replace(".","")),a=Number.parseInt(e.toFixed(s).replace(".",""));return i%a/10**s}class wd extends pt{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==De.number){const i=this._getOrReturnCtx(e);return _e(i,{code:Ae.invalid_type,expected:De.number,received:i.parsedType}),Je}let n;const s=new Jn;for(const i of this._def.checks)i.kind==="int"?ft.isInteger(e.data)||(n=this._getOrReturnCtx(e,n),_e(n,{code:Ae.invalid_type,expected:"integer",received:"float",message:i.message}),s.dirty()):i.kind==="min"?(i.inclusive?e.data<i.value:e.data<=i.value)&&(n=this._getOrReturnCtx(e,n),_e(n,{code:Ae.too_small,minimum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),s.dirty()):i.kind==="max"?(i.inclusive?e.data>i.value:e.data>=i.value)&&(n=this._getOrReturnCtx(e,n),_e(n,{code:Ae.too_big,maximum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),s.dirty()):i.kind==="multipleOf"?xke(e.data,i.value)!==0&&(n=this._getOrReturnCtx(e,n),_e(n,{code:Ae.not_multiple_of,multipleOf:i.value,message:i.message}),s.dirty()):i.kind==="finite"?Number.isFinite(e.data)||(n=this._getOrReturnCtx(e,n),_e(n,{code:Ae.not_finite,message:i.message}),s.dirty()):ft.assertNever(i);return{status:s.value,value:e.data}}gte(e,r){return this.setLimit("min",e,!0,Fe.toString(r))}gt(e,r){return this.setLimit("min",e,!1,Fe.toString(r))}lte(e,r){return this.setLimit("max",e,!0,Fe.toString(r))}lt(e,r){return this.setLimit("max",e,!1,Fe.toString(r))}setLimit(e,r,n,s){return new wd({...this._def,checks:[...this._def.checks,{kind:e,value:r,inclusive:n,message:Fe.toString(s)}]})}_addCheck(e){return new wd({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:Fe.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:Fe.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:Fe.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:Fe.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:Fe.toString(e)})}multipleOf(e,r){return this._addCheck({kind:"multipleOf",value:e,message:Fe.toString(r)})}finite(e){return this._addCheck({kind:"finite",message:Fe.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:Fe.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:Fe.toString(e)})}get minValue(){let e=null;for(const r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e}get maxValue(){let e=null;for(const r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e}get isInt(){return!!this._def.checks.find(e=>e.kind==="int"||e.kind==="multipleOf"&&ft.isInteger(e.value))}get isFinite(){let e=null,r=null;for(const n of this._def.checks){if(n.kind==="finite"||n.kind==="int"||n.kind==="multipleOf")return!0;n.kind==="min"?(r===null||n.value>r)&&(r=n.value):n.kind==="max"&&(e===null||n.value<e)&&(e=n.value)}return Number.isFinite(r)&&Number.isFinite(e)}}wd.create=t=>new wd({checks:[],typeName:Xe.ZodNumber,coerce:(t==null?void 0:t.coerce)||!1,...st(t)});class Zp extends pt{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce)try{e.data=BigInt(e.data)}catch{return this._getInvalidInput(e)}if(this._getType(e)!==De.bigint)return this._getInvalidInput(e);let n;const s=new Jn;for(const i of this._def.checks)i.kind==="min"?(i.inclusive?e.data<i.value:e.data<=i.value)&&(n=this._getOrReturnCtx(e,n),_e(n,{code:Ae.too_small,type:"bigint",minimum:i.value,inclusive:i.inclusive,message:i.message}),s.dirty()):i.kind==="max"?(i.inclusive?e.data>i.value:e.data>=i.value)&&(n=this._getOrReturnCtx(e,n),_e(n,{code:Ae.too_big,type:"bigint",maximum:i.value,inclusive:i.inclusive,message:i.message}),s.dirty()):i.kind==="multipleOf"?e.data%i.value!==BigInt(0)&&(n=this._getOrReturnCtx(e,n),_e(n,{code:Ae.not_multiple_of,multipleOf:i.value,message:i.message}),s.dirty()):ft.assertNever(i);return{status:s.value,value:e.data}}_getInvalidInput(e){const r=this._getOrReturnCtx(e);return _e(r,{code:Ae.invalid_type,expected:De.bigint,received:r.parsedType}),Je}gte(e,r){return this.setLimit("min",e,!0,Fe.toString(r))}gt(e,r){return this.setLimit("min",e,!1,Fe.toString(r))}lte(e,r){return this.setLimit("max",e,!0,Fe.toString(r))}lt(e,r){return this.setLimit("max",e,!1,Fe.toString(r))}setLimit(e,r,n,s){return new Zp({...this._def,checks:[...this._def.checks,{kind:e,value:r,inclusive:n,message:Fe.toString(s)}]})}_addCheck(e){return new Zp({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:Fe.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:Fe.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:Fe.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:Fe.toString(e)})}multipleOf(e,r){return this._addCheck({kind:"multipleOf",value:e,message:Fe.toString(r)})}get minValue(){let e=null;for(const r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e}get maxValue(){let e=null;for(const r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e}}Zp.create=t=>new Zp({checks:[],typeName:Xe.ZodBigInt,coerce:(t==null?void 0:t.coerce)??!1,...st(t)});class R2 extends pt{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==De.boolean){const n=this._getOrReturnCtx(e);return _e(n,{code:Ae.invalid_type,expected:De.boolean,received:n.parsedType}),Je}return Ns(e.data)}}R2.create=t=>new R2({typeName:Xe.ZodBoolean,coerce:(t==null?void 0:t.coerce)||!1,...st(t)});class Qg extends pt{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==De.date){const i=this._getOrReturnCtx(e);return _e(i,{code:Ae.invalid_type,expected:De.date,received:i.parsedType}),Je}if(Number.isNaN(e.data.getTime())){const i=this._getOrReturnCtx(e);return _e(i,{code:Ae.invalid_date}),Je}const n=new Jn;let s;for(const i of this._def.checks)i.kind==="min"?e.data.getTime()<i.value&&(s=this._getOrReturnCtx(e,s),_e(s,{code:Ae.too_small,message:i.message,inclusive:!0,exact:!1,minimum:i.value,type:"date"}),n.dirty()):i.kind==="max"?e.data.getTime()>i.value&&(s=this._getOrReturnCtx(e,s),_e(s,{code:Ae.too_big,message:i.message,inclusive:!0,exact:!1,maximum:i.value,type:"date"}),n.dirty()):ft.assertNever(i);return{status:n.value,value:new Date(e.data.getTime())}}_addCheck(e){return new Qg({...this._def,checks:[...this._def.checks,e]})}min(e,r){return this._addCheck({kind:"min",value:e.getTime(),message:Fe.toString(r)})}max(e,r){return this._addCheck({kind:"max",value:e.getTime(),message:Fe.toString(r)})}get minDate(){let e=null;for(const r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e!=null?new Date(e):null}get maxDate(){let e=null;for(const r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e!=null?new Date(e):null}}Qg.create=t=>new Qg({checks:[],coerce:(t==null?void 0:t.coerce)||!1,typeName:Xe.ZodDate,...st(t)});class ez extends pt{_parse(e){if(this._getType(e)!==De.symbol){const n=this._getOrReturnCtx(e);return _e(n,{code:Ae.invalid_type,expected:De.symbol,received:n.parsedType}),Je}return Ns(e.data)}}ez.create=t=>new ez({typeName:Xe.ZodSymbol,...st(t)});class tz extends pt{_parse(e){if(this._getType(e)!==De.undefined){const n=this._getOrReturnCtx(e);return _e(n,{code:Ae.invalid_type,expected:De.undefined,received:n.parsedType}),Je}return Ns(e.data)}}tz.create=t=>new tz({typeName:Xe.ZodUndefined,...st(t)});class rz extends pt{_parse(e){if(this._getType(e)!==De.null){const n=this._getOrReturnCtx(e);return _e(n,{code:Ae.invalid_type,expected:De.null,received:n.parsedType}),Je}return Ns(e.data)}}rz.create=t=>new rz({typeName:Xe.ZodNull,...st(t)});class L2 extends pt{constructor(){super(...arguments),this._any=!0}_parse(e){return Ns(e.data)}}L2.create=t=>new L2({typeName:Xe.ZodAny,...st(t)});class nz extends pt{constructor(){super(...arguments),this._unknown=!0}_parse(e){return Ns(e.data)}}nz.create=t=>new nz({typeName:Xe.ZodUnknown,...st(t)});class Vo extends pt{_parse(e){const r=this._getOrReturnCtx(e);return _e(r,{code:Ae.invalid_type,expected:De.never,received:r.parsedType}),Je}}Vo.create=t=>new Vo({typeName:Xe.ZodNever,...st(t)});class sz extends pt{_parse(e){if(this._getType(e)!==De.undefined){const n=this._getOrReturnCtx(e);return _e(n,{code:Ae.invalid_type,expected:De.void,received:n.parsedType}),Je}return Ns(e.data)}}sz.create=t=>new sz({typeName:Xe.ZodVoid,...st(t)});class Ei extends pt{_parse(e){const{ctx:r,status:n}=this._processInputParams(e),s=this._def;
vendor: 5,494 bytes, line 1011
1011if(r.parsedType!==De.array)return _e(r,{code:Ae.invalid_type,expected:De.array,received:r.parsedType}),Je;if(s.exactLength!==null){const a=r.data.length>s.exactLength.value,l=r.data.length<s.exactLength.value;(a||l)&&(_e(r,{code:a?Ae.too_big:Ae.too_small,minimum:l?s.exactLength.value:void 0,maximum:a?s.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:s.exactLength.message}),n.dirty())}if(s.minLength!==null&&r.data.length<s.minLength.value&&(_e(r,{code:Ae.too_small,minimum:s.minLength.value,type:"array",inclusive:!0,exact:!1,message:s.minLength.message}),n.dirty()),s.maxLength!==null&&r.data.length>s.maxLength.value&&(_e(r,{code:Ae.too_big,maximum:s.maxLength.value,type:"array",inclusive:!0,exact:!1,message:s.maxLength.message}),n.dirty()),r.common.async)return Promise.all([...r.data].map((a,l)=>s.type._parseAsync(new Wo(r,a,r.path,l)))).then(a=>Jn.mergeArray(n,a));const i=[...r.data].map((a,l)=>s.type._parseSync(new Wo(r,a,r.path,l)));return Jn.mergeArray(n,i)}get element(){return this._def.type}min(e,r){return new Ei({...this._def,minLength:{value:e,message:Fe.toString(r)}})}max(e,r){return new Ei({...this._def,maxLength:{value:e,message:Fe.toString(r)}})}length(e,r){return new Ei({...this._def,exactLength:{value:e,message:Fe.toString(r)}})}nonempty(e){return this.min(1,e)}}Ei.create=(t,e)=>new Ei({type:t,minLength:null,maxLength:null,exactLength:null,typeName:Xe.ZodArray,...st(e)});function Zc(t){if(t instanceof dr){const e={};for(const r in t.shape){const n=t.shape[r];e[r]=Po.create(Zc(n))}return new dr({...t._def,shape:()=>e})}else return t instanceof Ei?new Ei({...t._def,type:Zc(t.element)}):t instanceof Po?Po.create(Zc(t.unwrap())):t instanceof vd?vd.create(Zc(t.unwrap())):t instanceof bc?bc.create(t.items.map(e=>Zc(e))):t}class dr extends pt{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const e=this._def.shape(),r=ft.objectKeys(e);return this._cached={shape:e,keys:r},this._cached}_parse(e){if(this._getType(e)!==De.object){const u=this._getOrReturnCtx(e);return _e(u,{code:Ae.invalid_type,expected:De.object,received:u.parsedType}),Je}const{status:n,ctx:s}=this._processInputParams(e),{shape:i,keys:a}=this._getCached(),l=[];if(!(this._def.catchall instanceof Vo&&this._def.unknownKeys==="strip"))for(const u in s.data)a.includes(u)||l.push(u);const c=[];for(const u of a){const d=i[u],h=s.data[u];c.push({key:{status:"valid",value:u},value:d._parse(new Wo(s,h,s.path,u)),alwaysSet:u in s.data})}if(this._def.catchall instanceof Vo){const u=this._def.unknownKeys;if(u==="passthrough")for(const d of l)c.push({key:{status:"valid",value:d},value:{status:"valid",value:s.data[d]}});else if(u==="strict")l.length>0&&(_e(s,{code:Ae.unrecognized_keys,keys:l}),n.dirty());else if(u!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const u=this._def.catchall;for(const d of l){const h=s.data[d];c.push({key:{status:"valid",value:d},value:u._parse(new Wo(s,h,s.path,d)),alwaysSet:d in s.data})}}return s.common.async?Promise.resolve().then(async()=>{const u=[];for(const d of c){const h=await d.key,p=await d.value;u.push({key:h,value:p,alwaysSet:d.alwaysSet})}return u}).then(u=>Jn.mergeObjectSync(n,u)):Jn.mergeObjectSync(n,c)}get shape(){return this._def.shape()}strict(e){return Fe.errToObj,new dr({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(r,n)=>{var i,a;const s=((a=(i=this._def).errorMap)==null?void 0:a.call(i,r,n).message)??n.defaultError;return r.code==="unrecognized_keys"?{message:Fe.errToObj(e).message??s}:{message:s}}}:{}})}strip(){return new dr({...this._def,unknownKeys:"strip"})}passthrough(){return new dr({...this._def,unknownKeys:"passthrough"})}extend(e){return new dr({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new dr({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:Xe.ZodObject})}setKey(e,r){return this.augment({[e]:r})}catchall(e){return new dr({...this._def,catchall:e})}pick(e){const r={};for(const n of ft.objectKeys(e))e[n]&&this.shape[n]&&(r[n]=this.shape[n]);return new dr({...this._def,shape:()=>r})}omit(e){const r={};for(const n of ft.objectKeys(this.shape))e[n]||(r[n]=this.shape[n]);return new dr({...this._def,shape:()=>r})}deepPartial(){return Zc(this)}partial(e){const r={};for(const n of ft.objectKeys(this.shape)){const s=this.shape[n];e&&!e[n]?r[n]=s:r[n]=s.optional()}return new dr({...this._def,shape:()=>r})}required(e){const r={};for(const n of ft.objectKeys(this.shape))if(e&&!e[n])r[n]=this.shape[n];else{let i=this.shape[n];for(;i instanceof Po;)i=i._def.innerType;r[n]=i}return new dr({...this._def,shape:()=>r})}keyof(){return m9(ft.objectKeys(this.shape))}}dr.create=(t,e)=>new dr({shape:()=>t,unknownKeys:"strip",catchall:Vo.create(),typeName:Xe.ZodObject,...st(e)});dr.strictCreate=(t,e)=>new dr({shape:()=>t,unknownKeys:"strict",catchall:Vo.create(),typeName:Xe.ZodObject,...st(e)});dr.lazycreate=(t,e)=>new dr({shape:t,unknownKeys:"strip",catchall:Vo.create(),typeName:Xe.ZodObject,...st(e)});class ey extends pt{_parse(e){const{ctx:r}=this._processInputParams(e),n=this._def.options;function s(i){for(const l of i)if(l.result.status==="valid")return l.result;for(const l of i)if(l.result.status==="dirty")return r.common.issues.push(...l.ctx.common.issues),l.result;const a=i.map(l=>new wa(l.ctx.common.issues));
vendor: 3,344 bytes, line 1011
1011return _e(r,{code:Ae.invalid_union,unionErrors:a}),Je}if(r.common.async)return Promise.all(n.map(async i=>{const a={...r,common:{...r.common,issues:[]},parent:null};return{result:await i._parseAsync({data:r.data,path:r.path,parent:a}),ctx:a}})).then(s);{let i;const a=[];for(const c of n){const u={...r,common:{...r.common,issues:[]},parent:null},d=c._parseSync({data:r.data,path:r.path,parent:u});if(d.status==="valid")return d;d.status==="dirty"&&!i&&(i={result:d,ctx:u}),u.common.issues.length&&a.push(u.common.issues)}if(i)return r.common.issues.push(...i.ctx.common.issues),i.result;const l=a.map(c=>new wa(c));return _e(r,{code:Ae.invalid_union,unionErrors:l}),Je}}get options(){return this._def.options}}ey.create=(t,e)=>new ey({options:t,typeName:Xe.ZodUnion,...st(e)});function M2(t,e){const r=Wa(t),n=Wa(e);if(t===e)return{valid:!0,data:t};if(r===De.object&&n===De.object){const s=ft.objectKeys(e),i=ft.objectKeys(t).filter(l=>s.indexOf(l)!==-1),a={...t,...e};for(const l of i){const c=M2(t[l],e[l]);if(!c.valid)return{valid:!1};a[l]=c.data}return{valid:!0,data:a}}else if(r===De.array&&n===De.array){if(t.length!==e.length)return{valid:!1};const s=[];for(let i=0;i<t.length;i++){const a=t[i],l=e[i],c=M2(a,l);if(!c.valid)return{valid:!1};s.push(c.data)}return{valid:!0,data:s}}else return r===De.date&&n===De.date&&+t==+e?{valid:!0,data:t}:{valid:!1}}class ty extends pt{_parse(e){const{status:r,ctx:n}=this._processInputParams(e),s=(i,a)=>{if(JA(i)||JA(a))return Je;const l=M2(i.value,a.value);return l.valid?((XA(i)||XA(a))&&r.dirty(),{status:r.value,value:l.data}):(_e(n,{code:Ae.invalid_intersection_types}),Je)};return n.common.async?Promise.all([this._def.left._parseAsync({data:n.data,path:n.path,parent:n}),this._def.right._parseAsync({data:n.data,path:n.path,parent:n})]).then(([i,a])=>s(i,a)):s(this._def.left._parseSync({data:n.data,path:n.path,parent:n}),this._def.right._parseSync({data:n.data,path:n.path,parent:n}))}}ty.create=(t,e,r)=>new ty({left:t,right:e,typeName:Xe.ZodIntersection,...st(r)});class bc extends pt{_parse(e){const{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==De.array)return _e(n,{code:Ae.invalid_type,expected:De.array,received:n.parsedType}),Je;if(n.data.length<this._def.items.length)return _e(n,{code:Ae.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),Je;!this._def.rest&&n.data.length>this._def.items.length&&(_e(n,{code:Ae.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),r.dirty());const i=[...n.data].map((a,l)=>{const c=this._def.items[l]||this._def.rest;return c?c._parse(new Wo(n,a,n.path,l)):null}).filter(a=>!!a);return n.common.async?Promise.all(i).then(a=>Jn.mergeArray(r,a)):Jn.mergeArray(r,i)}get items(){return this._def.items}rest(e){return new bc({...this._def,rest:e})}}bc.create=(t,e)=>{if(!Array.isArray(t))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new bc({items:t,typeName:Xe.ZodTuple,rest:null,...st(e)})};class iz extends pt{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==De.map)return _e(n,{code:Ae.invalid_type,expected:De.map,received:n.parsedType}),Je;const s=this._def.keyType,i=this._def.valueType,a=[...n.data.entries()].map(([l,c],u)=>
vendor: 4,124 bytes, line 1011
1011({key:s._parse(new Wo(n,l,n.path,[u,"key"])),value:i._parse(new Wo(n,c,n.path,[u,"value"]))}));if(n.common.async){const l=new Map;return Promise.resolve().then(async()=>{for(const c of a){const u=await c.key,d=await c.value;if(u.status==="aborted"||d.status==="aborted")return Je;(u.status==="dirty"||d.status==="dirty")&&r.dirty(),l.set(u.value,d.value)}return{status:r.value,value:l}})}else{const l=new Map;for(const c of a){const u=c.key,d=c.value;if(u.status==="aborted"||d.status==="aborted")return Je;(u.status==="dirty"||d.status==="dirty")&&r.dirty(),l.set(u.value,d.value)}return{status:r.value,value:l}}}}iz.create=(t,e,r)=>new iz({valueType:e,keyType:t,typeName:Xe.ZodMap,...st(r)});class Yp extends pt{_parse(e){const{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==De.set)return _e(n,{code:Ae.invalid_type,expected:De.set,received:n.parsedType}),Je;const s=this._def;s.minSize!==null&&n.data.size<s.minSize.value&&(_e(n,{code:Ae.too_small,minimum:s.minSize.value,type:"set",inclusive:!0,exact:!1,message:s.minSize.message}),r.dirty()),s.maxSize!==null&&n.data.size>s.maxSize.value&&(_e(n,{code:Ae.too_big,maximum:s.maxSize.value,type:"set",inclusive:!0,exact:!1,message:s.maxSize.message}),r.dirty());const i=this._def.valueType;function a(c){const u=new Set;for(const d of c){if(d.status==="aborted")return Je;d.status==="dirty"&&r.dirty(),u.add(d.value)}return{status:r.value,value:u}}const l=[...n.data.values()].map((c,u)=>i._parse(new Wo(n,c,n.path,u)));return n.common.async?Promise.all(l).then(c=>a(c)):a(l)}min(e,r){return new Yp({...this._def,minSize:{value:e,message:Fe.toString(r)}})}max(e,r){return new Yp({...this._def,maxSize:{value:e,message:Fe.toString(r)}})}size(e,r){return this.min(e,r).max(e,r)}nonempty(e){return this.min(1,e)}}Yp.create=(t,e)=>new Yp({valueType:t,minSize:null,maxSize:null,typeName:Xe.ZodSet,...st(e)});class az extends pt{get schema(){return this._def.getter()}_parse(e){const{ctx:r}=this._processInputParams(e);return this._def.getter()._parse({data:r.data,path:r.path,parent:r})}}az.create=(t,e)=>new az({getter:t,typeName:Xe.ZodLazy,...st(e)});class oz extends pt{_parse(e){if(e.data!==this._def.value){const r=this._getOrReturnCtx(e);return _e(r,{received:r.data,code:Ae.invalid_literal,expected:this._def.value}),Je}return{status:"valid",value:e.data}}get value(){return this._def.value}}oz.create=(t,e)=>new oz({value:t,typeName:Xe.ZodLiteral,...st(e)});function m9(t,e){return new bd({values:t,typeName:Xe.ZodEnum,...st(e)})}class bd extends pt{_parse(e){if(typeof e.data!="string"){const r=this._getOrReturnCtx(e),n=this._def.values;return _e(r,{expected:ft.joinValues(n),received:r.parsedType,code:Ae.invalid_type}),Je}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(e.data)){const r=this._getOrReturnCtx(e),n=this._def.values;return _e(r,{received:r.data,code:Ae.invalid_enum_value,options:n}),Je}return Ns(e.data)}get options(){return this._def.values}get enum(){const e={};for(const r of this._def.values)e[r]=r;return e}get Values(){const e={};for(const r of this._def.values)e[r]=r;return e}get Enum(){const e={};for(const r of this._def.values)e[r]=r;return e}extract(e,r=this._def){return bd.create(e,{...this._def,...r})}exclude(e,r=this._def){return bd.create(this.options.filter(n=>!e.includes(n)),{...this._def,...r})}}bd.create=m9;class lz extends pt{_parse(e){const r=ft.getValidEnumValues(this._def.values),n=this._getOrReturnCtx(e);if(n.parsedType!==De.string&&n.parsedType!==De.number){const s=ft.objectValues(r);return _e(n,{expected:ft.joinValues(s),received:n.parsedType,code:Ae.invalid_type}),Je}if(this._cache||(this._cache=new Set(ft.getValidEnumValues(this._def.values))),!this._cache.has(e.data)){const s=ft.objectValues(r);return _e(n,{received:n.data,code:Ae.invalid_enum_value,options:s}),Je}return Ns(e.data)}get enum(){return this._def.values}}lz.create=(t,e)=>new lz({values:t,typeName:Xe.ZodNativeEnum,...st(e)});class ry extends pt{unwrap(){return this._def.type}_parse(e){const{ctx:r}=this._processInputParams(e);if(r.parsedType!==De.promise&&r.common.async===!1)return _e(r,{code:Ae.invali
vendor: 4,075 bytes, line 1011
1011d_type,expected:De.promise,received:r.parsedType}),Je;const n=r.parsedType===De.promise?r.data:Promise.resolve(r.data);return Ns(n.then(s=>this._def.type.parseAsync(s,{path:r.path,errorMap:r.common.contextualErrorMap})))}}ry.create=(t,e)=>new ry({type:t,typeName:Xe.ZodPromise,...st(e)});class kd extends pt{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===Xe.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){const{status:r,ctx:n}=this._processInputParams(e),s=this._def.effect||null,i={addIssue:a=>{_e(n,a),a.fatal?r.abort():r.dirty()},get path(){return n.path}};if(i.addIssue=i.addIssue.bind(i),s.type==="preprocess"){const a=s.transform(n.data,i);if(n.common.async)return Promise.resolve(a).then(async l=>{if(r.value==="aborted")return Je;const c=await this._def.schema._parseAsync({data:l,path:n.path,parent:n});return c.status==="aborted"?Je:c.status==="dirty"||r.value==="dirty"?Ch(c.value):c});{if(r.value==="aborted")return Je;const l=this._def.schema._parseSync({data:a,path:n.path,parent:n});return l.status==="aborted"?Je:l.status==="dirty"||r.value==="dirty"?Ch(l.value):l}}if(s.type==="refinement"){const a=l=>{const c=s.refinement(l,i);if(n.common.async)return Promise.resolve(c);if(c instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return l};if(n.common.async===!1){const l=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});return l.status==="aborted"?Je:(l.status==="dirty"&&r.dirty(),a(l.value),{status:r.value,value:l.value})}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(l=>l.status==="aborted"?Je:(l.status==="dirty"&&r.dirty(),a(l.value).then(()=>({status:r.value,value:l.value}))))}if(s.type==="transform")if(n.common.async===!1){const a=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});if(!xd(a))return Je;const l=s.transform(a.value,i);if(l instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:r.value,value:l}}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(a=>xd(a)?Promise.resolve(s.transform(a.value,i)).then(l=>({status:r.value,value:l})):Je);ft.assertNever(s)}}kd.create=(t,e,r)=>new kd({schema:t,typeName:Xe.ZodEffects,effect:e,...st(r)});kd.createWithPreprocess=(t,e,r)=>new kd({schema:e,effect:{type:"preprocess",transform:t},typeName:Xe.ZodEffects,...st(r)});class Po extends pt{_parse(e){return this._getType(e)===De.undefined?Ns(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}Po.create=(t,e)=>new Po({innerType:t,typeName:Xe.ZodOptional,...st(e)});class vd extends pt{_parse(e){return this._getType(e)===De.null?Ns(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}vd.create=(t,e)=>new vd({innerType:t,typeName:Xe.ZodNullable,...st(e)});class D2 extends pt{_parse(e){const{ctx:r}=this._processInputParams(e);let n=r.data;return r.parsedType===De.undefined&&(n=this._def.defaultValue()),this._def.innerType._parse({data:n,path:r.path,parent:r})}removeDefault(){return this._def.innerType}}D2.create=(t,e)=>new D2({innerType:t,typeName:Xe.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...st(e)});class F2 extends pt{_parse(e){const{ctx:r}=this._processInputParams(e),n={...r,common:{...r.common,issues:[]}},s=this._def.innerType._parse({data:n.data,path:n.path,parent:{...n}});return Xg(s)?s.then(i=>({status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new wa(n.common.issues)},input:n.data})})):{status:"valid",value:s.status==="valid"?s.value:this._def.catchValue({get error(){return new wa(n.common.issues)},input:n.data})}}removeCatch(){return this._def.innerType}}F2.create=(t,e)=>new F2({innerType:t,typeName:Xe.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...st(e)});class cz extends pt{_parse(e){if(this._getType(e)!==De.nan){const n=this._getOrReturnCtx(e);
1011return _e(n,{code:Ae.invalid_type,expected:De.nan,received:n.parsedType}),Je}return{status:"valid",value:e.data}}}cz.create=t=>new cz({typeName:Xe.ZodNaN,...st(t)});class wke extends pt{_parse(e){const{ctx:r}=this._processInputParams(e),n=r.data;return this._def.type._parse({data:n,path:r.path,parent:r})}unwrap(){return this._def.type}}class e3 extends pt{_parse(e){const{status:r,ctx:n}=this._processInputParams(e);if(n.common.async)return(async()=>{const i=await this._def.in._parseAsync({data:n.data,path:n.path,parent:n});return i.status==="aborted"?Je:i.status==="dirty"?(r.dirty(),Ch(i.value)):this._def.out._parseAsync({data:i.value,path:n.path,parent:n})})();{const s=this._def.in._parseSync({data:n.data,path:n.path,parent:n});return s.status==="aborted"?Je:s.status==="dirty"?(r.dirty(),{status:"dirty",value:s.value}):this._def.out._parseSync({data:s.value,path:n.path,parent:n})}}static create(e,r){return new e3({in:e,out:r,typeName:Xe.ZodPipeline})}}class B2 extends pt{_parse(e){const r=this._def.innerType._parse(e),n=s=>(xd(s)&&(s.value=Object.freeze(s.value)),s);return Xg(r)?r.then(s=>n(s)):n(r)}unwrap(){return this._def.innerType}}B2.create=(t,e)=>new B2({innerType:t,typeName:Xe.ZodReadonly,...st(e)});var Xe;(function(t){t.ZodString="ZodString",t.ZodNumber="ZodNumber",t.ZodNaN="ZodNaN",t.ZodBigInt="ZodBigInt",t.ZodBoolean="ZodBoolean",t.ZodDate="ZodDate",t.ZodSymbol="ZodSymbol",t.ZodUndefined="ZodUndefined",t.ZodNull="ZodNull",t.ZodAny="ZodAny",t.ZodUnknown="ZodUnknown",t.ZodNever="ZodNever",t.ZodVoid="ZodVoid",t.ZodArray="ZodArray",t.ZodObject="ZodObject",t.ZodUnion="ZodUnion",t.ZodDiscriminatedUnion="ZodDiscriminatedUnion",t.ZodIntersection="ZodIntersection",t.ZodTuple="ZodTuple",t.ZodRecord="ZodRecord",t.ZodMap="ZodMap",t.ZodSet="ZodSet",t.ZodFunction="ZodFunction",t.ZodLazy="ZodLazy",t.ZodLiteral="ZodLiteral",t.ZodEnum="ZodEnum",t.ZodEffects="ZodEffects",t.ZodNativeEnum="ZodNativeEnum",t.ZodOptional="ZodOptional",t.ZodNullable="ZodNullable",t.ZodDefault="ZodDefault",t.ZodCatch="ZodCatch",t.ZodPromise="ZodPromise",t.ZodBranded="ZodBranded",t.ZodPipeline="ZodPipeline",t.ZodReadonly="ZodReadonly"})(Xe||(Xe={}));const hr=po.create,bke=wd.create,$2=R2.create,kke=L2.create;Vo.create;const Mm=Ei.create,na=dr.create;ey.create;ty.create;bc.create;const vke=bd.create;ry.create;Po.create;vd.create;const Ho={register:async t=>(await xe.post(al.auth.register,t)).data,login:async t=>(await xe.post(al.auth.login,t)).data,verify:async t=>(await xe.post(al.auth.verify,t)).data,resendCode:async t=>(await xe.post(al.auth.resendCode,t)).data,forgotPassword:async t=>(await xe.post(al.auth.forgotPassword,t)).data,googleLogin:async t=>(await xe.post("/auth/google",{googleToken:t})).data,resetPassword:async t=>(await xe.post(al.auth.resetPassword,t)).data,me:async()=>(await xe.get(al.auth.me)).data},g9=IS.recaptchaSiteKey,uz="recaptcha-api-script",jke=1e4,Ske=1e4;let hh=null;const U2=()=>hh||(hh=new Promise((t,e)=>{var i;if((i=window.grecaptcha)!=null&&i.execute){t();return}const r=document.getElementById(uz);r&&r.remove();const n=document.createElement("script");n.id=uz,n.src=`https://www.google.com/recaptcha/api.js?render=${g9}`,n.async=!0;const s=setTimeout(()=>{e(new Error("reCAPTCHA: timeout ładowania skryptu"))},jke);n.onload=()=>{var a;clearTimeout(s),(a=window.grecaptcha)!=null&&a.ready?window.grecaptcha.ready(()=>t()):t()},n.onerror=()=>{clearTimeout(s),e(new Error("reCAPTCHA: nie udało się załadować skryptu Google"))},document.head.appendChild(n)}).catch(t=>{throw hh=null,t}),hh),kx=async t=>{try{await U2()}catch{await U2()}return new Promise((e,r)=>{const n=setTimeout(()=>{r(new Error("reCAPTCHA: timeout wykonania"))},Ske);try{window.grecaptcha.ready(()=>{window.grecaptcha.execute(g9,{action:t}).then(s=>{clearTimeout(n),e(s)}).catch(s=>{clearTimeout(n),r(s)})})}catch(s){clearTimeout(n),r(s)}})},Nke=()=>{const{t}=He("auth"),e=Vr(),[r,n]=M.useState(!1),[s,i]=M.useState(!1),[a,l]=M.useState(!1),{setAuth:c}=$r(),u=na({firstName:hr().optional(),lastName:hr().optional(),email:hr().email(t("register.email.error")).min(1,t("register.email.required")),password:hr().min(8,t("register.password.minLength")).regex(/[A-Z]/,t("register.password.uppercase")).regex(/[a-z]/,t("register.password.lowercase")).regex(/[0-9]/,t("register.password.number")),confirmPassword:hr().min(1,t("register.confirmPassword.required")),acceptedTerms:$2().refine(x=>x===!0,{message:t("register.terms.required")})}).refine(x=>x.password===x.confirmPassword,{message:t("register.confirmPassword.mismatch"),path:["confirmPassword"]}),{register:d,handleSubmit:h,watch:p,formState:{errors:f}}=Dd({resolver:Fd(u)}),m=p("password",""),y={hasMinLength:m.length>=8,hasUpperCase:/[A-Z]/.test(m),hasLowerCase:/[a-z]/.test(m),hasNumber:/[0-9]/.test(m)},k=async x=>{var w;l(!0);try{const b=await kx("register"),v=await Ho.register({email:x.email,password:x.password,firstName:x.firstName,lastName:x.lastName,acceptedTerms:x.acceptedTerms,recaptchaToken:b});le.success(v.message),(w=window.gtag)==null||w.call(window,"event","sign_up",{method:"email"}),e("/verify",{state:{email:x.email}})}catch(b){const v=Fo(b);
1011v.includes("Kod weryfikacyjny został już wysłany")||v.includes("Verification code already sent")?(le.error(v,{duration:5e3}),e("/verify",{state:{email:x.email}})):le.error(v)}finally{l(!1)}},g=async x=>{var w;try{const b=await Ho.googleLogin(x.credential);le.success(t("register.googleSuccess")),b.isNewUser&&((w=window.gtag)==null||w.call(window,"event","sign_up",{method:"google"})),b.accessToken&&b.refreshToken&&b.user&&(c(b.user,b.accessToken,b.refreshToken),b.user.role==="ADMIN"?e("/admin"):e("/dashboard"))}catch(b){const v=Fo(b);le.error(v)}};return M.useEffect(()=>h9({elementId:"googleButtonRegister",callback:g,text:"signup_with"}),[]),o.jsxs(o.Fragment,{children:[o.jsx("div",{className:"google-button-wrapper mb-4",children:o.jsx("div",{id:"googleButtonRegister",style:{width:"100%"}})}),o.jsxs("div",{className:"relative my-6",children:[o.jsx("div",{className:"absolute inset-0 flex items-center",children:o.jsx("div",{className:"w-full border-t border-gray-300 dark:border-gray-600"})}),o.jsx("div",{className:"relative flex justify-center text-sm",children:o.jsx("span",{className:"px-2 bg-white dark:bg-gray-800 text-gray-500 dark:text-gray-400",children:t("register.or")})})]}),o.jsxs("form",{onSubmit:h(k),className:"space-y-5",children:[o.jsx("div",{className:"grid grid-cols-1 gap-4",children:o.jsxs("div",{children:[o.jsx("label",{className:"block text-sm font-medium text-gray-600 dark:text-gray-300 mb-2",children:t("register.firstName.label")}),o.jsxs("div",{className:"relative",children:[o.jsx(Ay,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-5 h-5 text-gray-400"}),o.jsx("input",{...d("firstName"),type:"text",placeholder:t("register.firstName.placeholder"),className:"input pl-10 text-gray-600 dark:text-gray-300 bg-white dark:bg-gray-800"})]})]})}),o.jsxs("div",{children:[o.jsx("label",{className:"block text-sm font-medium text-gray-600 dark:text-gray-300 bg-white dark:bg-gray-800 mb-2",children:t("register.email.label")}),o.jsxs("div",{className:"relative",children:[o.jsx(dc,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-5 h-5 text-gray-400"}),o.jsx("input",{...d("email"),type:"email",placeholder:t("register.email.placeholder"),className:`input text-gray-600 dark:text-gray-300 bg-white dark:bg-gray-800 pl-10 ${f.email?"input-error":""}`})]}),f.email&&o.jsx("p",{className:"text-red-500 text-sm mt-1",children:f.email.message})]}),o.jsxs("div",{children:[o.jsx("label",{className:"block text-sm font-medium text-gray-600 dark:text-gray-300 bg-white dark:bg-gray-800 mb-2",children:t("register.password.label")}),o.jsxs("div",{className:"relative",children:[o.jsx(ku,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-5 h-5 text-gray-400"}),o.jsx("input",{...d("password"),type:r?"text":"password",placeholder:t("register.password.placeholder"),className:`input text-gray-600 dark:text-gray-300 bg-white dark:bg-gray-800 pl-10 pr-10 ${f.password?"input-error":""}`}),o.jsx("button",{type:"button",onClick:()=>n(!r),className:"absolute right-3 top-1/2 -translate-y-1/2 text-gray-400 hover:text-gray-600 dark:text-gray-300",children:r?o.jsx(Cp,{className:"w-5 h-5"}):o.jsx(Ks,{className:"w-5 h-5"})})]}),f.password&&o.jsx("p",{className:"text-red-500 text-sm mt-1",children:f.password.message}),m&&o.jsxs("div",{className:"mt-3 space-y-2",children:[o.jsxs("div",{className:"flex items-center gap-2 text-sm",children:[o.jsx(Bs,{className:`w-4 h-4 ${y.hasMinLength?"text-green-500":"text-gray-300"}`}),o.jsx("span",{className:y.hasMinLength?"text-green-600":"text-gray-500 dark:text-gray-400",children:t("register.passwordStrength.minLength")})]}),o.jsxs("div",{className:"flex items-center gap-2 text-sm",children:[o.jsx(Bs,{className:`w-4 h-4 ${y.hasUpperCase?"text-green-500":"text-gray-300"}`}),o.jsx("span",{className:y.hasUpperCase?"text-green-600":"text-gray-500 dark:text-gray-400",children:t("register.passwordStrength.uppercase")})]}),o.jsxs("div",{className:"flex items-center gap-2 text-sm",children:[o.jsx(Bs,{className:`w-4 h-4 ${y.hasLowerCase?"text-green-500":"text-gray-300"}`}),o.jsx("span",{className:y.hasLowerCase?"text-green-600":"text-gray-500 dark:text-gray-400",children:t("register.passwordStrength.lowercase")})]}),o.jsxs("div",{className:"flex items-center gap-2 text-sm",children:[o.jsx(Bs,{className:`w-4 h-4 ${y.hasNumber?"text-green-500":"text-gray-300"}`}),o.jsx("span",{className:y.hasNumber?"text-green-600":"text-gray-500 dark:text-gray-400",children:t("register.passwordStrength.number")})]})]})]}),o.jsxs("div",{children:[o.jsx("label",{className:"block text-sm font-medium text-gray-600 dark:text-gray-300 bg-white dark:bg-gray-800 mb
1011-2",children:t("register.confirmPassword.label")}),o.jsxs("div",{className:"relative",children:[o.jsx(ku,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-5 h-5 text-gray-400"}),o.jsx("input",{...d("confirmPassword"),type:s?"text":"password",placeholder:t("register.confirmPassword.placeholder"),className:`input pl-10 text-gray-600 dark:text-gray-300 bg-white dark:bg-gray-800 pr-10 ${f.confirmPassword?"input-error":""}`}),o.jsx("button",{type:"button",onClick:()=>i(!s),className:"absolute right-3 top-1/2 -translate-y-1/2 text-gray-400 hover:text-gray-600 dark:text-gray-300",children:s?o.jsx(Cp,{className:"w-5 h-5"}):o.jsx(Ks,{className:"w-5 h-5"})})]}),f.confirmPassword&&o.jsx("p",{className:"text-red-500 text-sm mt-1",children:f.confirmPassword.message})]}),o.jsxs("div",{children:[o.jsxs("label",{className:"flex items-start gap-3 cursor-pointer",children:[o.jsx("input",{...d("acceptedTerms"),type:"checkbox",className:"w-5 h-5 mt-0.5 text-purple-600 rounded focus:ring-2 focus:ring-purple-500"}),o.jsxs("span",{className:"text-sm text-gray-600 dark:text-gray-300",children:[t("register.terms.accept")," ",o.jsx("a",{href:vu("terms"),target:"_blank",rel:"noopener noreferrer",className:"text-purple-600 hover:underline",children:t("register.terms.termsLink")})," ",t("register.terms.and")," ",o.jsx("a",{href:vu("privacy"),target:"_blank",rel:"noopener noreferrer",className:"text-purple-600 hover:underline",children:t("register.terms.privacyLink")})]})]}),f.acceptedTerms&&o.jsx("p",{className:"text-red-500 text-sm mt-1",children:f.acceptedTerms.message})]}),o.jsx("button",{type:"submit",disabled:a,className:"w-full btn btn-primary py-3 text-lg disabled:opacity-50",children:a?o.jsxs(o.Fragment,{children:[o.jsx(dt,{className:"w-5 h-5 animate-spin mr-2"}),t("register.submitting")]}):t("register.submit")})]}),o.jsxs("p",{className:"text-xs text-gray-500 text-center mt-4",children:[t("register.recaptcha.protected")," ",o.jsx("a",{href:"https://policies.google.com/privacy",target:"_blank",rel:"noopener noreferrer",className:"text-purple-600 dark:text-purple-400 hover:underline",children:t("register.recaptcha.privacy")})," ",t("register.recaptcha.and")," ",o.jsx("a",{href:"https://policies.google.com/terms",target:"_blank",rel:"noopener noreferrer",className:"text-purple-600 dark:text-purple-400 hover:underline",children:t("register.recaptcha.terms")}),"."]}),o.jsxs("p",{className:"text-center text-gray-600 dark:text-gray-400 bg-white dark:bg-gray-800 mt-6",children:[t("register.hasAccount")," ",o.jsx(ze,{to:"/login",className:"text-purple-600 hover:underline font-medium",children:t("register.login")})]})]})},Cke=()=>{const{t}=He("auth");return o.jsxs(o.Fragment,{children:[o.jsx(Ys,{children:o.jsx("meta",{name:"robots",content:"noindex, nofollow"})}),o.jsx(r9,{title:t("register.title"),subtitle:t("register.subtitle"),badge:t("panel.register.badge"),headline:o.jsxs(o.Fragment,{children:[t("panel.register.headlineA"),o.jsx("br",{}),o.jsx("span",{className:"text-purple-200",children:t("panel.register.headlineB")})]}),lead:t("panel.register.lead"),points:[{icon:o.jsx(_i,{className:"h-[18px] w-[18px]"}),title:t("panel.register.p1t"),desc:t("panel.register.p1d")},{icon:o.jsx(tS,{className:"h-[18px] w-[18px]"}),title:t("panel.register.p2t"),desc:t("panel.register.p2d")},{icon:o.jsx(Gs,{className:"h-[18px] w-[18px]"}),title:t("panel.register.p3t"),desc:t("panel.register.p3d")}],children:o.jsx(Nke,{})})]})},Eke=()=>{const{t}=He("auth"),e=Vr(),r=new URLSearchParams(window.location.search).get("next"),n=r&&r.startsWith("/")&&!r.startsWith("//")?r:null,{setAuth:s}=$r(),[i,a]=M.useState(!1),[l,c]=M.useState(!1),u=na({email:hr().email(t("login.email.error")).min(1,t("login.email.required")),password:hr().min(1,t("login.password.required"))}),{register:d,handleSubmit:h,formState:{errors:p}}=Dd({resolver:Fd(u)}),f=async y=>{var k;try{const g=await Ho.googleLogin(y.credential);le.success(t("login.success")),g.isNewUser&&((k=window.gtag)==null||k.call(window,"event","sign_up",{method:"google"})),g.accessToken&&g.refreshToken&&g.user&&(s(g.user,g.accessToken,g.refreshToken),n?e(n):g.user.role==="ADMIN"?e("/admin"):e("/dashboard"))}catch(g){const x=Fo(g);le.error(x)}};M.useEffect(()=>h9({elementId:"googleButton",callback:f,text:"continue_with"}),[]);const m=async y=>{c(!0);
1011try{const k=await kx("login"),g=await Ho.login({email:y.email,password:y.password,recaptchaToken:k});le.success(t("login.success")),g.accessToken&&g.refreshToken&&g.user&&(s(g.user,g.accessToken,g.refreshToken),n?e(n):g.user.role==="ADMIN"?e("/admin"):e("/dashboard"))}catch(k){const g=Fo(k);g.includes("nie został zweryfikowany")||g.includes("not verified")?(le.error(g),e("/verify",{state:{email:y.email}})):le.error(g)}finally{c(!1)}};return o.jsxs(o.Fragment,{children:[o.jsx("div",{className:"google-button-wrapper mb-4",children:o.jsx("div",{id:"googleButton",style:{width:"100%"}})}),o.jsxs("div",{className:"relative my-6",children:[o.jsx("div",{className:"absolute inset-0 flex items-center",children:o.jsx("div",{className:"w-full border-t border-gray-300 dark:border-gray-600"})}),o.jsx("div",{className:"relative flex justify-center text-sm",children:o.jsx("span",{className:"px-2 bg-white dark:bg-gray-800 text-gray-500 dark:text-gray-400",children:t("login.or")})})]}),o.jsxs("form",{onSubmit:h(m),className:"space-y-5",children:[o.jsxs("div",{children:[o.jsx("label",{className:"block text-sm font-medium text-gray-600 dark:text-gray-300 mb-2",children:t("login.email.label")}),o.jsxs("div",{className:"relative",children:[o.jsx(dc,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-5 h-5 text-gray-600 dark:text-gray-300"}),o.jsx("input",{...d("email"),type:"email",placeholder:t("login.email.placeholder"),className:`input pl-10 text-gray-700 dark:text-gray-300 bg-white dark:bg-gray-800 ${p.email?"input-error":""}`,autoComplete:"email"})]}),p.email&&o.jsx("p",{className:"text-red-500 text-sm mt-1",children:p.email.message})]}),o.jsxs("div",{children:[o.jsxs("div",{className:"flex items-center justify-between mb-2",children:[o.jsx("label",{className:"block text-sm font-medium text-gray-700 dark:text-gray-300",children:t("login.password.label")}),o.jsx(ze,{to:"/forgot-password",className:"text-sm text-purple-600 hover:underline",children:t("login.password.forgot")})]}),o.jsxs("div",{className:"relative",children:[o.jsx(ku,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-5 h-5 text-gray-400"}),o.jsx("input",{...d("password"),type:i?"text":"password",placeholder:t("login.password.placeholder"),className:`input bg-white dark:bg-gray-800 text-gray-700 dark:text-gray-300 pl-10 pr-10 ${p.password?"input-error":""}`,autoComplete:"current-password"}),o.jsx("button",{type:"button",onClick:()=>a(!i),className:"absolute right-3 top-1/2 -translate-y-1/2 text-gray-400 hover:text-gray-600 dark:text-gray-300",children:i?o.jsx(Cp,{className:"w-5 h-5"}):o.jsx(Ks,{className:"w-5 h-5"})})]}),p.password&&o.jsx("p",{className:"text-red-500 text-sm mt-1",children:p.password.message})]}),o.jsx("button",{type:"submit",disabled:l,className:"w-full btn btn-primary py-3 text-lg",children:l?o.jsxs(o.Fragment,{children:[o.jsx(dt,{className:"w-5 h-5 animate-spin mr-2"}),t("login.submitting")]}):t("login.submit")})]}),o.jsxs("p",{className:"text-xs text-gray-500 text-center mt-4",children:[t("login.recaptcha.protected")," ",o.jsx("a",{href:"https://policies.google.com/privacy",target:"_blank",rel:"noopener noreferrer",className:"text-purple-600 dark:text-purple-400 hover:underline",children:t("login.recaptcha.privacy")})," ",t("login.recaptcha.and")," ",o.jsx("a",{href:"https://policies.google.com/terms",target:"_blank",rel:"noopener noreferrer",className:"text-purple-600 dark:text-purple-400 hover:underline",children:t("login.recaptcha.terms")}),"."]}),o.jsxs("p",{className:"text-center text-gray-700 dark:text-gray-400 mt-6",children:[t("login.noAccount")," ",o.jsx(ze,{to:"/register",className:"text-purple-600 hover:underline font-medium",children:t("login.register")})]})]})},Tke=()=>{const{t}=He("auth");return o.jsxs(o.Fragment,{children:[o.jsx(Ys,{children:o.jsx("meta",{name:"robots",content:"noindex, nofollow"})}),o.jsx(r9,{title:t("login.title"),subtitle:t("login.subtitle"),badge:t("panel.login.badge"),headline:o.jsxs(o.Fragment,{children:[t("panel.login.headlineA"),o.jsx("br",{}),o.jsx("span",{className:"text-purple-200",children:t("panel.login.headlineB")})]}),lead:t("panel.login.lead"),points:[{icon:o.jsx(Jt,{className:"h-[18px] w-[18px]"}),title:t("panel.login.p1t"),desc:t("panel.login.p1d")},{icon:o.jsx(BV,{className:"h-[18px] w-[18px]"}),title:t("panel.login.p2t"),desc:t("panel.login.p2d")},{icon:o.jsx(zy,{className:"h-[18px] w-[18px]"}),title:t("panel.login.p3t"),desc:t("panel.login.p3d")}],children:o.jsx(Eke,{})})]})},Ake=[2e3,3e3,4e3,5e3,6e3,7e3,8e3,1e4,12e3,15e3,2e4,25e3,3e4,4e4,5e4,7e4,1e5,15e4,2e5,3e5],zke=Array.from({length:150},(t,e)=>e+1),dz=2e3,Pke=({unit:t,value:e,onSelect:r})=>{const{t:n}=He("order-form"),[s,i]=M.useState(!1),a=M.useRef(null);M.useEffect(()=>{if(!s)return;const p=m=>{a.current&&!a.current.contains(m.target)&&i(!1)},f=m=>{m.key==="Escape"&&i(!1)};return document.addEventListener("mousedown",p),document.addEventListener("keydown",f),()=>{document.removeEventListener("mousedown",p),document.removeEventListener("keydown",f)}},[s]);const l=p=>p===1?n("form.length.pagesLabel_one"):p>=2&&p<=4?n("form.length.pagesLabel_few"):n("form.length.pagesLabel_many"),c=n("form.length.charactersLabel"),u=t==="PAGES"?zke:Ake,d=p=>
1011{if(t==="PAGES"){const m=p*dz;return`${p} ${l(p)} · ${m.toLocaleString()} ${c}`}const f=Math.ceil(p/dz);return`${p.toLocaleString()} ${c} · ${f} ${l(f)}`},h=u.includes(e)||e>=2e3;return o.jsxs("div",{ref:a,className:"relative mb-3",children:[o.jsx("label",{className:"block text-xs font-semibold text-gray-500 dark:text-gray-400 mb-1.5",children:n("form.length.presetLabel")}),o.jsxs("button",{type:"button",onClick:()=>i(p=>!p),"aria-haspopup":"listbox","aria-expanded":s,className:"input w-full flex items-center justify-between gap-2 bg-white dark:bg-gray-800 text-gray-900 dark:text-white cursor-pointer",children:[o.jsx("span",{className:h?"":"text-gray-400 dark:text-gray-500 font-normal",children:h?d(e):n("form.length.presetPlaceholder")}),o.jsx(Ti,{className:`w-5 h-5 text-gray-400 flex-shrink-0 transition-transform duration-200 ${s?"rotate-180":""}`})]}),o.jsx(jt,{children:s&&o.jsx(ue.ul,{role:"listbox",initial:{opacity:0,y:-6},animate:{opacity:1,y:0},exit:{opacity:0,y:-6},transition:{duration:.16,ease:"easeOut"},className:"absolute z-20 mt-2 w-full max-h-72 overflow-auto rounded-lg border border-gray-200 dark:border-gray-700 bg-white dark:bg-gray-800 shadow-xl py-1",children:u.map(p=>{const f=p===e;return o.jsx("li",{role:"option","aria-selected":f,children:o.jsxs("button",{type:"button",onClick:()=>{r(p),i(!1)},className:`w-full text-left px-4 py-2 text-sm flex items-center justify-between gap-2 transition-colors ${f?"bg-purple-50 dark:bg-purple-900/30 text-purple-700 dark:text-purple-300 font-semibold":"text-gray-700 dark:text-gray-200 hover:bg-gray-100 dark:hover:bg-gray-700"}`,children:[o.jsx("span",{children:d(p)}),f&&o.jsx(On,{className:"w-4 h-4 flex-shrink-0"})]})},p)})})})]})},y9=12*6e4;function W2(t){return t.authType==="connector"?t.lastPollAt&&Date.now()-new Date(t.lastPollAt).getTime()<y9?"connected":t.lastPollAt||t.verifiedAt?"stale":"pending":t.verifiedAt?"connected":"pending"}function x9(t){return t==="connected"?"bg-emerald-500":t==="stale"?"bg-amber-500":"bg-gray-400"}function V2(t,e){const r=Math.max(0,Math.round((Date.now()-new Date(t).getTime())/6e4));if(r<1)return e?"przed chwilą":"just now";if(r<60)return`${r} min`;const n=Math.round(r/60);return e?`${n} godz.`:`${n} h`}const _ke="https://wordpress.org/plugins/smart-copy-connector/";function hz(){const t=new Date(Date.now()+9e5);t.setSeconds(0,0);const e=r=>String(r).padStart(2,"0");return`${t.getFullYear()}-${e(t.getMonth()+1)}-${e(t.getDate())}T${e(t.getHours())}:${e(t.getMinutes())}`}const pz="fixed inset-0 z-[100] flex items-center justify-center p-4 bg-black/50 backdrop-blur-sm",fz="w-full max-w-md rounded-2xl bg-white dark:bg-gray-800 shadow-2xl border border-gray-200 dark:border-gray-700 overflow-hidden",w9=({value:t,onChange:e,status:r,onStatusChange:n,scheduledAt:s,onScheduledAtChange:i})=>{var de;const{t:a,i18n:l}=He("order-detail"),c=((de=l.language)==null?void 0:de.startsWith("pl"))??!1,[u,d]=M.useState(!1),[h,p]=M.useState("connector"),[f,m]=M.useState({baseUrl:"",wpUsername:"",appPassword:"",connectorKey:""}),[y,k]=M.useState(!1),[g,x]=M.useState(!1),[w,b]=M.useState(null),[v,A]=M.useState(""),[C,_]=M.useState({wpUsername:"",appPassword:""}),{data:N,refetch:W}=mt({queryKey:["wp-sites"],queryFn:async()=>(await xe.get("/wp/sites")).data,refetchInterval:y?15e3:6e4}),K=N==null?void 0:N.find(G=>G.id===t),T=Be({mutationFn:async()=>{const G=h==="connector"?{method:"connector",baseUrl:f.baseUrl,connectorKey:f.connectorKey}:{baseUrl:f.baseUrl,wpUsername:f.wpUsername,appPassword:f.appPassword};return(await xe.post("/wp/sites",G)).data},onSuccess:G=>{G.pendingVerification?le.success(a("wp.pendingVerification"),{duration:12e3}):le.success(a("wp.siteAdded")),d(!1),m({baseUrl:"",wpUsername:"",appPassword:"",connectorKey:""}),W().then(()=>e(G.id))},onError:G=>{var B,re;return le.error(((re=(B=G.response)==null?void 0:B.data)==null?void 0:re.error)||a("wp.error"),{duration:8e3})}}),F=Be({mutationFn:async G=>(await xe.post(`/wp/sites/${G}/verify`)).data,onSuccess:G=>{if(W(),G.ok)b({state:"ok"});else if(G.hostBlocked){const B=G.lastPollAt&&Date.now()-new Date(G.lastPollAt).getTime()<72e4;b(B?{state:"ok"}:{state:"pending",message:a("wp.manage.checkPending")})}else b({state:"error",message:G.error})},onError:G=>{var B,re;return b({state:"error",message:((re=(B=G.response)==null?void 0:B.data)==null?void 0:re.error)||a("wp.error")})}}),E=Be({mutationFn:async G=>{const B=(K==null?void 0:K.authType)==="connector"?{connectorKey:v}:C;return(await xe.patch(`/wp/sites/${G}`,B)).data},onSuccess:G=>{le.success(G.pendingVerification?a("wp.manage.keyUpdatedPending"):a("wp.manage.keyUpdated"),{duration:G.pendingVerification?1e4:4e3}),A(""),_({wpUsername:"",appPassword:""}),b(null),W(),k(!1)},onError:G=>{var B,re;return le.error(((re=(B=G.response)==null?void 0:B.data)==null?void 0:re.error)||a("wp.error"),{duration:8e3})}}),H=Be({mutationFn:async G=>
1011{await xe.delete(`/wp/sites/${G}`)},onSuccess:()=>{le.success(a("wp.manage.deleted")),x(!1),e(""),W()},onError:G=>{var B,re;return le.error(((re=(B=G.response)==null?void 0:B.data)==null?void 0:re.error)||a("wp.error"),{duration:8e3})}}),Y=((N==null?void 0:N.length)??0)>0,$=K?W2(K):null,D=x9($),J=K?$==="connected"?K.authType==="connector"&&K.lastPollAt?a("wp.manage.statusConnectedAgo",{ago:V2(K.lastPollAt,c)}):a("wp.manage.statusConnected"):$==="stale"?a("wp.manage.statusStale",{ago:V2(K.lastPollAt||K.verifiedAt,c)}):a("wp.manage.statusPending"):"";return o.jsxs("div",{children:[Y&&o.jsxs("select",{value:t,onChange:G=>e(G.target.value),className:"input w-full bg-white dark:bg-gray-800 text-gray-900 dark:text-white",children:[o.jsx("option",{value:"",children:a("wp.noPublish")}),N.map(G=>o.jsx("option",{value:G.id,children:G.name},G.id))]}),K&&o.jsxs("div",{className:"flex items-center gap-2 mt-2 px-3 py-2 rounded-lg bg-gray-50 dark:bg-gray-700/40 border border-gray-200 dark:border-gray-600",children:[o.jsxs("span",{className:"relative flex w-2.5 h-2.5 shrink-0",children:[$==="connected"&&o.jsx("span",{className:"absolute inline-flex h-full w-full rounded-full bg-emerald-400 opacity-60 animate-ping"}),o.jsx("span",{className:`relative inline-flex rounded-full w-2.5 h-2.5 ${D}`})]}),o.jsx("span",{className:"text-xs text-gray-600 dark:text-gray-300 flex-1 truncate",children:J}),o.jsx("button",{type:"button",title:a("wp.manage.title"),onClick:()=>{b(null),k(!0),F.mutate(K.id)},className:"p-1.5 rounded-md text-gray-400 hover:text-purple-600 dark:hover:text-purple-400 hover:bg-purple-50 dark:hover:bg-purple-900/30 transition-colors",children:o.jsx(Lo,{className:"w-4 h-4"})}),o.jsx("button",{type:"button",title:a("wp.manage.deleteTitle"),onClick:()=>x(!0),className:"p-1.5 rounded-md text-gray-400 hover:text-red-600 dark:hover:text-red-400 hover:bg-red-50 dark:hover:bg-red-900/30 transition-colors",children:o.jsx(yt,{className:"w-4 h-4"})})]}),!Y&&!u&&o.jsxs("div",{className:"p-3 rounded-lg bg-gray-50 dark:bg-gray-700/40 border border-dashed border-gray-300 dark:border-gray-600",children:[o.jsx("p",{className:"text-xs text-gray-600 dark:text-gray-400 mb-2",children:a("wp.noSitesYet")}),o.jsx("button",{type:"button",onClick:()=>d(!0),className:"btn btn-secondary text-xs",children:a("wp.connectFirst")})]}),Y&&!u&&o.jsx("button",{type:"button",onClick:()=>d(!0),className:"mt-1 text-xs text-purple-600 dark:text-purple-400 hover:underline",children:a("wp.addAnother")}),u&&o.jsxs("div",{className:"mt-2 space-y-2 p-3 rounded-lg bg-gray-50 dark:bg-gray-700/40 border border-gray-200 dark:border-gray-600",children:[o.jsxs("div",{className:"flex gap-1 mb-1",children:[o.jsx("button",{type:"button",onClick:()=>p("connector"),className:`px-3 py-1.5 text-xs rounded-lg border ${h==="connector"?"bg-purple-600 text-white border-purple-600":"bg-white dark:bg-gray-800 text-gray-600 dark:text-gray-300 border-gray-300 dark:border-gray-600"}`,children:a("wp.methodConnector")}),o.jsx("button",{type:"button",onClick:()=>p("app-password"),className:`px-3 py-1.5 text-xs rounded-lg border ${h==="app-password"?"bg-purple-600 text-white border-purple-600":"bg-white dark:bg-gray-800 text-gray-600 dark:text-gray-300 border-gray-300 dark:border-gray-600"}`,children:a("wp.methodAppPass")})]}),o.jsx("input",{type:"text",placeholder:a("wp.urlPlaceholder"),value:f.baseUrl,onChange:G=>m({...f,baseUrl:G.target.value}),className:"input w-full bg-white dark:bg-gray-800 text-gray-900 dark:text-white"}),h==="connector"?o.jsxs(o.Fragment,{children:[o.jsxs("a",{href:_ke,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-2 px-3 py-2 rounded-lg bg-purple-600 hover:bg-purple-700 text-white text-xs font-semibold",children:[o.jsx(Ty,{className:"w-4 h-4"}),a("wp.downloadPlugin")]}),o.jsx("p",{className:"text-[11px] text-gray-600 dark:text-gray-300",children:a("wp.connectorSteps")}),o.jsx("input",{type:"text",placeholder:a("wp.connectorKeyPlaceholder"),value:f.connectorKey,onChange:G=>m({...f,connectorKey:G.target.value}),className:"input w-full font-mono text-sm bg-white dark:bg-gray-800 text-gray-900 dark:text-white"}),o.jsx("p",{className:"text-[11px] text-gray-500 dark:text-gray-400",children:a("wp.connectorWhy")})]}):o.jsxs(o.Fragment,{children:[o.jsx("input",{type:"text",placeholder:a("wp.userPlaceholder"),value:f.wpUsername,onChange:G=>m({...f,wpUsername:G.target.value}),className:"input w-full bg-white dark:bg-gray-800 text-gray-900 dark:text-white"}),o.jsx("input",{type:"password",placeholder:a("wp.passPlaceholder"),value:f.appPassword,onChange:G=>m({...f,appPassword:G.target.value}),className:"input w-full bg-white dark:bg-gray-800 text-gray-900 dark:text-white"}),o.jsx("p",{className:"text-[11px] text-gray-500 dark:text-gray-400",children:a("wp.appPasswordHint")})]}),o.jsxs("div",{className:"flex gap-2",children:[o.jsx("button",{type:"button",onClick:()=>T.mutate(),disabled:!f.baseUrl||(h==="connector"?!f.connectorKey:!f.wpUsername||!f.appPassword)||T.
1011isPending,className:"btn btn-primary text-xs disabled:opacity-50",children:T.isPending?a("wp.verifying"):a("wp.addSite")}),o.jsx("button",{type:"button",onClick:()=>d(!1),className:"btn btn-secondary text-xs",children:a("revision.cancel")})]})]}),t&&o.jsxs(o.Fragment,{children:[o.jsxs("div",{className:"flex items-center gap-4 mt-2 flex-wrap",children:[o.jsxs("label",{className:"flex items-center gap-1.5 text-sm text-gray-700 dark:text-gray-300",children:[o.jsx("input",{type:"radio",checked:r==="draft",onChange:()=>n("draft")}),a("wp.asDraft")]}),o.jsxs("label",{className:"flex items-center gap-1.5 text-sm text-gray-700 dark:text-gray-300",children:[o.jsx("input",{type:"radio",checked:r==="publish",onChange:()=>n("publish")}),a("wp.asPublish")]}),i&&o.jsxs("label",{className:"flex items-center gap-1.5 text-sm text-gray-700 dark:text-gray-300",children:[o.jsx("input",{type:"radio",checked:r==="future",onChange:()=>{n("future"),s||i(hz())}}),a("wp.asSchedule")]})]}),i&&r==="future"&&o.jsxs("div",{className:"mt-2",children:[o.jsx("input",{type:"datetime-local",value:s||"",min:hz(),onChange:G=>i(G.target.value),className:"input bg-white dark:bg-gray-800 text-gray-900 dark:text-white"}),o.jsx("p",{className:"text-[11px] text-gray-500 dark:text-gray-400 mt-1",children:a("wp.scheduleHint")})]})]}),M0.createPortal(o.jsx(jt,{children:y&&K&&o.jsx(ue.div,{initial:{opacity:0}
1011,animate:{opacity:1},exit:{opacity:0},className:pz,onClick:()=>k(!1),children:o.jsxs(ue.div,{initial:{opacity:0,scale:.95,y:12},animate:{opacity:1,scale:1,y:0},exit:{opacity:0,scale:.95,y:12},transition:{type:"spring",stiffness:320,damping:28},className:fz,onClick:G=>G.stopPropagation(),children:[o.jsxs("div",{className:"flex items-center gap-3 px-5 py-4 border-b border-gray-100 dark:border-gray-700",children:[o.jsx("div",{className:"w-9 h-9 rounded-xl bg-purple-100 dark:bg-purple-900/40 flex items-center justify-center",children:o.jsx(hc,{className:"w-5 h-5 text-purple-600 dark:text-purple-400"})}),o.jsxs("div",{className:"flex-1 min-w-0",children:[o.jsx("h3",{className:"text-sm font-semibold text-gray-900 dark:text-white truncate",children:K.name}),o.jsx("p",{className:"text-xs text-gray-500 dark:text-gray-400 truncate",children:K.baseUrl})]}),o.jsx("button",{onClick:()=>k(!1),className:"p-1.5 rounded-md text-gray-400 hover:text-gray-600 dark:hover:text-gray-200 hover:bg-gray-100 dark:hover:bg-gray-700 transition-colors",children:o.jsx(yt,{className:"w-4 h-4"})})]}),o.jsxs("div",{className:"px-5 py-4 space-y-4",children:[F.isPending?o.jsxs("div",{className:"flex items-center gap-2 text-sm text-gray-600 dark:text-gray-300",children:[o.jsx(dt,{className:"w-4 h-4 animate-spin"}),a("wp.manage.checking")]}):(w==null?void 0:w.state)==="ok"?o.jsxs("div",{className:"flex items-start gap-2 p-3 rounded-lg bg-emerald-50 dark:bg-emerald-900/20 border border-emerald-200 dark:border-emerald-800",children:[o.jsx(Bs,{className:"w-4 h-4 mt-0.5 text-emerald-600 dark:text-emerald-400 shrink-0"}),o.jsx("p",{className:"text-sm text-emerald-700 dark:text-emerald-300",children:a("wp.manage.checkOk")})]}):(w==null?void 0:w.state)==="pending"?o.jsxs("div",{className:"flex items-start gap-2 p-3 rounded-lg bg-amber-50 dark:bg-amber-900/20 border border-amber-200 dark:border-amber-800",children:[o.jsx(Np,{className:"w-4 h-4 mt-0.5 text-amber-600 dark:text-amber-400 shrink-0"}),o.jsx("p",{className:"text-sm text-amber-700 dark:text-amber-300",children:w.message})]}):(w==null?void 0:w.state)==="error"?o.jsxs("div",{className:"flex items-start gap-2 p-3 rounded-lg bg-red-50 dark:bg-red-900/20 border border-red-200 dark:border-red-800",children:[o.jsx(Np,{className:"w-4 h-4 mt-0.5 text-red-600 dark:text-red-400 shrink-0"}),o.jsx("p",{className:"text-sm text-red-700 dark:text-red-300",children:w.message})]}):null,o.jsxs("button",{type:"button",onClick:()=>{b(null),F.mutate(K.id)},disabled:F.isPending,className:"btn btn-secondary text-xs inline-flex items-center gap-1.5 disabled:opacity-50",children:[o.jsx(Lo,{className:`w-3.5 h-3.5 ${F.isPending?"animate-spin":""}`}),a("wp.manage.checkNow")]}),o.jsx("div",{className:"border-t border-gray-100 dark:border-gray-700 pt-4",children:K.authType==="connector"?o.jsxs(o.Fragment,{children:[o.jsxs("div",{className:"flex items-center gap-2 mb-1.5",children:[o.jsx(Zu,{className:"w-4 h-4 text-gray-400"}),o.jsx("h4",{className:"text-sm font-medium text-gray-800 dark:text-gray-200",children:a("wp.manage.newKeyTitle")})]}),o.jsx("p",{className:"text-xs text-gray-500 dark:text-gray-400 mb-2",children:a("wp.manage.newKeyHint")}),o.jsxs("div",{className:"flex gap-2",children:[o.jsx("input",{type:"text",value:v,onChange:G=>A(G.target.value),placeholder:a("wp.connectorKeyPlaceholder"),className:"input flex-1 font-mono text-sm bg-white dark:bg-gray-900 text-gray-900 dark:text-white"}),o.jsx("button",{type:"button",onClick:()=>E.mutate(K.id),disabled:v.trim().length<20||E.isPending,className:"btn btn-primary text-xs whitespace-nowrap disabled:opacity-50",children:E.isPending?o.jsx(dt,{className:"w-3.5 h-3.5 animate-spin"}):a("wp.manage.newKeySave")}
1011)]})]}):o.jsxs(o.Fragment,{children:[o.jsxs("div",{className:"flex items-center gap-2 mb-1.5",children:[o.jsx(Zu,{className:"w-4 h-4 text-gray-400"}),o.jsx("h4",{className:"text-sm font-medium text-gray-800 dark:text-gray-200",children:a("wp.manage.newCredsTitle")})]}),o.jsxs("div",{className:"space-y-2",children:[o.jsx("input",{type:"text",value:C.wpUsername,onChange:G=>_({...C,wpUsername:G.target.value}),placeholder:a("wp.userPlaceholder"),className:"input w-full bg-white dark:bg-gray-900 text-gray-900 dark:text-white"}),o.jsx("input",{type:"password",value:C.appPassword,onChange:G=>_({...C,appPassword:G.target.value}),placeholder:a("wp.passPlaceholder"),className:"input w-full bg-white dark:bg-gray-900 text-gray-900 dark:text-white"}),o.jsx("button",{type:"button",onClick:()=>E.mutate(K.id),disabled:!C.wpUsername.trim()||!C.appPassword.trim()||E.isPending,className:"btn btn-primary text-xs disabled:opacity-50",children:E.isPending?o.jsx(dt,{className:"w-3.5 h-3.5 animate-spin"}):a("wp.manage.newKeySave")})]})]})})]})]})})}),document.body),M0.createPortal(o.jsx(jt,{children:g&&K&&o.jsx(ue.div,{initial:{opacity:0}
1011,animate:{opacity:1},exit:{opacity:0},className:pz,onClick:()=>x(!1),children:o.jsx(ue.div,{initial:{opacity:0,scale:.95,y:12},animate:{opacity:1,scale:1,y:0},exit:{opacity:0,scale:.95,y:12},transition:{type:"spring",stiffness:320,damping:28},className:fz,onClick:G=>G.stopPropagation(),children:o.jsxs("div",{className:"px-5 py-5",children:[o.jsxs("div",{className:"flex items-start gap-3",children:[o.jsx("div",{className:"w-9 h-9 rounded-xl bg-red-100 dark:bg-red-900/40 flex items-center justify-center shrink-0",children:o.jsx(Cr,{className:"w-5 h-5 text-red-600 dark:text-red-400"})}),o.jsxs("div",{children:[o.jsx("h3",{className:"text-sm font-semibold text-gray-900 dark:text-white",children:a("wp.manage.deleteTitle")}),o.jsx("p",{className:"text-xs text-gray-500 dark:text-gray-400 mt-1",children:a("wp.manage.deleteBody",{name:K.name})})]})]}),o.jsxs("div",{className:"flex justify-end gap-2 mt-5",children:[o.jsx("button",{type:"button",onClick:()=>x(!1),className:"btn btn-secondary text-xs",children:a("revision.cancel")}),o.jsxs("button",{type:"button",onClick:()=>H.mutate(K.id),disabled:H.isPending,className:"text-xs px-4 py-2 rounded-lg font-medium bg-red-600 hover:bg-red-700 text-white transition-colors disabled:opacity-50 inline-flex items-center gap-1.5",children:[H.isPending?o.jsx(dt,{className:"w-3.5 h-3.5 animate-spin"}):o.jsx(Cr,{className:"w-3.5 h-3.5"}),a("wp.manage.deleteConfirm")]})]})]})})})}),document.body)]})},jd=({text:t})=>{const[e,r]=M.useState(!1);return o.jsxs("span",{className:"relative inline-flex align-middle",children:[o.jsx("button",{type:"button","aria-label":"Info",onClick:()=>r(n=>!n),onBlur:()=>r(!1),onMouseEnter:()=>r(!0),onMouseLeave:()=>r(!1),className:"text-gray-400 hover:text-purple-600 dark:hover:text-purple-400 transition-colors",children:o.jsx(Ma,{className:"w-4 h-4"})}),e&&o.jsx("span",{className:"absolute z-50 left-1/2 -translate-x-1/2 top-6 w-72 p-3 rounded-lg bg-gray-900 text-gray-100 text-xs leading-relaxed shadow-xl",children:t})]})};function Ike(){const t=Xt.t.bind(Xt);return{ARTICLE:t("orderTypes.textTypes.ARTICLE",{ns:"components"}),REPORT:t("orderTypes.textTypes.REPORT",{ns:"components"}),COMPANY_TEXT:t("orderTypes.textTypes.COMPANY_TEXT",{ns:"components"}),ANALYSIS:t("orderTypes.textTypes.ANALYSIS",{ns:"components"}),BLOG_POST:t("orderTypes.textTypes.BLOG_POST",{ns:"components"}),PRODUCT_DESCRIPTION:t("orderTypes.textTypes.PRODUCT_DESCRIPTION",{ns:"components"}),CATEGORY_DESCRIPTION:t("orderTypes.textTypes.CATEGORY_DESCRIPTION",{ns:"components"}),SOCIAL_MEDIA:t("orderTypes.textTypes.SOCIAL_MEDIA",{ns:"components"}),EMAIL_MARKETING:t("orderTypes.textTypes.EMAIL_MARKETING",{ns:"components"}),OTHER:t("orderTypes.textTypes.OTHER",{ns:"components"})}}function mz(){const t=Xt.t.bind(Xt);return[{value:"pl",label:t("orderTypes.languages.pl",{ns:"components"})},{value:"en",label:t("orderTypes.languages.en",{ns:"components"})}]}function Oke(t,e){const r=e==="PAGES"?t*2e3:t;return r<2e3?0:r<=2e3?2:r<=5e3?3:5}const t3="smart-copy-order-draft",ph=50,Rke=t=>{var e;try{const r={...t.currentForm,userSources:{urls:((e=t.currentForm.userSources)==null?void 0:e.urls)||[],files:[]}};localStorage.setItem(t3,JSON.stringify({currentForm:r,texts:t.texts}))}catch(r){console.error("Failed to save draft:",r)}},fh=()=>{try{localStorage.removeItem(t3)}catch(t){console.error("Failed to clear draft:",t)}},Lke=({onSuccess:t})=>{var se;const{t:e,i18n:r}=He("order-form"),{formatPrice:n}=bn(),s=()=>r.language==="pl"?"pl":"en",i=na({topic:hr().min(3,e("validation.topicMin")),length:bke().min(1,e("validation.lengthMin")),lengthUnit:vke(["PAGES","CHARACTERS"]),language:hr().min(1,e("validation.languageRequired")),textType:hr().optional(),customType:hr().optional(),guidelines:hr().max(1e5,e("validation.guidelinesMax")).optional(),outlineApproval:$2().optional(),generateImage:$2().optional(),seoData:na({keywords:Mm(hr()),links:Mm(na({url:hr(),anchor:hr()}))}).optional(),userSources:na({urls:Mm(hr()),files:Mm(kke())}).optional()}).refine(te=>!(te.lengthUnit==="CHARACTERS"&&te.length<2e3||te.lengthUnit==="CHARACTERS"&&te.length>3e5||te.lengthUnit==="PAGES"&&te.length>150),te=>{if(te.lengthUnit==="CHARACTERS"){if(te.length<2e3)return{message:e("validation.charactersMin"),path:["length"]};if(te.length>3e5)return{message:e("validation.charactersMax"),path:["length"]}}return te.lengthUnit==="PAGES"&&te.length>150?{message:e("validation.pagesMax"),path:["length"]}:{message:"",path:[]}}),[a,l]=M.useState([]),[c,u]=M.useState(!1),[d,h]=M.useState(null),[p,f]=M.use
1011State(!1),[m,y]=M.useState(!1),[k,g]=M.useState(!1),[x,w]=M.useState(""),[b,v]=M.useState([]),[A,C]=M.useState([]),[_,N]=M.useState(!1),[W,K]=M.useState(""),[T,F]=M.useState([]),[E,H]=M.useState([]),[Y,$]=M.useState(""),[D,J]=M.useState(""),[de,G]=M.useState(""),[B,re]=M.useState("draft"),[ae,ge]=M.useState(""),{register:ne,watch:O,setValue:I,formState:{errors:ee},reset:Q,trigger:q}=Dd({resolver:Fd(i),mode:"onChange",defaultValues:{topic:"",length:8e3,lengthUnit:"CHARACTERS",language:s(),textType:"",customType:"",guidelines:"",generateImage:!0,userSources:{urls:[],files:[]},seoData:{keywords:[],links:[]}}});M.useEffect(()=>{var We,lt,vn,lr;const te=new URLSearchParams(window.location.search),pe=te.get("payment"),Me=te.get("orderId");if(pe==="success"){try{const Dt=te.get("orderId");Dt&&!sessionStorage.getItem(`sc_purchase_${Dt}`)&&((We=window.gtag)==null||We.call(window,"event","purchase",{transaction_id:Dt,currency:"PLN"}),sessionStorage.setItem(`sc_purchase_${Dt}`,"1"))}catch{}fh();return}if(pe==="cancelled"&&Me){const Dt=localStorage.getItem(t3);if(Dt)try{const rn=JSON.parse(Dt);if(rn.texts&&Array.isArray(rn.texts)&&l(rn.texts),rn.currentForm){const tr=rn.currentForm;Q({topic:tr.topic||"",length:tr.lengthUnit==="PAGES"?(tr.length||4)*2e3:tr.length||8e3,lengthUnit:"CHARACTERS",language:tr.language||s(),textType:tr.textType||"",customType:tr.customType||"",guidelines:tr.guidelines||"",userSources:{urls:[],files:[]},seoData:{keywords:[],links:[]}}),(lt=tr.userSources)!=null&&lt.urls&&v(tr.userSources.urls),(vn=tr.seoData)!=null&&vn.keywords&&F(tr.seoData.keywords),(lr=tr.seoData)!=null&&lr.links&&H(tr.seoData.links)}le.error(e("toast.paymentCancelled"),{duration:5e3}),fh()}catch(rn){console.error("Failed to restore draft:",rn),le.error(e("toast.restoreFailed")),fh()}else le.error(e("toast.paymentCancelledSimple"),{duration:4e3})}},[Q,e]);const Z=O("topic",""),me=O("length",1),z=O("lengthUnit","PAGES"),fe=O("textType",""),R=Oke(me,z),j=E.length<R,S=Z&&Z.trim().length>=3,P=te=>{let pe=te.trim().replace(/\/$/,"");return!pe.startsWith("http://")&&!pe.startsWith("https://")&&(pe="https://"+pe),pe},L=async te=>{var Me,We,lt,vn;const pe=O();Rke({currentForm:pe,texts:a}),u(!0);try{const lr=new FormData;lr.append("textsData",JSON.stringify(te)),te.forEach((rn,tr)=>{var Ca,Rf;(Rf=(Ca=rn.userSources)==null?void 0:Ca.files)==null||Rf.forEach(S9=>{lr.append(`text_${tr}_files`,S9)})});const Dt=await xe.post("/orders",lr,{});fh();try{const rn=Dt.data;(Me=window.gtag)==null||Me.call(window,"event","purchase",{transaction_id:rn.id||rn.orderNumber,value:te.reduce((tr,Ca)=>{const Rf=Ca.lengthUnit==="PAGES"?Ca.length*2e3:Ca.length;return tr+Gp(Rf)},0),currency:"PLN",items:te.map((tr,Ca)=>({item_id:String(Ca),item_name:(tr.topic||"Text").slice(0,100),item_category:tr.textType||"OTHER",quantity:1}))})}catch{}le.success(e("toast.orderSuccess")),Q(),l([]),v([]),C([]),h(null),f(!1),t==null||t()}catch(lr){if(((We=lr.response)==null?void 0:We.status)===402){const Dt=lr.response.data;le.loading(e("toast.redirectingPayment"),{duration:2e3}),Dt.stripeUrl&&(window.location.href=Dt.stripeUrl)}else{fh();const Dt=((vn=(lt=lr.response)==null?void 0:lt.data)==null?void 0:vn.error)||"Error placing order";le.error(Dt)}}finally{u(!1)}},V=()=>{const te=W.trim();if(te){if(T.includes(te.toLowerCase())){le.error(e("toast.keywordExists"));return}if(T.length>=10){le.error(e("toast.maxKeywords"));return}F([...T,te]),K(""),le.success(e("toast.keywordAdded"))}},U=te=>{F(T.filter((pe,Me)=>Me!==te)),le.success(e("toast.keywordRemoved"))},oe=te=>{let pe=te.trim();return pe=pe.replace(/\/+$/,""),!pe.startsWith("http://")&&!pe.startsWith("https://")&&(pe="https://"+pe),pe},ce=()=>{const te=Y.trim(),pe=D.trim();if(!te||!pe){le.error(e("toast.provideUrlAndAnchor"));return}const Me=oe(te);try{new URL(Me)}catch{le.error(e("toast.invalidUrl"));return}if(!j){le.error(e("toast.maxLinksReached",{max:R}));return}H([...E,{url:Me,anchor:pe}]),$(""),J(""),le.success(e("toast.linkAdded"))},X=te=>{H(E.filter((pe,Me)=>Me!==te)),le.success(e("toast.linkRemoved"))},he=te=>b.some(pe=>pe.toLowerCase()===te.toLowerCase()),we=te=>A.some(pe=>pe.name===te.name),Te=(te,pe)=>pe==="PAGES"?te*2e3:te,Ye=(te,pe)=>pe==="PAGES"?te:Math.ceil(te/2e3),bt=te=>Gp(te),Et=Te(me,z),kn=Ye(me,z),gt=bt(Et),Hr=a.reduce((te,pe)=>{const Me=Te(pe.length,pe.lengthUnit);return te+bt(Me)},0),Cs=Hr+(S?gt:0),wr=()=>{const te=x.trim();if(te){if(b.length+A.length>=6){le.error(e("toast.maxSourcesLimit"));return}try{const pe=P(te);
1011if(new URL(pe),he(pe)){le.error(e("toast.urlExists"));return}v([...b,pe]),w(""),le.success(e("toast.urlAdded"))}catch{le.error(e("toast.invalidPage"))}}},Es=te=>{const pe=b.filter((We,lt)=>lt!==te);v(pe);const Me=O("userSources")||{urls:[],files:[]};I("userSources",{...Me,urls:pe}),le.success(e("toast.urlRemoved"))},Un=te=>{const pe=Array.from(te.target.files||[]),Me=6-b.length-A.length;if(pe.length>Me){le.error(Me>0?e("toast.canAddMore",{count:Me}):e("toast.maxSourcesLimit"));return}const We=["application/pdf","application/msword","application/vnd.openxmlformats-officedocument.wordprocessingml.document"],lt=[],vn=50*1024*1024;for(const lr of pe){if(we(lr)){le.error(`${lr.name}: ${e("toast.fileExists")}`);continue}if(!We.includes(lr.type)){le.error(`${lr.name}: ${e("toast.fileFormat")}`);continue}if(lr.size>vn){le.error(`${lr.name}: ${e("toast.fileTooLarge")}`);continue}lt.push(lr)}lt.length>0&&(C([...A,...lt]),le.success(lt.length===1?e("toast.fileAdded",{count:lt.length}):e("toast.filesAdded",{count:lt.length}))),te.target.value=""},Qs=te=>{const pe=A.filter((We,lt)=>lt!==te);C(pe);const Me=O("userSources")||{urls:[],files:[]};I("userSources",{...Me,files:pe}),le.success(e("toast.fileRemoved"))},nl=()=>{let te=[...b];if(x.trim())try{const Me=P(x.trim());new URL(Me),te.length+A.length<6?te.some(We=>We.toLowerCase()===Me.toLowerCase())||te.push(Me):le.error(e("toast.lastLinkNotAdded"))}catch{le.error(e("toast.invalidLinkNotAdded"))}I("userSources",{urls:te,files:A}),v(te),w(""),g(!1);const pe=te.length+A.length;pe>0&&le.success(pe===1?e("toast.sourceSaved",{count:pe}):e("toast.sourcesSaved",{count:pe}),{icon:"✅"})},sl=()=>{const te=O("userSources");te&&(v(te.urls||[]),C(te.files||[])),w(""),g(!0)},ts=()=>{const te=O("userSources");te?(v(te.urls||[]),C(te.files||[])):(v([]),C([])),w(""),g(!1)},Na=()=>{N(!0)},vx=()=>{if(W.trim()){const pe=W.trim();!T.some(Me=>Me.toLowerCase()===pe.toLowerCase())&&T.length<10&&F([...T,pe])}if(Y.trim()&&D.trim()){const pe=oe(Y.trim());try{new URL(pe),E.length<R&&H([...E,{url:pe,anchor:D.trim()}])}catch{console.warn("Invalid URL, skipping")}}K(""),$(""),J(""),N(!1);const te=T.length+E.length;te>0&&le.success(te===1?e("toast.seoSavedSingle",{count:te}):e("toast.seoSaved",{count:te}),{icon:"🎯"})},jx=()=>{K(""),$(""),J(""),N(!1)},Sx=async()=>{if(a.length>=ph&&d===null){le.error(e("toast.maxTextsReached",{max:ph}),{duration:4e3});return}const te=O();if(!await q()){ee.topic?le.error(ee.topic.message||e("toast.topicError")):ee.length?le.error(ee.length.message||e("toast.lengthError")):ee.language?le.error(ee.language.message||e("toast.languageError")):le.error(e("toast.fillAllFields"));return}if(de&&B==="future"){const We=new Date(ae||"");if(isNaN(We.getTime())||We.getTime()<Date.now()+5*6e4){le.error(e("form.wp.scheduleInvalid"));return}}const Me={...te,wpSiteId:de||void 0,wpStatus:de?B:void 0,wpScheduledAt:de&&B==="future"&&ae?new Date(ae).toISOString():void 0,seoData:T.length>0||E.length>0?{keywords:T,links:E}:void 0};if(d!==null){const We=[...a];We[d]=Me,l(We),h(null),le.success(e("toast.textUpdated"),{icon:"✅"})}else l([...a,Me]),le.success(e("toast.textAdded"));Q({topic:"",length:8e3,lengthUnit:"CHARACTERS",language:s(),textType:"",customType:"",guidelines:"",generateImage:!0,userSources:{urls:[],files:[]},seoData:{keywords:[],links:[]}}),v([]),C([]),F([]),H([]),G(""),re("draft"),ge("")},If=te=>{const pe=a[te];Q({topic:pe.topic,length:pe.lengthUnit==="PAGES"?pe.length*2e3:pe.length,lengthUnit:"CHARACTERS",language:pe.language,textType:pe.textType||"",customType:pe.customType||"",guidelines:pe.guidelines||"",generateImage:pe.generateImage!==!1,userSources:pe.userSources||{urls:[],files:[]},seoData:pe.seoData||{keywords:[],links:[]}}),pe.userSources&&(v(pe.userSources.urls||[]),C(pe.userSources.files||[])),pe.seoData?(F(pe.seoData.keywords||[]),H(pe.seoData.links||[])):(F([]),H([])),G(pe.wpSiteId||""),re(["publish","future"].includes(pe.wpStatus)?pe.wpStatus:"draft");const Me=pe.wpScheduledAt;if(Me){const We=new Date(Me),lt=vn=>String(vn).padStart(2,"0");ge(`${We.getFullYear()}-${lt(We.getMonth()+1)}-${lt(We.getDate())}T${lt(We.getHours())}:${lt(We.getMinutes())}`)}else ge("");h(te),le(e("toast.editing",{topic:pe.topic}),{icon:"✏️"}),window.scrollTo({top:0,behavior:"smooth"})},zc=()=>{h(null),Q({topic:"",length:8e3,lengthUnit:"CHARACTERS",language:s(),textType:"",customType:"",guidelines:"",generateImage:!0,userSources:{urls:[],files:[]},seoData:{keywords:[],links:[]}}),v([]),C([]),F([]),H([]),le(e("toast.editCancelled"))},Nx=te=>
1011{d===te?zc():d!==null&&te<d&&h(d-1),l(a.filter((pe,Me)=>Me!==te)),le.success(e("toast.textRemoved"))},br=async()=>{if(r.language==="pl"&&!p){le.error(e("toast.consentRequired"),{duration:4e3});return}const te=O(),pe=te.topic&&te.topic.trim().length>=3;let Me=[...a];if(pe){if(!await q()){ee.topic?le.error(ee.topic.message||e("toast.topicError")):ee.length?le.error(ee.length.message||e("toast.lengthError")):ee.language?le.error(ee.language.message||e("toast.languageError")):le.error(e("toast.fillCurrentText"));return}let lt=[...T],vn=[...E];if(W.trim()){const Dt=W.trim();!lt.some(rn=>rn.toLowerCase()===Dt.toLowerCase())&&lt.length<10&&lt.push(Dt)}if(Y.trim()&&D.trim()){const Dt=oe(Y.trim());try{new URL(Dt),vn.length<R&&vn.push({url:Dt,anchor:D.trim()})}catch{console.warn("Invalid URL, skipping")}}if(de&&B==="future"){const Dt=new Date(ae||"");if(isNaN(Dt.getTime())||Dt.getTime()<Date.now()+5*6e4){le.error(e("form.wp.scheduleInvalid"));return}}const lr={...te,wpSiteId:de||void 0,wpStatus:de?B:void 0,wpScheduledAt:de&&B==="future"&&ae?new Date(ae).toISOString():void 0,seoData:lt.length>0||vn.length>0?{keywords:lt,links:vn}:void 0};Me.push(lr)}if(Me.length===0){le.error(e("toast.fillFormOrAddTexts"));return}await L(Me)},Of=()=>d!==null?e("summary.footerEdit"):a.length>0?S?e("summary.footerTextsAndForm",{count:a.length}):a.length===1?e("summary.footerTexts_one",{count:a.length}):a.length>=2&&a.length<=4?e("summary.footerTexts_few",{count:a.length}):e("summary.footerTexts_many",{count:a.length}):S?e("summary.footerAddOrSubmit"):"";return o.jsxs(ue.div,{initial:{opacity:0}
1011,animate:{opacity:1},className:"max-w-7xl mx-auto",children:[o.jsx("div",{className:"text-center mb-12",children:o.jsx("h2",{className:"text-4xl font-bold text-gray-900 dark:text-white mb-3",children:e("header.title")})}),d!==null&&o.jsx(ue.div,{initial:{opacity:0,y:-20},animate:{opacity:1,y:0},className:"mb-6 p-4 bg-blue-50 dark:bg-blue-900/20 border-2 border-blue-300 dark:border-blue-700 rounded-lg",children:o.jsxs("div",{className:"flex items-center justify-between",children:[o.jsxs("div",{className:"flex items-center gap-3",children:[o.jsx(Ep,{className:"w-5 h-5 text-blue-600 dark:text-blue-400"}),o.jsxs("div",{children:[o.jsx("p",{className:"font-semibold text-blue-900 dark:text-blue-100",children:e("editMode.title")}),o.jsx("p",{className:"text-sm text-blue-700 dark:text-blue-300",children:e("editMode.editing",{index:d+1,topic:(se=a[d])==null?void 0:se.topic})})]})]}),o.jsx("button",{onClick:zc,className:"btn btn-secondary text-sm",children:e("editMode.cancel")})]})}),a.length>0&&o.jsxs(ue.div,{initial:{opacity:0,y:-20},animate:{opacity:1,y:0},className:"card dark:bg-gray-800 dark:border-gray-700 mb-8",children:[o.jsxs("div",{className:"flex items-center justify-between mb-4",children:[o.jsxs("h3",{className:"text-xl font-bold text-gray-900 dark:text-white flex items-center gap-2",children:[o.jsx(fn,{className:"w-5 h-5 text-purple-600 dark:text-purple-400"}),e("textsList.title")," (",a.length,")"]}),o.jsx("span",{className:"text-2xl font-bold text-purple-600 dark:text-purple-400",children:n(Hr)})]}),o.jsx("div",{className:"space-y-3",children:a.map((te,pe)=>{var Me;return o.jsxs("div",{className:`flex items-center justify-between p-4 rounded-lg transition-all ${d===pe?"bg-blue-100 dark:bg-blue-900/30 border-2 border-blue-500 dark:border-blue-600":"bg-gray-50 dark:bg-gray-700 hover:bg-gray-100 dark:hover:bg-gray-600"}`,children:[o.jsxs("div",{className:"flex-1",children:[o.jsxs("p",{className:"font-semibold text-gray-900 dark:text-white mb-1",children:[pe+1,". ",te.topic,d===pe&&o.jsx("span",{className:"ml-2 text-xs bg-blue-500 text-white px-2 py-1 rounded",children:e("textsList.editingBadge")})]}),o.jsxs("p",{className:"text-sm text-gray-600 dark:text-gray-300",children:[Ye(te.length,te.lengthUnit)," ",e("textsList.pages")," •"," ",Te(te.length,te.lengthUnit).toLocaleString()," ",e("textsList.characters")," •"," ",(Me=mz().find(We=>We.value===te.language))==null?void 0:Me.label,te.userSources&&(te.userSources.urls.length>0||te.userSources.files.length>0)&&o.jsxs(o.Fragment,{children:[" ","•"," ",o.jsxs("span",{className:"text-purple-600 dark:text-purple-400",children:[te.userSources.urls.length+te.userSources.files.length," ",e("textsList.ownSources")]})]})]})]}),o.jsxs("div",{className:"flex items-center gap-3",children:[o.jsx("span",{className:"font-bold text-purple-600 dark:text-purple-400",children:n(bt(Te(te.length,te.lengthUnit)))}),o.jsx("button",{onClick:()=>If(pe),disabled:d!==null&&d!==pe,className:"p-2 text-blue-600 dark:text-gray-300 hover:bg-blue-50 dark:hover:bg-blue-900/20 rounded-lg transition-colors disabled:opacity-50 disabled:cursor-not-allowed",title:e("textsList.editTooltip"),children:o.jsx(Ep,{className:"w-5 h-5"})}),o.jsx("button",{onClick:()=>Nx(pe),className:"p-2 text-red-600 hover:bg-red-50 dark:hover:bg-red-900/20 rounded-lg transition-colors",title:e("textsList.removeTooltip"),children:o.jsx(Cr,{className:"w-5 h-5"})})]})]},pe)})})]}),o.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-6",children:[o.jsxs("div",{className:"lg:col-span-2 space-y-6",children:[o.jsxs(ue.div,{initial:{opacity:0,x:-20},animate:{opacity:1,x:0},className:"card dark:bg-gray-800 dark:border-gray-700",children:[o.jsx("label",{className:"block text-sm font-bold text-gray-900 dark:text-white mb-3",children:e("form.topic.label")}),o.jsx("input",{...ne("topic"),type:"text",placeholder:e("form.topic.placeholder"),className:`input w-full bg-white dark:bg-gray-800 text-gray-900 dark:text-white ${ee.topic?"border-red-500":""}`}),ee.topic&&o.jsxs("p",{className:"text-red-500 text-sm mt-2 flex items-center gap-1",children:[o.jsx(Dh,{className:"w-4 h-4"}),ee.topic.message]})]}),o.jsxs(ue.div,{initial:{opacity:0,x:-20}
1011,animate:{opacity:1,x:0},transition:{delay:.1},className:"card dark:bg-gray-800 dark:border-gray-700",children:[o.jsx("label",{className:"block text-sm font-bold text-gray-900 dark:text-white mb-3",children:e("form.length.label")}),o.jsx(Pke,{unit:"CHARACTERS",value:me,onSelect:te=>I("length",te,{shouldValidate:!0})}),ee.length&&o.jsxs("p",{className:"text-red-500 text-sm mb-3 flex items-center gap-1",children:[o.jsx(Dh,{className:"w-4 h-4"}),ee.length.message]})]}),o.jsxs(ue.div,{initial:{opacity:0,x:-20},animate:{opacity:1,x:0},transition:{delay:.2},className:"card dark:bg-gray-800 dark:border-gray-700",children:[o.jsx("label",{className:"block text-sm font-bold text-gray-900 dark:text-white mb-3",children:e("form.language.label")}),o.jsx("select",{...ne("language"),className:"input w-full bg-white dark:bg-gray-800 text-gray-900 dark:text-white",children:mz().map(te=>o.jsx("option",{value:te.value,children:te.label},te.value))})]}),o.jsxs(ue.div,{initial:{opacity:0,x:-20},animate:{opacity:1,x:0},transition:{delay:.3},className:"card dark:bg-gray-800 dark:border-gray-700",children:[o.jsx("label",{className:"block text-sm font-bold text-gray-900 dark:text-white mb-3",children:e("form.textType.label")}),o.jsxs("select",{...ne("textType"),className:"input w-full mb-3 bg-white dark:bg-gray-800 text-gray-900 dark:text-white",children:[o.jsx("option",{value:"",children:e("form.textType.placeholder")}),Object.entries(Ike()).map(([te,pe])=>o.jsx("option",{value:te,children:pe},te))]}),o.jsx(jt,{children:fe==="OTHER"&&o.jsx(ue.input,{initial:{opacity:0,height:0},animate:{opacity:1,height:"auto"},exit:{opacity:0,height:0},...ne("customType"),type:"text",placeholder:e("form.textType.customPlaceholder"),className:"input w-full bg-white dark:bg-gray-800 text-gray-900 dark:text-white"})})]}),o.jsxs(ue.div,{initial:{opacity:0,x:-20},animate:{opacity:1,x:0},transition:{delay:.35},className:"card dark:bg-gray-800 dark:border-gray-700",children:[o.jsxs("div",{className:"flex items-center justify-between mb-3",children:[o.jsx("label",{className:"block text-sm font-bold text-gray-900 dark:text-white",children:e("form.sources.label")}),o.jsxs("div",{className:"group relative",children:[o.jsx(Ma,{className:"w-4 h-4 text-gray-400 cursor-help"}),o.jsxs("div",{className:"absolute right-0 bottom-6 w-64 p-3 bg-gray-900 dark:bg-gray-700 text-white text-xs rounded-lg opacity-0 invisible group-hover:opacity-100 group-hover:visible transition-all z-10 shadow-xl",children:[e("form.sources.tooltip"),o.jsx("br",{}),o.jsx("br",{}),o.jsx("strong",{children:e("form.sources.tooltipMax")})]})]})]}),o.jsxs("button",{type:"button",onClick:sl,className:"btn btn-secondary w-full flex items-center justify-center gap-2 mb-4 bg-white dark:bg-gray-800 text-gray-900 dark:text-gray-200",children:[o.jsx(Qr,{className:"w-4 h-4"}),b.length+A.length>0?e("form.sources.editButton",{count:b.length+A.length}):e("form.sources.addButton")]}),(b.length>0||A.length>0)&&o.jsxs(ue.div,{initial:{opacity:0,height:0},animate:{opacity:1,height:"auto"},className:"space-y-2",children:[b.map((te,pe)=>o.jsxs(ue.div,{initial:{opacity:0,x:-10},animate:{opacity:1,x:0},exit:{opacity:0,x:10},className:"flex items-center gap-2 p-3 bg-purple-50 dark:bg-purple-900/20 rounded-lg border border-purple-200 dark:border-purple-800",children:[o.jsx(eh,{className:"w-4 h-4 text-purple-600 dark:text-purple-400 flex-shrink-0"}),o.jsx("div",{className:"flex-1 min-w-0",children:o.jsx("p",{className:"text-sm text-gray-700 dark:text-gray-300 truncate",title:te,children:te})}),o.jsx("button",{type:"button",onClick:()=>Es(pe),className:"p-1.5 text-red-600 hover:bg-red-100 dark:hover:bg-red-900/30 rounded-lg transition-colors flex-shrink-0",children:o.jsx(yt,{className:"w-4 h-4"})})]},`url-${pe}`)),A.map((te,pe)=>o.jsxs(ue.div,{initial:{opacity:0,x:-10},animate:{opacity:1,x:0},exit:{opacity:0,x:10},className:"flex items-center gap-2 p-3 bg-indigo-50 dark:bg-indigo-900/20 rounded-lg border border-indigo-200 dark:border-indigo-800",children:[o.jsx(Jt,{className:"w-4 h-4 text-indigo-600 dark:text-indigo-400 flex-shrink-0"}),o.jsxs("div",{className:"flex-1 min-w-0",children:[o.jsx("p",{className:"text-sm text-gray-700 dark:text-gray-300 truncate",title:te.name,children:te.name}),o.jsxs("p",{className:"text-xs text-gray-500 dark:text-gray-400",children:[(te.size/1024).toFixed(1)," KB"]}
1011)]}),o.jsx("button",{type:"button",onClick:()=>Qs(pe),className:"p-1.5 text-red-600 hover:bg-red-100 dark:hover:bg-red-900/30 rounded-lg transition-colors flex-shrink-0",children:o.jsx(yt,{className:"w-4 h-4"})})]},`file-${pe}`))]})]}),o.jsxs(ue.div,{initial:{opacity:0,x:-20},animate:{opacity:1,x:0},transition:{delay:.4},className:"card dark:bg-gray-800 dark:border-gray-700",children:[o.jsx("label",{className:"block text-sm font-bold text-gray-900 dark:text-white mb-3",children:e("form.guidelines.label")}),o.jsx("textarea",{...ne("guidelines"),rows:4,maxLength:1e5,placeholder:e("form.guidelines.placeholder"),className:"input w-full resize-none bg-white dark:bg-gray-800 text-gray-900 dark:text-white"}),o.jsxs("div",{className:"flex justify-between mt-1",children:[ee.guidelines&&o.jsxs("p",{className:"text-red-500 text-sm flex items-center gap-1",children:[o.jsx(Dh,{className:"w-4 h-4"}),ee.guidelines.message]}),o.jsxs("p",{className:`text-xs ml-auto ${(O("guidelines")||"").length>9500?"text-red-500":"text-gray-400"}`,children:[(O("guidelines")||"").length,"/100 000"]})]}),o.jsxs("label",{className:"mt-3 flex items-start gap-3 p-3 rounded-lg bg-indigo-50 dark:bg-indigo-900/20 border border-indigo-200 dark:border-indigo-800 cursor-pointer",children:[o.jsx("input",{type:"checkbox",...ne("generateImage"),className:"mt-0.5 w-4 h-4 rounded border-gray-300 text-purple-600 focus:ring-purple-500"}),o.jsxs("span",{className:"flex-1",children:[o.jsxs("span",{className:"flex items-center gap-2 text-sm font-medium text-gray-900 dark:text-white",children:[e("form.image.label"),o.jsxs("span",{className:"group relative inline-flex",children:[o.jsx(Ma,{className:"w-4 h-4 text-gray-400 cursor-help"}),o.jsx("span",{className:"absolute right-0 sm:left-0 sm:right-auto bottom-6 w-72 max-w-[calc(100vw-3rem)] p-3 bg-gray-900 dark:bg-gray-700 text-white text-xs rounded-lg opacity-0 invisible group-hover:opacity-100 group-hover:visible transition-all z-10 shadow-xl font-normal",children:e("form.image.tooltip")})]})]}),o.jsx("span",{className:"block text-xs text-gray-500 dark:text-gray-400",children:e("form.image.hint")})]})]}),Et>=1e4&&o.jsxs("label",{className:"mt-3 flex items-start gap-3 p-3 rounded-lg bg-purple-50 dark:bg-purple-900/20 border border-purple-200 dark:border-purple-800 cursor-pointer",children:[o.jsx("input",{type:"checkbox",...ne("outlineApproval"),className:"mt-0.5 w-4 h-4 rounded border-gray-300 text-purple-600 focus:ring-purple-500"}),o.jsxs("span",{children:[o.jsx("span",{className:"block text-sm font-medium text-gray-900 dark:text-white",children:e("form.outlineApproval.label")}),o.jsx("span",{className:"block text-xs text-gray-500 dark:text-gray-400",children:e("form.outlineApproval.hint")})]})]})]}),o.jsxs(ue.div,{initial:{opacity:0,x:-20},animate:{opacity:1,x:0},transition:{delay:.39},className:"card dark:bg-gray-800 dark:border-gray-700",children:[o.jsxs("label",{className:"text-sm font-bold text-gray-900 dark:text-white mb-3 flex items-center gap-1.5",children:[e("form.wp.label"),o.jsx(jd,{text:e("form.wp.hint")})]}),o.jsx(w9,{value:de,onChange:G,status:B,onStatusChange:re,scheduledAt:ae,onScheduledAtChange:ge})]}),o.jsxs(ue.div,{initial:{opacity:0,x:-20},animate:{opacity:1,x:0},transition:{delay:.38},className:"card dark:bg-gray-800 dark:border-gray-700",children:[o.jsxs("div",{className:"flex items-center justify-between mb-3",children:[o.jsx("label",{className:"block text-sm font-bold text-gray-900 dark:text-white",children:e("form.seo.label")}),o.jsxs("div",{className:"group relative",children:[o.jsx(Ma,{className:"w-4 h-4 text-gray-400 cursor-help"}),o.jsx("div",{className:"absolute right-0 bottom-6 w-64 p-3 bg-gray-900 dark:bg-gray-700 text-white text-xs rounded-lg opacity-0 invisible group-hover:opacity-100 group-hover:visible transition-all z-10 shadow-xl",children:e("form.seo.tooltip")})]})]}),o.jsxs("button",{type:"button",onClick:Na,className:"btn btn-secondary w-full flex items-center justify-center gap-2 mb-4 bg-white dark:bg-gray-800 text-gray-900 dark:text-gray-200",children:[o.jsx(Qr,{className:"w-4 h-4"}),T.length+E.length>0?e("form.seo.editButton",{count:T.length+E.length}):e("form.seo.addButton")]}),(T.length>0||E.length>0)&&o.jsxs(ue.div,{initial:{opacity:0,height:0}
1011,animate:{opacity:1,height:"auto"},className:"space-y-2",children:[T.length>0&&o.jsxs("div",{children:[o.jsxs("p",{className:"text-xs font-semibold text-gray-600 dark:text-gray-400 mb-2",children:[e("form.seo.keywordsLabel")," (",T.length,"/10)"]}),o.jsx("div",{className:"flex flex-wrap gap-2",children:T.map((te,pe)=>o.jsxs(ue.div,{initial:{opacity:0,scale:.8},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.8},className:"flex items-center gap-2 px-3 py-1.5 bg-purple-100 dark:bg-purple-900/30 text-purple-700 dark:text-purple-300 rounded-full text-sm",children:[o.jsx("span",{children:te}),o.jsx("button",{type:"button",onClick:()=>U(pe),className:"hover:text-red-600 dark:hover:text-red-400",children:o.jsx(yt,{className:"w-3 h-3"})})]},pe))})]}),E.length>0&&o.jsxs("div",{className:"pt-2",children:[o.jsxs("p",{className:"text-xs font-semibold text-gray-600 dark:text-gray-400 mb-2",children:[e("form.seo.linksLabel")," (",E.length,"/",R,")"]}),o.jsx("div",{className:"space-y-2",children:E.map((te,pe)=>o.jsxs(ue.div,{initial:{opacity:0,x:-10},animate:{opacity:1,x:0},exit:{opacity:0,x:10},className:"flex items-center gap-2 p-3 bg-indigo-50 dark:bg-indigo-900/20 rounded-lg border border-indigo-200 dark:border-indigo-800",children:[o.jsx(eh,{className:"w-4 h-4 text-indigo-600 dark:text-indigo-400 flex-shrink-0"}),o.jsxs("div",{className:"flex-1 min-w-0",children:[o.jsx("p",{className:"text-sm font-semibold text-gray-900 dark:text-white truncate",children:te.anchor}),o.jsx("p",{className:"text-xs text-gray-600 dark:text-gray-400 truncate",title:te.url,children:te.url})]}),o.jsx("button",{type:"button",onClick:()=>X(pe),className:"p-1.5 text-red-600 hover:bg-red-100 dark:hover:bg-red-900/30 rounded-lg transition-colors flex-shrink-0",children:o.jsx(yt,{className:"w-4 h-4"})})]},pe))})]})]})]})]}),o.jsx("div",{className:"lg:col-span-1",children:o.jsx("div",{className:"sticky top-6",children:o.jsxs(ue.div,{initial:{opacity:0,x:20},animate:{opacity:1,x:0},className:"card dark:bg-gray-800 bg-gradient-to-br from-purple-50 to-indigo-50 dark:from-purple-900/20 dark:to-indigo-900/20 border-purple-200 dark:border-purple-800",children:[o.jsx("h3",{className:"text-lg font-bold text-gray-900 dark:text-white mb-4",children:e("summary.title")}),o.jsxs("div",{className:"space-y-3 mb-6",children:[a.length>0&&o.jsxs("div",{className:"pb-3 border-b border-purple-200 dark:border-purple-700",children:[o.jsxs("div",{className:"flex justify-between text-sm mb-1",children:[o.jsx("span",{className:"text-gray-600 dark:text-gray-300",children:e("summary.textsInOrder")}),o.jsx("span",{className:"font-semibold text-gray-900 dark:text-white",children:a.length})]}),o.jsxs("div",{className:"flex justify-between text-sm",children:[o.jsx("span",{className:"text-gray-600 dark:text-gray-300",children:e("summary.textsSum")}),o.jsx("span",{className:"font-bold text-purple-600 dark:text-purple-400",children:n(Hr)})]})]}),S&&o.jsxs("div",{children:[o.jsx("p",{className:"text-xs font-semibold text-gray-500 dark:text-gray-400 mb-2",children:e(d!==null?"summary.editedText":"summary.currentText")}),o.jsxs("div",{className:"flex justify-between text-sm",children:[o.jsx("span",{className:"text-gray-600 dark:text-gray-300",children:e("summary.length")}),o.jsxs("span",{className:"font-semibold text-gray-900 dark:text-white",children:[kn," ",e("textsList.pages")]})]}),o.jsxs("div",{className:"flex justify-between text-sm",children:[o.jsx("span",{className:"text-gray-600 dark:text-gray-300",children:e("summary.characters")}),o.jsx("span",{className:"font-semibold text-gray-900 dark:text-white",children:Et.toLocaleString()})]}),o.jsxs("div",{className:"flex justify-between text-sm",children:[o.jsx("span",{className:"text-gray-600 dark:text-gray-300",children:e("summary.price")}),o.jsx("span",{className:"font-semibold text-gray-900 dark:text-white",children:n(gt)})]})]}),!S&&a.length>0&&o.jsx("div",{className:"p-3 bg-gray-50 dark:bg-gray-700 rounded-lg",children:o.jsx("p",{className:"text-xs text-gray-600 dark:text-gray-400 text-center",children:e("summary.fillFormTip")})})]}),(a.length>0||S)&&o.jsx("div",{className:"border-t border-purple-200 dark:border-purple-800 pt-4 mb-6",children:o.jsxs("div",{className:"flex justify-between items-center",children:[o.jsx("span",{className:"text-lg font-bold text-gray-900 dark:text-white",children:e("summary.total")}),o.jsx("span",{className:"text-3xl font-bold text-purple-600 dar
1011k:text-purple-400",children:n(Cs)})]})}),o.jsx("button",{type:"button",onClick:Sx,disabled:a.length>=ph&&d===null,className:`btn w-full mb-3 flex items-center justify-center gap-2 ${d!==null?"btn-primary bg-blue-600 hover:bg-blue-700":"btn-secondary"} disabled:opacity-50 disabled:cursor-not-allowed`,children:d!==null?o.jsxs(o.Fragment,{children:[o.jsx(On,{className:"w-5 h-5"}),e("summary.updateText")]}):o.jsxs(o.Fragment,{children:[o.jsx(Qr,{className:"w-5 h-5"}),a.length>=ph?e("summary.limitReached",{max:ph}):e("summary.addNextText")]})}),d!==null&&o.jsxs("button",{type:"button",onClick:zc,className:"btn btn-secondary w-full mb-3 flex items-center justify-center gap-2",children:[o.jsx(yt,{className:"w-5 h-5"}),e("summary.cancelEdit")]}),o.jsx("button",{type:"button",onClick:br,disabled:c,className:"btn btn-primary w-full flex items-center justify-center gap-2 disabled:opacity-50",children:c?e("summary.processing"):o.jsxs(o.Fragment,{children:[e("summary.submitOrder"),o.jsx(Sr,{className:"w-5 h-5"})]})}),r.language==="pl"&&o.jsxs("div",{className:"mb-0 mt-4 p-4 bg-amber-50 dark:bg-amber-900/20 border border-amber-200 dark:border-amber-700 rounded-lg",children:[o.jsxs("label",{className:"flex items-start gap-3 cursor-pointer group",children:[o.jsx("input",{type:"checkbox",checked:p,onChange:te=>f(te.target.checked),className:"mt-1 w-5 h-5 text-purple-600 border-gray-300 rounded focus:ring-purple-500 cursor-pointer"}),o.jsx("div",{className:"flex-1",children:o.jsx("span",{className:"text-xs text-gray-900 dark:text-white font-medium",children:e("consent.title")})})]}),o.jsxs("button",{type:"button",onClick:()=>y(!m),className:"mt-3 flex items-center gap-2 text-xs text-gray-600 dark:text-gray-400 hover:text-purple-600 dark:hover:text-purple-400 transition-colors",children:[o.jsx(Ma,{className:"w-4 h-4"}),o.jsx("span",{children:e("consent.whyNoRefund")}),o.jsx(Ti,{className:`w-4 h-4 transition-transform ${m?"rotate-180":""}`})]}),o.jsx(jt,{children:m&&o.jsx(ue.div,{initial:{opacity:0,height:0},animate:{opacity:1,height:"auto"},exit:{opacity:0,height:0},className:"mt-3 p-3 bg-white dark:bg-gray-800 rounded-lg border border-amber-200 dark:border-amber-800 text-xs text-gray-700 dark:text-gray-300 space-y-2",children:o.jsxs("div",{className:"flex gap-2",children:[o.jsx(YI,{className:"w-4 h-4 text-amber-600 dark:text-amber-400 flex-shrink-0 mt-0.5"}),o.jsxs("div",{className:"space-y-2",children:[o.jsx("p",{className:"font-semibold",children:e("consent.legalBasis")}),o.jsx("p",{children:e("consent.legalExplanation")}),o.jsxs("ul",{className:"list-disc list-inside space-y-1 ml-2",children:[o.jsx("li",{children:e("consent.legalPoint1")}),o.jsx("li",{children:e("consent.legalPoint2")}),o.jsx("li",{children:e("consent.legalPoint3")})]}),o.jsx("p",{className:"pt-2 border-t border-amber-200 dark:border-amber-700",children:e("consent.legalSummary")})]})]})})})]}),o.jsx("p",{className:"text-xs text-gray-500 dark:text-gray-400 text-center mt-2",children:Of()})]})})})]}),o.jsx(jt,{children:k&&o.jsx(ue.div,{initial:{opacity:0}
1011,animate:{opacity:1},exit:{opacity:0},className:"fixed inset-0 bg-black/50 backdrop-blur-sm z-50 flex items-center justify-center p-4",onClick:()=>g(!1),children:o.jsxs(ue.div,{initial:{scale:.9,opacity:0},animate:{scale:1,opacity:1},exit:{scale:.9,opacity:0},onClick:te=>te.stopPropagation(),className:"bg-white dark:bg-gray-800 rounded-2xl max-w-2xl w-full max-h-[85vh] overflow-hidden flex flex-col shadow-2xl",children:[o.jsxs("div",{className:"flex items-center justify-between p-6 border-b border-gray-200 dark:border-gray-700",children:[o.jsxs("div",{children:[o.jsx("h3",{className:"text-2xl font-bold text-gray-900 dark:text-white",children:e("sourcesModal.title")}),o.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400 mt-1",children:e("sourcesModal.sourcesCount",{count:b.length+A.length})})]}),o.jsx("button",{onClick:()=>g(!1),className:"p-2 hover:bg-gray-100 dark:hover:bg-gray-700 rounded-lg transition-colors",children:o.jsx(yt,{className:"w-5 h-5 text-gray-500"})})]}),o.jsxs("div",{className:"flex-1 overflow-y-auto p-6 space-y-6",children:[o.jsxs("div",{children:[o.jsxs("label",{className:"block text-sm font-bold text-gray-900 dark:text-white mb-3",children:[o.jsx(eh,{className:"w-4 h-4 inline mr-2"}),e("sourcesModal.linksLabel")]}),o.jsxs("div",{className:"flex gap-2 mb-3",children:[o.jsx("input",{type:"text",value:x,onChange:te=>w(te.target.value),onKeyPress:te=>te.key==="Enter"&&wr(),placeholder:e("sourcesModal.linkPlaceholder"),disabled:b.length+A.length>=6,className:"input flex-1 bg-white dark:bg-gray-700 text-gray-900 dark:text-white disabled:opacity-50"}),o.jsx("button",{type:"button",onClick:wr,disabled:b.length+A.length>=6,className:`btn px-6 disabled:opacity-50 disabled:cursor-not-allowed transition-all ${x.trim()?"btn-primary ring-2 ring-purple-300 dark:ring-purple-500 animate-pulse":"btn-primary"}`,children:e("sourcesModal.addButton")})]}),b.length>0&&o.jsx("div",{className:"space-y-2",children:b.map((te,pe)=>o.jsxs("div",{className:"flex items-center gap-2 p-3 bg-purple-50 dark:bg-purple-900/20 rounded-lg border border-purple-200 dark:border-purple-800",children:[o.jsx(eh,{className:"w-4 h-4 text-purple-600 dark:text-purple-400 flex-shrink-0"}),o.jsx("div",{className:"flex-1 min-w-0",children:o.jsx("p",{className:"text-sm text-gray-700 dark:text-gray-300 truncate",title:te,children:te})}),o.jsx("button",{onClick:()=>Es(pe),className:"p-1.5 text-red-600 hover:bg-red-100 dark:hover:bg-red-900/30 rounded-lg transition-colors flex-shrink-0",children:o.jsx(Cr,{className:"w-4 h-4"})})]},pe))})]}),o.jsxs("div",{children:[o.jsxs("label",{className:"block text-sm font-bold text-gray-900 dark:text-white mb-3",children:[o.jsx(Ap,{className:"w-4 h-4 inline mr-2"}),e("sourcesModal.filesLabel")]}),o.jsxs("label",{className:`flex items-center justify-center gap-2 p-4 border-2 border-dashed rounded-lg transition-all ${b.length+A.length>=6?"border-gray-300 dark:border-gray-600 opacity-50 cursor-not-allowed":"border-gray-300 dark:border-gray-600 cursor-pointer hover:border-indigo-500 dark:hover:border-indigo-400 hover:bg-indigo-50 dark:hover:bg-indigo-900/10"}`,children:[o.jsx(Ap,{className:"w-5 h-5 text-gray-500"}),o.jsx("span",{className:"text-gray-700 dark:text-gray-300 font-medium",children:b.length+A.length>=6?e("sourcesModal.filesLimit"):e("sourcesModal.filesButton")}),o.jsx("input",{type:"file",multiple:!0,accept:".pdf,.doc,.docx,.jpg,.jpeg,.png,.webp,.gif",onChange:Un,disabled:b.length+A.length>=6,className:"hidden"})]}),o.jsx("p",{className:"text-xs text-gray-500 dark:text-gray-400 mt-2",children:e("sourcesModal.filesHint")}),A.length>0&&o.jsx("div",{className:"space-y-2 mt-3",children:A.map((te,pe)=>o.jsxs("div",{className:"flex items-center gap-2 p-3 bg-indigo-50 dark:bg-indigo-900/20 rounded-lg border border-indigo-200 dark:border-indigo-800",children:[o.jsx(Jt,{className:"w-4 h-4 text-indigo-600 dark:text-indigo-400 flex-shrink-0"}),o.jsxs("div",{className:"flex-1 min-w-0",children:[o.jsx("p",{className:"text-sm text-gray-700 dark:text-gray-300 truncate",children:te.name}),o.jsxs("p",{className:"text-xs text-gray-500 dark:text-gray-400",children:[(te.size/1024).toFixed(1)," KB"]}
1011)]}),o.jsx("button",{onClick:()=>Qs(pe),className:"p-1.5 text-red-600 hover:bg-red-100 dark:hover:bg-red-900/30 rounded-lg transition-colors flex-shrink-0",children:o.jsx(Cr,{className:"w-4 h-4"})})]},pe))})]}),o.jsx("div",{className:"bg-blue-50 dark:bg-blue-900/20 border border-blue-200 dark:border-blue-800 p-4 rounded-lg",children:o.jsxs("div",{className:"flex gap-3",children:[o.jsx(Ma,{className:"w-5 h-5 text-blue-600 dark:text-blue-400 flex-shrink-0 mt-0.5"}),o.jsxs("div",{className:"text-sm text-gray-700 dark:text-gray-300 space-y-2",children:[o.jsx("p",{children:o.jsx("strong",{children:e("sourcesModal.infoTitle")})}),o.jsx("p",{children:e("sourcesModal.infoDescription")})]})]})})]}),o.jsxs("div",{className:"flex gap-3 p-6 border-t border-gray-200 dark:border-gray-700 bg-gray-50 dark:bg-gray-900/50",children:[o.jsx("button",{type:"button",onClick:ts,className:"btn btn-secondary flex-1 bg-white dark:bg-gray-800 text-gray-900 dark:text-gray-200",children:e("sourcesModal.cancel")}),o.jsxs("button",{type:"button",onClick:nl,className:"btn btn-primary flex-1 flex items-center justify-center gap-2",children:[o.jsx(On,{className:"w-4 h-4"}),e("sourcesModal.confirm")," (",b.length+A.length+(x.trim()?1:0),")"]})]})]})})}),o.jsx(jt,{children:_&&o.jsx(ue.div,{initial:{opacity:0}
1011,animate:{opacity:1},exit:{opacity:0},className:"fixed inset-0 bg-black/50 backdrop-blur-sm z-50 flex items-center justify-center p-4",onClick:()=>N(!1),children:o.jsxs(ue.div,{initial:{scale:.9,opacity:0},animate:{scale:1,opacity:1},exit:{scale:.9,opacity:0},onClick:te=>te.stopPropagation(),className:"bg-white dark:bg-gray-800 rounded-2xl max-w-2xl w-full max-h-[85vh] overflow-hidden flex flex-col shadow-2xl",children:[o.jsxs("div",{className:"flex items-center justify-between p-6 border-b border-gray-200 dark:border-gray-700",children:[o.jsxs("div",{children:[o.jsx("h3",{className:"text-2xl font-bold text-gray-900 dark:text-white",children:e("seoModal.title")}),o.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400 mt-1",children:e("seoModal.stats",{keywords:T.length,links:E.length,maxLinks:R})})]}),o.jsx("button",{onClick:()=>N(!1),className:"p-2 hover:bg-gray-100 dark:hover:bg-gray-700 rounded-lg transition-colors",children:o.jsx(yt,{className:"w-5 h-5 text-gray-500"})})]}),o.jsxs("div",{className:"flex-1 overflow-y-auto p-6 space-y-6",children:[o.jsxs("div",{children:[o.jsx("label",{className:"block text-sm font-bold text-gray-900 dark:text-white mb-3",children:e("seoModal.keywordsLabel")}),o.jsx("p",{className:"text-xs text-gray-600 dark:text-gray-400 mb-3",children:e("seoModal.keywordsDescription")}),o.jsxs("div",{className:"flex gap-2 mb-3",children:[o.jsx("input",{type:"text",value:W,onChange:te=>K(te.target.value),onKeyPress:te=>te.key==="Enter"&&V(),placeholder:e("seoModal.keywordPlaceholder"),disabled:T.length>=10,className:"input flex-1 bg-white dark:bg-gray-700 text-gray-900 dark:text-white disabled:opacity-50"}),o.jsx("button",{type:"button",onClick:V,disabled:T.length>=10,className:`btn px-6 disabled:opacity-50 disabled:cursor-not-allowed transition-all ${W.trim()?"btn-primary ring-2 ring-purple-300 dark:ring-purple-500 animate-pulse":"btn-primary"}`,children:e("sourcesModal.addButton")})]}),T.length>0&&o.jsx("div",{className:"flex flex-wrap gap-2",children:T.map((te,pe)=>o.jsxs(ue.div,{initial:{opacity:0,scale:.8},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.8},className:"flex items-center gap-2 px-3 py-1.5 bg-purple-100 dark:bg-purple-900/30 text-purple-700 dark:text-purple-300 rounded-full text-sm",children:[o.jsx("span",{children:te}),o.jsx("button",{type:"button",onClick:()=>U(pe),className:"hover:text-red-600 dark:hover:text-red-400",children:o.jsx(yt,{className:"w-4 h-4"})})]},pe))})]}),o.jsxs("div",{children:[o.jsx("label",{className:"block text-sm font-bold text-gray-900 dark:text-white mb-3",children:e("seoModal.linksLabel",{max:R})}),o.jsxs("p",{className:"text-xs text-gray-600 dark:text-gray-400 mb-3",children:[e("seoModal.linksDescription"),R===0&&o.jsx("span",{className:"block mt-1 text-orange-600 dark:text-orange-400",children:e("seoModal.linksTooShort")})]}),R>0&&o.jsxs(o.Fragment,{children:[o.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-2 mb-3",children:[o.jsx("input",{type:"text",value:Y,onChange:te=>$(te.target.value),placeholder:e("seoModal.urlPlaceholder"),disabled:!j,className:"input bg-white dark:bg-gray-700 text-gray-900 dark:text-white disabled:opacity-50"}),o.jsx("input",{type:"text",value:D,onChange:te=>J(te.target.value),onKeyPress:te=>te.key==="Enter"&&ce(),placeholder:e("seoModal.anchorPlaceholder"),disabled:!j,className:"input bg-white dark:bg-gray-700 text-gray-900 dark:text-white disabled:opacity-50"})]}),o.jsx("button",{type:"button",onClick:ce,disabled:!j,className:"btn btn-primary w-full disabled:opacity-50",children:j?e("seoModal.addLinkButton",{count:E.length,max:R}):e("seoModal.linkLimitReached",{max:R})})]}),E.length>0&&o.jsx("div",{className:"space-y-2 mt-3",children:E.map((te,pe)=>o.jsxs(ue.div,{initial:{opacity:0,x:-10},animate:{opacity:1,x:0},exit:{opacity:0,x:10},className:"flex items-center gap-2 p-3 bg-indigo-50 dark:bg-indigo-900/20 rounded-lg border border-indigo-200 dark:border-indigo-800",children:[o.jsx(eh,{className:"w-4 h-4 text-indigo-600 dark:text-indigo-400 flex-shrink-0"}),o.jsxs("div",{className:"flex-1 min-w-0",children:[o.jsx("p",{className:"text-sm font-semibold text-gray-900 dark:text-white truncate",children:te.anchor}),o.jsx("p",{className:"text-xs text-gray-600 dark:text-gray-400 truncate",title:te.url,children:te.url})]}),o.jsx("button",{type:"button",onClick:()=>X(pe),className:"p-1.5 text-red-600 hover:bg-red-100 dark:hover:bg-red-900/30 rounded-lg transition-colors flex-shrink-0",children:o.jsx(Cr,{className:"w-4 h-4"})})]},pe))})]}),o.jsx("div",{className:"bg-blue-50 dark:bg-blue-900/20 border border-blue-200 dark:border-blue-800 p-4 rounded-lg",children:o.jsxs("div",{className:"flex gap-3",children:[o.jsx(Ma,{className:"w-5 h-5 text-blue-600 dar
1011k:text-blue-400 flex-shrink-0 mt-0.5"}),o.jsxs("div",{className:"text-sm text-gray-700 dark:text-gray-300 space-y-2",children:[o.jsx("p",{children:o.jsx("strong",{children:e("seoModal.infoKeywords")})}),o.jsx("p",{children:o.jsx("strong",{children:e("seoModal.infoLinks")})}),o.jsx("p",{className:"text-xs text-gray-600 dark:text-gray-400",children:e("seoModal.infoLimits")})]})]})})]}),o.jsxs("div",{className:"flex gap-3 p-6 border-t border-gray-200 dark:border-gray-700 bg-gray-50 dark:bg-gray-900/50",children:[o.jsx("button",{type:"button",onClick:jx,className:"btn btn-secondary flex-1 bg-white dark:bg-gray-800 text-gray-900 dark:text-gray-200",children:e("seoModal.cancel")}),o.jsxs("button",{type:"button",onClick:vx,className:"btn btn-primary flex-1 flex items-center justify-center gap-2",children:[o.jsx(On,{className:"w-4 h-4"}),e("seoModal.confirm")," (",T.length+E.length+(W.trim()?1:0)+(Y.trim()&&D.trim()?1:0),")"]})]})]})})})]})},gz=({status:t})=>{const{t:e}=He("orders"),r={PENDING:{bg:"bg-yellow-100 dark:bg-yellow-900/30",text:"text-yellow-700 dark:text-yellow-300",icon:qs,label:e("status.pending")},IN_PROGRESS:{bg:"bg-blue-100 dark:bg-blue-900/30",text:"text-blue-700 dark:text-blue-300",icon:fn,label:e("status.inProgress")},COMPLETED:{bg:"bg-green-100 dark:bg-green-900/30",text:"text-green-700 dark:text-green-300",icon:Rt,label:e("status.completed")},CANCELLED:{bg:"bg-red-100 dark:bg-red-900/30",text:"text-red-700 dark:text-red-300",icon:q0,label:e("status.cancelled")}},n=r[t]||r.PENDING,s=n.icon;return o.jsxs("span",{className:`inline-flex items-center gap-1.5 px-3 py-1 rounded-full text-xs font-medium ${n.bg} ${n.text}`,children:[o.jsx(s,{className:"w-3.5 h-3.5"}),n.label]})},Mke=({progress:t})=>{const{t:e}=He("orders");return t?t==="completed"?o.jsxs("span",{className:"inline-flex items-center gap-1.5 px-2 py-1 rounded-full text-xs font-medium bg-green-100 dark:bg-green-900/30 text-green-700 dark:text-green-300",children:[o.jsx(Rt,{className:"w-3 h-3"}),e("textStatus.completed")]}):t==="error"?o.jsxs("span",{className:"inline-flex items-center gap-1.5 px-2 py-1 rounded-full text-xs font-medium bg-red-100 dark:bg-red-900/30 text-red-700 dark:text-red-300",children:[o.jsx(q0,{className:"w-3 h-3"}),e("textStatus.error")]}):o.jsxs("span",{className:"inline-flex items-center gap-1.5 px-2 py-1 rounded-full text-xs font-medium bg-blue-100 dark:bg-blue-900/30 text-blue-700 dark:text-blue-300 animate-pulse",children:[o.jsx(fn,{className:"w-3 h-3"}),e("textStatus.generating")]}):o.jsxs("span",{className:"inline-flex items-center gap-1.5 px-2 py-1 rounded-full text-xs font-medium bg-gray-100 dark:bg-gray-700 text-gray-600 dark:text-gray-300",children:[o.jsx(qs,{className:"w-3 h-3"}),e("textStatus.waiting")]})},Dke=()=>{const{t}=He("orders"),{formatPrice:e}=bn(),[r,n]=Ad(),[s,i]=M.useState("list"),[a,l]=M.useState(null),c=M.useRef(!1),u=M.useRef(!1),d=Vr(),{data:h,isLoading:p,refetch:f}=mt({queryKey:["orders"],queryFn:async()=>{const x=(await xe.get("/orders")).data;return Array.isArray(x)?x:x.orders||[]},refetchInterval:g=>{const x=g.state.data;return(x==null?void 0:x.some(b=>b.status==="IN_PROGRESS"))?5e3:!1}}),m=g=>g===1?t("order.texts.one"):g<5?t("order.texts.few"):t("order.texts.many");M.useEffect(()=>{if(!h)return;const g="last-seen-timestamp",x=localStorage.getItem(g),w=x?new Date(x):null;if(!w){localStorage.setItem(g,new Date().toISOString());return}h.filter(v=>v.status!=="COMPLETED"?!1:new Date(v.updatedAt||v.createdAt)>w).forEach(v=>{le.success(t("toast.orderReady",{title:PE(v)}),{duration:1e4})}),localStorage.setItem(g,new Date().toISOString())},[h,t]),M.useEffect(()=>{const g=r.get("mode"),x=r.get("payment"),w=r.get("orderId");if(x==="cancelled"&&w&&!u.current){u.current=!0,i("new"),setTimeout(()=>{n({})},500);return}if(x==="success"&&w&&!c.current){le.success(t("toast.paymentSuccess")),c.current=!0,i("list"),n({}),f();return}if(x==="success"&&!w){n({}),i("list");return}if(g==="new"){i("new");return}u.current&&!g&&!x||u.current||i("list")},[r,n,f,t]);const y=()=>{i("list"),n({}),f()},k=()=>{i("new"),n({mode:"new"})};return s==="new"?o.jsxs("div",{className:"min-h-screen bg-gray-50 dark:bg-gray-900 flex",children:[o.jsx(ws,{}),o.jsx("div",{className:"flex-1 min-w-0 p-4 sm:p-6 lg:p-8",children:o.jsxs("div",{className:"max-w-7xl mx-auto",children:[o.jsx(xa,{to:"/orders",label:t("header.backToList")}),o.jsx(Lke,{onSuccess:y}
1011)]})})]}):o.jsxs("div",{className:"min-h-screen bg-gray-50 dark:bg-gray-900 flex",children:[o.jsx(ws,{}),o.jsx("div",{className:"flex-1 min-w-0 p-4 sm:p-6 lg:p-8",children:o.jsxs("div",{className:"max-w-7xl mx-auto",children:[o.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center sm:justify-between gap-4 mb-8",children:[o.jsxs("div",{children:[o.jsx(xa,{}),o.jsx("h1",{className:"text-4xl font-bold text-gray-900 dark:text-white mb-2",children:t("header.title")}),o.jsx("p",{className:"text-xl text-gray-600 dark:text-gray-300",children:t("header.subtitle")})]}),o.jsxs("button",{onClick:k,className:"btn btn-primary flex items-center justify-center gap-2 w-full sm:w-auto",children:[o.jsx(Qr,{className:"w-5 h-5"}),t("header.newOrder")]})]}),p&&o.jsx("div",{className:"flex items-center justify-center h-64",children:o.jsx("div",{className:"text-gray-600 dark:text-gray-400",children:t("loading")})}),!p&&(!h||h.length===0)&&o.jsxs(ue.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},className:"card dark:bg-gray-800 dark:border-gray-700 text-center py-16",children:[o.jsx(rd,{pose:"sleep",size:"lg",className:"mx-auto mb-5"}),o.jsx("h3",{className:"text-2xl font-bold text-gray-900 dark:text-white mb-2",children:t("empty.title")}),o.jsx("p",{className:"text-gray-600 dark:text-gray-300 mb-6",children:t("empty.description")}),o.jsxs("button",{onClick:k,className:"btn btn-primary inline-flex items-center gap-2",children:[o.jsx(Jt,{className:"w-5 h-5"}),t("empty.cta")]})]}),!p&&h&&h.length>0&&o.jsx("div",{className:"space-y-6",children:h.map((g,x)=>{const w=g.texts.filter(v=>v.progress==="completed").length,b=g.texts.length;return o.jsxs(ue.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:x*.1},className:"card dark:bg-gray-800 dark:border-gray-700 hover:shadow-lg transition-shadow",children:[o.jsxs("div",{className:"flex items-start justify-between gap-3 mb-6",children:[o.jsxs("div",{className:"flex-1 min-w-0",children:[o.jsxs("div",{className:"flex items-center gap-3 mb-2",children:[o.jsx("button",{onClick:()=>d(`/orders/${g.id}`),className:"text-lg sm:text-xl font-bold text-gray-900 dark:text-white hover:text-purple-600 dark:hover:text-purple-400 transition-colors text-left break-words max-w-full",children:PE(g)}),o.jsx(gz,{status:g.status})]}),o.jsxs("p",{className:"text-xs text-gray-500 dark:text-gray-400 mb-2",children:[g.orderNumber,g.source&&o.jsxs("span",{className:"ml-2 inline-flex items-center px-1.5 py-0.5 rounded text-[10px] font-bold bg-indigo-100 dark:bg-indigo-900/40 text-indigo-700 dark:text-indigo-300 align-middle",children:["⚡ ",g.source]})]}),o.jsxs("div",{className:"flex items-center gap-4 text-sm text-gray-600 dark:text-gray-400",children:[o.jsxs("span",{className:"flex items-center gap-1",children:[o.jsx(uc,{className:"w-4 h-4"}),new Date(g.createdAt).toLocaleDateString()]}),o.jsxs("span",{className:"flex items-center gap-1",children:[o.jsx(Jt,{className:"w-4 h-4"}),g.texts.length," ",m(g.texts.length)]}),g.status==="IN_PROGRESS"&&b>1&&o.jsxs("span",{className:"flex items-center gap-1 text-blue-600 dark:text-blue-400 font-medium",children:[o.jsx(Rt,{className:"w-4 h-4"}),t("order.completedOf",{completed:w,total:b})]})]})]}),o.jsx("div",{className:"text-right flex-shrink-0",children:o.jsx("div",{className:"text-2xl sm:text-3xl font-bold text-purple-600 dark:text-purple-400 mb-1 whitespace-nowrap",children:e(parseFloat(g.totalPrice.toString()))})})]}),g.status==="IN_PROGRESS"&&o.jsx("div",{className:"mt-4 space-y-3",children:g.texts.map(v=>o.jsxs("div",{children:[o.jsxs("div",{className:"flex items-center justify-between mb-2",children:[o.jsx("p",{className:"text-sm font-medium text-gray-700 dark:text-gray-300",children:v.topic}),o.jsx(Mke,{progress:v.progress})]}),v.progress&&v.progress!=="error"&&o.jsx(qy,{progress:v.progress,textLength:v.length,startTime:v.startTime}),v.progress==="error"&&o.jsx(ue.div,{initial:{opacity:0,scale:.95},animate:{opacity:1,scale:1},className:"p-3 bg-red-50 dark:bg-red-900/20 border border-red-200 dark:border-red-800 rounded-lg",children:o.jsxs("div",{className:"flex items-center gap-2 text-red-700 dark:text-red-300",children:[o.jsx(q0,{className:"w-5 h-5"}),o.jsx("span",{className:"text-sm font-medium",children:t("order.errorGenerating")})]})})]},v.id))}),g.status==="COMPLETED"&&o.jsx("div",{className:"border-t border-gray-200 dark:border-gray-700 pt-4",children:o.jsxs("button",{onClick:()=>d(`/orders/${g.id}
1011`),className:"text-purple-600 dark:text-purple-400 hover:text-purple-700 dark:hover:text-purple-300 transition-colors flex items-center gap-2 text-sm font-medium",children:[t("order.viewDetails"),o.jsx(Sr,{className:"w-4 h-4"})]})})]},g.id)})}),a&&o.jsx(ue.div,{initial:{opacity:0},animate:{opacity:1},onClick:()=>l(null),className:"fixed inset-0 bg-black/50 backdrop-blur-sm z-50 flex items-center justify-center p-4",children:o.jsxs(ue.div,{initial:{scale:.9,y:20},animate:{scale:1,y:0},onClick:g=>g.stopPropagation(),className:"card dark:bg-gray-800 dark:border-gray-700 max-w-3xl w-full max-h-[90vh] overflow-y-auto",children:[o.jsxs("div",{className:"flex items-center justify-between mb-6",children:[o.jsxs("div",{children:[o.jsx("h2",{className:"text-2xl font-bold text-gray-900 dark:text-white mb-2",children:a.orderNumber}),o.jsx(gz,{status:a.status})]}),o.jsx("button",{onClick:()=>l(null),className:"text-gray-400 hover:text-gray-600 dark:hover:text-gray-300",children:o.jsx(q0,{className:"w-6 h-6"})})]}),o.jsxs("div",{className:"space-y-6",children:[o.jsxs("div",{className:"grid grid-cols-3 gap-4 p-4 bg-gray-50 dark:bg-gray-700 rounded-lg",children:[o.jsxs("div",{children:[o.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400 mb-1",children:t("modal.orderDate")}),o.jsx("p",{className:"font-semibold text-gray-900 dark:text-white",children:new Date(a.createdAt).toLocaleDateString()})]}),o.jsxs("div",{children:[o.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400 mb-1",children:t("modal.textsCount")}),o.jsx("p",{className:"font-semibold text-gray-900 dark:text-white",children:a.texts.length})]}),o.jsxs("div",{children:[o.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400 mb-1",children:t("modal.total")}),o.jsx("p",{className:"text-xl font-bold text-purple-600 dark:text-purple-400",children:e(parseFloat(a.totalPrice.toString()))})]})]}),o.jsxs("div",{children:[o.jsx("h3",{className:"text-lg font-bold text-gray-900 dark:text-white mb-4",children:t("modal.orderedTexts")}),o.jsx("div",{className:"space-y-4",children:a.texts.map((g,x)=>o.jsx("div",{className:"p-4 border border-gray-200 dark:border-gray-700 rounded-lg",children:o.jsxs("div",{className:"flex items-start justify-between mb-3",children:[o.jsxs("div",{className:"flex-1",children:[o.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[o.jsx("span",{className:"w-6 h-6 bg-purple-600 text-white rounded-full flex items-center justify-center text-xs font-bold",children:x+1}),o.jsx("h4",{className:"font-semibold text-gray-900 dark:text-white",children:g.topic})]}),o.jsxs("div",{className:"flex flex-wrap gap-3 text-sm text-gray-600 dark:text-gray-400",children:[o.jsxs("span",{children:["📋 ",t("modal.declared")," ",g.length.toLocaleString()," ",t("modal.characters")," (",g.pages," ",t("modal.pages"),")"]}),g.generatedContent&&o.jsxs("span",{className:"text-green-600 dark:text-green-400 font-medium",children:["✅ ",t("modal.generated")," ",g.generatedContent.replace(/<[^>]*>/g,"").length.toLocaleString()," ",t("modal.characters")," (",Math.ceil(g.generatedContent.replace(/<[^>]*>/g,"").length/2e3)," ",t("modal.pages"),")"]}),o.jsxs("span",{children:["🌍 ",g.language.toUpperCase()]})]})]}),o.jsx("div",{className:"text-right",children:o.jsx("p",{className:"text-lg font-bold text-purple-600 dark:text-purple-400",children:e(parseFloat(g.price.toString()))})})]})},g.id))})]})]})]})})]})})]})},Fke={planning:"text-blue-600 dark:text-blue-400",active:"text-green-600 dark:text-green-400",paused:"text-amber-600 dark:text-amber-400",completed:"text-gray-500",failed:"text-red-600 dark:text-red-400"},yz={planned:"bg-gray-100 dark:bg-gray-700 text-gray-600 dark:text-gray-300",generating:"bg-blue-100 dark:bg-blue-900/30 text-blue-700 dark:text-blue-300",completed:"bg-purple-100 dark:bg-purple-900/30 text-purple-700 dark:text-purple-300",published:"bg-green-100 dark:bg-green-900/30 text-green-700 dark:text-green-300",failed:"bg-red-100 dark:bg-red-900/30 text-red-700 dark:text-red-300"},Bke=({plan:t,onChanged:e})=>{const{t:r}=He("autoblog"),[n,s]=M.useState({name:t.name,textsPerWeek:t.textsPerWeek,targetLength:t.targetLength,wpStatus:t.wpStatus,withImages:t.withImages!==!1}),i=n.name!==t.name||n.textsPerWeek!==t.textsPerWeek||n.targetLength!==t.targetLength||n.wpStatus!==t.wpStatus||n.withImages!==(t.withImages!==!1),a=Be({mutationFn:async()=>xe.patch(`/plans/${t.id}`,n),onSuccess:()=>{le.success(r("settings.saved")),e()},onError:l=>{var c,u;return le.error(((u=(c=l.response)==null?void 0:c.data)==null?void 0:u.error)||r("toast.error"))}});return o.jsxs("div",{className:"flex flex-wrap items-end gap-3 mb-4 p-3 rounded-lg bg-gray-50 dark:bg-gray-700/40 border border-gray-200 dark:border-gray-600",children:[o.jsxs("div",{className:"flex-1 min-w-[180px]",children:[o.jsx("label",{className:"block text-[11px] text-gray-500 mb-0.5",children:r("settings.name")}
1011),o.jsx("input",{value:n.name,onChange:l=>s({...n,name:l.target.value}),maxLength:80,className:"input w-full text-sm py-1.5 bg-white dark:bg-gray-800 text-gray-900 dark:text-white"})]}),o.jsxs("div",{children:[o.jsx("label",{className:"block text-[11px] text-gray-500 mb-0.5",children:r("create.freqLabel")}),o.jsx("select",{value:n.textsPerWeek,onChange:l=>s({...n,textsPerWeek:parseInt(l.target.value)}),className:"input text-sm py-1.5 bg-white dark:bg-gray-800 text-gray-900 dark:text-white",children:[1,2,3,5,7].map(l=>o.jsxs("option",{value:l,children:[l,"/",r("unit.week")]},l))})]}),o.jsxs("div",{children:[o.jsx("label",{className:"block text-[11px] text-gray-500 mb-0.5",children:r("create.lengthLabel")}),o.jsx("select",{value:n.targetLength,onChange:l=>s({...n,targetLength:parseInt(l.target.value)}),className:"input text-sm py-1.5 bg-white dark:bg-gray-800 text-gray-900 dark:text-white",children:[5e3,8e3,12e3,16e3,2e4].map(l=>o.jsxs("option",{value:l,children:[l.toLocaleString()," ",r("unit.chars")]},l))})]}),t.wpSiteId&&o.jsxs("div",{children:[o.jsx("label",{className:"block text-[11px] text-gray-500 mb-0.5",children:r("settings.wpStatus")}),o.jsxs("select",{value:n.wpStatus,onChange:l=>s({...n,wpStatus:l.target.value}),className:"input text-sm py-1.5 bg-white dark:bg-gray-800 text-gray-900 dark:text-white",children:[o.jsx("option",{value:"publish",children:r("settings.wpPublish")}),o.jsx("option",{value:"draft",children:r("settings.wpDraft")})]})]}),o.jsxs("label",{className:"flex items-center gap-1.5 text-xs text-gray-700 dark:text-gray-300 pb-2",children:[o.jsx("input",{type:"checkbox",checked:n.withImages,onChange:l=>s({...n,withImages:l.target.checked})}),r("create.imagesLabel")]}),o.jsx("button",{onClick:()=>a.mutate(),disabled:!i||a.isPending,className:"btn btn-primary text-xs disabled:opacity-40",children:r("settings.save")})]})},$ke=({plan:t,onChanged:e})=>{const{t:r}=He("autoblog"),[n,s]=M.useState(null),[i,a]=M.useState(""),[l,c]=M.useState(null),[u,d]=M.useState(null),h=M.useRef(null),p=t.items.map(x=>x.id).join(",");M.useEffect(()=>{c(null)},[p]),M.useEffect(()=>{const x=w=>{h.current&&(w.clientY<90?window.scrollBy(0,-14):w.clientY>window.innerHeight-90&&window.scrollBy(0,14))};return document.addEventListener("dragover",x),()=>document.removeEventListener("dragover",x)},[]);const f=l?l.map(x=>t.items.find(w=>w.id===x)).filter(Boolean):t.items,m=Be({mutationFn:async({id:x,topic:w})=>xe.patch(`/plans/${t.id}/items/${x}`,{topic:w}),onSuccess:()=>{le.success(r("items.saved")),s(null),e()},onError:x=>{var w,b;return le.error(((b=(w=x.response)==null?void 0:w.data)==null?void 0:b.error)||r("toast.error"))}}),y=Be({mutationFn:async x=>xe.delete(`/plans/${t.id}/items/${x}`),onSuccess:()=>{le.success(r("items.deleted")),e()},onError:x=>{var w,b;return le.error(((b=(w=x.response)==null?void 0:w.data)==null?void 0:b.error)||r("toast.error"))}}),k=Be({mutationFn:async x=>xe.post(`/plans/${t.id}/items/reorder`,{itemIds:x}),onSuccess:e,onError:x=>{var w,b;le.error(((b=(w=x.response)==null?void 0:w.data)==null?void 0:b.error)||r("toast.error")),c(null)}}),g=x=>{if(!h.current||h.current===x)return;const w=l??t.items.map(C=>C.id),b=w.indexOf(h.current),v=w.indexOf(x);if(b<0||v<0||b===v)return;const A=[...w];A.splice(v,0,A.splice(b,1)[0]),c(A)};return o.jsx("ol",{className:"space-y-1.5",children:f.map((x,w)=>{const b=x.status==="planned",v=n===x.id;return o.jsxs("li",{draggable:b&&!v,onDragStart:()=>{h.current=x.id,d(x.id)},onDragEnd:()=>{h.current=null,d(null),l&&k.mutate(l)},onDragOver:A=>{A.preventDefault(),g(x.id)},className:`flex items-center gap-2 text-sm rounded-lg px-1 py-0.5 transition-colors ${u===x.id?"opacity-40 bg-purple-50 dark:bg-purple-900/20":""}`,children:[b?o.jsx(CV,{className:"w-4 h-4 text-gray-300 dark:text-gray-600 cursor-grab shrink-0","aria-label":r("items.dragHint")}):o.jsx("span",{className:"w-4 shrink-0"}),o.jsxs("span",{className:"text-xs text-gray-400 w-6 text-right shrink-0",children:[w+1,"."]}),o.jsx("span",{className:`text-[11px] px-2 py-0.5 rounded-full shrink-0 ${yz[x.status]||yz.planned}`,children:r(`plan.itemStatus.${x.status}`)}),v?o.jsxs(o.Fragment,{children:[o.jsx("input",{value:i,onChange:A=>a(A.target.value),maxLength:300,autoFocus:!0,className:"input flex-1 text-sm py-1 bg-white dark:bg-gray-900 text-gray-900 dark:text-white",onKeyDown:A=>{A.key==="Enter"&&m.mutate({id:x.id,topic:i}),A.key==="Escape"&&s(null)}}),o.jsx("button",{onClick:()=>m.mutate({id:x.id,topic:i}),disabled:i.trim().length<5||m.isPending,className:"p-1 text-green-600 hover:bg-green-50 dark:hover:bg-green-900/30 rounded disabled:opacity-40",title:r("items.save"),children:o.jsx(On,{className:"w-4 h-4"})}),o.jsx("button",{onClick:()=>s(null),className:"p-1 text-gray-400 hover:bg-gray-100 dark:hover:bg-gray-700 rounded",title:r("items.cancel"),children:o.jsx(yt,{className:"w-4 h-4"})})]}):o.jsxs(o.Fragment,{children:[x.orderId?o.jsx(ze,{to:`/orders/${x.orderId}`,className:"text-purple-700 dark:text-purple-300 hover:underline truncate flex-1",children:x.topic}):o.jsx("span",{className:"text-gray-800 dark:text-gray-200 truncate flex-1",children:x.topic}),b&&o.jsxs(o.Fragment,{children:[o.jsx("button",{onClick:()=>{s(x.id),a(x.topic)}
1011,className:"p-1 text-gray-400 hover:text-purple-600 dark:hover:text-purple-400 hover:bg-purple-50 dark:hover:bg-purple-900/30 rounded shrink-0",title:r("items.edit"),children:o.jsx(DV,{className:"w-3.5 h-3.5"})}),o.jsx("button",{onClick:()=>y.mutate(x.id),disabled:y.isPending,className:"p-1 text-gray-400 hover:text-red-600 dark:hover:text-red-400 hover:bg-red-50 dark:hover:bg-red-900/30 rounded shrink-0 disabled:opacity-40",title:r("items.delete"),children:o.jsx(yt,{className:"w-3.5 h-3.5"})})]}),x.publishedLink&&o.jsx("a",{href:x.publishedLink,target:"_blank",rel:"noopener noreferrer",className:"text-purple-600 dark:text-purple-400 shrink-0",title:x.publishedLink,children:o.jsx(Oo,{className:"w-4 h-4"})})]})]},x.id)})})},Uke=()=>{var A,C,_;const{t,i18n:e}=He("autoblog"),{formatPrice:r}=bn(),n=Zs(),[s,i]=M.useState(!1),[a,l]=M.useState(new Set),[c,u]=M.useState({niche:"",name:"",wpSiteId:"",textsPerWeek:2,targetLength:8e3,textType:"BLOG_POST",wpStatus:"publish",withImages:!0}),{data:d}=mt({queryKey:["content-plans"],queryFn:async()=>(await xe.get("/plans")).data,refetchInterval:N=>{var K;return((K=N.state.data)==null?void 0:K.some(T=>T.status==="planning"||T.items.some(F=>F.status==="generating")))?8e3:6e4}}),[h,p]=Ad(),f=M.useRef(!1),{data:m,refetch:y}=mt({queryKey:["auto-topup"],queryFn:async()=>(await xe.get("/billing/auto-topup")).data});M.useEffect(()=>{const N=h.get("card");N&&!f.current&&(f.current=!0,N==="saved"&&le.success(t("topup.cardSaved"),{duration:6e3}),N==="cancelled"&&le(t("topup.cardCancelled")),h.delete("card"),p(h,{replace:!0}),y())},[h,p,y,t]);const k=Be({mutationFn:async N=>(await xe.post("/billing/auto-topup",N)).data,onSuccess:N=>{if(N.setupUrl){le(t("topup.redirecting")),window.location.href=N.setupUrl;return}le.success(t("topup.saved")),y()},onError:N=>{var W,K;return le.error(((K=(W=N.response)==null?void 0:W.data)==null?void 0:K.error)||t("toast.error"))}}),g=()=>n.invalidateQueries({queryKey:["content-plans"]}),x=Be({mutationFn:async()=>{var W;return(await xe.post("/plans",{...c,wpSiteId:c.wpSiteId||null,language:(W=e.language)!=null&&W.startsWith("pl")?"pl":"en"})).data},onSuccess:()=>{le.success(t("create.created"),{duration:7e3}),i(!1),u({...c,niche:"",name:""}),g()},onError:N=>{var W,K;return le.error(((K=(W=N.response)==null?void 0:W.data)==null?void 0:K.error)||t("toast.error"))}}),w=Be({mutationFn:async({planId:N,action:W})=>(W==="delete"?await xe.delete(`/plans/${N}`):await xe.post(`/plans/${N}/${W}`),W),onSuccess:N=>{const W={pause:t("toast.paused"),resume:t("toast.resumed"),"run-now":t("toast.runStarted"),delete:t("toast.deleted")};le.success(W[N]),g()},onError:N=>{var W,K;return le.error(((K=(W=N.response)==null?void 0:W.data)==null?void 0:K.error)||t("toast.error"))}}),b=r(Gp(c.targetLength)),v=N=>{l(W=>{const K=new Set(W);return K.has(N)?K.delete(N):K.add(N),K})};return o.jsxs("div",{className:"min-h-screen bg-gray-50 dark:bg-gray-900 flex",children:[o.jsx(ws,{}),o.jsx("div",{className:"flex-1 min-w-0 p-4 sm:p-6 lg:p-8",children:o.jsxs("div",{className:"max-w-5xl mx-auto",children:[o.jsxs("div",{className:"flex items-start justify-between mb-8",children:[o.jsxs("div",{children:[o.jsx(xa,{}),o.jsxs("h1",{className:"text-3xl font-bold text-gray-900 dark:text-white mb-1 flex items-center gap-3",children:[o.jsx(ga,{className:"w-8 h-8 text-purple-600"}),t("title")]}),o.jsx("p",{className:"text-gray-600 dark:text-gray-400 max-w-2xl",children:t("subtitle")})]}),o.jsxs("button",{onClick:()=>i(N=>!N),className:"btn btn-primary flex items-center gap-2",children:[o.jsx(Qr,{className:"w-4 h-4"}),t("create.button")]})]}),((d==null?void 0:d.length)??0)>0&&o.jsx("div",{className:"card dark:bg-gray-800 dark:border-gray-700 mb-6",children:o.jsxs("div",{className:"flex items-start justify-between gap-4 flex-wrap",children:[o.jsxs("div",{className:"flex items-start gap-3 flex-1 min-w-[260px]",children:[o.jsx(yv,{className:"w-5 h-5 text-purple-600 mt-0.5 shrink-0"}),o.jsxs("div",{children:[o.jsxs("p",{className:"font-semibold text-gray-900 dark:text-white flex items-center gap-1.5",children:[t("topup.title")," ",o.jsxs("span",{className:`text-xs font-normal ${m!=null&&m.enabled?"text-green-600 dark:text-green-400":"text-gray-400"}`,children:["● ",m!=null&&m.enabled?t("topup.enabled"):t("topup.disabled")]}),o.jsx(jd,{text:t("topup.consent")})]}),o.jsx("p",{className:"text-xs text-gray-500 dark:text-gray-400 max-w-xl",children:t("topup.subtitle")}),(m==null?void 0:m.hasCard)&&o.jsxs("p",{className:"text-xs text-gray-600 dark:text-gray-300 mt-1",children:[t("topup.cardLabel"),":"," ",o.jsxs("span",{className:"font-medium",children:[(C=(A=m.card)==null?void 0:A.brand)==null?void 0:C.toUpperCase()," ••••"," ",(_=m.card)==null?void 0:_.last4]}),o.jsx("button",{onClick:()=>k.mutate({enabled:!0}
1011),className:"ml-2 text-purple-600 dark:text-purple-400 hover:underline",children:t("topup.changeCard")})]})]})]}),o.jsxs("div",{className:"flex items-center gap-3",children:[o.jsxs("div",{children:[o.jsx("label",{className:"block text-[11px] text-gray-500 mb-0.5",children:t("topup.amountLabel")}),o.jsx("select",{value:(m==null?void 0:m.amount)||50,onChange:N=>k.mutate({amount:parseInt(N.target.value)}),className:"input text-sm bg-white dark:bg-gray-800 text-gray-900 dark:text-white",children:[50,100,200,500].map(N=>o.jsx("option",{value:N,children:r(N)},N))})]}),o.jsx("button",{onClick:()=>k.mutate({enabled:!(m!=null&&m.enabled)}),disabled:k.isPending,className:`btn text-sm ${m!=null&&m.enabled?"btn-secondary":"btn-primary"}`,children:m!=null&&m.enabled?t("topup.disable"):t("topup.enable")})]})]})}),o.jsx(jt,{children:s&&o.jsxs(ue.div,{initial:{opacity:0,height:0},animate:{opacity:1,height:"auto"},exit:{opacity:0,height:0},className:"card dark:bg-gray-800 dark:border-gray-700 mb-8 overflow-hidden",children:[o.jsx("h2",{className:"text-lg font-bold text-gray-900 dark:text-white mb-4",children:t("create.title")}),o.jsx("label",{className:"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1",children:t("create.nicheLabel")}),o.jsx("textarea",{value:c.niche,onChange:N=>u({...c,niche:N.target.value}),placeholder:t("create.nichePlaceholder"),rows:4,maxLength:8e3,className:"input w-full resize-none mb-4 bg-white dark:bg-gray-800 text-gray-900 dark:text-white"}),o.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4 mb-4",children:[o.jsxs("div",{children:[o.jsx("label",{className:"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1",children:t("create.nameLabel")}),o.jsx("input",{type:"text",value:c.name,onChange:N=>u({...c,name:N.target.value}),className:"input w-full bg-white dark:bg-gray-800 text-gray-900 dark:text-white"})]}),o.jsxs("div",{children:[o.jsx("label",{className:"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1",children:t("create.siteLabel")}),o.jsx(w9,{value:c.wpSiteId,onChange:N=>u({...c,wpSiteId:N}),status:c.wpStatus==="publish"?"publish":"draft",onStatusChange:N=>u({...c,wpStatus:N==="publish"?"publish":"draft"})})]}),o.jsxs("div",{children:[o.jsx("label",{className:"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1",children:t("create.freqLabel")}),o.jsx("select",{value:c.textsPerWeek,onChange:N=>u({...c,textsPerWeek:parseInt(N.target.value)}),className:"input w-full bg-white dark:bg-gray-800 text-gray-900 dark:text-white",children:[1,2,3,5,7].map(N=>o.jsx("option",{value:N,children:N},N))})]}),o.jsxs("div",{children:[o.jsx("label",{className:"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1",children:t("create.lengthLabel")}),o.jsx("select",{value:c.targetLength,onChange:N=>u({...c,targetLength:parseInt(N.target.value)}),className:"input w-full bg-white dark:bg-gray-800 text-gray-900 dark:text-white",children:[5e3,8e3,12e3,16e3,2e4].map(N=>o.jsxs("option",{value:N,children:[N.toLocaleString()," (",(N/2e3).toLocaleString()," ",t("unit.pages"),")"]},N))})]}),o.jsxs("div",{children:[o.jsx("label",{className:"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1",children:t("create.typeLabel")}),o.jsxs("select",{value:c.textType,onChange:N=>u({...c,textType:N.target.value}),className:"input w-full bg-white dark:bg-gray-800 text-gray-900 dark:text-white",children:[o.jsx("option",{value:"BLOG_POST",children:"Blog post"}),o.jsx("option",{value:"ARTICLE",children:"Artykuł"}),o.jsx("option",{value:"COMPANY_TEXT",children:"Tekst firmowy"})]})]})]}),o.jsxs("label",{className:"flex items-start gap-3 mb-3 cursor-pointer",children:[o.jsx("input",{type:"checkbox",checked:c.withImages,onChange:N=>u({...c,withImages:N.target.checked}),className:"mt-0.5 w-4 h-4 rounded border-gray-300 text-purple-600 focus:ring-purple-500"}),o.jsxs("span",{children:[o.jsx("span",{className:"block text-sm font-medium text-gray-900 dark:text-white",children:t("create.imagesLabel")}),o.jsx("span",{className:"block text-xs text-gray-500 dark:text-gray-400",children:t("create.imagesHint")})]})]}),o.jsx("p",{className:"text-xs text-gray-500 dark:text-gray-400 mb-3",children:t("create.priceNote",{price:b})}),o.jsx("button",{onClick:()=>x.mutate(),disabled:c.niche.trim().length<20||x.isPending,className:"btn btn-primary disabled:opacity-50",children:x.isPending?t("create.submitting"):t("create.submit")})]})}),o.jsxs("div",{className:"space-y-4",children:[(d||[]).map(N=>{const W=N.items.filter(T=>T.status==="published"||T.status==="completed").length,K=a.has(N.id
1011);return o.jsxs("div",{className:"card dark:bg-gray-800 dark:border-gray-700",children:[o.jsxs("div",{className:"flex items-center justify-between gap-4 flex-wrap",children:[o.jsxs("button",{onClick:()=>v(N.id),className:"flex items-center gap-3 text-left flex-1 min-w-0",children:[o.jsx(Ti,{className:`w-4 h-4 text-gray-400 transition-transform ${K?"":"-rotate-90"}`}),o.jsxs("div",{className:"min-w-0",children:[o.jsx("p",{className:"font-semibold text-gray-900 dark:text-white truncate",children:N.name}),o.jsxs("p",{className:"text-xs text-gray-500",children:[o.jsxs("span",{className:Fke[N.status]||"text-gray-500",children:["●"," ",t(`plan.status${N.status.charAt(0).toUpperCase()+N.status.slice(1)}`)]})," · ",t("plan.progress"),": ",W,"/",N.items.length," · ",N.textsPerWeek,"/",t("unit.week")," ·"," ",N.targetLength.toLocaleString()," ",t("unit.chars")]})]})]}),o.jsxs("div",{className:"flex items-center gap-2",children:[N.status==="active"&&o.jsxs("button",{onClick:()=>w.mutate({planId:N.id,action:"run-now"}),disabled:w.isPending,className:"btn btn-secondary text-xs flex items-center gap-1 disabled:opacity-50",title:t("plan.runNow"),children:[o.jsx(Py,{className:"w-3.5 h-3.5"}),t("plan.generateNow")]}),o.jsx("button",{onClick:()=>w.mutate({planId:N.id,action:"resume"}),disabled:N.status!=="paused"||w.isPending,className:"btn btn-secondary text-xs disabled:opacity-35 disabled:cursor-not-allowed",title:t("plan.resume"),children:o.jsx(H0,{className:"w-3.5 h-3.5"})}),o.jsx("button",{onClick:()=>w.mutate({planId:N.id,action:"pause"}),disabled:N.status!=="active"||w.isPending,className:"btn btn-secondary text-xs disabled:opacity-35 disabled:cursor-not-allowed",title:t("plan.pause"),children:o.jsx(KI,{className:"w-3.5 h-3.5"})}),o.jsx("button",{onClick:()=>{window.confirm(t("plan.deleteConfirm"))&&w.mutate({planId:N.id,action:"delete"})},className:"btn btn-secondary text-xs text-red-500",title:t("plan.delete"),children:o.jsx(Cr,{className:"w-3.5 h-3.5"})})]})]}),K&&o.jsxs("div",{className:"mt-4 border-t border-gray-200 dark:border-gray-700 pt-3",children:[o.jsx(Bke,{plan:N,onChanged:g}),o.jsx($ke,{plan:N,onChanged:g})]})]},N.id)}),(d||[]).length===0&&!s&&o.jsxs("div",{className:"text-center py-16 text-gray-500 dark:text-gray-400",children:[o.jsx(rd,{pose:"explain",size:"lg",className:"mx-auto mb-5"}),o.jsx("h3",{className:"text-xl font-bold text-gray-900 dark:text-white mb-2",children:t("empty.title")}),o.jsx("p",{className:"max-w-lg mx-auto",children:t("empty.description")}),o.jsx("div",{className:"mt-4",children:o.jsxs(ze,{to:"#",onClick:N=>{N.preventDefault(),i(!0)},className:"btn btn-primary inline-flex items-center gap-2",children:[o.jsx(Qr,{className:"w-4 h-4"})," ",t("create.button")]})})]})]})]})})]})},Pa=({text:t,align:e="left"})=>{const[r,n]=M.useState(!1),s=M.useRef(null);return M.useEffect(()=>{if(!r)return;const i=a=>{s.current&&!s.current.contains(a.target)&&n(!1)};return document.addEventListener("mousedown",i),()=>document.removeEventListener("mousedown",i)},[r]),o.jsxs("span",{ref:s,className:"relative inline-flex align-middle",onMouseEnter:()=>n(!0),onMouseLeave:()=>n(!1),children:[o.jsx("button",{type:"button","aria-label":t,"aria-expanded":r,onClick:()=>n(i=>!i),onFocus:()=>n(!0),onBlur:()=>n(!1),className:"text-gray-400 hover:text-purple-600 dark:hover:text-purple-400 focus:text-purple-600 focus:outline-none focus-visible:ring-2 focus-visible:ring-purple-500 rounded-full transition-colors",children:o.jsx(Ma,{className:"w-3.5 h-3.5"})}),r&&o.jsx("span",{role:"tooltip",className:`absolute bottom-full mb-2 z-30 w-60 px-3 py-2 rounded-lg bg-gray-900 dark:bg-gray-700 text-white text-xs font-normal leading-relaxed shadow-xl ${e==="right"?"right-0":"left-0"}`,children:t})]})},G1=50,b9=({jobId:t,jobStatus:e,onChanged:r})=>{const{t:n}=He("bulk"),{formatPrice:s}=bn(),[i,a]=M.useState(""),[l,c]=M.useState(""),[u,d]=M.useState("pending"),[h,p]=M.useState(0),[f,m]=M.useState(new Set),{data:y,isFetching:k,refetch:g}=mt({queryKey:["bulk-items",t,l,u,h],queryFn:async()=>(await xe.get(`/bulk/jobs/${t}/items`,{params:{q:l||void 0,status:u||void 0,limit:G1,offset:h*G1}})).data,refetchInterval:K=>{var E;return(((E=K.state.data)==null?void 0:E.data)??[]).some(H=>H.status==="pending"||H.status==="ordered")||e==="running"||e==="writing"?5e3:!1}}),x=Be({mutationFn:async({ids:K,dokad:T})=>
1011(await xe.post(`/bulk/jobs/${t}/items/${T}`,{ids:K})).data,onSuccess:(K,T)=>{le.success(n(T.dokad==="exclude"?"items.excluded":"items.restored",{n:K.changed})),m(new Set),g(),r()},onError:K=>{var T,F;return le.error(((F=(T=K.response)==null?void 0:T.data)==null?void 0:F.error)||n("errors.generic"))}}),w=Be({mutationFn:async({ids:K,length:T})=>(await xe.post(`/bulk/jobs/${t}/items/length`,{ids:K,length:T})).data,onSuccess:K=>{le.success(n("items.lengthChanged",{n:K.changed,length:K.length})),m(new Set),g(),r()},onError:K=>{var T,F;return le.error(((F=(T=K.response)==null?void 0:T.data)==null?void 0:F.error)||n("errors.generic"))}}),b=(y==null?void 0:y.data)??[],v=Math.ceil(((y==null?void 0:y.total)??0)/G1),A=b.filter(K=>K.status==="pending"),_=b.filter(K=>K.skip_reason==="excluded").filter(K=>f.has(K.id)).length,N=K=>{const T=new Set(f);T.has(K)?T.delete(K):T.add(K),m(T)},W="px-3 py-2 rounded-lg border border-gray-300 dark:border-gray-600 bg-white dark:bg-gray-900 text-gray-900 dark:text-white text-sm";return o.jsxs("div",{className:"mt-4 border-t border-gray-200 dark:border-gray-700 pt-4",children:[o.jsxs("div",{className:"flex flex-wrap items-center gap-2 mb-3",children:[o.jsxs("div",{className:"relative flex-1 min-w-[180px]",children:[o.jsx(_i,{className:"w-4 h-4 absolute left-3 top-1/2 -translate-y-1/2 text-gray-400"}),o.jsx("input",{className:`${W} w-full pl-9`,placeholder:n("items.search"),value:i,onChange:K=>a(K.target.value),onKeyDown:K=>{K.key==="Enter"&&(c(i),p(0))}})]}),o.jsxs("select",{className:W,value:u,onChange:K=>{d(K.target.value),p(0)},children:[o.jsx("option",{value:"",children:n("items.all")}),o.jsx("option",{value:"pending",children:n("items.pending")}),o.jsx("option",{value:"skipped",children:n("items.skipped")}),o.jsx("option",{value:"excluded",children:n("items.excludedFilter")}),o.jsx("option",{value:"deferred",children:n("items.deferredFilter")}),o.jsx("option",{value:"completed",children:n("items.completed")}),o.jsx("option",{value:"failed",children:n("items.failed")})]}),f.size>0&&o.jsxs("select",{className:W,value:"",disabled:w.isPending||e==="running",onChange:K=>{const T=Number(K.target.value);T&&w.mutate({ids:[...f],length:T})},children:[o.jsx("option",{value:"",children:n("items.setLength",{n:f.size})}),[500,1e3,2e3,3e3,5e3].map(K=>o.jsxs("option",{value:K,children:[K.toLocaleString()," ",n("items.chars")]},K))]}),f.size>0&&(_>0?o.jsxs("button",{onClick:()=>x.mutate({ids:[...f],dokad:"restore"}),disabled:x.isPending||e==="running",title:e==="running"?n("items.pauseFirst"):void 0,className:"btn btn-secondary text-sm inline-flex items-center gap-1.5 disabled:opacity-50",children:[x.isPending?o.jsx(dt,{className:"w-4 h-4 animate-spin"}):o.jsx(GI,{className:"w-4 h-4"}),n("items.restoreSelected",{n:_})]}):o.jsxs("button",{onClick:()=>x.mutate({ids:[...f],dokad:"exclude"}),disabled:x.isPending||e==="running",title:e==="running"?n("items.pauseFirst"):void 0,className:"btn text-sm inline-flex items-center gap-1.5 bg-red-600 hover:bg-red-700 text-white disabled:opacity-50",children:[x.isPending?o.jsx(dt,{className:"w-4 h-4 animate-spin"}):o.jsx(yt,{className:"w-4 h-4"}),n("items.excludeSelected",{n:f.size})]}))]}),k&&b.length===0?o.jsx("p",{className:"text-sm text-gray-500 py-4",children:n("items.loading")}):b.length===0?o.jsx("p",{className:"text-sm text-gray-500 py-4",children:n("items.none")}):o.jsxs(o.Fragment,{children:[o.jsx("div",{className:"overflow-x-auto",children:o.jsxs("table",{className:"w-full text-xs",children:[o.jsx("thead",{children:o.jsxs("tr",{className:"text-gray-500 border-b border-gray-200 dark:border-gray-700",children:[o.jsx("th",{className:"py-1.5 pr-2 w-8",children:o.jsx("input",{type:"checkbox","aria-label":n("items.selectAll"),checked:A.length>0&&A.every(K=>f.has(K.id)),onChange:K=>m(K.target.checked?new Set(A.map(T=>T.id)):new Set)})}),o.jsx("th",{className:"py-1.5 pr-2 w-10"}),o.jsx("th",{className:"py-1.5 pr-3 text-left font-medium",children:n("items.colId")}),o.jsx("th",{className:"py-1.5 pr-3 text-left font-medium",children:n("items.colTopic")}),o.jsx("th",{className:"py-1.5 pr-3 text-right font-medium whitespace-nowrap",children:n("items.colLength")}),o.jsx("th",{className:"py-1.5 text-right font-medium",children:n("items.colState")})]})}),o.jsx("tbody",{children:b.map(K=>{const T=K.status==="pending"||K.skip_reason==="excluded";return o.jsxs("tr",{className:"border-b border-gray-100 dark:border-gray-700 last:border-0",children:[o.jsx("td",{className:"py-1.5 pr-2",children:o.jsx("input",{type:"checkbox","aria-label":K.topic,disabled:!T,checked:f.has(K.id
1011),onChange:()=>N(K.id),className:"disabled:opacity-30"})}),o.jsx("td",{className:"py-1.5 pr-2 w-10",children:K.image?o.jsx("img",{src:K.image,alt:"",loading:"lazy",className:"w-8 h-8 rounded object-cover border border-gray-200 dark:border-gray-700"}):o.jsx("span",{className:"block w-8 h-8 rounded bg-gray-100 dark:bg-gray-700"})}),o.jsx("td",{className:"py-1.5 pr-3 text-gray-500 whitespace-nowrap",children:K.external_id||"—"}),o.jsx("td",{className:`py-1.5 pr-3 ${K.skip_reason==="excluded"?"text-gray-400 line-through":"text-gray-900 dark:text-gray-100"}`,children:K.url?o.jsxs("a",{href:K.url,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-1 hover:text-purple-600 dark:hover:text-purple-400 hover:underline",children:[K.topic,o.jsx(Oo,{className:"w-3 h-3 flex-shrink-0 opacity-60"})]}):K.topic}),o.jsx("td",{className:"py-1.5 pr-3 text-right whitespace-nowrap",children:K.status==="pending"?o.jsx("select",{value:K.length??2e3,disabled:w.isPending||e==="running",onChange:F=>w.mutate({ids:[K.id],length:Number(F.target.value)}),"aria-label":n("items.colLength"),className:"px-1.5 py-0.5 rounded border border-transparent hover:border-gray-300 dark:hover:border-gray-600 bg-white dark:bg-gray-800 text-gray-700 dark:text-gray-200 tabular-nums text-xs cursor-pointer",children:[500,1e3,2e3,3e3,5e3].map(F=>o.jsx("option",{value:F,className:"bg-white text-gray-900 dark:bg-gray-800 dark:text-gray-100",children:F.toLocaleString()},F))}):o.jsx("span",{className:"text-gray-500 tabular-nums",children:K.length?K.length.toLocaleString():"—"})}),o.jsx("td",{className:"py-1.5 text-right whitespace-nowrap text-gray-900 dark:text-gray-100",children:K.status==="completed"&&K.order_id?o.jsxs(ze,{to:`/orders/${K.order_id}`,className:"inline-flex items-center gap-1 text-purple-600 dark:text-purple-400 hover:underline",children:[o.jsx(Bs,{className:"w-3.5 h-3.5"}),K.order_number||n("items.completed"),o.jsx(Oo,{className:"w-3 h-3"})]}):K.status==="pending"?s(K.price??0):K.status==="skipped"?n(`skip.${K.skip_reason}`):n(`items.${K.status}`)})]},K.id)})})]})}),o.jsxs("div",{className:"flex items-center justify-between gap-3 mt-3 text-xs text-gray-500",children:[o.jsx("span",{children:v>1?n("items.page",{n:h+1,of:v,total:(y==null?void 0:y.total)??0}):n("items.count",{total:(y==null?void 0:y.total)??0})}),v>1&&o.jsxs("span",{className:"flex gap-2",children:[o.jsx("button",{onClick:()=>p(K=>Math.max(0,K-1)),disabled:h===0,className:"btn btn-secondary text-xs px-3 py-1.5 disabled:opacity-40",children:n("items.prev")}),o.jsx("button",{onClick:()=>p(K=>Math.min(v-1,K+1)),disabled:h>=v-1,className:"btn btn-secondary text-xs px-3 py-1.5 disabled:opacity-40",children:n("items.next")})]})]})]})]})};async function k9(t,e){const r=await xe.get(t,{responseType:"blob"}),n=URL.createObjectURL(r.data),s=document.createElement("a");s.href=n,s.download=e,document.body.appendChild(s),s.click(),s.remove(),URL.revokeObjectURL(n)}function v9(t,e){return`opisy-${t.replace(/https?:\/\//g,"").replace(/[^\p{L}\p{N}\-_ ]+/gu," ").replace(/\s+/g," ").trim().substring(0,60)||"paczka"}.${e}`}const Wke=({onConfigure:t,onJobsChanged:e})=>{const{t:r}=He("bulk"),{formatPrice:n}=bn(),[s,i]=M.useState(null),[a,l]=M.useState(25),{data:c,refetch:u}=mt({queryKey:["bulk-connections"],queryFn:async()=>(await xe.get("/bulk/connections")).data.data,refetchInterval:m=>(m.state.data??[]).some(g=>{var x,w;return((x=g.job)==null?void 0:x.status)==="running"||((w=g.job)==null?void 0:w.status)==="writing"})?5e3:3e4}),d=Be({mutationFn:async m=>(await xe.post(`/bulk/jobs/${m}/run`,{limit:a})).data,onSuccess:m=>{var y,k;(y=m.run)!=null&&y.paused?le.error(r("paused")):le.success(r("started",{n:((k=m.run)==null?void 0:k.ordered)??0})),u(),e()},onError:m=>{var y,k;return le.error(((k=(y=m.response)==null?void 0:y.data)==null?void 0:k.error)||r("errors.generic"))}}),h=Be({mutationFn:async m=>(await xe.post(`/bulk/jobs/${m}/refresh`)).data,onSuccess:()=>{le.success(r("refreshed")),u(),e()},onError:m=>{var y,k;return le.error(((k=(y=m.response)==null?void 0:y.data)==null?void 0:k.error)||r("errors.generic"))}}),p=Be({mutationFn:async m=>
1011xe.delete(`/bulk/connections/${m}`),onSuccess:()=>{u()},onError:m=>{var y,k;return le.error(((k=(y=m.response)==null?void 0:y.data)==null?void 0:k.error)||r("errors.generic"))}});async function f(m,y,k){var g;try{await k9(`/bulk/jobs/${m}/export.${k}`,v9(y,k))}catch(x){const w=((g=x.response)==null?void 0:g.status)===409?r("errors.nothingReady"):r("errors.generic");le.error(w)}}return!c||c.length===0?null:o.jsxs("div",{className:"mb-10 space-y-3",children:[o.jsx("h2",{className:"text-xl font-bold text-gray-900 dark:text-white",children:r("bl.title")}),c.map(m=>{const y=m.job,k=y?Math.max(0,y.total_items-y.skipped_items):0,g=y?y.done_items+y.failed_items:0,x=k?Math.round(g/k*100):0;return o.jsxs("div",{className:"card dark:bg-gray-800 dark:border-gray-700",children:[o.jsxs("div",{className:"flex items-start justify-between gap-3 flex-wrap mb-3",children:[o.jsxs("div",{className:"min-w-0",children:[o.jsxs("p",{className:"flex items-center gap-2 font-semibold text-gray-900 dark:text-white",children:[o.jsx(hc,{className:"w-4 h-4 text-purple-600 dark:text-purple-400 flex-shrink-0"}),(y==null?void 0:y.inventory_name)||m.label,o.jsx("span",{className:"text-xs font-normal text-gray-500",children:r(`sources.${m.provider}`)}),o.jsx("span",{className:"text-xs font-mono text-gray-500",children:m.token_hint})]}),y?o.jsxs("p",{className:"text-xs text-gray-500 mt-0.5",children:[r(`status.${y.status}`),y.interval_hours?` · ${r("everyHours",{n:y.interval_hours})}`:"",y.write_back?` · ${r("bl.writesBack")}`:` · ${r("bl.exportOnly")}`,y.charged_price?` · ${r("charged",{amount:n(y.charged_price)})}`:""]}):o.jsx("p",{className:"text-xs text-gray-500 mt-0.5",children:r("bl.notConfigured")})]}),o.jsxs("div",{className:"flex items-center gap-1.5 flex-shrink-0",children:[y&&y.status!=="done"&&k>g&&o.jsxs(o.Fragment,{children:[o.jsx("select",{value:a,onChange:w=>l(Number(w.target.value)),"aria-label":r("runHowMany"),className:"px-2 py-2 rounded-lg border border-gray-300 dark:border-gray-600 bg-white dark:bg-gray-900 text-gray-900 dark:text-white text-xs",children:[10,25,50,100,200].map(w=>o.jsx("option",{value:w,children:r("runNext",{n:w})},w))}),o.jsxs("button",{onClick:()=>d.mutate(y.id),disabled:d.isPending,className:"btn btn-primary text-xs px-3 py-2 inline-flex items-center gap-1.5 disabled:opacity-50",children:[d.isPending?o.jsx(dt,{className:"w-3.5 h-3.5 animate-spin"}):o.jsx(H0,{className:"w-3.5 h-3.5"}),r("run")]})]}),y&&o.jsxs(o.Fragment,{children:[o.jsx("button",{onClick:()=>h.mutate(y.id),disabled:h.isPending,title:r("bl.refreshHint"),className:"p-2 rounded-lg text-gray-500 hover:bg-gray-100 dark:hover:bg-gray-700",children:o.jsx(Lo,{className:`w-4 h-4 ${h.isPending?"animate-spin":""}`})}),o.jsx("button",{onClick:()=>f(y.id,y.name,"csv"),className:"p-2 rounded-lg text-gray-500 hover:bg-gray-100 dark:hover:bg-gray-700 text-xs font-semibold",title:r("downloadCsv"),children:"CSV"}),o.jsx("button",{onClick:()=>f(y.id,y.name,"json"),className:"p-2 rounded-lg text-gray-500 hover:bg-gray-100 dark:hover:bg-gray-700 text-xs font-semibold",title:r("downloadJson"),children:"JSON"})]}),o.jsx("button",{onClick:()=>t(m.id,m.provider),title:r(y?"bl.reconfigure":"bl.configure"),className:"p-2 rounded-lg text-gray-500 hover:bg-gray-100 dark:hover:bg-gray-700",children:o.jsx(xv,{className:"w-4 h-4"})}),o.jsx("button",{onClick:()=>p.mutate(m.id),title:r("connections.remove"),className:"p-2 rounded-lg text-gray-400 hover:text-red-500",children:o.jsx(yt,{className:"w-4 h-4"})})]})]}),y?o.jsxs(o.Fragment,{children:[o.jsx("div",{className:"h-2 rounded-full bg-gray-100 dark:bg-gray-700 overflow-hidden",children:o.jsx("div",{className:"h-full bg-gradient-to-r from-purple-600 to-indigo-600 transition-all",style:{width:`${x}%`}})}),o.jsxs("p",{className:"text-xs text-gray-500 mt-1.5",children:[r("progress",{done:y.done_items,total:k}),y.failed_items>0&&` · ${r("progressFailed",{failed:y.failed_items})}`,y.skipped_items>0&&` · ${r("progressSkipped",{skipped:y.skipped_items})}`,k>g&&y.estimated_price?` · ${r("bl.remaining",{amount:n(y.estimated_price)})}`:""]}),o.jsxs("button",{onClick:()=>i(s===m.id?null:m.id),className:"mt-3 inline-flex items-center gap-1 text-xs font-medium text-purple-600 dar
1011k:text-purple-400 hover:underline",children:[s===m.id?o.jsx(Ti,{className:"w-3.5 h-3.5"}):o.jsx(Pd,{className:"w-3.5 h-3.5"}),r("items.toggle",{n:y.total_items})]}),s===m.id&&o.jsx(b9,{jobId:y.id,jobStatus:y.status,onChanged:()=>{u(),e()}})]}):o.jsxs("button",{onClick:()=>t(m.id,m.provider),className:"btn btn-primary text-sm inline-flex items-center gap-2",children:[o.jsx(xv,{className:"w-4 h-4"}),r("bl.configure")]})]},m.id)})]})},Vke=()=>{var Of;const{t,i18n:e}=He("bulk"),{formatPrice:r}=bn(),[n,s]=M.useState(null),[i,a]=M.useState(null),[l,c]=M.useState(""),[u,d]=M.useState(""),[h,p]=M.useState(null),[f,m]=M.useState(!0),[y,k]=M.useState([]),[g,x]=M.useState(""),[w,b]=M.useState(null),[v,A]=M.useState(null),[C,_]=M.useState({externalId:"",topic:"",skipIfFilled:"",images:"",url:"",guidelines:[]}),[N,W]=M.useState({length:2e3,language:(Of=e.language)!=null&&Of.startsWith("en")?"en":"pl",textType:"PRODUCT_DESCRIPTION",guidelines:""}),[K,T]=M.useState(0),[F,E]=M.useState(null),[H,Y]=M.useState([]),[$,D]=M.useState(25),[J,de]=M.useState(!0),[G,B]=M.useState("html"),[re,ae]=M.useState(""),[ge,ne]=M.useState(""),[O,I]=M.useState(""),[ee,Q]=M.useState(""),[q,Z]=M.useState(!1),[me,z]=M.useState(null),[fe,R]=M.useState(""),[j,S]=M.useState(""),[P,L]=M.useState(null),[V,U]=M.useState(null),{data:oe,refetch:ce}=mt({queryKey:["bulk-jobs"],queryFn:async()=>(await xe.get("/bulk/jobs")).data.data,refetchInterval:se=>(se.state.data??[]).some(Me=>Me.status==="running"||Me.status==="writing")?5e3:3e4}),{data:X,refetch:he}=mt({queryKey:["bulk-connections"],queryFn:async()=>(await xe.get("/bulk/connections")).data.data}),we=new Set((X??[]).map(se=>{var te;return(te=se.job)==null?void 0:te.id}).filter(Boolean)),Te=(oe??[]).filter(se=>!we.has(se.id)&&!se.connection_id),Ye=()=>h?{connection_id:h}:{domain:fe,api_key:j},bt=()=>h?{connection_id:h}:q?{domain:re,login:O,password:ee}:{domain:re,token:ge},Et=()=>h?{connection_id:h}:{url:l},kn=()=>h?{connection_id:h}:{token:u};M.useEffect(()=>{n==="baselinker"&&!h&&(X==null?void 0:X.length)===1&&p(X[0].id)},[n,X,h]);const gt=()=>{s(null),a(null),c(""),d(""),p(null),k([]),x(""),b(null),A(null),_({externalId:"",topic:"",skipIfFilled:"",images:"",url:"",guidelines:[]}),Y([]),ae(""),ne(""),I(""),Q(""),z(null),R(""),S(""),L(null)},Hr=se=>{const te=new FormData;return se&&te.append("payload",JSON.stringify(se)),i&&te.append("file",i),te},Cs=Be({mutationFn:async()=>n==="upload"?(await xe.post("/bulk/preview",Hr())).data:n==="feed"?(await xe.post("/bulk/feed/preview",Et())).data:n==="shoper"?(await xe.post("/bulk/shoper/preview",bt())).data:n==="idosell"?(await xe.post("/bulk/idosell/preview",Ye())).data:(await xe.post("/bulk/baselinker/preview",{...kn(),inventory_id:g})).data,onSuccess:se=>{b(se);const te=se.remembered_mapping;if(te!=null&&te.topic){const Me=We=>We&&se.headers.includes(We)?We:"";_({externalId:Me(te.externalId),topic:Me(te.topic),skipIfFilled:Me(te.skipIfFilled),images:Me(te.images),url:Me(te.url),guidelines:(te.guidelines??[]).map(We=>typeof We=="string"?We:We.field).filter(We=>se.headers.includes(We))}),le.success(t("mappingRemembered"));return}const pe=(...Me)=>se.headers.find(We=>Me.some(lt=>lt.test(We)))||"";_({externalId:pe(/^product_id$/i,/\bsku\b/i,/^id$/i,/g:id/i),topic:pe(/^name$/i,/g:title/i,/nazwa/i,/title/i),skipIfFilled:pe(/^description$/i,/g:description/i,/opis/i),images:pe(/^image$/i,/g:image_link/i,/image_url/i,/zdjec/i,/photo/i),url:pe(/^url$/i,/^link$/i,/g:link/i,/permalink/i,/product_url/i),guidelines:[]})},onError:se=>{var te,pe;return le.error(((pe=(te=se.response)==null?void 0:te.data)==null?void 0:pe.error)||t("errors.generic"))}}),wr=Be({mutationFn:async()=>(await xe.post("/bulk/idosell/verify",{...Ye(),save:!0})).data,onSuccess:se=>{L(se.products??0),se.connection&&(p(se.connection.id),S(""),he())},onError:se=>{var te,pe;return le.error(((pe=(te=se.response)==null?void 0:te.data)==null?void 0:pe.error)||t("errors.generic"))}}),Es=Be({mutationFn:async()=>(await xe.post("/bulk/shoper/verify",{...bt(),save:!0})).data,onSuccess:se=>{z(se.products??0),se.connection&&(p(se.connection.id),ne(""),Q(""),he())},onError:se=>{var te,pe;return le.error(((pe=(te=se.response)==null?void 0:te.data)==null?void 0:pe.error)||t("errors.generic"))}}),Un=Be({mutationFn:async()=>(await xe.post("/bulk/baselinker/inventories",{...kn(),save:!h&&f})).data,onSuccess:se=>{k(se.data),se.data.length===1&&x(se.data[0].id),se.connection&&(p(se.connection.id),d(""),he())},onError:se=>{var te,pe;return le.error(((pe=(te=se.response)==null?void 0:te.data)==null?void 0:pe.error)||t("errors.generic"))}}),Qs=Be({mutationFn:async()=>{const se={mapping:zc(),defaults:N,exclude:H};return n==="upload"?(await xe.post("/bulk/estimate",Hr(se))).data:n==="feed"?(await xe.post("/bulk/feed/estimate",{...Et(),...se})).data:n==="shoper"?(await xe.post("/bulk/shoper/estimate",{...bt(),...se})).data:n==="idosell"?(await xe.post("/bulk/idosell/estimate",{...Ye(),...se})).data:(await xe.post("/bulk/baselinker/estimate",{...kn(),inventory_id:g,...se})).data},onSuccess:se=>A(se),onError:se=>{var te,pe;return le.error(((pe=(te=se.response)==null?void 0:te.data)==null?void 0:pe.error)||t("errors.generic"))}}),nl=Be({mutationFn:async()=>{var te;const se={name:Nx(),mapping:zc(),defaults:N,exclude:H,write_back:n==="baselinker"?J:void 0,inventory_name:n==="baselinker"?(te=y.find(pe=>pe.id===g))==null?void 0:te.name:void 0,write_back_format:n==="baselinker"?G:void 0,interval_hours:K||void 0};return n==="upload"?(await xe.post("/bulk/jobs",Hr(se))).data:n==="feed"?(await xe.post("/bulk/feed/jobs",{...Et(),...se})).data:n==="shoper"?(await xe.post("/bulk/shoper/jobs",{...bt(),...se,write_back:J,write_back_format:G})).data:n==="idosell"?(await xe.post("/bulk/idosell/jobs",{...Ye(),...se,write_back:J,write_back_format:G})).data:(await xe.post("/bulk/baselinker/jobs",{...kn(),inventory_id:g,...se})).data},onSuccess:se=>{le.success(t("created")),U(se.id),E(se.id),ce(),he()},onError:se=>{var te,pe;return le.error(((pe=(te=se.response)==null?void 0:te.data)==null?void 0:pe.error)||t("errors.generic"))}}),sl=Be({mutationFn:async se=>
1011(await xe.post(`/bulk/jobs/${se}/items/extend`,{count:$})).data,onSuccess:se=>{le.success(t("extended",{n:se.added,left:se.deferred_left})),ce()},onError:se=>{var te,pe;return le.error(((pe=(te=se.response)==null?void 0:te.data)==null?void 0:pe.error)||t("errors.generic"))}}),ts=Be({mutationFn:async se=>(await xe.post(`/bulk/jobs/${se}/run`,{limit:$})).data,onSuccess:se=>{var te,pe;(te=se.run)!=null&&te.paused?le.error(t("paused")):le.success(t("started",{n:((pe=se.run)==null?void 0:pe.ordered)??0})),ce()},onError:se=>{var te,pe;return le.error(((pe=(te=se.response)==null?void 0:te.data)==null?void 0:pe.error)||t("errors.generic"))}}),Na=Be({mutationFn:async se=>(await xe.post(`/bulk/jobs/${se}/pause`)).data,onSuccess:()=>{le.success(t("pausedOk")),ce()},onError:se=>{var te,pe;return le.error(((pe=(te=se.response)==null?void 0:te.data)==null?void 0:pe.error)||t("errors.generic"))}}),vx=Be({mutationFn:async se=>(await xe.post(`/bulk/jobs/${se}/refresh`)).data,onSuccess:()=>{le.success(t("refreshed")),ce()},onError:se=>{var te,pe;return le.error(((pe=(te=se.response)==null?void 0:te.data)==null?void 0:pe.error)||t("errors.generic"))}}),jx=Be({mutationFn:async se=>xe.delete(`/bulk/connections/${se}`),onSuccess:(se,te)=>{h===te&&(p(null),k([]),x("")),he()},onError:se=>{var te,pe;return le.error(((pe=(te=se.response)==null?void 0:te.data)==null?void 0:pe.error)||t("errors.generic"))}}),Sx=Be({mutationFn:async se=>xe.delete(`/bulk/jobs/${se}`),onSuccess:()=>{le.success(t("deleted")),ce()},onError:se=>{var te,pe;return le.error(((pe=(te=se.response)==null?void 0:te.data)==null?void 0:pe.error)||t("errors.generic"))}});async function If(se,te,pe){var Me;try{await k9(`/bulk/jobs/${se}/export.${pe}`,v9(te,pe))}catch(We){const lt=((Me=We.response)==null?void 0:Me.status)===409?t("errors.nothingReady"):t("errors.generic");le.error(lt)}}function zc(){return{externalId:C.externalId||void 0,topic:C.topic,skipIfFilled:C.skipIfFilled||void 0,images:C.images||void 0,url:C.url||void 0,guidelines:C.guidelines.length?C.guidelines:void 0}}function Nx(){var se;return n==="upload"?(i==null?void 0:i.name)||t("sources.upload"):n==="feed"?l||t("sources.feed"):n==="shoper"?re||"Shoper":n==="idosell"?fe||"IdoSell":((se=y.find(te=>te.id===g))==null?void 0:se.name)||"Baselinker"}const br="w-full px-3 py-2 rounded-lg border border-gray-300 dark:border-gray-600 bg-white dark:bg-gray-900 text-gray-900 dark:text-white text-sm";return o.jsxs("div",{className:"min-h-screen bg-gray-50 dark:bg-gray-900 flex",children:[o.jsx(ws,{}),o.jsx("div",{className:"flex-1 min-w-0 p-4 sm:p-6 lg:p-8",children:o.jsxs("div",{className:"max-w-5xl",children:[o.jsx(xa,{}),o.jsx("h1",{className:"text-3xl font-bold text-gray-900 dark:text-white mb-1",children:t("title")}),o.jsx("p",{className:"text-gray-600 dark:text-gray-300 mb-8",children:t("subtitle")}),!n&&!V&&o.jsx(Wke,{onConfigure:(se,te)=>{p(se),s(te==="shoper"||te==="idosell"||te==="feed"?te:"baselinker")},onJobsChanged:ce}),V?o.jsx("div",{className:"card dark:bg-gray-800 dark:border-gray-700 mb-10",children:o.jsxs("div",{className:"flex items-start gap-3",children:[o.jsx(rd,{pose:"hand",size:"sm",className:"flex-shrink-0"}),o.jsxs("div",{className:"min-w-0",children:[o.jsx("p",{className:"font-semibold text-gray-900 dark:text-white mb-1",children:t("createdTitle")}),o.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-300 mb-4",children:t("createdHint")}),o.jsxs("div",{className:"flex flex-wrap gap-2",children:[o.jsxs("button",{onClick:()=>ts.mutate(V),disabled:ts.isPending,className:"btn btn-primary text-sm inline-flex items-center gap-2 disabled:opacity-50",children:[o.jsx(H0,{className:"w-4 h-4"}),t("run")]}),o.jsx("button",{onClick:()=>{U(null),gt()},className:"btn btn-secondary text-sm",children:t("createAnother")})]})]})]})}):n?o.jsxs("div",{className:"card dark:bg-gray-800 dark:border-gray-700 mb-10 space-y-5",children:[o.jsxs("div",{className:"flex items-center gap-3 flex-wrap",children:[o.jsxs("button",{onClick:gt,className:"btn btn-secondary text-sm inline-flex items-center gap-2",children:[o.jsx(ma,{className:"w-4 h-4"}),t("changeSource")]}),o.jsx("h2",{className:"font-semibold text-gray-900 dark:text-white",children:t(`sources.${n}`)})]}),n==="upload"&&o.jsx("input",{type:"file",accept:".csv,text/csv",onChange:se=>{var te;return a(((te=se.target.files)==null?void 0:te[0])||null)},className:br}),n==="feed"&&!h&&o.jsx("input",{className:br,placeholder:"https://twojsklep.pl/feed.xml",value:l,onCh
1011ange:se=>c(se.target.value)}),n==="baselinker"&&o.jsxs("div",{className:"space-y-3",children:[((X==null?void 0:X.length)??0)>0&&o.jsx("div",{className:"space-y-2",children:X.map(se=>o.jsxs("div",{className:`flex items-center gap-3 px-3 py-2 rounded-lg border transition-colors ${h===se.id?"border-purple-500 bg-purple-50 dark:bg-purple-900/20":"border-gray-300 dark:border-gray-600"}`,children:[o.jsxs("button",{onClick:()=>{p(se.id),d(""),k([]),x("")},className:"flex items-center gap-3 flex-1 min-w-0 text-left",children:[o.jsx(hc,{className:"w-4 h-4 text-purple-600 dark:text-purple-400 flex-shrink-0"}),o.jsx("span",{className:"truncate text-sm font-medium text-gray-900 dark:text-white",children:se.label}),o.jsx("span",{className:"text-xs text-gray-500 font-mono flex-shrink-0",children:se.token_hint})]}),o.jsx("button",{onClick:()=>jx.mutate(se.id),title:t("connections.remove"),className:"text-gray-400 hover:text-red-500 flex-shrink-0",children:o.jsx(yt,{className:"w-4 h-4"})})]},se.id))}),!h&&o.jsxs(o.Fragment,{children:[o.jsxs("div",{className:"flex gap-2 flex-wrap",children:[o.jsx("input",{className:`${br} flex-1 min-w-[220px]`,type:"password",placeholder:t("blTokenPlaceholder"),value:u,onChange:se=>d(se.target.value)}),o.jsx("button",{onClick:()=>Un.mutate(),disabled:!u||Un.isPending,className:"btn btn-secondary text-sm disabled:opacity-50",children:Un.isPending?o.jsx(dt,{className:"w-4 h-4 animate-spin"}):t("blLoad")})]}),o.jsxs("label",{className:"flex items-center gap-2 text-sm text-gray-600 dark:text-gray-300",children:[o.jsx("input",{type:"checkbox",checked:f,onChange:se=>m(se.target.checked),className:"rounded"}),t("connections.save")]})]}),h&&y.length===0&&o.jsxs("button",{onClick:()=>Un.mutate(),disabled:Un.isPending,className:"btn btn-secondary text-sm inline-flex items-center gap-2 disabled:opacity-50",children:[Un.isPending&&o.jsx(dt,{className:"w-4 h-4 animate-spin"}),t("blLoad")]}),y.length>0&&o.jsxs("select",{className:br,value:g,onChange:se=>x(se.target.value),children:[o.jsx("option",{value:"",children:t("blPickInventory")}),y.map(se=>o.jsx("option",{value:se.id,children:se.name},se.id))]})]}),n==="shoper"&&o.jsx("div",{className:"space-y-3",children:h?o.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-300",children:t("sh.connected",{n:me??0})}):o.jsxs(o.Fragment,{children:[o.jsx("input",{className:br,placeholder:t("sh.domainPlaceholder"),value:re,onChange:se=>ae(se.target.value)}),q?o.jsxs("div",{className:"grid sm:grid-cols-2 gap-2",children:[o.jsx("input",{className:br,placeholder:t("sh.login"),autoComplete:"off",value:O,onChange:se=>I(se.target.value)}),o.jsx("input",{className:br,type:"password",placeholder:t("sh.password"),autoComplete:"new-password",value:ee,onChange:se=>Q(se.target.value)})]}):o.jsx("input",{className:br,type:"password",placeholder:t("sh.tokenPlaceholder"),value:ge,onChange:se=>ne(se.target.value)}),o.jsxs("div",{className:"flex flex-wrap items-center gap-3",children:[o.jsxs("button",{onClick:()=>Es.mutate(),disabled:Es.isPending||!re||(q?!O||!ee:!ge),className:"btn btn-secondary text-sm inline-flex items-center gap-2 disabled:opacity-50",children:[Es.isPending&&o.jsx(dt,{className:"w-4 h-4 animate-spin"}),t("sh.check")]}),o.jsx("button",{onClick:()=>Z(se=>!se),className:"text-sm text-purple-600 dark:text-purple-400 hover:underline",children:t(q?"sh.useToken":"sh.useLogin")}),o.jsx(Pa,{text:t("sh.where")})]})]})}),n==="idosell"&&o.jsx("div",{className:"space-y-3",children:h?o.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-300",children:t("id.connected",{n:P??0})}):o.jsxs(o.Fragment,{children:[o.jsx("input",{className:br,placeholder:t("id.domainPlaceholder"),value:fe,onChange:se=>R(se.target.value)}),o.jsx("input",{className:br,type:"password",placeholder:t("id.keyPlaceholder"),value:j,onChange:se=>S(se.target.value)}),o.jsxs("div",{className:"flex flex-wrap items-center gap-3",children:[o.jsxs("button",{onClick:()=>wr.mutate(),disabled:wr.isPending||!fe||!j,className:"btn btn-secondary text-sm inline-flex items-center gap-2 disabled:opacity-50",children:[wr.isPending&&o.jsx(dt,{className:"w-4 h-4 animate-spin"}),t("sh.check")]}),o.jsx(Pa,{text:t("id.where")}
1011)]})]})}),o.jsxs("button",{onClick:()=>Cs.mutate(),disabled:Cs.isPending||n==="upload"&&!i||n==="feed"&&!l&&!h||n==="baselinker"&&!g||n==="shoper"&&!h||n==="idosell"&&!h,className:"btn btn-primary text-sm inline-flex items-center gap-2 disabled:opacity-50",children:[Cs.isPending?o.jsx(dt,{className:"w-4 h-4 animate-spin"}):o.jsx(Sr,{className:"w-4 h-4"}),t("readColumns")]}),w&&o.jsxs("div",{className:"border-t border-gray-200 dark:border-gray-700 pt-5 space-y-4",children:[o.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-300",children:t("foundRows",{n:w.total_rows,k:w.headers.length})}),o.jsxs("div",{className:"grid sm:grid-cols-2 gap-4",children:[[["topic",!0],["externalId",!1],["skipIfFilled",!1],["images",!1],["url",!1]].map(([se,te])=>o.jsxs("div",{children:[o.jsxs("label",{className:"flex items-center gap-1.5 text-sm font-medium text-gray-700 dark:text-gray-300 mb-1",children:[t(`mapping.${se}`),te&&o.jsx("span",{className:"text-red-500",children:"*"}),o.jsx(Pa,{text:t(`mapping.${se}Hint`)})]}),o.jsxs("select",{className:br,value:C[se],onChange:pe=>_({...C,[se]:pe.target.value}),children:[o.jsx("option",{value:"",children:"—"}),w.headers.map(pe=>o.jsx("option",{value:pe,children:pe},pe))]})]},se)),o.jsxs("div",{children:[o.jsxs("label",{className:"flex items-center gap-1.5 text-sm font-medium text-gray-700 dark:text-gray-300 mb-1",children:[t("mapping.guidelines"),o.jsx(Pa,{text:t("mapping.guidelinesHint")})]}),o.jsx("select",{multiple:!0,size:4,className:br,value:C.guidelines,onChange:se=>_({...C,guidelines:[...se.target.selectedOptions].map(te=>te.value)}),children:w.headers.map(se=>o.jsx("option",{value:se,children:se},se))})]})]}),o.jsxs("div",{className:"grid sm:grid-cols-3 gap-4",children:[o.jsxs("div",{children:[o.jsxs("label",{className:"flex items-center gap-1.5 text-sm font-medium text-gray-700 dark:text-gray-300 mb-1",children:[t("defaults.length"),o.jsx(Pa,{text:t("defaults.lengthHint")})]}),o.jsx("select",{className:br,value:N.length,onChange:se=>W({...N,length:Number(se.target.value)}),children:[500,1e3,2e3,3e3,5e3].map(se=>o.jsxs("option",{value:se,children:[se.toLocaleString()," ",t("defaults.chars")]},se))})]}),o.jsxs("div",{children:[o.jsxs("label",{className:"flex items-center gap-1.5 text-sm font-medium text-gray-700 dark:text-gray-300 mb-1",children:[t("defaults.language"),o.jsx(Pa,{text:t("defaults.languageHint")})]}),o.jsxs("select",{className:br,value:N.language,onChange:se=>W({...N,language:se.target.value}),children:[o.jsx("option",{value:"pl",children:"polski"}),o.jsx("option",{value:"en",children:"English"})]})]}),n!=="upload"&&o.jsxs("div",{children:[o.jsxs("label",{className:"flex items-center gap-1.5 text-sm font-medium text-gray-700 dark:text-gray-300 mb-1",children:[t("defaults.interval"),o.jsx(Pa,{text:t("defaults.intervalHint"),align:"right"})]}),o.jsxs("select",{className:br,value:K,onChange:se=>T(Number(se.target.value)),children:[o.jsx("option",{value:0,children:t("defaults.once")}),o.jsx("option",{value:24,children:t("defaults.daily")}),o.jsx("option",{value:168,children:t("defaults.weekly")})]})]})]}),o.jsx("textarea",{className:br,rows:2,placeholder:t("defaults.guidelinesPlaceholder"),value:N.guidelines,onChange:se=>W({...N,guidelines:se.target.value})}),o.jsxs("button",{onClick:()=>Qs.mutate(),disabled:!C.topic||Qs.isPending,className:"btn btn-secondary text-sm inline-flex items-center gap-2 disabled:opacity-50",children:[Qs.isPending?o.jsx(dt,{className:"w-4 h-4 animate-spin"}):null,t("calculate")]})]}),v&&o.jsxs("div",{className:"border-t border-gray-200 dark:border-gray-700 pt-5",children:[o.jsx("div",{className:"grid grid-cols-2 sm:grid-cols-4 gap-4 mb-4",children:[[t("est.toGenerate"),String(v.to_generate)],[t("est.skipped"),String(v.skipped)],[t("est.discount"),v.discount?`−${Math.round(v.discount*100)}%`:"—"],[t("est.total"),r(v.estimated_price)]].map(([se,te])=>o.jsxs("div",{className:"text-center",children:[o.jsx("p",{className:"text-xl font-bold text-purple-600 dark:text-purple-400",children:te}),o.jsx("p",{className:"text-xs text-gray-500",children:se})]},se))}),!v.sufficient_balance&&o.jsxs("p",{className:"flex items-start gap-2 text-sm text-amber-700 dark:text-amber-400 mb-4",children:[o.jsx(Np,{className:"w-4 h-4 flex-shrink-0 mt-0.5"}),t("est.lowBalance",{balance:r(v.balance)})]}),v.skipped>0&&o.jsxs("div",{className:"rounded-lg bg-gray-50 dark:bg-gray-900/50 px-4 py-3 mb-4",children:[o.jsx("p",{className:"text-sm font-medium text-gray-700 dark:text-gray-200 mb-1.5",children:t("est.whySkipped",{n:v.skipped})}),o.jsx("ul",{className:"space-y-1",children:Object.entries(v.skipped_reasons).map(([se,te])=>
1011o.jsxs("li",{className:"text-sm text-gray-600 dark:text-gray-300",children:[o.jsx("span",{className:"font-semibold tabular-nums",children:te})," ×"," ",t(`skipWhy.${se}`)]},se))})]}),o.jsx("p",{className:"text-xs text-gray-500 mb-2",children:t("est.previewNote",{n:v.preview.length,total:v.total})}),o.jsx("div",{className:"overflow-x-auto mb-4",children:o.jsx("table",{className:"w-full text-xs",children:o.jsx("tbody",{children:v.preview.map((se,te)=>{const pe=se.skip_reason==="excluded";return o.jsxs("tr",{className:"border-b border-gray-100 dark:border-gray-700 last:border-0",children:[o.jsx("td",{className:"py-1.5 pr-3 text-gray-500 whitespace-nowrap",children:se.external_id||"—"}),o.jsx("td",{className:`py-1.5 pr-3 ${pe?"text-gray-400 line-through":"text-gray-900 dark:text-white"}`,children:se.topic}),o.jsx("td",{className:"py-1.5 pr-3 text-right whitespace-nowrap text-gray-900 dark:text-gray-100",children:se.status==="pending"?r(se.price):t(`skip.${se.skip_reason}`)}),o.jsx("td",{className:"py-1.5 w-8 text-right",children:se.external_id&&(pe?o.jsx("button",{onClick:()=>{Y(Me=>Me.filter(We=>We!==se.external_id)),setTimeout(()=>Qs.mutate(),0)}
1011,title:t("est.restoreRow"),className:"text-gray-400 hover:text-purple-600",children:o.jsx(GI,{className:"w-3.5 h-3.5"})}):se.status==="pending"&&o.jsx("button",{onClick:()=>{Y(Me=>[...Me,se.external_id]),setTimeout(()=>Qs.mutate(),0)},title:t("est.removeRow"),className:"text-gray-400 hover:text-red-500",children:o.jsx(yt,{className:"w-3.5 h-3.5"})}))})]},te)})})})}),n!=="upload"&&n!=="feed"&&o.jsxs("label",{className:"flex items-start gap-2 text-sm text-gray-700 dark:text-gray-300 mb-3",children:[o.jsx("input",{type:"checkbox",checked:J,onChange:se=>de(se.target.checked),className:"rounded mt-0.5"}),o.jsxs("span",{children:[t(n==="baselinker"?"writeBack":"writeBackShoper"),o.jsx("span",{className:"block text-xs text-gray-500",children:t(n==="baselinker"?"writeBackHint":"writeBackShoperHint")})]})]}),n!=="upload"&&n!=="feed"&&J&&o.jsxs("div",{className:"flex flex-wrap items-center gap-2 mb-3",children:[o.jsxs("label",{className:"flex items-center gap-1.5 text-sm text-gray-700 dark:text-gray-300",children:[t("writeBackFormat"),o.jsx(Pa,{text:t("writeBackFormatHint")})]}),o.jsxs("select",{className:br+" w-auto",value:G,onChange:se=>B(se.target.value),children:[o.jsx("option",{value:"html",children:t("formatHtml")}),o.jsx("option",{value:"text",children:t("formatText")})]})]}),H.length>0&&o.jsx("p",{className:"text-xs text-gray-500 mb-2",children:t("est.excludedNote",{n:H.length})}),o.jsxs("button",{onClick:()=>nl.mutate(),disabled:nl.isPending||v.to_generate===0,className:"btn btn-primary inline-flex items-center gap-2 disabled:opacity-50",children:[nl.isPending?o.jsx(dt,{className:"w-4 h-4 animate-spin"}):null,t("create")]}),o.jsx("p",{className:"text-xs text-gray-500 mt-2",children:t("chargeNote")})]})]}):o.jsxs("div",{className:"grid sm:grid-cols-2 gap-4 mb-10",children:[o.jsxs("button",{onClick:()=>s("upload"),className:"card dark:bg-gray-800 dark:border-gray-700 text-left hover:border-purple-400 transition-colors",children:[o.jsx("span",{className:"w-11 h-11 rounded-xl bg-gradient-to-br from-purple-600 to-indigo-600 flex items-center justify-center mb-3",children:o.jsx(Ap,{className:"w-5 h-5 text-white"})}),o.jsx("p",{className:"font-semibold text-gray-900 dark:text-white mb-1",children:t("sources.upload")}),o.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-300",children:t("sourceHints.upload")})]}),o.jsxs(ze,{to:"/connections",className:"card dark:bg-gray-800 dark:border-gray-700 text-left hover:border-purple-400 transition-colors",children:[o.jsx("span",{className:"w-11 h-11 rounded-xl bg-gradient-to-br from-purple-600 to-indigo-600 flex items-center justify-center mb-3",children:o.jsx(hc,{className:"w-5 h-5 text-white"})}),o.jsx("p",{className:"font-semibold text-gray-900 dark:text-white mb-1",children:t("connectShop")}),o.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-300",children:t("connectShopHint")})]})]}),o.jsx("h2",{className:"text-xl font-bold text-gray-900 dark:text-white mb-4",children:t("jobs")}),Te.length===0?o.jsxs("div",{className:"card dark:bg-gray-800 dark:border-gray-700 text-center py-10",children:[o.jsx(rd,{pose:"sleep",size:"lg",className:"mx-auto mb-4"}),o.jsx("p",{className:"text-gray-600 dark:text-gray-300",children:t("empty")})]}):o.jsx("div",{className:"space-y-3",children:Te.map(se=>{const te=se.done_items+se.failed_items,pe=Math.max(0,se.total_items-(se.skipped_items??0)),Me=pe?Math.round(te/pe*100):0;return o.jsxs("div",{className:"card dark:bg-gray-800 dark:border-gray-700",children:[o.jsxs("div",{className:"flex items-start justify-between gap-3 flex-wrap mb-3",children:[o.jsxs("div",{className:"min-w-0",children:[o.jsx("p",{className:"font-semibold text-gray-900 dark:text-white break-words",children:se.name}),o.jsxs("p",{className:"text-xs text-gray-500 mt-0.5",children:[t(`sources.${se.source_type}`)," · ",t(`status.${se.status}`),se.interval_hours?` · ${t("everyHours",{n:se.interval_hours})}`:"",se.charged_price?` · ${t("charged",{amount:r(se.charged_price)})}`:""]})]}),o.jsxs("div",{className:"flex items-center gap-1.5 flex-shrink-0",children:[se.status!=="done"&&o.jsxs(o.Fragment,{children:[o.jsx("select",{value:$,onChange:We=>D(Number(We.target.value)),"aria-label":t("runHowMany"),className:"px-2 py-2 rounded-lg border border-gray-300 dark:border-gray-600 bg-white dark:bg-gray-900 text-gray-900 dark:text-white text-xs",children:[10,25,50,100,200].map(We=>o.jsx("option",{value:We,children:t("runNext",{n:We})},We))}),(se.deferred_items??0)>0&&o.jsxs("button",{onClick:()=>sl.mutate(se.id),disabled:sl.isPending,title:t("extendHint",{n:se.deferred_items}),className:"btn btn-secondary text-xs px-3 py-2 inline-flex items-center gap-1.5 disabled:opacity-50",children:[o.jsx(Qr,{className:"w-3.5 h-3.5"}),t("extend")]}),o.jsxs("button",{onClick:()=>ts.mutate(se.id),disabled:ts.isPending,className:"btn btn-primary text-xs px-3 py-2 inline-flex items-center gap-1.5",children:[o.jsx(H0,{className:"w-3.5 h-3.5"}),se.status==="paused"?t("resume"):t("run")]})]}),se.status==="running"&&o.jsx("button",{onClick:()=>Na.mutate(se.id),className:"p-2 rounded-lg text-gray-500 hover:bg-gray-100 dark:hover:bg-gray-700",title:t("pause"),children:o.jsx(KI,{className:"w-4 h-4"})}),se.source_type!=="upload"&&o.jsx("button",{onClick:()=>vx.mutate(se.id),className:"p-2 rounded-lg text-gray-500 hover:bg-gray-100 dark:hover:bg-gray-700",title:t("refresh"),children:o.jsx(Lo,{className:"w-4 h-4"})}),o.jsx("button",{onClick:()=>If(se.id,se.name,"csv"),className:"p-2 rounded-lg text-gray-500 hover:bg-gray-100 dark:hover:bg-gray-700 text-xs font-semibold",title:t("downloadCsv"),children:"CSV"}),o.jsx("button",{onClick:()=>If(se.id,se.name,"json"),className:"p-2 rounded-lg text-gray-500 hover:bg-gray-100 dark:hover:bg-gray-700 text-xs font-semibold",title:t("downloadJson"),children:"JSON"}),o.jsx("button",{onClick:()=>Sx.mutate(se.id),className:"p-2 rounded-lg text-red-600 hover:bg-red-50 dark:hover:bg-red-900/20",title:t("delete"),children:o.jsx(Cr,{className:"w-4 h-4"})})]})]}),o.jsx("div",{className:"h-2 rounded-full bg-gray-100 dark:bg-gray-700 overflow-hidden",children:o.jsx("div",{className:"h-full bg-gradient-to-r from-purple-600 to-indigo-600 transition-all",style:{width:`${Me}%`}})}),o.jsxs("p",{className:"text-xs text-gray-500 mt-1.5",children:[t("progress",{done:se.done_items,total:pe}),se.failed_items>0&&` · ${t("progressFailed",{failed:se.failed_items})}`,(se.skipped_items??0)-(se.deferred_items??0)>0&&` · ${t("progressSkipped",{skipped:(se.skipped_items??0)-(se.deferred_items??0)})}`,(se.deferred_items??0)>0&&` · ${t("progressDeferred",{deferred:se.deferred_items})}`]}),Object.entries(se.skipped_reasons??{}).filter(([We])=>We!=="deferred").length>0&&o.jsx("p",{className:"text-xs text-gray-500 mt-0.5",children:Object.entries(se.skipped_reasons??{}).filter(([We])=>We!=="deferred").map(([We,lt])=>`${lt} × ${t(`skipWhy.${We}`)}`).join(" · ")}),o.jsxs("button",{onClick:()=>E(F===se.id?null:se.id),className:"mt-3 inline-flex items-center gap-1 text-xs font-medium text-purple-600 dar
1011k:text-purple-400 hover:underline",children:[F===se.id?o.jsx(Ti,{className:"w-3.5 h-3.5"}):o.jsx(Pd,{className:"w-3.5 h-3.5"}),t("items.toggle",{n:se.total_items})]}),F===se.id&&o.jsx(b9,{jobId:se.id,jobStatus:se.status,onChanged:ce})]},se.id)})})]})})]})},Hke=()=>{const{t}=He("auth"),e=Vr(),{user:r,logout:n}=$r(),{theme:s,toggleTheme:i}=cf(),[a,l]=M.useState(""),[c,u]=M.useState(""),[d,h]=M.useState(""),[p,f]=M.useState(""),[m,y]=M.useState(!1),k=Be({mutationFn:async()=>(await xe.post("/auth/change-password",{currentPassword:a,newPassword:c})).data,onSuccess:A=>{le.success(A.message||t("settings.changed")),l(""),u(""),h("")},onError:A=>{var C,_;return le.error(((_=(C=A.response)==null?void 0:C.data)==null?void 0:_.error)||t("settings.failed"))}}),g=Be({mutationFn:async()=>(await xe.post("/auth/delete-account",{confirmEmail:p})).data,onSuccess:A=>{le.success(A.message||t("settings.deleted")),n(),e("/",{replace:!0})},onError:A=>{var C,_;return le.error(((_=(C=A.response)==null?void 0:C.data)==null?void 0:_.error)||t("settings.deleteFailed"))}}),x=d.length>0&&c!==d,w=a.length>0&&c.length>=8&&c===d,b=p.trim().toLowerCase()===((r==null?void 0:r.email)||"").toLowerCase(),v="w-full px-3 py-2 rounded-lg border border-gray-300 dark:border-gray-600 bg-white dark:bg-gray-900 text-gray-900 dark:text-white text-sm";return o.jsxs("div",{className:"min-h-screen bg-gray-50 dark:bg-gray-900 flex",children:[o.jsx(ws,{}),o.jsx("div",{className:"flex-1 min-w-0 p-4 sm:p-6 lg:p-8",children:o.jsxs("div",{className:"max-w-xl space-y-6",children:[o.jsxs("div",{children:[o.jsx(xa,{}),o.jsx("h1",{className:"text-3xl font-bold text-gray-900 dark:text-white mb-1",children:t("settings.title")}),o.jsx("p",{className:"text-gray-600 dark:text-gray-300",children:r==null?void 0:r.email})]}),o.jsxs("div",{className:"card dark:bg-gray-800 dark:border-gray-700",children:[o.jsx("h2",{className:"font-semibold text-gray-900 dark:text-white mb-1",children:t("settings.appearance")}),o.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-300 mb-4",children:t("settings.appearanceHint")}),o.jsx("button",{onClick:i,className:"btn btn-secondary text-sm inline-flex items-center gap-2",children:s==="light"?o.jsxs(o.Fragment,{children:[o.jsx(Yu,{className:"w-4 h-4"}),t("settings.toDark")]}):o.jsxs(o.Fragment,{children:[o.jsx(Xu,{className:"w-4 h-4"}),t("settings.toLight")]})})]}),o.jsxs("div",{className:"card dark:bg-gray-800 dark:border-gray-700",children:[o.jsxs("h2",{className:"flex items-center gap-2 font-semibold text-gray-900 dark:text-white mb-1",children:[o.jsx(Zu,{className:"w-4 h-4 text-purple-600 dark:text-purple-400"}),t("settings.password")]}),o.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-300 mb-5",children:t("settings.passwordHint")}),o.jsxs("form",{className:"space-y-4",onSubmit:A=>{A.preventDefault(),w&&k.mutate()},children:[o.jsxs("div",{children:[o.jsx("label",{className:"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1",children:t("settings.current")}),o.jsx("input",{type:"password",autoComplete:"current-password",className:v,value:a,onChange:A=>l(A.target.value)})]}),o.jsxs("div",{children:[o.jsx("label",{className:"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1",children:t("settings.new")}),o.jsx("input",{type:"password",autoComplete:"new-password",className:v,value:c,onChange:A=>u(A.target.value)}),o.jsx("p",{className:"text-xs text-gray-500 mt-1",children:t("settings.rules")})]}),o.jsxs("div",{children:[o.jsx("label",{className:"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1",children:t("settings.repeat")}),o.jsx("input",{type:"password",autoComplete:"new-password",className:v,value:d,onChange:A=>h(A.target.value)}),x&&o.jsx("p",{className:"text-xs text-red-600 dark:text-red-400 mt-1",children:t("settings.mismatch")})]}),o.jsxs("button",{type:"submit",disabled:!w||k.isPending,className:"btn btn-primary text-sm inline-flex items-center gap-2 disabled:opacity-50",children:[k.isPending&&o.jsx(dt,{className:"w-4 h-4 animate-spin"}),t("settings.submit")]})]})]}),o.jsxs("div",{className:"card border-red-200 dark:border-red-900/50 dark:bg-gray-800",children:[o.jsxs("h2",{className:"flex items-center gap-2 font-semibold text-red-700 dark:text-red-400 mb-1",children:[o.jsx(Cr,{className:"w-4 h-4"}),t("settings.deleteTitle")]}),o.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-300 mb-3",children:t("settings.deleteWhat")}),o.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-300 mb-4",children:t("settings.deleteKept")}),m?o.jsxs("div",{className:"space-y-3",children:[o.jsxs("p",{className:"flex items-start gap-2 text-sm text-amber-700 dark:text-amber-400",children:[o.jsx(Np,{className:"w-4 h-4 flex-shrink-0 mt-0.5"}),t("settings.deleteWarning",{email:r==null?void 0:r.email})]}),o.jsx("input",{className:v,placeholder:r==null?void 0:r.email,autoComplete:"off",value:p,onChange:A=>f(A.target.value)}),o.jsxs("div",{className:"flex flex-wrap gap-2",children:[o.jsxs("button",{onClick:()=>g.mutate(),disabled:!b||g.isPending,className:"btn text-sm bg-red-600 hover:bg-red-700 text-white inline-flex items-center gap-2 disabled:opacity-50",children:[g.isPending&&o.jsx(dt,{className:"w-4 h-4 animate-spin"}),t("settings.deleteConfirm")]}),o.jsx("button",{onClick:()=>{y(!1),f("")},className:"btn btn-secondary text-sm",children:t("settings.cancel")})]})]}):o.jsx("button",{onClick:()=>y(!0),className:"btn text-sm bg-red-600 hover:bg-red-700 text-white",children:t("settings.deleteStart")})]})]})})]})},qke=["curl","node","python","php"];function xz(t,e){return t.split(`
1012`).join(`
1013`+e)}function Kke(t,e,r,n){const s=`https://www.smart-copy.ai/api/v1${r}`,i=JSON.stringify(n),a=JSON.stringify(n,null,2);if(e==="GET")switch(t){case"curl":return[`curl "${s}" \\`,'  -H "Authorization: Bearer YOUR_API_KEY"'].join(`
1014`);case"node":return[`const res = await fetch("${s}", {`,'  headers: { Authorization: "Bearer YOUR_API_KEY" },',"});","const data = await res.json();","console.log(data);"].join(`
1015`);case"python":return["import requests","","res = requests.get(",`    "${s}",`,'    headers={"Authorization": "Bearer YOUR_API_KEY"},',")","print(res.json())"].join(`
1016`);case"php":return["<?php",`$ch = curl_init("${s}");`,"curl_setopt_array($ch, [","    CURLOPT_RETURNTRANSFER => true,",'    CURLOPT_HTTPHEADER => ["Authorization: Bearer YOUR_API_KEY"],',"]);","$data = json_decode(curl_exec($ch), true);","curl_close($ch);","print_r($data);"].join(`
1017`)}switch(t){case"curl":return[`curl -X POST "${s}" \\`,'  -H "Authorization: Bearer YOUR_API_KEY" \\','  -H "Content-Type: application/json" \\',`  -d '${i}'`].join(`
1018`);case"node":return[`const res = await fetch("${s}", {`,'  method: "POST",',"  headers: {",'    Authorization: "Bearer YOUR_API_KEY",','    "Content-Type": "application/json",',"  },",`  body: JSON.stringify(${xz(a,"  ")}),`,"});","const data = await res.json();","console.log(data);"].join(`
1019`);case"python":{const l=a.replace(/\btrue\b/g,"True").replace(/\bfalse\b/g,"False").replace(/\bnull\b/g,"None");return["import requests","","res = requests.post(",`    "${s}",`,'    headers={"Authorization": "Bearer YOUR_API_KEY"},',`    json=${xz(l,"    ")},`,")","print(res.json())"].join(`
1020`)}case"php":return["<?php",`$ch = curl_init("${s}");`,"curl_setopt_array($ch, [","    CURLOPT_RETURNTRANSFER => true,","    CURLOPT_POST => true,","    CURLOPT_HTTPHEADER => [",'        "Authorization: Bearer YOUR_API_KEY",','        "Content-Type: application/json",',"    ],",`    CURLOPT_POSTFIELDS => '${i.replace(/'/g,"\\'")}',`,"]);","$data = json_decode(curl_exec($ch), true);","curl_close($ch);","print_r($data);"].join(`
1021`)}}const wz=({method:t,path:e,body:r})=>{const{t:n}=He("developers"),[s,i]=M.useState("curl"),[a,l]=M.useState(!1),c=Kke(s,t,e,r);return o.jsxs("div",{className:"mt-3",children:[o.jsx("p",{className:"text-xs font-medium text-gray-700 dark:text-gray-300 mb-0.5",children:n("playground.snippetsTitle")}),o.jsx("p",{className:"text-[11px] text-gray-500 dark:text-gray-400 mb-2",children:n("playground.snippetsHint")}),o.jsxs("div",{className:"flex items-center gap-1 mb-0",children:[qke.map(u=>o.jsx("button",{type:"button",onClick:()=>i(u),className:`px-3 py-1.5 text-[11px] font-mono rounded-t-lg border border-b-0 transition-colors ${s===u?"bg-gray-900 text-emerald-300 border-gray-700":"bg-gray-100 dark:bg-gray-700 text-gray-600 dark:text-gray-300 border-gray-200 dark:border-gray-600 hover:bg-gray-200 dark:hover:bg-gray-600"}`,children:u==="curl"?"cURL":u==="node"?"Node.js":u==="python"?"Python":"PHP"},u)),o.jsx("button",{type:"button",onClick:()=>{navigator.clipboard.writeText(c),l(!0),le.success(n("keys.copied")),setTimeout(()=>l(!1),2e3)},className:"ml-auto p-1.5 rounded-md text-gray-400 hover:text-purple-600 dar
1021k:hover:text-purple-400 transition-colors",children:a?o.jsx(On,{className:"w-4 h-4"}):o.jsx(Qj,{className:"w-4 h-4"})})]}),o.jsx("pre",{className:"p-3 rounded-b-lg rounded-tr-lg bg-gray-900 text-emerald-300 text-[11px] font-mono overflow-x-auto max-h-72 overflow-y-auto whitespace-pre",children:c})]})},Gke=()=>{const{t,i18n:e}=He("developers"),[r,n]=M.useState(1),{data:s}=mt({queryKey:["dev-requests",r],queryFn:async()=>(await xe.get(`/developers/requests?page=${r}&limit=25`)).data,refetchInterval:3e4}),i=a=>a<300?"bg-emerald-100 dark:bg-emerald-900/40 text-emerald-700 dark:text-emerald-300":a<500?"bg-amber-100 dark:bg-amber-900/40 text-amber-700 dark:text-amber-300":"bg-red-100 dark:bg-red-900/40 text-red-700 dark:text-red-300";return o.jsxs("section",{className:"mb-10",children:[o.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[o.jsx(EV,{className:"w-5 h-5 text-purple-600 dark:text-purple-400"}),o.jsx("h2",{className:"text-lg font-semibold text-gray-900 dark:text-white",children:t("history.title")})]}),o.jsx("p",{className:"text-xs text-gray-500 dark:text-gray-400 mb-4",children:t("history.hint")}),!s||s.data.length===0?o.jsx("p",{className:"text-sm text-gray-400 dark:text-gray-500 py-4 text-center border border-dashed border-gray-300 dark:border-gray-700 rounded-xl",children:t("history.empty")}):o.jsxs(o.Fragment,{children:[o.jsx("div",{className:"overflow-x-auto rounded-xl border border-gray-200 dark:border-gray-700",children:o.jsxs("table",{className:"w-full text-sm",children:[o.jsx("thead",{children:o.jsxs("tr",{className:"bg-gray-50 dark:bg-gray-800 text-left text-[11px] uppercase tracking-wide text-gray-500 dark:text-gray-400",children:[o.jsx("th",{className:"px-3 py-2 font-medium",children:t("history.when")}),o.jsx("th",{className:"px-3 py-2 font-medium",children:t("history.request")}),o.jsx("th",{className:"px-3 py-2 font-medium",children:t("history.status")}),o.jsx("th",{className:"px-3 py-2 font-medium text-right",children:t("history.cost")}),o.jsx("th",{className:"px-3 py-2 font-medium text-right",children:t("history.duration")})]})}),o.jsx("tbody",{className:"divide-y divide-gray-100 dark:divide-gray-700 bg-white dark:bg-gray-800/60",children:s.data.map(a=>o.jsxs("tr",{className:"text-gray-700 dark:text-gray-200",children:[o.jsx("td",{className:"px-3 py-2 whitespace-nowrap text-xs text-gray-500 dark:text-gray-400",children:new Date(a.createdAt).toLocaleString(e.language,{month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"})}),o.jsxs("td",{className:"px-3 py-2 font-mono text-xs",children:[o.jsx("span",{className:"font-semibold",children:a.method})," ",a.path,a.isTest&&o.jsx("span",{className:"ml-1.5 text-[9px] font-bold px-1 py-0.5 rounded bg-amber-100 dark:bg-amber-900/40 text-amber-700 dark:text-amber-300 align-middle",children:"TEST"})]}),o.jsx("td",{className:"px-3 py-2",children:o.jsx("span",{className:`inline-block px-1.5 py-0.5 rounded text-[11px] font-semibold ${i(a.status)}`,children:a.status})}),o.jsx("td",{className:"px-3 py-2 text-right text-xs whitespace-nowrap",children:a.cost!=null?`${a.cost.toFixed(2)} zł`:"—"}),o.jsx("td",{className:"px-3 py-2 text-right text-xs text-gray-500 dark:text-gray-400 whitespace-nowrap",children:a.durationMs!=null?`${a.durationMs} ms`:"—"})]},a.id))})]})}),o.jsxs("div",{className:"flex items-center justify-between mt-3",children:[o.jsxs("button",{onClick:()=>n(a=>Math.max(1,a-1)),disabled:r<=1,className:"btn btn-secondary text-xs inline-flex items-center gap-1 disabled:opacity-40",children:[o.jsx(Xj,{className:"w-3.5 h-3.5"}),t("history.prev")]}),o.jsx("span",{className:"text-xs text-gray-500 dark:text-gray-400",children:t("history.pageOf",{page:s.page,pages:s.pages})}),o.jsxs("button",{onClick:()=>n(a=>Math.min(s.pages,a+1)),disabled:r>=s.pages,className:"btn btn-secondary text-xs inline-flex items-center gap-1 disabled:opacity-40",children:[t("history.next"),o.jsx(Pd,{className:"w-3.5 h-3.5"})]})]})]})]})},Zke=["ARTICLE","BLOG_POST","COMPANY_TEXT","PRODUCT_DESCRIPTION","REPORT","ANALYSIS","SOCIAL_MEDIA","EMAIL_MARKETING","OTHER"],Yke={topic:"",length:8e3,text_type:"ARTICLE",language:"pl",generate_image:!0,outline_approval:!1,source_mode:"auto",source_urls:"",keywords:"",links:"",guidelines:"",wp_site_id:"",wp_status:"publish",wp_sc
1021heduled_at:""};function bz(t){const e={topic:t.topic.trim(),length:t.length,text_type:t.text_type,language:t.language,generate_image:t.generate_image};t.outline_approval&&(e.outline_approval=!0),t.source_mode!=="auto"&&(e.source_mode=t.source_mode);const r=t.source_urls.split(`
1022`).map(i=>i.trim()).filter(Boolean).slice(0,10);r.length&&(e.source_urls=r);const n=t.keywords.split(",").map(i=>i.trim()).filter(Boolean).slice(0,10);n.length&&(e.keywords=n);const s=t.links.split(`
1023`).map(i=>{const[a,l]=i.split("|").map(c=>c.trim());return a?{url:a,...l?{anchor:l}:{}}:null}).filter(Boolean).slice(0,5);return s.length&&(e.links=s),t.guidelines.trim()&&(e.guidelines=t.guidelines.trim()),t.wp_site_id&&(e.wp_site_id=t.wp_site_id,e.wp_status=t.wp_status,t.wp_status==="future"&&t.wp_scheduled_at&&(e.wp_scheduled_at=new Date(t.wp_scheduled_at).toISOString())),e}const ni="input w-full text-sm bg-white dark:bg-gray-900 text-gray-900 dark:text-white",mh="block text-[11px] font-medium text-gray-600 dark:text-gray-300 mb-1",Jke=()=>{var Y,$;const{t,i18n:e}=He("developers"),{data:r}=mt({queryKey:["dev-keys"],queryFn:async()=>(await xe.get("/developers/keys")).data}),[n,s]=M.useState(""),i=n||((Y=r==null?void 0:r[0])==null?void 0:Y.id)||"",a=r==null?void 0:r.find(D=>D.id===i),[l,c]=M.useState({...Yke,language:($=e.language)!=null&&$.startsWith("pl")?"pl":"en"}),[u,d]=M.useState([]),[h,p]=M.useState([]),[f,m]=M.useState(!1),[y,k]=M.useState(null),[g,x]=M.useState(null),[w,b]=M.useState(!1),[v,A]=M.useState([]),[C,_]=M.useState("/balance"),N=D=>c(J=>({...J,...D})),W=async(D,J,de)=>{m(!0),k(`${D} /api/v1${J}`);try{const G=await xe.post("/developers/console-call",{keyId:i,method:D,path:J,body:de}),{status:B,data:re}=G.data;return x("HTTP "+B+`
1024`+JSON.stringify(re,null,2)),{status:B,data:re}}catch(G){return x(`Błąd połączenia: ${G.message}`),null}finally{m(!1)}},K=!!i,T=!!(a!=null&&a.prefix.startsWith("sc_test_")),F=D=>Gp(D),E=Math.round(u.reduce((D,J)=>D+F(J.length),0)*100)/100,H=u.length===0?null:u.length===1?bz(u[0]):{texts:u.map(bz)};return o.jsxs("section",{className:"mb-10",children:[o.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[o.jsx(FV,{className:"w-5 h-5 text-purple-600 dark:text-purple-400"}),o.jsx("h2",{className:"text-lg font-semibold text-gray-900 dark:text-white",children:t("playground.title")})]}),o.jsx("p",{className:"text-xs text-gray-500 dark:text-gray-400 mb-4",children:t("playground.hint")}),o.jsxs("div",{className:"p-4 rounded-xl bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 space-y-4",children:[o.jsxs("div",{className:"flex flex-wrap gap-2",children:[o.jsxs("div",{className:"flex items-center gap-2 flex-1 min-w-[260px]",children:[o.jsxs("span",{className:"text-xs font-medium text-gray-600 dark:text-gray-300 shrink-0",children:[t("playground.keySelectLabel"),":"]}),o.jsx("select",{value:i,onChange:D=>s(D.target.value),className:"input flex-1 text-sm bg-white dark:bg-gray-900 text-gray-900 dark:text-white",children:(r||[]).map(D=>o.jsxs("option",{value:D.id,children:[D.prefix.startsWith("sc_test_")?"[TEST] ":"",D.name," 
1024(",D.prefix,"...)"]},D.id))}),T&&o.jsx("span",{className:"text-[10px] font-bold px-1.5 py-0.5 rounded bg-amber-100 dark:bg-amber-900/40 text-amber-700 dark:text-amber-300",children:t("playground.testBadge")})]}),o.jsx("button",{onClick:()=>{_("/balance"),W("GET","/balance")},disabled:!K||f,className:"btn btn-secondary text-xs disabled:opacity-50",children:t("playground.balanceBtn")}),o.jsx("button",{onClick:async()=>{var J;_("/wp-sites");const D=await W("GET","/wp-sites");(J=D==null?void 0:D.data)!=null&&J.data&&p(D.data.data)},disabled:!K||f,className:"btn btn-secondary text-xs disabled:opacity-50",children:t("playground.wpSitesBtn")})]}),!K&&o.jsx("p",{className:"text-[11px] text-amber-600 dark:text-amber-400",children:t("playground.keySelectNone")}),o.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-3 pt-2 border-t border-gray-100 dark:border-gray-700",children:[o.jsx("div",{className:"md:col-span-2",children:o.jsx("input",{type:"text",value:l.topic,onChange:D=>N({topic:D.target.value}),placeholder:t("playground.topicPlaceholder"),maxLength:300,className:ni})}),o.jsxs("div",{children:[o.jsx("label",{className:mh,children:t("playground.typeLabel")}),o.jsx("select",{value:l.text_type,onChange:D=>N({text_type:D.target.value}),className:ni,children:Zke.map(D=>o.jsx("option",{value:D,children:t(`playground.types.${D}`)},D))})]}),o.jsxs("div",{className:"flex gap-3",children:[o.jsxs("div",{className:"flex-1",children:[o.jsx("label",{className:mh,children:t("playground.lengthLabel")}),o.jsx("input",{type:"number",min:500,max:3e4,step:500,value:l.length,onChange:D=>N({length:Math.max(500,Math.min(3e4,Number(D.target.value)||500))}),className:ni}),o.jsxs("p",{className:"text-[10px] text-gray-400 mt-0.5",children:["~",Math.ceil(l.length/2e3)," str. · ",F(l.length).toFixed(2)," zł"]})]}),o.jsxs("div",{children:[o.jsx("label",{className:mh,children:t("playground.langLabel")}),o.jsxs("select",{value:l.language,onChange:D=>N({language:D.target.value}),className:ni,children:[o.jsx("option",{value:"pl",children:"PL"}),o.jsx("option",{value:"en",children:"EN"})]})]})]}),o.jsxs("div",{children:[o.jsx("label",{className:mh,children:t("playground.sourceModeLabel")}),o.jsx("select",{value:l.source_mode,onChange:D=>N({source_mode:D.target.value}),className:ni,children:["auto","web","academic","hybrid"].map(D=>o.jsx("option",{value:D,children:t(`playground.sourceModes.${D}`)},D))})]}),o.jsxs("div",{className:"flex flex-col justify-end gap-1.5",children:[o.jsxs("label",{className:"flex items-center gap-1.5 text-xs text-gray-700 dark:text-gray-300",children:[o.jsx("input",{type:"checkbox",checked:l.generate_image,onChange:D=>N({generate_image:D.target.checked})}),t("playground.imageLabel")]}),o.jsxs("label",{className:"flex items-center gap-1.5 text-xs text-gray-700 dark:text-gray-300",children:[o.jsx("input",{type:"checkbox",checked:l.outline_approval,onChange:D=>N({outline_approval:D.target.checked})}),t("playground.outlineLabel")]})]}),o.jsx("div",{children:o.jsx("input",{type:"text",value:l.keywords,onChange:D=>N({keywords:D.target.value}),placeholder:t("playground.keywordsPlaceholder"),className:ni})}),o.jsx("div",{children:o.jsx("textarea",{value:l.links,onChange:D=>N({links:D.target.value}),placeholder:t("playground.linksPlaceholder"),rows:1,className:ni})}),o.jsx("div",{children:o.jsx("textarea",{value:l.source_urls,onChange:D=>N({source_urls:D.target.value}),placeholder:t("playground.sourceUrlsPlaceholder"),rows:1,className:ni})}),o.jsx("div",{children:o.jsx("textarea",{value:l.guidelines,onChange:D=>N({guidelines:D.target.value}),placeholder:t("playground.guidelinesPlaceholder"),rows:1,className:ni})}),o.jsxs("div",{className:"md:col-span-2 flex flex-wrap items-end gap-3",children:[o.jsxs("div",{children:[o.jsx("label",{className:mh,children:t("playground.wpLabel")}),o.jsxs("select",{value:l.wp_site_id,onChange:D=>N({wp_site_id:D.target.value}),className:ni,children:[o.jsx("option",{value:"",children:t("playground.wpNone")}),h.map(D=>o.jsx("option",{value:D.id,children:D.name},D.id))]}),h.length===0&&o.jsxs("p",{className:"text-[10px] text-gray-400 mt-0.5",children:["← ",t("playground.wpSitesBtn")]})]}),l.wp_site_id&&o.jsxs(o.Fragment,{children:[o.jsx("div",{className:"flex items-center gap-3 pb-2",children:["draft","publish","future"].map(D=>o.jsxs("label",{className:"flex items-center gap-1 text-xs text-gray-700 dark:text-gray-300",children:[o.jsx("input",{type:"radio",checked:l.wp_status===D,onChange:()=>N({wp_status:D})}),t(D==="draft"?"playground.wpDraft":D==="publish"?"playground.wpPublish":"playground.wpFuture")]},D))}),l.wp_status==="future"&&o.jsx("input",{type:"datetime-local",value:l.wp_scheduled_at,onChange:D=>N({wp_scheduled_at:D.target.value}),className:"input text-sm bg-white dark:bg-gray-900 text-gray-900 dark:text-white"})]})]}),o.jsx("div",{className:"md:col-span-2",children:o.jsxs("button",{onClick:()=>{d(D=>[...D,{...l}]),N({topic:""})},disabled:l.topic.trim().length<3||u.length>=10,className:"btn btn-secondary text-xs disabled:opacity-50 inline-flex items-center gap-1.5",children:[o.jsx(Qr,{className:"w-3.5 h-3.5"}),t("playground.addText")]})})]}),o.jsxs("div",{className:"pt-2 border-t border-gray-100 dark:border-gray-700",children:[o.jsxs("p",{className:"text-xs font-medium text-gray-700 dark:text-gray-300 mb-2",children:[t("playground.basketTitle",{n:u.length}),u.length>
10240&&o.jsxs("span",{className:"ml-2 text-purple-600 dark:text-purple-400 font-semibold",children:[t("playground.total"),": ",E.toFixed(2)," zł"]})]}),u.length===0?o.jsx("p",{className:"text-[11px] text-gray-400 dark:text-gray-500",children:t("playground.basketEmpty")}):o.jsx("ul",{className:"space-y-1 mb-3",children:u.map((D,J)=>o.jsxs("li",{className:"flex items-center gap-2 text-xs text-gray-700 dark:text-gray-300 bg-gray-50 dark:bg-gray-700/40 rounded-lg px-3 py-1.5",children:[o.jsxs("span",{className:"flex-1 truncate",children:[D.topic," · ",D.length.toLocaleString()," zn. ·"," ",t(`playground.types.${D.text_type}`)," ·"," ",F(D.length).toFixed(2)," zł"]}),o.jsx("button",{onClick:()=>d(de=>de.filter((G,B)=>B!==J)),className:"text-red-500 hover:underline",children:t("playground.remove")})]},J))}),H&&o.jsxs(o.Fragment,{children:[o.jsxs("p",{className:"text-[11px] text-gray-500 dark:text-gray-400 mb-1",children:[t("playground.requestPreview")," —"," ",o.jsx("code",{className:"font-mono",children:"POST /api/v1/texts"})]}),o.jsx("pre",{className:"p-3 rounded-lg bg-gray-900 text-sky-300 text-[11px] font-mono overflow-x-auto max-h-48 overflow-y-auto whitespace-pre-wrap mb-2",children:JSON.stringify(H,null,2)}),o.jsx(wz,{method:"POST",path:"/texts",body:H}),o.jsxs("button",{onClick:()=>b(!0),disabled:!K||f,className:"btn btn-primary text-xs disabled:opacity-50",children:[t("playground.sendBtn")," — ",E.toFixed(2)," zł"]})]}),!H&&o.jsx(wz,{method:"GET",path:C})]}),v.length>0&&o.jsx("div",{className:"flex flex-wrap gap-2",children:v.map(D=>o.jsx("button",{onClick:()=>W("GET",`/texts/${D}`),disabled:!K||f,className:"btn btn-secondary text-xs disabled:opacity-50 font-mono",children:t("playground.checkStatusBtn").replace("{id}",D.substring(0,8))},D))}),(y||g)&&o.jsxs("div",{children:[y&&o.jsxs("p",{className:"text-[11px] text-gray-500 dark:text-gray-400 mb-1",children:[t("playground.requestLabel"),":"," ",o.jsx("code",{className:"font-mono",children:y})]}),o.jsx("pre",{className:"p-3 rounded-lg bg-gray-900 text-emerald-300 text-[11px] font-mono overflow-x-auto max-h-72 overflow-y-auto whitespace-pre-wrap",children:f?"...":g})]})]}),o.jsx(jt,{children:w&&H&&o.jsx(ue.div,{initial:{opacity:0}
1024,animate:{opacity:1},exit:{opacity:0},className:"fixed inset-0 z-[100] flex items-center justify-center p-4 bg-black/50 backdrop-blur-sm",onClick:()=>b(!1),children:o.jsxs(ue.div,{initial:{opacity:0,scale:.95,y:12},animate:{opacity:1,scale:1,y:0},exit:{opacity:0,scale:.95,y:12},className:"w-full max-w-md rounded-2xl bg-white dark:bg-gray-800 shadow-2xl border border-gray-200 dark:border-gray-700 p-5",onClick:D=>D.stopPropagation(),children:[o.jsx("h3",{className:"text-sm font-semibold text-gray-900 dark:text-white mb-1",children:t("playground.orderConfirmTitle")}),o.jsx("p",{className:"text-xs text-gray-500 dark:text-gray-400",children:t("playground.orderConfirmBody",{price:`${E.toFixed(2)} zł`,n:u.length})}),o.jsxs("div",{className:"flex justify-end gap-2 mt-5",children:[o.jsx("button",{onClick:()=>b(!1),className:"btn btn-secondary text-xs",children:"Anuluj"}),o.jsx("button",{onClick:async()=>{var J,de,G;b(!1);const D=await W("POST","/texts",H);if(D&&D.status===201){const B=(J=D.data)!=null&&J.texts?D.data.texts.map(re=>re.id):[(de=D.data)==null?void 0:de.id].filter(Boolean);A(B),d([]),le.success((G=D.data)!=null&&G.test?t("playground.statusOrderedTest"):t("playground.statusOrdered"),{duration:8e3})}},className:"btn btn-primary text-xs",children:t("playground.orderConfirmYes")})]})]})})})]})};function $c({value:t,label:e}){const[r,n]=M.useState(!1);return o.jsx("button",{type:"button",onClick:()=>{navigator.clipboard.writeText(t),n(!0),le.success(e),setTimeout(()=>n(!1),2e3)},className:"p-1.5 rounded-md text-gray-400 hover:text-purple-600 dark:hover:text-purple-400 hover:bg-purple-50 dark:hover:bg-purple-900/30 transition-colors shrink-0",children:r?o.jsx(On,{className:"w-4 h-4"}):o.jsx(Qj,{className:"w-4 h-4"})})}const Xke=()=>{var $;const{t,i18n:e}=He("developers"),r=($=e.language)!=null&&$.startsWith("pl")?"https://www.smart-copy.ai/pl/docs/api":"https://www.smart-copy.ai/docs/api",n=Zs(),[s,i]=M.useState(""),[a,l]=M.useState(!1),[c,u]=M.useState(null),[d,h]=M.useState(null),[p,f]=M.useState({}),{data:m}=mt({queryKey:["dev-keys"],queryFn:async()=>(await xe.get("/developers/keys")).data}),{data:y}=mt({queryKey:["dev-clients"],queryFn:async()=>(await xe.get("/developers/oauth-clients")).data}),[k,g]=M.useState(!1),[x,w]=M.useState({name:"",type:"public",redirects:""}),[b,v]=M.useState(null),[A,C]=M.useState(null),[_,N]=M.useState({}),W=Be({mutationFn:async()=>(await xe.post("/developers/oauth-clients",{name:x.name,type:x.type,redirectUris:x.redirects.split(`
1025`).map(D=>D.trim()).filter(Boolean)})).data,onSuccess:D=>{v({id:D.id,clientSecret:D.clientSecret}),g(!1),w({name:"",type:"public",redirects:""}),n.invalidateQueries({queryKey:["dev-clients"]})},onError:D=>{var J,de;return le.error(((de=(J=D.response)==null?void 0:J.data)==null?void 0:de.error)||"Error")}}),K=Be({mutationFn:async({id:D,data:J})=>xe.patch(`/developers/oauth-clients/${D}`,J),onSuccess:()=>{le.success(t("clients.saved")),n.invalidateQueries({queryKey:["dev-clients"]})},onError:D=>{var J,de;return le.error(((de=(J=D.response)==null?void 0:J.data)==null?void 0:de.error)||"Error")}}),T=Be({mutationFn:async D=>xe.delete(`/developers/oauth-clients/${D}`),onSuccess:()=>{le.success(t("clients.deleted")),C(null),n.invalidateQueries({queryKey:["dev-clients"]})}}),F=Be({mutationFn:async()=>(await xe.post("/developers/keys",{name:s.trim()||void 0,test:a})).data,onSuccess:D=>{u({token:D.token,name:D.name}),i(""),n.invalidateQueries({queryKey:["dev-keys"]})},onError:D=>{var J,de;return le.error(((de=(J=D.response)==null?void 0:J.data)==null?void 0:de.error)||"Error")}}),E=Be({mutationFn:async D=>xe.delete(`/developers/keys/${D}`),onSuccess:()=>{le.success(t("keys.revoked")),h(null),n.invalidateQueries({queryKey:["dev-keys"]})},onError:D=>{var J,de;return le.error(((de=(J=D.response)==null?void 0:J.data)==null?void 0:de.error)||"Error")}}),H=Be({mutationFn:async({id:D,url:J})=>xe.patch(`/developers/keys/${D}`,{webhookUrl:J}),onSuccess:()=>{le.success(t("keys.webhookSaved")),n.invalidateQueries({queryKey:["dev-keys"]})},onError:D=>{var J,de;return le.error(((de=(J=D.response)==null?void 0:J.data)==null?void 0:de.error)||"Error")}}),Y=D=>{const J=Math.round((Date.now()-new Date(D).getTime())/6e4);return J<60?`${Math.max(J,1)} min`:J<60*24?`${Math.round(J/60)} h`:new Date(D).toLocaleDateString(e.language)};return o.jsxs("div",{className:"flex min-h-screen bg-gray-50 dark:bg-gray-900",children:[o.jsx(ws,{}),o.jsxs("main",{className:"flex-1 min-w-0 p-4 md:p-8 max-w-4xl",children:[o.jsx(xa,{}),o.jsx("h1",{className:"text-2xl font-bold text-gray-900 dark:text-white mb-1",children:t("title")}),o.jsx("p",{className:"text-sm text-gray-500 dark:text-gray-400 mb-6",children:t("subtitle")}),o.jsxs("a",{href:r,target:"_blank",rel:"noopener noreferrer",className:"group flex items-center gap-4 p-5 mb-10 rounded-2xl border-2 border-purple-200 dark:border-purple-800 bg-gradient-to-r from-purple-50 to-indigo-50 dark:from-purple-900/20 dark:to-indigo-900/20 hover:border-purple-400 dark:hover:border-purple-600 transition-colors",children:[o.jsx("div",{className:"w-12 h-12 rounded-xl bg-purple-600 flex items-center justify-center shrink-0",children:o.jsx(Yj,{className:"w-6 h-6 text-white"})}),o.jsxs("div",{className:"flex-1 min-w-0",children:[o.jsxs("p",{className:"font-semibold text-gray-900 dark:text-white flex items-center gap-1.5",children:[t("docsBox.title"),o.jsx(Oo,{className:"w-3.5 h-3.5 text-gray-400 group-hover:text-purple-600 dar
1025k:group-hover:text-purple-400 transition-colors"})]}),o.jsx("p",{className:"text-xs text-gray-600 dark:text-gray-300",children:t("docsBox.desc")}),o.jsxs("p",{className:"text-[11px] font-mono text-gray-500 dark:text-gray-400 mt-1",children:[t("docsBox.base")," https://www.smart-copy.ai/api/v1"]})]}),o.jsx("span",{className:"btn btn-primary text-sm shrink-0 hidden sm:inline-flex",children:t("docsBox.cta")})]}),o.jsxs("section",{className:"mb-10",children:[o.jsxs("div",{className:"flex items-center gap-2 mb-4",children:[o.jsx(Zu,{className:"w-5 h-5 text-purple-600 dark:text-purple-400"}),o.jsx("h2",{className:"text-lg font-semibold text-gray-900 dark:text-white",children:t("keys.title")}),o.jsx(jd,{text:t("keys.hint")})]}),o.jsxs("div",{className:"flex gap-2 mb-4",children:[o.jsx("input",{type:"text",value:s,onChange:D=>i(D.target.value),placeholder:t("keys.namePlaceholder"),maxLength:80,className:"input flex-1 bg-white dark:bg-gray-800 text-gray-900 dark:text-white"}),o.jsxs("button",{onClick:()=>F.mutate(),disabled:F.isPending,className:"btn btn-primary text-sm inline-flex items-center gap-1.5 disabled:opacity-50",children:[F.isPending?o.jsx(dt,{className:"w-4 h-4 animate-spin"}):o.jsx(Qr,{className:"w-4 h-4"}),F.isPending?t("keys.creating"):t("keys.create")]})]}),o.jsxs("label",{className:"flex items-start gap-2 mb-4 cursor-pointer",children:[o.jsx("input",{type:"checkbox",checked:a,onChange:D=>l(D.target.checked),className:"mt-0.5"}),o.jsxs("span",{className:"text-xs text-gray-600 dark:text-gray-300",children:[o.jsx("strong",{children:t("keys.testLabel")})," — ",t("keys.testHint")]})]}),((m==null?void 0:m.length)??0)===0&&o.jsx("p",{className:"text-sm text-gray-400 dark:text-gray-500 py-4 text-center border border-dashed border-gray-300 dark:border-gray-700 rounded-xl",children:t("keys.empty")}),o.jsx("div",{className:"space-y-3",children:m==null?void 0:m.map(D=>o.jsxs("div",{className:"p-4 rounded-xl bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700",children:[o.jsxs("div",{className:"flex items-center gap-3",children:[o.jsxs("div",{className:"flex-1 min-w-0",children:[o.jsx("p",{className:"text-sm font-medium text-gray-900 dark:text-white truncate",children:D.name}),o.jsxs("p",{className:"text-xs font-mono text-gray-500 dark:text-gray-400",children:[D.prefix.startsWith("sc_test_")&&o.jsx("span",{className:"mr-1.5 text-[9px] font-bold font-sans px-1 py-0.5 rounded bg-amber-100 dark:bg-amber-900/40 text-amber-700 dark:text-amber-300 align-middle",children:"TEST"}),D.prefix,"…"," ",o.jsxs("span",{className:"font-sans",children:["·"," ",D.lastUsedAt?t("keys.lastUsed",{ago:Y(D.lastUsedAt)}):t("keys.neverUsed")]})]})]}),o.jsxs("button",{onClick:()=>h(D),className:"text-xs px-3 py-1.5 rounded-lg text-red-600 dark:text-red-400 hover:bg-red-50 dark:hover:bg-red-900/30 transition-colors inline-flex items-center gap-1",children:[o.jsx(Cr,{className:"w-3.5 h-3.5"}),t("keys.revoke")]})]}),o.jsxs("div",{className:"mt-3 pt-3 border-t border-gray-100 dark:border-gray-700",children:[o.jsxs("div",{className:"flex items-center gap-1.5 mb-1.5",children:[o.jsx(VV,{className:"w-3.5 h-3.5 text-gray-400"}),o.jsx("span",{className:"text-xs font-medium text-gray-600 dark:text-gray-300",children:t("keys.webhook")}),o.jsx(jd,{text:t("keys.webhookHint")})]}),o.jsxs("div",{className:"flex gap-2",children:[o.jsx("input",{type:"url",value:p[D.id]??D.webhookUrl??"",onChange:J=>f({...p,[D.id]:J.target.value}),placeholder:t("keys.webhookPlaceholder"),className:"input flex-1 text-sm bg-white dark:bg-gray-900 text-gray-900 dark:text-white"}),o.jsx("button",{onClick:()=>H.mutate({id:D.id,url:p[D.id]??D.webhookUrl??""}),disabled:H.isPending,className:"btn btn-secondary text-xs whitespace-nowrap disabled:opacity-50",children:t("keys.webhookSave")})]}),D.webhookSecret&&D.webhookUrl&&o.jsxs("div",{className:"flex items-center gap-2 mt-2",children:[o.jsxs("span",{className:"text-[11px] text-gray-500 dark:text-gray-400",children:[t("keys.webhookSecret"),":"]}),o.jsx("code",{className:"text-[11px] font-mono text-gray-600 dark:text-gray-300 truncate",children:D.webhookSecret}),o.jsx($c,{value:D.webhookSecret,label:t("keys.copied")})]})]})]},D.id))})]}),o.jsx(Jke,{}),o.jsx(Gke,{}),o.jsxs("section",{className:"mb-10",children:[o.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[o.jsx(Ju,{className:"w-5 h-5 text-purple-600 dar
1025k:text-purple-400"}),o.jsx("h2",{className:"text-lg font-semibold text-gray-900 dark:text-white",children:t("clients.title")})]}),o.jsx("p",{className:"text-xs text-gray-500 dark:text-gray-400 mb-4",children:t("clients.hint")}),!k&&o.jsxs("button",{onClick:()=>g(!0),className:"btn btn-secondary text-sm inline-flex items-center gap-1.5 mb-4",children:[o.jsx(Qr,{className:"w-4 h-4"}),t("clients.create")]}),k&&o.jsxs("div",{className:"p-4 rounded-xl bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 mb-4 space-y-3",children:[o.jsx("input",{type:"text",value:x.name,onChange:D=>w({...x,name:D.target.value}),placeholder:t("clients.namePlaceholder"),maxLength:80,className:"input w-full bg-white dark:bg-gray-900 text-gray-900 dark:text-white"}),o.jsx("div",{className:"flex gap-4",children:["public","confidential"].map(D=>o.jsxs("label",{className:"flex items-center gap-1.5 text-sm text-gray-700 dark:text-gray-300",children:[o.jsx("input",{type:"radio",checked:x.type===D,onChange:()=>w({...x,type:D})}),t(D==="public"?"clients.typePublic":"clients.typeConfidential")]},D))}),o.jsx("p",{className:"text-[11px] text-gray-500 dark:text-gray-400",children:t("clients.typeHint")}),o.jsx("textarea",{value:x.redirects,onChange:D=>w({...x,redirects:D.target.value}),placeholder:t("clients.redirectPlaceholder"),rows:2,className:"input w-full font-mono text-xs bg-white dark:bg-gray-900 text-gray-900 dark:text-white"}),o.jsxs("div",{className:"flex gap-2",children:[o.jsx("button",{onClick:()=>W.mutate(),disabled:!x.name.trim()||!x.redirects.trim()||W.isPending,className:"btn btn-primary text-xs disabled:opacity-50",children:W.isPending?o.jsx(dt,{className:"w-3.5 h-3.5 animate-spin"}):t("clients.create")}),o.jsx("button",{onClick:()=>g(!1),className:"btn btn-secondary text-xs",children:"Anuluj"})]})]}),((y==null?void 0:y.length)??0)===0&&!k?o.jsx("p",{className:"text-sm text-gray-400 dark:text-gray-500 py-4 text-center border border-dashed border-gray-300 dark:border-gray-700 rounded-xl",children:t("clients.empty")}):o.jsx("div",{className:"space-y-3",children:y==null?void 0:y.map(D=>{var J,de;return o.jsxs("div",{className:"p-4 rounded-xl bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700",children:[o.jsxs("div",{className:"flex items-center gap-3",children:[o.jsxs("div",{className:"flex-1 min-w-0",children:[o.jsxs("p",{className:"text-sm font-medium text-gray-900 dark:text-white truncate",children:[D.name," ",o.jsx("span",{className:"text-[10px] font-normal px-1.5 py-0.5 rounded bg-gray-100 dark:bg-gray-700 text-gray-500 dark:text-gray-300 align-middle",children:D.type==="public"?"PKCE":"confidential"})]}),o.jsxs("div",{className:"flex items-center gap-1 mt-0.5",children:[o.jsxs("span",{className:"text-[11px] text-gray-500 dark:text-gray-400",children:[t("clients.clientId"),":"]}),o.jsx("code",{className:"text-[11px] font-mono text-gray-600 dark:text-gray-300 truncate",children:D.id}),o.jsx($c,{value:D.id,label:t("keys.copied")})]})]}),o.jsxs("button",{onClick:()=>C(D),className:"text-xs px-3 py-1.5 rounded-lg text-red-600 dark:text-red-400 hover:bg-red-50 dark:hover:bg-red-900/30 transition-colors inline-flex items-center gap-1",children:[o.jsx(Cr,{className:"w-3.5 h-3.5"}),t("apps.revoke")]})]}),o.jsxs("div",{className:"mt-3 pt-3 border-t border-gray-100 dark:border-gray-700 space-y-2",children:[o.jsxs("div",{children:[o.jsx("span",{className:"text-[11px] font-medium text-gray-600 dark:text-gray-300",children:t("clients.redirects")}),o.jsxs("div",{className:"flex gap-2 mt-1",children:[o.jsx("textarea",{value:((J=_[D.id])==null?void 0:J.redirects)??D.redirectUris.join(`
1026`),onChange:G=>N({..._,[D.id]:{..._[D.id],redirects:G.target.value}}),rows:Math.max(1,D.redirectUris.length),className:"input flex-1 font-mono text-xs bg-white dark:bg-gray-900 text-gray-900 dark:text-white"}),o.jsx("button",{onClick:()=>{var G;return K.mutate({id:D.id,data:{redirectUris:(((G=_[D.id])==null?void 0:G.redirects)??D.redirectUris.join(`
1027`)).split(`
1028`).map(B=>B.trim()).filter(Boolean)}})},className:"btn btn-secondary text-xs self-start",children:t("clients.save")})]})]}),o.jsxs("div",{children:[o.jsx("span",{className:"text-[11px] font-medium text-gray-600 dark:text-gray-300",children:t("keys.webhook")}),o.jsxs("div",{className:"flex gap-2 mt-1",children:[o.jsx("input",{type:"url",value:((de=_[D.id])==null?void 0:de.webhook)??D.webhookUrl??"",onChange:G=>N({..._,[D.id]:{..._[D.id],webhook:G.target.value}}),placeholder:t("keys.webhookPlaceholder"),className:"input flex-1 text-sm bg-white dark:bg-gray-900 text-gray-900 dark:text-white"}),o.jsx("button",{onClick:()=>{var G;return K.mutate({id:D.id,data:{webhookUrl:((G=_[D.id])==null?void 0:G.webhook)??D.webhookUrl??""}})},className:"btn btn-secondary text-xs",children:t("clients.save")})]}),D.webhookSecret&&D.webhookUrl&&o.jsxs("div",{className:"flex items-center gap-2 mt-1.5",children:[o.jsxs("span",{className:"text-[11px] text-gray-500 dark:text-gray-400",children:[t("keys.webhookSecret"),":"]}),o.jsx("code",{className:"text-[11px] font-mono text-gray-600 dark:text-gray-300 truncate",children:D.webhookSecret}),o.jsx($c,{value:D.webhookSecret,label:t("keys.copied")})]})]}),o.jsxs("p",{className:"text-[11px] text-gray-400 dark:text-gray-500",children:[t("clients.authorizeUrl"),":"," ",o.jsx("code",{className:"font-mono",children:"https://www.smart-copy.ai/oauth/authorize"})]})]})]},D.id)})})]}),o.jsxs("p",{className:"text-sm text-gray-500 dark:text-gray-400",children:[t("movedToIntegrations")," ",o.jsx(ze,{to:"/connections",className:"text-purple-600 dar
1028k:text-purple-400 hover:underline",children:t("goToIntegrations")})]}),o.jsx(jt,{children:c&&o.jsx(ue.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},className:"fixed inset-0 z-[100] flex items-center justify-center p-4 bg-black/50 backdrop-blur-sm",children:o.jsxs(ue.div,{initial:{opacity:0,scale:.95,y:12},animate:{opacity:1,scale:1,y:0},exit:{opacity:0,scale:.95,y:12},className:"w-full max-w-lg rounded-2xl bg-white dark:bg-gray-800 shadow-2xl border border-gray-200 dark:border-gray-700 p-6",children:[o.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[o.jsx(Zu,{className:"w-5 h-5 text-emerald-600 dark:text-emerald-400"}),o.jsx("h3",{className:"text-base font-semibold text-gray-900 dark:text-white",children:t("keys.createdTitle")})]}),o.jsx("p",{className:"text-xs text-gray-500 dark:text-gray-400 mb-4",children:t("keys.createdHint")}),o.jsxs("div",{className:"flex items-center gap-2 p-3 rounded-lg bg-gray-50 dark:bg-gray-900 border border-gray-200 dark:border-gray-700",children:[o.jsx("code",{className:"text-xs font-mono text-gray-800 dark:text-gray-200 break-all flex-1",children:c.token}),o.jsx($c,{value:c.token,label:t("keys.copied")})]}),o.jsx("div",{className:"flex justify-end mt-5",children:o.jsx("button",{onClick:()=>u(null),className:"btn btn-primary text-sm",children:t("keys.done")})})]})})}),o.jsx(jt,{children:b&&o.jsx(ue.div,{initial:{opacity:0}
1028,animate:{opacity:1},exit:{opacity:0},className:"fixed inset-0 z-[100] flex items-center justify-center p-4 bg-black/50 backdrop-blur-sm",children:o.jsxs(ue.div,{initial:{opacity:0,scale:.95,y:12},animate:{opacity:1,scale:1,y:0},exit:{opacity:0,scale:.95,y:12},className:"w-full max-w-lg rounded-2xl bg-white dark:bg-gray-800 shadow-2xl border border-gray-200 dark:border-gray-700 p-6",children:[o.jsxs("div",{className:"flex items-center gap-2 mb-3",children:[o.jsx(Ju,{className:"w-5 h-5 text-emerald-600 dark:text-emerald-400"}),o.jsx("h3",{className:"text-base font-semibold text-gray-900 dark:text-white",children:t("clients.createdTitle")})]}),o.jsxs("div",{className:"space-y-3",children:[o.jsxs("div",{children:[o.jsx("p",{className:"text-[11px] text-gray-500 dark:text-gray-400 mb-1",children:t("clients.clientId")}),o.jsxs("div",{className:"flex items-center gap-2 p-2.5 rounded-lg bg-gray-50 dark:bg-gray-900 border border-gray-200 dark:border-gray-700",children:[o.jsx("code",{className:"text-xs font-mono text-gray-800 dark:text-gray-200 break-all flex-1",children:b.id}),o.jsx($c,{value:b.id,label:t("keys.copied")})]})]}),b.clientSecret&&o.jsxs("div",{children:[o.jsxs("p",{className:"text-[11px] text-gray-500 dark:text-gray-400 mb-1",children:[t("clients.clientSecret")," —"," ",t("clients.createdSecretHint")]}),o.jsxs("div",{className:"flex items-center gap-2 p-2.5 rounded-lg bg-amber-50 dark:bg-amber-900/20 border border-amber-200 dark:border-amber-800",children:[o.jsx("code",{className:"text-xs font-mono text-gray-800 dark:text-gray-200 break-all flex-1",children:b.clientSecret}),o.jsx($c,{value:b.clientSecret,label:t("keys.copied")})]})]})]}),o.jsx("div",{className:"flex justify-end mt-5",children:o.jsx("button",{onClick:()=>v(null),className:"btn btn-primary text-sm",children:t("keys.done")})})]})})}),o.jsx(jt,{children:A&&o.jsx(ue.div,{initial:{opacity:0}
1028,animate:{opacity:1},exit:{opacity:0},className:"fixed inset-0 z-[100] flex items-center justify-center p-4 bg-black/50 backdrop-blur-sm",onClick:()=>C(null),children:o.jsxs(ue.div,{initial:{opacity:0,scale:.95,y:12},animate:{opacity:1,scale:1,y:0},exit:{opacity:0,scale:.95,y:12},className:"w-full max-w-md rounded-2xl bg-white dark:bg-gray-800 shadow-2xl border border-gray-200 dark:border-gray-700 p-5",onClick:D=>D.stopPropagation(),children:[o.jsxs("div",{className:"flex items-start gap-3",children:[o.jsx("div",{className:"w-9 h-9 rounded-xl bg-red-100 dark:bg-red-900/40 flex items-center justify-center shrink-0",children:o.jsx(Cr,{className:"w-4 h-4 text-red-600 dark:text-red-400"})}),o.jsxs("div",{children:[o.jsx("h3",{className:"text-sm font-semibold text-gray-900 dark:text-white",children:t("clients.deleteTitle")}),o.jsx("p",{className:"text-xs text-gray-500 dark:text-gray-400 mt-1",children:t("clients.deleteBody",{name:A.name})})]})]}),o.jsxs("div",{className:"flex justify-end gap-2 mt-5",children:[o.jsx("button",{onClick:()=>C(null),className:"btn btn-secondary text-xs",children:"Anuluj"}),o.jsx("button",{onClick:()=>T.mutate(A.id),disabled:T.isPending,className:"text-xs px-4 py-2 rounded-lg font-medium bg-red-600 hover:bg-red-700 text-white transition-colors disabled:opacity-50",children:t("clients.deleteConfirm")})]})]})})}),o.jsx(jt,{children:d&&o.jsx(ue.div,{initial:{opacity:0}
1028,animate:{opacity:1},exit:{opacity:0},className:"fixed inset-0 z-[100] flex items-center justify-center p-4 bg-black/50 backdrop-blur-sm",onClick:()=>h(null),children:o.jsxs(ue.div,{initial:{opacity:0,scale:.95,y:12},animate:{opacity:1,scale:1,y:0},exit:{opacity:0,scale:.95,y:12},className:"w-full max-w-md rounded-2xl bg-white dark:bg-gray-800 shadow-2xl border border-gray-200 dark:border-gray-700 p-5",onClick:D=>D.stopPropagation(),children:[o.jsxs("div",{className:"flex items-start gap-3",children:[o.jsx("div",{className:"w-9 h-9 rounded-xl bg-red-100 dark:bg-red-900/40 flex items-center justify-center shrink-0",children:o.jsx(Cr,{className:"w-4 h-4 text-red-600 dark:text-red-400"})}),o.jsxs("div",{children:[o.jsx("h3",{className:"text-sm font-semibold text-gray-900 dark:text-white",children:t("keys.revokeTitle")}),o.jsx("p",{className:"text-xs text-gray-500 dark:text-gray-400 mt-1",children:t("keys.revokeBody",{name:d.name})})]})]}),o.jsxs("div",{className:"flex justify-end gap-2 mt-5",children:[o.jsx("button",{onClick:()=>h(null),className:"btn btn-secondary text-xs",children:t("cancel")}),o.jsx("button",{onClick:()=>E.mutate(d.id),disabled:E.isPending,className:"text-xs px-4 py-2 rounded-lg font-medium bg-red-600 hover:bg-red-700 text-white transition-colors disabled:opacity-50",children:t("keys.revokeConfirm")})]})]})})})]})]})},kz={baselinker:VI,shoper:iS,idosell:nS,feed:$V},Qke=()=>{const{t}=He(["integrations","bulk"]),e=(H,Y)=>String(t(H,{ns:"bulk"})),[r,n]=M.useState(null),[s,i]=M.useState(""),[a,l]=M.useState(""),[c,u]=M.useState(""),[d,h]=M.useState(""),[p,f]=M.useState(""),[m,y]=M.useState(""),[k,g]=M.useState(!1),[x,w]=M.useState(""),[b,v]=M.useState(""),{data:A,refetch:C}=mt({queryKey:["bulk-connections"],queryFn:async()=>(await xe.get("/bulk/connections")).data.data}),_=()=>{n(null),i(""),l(""),u(""),h(""),f(""),y(""),w(""),v("")},N=H=>{le.success(H===void 0?t("shops.connected"):t("shops.connectedWith",{n:H})),_(),C()},W=H=>{var Y,$;return le.error((($=(Y=H.response)==null?void 0:Y.data)==null?void 0:$.error)||t("shops.failed"))},K=Be({mutationFn:async H=>{if(H==="baselinker")return{produkty:void 0,dane:(await xe.post("/bulk/baselinker/inventories",{token:s,save:!0})).data};if(H==="feed"){const $=(await xe.post("/bulk/feed/verify",{url:a,save:!0})).data;return{produkty:$.products,dane:$}}if(H==="shoper"){const $=k?{domain:c,login:p,password:m}:{domain:c,token:d},D=(await xe.post("/bulk/shoper/verify",{...$,save:!0})).data;return{produkty:D.products,dane:D}}const Y=(await xe.post("/bulk/idosell/verify",{domain:x,api_key:b,save:!0})).data;return{produkty:Y.products,dane:Y}},onSuccess:H=>N(H.produkty),onError:W}),T=Be({mutationFn:async H=>xe.delete(`/bulk/connections/${H}`),onSuccess:()=>C(),onError:W}),F="w-full px-3 py-2 rounded-lg border border-gray-300 dark:border-gray-600 bg-white dark:bg-gray-900 text-gray-900 dark:text-white text-sm",E=H=>H==="baselinker"?s.length>8:H==="feed"?/^https?:\/\//.test(a):H==="shoper"?!!c&&(k?!!p&&!!m:d.length>4):!!x&&b.length>8;return o.jsxs("section",{className:"mb-10",children:[o.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[o.jsx(iS,{className:"w-5 h-5 text-purple-600 dark:text-purple-400"}),o.jsx("h2",{className:"text-lg font-semibold text-gray-900 dark:text-white",children:t("shops.title")})]}),o.jsx("p",{className:"text-xs text-gray-500 dark:text-gray-400 mb-4",children:t("shops.hint")}),((A==null?void 0:A.length)??0)===0?o.jsx("p",{className:"text-sm text-gray-400 dark:text-gray-500 py-4 text-center border border-dashed border-gray-300 dark:border-gray-700 rounded-xl mb-4",children:t("shops.empty")}):o.jsx("div",{className:"space-y-2 mb-4",children:A.map(H=>{const Y=kz[H.provider??"feed"]||hc;return o.jsxs("div",{className:"p-3 rounded-xl bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 flex items-center gap-3",children:[o.jsx("div",{className:"w-9 h-9 rounded-xl bg-purple-100 dark:bg-purple-900/40 flex items-center justify-center shrink-0",children:o.jsx(Y,{className:"w-4 h-4 text-purple-600 dark:text-purple-400"})}),o.jsxs("div",{className:"flex-1 min-w-0",children:[o.jsxs("p",{className:"text-sm font-medium text-gray-900 dark:text-white truncate",children:[H.label," ",o.jsx("span",{className:"text-xs font-normal text-gray-500",children:e(`sources.${H.provider}`)})]}),o.jsx("p",{className:"text-xs font-mono text-gray-500 truncate",children:H.token_hint})]}
1028),o.jsxs(ze,{to:"/bulk",className:"text-xs px-3 py-1.5 rounded-lg text-purple-600 dark:text-purple-400 hover:bg-purple-50 dark:hover:bg-purple-900/30 inline-flex items-center gap-1.5",children:[o.jsx(xv,{className:"w-3.5 h-3.5"}),t("shops.goToWork")]}),o.jsx("button",{onClick:()=>T.mutate(H.id),title:t("shops.disconnect"),className:"p-2 rounded-lg text-gray-400 hover:text-red-500",children:o.jsx(yt,{className:"w-4 h-4"})})]},H.id)})}),o.jsx("div",{className:"grid sm:grid-cols-2 lg:grid-cols-4 gap-2 mb-4",children:["baselinker","shoper","idosell","feed"].map(H=>{const Y=kz[H];return o.jsxs("button",{onClick:()=>n(r===H?null:H),className:`p-3 rounded-xl border text-left transition-colors ${r===H?"border-purple-500 bg-purple-50 dark:bg-purple-900/20":"border-gray-200 dark:border-gray-700 bg-white dark:bg-gray-800 hover:border-purple-400"}`,children:[o.jsx(Y,{className:"w-4 h-4 text-purple-600 dark:text-purple-400 mb-1.5"}),o.jsx("p",{className:"text-sm font-medium text-gray-900 dark:text-white",children:e(`sources.${H}`)})]},H)})}),r&&o.jsxs("div",{className:"card dark:bg-gray-800 dark:border-gray-700 space-y-3",children:[r==="baselinker"&&o.jsx("input",{className:F,type:"password",placeholder:e("blTokenPlaceholder"),value:s,onChange:H=>i(H.target.value)}),r==="feed"&&o.jsx("input",{className:F,placeholder:"https://sklep.pl/feed.xml",value:a,onChange:H=>l(H.target.value)}),r==="shoper"&&o.jsxs(o.Fragment,{children:[o.jsx("input",{className:F,placeholder:e("sh.domainPlaceholder"),value:c,onChange:H=>u(H.target.value)}),k?o.jsxs("div",{className:"grid sm:grid-cols-2 gap-2",children:[o.jsx("input",{className:F,placeholder:e("sh.login"),autoComplete:"off",value:p,onChange:H=>f(H.target.value)}),o.jsx("input",{className:F,type:"password",placeholder:e("sh.password"),autoComplete:"new-password",value:m,onChange:H=>y(H.target.value)})]}):o.jsx("input",{className:F,type:"password",placeholder:e("sh.tokenPlaceholder"),value:d,onChange:H=>h(H.target.value)}),o.jsxs("div",{className:"flex flex-wrap items-center gap-3",children:[o.jsx("button",{onClick:()=>g(H=>!H),className:"text-sm text-purple-600 dark:text-purple-400 hover:underline",children:e(k?"sh.useToken":"sh.useLogin")}),o.jsx(jd,{text:e("sh.where")})]})]}),r==="idosell"&&o.jsxs(o.Fragment,{children:[o.jsx("input",{className:F,placeholder:e("id.domainPlaceholder"),value:x,onChange:H=>w(H.target.value)}),o.jsx("input",{className:F,type:"password",placeholder:e("id.keyPlaceholder"),value:b,onChange:H=>v(H.target.value)}),o.jsx(jd,{text:e("id.where")})]}),o.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[o.jsxs("button",{onClick:()=>K.mutate(r),disabled:!E(r)||K.isPending,className:"btn btn-primary text-sm inline-flex items-center gap-2 disabled:opacity-50",children:[K.isPending?o.jsx(dt,{className:"w-4 h-4 animate-spin"}):o.jsx(On,{className:"w-4 h-4"}),t("shops.connect")]}),o.jsx("button",{onClick:_,className:"btn btn-secondary text-sm",children:t("shops.cancel")})]}),o.jsx("p",{className:"text-xs text-gray-500 dark:text-gray-400",children:t("shops.afterConnect")})]})]})},eve=()=>{const{t}=He("integrations"),e=Zs(),{data:r}=mt({queryKey:["google-status"],queryFn:async()=>(await xe.get("/google/status")).data});M.useEffect(()=>{const i=a=>{var l;a.origin===window.location.origin&&((l=a.data)==null?void 0:l.source)==="smart-copy-google"&&(a.data.ok?(le.success(t("googleDocs.connected")),e.invalidateQueries({queryKey:["google-status"]})):le.error(t("googleDocs.failed")))};return window.addEventListener("message",i),()=>window.removeEventListener("message",i)},[e,t]);const n=Be({mutationFn:t9,onError:i=>{var a,l;return le.error(((l=(a=i.response)==null?void 0:a.data)==null?void 0:l.error)||t("googleDocs.failed"))}}),s=Be({mutationFn:async()=>xe.delete("/google/connection"),onSuccess:()=>{le.success(t("googleDocs.disconnected")),e.invalidateQueries({queryKey:["google-status"]})},onError:()=>le.error(t("googleDocs.failed"))});return r&&!r.configured?null:o.jsxs("section",{className:"mb-10",children:[o.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[o.jsx(Jt,{className:"w-5 h-5 text-purple-600 dar
1028k:text-purple-400"}),o.jsx("h2",{className:"text-lg font-semibold text-gray-900 dark:text-white",children:t("googleDocs.title")})]}),o.jsx("p",{className:"text-xs text-gray-500 dark:text-gray-400 mb-4",children:t("googleDocs.hint")}),r!=null&&r.connected?o.jsxs("div",{className:"flex flex-wrap items-center gap-3 justify-between p-4 border border-gray-200 dark:border-gray-700 rounded-xl bg-white dark:bg-gray-800",children:[o.jsxs("div",{className:"flex items-center gap-3 min-w-0",children:[o.jsx("span",{className:"flex items-center justify-center w-9 h-9 rounded-lg bg-green-50 dark:bg-green-900/30",children:o.jsx(On,{className:"w-5 h-5 text-green-600 dark:text-green-400"})}),o.jsxs("div",{className:"min-w-0",children:[o.jsx("p",{className:"text-sm font-medium text-gray-900 dark:text-white truncate",children:r.email||t("googleDocs.connectedGeneric")}),o.jsx("p",{className:"text-xs text-gray-500 dark:text-gray-400",children:t("googleDocs.folderNote")})]})]}),o.jsxs("button",{onClick:()=>s.mutate(),disabled:s.isPending,className:"btn btn-secondary flex items-center gap-2 text-sm",children:[s.isPending?o.jsx(dt,{className:"w-4 h-4 animate-spin"}):o.jsx(Cr,{className:"w-4 h-4"}),t("googleDocs.disconnect")]})]}):o.jsxs("div",{className:"p-5 border border-dashed border-gray-300 dark:border-gray-700 rounded-xl text-center",children:[o.jsx("p",{className:"text-sm text-gray-400 dark:text-gray-500 mb-3",children:t("googleDocs.empty")}),o.jsxs("button",{onClick:()=>n.mutate(),disabled:n.isPending,className:"btn btn-primary inline-flex items-center gap-2 text-sm",children:[n.isPending?o.jsx(dt,{className:"w-4 h-4 animate-spin"}):o.jsx(Oo,{className:"w-4 h-4"}),t("googleDocs.connect")]}),o.jsx("p",{className:"text-xs text-gray-400 dark:text-gray-500 mt-3",children:t("googleDocs.scopeNote")})]})]})},tve=()=>{var l;const{t,i18n:e}=He("developers"),r=Zs(),[n,s]=M.useState(null),{data:i}=mt({queryKey:["dev-apps"],queryFn:async()=>(await xe.get("/developers/apps")).data}),a=Be({mutationFn:async c=>xe.delete(`/developers/apps/${c}`),onSuccess:()=>{le.success(t("apps.revoked")),s(null),r.invalidateQueries({queryKey:["dev-apps"]})},onError:c=>{var u,d;return le.error(((d=(u=c.response)==null?void 0:u.data)==null?void 0:d.error)||"Error")}});return o.jsxs("section",{className:"mb-10",children:[o.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[o.jsx(hc,{className:"w-5 h-5 text-purple-600 dark:text-purple-400"}),o.jsx("h2",{className:"text-lg font-semibold text-gray-900 dark:text-white",children:t("apps.title")})]}),o.jsx("p",{className:"text-xs text-gray-500 dark:text-gray-400 mb-4",children:t("apps.hint")}),((i==null?void 0:i.length)??0)===0?o.jsxs("div",{className:"py-5 px-4 text-center border border-dashed border-gray-300 dark:border-gray-700 rounded-xl",children:[o.jsx("p",{className:"text-sm text-gray-400 dark:text-gray-500",children:t("apps.empty")}),o.jsxs("a",{href:(l=e.language)!=null&&l.startsWith("pl")?"https://www.smart-copy.ai/pl/integrations/zapier":"https://www.smart-copy.ai/integrations/zapier",target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-1 mt-2 text-sm text-purple-600 dark:text-purple-400 hover:underline",children:[t("apps.zapierHint"),o.jsx(Oo,{className:"w-3.5 h-3.5"})]})]}):o.jsx("div",{className:"space-y-3",children:i.map(c=>o.jsxs("div",{className:"p-4 rounded-xl bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 flex items-center gap-3",children:[o.jsx("div",{className:"w-10 h-10 rounded-xl bg-purple-100 dark:bg-purple-900/40 flex items-center justify-center shrink-0 overflow-hidden",children:c.logoUrl?o.jsx("img",{src:c.logoUrl,alt:"",className:"w-full h-full object-cover"}):o.jsx(Ju,{className:"w-5 h-5 text-purple-600 dark:text-purple-400"})}),o.jsxs("div",{className:"flex-1 min-w-0",children:[o.jsx("p",{className:"text-sm font-medium text-gray-900 dark:text-white truncate",children:c.name}),o.jsxs("p",{className:"text-xs text-gray-500 dark:text-gray-400",children:[t("apps.grantedAt",{date:new Date(c.grantedAt).toLocaleDateString(e.language)})," ","· ",t("apps.scopes"),":"," ",c.scopes.split(" ").map(u=>t(`scopes.${u}
1028`,u)).join(", ")]})]}),o.jsx("button",{onClick:()=>s(c),className:"text-xs px-3 py-1.5 rounded-lg text-red-600 dark:text-red-400 hover:bg-red-50 dark:hover:bg-red-900/30 transition-colors",children:t("apps.revoke")})]},c.id))}),o.jsx(jt,{children:n&&o.jsx(ue.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},className:"fixed inset-0 z-[100] flex items-center justify-center p-4 bg-black/50 backdrop-blur-sm",onClick:()=>s(null),children:o.jsxs(ue.div,{initial:{opacity:0,scale:.95,y:12},animate:{opacity:1,scale:1,y:0},exit:{opacity:0,scale:.95,y:12},className:"w-full max-w-md rounded-2xl bg-white dark:bg-gray-800 shadow-2xl border border-gray-200 dark:border-gray-700 p-5",onClick:c=>c.stopPropagation(),children:[o.jsxs("div",{className:"flex items-start gap-3",children:[o.jsx("div",{className:"w-9 h-9 rounded-xl bg-red-100 dark:bg-red-900/40 flex items-center justify-center shrink-0",children:o.jsx(Cr,{className:"w-4 h-4 text-red-600 dark:text-red-400"})}),o.jsxs("div",{children:[o.jsx("h3",{className:"text-sm font-semibold text-gray-900 dark:text-white",children:t("apps.revokeTitle")}),o.jsx("p",{className:"text-xs text-gray-500 dark:text-gray-400 mt-1",children:t("apps.revokeBody",{name:n.name})})]})]}),o.jsxs("div",{className:"flex justify-end gap-2 mt-5",children:[o.jsx("button",{onClick:()=>s(null),className:"btn btn-secondary text-xs",children:t("cancel")}),o.jsx("button",{onClick:()=>a.mutate(n.id),disabled:a.isPending,className:"text-xs px-4 py-2 rounded-lg font-medium bg-red-600 hover:bg-red-700 text-white transition-colors disabled:opacity-50",children:t("apps.revokeConfirm")})]})]})})})]})},rve="https://wordpress.org/plugins/smart-copy-connector/",nve=()=>{var Y;const{t}=He("developers"),{t:e,i18n:r}=He("order-detail"),n=((Y=r.language)==null?void 0:Y.startsWith("pl"))??!1,[s,i]=M.useState(!1),[a,l]=M.useState("connector"),[c,u]=M.useState({baseUrl:"",wpUsername:"",appPassword:"",connectorKey:""}),[d,h]=M.useState(null),[p,f]=M.useState(null),[m,y]=M.useState(""),[k,g]=M.useState({wpUsername:"",appPassword:""}),[x,w]=M.useState(null),{data:b,refetch:v,isLoading:A}=mt({queryKey:["wp-sites"],queryFn:async()=>(await xe.get("/wp/sites")).data}),C=(b==null?void 0:b.find($=>$.id===d))??null,_=(b==null?void 0:b.find($=>$.id===p))??null,N=()=>u({baseUrl:"",wpUsername:"",appPassword:"",connectorKey:""}),W=Be({mutationFn:async()=>{const $=a==="connector"?{method:"connector",baseUrl:c.baseUrl,connectorKey:c.connectorKey}:{baseUrl:c.baseUrl,wpUsername:c.wpUsername,appPassword:c.appPassword};return(await xe.post("/wp/sites",$)).data},onSuccess:$=>{le.success($.pendingVerification?e("wp.pendingVerification"):e("wp.siteAdded"),{duration:$.pendingVerification?12e3:4e3}),i(!1),N(),v()},onError:$=>{var D,J;return le.error(((J=(D=$.response)==null?void 0:D.data)==null?void 0:J.error)||e("wp.error"),{duration:8e3})}}),K=Be({mutationFn:async $=>(await xe.post(`/wp/sites/${$}/verify`)).data,onSuccess:$=>{if(v(),$.ok)return w({state:"ok"});if($.hostBlocked){const D=$.lastPollAt&&Date.now()-new Date($.lastPollAt).getTime()<y9;return w(D?{state:"ok"}:{state:"pending",message:e("wp.manage.checkPending")})}w({state:"error",message:$.error})},onError:$=>{var D,J;return w({state:"error",message:((J=(D=$.response)==null?void 0:D.data)==null?void 0:J.error)||e("wp.error")})}}),T=Be({mutationFn:async $=>{const D=(C==null?void 0:C.authType)==="connector"?{connectorKey:m}:k;return(await xe.patch(`/wp/sites/${$}`,D)).data},onSuccess:$=>{le.success($.pendingVerification?e("wp.manage.keyUpdatedPending"):e("wp.manage.keyUpdated"),{duration:$.pendingVerification?1e4:4e3}),y(""),g({wpUsername:"",appPassword:""}),w(null),h(null),v()},onError:$=>{var D,J;return le.error(((J=(D=$.response)==null?void 0:D.data)==null?void 0:J.error)||e("wp.error"),{duration:8e3})}}),F=Be({mutationFn:async $=>{await xe.delete(`/wp/sites/${$}`)},onSuccess:()=>{le.success(e("wp.manage.deleted")),f(null),v()},onError:$=>{var D,J;return le.error(((J=(D=$.response)==null?void 0:D.data)==null?void 0:J.error)||e("wp.error"),{duration:8e3})}}),E=$=>{const D=W2($);return D==="connected"?$.lastPollAt?e("wp.manage.statusConnectedAgo",{ago:V2($.lastPollAt,n)}):e("wp.manage.statusConnected"):e(D==="stale"?"wp.manage.statusStale":"wp.manage.statusPending")},H="w-full px-3 py-2 rounded-lg border border-gray-300 dark:border-gray-600 bg-white dark:bg-gray-900 text-gray-900 dark:text-white text-sm";return o.jsxs("section",{className:"mb-12",children:[o.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[o.jsx(Gs,{className:"w-5 h-5 text-purple-600 dar
1028k:text-purple-400"}),o.jsx("h2",{className:"text-lg font-semibold text-gray-900 dark:text-white",children:t("wpSites.title")})]}),o.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-300 mb-4",children:t("wpSites.hint")}),A?o.jsxs("div",{className:"card dark:bg-gray-800 dark:border-gray-700 text-sm text-gray-500",children:[o.jsx(dt,{className:"w-4 h-4 animate-spin inline mr-2"}),t("wpSites.loading")]}):((b==null?void 0:b.length)??0)===0?o.jsxs("div",{className:"card dark:bg-gray-800 dark:border-gray-700 text-center py-8",children:[o.jsx("p",{className:"text-gray-600 dark:text-gray-300 mb-4",children:t("wpSites.empty")}),o.jsxs("button",{onClick:()=>i(!0),className:"btn btn-primary inline-flex items-center gap-2",children:[o.jsx(Qr,{className:"w-4 h-4"})," ",t("wpSites.add")]})]}):o.jsxs("div",{className:"space-y-3",children:[b.map($=>o.jsxs("div",{className:"card dark:bg-gray-800 dark:border-gray-700 flex items-center justify-between gap-4 flex-wrap",children:[o.jsxs("div",{className:"min-w-0",children:[o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx("span",{className:`w-2 h-2 rounded-full ${x9(W2($))}`}),o.jsx("p",{className:"font-semibold text-gray-900 dark:text-white truncate",children:$.name||$.baseUrl}),o.jsx("span",{className:"text-[11px] uppercase tracking-wide px-2 py-0.5 rounded-full bg-gray-100 dark:bg-gray-700 text-gray-600 dark:text-gray-300",children:$.authType==="connector"?t("wpSites.viaPlugin"):t("wpSites.viaAppPassword")})]}),o.jsxs("p",{className:"text-xs text-gray-500 dark:text-gray-400 mt-1 truncate",children:[$.baseUrl," · ",E($)]})]}),o.jsxs("div",{className:"flex items-center gap-2 flex-shrink-0",children:[o.jsxs("button",{onClick:()=>{h($.id),w(null)},className:"btn btn-secondary text-sm px-3 py-2 inline-flex items-center gap-1.5",children:[o.jsx(Lo,{className:"w-4 h-4"})," ",t("wpSites.manage")]}),o.jsx("button",{onClick:()=>f($.id),className:"p-2 rounded-lg text-red-600 hover:bg-red-50 dark:hover:bg-red-900/20","aria-label":t("wpSites.remove"),children:o.jsx(Cr,{className:"w-4 h-4"})})]})]},$.id)),o.jsxs("button",{onClick:()=>i(!0),className:"btn btn-secondary inline-flex items-center gap-2 text-sm",children:[o.jsx(Qr,{className:"w-4 h-4"})," ",t("wpSites.add")]})]}),s&&o.jsxs("div",{className:"card dark:bg-gray-800 dark:border-gray-700 mt-3",children:[o.jsxs("div",{className:"flex items-center justify-between mb-4",children:[o.jsx("h3",{className:"font-semibold text-gray-900 dark:text-white",children:t("wpSites.add")}),o.jsx("button",{onClick:()=>{i(!1),N()},className:"p-1 text-gray-400 hover:text-gray-600","aria-label":t("wpSites.close"),children:o.jsx(yt,{className:"w-4 h-4"})})]}),o.jsx("div",{className:"flex gap-2 mb-4",children:["connector","app-password"].map($=>o.jsx("button",{onClick:()=>l($),className:`px-3 py-2 rounded-lg text-sm border ${a===$?"border-purple-500 bg-purple-50 dark:bg-purple-900/20 text-purple-700 dark:text-purple-300":"border-gray-300 dark:border-gray-600 text-gray-600 dark:text-gray-300"}`,children:e($==="connector"?"wp.methodConnector":"wp.methodAppPass")},$))}),o.jsxs("div",{className:"space-y-3",children:[o.jsx("input",{className:H,placeholder:e("wp.urlPlaceholder"),value:c.baseUrl,onChange:$=>u({...c,baseUrl:$.target.value})}),a==="connector"?o.jsxs(o.Fragment,{children:[o.jsxs("a",{href:rve,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-2 px-3 py-2 rounded-lg bg-purple-600 hover:bg-purple-700 text-white text-xs font-semibold",children:[o.jsx(Ty,{className:"w-4 h-4"}),e("wp.downloadPlugin")]}),o.jsx("p",{className:"text-xs text-gray-500 dark:text-gray-400 whitespace-pre-line",children:e("wp.connectorSteps")}),o.jsx("input",{className:H,placeholder:e("wp.connectorKeyPlaceholder"),value:c.connectorKey,onChange:$=>u({...c,connectorKey:$.target.value})})]}):o.jsxs(o.Fragment,{children:[o.jsx("input",{className:H,placeholder:e("wp.userPlaceholder"),value:c.wpUsername,onChange:$=>u({...c,wpUsername:$.target.value})}),o.jsx("input",{className:H,type:"password",placeholder:e("wp.passPlaceholder"),value:c.appPassword,onChange:$=>u({...c,appPassword:$.target.value})}),o.jsx("p",{className:"text-xs text-gray-500 dark:text-gray-400",children:e("wp.appPasswordHint")})]}),o.jsxs("button",{onClick:()=>
1028W.mutate(),disabled:W.isPending||!c.baseUrl,className:"btn btn-primary text-sm inline-flex items-center gap-2 disabled:opacity-50",children:[W.isPending?o.jsx(dt,{className:"w-4 h-4 animate-spin"}):o.jsx(Qr,{className:"w-4 h-4"}),e("wp.addSite")]})]})]}),C&&o.jsxs("div",{className:"card dark:bg-gray-800 dark:border-gray-700 mt-3",children:[o.jsxs("div",{className:"flex items-center justify-between mb-3",children:[o.jsxs("h3",{className:"font-semibold text-gray-900 dark:text-white",children:[e("wp.manage.title")," — ",C.name||C.baseUrl]}),o.jsx("button",{onClick:()=>h(null),className:"p-1 text-gray-400 hover:text-gray-600","aria-label":t("wpSites.close"),children:o.jsx(yt,{className:"w-4 h-4"})})]}),o.jsxs("div",{className:"flex items-center gap-3 mb-4 flex-wrap",children:[o.jsxs("button",{onClick:()=>{w(null),K.mutate(C.id)},disabled:K.isPending,className:"btn btn-secondary text-sm inline-flex items-center gap-2",children:[K.isPending?o.jsx(dt,{className:"w-4 h-4 animate-spin"}):o.jsx(Lo,{className:"w-4 h-4"}),K.isPending?e("wp.manage.checking"):e("wp.manage.checkNow")]}),(x==null?void 0:x.state)==="ok"&&o.jsxs("span",{className:"text-sm text-emerald-600 dark:text-emerald-400 inline-flex items-center gap-1.5",children:[o.jsx(Bs,{className:"w-4 h-4"})," ",e("wp.manage.checkOk")]}),x&&x.state!=="ok"&&o.jsxs("span",{className:"text-sm text-amber-600 dark:text-amber-400 inline-flex items-center gap-1.5",children:[o.jsx(Np,{className:"w-4 h-4"})," ",x.message]})]}),o.jsxs("div",{className:"border-t border-gray-200 dark:border-gray-700 pt-4 space-y-3",children:[o.jsxs("p",{className:"text-sm font-medium text-gray-900 dark:text-white inline-flex items-center gap-2",children:[o.jsx(Zu,{className:"w-4 h-4"}),C.authType==="connector"?e("wp.manage.newKeyTitle"):e("wp.manage.newCredsTitle")]}),C.authType==="connector"?o.jsxs(o.Fragment,{children:[o.jsx("p",{className:"text-xs text-gray-500 dark:text-gray-400",children:e("wp.manage.newKeyHint")}),o.jsx("input",{className:H,placeholder:e("wp.connectorKeyPlaceholder"),value:m,onChange:$=>y($.target.value)})]}):o.jsxs(o.Fragment,{children:[o.jsx("input",{className:H,placeholder:e("wp.userPlaceholder"),value:k.wpUsername,onChange:$=>g({...k,wpUsername:$.target.value})}),o.jsx("input",{className:H,type:"password",placeholder:e("wp.passPlaceholder"),value:k.appPassword,onChange:$=>g({...k,appPassword:$.target.value})})]}),o.jsx("button",{onClick:()=>T.mutate(C.id),disabled:T.isPending||(C.authType==="connector"?!m:!k.wpUsername||!k.appPassword),className:"btn btn-primary text-sm disabled:opacity-50",children:e("wp.manage.newKeySave")}
1028)]})]}),_&&o.jsxs("div",{className:"card dark:bg-gray-800 border-red-200 dark:border-red-800 mt-3",children:[o.jsx("p",{className:"font-semibold text-gray-900 dark:text-white mb-1",children:e("wp.manage.deleteTitle")}),o.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-300 mb-4",children:e("wp.manage.deleteBody")}),o.jsxs("div",{className:"flex gap-2",children:[o.jsx("button",{onClick:()=>F.mutate(_.id),disabled:F.isPending,className:"px-4 py-2 rounded-lg bg-red-600 text-white text-sm font-semibold disabled:opacity-50",children:e("wp.manage.deleteConfirm")}),o.jsx("button",{onClick:()=>f(null),className:"btn btn-secondary text-sm",children:t("wpSites.cancel")})]})]})]})},sve=()=>{const{t}=He("integrations");return o.jsxs("div",{className:"min-h-screen bg-gray-50 dark:bg-gray-900 flex",children:[o.jsx(ws,{}),o.jsx("div",{className:"flex-1 min-w-0 p-4 sm:p-6 lg:p-8",children:o.jsxs("div",{className:"max-w-4xl",children:[o.jsx(xa,{}),o.jsx("h1",{className:"text-3xl font-bold text-gray-900 dark:text-white mb-1",children:t("title")}),o.jsx("p",{className:"text-gray-600 dark:text-gray-300 mb-8",children:t("subtitle")}),o.jsx(Qke,{}),o.jsx(eve,{}),o.jsx(nve,{}),o.jsx(tve,{})]})})]})},ive=()=>{const{t}=He("developers"),[e]=Ad(),r=Vr(),n=Ss(),{isAuthenticated:s}=$r(),[i,a]=M.useState(null),[l,c]=M.useState(null),[u,d]=M.useState(!1),[h,p]=M.useState(!1),f=e.get("client_id")||"",m=e.get("redirect_uri")||"",y=e.get("scope")||"",k=e.get("state")||"",g=e.get("code_challenge")||"",x=e.get("code_challenge_method")||"";M.useEffect(()=>{if(!s){try{sessionStorage.setItem("sc_oauth_next",n.pathname+n.search)}catch{}r(`/login?next=${encodeURIComponent(n.pathname+n.search)}`,{replace:!0});return}try{sessionStorage.removeItem("sc_oauth_next")}catch{}if(e.get("response_type")!=="code"){c("response_type");return}xe.get("/oauth/authorize/client",{params:{client_id:f,redirect_uri:m,scope:y}}).then(b=>a(b.data)).catch(b=>{var v,A;return c(((A=(v=b.response)==null?void 0:v.data)==null?void 0:A.error)||"unknown")})},[s]);const w=async b=>{var v,A;d(!0);try{const C=await xe.post("/oauth/authorize/decision",{client_id:f,redirect_uri:m,scope:y,state:k,code_challenge:g||void 0,code_challenge_method:x||void 0,approved:b});p(!0),window.location.href=C.data.redirect}catch(C){c(((A=(v=C.response)==null?void 0:v.data)==null?void 0:A.error)||"unknown"),d(!1)}};return o.jsx("div",{className:"min-h-screen bg-gray-50 dark:bg-gray-900 flex items-center justify-center p-4",children:o.jsx(ue.div,{initial:{opacity:0,y:16},animate:{opacity:1,y:0},className:"w-full max-w-md rounded-2xl bg-white dark:bg-gray-800 shadow-xl border border-gray-200 dark:border-gray-700 p-6",children:l?o.jsx("p",{className:"text-sm text-red-600 dark:text-red-400",children:t("consent.invalid",{reason:l})}):h?o.jsxs("div",{className:"flex items-center gap-2 text-sm text-gray-600 dark:text-gray-300",children:[o.jsx(dt,{className:"w-4 h-4 animate-spin"}),t("consent.redirecting")]}):i?o.jsxs(o.Fragment,{children:[o.jsxs("div",{className:"flex items-center gap-3 mb-5",children:[o.jsx("div",{className:"w-11 h-11 rounded-xl bg-purple-100 dark:bg-purple-900/40 flex items-center justify-center overflow-hidden shrink-0",children:i.logo_url?o.jsx("img",{src:i.logo_url,alt:"",className:"w-full h-full object-cover"}):o.jsx(Ju,{className:"w-5 h-5 text-purple-600 dark:text-purple-400"})}),o.jsx("h1",{className:"text-base font-semibold text-gray-900 dark:text-white leading-snug",children:t("consent.title",{app:i.name})})]}),o.jsx("p",{className:"text-xs font-medium text-gray-600 dark:text-gray-300 mb-2",children:t("consent.willBeAble")}),o.jsx("ul",{className:"space-y-1.5 mb-4",children:i.scopes.map(b=>o.jsxs("li",{className:"flex items-start gap-2 text-sm text-gray-700 dark:text-gray-200",children:[o.jsx(On,{className:"w-4 h-4 mt-0.5 text-emerald-500 shrink-0"}),t(`scopes.${b}`,b)]},b))}),i.scopes.includes("texts:write")&&o.jsx("p",{className:"text-[11px] text-amber-700 dark:text-amber-400 bg-amber-50 dark:bg-amber-900/20 border border-amber-200 dark:border-amber-800 rounded-lg p-2.5 mb-5",children:t("consent.billing")}),o.jsxs("div",{className:"flex gap-2",children:[o.jsxs("button",{onClick:()=>w(!1),disabled:u,className:"btn btn-secondary flex-1 text-sm inline-flex items-center justify-center gap-1.5 disabled:opacity-50",children:[o.jsx(yt,{className:"w-4 h-4"}),t("consent.deny")]}),o.jsxs("button",{onClick:()=>w(!0),disabled:u,className:"btn btn-primary flex-1 text-sm inline-flex items-center justify-center gap-1.5 disabled:opacity-50",children:[u?o.jsx(dt,{className:"w-4 h-4 animate-spin"}):o.jsx(On,{className:"w-4 h-4"}),t("consent.allow")]})]})]}):o.jsxs("div",{className:"flex items-center gap-2 text-sm text-gray-600 dark:text-gray-300",children:[o.jsx(dt,{className:"w-4 h-4 animate-spin"}),t("consent.loading")]})})})},ave=()=>{const{t}=He("auth"),e=Vr(),r=Ss(),{setAuth:n}=$r(),[s,i]=M.useState(!1),[a,l]=M.useState(!1),[c,u]=M.useState(0),[d,h]=M.useState(""),p=na({code:hr().min(6,t("verify.code.error")).max(6,t("verify.code.error"))});M.useEffect(()=>{var v;const w=(v=r.state)==null?void 0:v.email,b=sessionStorage.getItem("verification_email");w?(h(w),sessionStorage.setItem("verification_email",w)):b?h(b):(le.error(t("verify.noEmail")),e("/register"))},[r,e,t]),M.useEffect(()=>{if(c>0){const w=setTimeout(()=>u(c-1),1e3);return()=>clearTimeout(w)}},[c]);const{register:f,handleSubmit:m,formState:{errors:y}}=Dd({resolver:Fd(p)}),k=async w=>{if(d){i(!0);try{const b=await Ho.verify({email:d,code:w.code});le.success(t("verify.success")),b.accessToken&&b.refreshToken&&b.user&&n(b.user,b.accessToken,b.refreshToken),sessionStorage.removeItem("verification_email"),e("/dashboard")}catch(b){le.error(Fo(b))}finally{i(!1)}}},g=async()=>
1028{if(!(!d||c>0)){l(!0);try{const w=await kx("resend_code");await Ho.resendCode({email:d,recaptchaToken:w}),le.success(t("verify.resend.success")),u(120)}catch(w){const b=Fo(w),v=b.match(/za (\d+) minut|in (\d+) minute/);if(v){const A=parseInt(v[1]||v[2]);u(A*60)}le.error(b)}finally{l(!1)}}},x=w=>`${Math.floor(w/60)}:${(w%60).toString().padStart(2,"0")}`;return o.jsx(ue.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.5},className:"w-full max-w-md",children:o.jsxs("div",{className:"card bg-white dark:bg-gray-800",children:[o.jsxs("div",{className:"text-center mb-8",children:[o.jsx("div",{className:"w-16 h-16 bg-gradient-to-br from-purple-600 to-indigo-600 rounded-full flex items-center justify-center mx-auto mb-4",children:o.jsx(dc,{className:"w-8 h-8 text-white"})}),o.jsx("h1",{className:"text-3xl font-bold text-gray-900 dark:text-white mb-2",children:t("verify.title")}),o.jsx("p",{className:"text-gray-600 dark:text-gray-300",children:t("verify.subtitle")}),o.jsx("p",{className:"text-purple-600 font-medium mt-1",children:d})]}),o.jsxs("form",{onSubmit:m(k),className:"space-y-5",children:[o.jsxs("div",{children:[o.jsx("label",{className:"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-2",children:t("verify.code.label")}),o.jsx("input",{...f("code"),type:"text",placeholder:t("verify.code.placeholder"),maxLength:6,className:`input text-center text-2xl tracking-widest font-bold dark:bg-gray-800 dark:text-gray-100 ${y.code?"input-error":""}`,autoComplete:"off"}),y.code&&o.jsx("p",{className:"text-red-500 text-sm mt-1",children:y.code.message})]}),o.jsx("button",{type:"submit",disabled:s,className:"w-full btn btn-primary py-3",children:s?o.jsxs(o.Fragment,{children:[o.jsx(dt,{className:"w-5 h-5 animate-spin mr-2"}),t("verify.submitting")]}):t("verify.submit")})]}),o.jsxs("div",{className:"mt-6 text-center",children:[o.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-300 mb-3",children:t("verify.resend.question")}),o.jsx("button",{onClick:g,disabled:a||c>0,className:"text-purple-600 hover:text-purple-700 font-medium disabled:opacity-50 disabled:cursor-not-allowed",children:a?o.jsxs(o.Fragment,{children:[o.jsx(dt,{className:"w-4 h-4 animate-spin inline mr-2"}),t("verify.resend.sending")]}):c>0?t("verify.resend.countdown",{time:x(c)}):t("verify.resend.button")})]}),o.jsx("div",{className:"mt-6 pt-6 border-t border-gray-200 dark:border-gray-700",children:o.jsxs("button",{onClick:()=>e("/register"),className:"flex items-center gap-2 text-gray-600 dark:text-gray-300 hover:text-purple-600 mx-auto",children:[o.jsx(ma,{className:"w-4 h-4"}),t("verify.backToRegister")]})})]})})},ove=()=>o.jsxs(o.Fragment,{children:[o.jsx(Ys,{children:o.jsx("meta",{name:"robots",content:"noindex, nofollow"})}),o.jsx(xs,{showFooter:!1,children:o.jsx("div",{className:"min-h-[calc(100vh-64px)] flex items-center justify-center py-12 px-4 bg-gradient-to-br from-purple-50 via-white to-indigo-50 dark:from-gray-900 dark:via-gray-800 dark:to-gray-900",children:o.jsx(ave,{})})})]}),lve=()=>{const{t}=He("auth"),[e,r]=M.useState(!1),[n,s]=M.useState(!1),[i,a]=M.useState(""),l=na({email:hr().email(t("forgotPassword.email.error")).min(1,t("forgotPassword.email.required"))}),{register:c,handleSubmit:u,formState:{errors:d}}=Dd({resolver:Fd(l)}),h=async p=>{r(!0);try{const f=await kx("forgot_password");await Ho.forgotPassword({email:p.email,recaptchaToken:f}),a(p.email),s(!0),le.success(t("forgotPassword.success"))}catch(f){le.error(Fo(f))}finally{r(!1)}};return n?o.jsx(ue.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.5},className:"w-full max-w-md",children:o.jsxs("div",{className:"card text-center bg-white dark:bg-gray-800 border-gray-300 dark:border-gray-500",children:[o.jsx("div",{className:"w-16 h-16 bg-green-100 rounded-full flex items-center justify-center mx-auto mb-4",children:o.jsx(Rt,{className:"w-8 h-8 text-green-600"})}),o.jsx("h1",{className:"text-2xl font-bold text-gray-900 mb-2 dark:text-gray-100",children:t("forgotPassword.sent.title")}),o.jsx("p",{className:"text-gray-900 dark:text-gray-100 mb-4",children:t("forgotPassword.sent.subtitle")}),o.jsx("p",{className:"text-purple-600 font-medium mb-6",children:i}),o.jsx("p",{className:"text-sm text-gray-900 dark:text-gray-200 mb-6",children:t("forgotPassword.sent.info")}),o.jsx(ze,{to:"/login",className:"btn btn-primary w-full",children:t("forgotPassword.sent.backToLogin")})]})}):o.jsx(ue.div,{initial:{opacity:0,y:20}
1028,animate:{opacity:1,y:0},transition:{duration:.5},className:"w-full max-w-md",children:o.jsxs("div",{className:"card bg-white dark:bg-gray-800 border-gray-200 dark:border-gray-500",children:[o.jsxs("div",{className:"text-center mb-8 ",children:[o.jsx("div",{className:"w-16 h-16 bg-gradient-to-br from-purple-600 to-indigo-600 rounded-full flex items-center justify-center mx-auto mb-4",children:o.jsx(dc,{className:"w-8 h-8 text-white"})}),o.jsx("h1",{className:"text-3xl font-bold text-gray-900 dark:text-gray-100 mb-2",children:t("forgotPassword.title")}),o.jsx("p",{className:"text-gray-600 dark:text-gray-300",children:t("forgotPassword.subtitle")})]}),o.jsxs("form",{onSubmit:u(h),className:"space-y-5",children:[o.jsxs("div",{children:[o.jsx("label",{className:"block text-sm font-medium text-gray-700 dark:text-gray-200 mb-2",children:t("forgotPassword.email.label")}),o.jsxs("div",{className:"relative",children:[o.jsx(dc,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-5 h-5 text-gray-400"}),o.jsx("input",{...c("email"),type:"email",placeholder:t("forgotPassword.email.placeholder"),className:`input bg-gray-200 dark:bg-gray-800 text-gray-700 dark:text-gray-200 pl-10 ${d.email?"input-error":""}`,autoComplete:"email"})]}),d.email&&o.jsx("p",{className:"text-red-500 text-sm mt-1",children:d.email.message})]}),o.jsx("button",{type:"submit",disabled:e,className:"w-full btn btn-primary py-3",children:e?o.jsxs(o.Fragment,{children:[o.jsx(dt,{className:"w-5 h-5 animate-spin mr-2"}),t("forgotPassword.submitting")]}):t("forgotPassword.submit")})]}),o.jsx("div",{className:"mt-6 pt-6 border-t border-gray-200 dark:border-gray-700",children:o.jsxs(ze,{to:"/login",className:"flex items-center gap-2 text-gray-700 dark:text-gray-300 hover:text-purple-600 mx-auto justify-center",children:[o.jsx(ma,{className:"w-4 h-4 text-gray-700 dark:text-gray-200"}),t("forgotPassword.backToLogin")]})})]})})},cve=()=>o.jsx(xs,{showFooter:!1,children:o.jsx("div",{className:"min-h-[calc(100vh-64px)] flex items-center justify-center py-12 px-4 bg-gradient-to-br from-purple-50 via-white to-indigo-50 dark:from-gray-900 dark:via-gray-800 dark:to-gray-900",children:o.jsx(lve,{})})}),uve=()=>{const{t}=He("auth"),e=Vr(),[r]=Ad(),[n,s]=M.useState(!1),[i,a]=M.useState(!1),[l,c]=M.useState(!1),[u,d]=M.useState(""),h=na({password:hr().min(8,t("resetPassword.password.minLength")).regex(/[A-Z]/,t("resetPassword.password.uppercase")).regex(/[a-z]/,t("resetPassword.password.lowercase")).regex(/[0-9]/,t("resetPassword.password.number")),confirmPassword:hr().min(1,t("resetPassword.confirmPassword.required"))}).refine(w=>w.password===w.confirmPassword,{message:t("resetPassword.confirmPassword.mismatch"),path:["confirmPassword"]});M.useEffect(()=>{const w=r.get("token");w?d(w):(le.error(t("resetPassword.invalidToken")),e("/forgot-password"))},[r,e,t]);const{register:p,handleSubmit:f,watch:m,formState:{errors:y}}=Dd({resolver:Fd(h)}),k=m("password",""),g={hasMinLength:k.length>=8,hasUpperCase:/[A-Z]/.test(k),hasLowerCase:/[a-z]/.test(k),hasNumber:/[0-9]/.test(k)},x=async w=>{if(u){c(!0);try{await Ho.resetPassword({token:u,password:w.password}),le.success(t("resetPassword.success")),e("/login")}catch(b){le.error(Fo(b))}finally{c(!1)}}};return o.jsx(ue.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.5},className:"w-full max-w-md",children:o.jsxs("div",{className:"card bg-white dark:bg-gray-800 border-white dark:border-gray-600",children:[o.jsxs("div",{className:"text-center mb-8",children:[o.jsx("div",{className:"w-16 h-16 bg-gradient-to-br from-purple-600 to-indigo-600 rounded-full flex items-center justify-center mx-auto mb-4",children:o.jsx(ku,{className:"w-8 h-8 text-white"})}),o.jsx("h1",{className:"text-3xl font-bold text-gray-900 dark:text-gray-100 mb-2",children:t("resetPassword.title")}),o.jsx("p",{className:"text-gray-600 dark:text-gray-300",children:t("resetPassword.subtitle")})]}),o.jsxs("form",{onSubmit:f(x),className:"space-y-5",children:[o.jsxs("div",{children:[o.jsx("label",{className:"block text-sm font-medium text-gray-900 dark:text-gray-100 mb-2",children:t("resetPassword.password.label")}),o.jsxs("div",{className:"relative",children:[o.jsx(ku,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-5 h-5 text-gray-400"}),o.jsx("input",{...p("password"),type:n?"text":"password",placeholder:t("resetPassword.password.placeholder"),className:`input pl-10 text-gray-900 dark:text-gray-100 bg-white dark:bg-gray-800 border-white dark:border-gray-500 pr-10 ${y.password?"input-error":""}`}),o.jsx("button",{type:"button",onClick:()=>s(!n),className:"absolute right-3 top-1/2 -translate-y-1/2 text-gray-400 hover:text-gray-600 dark:text-gray-300",children:n?o.jsx(Cp,{className:"w-5 h-5"}):o.jsx(Ks,{className:"w-5 h-5"})})]}),y.password&&o.jsx("p",{className:"text-red-500 text-sm mt-1",children:y.password.message}),k&&o.jsxs("div",{className:"mt-3 space-y-2",children:[o.jsxs("div",{className:"flex items-center gap-2 text-sm",children:[o.jsx(Bs,{className:`w-4 h-4 ${g.hasMinLength?"text-green-500":"text-gray-300"}`}),o.jsx("span",{className:g.hasMinLength?"text-green-600":"text-gray-500 dark:text-gray-400",children:t("resetPassword.passwordStrength.minLength")})]}),o.jsxs("div",{className:"flex items-center gap-2 text-sm",children:[o.jsx(Bs,{className:`w-4 h-4 ${g.hasUpperCase?"text-green-500":"text-gray-300"}`}),o.jsx("span",{className:g.hasUpperCase?"text-green-600":"text-gray-500 dark:text-gray-400",children:t("resetPassword.passwordStrength.uppercase")})]}),o.jsxs("div",{className:"flex items-center gap-2 text-sm",children:[o.jsx(Bs,{className:`w-4 h-4 ${g.hasLowerCase?"text-green-500":"text-gray-300"}`}),o.jsx("span",{className:g.hasLowerCase?"text-green-600":"text-gray-500 dark:text-gray-400",children:t("resetPassword.passwordStrength.lowercase")})]}),o.jsxs("div",{className:"flex items-center gap-2 text-sm",children:[o.jsx(Bs,{className:`w-4 h-4 ${g.hasNumber?"text-green-500":"text-gray-300"}`}),o.jsx("span",{className:g.hasNumber?"text-green-600":"text-gray-500 dark:text-gray-400",children:t("resetPassword.passwordStrength.number")})]})]})]}),o.jsxs("div",{children:[o.jsx("label",{className:"block text-sm font-medium text-gray-700 dark:text-gray-100 mb-2",children:t("resetPassword.confirmPassword.label")}),o.jsxs("div",{className:"relative",children:[o.jsx(ku,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-5 h-5 text-gray-400"}),o.jsx("input",{...p("confirmPassword"),type:i?"text":"password",placeholder:t("resetPassword.confirmPassword.placeholder"),className:`input pl-10 pr-10 text-gray-700 dark:text-gray-100 bg-white dark:bg-gray-800 border-white dark:border-gray-500 ${y.confirmPassword?"input-error":""}`}),o.jsx("button",{type:"button",onClick:()=>a(!i),className:"absolute right-3 top-1/2 -translate-y-1/2 text-gray-400 hover:text-gray-600 dark:text-gray-300",children:i?o.jsx(Cp,{className:"w-5 h-5"}):o.jsx(Ks,{className:"w-5 h-5"})})]}
1028),y.confirmPassword&&o.jsx("p",{className:"text-red-500 text-sm mt-1",children:y.confirmPassword.message})]}),o.jsx("button",{type:"submit",disabled:l,className:"w-full btn btn-primary py-3",children:l?o.jsxs(o.Fragment,{children:[o.jsx(dt,{className:"w-5 h-5 animate-spin mr-2"}),t("resetPassword.submitting")]}):t("resetPassword.submit")})]})]})})},dve=()=>o.jsx(xs,{showFooter:!1,children:o.jsx("div",{className:"min-h-[calc(100vh-64px)] flex items-center justify-center py-12 px-4 bg-gradient-to-br from-purple-50 via-white to-indigo-50 dark:from-gray-900 dark:via-gray-800 dark:to-gray-900",children:o.jsx(uve,{})})}),hve=()=>{var k;const{user:t}=$r(),{t:e}=He("dashboard"),{formatPrice:r}=bn(),[n,s]=Ad(),i=M.useRef(!1),{data:a}=mt({queryKey:["dashboard-orders"],queryFn:async()=>(await xe.get("/orders")).data}),l=Array.isArray(a)?a:(a==null?void 0:a.orders)||[],u=(l.length>0?l.flatMap(g=>g.texts.map(x=>({...x,orderId:g.id,orderNumber:g.orderNumber,createdAt:g.createdAt}))):[]).sort((g,x)=>new Date(x.createdAt).getTime()-new Date(g.createdAt).getTime()).slice(0,3);M.useEffect(()=>{if(n.get("payment")==="success"&&!i.current){const g=n.get("amount");le.success(e("toast.paymentSuccess",{amount:r(parseFloat(g||"0"))}),{duration:5e3,icon:"🎉"}),i.current=!0,s({})}},[n,s,e,r]);const d=l.length,h=l.reduce((g,x)=>g+x.texts.length,0),p=l.reduce((g,x)=>g+parseFloat(x.totalPrice),0),f=g=>g===1?e("recentOrders.pages.one"):g<5?e("recentOrders.pages.few"):e("recentOrders.pages.many"),m=[{icon:fn,label:e("stats.orders"),value:d,color:"from-purple-600 to-indigo-600"},{icon:Jt,label:e("stats.generatedTexts"),value:h,color:"from-green-600 to-emerald-600"},{icon:dn,label:e("stats.spent"),value:r(p),color:"from-orange-600 to-red-600"}],y=(t==null?void 0:t.firstName)||((k=t==null?void 0:t.email)==null?void 0:k.split("@")[0])||"";return o.jsxs("div",{className:"min-h-screen bg-gray-50 dark:bg-gray-900 flex",children:[o.jsx(ws,{}),o.jsx("div",{className:"flex-1 min-w-0 p-4 sm:p-6 lg:p-8",children:o.jsxs("div",{className:"max-w-7xl mx-auto",children:[o.jsxs(ue.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.5},className:"mb-12 flex items-end gap-4",children:[o.jsx(rd,{pose:"hand",size:"sm",className:"hidden sm:block flex-shrink-0"}),o.jsxs("div",{children:[o.jsx("h1",{className:"text-4xl font-bold text-gray-900 dark:text-white mb-2",children:e("welcome.greeting",{name:y})}),o.jsx("p",{className:"text-xl text-gray-600 dark:text-gray-300",children:e("welcome.subtitle")})]})]}),o.jsxs(ue.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.5,delay:.3},className:"card dark:bg-gray-800 dark:border-gray-700 mb-12",children:[o.jsx("h2",{className:"text-2xl font-bold text-gray-900 dark:text-white mb-6",children:e("quickActions.title")}),o.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[o.jsxs(ze,{to:"/orders?mode=new",className:"btn btn-primary flex items-center justify-center gap-2 py-4",children:[o.jsx(dn,{className:"w-5 h-5"}),e("quickActions.newOrder")]}),o.jsxs(ze,{to:"/orders",className:"btn btn-secondary flex items-center justify-center gap-2 py-4",children:[o.jsx(fn,{className:"w-5 h-5 "}),e("quickActions.myOrders")]})]})]}),o.jsx("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-6 mb-12",children:m.map((g,x)=>o.jsx(ue.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.5,delay:x*.1},className:"card dark:bg-gray-800 dark:border-gray-700",children:o.jsxs("div",{className:"flex items-center justify-between",children:[o.jsxs("div",{children:[o.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400 mb-1",children:g.label}),o.jsx("p",{className:"text-3xl font-bold text-gray-900 dark:text-white",children:g.value})]}),o.jsx("div",{className:`w-12 h-12 bg-gradient-to-br ${g.color} rounded-xl flex items-center justify-center`,children:o.jsx(g.icon,{className:"w-6 h-6 text-white"})})]})},x))}),o.jsxs(ue.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.5,delay:.4},className:"card dark:bg-gray-800 dark:border-gray-700",children:[o.jsxs("div",{className:"flex items-center justify-between mb-6",children:[o.jsx("h2",{className:"text-2xl font-bold text-gray-900 dark:text-white",children:e("recentOrders.title")}
1028),o.jsx(ze,{to:"/orders",className:"text-purple-600 dark:text-purple-400 hover:underline text-sm font-medium",children:e("recentOrders.viewAll")})]}),u&&u.length>0?o.jsx("div",{className:"space-y-3",children:u.map(g=>o.jsxs(ze,{to:`/orders/${g.orderId}`,className:"flex items-center justify-between p-4 bg-gray-50 dark:bg-gray-700 rounded-lg hover:bg-gray-100 dark:hover:bg-gray-600 transition-colors",children:[o.jsxs("div",{className:"flex items-center gap-4 min-w-0",children:[o.jsx("div",{className:"w-10 h-10 flex-shrink-0 bg-purple-100 dark:bg-purple-900/30 rounded-lg flex items-center justify-center",children:o.jsx(Jt,{className:"w-5 h-5 text-purple-600 dark:text-purple-400"})}),o.jsxs("div",{className:"flex-1 min-w-0",children:[o.jsx("p",{className:"font-semibold text-gray-900 dark:text-white truncate",children:Al(g.topic)}),o.jsxs("p",{className:"text-sm text-gray-600 dark:text-gray-400",children:[g.pages," ",f(g.pages)," •"," ",g.length.toLocaleString()," ",e("recentOrders.characters")]})]})]}),o.jsxs("div",{className:"text-right flex-shrink-0 ml-4",children:[o.jsx("p",{className:"font-bold text-purple-600 dark:text-purple-400",children:r(parseFloat(g.price))}),o.jsx("p",{className:"text-xs text-gray-500 dark:text-gray-400",children:new Date(g.createdAt).toLocaleDateString()})]})]},g.id))}):o.jsxs("div",{className:"text-center py-12",children:[o.jsx("div",{className:"w-16 h-16 bg-gray-100 dark:bg-gray-700 rounded-full flex items-center justify-center mx-auto mb-4",children:o.jsx(Jt,{className:"w-8 h-8 text-gray-400 dark:text-gray-500"})}),o.jsx("p",{className:"text-gray-500 dark:text-gray-400 mb-4",children:e("recentOrders.empty.title")}),o.jsx(ze,{to:"/orders?mode=new",className:"btn btn-primary",children:e("recentOrders.empty.cta")})]})]})]})})]})},dl=({children:t})=>{const{isAuthenticated:e,user:r}=$r();return e?(r==null?void 0:r.role)!=="ADMIN"?o.jsx(lo,{to:"/dashboard",replace:!0}):o.jsx(o.Fragment,{children:t}):o.jsx(lo,{to:"/login",replace:!0})},pve=new N$({defaultOptions:{queries:{refetchOnWindowFocus:!1,retry:1}}}),j9=()=>{try{const t=sessionStorage.getItem("sc_oauth_next");if(t&&t.startsWith("/oauth/authorize"))return sessionStorage.removeItem("sc_oauth_next"),t}catch{}return null},si=({children:t})=>{const{isAuthenticated:e}=$r();if(!e)return o.jsx(lo,{to:"/login",replace:!0});const r=j9();return r?o.jsx(lo,{to:r,replace:!0}):o.jsx(o.Fragment,{children:t})},vz=({children:t})=>{const{isAuthenticated:e,user:r}=$r();if(e){const n=new URLSearchParams(window.location.search).get("next");if(n&&n.startsWith("/")&&!n.startsWith("//"))return o.jsx(lo,{to:n,replace:!0});const s=j9();return s?o.jsx(lo,{to:s,replace:!0}):(r==null?void 0:r.role)==="ADMIN"?o.jsx(lo,{to:"/admin",replace:!0}):o.jsx(lo,{to:"/dashboard",replace:!0})}return o.jsx(o.Fragment,{children:t})};function fve(){return o.jsx(D$,{children:o.jsx(RW,{children:o.jsx(C$,{client:pve,children:o.jsx(TI,{children:o.jsxs(QB,{children:[o.jsx(IW,{}),o.jsx(tQ,{children:o.jsxs(HB,{children:[o.jsx(ct,{path:"/",element:o.jsx(v1e,{})}),o.jsx(ct,{path:"/ai-copywriter",element:o.jsx(a1e,{})}),o.jsx(ct,{path:"/ai-generator-opisow-produktow",element:o.jsx(zE,{})}),o.jsx(ct,{path:"/ai-product-description-generator",element:o.jsx(zE,{})}),o.jsx(ct,{path:"/ai-seo-writer",element:o.jsx(RA,{})}),o.jsx(ct,{path:"/ai-seo-content-writer",element:o.jsx(RA,{})}),o.jsx(ct,{path:"/blog",element:o.jsx(Vae,{})}),o.jsx(ct,{path:"/blog/:slug",element:o.jsx(qae,{})}),o.jsx(ct,{path:"/register",element:o.jsx(vz,{children:o.jsx(Cke,{})})}),o.jsx(ct,{path:"/login",element:o.jsx(vz,{children:o.jsx(Tke,{})})}),o.jsx(ct,{path:"/verify",element:o.jsx(ove,{})}),o.jsx(ct,{path:"/forgot-password",element:o.jsx(cve,{})}),o.jsx(ct,{path:"/reset-password",element:o.jsx(dve,{})}),o.jsx(ct,{path:"/dashboard",element:o.jsx(si,{children:o.jsx(hve,{})})}),o.jsx(ct,{path:"/orders",element:o.jsx(si,{children:o.jsx(Dke,{})})}),o.jsx(ct,{path:"/orders/:id",element:o.jsx(si,{children:o.jsx(r1e,{})})}),o.jsx(ct,{path:"/autoblog",element:o.jsx(si,{children:o.jsx(Uke,{})})}),o.jsx(ct,{path:"/bulk",element:o.jsx(si,{children:o.jsx(Vke,{})})}),o.jsx(ct,{path:"/settings",element:o.jsx(si,{children:o.jsx(Hke,{})})}),o.jsx(ct,{path:"/developers",element:o.jsx(si,{children:o.jsx(Xke,{})})}),o.jsx(ct,{path:"/connections",element:o.jsx(si,{children:o.jsx(sve,{})})}),o.jsx(ct,{path:"/oauth/authorize",element:o.jsx(ive,{})}),o.jsx(ct,{path:"/deposit",element:o.jsx(si,{children:o.jsx(n1e,{})})}),o.jsx(ct,{path:"/admin",element:o.jsx(dl,{children:o.jsx(h1e,{})})}),o.jsx(ct,{path:"/admin/users",element:o.jsx(dl,{children:o.jsx(p1e,{})})}),o.jsx(ct,{path:"/admin/blog",element:o.jsx(dl,{children:o.jsx(Kae,{})})}),o.jsx(ct,{path:"/admin/blog/:id/edit",element:o.jsx(dl,{children:o.jsx(AE,{})})}),o.jsx(ct,{path:"/admin/blog/new",element:o.jsx(dl,{children:o.jsx(AE,{})})}),o.jsx(ct,{path:"/admin/orders",element:o.jsx(si,{children:o.jsx(x1e,{})})}),o.jsx(ct,{path:"/admin/orders/:id",element:o.jsx(dl,{children:o.jsx(m1e,{})})}),o.jsx(ct,{path:"/admin/texts/:id",element:o.jsx(dl,{children:o.jsx(g1e,{})})}),o.jsx(ct,{path:"*",element:o.jsx(Hae,{})})]})}),o.jsx(CU,{position:"top-right",toastOptions:{duration:4e3,style:{background:"#363636",color:"#fff"},success:{iconTheme:{primary:"#10b981",secondary:"#fff"}},error:{iconTheme:{primary:"#ef4444",secondary:"#fff"}}}}),o.jsx(YX,{})]})})})})})}U2().catch(console.error);Y1.createRoot(document.getElementById("root")).render(o.jsx(ut.StrictMode,{children:o.jsx(fve,{})}));

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