vendor: 5,005 bytes, lines 1-2
1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/B3SyncPage-D3aW1iIO.js","assets/B3SyncPage-CafbhyRR.css","assets/TradesPage-BIDTvZS2.js","assets/TradesPage-CV23w4VT.css","assets/EarningsPage-D1LTzokk.js","assets/EarningsPage-B5NCr3JI.css","assets/PerformancePage-CytAnXj5.js","assets/PerformancePage-C1-11w9S.css","assets/TaxPage-BtPK3RmI.js","assets/TaxPage-Ba-2ZFet.css","assets/AnnualTaxAdjustmentPage-DdP5GVVr.js","assets/AnnualTaxAdjustmentPage-Dn_KTepx.css","assets/WatchlistPage-CZ-gfn4j.js","assets/WatchlistPage-DEjIQwgc.css","assets/GoalsPage-DHl425qb.js","assets/GoalsPage-D7xcKVz9.css","assets/CommunityPage-B53M-UOf.js","assets/CommunityPostCard-JtlTqFWx.js","assets/CommunityPostCard-DpoQwCZB.css","assets/CommunityPage-B1Lvh8ty.css","assets/CommunityProfilePage-CrjGKi1P.js","assets/CommunityProfilePage-i2g-tAvG.css","assets/OpportunitiesPage-CeAub6Hs.js","assets/OpportunitiesPage-DL-Im-40.css","assets/ForgotPasswordPage-D0yuZvIj.js","assets/ForgotPasswordPage-BYvlSUYQ.css","assets/ResetPasswordPage-CjBCbK0h.js","assets/ResetPasswordPage-DTK7EADy.css","assets/MyAccountPage-D5TaAajb.js","assets/MyAccountPage-DiM4pa5q.css","assets/MyAccountPlansPage-BWVRyF4J.js","assets/MyAccountPlansPage-BVcLwTGF.css","assets/CoursesPage-Beje5hVn.js","assets/lodash-CEISPk8X.js","assets/CoursesPage-clUecLK7.css","assets/CourseDetailPage-_jY2Q8m9.js","assets/CourseDetailPage-GnzM3A8A.css","assets/MyCoursesPage-D6RZ_4Wj.js","assets/MyCoursesPage-Dy8U6bgi.css","assets/CourseLessonPage-Bv6hj87X.js","assets/CourseLessonPage-CFCLqXcu.css","assets/CertificatesPage-C-9V50dS.js","assets/CertificatesPage-C5ttMIWd.css","assets/AchievementsPage-BGqPdi-7.js","assets/AchievementsPage-D4vKSboB.css","assets/AdminUsersPage-8G_ZBkPt.js","assets/AdminUsersPage-BHSrWg1k.css","assets/AdminWhatsappPage-BmFDHxaR.js","assets/AdminWhatsappPage-B1AwgzES.css","assets/AdminHelpdeskPage-DJ6nXo0d.js","assets/AdminHelpdeskPage-CPfyGjy4.css","assets/AdminCoursesPage-Cd3nb2k2.js","assets/AdminCoursesPage-zucIe3Om.css","assets/AdminCourseCreatePage-BcRj-X5I.js","assets/ckeditor-B-JGF9lD.js","assets/AdminCourseCreatePage-zk3OUIN4.css","assets/AdminCourseEditPage-CsgacHBm.js","assets/AdminCourseEditPage-BqXtynei.css","assets/AdminCourseDetailPage-CICXDlu-.js","assets/AdminCourseDetailPage-CsbsO7Tq.css","assets/AdminCourseModulesPage-BtM6iAHc.js","assets/AdminCourseModulesPage-ChWMVkDj.css","assets/AdminCourseStatsPage-CH8tyunS.js","assets/AdminCourseStatsPage-D_ILyJri.css","assets/AdminCommentsPage-C2iCN3SL.js","assets/AdminCommentsPage-Cj2M865q.css","assets/AdminLessonCreatePage-DpB8g1e4.js","assets/AdminLessonCreatePage-BE-eaHmS.css","assets/AdminLessonEditPage-Cb2q-FC6.js","assets/AdminLessonEditPage-B_9btw06.css","assets/AdminModuleDetailPage-LIa7zts-.js","assets/AdminModuleDetailPage-C2HDp5Ry.css","assets/AdminCourseEnrollmentsPage-DaYoM_zF.js","assets/AdminCourseEnrollmentsPage-CEO3s4Td.css","assets/AdminNewsletterPage-CqB9yMwf.js","assets/newsletterStore-ZYV-D9I1.js","assets/AdminNewsletterPage-B5qXWltw.css","assets/AdminNewsletterCampaignCreatePage-BoyFK_XV.js","assets/RichTextEditor-pJmIaDaa.js","assets/AdminNewsletterCampaignCreatePage-CZl7rmsW.css","assets/AdminNewsletterCampaignEditPage-BIiy4G2p.js","assets/AdminNewsletterCampaignEditPage-Mf47w6BZ.css","assets/AdminNewsletterContactCreatePage-C-qEOzlJ.js"])))=>i.map(i=>d[i]); 2const UN="modulepreload",jN=function(t){return"/build/"+t},uE={},cs=function(e,s,n){let i=Promise.resolve();if(s&&s.length>0){let r=function(f){return Promise.all(f.map(v=>Promise.resolve(v).then(g=>({status:"fulfilled",value:g}),g=>({status:"rejected",reason:g}))))};document.getElementsByTagName("link");const c=document.querySelector("meta[property=csp-nonce]"),h=(c==null?void 0:c.nonce)||(c==null?void 0:c.getAttribute("nonce"));i=r(s.map(f=>{if(f=jN(f),f in uE)return;uE[f]=!0;const v=f.endsWith(".css"),g=v?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${f}"]${g}`))return;const y=document.createElement("link");if(y.rel=v?"stylesheet":UN,v||(y.as="script"),y.crossOrigin="",y.href=f,h&&y.setAttribute("nonce",h),document.head.appendChild(y),v)return new Promise((x,E)=>{y.addEventListener("load",x),y.addEventListener("error",()=>E(new Error(`Unable to preload CSS for ${f}`)))})}))}function o(r){const c=new Event("vite:preloadError",{cancelable:!0});if(c.payload=r,window.dispatchEvent(c),!c.defaultPrevented)throw r}return i.then(r=>{for(const c of r||[])c.status==="rejected"&&o(c.reason);return e().catch(o)})};function WC(t,e){return function(){return t.apply(e,arguments)}}const{toString:HN}=Object.prototype,{getPrototypeOf:A1}=Object,{iterator:Ag,toStringTag:zC}=Symbol,Og=(t=>e=>{const s=HN.call(e);return t[s]||(t[s]=s.slice(8,-1).toLowerCase())})(Object.create(null)),ha=t=>(t=t.toLowerCase(),e=>Og(e)===t),Dg=t=>e=>typeof e===t,{isArray:dd}=Array,Hc=Dg("undefined");function lf(t){return t!==null&&!Hc(t)&&t.constructor!==null&&!Hc(t.constructor)&&or(t.constructor.isBuffer)&&t.constructor.isBuffer(t)}
vendor: 4,785 bytes, line 2
2const YC=ha("ArrayBuffer");function WN(t){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(t):e=t&&t.buffer&&YC(t.buffer),e}const zN=Dg("string"),or=Dg("function"),qC=Dg("number"),uf=t=>t!==null&&typeof t=="object",YN=t=>t===!0||t===!1,pm=t=>{if(Og(t)!=="object")return!1;const e=A1(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(zC in t)&&!(Ag in t)},qN=t=>{if(!uf(t)||lf(t))return!1;try{return Object.keys(t).length===0&&Object.getPrototypeOf(t)===Object.prototype}catch{return!1}},GN=ha("Date"),XN=ha("File"),KN=ha("Blob"),JN=ha("FileList"),QN=t=>uf(t)&&or(t.pipe),ZN=t=>{let e;return t&&(typeof FormData=="function"&&t instanceof FormData||or(t.append)&&((e=Og(t))==="formdata"||e==="object"&&or(t.toString)&&t.toString()==="[object FormData]"))},eL=ha("URLSearchParams"),[tL,sL,nL,iL]=["ReadableStream","Request","Response","Headers"].map(ha),rL=t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function cf(t,e,{allOwnKeys:s=!1}={}){if(t===null||typeof t>"u")return;let n,i;if(typeof t!="object"&&(t=[t]),dd(t))for(n=0,i=t.length;n<i;n++)e.call(null,t[n],n,t);else{if(lf(t))return;const o=s?Object.getOwnPropertyNames(t):Object.keys(t),r=o.length;let c;for(n=0;n<r;n++)c=o[n],e.call(null,t[c],c,t)}}function GC(t,e){if(lf(t))return null;e=e.toLowerCase();const s=Object.keys(t);let n=s.length,i;for(;n-- >0;)if(i=s[n],e===i.toLowerCase())return i;return null}const nu=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,XC=t=>!Hc(t)&&t!==nu;function E0(){const{caseless:t,skipUndefined:e}=XC(this)&&this||{},s={},n=(i,o)=>{const r=t&&GC(s,o)||o;pm(s[r])&&pm(i)?s[r]=E0(s[r],i):pm(i)?s[r]=E0({},i):dd(i)?s[r]=i.slice():(!e||!Hc(i))&&(s[r]=i)};for(let i=0,o=arguments.length;i<o;i++)arguments[i]&&cf(arguments[i],n);return s}const aL=(t,e,s,{allOwnKeys:n}={})=>(cf(e,(i,o)=>{s&&or(i)?t[o]=WC(i,s):t[o]=i},{allOwnKeys:n}),t),oL=t=>(t.charCodeAt(0)===65279&&(t=t.slice(1)),t),lL=(t,e,s,n)=>{t.prototype=Object.create(e.prototype,n),t.prototype.constructor=t,Object.defineProperty(t,"super",{value:e.prototype}),s&&Object.assign(t.prototype,s)},uL=(t,e,s,n)=>{let i,o,r;const c={};if(e=e||{},t==null)return e;do{for(i=Object.getOwnPropertyNames(t),o=i.length;o-- >0;)r=i[o],(!n||n(r,t,e))&&!c[r]&&(e[r]=t[r],c[r]=!0);t=s!==!1&&A1(t)}while(t&&(!s||s(t,e))&&t!==Object.prototype);return e},cL=(t,e,s)=>{t=String(t),(s===void 0||s>t.length)&&(s=t.length),s-=e.length;const n=t.indexOf(e,s);return n!==-1&&n===s},dL=t=>{if(!t)return null;if(dd(t))return t;let e=t.length;if(!qC(e))return null;const s=new Array(e);for(;e-- >0;)s[e]=t[e];return s},hL=(t=>e=>t&&e instanceof t)(typeof Uint8Array<"u"&&A1(Uint8Array)),fL=(t,e)=>{const n=(t&&t[Ag]).call(t);let i;for(;(i=n.next())&&!i.done;){const o=i.value;e.call(t,o[0],o[1])}},pL=(t,e)=>{let s;const n=[];for(;(s=t.exec(e))!==null;)n.push(s);return n},mL=ha("HTMLFormElement"),gL=t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(s,n,i){return n.toUpperCase()+i}),cE=(({hasOwnProperty:t})=>(e,s)=>t.call(e,s))(Object.prototype),vL=ha("RegExp"),KC=(t,e)=>{const s=Object.getOwnPropertyDescriptors(t),n={};cf(s,(i,o)=>{let r;(r=e(i,o,t))!==!1&&(n[o]=r||i)}),Object.defineProperties(t,n)},bL=t=>{KC(t,(e,s)=>{if(or(t)&&["arguments","caller","callee"].indexOf(s)!==-1)return!1;const n=t[s];if(or(n)){if(e.enumerable=!1,"writable"in e){e.writable=!1;return}e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+s+"'")})}})},yL=(t,e)=>{const s={},n=i=>{i.forEach(o=>{s[o]=!0})};return dd(t)?n(t):n(String(t).split(e)),s},_L=()=>{},xL=(t,e)=>t!=null&&Number.isFinite(t=+t)?t:e;function wL(t){return!!(t&&or(t.append)&&t[zC]==="FormData"&&t[Ag])}const EL=t=>{const e=new Array(10),s=(n,i)=>{if(uf(n)){if(e.indexOf(n)>=0)return;if(lf(n))return n;if(!("toJSON"in n)){e[i]=n;const o=dd(n)?[]:{};return cf(n,(r,c)=>{const h=s(r,i+1);!Hc(h)&&(o[c]=h)}),e[i]=void 0,o}}return n};return s(t,0)},SL=ha("AsyncFunction"),kL=t=>t&&(uf(t)||or(t))&&or(t.then)&&or(t.catch),JC=((t,e)=>t?setImmediate:e?((s,n)=>(nu.addEventListener("message",({source:i,data:o})=>{i===nu&&o===s&&n.length&&n.shift()()},!1),i=>{n.push(i),nu.postMessage(s,"*")}))(`axios@${Math.random()}`,[]):s=>setTimeout(s))(typeof setImmediate=="function",or(nu.postMessage)),CL=typeof queueMicrotask<"u"?queueMicrotask.bind(nu):typeof process<"u"&&process.nextTick||JC,TL=t=>t!=null&&or(t[Ag]),st={isArray:dd,isArrayBuffer:YC,isBuffer:lf,isFormData:ZN,isArrayBufferView:WN,isString:zN,isNumber:qC,isBoolean:YN,isObject:uf,isPlainObject:pm,isEmptyObject:qN,isReadableStream:tL,isRequest:sL,isResponse:nL,isHeaders:iL,isUndefined:Hc,isDate:GN,isFile:XN,isBlob:KN,isRegExp:vL,isFunction:or,isStream:QN,isURLSearchParams:eL,isTypedArray:hL,isFileList:JN,forEac
vendor: 3,603 bytes, line 2
2h:cf,merge:E0,extend:aL,trim:rL,stripBOM:oL,inherits:lL,toFlatObject:uL,kindOf:Og,kindOfTest:ha,endsWith:cL,toArray:dL,forEachEntry:fL,matchAll:pL,isHTMLForm:mL,hasOwnProperty:cE,hasOwnProp:cE,reduceDescriptors:KC,freezeMethods:bL,toObjectSet:yL,toCamelCase:gL,noop:_L,toFiniteNumber:xL,findKey:GC,global:nu,isContextDefined:XC,isSpecCompliantForm:wL,toJSONObject:EL,isAsyncFn:SL,isThenable:kL,setImmediate:JC,asap:CL,isIterable:TL};function _s(t,e,s,n,i){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),s&&(this.config=s),n&&(this.request=n),i&&(this.response=i,this.status=i.status?i.status:null)}st.inherits(_s,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:st.toJSONObject(this.config),code:this.code,status:this.status}}});const QC=_s.prototype,ZC={};["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=>{ZC[t]={value:t}});Object.defineProperties(_s,ZC);Object.defineProperty(QC,"isAxiosError",{value:!0});_s.from=(t,e,s,n,i,o)=>{const r=Object.create(QC);st.toFlatObject(t,r,function(v){return v!==Error.prototype},f=>f!=="isAxiosError");const c=t&&t.message?t.message:"Error",h=e==null&&t?t.code:e;return _s.call(r,c,h,s,n,i),t&&r.cause==null&&Object.defineProperty(r,"cause",{value:t,configurable:!0}),r.name=t&&t.name||"Error",o&&Object.assign(r,o),r};const AL=null;function S0(t){return st.isPlainObject(t)||st.isArray(t)}function eT(t){return st.endsWith(t,"[]")?t.slice(0,-2):t}function dE(t,e,s){return t?t.concat(e).map(function(i,o){return i=eT(i),!s&&o?"["+i+"]":i}).join(s?".":""):e}function OL(t){return st.isArray(t)&&!t.some(S0)}const DL=st.toFlatObject(st,{},null,function(e){return/^is[A-Z]/.test(e)});function Pg(t,e,s){if(!st.isObject(t))throw new TypeError("target must be an object");e=e||new FormData,s=st.toFlatObject(s,{metaTokens:!0,dots:!1,indexes:!1},!1,function(P,I){return!st.isUndefined(I[P])});const n=s.metaTokens,i=s.visitor||v,o=s.dots,r=s.indexes,h=(s.Blob||typeof Blob<"u"&&Blob)&&st.isSpecCompliantForm(e);if(!st.isFunction(i))throw new TypeError("visitor must be a function");function f(E){if(E===null)return"";if(st.isDate(E))return E.toISOString();if(st.isBoolean(E))return E.toString();if(!h&&st.isBlob(E))throw new _s("Blob is not supported. Use a Buffer instead.");return st.isArrayBuffer(E)||st.isTypedArray(E)?h&&typeof Blob=="function"?new Blob([E]):Buffer.from(E):E}function v(E,P,I){let D=E;if(E&&!I&&typeof E=="object"){if(st.endsWith(P,"{}"))P=n?P:P.slice(0,-2),E=JSON.stringify(E);else if(st.isArray(E)&&OL(E)||(st.isFileList(E)||st.endsWith(P,"[]"))&&(D=st.toArray(E)))return P=eT(P),D.forEach(function(C,A){!(st.isUndefined(C)||C===null)&&e.append(r===!0?dE([P],A,o):r===null?P:P+"[]",f(C))}),!1}return S0(E)?!0:(e.append(dE(I,P,o),f(E)),!1)}const g=[],y=Object.assign(DL,{defaultVisitor:v,convertValue:f,isVisitable:S0});function x(E,P){if(!st.isUndefined(E)){if(g.indexOf(E)!==-1)throw Error("Circular reference detected in "+P.join("."));g.push(E),st.forEach(E,function(D,F){(!(st.isUndefined(D)||D===null)&&i.call(e,D,st.isString(F)?F.trim():F,P,y))===!0&&x(D,P?P.concat(F):[F])}),g.pop()}}if(!st.isObject(t))throw new TypeError("data must be an object");return x(t),e}
vendor: 3,199 bytes, line 2
2function hE(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,function(n){return e[n]})}function O1(t,e){this._pairs=[],t&&Pg(t,this,e)}const tT=O1.prototype;tT.append=function(e,s){this._pairs.push([e,s])};tT.toString=function(e){const s=e?function(n){return e.call(this,n,hE)}:hE;return this._pairs.map(function(i){return s(i[0])+"="+s(i[1])},"").join("&")};function PL(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function sT(t,e,s){if(!e)return t;const n=s&&s.encode||PL;st.isFunction(s)&&(s={serialize:s});const i=s&&s.serialize;let o;if(i?o=i(e,s):o=st.isURLSearchParams(e)?e.toString():new O1(e,s).toString(n),o){const r=t.indexOf("#");r!==-1&&(t=t.slice(0,r)),t+=(t.indexOf("?")===-1?"?":"&")+o}return t}class fE{constructor(){this.handlers=[]}use(e,s,n){return this.handlers.push({fulfilled:e,rejected:s,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){st.forEach(this.handlers,function(n){n!==null&&e(n)})}}const nT={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},$L=typeof URLSearchParams<"u"?URLSearchParams:O1,IL=typeof FormData<"u"?FormData:null,ML=typeof Blob<"u"?Blob:null,NL={isBrowser:!0,classes:{URLSearchParams:$L,FormData:IL,Blob:ML},protocols:["http","https","file","blob","url","data"]},D1=typeof window<"u"&&typeof document<"u",k0=typeof navigator=="object"&&navigator||void 0,LL=D1&&(!k0||["ReactNative","NativeScript","NS"].indexOf(k0.product)<0),RL=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",FL=D1&&window.location.href||"http://localhost",VL=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:D1,hasStandardBrowserEnv:LL,hasStandardBrowserWebWorkerEnv:RL,navigator:k0,origin:FL},Symbol.toStringTag,{value:"Module"})),Ci={...VL,...NL};function BL(t,e){return Pg(t,new Ci.classes.URLSearchParams,{visitor:function(s,n,i,o){return Ci.isNode&&st.isBuffer(s)?(this.append(n,s.toString("base64")),!1):o.defaultVisitor.apply(this,arguments)},...e})}function UL(t){return st.matchAll(/\w+|\[(\w*)]/g,t).map(e=>e[0]==="[]"?"":e[1]||e[0])}function jL(t){const e={},s=Object.keys(t);let n;const i=s.length;let o;for(n=0;n<i;n++)o=s[n],e[o]=t[o];return e}function iT(t){function e(s,n,i,o){let r=s[o++];if(r==="__proto__")return!0;const c=Number.isFinite(+r),h=o>=s.length;return r=!r&&st.isArray(i)?i.length:r,h?(st.hasOwnProp(i,r)?i[r]=[i[r],n]:i[r]=n,!c):((!i[r]||!st.isObject(i[r]))&&(i[r]=[]),e(s,n,i[r],o)&&st.isArray(i[r])&&(i[r]=jL(i[r])),!c)}if(st.isFormData(t)&&st.isFunction(t.entries)){const s={};return st.forEachEntry(t,(n,i)=>{e(UL(n),i,s,0)}),s}return null}function HL(t,e,s){if(st.isString(t))try{return(e||JSON.parse)(t),st.trim(t)}catch(n){if(n.name!=="SyntaxError")throw n}return(s||JSON.stringify)(t)}const df={transitional:nT,adapter:["xhr","http","fetch"],transformRequest:[function(e,s){const n=s.getContentType()||"",i=n.indexOf("application/json")>-1,o=st.isObject(e);
vendor: 4,890 bytes, lines 2-4
2if(o&&st.isHTMLForm(e)&&(e=new FormData(e)),st.isFormData(e))return i?JSON.stringify(iT(e)):e;if(st.isArrayBuffer(e)||st.isBuffer(e)||st.isStream(e)||st.isFile(e)||st.isBlob(e)||st.isReadableStream(e))return e;if(st.isArrayBufferView(e))return e.buffer;if(st.isURLSearchParams(e))return s.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let c;if(o){if(n.indexOf("application/x-www-form-urlencoded")>-1)return BL(e,this.formSerializer).toString();if((c=st.isFileList(e))||n.indexOf("multipart/form-data")>-1){const h=this.env&&this.env.FormData;return Pg(c?{"files[]":e}:e,h&&new h,this.formSerializer)}}return o||i?(s.setContentType("application/json",!1),HL(e)):e}],transformResponse:[function(e){const s=this.transitional||df.transitional,n=s&&s.forcedJSONParsing,i=this.responseType==="json";if(st.isResponse(e)||st.isReadableStream(e))return e;if(e&&st.isString(e)&&(n&&!this.responseType||i)){const r=!(s&&s.silentJSONParsing)&&i;try{return JSON.parse(e,this.parseReviver)}catch(c){if(r)throw c.name==="SyntaxError"?_s.from(c,_s.ERR_BAD_RESPONSE,this,null,this.response):c}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Ci.classes.FormData,Blob:Ci.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};st.forEach(["delete","get","head","post","put","patch"],t=>{df.headers[t]={}});const WL=st.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"]),zL=t=>{const e={};let s,n,i;return t&&t.split(` 3`).forEach(function(r){i=r.indexOf(":"),s=r.substring(0,i).trim().toLowerCase(),n=r.substring(i+1).trim(),!(!s||e[s]&&WL[s])&&(s==="set-cookie"?e[s]?e[s].push(n):e[s]=[n]:e[s]=e[s]?e[s]+", "+n:n)}),e},pE=Symbol("internals");function eh(t){return t&&String(t).trim().toLowerCase()}function mm(t){return t===!1||t==null?t:st.isArray(t)?t.map(mm):String(t)}function YL(t){const e=Object.create(null),s=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let n;for(;n=s.exec(t);)e[n[1]]=n[2];return e}const qL=t=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());function Jb(t,e,s,n,i){if(st.isFunction(n))return n.call(this,e,s);if(i&&(e=s),!!st.isString(e)){if(st.isString(n))return e.indexOf(n)!==-1;if(st.isRegExp(n))return n.test(e)}}function GL(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,s,n)=>s.toUpperCase()+n)}function XL(t,e){const s=st.toCamelCase(" "+e);["get","set","has"].forEach(n=>{Object.defineProperty(t,n+s,{value:function(i,o,r){return this[n].call(this,e,i,o,r)},configurable:!0})})}let lr=class{constructor(e){e&&this.set(e)}set(e,s,n){const i=this;function o(c,h,f){const v=eh(h);if(!v)throw new Error("header name must be a non-empty string");const g=st.findKey(i,v);(!g||i[g]===void 0||f===!0||f===void 0&&i[g]!==!1)&&(i[g||h]=mm(c))}const r=(c,h)=>st.forEach(c,(f,v)=>o(f,v,h));if(st.isPlainObject(e)||e instanceof this.constructor)r(e,s);else if(st.isString(e)&&(e=e.trim())&&!qL(e))r(zL(e),s);else if(st.isObject(e)&&st.isIterable(e)){let c={},h,f;for(const v of e){if(!st.isArray(v))throw TypeError("Object iterator must return a key-value pair");c[f=v[0]]=(h=c[f])?st.isArray(h)?[...h,v[1]]:[h,v[1]]:v[1]}r(c,s)}else e!=null&&o(s,e,n);return this}get(e,s){if(e=eh(e),e){const n=st.findKey(this,e);if(n){const i=this[n];if(!s)return i;if(s===!0)return YL(i);if(st.isFunction(s))return s.call(this,i,n);if(st.isRegExp(s))return s.exec(i);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,s){if(e=eh(e),e){const n=st.findKey(this,e);return!!(n&&this[n]!==void 0&&(!s||Jb(this,this[n],n,s)))}return!1}delete(e,s){const n=this;let i=!1;function o(r){if(r=eh(r),r){const c=st.findKey(n,r);c&&(!s||Jb(n,n[c],c,s))&&(delete n[c],i=!0)}}return st.isArray(e)?e.forEach(o):o(e),i}clear(e){const s=Object.keys(this);let n=s.length,i=!1;for(;n--;){const o=s[n];(!e||Jb(this,this[o],o,e,!0))&&(delete this[o],i=!0)}return i}normalize(e){const s=this,n={};return st.forEach(this,(i,o)=>{const r=st.findKey(n,o);if(r){s[r]=mm(i),delete s[o];return}const c=e?GL(o):String(o).trim();c!==o&&delete s[o],s[c]=mm(i),n[c]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const s=Object.create(null);return st.forEach(this,(n,i)=>{n!=null&&n!==!1&&(s[i]=e&&st.isArray(n)?n.join(", "):n)}),s}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,s])=>e+": "+s).join(` 4`)}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,...s){const n=new this(e);
vendor: 8,271 bytes, line 4
4return s.forEach(i=>n.set(i)),n}static accessor(e){const n=(this[pE]=this[pE]={accessors:{}}).accessors,i=this.prototype;function o(r){const c=eh(r);n[c]||(XL(i,r),n[c]=!0)}return st.isArray(e)?e.forEach(o):o(e),this}};lr.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);st.reduceDescriptors(lr.prototype,({value:t},e)=>{let s=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(n){this[s]=n}}});st.freezeMethods(lr);function Qb(t,e){const s=this||df,n=e||s,i=lr.from(n.headers);let o=n.data;return st.forEach(t,function(c){o=c.call(s,o,i.normalize(),e?e.status:void 0)}),i.normalize(),o}function rT(t){return!!(t&&t.__CANCEL__)}function hd(t,e,s){_s.call(this,t??"canceled",_s.ERR_CANCELED,e,s),this.name="CanceledError"}st.inherits(hd,_s,{__CANCEL__:!0});function aT(t,e,s){const n=s.config.validateStatus;!s.status||!n||n(s.status)?t(s):e(new _s("Request failed with status code "+s.status,[_s.ERR_BAD_REQUEST,_s.ERR_BAD_RESPONSE][Math.floor(s.status/100)-4],s.config,s.request,s))}function KL(t){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}function JL(t,e){t=t||10;const s=new Array(t),n=new Array(t);let i=0,o=0,r;return e=e!==void 0?e:1e3,function(h){const f=Date.now(),v=n[o];r||(r=f),s[i]=h,n[i]=f;let g=o,y=0;for(;g!==i;)y+=s[g++],g=g%t;if(i=(i+1)%t,i===o&&(o=(o+1)%t),f-r<e)return;const x=v&&f-v;return x?Math.round(y*1e3/x):void 0}}function QL(t,e){let s=0,n=1e3/e,i,o;const r=(f,v=Date.now())=>{s=v,i=null,o&&(clearTimeout(o),o=null),t(...f)};return[(...f)=>{const v=Date.now(),g=v-s;g>=n?r(f,v):(i=f,o||(o=setTimeout(()=>{o=null,r(i)},n-g)))},()=>i&&r(i)]}const Vm=(t,e,s=3)=>{let n=0;const i=JL(50,250);return QL(o=>{const r=o.loaded,c=o.lengthComputable?o.total:void 0,h=r-n,f=i(h),v=r<=c;n=r;const g={loaded:r,total:c,progress:c?r/c:void 0,bytes:h,rate:f||void 0,estimated:f&&c&&v?(c-r)/f:void 0,event:o,lengthComputable:c!=null,[e?"download":"upload"]:!0};t(g)},s)},mE=(t,e)=>{const s=t!=null;return[n=>e[0]({lengthComputable:s,total:t,loaded:n}),e[1]]},gE=t=>(...e)=>st.asap(()=>t(...e)),ZL=Ci.hasStandardBrowserEnv?((t,e)=>s=>(s=new URL(s,Ci.origin),t.protocol===s.protocol&&t.host===s.host&&(e||t.port===s.port)))(new URL(Ci.origin),Ci.navigator&&/(msie|trident)/i.test(Ci.navigator.userAgent)):()=>!0,eR=Ci.hasStandardBrowserEnv?{write(t,e,s,n,i,o,r){if(typeof document>"u")return;const c=[`${t}=${encodeURIComponent(e)}`];st.isNumber(s)&&c.push(`expires=${new Date(s).toUTCString()}`),st.isString(n)&&c.push(`path=${n}`),st.isString(i)&&c.push(`domain=${i}`),o===!0&&c.push("secure"),st.isString(r)&&c.push(`SameSite=${r}`),document.cookie=c.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 tR(t){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}function sR(t,e){return e?t.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):t}function oT(t,e,s){let n=!tR(e);return t&&(n||s==!1)?sR(t,e):e}const vE=t=>t instanceof lr?{...t}:t;function Su(t,e){e=e||{};const s={};function n(f,v,g,y){return st.isPlainObject(f)&&st.isPlainObject(v)?st.merge.call({caseless:y},f,v):st.isPlainObject(v)?st.merge({},v):st.isArray(v)?v.slice():v}function i(f,v,g,y){if(st.isUndefined(v)){if(!st.isUndefined(f))return n(void 0,f,g,y)}else return n(f,v,g,y)}function o(f,v){if(!st.isUndefined(v))return n(void 0,v)}function r(f,v){if(st.isUndefined(v)){if(!st.isUndefined(f))return n(void 0,f)}else return n(void 0,v)}function c(f,v,g){if(g in e)return n(f,v);if(g in t)return n(void 0,f)}const h={url:o,method:o,data:o,baseURL:r,transformRequest:r,transformResponse:r,paramsSerializer:r,timeout:r,timeoutMessage:r,withCredentials:r,withXSRFToken:r,adapter:r,responseType:r,xsrfCookieName:r,xsrfHeaderName:r,onUploadProgress:r,onDownloadProgress:r,decompress:r,maxContentLength:r,maxBodyLength:r,beforeRedirect:r,transport:r,httpAgent:r,httpsAgent:r,cancelToken:r,socketPath:r,responseEncoding:r,validateStatus:c,headers:(f,v,g)=>i(vE(f),vE(v),g,!0)};return st.forEach(Object.keys({...t,...e}),function(v){const g=h[v]||i,y=g(t[v],e[v],v);st.isUndefined(y)&&g!==c||(s[v]=y)}),s}const lT=t=>{const e=Su({},t);let{data:s,withXSRFToken:n,xsrfHeaderName:i,xsrfCookieName:o,headers:r,auth:c}=e;if(e.headers=r=lr.from(r),e.url=sT(oT(e.baseURL,e.url,e.allowAbsoluteUrls),t.params,t.paramsSerializer),c&&r.set("Authorization","Basic "+btoa((c.username||"")+":"+(c.password?unescape(encodeURIComponent(c.password)):""))),st.isFormData(s)){if(Ci.hasStandardBrowserEnv||Ci.hasStandardBrowserWebWorkerEnv)r.setContentType(void 0);else if(st.isFunction(s.getHeaders)){const h=s.getHeaders(),f=["content-type","content-length"];Object.entries(h).forEach(([v,g])=>{f.includes(v.toLowerCase())&&r.set(v,g)})}}if(Ci.hasStandardBrowserEnv&&(n&&st.isFunction(n)&&(n=n(e)),n||n!==!1&&ZL(e.url))){const h=i&&o&&eR.read(o);h&&r.set(i,h)}return e},nR=typeof XMLHttpRequest<"u",iR=nR&&function(t){return new Promise(function(s,n){const i=lT(t);let o=i.data;const r=lr.from(i.headers).normalize();let{responseType:c,onUploadProgress:h,onDownloadProgress:f}=i,v,g,y,x,E;function P(){x&&x(),E&&E(),i.cancelToken&&i.cancelToken.unsubscribe(v),i.signal&&i.signal.removeEventListener("abort",v)}let I=new XMLHttpRequest;I.open(i.method.toUpperCase(),i.url,!0),I.timeout=i.timeout;function D(){if(!I)return;const C=lr.from("getAllResponseHeaders"in I&&I.getAllResponseHeaders()),O={data:!c||c==="text"||c==="json"?I.responseText:I.response,status:I.status,statusText:I.statusText,headers:C,config:t,request:I};aT(function(te){s(te),P()},function(te){n(te),P()},O),I=null}"onloadend"in I?I.onloadend=D:I.onreadystatechange=function(){!I||I.readyState!==4||I.status===0&&!(I.responseURL&&I.responseURL.indexOf("file:")===0)||setTimeout(D)},I.onabort=function(){I&&(n(new _s("Request aborted",_s.ECONNABORTED,t,I)),I=null)},I.onerror=function(A){const O=A&&A.message?A.message:"Network Error",j=new _s(O,_s.ERR_NETWORK,t,I);j.event=A||null,n(j),I=null},I.ontimeout=function(){let A=i.timeout?"timeout of "+i.timeout+"ms exceeded":"timeout exceeded";const O=i.transitional||nT;i.timeoutErrorMessage&&(A=i.timeoutErrorMessage),n(new _s(A,O.clarifyTimeoutError?_s.ETIMEDOUT:_s.ECONNABORTED,t,I)),I=null},o===void 0&&r.setContentType(null),"setRequestHeader"in I&&st.forEach(r.toJSON(),function(A,O){I.setRequestHeader(O,A)}),st.isUndefined(i.withCredentials)||(I.withCredentials=!!i.withCredentials),c&&c!=="json"&&(I.responseType=i.responseType),f&&([y,E]=Vm(f,!0),I.addEventListener("progress",y)),h&&I.upload&&([g,x]=Vm(h),I.upload.addEventListener("progress",g),I.upload.addEventListener("loadend",x)),(i.cancelToken||i.signal)&&(v=C=>{I&&(n(!C||C.type?new hd(null,t,I):C),I.abort(),I=null)},i.cancelToken&&i.cancelToken.subscribe(v),i.signal&&(i.signal.aborted?v():i.signal.addEventListener("abort",v)));const F=KL(i.url);if(F&&Ci.protocols.indexOf(F)===-1){n(new _s("Unsupported protocol "+F+":",_s.ERR_BAD_REQUEST,t));return}I.send(o||null)})},rR=(t,e)=>{const{length:s}=t=t?t.filter(Boolean):[];if(e||s){let n=new AbortController,i;const o=function(f){if(!i){i=!0,c();const v=f instanceof Error?f:this.reason;n.abort(v instanceof _s?v:new hd(v instanceof Error?v.message:v))}};let r=e&&setTimeout(()=>{r=null,o(new _s(`timeout ${e} of ms exceeded`,_s.ETIMEDOUT))},e);const c=()=>{t&&(r&&clearTimeout(r),r=null,t.forEach(f=>{f.unsubscribe?f.unsubscribe(o):f.removeEventListener("abort",o)}),t=null)};t.forEach(f=>f.addEventListener("abort",o));const{signal:h}=n;return h.unsubscribe=()=>st.asap(c),h}},aR=function*(t,e){let s=t.byteLength;if(s<e){yield t;return}let n=0,i;for(;n<s;)i=n+e,yield t.slice(n,i),n=i},oR=async function*(t,e){for await(const s of lR(t))yield*aR(s,e)},lR=async function*(t){if(t[Symbol.asyncIterator]){yield*t;return}const e=t.getReader();try{for(;;){const{done:s,value:n}=await e.read();if(s)break;yield n}}finally{await e.cancel()}},bE=(t,e,s,n)=>{const i=oR(t,e);let o=0,r,c=h=>{r||(r=!0,n&&n(h))};return new ReadableStream({async pull(h){try{const{done:f,value:v}=await i.next();if(f){c(),h.close();return}let g=v.byteLength;if(s){let y=o+=g;s(y)}h.enqueue(new Uint8Array(v))}catch(f){throw c(f),f}}
vendor: 5,223 bytes, lines 4-6
4,cancel(h){return c(h),i.return()}},{highWaterMark:2})},yE=64*1024,{isFunction:Lp}=st,uR=(({Request:t,Response:e})=>({Request:t,Response:e}))(st.global),{ReadableStream:_E,TextEncoder:xE}=st.global,wE=(t,...e)=>{try{return!!t(...e)}catch{return!1}},cR=t=>{t=st.merge.call({skipUndefined:!0},uR,t);const{fetch:e,Request:s,Response:n}=t,i=e?Lp(e):typeof fetch=="function",o=Lp(s),r=Lp(n);if(!i)return!1;const c=i&&Lp(_E),h=i&&(typeof xE=="function"?(E=>P=>E.encode(P))(new xE):async E=>new Uint8Array(await new s(E).arrayBuffer())),f=o&&c&&wE(()=>{let E=!1;const P=new s(Ci.origin,{body:new _E,method:"POST",get duplex(){return E=!0,"half"}}).headers.has("Content-Type");return E&&!P}),v=r&&c&&wE(()=>st.isReadableStream(new n("").body)),g={stream:v&&(E=>E.body)};i&&["text","arrayBuffer","blob","formData","stream"].forEach(E=>{!g[E]&&(g[E]=(P,I)=>{let D=P&&P[E];if(D)return D.call(P);throw new _s(`Response type '${E}' is not supported`,_s.ERR_NOT_SUPPORT,I)})});const y=async E=>{if(E==null)return 0;if(st.isBlob(E))return E.size;if(st.isSpecCompliantForm(E))return(await new s(Ci.origin,{method:"POST",body:E}).arrayBuffer()).byteLength;if(st.isArrayBufferView(E)||st.isArrayBuffer(E))return E.byteLength;if(st.isURLSearchParams(E)&&(E=E+""),st.isString(E))return(await h(E)).byteLength},x=async(E,P)=>{const I=st.toFiniteNumber(E.getContentLength());return I??y(P)};return async E=>{let{url:P,method:I,data:D,signal:F,cancelToken:C,timeout:A,onDownloadProgress:O,onUploadProgress:j,responseType:te,headers:B,withCredentials:z="same-origin",fetchOptions:re}=lT(E),ne=e||fetch;te=te?(te+"").toLowerCase():"text";let X=rR([F,C&&C.toAbortSignal()],A),G=null;const ce=X&&X.unsubscribe&&(()=>{X.unsubscribe()});let be;try{if(j&&f&&I!=="get"&&I!=="head"&&(be=await x(B,D))!==0){let M=new s(P,{method:"POST",body:D,duplex:"half"}),he;if(st.isFormData(D)&&(he=M.headers.get("content-type"))&&B.setContentType(he),M.body){const[oe,K]=mE(be,Vm(gE(j)));D=bE(M.body,yE,oe,K)}}st.isString(z)||(z=z?"include":"omit");const J=o&&"credentials"in s.prototype,Z={...re,signal:X,method:I.toUpperCase(),headers:B.normalize().toJSON(),body:D,duplex:"half",credentials:J?z:void 0};G=o&&new s(P,Z);let ge=await(o?ne(G,re):ne(P,Z));const q=v&&(te==="stream"||te==="response");if(v&&(O||q&&ce)){const M={};["status","statusText","headers"].forEach(H=>{M[H]=ge[H]});const he=st.toFiniteNumber(ge.headers.get("content-length")),[oe,K]=O&&mE(he,Vm(gE(O),!0))||[];ge=new n(bE(ge.body,yE,oe,()=>{K&&K(),ce&&ce()}),M)}te=te||"text";let W=await g[st.findKey(g,te)||"text"](ge,E);return!q&&ce&&ce(),await new Promise((M,he)=>{aT(M,he,{data:W,headers:lr.from(ge.headers),status:ge.status,statusText:ge.statusText,config:E,request:G})})}catch(J){throw ce&&ce(),J&&J.name==="TypeError"&&/Load failed|fetch/i.test(J.message)?Object.assign(new _s("Network Error",_s.ERR_NETWORK,E,G),{cause:J.cause||J}):_s.from(J,J&&J.code,E,G)}}},dR=new Map,uT=t=>{let e=t&&t.env||{};const{fetch:s,Request:n,Response:i}=e,o=[n,i,s];let r=o.length,c=r,h,f,v=dR;for(;c--;)h=o[c],f=v.get(h),f===void 0&&v.set(h,f=c?new Map:cR(e)),v=f;return f};uT();const P1={http:AL,xhr:iR,fetch:{get:uT}};st.forEach(P1,(t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch{}Object.defineProperty(t,"adapterName",{value:e})}});const EE=t=>`- ${t}`,hR=t=>st.isFunction(t)||t===null||t===!1;function fR(t,e){t=st.isArray(t)?t:[t];const{length:s}=t;let n,i;const o={};for(let r=0;r<s;r++){n=t[r];let c;if(i=n,!hR(n)&&(i=P1[(c=String(n)).toLowerCase()],i===void 0))throw new _s(`Unknown adapter '${c}'`);if(i&&(st.isFunction(i)||(i=i.get(e))))break;o[c||"#"+r]=i}if(!i){const r=Object.entries(o).map(([h,f])=>`adapter ${h} `+(f===!1?"is not supported by the environment":"is not available in the build"));let c=s?r.length>1?`since : 5`+r.map(EE).join(` 6`):" "+EE(r[0]):"as no adapter specified";throw new _s("There is no suitable adapter to dispatch the request "+c,"ERR_NOT_SUPPORT")}return i}const cT={getAdapter:fR,adapters:P1};function Zb(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new hd(null,t)}function SE(t){return Zb(t),t.headers=lr.from(t.headers),t.data=Qb.call(t,t.transformRequest),["post","put","patch"].indexOf(t.method)!==-1&&t.headers.setContentType("application/x-www-form-urlencoded",!1),cT.getAdapter(t.adapter||df.adapter,t)(t).then(function(n){return Zb(t),n.data=Qb.call(t,t.transformResponse,n),n.headers=lr.from(n.headers),n},function(n){return rT(n)||(Zb(t),n&&n.response&&(n.response.data=Qb.call(t,t.transformResponse,n.response),n.response.headers=lr.from(n.response.headers))),Promise.reject(n)})}const dT="1.13.2",$g={};["object","boolean","number","function","string","symbol"].forEach((t,e)=>{$g[t]=function(n){return typeof n===t||"a"+(e<1?"n ":" ")+t}});const kE={};$g.transitional=function(e,s,n){function i(o,r){return"[Axios v"+dT+"] Transitional option '"+o+"'"+r+(n?". "+n:"")}return(o,r,c)=>{if(e===!1)throw new _s(i(r," has been removed"+(s?" in "+s:"")),_s.ERR_DEPRECATED);return s&&!kE[r]&&(kE[r]=!0,console.warn(i(r," has been deprecated since v"+s+" and will be removed in the near future"))),e?e(o,r,c):!0}};$g.spelling=function(e){return(s,n)=>(console.warn(`${n} is likely a misspelling of ${e}
6`),!0)};function pR(t,e,s){if(typeof t!="object")throw new _s("options must be an object",_s.ERR_BAD_OPTION_VALUE);const n=Object.keys(t);let i=n.length;for(;i-- >0;){const o=n[i],r=e[o];if(r){const c=t[o],h=c===void 0||r(c,o,t);if(h!==!0)throw new _s("option "+o+" must be "+h,_s.ERR_BAD_OPTION_VALUE);continue}if(s!==!0)throw new _s("Unknown option "+o,_s.ERR_BAD_OPTION)}}const gm={assertOptions:pR,validators:$g},ka=gm.validators;let hu=class{constructor(e){this.defaults=e||{},this.interceptors={request:new fE,response:new fE}}async request(e,s){try{return await this._request(e,s)}catch(n){if(n instanceof Error){let i={};Error.captureStackTrace?Error.captureStackTrace(i):i=new Error;const o=i.stack?i.stack.replace(/^.+\n/,""):"";try{n.stack?o&&!String(n.stack).endsWith(o.replace(/^.+\n.+\n/,""))&&(n.stack+=` 7`+o):n.stack=o}catch{}}throw n}}_request(e,s){typeof e=="string"?(s=s||{},s.url=e):s=e||{},s=Su(this.defaults,s);const{transitional:n,paramsSerializer:i,headers:o}=s;n!==void 0&&gm.assertOptions(n,{silentJSONParsing:ka.transitional(ka.boolean),forcedJSONParsing:ka.transitional(ka.boolean),clarifyTimeoutError:ka.transitional(ka.boolean)},!1),i!=null&&(st.isFunction(i)?s.paramsSerializer={serialize:i}:gm.assertOptions(i,{encode:ka.function,serialize:ka.function},!0)),s.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?s.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:s.allowAbsoluteUrls=!0),gm.assertOptions(s,{baseUrl:ka.spelling("baseURL"),withXsrfToken:ka.spelling("withXSRFToken")},!0),s.method=(s.method||this.defaults.method||"get").toLowerCase();let r=o&&st.merge(o.common,o[s.method]);o&&st.forEach(["delete","get","head","post","put","patch","common"],E=>{delete o[E]}),s.headers=lr.concat(r,o);const c=[];let h=!0;this.interceptors.request.forEach(function(P){typeof P.runWhen=="function"&&P.runWhen(s)===!1||(h=h&&P.synchronous,c.unshift(P.fulfilled,P.rejected))});const f=[];this.interceptors.response.forEach(function(P){f.push(P.fulfilled,P.rejected)});let v,g=0,y;if(!h){const E=[SE.bind(this),void 0];for(E.unshift(...c),E.push(...f),y=E.length,v=Promise.resolve(s);g<y;)v=v.then(E[g++],E[g++]);return v}y=c.length;let x=s;for(;g<y;){const E=c[g++],P=c[g++];try{x=E(x)}catch(I){P.call(this,I);break}}try{v=SE.call(this,x)}catch(E){return Promise.reject(E)}for(g=0,y=f.length;g<y;)v=v.then(f[g++],f[g++]);return v}getUri(e){e=Su(this.defaults,e);const s=oT(e.baseURL,e.url,e.allowAbsoluteUrls);return sT(s,e.params,e.paramsSerializer)}};st.forEach(["delete","get","head","options"],function(e){hu.prototype[e]=function(s,n){return this.request(Su(n||{},{method:e,url:s,data:(n||{}).data}))}});st.forEach(["post","put","patch"],function(e){function s(n){return function(o,r,c){return this.request(Su(c||{},{method:e,headers:n?{"Content-Type":"multipart/form-data"}:{},url:o,data:r}))}}hu.prototype[e]=s(),hu.prototype[e+"Form"]=s(!0)});let mR=class hT{constructor(e){if(typeof e!="function")throw new TypeError("executor must be a function.");let s;this.promise=new Promise(function(o){s=o});const n=this;this.promise.then(i=>{if(!n._listeners)return;let o=n._listeners.length;for(;o-- >0;)n._listeners[o](i);n._listeners=null}),this.promise.then=i=>{let o;const r=new Promise(c=>{n.subscribe(c),o=c}).then(i);return r.cancel=function(){n.unsubscribe(o)},r},e(function(o,r,c){n.reason||(n.reason=new hd(o,r,c),s(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 s=this._listeners.indexOf(e);s!==-1&&this._listeners.splice(s,1)}toAbortSignal(){const e=new AbortController,s=n=>{e.abort(n)};return this.subscribe(s),e.signal.unsubscribe=()=>this.unsubscribe(s),e.signal}static source(){let e;return{token:new hT(function(i){e=i}),cancel:e}}};function gR(t){return function(s){return t.apply(null,s)}}function vR(t){return st.isObject(t)&&t.isAxiosError===!0}const C0={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,Re
7setContent: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(C0).forEach(([t,e])=>{C0[e]=t});function fT(t){const e=new hu(t),s=WC(hu.prototype.request,e);return st.extend(s,hu.prototype,e,{allOwnKeys:!0}),st.extend(s,e,null,{allOwnKeys:!0}),s.create=function(i){return fT(Su(t,i))},s}const $n=fT(df);$n.Axios=hu;$n.CanceledError=hd;$n.CancelToken=mR;$n.isCancel=rT;$n.VERSION=dT;$n.toFormData=Pg;$n.AxiosError=_s;$n.Cancel=$n.CanceledError;$n.all=function(e){return Promise.all(e)};$n.spread=gR;$n.isAxiosError=vR;$n.mergeConfig=Su;$n.AxiosHeaders=lr;$n.formToJSON=t=>iT(st.isHTMLForm(t)?new FormData(t):t);$n.getAdapter=cT.getAdapter;$n.HttpStatusCode=C0;$n.default=$n;const{Axios:vSe,AxiosError:bSe,CanceledError:ySe,isCancel:_Se,CancelToken:xSe,VERSION:wSe,all:ESe,Cancel:SSe,isAxiosError:kSe,spread:CSe,toFormData:TSe,AxiosHeaders:ASe,HttpStatusCode:OSe,formToJSON:DSe,getAdapter:PSe,mergeConfig:$Se}=$n;class $1{constructor(){this.notificationCreatedEvent=".Illuminate\\Notifications\\Events\\BroadcastNotificationCreated"}listenForWhisper(e,s){return this.listen(".client-"+e,s)}notification(e){return this.listen(this.notificationCreatedEvent,e)}stopListeningForNotification(e){return this.stopListening(this.notificationCreatedEvent,e)}stopListeningForWhisper(e,s){return this.stopListening(".client-"+e,s)}}class pT{constructor(e){this.namespace=e}format(e){return[".","\\"].includes(e.charAt(0))?e.substring(1):(this.namespace&&(e=this.namespace+"."+e),e.replace(/\./g,"\\"))}setNamespace(e){this.namespace=e}}function bR(t){try{return Reflect.construct(String,[],t),!0}catch{return!1}}class I1 extends $1{constructor(e,s,n){super(),this.name=s,this.pusher=e,this.options=n,this.eventFormatter=new pT(this.options.namespace),this.subscribe()}subscribe(){this.subscription=this.pusher.subscribe(this.name)}unsubscribe(){this.pusher.unsubscribe(this.name)}listen(e,s){return this.on(this.eventFormatter.format(e),s),this}listenToAll(e){return this.subscription.bind_global((s,n)=>{if(s.startsWith("pusher:"))return;let i=String(this.options.namespace??"").replace(/\./g,"\\"),o=s.startsWith(i)?s.substring(i.length+1):"."+s;e(o,n)}),this}stopListening(e,s){return s?this.subscription.unbind(this.eventFormatter.format(e),s):this.subscription.unbind(this.eventFormatter.format(e)),this}stopListeningToAll(e){return e?this.subscription.unbind_global(e):this.subscription.unbind_global(),this}subscribed(e){return this.on("pusher:subscription_succeeded",()=>{e()}),this}error(e){return this.on("pusher:subscription_error",s=>{e(s)}),this}on(e,s){return this.subscription.bind(e,s),this}}class mT extends I1{whisper(e,s){return this.pusher.channels.channels[this.name].trigger(`client-${e}`,s),this}}class yR extends I1{whisper(e,s){return this.pusher.channels.channels[this.name].trigger(`client-${e}`,s),this}}class _R extends mT{here(e){return this.on("pusher:subscription_succeeded",s=>{e(Object.keys(s.members).map(n=>s.members[n]))}),this}joining(e){return this.on("pusher:member_added",s=>{e(s.info)}),this}whisper(e,s){return this.pusher.channels.channels[this.name].trigger(`client-${e}`,s),this}leaving(e){return this.on("pusher:member_removed",s=>{e(s.info)}),this}}class gT extends $1{constructor(e,s,n){super(),this.events={},this.listeners={},this.name=s,this.socket=e,this.options=n,this.eventFormatter=new pT(this.options.namespace),this.subscribe()}subscribe(){this.socket.emit("subscribe",{channel:this.name,auth:this.options.auth||{}})}unsubscribe(){this.unbind(),this.socket.emit("unsubscribe",{channel:this.name,auth:this.options.auth||{}})}listen(e,s){return this.on(this.eventFormatter.format(e),s),this}stopListening(e,s){return this.unbindEvent(this.eventFormatter.format(e),s),this}subscribed(e){return this.on("connect",s=>{e(s)}),this}error(e){return this}on(e,s){return this.listeners[e]=this.listeners[e]||[],this.events[e]||(this.events[e]=(n,i)=>{this.name===n&&this.listeners[e]&&this.listeners[e].forEach(o=>o(i))},this.socket.on(e,this.events[e])),this.listeners[e].push(s),this}
7unbind(){Object.keys(this.events).forEach(e=>{this.unbindEvent(e)})}unbindEvent(e,s){this.listeners[e]=this.listeners[e]||[],s&&(this.listeners[e]=this.listeners[e].filter(n=>n!==s)),(!s||this.listeners[e].length===0)&&(this.events[e]&&(this.socket.removeListener(e,this.events[e]),delete this.events[e]),delete this.listeners[e])}}class vT extends gT{whisper(e,s){return this.socket.emit("client event",{channel:this.name,event:`client-${e}`,data:s}),this}}class xR extends vT{here(e){return this.on("presence:subscribed",s=>{e(s.map(n=>n.user_info))}),this}joining(e){return this.on("presence:joining",s=>e(s.user_info)),this}whisper(e,s){return this.socket.emit("client event",{channel:this.name,event:`client-${e}`,data:s}),this}leaving(e){return this.on("presence:leaving",s=>e(s.user_info)),this}}class Bm extends $1{subscribe(){}unsubscribe(){}listen(e,s){return this}listenToAll(e){return this}stopListening(e,s){return this}subscribed(e){return this}error(e){return this}on(e,s){return this}}class bT extends Bm{whisper(e,s){return this}}class wR extends Bm{whisper(e,s){return this}}class ER extends bT{here(e){return this}joining(e){return this}whisper(e,s){return this}leaving(e){return this}}const yT=class _T{constructor(e){this.setOptions(e),this.connect()}setOptions(e){this.options={..._T._defaultOptions,...e,broadcaster:e.broadcaster};let s=this.csrfToken();s&&(this.options.auth.headers["X-CSRF-TOKEN"]=s,this.options.userAuthentication.headers["X-CSRF-TOKEN"]=s),s=this.options.bearerToken,s&&(this.options.auth.headers.Authorization="Bearer "+s,this.options.userAuthentication.headers.Authorization="Bearer "+s)}csrfToken(){var e,s;return typeof window<"u"&&(e=window.Laravel)!=null&&e.csrfToken?window.Laravel.csrfToken:this.options.csrfToken?this.options.csrfToken:typeof document<"u"&&typeof document.querySelector=="function"?((s=document.querySelector('meta[name="csrf-token"]'))==null?void 0:s.getAttribute("content"))??null:null}};yT._defaultOptions={auth:{headers:{}},authEndpoint:"/broadcasting/auth",userAuthentication:{endpoint:"/broadcasting/user-auth",headers:{}},csrfToken:null,bearerToken:null,host:null,key:null,namespace:"App.Events"};let M1=yT;class Rp extends M1{constructor(){super(...arguments),this.channels={}}connect(){if(typeof this.options.client<"u")this.pusher=this.options.client;else if(this.options.Pusher)this.pusher=new this.options.Pusher(this.options.key,this.options);else if(typeof window<"u"&&typeof window.Pusher<"u")this.pusher=new window.Pusher(this.options.key,this.options);else throw new Error("Pusher client not found. Should be globally available or passed via options.client")}signin(){this.pusher.signin()}listen(e,s,n){return this.channel(e).listen(s,n)}channel(e){return this.channels[e]||(this.channels[e]=new I1(this.pusher,e,this.options)),this.channels[e]}privateChannel(e){return this.channels["private-"+e]||(this.channels["private-"+e]=new mT(this.pusher,"private-"+e,this.options)),this.channels["private-"+e]}encryptedPrivateChannel(e){return this.channels["private-encrypted-"+e]||(this.channels["private-encrypted-"+e]=new yR(this.pusher,"private-encrypted-"+e,this.options)),this.channels["private-encrypted-"+e]}presenceChannel(e){return this.channels["presence-"+e]||(this.channels["presence-"+e]=new _R(this.pusher,"presence-"+e,this.options)),this.channels["presence-"+e]}leave(e){[e,"private-"+e,"private-encrypted-"+e,"presence-"+e].forEach(s=>{this.leaveChannel(s)})}leaveChannel(e){this.channels[e]&&(this.channels[e].unsubscribe(),delete this.channels[e])}socketId(){return this.pusher.connection.socket_id}connectionStatus(){const e=this.pusher.connection.state;switch(e){case"connected":case"connecting":return e;case"failed":case"unavailable":return"failed";default:return"disconnected"}}onConnectionChange(e){const s=()=>{e(this.connectionStatus())},n=["state_change","connected","disconnected"];return n.forEach(i=>{this.pusher.connection.bind(i,s)}),()=>{n.forEach(i=>{this.pusher.connection.unbind(i,s)})}}disconnect(){this.pusher.disconnect()}}class SR extends M1{constructor(){super(...arguments),this.channels={}}connect(){let e=this.getSocketIO();this.socket=e(this.options.host??void 0,this.options),this.socket.io.on("reconnect",()=>
7{Object.values(this.channels).forEach(s=>{s.subscribe()})})}getSocketIO(){if(typeof this.options.client<"u")return this.options.client;if(typeof window<"u"&&typeof window.io<"u")return window.io;throw new Error("Socket.io client not found. Should be globally available or passed via options.client")}listen(e,s,n){return this.channel(e).listen(s,n)}channel(e){return this.channels[e]||(this.channels[e]=new gT(this.socket,e,this.options)),this.channels[e]}privateChannel(e){return this.channels["private-"+e]||(this.channels["private-"+e]=new vT(this.socket,"private-"+e,this.options)),this.channels["private-"+e]}presenceChannel(e){return this.channels["presence-"+e]||(this.channels["presence-"+e]=new xR(this.socket,"presence-"+e,this.options)),this.channels["presence-"+e]}leave(e){[e,"private-"+e,"presence-"+e].forEach(s=>{this.leaveChannel(s)})}leaveChannel(e){this.channels[e]&&(this.channels[e].unsubscribe(),delete this.channels[e])}socketId(){return this.socket.id}connectionStatus(){return this.socket.connected?"connected":this.socket.io._reconnecting?"reconnecting":this.socket.id!==void 0?"disconnected":"connecting"}onConnectionChange(e){const s=()=>{e(this.connectionStatus())},n=["connect","disconnect","connect_error","reconnect_attempt","reconnect","reconnect_error","reconnect_failed"];return n.forEach(i=>{this.socket.on(i,s)}),()=>{n.forEach(i=>{this.socket.off(i,s)})}}disconnect(){this.socket.disconnect()}}let CE=class extends M1{constructor(){super(...arguments),this.channels={}}connect(){}listen(e,s,n){return new Bm}channel(e){return new Bm}privateChannel(e){return new bT}encryptedPrivateChannel(e){return new wR}presenceChannel(e){return new ER}leave(e){}leaveChannel(e){}socketId(){return"fake-socket-id"}connectionStatus(){return"connected"}onConnectionChange(e){return()=>{}}disconnect(){}};class kR{constructor(e){this.options=e,this.connect(),this.options.withoutInterceptors||this.registerInterceptors()}channel(e){return this.connector.channel(e)}connect(){if(this.options.broadcaster==="reverb")this.connector=new Rp({...this.options,cluster:""});else if(this.options.broadcaster==="pusher")this.connector=new Rp(this.options);else if(this.options.broadcaster==="ably")this.connector=new Rp({...this.options,cluster:"",broadcaster:"pusher"});else if(this.options.broadcaster==="socket.io")this.connector=new SR(this.options);else if(this.options.broadcaster==="null")this.connector=new CE(this.options);else if(typeof this.options.broadcaster=="function"&&bR(this.options.broadcaster))this.connector=new this.options.broadcaster(this.options);else throw new Error(`Broadcaster ${typeof this.options.broadcaster} ${String(this.options.broadcaster)} is not supported.`)}disconnect(){this.connector.disconnect()}join(e){return this.connector.presenceChannel(e)}leave(e){this.connector.leave(e)}leaveChannel(e){this.connector.leaveChannel(e)}leaveAllChannels(){for(const e in this.connector.channels)this.leaveChannel(e)}listen(e,s,n){return this.connector.listen(e,s,n)}private(e){return this.connector.privateChannel(e)}encryptedPrivate(e){if(this.connectorSupportsEncryptedPrivateChannels(this.connector))return this.connector.encryptedPrivateChannel(e);throw new Error(`Broadcaster ${typeof this.options.broadcaster} ${String(this.options.broadcaster)} does not support encrypted private channels.`)}connectorSupportsEncryptedPrivateChannels(e){return e instanceof Rp||e instanceof CE}socketId(){return this.connector.socketId()}connectionStatus(){return this.connector.connectionStatus()}registerInterceptors(){typeof Vue<"u"&&Vue!=null&&Vue.http&&this.registerVueRequestInterceptor(),typeof axios=="function"&&this.registerAxiosRequestInterceptor(),typeof jQuery=="function"&&this.registerjQueryAjaxSetup(),typeof Turbo=="object"&&this.registerTurboRequestInterceptor()}registerVueRequestInterceptor(){Vue.http.interceptors.push((e,s)=>{this.socketId()&&e.headers.set("X-Socket-ID",this.socketId()),s()})}registerAxiosRequestInterceptor(){axios.interceptors.request.use(e=>(this.socketId()&&(e.headers["X-Socket-Id"]=this.socketId()),e))}registerjQueryAjaxSetup(){typeof jQuery.ajax<"u"&&jQuery.ajaxPrefilter((e,s,n)=>{this.socketId()&&n.setRequestHeader("X-Socket-Id",this.socketId())})}registerTurboRequestInterceptor(){document.addEventListener("turbo:before-fetch-request",e=>{e.detail.fetchOptions.headers["X-Socket-Id"]=this.socketId()})}}var dl=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function fd(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function Ig(t){if(Object.prototype.hasOwnProperty.call(t,"__esMo
7dule"))return t;var e=t.default;if(typeof e=="function"){var s=function n(){return this instanceof n?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};s.prototype=e.prototype}else s={};return Object.defineProperty(s,"__esModule",{value:!0}),Object.keys(t).forEach(function(n){var i=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(s,n,i.get?i:{enumerable:!0,get:function(){return t[n]}})}),s}var ey={exports:{}};/*! 8 * Pusher JavaScript Library v8.5.0 9 * https://pusher.com/ 10 * 11 * Copyright 2020, Pusher 12 * Released under the MIT licence. 13 */var TE;function CR(){return TE||(TE=1,(function(t,e){(function(n,i){t.exports=i()})(self,()=>(()=>{var s={594(r,c){var h=this&&this.__extends||(function(){var F=function(C,A){return F=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(O,j){O.__proto__=j}||function(O,j){for(var te in j)j.hasOwnProperty(te)&&(O[te]=j[te])},F(C,A)};return function(C,A){F(C,A);function O(){this.constructor=C}C.prototype=A===null?Object.create(A):(O.prototype=A.prototype,new O)}})();Object.defineProperty(c,"__esModule",{value:!0});var f=256,v=(function(){function F(C){C===void 0&&(C="="),this._paddingCharacter=C}return F.prototype.encodedLength=function(C){return this._paddingCharacter?(C+2)/3*4|0:(C*8+5)/6|0},F.prototype.encode=function(C){for(var A="",O=0;O<C.length-2;O+=3){var j=C[O]<<16|C[O+1]<<8|C[O+2];A+=this._encodeByte(j>>>18&63),A+=this._encodeByte(j>>>12&63),A+=this._encodeByte(j>>>6&63),A+=this._encodeByte(j>>>0&63)}var te=C.length-O;if(te>0){var j=C[O]<<16|(te===2?C[O+1]<<8:0);A+=this._encodeByte(j>>>18&63),A+=this._encodeByte(j>>>12&63),te===2?A+=this._encodeByte(j>>>6&63):A+=this._paddingCharacter||"",A+=this._paddingCharacter||""}return A},F.prototype.maxDecodedLength=function(C){return this._paddingCharacter?C/4*3|0:(C*6+7)/8|0},F.prototype.decodedLength=function(C){return this.maxDecodedLength(C.length-this._getPaddingLength(C))},F.prototype.decode=function(C){if(C.length===0)return new Uint8Array(0);for(var A=this._getPaddingLength(C),O=C.length-A,j=new Uint8Array(this.maxDecodedLength(O)),te=0,B=0,z=0,re=0,ne=0,X=0,G=0;B<O-4;B+=4)re=this._decodeChar(C.charCodeAt(B+0)),ne=this._decodeChar(C.charCodeAt(B+1)),X=this._decodeChar(C.charCodeAt(B+2)),G=this._decodeChar(C.charCodeAt(B+3)),j[te++]=re<<2|ne>>>4,j[te++]=ne<<4|X>>>2,j[te++]=X<<6|G,z|=re&f,z|=ne&f,z|=X&f,z|=G&f;if(B<O-1&&(re=this._decodeChar(C.charCodeAt(B)),ne=this._decodeChar(C.charCodeAt(B+1)),j[te++]=re<<2|ne>>>4,z|=re&f,z|=ne&f),B<O-2&&(X=this._decodeChar(C.charCodeAt(B+2)),j[te++]=ne<<4|X>>>2,z|=X&f),B<O-3&&(G=this._decodeChar(C.charCodeAt(B+3)),j[te++]=X<<6|G,z|=G&f),z!==0)throw new Error("Base64Coder: incorrect characters for decoding");return j},F.prototype._encodeByte=function(C){var A=C;return A+=65,A+=25-C>>>8&6,A+=51-C>>>8&-75,A+=61-C>>>8&-15,A+=62-C>>>8&3,String.fromCharCode(A)},F.prototype._decodeChar=function(C){var A=f;return A+=(42-C&C-44)>>>8&-f+C-43+62,A+=(46-C&C-48)>>>8&-f+C-47+63,A+=(47-C&C-58)>>>8&-f+C-48+52,A+=(64-C&C-91)>>>8&-f+C-65+0,A+=(96-C&C-123)>>>8&-f+C-97+26,A},F.prototype._getPaddingLength=function(C){var A=0;if(this._paddingCharacter){for(var O=C.length-1;O>=0&&C[O]===this._paddingCharacter;O--)A++;if(C.length<4||A>2)throw new Error("Base64Coder: incorrect padding")}return A},F})();c.Coder=v;var g=new v;function y(F){return g.encode(F)}c.encode=y;function x(F){return g.decode(F)}c.decode=x;var E=(function(F){h(C,F);function C(){return F!==null&&F.apply(this,arguments)||this}return C.prototype._encodeByte=function(A){var O=A;return O+=65,O+=25-A>>>8&6,O+=51-A>>>8&-75,O+=61-A>>>8&-13,O+=62-A>>>8&49,String.fromCharCode(O)},C.prototype._decodeChar=function(A){var O=f;return O+=(44-A&A-46)>>>8&-f+A-45+62,O+=(94-A&A-96)>>>8&-f+A-95+63,O+=(47-A&A-58)>>>8&-f+A-48+52,O+=(64-A&A-91)>>>8&-f+A-65+0,O+=(96-A&A-123)>>>8&-f+A-97+26,O},C})(v);c.URLSafeCoder=E;var P=new E;function I(F){return P.encode(F)}c.encodeURLSafe=I;function D(F){return P.decode(F)}c.decodeURLSafe=D,c.encodedLength=function(F){return g.encodedLength(F)},c.maxDecodedLength=function(F){return g.maxDecodedLength(F)},c.decodedLength=function(F){return g.decodedLength(F)}},978(r,c){var h="utf8: invalid source encoding";function f(v){for(var g=[],y=0;y<v.length;y++){var x=v[y];if(x&128){var E=void 0;if(x<224){if(y>=v.length)throw new Error(h);var P=v[++y];if((P&192)!==128)throw new Error(h);x=(x&31)<<6|P&63,E=128}else if(x<240){if(y>=v.length-1)throw new Error(h);var P=v[++y],I=v[++y];if((P&192)!==128||(I&192)!==128)throw new Error(h);x=(x&15)<<12|(P&63)<<6|I&63,E=2048}else if(x<248){if(y>=v.length-2)throw new Error(h);var P=v[++y],I=v[++y],D=v[++y];if((P&192)!==128||(I&192)!==128||(D&192)!==128)throw new Error(h);x=(x&15)<<18|(P&63)<<12|(I&63)<<6|D&63,E=65536}else throw new Error(h);if(x<E||x>=55296&&x<=57343)throw new Error(h);if(x>
13=65536){if(x>1114111)throw new Error(h);x-=65536,g.push(String.fromCharCode(55296|x>>10)),x=56320|x&1023}}g.push(String.fromCharCode(x))}return g.join("")}c.D4=f},721(r,c,h){r.exports=h(207).default},207(r,c,h){h.d(c,{default:()=>tc});class f{constructor(V,ie){this.lastId=0,this.prefix=V,this.name=ie}create(V){this.lastId++;var ie=this.lastId,ke=this.prefix+ie,$e=this.name+"["+ie+"]",lt=!1,kt=function(){lt||(V.apply(null,arguments),lt=!0)};return this[ie]=kt,{number:ie,id:ke,name:$e,callback:kt}}remove(V){delete this[V.number]}}var v=new f("_pusher_script_","Pusher.ScriptReceivers"),g={VERSION:"8.5.0",PROTOCOL:7,wsPort:80,wssPort:443,wsPath:"",httpHost:"sockjs.pusher.com",httpPort:80,httpsPort:443,httpPath:"/pusher",stats_host:"stats.pusher.com",authEndpoint:"/pusher/auth",authTransport:"ajax",activityTimeout:12e4,pongTimeout:3e4,unavailableTimeout:1e4,userAuthentication:{endpoint:"/pusher/user-auth",transport:"ajax"},channelAuthorization:{endpoint:"/pusher/auth",transport:"ajax"},cdn_http:"http://js.pusher.com",cdn_https:"https://js.pusher.com",dependency_suffix:""};const y=g;class x{constructor(V){this.options=V,this.receivers=V.receivers||v,this.loading={}}load(V,ie,ke){var $e=this;if($e.loading[V]&&$e.loading[V].length>0)$e.loading[V].push(ke);else{$e.loading[V]=[ke];var lt=ds.createScriptRequest($e.getPath(V,ie)),kt=$e.receivers.create(function(Vt){if($e.receivers.remove(kt),$e.loading[V]){var us=$e.loading[V];delete $e.loading[V];for(var $s=function(wn){wn||lt.cleanup()},Hs=0;Hs<us.length;Hs++)us[Hs](Vt,$s)}});lt.send(kt)}}getRoot(V){var ie,ke=ds.getDocument().location.protocol;return V&&V.useTLS||ke==="https:"?ie=this.options.cdn_https:ie=this.options.cdn_http,ie.replace(/\/*$/,"")+"/"+this.options.version}getPath(V,ie){return this.getRoot(ie)+"/"+V+this.options.suffix+".js"}}var E=new f("_pusher_dependencies","Pusher.DependenciesReceivers"),P=new x({cdn_http:y.cdn_http,cdn_https:y.cdn_https,version:y.VERSION,suffix:y.dependency_suffix,receivers:E});const I={baseUrl:"https://pusher.com",urls:{authenticationEndpoint:{path:"/docs/channels/server_api/authenticating_users"},authorizationEndpoint:{path:"/docs/channels/server_api/authorizing-users/"},javascriptQuickStart:{path:"/docs/javascript_quick_start"},triggeringClientEvents:{path:"/docs/client_api_guide/client_events#trigger-events"},encryptedChannelSupport:{fullUrl:"https://github.com/pusher/pusher-js/tree/cc491015371a4bde5743d1c87a0fbac0feb53195#encrypted-channel-support"}}},F={buildLogSuffix:function(ae){const V="See:",ie=I.urls[ae];if(!ie)return"";let ke;return ie.fullUrl?ke=ie.fullUrl:ie.path&&(ke=I.baseUrl+ie.path),ke?`${V} ${ke}`:""}};var C;(function(ae){ae.UserAuthentication="user-authentication",ae.ChannelAuthorization="channel-authorization"})(C||(C={}));class A extends Error{constructor(V){super(V),Object.setPrototypeOf(this,new.target.prototype)}}class O extends Error{constructor(V){super(V),Object.setPrototypeOf(this,new.target.prototype)}}class j extends Error{constructor(V){super(V),Object.setPrototypeOf(this,new.target.prototype)}}class te extends Error{constructor(V){super(V),Object.setPrototypeOf(this,new.target.prototype)}}class B extends Error{constructor(V){super(V),Object.setPrototypeOf(this,new.target.prototype)}}class z extends Error{constructor(V){super(V),Object.setPrototypeOf(this,new.target.prototype)}}class re extends Error{constructor(V){super(V),Object.setPrototypeOf(this,new.target.prototype)}}class ne extends Error{constructor(V){super(V),Object.setPrototypeOf(this,new.target.prototype)}}class X extends Error{constructor(V,ie){super(ie),this.status=V,Object.setPrototypeOf(this,new.target.prototype)}}const ce=function(ae,V,ie,ke,$e){const lt=ds.createXHR();lt.open("POST",ie.endpoint,!0),lt.setRequestHeader("Content-Type","application/x-www-form-urlencoded");for(var kt in ie.headers)lt.setRequestHeader(kt,ie.headers[kt]);if(ie.headersProvider!=null){let Vt=ie.headersProvider();for(var kt in Vt)lt.setRequestHeader(kt,Vt[kt])}return lt.onreadystatechange=function(){if(lt.readyState===4)if(lt.status===200){let Vt,us=!1;try{Vt=JSON.parse(lt.responseText),us=!0}catch{$e(new X(200,`JSON returned from ${ke.toString()}
13 endpoint was invalid, yet status code was 200. Data was: ${lt.responseText}`),null)}us&&$e(null,Vt)}else{let Vt="";switch(ke){case C.UserAuthentication:Vt=F.buildLogSuffix("authenticationEndpoint");break;case C.ChannelAuthorization:Vt=`Clients must be authorized to join private or presence channels. ${F.buildLogSuffix("authorizationEndpoint")}`;break}$e(new X(lt.status,`Unable to retrieve auth string from ${ke.toString()} endpoint - received status: ${lt.status} from ${ie.endpoint}. ${Vt}`),null)}},lt.send(V),lt};function be(ae){return M(q(ae))}var J=String.fromCharCode,Z="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",ge=function(ae){var V=ae.charCodeAt(0);return V<128?ae:V<2048?J(192|V>>>6)+J(128|V&63):J(224|V>>>12&15)+J(128|V>>>6&63)+J(128|V&63)},q=function(ae){return ae.replace(/[^\x00-\x7F]/g,ge)},W=function(ae){var V=[0,2,1][ae.length%3],ie=ae.charCodeAt(0)<<16|(ae.length>1?ae.charCodeAt(1):0)<<8|(ae.length>2?ae.charCodeAt(2):0),ke=[Z.charAt(ie>>>18),Z.charAt(ie>>>12&63),V>=2?"=":Z.charAt(ie>>>6&63),V>=1?"=":Z.charAt(ie&63)];return ke.join("")},M=window.btoa||function(ae){return ae.replace(/[\s\S]{1,3}/g,W)};class he{constructor(V,ie,ke,$e){this.clear=ie,this.timer=V(()=>{this.timer&&(this.timer=$e(this.timer))},ke)}isRunning(){return this.timer!==null}ensureAborted(){this.timer&&(this.clear(this.timer),this.timer=null)}}const oe=he;function K(ae){window.clearTimeout(ae)}function H(ae){window.clearInterval(ae)}class Ee extends oe{constructor(V,ie){super(setTimeout,K,V,function(ke){return ie(),null})}}class _e extends oe{constructor(V,ie){super(setInterval,H,V,function(ke){return ie(),ke})}}var Ce={now(){return Date.now?Date.now():new Date().valueOf()},defer(ae){return new Ee(0,ae)},method(ae,...V){var ie=Array.prototype.slice.call(arguments,1);return function(ke){return ke[ae].apply(ke,ie.concat(arguments))}}};const Re=Ce;function Ke(ae,...V){for(var ie=0;ie<V.length;ie++){var ke=V[ie];for(var $e in ke)ke[$e]&&ke[$e].constructor&&ke[$e].constructor===Object?ae[$e]=Ke(ae[$e]||{},ke[$e]):ae[$e]=ke[$e]}return ae}function Be(){for(var ae=["Pusher"],V=0;V<arguments.length;V++)typeof arguments[V]=="string"?ae.push(arguments[V]):ae.push(zt(arguments[V]));return ae.join(" : ")}function Te(ae,V){var ie=Array.prototype.indexOf;if(ae===null)return-1;if(ie&&ae.indexOf===ie)return ae.indexOf(V);for(var ke=0,$e=ae.length;ke<$e;ke++)if(ae[ke]===V)return ke;return-1}function Q(ae,V){for(var ie in ae)Object.prototype.hasOwnProperty.call(ae,ie)&&V(ae[ie],ie,ae)}function Se(ae){var V=[];return Q(ae,function(ie,ke){V.push(ke)}),V}function Ve(ae){var V=[];return Q(ae,function(ie){V.push(ie)}),V}function Qe(ae,V,ie){for(var ke=0;ke<ae.length;ke++)V.call(ie||window,ae[ke],ke,ae)}function je(ae,V){for(var ie=[],ke=0;ke<ae.length;ke++)ie.push(V(ae[ke],ke,ae,ie));return ie}function nt(ae,V){var ie={};return Q(ae,function(ke,$e){ie[$e]=V(ke)}),ie}function ft(ae,V){V=V||function($e){return!!$e};for(var ie=[],ke=0;ke<ae.length;
13ke++)V(ae[ke],ke,ae,ie)&&ie.push(ae[ke]);return ie}function ut(ae,V){var ie={};return Q(ae,function(ke,$e){(V&&V(ke,$e,ae,ie)||ke)&&(ie[$e]=ke)}),ie}function Ye(ae){var V=[];return Q(ae,function(ie,ke){V.push([ke,ie])}),V}function We(ae,V){for(var ie=0;ie<ae.length;ie++)if(V(ae[ie],ie,ae))return!0;return!1}function ot(ae,V){for(var ie=0;ie<ae.length;ie++)if(!V(ae[ie],ie,ae))return!1;return!0}function ht(ae){return nt(ae,function(V){return typeof V=="object"&&(V=zt(V)),encodeURIComponent(be(V.toString()))})}function Tt(ae){var V=ut(ae,function(ke){return ke!==void 0}),ie=je(Ye(ht(V)),Re.method("join","=")).join("&");return ie}function Ot(ae){var V=[],ie=[];return(function ke($e,lt){var kt,Vt,us;switch(typeof $e){case"object":if(!$e)return null;for(kt=0;kt<V.length;kt+=1)if(V[kt]===$e)return{$ref:ie[kt]};if(V.push($e),ie.push(lt),Object.prototype.toString.apply($e)==="[object Array]")for(us=[],kt=0;kt<$e.length;kt+=1)us[kt]=ke($e[kt],lt+"["+kt+"]");else{us={};for(Vt in $e)Object.prototype.hasOwnProperty.call($e,Vt)&&(us[Vt]=ke($e[Vt],lt+"["+JSON.stringify(Vt)+"]"))}return us;case"number":case"string":case"boolean":return $e}})(ae,"$")}function zt(ae){try{return JSON.stringify(ae)}catch{return JSON.stringify(Ot(ae))}}class Kt{constructor(){this.globalLog=V=>{window.console&&window.console.log&&window.console.log(V)}}debug(...V){this.log(this.globalLog,V)}warn(...V){this.log(this.globalLogWarn,V)}error(...V){this.log(this.globalLogError,V)}globalLogWarn(V){window.console&&window.console.warn?window.console.warn(V):this.globalLog(V)}globalLogError(V){window.console&&window.console.error?window.console.error(V):this.globalLogWarn(V)}log(V,...ie){var ke=Be.apply(this,arguments);tc.log?tc.log(ke):tc.logToConsole&&V.bind(this)(ke)}}const Fe=new Kt;var ee=function(ae,V,ie,ke,$e){(ie.headers!==void 0||ie.headersProvider!=null)&&Fe.warn(`To send headers with the ${ke.toString()} request, you must use AJAX, rather than JSONP.`);var lt=ae.nextAuthCallbackID.toString();ae.nextAuthCallbackID++;var kt=ae.getDocument(),Vt=kt.createElement("script");ae.auth_callbacks[lt]=function(Hs){$e(null,Hs)};var us="Pusher.auth_callbacks['"+lt+"']";Vt.src=ie.endpoint+"?callback="+encodeURIComponent(us)+"&"+V;var $s=kt.getElementsByTagName("head")[0]||kt.documentElement;$s.insertBefore(Vt,$s.firstChild)};const R=ee;class we{constructor(V){this.src=V}send(V){var ie=this,ke="Error loading "+ie.src;ie.script=document.createElement("script"),ie.script.id=V.id,ie.script.src=ie.src,ie.script.type="text/javascript",ie.script.charset="UTF-8",ie.script.addEventListener?(ie.script.onerror=function(){V.callback(ke)},ie.script.onload=function(){V.callback(null)}):ie.script.onreadystatechange=function(){(ie.script.readyState==="loaded"||ie.script.readyState==="complete")&&V.callback(null)},ie.script.async===void 0&&document.attachEvent&&/opera/i.test(navigator.userAgent)?(ie.errorScript=document.createElement("script"),ie.errorScript.id=V.id+"_error",ie.errorScript.text=V.name+"('"+ke+"');",ie.script.async=ie.errorScript.async=!1):ie.script.async=!0;var $e=document.getElementsByTagName("head")[0];$e.insertBefore(ie.script,$e.firstChild),ie.errorScript&&$e.insertBefore(ie.errorScript,ie.script.nextSibling)}cleanup(){this.script&&(this.script.onload=this.script.onerror=null,this.script.onreadystatechange=null),this.script&&this.script.parentNode&&this.script.parentNode.removeChild(this.script),this.errorScript&&this.errorScript.parentNode&&this.errorScript.parentNode.removeChild(this.errorScript),this.script=null,this.errorScript=null}}class fe{constructor(V,ie){this.url=V,this.data=ie}send(V){if(!this.request){var ie=Tt(this.data),ke=this.url+"/"+V.number+"?"+ie;this.request=ds.createScriptRequest(ke),this.request.send(V)}}cleanup(){this.request&&this.request.cleanup()}}var Oe=function(ae,V){return function(ie,ke){var $e="http"+(V?"s":"")+"://",lt=$e+(ae.host||ae.options.host)+ae.options.path,kt=ds.createJSONPRequest(lt,ie),Vt=ds.ScriptReceivers.create(function(us,$s
13){v.remove(Vt),kt.cleanup(),$s&&$s.host&&(ae.host=$s.host),ke&&ke(us,$s)});kt.send(Vt)}},Xe={name:"jsonp",getAgent:Oe};const at=Xe;function wt(ae,V,ie){var ke=ae+(V.useTLS?"s":""),$e=V.useTLS?V.hostTLS:V.hostNonTLS;return ke+"://"+$e+ie}function gt(ae,V){var ie="/app/"+ae,ke="?protocol="+y.PROTOCOL+"&client=js&version="+y.VERSION+(V?"&"+V:"");return ie+ke}var pt={getInitial:function(ae,V){var ie=(V.httpPath||"")+gt(ae,"flash=false");return wt("ws",V,ie)}},He={getInitial:function(ae,V){var ie=(V.httpPath||"/pusher")+gt(ae);return wt("http",V,ie)}},it={getInitial:function(ae,V){return wt("http",V,V.httpPath||"/pusher")},getPath:function(ae,V){return gt(ae)}};class $t{constructor(){this._callbacks={}}get(V){return this._callbacks[ze(V)]}add(V,ie,ke){var $e=ze(V);this._callbacks[$e]=this._callbacks[$e]||[],this._callbacks[$e].push({fn:ie,context:ke})}remove(V,ie,ke){if(!V&&!ie&&!ke){this._callbacks={};return}var $e=V?[ze(V)]:Se(this._callbacks);ie||ke?this.removeCallback($e,ie,ke):this.removeAllCallbacks($e)}removeCallback(V,ie,ke){Qe(V,function($e){this._callbacks[$e]=ft(this._callbacks[$e]||[],function(lt){return ie&&ie!==lt.fn||ke&&ke!==lt.context}),this._callbacks[$e].length===0&&delete this._callbacks[$e]},this)}removeAllCallbacks(V){Qe(V,function(ie){delete this._callbacks[ie]},this)}}function ze(ae){return"_"+ae}class Je{constructor(V){this.callbacks=new $t,this.global_callbacks=[],this.failThrough=V}bind(V,ie,ke){return this.callbacks.add(V,ie,ke),this}bind_global(V){return this.global_callbacks.push(V),this}unbind(V,ie,ke){return this.callbacks.remove(V,ie,ke),this}unbind_global(V){return V?(this.global_callbacks=ft(this.global_callbacks||[],ie=>ie!==V),this):(this.global_callbacks=[],this)}unbind_all(){return this.unbind(),this.unbind_global(),this}emit(V,ie,ke){for(var $e=0;$e<this.global_callbacks.length;$e++)this.global_callbacks[$e](V,ie);var lt=this.callbacks.get(V),kt=[];if(ke?kt.push(ie,ke):ie&&kt.push(ie),lt&<.length>0)for(var $e=0;$e<lt.length;$e++)lt[$e].fn.apply(lt[$e].context||window,kt);else this.failThrough&&this.failThrough(V,ie);return this}}class tt extends Je{constructor(V,ie,ke,$e,lt){super(),this.initialize=ds.transportConnectionInitializer,this.hooks=V,this.name=ie,this.priority=ke,this.key=$e,this.options=lt,this.state="new",this.timeline=lt.timeline,this.activityTimeout=lt.activityTimeout,this.id=this.timeline.generateUniqueID()}handlesActivityChecks(){return!!this.hooks.handlesActivityChecks}supportsPing(){return!!this.hooks.supportsPing}connect(){if(this.socket||this.state!=="initialized")return!1;var V=this.hooks.urls.getInitial(this.key,this.options);try{this.socket=this.hooks.getSocket(V,this.options)}catch(ie){return Re.defer(()=>{this.onError(ie),this.changeState("closed")}),!1}return this.bindListeners(),Fe.debug("Connecting",{transport:this.name,url:V}),this.changeState("connecting"),!0}close(){return this.socket?(this.socket.close(),!0):!1}send(V){return this.state==="open"?(Re.defer(()=>{this.socket&&this.socket.send(V)}),!0):!1}ping(){this.state==="open"&&this.supportsPing()&&this.socket.ping()}onOpen(){this.hooks.beforeOpen&&this.hooks.beforeOpen(this.socket,this.hooks.urls.getPath(this.key,this.options)),this.changeState("open"),this.socket.onopen=void 0}onError(V){this.emit("error",{type:"WebSocketError",error:V}),this.timeline.error(this.buildTimelineMessage({error:V.toString()}))}onClose(V){V?this.changeState("closed",{code:V.code,reason:V.reason,wasClean:V.wasClean}):this.changeState("closed"),this.unbindListeners(),this.socket=void 0}onMessage(V){this.emit("message",V)}onActivity(){this.emit("activity")}bindListeners(){this.socket.onopen=()=>{this.onOpen()},this.socket.onerror=V=>{this.onError(V)},this.socket.onclose=V=>{this.onClose(V)},this.socket.onmessage=V=>{this.onMessage(V)},this.supportsPing()&&(this.socket.onactivity=()=>{this.onActivity()})}unbindListeners(){this.socket&&(this.socket.onopen=void 0,this.socket.onerror=void 0,this.socket.onclose=void 0,this.socket.onmessage=void 0,this.supportsPing()&&(this.socket.onactivity=void 0))}changeState(V,ie){this.state=V,this.timeline.info(this.buildTimelineMessage({state:V,params:ie}
13)),this.emit(V,ie)}buildTimelineMessage(V){return Ke({cid:this.id},V)}}class Jt{constructor(V){this.hooks=V}isSupported(V){return this.hooks.isSupported(V)}createConnection(V,ie,ke,$e){return new tt(this.hooks,V,ie,ke,$e)}}var Ht=new Jt({urls:pt,handlesActivityChecks:!1,supportsPing:!1,isInitialized:function(){return!!ds.getWebSocketAPI()},isSupported:function(){return!!ds.getWebSocketAPI()},getSocket:function(ae){return ds.createWebSocket(ae)}}),sn={urls:He,handlesActivityChecks:!1,supportsPing:!0,isInitialized:function(){return!0}},gs=Ke({getSocket:function(ae){return ds.HTTPFactory.createStreamingSocket(ae)}},sn),ws=Ke({getSocket:function(ae){return ds.HTTPFactory.createPollingSocket(ae)}},sn),bi={isSupported:function(){return ds.isXHRSupported()}},Li=new Jt(Ke({},gs,bi)),$o=new Jt(Ke({},ws,bi)),Ln={ws:Ht,xhr_streaming:Li,xhr_polling:$o};const za=Ln;var zu=new Jt({file:"sockjs",urls:it,handlesActivityChecks:!0,supportsPing:!1,isSupported:function(){return!0},isInitialized:function(){return window.SockJS!==void 0},getSocket:function(ae,V){return new window.SockJS(ae,null,{js_path:P.getPath("sockjs",{useTLS:V.useTLS}),ignore_null_origin:V.ignoreNullOrigin})},beforeOpen:function(ae,V){ae.send(JSON.stringify({path:V}))}}),Dl={isSupported:function(ae){var V=ds.isXDRSupported(ae.useTLS);return V}},Yu=new Jt(Ke({},gs,Dl)),Io=new Jt(Ke({},ws,Dl));za.xdr_streaming=Yu,za.xdr_polling=Io,za.sockjs=zu;const Pl=za;class qu extends Je{constructor(){super();var V=this;window.addEventListener!==void 0&&(window.addEventListener("online",function(){V.emit("online")},!1),window.addEventListener("offline",function(){V.emit("offline")},!1))}isOnline(){return window.navigator.onLine===void 0?!0:window.navigator.onLine}}var Gu=new qu;class Mo{constructor(V,ie,ke){this.manager=V,this.transport=ie,this.minPingDelay=ke.minPingDelay,this.maxPingDelay=ke.maxPingDelay,this.pingDelay=void 0}createConnection(V,ie,ke,$e){$e=Ke({},$e,{activityTimeout:this.pingDelay});var lt=this.transport.createConnection(V,ie,ke,$e),kt=null,Vt=function(){lt.unbind("open",Vt),lt.bind("closed",us),kt=Re.now()},us=$s=>{if(lt.unbind("closed",us),$s.code===1002||$s.code===1003)this.manager.reportDeath();else if(!$s.wasClean&&kt){var Hs=Re.now()-kt;Hs<2*this.maxPingDelay&&(this.manager.reportDeath(),this.pingDelay=Math.max(Hs/2,this.minPingDelay))}};return lt.bind("open",Vt),lt}isSupported(V){return this.manager.isAlive()&&this.transport.isSupported(V)}}const No={decodeMessage:function(ae){try{var V=JSON.parse(ae.data),ie=V.data;if(typeof ie=="string")try{ie=JSON.parse(V.data)}catch{}var ke={event:V.event,channel:V.channel,data:ie};return V.user_id&&(ke.user_id=V.user_id),ke}catch($e){throw{type:"MessageParseError",error:$e,data:ae.data}}},encodeMessage:function(ae){return JSON.stringify(ae)},processHandshake:function(ae){var V=No.decodeMessage(ae);if(V.event==="pusher:connection_established"){if(!V.data.activity_timeout)throw"No activity timeout specified in handshake";return{action:"connected",id:V.data.socket_id,activityTimeout:V.data.activity_timeout*1e3}}else{if(V.event==="pusher:error")return{action:this.getCloseAction(V.data),error:this.getCloseError(V.data)};throw"Invalid handshake"}},getCloseAction:function(ae){return ae.code<4e3?ae.code>=1002&&ae.code<=1004?"backoff":null:ae.code===4e3?"tls_only":ae.code<4100?"refused":ae.code<4200?"backoff":ae.code<4300?"retry":"refused"},getCloseError:function(ae){return ae.code!==1e3&&ae.code!==1001?{type:"PusherError",data:{code:ae.code,message:ae.reason||ae.message}}:null}},mt=No;class Tr extends Je{constructor(V,ie){super(),this.id=V,this.transport=ie,this.activityTimeout=ie.activityTimeout,this.bindListeners()}handlesActivityChecks(){return this.transport.handlesActivityChecks()}send(V){return this.transport.send(V)}send_event(V,ie,ke){var $e={event:V,data:ie};return ke&&($e.channel=ke),Fe.debug("Event sent",$e),this.send(mt.encodeMessage($e))}ping(){this.transport.supportsPing()?this.transport.ping():this.send_event("pusher:ping",{})}close(){this.transport.close()}bindListeners(){var V={message:ke=>{var $e;try{$e=mt.decodeMessage(ke)}
vendor: 4,121 bytes, line 13
13catch(lt){this.emit("error",{type:"MessageParseError",error:lt,data:ke.data})}if($e!==void 0){switch(Fe.debug("Event recd",$e),$e.event){case"pusher:error":this.emit("error",{type:"PusherError",data:$e.data});break;case"pusher:ping":this.emit("ping");break;case"pusher:pong":this.emit("pong");break}this.emit("message",$e)}},activity:()=>{this.emit("activity")},error:ke=>{this.emit("error",ke)},closed:ke=>{ie(),ke&&ke.code&&this.handleCloseEvent(ke),this.transport=null,this.emit("closed")}},ie=()=>{Q(V,(ke,$e)=>{this.transport.unbind($e,ke)})};Q(V,(ke,$e)=>{this.transport.bind($e,ke)})}handleCloseEvent(V){var ie=mt.getCloseAction(V),ke=mt.getCloseError(V);ke&&this.emit("error",ke),ie&&this.emit(ie,{action:ie,error:ke})}}class Lt{constructor(V,ie){this.transport=V,this.callback=ie,this.bindListeners()}close(){this.unbindListeners(),this.transport.close()}bindListeners(){this.onMessage=V=>{this.unbindListeners();var ie;try{ie=mt.processHandshake(V)}catch(ke){this.finish("error",{error:ke}),this.transport.close();return}ie.action==="connected"?this.finish("connected",{connection:new Tr(ie.id,this.transport),activityTimeout:ie.activityTimeout}):(this.finish(ie.action,{error:ie.error}),this.transport.close())},this.onClosed=V=>{this.unbindListeners();var ie=mt.getCloseAction(V)||"backoff",ke=mt.getCloseError(V);this.finish(ie,{error:ke})},this.transport.bind("message",this.onMessage),this.transport.bind("closed",this.onClosed)}unbindListeners(){this.transport.unbind("message",this.onMessage),this.transport.unbind("closed",this.onClosed)}finish(V,ie){this.callback(Ke({transport:this.transport,action:V},ie))}}class Ya{constructor(V,ie){this.timeline=V,this.options=ie||{}}send(V,ie){this.timeline.isEmpty()||this.timeline.send(ds.TimelineTransport.getAgent(this,V),ie)}}class Gr extends Je{constructor(V,ie){super(function(ke,$e){Fe.debug("No callbacks on "+V+" for "+ke)}),this.name=V,this.pusher=ie,this.subscribed=!1,this.subscriptionPending=!1,this.subscriptionCancelled=!1}authorize(V,ie){return ie(null,{auth:""})}trigger(V,ie){if(V.indexOf("client-")!==0)throw new A("Event '"+V+"' does not start with 'client-'");if(!this.subscribed){var ke=F.buildLogSuffix("triggeringClientEvents");Fe.warn(`Client event triggered before channel 'subscription_succeeded' event . ${ke}`)}return this.pusher.send_event(V,ie,this.name)}disconnect(){this.subscribed=!1,this.subscriptionPending=!1}handleEvent(V){var ie=V.event,ke=V.data;if(ie==="pusher_internal:subscription_succeeded")this.handleSubscriptionSucceededEvent(V);else if(ie==="pusher_internal:subscription_count")this.handleSubscriptionCountEvent(V);else if(ie.indexOf("pusher_internal:")!==0){var $e={};this.emit(ie,ke,$e)}}handleSubscriptionSucceededEvent(V){this.subscriptionPending=!1,this.subscribed=!0,this.subscriptionCancelled?this.pusher.unsubscribe(this.name):this.emit("pusher:subscription_succeeded",V.data)}handleSubscriptionCountEvent(V){V.data.subscription_count&&(this.subscriptionCount=V.data.subscription_count),this.emit("pusher:subscription_count",V.data)}subscribe(){this.subscribed||(this.subscriptionPending=!0,this.subscriptionCancelled=!1,this.authorize(this.pusher.connection.socket_id,(V,ie)=>{V?(this.subscriptionPending=!1,Fe.error(V.toString()),this.emit("pusher:subscription_error",Object.assign({},{type:"AuthError",error:V.message},V instanceof X?{status:V.status}:{}))):this.pusher.send_event("pusher:subscribe",{auth:ie.auth,channel_data:ie.channel_data,channel:this.name})}))}unsubscribe(){this.subscribed=!1,this.pusher.send_event("pusher:unsubscribe",{channel:this.name})}cancelSubscription(){this.subscriptionCancelled=!0}reinstateSubscription(){this.subscriptionCancelled=!1}}class Xr extends Gr{authorize(V,ie){return this.pusher.config.channelAuthorizer({channelName:this.name,socketId:V},ie)}}class ma{constructor(){this.reset()}get(V){return Object.prototype.hasOwnProperty.call(this.members,V)?{id:V,info:this.members[V]}:null}each(V){Q(this.members,(ie,ke)=>{V(this.get(ke))})}setMyID(V){this.myID=V}onSubscription(V){this.members=V.presence.hash,this.count=V.presence.count,this.me=this.get(this.myID)}
13addMember(V){return this.get(V.user_id)===null&&this.count++,this.members[V.user_id]=V.user_info,this.get(V.user_id)}removeMember(V){var ie=this.get(V.user_id);return ie&&(delete this.members[V.user_id],this.count--),ie}reset(){this.members={},this.count=0,this.myID=null,this.me=null}}var qa=function(ae,V,ie,ke){function $e(lt){return lt instanceof ie?lt:new ie(function(kt){kt(lt)})}return new(ie||(ie=Promise))(function(lt,kt){function Vt(Hs){try{$s(ke.next(Hs))}catch(wn){kt(wn)}}function us(Hs){try{$s(ke.throw(Hs))}catch(wn){kt(wn)}}function $s(Hs){Hs.done?lt(Hs.value):$e(Hs.value).then(Vt,us)}$s((ke=ke.apply(ae,V||[])).next())})};class ga extends Xr{constructor(V,ie){super(V,ie),this.members=new ma}authorize(V,ie){super.authorize(V,(ke,$e)=>qa(this,void 0,void 0,function*(){if(!ke)if($e=$e,$e.channel_data!=null){var lt=JSON.parse($e.channel_data);this.members.setMyID(lt.user_id)}else if(yield this.pusher.user.signinDonePromise,this.pusher.user.user_data!=null)this.members.setMyID(this.pusher.user.user_data.id);else{let kt=F.buildLogSuffix("authorizationEndpoint");Fe.error(`Invalid auth response for channel '${this.name}', expected 'channel_data' field. ${kt}, or the user should be signed in.`),ie("Invalid auth response");return}ie(ke,$e)}))}handleEvent(V){var ie=V.event;if(ie.indexOf("pusher_internal:")===0)this.handleInternalEvent(V);else{var ke=V.data,$e={};V.user_id&&($e.user_id=V.user_id),this.emit(ie,ke,$e)}}handleInternalEvent(V){var ie=V.event,ke=V.data;switch(ie){case"pusher_internal:subscription_succeeded":this.handleSubscriptionSucceededEvent(V);break;case"pusher_internal:subscription_count":this.handleSubscriptionCountEvent(V);break;case"pusher_internal:member_added":var $e=this.members.addMember(ke);this.emit("pusher:member_added",$e);break;case"pusher_internal:member_removed":var lt=this.members.removeMember(ke);lt&&this.emit("pusher:member_removed",lt);break}}handleSubscriptionSucceededEvent(V){this.subscriptionPending=!1,this.subscribed=!0,this.subscriptionCancelled?this.pusher.unsubscribe(this.name):(this.members.onSubscription(V.data),this.emit("pusher:subscription_succeeded",this.members))}disconnect(){this.members.reset(),super.disconnect()}}var va=h(978),Kr=h(594);class Jr extends Xr{constructor(V,ie,ke){super(V,ie),this.key=null,this.nacl=ke}authorize(V,ie){super.authorize(V,(ke,$e)=>{if(ke){ie(ke,$e);return}let lt=$e.shared_secret;if(!lt){ie(new Error(`No shared_secret key in auth payload for encrypted channel: ${this.name}`),null);return}this.key=(0,Kr.decode)(lt),delete $e.shared_secret,ie(null,$e)})}trigger(V,ie){throw new z("Client events are not currently supported for encrypted channels")}handleEvent(V){var ie=V.event,ke=V.data;if(ie.indexOf("pusher_internal:")===0||ie.indexOf("pusher:")===0){super.handleEvent(V);return}this.handleEncryptedEvent(ie,ke)}handleEncryptedEvent(V,ie){if(!this.key){Fe.debug("Received encrypted event before key has been retrieved from the authEndpoint");return}if(!ie.ciphertext||!ie.nonce){Fe.error("Unexpected format for encrypted event, expected object with `ciphertext` and `nonce` fields, got: "+ie);return}let ke=(0,Kr.decode)(ie.ciphertext);if(ke.length<this.nacl.secretbox.overheadLength){Fe.error(`Expected encrypted event ciphertext length to be ${this.nacl.secretbox.overheadLength}, got: ${ke.length}`);return}let $e=(0,Kr.decode)(ie.nonce);if($e.length<this.nacl.secretbox.nonceLength){Fe.error(`Expected encrypted event nonce length to be ${this.nacl.secretbox.nonceLength}, got: ${$e.length}`);return}let lt=this.nacl.secretbox.open(ke,$e,this.key);if(lt===null){Fe.debug("Failed to decrypt an event, probably because it was encrypted with a different key. Fetching a new key from the authEndpoint..."),this.authorize(this.pusher.connection.socket_id,(kt,Vt)=>{if(kt){Fe.error(`Failed to make a request to the authEndpoint: ${Vt}. Unable to fetch new key, so dropping encrypted event`);return}if(lt=this.nacl.secretbox.open(ke,$e,this.key),lt===null){Fe.error("Failed to decrypt event with new key. Dropping encrypted event");return}this.emit(V,this.getDataToEmit(lt))});return}
13this.emit(V,this.getDataToEmit(lt))}getDataToEmit(V){let ie=(0,va.D4)(V);try{return JSON.parse(ie)}catch{return ie}}}class Ar extends Je{constructor(V,ie){super(),this.state="initialized",this.connection=null,this.key=V,this.options=ie,this.timeline=this.options.timeline,this.usingTLS=this.options.useTLS,this.errorCallbacks=this.buildErrorCallbacks(),this.connectionCallbacks=this.buildConnectionCallbacks(this.errorCallbacks),this.handshakeCallbacks=this.buildHandshakeCallbacks(this.errorCallbacks);var ke=ds.getNetwork();ke.bind("online",()=>{this.timeline.info({netinfo:"online"}),(this.state==="connecting"||this.state==="unavailable")&&this.retryIn(0)}),ke.bind("offline",()=>{this.timeline.info({netinfo:"offline"}),this.connection&&this.sendActivityCheck()}),this.updateStrategy()}switchCluster(V){this.key=V,this.updateStrategy(),this.retryIn(0)}connect(){if(!(this.connection||this.runner)){if(!this.strategy.isSupported()){this.updateState("failed");return}this.updateState("connecting"),this.startConnecting(),this.setUnavailableTimer()}}send(V){return this.connection?this.connection.send(V):!1}send_event(V,ie,ke){return this.connection?this.connection.send_event(V,ie,ke):!1}disconnect(){this.disconnectInternally(),this.updateState("disconnected")}isUsingTLS(){return this.usingTLS}startConnecting(){var V=(ie,ke)=>{ie?this.runner=this.strategy.connect(0,V):ke.action==="error"?(this.emit("error",{type:"HandshakeError",error:ke.error}),this.timeline.error({handshakeError:ke.error})):(this.abortConnecting(),this.handshakeCallbacks[ke.action](ke))};this.runner=this.strategy.connect(0,V)}abortConnecting(){this.runner&&(this.runner.abort(),this.runner=null)}disconnectInternally(){if(this.abortConnecting(),this.clearRetryTimer(),this.clearUnavailableTimer(),this.connection){var V=this.abandonConnection();V.close()}}updateStrategy(){this.strategy=this.options.getStrategy({key:this.key,timeline:this.timeline,useTLS:this.usingTLS})}retryIn(V){this.timeline.info({action:"retry",delay:V}),V>0&&this.emit("connecting_in",Math.round(V/1e3)),this.retryTimer=new Ee(V||0,()=>{this.disconnectInternally(),this.connect()})}clearRetryTimer(){this.retryTimer&&(this.retryTimer.ensureAborted(),this.retryTimer=null)}setUnavailableTimer(){this.unavailableTimer=new Ee(this.options.unavailableTimeout,()=>{this.updateState("unavailable")})}clearUnavailableTimer(){this.unavailableTimer&&this.unavailableTimer.ensureAborted()}sendActivityCheck(){this.stopActivityCheck(),this.connection.ping(),this.activityTimer=new Ee(this.options.pongTimeout,()=>{this.timeline.error({pong_timed_out:this.options.pongTimeout}),this.retryIn(0)})}resetActivityCheck(){this.stopActivityCheck(),this.connection&&!this.connection.handlesActivityChecks()&&(this.activityTimer=new Ee(this.activityTimeout,()=>{this.sendActivityCheck()}))}stopActivityCheck(){this.activityTimer&&this.activityTimer.ensureAborted()}buildConnectionCallbacks(V){return Ke({},V,{message:ie=>{this.resetActivityCheck(),this.emit("message",ie)},ping:()=>{this.send_event("pusher:pong",{})},activity:()=>{this.resetActivityCheck()},error:ie=>{this.emit("error",ie)},closed:()=>{this.abandonConnection(),this.shouldRetry()&&this.retryIn(1e3)}})}buildHandshakeCallbacks(V){return Ke({},V,{connected:ie=>{this.activityTimeout=Math.min(this.options.activityTimeout,ie.activityTimeout,ie.connection.activityTimeout||1/0),this.clearUnavailableTimer(),this.setConnection(ie.connection),this.socket_id=this.connection.id,this.updateState("connected",{socket_id:this.socket_id})}})}buildErrorCallbacks(){let V=ie=>ke=>{ke.error&&this.emit("error",{type:"WebSocketError",error:ke.error}),ie(ke)};return{tls_only:V(()=>{this.usingTLS=!0,this.updateStrategy(),this.retryIn(0)}),refused:V(()=>{this.disconnect()}),backoff:V(()=>{this.retryIn(1e3)}),retry:V(()=>{this.retryIn(0)})}}setConnection(V){this.connection=V;for(var ie in this.connectionCallbacks)this.connection.bind(ie,this.connectionCallbacks[ie]);this.resetActivityCheck()}abandonConnection(){if(this.connection){this.stopActivityCheck();for(var V in this.connectionCallbacks)this.connection.unbind(V,this.connectionCallbacks[V]);var ie=this.connection;return this.connection=null,ie}}updateState(V,ie){var ke=this.state;if(this.state=V,ke!==V){var $e=V;$e==="connected"&&($e+=" with new socket ID "+ie.socket_id),Fe.debug("State changed",ke+" -> "+$e),this.timeline.info({state:V,params:ie}
13),this.emit("state_change",{previous:ke,current:V}),this.emit(V,ie)}}shouldRetry(){return this.state==="connecting"||this.state==="connected"}}class $l{constructor(){this.channels={}}add(V,ie){return this.channels[V]||(this.channels[V]=qs(V,ie)),this.channels[V]}all(){return Ve(this.channels)}find(V){return this.channels[V]}remove(V){var ie=this.channels[V];return delete this.channels[V],ie}disconnect(){Q(this.channels,function(V){V.disconnect()})}}function qs(ae,V){if(ae.indexOf("private-encrypted-")===0){if(V.config.nacl)return Ri.createEncryptedChannel(ae,V,V.config.nacl);let ie="Tried to subscribe to a private-encrypted- channel but no nacl implementation available",ke=F.buildLogSuffix("encryptedChannelSupport");throw new z(`${ie}. ${ke}`)}else{if(ae.indexOf("private-")===0)return Ri.createPrivateChannel(ae,V);if(ae.indexOf("presence-")===0)return Ri.createPresenceChannel(ae,V);if(ae.indexOf("#")===0)throw new O('Cannot create a channel with name "'+ae+'".');return Ri.createChannel(ae,V)}}var Il={createChannels(){return new $l},createConnectionManager(ae,V){return new Ar(ae,V)},createChannel(ae,V){return new Gr(ae,V)},createPrivateChannel(ae,V){return new Xr(ae,V)},createPresenceChannel(ae,V){return new ga(ae,V)},createEncryptedChannel(ae,V,ie){return new Jr(ae,V,ie)},createTimelineSender(ae,V){return new Ya(ae,V)},createHandshake(ae,V){return new Lt(ae,V)},createAssistantToTheTransportManager(ae,V,ie){return new Mo(ae,V,ie)}};const Ri=Il;class Ml{constructor(V){this.options=V||{},this.livesLeft=this.options.lives||1/0}getAssistant(V){return Ri.createAssistantToTheTransportManager(this,V,{minPingDelay:this.options.minPingDelay,maxPingDelay:this.options.maxPingDelay})}isAlive(){return this.livesLeft>0}reportDeath(){this.livesLeft-=1}}class Or{constructor(V,ie){this.strategies=V,this.loop=!!ie.loop,this.failFast=!!ie.failFast,this.timeout=ie.timeout,this.timeoutLimit=ie.timeoutLimit}isSupported(){return We(this.strategies,Re.method("isSupported"))}connect(V,ie){var ke=this.strategies,$e=0,lt=this.timeout,kt=null,Vt=(us,$s)=>{$s?ie(null,$s):($e=$e+1,this.loop&&($e=$e%ke.length),$e<ke.length?(lt&&(lt=lt*2,this.timeoutLimit&&(lt=Math.min(lt,this.timeoutLimit))),kt=this.tryStrategy(ke[$e],V,{timeout:lt,failFast:this.failFast},Vt)):ie(!0))};return kt=this.tryStrategy(ke[$e],V,{timeout:lt,failFast:this.failFast},Vt),{abort:function(){kt.abort()},forceMinPriority:function(us){V=us,kt&&kt.forceMinPriority(us)}}}tryStrategy(V,ie,ke,$e){var lt=null,kt=null;return ke.timeout>0&&(lt=new Ee(ke.timeout,function(){kt.abort(),$e(!0)})),kt=V.connect(ie,function(Vt,us){Vt&<&<.isRunning()&&!ke.failFast||(lt&<.ensureAborted(),$e(Vt,us))}),{abort:function(){lt&<.ensureAborted(),kt.abort()},forceMinPriority:function(Vt){kt.forceMinPriority(Vt)}}}}class Lo{constructor(V){this.strategies=V}isSupported(){return We(this.strategies,Re.method("isSupported"))}connect(V,ie){return Xu(this.strategies,V,function(ke,$e){return function(lt,kt){if($e[ke].error=lt,lt){Bf($e)&&ie(!0);return}Qe($e,function(Vt){Vt.forceMinPriority(kt.transport.priority)}),ie(null,kt)}})}}function Xu(ae,V,ie){var ke=je(ae,function($e,lt,kt,Vt){return $e.connect(V,ie(lt,Vt))});return{abort:function(){Qe(ke,Iv)},forceMinPriority:function($e){Qe(ke,function(lt){lt.forceMinPriority($e)})}}}function Bf(ae){return ot(ae,function(V){return!!V.error})}function Iv(ae){!ae.error&&!ae.aborted&&(ae.abort(),ae.aborted=!0)}class Mv{constructor(V,ie,ke){this.strategy=V,this.transports=ie,this.ttl=ke.ttl||18e5,this.usingTLS=ke.useTLS,this.timeline=ke.timeline}isSupported(){return this.strategy.isSupported()}connect(V,ie){var ke=this.usingTLS,$e=Nv(ke),lt=$e&&$e.cacheSkipCount?$e.cacheSkipCount:0,kt=[this.strategy];if($e&&$e.timestamp+this.ttl>=Re.now()){var Vt=this.transports[$e.transport];Vt&&(["ws","wss"].includes($e.transport)||lt>3?(this.timeline.info({cached:!0,transport:$e.transport,latency:$e.latency}),kt.push(new Or([Vt],{timeout:$e.latency*2+1e3,failFast:!0}))):lt++)}var us=Re.now(),$s=kt.pop().connect(V,function Hs(wn,sc){wn?(Sd(ke),kt.length>0?(us=Re.now(),$s=kt.pop().connect(V,Hs)):ie(wn)):(Ku(ke,sc.transport.name,Re.now()-us,lt),ie(null,sc))});return{abort:function(){$s.abort()},forceMinPriority:function(Hs){V=Hs,$s&&$s.forceMinPriority(Hs)}}}}function Ed(ae){return"pusherTransport"+(ae?"TLS":"NonTLS")}function Nv(ae){var V=ds.getLocalStorage();if(V)try{var ie=V[Ed(ae)];if(ie)return JSON.parse(ie)}catch{Sd(ae)}return null}
13function Ku(ae,V,ie,ke){var $e=ds.getLocalStorage();if($e)try{$e[Ed(ae)]=zt({timestamp:Re.now(),transport:V,latency:ie,cacheSkipCount:ke})}catch{}}function Sd(ae){var V=ds.getLocalStorage();if(V)try{delete V[Ed(ae)]}catch{}}class Nl{constructor(V,{delay:ie}){this.strategy=V,this.options={delay:ie}}isSupported(){return this.strategy.isSupported()}connect(V,ie){var ke=this.strategy,$e,lt=new Ee(this.options.delay,function(){$e=ke.connect(V,ie)});return{abort:function(){lt.ensureAborted(),$e&&$e.abort()},forceMinPriority:function(kt){V=kt,$e&&$e.forceMinPriority(kt)}}}}class ba{constructor(V,ie,ke){this.test=V,this.trueBranch=ie,this.falseBranch=ke}isSupported(){var V=this.test()?this.trueBranch:this.falseBranch;return V.isSupported()}connect(V,ie){var ke=this.test()?this.trueBranch:this.falseBranch;return ke.connect(V,ie)}}class Uf{constructor(V){this.strategy=V}isSupported(){return this.strategy.isSupported()}connect(V,ie){var ke=this.strategy.connect(V,function($e,lt){lt&&ke.abort(),ie($e,lt)});return ke}}function ti(ae){return function(){return ae.isSupported()}}var Ll=function(ae,V,ie){var ke={};function $e(tp,Rd,Fd,sb,nb){var sp=ie(ae,tp,Rd,Fd,sb,nb);return ke[tp]=sp,sp}var lt=Object.assign({},V,{hostNonTLS:ae.wsHost+":"+ae.wsPort,hostTLS:ae.wsHost+":"+ae.wssPort,httpPath:ae.wsPath}),kt=Object.assign({},lt,{useTLS:!0}),Vt=Object.assign({},V,{hostNonTLS:ae.httpHost+":"+ae.httpPort,hostTLS:ae.httpHost+":"+ae.httpsPort,httpPath:ae.httpPath}),us={loop:!0,timeout:15e3,timeoutLimit:6e4},$s=new Ml({minPingDelay:1e4,maxPingDelay:ae.activityTimeout}),Hs=new Ml({lives:2,minPingDelay:1e4,maxPingDelay:ae.activityTimeout}),wn=$e("ws","ws",3,lt,$s),sc=$e("wss","ws",3,kt,$s),Nd=$e("sockjs","sockjs",1,Vt),nc=$e("xhr_streaming","xhr_streaming",1,Vt,Hs),ic=$e("xdr_streaming","xdr_streaming",1,Vt,Hs),jl=$e("xhr_polling","xhr_polling",1,Vt),tb=$e("xdr_polling","xdr_polling",1,Vt),Ld=new Or([wn],us),rc=new Or([sc],us),Xa=new Or([Nd],us),Zf=new Or([new ba(ti(nc),nc,ic)],us),_a=new Or([new ba(ti(jl),jl,tb)],us),ep=new Or([new ba(ti(Zf),new Lo([Zf,new Nl(_a,{delay:4e3})]),_a)],us),ea=new ba(ti(ep),ep,Xa),Ka;return V.useTLS?Ka=new Lo([Ld,new Nl(ea,{delay:2e3})]):Ka=new Lo([Ld,new Nl(rc,{delay:2e3}),new Nl(ea,{delay:5e3})]),new Mv(new Uf(new ba(ti(wn),Ka,ea)),ke,{ttl:18e5,timeline:V.timeline,useTLS:V.useTLS})};const Lv=Ll;function Rv(){var ae=this;ae.timeline.info(ae.buildTimelineMessage({transport:ae.name+(ae.options.useTLS?"s":"")})),ae.hooks.isInitialized()?ae.changeState("initialized"):ae.hooks.file?(ae.changeState("initializing"),P.load(ae.hooks.file,{useTLS:ae.options.useTLS},function(V,ie){ae.hooks.isInitialized()?(ae.changeState("initialized"),ie(!0)):(V&&ae.onError(V),ae.onClose(),ie(!1))})):ae.onClose()}var Fv={getRequest:function(ae){var V=new window.XDomainRequest;return V.ontimeout=function(){ae.emit("error",new j),ae.close()},V.onerror=function(ie){ae.emit("error",ie),ae.close()},V.onprogress=function(){V.responseText&&V.responseText.length>0&&ae.onChunk(200,V.responseText)},V.onload=function(){V.responseText&&V.responseText.length>0&&ae.onChunk(200,V.responseText),ae.emit("finished",200),ae.close()},V},abortRequest:function(ae){ae.ontimeout=ae.onerror=ae.onprogress=ae.onload=null,ae.abort()}};const kd=Fv,Ju=256*1024;class Vv extends Je{constructor(V,ie,ke){super(),this.hooks=V,this.method=ie,this.url=ke}start(V){this.position=0,this.xhr=this.hooks.getRequest(this),this.unloader=()=>{this.close()},ds.addUnloadListener(this.unloader),this.xhr.open(this.method,this.url,!0),this.xhr.setRequestHeader&&this.xhr.setRequestHeader("Content-Type","application/json"),this.xhr.send(V)}close(){this.unloader&&(ds.removeUnloadListener(this.unloader),this.unloader=null),this.xhr&&(this.hooks.abortRequest(this.xhr),this.xhr=null)}onChunk(V,ie){for(;;){var ke=this.advanceBuffer(ie);if(ke)this.emit("chunk",{status:V,data:ke});else break}this.isBufferTooLong(ie)&&this.emit("buffer_too_long")}advanceBuffer(V){var ie=V.slice(this.position),ke=ie.indexOf(` 14`);return ke!==-1?(this.position+=ke+1,ie.slice(0,ke)):null}isBufferTooLong(V){return this.position===V.length&&V.length>Ju}}var Cd;(function(ae){ae[ae.CONNECTING=0]="CONNECTING",ae[ae.OPEN=1]="OPEN",ae[ae.CLOSED=3]="CLOSED"})(Cd||(Cd={}));const ya=Cd;var jf=1;class Ro{constructor(V,ie){this.hooks=V,this.session=Wf(1e3)+"/"+Td(8),this.location=Bv(ie),this.readyState=ya.CONNECTING,this.openStream()}send(V){return this.sendRaw(JSON.stringify([V]))}ping(){this.hooks.sendHeartbeat(this)}close(V,ie){this.onClose(V,ie,!0)}sendRaw(V){if(this.readyState===ya.OPEN)try{return ds.createSocketRequest
14("POST",Hf(Qu(this.location,this.session))).start(V),!0}catch{return!1}else return!1}reconnect(){this.closeStream(),this.openStream()}onClose(V,ie,ke){this.closeStream(),this.readyState=ya.CLOSED,this.onclose&&this.onclose({code:V,reason:ie,wasClean:ke})}onChunk(V){if(V.status===200){this.readyState===ya.OPEN&&this.onActivity();var ie,ke=V.data.slice(0,1);switch(ke){case"o":ie=JSON.parse(V.data.slice(1)||"{}"),this.onOpen(ie);break;case"a":ie=JSON.parse(V.data.slice(1)||"[]");for(var $e=0;$e<ie.length;$e++)this.onEvent(ie[$e]);break;case"m":ie=JSON.parse(V.data.slice(1)||"null"),this.onEvent(ie);break;case"h":this.hooks.onHeartbeat(this);break;case"c":ie=JSON.parse(V.data.slice(1)||"[]"),this.onClose(ie[0],ie[1],!0);break}}}onOpen(V){this.readyState===ya.CONNECTING?(V&&V.hostname&&(this.location.base=Uv(this.location.base,V.hostname)),this.readyState=ya.OPEN,this.onopen&&this.onopen()):this.onClose(1006,"Server lost session",!0)}onEvent(V){this.readyState===ya.OPEN&&this.onmessage&&this.onmessage({data:V})}onActivity(){this.onactivity&&this.onactivity()}onError(V){this.onerror&&this.onerror(V)}openStream(){this.stream=ds.createSocketRequest("POST",Hf(this.hooks.getReceiveURL(this.location,this.session))),this.stream.bind("chunk",V=>{this.onChunk(V)}),this.stream.bind("finished",V=>{this.hooks.onFinished(this,V)}),this.stream.bind("buffer_too_long",()=>{this.reconnect()});try{this.stream.start()}catch(V){Re.defer(()=>{this.onError(V),this.onClose(1006,"Could not start streaming",!1)})}}closeStream(){this.stream&&(this.stream.unbind_all(),this.stream.close(),this.stream=null)}}function Bv(ae){var V=/([^\?]*)\/*(\??.*)/.exec(ae);return{base:V[1],queryString:V[2]}}function Qu(ae,V){return ae.base+"/"+V+"/xhr_send"}function Hf(ae){var V=ae.indexOf("?")===-1?"?":"&";return ae+V+"t="+ +new Date+"&n="+jf++}function Uv(ae,V){var ie=/(https?:\/\/)([^\/:]+)((\/|:)?.*)/.exec(ae);return ie[1]+V+ie[3]}function Wf(ae){return ds.randomInt(ae)}function Td(ae){for(var V=[],ie=0;ie<ae;ie++)V.push(Wf(32).toString(32));return V.join("")}const jv=Ro;var Zu={getReceiveURL:function(ae,V){return ae.base+"/"+V+"/xhr_streaming"+ae.queryString},onHeartbeat:function(ae){ae.sendRaw("[]")},sendHeartbeat:function(ae){ae.sendRaw("[]")},onFinished:function(ae,V){ae.onClose(1006,"Connection interrupted ("+V+")",!1)}};const zf=Zu;var Dr={getReceiveURL:function(ae,V){return ae.base+"/"+V+"/xhr"+ae.queryString},onHeartbeat:function(){},sendHeartbeat:function(ae){ae.sendRaw("[]")},onFinished:function(ae,V){V===200?ae.reconnect():ae.onClose(1006,"Connection interrupted ("+V+")",!1)}};const Hv=Dr;var Rl={getRequest:function(ae){var V=ds.getXHRAPI(),ie=new V;return ie.onreadystatechange=ie.onprogress=function(){switch(ie.readyState){case 3:ie.responseText&&ie.responseText.length>0&&ae.onChunk(ie.status,ie.responseText);break;case 4:ie.responseText&&ie.responseText.length>0&&ae.onChunk(ie.status,ie.responseText),ae.emit("finished",ie.status),ae.close();break}},ie},abortRequest:function(ae){ae.onreadystatechange=null,ae.abort()}};const Ad=Rl;var Od={createStreamingSocket(ae){return this.createSocket(zf,ae)},createPollingSocket(ae){return this.createSocket(Hv,ae)},createSocket(ae,V){return new jv(ae,V)},createXHR(ae,V){return this.createRequest(Ad,ae,V)},createRequest(ae,V,ie){return new Vv(ae,V,ie)}};const Dd=Od;Dd.createXDR=function(ae,V){return this.createRequest(kd,ae,V)};var zv={nextAuthCallbackID:1,auth_callbacks:{},ScriptReceivers:v,DependenciesReceivers:E,getDefaultStrategy:Lv,Transports:Pl,transportConnectionInitializer:Rv,HTTPFactory:Dd,TimelineTransport:at,getXHRAPI(){return window.XMLHttpRequest},getWebSocketAPI(){return window.WebSocket||window.MozWebSocket},setup(ae){window.Pusher=ae;var V=()=>{this.onDocumentBody(ae.ready)};window.JSON?V():P.load("json2",{},V)},getDocument(){return document},getProtocol(){return this.getDocument().location.protocol},getAuthorizers(){return{ajax:ce,jsonp:R}},onDocumentBody(ae){document.body?ae():setTimeout(()=>{this.onDocumentBody(ae)},0)},createJSONPRequest(ae,V){return new fe(ae,V)},createScriptRequest(ae){return new we(ae)},getLocalStorage(){try{return window.localStorage}catch{return}},createXHR(){return this.getXHRAPI()?this.createXMLHttpRequest():this.createMicrosoftXHR()},createXMLHttpRequest(){var ae=this.getXHRAPI();return new ae},createMicrosoftXHR(){return new ActiveXObject("Microsoft.XMLHTTP")},getNetwork(){return Gu},createWebSocket(ae){var V=this.getWebSocketAPI();return new V(ae)}
14,createSocketRequest(ae,V){if(this.isXHRSupported())return this.HTTPFactory.createXHR(ae,V);if(this.isXDRSupported(V.indexOf("https:")===0))return this.HTTPFactory.createXDR(ae,V);throw"Cross-origin HTTP requests are not supported"},isXHRSupported(){var ae=this.getXHRAPI();return!!ae&&new ae().withCredentials!==void 0},isXDRSupported(ae){var V=ae?"https:":"http:",ie=this.getProtocol();return!!window.XDomainRequest&&ie===V},addUnloadListener(ae){window.addEventListener!==void 0?window.addEventListener("unload",ae,!1):window.attachEvent!==void 0&&window.attachEvent("onunload",ae)},removeUnloadListener(ae){window.addEventListener!==void 0?window.removeEventListener("unload",ae,!1):window.detachEvent!==void 0&&window.detachEvent("onunload",ae)},randomInt(ae){return Math.floor(function(){return(window.crypto||window.msCrypto).getRandomValues(new Uint32Array(1))[0]/Math.pow(2,32)}()*ae)}};const ds=zv;var ec;(function(ae){ae[ae.ERROR=3]="ERROR",ae[ae.INFO=6]="INFO",ae[ae.DEBUG=7]="DEBUG"})(ec||(ec={}));const Fo=ec;class Vo{constructor(V,ie,ke){this.key=V,this.session=ie,this.events=[],this.options=ke||{},this.sent=0,this.uniqueID=0}log(V,ie){V<=this.options.level&&(this.events.push(Ke({},ie,{timestamp:Re.now()})),this.options.limit&&this.events.length>this.options.limit&&this.events.shift())}error(V){this.log(Fo.ERROR,V)}info(V){this.log(Fo.INFO,V)}debug(V){this.log(Fo.DEBUG,V)}isEmpty(){return this.events.length===0}send(V,ie){var ke=Ke({session:this.session,bundle:this.sent+1,key:this.key,lib:"js",version:this.options.version,cluster:this.options.cluster,features:this.options.features,timeline:this.events},this.options.params);return this.events=[],V(ke,($e,lt)=>{$e||this.sent++,ie&&ie($e,lt)}),!0}generateUniqueID(){return this.uniqueID++,this.uniqueID}}class Qr{constructor(V,ie,ke,$e){this.name=V,this.priority=ie,this.transport=ke,this.options=$e||{}}isSupported(){return this.transport.isSupported({useTLS:this.options.useTLS})}connect(V,ie){if(this.isSupported()){if(this.priority<V)return Fl(new te,ie)}else return Fl(new ne,ie);var ke=!1,$e=this.transport.createConnection(this.name,this.priority,this.options.key,this.options),lt=null,kt=function(){$e.unbind("initialized",kt),$e.connect()},Vt=function(){lt=Ri.createHandshake($e,function(wn){ke=!0,Hs(),ie(null,wn)})},us=function(wn){Hs(),ie(wn)},$s=function(){Hs();var wn;wn=zt($e),ie(new B(wn))},Hs=function(){$e.unbind("initialized",kt),$e.unbind("open",Vt),$e.unbind("error",us),$e.unbind("closed",$s)};return $e.bind("initialized",kt),$e.bind("open",Vt),$e.bind("error",us),$e.bind("closed",$s),$e.initialize(),{abort:()=>{ke||(Hs(),lt?lt.close():$e.close())},forceMinPriority:wn=>{ke||this.priority<wn&&(lt?lt.close():$e.close())}}}}function Fl(ae,V){return Re.defer(function(){V(ae)}),{abort:function(){},forceMinPriority:function(){}}}const{Transports:Yv}=ds;var qv=function(ae,V,ie,ke,$e,lt){var kt=Yv[ie];if(!kt)throw new re(ie);var Vt=(!ae.enabledTransports||Te(ae.enabledTransports,V)!==-1)&&(!ae.disabledTransports||Te(ae.disabledTransports,V)===-1),us;return Vt?($e=Object.assign({ignoreNullOrigin:ae.ignoreNullOrigin},$e),us=new Qr(V,ke,lt?lt.getAssistant(kt):kt,$e)):us=Gv,us},Gv={isSupported:function(){return!1},connect:function(ae,V){var ie=Re.defer(function(){V(new ne)});return{abort:function(){ie.ensureAborted()},forceMinPriority:function(){}}}};function Yf(ae){if(ae==null)throw"You must pass an options object";if(ae.cluster==null)throw"Options object must provide a cluster";"disableStats"in ae&&Fe.warn("The disableStats option is deprecated in favor of enableStats")}const Rn=(ae,V)=>{var ie="socket_id="+encodeURIComponent(ae.socketId);for(var ke in V.params)ie+="&"+encodeURIComponent(ke)+"="+encodeURIComponent(V.params[ke]);if(V.paramsProvider!=null){let $e=V.paramsProvider();for(var ke in $e)ie+="&"+encodeURIComponent(ke)+"="+encodeURIComponent($e[ke])}return ie},qf=ae=>{if(typeof ds.getAuthorizers()[ae.transport]>"u")throw`'${ae.transport}' is not a recognized auth transport`;return(V,ie)=>{const ke=Rn(V,ae);ds.getAuthorizers()[ae.transport](ds,ke,ae,C.UserAuthentication,ie)}},Xv=(ae,V)=>{var ie="socket_id="+encodeURIComponent(ae.socketId);ie+="&channel_name="+encodeURIComponent(ae.channelName);for(var ke in V.params)ie+="&"+encodeURIComponent(ke)+"="+encodeURIComponent(V.params[ke]);if(V.paramsProvider!=null){let $e=V.paramsProvider();for(var ke in $e)ie+="&"+encodeURIComponent(ke)+"="+encodeURIComponent($e[ke])}return ie},Vl=ae=>{if(typeof ds.getAuthorizers()[ae.transport]>"u")throw`'${ae.transport}' is not a recognized auth transport`;return(V,ie)=>{const ke=Xv(V,ae);ds.getAuthorizers()[ae.transport](ds,ke,ae,C.ChannelAuthorization,ie)}},Jv=(ae,V,ie)=>{const ke={authTransport:V.transport,authEndpoint:V.endpoint,auth:{params:V.params,headers:V.headers}};return($e,lt)=>{const kt=ae.channel($e.channelName);ie(kt,ke).authorize($e.socketId,lt)}};function Bl(ae,V){let ie={activityTimeout:ae.activityTimeout||y.activityTimeout,cluster:ae.cluster,httpPath:ae.httpPath||y.httpPath,httpPort:ae.httpPort||y.httpPort,httpsPort:ae.httpsPort||y.httpsPort,pongTimeout:ae.pongTimeout||y.pongTimeout,statsHost:ae.statsHost||y.stats_host,unavailableTimeout:ae.unavailableTimeout||y.unavailableTimeout,wsPath:ae.wsPath||y.wsPath,wsPort:ae.wsPort||y.wsPort,wssPort:ae.wssPort||y.wssPort,enableStats:Ul(ae),httpHost:Gf(ae),useTLS:Qv(ae),wsHost:Ga(ae),userAuthenticator:Kf(ae),channelAuthorizer:Jf(ae,V)};return"disabledTransports"in ae&&(ie.disabledTransports=ae.disabledTransports),"enabledTransports"in ae&&(ie.enabledTransports=ae.enabledTransports),"ignoreNullOrigin"in ae&&(ie.ignoreNullOrigin=ae.ignoreNullOrigin),"timelineParams"in ae&&(ie.timelineParams=ae.timelineParams),"nacl"in ae&&(ie.nacl
14=ae.nacl),ie}function Gf(ae){return ae.httpHost?ae.httpHost:ae.cluster?`sockjs-${ae.cluster}.pusher.com`:y.httpHost}function Ga(ae){return ae.wsHost?ae.wsHost:Xf(ae.cluster)}function Xf(ae){return`ws-${ae}.pusher.com`}function Qv(ae){return ds.getProtocol()==="https:"?!0:ae.forceTLS!==!1}function Ul(ae){return"enableStats"in ae?ae.enableStats:"disableStats"in ae?!ae.disableStats:!1}const Pd=ae=>"customHandler"in ae&&ae.customHandler!=null;function Kf(ae){const V=Object.assign(Object.assign({},y.userAuthentication),ae.userAuthentication);return Pd(V)?V.customHandler:qf(V)}function $d(ae,V){let ie;if("channelAuthorization"in ae)ie=Object.assign(Object.assign({},y.channelAuthorization),ae.channelAuthorization);else if(ie={transport:ae.authTransport||y.authTransport,endpoint:ae.authEndpoint||y.authEndpoint},"auth"in ae&&("params"in ae.auth&&(ie.params=ae.auth.params),"headers"in ae.auth&&(ie.headers=ae.auth.headers)),"authorizer"in ae)return{customHandler:Jv(V,ie,ae.authorizer)};return ie}function Jf(ae,V){const ie=$d(ae,V);return Pd(ie)?ie.customHandler:Vl(ie)}class Id extends Je{constructor(V){super(function(ie,ke){Fe.debug(`No callbacks on watchlist events for ${ie}`)}),this.pusher=V,this.bindWatchlistInternalEvent()}handleEvent(V){V.data.events.forEach(ie=>{this.emit(ie.name,ie)})}bindWatchlistInternalEvent(){this.pusher.connection.bind("message",V=>{var ie=V.event;ie==="pusher_internal:watchlist_events"&&this.handleEvent(V)})}}function Zv(){let ae,V;return{promise:new Promise((ke,$e)=>{ae=ke,V=$e}),resolve:ae,reject:V}}const Qf=Zv;class Md extends Je{constructor(V){super(function(ie,ke){Fe.debug("No callbacks on user for "+ie)}),this.signin_requested=!1,this.user_data=null,this.serverToUserChannel=null,this.signinDonePromise=null,this._signinDoneResolve=null,this._onAuthorize=(ie,ke)=>{if(ie){Fe.warn(`Error during signin: ${ie}`),this._cleanup();return}this.pusher.send_event("pusher:signin",{auth:ke.auth,user_data:ke.user_data})},this.pusher=V,this.pusher.connection.bind("state_change",({previous:ie,current:ke})=>{ie!=="connected"&&ke==="connected"&&this._signin(),ie==="connected"&&ke!=="connected"&&(this._cleanup(),this._newSigninPromiseIfNeeded())}),this.watchlist=new Id(V),this.pusher.connection.bind("message",ie=>{var ke=ie.event;ke==="pusher:signin_success"&&this._onSigninSuccess(ie.data),this.serverToUserChannel&&this.serverToUserChannel.name===ie.channel&&this.serverToUserChannel.handleEvent(ie)})}signin(){this.signin_requested||(this.signin_requested=!0,this._signin())}_signin(){this.signin_requested&&(this._newSigninPromiseIfNeeded(),this.pusher.connection.state==="connected"&&this.pusher.config.userAuthenticator({socketId:this.pusher.connection.socket_id},this._onAuthorize))}_onSigninSuccess(V){try{this.user_data=JSON.parse(V.user_data)}catch{Fe.error(`Failed parsing user data after signin: ${V.user_data}`),this._cleanup();return}if(typeof this.user_data.id!="string"||this.user_data.id===""){Fe.error(`user_data doesn't contain an id. user_data: ${this.user_data}`),this._cleanup();return}this._signinDoneResolve(),this._subscribeChannels()}_subscribeChannels(){const V=ie=>{ie.subscriptionPending&&ie.subscriptionCancelled?ie.reinstateSubscription():!ie.subscriptionPending&&this.pusher.connection.state==="connected"&&ie.subscribe()};this.serverToUserChannel=new Gr(`#server-to-user-${this.user_data.id}`,this.pusher),this.serverToUserChannel.bind_global((ie,ke)=>{ie.indexOf("pusher_internal:")===0||ie.indexOf("pusher:")===0||this.emit(ie,ke)}),V(this.serverToUserChannel)}_cleanup(){this.user_data=null,this.serverToUserChannel&&(this.serverToUserChannel.unbind_all(),this.serverToUserChannel.disconnect(),this.serverToUserChannel=null),this.signin_requested&&this._signinDoneResolve()}_newSigninPromiseIfNeeded(){if(!this.signin_requested||this.signinDonePromise&&!this.signinDonePromise.done)return;const{promise:V,resolve:ie}=Qf();V.done=!1;const ke=()=>{V.done=!0};V.then(ke).catch(ke),this.signinDonePromise=V,this._signinDoneResolve=ie}}class qn{static ready(){qn.isReady=!0;for(var V=0,ie=qn.instances.length;V<ie;V++)qn.instances[V].connect()}
14static getClientFeatures(){return Se(ut({ws:ds.Transports.ws},function(V){return V.isSupported({})}))}constructor(V,ie){eb(V),Yf(ie),this.key=V,this.options=ie,this.config=Bl(this.options,this),this.channels=Ri.createChannels(),this.global_emitter=new Je,this.sessionID=ds.randomInt(1e9),this.timeline=new Vo(this.key,this.sessionID,{cluster:this.config.cluster,features:qn.getClientFeatures(),params:this.config.timelineParams||{},limit:50,level:Fo.INFO,version:y.VERSION}),this.config.enableStats&&(this.timelineSender=Ri.createTimelineSender(this.timeline,{host:this.config.statsHost,path:"/timeline/v2/"+ds.TimelineTransport.name}));var ke=$e=>ds.getDefaultStrategy(this.config,$e,qv);this.connection=Ri.createConnectionManager(this.key,{getStrategy:ke,timeline:this.timeline,activityTimeout:this.config.activityTimeout,pongTimeout:this.config.pongTimeout,unavailableTimeout:this.config.unavailableTimeout,useTLS:!!this.config.useTLS}),this.connection.bind("connected",()=>{this.subscribeAll(),this.timelineSender&&this.timelineSender.send(this.connection.isUsingTLS())}),this.connection.bind("message",$e=>{var lt=$e.event,kt=lt.indexOf("pusher_internal:")===0;if($e.channel){var Vt=this.channel($e.channel);Vt&&Vt.handleEvent($e)}kt||this.global_emitter.emit($e.event,$e.data)}),this.connection.bind("connecting",()=>{this.channels.disconnect()}),this.connection.bind("disconnected",()=>{this.channels.disconnect()}),this.connection.bind("error",$e=>{Fe.warn($e)}),qn.instances.push(this),this.timeline.info({instances:qn.instances.length}),this.user=new Md(this),qn.isReady&&this.connect()}switchCluster(V){const{appKey:ie,cluster:ke}=V;this.key=ie,this.options=Object.assign(Object.assign({},this.options),{cluster:ke}),this.config=Bl(this.options,this),this.connection.switchCluster(this.key)}channel(V){return this.channels.find(V)}allChannels(){return this.channels.all()}connect(){if(this.connection.connect(),this.timelineSender&&!this.timelineSenderTimer){var V=this.connection.isUsingTLS(),ie=this.timelineSender;this.timelineSenderTimer=new _e(6e4,function(){ie.send(V)})}}disconnect(){this.connection.disconnect(),this.timelineSenderTimer&&(this.timelineSenderTimer.ensureAborted(),this.timelineSenderTimer=null)}bind(V,ie,ke){return this.global_emitter.bind(V,ie,ke),this}unbind(V,ie,ke){return this.global_emitter.unbind(V,ie,ke),this}bind_global(V){return this.global_emitter.bind_global(V),this}unbind_global(V){return this.global_emitter.unbind_global(V),this}unbind_all(V){return this.global_emitter.unbind_all(),this}subscribeAll(){var V;for(V in this.channels.channels)this.channels.channels.hasOwnProperty(V)&&this.subscribe(V)}subscribe(V){var ie=this.channels.add(V,this);return ie.subscriptionPending&&ie.subscriptionCancelled?ie.reinstateSubscription():!ie.subscriptionPending&&this.connection.state==="connected"&&ie.subscribe(),ie}unsubscribe(V){var ie=this.channels.find(V);ie&&ie.subscriptionPending?ie.cancelSubscription():(ie=this.channels.remove(V),ie&&ie.subscribed&&ie.unsubscribe())}send_event(V,ie,ke){return this.connection.send_event(V,ie,ke)}shouldUseTLS(){return this.config.useTLS}signin(){this.user.signin()}}qn.instances=[],qn.isReady=!1,qn.logToConsole=!1,qn.Runtime=ds,qn.ScriptReceivers=ds.ScriptReceivers,qn.DependenciesReceivers=ds.DependenciesReceivers,qn.auth_callbacks=ds.auth_callbacks;const tc=qn;function eb(ae){if(ae==null)throw"You must pass your app key when you instantiate Pusher."}ds.setup(qn)}},n={};function i(r){var c=n[r];if(c!==void 0)return c.exports;var h=n[r]={exports:{}};return s[r].call(h.exports,h,h.exports,i),h.exports}i.d=(r,c)=>{for(var h in c)i.o(c,h)&&!i.o(r,h)&&Object.defineProperty(r,h,{enumerable:!0,get:c[h]})},i.o=(r,c)=>Object.prototype.hasOwnProperty.call(r,c);var o=i(721);return o})())})(ey)),ey.exports}var TR=CR();const AR=fd(TR);var Xi="top",wr="bottom",Er="right",Ki="left",Mg="auto",pd=[Xi,wr,Er,Ki],ku="start",Wc="end",xT="clippingParents",N1="viewport",Cc="popper",wT="reference",T0=pd.reduce(function(t,e){return t.concat([e+"-"+ku,e+"-"+Wc])},[]),L1=[].concat(pd,[Mg]).reduce(function(t,e){return t.concat([e,e+"-"+ku,e+"-"+Wc])},[]),ET="beforeRead",ST="read",kT="afterRead",CT="beforeMain",TT="main",AT="afterMain",OT="beforeWrite",DT="write",PT="afterWrite",$T=[ET,ST,kT,CT,TT,AT,OT,DT,PT];
vendor: 17,967 bytes, line 14
14function Va(t){return t?(t.nodeName||"").toLowerCase():null}function Sr(t){if(t==null)return window;if(t.toString()!=="[object Window]"){var e=t.ownerDocument;return e&&e.defaultView||window}return t}function Cu(t){var e=Sr(t).Element;return t instanceof e||t instanceof Element}function Lr(t){var e=Sr(t).HTMLElement;return t instanceof e||t instanceof HTMLElement}function R1(t){if(typeof ShadowRoot>"u")return!1;var e=Sr(t).ShadowRoot;return t instanceof e||t instanceof ShadowRoot}function OR(t){var e=t.state;Object.keys(e.elements).forEach(function(s){var n=e.styles[s]||{},i=e.attributes[s]||{},o=e.elements[s];!Lr(o)||!Va(o)||(Object.assign(o.style,n),Object.keys(i).forEach(function(r){var c=i[r];c===!1?o.removeAttribute(r):o.setAttribute(r,c===!0?"":c)}))})}function DR(t){var e=t.state,s={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(e.elements.popper.style,s.popper),e.styles=s,e.elements.arrow&&Object.assign(e.elements.arrow.style,s.arrow),function(){Object.keys(e.elements).forEach(function(n){var i=e.elements[n],o=e.attributes[n]||{},r=Object.keys(e.styles.hasOwnProperty(n)?e.styles[n]:s[n]),c=r.reduce(function(h,f){return h[f]="",h},{});!Lr(i)||!Va(i)||(Object.assign(i.style,c),Object.keys(o).forEach(function(h){i.removeAttribute(h)}))})}}const F1={name:"applyStyles",enabled:!0,phase:"write",fn:OR,effect:DR,requires:["computeStyles"]};function La(t){return t.split("-")[0]}var fu=Math.max,Um=Math.min,zc=Math.round;function A0(){var t=navigator.userAgentData;return t!=null&&t.brands&&Array.isArray(t.brands)?t.brands.map(function(e){return e.brand+"/"+e.version}).join(" "):navigator.userAgent}function IT(){return!/^((?!chrome|android).)*safari/i.test(A0())}function Yc(t,e,s){e===void 0&&(e=!1),s===void 0&&(s=!1);var n=t.getBoundingClientRect(),i=1,o=1;e&&Lr(t)&&(i=t.offsetWidth>0&&zc(n.width)/t.offsetWidth||1,o=t.offsetHeight>0&&zc(n.height)/t.offsetHeight||1);var r=Cu(t)?Sr(t):window,c=r.visualViewport,h=!IT()&&s,f=(n.left+(h&&c?c.offsetLeft:0))/i,v=(n.top+(h&&c?c.offsetTop:0))/o,g=n.width/i,y=n.height/o;return{width:g,height:y,top:v,right:f+g,bottom:v+y,left:f,x:f,y:v}}function V1(t){var e=Yc(t),s=t.offsetWidth,n=t.offsetHeight;return Math.abs(e.width-s)<=1&&(s=e.width),Math.abs(e.height-n)<=1&&(n=e.height),{x:t.offsetLeft,y:t.offsetTop,width:s,height:n}}function MT(t,e){var s=e.getRootNode&&e.getRootNode();if(t.contains(e))return!0;if(s&&R1(s)){var n=e;do{if(n&&t.isSameNode(n))return!0;n=n.parentNode||n.host}while(n)}return!1}function _o(t){return Sr(t).getComputedStyle(t)}function PR(t){return["table","td","th"].indexOf(Va(t))>=0}function wl(t){return((Cu(t)?t.ownerDocument:t.document)||window.document).documentElement}function Ng(t){return Va(t)==="html"?t:t.assignedSlot||t.parentNode||(R1(t)?t.host:null)||wl(t)}function AE(t){return!Lr(t)||_o(t).position==="fixed"?null:t.offsetParent}function $R(t){var e=/firefox/i.test(A0()),s=/Trident/i.test(A0());if(s&&Lr(t)){var n=_o(t);if(n.position==="fixed")return null}var i=Ng(t);for(R1(i)&&(i=i.host);Lr(i)&&["html","body"].indexOf(Va(i))<0;){var o=_o(i);if(o.transform!=="none"||o.perspective!=="none"||o.contain==="paint"||["transform","perspective"].indexOf(o.willChange)!==-1||e&&o.willChange==="filter"||e&&o.filter&&o.filter!=="none")return i;i=i.parentNode}return null}function hf(t){for(var e=Sr(t),s=AE(t);s&&PR(s)&&_o(s).position==="static";)s=AE(s);return s&&(Va(s)==="html"||Va(s)==="body"&&_o(s).position==="static")?e:s||$R(t)||e}function B1(t){return["top","bottom"].indexOf(t)>=0?"x":"y"}function xh(t,e,s){return fu(t,Um(e,s))}function IR(t,e,s){var n=xh(t,e,s);return n>s?s:n}function NT(){return{top:0,right:0,bottom:0,left:0}}function LT(t){return Object.assign({},NT(),t)}function RT(t,e){return e.reduce(function(s,n){return s[n]=t,s},{})}var MR=function(e,s){return e=typeof e=="function"?e(Object.assign({},s.rects,{placement:s.placement})):e,LT(typeof e!="number"?e:RT(e,pd))};function NR(t){var e,s=t.state,n=t.name,i=t.options,o=s.elements.arrow,r=s.modifiersData.popperOffsets,c=La(s.placement),h=B1(c),f=[Ki,Er].indexOf(c)>=0,v=f?"height":"width";if(!(!o||!r)){var g=MR(i.padding,s),y=V1(o),x=h==="y"?Xi:Ki,E=h==="y"?wr:Er,P=s.rects.reference[v]+s.rects.reference[h]-r[h]-s.rects.popper[v],I=r[h]-s.rects.reference[h],D=hf(o),F=D?h==="y"?D.clientHeight||0:D.clientWidth||0:0,C=P/2-I/2,A=g[x],O=F-y[v]-g[E],j=F/2-y[v]/2+C,te=xh(A,j,O),B=h;s.modifiersData[n]=(e={},e[B]=te,e.centerOffset=te-j,e)}}function LR(t){var e=t.state,s=t.options,n=s.element,i=n===void 0?"[data-popper-arrow]":n;i!=null&&(typeof i=="string"&&(i=e.elements.popper.querySelector(i),!i)||MT(e.elements.popper,i)&&(e.elements.arrow=i))}const FT={name:"arrow",enabled:!0,phase:"main",fn:NR,effect:LR,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function qc(t){return t.split("-")[1]}var RR={top:"auto",right:"auto",bottom:"auto",left:"auto"};function FR(t,e){var s=t.x,n=t.y,i=e.devicePixelRatio||1;return{x:zc(s*i)/i||0,y:zc(n*i)/i||0}}function OE(t){var e,s=t.popper,n=t.popperRect,i=t.placement,o=t.variation,r=t.offsets,c=t.position,h=t.gpuAcceleration,f=t.adaptive,v=t.roundOffsets,g=t.isFixed,y=r.x,x=y===void 0?0:y,E=r.y,P=E===void 0?0:E,I=typeof v=="function"?v({x,y:P}):{x,y:P};x=I.x,P=I.y;var D=r.hasOwnProperty("x"),F=r.hasOwnProperty("y"),C=Ki,A=Xi,O=window;if(f){var j=hf(s),te="clientHeight",B="clientWidth";if(j===Sr(s)&&(j=wl(s),_o(j).position!=="static"&&c==="absolute"&&(te="scrollHeight",B="scrollWidth")),j=j,i===Xi||(i===Ki||i===Er)&&o===Wc){A=wr;var z=g&&j===O&&O.visualViewport?O.visualViewport.height:j[te];P-=z-n.height,P*=h?1:-1}if(i===Ki||(i===Xi||i===wr)&&o===Wc){C=Er;var re=g&&j===O&&O.visualViewport?O.visualViewport.width:j[B];x-=re-n.width,x*=h?1:-1}}var ne=Object.assign({position:c},f&&RR),X=v===!0?FR({x,y:P},Sr(s)):{x,y:P};if(x=X.x,P=X.y,h){var G;return Object.assign({},ne,(G={},G[A]=F?"0":"",G[C]=D?"0":"",G.transform=(O.devicePixelRatio||1)<=1?"translate("+x+"px, "+P+"px)":"translate3d("+x+"px, "+P+"px, 0)",G))}return Object.assign({},ne,(e={},e[A]=F?P+"px":"",e[C]=D?x+"px":"",e.transform="",e))}function VR(t){var e=t.state,s=t.options,n=s.gpuAcceleration,i=n===void 0?!0:n,o=s.adaptive,r=o===void 0?!0:o,c=s.roundOffsets,h=c===void 0?!0:c,f={placement:La(e.placement),variation:qc(e.placement),popper:e.elements.popper,popperRect:e.rects.popper,gpuAcceleration:i,isFixed:e.options.strategy==="fixed"};e.modifiersData.popperOffsets!=null&&(e.styles.popper=Object.assign({},e.styles.popper,OE(Object.assign({},f,{offsets:e.modifiersData.popperOffsets,position:e.options.strategy,adaptive:r,roundOffsets:h})))),e.modifiersData.arrow!=null&&(e.styles.arrow=Object.assign({},e.styles.arrow,OE(Object.assign({},f,{offsets:e.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:h})))),e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-placement":e.placement})}const U1={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:VR,data:{}};var Fp={passive:!0};function BR(t){var e=t.state,s=t.instance,n=t.options,i=n.scroll,o=i===void 0?!0:i,r=n.resize,c=r===void 0?!0:r,h=Sr(e.elements.popper),f=[].concat(e.scrollParents.reference,e.scrollParents.popper);return o&&f.forEach(function(v){v.addEventListener("scroll",s.update,Fp)}),c&&h.addEventListener("resize",s.update,Fp),function(){o&&f.forEach(function(v){v.removeEventListener("scroll",s.update,Fp)}),c&&h.removeEventListener("resize",s.update,Fp)}}const j1={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:BR,data:{}};var UR={left:"right",right:"left",bottom:"top",top:"bottom"};function vm(t){return t.replace(/left|right|bottom|top/g,function(e){return UR[e]})}var jR={start:"end",end:"start"};function DE(t){return t.replace(/start|end/g,function(e){return jR[e]})}function H1(t){var e=Sr(t),s=e.pageXOffset,n=e.pageYOffset;return{scrollLeft:s,scrollTop:n}}function W1(t){return Yc(wl(t)).left+H1(t).scrollLeft}function HR(t,e){var s=Sr(t),n=wl(t),i=s.visualViewport,o=n.clientWidth,r=n.clientHeight,c=0,h=0;if(i){o=i.width,r=i.height;var f=IT();(f||!f&&e==="fixed")&&(c=i.offsetLeft,h=i.offsetTop)}return{width:o,height:r,x:c+W1(t),y:h}}function WR(t){var e,s=wl(t),n=H1(t),i=(e=t.ownerDocument)==null?void 0:e.body,o=fu(s.scrollWidth,s.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),r=fu(s.scrollHeight,s.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),c=-n.scrollLeft+W1(t),h=-n.scrollTop;return _o(i||s).direction==="rtl"&&(c+=fu(s.clientWidth,i?i.clientWidth:0)-o),{width:o,height:r,x:c,y:h}}function z1(t){var e=_o(t),s=e.overflow,n=e.overflowX,i=e.overflowY;return/auto|scroll|overlay|hidden/.test(s+i+n)}function VT(t){return["html","body","#document"].indexOf(Va(t))>=0?t.ownerDocument.body:Lr(t)&&z1(t)?t:VT(Ng(t))}function wh(t,e){var s;e===void 0&&(e=[]);var n=VT(t),i=n===((s=t.ownerDocument)==null?void 0:s.body),o=Sr(n),r=i?[o].concat(o.visualViewport||[],z1(n)?n:[]):n,c=e.concat(r);return i?c:c.concat(wh(Ng(r)))}function O0(t){return Object.assign({},t,{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function zR(t,e){var s=Yc(t,!1,e==="fixed");return s.top=s.top+t.clientTop,s.left=s.left+t.clientLeft,s.bottom=s.top+t.clientHeight,s.right=s.left+t.clientWidth,s.width=t.clientWidth,s.height=t.clientHeight,s.x=s.left,s.y=s.top,s}function PE(t,e,s){return e===N1?O0(HR(t,s)):Cu(e)?zR(e,s):O0(WR(wl(t)))}function YR(t){var e=wh(Ng(t)),s=["absolute","fixed"].indexOf(_o(t).position)>=0,n=s&&Lr(t)?hf(t):t;return Cu(n)?e.filter(function(i){return Cu(i)&&MT(i,n)&&Va(i)!=="body"}):[]}function qR(t,e,s,n){var i=e==="clippingParents"?YR(t):[].concat(e),o=[].concat(i,[s]),r=o[0],c=o.reduce(function(h,f){var v=PE(t,f,n);return h.top=fu(v.top,h.top),h.right=Um(v.right,h.right),h.bottom=Um(v.bottom,h.bottom),h.left=fu(v.left,h.left),h},PE(t,r,n));return c.width=c.right-c.left,c.height=c.bottom-c.top,c.x=c.left,c.y=c.top,c}function BT(t){var e=t.reference,s=t.element,n=t.placement,i=n?La(n):null,o=n?qc(n):null,r=e.x+e.width/2-s.width/2,c=e.y+e.height/2-s.height/2,h;switch(i){case Xi:h={x:r,y:e.y-s.height};break;case wr:h={x:r,y:e.y+e.height};break;case Er:h={x:e.x+e.width,y:c};break;case Ki:h={x:e.x-s.width,y:c};break;default:h={x:e.x,y:e.y}}var f=i?B1(i):null;if(f!=null){var v=f==="y"?"height":"width";switch(o){case ku:h[f]=h[f]-(e[v]/2-s[v]/2);break;case Wc:h[f]=h[f]+(e[v]/2-s[v]/2);break}}return h}function Gc(t,e){e===void 0&&(e={});var s=e,n=s.placement,i=n===void 0?t.placement:n,o=s.strategy,r=o===void 0?t.strategy:o,c=s.boundary,h=c===void 0?xT:c,f=s.rootBoundary,v=f===void 0?N1:f,g=s.elementContext,y=g===void 0?Cc:g,x=s.altBoundary,E=x===void 0?!1:x,P=s.padding,I=P===void 0?0:P,D=LT(typeof I!="number"?I:RT(I,pd)),F=y===Cc?wT:Cc,C=t.rects.popper,A=t.elements[E?F:y],O=qR(Cu(A)?A:A.contextElement||wl(t.elements.popper),h,v,r),j=Yc(t.elements.reference),te=BT({reference:j,element:C,placement:i}),B=O0(Object.assign({},C,te)),z=y===Cc?B:j,re={top:O.top-z.top+D.top,bottom:z.bottom-O.bottom+D.bottom,left:O.left-z.left+D.left,right:z.right-O.right+D.right},ne=t.modifiersData.offset;if(y===Cc&&ne){var X=ne[i];Object.keys(re).forEach(function(G){var ce=[Er,wr].indexOf(G)>=0?1:-1,be=[Xi,wr].indexOf(G)>=0?"y":"x";re[G]+=X[be]*ce})}return re}function GR(t,e){e===void 0&&(e={});var s=e,n=s.placement,i=s.boundary,o=s.rootBoundary,r=s.padding,c=s.flipVariations,h=s.allowedAutoPlacements,f=h===void 0?L1:h,v=qc(n),g=v?c?T0:T0.filter(function(E){return qc(E)===v}):pd,y=g.filter(function(E){return f.indexOf(E)>=0});y.length===0&&(y=g);var x=y.reduce(function(E,P){return E[P]=Gc(t,{placement:P,boundary:i,rootBoundary:o,padding:r})[La(P)],E},{});return Object.keys(x).sort(function(E,P){return x[E]-x[P]})}function XR(t){if(La(t)===Mg)return[];var e=vm(t);return[DE(t),e,DE(e)]}function KR(t){var e=t.state,s=t.options,n=t.name;if(!e.modifiersData[n]._skip){for(var i=s.mainAxis,o=i===void 0?!0:i,r=s.altAxis,c=r===void 0?!0:r,h=s.fallbackPlacements,f=s.padding,v=s.boundary,g=s.rootBoundary,y=s.altBoundary,x=s.flipVariations,E=x===void 0?!0:x,P=s.allowedAutoPlacements,I=e.options.placement,D=La(I),F=D===I,C=h||(F||!E?[vm(I)]:XR(I)),A=[I].concat(C).reduce(function(K,H){return K.concat(La(H)===Mg?GR(e,{placement:H,boundary:v,rootBoundary:g,padding:f,flipVariations:E,allowedAutoPlacements:P}):H)},[]),O=e.rects.reference,j=e.rects.popper,te=new Map,B=!0,z=A[0],re=0;re<A.length;re++){var ne=A[re],X=La(ne),G=qc(ne)===ku,ce=[Xi,wr].indexOf(X)>=0,be=ce?"width":"height",J=Gc(e,{placement:ne,boundary:v,rootBoundary:g,altBoundary:y,padding:f}),Z=ce?G?Er:Ki:G?wr:Xi;O[be]>j[be]&&(Z=vm(Z));var ge=vm(Z),q=[];if(o&&q.push(J[X]<=0),c&&q.push(J[Z]<=0,J[ge]<=0),q.every(function(K){return K})){z=ne,B=!1;break}te.set(ne,q)}if(B)for(var W=E?3:1,M=function(H){var Ee=A.find(function(_e){var Ce=te.get(_e);if(Ce)return Ce.slice(0,H).every(function(Re){return Re})});if(Ee)return z=Ee,"break"},he=W;he>0;he--){var oe=M(he);if(oe==="break")break}e.placement!==z&&(e.modifiersData[n]._skip=!0,e.placement=z,e.reset=!0)}}const UT={name:"flip",enabled:!0,phase:"main",fn:KR,requiresIfExists:["offset"],data:{_skip:!1}};function $E(t,e,s){return s===void 0&&(s={x:0,y:0}),{top:t.top-e.height-s.y,right:t.right-e.width+s.x,bottom:t.bottom-e.height+s.y,left:t.left-e.width-s.x}}function IE(t){return[Xi,Er,wr,Ki].some(function(e){return t[e]>=0})}function JR(t){var e=t.state,s=t.name,n=e.rects.reference,i=e.rects.popper,o=e.modifiersData.preventOverflow,r=Gc(e,{elementContext:"reference"}),c=Gc(e,{altBoundary:!0}),h=$E(r,n),f=$E(c,i,o),v=IE(h),g=IE(f);e.modifiersData[s]={referenceClippingOffsets:h,popperEscapeOffsets:f,isReferenceHidden:v,hasPopperEscaped:g},e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-reference-hidden":v,"data-popper-escaped":g})}const jT={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:JR};function QR(t,e,s){var n=La(t),i=[Ki,Xi].indexOf(n)>=0?-1:1,o=typeof s=="function"?s(Object.assign({},e,{placement:t})):s,r=o[0],c=o[1];return r=r||0,c=(c||0)*i,[Ki,Er].indexOf(n)>=0?{x:c,y:r}:{x:r,y:c}}function ZR(t){var e=t.state,s=t.options,n=t.name,i=s.offset,o=i===void 0?[0,0]:i,r=L1.reduce(function(v,g){return v[g]=QR(g,e.rects,o),v},{}),c=r[e.placement],h=c.x,f=c.y;e.modifiersData.popperOffsets!=null&&(e.modifiersData.popperOffsets.x+=h,e.modifiersData.popperOffsets.y+=f),e.modifiersData[n]=r}const HT={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:ZR};function e3(t){var e=t.state,s=t.name;e.modifiersData[s]=BT({reference:e.rects.reference,element:e.rects.popper,placement:e.placement})}const Y1={name:"popperOffsets",enabled:!0,phase:"read",fn:e3,data:{}};function t3(t){return t==="x"?"y":"x"}function s3(t){var e=t.state,s=t.options,n=t.name,i=s.mainAxis,o=i===void 0?!0:i,r=s.altAxis,c=r===void 0?!1:r,h=s.boundary,f=s.rootBoundary,v=s.altBoundary,g=s.padding,y=s.tether,x=y===void 0?!0:y,E=s.tetherOffset,P=E===void 0?0:E,I=Gc(e,{boundary:h,rootBoundary:f,padding:g,altBoundary:v}),D=La(e.placement),F=qc(e.placement),C=!F,A=B1(D),O=t3(A),j=e.modifiersData.popperOffsets,te=e.rects.reference,B=e.rects.popper,z=typeof P=="function"?P(Object.assign({},e.rects,{placement:e.placement})):P,re=typeof z=="number"?{mainAxis:z,altAxis:z}:Object.assign({mainAxis:0,altAxis:0},z),ne=e.modifiersData.offset?e.modifiersData.offset[e.placement]:null,X={x:0,y:0};if(j){if(o){var G,ce=A==="y"?Xi:Ki,be=A==="y"?wr:Er,J=A==="y"?"height":"width",Z=j[A],ge=Z+I[ce],q=Z-I[be],W=x?-B[J]/2:0,M=F===ku?te[J]:B[J],he=F===ku?-B[J]:-te[J],oe=e.elements.arrow,K=x&&oe?V1(oe):{width:0,height:0},H=e.modifiersData["arrow#persistent"]?e.modifiersData["arrow#persistent"].padding:NT(),Ee=H[ce],_e=H[be],Ce=xh(0,te[J],K[J]),Re=C?te[J]/2-W-Ce-Ee-re.mainAxis:M-Ce-Ee-re.mainAxis,Ke=C?-te[J]/2+W+Ce+_e+re.mainAxis:he+Ce+_e+re.mainAxis,Be=e.elements.arrow&&hf(e.elements.arrow),Te=Be?A==="y"?Be.clientTop||0:Be.clientLeft||0:0,Q=(G=ne==null?void 0:ne[A])!=null?G:0,Se=Z+Re-Q-Te,Ve=Z+Ke-Q,Qe=xh(x?Um(ge,Se):ge,Z,x?fu(q,Ve):q);j[A]=Qe,X[A]=Qe-Z}if(c){var je,nt=A==="x"?Xi:Ki,ft=A==="x"?wr:Er,ut=j[O],Ye=O==="y"?"height":"width",We=ut+I[nt],ot=ut-I[ft],ht=[Xi,Ki].indexOf(D)!==-1,Tt=(je=ne==null?void 0:ne[O])!=null?je:0,Ot=ht?We:ut-te[Ye]-B[Ye]-Tt+re.altAxis,zt=ht?ut+te[Ye]+B[Ye]-Tt-re.altAxis:ot,Kt=x&&ht?IR(Ot,ut,zt):xh(x?Ot:We,ut,x?zt:ot);j[O]=Kt,X[O]=Kt-ut}e.modifiersData[n]=X}}const WT={name:"preventOverflow",enabled:!0,phase:"main",fn:s3,requiresIfExists:["offset"]};function n3(t){return{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}}function i3(t){return t===Sr(t)||!Lr(t)?H1(t):n3(t)}function r3(t){var e=t.getBoundingClientRect(),s=zc(e.width)/t.offsetWidth||1,n=zc(e.height)/t.offsetHeight||1;return s!==1||n!==1}function a3(t,e,s){s===void 0&&(s=!1);var n=Lr(e),i=Lr(e)&&r3(e),o=wl(e),r=Yc(t,i,s),c={scrollLeft:0,scrollTop:0},h={x:0,y:0};return(n||!n&&!s)&&((Va(e)!=="body"||z1(o))&&(c=i3(e)),Lr(e)?(h=Yc(e,!0),h.x+=e.clientLeft,h.y+=e.clientTop):o&&(h.x=W1(o))),{x:r.left+c.scrollLeft-h.x,y:r.top+c.scrollTop-h.y,width:r.width,height:r.height}}function o3(t){var e=new Map,s=new Set,n=[];t.forEach(function(o){e.set(o.name,o)});function i(o){s.add(o.name);var r=[].concat(o.requires||[],o.requiresIfExists||[]);r.forEach(function(c){if(!s.has(c)){var h=e.get(c);h&&i(h)}}),n.push(o)}return t.forEach(function(o){s.has(o.name)||i(o)}),n}function l3(t){var e=o3(t);return $T.reduce(function(s,n){return s.concat(e.filter(function(i){return i.phase===n}))},[])}function u3(t){var e;return function(){return e||(e=new Promise(function(s){Promise.resolve().then(function(){e=void 0,s(t())})})),e}}function c3(t){var e=t.reduce(function(s,n){var i=s[n.name];return s[n.name]=i?Object.assign({},i,n,{options:Object.assign({},i.options,n.options),data:Object.assign({},i.data,n.data)}):n,s},{});return Object.keys(e).map(function(s){return e[s]})}var ME={placement:"bottom",modifiers:[],strategy:"absolute"};function NE(){for(var t=arguments.length,e=new Array(t),s=0;s<t;s++)e[s]=arguments[s];
vendor: 4,686 bytes, lines 14-18
14return!e.some(function(n){return!(n&&typeof n.getBoundingClientRect=="function")})}function Lg(t){t===void 0&&(t={});var e=t,s=e.defaultModifiers,n=s===void 0?[]:s,i=e.defaultOptions,o=i===void 0?ME:i;return function(c,h,f){f===void 0&&(f=o);var v={placement:"bottom",orderedModifiers:[],options:Object.assign({},ME,o),modifiersData:{},elements:{reference:c,popper:h},attributes:{},styles:{}},g=[],y=!1,x={state:v,setOptions:function(D){var F=typeof D=="function"?D(v.options):D;P(),v.options=Object.assign({},o,v.options,F),v.scrollParents={reference:Cu(c)?wh(c):c.contextElement?wh(c.contextElement):[],popper:wh(h)};var C=l3(c3([].concat(n,v.options.modifiers)));return v.orderedModifiers=C.filter(function(A){return A.enabled}),E(),x.update()},forceUpdate:function(){if(!y){var D=v.elements,F=D.reference,C=D.popper;if(NE(F,C)){v.rects={reference:a3(F,hf(C),v.options.strategy==="fixed"),popper:V1(C)},v.reset=!1,v.placement=v.options.placement,v.orderedModifiers.forEach(function(re){return v.modifiersData[re.name]=Object.assign({},re.data)});for(var A=0;A<v.orderedModifiers.length;A++){if(v.reset===!0){v.reset=!1,A=-1;continue}var O=v.orderedModifiers[A],j=O.fn,te=O.options,B=te===void 0?{}:te,z=O.name;typeof j=="function"&&(v=j({state:v,options:B,name:z,instance:x})||v)}}}},update:u3(function(){return new Promise(function(I){x.forceUpdate(),I(v)})}),destroy:function(){P(),y=!0}};if(!NE(c,h))return x;x.setOptions(f).then(function(I){!y&&f.onFirstUpdate&&f.onFirstUpdate(I)});function E(){v.orderedModifiers.forEach(function(I){var D=I.name,F=I.options,C=F===void 0?{}:F,A=I.effect;if(typeof A=="function"){var O=A({state:v,name:D,instance:x,options:C}),j=function(){};g.push(O||j)}})}function P(){g.forEach(function(I){return I()}),g=[]}return x}}var d3=Lg(),h3=[j1,Y1,U1,F1],f3=Lg({defaultModifiers:h3}),p3=[j1,Y1,U1,F1,HT,UT,WT,FT,jT],q1=Lg({defaultModifiers:p3});const zT=Object.freeze(Object.defineProperty({__proto__:null,afterMain:AT,afterRead:kT,afterWrite:PT,applyStyles:F1,arrow:FT,auto:Mg,basePlacements:pd,beforeMain:CT,beforeRead:ET,beforeWrite:OT,bottom:wr,clippingParents:xT,computeStyles:U1,createPopper:q1,createPopperBase:d3,createPopperLite:f3,detectOverflow:Gc,end:Wc,eventListeners:j1,flip:UT,hide:jT,left:Ki,main:TT,modifierPhases:$T,offset:HT,placements:L1,popper:Cc,popperGenerator:Lg,popperOffsets:Y1,preventOverflow:WT,read:ST,reference:wT,right:Er,start:ku,top:Xi,variationPlacements:T0,viewport:N1,write:DT},Symbol.toStringTag,{value:"Module"}));/*! 15 * Bootstrap v5.3.8 (https://getbootstrap.com/) 16 * Copyright 2011-2025 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) 17 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) 18 */const Jo=new Map,ty={set(t,e,s){Jo.has(t)||Jo.set(t,new Map);const n=Jo.get(t);if(!n.has(e)&&n.size!==0){console.error(`Bootstrap doesn't allow more than one instance per element. Bound instance: ${Array.from(n.keys())[0]}.`);return}n.set(e,s)},get(t,e){return Jo.has(t)&&Jo.get(t).get(e)||null},remove(t,e){if(!Jo.has(t))return;const s=Jo.get(t);s.delete(e),s.size===0&&Jo.delete(t)}},m3=1e6,g3=1e3,D0="transitionend",YT=t=>(t&&window.CSS&&window.CSS.escape&&(t=t.replace(/#([^\s"#']+)/g,(e,s)=>`#${CSS.escape(s)}`)),t),v3=t=>t==null?`${t}`:Object.prototype.toString.call(t).match(/\s([a-z]+)/i)[1].toLowerCase(),b3=t=>{do t+=Math.floor(Math.random()*m3);while(document.getElementById(t));return t},y3=t=>{if(!t)return 0;let{transitionDuration:e,transitionDelay:s}=window.getComputedStyle(t);const n=Number.parseFloat(e),i=Number.parseFloat(s);return!n&&!i?0:(e=e.split(",")[0],s=s.split(",")[0],(Number.parseFloat(e)+Number.parseFloat(s))*g3)},qT=t=>{t.dispatchEvent(new Event(D0))},po=t=>!t||typeof t!="object"?!1:(typeof t.jquery<"u"&&(t=t[0]),typeof t.nodeType<"u"),bl=t=>po(t)?t.jquery?t[0]:t:typeof t=="string"&&t.length>0?document.querySelector(YT(t)):null,md=t=>{if(!po(t)||t.getClientRects().length===0)return!1;const e=getComputedStyle(t).getPropertyValue("visibility")==="visible",s=t.closest("details:not([open])");if(!s)return e;if(s!==t){const n=t.closest("summary");if(n&&n.parentNode!==s||n===null)return!1}return e},yl=t=>!t||t.nodeType!==Node.ELEMENT_NODE||t.classList.contains("disabled")?!0:typeof t.disabled<"u"?t.disabled:t.hasAttribute("disabled")&&t.getAttribute("disabled")!=="false",GT=t=>{if(!document.documentElement.attachShadow)return null;if(typeof t.getRootNode=="function"){const e=t.getRootNode();return e instanceof ShadowRoot?e:null}return t instanceof ShadowRoot?t:t.parentNode?GT(t.parentNode):null},jm=()=>{},ff=t=>{t.offsetHeight},XT=()=>window.jQuery&&!document.body.hasAttribute("data-bs-no-jquery")?window.jQuery:null,
vendor: 8,411 bytes, line 18
18sy=[],_3=t=>{document.readyState==="loading"?(sy.length||document.addEventListener("DOMContentLoaded",()=>{for(const e of sy)e()}),sy.push(t)):t()},Ur=()=>document.documentElement.dir==="rtl",Yr=t=>{_3(()=>{const e=XT();if(e){const s=t.NAME,n=e.fn[s];e.fn[s]=t.jQueryInterface,e.fn[s].Constructor=t,e.fn[s].noConflict=()=>(e.fn[s]=n,t.jQueryInterface)}})},rr=(t,e=[],s=t)=>typeof t=="function"?t.call(...e):s,KT=(t,e,s=!0)=>{if(!s){rr(t);return}const i=y3(e)+5;let o=!1;const r=({target:c})=>{c===e&&(o=!0,e.removeEventListener(D0,r),rr(t))};e.addEventListener(D0,r),setTimeout(()=>{o||qT(e)},i)},G1=(t,e,s,n)=>{const i=t.length;let o=t.indexOf(e);return o===-1?!s&&n?t[i-1]:t[0]:(o+=s?1:-1,n&&(o=(o+i)%i),t[Math.max(0,Math.min(o,i-1))])},x3=/[^.]*(?=\..*)\.|.*/,w3=/\..*/,E3=/::\d+$/,ny={};let LE=1;const JT={mouseenter:"mouseover",mouseleave:"mouseout"},S3=new Set(["click","dblclick","mouseup","mousedown","contextmenu","mousewheel","DOMMouseScroll","mouseover","mouseout","mousemove","selectstart","selectend","keydown","keypress","keyup","orientationchange","touchstart","touchmove","touchend","touchcancel","pointerdown","pointermove","pointerup","pointerleave","pointercancel","gesturestart","gesturechange","gestureend","focus","blur","change","reset","select","submit","focusin","focusout","load","unload","beforeunload","resize","move","DOMContentLoaded","readystatechange","error","abort","scroll"]);function QT(t,e){return e&&`${e}::${LE++}`||t.uidEvent||LE++}function ZT(t){const e=QT(t);return t.uidEvent=e,ny[e]=ny[e]||{},ny[e]}function k3(t,e){return function s(n){return X1(n,{delegateTarget:t}),s.oneOff&&bt.off(t,n.type,e),e.apply(t,[n])}}function C3(t,e,s){return function n(i){const o=t.querySelectorAll(e);for(let{target:r}=i;r&&r!==this;r=r.parentNode)for(const c of o)if(c===r)return X1(i,{delegateTarget:r}),n.oneOff&&bt.off(t,i.type,e,s),s.apply(r,[i])}}function eA(t,e,s=null){return Object.values(t).find(n=>n.callable===e&&n.delegationSelector===s)}function tA(t,e,s){const n=typeof e=="string",i=n?s:e||s;let o=sA(t);return S3.has(o)||(o=t),[n,i,o]}function RE(t,e,s,n,i){if(typeof e!="string"||!t)return;let[o,r,c]=tA(e,s,n);e in JT&&(r=(E=>function(P){if(!P.relatedTarget||P.relatedTarget!==P.delegateTarget&&!P.delegateTarget.contains(P.relatedTarget))return E.call(this,P)})(r));const h=ZT(t),f=h[c]||(h[c]={}),v=eA(f,r,o?s:null);if(v){v.oneOff=v.oneOff&&i;return}const g=QT(r,e.replace(x3,"")),y=o?C3(t,s,r):k3(t,r);y.delegationSelector=o?s:null,y.callable=r,y.oneOff=i,y.uidEvent=g,f[g]=y,t.addEventListener(c,y,o)}function P0(t,e,s,n,i){const o=eA(e[s],n,i);o&&(t.removeEventListener(s,o,!!i),delete e[s][o.uidEvent])}function T3(t,e,s,n){const i=e[s]||{};for(const[o,r]of Object.entries(i))o.includes(n)&&P0(t,e,s,r.callable,r.delegationSelector)}function sA(t){return t=t.replace(w3,""),JT[t]||t}const bt={on(t,e,s,n){RE(t,e,s,n,!1)},one(t,e,s,n){RE(t,e,s,n,!0)},off(t,e,s,n){if(typeof e!="string"||!t)return;const[i,o,r]=tA(e,s,n),c=r!==e,h=ZT(t),f=h[r]||{},v=e.startsWith(".");if(typeof o<"u"){if(!Object.keys(f).length)return;P0(t,h,r,o,i?s:null);return}if(v)for(const g of Object.keys(h))T3(t,h,g,e.slice(1));for(const[g,y]of Object.entries(f)){const x=g.replace(E3,"");(!c||e.includes(x))&&P0(t,h,r,y.callable,y.delegationSelector)}},trigger(t,e,s){if(typeof e!="string"||!t)return null;const n=XT(),i=sA(e),o=e!==i;let r=null,c=!0,h=!0,f=!1;o&&n&&(r=n.Event(e,s),n(t).trigger(r),c=!r.isPropagationStopped(),h=!r.isImmediatePropagationStopped(),f=r.isDefaultPrevented());const v=X1(new Event(e,{bubbles:c,cancelable:!0}),s);return f&&v.preventDefault(),h&&t.dispatchEvent(v),v.defaultPrevented&&r&&r.preventDefault(),v}};function X1(t,e={}){for(const[s,n]of Object.entries(e))try{t[s]=n}catch{Object.defineProperty(t,s,{configurable:!0,get(){return n}})}return t}function FE(t){if(t==="true")return!0;if(t==="false")return!1;if(t===Number(t).toString())return Number(t);if(t===""||t==="null")return null;if(typeof t!="string")return t;try{return JSON.parse(decodeURIComponent(t))}catch{return t}}function iy(t){return t.replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`)}const mo={setDataAttribute(t,e,s){t.setAttribute(`data-bs-${iy(e)}`,s)},removeDataAttribute(t,e){t.removeAttribute(`data-bs-${iy(e)}`)},getDataAttributes(t){if(!t)return{};const e={},s=Object.keys(t.dataset).filter(n=>n.startsWith("bs")&&!n.startsWith("bsConfig"));for(const n of s){let i=n.replace(/^bs/,"");i=i.charAt(0).toLowerCase()+i.slice(1),e[i]=FE(t.dataset[n])}return e},getDataAttribute(t,e){return FE(t.getAttribute(`data-bs-${iy(e)}`))}};class pf{static get Default(){return{}}static get DefaultType(){return{}}static get NAME(){throw new Error('You have to implement the static method "NAME", for each component!')}_getConfig(e){return e=this._mergeConfigObj(e),e=this._configAfterMerge(e),this._typeCheckConfig(e),e}_configAfterMerge(e){return e}_mergeConfigObj(e,s){const n=po(s)?mo.getDataAttribute(s,"config"):{};return{...this.constructor.Default,...typeof n=="object"?n:{},...po(s)?mo.getDataAttributes(s):{},...typeof e=="object"?e:{}}}_typeCheckConfig(e,s=this.constructor.DefaultType){for(const[n,i]of Object.entries(s)){const o=e[n],r=po(o)?"element":v3(o);if(!new RegExp(i).test(r))throw new TypeError(`${this.constructor.NAME.toUpperCase()}: Option "${n}" provided type "${r}" but expected type "${i}".`)}}}const A3="5.3.8";class fa extends pf{constructor(e,s){super(),e=bl(e),e&&(this._element=e,this._config=this._getConfig(s),ty.set(this._element,this.constructor.DATA_KEY,this))}dispose(){ty.remove(this._element,this.constructor.DATA_KEY),bt.off(this._element,this.constructor.EVENT_KEY);for(const e of Object.getOwnPropertyNames(this))this[e]=null}_queueCallback(e,s,n=!0){KT(e,s,n)}_getConfig(e){return e=this._mergeConfigObj(e,this._element),e=this._configAfterMerge(e),this._typeCheckConfig(e),e}static getInstance(e){return ty.get(bl(e),this.DATA_KEY)}static getOrCreateInstance(e,s={}){return this.getInstance(e)||new this(e,typeof s=="object"?s:null)}static get VERSION(){return A3}static get DATA_KEY(){return`bs.${this.NAME}`}static get EVENT_KEY(){return`.${this.DATA_KEY}`}static eventName(e){return`${e}${this.EVENT_KEY}`}}const ry=t=>{let e=t.getAttribute("data-bs-target");if(!e||e==="#"){let s=t.getAttribute("href");if(!s||!s.includes("#")&&!s.startsWith("."))return null;s.includes("#")&&!s.startsWith("#")&&(s=`#${s.split("#")[1]}`),e=s&&s!=="#"?s.trim():null}return e?e.split(",").map(s=>YT(s)).join(","):null},ts={find(t,e=document.documentElement){return[].concat(...Element.prototype.querySelectorAll.call(e,t))},findOne(t,e=document.documentElement){return Element.prototype.querySelector.call(e,t)},children(t,e){return[].concat(...t.children).filter(s=>s.matches(e))},parents(t,e){const s=[];let n=t.parentNode.closest(e);for(;n;)s.push(n),n=n.parentNode.closest(e);return s},prev(t,e){let s=t.previousElementSibling;for(;s;){if(s.matches(e))return[s];s=s.previousElementSibling}return[]},next(t,e){let s=t.nextElementSibling;for(;s;){if(s.matches(e))return[s];s=s.nextElementSibling}return[]},focusableChildren(t){const e=["a","button","input","textarea","select","details","[tabindex]",'[contenteditable="true"]'].map(s=>`${s}:not([tabindex^="-"])`).join(",");return this.find(e,t).filter(s=>!yl(s)&&md(s))},getSelectorFromElement(t){const e=ry(t);return e&&ts.findOne(e)?e:null},getElementFromSelector(t){const e=ry(t);return e?ts.findOne(e):null},getMultipleElementsFromSelector(t){const e=ry(t);return e?ts.find(e):[]}},Rg=(t,e="hide")=>{const s=`click.dismiss${t.EVENT_KEY}`,n=t.NAME;bt.on(document,s,`[data-bs-dismiss="${n}"]`,function(i){if(["A","AREA"].includes(this.tagName)&&i.preventDefault(),yl(this))return;const o=ts.getElementFromSelector(this)||this.closest(`.${n}`);t.getOrCreateInstance(o)[e]()})},O3="alert",D3="bs.alert",nA=`.${D3}`,P3=`close${nA}`,$3=`closed${nA}`,I3="fade",M3="show";class mf extends fa{static get NAME(){return O3}close(){if(bt.trigger(this._element,P3).defaultPrevented)return;this._element.classList.remove(M3);const s=this._element.classList.contains(I3);this._queueCallback(()=>this._destroyElement(),this._element,s)}_destroyElement(){this._element.remove(),bt.trigger(this._element,$3),this.dispose()}static jQueryInterface(e){return this.each(function(){const s=mf.getOrCreateInstance(this);if(typeof e=="string"){if(s[e]===void 0||e.startsWith("_")||e==="constructor")throw new TypeError(`No method n
18amed "${e}"`);s[e](this)}})}}Rg(mf,"close");Yr(mf);const N3="button",L3="bs.button",R3=`.${L3}`,F3=".data-api",V3="active",VE='[data-bs-toggle="button"]',B3=`click${R3}${F3}`;class gf extends fa{static get NAME(){return N3}toggle(){this._element.setAttribute("aria-pressed",this._element.classList.toggle(V3))}static jQueryInterface(e){return this.each(function(){const s=gf.getOrCreateInstance(this);e==="toggle"&&s[e]()})}}bt.on(document,B3,VE,t=>{t.preventDefault();const e=t.target.closest(VE);gf.getOrCreateInstance(e).toggle()});Yr(gf);const U3="swipe",gd=".bs.swipe",j3=`touchstart${gd}`,H3=`touchmove${gd}`,W3=`touchend${gd}`,z3=`pointerdown${gd}`,Y3=`pointerup${gd}`,q3="touch",G3="pen",X3="pointer-event",K3=40,J3={endCallback:null,leftCallback:null,rightCallback:null},Q3={endCallback:"(function|null)",leftCallback:"(function|null)",rightCallback:"(function|null)"};class Hm extends pf{constructor(e,s){super(),this._element=e,!(!e||!Hm.isSupported())&&(this._config=this._getConfig(s),this._deltaX=0,this._supportPointerEvents=!!window.PointerEvent,this._initEvents())}static get Default(){return J3}static get DefaultType(){return Q3}static get NAME(){return U3}dispose(){bt.off(this._element,gd)}_start(e){if(!this._supportPointerEvents){this._deltaX=e.touches[0].clientX;return}this._eventIsPointerPenTouch(e)&&(this._deltaX=e.clientX)}_end(e){this._eventIsPointerPenTouch(e)&&(this._deltaX=e.clientX-this._deltaX),this._handleSwipe(),rr(this._config.endCallback)}_move(e){this._deltaX=e.touches&&e.touches.length>1?0:e.touches[0].clientX-this._deltaX}_handleSwipe(){const e=Math.abs(this._deltaX);if(e<=K3)return;const s=e/this._deltaX;this._deltaX=0,s&&rr(s>0?this._config.rightCallback:this._config.leftCallback)}_initEvents(){this._supportPointerEvents?(bt.on(this._element,z3,e=>this._start(e)),bt.on(this._element,Y3,e=>this._end(e)),this._element.classList.add(X3)):(bt.on(this._element,j3,e=>this._start(e)),bt.on(this._element,H3,e=>this._move(e)),bt.on(this._element,W3,e=>this._end(e)))}_eventIsPointerPenTouch(e){return this._supportPointerEvents&&(e.pointerType===G3||e.pointerType===q3)}static isSupported(){return"ontouchstart"in document.documentElement||navigator.maxTouchPoints>0}}const Z3="carousel",e4="bs.carousel",El=`.${e4}`,iA=".data-api",t4="ArrowLeft",s4="ArrowRight",n4=500,th="next",mc="prev",Tc="left",bm="right",i4=`slide${El}`,ay=`slid${El}`,r4=`keydown${El}`,a4=`mouseenter${El}`,o4=`mouseleave${El}`,l4=`dragstart${El}`,u4=`load${El}${iA}`,c4=`click${El}${iA}`,rA="carousel",Vp="active",d4="slide",h4="carousel-item-end",f4="carousel-item-start",p4="carousel-item-next",m4="carousel-item-prev",aA=".active",oA=".carousel-item",g4=aA+oA,v4=".carousel-item img",b4=".carousel-indicators",y4="[data-bs-slide], [data-bs-slide-to]",_4='[data-bs-ride="carousel"]',x4={[t4]:bm,[s4]:Tc},w4={interval:5e3,keyboard:!0,pause:"hover",ride:!1,touch:!0,wrap:!0},E4={interval:"(number|boolean)",keyboard:"boolean",pause:"(string|boolean)",ride:"(boolean|string)",touch:"boolean",wrap:"boolean"};class vd extends fa{constructor(e,s){super(e,s),this._interval=null,this._activeElement=null,this._isSliding=!1,this.touchTimeout=null,this._swipeHelper=null,this._indicatorsElement=ts.findOne(b4,this._element),this._addEventListeners(),this._config.ride===rA&&this.cycle()}static get Default(){return w4}static get DefaultType(){return E4}static get NAME(){return Z3}next(){this._slide(th)}nextWhenVisible(){!document.hidden&&md(this._element)&&this.next()}prev(){this._slide(mc)}pause(){this._isSliding&&qT(this._element),this._clearInterval()}cycle(){this._clearInterval(),this._updateInterval(),this._interval=setInterval(()=>this.nextWhenVisible(),this._config.interval)}_maybeEnableCycle(){if(this._config.ride){if(this._isSliding){bt.one(this._element,ay,()=>this.cycle());return}this.cycle()}}to(e){const s=this._getItems();if(e>s.length-1||e<0)return;if(this._isSliding){bt.one(this._element,ay,()=>this.to(e));return}const n=this._getItemIndex(this._getActive());if(n===e)return;const i=e>n?th:mc;this._slide(i,s[e])}
vendor: 7,517 bytes, line 18
18dispose(){this._swipeHelper&&this._swipeHelper.dispose(),super.dispose()}_configAfterMerge(e){return e.defaultInterval=e.interval,e}_addEventListeners(){this._config.keyboard&&bt.on(this._element,r4,e=>this._keydown(e)),this._config.pause==="hover"&&(bt.on(this._element,a4,()=>this.pause()),bt.on(this._element,o4,()=>this._maybeEnableCycle())),this._config.touch&&Hm.isSupported()&&this._addTouchEventListeners()}_addTouchEventListeners(){for(const n of ts.find(v4,this._element))bt.on(n,l4,i=>i.preventDefault());const s={leftCallback:()=>this._slide(this._directionToOrder(Tc)),rightCallback:()=>this._slide(this._directionToOrder(bm)),endCallback:()=>{this._config.pause==="hover"&&(this.pause(),this.touchTimeout&&clearTimeout(this.touchTimeout),this.touchTimeout=setTimeout(()=>this._maybeEnableCycle(),n4+this._config.interval))}};this._swipeHelper=new Hm(this._element,s)}_keydown(e){if(/input|textarea/i.test(e.target.tagName))return;const s=x4[e.key];s&&(e.preventDefault(),this._slide(this._directionToOrder(s)))}_getItemIndex(e){return this._getItems().indexOf(e)}_setActiveIndicatorElement(e){if(!this._indicatorsElement)return;const s=ts.findOne(aA,this._indicatorsElement);s.classList.remove(Vp),s.removeAttribute("aria-current");const n=ts.findOne(`[data-bs-slide-to="${e}"]`,this._indicatorsElement);n&&(n.classList.add(Vp),n.setAttribute("aria-current","true"))}_updateInterval(){const e=this._activeElement||this._getActive();if(!e)return;const s=Number.parseInt(e.getAttribute("data-bs-interval"),10);this._config.interval=s||this._config.defaultInterval}_slide(e,s=null){if(this._isSliding)return;const n=this._getActive(),i=e===th,o=s||G1(this._getItems(),n,i,this._config.wrap);if(o===n)return;const r=this._getItemIndex(o),c=x=>bt.trigger(this._element,x,{relatedTarget:o,direction:this._orderToDirection(e),from:this._getItemIndex(n),to:r});if(c(i4).defaultPrevented||!n||!o)return;const f=!!this._interval;this.pause(),this._isSliding=!0,this._setActiveIndicatorElement(r),this._activeElement=o;const v=i?f4:h4,g=i?p4:m4;o.classList.add(g),ff(o),n.classList.add(v),o.classList.add(v);const y=()=>{o.classList.remove(v,g),o.classList.add(Vp),n.classList.remove(Vp,g,v),this._isSliding=!1,c(ay)};this._queueCallback(y,n,this._isAnimated()),f&&this.cycle()}_isAnimated(){return this._element.classList.contains(d4)}_getActive(){return ts.findOne(g4,this._element)}_getItems(){return ts.find(oA,this._element)}_clearInterval(){this._interval&&(clearInterval(this._interval),this._interval=null)}_directionToOrder(e){return Ur()?e===Tc?mc:th:e===Tc?th:mc}_orderToDirection(e){return Ur()?e===mc?Tc:bm:e===mc?bm:Tc}static jQueryInterface(e){return this.each(function(){const s=vd.getOrCreateInstance(this,e);if(typeof e=="number"){s.to(e);return}if(typeof e=="string"){if(s[e]===void 0||e.startsWith("_")||e==="constructor")throw new TypeError(`No method named "${e}"`);s[e]()}})}}bt.on(document,c4,y4,function(t){const e=ts.getElementFromSelector(this);if(!e||!e.classList.contains(rA))return;t.preventDefault();const s=vd.getOrCreateInstance(e),n=this.getAttribute("data-bs-slide-to");if(n){s.to(n),s._maybeEnableCycle();return}if(mo.getDataAttribute(this,"slide")==="next"){s.next(),s._maybeEnableCycle();return}s.prev(),s._maybeEnableCycle()});bt.on(window,u4,()=>{const t=ts.find(_4);for(const e of t)vd.getOrCreateInstance(e)});Yr(vd);const S4="collapse",k4="bs.collapse",vf=`.${k4}`,C4=".data-api",T4=`show${vf}`,A4=`shown${vf}`,O4=`hide${vf}`,D4=`hidden${vf}`,P4=`click${vf}${C4}`,oy="show",Ic="collapse",Bp="collapsing",$4="collapsed",I4=`:scope .${Ic} .${Ic}`,M4="collapse-horizontal",N4="width",L4="height",R4=".collapse.show, .collapse.collapsing",$0='[data-bs-toggle="collapse"]',F4={parent:null,toggle:!0},V4={parent:"(null|element)",toggle:"boolean"};class Tu extends fa{constructor(e,s){super(e,s),this._isTransitioning=!1,this._triggerArray=[];const n=ts.find($0);for(const i of n){const o=ts.getSelectorFromElement(i),r=ts.find(o).filter(c=>c===this._element);o!==null&&r.length&&this._triggerArray.push(i)}this._initializeChildren(),this._config.parent||this._addAriaAndCollapsedClass(this._triggerArray,this._isShown()),this._config.toggle&&this.toggle()}static get Default(){return F4}static get DefaultType(){return V4}static get NAME(){return S4}toggle(){this._isShown()?this.hide():this.show()}show(){if(this._isTransitioning||this._isShown())return;let e=[];if(this._config.parent&&(e=this._getFirstLevelChildren(R4).filter(c=>c!==this._element).map(c=>Tu.getOrCreateInstance(c,{toggle:!1}))),e.length&&e[0]._isTransitioning||bt.trigger(this._element,T4).defaultPrevented)return;for(const c of e)c.hide();const n=this._getDimension();this._element.classList.remove(Ic),this._element.classList.add(Bp),this._element.style[n]=0,this._addAriaAndCollapsedClass(this._triggerArray,!0),this._isTransitioning=!0;const i=()=>{this._isTransitioning=!1,this._element.classList.remove(Bp),this._element.classList.add(Ic,oy),this._element.style[n]="",bt.trigger(this._element,A4)},r=`scroll${n[0].toUpperCase()+n.slice(1)}`;this._queueCallback(i,this._element,!0),this._element.style[n]=`${this._element[r]}px`}hide(){if(this._isTransitioning||!this._isShown()||bt.trigger(this._element,O4).defaultPrevented)return;const s=this._getDimension();this._element.style[s]=`${this._element.getBoundingClientRect()[s]}px`,ff(this._element),this._element.classList.add(Bp),this._element.classList.remove(Ic,oy);for(const i of this._triggerArray){const o=ts.getElementFromSelector(i);o&&!this._isShown(o)&&this._addAriaAndCollapsedClass([i],!1)}this._isTransitioning=!0;const n=()=>{this._isTransitioning=!1,this._element.classList.remove(Bp),this._element.classList.add(Ic),bt.trigger(this._element,D4)};this._element.style[s]="",this._queueCallback(n,this._element,!0)}_isShown(e=this._element){return e.classList.contains(oy)}_configAfterMerge(e){return e.toggle=!!e.toggle,e.parent=bl(e.parent),e}_getDimension(){return this._element.classList.contains(M4)?N4:L4}_initializeChildren(){if(!this._config.parent)return;const e=this._getFirstLevelChildren($0);for(const s of e){const n=ts.getElementFromSelector(s);n&&this._addAriaAndCollapsedClass([s],this._isShown(n))}}_getFirstLevelChildren(e){const s=ts.find(I4,this._config.parent);return ts.find(e,this._config.parent).filter(n=>!s.includes(n))}_addAriaAndCollapsedClass(e,s){if(e.length)for(const n of e)n.classList.toggle($4,!s),n.setAttribute("aria-expanded",s)}static jQueryInterface(e){const s={};return typeof e=="string"&&/show|hide/.test(e)&&(s.toggle=!1),this.each(function(){const n=Tu.getOrCreateInstance(this,s);if(typeof e=="string"){if(typeof n[e]>"u")throw new TypeError(`No method named "${e}"`);n[e]()}})}}bt.on(document,P4,$0,function(t){(t.target.tagName==="A"||t.delegateTarget&&t.delegateTarget.tagName==="A")&&t.preventDefault();for(const e of ts.getMultipleElementsFromSelector(this))Tu.getOrCreateInstance(e,{toggle:!1}).toggle()});Yr(Tu);const BE="dropdown",B4="bs.dropdown",Bu=`.${B4}`,K1=".data-api",U4="Escape",UE="Tab",j4="ArrowUp",jE="ArrowDown",H4=2,W4=`hide${Bu}`,z4=`hidden${Bu}`,Y4=`show${Bu}`,q4=`shown${Bu}`,lA=`click${Bu}${K1}`,uA=`keydown${Bu}${K1}`,G4=`keyup${Bu}${K1}`,Ac="show",X4="dropup",K4="dropend",J4="dropstart",Q4="dropup-center",Z4="dropdown-center",iu='[data-bs-toggle="dropdown"]:not(.disabled):not(:disabled)',eF=`${iu}.${Ac}`,ym=".dropdown-menu",tF=".navbar",sF=".navbar-nav",nF=".dropdown-menu .dropdown-item:not(.disabled):not(:disabled)",iF=Ur()?"top-end":"top-start",rF=Ur()?"to
18p-start":"top-end",aF=Ur()?"bottom-end":"bottom-start",oF=Ur()?"bottom-start":"bottom-end",lF=Ur()?"left-start":"right-start",uF=Ur()?"right-start":"left-start",cF="top",dF="bottom",hF={autoClose:!0,boundary:"clippingParents",display:"dynamic",offset:[0,2],popperConfig:null,reference:"toggle"},fF={autoClose:"(boolean|string)",boundary:"(string|element)",display:"string",offset:"(array|string|function)",popperConfig:"(null|object|function)",reference:"(string|element|object)"};class yr extends fa{constructor(e,s){super(e,s),this._popper=null,this._parent=this._element.parentNode,this._menu=ts.next(this._element,ym)[0]||ts.prev(this._element,ym)[0]||ts.findOne(ym,this._parent),this._inNavbar=this._detectNavbar()}static get Default(){return hF}static get DefaultType(){return fF}static get NAME(){return BE}toggle(){return this._isShown()?this.hide():this.show()}show(){if(yl(this._element)||this._isShown())return;const e={relatedTarget:this._element};if(!bt.trigger(this._element,Y4,e).defaultPrevented){if(this._createPopper(),"ontouchstart"in document.documentElement&&!this._parent.closest(sF))for(const n of[].concat(...document.body.children))bt.on(n,"mouseover",jm);this._element.focus(),this._element.setAttribute("aria-expanded",!0),this._menu.classList.add(Ac),this._element.classList.add(Ac),bt.trigger(this._element,q4,e)}}hide(){if(yl(this._element)||!this._isShown())return;const e={relatedTarget:this._element};this._completeHide(e)}dispose(){this._popper&&this._popper.destroy(),super.dispose()}update(){this._inNavbar=this._detectNavbar(),this._popper&&this._popper.update()}_completeHide(e){if(!bt.trigger(this._element,W4,e).defaultPrevented){if("ontouchstart"in document.documentElement)for(const n of[].concat(...document.body.children))bt.off(n,"mouseover",jm);this._popper&&this._popper.destroy(),this._menu.classList.remove(Ac),this._element.classList.remove(Ac),this._element.setAttribute("aria-expanded","false"),mo.removeDataAttribute(this._menu,"popper"),bt.trigger(this._element,z4,e)}}_getConfig(e){if(e=super._getConfig(e),typeof e.reference=="object"&&!po(e.reference)&&typeof e.reference.getBoundingClientRect!="function")throw new TypeError(`${BE.toUpperCase()}: Option "reference" provided type "object" without a required "getBoundingClientRect" method.`);return e}_createPopper(){if(typeof zT>"u")throw new TypeError("Bootstrap's dropdowns require Popper (https://popper.js.org/docs/v2/)");let e=this._element;this._config.reference==="parent"?e=this._parent:po(this._config.reference)?e=bl(this._config.reference):typeof this._config.reference=="object"&&(e=this._config.reference);const s=this._getPopperConfig();this._popper=q1(e,this._menu,s)}_isShown(){return this._menu.classList.contains(Ac)}_getPlacement(){const e=this._parent;if(e.classList.contains(K4))return lF;if(e.classList.contains(J4))return uF;if(e.classList.contains(Q4))return cF;if(e.classList.contains(Z4))return dF;const s=getComputedStyle(this._menu).getPropertyValue("--bs-position").trim()==="end";return e.classList.contains(X4)?s?rF:iF:s?oF:aF}_detectNavbar(){return this._element.closest(tF)!==null}_getOffset(){const{offset:e}=this._config;return typeof e=="string"?e.split(",").map(s=>Number.parseInt(s,10)):typeof e=="function"?s=>e(s,this._element):e}_getPopperConfig(){const e={placement:this._getPlacement(),modifiers:[{name:"preventOverflow",options:{boundary:this._config.boundary}},{name:"offset",options:{offset:this._getOffset()}}]};return(this._inNavbar||this._config.display==="static")&&(mo.setDataAttribute(this._menu,"popper","static"),e.modifiers=[{name:"applyStyles",enabled:!1}]),{...e,...rr(this._config.popperConfig,[void 0,e])}}_selectMenuItem({key:e,target:s}){const n=ts.find(nF,this._menu).filter(i=>md(i));n.length&&G1(n,s,e===jE,!n.includes(s)).focus()}static jQueryInterface(e){return this.each(function(){const s=yr.getOrCreateInstance(this,e);if(typeof e=="string"){if(typeof s[e]>"u")throw new TypeError(`No method named "${e}"`);s[e]()}})}static clearMenus(e){if(e.button===H4||e.type==="keyup"&&e.key!==UE)return;const s=ts.find(eF);for(const n of s){const i=yr.getInstance(n);if(!i||i._config.autoClose===!1)continue;const o=e.composedPath(),r=o.includes(i._menu);
vendor: 28,521 bytes, line 18
18if(o.includes(i._element)||i._config.autoClose==="inside"&&!r||i._config.autoClose==="outside"&&r||i._menu.contains(e.target)&&(e.type==="keyup"&&e.key===UE||/input|select|option|textarea|form/i.test(e.target.tagName)))continue;const c={relatedTarget:i._element};e.type==="click"&&(c.clickEvent=e),i._completeHide(c)}}static dataApiKeydownHandler(e){const s=/input|textarea/i.test(e.target.tagName),n=e.key===U4,i=[j4,jE].includes(e.key);if(!i&&!n||s&&!n)return;e.preventDefault();const o=this.matches(iu)?this:ts.prev(this,iu)[0]||ts.next(this,iu)[0]||ts.findOne(iu,e.delegateTarget.parentNode),r=yr.getOrCreateInstance(o);if(i){e.stopPropagation(),r.show(),r._selectMenuItem(e);return}r._isShown()&&(e.stopPropagation(),r.hide(),o.focus())}}bt.on(document,uA,iu,yr.dataApiKeydownHandler);bt.on(document,uA,ym,yr.dataApiKeydownHandler);bt.on(document,lA,yr.clearMenus);bt.on(document,G4,yr.clearMenus);bt.on(document,lA,iu,function(t){t.preventDefault(),yr.getOrCreateInstance(this).toggle()});Yr(yr);const cA="backdrop",pF="fade",HE="show",WE=`mousedown.bs.${cA}`,mF={className:"modal-backdrop",clickCallback:null,isAnimated:!1,isVisible:!0,rootElement:"body"},gF={className:"string",clickCallback:"(function|null)",isAnimated:"boolean",isVisible:"boolean",rootElement:"(element|string)"};class dA extends pf{constructor(e){super(),this._config=this._getConfig(e),this._isAppended=!1,this._element=null}static get Default(){return mF}static get DefaultType(){return gF}static get NAME(){return cA}show(e){if(!this._config.isVisible){rr(e);return}this._append();const s=this._getElement();this._config.isAnimated&&ff(s),s.classList.add(HE),this._emulateAnimation(()=>{rr(e)})}hide(e){if(!this._config.isVisible){rr(e);return}this._getElement().classList.remove(HE),this._emulateAnimation(()=>{this.dispose(),rr(e)})}dispose(){this._isAppended&&(bt.off(this._element,WE),this._element.remove(),this._isAppended=!1)}_getElement(){if(!this._element){const e=document.createElement("div");e.className=this._config.className,this._config.isAnimated&&e.classList.add(pF),this._element=e}return this._element}_configAfterMerge(e){return e.rootElement=bl(e.rootElement),e}_append(){if(this._isAppended)return;const e=this._getElement();this._config.rootElement.append(e),bt.on(e,WE,()=>{rr(this._config.clickCallback)}),this._isAppended=!0}_emulateAnimation(e){KT(e,this._getElement(),this._config.isAnimated)}}const vF="focustrap",bF="bs.focustrap",Wm=`.${bF}`,yF=`focusin${Wm}`,_F=`keydown.tab${Wm}`,xF="Tab",wF="forward",zE="backward",EF={autofocus:!0,trapElement:null},SF={autofocus:"boolean",trapElement:"element"};class hA extends pf{constructor(e){super(),this._config=this._getConfig(e),this._isActive=!1,this._lastTabNavDirection=null}static get Default(){return EF}static get DefaultType(){return SF}static get NAME(){return vF}activate(){this._isActive||(this._config.autofocus&&this._config.trapElement.focus(),bt.off(document,Wm),bt.on(document,yF,e=>this._handleFocusin(e)),bt.on(document,_F,e=>this._handleKeydown(e)),this._isActive=!0)}deactivate(){this._isActive&&(this._isActive=!1,bt.off(document,Wm))}_handleFocusin(e){const{trapElement:s}=this._config;if(e.target===document||e.target===s||s.contains(e.target))return;const n=ts.focusableChildren(s);n.length===0?s.focus():this._lastTabNavDirection===zE?n[n.length-1].focus():n[0].focus()}_handleKeydown(e){e.key===xF&&(this._lastTabNavDirection=e.shiftKey?zE:wF)}}const YE=".fixed-top, .fixed-bottom, .is-fixed, .sticky-top",qE=".sticky-top",Up="padding-right",GE="margin-right";class I0{constructor(){this._element=document.body}getWidth(){const e=document.documentElement.clientWidth;return Math.abs(window.innerWidth-e)}hide(){const e=this.getWidth();this._disableOverFlow(),this._setElementAttributes(this._element,Up,s=>s+e),this._setElementAttributes(YE,Up,s=>s+e),this._setElementAttributes(qE,GE,s=>s-e)}reset(){this._resetElementAttributes(this._element,"overflow"),this._resetElementAttributes(this._element,Up),this._resetElementAttributes(YE,Up),this._resetElementAttributes(qE,GE)}isOverflowing(){return this.getWidth()>0}_disableOverFlow(){this._saveInitialAttribute(this._element,"overflow"),this._element.style.overflow="hidden"}_setElementAttributes(e,s,n){const i=this.getWidth(),o=r=>{if(r!==this._element&&window.innerWidth>r.clientWidth+i)return;this._saveInitialAttribute(r,s);const c=window.getComputedStyle(r).getPropertyValue(s);r.style.setProperty(s,`${n(Number.parseFloat(c))}px`)};this._applyManipulationCallback(e,o)}_saveInitialAttribute(e,s){const n=e.style.getPropertyValue(s);n&&mo.setDataAttribute(e,s,n)}_resetElementAttributes(e,s){const n=i=>{const o=mo.getDataAttribute(i,s);if(o===null){i.style.removeProperty(s);return}mo.removeDataAttribute(i,s),i.style.setProperty(s,o)};this._applyManipulationCallback(e,n)}_applyManipulationCallback(e,s){if(po(e)){s(e);return}for(const n of ts.find(e,this._element))s(n)}}const kF="modal",CF="bs.modal",jr=`.${CF}`,TF=".data-api",AF="Escape",OF=`hide${jr}`,DF=`hidePrevented${jr}`,fA=`hidden${jr}`,pA=`show${jr}`,PF=`shown${jr}`,$F=`resize${jr}`,IF=`click.dismiss${jr}`,MF=`mousedown.dismiss${jr}`,NF=`keydown.dismiss${jr}`,LF=`click${jr}${TF}`,XE="modal-open",RF="fade",KE="show",ly="modal-static",FF=".modal.show",VF=".modal-dialog",BF=".modal-body",UF='[data-bs-toggle="modal"]',jF={backdrop:!0,focus:!0,keyboard:!0},HF={backdrop:"(boolean|string)",focus:"boolean",keyboard:"boolean"};class Au extends fa{constructor(e,s){super(e,s),this._dialog=ts.findOne(VF,this._element),this._backdrop=this._initializeBackDrop(),this._focustrap=this._initializeFocusTrap(),this._isShown=!1,this._isTransitioning=!1,this._scrollBar=new I0,this._addEventListeners()}static get Default(){return jF}static get DefaultType(){return HF}static get NAME(){return kF}toggle(e){return this._isShown?this.hide():this.show(e)}show(e){this._isShown||this._isTransitioning||bt.trigger(this._element,pA,{relatedTarget:e}).defaultPrevented||(this._isShown=!0,this._isTransitioning=!0,this._scrollBar.hide(),document.body.classList.add(XE),this._adjustDialog(),this._backdrop.show(()=>this._showElement(e)))}hide(){!this._isShown||this._isTransitioning||bt.trigger(this._element,OF).defaultPrevented||(this._isShown=!1,this._isTransitioning=!0,this._focustrap.deactivate(),this._element.classList.remove(KE),this._queueCallback(()=>this._hideModal(),this._element,this._isAnimated()))}dispose(){bt.off(window,jr),bt.off(this._dialog,jr),this._backdrop.dispose(),this._focustrap.deactivate(),super.dispose()}handleUpdate(){this._adjustDialog()}_initializeBackDrop(){return new dA({isVisible:!!this._config.backdrop,isAnimated:this._isAnimated()})}_initializeFocusTrap(){return new hA({trapElement:this._element})}_showElement(e){document.body.contains(this._element)||document.body.append(this._element),this._element.style.display="block",this._element.removeAttribute("aria-hidden"),this._element.setAttribute("aria-modal",!0),this._element.setAttribute("role","dialog"),this._element.scrollTop=0;const s=ts.findOne(BF,this._dialog);s&&(s.scrollTop=0),ff(this._element),this._element.classList.add(KE);const n=()=>{this._config.focus&&this._focustrap.activate(),this._isTransitioning=!1,bt.trigger(this._element,PF,{relatedTarget:e})};this._queueCallback(n,this._dialog,this._isAnimated())}_addEventListeners(){bt.on(this._element,NF,e=>{if(e.key===AF){if(this._config.keyboard){this.hide();return}this._triggerBackdropTransition()}}),bt.on(window,$F,()=>{this._isShown&&!this._isTransitioning&&this._adjustDialog()}),bt.on(this._element,MF,e=>{bt.one(this._element,IF,s=>{if(!(this._element!==e.target||this._element!==s.target)){if(this._config.backdrop==="static"){this._triggerBackdropTransition();return}this._config.backdrop&&this.hide()}})})}_hideModal(){this._element.style.display="none",this._element.setAttribute("aria-hidden",!0),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._isTransitioning=!1,this._backdrop.hide(()=>{document.body.classList.remove(XE),this._resetAdjustments(),this._scrollBar.reset(),bt.trigger(this._element,fA)})}_isAnimated(){return this._element.classList.contains(RF)}_triggerBackdropTransition(){if(bt.trigger(this._element,DF).defaultPrevented)return;const s=this._element.scrollHeight>document.documentElement.clientHeight,n=this._element.style.overflowY;n==="hidden"||this._element.classList.contains(ly)||(s||(this._element.style.overflowY="hidden"),this._element.classList.add(ly),this._queueCallback(()=>{this._element.classList.remove(ly),this._queueCallback(()=>{this._element.style.overflowY=n},this._dialog)},this._dialog),this._element.focus())}_adjustDialog(){const e=this._element.scrollHeight>document.documentElement.clientHeight,s=this._scrollBar.getWidth(),n=s>0;if(n&&!e){const i=Ur()?"paddingLeft":"paddingRight";this._element.style[i]=`${s}px`}if(!n&&e){const i=Ur()?"paddingRight":"paddingLeft";this._element.style[i]=`${s}px`}}_resetAdjustments(){this._element.style.paddingLeft="",this._element.style.paddingRight=""}static jQueryInterface(e,s){return this.each(function(){const n=Au.getOrCreateInstance(this,e);if(typeof e=="string"){if(typeof n[e]>"u")throw new TypeError(`No method named "${e}"`);n[e](s)}})}}bt.on(document,LF,UF,function(t){const e=ts.getElementFromSelector(this);["A","AREA"].includes(this.tagName)&&t.preventDefault(),bt.one(e,pA,i=>{i.defaultPrevented||bt.one(e,fA,()=>{md(this)&&this.focus()})});const s=ts.findOne(FF);s&&Au.getInstance(s).hide(),Au.getOrCreateInstance(e).toggle(this)});Rg(Au);Yr(Au);const WF="offcanvas",zF="bs.offcanvas",Oo=`.${zF}`,mA=".data-api",YF=`load${Oo}${mA}`,qF="Escape",JE="show",QE="showing",ZE="hiding",GF="offcanvas-backdrop",gA=".offcanvas.show",XF=`show${Oo}`,KF=`shown${Oo}`,JF=`hide${Oo}`,eS=`hidePrevented${Oo}`,vA=`hidden${Oo}`,QF=`resize${Oo}`,ZF=`click${Oo}${mA}`,e5=`keydown.dismiss${Oo}`,t5='[data-bs-toggle="offcanvas"]',s5={backdrop:!0,keyboard:!0,scroll:!1},n5={backdrop:"(boolean|string)",keyboard:"boolean",scroll:"boolean"};class xo extends fa{constructor(e,s){super(e,s),this._isShown=!1,this._backdrop=this._initializeBackDrop(),this._focustrap=this._initializeFocusTrap(),this._addEventListeners()}static get Default(){return s5}static get DefaultType(){return n5}static get NAME(){return WF}toggle(e){return this._isShown?this.hide():this.show(e)}show(e){if(this._isShown||bt.trigger(this._element,XF,{relatedTarget:e}).defaultPrevented)return;this._isShown=!0,this._backdrop.show(),this._config.scroll||new I0().hide(),this._element.setAttribute("aria-modal",!0),this._element.setAttribute("role","dialog"),this._element.classList.add(QE);const n=()=>{(!this._config.scroll||this._config.backdrop)&&this._focustrap.activate(),this._element.classList.add(JE),this._element.classList.remove(QE),bt.trigger(this._element,KF,{relatedTarget:e})};this._queueCallback(n,this._element,!0)}hide(){if(!this._isShown||bt.trigger(this._element,JF).defaultPrevented)return;this._focustrap.deactivate(),this._element.blur(),this._isShown=!1,this._element.classList.add(ZE),this._backdrop.hide();const s=()=>{this._element.classList.remove(JE,ZE),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._config.scroll||new I0().reset(),bt.trigger(this._element,vA)};this._queueCallback(s,this._element,!0)}dispose(){this._backdrop.dispose(),this._focustrap.deactivate(),super.dispose()}_initializeBackDrop(){const e=()=>{if(this._config.backdrop==="static"){bt.trigger(this._element,eS);return}this.hide()},s=!!this._config.backdrop;return new dA({className:GF,isVisible:s,isAnimated:!0,rootElement:this._element.parentNode,clickCallback:s?e:null})}_initializeFocusTrap(){return new hA({trapElement:this._element})}_addEventListeners(){bt.on(this._element,e5,e=>{if(e.key===qF){if(this._config.keyboard){this.hide();return}bt.trigger(this._element,eS)}})}static jQueryInterface(e){return this.each(function(){const s=xo.getOrCreateInstance(this,e);if(typeof e=="string"){if(s[e]===void 0||e.startsWith("_")||e==="constructor")throw new TypeError(`No method named "${e}"`);s[e](this)}})}}bt.on(document,ZF,t5,function(t){const e=ts.getElementFromSelector(this);if(["A","AREA"].includes(this.tagName)&&t.preventDefault(),yl(this))return;bt.one(e,vA,()=>{md(this)&&this.focus()});const s=ts.findOne(gA);s&&s!==e&&xo.getInstance(s).hide(),xo.getOrCreateInstance(e).toggle(this)});bt.on(window,YF,()=>{for(const t of ts.find(gA))xo.getOrCreateInstance(t).show()});bt.on(window,QF,()=>{for(const t of ts.find("[aria-modal][class*=show][class*=offcanvas-]"))getComputedStyle(t).position!=="fixed"&&xo.getOrCreateInstance(t).hide()});Rg(xo);Yr(xo);const i5=/^aria-[\w-]*$/i,bA={"*":["class","dir","id","lang","role",i5],a:["target","href","title","rel"],area:[],b:[],br:[],col:[],code:[],dd:[],div:[],dl:[],dt:[],em:[],hr:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],i:[],img:["src","srcset","alt","title","width","height"],li:[],ol:[],p:[],pre:[],s:[],small:[],span:[],sub:[],sup:[],strong:[],u:[],ul:[]},r5=new Set(["background","cite","href","itemtype","longdesc","poster","src","xlink:href"]),a5=/^(?!javascript:)(?:[a-z0-9+.-]+:|[^&:/?#]*(?:[/?#]|$))/i,o5=(t,e)=>{const s=t.nodeName.toLowerCase();return e.includes(s)?r5.has(s)?!!a5.test(t.nodeValue):!0:e.filter(n=>n instanceof RegExp).some(n=>n.test(s))};function l5(t,e,s){if(!t.length)return t;if(s&&typeof s=="function")return s(t);const i=new window.DOMParser().parseFromString(t,"text/html"),o=[].concat(...i.body.querySelectorAll("*"));for(const r of o){const c=r.nodeName.toLowerCase();if(!Object.keys(e).includes(c)){r.remove();continue}const h=[].concat(...r.attributes),f=[].concat(e["*"]||[],e[c]||[]);for(const v of h)o5(v,f)||r.removeAttribute(v.nodeName)}return i.body.innerHTML}const u5="TemplateFactory",c5={allowList:bA,content:{},extraClass:"",html:!1,sanitize:!0,sanitizeFn:null,template:"<div></div>"},d5={allowList:"object",content:"object",extraClass:"(string|function)",html:"boolean",sanitize:"boolean",sanitizeFn:"(null|function)",template:"string"},h5={entry:"(string|element|function|null)",selector:"(string|element)"};class f5 extends pf{constructor(e){super(),this._config=this._getConfig(e)}static get Default(){return c5}static get DefaultType(){return d5}static get NAME(){return u5}getContent(){return Object.values(this._config.content).map(e=>this._resolvePossibleFunction(e)).filter(Boolean)}hasContent(){return this.getContent().length>0}changeContent(e){return this._checkContent(e),this._config.content={...this._config.content,...e},this}toHtml(){const e=document.createElement("div");e.innerHTML=this._maybeSanitize(this._config.template);for(const[i,o]of Object.entries(this._config.content))this._setContent(e,o,i);const s=e.children[0],n=this._resolvePossibleFunction(this._config.extraClass);return n&&s.classList.add(...n.split(" ")),s}_typeCheckConfig(e){super._typeCheckConfig(e),this._checkContent(e.content)}_checkContent(e){for(const[s,n]of Object.entries(e))super._typeCheckConfig({selector:s,entry:n},h5)}_setContent(e,s,n){const i=ts.findOne(n,e);if(i){if(s=this._resolvePossibleFunction(s),!s){i.remove();return}if(po(s)){this._putElementInTemplate(bl(s),i);return}if(this._config.html){i.innerHTML=this._maybeSanitize(s);return}i.textContent=s}}_maybeSanitize(e){return this._config.sanitize?l5(e,this._config.allowList,this._config.sanitizeFn):e}_resolvePossibleFunction(e){return rr(e,[void 0,this])}_putElementInTemplate(e,s){if(this._config.html){s.innerHTML="",s.append(e);return}s.textContent=e.textContent}}const p5="tooltip",m5=new Set(["sanitize","allowList","sanitizeFn"]),uy="fade",g5="modal",jp="show",v5=".tooltip-inner",tS=`.${g5}`,sS="hide.bs.modal",sh="hover",cy="focus",dy="click",b5="manual",y5="hide",_5="hidden",x5="show",w5="shown",E5="inserted",S5="click",k5="focusin",C5="focusout",T5="mouseenter",A5="mouseleave",O5={AUTO:"auto",TOP:"top",RIGHT:Ur()?"left":"right",BOTTOM:"bottom",LEFT:Ur()?"right":"left"},D5={allowList:bA,animation:!0,boundary:"clippingParents",container:!1,customClass:"",delay:0,fallbackPlacements:["top","right","bottom","left"],html:!1,offset:[0,6],placement:"top",popperConfig:null,sanitize:!0,sanitizeFn:null,selector:!1,template:'<div class="tooltip" role="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',title:"",trigger:"hover focus"},P5={allowList:"object",animation:"boolean",boundary:"(string|element)",container:"(string|element|boolean)",customClass:"(string|function)",delay:"(number|object)",fallbackPlacements:"array",html:"boolean",offset:"(array|string|function)",placement:"(string|function)",popperConfig:"(null|object|function)",sanitize:"boolean",sanitizeFn:"(null|function)",selector:"(string|boolean)",template:"string",title:"(string|element|function)",trigger:"string"};class mi extends fa{constructor(e,s){if(typeof zT>"u")throw new TypeError("Bootstrap's tooltips require Popper (https://popper.js.org/docs/v2/)");super(e,s),this._isEnabled=!0,this._timeout=0,this._isHovered=null,this._activeTrigger={},this._popper=null,this._templateFactory=null,this._newContent=null,this.tip=null,this._setListeners(),this._config.selector||this._fixTitle()}static get Default(){return D5}static get DefaultType(){return P5}static get NAME(){return p5}enable(){this._isEnabled=!0}disable(){this._isEnabled=!1}toggleEnabled(){this._isEnabled=!this._isEnabled}toggle(){if(this._isEnabled){if(this._isShown()){this._leave();return}this._enter()}}dispose(){clearTimeout(this._timeout),bt.off(this._element.closest(tS),sS,this._hideModalHandler),this._element.getAttribute("data-bs-original-title")&&this._element.setAttribute("title",this._element.getAttribute("data-bs-original-title")),this._disposePopper(),super.dispose()}show(){if(this._element.style.display==="none")throw new Error("Please use show on visible elements");if(!(this._isWithContent()&&this._isEnabled))return;const e=bt.trigger(this._element,this.constructor.eventName(x5)),n=(GT(this._element)||this._element.ownerDocument.documentElement).contains(this._element);if(e.defaultPrevented||!n)return;this._disposePopper();const i=this._getTipElement();this._element.setAttribute("aria-describedby",i.getAttribute("id"));const{container:o}=this._config;if(this._element.ownerDocument.documentElement.contains(this.tip)||(o.append(i),bt.trigger(this._element,this.constructor.eventName(E5))),this._popper=this._createPopper(i),i.classList.add(jp),"ontouchstart"in document.documentElement)for(const c of[].concat(...document.body.children))bt.on(c,"mouseover",jm);const r=()=>{bt.trigger(this._element,this.constructor.eventName(w5)),this._isHovered===!1&&this._leave(),this._isHovered=!1};this._queueCallback(r,this.tip,this._isAnimated())}hide(){if(!this._isShown()||bt.trigger(this._element,this.constructor.eventName(y5)).defaultPrevented)return;if(this._getTipElement().classList.remove(jp),"ontouchstart"in document.documentElement)for(const i of[].concat(...document.body.children))bt.off(i,"mouseover",jm);this._activeTrigger[dy]=!1,this._activeTrigger[cy]=!1,this._activeTrigger[sh]=!1,this._isHovered=null;const n=()=>{this._isWithActiveTrigger()||(this._isHovered||this._disposePopper(),this._element.removeAttribute("aria-describedby"),bt.trigger(this._element,this.constructor.eventName(_5)))};this._queueCallback(n,this.tip,this._isAnimated())}update(){this._popper&&this._popper.update()}_isWithContent(){return!!this._getTitle()}_getTipElement(){return this.tip||(this.tip=this._createTipElement(this._newContent||this._getContentForTemplate())),this.tip}_createTipElement(e){const s=this._getTemplateFactory(e).toHtml();if(!s)return null;s.classList.remove(uy,jp),s.classList.add(`bs-${this.constructor.NAME}-auto`);const n=b3(this.constructor.NAME).toString();return s.setAttribute("id",n),this._isAnimated()&&s.classList.add(uy),s}setContent(e){this._newContent=e,this._isShown()&&(this._disposePopper(),this.show())}_getTemplateFactory(e){return this._templateFactory?this._templateFactory.changeContent(e):this._templateFactory=new f5({...this._config,content:e,extraClass:this._resolvePossibleFunction(this._config.customClass)}),this._templateFactory}_getContentForTemplate(){return{[v5]:this._getTitle()}}_getTitle(){return this._resolvePossibleFunction(this._config.title)||this._element.getAttribute("data-bs-original-title")}_initializeOnDelegatedTarget(e){return this.constructor.getOrCreateInstance(e.delegateTarget,this._getDelegateConfig())}_isAnimated(){return this._config.animation||this.tip&&this.tip.classList.contains(uy)}_isShown(){return this.tip&&this.tip.classList.contains(jp)}_createPopper(e){const s=rr(this._config.placement,[this,e,this._element]),n=O5[s.toUpperCase()];return q1(this._element,e,this._getPopperConfig(n))}_getOffset(){const{offset:e}=this._config;return typeof e=="string"?e.split(",").map(s=>Number.parseInt(s,10)):typeof e=="function"?s=>e(s,this._element):e}_resolvePossibleFunction(e){return rr(e,[this._element,this._element])}_getPopperConfig(e){const s={placement:e,modifiers:[{name:"flip",options:{fallbackPlacements:this._config.fallbackPlacements}},{name:"offset",options:{offset:this._getOffset()}},{name:"preventOverflow",options:{boundary:this._config.boundary}},{name:"arrow",options:{element:`.${this.constructor.NAME}-arrow`}},{name:"preSetPlacement",enabled:!0,phase:"beforeMain",fn:n=>{this._getTipElement().setAttribute("data-popper-placement",n.state.placement)}}]};return{...s,...rr(this._config.popperConfig,[void 0,s])}}_setListeners(){const e=this._config.trigger.split(" ");for(const s of e)if(s==="click")bt.on(this._element,this.constructor.eventName(S5),this._config.selector,n=>{const i=this._initializeOnDelegatedTarget(n);i._activeTrigger[dy]=!(i._isShown()&&i._activeTrigger[dy]),i.toggle()});else if(s!==b5){const n=s===sh?this.constructor.eventName(T5):this.constructor.eventName(k5),i=s===sh?this.constructor.eventName(A5):this.constructor.eventName(C5);bt.on(this._element,n,this._config.selector,o=>{const r=this._initializeOnDelegatedTarget(o);r._activeTrigger[o.type==="focusin"?cy:sh]=!0,r._enter()}),bt.on(this._element,i,this._config.selector,o=>{const r=this._initializeOnDelegatedTarget(o);r._activeTrigger[o.type==="focusout"?cy:sh]=r._element.contains(o.relatedTarget),r._leave()})}this._hideModalHandler=()=>{this._element&&this.hide()},bt.on(this._element.closest(tS),sS,this._hideModalHandler)}_fixTitle(){const e=this._element.getAttribute("title");e&&(!this._element.getAttribute("aria-label")&&!this._element.textContent.trim()&&this._element.setAttribute("aria-label",e),this._element.setAttribute("data-bs-original-title",e),this._element.removeAttribute("title"))}_enter(){if(this._isShown()||this._isHovered){this._isHovered=!0;return}this._isHovered=!0,this._setTimeout(()=>{this._isHovered&&this.show()},this._config.delay.show)}_leave(){this._isWithActiveTrigger()||(this._isHovered=!1,this._setTimeout(()=>{this._isHovered||this.hide()},this._config.delay.hide))}_setTimeout(e,s){clearTimeout(this._timeout),this._timeout=setTimeout(e,s)}_isWithActiveTrigger(){return Object.values(this._activeTrigger).includes(!0)}_getConfig(e){const s=mo.getDataAttributes(this._element);for(const n of Object.keys(s))m5.has(n)&&delete s[n];return e={...s,...typeof e=="object"&&e?e:{}},e=this._mergeConfigObj(e),e=this._configAfterMerge(e),this._typeCheckConfig(e),e}_configAfterMerge(e){return e.container=e.container===!1?document.body:bl(e.container),typeof e.delay=="number"&&(e.delay={show:e.delay,hide:e.delay}),typeof e.title=="number"&&(e.title=e.title.toString()),typeof e.content=="number"&&(e.content=e.content.toString()),e}_getDelegateConfig(){const e={};for(const[s,n]of Object.entries(this._config))this.constructor.Default[s]!==n&&(e[s]=n);return e.selector=!1,e.trigger="manual",e}_disposePopper(){this._popper&&(this._popper.destroy(),this._popper=null),this.tip&&(this.tip.remove(),this.tip=null)}static jQueryInterface(e){return this.each(function(){const s=mi.getOrCreateInstance(this,e);if(typeof e=="string"){if(typeof s[e]>"u")throw new TypeError(`No method named "${e}"`);s[e]()}})}}Yr(mi);const $5="popover",I5=".popover-header",M5=".popover-body",N5={...mi.Default,content:"",offset:[0,8],placement:"right",template:'<div class="popover" role="tooltip"><div class="popover-arrow"></div><h3 class="popover-header"></h3><div class="popover-body"></div></div>',trigger:"click"},L5={...mi.DefaultType,content:"(null|string|element|function)"};class bf extends mi{static get Default(){return N5}static get DefaultType(){return L5}static get NAME(){return $5}_isWithContent(){return this._getTitle()||this._getContent()}_getContentForTemplate(){return{[I5]:this._getTitle(),[M5]:this._getContent()}}_getContent(){return this._resolvePossibleFunction(this._config.content)}static jQueryInterface(e){return this.each(function(){const s=bf.getOrCreateInstance(this,e);if(typeof e=="string"){if(typeof s[e]>"u")throw new TypeError(`No method named "${e}"`);s[e]()}})}}Yr(bf);const R5="scrollspy",F5="bs.scrollspy",J1=`.${F5}`,V5=".data-api",B5=`activate${J1}`,nS=`click${J1}`,U5=`load${J1}${V5}`,j5="dropdown-item",gc="active",H5='[data-bs-spy="scroll"]',hy="[href]",W5=".nav, .list-group",iS=".nav-link",z5=".nav-item",Y5=".list-group-item",q5=`${iS}, ${z5} > ${iS}, ${Y5}`,G5=".dropdown",X5=".dropdown-toggle",K5={offset:null,rootMargin:"0px 0px -25%",smoothScroll:!1,target:null,threshold:[.1,.5,1]},J5={offset:"(number|null)",rootMargin:"string",smoothScroll:"boolean",target:"element",threshold:"array"};class yf extends fa{constructor(e,s){super(e,s),this._targetLinks=new Map,this._observableSections=new Map,this._rootElement=getComputedStyle(this._element).overflowY==="visible"?null:this._element,this._activeTarget=null,this._observer=null,this._previousScrollData={visibleEntryTop:0,parentScrollTop:0},this.refresh()}static get Default(){return K5}static get DefaultType(){return J5}static get NAME(){return R5}refresh(){this._initializeTargetsAndObservables(),this._maybeEnableSmoothScroll(),this._observer?this._observer.disconnect():this._observer=this._getNewObserver();for(const e of this._observableSections.values())this._observer.observe(e)}dispose(){this._observer.disconnect(),super.dispose()}_configAfterMerge(e){return e.target=bl(e.target)||document.body,e.rootMargin=e.offset?`${e.offset}px 0px -30%`:e.rootMargin,typeof e.threshold=="string"&&(e.threshold=e.threshold.split(",").map(s=>Number.parseFloat(s))),e}_maybeEnableSmoothScroll(){this._config.smoothScroll&&(bt.off(this._config.target,nS),bt.on(this._config.target,nS,hy,e=>{const s=this._observableSections.get(e.target.hash);if(s){e.preventDefault();const n=this._rootElement||window,i=s.offsetTop-this._element.offsetTop;if(n.scrollTo){n.scrollTo({top:i,behavior:"smooth"});return}n.scrollTop=i}}))}_getNewObserver(){const e={root:this._rootElement,threshold:this._config.threshold,rootMargin:this._config.rootMargin};return new IntersectionObserver(s=>this._observerCallback(s),e)}_observerCallback(e){const s=r=>this._targetLinks.get(`#${r.target.id}`),n=r=>{this._previousScrollData.visibleEntryTop=r.target.offsetTop,this._process(s(r))},i=(this._rootElement||document.documentElement).scrollTop,o=i>=this._previousScrollData.parentScrollTop;this._previousScrollData.parentScrollTop=i;for(const r of e){if(!r.isIntersecting){this._activeTarget=null,this._clearActiveClass(s(r));continue}const c=r.target.offsetTop>=this._previousScrollData.visibleEntryTop;if(o&&c){if(n(r),!i)return;continue}!o&&!c&&n(r)}}_initializeTargetsAndObservables(){this._targetLinks=new Map,this._observableSections=new Map;const e=ts.find(hy,this._config.target);for(const s of e){if(!s.hash||yl(s))continue;const n=ts.findOne(decodeURI(s.hash),this._element);md(n)&&(this._targetLinks.set(decodeURI(s.hash),s),this._observableSections.set(s.hash,n))}}_process(e){this._activeTarget!==e&&(this._clearActiveClass(this._config.target),this._activeTarget=e,e.classList.add(gc),this._activateParents(e),bt.trigger(this._element,B5,{relatedTarget:e}))}_activateParents(e){if(e.classList.contains(j5)){ts.findOne(X5,e.closest(G5)).classList.add(gc);return}for(const s of ts.parents(e,W5))for(const n of ts.prev(s,q5))n.classList.add(gc)}_clearActiveClass(e){e.classList.remove(gc);const s=ts.find(`${hy}.${gc}`,e);for(const n of s)n.classList.remove(gc)}static jQueryInterface(e){return this.each(function(){const s=yf.getOrCreateInstance(this,e);if(typeof e=="string"){if(s[e]===void 0||e.startsWith("_")||e==="constructor")throw new TypeError(`No method n
18amed "${e}"`);s[e]()}})}}bt.on(window,U5,()=>{for(const t of ts.find(H5))yf.getOrCreateInstance(t)});Yr(yf);const Q5="tab",Z5="bs.tab",Uu=`.${Z5}`,e6=`hide${Uu}`,t6=`hidden${Uu}`,s6=`show${Uu}`,n6=`shown${Uu}`,i6=`click${Uu}`,r6=`keydown${Uu}`,a6=`load${Uu}`,o6="ArrowLeft",rS="ArrowRight",l6="ArrowUp",aS="ArrowDown",fy="Home",oS="End",ru="active",lS="fade",py="show",u6="dropdown",yA=".dropdown-toggle",c6=".dropdown-menu",my=`:not(${yA})`,d6='.list-group, .nav, [role="tablist"]',h6=".nav-item, .list-group-item",f6=`.nav-link${my}, .list-group-item${my}, [role="tab"]${my}`,_A='[data-bs-toggle="tab"], [data-bs-toggle="pill"], [data-bs-toggle="list"]',gy=`${f6}, ${_A}`,p6=`.${ru}[data-bs-toggle="tab"], .${ru}[data-bs-toggle="pill"], .${ru}[data-bs-toggle="list"]`;class Ou extends fa{constructor(e){super(e),this._parent=this._element.closest(d6),this._parent&&(this._setInitialAttributes(this._parent,this._getChildren()),bt.on(this._element,r6,s=>this._keydown(s)))}static get NAME(){return Q5}show(){const e=this._element;if(this._elemIsActive(e))return;const s=this._getActiveElem(),n=s?bt.trigger(s,e6,{relatedTarget:e}):null;bt.trigger(e,s6,{relatedTarget:s}).defaultPrevented||n&&n.defaultPrevented||(this._deactivate(s,e),this._activate(e,s))}_activate(e,s){if(!e)return;e.classList.add(ru),this._activate(ts.getElementFromSelector(e));const n=()=>
vendor: 4,898 bytes, line 18
18{if(e.getAttribute("role")!=="tab"){e.classList.add(py);return}e.removeAttribute("tabindex"),e.setAttribute("aria-selected",!0),this._toggleDropDown(e,!0),bt.trigger(e,n6,{relatedTarget:s})};this._queueCallback(n,e,e.classList.contains(lS))}_deactivate(e,s){if(!e)return;e.classList.remove(ru),e.blur(),this._deactivate(ts.getElementFromSelector(e));const n=()=>{if(e.getAttribute("role")!=="tab"){e.classList.remove(py);return}e.setAttribute("aria-selected",!1),e.setAttribute("tabindex","-1"),this._toggleDropDown(e,!1),bt.trigger(e,t6,{relatedTarget:s})};this._queueCallback(n,e,e.classList.contains(lS))}_keydown(e){if(![o6,rS,l6,aS,fy,oS].includes(e.key))return;e.stopPropagation(),e.preventDefault();const s=this._getChildren().filter(i=>!yl(i));let n;if([fy,oS].includes(e.key))n=s[e.key===fy?0:s.length-1];else{const i=[rS,aS].includes(e.key);n=G1(s,e.target,i,!0)}n&&(n.focus({preventScroll:!0}),Ou.getOrCreateInstance(n).show())}_getChildren(){return ts.find(gy,this._parent)}_getActiveElem(){return this._getChildren().find(e=>this._elemIsActive(e))||null}_setInitialAttributes(e,s){this._setAttributeIfNotExists(e,"role","tablist");for(const n of s)this._setInitialAttributesOnChild(n)}_setInitialAttributesOnChild(e){e=this._getInnerElement(e);const s=this._elemIsActive(e),n=this._getOuterElement(e);e.setAttribute("aria-selected",s),n!==e&&this._setAttributeIfNotExists(n,"role","presentation"),s||e.setAttribute("tabindex","-1"),this._setAttributeIfNotExists(e,"role","tab"),this._setInitialAttributesOnTargetPanel(e)}_setInitialAttributesOnTargetPanel(e){const s=ts.getElementFromSelector(e);s&&(this._setAttributeIfNotExists(s,"role","tabpanel"),e.id&&this._setAttributeIfNotExists(s,"aria-labelledby",`${e.id}`))}_toggleDropDown(e,s){const n=this._getOuterElement(e);if(!n.classList.contains(u6))return;const i=(o,r)=>{const c=ts.findOne(o,n);c&&c.classList.toggle(r,s)};i(yA,ru),i(c6,py),n.setAttribute("aria-expanded",s)}_setAttributeIfNotExists(e,s,n){e.hasAttribute(s)||e.setAttribute(s,n)}_elemIsActive(e){return e.classList.contains(ru)}_getInnerElement(e){return e.matches(gy)?e:ts.findOne(gy,e)}_getOuterElement(e){return e.closest(h6)||e}static jQueryInterface(e){return this.each(function(){const s=Ou.getOrCreateInstance(this);if(typeof e=="string"){if(s[e]===void 0||e.startsWith("_")||e==="constructor")throw new TypeError(`No method named "${e}"`);s[e]()}})}}bt.on(document,i6,_A,function(t){["A","AREA"].includes(this.tagName)&&t.preventDefault(),!yl(this)&&Ou.getOrCreateInstance(this).show()});bt.on(window,a6,()=>{for(const t of ts.find(p6))Ou.getOrCreateInstance(t)});Yr(Ou);const m6="toast",g6="bs.toast",Sl=`.${g6}`,v6=`mouseover${Sl}`,b6=`mouseout${Sl}`,y6=`focusin${Sl}`,_6=`focusout${Sl}`,x6=`hide${Sl}`,w6=`hidden${Sl}`,E6=`show${Sl}`,S6=`shown${Sl}`,k6="fade",uS="hide",Hp="show",Wp="showing",C6={animation:"boolean",autohide:"boolean",delay:"number"},T6={animation:!0,autohide:!0,delay:5e3};class _f extends fa{constructor(e,s){super(e,s),this._timeout=null,this._hasMouseInteraction=!1,this._hasKeyboardInteraction=!1,this._setListeners()}static get Default(){return T6}static get DefaultType(){return C6}static get NAME(){return m6}show(){if(bt.trigger(this._element,E6).defaultPrevented)return;this._clearTimeout(),this._config.animation&&this._element.classList.add(k6);const s=()=>{this._element.classList.remove(Wp),bt.trigger(this._element,S6),this._maybeScheduleHide()};this._element.classList.remove(uS),ff(this._element),this._element.classList.add(Hp,Wp),this._queueCallback(s,this._element,this._config.animation)}hide(){if(!this.isShown()||bt.trigger(this._element,x6).defaultPrevented)return;const s=()=>{this._element.classList.add(uS),this._element.classList.remove(Wp,Hp),bt.trigger(this._element,w6)};this._element.classList.add(Wp),this._queueCallback(s,this._element,this._config.animation)}dispose(){this._clearTimeout(),this.isShown()&&this._element.classList.remove(Hp),super.dispose()}isShown(){return this._element.classList.contains(Hp)}_maybeScheduleHide(){this._config.autohide&&(this._hasMouseInteraction||this._hasKeyboardInteraction||(this._timeout=setTimeout(()=>{this.hide()},this._config.delay)))}_onInteraction(e,s){switch(e.type){case"mouseover":case"mouseout":{this._hasMouseInteraction=s;break}case"focusin":case"focusout":{this._hasKeyboardInteraction=s;break}}if(s){this._clearTimeout();return}const n=e.relatedTarget;this._element===n||this._element.contains(n)||this._maybeScheduleHide()}_setListeners(){bt.on(this._element,v6,e=>this._onInteraction(e,!0)),bt.on(this._element,b6,e=>this._onInteraction(e,!1)),bt.on(this._element,y6,e=>this._onInteraction(e,!0)),bt.on(this._element,_6,e=>this._onInteraction(e,!1))}_clearTimeout(){clearTimeout(this._timeout),this._timeout=null}static jQueryInterface(e){return this.each(function(){const s=_f.getOrCreateInstance(this,e);if(typeof e=="string"){if(typeof s[e]>
18"u")throw new TypeError(`No method named "${e}"`);s[e](this)}})}}Rg(_f);Yr(_f);const xA=Object.freeze(Object.defineProperty({__proto__:null,Alert:mf,Button:gf,Carousel:vd,Collapse:Tu,Dropdown:yr,Modal:Au,Offcanvas:xo,Popover:bf,ScrollSpy:yf,Tab:Ou,Toast:_f,Tooltip:mi},Symbol.toStringTag,{value:"Module"}));window.axios=$n;window.axios.defaults.headers.common["X-Requested-With"]="XMLHttpRequest";window.Pusher=AR;const ph={broadcaster:"reverb",key:"vunwf9k4sa752pdurvjq",wsHost:"app.kativo.com.br",enabledTransports:["ws","wss"],authEndpoint:"/broadcasting/auth",authorizer:(t,e)=>({authorize:(s,n)=>{window.axios.post("/broadcasting/auth",{socket_id:s,channel_name:t.name}).then(i=>{n(!1,i.data)}).catch(i=>{var o;console.error("â Falha na autenticação do Echo (Canal Privado):",((o=i.response)==null?void 0:o.data)||i.message),n(!0,i)})}})};ph.wsPort=443,ph.wssPort=443,ph.forceTLS=!0,ph.disableStats=!0;window.Echo=new kR(ph);const A6=mi.prototype.show;mi.prototype.show=function(){window.matchMedia("(max-width: 991px)").matches||"ontouchstart"in window||navigator.maxTouchPoints>0||A6.call(this)};document.addEventListener("click",t=>{const e=t.target.closest('[data-bs-toggle="tooltip"]');if(e){const s=mi.getInstance(e);s&&s.hide(),e.blur()}});function wA(t=document){window.matchMedia("(max-width: 991px)").matches||"ontouchstart"in window||navigator.maxTouchPoints>0||t.querySelectorAll('[data-bs-toggle="tooltip"]').forEach(s=>{try{mi.getOrCreateInstance(s,{trigger:"hover"})}catch{}})}document.addEventListener("click",t=>{var n;const e=t.target.closest("[data-bs-toggle]");if(!e)return;const s=e.getAttribute("data-bs-toggle");if(s==="dropdown"){t.preventDefault();try{yr.getOrCreateInstance(e).toggle()}catch(i){console.error("Erro ao togglear dropdown:",i)}}else if(s==="collapse"){t.preventDefault();const i=e.getAttribute("data-bs-target")||e.getAttribute("href");if(!i)return;const o=document.querySelector(i);if(!o)return;try{(n=Tu.getOrCreateInstance(o,{toggle:!1}))==null||n.toggle()}catch(r){console.error("Erro ao togglear collapse:",r)}}});const O6=new MutationObserver(t=>{for(const e of t)for(const s of e.addedNodes)s.nodeType===1&&wA(s)});O6.observe(document.body,{childList:!0,subtree:!0});document.addEventListener("DOMContentLoaded",()=>{wA()});/** 19* @vue/shared v3.5.24 20* (c) 2018-present Yuxi (Evan) You and Vue contributors 21* @license MIT
vendor: 9,832 bytes, lines 22-23
22**/function ri(t){const e=Object.create(null);for(const s of t.split(","))e[s]=1;return s=>s in e}const As={},pu=[],ii=()=>{},au=()=>!1,kl=t=>t.charCodeAt(0)===111&&t.charCodeAt(1)===110&&(t.charCodeAt(2)>122||t.charCodeAt(2)<97),Fg=t=>t.startsWith("onUpdate:"),Cs=Object.assign,Vg=(t,e)=>{const s=t.indexOf(e);s>-1&&t.splice(s,1)},D6=Object.prototype.hasOwnProperty,Us=(t,e)=>D6.call(t,e),Mt=Array.isArray,mu=t=>ju(t)==="[object Map]",Cl=t=>ju(t)==="[object Set]",M0=t=>ju(t)==="[object Date]",EA=t=>ju(t)==="[object RegExp]",ss=t=>typeof t=="function",os=t=>typeof t=="string",Ji=t=>typeof t=="symbol",js=t=>t!==null&&typeof t=="object",Bg=t=>(js(t)||ss(t))&&ss(t.then)&&ss(t.catch),Q1=Object.prototype.toString,ju=t=>Q1.call(t),SA=t=>ju(t).slice(8,-1),xf=t=>ju(t)==="[object Object]",Ug=t=>os(t)&&t!=="NaN"&&t[0]!=="-"&&""+parseInt(t,10)===t,go=ri(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),kA=ri("bind,cloak,else-if,else,for,html,if,model,on,once,pre,show,slot,text,memo"),jg=t=>{const e=Object.create(null);return(s=>e[s]||(e[s]=t(s)))},P6=/-\w/g,ln=jg(t=>t.replace(P6,e=>e.slice(1).toUpperCase())),$6=/\B([A-Z])/g,Ti=jg(t=>t.replace($6,"-$1").toLowerCase()),Tl=jg(t=>t.charAt(0).toUpperCase()+t.slice(1)),gu=jg(t=>t?`on${Tl(t)}`:""),Si=(t,e)=>!Object.is(t,e),vu=(t,...e)=>{for(let s=0;s<t.length;s++)t[s](...e)},Z1=(t,e,s,n=!1)=>{Object.defineProperty(t,e,{configurable:!0,enumerable:!1,writable:n,value:s})},wf=t=>{const e=parseFloat(t);return isNaN(e)?t:e},Vh=t=>{const e=os(t)?Number(t):NaN;return isNaN(e)?t:e};let cS;const Ef=()=>cS||(cS=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}),I6=/^[_$a-zA-Z\xA0-\uFFFF][_$a-zA-Z0-9\xA0-\uFFFF]*$/;function M6(t){return I6.test(t)?`__props.${t}`:`__props[${JSON.stringify(t)}]`}function N6(t,e){return t+JSON.stringify(e,(s,n)=>typeof n=="function"?n.toString():n)}const L6={TEXT:1,1:"TEXT",CLASS:2,2:"CLASS",STYLE:4,4:"STYLE",PROPS:8,8:"PROPS",FULL_PROPS:16,16:"FULL_PROPS",NEED_HYDRATION:32,32:"NEED_HYDRATION",STABLE_FRAGMENT:64,64:"STABLE_FRAGMENT",KEYED_FRAGMENT:128,128:"KEYED_FRAGMENT",UNKEYED_FRAGMENT:256,256:"UNKEYED_FRAGMENT",NEED_PATCH:512,512:"NEED_PATCH",DYNAMIC_SLOTS:1024,1024:"DYNAMIC_SLOTS",DEV_ROOT_FRAGMENT:2048,2048:"DEV_ROOT_FRAGMENT",CACHED:-1,"-1":"CACHED",BAIL:-2,"-2":"BAIL"},R6={1:"TEXT",2:"CLASS",4:"STYLE",8:"PROPS",16:"FULL_PROPS",32:"NEED_HYDRATION",64:"STABLE_FRAGMENT",128:"KEYED_FRAGMENT",256:"UNKEYED_FRAGMENT",512:"NEED_PATCH",1024:"DYNAMIC_SLOTS",2048:"DEV_ROOT_FRAGMENT",[-1]:"CACHED",[-2]:"BAIL"},F6={ELEMENT:1,1:"ELEMENT",FUNCTIONAL_COMPONENT:2,2:"FUNCTIONAL_COMPONENT",STATEFUL_COMPONENT:4,4:"STATEFUL_COMPONENT",TEXT_CHILDREN:8,8:"TEXT_CHILDREN",ARRAY_CHILDREN:16,16:"ARRAY_CHILDREN",SLOTS_CHILDREN:32,32:"SLOTS_CHILDREN",TELEPORT:64,64:"TELEPORT",SUSPENSE:128,128:"SUSPENSE",COMPONENT_SHOULD_KEEP_ALIVE:256,256:"COMPONENT_SHOULD_KEEP_ALIVE",COMPONENT_KEPT_ALIVE:512,512:"COMPONENT_KEPT_ALIVE",COMPONENT:6,6:"COMPONENT"},V6={STABLE:1,1:"STABLE",DYNAMIC:2,2:"DYNAMIC",FORWARDED:3,3:"FORWARDED"},B6={1:"STABLE",2:"DYNAMIC",3:"FORWARDED"},U6="Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt,console,Error,Symbol",e_=ri(U6),j6=e_,dS=2;function CA(t,e=0,s=t.length){if(e=Math.max(0,Math.min(e,t.length)),s=Math.max(0,Math.min(s,t.length)),e>s)return"";let n=t.split(/(\r?\n)/);const i=n.filter((c,h)=>h%2===1);n=n.filter((c,h)=>h%2===0);let o=0;const r=[];for(let c=0;c<n.length;c++)if(o+=n[c].length+(i[c]&&i[c].length||0),o>=e){for(let h=c-dS;h<=c+dS||s>o;h++){if(h<0||h>=n.length)continue;const f=h+1;r.push(`${f}${" ".repeat(Math.max(3-String(f).length,0))}| ${n[h]}`);const v=n[h].length,g=i[h]&&i[h].length||0;if(h===c){const y=e-(o-(v+g)),x=Math.max(1,s>o?v-y:s-e);r.push(" | "+" ".repeat(y)+"^".repeat(x))}else if(h>c){if(s>o){const y=Math.max(Math.min(s-o,v),1);r.push(" | "+"^".repeat(y))}o+=v+g}}break}return r.join(` 23`)}function zs(t){if(Mt(t)){const e={};for(let s=0;s<t.length;s++){const n=t[s],i=os(n)?t_(n):zs(n);if(i)for(const o in i)e[o]=i[o]}return e}else if(os(t)||js(t))return t}const H6=/;(?![^(]*\))/g,W6=/:([^]+)/,z6=/\/\*[^]*?\*\//g;function t_(t){const e={};return t.replace(z6,"").split(H6).forEach(s=>{if(s){const n=s.split(W6);n.length>1&&(e[n[0].trim()]=n[1].trim())}}),e}function Y6(t){if(!t)return"";if(os(t))return t;let e="";for(const s in t){const n=t[s];if(os(n)||typeof n=="number"){const i=s.startsWith("--")?s:Ti(s);e+=`${i}:${n};`}}return e}function Me(t){let e="";if(os(t))e=t;else if(Mt(t))for(let s=0;s<t.length;s++){const n=Me(t[s]);n&&(e+=n+" ")}else if(js(t))for(const s in t)t[s]&&(e+=s+" ");return e.trim()}function Zn(t){if(!t)return null;let{class:e,style:s}=t;return e&&!os(e)&&(t.class=Me(e)),s&&(t.style=zs(s)),t}const q6="html,body,base,head,link,meta,style,title,address,article,aside,footer,header,hgroup,h1,h2,h3,h4,h5,h6,nav,section,div,dd,dl,dt,figcaption,figure,picture,hr,img,li,main,ol,p,pre,ul,a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,ruby,s,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,embed,object,param,source,canvas,script,noscript,del,ins,caption,col,colgroup,table,thead,tbody,td,th,tr,button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,output,progress,select,textarea,details,dialog,menu,summary,template,blockquote,iframe,tfoot",G6="svg,animate,animateMotion,animateTransform,circle,clipPath,color-profile,defs,desc,discard,ellipse,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,filter,foreignObject,g,hatch,hatchpath,image,line,linearGradient,marker,mask,mesh,meshgradient,meshpatch,meshrow,metadata,mpath,path,pattern,polygon,polyline,radialGradient,rect,set,solidcolor,stop,switch,symbol,text,textPath,title,tspan,unknown,use,view",X6="annotation,annotation-xml,maction,maligngroup,malignmark,math,menclose,merror,mfenced,mfrac,mfraction,mglyph,mi,mlabeledtr,mlongdiv,mmultiscripts,mn,mo,mover,mpadded,mphantom,mprescripts,mroot,mrow,ms,mscarries,mscarry,msgroup,msline,mspace,msqrt,msrow,mstack,mstyle,msub,msubsup,msup,mtable,mtd,mtext,mtr,munder,munderover,none,semantics",K6="area,base,br,col,embed,hr,img,input,link,meta,param,source,track,wbr",TA=ri(q6),AA=ri(G6),OA=ri(X6),DA=ri(K6),PA="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",$A=ri(PA),J6=ri(PA+",async,autofocus,autoplay,controls,default,defer,disabled,hidden,inert,loop,open,required,reversed,scoped,seamless,checked,muted,multiple,selected");function s_(t){return!!t||t===""}const Q6=/[>/="'\u0009\u000a\u000c\u0020]/,vy={};function Z6(t){if(vy.hasOwnProperty(t))return vy[t];const e=Q6.test(t);return e&&console.error(`unsafe attribute name: ${t}`),vy[t]=!e}const eV={acceptCharset:"accept-charset",className:"class",htmlFor:"for",httpEquiv:"http-equiv"},tV=ri("accept,accept-charset,accesskey,action,align,allow,alt,async,autocapitalize,autocomplete,autofocus,autoplay,background,bgcolor,border,buffered,capture,challenge,charset,checked,cite,class,code,codebase,color,cols,colspan,content,contenteditable,contextmenu,controls,coords,crossorigin,csp,data,datetime,decoding,default,defer,dir,dirname,disabled,download,draggable,dropzone,enctype,enterkeyhint,for,form,formaction,formenctype,formmethod,formnovalidate,formtarget,headers,height,hidden,high,href,hreflang,http-equiv,icon,id,importance,inert,integrity,ismap,itemprop,keytype,kind,label,lang,language,loading,list,loop,low,manifest,max,maxlength,minlength,media,min,multiple,muted,name,novalidate,open,optimum,pattern,ping,placeholder,poster,preload,radiogroup,readonly,referrerpolicy,rel,required,reversed,rows,rowspan,sandbox,scope,scoped,selected,shape,size,sizes,slot,span,spellcheck,src,srcdoc,srclang,srcset,start,step,style,summary,tabindex,target,title,translate,type,usemap,value,width,wrap"),sV=ri("xmlns,accent-height,accumulate,additive,alignment-baseline,alphabetic,amplitude,arabic-form,ascent,attributeName,attributeType,azimuth,baseFrequency,baseline-shift,baseProfile,bbox,begin,bias,by,calcMode,cap-height,class,clip,clipPathUnits,clip-path,clip-rule,color,color-interpolation,color-interpolation-filters,color-profile,color-rendering,contentScriptType,contentStyleType,crossorigin,cursor,cx,cy,d,decelerate,descent,diffuseConstant,direction,display,divisor,dominant-baseline,dur,dx,dy,edgeMode,elevation,enable-background,end,exponent,fill,fill-opacity,fill-rule,filter,filterRes,filterUnits,flood-color,flood-opacity,font-family,font-size,font-size-adjust,font-stretch,font-style,font-variant,font-weight,format,from,fr,fx,fy,g1,g2,glyph-name,glyph-orientation-horizontal,glyph-orientation-vertical,glyphRef,gradientTransform,gradientUnits,hanging,height,href,hreflang,horiz-adv-x,horiz-origin-x,id,ideographic,image-rendering,in,in2,intercept,k,k1,k2,k3,k4,kernelMatrix,kernelUnitLength,kerning,keyPoints,keySplines,keyTimes,lang,lengthAdjust,letter-spacing,lighting-color,limitingConeAngle,local,marker-end,marker-mid,marker-start,markerHeight,markerUnits,markerWidth,mask,maskContentUnits,maskUnits,mathematical,max,media,method,min,mode,name,numOctaves,offset,opacity,operator,order,orient,orientation,origin,overflow,overline-position,overline-thickness,panose-1,paint-order,path,pathLength,patternContentUnits,patternTransform,patternUnits,ping,pointer-events,points,pointsAtX,pointsAtY,pointsAtZ,preserveAlpha,preserveAspectRatio,primitiveUnits,r,radiu
23s,referrerPolicy,refX,refY,rel,rendering-intent,repeatCount,repeatDur,requiredExtensions,requiredFeatures,restart,result,rotate,rx,ry,scale,seed,shape-rendering,slope,spacing,specularConstant,specularExponent,speed,spreadMethod,startOffset,stdDeviation,stemh,stemv,stitchTiles,stop-color,stop-opacity,strikethrough-position,strikethrough-thickness,string,stroke,stroke-dasharray,stroke-dashoffset,stroke-linecap,stroke-linejoin,stroke-miterlimit,stroke-opacity,stroke-width,style,surfaceScale,systemLanguage,tabindex,tableValues,target,targetX,targetY,text-anchor,text-decoration,text-rendering,textLength,to,transform,transform-origin,type,u1,u2,underline-position,underline-thickness,unicode,unicode-bidi,unicode-range,units-per-em,v-alphabetic,v-hanging,v-ideographic,v-mathematical,values,vector-effect,version,vert-adv-y,vert-origin-x,vert-origin-y,viewBox,viewTarget,visibility,width,widths,word-spacing,writing-mode,x,x-height,x1,x2,xChannelSelector,xlink:actuate,xlink:arcrole,xlink:href,xlink:role,xlink:show,xlink:title,xlink:type,xmlns:xlink,xml:base,xml:lang,xml:space,y,y1,y2,yChannelSelector,z,zoomAndPan"),nV=ri("accent,accentunder,actiontype,align,alignmentscope,altimg,altimg-height,altimg-valign,altimg-width,alttext,bevelled,close,columnsalign,columnlines,columnspan,denomalign,depth,dir,display,displaystyle,encoding,equalcolumns,equalrows,fence,fontstyle,fontweight,form,frame,framespacing,groupalign,height,href,id,indentalign,indentalignfirst,indentalignlast,indentshift,indentshiftfirst,indentshiftlast,indextype,justify,largetop,largeop,lquote,lspace,mathbackground,mathcolor,mathsize,mathvariant,maxsize,minlabelspacing,mode,other,overflow,position,rowalign,rowlines,rowspan,rquote,rspace,scriptlevel,scriptminsize,scriptsizemultiplier,selection,separator,separators,shift,side,src,stackalign,stretchy,subscriptshift,superscriptshift,symmetric,voffset,width,widths,xlink:href,xlink:show,xlink:type,xmlns");function iV(t){if(t==null)return!1;const e=typeof t;return e==="string"||e==="number"||e==="boolean"}const rV=/["'&<>]/;function aV(t){const e=""+t,s=rV.exec(e);if(!s)return e;let n="",i,o,r=0;for(o=s.index;o<e.length;o++){switch(e.charCodeAt(o)){case 34:i=""";break;case 38:i="&";break;case 39:i="'";break;case 60:i="<";break;case 62:i=">";break;default:continue}r!==o&&(n+=e.slice(r,o)),r=o+1,n+=i}return r!==o?n+e.slice(r,o):n}const oV=/^-?>|<!--|-->|--!>|<!-$/g;function lV(t){return t.replace(oV,"")}const IA=/[ !"#$%&'()*+,./:;<=>?@[\\\]^`{|}~]/g;function uV(t,e){return t.replace(IA,s=>e?s==='"'?'\\\\\\"':`\\\\${s}`:`\\${s}`)}function cV(t,e){if(t.length!==e.length)return!1;let s=!0;for(let n=0;s&&n<t.length;n++)s=wo(t[n],e[n]);return s}function wo(t,e){if(t===e)return!0;let s=M0(t),n=M0(e);if(s||n)return s&&n?t.getTime()===e.getTime():!1;if(s=Ji(t),n=Ji(e),s||n)return t===e;if(s=Mt(t),n=Mt(e),s||n)return s&&n?cV(t,e):!1;if(s=js(t),n=js(e),s||n){if(!s||!n)return!1;const i=Object.keys(t).length,o=Object.keys(e).length;if(i!==o)return!1;for(const r in t){const c=t.hasOwnProperty(r),h=e.hasOwnProperty(r);if(c&&!h||!c&&h||!wo(t[r],e[r]))return!1}}return String(t)===String(e)}function Sf(t,e){return t.findIndex(s=>wo(s,e))}const MA=t=>!!(t&&t.__v_isRef===!0),pe=t=>os(t)?t:t==null?"":Mt(t)||js(t)&&(t.toString===Q1||!ss(t.toString))?MA(t)?pe(t.value):JSON.stringify(t,NA,2):String(t),NA=(t,e)=>MA(e)?NA(t,e.value):mu(e)?{[`Map(${e.size})`]:[...e.entries()].reduce((s,[n,i],o)=>(s[by(n,o)+" =>"]=i,s),{})}:Cl(e)?{[`Set(${e.size})`]:[...e.values()].map(s=>by(s))}:Ji(e)?by(e):js(e)&&!Mt(e)&&!xf(e)?String(e):e,by=(t,e="")=>{var s;return Ji(t)?`Symbol(${(s=t.description)!=null?s:e})`:t};function LA(t){return t==null?"initial":typeof t=="string"?t===""?" ":t:String(t)}const dV=Object.freeze(Object.defineProperty({__proto__:null,EMPTY_ARR:pu,EMPTY_OBJ:As,NO:au,NOOP:ii,PatchFlagNames:R6,PatchFlags:L6,ShapeFlags:F6,SlotFlags:V6,camelize:ln,capitalize:Tl,cssVarNameEscapeSymbolsRE:IA,def:Z1,escapeHtml:aV,escapeHtmlComment:lV,extend:Cs,genCacheKey:N6,genPropsAccessExp:M6,generateCodeFrame:CA,getEscapedCssVarName:uV,getGlobalThis:Ef,hasChanged:Si,hasOwn:Us,hyphenate:Ti,includeBooleanAttr:s_,invokeArrayFns:vu,isArray:Mt,isBooleanAttr:J6,isBuiltInDirective:kA,isDate:M0,isFunction:ss,isGloballyAllowed:e_,isGloballyWhitelisted:j6,isHTMLTag:TA,isIntegerKey:Ug,isKnownHtmlAttr:tV,isKnownMathMLAttr:nV,isKnownSvgAttr:sV,isMap:mu,isMathMLTag:OA,isModelListener:Fg,isObject:js,isOn:kl,isPlainObject:xf,isPromise:Bg,isRegExp:EA,isRenderableAttrValue:iV,isReservedProp:go,isSSRSafeAttrName:Z6,isSVGTag:AA,isSet:Cl,isSpecialBooleanAttr:$A,isString:os,isSymbol:Ji,isVoidTag:DA,looseEqual:wo,looseIndexOf:Sf,looseToNumber:wf,makeMap:ri,normalizeClass:Me,normalizeCssVarValue:LA,normalizeProps:Zn,normalizeStyle:zs,objectToString:Q1,parseStringStyle:t_,propsToAttrMap:eV,remove:Vg,slotFlagsText:B6,stringifyStyle:Y6,toDisplayString:pe,toHandlerKey:gu,toNumber:V
vendor: 17,552 bytes, lines 23-30
23h,toRawType:SA,toTypeString:ju},Symbol.toStringTag,{value:"Module"}));/** 24* @vue/reactivity v3.5.24 25* (c) 2018-present Yuxi (Evan) You and Vue contributors 26* @license MIT 27**/let wi;class n_{constructor(e=!1){this.detached=e,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this.parent=wi,!e&&wi&&(this.index=(wi.scopes||(wi.scopes=[])).push(this)-1)}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let e,s;if(this.scopes)for(e=0,s=this.scopes.length;e<s;e++)this.scopes[e].pause();for(e=0,s=this.effects.length;e<s;e++)this.effects[e].pause()}}resume(){if(this._active&&this._isPaused){this._isPaused=!1;let e,s;if(this.scopes)for(e=0,s=this.scopes.length;e<s;e++)this.scopes[e].resume();for(e=0,s=this.effects.length;e<s;e++)this.effects[e].resume()}}run(e){if(this._active){const s=wi;try{return wi=this,e()}finally{wi=s}}}on(){++this._on===1&&(this.prevScope=wi,wi=this)}off(){this._on>0&&--this._on===0&&(wi=this.prevScope,this.prevScope=void 0)}stop(e){if(this._active){this._active=!1;let s,n;for(s=0,n=this.effects.length;s<n;s++)this.effects[s].stop();for(this.effects.length=0,s=0,n=this.cleanups.length;s<n;s++)this.cleanups[s]();if(this.cleanups.length=0,this.scopes){for(s=0,n=this.scopes.length;s<n;s++)this.scopes[s].stop(!0);this.scopes.length=0}if(!this.detached&&this.parent&&!e){const i=this.parent.scopes.pop();i&&i!==this&&(this.parent.scopes[this.index]=i,i.index=this.index)}this.parent=void 0}}}function i_(t){return new n_(t)}function Hg(){return wi}function r_(t,e=!1){wi&&wi.cleanups.push(t)}let an;const yy=new WeakSet;class Bh{constructor(e){this.fn=e,this.deps=void 0,this.depsTail=void 0,this.flags=5,this.next=void 0,this.cleanup=void 0,this.scheduler=void 0,wi&&wi.active&&wi.effects.push(this)}pause(){this.flags|=64}resume(){this.flags&64&&(this.flags&=-65,yy.has(this)&&(yy.delete(this),this.trigger()))}notify(){this.flags&2&&!(this.flags&32)||this.flags&8||FA(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,hS(this),VA(this);const e=an,s=ca;an=this,ca=!0;try{return this.fn()}finally{BA(this),an=e,ca=s,this.flags&=-3}}stop(){if(this.flags&1){for(let e=this.deps;e;e=e.nextDep)l_(e);this.deps=this.depsTail=void 0,hS(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){this.flags&64?yy.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){N0(this)&&this.run()}get dirty(){return N0(this)}}let RA=0,Eh,Sh;function FA(t,e=!1){if(t.flags|=8,e){t.next=Sh,Sh=t;return}t.next=Eh,Eh=t}function a_(){RA++}function o_(){if(--RA>0)return;if(Sh){let e=Sh;for(Sh=void 0;e;){const s=e.next;e.next=void 0,e.flags&=-9,e=s}}let t;for(;Eh;){let e=Eh;for(Eh=void 0;e;){const s=e.next;if(e.next=void 0,e.flags&=-9,e.flags&1)try{e.trigger()}catch(n){t||(t=n)}e=s}}if(t)throw t}function VA(t){for(let e=t.deps;e;e=e.nextDep)e.version=-1,e.prevActiveLink=e.dep.activeLink,e.dep.activeLink=e}function BA(t){let e,s=t.depsTail,n=s;for(;n;){const i=n.prevDep;n.version===-1?(n===s&&(s=i),l_(n),hV(n)):e=n,n.dep.activeLink=n.prevActiveLink,n.prevActiveLink=void 0,n=i}t.deps=e,t.depsTail=s}function N0(t){for(let e=t.deps;e;e=e.nextDep)if(e.dep.version!==e.version||e.dep.computed&&(UA(e.dep.computed)||e.dep.version!==e.version))return!0;return!!t._dirty}function UA(t){if(t.flags&4&&!(t.flags&16)||(t.flags&=-17,t.globalVersion===Uh)||(t.globalVersion=Uh,!t.isSSR&&t.flags&128&&(!t.deps&&!t._dirty||!N0(t))))return;t.flags|=2;const e=t.dep,s=an,n=ca;an=t,ca=!0;try{VA(t);const i=t.fn(t._value);(e.version===0||Si(i,t._value))&&(t.flags|=128,t._value=i,e.version++)}catch(i){throw e.version++,i}finally{an=s,ca=n,BA(t),t.flags&=-3}}function l_(t,e=!1){const{dep:s,prevSub:n,nextSub:i}=t;if(n&&(n.nextSub=i,t.prevSub=void 0),i&&(i.prevSub=n,t.nextSub=void 0),s.subs===t&&(s.subs=n,!n&&s.computed)){s.computed.flags&=-5;for(let o=s.computed.deps;o;o=o.nextDep)l_(o,!0)}!e&&!--s.sc&&s.map&&s.map.delete(s.key)}function hV(t){const{prevDep:e,nextDep:s}=t;e&&(e.nextDep=s,t.prevDep=void 0),s&&(s.prevDep=e,t.nextDep=void 0)}function fV(t,e){t.effect instanceof Bh&&(t=t.effect.fn);const s=new Bh(t);e&&Cs(s,e);try{s.run()}catch(i){throw s.stop(),i}const n=s.run.bind(s);return n.effect=s,n}function pV(t){t.effect.stop()}let ca=!0;const jA=[];function Eo(){jA.push(ca),ca=!1}function So(){const t=jA.pop();ca=t===void 0?!0:t}function hS(t){const{cleanup:e}=t;if(t.cleanup=void 0,e){const s=an;an=void 0;try{e()}finally{an=s}}}let Uh=0;class mV{constructor(e,s){this.sub=e,this.dep=s,this.version=s.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class Wg{constructor(e){this.computed=e,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0,this.__v_skip=!0}track(e){if(!an||!ca||an===this.computed)return;let s=this.activeLink;if(s===void 0||s.sub!==an)s=this.activeLink=new mV(an,this),an.deps?(s.prevDep=an.depsTail,an.depsTail.nextDep=s,an.depsTail=s):an.deps=an.depsTail=s,HA(s);else if(s.version===-1&&(s.version=this.version,s.nextDep)){const n=s.nextDep;n.prevDep=s.prevDep,s.prevDep&&(s.prevDep.nextDep=n),s.prevDep=an.depsTail,s.nextDep=void 0,an.depsTail.nextDep=s,an.depsTail=s,an.deps===s&&(an.deps=n)}return s}trigger(e){this.version++,Uh++,this.notify(e)}notify(e){a_();try{for(let s=this.subs;s;s=s.prevSub)s.sub.notify()&&s.sub.dep.notify()}finally{o_()}}}function HA(t){if(t.dep.sc++,t.sub.flags&4){const e=t.dep.computed;if(e&&!t.dep.subs){e.flags|=20;for(let n=e.deps;n;n=n.nextDep)HA(n)}const s=t.dep.subs;s!==t&&(t.prevSub=s,s&&(s.nextSub=t)),t.dep.subs=t}}const zm=new WeakMap,bu=Symbol(""),L0=Symbol(""),jh=Symbol("");function ki(t,e,s){if(ca&&an){let n=zm.get(t);n||zm.set(t,n=new Map);let i=n.get(s);i||(n.set(s,i=new Wg),i.map=n,i.key=s),i.track()}}function ro(t,e,s,n,i,o){const r=zm.get(t);if(!r){Uh++;return}const c=h=>{h&&h.trigger()};if(a_(),e==="clear")r.forEach(c);else{const h=Mt(t),f=h&&Ug(s);if(h&&s==="length"){const v=Number(n);r.forEach((g,y)=>{(y==="length"||y===jh||!Ji(y)&&y>=v)&&c(g)})}else switch((s!==void 0||r.has(void 0))&&c(r.get(s)),f&&c(r.get(jh)),e){case"add":h?f&&c(r.get("length")):(c(r.get(bu)),mu(t)&&c(r.get(L0)));break;case"delete":h||(c(r.get(bu)),mu(t)&&c(r.get(L0)));break;case"set":mu(t)&&c(r.get(bu));break}}o_()}function gV(t,e){const s=zm.get(t);return s&&s.get(e)}function vc(t){const e=Is(t);return e===t?e:(ki(e,"iterate",jh),_r(t)?e:e.map(di))}function zg(t){return ki(t=Is(t),"iterate",jh),t}const vV={__proto__:null,[Symbol.iterator](){return _y(this,Symbol.iterator,di)},concat(...t){return vc(this).concat(...t.map(e=>Mt(e)?vc(e):e))},entries(){return _y(this,"entries",t=>(t[1]=di(t[1]),t))},every(t,e){return Za(this,"every",t,e,void 0,arguments)},filter(t,e){return Za(this,"filter",t,e,s=>s.map(di),arguments)},find(t,e){return Za(this,"find",t,e,di,arguments)},findIndex(t,e){return Za(this,"findIndex",t,e,void 0,arguments)},findLast(t,e){return Za(this,"findLast",t,e,di,arguments)},findLastIndex(t,e){return Za(this,"findLastIndex",t,e,void 0,arguments)},forEach(t,e){return Za(this,"forEach",t,e,void 0,arguments)},includes(...t){return xy(this,"includes",t)},indexOf(...t){return xy(this,"indexOf",t)},join(t){return vc(this).join(t)},lastIndexOf(...t){return xy(this,"lastIndexOf",t)},map(t,e){return Za(this,"map",t,e,void 0,arguments)},pop(){return nh(this,"pop")},push(...t){return nh(this,"push",t)},reduce(t,...e){return fS(this,"reduce",t,e)},reduceRight(t,...e){return fS(this,"reduceRight",t,e)},shift(){return nh(this,"shift")},some(t,e){return Za(this,"some",t,e,void 0,arguments)},splice(...t){return nh(this,"splice",t)},toReversed(){return vc(this).toReversed()},toSorted(t){return vc(this).toSorted(t)},toSpliced(...t){return vc(this).toSpliced(...t)},unshift(...t){return nh(this,"unshift",t)},values(){return _y(this,"values",di)}};function _y(t,e,s){const n=zg(t),i=n[e]();return n!==t&&!_r(t)&&(i._next=i.next,i.next=()=>{const o=i._next();return o.done||(o.value=s(o.value)),o}),i}const bV=Array.prototype;function Za(t,e,s,n,i,o){const r=zg(t),c=r!==t&&!_r(t),h=r[e];if(h!==bV[e]){const g=h.apply(t,o);return c?di(g):g}let f=s;r!==t&&(c?f=function(g,y){return s.call(this,di(g),y,t)}:s.length>2&&(f=function(g,y){return s.call(this,g,y,t)}));const v=h.call(r,f,n);return c&&i?i(v):v}function fS(t,e,s,n){const i=zg(t);let o=s;return i!==t&&(_r(t)?s.length>3&&(o=function(r,c,h){return s.call(this,r,c,h,t)}):o=function(r,c,h){return s.call(this,r,di(c),h,t)}),i[e](o,...n)}function xy(t,e,s){const n=Is(t);ki(n,"iterate",jh);const i=n[e](...s);return(i===-1||i===!1)&&Gg(s[0])?(s[0]=Is(s[0]),n[e](...s)):i}function nh(t,e,s=[]){Eo(),a_();const n=Is(t)[e].apply(t,s);return o_(),So(),n}const yV=ri("__proto__,__v_isRef,__isVue"),WA=new Set(Object.getOwnPropertyNames(Symbol).filter(t=>t!=="arguments"&&t!=="caller").map(t=>Symbol[t]).filter(Ji));function _V(t){Ji(t)||(t=String(t));const e=Is(this);return ki(e,"has",t),e.hasOwnProperty(t)}class zA{constructor(e=!1,s=!1){this._isReadonly=e,this._isShallow=s}get(e,s,n){if(s==="__v_skip")return e.__v_skip;const i=this._isReadonly,o=this._isShallow;if(s==="__v_isReactive")return!i;if(s==="__v_isReadonly")return i;if(s==="__v_isShallow")return o;if(s==="__v_raw")return n===(i?o?JA:KA:o?XA:GA).get(e)||Object.getPrototypeOf(e)===Object.getPrototypeOf(n)?e:void 0;const r=Mt(e);if(!i){let h;if(r&&(h=vV[s]))return h;if(s==="hasOwnProperty")return _V}const c=Reflect.get(e,s,hn(e)?e:n);if((Ji(s)?WA.has(s):yV(s))||(i||ki(e,"get",s),o))return c;if(hn(c)){const h=r&&Ug(s)?c:c.value;return i&&js(h)?Ym(h):h}return js(c)?i?Ym(c):en(c):c}}class YA extends zA{constructor(e=!1){super(!1,e)}set(e,s,n,i){let o=e[s];if(!this._isShallow){const h=ko(o);if(!_r(n)&&!ko(n)&&(o=Is(o),n=Is(n)),!Mt(e)&&hn(o)&&!hn(n))return h||(o.value=n),!0}const r=Mt(e)&&Ug(s)?Number(s)<e.length:Us(e,s),c=Reflect.set(e,s,n,hn(e)?e:i);return e===Is(i)&&(r?Si(n,o)&&ro(e,"set",s,n):ro(e,"add",s,n)),c}deleteProperty(e,s){const n=Us(e,s);e[s];const i=Reflect.deleteProperty(e,s);return i&&n&&ro(e,"delete",s,void 0),i}has(e,s){const n=Reflect.has(e,s);return(!Ji(s)||!WA.has(s))&&ki(e,"has",s),n}ownKeys(e){return ki(e,"iterate",Mt(e)?"length":bu),Reflect.ownKeys(e)}}class qA extends zA{constructor(e=!1){super(!0,e)}set(e,s){return!0}deleteProperty(e,s){return!0}}const xV=new YA,wV=new qA,EV=new YA(!0),SV=new qA(!0),R0=t=>t,zp=t=>Reflect.getPrototypeOf(t);function kV(t,e,s){return function(...n){const i=this.__v_raw,o=Is(i),r=mu(o),c=t==="entries"||t===Symbol.iterator&&r,h=t==="keys"&&r,f=i[t](...n),v=s?R0:e?qm:di;return!e&&ki(o,"iterate",h?L0:bu),{next(){const{value:g,done:y}=f.next();return y?{value:g,done:y}:{value:c?[v(g[0]),v(g[1])]:v(g),done:y}},[Symbol.iterator](){return this}}}}function Yp(t){return function(...e){return t==="delete"?!1:t==="clear"?void 0:this}}function CV(t,e){const s={get(i){const o=this.__v_raw,r=Is(o),c=Is(i);t||(Si(i,c)&&ki(r,"get",i),ki(r,"get",c));const{has:h}=zp(r),f=e?R0:t?qm:di;if(h.call(r,i))return f(o.get(i));if(h.call(r,c))return f(o.get(c));o!==r&&o.get(i)},get size(){const i=this.__v_raw;return!t&&ki(Is(i),"iterate",bu),i.size},has(i){const o=this.__v_raw,r=Is(o),c=Is(i);return t||(Si(i,c)&&ki(r,"has",i),ki(r,"has",c)),i===c?o.has(i):o.has(i)||o.has(c)},forEach(i,o){const r=this,c=r.__v_raw,h=Is(c),f=e?R0:t?qm:di;return!t&&ki(h,"iterate",bu),c.forEach((v,g)=>i.call(o,f(v),f(g),r))}};return Cs(s,t?{add:Yp("add"),set:Yp("set"),delete:Yp("delete"),clear:Yp("clear")}:{add(i){!e&&!_r(i)&&!ko(i)&&(i=Is(i));const o=Is(this);return zp(o).has.call(o,i)||(o.add(i),ro(o,"add",i,i)),this},set(i,o){!e&&!_r(o)&&!ko(o)&&(o=Is(o));const r=Is(this),{has:c,get:h}=zp(r);let f=c.call(r,i);f||(i=Is(i),f=c.call(r,i));const v=h.call(r,i);return r.set(i,o),f?Si(o,v)&&ro(r,"set",i,o):ro(r,"add",i,o),this},delete(i){const o=Is(this),{has:r,get:c}=zp(o);let h=r.call(o,i);h||(i=Is(i),h=r.call(o,i)),c&&c.call(o,i);const f=o.delete(i);return h&&ro(o,"delete",i,void 0),f},clear(){const i=Is(this),o=i.size!==0,r=i.clear();return o&&ro(i,"clear",void 0,void 0),r}}),["keys","values","entries",Symbol.iterator].forEach(i=>{s[i]=kV(i,t,e)}),s}function Yg(t,e){const s=CV(t,e);return(n,i,o)=>i==="__v_isReactive"?!t:i==="__v_isReadonly"?t:i==="__v_raw"?n:Reflect.get(Us(s,i)&&i in n?s:n,i,o)}const TV={get:Yg(!1,!1)},AV={get:Yg(!1,!0)},OV={get:Yg(!0,!1)},DV={get:Yg(!0,!0)},GA=new WeakMap,XA=new WeakMap,KA=new WeakMap,JA=new WeakMap;function PV(t){switch(t){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function $V(t){return t.__v_skip||!Object.isExtensible(t)?0:PV(SA(t))}function en(t){return ko(t)?t:qg(t,!1,xV,TV,GA)}function u_(t){return qg(t,!1,EV,AV,XA)}function Ym(t){return qg(t,!0,wV,OV,KA)}function IV(t){return qg(t,!0,SV,DV,JA)}function qg(t,e,s,n,i){if(!js(t)||t.__v_raw&&!(e&&t.__v_isReactive))return t;const o=$V(t);if(o===0)return t;const r=i.get(t);if(r)return r;const c=new Proxy(t,o===2?n:s);return i.set(t,c),c}function Ra(t){return ko(t)?Ra(t.__v_raw):!!(t&&t.__v_isReactive)}function ko(t){return!!(t&&t.__v_isReadonly)}function _r(t){return!!(t&&t.__v_isShallow)}function Gg(t){return t?!!t.__v_raw:!1}function Is(t){const e=t&&t.__v_raw;return e?Is(e):t}function cr(t){return!Us(t,"__v_skip")&&Object.isExtensible(t)&&Z1(t,"__v_skip",!0),t}const di=t=>js(t)?en(t):t,qm=t=>js(t)?Ym(t):t;function hn(t){return t?t.__v_isRef===!0:!1}function ve(t){return QA(t,!1)}function c_(t){return QA(t,!0)}function QA(t,e){return hn(t)?t:new MV(t,e)}class MV{constructor(e,s){this.dep=new Wg,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=s?e:Is(e),this._value=s?e:di(e),this.__v_isShallow=s}get value(){return this.dep.track(),this._value}set value(e){const s=this._rawValue,n=this.__v_isShallow||_r(e)||ko(e);e=n?e:Is(e),Si(e,s)&&(this._rawValue=e,this._value=n?e:di(e),this.dep.trigger())}}function NV(t){t.dep&&t.dep.trigger()}function Ne(t){return hn(t)?t.value:t}function LV(t){return ss(t)?t():Ne(t)}const RV={get:(t,e,s)=>e==="__v_raw"?t:Ne(Reflect.get(t,e,s)),set:(t,e,s,n)=>{const i=t[e];return hn(i)&&!hn(s)?(i.value=s,!0):Reflect.set(t,e,s,n)}};function d_(t){return Ra(t)?t:new Proxy(t,RV)}class FV{constructor(e){this.__v_isRef=!0,this._value=void 0;const s=this.dep=new Wg,{get:n,set:i}=e(s.track.bind(s),s.trigger.bind(s));this._get=n,this._set=i}get value(){return this._value=this._get()}set value(e){this._set(e)}}function ZA(t){return new FV(t)}function e2(t){const e=Mt(t)?new Array(t.length):{};for(const s in t)e[s]=t2(t,s);return e}class VV{constructor(e,s,n){this._object=e,this._key=s,this._defaultValue=n,this.__v_isRef=!0,this._value=void 0}get value(){const e=this._object[this._key];return this._value=e===void 0?this._defaultValue:e}set value(e){this._object[this._key]=e}get dep(){return gV(Is(this._object),this._key)}}class BV{constructor(e){this._getter=e,this.__v_isRef=!0,this.__v_isReadonly=!0,this._value=void 0}get value(){return this._value=this._getter()}}function Xc(t,e,s){return hn(t)?t:ss(t)?new BV(t):js(t)&&arguments.length>1?t2(t,e,s):ve(t)}function t2(t,e,s){const n=t[e];return hn(n)?n:new VV(t,e,s)}class UV{constructor(e,s,n){this.fn=e,this.setter=s,this._value=void 0,this.dep=new Wg(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=Uh-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!s,this.isSSR=n}notify(){if(this.flags|=16,!(this.flags&8)&&an!==this)return FA(this,!0),!0}get value(){const e=this.dep.track();return UA(this),e&&(e.version=this.dep.version),this._value}set value(e){this.setter&&this.setter(e)}}function jV(t,e,s=!1){let n,i;return ss(t)?n=t:(n=t.get,i=t.set),new UV(n,i,s)}const HV={GET:"get",HAS:"has",ITERATE:"iterate"},WV={SET:"set",ADD:"add",DELETE:"delete",CLEAR:"clear"},qp={},Gm=new WeakMap;let il;function zV(){return il}function s2(t,e=!1,s=il){if(s){let n=Gm.get(s);n||Gm.set(s,n=[]),n.push(t)}}function YV(t,e,s=As){const{immediate:n,deep:i,once:o,scheduler:r,augmentJob:c,call:h}=s,f=A=>i?A:_r(A)||i===!1||i===0?ao(A,1):ao(A);let v,g,y,x,E=!1,P=!1;if(hn(t)?(g=()=>t.value,E=_r(t)):Ra(t)?(g=()=>f(t),E=!0):Mt(t)?(P=!0,E=t.some(A=>Ra(A)||_r(A)),g=()=>t.map(A=>{if(hn(A))return A.value;if(Ra(A))return f(A);if(ss(A))return h?h(A,2):A()})):ss(t)?e?g=h?()=>h(t,2):t:g=()=>{if(y){Eo();try{y()}finally{So()}}const A=il;il=v;try{return h?h(t,3,[x]):t(x)}finally{il=A}}:g=ii,e&&i){const A=g,O=i===!0?1/0:i;g=()=>ao(A(),O)}const I=Hg(),D=()=>{v.stop(),I&&I.active&&Vg(I.effects,v)};if(o&&e){const A=e;e=(...O)=>{A(...O),D()}}let F=P?new Array(t.length).fill(qp):qp;const C=A=>{if(!(!(v.flags&1)||!v.dirty&&!A))if(e){const O=v.run();if(i||E||(P?O.some((j,te)=>Si(j,F[te])):Si(O,F))){y&&y();const j=il;il=v;try{const te=[O,F===qp?void 0:P&&F[0]===qp?[]:F,x];F=O,h?h(e,3,te):e(...te)}finally{il=j}}}else v.run()};return c&&c(C),v=new Bh(g),v.scheduler=r?()=>r(C,!1):C,x=A=>s2(A,!1,v),y=v.onStop=()=>{const A=Gm.get(v);if(A){if(h)h(A,4);else for(const O of A)O();Gm.delete(v)}},e?n?C(!0):F=v.run():r?r(C.bind(null,!0),!0):v.run(),D.pause=v.pause.bind(v),D.resume=v.resume.bind(v),D.stop=D,D}function ao(t,e=1/0,s){if(e<=0||!js(t)||t.__v_skip||(s=s||new Map,(s.get(t)||0)>=e))return t;if(s.set(t,e),e--,hn(t))ao(t.value,e,s);else if(Mt(t))for(let n=0;n<t.length;n++)ao(t[n],e,s);else if(Cl(t)||mu(t))t.forEach(n=>{ao(n,e,s)});else if(xf(t)){for(const n in t)ao(t[n],e,s);for(const n of Object.getOwnPropertySymbols(t))Object.prototype.propertyIsEnumerable.call(t,n)&&ao(t[n],e,s)}return t}/** 28* @vue/runtime-core v3.5.24 29* (c) 2018-present Yuxi (Evan) You and Vue contributors 30* @license MIT
31**/const n2=[];function qV(t){n2.push(t)}function GV(){n2.pop()}function XV(t,e){}const KV={SETUP_FUNCTION:0,0:"SETUP_FUNCTION",RENDER_FUNCTION:1,1:"RENDER_FUNCTION",NATIVE_EVENT_HANDLER:5,5:"NATIVE_EVENT_HANDLER",COMPONENT_EVENT_HANDLER:6,6:"COMPONENT_EVENT_HANDLER",VNODE_HOOK:7,7:"VNODE_HOOK",DIRECTIVE_HOOK:8,8:"DIRECTIVE_HOOK",TRANSITION_HOOK:9,9:"TRANSITION_HOOK",APP_ERROR_HANDLER:10,10:"APP_ERROR_HANDLER",APP_WARN_HANDLER:11,11:"APP_WARN_HANDLER",FUNCTION_REF:12,12:"FUNCTION_REF",ASYNC_COMPONENT_LOADER:13,13:"ASYNC_COMPONENT_LOADER",SCHEDULER:14,14:"SCHEDULER",COMPONENT_UPDATE:15,15:"COMPONENT_UPDATE",APP_UNMOUNT_CLEANUP:16,16:"APP_UNMOUNT_CLEANUP"},JV={sp:"serverPrefetch hook",bc:"beforeCreate hook",c:"created hook",bm:"beforeMount hook",m:"mounted hook",bu:"beforeUpdate hook",u:"updated",bum:"beforeUnmount hook",um:"unmounted hook",a:"activated hook",da:"deactivated hook",ec:"errorCaptured hook",rtc:"renderTracked hook",rtg:"renderTriggered hook",0:"setup function",1:"render function",2:"watcher getter",3:"watcher callback",4:"watcher cleanup function",5:"native event handler",6:"component event handler",7:"vnode hook",8:"directive hook",9:"transition hook",10:"app errorHandler",11:"app warnHandler",12:"ref function",13:"async component loader",14:"scheduler flush",15:"component update",16:"app unmount cleanup function"};function bd(t,e,s,n){try{return n?t(...n):t()}catch(i){Hu(i,e,s)}}function Hr(t,e,s,n){if(ss(t)){const i=bd(t,e,s,n);return i&&Bg(i)&&i.catch(o=>{Hu(o,e,s)}),i}if(Mt(t)){const i=[];for(let o=0;o<t.length;o++)i.push(Hr(t[o],e,s,n));return i}}function Hu(t,e,s,n=!0){const i=e?e.vnode:null,{errorHandler:o,throwUnhandledErrorInProduction:r}=e&&e.appContext.config||As;if(e){let c=e.parent;const h=e.proxy,f=`https://vuejs.org/error-reference/#runtime-${s}`;for(;c;){const v=c.ec;if(v){for(let g=0;g<v.length;g++)if(v[g](t,h,f)===!1)return}c=c.parent}if(o){Eo(),bd(o,null,10,[t,h,f]),So();return}}QV(t,s,i,n,r)}function QV(t,e,s,n=!0,i=!1){if(i)throw t;console.error(t)}const Hi=[];let Ta=-1;const Rc=[];let rl=null,Oc=0;const i2=Promise.resolve();let Xm=null;function vs(t){const e=Xm||i2;return t?e.then(this?t.bind(this):t):e}function ZV(t){let e=Ta+1,s=Hi.length;for(;e<s;){const n=e+s>>>1,i=Hi[n],o=Wh(i);o<t||o===t&&i.flags&2?e=n+1:s=n}return e}function h_(t){if(!(t.flags&1)){const e=Wh(t),s=Hi[Hi.length-1];!s||!(t.flags&2)&&e>=Wh(s)?Hi.push(t):Hi.splice(ZV(e),0,t),t.flags|=1,r2()}}function r2(){Xm||(Xm=i2.then(a2))}function Hh(t){Mt(t)?Rc.push(...t):rl&&t.id===-1?rl.splice(Oc+1,0,t):t.flags&1||(Rc.push(t),t.flags|=1),r2()}function pS(t,e,s=Ta+1){for(;s<Hi.length;s++){const n=Hi[s];if(n&&n.flags&2){if(t&&n.id!==t.uid)continue;Hi.splice(s,1),s--,n.flags&4&&(n.flags&=-2),n(),n.flags&4||(n.flags&=-2)}}}function Km(t){if(Rc.length){const e=[...new Set(Rc)].sort((s,n)=>Wh(s)-Wh(n));if(Rc.length=0,rl){rl.push(...e);return}for(rl=e,Oc=0;Oc<rl.length;Oc++){const s=rl[Oc];s.flags&4&&(s.flags&=-2),s.flags&8||s(),s.flags&=-2}rl=null,Oc=0}}const Wh=t=>t.id==null?t.flags&2?-1:1/0:t.id;function a2(t){try{for(Ta=0;Ta<Hi.length;Ta++){const e=Hi[Ta];e&&!(e.flags&8)&&(e.flags&4&&(e.flags&=-2),bd(e,e.i,e.i?15:14),e.flags&4||(e.flags&=-2))}}finally{for(;Ta<Hi.length;Ta++){const e=Hi[Ta];e&&(e.flags&=-2)}Ta=-1,Hi.length=0,Km(),Xm=null,(Hi.length||Rc.length)&&a2()}}let Dc,Gp=[];function o2(t,e){var s,n;Dc=t,Dc?(Dc.enabled=!0,Gp.forEach(({event:i,args:o})=>
vendor: 59,850 bytes, lines 31-36
31Dc.emit(i,...o)),Gp=[]):typeof window<"u"&&window.HTMLElement&&!((n=(s=window.navigator)==null?void 0:s.userAgent)!=null&&n.includes("jsdom"))?((e.__VUE_DEVTOOLS_HOOK_REPLAY__=e.__VUE_DEVTOOLS_HOOK_REPLAY__||[]).push(o=>{o2(o,e)}),setTimeout(()=>{Dc||(e.__VUE_DEVTOOLS_HOOK_REPLAY__=null,Gp=[])},3e3)):Gp=[]}let fi=null,Xg=null;function zh(t){const e=fi;return fi=t,Xg=t&&t.type.__scopeId||null,e}function eB(t){Xg=t}function tB(){Xg=null}const sB=t=>vt;function vt(t,e=fi,s){if(!e||t._n)return t;const n=(...i)=>{n._d&&Gh(-1);const o=zh(e);let r;try{r=t(...i)}finally{zh(o),n._d&&Gh(1)}return r};return n._n=!0,n._c=!0,n._d=!0,n}function _t(t,e){if(fi===null)return t;const s=Tf(fi),n=t.dirs||(t.dirs=[]);for(let i=0;i<e.length;i++){let[o,r,c,h=As]=e[i];o&&(ss(o)&&(o={mounted:o,updated:o}),o.deep&&ao(r),n.push({dir:o,instance:s,value:r,oldValue:void 0,arg:c,modifiers:h}))}return t}function Aa(t,e,s,n){const i=t.dirs,o=e&&e.dirs;for(let r=0;r<i.length;r++){const c=i[r];o&&(c.oldValue=o[r].value);let h=c.dir[n];h&&(Eo(),Hr(h,s,8,[t.el,c,t,e]),So())}}const l2=Symbol("_vte"),u2=t=>t.__isTeleport,kh=t=>t&&(t.disabled||t.disabled===""),mS=t=>t&&(t.defer||t.defer===""),gS=t=>typeof SVGElement<"u"&&t instanceof SVGElement,vS=t=>typeof MathMLElement=="function"&&t instanceof MathMLElement,F0=(t,e)=>{const s=t&&t.to;return os(s)?e?e(s):null:s},c2={name:"Teleport",__isTeleport:!0,process(t,e,s,n,i,o,r,c,h,f){const{mc:v,pc:g,pbc:y,o:{insert:x,querySelector:E,createText:P,createComment:I}}=f,D=kh(e.props);let{shapeFlag:F,children:C,dynamicChildren:A}=e;if(t==null){const O=e.el=P(""),j=e.anchor=P("");x(O,s,n),x(j,s,n);const te=(z,re)=>{F&16&&v(C,z,re,i,o,r,c,h)},B=()=>{const z=e.target=F0(e.props,E),re=d2(z,e,P,x);z&&(r!=="svg"&&gS(z)?r="svg":r!=="mathml"&&vS(z)&&(r="mathml"),i&&i.isCE&&(i.ce._teleportTargets||(i.ce._teleportTargets=new Set)).add(z),D||(te(z,re),_m(e,!1)))};D&&(te(s,j),_m(e,!0)),mS(e.props)?(e.el.__isMounted=!1,Qn(()=>{B(),delete e.el.__isMounted},o)):B()}else{if(mS(e.props)&&t.el.__isMounted===!1){Qn(()=>{c2.process(t,e,s,n,i,o,r,c,h,f)},o);return}e.el=t.el,e.targetStart=t.targetStart;const O=e.anchor=t.anchor,j=e.target=t.target,te=e.targetAnchor=t.targetAnchor,B=kh(t.props),z=B?s:j,re=B?O:te;if(r==="svg"||gS(j)?r="svg":(r==="mathml"||vS(j))&&(r="mathml"),A?(y(t.dynamicChildren,A,z,i,o,r,c),k_(t,e,!0)):h||g(t,e,z,re,i,o,r,c,!1),D)B?e.props&&t.props&&e.props.to!==t.props.to&&(e.props.to=t.props.to):Xp(e,s,O,f,1);else if((e.props&&e.props.to)!==(t.props&&t.props.to)){const ne=e.target=F0(e.props,E);ne&&Xp(e,ne,null,f,0)}else B&&Xp(e,j,te,f,1);_m(e,D)}},remove(t,e,s,{um:n,o:{remove:i}},o){const{shapeFlag:r,children:c,anchor:h,targetStart:f,targetAnchor:v,target:g,props:y}=t;if(g&&(i(f),i(v)),o&&i(h),r&16){const x=o||!kh(y);for(let E=0;E<c.length;E++){const P=c[E];n(P,e,s,x,!!P.dynamicChildren)}}},move:Xp,hydrate:nB};function Xp(t,e,s,{o:{insert:n},m:i},o=2){o===0&&n(t.targetAnchor,e,s);const{el:r,anchor:c,shapeFlag:h,children:f,props:v}=t,g=o===2;if(g&&n(r,e,s),(!g||kh(v))&&h&16)for(let y=0;y<f.length;y++)i(f[y],e,s,2);g&&n(c,e,s)}function nB(t,e,s,n,i,o,{o:{nextSibling:r,parentNode:c,querySelector:h,insert:f,createText:v}},g){function y(P,I,D,F){I.anchor=g(r(P),I,c(P),s,n,i,o),I.targetStart=D,I.targetAnchor=F}const x=e.target=F0(e.props,h),E=kh(e.props);if(x){const P=x._lpa||x.firstChild;if(e.shapeFlag&16)if(E)y(t,e,P,P&&r(P));else{e.anchor=r(t);let I=P;for(;I;){if(I&&I.nodeType===8){if(I.data==="teleport start anchor")e.targetStart=I;else if(I.data==="teleport anchor"){e.targetAnchor=I,x._lpa=e.targetAnchor&&r(e.targetAnchor);break}}I=r(I)}e.targetAnchor||d2(x,e,v,f),g(P&&r(P),e,x,s,n,i,o)}_m(e,E)}else E&&e.shapeFlag&16&&y(t,e,t,r(t));return e.anchor&&r(e.anchor)}const f_=c2;function _m(t,e){const s=t.ctx;if(s&&s.ut){let n,i;for(e?(n=t.el,i=t.anchor):(n=t.targetStart,i=t.targetAnchor);n&&n!==i;)n.nodeType===1&&n.setAttribute("data-v-owner",s.uid),n=n.nextSibling;s.ut()}}function d2(t,e,s,n){const i=e.targetStart=s(""),o=e.targetAnchor=s("");return i[l2]=o,t&&(n(i,t),n(o,t)),o}const io=Symbol("_leaveCb"),Kp=Symbol("_enterCb");function p_(){const t={isMounted:!1,isLeaving:!1,isUnmounting:!1,leavingVNodes:new Map};return Xt(()=>{t.isMounted=!0}),Wu(()=>{t.isUnmounting=!0}),t}const Ir=[Function,Array],m_={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:Ir,onEnter:Ir,onAfterEnter:Ir,onEnterCancelled:Ir,onBeforeLeave:Ir,onLeave:Ir,onAfterLeave:Ir,onLeaveCancelled:Ir,onBeforeAppear:Ir,onAppear:Ir,onAfterAppear:Ir,onAppearCancelled:Ir},h2=t=>{const e=t.subTree;return e.component?h2(e.component):e},iB={name:"BaseTransition",props:m_,setup(t,{slots:e}){const s=Qi(),n=p_();return()=>{const i=e.default&&Kg(e.default(),!0);if(!i||!i.length)return;const o=f2(i),r=Is(t),{mode:c}=r;if(n.isLeaving)return wy(o);const h=bS(o);if(!h)return wy(o);let f=Kc(h,r,n,s,g=>f=g);h.type!==Vn&&Co(h,f);let v=s.subTree&&bS(s.subTree);if(v&&v.type!==Vn&&!ua(v,h)&&h2(s).type!==Vn){let g=Kc(v,r,n,s);if(Co(v,g),c==="out-in"&&h.type!==Vn)return n.isLeaving=!0,g.afterLeave=()=>{n.isLeaving=!1,s.job.flags&8||s.update(),delete g.afterLeave,v=void 0},wy(o);c==="in-out"&&h.type!==Vn?g.delayLeave=(y,x,E)=>{const P=m2(n,v);P[String(v.key)]=v,y[io]=()=>{x(),y[io]=void 0,delete f.delayedLeave,v=void 0},f.delayedLeave=()=>{E(),delete f.delayedLeave,v=void 0}}:v=void 0}else v&&(v=void 0);return o}}};function f2(t){let e=t[0];if(t.length>1){for(const s of t)if(s.type!==Vn){e=s;break}}return e}const p2=iB;function m2(t,e){const{leavingVNodes:s}=t;let n=s.get(e.type);return n||(n=Object.create(null),s.set(e.type,n)),n}function Kc(t,e,s,n,i){const{appear:o,mode:r,persisted:c=!1,onBeforeEnter:h,onEnter:f,onAfterEnter:v,onEnterCancelled:g,onBeforeLeave:y,onLeave:x,onAfterLeave:E,onLeaveCancelled:P,onBeforeAppear:I,onAppear:D,onAfterAppear:F,onAppearCancelled:C}=e,A=String(t.key),O=m2(s,t),j=(z,re)=>{z&&Hr(z,n,9,re)},te=(z,re)=>{const ne=re[1];j(z,re),Mt(z)?z.every(X=>X.length<=1)&&ne():z.length<=1&&ne()},B={mode:r,persisted:c,beforeEnter(z){let re=h;if(!s.isMounted)if(o)re=I||h;else return;z[io]&&z[io](!0);const ne=O[A];ne&&ua(t,ne)&&ne.el[io]&&ne.el[io](),j(re,[z])},enter(z){let re=f,ne=v,X=g;if(!s.isMounted)if(o)re=D||f,ne=F||v,X=C||g;else return;let G=!1;const ce=z[Kp]=be=>{G||(G=!0,be?j(X,[z]):j(ne,[z]),B.delayedLeave&&B.delayedLeave(),z[Kp]=void 0)};re?te(re,[z,ce]):ce()},leave(z,re){const ne=String(t.key);if(z[Kp]&&z[Kp](!0),s.isUnmounting)return re();j(y,[z]);let X=!1;const G=z[io]=ce=>{X||(X=!0,re(),ce?j(P,[z]):j(E,[z]),z[io]=void 0,O[ne]===t&&delete O[ne])};O[ne]=t,x?te(x,[z,G]):G()},clone(z){const re=Kc(z,e,s,n,i);return i&&i(re),re}};return B}function wy(t){if(kf(t))return t=Ba(t),t.children=null,t}function bS(t){if(!kf(t))return u2(t.type)&&t.children?f2(t.children):t;if(t.component)return t.component.subTree;const{shapeFlag:e,children:s}=t;if(s){if(e&16)return s[0];if(e&32&&ss(s.default))return s.default()}}function Co(t,e){t.shapeFlag&6&&t.component?(t.transition=e,Co(t.component.subTree,e)):t.shapeFlag&128?(t.ssContent.transition=e.clone(t.ssContent),t.ssFallback.transition=e.clone(t.ssFallback)):t.transition=e}function Kg(t,e=!1,s){let n=[],i=0;for(let o=0;o<t.length;o++){let r=t[o];const c=s==null?r.key:String(s)+String(r.key!=null?r.key:o);r.type===Ze?(r.patchFlag&128&&i++,n=n.concat(Kg(r.children,e,c))):(e||r.type!==Vn)&&n.push(c!=null?Ba(r,{key:c}):r)}if(i>1)for(let o=0;o<n.length;o++)n[o].patchFlag=-2;return n}function Mi(t,e){return ss(t)?Cs({name:t.name},e,{setup:t}):t}function rB(){const t=Qi();return t?(t.appContext.config.idPrefix||"v")+"-"+t.ids[0]+t.ids[1]++:""}function g_(t){t.ids=[t.ids[0]+t.ids[2]+++"-",0,0]}function aB(t){const e=Qi(),s=c_(null);if(e){const i=e.refs===As?e.refs={}:e.refs;Object.defineProperty(i,t,{enumerable:!0,get:()=>s.value,set:o=>s.value=o})}return s}const Jm=new WeakMap;function Fc(t,e,s,n,i=!1){if(Mt(t)){t.forEach((E,P)=>Fc(E,e&&(Mt(e)?e[P]:e),s,n,i));return}if(pl(n)&&!i){n.shapeFlag&512&&n.type.__asyncResolved&&n.component.subTree.component&&Fc(t,e,s,n.component.subTree);return}const o=n.shapeFlag&4?Tf(n.component):n.el,r=i?null:o,{i:c,r:h}=t,f=e&&e.r,v=c.refs===As?c.refs={}:c.refs,g=c.setupState,y=Is(g),x=g===As?au:E=>Us(y,E);if(f!=null&&f!==h){if(yS(e),os(f))v[f]=null,x(f)&&(g[f]=null);else if(hn(f)){f.value=null;const E=e;E.k&&(v[E.k]=null)}}if(ss(h))bd(h,c,12,[r,v]);else{const E=os(h),P=hn(h);if(E||P){const I=()=>{if(t.f){const D=E?x(h)?g[h]:v[h]:h.value;if(i)Mt(D)&&Vg(D,o);else if(Mt(D))D.includes(o)||D.push(o);else if(E)v[h]=[o],x(h)&&(g[h]=v[h]);else{const F=[o];h.value=F,t.k&&(v[t.k]=F)}}else E?(v[h]=r,x(h)&&(g[h]=r)):P&&(h.value=r,t.k&&(v[t.k]=r))};if(r){const D=()=>{I(),Jm.delete(t)};D.id=-1,Jm.set(t,D),Qn(D,s)}else yS(t),I()}}}function yS(t){const e=Jm.get(t);e&&(e.flags|=8,Jm.delete(t))}let _S=!1;const bc=()=>{_S||(console.error("Hydration completed but contains mismatches."),_S=!0)},oB=t=>t.namespaceURI.includes("svg")&&t.tagName!=="foreignObject",lB=t=>t.namespaceURI.includes("MathML"),Jp=t=>{if(t.nodeType===1){if(oB(t))return"svg";if(lB(t))return"mathml"}},Mc=t=>t.nodeType===8;function uB(t){const{mt:e,p:s,o:{patchProp:n,createText:i,nextSibling:o,parentNode:r,remove:c,insert:h,createComment:f}}=t,v=(C,A)=>{if(!A.hasChildNodes()){s(null,C,A),Km(),A._vnode=C;return}g(A.firstChild,C,null,null,null),Km(),A._vnode=C},g=(C,A,O,j,te,B=!1)=>{B=B||!!A.dynamicChildren;const z=Mc(C)&&C.data==="[",re=()=>P(C,A,O,j,te,z),{type:ne,ref:X,shapeFlag:G,patchFlag:ce}=A;let be=C.nodeType;A.el=C,ce===-2&&(B=!1,A.dynamicChildren=null);let J=null;switch(ne){case ml:be!==3?A.children===""?(h(A.el=i(""),r(C),C),J=C):J=re():(C.data!==A.children&&(bc(),C.data=A.children),J=o(C));break;case Vn:F(C)?(J=o(C),D(A.el=C.content.firstChild,C,O)):be!==8||z?J=re():J=o(C);break;case _u:if(z&&(C=o(C),be=C.nodeType),be===1||be===3){J=C;const Z=!A.children.length;for(let ge=0;ge<A.staticCount;ge++)Z&&(A.children+=J.nodeType===1?J.outerHTML:J.data),ge===A.staticCount-1&&(A.anchor=J),J=o(J);return z?o(J):J}else re();break;case Ze:z?J=E(C,A,O,j,te,B):J=re();break;default:if(G&1)(be!==1||A.type.toLowerCase()!==C.tagName.toLowerCase())&&!F(C)?J=re():J=y(C,A,O,j,te,B);else if(G&6){A.slotScopeIds=te;const Z=r(C);if(z?J=I(C):Mc(C)&&C.data==="teleport start"?J=I(C,C.data,"teleport end"):J=o(C),e(A,Z,null,O,j,Jp(Z),B),pl(A)&&!A.type.__asyncResolved){let ge;z?(ge=et(Ze),ge.anchor=J?J.previousSibling:Z.lastChild):ge=C.nodeType===3?Pe(""):et("div"),ge.el=C,A.component.subTree=ge}}else G&64?be!==8?J=re():J=A.type.hydrate(C,A,O,j,te,B,t,x):G&128&&(J=A.type.hydrate(C,A,O,j,Jp(r(C)),te,B,t,g))}return X!=null&&Fc(X,null,j,A),J},y=(C,A,O,j,te,B)=>{B=B||!!A.dynamicChildren;const{type:z,props:re,patchFlag:ne,shapeFlag:X,dirs:G,transition:ce}=A,be=z==="input"||z==="option";if(be||ne!==-1){G&&Aa(A,null,O,"created");let J=!1;if(F(C)){J=F2(null,ce)&&O&&O.vnode.props&&O.vnode.props.appear;const ge=C.content.firstChild;if(J){const q=ge.getAttribute("class");q&&(ge.$cls=q),ce.beforeEnter(ge)}D(ge,C,O),A.el=C=ge}if(X&16&&!(re&&(re.innerHTML||re.textContent))){let ge=x(C.firstChild,A,C,O,j,te,B);for(;ge;){Qp(C,1)||bc();const q=ge;ge=ge.nextSibling,c(q)}}else if(X&8){let ge=A.children;ge[0]===` 32`&&(C.tagName==="PRE"||C.tagName==="TEXTAREA")&&(ge=ge.slice(1));const{textContent:q}=C;q!==ge&&q!==ge.replace(/\r\n|\r/g,` 33`)&&(Qp(C,0)||bc(),C.textContent=A.children)}if(re){if(be||!B||ne&48){const ge=C.tagName.includes("-");for(const q in re)(be&&(q.endsWith("value")||q==="indeterminate")||kl(q)&&!go(q)||q[0]==="."||ge)&&n(C,q,null,re[q],void 0,O)}else if(re.onClick)n(C,"onClick",null,re.onClick,void 0,O);else if(ne&4&&Ra(re.style))for(const ge in re.style)re.style[ge]}let Z;(Z=re&&re.onVnodeBeforeMount)&&nr(Z,O,A),G&&Aa(A,null,O,"beforeMount"),((Z=re&&re.onVnodeMounted)||G||J)&&q2(()=>{Z&&nr(Z,O,A),J&&ce.enter(C),G&&Aa(A,null,O,"mounted")},j)}return C.nextSibling},x=(C,A,O,j,te,B,z)=>{z=z||!!A.dynamicChildren;const re=A.children,ne=re.length;for(let X=0;X<ne;X++){const G=z?re[X]:re[X]=ir(re[X]),ce=G.type===ml;C?(ce&&!z&&X+1<ne&&ir(re[X+1]).type===ml&&(h(i(C.data.slice(G.children.length)),O,o(C)),C.data=G.children),C=g(C,G,j,te,B,z)):ce&&!G.children?h(G.el=i(""),O):(Qp(O,1)||bc(),s(null,G,O,null,j,te,Jp(O),B))}return C},E=(C,A,O,j,te,B)=>{const{slotScopeIds:z}=A;z&&(te=te?te.concat(z):z);const re=r(C),ne=x(o(C),A,re,O,j,te,B);return ne&&Mc(ne)&&ne.data==="]"?o(A.anchor=ne):(bc(),h(A.anchor=f("]"),re,ne),ne)},P=(C,A,O,j,te,B)=>{if(Qp(C.parentElement,1)||bc(),A.el=null,B){const ne=I(C);for(;;){const X=o(C);if(X&&X!==ne)c(X);else break}}const z=o(C),re=r(C);return c(C),s(null,A,re,z,O,j,Jp(re),te),O&&(O.vnode.el=A.el,sv(O,A.el)),z},I=(C,A="[",O="]")=>{let j=0;for(;C;)if(C=o(C),C&&Mc(C)&&(C.data===A&&j++,C.data===O)){if(j===0)return o(C);j--}return C},D=(C,A,O)=>{const j=A.parentNode;j&&j.replaceChild(C,A);let te=O;for(;te;)te.vnode.el===A&&(te.vnode.el=te.subTree.el=C),te=te.parent},F=C=>C.nodeType===1&&C.tagName==="TEMPLATE";return[v,g]}const xS="data-allow-mismatch",cB={0:"text",1:"children",2:"class",3:"style",4:"attribute"};function Qp(t,e){if(e===0||e===1)for(;t&&!t.hasAttribute(xS);)t=t.parentElement;const s=t&&t.getAttribute(xS);if(s==null)return!1;if(s==="")return!0;{const n=s.split(",");return e===0&&n.includes("children")?!0:n.includes(cB[e])}}const dB=Ef().requestIdleCallback||(t=>setTimeout(t,1)),hB=Ef().cancelIdleCallback||(t=>clearTimeout(t)),fB=(t=1e4)=>e=>{const s=dB(e,{timeout:t});return()=>hB(s)};function pB(t){const{top:e,left:s,bottom:n,right:i}=t.getBoundingClientRect(),{innerHeight:o,innerWidth:r}=window;return(e>0&&e<o||n>0&&n<o)&&(s>0&&s<r||i>0&&i<r)}const mB=t=>(e,s)=>{const n=new IntersectionObserver(i=>{for(const o of i)if(o.isIntersecting){n.disconnect(),e();break}},t);return s(i=>{if(i instanceof Element){if(pB(i))return e(),n.disconnect(),!1;n.observe(i)}}),()=>n.disconnect()},gB=t=>e=>{if(t){const s=matchMedia(t);if(s.matches)e();else return s.addEventListener("change",e,{once:!0}),()=>s.removeEventListener("change",e)}},vB=(t=[])=>(e,s)=>{os(t)&&(t=[t]);let n=!1;const i=r=>{n||(n=!0,o(),e(),r.target.dispatchEvent(new r.constructor(r.type,r)))},o=()=>{s(r=>{for(const c of t)r.removeEventListener(c,i)})};return s(r=>{for(const c of t)r.addEventListener(c,i,{once:!0})}),o};function bB(t,e){if(Mc(t)&&t.data==="["){let s=1,n=t.nextSibling;for(;n;){if(n.nodeType===1){if(e(n)===!1)break}else if(Mc(n))if(n.data==="]"){if(--s===0)break}else n.data==="["&&s++;n=n.nextSibling}}else e(t)}const pl=t=>!!t.type.__asyncLoader;function yB(t){ss(t)&&(t={loader:t});const{loader:e,loadingComponent:s,errorComponent:n,delay:i=200,hydrate:o,timeout:r,suspensible:c=!0,onError:h}=t;let f=null,v,g=0;const y=()=>(g++,f=null,x()),x=()=>{let E;return f||(E=f=e().catch(P=>{if(P=P instanceof Error?P:new Error(String(P)),h)return new Promise((I,D)=>{h(P,()=>I(y()),()=>D(P),g+1)});throw P}).then(P=>E!==f&&f?f:(P&&(P.__esModule||P[Symbol.toStringTag]==="Module")&&(P=P.default),v=P,P)))};return Mi({name:"AsyncComponentWrapper",__asyncLoader:x,__asyncHydrate(E,P,I){let D=!1;(P.bu||(P.bu=[])).push(()=>D=!0);const F=()=>{D||I()},C=o?()=>{const A=o(F,O=>bB(E,O));A&&(P.bum||(P.bum=[])).push(A)}:F;v?C():x().then(()=>!P.isUnmounted&&C())},get __asyncResolved(){return v},setup(){const E=hi;if(g_(E),v)return()=>Zp(v,E);const P=C=>{f=null,Hu(C,E,13,!n)};if(c&&E.suspense||Jc)return x().then(C=>()=>Zp(C,E)).catch(C=>(P(C),()=>n?et(n,{error:C}):null));const I=ve(!1),D=ve(),F=ve(!!i);return i&&setTimeout(()=>{F.value=!1},i),r!=null&&setTimeout(()=>{if(!I.value&&!D.value){const C=new Error(`Async component timed out after ${r}ms.`);P(C),D.value=C}},r),x().then(()=>{I.value=!0,E.parent&&kf(E.parent.vnode)&&E.parent.update()}).catch(C=>{P(C),D.value=C}),()=>{if(I.value&&v)return Zp(v,E);if(D.value&&n)return et(n,{error:D.value});if(s&&!F.value)return Zp(s,E)}}})}function Zp(t,e){const{ref:s,props:n,children:i,ce:o}=e.vnode,r=et(t,n,i);return r.ref=s,r.ce=o,delete e.vnode.ce,r}const kf=t=>t.type.__isKeepAlive,_B={name:"KeepAlive",__isKeepAlive:!0,props:{include:[String,RegExp,Array],exclude:[String,RegExp,Array],max:[String,Number]},setup(t,{slots:e}){const s=Qi(),n=s.ctx;if(!n.renderer)return()=>{const F=e.default&&e.default();return F&&F.length===1?F[0]:F};const i=new Map,o=new Set;let r=null;const c=s.suspense,{renderer:{p:h,m:f,um:v,o:{createElement:g}}}=n,y=g("div");n.activate=(F,C,A,O,j)=>{const te=F.component;f(F,C,A,0,c),h(te.vnode,F,C,A,te,c,O,F.slotScopeIds,j),Qn(()=>{te.isDeactivated=!1,te.a&&vu(te.a);const B=F.props&&F.props.onVnodeMounted;B&&nr(B,te.parent,F)},c)},n.deactivate=F=>{const C=F.component;Zm(C.m),Zm(C.a),f(F,y,null,1,c),Qn(()=>{C.da&&vu(C.da);const A=F.props&&F.props.onVnodeUnmounted;A&&nr(A,C.parent,F),C.isDeactivated=!0},c)};function x(F){Ey(F),v(F,s,c,!0)}function E(F){i.forEach((C,A)=>{const O=X0(C.type);O&&!F(O)&&P(A)})}function P(F){const C=i.get(F);C&&(!r||!ua(C,r))?x(C):r&&Ey(r),i.delete(F),o.delete(F)}Pt(()=>[t.include,t.exclude],([F,C])=>{F&&E(A=>mh(F,A)),C&&E(A=>!mh(C,A))},{flush:"post",deep:!0});let I=null;const D=()=>{I!=null&&(eg(s.subTree.type)?Qn(()=>{i.set(I,em(s.subTree))},s.subTree.suspense):i.set(I,em(s.subTree)))};return Xt(D),Zg(D),Wu(()=>{i.forEach(F=>{const{subTree:C,suspense:A}=s,O=em(C);if(F.type===O.type&&F.key===O.key){Ey(O);const j=O.component.da;j&&Qn(j,A);return}x(F)})}),()=>{if(I=null,!e.default)return r=null;const F=e.default(),C=F[0];if(F.length>1)return r=null,F;if(!To(C)||!(C.shapeFlag&4)&&!(C.shapeFlag&128))return r=null,C;let A=em(C);if(A.type===Vn)return r=null,A;const O=A.type,j=X0(pl(A)?A.type.__asyncResolved||{}:O),{include:te,exclude:B,max:z}=t;if(te&&(!j||!mh(te,j))||B&&j&&mh(B,j))return A.shapeFlag&=-257,r=A,C;const re=A.key==null?O:A.key,ne=i.get(re);return A.el&&(A=Ba(A),C.shapeFlag&128&&(C.ssContent=A)),I=re,ne?(A.el=ne.el,A.component=ne.component,A.transition&&Co(A,A.transition),A.shapeFlag|=512,o.delete(re),o.add(re)):(o.add(re),z&&o.size>parseInt(z,10)&&P(o.values().next().value)),A.shapeFlag|=256,r=A,eg(C.type)?C:A}}},xB=_B;function mh(t,e){return Mt(t)?t.some(s=>mh(s,e)):os(t)?t.split(",").includes(e):EA(t)?(t.lastIndex=0,t.test(e)):!1}function v_(t,e){g2(t,"a",e)}function b_(t,e){g2(t,"da",e)}function g2(t,e,s=hi){const n=t.__wdc||(t.__wdc=()=>{let i=s;for(;i;){if(i.isDeactivated)return;i=i.parent}return t()});if(Jg(e,n,s),s){let i=s.parent;for(;i&&i.parent;)kf(i.parent.vnode)&&wB(n,e,s,i),i=i.parent}}function wB(t,e,s,n){const i=Jg(e,t,n,!0);Ni(()=>{Vg(n[e],i)},s)}function Ey(t){t.shapeFlag&=-257,t.shapeFlag&=-513}function em(t){return t.shapeFlag&128?t.ssContent:t}function Jg(t,e,s=hi,n=!1){if(s){const i=s[t]||(s[t]=[]),o=e.__weh||(e.__weh=(...r)=>{Eo();const c=Iu(s),h=Hr(e,s,t,r);return c(),So(),h});return n?i.unshift(o):i.push(o),o}}const Do=t=>(e,s=hi)=>{(!Jc||t==="sp")&&Jg(t,(...n)=>e(...n),s)},v2=Do("bm"),Xt=Do("m"),Qg=Do("bu"),Zg=Do("u"),Wu=Do("bum"),Ni=Do("um"),b2=Do("sp"),y2=Do("rtg"),_2=Do("rtc");function x2(t,e=hi){Jg("ec",t,e)}const y_="components",EB="directives";function ur(t,e){return __(y_,t,!0,e)||t}const w2=Symbol.for("v-ndc");function Du(t){return os(t)?__(y_,t,!1)||t:t||w2}function yd(t){return __(EB,t)}function __(t,e,s=!0,n=!1){const i=fi||hi;if(i){const o=i.type;if(t===y_){const c=X0(o,!1);if(c&&(c===e||c===ln(e)||c===Tl(ln(e))))return o}const r=wS(i[t]||o[t],e)||wS(i.appContext[t],e);return!r&&n?o:r}}function wS(t,e){return t&&(t[e]||t[ln(e)]||t[Tl(ln(e))])}function At(t,e,s,n){let i;const o=s&&s[n],r=Mt(t);if(r||os(t)){const c=r&&Ra(t);let h=!1,f=!1;c&&(h=!_r(t),f=ko(t),t=zg(t)),i=new Array(t.length);for(let v=0,g=t.length;v<g;v++)i[v]=e(h?f?qm(di(t[v])):di(t[v]):t[v],v,void 0,o&&o[v])}else if(typeof t=="number"){i=new Array(t);for(let c=0;c<t;c++)i[c]=e(c+1,c,void 0,o&&o[c])}else if(js(t))if(t[Symbol.iterator])i=Array.from(t,(c,h)=>e(c,h,void 0,o&&o[h]));else{const c=Object.keys(t);i=new Array(c.length);for(let h=0,f=c.length;h<f;h++){const v=c[h];i[h]=e(t[v],v,h,o&&o[h])}}else i=[];return s&&(s[n]=i),i}function zi(t,e){for(let s=0;s<e.length;s++){const n=e[s];if(Mt(n))for(let i=0;i<n.length;i++)t[n[i].name]=n[i].fn;else n&&(t[n.name]=n.key?(...i)=>{const o=n.fn(...i);return o&&(o.key=n.key),o}:n.fn)}return t}function Ft(t,e,s={},n,i){if(fi.ce||fi.parent&&pl(fi.parent)&&fi.parent.ce){const f=Object.keys(s).length>0;return e!=="default"&&(s.name=e),$(),Ut(Ze,null,[et("slot",s,n&&n())],f?-2:64)}let o=t[e];o&&o._c&&(o._d=!1),$();const r=o&&x_(o(s)),c=s.key||r&&r.key,h=Ut(Ze,{key:(c&&!Ji(c)?c:`_${e}`)+(!r&&n?"_fb":"")},r||(n?n():[]),r&&t._===1?64:-2);return!i&&h.scopeId&&(h.slotScopeIds=[h.scopeId+"-s"]),o&&o._c&&(o._d=!0),h}function x_(t){return t.some(e=>To(e)?!(e.type===Vn||e.type===Ze&&!x_(e.children)):!0)?t:null}function SB(t,e){const s={};for(const n in t)s[e&&/[A-Z]/.test(n)?`on:${n}`:gu(n)]=t[n];return s}const V0=t=>t?Q2(t)?Tf(t):V0(t.parent):null,Ch=Cs(Object.create(null),{$:t=>t,$el:t=>t.vnode.el,$data:t=>t.data,$props:t=>t.props,$attrs:t=>t.attrs,$slots:t=>t.slots,$refs:t=>t.refs,$parent:t=>V0(t.parent),$root:t=>V0(t.root),$host:t=>t.ce,$emit:t=>t.emit,$options:t=>w_(t),$forceUpdate:t=>t.f||(t.f=()=>{h_(t.update)}),$nextTick:t=>t.n||(t.n=vs.bind(t.proxy)),$watch:t=>e8.bind(t)}),Sy=(t,e)=>t!==As&&!t.__isScriptSetup&&Us(t,e),B0={get({_:t},e){if(e==="__v_skip")return!0;const{ctx:s,setupState:n,data:i,props:o,accessCache:r,type:c,appContext:h}=t;let f;if(e[0]!=="$"){const x=r[e];if(x!==void 0)switch(x){case 1:return n[e];case 2:return i[e];case 4:return s[e];case 3:return o[e]}else{if(Sy(n,e))return r[e]=1,n[e];if(i!==As&&Us(i,e))return r[e]=2,i[e];if((f=t.propsOptions[0])&&Us(f,e))return r[e]=3,o[e];if(s!==As&&Us(s,e))return r[e]=4,s[e];U0&&(r[e]=0)}}const v=Ch[e];let g,y;if(v)return e==="$attrs"&&ki(t.attrs,"get",""),v(t);if((g=c.__cssModules)&&(g=g[e]))return g;if(s!==As&&Us(s,e))return r[e]=4,s[e];if(y=h.config.globalProperties,Us(y,e))return y[e]},set({_:t},e,s){const{data:n,setupState:i,ctx:o}=t;return Sy(i,e)?(i[e]=s,!0):n!==As&&Us(n,e)?(n[e]=s,!0):Us(t.props,e)||e[0]==="$"&&e.slice(1)in t?!1:(o[e]=s,!0)},has({_:{data:t,setupState:e,accessCache:s,ctx:n,appContext:i,propsOptions:o,type:r}},c){let h,f;return!!(s[c]||t!==As&&c[0]!=="$"&&Us(t,c)||Sy(e,c)||(h=o[0])&&Us(h,c)||Us(n,c)||Us(Ch,c)||Us(i.config.globalProperties,c)||(f=r.__cssModules)&&f[c])},defineProperty(t,e,s){return s.get!=null?t._.accessCache[e]=0:Us(s,"value")&&this.set(t,e,s.value,null),Reflect.defineProperty(t,e,s)}},kB=Cs({},B0,{get(t,e){if(e!==Symbol.unscopables)return B0.get(t,e,t)},has(t,e){return e[0]!=="_"&&!e_(e)}});function CB(){return null}function TB(){return null}function AB(t){}function OB(t){}function DB(){return null}function PB(){}function $B(t,e){return null}function ev(){return E2().slots}function IB(){return E2().attrs}function E2(t){const e=Qi();return e.setupContext||(e.setupContext=tO(e))}function Yh(t){return Mt(t)?t.reduce((e,s)=>(e[s]=null,e),{}):t}function MB(t,e){const s=Yh(t);for(const n in e){if(n.startsWith("__skip"))continue;let i=s[n];i?Mt(i)||ss(i)?i=s[n]={type:i,default:e[n]}:i.default=e[n]:i===null&&(i=s[n]={default:e[n]}),i&&e[`__skip_${n}`]&&(i.skipFactory=!0)}return s}function NB(t,e){return!t||!e?t||e:Mt(t)&&Mt(e)?t.concat(e):Cs({},Yh(t),Yh(e))}function LB(t,e){const s={};for(const n in t)e.includes(n)||Object.defineProperty(s,n,{enumerable:!0,get:()=>t[n]});return s}function RB(t){const e=Qi();let s=t();return Y0(),Bg(s)&&(s=s.catch(n=>{throw Iu(e),n})),[s,()=>Iu(e)]}let U0=!0;function FB(t){const e=w_(t),s=t.proxy,n=t.ctx;U0=!1,e.beforeCreate&&ES(e.beforeCreate,t,"bc");const{data:i,computed:o,methods:r,watch:c,provide:h,inject:f,created:v,beforeMount:g,mounted:y,beforeUpdate:x,updated:E,activated:P,deactivated:I,beforeDestroy:D,beforeUnmount:F,destroyed:C,unmounted:A,render:O,renderTracked:j,renderTriggered:te,errorCaptured:B,serverPrefetch:z,expose:re,inheritAttrs:ne,components:X,directives:G,filters:ce}=e;if(f&&VB(f,n,null),r)for(const Z in r){const ge=r[Z];ss(ge)&&(n[Z]=ge.bind(s))}if(i){const Z=i.call(s,s);js(Z)&&(t.data=en(Z))}if(U0=!0,o)for(const Z in o){const ge=o[Z],q=ss(ge)?ge.bind(s,s):ss(ge.get)?ge.get.bind(s,s):ii,W=!ss(ge)&&ss(ge.set)?ge.set.bind(s):ii,M=Ae({get:q,set:W});Object.defineProperty(n,Z,{enumerable:!0,configurable:!0,get:()=>M.value,set:he=>M.value=he})}if(c)for(const Z in c)S2(c[Z],n,s,Z);if(h){const Z=ss(h)?h.call(s):h;Reflect.ownKeys(Z).forEach(ge=>{Th(ge,Z[ge])})}v&&ES(v,t,"c");function J(Z,ge){Mt(ge)?ge.forEach(q=>Z(q.bind(s))):ge&&Z(ge.bind(s))}if(J(v2,g),J(Xt,y),J(Qg,x),J(Zg,E),J(v_,P),J(b_,I),J(x2,B),J(_2,j),J(y2,te),J(Wu,F),J(Ni,A),J(b2,z),Mt(re))if(re.length){const Z=t.exposed||(t.exposed={});re.forEach(ge=>{Object.defineProperty(Z,ge,{get:()=>s[ge],set:q=>s[ge]=q,enumerable:!0})})}else t.exposed||(t.exposed={});O&&t.render===ii&&(t.render=O),ne!=null&&(t.inheritAttrs=ne),X&&(t.components=X),G&&(t.directives=G),z&&g_(t)}function VB(t,e,s=ii){Mt(t)&&(t=j0(t));for(const n in t){const i=t[n];let o;js(i)?"default"in i?o=xr(i.from||n,i.default,!0):o=xr(i.from||n):o=xr(i),hn(o)?Object.defineProperty(e,n,{enumerable:!0,configurable:!0,get:()=>o.value,set:r=>o.value=r}):e[n]=o}}function ES(t,e,s){Hr(Mt(t)?t.map(n=>n.bind(e.proxy)):t.bind(e.proxy),e,s)}function S2(t,e,s,n){let i=n.includes(".")?H2(s,n):()=>s[n];if(os(t)){const o=e[t];ss(o)&&Pt(i,o)}else if(ss(t))Pt(i,t.bind(s));else if(js(t))if(Mt(t))t.forEach(o=>S2(o,e,s,n));else{const o=ss(t.handler)?t.handler.bind(s):e[t.handler];ss(o)&&Pt(i,o,t)}}function w_(t){const e=t.type,{mixins:s,extends:n}=e,{mixins:i,optionsCache:o,config:{optionMergeStrategies:r}}=t.appContext,c=o.get(e);let h;return c?h=c:!i.length&&!s&&!n?h=e:(h={},i.length&&i.forEach(f=>Qm(h,f,r,!0)),Qm(h,e,r)),js(e)&&o.set(e,h),h}function Qm(t,e,s,n=!1){const{mixins:i,extends:o}=e;o&&Qm(t,o,s,!0),i&&i.forEach(r=>Qm(t,r,s,!0));for(const r in e)if(!(n&&r==="expose")){const c=BB[r]||s&&s[r];t[r]=c?c(t[r],e[r]):e[r]}return t}const BB={data:SS,props:kS,emits:kS,methods:gh,computed:gh,beforeCreate:Bi,created:Bi,beforeMount:Bi,mounted:Bi,beforeUpdate:Bi,updated:Bi,beforeDestroy:Bi,beforeUnmount:Bi,destroyed:Bi,unmounted:Bi,activated:Bi,deactivated:Bi,errorCaptured:Bi,serverPrefetch:Bi,components:gh,directives:gh,watch:jB,provide:SS,inject:UB};function SS(t,e){return e?t?function(){return Cs(ss(t)?t.call(this,this):t,ss(e)?e.call(this,this):e)}:e:t}function UB(t,e){return gh(j0(t),j0(e))}function j0(t){if(Mt(t)){const e={};for(let s=0;s<t.length;s++)e[t[s]]=t[s];return e}return t}function Bi(t,e){return t?[...new Set([].concat(t,e))]:e}function gh(t,e){return t?Cs(Object.create(null),t,e):e}function kS(t,e){return t?Mt(t)&&Mt(e)?[...new Set([...t,...e])]:Cs(Object.create(null),Yh(t),Yh(e??{})):e}function jB(t,e){if(!t)return e;if(!e)return t;const s=Cs(Object.create(null),t);for(const n in e)s[n]=Bi(t[n],e[n]);return s}function k2(){return{app:null,config:{isNativeTag:au,performance:!1,globalProperties:{},optionMergeStrategies:{},errorHandler:void 0,warnHandler:void 0,compilerOptions:{}},mixins:[],components:{},directives:{},provides:Object.create(null),optionsCache:new WeakMap,propsCache:new WeakMap,emitsCache:new WeakMap}}let HB=0;function WB(t,e){return function(n,i=null){ss(n)||(n=Cs({},n)),i!=null&&!js(i)&&(i=null);const o=k2(),r=new WeakSet,c=[];let h=!1;const f=o.app={_uid:HB++,_component:n,_props:i,_container:null,_context:o,_instance:null,version:nO,get config(){return o.config},set config(v){},use(v,...g){return r.has(v)||(v&&ss(v.install)?(r.add(v),v.install(f,...g)):ss(v)&&(r.add(v),v(f,...g))),f},mixin(v){return o.mixins.includes(v)||o.mixins.push(v),f},component(v,g){return g?(o.components[v]=g,f):o.components[v]},directive(v,g){return g?(o.directives[v]=g,f):o.directives[v]},mount(v,g,y){if(!h){const x=f._ceVNode||et(n,i);return x.appContext=o,y===!0?y="svg":y===!1&&(y=void 0),g&&e?e(x,v):t(x,v,y),h=!0,f._container=v,v.__vue_app__=f,Tf(x.component)}},onUnmount(v){c.push(v)},unmount(){h&&(Hr(c,f._instance,16),t(null,f._container),delete f._container.__vue_app__)},provide(v,g){return o.provides[v]=g,f},runWithContext(v){const g=yu;yu=f;try{return v()}finally{yu=g}}};return f}}let yu=null;function Th(t,e){if(hi){let s=hi.provides;const n=hi.parent&&hi.parent.provides;n===s&&(s=hi.provides=Object.create(n)),s[t]=e}}function xr(t,e,s=!1){const n=Qi();if(n||yu){let i=yu?yu._context.provides:n?n.parent==null||n.ce?n.vnode.appContext&&n.vnode.appContext.provides:n.parent.provides:void 0;if(i&&t in i)return i[t];if(arguments.length>1)return s&&ss(e)?e.call(n&&n.proxy):e}}function C2(){return!!(Qi()||yu)}const T2={},A2=()=>Object.create(T2),O2=t=>Object.getPrototypeOf(t)===T2;function zB(t,e,s,n=!1){const i={},o=A2();t.propsDefaults=Object.create(null),D2(t,e,i,o);for(const r in t.propsOptions[0])r in i||(i[r]=void 0);s?t.props=n?i:u_(i):t.type.props?t.props=i:t.props=o,t.attrs=o}function YB(t,e,s,n){const{props:i,attrs:o,vnode:{patchFlag:r}}=t,c=Is(i),[h]=t.propsOptions;let f=!1;if((n||r>0)&&!(r&16)){if(r&8){const v=t.vnode.dynamicProps;for(let g=0;g<v.length;g++){let y=v[g];if(tv(t.emitsOptions,y))continue;const x=e[y];if(h)if(Us(o,y))x!==o[y]&&(o[y]=x,f=!0);else{const E=ln(y);i[E]=H0(h,c,E,x,t,!1)}else x!==o[y]&&(o[y]=x,f=!0)}}}else{D2(t,e,i,o)&&(f=!0);let v;for(const g in c)(!e||!Us(e,g)&&((v=Ti(g))===g||!Us(e,v)))&&(h?s&&(s[g]!==void 0||s[v]!==void 0)&&(i[g]=H0(h,c,g,void 0,t,!0)):delete i[g]);if(o!==c)for(const g in o)(!e||!Us(e,g))&&(delete o[g],f=!0)}f&&ro(t.attrs,"set","")}function D2(t,e,s,n){const[i,o]=t.propsOptions;let r=!1,c;if(e)for(let h in e){if(go(h))continue;const f=e[h];let v;i&&Us(i,v=ln(h))?!o||!o.includes(v)?s[v]=f:(c||(c={}))[v]=f:tv(t.emitsOptions,h)||(!(h in n)||f!==n[h])&&(n[h]=f,r=!0)}if(o){const h=Is(s),f=c||As;for(let v=0;v<o.length;v++){const g=o[v];s[g]=H0(i,h,g,f[g],t,!Us(f,g))}}return r}function H0(t,e,s,n,i,o){const r=t[s];if(r!=null){const c=Us(r,"default");if(c&&n===void 0){const h=r.default;if(r.type!==Function&&!r.skipFactory&&ss(h)){const{propsDefaults:f}=i;if(s in f)n=f[s];else{const v=Iu(i);n=f[s]=h.call(null,e),v()}}else n=h;i.ce&&i.ce._setProp(s,n)}r[0]&&(o&&!c?n=!1:r[1]&&(n===""||n===Ti(s))&&(n=!0))}return n}const qB=new WeakMap;function P2(t,e,s=!1){const n=s?qB:e.propsCache,i=n.get(t);if(i)return i;const o=t.props,r={},c=[];let h=!1;if(!ss(t)){const v=g=>{h=!0;const[y,x]=P2(g,e,!0);Cs(r,y),x&&c.push(...x)};!s&&e.mixins.length&&e.mixins.forEach(v),t.extends&&v(t.extends),t.mixins&&t.mixins.forEach(v)}if(!o&&!h)return js(t)&&n.set(t,pu),pu;if(Mt(o))for(let v=0;v<o.length;v++){const g=ln(o[v]);CS(g)&&(r[g]=As)}else if(o)for(const v in o){const g=ln(v);if(CS(g)){const y=o[v],x=r[g]=Mt(y)||ss(y)?{type:y}:Cs({},y),E=x.type;let P=!1,I=!0;if(Mt(E))for(let D=0;D<E.length;++D){const F=E[D],C=ss(F)&&F.name;if(C==="Boolean"){P=!0;break}else C==="String"&&(I=!1)}else P=ss(E)&&E.name==="Boolean";x[0]=P,x[1]=I,(P||Us(x,"default"))&&c.push(g)}}const f=[r,c];return js(t)&&n.set(t,f),f}function CS(t){return t[0]!=="$"&&!go(t)}const E_=t=>t==="_"||t==="_ctx"||t==="$stable",S_=t=>Mt(t)?t.map(ir):[ir(t)],GB=(t,e,s)=>{if(e._n)return e;const n=vt((...i)=>S_(e(...i)),s);return n._c=!1,n},$2=(t,e,s)=>{const n=t._ctx;for(const i in t){if(E_(i))continue;const o=t[i];if(ss(o))e[i]=GB(i,o,n);else if(o!=null){const r=S_(o);e[i]=()=>r}}},I2=(t,e)=>{const s=S_(e);t.slots.default=()=>s},M2=(t,e,s)=>{for(const n in e)(s||!E_(n))&&(t[n]=e[n])},XB=(t,e,s)=>{const n=t.slots=A2();if(t.vnode.shapeFlag&32){const i=e._;i?(M2(n,e,s),s&&Z1(n,"_",i,!0)):$2(e,n)}else e&&I2(t,e)},KB=(t,e,s)=>{const{vnode:n,slots:i}=t;let o=!0,r=As;if(n.shapeFlag&32){const c=e._;c?s&&c===1?o=!1:M2(i,e,s):(o=!e.$stable,$2(e,i)),r=e}else e&&(I2(t,e),r={default:1});if(o)for(const c in i)!E_(c)&&r[c]==null&&delete i[c]},Qn=q2;function N2(t){return R2(t)}function L2(t){return R2(t,uB)}function R2(t,e){const s=Ef();s.__VUE__=!0;const{insert:n,remove:i,patchProp:o,createElement:r,createText:c,createComment:h,setText:f,setElementText:v,parentNode:g,nextSibling:y,setScopeId:x=ii,insertStaticContent:E}=t,P=(Q,Se,Ve,Qe=null,je=null,nt=null,ft=void 0,ut=null,Ye=!!Se.dynamicChildren)=>{if(Q===Se)return;Q&&!ua(Q,Se)&&(Qe=_e(Q),he(Q,je,nt,!0),Q=null),Se.patchFlag===-2&&(Ye=!1,Se.dynamicChildren=null);const{type:We,ref:ot,shapeFlag:ht}=Se;switch(We){case ml:I(Q,Se,Ve,Qe);break;case Vn:D(Q,Se,Ve,Qe);break;case _u:Q==null&&F(Se,Ve,Qe,ft);break;case Ze:X(Q,Se,Ve,Qe,je,nt,ft,ut,Ye);break;default:ht&1?O(Q,Se,Ve,Qe,je,nt,ft,ut,Ye):ht&6?G(Q,Se,Ve,Qe,je,nt,ft,ut,Ye):(ht&64||ht&128)&&We.process(Q,Se,Ve,Qe,je,nt,ft,ut,Ye,Ke)}ot!=null&&je?Fc(ot,Q&&Q.ref,nt,Se||Q,!Se):ot==null&&Q&&Q.ref!=null&&Fc(Q.ref,null,nt,Q,!0)},I=(Q,Se,Ve,Qe)=>{if(Q==null)n(Se.el=c(Se.children),Ve,Qe);else{const je=Se.el=Q.el;Se.children!==Q.children&&f(je,Se.children)}},D=(Q,Se,Ve,Qe)=>{Q==null?n(Se.el=h(Se.children||""),Ve,Qe):Se.el=Q.el},F=(Q,Se,Ve,Qe)=>{[Q.el,Q.anchor]=E(Q.children,Se,Ve,Qe,Q.el,Q.anchor)},C=({el:Q,anchor:Se},Ve,Qe)=>{let je;for(;Q&&Q!==Se;)je=y(Q),n(Q,Ve,Qe),Q=je;n(Se,Ve,Qe)},A=({el:Q,anchor:Se})=>{let Ve;for(;Q&&Q!==Se;)Ve=y(Q),i(Q),Q=Ve;i(Se)},O=(Q,Se,Ve,Qe,je,nt,ft,ut,Ye)=>{if(Se.type==="svg"?ft="svg":Se.type==="math"&&(ft="mathml"),Q==null)j(Se,Ve,Qe,je,nt,ft,ut,Ye);else{const We=Q.el&&Q.el._isVueCE?Q.el:null;try{We&&We._beginPatch(),z(Q,Se,je,nt,ft,ut,Ye)}finally{We&&We._endPatch()}}},j=(Q,Se,Ve,Qe,je,nt,ft,ut)=>{let Ye,We;const{props:ot,shapeFlag:ht,transition:Tt,dirs:Ot}=Q;if(Ye=Q.el=r(Q.type,nt,ot&&ot.is,ot),ht&8?v(Ye,Q.children):ht&16&&B(Q.children,Ye,null,Qe,je,ky(Q,nt),ft,ut),Ot&&Aa(Q,null,Qe,"created"),te(Ye,Q,Q.scopeId,ft,Qe),ot){for(const Kt in ot)Kt!=="value"&&!go(Kt)&&o(Ye,Kt,null,ot[Kt],nt,Qe);"value"in ot&&o(Ye,"value",null,ot.value,nt),(We=ot.onVnodeBeforeMount)&&nr(We,Qe,Q)}Ot&&Aa(Q,null,Qe,"beforeMount");const zt=F2(je,Tt);zt&&Tt.beforeEnter(Ye),n(Ye,Se,Ve),((We=ot&&ot.onVnodeMounted)||zt||Ot)&&Qn(()=>{We&&nr(We,Qe,Q),zt&&Tt.enter(Ye),Ot&&Aa(Q,null,Qe,"mounted")},je)},te=(Q,Se,Ve,Qe,je)=>{if(Ve&&x(Q,Ve),Qe)for(let nt=0;nt<Qe.length;nt++)x(Q,Qe[nt]);if(je){let nt=je.subTree;if(Se===nt||eg(nt.type)&&(nt.ssContent===Se||nt.ssFallback===Se)){const ft=je.vnode;te(Q,ft,ft.scopeId,ft.slotScopeIds,je.parent)}}},B=(Q,Se,Ve,Qe,je,nt,ft,ut,Ye=0)=>{for(let We=Ye;We<Q.length;We++){const ot=Q[We]=ut?al(Q[We]):ir(Q[We]);P(null,ot,Se,Ve,Qe,je,nt,ft,ut)}},z=(Q,Se,Ve,Qe,je,nt,ft)=>{const ut=Se.el=Q.el;let{patchFlag:Ye,dynamicChildren:We,dirs:ot}=Se;Ye|=Q.patchFlag&16;const ht=Q.props||As,Tt=Se.props||As;let Ot;if(Ve&&Xl(Ve,!1),(Ot=Tt.onVnodeBeforeUpdate)&&nr(Ot,Ve,Se,Q),ot&&Aa(Se,Q,Ve,"beforeUpdate"),Ve&&Xl(Ve,!0),(ht.innerHTML&&Tt.innerHTML==null||ht.textContent&&Tt.textContent==null)&&v(ut,""),We?re(Q.dynamicChildren,We,ut,Ve,Qe,ky(Se,je),nt):ft||ge(Q,Se,ut,null,Ve,Qe,ky(Se,je),nt,!1),Ye>0){if(Ye&16)ne(ut,ht,Tt,Ve,je);else if(Ye&2&&ht.class!==Tt.class&&o(ut,"class",null,Tt.class,je),Ye&4&&o(ut,"style",ht.style,Tt.style,je),Ye&8){const zt=Se.dynamicProps;for(let Kt=0;Kt<zt.length;Kt++){const Fe=zt[Kt],ee=ht[Fe],R=Tt[Fe];(R!==ee||Fe==="value")&&o(ut,Fe,ee,R,je,Ve)}}Ye&1&&Q.children!==Se.children&&v(ut,Se.children)}else!ft&&We==null&&ne(ut,ht,Tt,Ve,je);((Ot=Tt.onVnodeUpdated)||ot)&&Qn(()=>{Ot&&nr(Ot,Ve,Se,Q),ot&&Aa(Se,Q,Ve,"updated")},Qe)},re=(Q,Se,Ve,Qe,je,nt,ft)=>{for(let ut=0;ut<Se.length;ut++){const Ye=Q[ut],We=Se[ut],ot=Ye.el&&(Ye.type===Ze||!ua(Ye,We)||Ye.shapeFlag&198)?g(Ye.el):Ve;P(Ye,We,ot,null,Qe,je,nt,ft,!0)}},ne=(Q,Se,Ve,Qe,je)=>{if(Se!==Ve){if(Se!==As)for(const nt in Se)!go(nt)&&!(nt in Ve)&&o(Q,nt,Se[nt],null,je,Qe);for(const nt in Ve){if(go(nt))continue;const ft=Ve[nt],ut=Se[nt];ft!==ut&&nt!=="value"&&o(Q,nt,ut,ft,je,Qe)}"value"in Ve&&o(Q,"value",Se.value,Ve.value,je)}},X=(Q,Se,Ve,Qe,je,nt,ft,ut,Ye)=>{const We=Se.el=Q?Q.el:c(""),ot=Se.anchor=Q?Q.anchor:c("");let{patchFlag:ht,dynamicChildren:Tt,slotScopeIds:Ot}=Se;Ot&&(ut=ut?ut.concat(Ot):Ot),Q==null?(n(We,Ve,Qe),n(ot,Ve,Qe),B(Se.children||[],Ve,ot,je,nt,ft,ut,Ye)):ht>0&&ht&64&&Tt&&Q.dynamicChildren?(re(Q.dynamicChildren,Tt,Ve,je,nt,ft,ut),(Se.key!=null||je&&Se===je.subTree)&&k_(Q,Se,!0)):ge(Q,Se,Ve,ot,je,nt,ft,ut,Ye)},G=(Q,Se,Ve,Qe,je,nt,ft,ut,Ye)=>{Se.slotScopeIds=ut,Q==null?Se.shapeFlag&512?je.ctx.activate(Se,Ve,Qe,ft,Ye):ce(Se,Ve,Qe,je,nt,ft,Ye):be(Q,Se,Ye)},ce=(Q,Se,Ve,Qe,je,nt,ft)=>{const ut=Q.component=J2(Q,Qe,je);if(kf(Q)&&(ut.ctx.renderer=Ke),Z2(ut,!1,ft),ut.asyncDep){if(je&&je.registerDep(ut,J,ft),!Q.el){const Ye=ut.subTree=et(Vn);D(null,Ye,Se,Ve),Q.placeholder=Ye.el}}else J(ut,Q,Se,Ve,je,nt,ft)},be=(Q,Se,Ve)=>{const Qe=Se.component=Q.component;if(o8(Q,Se,Ve))if(Qe.asyncDep&&!Qe.asyncResolved){Z(Qe,Se,Ve);return}else Qe.next=Se,Qe.update();else Se.el=Q.el,Qe.vnode=Se},J=(Q,Se,Ve,Qe,je,nt,ft)=>{const ut=()=>{if(Q.isMounted){let{next:ht,bu:Tt,u:Ot,parent:zt,vnode:Kt}=Q;{const fe=V2(Q);if(fe){ht&&(ht.el=Kt.el,Z(Q,ht,ft)),fe.asyncDep.then(()=>{Q.isUnmounted||ut()});return}}let Fe=ht,ee;Xl(Q,!1),ht?(ht.el=Kt.el,Z(Q,ht,ft)):ht=Kt,Tt&&vu(Tt),(ee=ht.props&&ht.props.onVnodeBeforeUpdate)&&nr(ee,zt,ht,Kt),Xl(Q,!0);const R=xm(Q),we=Q.subTree;Q.subTree=R,P(we,R,g(we.el),_e(we),Q,je,nt),ht.el=R.el,Fe===null&&sv(Q,R.el),Ot&&Qn(Ot,je),(ee=ht.props&&ht.props.onVnodeUpdated)&&Qn(()=>nr(ee,zt,ht,Kt),je)}else{let ht;const{el:Tt,props:Ot}=Se,{bm:zt,m:Kt,parent:Fe,root:ee,type:R}=Q,we=pl(Se);if(Xl(Q,!1),zt&&vu(zt),!we&&(ht=Ot&&Ot.onVnodeBeforeMount)&&nr(ht,Fe,Se),Xl(Q,!0),Tt&&Te){const fe=()=>{Q.subTree=xm(Q),Te(Tt,Q.subTree,Q,je,null)};we&&R.__asyncHydrate?R.__asyncHydrate(Tt,Q,fe):fe()}else{ee.ce&&ee.ce._def.shadowRoot!==!1&&ee.ce._injectChildStyle(R);const fe=Q.subTree=xm(Q);P(null,fe,Ve,Qe,Q,je,nt),Se.el=fe.el}if(Kt&&Qn(Kt,je),!we&&(ht=Ot&&Ot.onVnodeMounted)){const fe=Se;Qn(()=>nr(ht,Fe,fe),je)}(Se.shapeFlag&256||Fe&&pl(Fe.vnode)&&Fe.vnode.shapeFlag&256)&&Q.a&&Qn(Q.a,je),Q.isMounted=!0,Se=Ve=Qe=null}};Q.scope.on();const Ye=Q.effect=new Bh(ut);Q.scope.off();const We=Q.update=Ye.run.bind(Ye),ot=Q.job=Ye.runIfDirty.bind(Ye);ot.i=Q,ot.id=Q.uid,Ye.scheduler=()=>h_(ot),Xl(Q,!0),We()},Z=(Q,Se,Ve)=>{Se.component=Q;const Qe=Q.vnode.props;Q.vnode=Se,Q.next=null,YB(Q,Se.props,Qe,Ve),KB(Q,Se.children,Ve),Eo(),pS(Q),So()},ge=(Q,Se,Ve,Qe,je,nt,ft,ut,Ye=!1)=>{const We=Q&&Q.children,ot=Q?Q.shapeFlag:0,ht=Se.children,{patchFlag:Tt,shapeFlag:Ot}=Se;if(Tt>0){if(Tt&128){W(We,ht,Ve,Qe,je,nt,ft,ut,Ye);return}else if(Tt&256){q(We,ht,Ve,Qe,je,nt,ft,ut,Ye);return}}Ot&8?(ot&16&&Ee(We,je,nt),ht!==We&&v(Ve,ht)):ot&16?Ot&16?W(We,ht,Ve,Qe,je,nt,ft,ut,Ye):Ee(We,je,nt,!0):(ot&8&&v(Ve,""),Ot&16&&B(ht,Ve,Qe,je,nt,ft,ut,Ye))},q=(Q,Se,Ve,Qe,je,nt,ft,ut,Ye)=>{Q=Q||pu,Se=Se||pu;const We=Q.length,ot=Se.length,ht=Math.min(We,ot);let Tt;for(Tt=0;Tt<ht;Tt++){const Ot=Se[Tt]=Ye?al(Se[Tt]):ir(Se[Tt]);P(Q[Tt],Ot,Ve,null,je,nt,ft,ut,Ye)}We>ot?Ee(Q,je,nt,!0,!1,ht):B(Se,Ve,Qe,je,nt,ft,ut,Ye,ht)},W=(Q,Se,Ve,Qe,je,nt,ft,ut,Ye)=>{let We=0;const ot=Se.length;let ht=Q.length-1,Tt=ot-1;for(;We<=ht&&We<=Tt;){const Ot=Q[We],zt=Se[We]=Ye?al(Se[We]):ir(Se[We]);if(ua(Ot,zt))P(Ot,zt,Ve,null,je,nt,ft,ut,Ye);else break;We++}for(;We<=ht&&We<=Tt;){const Ot=Q[ht],zt=Se[Tt]=Ye?al(Se[Tt]):ir(Se[Tt]);if(ua(Ot,zt))P(Ot,zt,Ve,null,je,nt,ft,ut,Ye);else break;ht--,Tt--}if(We>ht){if(We<=Tt){const Ot=Tt+1,zt=Ot<ot?Se[Ot].el:Qe;for(;We<=Tt;)P(null,Se[We]=Ye?al(Se[We]):ir(Se[We]),Ve,zt,je,nt,ft,ut,Ye),We++}}else if(We>Tt)for(;We<=ht;)he(Q[We],je,nt,!0),We++;else{const Ot=We,zt=We,Kt=new Map;for(We=zt;We<=Tt;We++){const at=Se[We]=Ye?al(Se[We]):ir(Se[We]);at.key!=null&&Kt.set(at.key,We)}let Fe,ee=0;const R=Tt-zt+1;let we=!1,fe=0;const Oe=new Array(R);for(We=0;We<R;We++)Oe[We]=0;for(We=Ot;We<=ht;We++){const at=Q[We];if(ee>=R){he(at,je,nt,!0);continue}let wt;if(at.key!=null)wt=Kt.get(at.key);else for(Fe=zt;Fe<=Tt;Fe++)if(Oe[Fe-zt]===0&&ua(at,Se[Fe])){wt=Fe;break}wt===void 0?he(at,je,nt,!0):(Oe[wt-zt]=We+1,wt>=fe?fe=wt:we=!0,P(at,Se[wt],Ve,null,je,nt,ft,ut,Ye),ee++)}const Xe=we?JB(Oe):pu;for(Fe=Xe.length-1,We=R-1;We>=0;We--){const at=zt+We,wt=Se[at],gt=Se[at+1],pt=at+1<ot?gt.el||gt.placeholder:Qe;Oe[We]===0?P(null,wt,Ve,pt,je,nt,ft,ut,Ye):we&&(Fe<0||We!==Xe[Fe]?M(wt,Ve,pt,2):Fe--)}}},M=(Q,Se,Ve,Qe,je=null)=>{const{el:nt,type:ft,transition:ut,children:Ye,shapeFlag:We}=Q;if(We&6){M(Q.component.subTree,Se,Ve,Qe);return}if(We&128){Q.suspense.move(Se,Ve,Qe);return}if(We&64){ft.move(Q,Se,Ve,Ke);return}if(ft===Ze){n(nt,Se,Ve);for(let ht=0;ht<Ye.length;ht++)M(Ye[ht],Se,Ve,Qe);n(Q.anchor,Se,Ve);return}if(ft===_u){C(Q,Se,Ve);return}if(Qe!==2&&We&1&&ut)if(Qe===0)ut.beforeEnter(nt),n(nt,Se,Ve),Qn(()=>ut.enter(nt),je);else{const{leave:ht,delayLeave:Tt,afterLeave:Ot}=ut,zt=()=>{Q.ctx.isUnmounted?i(nt):n(nt,Se,Ve)},Kt=()=>{nt._isLeaving&&nt[io](!0),ht(nt,()=>{zt(),Ot&&Ot()})};Tt?Tt(nt,zt,Kt):Kt()}else n(nt,Se,Ve)},he=(Q,Se,Ve,Qe=!1,je=!1)=>{const{type:nt,props:ft,ref:ut,children:Ye,dynamicChildren:We,shapeFlag:ot,patchFlag:ht,dirs:Tt,cacheIndex:Ot}=Q;if(ht===-2&&(je=!1),ut!=null&&(Eo(),Fc(ut,null,Ve,Q,!0),So()),Ot!=null&&(Se.renderCache[Ot]=void 0),ot&256){Se.ctx.deactivate(Q);return}const zt=ot&1&&Tt,Kt=!pl(Q);let Fe;if(Kt&&(Fe=ft&&ft.onVnodeBeforeUnmount)&&nr(Fe,Se,Q),ot&6)H(Q.component,Ve,Qe);else{if(ot&128){Q.suspense.unmount(Ve,Qe);return}zt&&Aa(Q,null,Se,"beforeUnmount"),ot&64?Q.type.remove(Q,Se,Ve,Ke,Qe):We&&!We.hasOnce&&(nt!==Ze||ht>0&&ht&64)?Ee(We,Se,Ve,!1,!0):(nt===Ze&&ht&384||!je&&ot&16)&&Ee(Ye,Se,Ve),Qe&&oe(Q)}(Kt&&(Fe=ft&&ft.onVnodeUnmounted)||zt)&&Qn(()=>{Fe&&nr(Fe,Se,Q),zt&&Aa(Q,null,Se,"unmounted")},Ve)},oe=Q=>{const{type:Se,el:Ve,anchor:Qe,transition:je}=Q;if(Se===Ze){K(Ve,Qe);return}if(Se===_u){A(Q);return}const nt=()=>{i(Ve),je&&!je.persisted&&je.afterLeave&&je.afterLeave()};if(Q.shapeFlag&1&&je&&!je.persisted){const{leave:ft,delayLeave:ut}=je,Ye=()=>ft(Ve,nt);ut?ut(Q.el,nt,Ye):Ye()}else nt()},K=(Q,Se)=>{let Ve;for(;Q!==Se;)Ve=y(Q),i(Q),Q=Ve;i(Se)},H=(Q,Se,Ve)=>{const{bum:Qe,scope:je,job:nt,subTree:ft,um:ut,m:Ye,a:We}=Q;Zm(Ye),Zm(We),Qe&&vu(Qe),je.stop(),nt&&(nt.flags|=8,he(ft,Q,Se,Ve)),ut&&Qn(ut,Se),Qn(()=>{Q.isUnmounted=!0},Se)},Ee=(Q,Se,Ve,Qe=!1,je=!1,nt=0)=>{for(let ft=nt;ft<Q.length;ft++)he(Q[ft],Se,Ve,Qe,je)},_e=Q=>{if(Q.shapeFlag&6)return _e(Q.component.subTree);if(Q.shapeFlag&128)return Q.suspense.next();const Se=y(Q.anchor||Q.el),Ve=Se&&Se[l2];return Ve?y(Ve):Se};let Ce=!1;const Re=(Q,Se,Ve)=>{Q==null?Se._vnode&&he(Se._vnode,null,null,!0):P(Se._vnode||null,Q,Se,null,null,null,Ve),Se._vnode=Q,Ce||(Ce=!0,pS(),Km(),Ce=!1)},Ke={p:P,um:he,m:M,r:oe,mt:ce,mc:B,pc:ge,pbc:re,n:_e,o:t};let Be,Te;return e&&([Be,Te]=e(Ke)),{render:Re,hydrate:Be,createApp:WB(Re,Be)}}function ky({type:t,props:e},s){return s==="svg"&&t==="foreignObject"||s==="mathml"&&t==="annotation-xml"&&e&&e.encoding&&e.encoding.includes("html")?void 0:s}function Xl({effect:t,job:e},s){s?(t.flags|=32,e.flags|=4):(t.flags&=-33,e.flags&=-5)}function F2(t,e){return(!t||t&&!t.pendingBranch)&&e&&!e.persisted}function k_(t,e,s=!1){const n=t.children,i=e.children;if(Mt(n)&&Mt(i))for(let o=0;o<n.length;o++){const r=n[o];let c=i[o];c.shapeFlag&1&&!c.dynamicChildren&&((c.patchFlag<=0||c.patchFlag===32)&&(c=i[o]=al(i[o]),c.el=r.el),!s&&c.patchFlag!==-2&&k_(r,c)),c.type===ml&&c.patchFlag!==-1&&(c.el=r.el),c.type===Vn&&!c.el&&(c.el=r.el)}}function JB(t){const e=t.slice(),s=[0];let n,i,o,r,c;const h=t.length;for(n=0;n<h;n++){const f=t[n];if(f!==0){if(i=s[s.length-1],t[i]<f){e[n]=i,s.push(n);continue}for(o=0,r=s.length-1;o<r;)c=o+r>>1,t[s[c]]<f?o=c+1:r=c;f<t[s[o]]&&(o>0&&(e[n]=s[o-1]),s[o]=n)}}for(o=s.length,r=s[o-1];o-- >0;)s[o]=r,r=e[r];return s}function V2(t){const e=t.subTree.component;if(e)return e.asyncDep&&!e.asyncResolved?e:V2(e)}function Zm(t){if(t)for(let e=0;e<t.length;e++)t[e].flags|=8}const B2=Symbol.for("v-scx"),U2=()=>xr(B2);function QB(t,e){return Cf(t,null,e)}function ZB(t,e){return Cf(t,null,{flush:"post"})}function j2(t,e){return Cf(t,null,{flush:"sync"})}function Pt(t,e,s){return Cf(t,e,s)}function Cf(t,e,s=As){const{immediate:n,deep:i,flush:o,once:r}=s,c=Cs({},s),h=e&&n||!e&&o!=="post";let f;if(Jc){if(o==="sync"){const x=U2();f=x.__watcherHandles||(x.__watcherHandles=[])}else if(!h){const x=()=>{};return x.stop=ii,x.resume=ii,x.pause=ii,x}}const v=hi;c.call=(x,E,P)=>Hr(x,v,E,P);let g=!1;o==="post"?c.scheduler=x=>{Qn(x,v&&v.suspense)}:o!=="sync"&&(g=!0,c.scheduler=(x,E)=>{E?x():h_(x)}),c.augmentJob=x=>{e&&(x.flags|=4),g&&(x.flags|=2,v&&(x.id=v.uid,x.i=v))};const y=YV(t,e,c);return Jc&&(f?f.push(y):h&&y()),y}function e8(t,e,s){const n=this.proxy,i=os(t)?t.includes(".")?H2(n,t):()=>n[t]:t.bind(n,n);let o;ss(e)?o=e:(o=e.handler,s=e);const r=Iu(this),c=Cf(i,o.bind(n),s);return r(),c}function H2(t,e){const s=e.split(".");return()=>{let n=t;for(let i=0;i<s.length&&n;i++)n=n[s[i]];return n}}function t8(t,e,s=As){const n=Qi(),i=ln(e),o=Ti(e),r=W2(t,i),c=ZA((h,f)=>{let v,g=As,y;return j2(()=>{const x=t[i];Si(v,x)&&(v=x,f())}),{get(){return h(),s.get?s.get(v):v},set(x){const E=s.set?s.set(x):x;if(!Si(E,v)&&!(g!==As&&Si(x,g)))return;const P=n.vnode.props;P&&(e in P||i in P||o in P)&&(`onUpdate:${e}`in P||`onUpdate:${i}`in P||`onUpdate:${o}`in P)||(v=x,f()),n.emit(`update:${e}`,E),Si(x,E)&&Si(x,g)&&!Si(E,y)&&f(),g=x,y=E}}});return c[Symbol.iterator]=()=>{let h=0;return{next(){return h<2?{value:h++?r||As:c,done:!1}:{done:!0}}}},c}const W2=(t,e)=>e==="modelValue"||e==="model-value"?t.modelModifiers:t[`${e}Modifiers`]||t[`${ln(e)}Modifiers`]||t[`${Ti(e)}Modifiers`];function s8(t,e,...s){if(t.isUnmounted)return;const n=t.vnode.props||As;let i=s;const o=e.startsWith("update:"),r=o&&W2(n,e.slice(7));r&&(r.trim&&(i=s.map(v=>os(v)?v.trim():v)),r.number&&(i=s.map(wf)));let c,h=n[c=gu(e)]||n[c=gu(ln(e))];!h&&o&&(h=n[c=gu(Ti(e))]),h&&Hr(h,t,6,i);const f=n[c+"Once"];if(f){if(!t.emitted)t.emitted={};else if(t.emitted[c])return;t.emitted[c]=!0,Hr(f,t,6,i)}}const n8=new WeakMap;function z2(t,e,s=!1){const n=s?n8:e.emitsCache,i=n.get(t);if(i!==void 0)return i;const o=t.emits;let r={},c=!1;if(!ss(t)){const h=f=>{const v=z2(f,e,!0);v&&(c=!0,Cs(r,v))};!s&&e.mixins.length&&e.mixins.forEach(h),t.extends&&h(t.extends),t.mixins&&t.mixins.forEach(h)}return!o&&!c?(js(t)&&n.set(t,null),null):(Mt(o)?o.forEach(h=>r[h]=null):Cs(r,o),js(t)&&n.set(t,r),r)}function tv(t,e){return!t||!kl(e)?!1:(e=e.slice(2).replace(/Once$/,""),Us(t,e[0].toLowerCase()+e.slice(1))||Us(t,Ti(e))||Us(t,e))}function xm(t){const{type:e,vnode:s,proxy:n,withProxy:i,propsOptions:[o],slots:r,attrs:c,emit:h,render:f,renderCache:v,props:g,data:y,setupState:x,ctx:E,inheritAttrs:P}=t,I=zh(t);let D,F;try{if(s.shapeFlag&4){const A=i||n,O=A;D=ir(f.call(O,A,v,g,x,y,E)),F=c}else{const A=e;D=ir(A.length>1?A(g,{attrs:c,slots:r,emit:h}):A(g,null)),F=e.props?c:r8(c)}}catch(A){Ah.length=0,Hu(A,t,1),D=et(Vn)}let C=D;if(F&&P!==!1){const A=Object.keys(F),{shapeFlag:O}=C;A.length&&O&7&&(o&&A.some(Fg)&&(F=a8(F,o)),C=Ba(C,F,!1,!0))}return s.dirs&&(C=Ba(C,null,!1,!0),C.dirs=C.dirs?C.dirs.concat(s.dirs):s.dirs),s.transition&&Co(C,s.transition),D=C,zh(I),D}function i8(t,e=!0){let s;for(let n=0;n<t.length;n++){const i=t[n];if(To(i)){if(i.type!==Vn||i.children==="v-if"){if(s)return;s=i}}else return}return s}const r8=t=>{let e;for(const s in t)(s==="class"||s==="style"||kl(s))&&((e||(e={}))[s]=t[s]);return e},a8=(t,e)=>{const s={};for(const n in t)(!Fg(n)||!(n.slice(9)in e))&&(s[n]=t[n]);return s};function o8(t,e,s){const{props:n,children:i,component:o}=t,{props:r,children:c,patchFlag:h}=e,f=o.emitsOptions;if(e.dirs||e.transition)return!0;if(s&&h>=0){if(h&1024)return!0;if(h&16)return n?TS(n,r,f):!!r;if(h&8){const v=e.dynamicProps;for(let g=0;g<v.length;g++){const y=v[g];if(r[y]!==n[y]&&!tv(f,y))return!0}}}else return(i||c)&&(!c||!c.$stable)?!0:n===r?!1:n?r?TS(n,r,f):!0:!!r;return!1}function TS(t,e,s){const n=Object.keys(e);if(n.length!==Object.keys(t).length)return!0;for(let i=0;i<n.length;i++){const o=n[i];if(e[o]!==t[o]&&!tv(s,o))return!0}return!1}function sv({vnode:t,parent:e},s){for(;e;){const n=e.subTree;if(n.suspense&&n.suspense.activeBranch===t&&(n.el=t.el),n===t)(t=e.vnode).el=s,e=e.parent;else break}}const eg=t=>t.__isSuspense;let W0=0;const l8={name:"Suspense",__isSuspense:!0,process(t,e,s,n,i,o,r,c,h,f){if(t==null)c8(e,s,n,i,o,r,c,h,f);else{if(o&&o.deps>0&&!t.suspense.isInFallback){e.suspense=t.suspense,e.suspense.vnode=e,e.el=t.el;return}d8(t,e,s,n,i,r,c,h,f)}},hydrate:h8,normalize:f8},u8=l8;function qh(t,e){const s=t.props&&t.props[e];ss(s)&&s()}function c8(t,e,s,n,i,o,r,c,h){const{p:f,o:{createElement:v}}=h,g=v("div"),y=t.suspense=Y2(t,i,n,e,g,s,o,r,c,h);f(null,y.pendingBranch=t.ssContent,g,null,n,y,o,r),y.deps>0?(qh(t,"onPending"),qh(t,"onFallback"),f(null,t.ssFallback,e,s,n,null,o,r),Vc(y,t.ssFallback)):y.resolve(!1,!0)}function d8(t,e,s,n,i,o,r,c,{p:h,um:f,o:{createElement:v}}){const g=e.suspense=t.suspense;g.vnode=e,e.el=t.el;const y=e.ssContent,x=e.ssFallback,{activeBranch:E,pendingBranch:P,isInFallback:I,isHydrating:D}=g;if(P)g.pendingBranch=y,ua(P,y)?(h(P,y,g.hiddenContainer,null,i,g,o,r,c),g.deps<=0?g.resolve():I&&(D||(h(E,x,s,n,i,null,o,r,c),Vc(g,x)))):(g.pendingId=W0++,D?(g.isHydrating=!1,g.activeBranch=P):f(P,i,g),g.deps=0,g.effects.length=0,g.hiddenContainer=v("div"),I?(h(null,y,g.hiddenContainer,null,i,g,o,r,c),g.deps<=0?g.resolve():(h(E,x,s,n,i,null,o,r,c),Vc(g,x))):E&&ua(E,y)?(h(E,y,s,n,i,g,o,r,c),g.resolve(!0)):(h(null,y,g.hiddenContainer,null,i,g,o,r,c),g.deps<=0&&g.resolve()));else if(E&&ua(E,y))h(E,y,s,n,i,g,o,r,c),Vc(g,y);else if(qh(e,"onPending"),g.pendingBranch=y,y.shapeFlag&512?g.pendingId=y.component.suspenseId:g.pendingId=W0++,h(null,y,g.hiddenContainer,null,i,g,o,r,c),g.deps<=0)g.resolve();else{const{timeout:F,pendingId:C}=g;F>0?setTimeout(()=>{g.pendingId===C&&g.fallback(x)},F):F===0&&g.fallback(x)}}function Y2(t,e,s,n,i,o,r,c,h,f,v=!1){const{p:g,m:y,um:x,n:E,o:{parentNode:P,remove:I}}=f;let D;const F=p8(t);F&&e&&e.pendingBranch&&(D=e.pendingId,e.deps++);const C=t.props?Vh(t.props.timeout):void 0,A=o,O={vnode:t,parent:e,parentComponent:s,namespace:r,container:n,hiddenContainer:i,deps:0,pendingId:W0++,timeout:typeof C=="number"?C:-1,activeBranch:null,pendingBranch:null,isInFallback:!v,isHydrating:v,isUnmounted:!1,effects:[],resolve(j=!1,te=!1){const{vnode:B,activeBranch:z,pendingBranch:re,pendingId:ne,effects:X,parentComponent:G,container:ce,isInFallback:be}=O;let J=!1;O.isHydrating?O.isHydrating=!1:j||(J=z&&re.transition&&re.transition.mode==="out-in",J&&(z.transition.afterLeave=()=>{ne===O.pendingId&&(y(re,ce,o===A?E(z):o,0),Hh(X),be&&B.ssFallback&&(B.ssFallback.el=null))}),z&&(P(z.el)===ce&&(o=E(z)),x(z,G,O,!0),!J&&be&&B.ssFallback&&(B.ssFallback.el=null)),J||y(re,ce,o,0)),Vc(O,re),O.pendingBranch=null,O.isInFallback=!1;let Z=O.parent,ge=!1;for(;Z;){if(Z.pendingBranch){Z.effects.push(...X),ge=!0;break}Z=Z.parent}!ge&&!J&&Hh(X),O.effects=[],F&&e&&e.pendingBranch&&D===e.pendingId&&(e.deps--,e.deps===0&&!te&&e.resolve()),qh(B,"onResolve")},fallback(j){if(!O.pendingBranch)return;const{vnode:te,activeBranch:B,parentComponent:z,container:re,namespace:ne}=O;qh(te,"onFallback");const X=E(B),G=()=>{O.isInFallback&&(g(null,j,re,X,z,null,ne,c,h),Vc(O,j))},ce=j.transition&&j.transition.mode==="out-in";ce&&(B.transition.afterLeave=G),O.isInFallback=!0,x(B,z,null,!0),ce||G()},move(j,te,B){O.activeBranch&&y(O.activeBranch,j,te,B),O.container=j},next(){return O.activeBranch&&E(O.activeBranch)},registerDep(j,te,B){const z=!!O.pendingBranch;z&&O.deps++;const re=j.vnode.el;j.asyncDep.catch(ne=>{Hu(ne,j,0)}).then(ne=>{if(j.isUnmounted||O.isUnmounted||O.pendingId!==j.suspenseId)return;j.asyncResolved=!0;const{vnode:X}=j;q0(j,ne,!1),re&&(X.el=re);const G=!re&&j.subTree.el;te(j,X,P(re||j.subTree.el),re?null:E(j.subTree),O,r,B),G&&(X.placeholder=null,I(G)),sv(j,X.el),z&&--O.deps===0&&O.resolve()})},unmount(j,te){O.isUnmounted=!0,O.activeBranch&&x(O.activeBranch,s,j,te),O.pendingBranch&&x(O.pendingBranch,s,j,te)}};return O}function h8(t,e,s,n,i,o,r,c,h){const f=e.suspense=Y2(e,n,s,t.parentNode,document.createElement("div"),null,i,o,r,c,!0),v=h(t,f.pendingBranch=e.ssContent,s,f,o,r);return f.deps===0&&f.resolve(!1,!0),v}function f8(t){const{shapeFlag:e,children:s}=t,n=e&32;t.ssContent=AS(n?s.default:s),t.ssFallback=n?AS(s.fallback):et(Vn)}function AS(t){let e;if(ss(t)){const s=Pu&&t._c;s&&(t._d=!1,$()),t=t(),s&&(t._d=!0,e=Di,G2())}return Mt(t)&&(t=i8(t)),t=ir(t),e&&!t.dynamicChildren&&(t.dynamicChildren=e.filter(s=>s!==t)),t}function q2(t,e){e&&e.pendingBranch?Mt(t)?e.effects.push(...t):e.effects.push(t):Hh(t)}function Vc(t,e){t.activeBranch=e;const{vnode:s,parentComponent:n}=t;let i=e.el;for(;!i&&e.component;)e=e.component.subTree,i=e.el;s.el=i,n&&n.subTree===s&&(n.vnode.el=i,sv(n,i))}function p8(t){const e=t.props&&t.props.suspensible;return e!=null&&e!==!1}const Ze=Symbol.for("v-fgt"),ml=Symbol.for("v-txt"),Vn=Symbol.for("v-cmt"),_u=Symbol.for("v-stc"),Ah=[];let Di=null;function $(t=!1){Ah.push(Di=t?null:[])}function G2(){Ah.pop(),Di=Ah[Ah.length-1]||null}let Pu=1;function Gh(t,e=!1){Pu+=t,t<0&&Di&&e&&(Di.hasOnce=!0)}function X2(t){return t.dynamicChildren=Pu>0?Di||pu:null,G2(),Pu>0&&Di&&Di.push(t),t}function L(t,e,s,n,i,o){return X2(l(t,e,s,n,i,o,!0))}function Ut(t,e,s,n,i){return X2(et(t,e,s,n,i,!0))}function To(t){return t?t.__v_isVNode===!0:!1}function ua(t,e){return t.type===e.type&&t.key===e.key}function m8(t){}const K2=({key:t})=>t??null,wm=({ref:t,ref_key:e,ref_for:s})=>(typeof t=="number"&&(t=""+t),t!=null?os(t)||hn(t)||ss(t)?{i:fi,r:t,k:e,f:!!s}:t:null);function l(t,e=null,s=null,n=0,i=null,o=t===Ze?0:1,r=!1,c=!1){const h={__v_isVNode:!0,__v_skip:!0,type:t,props:e,key:e&&K2(e),ref:e&&wm(e),scopeId:Xg,slotScopeIds:null,children:s,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:o,patchFlag:n,dynamicProps:i,dynamicChildren:null,appContext:null,ctx:fi};return c?(C_(h,s),o&128&&t.normalize(h)):s&&(h.shapeFlag|=os(s)?8:16),Pu>0&&!r&&Di&&(h.patchFlag>0||o&6)&&h.patchFlag!==32&&Di.push(h),h}const et=g8;function g8(t,e=null,s=null,n=0,i=null,o=!1){if((!t||t===w2)&&(t=Vn),To(t)){const c=Ba(t,e,!0);return s&&C_(c,s),Pu>0&&!o&&Di&&(c.shapeFlag&6?Di[Di.indexOf(t)]=c:Di.push(c)),c.patchFlag=-2,c}if(E8(t)&&(t=t.__vccOpts),e){e=vr(e);let{class:c,style:h}=e;c&&!os(c)&&(e.class=Me(c)),js(h)&&(Gg(h)&&!Mt(h)&&(h=Cs({},h)),e.style=zs(h))}const r=os(t)?1:eg(t)?128:u2(t)?64:js(t)?4:ss(t)?2:0;return l(t,e,s,n,i,r,o,!0)}function vr(t){return t?Gg(t)||O2(t)?Cs({},t):t:null}function Ba(t,e,s=!1,n=!1){const{props:i,ref:o,patchFlag:r,children:c,transition:h}=t,f=e?On(i||{},e):i,v={__v_isVNode:!0,__v_skip:!0,type:t.type,props:f,key:f&&K2(f),ref:e&&e.ref?s&&o?Mt(o)?o.concat(wm(e)):[o,wm(e)]:wm(e):o,scopeId:t.scopeId,slotScopeIds:t.slotScopeIds,children:c,target:t.target,targetStart:t.targetStart,targetAnchor:t.targetAnchor,staticCount:t.staticCount,shapeFlag:t.shapeFlag,patchFlag:e&&t.type!==Ze?r===-1?16:r|16:r,dynamicProps:t.dynamicProps,dynamicChildren:t.dynamicChildren,appContext:t.appContext,dirs:t.dirs,transition:h,component:t.component,suspense:t.suspense,ssContent:t.ssContent&&Ba(t.ssContent),ssFallback:t.ssFallback&&Ba(t.ssFallback),placeholder:t.placeholder,el:t.el,anchor:t.anchor,ctx:t.ctx,ce:t.ce};return h&&n&&Co(v,h.clone(v)),v}function Pe(t=" ",e=0){return et(ml,null,t,e)}function $u(t,e){const s=et(_u,null,t);return s.staticCount=e,s}function xe(t="",e=!1){return e?($(),Ut(Vn,null,t)):et(Vn,null,t)}function ir(t){return t==null||typeof t=="boolean"?et(Vn):Mt(t)?et(Ze,null,t.slice()):To(t)?al(t):et(ml,null,String(t))}function al(t){return t.el===null&&t.patchFlag!==-1||t.memo?t:Ba(t)}function C_(t,e){let s=0;const{shapeFlag:n}=t;if(e==null)e=null;else if(Mt(e))s=16;else if(typeof e=="object")if(n&65){const i=e.default;i&&(i._c&&(i._d=!1),C_(t,i()),i._c&&(i._d=!0));return}else{s=32;const i=e._;!i&&!O2(e)?e._ctx=fi:i===3&&fi&&(fi.slots._===1?e._=1:(e._=2,t.patchFlag|=1024))}else ss(e)?(e={default:e,_ctx:fi},s=32):(e=String(e),n&64?(s=16,e=[Pe(e)]):s=8);t.children=e,t.shapeFlag|=s}function On(...t){const e={};for(let s=0;s<t.length;s++){const n=t[s];for(const i in n)if(i==="class")e.class!==n.class&&(e.class=Me([e.class,n.class]));else if(i==="style")e.style=zs([e.style,n.style]);else if(kl(i)){const o=e[i],r=n[i];r&&o!==r&&!(Mt(o)&&o.includes(r))&&(e[i]=o?[].concat(o,r):r)}else i!==""&&(e[i]=n[i])}return e}function nr(t,e,s,n=null){Hr(t,e,7,[s,n])}const v8=k2();let b8=0;function J2(t,e,s){const n=t.type,i=(e?e.appContext:t.appContext)||v8,o={uid:b8++,vnode:t,type:n,parent:e,appContext:i,root:null,next:null,subTree:null,effect:null,update:null,job:null,scope:new n_(!0),render:null,proxy:null,exposed:null,exposeProxy:null,withProxy:null,provides:e?e.provides:Object.create(i.provides),ids:e?e.ids:["",0,0],accessCache:null,renderCache:[],components:null,directives:null,propsOptions:P2(n,i),emitsOptions:z2(n,i),emit:null,emitted:null,propsDefaults:As,inheritAttrs:n.inheritAttrs,ctx:As,data:As,props:As,attrs:As,slots:As,refs:As,setupState:As,setupContext:null,suspense:s,suspenseId:s?s.pendingId:0,asyncDep:null,asyncResolved:!1,isMounted:!1,isUnmounted:!1,isDeactivated:!1,bc:null,c:null,bm:null,m:null,bu:null,u:null,um:null,bum:null,da:null,a:null,rtg:null,rtc:null,ec:null,sp:null};return o.ctx={_:o},o.root=e?e.root:o,o.emit=s8.bind(null,o),t.ce&&t.ce(o),o}let hi=null;const Qi=()=>hi||fi;let tg,z0;{const t=Ef(),e=(s,n)=>{let i;return(i=t[s])||(i=t[s]=[]),i.push(n),o=>{i.length>1?i.forEach(r=>r(o)):i[0](o)}};tg=e("__VUE_INSTANCE_SETTERS__",s=>hi=s),z0=e("__VUE_SSR_SETTERS__",s=>Jc=s)}const Iu=t=>{const e=hi;return tg(t),t.scope.on(),()=>{t.scope.off(),tg(e)}},Y0=()=>{hi&&hi.scope.off(),tg(null)};function Q2(t){return t.vnode.shapeFlag&4}let Jc=!1;function Z2(t,e=!1,s=!1){e&&z0(e);const{props:n,children:i}=t.vnode,o=Q2(t);zB(t,n,o,e),XB(t,i,s||e);const r=o?y8(t,e):void 0;return e&&z0(!1),r}function y8(t,e){const s=t.type;t.accessCache=Object.create(null),t.proxy=new Proxy(t.ctx,B0);const{setup:n}=s;if(n){Eo();const i=t.setupContext=n.length>1?tO(t):null,o=Iu(t),r=bd(n,t,0,[t.props,i]),c=Bg(r);if(So(),o(),(c||t.sp)&&!pl(t)&&g_(t),c){if(r.then(Y0,Y0),e)return r.then(h=>{q0(t,h,e)}).catch(h=>{Hu(h,t,0)});t.asyncDep=r}else q0(t,r,e)}else eO(t,e)}function q0(t,e,s){ss(e)?t.type.__ssrInlineRender?t.ssrRender=e:t.render=e:js(e)&&(t.setupState=d_(e)),eO(t,s)}let sg,G0;function _8(t){sg=t,G0=e=>{e.render._rc&&(e.withProxy=new Proxy(e.ctx,kB))}}const x8=()=>!sg;function eO(t,e,s){const n=t.type;if(!t.render){if(!e&&sg&&!n.render){const i=n.template||w_(t).template;if(i){const{isCustomElement:o,compilerOptions:r}=t.appContext.config,{delimiters:c,compilerOptions:h}=n,f=Cs(Cs({isCustomElement:o,delimiters:c},r),h);n.render=sg(i,f)}}t.render=n.render||ii,G0&&G0(t)}{const i=Iu(t);Eo();try{FB(t)}finally{So(),i()}}}const w8={get(t,e){return ki(t,"get",""),t[e]}};function tO(t){const e=s=>{t.exposed=s||{}};return{attrs:new Proxy(t.attrs,w8),slots:t.slots,emit:t.emit,expose:e}}function Tf(t){return t.exposed?t.exposeProxy||(t.exposeProxy=new Proxy(d_(cr(t.exposed)),{get(e,s){if(s in e)return e[s];if(s in Ch)return Ch[s](t)},has(e,s){return s in e||s in Ch}})):t.proxy}function X0(t,e=!0){return ss(t)?t.displayName||t.name:t.name||e&&t.__name}function E8(t){return ss(t)&&"__vccOpts"in t}const Ae=(t,e)=>jV(t,e,Jc);function nv(t,e,s){try{Gh(-1);const n=arguments.length;return n===2?js(e)&&!Mt(e)?To(e)?et(t,null,[e]):et(t,e):et(t,null,e):(n>3?s=Array.prototype.slice.call(arguments,2):n===3&&To(s)&&(s=[s]),et(t,e,s))}finally{Gh(1)}}function S8(){}function k8(t,e,s,n){const i=s[n];if(i&&sO(i,t))return i;const o=e();return o.memo=t.slice(),o.cacheIndex=n,s[n]=o}function sO(t,e){const s=t.memo;if(s.length!=e.length)return!1;for(let n=0;n<s.length;n++)if(Si(s[n],e[n]))return!1;return Pu>0&&Di&&Di.push(t),!0}const nO="3.5.24",C8=ii,T8=JV,A8=Dc,O8=o2,D8={createComponentInstance:J2,setupComponent:Z2,renderComponentRoot:xm,setCurrentRenderingInstance:zh,isVNode:To,normalizeVNode:ir,getComponentPublicInstance:Tf,ensureValidVNode:x_,pushWarningContext:qV,popWarningContext:GV},P8=D8,$8=null,I8=null,M8=null;/** 34* @vue/runtime-dom v3.5.24 35* (c) 2018-present Yuxi (Evan) You and Vue contributors 36* @license MIT
37**/let K0;const OS=typeof window<"u"&&window.trustedTypes;if(OS)try{K0=OS.createPolicy("vue",{createHTML:t=>t})}catch{}const iO=K0?t=>K0.createHTML(t):t=>t,N8="http://www.w3.org/2000/svg",L8="http://www.w3.org/1998/Math/MathML",no=typeof document<"u"?document:null,DS=no&&no.createElement("template"),R8={insert:(t,e,s)=>{e.insertBefore(t,s||null)},remove:t=>{const e=t.parentNode;e&&e.removeChild(t)},createElement:(t,e,s,n)=>{const i=e==="svg"?no.createElementNS(N8,t):e==="mathml"?no.createElementNS(L8,t):s?no.createElement(t,{is:s}):no.createElement(t);return t==="select"&&n&&n.multiple!=null&&i.setAttribute("multiple",n.multiple),i},createText:t=>no.createTextNode(t),createComment:t=>no.createComment(t),setText:(t,e)=>{t.nodeValue=e},setElementText:(t,e)=>{t.textContent=e},parentNode:t=>t.parentNode,nextSibling:t=>t.nextSibling,querySelector:t=>no.querySelector(t),setScopeId(t,e){t.setAttribute(e,"")},insertStaticContent(t,e,s,n,i,o){const r=s?s.previousSibling:e.lastChild;if(i&&(i===o||i.nextSibling))for(;e.insertBefore(i.cloneNode(!0),s),!(i===o||!(i=i.nextSibling)););else{DS.innerHTML=iO(n==="svg"?`<svg>${t}</svg>`:n==="mathml"?`<math>${t}</math>`:t);const c=DS.content;if(n==="svg"||n==="mathml"){const h=c.firstChild;for(;h.firstChild;)c.appendChild(h.firstChild);c.removeChild(h)}e.insertBefore(c,s)}return[r?r.nextSibling:e.firstChild,s?s.previousSibling:e.lastChild]}},Qo="transition",ih="animation",Qc=Symbol("_vtc"),rO={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String},aO=Cs({},m_,rO),F8=t=>(t.displayName="Transition",t.props=aO,t),ja=F8((t,{slots:e})=>nv(p2,oO(t),e)),Kl=(t,e=[])=>{Mt(t)?t.forEach(s=>s(...e)):t&&t(...e)},PS=t=>t?Mt(t)?t.some(e=>e.length>1):t.length>1:!1;function oO(t){const e={};for(const X in t)X in rO||(e[X]=t[X]);if(t.css===!1)return e;const{name:s="v",type:n,duration:i,enterFromClass:o=`${s}-enter-from`,enterActiveClass:r=`${s}-enter-active`,enterToClass:c=`${s}-enter-to`,appearFromClass:h=o,appearActiveClass:f=r,appearToClass:v=c,leaveFromClass:g=`${s}-leave-from`,leaveActiveClass:y=`${s}-leave-active`,leaveToClass:x=`${s}-leave-to`}=t,E=V8(i),P=E&&E[0],I=E&&E[1],{onBeforeEnter:D,onEnter:F,onEnterCancelled:C,onLeave:A,onLeaveCancelled:O,onBeforeAppear:j=D,onAppear:te=F,onAppearCancelled:B=C}=e,z=(X,G,ce,be)=>{X._enterCancelled=be,sl(X,G?v:c),sl(X,G?f:r),ce&&ce()},re=(X,G)=>{X._isLeaving=!1,sl(X,g),sl(X,x),sl(X,y),G&&G()},ne=X=>(G,ce)=>{const be=X?te:F,J=()=>z(G,X,ce);Kl(be,[G,J]),$S(()=>{sl(G,X?h:o),Ca(G,X?v:c),PS(be)||IS(G,n,P,J)})};return Cs(e,{onBeforeEnter(X){Kl(D,[X]),Ca(X,o),Ca(X,r)},onBeforeAppear(X){Kl(j,[X]),Ca(X,h),Ca(X,f)},onEnter:ne(!1),onAppear:ne(!0),onLeave(X,G){X._isLeaving=!0;const ce=()=>re(X,G);Ca(X,g),X._enterCancelled?(Ca(X,y),J0(X)):(J0(X),Ca(X,y)),$S(()=>{X._isLeaving&&(sl(X,g),Ca(X,x),PS(A)||IS(X,n,I,ce))}),Kl(A,[X,ce])},onEnterCancelled(X){z(X,!1,void 0,!0),Kl(C,[X])},onAppearCancelled(X){z(X,!0,void 0,!0),Kl(B,[X])},onLeaveCancelled(X){re(X),Kl(O,[X])}})}function V8(t){if(t==null)return null;if(js(t))return[Cy(t.enter),Cy(t.leave)];{const e=Cy(t);return[e,e]}}function Cy(t){return Vh(t)}function Ca(t,e){e.split(/\s+/).forEach(s=>s&&t.classList.add(s)),(t[Qc]||(t[Qc]=new Set)).add(e)}function sl(t,e){e.split(/\s+/).forEach(n=>n&&t.classList.remove(n));const s=t[Qc];s&&(s.delete(e),s.size||(t[Qc]=void 0))}function $S(t){requestAnimationFrame(()=>{requestAnimationFrame(t)})}let B8=0;function IS(t,e,s,n){const i=t._endId=++B8,o=()=>{i===t._endId&&n()};if(s!=null)return setTimeout(o,s);const{type:r,timeout:c,propCount:h}=lO(t,e);if(!r)return n();const f=r+"end";let v=0;const g=()=>{t.removeEventListener(f,y),o()},y=x=>{x.target===t&&++v>=h&&g()};setTimeout(()=>{v<h&&g()},c+1),t.addEventListener(f,y)}function lO(t,e){const s=window.getComputedStyle(t),n=E=>(s[E]||"").split(", "),i=n(`${Qo}Delay`),o=n(`${Qo}Duration`),r=MS(i,o),c=n(`${ih}Delay`),h=n(`${ih}Duration`),f=MS(c,h);let v=null,g=0,y=0;e===Qo?r>0&&(v=Qo,g=r,y=o.length):e===ih?f>0&&(v=ih,g=f,y=h.length):(g=Math.max(r,f),v=g>0?r>f?Qo:ih:null,y=v?v===Qo?o.length:h.length:0);const x=v===Qo&&/\b(?:transform|all)(?:,|$)/.test(n(`${Qo}Property`).toString());return{type:v,timeout:g,propCount:y,hasTransform:x}}function MS(t,e){for(;t.length<e.length;)t=t.concat(t);return Math.max(...e.map((s,n)=>NS(s)+NS(t[n])))}function NS(t){return t==="auto"?0:Number(t.slice(0,-1).replace(",","."))*1e3}function J0(t){return(t?t.ownerDocument:document).body.offsetHeight}function U8(t,e,s){const n=t[Qc];n&&(e=(e?[e,...n]:[...n]).join(" ")),e==null?t.removeAttribute("class"):s?t.setAttribute("class",e):t.className=e}const ng=Symbol("_vod"),uO=Symbol("_vsh"),Rr={name:"show",beforeMount(t,{value:e},{transition:s}){t[ng]=t.style.display==="none"?"":t.style.display,s&&e?s.beforeEnter(t):rh(t,e)},mounted(t,{value:e},{transition:s}){s&&e&&s.enter(t)},updated(t,{value:e,oldValue:s},{transition:n}){!e!=!s&&(n?e?(n.beforeEnter(t),rh(t,!0),n.enter(t)):n.leave(t,()=>{rh(t,!1)}):rh(t,e))},beforeUnmount(t,{value:e}){rh(t,e)}};function rh(t,e){t.style.display=e?t[ng]:"none",t[uO]=!e}function j8(){Rr.getSSRProps=({value:t})=>{if(!t)return{style:{display:"none"}}}}const cO=Symbol("");function dO(t){const e=Qi();if(!e)return;const s=e.ut=(i=t(e.proxy))=>{Array.from(document.querySelectorAll(`[data-v-owner="${e.uid}
37"]`)).forEach(o=>ig(o,i))},n=()=>{const i=t(e.proxy);e.ce?ig(e.ce,i):Q0(e.subTree,i),s(i)};Qg(()=>{Hh(n)}),Xt(()=>{Pt(n,ii,{flush:"post"});const i=new MutationObserver(n);i.observe(e.subTree.el.parentNode,{childList:!0}),Ni(()=>i.disconnect())})}function Q0(t,e){if(t.shapeFlag&128){const s=t.suspense;t=s.activeBranch,s.pendingBranch&&!s.isHydrating&&s.effects.push(()=>{Q0(s.activeBranch,e)})}for(;t.component;)t=t.component.subTree;if(t.shapeFlag&1&&t.el)ig(t.el,e);else if(t.type===Ze)t.children.forEach(s=>Q0(s,e));else if(t.type===_u){let{el:s,anchor:n}=t;for(;s&&(ig(s,e),s!==n);)s=s.nextSibling}}function ig(t,e){if(t.nodeType===1){const s=t.style;let n="";for(const i in e){const o=LA(e[i]);s.setProperty(`--${i}`,o),n+=`--${i}: ${o};`}s[cO]=n}}const H8=/(?:^|;)\s*display\s*:/;function W8(t,e,s){const n=t.style,i=os(s);let o=!1;if(s&&!i){if(e)if(os(e))for(const r of e.split(";")){const c=r.slice(0,r.indexOf(":")).trim();s[c]==null&&Em(n,c,"")}else for(const r in e)s[r]==null&&Em(n,r,"");for(const r in s)r==="display"&&(o=!0),Em(n,r,s[r])}else if(i){if(e!==s){const r=n[cO];r&&(s+=";"+r),n.cssText=s,o=H8.test(s)}}else e&&t.removeAttribute("style");ng in t&&(t[ng]=o?n.display:"",t[uO]&&(n.display="none"))}const LS=/\s*!important$/;function Em(t,e,s){if(Mt(s))s.forEach(n=>Em(t,e,n));else if(s==null&&(s=""),e.startsWith("--"))t.setProperty(e,s);else{const n=z8(t,e);LS.test(s)?t.setProperty(Ti(n),s.replace(LS,""),"important"):t[n]=s}}const RS=["Webkit","Moz","ms"],Ty={};function z8(t,e){const s=Ty[e];if(s)return s;let n=ln(e);if(n!=="filter"&&n in t)return Ty[e]=n;n=Tl(n);for(let i=0;i<RS.length;i++){const o=RS[i]+n;if(o in t)return Ty[e]=o}return e}const FS="http://www.w3.org/1999/xlink";function VS(t,e,s,n,i,o=$A(e)){n&&e.startsWith("xlink:")?s==null?t.removeAttributeNS(FS,e.slice(6,e.length)):t.setAttributeNS(FS,e,s):s==null||o&&!s_(s)?t.removeAttribute(e):t.setAttribute(e,o?"":Ji(s)?String(s):s)}function BS(t,e,s,n,i){if(e==="innerHTML"||e==="textContent"){s!=null&&(t[e]=e==="innerHTML"?iO(s):s);return}const o=t.tagName;if(e==="value"&&o!=="PROGRESS"&&!o.includes("-")){const c=o==="OPTION"?t.getAttribute("value")||"":t.value,h=s==null?t.type==="checkbox"?"on":"":String(s);(c!==h||!("_value"in t))&&(t.value=h),s==null&&t.removeAttribute(e),t._value=s;return}let r=!1;if(s===""||s==null){const c=typeof t[e];c==="boolean"?s=s_(s):s==null&&c==="string"?(s="",r=!0):c==="number"&&(s=0,r=!0)}try{t[e]=s}catch{}r&&t.removeAttribute(i||e)}function oo(t,e,s,n){t.addEventListener(e,s,n)}function Y8(t,e,s,n){t.removeEventListener(e,s,n)}const US=Symbol("_vei");function q8(t,e,s,n,i=null){const o=t[US]||(t[US]={}),r=o[e];if(n&&r)r.value=n;else{const[c,h]=G8(e);if(n){const f=o[e]=J8(n,i);oo(t,c,f,h)}else r&&(Y8(t,c,r,h),o[e]=void 0)}}const jS=/(?:Once|Passive|Capture)$/;function G8(t){let e;if(jS.test(t)){e={};let n;for(;n=t.match(jS);)t=t.slice(0,t.length-n[0].length),e[n[0].toLowerCase()]=!0}return[t[2]===":"?t.slice(3):Ti(t.slice(2)),e]}let Ay=0;const X8=Promise.resolve(),K8=()=>Ay||(X8.then(()=>Ay=0),Ay=Date.now());function J8(t,e){const s=n=>{if(!n._vts)n._vts=Date.now();else if(n._vts<=s.attached)return;Hr(Q8(n,s.value),e,5,[n])};return s.value=t,s.attached=K8(),s}function Q8(t,e){if(Mt(e)){const s=t.stopImmediatePropagation;return t.stopImmediatePropagation=()=>{s.call(t),t._stopped=!0},e.map(n=>i=>!i._stopped&&n&&n(i))}else return e}const HS=t=>t.charCodeAt(0)===111&&t.charCodeAt(1)===110&&t.charCodeAt(2)>96&&t.charCodeAt(2)<123,Z8=(t,e,s,n,i,o)=>{const r=i==="svg";e==="class"?U8(t,n,r):e==="style"?W8(t,s,n):kl(e)?Fg(e)||q8(t,e,s,n,o):(e[0]==="."?(e=e.slice(1),!0):e[0]==="^"?(e=e.slice(1),!1):eU(t,e,n,r))?(BS(t,e,n),!t.tagName.includes("-")&&(e==="value"||e==="checked"||e==="selected")&&VS(t,e,n,r,o,e!=="value")):t._isVueCE&&(/[A-Z]/.test(e)||!os(n))?BS(t,ln(e),n,o,e):(e==="true-value"?t._trueValue=n:e==="false-value"&&(t._falseValue=n),VS(t,e,n,r))};function eU(t,e,s,n){if(n)return!!(e==="innerHTML"||e==="textContent"||e in t&&HS(e)&&ss(s));if(e==="spellcheck"||e==="draggable"||e==="translate"||e==="autocorrect"||e==="sandbox"&&t.tagName==="IFRAME"||e==="form"||e==="list"&&t.tagName==="INPUT"||e==="type"&&t.tagName==="TEXTAREA")return!1;if(e==="width"||e==="height"){const i=t.tagName;if(i==="IMG"||i==="VIDEO"||i==="CANVAS"||i==="SOURCE")return!1}return HS(e)&&os(s)?!1:e in t}const WS={};function hO(t,e,s){let n=Mi(t,e);xf(n)&&(n=Cs({},n,e));class i extends iv{constructor(r){super(n,r,s)}}return i.def=n,i}const tU=((t,e)=>hO(t,e,wO)),sU=typeof HTMLElement<"u"?HTMLElement:class{};class iv extends sU{constructor(e,s={},n=ag){super(),this._def=e,this._props=s,this._createApp=n,this._isVueCE=!0,this._instance=null,this._app=null,this._nonce=this._def.nonce,this._connected=!1,this._resolved=!1,this._patching=!1,this._dirty=!1,this._numberProps=null,this._styleChildren=new WeakSet,this._ob=null,this.shadowRoot&&n!==ag?this._root=this.shadowRoot:e.shadowRoot!==!1?(this.attachShadow(Cs({},e.shadowRootOptions,{mode:"open"})),this._root=this.shadowRoot):this._root=this}connectedCallback(){if(!this.isConnected)return;!this.shadowRoot&&!this._resolved&&this._parseSlots(),this._connected=!0;let e=this;for(;e=e&&(e.parentNode||e.host);)if(e instanceof iv){this._parent=e;break}this._instance||(this._resolved?this._mount(this._def):e&&e._pendingResolve?this._pendingResolve=e._pendingResolve.then(()=>{this._pendingResolve=void 0,this._resolveDef()}):this._resolveDef())}_setParent(e=this._parent){e&&(this._instance.parent=e._instance,this._inheritParentContext(e))}_inheritParentContext(e=this._parent){e&&this._app&&Object.setPrototypeOf(this._app._context.provides,e._instance.provides)}disconnectedCallback(){this._connected=!1,vs(()=>{this._connected||(this._ob&&(this._ob.disconnect(),this._ob=null),this._app&&this._app.unmount(),this._instance&&(this._instance.ce=void 0),this._app=this._instance=null,this._teleportTargets&&(this._teleportTargets.clear(),this._teleportTargets=void 0))})}_processMutations(e){for(const s of e)this._setAttr(s.attributeName)}
vendor: 43,801 bytes, lines 37-49
37_resolveDef(){if(this._pendingResolve)return;for(let n=0;n<this.attributes.length;n++)this._setAttr(this.attributes[n].name);this._ob=new MutationObserver(this._processMutations.bind(this)),this._ob.observe(this,{attributes:!0});const e=(n,i=!1)=>{this._resolved=!0,this._pendingResolve=void 0;const{props:o,styles:r}=n;let c;if(o&&!Mt(o))for(const h in o){const f=o[h];(f===Number||f&&f.type===Number)&&(h in this._props&&(this._props[h]=Vh(this._props[h])),(c||(c=Object.create(null)))[ln(h)]=!0)}this._numberProps=c,this._resolveProps(n),this.shadowRoot&&this._applyStyles(r),this._mount(n)},s=this._def.__asyncLoader;s?this._pendingResolve=s().then(n=>{n.configureApp=this._def.configureApp,e(this._def=n,!0)}):e(this._def)}_mount(e){this._app=this._createApp(e),this._inheritParentContext(),e.configureApp&&e.configureApp(this._app),this._app._ceVNode=this._createVNode(),this._app.mount(this._root);const s=this._instance&&this._instance.exposed;if(s)for(const n in s)Us(this,n)||Object.defineProperty(this,n,{get:()=>Ne(s[n])})}_resolveProps(e){const{props:s}=e,n=Mt(s)?s:Object.keys(s||{});for(const i of Object.keys(this))i[0]!=="_"&&n.includes(i)&&this._setProp(i,this[i]);for(const i of n.map(ln))Object.defineProperty(this,i,{get(){return this._getProp(i)},set(o){this._setProp(i,o,!0,!this._patching)}})}_setAttr(e){if(e.startsWith("data-v-"))return;const s=this.hasAttribute(e);let n=s?this.getAttribute(e):WS;const i=ln(e);s&&this._numberProps&&this._numberProps[i]&&(n=Vh(n)),this._setProp(i,n,!1,!0)}_getProp(e){return this._props[e]}_setProp(e,s,n=!0,i=!1){if(s!==this._props[e]&&(this._dirty=!0,s===WS?delete this._props[e]:(this._props[e]=s,e==="key"&&this._app&&(this._app._ceVNode.key=s)),i&&this._instance&&this._update(),n)){const o=this._ob;o&&(this._processMutations(o.takeRecords()),o.disconnect()),s===!0?this.setAttribute(Ti(e),""):typeof s=="string"||typeof s=="number"?this.setAttribute(Ti(e),s+""):s||this.removeAttribute(Ti(e)),o&&o.observe(this,{attributes:!0})}}_update(){const e=this._createVNode();this._app&&(e.appContext=this._app._context),xO(e,this._root)}_createVNode(){const e={};this.shadowRoot||(e.onVnodeMounted=e.onVnodeUpdated=this._renderSlots.bind(this));const s=et(this._def,Cs(e,this._props));return this._instance||(s.ce=n=>{this._instance=n,n.ce=this,n.isCE=!0;const i=(o,r)=>{this.dispatchEvent(new CustomEvent(o,xf(r[0])?Cs({detail:r},r[0]):{detail:r}))};n.emit=(o,...r)=>{i(o,r),Ti(o)!==o&&i(Ti(o),r)},this._setParent()}),s}_applyStyles(e,s){if(!e)return;if(s){if(s===this._def||this._styleChildren.has(s))return;this._styleChildren.add(s)}const n=this._nonce;for(let i=e.length-1;i>=0;i--){const o=document.createElement("style");n&&o.setAttribute("nonce",n),o.textContent=e[i],this.shadowRoot.prepend(o)}}_parseSlots(){const e=this._slots={};let s;for(;s=this.firstChild;){const n=s.nodeType===1&&s.getAttribute("slot")||"default";(e[n]||(e[n]=[])).push(s),this.removeChild(s)}}_renderSlots(){const e=this._getSlots(),s=this._instance.type.__scopeId;for(let n=0;n<e.length;n++){const i=e[n],o=i.getAttribute("name")||"default",r=this._slots[o],c=i.parentNode;if(r)for(const h of r){if(s&&h.nodeType===1){const f=s+"-s",v=document.createTreeWalker(h,1);h.setAttribute(f,"");let g;for(;g=v.nextNode();)g.setAttribute(f,"")}c.insertBefore(h,i)}else for(;i.firstChild;)c.insertBefore(i.firstChild,i);c.removeChild(i)}}_getSlots(){const e=[this];this._teleportTargets&&e.push(...this._teleportTargets);const s=new Set;for(const n of e){const i=n.querySelectorAll("slot");for(let o=0;o<i.length;o++)s.add(i[o])}return Array.from(s)}_injectChildStyle(e){this._applyStyles(e.styles,e)}_beginPatch(){this._patching=!0,this._dirty=!1}_endPatch(){this._patching=!1,this._dirty&&this._instance&&this._update()}_removeChildStyle(e){}}function fO(t){const e=Qi(),s=e&&e.ce;return s||null}function nU(){const t=fO();return t&&t.shadowRoot}function iU(t="$style"){{const e=Qi();if(!e)return As;const s=e.type.__cssModules;if(!s)return As;const n=s[t];return n||As}}const pO=new WeakMap,mO=new WeakMap,rg=Symbol("_moveCb"),zS=Symbol("_enterCb"),rU=t=>(delete t.props.mode,t),aU=rU({name:"TransitionGroup",props:Cs({},aO,{tag:String,moveClass:String}),setup(t,{slots:e}){const s=Qi(),n=p_();let i,o;return Zg(()=>{if(!i.length)return;const r=t.moveClass||`${t.name||"v"}-move`;if(!dU(i[0].el,s.vnode.el,r)){i=[];return}i.forEach(lU),i.forEach(uU);const c=i.filter(cU);J0(s.vnode.el),c.forEach(h=>{const f=h.el,v=f.style;Ca(f,r),v.transform=v.webkitTransform=v.transitionDuration="";const g=f[rg]=y=>{y&&y.target!==f||(!y||y.propertyName.endsWith("transform"))&&(f.removeEventListener("transitionend",g),f[rg]=null,sl(f,r))};f.addEventListener("transitionend",g)}),i=[]}),()=>{const r=Is(t),c=oO(r);let h=r.tag||Ze;if(i=[],o)for(let f=0;f<o.length;f++){const v=o[f];v.el&&v.el instanceof Element&&(i.push(v),Co(v,Kc(v,c,n,s)),pO.set(v,{left:v.el.offsetLeft,top:v.el.offsetTop}))}o=e.default?Kg(e.default()):[];for(let f=0;f<o.length;f++){const v=o[f];v.key!=null&&Co(v,Kc(v,c,n,s))}return et(h,null,o)}}}),oU=aU;function lU(t){const e=t.el;e[rg]&&e[rg](),e[zS]&&e[zS]()}function uU(t){mO.set(t,{left:t.el.offsetLeft,top:t.el.offsetTop})}function cU(t){const e=pO.get(t),s=mO.get(t),n=e.left-s.left,i=e.top-s.top;if(n||i){const o=t.el.style;return o.transform=o.webkitTransform=`translate(${n}px,${i}px)`,o.transitionDuration="0s",t}}function dU(t,e,s){const n=t.cloneNode(),i=t[Qc];i&&i.forEach(c=>{c.split(/\s+/).forEach(h=>h&&n.classList.remove(h))}),s.split(/\s+/).forEach(c=>c&&n.classList.add(c)),n.style.display="none";const o=e.nodeType===1?e:e.parentNode;o.appendChild(n);const{hasTransform:r}=lO(n);return o.removeChild(n),r}const _l=t=>{const e=t.props["onUpdate:modelValue"]||!1;return Mt(e)?s=>vu(e,s):e};function hU(t){t.target.composing=!0}function YS(t){const e=t.target;e.composing&&(e.composing=!1,e.dispatchEvent(new Event("input")))}const Fr=Symbol("_assign");function qS(t,e,s){return e&&(t=t.trim()),s&&(t=wf(t)),t}const Xs={created(t,{modifiers:{lazy:e,trim:s,number:n}},i){t[Fr]=_l(i);const o=n||i.props&&i.props.type==="number";oo(t,e?"change":"input",r=>{r.target.composing||t[Fr](qS(t.value,s,o))}),(s||o)&&oo(t,"change",()=>{t.value=qS(t.value,s,o)}),e||(oo(t,"compositionstart",hU),oo(t,"compositionend",YS),oo(t,"change",YS))},mounted(t,{value:e}){t.value=e??""},beforeUpdate(t,{value:e,oldValue:s,modifiers:{lazy:n,trim:i,number:o}},r){if(t[Fr]=_l(r),t.composing)return;const c=(o||t.type==="number")&&!/^0\d/.test(t.value)?wf(t.value):t.value,h=e??"";c!==h&&(document.activeElement===t&&t.type!=="range"&&(n&&e===s||i&&t.value.trim()===h)||(t.value=h))}},kr={deep:!0,created(t,e,s){t[Fr]=_l(s),oo(t,"change",()=>{const n=t._modelValue,i=Zc(t),o=t.checked,r=t[Fr];if(Mt(n)){const c=Sf(n,i),h=c!==-1;if(o&&!h)r(n.concat(i));else if(!o&&h){const f=[...n];f.splice(c,1),r(f)}}else if(Cl(n)){const c=new Set(n);o?c.add(i):c.delete(i),r(c)}else r(gO(t,o))})},mounted:GS,beforeUpdate(t,e,s){t[Fr]=_l(s),GS(t,e,s)}};function GS(t,{value:e,oldValue:s},n){t._modelValue=e;let i;if(Mt(e))i=Sf(e,n.props.value)>-1;else if(Cl(e))i=e.has(n.props.value);else{if(e===s)return;i=wo(e,gO(t,!0))}t.checked!==i&&(t.checked=i)}const Xh={created(t,{value:e},s){t.checked=wo(e,s.props.value),t[Fr]=_l(s),oo(t,"change",()=>{t[Fr](Zc(t))})},beforeUpdate(t,{value:e,oldValue:s},n){t[Fr]=_l(n),e!==s&&(t.checked=wo(e,n.props.value))}},An={deep:!0,created(t,{value:e,modifiers:{number:s}},n){const i=Cl(e);oo(t,"change",()=>{const o=Array.prototype.filter.call(t.options,r=>r.selected).map(r=>s?wf(Zc(r)):Zc(r));t[Fr](t.multiple?i?new Set(o):o:o[0]),t._assigning=!0,vs(()=>{t._assigning=!1})}),t[Fr]=_l(n)},mounted(t,{value:e}){XS(t,e)},beforeUpdate(t,e,s){t[Fr]=_l(s)},updated(t,{value:e}){t._assigning||XS(t,e)}};function XS(t,e){const s=t.multiple,n=Mt(e);if(!(s&&!n&&!Cl(e))){for(let i=0,o=t.options.length;i<o;i++){const r=t.options[i],c=Zc(r);if(s)if(n){const h=typeof c;h==="string"||h==="number"?r.selected=e.some(f=>String(f)===String(c)):r.selected=Sf(e,c)>-1}else r.selected=e.has(c);else if(wo(Zc(r),e)){t.selectedIndex!==i&&(t.selectedIndex=i);return}}!s&&t.selectedIndex!==-1&&(t.selectedIndex=-1)}}function Zc(t){return"_value"in t?t._value:t.value}function gO(t,e){const s=e?"_trueValue":"_falseValue";return s in t?t[s]:e}const Kh={created(t,e,s){tm(t,e,s,null,"created")},mounted(t,e,s){tm(t,e,s,null,"mounted")},beforeUpdate(t,e,s,n){tm(t,e,s,n,"beforeUpdate")},updated(t,e,s,n){tm(t,e,s,n,"updated")}};function vO(t,e){switch(t){case"SELECT":return An;case"TEXTAREA":return Xs;default:switch(e){case"checkbox":return kr;case"radio":return Xh;default:return Xs}}}function tm(t,e,s,n,i){const r=vO(t.tagName,s.props&&s.props.type)[i];r&&r(t,e,s,n)}function fU(){Xs.getSSRProps=({value:t})=>({value:t}),Xh.getSSRProps=({value:t},e)=>{if(e.props&&wo(e.props.value,t))return{checked:!0}},kr.getSSRProps=({value:t},e)=>{if(Mt(t)){if(e.props&&Sf(t,e.props.value)>-1)return{checked:!0}}else if(Cl(t)){if(e.props&&t.has(e.props.value))return{checked:!0}}else if(t)return{checked:!0}},Kh.getSSRProps=(t,e)=>{if(typeof e.type!="string")return;const s=vO(e.type.toUpperCase(),e.props&&e.props.type);if(s.getSSRProps)return s.getSSRProps(t,e)}}const pU=["ctrl","shift","alt","meta"],mU={stop:t=>t.stopPropagation(),prevent:t=>t.preventDefault(),self:t=>t.target!==t.currentTarget,ctrl:t=>!t.ctrlKey,shift:t=>!t.shiftKey,alt:t=>!t.altKey,meta:t=>!t.metaKey,left:t=>"button"in t&&t.button!==0,middle:t=>"button"in t&&t.button!==1,right:t=>"button"in t&&t.button!==2,exact:(t,e)=>pU.some(s=>t[`${s}Key`]&&!e.includes(s))},St=(t,e)=>{const s=t._withMods||(t._withMods={}),n=e.join(".");return s[n]||(s[n]=((i,...o)=>{for(let r=0;r<e.length;r++){const c=mU[e[r]];if(c&&c(i,e))return}return t(i,...o)}))},gU={esc:"escape",space:" ",up:"arrow-up",left:"arrow-left",right:"arrow-right",down:"arrow-down",delete:"backspace"},es=(t,e)=>{const s=t._withKeys||(t._withKeys={}),n=e.join(".");return s[n]||(s[n]=(i=>{if(!("key"in i))return;const o=Ti(i.key);if(e.some(r=>r===o||gU[r]===o))return t(i)}))},bO=Cs({patchProp:Z8},R8);let Oh,KS=!1;function yO(){return Oh||(Oh=N2(bO))}function _O(){return Oh=KS?Oh:L2(bO),KS=!0,Oh}const xO=((...t)=>{yO().render(...t)}),vU=((...t)=>{_O().hydrate(...t)}),ag=((...t)=>{const e=yO().createApp(...t),{mount:s}=e;return e.mount=n=>{const i=SO(n);if(!i)return;const o=e._component;!ss(o)&&!o.render&&!o.template&&(o.template=i.innerHTML),i.nodeType===1&&(i.textContent="");const r=s(i,!1,EO(i));return i instanceof Element&&(i.removeAttribute("v-cloak"),i.setAttribute("data-v-app","")),r},e}),wO=((...t)=>{const e=_O().createApp(...t),{mount:s}=e;return e.mount=n=>{const i=SO(n);if(i)return s(i,!0,EO(i))},e});function EO(t){if(t instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&t instanceof MathMLElement)return"mathml"}function SO(t){return os(t)?document.querySelector(t):t}let JS=!1;const bU=()=>{JS||(JS=!0,fU(),j8())},yU=Object.freeze(Object.defineProperty({__proto__:null,BaseTransition:p2,BaseTransitionPropsValidators:m_,Comment:Vn,DeprecationTypes:M8,EffectScope:n_,ErrorCodes:KV,ErrorTypeStrings:T8,Fragment:Ze,KeepAlive:xB,ReactiveEffect:Bh,Static:_u,Suspense:u8,Teleport:f_,Text:ml,TrackOpTypes:HV,Transition:ja,TransitionGroup:oU,TriggerOpTypes:WV,VueElement:iv,assertNumber:XV,callWithAsyncErrorHandling:Hr,callWithErrorHandling:bd,camelize:ln,capitalize:Tl,cloneVNode:Ba,compatUtils:I8,computed:Ae,createApp:ag,createBlock:Ut,createCommentVNode:xe,createElementBlock:L,createElementVNode:l,createHydrationRenderer:L2,createPropsRestProxy:LB,createRenderer:N2,createSSRApp:wO,createSlots:zi,createStaticVNode:$u,createTextVNode:Pe,createVNode:et,customRef:ZA,defineAsyncComponent:yB,defineComponent:Mi,defineCustomElement:hO,defineEmits:TB,defineExpose:AB,defineModel:PB,defineOptions:OB,defineProps:CB,defineSSRCustomElement:tU,defineSlots:DB,devtools:A8,effect:fV,effectScope:i_,getCurrentInstance:Qi,getCurrentScope:Hg,getCurrentWatcher:zV,getTransitionRawChildren:Kg,guardReactiveProps:vr,h:nv,handleError:Hu,hasInjectionContext:C2,hydrate:vU,hydrateOnIdle:fB,hydrateOnInteraction:vB,hydrateOnMediaQuery:gB,hydrateOnVisible:mB,initCustomFormatter:S8,initDirectivesForSSR:bU,inject:xr,isMemoSame:sO,isProxy:Gg,isReactive:Ra,isReadonly:ko,isRef:hn,isRuntimeOnly:x8,isShallow:_r,isVNode:To,markRaw:cr,mergeDefaults:MB,mergeModels:NB,mergeProps:On,nextTick:vs,normalizeClass:Me,normalizeProps:Zn,normalizeStyle:zs,onActivated:v_,onBeforeMount:v2,onBeforeUnmount:Wu,onBeforeUpdate:Qg,onDeactivated:b_,onErrorCaptured:x2,onMounted:Xt,onRenderTracked:_2,onRenderTriggered:y2,onScopeDispose:r_,onServerPrefetch:b2,onUnmounted:Ni,onUpdated:Zg,onWatcherCleanup:s2,openBlock:$,popScopeId:tB,provide:Th,proxyRefs:d_,pushScopeId:eB,queuePostFlushCb:Hh,reactive:en,readonly:Ym,ref:ve,registerRuntimeCompiler:_8,render:xO,renderList:At,renderSlot:Ft,resolveComponent:ur,resolveDirective:yd,resolveDynamicComponent:Du,resolveFilter:$8,resolveTransitionHooks:Kc,setBlockTracking:Gh,setDevtoolsHook:O8,setTransitionHooks:Co,shallowReactive:u_,shallowReadonly:IV,shallowRef:c_,ssrContextKey:B2,ssrUtils:P8,stop:pV,toDisplayString:pe,toHandlerKey:gu,toHandlers:SB,toRaw:Is,toRef:Xc,toRefs:e2,toValue:LV,transformVNodeArgs:m8,triggerRef:NV,unref:Ne,useAttrs:IB,useCssModule:iU,useCssVars:dO,useHost:fO,useId:rB,useModel:t8,useSSRContext:U2,useShadowRoot:nU,useSlots:ev,useTemplateRef:aB,useTransitionState:p_,vModelCheckbox:kr,vModelDynamic:Kh,vModelRadio:Xh,vModelSelect:An,vModelText:Xs,vShow:Rr,version:nO,warn:C8,watch:Pt,watchEffect:QB,watchPostEffect:ZB,watchSyncEffect:j2,withAsyncContext:RB,withCtx:vt,withDefaults:$B,withDirectives:_t,withKeys:es,withMemo:k8,withModifiers:St,withScopeId:sB},Symbol.toStringTag,{value:"Module"}));/*! 38 * pinia v2.3.1 39 * (c) 2025 Eduardo San Martin Morote 40 * @license MIT 41 */let kO;const rv=t=>kO=t,CO=Symbol();function Z0(t){return t&&typeof t=="object"&&Object.prototype.toString.call(t)==="[object Object]"&&typeof t.toJSON!="function"}var Dh;(function(t){t.direct="direct",t.patchObject="patch object",t.patchFunction="patch function"})(Dh||(Dh={}));function _U(){const t=i_(!0),e=t.run(()=>ve({}));let s=[],n=[];const i=cr({install(o){rv(i),i._a=o,o.provide(CO,i),o.config.globalProperties.$pinia=i,n.forEach(r=>s.push(r)),n=[]},use(o){return this._a?s.push(o):n.push(o),this},_p:s,_a:null,_e:t,_s:new Map,state:e});return i}const TO=()=>{};function QS(t,e,s,n=TO){t.push(e);const i=()=>{const o=t.indexOf(e);o>-1&&(t.splice(o,1),n())};return!s&&Hg()&&r_(i),i}function yc(t,...e){t.slice().forEach(s=>{s(...e)})}const xU=t=>t(),ZS=Symbol(),Oy=Symbol();function e1(t,e){t instanceof Map&&e instanceof Map?e.forEach((s,n)=>t.set(n,s)):t instanceof Set&&e instanceof Set&&e.forEach(t.add,t);for(const s in e){if(!e.hasOwnProperty(s))continue;const n=e[s],i=t[s];Z0(i)&&Z0(n)&&t.hasOwnProperty(s)&&!hn(n)&&!Ra(n)?t[s]=e1(i,n):t[s]=n}return t}const wU=Symbol();function EU(t){return!Z0(t)||!t.hasOwnProperty(wU)}const{assign:nl}=Object;function SU(t){return!!(hn(t)&&t.effect)}function kU(t,e,s,n){const{state:i,actions:o,getters:r}=e,c=s.state.value[t];let h;function f(){c||(s.state.value[t]=i?i():{});const v=e2(s.state.value[t]);return nl(v,o,Object.keys(r||{}).reduce((g,y)=>(g[y]=cr(Ae(()=>{rv(s);const x=s._s.get(t);return r[y].call(x,x)})),g),{}))}return h=AO(t,f,e,s,n,!0),h}function AO(t,e,s={},n,i,o){let r;const c=nl({actions:{}},s),h={deep:!0};let f,v,g=[],y=[],x;const E=n.state.value[t];!o&&!E&&(n.state.value[t]={}),ve({});let P;function I(B){let z;f=v=!1,typeof B=="function"?(B(n.state.value[t]),z={type:Dh.patchFunction,storeId:t,events:x}):(e1(n.state.value[t],B),z={type:Dh.patchObject,payload:B,storeId:t,events:x});const re=P=Symbol();vs().then(()=>{P===re&&(f=!0)}),v=!0,yc(g,z,n.state.value[t])}const D=o?function(){const{state:z}=s,re=z?z():{};this.$patch(ne=>{nl(ne,re)})}:TO;function F(){r.stop(),g=[],y=[],n._s.delete(t)}const C=(B,z="")=>{if(ZS in B)return B[Oy]=z,B;const re=function(){rv(n);const ne=Array.from(arguments),X=[],G=[];function ce(Z){X.push(Z)}function be(Z){G.push(Z)}yc(y,{args:ne,name:re[Oy],store:O,after:ce,onError:be});let J;try{J=B.apply(this&&this.$id===t?this:O,ne)}catch(Z){throw yc(G,Z),Z}return J instanceof Promise?J.then(Z=>(yc(X,Z),Z)).catch(Z=>(yc(G,Z),Promise.reject(Z))):(yc(X,J),J)};return re[ZS]=!0,re[Oy]=z,re},A={_p:n,$id:t,$onAction:QS.bind(null,y),$patch:I,$reset:D,$subscribe(B,z={}){const re=QS(g,B,z.detached,()=>ne()),ne=r.run(()=>Pt(()=>n.state.value[t],X=>{(z.flush==="sync"?v:f)&&B({storeId:t,type:Dh.direct,events:x},X)},nl({},h,z)));return re},$dispose:F},O=en(A);n._s.set(t,O);const te=(n._a&&n._a.runWithContext||xU)(()=>n._e.run(()=>(r=i_()).run(()=>e({action:C}))));for(const B in te){const z=te[B];if(hn(z)&&!SU(z)||Ra(z))o||(E&&EU(z)&&(hn(z)?z.value=E[B]:e1(z,E[B])),n.state.value[t][B]=z);else if(typeof z=="function"){const re=C(z,B);te[B]=re,c.actions[B]=z}}return nl(O,te),nl(Is(O),te),Object.defineProperty(O,"$state",{get:()=>n.state.value[t],set:B=>{I(z=>{nl(z,B)})}}),n._p.forEach(B=>{nl(O,r.run(()=>B({store:O,app:n._a,pinia:n,options:c})))}),E&&o&&s.hydrate&&s.hydrate(O.$state,E),f=!0,v=!0,O}/*! #__NO_SIDE_EFFECTS__ */function pa(t,e,s){let n,i;const o=typeof e=="function";typeof t=="string"?(n=t,i=o?s:e):(i=t,n=t.id);function r(c,h){const f=C2();return c=c||(f?xr(CO,null):null),c&&rv(c),c=kO,c._s.has(n)||(o?AO(n,e,i,c):kU(n,i,c)),c._s.get(n)}return r.$id=n,r}/*! 42 * vue-router v4.6.3 43 * (c) 2025 Eduardo San Martin Morote 44 * @license MIT 45 */const Pc=typeof document<"u";function OO(t){return typeof t=="object"||"displayName"in t||"props"in t||"__vccOpts"in t}function CU(t){return t.__esModule||t[Symbol.toStringTag]==="Module"||t.default&&OO(t.default)}const Gs=Object.assign;function Dy(t,e){const s={};for(const n in e){const i=e[n];s[n]=da(i)?i.map(t):t(i)}return s}const Ph=()=>{},da=Array.isArray;function ek(t,e){const s={};for(const n in t)s[n]=n in e?e[n]:t[n];return s}const DO=/#/g,TU=/&/g,AU=/\//g,OU=/=/g,DU=/\?/g,PO=/\+/g,PU=/%5B/g,$U=/%5D/g,$O=/%5E/g,IU=/%60/g,IO=/%7B/g,MU=/%7C/g,MO=/%7D/g,NU=/%20/g;function T_(t){return t==null?"":encodeURI(""+t).replace(MU,"|").replace(PU,"[").replace($U,"]")}function LU(t){return T_(t).replace(IO,"{").replace(MO,"}").replace($O,"^")}function t1(t){return T_(t).replace(PO,"%2B").replace(NU,"+").replace(DO,"%23").replace(TU,"%26").replace(IU,"`").replace(IO,"{").replace(MO,"}").replace($O,"^")}function RU(t){return t1(t).replace(OU,"%3D")}function FU(t){return T_(t).replace(DO,"%23").replace(DU,"%3F")}function VU(t){return FU(t).replace(AU,"%2F")}function Jh(t){if(t==null)return null;try{return decodeURIComponent(""+t)}catch{}return""+t}const BU=/\/$/,UU=t=>t.replace(BU,"");function Py(t,e,s="/"){let n,i={},o="",r="";const c=e.indexOf("#");let h=e.indexOf("?");return h=c>=0&&h>c?-1:h,h>=0&&(n=e.slice(0,h),o=e.slice(h,c>0?c:e.length),i=t(o.slice(1))),c>=0&&(n=n||e.slice(0,c),r=e.slice(c,e.length)),n=zU(n??e,s),{fullPath:n+o+r,path:n,query:i,hash:Jh(r)}}function jU(t,e){const s=e.query?t(e.query):"";return e.path+(s&&"?")+s+(e.hash||"")}function tk(t,e){return!e||!t.toLowerCase().startsWith(e.toLowerCase())?t:t.slice(e.length)||"/"}function HU(t,e,s){const n=e.matched.length-1,i=s.matched.length-1;return n>-1&&n===i&&ed(e.matched[n],s.matched[i])&&NO(e.params,s.params)&&t(e.query)===t(s.query)&&e.hash===s.hash}function ed(t,e){return(t.aliasOf||t)===(e.aliasOf||e)}function NO(t,e){if(Object.keys(t).length!==Object.keys(e).length)return!1;for(const s in t)if(!WU(t[s],e[s]))return!1;return!0}function WU(t,e){return da(t)?sk(t,e):da(e)?sk(e,t):t===e}function sk(t,e){return da(e)?t.length===e.length&&t.every((s,n)=>s===e[n]):t.length===1&&t[0]===e}function zU(t,e){if(t.startsWith("/"))return t;if(!t)return e;const s=e.split("/"),n=t.split("/"),i=n[n.length-1];(i===".."||i===".")&&n.push("");let o=s.length-1,r,c;for(r=0;r<n.length;r++)if(c=n[r],c!==".")if(c==="..")o>1&&o--;else break;return s.slice(0,o).join("/")+"/"+n.slice(r).join("/")}const Zo={path:"/",name:void 0,params:{},query:{},hash:"",fullPath:"/",matched:[],meta:{},redirectedFrom:void 0};let s1=(function(t){return t.pop="pop",t.push="push",t})({}),$y=(function(t){return t.back="back",t.forward="forward",t.unknown="",t})({});function YU(t){if(!t)if(Pc){const e=document.querySelector("base");t=e&&e.getAttribute("href")||"/",t=t.replace(/^\w+:\/\/[^\/]+/,"")}else t="/";return t[0]!=="/"&&t[0]!=="#"&&(t="/"+t),UU(t)}const qU=/^[^#]+#/;function GU(t,e){return t.replace(qU,"#")+e}function XU(t,e){const s=document.documentElement.getBoundingClientRect(),n=t.getBoundingClientRect();return{behavior:e.behavior,left:n.left-s.left-(e.left||0),top:n.top-s.top-(e.top||0)}}const av=()=>({left:window.scrollX,top:window.scrollY});function KU(t){let e;if("el"in t){const s=t.el,n=typeof s=="string"&&s.startsWith("#"),i=typeof s=="string"?n?document.getElementById(s.slice(1)):document.querySelector(s):s;if(!i)return;e=XU(i,t)}else e=t;"scrollBehavior"in document.documentElement.style?window.scrollTo(e):window.scrollTo(e.left!=null?e.left:window.scrollX,e.top!=null?e.top:window.scrollY)}function nk(t,e){return(history.state?history.state.position-e:-1)+t}const n1=new Map;function JU(t,e){n1.set(t,e)}function QU(t){const e=n1.get(t);return n1.delete(t),e}function ZU(t){return typeof t=="string"||t&&typeof t=="object"}function LO(t){return typeof t=="string"||typeof t=="symbol"}let Cn=(function(t){return t[t.MATCHER_NOT_FOUND=1]="MATCHER_NOT_FOUND",t[t.NAVIGATION_GUARD_REDIRECT=2]="NAVIGATION_GUARD_REDIRECT",t[t.NAVIGATION_ABORTED=4]="NAVIGATION_ABORTED",t[t.NAVIGATION_CANCELLED=8]="NAVIGATION_CANCELLED",t[t.NAVIGATION_DUPLICATED=16]="NAVIGATION_DUPLICATED",t})({});const RO=Symbol("");Cn.MATCHER_NOT_FOUND+"",Cn.NAVIGATION_GUARD_REDIRECT+"",Cn.NAVIGATION_ABORTED+"",Cn.NAVIGATION_CANCELLED+"",Cn.NAVIGATION_DUPLICATED+"";function td(t,e){return Gs(new Error,{type:t,[RO]:!0},e)}function eo(t,e){return t instanceof Error&&RO in t&&(e==null||!!(t.type&e))}const ej=["params","query","hash"];function tj(t){if(typeof t=="string")return t;if(t.path!=null)return t.path;const e={};for(const s of ej)s in t&&(e[s]=t[s]);return JSON.stringify(e,null,2)}function sj(t){const e={};if(t===""||t==="?")return e;const s=(t[0]==="?"?t.slice(1):t).split("&");for(let n=0;n<s.length;++n){const i=s[n].replace(PO," "),o=i.indexOf("="),r=Jh(o<0?i:i.slice(0,o)),c=o<0?null:Jh(i.slice(o+1));if(r in e){let h=e[r];da(h)||(h=e[r]=[h]),h.push(c)}else e[r]=c}return e}function ik(t){let e="";for(let s in t){const n=t[s];if(s=RU(s),n==null){n!==void 0&&(e+=(e.length?"&":"")+s);continue}(da(n)?n.map(i=>i&&t1(i)):[n&&t1(n)]).forEach(i=>{i!==void 0&&(e+=(e.length?"&":"")+s,i!=null&&(e+="="+i))})}return e}function nj(t){const e={};for(const s in t){const n=t[s];n!==void 0&&(e[s]=da(n)?n.map(i=>i==null?null:""+i):n==null?n:""+n)}return e}const ij=Symbol(""),rk=Symbol(""),ov=Symbol(""),A_=Symbol(""),i1=Symbol("");function ah(){let t=[];function e(n){return t.push(n),()=>{const i=t.indexOf(n);i>-1&&t.splice(i,1)}}function s(){t=[]}return{add:e,list:()=>t.slice(),reset:s}}function ol(t,e,s,n,i,o=r=>r()){const r=n&&(n.enterCallbacks[i]=n.enterCallbacks[i]||[]);return()=>new Promise((c,h)=>{const f=y=>{y===!1?h(td(Cn.NAVIGATION_ABORTED,{from:s,to:e})):y instanceof Error?h(y):ZU(y)?h(td(Cn.NAVIGATION_GUARD_REDIRECT,{from:e,to:y})):(r&&n.enterCallbacks[i]===r&&typeof y=="function"&&r.push(y),c())},v=o(()=>t.call(n&&n.instances[i],e,s,f));let g=Promise.resolve(v);t.length<3&&(g=g.then(f)),g.catch(y=>h(y))})}function Iy(t,e,s,n,i=o=>o()){const o=[];for(const r of t)for(const c in r.components){let h=r.components[c];if(!(e!=="beforeRouteEnter"&&!r.instances[c]))if(OO(h)){const f=(h.__vccOpts||h)[e];f&&o.push(ol(f,s,n,r,c,i))}else{let f=h();o.push(()=>f.then(v=>{if(!v)throw new Error(`Couldn't resolve component "${c}" at "${r.path}"`);const g=CU(v)?v.default:v;r.mods[c]=v,r.components[c]=g;const y=(g.__vccOpts||g)[e];return y&&ol(y,s,n,r,c,i)()}))}}return o}function rj(t,e){const s=[],n=[],i=[],o=Math.max(e.matched.length,t.matched.length);for(let r=0;r<o;r++){const c=e.matched[r];c&&(t.matched.find(f=>ed(f,c))?n.push(c):s.push(c));const h=t.matched[r];h&&(e.matched.find(f=>ed(f,h))||i.push(h))}return[s,n,i]}/*! 46 * vue-router v4.6.3 47 * (c) 2025 Eduardo San Martin Morote 48 * @license MIT 49 */let aj=()=>location.protocol+"//"+location.host;function FO(t,e){const{pathname:s,search:n,hash:i}=e,o=t.indexOf("#");if(o>-1){let r=i.includes(t.slice(o))?t.slice(o).length:1,c=i.slice(r);return c[0]!=="/"&&(c="/"+c),tk(c,"")}return tk(s,t)+n+i}function oj(t,e,s,n){let i=[],o=[],r=null;const c=({state:y})=>{const x=FO(t,location),E=s.value,P=e.value;let I=0;if(y){if(s.value=x,e.value=y,r&&r===E){r=null;return}I=P?y.position-P.position:0}else n(x);i.forEach(D=>{D(s.value,E,{delta:I,type:s1.pop,direction:I?I>0?$y.forward:$y.back:$y.unknown})})};function h(){r=s.value}function f(y){i.push(y);const x=()=>{const E=i.indexOf(y);E>-1&&i.splice(E,1)};return o.push(x),x}function v(){if(document.visibilityState==="hidden"){const{history:y}=window;if(!y.state)return;y.replaceState(Gs({},y.state,{scroll:av()}),"")}}function g(){for(const y of o)y();o=[],window.removeEventListener("popstate",c),window.removeEventListener("pagehide",v),document.removeEventListener("visibilitychange",v)}return window.addEventListener("popstate",c),window.addEventListener("pagehide",v),document.addEventListener("visibilitychange",v),{pauseListeners:h,listen:f,destroy:g}}function ak(t,e,s,n=!1,i=!1){return{back:t,current:e,forward:s,replaced:n,position:window.history.length,scroll:i?av():null}}function lj(t){const{history:e,location:s}=window,n={value:FO(t,s)},i={value:e.state};i.value||o(n.value,{back:null,current:n.value,forward:null,position:e.length-1,replaced:!0,scroll:null},!0);function o(h,f,v){const g=t.indexOf("#"),y=g>-1?(s.host&&document.querySelector("base")?t:t.slice(g))+h:aj()+t+h;try{e[v?"replaceState":"pushState"](f,"",y),i.value=f}catch(x){console.error(x),s[v?"replace":"assign"](y)}}function r(h,f){o(h,Gs({},e.state,ak(i.value.back,h,i.value.forward,!0),f,{position:i.value.position}),!0),n.value=h}function c(h,f){const v=Gs({},i.value,e.state,{forward:h,scroll:av()});o(v.current,v,!0),o(h,Gs({},ak(n.value,h,null),{position:v.position+1},f),!1),n.value=h}return{location:n,state:i,push:c,replace:r}}function uj(t){t=YU(t);const e=lj(t),s=oj(t,e.state,e.location,e.replace);function n(o,r=!0){r||s.pauseListeners(),history.go(o)}const i=Gs({location:"",base:t,go:n,createHref:GU.bind(null,t)},e,s);return Object.defineProperty(i,"location",{enumerable:!0,get:()=>e.location.value}),Object.defineProperty(i,"state",{enumerable:!0,get:()=>e.state.value}),i}let ou=(function(t){return t[t.Static=0]="Static",t[t.Param=1]="Param",t[t.Group=2]="Group",t})({});var Jn=(function(t){return t[t.Static=0]="Static",t[t.Param=1]="Param",t[t.ParamRegExp=2]="ParamRegExp",t[t.ParamRegExpEnd=3]="ParamRegExpEnd",t[t.EscapeNext=4]="EscapeNext",t})(Jn||{});const cj={type:ou.Static,value:""},dj=/[a-zA-Z0-9_]/;function hj(t){if(!t)return[[]];if(t==="/")return[[cj]];if(!t.startsWith("/"))throw new Error(`Invalid path "${t}"`);function e(x){throw new Error(`ERR (${s})/"${f}": ${x}`)}let s=Jn.Static,n=s;const i=[];let o;function r(){o&&i.push(o),o=[]}let c=0,h,f="",v="";function g(){f&&(s===Jn.Static?o.push({type:ou.Static,value:f}):s===Jn.Param||s===Jn.ParamRegExp||s===Jn.ParamRegExpEnd?(o.length>1&&(h==="*"||h==="+")&&e(`A repeatable param (${f}) must be alone in its segment. eg: '/:ids+.`),o.push({type:ou.Param,value:f,regexp:v,repeatable:h==="*"||h==="+",optional:h==="*"||h==="?"})):e("Invalid state to consume buffer"),f="")}function y(){f+=h}for(;c<t.length;){if(h=t[c++],h==="\\"&&s!==Jn.ParamRegExp){n=s,s=Jn.EscapeNext;continue}switch(s){case Jn.Static:h==="/"?(f&&g(),r()):h===":"?(g(),s=Jn.Param):y();break;case Jn.EscapeNext:y(),s=n;break;case Jn.Param:h==="("?s=Jn.ParamRegExp:dj.test(h)?y():(g(),s=Jn.Static,h!=="*"&&h!=="?"&&h!=="+"&&c--);break;case Jn.ParamRegExp:h===")"?v[v.length-1]=="\\"?v=v.slice(0,-1)+h:s=Jn.ParamRegExpEnd:v+=h;break;case Jn.ParamRegExpEnd:g(),s=Jn.Static,h!=="*"&&h!=="?"&&h!=="+"&&c--,v="";break;default:e("Unknown state");break}}return s===Jn.ParamRegExp&&e(`Unfinished custom RegExp for param "${f}"`),g(),r(),i}const ok="[^/]+?",fj={sensitive:!1,strict:!1,start:!0,end:!0};var ji=(function(t){return t[t._multiplier=10]="_multiplier",t[t.Root=90]="Root",t[t.Segment=40]="Segment",t[t.SubSegment=30]="SubSegment",t[t.Static=40]="Static",t[t.Dynamic=20]="Dynamic",t[t.BonusCustomRegExp=10]="BonusCustomRegExp",t[t.BonusWildcard=-50]="BonusWildcard",t[t.BonusRepeatable=-20]="BonusRepeatable",t[t.BonusOptional=-8]="BonusOptional",t[t.BonusStrict=.7000000000000001]="BonusStrict",t[t.BonusCaseSensitive=.25]="BonusCaseSensitive",t})(ji||{});const pj=/[.+*?^${}()[\]/\\]/g;function mj(t,e){const s=Gs({},fj,e),n=[];let i=s.start?"^":"";const o=[];for(const f of t){const v=f.length?[]:[ji.Root];s.strict&&!f.length&&(i+="/");for(let g=0;g<f.length;g++){const y=f[g];let x=ji.Segment+(s.sensitive?ji.BonusCaseSensitive:0);if(y.type===ou.Static)g||(i+="/"),i+=y.value.replace(pj,"\\$&"),x+=ji.Static;else if(y.type===ou.Param){const{value:E,repeatable:P,optional:I,regexp:D}=y;o.push({name:E,repeatable:P,optional:I});const F=D||ok;if(F!==ok){x+=ji.BonusCustomRegExp;try{`${F}`}catch(A){throw new Error(`Invalid custom RegExp for param "${E}" (${F}): `+A.message)}}let C=P?`((?:${F})(?:/(?:${F}))*)`:`(${F})`;g||(C=I&&f.length<2?`(?:/${C})`:"/"+C),I&&(C+="?"),i+=C,x+=ji.Dynamic,I&&(x+=ji.BonusOptional),P&&(x+=ji.BonusRepeatable),F===".*"&&(x+=ji.BonusWildcard)}v.push(x)}n.push(v)}if(s.strict&&s.end){const f=n.length-1;n[f][n[f].length-1]+=ji.BonusStrict}s.strict||(i+="/?"),s.end?i+="$":s.strict&&!i.endsWith("/")&&(i+="(?:/|$)");const r=new RegExp(i,s.sensitive?"":"i");function c(f){const v=f.match(r),g={};if(!v)return null;for(let y=1;y<v.length;y++){const x=v[y]||"",E=o[y-1];g[E.name]=x&&E.repeatable?x.split("/"):x}return g}function h(f){let v="",g=!1;for(const y of t){(!g||!v.endsWith("/"))&&(v+="/"),g=!1;for(const x of y)if(x.type===ou.Static)v+=x.value;else if(x.type===ou.Param){const{value:E,repeatable:P,optional:I}=x,D=E in f?f[E]:"";if(da(D)&&!P)throw new Error(`Provided param "${E}" is an array but it is not repeatable (* or + modifiers)`);const F=da(D)?D.join("/"):D;if(!F)if(I)y.length<2&&(v.endsWith("/")?v=v.slice(0,-1):g=!0);else throw new Error(`Missing required param "${E}"`);v+=F}}return v||"/"}return{re:r,score:n,keys:o,parse:c,stringify:h}}function gj(t,e){let s=0;for(;s<t.length&&s<e.length;){const n=e[s]-t[s];if(n)return n;s++}return t.length<e.length?t.length===1&&t[0]===ji.Static+ji.Segment?-1:1:t.length>e.length?e.length===1&&e[0]===ji.Static+ji.Segment?1:-1:0}function VO(t,e){let s=0;const n=t.score,i=e.score;for(;s<n.length&&s<i.length;){const o=gj(n[s],i[s]);if(o)return o;s++}if(Math.abs(i.length-n.length)===1){if(lk(n))return 1;if(lk(i))return-1}return i.length-n.length}function lk(t){const e=t[t.length-1];return t.length>0&&e[e.length-1]<0}const vj={strict:!1,end:!0,sensitive:!1};function bj(t,e,s){const n=mj(hj(t.path),s),i=Gs(n,{record:t,parent:e,children:[],alias:[]});return e&&!i.record.aliasOf==!e.record.aliasOf&&e.children.push(i),i}function yj(t,e){const s=[],n=new Map;e=ek(vj,e);function i(g){return n.get(g)}function o(g,y,x){const E=!x,P=ck(g);P.aliasOf=x&&x.record;const I=ek(e,g),D=[P];if("alias"in g){const A=typeof g.alias=="string"?[g.alias]:g.alias;for(const O of A)D.push(ck(Gs({},P,{components:x?x.record.components:P.components,path:O,aliasOf:x?x.record:P})))}let F,C;for(const A of D){const{path:O}=A;if(y&&O[0]!=="/"){const j=y.record.path,te=j[j.length-1]==="/"?"":"/";A.path=y.record.path+(O&&te+O)}if(F=bj(A,y,I),x?x.alias.push(F):(C=C||F,C!==F&&C.alias.push(F),E&&g.name&&!dk(F)&&r(g.name)),BO(F)&&h(F),P.children){const j=P.children;for(let te=0;te<j.length;te++)o(j[te],F,x&&x.children[te])}x=x||F}return C?()=>{r(C)}:Ph}function r(g){if(LO(g)){const y=n.get(g);y&&(n.delete(g),s.splice(s.indexOf(y),1),y.children.forEach(r),y.alias.forEach(r))}else{const y=s.indexOf(g);y>-1&&(s.splice(y,1),g.record.name&&n.delete(g.record.name),g.children.forEach(r),g.alias.forEach(r))}}function c(){return s}function h(g){const y=wj(g,s);s.splice(y,0,g),g.record.name&&!dk(g)&&n.set(g.record.name,g)}function f(g,y){let x,E={},P,I;if("name"in g&&g.name){if(x=n.get(g.name),!x)throw td(Cn.MATCHER_NOT_FOUND,{location:g});I=x.record.name,E=Gs(uk(y.params,x.keys.filter(C=>!C.optional).concat(x.parent?x.parent.keys.filter(C=>C.optional):[]).map(C=>C.name)),g.params&&uk(g.params,x.keys.map(C=>C.name))),P=x.stringify(E)}else if(g.path!=null)P=g.path,x=s.find(C=>C.re.test(P)),x&&(E=x.parse(P),I=x.record.name);else{if(x=y.name?n.get(y.name):s.find(C=>C.re.test(y.path)),!x)throw td(Cn.MATCHER_NOT_FOUND,{location:g,currentLocation:y});I=x.record.name,E=Gs({},y.params,g.params),P=x.stringify(E)}const D=[];let F=x;for(;F;)D.unshift(F.record),F=F.parent;return{name:I,path:P,params:E,matched:D,meta:xj(D)}}t.forEach(g=>o(g));function v(){s.length=0,n.clear()}return{addRoute:o,resolve:f,removeRoute:r,clearRoutes:v,getRoutes:c,getRecordMatcher:i}}function uk(t,e){const s={};for(const n of e)n in t&&(s[n]=t[n]);return s}function ck(t){const e={path:t.path,redirect:t.redirect,name:t.name,meta:t.meta||{},aliasOf:t.aliasOf,beforeEnter:t.beforeEnter,props:_j(t),children:t.children||[],instances:{},leaveGuards:new Set,updateGuards:new Set,enterCallbacks:{},components:"components"in t?t.components||null:t.component&&{default:t.component}};return Object.defineProperty(e,"mods",{value:{}}),e}function _j(t){const e={},s=t.props||!1;if("component"in t)e.default=s;else for(const n in t.components)e[n]=typeof s=="object"?s[n]:s;return e}function dk(t){for(;t;){if(t.record.aliasOf)return!0;t=t.parent}return!1}function xj(t){return t.reduce((e,s)=>Gs(e,s.meta),{})}function wj(t,e){let s=0,n=e.length;for(;s!==n;){const o=s+n>>1;VO(t,e[o])<0?n=o:s=o+1}const i=Ej(t);return i&&(n=e.lastIndexOf(i,n-1)),n}function Ej(t){let e=t;for(;e=e.parent;)if(BO(e)&&VO(t,e)===0)return e}function BO({record:t}){return!!(t.name||t.components&&Object.keys(t.components).length||t.redirect)}function hk(t){const e=xr(ov),s=xr(A_),n=Ae(()=>{const h=Ne(t.to);return e.resolve(h)}),i=Ae(()=>{const{matched:h}=n.value,{length:f}=h,v=h[f-1],g=s.matched;if(!v||!g.length)return-1;const y=g.findIndex(ed.bind(null,v));if(y>-1)return y;const x=fk(h[f-2]);return f>1&&fk(v)===x&&g[g.length-1].path!==x?g.findIndex(ed.bind(null,h[f-2])):y}),o=Ae(()=>i.value>-1&&Aj(s.params,n.value.params)),r=Ae(()=>i.value>-1&&i.value===s.matched.length-1&&NO(s.params,n.value.params));function c(h={}){if(Tj(h)){const f=e[Ne(t.replace)?"replace":"push"](Ne(t.to)).catch(Ph);return t.viewTransition&&typeof document<"u"&&"startViewTransition"in document&&document.startViewTransition(()=>f),f}return Promise.resolve()}return{route:n,href:Ae(()=>n.value.href),isActive:o,isExactActive:r,navigate:c}}function Sj(t){return t.length===1?t[0]:t}const kj=Mi({name:"RouterLink",compatConfig:{MODE:3},props:{to:{type:[String,Object],required:!0},replace:Boolean,activeClass:String,exactActiveClass:String,custom:Boolean,ariaCurrentValue:{type:String,default:"page"},viewTransition:Boolean},useLink:hk,setup(t,{slots:e}){const s=en(hk(t)),{options:n}=xr(ov),i=Ae(()=>({[pk(t.activeClass,n.linkActiveClass,"router-link-active")]:s.isActive,[pk(t.exactActiveClass,n.linkExactActiveClass,"router-link-exact-active")]:s.isExactActive}));return()=>{const o=e.default&&Sj(e.default(s));return t.custom?o:nv("a",{"aria-current":s.isExactActive?t.ariaCurrentValue:null,href:s.href,onClick:s.navigate,class:i.value},o)}}}),Cj=kj;function Tj(t){if(!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)&&!t.defaultPrevented&&!(t.button!==void 0&&t.button!==0)){if(t.currentTarget&&t.currentTarget.getAttribute){const e=t.currentTarget.getAttribute("target");if(/\b_blank\b/i.test(e))return}return t.preventDefault&&t.preventDefault(),!0}}function Aj(t,e){for(const s in e){const n=e[s],i=t[s];if(typeof n=="string"){if(n!==i)return!1}else if(!da(i)||i.length!==n.length||n.some((o,r)=>o!==i[r]))return!1}return!0}function fk(t){return t?t.aliasOf?t.aliasOf.path:t.path:""}const pk=(t,e,s)=>t??e??s,Oj=Mi({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},compatConfig:{MODE:3},setup(t,{attrs:e,slots:s}){const n=xr(i1),i=Ae(()=>t.route||n.value),o=xr(rk,0),r=Ae(()=>{let f=Ne(o);const{matched:v}=i.value;let g;for(;(g=v[f])&&!g.components;)f++;return f}),c=Ae(()=>i.value.matched[r.value]);Th(rk,Ae(()=>r.value+1)),Th(ij,c),Th(i1,i);const h=ve();return Pt(()=>[h.value,c.value,t.name],([f,v,g],[y,x,E])=>{v&&(v.instances[g]=f,x&&x!==v&&f&&f===y&&(v.leaveGuards.size||(v.leaveGuards=x.leaveGuards),v.updateGuards.size||(v.updateGuards=x.updateGuards))),f&&v&&(!x||!ed(v,x)||!y)&&(v.enterCallbacks[g]||[]).forEach(P=>P(f))},{flush:"post"}),()=>{const f=i.value,v=t.name,g=c.value,y=g&&g.components[v];if(!y)return mk(s.default,{Component:y,route:f});const x=g.props[v],E=x?x===!0?f.params:typeof x=="function"?x(f):x:null,I=nv(y,Gs({},E,e,{onVnodeUnmounted:D=>{D.component.isUnmounted&&(g.instances[v]=null)},ref:h}));return mk(s.default,{Component:I,route:f})||I}}});function mk(t,e){if(!t)return null;const s=t(e);return s.length===1?s[0]:s}const r1=Oj;function Dj(t){const e=yj(t.routes,t),s=t.parseQuery||sj,n=t.stringifyQuery||ik,i=t.history,o=ah(),r=ah(),c=ah(),h=c_(Zo);let f=Zo;Pc&&t.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const v=Dy.bind(null,_e=>""+_e),g=Dy.bind(null,VU),y=Dy.bind(null,Jh);function x(_e,Ce){let Re,Ke;return LO(_e)?(Re=e.getRecordMatcher(_e),Ke=Ce):Ke=_e,e.addRoute(Ke,Re)}function E(_e){const Ce=e.getRecordMatcher(_e);Ce&&e.removeRoute(Ce)}function P(){return e.getRoutes().map(_e=>_e.record)}function I(_e){return!!e.getRecordMatcher(_e)}function D(_e,Ce){if(Ce=Gs({},Ce||h.value),typeof _e=="string"){const Se=Py(s,_e,Ce.path),Ve=e.resolve({path:Se.path},Ce),Qe=i.createHref(Se.fullPath);return Gs(Se,Ve,{params:y(Ve.params),hash:Jh(Se.hash),redirectedFrom:void 0,href:Qe})}let Re;if(_e.path!=null)Re=Gs({},_e,{path:Py(s,_e.path,Ce.path).path});else{const Se=Gs({},_e.params);for(const Ve in Se)Se[Ve]==null&&delete Se[Ve];Re=Gs({},_e,{params:g(Se)}),Ce.params=g(Ce.params)}const Ke=e.resolve(Re,Ce),Be=_e.hash||"";Ke.params=v(y(Ke.params));const Te=jU(n,Gs({},_e,{hash:LU(Be),path:Ke.path})),Q=i.createHref(Te);return Gs({fullPath:Te,hash:Be,query:n===ik?nj(_e.query):_e.query||{}},Ke,{redirectedFrom:void 0,href:Q})}function F(_e){return typeof _e=="string"?Py(s,_e,h.value.path):Gs({},_e)}function C(_e,Ce){if(f!==_e)return td(Cn.NAVIGATION_CANCELLED,{from:Ce,to:_e})}function A(_e){return te(_e)}function O(_e){return A(Gs(F(_e),{replace:!0}))}function j(_e,Ce){const Re=_e.matched[_e.matched.length-1];if(Re&&Re.redirect){const{redirect:Ke}=Re;let Be=typeof Ke=="function"?Ke(_e,Ce):Ke;return typeof Be=="string"&&(Be=Be.includes("?")||Be.includes("#")?Be=F(Be):{path:Be},Be.params={}),Gs({query:_e.query,hash:_e.hash,params:Be.path!=null?{}:_e.params},Be)}}function te(_e,Ce){const Re=f=D(_e),Ke=h.value,Be=_e.state,Te=_e.force,Q=_e.replace===!0,Se=j(Re,Ke);if(Se)return te(Gs(F(Se),{state:typeof Se=="object"?Gs({},Be,Se.state):Be,force:Te,replace:Q}),Ce||Re);const Ve=Re;Ve.redirectedFrom=Ce;let Qe;return!Te&&HU(n,Ke,Re)&&(Qe=td(Cn.NAVIGATION_DUPLICATED,{to:Ve,from:Ke}),M(Ke,Ke,!0,!1)),(Qe?Promise.resolve(Qe):re(Ve,Ke)).catch(je=>eo(je)?eo(je,Cn.NAVIGATION_GUARD_REDIRECT)?je:W(je):ge(je,Ve,Ke)).then(je=>{if(je){if(eo(je,Cn.NAVIGATION_GUARD_REDIRECT))return te(Gs({replace:Q},F(je.to),{state:typeof je.to=="object"?Gs({},Be,je.to.state):Be,force:Te}),Ce||Ve)}else je=X(Ve,Ke,!0,Q,Be);return ne(Ve,Ke,je),je})}function B(_e,Ce){const Re=C(_e,Ce);return Re?Promise.reject(Re):Promise.resolve()}function z(_e){const Ce=K.values().next().value;return Ce&&typeof Ce.runWithContext=="function"?Ce.runWithContext(_e):_e()}function re(_e,Ce){let Re;const[Ke,Be,Te]=rj(_e,Ce);Re=Iy(Ke.reverse(),"beforeRouteLeave",_e,Ce);for(const Se of Ke)Se.leaveGuards.forEach(Ve=>{Re.push(ol(Ve,_e,Ce))});const Q=B.bind(null,_e,Ce);return Re.push(Q),Ee(Re).then(()=>{Re=[];for(const Se of o.list())Re.push(ol(Se,_e,Ce));return Re.push(Q),Ee(Re)}).then(()=>{Re=Iy(Be,"beforeRouteUpdate",_e,Ce);for(const Se of Be)Se.updateGuards.forEach(Ve=>{Re.push(ol(Ve,_e,Ce))});return Re.push(Q),Ee(Re)}).then(()=>{Re=[];for(const Se of Te)if(Se.beforeEnter)if(da(Se.beforeEnter))for(const Ve of Se.beforeEnter)Re.push(ol(Ve,_e,Ce));else Re.push(ol(Se.beforeEnter,_e,Ce));return Re.push(Q),Ee(Re)}).then(()=>(_e.matched.forEach(Se=>Se.enterCallbacks={}),Re=Iy(Te,"beforeRouteEnter",_e,Ce,z),Re.push(Q),Ee(Re))).then(()=>{Re=[];for(const Se of r.list())Re.push(ol(Se,_e,Ce));return Re.push(Q),Ee(Re)}).catch(Se=>eo(Se,Cn.NAVIGATION_CANCELLED)?Se:Promise.reject(Se))}function ne(_e,Ce,Re){c.list().forEach(Ke=>z(()=>Ke(_e,Ce,Re)))}function X(_e,Ce,Re,Ke,Be){const Te=C(_e,Ce);if(Te)return Te;const Q=Ce===Zo,Se=Pc?history.state:{};Re&&(Ke||Q?i.replace(_e.fullPath,Gs({scroll:Q&&Se&&Se.scroll},Be)):i.push(_e.fullPath,Be)),h.value=_e,M(_e,Ce,Re,Q),W()}let G;function ce(){G||(G=i.listen((_e,Ce,Re)=>{if(!H.listening)return;const Ke=D(_e),Be=j(Ke,H.currentRoute.value);if(Be){te(Gs(Be,{replace:!0,force:!0}),Ke).catch(Ph);return}f=Ke;const Te=h.value;Pc&&JU(nk(Te.fullPath,Re.delta),av()),re(Ke,Te).catch(Q=>eo(Q,Cn.NAVIGATION_ABORTED|Cn.NAVIGATION_CANCELLED)?Q:eo(Q,Cn.NAVIGATION_GUARD_REDIRECT)?(te(Gs(F(Q.to),{force:!0}),Ke).then(Se=>{eo(Se,Cn.NAVIGATION_ABORTED|Cn.NAVIGATION_DUPLICATED)&&!Re.delta&&Re.type===s1.pop&&i.go(-1,!1)}).catch(Ph),Promise.reject()):(Re.delta&&i.go(-Re.delta,!1),ge(Q,Ke,Te))).then(Q=>{Q=Q||X(Ke,Te,!1),Q&&(Re.delta&&!eo(Q,Cn.NAVIGATION_CANCELLED)?i.go(-Re.delta,!1):Re.type===s1.pop&&eo(Q,Cn.NAVIGATION_ABORTED|Cn.NAVIGATION_DUPLICATED)&&i.go(-1,!1)),ne(Ke,Te,Q)}).catch(Ph)}))}let be=ah(),J=ah(),Z;function ge(_e,Ce,Re){W(_e);const Ke=J.list();return Ke.length?Ke.forEach(Be=>Be(_e,Ce,Re)):console.error(_e),Promise.reject(_e)}function q(){return Z&&h.value!==Zo?Promise.resolve():new Promise((_e,Ce)=>{be.add([_e,Ce])})}function W(_e){return Z||(Z=!_e,ce(),be.list().forEach(([Ce,Re])=>_e?Re(_e):Ce()),be.reset()),_e}function M(_e,Ce,Re,Ke){const{scrollBehavior:Be}=t;if(!Pc||!Be)return Promise.resolve();const Te=!Re&&QU(nk(_e.fullPath,0))||(Ke||!Re)&&history.state&&history.state.scroll||null;return vs().then(()=>Be(_e,Ce,Te)).then(Q=>Q&&KU(Q)).catch(Q=>ge(Q,_e,Ce))}const he=_e=>i.go(_e);let oe;const K=new Set,H={currentRoute:h,listening:!0,addRoute:x,removeRoute:E,clearRoutes:e.clearRoutes,hasRoute:I,getRoutes:P,resolve:D,options:t,push:A,replace:O,go:he,back:()=>he(-1),forward:()=>he(1),beforeEach:o.add,beforeResolve:r.add,afterEach:c.add,onError:J.add,isReady:q,install(_e){_e.component("RouterLink",Cj),_e.component("RouterView",r1),_e.config.globalProperties.$router=H,Object.defineProperty(_e.config.globalProperties,"$route",{enumerable:!0,get:()=>Ne(h)}),Pc&&!oe&&h.value===Zo&&(oe=!0,A(i.location).catch(Ke=>{}));const Ce={};for(const Ke in Zo)Object.defineProperty(Ce,Ke,{get:()=>h.value[Ke],enumerable:!0});_e.provide(ov,H),_e.provide(A_,u_(Ce)),_e.provide(i1,h);const Re=_e.unmount;K.add(_e),_e.unmount=function(){K.delete(_e),K.size<1&&(f=Zo,G&&G(),G=null,h.value=Zo,oe=!1,Z=!1),Re()}}};function Ee(_e){return _e.reduce((Ce,Re)=>Ce.then(()=>z(Re)),Promise.resolve())}return H}function gi(){return xr(ov)}function Af(t){return xr(A_)}const In=pa("app",()=>{const t=ve(!1),e=ve(!1),s=ve(!0);let n=null,i=0;const o=ve({dashboard:0,portfolios:0,trades:0});try{const y=localStorage.getItem("sidebarCollapsed");y!==null&&(t.value=y==="true");const x=localStorage.getItem("hideValues");x!==null&&(s.value=x==="true")}catch{}Pt(t,y=>
49{try{localStorage.setItem("sidebarCollapsed",y)}catch{}}),Pt(s,y=>{try{localStorage.setItem("hideValues",y)}catch{}});const r=()=>{t.value=!t.value},c=()=>{s.value=!s.value};function h(y=!1){i++,i===1&&(y?e.value=!0:n=setTimeout(()=>{e.value=!0},1e3))}function f(){i--,i<=0&&(clearTimeout(n),e.value=!1,i=0)}function v(y="dashboard"){o.value[y]=Date.now(),console.log(`ð Evento de refresh disparado: ${y}`)}function g(y="dashboard"){return o.value[y]}return{sidebarCollapsed:t,isLoading:e,hideValues:s,toggleSidebar:r,toggleValues:c,startLoading:h,stopLoading:f,refreshTriggers:o,triggerRefresh:v,getLastRefresh:g}}),Pj=Object.freeze(Object.defineProperty({__proto__:null,useAppStore:In},Symbol.toStringTag,{value:"Module"})),ct=$n.create({baseURL:window.location.origin,withCredentials:!0});ct.interceptors.request.use(t=>(t.skipLoading||In().startLoading(),t),t=>(In().stopLoading(),Promise.reject(t)));ct.interceptors.response.use(t=>(In().stopLoading(),t),t=>(In().stopLoading(),t.response&&t.response.status===401?Promise.resolve({data:null}):Promise.reject(t)));const pi=pa("portfolio",()=>{const t=ve([]),e=ve(null),s=ve(null),n=ve(!1),i=ve({trades:0,portfolios:0,quotes:0});function o(re="trades"){i.value[re]=Date.now(),console.log(`ð PortfolioStore: ${re} atualizado em`,i.value[re]),re==="trades"&&window.dispatchEvent(new CustomEvent("portfolio-trades-updated",{detail:{timestamp:i.value[re]}}))}function r(re="trades"){return i.value[re]||0}function c(){console.log("ð§¹ Limpando estado do portfolio (Logout)..."),t.value=[],e.value=null,s.value=null,localStorage.removeItem("activePortfolio"),localStorage.removeItem("adminActivePortfolio")}const h=()=>{try{const re=localStorage.getItem("adminActivePortfolio");re&&(s.value=JSON.parse(re));const ne=localStorage.getItem("activePortfolio");ne&&(e.value=JSON.parse(ne))}catch(re){console.error("Erro ao carregar estado salvo:",re)}},f=()=>{try{s.value&&localStorage.setItem("adminActivePortfolio",JSON.stringify(s.value)),e.value&&localStorage.setItem("activePortfolio",JSON.stringify(e.value))}catch(re){console.error("Erro ao salvar estado:",re)}};async function v(){n.value=!0;try{const re=await ct.get("/api/portfolios");t.value=re.data;const ne=re.data.find(X=>X.active==="Yes");return ne?(e.value=ne,f()):re.data.length>0&&await C(),re.data}catch(re){throw console.error("Erro ao carregar carteiras:",re),re}finally{n.value=!1}}async function g(re){n.value=!0;try{const ne=await ct.post("/api/portfolios/search",{search:re});t.value=ne.data}catch(ne){throw console.error("Erro ao pesquisar carteiras:",ne),ne}finally{n.value=!1}}async function y(re){try{const ne=await ct.post("/api/portfolios",{title:re});return await v(),ne.data}catch(ne){throw console.error("Erro ao criar carteira:",ne),ne}}async function x(re,ne){try{const X=await ct.put(`/api/portfolios/${re}`,{title:ne});return E(re,{title:ne}),X.data}catch(X){throw console.error("Erro ao atualizar carteira:",X),X}}function E(re,ne){var G,ce;console.log("ð Atualizando portfolio em todos os locais:",re,ne);const X=t.value.findIndex(be=>be.id===re);X!==-1&&(t.value[X]={...t.value[X],...ne},console.log("â
Atualizado na lista de portfolios")),((G=e.value)==null?void 0:G.id)===re&&(e.value={...e.value,...ne},f(),console.log("â
Atualizado no activePortfolio e salvo no localStorage")),((ce=s.value)==null?void 0:ce.id)===re&&(s.value={...s.value,...ne},f(),console.log("â
Atualizado no adminActivePortfolio e salvo no localStorage"))}async function P(){try{return(await ct.get("/api/portfolios/archived")).data}catch(re){throw console.error("Erro ao buscar carteiras arquivadas:",re),re}}async function I(re){try{const ne=await ct.post(`/api/portfolios/${re}/unarchive`);return await v(),ne.data}catch(ne){throw ne}}async function D(re){try{await ct.post(`/api/portfolios/${re}/archive`),await v()}catch(ne){throw console.error("Erro ao arquivar carteira:",ne),ne}}async function F(re){var ne;try{if((await ct.post(`/api/portfolios/${re}/set-active`)).data.success)return t.value.forEach(G=>{G.active=G.id===re?"Yes":"No"}),e.value=t.value.find(G=>
49G.id===re),s.value=null,f(),console.log("â
Portfolio ativo definido:",(ne=e.value)==null?void 0:ne.title),window.dispatchEvent(new CustomEvent("portfolio-changed",{detail:{portfolioId:re,portfolio:e.value,isAdmin:!1}})),e.value}catch(X){throw console.error("â Erro ao ativar portfolio:",X),X}}async function C(){console.log("ð Garantindo portfolio ativo...");try{const re=await ct.get("/api/portfolios/active");return re.data&&re.data.id?(e.value=re.data,t.value.length>0&&t.value.forEach(ne=>{ne.active=ne.id===re.data.id?"Yes":"No"}),f(),e.value):(console.log("ð Nenhum portfolio encontrado. Criando padrão..."),await A())}catch(re){return console.error("â Erro ao garantir portfolio ativo:",re),j()}}async function A(){try{const re=await y("Minha Carteira");return await F(re.id),re}catch(re){throw console.error("â Erro ao criar portfolio padrão:",re),re}}function O(re){s.value=re,f(),window.dispatchEvent(new CustomEvent("portfolio-changed",{detail:{portfolio:re,isAdmin:!0}}))}function j(){return s.value?s.value:e.value?e.value:t.value.length>0?(console.log("â ï¸ Usando primeiro portfolio da lista como fallback"),t.value[0]):(console.log("â ï¸ Nenhum portfolio disponÃvel, retornando null"),null)}function te(){const re=j();return(re==null?void 0:re.id)||null}function B(){return s.value!==null}async function z(){try{const re=await ct.get("/api/portfolios/active");return e.value=re.data,f(),re.data}catch(re){throw console.error("Erro ao carregar carteira ativa:",re),re}}return h(),{portfolios:t,activePortfolio:e,adminActivePortfolio:s,isLoading:n,fetchPortfolios:v,searchPortfolios:g,createPortfolio:y,updatePortfolio:x,fetchArchivedPortfolios:P,archivePortfolio:D,unarchivePortfolio:I,setActivePortfolio:F,setAdminActivePortfolio:O,getCurrentPortfolio:j,getCurrentPortfolioId:te,isAdminView:B,fetchActivePortfolio:z,updatePortfolioInAllLocations:E,triggerUpdate:o,getLastUpdate:r,lastUpdates:i,ensureActivePortfolio:C,
49createDefaultPortfolio:A,clearState:c}}),$j=Object.freeze(Object.defineProperty({__proto__:null,usePortfolioStore:pi},Symbol.toStringTag,{value:"Module"})),tn=pa("auth",{state:()=>({user:null}),getters:{isAuthenticated:t=>t.user!==null,isSubscriptionValid(t){const e=t.user;if(!e)return!1;if(e.role==="Admin")return!0;const s=e.subscription;if(!s||s.status==="Inactive"||e.status==="Inactive")return!1;if(["Trial","Active"].includes(s.status)){if(s.status==="Active"&&!s.end_date)return!0;if(s.end_date){const n=new Date(s.end_date.replace(" ","T")),i=new Date;return n.setHours(0,0,0,0),i.setHours(0,0,0,0),n>i}}return!1},hasModule(t){return e=>{var i,o,r;if(!this.isSubscriptionValid)return!1;if(((i=t.user)==null?void 0:i.role)==="Admin")return!0;const s=((r=(o=t.user)==null?void 0:o.subscription)==null?void 0:r.modules)||"",n=Array.isArray(s)?s:s.split(",").map(c=>c.trim());return n.includes("all")?!0:n.includes(e)}},isPro(){return this.hasModule("pro")},hasProAccess(){return this.isPro},shouldShowBadge:t=>{const e=t.user;if(!e||e.role==="Admin")return!1;const s=e.subscription;if(!s)return!1;if(s.status==="Trial")return!0;if(s.status==="Active"&&s.end_date){const n=new Date(s.end_date.replace(" ","T")),i=new Date;return n.setHours(0,0,0,0),i.setHours(0,0,0,0),n<=i}return!1},daysLeftInTrial:t=>{var o;const e=(o=t.user)==null?void 0:o.subscription;if(!e||!e.end_date)return null;const s=new Date(e.end_date.replace(" ","T")),n=new Date;s.setHours(0,0,0,0),n.setHours(0,0,0,0);const i=s-n;return Math.ceil(i/(1e3*60*60*24))}},actions:{async getUser(){var t,e,s;try{const{data:n}=await ct.get("/api/user",{skipLoading:!0});return n&&(n.status==="Inactive"||((t=n.subscription)==null?void 0:t.status)==="Inactive")&&n.role!=="Admin"?(await this.logout(),null):(this.user=n,n&&this.isAuthenticated&&await pi().ensureActivePortfolio(),n)}catch(n){if(((e=n.response)==null?void 0:e.status)===401||((s=n.response)==null?void 0:s.status)===419){this.user=null;const i=pi();return typeof i.clearState=="function"&&i.clearState(),localStorage.removeItem("activePortfolio"),localStorage.removeItem("adminActivePortfolio"),null}return this.user=null,null}},async login(t,e,s=!1){try{await ct.get("/sanctum/csrf-cookie"),await ct.post("/api/login",{email:t,password:e,remember:s});const n=await this.getUser();if(!n)throw new Error("Não foi possÃvel recuperar os dados da conta.");return await pi().ensureActivePortfolio(),n}catch(n){throw this.user=null,n}},async unsubscribeWebPush(){try{if("serviceWorker"in navigator&&"PushManager"in window){const e=await(await navigator.serviceWorker.ready).pushManager.getSubscription();e&&(await ct.post("/api/webpush/unsubscribe",{endpoint:e.endpoint}),await e.unsubscribe(),console.log("â
Inscrição do Web Push removida com sucesso neste dispositivo."))}}catch(t){console.error("â ï¸ Erro ao tentar cancelar assinatura do Web Push:",t)}},async logout(){try{await this.unsubscribeWebPush(),await ct.post("/api/logout")}catch{}finally{this.user=null;const t=pi();typeof t.clearState=="function"&&t.clearState(),localStorage.removeItem("activePortfolio"),localStorage.removeItem("adminActivePortfolio")}}}}),Mn=pa("offcanvas",{state:()=>({stack:[]}),getters:{current:t=>t.stack[t.stack.length-1]||null,hasPrevious:t=>t.stack.length>1},actions:{open(t,e={}){const s=this.stack[this.stack.length-1];s&&s.name===t&&JSON.stringify(s.props)===JSON.stringify(e)||this.stack.push({name:t,props:e})},back(){this.stack.length>1?this.stack.pop():this.close()},close(){this.stack=[]}}});let gk=0;const vi=pa("toast",{state:()=>({messages:[]}),actions:{show(t,e="success",s=5e3){gk++;const n={id:gk,message:t,type:e};this.messages.push(n),setTimeout(()=>{this.remove(n.id)},s)},remove(t){this.messages=this.messages.filter(e=>e.id!==t)}}}),O_=pa("notification",()=>{const t=ve([]),e=ve(0),s=ve(null);function n(){"Notification"in window&&Notification.permission!=="granted"&&Notification.permission!=="denied"&&Notification.requestPermission()}async function i(){try{const f=await ct.get("/api/notifications");t.value=f.data.notifications||[],e.value=f.data.unread_count||0}catch(f){console.error("Erro ao carregar notificações:",f)}}async function o(f){try{await ct.post(`/api/notifications/${f}/read`);const v=t.value.find(g=>g.id===f);v&&!v.read_at&&(v.read_at=new Date().toISOString(),e.value=Math.max(0,e.value-1))}catch(v){console.error("Erro ao marcar como lida:",v)}}async function r(){try{await ct.post("/api/notifications/mark-all-read"),t.value.forEach(f=>{f.read_at=new Date().toISOString()}),e.value=0}catch(f){console.error("Erro ao marcar todas como lidas:",f)}}function c(){var g;const v=(g=tn().user)==null?void 0:g.id;!v||!window.Echo||s.value!==v&&(n(),window.Echo.private(`App.Models.User.${v}`).notification(y=>{if(console.log("ð Nova notificação em tempo real:",y),t.value.some(P=>P.id===y.id))return;t.value.unshift({id:y.id,data:y,read_at:null,created_at:y.created_at||new Date().toISOString()}),e.value++,y.type&&y.type.toLowerCase().includes("chat")||y.title&&y.title.toLowerCase().includes("mensagem")||vi().show(y.message,"success")}),s.value=v)}function h(){const f=s.value;f&&window.Echo&&window.Echo.private(`App.Models.User.${f}`).stopListening("\\Illuminate\\Notifications\\Events\\BroadcastNotificationCreated"),s.value=null}return{notifications:t,unreadCount:e,fetchNotifications:i,markAsRead:o,markAllAsRead:r,listenForRealtime:c,stopListening:h}}),ls=(t,e)=>{const s=t.__vccOpts||t;for(const[n,i]of e)s[n]=i;return s},Ij={class:"container-fluid p-3 d-flex flex-column",style:{height:"100%"}},Mj={key:0,class:"d-flex flex-column h-100"},Nj={key:0,class:"mt-3 text-center"},Lj=["disabled"],Rj={key:0,class:"spinner-border spinner-border-sm me-2",role:"status"},Fj={key:1,class:"bi bi-trash3 me-1"},Vj={key:1,class:"preview-area flex-grow-1 d-flex flex-column align-items-center mt-3"},Bj={class:"img-preview-container shadow-sm border mb-4"},Uj=["src"],jj={class:"actions d-flex justify-content-between w-100 mt-auto"},Hj=["disabled"],Wj=["disabled"],zj={key:0,class:"spinner-border spinner-border-sm me-2",role:"status"},Yj={key:1,class:"bi bi-check2 me-1"},qj={__name:"AvatarOffcanvas",setup(t){const e=tn(),s=Mn(),n=vi(),i=ve(null),o=ve(null),r=ve(null),c=ve(!1),h=ve
49(!1),f=Ae(()=>{var I;const P=(I=e.user)==null?void 0:I.profile_image;return P&&P!=="null"&&String(P).trim()!==""}),v=()=>{i.value&&i.value.click()},g=P=>{const I=P.target.files[0];if(I){if(I.size>2*1024*1024){n.show("A imagem deve ter no máximo 2MB.","error");return}r.value=I,o.value=URL.createObjectURL(I)}},y=()=>{o.value&&URL.revokeObjectURL(o.value),o.value=null,r.value=null,i.value&&(i.value.value="")},x=async()=>{var I;if(!r.value)return;c.value=!0;const P=new FormData;P.append("avatar",r.value);try{const D=await ct.post("/api/user/avatar",P,{headers:{"Content-Type":"multipart/form-data"}});e.user&&(e.user.profile_image=D.data.profile_image),n.show("Foto atualizada com sucesso!","success"),s.close()}catch(D){console.error(D),((I=D.response)==null?void 0:I.status)===422?n.show(D.response.data.message||"Arquivo inválido ou muito grande.","error"):n.show("Erro ao enviar a imagem. Tente novamente.","error")}finally{c.value=!1}},E=async()=>{h.value=!0;try{await ct.delete("/api/user/avatar"),e.user&&(e.user.profile_image=null),n.show("Foto removida com sucesso!","success"),s.close()}catch(P){console.error(P),n.show("Erro ao remover a foto. Tente novamente.","error")}finally{h.value=!1}};return(P,I)=>($(),L("div",Ij,[o.value?($(),L("div",Vj,[I[4]||(I[4]=l("p",{class:"text-muted small mb-3"},"Pré-visualização de como sua foto ficará no perfil:",-1)),l("div",Bj,[l("img",{src:o.value,class:"img-preview"},null,8,Uj)]),l("div",jj,[l("button",{class:"btn btn-outline-secondary",onClick:y,disabled:c.value},[...I[2]||(I[2]=[l("i",{class:"bi bi-arrow-left me-1"},null,-1),Pe(" Trocar ",-1)])],8,Hj),l("button",{class:"btn btn-primary px-4",onClick:x,disabled:c.value},[c.value?($(),L("span",zj)):($(),L("i",Yj)),I[3]||(I[3]=Pe(" Salvar Foto ",-1))],8,Wj)])])):($(),L("div",Mj,[l("div",{class:"upload-area d-flex flex-column align-items-center justify-content-center text-center p-4 border rounded flex-grow-1",onClick:v},[...I[0]||(I[0]=[l("i",{class:"bi bi-cloud-arrow-up display-1 text-primary mb-3"},null,-1),l("h5",null,"Escolha sua foto",-1),l("p",{class:"text-muted small"},[Pe("Formatos suportados: JPG, PNG, JPEG."),l("br"),Pe("Tamanho máximo: 2MB.")],-1),l("button",{class:"btn btn-primary mt-2"},"Navegar nos arquivos",-1)])]),f.value?($(),L("div",Nj,[l("button",{class:"btn btn-outline-danger",onClick:E,disabled:h.value},[h.value?($(),L("span",Rj)):($(),L("i",Fj)),I[1]||(I[1]=Pe(" Remover foto atual ",-1))],8,Lj)])):xe("",!0)])),l("input",{type:"file",ref_key:"fileInput",ref:i,class:"d-none",accept:"image/jpeg, image/png, image/jpg",onChange:g},null,544)]))}},Gj=ls(qj,[["__scopeId","data-v-f7f581e3"]]),Xj={class:"offcanvas-body p-3 d-flex flex-column h-100 notification-tab"},Kj={class:"d-flex justify-content-between align-items-center mb-4"},Jj={class:"btn-group",role:"group"},Qj=["checked"],Zj=["checked"],e7={class:"btn btn-outline-primary btn-sm",for:"btnradio2"},t7={key:0,class:"badge bg-primary ms-1 rounded-pill"},s7={class:"flex-grow-1 overflow-auto"},n7={key:0,class:"empty-state text-center py-5 text-muted"},i7={key:1,class:"notifications-list"},r7=["onClick"],a7={class:"d-flex justify-content-between align-items-start mb-1"},o7={class:"d-flex align-items-center"},l7={class:"mb-0 fw-bold text-color lh-sm",style:{"font-size":"0.95rem"}},u7={class:"d-flex justify-content-between align-items-center mt-3 border-top pt-2"},c7={class:"text-muted",style:{"font-size":"0.75rem"}},d7={class:"flex-grow-1 overflow-auto"},h7={class:"d-flex align-items-center mb-3"},f7={class:"icon-circle bg-surface-secondary d-flex align-items-center justify-content-center me-3",style:{width:"45px",height:"45px","border-radius":"50%",background:"rgba(0,144,211, 0.1)"}},p7={class:"mb-1 text-color fw-bold"},m7={class:"text-muted"},g7={class:"fundamentals-section mt-4"},v7={class:"p-3 rounded mb-4",style:{"background-color":"var(--bg-light)",border:"1px solid var(--border-color)"}},b7={class:"mb-0 text-color",style:{"white-space":"pre-line","line-height":"1.5"}},y7={__name:"NotificationsOffcanvas",setup(t){const e=O_(),s=Mn(),n=gi(),i=ve("all"),o=ve(null),r=Ae(()=>{let E=e.notifications;return i.value==="unread"&&(E=E.filter(P=>!P.read_at)),E}),c=async()=>{await e.markAllAsRead(),i.value==="unread"&&(i.value="all")},h=async E=>{E.read_at||await e.markAsRead(E.id),o.value=E},f=()=>{o.value=null},v=E=>{s.close(),E.data.action_url&&(E.data.action_url.startsWith("http")?window.location.href=E.data.action_url:n.push(E.data.action_url))},g=(E,P)=>`${{"b3-sync":"bi-arrow-repeat",community:"bi-people",chat:"bi-chat-dots",dividend:"bi-cash-coin",info:"bi-info-circle"}[E]||"bi-bell"} ${P?"text-primary":"text-secondary"}`,y=E=>{const P=new Date(E),D=Math.floor((new Date-P)/6e4);if(D<1)return"Agora";if(D<60)return`${D} min atrás`;const F=Math.floor(D/60);return F<24?`${F}h atrás`:Math.floor(F/24)===1?"Ontem":P.toLocaleDateString("pt-BR")},x=E=>{const P=new Date(E);return P.toLocaleDateString("pt-BR")+" às "+P.toLocaleTimeString("pt-BR",{hour:"2-digit",minute:"2-digit"})};return(E,P)=>($(),L("div",Xj,[o.value?($(),L(Ze,{key:1},[l("div",{class:"d-flex align-items-center mb-3 pb-3 border-bottom"},[l("button",{class:"btn btn-sm btn-link text-decoration-none text-muted p-0 me-3",onClick:f},[...P[8]||(P[8]=[l("i",{class:"bi bi-arrow-left fs-5"},null,-1)])]),P[9]||(P[9]=l("h6",{class:"mb-0 text-dark fw-bold"},"Detalhes da Notificação",-1))]),l("div",d7,[l("div",h7,[l("div",f7,[l("i",{class:Me(["bi fs-4 text-primary",g(o.value.data.type,!1)])},null,2)]),l("div",null,[l("h5",p7,pe(o.value.data.title),1),l("small",m7,[P[10]||(P[10]=l("i",{class:"bi bi-clock me-1"},null,-1)),Pe(" "+pe(x(o.value.created_at)),1)])])]),l("div",g7,[P[12]||(P[12]=l("h6",{class:"section-title mb-3"},"Mensagem",-1)),l("div",v7,[l("p",b7,pe(o.value.data.message),1)]),o.value.data.action_url?($(),L("button",{key:0,class:"btn btn-primary w-100 py-2 fw-bold shadow-sm",onClick:P[2]||(P[2]=I=>v(o.value))},[...P[11]||(P[11]=[Pe(" Acessar Link ",-1),l("i",{class:"bi bi-arrow-right ms-1"},null,-1)])])):xe("",!0)])])],64)):($(),L(Ze,{key:0},[l("div",Kj,[l("div",Jj,[l("input",{type:"radio",class:"btn-check",name:"btnradio",id:"btnradio1",autocomplete:"off",checked:i.value==="all",onChange:P[0]||(P[0]=I=>i.value="all")},null,40,Qj),P[4]||(P[4]=l("label",{class:"btn btn-outline-primary btn-sm",for:"btnradio1"},"Todas",-1)),l("input",{type:"radio",class:"btn-check",name:"btnradio",id:"btnradio2",autocomplete:"off",checked:i.value==="unread",onChange:P[1]||(P[1]=I=>i.value="unread")}
49,null,40,Zj),l("label",e7,[P[3]||(P[3]=Pe(" Não lidas ",-1)),Ne(e).unreadCount>0?($(),L("span",t7,pe(Ne(e).unreadCount),1)):xe("",!0)])]),Ne(e).unreadCount>0?($(),L("button",{key:0,class:"btn btn-link btn-sm p-0 text-primary text-decoration-none",onClick:c},[...P[5]||(P[5]=[l("i",{class:"bi bi-check2-all me-1"},null,-1),Pe(" Marcar como lidas ",-1)])])):xe("",!0)]),l("div",s7,[r.value.length===0?($(),L("div",n7,[...P[6]||(P[6]=[l("i",{class:"bi bi-bell-slash display-4 opacity-25"},null,-1),l("p",{class:"mt-3"},"Nenhuma notificação encontrada.",-1)])])):($(),L("div",i7,[($(!0),L(Ze,null,At(r.value,I=>($(),L("div",{key:I.id,class:Me(["notification-card mb-3 p-3 border rounded shadow-sm cursor-pointer",{"is-unread":!I.read_at}]),onClick:D=>h(I)},[l("div",a7,[l("div",o7,[l("i",{class:Me(["bi me-2 fs-5",g(I.data.type,!I.read_at)])},null,2),l("h6",l7,pe(I.data.title),1)])]),l("div",u7,[P[7]||(P[7]=l("small",{class:"text-muted d-block text-truncate me-3",style:{"font-size":"0.8rem","max-width":"70%"}}," Clique para ver os detalhes... ",-1)),l("small",c7,pe(y(I.created_at)),1)])],10,r7))),128))]))])],64))]))}},_7=ls(y7,[["__scopeId","data-v-d33f154c"]]),x7={class:"offcanvas-body p-3 d-flex flex-column h-100 position-relative"},w7={class:"flex-grow-1 overflow-auto pe-2"},E7={key:0,class:"text-center py-5"},S7={key:1,class:"preferences-list"},k7={class:"fw-bold text-color border-bottom pb-2 mb-3"},C7={class:"small text-light mb-2"},T7={class:"pe-3"},A7={class:"d-block text-color",style:{"font-size":"0.9rem"}},O7={class:"d-flex gap-3"},D7={class:"d-flex flex-column align-items-center",title:"Receber por E-mail"},P7={class:"form-check form-switch m-0 p-0"},$7=["checked","onChange"],I7={class:"d-flex flex-column align-items-center",title:"Receber por Push (Celular/Navegador)"},M7={class:"form-check form-switch m-0 p-0"},N7=["checked","onChange"],L7={__name:"AlertPreferencesOffcanvas",setup(t){const e=tn(),s=gi(),n=Mn(),i=ve([]),o=ve(!0),r=[{title:"Sincronização B3",description:"Seja avisado sempre que a sua carteira for atualizada pela B3.",icon:"bi-arrow-left-right",alerts:[{id:"b3_sync",label:"Aviso de atualização"}]}
49,{title:"Impostos",description:"Seja avisado sobre vencimento de DARFs e obrigações fiscais.",icon:"bi-percent",alerts:[{id:"due_taxes",label:"Vencimentos"},{id:"tax_obligations",label:"Obrigações"}]},{title:"Proventos",description:"Atualizações de agendamento e pagamento de proventos na sua carteira.",icon:"bi-cash-coin",alerts:[{id:"dividend_upcoming",label:"Próximos pagamentos"}]},{title:"Ativos no Radar",description:"Receba alerta de preços configurados no seu radar e atualização do calendário de proventos.",icon:"bi-radar",alerts:[{id:"radar_price",label:"Alerta de Preços"},{id:"radar_dividend",label:"Alerta de Proventos"}]},{title:"NotÃcias",description:"Menção a ativos da sua carteira ou seguidos em seu radar.",icon:"bi-newspaper",alerts:[{id:"news_mention",label:"Menções a Ativos"}]},{title:"Comunidade",description:"Curtidas e comentários em postagem, menção a ativos da sua carteira ou seguidos em seu radar.",icon:"bi-people",alerts:[{id:"community_like",label:"Curtidas"},{id:"community_comment",label:"Comentários"},{id:"community_mention",label:"Menções a Ativos"}]},{title:"Geral",description:"Lançamentos, promoções e atualizações do sistema.",icon:"bi-info-circle",alerts:[{id:"general_alerts",label:"Avisos Gerais"}]}],c=async()=>{if(!e.isPro){o.value=!1;return}try{const{data:g}=await ct.get("/api/alert-preferences");i.value=g}catch(g){console.error("Erro ao buscar preferências:",g)}finally{o.value=!1}},h=(g,y)=>{const x=i.value.find(E=>E.alert_type===g);return x?x[y]:!0},f=async(g,y,x)=>{let E=i.value.find(P=>P.alert_type===g);E||(E={alert_type:g,email_enabled:!0,push_enabled:!0},i.value.push(E)),E[y]=x;try{await ct.put("/api/alert-preferences",{alert_type:g,email_enabled:E.email_enabled,push_enabled:E.push_enabled})}catch(P){console.error("Erro ao salvar preferência:",P),E[y]=!x}},v=()=>{document.querySelectorAll(".tooltip").forEach(y=>y.remove()),n.close(),s.push("/my-account/plans")};return Xt(()=>{c()}),(g,y)=>($(),L("div",x7,[l("div",{class:Me(["h-100 d-flex flex-column",{"blurred-locked":!Ne(e).isPro}])},[y[3]||(y[3]=l("h6",{class:"text-muted mb-4"},"Escolha os canais onde deseja receber cada tipo de alerta.",-1)),l("div",w7,[o.value?($(),L("div",E7,[...y[0]||(y[0]=[l("div",{class:"spinner-border text-primary",role:"status"},null,-1)])])):($(),L("div",S7,[($(),L(Ze,null,At(r,(x,E)=>l("div",{key:E,class:"mb-4"},[l("h6",k7,[l("i",{class:Me([x.icon,"me-2 text-primary"])},null,2),Pe(pe(x.title),1)]),l("p",C7,pe(x.description),1),($(!0),L(Ze,null,At(x.alerts,P=>($(),L("div",{key:P.id,class:"d-flex justify-content-between align-items-center mb-2 p-2 border rounded",style:{"background-color":"var(--bg-card, #fff)"}},[l("div",T7,[l("span",A7,pe(P.label),1)]),l("div",O7,[l("div",D7,[y[1]||(y[1]=l("i",{class:"bi bi-envelope mb-1 text-muted",style:{"font-size":"0.8rem"}},null,-1)),l("div",P7,[l("input",{class:"form-check-input m-0 custom-switch",type:"checkbox",role:"switch",checked:h(P.id,"email_enabled"),onChange:I=>f(P.id,"email_enabled",I.target.checked)},null,40,$7)])]),l("div",I7,[y[2]||(y[2]=l("i",{class:"bi bi-bell mb-1 text-muted",style:{"font-size":"0.8rem"}},null,-1)),l("div",M7,[l("input",{class:"form-check-input m-0 custom-switch",type:"checkbox",role:"switch",checked:h(P.id,"push_enabled"),onChange:I=>f(P.id,"push_enabled",I.target.checked)},null,40,N7)])])])]))),128))])),64))]))])],2),Ne(e).isPro?xe("",!0):($(),L("div",{key:0,class:"pro-watermark d-flex flex-column align-items-center justify-content-start pt-5",onClick:v},[...y[4]||(y[4]=[l("i",{class:"bi bi-lock"},null,-1),l("span",{class:"pro-text"},"Recurso PRO",-1),l("small",null,"Adquira este recurso em Planos & Licenças",-1)])]))]))}},R7=ls(L7,[["__scopeId","data-v-4da1b162"]]),F7={class:"navbar fixed-top bg-linear-gradient"},V7={class:"d-flex align-items-center"},B7={class:"list-inline shortcuts d-none d-md-inline-block ms-2"},U7={class:"list-inline-item mx-3","data-bs-toggle":"tooltip","data-bs-placement":"bottom",title:"Plano PRO"},j7={class:"list-inline-item mx-3","data-bs-toggle":"tooltip","data-bs-placement":"bottom",title:"Oportunidades"},H7={class:"d-flex align-items-center"},W7={key:0,class:"bi bi-eye-slash-fill fs-5"},z7={key:1,class:"bi bi-eye-fill fs-5"},Y7={key:0,class:"bi bi-moon-stars-fill"},q7={key:1,class:"bi bi-sun-fill"},G7={class:"position-relative"},X7={key:0,class:"badge bg-danger rounded-pill position-absolute top-0 start-100 translate-middle"},K7={class:"me-3 dropdown"},J7={href:"#",class:"nav-link dropdown-toggle text-white d-flex align-items-center",role:"button",id:"dropdownMyAccount","data-bs-toggle":"dropdown","aria-expanded":"false"},Q7={class:"d-none d-md-inline-block text-blue-default text-truncate text-end",style:{"max-width":"150px"}},Z7={class:"position-relative ms-2"},eH=["src"],tH={key:1,class:"ico-init",style:{margin:"0"}},sH={class:"dropdown-menu dropdown-menu-end","aria-labelledby":"dropdownMyAccount"},nH={class:"text-center p-3 border-bottom mb-2"},iH=["src"],rH={key:1,class:"rounded-circle bg-primary text-white d-flex align-items-center justify-content-center mx-auto
49shadow-sm",style:{width:"80px",height:"80px","font-size":"2rem"}},aH={class:"fw-bold text-dark text-truncate px-3"},oH={class:"text-muted text-truncate px-3 d-block"},lH="/assets/images/logo.png",uH={__name:"Navbar",setup(t){const e=In(),s=gi(),n=tn(),i=Mn(),o=O_(),r="Kativo",c=Ae(()=>{var A;return((A=n.user)==null?void 0:A.name)||"Usuário"}),h=Ae(()=>{var A;return((A=n.user)==null?void 0:A.id)||""}),f=ve(!1);Pt(()=>{var A;return(A=n.user)==null?void 0:A.profile_image},()=>{f.value=!1});const v=Ae(()=>{const A=c.value.trim().split(" ").filter(B=>B.length>0);if(A.length===1)return A[0];const O=A[0],j=A[A.length-1],te=`${O} ${j}`;return te.length>20?O:te}),g=Ae(()=>{const A=c.value.trim().split(" ").filter(O=>O.length>0);return A.length===0?"U":A.length===1?A[0].substring(0,2).toUpperCase():`${A[0][0]}${A[A.length-1][0]}`.toUpperCase()}),y=Ae(()=>{var j,te;const A=(j=n.user)==null?void 0:j.profile_image,O=(te=n.user)==null?void 0:te.avatar;return A&&A!=="null"&&String(A).trim()!==""?String(A).startsWith("http")?A:`/storage/${A}`:O&&O!=="null"&&String(O).trim()!==""?O:null}),x=()=>{const A=document.getElementById("dropdownMyAccount");if(A){let O=bootstrap.Dropdown.getInstance(A);O&&O.hide()}i.open(Gj,{title:"Alterar foto de perfil"})},E=()=>{const A=document.querySelector('[title="Notificações"]');if(A){const O=mi.getInstance(A);O&&O.hide()}i.open(_7,{title:"Notificações"})},P=()=>{const A=document.getElementById("dropdownMyAccount");if(A){let O=bootstrap.Dropdown.getInstance(A);O&&O.hide()}i.open(R7,{title:"Preferências de Alertas"})},I=ve(!1);function D(A){const O=document.body;A.toLowerCase()==="dark"?(O.classList.add("dark-theme"),I.value=!0):(O.classList.remove("dark-theme"),I.value=!1)}async function F(){const A=I.value?"Light":"Dark";if(D(A),n.user)try{const{data:O}=await ct.put("/api/user/style",{style:A});n.user.style=O.style}catch(O){console.error("Erro ao salvar tema:",O)}}async function C(){try{if(!n||typeof n.logout!="function"){localStorage.removeItem("activePortfolio"),localStorage.removeItem("adminActivePortfolio"),localStorage.removeItem("sidebarCollapsed"),window.location.href="/login";return}await n.logout(),localStorage.removeItem("activePortfolio"),localStorage.removeItem("adminActivePortfolio"),localStorage.removeItem("sidebarCollapsed"),s.push("/login")}catch{localStorage.removeItem("activePortfolio"),localStorage.removeItem("adminActivePortfolio"),localStorage.removeItem("sidebarCollapsed"),window.location.href="/login"}}return Xt(async()=>{var j;n.user||await n.getUser();const A=((j=n.user)==null?void 0:j.style)||"light";D(A),[].slice.call(document.querySelectorAll('[data-bs-toggle="tooltip"]')).forEach(te=>{const B=new mi(te);te.addEventListener("click",()=>B.hide())})}),Pt(()=>s.currentRoute.value.fullPath,()=>{window.matchMedia("(max-width: 991px)").matches&&!e.sidebarCollapsed&&e.toggleSidebar()}),Pt(()=>y.value,()=>{f.value=!1}),(A,O)=>{const j=ur("router-link");return $(),L("nav",F7,[l("div",V7,[l("button",{class:Me(["btn btn-default mx-3",{open:!Ne(e).sidebarCollapsed}]),id:"menu-toggle",onClick:O[0]||(O[0]=(...te)=>Ne(e).toggleSidebar&&Ne(e).toggleSidebar(...te))},[...O[5]||(O[5]=[l("span",null,null,-1),l("span",null,null,-1),l("span",null,null,-1),l("span",null,null,-1)])],2),et(j,{class:"navbar-brand logo d-none d-md-inline-block",to:"/",title:Ne(r)},{default:vt(()=>[l("img",{src:lH,style:{width:"85px"}})]),_:1},8,["title"]),l("ul",B7,[l("li",U7,[et(j,{to:"/my-account/plans","data-action":"route"},{default:vt(()=>[...O[6]||(O[6]=[l("i",{class:"bi bi-gem"},null,-1)])]),_:1})]),l("li",j7,[et(j,{to:"/opportunities","data-action":"route"},{default:vt(()=>[...O[7]||(O[7]=[l("i",{class:"bi bi-trophy"},null,-1)])]),_:1})])])]),l("div",H7,[l("button",{class:"btn btn-link text-white position-relative","data-bs-toggle":"tooltip","data-bs-placement":"bottom",title:"Exibe/oculta valores",onClick:O[1]||(O[1]=te=>Ne(e).toggleValues())},[Ne(e).hideValues?($(),L("i",W7)):($(),L("i",z7))]),l("button",{class:"btn btn-link text-white position-relative","data-bs-toggle":"tooltip","data-bs-placement":"bottom",title:"Tema",onClick:F},[I.value?($(),L("i",Y7)):($(),L("i",q7))]),l("div",G7,[l("button",{class:"btn btn-link text-white position-relative","data-bs-toggle":"tooltip","data-bs-placement":"bottom",title:"Notificações",onClick:E},[O[8]||(O[8]=l("i",{class:"bi bi-bell-fill fs-5"},null,-1)),Ne(o).unreadCount>0?($(),L("span",X7,pe(Ne(o).unreadCount),1)):xe("",!0)])]),l("div",K7,[l("a",J7,[l("span",Q7,pe(v.value),1),l("div",Z7,[y.value&&!f.value?($(),L("img",{key:0,src:y.value,onError:O[2]||(O[2]=te=>f.value=!0),referrerpolicy:"no-referrer",class:"ico-init p-0",style:{"object-fit":"cover",margin:"0"}},null,40,eH)):($(),L("span",tH,pe(g.value),1))])]),l("ul",sH,[l("li",nH,[l("div",{class:"position-relative d-inline-block mb-2",style:{cursor:"pointer"},onClick:x,title:"Alterar foto"}
49,[y.value&&!f.value?($(),L("img",{key:0,src:y.value,onError:O[3]||(O[3]=te=>f.value=!0),referrerpolicy:"no-referrer",class:"rounded-circle shadow-sm",style:{width:"80px",height:"80px","object-fit":"cover"}},null,40,iH)):($(),L("div",rH,pe(g.value),1)),O[9]||(O[9]=l("span",{class:"position-absolute bottom-0 end-0 bg-white rounded-circle p-1 shadow-sm d-flex align-items-center justify-content-center",style:{width:"28px",height:"28px",right:"-5px",bottom:"-5px"}},[l("i",{class:"bi bi-pencil-fill text-primary",style:{"font-size":"0.8rem"}})],-1))]),l("div",aH,pe(v.value),1),l("small",oH,[h.value?($(),Ut(j,{key:0,to:`/community/profile/${h.value}`},{default:vt(()=>[...O[10]||(O[10]=[Pe(" Meu perfil ",-1),l("i",{class:"bi bi-box-arrow-in-up-right"},null,-1)])]),_:1},8,["to"])):xe("",!0)])]),l("li",null,[et(j,{to:"/my-account","data-action":"route",class:"dropdown-item"},{default:vt(()=>[...O[11]||(O[11]=[l("i",{class:"bi bi-person-fill me-3"},null,-1),Pe("Minha conta ",-1)])]),_:1})]),l("li",null,[et(j,{to:"/my-account/plans","data-action":"route",class:"dropdown-item"},{default:vt(()=>[...O[12]||(O[12]=[l("i",{class:"bi bi-gem me-3"},null,-1),Pe("Planos & licenças ",-1)])]),_:1})]),O[16]||(O[16]=l("li",null,[l("hr",{class:"dropdown-divider"})],-1)),l("li",null,[l("a",{href:"#",onClick:St(P,["prevent"]),class:"dropdown-item"},[...O[13]||(O[13]=[l("i",{class:"bi bi-sliders me-3"},null,-1),Pe("Preferências de Alertas ",-1)])])]),O[17]||(O[17]=l("li",null,[l("hr",{class:"dropdown-divider"})],-1)),l("li",null,[l("a",{href:"#",onClick:O[4]||(O[4]=St(te=>A.$openHelp(),["prevent"])),class:"dropdown-item"},[...O[14]||(O[14]=[l("i",{class:"bi bi-life-preserver me-3"},null,-1),Pe("Central de ajuda ",-1)])])]),O[18]||(O[18]=l("li",null,[l("hr",{class:"dropdown-divider"})],-1)),l("li",null,[l("a",{href:"#",onClick:St(C,["prevent"]),class:"dropdown-item"},[...O[15]||(O[15]=[l("i",{class:"bi bi-door-open-fill me-3"},null,-1),Pe("Sair ",-1)])])])])])])])}}},cH=ls(uH,[["__scopeId","data-v-a7025c4f"]]);let dH=0;const Yn=pa("modal",()=>{const t=ve([]);function e(i,o={}){t.value.push({key:++dH,name:cr(i),props:o})}function s(){t.value.pop()}function n(){t.value.length=0}return{stack:t,open:e,close:s,closeAll:n}}),hH={class:"archived-wallets-container"},fH={key:0,class:"text-center text-muted py-5"},pH={key:1,class:"wallets-list"},mH={class:"wallets-grid"},gH={class:"wallet-content"},vH={class:"wallet-header"},bH={class:"wallet-info"},yH={class:"wallet-title"},_H={class:"wallet-meta"},xH={class:"text-muted"},wH={class:"wallet-actions"},EH=["onClick","disabled"],SH={key:0,class:"spinner-border spinner-border-sm me-1"},kH={key:1,class:"bi bi-arrow-counterclockwise me-1"},CH={key:2,class:"empty-state text-center py-5"},TH={__name:"WalletsArchivedOffcanvas",setup(t){const e=pi(),s=Mn(),n=vi(),i=ve(!1),o=ve(null),r=ve([]);Xt(c);async function c(){i.value=!0;try{r.value=await e.fetchArchivedPortfolios()}catch(g){console.error(g)}finally{i.value=!1}}async function h(g){var y,x;o.value=g.id;try{await e.unarchivePortfolio(g.id),r.value=r.value.filter(E=>E.id!==g.id),n.show("Carteira restaurada com sucesso!","success"),r.value.length===0&&setTimeout(f,1e3)}catch(E){const P=((x=(y=E.response)==null?void 0:y.data)==null?void 0:x.message)||"Erro ao restaurar carteira.";n.show(P,"danger")}finally{o.value=null}}function f(){typeof s.back=="function"?s.back():s.close()}function v(g){return g?new Date(g).toLocaleDateString("pt-BR"):""}return(g,y)=>($(),L("div",hH,[l("div",{class:"d-flex align-items-center mb-3"},[l("button",{onClick:f,class:"btn btn-sm btn-outline-secondary rounded-pill px-3"},[...y[0]||(y[0]=[l("i",{class:"bi bi-arrow-left me-1"},null,-1),Pe(" Voltar ",-1)])])]),i.value?($(),L("div",fH,[...y[1]||(y[1]=[l("div",{class:"spinner-border",role:"status"},null,-1),l("p",{class:"text-muted mt-2 small"},"Carregando arquivadas...",-1)])])):r.value.length>0?($(),L("div",pH,[l("div",mH,[($(!0),L(Ze,null,At(r.value,x=>($(),L("div",{key:x.id,class:"wallet-item archived"},[l("div",gH,[l("div",vH,[y[2]||(y[2]=l("div",{class:"wallet-icon"},[l("i",{class:"bi bi-archive"})],-1)),l("div",bH,[l("h6",yH,pe(x.title),1),l("div",_H,[l("small",xH," Arquivada em: "+pe(v(x.updated_at)),1)])])])]),l("div",wH,[l("button",{class:"btn btn-sm btn-outline-primary",onClick:E=>h(x),disabled:o.value===x.id},[o.value===x.id?($(),L("span",SH)):($(),L("i",kH)),y[3]||(y[3]=Pe(" Restaurar ",-1))],8,EH)])]))),128))])])):($(),L("div",CH,[...y[4]||(y[4]=[l("i",{class:"bi bi-inbox display-4 text-muted opacity-50"},null,-1),l("h6",{class:"text-muted mt-3"}
49,"Nenhuma carteira arquivada",-1)])]))]))}},AH=ls(TH,[["__scopeId","data-v-44a97060"]]),OH={class:"modal-dialog modal-dialog-centered modal-sm"},DH={class:"modal-content"},PH={class:"modal-header"},$H=["disabled"],IH={class:"modal-body"},MH=["disabled"],NH={class:"form-text small text-end mt-1"},LH={class:"modal-footer"},RH=["disabled"],FH=["disabled"],VH={key:0,class:"spinner-border spinner-border-sm me-2"},BH={__name:"EditPortfolioModal",props:{portfolio:{type:Object,required:!0},onSave:{type:Function,required:!0},active:{type:Boolean,default:!0}},setup(t){const e=t,s=Yn(),n=ve(e.portfolio.title),i=ve(!1),o=ve(null);function r(){i.value||s.close()}function c(f){f.stopPropagation()}async function h(){if(!(!n.value.trim()||i.value)){i.value=!0;try{await e.onSave(n.value.trim()),s.close()}catch(f){console.error("Erro ao salvar edição:",f)}finally{i.value=!1}}}return Xt(()=>{vs(()=>{o.value&&(o.value.focus(),o.value.select())})}),(f,v)=>($(),L(Ze,null,[l("div",{class:"modal-backdrop show",onClick:c}),l("div",{class:"modal fade show d-block",tabindex:"-1",onClick:v[1]||(v[1]=St(()=>{},["stop"]))},[l("div",OH,[l("div",DH,[l("div",PH,[v[2]||(v[2]=l("h6",{class:"modal-title"},[l("i",{class:"bi bi-pencil-square me-2 text-primary"}),Pe(" Editar Carteira ")],-1)),l("button",{type:"button",class:"btn-close",onClick:r,disabled:i.value},null,8,$H)]),l("div",IH,[_t(l("input",{"onUpdate:modelValue":v[0]||(v[0]=g=>n.value=g),type:"text",class:"form-control",placeholder:"Nome da carteira",maxlength:"50",ref_key:"titleInput",ref:o,disabled:i.value,onKeyup:es(h,["enter"])},null,40,MH),[[Xs,n.value]]),l("div",NH,pe(n.value.length)+"/50 ",1)]),l("div",LH,[l("button",{type:"button",class:"btn btn-outline-secondary btn-sm",onClick:r,disabled:i.value}," Cancelar ",8,RH),l("button",{type:"button",class:"btn btn-primary btn-sm",onClick:h,disabled:!n.value.trim()||i.value},[i.value?($(),L("span",VH)):xe("",!0),Pe(" "+pe(i.value?"Salvando...":"Salvar"),1)],8,FH)])])])])],64))}},UH=ls(BH,[["__scopeId","data-v-f89f439d"]]),jH={class:"modal-content"},HH={class:"modal-header"},WH={class:"modal-title"},zH={class:"modal-body"},YH={class:"modal-footer"},qH={__name:"AppModal",props:{modelValue:{type:Boolean,default:!1},title:{type:String,default:""},size:{type:String,default:"modal-lg"},active:{type:Boolean,default:!0}},emits:["update:modelValue","hidden"],setup(t,{emit:e}){const s=t,n=e,i=ve(null),o=ve(!1),r=ve(!1);let c=null;function h(){n("update:modelValue",!1)}return Pt(()=>s.modelValue,async f=>{f?(o.value=!0,await vs(),requestAnimationFrame(()=>{r.value=!0})):r.value=!1}),Xt(()=>{var f;c=v=>{v.propertyName==="transform"&&(r.value||(o.value=!1,n("hidden")))},(f=i.value)==null||f.addEventListener("transitionend",c),s.modelValue&&(o.value=!0,requestAnimationFrame(()=>{r.value=!0}))}),Wu(()=>{var f;(f=i.value)==null||f.removeEventListener("transitionend",c)}),(f,v)=>($(),L(Ze,null,[et(ja,{name:"modal-backdrop-fade"},{default:vt(()=>[o.value&&t.active?($(),L("div",{key:0,class:Me(["modal-backdrop fade",{show:r.value}])},null,2)):xe("",!0)]),_:1}),_t(l("div",{ref_key:"modalEl",ref:i,class:Me(["modal fade",{show:r.value}]),tabindex:"-1",role:"dialog","aria-modal":"true"},[l("div",{class:Me(["modal-dialog",t.size]),role:"document"},[l("div",jH,[l("div",HH,[l("h5",WH,pe(t.title),1),l("button",{type:"button",class:"btn-close",onClick:h,"aria-label":"Close"})]),l("div",zH,[Ft(f.$slots,"default",{},void 0,!0)]),l("div",YH,[Ft(f.$slots,"footer",{},void 0,!0)])])],2)],2),[[Rr,o.value&&t.active]])],64))}},Ha=ls(qH,[["__scopeId","data-v-efd2b24a"]]),GH={class:"confirm-recommend-modal"},XH={class:"text-center mb-4"},KH={class:"text-center mb-4"},JH={class:"fw-bold text-dark mb-3"},QH={class:"text-muted mb-0"},ZH={class:"d-flex justify-content-between w-100"},e9=["disabled"],t9=["disabled"],s9={__name:"ConfirmWalletRecommend",props:{portfolio:{type:Object,required:!0},onConfirm:{type:Function,required:!0}},emits:["confirmed","cancelled"],setup(t,{emit:e}){const s=t,n=e,i=Yn(),o=ve(!1),r=Ae(()=>!s.portfolio.is_recommended);function c(){o.value||(i.close(),n("cancelled"))}async function h(){o.value=!0;try{await s.onConfirm(s.portfolio),n("confirmed",s.portfolio),i.close()}catch(f){console.error("Erro na ação:",f)}finally{o.value=!1}}return(f,v)=>($(),Ut(Ha,{"model-value":!0,title:r.value?"Exibir no perfil":"Remover do perfil",size:"md","onUpdate:modelValue":c},{footer:vt(()=>[l("div",ZH,[l("button",{type:"button",class:"btn btn-outline-secondary",onClick:c,disabled:o.value},[...v[6]||(v[6]=[l("i",{class:"bi bi-arrow-left me-1"},null,-1),Pe(" Cancelar ",-1)])],8,e9),l("button",{type:"button",class:Me(["btn",r.value?"btn-primary":"btn-secondary"]),onClick:h,disabled:o.value},[l("i",{class:Me(["bi",o.value?"bi-hourglass-split":"bi-check"])},null,2),Pe(" "+pe(o.value?"Processando...":"Confirmar"),1)],10,t9)])]),default:vt(()=>[l("div",GH,[l("div",XH,[l("div",{class:Me(["alert-icon-wrapper",r.value?"bg-primary-light":"bg-secondary-light"])}
49,[l("i",{class:Me(["bi",r.value?"bi-unlock-fill text-primary":"bi-lock-fill text-secondary"])},null,2)],2)]),l("div",KH,[l("h5",JH,pe(r.value?"Deseja exibir esta carteira em seu perfil?":"Deseja ocultar esta carteira em seu perfil?"),1),l("p",QH,[r.value?($(),L(Ze,{key:0},[v[0]||(v[0]=Pe(" Em algumas horas, sua composição e rentabilidade ficarão públicas na ",-1)),v[1]||(v[1]=l("strong",null,"comunidade",-1)),v[2]||(v[2]=Pe(". ",-1))],64)):($(),L(Ze,{key:1},[v[3]||(v[3]=Pe(" Ao confirmar a escolha, sua composição e rentabilidade deixarão de ser exibidas na ",-1)),v[4]||(v[4]=l("strong",null,"comunidade",-1)),v[5]||(v[5]=Pe(". ",-1))],64))])])])]),_:1},8,["title"]))}},n9=ls(s9,[["__scopeId","data-v-d05535ae"]]),i9={class:"d-flex justify-content-between w-100"},r9=["disabled"],a9=["disabled"],o9={__name:"ConfirmDeleteModal",props:{order:{type:Object,required:!0},onConfirm:{type:Function,required:!0}},emits:["deleted","cancelled"],setup(t,{emit:e}){const s=t,n=e,i=Yn(),o=ve(!1);function r(){o.value||(i.close(),n("cancelled"))}async function c(){o.value=!0;try{await s.onConfirm(s.order),n("deleted",s.order),i.close()}catch(h){console.error("Erro na exclusão:",h)}finally{o.value=!1}}return(h,f)=>($(),Ut(Ha,{"model-value":!0,title:"Confirmar exclusão",size:"md","onUpdate:modelValue":r},{footer:vt(()=>[l("div",i9,[l("button",{type:"button",class:"btn btn-outline-secondary",onClick:r,disabled:o.value},[...f[0]||(f[0]=[l("i",{class:"bi bi-arrow-left me-1"},null,-1),Pe(" Cancelar ",-1)])],8,r9),l("button",{type:"button",class:"btn btn-danger",onClick:c,disabled:o.value},[l("i",{class:Me(["bi",o.value?"bi-hourglass-split":"bi-check"])},null,2),Pe(" "+pe(o.value?"Processando...":"Sim, tenho"),1)],8,a9)])]),default:vt(()=>[f[1]||(f[1]=l("div",{class:"confirm-delete-modal"},[l("div",{class:"text-center mb-4"},[l("div",{class:"alert-icon-wrapper"},[l("i",{class:"bi bi-exclamation-triangle-fill text-warning"})])]),l("div",{class:"text-center mb-4"},[l("h5",{class:"fw-bold text-dark mb-3"},"Tem certeza que deseja continuar?"),l("p",{class:"text-muted mb-0"},"Esta ação não pode ser desfeita.")])],-1))]),_:1}))}},D_=ls(o9,[["__scopeId","data-v-1bd2be7e"]]),MSe=Object.freeze(Object.defineProperty({__proto__:null,default:D_},Symbol.toStringTag,{value:"Module"})),l9={class:"wallets-container"},u9={class:"d-flex justify-content-between align-items-center mb-4"},c9={class:"d-flex gap-2"},d9=["disabled"],h9={key:0,class:"search-container mb-4"},f9={class:"input-group input-group-sm"},p9={key:1,class:"text-center text-muted py-4"},m9={key:2,class:"create-form mb-4"},g9={class:"card border-primary"},v9={class:"card-body"},b9={class:"mb-3"},y9=["disabled"],_9={class:"form-text small text-end"},x9={class:"d-flex gap-2"},w9=["disabled"],E9={key:0,class:"spinner-border spinner-border-sm me-2"},S9={key:1,class:"bi bi-check-lg me-2"},k9={key:3,class:"wallets-list"},C9={class:"wallets-grid"},T9=["onClick"],A9={class:"wallet-content"},O9={class:"wallet-header"},D9={class:"wallet-info"},P9={class:"wallet-title"},$9={class:"wallet-meta"},I9={class:"text-muted"},M9={key:0,class:"user-badge"},N9={class:"wallet-stats"},L9=["onClick","disabled"],R9={class:"dropdown"},F9=["onClick"],V9=["onClick"],B9=["onClick"],U9=["onClick"],j9=["onClick"],H9={key:4,class:"empty-state"},W9={class:"empty-content text-center py-5"},z9={class:"text-muted mt-3 mb-2"},Y9={class:"text-muted small mb-3"},q9={key:6,class:"modal fade show d-block",tabindex:"-1"},G9={class:"modal-dialog modal-dialog-centered modal-sm"},X9={class:"modal-content"},K9={class:"modal-body"},J9={class:"details-list"},Q9={class:"detail-item"},Z9={class:"fw-medium"},eW={class:"detail-item"},tW={class:"text-muted"},sW={class:"detail-item"},nW={class:"detail-item"},iW={__name:"WalletsOffcanvas",props:{title:{type:String,default:"Carteiras"}},setup(t){const e=vi(),s=Yn(),n=pi(),i=tn(),o=Mn(),r=ve([]),c=ve(!1),h=ve(null),f=ve(!1),v=ve(!1),g=ve(!1),y=ve(""),x=ve(null),E=ve({}),P=ve(null),I=ve({title:""}),D=Ae(()=>{var _e;return((_e=i.user)==null?void 0:_e.role)==="Admin"}),F=Ae(()=>n.adminActivePortfolio);function C(_e){const Ce=E.value[_e];return!Ce||Ce.length===0?"Sem ativos":Ce.slice(0,3).join(", ")}
49async function A(_e){try{const Ce=await ct.get("/api/portfolio/simple-stats",{params:{portfolio_id:_e}});Ce.data.success&&Ce.data.data.categories?E.value[_e]=Ce.data.data.categories:E.value[_e]=[]}catch(Ce){console.error("Erro ao carregar categorias:",Ce),E.value[_e]=[]}}function O(_e){P.value=P.value===_e?null:_e}function j(){P.value=null}function te(_e){var Ce;return D.value?((Ce=F.value)==null?void 0:Ce.id)===_e.id:_e.active==="Yes"}function B(_e){var Re;const Ce={selected:te(_e),clickable:!D.value&&!te(_e)};return D.value&&(Ce["admin-view"]=_e.user_id!==((Re=i.user)==null?void 0:Re.id)),Ce}function z(_e){const Ce=_e.currentTarget,Re=mi.getInstance(Ce);Re&&Re.hide(),o.open(AH,{title:"Carteiras Arquivadas"})}Xt(async()=>{await re(),D.value||await ne(),document.addEventListener("click",()=>{j()})});async function re(){g.value=!0;try{await n.fetchPortfolios(),r.value=n.portfolios;for(const _e of r.value)await A(_e.id)}catch(_e){console.error("Erro ao carregar carteiras:",_e)}finally{g.value=!1}}async function ne(){try{await n.fetchActivePortfolio()}catch(_e){console.error("Erro ao carregar carteira ativa:",_e)}}function X(){clearTimeout(x.value),x.value=setTimeout(()=>{G()},500)}async function G(){if(!y.value.trim()){await re();return}g.value=!0;try{await n.searchPortfolios(y.value),r.value=n.portfolios;for(const _e of r.value)await A(_e.id)}catch(_e){console.error("Erro na pesquisa:",_e)}finally{g.value=!1}}function ce(){y.value="",re()}async function be(){var _e,Ce;if(I.value.title.trim()){f.value=!0;try{await n.createPortfolio(I.value.title),I.value.title="",c.value=!1,await re(),e.show("Carteira criada com sucesso!","success")}catch(Re){const Ke=((Ce=(_e=Re.response)==null?void 0:_e.data)==null?void 0:Ce.message)||"Erro ao criar carteira.";e.show(Ke,"danger")}finally{f.value=!1}}}function J(_e){D.value||ge(_e)}function Z(_e){te(_e)||(D.value?q(_e):ge(_e.id))}async function ge(_e){v.value=!0;try{await n.setActivePortfolio(_e),o.close()}catch{e.show("Erro ao selecionar carteira.","danger")}finally{v.value=!1}}async function q(_e){v.value=!0;try{n.setAdminActivePortfolio(_e),o.close()}catch{e.show("Erro ao visualizar carteira.","danger")}finally{v.value=!1}}function W(_e){P.value=null,s.open(UH,{portfolio:_e,onSave:async Ce=>{await M(_e.id,Ce)}})}async function M(_e,Ce){v.value=!0;try{await n.updatePortfolio(_e,Ce),window.dispatchEvent(new CustomEvent("portfolio-title-updated",{detail:{portfolioId:_e,newTitle:Ce}})),await re(),e.show("Nome da carteira atualizado.","success")}catch(Re){throw e.show("Erro ao atualizar carteira.","danger"),Re}finally{v.value=!1}}function he(_e){if(r.value.length<=1){e.show("Você não pode arquivar sua única carteira.","warning");return}P.value=null,s.open(D_,{order:_e,onConfirm:async Ce=>{v.value=!0;try{await n.archivePortfolio(Ce.id),await re(),e.show("Carteira arquivada com sucesso.","success")}catch(Re){throw e.show("Erro ao arquivar carteira.","danger"),Re}finally{v.value=!1}}})}function oe(_e){if(_e.status!=="Active"){e.show("Apenas carteiras ativas podem ser públicas.","warning");return}s.open(n9,{portfolio:_e,onConfirm:async()=>{var Re,Ke;const Ce=!_e.is_recommended;v.value=!0;try{await ct.put(`/api/portfolios/${_e.id}`,{is_recommended:Ce}),Ce&&r.value.forEach(Be=>{Be.id!==_e.id&&n.updatePortfolioInAllLocations(Be.id,{is_recommended:0})}),n.updatePortfolioInAllLocations(_e.id,{is_recommended:Ce?1:0}),e.show(Ce?"Carteira agora é pública.":"Carteira agora é privada.","success")}catch(Be){const Te=((Ke=(Re=Be.response)==null?void 0:Re.data)==null?void 0:Ke.message)||"Erro ao atualizar visibilidade da carteira.";throw e.show(Te,"danger"),Be}finally{v.value=!1}}})}function K(_e){h.value=_e}function H(){h.value=null}function Ee(_e){return _e?new Date(_e).toLocaleDateString("pt-BR"):""}return(_e,Ce)=>{var Ke,Be;const Re=ur("PortfolioStats");return $(),L("div",l9,[l("div",u9,[Ce[8]||(Ce[8]=l("h5",{class:"mb-0 text-dark"},null,-1)),l("div",c9,[D.value?xe("",!0):($(),L("button",{key:0,class:"btn btn-sm btn-outline-secondary",onClick:Ce[0]||(Ce[0]=Te=>z(Te)),"data-bs-toggle":"tooltip","data-bs-placement":"left",title:"Ver carteiras arquivadas"},[...Ce[7]||(Ce[7]=[l("i",{class:"bi bi-archive"},null,-1)])])),D.value?xe("",!0):($(),L("button",{key:1,class:"btn btn-sm btn-primary",onClick:Ce[1]||(Ce[1]=Te=>c.value=!c.value),disabled:g.value},[l("i",{class:Me(["bi",c.value?"bi-dash-lg":"bi-plus-lg"])},null,2),Pe(" "+pe(c.value?"Cancelar":"Nova"),1)],8,d9))])]),D.value?($(),L("div",h9,[l("div",f9,[Ce[10]||(Ce[10]=l("span",{class:"input-group-text bg-light"},[l("i",{class:"bi bi-search"})],-1)),_t(l("input",{"onUpdate:modelValue":Ce[2]||(Ce[2]=Te=>y.value=Te),type:"text",class:"form-control",placeholder:"Pesquisar carteiras...",onInput:X},null,544),[[Xs,y.value]]),y.value?($(),L("button",{key:0,class:"btn btn-outline-secondary",type:"button",onClick:ce},[...Ce[9]||(Ce[9]=[l("i",{class:"bi bi-x"},null,-1)])])):xe("",!0)])])):xe("",!0),g.value?($(),L("div",p9,[...Ce[11]||(Ce[11]=[l("div",{class:"spinner-border",role:"status"},[l("span",{class:"visually-hidden"},"Carregando...")],-1),l("p",{class:"text-muted mt-2 small"},"Carregando carteiras...",-1)])])):c.value&&!D.value?($(),L("div",m9,[l("div",g9,[l("div",v9,[Ce[12]||(Ce[12]=l("h6",{class:"card-title mb-3 text-primary"},[l("i",{class:"bi bi-plus-circle me-2"}),Pe("Nova Carteira ")],-1)),l("form",{onSubmit:St(be,["prevent"])},[l("div",b9,[_t(l("input",{"onUpdate:modelValue":Ce[3]||(Ce[3]=Te=>I.value.title=Te),type:"text",class:"form-control form-control-sm",placeholder:"Nome da carteira...",maxlength:"50",required:"",disabled:f.value},null,8,y9),[[Xs,I.value.title]]),l("div",_9,pe(I.value.title.length)+"/50 ",1)]),l("div",x9,[l("button",{type:"submit",class:"btn btn-primary btn-sm flex-fill",disabled:!I.value.title.trim()||f.value},[f.value?($(),L("span",E9)):($(),L("i",S9)),Pe(" "+pe(f.value?"Criando...":"Criar"),1)],8,w9)])],32)])])])):r.value.length>0?($(),L("div",k9,[l("div",C9,[($(!0),L(Ze,null,At(r.value,Te=>{var Q,Se,Ve;return $(),L("div",{key:Te.id,class:Me(["wallet-item",B(Te)]),onClick:Qe=>!D.value&&!te(Te)?J(Te.id):null},[l("div",{class:Me(["selection-indicator",{active:te(Te)}])},[...Ce[13]||(Ce[13]=[l("i",{class:"bi bi-check-lg"},null,-1)])],2),l("div",A9,[l("div",O9,[Ce[15]||(Ce[15]=l("div",{class:"wallet-icon"},[l("i",{class:"bi bi-wallet2"}
49)],-1)),l("div",D9,[l("h6",P9,pe(Te.title),1),l("div",$9,[l("small",I9,pe(C(Te.id)),1),D.value&&Te.user?($(),L("span",M9,[Ce[14]||(Ce[14]=l("i",{class:"bi bi-person me-1"},null,-1)),Pe(" "+pe(Te.user.name),1)])):xe("",!0)]),l("div",N9,[et(Re,{"portfolio-id":Te.id,"auto-refresh":!1,compact:""},null,8,["portfolio-id"])])])])]),l("div",{class:"wallet-actions d-flex align-items-center gap-1",onClick:Ce[5]||(Ce[5]=St(()=>{},["stop"]))},[Te.status==="Active"&&!D.value?($(),L("button",{key:0,class:Me(["btn btn-sm",Te.is_recommended?"btn-primary":"btn-outline-primary"]),onClick:St(Qe=>oe(Te),["stop"]),"data-bs-toggle":"tooltip",title:"Exibir no perfil",style:{width:"28px",height:"28px",padding:"0",display:"flex","align-items":"center","justify-content":"center"},disabled:v.value},[l("i",{class:Me(["bi",Te.is_recommended?"bi-unlock-fill":"bi-lock-fill"])},null,2)],10,L9)):xe("",!0),l("div",R9,[l("button",{class:Me(["btn btn-sm btn-ghost dropdown-toggle",{show:P.value===Te.id}]),onClick:St(Qe=>O(Te.id),["stop"])},[...Ce[16]||(Ce[16]=[l("i",{class:"bi bi-three-dots"},null,-1)])],10,F9),l("div",{class:Me(["dropdown-menu",{show:P.value===Te.id}]),onClick:Ce[4]||(Ce[4]=St(()=>{},["stop"]))},[l("a",{class:"dropdown-item",href:"#",onClick:St(Qe=>Z(Te),["prevent"])},[l("i",{class:Me(["bi",te(Te)?"bi-check-lg":D.value?"bi-eye":"bi-arrow-right"])},null,2),Pe(" "+pe(te(Te)?"Selecionada":D.value?"Visualizar":"Usar esta"),1)],8,V9),Te.user_id===((Q=Ne(i).user)==null?void 0:Q.id)?($(),L("a",{key:0,class:"dropdown-item",href:"#",onClick:St(Qe=>W(Te),["prevent"])},[...Ce[17]||(Ce[17]=[l("i",{class:"bi bi-pencil"},null,-1),Pe(" Editar nome ",-1)])],8,B9)):xe("",!0),Te.user_id===((Se=Ne(i).user)==null?void 0:Se.id)&&r.value.length>1?($(),L("a",{key:1,class:"dropdown-item text-warning",href:"#",onClick:St(Qe=>he(Te),["stop","prevent"])},[...Ce[18]||(Ce[18]=[l("i",{class:"bi bi-archive"},null,-1),Pe(" Arquivar ",-1)])],8,U9)):xe("",!0),D.value&&Te.user_id!==((Ve=Ne(i).user)==null?void 0:Ve.id)?($(),L("a",{key:2,class:"dropdown-item text-info",href:"#",onClick:St(Qe=>K(Te),["prevent"])},[...Ce[19]||(Ce[19]=[l("i",{class:"bi bi-info-circle"},null,-1),Pe(" Detalhes ",-1)])],8,j9)):xe("",!0)],2)])])],10,T9)}),128))])])):($(),L("div",H9,[l("div",W9,[Ce[22]||(Ce[22]=l("i",{class:"bi bi-wallet2 display-4 text-muted opacity-50"},null,-1)),l("h6",z9,pe(y.value?"Nenhuma carteira encontrada":"Nenhuma carteira"),1),l("p",Y9,pe(y.value?"Tente ajustar os termos da pesquisa":D.value?"Os usuários ainda não criaram carteiras":"Crie sua primeira carteira para começar"),1),!D.value&&!y.value?($(),L("button",{key:0,class:"btn btn-primary btn-sm",onClick:Ce[6]||(Ce[6]=Te=>c.value=!0)},[...Ce[20]||(Ce[20]=[l("i",{class:"bi bi-plus-lg me-2"},null,-1),Pe("Criar Primeira ",-1)])])):xe("",!0),y.value?($(),L("button",{key:1,class:"btn btn-outline-secondary btn-sm",onClick:ce},[...Ce[21]||(Ce[21]=[l("i",{class:"bi bi-arrow-left me-2"},null,-1),Pe("Limpar ",-1)])])):xe("",!0)])])),h.value?($(),L("div",{key:5,class:"modal-backdrop show",onClick:H})):xe("",!0),h.value?($(),L("div",q9,[l("div",G9,[l("div",X9,[l("div",{class:"modal-header"},[Ce[23]||(Ce[23]=l("h6",{class:"modal-title"},[l("i",{class:"bi bi-info-circle me-2 text-info"}),Pe(" Detalhes ")],-1)),l("button",{type:"button",class:"btn-close",onClick:H})]),l("div",K9,[l("div",J9,[l("div",Q9,[Ce[24]||(Ce[24]=l("label",null,"Carteira:",-1)),l("span",Z9,pe(h.value.title),1)]),l("div",eW,[Ce[26]||(Ce[26]=l("label",null,"Proprietário:",-1)),l("span",null,[Pe(pe((Ke=h.value.user)==null?void 0:Ke.name),1),Ce[25]||(Ce[25]=l("br",null,null,-1)),l("small",tW,pe((Be=h.value.user)==null?void 0:Be.email),1)])]),l("div",sW,[Ce[27]||(Ce[27]=l("label",null,"Status:",-1)),l("span",{class:Me(h.value.active==="Yes"?"text-success":"text-muted")},pe(h.value.active==="Yes"?"Ativa":"Inativa"),3)]),l("div",nW,[Ce[28]||(Ce[28]=l("label",null,"Criada em:",-1)),l("span",null,pe(Ee(h.value.created_at)),1)])])]),l("div",{class:"modal-footer"},[l("button",{type:"button",class:"btn btn-outline-secondary btn-sm",onClick:H}," Fechar ")])])])])):xe("",!0)])}}},UO=ls(iW,[["__scopeId","data-v-555cc1db"]]);function Of(){const t=pi(),e=tn(),s=Ae(()=>t.getCurrentPortfolioId()),n=Ae(()=>t.getCurrentPortfolio()),i=Ae(()=>t.isAdminView()),o=Ae(()=>{const c=n.value;return!c||!e.user?!1:c.user_id===e.user.id}),r=Ae(()=>{const c=s.value;return c?{"X-Portfolio-ID":c,"X-Is-Admin-View":i.value}:{}});return{currentPortfolioId:s,currentPortfolio:n,isAdminView:i,isPortfolioOwner:o,portfolioHeader:r}}var rW=typeof global=="object"&&global&&global.Object===Object&&global,aW=typeof self=="object"&&self&&self.Object===Object&&self,jO=rW||aW||Function("return this")(),og=jO.Symbol,HO=Object.prototype,oW=HO.hasOwnProperty,lW=HO.toString,oh=og?og.toStringTag:void 0;function uW(t){var e=oW.call(t,oh),s=t[oh];try{t[oh]=void 0;var n=!0}catch{}var i=lW.call(t);return n&&(e?t[oh]=s:delete t[oh]),i}var cW=Object.prototype,dW=cW.toString;function hW(t){return dW.call(t)}
49var fW="[object Null]",pW="[object Undefined]",vk=og?og.toStringTag:void 0;function mW(t){return t==null?t===void 0?pW:fW:vk&&vk in Object(t)?uW(t):hW(t)}function gW(t){return t!=null&&typeof t=="object"}var vW="[object Symbol]";function bW(t){return typeof t=="symbol"||gW(t)&&mW(t)==vW}var yW=/\s/;function _W(t){for(var e=t.length;e--&&yW.test(t.charAt(e)););return e}var xW=/^\s+/;function wW(t){return t&&t.slice(0,_W(t)+1).replace(xW,"")}function a1(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}var bk=NaN,EW=/^[-+]0x[0-9a-f]+$/i,SW=/^0b[01]+$/i,kW=/^0o[0-7]+$/i,CW=parseInt;function yk(t){if(typeof t=="number")return t;if(bW(t))return bk;if(a1(t)){var e=typeof t.valueOf=="function"?t.valueOf():t;t=a1(e)?e+"":e}if(typeof t!="string")return t===0?t:+t;t=wW(t);var s=SW.test(t);return s||kW.test(t)?CW(t.slice(2),s?2:8):EW.test(t)?bk:+t}var My=function(){return jO.Date.now()},TW="Expected a function",AW=Math.max,OW=Math.min;function DW(t,e,s){var n,i,o,r,c,h,f=0,v=!1,g=!1,y=!0;if(typeof t!="function")throw new TypeError(TW);e=yk(e)||0,a1(s)&&(v=!!s.leading,g="maxWait"in s,o=g?AW(yk(s.maxWait)||0,e):o,y="trailing"in s?!!s.trailing:y);function x(j){var te=n,B=i;return n=i=void 0,f=j,r=t.apply(B,te),r}function E(j){return f=j,c=setTimeout(D,e),v?x(j):r}function P(j){var te=j-h,B=j-f,z=e-te;return g?OW(z,o-B):z}function I(j){var te=j-h,B=j-f;return h===void 0||te>=e||te<0||g&&B>=o}function D(){var j=My();if(I(j))return F(j);c=setTimeout(D,P(j))}function F(j){return c=void 0,y&&n?x(j):(n=i=void 0,r)}function C(){c!==void 0&&clearTimeout(c),f=0,n=h=i=c=void 0}function A(){return c===void 0?r:F(My())}function O(){var j=My(),te=I(j);if(n=arguments,i=this,h=j,te){if(c===void 0)return E(h);if(g)return clearTimeout(c),c=setTimeout(D,e),x(h)}return c===void 0&&(c=setTimeout(D,e)),r}return O.cancel=C,O.flush=A,O}const PW={class:"asset-search-container position-relative"},$W={class:"form-floating"},IW=["placeholder","onKeydown","disabled"],MW={key:0,class:"dropdown-menu show w-100 position-absolute mt-1 custom-scroll shadow-sm border-0",style:{"z-index":"1060","max-height":"320px","overflow-y":"auto"}},NW={key:0,class:"dropdown-item text-center text-muted py-3 disabled-item"},LW=["onMousedown","onMouseenter"],RW={class:"d-flex align-items-center w-100 py-1"},FW={class:"asset-icon-wrapper me-3"},VW=["src","onError"],BW={class:"asset-info flex-grow-1"},UW={class:"d-flex flex-column"},jW={class:"asset-code text-dark text-uppercase"},HW={class:"asset-category text-muted"},WW={key:0,class:"badge bg-primary text-white",style:{"font-size":"0.7rem",padding:"0.2rem 0.4rem",width:"fit-content"}},zW={key:0,class:"asset-market text-end ms-3 flex-shrink-0"},YW={class:"asset-price fw-bold text-dark"},qW={key:2,class:"dropdown-item text-center text-muted py-3 disabled-item"},GW={key:0},XW={key:1},KW={key:2},JW={key:2,class:"invalid-feedback d-block"},QW={__name:"AssetSearch",props:{label:{type:String,default:"Ativo *"},error:{type:String,default:""},selectedCategory:{type:Object,default:null},prefilledAsset:{type:Object,default:null},isAssetLocked:{type:Boolean,default:!1}},emits:["asset-selected","search-change"],setup(t,{expose:e,emit:s}){const n=t,i=s,o=ve(""),r=ve(!1),c=ve(-1),h=ve(null),f=ve([]),v=ve(!1),g=ve(!1),y=ve({}),x=ve(""),E=ve(!1),P=Ae(()=>{var he;const M=(he=n.selectedCategory)==null?void 0:he.slug;return["renda-fixa","tesouro","tesouro-direto","cdb","lci-lca"].includes(M)});Ae(()=>{var he;const M=(he=n.selectedCategory)==null?void 0:he.slug;return["outros","tesouro","renda-fixa"].includes(M)});const I=Ae(()=>{var M;return((M=n.selectedCategory)==null?void 0:M.slug)==="outros"&&o.value.length>=2&&!v.value&&f.value.length===0&&!g.value}),D=Ae(()=>f.value),F=async()=>{var M;if(!(!P.value||!((M=n.selectedCategory)!=null&&M.id))){v.value=!0,r.value=!0;try{const he=await ct.get("/api/assets/search",{params:{category_id:n.selectedCategory.id,q:""}});he.data.success&&(f.value=he.data.data,c.value=-1,E.value=!0)}catch(he){console.error("Erro ao carregar ativos de renda fixa:",he),f.value=[]}finally{v.value=!1}}},C=async M=>{const he=M.target.value,oe=he.toUpperCase();
49if(i("search-change",oe),o.value=oe,he!==oe&&(M.target.value=oe),P.value&&oe.length===0){await F();return}oe.length>=2?g.value||x.value!==oe&&(r.value=!0,v.value=!0,y.value={},await A()):(r.value=!1,v.value=!1,f.value=[],x.value="",oe.length===0&&(g.value=!1))},A=DW(async()=>{o.value.length>=2&&x.value!==o.value?(x.value=o.value,await O()):v.value=!1},400),O=async()=>{var M;try{const he={q:o.value,category_id:(M=n.selectedCategory)==null?void 0:M.id},oe=await ct.get("/api/assets/search",{params:he});oe.data.success?(f.value=oe.data.data,c.value=-1):f.value=[]}catch(he){console.error("Erro na busca de ativos:",he),f.value=[]}finally{v.value=!1}},j=()=>{P.value&&!E.value?F():!g.value&&o.value.length>=2&&f.value.length===0?(r.value=!0,v.value=!0,A()):!g.value&&f.value.length>0&&(r.value=!0)},te=()=>{setTimeout(()=>{r.value=!1},200)},B=M=>{!r.value||f.value.length===0||(c.value+=M,c.value<0?c.value=f.value.length-1:c.value>=f.value.length&&(c.value=0),vs(()=>{const he=document.querySelector(".dropdown-item.active");he&&he.scrollIntoView({block:"nearest"})}))},z=()=>{c.value>=0&&c.value<f.value.length?re(f.value[c.value]):f.value.length>0?re(f.value[0]):I.value&&ne()},re=M=>{o.value=M.code,r.value=!1,c.value=-1,f.value=[],g.value=!0;const he={...M,current_price:Number(M.current_price||0),price_change_percent:Number(M.price_change_percent||0)};i("asset-selected",he)},ne=()=>{var he;if(((he=n.selectedCategory)==null?void 0:he.slug)!=="outros"||o.value.length<2)return;const M={id:null,code:o.value,name:o.value,category:n.selectedCategory,current_price:0,price_change_percent:0};i("asset-selected",M),o.value=M.code,r.value=!1,g.value=!0,f.value=[]},X=M=>{if(!(M!=null&&M.logo_url))return!1;const he=M.logo_url.toLowerCase();return!(he.includes("brapi.svg")||he==="null"||he==="")},G=M=>{if(!M)return"";if(M.startsWith("http"))return M;const he=M.startsWith("/")?M.substring(1):M;return he.startsWith("storage/")?`/${he}`:`/storage/${he}`},ce=M=>{y.value[M]=!0},be=M=>{if(!M)return"??";const he=M.replace(/[^A-Za-z]/g,"");return(he.length>0?he:M).substring(0,2).toUpperCase()},J=M=>{var he;return((he=M.category)==null?void 0:he.color)||"#6c757d"},Z=M=>{if(M==null)return"R$ --";const he=Number(M),oe=he>0&&he<1;return new Intl.NumberFormat("pt-BR",{style:"currency",currency:"BRL",minimumFractionDigits:oe?4:2,maximumFractionDigits:oe?8:2}).format(he)},ge=M=>M==null?"":`${M>0?"+":""}${Number(M).toFixed(2)}%`,q=M=>M>.001?"text-success":M<-.001?"text-danger":"text-muted";Pt(()=>n.prefilledAsset,M=>{M?(g.value=!0,o.value=M.code,f.value=[],r.value=!1,vs(()=>i("asset-selected",M))):(g.value=!1,o.value===(M==null?void 0:M.code)&&(o.value=""))},{immediate:!0}),Pt(()=>n.isAssetLocked,M=>{M||(g.value=!1,o.value="",f.value=[],r.value=!1,x.value="",E.value=!1,vs(()=>{var he;return(he=h.value)==null?void 0:he.focus()}))}),Pt(()=>n.selectedCategory,(M,he)=>{(M==null?void 0:M.id)!==(he==null?void 0:he.id)&&(W(),P.value&&vs(()=>{F()}))}),Xt(()=>{vs(()=>{h.value&&!n.prefilledAsset&&h.value.focus(),P.value&&n.selectedCategory&&F()})});const W=()=>{o.value="",f.value=[],r.value=!1,g.value=!1,c.value=-1,x.value="",E.value=!1,vs(()=>{var M;return(M=h.value)==null?void 0:M.focus()})};return e({focus:()=>{var M;return(M=h.value)==null?void 0:M.focus()},clear:W}),(M,he)=>($(),L("div",PW,[l("div",$W,[_t(l("input",{ref_key:"searchInput",ref:h,"onUpdate:modelValue":he[0]||(he[0]=oe=>o.value=oe),type:"text",class:Me(["form-control text-uppercase fw-bold",{"is-invalid":t.error}]),placeholder:t.label,onInput:C,onFocus:j,onBlur:te,onKeydown:[he[1]||(he[1]=es(St(oe=>B(1),["prevent"]),["down"])),he[2]||(he[2]=es(St(oe=>B(-1),["prevent"]),["up"])),es(St(z,["prevent"]),["enter"])],autocomplete:"off",disabled:t.isAssetLocked},null,42,IW),[[Xs,o.value]]),l("label",null,pe(t.label),1)]),r.value&&!I.value?($(),L("div",MW,[v.value?($(),L("div",NW,[...he[4]||(he[4]=[l("div",{class:"spinner-border spinner-border-sm me-2 text-primary",role:"status"},null,-1),l("small",null,"Pesquisando ativo...",-1)])])):D.value.length>0?($(!0),L(Ze,{key:1},At(D.value,(oe,K)=>{var H;return $(),L("div",{key:oe.id,class:Me(["dropdown-item p-2 border-bottom cursor-pointer",{active:c.value===K}]),onMousedown:St(Ee=>re(oe),["prevent"]),onMouseenter:Ee=>c.value=K},[l("div",RW,[l("div",FW,[X(oe)&&!y.value[oe.id]?($(),L("img",{key:0,src:G(oe.logo_url),class:"asset-img",onError:Ee=>ce(oe.id)},null,40,VW)):($(),L("div",{key:1,class:"fallback-icon",style:zs({backgroundColor:J(oe)}
49)},pe(be(oe.code)),5))]),l("div",BW,[l("div",UW,[l("strong",jW,pe(oe.code),1),l("span",HW,pe(((H=oe.category)==null?void 0:H.name)||"Sem Categoria"),1),oe.user_id?($(),L("span",WW," Particular ")):xe("",!0)])]),P.value?xe("",!0):($(),L("div",zW,[l("div",YW,pe(Z(oe.current_price)),1),oe.price_change_percent!==null?($(),L("div",{key:0,class:Me(["asset-variation fw-semibold",q(oe.price_change_percent)])},pe(ge(oe.price_change_percent)),3)):xe("",!0)]))])],42,LW)}),128)):($(),L("div",qW,[o.value.length>=2?($(),L("small",GW,"Nenhum ativo encontrado.")):P.value?($(),L("small",KW,"Nenhum ativo de renda fixa encontrado.")):($(),L("small",XW,"Digite ao menos 2 caracteres..."))]))])):xe("",!0),r.value?($(),L("div",{key:1,class:"position-fixed",style:{top:"0",left:"0",width:"100vw",height:"100vh","z-index":"1050",cursor:"default"},onMousedown:he[3]||(he[3]=oe=>r.value=!1)},null,32)):xe("",!0),t.error?($(),L("div",JW,pe(t.error),1)):xe("",!0)]))}},P_=ls(QW,[["__scopeId","data-v-06ae8cd4"]]),ZW={class:"container-fluid"},ez={class:"row g-3"},tz={class:"col-12"},sz={class:"input-group input-group-floating"},nz={class:"form-floating flex-fill"},iz={key:0,class:"invalid-feedback d-block"},rz={class:"col-12"},az={class:"input-group input-group-floating"},oz={class:"form-floating flex-fill"},lz={key:0,class:"invalid-feedback d-block"},uz={class:"col-12"},cz={class:"input-group input-group-floating"},dz={class:"form-floating flex-fill"},hz={key:0,class:"invalid-feedback d-block"},fz={class:"d-flex justify-content-between w-100"},pz=["disabled"],mz={key:0,class:"spinner-border spinner-border-sm me-2"},gz={key:1},vz={__name:"BrokerModal",props:{onSaved:{type:Function,default:()=>{}},parentState:{type:Object,default:null},active:{type:Boolean,default:!0}},setup(t){const e=Yn();Of();const s=ve(null),n=t,i=en({name:"",document:"",website:""}),o=en({}),r=ve(!1),c=Ae(()=>i.name.trim().length>0);Xt(()=>{vs(()=>{s.value&&s.value.focus()})});function h(){e.close()}async function f(){var y,x,E,P;if(v()){r.value=!0;try{const I=await ct.post("/api/brokers",{name:i.name.trim(),document:i.document||null,website:i.website||null});if(I.data.success){const D=I.data.data;typeof n.onSaved=="function"&&n.onSaved(D),h()}else throw new Error(I.data.message||"Erro ao salvar corretora")}catch(I){console.error("â Erro ao salvar corretora:",I),(x=(y=I.response)==null?void 0:y.data)!=null&&x.errors?Object.keys(I.response.data.errors).forEach(D=>{o[D]=I.response.data.errors[D][0]}):o.general=((P=(E=I.response)==null?void 0:E.data)==null?void 0:P.message)||"Erro ao salvar corretora"}finally{r.value=!1}}}function v(){Object.keys(o).forEach(x=>delete o[x]);let y=!0;return i.name.trim()?i.name.trim().length<2&&(o.name="Nome deve ter pelo menos 2 caracteres",y=!1):(o.name="Nome da corretora é obrigatório",y=!1),i.website&&!g(i.website)&&(o.website="URL do website é inválida",y=!1),y}function g(y){try{return new URL(y),!0}catch{return!1}}return(y,x)=>{const E=yd("mask");return $(),Ut(Ha,{"model-value":!0,active:t.active,title:"Nova Corretora",size:"modal-md","onUpdate:modelValue":h},{footer:vt(()=>[l("div",fz,[l("button",{type:"button",class:"btn btn-secondary",onClick:h},[...x[9]||(x[9]=[l("i",{class:"bi bi-x-circle"},null,-1),Pe(" Cancelar ",-1)])]),l("button",{type:"button",class:"btn btn-primary",disabled:!c.value||r.value,onClick:f},[x[10]||(x[10]=l("i",{class:"bi bi-check-circle me-2"},null,-1)),r.value?($(),L("span",mz)):($(),L("span",gz,"Salvar Corretora"))],8,pz)])]),default:vt(()=>[l("div",ZW,[l("div",ez,[l("div",tz,[l("div",sz,[x[4]||(x[4]=l("span",{class:"input-group-text"},[l("i",{class:"bi bi-building"})],-1)),l("div",nz,[_t(l("input",{"onUpdate:modelValue":x[0]||(x[0]=P=>i.name=P),type:"text",class:Me(["form-control",{"is-invalid":o.name}]),id:"brokerName",placeholder:"Nome da Corretora",ref_key:"nameInput",ref:s},null,2),[[Xs,i.name]]),x[3]||(x[3]=l("label",{for:"brokerName"},"Nome da Corretora",-1))])]),o.name?($(),L("div",iz,pe(o.name),1)):xe("",!0)]),l("div",rz,[l("div",az,[x[6]||(x[6]=l("span",{class:"input-group-text"},[l("i",{class:"bi bi-card-text"})],-1)),l("div",oz,[_t(l("input",{"onUpdate:modelValue":x[1]||(x[1]=P=>i.document=P),type:"text",class:Me(["form-control",{"is-invalid":o.document}]),id:"brokerDocument",placeholder:"CNPJ (opcional)"},null,2),[[Xs,i.document],[E,"00.000.000/0000-00"]]),x[5]||(x[5]=l("label",{for:"brokerDocument"},"CNPJ (opcional)",-1))])]),o.document?($(),L("div",lz,pe(o.document),1)):xe("",!0)]),l("div",uz,[l("div",cz,[x[8]||(x[8]=l("span",{class:"input-group-text"},[l("i",{class:"bi bi-globe"})],-1)),l("div",dz,[_t(l("input",{"onUpdate:modelValue":x[2]||(x[2]=P=>i.website=P),type:"url",class:Me(["form-control",{"is-invalid":o.website}
49]),id:"brokerWebsite",placeholder:"Website (opcional)"},null,2),[[Xs,i.website]]),x[7]||(x[7]=l("label",{for:"brokerWebsite"},"Website (opcional)",-1))])]),o.website?($(),L("div",hz,pe(o.website),1)):xe("",!0)])])])]),_:1},8,["active"])}}},bz=["id","placeholder","value","disabled"],yz=["for"],Ms={__name:"CurrencyInput",props:{modelValue:{type:[Number,String],default:0},id:{type:String,required:!0},label:{type:String,default:"Valor"},placeholder:{type:String,default:" "},invalid:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},precision:{type:Number,default:2},showSymbol:{type:Boolean,default:!0},floating:{type:Boolean,default:!0}},emits:["update:modelValue"],setup(t,{emit:e}){const s=t,n=e,i=ve(null),o=ve(!1);function r(g){const y=Number(g||0),x={minimumFractionDigits:s.precision,maximumFractionDigits:s.precision};return s.showSymbol?(x.style="currency",x.currency="BRL",new Intl.NumberFormat("pt-BR",x).format(y)):(x.style="decimal",new Intl.NumberFormat("pt-BR",x).format(y))}const c=Ae(()=>r(s.modelValue));function h(g){let y=g.target.value.replace(/\D/g,"");y||(y="0"),y=y.replace(/^0+/,"")||"0";const x=Math.pow(10,s.precision),E=parseFloat(y)/x;n("update:modelValue",E),g.target.value=r(E)}function f(g){o.value=!0,vs(()=>g.target.select())}function v(){o.value=!1,n("update:modelValue",s.modelValue)}return Pt(()=>s.modelValue,g=>{i.value&&!o.value&&(i.value.value=r(g||0))}),(g,y)=>($(),L("div",{class:Me({"form-floating flex-fill":t.floating})},[l("input",{ref_key:"inputRef",ref:i,type:"text",class:Me(["form-control text-end",{"is-invalid":t.invalid,"form-control-sm":!t.floating}]),id:t.id,placeholder:t.placeholder,value:c.value,onInput:h,onBlur:v,onFocus:f,disabled:t.disabled,inputmode:"numeric"},null,42,bz),t.floating?($(),L("label",{key:0,for:t.id},pe(t.label),9,yz)):xe("",!0)],2))}};function Wr(t){"@babel/helpers - typeof";return Wr=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Wr(t)}function ns(t){if(t===null||t===!0||t===!1)return NaN;var e=Number(t);return isNaN(e)?e:e<0?Math.ceil(e):Math.floor(e)}function qt(t,e){if(e.length<t)throw new TypeError(t+" argument"+(t>1?"s":"")+" required, but only "+e.length+" present")}function rs(t){qt(1,arguments);var e=Object.prototype.toString.call(t);return t instanceof Date||Wr(t)==="object"&&e==="[object Date]"?new Date(t.getTime()):typeof t=="number"||e==="[object Number]"?new Date(t):((typeof t=="string"||e==="[object String]")&&typeof console<"u"&&(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"),console.warn(new Error().stack)),new Date(NaN))}function ho(t,e){qt(2,arguments);var s=rs(t),n=ns(e);return isNaN(n)?new Date(NaN):(n&&s.setDate(s.getDate()+n),s)}function Ma(t,e){qt(2,arguments);var s=rs(t),n=ns(e);if(isNaN(n))return new Date(NaN);if(!n)return s;var i=s.getDate(),o=new Date(s.getTime());o.setMonth(s.getMonth()+n+1,0);var r=o.getDate();return i>=r?o:(s.setFullYear(o.getFullYear(),o.getMonth(),i),s)}function WO(t,e){if(qt(2,arguments),!e||Wr(e)!=="object")return new Date(NaN);var s=e.years?ns(e.years):0,n=e.months?ns(e.months):0,i=e.weeks?ns(e.weeks):0,o=e.days?ns(e.days):0,r=e.hours?ns(e.hours):0,c=e.minutes?ns(e.minutes):0,h=e.seconds?ns(e.seconds):0,f=rs(t),v=n||s?Ma(f,n+s*12):f,g=o||i?ho(v,o+i*7):v,y=c+r*60,x=h+y*60,E=x*1e3,P=new Date(g.getTime()+E);return P}function _z(t,e){qt(2,arguments);var s=rs(t).getTime(),n=ns(e);return new Date(s+n)}var xz={};function Wa(){return xz}function Mu(t,e){var s,n,i,o,r,c,h,f;qt(1,arguments);var v=Wa(),g=ns((s=(n=(i=(o=e==null?void 0:e.weekStartsOn)!==null&&o!==void 0?o:e==null||(r=e.locale)===null||r===void 0||(c=r.options)===null||c===void 0?void 0:c.weekStartsOn)!==null&&i!==void 0?i:v.weekStartsOn)!==null&&n!==void 0?n:(h=v.locale)===null||h===void 0||(f=h.options)===null||f===void 0?void 0:f.weekStartsOn)!==null&&s!==void 0?s:0);if(!(g>=0&&g<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var y=rs(t),x=y.getDay(),E=(x<g?7:0)+x-g;return y.setDate(y.getDate()-E),y.setHours(0,0,0,0),y}function lg(t){return qt(1,arguments),Mu(t,{weekStartsOn:1}
vendor: 14,336 bytes, line 49
49)}function wz(t){qt(1,arguments);var e=rs(t),s=e.getFullYear(),n=new Date(0);n.setFullYear(s+1,0,4),n.setHours(0,0,0,0);var i=lg(n),o=new Date(0);o.setFullYear(s,0,4),o.setHours(0,0,0,0);var r=lg(o);return e.getTime()>=i.getTime()?s+1:e.getTime()>=r.getTime()?s:s-1}function Ez(t){qt(1,arguments);var e=wz(t),s=new Date(0);s.setFullYear(e,0,4),s.setHours(0,0,0,0);var n=lg(s);return n}function ug(t){var e=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return e.setUTCFullYear(t.getFullYear()),t.getTime()-e.getTime()}function _k(t){qt(1,arguments);var e=rs(t);return e.setHours(0,0,0,0),e}var Sz=864e5;function kz(t,e){qt(2,arguments);var s=_k(t),n=_k(e),i=s.getTime()-ug(s),o=n.getTime()-ug(n);return Math.round((i-o)/Sz)}function zO(t,e){qt(2,arguments);var s=ns(e);return Ma(t,s*12)}var $_=6e4,I_=36e5,Cz=1e3;function YO(t){return qt(1,arguments),t instanceof Date||Wr(t)==="object"&&Object.prototype.toString.call(t)==="[object Date]"}function $h(t){if(qt(1,arguments),!YO(t)&&typeof t!="number")return!1;var e=rs(t);return!isNaN(Number(e))}function xk(t,e){var s;qt(1,arguments);var n=t||{},i=rs(n.start),o=rs(n.end),r=o.getTime();if(!(i.getTime()<=r))throw new RangeError("Invalid interval");var c=[],h=i;h.setHours(0,0,0,0);var f=Number((s=void 0)!==null&&s!==void 0?s:1);if(f<1||isNaN(f))throw new RangeError("`options.step` must be a number greater than 1");for(;h.getTime()<=r;)c.push(rs(h)),h.setDate(h.getDate()+f),h.setHours(0,0,0,0);return c}function Tz(t,e){var s,n,i,o,r,c,h,f;qt(1,arguments);var v=Wa(),g=ns((s=(n=(i=(o=e==null?void 0:e.weekStartsOn)!==null&&o!==void 0?o:e==null||(r=e.locale)===null||r===void 0||(c=r.options)===null||c===void 0?void 0:c.weekStartsOn)!==null&&i!==void 0?i:v.weekStartsOn)!==null&&n!==void 0?n:(h=v.locale)===null||h===void 0||(f=h.options)===null||f===void 0?void 0:f.weekStartsOn)!==null&&s!==void 0?s:0);if(!(g>=0&&g<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var y=rs(t),x=y.getDay(),E=(x<g?-7:0)+6-(x-g);return y.setDate(y.getDate()+E),y.setHours(23,59,59,999),y}function qO(t,e){qt(2,arguments);var s=ns(e);return _z(t,-s)}var Az=864e5;function Oz(t){qt(1,arguments);var e=rs(t),s=e.getTime();e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0);var n=e.getTime(),i=s-n;return Math.floor(i/Az)+1}function sd(t){qt(1,arguments);var e=1,s=rs(t),n=s.getUTCDay(),i=(n<e?7:0)+n-e;return s.setUTCDate(s.getUTCDate()-i),s.setUTCHours(0,0,0,0),s}function GO(t){qt(1,arguments);var e=rs(t),s=e.getUTCFullYear(),n=new Date(0);n.setUTCFullYear(s+1,0,4),n.setUTCHours(0,0,0,0);var i=sd(n),o=new Date(0);o.setUTCFullYear(s,0,4),o.setUTCHours(0,0,0,0);var r=sd(o);return e.getTime()>=i.getTime()?s+1:e.getTime()>=r.getTime()?s:s-1}function Dz(t){qt(1,arguments);var e=GO(t),s=new Date(0);s.setUTCFullYear(e,0,4),s.setUTCHours(0,0,0,0);var n=sd(s);return n}var Pz=6048e5;function XO(t){qt(1,arguments);var e=rs(t),s=sd(e).getTime()-Dz(e).getTime();return Math.round(s/Pz)+1}function Nu(t,e){var s,n,i,o,r,c,h,f;qt(1,arguments);var v=Wa(),g=ns((s=(n=(i=(o=e==null?void 0:e.weekStartsOn)!==null&&o!==void 0?o:e==null||(r=e.locale)===null||r===void 0||(c=r.options)===null||c===void 0?void 0:c.weekStartsOn)!==null&&i!==void 0?i:v.weekStartsOn)!==null&&n!==void 0?n:(h=v.locale)===null||h===void 0||(f=h.options)===null||f===void 0?void 0:f.weekStartsOn)!==null&&s!==void 0?s:0);if(!(g>=0&&g<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var y=rs(t),x=y.getUTCDay(),E=(x<g?7:0)+x-g;return y.setUTCDate(y.getUTCDate()-E),y.setUTCHours(0,0,0,0),y}function M_(t,e){var s,n,i,o,r,c,h,f;qt(1,arguments);var v=rs(t),g=v.getUTCFullYear(),y=Wa(),x=ns((s=(n=(i=(o=e==null?void 0:e.firstWeekContainsDate)!==null&&o!==void 0?o:e==null||(r=e.locale)===null||r===void 0||(c=r.options)===null||c===void 0?void 0:c.firstWeekContainsDate)!==null&&i!==void 0?i:y.firstWeekContainsDate)!==null&&n!==void 0?n:(h=y.locale)===null||h===void 0||(f=h.options)===null||f===void 0?void 0:f.firstWeekContainsDate)!==null&&s!==void 0?s:1);if(!(x>=1&&x<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var E=new Date(0);E.setUTCFullYear(g+1,0,x),E.setUTCHours(0,0,0,0);var P=Nu(E,e),I=new Date(0);I.setUTCFullYear(g,0,x),I.setUTCHours(0,0,0,0);var D=Nu(I,e);return v.getTime()>=P.getTime()?g+1:v.getTime()>=D.getTime()?g:g-1}function $z(t,e){var s,n,i,o,r,c,h,f;qt(1,arguments);var v=Wa(),g=ns((s=(n=(i=(o=e==null?void 0:e.firstWeekContainsDate)!==null&&o!==void 0?o:e==null||(r=e.locale)===null||r===void 0||(c=r.options)===null||c===void 0?void 0:c.firstWeekContainsDate)!==null&&i!==void 0?i:v.firstWeekContainsDate)!==null&&n!==void 0?n:(h=v.locale)===null||h===void 0||(f=h.options)===null||f===void 0?void 0:f.firstWeekContainsDate)!==null&&s!==void 0?s:1),y=M_(t,e),x=new Date(0);x.setUTCFullYear(y,0,g),x.setUTCHours(0,0,0,0);var E=Nu(x,e);return E}var Iz=6048e5;function KO(t,e){qt(1,arguments);var s=rs(t),n=Nu(s,e).getTime()-$z(s,e).getTime();return Math.round(n/Iz)+1}function Ks(t,e){for(var s=t<0?"-":"",n=Math.abs(t).toString();n.length<e;)n="0"+n;return s+n}var el={y:function(e,s){var n=e.getUTCFullYear(),i=n>0?n:1-n;return Ks(s==="yy"?i%100:i,s.length)},M:function(e,s){var n=e.getUTCMonth();return s==="M"?String(n+1):Ks(n+1,2)},d:function(e,s){return Ks(e.getUTCDate(),s.length)},a:function(e,s){var n=e.getUTCHours()/12>=1?"pm":"am";switch(s){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];case"aaaa":default:return n==="am"?"a.m.":"p.m."}},h:function(e,s){return Ks(e.getUTCHours()%12||12,s.length)},H:function(e,s){return Ks(e.getUTCHours(),s.length)},m:function(e,s){return Ks(e.getUTCMinutes(),s.length)},s:function(e,s){return Ks(e.getUTCSeconds(),s.length)},S:function(e,s){var n=s.length,i=e.getUTCMilliseconds(),o=Math.floor(i*Math.pow(10,n-3));return Ks(o,s.length)}},_c={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},Mz={G:function(e,s,n){var i=e.getUTCFullYear()>0?1:0;switch(s){case"G":case"GG":case"GGG":return n.era(i,{width:"abbreviated"});case"GGGGG":return n.era(i,{width:"narrow"});case"GGGG":default:return n.era(i,{width:"wide"})}},y:function(e,s,n){if(s==="yo"){var i=e.getUTCFullYear(),o=i>0?i:1-i;return n.ordinalNumber(o,{unit:"year"})}return el.y(e,s)},Y:function(e,s,n,i){var o=M_(e,i),r=o>0?o:1-o;if(s==="YY"){var c=r%100;return Ks(c,2)}return s==="Yo"?n.ordinalNumber(r,{unit:"year"}):Ks(r,s.length)},R:function(e,s){var n=GO(e);return Ks(n,s.length)},u:function(e,s){var n=e.getUTCFullYear();return Ks(n,s.length)},Q:function(e,s,n){var i=Math.ceil((e.getUTCMonth()+1)/3);switch(s){case"Q":return String(i);case"QQ":return Ks(i,2);case"Qo":return n.ordinalNumber(i,{unit:"quarter"});case"QQQ":return n.quarter(i,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(i,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(i,{width:"wide",context:"formatting"})}},q:function(e,s,n){var i=Math.ceil((e.getUTCMonth()+1)/3);switch(s){case"q":return String(i);case"qq":return Ks(i,2);case"qo":return n.ordinalNumber(i,{unit:"quarter"});case"qqq":return n.quarter(i,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(i,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(i,{width:"wide",context:"standalone"})}},M:function(e,s,n){var i=e.getUTCMonth();switch(s){case"M":case"MM":return el.M(e,s);case"Mo":return n.ordinalNumber(i+1,{unit:"month"});case"MMM":return n.month(i,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(i,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(i,{width:"wide",context:"formatting"})}},L:function(e,s,n){var i=e.getUTCMonth();switch(s){case"L":return String(i+1);case"LL":return Ks(i+1,2);case"Lo":return n.ordinalNumber(i+1,{unit:"month"});case"LLL":return n.month(i,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(i,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(i,{width:"wide",context:"standalone"})}},w:function(e,s,n,i){var o=KO(e,i);return s==="wo"?n.ordinalNumber(o,{unit:"week"}):Ks(o,s.length)},I:function(e,s,n){var i=XO(e);return s==="Io"?n.ordinalNumber(i,{unit:"week"}):Ks(i,s.length)},d:function(e,s,n){return s==="do"?n.ordinalNumber(e.getUTCDate(),{unit:"date"}):el.d(e,s)},D:function(e,s,n){var i=Oz(e);return s==="Do"?n.ordinalNumber(i,{unit:"dayOfYear"}):Ks(i,s.length)},E:function(e,s,n){var i=e.getUTCDay();switch(s){case"E":case"EE":case"EEE":return n.day(i,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(i,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(i,{width:"short",context:"formatting"});case"EEEE":default:return n.day(i,{width:"wide",context:"formatting"})}},e:function(e,s,n,i){var o=e.getUTCDay(),r=(o-i.weekStartsOn+8)%7||7;switch(s){case"e":return String(r);case"ee":return Ks(r,2);case"eo":return n.ordinalNumber(r,{unit:"day"});case"eee":return n.day(o,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(o,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(o,{width:"short",context:"formatting"});case"eeee":default:return n.day(o,{width:"wide",context:"formatting"})}},c:function(e,s,n,i){var o=e.getUTCDay(),r=(o-i.weekStartsOn+8)%7||7;switch(s){case"c":return String(r);case"cc":return Ks(r,s.length);case"co":return n.ordinalNumber(r,{unit:"day"});case"ccc":return n.day(o,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(o,{width:"narrow",context:"standalone"});case"cccccc":return n.day(o,{width:"short",context:"standalone"});case"cccc":default:return n.day(o,{width:"wide",context:"standalone"})}},i:function(e,s,n){var i=e.getUTCDay(),o=i===0?7:i;switch(s){case"i":return String(o);case"ii":return Ks(o,s.length);case"io":return n.ordinalNumber(o,{unit:"day"});case"iii":return n.day(i,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(i,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(i,{width:"short",context:"formatting"});case"iiii":default:return n.day(i,{width:"wide",context:"formatting"})}},a:function(e,s,n){var i=e.getUTCHours(),o=i/12>=1?"pm":"am";switch(s){case"a":case"aa":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(o,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},b:function(e,s,n){var i=e.getUTCHours(),o;switch(i===12?o=_c.noon:i===0?o=_c.midnight:o=i/12>=1?"pm":"am",s){case"b":case"bb":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(o,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},B:function(e,s,n){var i=e.getUTCHours(),o;switch(i>=17?o=_c.evening:i>=12?o=_c.afternoon:i>=4?o=_c.morning:o=_c.night,s){case"B":case"BB":case"BBB":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(o,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},h:function(e,s,n){if(s==="ho"){var i=e.getUTCHours()%12;return i===0&&(i=12),n.ordinalNumber(i,{unit:"hour"})}return el.h(e,s)},H:function(e,s,n){return s==="Ho"?n.ordinalNumber(e.getUTCHours(),{unit:"hour"}):el.H(e,s)},K:function(e,s,n){var i=e.getUTCHours()%12;return s==="Ko"?n.ordinalNumber(i,{unit:"hour"}):Ks(i,s.length)},k:function(e,s,n){var i=e.getUTCHours();return i===0&&(i=24),s==="ko"?n.ordinalNumber(i,{unit:"hour"}):Ks(i,s.length)},m:function(e,s,n){return s==="mo"?n.ordinalNumber(e.getUTCMinutes(),{unit:"minute"}):el.m(e,s)},s:function(e,s,n){return s==="so"?n.ordinalNumber(e.getUTCSeconds(),{unit:"second"}):el.s(e,s)},S:function(e,s){return el.S(e,s)},X:function(e,s,n,i){var o=i._originalDate||e,r=o.getTimezoneOffset();if(r===0)return"Z";switch(s){case"X":return Ek(r);case"XXXX":case"XX":return eu(r);case"XXXXX":case"XXX":default:return eu(r,":")}},x:function(e,s,n,i){var o=i._originalDate||e,r=o.getTimezoneOffset();switch(s){case"x":return Ek(r);case"xxxx":case"xx":return eu(r);case"xxxxx":case"xxx":default:return eu(r,":")}},O:function(e,s,n,i){var o=i._originalDate||e,r=o.getTimezoneOffset();switch(s){case"O":case"OO":case"OOO":return"GMT"+wk(r,":");case"OOOO":default:return"GMT"+eu(r,":")}},z:function(e,s,n,i){var o=i._originalDate||e,r=o.getTimezoneOffset();switch(s){case"z":case"zz":case"zzz":return"GMT"+wk(r,":");case"zzzz":default:return"GMT"+eu(r,":")}},t:function(e,s,n,i){var o=i._originalDate||e,r=Math.floor(o.getTime()/1e3);return Ks(r,s.length)},T:function(e,s,n,i){var o=i._originalDate||e,r=o.getTime();return Ks(r,s.length)}};function wk(t,e){var s=t>0?"-":"+",n=Math.abs(t),i=Math.floor(n/60),o=n%60;if(o===0)return s+String(i);var r=e;return s+String(i)+r+Ks(o,2)}function Ek(t,e){if(t%60===0){var s=t>0?"-":"+";return s+Ks(Math.abs(t)/60,2)}return eu(t,e)}function eu(t,e){var s=e||"",n=t>0?"-":"+",i=Math.abs(t),o=Ks(Math.floor(i/60),2),r=Ks(i%60,2);return n+o+s+r}var Sk=function(e,s){switch(e){case"P":return s.date({width:"short"});case"PP":return s.date({width:"medium"});case"PPP":return s.date({width:"long"});case"PPPP":default:return s.date({width:"full"})}},JO=function(e,s){switch(e){case"p":return s.time({width:"short"});case"pp":return s.time({width:"medium"});case"ppp":return s.time({width:"long"});case"pppp":default:return s.time({width:"full"})}},Nz=function(e,s){var n=e.match(/(P+)(p+)?/)||[],i=n[1],o=n[2];if(!o)return Sk(e,s);var r;switch(i){case"P":r=s.dateTime({width:"short"});break;case"PP":r=s.dateTime({width:"medium"});break;case"PPP":r=s.dateTime({width:"long"});break;case"PPPP":default:r=s.dateTime({width:"full"});break}return r.replace("{{date}}",Sk(i,s)).replace("{{time}}",JO(o,s))},o1={p:JO,P:Nz},Lz=["D","DD"],Rz=["YY","YYYY"];function QO(t){return Lz.indexOf(t)!==-1}function ZO(t){return Rz.indexOf(t)!==-1}function cg(t,e,s){if(t==="YYYY")throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(e,"`) for formatting years to the input `").
vendor: 6,047 bytes, line 49
49concat(s,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(t==="YY")throw new RangeError("Use `yy` instead of `YY` (in `".concat(e,"`) for formatting years to the input `").concat(s,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(t==="D")throw new RangeError("Use `d` instead of `D` (in `".concat(e,"`) for formatting days of the month to the input `").concat(s,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(t==="DD")throw new RangeError("Use `dd` instead of `DD` (in `".concat(e,"`) for formatting days of the month to the input `").concat(s,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"))}var Fz={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"}},Vz=function(e,s,n){var i,o=Fz[e];return typeof o=="string"?i=o:s===1?i=o.one:i=o.other.replace("{{count}}",s.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"in "+i:i+" ago":i};function Bc(t){return function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},s=e.width?String(e.width):t.defaultWidth,n=t.formats[s]||t.formats[t.defaultWidth];return n}}var Bz={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},Uz={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},jz={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},Hz={date:Bc({formats:Bz,defaultWidth:"full"}),time:Bc({formats:Uz,defaultWidth:"full"}),dateTime:Bc({formats:jz,defaultWidth:"full"})},Wz={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},zz=function(e,s,n,i){return Wz[e]};function Oa(t){return function(e,s){var n=s!=null&&s.context?String(s.context):"standalone",i;if(n==="formatting"&&t.formattingValues){var o=t.defaultFormattingWidth||t.defaultWidth,r=s!=null&&s.width?String(s.width):o;i=t.formattingValues[r]||t.formattingValues[o]}else{var c=t.defaultWidth,h=s!=null&&s.width?String(s.width):t.defaultWidth;i=t.values[h]||t.values[c]}var f=t.argumentCallback?t.argumentCallback(e):e;return i[f]}}var Yz={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},qz={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},Gz={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"]},Xz={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},Kz={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"}},Jz={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"}},Qz=function(e,s){var n=Number(e),i=n%100;if(i>20||i<10)switch(i%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},Zz={ordinalNumber:Qz,era:Oa({values:Yz,defaultWidth:"wide"}),quarter:Oa({values:qz,defaultWidth:"wide",argumentCallback:function(e){return e-1}}),month:Oa({values:Gz,defaultWidth:"wide"}),day:Oa({values:Xz,defaultWidth:"wide"}),dayPeriod:Oa({values:Kz,defaultWidth:"wide",formattingValues:Jz,defaultFormattingWidth:"wide"})};function Da(t){return function(e){var s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=s.width,i=n&&t.matchPatterns[n]||t.matchPatterns[t.defaultMatchWidth],o=e.match(i);if(!o)return null;var r=o[0],c=n&&t.parsePatterns[n]||t.parsePatterns[t.defaultParseWidth],h=Array.isArray(c)?tY(c,function(g){return g.test(r)}):eY(c,function(g){return g.test(r)}),f;f=t.valueCallback?t.valueCallback(h):h,f=s.valueCallback?s.valueCallback(f):f;var v=e.slice(r.length);return{value:f,rest:v}}}function eY(t,e){for(var s in t)if(t.hasOwnProperty(s)&&e(t[s]))return s}function tY(t,e){for(var s=0;s<t.length;s++)if(e(t[s]))return s}function eD(t){return function(e){var s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=e.match(t.matchPattern);if(!n)return null;var i=n[0],o=e.match(t.parsePattern);if(!o)return null;var r=t.valueCallback?t.valueCallback(o[0]):o[0];r=s.valueCallback?s.valueCallback(r):r;var c=e.slice(i.length);return{value:r,rest:c}}}
vendor: 4,923 bytes, line 49
49var sY=/^(\d+)(th|st|nd|rd)?/i,nY=/\d+/i,iY={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},rY={any:[/^b/i,/^(a|c)/i]},aY={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},oY={any:[/1/i,/2/i,/3/i,/4/i]},lY={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},uY={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]},cY={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},dY={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]},hY={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},fY={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}},pY={ordinalNumber:eD({matchPattern:sY,parsePattern:nY,valueCallback:function(e){return parseInt(e,10)}}),era:Da({matchPatterns:iY,defaultMatchWidth:"wide",parsePatterns:rY,defaultParseWidth:"any"}),quarter:Da({matchPatterns:aY,defaultMatchWidth:"wide",parsePatterns:oY,defaultParseWidth:"any",valueCallback:function(e){return e+1}}),month:Da({matchPatterns:lY,defaultMatchWidth:"wide",parsePatterns:uY,defaultParseWidth:"any"}),day:Da({matchPatterns:cY,defaultMatchWidth:"wide",parsePatterns:dY,defaultParseWidth:"any"}),dayPeriod:Da({matchPatterns:hY,defaultMatchWidth:"any",parsePatterns:fY,defaultParseWidth:"any"})},tD={code:"en-US",formatDistance:Vz,formatLong:Hz,formatRelative:zz,localize:Zz,match:pY,options:{weekStartsOn:0,firstWeekContainsDate:1}},mY=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,gY=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,vY=/^'([^]*?)'?$/,bY=/''/g,yY=/[a-zA-Z]/;function xu(t,e,s){var n,i,o,r,c,h,f,v,g,y,x,E,P,I,D,F,C,A;qt(2,arguments);var O=String(e),j=Wa(),te=(n=(i=s==null?void 0:s.locale)!==null&&i!==void 0?i:j.locale)!==null&&n!==void 0?n:tD,B=ns((o=(r=(c=(h=s==null?void 0:s.firstWeekContainsDate)!==null&&h!==void 0?h:s==null||(f=s.locale)===null||f===void 0||(v=f.options)===null||v===void 0?void 0:v.firstWeekContainsDate)!==null&&c!==void 0?c:j.firstWeekContainsDate)!==null&&r!==void 0?r:(g=j.locale)===null||g===void 0||(y=g.options)===null||y===void 0?void 0:y.firstWeekContainsDate)!==null&&o!==void 0?o:1);if(!(B>=1&&B<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var z=ns((x=(E=(P=(I=s==null?void 0:s.weekStartsOn)!==null&&I!==void 0?I:s==null||(D=s.locale)===null||D===void 0||(F=D.options)===null||F===void 0?void 0:F.weekStartsOn)!==null&&P!==void 0?P:j.weekStartsOn)!==null&&E!==void 0?E:(C=j.locale)===null||C===void 0||(A=C.options)===null||A===void 0?void 0:A.weekStartsOn)!==null&&x!==void 0?x:0);if(!(z>=0&&z<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!te.localize)throw new RangeError("locale must contain localize property");if(!te.formatLong)throw new RangeError("locale must contain formatLong property");var re=rs(t);if(!$h(re))throw new RangeError("Invalid time value");var ne=ug(re),X=qO(re,ne),G={firstWeekContainsDate:B,weekStartsOn:z,locale:te,_originalDate:re},ce=O.match(gY).map(function(be){var J=be[0];if(J==="p"||J==="P"){var Z=o1[J];return Z(be,te.formatLong)}return be}).join("").match(mY).map(function(be){if(be==="''")return"'";var J=be[0];if(J==="'")return _Y(be);var Z=Mz[J];if(Z)return!(s!=null&&s.useAdditionalWeekYearTokens)&&ZO(be)&&cg(be,e,String(t)),!(s!=null&&s.useAdditionalDayOfYearTokens)&&QO(be)&&cg(be,e,String(t)),Z(X,be,te.localize,G);if(J.match(yY))throw new RangeError("Format string contains an unescaped latin alphabet character `"+J+"`");return be}).join("");return ce}function _Y(t){var e=t.match(vY);return e?e[1].replace(bY,"'"):t}function xY(t,e){if(t==null)throw new TypeError("assign requires that input parameter not be null or undefined");for(var s in e)Object.prototype.hasOwnProperty.call(e,s)&&(t[s]=e[s]);return t}function wY(t){qt(1,arguments);var e=rs(t),s=e.getDay();return s}function EY(t){qt(1,arguments);var e=rs(t),s=e.getFullYear(),n=e.getMonth(),i=new Date(0);return i.setFullYear(s,n+1,0),i.setHours(0,0,0,0),i.getDate()}function lo(t){qt(1,arguments);var e=rs(t),s=e.getHours();return s}var SY=6048e5;function kY(t){qt(1,arguments);var e=rs(t),s=lg(e).getTime()-Ez(e).getTime();return Math.round(s/SY)+1}function uo(t){qt(1,arguments);var e=rs(t),s=e.getMinutes();return s}function on(t){qt(1,arguments);var e=rs(t),s=e.getMonth();return s}
vendor: 32,639 bytes, lines 49-50
49function nd(t){qt(1,arguments);var e=rs(t),s=e.getSeconds();return s}function CY(t,e){var s,n,i,o,r,c,h,f;qt(1,arguments);var v=rs(t),g=v.getFullYear(),y=Wa(),x=ns((s=(n=(i=(o=e==null?void 0:e.firstWeekContainsDate)!==null&&o!==void 0?o:e==null||(r=e.locale)===null||r===void 0||(c=r.options)===null||c===void 0?void 0:c.firstWeekContainsDate)!==null&&i!==void 0?i:y.firstWeekContainsDate)!==null&&n!==void 0?n:(h=y.locale)===null||h===void 0||(f=h.options)===null||f===void 0?void 0:f.firstWeekContainsDate)!==null&&s!==void 0?s:1);if(!(x>=1&&x<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var E=new Date(0);E.setFullYear(g+1,0,x),E.setHours(0,0,0,0);var P=Mu(E,e),I=new Date(0);I.setFullYear(g,0,x),I.setHours(0,0,0,0);var D=Mu(I,e);return v.getTime()>=P.getTime()?g+1:v.getTime()>=D.getTime()?g:g-1}function TY(t,e){var s,n,i,o,r,c,h,f;qt(1,arguments);var v=Wa(),g=ns((s=(n=(i=(o=e==null?void 0:e.firstWeekContainsDate)!==null&&o!==void 0?o:e==null||(r=e.locale)===null||r===void 0||(c=r.options)===null||c===void 0?void 0:c.firstWeekContainsDate)!==null&&i!==void 0?i:v.firstWeekContainsDate)!==null&&n!==void 0?n:(h=v.locale)===null||h===void 0||(f=h.options)===null||f===void 0?void 0:f.firstWeekContainsDate)!==null&&s!==void 0?s:1),y=CY(t,e),x=new Date(0);x.setFullYear(y,0,g),x.setHours(0,0,0,0);var E=Mu(x,e);return E}var AY=6048e5;function OY(t,e){qt(1,arguments);var s=rs(t),n=Mu(s,e).getTime()-TY(s,e).getTime();return Math.round(n/AY)+1}function cn(t){return qt(1,arguments),rs(t).getFullYear()}function Qh(t,e){qt(2,arguments);var s=rs(t),n=rs(e);return s.getTime()>n.getTime()}function Zh(t,e){qt(2,arguments);var s=rs(t),n=rs(e);return s.getTime()<n.getTime()}function lu(t,e){qt(2,arguments);var s=rs(t),n=rs(e);return s.getTime()===n.getTime()}function kk(t,e){(e==null||e>t.length)&&(e=t.length);for(var s=0,n=Array(e);s<e;s++)n[s]=t[s];return n}function DY(t,e){if(t){if(typeof t=="string")return kk(t,e);var s={}.toString.call(t).slice(8,-1);return s==="Object"&&t.constructor&&(s=t.constructor.name),s==="Map"||s==="Set"?Array.from(t):s==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(s)?kk(t,e):void 0}}function Ck(t,e){var s=typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(!s){if(Array.isArray(t)||(s=DY(t))||e){s&&(t=s);var n=0,i=function(){};return{s:i,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(f){throw f},f:i}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. 50In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var o,r=!0,c=!1;return{s:function(){s=s.call(t)},n:function(){var f=s.next();return r=f.done,f},e:function(f){c=!0,o=f},f:function(){try{r||s.return==null||s.return()}finally{if(c)throw o}}}}function Bt(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function l1(t,e){return l1=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(s,n){return s.__proto__=n,s},l1(t,e)}function Rs(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&l1(t,e)}function dg(t){return dg=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},dg(t)}function sD(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(sD=function(){return!!t})()}function PY(t,e){if(e&&(Wr(e)=="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Bt(t)}function Fs(t){var e=sD();return function(){var s,n=dg(t);if(e){var i=dg(this).constructor;s=Reflect.construct(n,arguments,i)}else s=n.apply(this,arguments);return PY(this,s)}}function Ns(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function $Y(t,e){if(Wr(t)!="object"||!t)return t;var s=t[Symbol.toPrimitive];if(s!==void 0){var n=s.call(t,e);if(Wr(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function nD(t){var e=$Y(t,"string");return Wr(e)=="symbol"?e:e+""}function IY(t,e){for(var s=0;s<e.length;s++){var n=e[s];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,nD(n.key),n)}}function Ls(t,e,s){return e&&IY(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function Nt(t,e,s){return(e=nD(e))in t?Object.defineProperty(t,e,{value:s,enumerable:!0,configurable:!0,writable:!0}):t[e]=s,t}var MY=10,iD=(function(){function t(){Ns(this,t),Nt(this,"priority",void 0),Nt(this,"subPriority",0)}return Ls(t,[{key:"validate",value:function(s,n){return!0}}]),t})(),NY=(function(t){Rs(s,t);var e=Fs(s);function s(n,i,o,r,c){var h;return Ns(this,s),h=e.call(this),h.value=n,h.validateValue=i,h.setValue=o,h.priority=r,c&&(h.subPriority=c),h}return Ls(s,[{key:"validate",value:function(i,o){return this.validateValue(i,this.value,o)}},{key:"set",value:function(i,o,r){return this.setValue(i,o,this.value,r)}}]),s})(iD),LY=(function(t){Rs(s,t);var e=Fs(s);function s(){var n;Ns(this,s);for(var i=arguments.length,o=new Array(i),r=0;r<i;r++)o[r]=arguments[r];return n=e.call.apply(e,[this].concat(o)),Nt(Bt(n),"priority",MY),Nt(Bt(n),"subPriority",-1),n}return Ls(s,[{key:"set",value:function(i,o){if(o.timestampIsSet)return i;var r=new Date(0);return r.setFullYear(i.getUTCFullYear(),i.getUTCMonth(),i.getUTCDate()),r.setHours(i.getUTCHours(),i.getUTCMinutes(),i.getUTCSeconds(),i.getUTCMilliseconds()),r}}]),s})(iD),Ys=(function(){function t(){Ns(this,t),Nt(this,"incompatibleTokens",void 0),Nt(this,"priority",void 0),Nt(this,"subPriority",void 0)}return Ls(t,[{key:"run",value:function(s,n,i,o){var r=this.parse(s,n,i,o);return r?{setter:new NY(r.value,this.validate,this.set,this.priority,this.subPriority),rest:r.rest}:null}},{key:"validate",value:function(s,n,i){return!0}}]),t})(),RY=(function(t){Rs(s,t);var e=Fs(s);function s(){var n;Ns(this,s);for(var i=arguments.length,o=new Array(i),r=0;r<i;r++)o[r]=arguments[r];return n=e.call.apply(e,[this].concat(o)),Nt(Bt(n),"priority",140),Nt(Bt(n),"incompatibleTokens",["R","u","t","T"]),n}return Ls(s,[{key:"parse",value:function(i,o,r){switch(o){case"G":case"GG":case"GGG":return r.era(i,{width:"abbreviated"})||r.era(i,{width:"narrow"});case"GGGGG":return r.era(i,{width:"narrow"});case"GGGG":default:return r.era(i,{width:"wide"})||r.era(i,{width:"abbreviated"})||r.era(i,{width:"narrow"})}}},{key:"set",value:function(i,o,r){return o.era=r,i.setUTCFullYear(r,0,1),i.setUTCHours(0,0,0,0),i}}]),s})(Ys),Bn={month:/^(1[0-2]|0?\d)/,date:/^(3[0-1]|[0-2]?\d)/,dayOfYear:/^(36[0-6]|3[0-5]\d|[0-2]?\d?\d)/,week:/^(5[0-3]|[0-4]?\d)/,hour23h:/^(2[0-3]|[0-1]?\d)/,hour24h:/^(2[0-4]|[0-1]?\d)/,hour11h:/^(1[0-1]|0?\d)/,hour12h:/^(1[0-2]|0?\d)/,minute:/^[0-5]?\d/,second:/^[0-5]?\d/,singleDigit:/^\d/,twoDigits:/^\d{1,2}/,threeDigits:/^\d{1,3}/,fourDigits:/^\d{1,4}/,anyDigitsSigned:/^-?\d+/,singleDigitSigned:/^-?\d/,twoDigitsSigned:/^-?\d{1,2}/,threeDigitsSigned:/^-?\d{1,3}/,fourDigitsSigned:/^-?\d{1,4}/},Pa={basicOptionalMinutes:/^([+-])(\d{2})(\d{2})?|Z/,basic:/^([+-])(\d{2})(\d{2})|Z/,basicOptionalSeconds:/^([+-])(\d{2})(\d{2})((\d{2}))?|Z/,extended:/^([+-])(\d{2}):(\d{2})|Z/,extendedOptionalSeconds:/^([+-])(\d{2}):(\d{2})(:(\d{2}))?|Z/};function Un(t,e){return t&&{value:e(t.value),rest:t.rest}}function xn(t,e){var s=e.match(t);return s?{value:parseInt(s[0],10),rest:e.slice(s[0].length)}:null}function $a(t,e){var s=e.match(t);if(!s)return null;if(s[0]==="Z")return{value:0,rest:e.slice(1)};var n=s[1]==="+"?1:-1,i=s[2]?parseInt(s[2],10):0,o=s[3]?parseInt(s[3],10):0,r=s[5]?parseInt(s[5],10):0;return{value:n*(i*I_+o*$_+r*Cz),rest:e.slice(s[0].length)}}function rD(t){return xn(Bn.anyDigitsSigned,t)}function Nn(t,e){switch(t){case 1:return xn(Bn.singleDigit,e);case 2:return xn(Bn.twoDigits,e);case 3:return xn(Bn.threeDigits,e);case 4:return xn(Bn.fourDigits,e);default:return xn(new RegExp("^\\d{1,"+t+"}"),e)}}function hg(t,e){switch(t){case 1:return xn(Bn.singleDigitSigned,e);case 2:return xn(Bn.twoDigitsSigned,e);case 3:return xn(Bn.threeDigitsSigned,e);case 4:return xn(Bn.fourDigitsSigned,e);default:return xn(new RegExp("^-?\\d{1,"+t+"}"),e)}}function N_(t){switch(t){case"morning":return 4;case"evening":return 17;case"pm":case"noon":case"afternoon":return 12;case"am":case"midnight":case"night":default:return 0}}function aD(t,e){var s=e>0,n=s?e:1-e,i;if(n<=50)i=t||100;else{var o=n+50,r=Math.floor(o/100)*100,c=t>=o%100;i=t+r-(c?100:0)}return s?i:1-i}function oD(t){return t%400===0||t%4===0&&t%100!==0}var FY=(function(t){Rs(s,t);var e=Fs(s);function s(){var n;Ns(this,s);for(var i=arguments.length,o=new Array(i),r=0;r<i;r++)o[r]=arguments[r];return n=e.call.apply(e,[this].concat(o)),Nt(Bt(n),"priority",130),Nt(Bt(n),"incompatibleTokens",["Y","R","u","w","I","i","e","c","t","T"]),n}return Ls(s,[{key:"parse",value:function(i,o,r){var c=function(f){return{year:f,isTwoDigitYear:o==="yy"}};switch(o){case"y":return Un(Nn(4,i),c);case"yo":return Un(r.ordinalNumber(i,{unit:"year"}),c);default:return Un(Nn(o.length,i),c)}}},{key:"validate",value:function(i,o){return o.isTwoDigitYear||o.year>0}},{key:"set",value:function(i,o,r){var c=i.getUTCFullYear();if(r.isTwoDigitYear){var h=aD(r.year,c);return i.setUTCFullYear(h,0,1),i.setUTCHours(0,0,0,0),i}var f=!("era"in o)||o.era===1?r.year:1-r.year;return i.setUTCFullYear(f,0,1),i.setUTCHours(0,0,0,0),i}}]),s})(Ys),VY=(function(t){Rs(s,t);var e=Fs(s);function s(){var n;Ns(this,s);for(var i=arguments.length,o=new Array(i),r=0;r<i;r++)o[r]=arguments[r];return n=e.call.apply(e,[this].concat(o)),Nt(Bt(n),"priority",130),Nt(Bt(n),"incompatibleTokens",["y","R","u","Q","q","M","L","I","d","D","i","t","T"]),n}return Ls(s,[{key:"parse",value:function(i,o,r){var c=function(f){return{year:f,isTwoDigitYear:o==="YY"}};switch(o){case"Y":return Un(Nn(4,i),c);case"Yo":return Un(r.ordinalNumber(i,{unit:"year"}),c);default:return Un(Nn(o.length,i),c)}}},{key:"validate",value:function(i,o){return o.isTwoDigitYear||o.year>0}},{key:"set",value:function(i,o,r,c){var h=M_(i,c);if(r.isTwoDigitYear){var f=aD(r.year,h);return i.setUTCFullYear(f,0,c.firstWeekContainsDate),i.setUTCHours(0,0,0,0),Nu(i,c)}var v=!("era"in o)||o.era===1?r.year:1-r.year;return i.setUTCFullYear(v,0,c.firstWeekContainsDate),i.setUTCHours(0,0,0,0),Nu(i,c)}}]),s})(Ys),BY=(function(t){Rs(s,t);var e=Fs(s);function s(){var n;Ns(this,s);for(var i=arguments.length,o=new Array(i),r=0;r<i;r++)o[r]=arguments[r];return n=e.call.apply(e,[this].concat(o)),Nt(Bt(n),"priority",130),Nt(Bt(n),"incompatibleTokens",["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"]),n}return Ls(s,[{key:"parse",value:function(i,o){return hg(o==="R"?4:o.length,i)}},{key:"set",value:function(i,o,r){var c=new Date(0);return c.setUTCFullYear(r,0,4),c.setUTCHours(0,0,0,0),sd(c)}}]),s})(Ys),UY=(function(t){Rs(s,t);var e=Fs(s);function s(){var n;Ns(this,s);for(var i=arguments.length,o=new Array(i),r=0;r<i;r++)o[r]=arguments[r];return n=e.call.apply(e,[this].concat(o)),Nt(Bt(n),"priority",130),Nt(Bt(n),"incompatibleTokens",["G","y","Y","R","w","I","i","e","c","t","T"]),n}return Ls(s,[{key:"parse",value:function(i,o){return hg(o==="u"?4:o.length,i)}},{key:"set",value:function(i,o,r){return i.setUTCFullYear(r,0,1),i.setUTCHours(0,0,0,0),i}}]),s})(Ys),jY=(function(t){Rs(s,t);var e=Fs(s);function s(){var n;Ns(this,s);for(var i=arguments.length,o=new Array(i),r=0;r<i;r++)o[r]=arguments[r];return n=e.call.apply(e,[this].concat(o)),Nt(Bt(n),"priority",120),Nt(Bt(n),"incompatibleTokens",["Y","R","q","M","L","w","I","d","D","i","e","c","t","T"]),n}return Ls(s,[{key:"parse",value:function(i,o,r){switch(o){case"Q":case"QQ":return Nn(o.length,i);case"Qo":return r.ordinalNumber(i,{unit:"quarter"});case"QQQ":return r.quarter(i,{width:"abbreviated",context:"formatting"})||r.quarter(i,{width:"narrow",context:"formatting"});case"QQQQQ":return r.quarter(i,{width:"narrow",context:"formatting"});case"QQQQ":default:return r.quarter(i,{width:"wide",context:"formatting"})||r.quarter(i,{width:"abbreviated",context:"formatting"})||r.quarter(i,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(i,o){return o>=1&&o<=4}},{key:"set",value:function(i,o,r){return i.setUTCMonth((r-1)*3,1),i.setUTCHours(0,0,0,0),i}}]),s})(Ys),HY=(function(t){Rs(s,t);var e=Fs(s);function s(){var n;Ns(this,s);for(var i=arguments.length,o=new Array(i),r=0;r<i;r++)o[r]=arguments[r];return n=e.call.apply(e,[this].concat(o)),Nt(Bt(n),"priority",120),Nt(Bt(n),"incompatibleTokens",["Y","R","Q","M","L","w","I","d","D","i","e","c","t","T"]),n}return Ls(s,[{key:"parse",value:function(i,o,r){switch(o){case"q":case"qq":return Nn(o.length,i);case"qo":return r.ordinalNumber(i,{unit:"quarter"});case"qqq":return r.quarter(i,{width:"abbreviated",context:"standalone"})||r.quarter(i,{width:"narrow",context:"standalone"});case"qqqqq":return r.quarter(i,{width:"narrow",context:"standalone"});case"qqqq":default:return r.quarter(i,{width:"wide",context:"standalone"})||r.quarter(i,{width:"abbreviated",context:"standalone"})||r.quarter(i,{width:"narrow",context:"standalone"})}}},{key:"validate",value:function(i,o){return o>=1&&o<=4}},{key:"set",value:function(i,o,r){return i.setUTCMonth((r-1)*3,1),i.setUTCHours(0,0,0,0),i}}]),s})(Ys),WY=(function(t){Rs(s,t);var e=Fs(s);function s(){var n;Ns(this,s);for(var i=arguments.length,o=new Array(i),r=0;r<i;r++)o[r]=arguments[r];return n=e.call.apply(e,[this].concat(o)),Nt(Bt(n),"incompatibleTokens",["Y","R","q","Q","L","w","I","D","i","e","c","t","T"]),Nt(Bt(n),"priority",110),n}return Ls(s,[{key:"parse",value:function(i,o,r){var c=function(f){return f-1};switch(o){case"M":return Un(xn(Bn.month,i),c);case"MM":return Un(Nn(2,i),c);case"Mo":return Un(r.ordinalNumber(i,{unit:"month"}),c);case"MMM":return r.month(i,{width:"abbreviated",context:"formatting"})||r.month(i,{width:"narrow",context:"formatting"});case"MMMMM":return r.month(i,{width:"narrow",context:"formatting"});case"MMMM":default:return r.month(i,{width:"wide",context:"formatting"})||r.month(i,{width:"abbreviated",context:"formatting"})||r.month(i,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(i,o){return o>=0&&o<=11}},{key:"set",value:function(i,o,r){return i.setUTCMonth(r,1),i.setUTCHours(0,0,0,0),i}}]),s})(Ys),zY=(function(t){Rs(s,t);var e=Fs(s);function s(){var n;Ns(this,s);for(var i=arguments.length,o=new Array(i),r=0;r<i;r++)o[r]=arguments[r];return n=e.call.apply(e,[this].concat(o)),Nt(Bt(n),"priority",110),Nt(Bt(n),"incompatibleTokens",["Y","R","q","Q","M","w","I","D","i","e","c","t","T"]),n}return Ls(s,[{key:"parse",value:function(i,o,r){var c=function(f){return f-1};switch(o){case"L":return Un(xn(Bn.month,i),c);case"LL":return Un(Nn(2,i),c);case"Lo":return Un(r.ordinalNumber(i,{unit:"month"}),c);case"LLL":return r.month(i,{width:"abbreviated",context:"standalone"})||r.month(i,{width:"narrow",context:"standalone"});case"LLLLL":return r.month(i,{width:"narrow",context:"standalone"});case"LLLL":default:return r.month(i,{width:"wide",context:"standalone"})||r.month(i,{width:"abbreviated",context:"standalone"})||r.month(i,{width:"narrow",context:"standalone"})}}},{key:"validate",value:function(i,o){return o>=0&&o<=11}},{key:"set",value:function(i,o,r){return i.setUTCMonth(r,1),i.setUTCHours(0,0,0,0),i}}]),s})(Ys);function YY(t,e,s){qt(2,arguments);var n=rs(t),i=ns(e),o=KO(n,s)-i;return n.setUTCDate(n.getUTCDate()-o*7),n}var qY=(function(t){Rs(s,t);var e=Fs(s);function s(){var n;Ns(this,s);for(var i=arguments.length,o=new Array(i),r=0;r<i;r++)o[r]=arguments[r];return n=e.call.apply(e,[this].concat(o)),Nt(Bt(n),"priority",100),Nt(Bt(n),"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","i","t","T"]),n}return Ls(s,[{key:"parse",value:function(i,o,r){switch(o){case"w":return xn(Bn.week,i);case"wo":return r.ordinalNumber(i,{unit:"week"});default:return Nn(o.length,i)}}},{key:"validate",value:function(i,o){return o>=1&&o<=53}},{key:"set",value:function(i,o,r,c){return Nu(YY(i,r,c),c)}}]),s})(Ys);function GY(t,e){qt(2,arguments);var s=rs(t),n=ns(e),i=XO(s)-n;return s.setUTCDate(s.getUTCDate()-i*7),s}var XY=(function(t){Rs(s,t);var e=Fs(s);function s(){var n;Ns(this,s);for(var i=arguments.length,o=new Array(i),r=0;r<i;r++)o[r]=arguments[r];return n=e.call.apply(e,[this].concat(o)),Nt(Bt(n),"priority",100),Nt(Bt(n),"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"]),n}return Ls(s,[{key:"parse",value:function(i,o,r){switch(o){case"I":return xn(Bn.week,i);case"Io":return r.ordinalNumber(i,{unit:"week"});default:return Nn(o.length,i)}}},{key:"validate",value:function(i,o){return o>=1&&o<=53}},{key:"set",value:function(i,o,r){return sd(GY(i,r))}}]),s})(Ys),KY=[31,28,31,30,31,30,31,31,30,31,30,31],JY=[31,29,31,30,31,30,31,31,30,31,30,31],QY=(function(t){Rs(s,t);var e=Fs(s);function s(){var n;Ns(this,s);for(var i=arguments.length,o=new Array(i),r=0;r<i;r++)o[r]=arguments[r];return n=e.call.apply(e,[this].concat(o)),Nt(Bt(n),"priority",90),Nt(Bt(n),"subPriority",1),Nt(Bt(n),"incompatibleTokens",["Y","R","q","Q","w","I","D","i","e","c","t","T"]),n}return Ls(s,[{key:"parse",value:function(i,o,r){switch(o){case"d":return xn(Bn.date,i);case"do":return r.ordinalNumber(i,{unit:"date"});default:return Nn(o.length,i)}}},{key:"validate",value:function(i,o){var r=i.getUTCFullYear(),c=oD(r),h=i.getUTCMonth();return c?o>=1&&o<=JY[h]:o>=1&&o<=KY[h]}},{key:"set",value:function(i,o,r){return i.setUTCDate(r),i.setUTCHours(0,0,0,0),i}}]),s})(Ys),ZY=(function(t){Rs(s,t);var e=Fs(s);function s(){var n;Ns(this,s);for(var i=arguments.length,o=new Array(i),r=0;r<i;r++)o[r]=arguments[r];return n=e.call.apply(e,[this].concat(o)),Nt(Bt(n),"priority",90),Nt(Bt(n),"subpriority",1),Nt(Bt(n),"incompatibleTokens",["Y","R","q","Q","M","L","w","I","d","E","i","e","c","t","T"]),n}return Ls(s,[{key:"parse",value:function(i,o,r){switch(o){case"D":case"DD":return xn(Bn.dayOfYear,i);case"Do":return r.ordinalNumber(i,{unit:"date"});default:return Nn(o.length,i)}}},{key:"validate",value:function(i,o){var r=i.getUTCFullYear(),c=oD(r);return c?o>=1&&o<=366:o>=1&&o<=365}},{key:"set",value:function(i,o,r){return i.setUTCMonth(0,r),i.setUTCHours(0,0,0,0),i}}]),s})(Ys);function L_(t,e,s){var n,i,o,r,c,h,f,v;qt(2,arguments);var g=Wa(),y=ns((n=(i=(o=(r=s==null?void 0:s.weekStartsOn)!==null&&r!==void 0?r:s==null||(c=s.locale)===null||c===void 0||(h=c.options)===null||h===void 0?void 0:h.weekStartsOn)!==null&&o!==void 0?o:g.weekStartsOn)!==null&&i!==void 0?i:(f=g.locale)===null||f===void 0||(v=f.options)===null||v===void 0?void 0:v.weekStartsOn)!==null&&n!==void 0?n:0);if(!(y>=0&&y<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var x=rs(t),E=ns(e),P=x.getUTCDay(),I=E%7,D=(I+7)%7,F=(D<y?7:0)+E-P;return x.setUTCDate(x.getUTCDate()+F),x}var eq=(function(t){Rs(s,t);var e=Fs(s);function s(){var n;Ns(this,s);for(var i=arguments.length,o=new Array(i),r=0;r<i;r++)o[r]=arguments[r];return n=e.call.apply(e,[this].concat(o)),Nt(Bt(n),"priority",90),Nt(Bt(n),"incompatibleTokens",["D","i","e","c","t","T"]),n}return Ls(s,[{key:"parse",value:function(i,o,r){switch(o){case"E":case"EE":case"EEE":return r.day(i,{width:"abbreviated",context:"formatting"})||r.day(i,{width:"short",context:"formatting"})||r.day(i,{width:"narrow",context:"formatting"});case"EEEEE":return r.day(i,{width:"narrow",context:"formatting"});case"EEEEEE":return r.day(i,{width:"short",context:"formatting"})||r.day(i,{width:"narrow",context:"formatting"});case"EEEE":default:return r.day(i,{width:"wide",context:"formatting"})||r.day(i,{width:"abbreviated",context:"formatting"})||r.day(i,{width:"short",context:"formatting"})||r.day(i,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(i,o){return o>=0&&o<=6}},{key:"set",value:function(i,o,r,c){return i=L_(i,r,c),i.setUTCHours(0,0,0,0),i}}]),s})(Ys),tq=(function(t){Rs(s,t);var e=Fs(s);function s(){var n;Ns(this,s);for(var i=arguments.length,o=new Array(i),r=0;r<i;r++)o[r]=arguments[r];return n=e.call.apply(e,[this].concat(o)),Nt(Bt(n),"priority",90),Nt(Bt(n),"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"]),n}return Ls(s,[{key:"parse",value:function(i,o,r,c){var h=function(v){var g=Math.floor((v-1)/7)*7;return(v+c.weekStartsOn+6)%7+g};switch(o){case"e":case"ee":return Un(Nn(o.length,i),h);case"eo":return Un(r.ordinalNumber(i,{unit:"day"}),h);case"eee":return r.day(i,{width:"abbreviated",context:"formatting"})||r.day(i,{width:"short",context:"formatting"})||r.day(i,{width:"narrow",context:"formatting"});case"eeeee":return r.day(i,{width:"narrow",context:"formatting"});case"eeeeee":return r.day(i,{width:"short",context:"formatting"})||r.day(i,{width:"narrow",context:"formatting"});case"eeee":default:return r.day(i,{width:"wide",context:"formatting"})||r.day(i,{width:"abbreviated",context:"formatting"})||r.day(i,{width:"short",context:"formatting"})||r.day(i,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(i,o){return o>=0&&o<=6}},{key:"set",value:function(i,o,r,c){return i=L_(i,r,c),i.setUTCHours(0,0,0,0),i}}]),s})(Ys),sq=(function(t){Rs(s,t);var e=Fs(s);function s(){var n;Ns(this,s);for(var i=arguments.length,o=new Array(i),r=0;r<i;r++)o[r]=arguments[r];return n=e.call.apply(e,[this].concat(o)),Nt(Bt(n),"priority",90),Nt(Bt(n),"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"]),n}return Ls(s,[{key:"parse",value:function(i,o,r,c){var h=function(v){var g=Math.floor((v-1)/7)*7;return(v+c.weekStartsOn+6)%7+g};switch(o){case"c":case"cc":return Un(Nn(o.length,i),h);case"co":return Un(r.ordinalNumber(i,{unit:"day"}),h);case"ccc":return r.day(i,{width:"abbreviated",context:"standalone"})||r.day(i,{width:"short",context:"standalone"})||r.day(i,{width:"narrow",context:"standalone"});case"ccccc":return r.day(i,{width:"narrow",context:"standalone"});case"cccccc":return r.day(i,{width:"short",context:"standalone"})||r.day(i,{width:"narrow",context:"standalone"});case"cccc":default:return r.day(i,{width:"wide",context:"standalone"})||r.day(i,{width:"abbreviated",context:"standalone"})||r.day(i,{width:"short",context:"standalone"})||r.day(i,{width:"narrow",context:"standalone"})}}},{key:"validate",value:function(i,o){return o>=0&&o<=6}},{key:"set",value:function(i,o,r,c){return i=L_(i,r,c),i.setUTCHours(0,0,0,0),i}}]),s})(Ys);function nq(t,e){qt(2,arguments);var s=ns(e);s%7===0&&(s=s-7);var n=1,i=rs(t),o=i.getUTCDay(),r=s%7,c=(r+7)%7,h=(c<n?7:0)+s-o;return i.setUTCDate(i.getUTCDate()+h),i}var iq=(function(t){Rs(s,t);var e=Fs(s);function s(){var n;Ns(this,s);for(var i=arguments.length,o=new Array(i),r=0;r<i;r++)o[r]=arguments[r];return n=e.call.apply(e,[this].concat(o)),Nt(Bt(n),"priority",90),Nt(Bt(n),"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"]),n}return Ls(s,[{key:"parse",value:function(i,o,r){var c=function(f){return f===0?7:f};switch(o){case"i":case"ii":return Nn(o.length,i);case"io":return r.ordinalNumber(i,{unit:"day"});case"iii":return Un(r.day(i,{width:"abbreviated",context:"formatting"})||r.day(i,{width:"short",context:"formatting"})||r.day(i,{width:"narrow",context:"formatting"}),c);case"iiiii":return Un(r.day(i,{width:"narrow",context:"formatting"}),c);case"iiiiii":return Un(r.day(i,{width:"short",context:"formatting"})||r.day(i,{width:"narrow",context:"formatting"}),c);case"iiii":default:return Un(r.day(i,{width:"wide",context:"formatting"})||r.day(i,{width:"abbreviated",context:"formatting"})||r.day(i,{width:"short",context:"formatting"})||r.day(i,{width:"narrow",context:"formatting"}),c)}}},{key:"validate",value:function(i,o){return o>=1&&o<=7}},{key:"set",value:function(i,o,r){return i=nq(i,r),i.setUTCHours(0,0,0,0),i}}]),s})(Ys),rq=(function(t){Rs(s,t);var e=Fs(s);function s(){var n;Ns(this,s);for(var i=arguments.length,o=new Array(i),r=0;r<i;r++)o[r]=arguments[r];return n=e.call.apply(e,[this].concat(o)),Nt(Bt(n),"priority",80),Nt(Bt(n),"incompatibleTokens",["b","B","H","k","t","T"]),n}return Ls(s,[{key:"parse",value:function(i,o,r){switch(o){case"a":case"aa":case"aaa":return r.dayPeriod(i,{width:"abbreviated",context:"formatting"})||r.dayPeriod(i,{width:"narrow",context:"formatting"});case"aaaaa":return r.dayPeriod(i,{width:"narrow",context:"formatting"});case"aaaa":default:return r.dayPeriod(i,{width:"wide",context:"formatting"})||r.dayPeriod(i,{width:"abbreviated",context:"formatting"})||r.dayPeriod(i,{width:"narrow",context:"formatting"})}}},{key:"set",value:function(i,o,r){return i.setUTCHours(N_(r),0,0,0),i}}]),s})(Ys),aq=(function(t){Rs(s,t);var e=Fs(s);function s(){var n;Ns(this,s);for(var i=arguments.length,o=new Array(i),r=0;r<i;r++)o[r]=arguments[r];return n=e.call.apply(e,[this].concat(o)),Nt(Bt(n),"priority",80),Nt(Bt(n),"incompatibleTokens",["a","B","H","k","t","T"]),n}return Ls(s,[{key:"parse",value:function(i,o,r){switch(o){case"b":case"bb":case"bbb":return r.dayPeriod(i,{width:"abbreviated",context:"formatting"})||r.dayPeriod(i,{width:"narrow",context:"formatting"});case"bbbbb":return r.dayPeriod(i,{width:"narrow",context:"formatting"});case"bbbb":default:return r.dayPeriod(i,{width:"wide",context:"formatting"})||r.dayPeriod(i,{width:"abbreviated",context:"formatting"})||r.dayPeriod(i,{width:"narrow",context:"formatting"})}}},{key:"set",value:function(i,o,r){return i.setUTCHours(N_(r),0,0,0),i}}]),s})(Ys),oq=(function(t){Rs(s,t);var e=Fs(s);function s(){var n;Ns(this,s);for(var i=arguments.length,o=new Array(i),r=0;r<i;r++)o[r]=arguments[r];return n=e.call.apply(e,[this].concat(o)),Nt(Bt(n),"priority",80),Nt(Bt(n),"incompatibleTokens",["a","b","t","T"]),n}return Ls(s,[{key:"parse",value:function(i,o,r){switch(o){case"B":case"BB":case"BBB":return r.dayPeriod(i,{width:"abbreviated",context:"formatting"})||r.dayPeriod(i,{width:"narrow",context:"formatting"});case"BBBBB":return r.dayPeriod(i,{width:"narrow",context:"formatting"});case"BBBB":default:return r.dayPeriod(i,{width:"wide",context:"formatting"})||r.dayPeriod(i,{width:"abbreviated",context:"formatting"})||r.dayPeriod(i,{width:"narrow",context:"formatting"})}}},{key:"set",value:function(i,o,r){return i.setUTCHours(N_(r),0,0,0),i}}]),s})(Ys),lq=(function(t){Rs(s,t);var e=Fs(s);function s(){var n;Ns(this,s);for(var i=arguments.length,o=new Array(i),r=0;r<i;r++)o[r]=arguments[r];return n=e.call.apply(e,[this].concat(o)),Nt(Bt(n),"priority",70),Nt(Bt(n),"incompatibleTokens",["H","K","k","t","T"]),n}return Ls(s,[{key:"parse",value:function(i,o,r){switch(o){case"h":return xn(Bn.hour12h,i);case"ho":return r.ordinalNumber(i,{unit:"hour"});default:return Nn(o.length,i)}}},{key:"validate",value:function(i,o){return o>=1&&o<=12}},{key:"set",value:function(i,o,r){var c=i.getUTCHours()>=12;return c&&r<12?i.setUTCHours(r+12,0,0,0):!c&&r===12?i.setUTCHours(0,0,0,0):i.setUTCHours(r,0,0,0),i}}]),s})(Ys),uq=(function(t){Rs(s,t);var e=Fs(s);function s(){var n;Ns(this,s);for(var i=arguments.length,o=new Array(i),r=0;r<i;r++)o[r]=arguments[r];return n=e.call.apply(e,[this].concat(o)),Nt(Bt(n),"priority",70),Nt(Bt(n),"incompatibleTokens",["a","b","h","K","k","t","T"]),n}return Ls(s,[{key:"parse",value:function(i,o,r){switch(o){case"H":return xn(Bn.hour23h,i);case"Ho":return r.ordinalNumber(i,{unit:"hour"});default:return Nn(o.length,i)}}},{key:"validate",value:function(i,o){return o>=0&&o<=23}},{key:"set",value:function(i,o,r){return i.setUTCHours(r,0,0,0),i}}]),s})(Ys),cq=(function(t){Rs(s,t);var e=Fs(s);function s(){var n;Ns(this,s);for(var i=arguments.length,o=new Array(i),r=0;r<i;r++)o[r]=arguments[r];return n=e.call.apply(e,[this].concat(o)),Nt(Bt(n),"priority",70),Nt(Bt(n),"incompatibleTokens",["h","H","k","t","T"]),n}return Ls(s,[{key:"parse",value:function(i,o,r){switch(o){case"K":return xn(Bn.hour11h,i);case"Ko":return r.ordinalNumber(i,{unit:"hour"});default:return Nn(o.length,i)}}},{key:"validate",value:function(i,o){return o>=0&&o<=11}},{key:"set",value:function(i,o,r){var c=i.getUTCHours()>=12;return c&&r<12?i.setUTCHours(r+12,0,0,0):i.setUTCHours(r,0,0,0),i}}]),s})(Ys),dq=(function(t){Rs(s,t);var e=Fs(s);function s(){var n;Ns(this,s);for(var i=arguments.length,o=new Array(i),r=0;r<i;r++)o[r]=arguments[r];return n=e.call.apply(e,[this].concat(o)),Nt(Bt(n),"priority",70),Nt(Bt(n),"incompatibleTokens",["a","b","h","H","K","t","T"]),n}return Ls(s,[{key:"parse",value:function(i,o,r){switch(o){case"k":return xn(Bn.hour24h,i);case"ko":return r.ordinalNumber(i,{unit:"hour"});default:return Nn(o.length,i)}}},{key:"validate",value:function(i,o){return o>=1&&o<=24}},{key:"set",value:function(i,o,r){var c=r<=24?r%24:r;return i.setUTCHours(c,0,0,0),i}}]),s})(Ys),hq=(function(t){Rs(s,t);var e=Fs(s);function s(){var n;Ns(this,s);for(var i=arguments.length,o=new Array(i),r=0;r<i;r++)o[r]=arguments[r];return n=e.call.apply(e,[this].concat(o)),Nt(Bt(n),"priority",60),Nt(Bt(n),"incompatibleTokens",["t","T"]),n}return Ls(s,[{key:"parse",value:function(i,o,r){switch(o){case"m":return xn(Bn.minute,i);case"mo":return r.ordinalNumber(i,{unit:"minute"});default:return Nn(o.length,i)}}},{key:"validate",value:function(i,o){return o>=0&&o<=59}},{key:"set",value:function(i,o,r){return i.setUTCMinutes(r,0,0),i}}]),s})(Ys),fq=(function(t){Rs(s,t);var e=Fs(s);function s(){var n;Ns(this,s);for(var i=arguments.length,o=new Array(i),r=0;r<i;r++)o[r]=arguments[r];return n=e.call.apply(e,[this].concat(o)),Nt(Bt(n),"priority",50),Nt(Bt(n),"incompatibleTokens",["t","T"]),n}return Ls(s,[{key:"parse",value:function(i,o,r){switch(o){case"s":return xn(Bn.second,i);case"so":return r.ordinalNumber(i,{unit:"second"});default:return Nn(o.length,i)}}},{key:"validate",value:function(i,o){return o>=0&&o<=59}},{key:"set",value:function(i,o,r){return i.setUTCSeconds(r,0),i}}]),s})(Ys),pq=(function(t){Rs(s,t);var e=Fs(s);function s(){var n;Ns(this,s);for(var i=arguments.length,o=new Array(i),r=0;r<i;r++)o[r]=arguments[r];return n=e.call.apply(e,[this].concat(o)),Nt(Bt(n),"priority",30),Nt(Bt(n),"incompatibleTokens",["t","T"]),n}return Ls(s,[{key:"parse",value:function(i,o){var r=function(h){return Math.floor(h*Math.pow(10,-o.length+3))};return Un(Nn(o.length,i),r)}},{key:"set",value:function(i,o,r){return i.setUTCMilliseconds(r),i}}]),s})(Ys),mq=(function(t){Rs(s,t);var e=Fs(s);function s(){var n;Ns(this,s);for(var i=arguments.length,o=new Array(i),r=0;r<i;r++)o[r]=arguments[r];return n=e.call.apply(e,[this].concat(o)),Nt(Bt(n),"priority",10),Nt(Bt(n),"incompatibleTokens",["t","T","x"]),n}return Ls(s,[{key:"parse",value:function(i,o){switch(o){case"X":return $a(Pa.basicOptionalMinutes,i);case"XX":return $a(Pa.basic,i);case"XXXX":return $a(Pa.basicOptionalSeconds,i);case"XXXXX":return $a(Pa.extendedOptionalSeconds,i);case"XXX":default:return $a(Pa.extended,i)}}},{key:"set",value:function(i,o,r){return o.timestampIsSet?i:new Date(i.getTime()-r)}}]),s})(Ys),gq=(function(t){Rs(s,t);var e=Fs(s);function s(){var n;Ns(this,s);for(var i=arguments.length,o=new Array(i),r=0;r<i;r++)o[r]=arguments[r];return n=e.call.apply(e,[this].concat(o)),Nt(Bt(n),"priority",10),Nt(Bt(n),"incompatibleTokens",["t","T","X"]),n}return Ls(s,[{key:"parse",value:function(i,o){switch(o){case"x":return $a(Pa.basicOptionalMinutes,i);case"xx":return $a(Pa.basic,i);case"xxxx":return $a(Pa.basicOptionalSeconds,i);case"xxxxx":return $a(Pa.extendedOptionalSeconds,i);case"xxx":default:return $a(Pa.extended,i)}}},{key:"set",value:function(i,o,r){return o.timestampIsSet?i:new Date(i.getTime()-r)}}]),s})(Ys),vq=(function(t){Rs(s,t);var e=Fs(s);function s(){var n;Ns(this,s);for(var i=arguments.length,o=new Array(i),r=0;r<i;r++)o[r]=arguments[r];return n=e.call.apply(e,[this].concat(o)),Nt(Bt(n),"priority",40),Nt(Bt(n),"incompatibleTokens","*"),n}return Ls(s,[{key:"parse",value:function(i){return rD(i)}},{key:"set",value:function(i,o,r){return[new Date(r*1e3),{timestampIsSet:!0}]}}]),s})(Ys),bq=(function(t){Rs(s,t);var e=Fs(s);function s(){var n;Ns(this,s);for(var i=arguments.length,o=new Array(i),r=0;r<i;r++)o[r]=arguments[r];return n=e.call.apply(e,[this].concat(o)),Nt(Bt(n),"priority",20),Nt(Bt(n),"incompatibleTokens","*"),n}return Ls(s,[{key:"parse",value:function(i){return rD(i)}},{key:"set",value:function(i,o,r){return[new Date(r),{timestampIsSet:!0}]}}]),s})(Ys),yq={G:new RY,y:new FY,Y:new VY,R:new BY,u:new UY,Q:new jY,q:new HY,M:new WY,L:new zY,w:new qY,I:new XY,d:new QY,D:new ZY,E:new eq,e:ne
50w tq,c:new sq,i:new iq,a:new rq,b:new aq,B:new oq,h:new lq,H:new uq,K:new cq,k:new dq,m:new hq,s:new fq,S:new pq,X:new mq,x:new gq,t:new vq,T:new bq},_q=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,xq=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,wq=/^'([^]*?)'?$/,Eq=/''/g,Sq=/\S/,kq=/[a-zA-Z]/;function u1(t,e,s,n){var i,o,r,c,h,f,v,g,y,x,E,P,I,D;qt(3,arguments);var F=String(t),C=String(e),A=Wa(),O=(i=(o=void 0)!==null&&o!==void 0?o:A.locale)!==null&&i!==void 0?i:tD;if(!O.match)throw new RangeError("locale must contain match property");var j=ns((r=(c=(h=(f=void 0)!==null&&f!==void 0?f:void 0)!==null&&h!==void 0?h:A.firstWeekContainsDate)!==null&&c!==void 0?c:(v=A.locale)===null||v===void 0||(g=v.options)===null||g===void 0?void 0:g.firstWeekContainsDate)!==null&&r!==void 0?r:1);if(!(j>=1&&j<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var te=ns((y=(x=(E=(P=void 0)!==null&&P!==void 0?P:void 0)!==null&&E!==void 0?E:A.weekStartsOn)!==null&&x!==void 0?x:(I=A.locale)===null||I===void 0||(D=I.options)===null||D===void 0?void 0:D.weekStartsOn)!==null&&y!==void 0?y:0);if(!(te>=0&&te<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(C==="")return F===""?rs(s):new Date(NaN);var B={firstWeekContainsDate:j,weekStartsOn:te,locale:O},z=[new LY],re=C.match(xq).map(function(K){var H=K[0];if(H in o1){var Ee=o1[H];return Ee(K,O.formatLong)}return K}).join("").match(_q),ne=[],X=Ck(re),G;try{var ce=function(){var H=G.value;!(n!=null&&n.useAdditionalWeekYearTokens)&&ZO(H)&&cg(H,C,t),!(n!=null&&n.useAdditionalDayOfYearTokens)&&QO(H)&&cg(H,C,t);var Ee=H[0],_e=yq[Ee];if(_e){var Ce=_e.incompatibleTokens;if(Array.isArray(Ce)){var Re=ne.find(function(Be){return Ce.includes(Be.token)||Be.token===Ee});if(Re)throw new RangeError("The format string mustn't contain `".concat(Re.fullToken,"` and `").concat(H,"` at the same time"))}else if(_e.incompatibleTokens==="*"&&ne.length>0)throw new RangeError("The format string mustn't contain `".concat(H,"` and any other token at the same time"));ne.push({token:Ee,fullToken:H});var Ke=_e.run(F,H,O.match,B);if(!Ke)return{v:new Date(NaN)};z.push(Ke.setter),F=Ke.rest}else{if(Ee.match(kq))throw new RangeError("Format string contains an unescaped latin alphabet character `"+Ee+"`");if(H==="''"?H="'":Ee==="'"&&(H=Cq(H)),F.indexOf(H)===0)F=F.slice(H.length);else return{v:new Date(NaN)}}};for(X.s();!(G=X.n()).done;){var be=ce();if(Wr(be)==="object")return be.v}}catch(K){X.e(K)}finally{X.f()}if(F.length>0&&Sq.test(F))return new Date(NaN);var J=z.map(function(K){return K.priority}).sort(function(K,H){return H-K}).filter(function(K,H,Ee){return Ee.indexOf(K)===H}).map(function(K){return z.filter(function(H){return H.priority===K}).sort(function(H,Ee){return Ee.subPriority-H.subPriority})}).map(function(K){return K[0]}),Z=rs(s);if(isNaN(Z.getTime()))return new Date(NaN);var ge=qO(Z,ug(Z)),q={},W=Ck(J),M;try{for(W.s();!(M=W.n()).done;){var he=M.value;if(!he.validate(ge,B))return new Date(NaN);var oe=he.set(ge,q,B);Array.isArray(oe)?(ge=oe[0],xY(q,oe[1])):ge=oe}}catch(K){W.e(K)}finally{W.f()}return ge}function Cq(t){return t.match(wq)[1].replace(Eq,"'")}function Tq(t,e){qt(2,arguments);var s=ns(e);return ho(t,-s)}function Aq(t,e){var s;qt(1,arguments);var n=ns((s=void 0)!==null&&s!==void 0?s:2);if(n!==2&&n!==1&&n!==0)throw new RangeError("additionalDigits must be 0, 1 or 2");if(!(typeof t=="string"||Object.prototype.toString.call(t)==="[object String]"))return new Date(NaN);var i=$q(t),o;if(i.date){var r=Iq(i.date,n);o=Mq(r.restDateString,r.year)}if(!o||isNaN(o.getTime()))return new Date(NaN);var c=o.getTime(),h=0,f;if(i.time&&(h=Nq(i.time),isNaN(h)))return new Date(NaN);if(i.timezone){if(f=Lq(i.timezone),isNaN(f))return new Date(NaN)}else{var v=new Date(c+h),g=new Date(0);return g.setFullYear(v.getUTCFullYear(),v.getUTCMonth(),v.getUTCDate()),g.setHours(v.getUTCHours(),v.getUTCMinutes(),v.getUTCSeconds(),v.getUTCMilliseconds()),g}return new Date(c+h+f)}var sm={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},Oq=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,Dq=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,Pq=/^([+-])(\d{2})(?::?(\d{2}))?$/;function $q(t){var e={},s=t.split(sm.dateTimeDelimiter),n;if(s.length>2)return e;if(/:/.test(s[0])?n=s[0]:(e.date=s[0],n=s[1],sm.timeZoneDelimiter.test(e.date)&&(e.date=t.split(sm.timeZoneDelimiter)[0],n=t.substr(e.date.length,t.length))),n){var i=sm.timezone.exec(n);i?(e.time=n.replace(i[1],""),e.timezone=i[1]):e.time=n}return e}function Iq(t,e){var s=new RegExp("^(?:(\\d{4}|[+-]\\d{"+(4+e)+"})|(\\d{2}|[+-]\\d{"+(2+e)+"})$)"),n=t.match(s);if(!n)return{year:NaN,restDateString:""};var i=n[1]?parseInt(n[1]):null,o=n[2]?parseInt(n[2]):null;return{year:o===null?i:o*100,restDateString:t.slice((n[1]||n[2]).length)}}function Mq(t,e){if(e===null)return new Date(NaN);var s=t.match(Oq);if(!s)return new Date(NaN);var n=!!s[4],i=lh(s[1]),o=lh(s[2])-1,r=lh(s[3]),c=lh(s[4]),h=lh(s[5])-1;if(n)return Uq(e,c,h)?Rq(e,c,h):new Date(NaN);var f=new Date(0);return!Vq(e,o,r)||!Bq(e,i)?new Date(NaN):(f.setUTCFullYear(e,o,Math.max(i,r)),f)}function lh(t){return t?parseInt(t):1}function Nq(t){var e=t.match(Dq);if(!e)return NaN;var s=Ny(e[1]),n=Ny(e[2]),i=Ny(e[3]);return jq(s,n,i)?s*I_+n*$_+i*1e3:NaN}function Ny(t){return t&&parseFloat(t.replace(",","."))||0}function Lq(t){if(t==="Z")return 0;var e=t.match(Pq);if(!e)return 0;var s=e[1]==="+"?-1:1,n=parseInt(e[2]),i=e[3]&&parseInt(e[3])||0;return Hq(n,i)?s*(n*I_+i*$_):NaN}function Rq(t,e,s){var n=new Date(0);n.setUTCFullYear(t,0,4);var i=n.getUTCDay()||7,o=(e-1)*7+s+1-i;return n.setUTCDate(n.getUTCDate()+o),n}var Fq=[31,null,31,30,31,30,31,31,30,31,30,31];function lD(t){return t%400===0||t%4===0&&t%100!==0}function Vq(t,e,s){return e>=0&&e<=11&&s>=1&&s<=(Fq[e]||(lD(t)?29:28))}function Bq(t,e){return e>=1&&e<=(lD(t)?366:365)}function Uq(t,e,s){return e>=1&&e<=53&&s>=0&&s<=6}function jq(t,e,s){return t===24?e===0&&s===0:s>=0&&s<60&&e>=0&&e<60&&t>=0&&t<25}function Hq(t,e){return e>=0&&e<=59}function Nc(t,e){qt(2,arguments);var s=rs(t),n=ns(e),i=s.getFullYear(),o=s.getDate(),r=new Date(0);r.setFullYear(i,n,15),r.setHours(0,0,0,0);var c=EY(r);return s.setMonth(n,Math.min(o,c)),s}function ni(t,e){if(qt(2,arguments),Wr(e)!=="object"||e===null)throw new RangeError("values parameter must be an object");var s=rs(t);return isNaN(s.getTime())?new Date(NaN):(e.year!=null&&s.setFullYear(e.year),e.month!=null&&(s=Nc(s,e.month)),e.date!=null&&s.setDate(ns(e.date)),e.hours!=null&&s.setHours(ns(e.hours)),e.minutes!=null&&s.setMinutes(ns(e.minutes)),e.seconds!=null&&s.setSeconds(ns(e.seconds)),e.milliseconds!=null&&s.setMilliseconds(ns(e.milliseconds)),s)}function uD(t,e){qt(2,arguments);var s=rs(t),n=ns(e);return s.setHours(n),s}function R_(t,e){qt(2,arguments);var s=rs(t),n=ns(e);return s.setMilliseconds(n),s}function cD(t,e){qt(2,arguments);var s=rs(t),n=ns(e);return s.setMinutes(n),s}function dD(t,e){qt(2,arguments);var s=rs(t),n=ns(e);return s.setSeconds(n),s}function fo(t,e){qt(2,arguments);var s=rs(t),n=ns(e);return isNaN(s.getTime())?new Date(NaN):(s.setFullYear(n),s)}function Uc(t,e){qt(2,arguments);var s=ns(e);return Ma(t,-s)}function Wq(t,e){if(qt(2,arguments),!e||Wr(e)!=="object")return new Date(NaN);var s=e.years?ns(e.years):0,n=e.months?ns(e.months):0,i=e.weeks?ns(e.weeks):0,o=e.days?ns(e.days):0,r=e.hours?ns(e.hours):0,c=e.minutes?ns(e.minutes):0,h=e.seconds?ns(e.seconds):0,f=Uc(t,n+s*12),v=Tq(f,o+i*7),g=c+r*60,y=h+g*60,x=y*1e3,E=new Date(v.getTime()-x);return E}function zq(t,e){qt(2,arguments);var s=ns(e);return zO(t,-s)}function lv(){return $(),L("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"
50currentColor","aria-hidden":"true",class:"dp__icon"},[l("path",{d:"M29.333 8c0-2.208-1.792-4-4-4h-18.667c-2.208 0-4 1.792-4 4v18.667c0 2.208 1.792 4 4 4h18.667c2.208 0 4-1.792 4-4v-18.667zM26.667 8v18.667c0 0.736-0.597 1.333-1.333 1.333 0 0-18.667 0-18.667 0-0.736 0-1.333-0.597-1.333-1.333 0 0 0-18.667 0-18.667 0-0.736 0.597-1.333 1.333-1.333 0 0 18.667 0 18.667 0 0.736 0 1.333 0.597 1.333 1.333z"}),l("path",{d:"M20 2.667v5.333c0 0.736 0.597 1.333 1.333 1.333s1.333-0.597 1.333-1.333v-5.333c0-0.736-0.597-1.333-1.333-1.333s-1.333 0.597-1.333 1.333z"}),l("path",{d:"M9.333 2.667v5.333c0 0.736 0.597 1.333 1.333 1.333s1.333-0.597 1.333-1.333v-5.333c0-0.736-0.597-1.333-1.333-1.333s-1.333 0.597-1.333 1.333z"}),l("path",{d:"M4 14.667h24c0.736 0 1.333-0.597 1.333-1.333s-0.597-1.333-1.333-1.333h-24c-0.736 0-1.333 0.597-1.333 1.333s0.597 1.333 1.333 1.333z"})])}function Yq(){return $(),L("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor","aria-hidden":"true",class:"dp__icon"},[l("path",{d:"M23.057 7.057l-16 16c-0.52 0.52-0.52 1.365 0 1.885s1.365 0.52 1.885 0l16-16c0.52-0.52 0.52-1.365 0-1.885s-1.365-0.52-1.885 0z"}),l("path",{d:"M7.057 8.943l16 16c0.52 0.52 1.365 0.52 1.885 0s0.52-1.365 0-1.885l-16-16c-0.52-0.52-1.365-0.52-1.885 0s-0.52 1.365 0 1.885z"})])}function Tk(){return $(),L("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor","aria-hidden":"true",class:"dp__icon"},[l("path",{d:"M20.943 23.057l-7.057-7.057c0 0 7.057-7.057 7.057-7.057 0.52-0.52 0.52-1.365 0-1.885s-1.365-0.52-1.885 0l-8 8c-0.521 0.521-0.521 1.365 0 1.885l8 8c0.52 0.52 1.365 0.52 1.885 0s0.52-1.365 0-1.885z"})])}function Ak(){return $(),L("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor","aria-hidden":"true",class:"dp__icon"},[l("path",{d:"M12.943 24.943l8-8c0.521-0.521 0.521-1.365 0-1.885l-8-8c-0.52-0.52-1.365-0.52-1.885 0s-0.52 1.365 0 1.885l7.057 7.057c0 0-7.057 7.057-7.057 7.057-0.52 0.52-0.52 1.365 0 1.885s1.365 0.52 1.885 0z"})])}function hD(){return $(),L("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor","aria-hidden":"true",class:"dp__icon"},[l("path",{d:"M16 1.333c-8.095 0-14.667 6.572-14.667 14.667s6.572 14.667 14.667 14.667c8.095 0 14.667-6.572 14.667-14.667s-6.572-14.667-14.667-14.667zM16 4c6.623 0 12 5.377 12 12s-5.377 12-12 12c-6.623 0-12-5.377-12-12s5.377-12 12-12z"}),l("path",{d:"M14.667 8v8c0 0.505 0.285 0.967 0.737 1.193l5.333 2.667c0.658 0.329 1.46 0.062 1.789-0.596s0.062-1.46-0.596-1.789l-4.596-2.298c0 0 0-7.176 0-7.176 0-0.736-0.597-1.333-1.333-1.333s-1.333 0.597-1.333 1.333z"})])}function fD(){return $(),L("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor","aria-hidden":"true",class:"dp__icon"},[l("path",{d:"M24.943 19.057l-8-8c-0.521-0.521-1.365-0.521-1.885 0l-8 8c-0.52 0.52-0.52 1.365 0 1.885s1.365 0.52 1.885 0l7.057-7.057c0 0 7.057 7.057 7.057 7.057 0.52 0.52 1.365 0.52 1.885 0s0.52-1.365 0-1.885z"})])}function pD(){return $(),L("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor","aria-hidden":"true",class:"dp__icon"},[l("path",{d:"M7.057 12.943l8 8c0.521 0.521 1.365 0.521 1.885 0l8-8c0.52-0.52 0.52-1.365 0-1.885s-1.365-0.52-1.885 0l-7.057 7.057c0 0-7.057-7.057-7.057-7.057-0.52-0.52-1.365-0.52-1.885 0s-0.52 1.365 0 1.885z"})])}const Ok=(t,e,s,n,i)=>{const o=u1(t,e.slice(0,t.length),new Date);return $h(o)&&YO(o)?n||i?o:ni(o,{hours:+s.hours,minutes:+(s==null?void 0:s.minutes),seconds:+(s==null?void 0:s.seconds),milliseconds:0}):null},qq=(t,e,s,n,i)=>{const o=Array.isArray(s)?s[0]:s;if(typeof e=="string")return Ok(t,e,o,n,i);if(Array.isArray(e)){let r=null;for(const c of e)if(r=Ok(t,c,o,n,i),r)break;return r}return typeof e=="function"?e(t):null},yt=t=>t?new Date(t):new Date,Gq=(t,e,s)=>{if(e){const i=(t.getMonth()+1).toString().padStart(2,"0"),o=t.getDate().toString().padStart(2,"0"),r=t.getHours().toString().padStart(2,"0"),c=t.getMinutes().toString().padStart(2,"0"),h=s?t.getSeconds().toString().padStart(2,"0"):"00";return`${t.getFullYear()}-${i}-${o}T${r}:${c}:${h}.000Z`}const n=Date.UTC(t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate(),t.getUTCHours(),t.getUTCMinutes(),t.getUTCSeconds());return new Date(n).toISOString()},Vr=t=>{let e=yt(JSON.parse(JSON.stringify(t)));return e=uD(e,0),e=cD(e,0),e=dD(e,0),e=R_(e,0),e},Nr=(t,e,s,n)=>
50{let i=t?yt(t):yt();return(e||e===0)&&(i=uD(i,+e)),(s||s===0)&&(i=cD(i,+s)),(n||n===0)&&(i=dD(i,+n)),R_(i,0)},Ai=(t,e)=>!t||!e?!1:Zh(Vr(t),Vr(e)),Js=(t,e)=>!t||!e?!1:lu(Vr(t),Vr(e)),qi=(t,e)=>!t||!e?!1:Qh(Vr(t),Vr(e)),mD=(t,e,s)=>t&&t[0]&&t[1]?qi(s,t[0])&&Ai(s,t[1]):t&&t[0]&&e?qi(s,t[0])&&Ai(s,e)||Ai(s,t[0])&&qi(s,e):!1,uh=t=>{const e=ni(new Date(t),{date:1});return Vr(e)},Ly=(t,e,s)=>e&&(s||s===0)?Object.fromEntries(["hours","minutes","seconds"].map(n=>n===e?[n,s]:[n,isNaN(+t[n])?void 0:+t[n]])):{hours:isNaN(+t.hours)?void 0:+t.hours,minutes:isNaN(+t.minutes)?void 0:+t.minutes,seconds:isNaN(+t.seconds)?void 0:+t.seconds},nm=t=>({hours:lo(t),minutes:uo(t),seconds:nd(t)}),ch=en({menuFocused:!1,shiftKeyInMenu:!1}),gD=()=>{const t=s=>{ch.menuFocused=s},e=s=>{ch.shiftKeyInMenu!==s&&(ch.shiftKeyInMenu=s)};return{control:Ae(()=>({shiftKeyInMenu:ch.shiftKeyInMenu,menuFocused:ch.menuFocused})),setMenuFocused:t,setShiftKey:e}};function F_(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var vD={exports:{}};(function(t){function e(s){return s&&s.__esModule?s:{default:s}}t.exports=e,t.exports.__esModule=!0,t.exports.default=t.exports})(vD);var Xq=vD.exports,c1={exports:{}};(function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=s;function s(n){if(n===null||n===!0||n===!1)return NaN;var i=Number(n);return isNaN(i)?i:i<0?Math.ceil(i):Math.floor(i)}t.exports=e.default})(c1,c1.exports);var Kq=c1.exports;const Jq=F_(Kq);var d1={exports:{}};(function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=s;function s(n){var i=new Date(Date.UTC(n.getFullYear(),n.getMonth(),n.getDate(),n.getHours(),n.getMinutes(),n.getSeconds(),n.getMilliseconds()));return i.setUTCFullYear(n.getFullYear()),n.getTime()-i.getTime()}t.exports=e.default})(d1,d1.exports);var Qq=d1.exports;const Dk=F_(Qq);function Zq(t,e){var s=nG(e);return s.formatToParts?tG(s,t):sG(s,t)}var eG={year:0,month:1,day:2,hour:3,minute:4,second:5};function tG(t,e){try{for(var s=t.formatToParts(e),n=[],i=0;i<s.length;i++){var o=eG[s[i].type];o>=0&&(n[o]=parseInt(s[i].value,10))}return n}catch(r){if(r instanceof RangeError)return[NaN];throw r}}function sG(t,e){var s=t.format(e).replace(/\u200E/g,""),n=/(\d+)\/(\d+)\/(\d+),? (\d+):(\d+):(\d+)/.exec(s);return[n[3],n[1],n[2],n[4],n[5],n[6]]}var Ry={};function nG(t){if(!Ry[t]){var e=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:"America/New_York",year:"numeric",month:"numeric",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"}).format(new Date("2014-06-25T04:00:00.123Z")),s=e==="06/25/2014, 00:00:00"||e==="â06â/â25â/â2014â â00â:â00â:â00";Ry[t]=s?new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:t,year:"numeric",month:"numeric",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"}):new Intl.DateTimeFormat("en-US",{hourCycle:"h23",timeZone:t,year:"numeric",month:"numeric",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"})}return Ry[t]}function V_(t,e,s,n,i,o,r){var c=new Date(0);return c.setUTCFullYear(t,e,s),c.setUTCHours(n,i,o,r),c}var Pk=36e5,iG=6e4,Fy={timezoneZ:/^(Z)$/,timezoneHH:/^([+-]\d{2})$/,timezoneHHMM:/^([+-]\d{2}):?(\d{2})$/};function B_(t,e,s){var n,i;if(!t||(n=Fy.timezoneZ.exec(t),n))return 0;var o;if(n=Fy.timezoneHH.exec(t),n)return o=parseInt(n[1],10),$k(o)?-(o*Pk):NaN;if(n=Fy.timezoneHHMM.exec(t),n){o=parseInt(n[1],10);var r=parseInt(n[2],10);return $k(o,r)?(i=Math.abs(o)*Pk+r*iG,o>0?-i:i):NaN}if(oG(t)){e=new Date(e||Date.now());var c=s?e:rG(e),h=h1(c,t),f=s?h:aG(e,h,t);return-f}return NaN}function rG(t){return V_(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds())}function h1(t,e){var s=Zq(t,e),n=V_(s[0],s[1]-1,s[2],s[3]%24,s[4],s[5],0).getTime(),i=t.getTime(),o=i%1e3;return i-=o>=0?o:1e3+o,n-i}function aG(t,e,s){var n=t.getTime(),i=n-e,o=h1(new Date(i),s);if(e===o)return e;i-=o-e;var r=h1(new Date(i),s);return o===r?o:Math.max(o,r)}function $k(t,e){return-23<=t&&t<=23&&(e==null||0<=e&&e<=59)}var Ik={};function oG(t){if(Ik[t])return!0;try{return new Intl.DateTimeFormat(void 0,{timeZone:t}),Ik[t]=!0,!0}catch{return!1}}var lG=/(Z|[+-]\d{2}(?::?\d{2})?| UTC| [a-zA-Z]+\/[a-zA-Z_]+(?:\/[a-zA-Z_]+)?)$/;const bD=lG;var Vy=36e5,Mk=6e4,uG=2,Yi={dateTimePattern:/^([0-9W+-]+)(T| )(.*)/,datePattern:/^([0-9W+-]+)(.*)/,YY:/^(\d{2})$/,YYY:[/^([+-]\d{2})$/,/^([+-]\d{3})$/,/^([+-]\d{4})$/],YYYY:/^(\d{4})/,YYYYY:[/^([+-]\d{4})/,/^([+-]\d{5})/,/^([+-]\d{6})/],MM:/^-(\d{2})$/,DDD:/^-?(\d{3})$/,MMDD:/^-?(\d{2})-?(\d{2})$/,Www:/^-?W(\d{2})$/,WwwD:/^-?W(\d{2})-?(\d{1})$/,HH:/^(\d{2}([.,]\d*)?)$/,HHMM:/^(\d{2}):?(\d{2}([.,]\d*)?)$/,HHMMSS:/^(\d{2}):?(\d{2}):?(\d{2}([.,]\d*)?)$/,timeZone:bD};function f1(t,e){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");if(t===null)return new Date(NaN);var s=e||{},n=s.additionalDigits==null?uG:Jq(s.additionalDigits);if(n!==2&&n!==1&&n!==0)throw new RangeError("additionalDigits must be 0, 1 or 2");if(t instanceof Date||typeof t=="object"&&Object.prototype.toString.call(t)==="[object Date]")return new Date(t.getTime());if(typeof t=="number"||Object.prototype.toString.call(t)==="[object Number]")return new Date(t);if(!(typeof t=="string"||Object.prototype.toString.call(t)==="[object String]"))return new Date(NaN);var i=cG(t),o=dG(i.date,n),r=o.year,c=o.restDateString,h=hG(c,r);if(isNaN(h))return new Date(NaN);if(h){var f=h.getTime(),v=0,g;if(i.time&&(v=fG(i.time),isNaN(v)))return new Date(NaN);if(i.timeZone||s.timeZone){if(g=B_(i.timeZone||s.timeZone,new Date(f+v)),isNaN(g))return new Date(NaN)}else g=Dk(new Date(f+v)),g=Dk(new Date(f+v+g));return new Date(f+v+g)}else return new Date(NaN)}function cG(t){var e={},s=Yi.dateTimePattern.exec(t),n;if(s?(e.date=s[1],n=s[3]):(s=Yi.datePattern.exec(t),s?(e.date=s[1],n=s[2]):(e.date=null,n=t)),n){var i=Yi.timeZone.exec(n);i?(e.time=n.replace(i[1],""),e.timeZone=i[1].trim()):e.time=n}return e}function dG(t,e){var s=Yi.YYY[e],n=Yi.YYYYY[e],i;if(i=Yi.YYYY.exec(t)||n.exec(t),i){var o=i[1];return{year:parseInt(o,10),restDateString:t.slice(o.length)}}if(i=Yi.YY.exec(t)||s.exec(t),i){var r=i[1];return{year:parseInt(r,10)*100,restDateString:t.slice(r.length)}}return{year:null}}function hG(t,e){if(e===null)return null;var s,n,i,o;if(t.length===0)return n=new Date(0),n.setUTCFullYear(e),n;if(s=Yi.MM.exec(t),s)return n=new Date(0),i=parseInt(s[1],10)-1,Lk(e,i)?(n.setUTCFullYear(e,i),n):new Date(NaN);if(s=Yi.DDD.exec(t),s){n=new Date(0);var r=parseInt(s[1],10);return gG(e,r)?(n.setUTCFullYear(e,0,r),n):new Date(NaN)}if(s=Yi.MMDD.exec(t),s){n=new Date(0),i=parseInt(s[1],10)-1;var c=parseInt(s[2],10);return Lk(e,i,c)?(n.setUTCFullYear(e,i,c),n):new Date(NaN)}if(s=Yi.Www.exec(t),s)return o=parseInt(s[1],10)-1,Rk(e,o)?Nk(e,o):new Date(NaN);if(s=Yi.WwwD.exec(t),s){o=parseInt(s[1],10)-1;var h=parseInt(s[2],10)-1;return Rk(e,o,h)?Nk(e,o,h):new Date(NaN)}return null}function fG(t){var e,s,n;if(e=Yi.HH.exec(t),e)return s=parseFloat(e[1].replace(",",".")),By(s)?s%24*Vy:NaN;if(e=Yi.HHMM.exec(t),e)return s=parseInt(e[1],10),n=parseFloat(e[2].replace(",",".")),By(s,n)?s%24*Vy+n*Mk:NaN;if(e=Yi.HHMMSS.exec(t),e){s=parseInt(e[1],10),n=parseInt(e[2],10);var i=parseFloat(e[3].replace(",","."));return By(s,n,i)?s%24*Vy+n*Mk+i*1e3:NaN}return null}function Nk(t,e,s){e=e||0,s=s||0;var n=new Date(0);n.setUTCFullYear(t,0,4);var i=n.getUTCDay()||7,o=e*7+s+1-i;return n.setUTCDate(n.getUTCDate()+o),n}var pG=[31,28,31,30,31,30,31,31,30,31,30,31],mG=[31,29,31,30,31,30,31,31,30,31,30,31];function yD(t){return t%400===0||t%4===0&&t%100!==0}function Lk(t,e,s){if(e<0||e>11)return!1;if(s!=null){if(s<1)return!1;var n=yD(t);if(n&&s>mG[e]||!n&&s>pG[e])return!1}return!0}function gG(t,e){if(e<1)return!1;var s=yD(t);return!(s&&e>366||!s&&e>365)}function Rk(t,e,s){return!(e<0||e>52||s!=null&&(s<0||s>6))}function By(t,e,s){return!(t!=null&&(t<0||t>=25)||e!=null&&(e<0||e>=60)||s!=null&&(s<0||s>=60))}var p1={exports:{}},m1={exports:{}};
50(function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=s;function s(n,i){if(n==null)throw new TypeError("assign requires that input parameter not be null or undefined");for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o]);return n}t.exports=e.default})(m1,m1.exports);var vG=m1.exports;(function(t,e){var s=Xq.default;Object.defineProperty(e,"__esModule",{value:!0}),e.default=i;var n=s(vG);function i(o){return(0,n.default)({},o)}t.exports=e.default})(p1,p1.exports);var bG=p1.exports;const yG=F_(bG);function _G(t,e,s){var n=f1(t,s),i=B_(e,n,!0),o=new Date(n.getTime()-i),r=new Date(0);return r.setFullYear(o.getUTCFullYear(),o.getUTCMonth(),o.getUTCDate()),r.setHours(o.getUTCHours(),o.getUTCMinutes(),o.getUTCSeconds(),o.getUTCMilliseconds()),r}function xG(t,e,s){if(typeof t=="string"&&!t.match(bD)){var n=yG(s);return n.timeZone=e,f1(t,n)}var i=f1(t,s),o=V_(i.getFullYear(),i.getMonth(),i.getDate(),i.getHours(),i.getMinutes(),i.getSeconds(),i.getMilliseconds()).getTime(),r=B_(e,new Date(o));return new Date(o+r)}const wG=(t,e=3)=>{const s=[];for(let n=0;n<t.length;n+=e)s.push([t[n],t[n+1],t[n+2]]);return s};function Fk(t){return e=>new Intl.DateTimeFormat(t,{weekday:"short",timeZone:"UTC"}).format(new Date(`2017-01-0${e}T00:00:00+00:00`)).slice(0,2)}function EG(t){return e=>xu(new Date(`2017-01-0${e}T00:00:00+00:00`),"EEEEEE",{locale:t})}const SG=(t,e,s)=>{const n=[1,2,3,4,5,6,7];let i;if(t!==null)try{i=n.map(EG(t))}catch{i=n.map(Fk(e))}else i=n.map(Fk(e));const o=i.slice(0,s),r=i.slice(s+1,i.length);return[i[s]].concat(...r).concat(...o)},kG=(t,e)=>{const s=[];for(let n=+t[0];n<=+t[1];n++)s.push({value:+n,text:`${n}`});return e?s.reverse():s},CG=(t,e,s)=>{const n=[1,2,3,4,5,6,7,8,9,10,11,12].map(o=>{const r=o<10?`0${o}`:o;return new Date(`2017-${r}-01T00:00:00+00:00`)});if(t!==null)try{const o=s==="long"?"MMMM":"MMM";return n.map((r,c)=>{const h=xu(r,o,{locale:t});return{text:h.charAt(0).toUpperCase()+h.substring(1),value:c}})}catch{}const i=new Intl.DateTimeFormat(e,{month:s,timeZone:"UTC"});return n.map((o,r)=>{const c=i.format(o);return{text:c.charAt(0).toUpperCase()+c.substring(1),value:r}})},TG=t=>[12,1,2,3,4,5,6,7,8,9,10,11,12,1,2,3,4,5,6,7,8,9,10,11][t],Dn=t=>{const e=Ne(t);return e!=null&&e.$el?e==null?void 0:e.$el:e},AG=t=>Object.assign({type:"dot"},t),_D=t=>Array.isArray(t)?!!t[0]&&!!t[1]:!1,fg={prop:t=>`"${t}" prop must be enabled!`,dateArr:t=>`You need to use array as "model-value" binding in order to support "${t}"`},xi=t=>t,Vk=t=>t===0?t:!t||isNaN(+t)?null:+t,OG=t=>t===0?!0:!!t,Bk=t=>t===null,DG=t=>{if(t)return[...t.querySelectorAll("input, button, select, textarea, a[href]")][0]},Uk=t=>Object.assign({menuAppear:"",open:"dp-slide-down",close:"dp-slide-up",next:"calendar-next",previous:"calendar-prev",vNext:"dp-slide-up",vPrevious:"dp-slide-down"},t),PG=t=>Object.assign({toggleOverlay:"Toggle overlay",menu:"Datepicker menu",input:"Datepicker input",calendarWrap:"Calendar wrapper",calendarDays:"Calendar days",openTimePicker:"Open time picker",closeTimePicker:"Close time Picker",incrementValue:e=>`Increment ${e}`,decrementValue:e=>`Decrement ${e}`,openTpOverlay:e=>`Open ${e} overlay`,amPmButton:"Switch AM/PM mode",openYearsOverlay:"Open years overlay",openMonthsOverlay:"Open months overlay",nextMonth:"Next month",prevMonth:"Previous month",day:()=>""},t),$G=t=>t===null?0:typeof t=="boolean"?t?2:0:+t>=2?+t:2,IG=(t,e,s)=>t||(typeof s=="string"?s:e),MG=t=>typeof t=="boolean"?t?Uk({}):!1:Uk(t),NG=()=>({enterSubmit:!0,tabSubmit:!0,openMenu:!0,rangeSeparator:" - "}),LG=t=>Object.assign({months:[],years:[],times:{hours:[],minutes:[],seconds:[]}},t),RG=t=>Object.assign({showSelect:!0,showCancel:!0,showNow:!1,showPreview:!0},t),Cr=t=>{const e=()=>{if(t.partialRange)return null;throw new Error(fg.prop("partial-range"))},s=Ae(()=>({ariaLabels:PG(t.ariaLabels),textInputOptions:Object.assign(NG(),t.textInputOptions),multiCalendars:$G(t.multiCalendars),previewFormat:IG(t.previewFormat,t.format,o()),filters:LG(t.filters),transitions:MG(t.transitions),startTime:x(),actionRow:RG(t.actionRow)})),n=oe=>{if(t.range)return oe();throw new Error(fg.prop("range"))},i=()=>{const oe=t.enableSeconds?":ss":"";return t.is24?`HH:mm${oe}`:`hh:mm${oe} aa`},o=()=>t.format?t.format:t.monthPicker?"MM/yyyy":t.timePicker?i():t.weekPicker?"MM/dd/yyyy":t.yearPicker?"yyyy":t.enableTimePicker?`MM/dd/yyyy, ${i()}`:"MM/dd/yyyy",r=(oe,K)=>{if(typeof t.format=="function")return t.format(oe);const H=K||o(),Ee=t.formatLocale?{locale:t.formatLocale}:void 0;return Array.isArray(oe)?`${xu(oe[0],H,Ee)}${t.modelAuto&&!oe[1]?"":s.value.textInputOptions.rangeSeparator||"-"}${oe[1]?xu(oe[1],H,Ee):""}`:xu(oe,H,Ee)},c=oe=>t.timezone?_G(oe,t.timezone):oe,h=oe=>t.timezone?xG(oe,t.timezone):oe,f=Ae(()=>oe=>{var K;return(K=t.hideNavigation)==null?void 0:K.includes(oe)}),v=oe=>{var K,H,Ee,_e;return Array.isArray(t.allowedDates)&&!((K=t.allowedDates)!=null&&K.length)?!0:(H=t.arrMapValues)!=null&&H.allowedDates?!F(oe,t.arrMapValues.allowedDates):(Ee=t.allowedDates)!=null&&Ee.length?!((_e=t.allowedDates)!=null&&_e.some(Ce=>Js(c(yt(Ce)),c(oe)))):!1},g=oe=>{var K;const H=t.maxDate?qi(c(oe),c(yt(t.maxDate))):!1,Ee=t.minDate?Ai(c(oe),c(yt(t.minDate))):!1,_e=F(oe,(K=t.arrMapValues)!=null&&K.disabledDates?t.arrMapValues.disabledDates:t.disabledDates),Ce=s.value.filters.months.map(Q=>+Q).includes(on(oe)),Re=t.disabledWeekDays.length?t.disabledWeekDays.some(Q=>+Q===wY(oe)):!1,Ke=v(oe),Be=cn(oe),Te=Be<+t.yearRange[0]||Be>+t.yearRange[1];return!(H||Ee||_e||Ce||Te||Re||Ke)},y=oe=>{const K={hours:lo(yt()),minutes:uo(yt()),seconds:t.enableSeconds?nd(yt()):0};return Object.assign(K,oe)},x=()=>t.range?t.startTime&&Array.isArray(t.startTime)?[y(t.startTime[0]),y(t.startTime[1])]:null:t.startTime&&!Array.isArray(t.startTime)?y(t.startTime):null,E=oe=>!g(oe),P=oe=>Array.isArray(oe)?$h(oe[0])&&(oe[1]?$h(oe[1]):!0):oe?$h(oe):!1,I=oe=>oe instanceof Date?oe:Aq(oe),D=oe=>{const K=Mu(c(oe),{weekStartsOn:+t.weekStart}),H=Tz(c(oe),{weekStartsOn:+t.weekStart});return[K,H]},F=(oe,K)=>oe?K instanceof Map?!!K.get(W(oe)):Array.isArray(K)?K.some(H=>Js(c(yt(H)),c(oe))):K(yt(JSON.parse(JSON.stringify(oe)))):!0,C=(oe,K,H)=>{let Ee=oe?yt(oe):yt();return(K||K===0)&&(Ee=Nc(Ee,K)),H&&(Ee=fo(Ee,H)),Ee},A=oe=>ni(yt(),nm(oe)),O=oe=>ni(yt(),{hours:+oe.hours||0,minutes:+oe.minutes||0,seconds:+oe.seconds||0}),j=(oe,K,H,Ee)=>{if(!oe)return!0;
50if(Ee){const _e=H==="max"?Zh(oe,K):Qh(oe,K),Ce={seconds:0,milliseconds:0};return _e||lu(ni(oe,Ce),ni(K,Ce))}return H==="max"?oe.getTime()<=K.getTime():oe.getTime()>=K.getTime()},te=()=>!t.enableTimePicker||t.monthPicker||t.yearPicker||t.ignoreTimeValidation,B=oe=>Array.isArray(oe)?[oe[0]?A(oe[0]):null,oe[1]?A(oe[1]):null]:A(oe),z=oe=>{const K=t.maxTime?O(t.maxTime):yt(t.maxDate);return Array.isArray(oe)?j(oe[0],K,"max",!!t.maxDate)&&j(oe[1],K,"max",!!t.maxDate):j(oe,K,"max",!!t.maxDate)},re=(oe,K)=>{const H=t.minTime?O(t.minTime):yt(t.minDate);return Array.isArray(oe)?j(oe[0],H,"min",!!t.minDate)&&j(oe[1],H,"min",!!t.minDate)&&K:j(oe,H,"min",!!t.minDate)&&K},ne=oe=>{let K=!0;if(!oe||te())return!0;const H=!t.minDate&&!t.maxDate?B(oe):oe;if((t.maxTime||t.maxDate)&&(K=z(xi(H))),(t.minTime||t.minDate)&&(K=re(xi(H),K)),t.disabledTimes){const Ee=Array.isArray(oe)?[nm(oe[0]),oe[1]?nm(oe[1]):void 0]:nm(oe);K=!t.disabledTimes(Ee)}return K},X=(oe,K)=>{const H=yt(JSON.parse(JSON.stringify(oe))),Ee=[];for(let _e=0;_e<7;_e++){const Ce=ho(H,_e),Re=on(Ce)!==K;Ee.push({text:t.hideOffsetDates&&Re?"":Ce.getDate(),value:Ce,current:!Re,classData:{}})}return Ee},G=(oe,K)=>{switch(t.sixWeeks===!0?"append":t.sixWeeks){case"prepend":return[!0,!1];case"center":return[oe==0,!0];case"fair":return[oe==0||K>oe,!0];case"append":return[!1,!1];default:return[!1,!1]}},ce=(oe,K)=>{const H=[],Ee=yt(c(new Date(K,oe))),_e=yt(c(new Date(K,oe+1,0))),Ce=t.weekStart,Re=Mu(Ee,{weekStartsOn:Ce}),Ke=Be=>{const Te=X(Be,oe);if(H.push({days:Te}),!H[H.length-1].days.some(Q=>Js(Vr(Q.value),Vr(_e)))){const Q=ho(Be,7);Ke(Q)}};if(Ke(Re),t.sixWeeks&&H.length<6){const Be=6-H.length,Te=(Ee.getDay()+7-Ce)%7,Q=6-(_e.getDay()+7-Ce)%7,[Se,Ve]=G(Te,Q);for(let Qe=1;Qe<=Be;Qe++)if(Ve?!!(Qe%2)==Se:Se){const je=H[0].days[0],nt=X(ho(je.value,-7),on(Ee));H.unshift({days:nt})}else{const je=H[H.length-1],nt=je.days[je.days.length-1],ft=X(ho(nt.value,1),on(Ee));H.push({days:ft})}}return H},be=(oe,K,H)=>[ni(yt(oe),{date:1}),ni(yt(),{month:K,year:H,date:1})],J=(oe,K)=>Ai(...be(t.minDate,oe,K))||Js(...be(t.minDate,oe,K)),Z=(oe,K)=>qi(...be(t.maxDate,oe,K))||Js(...be(t.maxDate,oe,K)),ge=(oe,K,H)=>{let Ee=!1;return t.maxDate&&H&&Z(oe,K)&&(Ee=!0),t.minDate&&!H&&J(oe,K)&&(Ee=!0),Ee},q=(oe,K,H,Ee)=>{let _e=!1;return Ee?t.minDate&&t.maxDate?_e=ge(oe,K,H):(t.minDate&&J(oe,K)||t.maxDate&&Z(oe,K))&&(_e=!0):_e=!0,_e},W=oe=>{const K=Vr(c(yt(oe))).toISOString(),[H]=K.split("T");return H},M=oe=>new Map(oe.map(K=>[W(K),!0])),he=oe=>Array.isArray(oe)&&oe.length>0;return{checkPartialRangeValue:e,checkRangeEnabled:n,getZonedDate:c,getZonedToUtc:h,formatDate:r,getDefaultPattern:o,validateDate:g,getDefaultStartTime:x,isDisabled:E,isValidDate:P,sanitizeDate:I,getWeekFromDate:D,matchDate:F,setDateMonthOrYear:C,isValidTime:ne,getCalendarDays:ce,validateMonthYearInRange:q,validateMaxDate:Z,validateMinDate:J,assignDefaultTime:y,mapDatesArrToMap:oe=>{he(t.allowedDates)&&(oe.allowedDates=M(t.allowedDates)),he(t.highlight)&&(oe.highlightedDates=M(t.highlight)),he(t.disabledDates)&&(oe.disabledDates=M(t.disabledDates))},defaults:s,hideNavigationButtons:f}},un=en({monthYear:[],calendar:[],time:[],actionRow:[],selectionGrid:[],timePicker:{0:[],1:[]},monthPicker:[]}),Uy=ve(null),im=ve(!1),jy=ve(!1),Hy=ve(!1),Wy=ve(!1),Vi=ve(0),li=ve(0),Al=()=>{const t=Ae(()=>im.value?[...un.selectionGrid,un.actionRow].filter(g=>g.length):jy.value?[...un.timePicker[0],...un.timePicker[1],Wy.value?[]:[Uy.value],un.actionRow].filter(g=>g.length):Hy.value?[...un.monthPicker,un.actionRow]:[un.monthYear,...un.calendar,un.time,un.actionRow].filter(g=>g.length)),e=g=>{Vi.value=g?Vi.value+1:Vi.value-1;let y=null;t.value[li.value]&&(y=t.value[li.value][Vi.value]),y||(Vi.value=g?Vi.value-1:Vi.value+1)},s=g=>{li.value===0&&!g||li.value===t.value.length&&g||(li.value=g?li.value+1:li.value-1,t.value[li.value]?t.value[li.value]&&!t.value[li.value][Vi.value]&&Vi.value!==0&&(Vi.value=t.value[li.value].length-1):li.value=g?li.value-1:li.value+1)},n=g=>{let y=null;t.value[li.value]&&(y=t.value[li.value][Vi.value]),y?y.focus({preventScroll:!im.value}):Vi.value=g?Vi.value-1:Vi.value+1},i=()=>{e(!0),n(!0)},o=()=>{e(!1),n(!1)},r=()=>{s(!1),n(!0)},c=()=>{s(!0),n(!0)},h=(g,y)=>{un[y]=g}
50,f=(g,y)=>{un[y]=g},v=()=>{Vi.value=0,li.value=0};return{buildMatrix:h,buildMultiLevelMatrix:f,setTimePickerBackRef:g=>{Uy.value=g},setSelectionGrid:g=>{im.value=g,v(),g||(un.selectionGrid=[])},setTimePicker:(g,y=!1)=>{jy.value=g,Wy.value=y,v(),g||(un.timePicker[0]=[],un.timePicker[1]=[])},setTimePickerElements:(g,y=0)=>{un.timePicker[y]=g},arrowRight:i,arrowLeft:o,arrowUp:r,arrowDown:c,clearArrowNav:()=>{un.monthYear=[],un.calendar=[],un.time=[],un.actionRow=[],un.selectionGrid=[],un.timePicker[0]=[],un.timePicker[1]=[],im.value=!1,jy.value=!1,Wy.value=!1,Hy.value=!1,v(),Uy.value=null},setMonthPicker:g=>{Hy.value=g,v()},refSets:un}},jk=t=>Array.isArray(t),Jl=t=>Array.isArray(t),Hk=t=>Array.isArray(t)&&t.length===2,FG=(t,e,s,n,i)=>{const{getDefaultStartTime:o,isDisabled:r,sanitizeDate:c,getWeekFromDate:h,setDateMonthOrYear:f,validateMonthYearInRange:v,defaults:g}=Cr(t),y=Ae({get:()=>t.internalModelValue,set:fe=>{!t.readonly&&!t.disabled&&e("update:internal-model-value",fe)}}),x=ve([]);Pt(y,(fe,Oe)=>{t.range?te():lu(fe,Oe)||te()});const E=Xc(t,"multiCalendars");Pt(E,()=>{Ye(0)});const P=ve([{month:on(yt()),year:cn(yt())}]);Pt(P,()=>{P.value.forEach((fe,Oe)=>{e("update-month-year",{instance:Oe,month:fe.month,year:fe.year})})},{deep:!0});const I=en({hours:t.range?[lo(yt()),lo(yt())]:lo(yt()),minutes:t.range?[uo(yt()),uo(yt())]:uo(yt()),seconds:t.range?[0,0]:0}),D=Ae(()=>fe=>P.value[fe]?P.value[fe].month:0),F=Ae(()=>fe=>P.value[fe]?P.value[fe].year:0),C=Ae(()=>{var fe;return(fe=t.flow)!=null&&fe.length&&!t.partialFlow?i.value===t.flow.length:!0}),A=(fe,Oe,Xe)=>{var at,wt;P.value[fe]||(P.value[fe]={month:0,year:0}),P.value[fe].month=Bk(Oe)?(at=P.value[fe])==null?void 0:at.month:Oe,P.value[fe].year=Bk(Xe)?(wt=P.value[fe])==null?void 0:wt.year:Xe},O=(fe,Oe)=>{I[fe]=Oe},j=()=>{t.startDate&&(A(0,on(yt(t.startDate)),cn(yt(t.startDate))),g.value.multiCalendars&&Ye(0))};Xt(()=>{y.value||(j(),g.value.startTime&&Z()),te(!0),t.focusStartDate&&t.startDate&&j()});const te=(fe=!1)=>{if(y.value)return Array.isArray(y.value)?(x.value=y.value,X(fe)):z(y.value,fe);if(t.timePicker)return G();if(t.monthPicker&&!t.range)return ce();if(t.yearPicker&&!t.range)return be();if(g.value.multiCalendars&&fe&&!t.startDate)return B(yt(),fe)},B=(fe,Oe=!1)=>{if((!g.value.multiCalendars||!t.multiStatic||Oe)&&A(0,on(fe),cn(fe)),g.value.multiCalendars)for(let Xe=1;Xe<g.value.multiCalendars;Xe++){const at=ni(yt(),{month:D.value(Xe-1),year:F.value(Xe-1)}),wt=WO(at,{months:1});P.value[Xe]={month:on(wt),year:cn(wt)}}},z=(fe,Oe)=>{B(fe),O("hours",lo(fe)),O("minutes",uo(fe)),O("seconds",nd(fe)),g.value.multiCalendars&&Oe&&q()},re=(fe,Oe)=>{fe[1]&&t.showLastInRange?B(fe[1],Oe):B(fe[0],Oe);const Xe=(at,wt)=>[at(fe[0]),fe[1]?at(fe[1]):I[wt][1]];O("hours",Xe(lo,"hours")),O("minutes",Xe(uo,"minutes")),O("seconds",Xe(nd,"seconds"))},ne=(fe,Oe)=>{if((t.range||t.weekPicker)&&!t.multiDates)return re(fe,Oe);if(t.multiDates){const Xe=fe[fe.length-1];return z(Xe,Oe)}},X=fe=>{const Oe=y.value;ne(Oe,fe),g.value.multiCalendars&&t.multiCalendarsSolo&&q()},G=()=>{if(Z(),!t.range)y.value=Nr(yt(),I.hours,I.minutes,J());else{const fe=I.hours,Oe=I.minutes;y.value=[Nr(yt(),fe[0],Oe[0],J()),Nr(yt(),fe[1],Oe[1],J(!1))]}},ce=()=>{t.multiDates?y.value=[f(yt(),D.value(0),F.value(0))]:y.value=f(yt(),D.value(0),F.value(0))},be=()=>{y.value=yt()},J=(fe=!0)=>t.enableSeconds?Array.isArray(I.seconds)?fe?I.seconds[0]:I.seconds[1]:I.seconds:0,Z=()=>{const fe=o();if(fe){const Oe=Array.isArray(fe),Xe=Oe?[+fe[0].hours,+fe[1].hours]:+fe.hours,at=Oe?[+fe[0].minutes,+fe[1].minutes]:+fe.minutes,wt=Oe?[+fe[0].seconds,+fe[1].seconds]:+fe.seconds;O("hours",Xe),O("minutes",at),t.enableSeconds&&O("seconds",wt)}},ge=()=>Array.isArray(y.value)&&y.value.length?y.value[y.value.length-1]:null,q=()=>{if(Array.isArray(y.value)&&y.value.length===2){const fe=yt(yt(y.value[1]?y.value[1]:Ma(y.value[0],1))),[Oe,Xe]=[on(y.value[0]),cn(y.value[0])],[at,wt]=[on(y.value[1]),cn(y.value[1])];(Oe!==at||Oe===at&&Xe!==wt)&&t.multiCalendarsSolo&&A(1,on(fe),cn(fe))}else y.value&&!Array.isArray(y.value)&&A(0,on(y.value),cn(y.value))},W=fe=>{const Oe=Ma(fe,1);return{month:on(Oe),year:cn(Oe)}},M=fe=>{const Oe=on(yt(fe)),Xe=cn(yt(fe));if(A(0,Oe,Xe),g.value.multiCalendars>0)for(let at=1;at<g.value.multiCalendars;at++){const wt=W(ni(yt(fe),{year:D.value(at-1),month:F.value(at-1)}));A(at,wt.month,wt.year)}},he=fe=>{if(y.value&&Array.isArray(y.value))if(y.value.some(Oe=>Js(fe,Oe))){const Oe=y.value.filter(Xe=>!Js(Xe,fe));y.value=Oe.length?Oe:null}else(t.multiDatesLimit&&+t.multiDatesLimit>y.value.length||!t.multiDatesLimit)&&y.value.push(fe);else y.value=[fe]},oe=(fe,Oe)=>{const Xe=qi(fe,Oe)?Oe:fe,at=qi(Oe,fe)?Oe:fe;return xk({start:Xe,end:at})},K=(fe,Oe=0)=>{if(Array.isArray(y.value)&&y.value[Oe]){const Xe=kz(fe,y.value[Oe]),at=oe(y.value[Oe],fe),wt=at.length===1?0:at.filter(pt=>
50r(pt)).length,gt=Math.abs(Xe)-wt;if(t.minRange&&t.maxRange)return gt>=+t.minRange&><=+t.maxRange;if(t.minRange)return gt>=+t.minRange;if(t.maxRange)return gt<=+t.maxRange}return!0},H=fe=>Array.isArray(y.value)&&y.value.length===2?t.fixedStart&&(qi(fe,y.value[0])||Js(fe,y.value[0]))?[y.value[0],fe]:t.fixedEnd&&(Ai(fe,y.value[1])||Js(fe,y.value[1]))?[fe,y.value[1]]:(e("invalid-fixed-range",fe),y.value):[],Ee=()=>{t.autoApply&&C.value&&e("auto-apply",t.partialFlow)},_e=()=>{t.autoApply&&e("select-date")},Ce=fe=>!xk({start:fe[0],end:fe[1]}).some(Oe=>r(Oe)),Re=fe=>(y.value=h(yt(fe.value)),Ee()),Ke=fe=>{const Oe=Nr(yt(fe.value),I.hours,I.minutes,J());t.multiDates?he(Oe):y.value=Oe,s(),Ee()},Be=()=>{x.value=y.value?y.value.slice():[],x.value.length===2&&!(t.fixedStart||t.fixedEnd)&&(x.value=[])},Te=(fe,Oe)=>{const Xe=[yt(fe.value),ho(yt(fe.value),+t.autoRange)];Ce(Xe)&&(Oe&&M(fe.value),x.value=Xe)},Q=fe=>{Se(fe.value)||!K(fe.value,t.fixedStart?0:1)||(x.value=H(yt(fe.value)))},Se=fe=>t.noDisabledRange?oe(x.value[0],fe).some(Oe=>r(Oe)):!1,Ve=(fe,Oe)=>{if(Be(),t.autoRange)return Te(fe,Oe);if(t.fixedStart||t.fixedEnd)return Q(fe);x.value[0]?K(yt(fe.value))&&!Se(fe.value)&&(Ai(yt(fe.value),yt(x.value[0]))?(x.value.unshift(yt(fe.value)),e("range-end",x.value[0])):(x.value[1]=yt(fe.value),e("range-end",x.value[1]))):(x.value[0]=yt(fe.value),e("range-start",x.value[0]))},Qe=fe=>{x.value[fe]=Nr(x.value[fe],I.hours[fe],I.minutes[fe],J(fe!==1))},je=()=>{var fe,Oe;x.value[0]&&x.value[1]&&+((fe=x.value)==null?void 0:fe[0])>+((Oe=x.value)==null?void 0:Oe[1])&&(x.value.reverse(),e("range-start",x.value[0]),e("range-end",x.value[1]))},nt=()=>{x.value.length&&(x.value[0]&&!x.value[1]?Qe(0):(Qe(0),Qe(1),s()),je(),y.value=x.value.slice(),x.value[0]&&x.value[1]&&t.autoApply&&e("auto-apply"),x.value[0]&&!x.value[1]&&t.modelAuto&&t.autoApply&&e("auto-apply"))},ft=(fe,Oe=!1)=>{if(!(r(fe.value)||!fe.current&&t.hideOffsetDates)){if(t.weekPicker)return Re(fe);if(!t.range)return Ke(fe);Jl(I.hours)&&Jl(I.minutes)&&!t.multiDates&&(Ve(fe,Oe),nt())}},ut=fe=>{const Oe=fe[0];return t.weekNumbers==="local"?OY(Oe.value,{weekStartsOn:+t.weekStart}):t.weekNumbers==="iso"?kY(Oe.value):typeof t.weekNumbers=="function"?t.weekNumbers(Oe.value):""},Ye=fe=>{for(let Oe=fe-1;Oe>=0;Oe--){const Xe=Uc(ni(yt(),{month:D.value(Oe+1),year:F.value(Oe+1)}),1);A(Oe,on(Xe),cn(Xe))}for(let Oe=fe+1;Oe<=g.value.multiCalendars-1;Oe++){const Xe=Ma(ni(yt(),{month:D.value(Oe-1),year:F.value(Oe-1)}),1);A(Oe,on(Xe),cn(Xe))}},We=fe=>f(yt(),D.value(fe),F.value(fe)),ot=fe=>Nr(fe,I.hours,I.minutes,J()),ht=fe=>{he(We(fe))},Tt=(fe,Oe)=>{const Xe=t.monthPicker?D.value(fe)!==Oe.month||!Oe.fromNav:F.value(fe)!==Oe.year||!Oe.fromNav;if(A(fe,Oe.month,Oe.year),g.value.multiCalendars&&!t.multiCalendarsSolo&&Ye(fe),t.monthPicker||t.yearPicker)if(t.multiDates)Xe&&ht(fe);else if(t.range){if(Xe&&K(We(fe))){let at=y.value?y.value.slice():[];at.length===2&&at[1]!==null&&(at=[]),at.length?Ai(We(fe),at[0])?at.unshift(We(fe)):at[1]=We(fe):at=[We(fe)],y.value=at}}else(t.autoApplyMonth||Xe)&&(y.value=We(fe));n(t.multiCalendarsSolo?fe:void 0)},Ot=async(fe=!1)=>{if(t.autoApply&&(t.monthPicker||t.yearPicker)){await vs();const Oe=t.monthPicker?fe:!1;t.range?e("auto-apply",Oe||!y.value||y.value.length===1):e("auto-apply",Oe)}s()},zt=(fe,Oe)=>{const Xe=ni(yt(),{month:D.value(Oe),year:F.value(Oe)}),at=fe<0?Ma(Xe,1):Uc(Xe,1);v(on(at),cn(at),fe<0,t.preventMinMaxNavigation)&&(A(Oe,on(at),cn(at)),g.value.multiCalendars&&!t.multiCalendarsSolo&&Ye(Oe),n())},Kt=fe=>{jk(fe)&&jk(y.value)&&Jl(I.hours)&&Jl(I.minutes)?(fe[0]&&y.value[0]&&(y.value[0]=Nr(fe[0],I.hours[0],I.minutes[0],J())),fe[1]&&y.value[1]&&(y.value[1]=Nr(fe[1],I.hours[1],I.minutes[1],J(!1)))):t.multiDates&&Array.isArray(y.value)?y.value[y.value.length-1]=ot(fe):!t.range&&!Hk(fe)&&(y.value=ot(fe)),e("time-update")},Fe=(fe,Oe=!0,Xe=!1)=>{const at=Oe?fe:I.hours,wt=!Oe&&!Xe?fe:I.minutes,gt=Xe?fe:I.seconds;if(t.range&&Hk(y.value)&&Jl(at)&&Jl(wt)&&Jl(gt)&&!t.disableTimeRangeValidation){const pt=it=>Nr(y.value[it],at[it],wt[it],gt[it]),He=it=>R_(y.value[it],0);if(Js(y.value[0],y.value[1])&&(Qh(pt(0),He(1))||Zh(pt(1),He(0))))return}if(O("hours",at),O("minutes",wt),O("seconds",gt),y.value)if(t.multiDates){const pt=ge();pt&&Kt(pt)}else Kt(y.value);else t.timePicker&&Kt(t.range?[yt(),yt()]:yt());s()},ee=(fe,Oe)=>
50{t.monthChangeOnScroll&&zt(t.monthChangeOnScroll!=="inverse"?-fe.deltaY:fe.deltaY,Oe)},R=(fe,Oe,Xe=!1)=>{t.monthChangeOnArrows&&t.vertical===Xe&&we(fe,Oe)},we=(fe,Oe)=>{zt(fe==="right"?-1:1,Oe)};return{time:I,month:D,year:F,modelValue:y,calendars:P,monthYearSelect:Ot,isDisabled:r,updateTime:Fe,getWeekNum:ut,selectDate:ft,updateMonthYear:Tt,handleScroll:ee,getMarker:fe=>t.markers.find(Oe=>Js(c(fe.value),c(Oe.date))),handleArrow:R,handleSwipe:we,selectCurrentDate:()=>{t.range?y.value&&Array.isArray(y.value)&&y.value[0]?y.value=Ai(yt(),y.value[0])?[yt(),y.value[0]]:[y.value[0],yt()]:y.value=[yt()]:y.value=yt(),_e()},presetDateRange:(fe,Oe)=>{Oe||fe.length&&fe.length<=2&&t.range&&(y.value=fe.map(Xe=>yt(Xe)),_e(),t.multiCalendars&&vs().then(()=>te(!0)))}}},VG=(t,e,s)=>{const n=ve(),{getZonedToUtc:i,getZonedDate:o,formatDate:r,getDefaultPattern:c,checkRangeEnabled:h,checkPartialRangeValue:f,isValidDate:v,setDateMonthOrYear:g,defaults:y}=Cr(e),x=ve(""),E=Xc(e,"format");Pt(n,()=>{t("internal-model-change",n.value)}),Pt(E,()=>{ge()});const P=K=>{const H=K||yt();return e.modelType?W(H):{hours:lo(H),minutes:uo(H),seconds:e.enableSeconds?nd(H):0}},I=K=>e.modelType?W(K):{month:on(K),year:cn(K)},D=K=>Array.isArray(K)?h(()=>[fo(yt(),K[0]),K[1]?fo(yt(),K[1]):f()]):fo(yt(),+K),F=(K,H)=>(typeof K=="string"||typeof K=="number")&&e.modelType?q(K):H,C=K=>Array.isArray(K)?[F(K[0],Nr(null,+K[0].hours,+K[0].minutes,K[0].seconds)),F(K[1],Nr(null,+K[1].hours,+K[1].minutes,K[1].seconds))]:F(K,Nr(null,K.hours,K.minutes,K.seconds)),A=K=>Array.isArray(K)?e.multiDates?K.map(H=>F(H,g(null,+H.month,+H.year))):h(()=>[F(K[0],g(null,+K[0].month,+K[0].year)),F(K[1],K[1]?g(null,+K[1].month,+K[1].year):f())]):F(K,g(null,+K.month,+K.year)),O=K=>{if(Array.isArray(K))return K.map(H=>q(H));throw new Error(fg.dateArr("multi-dates"))},j=K=>{if(Array.isArray(K))return[yt(K[0]),yt(K[1])];throw new Error(fg.dateArr("week-picker"))},te=K=>e.modelAuto?Array.isArray(K)?[q(K[0]),q(K[1])]:e.autoApply?[q(K)]:[q(K),null]:Array.isArray(K)?h(()=>[q(K[0]),K[1]?q(K[1]):f()]):q(K),B=()=>{Array.isArray(n.value)&&e.range&&n.value.length===1&&n.value.push(f())},z=()=>{const K=n.value;return[W(K[0]),K[1]?W(K[1]):f()]},re=()=>n.value[1]?z():W(xi(n.value[0])),ne=()=>(n.value||[]).map(K=>W(K)),X=()=>(B(),e.modelAuto?re():e.multiDates?ne():Array.isArray(n.value)?h(()=>z()):W(xi(n.value))),G=K=>K?e.timePicker?C(xi(K)):e.monthPicker?A(xi(K)):e.yearPicker?D(xi(K)):e.multiDates?O(xi(K)):e.weekPicker?j(xi(K)):te(xi(K)):null,ce=K=>{const H=G(K);v(xi(H))?(n.value=xi(H),ge()):(n.value=null,x.value="")},be=()=>{var K;const H=Ee=>{var _e;return xu(Ee,(_e=y.value.textInputOptions)==null?void 0:_e.format)};return`${H(n.value[0])} ${(K=y.value.textInputOptions)==null?void 0:K.rangeSeparator} ${n.value[1]?H(n.value[1]):""}`},J=()=>{var K;return s.value&&n.value?Array.isArray(n.value)?be():xu(n.value,(K=y.value.textInputOptions)==null?void 0:K.format):r(n.value)},Z=()=>{var K;return n.value?e.multiDates?n.value.map(H=>r(H)).join("; "):e.textInput&&typeof((K=y.value.textInputOptions)==null?void 0:K.format)=="string"?J():r(n.value):""},ge=()=>{!e.format||typeof e.format=="string"||e.textInput&&typeof e.textInputOptions.format=="string"?x.value=Z():x.value=e.format(n.value)},q=K=>{if(e.utc){const H=new Date(K);return e.utc==="preserve"?new Date(H.getTime()+H.getTimezoneOffset()*6e4):H}return e.modelType?e.modelType==="date"||e.modelType==="timestamp"?o(new Date(K)):e.modelType==="format"&&(typeof e.format=="string"||!e.format)?u1(K,c(),new Date):o(u1(K,e.modelType,new Date)):o(new Date(K))},W=K=>K?e.utc?Gq(K,e.utc==="preserve",e.enableSeconds):e.modelType?e.modelType==="timestamp"?+i(K):e.modelType==="format"&&(typeof e.format=="string"||!e.format)?r(i(K)):r(i(K),e.modelType):i(K):"",M=K=>{t("update:model-value",K)},he=K=>Array.isArray(n.value)?e.multiDates?n.value.map(H=>K(H)):[K(n.value[0]),n.value[1]?K(n.value[1]):f()]:K(xi(n.value)),oe=K=>M(xi(he(K)));return{inputValue:x,internalModelValue:n,checkBeforeEmit:()=>n.value?e.range?e.partialRange?n.value.length>=1:n.value.length===2:!!n.value:!1,parseExternalModelValue:ce,formatInputValue:ge,emitModelValue:()=>
50(ge(),e.monthPicker?oe(I):e.timePicker?oe(P):e.yearPicker?oe(cn):e.weekPicker?M(n.value):M(X()))}},BG=(t,e)=>{const{validateMonthYearInRange:s,validateMaxDate:n,validateMinDate:i,defaults:o}=Cr(t),r=(g,y)=>{let x=g;return o.value.filters.months.includes(on(x))?(x=y?Ma(g,1):Uc(g,1),r(x,y)):x},c=(g,y)=>{let x=g;return o.value.filters.years.includes(cn(x))?(x=y?zO(g,1):zq(g,1),c(x,y)):x},h=g=>{const y=ni(new Date,{month:t.month,year:t.year});let x=g?Ma(y,1):Uc(y,1);t.disableYearSelect&&(x=fo(x,t.year));let E=on(x),P=cn(x);o.value.filters.months.includes(E)&&(x=r(x,g),E=on(x),P=cn(x)),o.value.filters.years.includes(P)&&(x=c(x,g),P=cn(x)),s(E,P,g,t.preventMinMaxNavigation)&&f(E,P)},f=(g,y)=>{e("update-month-year",{month:g,year:y})},v=Ae(()=>g=>{if(!t.preventMinMaxNavigation||g&&!t.maxDate||!g&&!t.minDate)return!1;const y=ni(new Date,{month:t.month,year:t.year}),x=g?Ma(y,1):Uc(y,1),E=[on(x),cn(x)];return g?!n(...E):!i(...E)});return{handleMonthYearChange:h,isDisabled:v,updateMonthYear:f}};var Sm=(t=>(t.center="center",t.left="left",t.right="right",t))(Sm||{});const UG=(t,e,s,n)=>{const i=ve({top:"0",left:"0",transform:"none",opacity:"0"}),o=ve(!1),r=Xc(n,"teleportCenter"),c=Ae(()=>o.value?"-100%":"0"),h=()=>{f(),i.value.opacity="0"};Pt(r,()=>{F()}),Xt(()=>{f()});const f=()=>{const X=Dn(e);if(X){const{top:G,left:ce,width:be,height:J}=E(X);i.value.top=`${G+J/2}px`,x(ce,be,50)}},v=X=>{if(n.teleport){const G=X.getBoundingClientRect();return{left:G.left+window.scrollX,top:G.top+window.scrollY}}return{top:0,left:0}},g=(X,G)=>{i.value.left=`${X+G}px`,i.value.transform=`translate(-100%, ${c.value})`},y=X=>{i.value.left=`${X}px`,i.value.transform=`translate(0, ${c.value})`},x=(X,G,ce)=>{n.position===Sm.left&&y(X),n.position===Sm.right&&g(X,G),n.position===Sm.center&&(i.value.left=`${X+G/2}px`,i.value.transform=ce?`translate(-50%, -${ce}%)`:`translate(-50%, ${c.value})`)},E=X=>{const{width:G,height:ce}=X.getBoundingClientRect(),{top:be,left:J}=n.altPosition?n.altPosition(X):v(X);return{top:+be,left:+J,width:G,height:ce}},P=()=>{const X=Dn(e);if(X){const{top:G,left:ce,width:be,height:J}=E(X),Z=te();i.value.top=`${G+J/2}px`,x(ce,be,Z==="top"?100:0)}},I=()=>{i.value.left="50%",i.value.top="50%",i.value.transform="translate(-50%, -50%)",i.value.position="fixed",delete i.value.opacity},D=()=>{const X=Dn(e),{top:G,left:ce,transform:be}=n.altPosition(X);i.value={top:`${G}px`,left:`${ce}px`,transform:be||""}},F=(X=!0)=>{if(!n.inline)return r.value?I():n.altPosition!==null?D():(X&&s("recalculate-position"),z())},C=({inputEl:X,menuEl:G,left:ce,width:be})=>{window.screen.width>768&&x(ce,be),j(X,G)},A=(X,G)=>{const{top:ce,left:be,height:J,width:Z}=E(X);i.value.top=`${J+ce+ +n.offset}px`,o.value=!1,C({inputEl:X,menuEl:G,left:be,width:Z})},O=(X,G)=>{const{top:ce,left:be,width:J}=E(X);i.value.top=`${ce-+n.offset}px`,o.value=!0,C({inputEl:X,menuEl:G,left:be,width:J})},j=(X,G)=>{if(n.autoPosition){const{left:ce,width:be}=E(X),{left:J,right:Z}=G.getBoundingClientRect();return J<=0?y(ce):Z>=document.documentElement.clientWidth?g(ce,be):x(ce,be)}},te=()=>{const X=Dn(t),G=Dn(e);if(X&&G){const{height:ce}=X.getBoundingClientRect(),{top:be,height:J}=G.getBoundingClientRect(),Z=window.innerHeight-be-J,ge=be;return ce<=Z?"bottom":ce>Z&&ce<=ge?"top":Z>=ge?"bottom":"top"}return"bottom"},B=(X,G)=>te()==="bottom"?A(X,G):O(X,G),z=()=>{const X=Dn(e),G=Dn(t);if(X&&G)return n.autoPosition?B(X,G):A(X,G)},re=function(X){if(X){const G=X.scrollHeight>X.clientHeight,ce=window.getComputedStyle(X).overflowY.indexOf("hidden")!==-1;return G&&!ce}return!0},ne=function(X){return!X||X===document.body||X.nodeType===Node.DOCUMENT_FRAGMENT_NODE?window:re(X)?X:ne(X.parentNode)};return{openOnTop:o,menuStyle:i,resetPosition:h,setMenuPosition:F,setInitialPosition:P,getScrollableParent:ne}},xc=[{name:"clock-icon",use:["time","calendar"]},{name:"arrow-left",use:["month-year","calendar"]},{name:"arrow-right",use:["month-year","calendar"]},{name:"arrow-up",use:["time","calendar","month-year"]},{name:"arrow-down",use:["time","calendar","month-year"]},{name:"calendar-icon",use:["month-year","time","calendar"]},{name:"day",use:["calendar"]},{name:"month-overlay-value",use:["calendar","month-year"]},{name:"year-overlay-value",use:["calendar","month-year"]},{name:"year-overlay",use:["month-year"]},{name:"month-overlay",use:["month-year"]},{name:"month-overlay-header",use:["month-year"]},{name:"year-overlay-header",use:["month-year"]},{name:"hours-overlay-value",use:["calendar","time"]},{name:"minutes-overlay-value",use:["calendar","time"]},{name:"seconds-overlay-value",use:["calendar","time"]},{name:"hours",use:["calendar","time"]},{name:"minutes",use:["calendar","time"]},{name:"month",use:["calendar","month-year"]},{name:"year",use:["calendar","month-year"]},{name:"action-buttons",use:["action"]},{name:"action-preview",use:["action"]},{name:"calendar-header",use:["calendar"]},{name:"marker-tooltip",use:["calendar"]},{name:"action-extra",use:["menu"]},{name:"time-picker-overlay",use:["calendar","time"]},{name:"am-pm-button",use:["calendar","time"]},{name:"left-sidebar",use:["menu"]},{name:"right-sidebar",use:["menu"]},{name:"month-year",use:["month-year"]},{name:"time-picker",use:["menu"]},{name:"action-row",use:["action"]},{name:"marker",use:["calendar"]}],jG=[{name:"trigger"},{name:"input-icon"},{name:"clear-icon"},{name:"dp-input"}],HG={all:()=>xc,monthYear:()=>xc.filter(t=>t.use.includes("month-year")),input:()=>jG,timePicker:()=>xc.filter(t=>t.use.includes("time")),action:()=>xc.filter(t=>
50t.use.includes("action")),calendar:()=>xc.filter(t=>t.use.includes("calendar")),menu:()=>xc.filter(t=>t.use.includes("menu"))},uu=(t,e,s)=>{const n=[];return HG[e]().forEach(i=>{t[i.name]&&n.push(i.name)}),s&&s.length&&s.forEach(i=>{i.slot&&n.push(i.slot)}),n},uv=t=>({transitionName:Ae(()=>e=>t&&typeof t!="boolean"?e?t.open:t.close:""),showTransition:!!t}),Ol={multiCalendars:{type:[Boolean,Number,String],default:null},modelValue:{type:[String,Date,Array,Object,Number],default:null},modelType:{type:String,default:null},position:{type:String,default:"center"},dark:{type:Boolean,default:!1},format:{type:[String,Function],default:()=>null},closeOnScroll:{type:Boolean,default:!1},autoPosition:{type:Boolean,default:!0},closeOnAutoApply:{type:Boolean,default:!0},altPosition:{type:Function,default:null},transitions:{type:[Boolean,Object],default:!0},formatLocale:{type:Object,default:null},utc:{type:[Boolean,String],default:!1},ariaLabels:{type:Object,default:()=>({})},offset:{type:[Number,String],default:10},hideNavigation:{type:Array,default:()=>[]},timezone:{type:String,default:null},vertical:{type:Boolean,default:!1},disableMonthYearSelect:{type:Boolean,default:!1},disableYearSelect:{type:Boolean,default:!1},menuClassName:{type:String,default:null},dayClass:{type:Function,default:null},yearRange:{type:Array,default:()=>[1900,2100]},multiCalendarsSolo:{type:Boolean,default:!1},calendarCellClassName:{type:String,default:null},enableTimePicker:{type:Boolean,default:!0},autoApply:{type:Boolean,default:!1},disabledDates:{type:[Array,Function],default:()=>[]},monthNameFormat:{type:String,default:"short"},startDate:{type:[Date,String],default:null},startTime:{type:[Object,Array],default:null},hideOffsetDates:{type:Boolean,default:!1},autoRange:{type:[Number,String],default:null},noToday:{type:Boolean,default:!1},disabledWeekDays:{type:Array,default:()=>[]},allowedDates:{type:Array,default:null},showNowButton:{type:Boolean,default:!1},nowButtonLabel:{type:String,default:"Now"},markers:{type:Array,default:()=>[]},modeHeight:{type:[Number,String],default:255},escClose:{type:Boolean,default:!0},spaceConfirm:{type:Boolean,default:!0},monthChangeOnArrows:{type:Boolean,default:!0},presetRanges:{type:Array,default:()=>[]},flow:{type:Array,default:()=>[]},partialFlow:{type:Boolean,default:!1},preventMinMaxNavigation:{type:Boolean,default:!1},minRange:{type:[Number,String],default:null},maxRange:{type:[Number,String],default:null},multiDatesLimit:{type:[Number,String],default:null},reverseYears:{type:Boolean,default:!1},keepActionRow:{type:Boolean,default:!1},weekPicker:{type:Boolean,default:!1},filters:{type:Object,default:()=>({})},arrowNavigation:{type:Boolean,default:!1},multiStatic:{type:Boolean,default:!0},disableTimeRangeValidation:{type:Boolean,default:!1},highlight:{type:[Array,Function],default:null},highlightWeekDays:{type:Array,default:null},highlightDisabledDays:{type:Boolean,default:!1},teleport:{type:[String,Boolean],default:null},teleportCenter:{type:Boolean,default:!1},locale:{type:String,default:"en-Us"},weekNumName:{type:String,default:"W"},weekStart:{type:[Number,String],default:1},weekNumbers:{type:[String,Function],default:null},calendarClassName:{type:String,default:null},noSwipe:{type:Boolean,default:!1},monthChangeOnScroll:{type:[Boolean,String],default:!0},dayNames:{type:[Function,Array],default:null},monthPicker:{type:Boolean,default:!1},customProps:{type:Object,default:null},yearPicker:{type:Boolean,default:!1},modelAuto:{type:Boolean,default:!1},selectText:{type:String,default:"Select"},cancelText:{type:String,default:"Cancel"},previewFormat:{type:[String,Function],default:()=>""},multiDates:{type:Boolean,default:!1},partialRange:{type:Boolean,default:!0},ignoreTimeValidation:{type:Boolean,default:!1},minDate:{type:[Date,String],default:null},maxDate:{type:[Date,String],default:null},minTime:{type:Object,default:null},maxTime:{type:Object,default:null},name:{type:String,default:null},placeholder:{type:String,default:""},hideInputIcon:{type:Boolean,default:!1},clearable:{type:Boolean,default:!0},state:{type:Boolean,default:null},required:{type:Boolean,default:!1},autocomplete:{type:String,default:"off"},inputClassName:{type:String,default:null},inlineWithInput:{type:Boolean,default:!1},textInputOptions:{type:Object,default:()=>null},fixedStart:{type:Boolean,default:!1},fixedEnd:{type:Boolean,default:!1},timePicker:{type:Boolean,default:!1},enableSeconds:{type:Boolean,default:!1},is24:{type:Boolean,default:!0},noHoursOverlay:{type:Boolean,default:!1},noMinutesOverlay:{type:Boolean,default:!1},noSecondsOverlay:{type:Boolean,default:!1},hoursGridIncrement:{type:[String,Number],default:1},minutesGridIncrement:{type:[String,Number],default:5},secondsGridIncrement:{type:[String,Number],default:5},hoursIncrement:{type:[Number,String],default:1},minutesIncrement:{type:[Number,String],default:1},secondsIncrement:{type:[Number,String],default:1},range:{type:Boolean,default:!1},uid:{type:String,default:null},disabled:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},inline:{type:Boolean,default:!1},textInput:{type:Boolean,default:!1},onClickOutside:{type:Function,default:null},noDisabledRange:{type:Boolean,default:!1},sixWeeks:{type:[Boolean,String],default:!1},actionRow:{type:Object,default:()=>({})},allowPreventDefault:{type:Boolean,default:!1},closeOnClearValue:{type:Boolean,default:!0},focusStartDate:{type:Boolean,default:!1},disabledTimes:{type:Function,default:void 0},showLastInRange:{type:Boolean,default:!0},timePickerInline:{type:Boolean,default:!1},calendar:{type:Function,default:null},autoApplyMonth:{type:Boolean,default:!0}},WG={key:1,class:"dp__input_wrap"},zG=["id","name","inputmode","placeholder","disabled","readonly","required","value","autocomplete","aria-label","onKeydown"],YG={key:2,class:"dp__clear_icon"},qG=Mi({__name:"DatepickerInput",props:{isMenuOpen:{type:Boolean,default:!1},inputValue:{type:String,default:""},...Ol},emits:["clear","open","update:input-value","set-input-date","close","select-date","set-empty-date","toggle","focus-prev","focus","blur","real-blur"],setup(t,{expose:e,emit:s}){const n=t,{getDefaultPattern:i,isValidDate:o,defaults:r,getDefaultStartTime:c,assignDefaultTime:h}=Cr(n),f=ve(),v=ve(null),g=ve(!1),y=ve(!1),x=Ae(()=>({dp__pointer:!n.disabled&&!n.readonly&&!n.textInput,dp__disabled:n.disabled,dp__input_readonly:!n.textInput,dp__input:!0,dp__input_icon_pad:!n.hideInputIcon,dp__input_valid:n.state,d
50p__input_invalid:n.state===!1,dp__input_focus:g.value||n.isMenuOpen,dp__input_reg:!n.textInput,[n.inputClassName]:!!n.inputClassName})),E=()=>{s("set-input-date",null),n.autoApply&&(s("set-empty-date"),f.value=null)},P=ne=>{var X;const G=c();return qq(ne,((X=r.value.textInputOptions)==null?void 0:X.format)||i(),G||h({}),n.inputValue,y.value)},I=ne=>{const{rangeSeparator:X}=r.value.textInputOptions,[G,ce]=ne.split(`${X}`);if(G){const be=P(G.trim()),J=ce?P(ce.trim()):null,Z=be&&J?[be,J]:[be];f.value=be?Z:null}},D=()=>{y.value=!0},F=ne=>{if(n.range)I(ne);else if(n.multiDates){const X=ne.split(";");f.value=X.map(G=>P(G.trim())).filter(G=>G)}else f.value=P(ne)},C=ne=>{var X,G;const ce=typeof ne=="string"?ne:(X=ne.target)==null?void 0:X.value;ce!==""?((G=r.value.textInputOptions)!=null&&G.openMenu&&!n.isMenuOpen&&s("open"),F(ce),s("set-input-date",f.value)):E(),y.value=!1,s("update:input-value",ce)},A=ne=>{var X,G;n.textInput?(F(ne.target.value),(X=r.value.textInputOptions)!=null&&X.enterSubmit&&o(f.value)&&n.inputValue!==""?(s("set-input-date",f.value,!0),f.value=null):(G=r.value.textInputOptions)!=null&&G.enterSubmit&&n.inputValue===""&&(f.value=null,s("clear"))):te(ne)},O=ne=>{var X,G,ce;n.textInput&&(X=r.value.textInputOptions)!=null&&X.tabSubmit&&F(ne.target.value),(G=r.value.textInputOptions)!=null&&G.tabSubmit&&o(f.value)&&n.inputValue!==""?(s("set-input-date",f.value,!0),f.value=null):(ce=r.value.textInputOptions)!=null&&ce.tabSubmit&&n.inputValue===""&&(f.value=null,s("clear"))},j=()=>{g.value=!0,s("focus")},te=ne=>{var X;ne.preventDefault(),ne.stopImmediatePropagation(),ne.stopPropagation(),n.textInput&&(X=r.value.textInputOptions)!=null&&X.openMenu&&!n.inlineWithInput?(s("toggle"),r.value.textInputOptions.enterSubmit&&s("select-date")):n.textInput||s("toggle")},B=()=>{s("real-blur"),g.value=!1,(!n.isMenuOpen||n.inline&&n.inlineWithInput)&&s("blur"),n.autoApply&&n.textInput&&f.value&&!n.isMenuOpen&&(s("set-input-date",f.value),s("select-date"),f.value=null)},z=()=>{s("clear")},re=ne=>{if(!n.textInput){if(ne.code==="Tab")return;ne.preventDefault()}};return e({focusInput:()=>{var ne;(ne=v.value)==null||ne.focus({preventScroll:!0})},setParsedDate:ne=>{f.value=ne}}),(ne,X)=>{var G;return $(),L("div",{onClick:te},[ne.$slots.trigger&&!ne.$slots["dp-input"]&&!ne.inline?Ft(ne.$slots,"trigger",{key:0}):xe("",!0),!ne.$slots.trigger&&(!ne.inline||ne.inlineWithInput)?($(),L("div",WG,[ne.$slots["dp-input"]&&!ne.$slots.trigger&&!ne.inline?Ft(ne.$slots,"dp-input",{key:0,value:t.inputValue,isMenuOpen:t.isMenuOpen,onInput:C,onEnter:A,onTab:O,onClear:z,onBlur:B,onKeypress:re,onPaste:D}):xe("",!0),ne.$slots["dp-input"]?xe("",!0):($(),L("input",{key:1,ref_key:"inputRef",ref:v,id:ne.uid?`dp-input-${ne.uid}`:void 0,name:ne.name,class:Me(x.value),inputmode:ne.textInput?"text":"none",placeholder:ne.placeholder,disabled:ne.disabled,readonly:ne.readonly,required:ne.required,value:t.inputValue,autocomplete:ne.autocomplete,"aria-label":(G=Ne(r).ariaLabels)==null?void 0:G.input,onInput:C,onKeydown:[es(A,["enter"]),es(O,["tab"]),re],onBlur:B,onFocus:j,onKeypress:re,onPaste:D},null,42,zG)),l("div",{onClick:X[2]||(X[2]=ce=>s("toggle"))},[ne.$slots["input-icon"]&&!ne.hideInputIcon?($(),L("span",{key:0,class:"dp__input_icon",onClick:X[0]||(X[0]=ce=>s("toggle"))},[Ft(ne.$slots,"input-icon")])):xe("",!0),!ne.$slots["input-icon"]&&!ne.hideInputIcon&&!ne.$slots["dp-input"]?($(),Ut(Ne(lv),{key:1,onClick:X[1]||(X[1]=ce=>s("toggle")),class:"dp__input_icon dp__input_icons"})):xe("",!0)]),ne.$slots["clear-icon"]&&t.inputValue&&ne.clearable&&!ne.disabled&&!ne.readonly?($(),L("span",YG,[Ft(ne.$slots,"clear-icon",{clear:z})])):xe("",!0),ne.clearable&&!ne.$slots["clear-icon"]&&t.inputValue&&!ne.disabled&&!ne.readonly?($(),Ut(Ne(Yq),{key:3,class:"dp__clear_icon dp__input_icons",onClick:St(z,["stop","prevent"])},null,8,["onClick"])):xe("",!0)])):xe("",!0)])}}}),GG=["title"],XG={class:"dp__action_buttons"},KG=["onKeydown","disabled"],JG=Mi({__name:"ActionRow",props:{menuMount:{type:Boolean,default:!1},internalModelValue:{type:[Date,Array],default:null},calendarWidth:{type:Number,default:0},...Ol}
50,emits:["close-picker","select-date","select-now","invalid-select"],setup(t,{emit:e}){const s=t,{formatDate:n,isValidTime:i,defaults:o}=Cr(s),{buildMatrix:r}=Al(),c=ve(null),h=ve(null);Xt(()=>{s.arrowNavigation&&r([Dn(c),Dn(h)],"actionRow")});const f=Ae(()=>s.range&&!s.partialRange&&s.internalModelValue?s.internalModelValue.length===2:!0),v=Ae(()=>!g.value||!y.value||!f.value),g=Ae(()=>!s.enableTimePicker||s.ignoreTimeValidation?!0:i(s.internalModelValue)),y=Ae(()=>s.monthPicker?s.range&&Array.isArray(s.internalModelValue)?!s.internalModelValue.filter(O=>!C(O)).length:C(s.internalModelValue):!0),x=()=>{const O=o.value.previewFormat;return s.timePicker||s.monthPicker,O(xi(s.internalModelValue))},E=()=>{const O=s.internalModelValue;return o.value.multiCalendars>0?`${P(O[0])} - ${P(O[1])}`:[P(O[0]),P(O[1])]},P=O=>n(O,o.value.previewFormat),I=Ae(()=>!s.internalModelValue||!s.menuMount?"":typeof o.value.previewFormat=="string"?Array.isArray(s.internalModelValue)?s.internalModelValue.length===2&&s.internalModelValue[1]?E():s.multiDates?s.internalModelValue.map(O=>`${P(O)}`):s.modelAuto?`${P(s.internalModelValue[0])}`:`${P(s.internalModelValue[0])} -`:P(s.internalModelValue):x()),D=()=>s.multiDates?"; ":" - ",F=Ae(()=>Array.isArray(I.value)?I.value.join(D()):I.value),C=O=>{if(!s.monthPicker)return!0;let j=!0;const te=yt(uh(O));if(s.minDate&&s.maxDate){const B=yt(uh(s.minDate)),z=yt(uh(s.maxDate));return qi(te,B)&&Ai(te,z)||Js(te,B)||Js(te,z)}if(s.minDate){const B=yt(uh(s.minDate));j=qi(te,B)||Js(te,B)}if(s.maxDate){const B=yt(uh(s.maxDate));j=Ai(te,B)||Js(te,B)}return j},A=()=>{g.value&&y.value&&f.value?e("select-date"):e("invalid-select")};return(O,j)=>($(),L("div",{class:"dp__action_row",style:zs(t.calendarWidth?{width:`${t.calendarWidth}px`}:{})},[O.$slots["action-row"]?Ft(O.$slots,"action-row",Zn(On({key:0},{internalModelValue:t.internalModelValue,disabled:v.value,selectDate:()=>O.$emit("select-date"),closePicker:()=>O.$emit("close-picker")}))):($(),L(Ze,{key:1},[Ne(o).actionRow.showPreview?($(),L("div",{key:0,class:"dp__selection_preview",title:F.value},[O.$slots["action-preview"]?Ft(O.$slots,"action-preview",{key:0,value:t.internalModelValue}):xe("",!0),O.$slots["action-preview"]?xe("",!0):($(),L(Ze,{key:1},[Pe(pe(F.value),1)],64))],8,GG)):xe("",!0),l("div",XG,[O.$slots["action-buttons"]?Ft(O.$slots,"action-buttons",{key:0,value:t.internalModelValue}):xe("",!0),O.$slots["action-buttons"]?xe("",!0):($(),L(Ze,{key:1},[!O.inline&&Ne(o).actionRow.showCancel?($(),L("button",{key:0,type:"button",ref_key:"cancelButtonRef",ref:c,class:"dp__action_button dp__action_cancel",onClick:j[0]||(j[0]=te=>O.$emit("close-picker")),onKeydown:[j[1]||(j[1]=es(te=>O.$emit("close-picker"),["enter"])),j[2]||(j[2]=es(te=>O.$emit("close-picker"),["space"]))]},pe(O.cancelText),545)):xe("",!0),O.showNowButton||Ne(o).actionRow.showNow?($(),L("button",{key:1,type:"button",ref_key:"cancelButtonRef",ref:c,class:"dp__action_button dp__action_cancel",onClick:j[3]||(j[3]=te=>O.$emit("select-now")),onKeydown:[j[4]||(j[4]=es(te=>O.$emit("select-now"),["enter"])),j[5]||(j[5]=es(te=>O.$emit("select-now"),["space"]))]},pe(O.nowButtonLabel),545)):xe("",!0),Ne(o).actionRow.showSelect?($(),L("button",{key:2,type:"button",class:"dp__action_button dp__action_select",onKeydown:[es(A,["enter"]),es(A,["space"])],onClick:A,disabled:v.value,ref_key:"selectButtonRef",ref:h},pe(O.selectText),41,KG)):xe("",!0)],64))])],64))],4))}}),QG=["aria-label"],ZG={class:"dp__calendar_header",role:"row"},eX={key:0,class:"dp__calendar_header_item",role:"gridcell"},tX=l("div",{class:"dp__calendar_header_separator"},null,-1),sX=["aria-label"],nX={key:0,role:"gridcell",class:"dp__calendar_item dp__week_num"},iX={class:"dp__cell_inner"},rX=["aria-selected","aria-disabled","aria-label","onClick","onKeydown","onMouseenter","onMouseleave"],aX=Mi({__name:"Calendar",props:{mappedDates:{type:Array,default:()=>[]},getWeekNum:{type:Function,default:()=>""},specificMode:{type:Boolean,default:!1},instance:{type:Number,default:0},month:{type:Number,default:0},year:{type:Number,default:0},...Ol},emits:["select-date","set-hover-date","handle-scroll","mount","handle-swipe","handle-space","tooltip-open","tooltip-close"],setup(t,{expose:e,emit:s}){const n=t,{buildMultiLevelMatrix:i}=Al(),{setDateMonthOrYear:o,defaults:r}=Cr(n),c=ve(null),h=ve({bottom:"",left:"",transform:""}),f=ve([]),v=ve(null),g=ve(!0),y=ve(""),x=ve({startX:0,endX:0,startY:0,endY:0}),E=ve([]),P=ve({left:"50%"}),I=Ae(()=>n.calendar?n.calendar(n.mappedDates):n.mappedDates),D=Ae(()=>n.dayNames?Array.isArray(n.dayNames)?n.dayNames:n.dayNames(n.locale,+n.weekStart):SG(n.formatLocale,n.locale,+n.weekStart));Xt(()=>{s("mount",{cmp:"calendar",refs:f}),n.noSwipe||v.value&&(v.value.addEventListener("touchstart",X,{passive:!1}),v.value.addEventListener("touchend",G,{passive:!1}),v.value.addEventListener("touchmove",ce,{passive:!1}
50)),n.monthChangeOnScroll&&v.value&&v.value.addEventListener("wheel",Z,{passive:!1})});const F=ge=>ge?n.vertical?"vNext":"next":n.vertical?"vPrevious":"previous",C=(ge,q)=>{if(n.transitions){const W=Vr(o(yt(),n.month,n.year));y.value=qi(Vr(o(yt(),ge,q)),W)?r.value.transitions[F(!0)]:r.value.transitions[F(!1)],g.value=!1,vs(()=>{g.value=!0})}},A=Ae(()=>({[n.calendarClassName]:!!n.calendarClassName})),O=Ae(()=>ge=>{const q=AG(ge);return{dp__marker_dot:q.type==="dot",dp__marker_line:q.type==="line"}}),j=Ae(()=>ge=>Js(ge,c.value)),te=Ae(()=>({dp__calendar:!0,dp__calendar_next:r.value.multiCalendars>0&&n.instance!==0})),B=Ae(()=>ge=>n.hideOffsetDates?ge.current:!0),z=Ae(()=>n.specificMode?{height:`${n.modeHeight}px`}:void 0),re=async(ge,q,W)=>{var M,he;if(s("set-hover-date",ge),(he=(M=ge.marker)==null?void 0:M.tooltip)!=null&&he.length){const oe=Dn(f.value[q][W]);if(oe){const{width:K,height:H}=oe.getBoundingClientRect();c.value=ge.value;let Ee={left:`${K/2}px`},_e=-50;if(await vs(),E.value[0]){const{left:Ce,width:Re}=E.value[0].getBoundingClientRect();Ce<0&&(Ee={left:"0"},_e=0,P.value.left=`${K/2}px`),window.innerWidth<Ce+Re&&(Ee={right:"0"},_e=0,P.value.left=`${Re-K/2}px`)}h.value={bottom:`${H}px`,...Ee,transform:`translateX(${_e}%)`},s("tooltip-open",ge.marker)}}},ne=ge=>{c.value&&(c.value=null,h.value=JSON.parse(JSON.stringify({bottom:"",left:"",transform:""})),s("tooltip-close",ge.marker))},X=ge=>{x.value.startX=ge.changedTouches[0].screenX,x.value.startY=ge.changedTouches[0].screenY},G=ge=>{x.value.endX=ge.changedTouches[0].screenX,x.value.endY=ge.changedTouches[0].screenY,be()},ce=ge=>{n.vertical&&!n.inline&&ge.preventDefault()},be=()=>{const ge=n.vertical?"Y":"X";Math.abs(x.value[`start${ge}`]-x.value[`end${ge}`])>10&&s("handle-swipe",x.value[`start${ge}`]>x.value[`end${ge}`]?"right":"left")},J=(ge,q,W)=>{ge&&(Array.isArray(f.value[q])?f.value[q][W]=ge:f.value[q]=[ge]),n.arrowNavigation&&i(f.value,"calendar")},Z=ge=>{n.monthChangeOnScroll&&(ge.preventDefault(),s("handle-scroll",ge))};return e({triggerTransition:C}),(ge,q)=>{var W;return $(),L("div",{class:Me(te.value)},[l("div",{style:zs(z.value),ref_key:"calendarWrapRef",ref:v,role:"grid",class:Me(A.value),"aria-label":(W=Ne(r).ariaLabels)==null?void 0:W.calendarWrap},[t.specificMode?xe("",!0):($(),L(Ze,{key:0},[l("div",ZG,[ge.weekNumbers?($(),L("div",eX,pe(ge.weekNumName),1)):xe("",!0),($(!0),L(Ze,null,At(D.value,(M,he)=>($(),L("div",{class:"dp__calendar_header_item",role:"gridcell",key:he},[ge.$slots["calendar-header"]?Ft(ge.$slots,"calendar-header",{key:0,day:M,index:he}):xe("",!0),ge.$slots["calendar-header"]?xe("",!0):($(),L(Ze,{key:1},[Pe(pe(M),1)],64))]))),128))]),tX,et(ja,{name:y.value,css:!!ge.transitions},{default:vt(()=>{var M;return[g.value?($(),L("div",{key:0,class:"dp__calendar",role:"grid","aria-label":(M=Ne(r).ariaLabels)==null?void 0:M.calendarDays},[($(!0),L(Ze,null,At(I.value,(he,oe)=>($(),L("div",{class:"dp__calendar_row",role:"row",key:oe},[ge.weekNumbers?($(),L("div",nX,[l("div",iX,pe(t.getWeekNum(he.days)),1)])):xe("",!0),($(!0),L(Ze,null,At(he.days,(K,H)=>{var Ee,_e,Ce;return $(),L("div",{role:"gridcell",class:"dp__calendar_item",ref_for:!0,ref:Re=>J(Re,oe,H),key:H+oe,"aria-selected":K.classData.dp__active_date||K.classData.dp__range_start||K.classData.dp__range_start,"aria-disabled":K.classData.dp__cell_disabled,"aria-label":(_e=(Ee=Ne(r).ariaLabels)==null?void 0:Ee.day)==null?void 0:_e.call(Ee,K),tabindex:"0",onClick:St(Re=>ge.$emit("select-date",K),["stop","prevent"]),onKeydown:[es(Re=>ge.$emit("select-date",K),["enter"]),es(Re=>ge.$emit("handle-space",K),["space"])],onMouseenter:Re=>re(K,oe,H),onMouseleave:Re=>ne(K)},[l("div",{class:Me(["dp__cell_inner",K.classData])},[ge.$slots.day&&B.value(K)?Ft(ge.$slots,"day",{key:0,day:+K.text,date:K.value}):xe("",!0),ge.$slots.day?xe("",!0):($(),L(Ze,{key:1},[Pe(pe(K.text),1)],64)),K.marker&&B.value(K)?($(),L(Ze,{key:2},[ge.$slots.marker?Ft(ge.$slots,"marker",{key:0,marker:K.marker,day:+K.text,date:K.value}):($(),L("div",{key:1,class:Me(O.value(K.marker)),style:zs(K.marker.color?{backgroundColor:K.marker.color}:{})},null,6))],64)):xe("",!0),j.value(K.value)?($(),L("div",{key:3,class:"dp__marker_tooltip",ref_for:!0,ref_key:"activeTooltip",ref:E,style:zs(h.value)},[(Ce=K.marker)!=null&&Ce.tooltip?($(),L("div",{key:0,class:"dp__tooltip_content",onClick:q[0]||(q[0]=St(()=>{},["stop"]))},[($(!0),L(Ze,null,At(K.marker.tooltip,(Re,Ke)=>($(),L("div",{key:Ke,class:"dp__tooltip_text"},[ge.$slots["marker-tooltip"]?Ft(ge.$slots,"marker-tooltip",{key:0,tooltip:Re,day:K.value}):xe("",!0),ge.$slots["marker-tooltip"]?xe("",!0):($(),L(Ze,{key:1},[l("div",{class:"dp__tooltip_mark",style:zs(Re.color?{backgroundColor:Re.color}:{})},null,4),l("div",null,pe(Re.text),1)],64))]))),128)),l("div",{class:"dp__arrow_bottom_tp",style:zs(P.value)},null,4)])):xe("",!0)],4)):xe("",!0)],2)],40,rX)}),128))]))),128))],8,sX)):xe("",!0)]}),_:3},8,["name","css"])],64))],14,QG)],2)}}}),oX=["aria-label","aria-disabled"],zy=Mi({__name:"ActionIcon",props:{ariaLabel:{},disabled:{type:Boolean}},emits:["activate","set-ref"],setup(t,{emit:e}){const s=ve(null);return Xt(()=>e("set-ref",s)),(n,i)=>($(),L("button",{type:"button",class:"dp__btn dp__month_year_col_nav",onClick:i[0]||(i[0]=o=>n.$emit("activate")),onKeydown:[i[1]||(i[1]=es(St(o=>n.$emit("activate"),["prevent"]),["enter"])),i[2]||(i[2]=es(St(o=>n.$emit("activate"),["prevent"]),["space"]))],tabindex:"0","aria-label":n.ariaLabel,"aria-disabled":n.disabled,ref_key:"elRef",ref:s},[l("span",{class:Me(["dp__inner_nav",{dp__inner_nav_disabled:n.disabled}])},[Ft(n.$slots,"default")],2)],40,oX))}}),lX=["onKeydown"],uX={class:"dp__selection_grid_header"},cX=["aria-selected","aria-disabled","onClick","onKeydown","onMouseover"],dX=["aria-label","onKeydown"],Ih=Mi({__name:"SelectionGrid",props:{items:{type:Array,default:()=>[]},modelValue:{type:[String,Number],default:null},multiModelValue:{type:Array,default:()=>[]},disabledValues:{type:Array,default:()=>[]},minValue:{type:[Number,String],default:null},maxValue:{type:[Number,String],default:null},year:{type:Number,default:0},skipActive:{type:Boolean,default:!1},headerRefs:{type:Array,default:()=>[]},skipButtonRef:{type:Boolean,default:!1},monthPicker:{type:Boolean,default:!1},yearPicker:{type:Boolean,default:!1},escClose:{type:Boolean,default:!0},type:{type:String,default:null},arrowNavigation:{type:Boolean,default:!1},autoApply:{type:Boolean,default:!1},textInput:{type:Boolean,default:!1},ariaLabels:{type:Object,default:()=>({})},hideNavigation:{type:Array,default:()=>[]},internalModelValue:{type:[Date,Array],default:null},autoApplyMonth:{type:Boolean,default:!1}},emits:["update:model-value","selected","toggle","reset-flow"],setup(t,{expose:e,emit:s}){const n=t,{setSelectionGrid:i,buildMultiLevelMatrix:o,setMonthPicker:r}=Al(),{hideNavigationButtons:c}
50=Cr(n),h=ve(!1),f=ve(null),v=ve(null),g=ve([]),y=ve(),x=ve(null),E=ve(0),P=ve(null);Qg(()=>{f.value=null}),Xt(()=>{var Z;vs().then(()=>z()),D(),I(!0),(Z=f.value)==null||Z.focus({preventScroll:!0})}),Ni(()=>I(!1));const I=Z=>{var ge;n.arrowNavigation&&((ge=n.headerRefs)!=null&&ge.length?r(Z):i(Z))},D=()=>{const Z=Dn(v);Z&&(n.textInput||Z.focus({preventScroll:!0}),h.value=Z.clientHeight<Z.scrollHeight)},F=Ae(()=>({dp__overlay:!0})),C=Ae(()=>({dp__overlay_col:!0})),A=Z=>n.monthPicker&&!n.autoApplyMonth?Js(n.internalModelValue,fo(Nc(new Date,Z.value),n.year)):n.skipActive?!1:Z.value===n.modelValue,O=Ae(()=>n.items.map(Z=>Z.filter(ge=>ge).map(ge=>{var q,W,M;const he=n.disabledValues.some(K=>K===ge.value)||B(ge.value),oe=(q=n.multiModelValue)!=null&&q.length?(W=n.multiModelValue)==null?void 0:W.some(K=>Js(K,fo(n.monthPicker?Nc(new Date,ge.value):new Date,n.monthPicker?n.year:ge.value))):A(ge);return{...ge,className:{dp__overlay_cell_active:oe,dp__overlay_cell:!oe,dp__overlay_cell_disabled:he,dp__overlay_cell_active_disabled:he&&oe,dp__overlay_cell_pad:!0,dp__cell_in_between:(M=n.multiModelValue)!=null&&M.length&&n.skipActive?ne(ge.value):!1}}}))),j=Ae(()=>({dp__button:!0,dp__overlay_action:!0,dp__over_action_scroll:h.value,dp__button_bottom:n.autoApply})),te=Ae(()=>{var Z,ge;return{dp__overlay_container:!0,dp__container_flex:((Z=n.items)==null?void 0:Z.length)<=6,dp__container_block:((ge=n.items)==null?void 0:ge.length)>6}}),B=Z=>{const ge=n.maxValue||n.maxValue===0,q=n.minValue||n.minValue===0;return!ge&&!q?!1:ge&&q?+Z>+n.maxValue||+Z<+n.minValue:ge?+Z>+n.maxValue:q?+Z<+n.minValue:!1},z=()=>{const Z=Dn(f),ge=Dn(v),q=Dn(x),W=Dn(P),M=q?q.getBoundingClientRect().height:0;ge&&(E.value=ge.getBoundingClientRect().height-M),Z&&W&&(W.scrollTop=Z.offsetTop-W.offsetTop-(E.value/2-Z.getBoundingClientRect().height)-M)},re=Z=>{!n.disabledValues.some(ge=>ge===Z)&&!B(Z)&&(s("update:model-value",Z),s("selected"))},ne=Z=>{const ge=n.monthPicker?n.year:Z;return mD(n.multiModelValue,fo(n.monthPicker?Nc(new Date,y.value||0):new Date,n.monthPicker?ge:y.value||ge),fo(n.monthPicker?Nc(new Date,Z):new Date,ge))},X=()=>{s("toggle"),s("reset-flow")},G=()=>{n.escClose&&X()},ce=(Z,ge,q,W)=>{Z&&(ge.value===+n.modelValue&&!n.disabledValues.includes(ge.value)&&(f.value=Z),n.arrowNavigation&&(Array.isArray(g.value[q])?g.value[q][W]=Z:g.value[q]=[Z],be()))},be=()=>{var Z,ge;const q=(Z=n.headerRefs)!=null&&Z.length?[n.headerRefs].concat(g.value):g.value.concat([n.skipButtonRef?[]:[x.value]]);o(xi(q),(ge=n.headerRefs)!=null&&ge.length?"monthPicker":"selectionGrid")},J=Z=>{n.arrowNavigation||Z.stopImmediatePropagation()};return e({focusGrid:D}),(Z,ge)=>{var q;return $(),L("div",{ref_key:"gridWrapRef",ref:v,class:Me(F.value),role:"dialog",tabindex:"0",onKeydown:[es(G,["esc"]),ge[0]||(ge[0]=es(W=>J(W),["left"])),ge[1]||(ge[1]=es(W=>J(W),["up"])),ge[2]||(ge[2]=es(W=>J(W),["down"])),ge[3]||(ge[3]=es(W=>J(W),["right"]))]},[l("div",{class:Me(te.value),ref_key:"containerRef",ref:P,role:"grid",style:zs({height:`${E.value}px`})},[l("div",uX,[Ft(Z.$slots,"header")]),Z.$slots.overlay?Ft(Z.$slots,"overlay",{key:0}):($(!0),L(Ze,{key:1},At(O.value,(W,M)=>($(),L("div",{class:Me(["dp__overlay_row",{dp__flex_row:O.value.length>=3}]),key:M,role:"row"},[($(!0),L(Ze,null,At(W,(he,oe)=>($(),L("div",{role:"gridcell",class:Me(C.value),key:he.value,"aria-selected":he.value===t.modelValue&&!t.disabledValues.includes(he.value),"aria-disabled":he.className.dp__overlay_cell_disabled,ref_for:!0,ref:K=>ce(K,he,M,oe),tabindex:"0",onClick:K=>re(he.value),onKeydown:[es(K=>re(he.value),["enter"]),es(K=>re(he.value),["space"])],onMouseover:K=>y.value=he.value},[l("div",{class:Me(he.className)},[Z.$slots.item?Ft(Z.$slots,"item",{key:0,item:he}):xe("",!0),Z.$slots.item?xe("",!0):($(),L(Ze,{key:1},[Pe(pe(he.text),1)],64))],2)],42,cX))),128))],2))),128))],6),Z.$slots["button-icon"]?_t(($(),L("div",{key:0,role:"button","aria-label":(q=t.ariaLabels)==null?void 0:q.toggleOverlay,class:Me(j.value),tabindex:"0",ref_key:"toggleButton",ref:x,onClick:X,onKeydown:[es(X,["enter"]),es(X,["tab"])]},[Ft(Z.$slots,"button-icon")],42,dX)),[[Rr,!Ne(c)(t.type)]]):xe("",!0)],42,lX)}}}),hX=["aria-label"],Wk=Mi({__name:"RegularPicker",props:{ariaLabel:{type:String,default:""},showSelectionGrid:{type:Boolean,default:!1},modelValue:{type:Number,default:null},items:{type:Array,default:()=>[]},disabledValues:{type:Array,default:()=>[]},minValue:{type:Number,default:null},maxValue:{type:Number,default:null},slotName:{type:String,default:""},overlaySlot:{type:String,default:""},headerRefs:{type:Array,default:()=>[]},escClose:{type:Boolean,default:!0},type:{type:String,default:null},transitions:{type:[Object,Boolean],default:!1},arrowNavigation:{type:Boolean,default:!1},autoApply:{type:Boolean,default:!1},textInput:{type:Boolean,default:!1},ariaLabels:{type:Object,default:()=>({})},hideNavigation:{type:Array,default:()=>[]}},emits:["update:model-value","toggle","set-ref"],setup(t,{emit:e}){const s=t,{transitionName:n,showTransition:i}=uv(s.transitions),o=ve(null);return Xt(()=>e("set-ref",o)),(r,c)=>($(),L(Ze,null,[l("button",{type:"button",class:"dp__btn dp__month_year_select",onClick:c[0]||(c[0]=h=>r.$emit("toggle")),onKeydown:[c[1]||(c[1]=es(St(h=>r.$emit("toggle"),["prevent"]),["enter"])),c[2]||(c[2]=es(St(h=>r.$emit("toggle"),["prevent"]),["space"]))],"aria-label":t.ariaLabel,tabindex:"0",ref_key:"elRef",ref:o},[Ft(r.$slots,"default")],40,hX),et(ja,{name:Ne(n)(t.showSelectionGrid),css:Ne(i)},{default:vt(()=>[t.showSelectionGrid?($(),Ut(Ih,On({key:0},{modelValue:t.modelValue,items:t.items,disabledValues:t.disabledValues,minValue:t.minValue,maxValue:t.maxValue,escClose:t.escClose,type:t.type,arrowNavigation:t.arrowNavigation,textInput:t.textInput,autoApply:t.autoApply,ariaLabels:t.ariaLabels,hideNavigation:t.hideNavigation}
50,{"header-refs":[],"onUpdate:modelValue":c[3]||(c[3]=h=>r.$emit("update:model-value",h)),onToggle:c[4]||(c[4]=h=>r.$emit("toggle"))}),zi({"button-icon":vt(()=>[r.$slots["calendar-icon"]?Ft(r.$slots,"calendar-icon",{key:0}):xe("",!0),r.$slots["calendar-icon"]?xe("",!0):($(),Ut(Ne(lv),{key:1}))]),_:2},[r.$slots[t.slotName]?{name:"item",fn:vt(({item:h})=>[Ft(r.$slots,t.slotName,{item:h})]),key:"0"}:void 0,r.$slots[t.overlaySlot]?{name:"overlay",fn:vt(()=>[Ft(r.$slots,t.overlaySlot)]),key:"1"}:void 0,r.$slots[`${t.overlaySlot}-header`]?{name:"header",fn:vt(()=>[Ft(r.$slots,`${t.overlaySlot}-header`)]),key:"2"}:void 0]),1040)):xe("",!0)]),_:3},8,["name","css"])],64))}}),fX={class:"dp__month_year_row"},pX={class:"dp__month_picker_header"},mX=["aria-label"],gX=["aria-label"],vX=["aria-label"],bX=Mi({__name:"MonthYearPicker",props:{month:{type:Number,default:0},year:{type:Number,default:0},instance:{type:Number,default:0},years:{type:Array,default:()=>[]},months:{type:Array,default:()=>[]},internalModelValue:{type:[Date,Array],default:null},...Ol},emits:["update-month-year","month-year-select","mount","reset-flow","overlay-closed"],setup(t,{expose:e,emit:s}){const n=t,{defaults:i}=Cr(n),{transitionName:o,showTransition:r}=uv(i.value.transitions),{buildMatrix:c}=Al(),{handleMonthYearChange:h,isDisabled:f,updateMonthYear:v}=BG(n,s),g=ve(!1),y=ve(!1),x=ve([null,null,null,null]),E=ve(null),P=ve(null),I=ve(null);Xt(()=>{s("mount")});const D=H=>({get:()=>n[H],set:Ee=>{const _e=H==="month"?"year":"month";s("update-month-year",{[H]:Ee,[_e]:n[_e]}),s("month-year-select",H==="year"),H==="month"?W(!0):M(!0)}}),F=Ae(D("month")),C=Ae(D("year")),A=H=>{const Ee=cn(yt(H));return n.year===Ee},O=Ae(()=>n.monthPicker?Array.isArray(n.disabledDates)?n.disabledDates.map(H=>yt(H)).filter(H=>A(H)).map(H=>on(H)):[]:[]),j=Ae(()=>H=>{const Ee=H==="month";return{showSelectionGrid:(Ee?g:y).value,items:(Ee?be:J).value,disabledValues:i.value.filters[Ee?"months":"years"].concat(O.value),minValue:(Ee?re:B).value,maxValue:(Ee?ne:z).value,headerRefs:Ee&&n.monthPicker?[E.value,P.value,I.value]:[],escClose:n.escClose,transitions:i.value.transitions,ariaLabels:i.value.ariaLabels,textInput:n.textInput,autoApply:n.autoApply,arrowNavigation:n.arrowNavigation,hideNavigation:n.hideNavigation}}),te=Ae(()=>H=>({month:n.month,year:n.year,items:H==="month"?n.months:n.years,instance:n.instance,updateMonthYear:v,toggle:H==="month"?W:M})),B=Ae(()=>n.minDate?cn(yt(n.minDate)):null),z=Ae(()=>n.maxDate?cn(yt(n.maxDate)):null),re=Ae(()=>{if(n.minDate&&B.value){if(B.value>n.year)return 12;if(B.value===n.year)return on(yt(n.minDate))}return null}),ne=Ae(()=>n.maxDate&&z.value?z.value<n.year?-1:z.value===n.year?on(yt(n.maxDate)):null:null),X=Ae(()=>(n.range||n.multiDates)&&n.internalModelValue&&(n.monthPicker||n.yearPicker)?n.internalModelValue:[]),G=H=>{const Ee=[],_e=Ce=>Ce;for(let Ce=0;Ce<H.length;Ce+=3){const Re=[H[Ce],H[Ce+1],H[Ce+2]];Ee.push(_e(Re))}return Ee},ce=Ae(()=>n.months.find(Ee=>Ee.value===n.month)||{text:"",value:0}),be=Ae(()=>G(n.months)),J=Ae(()=>G(n.years)),Z=Ae(()=>i.value.multiCalendars?n.multiCalendarsSolo?!0:n.instance===0:!0),ge=Ae(()=>i.value.multiCalendars?n.multiCalendarsSolo?!0:n.instance===i.value.multiCalendars-1:!0),q=(H,Ee)=>{Ee!==void 0?H.value=Ee:H.value=!H.value},W=(H=!1,Ee)=>{he(H),q(g,Ee),g.value||s("overlay-closed")},M=(H=!1,Ee)=>{he(H),q(y,Ee),y.value||s("overlay-closed")},he=H=>{H||s("reset-flow")},oe=(H=!1)=>{f.value(H)||s("update-month-year",{year:H?n.year+1:n.year-1,month:n.month,fromNav:!0})},K=(H,Ee)=>{n.arrowNavigation&&(x.value[Ee]=Dn(H),c(x.value,"monthYear"))};return e({toggleMonthPicker:W,toggleYearPicker:M,handleMonthYearChange:h}),(H,Ee)=>{var _e,Ce,Re,Ke,Be;return $(),L("div",fX,[H.$slots["month-year"]?Ft(H.$slots,"month-year",Zn(On({key:0},{month:t.month,year:t.year,months:t.months,years:t.years,updateMonthYear:Ne(v),handleMonthYearChange:Ne(h),instance:t.instance}))):($(),L(Ze,{key:1},[!H.monthPicker&&!H.yearPicker?($(),L(Ze,{key:0},[Z.value&&!H.vertical?($(),Ut(zy,{key:0,"aria-label":(_e=Ne(i).ariaLabels)==null?void 0:_e.prevMonth,disabled:Ne(f)(!1),onActivate:Ee[0]||(Ee[0]=Te=>Ne(h)(!1)),onSetRef:Ee[1]||(Ee[1]=Te=>K(Te,0))},{default:vt(()=>[H.$slots["arrow-left"]?Ft(H.$slots,"arrow-left",{key:0}):xe("",!0),H.$slots["arrow-left"]?xe("",!0):($(),Ut(Ne(Tk),{key:1}))]),_:3},8,["aria-label","disabled"])):xe("",!0),l("div",{class:Me(["dp__month_year_wrap",{dp__year_disable_select:n.disableYearSelect}])},[et(Wk,On({type:"month","slot-name":"month-overlay-val","overlay-slot":"overlay-month","aria-label":(Ce=Ne(i).ariaLabels)==null?void 0:Ce.openMonthsOverlay,modelValue:F.value,"onUpdate:modelValue":Ee[2]||(Ee[2]=Te=>F.value=Te)},j.value("month"),{onToggle:W,onSetRef:Ee[3]||(Ee[3]=Te=>K(Te,1))}),zi({default:vt(()=>[H.$slots.month?Ft(H.$slots,"month",Zn(On({key:0},ce.value))):xe("",!0),H.$slots.month?xe("",!0):($(),L(Ze,{key:1},[Pe(pe(ce.value.text),1)],64))]),_:2},[H.$slots["calendar-icon"]?{name:"calendar-icon",fn:vt(()=>[Ft(H.$slots,"calendar-icon")]),key:"0"}:void 0,H.$slots["month-overlay-value"]?{name:"month-overlay-val",fn:vt(({item:Te})=>[Ft(H.$slots,"month-overlay-value",{text:Te.text,value:Te.value})]),key:"1"}:void 0,H.$slots["month-overlay"]?{name:"overlay-month",fn:vt(()=>[Ft(H.$slots,"month-overlay",Zn(vr(te.value("month"))))]),key:"2"}:void 0,H.$slots["month-overlay-header"]?{name:"overlay-month-header",fn:vt(()=>[Ft(H.$slots,"month-overlay-header",{toggle:W})]),key:"3"}:void 0]),1040,["aria-label","modelValue"]),n.disableYearSelect?xe("",!0):($(),Ut(Wk,On({key:0,type:"year","slot-name":"year-overlay-val","overlay-slot":"overlay-year","aria-label":(Re=Ne(i).ariaLabels)==null?void 0:Re.openYearsOverlay,modelValue:C.value,"onUpdate:modelValue":Ee[4]||(Ee[4]=Te=>C.value=Te)},j.value("year"),{onToggle:M,onSetRef:Ee[5]||(Ee[5]=Te=>K(Te,2))}),zi({default:vt(()=>[H.$slots.year?Ft(H.$slots,"year",{key:0,year:t.year}):xe("",!0),H.$slots.year?xe("",!0):($(),L(Ze,{key:1},[Pe(pe(t.year),1)],64))]),_:2},[H.$slots["calendar-icon"]?{name:"calendar-icon",fn:vt(()=>[Ft(H.$slots,"calendar-icon")]),key:"0"}:void 0,H.$slots["year-overlay-value"]?{name:"year-overlay-val",fn:vt(({item:Te})=>[Ft(H.$slots,"year-overlay-value",{text:Te.text,value:Te.value})]),key:"1"}:void 0,H.$slots["year-overlay"]?{name:"overlay-year",fn:vt(()=>[Ft(H.$slots,"year-overlay",Zn(vr(te.value("year"))))]),key:"2"}:void 0,H.$slots["year-overlay-header"]?{name:"overlay-year-header",fn:vt(()=>[Ft(H.$slots,"year-overlay-header",{toggle:M})]),key:"3"}:void 0]),1040,["aria-label","modelValue"]))],2),Z.value&&H.vertical?($(),Ut(zy,{key:1,"aria-label":(Ke=Ne(i).ariaLabels)==null?void 0:Ke.prevMonth,disabled:Ne(f)(!1),onActivate:Ee[6]||(Ee[6]=Te=>Ne(h)(!1))},{default:vt(()=>[H.$slots["arrow-up"]?Ft(H.$slots,"arrow-up",{key:0}):xe("",!0),H.$slots["arrow-up"]?xe("",!0):($(),Ut(Ne(fD),{key:1}))]),_:3},8,["aria-label","disabled"])):xe("",!0),ge.value?($(),Ut(zy,{key:2,ref:"rightIcon",disabled:Ne(f)(!0),"aria-label":(Be=Ne(i).ariaLabels)==null?void 0:Be.nextMonth,onActivate:Ee[7]||(Ee[7]=Te=>Ne(h)(!0)),onSetRef:Ee[8]||(Ee[8]=Te=>K(Te,3))},{default:vt(()=>[H.$slots[H.vertical?"arrow-down":"arrow-right"]?Ft(H.$slots,H.vertical?"arrow-down":"arrow-right",{key:0}):xe("",!0),H.$slots[H.vertical?"arrow-down":"arrow-right"]?xe("",!0):($(),Ut(Du(H.vertical?Ne(pD):Ne(Ak)),{key:1}))]),_:3},8,["disabled","aria-label"])):xe("",!0)],64)):xe("",!0),H.monthPicker?($(),Ut(Ih,On({key:1},j.value("month"),{"skip-active":H.range,"internal-model-value":t.internalModelValue,year:t.year,"auto-apply-month":H.autoApplyMonth,"multi-model-value":X.value,"month-picker":"",modelValue:F.value,"onUpdate:modelValue":Ee[17]||(Ee[17]=Te=>F.value=Te),onToggle:W,onSelected:Ee[18]||(Ee[18]=Te=>H.$emit("overlay-closed"))}),zi({header:vt(()=>{var Te,Q,Se;return[l("div",pX,[l("div",{class:"dp__month_year_col_nav",tabindex:"0",ref_key:"mpPrevIconRef",ref:E,onClick:Ee[9]||(Ee[9]=Ve=>oe(!1)),onKeydown:Ee[10]||(Ee[10]=es(Ve=>oe(!1),["enter"]))},[l("div",{class:Me(["dp__inner_nav",{dp__inner_nav_disabled:Ne(f)(!1)}]),role:"button","aria-label":(Te=Ne(i).ariaLabels)==null?void 0:Te.prevMonth},[H.$slots["arrow-left"]?Ft(H.$slots,"arrow-left",{key:0}):xe("",!0),H.$slots["arrow-left"]?xe("",!0):($(),Ut(Ne(Tk),{key:1}))],10,mX)],544),l("div",{class:"dp__pointer",role:"button",ref_key:"mpYearButtonRef",ref:P,"aria-label":(Q=Ne(i).ariaLabels)==null?void 0:Q.openYearsOverlay,tabindex:"0",onClick:Ee[11]||(Ee[11]=()=>M(!1)),onKeydown:Ee[12]||(Ee[12]=es(()=>M(!1),["enter"]))},[H.$slots.year?Ft(H.$slots,"year",{key:0,year:t.year}):xe("",!0),H.$slots.year?xe("",!0):($(),L(Ze,{key:1},[Pe(pe(t.year),1)],64))],40,gX),l("div",{class:"dp__month_year_col_nav",tabindex:"0",ref_key:"mpNextIconRef",ref:I,onClick:Ee[13]||(Ee[13]=Ve=>oe(!0)),onKeydown:Ee[14]||(Ee[14]=es(Ve=>oe(!0),["enter"]))},[l("div",{class:Me(["dp__inner_nav",{dp__inner_nav_disabled:Ne(f)(!0)}]),role:"button","aria-label":(Se=Ne(i).ariaLabels)==null?void 0:Se.nextMonth},[H.$slots["arrow-right"]?Ft(H.$slots,"arrow-right",{key:0}):xe("",!0),H.$slots["arrow-right"]?xe("",!0):($(),Ut(Ne(Ak),{key:1}
50))],10,vX)],544)]),et(ja,{name:Ne(o)(y.value),css:Ne(r)},{default:vt(()=>[y.value?($(),Ut(Ih,On({key:0},j.value("year"),{modelValue:C.value,"onUpdate:modelValue":Ee[15]||(Ee[15]=Ve=>C.value=Ve),onToggle:M,onSelected:Ee[16]||(Ee[16]=Ve=>H.$emit("overlay-closed"))}),zi({"button-icon":vt(()=>[H.$slots["calendar-icon"]?Ft(H.$slots,"calendar-icon",{key:0}):xe("",!0),H.$slots["calendar-icon"]?xe("",!0):($(),Ut(Ne(lv),{key:1}))]),_:2},[H.$slots["year-overlay-value"]?{name:"item",fn:vt(({item:Ve})=>[Ft(H.$slots,"year-overlay-value",{text:Ve.text,value:Ve.value})]),key:"0"}:void 0]),1040,["modelValue"])):xe("",!0)]),_:3},8,["name","css"])]}),_:2},[H.$slots["month-overlay-value"]?{name:"item",fn:vt(({item:Te})=>[Ft(H.$slots,"month-overlay-value",{text:Te.text,value:Te.value})]),key:"0"}:void 0]),1040,["skip-active","internal-model-value","year","auto-apply-month","multi-model-value","modelValue"])):xe("",!0),H.yearPicker?($(),Ut(Ih,On({key:2},j.value("year"),{modelValue:C.value,"onUpdate:modelValue":Ee[19]||(Ee[19]=Te=>C.value=Te),"multi-model-value":X.value,"skip-active":H.range,"skip-button-ref":"","year-picker":"",onToggle:M,onSelected:Ee[20]||(Ee[20]=Te=>H.$emit("overlay-closed"))}),zi({_:2},[H.$slots["year-overlay-value"]?{name:"item",fn:vt(({item:Te})=>[Ft(H.$slots,"year-overlay-value",{text:Te.text,value:Te.value})]),key:"0"}:void 0]),1040,["modelValue","multi-model-value","skip-active"])):xe("",!0)],64))])}}}),yX={key:0,class:"dp__time_input"},_X=["aria-label","onKeydown","onClick"],xX=l("span",{class:"dp__tp_inline_btn_bar dp__tp_btn_in_l"},null,-1),wX=l("span",{class:"dp__tp_inline_btn_bar dp__tp_btn_in_r"},null,-1),EX=["aria-label","onKeydown","onClick"],SX=["aria-label","onKeydown","onClick"],kX=l("span",{class:"dp__tp_inline_btn_bar dp__tp_btn_in_l"},null,-1),CX=l("span",{class:"dp__tp_inline_btn_bar dp__tp_btn_in_r"},null,-1),TX={key:0},AX=["aria-label","onKeydown"],OX=Mi({__name:"TimeInput",props:{hours:{type:Number,default:0},minutes:{type:Number,default:0},seconds:{type:Number,default:0},closeTimePickerBtn:{type:Object,default:null},order:{type:Number,default:0},...Ol},emits:["set-hours","set-minutes","update:hours","update:minutes","update:seconds","reset-flow","mounted","overlay-closed","am-pm-change"],setup(t,{expose:e,emit:s}){const n=t,{setTimePickerElements:i,setTimePickerBackRef:o}=Al(),{defaults:r}=Cr(n),{transitionName:c,showTransition:h}=uv(r.value.transitions),f=en({hours:!1,minutes:!1,seconds:!1}),v=ve("AM"),g=ve(null),y=ve([]);Xt(()=>{s("mounted")});const x=q=>ni(new Date,{hours:q.hours,minutes:q.minutes,seconds:n.enableSeconds?q.seconds:0,milliseconds:0}),E=Ae(()=>({hours:n.hours,minutes:n.minutes,seconds:n.seconds})),P=Ae(()=>q=>!B(+n[q]+ +n[`${q}Increment`],q)),I=Ae(()=>q=>!B(+n[q]-+n[`${q}Increment`],q)),D=(q,W)=>WO(ni(yt(),q),W),F=(q,W)=>Wq(ni(yt(),q),W),C=Ae(()=>({dp__time_col:!0,dp__time_col_block:!n.timePickerInline,dp__time_col_reg_block:!n.enableSeconds&&n.is24&&!n.timePickerInline,dp__time_col_reg_inline:!n.enableSeconds&&n.is24&&n.timePickerInline,dp__time_col_reg_with_button:!n.enableSeconds&&!n.is24,dp__time_col_sec:n.enableSeconds&&n.is24,dp__time_col_sec_with_button:n.enableSeconds&&!n.is24})),A=Ae(()=>{const q=[{type:"hours"},{type:"",separator:!0},{type:"minutes"}];return n.enableSeconds?q.concat([{type:"",separator:!0},{type:"seconds"}]):q}),O=Ae(()=>A.value.filter(q=>!q.separator)),j=Ae(()=>q=>{if(q==="hours"){const W=ce(+n.hours);return{text:W<10?`0${W}`:`${W}`,value:W}}return{text:n[q]<10?`0${n[q]}`:`${n[q]}`,value:n[q]}}),te=q=>{const W=n.is24?24:12,M=q==="hours"?W:60,he=+n[`${q}GridIncrement`],oe=q==="hours"&&!n.is24?he:0,K=[];for(let H=oe;H<M;H+=he)K.push({value:H,text:H<10?`0${H}`:`${H}`});return q==="hours"&&!n.is24&&K.push({value:0,text:"12"}),wG(K)},B=(q,W)=>{const M=n.minTime?x(Ly(n.minTime)):null,he=n.maxTime?x(Ly(n.maxTime)):null,oe=x(Ly(E.value,W,q));return M&&he?(Zh(oe,he)||lu(oe,he))&&(Qh(oe,M)||lu(oe,M)):M?Qh(oe,M)||lu(oe,M):he?Zh(oe,he)||lu(oe,he):!0},z=Ae(()=>q=>te(q).flat().filter(W=>OG(W.value)).map(W=>W.value).filter(W=>!B(W,q))),re=q=>n[`no${q[0].toUpperCase()+q.slice(1)}Overlay`],ne=q=>{re(q)||(f[q]=!f[q],f[q]||s("overlay-closed"))},X=q=>q==="hours"?lo:q==="minutes"?uo:nd,G=(q,W=!0)=>{const M=W?D:F,he=W?+n[`${q}Increment`]:-+n[`${q}Increment`];B(+n[q]+he,q)&&s(`update:${q}`,X(q)(M({[q]:+n[q]},{[q]:+n[`${q}Increment`]})))},ce=q=>n.is24?q:(q>=12?v.value="PM":v.value="AM",TG(q)),be=()=>
50{v.value==="PM"?(v.value="AM",s("update:hours",n.hours-12)):(v.value="PM",s("update:hours",n.hours+12)),s("am-pm-change",v.value)},J=q=>{f[q]=!0},Z=(q,W,M)=>{if(q&&n.arrowNavigation){Array.isArray(y.value[W])?y.value[W][M]=q:y.value[W]=[q];const he=y.value.reduce((oe,K)=>K.map((H,Ee)=>[...oe[Ee]||[],K[Ee]]),[]);o(n.closeTimePickerBtn),g.value&&(he[1]=he[1].concat(g.value)),i(he,n.order)}},ge=(q,W)=>q==="hours"&&!n.is24?s(`update:${q}`,v.value==="PM"?W+12:W):s(`update:${q}`,W);return e({openChildCmp:J}),(q,W)=>{var M;return q.disabled?xe("",!0):($(),L("div",yX,[($(!0),L(Ze,null,At(A.value,(he,oe)=>{var K,H,Ee;return $(),L("div",{key:oe,class:Me(C.value)},[he.separator?($(),L(Ze,{key:0},[Pe(" : ")],64)):($(),L(Ze,{key:1},[l("button",{type:"button",class:Me({dp__btn:!0,dp__inc_dec_button:!n.timePickerInline,dp__inc_dec_button_inline:n.timePickerInline,dp__tp_inline_btn_top:n.timePickerInline,dp__inc_dec_button_disabled:P.value(he.type)}),"aria-label":(K=Ne(r).ariaLabels)==null?void 0:K.incrementValue(he.type),tabindex:"0",onKeydown:[es(_e=>G(he.type),["enter"]),es(_e=>G(he.type),["space"])],onClick:_e=>G(he.type),ref_for:!0,ref:_e=>Z(_e,oe,0)},[n.timePickerInline?($(),L(Ze,{key:1},[xX,wX],64)):($(),L(Ze,{key:0},[q.$slots["arrow-up"]?Ft(q.$slots,"arrow-up",{key:0}):xe("",!0),q.$slots["arrow-up"]?xe("",!0):($(),Ut(Ne(fD),{key:1}))],64))],42,_X),l("button",{type:"button","aria-label":(H=Ne(r).ariaLabels)==null?void 0:H.openTpOverlay(he.type),class:Me(["dp__btn",re(he.type)?void 0:{dp__time_display:!0,dp__time_display_block:!n.timePickerInline,dp__time_display_inline:n.timePickerInline}]),tabindex:"0",onKeydown:[es(_e=>ne(he.type),["enter"]),es(_e=>ne(he.type),["space"])],onClick:_e=>ne(he.type),ref_for:!0,ref:_e=>Z(_e,oe,1)},[q.$slots[he.type]?Ft(q.$slots,he.type,{key:0,text:j.value(he.type).text,value:j.value(he.type).value}):xe("",!0),q.$slots[he.type]?xe("",!0):($(),L(Ze,{key:1},[Pe(pe(j.value(he.type).text),1)],64))],42,EX),l("button",{type:"button",class:Me({dp__btn:!0,dp__inc_dec_button:!n.timePickerInline,dp__inc_dec_button_inline:n.timePickerInline,dp__tp_inline_btn_bottom:n.timePickerInline,dp__inc_dec_button_disabled:I.value(he.type)}),"aria-label":(Ee=Ne(r).ariaLabels)==null?void 0:Ee.decrementValue(he.type),tabindex:"0",onKeydown:[es(_e=>G(he.type,!1),["enter"]),es(_e=>G(he.type,!1),["space"])],onClick:_e=>G(he.type,!1),ref_for:!0,ref:_e=>Z(_e,oe,2)},[n.timePickerInline?($(),L(Ze,{key:1},[kX,CX],64)):($(),L(Ze,{key:0},[q.$slots["arrow-down"]?Ft(q.$slots,"arrow-down",{key:0}):xe("",!0),q.$slots["arrow-down"]?xe("",!0):($(),Ut(Ne(pD),{key:1}))],64))],42,SX)],64))],2)}),128)),q.is24?xe("",!0):($(),L("div",TX,[q.$slots["am-pm-button"]?Ft(q.$slots,"am-pm-button",{key:0,toggle:be,value:v.value}):xe("",!0),q.$slots["am-pm-button"]?xe("",!0):($(),L("button",{key:1,ref_key:"amPmButton",ref:g,type:"button",class:"dp__pm_am_button",role:"button","aria-label":(M=Ne(r).ariaLabels)==null?void 0:M.amPmButton,tabindex:"0",onClick:be,onKeydown:[es(St(be,["prevent"]),["enter"]),es(St(be,["prevent"]),["space"])]},pe(v.value),41,AX))])),($(!0),L(Ze,null,At(O.value,(he,oe)=>($(),Ut(ja,{key:oe,name:Ne(c)(f[he.type]),css:Ne(h)},{default:vt(()=>[f[he.type]?($(),Ut(Ih,{key:0,items:te(he.type),"disabled-values":Ne(r).filters.times[he.type].concat(z.value(he.type)),"esc-close":q.escClose,"aria-labels":Ne(r).ariaLabels,"hide-navigation":q.hideNavigation,"onUpdate:modelValue":K=>ge(he.type,K),onSelected:K=>ne(he.type),onToggle:K=>ne(he.type),onResetFlow:W[0]||(W[0]=K=>q.$emit("reset-flow")),type:he.type},zi({"button-icon":vt(()=>[q.$slots["clock-icon"]?Ft(q.$slots,"clock-icon",{key:0}):xe("",!0),q.$slots["clock-icon"]?xe("",!0):($(),Ut(Ne(hD),{key:1}))]),_:2},[q.$slots[`${he.type}-overlay-value`]?{name:"item",fn:vt(({item:K})=>[Ft(q.$slots,`${he.type}-overlay-value`,{text:K.text,value:K.value})]),key:"0"}:void 0]),1032,["items","disabled-values","esc-close","aria-labels","hide-navigation","onUpdate:modelValue","onSelected","onToggle","type"])):xe("",!0)]),_:2},1032,["name","css"]))),128))]))}}}),DX=["aria-label"],PX=["tabindex"],$X=["aria-label"],IX=Mi({__name:"TimePicker",props:{hours:{type:[Number,Array],default:0},minutes:{type:[Number,Array],default:0},seconds:{type:[Number,Array],default:0},internalModelValue:{type:[Date,Array],default:null},...Ol},emits:["update:hours","update:minutes","update:seconds","mount","reset-flow","overlay-opened","overlay-closed","am-pm-change"],setup(t,{expose:e,emit:s}){const n=t,{buildMatrix:i,setTimePicker:o}=Al(),r=ev(),{hideNavigationButtons:c,defaults:h}=Cr(n),{transitionName:f,showTransition:v}=uv(h.value.transitions),g=ve(null),y=ve(null),x=ve([]),E=ve(null);Xt(()=>{s("mount"),!n.timePicker&&n.arrowNavigation?i([Dn(g.value)],"time"):o(!0,n.timePicker)});const P=Ae(()=>n.range&&n.modelAuto?_D(n.internalModelValue):!0),I=ve(!1),D=ne=>({hours:Array.isArray(n.hours)?n.hours[ne]:n.hours,minutes:Array.isArray(n.minutes)?n.minutes[ne]:n.minutes,seconds:Array.isArray(n.seconds)?n.seconds[ne]:n.seconds}),F=Ae(()=>{const ne=[];if(n.range)for(let X=0;X<2;X++)ne.push(D(X));else ne.push(D(0));return ne}),C=(ne,X=!1,G="")=>{X||s("reset-flow"),I.value=ne,s(ne?"overlay-opened":"overlay-closed"),n.arrowNavigation&&o(ne),vs(()=>{G!==""&&x.value[0]&&x.value[0].openChildCmp(G)})},A=Ae(()=>({dp__btn:!0,dp__button:!0,dp__button_bottom:n.autoApply&&!n.keepActionRow})),O=uu(r,"timePicker"),j=(ne,X,G)=>n.range?X===0?[ne,F.value[1][G]]:[F.value[0][G],ne]:ne,te=ne=>{s("update:hours",ne)},B=ne=>{s("update:minutes",ne)},z=ne=>{s("update:seconds",ne)},re=()=>{if(E.value){const ne=DG(E.value);
50ne&&ne.focus({preventScroll:!0})}};return e({toggleTimePicker:C}),(ne,X)=>{var G;return $(),L("div",null,[!ne.timePicker&&!ne.timePickerInline?_t(($(),L("button",{key:0,type:"button",class:Me(A.value),"aria-label":(G=Ne(h).ariaLabels)==null?void 0:G.openTimePicker,tabindex:"0",ref_key:"openTimePickerBtn",ref:g,onKeydown:[X[0]||(X[0]=es(ce=>C(!0),["enter"])),X[1]||(X[1]=es(ce=>C(!0),["space"]))],onClick:X[2]||(X[2]=ce=>C(!0))},[ne.$slots["clock-icon"]?Ft(ne.$slots,"clock-icon",{key:0}):xe("",!0),ne.$slots["clock-icon"]?xe("",!0):($(),Ut(Ne(hD),{key:1}))],42,DX)),[[Rr,!Ne(c)("time")]]):xe("",!0),et(ja,{name:Ne(f)(I.value),css:Ne(v)&&!ne.timePickerInline},{default:vt(()=>{var ce;return[I.value||ne.timePicker||ne.timePickerInline?($(),L("div",{key:0,class:Me({dp__overlay:!ne.timePickerInline}),ref_key:"overlayRef",ref:E,tabindex:ne.timePickerInline?void 0:0},[l("div",{class:Me(ne.timePickerInline?"dp__time_picker_inline_container":"dp__overlay_container dp__container_flex dp__time_picker_overlay_container"),style:{display:"flex"}},[ne.$slots["time-picker-overlay"]?Ft(ne.$slots,"time-picker-overlay",{key:0,hours:t.hours,minutes:t.minutes,seconds:t.seconds,setHours:te,setMinutes:B,setSeconds:z}):xe("",!0),ne.$slots["time-picker-overlay"]?xe("",!0):($(),L("div",{key:1,class:Me(ne.timePickerInline?"dp__flex":"dp__overlay_row dp__flex_row")},[($(!0),L(Ze,null,At(F.value,(be,J)=>_t(($(),Ut(OX,On({key:J},{...ne.$props,order:J,hours:be.hours,minutes:be.minutes,seconds:be.seconds,closeTimePickerBtn:y.value,disabled:J===0?ne.fixedStart:ne.fixedEnd},{ref_for:!0,ref_key:"timeInputRefs",ref:x,"onUpdate:hours":Z=>te(j(Z,J,"hours")),"onUpdate:minutes":Z=>B(j(Z,J,"minutes")),"onUpdate:seconds":Z=>z(j(Z,J,"seconds")),onMounted:re,onOverlayClosed:re,onAmPmChange:X[3]||(X[3]=Z=>ne.$emit("am-pm-change",Z))}),zi({_:2},[At(Ne(O),(Z,ge)=>({name:Z,fn:vt(q=>[Ft(ne.$slots,Z,Zn(vr(q)))])}))]),1040,["onUpdate:hours","onUpdate:minutes","onUpdate:seconds"])),[[Rr,J===0?!0:P.value]])),128))],2)),!ne.timePicker&&!ne.timePickerInline?_t(($(),L("button",{key:2,type:"button",ref_key:"closeTimePickerBtn",ref:y,class:Me(A.value),"aria-label":(ce=Ne(h).ariaLabels)==null?void 0:ce.closeTimePicker,tabindex:"0",onKeydown:[X[4]||(X[4]=es(be=>C(!1),["enter"])),X[5]||(X[5]=es(be=>C(!1),["space"]))],onClick:X[6]||(X[6]=be=>C(!1))},[ne.$slots["calendar-icon"]?Ft(ne.$slots,"calendar-icon",{key:0}):xe("",!0),ne.$slots["calendar-icon"]?xe("",!0):($(),Ut(Ne(lv),{key:1}))],42,$X)),[[Rr,!Ne(c)("time")]]):xe("",!0)],2)],10,PX)):xe("",!0)]}),_:3},8,["name","css"])])}}}),MX=(t,e)=>{const{isDisabled:s,matchDate:n,getWeekFromDate:i,defaults:o}=Cr(e),r=ve(null),c=ve(yt()),h=q=>{!q.current&&e.hideOffsetDates||(r.value=q.value)},f=()=>{r.value=null},v=q=>Array.isArray(t.value)&&e.range&&t.value[0]&&r.value?q?qi(r.value,t.value[0]):Ai(r.value,t.value[0]):!0,g=(q,W)=>{const M=()=>t.value?W?t.value[0]||null:t.value[1]:null,he=t.value&&Array.isArray(t.value)?M():null;return Js(yt(q.value),he)},y=q=>{const W=Array.isArray(t.value)?t.value[0]:null;return q?!Ai(r.value||null,W):!0},x=(q,W=!0)=>(e.range||e.weekPicker)&&Array.isArray(t.value)&&t.value.length===2?e.hideOffsetDates&&!q.current?!1:Js(yt(q.value),t.value[W?0:1]):e.range?g(q,W)&&y(W)||Js(q.value,Array.isArray(t.value)?t.value[0]:null)&&v(W):!1,E=(q,W,M)=>Array.isArray(t.value)&&t.value[0]&&t.value.length===1?q?!1:M?qi(t.value[0],W.value):Ai(t.value[0],W.value):!1,P=q=>!t.value||e.hideOffsetDates&&!q.current?!1:e.range?e.modelAuto&&Array.isArray(t.value)?Js(q.value,t.value[0]?t.value[0]:c.value):!1:e.multiDates&&Array.isArray(t.value)?t.value.some(W=>Js(W,q.value)):Js(q.value,t.value?t.value:c.value),I=q=>{if(e.autoRange||e.weekPicker){if(r.value){if(e.hideOffsetDates&&!q.current)return!1;const W=ho(r.value,+e.autoRange),M=i(yt(r.value));return e.weekPicker?Js(M[1],yt(q.value)):Js(W,yt(q.value))}return!1}return!1},D=q=>{if(e.autoRange||e.weekPicker){if(r.value){const W=ho(r.value,+e.autoRange);if(e.hideOffsetDates&&!q.current)return!1;const M=i(yt(r.value));return e.weekPicker?qi(q.value,M[0])&&Ai(q.value,M[1]):qi(q.value,r.value)&&Ai(q.value,W)}return!1}return!1},F=q=>{if(e.autoRange||e.weekPicker){if(r.value){if(e.hideOffsetDates&&!q.current)return!1;const W=i(yt(r.value));return e.weekPicker?Js(W[0],q.value):Js(r.value,q.value)}return!1}return!1},C=q=>mD(t.value,r.value,q.value),A=()=>e.modelAuto&&Array.isArray(e.internalModelValue)?!!e.internalModelValue[0]:!1,O=()=>e.modelAuto?_D(e.internalModelValue):!0,j=q=>{if(Array.isArray(t.value)&&t.value.length||e.weekPicker)return!1;const W=e.range?!x(q)&&!x(q,!1):!0;return!s(q.value)&&!P(q)&&!(!q.current&&e.hideOffsetDates)&&W},te=q=>e.range?e.modelAuto?A()&&P(q):!1:P(q),B=q=>{var W;return e.highlight?n(q.value,(W=e.arrMapValues)!=null&&W.highlightedDates?e.arrMapValues.highlightedDates:e.highlight):!1},z=q=>s(q.value)&&e.highlightDisabledDays===!1,re=q=>e.highlightWeekDays&&e.highlightWeekDays.includes(q.value.getDay()),ne=q=>(e.range||e.weekPicker)&&(!(o.value.multiCalendars>0)||q.current)&&O()&&!(!q.current&&e.hideOffsetDates)&&!P(q)?C(q):!1,X=q=>{const{isRangeStart:W,isRangeEnd:M}=be(q),he=e.range?W||M:!1;return{dp__cell_offset:!q.current,dp__pointer:!e.disabled&&!(!q.current&&e.hideOffsetDates)&&!s(q.value),dp__cell_disabled:s(q.value),dp__cell_highlight:!z(q)&&(B(q)||re(q))&&!te(q)&&!he,dp__cell_highlight_active:!z(q)&&(B(q)||re(q))&&te(q),dp__today:!e.noToday&&Js(q.value,c.value)&&q.current}},G=q=>({dp__active_date:te(q),dp__date_hover:j(q)}),ce=q=>({...J(q),...Z(q),dp__range_between_week:ne(q)&&e.weekPicker}),be=q=>{const W=o.value.multiCalendars>0?q.current&&x(q)&&O():x(q)&&O(),M=o.value.multiCalendars>0?q.current&&x(q,!1)&&O():x(q,!1)&&O();return{isRangeStart:W,isRangeEnd:M}},J=q=>{const{isRangeStart:W,isRangeEnd:M}=be(q);return{dp__range_start:W,dp__range_end:M,dp__range_between:ne(q)&&!e.weekPicker,dp__date_hover_start:E(j(q),q,!0),dp__date_hover_end:E(j(q),q,!1)}},Z=q=>({...J(q),dp__cell_auto_range:D(q),dp__cell_auto_range_start:F(q),dp__cell_auto_range_end:I(q)}),ge=q=>e.range?e.autoRange?Z(q):e.modelAuto?{...G(q),...J(q)}:J(q):e.weekPicker?ce(q):G(q);return{setHoverDate:h,clearHoverDate:f,getDayClassData:q=>e.hideOffsetDates&&!q.current?{}:{...X(q),...ge(q),[e.dayClass?e.dayClass(q.value):""]:!0,[e.calendarCellClassName]:!!e.calendarCellClassName}}},NX=["id","onKeydown"],LX={key:0,class:"dp__sidebar_left"},RX={key:1,class:"dp__preset_ranges"}
50,FX=["onClick"],VX={key:2,class:"dp__sidebar_right"},BX={key:3,class:"dp__action_extra"},UX=Mi({__name:"DatepickerMenu",props:{openOnTop:{type:Boolean,default:!1},internalModelValue:{type:[Date,Array],default:null},arrMapValues:{type:Object,default:()=>({})},...Ol},emits:["close-picker","select-date","auto-apply","time-update","flow-step","update-month-year","invalid-select","update:internal-model-value","recalculate-position","invalid-fixed-range","tooltip-open","tooltip-close","time-picker-open","time-picker-close","am-pm-change","range-start","range-end"],setup(t,{expose:e,emit:s}){const n=t,i=Ae(()=>{const{openOnTop:He,internalModelValue:it,arrMapValues:$t,...ze}=n;return ze}),{setMenuFocused:o,setShiftKey:r,control:c}=gD(),{getCalendarDays:h,defaults:f}=Cr(n),v=ev(),g=ve(null),y=en({timePicker:!!(!n.enableTimePicker||n.timePicker||n.monthPicker),monthYearInput:!!n.timePicker,calendar:!1}),x=ve([]),E=ve([]),P=ve(null),I=ve(null),D=ve(0),F=ve(!1),C=ve(0);Xt(()=>{var He;F.value=!0,!((He=n.presetRanges)!=null&&He.length)&&!v["left-sidebar"]&&!v["right-sidebar"]&&(ft(),window.addEventListener("resize",ft));const it=Dn(I);if(it&&!n.textInput&&!n.inline&&(o(!0),z()),it){const $t=ze=>{n.allowPreventDefault&&ze.preventDefault(),ze.stopImmediatePropagation(),ze.stopPropagation()};it.addEventListener("pointerdown",$t),it.addEventListener("mousedown",$t)}}),Ni(()=>{window.removeEventListener("resize",ft)});const{arrowRight:A,arrowLeft:O,arrowDown:j,arrowUp:te}=Al(),B=He=>{He||He===0?E.value[He].triggerTransition(ce.value(He),be.value(He)):E.value.forEach((it,$t)=>it.triggerTransition(ce.value($t),be.value($t)))},z=()=>{const He=Dn(I);He&&He.focus({preventScroll:!0})},re=()=>{var He;(He=n.flow)!=null&&He.length&&C.value!==-1&&(C.value+=1,s("flow-step",C.value),Xe())},ne=()=>{C.value=-1},{calendars:X,modelValue:G,month:ce,year:be,time:J,updateTime:Z,updateMonthYear:ge,selectDate:q,getWeekNum:W,monthYearSelect:M,handleScroll:he,handleArrow:oe,handleSwipe:K,getMarker:H,selectCurrentDate:Ee,presetDateRange:_e}=FG(n,s,re,B,C),{setHoverDate:Ce,clearHoverDate:Re,getDayClassData:Ke}=MX(G,n),Be={modelValue:G,month:ce,year:be,time:J,updateTime:Z,updateMonthYear:ge,selectDate:q,presetDateRange:_e,handleMonthYearChange:He=>{x.value[0]&&x.value[0].handleMonthYearChange(He)}};Pt(X,()=>{n.openOnTop&&setTimeout(()=>{s("recalculate-position")},0)},{deep:!0});const Te=uu(v,"calendar"),Q=uu(v,"action"),Se=uu(v,"timePicker"),Ve=uu(v,"monthYear"),Qe=Ae(()=>n.openOnTop?"dp__arrow_bottom":"dp__arrow_top"),je=Ae(()=>kG(n.yearRange,n.reverseYears)),nt=Ae(()=>CG(n.formatLocale,n.locale,n.monthNameFormat)),ft=()=>{const He=Dn(g);He&&(D.value=He.getBoundingClientRect().width)},ut=Ae(()=>He=>h(ce.value(He),be.value(He))),Ye=Ae(()=>f.value.multiCalendars>0?[...Array(f.value.multiCalendars).keys()]:[0]),We=Ae(()=>He=>He===1),ot=Ae(()=>n.monthPicker||n.timePicker||n.yearPicker),ht=Ae(()=>({dp__menu_inner:!0,dp__flex_display:f.value.multiCalendars>0})),Tt=Ae(()=>({dp__instance_calendar:f.value.multiCalendars>0})),Ot=Ae(()=>({dp__menu_disabled:n.disabled,dp__menu_readonly:n.readonly})),zt=Ae(()=>He=>Fe(ut,He)),Kt=Ae(()=>({dp__menu:!0,dp__menu_index:!n.inline,dp__relative:n.inline,[n.menuClassName]:!!n.menuClassName})),Fe=(He,it)=>He.value(it).map($t=>({...$t,days:$t.days.map(ze=>(ze.marker=H(ze),ze.classData=Ke(ze),ze))})),ee=He=>{He.stopPropagation(),He.stopImmediatePropagation()},R=()=>{n.escClose&&s("close-picker")},we=(He,it=!1)=>{q(He,it),n.spaceConfirm&&s("select-date")},fe=He=>{var it;(it=n.flow)!=null&&it.length&&(y[He]=!0,Object.keys(y).filter($t=>!y[$t]).length||Xe())},Oe=(He,it,$t,ze,...Je)=>{if(n.flow[C.value]===He){const tt=ze?it.value[0]:it.value;tt&&tt[$t](...Je)}},Xe=()=>{Oe("month",x,"toggleMonthPicker",!0,!0),Oe("year",x,"toggleYearPicker",!0,!0),Oe("calendar",P,"toggleTimePicker",!1,!1,!0),Oe("time",P,"toggleTimePicker",!1,!0,!0);const He=n.flow[C.value];(He==="hours"||He==="minutes"||He==="seconds")&&Oe(He,P,"toggleTimePicker",!1,!0,!0,He)},at=He=>{if(n.arrowNavigation){if(He==="up")return te();if(He==="down")return j();if(He==="left")return O();if(He==="right")return A()}else He==="left"||He==="up"?oe("left",0,He==="up"):oe("right",0,He==="down")},wt=He=>{r(He.shiftKey),!n.disableMonthYearSelect&&He.code==="Tab"&&He.target.classList.contains("dp__menu")&&c.value.shiftKeyInMenu&&(He.preventDefault(),He.stopImmediatePropagation(),s("close-picker"))},gt=()=>{z(),s("time-picker-close")},pt=He=>{var it,$t,ze,Je,tt;(it=P.value)==null||it.toggleTimePicker(!1,!1),(ze=($t=x.value)==null?void 0:$t[He])==null||ze.toggleMonthPicker(!1,!1),(tt=(Je=x.value)==null?void 0:Je[He])==null||tt.toggleYearPicker(!1,!1)};return e({updateMonthYear:ge,switchView:(He,it=0)=>{var $t,ze,Je,tt,Jt;return He==="month"?(ze=($t=x.value)==null?void 0:$t[it])==null?void 0:ze.toggleMonthPicker(!1,!0):He==="year"?(tt=(Je=x.value)==null?void 0:Je[it])==null?void 0:tt.toggleYearPicker(!1,!0):He==="time"?(Jt=P.value)==null?void 0:Jt.toggleTimePicker(!0,!1):pt(it)}}),(He,it)=>{var $t;return $(),Ut(ja,{appear:"",name:($t=Ne(f).transitions)==null?void 0:$t.menuAppear,css:!!He.transitions},{default:vt(()=>{var ze,Je;return[l("div",{id:He.uid?`dp-menu-${He.uid}`:void 0,tabindex:"0",ref_key:"dpMenuRef",ref:I,role:"dialog",class:Me(Kt.value),onMouseleave:it[14]||(it[14]=(...tt)=>Ne(Re)&&Ne(Re)(...tt)),onClick:ee,onKeydown:[es(R,["esc"]),it[15]||(it[15]=es(St(tt=>at("left"),["prevent"]),["left"])),it[16]||(it[16]=es(St(tt=>at("up"),["prevent"]),["up"])),it[17]||(it[17]=es(St(tt=>at("down"),["prevent"]),["down"])),it[18]||(it[18]=es(St(tt=>at("right"),["prevent"]),["right"])),wt]},[(He.disabled||He.readonly)&&He.inline?($(),L("div",{key:0,class:Me(Ot.value)},null,2)):xe("",!0),!He.inline&&!He.teleportCenter?($(),L("div",{key:1,class:Me(Qe.value)},null,2)):xe("",!0),l("div",{class:Me({dp__menu_content_wrapper:((ze=He.presetRanges)==null?void 0:ze.length)||!!He.$slots["left-sidebar"]||!!He.$slots["right-sidebar"]})},[He.$slots["left-sidebar"]?($(),L("div",LX,[Ft(He.$slots,"left-sidebar",Zn(vr(Be)))])):xe("",!0),(Je=He.presetRanges)!=null&&Je.length?($(),L("div",RX,[($(!0),L(Ze,null,At(He.presetRanges,(tt,Jt)=>($(),L("div",{key:Jt,style:zs(tt.style||{}),class:"dp__preset_range",onClick:Ht=>Ne(_e)(tt.range,!!tt.slot)},[tt.slot?Ft(He.$slots,tt.slot,{key:0,presetDateRange:Ne(_e),label:tt.label,range:tt.range}):($(),L(Ze,{key:1},[Pe(pe(tt.label),1)],64))],12,FX))),128))])):xe("",!0),l("div",{class:"dp__instance_calendar",ref_key:"calendarWrapperRef",ref:g,role:"document"},[l("div",{class:Me(ht.value)},[($(!0),L(Ze,null,At(Ye.value,(tt,Jt)=>($(),L("div",{key:tt,class:Me(Tt.value)},[!He.disableMonthYearSelect&&!He.timePicker?($(),Ut(bX,On({key:0,ref_for:!0,ref:Ht=>{Ht&&(x.value[Jt]=Ht)},months:nt.value,years:je.value,month:Ne(ce)(tt),year:Ne(be)(tt),instance:tt,"internal-model-value":t.internalModelValue},i.value,{onMount:it[0]||(it[0]=Ht=>fe("monthYearInput")),onResetFlow:ne,onUpdateMonthYear:Ht=>Ne(ge)(tt,Ht),onMonthYearSelect:Ne(M),onOverlayClosed:z}),zi({_:2},[At(Ne(Ve),(Ht,sn)=>({name:Ht,fn:vt(gs=>[Ft(He.$slots,Ht,Zn(vr(gs)))])}))]),1040,["months","years","month","year","instance","internal-model-value","onUpdateMonthYear","onMonthYearSelect"])):xe("",!0),et(aX,On({ref_for:!0,ref:Ht=>{Ht&&(E.value[Jt]=Ht)},"specific-mode":ot.value,"get-week-num":Ne(W),instance:tt,"mapped-dates":zt.value(tt),month:Ne(ce)(tt),year:Ne(be)(tt)},i.value,{onSelectDate:Ht=>Ne(q)(Ht,!We.value(tt)),onHandleSpace:Ht=>we(Ht,!We.value(tt)),onSetHoverDate:it[1]||(it[1]=Ht=>Ne(Ce)(Ht)),onHandleScroll:Ht=>Ne(he)(Ht,tt),onHandleSwipe:Ht=>Ne(K)(Ht,tt),onMount:it[2]||(it[2]=Ht=>fe("calendar")),onResetFlow:ne,onTooltipOpen:it[3]||(it[3]=Ht=>He.$emit("tooltip-open",Ht)),onTooltipClose:it[4]||(it[4]=Ht=>He.$emit("tooltip-close",Ht))}),zi({_:2},[At(Ne(Te),(Ht,sn)=>({name:Ht,fn:vt(gs=>[Ft(He.$slots,Ht,Zn(vr({...gs}
50)))])}))]),1040,["specific-mode","get-week-num","instance","mapped-dates","month","year","onSelectDate","onHandleSpace","onHandleScroll","onHandleSwipe"])],2))),128))],2),l("div",null,[He.$slots["time-picker"]?Ft(He.$slots,"time-picker",Zn(On({key:0},{time:Ne(J),updateTime:Ne(Z)}))):($(),L(Ze,{key:1},[He.enableTimePicker&&!He.monthPicker&&!He.weekPicker?($(),Ut(IX,On({key:0,ref_key:"timePickerRef",ref:P,hours:Ne(J).hours,minutes:Ne(J).minutes,seconds:Ne(J).seconds,"internal-model-value":t.internalModelValue},i.value,{onMount:it[5]||(it[5]=tt=>fe("timePicker")),"onUpdate:hours":it[6]||(it[6]=tt=>Ne(Z)(tt)),"onUpdate:minutes":it[7]||(it[7]=tt=>Ne(Z)(tt,!1)),"onUpdate:seconds":it[8]||(it[8]=tt=>Ne(Z)(tt,!1,!0)),onResetFlow:ne,onOverlayClosed:gt,onOverlayOpened:it[9]||(it[9]=tt=>He.$emit("time-picker-open",tt)),onAmPmChange:it[10]||(it[10]=tt=>He.$emit("am-pm-change",tt))}),zi({_:2},[At(Ne(Se),(tt,Jt)=>({name:tt,fn:vt(Ht=>[Ft(He.$slots,tt,Zn(vr(Ht)))])}))]),1040,["hours","minutes","seconds","internal-model-value"])):xe("",!0)],64))])],512),He.$slots["right-sidebar"]?($(),L("div",VX,[Ft(He.$slots,"right-sidebar",Zn(vr(Be)))])):xe("",!0),He.$slots["action-extra"]?($(),L("div",BX,[He.$slots["action-extra"]?Ft(He.$slots,"action-extra",{key:0,selectCurrentDate:Ne(Ee)}):xe("",!0)])):xe("",!0)],2),!He.autoApply||He.keepActionRow?($(),Ut(JG,On({key:2,"menu-mount":F.value,"calendar-width":D.value,"internal-model-value":t.internalModelValue},i.value,{onClosePicker:it[11]||(it[11]=tt=>He.$emit("close-picker")),onSelectDate:it[12]||(it[12]=tt=>He.$emit("select-date")),onInvalidSelect:it[13]||(it[13]=tt=>He.$emit("invalid-select")),onSelectNow:Ne(Ee)}),zi({_:2},[At(Ne(Q),(tt,Jt)=>({name:tt,fn:vt(Ht=>[Ft(He.$slots,tt,Zn(vr({...Ht})))])}))]),1040,["menu-mount","calendar-width","internal-model-value","onSelectNow"])):xe("",!0)],42,NX)]}),_:3},8,["name","css"])}}}),jX=typeof window<"u"?window:void 0,Yy=()=>{},HX=t=>Hg()?(r_(t),!0):!1,WX=(t,e,s,n)=>{if(!t)return Yy;let i=Yy;const o=Pt(()=>Ne(t),c=>{i(),c&&(c.addEventListener(e,s,n),i=()=>{c.removeEventListener(e,s,n),i=Yy})},{immediate:!0,flush:"post"}),r=()=>{o(),i()};return HX(r),r},zX=(t,e,s,n={})=>{const{window:i=jX,event:o="pointerdown"}=n;return i?WX(i,o,r=>{const c=Dn(t),h=Dn(e);!c||!h||c===r.target||r.composedPath().includes(c)||r.composedPath().includes(h)||s(r)},{passive:!0}):void 0},YX=Mi({__name:"VueDatePicker",props:{...Ol},emits:["update:model-value","text-submit","closed","cleared","open","focus","blur","internal-model-change","recalculate-position","flow-step","update-month-year","invalid-select","invalid-fixed-range","tooltip-open","tooltip-close","time-picker-open","time-picker-close","am-pm-change","range-start","range-end"],setup(t,{expose:e,emit:s}){const n=t,i=ev(),o=ve(!1),r=Xc(n,"modelValue"),c=Xc(n,"timezone"),h=ve(null),f=ve(null),v=ve(!1),g=ve(null),y=en({disabledDates:null,allowedDates:null,highlightedDates:null}),{setMenuFocused:x,setShiftKey:E}=gD(),{clearArrowNav:P}=Al(),{validateDate:I,isValidTime:D,defaults:F,mapDatesArrToMap:C}=Cr(n);Xt(()=>{ce(n.modelValue),n.inline||(ne(g.value).addEventListener("scroll",M),window.addEventListener("resize",he)),n.inline&&(o.value=!0),C(y)}),Ni(()=>{if(!n.inline){const Ye=ne(g.value);Ye&&Ye.removeEventListener("scroll",M),window.removeEventListener("resize",he)}});const A=uu(i,"all",n.presetRanges),O=uu(i,"input");Pt([r,c],()=>{ce(r.value)},{deep:!0});const{openOnTop:j,menuStyle:te,resetPosition:B,setMenuPosition:z,setInitialPosition:re,getScrollableParent:ne}=UG(h,f,s,n),{inputValue:X,internalModelValue:G,parseExternalModelValue:ce,emitModelValue:be,formatInputValue:J,checkBeforeEmit:Z}=VG(s,n,v),ge=Ae(()=>({dp__main:!0,dp__theme_dark:n.dark,dp__theme_light:!n.dark,dp__flex_display:n.inline,dp__flex_display_with_input:n.inlineWithInput})),q=Ae(()=>n.dark?"dp__theme_dark":"dp__theme_light"),W=Ae(()=>n.teleport?{to:typeof n.teleport=="boolean"?"body":n.teleport,disabled:n.inline}:{class:"dp__outer_menu_wrap"}),M=()=>{o.value&&(n.closeOnScroll?Be():z())},he=()=>{o.value&&z()},oe=async()=>{var Ye,We,ot;!n.disabled&&!n.readonly&&(B(),await vs(),o.value=!0,await vs(),re(),await vs(),z(),delete te.value.opacity,!((Ye=F.value.transitions)!=null&&Ye.menuAppear)&&n.transitions&&((ot=(We=h.value)==null?void 0:We.$el)==null||ot.classList.add("dp__menu_transitioned")),o.value&&s("open"),o.value||Ke(),ce(n.modelValue))},K=()=>{X.value="",Ke(),s("update:model-value",null),s("cleared"),n.closeOnClearValue&&Be()},H=()=>{const Ye=G.value;return!Ye||!Array.isArray(Ye)&&I(Ye)?!0:Array.isArray(Ye)?Ye.length===2&&I(Ye[0])&&I(Ye[1])?!0:I(Ye[0]):!1},Ee=()=>{Z()&&H()?(be(),Be()):s("invalid-select",G.value)},_e=Ye=>{Ce(),be(),n.closeOnAutoApply&&!Ye&&Be()},Ce=()=>{f.value&&n.textInput&&f.value.setParsedDate(G.value)},Re=(Ye=!1)=>{n.autoApply&&D(G.value)&&H()&&(n.range&&Array.isArray(G.value)?(n.partialRange||G.value.length===2)&&_e(Ye):_e(Ye))},Ke=()=>{n.textInput||(G.value=null)},Be=()=>{n.inline||(o.value&&(o.value=!1,x(!1),E(!1),P(),s("closed"),re(),X.value&&ce(r.value)),Ke())},Te=(Ye,We)=>{if(!Ye){G.value=null;return}G.value=Ye,We&&(Ee(),s("text-submit"))},Q=()=>{n.autoApply&&D(G.value)&&be(),Ce()},Se=()=>o.value?Be():oe(),Ve=Ye=>{G.value=Ye},Qe=()=>{n.textInput&&(v.value=!0,J()),s("focus")},je=()=>{n.textInput&&(v.value=!1,ce(n.modelValue)),s("blur")},nt=Ye=>{h.value&&h.value.updateMonthYear(0,{month:Vk(Ye.month),year:Vk(Ye.year)})},ft=Ye=>{ce(Ye||n.modelValue)},ut=(Ye,We)=>{var ot;(ot=h.value)==null||ot.switchView(Ye,We)};return zX(h,f,n.onClickOutside?()=>n.onClickOutside(H):Be),e({closeMenu:Be,selectDate:Ee,clearValue:K,openMenu:oe,onScroll:M,formatInputValue:J,updateInternalModelValue:Ve,setMonthYear:nt,parseModel:ft,switchView:ut}),(Ye,We)=>($(),L("div",{class:Me(ge.value),ref_key:"pickerWrapperRef",ref:g},[et(qG,On({ref_key:"inputRef",ref:f,"is-menu-open":o.value,"input-value":Ne(X),"onUpdate:inputValue":We[0]||(We[0]=ot=>hn(X)?X.value=ot:null)},Ye.$props,{onClear:K,onOpen:oe,onSetInputDate:Te,onSetEmptyDate:Ne(be),onSelectDate:Ee,onToggle:Se,onClose:Be,onFocus:Qe,onBlur:je,onRealBlur:We[1]||(We[1]=ot=>v.value=!1)}),zi({_:2},[At(Ne(O),(ot,ht)=>({name:ot,fn:vt(Tt=>[Ft(Ye.$slots,ot,Zn(vr(Tt)))])}))]),1040,["is-menu-open","input-value","onSetEmptyDate"]),o.value?($(),Ut(Du(Ye.teleport?f_:"div"),Zn(On({key:0},W.value)),{default:vt(()=>
50[o.value?($(),Ut(UX,On({key:0,ref_key:"dpMenuRef",ref:h,class:q.value,style:Ye.inline?void 0:Ne(te),"open-on-top":Ne(j),"arr-map-values":y},Ye.$props,{"internal-model-value":Ne(G),"onUpdate:internalModelValue":We[2]||(We[2]=ot=>hn(G)?G.value=ot:null),onClosePicker:Be,onSelectDate:Ee,onAutoApply:Re,onTimeUpdate:Q,onFlowStep:We[3]||(We[3]=ot=>Ye.$emit("flow-step",ot)),onUpdateMonthYear:We[4]||(We[4]=ot=>Ye.$emit("update-month-year",ot)),onInvalidSelect:We[5]||(We[5]=ot=>Ye.$emit("invalid-select",Ne(G))),onInvalidFixedRange:We[6]||(We[6]=ot=>Ye.$emit("invalid-fixed-range",ot)),onRecalculatePosition:Ne(z),onTooltipOpen:We[7]||(We[7]=ot=>Ye.$emit("tooltip-open",ot)),onTooltipClose:We[8]||(We[8]=ot=>Ye.$emit("tooltip-close",ot)),onTimePickerOpen:We[9]||(We[9]=ot=>Ye.$emit("time-picker-open",ot)),onTimePickerClose:We[10]||(We[10]=ot=>Ye.$emit("time-picker-close",ot)),onAmPmChange:We[11]||(We[11]=ot=>Ye.$emit("am-pm-change",ot)),onRangeStart:We[12]||(We[12]=ot=>Ye.$emit("range-start",ot)),onRangeEnd:We[13]||(We[13]=ot=>Ye.$emit("range-end",ot))}),zi({_:2},[At(Ne(A),(ot,ht)=>({name:ot,fn:vt(Tt=>[Ft(Ye.$slots,ot,Zn(vr({...Tt})))])}))]),1040,["class","style","open-on-top","arr-map-values","internal-model-value","onRecalculatePosition"])):xe("",!0)]),_:3},16)):xe("",!0)],2))}}),cv=(()=>{const t=YX;return t.install=e=>{e.component("Vue3DatePicker",t)},t})(),qX=Object.freeze(Object.defineProperty({__proto__:null,default:cv},Symbol.toStringTag,{value:"Module"}));Object.entries(qX).forEach(([t,e])=>{t!=="default"&&(cv[t]=e)});var GX={lessThanXSeconds:{one:"menos de um segundo",other:"menos de {{count}} segundos"},xSeconds:{one:"1 segundo",other:"{{count}} segundos"},halfAMinute:"meio minuto",lessThanXMinutes:{one:"menos de um minuto",other:"menos de {{count}} minutos"},xMinutes:{one:"1 minuto",other:"{{count}} minutos"},aboutXHours:{one:"cerca de 1 hora",other:"cerca de {{count}} horas"},xHours:{one:"1 hora",other:"{{count}} horas"},xDays:{one:"1 dia",other:"{{count}} dias"},aboutXWeeks:{one:"cerca de 1 semana",other:"cerca de {{count}} semanas"},xWeeks:{one:"1 semana",other:"{{count}} semanas"},aboutXMonths:{one:"cerca de 1 mês",other:"cerca de {{count}} meses"},xMonths:{one:"1 mês",other:"{{count}} meses"},aboutXYears:{one:"cerca de 1 ano",other:"cerca de {{count}} anos"},xYears:{one:"1 ano",other:"{{count}} anos"},overXYears:{one:"mais de 1 ano",other:"mais de {{count}} anos"},almostXYears:{one:"quase 1 ano",other:"quase {{count}} anos"}},XX=function(e,s,n){var i,o=GX[e];return typeof o=="string"?i=o:s===1?i=o.one:i=o.other.replace("{{count}}",String(s)),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"em "+i:"há "+i:i},KX={full:"EEEE, d 'de' MMMM 'de' y",long:"d 'de' MMMM 'de' y",medium:"d MMM y",short:"dd/MM/yyyy"},JX={full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},QX={full:"{{date}} 'à s' {{time}}",long:"{{date}} 'à s' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},ZX={date:Bc({formats:KX,defaultWidth:"full"}),time:Bc({formats:JX,defaultWidth:"full"}),dateTime:Bc({formats:QX,defaultWidth:"full"})},eK={lastWeek:function(e){var s=e.getUTCDay(),n=s===0||s===6?"último":"última";return"'"+n+"' eeee 'à s' p"},yesterday:"'ontem à s' p",today:"'hoje à s' p",tomorrow:"'amanhã à s' p",nextWeek:"eeee 'à s' p",other:"P"},tK=function(e,s,n,i){var o=eK[e];return typeof o=="function"?o(s):o},sK={narrow:["AC","DC"],abbreviated:["AC","DC"],wide:["antes de cristo","depois de cristo"]},nK={narrow:["1","2","3","4"],abbreviated:["T1","T2","T3","T4"],wide:["1º trimestre","2º trimestre","3º trimestre","4º trimestre"]},iK={narrow:["j","f","m","a","m","j","j","a","s","o","n","d"],abbreviated:["jan","fev","mar","abr","mai","jun","jul","ago","set","out","nov","dez"],wide:["janeiro","fevereiro","março","abril","maio","junho","julho","agosto","setembro","outubro","novembro","dezembro"]},rK={narrow:["D","S","T","Q","Q","S","S"],short:["dom","seg","ter","qua","qui","sex","sab"],abbreviated:["domingo","segunda","terça","quarta","quinta","sexta","sábado"],wide:["domingo","segunda-feira","terça-feira","quarta-feira","quinta-feira","sexta-feira","sábado"]},aK={narrow:{am:"a",pm:"p",midnight:"mn",noon:"md",morning:"manhã",afternoon:"tarde",evening:"tarde",night:"noite"},abbreviated:{am:"AM",pm:"PM",midnight:"meia-noite",noon:"meio-dia",morning:"manhã",afternoon:"tarde",evening:"tarde",night:"noite"},wide:{am:"a.m.",pm:"p.m.",midnight:"meia-noite",noon:"meio-dia",morning:"manhã",afternoon:"tarde",evening:"tarde",night:"noite"}},oK={narrow:{am:"a",pm:"p",midnight:"mn",noon:"md",morning:"da manhã",afternoon:"da tarde",evening:"da tarde",night:"da noite"},abbreviated:{am:"AM",pm:"PM",midnight:"meia-noite",noon:"meio-dia",morning:"da manhã",afternoon:"da tarde",evening:"da tarde",night:"da noite"},wide:{am:"a.m.",pm:"p.m.",midnight:"meia-noite",noon:"meio-dia",morning:"da manhã",afternoon:"da tarde",evening:"da tarde",night:"da noite"}},lK=function(e,s){var n=Number(e);return(s==null?void 0:s.unit)==="week"?n+"ª":n+"º"},uK={ordinalNumber:lK,era:Oa({values:sK,defaultWidth:"wide"}),quarter:Oa({values:nK,defaultWidth:"wide",argumentCallback:function(e){return e-1}}),month:Oa({values:iK,defaultWidth:"wide"}),day:Oa({values:rK,defaultWidth:"wide"}),dayPeriod:Oa({values:aK,defaultWidth:"wide",formattingValues:oK,defaultFormattingWidth:"wide"})},cK=/^(\d+)[ºªo]?/i,dK=/\d+/i,hK={narrow:/^(ac|dc|a|d)/i,abbreviated:/^(a\.?\s?c\.?|d\.?\s?c\.?)/i,wide:/^(antes de cristo|depois de cristo)/i}
50,fK={any:[/^ac/i,/^dc/i],wide:[/^antes de cristo/i,/^depois de cristo/i]},pK={narrow:/^[1234]/i,abbreviated:/^T[1234]/i,wide:/^[1234](º)? trimestre/i},mK={any:[/1/i,/2/i,/3/i,/4/i]},gK={narrow:/^[jfmajsond]/i,abbreviated:/^(jan|fev|mar|abr|mai|jun|jul|ago|set|out|nov|dez)/i,wide:/^(janeiro|fevereiro|março|abril|maio|junho|julho|agosto|setembro|outubro|novembro|dezembro)/i},vK={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,/^fev/i,/^mar/i,/^abr/i,/^mai/i,/^jun/i,/^jul/i,/^ago/i,/^set/i,/^out/i,/^nov/i,/^dez/i]},bK={narrow:/^(dom|[23456]ª?|s[aá]b)/i,short:/^(dom|[23456]ª?|s[aá]b)/i,abbreviated:/^(dom|seg|ter|qua|qui|sex|s[aá]b)/i,wide:/^(domingo|(segunda|ter[cç]a|quarta|quinta|sexta)([- ]feira)?|s[aá]bado)/i},yK={short:[/^d/i,/^2/i,/^3/i,/^4/i,/^5/i,/^6/i,/^s[aá]/i],narrow:[/^d/i,/^2/i,/^3/i,/^4/i,/^5/i,/^6/i,/^s[aá]/i],any:[/^d/i,/^seg/i,/^t/i,/^qua/i,/^qui/i,/^sex/i,/^s[aá]b/i]},_K={narrow:/^(a|p|mn|md|(da) (manhã|tarde|noite))/i,any:/^([ap]\.?\s?m\.?|meia[-\s]noite|meio[-\s]dia|(d
50a) (manhã|tarde|noite))/i},xK={any:{am:/^a/i,pm:/^p/i,midnight:/^mn|^meia[-\s]noite/i,noon:/^md|^meio[-\s]dia/i,morning:/manhã/i,afternoon:/tarde/i,evening:/tarde/i,night:/noite/i}},wK={ordinalNumber:eD({matchPattern:cK,parsePattern:dK,valueCallback:function(e){return parseInt(e,10)}}),era:Da({matchPatterns:hK,defaultMatchWidth:"wide",parsePatterns:fK,defaultParseWidth:"any"}),quarter:Da({matchPatterns:pK,defaultMatchWidth:"wide",parsePatterns:mK,defaultParseWidth:"any",valueCallback:function(e){return e+1}}),month:Da({matchPatterns:gK,defaultMatchWidth:"wide",parsePatterns:vK,defaultParseWidth:"any"}),day:Da({matchPatterns:bK,defaultMatchWidth:"wide",parsePatterns:yK,defaultParseWidth:"any"}),dayPeriod:Da({matchPatterns:_K,defaultMatchWidth:"any",parsePatterns:xK,defaultParseWidth:"any"})},EK={code:"pt-BR",formatDistance:XX,formatLong:ZX,formatRelative:tK,localize:uK,match:wK,options:{weekStartsOn:0,firstWeekContainsDate:1}};const SK={class:"form-floating flex-fill position-relative"},kK=["id","placeholder","value","disabled"],CK=["for"],TK={__name:"DatepickerComponent",props:{modelValue:{type:[String,Date,null],default:null},id:{type:String,required:!0},label:{type:String,default:"Selecione uma data"},placeholder:{type:String,default:" "},invalid:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},showIcon:{type:Boolean,default:!1},locale:{type:Object,default:()=>EK},format:{type:String,default:"dd/MM/yyyy"}},emits:["update:modelValue"],setup(t,{expose:e,emit:s}){const n=t,i=s,o=ve(null),r=ve(null),c=ve(null);function h(D){let F=D.target.value.replace(/\D/g,"");if(F.length<=2?F=F:F.length<=4?F=F.substring(0,2)+"/"+F.substring(2,4):F=F.substring(0,2)+"/"+F.substring(2,4)+"/"+F.substring(4,8),D.target.value=F,F.length===10){const C=y(F);C&&(c.value=C),i("update:modelValue",F)}else i("update:modelValue",F)}function f(D){const F=D.target.value.trim();if(F.length===10){const C=y(F);C?(c.value=C,i("update:modelValue",x(C))):(i("update:modelValue",""),c.value=null,D.target.value="")}else F.length>0&&F.length<10&&(i("update:modelValue",""),c.value=null,D.target.value="")}function v(D){if(["ArrowLeft","ArrowRight","ArrowUp","ArrowDown","Tab","Delete","Backspace"].includes(D.key)||D.ctrlKey||D.metaKey)return;if(!/\d/.test(D.key)){D.preventDefault();return}D.target.value.replace(/\D/g,"").length>=8&&D.key!=="Backspace"&&D.key!=="Delete"&&D.preventDefault()}function g(D){vs(()=>{D.target.select()})}function y(D){if(!D||D.length!==10)return null;const F=/^(\d{2})\/(\d{2})\/(\d{4})$/.exec(D);if(F){const C=Number(F[1]),A=Number(F[2])-1,O=Number(F[3]);if(C<1||C>31||A<0||A>11||O<1900||O>2100)return null;const j=new Date(O,A,C);return j.getDate()!==C||j.getMonth()!==A||j.getFullYear()!==O||isNaN(j.getTime())?null:j}return null}function x(D){if(!D)return"";const F=D.getDate().toString().padStart(2,"0"),C=(D.getMonth()+1).toString().padStart(2,"0"),A=D.getFullYear();return`${F}/${C}/${A}`}const E=Ae(()=>typeof n.modelValue=="string"&&/^\d{2}\/\d{2}\/\d{4}$/.test(n.modelValue)?n.modelValue:c.value?x(c.value):"");Pt(()=>n.modelValue,D=>{if(!D){c.value=null;return}if(D instanceof Date){c.value=D;return}
50if(typeof D=="string"&&/^\d{2}\/\d{2}\/\d{4}$/.test(D)){c.value=y(D);return}if(typeof D=="string"&&/^\d{4}-\d{2}-\d{2}$/.test(D)){c.value=new Date(D+"T12:00:00");return}c.value=null},{immediate:!0}),Pt(c,D=>{if(D instanceof Date&&!isNaN(D.getTime())){const F=x(D);i("update:modelValue",F),r.value&&(r.value.value=F)}else i("update:modelValue",""),r.value&&(r.value.value="")});function P(){var D,F;(D=o.value)!=null&&D.openMenu?o.value.openMenu():(F=o.value)!=null&&F.show&&o.value.show()}const I=n.locale;return e({openFromParent:P,focus:()=>{var D;return(D=r.value)==null?void 0:D.focus()},selectAll:()=>{var D;return(D=r.value)==null?void 0:D.select()}}),(D,F)=>($(),L("div",{class:Me(["datepicker-wrapper",{"has-icon":t.showIcon}])},[t.showIcon?($(),L("span",{key:0,class:"input-group-text me-2",role:"button",onClick:St(P,["stop"]),"aria-hidden":"true"},[...F[1]||(F[1]=[l("i",{class:"bi bi-calendar-check"},null,-1)])])):xe("",!0),et(Ne(cv),{ref_key:"datepicker",ref:o,modelValue:c.value,"onUpdate:modelValue":F[0]||(F[0]=C=>c.value=C),"enable-time-picker":!1,"auto-apply":"",locale:Ne(I),"month-change-on-scroll":!1,format:t.format,"z-index":1051},{trigger:vt(()=>[l("div",SK,[l("input",{ref_key:"inputRef",ref:r,type:"text",class:"form-control",id:t.id,placeholder:t.placeholder,value:E.value,onInput:h,onBlur:f,onKeydown:v,onFocus:g,disabled:t.disabled,maxlength:"10"},null,40,kK),l("label",{for:t.id},pe(t.label),9,CK)])]),_:1},8,["modelValue","locale","format"])],2))}},mr=ls(TK,[["__scopeId","data-v-3650b9a8"]]),AK={class:"container-fluid"},OK={class:"row g-3"},DK={class:"col-12"},PK={class:"btn-group w-100",role:"group"},$K=["disabled"],IK=["disabled"],MK=["disabled","title"],NK={class:"col-12"},LK={class:"row"},RK={class:"col-md-6 position-relative z-index-dynamic"},FK={class:"dropdown mt-3"},VK=["disabled"],BK={class:"dropdown-menu w-100 shadow-sm category-dropdown-scroll"},UK=["onClick"],jK={key:0,class:"ms-2 text-muted"},HK={key:0,class:"col-md-6 position-relative z-index-dynamic"},WK={class:"input-group input-group-floating mt-3"},zK={class:"form-floating flex-fill"},YK={key:1,class:"col-md-6 position-relative z-index-dynamic"},qK={class:"input-group input-group-floating mt-3"},GK={class:"form-floating flex-fill"},XK=["disabled"],KK={value:""},JK=["value"],QK={class:"col-12 mt-3"},ZK={class:"row g-3"},eJ={class:"col-md-4"},tJ={class:"form-floating"},sJ=["disabled"],nJ=["value"],iJ={class:"col-md-4"},rJ={class:"form-floating"},aJ=["disabled"],oJ={class:"col-md-4"},lJ={class:"form-floating"},uJ=["disabled"],cJ=["value"],dJ={key:0,class:"col-12"},hJ={class:"alert alert-info d-flex justify-content-between align-items-center mb-0 py-2"},fJ={key:0,class:"badge bg-primary"},pJ={class:"col-12"},mJ={class:"row g-3"},gJ={class:"col-md-6 position-relative z-index-dynamic"},vJ={class:"input-group input-group-floating"},bJ={class:"form-floating flex-fill position-relative"},yJ={class:"col-md-6"},_J={class:"input-group input-group-floating"},xJ={class:"col-12"},wJ={class:"row g-3"},EJ={class:"col-md-6"},SJ={class:"input-group input-group-floating"},kJ={class:"col-md-6"},CJ={class:"input-group input-group-floating"},TJ={key:2,class:"col-12"},AJ={class:"row g-3"},OJ={class:"col-12"},DJ={class:"input-group input-group-floating"},PJ={class:"col-md-6"},$J={class:"card h-100 shadow-sm"},IJ={class:"card-body"},MJ={class:"vstack gap-3"},NJ={class:"input-group input-group-floating"},LJ={class:"input-group input-group-floating"},RJ={class:"col-md-6"},FJ={class:"card h-100 shadow-sm"},VJ={class:"card-body"},BJ={class:"vstack gap-3"},UJ={class:"input-group input-group-floating"},jJ={class:"input-group input-group-floating"},HJ={key:0,class:"col-12 mt-2"},WJ={class:"alert alert-info d-flex justify-content-between align-items-center mb-0 py-2"},zJ={class:"badge bg-primary"},YJ={class:"col-12 mt-3"},qJ={class:"row g-3"},GJ={class:"col-md-6 position-relative z-index-dynamic"},XJ={class:"input-group input-group-floating"},KJ={class:"form-floating flex-fill position-relative"},JJ={class:"col-md-6"},QJ={class:"input-group input-group-floating"},ZJ={class:"form-floating flex-fill"},eQ={for:"treasury_inv_method"},tQ={class:"col-12 mt-3"},sQ={class:"row g-3"},nQ={key:0,class:"col-md-12"},iQ={class:"input-group input-group-floating"},rQ={class:"col-md-6"},aQ={class:"input-group input-group-floating"},oQ={class:"col-md-6"},lQ={class:"input-group input-group-floating"},uQ={key:0,class:"col-12"},cQ={class:"row g-3"},dQ={class:"col-md-6"},hQ={class:"input-group input-group-floating"},fQ={class:"form-floating flex-fill"},pQ={class:"col-md-6"},mQ={class:"input-group input-group-floating"},gQ={class:"form-floating flex-fill"},vQ={key:1,class:"col-12"},bQ={class:"row g-3"},yQ={class:"col-md-6"},_Q={class:"input-group input-group-floating"},xQ={class:"form-floating flex-fill"},wQ={class:"col-md-6"},EQ={class:"input-group input-group-floating"},SQ={class:"form-floating flex-fill"},kQ={class:"col-12"},CQ={class:"row g-3"},TQ={class:"col-md-6"},AQ={class:"input-group input-group-floating"},OQ={key:0,class:"col-md-6"},DQ={class:"d-flex align-items-center h-100 px-2 border rounded"},PQ={class:"form-check form-switch m-0 pt-1 pb-1"},$Q={class:"col-12"},IQ={class:"row g-3"},MQ={class:"col-md-6 position-relative z-index-dynamic"},NQ={class:"input-group input-group-floating"},LQ={class:"form-floating flex-fill position-relative"}
50,RQ={key:0,class:"col-md-6 position-relative z-index-dynamic"},FQ={class:"input-group input-group-floating"},VQ={class:"form-floating flex-fill position-relative"},BQ={class:"col-12 mt-4"},UQ={class:"row g-3"},jQ={class:"col-md-6"},HQ={class:"input-group input-group-floating"},WQ={class:"form-floating flex-fill"},zQ=["value"],YQ={key:0,class:"badge bg-warning text-dark ms-1",style:{"font-size":"0.6rem"}},qQ={class:"invalid-feedback"},GQ={class:"col-md-6"},XQ={class:"input-group input-group-floating"},KQ={class:"form-floating flex-fill"},JQ={key:0,class:"mt-2"},QQ={class:"d-flex flex-wrap gap-1"},ZQ=["onClick"],eZ={class:"col-12"},tZ={class:"d-flex justify-content-between align-items-center p-3 border rounded bg-light"},sZ={key:0,class:"form-check form-switch m-0"},nZ={key:1},iZ={class:"text-end d-flex align-items-center gap-3"},rZ={__name:"SingleOrderForm",props:{restoredState:{type:Object,default:null},active:{type:Boolean,default:!0},isOperationLocked:{type:Boolean,default:!1}},emits:["order-created","validation-change","form-update"],setup(t,{expose:e,emit:s}){const n=Yn(),{currentPortfolioId:i}=Of(),o=ve(null),r=ve(null),c=t,h=s,f=ve("buy"),v=ve([]),g=ve(null),y=ve(""),x=ve([]),E=ve(!1),P=ve(!1),I=ve(0),D=ve(""),F=["acoes","etfs","criptomoedas"],C=en({expirations:[],expiration:"",type:"CALL",chain:[],strike:"",selectedTicker:"",isLoading:!1}),A=en({portfolio_id:i.value,trade_date:new Date,quantity:0,price:0,other_costs:0,broker_id:"",tags:[],asset_id:null,asset:null,affect_balance:!0}),O=en({buy_price:0,buy_costs:0,sell_price:0,sell_costs:0}),j=en({issuer:"",bond_type:"",indexer:"",cdi_rate:0,investment_value:0,purchase_date:new Date,daily_liquidity:!1,due_date:null}),te=en({indexer:"",due_date:null,investment_form:"value",quantity:0,unit_price:0,investment_value:0}),B=en({bonds:[],isLoading:!1,selectedSymbol:""}),z=en({}),re=Ae(()=>{if(!g.value)return!1;const ee=(g.value.slug||"").toLowerCase().trim(),R=(g.value.name||"").toLowerCase().trim();return["opcoes","options","opcao","option"].includes(ee)||R.includes("opç")||R.includes("opc")}),ne=Ae(()=>g.value?(g.value.slug||"").toLowerCase().trim()==="outros":!1),X=Ae(()=>g.value?(g.value.slug||"").toLowerCase().trim().includes("tesouro"):!1),G=Ae(()=>{if(!g.value)return!1;const ee=(g.value.slug||"").toLowerCase().trim();return ee.includes("renda-fixa")||ee.includes("cdb")||ee.includes("lci")}),ce=Ae(()=>!G.value&&!X.value&&!re.value&&f.value!=="daytrade"),be=Ae(()=>v.value.find(ee=>["acoes","acao","stocks"].includes((ee.slug||"").toLowerCase()))||null),J=Ae(()=>{if(!g.value)return!0;const ee=(g.value.slug||"").toLowerCase().trim();return F.includes(ee)||re.value}),Z=ee=>{if(!ee)return!1;const R=(ee.slug||"").toLowerCase().trim(),we=["opcoes","options","opcao"].includes(R);return F.includes(R)||we},ge=Ae(()=>{if(!g.value||!g.value.slug)return 0;const ee=g.value.slug.toLowerCase();return["criptomoedas","crypto"].includes(ee)?8:["tesouro","cdb","lci-lca","renda-fixa","outros"].includes(ee)?2:0}),q=Ae(()=>{if(!g.value||!g.value.slug)return 2;const ee=g.value.slug.toLowerCase();return["criptomoedas","crypto"].includes(ee)?8:2}),W=Ae(()=>q.value===8?"Preço (8 decimais)":"Preço"),M=Ae(()=>{if(f.value==="daytrade"){const ee=Number(A.quantity||0),R=Number(O.buy_price||0),we=Number(O.sell_price||0),fe=Number(O.buy_costs||0),Oe=Number(O.sell_costs||0);return ee*we-Oe-(ee*R+fe)}else{if(G.value)return Number(j.investment_value||0);if(X.value)return te.investment_form==="value"?Number(te.investment_value||0):Number(te.quantity||0)*Number(te.unit_price||0);{const ee=Number(A.quantity||0),R=Number(A.price||0),we=Number(A.other_costs||0),fe=ee*R;return f.value==="buy"?fe+we:fe-we}}}),he=Ae(()=>{if(!i.value)return!1;const ee=ne.value||X.value||G.value||re.value,R=G.value||X.value?f.value==="sell"?X.value?!!B.selectedSymbol:!!A.asset_id:!0:ee?D.value.length>=3:!!A.asset_id,we=G.value?j.purchase_date:A.trade_date,fe=A.broker_id&&R&&we;if(f.value==="daytrade")return J.value?fe&&Number(A.quantity)>0&&Number(O.buy_price)>0&&Number(O.sell_price)>0:!1;if(G.value)return f.value==="sell"?fe&&Number(j.investment_value)>0:fe&&j.issuer&&j.bond_type&&j.indexer&&Number(j.investment_value)>0;if(X.value){const Oe=te.investment_form==="value"?Number(te.investment_value)>0:Number(te.quantity)>0&&Number(te.unit_price)>0;return fe&&B.selectedSymbol&&Oe}else return re.value?fe&&!!C.selectedTicker&&!!C.expiration&&!!C.strike&&Number(A.quantity)>0&&Number(A.price)>0:fe&&Number(A.quantity)>0&&Number(A.price)>0});async function oe(){var ee;if(!(B.bonds.length>0)){B.isLoading=!0;try{const R=await ct.get("/api/assets/tesouro-direto"),we=((ee=R.data)==null?void 0:ee.results)||R.data;B.bonds=Array.isArray(we)?we:[]}catch(R){console.error("Erro ao buscar tÃtulos do Tesouro Direto via proxy",R),B.bonds=[]}finally{B.isLoading=!1}}}function K(){const ee=B.bonds.find(R=>(R==null?void 0:R.symbol)===B.selectedSymbol);ee?(te.indexer=(ee==null?void 0:ee.indexer)||"",te.due_date=new Date(((ee==null?void 0:ee.maturityDate)||(ee==null?void 0:ee.due_date))+"T12:00:00"),te.unit_price=(ee==null?void 0:ee.current_price)??(f.value==="buy"?(ee==null?void 0:ee.buyPrice)??(ee==null?void 0:ee.buy_price):(ee==null?void 0:ee.sellPrice)??(ee==null?void 0:ee.sell_price))??0,D.value=(ee==null?void 0:ee.symbol)||""):(te.indexer="",te.due_date=null,te.unit_price=0,D.value="")}function H(){const ee=B.bonds.find(R=>(R==null?void 0:R.symbol)===B.selectedSymbol);return ee?f.value==="buy"?(ee==null?void 0:ee.buyRate)??(ee==null?void 0:ee.buy_rate)??0:(ee==null?void 0:ee.sellRate)??(ee==null?void 0:ee.sell_rate)??0:0}Pt(f,ee=>{if(ee==="daytrade"&&g.value&&!J.value&&(g.value=null,A.asset=null,A.asset_id=null,o.value=null,D.value=""),X.value&&B.selectedSymbol){const R=B.bonds.find(we=>(we==null?void 0:we.symbol)===B.selectedSymbol);R&&(te.unit_price=(R==null?void 0:R.current_price)??(ee==="buy"?(R==null?void 0:R.buyPrice)??(R==null?void 0:R.buy_price):(R==null?void 0:R.sellPrice)??(R==null?void 0:R.sell_price))??0)}});const Ee=Ae(()=>{if(!C.chain||!C.chain.length)return[];const ee=String(C.type).toUpperCase().trim(),R=C.chain.filter(we=>{const fe=String(we.side||we.type||"").toUpperCase().trim();return fe===ee||fe===""}).map(we=>Number(we.strike||we.strikePrice||0)).filter(we=>we>0);return[...new Set(R)].sort((we,fe)=>we-fe)});async function _e(ee){var R,we,fe;if(ee){C.isLoading=!0;try{const Oe=await ct.get(`/api/options/expirations?symbol=${ee}`);C.expirations=((we=(R=Oe.data)==null?void 0:R.data)==null?void 0:we.expirations)||((fe=Oe.data)==null?void 0:fe.expirations)||[]}catch(Oe){console.error("Erro ao buscar vencimentos",Oe),C.expirations=[]}finally{C.isLoading=!1}}}async function Ce(){var ee;if(!(!o.value||!C.expiration)){C.isLoading=!0,C.chain=[];try{const we={symbol:o.value.code||D.value,expirationDate:C.expiration},fe=await ct.get("/api/options/chain",{params:we}),Oe=((ee=fe.data)==null?void 0:ee.data)||fe.data||{};C.chain=Oe.stocks||Oe.series||Oe.options||[]}catch(R){console.error("Erro ao buscar grade de opções",R),C.chain=[]}finally{C.isLoading=!1}}}async function Re(){if(C.strike="",C.selectedTicker="",A.price=0,!C.expiration){C.chain=[];return}await Ce()}function Ke(){C.strike="",C.selectedTicker="",A.price=0}
50function Be(){if(!C.strike||!C.chain.length){C.selectedTicker="",A.price=0;return}const ee=Number(C.strike),R=String(C.type).toUpperCase().trim();let we=C.chain.find(fe=>{const Oe=Number(fe.strike||fe.strikePrice||0),Xe=String(fe.side||fe.type||"").toUpperCase().trim();return Math.abs(Oe-ee)<.01&&(Xe===R||Xe==="")});we?(C.selectedTicker=we.symbol||we.ticker,A.price=we.close||we.lastPrice||we.price||0,D.value=C.selectedTicker):(C.selectedTicker="",A.price=0,console.warn("Série exata não encontrada na grade."))}function Te(ee){ne.value||X.value||G.value||re.value?(D.value=ee?ee.toUpperCase().trim():"",A.asset&&A.asset.code!==D.value&&(A.asset=null,A.asset_id=null,o.value=null)):D.value=""}async function Q(ee){if(!P.value){if(!ee||!ee.id&&!D.value){A.asset=null,A.asset_id=null,o.value=null,C.expirations=[];return}if(re.value){o.value=ee,A.asset=null,A.asset_id=null;const R=ee.code||ee.symbol||D.value;await _e(R)}else{if(A.asset=ee,A.asset_id=ee.id||null,o.value=ee,D.value=ee.code,ee.category_id&&!E.value){const R=v.value.find(we=>{var fe;return we.id===ee.category_id||we.slug===((fe=ee.category)==null?void 0:fe.slug)});R&&(g.value=R)}f.value!=="daytrade"&&!c.restoredState&&!G.value&&!X.value&&ee.current_price&&ee.current_price>0&&(A.price=Number(ee.current_price),vs(()=>{const R=document.querySelector("#price");R&&R.dispatchEvent(new Event("input",{bubbles:!0}))}))}h("validation-change",he.value),h("form-update",Ve())}}function Se(ee){E.value||f.value==="daytrade"&&!Z(ee)||(g.value=ee,A.asset=null,A.asset_id=null,o.value=null,D.value="",P.value=!1,A.price=0,A.quantity=0,C.selectedTicker="",C.expiration="",C.strike="",C.expirations=[],C.chain=[],B.selectedSymbol="",te.investment_value=0,te.quantity=0,te.unit_price=0,(ee.slug||"").toLowerCase().trim().includes("tesouro")&&oe(),vs(()=>{r.value&&r.value.focus()}))}function Ve(){var Oe,Xe,at,wt,gt,pt,He;if(y.value.trim()){const it=y.value.trim();A.tags.includes(it)||A.tags.push(it),y.value=""}let ee=Number(A.quantity||0);if(G.value&&(ee=1),X.value)if(te.investment_form==="value"){const it=Number(te.unit_price||0),$t=Number(te.investment_value||0);ee=it>0?$t/it:1}else ee=Number(te.quantity);let R=D.value,we=A.trade_date;if(G.value){if(f.value==="buy"){const it=j.cdi_rate?` ${j.cdi_rate}%`:"";R=`${j.bond_type} ${j.issuer} ${j.indexer.toUpperCase()}${it}`.trim()}we=j.purchase_date}else X.value?B.selectedSymbol&&(R=B.selectedSymbol):re.value&&(R=C.selectedTicker);const fe={portfolio_id:i.value,broker_id:A.broker_id,asset_id:re.value?null:A.asset_id,asset_code:!A.asset_id&&(ne.value||X.value||G.value||re.value)?R:null,asset_name:!A.asset_id&&(ne.value||X.value||G.value||re.value)?R:null,category_slug:((Oe=g.value)==null?void 0:Oe.slug)||((Xe=category.value)==null?void 0:Xe.slug),operation_type:f.value,trade_date:Qe(we),quantity:ee,tags:A.tags,affect_balance:f.value==="buy"?A.affect_balance:!1};if(f.value==="daytrade")fe.daytrade_buy_price=Number(O.buy_price||0),fe.daytrade_buy_costs=Number(O.buy_costs||0),fe.daytrade_sell_price=Number(O.sell_price||0),fe.daytrade_sell_costs=Number(O.sell_costs||0),fe.price=fe.daytrade_buy_price,fe.other_costs=0;else if(G.value)fe.fixed_income_investment_value=Number(j.investment_value||0),fe.price=fe.fixed_income_investment_value,fe.other_costs=0,f.value==="buy"&&(fe.fixed_income_indexer=j.indexer,fe.fixed_income_issuer=j.issuer,fe.fixed_income_bond_type=j.bond_type,fe.fixed_income_cdi_rate=Number(j.cdi_rate||0),fe.fixed_income_due_date=!j.daily_liquidity&&j.due_date?Qe(j.due_date):null);else if(X.value){if(B.selectedSymbol){const it=B.bonds.find($t=>($t==null?void 0:$t.symbol)===B.selectedSymbol);it&&(fe.fixed_income_indexer=it.indexer,fe.fixed_income_bond_type="tesouro",fe.fixed_income_due_date=Qe(new Date((it.due_date||it.maturityDate)+"T12:00:00")))}fe.other_costs=0,fe.price=Number(te.unit_price||0),te.investment_form==="value"?fe.fixed_income_investment_value=Number(te.investment_value||0):fe.fixed_income_investment_value=fe.quantity*fe.price}else fe.price=Number(A.price||0),fe.other_costs=Number(A.other_costs||0);return re.value&&(fe.option_underlying_asset=((at=o.value)==null?void 0:at.code)||((wt=c.restoredState)==null?void 0:wt.option_underlying_asset)||((He=(pt=(gt=c.orderData)==null?void 0:gt.asset)==null?void 0:pt.profile)==null?void 0:He.underlying_asset),fe.option_type=C.type,fe.option_strike=C.strike,fe.option_expiration_date=C.expiration),fe}function Qe(ee){if(!ee)return null;if(ee instanceof Date)return ee.toISOString().split("T")[0];if(typeof ee=="string"&&/^\d{2}\/\d{2}\/\d{4}$/.test(ee)){const[R,we,fe]=ee.split("/");return`${fe}-${we}-${R}`}return ee}function je(ee){return new Intl.NumberFormat("pt-BR",{style:"currency",currency:"BRL"}).format(ee||0)}function nt(ee){if(!ee)return"";const[R,we,fe]=ee.split("-");return`${fe}/${we}/${R}`}function ft(ee){return{acoes:"bi-graph-up",fiis:"bi-building",etfs:"bi-collection",bdrs:"bi-globe",opcoes:"bi-diagram-3",options:"bi-diagram-3",tesouro:"bi-safe",cdb:"bi-bank",criptomoedas:"bi-currency-bitcoin","renda-fixa":"bi-cash-stack",outros:"bi-card-text"}[ee]||"bi-coin"}function ut(){P.value=!1,A.asset=null,A.asset_id=null,o.value=null,D.value="",C.selectedTicker="",C.expiration="",C.strike="",C.expirations=[],C.chain=[]}function Ye(){I.value>0&&(A.quantity=I.value)}function We(ee){c.isOperationLocked||(f.value=ee)}function ot(){n.open(vz,{onSaved:ee=>{x.value.push(ee),A.broker_id=ee.id}})}function ht(ee){ee&&ee.preventDefault&&ee.preventDefault();const R=y.value.trim();R&&!A.tags.includes(R)&&A.tags.push(R),y.value=""}function Tt(ee){A.tags.splice(ee,1)}async function Ot(){try{const[ee,R]=await Promise.all([ct.get("/api/asset-categories"),ct.get("/api/brokers")]);v.value=ee.data.data,x.value=R.data.data}catch(ee){console.error(ee)}}Xt(async()=>
50{if(await Ot(),zt(),c.restoredState&&(Kt(),X.value&&(await oe(),D.value))){B.selectedSymbol=D.value,K();const ee=c.restoredState.prefilledPrice??c.restoredState.price??c.restoredState.fixed_income_investment_value;ee&&(te.unit_price=Number(ee))}});function zt(){const ee=new Date;A.trade_date=ee,j.purchase_date=ee}const Kt=()=>{if(!c.restoredState)return;const ee=c.restoredState.operationType||c.restoredState.operation_type;ee&&(f.value=ee);let R=c.restoredState.selectedCategoryObject||c.restoredState.category;if(!R&&(c.restoredState.selectedCategory||c.restoredState.category_id)){const Xe=c.restoredState.selectedCategory||c.restoredState.category_id;R=v.value.find(at=>at.id===Xe)}R&&(f.value!=="daytrade"||Z(R))&&(g.value=R,E.value=!0);const we=c.restoredState.selectedAsset||c.restoredState.asset;if(we&&(re.value&&c.restoredState.option_underlying_asset?(P.value=!0,o.value={code:c.restoredState.option_underlying_asset},A.asset=null,A.asset_id=null,C.isLoading=!0,vs(async()=>{var Xe,at,wt,gt;try{try{const pt=await ct.get(`/api/options/expirations?symbol=${c.restoredState.option_underlying_asset}`);C.expirations=((at=(Xe=pt.data)==null?void 0:Xe.data)==null?void 0:at.expirations)||((wt=pt.data)==null?void 0:wt.expirations)||[]}catch{console.warn("API falhou, usando vencimento do banco")}c.restoredState.option_expiration_date&&!C.expirations.includes(c.restoredState.option_expiration_date)&&C.expirations.push(c.restoredState.option_expiration_date),C.expiration=c.restoredState.option_expiration_date;try{const pt={symbol:c.restoredState.option_underlying_asset,expirationDate:C.expiration},He=await ct.get("/api/options/chain",{params:pt}),it=((gt=He.data)==null?void 0:gt.data)||He.data||{};C.chain=it.stocks||it.series||it.options||[]}catch{console.warn("API falhou ao restaurar a grade de opções, usando vazio."),C.chain=[]}C.type=c.restoredState.option_type||"CALL",C.strike=c.restoredState.option_strike,C.selectedTicker=we.code,D.value=we.code,Be()}catch(pt){console.error("Erro crÃtico ao restaurar opções:",pt)}finally{C.isLoading=!1}})):vs(()=>{Q(we),P.value=!0}),we.profile&&!X.value))try{const Xe=typeof we.profile=="string"?JSON.parse(we.profile):we.profile;if(Xe.indexer&&(j.indexer=Xe.indexer.toLowerCase(),te.indexer=Xe.indexer.toLowerCase()),Xe.issuer&&(j.issuer=Xe.issuer),Xe.bond_type&&(j.bond_type=Xe.bond_type.toUpperCase()),Xe.rate&&(j.cdi_rate=Number(Xe.rate)),Xe.due_date){const at=new Date(Xe.due_date+"T12:00:00");j.due_date=at,te.due_date=at}}catch(Xe){console.error(Xe)}const fe=c.restoredState.prefilledQuantity??c.restoredState.quantity;fe!=null&&(A.quantity=Number(fe),te.quantity=Number(fe)),c.restoredState.maxQuantity&&(I.value=Number(c.restoredState.maxQuantity));const Oe=c.restoredState.prefilledPrice??c.restoredState.price??c.restoredState.fixed_income_investment_value;if(Oe!=null&&(A.price=Number(Oe),j.investment_value=Number(Oe),te.investment_value=Number(Oe),te.unit_price=Number(Oe)),c.restoredState.trade_date){const Xe=new Date(c.restoredState.trade_date);A.trade_date=Xe,j.purchase_date=Xe}c.restoredState.broker_id&&(A.broker_id=c.restoredState.broker_id),c.restoredState.other_costs&&(A.other_costs=Number(c.restoredState.other_costs)),c.restoredState.fixed_income_indexer&&(j.indexer=c.restoredState.fixed_income_indexer),c.restoredState.fixed_income_issuer&&(j.issuer=c.restoredState.fixed_income_issuer),c.restoredState.fixed_income_bond_type&&(j.bond_type=c.restoredState.fixed_income_bond_type),c.restoredState.fixed_income_cdi_rate&&(j.cdi_rate=Number(c.restoredState.fixed_income_cdi_rate)),c.restoredState.fixed_income_due_date&&(j.due_date=new Date(c.restoredState.fixed_income_due_date)),c.restoredState.tags&&(A.tags=[...c.restoredState.tags]),c.restoredState.affect_balance!==void 0&&(A.affect_balance=c.restoredState.affect_balance)};async function Fe(){var we;if(!he.value)throw new Error("Por favor, preencha todos os campos obrigatórios corretamente.");const ee=Ve(),R=await ct.post("/api/trade-orders",ee);if(R.data&&R.data.success)return h("order-created",R.data.data),R.data.data;throw new Error(((we=R.data)==null?void 0:we.message)||"Ocorreu um erro ao salvar a ordem.")}return Pt(he,ee=>h("validation-change",ee)),Pt([A,O,j,te,f,D,C,B],()=>{he.value&&h("form-update",Ve())},{deep:!0}),Pt(i,ee=>{ee&&(A.portfolio_id=ee)},{immediate:!0}),e({validate:()=>he.value,getData:Ve,submit:Fe}),(ee,R)=>($(),L("div",AK,[l("div",OK,[l("div",DK,[l("div",PK,[l("button",{type:"button",class:Me(["btn",f.value==="buy"?"btn-primary":"btn-outline-primary"]),onClick:R[0]||(R[0]=we=>We("buy")),disabled:t.isOperationLocked&&f.value!=="buy"}
50,[R[32]||(R[32]=l("i",{class:"bi bi-arrow-down-circle me-2"},null,-1)),Pe(pe(re.value?"Titular (Compra)":"Compra"),1)],10,$K),l("button",{type:"button",class:Me(["btn",f.value==="sell"?"btn-primary":"btn-outline-primary"]),onClick:R[1]||(R[1]=we=>We("sell")),disabled:t.isOperationLocked&&f.value!=="sell"},[R[33]||(R[33]=l("i",{class:"bi bi-arrow-up-circle me-2"},null,-1)),Pe(pe(re.value?"Lançador (Venda)":"Venda"),1)],10,IK),l("button",{type:"button",class:Me(["btn",f.value==="daytrade"?"btn-primary":"btn-outline-primary"]),onClick:R[2]||(R[2]=we=>We("daytrade")),disabled:t.isOperationLocked&&f.value!=="daytrade"||!J.value,title:J.value?"":"Daytrade disponÃvel apenas para Ações, ETFs e Criptomoedas"},[...R[34]||(R[34]=[l("i",{class:"bi bi-arrow-left-right me-2"},null,-1),Pe("Daytrade ",-1)])],10,MK)])]),l("div",NK,[l("div",LK,[l("div",RK,[l("div",FK,[l("button",{class:"btn btn-outline-secondary dropdown-toggle w-100 text-start d-flex align-items-center justify-content-between",type:"button","data-bs-toggle":"dropdown",style:zs(g.value?{borderColor:g.value.color,color:g.value.color,fontWeight:"600",height:"58px"}:{height:"58px"}),disabled:E.value},[l("div",null,[g.value?($(),L("i",{key:0,class:Me([ft(g.value.slug),"me-2"])},null,2)):xe("",!0),Pe(" "+pe(g.value?g.value.name:"Selecione a categoria"),1)])],12,VK),l("ul",BK,[($(!0),L(Ze,null,At(v.value,we=>($(),L("li",{key:we.id},[l("a",{class:Me(["dropdown-item",{"text-muted":f.value==="daytrade"&&!Z(we)}]),href:"#",onClick:St(fe=>Se(we),["prevent"]),style:zs(f.value==="daytrade"&&!Z(we)?{pointerEvents:"none",opacity:.5}:{})},[l("i",{class:Me([ft(we.slug),"me-2"]),style:zs({color:we.color})},null,6),l("span",{style:zs({color:we.color})},pe(we.name),5),f.value==="daytrade"&&!Z(we)?($(),L("small",jK," (não permitido) ")):xe("",!0)],14,UK)]))),128))])])]),!(G.value&&f.value==="buy")&&!X.value?($(),L("div",HK,[l("div",WK,[R[36]||(R[36]=l("span",{class:"input-group-text"},[l("i",{class:"bi bi-search"})],-1)),l("div",zK,[et(P_,{ref_key:"assetSearchRef",ref:r,label:re.value?"Ativo Objeto":"Ativo",onAssetSelected:Q,onSearchChange:Te,error:z.asset_id,"selected-category":re.value?be.value:g.value,"prefilled-asset":o.value,"is-asset-locked":P.value},null,8,["label","error","selected-category","prefilled-asset","is-asset-locked"])]),P.value?($(),L("button",{key:0,class:"btn btn-outline-secondary",type:"button",onClick:ut,title:"Alterar ativo"},[...R[35]||(R[35]=[l("i",{class:"bi bi-pencil"},null,-1)])])):xe("",!0)])])):xe("",!0),X.value?($(),L("div",YK,[l("div",qK,[R[38]||(R[38]=l("span",{class:"input-group-text"},[l("i",{class:"bi bi-safe"})],-1)),l("div",GK,[_t(l("select",{"onUpdate:modelValue":R[3]||(R[3]=we=>B.selectedSymbol=we),class:"form-select",id:"treasury_bond",onChange:K,disabled:B.isLoading},[l("option",KK,pe(B.isLoading?"Buscando tÃtulos...":"Selecione o TÃtulo..."),1),($(!0),L(Ze,null,At(B.bonds,we=>($(),L("option",{key:we==null?void 0:we.symbol,value:we==null?void 0:we.symbol},pe(we==null?void 0:we.name)+" ("+pe(nt(we==null?void 0:we.due_date))+") ",9,JK))),128))],40,XK),[[An,B.selectedSymbol]]),R[37]||(R[37]=l("label",{for:"treasury_bond"},"TÃtulo do Tesouro Direto",-1))])])])):xe("",!0)])]),re.value?($(),L(Ze,{key:0},[l("div",QK,[l("div",ZK,[l("div",eJ,[l("div",tJ,[_t(l("select",{"onUpdate:modelValue":R[4]||(R[4]=we=>C.expiration=we),class:"form-select",onChange:Re,disabled:!o.value||C.isLoading},[R[39]||(R[39]=l("option",{value:""},"Selecione...",-1)),($(!0),L(Ze,null,At(C.expirations,we=>($(),L("option",{key:we,value:we},pe(nt(we)),9,nJ))),128))],40,sJ),[[An,C.expiration]]),R[40]||(R[40]=l("label",null,"Vencimento",-1))])]),l("div",iJ,[l("div",rJ,[_t(l("select",{"onUpdate:modelValue":R[5]||(R[5]=we=>C.type=we),class:"form-select",onChange:Ke,disabled:!o.value},[...R[41]||(R[41]=[l("option",{value:"CALL"},"CALL (Compra)",-1),l("option",{value:"PUT"},"PUT (Venda)",-1)])],40,aJ),[[An,C.type]]),R[42]||(R[42]=l("label",null,"Tipo",-1))])]),l("div",oJ,[l("div",lJ,[_t(l("select",{"onUpdate:modelValue":R[6]||(R[6]=we=>C.strike=we),class:"form-select",onChange:Be,disabled:!C.expiration||C.isLoading},[R[43]||(R[43]=l("option",{value:""},"Selecione...",-1)),($(!0),L(Ze,null,At(Ee.value,we=>($(),L("option",{key:we,value:we},pe(je(we)),9,cJ))),128))],40,uJ),[[An,C.strike]]),R[44]||(R[44]=l("label",null,"Strike
50(Preço ExercÃcio)",-1))])])])]),C.selectedTicker?($(),L("div",dJ,[l("div",hJ,[l("span",null,[R[45]||(R[45]=Pe("Série identificada: ",-1)),l("strong",null,pe(C.selectedTicker),1)]),A.price>0?($(),L("span",fJ,"Preço atual: "+pe(je(A.price)),1)):xe("",!0)])])):xe("",!0)],64)):xe("",!0),ce.value||re.value?($(),L(Ze,{key:1},[l("div",pJ,[l("div",mJ,[l("div",gJ,[l("div",vJ,[R[46]||(R[46]=l("span",{class:"input-group-text"},[l("i",{class:"bi bi-calendar"})],-1)),l("div",bJ,[et(mr,{modelValue:A.trade_date,"onUpdate:modelValue":R[7]||(R[7]=we=>A.trade_date=we),id:"trade_date",label:"Data da Operação",placeholder:"Data da Operação",format:"yyyy-MM-dd"},null,8,["modelValue"])])])]),l("div",yJ,[l("div",_J,[R[48]||(R[48]=l("span",{class:"input-group-text"},[l("i",{class:"bi bi-hash"})],-1)),et(Ms,{modelValue:A.quantity,"onUpdate:modelValue":R[8]||(R[8]=we=>A.quantity=we),id:"quantity",label:"Quantidade",precision:ge.value,"show-symbol":!1},null,8,["modelValue","precision"]),f.value==="sell"&&I.value>0?($(),L("button",{key:0,class:"btn btn-outline-primary",type:"button",onClick:Ye},[...R[47]||(R[47]=[l("i",{class:"bi bi-arrow-up"},null,-1)])])):xe("",!0)])])])]),l("div",xJ,[l("div",wJ,[l("div",EJ,[l("div",SJ,[R[49]||(R[49]=l("span",{class:"input-group-text"},[l("i",{class:"bi bi-currency-dollar"})],-1)),et(Ms,{modelValue:A.price,"onUpdate:modelValue":R[9]||(R[9]=we=>A.price=we),id:"price",label:W.value,precision:q.value},null,8,["modelValue","label","precision"])])]),l("div",kJ,[l("div",CJ,[R[50]||(R[50]=l("span",{class:"input-group-text"},[l("i",{class:"bi bi-cash-coin"})],-1)),et(Ms,{modelValue:A.other_costs,"onUpdate:modelValue":R[10]||(R[10]=we=>A.other_costs=we),id:"other_costs",label:"Outros Custos"},null,8,["modelValue"])])])])])],64)):xe("",!0),f.value==="daytrade"?($(),L("div",TJ,[l("div",AJ,[l("div",OJ,[l("div",DJ,[R[51]||(R[51]=l("span",{class:"input-group-text bg-white"},[l("i",{class:"bi bi-hash"})],-1)),et(Ms,{modelValue:A.quantity,"onUpdate:modelValue":R[11]||(R[11]=we=>A.quantity=we),id:"dt_quantity",label:"Quantidade",precision:ge.value,"show-symbol":!1},null,8,["modelValue","precision"])])]),l("div",PJ,[l("div",$J,[l("div",IJ,[R[54]||(R[54]=l("h6",{class:"text-success fw-bold mb-3 small text-uppercase"},[l("i",{class:"bi bi-arrow-down-circle-fill me-2"}),Pe(" Compra")],-1)),l("div",MJ,[l("div",NJ,[R[52]||(R[52]=l("span",{class:"input-group-text text-success bg-white border-end-0"},[l("i",{class:"bi bi-currency-dollar"})],-1)),et(Ms,{modelValue:O.buy_price,"onUpdate:modelValue":R[12]||(R[12]=we=>O.buy_price=we),id:"buy_price",label:W.value,precision:q.value},null,8,["modelValue","label","precision"])]),l("div",LJ,[R[53]||(R[53]=l("span",{class:"input-group-text text-muted bg-white border-end-0"},[l("i",{class:"bi bi-file-earmark-minus"})],-1)),et(Ms,{modelValue:O.buy_costs,"onUpdate:modelValue":R[13]||(R[13]=we=>O.buy_costs=we),id:"buy_costs",label:"Custos Compra"},null,8,["modelValue"])])])])])]),l("div",RJ,[l("div",FJ,[l("div",VJ,[R[57]||(R[57]=l("h6",{class:"text-danger fw-bold mb-3 small text-uppercase"},[l("i",{class:"bi bi-arrow-up-circle-fill me-2"}),Pe(" Venda")],-1)),l("div",BJ,[l("div",UJ,[R[55]||(R[55]=l("span",{class:"input-group-text text-danger bg-white border-end-0"},[l("i",{class:"bi bi-currency-dollar"})],-1)),et(Ms,{modelValue:O.sell_price,"onUpdate:modelValue":R[14]||(R[14]=we=>O.sell_price=we),id:"sell_price",label:W.value,precision:q.value},null,8,["modelValue","label","precision"])]),l("div",jJ,[R[56]||(R[56]=l("span",{class:"input-group-text text-muted bg-white border-end-0"},[l("i",{class:"bi bi-file-earmark-minus"})],-1)),et(Ms,{modelValue:O.sell_costs,"onUpdate:modelValue":R[15]||(R[15]=we=>O.sell_costs=we),id:"sell_costs",label:"Custos Venda"},null,8,["modelValue"])])])])])])])])):xe("",!0),X.value?($(),L(Ze,{key:3},[B.selectedSymbol?($(),L("div",HJ,[l("div",WJ,[l("span",null,[Pe("Rentabilidade Anual ("+pe(f.value==="buy"?"Compra":"Venda")+"): ",1),l("strong",null,pe(H())+"%",1)]),l("span",zJ,"Cotação Atual: "+pe(je(te.unit_price)),1)])])):xe("",!0),l("div",YJ,[l("div",qJ,[l("div",GJ,[l("div",XJ,[R[58]||(R[58]=l("span",{class:"input-group-text"},[l("i",{class:"bi bi-calendar"})],-1)),l("div",KJ,[et(mr,{modelValue:A.trade_date,"onUpdate:modelValue":R[16]||(R[16]=we=>A.trade_date=we),id:"treasury_trade_date",label:f.value==="buy"?"Data da Operação":"Data do Resgate",placeholder:"Selecione a data",format:"yyyy-MM-dd"},null,8,["modelValue","label"])])])]),l("div",JJ,[l("div",QJ,[R[60]||(R[60]=l("span",{class:"input-group-text"},[l("i",{class:"bi bi-sliders"})],-1)),l("div",ZJ,[_t(l("select",{"onUpdate:modelValue":R[17]||(R[17]=we=>te.investment_form=we),class:"form-select",id:"treasury_inv_method"}
50,[...R[59]||(R[59]=[l("option",{value:"value"},"Por valor investido (R$)",-1),l("option",{value:"unit"},"Por fração de tÃtulo (Qtd)",-1)])],512),[[An,te.investment_form]]),l("label",eQ,"Forma de "+pe(f.value==="buy"?"Investimento":"Resgate"),1)])])])])]),l("div",tQ,[l("div",sQ,[te.investment_form==="value"?($(),L("div",nQ,[l("div",iQ,[R[61]||(R[61]=l("span",{class:"input-group-text"},[l("i",{class:"bi bi-currency-dollar"})],-1)),et(Ms,{modelValue:te.investment_value,"onUpdate:modelValue":R[18]||(R[18]=we=>te.investment_value=we),id:"treasury_value",label:f.value==="buy"?"Valor Investido":"Valor Resgatado"},null,8,["modelValue","label"])])])):($(),L(Ze,{key:1},[l("div",rQ,[l("div",aQ,[R[62]||(R[62]=l("span",{class:"input-group-text"},[l("i",{class:"bi bi-hash"})],-1)),et(Ms,{modelValue:te.quantity,"onUpdate:modelValue":R[19]||(R[19]=we=>te.quantity=we),id:"treasury_qty",label:"Fração (Quantidade)",precision:2,"show-symbol":!1},null,8,["modelValue"])])]),l("div",oQ,[l("div",lQ,[R[63]||(R[63]=l("span",{class:"input-group-text"},[l("i",{class:"bi bi-currency-dollar"})],-1)),et(Ms,{modelValue:te.unit_price,"onUpdate:modelValue":R[20]||(R[20]=we=>te.unit_price=we),id:"treasury_pu",label:"Preço Unitário (PU)"},null,8,["modelValue"])])])],64))])])],64)):xe("",!0),G.value?($(),L(Ze,{key:4},[f.value==="buy"?($(),L("div",uQ,[l("div",cQ,[l("div",dQ,[l("div",hQ,[R[65]||(R[65]=l("span",{class:"input-group-text"},[l("i",{class:"bi bi-building"})],-1)),l("div",fQ,[_t(l("input",{"onUpdate:modelValue":R[21]||(R[21]=we=>j.issuer=we),type:"text",class:"form-control",id:"issuer",placeholder:"Emissor"},null,512),[[Xs,j.issuer]]),R[64]||(R[64]=l("label",{for:"issuer"},"Emissor",-1))])])]),l("div",pQ,[l("div",mQ,[R[68]||(R[68]=l("span",{class:"input-group-text"},[l("i",{class:"bi bi-file-text"})],-1)),l("div",gQ,[_t(l("select",{"onUpdate:modelValue":R[22]||(R[22]=we=>j.bond_type=we),class:"form-select",id:"bond_type"},[...R[66]||(R[66]=[$u('<option value="" data-v-6519afbd>Selecione...</option><option value="CDB" data-v-6519afbd>CDB</option><option value="LCI" data-v-6519afbd>LCI</option><option value="LCA" data-v-6519afbd>LCA</option><option value="CRI" data-v-6519afbd>CRI</option><option value="CRA" data-v-6519afbd>CRA</option>',6)])],512),[[An,j.bond_type]]),R[67]||(R[67]=l("label",{for:"bond_type"},"Tipo de tÃtulo",-1))])])])])])):xe("",!0),f.value==="buy"?($(),L("div",vQ,[l("div",bQ,[l("div",yQ,[l("div",_Q,[R[71]||(R[71]=l("span",{class:"input-group-text"},[l("i",{class:"bi bi-graph-up"})],-1)),l("div",xQ,[_t(l("select",{"onUpdate:modelValue":R[23]||(R[23]=we=>j.indexer=we),class:"form-select",id:"indexer"},[...R[69]||(R[69]=[$u('<option value="" data-v-6519afbd>Selecione...</option><option value="cdi" data-v-6519afbd>CDI</option><option value="ipca" data-v-6519afbd>IPCA+</option><option value="prefixado" data-v-6519afbd>Prefixado</option><option value="selic" data-v-6519afbd>SELIC</option>',5)])],512),[[An,j.indexer]]),R[70]||(R[70]=l("label",{for:"indexer"},"Indexador",-1))])])]),l("div",wQ,[l("div",EQ,[R[73]||(R[73]=l("span",{class:"input-group-text"},[l("i",{class:"bi bi-percent"})],-1)),l("div",SQ,[_t(l("input",{"onUpdate:modelValue":R[24]||(R[24]=we=>j.cdi_rate=we),type:"number",step:"0.01",class:"form-control",placeholder:" "},null,512),[[Xs,j.cdi_rate]]),R[72]||(R[72]=l("label",null,"Taxa Acordada (%)",-1))])])])])])):xe("",!0),l("div",kQ,[l("div",CQ,[l("div",TQ,[l("div",AQ,[R[74]||(R[74]=l("span",{class:"input-group-text"},[l("i",{class:"bi bi-currency-dollar"})],-1)),et(Ms,{modelValue:j.investment_value,"onUpdate:modelValue":R[25]||(R[25]=we=>j.investment_value=we),id:"investment_value",label:f.value==="buy"?"Valor Investido (R$)":"Valor Resgatado (R$)"},null,8,["modelValue","label"])])]),f.value==="buy"?($(),L("div",OQ,[l("div",DQ,[l("div",PQ,[_t(l("input",{"onUpdate:modelValue":R[26]||(R[26]=we=>j.daily_liquidity=we),class:"form-check-input",type:"checkbox",id:"daily_liquidity",style:{cursor:"pointer",width:"3em",height:"1.5em"}},null,512),[[kr,j.daily_liquidity]]),R[75]||(R[75]=l("label",{class:"form-check-label fw-medium ms-2 pt-1",for:"daily_liquidity",style:{cursor:"pointer"}},"Liquidez diária",-1))])])])):xe("",!0)])]),l("div",$Q,[l("div",IQ,[l("div",MQ,[l("div",NQ,[R[76]||(R[76]=l("span",{class:"input-group-text"},[l("i",{class:"bi bi-calendar"})],-1)),l("div",LQ,[et(mr,{modelValue:j.purchase_date,"onUpdate:modelValue":R[27]||(R[27]=we=>j.purchase_date=we),id:"purchase_date",label:f.value==="buy"?"Data da compra":"Data do resgate",placeholder:"Selecione a data"},null,8,["modelValue","label"])])])]),f.value==="buy"&&!j.daily_liquidity?($(),L("div",RQ,[l("div",FQ,[R[77]||(R[77]=l("span",{class:"input-group-text"},[l("i",{class:"bi bi-calendar-check"})],-1)),l("div",VQ,[et(mr,{modelValue:j.due_date,"onUpdate:modelValue":R[28]||(R[28]=we=>j.due_date=we),id:"due_date",label:"Data de vencimento",placeholder:"Selecione a data"},null,8,["modelValue"])])])])):xe("",!0)])])],64)):xe("",!0),l("div",BQ,[l("div",UQ,[l("div",jQ,[l("div",HQ,[R[82]||(R[82]=l("span",{class:"input-group-text"},[l("i",{class:"bi bi-building"})],-1)),l("div",WQ,[_t(l("select",{"onUpdate:modelValue":R[29]||(R[29]=we=>A.broker_id=we),class:Me(["form-select",{"is-invalid":z.broker_id}]),id:"broker"},[R[79]||(R[79]=l("option",{value:""},"Selecione...",-1)),($(!0),L(Ze,null,At(x.value,we=>($(),L("option",{key:we.id,value:we.id},[Pe(pe(we.name)+" ",1),we.is_private?($(),L("span",YQ,[...R[78]||(R[78]=[l("i",{class:"bi bi-pers
50on-fill"},null,-1)])])):xe("",!0)],8,zQ))),128))],2),[[An,A.broker_id]]),R[80]||(R[80]=l("label",{for:"broker"},"Corretora",-1))]),l("button",{class:"btn btn-outline-primary",type:"button",onClick:ot},[...R[81]||(R[81]=[l("i",{class:"bi bi-plus-lg"},null,-1)])])]),l("div",qQ,pe(z.broker_id),1)]),l("div",GQ,[l("div",XQ,[R[85]||(R[85]=l("span",{class:"input-group-text"},[l("i",{class:"bi bi-tags"})],-1)),l("div",KQ,[_t(l("input",{"onUpdate:modelValue":R[30]||(R[30]=we=>y.value=we),type:"text",class:"form-control",id:"tags",placeholder:" ",onKeyup:[es(ht,["enter"]),es(ht,["space"])]},null,544),[[Xs,y.value]]),R[83]||(R[83]=l("label",{for:"tags"},"Hashtags",-1))]),l("button",{class:"btn btn-outline-secondary",type:"button",onClick:ht},[...R[84]||(R[84]=[l("i",{class:"bi bi-plus"},null,-1)])])]),A.tags.length>0?($(),L("div",JQ,[l("div",QQ,[($(!0),L(Ze,null,At(A.tags,(we,fe)=>($(),L("span",{key:fe,class:"badge bg-primary d-flex align-items-center"},[Pe(" #"+pe(we)+" ",1),l("button",{type:"button",class:"btn-close btn-close-white ms-1",onClick:Oe=>Tt(fe),style:{"font-size":"0.7rem"}},null,8,ZQ)]))),128))])])):xe("",!0)])])]),l("div",eZ,[l("div",tZ,[f.value==="buy"?($(),L("div",sZ,[_t(l("input",{class:"form-check-input",type:"checkbox",id:"affectBalance","onUpdate:modelValue":R[31]||(R[31]=we=>A.affect_balance=we),style:{cursor:"pointer",width:"3em",height:"1.5em"}},null,512),[[kr,A.affect_balance]]),R[86]||(R[86]=l("label",{class:"form-check-label fw-medium ms-2 pt-1",for:"affectBalance",style:{cursor:"pointer"}},"Movimentar caixa?",-1))])):($(),L("div",nZ)),l("div",iZ,[R[87]||(R[87]=l("span",{class:"text-uppercase text-muted fw-bold small d-none d-sm-inline"},"Valor Total",-1)),l("span",{class:Me(["fs-4 fw-bold",M.value>=0?"text-success":"text-danger"])},pe(je(Math.abs(M.value))),3)])])])])]))}},xD=ls(rZ,[["__scopeId","data-v-6519afbd"]]),aZ={class:"multi-order-form"},oZ={__name:"MultiOrderForm",setup(t){return(e,s)=>($(),L("div",aZ,[...s[0]||(s[0]=[l("div",{class:"alert alert-info"},[l("i",{class:"bi bi-info-circle"}),Pe(" Formulário para múltiplas ordens - Em desenvolvimento ")],-1)])]))}},lZ={class:"import-note-container"},uZ={key:0,class:"upload-area text-center p-5 border rounded bg-light dashed-border"},cZ={key:0,class:"py-4"},dZ={key:1},hZ={class:"row g-2 mb-3"},fZ={class:"col-md-4"},pZ={class:"input-group input-group-floating"},mZ={class:"form-floating flex-fill position-relative"},gZ={class:"col-md-4"},vZ={class:"input-group input-group-floating"},bZ={class:"form-floating flex-fill"},yZ=["value"],_Z={class:"col-md-4"},xZ={class:"d-flex align-items-center h-100 p-2 border rounded bg-light"},wZ={class:"form-check form-switch m-0"},EZ={class:"table-responsive border rounded mb-3",style:{"max-height":"400px","overflow-y":"auto"}},SZ={class:"table table-hover table-sm align-middle mb-0"},kZ={class:"text-center text-muted"},CZ=["onUpdate:modelValue"],TZ={key:0,class:"d-flex flex-column"},AZ={class:"fw-bold"},OZ={class:"text-muted text-truncate",style:{"max-width":"150px"}},DZ={key:1,class:"text-danger"},PZ={class:"text-center"},$Z=["onClick"],IZ={class:"mt-4"},MZ={class:"card border mb-3"},NZ={class:"card-body p-3"},LZ={class:"row align-items-center"},RZ={class:"col-md-5"},FZ={class:"input-group input-group-lg"},VZ={class:"bg-light p-3 rounded border"},BZ={class:"row text-center text-md-end align-items-center"},UZ={class:"col-4"},jZ={class:"fs-5"},HZ={class:"col-4"},WZ={class:"fs-5 text-danger"},zZ={class:"col-4 border-start"},YZ={__name:"ImportNoteForm",props:{active:Boolean},emits:["validation-change","form-update","note-imported"],setup(t,{expose:e,emit:s}){const n=s,{currentPortfolioId:i}=Of(),o=vi(),r=ve(!1),c=ve(null),h=ve([]),f=ve(new Date),v=ve(""),g=ve(0),y=ve(!0),x=ve([]);Xt(async()=>{try{const G=await ct.get("/api/brokers");x.value=G.data.data}catch(G){console.error(G)}});const E=G=>{const ce=G.dataTransfer.files[0];ce&&ce.type==="application/pdf"?I(ce):o.show("Por favor, envie um arquivo PDF.","error")},P=G=>{const ce=G.target.files[0];ce&&I(ce)},I=async G=>{if(!i.value){o.show("Selecione uma carteira antes de importar.","error");return}r.value=!0;const ce=new FormData;
50ce.append("pdf",G),ce.append("portfolio_id",i.value);try{const be=await ct.post("/api/trade-notes/parse-pdf",ce,{headers:{"Content-Type":"multipart/form-data"}});be.data.success&&(D(be.data.data),o.show("Nota lida com sucesso! Confira os dados.","success"))}catch(be){console.error(be),o.show("Erro ao ler PDF. Verifique se é uma nota válida.","error")}finally{r.value=!1}},D=G=>{if(c.value=!0,f.value=G.trade_date,g.value=Number(G.other_costs||0),G.broker_name){const ce=x.value.find(be=>be.name.toLowerCase().includes(G.broker_name.toLowerCase()));ce&&(v.value=ce.id)}h.value=G.orders.map(ce=>({...ce,quantity:Number(ce.quantity),price:Number(ce.price),other_costs:Number(ce.other_costs)}))},F=()=>{c.value=null,h.value=[],g.value=0,v.value=""},C=G=>{h.value.splice(G,1)},A=()=>{const G=h.value.reduce((J,Z)=>J+Z.quantity*Z.price,0);if(G<=0)return;const ce=Number(g.value);let be=0;h.value.forEach((J,Z)=>{const ge=J.quantity*J.price;if(Z===h.value.length-1)J.other_costs=Number((ce-be).toFixed(2));else{const q=ge/G*ce,W=Number(q.toFixed(2));
50J.other_costs=W,be+=W}}),g.value=0,o.show("Custos distribuÃdos proporcionalmente.","info")},O=G=>new Intl.NumberFormat("pt-BR",{style:"currency",currency:"BRL"}).format(G),j=(G,ce)=>["crypto","cryptos","criptomoedas"].includes(G==null?void 0:G.toLowerCase())?8:ce==="price"?2:0,te=Ae(()=>h.value.reduce((G,ce)=>G+ce.quantity*ce.price,0)),B=Ae(()=>h.value.reduce((ce,be)=>ce+Number(be.other_costs),0)+Number(g.value)),z=Ae(()=>{let G=0;const ce=h.value.reduce((J,Z)=>J+Z.quantity*Z.price,0),be=Number(g.value);return h.value.forEach(J=>{const Z=J.quantity*J.price,ge=ce>0?Z/ce*be:0,q=Number(J.other_costs)+ge;J.operation_type==="buy"?G-=Z+q:G+=Z-q}),G}),re=Ae(()=>!c.value||!v.value||!f.value||h.value.length===0?!1:h.value.every(G=>G.asset_id&&G.quantity>0&&G.price>0)),ne=()=>{const G=h.value.reduce((be,J)=>be+J.quantity*J.price,0),ce=Number(g.value);return h.value.map(be=>{const J=be.quantity*be.price,Z=G>0?J/G*ce:0;return{portfolio_id:i.value,broker_id:v.value,asset_id:be.asset_id,operation_type:be.operation_type,trade_date:X(f.value),quantity:Number(be.quantity),price:Number(be.price),other_costs:Number(be.other_costs)+Number(Z.toFixed(8)),tags:[],affect_balance:y.value}})};function X(G){if(!G)return null;if(G instanceof Date){const ce=G.getTimezoneOffset();return new Date(G.getTime()-ce*60*1e3).toISOString().split("T")[0]}return G}return Pt(re,G=>n("validation-change",G)),Pt([h,g,v,f],()=>{re.value&&n("form-update",ne())},{deep:!0}),e({getData:ne}),(G,ce)=>($(),L("div",lZ,[c.value?($(),L("div",dZ,[l("div",{class:"d-flex justify-content-between align-items-center mb-3"},[ce[11]||(ce[11]=l("h6",{class:"mb-0 fw-bold"},[l("i",{class:"bi bi-table me-2"}),Pe("Conferência dos dados")],-1)),l("button",{class:"btn btn-sm btn-outline-secondary",onClick:F},[...ce[10]||(ce[10]=[l("i",{class:"bi bi-arrow-counterclockwise"},null,-1),Pe(" Nova Importação ",-1)])])]),l("div",hZ,[l("div",fZ,[l("div",pZ,[ce[12]||(ce[12]=l("span",{class:"input-group-text"},[l("i",{class:"bi bi-calendar"})],-1)),l("div",mZ,[et(mr,{modelValue:f.value,"onUpdate:modelValue":ce[2]||(ce[2]=be=>f.value=be),id:"global_date",label:"Data do Pregão",format:"yyyy-MM-dd"},null,8,["modelValue"])])])]),l("div",gZ,[l("div",vZ,[ce[15]||(ce[15]=l("span",{class:"input-group-text"},[l("i",{class:"bi bi-building"})],-1)),l("div",bZ,[_t(l("select",{"onUpdate:modelValue":ce[3]||(ce[3]=be=>v.value=be),class:"form-select",id:"brokerSelect"},[ce[13]||(ce[13]=l("option",{value:""},"Selecione...",-1)),($(!0),L(Ze,null,At(x.value,be=>($(),L("option",{key:be.id,value:be.id},pe(be.name),9,yZ))),128))],512),[[An,v.value]]),ce[14]||(ce[14]=l("label",{for:"brokerSelect"},"Corretora",-1))])])]),l("div",_Z,[l("div",xZ,[l("div",wZ,[_t(l("input",{class:"form-check-input",type:"checkbox",id:"impAffect","onUpdate:modelValue":ce[4]||(ce[4]=be=>y.value=be)},null,512),[[kr,y.value]]),ce[16]||(ce[16]=l("label",{class:"form-check-label ms-2",for:"impAffect"},"Movimentar Caixa",-1))])])])]),l("div",EZ,[l("table",SZ,[ce[21]||(ce[21]=l("thead",{class:"bg-light sticky-top"},[l("tr",null,[l("th",{width:"50",class:"text-center"},"#"),l("th",{width:"100"},"Ordem"),l("th",null,"Ativo (Trancado)"),l("th",{width:"120"},"Qtd"),l("th",{width:"140"},"Preço"),l("th",{width:"140"},"Custos"),l("th",{width:"50"})])],-1)),l("tbody",null,[($(!0),L(Ze,null,At(h.value,(be,J)=>($(),L("tr",{key:J},[l("td",kZ,pe(J+1),1),l("td",null,[_t(l("select",{"onUpdate:modelValue":Z=>be.operation_type=Z,class:Me(["form-select form-select-sm",be.operation_type==="buy"?"text-primary border-primary":"text-danger border-danger"])},[...ce[17]||(ce[17]=[l("option",{value:"buy"},"Compra",-1),l("option",{value:"sell"},"Venda",-1)])],10,CZ),[[An,be.operation_type]])]),l("td",null,[be.asset_id?($(),L("div",TZ,[l("span",AZ,pe(be.asset_code),1),l("small",OZ,pe(be.asset_name),1)])):($(),L("div",DZ,[ce[18]||(ce[18]=l("i",{class:"bi bi-exclamation-triangle"},null,-1)),Pe(" "+pe(be.asset_code)+" ",1),ce[19]||(ce[19]=l("small",{class:"d-block"},"Não encontrado",-1))]))]),l("td",null,[et(Ms,{modelValue:be.quantity,"onUpdate:modelValue":Z=>be.quantity=Z,precision:j(be.category_slug,"qty"),"show-symbol":!1,placeholder:"Qtd",class:"form-control-sm"},null,8,["modelValue","onUpdate:modelValue","precision"])]),l("td",null,[et(Ms,{modelValue:be.price,"onUpdate:modelValue":Z=>be.price=Z,precision:j(be.category_slug,"price"),class:"form-control-sm"},null,8,["modelValue","onUpdate:modelValue","precision"])]),l("td",null,[et(Ms,{modelValue:be.other_
50costs,"onUpdate:modelValue":Z=>be.other_costs=Z,class:"form-control-sm text-muted"},null,8,["modelValue","onUpdate:modelValue"])]),l("td",PZ,[l("button",{class:"btn btn-link text-danger p-0",onClick:Z=>C(J)},[...ce[20]||(ce[20]=[l("i",{class:"bi bi-trash"},null,-1)])],8,$Z)])]))),128))])])]),l("div",IZ,[l("div",MZ,[l("div",NZ,[ce[25]||(ce[25]=l("label",{class:"form-label fw-bold text-primary mb-2"},[l("i",{class:"bi bi-receipt-cutoff me-2"}),Pe("Custos Totais da Nota ")],-1)),l("div",LZ,[l("div",RZ,[l("div",FZ,[ce[22]||(ce[22]=l("span",{class:"input-group-text bg-white text-muted"},"R$",-1)),et(Ms,{modelValue:g.value,"onUpdate:modelValue":ce[5]||(ce[5]=be=>g.value=be),class:"form-control fw-bold text-danger",placeholder:"0,00"},null,8,["modelValue"])]),ce[23]||(ce[23]=l("div",{class:"form-text small mt-1"},"Insira a soma das taxas (Liquidação + Emolumentos + Corretagem).",-1))]),l("div",{class:"col-md-7"},[l("button",{class:"btn btn-outline-primary btn-lg w-100",type:"button",onClick:A},[...ce[24]||(ce[24]=[l("i",{class:"bi bi-distribute-vertical me-2"},null,-1),Pe(" Distribuir Custos Proporcionalmente ",-1)])])])])])]),l("div",VZ,[l("div",BZ,[l("div",UZ,[ce[26]||(ce[26]=l("small",{class:"text-muted d-block text-uppercase fw-bold",style:{"font-size":"0.75rem"}},"Operações (Bruto)",-1)),l("span",jZ,pe(O(te.value)),1)]),l("div",HZ,[ce[27]||(ce[27]=l("small",{class:"text-muted d-block text-uppercase fw-bold",style:{"font-size":"0.75rem"}},"Total Taxas",-1)),l("span",WZ,"- "+pe(O(B.value)),1)]),l("div",zZ,[ce[28]||(ce[28]=l("small",{class:"text-muted d-block text-uppercase fw-bold",style:{"font-size":"0.75rem"}},"Valor LÃquido",-1)),l("span",{class:Me(["fs-3 fw-bold",z.value>=0?"text-success":"text-danger"])},pe(O(z.value)),3)])])])])])):($(),L("div",uZ,[r.value?($(),L("div",cZ,[...ce[6]||(ce[6]=[l("div",{class:"spinner-border text-primary mb-3",role:"status"},null,-1),l("h5",{class:"text-muted"},"Lendo sua nota de corretagem...",-1),l("p",{class:"small text-muted"},"Isso pode levar alguns segundos.",-1)])])):($(),L("div",{key:1,onDragover:ce[1]||(ce[1]=St(()=>{},["prevent"])),onDrop:St(E,["prevent"])},[ce[7]||(ce[7]=l("i",{class:"bi bi-file-earmark-pdf display-1 text-danger mb-3"},null,-1)),ce[8]||(ce[8]=l("h4",null,"Arraste seu PDF aqui",-1)),ce[9]||(ce[9]=l("p",{class:"text-muted"},"ou clique para selecionar",-1)),l("input",{type:"file",ref:"fileInput",class:"d-none",accept:"application/pdf",onChange:P},null,544),l("button",{class:"btn btn-primary mt-2",onClick:ce[0]||(ce[0]=be=>G.$refs.fileInput.click())}," Selecionar Arquivo ")],32))]))]))}},qZ=ls(YZ,[["__scopeId","data-v-1bf192a0"]]),GZ={class:"import-excel-container"},XZ={key:0,class:"upload-area text-center p-5 border rounded bg-light dashed-border position-relative overflow-hidden"},KZ={key:0,class:"py-4 text-muted"},JZ={key:2,class:"pro-watermark d-flex flex-column align-items-center justify-content-center"},QZ={key:1},ZZ={class:"row mt-3 mb-3 p-3 bg-light border rounded mx-0"},eee={class:"col-12"},tee={class:"form-check form-switch m-0 d-flex align-items-center"},see={class:"table-responsive border rounded mb-3",style:{"max-height":"450px","overflow-y":"auto"}},nee={class:"table table-hover table-sm align-middle mb-0"},iee={colspan:"8",class:"bg-primary text-white text-center py-2 text-uppercase",style:{"font-size":"0.75rem","letter-spacing":"1px"}},ree={class:"ps-2"},aee=["onUpdate:modelValue"],oee={class:"text-center"},lee=["onClick","title"],uee={key:0},cee={class:"fw-bold",style:{"font-size":"0.85rem"}},dee={key:1,class:"text-warning fw-bold d-flex align-items-center",style:{"font-size":"0.85rem"},title:"Ativo novo. Será cadastrado."},hee={class:"text-end fw-bold",style:{"font-size":"0.85rem"}},fee={class:"text-center"},pee=["onClick"],mee={class:"bg-light p-3 rounded border mt-3"},gee={class:"row text-center text-md-end align-items-center"},vee={class:"col-6 col-md-3"},bee={class:"fs-6"},yee={class:"col-6 col-md-3"},_ee={class:"fs-6 text-danger"},xee={class:"col-12 col-md-6 border-start-md mt-2 mt-md-0"},wee={__name:"ImportExcelForm",emits:["validation-change","form-update"],setup(t,{expose:e,emit:s}){const n=tn(),i=s,{currentPortfolioId:o}
50=Of(),r=vi(),c=ve(!1),h=ve(null),f=ve([]),v=ve(!0);ve(!1);let g=0;const y=X=>{if(!n.isPro)return;const G=X.dataTransfer.files[0];G&&E(G)},x=X=>{if(!n.isPro)return;const G=X.target.files[0];G&&E(G)},E=async X=>{var ce,be;if(!o.value)return r.show("Selecione uma carteira.","error");c.value=!0;const G=new FormData;G.append("file",X),G.append("portfolio_id",o.value);try{const J=await ct.post("/api/trade-notes/parse-excel",G,{headers:{"Content-Type":"multipart/form-data"}});J.data.success&&(P(J.data.data),r.show(`${J.data.data.total_rows} linhas importadas com sucesso!`,"success"))}catch(J){console.error(J),r.show(((be=(ce=J.response)==null?void 0:ce.data)==null?void 0:be.message)||"Erro ao ler arquivo.","danger")}finally{c.value=!1}},P=X=>{h.value=!0;const G=X.trade_date||new Date().toISOString().split("T")[0];f.value=X.orders.map(ce=>({...ce,uid:++g,trade_date:ce.trade_date||G,quantity:Number(ce.quantity),price:Number(ce.price),other_costs:Number(ce.other_costs)}))},I=()=>{h.value=null,f.value=[]},D=X=>{f.value=f.value.filter(G=>G.uid!==X)},F=Ae(()=>{const X={};return f.value.forEach(G=>{const ce=G.broker_name||"Corretora Não Identificada";X[ce]||(X[ce]=[]),X[ce].push(G)}),X}),C=X=>new Intl.NumberFormat("pt-BR",{style:"currency",currency:"BRL"}).format(X),A=(X,G)=>["crypto","cryptos","criptomoedas"].includes(X==null?void 0:X.toLowerCase())?8:G==="price"?2:0,O=X=>{const G=X.quantity*X.price,ce=X.operation_type==="buy"?G+Number(X.other_costs):G-Number(X.other_costs);return C(ce)},j=Ae(()=>f.value.reduce((X,G)=>X+G.quantity*G.price,0)),te=Ae(()=>f.value.reduce((X,G)=>X+Number(G.other_costs),0)),B=Ae(()=>{let X=0;return f.value.forEach(G=>{const ce=G.quantity*G.price,be=Number(G.other_costs);G.operation_type==="buy"?X-=ce+be:X+=ce-be}),X}),z=Ae(()=>!h.value||f.value.length===0?!1:f.value.every(X=>X.trade_date&&(X.asset_id||X.asset_code)&&X.quantity>0&&X.price>0&&X.broker_name)),re=()=>f.value.map(X=>({portfolio_id:o.value,broker_name:X.broker_name,asset_id:X.asset_id,asset_code:X.asset_code,operation_type:X.operation_type,trade_date:ne(X.trade_date),quantity:Number(X.quantity),price:Number(X.price),other_costs:Number(X.other_costs),affect_balance:X.operation_type==="buy"?v.value:!1}));function ne(X){if(!X)return null;if(X instanceof Date){const G=X.getTimezoneOffset();return new Date(X.getTime()-G*60*1e3).toISOString().split("T")[0]}return typeof X=="string"?X:null}return Pt(z,X=>i("validation-change",X)),Pt([f],()=>{z.value&&i("form-update",re())},{deep:!0}),e({getData:re}),(X,G)=>($(),L("div",GZ,[h.value?($(),L("div",QZ,[l("div",{class:"d-flex justify-content-between align-items-center mb-3"},[G[9]||(G[9]=l("h6",{class:"mb-0 fw-bold"},[l("i",{class:"bi bi-table me-2"}),Pe("Conferência dos dados")],-1)),l("button",{class:"btn btn-sm btn-outline-secondary",onClick:I},[...G[8]||(G[8]=[l("i",{class:"bi bi-arrow-counterclockwise"},null,-1),Pe(" Nova Importação ",-1)])])]),l("div",ZZ,[l("div",eee,[l("div",tee,[_t(l("input",{class:"form-check-input mt-0 me-2",type:"checkbox",id:"excelAffect","onUpdate:modelValue":G[2]||(G[2]=ce=>v.value=ce)},null,512),[[kr,v.value]]),G[10]||(G[10]=l("label",{class:"form-check-label text-dark",for:"excelAffect"},"Movimentar caixa?",-1))])])]),l("div",see,[l("table",nee,[G[14]||(G[14]=l("thead",{class:"bg-light sticky-top shadow-sm"},[l("tr",null,[l("th",{width:"125",class:"ps-2"},"Data"),l("th",{width:"50",class:"text-center"},"Tipo"),l("th",null,"Ativo"),l("th",{width:"110"},"Qtd"),l("th",{width:"120"},"Preço"),l("th",{width:"110"},"Taxas"),l("th",{width:"130",class:"text-end"},"Total"),l("th",{width:"40"})])],-1)),l("tbody",null,[($(!0),L(Ze,null,At(F.value,(ce,be)=>($(),L(Ze,{key:be},[l("tr",null,[l("th",iee,[G[11]||(G[11]=l("i",{class:"bi bi-building me-2"},null,-1)),Pe(" INSTITUIÃÃO: "+pe(be),1)])]),($(!0),L(Ze,null,At(ce,J=>($(),L("tr",{key:J.uid},[l("td",ree,[_t(l("input",{type:"date","onUpdate:modelValue":Z=>J.trade_date=Z,class:"form-control form-control-sm text-muted",style:{"font-size":"0.8rem"}},null,8,aee),[[Xs,J.trade_date]])]),l("td",oee,[l("button",{type:"button",class:Me(["btn btn-sm w-100 fw-bold border",J.operation_type==="buy"?"btn-primary border-primary text-white":"btn-danger border-danger text-white"]),onClick:Z=>J.operation_type=J.operation_type==="buy"?"sell":"buy",style:{padding:"0.15rem 0","font-size":"0.75rem"},title:J.operation_type==="buy"?"Mudar para Venda":"Mudar para Compra"},pe(J.operation_type==="buy"?"C":"V"),11,lee)]),l("td",null,[J.asset_id?($(),L("div",uee,[l("span",cee,pe(J.asset_code),1)])):($(),L("div",dee,[G[12]||(G[12]=l("i",{class:"bi bi-plus-circle me-1"},null,-1)),Pe(" "+pe(J.asset_code),1)]))]),l("td",null,[et(Ms,{modelValue:J.quantity,"onUpdate:modelValue":Z=>J.quantity=Z,precision:A(J.category_slug,"qty"),"show-symbol":!1,floating:!1,class:"form-control-sm",id:"qty_"+J.uid},null,8,["modelValue","onUpdate:modelValue","precision","id"])]),l("td",null,[et(Ms,{modelValue:J.price,"onUpdate:modelValue":Z=>J.price=Z,precision:A(J.category_slug,"price"),floating:!1,class:"form-control-sm",id:"price_"+J.uid},null,8,["modelValue","onUpdate:modelValue","precision","id"])]),l("td",null,[et(Ms,{modelValue:J.other_costs,"onUpdate:modelValue":Z=>J.other_costs=Z,floating:!1,class:"form-control-sm text-muted",id:"costs_"+J.uid},null,8,["modelValue","onUpdate:modelValue","id"])]),l("td",hee,pe(O(J)),1),l("td",fee,[l("button",{class:"btn btn-link text-danger p-0",onClick:Z=>D(J.uid),title:"Remover linha"},[...G[13]||(G[13]=[l("i",{class:"bi bi-x-circle-fill"},null,-1)])],8,pee)])]))),128))],64))),128))])])]),l("div",mee,[l("div",gee,[l("div",vee,[G[15]||(G[15]=l("small",{class:"text-muted d-block text-uppercase fw-bold",style:{"font-size":"0.7rem"}},"Operações Brutas",-1)),l("span",bee,pe(C(j.value)),1)]),l("div",yee,[G[16]||(G[16]=l("small",{class:"text-muted d-block text-uppercase fw-bold",style:{"font-size":"0.7rem"}},"Total Taxas",-1)),l("span",_ee,pe(C(te.value)),1)]),l("div",xee,[G[17]||(G[17]=l("small",{class:"text-muted d-block text-uppercase fw-bold",style:{"font-size":"0.7rem"}},"Balanço lÃquido da planilha",-1)),l("span",{class:Me(["fs-4 fw-bold",B.value>=0?"text-success":"text-danger"])},pe(C(B.value)),3)])])])])):($(),L("div",XZ,[c.value?($(),L("div",KZ,[...G[3]||(G[3]=[l("div",{class:"spinner-border mb-3",role:"status"},null,-1),l("h5",{class:"text-muted"},"Lendo planilha...",-1)])])):($(),L("div",{key:1,onDragover:G[1]||(G[1]=St(()=>{},["prevent"])),onDrop:St(y,["prevent"]),class:Me({"blurred-locked":!Ne(n).isPro})},[G[4]||(G[4]=l("i",{class:"bi bi-file-earmark-spreadsheet display-1 text-success mb-3"},null,-1)),G[5]||(G[5]=l("h4",null,"Arraste seu CSV/Excel aqui",-1)),G[6]||(G[6]=l("p",{class:"text-muted"},"Layout esperado: Data, C/V, Ativo, Quantidade, Preço, Corretora, Taxas",-1)),l("input",{type:"file",ref:"fileInput",class:"d-none",accept:".csv, .xlsx, .xls",onChange:x},null,544),l("button",{class:"btn btn-outline-success mt-2",onClick:G[0]||(G[0]=ce=>X.$refs.fileInput.click())}," Selecionar Arquivo ")],34)),Ne(n).isPro?xe("",!0):($(),L("div",JZ,[...G[7]||(G[7]=[l("i",{class:"bi bi-lock"},null,-1),l("span",{class:"pro-text"},"Recurso PRO",-1)])]))]))]))}},Eee=ls(wee,[["__scopeId","data-v-c093a6fe"]]),See={class:"method-tabs nav nav-pills mb-4"},kee={class:"nav-item"},Cee={class:"nav-item"},Tee={class:"method-content"},Aee={class:"d-flex justify-content-between w-100"},Oee={class:"d-flex gap-2"},Dee=["disabled"],Pee={__name:"TradeOrderModal",props:{restoredState:{type:Object,default:null}},emits:["order-created"],setup(t,{emit:e}
50){const s=e,n=t,i=In(),o=Yn(),r=vi(),c=pi(),h=ve("single"),f=ve([]),v=ve(null),g=Ae(()=>{var be;if((be=n.restoredState)!=null&&be.selectedAsset){const J=n.restoredState.selectedAsset.code;return`${n.restoredState.operationType==="buy"?"Comprar":"Vender"} ${J}`}return"Lançamento de Ordens"}),y=ve(null),x=ve(null),E=ve(null),P=ve(null),I=ve(!1),D=ve(null),F=Ae(()=>I.value&&D.value!==null),C=Ae(()=>{const be=f.value.length;return be>0?`Salvar ${be} Ordem${be>1?"ens":""}`:"Salvar"}),A=Ae(()=>v.value!==null);function O(){o.close()}function j(be){f.value=[be]}function te(be){f.value=be}function B(be){f.value=be.orders}function z(be){f.value=be}function re(be){I.value=be}function ne(be){D.value=be,f.value=[be]}async function X(){var be,J;try{let Z=D.value;if(Z||(Z=await G()),!Z){r.show("Preencha o formulário corretamente","error");return}const ge=Array.isArray(Z)?"/api/trade-orders/batch":"/api/trade-orders",q=await ct.post(ge,Z);if(q.data.success){r.show("Ordem salva com sucesso!","success");const W=Array.isArray(Z)?Z[0].trade_date:Z.trade_date;W&&window.dispatchEvent(new CustomEvent("mn-force-date-change",{detail:{date:W,context:"default"}})),i.triggerRefresh("trades"),i.triggerRefresh("portfolios"),i.triggerRefresh("dashboard"),
50c.triggerUpdate("trades"),window.dispatchEvent(new CustomEvent("trade-order-created",{detail:{portfolioId:Array.isArray(Z)?Z[0].portfolio_id:Z.portfolio_id}})),window.dispatchEvent(new CustomEvent("wallet-transaction-saved")),window.dispatchEvent(new CustomEvent("asset-data-updated")),s("order-created",q.data.data),O()}}catch(Z){console.error("Erro completo:",Z),r.show(((J=(be=Z.response)==null?void 0:be.data)==null?void 0:J.message)||"Erro ao salvar ordem","error")}}async function G(){let be=null;switch(h.value){case"single":be=y.value;break;case"multi":be=x.value;break;case"import-note":be=E.value;break;case"import-excel":be=P.value;break}return be&&typeof be.getData=="function"?be.getData():null}function ce(){r.show("Rascunho salvo!","info")}return(be,J)=>($(),Ut(Ha,{"model-value":!0,title:g.value,"onUpdate:modelValue":O},{footer:vt(()=>[l("div",Aee,[l("button",{type:"button",class:"btn btn-secondary",onClick:O},[...J[4]||(J[4]=[l("i",{class:"bi bi-x-circle"},null,-1),Pe(" Cancelar ",-1)])]),l("div",Oee,[A.value?($(),L("button",{key:0,type:"button",class:"btn btn-outline-warning",onClick:ce},[...J[5]||(J[5]=[l("i",{class:"bi bi-save"},null,-1),Pe(" Salvar Rascunho ",-1)])])):xe("",!0),l("button",{type:"button",class:"btn btn-primary",disabled:!F.value,onClick:X},[J[6]||(J[6]=l("i",{class:"bi bi-check-circle"},null,-1)),Pe(" "+pe(C.value),1)],8,Dee)])])]),default:vt(()=>[l("nav",See,[l("li",kee,[l("button",{class:Me(["nav-link",{active:h.value==="single"}]),onClick:J[0]||(J[0]=Z=>h.value="single")},[...J[2]||(J[2]=[l("i",{class:"bi bi-lightning-fill"},null,-1),Pe(" Lançamento Rápido ",-1)])],2)]),l("li",Cee,[l("button",{class:Me(["nav-link",{active:h.value==="import-excel"}]),onClick:J[1]||(J[1]=Z=>h.value="import-excel")},[...J[3]||(J[3]=[l("i",{class:"bi bi-file-earmark-spreadsheet"},null,-1),Pe(" Importar Excel ",-1)])],2)])]),l("div",Tee,[h.value==="single"?($(),Ut(xD,{key:0,ref_key:"singleOrderFormRef",ref:y,"restored-state":t.restoredState,onOrderCreated:j,onValidationChange:re,onFormUpdate:ne},null,8,["restored-state"])):xe("",!0),h.value==="multi"?($(),Ut(oZ,{key:1,ref_key:"multiOrderFormRef",ref:x,onOrdersCreated:te,onValidationChange:re,onFormUpdate:ne},null,512)):xe("",!0),h.value==="import-note"?($(),Ut(qZ,{key:2,ref_key:"importNoteFormRef",ref:E,onNoteImported:B,onValidationChange:re,onFormUpdate:ne},null,512)):xe("",!0),h.value==="import-excel"?($(),Ut(Eee,{key:3,ref_key:"importExcelFormRef",ref:P,onExcelImported:z,onValidationChange:re,onFormUpdate:ne},null,512)):xe("",!0)])]),_:1},8,["title"]))}},Df=ls(Pee,[["__scopeId","data-v-86e024cc"]]),$ee={class:"sidebar-header px-3"},Iee={class:"sidebar-container"},Mee={class:"sidebar-fixed"},Nee={class:"list-group list-group-flush"},Lee={key:0},Ree={key:1},Fee={class:"icon-wrapper"},Vee={key:0,class:"bi bi-lock-fill text-info lock-badge"},Bee={class:"icon-wrapper"},Uee={key:0,class:"bi bi-lock-fill text-info lock-badge"},jee={class:"d-none d-md-inline-block"},Hee={class:"icon-wrapper"},Wee={key:0,class:"bi bi-lock-fill text-info lock-badge"},zee={class:"icon-wrapper"},Yee={key:0,class:"bi bi-lock-fill text-info lock-badge"},qee={class:"icon-wrapper"},Gee={key:0,class:"bi bi-lock-fill text-info lock-badge"},Xee={class:"icon-wrapper"},Kee={key:0,class:"bi bi-lock-fill text-info lock-badge"},Jee={class:"icon-wrapper"},Qee={key:0,class:"bi bi-lock-fill text-info lock-badge"},Zee={class:"icon-wrapper"},ete={key:0,class:"bi bi-lock-fill text-info lock-badge"},tte="/assets/images/logo-azul.png",ste={__name:"Sidebar",setup(t){const e=gi(),s=Af(),n="Kativo",i=tn(),o=Yn(),r=Mn(),c=In(),h=()=>{window.innerWidth<=768&&(c.sidebarCollapsed=!0)},f=()=>{var y;if(!i.hasProAccess){e.push("/my-account/plans"),h();return}r.open(UO,{title:"Gerenciar Carteiras",userId:(y=i.user)==null?void 0:y.id,onWalletCreated:x=>console.log("Nova carteira:",x)}),h()};function v(){o.open(Df,{restoredState:null}),h()}const g=()=>{window.innerWidth<=768&&(c.sidebarCollapsed=!0)};return Pt(()=>s.path,()=>{h()}),Xt(()=>{h(),window.addEventListener("resize",g)}),Ni(()=>{window.removeEventListener("resize",g)}),(y,x)=>{var P,I;const E=ur("router-link");return $(),L("div",{class:Me(["sidebar",{collapsed:Ne(c).sidebarCollapsed}]),id:"sidebar"},[l("div",$ee,[l("button",{class:Me(["btn btn-default p-0 me-3",{open:!Ne(c).sidebarCollapsed}]),id:"sidebar-toggle",onClick:x[0]||(x[0]=(...D)=>Ne(c).toggleSidebar&&Ne(c).toggleSidebar(...D))},[...x[2]||(x[2]=[l("span",null,null,-1),l("span",null,null,-1),l("span",null,null,-1),l("span",null,null,-1)])],2),et(E,{class:"logo",to:"/",title:Ne(n)},{default:vt(()=>[l("img",{src:tte,alt:"Logo"})]),_:1},8,["title"])]),l("div",Iee,[l("div",Mee,[l("div",Nee,[Ne(i).daysLeftInTrial!==null&&Ne(i).shouldShowBadge?($(),L("div",{key:0,class:"trial-container mx-3 mb-3",onClick:x[1]||(x[1]=D=>y.$router.push("/my-account/plans"))},[l("div",{class:Me(["badge p-2 w-100 text-center trial-full",Ne(i).daysLeftInTrial>=0?"bg-primary":"bg-danger"])},[Ne(i).daysLeftInTrial>=0&&((I=(P=Ne(i).user)==null?void 0:P.subscription)==null?void 0:I.status)==="Trial"?($(),L("span",Lee," Trial PRO: "+pe(Ne(i).daysLeftInTrial)+" dias restantes ",1)):($(),L("span",Ree," Seu acesso PRO expirou! "))],2),x[3]||(x[3]=l("div",{class:"badge bg-primary text-white p-2 w-100 text-center trial-short","data-bs-toggle":"tooltip","data-bs-placement":"right",title:"PRO"},[l("i",{class:"bi bi-trophy-fill text-white",style:{"font-size":".85rem"}})],-1))])):xe("",!0),l("a",{href:"#",class:"list-group-item",onClick:St(f,["prevent"])},[l("div",Fee,[x[4]||(x[4]=l("i",{class:"bi bi-wallet-fill main-icon","data-bs-toggle":"tooltip","data-bs-placement":"right",title:"Gerenciar Carteiras"},null,-1)),Ne(i).hasProAccess?xe("",!0):($(),L("i",Vee))]),x[5]||(x[5]=l("span",{class:"menu-text"}
50,"Gerenciar carteiras",-1))]),x[25]||(x[25]=l("hr",null,null,-1)),et(E,{to:"/b3","data-action":"route",class:"list-group-item"},{default:vt(()=>[l("div",Bee,[x[6]||(x[6]=l("svg",{viewBox:"0 0 1000 857.1",xmlns:"http://www.w3.org/2000/svg",class:"main-icon","data-bs-toggle":"tooltip","data-bs-placement":"right",title:"Integração B3"},[l("g",{fill:"currentColor"},[l("path",{d:"M432.2 615.9h-131V506.7h131c29.9 0 54 24.1 54 54s-24.1 55.2-54 55.2zM301.1 309.1h119.5c29.9 0 54 24.1 54 54s-24.1 54-54 54H301.1zm257.5 141.3c18.4-24.1 29.9-54 29.9-87.3 0-79.3-64.4-143.6-143.7-143.6H181.6v484.8h286.2c79.3 0 143.7-64.3 143.7-143.6 0-44.8-20.7-83.9-52.9-110.3zM1000 132.1c0 17.2-6.9 32.2-20.7 43.7s-31 17.2-51.7 17.2c-19.5 0-36.8-5.7-50.6-16.1-13.8-10.3-21.8-24.1-24.1-42.5h54c4.6 10.3 11.5 16.1 21.8 16.1 6.9 0 11.5-1.1 16.1-4.6 4.6-3.4 5.7-8 5.7-13.8 0-5.7-2.3-9.2-5.7-12.6-4.6-3.4-9.2-4.6-17.2-4.6h-18.4V77h17.2c6.9 0 12.6-1.1 16.1-4.6 3.4-3.4 5.7-6.9 5.7-11.5 0-5.7-2.3-10.3-5.7-13.8-3.4-3.4-9.2-4.6-14.9-4.6-6.9 0-11.5 2.3-16.1 6.9-2.3 2.3-4.6 5.7-5.7 10.3h-50.6c3.4-18.4 10.3-33.3 24.1-43.7C892 5.7 908 0 927.6 0c20.7 0 36.8 5.7 50.6 16.1 12.6 11.5 19.5 25.3 19.5 42.5 0 16.1-6.9 27.6-19.5 35.6 14.9 8.1 21.8 21.8 21.8 37.9z"}),l("path",{d:"M182.8 126.4V66.6H0v790.5h182.8v-58.6h-123V126.4zM608 798.5v58.6h182.8V66.6H608v59.7h124.1v672.2z"})])],-1)),Ne(i).hasProAccess?xe("",!0):($(),L("i",Uee))]),x[7]||(x[7]=l("span",{class:"menu-text"},"Integração B3",-1))]),_:1}),l("a",{href:"#",class:"list-group-item",onClick:St(v,["prevent"])},[...x[8]||(x[8]=[l("div",{class:"icon-wrapper"},[l("i",{class:"bi bi-plus-square main-icon",title:"Novo lançamento"})],-1),l("span",{class:"menu-text"},"Novo lançamento",-1)])]),x[26]||(x[26]=l("hr",null,null,-1)),et(E,{to:"/community","data-action":"route",class:"list-group-item"},{default:vt(()=>[...x[9]||(x[9]=[l("div",{class:"icon-wrapper"},[l("i",{class:"bi bi-people-fill main-icon","data-bs-toggle":"tooltip","data-bs-placement":"right",title:"Comunidade"})],-1),l("span",{class:"menu-text"},"Comunidade",-1)])]),_:1}),x[27]||(x[27]=l("hr",null,null,-1)),l("span",jee,[et(E,{to:"/dashboard","data-action":"route",class:"list-group-item"},{default:vt(()=>[...x[10]||(x[10]=[l("div",{class:"icon-wrapper"},[l("i",{class:"bi bi-house-fill main-icon","data-bs-toggle":"tooltip","data-bs-placement":"right",title:"Visão Geral"})],-1),l("span",{class:"menu-text"},"Visão geral",-1)])]),_:1})]),et(E,{to:"/trades","data-action":"route",class:"list-group-item"},{default:vt(()=>[...x[11]||(x[11]=[l("div",{class:"icon-wrapper"},[l("i",{class:"bi bi-collection main-icon","data-bs-toggle":"tooltip","data-bs-placement":"right",title:"Lançamentos"})],-1),l("span",{class:"menu-text"},"Lançamentos",-1)])]),_:1}),et(E,{to:"/earnings","data-action":"route",class:"list-group-item"},{default:vt(()=>[...x[12]||(x[12]=[l("div",{class:"icon-wrapper"},[l("i",{class:"bi bi-coin main-icon","data-bs-toggle":"tooltip","data-bs-placement":"right",title:"Proventos"})],-1),l("span",{class:"menu-text"},"Proventos",-1)])]),_:1}),et(E,{to:"/performance","data-action":"route",class:"list-group-item"},{default:vt(()=>[l("div",Hee,[x[13]||(x[13]=l("i",{class:"bi bi-graph-up-arrow main-icon","data-bs-toggle":"tooltip","data-bs-placement":"right",title:"Performance"},null,-1)),Ne(i).hasProAccess?xe("",!0):($(),L("i",Wee))]),x[14]||(x[14]=l("span",{class:"menu-text"},"Performance",-1))]),_:1}),x[28]||(x[28]=l("hr",null,null,-1)),et(E,{to:"/taxes","data-action":"route",class:"list-group-item"},{default:vt(()=>[l("div",zee,[x[15]||(x[15]=l("i",{class:"bi bi-percent main-icon","data-bs-toggle":"tooltip","data-bs-placement":"right",title:"Imposto de renda"},null,-1)),Ne(i).hasProAccess?xe("",!0):($(),L("i",Yee))]),x[16]||(x[16]=l("span",{class:"menu-text"},"Imposto de renda",-1))]),_:1}),et(E,{to:"/annual-tax","data-action":"route",class:"list-group-item"},{default:vt(()=>[l("div",qee,[x[17]||(x[17]=l("i",{class:"bi bi-file-earmark-text main-icon","data-bs-toggle":"tooltip","data-bs-placement":"right",title:"Ajuste Anual IR"},null,-1)),Ne(i).hasProAccess?xe("",!0):($(),L("i",Gee))]),x[18]||(x[18]=l("span",{class:"menu-text"},"Ajuste anual IR",-1))]),_:1}),x[29]||(x[29]=l("hr",null,null,-1)),et(E,{to:"/opportunities","data-action":"route",class:"list-group-item"},{default:vt(()=>[l("div",Xee,[x[19]||(x[19]=l("i",{class:"bi bi-trophy main-icon","data-bs-toggle":"tooltip","data-bs-placement":"right",title:"Oportunidades"},null,-1)),Ne(i).hasProAccess?xe("",!0):($(),L("i",Kee))]),x[20]||(x[20]=l("span",{class:"menu-text"},"Oportunidades",-1))]),_:1}),et(E,{to:"/goals","data-action":"route",class:"list-group-item"},{default:vt(()=>[l("div",Jee,[x[21]||(x[21]=l("i",{class:"bi bi-bar-chart-steps main-icon","data-bs-toggle":"tooltip","data-bs-placement":"right",title:"Metas e objetivos"},null,-1)),Ne(i).hasProAccess?xe("",!0):($(),L("i",Qee))]),x[22]||(x[22]=l("span",{class:"menu-text"},"Metas e objetivos",-1))]),_:1}),et(E,{to:"/watchlist","data-action":"route",class:"list-group-item"},{default:vt(()=>[l("div",Zee,[x[23]||(x[23]=l("i",{class:"bi bi-radar main-icon","data-bs-toggle":"tooltip","data-bs-placement":"right",title:"Ativos no radar"},null,-1)),Ne(i).hasProAccess?xe("",!0):($(),L("i",ete))]),x[24]||(x[24]=l("span",{class:"menu-text"},"Ativos no radar",-1))]),_:1})])])])],2)}}},nte=ls(ste,[["__scopeId","data-v-8c89ad6e"]]),ite={class:"navbar fixed-top bg-linear-gradient"},rte={class:"d-flex align-items-center"},ate={class:"list-inline shortcuts d-none d-md-inline-block ms-2"},ote={class:"list-inline-item mx-3","data-bs-toggle":"tooltip","data-bs-placement":"bottom",title:"Visão Geral"},lte={class:"d-flex align-items-center me-3"},ute={key:0,class:"bi bi-moon-stars-fill"},cte={key:1,class:"bi bi-sun-fill"},dte={class:"position-relative"},hte={class:"btn btn-link text-white position-relative","data-bs-toggle":"tooltip","data-bs-placement":"bottom",title:"Notificações"},fte={key:0,class:"badge bg-danger rounded-pill position-absolute top-0 start-100 translate-middle"},pte={class:"mx-3 dropdown"},mte={href:"#",class:"nav-link dropdown-toggle text-white",role:"button",id:"dropdownMyAccount","data-bs-toggle":"dropdown","aria-expanded":"false"},gte={class:"d-none d-md-inline-block text-blue-default"},vte={class:"ico-init"},bte={class:"dropdown-menu dropdown-menu-end","aria-labelledby":"dropdownMyAccount"}
50,yte=3,_te="/assets/images/logo.png",xte={__name:"NavbarAdmin",setup(t){const e=In(),s=gi(),n=tn(),i="Kativo",o=Ae(()=>{var g;return((g=n.user)==null?void 0:g.name)||"Usuário"}),r=Ae(()=>o.value.split(" ").map(g=>g[0]).join("").toUpperCase()),c=ve(!1);function h(g){const y=document.body;g.toLowerCase()==="dark"?(y.classList.add("dark-theme"),c.value=!0):(y.classList.remove("dark-theme"),c.value=!1)}async function f(){const g=c.value?"Light":"Dark";if(h(g),n.user)try{const{data:y}=await ct.put("/api/user/style",{style:g});n.user.style=y.style}catch(y){console.error("Erro ao salvar tema:",y)}}async function v(){var g;try{await n.logout()}catch(y){((g=y.response)==null?void 0:g.status)!==401&&console.error("Erro no logout:",y)}finally{s.push("/login")}}return Xt(async()=>{var x;n.user||await n.getUser();const g=((x=n.user)==null?void 0:x.style)||"light";h(g),[].slice.call(document.querySelectorAll('[data-bs-toggle="tooltip"]')).forEach(E=>{const P=new mi(E);E.addEventListener("click",()=>P.hide())})}),Pt(()=>s.currentRoute.value.fullPath,()=>{window.matchMedia("(max-width: 991px)").matches&&!e.sidebarCollapsed&&e.toggleSidebar()}),(g,y)=>{const x=ur("router-link");return $(),L("nav",ite,[l("div",rte,[l("button",{class:Me(["btn btn-default mx-4",{open:!Ne(e).sidebarCollapsed}]),id:"menu-toggle",onClick:y[0]||(y[0]=(...E)=>Ne(e).toggleSidebar&&Ne(e).toggleSidebar(...E))},[...y[1]||(y[1]=[l("span",null,null,-1),l("span",null,null,-1),l("span",null,null,-1),l("span",null,null,-1)])],2),et(x,{class:"navbar-brand logo",to:"/",title:Ne(i)},{default:vt(()=>[l("img",{src:_te,style:{width:"85px"}})]),_:1},8,["title"]),l("ul",ate,[l("li",ote,[et(x,{to:"/dashboard","data-action":"route"},{default:vt(()=>[...y[2]||(y[2]=[l("i",{class:"bi bi-house-fill"},null,-1)])]),_:1})])])]),l("div",lte,[l("button",{class:"btn btn-link text-white position-relative","data-bs-toggle":"tooltip","data-bs-placement":"bottom",title:"Tema",onClick:f},[c.value?($(),L("i",ute)):($(),L("i",cte))]),l("div",dte,[l("button",hte,[y[3]||(y[3]=l("i",{class:"bi bi-bell-fill fs-5"},null,-1)),($(),L("span",fte,pe(yte)))])]),l("div",pte,[l("a",mte,[l("span",gte,pe(o.value),1),l("span",vte,pe(r.value),1)]),l("ul",bte,[l("li",null,[l("a",{href:"#",onClick:St(v,["prevent"]),class:"dropdown-item"},[...y[4]||(y[4]=[l("i",{class:"bi bi-door-open-fill me-3"},null,-1),Pe("Sair ",-1)])])])])])])])}}},wte=ls(xte,[["__scopeId","data-v-752f6e4b"]]),Ete={class:"sidebar-header px-3"},Ste={class:"sidebar-container"},kte={class:"sidebar-fixed"},Cte={class:"list-group list-group-flush"},Tte="/assets/images/logo-azul.png",Ate={__name:"SidebarAdmin",setup(t){const e="Kativo";tn(),Yn(),Mn();const s=In();return(n,i)=>{const o=ur("router-link");return $(),L("div",{class:Me(["sidebar",{collapsed:Ne(s).sidebarCollapsed}]),id:"sidebar"},[l("div",Ete,[l("button",{class:Me(["btn btn-default p-0 me-3",{open:!Ne(s).sidebarCollapsed}]),id:"sidebar-toggle",onClick:i[0]||(i[0]=(...r)=>Ne(s).toggleSidebar&&Ne(s).toggleSidebar(...r))},[...i[1]||(i[1]=[l("span",null,null,-1),l("span",null,null,-1),l("span",null,null,-1),l("span",null,null,-1)])],2),et(o,{class:"logo",to:"/",title:Ne(e)},{default:vt(()=>[l("img",{src:Tte,alt:"Logo"})]),_:1},8,["title"])]),l("div",Ste,[l("div",kte,[l("div",Cte,[et(o,{to:"/admin/helpdesk","data-action":"route",class:"list-group-item"},{default:vt(()=>[...i[2]||(i[2]=[l("i",{class:"bi bi-chat-dots","data-bs-toggle":"tooltip","data-bs-placement":"right",title:"Chat de suporte"},null,-1),l("span",{class:"menu-text"},"Chat de suporte",-1)])]),_:1}),i[11]||(i[11]=l("hr",null,null,-1)),et(o,{to:"/community","data-action":"route",class:"list-group-item"},{default:vt(()=>[...i[3]||(i[3]=[l("div",{class:"icon-wrapper"},[l("i",{class:"bi bi-people-fill main-icon","data-bs-toggle":"tooltip","data-bs-placement":"right",title:"Comunidade"})],-1),l("span",{class:"menu-text"},"Comunidade",-1)])]),_:1}),i[12]||(i[12]=l("hr",null,null,-1)),et(o,{to:"/admin/users","data-action":"route",class:"list-group-item"},{default:vt(()=>[...i[4]||(i[4]=[l("i",{class:"bi bi-person-bounding-box","data-bs-toggle":"tooltip","data-bs-placement":"right",title:"Usuários"},null,-1),l("span",{class:"menu-text"},"Usuários",-1)])]),_:1}),et(o,{to:"/newsletter","data-action":"route",class:"list-group-item"},{default:vt(()=>[...i[5]||(i[5]=[l("i",{class:"bi bi-coin","data-bs-toggle":"tooltip","data-bs-placement":"right",title:"Financeiro"},null,-1),l("span",{class:"menu-text"},"Financeiro",-1)])]),_:1}),et(o,{to:"/newsletter","data-action":"route",class:"list-group-item"},{default:vt(()=>[...i[6]||(i[6]=[l("i",{class:"bi-shield-check","data-bs-toggle":"tooltip","data-bs-placement":"right",title:"Moderação"},null,-1),l("span",{class:"menu-text"},"Moderação",-1)])]),_:1}),i[13]||(i[13]=l("hr",null,null,-1)),et(o,{to:"/admin/courses","data-action":"route",class:"list-group-item"},{default:vt(()=>[...i[7]||(i[7]=[l("i",{class:"bi bi-mortarboard-fill","data-bs-toggle":"tooltip","data-bs-placement":"right",title:"Cursos"},null,-1),l("span",{class:"menu-text"},"Cursos",-1)])]),_:1}),i[14]||(i[14]=l("hr",null,null,-1)),et(o,{to:"/admin/newsletter","data-action":"route",class:"list-group-item"},{default:vt(()=>[...i[8]||(i[8]=[l("i",{class:"bi bi-envelope","data-bs-toggle":"tooltip","data-bs-placement":"right",title:"Newsletter"},null,-1),l("span",{class:"menu-text"},"Newsletter",-1)])]),_:1}),et(o,{to:"/admin/whatsapp","data-action":"route",class:"list-group-item"},{default:vt(()=>[...i[9]||(i[9]=[l("i",{class:"bi bi-whatsapp","data-bs-toggle":"tooltip","data-bs-placement":"right",title:"WhatsApp"},null,-1),l("span",{class:"menu-text"},"WhatsApp",-1)])]),_:1}),et(o,{to:"/newsletter","data-action":"route",class:"list-group-item"},{default:vt(()=>[...i[10]||(i[10]=[l("i",{class:"bi-file-text","data-bs-toggle":"tooltip","data-bs-placement":"right",title:"Conteúdo"},null,-1),l("span",{class:"menu-text"},"Conteúdo",-1)])]),_:1})])])])],2)}}},Ote=ls(Ate,[["__scopeId","data-v-561ee01b"]]),Dte={class:"mobile-footer d-md-none"},Pte={class:"footer-btn"},$te={__name:"MobileFooterMenu",setup(t){const e=Yn(),s=gi(),n=Af(),i=In();function o(h){s.push(h)}function r(){e.open(Df,{restoredState:null})}function c(){n.path==="/community"||n.path.startsWith("/community/profile/")?n.path.startsWith("/community/profile/")?(localStorage.setItem("shouldFocusCommunityPost","true"),s.push("/community")):(localStorage.setItem("shouldFocusCommunityPost","true"),window.dispatchEvent(new CustomEvent("focus-community-post"))):r()}return(h,f)=>($(),L("div",Dte,[l("button",{class:"footer-btn",onClick:f[0]||(f[0]=v=>o("/dashboard"))},[...f[4]||(f[4]=[l("i",{class:"bi bi-grid-fill"},null,-1),l("span",{class:"label"},"Visão Geral",-1)])]),l("button",{class:"footer-btn",onClick:f[1]||(f[1]=v=>o("/my-account/plans"))},[...f[5]||(f[5]=[l("i",{class:"bi bi-gem"},null,-1),l("span",{class:"label"},"Plano PRO",-1)])]),f[10]||(f[10]=l("div",{class:"center-spacer"},null,-1)),l("button",{class:"footer-btn position-relative",onClick:f[2]||(f[2]=v=>o("/community"))},[...f[6]||(f[6]=[l("i",{class:"bi bi-people-fill"},null,-1),l("span",{class:"label"},"Comunidade",-1)])]),l("div",Pte,[l("button",{class:Me(["btn btn-default menu-btn",{open:!Ne(i).sidebarCollapsed}]),onClick:f[3]||(f[3]=(...v)=>Ne(i).toggleSidebar&&Ne(i).toggleSidebar(...v))},[...f[7]||(f[7]=[l("span",null,null,-1),l("span",null,null,-1),l("span",null,null,-1),l("span",null,null,-1)])],2),f[8]||(f[8]=l("span",{class:"label"},"Menu",-1))]),l("button",{class:"central-btn",onClick:St(c,["prevent"]),"aria-label":"Novo lançamento"},[...f[9]||(f[9]=[l("i",{class:"bi bi-plus-lg"},null,-1)])])]))}},Ite=ls($te,[["__scopeId","data-v-32ec37a5"]]),Mte={__name:"ModalManager",setup(t){const e=Yn(),s=Ae(()=>e.stack);function n(){e.close()}return(i,o)=>($(!0),L(Ze,null,At(s.value,(r,c)=>
50($(),Ut(Du(r.name),On({key:r.key,active:c===s.value.length-1},{ref_for:!0},r.props,{onClose:n}),null,16,["active"]))),128))}},Nte={class:"offcanvas-header"},Lte={class:"offcanvas-title"},Rte={class:"offcanvas-body"},Fte={key:0,class:"offcanvas-footer p-3 border-top"},Vte={__name:"AppOffcanvas",props:{title:{type:String,default:""},show:{type:Boolean,default:!1},customBackground:{type:Boolean,default:!1}},emits:["update:show","hidden"],setup(t,{emit:e}){const s=t,n=e,i=ve(null),o=ve(!1),r=ve(!1);let c=null;function h(){n("update:show",!1)}return Pt(()=>s.show,async f=>{f?(o.value=!0,await vs(),requestAnimationFrame(()=>{r.value=!0})):r.value=!1}),Xt(()=>{var f;c=v=>{v.propertyName==="transform"&&(r.value||(o.value=!1,n("hidden")))},(f=i.value)==null||f.addEventListener("transitionend",c),s.show&&(o.value=!0,requestAnimationFrame(()=>{r.value=!0}))}),Wu(()=>{var f;(f=i.value)==null||f.removeEventListener("transitionend",c)}),(f,v)=>_t(($(),L("div",{ref_key:"el",ref:i,class:Me(["offcanvas offcanvas-end",{show:r.value,"custom-bg":t.customBackground}]),tabindex:"-1","aria-modal":"true",role:"dialog"},[l("div",Nte,[l("h5",Lte,[v[0]||(v[0]=l("i",{class:"bi bi-bookmark-check-fill text-primary fs-4 mx-2"},null,-1)),Pe(" "+pe(t.title),1)]),l("button",{type:"button",class:"btn-close",onClick:h,"aria-label":"Close"})]),l("div",Rte,[Ft(f.$slots,"default",{},void 0,!0)]),f.$slots.footer?($(),L("div",Fte,[Ft(f.$slots,"footer",{},void 0,!0)])):xe("",!0)],2)),[[Rr,o.value]])}},Bte=ls(Vte,[["__scopeId","data-v-38cfa862"]]),Ute={__name:"OffcanvasManager",setup(t){const e=Mn(),s=Ae(()=>e.stack.length>0?e.stack[e.stack.length-1]:null),n=ve(null);Pt(s,r=>{r&&(n.value=r)});function i(){e.close()}function o(){s.value||(n.value=null)}return(r,c)=>{var h,f,v,g;return $(),L("div",null,[et(Bte,{title:((f=(h=n.value)==null?void 0:h.props)==null?void 0:f.title)||"",show:!!s.value,customBackground:((g=(v=n.value)==null?void 0:v.props)==null?void 0:g.customBackground)||!1,"onUpdate:show":c[0]||(c[0]=y=>{y||i()}),onHidden:o},{default:vt(()=>[n.value?($(),Ut(Du(n.value.name),Zn(On({key:0},n.value.props)),null,16)):xe("",!0)]),_:1},8,["title","show","customBackground"]),et(ja,{name:"oc-fade"},{default:vt(()=>[s.value?($(),L("div",{key:0,class:"offcanvas-backdrop",onClick:i})):xe("",!0)]),_:1})])}}},jte=ls(Ute,[["__scopeId","data-v-161190cb"]]),Hte={class:"toast-container position-fixed bottom-0 end-0 p-3",style:{"z-index":"2000"}},Wte={class:"d-flex"},zte={class:"toast-body"},Yte=["onClick"],qte={__name:"ToastManager",setup(t){const e=vi(),s=n=>{switch(n){case"primary":return"text-bg-primary";case"success":return"text-bg-success";case"danger":return"text-bg-danger";case"error":return"text-bg-danger";case"warning":return"text-bg-warning";default:return"text-bg-light"}};return(n,i)=>($(),L("div",Hte,[($(!0),L(Ze,null,At(Ne(e).messages,o=>($(),L("div",{key:o.id,class:Me(["toast align-items-center border-0 fade show mb-2",s(o.type)]),role:"alert","aria-live":"assertive","aria-atomic":"true"},[l("div",Wte,[l("div",zte,pe(o.message),1),l("button",{type:"button",class:"btn-close btn-close-white me-2 m-auto","aria-label":"Close",onClick:r=>Ne(e).remove(o.id)},null,8,Yte)])],2))),128))]))}},U_=pa("chat",()=>{const t=ve(null),e=ve([]),s=ve(0),n=ve("history"),i=ve("Open"),o=async(v="Open")=>{try{const g=await axios.get(`/api/chat/sessions?status=${v}`);return e.value=g.data.data||g.data||[],e.value}catch(g){return console.error("Erro ao carregar sessões:",g),e.value=[],[]}},r=async()=>{try{const v=await axios.get("/api/chat/unread-count");return s.value=v.data.unread_count||0,s.value}catch(v){return console.error("Erro ao carregar contagem não lida:",v),s.value=0,0}},c=async v=>{try{const g=await axios.get(`/api/chat/sessions/${v}`);return t.value=g.data,n.value="chat",t.value}catch(g){return console.error("Erro ao abrir sessão:",g),t.value=null,null}};return{currentSession:t,sessions:e,unreadCount:s,lastView:n,lastHistoryTab:i,loadSessions:o,loadUnreadCount:r,openSession:c,sendMessage:async(v,g,y="user")=>{if(!g.trim())return!1;try{const x=await axios.post(`/api/chat/sessions/${v}/message`,{message:g,sender_type:y});return await c(v),x.data}catch(x){throw console.error("Erro ao enviar mensagem:",x),x}},createSession:async(v="")=>{try{const g=await axios.post("/api/chat/sessions",{subject:v.substring(0,50)});return t.value=g.data,n.value="chat",t.value}catch(g){throw console.error("Erro ao criar sessão:",g),g}}}}),Gte={key:0,class:"unread-badge"},Xte={__name:"FloatingChatButton",setup(t){const e=U_(),s=tn(),n=vi(),i=ve(0);let o=!1;const r=Ae(()=>{var x;return((x=s.user)==null?void 0:x.role)!=="Admin"}),c=Ae(()=>s.hasModule("pro_support")),h=async()=>
50{if(!r.value||!s.isAuthenticated||!c.value){i.value=0;return}try{const x=await ct.get("/api/chat/unread-count");i.value=x.data.unread_count||0}catch{i.value=0}},f=()=>{var x;typeof window.$openChat=="function"&&window.$openChat({view:e.lastView,tab:e.lastHistoryTab,sessionId:((x=e.currentSession)==null?void 0:x.id)||null})},v=x=>{n.show("Suporte Kativo: "+x,"primary")},g=()=>{if(!r.value||!s.isAuthenticated||!c.value||o)return;"Notification"in window&&Notification.permission!=="granted"&&Notification.permission!=="denied"&&Notification.requestPermission();const x=`App.Models.User.${s.user.id}`;window.Echo.private(x).listen(".chat.message.sent",E=>{var C;const P=E.message,I=document.querySelector(".offcanvas.show, .offcanvas.showing")!==null,D=e.lastView==="chat"&&((C=e.currentSession)==null?void 0:C.id)==P.chat_session_id,F=!document.hidden;if(I&&D&&window.dispatchEvent(new CustomEvent("chat-message-received",{detail:P})),I&&D&&F)document.hasFocus()&&P.sender_type==="admin"&&ct.post(`/api/chat/sessions/${P.chat_session_id}/read-messages`).catch(()=>{});else if(h(),P.sender_type==="admin"){const A=(P.message||"").replace(/<[^>]*>/g,"").substring(0,50)+"...";v(A)}}).listen(".chat.messages.read",E=>{window.dispatchEvent(new CustomEvent("chat-messages-read",{detail:E.session_id}))}),o=!0},y=()=>{s.user&&window.Echo&&window.Echo.leave(`App.Models.User.${s.user.id}`),o=!1};return Xt(()=>{s.isAuthenticated&&r.value&&c.value&&(h(),g())}),Ni(()=>{y()}),Pt(()=>s.isAuthenticated,x=>{x&&r.value&&c.value?(h(),g()):(y(),i.value=0)}),Pt(()=>{var x;return(x=s.user)==null?void 0:x.role},x=>{x!=="Admin"&&s.isAuthenticated&&c.value?(h(),g()):(y(),i.value=0)}),Pt(c,x=>{x&&s.isAuthenticated&&r.value?(h(),g()):(y(),i.value=0)}),window.updateFloatingUnreadCount=x=>{i.value=x},window.loadFloatingUnreadCount=h,(x,E)=>r.value?($(),L("div",{key:0,class:"floating-chat-button",onClick:f},[E[0]||(E[0]=l("i",{class:"bi bi-chat-dots-fill"},null,-1)),i.value>0?($(),L("span",Gte,pe(i.value),1)):xe("",!0)])):xe("",!0)}},wD=ls(Xte,[["__scopeId","data-v-d762fee9"]]),Kte={style:{display:"none"}},Jte={__name:"NotificationListener",setup(t){const e=tn(),s=O_(),n=o=>{const r="=".repeat((4-o.length%4)%4),c=(o+r).replace(/\-/g,"+").replace(/_/g,"/"),h=window.atob(c),f=new Uint8Array(h.length);for(let v=0;v<h.length;++v)f[v]=h.charCodeAt(v);return f},i=async()=>{try{if(!("serviceWorker"in navigator)||!("PushManager"in window)||await Notification.requestPermission()!=="granted")return;const r=await navigator.serviceWorker.ready,h=(await ct.get("/api/webpush/vapid-public-key")).data.key,f=await r.pushManager.subscribe({userVisibleOnly:!0,applicationServerKey:n(h)});await ct.post("/api/webpush/subscribe",f.toJSON())}catch(o){console.error("Erro ao assinar Web Push:",o)}};return Pt(()=>{var o;return(o=e.user)==null?void 0:o.id},async o=>{o?(s.fetchNotifications(),s.listenForRealtime(),await i()):s.stopListening()},{immediate:!0}),(o,r)=>($(),L("div",Kte))}},Qte={key:0,id:"loading-full"},Zte={__name:"AppLayout",setup(t){const e=In(),s=tn(),n=Ae(()=>{var i;return((i=s.user)==null?void 0:i.role)==="Admin"});return(i,o)=>($(),L("div",{class:Me(["app-container",Ne(e).darkMode?"dark":"light"])},[($(),Ut(Du(n.value?wte:cH))),et(ja,{name:"fade-loading"},{default:vt(()=>[Ne(e).isLoading?($(),L("div",Qte)):xe("",!0)]),_:1}),l("div",{class:Me(["d-flex",{toggled:Ne(e).sidebarCollapsed}]),id:"wrapper"},[($(),Ut(Du(n.value?Ote:nte),{class:Me({collapsed:Ne(e).sidebarCollapsed})},null,8,["class"])),l("div",{id:"content",class:Me({"admin-content":n.value})},[Ft(i.$slots,"default",{},void 0,!0)],2)],2),et(Mte),et(jte),n.value?xe("",!0):($(),Ut(Ite,{key:0})),et(qte),n.value?xe("",!0):($(),Ut(wD,{key:1})),et(Jte)],2))}},ese=ls(Zte,[["__scopeId","data-v-b15e1875"]]),tse={__name:"App",setup(t){const e=Af(),s=gi(),n=tn(),i=pi(),o=Ae(()=>e.meta.hideLayout);return Pt(()=>n.isAuthenticated,async r=>{if(r&&!o.value)try{console.log("ð App: Usuário autenticado, garantindo portfolio..."),await i.ensureActivePortfolio()}catch(c){console.error("Erro ao inicializar portfolio:",c)}},{immediate:!0}),Xt(async()=>
50{if(n.user||await n.getUser(),n.isAuthenticated&&(await i.ensureActivePortfolio(),e.query.new_register==="1")){typeof window<"u"&&window.fbq&&(window.fbq("track","CompleteRegistration"),window.fbq("track","Lead"));const r={...e.query};delete r.new_register,s.replace({query:r})}}),(r,c)=>o.value?($(),Ut(Ne(r1),{key:1})):($(),Ut(ese,{key:0},{default:vt(()=>[et(Ne(r1))]),_:1}))}},sse={class:"month-nav frame rounded d-flex align-items-center"},nse=["disabled"],ise={class:"flex-grow-1 text-center position-relative"},rse=["disabled"],ase=["disabled"],ose={class:"dropdown ms-3"},lse=["disabled"],use={class:"dropdown-menu dropdown-menu-end p-3",style:{"min-width":"320px"}},cse={class:"dropdown-datepicker"},dse={__name:"MonthNavigator",props:{context:{type:String,default:"global"}},emits:["date-change"],setup(t,{emit:e}){In();const s=e,n=ve(new Date),i=ve(new Date),o=ve(!1),r=ve(!1),c=ve(null),h=ve(!1);let f=null;const v=t,g=Ae(()=>{const O=new Date(n.value);if(h.value){const j=O.getDate(),te=O.toLocaleDateString("pt-BR",{month:"long"}),B=O.getFullYear();return`${j} de ${te} de ${B}`}return O.toLocaleDateString("pt-BR",{month:"long",year:"numeric"})}),y=(O,j=!1)=>{h.value=j;let te=new Date(O);j||(te=new Date(O.getFullYear(),O.getMonth()+1,0));const B=v.context==="global"?"":`_${v.context}`;localStorage.setItem(`mn_selected_date${B}`,te.toISOString()),localStorage.setItem(`mn_is_specific_date${B}`,j.toString()),n.value=te,i.value=te,s("date-change",{date:te.toISOString(),formatted:g.value,timestamp:te.getTime(),is_specific:j})},x=()=>{const O=v.context==="global"?"":`_${v.context}`,j=localStorage.getItem(`mn_selected_date${O}`),te=localStorage.getItem(`mn_is_specific_date${O}`),B=localStorage.getItem(`mn_last_access_date${O}`),z=new Date,re=z.getFullYear(),ne=String(z.getMonth()+1).padStart(2,"0"),X=String(z.getDate()).padStart(2,"0"),G=`${re}-${ne}-${X}`;if(B!==G)localStorage.setItem(`mn_last_access_date${O}`,G),y(z,!1);else if(j){const ce=new Date(j);n.value=ce,i.value=ce,h.value=te==="true"}else localStorage.setItem(`mn_last_access_date${O}`,G),y(z,!1)},E=()=>{const O=new Date(n.value),j=new Date(O.getFullYear(),O.getMonth()-1,1);y(j,!1)},P=()=>{const O=new Date(n.value),j=new Date(O.getFullYear(),O.getMonth()+1,1);y(j,!1)},I=()=>y(new Date,!1),D=O=>{y(O,!0),f&&f.hide()},F=()=>{o.value=!o.value},C=O=>{O.target.closest(".position-relative")||(o.value=!1)},A=()=>{c.value&&(f=new yr(c.value))};return Xt(()=>{x(),document.addEventListener("click",C),vs(()=>A())}),Ni(()=>{document.removeEventListener("click",C)}),(O,j)=>{const te=ur("VueDatePicker");return $(),L("nav",sse,[l("button",{class:"btn-icon",onClick:E,disabled:r.value},[...j[1]||(j[1]=[l("i",{class:"bi bi-chevron-compact-left"},null,-1)])],8,nse),l("div",ise,[j[2]||(j[2]=l("i",{class:"bi bi-calendar-check me-2"},null,-1)),l("span",{class:"current-date-text",onClick:F},pe(g.value),1)]),l("button",{class:"btn-icon me-3",onClick:P,disabled:r.value},[...j[3]||(j[3]=[l("i",{class:"bi bi-chevron-compact-right"},null,-1)])],8,rse),l("button",{class:"btn-icon ms-auto",onClick:I,disabled:r.value},[...j[4]||(j[4]=[l("i",{class:"bi bi-house"},null,-1)])],8,ase),l("div",ose,[l("button",{class:"btn-icon","data-bs-toggle":"dropdown",disabled:r.value,ref_key:"dropdownButton",ref:c},[...j[5]||(j[5]=[l("i",{class:"bi bi-funnel"},null,-1)])],8,lse),l("ul",use,[l("li",null,[l("div",cse,[j[6]||(j[6]=l("small",{class:"text-muted mb-2 d-block"},"Selecionar data especÃfica:",-1)),et(te,{modelValue:i.value,"onUpdate:modelValue":[j[0]||(j[0]=B=>i.value=B),D],"enable-time-picker":!1,format:"yyyy-MM-dd","auto-apply":"",inline:""},null,8,["modelValue"])])])])])])}}},ED=ls(dse,[["__scopeId","data-v-e73a9229"]]),hse={class:"edit-price-modal"},fse={class:"method-tabs nav nav-pills mb-4"},pse={class:"nav-item"},mse={key:0,class:"nav-item"},gse={key:1,class:"nav-item"},vse={class:"mb-3"},bse={class:"current-price"},yse={class:"mb-3"},_se={class:"mb-3"},xse={class:"input-group input-group-floating"},wse={class:"form-floating flex-fill position-relative"},Ese={class:"modal-actions"},Sse=["disabled"],kse=["disabled"],Cse={key:0},Tse={key:1},Ase={key:0,class:"manual-prices-list mt-4"},Ose={class:"list-header"},Dse={class:"text-muted"},Pse={class:"list-items"},$se={class:"price-info"},Ise={class:"price-value"},Mse={class:"price-date text-muted"},Nse=["onClick","disabled"],Lse=["disabled"],Rse={key:0},Fse={key:1},Vse={key:0,class:"alert alert-warning mb-3"},Bse={key:1,class:"alert alert-info mb-3"},Use={key:0,class:"mb-4"},jse={class:"form-check form-check-inline"},Hse={class:"form-check form-check-inline"},Wse={key:1,class:"mb-3"},zse=["value"],Yse={class:"mb-3 position-relative",style:{"z-index":"1050"}},qse={class:"form-label"},Gse={class:"dropdown"},Xse={class:"dropdown-menu w-100 shadow-sm"},Kse=["onClick"],Jse={key:2,class:"mb-4 position-relative",style:{"z-index":"1"}},Qse={class:"modal-actions mt-4 border-top pt-3"},Zse=["disabled"],ene=["disabled"],tne={key:0},sne={key:1},nne={key:0,class:"text-center text-muted py-4"},ine={key:1,class:"text-center py-5 text-muted"},rne={key:2,class:"events-list"},ane={class:"d-flex justify-content-between align-items-center"},one={class:"fw-bold text-dark"},lne={class:"text-primary small fw-semibold"},une={class:"text-muted small mt-1"},cne={class:"d-flex align-items-center"},dne={key:0,class:"spinner-border spinner-border-sm text-muted me-2",role:"status"},hne={class:"form-check form-switch fs-4 mb-0"},fne=["checked","onChange","disabled"],pne={__name:"EditPriceModal",props:{asset:{type:Object,required:!0}},emits:["saved","close"],setup(t,{emit:e}){const s=t,n=e,i=vi(),o=ve("price"),r=new Date,c=ve({price:s.asset.current_price||0,date:r.toLocaleDateString("pt-BR")}),h=ve(!1),f=ve([]),v=ve(!1),g=ve(0),y=ve(!1),x=ve(3),E=ve(!1),P=ve(null),I=Ae(()=>c.value.price>0&&c.value.date),D=Ae(()=>{var Te,Q,Se;const Be=(Se=(Q=(Te=s.asset)==null?void 0:Te.category)==null?void 0:Q.slug)==null?void 0:Se.toLowerCase();return Be==="options"||Be==="opcoes"});Pt(D,Be=>{Be&&(o.value==="merge"||o.value==="events")&&(o.value="price")},{immediate:!0});const F=ve([]),C=ve(null),A=ve(""),O=ve(null),j=ve(null),te=ve(!1),B=ve(null),z=ve("new_asset"),re=Ae(()=>s.asset.user_id!==null&&s.asset.user_id!==void 0&&s.asset.portfolio_id!==null&&s.asset.portfolio_id!==void 0);Pt(re,Be=>{Be||(z.value="new_asset")},{immediate:!0});const ne=Ae(()=>C.value?z.value==="category_only"?!0:O.value?O.value!==s.asset.id:A.value.length>=3:!1),X=ve([]),G=ve(!1),ce=ve(null),be=Be=>new Intl.NumberFormat("pt-BR",{style:"currency",currency:"BRL"}).format(Be||0),J=Be=>{if(!Be)return null;const[Te,Q,Se]=Be.split("/");return`${Se}-${Q}-${Te}`},Z=Be=>{if(!Be)return"-";
50const Te=String(Be).split("T")[0],[Q,Se,Ve]=Te.split("-");return`${Ve}/${Se}/${Q}`},ge=Be=>({split:"Desdobramento",reverse_split:"Grupamento",bonus:"Bonificação"})[Be]||Be;function q(Be){return{acoes:"bi-graph-up",fiis:"bi-building",etfs:"bi-collection",bdrs:"bi-globe",options:"bi-diagram-3",tesouro:"bi-safe",cdb:"bi-bank",criptomoedas:"bi-currency-bitcoin","renda-fixa":"bi-cash-stack",outros:"bi-card-text"}[Be]||"bi-coin"}const W=async(Be=3)=>{try{const Te=await ct.get(`/api/assets/${s.asset.id}/manual-prices`,{params:{limit:Be}});Te.data.success&&(f.value=Te.data.data.prices,g.value=Te.data.data.total_count,y.value=Te.data.data.has_more,v.value=!0)}catch(Te){console.error("Erro ao carregar cotações manuais:",Te)}},M=async()=>{E.value=!0,x.value+=5,await W(x.value),E.value=!1},he=async()=>{var Be,Te;if(I.value){h.value=!0;try{const Q=J(c.value.date);(await ct.post(`/api/assets/${s.asset.id}/manual-price`,{price:c.value.price,date:Q})).data.success&&(i.show("Cotação manual salva com sucesso!","success"),n("saved",c.value.price),await W(x.value),window.dispatchEvent(new CustomEvent("asset-data-updated",{detail:{assetId:s.asset.id,assetCode:s.asset.code,newPrice:c.value.price,manualUpdate:!0}})))}catch(Q){i.show(((Te=(Be=Q.response)==null?void 0:Be.data)==null?void 0:Te.message)||"Erro ao salvar cotação","danger")}finally{h.value=!1}}},oe=async Be=>{if(confirm(`Remover cotação de ${Be.date}?`)){P.value=Be.id;try{(await ct.delete(`/api/manual-prices/${Be.id}`)).data.success&&(i.show("Cotação removida com sucesso!","success"),await W(x.value),window.dispatchEvent(new CustomEvent("asset-data-updated",{detail:{assetId:s.asset.id,assetCode:s.asset.code,manualUpdate:!0}})))}catch{i.show("Erro ao remover cotação","error")}finally{P.value=null}}},K=async()=>{try{const Be=await ct.get("/api/asset-categories");F.value=Be.data.data}catch(Be){console.error(Be)}},H=()=>{j.value=null,O.value=null,A.value=""},Ee=Be=>{A.value=Be?Be.toUpperCase().trim():""},_e=Be=>{if(!Be||!Be.id&&!A.value){H();return}j.value=Be,O.value=Be.id||null,A.value=Be.code},Ce=async()=>{var Be,Te;if(ne.value){te.value=!0;try{const Q={from_asset_id:s.asset.id,to_category_slug:C.value?C.value.slug:null,only_category:z.value==="category_only"};z.value==="new_asset"&&(Q.to_asset_id=O.value,Q.to_asset_code=O.value?null:A.value),(await ct.post("/api/assets/merge",Q)).data.success&&(i.show(z.value==="category_only"?"Categoria atualizada com sucesso!":"Ativos mesclados com sucesso!","success"),n("saved"),n("close"),window.dispatchEvent(new CustomEvent("portfolio-updated")))}catch(Q){console.error(Q),i.show(((Te=(Be=Q.response)==null?void 0:Be.data)==null?void 0:Te.message)||"Erro ao processar requisição","error")}finally{te.value=!1}}},Re=async()=>{if(!D.value){G.value=!0;try{const Be=await ct.get(`/api/assets/${s.asset.id}/corporate-events`);Be.data.success&&(X.value=Be.data.data)}catch(Be){console.error("Erro ao carregar eventos:",Be)}finally{G.value=!1}}},Ke=async(Be,Te)=>{var Q,Se;ce.value=Be.id;try{(await ct.post(`/api/assets/${s.asset.id}/corporate-events/toggle`,{event_id:Be.id,status:Te})).data.success&&(Be.is_applied=Te,i.show(Te?"Evento aplicado!":"Evento desfeito.","success"),n("saved"),window.dispatchEvent(new CustomEvent("portfolio-updated")),window.dispatchEvent(new CustomEvent("asset-data-updated",{detail:{assetId:s.asset.id,assetCode:s.asset.code}})))}catch(Ve){console.error(Ve),Be.is_applied=!Te,i.show(((Se=(Q=Ve.response)==null?void 0:Q.data)==null?void 0:Se.message)||"Erro ao processar evento.","error")}finally{ce.value=null}};return Xt(()=>{setTimeout(()=>{var Be;(Be=document.getElementById("newPrice"))==null||Be.focus()},100),W(),D.value||(K(),Re())}),(Be,Te)=>($(),L("div",hse,[l("nav",fse,[l("li",pse,[l("button",{class:Me(["nav-link",{active:o.value==="price"}]),onClick:Te[0]||(Te[0]=St(Q=>o.value="price",["prevent"]))},[...Te[9]||(Te[9]=[l("i",{class:"bi bi-currency-dollar"},null,-1),Pe(" Cotação ",-1)])],2)]),D.value?xe("",!0):($(),L("li",mse,[l("button",{class:Me(["nav-link",{active:o.value==="merge"}]),onClick:Te[1]||(Te[1]=St(Q=>o.value="merge",["prevent"]))},[...Te[10]||(Te[10]=[l("i",{class:"bi bi-sign-merge-right"},null,-1),Pe(" Mesclar ativos ",-1)])],2)])),D.value?xe("",!0):($(),L("li",gse,[l("button",{class:Me(["nav-link",{active:o.value==="events"}]),onClick:Te[2]||(Te[2]=St(Q=>o.value="events",["prevent"]))},[...Te[11]||(Te[11]=[l("i",{class:"bi bi-calendar2-event"},null,-1),Pe(" Eventos ",-1)])],2)]))]),o.value==="price"?($(),L(Ze,{key:0},[l("form",{onSubmit:St(he,["prevent"])},[l("div",vse,[Te[12]||(Te[12]=l("label",{class:"form-label"},"Cotação atual",-1)),l("div",bse,pe(be(t.asset.current_price||0)),1)]),l("div",yse,[Te[13]||(Te[13]=l("label",{for:"newPrice",class:"form-label"},[Pe(" Minha cotação "),l("span",{class:"text-danger"},"*")],-1)),et(Ms,{id:"newPrice",modelValue:c.value.price,"onUpdate:modelValue":Te[3]||(Te[3]=Q=>c.value.price=Q),placeholder:"Digite a nova cotação",disabled:h.value,required:""},null,8,["modelValue","disabled"])]),l("div",_se,[l("div",xse,[Te[14]||(Te[14]=l("span",{class:"input-group-text"},[l("i",{class:"bi bi-calendar"})],-1)),l("div",wse,[et(mr,{id:"priceDate",modelValue:c.value.date,"onUpdate:modelValue":Te[4]||(Te[4]=Q=>c.value.date=Q),placeholder:"Selecione a data",disabled:h.value},null,8,["modelValue","disabled"])])])]),l("div",Ese,[l("button",{type:"button",class:"btn btn-outline-secondary",onClick:Te[5]||
50(Te[5]=Q=>Be.$emit("close")),disabled:h.value}," Cancelar ",8,Sse),l("button",{type:"submit",class:"btn btn-primary",disabled:h.value||!I.value},[h.value?($(),L("span",Cse,[...Te[15]||(Te[15]=[l("span",{class:"spinner-border spinner-border-sm me-2"},null,-1),Pe(" Salvando... ",-1)])])):($(),L("span",Tse,[...Te[16]||(Te[16]=[l("i",{class:"bi bi-check-lg me-1"},null,-1),Pe(" Salvar cotação ",-1)])]))],8,kse)])],32),f.value.length>0?($(),L("div",Ase,[l("div",Ose,[Te[17]||(Te[17]=l("h6",{class:"mb-0"},"Cotações manuais recentes",-1)),l("small",Dse,pe(g.value)+" registros",1)]),l("div",Pse,[($(!0),L(Ze,null,At(f.value,Q=>($(),L("div",{key:Q.id,class:"price-item"},[l("div",$se,[l("strong",Ise,pe(be(Q.price)),1),l("small",Mse,pe(Q.date),1)]),l("button",{type:"button",class:"btn-delete",onClick:Se=>oe(Q),disabled:P.value===Q.id,title:"Remover cotação"},[l("i",{class:Me(["bi",P.value===Q.id?"bi-hourglass-split":"bi-trash"])},null,2)],8,Nse)]))),128))]),y.value?($(),L("button",{key:0,type:"button",class:"btn btn-sm btn-outline-primary w-100 mt-2",onClick:M,disabled:E.value},[E.value?($(),L("span",Rse,[...Te[18]||(Te[18]=[l("span",{class:"spinner-border spinner-border-sm me-1"},null,-1),Pe(" Carregando... ",-1)])])):($(),L("span",Fse,[...Te[19]||(Te[19]=[l("i",{class:"bi bi-chevron-down me-1"},null,-1),Pe(" Exibir mais ",-1)])]))],8,Lse)):xe("",!0)])):xe("",!0)],64)):xe("",!0),o.value==="merge"&&!D.value?($(),L(Ze,{key:1},[z.value==="new_asset"?($(),L("div",Vse,[...Te[20]||(Te[20]=[l("i",{class:"bi bi-info-circle me-2"},null,-1),Pe(),l("strong",null,"Atenção!",-1),Pe(" Essa ação não pode ser desfeita. ",-1)])])):($(),L("div",Bse,[...Te[21]||(Te[21]=[l("i",{class:"bi bi-info-circle me-2"},null,-1),Pe(" Você está alterando apenas a categoria deste ativo. ",-1)])])),l("form",{onSubmit:St(Ce,["prevent"])},[re.value?($(),L("div",Use,[Te[24]||(Te[24]=l("label",{class:"form-label d-block fw-semibold mb-2"},"O que deseja fazer?",-1)),l("div",jse,[_t(l("input",{class:"form-check-input",type:"radio",id:"mergeTypeNew",value:"new_asset","onUpdate:modelValue":Te[6]||(Te[6]=Q=>z.value=Q)},null,512),[[Xh,z.value]]),Te[22]||(Te[22]=l("label",{class:"form-check-label",for:"mergeTypeNew"},"Novo ativo",-1))]),l("div",Hse,[_t(l("input",{class:"form-check-input",type:"radio",id:"mergeTypeCategory",value:"category_only","onUpdate:modelValue":Te[7]||(Te[7]=Q=>z.value=Q)},null,512),[[Xh,z.value]]),Te[23]||(Te[23]=l("label",{class:"form-check-label",for:"mergeTypeCategory"},"Apenas categoria",-1))])])):xe("",!0),z.value==="new_asset"?($(),L("div",Wse,[Te[25]||(Te[25]=l("label",{class:"form-label text-muted"},"De (ativo atual)",-1)),l("input",{type:"text",class:"form-control bg-light",value:t.asset.code+(t.asset.name&&t.asset.name!==t.asset.code?" - "+t.asset.name:""),disabled:""},null,8,zse),Te[26]||(Te[26]=l("small",{class:"text-muted d-block mt-1"},"Todo o histórico deste ativo será transferido.",-1))])):xe("",!0),l("div",Yse,[l("label",qse,[Pe(pe(z.value==="category_only"?"Nova Categoria":"Para (novo ativo)")+" ",1),Te[27]||(Te[27]=l("span",{class:"text-danger"},"*",-1))]),l("div",Gse,[l("button",{class:"btn btn-outline-secondary dropdown-toggle w-100 text-start d-flex align-items-center justify-content-between",type:"button","data-bs-toggle":"dropdown",style:zs(C.value?{borderColor:C.value.color,color:C.value.color,fontWeight:"600",height:"58px"}:{height:"58px"})},[l("div",null,[C.value?($(),L("i",{key:0,class:Me([q(C.value.slug),"me-2"])},null,2)):xe("",!0),Pe(" "+pe(C.value?C.value.name:"Selecione a categoria"),1)])],4),l("ul",Xse,[($(!0),L(Ze,null,At(F.value,Q=>($(),L("li",{key:Q.id},[l("a",{class:"dropdown-item",href:"#",onClick:St(Se=>{C.value=Q,H()},["prevent"])},[l("i",{class:Me([q(Q.slug),"me-2"]),style:zs({color:Q.color})},null,6),l("span",{style:zs({color:Q.color})},pe(Q.name),5)],8,Kse)]))),128))])])]),z.value==="new_asset"?($(),L("div",Jse,[et(P_,{ref_key:"assetSearchRef",ref:B,label:"Buscar ou Digitar Novo Ativo *",onAssetSelected:_e,onSearchChange:Ee,"selected-category":C.value},null,8,["selected-category"])])):xe("",!0),l("div",Qse,[l("button",{type:"button",class:"btn btn-outline-secondary",onClick:Te[8]||(Te[8]=Q=>Be.$emit("close")),disabled:te.value}
50," Cancelar ",8,Zse),l("button",{type:"submit",class:"btn btn-primary",disabled:te.value||!ne.value},[te.value?($(),L("span",tne,[Te[28]||(Te[28]=l("span",{class:"spinner-border spinner-border-sm me-2"},null,-1)),Pe(" "+pe(z.value==="category_only"?"Atualizando...":"Mesclando..."),1)])):($(),L("span",sne,[Te[29]||(Te[29]=l("i",{class:"bi bi-check-lg me-1"},null,-1)),Pe(" "+pe(z.value==="category_only"?"Atualizar categoria":"Confirmar mesclagem"),1)]))],8,ene)])],32)],64)):xe("",!0),o.value==="events"&&!D.value?($(),L(Ze,{key:2},[G.value?($(),L("div",nne,[...Te[30]||(Te[30]=[l("div",{class:"spinner-border",role:"status"},null,-1)])])):X.value.length===0?($(),L("div",ine,[...Te[31]||(Te[31]=[l("i",{class:"bi bi-calendar-x fs-1 d-block mb-2 text-secondary"},null,-1),l("p",{class:"mb-0 fw-medium"},"Não há eventos para esse ativo.",-1),l("small",null,"Ou os eventos ocorreram antes da sua primeira compra.",-1)])])):($(),L("div",rne,[($(!0),L(Ze,null,At(X.value,Q=>($(),L("div",{key:Q.id,class:"event-item p-3 mb-2 border rounded bg-light"},[l("div",ane,[l("div",null,[l("div",one,pe(ge(Q.type)),1),l("div",lne,pe(Q.label||"Fator: "+Q.factor),1),l("div",une,[Te[32]||(Te[32]=Pe(" Data Com: ",-1)),l("strong",null,pe(Z(Q.date_prior)),1)])]),l("div",cne,[ce.value===Q.id?($(),L("div",dne)):xe("",!0),l("div",hne,[l("input",{class:"form-check-input",type:"checkbox",role:"switch",checked:Q.is_applied,onChange:Se=>Ke(Q,Se.target.checked),disabled:ce.value===Q.id},null,40,fne)])])])]))),128))]))],64)):xe("",!0)]))}},mne=ls(pne,[["__scopeId","data-v-d3af39e2"]]),gne=["src","alt"],vne=["title"],bne={key:2,class:"asset-loading-spinner"},yne={class:"asset-info"},_ne={key:0},xne={class:"asset-code-line"},wne=["title"],Ene={key:0,class:"asset-price-line"},Sne={key:1},kne={__name:"AssetLogo",props:{assetId:{type:[Number,String],required:!0},asset:{type:Object,default:null},showPrice:{type:Boolean,default:!0},showVariation:{type:Boolean,default:!0},clickable:{type:Boolean,default:!1},autoUpdate:{type:Boolean,default:!0},showEditIcon:{type:Boolean,default:!0},size:{type:String,default:"md"},preloadData:{type:Boolean,default:!1}},emits:["click","update:start","update:complete","update:error","price-updated","loaded"],setup(t,{expose:e,emit:s}){dO(q=>({v41fac460:g.value.width,v30fbbb46:g.value.height,v59f4bca6:g.value.fontSize}));const n=t,i=s,o=ve({id:null,code:"",name:"",logo_url:"",current_price:0,price_change_percent:0,price_source:"global",last_price_update:null,category:null}),r=ve(!1),c=ve(!1),h=ve(!1),f=ve(!1),v=ve(null),g=Ae(()=>{const q={xs:{width:"24px",height:"24px",fontSize:"0.6rem"},sm:{width:"32px",height:"32px",fontSize:"0.75rem"},md:{width:"48px",height:"48px",fontSize:"1.2rem"},lg:{width:"64px",height:"64px",fontSize:"1.5rem"},xl:{width:"80px",height:"80px",fontSize:"1.75rem"}};return q[n.size]||q.md}),y=Ae(()=>{var W,M;const q=(M=(W=o.value.category)==null?void 0:W.slug)==null?void 0:M.toLowerCase();return["renda-fixa","tesouro","tesouro-direto","cdb","lci-lca","lci","lca","cri","cra"].includes(q)}),x=Ae(()=>{var W,M;const q=(M=(W=o.value.category)==null?void 0:W.slug)==null?void 0:M.toLowerCase();if(["tesouro","tesouro-direto"].includes(q)){let he=o.value.name||o.value.code||"";if(he.toLowerCase().includes("tesouro-")){const oe=he.split("-");if(oe.length>1){oe.pop();let K=oe.join(" ");return K=K.replace(/\b\w/g,H=>H.toUpperCase()),K=K.replace("Ipca ","IPCA+ ").replace("Educa ","Educa+ ").replace("Renda ","Renda+ ").replace("Igpm ","IGPM+ "),K}}return he}return y.value&&o.value.name?o.value.name:o.value.code}),E=Ae(()=>o.value.name||o.value.code),P=Ae(()=>{var q;return((q=o.value)==null?void 0:q.price_source)==="manual"}),I=Ae(()=>{var W;return!(!((W=o.value)!=null&&W.logo_url)||String(o.value.logo_url).toLowerCase().includes("brapi.svg"))}),D=Ae(()=>{var W;const q=(W=o.value.category)==null?void 0:W.slug;return["tesouro","tesouro-direto"].includes(q)?"bi-safe":["renda-fixa","cdb","lci-lca","lci","lca","cri","cra"].includes(q)?"bi-cash-stack":["criptomoedas"].includes(q)?"bi-currency-bitcoin":["outros"].includes(q)?"bi-card-text":null}),F=Ae(()=>{const W=(o.value.code||"").replace(/[^A-Za-z]/g,"");return W.length<=3?W.toUpperCase():W.substring(0,2).toUpperCase()}),C=Ae(()=>{var q;return((q=o.value.category)==null?void 0:q.color)||"#3498db"}),A=Ae(()=>{if(P.value)return"text-muted";const q=o.value.price_change_percent||0;return q>0?"text-positive":q<0?"text-negative":"text-muted"}),O=Ae(()=>!n.showVariation||P.value||y.value?!1:o.value.current_price>0&&te.value!=="NaN"),j=Ae(()=>{if(P.value||y.value)return"";const q=o.value.price_change_percent||0;return q>0?"bi-arrow-up":q<0?"bi-arrow-down":"bi-dash"}),te=Ae(()=>P.value||y.value?"0.00":Math.abs(o.value.price_change_percent||0).toFixed(2)),B=Ae(()=>!(!n.showEditIcon||y.value)),z=async(q=!1)=>
50{if(n.assetId&&!(h.value&&!q)){h.value=!0;try{const W=await ct.get(`/api/assets/${n.assetId}/basic`,{params:{t:q?Date.now():void 0}});if(W.data.success){const M=W.data.data;o.value={...o.value,...M},r.value=!1,i("loaded",o.value),n.autoUpdate&&!y.value&&re()}}catch(W){console.error(`Erro ao buscar dados do ativo ${n.assetId}:`,W),n.asset&&!o.value.id&&(o.value={...n.asset})}finally{h.value=!1}}},re=async()=>{var q,W;if(!y.value&&!(c.value||!((q=o.value)!=null&&q.id))){c.value=!0,i("update:start",o.value);try{const M=await ct.post("/api/assets/update-quotes",{asset_id:o.value.id});if(M.data.success){const he=M.data.asset;he&&(o.value.current_price=he.current_price??o.value.current_price,o.value.price_change_percent=he.price_change_percent??o.value.price_change_percent,o.value.last_price_update=he.last_price_update??new Date().toISOString(),o.value.price_source=he.price_source??o.value.price_source,he.logo_url&&!he.logo_url.includes("brapi.svg")&&(o.value.logo_url=he.logo_url,r.value=!1),i("update:complete",{original:o.value,updated:he}),window.dispatchEvent(new CustomEvent("asset-price-updated",{detail:{assetId:o.value.id,assetCode:o.value.code,newPrice:Number(o.value.current_price),priceChangePercent:Number(o.value.price_change_percent),assetName:o.value.name,category:(W=o.value.category)==null?void 0:W.name,timestamp:new Date().toISOString(),fullData:he}})))}}catch(M){console.error(`Erro update ${o.value.code}:`,M),i("update:error",M)}finally{c.value=!1}}};function ne(q){var W;y.value||q.detail&&(q.detail.assetId==o.value.id||q.detail.assetId==n.assetId)&&(o.value.current_price=q.detail.newPrice,o.value.price_change_percent=q.detail.priceChangePercent,q.detail.timestamp&&(o.value.last_price_update=q.detail.timestamp),(W=q.detail.fullData)!=null&&W.logo_url&&(o.value.logo_url=q.detail.fullData.logo_url))}Pt(()=>n.assetId,(q,W)=>{if(q&&q!==W){r.value=!1,(!n.asset||n.asset.id!==q)&&(o.value={id:q,code:"",name:"",logo_url:"",current_price:0,price_change_percent:0,price_source:"global",last_price_update:null,category:null});const M=!o.value.price_change_percent;(!o.value.category||M)&&z()}},{immediate:!0}),Pt(()=>n.asset,q=>{q&&q.id&&(o.value={...o.value,...q,logo_url:q.logo_url&&!q.logo_url.includes("brapi.svg")?q.logo_url:o.value.logo_url})},{deep:!0,immediate:!0}),Xt(()=>{var W;const q=!o.value.price_change_percent;n.assetId&&(!((W=n.asset)!=null&&W.category)||q)&&z(),n.autoUpdate&&!y.value&&(v.value=setInterval(()=>{re()},3e5)),window.addEventListener("asset-price-updated",ne)}),Wu(()=>{v.value&&(clearInterval(v.value),v.value=null),window.removeEventListener("asset-price-updated",ne)});const X=()=>{o.value.id&&!y.value&&(f.value=!0)},G=q=>{o.value.id&&!y.value&&(o.value.current_price=q,o.value.price_source="manual",f.value=!1,i("price-updated",{assetId:o.value.id,newPrice:q}),window.dispatchEvent(new CustomEvent("asset-price-updated",{detail:{assetId:o.value.id,newPrice:Number(q),priceChangePercent:o.value.price_change_percent,timestamp:new Date().toISOString()}})))},ce=q=>{if(!q)return"";const W=String(q).trim();return W.startsWith("http")||W.startsWith("/storage")?W:W.startsWith("assets/logos")?"/storage/"+W:W.includes("/")?"/storage/"+W.replace(/^\//,""):"/storage/assets/logos/"+W};function be(){r.value=!0}function J(){}function Z(q){const W=Number(q);if(isNaN(W))return"R$ --";const M=W>0&&W<1;return new Intl.NumberFormat("pt-BR",{style:"currency",currency:"BRL",minimumFractionDigits:M?4:2}).format(W)}const ge=()=>{n.clickable&&o.value.id&&i("click",o.value)};return e({updateAssetData:re,isLoading:c,fetchAssetBasicData:z,assetData:o}),(q,W)=>{var he;const M=yd("tooltip");return $(),L(Ze,null,[l("div",{class:Me(["asset-logo-component",{"cursor-pointer":t.clickable}]),onClick:ge},[l("div",{class:Me(["asset-logo-container",{"is-loading":c.value&&!o.value.id}])},[I.value&&!r.value?($(),L("img",{key:0,src:ce(o.value.logo_url),alt:x.value,class:"asset-logo",onError:be,onLoad:J},null,40,gne)):($(),L("div",{key:1,class:"asset-logo-fallback",style:zs({backgroundColor:C.value}),title:((he=o.value.category)==null?void 0:he.name)||"Sem categoria"},[D.value?($(),L("i",{key:0,class:Me(["bi",D.value])},null,2)):($(),L(Ze,{key:1},[Pe(pe(F.value),1)],64))],12,vne)),c.value||h.value?($(),L("div",bne,[...W[2]||(W[2]=[l("div",{class:"spinner-border spinner-border-sm",role:"status"},[l("span",{class:"visually-hidden"},"Carregando...")],-1)])])):xe("",!0)],2),l("div",yne,[o.value.code?($(),L("div",_ne,[l("div",xne,[l("strong",{class:"asset-code",title:E.value}
50,pe(x.value),9,wne),B.value?_t(($(),L("button",{key:0,type:"button",class:"btn-edit-price",onClick:St(X,["stop"]),"data-bs-placement":"right",title:"Gerenciar Ativo"},[...W[3]||(W[3]=[l("i",{class:"bi bi-pencil"},null,-1)])])),[[M]]):xe("",!0)]),!y.value&&t.showPrice?($(),L("div",Ene,[l("span",{class:Me(["asset-price",A.value])},pe(Z(o.value.current_price)),3),O.value?($(),L("span",{key:0,class:Me(["variation-badge",A.value])},[l("i",{class:Me(["bi",j.value])},null,2),Pe(" "+pe(te.value)+"% ",1)],2)):xe("",!0)])):xe("",!0)])):($(),L("div",Sne,[...W[4]||(W[4]=[l("span",{class:"skeleton-sub-value"},null,-1)])]))])],2),et(Ha,{modelValue:f.value,"onUpdate:modelValue":W[1]||(W[1]=oe=>f.value=oe),title:`Editar ${x.value}`,size:"modal-md"},{default:vt(()=>[f.value?($(),Ut(mne,{key:0,asset:o.value,onSaved:G,onClose:W[0]||(W[0]=oe=>f.value=!1)},null,8,["asset"])):xe("",!0)]),_:1},8,["modelValue","title"])],64)}}},_d=ls(kne,[["__scopeId","data-v-f1896b4e"]]),Cne={class:"asset-position-tab"},Tne={key:0,class:"text-center text-muted py-4"},Ane={class:"chart-section mb-4"},One={class:"d-flex justify-content-between align-items-center mb-2"},Dne={class:"btn-group btn-group-sm"},Pne=["onClick","disabled"],$ne={class:"chart-container"},Ine={key:0,class:"text-center py-4"},Mne={key:2,class:"text-center py-4 text-muted"},Nne={class:"small mt-2"},Lne={key:0,class:"position-info"},Rne={key:0,class:"metrics-grid mb-4"},Fne={class:"metric-item"},Vne={class:"text-dark"},Bne={class:"metric-item"},Une={class:"text-dark"},jne={class:"metric-item"},Hne={class:"text-muted d-block"},Wne={class:"text-dark"},zne={key:0,class:"metric-item"},Yne={class:"text-muted d-block"},qne={class:"text-dark"},Gne={class:"metric-item"},Xne={class:"text-dark"},Kne={class:"metric-item"},Jne={class:"text-muted d-block"},Qne={class:"text-dark"},Zne={class:"metric-item"},eie={class:"text-dark"},tie={class:"metric-item"},sie={class:"text-dark"},nie={key:1,class:"profit-loss-card mb-4"},iie={class:"d-flex justify-content-between align-items-center"},rie={class:"text-end"},aie={class:"actions-section"},oie={class:"d-grid gap-2"},lie={key:1,class:"actions-section mt-4"},uie={class:"d-grid gap-2"},cie={key:2,class:"empty-state text-center py-4 text-muted"},die={__name:"AssetPositionTab",props:{asset:Object},setup(t){const e=t,s=Yn(),n=ve(null),i=ve(!1),o=ve("1mo"),r=ve([]),c=ve(!1),h=ve(""),f=[{label:"1M",value:"1mo"},{label:"3M",value:"3mo"},{label:"6M",value:"6mo"},{label:"1A",value:"1y"}],v=()=>{try{return new URLSearchParams(window.location.search).get("selected_date")||""}catch{return""}},g=async()=>{var B;if(!((B=e.asset)!=null&&B.id)){n.value=null;return}i.value=!0;try{const z=v(),re=await ct.get(`/api/assets/${e.asset.id}/current-position`,{params:z?{selected_date:z}:{}});re.data.success&&re.data.data?n.value=re.data.data:n.value=null}catch(z){console.error("Erro ao buscar posição:",z),n.value=null}finally{i.value=!1}},y=Ae(()=>{var z,re;const B=(re=(z=e.asset)==null?void 0:z.category)==null?void 0:re.slug;return["renda-fixa","tesouro-direto","tesouro","cdb","lci-lca","outros"].includes(B)}),x=B=>["crypto","criptomoedas","cryptos","cripto"].includes(B==null?void 0:B.toLowerCase()),E=Ae(()=>{var J,Z;if(!n.value)return null;const B=n.value,z=B.renda_fixa_detalhes||B.rendaFixaDetalhes||B.fixed_income_details||B,re=Number(B.total_cost??B.valor_compra??0),ne=Number(B.current_value??B.valor_atual??0),X=Number(z.valor_liquido??z.net_value??ne),G=z.projetado_vencimento_liquido!==null&&z.projetado_vencimento_liquido!==void 0?Number(z.projetado_vencimento_liquido):null;let ce=Number(((J=B.profit_loss)==null?void 0:J.amount)??B.resultado??0),be=Number(((Z=B.profit_loss)==null?void 0:Z.percent)??B.percentual??0);return y.value&&(ce=X-re,be=re>0?ce/re*100:0),{quantity:Number(B.current_quantity??B.quantidade??0),averagePrice:Number(B.average_price??B.preco_medio??0),totalCost:re,currentValue:ne,profitLoss:{amount:ce,percent:be},rendaFixaDetalhes:{valor_bruto:Number(z.valor_bruto??z.gross_value??ne),valor_liquido:X,projetado_vencimento_liquido:G}}}),P=Ae(()=>{if(!n.value||Object.keys(n.value).length===0)return!1;const B=E.value;return B?y.value?B.totalCost>0||B.currentValue>0:B.quantity>0:!1}),I=B=>{var J,Z,ge,q,W,M,he,oe,K;let z=null,re=null;if((J=e.asset)!=null&&J.category_id)z=e.asset.category_id;else if((ge=(Z=e.asset)==null?void 0:Z.category)!=null&&ge.id)z=e.asset.category.id,re=e.asset.category;else if((q=e.asset)!=null&&q.code){const H=D(e.asset.code);H&&(z=H.id,re=H)}const ne=y.value,X=E.value,G=B==="sell"?ne?1:(X==null?void 0:X.quantity)||0:null,ce=B==="sell"&&ne&&X?((W=X.rendaFixaDetalhes)==null?void 0:W.valor_bruto)||X.currentValue||X.totalCost||0:(M=e.asset)!=null&&M.current_price?e.asset.current_price.toString():"",be={operationType:B,selectedAsset:e.asset,selectedCategory:z,selectedCategoryObject:re,maxQuantity:G,prefilledQuantity:B==="sell"?ne?"1":X!=null&&X.quantity?X.quantity.toString():"":"",prefilledPrice:ce,fixed_income_investment_value:B==="sell"&&ne&&X?((he=X.rend
50aFixaDetalhes)==null?void 0:he.valor_bruto)||X.currentValue||X.totalCost||0:null};s.open(Df,{restoredState:be,title:B==="buy"?`Comprar ${(oe=e.asset)==null?void 0:oe.code}`:`Vender ${(K=e.asset)==null?void 0:K.code}`})},D=B=>{if(!B)return null;const z=B.toUpperCase();return z.endsWith("11")||z.endsWith("12")?{id:2,name:"Fundos Imobiliários",slug:"fiis",color:"#e74c3c"}:z.includes("BTC")||z.includes("ETH")||z.includes("USDT")?{id:8,name:"Criptomoedas",slug:"crypto",color:"#f39c12"}:z.endsWith("33")||z.endsWith("34")||z.endsWith("35")||z.endsWith("36")?{id:4,name:"BDRs",slug:"bdrs",color:"#9b59b6"}:z.endsWith("39")?{id:3,name:"ETFs",slug:"etfs",color:"#2ecc71"}:/^[A-Z]{4}\d{1,2}$/.test(z)?{id:1,name:"Ações",slug:"stocks",color:"#3498db"}:null},F=B=>{var X,G;const z=Number(B);if(isNaN(z)||z===0)return"0";const re=(G=(X=e.asset)==null?void 0:X.category)==null?void 0:G.slug,ne=x(re)?8:(y.value,4);return new Intl.NumberFormat("pt-BR",{minimumFractionDigits:0,maximumFractionDigits:ne}).format(z)},C=async B=>{o.value=B,await A(B)},A=async(B=null)=>{var re;const z=B||o.value;if((re=e.asset)!=null&&re.id){c.value=!0,h.value="";try{const ne=v(),X={asset_id:e.asset.id,range:z,interval:"1d"};ne&&(X.selected_date=ne);const G=await ct.get("/api/assets/historical-data",{params:X});if(G.data.success&&G.data.data.historical_data){const be=G.data.data.historical_data.map(J=>{let Z=J.date;Z&&Z.length===10&&(Z+="T12:00:00");const q=new Date(Z).getTime(),W=J.user_holdings||{quantity:0,equity:0,profit_percent:0,total_cost:0};return{timestamp:Math.floor(q/1e3),close:Number(J.close),equity:Number(W.equity),total_cost:Number(W.total_cost||0),quantity:Number(W.quantity),profitPercent:Number(W.profit_percent||0)}}).filter(J=>J.timestamp>0&&!isNaN(J.close)).sort((J,Z)=>J.timestamp-Z.timestamp);r.value=be}else r.value=[]}catch(ne){console.error("Erro chart data:",ne),r.value=[],h.value="Erro ao carregar dados"}finally{c.value=!1}}},O=Ae(()=>!r.value||r.value.length===0?!1:r.value.every(B=>B&&typeof B.timestamp=="number"&&typeof B.close=="number")),j=Ae(()=>h.value?h.value:r.value.length===0?"Dados históricos não disponÃveis":"Dados inválidos para exibição do gráfico"),te=Ae(()=>{var B,z,re,ne,X,G;if(!O.value)return{chart:{type:"line",height:180},title:{text:""},series:[]};try{const ce=y.value,be=E.value,J=P.value?r.value.map(K=>({x:K.timestamp*1e3,y:Number(K.equity)})).filter(K=>K.y>0):[],Z=r.value.map(K=>({x:K.timestamp*1e3,y:Number(K.close)})).filter(K=>K.y>0);if(!P.value)return{chart:{height:200,backgroundColor:"transparent",spacing:[10,0,0,0],zoomType:"x"},title:{text:""},credits:{enabled:!1},xAxis:{type:"datetime",labels:{enabled:!1},lineWidth:0,tickLength:0,crosshair:{width:1,color:"#ccc",dashStyle:"shortdot"}},yAxis:[{title:{text:""},labels:{enabled:!1},gridLineColor:"transparent",opposite:!0}],tooltip:{shared:!0,backgroundColor:"rgba(255, 255, 255, 0.95)",borderColor:"#e0e0e0",borderRadius:8,shadow:!0,useHTML:!0,padding:10,formatter:function(){const K=new Date(this.x).toLocaleDateString("pt-BR",{day:"2-digit",month:"2-digit",year:"numeric"});let H='<div style="font-family: sans-serif; min-width: 150px;">';return H+=`<div style="font-size: 11px; color: #888; margin-bottom: 8px; border-bottom: 1px solid #eee; padding-bottom: 4px;">${K}</div>`,this.points.forEach(Ee=>{const _e=new Intl.NumberFormat("pt-BR",{style:"currency",currency:"BRL"}).format(Ee.y);H+=` 51 <div style="display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px;"> 52 <span style="font-size: 12px; color: #555; margin-right: 15px;">${Ee.series.name}</span> 53 <span style="font-size: 12px; font-weight: bold; color: ${Ee.color};">${_e}</span> 54 </div> 55 `}),H+="</div>",H}},plotOptions:{spline:{marker:{enabled:!1},states:{hover:{lineWidth:3}}}},series:[{name:"Cotação",type:"spline",data:Z,color:"var(--positive-color, #198754)",lineWidth:2}],legend:{enabled:!1}};if(J.length===0)return{series:[]};const ge=r.value[r.value.length-1],W=ge&&ge.profitPercent>=0?"var(--positive-color, #198754)":"var(--negative-color, #dc3545)",M=[],he=[];let oe=[];if(ce){let K=null,H=null,Ee=null;if((B=e.asset)!=null&&B.profile){let _e=e.asset.profile;if(typeof _e=="string")try{_e=JSON.parse(_e)}catch{}if(Ee=_e.due_date||_e.expiration_date||_e.maturity_date||_e.maturityDate,!Ee){const Ce=(re=(z=e.asset)==null?void 0:z.code)==null?void 0:re.match(/(\d{4}-\d{2}-\d{2})/);if(Ce)Ee=Ce[1];else{const Re=(X=(ne=e.asset)==null?void 0:ne.code)==null?void 0:X.match(/(\d{2}\/\d{2}\/\d{4})/);if(Re){const Ke=Re[1].split("/");Ee=`${Ke[2]}-${Ke[1]}-${Ke[0]}`}}}}if(Ee){const _e=new Date(`${Ee}T12:00:00`),Ce=new Date,Re=(G=be==null?void 0:be.rendaFixaDetalhes)==null?void 0:G.projetado_vencimento_liquido;if(_e>Ce&&Re!==null&&Re>0&&J.length>0){const Ke=J[J.length-1];H=Ke.x,K={name:"Projeção (Vencimento)",type:"line",dashStyle:"Dash",color:"var(--primary-color, #0d6efd)",data:[{x:Ke.x,y:Ke.y},{x:_e.getTime(),y:Re}],marker:{enabled:!0,radius:4},lineWidth:2,zIndex:2},oe=[{color:"var(--border-color, #ccc)",width:2,value:H,dashStyle:"Dash",zIndex:4}]}}he.push({title:{text:""},labels:{enabled:!1},gridLineColor:"transparent",opposite:!0}),M.push({name:"Patrimônio",type:"line",data:J,color:W,lineWidth:2,marker:{enabled:!1},zIndex:1}),K&&M.push(K)}else he.push({title:{text:""},labels:{enabled:!1},gridLineColor:"transparent",opposite:!0}),he.push({title:{text:""},labels:{enabled:!1},gridLineColor:"transparent",opposite:!1}),M.push({name:"Valorização (Patrimônio)",type:"column",yAxis:0,data:J,color:"var(--invested-color, #0d6efd)",borderRadius:2}),M.push({name:"Cotação",type:"spline",yAxis:1,data:Z,color:"var(--positive-color, #198754)",lineWidth:2});return{chart:{height:200,backgroundColor:"transparent",spacing:[10,0,0,0],zoomType:"x"},title:{text:""},credits:{enabled:!1},xAxis:{type:"datetime",labels:{enabled:!1},lineWidth:0,tickLength:0,crosshair:{width:1,color:"#ccc",dashStyle:"shortdot"},plotLines:oe},yAxis:he,tooltip:{shared:!0,backgroundColor:"rgba(255, 255, 255, 0.95)",borderColor:"#e0e0e0",borderRadius:8,shadow:!0,useHTML:!0,padding:10,formatter:function(){const K=new Date(this.x).toLocaleDateString("pt-BR",{day:"2-digit",month:"2-digit",year:"numeric"});let H='<div style="font-family: sans-serif; min-width: 150px;">';return H+=`<div style="font-size: 11px; color: #888; margin-bottom: 8px; border-bottom: 1px solid #eee; padding-bottom: 4px;">${K}</div>
55`,this.points.forEach(Ee=>{const _e=new Intl.NumberFormat("pt-BR",{style:"currency",currency:"BRL"}).format(Ee.y);H+=` 56 <div style="display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px;"> 57 <span style="font-size: 12px; color: #555; margin-right: 15px;">${Ee.series.name}</span> 58 <span style="font-size: 12px; font-weight: bold; color: ${Ee.color};">${_e}</span> 59 </div> 60 `}),H+="</div>",H}},plotOptions:{spline:{marker:{enabled:!1},states:{hover:{lineWidth:3}}},column:{borderWidth:0,pointPadding:.1,groupPadding:0},area:{marker:{enabled:!1},states:{hover:{lineWidth:3}}},line:{marker:{enabled:!1},states:{hover:{lineWidth:3}}}},series:M,legend:{enabled:!1}}}catch(ce){return console.error("Erro options gráfico:",ce),{series:[]}}});return Xt(()=>{A(),g()}),Pt(()=>e.asset,()=>{var B;(B=e.asset)!=null&&B.id&&(A(),g())},{deep:!0}),(B,z)=>{var X,G,ce,be;const re=ur("highcharts"),ne=yd("tooltip");return $(),L("div",Cne,[i.value?($(),L("div",Tne,[...z[7]||(z[7]=[l("div",{class:"spinner-border",role:"status"},[l("span",{class:"visually-hidden"},"Carregando...")],-1),l("p",{class:"text-muted small mt-2"},"Carregando operações...",-1)])])):P.value||r.value.length>0?($(),L(Ze,{key:1},[l("div",Ane,[l("div",One,[z[8]||(z[8]=l("h6",{class:"mb-0 text-muted"},"Histórico e Projeção",-1)),l("div",Dne,[($(),L(Ze,null,At(f,J=>l("button",{key:J.value,class:Me(["btn btn-outline-secondary",{active:o.value===J.value}]),onClick:Z=>C(J.value),disabled:c.value},pe(J.label),11,Pne)),64))])]),l("div",$ne,[c.value?($(),L("div",Ine,[...z[9]||(z[9]=[l("div",{class:"spinner-border spinner-border-sm text-primary",role:"status"},[l("span",{class:"visually-hidden"},"Carregando...")],-1),l("small",{class:"text-muted d-block mt-2"},"Buscando dados históricos...",-1),l("small",{class:"text-muted"},"Isso pode levar alguns segundos no primeiro acesso",-1)])])):O.value?($(),Ut(re,{key:1,options:te.value,updateArgs:B.updateArgs},null,8,["options","updateArgs"])):($(),L("div",Mne,[z[11]||(z[11]=l("i",{class:"bi bi-graph-up opacity-50",style:{"font-size":"2rem"}},null,-1)),l("p",Nne,pe(j.value),1),c.value?xe("",!0):($(),L("button",{key:0,class:"btn btn-sm btn-outline-primary mt-2",onClick:z[0]||(z[0]=J=>A(o.value))},[...z[10]||(z[10]=[l("i",{class:"bi bi-arrow-clockwise me-1"},null,-1),Pe(" Tentar Novamente ",-1)])]))]))])]),P.value?($(),L("div",Lne,[E.value?($(),L("div",Rne,[y.value?($(),L(Ze,{key:0},[l("div",Fne,[z[12]||(z[12]=l("small",{class:"text-muted d-block"},"Total Investido",-1)),l("strong",Vne,pe(B.$fmtCurrency(E.value.totalCost)),1)]),l("div",Bne,[z[13]||(z[13]=l("small",{class:"text-muted d-block"},"Bruto",-1)),l("strong",Une,pe(B.$fmtCurrency(((X=E.value.rendaFixaDetalhes)==null?void 0:X.valor_bruto)||E.value.currentValue)),1)]),l("div",jne,[l("small",Hne,[z[15]||(z[15]=Pe("LÃquido (com IR) ",-1)),_t(($(),L("a",{href:"#",onClick:z[1]||(z[1]=St(J=>B.$openHelp("liquido-renda-fixa",!0),["prevent"])),"data-bs-placement":"right",title:"Resultado lÃquido"},[...z[14]||(z[14]=[l("i",{class:"bi bi-question-circle-fill text-secondary mx-2"},null,-1)])])),[[ne]])]),l("strong",Wne,pe(B.$fmtCurrency(((G=E.value.rendaFixaDetalhes)==null?void 0:G.valor_liquido)||0)),1)]),((ce=E.value.rendaFixaDetalhes)==null?void 0:ce.projetado_vencimento_liquido)!==null?($(),L("div",zne,[l("small",Yne,[z[17]||(z[17]=Pe("Esperado no Venc. ",-1)),_t(($(),L("a",{href:"#",onClick:z[2]||(z[2]=St(J=>B.$openHelp("estimativa-vencimento",!0),["prevent"])),"data-bs-placement":"right",title:"Estimativa no vencimento"},[...z[16]||(z[16]=[l("i",{class:"bi bi-question-circle-fill text-secondary mx-2"},null,-1)])])),[[ne]])]),l("strong",qne,pe(B.$fmtCurrency((be=E.value.rendaFixaDetalhes)==null?void 0:be.projetado_vencimento_liquido)),1)])):xe("",!0)],64)):($(),L(Ze,{key:1},[l("div",Gne,[z[18]||(z[18]=l("small",{class:"text-muted d-block"},"Quantidade",-1)),l("strong",Xne,pe(F(E.value.quantity)),1)]),l("div",Kne,[l("small",Jne,[z[20]||(z[20]=Pe("Preço Médio ",-1)),_t(($(),L("a",{href:"#",onClick:z[3]||(z[3]=St(J=>B.$openHelp("preco-medio",!0),["prevent"])),"data-bs-placement":"right",title:"Preço Médio de Compra"},[...z[19]||(z[19]=[l("i",{class:"bi bi-question-circle-fill text-secondary mx-2"},null,-1)])])),[[ne]])]),l("strong",Qne,pe(B.$fmtCurrency(E.value.averagePrice)),1)]),l("div",Zne,[z[21]||(z[21]=l("small",{class:"text-muted d-block"},"Total Investido",-1)),l("strong",eie,pe(B.$fmtCurrency(E.value.totalCost)),1)]),l("div",tie,[z[22]||(z[22]=l("small",{class:"text-muted d-block"},"Valor Atual",-1)),l("strong",sie,pe(B.$fmtCurrency(E.value.currentValue)),1)])],64))])):xe("",!0),E.value?($(),L("div",nie,[l("div",iie,[l("div",null,[z[23]||(z[23]=l("small",{class:"text-muted d-block"},"Lucro/PrejuÃzo",-1)),l("strong",{class:Me(["fs-5",E.value.profitLoss.amount>=0?"text-positive":"text-negative"])}
60,pe(B.$fmtCurrency(E.value.profitLoss.amount)),3)]),l("div",rie,[l("strong",{class:Me(["fs-5",E.value.profitLoss.percent>=0?"text-positive":"text-negative"])},pe(E.value.profitLoss.percent.toFixed(2))+"% ",3)])])])):xe("",!0),l("div",aie,[l("div",oie,[l("button",{class:"btn btn-success btn-sm",onClick:z[4]||(z[4]=J=>I("buy"))},[...z[24]||(z[24]=[l("i",{class:"bi bi-plus-circle me-1"},null,-1),Pe("Comprar / Aportar ",-1)])]),l("button",{class:"btn btn-outline-danger btn-sm",onClick:z[5]||(z[5]=J=>I("sell"))},[...z[25]||(z[25]=[l("i",{class:"bi bi-dash-circle me-1"},null,-1),Pe("Vender / Resgatar ",-1)])])])])])):($(),L("div",lie,[l("div",uie,[l("button",{class:"btn btn-success btn-sm",onClick:z[6]||(z[6]=J=>I("buy"))},[...z[26]||(z[26]=[l("i",{class:"bi bi-plus-circle me-1"},null,-1),Pe("Novo lançamento ",-1)])])])]))],64)):($(),L("div",cie,[...z[27]||(z[27]=[l("i",{class:"bi bi-inbox display-4 opacity-50"},null,-1),l("p",{class:"mt-2"},"Não há histórico para este ativo.",-1)])]))])}}},hie=ls(die,[["__scopeId","data-v-0caa004f"]]),SD=pa("news",()=>{const t=ve([]),e=ve([]),s=ve(!1),n=ve(null),i=ve(null),o=ve(""),r=Mn(),c=Ae(()=>t.value.slice(0,6)),h=Ae(()=>!i.value&&!o.value?t.value:t.value.filter(D=>{var F,C;if(i.value&&!(((F=D.categories)==null?void 0:F.includes(i.value))||D.primary_category===i.value))return!1;if(o.value){const A=o.value.toLowerCase();return D.title.toLowerCase().includes(A)||((C=D.cta)==null?void 0:C.toLowerCase().includes(A))}return!0}));async function f(){s.value=!0;try{const D={};i.value&&(D.category=i.value);const F=await ct.get("/api/news",{params:D});F.data.success&&(t.value=F.data.data,n.value=Date.now())}catch(D){console.error("Erro ao carregar notÃcias:",D)}finally{s.value=!1}}async function v(){try{const D=await ct.get("/api/news/categories");D.data.success&&(e.value=D.data.data)}catch(D){console.error("Erro ao carregar categorias:",D)}}async function g(D){if(!D||D.length<3)return o.value="",f();s.value=!0,o.value=D;try{const F={q:D};i.value&&(F.category=i.value);const C=await ct.get("/api/news/search",{params:F});C.data.success&&(t.value=C.data.data)}catch(F){console.error("Erro na busca:",F)}finally{s.value=!1}}function y(D){i.value=D,f()}function x(D){ct.post(`/api/news/${D.id}/click`).catch(()=>{}),r.open("NewsDetailOffcanvas",{newsId:D.id,news:D})}let E=null;function P(){E&&clearInterval(E),E=setInterval(f,300*1e3)}function I(){E&&(clearInterval(E),E=null)}return{news:t,categories:e,loading:s,lastUpdate:n,activeCategory:i,searchQuery:o,topNews:c,filteredNews:h,fetchNews:f,fetchCategories:v,searchNews:g,setCategory:y,openNewsDetail:x,startAutoRefresh:P,stopAutoRefresh:I,filteredNews:h}});var qy,zk;function kD(){if(zk)return qy;zk=1;function t(e){var s=typeof e;return e!=null&&(s=="object"||s=="function")}return qy=t,qy}var Gy,Yk;function fie(){if(Yk)return Gy;Yk=1;var t=typeof dl=="object"&&dl&&dl.Object===Object&&dl;return Gy=t,Gy}var Xy,qk;function CD(){if(qk)return Xy;qk=1;var t=fie(),e=typeof self=="object"&&self&&self.Object===Object&&self,s=t||e||Function("return this")();return Xy=s,Xy}var Ky,Gk;function pie(){if(Gk)return Ky;Gk=1;var t=CD(),e=function(){return t.Date.now()};return Ky=e,Ky}var Jy,Xk;function mie(){if(Xk)return Jy;Xk=1;var t=/\s/;function e(s){for(var n=s.length;n--&&t.test(s.charAt(n)););return n}return Jy=e,Jy}var Qy,Kk;function gie(){if(Kk)return Qy;Kk=1;var t=mie(),e=/^\s+/;function s(n){return n&&n.slice(0,t(n)+1).replace(e,"")}return Qy=s,Qy}var Zy,Jk;function TD(){if(Jk)return Zy;Jk=1;var t=CD(),e=t.Symbol;return Zy=e,Zy}var e0,Qk;function vie(){if(Qk)return e0;Qk=1;var t=TD(),e=Object.prototype,s=e.hasOwnProperty,n=e.toString,i=t?t.toStringTag:void 0;function o(r){var c=s.call(r,i),h=r[i];try{r[i]=void 0;var f=!0}catch{}var v=n.call(r);return f&&(c?r[i]=h:delete r[i]),v}return e0=o,e0}var t0,Zk;function bie(){if(Zk)return t0;Zk=1;var t=Object.prototype,e=t.toString;function s(n){return e.call(n)}return t0=s,t0}var s0,eC;function yie(){if(eC)return s0;eC=1;var t=TD(),e=vie(),s=bie(),n="[object Null]",i="[object Undefined]",o=t?t.toStringTag:void 0;function r(c){return c==null?c===void 0?i:n:o&&o in Object(c)?e(c):s(c)}return s0=r,s0}var n0,tC;
60function _ie(){if(tC)return n0;tC=1;function t(e){return e!=null&&typeof e=="object"}return n0=t,n0}var i0,sC;function xie(){if(sC)return i0;sC=1;var t=yie(),e=_ie(),s="[object Symbol]";function n(i){return typeof i=="symbol"||e(i)&&t(i)==s}return i0=n,i0}var r0,nC;function wie(){if(nC)return r0;nC=1;var t=gie(),e=kD(),s=xie(),n=NaN,i=/^[-+]0x[0-9a-f]+$/i,o=/^0b[01]+$/i,r=/^0o[0-7]+$/i,c=parseInt;function h(f){if(typeof f=="number")return f;if(s(f))return n;if(e(f)){var v=typeof f.valueOf=="function"?f.valueOf():f;f=e(v)?v+"":v}if(typeof f!="string")return f===0?f:+f;f=t(f);var g=o.test(f);return g||r.test(f)?c(f.slice(2),g?2:8):i.test(f)?n:+f}return r0=h,r0}var a0,iC;function Eie(){if(iC)return a0;iC=1;var t=kD(),e=pie(),s=wie(),n="Expected a function",i=Math.max,o=Math.min;function r(c,h,f){var v,g,y,x,E,P,I=0,D=!1,F=!1,C=!0;if(typeof c!="function")throw new TypeError(n);h=s(h)||0,t(f)&&(D=!!f.leading,F="maxWait"in f,y=F?i(s(f.maxWait)||0,h):y,C="trailing"in f?!!f.trailing:C);function A(G){var ce=v,be=g;return v=g=void 0,I=G,x=c.apply(be,ce),x}function O(G){return I=G,E=setTimeout(B,h),D?A(G):x}function j(G){var ce=G-P,be=G-I,J=h-ce;return F?o(J,y-be):J}function te(G){var ce=G-P,be=G-I;return P===void 0||ce>=h||ce<0||F&&be>=y}function B(){var G=e();if(te(G))return z(G);E=setTimeout(B,j(G))}function z(G){return E=void 0,C&&v?A(G):(v=g=void 0,x)}function re(){E!==void 0&&clearTimeout(E),I=0,v=P=g=E=void 0}function ne(){return E===void 0?x:z(e())}function X(){var G=e(),ce=te(G);if(v=arguments,g=this,P=G,ce){if(E===void 0)return O(P);if(F)return clearTimeout(E),E=setTimeout(B,h),A(P)}return E===void 0&&(E=setTimeout(B,h)),x}return X.cancel=re,X.flush=ne,X}return a0=r,a0}var Sie=Eie();const kie=fd(Sie),Cie={class:"news-list-offcanvas"},Tie={class:"news-header mb-4"},Aie={class:"input-group mb-3"},Oie={class:"form-floating flex-grow-1"},Die={class:"dropdown"},Pie={class:"btn btn-outline-secondary w-100 d-flex justify-content-between align-items-center",type:"button","data-bs-toggle":"dropdown","aria-expanded":"false"},$ie={class:"dropdown-menu w-100"},Iie=["onClick"],Mie={key:0,class:"text-center text-muted py-4"},Nie={key:0,class:"active-filters mb-3"},Lie={class:"d-flex flex-wrap gap-2"},Rie={key:0,class:"badge bg-primary bg-opacity-10 text-white border border-primary-subtle px-3 py-2"},Fie={key:1,class:"badge bg-primary bg-opacity-10 text-white border border-primary-subtle px-3 py-2"},Vie={key:1,class:"text-center text-muted py-5"},Bie={key:2,class:"no-results text-center py-5"},Uie={key:0,class:"text-muted small mb-4"},jie=["onClick"],Hie={class:"card-body"},Wie={class:"d-flex align-items-center gap-2 mb-2"},zie={class:"text-muted small ms-auto"},Yie={class:"fw-bold text-dark lh-sm mb-2",style:{"font-size":"0.95rem"}},qie={class:"d-flex flex-wrap gap-2 align-items-center mt-2"},Gie={class:"badge bg-light text-dark small border"},Xie={key:3,class:"text-center py-3"},Kie=["disabled"],Jie={key:0,class:"spinner-border spinner-border-sm me-2",role:"status"},Qie={key:1,class:"bi bi-arrow-down me-2"},Zie={key:1,class:"text-muted small"},ere={__name:"NewsListOffcanvas",setup(t){const e=gi(),s=tn(),n=SD(),i=Mn(),o=ve([]),r=ve(!0),c=ve(""),h=ve(!1),f=ve(!0),v=ve(1),g=ve([]),y=ve(null),x=ve(null),E=ve(null),P=Ae(()=>{if(!n.categories)return[];const J=new Set;return n.categories.filter(Z=>{if(!Z||!Z.name)return!1;const ge=String(Z.name).normalize("NFD").replace(/[\u0300-\u036f]/g,"").toLowerCase().trim();return J.has(ge)?!1:(J.add(ge),!0)})}),I=Ae(()=>{if(!x.value)return"Todas as categorias";const J=P.value.find(Z=>Z.id===x.value);return J?J.name:"Todas as categorias"}),D={acoes:"Ações",fiis:"FIIs",bdr:"BDRs",etf:"ETFs",cripto:"Cripto",renda_fixa:"Renda Fixa",tesouro:"Tesouro",futuros:"Futuros",cambio:"Moedas",commodities:"Commodities",macro:"Macro",politica:"PolÃtica",empresas:"Empresas",internacional:"Internacional",indicadores:"Indicadores",outros:"Outros"},F=J=>D[J]||J||"Geral",C=J=>({positive:"bg-success",negative:"bg-danger",neutral:"bg-secondary"})[J]||"bg-secondary",A=J=>({positive:"bi-arrow-up-circle",negative:"bi-arrow-down-circle",neutral:"bi-dash-circle"})[J]||"bi-dash-circle",O=J=>({positive:"Positiva",negative:"Negativa",neutral:"Neutra"})[J]||"Neutra",j=()=>{document.querySelectorAll(".tooltip").forEach(Z=>Z.remove()),i.close(),e.push("/my-account/plans")},te=J=>{if(!J)return"";if(J.includes("-")&&J.includes(":")){const ge=new Date(J.replace(" ","T")),q=Math.floor((new Date-ge)/1e3);if(q<60)return`${q}
60 seg`;const W=Math.floor(q/60);if(W<60)return`${W} min`;const M=Math.floor(W/60);if(M<24)return`${M} h`;const he=Math.floor(M/24);if(he<30)return he===1?"1 dia":`${he} dias`;const oe=Math.floor(he/30);if(oe<12)return oe===1?"1 mês":`${oe} meses`;const K=Math.floor(he/365);return K===1?"1 ano":`${K} anos`}let Z=J.toLowerCase();return Z=Z.replace(" ago","").replace(" from now",""),Z=Z.replace("seconds","seg").replace("second","seg"),Z=Z.replace("minutes","min").replace("minute","min"),Z=Z.replace("hours","h").replace("hour","h"),Z=Z.replace("days","dias").replace("day","dia"),Z=Z.replace("months","meses").replace("month","mês"),Z=Z.replace("years","anos").replace("year","ano"),Z=Z.replace(/^a /g,"1 ").replace(/^an /g,"1 "),Z},B=Ae(()=>{let J=[...o.value||[]];if(x.value){const Z=String(x.value).toLowerCase().trim();J=J.filter(ge=>[ge.primary_category,ge.category,...Array.isArray(ge.categories)?ge.categories:[]].filter(Boolean).map(W=>String(W).toLowerCase().trim()).includes(Z)),J.sort((ge,q)=>(q.final_score||0)-(ge.final_score||0))}else J.sort((Z,ge)=>{const q=new Date(Z.ai_processed_at||Z.pub_date_raw||0);return new Date(ge.ai_processed_at||ge.pub_date_raw||0)-q});if(c.value&&c.value.length>=2){const Z=c.value.toLowerCase().trim();J=J.filter(ge=>ge.title&&ge.title.toLowerCase().includes(Z)||ge.cta&&ge.cta.toLowerCase().includes(Z))}return J}),z=async J=>{x.value=J},re=kie(async()=>{(c.value.length>=2||c.value.length===0)&&await G(!0)},500),ne=async()=>{c.value="",vs(()=>{E.value&&E.value.focus()})},X=async()=>{c.value="",x.value=null},G=async(J=!1)=>{if(h.value&&!J)return;h.value=!0,J?(v.value=1,g.value=[],f.value=!0):await new Promise(W=>setTimeout(W,200));const Z=(v.value-1)*15,ge=Z+15,q=B.value.slice(Z,ge);q.length>0?(g.value=J?q:[...g.value,...q],v.value++,f.value=ge<B.value.length):f.value=!1,h.value=!1},ce=()=>{if(!y.value||h.value)return;const{scrollTop:J,scrollHeight:Z,clientHeight:ge}=y.value;Z-J-ge<150&&G(!1)},be=J=>{s.hasModule("pro_news")&&i.open(cr(Pf),{newsId:J.id,news:J,title:"NotÃcia"})};return Pt(B,()=>{G(!0)},{deep:!0}),Xt(async()=>{r.value=!0;try{const J=await ct.get("/api/news",{params:{limit:100}});J.data&&J.data.success&&(o.value=J.data.data)}catch(J){console.error("Erro ao buscar a lista completa de notÃcias no Offcanvas:",J)}finally{r.value=!1}await G(!0)}),(J,Z)=>($(),L("div",Cie,[l("div",Tie,[l("div",Aie,[Z[7]||(Z[7]=l("span",{class:"input-group-text"},[l("i",{class:"bi bi-search"})],-1)),l("div",Oie,[_t(l("input",{type:"text",class:"form-control","onUpdate:modelValue":Z[0]||(Z[0]=ge=>c.value=ge),onInput:Z[1]||(Z[1]=(...ge)=>Ne(re)&&Ne(re)(...ge)),placeholder:"Buscar notÃcias...",id:"newsSearch",ref_key:"searchInputRef",ref:E},null,544),[[Xs,c.value]]),Z[5]||(Z[5]=l("label",{for:"newsSearch"},"Buscar notÃcias...",-1))]),c.value?($(),L("button",{key:0,class:"btn btn-primary",onClick:ne},[...Z[6]||(Z[6]=[l("i",{class:"bi bi-x"},null,-1)])])):xe("",!0)]),l("div",Die,[l("button",Pie,[l("span",null,[Z[8]||(Z[8]=l("i",{class:"bi bi-tags me-2"},null,-1)),Pe(pe(I.value),1)]),Z[9]||(Z[9]=l("i",{class:"bi bi-chevron-down"},null,-1))]),l("ul",$ie,[l("li",null,[l("a",{class:Me(["dropdown-item",{active:!x.value}]),href:"#",onClick:Z[2]||(Z[2]=St(ge=>z(null),["prevent"]))},[...Z[10]||(Z[10]=[l("i",{class:"bi bi-grid me-2"},null,-1),Pe("Todas as categorias ",-1)])],2)]),Z[12]||(Z[12]=l("li",null,[l("hr",{class:"dropdown-divider"})],-1)),($(!0),L(Ze,null,At(P.value,ge=>($(),L("li",{key:ge.id},[l("a",{class:Me(["dropdown-item",{active:x.value===ge.id}]),href:"#",onClick:St(q=>z(ge.id),["prevent"])},[Z[11]||(Z[11]=l("i",{class:"bi bi-tag me-2"},null,-1)),Pe(pe(ge.name),1)],10,Iie)]))),128))])])]),r.value?($(),L("div",Mie,[...Z[13]||(Z[13]=[l("div",{class:"spinner-border",role:"status"},[l("span",{class:"visually-hidden"},"Carregando...")],-1),l("p",{class:"text-muted small mt-2"},"Carregando notÃcias...",-1)])])):($(),L("div",{key:1,class:"news-list-container",ref_key:"scrollContainer",ref:y,onScroll:ce},[c.value||x.value?($(),L("div",Nie,[l("div",Lie,[c.value?($(),L("span",Rie,[Z[14]||(Z[14]=l("i",{class:"bi bi-search me-1"},null,-1)),Pe(' "'+pe(c.value)+'" ',1),l("i",{class:"bi bi-x ms-2 cursor-pointer",onClick:ne}
60)])):xe("",!0),x.value?($(),L("span",Fie,[Z[15]||(Z[15]=l("i",{class:"bi bi-tag me-1"},null,-1)),Pe(" "+pe(F(x.value))+" ",1),l("i",{class:"bi bi-x ms-2 cursor-pointer",onClick:Z[3]||(Z[3]=ge=>z(null))})])):xe("",!0)])])):xe("",!0),!g.value.length&&h.value?($(),L("div",Vie,[...Z[16]||(Z[16]=[l("div",{class:"spinner-border",role:"status"},[l("span",{class:"visually-hidden"},"Filtrando...")],-1),l("p",{class:"text-muted small mt-2"},"Atualizando lista...",-1)])])):xe("",!0),!g.value.length&&!r.value&&!h.value?($(),L("div",Bie,[Z[18]||(Z[18]=l("div",{class:"mb-3"},[l("i",{class:"bi bi-newspaper display-4 text-muted"})],-1)),Z[19]||(Z[19]=l("p",{class:"text-muted mb-2 fs-5"},"Nenhuma notÃcia encontrada",-1)),c.value?($(),L("p",Uie,'Não encontramos resultados para "'+pe(c.value)+'"',1)):xe("",!0),c.value||x.value?($(),L("button",{key:1,class:"btn btn-outline-primary btn-sm",onClick:X},[...Z[17]||(Z[17]=[l("i",{class:"bi bi-x-circle me-2"},null,-1),Pe("Limpar filtros ",-1)])])):xe("",!0)])):xe("",!0),($(!0),L(Ze,null,At(g.value,(ge,q)=>($(),L("div",{key:ge.id,class:Me(["news-item mb-3 position-relative",{"is-locked":!Ne(s).hasModule("pro_news")}]),onClick:W=>be(ge)},[l("div",{class:Me(["card",{"blurred-locked":!Ne(s).hasModule("pro_news")}])},[l("div",Hie,[l("div",Wie,[l("span",zie,pe(te(ge.pub_date)),1)]),l("h6",Yie,pe(ge.cta||ge.title),1),l("div",qie,[l("span",Gie,[Z[20]||(Z[20]=l("i",{class:"bi bi-tag me-1"},null,-1)),Pe(" "+pe(F(ge.primary_category||ge.category)),1)]),l("span",{class:Me(["badge ms-auto",C(ge.sentiment)])},[l("i",{class:Me([A(ge.sentiment),"me-1"])},null,2),Pe(" "+pe(O(ge.sentiment)),1)],2)])])],2),Ne(s).hasModule("pro_news")?xe("",!0):($(),L("div",{key:0,class:"lock-overlay d-flex align-items-center justify-content-center",onClick:j},[...Z[21]||(Z[21]=[l("i",{class:"bi bi-lock","data-bs-toggle":"tooltip","data-bs-placement":"bottom",title:"Adquira em Planos & Licenças"},null,-1)])]))],10,jie))),128)),g.value.length>0?($(),L("div",Xie,[f.value?($(),L("button",{key:0,class:"btn btn-outline-primary rounded-pill px-4",onClick:Z[4]||(Z[4]=()=>G(!1)),disabled:h.value},[h.value?($(),L("span",Jie)):($(),L("i",Qie)),Pe(" "+pe(h.value?"Carregando...":"Carregar mais"),1)],8,Kie)):($(),L("div",Zie,[...Z[22]||(Z[22]=[l("i",{class:"bi bi-check2-all me-1"},null,-1),Pe(" Todas as notÃcias carregadas ",-1)])]))])):xe("",!0)],544))]))}},j_=ls(ere,[["__scopeId","data-v-7d996804"]]),tre={class:"news-detail-offcanvas"},sre={key:0,class:"text-center text-muted py-5"},nre={class:"news-header mb-4 pb-3 border-bottom"},ire={class:"fw-bold text-dark lh-base mb-2"},rre={class:"d-flex justify-content-between align-items-center"},are={class:"text-muted"},ore={class:"summary-section mb-4"},lre=["innerHTML"],ure={class:"classification-section mb-4"},cre={class:"card border-0 bg-light"},dre={class:"card-body p-3"},hre={class:"mb-3"},fre={class:"d-flex align-items-center mb-3"},pre={class:"badge text-primary py-2","data-bs-toggle":"tooltip","data-bs-placement":"bottom",title:"Avaliação da notÃcia"},mre={key:0,class:"text-muted mb-0"},gre={class:"entities-section"},vre={class:"d-flex flex-wrap gap-2"},bre={key:3,class:"text-muted small"},yre={key:0,class:"related-section mb-4"},_re={class:"list-group list-group-flush"},xre=["onClick"],wre={class:"d-flex w-100 justify-content-between align-items-center mb-2"},Ere={class:"text-muted"},Sre={class:"mb-0 text-dark",style:{"line-height":"1.4"}},kre={key:2,class:"text-center py-5 text-muted"},Cre={__name:"NewsDetailOffcanvas",props:{newsId:{type:[Number,String],required:!0},news:{type:Object,default:null}},setup(t){const e=gi(),s=tn(),n=t,i=ve(!0),o=ve(n.news),r=Mn(),c={acoes:"Ações",fiis:"FIIs",bdr:"BDRs",etf:"ETFs",cripto:"Cripto",renda_fixa:"Renda Fixa",tesouro:"Tesouro",futuros:"Futuros",cambio:"Moedas",commodities:"Commodities",macro:"Macro",politica:"PolÃtica",empresas:"Empresas",internacional:"Internacional",indicadores:"Indicadores",outros:"Outros"},h=()=>{document.querySelectorAll(".tooltip").forEach(C=>C.remove()),r.close(),e.push("/my-account/plans")},f=F=>F?c[F]||F:"Geral",v=F=>({positive:"bg-sentiment-positive",negative:"bg-sentiment-negative",neutral:"bg-sentiment-neutral"})[F]||"bg-sentiment-positive",g=F=>({positive:"bi-arrow-up",negative:"bi-arrow-down",neutral:"bi-dash-circle"})[F]||"bi-dash-circle",y=F=>({positive:"Positiva",negative:"Negativa",neutral:"Neutra"})[F]||"Neutra",x=F=>{if(!F)return"";if(F.includes("-")&&F.includes(":")){const A=new Date(F.replace(" ","T")),O=Math.floor((new Date-A)/1e3);if(O<60)return`${O} seg`;const j=Math.floor(O/60);if(j<60)return`${j} min`;const te=Math.floor(j/60);if(te<24)return`${te} h`;const B=Math.floor(te/24);if(B<30)return B===1?"1 dia":`${B} dias`;const z=Math.floor(B/30);if(z<12)return z===1?"1 mês":`${z} meses`;const re=Math.floor(B/365);return re===1?"1 ano":`${re} anos`}let C=F.toLowerCase();return C=C.replace(" ago","").replace(" from now",""),C=C.replace("seconds","seg").replace("second","seg"),C=C.replace("minutes","min").replace("minute","min"),C=C.replace("hours","h").replace("hour","h"),C=C.replace("days","dias").replace("day","dia"),C=C.replace("months","meses").replace("month","mês"),C=C.replace("years","anos").replace("year","ano"),C=C.replace(/^a /g,"1 ").replace(/^an /g,"1 "),C},E=()=>{typeof r.goBack=="function"?r.goBack():typeof r.back=="function"?r.back():r.close()},P=()=>{r.open(cr(j_),{title:"Todas as notÃcias"})},I=F=>{cs(()=>Promise.resolve().then(()=>Tre),void 0).then(C=>{r.open(cr(C.default),{newsId:F,title:"NotÃcia"})})},D=async F=>{i.value=!0;try{const C=await ct.get(`/api/news/${F}`);C.data.success&&(o.value=C.data.data)}catch(C){console.error("Erro ao buscar dados completos:",C)}finally{i.value=!1}};return Xt(()=>{n.newsId?D(n.newsId):i.value=!1}),Pt(()=>n.newsId,F=>{F&&D(F)}),(F,C)=>{var A,O,j,te,B,z,re,ne,X,G,ce,be;return $(),L("div",tre,[l("div",{class:"d-flex align-items-center mb-3"},[l("button",{onClick:E,class:"btn btn-sm btn-outline-secondary rounded-pill px-3"},[...C[0]||(C[0]=[l("i",{class:"bi bi-arrow-left me-1"},null,-1),Pe(" Voltar ",-1)])])]),i.value?($(),L("div",sre,[...C[1]||(C[1]=[l("div",{class:"spinner-border",role:"status"},[l("span",{class:"visually-hidden"},"Carregando...")],-1),l("p",{class:"text-muted small mt-2"},"Carregando...",-1)])])):o.value&&o.value.summary?($(),L("div",{key:1,class:Me(["news-content position-relative",{"blurred-locked":!Ne(s).hasModule("pro_news")}])},[l("div",nre,[l("h4",ire,pe(o.value.cta),1),l("div",rre,[l("small",are,pe(o.value.pub_date),1)])]),l("div",ore,[l("div",{class:"summary-html p-3 bg-light rounded",innerHTML:o.value.summary},null,8,lre)]),l("div",ure,[C[5]||(C[5]=l("div",{class:"d-flex align-items-center gap-2 mb-3"},[l("i",{class:"bi bi-braces-asterisk text-primary fs-5"}),l("h6",{class:"fw-bold mb-0"},"Resumo")],-1)),l("div",cre,[l("div",dre,[l("div",hre,[l("div",fre,[l("span",{class:Me(["badge me-2 px-3 py-2",v(o.value.sentiment)]),"data-bs-toggle":"tooltip","data-bs-placement":"bottom",title:"Sentimento da notÃcia"},[l("i",{class:Me([g(o.value.sentiment),"me-1"])},null,2),Pe(" "+pe(y(o.value.sentiment)),1)],2),l("span",pre,[C[2]||(C[2]=l("i",{class:"bi bi-lightning-charge-fill text-warning me-1"},null,-1)),Pe(" "+pe(o.value.final_score||0),1)])]),(A=o.value.impact)!=null&&A.justification?($(),L("p",mre,' "'+pe(o.value.impact.justification)+'" ',1)):xe("",!0)]),l("div",gre,[l("div",vre,[(O=o.value.categories)!=null&&O.length?($(!0),L(Ze,{key:0},At(o.value.categories,J=>($(),L("span",{key:"cat-"+J,class:"badge bg-secondary text-white px-3 py-2"},[C[3]||(C[3]=l("i",{class:"bi bi-tag me-1"},null,-1)),Pe(pe(f(J)),1)]))),128)):xe("",!0),(te=(j=o.value.entities)==null?void 0:j.companies)!=null&&te.length?($(!0),L(Ze,{key:1},At(o.value.entities.companies,J=>
60($(),L("span",{key:"comp-"+J,class:"badge bg-primary text-white px-3 py-2"},pe(J),1))),128)):xe("",!0),(z=(B=o.value.entities)==null?void 0:B.tickers)!=null&&z.length?($(!0),L(Ze,{key:2},At(o.value.entities.tickers,J=>($(),L("span",{key:"tick-"+J,class:"badge bg-success text-white px-3 py-2"},[C[4]||(C[4]=l("i",{class:"bi bi-graph-up me-1"},null,-1)),Pe(pe(J),1)]))),128)):xe("",!0),!((re=o.value.categories)!=null&&re.length)&&!((X=(ne=o.value.entities)==null?void 0:ne.companies)!=null&&X.length)&&!((ce=(G=o.value.entities)==null?void 0:G.tickers)!=null&&ce.length)?($(),L("span",bre," Nenhuma entidade especÃfica detectada ")):xe("",!0)])])])])]),(be=o.value.related_news)!=null&&be.length?($(),L("div",yre,[C[7]||(C[7]=l("div",{class:"d-flex align-items-center gap-2 mb-3"},[l("i",{class:"bi bi-diagram-3 text-primary fs-5"}),l("h6",{class:"fw-bold mb-0"},"Assuntos relacionados")],-1)),l("div",_re,[($(!0),L(Ze,null,At(o.value.related_news,J=>($(),L("a",{href:"#",key:J.id,onClick:St(Z=>I(J.id),["prevent"]),class:"list-group-item list-group-item-action py-3 px-3 border rounded mb-2"},[l("div",wre,[C[6]||(C[6]=l("small",{class:"text-primary fw-medium"},[l("i",{class:"bi bi-stars me-1"}),Pe(" Recomendado ")],-1)),l("small",Ere,pe(x(J.pub_date)),1)]),l("p",Sre,pe(J.title),1)],8,xre))),128))])])):xe("",!0),l("div",{class:"mt-4 pt-3 border-top text-center"},[l("button",{onClick:P,class:"btn btn-outline-primary rounded-pill px-4"},[...C[8]||(C[8]=[l("i",{class:"bi bi-list me-2"},null,-1),Pe(" Ver todas as notÃcias ",-1)])])])],2)):($(),L("div",kre,[C[10]||(C[10]=l("i",{class:"bi bi-newspaper display-4 opacity-50"},null,-1)),C[11]||(C[11]=l("p",{class:"mt-2"},"Dados indisponÃveis",-1)),l("button",{onClick:E,class:"btn btn-primary btn-sm mt-3"},[...C[9]||(C[9]=[l("i",{class:"bi bi-arrow-left me-2"},null,-1),Pe("Voltar ",-1)])])])),Ne(s).hasModule("pro_news")?xe("",!0):($(),L("div",{key:3,class:"pro-watermark d-flex flex-column align-items-center justify-content-center",onClick:h},[...C[12]||(C[12]=[l("i",{class:"bi bi-lock"},null,-1),l("span",{class:"pro-text"},"Módulo NotÃcias",-1),l("small",null,"Adquira este recurso em Planos & Licenças",-1)])]))])}}},Pf=ls(Cre,[["__scopeId","data-v-2d286924"]]),Tre=Object.freeze(Object.defineProperty({__proto__:null,default:Pf},Symbol.toStringTag,{value:"Module"})),Are=pa("compass",{state:()=>({compassData:null,explanation:null,loadingCompass:!1,loadingExplanation:!1,errorCompass:null,errorExplanation:null}),getters:{currentScore:t=>{var e;return((e=t.compassData)==null?void 0:e.score)??0},currentVariation:t=>{var e;return((e=t.compassData)==null?void 0:e.variation)??0},previousScore:t=>t.compassData?t.compassData.score-t.compassData.variation:0,hasCompassData:t=>!!t.compassData,hasExplanationData:t=>!!t.explanation},actions:{async fetchCompass(t){var e,s,n,i;this.loadingCompass=!0,this.errorCompass=null,this.compassData=null,this.explanation=null;try{const o=await ct.get(`/api/assets/${t}/compass`);(e=o.data)!=null&&e.success?this.compassData=o.data.data:this.errorCompass=((s=o.data)==null?void 0:s.message)||"Erro ao carregar bússola."}catch(o){this.errorCompass=((i=(n=o.response)==null?void 0:n.data)==null?void 0:i.message)||"Erro de servidor ao buscar dados da bússola."}finally{this.loadingCompass=!1}},async fetchExplanation(t){var e,s,n,i;if(!this.explanation){this.loadingExplanation=!0,this.errorExplanation=null;try{const o=await ct.get(`/api/assets/${t}/compass/explanation`);(e=o.data)!=null&&e.success?this.explanation=o.data.data:this.errorExplanation=((s=o.data)==null?void 0:s.message)||"Erro ao carregar IA."}catch(o){this.errorExplanation=((i=(n=o.response)==null?void 0:n.data)==null?void 0:i.message)||"A IA não pôde analisar os dados no momento."}finally{this.loadingExplanation=!1}}},resetStore(){this.compassData=null,this.explanation=null,this.errorCompass=null,this.errorExplanation=null}}}),Ore={class:"asset-compass-component"},Dre={key:0,class:"text-center text-muted py-4"},Pre={key:1,class:"card"},$re={class:"card-body"},Ire={class:"d-flex align-items-center justify-content-between"},Mre={class:"d-flex align-items-end gap-2"},Nre={class:"display-6 fw-bold lh-1 text-light"},Lre={class:"text-end"},Rre={class:"chart-container"},Fre={class:"pt-4"},Vre={key:0,class:"text-center py-2"},Bre={key:1,class:"bg-light rounded p-3 text-muted small"},Ure={key:0,class:"text-secondary mb-0 me-2"},jre={key:0,class:"text-muted mt-2 explanation-content"},Hre=["innerHTML"],Wre={__name:"AssetCompass",props:{assetId:{type:Number,required:!0}},emits:["no-data","has-data"],setup(t,{emit:e}){const s=t,n=e,i=Are(),o=ve(!1),r=Ae(()=>{var C;return((C=i.compassData)==null?void 0:C.score)??i.currentScore??0}),c=Ae(()=>{var C;return((C=i.compassData)==null?void 0:C.previous_score)??null}),h=Ae(()=>{var C;return((C=i.compassData)==null?void 0:C.variation)??i.currentVariation??0}),f=Ae(()=>c.value!==null),v=async()=>{s.assetId&&(await i.fetchCompass(s.assetId),i.hasCompassData?(n("has-data"),i.fetchExplanation(s.assetId)):n("no-data"))};Xt(()=>v()),Pt(()=>s.assetId,()=>v(),{deep:!0});const g=(C,A)=>{try{return getComputedStyle(document.documentElement).getPropertyValue(C).trim()||A}catch{return A}},y=Ae(()=>{var A;return{favorable:g("--sentiment-positive","#149ea3"),neutral:g("--sentiment-neutral","#67808b"),unfavorable:g("--sentiment-negative","#ff6060")}[(A=i.compassData)==null?void 0:A.zone]||"#6c757d"}),x=Ae(()=>{var A;return{favorable:"Alta",neutral:"Neutra",unfavorable:"Baixa"}[(A=i.compassData)==null?void 0:A.zone]||"N/A"}),E=Ae(()=>{const C=h.value;return C>0?"text-success":C<0?"text-danger":"text-muted"}),P=Ae(()=>{const C=h.value;return C>0?"bi bi-arrow-up-short":C<0?"bi bi-arrow-down-short":"bi bi-dash"}),I=Ae(()=>{var C;return(C=i.explanation)!=null&&C.explanation?i.explanation.explanation.replace(/\n/g,"<br>"):""}),D=(C,A)=>{if(C.startsWith("#")){let O=C.replace("#","");O.length===3&&(O=O.split("").map(te=>te+te).join(""));const j=Math.round(A*255).toString(16).padStart(2,"0");return`#${O}${j}`}return C.startsWith("rgb(")?C.replace("rgb(","rgba(").replace(")",`, ${A})`):C},F=Ae(()=>{if(!i.hasCompassData)return{series:[]};const C=r.value,A=c.value,O=g("--sentiment-negative","#dc3545"),j=g("--sentiment-neutral","#67808b"),te=g("--sentiment-positive","#ff6060"),B=D(O,.25),z=D(j,.25),re=D(te,.25);let ne=j;C<=33?ne=O:C>=67&&(ne=te);const X=[];return f.value&&h.value!==0&&X.push({value:A,color:"#adb5bd",width:2,dashStyle:"Dash",zIndex:4,label:{text:"Ãltimo",align:"center",y:-12,style:{color:"#adb5bd",fontSize:"10px",fontWeight:"bold"}}}),{chart:{type:"gauge",backgroundColor:"transparent",height:150,spacing:[0,0,0,0]},title:{text:null},credits:{enabled:!1},tooltip:{enabled:!1},pane:{startAngle:-90,endAngle:90,background:null,center:["50%","85%"],size:"130%"},yAxis:{min:0,max:100,lineWidth:0,tickWidth:0,minorTickInterval:null,tickPositions:[0,100],labels:{enabled:!0,distance:30,style:{fontSize:"14px",fontWeight:"normal",color:"#67808b"},formatter:function(){return this.value===0?"Baixa":this.value===100?"Alta":""}},plotBands:[{from:0,to:32,color:O,radius:"100%",innerRadius:"90%"},{from:34,to:66,color:j,radius:"100%",innerRadius:"90%"},{from:68,to:100,color:te,radius:"100%",innerRadius:"90%"},{from:0,to:32,color:B,radius:"85%",innerRadius:"81%"},{from:34,to:66,color:z,radius:"85%",innerRadius:"81%"},{from:68,to:100,color:re,radius:"85%",innerRadius:"81%"}],plotLines:X},series:[{name:"Score",data:[C],dial:{radius:"80%",backgroundColor:ne,baseWidth:5,topWidth:3,baseLength:"0%",rearLength:"0%",borderColor:"#ffffff",borderWidth:2},pivot:{radius:4,backgroundColor:ne},dataLabels:{enabled:!1}}]}});return(C,A)=>{var j;const O=ur("highcharts");return $(),L("div",Ore,[Ne(i).loadingCompass&&!Ne(i).hasCompassData?($(),L("div",Dre,[...A[1]||(A[1]=[l("div",{class:"spinner-border spinner-border-sm text-primary",role:"status"},null,-1),l("p",{class:"text-muted small mt-2"},"Calculando tendência...",-1)])])):Ne(i).hasCompassData?($(),L("div",Pre,[l("div",$re,[l("div",Ire,[l("div",null,[l("div",Mre,[l("span",Nre,pe(r.value),1),A[2]||(A[2]=l("span",{class:"text-light pb-1"},"/ 100",-1))])]),l("div",Lre,[l("span",{class:"badge fw-bold px-3 py-2 d-block text-white",style:zs({backgroundColor:y.value})}
60,pe(x.value),5),f.value&&h.value!==0?($(),L("small",{key:0,class:Me(["variation-text",E.value])},[l("i",{class:Me(P.value)},null,2),Pe(" "+pe(Math.abs(h.value))+" vs último ",1)],2)):xe("",!0)])]),l("div",Rre,[et(O,{options:F.value},null,8,["options"])]),l("div",Fre,[Ne(i).loadingExplanation?($(),L("div",Vre,[...A[3]||(A[3]=[l("div",{class:"spinner-grow spinner-grow-sm text-secondary",role:"status"},null,-1)])])):Ne(i).hasExplanationData?($(),L("div",Bre,[l("div",{class:"d-flex justify-content-between align-items-center",style:{cursor:"pointer"},onClick:A[0]||(A[0]=te=>o.value=!o.value)},[(j=Ne(i).explanation)!=null&&j.summary?($(),L("p",Ure,pe(Ne(i).explanation.summary),1)):xe("",!0),l("i",{class:Me(["bi text-primary",o.value?"bi-chevron-up":"bi-chevron-down"])},null,2)]),o.value?($(),L("div",jre,[l("p",{class:"mb-0",innerHTML:I.value},null,8,Hre)])):xe("",!0)])):xe("",!0)])])])):xe("",!0)])}}},zre=ls(Wre,[["__scopeId","data-v-9b03beb1"]]),Yre={class:"asset-fundamentals-tab"},qre={key:0,class:"text-center text-muted py-4"},Gre={key:1,class:"fundamentals-content"},Xre={class:"d-flex justify-content-end mb-3 px-1"},Kre={class:"badge text-light"},Jre={key:0,class:"fundamentals-section"},Qre={class:"section-title mb-3",title:"Quanto o mercado cobra pelo lucro?"},Zre={class:"fundamentals-section"},eae={class:"position-relative"},tae={class:"metrics-grid"},sae={class:"metric-item"},nae={class:"metric-item"},iae={class:"text-dark",style:{"font-size":"0.8rem"}},rae={class:"metric-item"},aae={class:"text-dark",style:{"font-size":"0.8rem"}},oae={class:"metric-item"},lae={class:"text-dark"},uae={class:"fundamentals-section"},cae={class:"position-relative"},dae={class:"metrics-grid"},hae={class:"metric-item"},fae=["title"],pae={class:"metric-item"},mae={class:"text-dark"},gae={class:"metric-item"},vae={class:"metric-item"},bae=["title"],yae={class:"fundamentals-section"},_ae={class:"position-relative"},xae={class:"metrics-grid"},wae={class:"metric-item"},Eae={class:"text-muted d-block"},Sae={class:"metric-item"},kae={class:"text-muted d-block"},Cae={class:"text-dark"},Tae={class:"metric-item"},Aae={class:"text-muted d-block"},Oae={class:"metric-item"},Dae={class:"text-muted d-block"},Pae={class:"text-dark",style:{"font-size":"0.8rem"}},$ae={class:"metric-item"},Iae={class:"text-muted d-block"},Mae={class:"fundamentals-section"},Nae={class:"position-relative"},Lae={class:"metrics-grid"},Rae={class:"metric-item"},Fae={class:"text-muted d-block"},Vae={class:"metric-item"},Bae={class:"text-muted d-block"},Uae={class:"metric-item"},jae={class:"text-muted d-block"},Hae={class:"metric-item"},Wae={class:"text-muted d-block"},zae={class:"fundamentals-section"},Yae={class:"position-relative"},qae={class:"metrics-grid"},Gae={class:"metric-item"},Xae={class:"text-muted d-block"},Kae={class:"metric-item"},Jae={class:"text-muted d-block"},Qae={class:"fundamentals-section mb-4"},Zae={class:"position-relative"},eoe={class:"metrics-grid"},toe={class:"metric-item"},soe={class:"text-danger"},noe={class:"metric-item"},ioe={class:"text-success"},roe={class:"metric-item"},aoe={class:"metric-item"},ooe={class:"fundamentals-section"},loe={class:"position-relative"},uoe={class:"metrics-grid mb-3"},coe={class:"metric-item"},doe={class:"text-muted d-block"},hoe={class:"metric-item"},foe={class:"text-success"},poe={key:0,class:"mt-3"},moe={class:"d-flex justify-content-between align-items-center mb-2"},goe={class:"d-flex justify-content-between align-items-start mb-1"},voe={class:"row g-0 mt-2 border-top pt-2"},boe={class:"col-6"},yoe={class:"d-flex flex-column"},_oe={class:"fw-bold text-dark",style:{"font-size":"0.75rem"}},xoe={class:"col-6 text-end border-start ps-2"},woe={class:"d-flex flex-column"},Eoe={class:"text-dark",style:{"font-size":"0.75rem"}},Soe={key:0,class:"mt-1"},koe={class:"text-muted",style:{"font-size":"0.6rem"}},Coe={key:1,class:"empty-state text-center py-4 mb-4 text-muted"},Toe={class:"fundamentals-section mt-2"},Aoe={key:0,class:"text-center py-4"},Ooe={class:"news-list"},Doe=["onClick"],Poe={class:"card-body p-2 px-3"},$oe={class:"d-flex align-items-center gap-2 mb-2"},Ioe={class:"text-muted small ms-auto"},Moe={class:"fw-bold text-dark lh-sm mb-2",style:{"font-size":"0.95rem"}},Noe={class:"d-flex flex-wrap gap-2 align-items-center mt-2"},Loe={class:"badge bg-light text-dark small border"},Roe={key:2,class:"empty-state text-center py-5 text-muted"},Foe={__name:"AssetFundamentalsTab",props:{asset:{type:Object,required:!0}},setup(t){const e=gi(),s=tn(),n=t,i=Mn(),o=ve(!1),r=ve(null),c=ve([]),h=ve(!1),f=ve([]),v=ve(!1),g=ve(!0),y=Ae(()=>{var H;return n.asset?(((H=n.asset.category)==null?void 0:H.slug)||n.asset.category_slug||"")==="acoes":!1}),x=Ae(()=>{var Ee;if(!n.asset)return!1;const K=((Ee=n.asset.category)==null?void 0:Ee.slug)||n.asset.category_slug||"";return!["renda-fixa","tesouro-direto","tesouro","cdb","lci-lca","criptomoedas","outros"].includes(K)}
60),E=Ae(()=>{var H;if(!n.asset)return!1;const K=((H=n.asset.category)==null?void 0:H.slug)||n.asset.category_slug||"";return K==="fiis"||K==="fii"}),P=Ae(()=>!c.value||!c.value.length?[]:[...c.value].sort((K,H)=>new Date(H.payment_date)-new Date(K.payment_date))),I=Ae(()=>h.value?P.value:P.value.slice(0,3)),D=Ae(()=>r.value&&r.value.last_dividend_value?r.value.last_dividend_value:P.value&&P.value.length>0?P.value[0].rate||P.value[0].amount_per_share:null),F=Ae(()=>{if(!r.value)return 0;const K=Number(r.value.total_debt||0),H=Number(r.value.total_cash||0);return K-H}),C=Ae(()=>{if(!r.value)return 0;const K=Number(r.value.enterprise_value||0),H=Number(r.value.enterprise_to_ebitda||0);if(K===0||H===0)return 0;const Ee=K/H;return F.value/Ee}),A=()=>{document.querySelectorAll(".tooltip").forEach(H=>H.remove()),i.close(),e.push("/my-account/plans")},O=K=>{if(K==null||isNaN(K))return"-";const H=Number(K);if(H===0)return"-";const Ee=Math.abs(H),_e=H<0?"-":"";return Ee>=1e9?`${_e}R$ ${(Ee/1e9).toFixed(1)}B`:Ee>=1e6?`${_e}R$ ${(Ee/1e6).toFixed(1)}M`:`${_e}R$ ${Ee.toLocaleString("pt-BR")}`},j=(K,H=2)=>K==null||isNaN(K)?"-":Number(K).toFixed(H),te=K=>K==null||isNaN(K)?"-":Number(K).toLocaleString("pt-BR"),B=K=>K==null||isNaN(K)?"-":`R$ ${Number(K).toFixed(4)}`,z=K=>{if(!K)return"N/A";const H=new Date(K);return new Date(H.getTime()+Math.abs(H.getTimezoneOffset()*6e4)).toLocaleDateString("pt-BR")},re=K=>{if(K==null||isNaN(K))return"-";let H=Number(K);return Math.abs(H)>0&&Math.abs(H)<=1&&(H=H*100),`${H.toFixed(2)}%`},ne=(K,H="default")=>{if(K==null||isNaN(K))return"text-muted";const Ee=Number(K);return H==="price_to_book"?Ee<0?"text-muted":Ee<=1.5?"text-success":Ee>3?"text-danger":"text-dark":H==="price_to_earnings"?Ee<=0?"text-muted":Ee<=10?"text-success":Ee>25?"text-danger":"text-dark":H==="low_is_better"?Ee<=0?"text-muted":Ee<8?"text-success":Ee>15?"text-danger":"text-dark":H==="debt_ratio"?Ee<=2?"text-success":Ee>=3.5?"text-danger":"text-warning":["margin","return","growth"].includes(H)?Ee>0?"text-success":Ee<0?"text-danger":"text-muted":"text-dark"},X=K=>({dividend:"bg-primary",jcp:"bg-success",income:"bg-info",bonus:"bg-warning",interest:"bg-secondary"})[K]||"bg-secondary",G=K=>({dividend:"DIV",jcp:"JCP",income:"REND",bonus:"BONUS",interest:"JUR"})[K]||K.toUpperCase(),ce={acoes:"Ações",fiis:"FIIs",bdr:"BDRs",etf:"ETFs",cripto:"Cripto",renda_fixa:"Renda Fixa",tesouro:"Tesouro",futuros:"Futuros",cambio:"Moedas",commodities:"Commodities",macro:"Macro",politica:"PolÃtica",empresas:"Empresas",internacional:"Internacional",indicadores:"Indicadores",outros:"Outros"},be=K=>ce[K]||K||"Geral",J=K=>({positive:"bg-success",negative:"bg-danger",neutral:"bg-secondary"})[K]||"bg-secondary",Z=K=>({positive:"bi-arrow-up-circle",negative:"bi-arrow-down-circle",neutral:"bi-dash-circle"})[K]||"bi-dash-circle",ge=K=>({positive:"Positiva",negative:"Negativa",neutral:"Neutra"})[K]||"Neutra",q=K=>{if(!K)return"";if(K.includes("-")&&K.includes(":")){const Ee=new Date(K.replace(" ","T")),_e=Math.floor((new Date-Ee)/1e3);if(_e<60)return`${_e} seg`;const Ce=Math.floor(_e/60);if(Ce<60)return`${Ce} min`;const Re=Math.floor(Ce/60);if(Re<24)return`${Re} h`;const Ke=Math.floor(Re/24);if(Ke<30)return Ke===1?"1 dia":`${Ke} dias`;const Be=Math.floor(Ke/30);if(Be<12)return Be===1?"1 mês":`${Be} meses`;const Te=Math.floor(Ke/365);return Te===1?"1 ano":`${Te} anos`}let H=K.toLowerCase();return H=H.replace(" ago","").replace(" from now",""),H=H.replace("seconds","seg").replace("second","seg"),H=H.replace("minutes","min").replace("minute","min"),H=H.replace("hours","h").replace("hour","h"),H=H.replace("days","dias").replace("day","dia"),H=H.replace("months","meses").replace("month","mês"),H=H.replace("years","anos").replace("year","ano"),H=H.replace(/^a /g,"1 ").replace(/^an /g,"1 "),H},W=async()=>{var K,H,Ee,_e,Ce,Re,Ke;if(!((K=n.asset)!=null&&K.id)||!x.value){r.value=null,c.value=[],o.value=!1;return}o.value=!0;try{const[Be,Te]=await Promise.all([ct.get("/api/assets/fundamentals",{params:{asset_id:n.asset.id}}),ct.get("/api/assets/dividends",{params:{asset_id:n.asset.id}})]);if((H=Be.data)!=null&&H.success&&((_e=(Ee=Be.data)==null?void 0:Ee.data)!=null&&_e.fundamentals)){let Q=Be.data.data.fundamentals.metadata;if(typeof Q=="string")try{Q=JSON.parse(Q)}catch{Q={}}r.value={...Be.data.data.fundamentals,metadata:Q||{},total_debt:Be.data.data.fundamentals.total_debt||0,total_cash:Be.data.data.fundamentals.total_cash||0}}else r.value=null;if((Ce=Te.data)!=null&&Ce.success&&((Ke=(Re=Te.data)==null?void 0:Re.data)!=null&&Ke.dividends)){const Q=new Date;c.value=Te.data.data.dividends.map(Se=>{const Ve=new Date(Se.payment_date),Qe=Se.amount_per_share||Se.rate||0;return{...Se,formatted_rate:`R$ ${Number(Qe).toFixed(6)}`,formatted_payment_date:Ve.toLocaleDateString("pt-BR"),css_class:Ve>Q?"future-dividend":""}})}else c.value=[]}catch(Be){console.error("Erro ao carregar dados fundamentalistas:",Be),r.value=null,c.value=[]}finally{o.value=!1}},M=async()=>{var H,Ee,_e,Ce,Re,Ke,Be,Te;let K=(H=n.asset)==null?void 0:H.code;
60if(!x.value){const Q=((_e=(Ee=n.asset)==null?void 0:Ee.category)==null?void 0:_e.slug)||"";if(["tesouro","tesouro-direto"].includes(Q)){const Se=(((Ce=n.asset)==null?void 0:Ce.name)||((Re=n.asset)==null?void 0:Re.code)||"").toLowerCase();Se.includes("ipca")?K="Tesouro IPCA":Se.includes("selic")?K="Tesouro Selic":Se.includes("prefixado")?K="Tesouro Prefixado":K="Tesouro Direto"}else K=((Be=(Ke=n.asset)==null?void 0:Ke.category)==null?void 0:Be.name)||((Te=n.asset)==null?void 0:Te.name)}if(K){v.value=!0;try{const Q=await ct.get("/api/news/search",{params:{q:K}});Q.data&&Q.data.success&&(f.value=Q.data.data.slice(0,5))}catch(Q){console.error("Erro ao buscar notÃcias do ativo:",Q)}finally{v.value=!1}}},he=(K,H)=>{s.isPro&&i.open(cr(Pf),{newsId:K.id,news:K,title:"NotÃcia"})},oe=()=>{i.open(cr(j_),{title:"Todas as notÃcias"})};return Xt(()=>{W(),M()}),Pt(()=>{var K;return(K=n.asset)==null?void 0:K.id},K=>{K&&(g.value=!0,W(),M())},{immediate:!1}),(K,H)=>{var _e,Ce,Re,Ke,Be,Te,Q,Se,Ve,Qe;const Ee=yd("tooltip");return $(),L("div",Yre,[o.value?($(),L("div",qre,[...H[16]||(H[16]=[l("div",{class:"spinner-border",role:"status"},[l("span",{class:"visually-hidden"},"Carregando...")],-1),l("p",{class:"text-muted small mt-2"},"Carregando dados...",-1)])])):($(),L("div",Gre,[x.value?($(),L(Ze,{key:0},[r.value?($(),L(Ze,{key:0},[l("div",Xre,[l("span",Kre,[H[17]||(H[17]=l("i",{class:"bi bi-calendar-check me-1"},null,-1)),Pe(" Atualizado: "+pe(z(r.value.last_financial_update)),1)])]),y.value&&g.value?($(),L("div",Jre,[l("h6",Qre,[H[19]||(H[19]=l("i",{class:"bi bi-speedometer2 text-primary me-2"},null,-1)),H[20]||(H[20]=Pe(" Atratividade ",-1)),_t(($(),L("a",{href:"#",onClick:H[0]||(H[0]=St(je=>K.$openHelp("atratividade-de-um-ativo",!0),["prevent"])),"data-bs-placement":"right",title:"Atratividade de um ativo"},[...H[18]||(H[18]=[l("i",{class:"bi bi-question-circle-fill text-secondary mx-2"},null,-1)])])),[[Ee]])]),(_e=n.asset)!=null&&_e.id?($(),Ut(zre,{key:0,assetId:n.asset.id,onNoData:H[1]||(H[1]=je=>g.value=!1),onHasData:H[2]||(H[2]=je=>g.value=!0)},null,8,["assetId"])):xe("",!0)])):xe("",!0),E.value?($(),L(Ze,{key:1},[l("div",Zre,[H[26]||(H[26]=l("h6",{class:"section-title mb-3",title:"Valuation e Patrimônio"},[l("i",{class:"bi bi-building text-primary me-2"}),Pe(" Patrimônio & Valuation ")],-1)),l("div",eae,[l("div",{class:Me({"blurred-locked":!Ne(s).isPro})},[l("div",tae,[l("div",sae,[H[21]||(H[21]=l("small",{class:"text-muted d-block"},"P/VP",-1)),l("strong",{class:Me(ne(r.value.price_to_book,"price_to_book"))},pe(j(r.value.price_to_book,2)),3)]),l("div",nae,[H[22]||(H[22]=l("small",{class:"text-muted d-block"},"Patrimônio LÃquido",-1)),l("strong",iae,pe(O(r.value.enterprise_value)),1)]),l("div",rae,[H[23]||(H[23]=l("small",{class:"text-muted d-block"},"Total de Ativos",-1)),l("strong",aae,pe(O((Ce=r.value.metadata)==null?void 0:Ce.total_assets)),1)]),l("div",oae,[H[24]||(H[24]=l("small",{class:"text-muted d-block"},"Cotas Emitidas",-1)),l("strong",lae,pe(te((Re=r.value.metadata)==null?void 0:Re.shares_outstanding)),1)])])],2),Ne(s).isPro?xe("",!0):($(),L("div",{key:0,class:"lock-overlay d-flex align-items-center justify-content-center rounded",onClick:A},[...H[25]||(H[25]=[l("i",{class:"bi bi-lock","data-bs-toggle":"tooltip","data-bs-placement":"bottom",title:"Adquira em Planos & Licenças"},null,-1)])]))])]),l("div",uae,[H[32]||(H[32]=l("h6",{class:"section-title mb-3",title:"Informações do Fundo"},[l("i",{class:"bi bi-info-circle text-info me-2"}),Pe(" Dados do Fundo ")],-1)),l("div",cae,[l("div",{class:Me({"blurred-locked":!Ne(s).isPro})},[l("div",dae,[l("div",hae,[H[27]||(H[27]=l("small",{class:"text-muted d-block"},"Segmento",-1)),l("strong",{class:"text-dark text-truncate d-block",title:(Ke=r.value.metadata)==null?void 0:Ke.segment},pe(((Be=r.value.metadata)==null?void 0:Be.segment)||"-"),9,fae)]),l("div",pae,[H[28]||(H[28]=l("small",{class:"text-muted d-block"},"Cotistas",-1)),l("strong",mae,pe(te((Te=r.value.metadata)==null?void 0:Te.total_investors)),1)]),l("div",gae,[H[29]||(H[29]=l("small",{class:"text-muted d-block"},"Retorno Mensal",-1)),l("strong",{class:Me(ne((Q=r.value.metadata)==null?void 0:Q.monthly_return,"return"))},pe(re((Se=r.value.metadata)==null?void 0:Se.monthly_return)),3)]),l("div",vae,[H[30]||(H[30]=l("small",{class:"text-muted d-block"},"Administrador",-1)),l("strong",{class:"text-dark text-truncate d-block",title:(Ve=r.value.metadata)==null?void 0:Ve.administrator,style:{"font-size":"0.75rem"}},pe(((Qe=r.value.metadata)==null?void 0:Qe.administrator)||"-"),9,bae)])])],2),Ne(s).isPro?xe("",!0):($(),L("div",{key:0,class:"lock-overlay d-flex align-items-center justify-content-center rounded",onClick:A},[...H[31]||(H[31]=[l("i",{class:"bi bi-lock","data-bs-toggle":"tooltip","data-bs-placement":"bottom",title:"Adquira em Planos & Licenças"},null,-1)])]))])])],64)):xe("",!0),E.value?xe("",!0):($(),L(Ze,{key:2},[l("div",yae,[H[44]||(H[44]=l("h6",{class:"section-title mb-3",title:"Quanto o mercado cobra pelo lucro?"},[l("i",{class:"bi bi-graph-up-arrow text-primary me-2"}),Pe(" Valuation ")],-1)),l("div",_ae,[l("div",{class:Me({"blurred-locked":!Ne(s).isPro})},[l("div",xae,[l("div",wae,[l("small",Eae,[H[34]||(H[34]=Pe(" P/L ",-1)),_t(($(),L("a",{href:"#",onClick:H[3]||(H[3]=St(je=>K.$openHelp("pl",!0),["prevent"])),"data-bs-placement":"right",title:"Preço sobre lucro"},[...H[33]||(H[33]=[l("i",{class:"bi bi-question-circle-fill text-secondary mx-2"},null,-1)])])),[[Ee]])]),l("strong",{class:Me(ne(r.value.price_to_earnings,"price_to_earnings"))},pe(j(r.value.price_to_earnings,1)),3)]),l("div",Sae,[l("small",kae,[H[36]||(H[36]=Pe("LPA (Earnings) ",-1)),_t(($(),L("a",{href:"#",onClick:H[4]||(H[4]=St(je=>K.$openHelp("lpa",!0),["prevent"])),"data-bs-placement":"right",title:"Lucro por Ação"},[...H[35]||(H[35]=[l("i",{class:"bi bi-question-circle-fill text-secondary mx-2"}
60,null,-1)])])),[[Ee]])]),l("strong",Cae,pe(B(r.value.earnings_per_share)),1)]),l("div",Tae,[l("small",Aae,[H[38]||(H[38]=Pe("P/VP ",-1)),_t(($(),L("a",{href:"#",onClick:H[5]||(H[5]=St(je=>K.$openHelp("pvp",!0),["prevent"])),"data-bs-placement":"right",title:"Preço sobre Valor Patrimonial"},[...H[37]||(H[37]=[l("i",{class:"bi bi-question-circle-fill text-secondary mx-2"},null,-1)])])),[[Ee]])]),l("strong",{class:Me(ne(r.value.price_to_book,"price_to_book"))},pe(j(r.value.price_to_book,1)),3)]),l("div",Oae,[l("small",Dae,[H[40]||(H[40]=Pe("Firm Value (EV) ",-1)),_t(($(),L("a",{href:"#",onClick:H[6]||(H[6]=St(je=>K.$openHelp("firm-value-ev",!0),["prevent"])),"data-bs-placement":"right",title:"Valor real de uma empresa"},[...H[39]||(H[39]=[l("i",{class:"bi bi-question-circle-fill text-secondary mx-2"},null,-1)])])),[[Ee]])]),l("strong",Pae,pe(O(r.value.enterprise_value)),1)]),l("div",$ae,[l("small",Iae,[H[42]||(H[42]=Pe("EV / EBITDA ",-1)),_t(($(),L("a",{href:"#",onClick:H[7]||(H[7]=St(je=>K.$openHelp("ev-ebitda",!0),["prevent"])),"data-bs-placement":"right",title:"EV/EBITDA"},[...H[41]||(H[41]=[l("i",{class:"bi bi-question-circle-fill text-secondary mx-2"},null,-1)])])),[[Ee]])]),l("strong",{class:Me(ne(r.value.enterprise_to_ebitda,"low_is_better"))},pe(j(r.value.enterprise_to_ebitda,1)),3)])])],2),Ne(s).isPro?xe("",!0):($(),L("div",{key:0,class:"lock-overlay d-flex align-items-center justify-content-center rounded",onClick:A},[...H[43]||(H[43]=[l("i",{class:"bi bi-lock","data-bs-toggle":"tooltip","data-bs-placement":"bottom",title:"Adquira em Planos & Licenças"},null,-1)])]))])]),l("div",Mae,[H[54]||(H[54]=l("h6",{class:"section-title mb-3",title:"Essa empresa sabe ganhar dinheiro?"},[l("i",{class:"bi bi-lightning-charge text-warning me-2"}),Pe(" Rentabilidade & Eficiência ")],-1)),l("div",Nae,[l("div",{class:Me({"blurred-locked":!Ne(s).isPro})},[l("div",Lae,[l("div",Rae,[l("small",Fae,[H[46]||(H[46]=Pe("ROE ",-1)),_t(($(),L("a",{href:"#",onClick:H[8]||(H[8]=St(je=>K.$openHelp("roe",!0),["prevent"])),"data-bs-placement":"right",title:"Retorno sobre o Patrimônio LÃquido"},[...H[45]||(H[45]=[l("i",{class:"bi bi-question-circle-fill text-secondary mx-2"},null,-1)])])),[[Ee]])]),l("strong",{class:Me(ne(r.value.return_on_equity,"return"))},pe(re(r.value.return_on_equity)),3)]),l("div",Vae,[l("small",Bae,[H[48]||(H[48]=Pe("ROA ",-1)),_t(($(),L("a",{href:"#",onClick:H[9]||(H[9]=St(je=>K.$openHelp("roa",!0),["prevent"])),"data-bs-placement":"right",title:"Retorno sobre Ativos"},[...H[47]||(H[47]=[l("i",{class:"bi bi-question-circle-fill text-secondary mx-2"},null,-1)])])),[[Ee]])]),l("strong",{class:Me(ne(r.value.return_on_assets,"return"))},pe(re(r.value.return_on_assets)),3)]),l("div",Uae,[l("small",jae,[H[50]||(H[50]=Pe("Margem LÃquida ",-1)),_t(($(),L("a",{href:"#",onClick:H[10]||(H[10]=St(je=>K.$openHelp("margem-liquida",!0),["prevent"])),"data-bs-placement":"right",title:"Margem LÃquida"},[...H[49]||(H[49]=[l("i",{class:"bi bi-question-circle-fill text-secondary mx-2"},null,-1)])])),[[Ee]])]),l("strong",{class:Me(ne(r.value.profit_margins,"margin"))},pe(re(r.value.profit_margins)),3)]),l("div",Hae,[l("small",Wae,[H[52]||(H[52]=Pe("Margem EBITDA ",-1)),_t(($(),L("a",{href:"#",onClick:H[11]||(H[11]=St(je=>K.$openHelp("margem-ebitda",!0),["prevent"])),"data-bs-placement":"right",title:"Margem EBITDA"},[...H[51]||(H[51]=[l("i",{class:"bi bi-question-circle-fill text-secondary mx-2"},null,-1)])])),[[Ee]])]),l("strong",{class:Me(ne(r.value.ebitda_margins,"margin"))},pe(re(r.value.ebitda_margins)),3)])])],2),Ne(s).isPro?xe("",!0):($(),L("div",{key:0,class:"lock-overlay d-flex align-items-center justify-content-center rounded",onClick:A},[...H[53]||(H[53]=[l("i",{class:"bi bi-lock","data-bs-toggle":"tooltip","data-bs-placement":"bottom",title:"Adquira em Planos & Licenças"},null,-1)])]))])]),l("div",zae,[H[60]||(H[60]=l("h6",{class:"section-title mb-3",title:"Sem crescimento, barato é armadilha"},[l("i",{class:"bi bi-rocket-takeoff text-info me-2"}),Pe(" Crescimento (YoY) ")],-1)),l("div",Yae,[l("div",{class:Me({"blurred-locked":!Ne(s).isPro})},[l("div",qae,[l("div",Gae,[l("small",Xae,[H[56]||(H[56]=Pe("Lucros ",-1)),_t(($(),L("a",{href:"#",onClick:H[12]||(H[12]=St(je=>K.$openHelp("crescimento-lucros-yoy",!0),["prevent"])),"data-bs-placement":"right",title:"Evolução anual de lucro"},[...H[55]||(H[55]=[l("i",{class:"bi bi-question-circle-fill text-secondary mx-2"},null,-1)])])),[[Ee]])]),l("strong",{class:Me(ne(r.value.earnings_growth,"growth"))},pe(re(r.value.earnings_growth)),3)]),l("div",Kae,[l("small",Jae,[H[58]||(H[58]=Pe("Receita ",-1)),_t(($(),L("a",{href:"#",onClick:H[13]||(H[13]=St(je=>K.$openHelp("crescimento-receita-yoy",!0),["prevent"])),"data-bs-placement":"right",title:"Evolução anual de receita"},[...H[57]||(H[57]=[l("i",{class:"bi bi-question-circle-fill text-secondary mx-2"},null,-1)])])),[[Ee]])]),l("strong",{class:Me(ne(r.value.revenue_growth,"growth"))},pe(re(r.value.revenue_growth)),3)])])],2),Ne(s).isPro?xe("",!0):($(),L("div",{key:0,class:"lock-overlay d-flex align-items-center justify-content-center rounded",onClick:A},[...H[59]||(H[59]=[l("i",{class:"bi bi-lock","data-bs-toggle":"tooltip","data-bs-placement":"bottom",title:"Adquira em Planos & Licenças"},null,-1)])]))])]),l("div",Qae,[H[66]||(H[66]=l("h6",{class:"section-title mb-3",title:"Check rápido de risco"},[l("i",{class:"bi bi-shield-check text-secondary me-2"}),Pe(" Solidez Financeira ")],-1)),l("div",Zae,[l("div",{class:Me({"blurred-locked":!Ne(s).isPro})},[l("div",eoe,[l("div",toe,[H[61]||(H[61]=l("small",{class:"text-muted d-block"},"DÃvida Total",-1)),l("strong",soe,pe(O(r.value.total_debt)),1)]),l("div",noe,[H[62]||(H[62]=l("small",{class:"text-muted d-block"},"Caixa Total",-1)),l("strong",ioe,pe(O(r.value.total_cash)),1)]),l("div",roe,[H[63]||(H[63]=l("small",{class:"text-muted d-block"},"DÃvida LÃquida",-1)),l("strong",{class:Me(F.value>0?"text-danger":"text-success")},pe(O(F.value)),3)]),l("div",aoe,[H[64]||(H[64]=l("small",{class:"text-muted d-block"},"DÃv. LÃq. / EBITDA",-1)),l("strong",{class:Me(ne(C.value,"debt_ratio"))},pe(j(C.value,1))+"x ",3)])])],2),Ne(s).isPro?xe("",!0):($(),L("div",{key:0,class:"lock-overlay d-flex align-items-center justify-content-center rounded",onClick:A},[...H[65]||(H[65]=[l("i",{class:"bi bi-lock","data-bs-toggle":"tooltip","data-bs-placement":"bottom",title:"Adquira em Planos & Licenças"},null,-1)])]))])])],64)),l("div",ooe,[H[76]||(H[76]=l("h6",{class:"section-title mb-3",title:"Quanto pinga no bolso?"},[l("i",{class:"bi bi-cash-coin text-success me-2"}),Pe(" Dividendos & Proventos ")],-1)),l("div",loe,[l("div",{class:Me({"blurred-locked":!Ne(s).isPro})},[l("div",uoe,[l("div",coe,[l("small",doe,[H[68]||(H[68]=Pe("Dividend Yield ",-1)),_t(($(),L("a",{href:"#",onClick:H[14]||(H[14]=St(je=>K.$openHelp("dividend-yield-completo",!0),["prevent"])),"data-bs-placement":"right",title:"Dividend Yield"},[...H[67]||(H[67]=[l("i",{class:"bi bi-question-circle-fill text-secondary mx-2"},null,-1)])])),[[Ee]])]),l("strong",{class:Me(ne(r.value.dividend_yield,"margin"))},pe(re(r.value.dividend_yield)),3)]),l("div",hoe,[H[69]||(H[69]=l("small",{class:"text-muted d-block"},"Ãltimo Provento",-1)),l("strong",foe,pe(B(D.value)),1)])]),c.value.length>0?($(),L("div",poe,[l("div",moe,[H[70]||(H[70]=l("small",{class:"text-muted fw-bold"},"Relação de proventos",-1)),P.value.length>3?($(),L("button",{key:0,onClick:H[15]||(H[15]=je=>
60h.value=!h.value),class:"btn btn-link btn-sm p-0 text-primary text-decoration-none"},pe(h.value?"Ver menos":"Ver todos"),1)):xe("",!0)]),($(!0),L(Ze,null,At(I.value,je=>($(),L("div",{key:je.id,class:Me(["dividend-card mb-2 p-2 border rounded shadow-sm",je.css_class])},[l("div",goe,[l("span",{class:Me(["badge",X(je.type)])},pe(G(je.type)),3),l("strong",{class:Me(new Date(je.payment_date)>new Date?"text-primary":"text-dark")}," R$ "+pe(Number(je.rate).toFixed(4)),3)]),l("div",voe,[l("div",boe,[l("div",yoe,[H[72]||(H[72]=l("small",{class:"text-muted",style:{"font-size":"0.65rem"}},"Data de Pagamento",-1)),l("small",_oe,[H[71]||(H[71]=l("i",{class:"bi bi-calendar-event me-1"},null,-1)),Pe(pe(z(je.payment_date)),1)])])]),l("div",xoe,[l("div",woe,[H[73]||(H[73]=l("small",{class:"text-muted",style:{"font-size":"0.65rem"}},"Data EX (Base)",-1)),l("small",Eoe,pe(z(je.record_date)),1)])])]),je.approved_on?($(),L("div",Soe,[l("small",koe,[H[74]||(H[74]=l("i",{class:"bi bi-check2-circle me-1"},null,-1)),Pe("Aprovado em: "+pe(z(je.approved_on)),1)])])):xe("",!0)],2))),128))])):xe("",!0)],2),Ne(s).isPro?xe("",!0):($(),L("div",{key:0,class:"lock-overlay d-flex align-items-center justify-content-center rounded",onClick:A},[...H[75]||(H[75]=[l("i",{class:"bi bi-lock","data-bs-toggle":"tooltip","data-bs-placement":"bottom",title:"Adquira em Planos & Licenças"},null,-1)])]))])])],64)):($(),L("div",Coe,[H[78]||(H[78]=l("i",{class:"bi bi-calculator display-4 opacity-50"},null,-1)),H[79]||(H[79]=l("p",{class:"mt-2"},"Dados fundamentalistas não disponÃveis",-1)),l("button",{class:"btn btn-sm btn-outline-primary mt-2",onClick:W},[...H[77]||(H[77]=[l("i",{class:"bi bi-arrow-clockwise me-1"},null,-1),Pe(" Tentar Novamente ",-1)])])]))],64)):xe("",!0),l("div",Toe,[v.value?($(),L("div",Aoe,[...H[80]||(H[80]=[l("div",{class:"spinner-border spinner-border-sm text-primary mb-2",role:"status"},[l("span",{class:"visually-hidden"},"Carregando...")],-1),l("p",{class:"text-muted small"},"Buscando notÃcias relacionadas...",-1)])])):f.value.length>0?($(),L(Ze,{key:1},[l("div",{class:"d-flex justify-content-between align-items-center mb-3"},[H[82]||(H[82]=l("h6",{class:"section-title mb-0 border-0",title:"Ãltimas notÃcias do ativo"},[l("i",{class:"bi bi-newspaper text-primary me-2"}),Pe(" NotÃcias Relacionadas ")],-1)),l("button",{class:"btn btn-link btn-sm p-0 text-primary text-decoration-none",onClick:oe},[...H[81]||(H[81]=[Pe(" Ver todas ",-1),l("i",{class:"bi bi-arrow-right"},null,-1)])])]),l("div",Ooe,[($(!0),L(Ze,null,At(f.value,(je,nt)=>($(),L("div",{key:je.id,class:Me(["news-item mb-3 position-relative",{"is-locked":!Ne(s).hasModule("pro_news")}]),onClick:ft=>he(je)},[l("div",{class:Me(["card cursor-pointer",{"blurred-locked":!Ne(s).hasModule("pro_news")}])},[l("div",Poe,[l("div",$oe,[l("span",Ioe,pe(q(je.pub_date||je.pub_date_raw)),1)]),l("h6",Moe,pe(je.cta||je.title),1),l("div",Noe,[l("span",Loe,[H[83]||(H[83]=l("i",{class:"bi bi-tag me-1"},null,-1)),Pe(" "+pe(be(je.primary_category||je.category)),1)]),l("span",{class:Me(["badge ms-auto",J(je.sentiment)])},[l("i",{class:Me([Z(je.sentiment),"me-1"])},null,2),Pe(" "+pe(ge(je.sentiment)),1)],2)])])],2),Ne(s).hasModule("pro_news")?xe("",!0):($(),L("div",{key:0,class:"lock-overlay d-flex align-items-center justify-content-center rounded",onClick:A},[...H[84]||(H[84]=[l("i",{class:"bi bi-lock","data-bs-toggle":"tooltip","data-bs-placement":"bottom",title:"Adquira em Planos & Licenças"},null,-1)])]))],10,Doe))),128))])],64)):x.value?xe("",!0):($(),L("div",Roe,[...H[85]||(H[85]=[l("i",{class:"bi bi-newspaper display-4 opacity-25"},null,-1),l("p",{class:"mt-3"},[Pe("Nenhuma notÃcia recente encontrada"),l("br"),Pe("para este ativo.")],-1)])]))])]))])}}},Voe=ls(Foe,[["__scopeId","data-v-afa5360c"]]),Boe={class:"container-fluid"},Uoe={class:"row g-3"},joe={class:"col-12"},Hoe={class:"row g-3"},Woe={class:"col-md-6"},zoe={class:"dropdown"},Yoe={class:"dropdown-menu w-100"},qoe={class:"dropdown-item disabled",href:"#"},Goe={key:0,class:"col-md-6"},Xoe={class:"input-group input-group-floating"},Koe={class:"form-floating flex-fill"},Joe=["value"],Qoe={key:1,class:"col-md-6 position-relative z-index-dynamic"},Zoe={class:"input-group input-group-floating"},ele={class:"form-floating flex-fill"},tle={value:""},sle=["value"],nle=["value"],ile={class:"col-12"},rle={class:"row g-3"},ale={class:"col-md-6"},ole={class:"input-group input-group-floating"},lle={class:"form-floating flex-fill position-relative"},ule={class:"col-md-6"},cle={class:"input-group input-group-floating"},dle={class:"col-12"},hle={class:"row g-3"},fle={class:"col-md-6"},ple={class:"input-group input-group-floating"},mle={class:"col-md-6"},gle={class:"input-group input-group-floating"},vle={key:1,class:"col-12"},ble={class:"row g-3"},yle={class:"col-12"},_le={class:"input-group input-group-floating"},xle={class:"form-floating flex-fill position-relative"},wle={class:"col-12"},Ele={class:"input-group input-group-floating"},Sle={class:"col-md-6"},kle={class:"card h-100 shadow-sm"},Cle={class:"card-body"},Tle={class:"vstack gap-3"},Ale={class:"input-group input-group-floating"},Ole={class:"input-group input-group-floating"},Dle={class:"col-md-6"},Ple={class:"card h-100 shadow-sm"},$le={class:"card-body"},Ile={class:"vstack gap-3"},Mle={class:"input-group input-group-floating"},Nle={class:"input-group input-group-floating"},Lle={key:0,class:"col-12 mt-2"},Rle={class:"alert alert-info d-flex justify-content-between align-items-center mb-0 py-2"},Fle={class:"badge bg-primary"},Vle={class:"col-12 mt-3"},Ble={class:"row g-3"},Ule={class:"col-md-6 position-relative z-index-dynamic"},jle={class:"input-group input-group-floating"},Hle={class:"form-floating flex-fill position-relative"},Wle={class:"col-md-6"},zle={class:"input-group input-group-floating"},Yle={class:"form-floating flex-fill"},qle={class:"col-12 mt-3"},Gle={class:"row g-3"},Xle={key:0,class:"col-md-12"},Kle={class:"input-group input-group-floating"},Jle={class:"col-md-6"},Qle={class:"input-group input-group-floating"},Zle={class:"col-md-6"},eue={class:"input-group input-group-floating"},tue={key:2,class:"col-12 mt-3"},sue={class:"row g-3"},nue={class:"col-md-6 position-relative z-index-dynamic"},iue={class:"input-group input-group-floating"},rue={class:"form-floating flex-fill position-relative"},aue={class:"col-md-6"},oue={class:"input-group input-group-floating"},lue={class:"col-12"},uue={class:"row g-3"},cue={class:"col-md-6"},due={class:"input-group input-group-floating"},hue={class:"form-floating flex-fill"},fue={class:"col-md-6"},pue={class:"input-group input-group-floating"},mue={class:"form-floating flex-fill"},gue={class:"col-12"},vue={class:"row g-3"},bue={class:"col-md-6"},yue={class:"input-group input-group-floating"},_ue={class:"form-floating flex-fill"},xue={class:"col-md-6"},wue={class:"input-group input-group-floating"},Eue={class:"form-floating flex-fill"},Sue={class:"col-12"},kue={class:"row g-3"},Cue={class:"col-md-6"},Tue={class:"input-group input-group-floating"},Aue={class:"col-md-6"},Oue={class:"d-flex align-items-center h-100 px-2 border rounded"},Due={class:"form-check form-switch m-0 pt-1 pb-1"},Pue={class:"col-12"},$ue={class:"row g-3"},Iue={class:"col-md-6"},Mue={class:"input-group input-group-floating"},Nue={class:"form-floating flex-fill position-relative"},Lue={class:"col-md-6"},Rue={key:0,class:"input-group input-group-floating"},Fue={class:"form-floating flex-fill position-relative"},Bue={key:1,class:"col-12"},Uue={class:"row g-3"},jue={class:"col-md-6"},Hue={class:"input-group input-group-floating"},Wue={class:"col-md-6"},zue={class:"input-group input-group-floating"},Yue={class:"form-floating flex-fill position-relative"},que={class:"col-12"},Gue={class:"row g-3"},Xue={class:"col-md-6"},Kue={class:"input-group input-group-floating"},Jue={class:"form-floating flex-fill"},Que=["value"],Zue={key:0,class:"badge bg-warning text-dark ms-1",style:{"font-size":"0.6rem"}},ece={class:"invalid-feedback"},tce={class:"col-md-6"},sce={class:"input-group input-group-floating"},nce={class:"form-floating flex-fill"},ice={key:0,class:"mt-2"},rce={class:"d-flex flex-wrap gap-1"},ace=["onClick"],oce={class:"col-12"},lce={class:"d-flex justify-content-between align-items-center p-3 border rounded bg-light"},uce={key:0,class:"form-check form-switch m-0"},cce={key:1},dce={class:"text-end d-flex align-items-center gap-3"},hce={__name:"EditOrderForm",props:{orderData:{type:Object,required:!0}},emits:["order-updated","validation-change","form-update"],setup(t,{expose:e,emit:s}){const n=t,i=s,o=ve([]),r=ve(""),c=ve(null),h=en({}),f=en({trade_date:new Date,quantity:0,price:0,other_costs:0,broker_id:"",tags:[],affect_balance:!1}),v=en({buy_price:0,buy_costs:0,sell_price:0,sell_costs:0}),g=en({issuer:"",bond_type:"",indexer:"",cdi_rate:0,investment_value:0,purchase_date:new Date,daily_liquidity:!1,due_date:null}),y=en({indexer:"",due_date:null,investment_form:"value",quantity:0,unit_price:0,investment_value:0}),x=en({bonds:[],isLoading:!1,selectedSymbol:""}),E=Ae(()=>{var W,M;return((M=(W=n.orderData)==null?void 0:W.trade_note)==null?void 0:M.trade_type)==="daytrade"}),P=Ae(()=>{var W;return E.value?"daytrade":((W=n.orderData)==null?void 0:W.operation_type)||"buy"}),I=Ae(()=>{var W,M;return((W=c.value)==null?void 0:W.slug)==="tesouro"||((M=c.value)==null?void 0:M.slug)==="tesouro-direto"}),D=Ae(()=>{var W;return((W=c.value)==null?void 0:W.slug)==="renda-fixa"}),F=Ae(()=>!D.value&&!I.value&&!E.value),C=Ae(()=>{if(!c.value)return 0;const W=c.value.slug.toLowerCase();return["criptomoedas"].includes(W)?8:["tesouro","tesouro-direto","cdb","lci-lca","renda-fixa","outros"].includes(W)?2:0}),A=Ae(()=>{if(!c.value)return 2;const W=c.value.slug.toLowerCase();return["criptomoedas"].includes(W)?8:2}),O=Ae(()=>["bonus","split","reverse_split","option_exercise"].includes(P.value)?"Custo Unitário (R$) *":A.value===8?"Preço (8 decimais) *":"Preço *"),j=Ae(()=>{if(E.value){const W=Number(f.quantity||0),M=Number(v.buy_price||0),he=Number(v.sell_price||0),oe=Number(v.buy_costs||0),K=Number(v.sell_costs||0);return W*he-K-(W*M+oe)}else{if(D.value)return Number(g.investment_value||0);if(I.value)return y.investment_form==="value"?Number(y.investment_value||0):Number(y.quantity||0)*Number(y.unit_price||0);{const W=Number(f.quantity||0),M=Number(f.price||0),he=Number(f.other_
60costs||0),oe=W*M;return P.value==="buy"?oe+he:oe-he}}}),te=Ae(()=>{var M;const W=f.broker_id;if(E.value)return W&&f.trade_date&&Number(f.quantity)>0&&Number(v.buy_price)>0&&Number(v.sell_price)>0;if(D.value||I.value){if(((M=n.orderData)==null?void 0:M.operation_type)==="sell")return W&&g.purchase_date&&Number(g.investment_value)>0;if(D.value)return W&&g.purchase_date&&g.issuer&&g.bond_type&&g.indexer&&Number(g.investment_value)>0;if(I.value){const he=y.investment_form==="value"?Number(y.investment_value)>0:Number(y.quantity)>0&&Number(y.unit_price)>0;return W&&g.purchase_date&&he}}else return W&&f.trade_date&&Number(f.quantity)>0&&Number(f.price)>0});function B(W){return new Intl.NumberFormat("pt-BR",{style:"currency",currency:"BRL"}).format(W||0)}function z(W){if(!W)return"";const M=new Date(W);return isNaN(M)?W:M.toLocaleDateString("pt-BR")}function re(W){return{acoes:"bi-graph-up",fiis:"bi-building",etfs:"bi-collection",bdrs:"bi-globe",options:"bi-diagram-3",tesouro:"bi-safe","tesouro-direto":"bi-safe",cdb:"bi-bank",criptomoedas:"bi-currency-bitcoin","renda-fixa":"bi-cash-stack",outros:"bi-card-text"}[W]||"bi-coin"}function ne(){r.value&&!f.tags.includes(r.value.trim())&&(f.tags.push(r.value.trim()),r.value="")}function X(W){f.tags.splice(W,1)}async function G(){try{const W=await ct.get("/api/brokers");o.value=W.data.data}catch(W){console.error("Erro ao carregar corretoras:",W)}}async function ce(){var W,M,he;if(I.value){x.isLoading=!0;try{const oe=await ct.get("/api/assets/tesouro-direto"),K=((W=oe.data)==null?void 0:W.results)||oe.data;if(x.bonds=Array.isArray(K)?K:[],(he=(M=n.orderData)==null?void 0:M.asset)!=null&&he.code&&(x.selectedSymbol=n.orderData.asset.code,f.quantity===1&&Math.abs(y.unit_price-y.investment_value)<.01)){const H=x.bonds.find(Ee=>(Ee==null?void 0:Ee.symbol)===x.selectedSymbol);if(H){const Ee=H.current_price||H.buyPrice||H.sellPrice;Ee>0&&(y.unit_price=Ee)}}}catch(oe){console.error("Erro ao buscar tÃtulos do Tesouro Direto na edição",oe),x.bonds=[]}finally{x.isLoading=!1}}}function be(){const W=x.bonds.find(M=>(M==null?void 0:M.symbol)===x.selectedSymbol);return W&&(W.current_price||W.buyPrice||W.sellPrice)||y.unit_price}function J(){const W=x.bonds.find(M=>(M==null?void 0:M.symbol)===x.selectedSymbol);return W?P.value==="buy"?(W==null?void 0:W.buy_rate)??(W==null?void 0:W.buyRate)??0:(W==null?void 0:W.sell_rate)??(W==null?void 0:W.sellRate)??0:0}function Z(W){if(!W)return null;if(W instanceof Date)return W.toISOString().split("T")[0];if(typeof W=="string"&&/^\d{2}\/\d{2}\/\d{4}$/.test(W)){const[M,he,oe]=W.split("/");return`${oe}-${he}-${M}`}return W}function ge(){var he,oe,K;if(r.value.trim()){const H=r.value.trim();f.tags.includes(H)||f.tags.push(H),r.value=""}let W=Number(f.quantity||0);if(D.value&&(W=1),I.value)if(y.investment_form==="value"){const H=Number(y.unit_price||0),Ee=Number(y.investment_value||0);W=H>0?Ee/H:1}else W=Number(y.quantity);const M={trade_date:Z(f.trade_date),quantity:W,price:Number(f.price),other_costs:Number(f.other_costs),broker_id:f.broker_id,tags:f.tags,affect_balance:!E.value&&((he=n.orderData)==null?void 0:he.operation_type)==="buy"?f.affect_balance:!1};if(E.value)M.operation_type="daytrade",M.daytrade_buy_price=Number(v.buy_price||0),M.daytrade_buy_costs=Number(v.buy_costs||0),M.daytrade_sell_price=Number(v.sell_price||0),M.daytrade_sell_costs=Number(v.sell_costs||0);else if(D.value||I.value){if(M.other_costs=0,M.trade_date=Z(g.purchase_date),D.value)M.fixed_income_investment_value=Number(g.investment_value||0),M.price=M.fixed_income_investment_value,M.quantity=1,((oe=n.orderData)==null?void 0:oe.operation_type)==="buy"&&(M.fixed_income_indexer=g.indexer,M.fixed_income_issuer=g.issuer,M.fixed_income_bond_type=g.bond_type,M.fixed_income_cdi_rate=Number(g.cdi_rate||0),M.fixed_income_due_date=!g.daily_liquidity&&g.due_date?Z(g.due_date):null);else if(I.value&&(M.price=Number(y.unit_price||0),y.investment_form==="value"?M.fixed_income_investment_value=Number(y.investment_value||0):M.fixed_income_investment_value=W*M.price,((K=n.orderData)==null?void 0:K.operation_type)==="buy")){const H=x.bonds.find(Ee=>(Ee==null?void 0:Ee.symbol)===x.selectedSymbol);M.fixed_income_indexer=y.indexer,M.fixed_income_bond_type="tesouro",M.fixed_income_due_date=Z(H?new Date((H.due_date||H.maturityDate)+"T12:00:00"):y.due_date)}}return console.log("ð¦ Dados para atualização:",M),M}function q(){var W,M,he,oe;if(n.orderData){(W=n.orderData.asset)!=null&&W.category&&(c.value=n.orderData.asset.category),f.trade_date=n.orderData.trade_date?new Date(n.orderData.trade_date):new Date,f.quantity=Number(n.orderData.quantity||0),f.price=Number(n.orderData.price||0),f.other_costs=Number(n.orderData.other_fees||0),f.broker_id=n.orderData.broker_id||"",f.tags=n.orderData.tags||[];const K=n.orderData.affect_balance;if(f.affect_balance=K===!0||K===1||K==="1"||K==="true",E.value){const H=((M=n.orderData.trade_note)==null?void 0:M.trade_orders)||[],Ee=H.find(Ce=>Ce.operation_type==="buy"),_e=H.find(Ce=>Ce.operation_type==="sell");Ee&&(v.buy_price=Number(Ee.price||0),v.buy_costs=Number(Ee.other_fees||0)),_e&&(v.sell_price=Number(_e.price||0),v.sell_costs=Number(_e.other_fees||0))}else if(D.value||I.value){let H=(he=n.orderData.asset)==null?void 0:he.profile;if(H&&typeof H=="string")try{H=JSON.parse(H)}catch{H={}}if(g.purchase_date=f.trade_date,D.value)g.investment_value=Number(n.orderData.total_amount||f.quantity*f.price),g.issuer=(H==null?void 0:H.issuer)||"",g.bond_type=(H==null?void 0:H.bond_type)||"",g.indexer=(H==null?void 0:H.indexer)||"",g.cdi_rate=Number((H==null?void 0:H.rate)||0),g.due_date=H!=null&&H.due_date?new Date(H.due_date):null,g.daily_liquidity=!(H!=null&&H.due_date);
60else if(I.value){x.selectedSymbol=((oe=n.orderData.asset)==null?void 0:oe.code)||"",y.indexer=(H==null?void 0:H.indexer)||"";const Ee=(H==null?void 0:H.due_date)||(H==null?void 0:H.maturityDate);y.due_date=Ee?new Date(Ee):null,y.quantity=f.quantity,y.investment_value=Number(n.orderData.total_amount||f.quantity*f.price),f.quantity>0&&Math.abs(f.quantity-1)>1e-4?y.unit_price=y.investment_value/f.quantity:y.unit_price=f.price,y.investment_form="value"}}}}return Xt(async()=>{await G(),q(),I.value&&ce(),vs(()=>{i("validation-change",te.value),i("form-update",ge())})}),Pt(te,W=>{i("validation-change",W)}),Pt([f,v,g,y],()=>{te.value&&i("form-update",ge())},{deep:!0}),e({validate:()=>te.value,getData:ge,submit:async()=>{var W,M,he;try{const oe=ge(),K=await ct.put(`/api/trade-orders/${n.orderData.id}`,oe);if(K.data.success){oe.trade_date&&window.dispatchEvent(new CustomEvent("mn-force-date-change",{detail:{date:oe.trade_date,context:"default"}}));const{useAppStore:H}=await cs(async()=>{const{useAppStore:Re}=await Promise.resolve().then(()=>Pj);return{useAppStore:Re}},void 0),{usePortfolioStore:Ee}=await cs(async()=>{const{usePortfolioStore:Re}=await Promise.resolve().then(()=>$j);return{usePortfolioStore:Re}},void 0),_e=H(),Ce=Ee();return _e.triggerRefresh("dashboard"),_e.triggerRefresh("portfolios"),_e.triggerRefresh("trades"),Ce.triggerUpdate("trades"),window.dispatchEvent(new CustomEvent("trade-order-updated",{detail:{orderId:n.orderData.id,portfolioId:(W=n.orderData.trade_note)==null?void 0:W.portfolio_id,timestamp:Date.now()}})),window.dispatchEvent(new CustomEvent("wallet-transaction-saved")),setTimeout(()=>{window.dispatchEvent(new CustomEvent("trigger-quotes-update"))},1e3),i("order-updated",K.data.data),!0}}catch(oe){if(console.error("â Erro no submit:",((M=oe.response)==null?void 0:M.data)||oe.message),((he=oe.response)==null?void 0:he.status)===422){const K=oe.response.data.errors,H=Object.values(K).flat().join(", ");console.error("Erros de validação:",H)}throw oe}}}),(W,M)=>{var he,oe,K,H,Ee,_e,Ce,Re,Ke,Be,Te;return $(),L("div",Boe,[l("div",Uoe,[l("div",joe,[l("div",Hoe,[l("div",Woe,[l("div",zoe,[l("button",{class:"btn btn-outline-secondary dropdown-toggle w-100 text-start",type:"button","data-bs-toggle":"dropdown",style:zs(c.value?{borderColor:c.value.color,color:c.value.color,fontWeight:"600",height:"58px"}:{height:"58px"}),disabled:""},[c.value?($(),L("i",{key:0,class:Me([re((he=c.value)==null?void 0:he.slug),"me-2"])},null,2)):xe("",!0),Pe(" "+pe(c.value?c.value.name:"Categoria"),1)],4),l("ul",Yoe,[l("li",null,[l("a",qoe,pe((oe=c.value)==null?void 0:oe.name),1)])])])]),I.value?xe("",!0):($(),L("div",Goe,[l("div",Xoe,[M[32]||(M[32]=l("span",{class:"input-group-text"},[l("i",{class:"bi bi-graph-up"})],-1)),l("div",Koe,[l("input",{type:"text",class:"form-control",value:((H=(K=t.orderData)==null?void 0:K.asset)==null?void 0:H.code)||"",disabled:"",placeholder:" "},null,8,Joe),M[31]||(M[31]=l("label",null,"Ativo",-1))])])])),I.value?($(),L("div",Qoe,[l("div",Zoe,[M[34]||(M[34]=l("span",{class:"input-group-text"},[l("i",{class:"bi bi-safe"})],-1)),l("div",ele,[_t(l("select",{"onUpdate:modelValue":M[0]||(M[0]=Q=>x.selectedSymbol=Q),class:"form-select",id:"treasury_bond",disabled:""},[l("option",tle,pe(x.isLoading?"Buscando tÃtulos...":"Carregando..."),1),($(!0),L(Ze,null,At(x.bonds,Q=>($(),L("option",{key:Q==null?void 0:Q.symbol,value:Q==null?void 0:Q.symbol},pe(Q==null?void 0:Q.name)+" - Vencimento: "+pe(z(Q==null?void 0:Q.due_date)),9,sle))),128)),!x.bonds.length&&x.selectedSymbol?($(),L("option",{key:0,value:x.selectedSymbol}
60,pe(((_e=(Ee=t.orderData)==null?void 0:Ee.asset)==null?void 0:_e.name)||((Re=(Ce=t.orderData)==null?void 0:Ce.asset)==null?void 0:Re.code)),9,nle)):xe("",!0)],512),[[An,x.selectedSymbol]]),M[33]||(M[33]=l("label",{for:"treasury_bond"},"TÃtulo do Tesouro Direto",-1))])])])):xe("",!0)])]),F.value?($(),L(Ze,{key:0},[l("div",ile,[l("div",rle,[l("div",ale,[l("div",ole,[M[35]||(M[35]=l("span",{class:"input-group-text"},[l("i",{class:"bi bi-calendar"})],-1)),l("div",lle,[et(mr,{modelValue:f.trade_date,"onUpdate:modelValue":M[1]||(M[1]=Q=>f.trade_date=Q),id:"trade_date",label:"Data da Operação *",placeholder:"Selecione a data",format:"yyyy-MM-dd"},null,8,["modelValue"])])])]),l("div",ule,[l("div",cle,[M[36]||(M[36]=l("span",{class:"input-group-text"},[l("i",{class:"bi bi-hash"})],-1)),et(Ms,{modelValue:f.quantity,"onUpdate:modelValue":M[2]||(M[2]=Q=>f.quantity=Q),id:"quantity",label:"Quantidade *",precision:C.value,"show-symbol":!1},null,8,["modelValue","precision"])])])])]),l("div",dle,[l("div",hle,[l("div",fle,[l("div",ple,[M[37]||(M[37]=l("span",{class:"input-group-text"},[l("i",{class:"bi bi-currency-dollar"})],-1)),et(Ms,{modelValue:f.price,"onUpdate:modelValue":M[3]||(M[3]=Q=>f.price=Q),id:"price",label:O.value,precision:A.value},null,8,["modelValue","label","precision"])])]),l("div",mle,[l("div",gle,[M[38]||(M[38]=l("span",{class:"input-group-text"},[l("i",{class:"bi bi-cash-coin"})],-1)),et(Ms,{modelValue:f.other_costs,"onUpdate:modelValue":M[4]||(M[4]=Q=>
60f.other_costs=Q),id:"other_costs",label:"Outros Custos"},null,8,["modelValue"])])])])])],64)):xe("",!0),E.value?($(),L("div",vle,[l("div",ble,[l("div",yle,[l("div",_le,[M[39]||(M[39]=l("span",{class:"input-group-text bg-white"},[l("i",{class:"bi bi-calendar"})],-1)),l("div",xle,[et(mr,{modelValue:f.trade_date,"onUpdate:modelValue":M[5]||(M[5]=Q=>f.trade_date=Q),id:"trade_date_dt",label:"Data da Operação *",placeholder:"Selecione a data",format:"yyyy-MM-dd"},null,8,["modelValue"])])])]),l("div",wle,[l("div",Ele,[M[40]||(M[40]=l("span",{class:"input-group-text bg-white"},[l("i",{class:"bi bi-hash"})],-1)),et(Ms,{modelValue:f.quantity,"onUpdate:modelValue":M[6]||(M[6]=Q=>f.quantity=Q),id:"dt_quantity",label:"Quantidade (Afeta Compra e Venda)",precision:C.value,"show-symbol":!1},null,8,["modelValue","precision"])])]),l("div",Sle,[l("div",kle,[l("div",Cle,[M[43]||(M[43]=l("h6",{class:"text-success fw-bold mb-3 small text-uppercase"},[l("i",{class:"bi bi-arrow-down-circle-fill me-2"}),Pe(" Compra")],-1)),l("div",Tle,[l("div",Ale,[M[41]||(M[41]=l("span",{class:"input-group-text text-success bg-white border-end-0"},[l("i",{class:"bi bi-currency-dollar"})],-1)),et(Ms,{modelValue:v.buy_price,"onUpdate:modelValue":M[7]||(M[7]=Q=>v.buy_price=Q),id:"buy_price",label:O.value,precision:A.value},null,8,["modelValue","label","precision"])]),l("div",Ole,[M[42]||(M[42]=l("span",{class:"input-group-text text-muted bg-white border-end-0"},[l("i",{class:"bi bi-file-earmark-minus"})],-1)),et(Ms,{modelValue:v.buy_costs,"onUpdate:modelValue":M[8]||(M[8]=Q=>v.buy_costs=Q),id:"buy_costs",label:"Custos Compra"},null,8,["modelValue"])])])])])]),l("div",Dle,[l("div",Ple,[l("div",$le,[M[46]||(M[46]=l("h6",{class:"text-danger fw-bold mb-3 small text-uppercase"},[l("i",{class:"bi bi-arrow-up-circle-fill me-2"}),Pe(" Venda")],-1)),l("div",Ile,[l("div",Mle,[M[44]||(M[44]=l("span",{class:"input-group-text text-danger bg-white border-end-0"},[l("i",{class:"bi bi-currency-dollar"})],-1)),et(Ms,{modelValue:v.sell_price,"onUpdate:modelValue":M[9]||(M[9]=Q=>v.sell_price=Q),id:"sell_price",label:O.value,precision:A.value},null,8,["modelValue","label","precision"])]),l("div",Nle,[M[45]||(M[45]=l("span",{class:"input-group-text text-muted bg-white border-end-0"},[l("i",{class:"bi bi-file-earmark-minus"})],-1)),et(Ms,{modelValue:v.sell_costs,"onUpdate:modelValue":M[10]||(M[10]=Q=>v.sell_costs=Q),id:"sell_costs",label:"Custos Venda"},null,8,["modelValue"])])])])])])])])):xe("",!0),I.value?($(),L(Ze,{key:2},[x.selectedSymbol?($(),L("div",Lle,[l("div",Rle,[l("span",null,[Pe("Rentabilidade Anual ("+pe(P.value==="buy"?"Compra":"Venda")+"): ",1),l("strong",null,pe(J())+"%",1)]),l("span",Fle,"Cotação Atual: "+pe(B(be())),1)])])):xe("",!0),((Ke=t.orderData)==null?void 0:Ke.operation_type)==="buy"?($(),L(Ze,{key:1},[l("div",Vle,[l("div",Ble,[l("div",Ule,[l("div",jle,[M[47]||(M[47]=l("span",{class:"input-group-text"},[l("i",{class:"bi bi-calendar"})],-1)),l("div",Hle,[et(mr,{modelValue:g.purchase_date,"onUpdate:modelValue":M[11]||(M[11]=Q=>g.purchase_date=Q),id:"treasury_trade_date",label:"Data da Operação *",placeholder:"Selecione a data",format:"yyyy-MM-dd"},null,8,["modelValue"])])])]),l("div",Wle,[l("div",zle,[M[50]||(M[50]=l("span",{class:"input-group-text"},[l("i",{class:"bi bi-sliders"})],-1)),l("div",Yle,[_t(l("select",{"onUpdate:modelValue":M[12]||(M[12]=Q=>y.investment_form=Q),class:"form-select",id:"treasury_inv_method"},[...M[48]||(M[48]=[l("option",{value:"value"},"Por valor (R$)",-1),l("option",{value:"unit"},"Por fração (Qtd)",-1)])],512),[[An,y.investment_form]]),M[49]||(M[49]=l("label",{for:"treasury_inv_method"},"Forma de Investimento *",-1))])])])])]),l("div",qle,[l("div",Gle,[y.investment_form==="value"?($(),L("div",Xle,[l("div",Kle,[M[51]||(M[51]=l("span",{class:"input-group-text"},[l("i",{class:"bi bi-currency-dollar"})],-1)),et(Ms,{modelValue:y.investment_value,"onUpdate:modelValue":M[13]||(M[13]=Q=>y.investment_value=Q),id:"treasury_value",label:"Valor Investido (R$)"},null,8,["modelValue"])])])):($(),L(Ze,{key:1},[l("div",Jle,[l("div",Qle,[M[52]||(M[52]=l("span",{class:"input-group-text"},[l("i",{class:"bi bi-hash"})],-1)),et(Ms,{modelValue:y.quantity,"onUpdate:modelValue":M[14]||(M[14]=Q=>y.quantity=Q),id:"treasury_qty",label:"Fração (Quantidade) *",precision:2,"
60show-symbol":!1},null,8,["modelValue"])])]),l("div",Zle,[l("div",eue,[M[53]||(M[53]=l("span",{class:"input-group-text"},[l("i",{class:"bi bi-currency-dollar"})],-1)),et(Ms,{modelValue:y.unit_price,"onUpdate:modelValue":M[15]||(M[15]=Q=>y.unit_price=Q),id:"treasury_pu",label:"Preço Unitário (PU) *"},null,8,["modelValue"])])])],64))])])],64)):($(),L("div",tue,[l("div",sue,[l("div",nue,[l("div",iue,[M[54]||(M[54]=l("span",{class:"input-group-text"},[l("i",{class:"bi bi-calendar"})],-1)),l("div",rue,[et(mr,{modelValue:g.purchase_date,"onUpdate:modelValue":M[16]||(M[16]=Q=>g.purchase_date=Q),id:"treasury_sell_date",label:"Data do Resgate *",placeholder:"Selecione a data",format:"yyyy-MM-dd"},null,8,["modelValue"])])])]),l("div",aue,[l("div",oue,[M[55]||(M[55]=l("span",{class:"input-group-text"},[l("i",{class:"bi bi-currency-dollar"})],-1)),et(Ms,{modelValue:g.investment_value,"onUpdate:modelValue":M[17]||(M[17]=Q=>g.investment_value=Q),id:"treasury_sell_value",label:"Valor Resgatado (R$) *"},null,8,["modelValue"])])])])]))],64)):xe("",!0),D.value?($(),L(Ze,{key:3},[((Be=t.orderData)==null?void 0:Be.operation_type)==="buy"?($(),L(Ze,{key:0},[l("div",lue,[l("div",uue,[l("div",cue,[l("div",due,[M[57]||(M[57]=l("span",{class:"input-group-text"},[l("i",{class:"bi bi-building"})],-1)),l("div",hue,[_t(l("input",{"onUpdate:modelValue":M[18]||(M[18]=Q=>g.issuer=Q),type:"text",class:"form-control",id:"issuer",placeholder:"Emissor"},null,512),[[Xs,g.issuer]]),M[56]||(M[56]=l("label",{for:"issuer"},"Emissor",-1))])])]),l("div",fue,[l("div",pue,[M[60]||(M[60]=l("span",{class:"input-group-text"},[l("i",{class:"bi bi-file-text"})],-1)),l("div",mue,[_t(l("select",{"onUpdate:modelValue":M[19]||(M[19]=Q=>g.bond_type=Q),class:"form-select",id:"bond_type"},[...M[58]||(M[58]=[$u('<option value="" data-v-d5fd1694>Selecione...</option><option value="CDB" data-v-d5fd1694>CDB</option><option value="LCI" data-v-d5fd1694>LCI</option><option value="LCA" data-v-d5fd1694>LCA</option><option value="CRI" data-v-d5fd1694>CRI</option><option value="CRA" data-v-d5fd1694>CRA</option>',6)])],512),[[An,g.bond_type]]),M[59]||(M[59]=l("label",{for:"bond_type"},"Tipo de tÃtulo",-1))])])])])]),l("div",gue,[l("div",vue,[l("div",bue,[l("div",yue,[M[63]||(M[63]=l("span",{class:"input-group-text"},[l("i",{class:"bi bi-graph-up"})],-1)),l("div",_ue,[_t(l("select",{"onUpdate:modelValue":M[20]||(M[20]=Q=>g.indexer=Q),class:"form-select",id:"indexer"},[...M[61]||(M[61]=[$u('<option value="" data-v-d5fd1694>Selecione...</option><option value="cdi" data-v-d5fd1694>CDI</option><option value="ipca" data-v-d5fd1694>IPCA+</option><option value="prefixado" data-v-d5fd1694>Prefixado</option><option value="selic" data-v-d5fd1694>SELIC</option>',5)])],512),[[An,g.indexer]]),M[62]||(M[62]=l("label",{for:"indexer"},"Indexador",-1))])])]),l("div",xue,[l("div",wue,[M[65]||(M[65]=l("span",{class:"input-group-text"},[l("i",{class:"bi bi-percent"})],-1)),l("div",Eue,[_t(l("input",{"onUpdate:modelValue":M[21]||(M[21]=Q=>g.cdi_rate=Q),type:"number",step:"0.01",class:"form-control",placeholder:" "},null,512),[[Xs,g.cdi_rate]]),M[64]||(M[64]=l("label",null,"Taxa Acordada (%)",-1))])])])])]),l("div",Sue,[l("div",kue,[l("div",Cue,[l("div",Tue,[M[66]||(M[66]=l("span",{class:"input-group-text"},[l("i",{class:"bi bi-currency-dollar"})],-1)),et(Ms,{modelValue:g.investment_value,"onUpdate:modelValue":M[22]||(M[22]=Q=>g.investment_value=Q),id:"investment_value_buy",label:"Valor Investido (R$) *"},null,8,["modelValue"])])]),l("div",Aue,[l("div",Oue,[l("div",Due,[_t(l("input",{"onUpdate:modelValue":M[23]||(M[23]=Q=>g.daily_liquidity=Q),class:"form-check-input",type:"checkbox",id:"daily_liquidity",style:{cursor:"pointer",width:"3em",height:"1.5em"}},null,512),[[kr,g.daily_liquidity]]),M[67]||(M[67]=l("label",{class:"form-check-label fw-medium ms-2 pt-1",for:"daily_liquidity",style:{cursor:"pointer"}},"Liquidez diária",-1))])])])])]),l("div",Pue,[l("div",$ue,[l("div",Iue,[l("div",Mue,[M[68]||(M[68]=l("span",{class:"input-group-text"},[l("i",{class:"bi bi-calendar"})],-1)),l("div",Nue,[et(mr,{modelValue:g.purchase_date,"onUpdate:modelValue":M[24]||(M[24]=Q=>g.purchase_date=Q),id:"purchase_date",label:"Data da compra *",placeholder:"Selecione a data"},null,8,["modelValue"])])])]),l("div",Lue,[g.daily_liquidity?xe("",!0):($(),L("div",Rue,[M[69]||(M[69]=l("span",{class:"input-group-text"},[l("i",{class:"bi bi-calendar-check"})],-1)),l("div",Fue,[et(mr,{modelValue:g.due_date,"onUpdate:modelValue":M[25]||(M[25]=Q=>g.due_date=Q),id:"due_date",label:"Data de vencimento *",placeholder:"Selecione a data"},null,8,["modelValue"])])]))])])])],64)):($(),L("div",Bue,[l("div",Uue,[l("div",jue,[l("div",Hue,[M[70]||(M[70]=l("span",{class:"input-group-text"},[l("i",{class:"bi bi-currency-dollar"})],-1)),et(Ms,{modelValue:g.investment_value,"onUpdate:modelValue":M[26]||(M[26]=Q=>g.investment_value=Q),id:"investment_value_sell",label:"Valor Resgatado (R$) *"},null,8,["modelValue"])])]),l("div",Wue,[l("div",zue,[M[71]||(M[71]=l("span",{class:"input-group-text"},[l("i",{class:"bi bi-calendar"})],-1)),l("div",Yue,[et(mr,{modelValue:g.purchase_date,"onUpdate:modelValue":M[27]||(M[27]=Q=>g.purchase_date=Q),id:"sell_date",label:"Data do Resgate *",placeholder:"Selecione a data",format:"yyyy-MM-dd"},null,8,["modelValue"])])])])])]))],64)):xe("",!0),l("div",que,[l("div",Gue,[l("div",Xue,[l("div",Kue,[M[75]||(M[75]=l("span",{class:"input-group-text"},[l("i",{class:"bi bi-building"})],-1)),l("div",Jue,[_t(l("select",{"onUpdate:modelValue":M[28]||(M[28]=Q=>
60f.broker_id=Q),class:Me(["form-select",{"is-invalid":h.broker_id}]),id:"broker"},[M[73]||(M[73]=l("option",{value:""},"Selecione...",-1)),($(!0),L(Ze,null,At(o.value,Q=>($(),L("option",{key:Q.id,value:Q.id},[Pe(pe(Q.name)+" ",1),Q.is_private?($(),L("span",Zue,[...M[72]||(M[72]=[l("i",{class:"bi bi-person-fill"},null,-1)])])):xe("",!0)],8,Que))),128))],2),[[An,f.broker_id]]),M[74]||(M[74]=l("label",{for:"broker"},"Corretora *",-1))])]),l("div",ece,pe(h.broker_id),1)]),l("div",tce,[l("div",sce,[M[78]||(M[78]=l("span",{class:"input-group-text"},[l("i",{class:"bi bi-tags"})],-1)),l("div",nce,[_t(l("input",{"onUpdate:modelValue":M[29]||(M[29]=Q=>r.value=Q),type:"text",class:"form-control",id:"tags",placeholder:" ",onKeyup:[es(ne,["enter"]),es(ne,["space"])]},null,544),[[Xs,r.value]]),M[76]||(M[76]=l("label",{for:"tags"},"Hashtags",-1))]),l("button",{class:"btn btn-outline-secondary",type:"button",onClick:ne},[...M[77]||(M[77]=[l("i",{class:"bi bi-plus"},null,-1)])])]),f.tags.length>0?($(),L("div",ice,[l("div",rce,[($(!0),L(Ze,null,At(f.tags,(Q,Se)=>($(),L("span",{key:Se,class:"badge bg-primary d-flex align-items-center"},[Pe(" #"+pe(Q)+" ",1),l("button",{type:"button",class:"btn-close btn-close-white ms-1",onClick:Ve=>X(Se),style:{"font-size":"0.7rem"}},null,8,ace)]))),128))])])):xe("",!0)])])]),l("div",oce,[l("div",lce,[!E.value&&((Te=t.orderData)==null?void 0:Te.operation_type)==="buy"?($(),L("div",uce,[_t(l("input",{class:"form-check-input",type:"checkbox",id:"affectBalance","onUpdate:modelValue":M[30]||(M[30]=Q=>f.affect_balance=Q),style:{cursor:"pointer",width:"3em",height:"1.5em"}},null,512),[[kr,f.affect_balance]]),M[79]||(M[79]=l("label",{class:"form-check-label fw-medium ms-2 pt-1",for:"affectBalance",style:{cursor:"pointer"}}," Movimentar caixa? ",-1))])):($(),L("div",cce)),l("div",dce,[M[80]||(M[80]=l("span",{class:"text-uppercase text-muted fw-bold small d-none d-sm-inline"},"Valor Total",-1)),l("span",{class:Me(["fs-4 fw-bold",j.value>=0?"text-success":"text-danger"])},pe(B(Math.abs(j.value))),3)])])])])])}}},fce=ls(hce,[["__scopeId","data-v-d5fd1694"]]),pce={class:"container-fluid"},mce={key:0,class:"text-center text-muted py-4"},gce={class:"d-flex justify-content-between w-100"},vce=["disabled"],bce={__name:"CloneOrderModal",props:{orderId:{type:[Number,String],required:!0}},emits:["order-cloned"],setup(t,{emit:e}){const s=In(),n=Yn(),i=vi(),o=t,r=e,c=ve(!0),h=ve(null),f=ve(!1),v=ve(null),g=ve(null),y=ve(null),x=Ae(()=>{var X,G,ce;if(!h.value)return"Clonar Ordem";const B=((X=h.value.asset)==null?void 0:X.code)||"Ativo",z=((ce=(G=h.value.asset)==null?void 0:G.category)==null?void 0:ce.slug)||"",re=["options","opcoes"].includes(z);let ne="";return re?ne=h.value.operation_type==="buy"?"Clonar Titular (Compra)":"Clonar Lançador (Venda)":ne=h.value.operation_type==="buy"?"Clonar compra":h.value.operation_type==="sell"?"Clonar venda":"Clonar daytrade",`${ne} - ${B}`}),E=Ae(()=>f.value&&v.value!==null&&!c.value),P=Ae(()=>c.value?"Carregando...":"Criar Cópia");function I(){n.close()}async function D(){c.value=!0;try{const B=await ct.get(`/api/trade-orders/${o.orderId}`);if(B.data.success)h.value=B.data.data,console.log("ð¦ Dados da ordem carregados para clone:",h.value),F();else throw new Error(B.data.message)}catch(B){console.error("Erro ao carregar dados da ordem para clone:",B),i.show("Erro ao carregar dados da ordem","error"),I()}finally{c.value=!1}}function F(){var X,G,ce,be;if(!h.value)return;const B=h.value;console.log("ð¦ Dados completos da ordem para clone:",B);const z=((G=(X=B.asset)==null?void 0:X.category)==null?void 0:G.slug)||"",re=["options","opcoes"].includes(z);let ne={};re&&B.option_details&&(ne=typeof B.option_details=="string"?JSON.parse(B.option_details):B.option_details),g.value={operationType:B.operation_type,selectedAsset:B.asset,selectedCategory:(ce=B.asset)==null?void 0:ce.category_id,selectedCategoryObject:(be=B.asset)==null?void 0:be.category,quantity:Number(B.quantity||0),price:Number(B.price||B.fixed_income_investment_value||0),other_costs:Number(B.other_fees||0),affect_balance:B.affect_balance!==void 0?!!B.affect_balance:!0,broker_id:B.broker_id,tags:B.tags||[],trade_date:C(B.trade_date),maxQuantity:B.operation_type==="sell"?Number(B.quantity||0):0,note_number:B.note_number||"",liquidation_date:B.liquidation_date?C(B.liquidation_date):null,fixed_income_indexer:B.fixed_income_indexer||(B.fixed_income?B.fixed_income.indexer:null),fixed_income_issuer:B.fixed_income_issuer||(B.fixed_income?B.fixed_income.issuer:null),fixed_income_bond_type:B.fixed_income_bond_type||(B.fixed_income?B.fixed_income.bond_type:null),fixed_income_cdi_rate:B.fixed_income_cdi_rate||(B.fixed_income?B.fixed_income.rate:null),fixed_income_due_date:B.fixed_income_due_date||(B.fixed_income?B.fixed_income.due_date:null),fixed_income_investment_value:B.fixed_income_investment_value,option_underlying_asset:ne.underlying_asset||null,option_type:ne.type||null,option_strike:ne.strike||null,option_expiration_date:ne.expiration_date||null},console.log("ð RestoredState preparado para clone:",g.value)}
60function C(B){if(!B)return new Date;if(B instanceof Date)return B;if(typeof B=="string"&&/^\d{4}-\d{2}-\d{2}$/.test(B))return new Date(B+"T12:00:00");if(typeof B=="string"&&/^\d{2}\/\d{2}\/\d{4}$/.test(B)){const[z,re,ne]=B.split("/");return new Date(parseInt(ne),parseInt(re)-1,parseInt(z))}try{const z=new Date(B);return isNaN(z.getTime())?new Date:z}catch{return new Date}}function A(B){var z;i.show("Ordem clonada com sucesso!","success"),s.triggerRefresh("portfolios"),s.triggerRefresh("dashboard"),s.triggerRefresh("trades"),B.operation_type==="buy"&&B.operation_type!=="daytrade"&&((z=g.value)!=null&&z.affect_balance)&&window.dispatchEvent(new CustomEvent("wallet-transaction-saved")),r("order-cloned",B),setTimeout(()=>{I()},1e3)}function O(B){f.value=B}function j(B){v.value=B}async function te(){if(y.value)try{await y.value.submit()}catch(B){console.error("Erro ao clonar ordem:",B),i.show("Erro ao clonar ordem","error")}}return Xt(()=>{D()}),(B,z)=>($(),Ut(Ha,{"model-value":!0,title:x.value,"onUpdate:modelValue":I},{footer:vt(()=>
60[l("div",gce,[l("button",{type:"button",class:"btn btn-secondary",onClick:I},[...z[1]||(z[1]=[l("i",{class:"bi bi-x-circle"},null,-1),Pe(" Cancelar ",-1)])]),l("button",{type:"button",class:"btn btn-primary",disabled:!E.value||c.value,onClick:te},[z[2]||(z[2]=l("i",{class:"bi bi-copy"},null,-1)),Pe(" "+pe(P.value),1)],8,vce)])]),default:vt(()=>[l("div",pce,[c.value?($(),L("div",mce,[...z[0]||(z[0]=[l("div",{class:"spinner-border",role:"status"},[l("span",{class:"visually-hidden"},"Carregando...")],-1),l("p",{class:"text-muted mt-2"},"Carregando dados da ordem...",-1)])])):($(),Ut(xD,{key:1,ref_key:"cloneFormRef",ref:y,"restored-state":g.value,active:!0,"is-operation-locked":!0,onOrderCreated:A,onValidationChange:O,onFormUpdate:j},null,8,["restored-state"]))])]),_:1},8,["title"]))}},yce={class:"container-fluid"},_ce={key:0,class:"text-center text-muted py-4"},xce={key:2,class:"text-center py-4"},wce={class:"d-flex justify-content-between w-100"},Ece={class:"d-flex gap-2"},Sce=["disabled"],kce={__name:"EditOrderModal",props:{orderId:{type:[Number,String],required:!0}},emits:["order-updated","order-cloned"],setup(t,{emit:e}){const s=In(),n=Yn(),i=vi(),o=t,r=e,c=ve(!0),h=ve(null),f=ve(!1),v=ve(null),g=ve(null),y=Ae(()=>{var z,re,ne,X;if(!h.value)return"Editar ordem";const O=((z=h.value.asset)==null?void 0:z.code)||"Ativo";if(((re=h.value.trade_note)==null?void 0:re.trade_type)==="daytrade")return`Editar Daytrade ${h.value.operation_type==="buy"?"(Compra)":"(Venda)"} - ${O}`;const j=((X=(ne=h.value.asset)==null?void 0:ne.category)==null?void 0:X.slug)||"",te=["options","opcoes"].includes(j);let B="";return te?B=h.value.operation_type==="buy"?"Editar Titular (Compra)":"Editar Lançador (Venda)":B=h.value.operation_type==="buy"?"Editar compra":h.value.operation_type==="sell"?"Editar venda":"Editar daytrade",`${B} - ${O}`}),x=Ae(()=>f.value&&v.value!==null&&!c.value),E=Ae(()=>c.value?"Carregando...":"Atualizar Ordem");function P(){n.close()}async function I(){var O;c.value=!0;try{const j=await ct.get(`/api/trade-orders/${o.orderId}`);if(j.data.success)h.value=j.data.data,console.log("ð¦ Dados da ordem carregados (EditOrderModal):",{id:h.value.id,affect_balance:h.value.affect_balance,type:h.value.operation_type,asset:(O=h.value.asset)==null?void 0:O.code});else throw new Error(j.data.message)}catch(j){console.error("â Erro ao carregar dados da ordem:",j),i.show("Erro ao carregar dados da ordem","error"),h.value=null}finally{c.value=!1}}function D(O){i.show("Ordem atualizada com sucesso!","success"),s.triggerRefresh("portfolios"),s.triggerRefresh("dashboard"),r("order-updated",O),setTimeout(()=>{P()},1e3)}function F(O){f.value=O}function C(O){v.value=O}async function A(){if(!g.value){i.show("Erro: formulário não carregado","error");return}try{await g.value.submit()}catch(O){console.error("Erro ao atualizar ordem:",O),i.show("Erro ao atualizar ordem","error")}}return Xt(()=>{I()}),Pt(()=>n.isOpen,O=>{O||s.triggerRefresh("portfolios")}),(O,j)=>($(),Ut(Ha,{"model-value":!0,title:y.value,"onUpdate:modelValue":P},{footer:vt(()=>[l("div",wce,[l("button",{type:"button",class:"btn btn-secondary",onClick:P},[...j[2]||(j[2]=[l("i",{class:"bi bi-x-circle"},null,-1),Pe(" Cancelar ",-1)])]),l("div",Ece,[l("button",{type:"button",class:"btn btn-primary",disabled:!x.value||c.value,onClick:A},[j[3]||(j[3]=l("i",{class:"bi bi-check-circle"},null,-1)),Pe(" "+pe(E.value),1)],8,Sce)])])]),default:vt(()=>[l("div",yce,[c.value?($(),L("div",_ce,[...j[0]||(j[0]=[l("div",{class:"spinner-border",role:"status"},[l("span",{class:"visually-hidden"},"Carregando...")],-1),l("p",{class:"text-muted mt-2"},"Carregando dados da ordem...",-1)])])):h.value?($(),Ut(fce,{key:1,ref_key:"editFormRef",ref:g,"order-data":h.value,onOrderUpdated:D,onValidationChange:F,onFormUpdate:C},null,8,["order-data"])):($(),L("div",xce,[...j[1]||(j[1]=[l("i",{class:"bi bi-exclamation-triangle text-warning",style:{"font-size":"3rem"}},null,-1),l("p",{class:"text-muted mt-3"},"Não foi possÃvel carregar os dados da ordem.",-1)])]))])]),_:1},8,["title"]))}},Cce={class:"asset-releases-tab"}
60,Tce={key:0,class:"option-details mb-4 bg-light rounded p-3 border"},Ace={class:"row g-3"},Oce={class:"col-6 col-md-3"},Dce={class:"col-6 col-md-3"},Pce={key:0,class:"text-primary"},$ce={key:1,class:"text-danger"},Ice={key:2},Mce={class:"col-6 col-md-3"},Nce={class:"col-6 col-md-3"},Lce={key:1,class:"orders-summary mb-4 bg-light rounded"},Rce={class:"metrics-grid"},Fce={class:"metric-item"},Vce={class:"text-primary"},Bce={class:"metric-item"},Uce={class:"text-positive"},jce={class:"metric-item"},Hce={class:"text-negative"},Wce={class:"metric-item"},zce={class:"text-info"},Yce={class:"metric-item"},qce={class:"metric-item"},Gce={class:"metric-item"},Xce={class:"text-success"},Kce={class:"metric-item"},Jce={class:"filters mb-3"},Qce={class:"row g-2 align-items-center"},Zce={class:"col"},ede={class:"col-auto"},tde=["disabled"],sde={key:2,class:"text-center text-muted py-4"},nde={key:3,class:"orders-list"},ide={key:0,class:"dividend-item"},rde={class:"order-header p-3 bg-info bg-opacity-10"},ade={class:"d-flex justify-content-between align-items-center"},ode={class:"d-flex align-items-center gap-2 flex-wrap"},lde={class:"order-type-badge"},ude={class:"d-block"},cde={key:0,class:"order-date small text-muted me-3"},dde={class:"order-date small text-muted"},hde={class:"order-body p-3"},fde={class:"row g-2 align-items-center"},pde={class:"col-7"},mde={class:"operation-info"},gde={class:"quantity-price mb-2"},vde={class:"d-flex align-items-center gap-2"},bde={class:"quantity"},yde={class:"text-muted"},_de={class:"price"},xde={class:"text-muted"},wde={key:0,class:"fees-summary"},Ede={class:"text-muted"},Sde={class:"col-5"},kde={class:"order-values text-end"},Cde={class:"main-value mb-1"},Tde={class:"value-amount text-success"},Ade={class:"d-flex justify-content-between align-items-center"},Ode={class:"d-flex align-items-center gap-2 flex-wrap"},Dde={class:"order-date small text-muted"},Pde={class:"d-block"},$de={class:"order-actions"},Ide=["onClick"],Mde=["onClick"],Nde=["onClick","disabled"],Lde={class:"order-body p-3"},Rde={class:"row g-2 align-items-center"},Fde={class:"col-7"},Vde={class:"operation-info"},Bde={class:"quantity-price mb-2"},Ude={class:"d-flex align-items-center gap-2"},jde={class:"quantity"},Hde={class:"text-muted"},Wde={class:"price"},zde={key:0,class:"fees-summary"},Yde={class:"text-muted"},qde={class:"col-5"},Gde={class:"order-values text-end"},Xde={class:"main-value mb-1"},Kde={class:"text-muted d-block"},Jde={key:0,class:"gross-value"},Qde={class:"text-muted"},Zde={key:4,class:"text-center py-4 text-muted"},ehe={key:0,class:"small"},the={__name:"AssetReleasesTab",props:{asset:Object},setup(t){const e=Yn(),s=In(),n=vi(),i=pi(),o=t;function r(){e.open(Df,{restoredState:null})}const c=ve(!1),h=ve([]),f=ve([]),v=ve("all"),g=Ae(()=>{var M;if(!((M=o.asset)!=null&&M.category))return!1;const W=(o.asset.category.slug||"").toLowerCase().trim();return["opcoes","options","opcao","option"].includes(W)}),y=Ae(()=>{var W;if(!((W=o.asset)!=null&&W.profile))return null;try{return typeof o.asset.profile=="string"?JSON.parse(o.asset.profile):o.asset.profile}catch(M){return console.error("Erro ao fazer parse do profile:",M),null}}),x=W=>{if(!W)return"N/A";const M=W.split("-");return M.length===3?`${M[2].substring(0,2)}/${M[1]}/${M[0]}`:W},E=()=>{var M,he;const W=(((he=(M=o.asset)==null?void 0:M.category)==null?void 0:he.slug)||"").toLowerCase();return["tesouro","tesouro-direto","renda-fixa","cdb","lci-lca","outros"].includes(W)?"frações":["crypto","criptomoedas","cryptos","cripto"].includes(W)?"moedas":["fiis","fii","etfs","etf"].includes(W)?"cotas":"ações"},P=()=>{var M,he;const W=(((he=(M=o.asset)==null?void 0:M.category)==null?void 0:he.slug)||"").toLowerCase();return["tesouro","tesouro-direto","renda-fixa","cdb","lci-lca","outros"].includes(W)?"fração":["crypto","criptomoedas","cryptos","cripto"].includes(W)?"moeda":["fiis","fii","etfs","etf"].includes(W)?"cota":"ação"},I=Ae(()=>{const W=[];return h.value&&h.value.forEach(M=>{W.push({...M,item_type:"trade_order",type:te(M.operation_type,M.trade_type),trade_type:M.trade_type||"normal"})}),f.value&&f.value.forEach(M=>{W.push({...M,item_type:"dividend",type:"dividend",dividend_type:M.type})}),W.sort((M,he)=>{const oe=M.trade_date||M.payment_date,K=he.trade_date||he.payment_date;return new Date(K)-new Date(oe)})}),D=Ae(()=>{if(!h.value||!f.value)return null;const W={total_orders:h.value.length,total_buys:0,total_sells:0,total_quantity_bought:0,total_quantity_sold:0,total_invested:0,total_received:0,net_quantity:0,total_dividends:f.value.length,total_dividends_amount:0};return h.value.forEach(M=>{M.operation_type==="buy"||M.operation_type==="option_exercise"?(W.total_buys++,W.total_quantity_bought+=M.quantity,W.total_invested+=Math.abs(M.net_amount)):M.operation_type==="sell"?(W.total_sells++,W.total_quantity_sold+=M.quantity,W.total_received+=Math.abs(M.net_amount)):M.operation_type==="bonus"||M.operation_type==="split"?W.total_quantity_bought+=M.quantity:M.operation_type==="reverse_split"&&(W.total_quantity_sold+=M.quantity)}),f.value.length>0&&(W.total_dividends_amount=f.value.reduce((M,he)=>{const oe=j(he);return M+(oe||0)},0)),W.net_quantity=W.total_quantity_bought-W.total_quantity_sold,W}),F=Ae(()=>{if(!I.value.length)return[];let W=I.value;return v.value!=="all"&&(v.value==="dividend"?W=W.filter(M=>M.item_type==="dividend"):v.value==="daytrade"?W=W.filter(M=>M.item_type==="trade_order"&&M.trade_type==="daytrade"):v.value==="purchase"?W=W.filter(M=>M.item_type==="trade_order"&&M.operation_type==="buy"&&(M.trade_type==="normal"||!M.trade_type)):v.value==="sale"?W=W.filter(M=>M.item_type==="trade_order"&&M.operation_type==="sell"&&(M.trade_type==="normal"||!M.trade_type)):v.value==="corporate_action"&&(W=W.filter(M=>M.item_type==="trade_order"&&["bonus","option_exercise","split","reverse_split"].includes(M.operation_type)))),W}),C=async()=>{var W;if((W=o.asset)!=null&&W.id){c.value=!0;try{const M=await ct.get(`/api/assets/${o.asset.id}/trade-orders`);M.data.success?h.value=M.data.data.orders.map(K=>({...K,trade_type:K.trade_type||"normal"})):h.value=[];const he=i.getCurrentPortfolioId();if(!he){f.value=[];return}const oe=await ct.get("/api/assets/dividends",{params:{asset_id:o.asset.id,portfolio_id:he,scope:"user"}});if(oe.data.success){const K=oe.data.data.dividends||[];f.value=K.map(H=>({id:`dividend-${H.id}`,item_type:"dividend",type:"dividend",dividend_type:H.type,quantity:H.quantity,amount_per_share:H.amount_per_share,total_amount:H.total_amount,payment_date:H.payment_date,record_date:H.record_date,description:H.description}))}else f.value=[]}catch(M){console.error("Erro ao carregar operações:",M),h.value=[],f.value=[]}finally{c.value=!1}}},A=W=>{const M=parseFloat(W.quantity)||0;return isNaN(M)?0:M},O=W=>{const M=parseFloat(W.amount_per_share)||0;return isNaN(M)?0:M},j=W=>{if(W.total_amount!==void 0&&W.total_amount!==null){const oe=parseFloat(W.total_amount)||0;return isNaN(oe)?0:oe}const M=A(W),he=O(W);return M*he},te=(W,M="normal")=>
60M==="daytrade"?"daytrade":{buy:"purchase",sell:"sale",bonus:"corporate_action",option_exercise:"corporate_action",split:"corporate_action",reverse_split:"corporate_action"}[W]||"other",B=W=>({dividend:"Dividendo",jcp:"JCP",interest:"Juros",income:"Rendimentos",bonus:"Bonificação",amortization:"Amortização",other:"Outro"})[W]||W,z=W=>{e.open(kce,{orderId:W.id});const M=Pt(()=>e.isOpen,he=>{he||M()})},re=W=>{e.open(bce,{orderId:W.id});const M=Pt(()=>e.isOpen,he=>{he||M()})},ne=W=>{e.open(D_,{order:W,onConfirm:async M=>await X(M)})},X=async W=>{try{const M=await ct.delete(`/api/trade-orders/${W.id}`);if(M.data.success)return s.triggerRefresh("portfolios"),s.triggerRefresh("dashboard"),G("Ordem excluÃda com sucesso!"),!0;throw new Error(M.data.message||"Erro ao excluir ordem")}catch(M){throw ce(M),M}},G=W=>{n.show(W,"success")},ce=W=>{var he,oe,K,H;let M="Erro ao excluir ordem";((he=W.response)==null?void 0:he.status)===404?M="Ordem não encontrada. Ela pode já ter sido excluÃda.":((oe=W.response)==null?void 0:oe.status)===403?M="Você não tem permissão para excluir esta ordem.":(H=(K=W.response)==null?void 0:K.data)!=null&&H.message&&(M=W.response.data.message),n.show(M,"error")},be=(W,M="normal")=>{const he={purchase:"bg-success",sale:"bg-danger",daytrade:"bg-warning",corporate_action:"bg-info",other:"bg-secondary"};return M==="daytrade"?"bg-warning":he[W]||"bg-secondary"},J=(W,M="normal")=>{const oe={buy:"COMPRA",sell:"VENDA",daytrade:"DAYTRADE",bonus:"BÃNUS",option_exercise:"EXERCÃCIO",split:"DESDOBRAMENTO",reverse_split:"GRUPAMENTO"}[W]||W.toUpperCase();return M==="daytrade"?`${oe} ⢠DT`:oe},Z=W=>["buy","option_exercise"].includes(W)?"text-negative":"text-positive",ge=W=>{if(!W)return"N/A";try{return new Date(W).toLocaleDateString("pt-BR")}catch{return"Data inválida"}},q=W=>{var K,H;const M=Number(W);if(isNaN(M)||M===0)return"0";const he=(((H=(K=o.asset)==null?void 0:K.category)==null?void 0:H.slug)||"").toLowerCase();let oe=4;return["crypto","criptomoedas","cryptos","cripto"].includes(he)&&(oe=8),new Intl.NumberFormat("pt-BR",{minimumFractionDigits:0,maximumFractionDigits:oe}).format(M)};return Pt(()=>o.asset,W=>{W!=null&&W.id&&C()}),Xt(()=>{var W;(W=o.asset)!=null&&W.id&&C()}),(W,M)=>($(),L("div",Cce,[g.value&&y.value?($(),L("div",Tce,[M[6]||(M[6]=l("p",{class:"mb-3 fw-bold"},"Detalhes da Série",-1)),l("div",Ace,[l("div",Oce,[M[2]||(M[2]=l("small",{class:"d-block text-muted"},"Ativo Objeto",-1)),l("strong",null,pe(y.value.underlying_asset||"N/A"),1)]),l("div",Dce,[M[3]||(M[3]=l("small",{class:"d-block text-muted"},"Tipo",-1)),l("strong",null,[y.value.type==="CALL"||y.value.type==="call"?($(),L("span",Pce,"CALL")):y.value.type==="PUT"||y.value.type==="put"?($(),L("span",$ce,"PUT")):($(),L("span",Ice,pe(y.value.type||"N/A"),1))])]),l("div",Mce,[M[4]||(M[4]=l("small",{class:"d-block text-muted"},"Strike",-1)),l("strong",null,pe(W.$fmtCurrency(y.value.strike||0)),1)]),l("div",Nce,[M[5]||(M[5]=l("small",{class:"d-block text-muted"},"Vencimento",-1)),l("strong",null,pe(x(y.value.expiration_date)),1)])])])):xe("",!0),D.value?($(),L("div",Lce,[M[15]||(M[15]=l("p",{class:"mb-3 fw-bold"},"Resumo das Operações e Proventos",-1)),l("div",Rce,[l("div",Fce,[M[7]||(M[7]=l("small",{class:"d-block text-muted"},"Ordens",-1)),l("strong",Vce,pe(D.value.total_orders),1)]),l("div",Bce,[M[8]||(M[8]=l("small",{class:"d-block text-muted"},"Compras",-1)),l("strong",Uce,pe(D.value.total_buys),1)]),l("div",jce,[M[9]||(M[9]=l("small",{class:"d-block text-muted"},"Vendas",-1)),l("strong",Hce,pe(D.value.total_sells),1)]),l("div",Wce,[M[10]||(M[10]=l("small",{class:"d-block text-muted"},"Proventos",-1)),l("strong",zce,pe(D.value.total_dividends||0),1)]),l("div",Yce,[M[11]||(M[11]=l("small",{class:"d-block text-muted"},"Quantidade LÃquida",-1)),l("strong",{class:Me(D.value.net_quantity>=0?"text-positive":"text-negative")},pe(q(D.value.net_quantity)),3)]),l("div",qce,[M[12]||(M[12]=l("small",{class:"d-block text-muted"},"Investido LÃquido",-1)),l("strong",{class:Me(D.value.total_invested-D.value.total_received>=0?"text-positive":"text-negative")},pe(W.$fmtCurrency(D.value.total_invested-D.value.total_received)),3)]),l("div",Gce,[M[13]||(M[13]=l("small",{class:"d-block text-muted"},"Total Proventos",-1)),l("strong",Xce,pe(W.$fmtCurrency(D.value.total_dividends_amount||0)),1)]),l("div",Kce,[M[14]||(M[14]=l("small",{class:"d-block text-muted"},"Total Geral",-1)),l("strong",{class:Me(D.value.total_dividends_amount+(D.value.total_invested-D.value.total_received)>=0?"text-positive":"text-negative")},pe(W.$fmtCurrency(D.value.total_dividends_amount+(D.value.total_invested-D.value.total_received)||0)),3)])])])):xe("",!0),l("div",Jce,[l("div",Qce,[M[17]||(M[17]=l("div",{class:"col-auto"},[l("label",{class:"form-label small mb-0"},"Filtrar:")],-1)),l("div",Zce,[_t(l("select",{"onUpdate:modelValue":M[0]||(M[0]=he=>v.value=he),class:"form-select form-select-sm"}
60,[...M[16]||(M[16]=[$u('<option value="all" data-v-712822bf>Todas as operações</option><option value="purchase" data-v-712822bf>Compras</option><option value="sale" data-v-712822bf>Vendas</option><option value="daytrade" data-v-712822bf>Day Trade</option><option value="corporate_action" data-v-712822bf>Ações Corporativas</option><option value="dividend" data-v-712822bf>Proventos</option>',6)])],512),[[An,v.value]])]),l("div",ede,[l("button",{class:"btn btn-sm btn-outline-secondary",onClick:C,disabled:c.value},[l("i",{class:Me(["bi",c.value?"bi-arrow-clockwise spin":"bi-arrow-clockwise"])},null,2)],8,tde)])])]),c.value?($(),L("div",sde,[...M[18]||(M[18]=[l("div",{class:"spinner-border",role:"status"},[l("span",{class:"visually-hidden"},"Carregando...")],-1),l("p",{class:"text-muted small mt-2"},"Carregando operações...",-1)])])):F.value.length>0?($(),L("div",nde,[($(!0),L(Ze,null,At(F.value,he=>{var oe;return $(),L("div",{key:he.id,class:"order-item mb-3 border rounded"},[he.item_type==="dividend"?($(),L("div",ide,[l("div",rde,[l("div",ade,[l("div",ode,[l("span",lde,pe(B(he.dividend_type)),1),l("div",ude,[he.record_date?($(),L("span",cde,[M[19]||(M[19]=l("i",{class:"bi bi-calendar-event me-1"},null,-1)),M[20]||(M[20]=l("strong",null,"Data com",-1)),Pe(": "+pe(ge(he.record_date)),1)])):xe("",!0),l("span",dde,[M[21]||(M[21]=l("i",{class:"bi bi-calendar-check me-1"},null,-1)),M[22]||(M[22]=l("strong",null,"Pagamento",-1)),Pe(": "+pe(ge(he.payment_date)),1)])])]),M[23]||(M[23]=l("span",{class:"badge bg-secondary"}," Pago ",-1))])]),l("div",hde,[l("div",fde,[l("div",pde,[l("div",mde,[l("div",gde,[l("div",vde,[l("strong",bde,pe(q(A(he))),1),l("small",yde,pe(E()),1),M[24]||(M[24]=l("small",{class:"text-muted"},"â¢",-1)),l("strong",_de,pe(W.$fmtCurrency(O(he))),1),l("small",xde,"por "+pe(P()),1)])]),he.description?($(),L("div",wde,[l("small",Ede,[M[25]||(M[25]=l("i",{class:"bi bi-info-circle me-1"},null,-1)),Pe(" "+pe(he.description),1)])])):xe("",!0)])]),l("div",Sde,[l("div",kde,[l("div",Cde,[l("div",Tde,pe(W.$fmtCurrency(j(he))),1),M[26]||(M[26]=l("small",{class:"text-muted d-block"}," Total Recebido ",-1))])])])])])])):he.item_type==="trade_order"?($(),L("div",{key:1,class:Me(["trade-order-item",{"daytrade-order":he.trade_type==="daytrade"}
60])},[l("div",{class:Me(["order-header p-3",{"bg-warning bg-opacity-10":he.trade_type==="daytrade"}])},[l("div",Ade,[l("div",Ode,[l("span",{class:Me(["order-type-badge",be(he.type,he.trade_type)])},pe(J(he.operation_type,he.trade_type)),3),l("span",Dde,[M[27]||(M[27]=l("i",{class:"bi bi-calendar-event me-1"},null,-1)),Pe(" "+pe(ge(he.trade_date)),1)]),l("div",Pde,[($(!0),L(Ze,null,At(he.tags,K=>($(),L("span",{key:K,class:"tag-badge bg-light text-dark small me-2"},[M[28]||(M[28]=l("i",{class:"bi bi-tag me-1"},null,-1)),Pe(pe(K),1)]))),128))])]),l("div",$de,[l("button",{class:"btn btn-sm btn-outline-primary",onClick:K=>z(he),title:"Editar"},[...M[29]||(M[29]=[l("i",{class:"bi bi-pencil"},null,-1)])],8,Ide),l("button",{class:"btn btn-sm btn-outline-success",onClick:K=>re(he),title:"Clonar"},[...M[30]||(M[30]=[l("i",{class:"bi bi-copy"},null,-1)])],8,Mde),l("button",{class:"btn btn-sm btn-outline-danger",onClick:K=>ne(he),title:"Remover",disabled:c.value},[l("i",{class:Me(["bi",c.value?"bi-hourglass-split":"bi-trash"])},null,2)],8,Nde)])])],2),l("div",Lde,[l("div",Rde,[l("div",Fde,[l("div",Vde,[l("div",Bde,[l("div",Ude,[l("strong",jde,pe(q(he.quantity)),1),l("small",Hde,pe(E()),1),M[31]||(M[31]=l("small",{class:"text-muted"},"â¢",-1)),l("strong",Wde,pe(W.$fmtCurrency(he.price)),1)])]),((oe=he.fees)==null?void 0:oe.total)>0?($(),L("div",zde,[l("small",Yde,[M[32]||(M[32]=l("i",{class:"bi bi-receipt me-1"},null,-1)),Pe(" Taxas: "+pe(W.$fmtCurrency(he.fees.total)),1)])])):xe("",!0)])]),l("div",qde,[l("div",Gde,[l("div",Xde,[l("div",{class:Me(["value-amount",Z(he.operation_type)])},pe(W.$fmtCurrency(he.net_amount)),3),l("small",Kde,pe(["buy","option_exercise"].includes(he.operation_type)?"Custo Total":"Valor LÃquido"),1)]),Math.abs(he.total_amount-he.net_amount)>.01?($(),L("div",Jde,[l("small",Qde," Bruto: "+pe(W.$fmtCurrency(he.total_amount)),1)])):xe("",!0)])])])])],2)):xe("",!0)])}),128))])):($(),L("div",Zde,[M[34]||(M[34]=l("i",{class:"bi bi-clock-history display-4 opacity-50"},null,-1)),M[35]||(M[35]=l("p",{class:"mt-2"},"Nenhuma operação encontrada",-1)),v.value!=="all"?($(),L("p",ehe,[M[33]||(M[33]=Pe(" Tente alterar o filtro ou ",-1)),l("a",{href:"#",onClick:M[1]||(M[1]=St(he=>v.value="all",["prevent"])),class:"text-primary"},"ver todas as operações")])):xe("",!0)])),l("div",{class:"mt-4 pt-3 border-top"},[l("div",{class:"d-grid gap-2"},[l("button",{class:"btn btn-success btn-sm",onClick:r},[...M[36]||(M[36]=[l("i",{class:"bi bi-plus-circle me-1"},null,-1),Pe(" Novo lançamento ",-1)])])])])]))}},she=ls(the,[["__scopeId","data-v-712822bf"]]),nhe={class:"asset-details-offcanvas"},ihe={class:"asset-header"},rhe={class:"d-flex align-items-center gap-3"},ahe={class:"flex-grow-1"},ohe={class:"d-flex align-items-center gap-2 mt-1"},lhe={key:0,class:"asset-tabs"},uhe={class:"nav nav-tabs nav-justified"},che=["onClick"],dhe={class:"asset-content"},hhe={key:0,class:"tab-pane fade show active"},fhe={key:1,class:"tab-pane fade show active"},phe={key:2,class:"tab-pane fade show active"},mhe={__name:"AssetDetailsOffcanvas",props:{asset:{type:Object,required:!0}},setup(t){const e=t,s=ve({...e.asset}),n=[{id:"fundamentals",name:"Fundamentos",icon:"bi-calculator"},{id:"position",name:"Posição",icon:"bi-graph-up"},{id:"releases",name:"Lançamentos",icon:"bi-clock-history"}],i=Ae(()=>{var f,v;const h=(v=(f=s.value.category)==null?void 0:f.slug)==null?void 0:v.toLowerCase();return h==="options"||h==="opcoes"}),o=Ae(()=>i.value?n.filter(h=>h.id==="releases"):n),r=ve(i.value?"releases":"fundamentals"),c=h=>{h.detail&&h.detail.assetId===s.value.id&&(s.value.current_price=h.detail.newPrice,s.value.price_change_percent=h.detail.priceChangePercent,h.detail.fullData&&(s.value={...s.value,...h.detail.fullData}))};return Pt(()=>e.asset,h=>{s.value={...h},i.value&&r.value!=="releases"?r.value="releases":!i.value&&r.value==="releases"&&o.value.length>1&&(r.value="fundamentals")},{deep:!0}),Xt(()=>{window.addEventListener("asset-price-updated",c)}),Ni(()=>{window.removeEventListener("asset-price-updated",c)}),(h,f)=>{var v,g;return $(),L("div",nhe,[l("div",ihe,[l("div",rhe,[et(_d,{"asset-id":s.value.id,"show-price":!0,"show-variation":!0,"auto-update":!1,"show-edit-icon":!1,size:"lg"},null,8,["asset-id"]),l("div",ahe,[l("div",ohe,[l("span",{class:"badge",style:zs({backgroundColor:((v=s.value.category)==null?void 0:v.color)||"#666666",color:"white"})},pe(((g=s.value.category)==null?void 0:g.name)||"Sem Categoria"),5)])])])]),o.value.length>1?($(),L("nav",lhe,[l("ul",uhe,[($(!0),L(Ze,null,At(o.value,y=>($(),L("li",{class:"nav-item",key:y.id},[l("button",{class:Me(["nav-link",{active:r.value===y.id}]),onClick:x=>r.value=y.id},[l("i",{class:Me([y.icon,"me-1"])},null,2),Pe(" "+pe(y.name),1)],10,che)]))),128))])])):xe("",!0),l("div",dhe,[r.value==="fundamentals"&&!i.value?($(),L("div",hhe,[et(Voe,{asset:s.value},null,8,["asset"])])):xe("",!0),r.value==="position"&&!i.value?($(),L("div",fhe,[et(hie,{asset:s.value},null,8,["asset"])])):xe("",!0),r.value==="releases"?($(),L("div",phe,[et(she,{asset:s.value},null,8,["asset"])])):xe("",!0)])])}}},H_=ls(mhe,[["__scopeId","data-v-17a3ebf4"]]),NSe=Object.freeze(Object.defineProperty({__proto__:null,default:H_},Symbol.toStringTag,{value:"Module"})),ghe={key:0,class:"modal-day-content"},vhe={class:"operations-summary mb-3"},bhe={class:"row g-2"},yhe={class:"col-6 col-md-3"},_he={class:"summary-card text-center p-2 bg-light rounded-3 border"},xhe={class:"number text-primary fs-4 fw-bold"},whe={class:"col-6 col-md-3"},Ehe={class:"summary-card text-center p-2 bg-light rounded-3 border"},She={class:"number text-info fs-4 fw-bold"},khe={class:"col-6 col-md-3"},Che={class:"summary-card text-center p-2 bg-light rounded-3 border"},The={class:"number text-negative fs-4 fw-bold"},Ahe={class:"col-6 col-md-3"},Ohe={class:"summary-card text-center p-2 bg-light rounded-3 border"},Dhe={class:"number text-positive fs-4 fw-bold"},Phe={class:"nav nav-pills nav-fill mb-4 bg-light p-1 rounded-3"},$he={class:"nav-item"},Ihe={class:"badge bg-secondary ms-1 rounded-pill"},Mhe={key:0,class:"nav-item"},Nhe={class:"badge bg-secondary ms-1 rounded-pill"},Lhe={class:"transactions-section"},Rhe={key:0,class:"empty-state text-center py-5"},Fhe={key:1,class:"transactions-list"},Vhe={class:"card-body p-3"},Bhe={class:"transaction-header d-flex justify-content-between align-items-center mb-3 pb-3 border-bottom"},Uhe={class:"transaction-info d-flex flex-column gap-2"},jhe={class:"transaction-amount text-end"},Hhe={key:1,class:"amount fs-5 fw-bold text-secondary"},Whe={key:2,class:"amount fs-5 fw-bold text-secondary"},zhe={class:"text-muted d-block mt-1"}
60,Yhe={class:"transaction-details"},qhe={class:"row g-3"},Ghe={class:"col-6 col-md-3"},Xhe={class:"fs-6"},Khe={class:"col-6 col-md-3"},Jhe={class:"fs-6"},Qhe={class:"col-6 col-md-3"},Zhe={class:"fs-6"},efe={class:"col-6 col-md-3"},tfe={class:"col-6 col-md-3"},sfe={class:"fs-6"},nfe={class:"col-6 col-md-4"},ife={class:"fs-6"},rfe={class:"col-12 col-md-5"},afe={class:"fs-6"},ofe={key:2,class:"col-12"},lfe={class:"fs-6"},ufe={key:3,class:"col-12"},cfe={key:0,class:"mt-3 pt-3 border-top"},dfe={class:"news-section"},hfe={class:"transactions-list"},ffe=["onClick"],pfe={class:"card-body"},mfe={class:"d-flex align-items-center gap-2 mb-2"},gfe={class:"text-muted small ms-auto"},vfe={class:"fw-bold text-dark lh-sm mb-2",style:{"font-size":"0.95rem"}},bfe={class:"d-flex flex-wrap gap-2 align-items-center mt-2"},yfe={class:"badge bg-light text-dark small border"},_fe={__name:"CalendarDayModal",props:{dayData:{type:Object,required:!0}},emits:["close"],setup(t,{emit:e}){var G,ce,be;const s=gi(),n=tn(),i=Yn(),o=t,r=e,c=Mn(),h=Ae(()=>{var J,Z,ge;return((ge=(Z=(J=o.dayData)==null?void 0:J.day_data)==null?void 0:Z.news_items)==null?void 0:ge.length)>0}),f=ve(((be=(ce=(G=o.dayData)==null?void 0:G.day_data)==null?void 0:ce.transactions)==null?void 0:be.length)===0&&h.value?"news":"trades"),v=Ae(()=>{var Z;if(!((Z=o.dayData)!=null&&Z.date_formatted))return"Detalhes do Dia";const J=o.dayData.date_formatted;if(J.includes("-")){const ge=J.split("-");if(ge.length===3)return`${ge[2]}/${ge[1]}/${ge[0]}`}return`Em ${J}`}),g=()=>{document.querySelectorAll(".tooltip").forEach(Z=>Z.remove()),i.closeAll(),s.push("/my-account/plans")},y=J=>{r("close"),setTimeout(()=>{c.open(cr(H_),{title:"Detalhes do ativo",asset:J})},150)},x=J=>{n.hasModule("pro_news")&&(r("close"),setTimeout(()=>{c.open(cr(Pf),{newsId:J.id,news:J,title:"NotÃcia"})},150))},E=J=>{if(J.type==="dividend")return"bg-success";if(J.type==="future_dividend")return"bg-primary";if(J.type==="corporate_event")return"bg-warning text-dark";if(J.type==="maturity")return"bg-success";if(J.type==="option_expiration")return"bg-secondary";if(J.type==="datacom")return"bg-info text-dark";if(J.type==="trade")switch(J.operation_type){case"buy":return"bg-negative text-white";case"sell":return"bg-positive";case"daytrade":return"bg-warning text-dark";default:return"bg-secondary"}return"bg-secondary"},P=J=>{if(J.type==="dividend")return"bi-cash-coin";if(J.type==="future_dividend")return"bi-cash-stack";if(J.type==="corporate_event")return"bi-building-gear";if(J.type==="maturity")return"bi-calendar2-check-fill";if(J.type==="option_expiration")return"bi-clock-history";if(J.type==="datacom")return"bi-calendar-star-fill";if(J.type==="trade")switch(J.operation_type){case"buy":return"bi-arrow-down-circle";case"sell":return"bi-arrow-up-circle";case"daytrade":return"bi-arrow-left-right";default:return"bi-arrow-right-circle"}return"bi-circle"},I=J=>J.type==="dividend"?{dividend:"Dividendo",jcp:"JCP",interest:"Juros",income:"Rendimento"}[J.dividend_type]||"Provento":J.type==="future_dividend"?"Provento Previsto":J.type==="corporate_event"?"Evento Corp.":J.type==="maturity"?"Vencimento":J.type==="option_expiration"?"Expiração de Opção":J.type==="datacom"?"Data COM":J.type==="trade"?{buy:"Compra",sell:"Venda",daytrade:"Day Trade"}[J.operation_type]||"Trade":"Transação",D=J=>J.type==="trade"?Math.abs(J.net_amount):["corporate_event","datacom"].includes(J.type)?0:J.total_amount,F=J=>J.type==="trade"?["sell","daytrade"].includes(J.operation_type)?"+":"-":["corporate_event","datacom"].includes(J.type)?"":"+",C=J=>["corporate_event","datacom"].includes(J.type)?"text-secondary":F(J)==="+"?"text-positive":"text-negative",A=J=>{if(!J)return"";const Z=J.split("-");return Z.length===3?`${Z[2]}/${Z[1]}/${Z[0]}`:J},O=J=>J.type==="trade"?`${A(J.trade_date)}`:`${A(J.payment_date)}`,j=J=>new Intl.NumberFormat("pt-BR",{minimumFractionDigits:0,maximumFractionDigits:4}).format(J),te=J=>J?new Date(J).toLocaleTimeString("pt-BR",{hour:"2-digit",minute:"2-digit"}):"",B={acoes:"Ações",fiis:"FIIs",bdr:"BDRs",etf:"ETFs",cripto:"Cripto",renda_fixa:"Renda Fixa",tesouro:"Tesouro",futuros:"Futuros",cambio:"Moedas",commodities:"Commodities",macro:"Macro",politica:"PolÃtica",empresas:"Empresas",internacional:"Internacional",indicadores:"Indicadores",outros:"Outros"},z=J=>B[J]||J||"Geral",re=J=>({positive:"bg-success",negative:"bg-danger",neutral:"bg-secondary"})[J]||"bg-secondary",ne=J=>({positive:"bi-arrow-up-circle",negative:"bi-arrow-down-circle",neutral:"bi-dash-circle"})[J]||"bi-dash-circle",X=J=>({positive:"Positiva",negative:"Negativa",neutral:"Neutra"})[J]||"Neutra";return(J,Z)=>($(),Ut(Ha,{modelValue:!0,title:v.value,size:"modal-lg","onUpdate:modelValue":Z[3]||(Z[3]=ge=>J.$emit("close"))},{footer:vt(()=>[l("button",{type:"button",class:"btn btn-secondary d-flex align-items-center gap-1",onClick:Z[2]||(Z[2]=ge=>J.$emit("close"))},[...Z[27]||(Z[27]=[l("i",{class:"bi bi-x-circle"},null,-1),Pe(" Fechar ",-1)])])]),default:vt(()=>{var ge;return[t.dayData?($(),L("div",ghe,[l("div",vhe,[l("div",bhe,[l("div",yhe,[l("div",_he,[l("div",xhe,pe(t.dayData.day_data.transactions.length),1),Z[4]||(Z[4]=l("small",{class:"text-muted d-block lh-sm",style:{"font-size":"0.75rem"}},"Eventos/Trades",-1))])]),l("div",whe,[l("div",Ehe,[l("div",She,pe(((ge=t.dayData.day_data.news_items)==null?void 0:ge.length)||0),1),Z[5]||(Z[5]=l("small",{class:"text-muted d-block lh-sm",style:{"font-size":"0.75rem"}}
60,"NotÃcias",-1))])]),l("div",khe,[l("div",Che,[l("div",The,pe(t.dayData.day_data.operations.buy.count),1),Z[6]||(Z[6]=l("small",{class:"text-muted d-block lh-sm",style:{"font-size":"0.75rem"}},"Compras",-1))])]),l("div",Ahe,[l("div",Ohe,[l("div",Dhe,pe(t.dayData.day_data.operations.sell.count),1),Z[7]||(Z[7]=l("small",{class:"text-muted d-block lh-sm",style:{"font-size":"0.75rem"}},"Vendas",-1))])])])]),l("ul",Phe,[l("li",$he,[l("a",{class:Me(["nav-link py-2 d-flex align-items-center justify-content-center gap-2",{active:f.value==="trades"}]),onClick:Z[0]||(Z[0]=St(q=>f.value="trades",["prevent"])),href:"#"},[Z[8]||(Z[8]=l("i",{class:"bi bi-arrow-left-right"},null,-1)),Z[9]||(Z[9]=Pe(" Operações & Eventos ",-1)),l("span",Ihe,pe(t.dayData.day_data.transactions.length),1)],2)]),h.value?($(),L("li",Mhe,[l("a",{class:Me(["nav-link py-2 d-flex align-items-center justify-content-center gap-2",{active:f.value==="news"}]),onClick:Z[1]||(Z[1]=St(q=>f.value="news",["prevent"])),href:"#"},[Z[10]||(Z[10]=l("i",{class:"bi bi-newspaper"},null,-1)),Z[11]||(Z[11]=Pe(" NotÃcias ",-1)),l("span",Nhe,pe(t.dayData.day_data.news_items.length),1)],2)])):xe("",!0)]),_t(l("div",Lhe,[t.dayData.day_data.transactions.length?($(),L("div",Fhe,[($
60(!0),L(Ze,null,At(t.dayData.day_data.transactions,(q,W)=>{var M;return $(),L("div",{key:"trans-"+W,class:"transaction-card card border-0 shadow-sm mb-3"},[l("div",Vhe,[l("div",Bhe,[l("div",Uhe,[l("span",{class:Me(["badge fs-7 align-self-start",E(q)])},[l("i",{class:Me(["bi me-1",P(q)])},null,2),Pe(" "+pe(I(q)),1)],2),q.asset?($(),Ut(_d,{key:0,"asset-id":q.asset.id,showPrice:!1,showVariation:!1,showEditIcon:!1,clickable:!0,onClick:y},null,8,["asset-id"])):xe("",!0)]),l("div",jhe,[q.type!=="corporate_event"&&q.type!=="datacom"?($(),L("div",{key:0,class:Me(["amount fs-5 fw-bold",C(q)])},pe(F(q))+pe(J.$fmtCurrency(D(q))),3)):q.type==="corporate_event"?($(),L("div",Hhe," Fator: "+pe(q.factor),1)):q.type==="datacom"?($(),L("div",Whe,[...Z[13]||(Z[13]=[l("i",{class:"bi bi-clock-history"},null,-1)])])):xe("",!0),l("small",zhe,pe(O(q)),1)])]),l("div",Yhe,[l("div",qhe,[q.type==="trade"?($(),L(Ze,{key:0},[l("div",Ghe,[Z[14]||(Z[14]=l("small",{class:"text-muted d-block mb-1"},"Quantidade",-1)),l("strong",Xhe,pe(j(q.quantity)),1)]),l("div",Khe,[Z[15]||(Z[15]=l("small",{class:"text-muted d-block mb-1"},"Preço",-1)),l("strong",Jhe,pe(J.$fmtCurrency(q.price)),1)]),l("div",Qhe,[Z[16]||(Z[16]=l("small",{class:"text-muted d-block mb-1"},"Taxas",-1)),l("strong",Zhe,pe(J.$fmtCurrency(((M=q.fees)==null?void 0:M.total)||0)),1)]),l("div",efe,[Z[17]||(Z[17]=l("small",{class:"text-muted d-block mb-1"},"LÃquido",-1)),l("strong",{class:Me(["fs-6",C(q)])},pe(F(q))+pe(J.$fmtCurrency(q.net_amount)),3)])],64)):["dividend","future_dividend","datacom"].includes(q.type)?($(),L(Ze,{key:1},[l("div",tfe,[Z[18]||(Z[18]=l("small",{class:"text-muted d-block mb-1"},"Qtd. Base",-1)),l("strong",sfe,pe(q.quantity?j(q.quantity):"-"),1)]),l("div",nfe,[Z[19]||(Z[19]=l("small",{class:"text-muted d-block mb-1"},"Valor/Ação",-1)),l("strong",ife,pe(J.$fmtCurrency(q.amount_per_share)),1)]),l("div",rfe,[Z[20]||(Z[20]=l("small",{class:"text-muted d-block mb-1"},"Descrição",-1)),l("strong",afe,pe(q.description||"-"),1)])],64)):q.type==="corporate_event"?($(),L("div",ofe,[Z[21]||(Z[21]=l("small",{class:"text-muted d-block mb-1"},"Descrição do Evento",-1)),l("strong",lfe,pe(q.description),1)])):q.type==="maturity"?($(),L("div",ufe,[...Z[22]||(Z[22]=[l("small",{class:"text-muted d-block mb-1"},"Status",-1),l("strong",{class:"fs-6 text-success"},[l("i",{class:"bi bi-calendar-check me-1"}),Pe(" Data limite / Resgate programado")],-1)])])):xe("",!0)]),q.tags&&q.tags.length>0?($(),L("div",cfe,[Z[23]||(Z[23]=l("small",{class:"text-muted d-block mb-2"},"Tags:",-1)),($(!0),L(Ze,null,At(q.tags,he=>($(),L("span",{key:he,class:"badge bg-secondary me-1 mb-1"},pe(he),1))),128))])):xe("",!0)])])])}),128))])):($(),L("div",Rhe,[...Z[12]||(Z[12]=[l("i",{class:"bi bi-receipt display-4 text-muted opacity-50 mb-3"},null,-1),l("p",{class:"text-muted mb-2"},"Nenhum evento neste dia",-1)])]))],512),[[Rr,f.value==="trades"]]),_t(l("div",dfe,[l("div",hfe,[($(!0),L(Ze,null,At(t.dayData.day_data.news_items,q=>($(),L("div",{key:q.id,class:Me(["news-item mb-3 position-relative",{"is-locked":!Ne(n).hasModule("pro_news")}]),onClick:W=>x(q)},[l("div",{class:Me(["card",{"blurred-locked":!Ne(n).hasModule("pro_news")}])},[l("div",pfe,[l("div",mfe,[l("span",gfe,[Z[24]||(Z[24]=l("i",{class:"bi bi-clock me-1"},null,-1)),Pe(" "+pe(te(q.pub_date)),1)])]),l("h6",vfe,pe(q.cta||q.title),1),l("div",bfe,[l("span",yfe,[Z[25]||(Z[25]=l("i",{class:"bi bi-tag me-1"},null,-1)),Pe(" "+pe(z(q.primary_category||q.category)),1)]),l("span",{class:Me(["badge ms-auto",re(q.sentiment)])},[l("i",{class:Me([ne(q.sentiment),"me-1"])},null,2),Pe(" "+pe(X(q.sentiment)),1)],2)])])],2),Ne(n).hasModule("pro_news")?xe("",!0):($(),L("div",{key:0,class:"lock-overlay d-flex align-items-center justify-content-center",onClick:g},[...Z[26]||(Z[26]=[l("i",{class:"bi bi-lock","data-bs-toggle":"tooltip","data-bs-placement":"bottom",title:"Adquira em Planos & Licenças"},null,-1)])]))],10,ffe))),128))])],512),[[Rr,f.value==="news"]])])):xe("",!0)]}),_:1},8,["title"]))}},xfe=ls(_fe,[["__scopeId","data-v-b7d4f60b"]]),wfe={class:"calendar-section"},Efe={class:"calendar-card card border-0 shadow-sm rounded-4 overflow-hidden"},Sfe={class:"card-body p-0 bg-light-subtle"},kfe={class:"calendar-header-row"},Cfe={class:"day-name text-uppercase tracking-wide"},Tfe={class:"calendar-grid"},Afe=["onClick"],Ofe={class:"day-content"},Dfe={class:"day-header"},Pfe={class:"day-number"},$fe={key:0,class:"day-operations"},Ife=["title"],Mfe={class:"operation-count"},Nfe=["title"],Lfe={class:"operation-count"},Rfe=["title"],Ffe={class:"operation-count"},Vfe=["title"],Bfe={class:"operation-count"},Ufe=["title"],jfe={class:"operation-count"},Hfe=["title"],Wfe={class:"operation-count"},zfe=["title"],Yfe={class:"operation-count"},qfe=["title"],Gfe={class:"operation-count"},Xfe=["title"],Kfe={class:"operation-count"},Jfe=["title"],Qfe={class:"operation-count"},Zfe=["title"],epe={class:"operation-count"},tpe=["title"],spe={class:"operation-count"},npe={__name:"CalendarComponent",setup(t){const e=In(),s=pi(),n=Yn(),i=ve(null),o=ve(new Date),r=ve(!1),c=Ae(()=>o.value.toLocaleDateString("pt-BR",{month:"long",year:"numeric"})),h=Ae(()=>o.value.getFullYear()),f=Ae(()=>o.value.getMonth()+1),v=Ae(()=>new Date(h.value,f.value,0).getDate()),g=Ae(()=>new Date(h.value,f.value-1,1).getDay()),y=async()=>
60{if(s.getCurrentPortfolioId()){e.startLoading(!0),r.value=!0,i.value=null;try{const C=await ct.get("/api/calendar",{params:{year:h.value,month:f.value}});C.data.success?i.value=C.data.data:(console.error("Erro ao carregar calendário:",C.data.message),i.value=null)}catch(C){console.error("Erro ao carregar calendário:",C),i.value=null}finally{e.stopLoading(),r.value=!1}}},x=C=>{o.value=new Date(C.date),y()},E=()=>{const C=localStorage.getItem("mn_selected_date_calendar");if(C){const A=new Date(C);o.value=A,y()}else y()},P=C=>{const A=[],j=new Date(h.value,f.value-1,C).getDay(),te=new Date;return te.getFullYear()===h.value&&te.getMonth()+1===f.value&&te.getDate()===C&&A.push("today"),(j===0||j===6)&&A.push("weekend"),I(C)&&A.push("has-operations"),A},I=C=>D(C).total_operations>0,D=C=>{var O;const A={total_operations:0,operations:{buy:{count:0,amount:0},sell:{count:0,amount:0},daytrade:{count:0,amount:0},dividend:{count:0,amount:0},future_dividend:{count:0,amount:0},corporate_event:{count:0,amount:0},maturity:{count:0,amount:0},jcp:{count:0,amount:0},bonus:{count:0,amount:0},news:{count:0,amount:0},datacom:{count:0,amount:0}}};return(O=i.value)!=null&&O.calendar_data&&i.value.calendar_data[C]||A},F=async C=>{var j,te;if(!I(C))return;const O=new Date(h.value,f.value-1,C).toISOString().split("T")[0];try{const B=await ct.get("/api/calendar",{params:{date:O}});B.data.success&&n.open(xfe,{dayData:B.data.data})}catch(B){console.error("Erro ao carregar detalhes do dia:",B),alert("Erro ao carregar detalhes: "+(((te=(j=B.response)==null?void 0:j.data)==null?void 0:te.message)||B.message))}};return Pt(()=>s.getCurrentPortfolioId(),C=>{C&&y()}),Xt(()=>{E()}),(C,A)=>($(),L("div",wfe,[l("div",Efe,[et(ED,{currentMonth:c.value,onDateChange:x,"hide-date":"",context:"calendar",class:"calendar-navigator border-bottom"},null,8,["currentMonth"]),l("div",Sfe,[l("div",{class:Me(["calendar-wrapper",{"is-loading":r.value}])},[l("div",kfe,[($(),L(Ze,null,At(["Dom","Seg","Ter","Qua","Qui","Sex","Sáb"],O=>l("div",{key:O,class:Me(["calendar-header-cell",{"weekend text-primary":O==="Dom"||O==="Sáb"}])},[l("span",Cfe,pe(O),1)],2)),64))]),l("div",Tfe,[($(!0),L(Ze,null,At(g.value,O=>($(),L("div",{key:`empty-${h.value}-${f.value}-${O}`,class:"calendar-day empty"}))),128)),($(!0),L(Ze,null,At(v.value,O=>{var j,te;return $(),L("div",{key:`day-${h.value}-${f.value}-${O}`,class:Me(["calendar-day",P(O)]),onClick:B=>F(O)},[l("div",Ofe,[l("div",Dfe,[l("span",Pfe,pe(O),1)]),I(O)?($(),L("div",$fe,[D(O).operations.buy.count>0?($(),L("div",{key:0,class:"operation-badge buy","data-bs-toggle":"tooltip",title:`${D(O).operations.buy.count} Compra(s) - ${C.$fmtCurrency(D(O).operations.buy.amount)}`},[A[0]||(A[0]=l("i",{class:"bi bi-arrow-down-circle-fill"},null,-1)),l("span",Mfe,pe(D(O).operations.buy.count),1)],8,Ife)):xe("",!0),D(O).operations.sell.count>0?($(),L("div",{key:1,class:"operation-badge sell","data-bs-toggle":"tooltip",title:`${D(O).operations.sell.count} Venda(s) - ${C.$fmtCurrency(D(O).operations.sell.amount)}`},[A[1]||(A[1]=l("i",{class:"bi bi-arrow-up-circle-fill"},null,-1)),l("span",Lfe,pe(D(O).operations.sell.count),1)],8,Nfe)):xe("",!0),D(O).operations.daytrade.count>0?($(),L("div",{key:2,class:"operation-badge daytrade","data-bs-toggle":"tooltip",title:`${D(O).operations.daytrade.count} Daytrade(s) - ${C.$fmtCurrency(D(O).operations.daytrade.amount)}`},[A[2]||(A[2]=l("i",{class:"bi bi-arrow-left-right"},null,-1)),l("span",Ffe,pe(D(O).operations.daytrade.count),1)],8,Rfe)):xe("",!0),D(O).operations.dividend.count>0?($(),L("div",{key:3,class:"operation-badge dividend","data-bs-toggle":"tooltip",title:`${D(O).operations.dividend.count} Dividendos - ${C.$fmtCurrency(D(O).operations.dividend.amount)}`},[A[3]||(A[3]=l("i",{class:"bi bi-cash-coin"},null,-1)),l("span",Bfe,pe(D(O).operations.dividend.count),1)],8,Vfe)):xe("",!0),D(O).operations.future_dividend.count>0?($(),L("div",{key:4,class:"operation-badge future_dividend","data-bs-toggle":"tooltip",title:`${D(O).operations.future_dividend.count} Provento(s) - ${C.$fmtCurrency(D(O).operations.future_dividend.amount)}`},[A[4]||(A[4]=l("i",{class:"bi bi-cash-stack"},null,-1)),l("span",jfe,pe(D(O).operations.future_dividend.count),1)],8,Ufe)):xe("",!0),D(O).operations.datacom.count>0?($(),L("div",{key:5,class:"operation-badge datacom","data-bs-toggle":"tooltip",title:`${D(O).operations.datacom.count} Data(s) COM`}
60,[A[5]||(A[5]=l("i",{class:"bi bi-calendar-star-fill"},null,-1)),l("span",Wfe,pe(D(O).operations.datacom.count),1)],8,Hfe)):xe("",!0),D(O).operations.corporate_event.count>0?($(),L("div",{key:6,class:"operation-badge corporate_event","data-bs-toggle":"tooltip",title:`${D(O).operations.corporate_event.count} Evento(s)`},[A[6]||(A[6]=l("i",{class:"bi bi-building-gear"},null,-1)),l("span",Yfe,pe(D(O).operations.corporate_event.count),1)],8,zfe)):xe("",!0),D(O).operations.maturity.count>0?($(),L("div",{key:7,class:"operation-badge maturity","data-bs-toggle":"tooltip",title:`${D(O).operations.maturity.count} Venc. Renda Fixa - ${C.$fmtCurrency(D(O).operations.maturity.amount)}`},[A[7]||(A[7]=l("i",{class:"bi bi-calendar2-check-fill"},null,-1)),l("span",Gfe,pe(D(O).operations.maturity.count),1)],8,qfe)):xe("",!0),((j=D(O).operations.option_expiration)==null?void 0:j.count)>0?($(),L("div",{key:8,class:"operation-badge option_expiration","data-bs-toggle":"tooltip",title:`${D(O).operations.option_expiration.count} Venc. Opção(ões) - Estimado: ${C.$fmtCurrency(D(O).operations.option_expiration.amount)}`},[A[8]||(A[8]=l("i",{class:"bi bi-clock-history"},null,-1)),l("span",Kfe,pe(D(O).operations.option_expiration.count),1)],8,Xfe)):xe("",!0),D(O).operations.jcp.count>0?($(),L("div",{key:9,class:"operation-badge jcp","data-bs-toggle":"tooltip",title:`${D(O).operations.jcp.count} JCP(s) - ${C.$fmtCurrency(D(O).operations.jcp.amount)}`},[A[9]||(A[9]=l("i",{class:"bi bi-gem"},null,-1)),l("span",Qfe,pe(D(O).operations.jcp.count),1)],8,Jfe)):xe("",!0),D(O).operations.bonus.count>0?($(),L("div",{key:10,class:"operation-badge bonus","data-bs-toggle":"tooltip",title:`${D(O).operations.bonus.count} Bonificação(ões) - ${C.$fmtCurrency(D(O).operations.bonus.amount)}`},[A[10]||(A[10]=l("i",{class:"bi bi-gift-fill"},null,-1)),l("span",epe,pe(D(O).operations.bonus.count),1)],8,Zfe)):xe("",!0),((te=D(O).operations.news)==null?void 0:te.count)>0?($(),L("div",{key:11,class:"operation-badge news","data-bs-toggle":"tooltip",title:`${D(O).operations.news.count} NotÃcia(s)`},[A[11]||(A[11]=l("i",{class:"bi bi-newspaper"},null,-1)),l("span",spe,pe(D(O).operations.news.count),1)],8,tpe)):xe("",!0)])):xe("",!0)])],10,Afe)}),128))])],2)])])]))}},ipe=ls(npe,[["__scopeId","data-v-7702470d"]]),W_=pa("watchlist",()=>{const t=ve([]),e=ve([]),s=ve({}),n=ve(!1),i=ve(!1),o=pi(),r=Ae(()=>o.getCurrentPortfolioId()),c=Ae(()=>o.getCurrentPortfolioId()!==null),h=async()=>{if(c.value){n.value=!0;try{const j=await ct.get("/api/watchlist",{params:{portfolio_id:r.value}});t.value=j.data.data}catch(j){throw console.error("Erro ao carregar watchlist:",j),j}finally{n.value=!1}}},f=async(j,te="")=>{if(!c.value)throw new Error("Nenhuma carteira selecionada");try{const B=await ct.post("/api/watchlist/assets",{asset_id:j,notes:te,portfolio_id:r.value});return await h(),B.data}catch(B){throw console.error("Erro ao adicionar à watchlist:",B),B}},v=async j=>{if(c.value)try{await ct.delete(`/api/watchlist/assets/${j}`,{params:{portfolio_id:r.value}}),await h()}catch(te){throw console.error("Erro ao remover da watchlist:",te),te}},g=async j=>{if(c.value)try{await ct.post("/api/watchlist/reorder",{order:j,portfolio_id:r.value}),await h()}catch(te){throw console.error("Erro ao reordenar watchlist:",te),te}},y=async(j="1d")=>{if(c.value)try{const te=await ct.get("/api/watchlist/performance",{params:{period:j,portfolio_id:r.value}});return s.value=te.data.data||[],te.data.data}catch(te){throw console.error("â Erro ao carregar performance:",te),s.value=[],te}},x=async()=>{if(c.value){i.value=!0;try{const j=await ct.get("/api/alerts",{params:{portfolio_id:r.value}});console.log("ð RESPOSTA BRUTA DA API DE ALERTAS:",j.data),e.value=j.data.data||j.data||[]}catch(j){throw console.error("Erro ao carregar alertas:",j),e.value=[],j}finally{i.value=!1}}},E=async j=>{if(!c.value)throw new Error("Nenhuma carteira selecionada");try{const te=await ct.post("/api/alerts",{...j,portfolio_id:r.value});return await x(),te.data}catch(te){throw console.error("Erro ao criar alerta:",te),te}},P=async(j,te)=>{if(!c.value)throw new Error("Nenhuma carteira selecionada");try{console.log("ð¤ Atualizando alerta:",{id:j,alertData:te});const B=await ct.put(`/api/alerts/${j}`,{...te,portfolio_id:r.value});return await x(),B.data}catch(B){throw console.error("â Erro ao atualizar alerta:",B),B}},I=async j=>{if(c.value)try{await ct.delete(`/api/alerts/${j}`,{params:{portfolio_id:r.value}}),await x()}catch(te){throw console.error("Erro ao deletar alerta:",te),te}},D=async j=>{if(c.value)try{const te=await ct.post(`/api/alerts/${j}/toggle`,{portfolio_id:r.value});return await x(),te.data}catch(te){throw console.error("Erro ao alternar alerta:",te),te}},F=j=>t.value.some(te=>{var B;return te.asset_id===j||((B=te.asset)==null?void 0:B.id)===j}),C=j=>!e.value||!Array.isArray(e.value)?(console.warn("â ï¸ alerts.value não é um array válido:",e.value),[]):e.value.filter(te=>{var B;return te.asset_id===j||((B=te.asset)==null?void 0:B.id)===j}),A=Ae(()=>!e.value||!Array.isArray(e.value)?[]:e.value.filter(j=>j.is_active)),O=Ae(()=>!e.value||!Array.isArray(e.value)?[]:e.value.filter(j=>j.triggered));
60return{watchlist:t,alerts:e,performance:s,isLoading:n,hasActivePortfolio:c,getActiveAlerts:A,getTriggeredAlerts:O,fetchWatchlist:h,addToWatchlist:f,removeFromWatchlist:v,reorderWatchlist:g,fetchPerformance:y,fetchAlerts:x,createAlert:E,updateAlert:P,deleteAlert:I,toggleAlert:D,isAssetInWatchlist:F,getAssetAlerts:C}}),rpe={class:"add-asset-modal"},ape={class:"search-section mb-3"},ope={key:0,class:"selected-assets-section mt-2 mb-3 p-3 bg-light rounded border"},lpe={class:"d-flex flex-wrap gap-2"},upe=["onClick"],cpe=["disabled"],dpe={key:0,class:"spinner-border spinner-border-sm me-2"},hpe={class:"ms-1"},fpe={__name:"AddAssetModal",props:{watchlistItem:Object,onAssetAdded:Function,onNotesUpdated:Function},setup(t){const e=Yn(),s=W_(),n=vi(),i=t,o=ve(null),r=ve([]),c=ve(!1),h=Ae(()=>!!i.watchlistItem);Xt(()=>{h.value?r.value=[i.watchlistItem.asset]:vs(()=>{var x;(x=o.value)==null||x.focus()})});const f=x=>{r.value.find(E=>E.id===x.id)?n.show(`${x.code} já está na fila!`,"warning"):r.value.push(x),vs(()=>{var E,P;(E=o.value)==null||E.clear(),(P=o.value)==null||P.focus()})},v=x=>{r.value=r.value.filter(E=>E.id!==x),vs(()=>{var E;return(E=o.value)==null?void 0:E.focus()})},g=async()=>{var x,E,P;if(r.value.length!==0){c.value=!0;try{if(h.value)y();else{await Promise.all(r.value.map(D=>s.addToWatchlist(D.id,"")));const I=r.value.map(D=>D.code).join(", ");(x=i.onAssetAdded)==null||x.call(i,{code:I}),y()}}catch(I){console.error("â Erro ao salvar ativos no radar:",I),(P=(E=I.response)==null?void 0:E.data)!=null&&P.message?n.show(I.response.data.message,"error"):n.show("Erro ao processar a requisição","error")}finally{c.value=!1}}},y=()=>{e.close()};return(x,E)=>($(),Ut(Ha,{"model-value":!0,title:h.value?"Detalhes do Ativo":"Adicionar ativos",size:"modal-lg","onUpdate:modelValue":y},{footer:vt(()=>[l("button",{type:"button",class:"btn btn-secondary",onClick:y}," Cancelar "),l("button",{type:"button",class:"btn btn-primary",disabled:r.value.length===0||c.value,onClick:g},[c.value?($(),L("span",dpe)):xe("",!0),l("i",{class:Me(["bi",h.value?"bi-check2":"bi-plus-circle"])},null,2),l("span",hpe,pe(h.value?"Salvar":`Adicionar ${r.value.length>1?r.value.length+" ativos":"ao radar"}`),1)],8,cpe)]),default:vt(()=>[l("div",rpe,[_t(l("div",ape,[et(P_,{ref_key:"assetSearchRef",ref:o,label:"Buscar ativo por código ou nome",onAssetSelected:f},null,512)],512),[[Rr,!h.value]]),r.value.length>0?($(),L("div",ope,[E[1]||(E[1]=l("h6",{class:"text-muted mb-3 fs-6"}," Lista de ativos ",-1)),l("div",lpe,[($(!0),L(Ze,null,At(r.value,P=>($(),L("div",{key:P.id,class:"selected-asset-badge bg-white border border-success rounded p-2 d-flex align-items-center"},[et(_d,{"asset-id":P.id,asset:P,size:"sm","show-edit-icon":!1,"auto-update":!1,clickable:!1},null,8,["asset-id","asset"]),h.value?xe("",!0):($(),L("button",{key:0,class:"btn btn-sm btn-link text-danger ms-auto p-0 ps-2",onClick:I=>v(P.id),title:"Remover da lista"},[...E[0]||(E[0]=[l("i",{class:"bi bi-trash fs-5"},null,-1)])],8,upe))]))),128))])])):xe("",!0)])]),_:1},8,["title"]))}},ppe=ls(fpe,[["__scopeId","data-v-df6c2ead"]]),mpe={class:"price-alert-modal"},gpe={key:0,class:"asset-info mb-3 p-3 bg-light rounded"},vpe={class:"d-flex align-items-center"},bpe={class:"input-group mb-3"},ype={class:"form-floating"},_pe={class:"input-group mb-3"},xpe={key:0,class:"alert alert-info d-flex align-items-center mb-3 py-2 px-3",role:"alert",style:{"font-size":"0.85rem"}},wpe={key:1,class:"alert alert-warning d-flex align-items-center mb-3 py-2 px-3 border-warning",role:"alert",style:{"font-size":"0.85rem"}},Epe={class:"form-check form-switch mb-3 ps-5"},Spe={class:"d-flex justify-content-between w-100"},kpe=["disabled"],Cpe={class:"d-flex gap-2"},Tpe=["disabled"],Ape={key:0,class:"spinner-border spinner-border-sm me-2"},Ope={key:1,class:"bi bi-bell me-1"},Dpe={__name:"PriceAlertModal",props:{asset:Object,alert:Object,onAlertCreated:Function,onAlertUpdated:Function},setup(t){const e=Yn(),s=W_(),n=vi(),i=t,o=ve(0),r=ve(!1),c=ve({condition:"above",target_price:0,notification_method:"email",is_active:!0}),h=Ae(()=>!!i.alert),f=Ae(()=>h.value?"Editar alerta":"Criar alerta"),v=Ae(()=>c.value.target_price>0),g=Ae(()=>c.value.target_price>0&&c.value.target_price!==0);Xt(()=>{i.asset&&(o.value=i.asset.current_price||0,h.value||(c.value.condition==="above"?c.value.target_price=o.value*1.05:c.value.condition==="below"?c.value.target_price=o.value*.95:c.value.target_price=o.value)),i.alert&&(console.log("ð Editando alerta:",i.alert),c.value={condition:i.alert.condition,target_price:i.alert.target_price,notification_method:i.alert.notification_method||"email",is_active:i.alert.is_active},console.log("ð Formulário preenchido:",c.value))});const y=I=>{if(!I)return"Data desconhecida";const D=I.replace(" ","T"),F=new Date(D);
60return isNaN(F.getTime())?"Data desconhecida":new Intl.DateTimeFormat("pt-BR",{day:"2-digit",month:"2-digit",year:"numeric",hour:"2-digit",minute:"2-digit"}).format(F)},x=async()=>{var I,D,F;if(!v.value){n.show("Preço alvo deve ser maior que zero","warning");return}r.value=!0;try{const C={condition:c.value.condition,target_price:c.value.target_price,notification_method:c.value.notification_method,is_active:c.value.is_active,triggered:!1};if(h.value){if(!((I=i.alert)!=null&&I.id))throw new Error("ID do alerta não encontrado");await s.updateAlert(i.alert.id,C),n.show("Alerta atualizado com sucesso","success"),(D=i.onAlertUpdated)==null||D.call(i)}else await s.createAlert({asset_id:i.asset.id,...C}),n.show("Alerta criado com sucesso","success"),(F=i.onAlertCreated)==null||F.call(i);P()}catch(C){console.error("â Erro ao salvar alerta:",C)}finally{r.value=!1}},E=async()=>{if(i.alert){r.value=!0;try{await s.deleteAlert(i.alert.id),n.show("Alerta removido com sucesso","success"),P()}catch(I){console.error("â Erro ao excluir alerta:",I)}finally{r.value=!1}}},P=()=>{e.close()};return(I,D)=>($(),Ut(Ha,{"model-value":!0,title:f.value,size:"modal-md","onUpdate:modelValue":P},{footer:vt(()=>[l("div",Spe,[l("div",null,[h.value?($(),L("button",{key:0,type:"button",class:"btn btn-outline-danger",onClick:E,disabled:r.value},[...D[12]||(D[12]=[l("i",{class:"bi bi-trash me-1"},null,-1),Pe(" Excluir ",-1)])],8,kpe)):xe("",!0)]),l("div",Cpe,[l
60("button",{type:"button",class:"btn btn-secondary",onClick:P}," Cancelar "),l("button",{type:"button",class:"btn btn-primary",onClick:x,disabled:r.value||!v.value},[r.value?($(),L("span",Ape)):($(),L("i",Ope)),D[13]||(D[13]=Pe(" Salvar ",-1))],8,Tpe)])])]),default:vt(()=>{var F,C,A,O;return[l("div",mpe,[t.asset?($(),L("div",gpe,[l("div",vpe,[et(_d,{asset:t.asset,"show-price":!0,"show-variation":!0,"show-edit-icon":!1,"auto-update":!1},null,8,["asset"])])])):xe("",!0),l("form",{onSubmit:St(x,["prevent"])},[l("div",bpe,[D[5]||(D[5]=l("span",{class:"input-group-text"},[l("i",{class:"bi bi-sliders"})],-1)),l("div",ype,[_t(l("select",{id:"condition","onUpdate:modelValue":D[0]||(D[0]=j=>c.value.condition=j),class:"form-select",required:""},[...D[3]||(D[3]=[l("option",{value:"above"},"Acima de",-1),l("option",{value:"below"},"Abaixo de",-1),l("option",{value:"equal"},"Igual a",-1)])],512),[[An,c.value.condition]]),D[4]||(D[4]=l("label",{for:"condition",class:"form-label"},"Condição",-1))])]),l("div",_pe,[D[6]||(D[6]=l("span",{class:"input-group-text"},[l("i",{class:"bi bi-currency-dollar"})],-1)),et(Ms,{modelValue:c.value.target_price,"onUpdate:modelValue":D[1]||(D[1]=j=>c.value.target_price=j),modelModifiers:{number:!0},id:"target-price-"+(((F=t.alert)==null?void 0:F.id)||"new"),label:"Preço alvo",placeholder:"0,00",invalid:!g.value},null,8,["modelValue","id","invalid"])]),(C=t.alert)!=null&&C.triggered?xe("",!0):($(),L("div",xpe,[...D[7]||(D[7]=[l("i",{class:"bi bi-info-circle-fill flex-shrink-0 me-2"},null,-1),l("div",null," O alerta será enviado para o e-mail cadastrado. ",-1)])])),(A=t.alert)!=null&&A.triggered?($(),L("div",wpe,[D[10]||(D[10]=l("i",{class:"bi bi-exclamation-triangle-fill flex-shrink-0 me-2 text-warning"},null,-1)),l("div",null,[D[8]||(D[8]=l("strong",null,"Alerta acionado em:",-1)),Pe(" "+pe(y((O=t.alert)==null?void 0:O.triggered_at)),1),D[9]||(D[9]=l("br",null,null,-1))])])):xe("",!0),l("div",Epe,[_t(l("input",{id:"isActive","onUpdate:modelValue":D[2]||(D[2]=j=>c.value.is_active=j),type:"checkbox",class:"form-check-input",role:"switch",style:{cursor:"pointer",transform:"scale(1.2)","margin-left":"-2.5em"}},null,512),[[kr,c.value.is_active]]),D[11]||(D[11]=l("label",{for:"isActive",class:"form-check-label ms-2 mt-1 fw-semibold text-muted",style:{cursor:"pointer"}}," Alerta ativo ",-1))])],32)])]}),_:1},8,["title"]))}},rC=ls(Dpe,[["__scopeId","data-v-3e46bcf3"]]),Ppe={class:"watchlist-dashboard"},$pe={key:0,class:"text-center py-4"},Ipe={key:1,class:"text-center py-4 text-muted"},Mpe={class:"list-group list-group-flush"},Npe={class:"d-flex justify-content-between align-items-center mb-1"},Lpe={class:"d-flex align-items-center gap-2"},Rpe={class:"performance-bar px-1 mb-2"},Fpe={class:"d-flex justify-content-between align-items-center mt-1 mb-1",style:{"font-size":"0.65rem"}},Vpe={class:"text-muted fw-semibold"},Bpe={class:"text-muted fw-semibold"},Upe={class:"progress",style:{height:"4px","background-color":"var(--bs-gray-200)"}},jpe={class:"d-flex justify-content-between align-items-center px-1 mt-2"},Hpe={class:"d-flex align-items-center gap-1"},Wpe=["onClick","title"],zpe=["onClick"],Ype={key:2,class:"badge bg-warning text-dark badge-sm d-inline-flex align-items-center",title:"Ãltimo alerta acionado"},qpe=["onClick"],Gpe={key:0,class:"text-center mt-3 mb-1"},Xpe={__name:"WatchlistComponent",emits:["has-data-changed"],setup(t,{emit:e}){const s=tn(),n=gi(),i=Yn(),o=pi(),r=W_(),c=e,h=ve(5),f=ve("1y"),v=ve(!1),g=ve(""),y=Ae(()=>o.getCurrentPortfolioId()!==null),x=Ae(()=>Array.isArray(r.watchlist)?r.watchlist:[]),E=Ae(()=>Array.isArray(r.alerts)?r.alerts:[]),P=Ae(()=>Array.isArray(r.performance)?r.performance:[]),I=Ae(()=>x.value.length>0),D=Ae(()=>x.value.slice(0,h.value)),F=Ae(()=>E.value.filter(M=>M.is_active));Ae(()=>{if(!P.value||P.value.length===0)return 0;const M=P.value.filter(oe=>oe.performance&&oe.performance.variation!==void 0);return M.length===0?0:M.reduce((oe,K)=>oe+(K.performance.variation||0),0)/M.length});const C=()=>{n.push("/my-account/plans")},A=async()=>{if(y.value){v.value=!0;try{await Promise.all([r.fetchWatchlist(),r.fetchAlerts(),r.fetchPerformance(f.value)]),g.value=new Date().toLocaleTimeString("pt-BR",{hour:"2-digit",minute:"2-digit"})}catch(M){console.error("Erro ao carregar dados do watchlist:",M)}finally{v.value=!1}}},O=M=>{if(!M||!M.detail)return;const he=r.watchlist.findIndex(oe=>oe.asset_id===M.detail.assetId||oe.asset&&oe.asset.id===M.detail.assetId);he!==-1&&r.watchlist[he].asset&&(r.watchlist[he].asset.current_price=Number(M.detail.newPrice),r.watchlist[he].asset.price_change_percent=Number(M.detail.priceChangePercent))},j=M=>{const he=P.value.find(oe=>{var K,H;
60return((K=oe.watchlist_asset)==null?void 0:K.id)===M.id||((H=oe.watchlist_asset)==null?void 0:H.asset_id)===M.asset_id});return(he==null?void 0:he.performance)||{}},te=M=>j(M).variation||0,B=M=>j(M).period_high||0,z=M=>j(M).period_low||0,re=M=>{var _e;const he=j(M),oe=he.current_price||((_e=M.asset)==null?void 0:_e.current_price)||0,K=he.period_low||0,H=he.period_high||0;if(H===K||H===0)return 50;let Ee=(oe-K)/(H-K)*100;return Math.min(Math.max(Ee,0),100)},ne=M=>te(M)>=0?"bg-success":"bg-danger",X=M=>G(M)>0,G=M=>M?F.value.filter(he=>he.asset_id===M||he.asset&&he.asset.id===M).length:0,ce=M=>M?E.value.some(he=>(he.asset_id===M||he.asset&&he.asset.id===M)&&he.triggered):!1,be=M=>{if(!M)return 0;const he=E.value.filter(oe=>(oe.asset_id===M||oe.asset&&oe.asset.id===M)&&oe.triggered);return he.length===0?0:(he.sort((oe,K)=>{const H=oe.triggered_at?new Date(oe.triggered_at):new Date(0);return(K.triggered_at?new Date(K.triggered_at):new Date(0))-H}),he[0].target_price)},J=()=>n.push("/watchlist"),Z=()=>{i.open(ppe,{onAssetAdded:async M=>{await A()}})},ge=M=>{M&&i.open(rC,{asset:M,onAlertCreated:()=>r.fetchAlerts()})},q=M=>{M&&i.open(rC,{asset:M,onAlertCreated:()=>r.fetchAlerts(),onAlertUpdated:()=>r.fetchAlerts()})},W=(M,he)=>{M&&i.open(Df,{restoredState:{operationType:he,selectedAsset:M,prefilledPrice:M.current_price?M.current_price.toString():""},title:`Comprar ${M.code}`})};return Pt(()=>o.getCurrentPortfolioId(),M=>{M&&A()}),Pt(I,M=>{c("has-data-changed",M)},{immediate:!0}),Xt(()=>{y.value&&(A(),window.addEventListener("asset-price-updated",O))}),Ni(()=>{window.removeEventListener("asset-price-updated",O)}),(M,he)=>($(),L("div",Ppe,[v.value?($(),L("div",$pe,[...he[0]||(he[0]=[l("div",{class:"spinner-border spinner-border-sm text-primary mb-2",role:"status"},null,-1),l("small",{class:"text-muted d-block"},"Atualizando radar...",-1)])])):I.value?($(),L("div",{key:2,class:Me(["watchlist-items",{"blurred-locked":!Ne(s).isPro}])},[l("div",Mpe,[($(!0),L(Ze,null,At(D.value,(oe,K)=>{var H,Ee,_e,Ce,Re,Ke;return $(),L("div",{key:oe.id,class:Me(["list-group-item px-1 py-2 border-0",{"border-bottom":K<D.value.length-1}])},[l("div",Npe,[l("div",Lpe,[et(_d,{"asset-id":oe.asset.id,"show-price":!0,"show-variation":!0,"auto-update":!1,"show-edit-icon":!1},null,8,["asset-id"])])]),l("div",Rpe,[l("div",Fpe,[l("span",Vpe,pe(M.$fmtCurrency(z(oe))),1),he[4]||(he[4]=l("span",{class:"text-muted text-uppercase",style:{"font-size":"0.55rem","letter-spacing":"0.5px"}},"Oscilação em 1 ano",-1)),l("span",Bpe,pe(M.$fmtCurrency(B(oe))),1)]),l("div",Upe,[l("div",{class:Me(["progress-bar",ne(oe)]),style:zs({width:re(oe)+"%"}),role:"progressbar"},null,6)])]),l("div",jpe,[l("div",Hpe,[X((H=oe.asset)==null?void 0:H.id)?($(),L("span",{key:0,class:"badge bg-primary text-white badge-sm d-inline-flex align-items-center",onClick:Be=>{var Te;return G((Te=oe.asset)==null?void 0:Te.id)<2?q(oe.asset):null},style:zs({cursor:G((Ee=oe.asset)==null?void 0:Ee.id)<2?"pointer":"default",fontWeight:"500"}),title:G((_e=oe.asset)==null?void 0:_e.id)>=2?"Limite de 2 alertas atingido":"Criar novo alerta"},[he[5]||(he[5]=l("i",{class:"bi bi-bell-fill me-1"},null,-1)),Pe(" "+pe(G((Ce=oe.asset)==null?void 0:Ce.id))+" Alerta(s) ",1)],12,Wpe)):($(),L("button",{key:1,class:"btn btn-link text-muted p-0 text-decoration-none",style:{"font-size":"0.75rem"},onClick:Be=>ge(oe.asset),title:"Criar alerta"},[...he[6]||(he[6]=[l("i",{class:"bi bi-bell me-1"},null,-1),Pe("Criar alerta ",-1)])],8,zpe)),ce((Re=oe.asset)==null?void 0:Re.id)?($(),L("span",Ype,[he[7]||(he[7]=l("i",{class:"bi bi-bell-fill me-1"},null,-1)),Pe(" "+pe(M.$fmtCurrency(be((Ke=oe.asset)==null?void 0:Ke.id))),1)])):xe("",!0)]),l("button",{class:"btn btn-success btn-xs d-inline-flex align-items-center",onClick:Be=>W(oe.asset,"buy"),title:"Comprar"},[...he[8]||(he[8]=[l("i",{class:"bi bi-plus me-1"},null,-1),Pe(" Comprar ",-1)])],8,qpe)])],2)}),128))]),x.value.length>h.value?($(),L("div",Gpe,[l("button",{class:"btn btn-sm btn-light w-100 text-primary fw-semibold",onClick:J},[Pe(" Ver todos "+pe(x.value.length)+" ativos ",1),he[9]||(he[9]=l("i",{class:"bi bi-arrow-right ms-1"},null,-1))])])):xe("",!0)],2)):($(),L("div",Ipe,[he[2]||(he[2]=l("i",{class:"bi bi-binoculars opacity-50 mb-2 d-block fs-2"},null,-1)),he[3]||(he[3]=l("small",{class:"d-block mb-3"}
60,"Nenhum ativo no radar",-1)),y.value?($(),L("button",{key:0,class:"btn btn-sm btn-outline-primary",onClick:Z},[...he[1]||(he[1]=[l("i",{class:"bi bi-plus-circle me-1"},null,-1),Pe(" Adicionar Primeiro Ativo ",-1)])])):xe("",!0)])),Ne(s).isPro?xe("",!0):($(),L("div",{key:3,class:"pro-watermark d-flex flex-column align-items-center justify-content-center",onClick:C},[...he[10]||(he[10]=[l("i",{class:"bi bi-lock"},null,-1),l("span",{class:"pro-text"},"Recurso PRO",-1)])]))]))}},Kpe=ls(Xpe,[["__scopeId","data-v-8755fe0a"]]),Jpe={key:0,class:"news-buttons-wrapper mb-3"},Qpe={class:"news-scroll-container"},Zpe={class:"news-buttons-grid"},eme=["onClick"],tme={class:"d-flex align-items-start gap-2"},sme={class:"flex-grow-1 text-start"},nme={class:"news-cta"},ime={class:"news-meta mt-2 d-flex align-items-center"},rme={class:"badge bg-dark bg-opacity-25 small"},ame={class:"ms-2 opacity-75"},ome={class:"categories-scroll mt-3 d-none d-lg-block"},lme={class:"d-flex gap-2"},ume=["onClick"],cme={class:"categories-dropdown-wrapper mt-3 d-block d-lg-none"},dme={class:"dropdown"},hme={class:"btn w-100 d-flex justify-content-between align-items-center category-dropdown-btn",type:"button","data-bs-toggle":"dropdown","aria-expanded":"false"},fme={class:"text-truncate fw-medium"},pme={class:"dropdown-menu w-100 shadow border-0 mt-1 custom-dropdown-menu"},mme=["onClick"],gme={__name:"NewsButtons",setup(t){const e=tn(),s=gi(),n=SD(),i=Mn(),o=Ae(()=>{const I=n.categories&&n.categories.length>0,D=n.topNews&&n.topNews.length>0;return I||D}),r=Ae(()=>n.categories||[]),c=Ae(()=>r.value.slice(0,8)),h=Ae(()=>{if(!n.activeCategory)return"Ãltimas notÃcias";const I=r.value.find(D=>String(D.id).toLowerCase()===String(n.activeCategory).toLowerCase());return I?I.name:"Ãltimas notÃcias"}),f=()=>{document.querySelectorAll(".tooltip").forEach(D=>D.remove()),s.push("/my-account/plans")},v=I=>{i.open(cr(Pf),{newsId:I.id,news:I,title:"NotÃcia"})},g=()=>{i.open(cr(j_),{title:"Todas as notÃcias"})},y=I=>{if(!I)return"";if(I.includes("-")&&I.includes(":")){const F=new Date(I.replace(" ","T")),C=Math.floor((new Date-F)/1e3);if(C<60)return`${C} seg`;const A=Math.floor(C/60);if(A<60)return`${A} min`;const O=Math.floor(A/60);if(O<24)return`${O} h`;const j=Math.floor(O/24);if(j<30)return j===1?"1 dia":`${j} dias`;const te=Math.floor(j/30);if(te<12)return te===1?"1 mês":`${te} meses`;const B=Math.floor(j/365);return B===1?"1 ano":`${B} anos`}let D=I.toLowerCase();return D=D.replace(" ago",""),D=D.replace(" from now",""),D=D.replace("seconds","seg").replace("second","seg"),D=D.replace("minutes","min").replace("minute","min"),D=D.replace("hours","h").replace("hour","h"),D=D.replace("days","dias").replace("day","dia"),D=D.replace("months","meses").replace("month","mês"),D=D.replace("years","anos").replace("year","ano"),D=D.replace(/^a /g,"1 ").replace(/^an /g,"1 "),D},x=I=>({positive:"sentiment-positive",negative:"sentiment-negative",neutral:"sentiment-neutral"})[I]||"sentiment-neutral",E={acoes:"Ações",fiis:"FIIs",bdr:"BDRs",etf:"ETFs",cripto:"Cripto",renda_fixa:"Renda Fixa",tesouro:"Tesouro",futuros:"Futuros",cambio:"Moedas",commodities:"Commodities",macro:"Macro",politica:"PolÃtica",empresas:"Empresas",internacional:"Internacional",indicadores:"Indicadores",outros:"Outros"},P=I=>E[I]||I||"Geral";return Xt(()=>{n.fetchNews(),n.fetchCategories(),n.startAutoRefresh()}),Ni(()=>{n.stopAutoRefresh()}),(I,D)=>o.value?($(),L("div",Jpe,[l("div",Qpe,[l("div",Zpe,[($(!0),L(Ze,null,At(Ne(n).topNews,(F,C)=>($(),L("div",{key:F.id,class:"news-item-wrapper position-relative"},[l("button",{class:Me(["news-button w-100",[x(F.sentiment),{"blurred-locked":!Ne(e).hasModule("pro_news")&&C>0}]]),onClick:A=>v(F)},[l("div",tme,[D[2]||(D[2]=l("div",{class:"flex-shrink-0 mt-1"},[l("i",{class:"bi bi-stars"})],-1)),l("div",sme,[l("div",nme,pe(F.cta||F.title),1),l("div",ime,[l("span",rme,pe(P(F.primary_category)),1),l("small",ame,pe(y(F.pub_date)),1)])])])],10,eme),!Ne(e).hasModule("pro_news")&&C>0?($(),L("div",{key:0,class:"lock-overlay d-flex align-items-center justify-content-center",onClick:f},[...D[3]||(D[3]=[l("i",{class:"bi bi-lock","data-bs-toggle":"tooltip","data-bs-placement":"bottom",title:"Adquira em Planos & Licenças"},null,-1)])])):xe("",!0)]))),128))])]),l("div",ome,[l("div",lme,[l("button",{class:Me(["btn btn-sm category-chip",{active:!Ne(n).activeCategory}]),onClick:D[0]||(D[0]=F=>Ne(n).setCategory(null))}," Ãltimas notÃcias ",2),($(!0),L(Ze,null,At(c.value,F=>($(),L("button",{key:"desktop-"+F.id,class:Me(["btn btn-sm category-chip",{active:Ne(n).activeCategory===F.id}]),onClick:C=>Ne(n).setCategory(F.id)},pe(F.name),11,ume))),128)),l("button",{class:"btn btn-outline-primary btn-sm text-nowrap py-1 px-3 rounded-pill",onClick:g},[...D[4]||(D[4]=[Pe(" Ver todas ",-1),l("i",{class:"bi bi-arrow-right ms-1"},null,-1)])])])]),l("div",cme,[l("div",dme,[l("button",hme,[l("span",fme,pe(h.value),1),D[5]||(D[5]=l("i",{class:"bi bi-chevron-down opacity-75"},null,-1))]),l("ul",pme,[l("li",null,[l("a",{class:Me(["dropdown-item py-2",{active:!Ne(n).activeCategory}]),href:"#",onClick:D[1]||(D[1]=St(F=>Ne(n).setCategory(null),["prevent"]))}," Ãltimas notÃcias ",2)]),($(!0),L(Ze,null,At(r.value,F=>($(),L("li",{key:"mobile-"+F.id},[l("a",{class:Me(["dropdown-item py-2",{active:Ne(n).activeCategory===F.id}]),href:"#",onClick:St(C=>Ne(n).setCategory(F.id),["prevent"])},pe(F.name),11,mme)]))),128))])])])])):xe("",!0)}},vme=ls(gme,[["__scopeId","data-v-f6b0458a"]]),bme={class:"container-fluid"},yme={class:"row"},_me={class:"col-md-12"},xme={key:0,class:"alert alert-primary d-flex flex-column flex-md-row align-items-center justify-content-between border border-primary mb-3 shadow-sm",role:"alert"},wme=["disabled"],Eme={key:0},Sme={key:1},kme={key:1,class:"metrics-section mb-3"},Cme={class:"metrics-scroll-container"},Tme={class:"metrics-grid"},Ame={class:"metric-card"},Ome={class:"metric-content"}
60,Dme={class:"metric-details"},Pme={class:"metric-title"},$me={class:"fw-bold"},Ime={class:"metric-main-value"},Mme={key:1,class:"skeleton-value"},Nme={key:2,class:"value-amount text-muted"},Lme={key:3,class:"metric-variation"},Rme={class:"metric-sub-values grid-cols-2 mt-2"},Fme={class:"sub-value-item"},Vme={key:0,class:"sub-value-amount text-positive d-flex align-items-center"},Bme=["title","data-bs-original-title"],Ume={class:"ms-1"},jme={key:1,class:"sub-value-amount text-muted"},Hme={key:2,class:"sub-value-amount text-muted"},Wme={class:"sub-value-item"},zme={key:0,class:"sub-value-amount text-negative d-flex align-items-center"},Yme=["title","data-bs-original-title"],qme={class:"ms-1"},Gme={key:1,class:"sub-value-amount text-muted"},Xme={key:2,class:"sub-value-amount text-muted"},Kme={class:"metric-card"},Jme={class:"metric-content"},Qme={class:"metric-details"},Zme={class:"metric-title fw-bold"},ege={class:"metric-main-value"},tge={key:0,class:"value-amount"},sge={key:1,class:"skeleton-value"},nge={key:2,class:"value-amount text-muted"},ige={key:3,class:"metric-variation"},rge={class:"metric-sub-values grid-cols-2"},age={class:"sub-value-item"},oge={key:0,class:"sub-value-amount"},lge={key:1,class:"sub-value-amount text-muted"},uge={key:2,class:"sub-value-amount text-muted"},cge={class:"sub-value-item"},dge={key:0,class:"sub-value-amount"},hge={key:1,class:"sub-value-amount text-muted"},fge={key:2,class:"sub-value-amount text-muted"},pge={class:"metric-card"},mge={class:"metric-content"},gge={class:"metric-details"},vge={class:"metric-title fw-bold"},bge={class:"metric-main-value"},yge={key:1,class:"skeleton-value"},_ge={key:2,class:"value-amount text-muted"},xge={class:"metric-sub-values grid-cols-2"},wge={class:"sub-value-item"},Ege={key:1,class:"sub-value-amount text-muted"},Sge={key:2,class:"sub-value-amount text-muted"},kge={class:"sub-value-item"},Cge={key:0,class:"sub-value-amount text-positive"},Tge={key:1,class:"sub-value-amount text-muted"},Age={key:2,class:"sub-value-amount text-muted"},Oge={class:"metric-card"},Dge={class:"metric-content"},Pge={class:"metric-details"},$ge={class:"metric-title fw-bold"},Ige={class:"metric-main-value"},Mge={key:0,class:"value-amount text-primary"},Nge={key:1,class:"skeleton-value"},Lge={key:2,class:"value-amount text-muted"},Rge={key:2},Fge={key:3,class:"charts-section"},Vge={class:"row"},Bge={class:"col-lg-8 col-md-12 mb-3 order-2 order-md-1"},Uge={class:"frame rounded h-100"},jge={class:"navbar rounded mb-2"},Hge={class:"d-flex flex-column flex-md-row align-items-start align-items-md-center"},Wge={class:"title"},zge={class:"actions d-flex"},Yge=["value"],qge={class:"chart-container"},Gge={key:0,class:"text-center py-5 text-muted"},Xge={key:2,class:"text-center py-5 text-muted"},Kge={class:"col-lg-4 col-md-12 mb-3 order-1 order-md-2"},Jge={class:"frame rounded h-100"},Qge={class:"navbar rounded mb-2"},Zge={class:"d-flex flex-column flex-md-row align-items-start align-items-md-center"},eve={class:"title"},tve={class:"actions d-flex"},sve=["value"],nve={class:"chart-container"},ive={key:0,class:"text-center py-5 text-muted"},rve={key:2,class:"text-center py-5 text-muted"},ave={class:"frame rounded"},ove={key:0,id:"loading-record",class:"loading rounded"},lve={class:"navbar rounded mb-2"},uve={class:"d-flex flex-column flex-md-row align-items-start align-items-md-center"},cve={class:"title"},dve={class:"actions d-flex"},hve=["title"],fve={class:"area"},pve={key:0,class:"portfolio-positions"},mve={class:"categories-list"},gve=["onClick"],vve={class:"d-none d-md-flex justify-content-between align-items-center"},bve={class:"d-flex align-items-center"},yve={class:"badge bg-body text-muted ms-2"},_ve={class:"d-flex align-items-center gap-4"},xve={class:"text-end",style:{"min-width":"120px"}},wve={class:"text-dark"},Eve={class:"text-end",style:{"min-width":"140px"}},Sve={class:"text-end",style:{"min-width":"100px"}},kve={class:"d-flex align-items-center justify-content-end gap-2"},Cve={class:"text-primary fs-6"},Tve={class:"position-relative",style:{width:"28px",height:"28px"}},Ave={width:"28",height:"28",viewBox:"0 0 24 24",class:"pie-chart"},Ove=["stroke","stroke-dashoffset"],Dve={class:"d-flex d-md-none justify-content-between align-items-center w-100"},Pve={class:"col-4 text-start"},$ve={class:"d-flex align-items-center"},Ive={class:"d-block"},Mve={class:"badge bg-light text-dark"},Nve={class:"col-4 text-start"},Lve={class:"mb-1"},Rve={class:"text-dark"},Fve={class:"col-4 d-flex justify-content-end align-items-center gap-2"},Vve={class:"d-flex align-items-center gap-2"},Bve={class:"position-relative",style:{width:"28px",height:"28px"}},Uve={width:"28",height:"28",viewBox:"0 0 24 24",class:"pie-chart"},jve=["stroke","stroke-dashoffset"],Hve={class:"badge bg-primary text-white"},Wve={key:0,class:"category-content"},zve={class:"d-none d-md-block"},Yve={class:"table-responsive"},qve={class:"table table-hover mb-0"},Gve={key:0},Xve={class:"text-end"},Kve={key:1},Jve={class:"text-end"},Qve={key:0,class:"position-row"},Zve={colspan:"2",style:{padding:"0.5rem"}},ebe={class:"text-end text-nowrap"},tbe={class:"d-flex flex-column align-items-end"},sbe={key:0,class:"text-muted"},nbe={class:"text-end text-nowrap"},ibe={class:"text-end text-nowrap"},rbe={class:"d-flex flex-column align-items-end"},abe={key:0,class:"text-negative"},obe={key:1,class:"text-muted"},lbe={key:2,class:"text-muted"},ube={class:"text-end text-nowrap"},cbe={class:"d-flex flex-column align-items-end"},dbe={class:"text-positive"},hbe={key:0,class:"text-primary mt-1"},fbe={class:"text-end"},pbe={class:"d-flex flex-column align-items-end"},mbe={class:"text-end"},gbe={key:1,class:"position-row"},vbe={colspan:"2",style:{padding:"0.5rem"}},bbe={class:"text-end"},ybe={class:"text-end text-nowrap"},_be={class:"text-end text-nowrap"},xbe={key:0},wbe={key:1},Ebe={class:"text-end text-nowrap"},Sbe={class:"text-end text-nowrap"},kbe={class:"text-end"},Cbe={class:"d-flex flex-column align-items-end"},Tbe={class:"text-end"},Abe={class:"d-block d-md-none"},Obe={class:"position-cards p-3"},Dbe={class:"d-flex justify-content-between align-items-start mb-2"},Pbe={class:"badge bg-light text-dark"}
60,$be={class:"row g-2 mt-2"},Ibe={class:"col-6"},Mbe={key:0,class:"col-6"},Nbe={class:"mt-3 pt-3 border-top border-dashed"},Lbe={class:"row g-2"},Rbe={class:"col-6"},Fbe={class:"text-dark"},Vbe={class:"col-6"},Bbe={class:"text-muted d-block"},Ube={key:0},jbe={key:0,class:"text-danger"},Hbe={key:1,class:"text-muted"},Wbe={class:"col-6"},zbe={class:"text-success"},Ybe={class:"col-6"},qbe={key:0,class:"text-primary"},Gbe={key:1,class:"text-muted"},Xbe={class:"row g-2 mb-2"},Kbe={class:"col-6"},Jbe={class:"col-6"},Qbe={class:"col-6"},Zbe={key:0},eye={key:1},tye={class:"col-6"},sye={class:"pt-2"},nye={class:"row g-2"},iye={class:"col-12"},rye={class:"mt-2 pt-2 border-top border-dashed"},aye={class:"d-flex justify-content-between align-items-center"},oye={class:"text-end"},lye={class:"category-total p-3"},uye={class:"row text-center"},cye={class:"col-md-3 mb-2 mb-md-0"},dye={class:"col-md-3 mb-2 mb-md-0"},hye={class:"col-md-3 mb-2 mb-md-0"},fye={class:"col-md-3"},pye={class:"mt-4 p-3 rounded bg-light"},mye={class:"row text-center row-cols-2 row-cols-md-5 g-3 align-items-center"},gye={class:"col"},vye={class:"fs-5"},bye={class:"col"},yye={class:"fs-5"},_ye={class:"col"},xye={class:"fs-5 text-primary"},wye={class:"col"},Eye={class:"col"},Sye={key:1,class:"text-center text-muted py-4"},kye={key:2,class:"text-center py-4 text-muted"},Cye={key:3,class:"text-center py-4 text-muted"},Tye={class:"row"},Aye={class:"frame rounded"},Oye={class:"col-lg-4 col-md-12"},Dye={class:"frame rounded"},Pye={class:"navbar rounded mb-2"},$ye={class:"actions d-flex"},Iye={__name:"DashboardPage",setup(t){const e=tn(),s=In(),n=vi(),i=Mn(),o=pi(),{currentPortfolioId:r,currentPortfolio:c}=Of(),h=ve({}),f=ve(!1),v=ve(!1),g=ve(!0),y=ve(!1),x=ve({}),E=ve({}),P=ve(""),I=ve("Carregando..."),D=ve({}),F=ve(!1),C=ve(new Date),A=ve("12m"),O=ve("all"),j=ve("all"),te=ve({monthly_data:[],available_categories:[]}),B=ve([]),z=ve(!0),re=ve(!0),ne=ee=>62.8-62.8*Math.max(0,ee||0)/100,X=Ae(()=>r.value&&x.value.has_portfolio!==!1),G=Ae(()=>{var ee;return((ee=c.value)==null?void 0:ee.title)==="Carteira de Demonstração"});Ae(()=>new Date(C.value).toLocaleDateString("pt-BR",{month:"long",year:"numeric"}));const ce=Ae(()=>{var ee;return((ee=E.value.top_performers)==null?void 0:ee.top_gainer)||null}),be=Ae(()=>{var ee;return((ee=E.value.top_performers)==null?void 0:ee.top_loser)||null}),J=Ae(()=>ge.value?Object.keys(ge.value).every(ee=>D.value[ee]):!1),Z=Ae(()=>te.value.available_categories&&te.value.available_categories.length>0?te.value.available_categories:ge.value?Object.keys(ge.value):[]),ge=Ae(()=>{if(!x.value.positions||!x.value.totals)return null;const ee={};x.value.positions.forEach(fe=>{var gt,pt,He,it;if(!fe||!fe.asset)return;const Oe=JSON.parse(JSON.stringify(fe));Oe.renda_fixa_detalhes&&(Oe.current_value=Oe.renda_fixa_detalhes.valor_liquido||Oe.current_value,Oe.profit_loss.amount=Oe.current_value-Oe.total_cost,Oe.profit_loss.percent=Oe.total_cost!=0?Oe.profit_loss.amount/Math.abs(Oe.total_cost)*100:0);const Xe=((gt=Oe.asset.category)==null?void 0:gt.name)||"Sem Categoria",at=((pt=Oe.asset.category)==null?void 0:pt.color)||"#666666",wt=((He=Oe.asset.category)==null?void 0:He.slug)||"others";ee[Xe]||(ee[Xe]={name:Xe,slug:wt,color:at,positions:[],totals:{total_quantity:0,total_cost:0,total_value:0,total_profit_loss:0,total_profit_loss_percent:0,portfolio_percent:0}}),ee[Xe].positions.push(Oe),ee[Xe].totals.total_quantity+=Oe.current_quantity||0,ee[Xe].totals.total_cost+=Oe.total_cost||0,ee[Xe].totals.total_value+=Oe.current_value||0,ee[Xe].totals.total_profit_loss+=((it=Oe.profit_loss)==null?void 0:it.amount)||0});const R=Object.values(ee).reduce((fe,Oe)=>fe+Oe.totals.total_value,0);Object.keys(ee).forEach(fe=>{const Oe=ee[fe];Oe.totals.total_profit_loss_percent=Oe.totals.total_cost!==0?Oe.totals.total_profit_loss/Math.abs(Oe.totals.total_cost)*100:0,Oe.totals.portfolio_percent=R!==0?Oe.totals.total_value/Math.abs(R)*100:0,Oe.positions.sort((Xe,at)=>(at.current_value||0)-(Xe.current_value||0))});const we={};return Object.keys(ee).sort((fe,Oe)=>ee[Oe].totals.total_value-ee[fe].totals.total_value).forEach(fe=>we[fe]=ee[fe]),we}),q=ee=>["crypto","criptomoedas","cryptos","cripto"].includes(ee==null?void 0:ee.toLowerCase()),W=Ae(()=>{if(!te.value.monthly_data||te.value.monthly_data.length===0)return null;const ee=te.value.monthly_data;if(!ee.length)return null;const R=ee.map(wt=>wt.month),we=ee.map(wt=>wt.invested_value),fe=ee.map(wt=>wt.dividends_received),Oe=ee.map(wt=>wt.total_equity),Xe=ee.map(wt=>wt.gain_capital>=0?wt.gain_capital:0),at=ee.map(wt=>wt.gain_capital<0?Math.abs(wt.gain_capital):0);return{chart:{type:"column",backgroundColor:"transparent",style:{fontFamily:"var(--font-family)"},panning:!0,panKey:"shift"},title:{text:""},xAxis:{categories:R,labels:{style:{color:"var(--text-color)"}},min:0,max:R.length-1},yAxis:{min:0,title:{text:""}}
60,legend:{shadow:!1,itemStyle:{color:"var(--text-color)"},itemHoverStyle:{color:"var(--primary-color)"}},tooltip:{shared:!0,useHTML:!0,backgroundColor:"var(--bg-card)",borderColor:"var(--border-color)",style:{color:"var(--text-color)"},headerFormat:"<b>{point.key}</b><br>",formatter:function(){const wt=this.points[0].point.index,gt=ee[wt];if(!gt)return"";let pt=`<b>${gt.month}</b><br>`;return pt+=`<br>Valor Investido: <b>R$ ${gt.invested_value.toLocaleString("pt-BR",{minimumFractionDigits:2})}</b>`,gt.gain_capital>=0?pt+=`<br>Ganho Capital: <b style="color: var(--positive-color)">+R$ ${gt.gain_capital.toLocaleString("pt-BR",{minimumFractionDigits:2})}</b>`:pt+=`<br>Perda Capital: <b style="color: var(--negative-color)">-R$ ${Math.abs(gt.gain_capital).toLocaleString("pt-BR",{minimumFractionDigits:2})}</b>`,pt+=`<br>Proventos: <b style="color: var(--dividends-color)">+R$ ${gt.dividends_received.toLocaleString("pt-BR",{minimumFractionDigits:2})}</b>`,pt+='<hr style="margin: 5px 0; border-top: 1px solid var(--border-color); opacity: 0.5">',pt+=`Patrimônio Total: <b style="color: var(--equities-color); font-size: 1.1em">R$ ${gt.total_equity.toLocaleString("pt-BR",{minimumFractionDigits:2})}</b>`,pt}},plotOptions:{column:{grouping:!1,shadow:!1,borderWidth:0,animation:{duration:500}}},series:[{name:"Valor Investido",color:"var(--invested-color)",data:we,pointPadding:0,pointPlacement:0},{name:"Ganho de Capital",color:"var(--positive-color)",data:Xe,pointPadding:.1,pointPlacement:0},{name:"Perda de Capital",color:"var(--negative-color)",data:at,pointPadding:.1,pointPlacement:0},{name:"Proventos Recebidos",color:"var(--dividends-color)",data:fe,pointPadding:.2,pointPlacement:0},{name:"Patrimônio Total",color:"var(--equities-color)",data:Oe,pointPadding:.35,pointPlacement:0}],credits:{enabled:!1},accessibility:{enabled:!1}}}),M=Ae(()=>B.value.length?{chart:{type:"pie",backgroundColor:"transparent",height:300},title:{text:"",align:"center",verticalAlign:"middle",y:0,style:{color:"var(--text-color)",fontSize:"14px"}},plotOptions:{pie:{innerSize:"50%",depth:45,dataLabels:{enabled:!0,format:"{point.percentage:.1f}%",style:{color:"var(--text-white)",textOutline:"none",fontWeight:"normal"},distance:-30},showInLegend:!0}},tooltip:{pointFormat:"{series.name}: <b>R$ {point.y:,.2f}</b> ({point.percentage:.1f}%)"},series:[{name:"Valor",data:B.value,size:"100%",innerSize:"50%"}],legend:{layout:"vertical",align:"right",verticalAlign:"middle",itemStyle:{color:"var(--text-color)"},itemHoverStyle:{color:"var(--primary-color)"}},credits:{enabled:!1},accessibility:{enabled:!1}}:null),he=(ee,R=20)=>ee?ee.length>R?ee.substring(0,R):ee:"",oe=async()=>{v.value=!0;try{await ct.post(`/api/portfolios/${r.value}/archive`),n.show("Ambiente limpo! Bem-vindo(a) ao seu novo espaço de verdade.","success"),await o.fetchActivePortfolio(),await o.fetchPortfolios(),await Te(!1)}catch(ee){console.error("Erro ao limpar demo",ee),n.show("Erro ao limpar ambiente de demonstração.","danger")}finally{v.value=!1}},K=async(ee=null,R=!1)=>{if(!(!X.value||!e.isAuthenticated)){y.value=!0;try{const we=new URLSearchParams;let fe="";ee?fe=typeof ee=="string"?ee.split("T")[0]:new Date(ee).toISOString().split("T")[0]:fe=C.value.toISOString().split("T")[0],we.append("date",fe),we.append("t",Date.now());const Oe=`/api/portfolio/dashboard-metrics?${we.toString()}`,Xe=await ct.get(Oe,{skipLoading:R});Xe.data.success&&(E.value=Xe.data.data)}catch(we){console.error("Erro ao carregar métricas:",we)}finally{y.value=!1}}},H=async(ee=!1,R=null,we=!1)=>{if(e.isAuthenticated){if(!r.value){x.value={has_portfolio:!1},we||s.stopLoading();return}g.value=!0;try{const fe=new URLSearchParams;ee&&fe.append("t",Date.now()),R?fe.append("date",R):fe.append("date",C.value.toISOString().split("T")[0]);const Oe=fe.toString(),Xe=`/api/portfolio/dashboard-summary${Oe?`?${Oe}`:""}`,at=await ct.get(Xe,{skipLoading:we});at.data.success?(x.value=at.data.data,ee&&!we&&(P.value="Dados atualizados com sucesso!",setTimeout(()=>P.value="",3e3))):x.value={has_portfolio:!1}}catch(fe){console.error("Erro ao carregar resumo:",fe),x.value={has_portfolio:!1}}finally{g.value=!1,we||s.stopLoading()}}},Ee=Ae(()=>te.value.monthly_data&&te.value.monthly_data.length>0&&te.value.monthly_data.some(ee=>ee.total_equity>0||ee.invested_value>0)),_e=Ae(()=>B.value&&B.value.length>0),Ce=Ae(()=>{if(!ge.value)return x.value.totals||{};let ee=0,R=0;Object.values(ge.value).forEach(Oe=>{ee+=Oe.totals.total_cost,R+=Oe.totals.total_value});const we=R-ee,fe=ee!==0?we/Math.abs(ee)*100:0;return{total_value:R,total_cost:ee,current_assets_value:R,gain_capital:we,total_profit_loss_percent:fe}}),Re=async(ee=!1)=>
60{if(!(!X.value||!e.isAuthenticated)){z.value=!0;try{const R=C.value.toISOString().split("T")[0],we=new URLSearchParams({period:A.value,category:O.value,end_date:R,t:Date.now()}),fe=await ct.get(`/api/portfolio/historical-monthly-data?${we}`,{skipLoading:ee});fe.data.success?te.value=fe.data.data:te.value={monthly_data:[],available_categories:[]}}catch(R){console.error("Erro ao carregar gráficos:",R),te.value={monthly_data:[],available_categories:[]}}finally{z.value=!1}}},Ke=()=>{if(re.value=!0,!ge.value){B.value=[],re.value=!1;return}if(j.value==="all")B.value=Object.entries(ge.value).map(([ee,R])=>({name:ee,y:R.totals.total_value,color:R.color})).filter(ee=>ee.y>0);else{const ee=ge.value[j.value];ee?B.value=ee.positions.map(R=>({name:R.asset.code,y:R.current_value,color:ee.color})).filter(R=>R.y>0):B.value=[]}re.value=!1};let Be=null;const Te=(ee=!1)=>{Be&&clearTimeout(Be),Be=setTimeout(async()=>{const R=localStorage.getItem("mn_selected_date_default");let we=null;R&&(we=new Date(R).toISOString().split("T")[0],C.value.toISOString().split("T")[0]!==we&&(C.value=new Date(R)));const fe=new Date,Oe=new Date(C.value),Xe=C.value.toISOString().split("T")[0],at=Oe.getMonth()===fe.getMonth()&&Oe.getFullYear()===fe.getFullYear(),wt=Promise.all([H(!0,Xe,ee),K(Xe,ee),Re(ee)]);e.isAuthenticated&&at&&ct.post("/api/assets/update-quotes",{},{skipLoading:!0}).catch(gt=>console.error("â ï¸ [Dashboard] Falha na atualização em lote:",gt)),await wt},50)},Q=ee=>{console.log("ð
Data alterada no dashboard:",ee),C.value=new Date(ee.date),H(!0,ee.date),K(ee.date),Re()},Se=ee=>{D.value={...D.value,[ee]:!D.value[ee]}},Ve=()=>{if(!ge.value)return;const ee=!J.value,R={};Object.keys(ge.value).forEach(we=>{R[we]=ee}),D.value=R},Qe=ee=>{i.open(H_,{title:"Detalhes do ativo",asset:ee})},je=()=>{i.open(UO,{title:"Gerenciar Carteiras"})},nt=(ee,R)=>!R||!R.totals||R.totals.total_value===0?0:ee.current_value/Math.abs(R.totals.total_value)*100,ft=ee=>ee>=0?"positive":"negative",ut=ee=>ee>=0?"bi-chevron-up":"bi-chevron-down",Ye=ee=>s.hideValues?"â¢â¢â¢â¢â¢â¢":`${ee>=0?"+":"-"}${Math.abs(ee).toFixed(2)}%`,We=ee=>ee?ee>=0?"text-positive":"text-negative":"",ot=(ee,R)=>s.hideValues?"â¢â¢â¢â¢â¢â¢":q(R)?new Intl.NumberFormat("pt-BR",{minimumFractionDigits:8,maximumFractionDigits:8}).format(ee):new Intl.NumberFormat("pt-BR",{minimumFractionDigits:0,maximumFractionDigits:4}).format(ee),ht=ee=>s.hideValues?"R$ â¢â¢â¢â¢â¢â¢":new Intl.NumberFormat("pt-BR",{style:"currency",currency:"BRL",minimumFractionDigits:2,maximumFractionDigits:8}).format(ee);Pt(r,async ee=>{if(ee&&e.isAuthenticated){console.log("ð Portfolio detectado, carregando dados..."),f.value=!0;const R=localStorage.getItem("mn_selected_date_default");R&&(C.value=new Date(R)),await Te(),f.value=!1}else x.value={}},{immediate:!0}),Pt([A,O],()=>{Re()}),Pt([j],()=>{Ke()}),Pt(ge,ee=>{ee&&Ke()},{deep:!0}),Pt(()=>s.getLastRefresh("trades"),async ee=>{ee>0&&(console.log("ð Novo trade, atualizando dashboard..."),await Te())});const Tt=async ee=>{var R;if(console.log("ð Dashboard: Recebendo evento de atualização de ativo",ee),!ee||!ee.detail){console.warn("â ï¸ Evento asset-data-updated sem detalhes");return}if(!ee.detail.assetId){console.log("ð Sem assetId especÃfico, recarregando dashboard completo..."),await Te();return}if(console.log("ð Dashboard: Ativo atualizado",{assetId:ee.detail.assetId,assetCode:ee.detail.assetCode,newPrice:ee.detail.newPrice,timestamp:ee.detail.timestamp}),ee.detail.fullData){const we=(R=x.value.positions)==null?void 0:R.find(fe=>fe.asset.id===ee.detail.assetId);we&&(we.asset.current_price=ee.detail.newPrice,we.asset.price_change_percent=ee.detail.priceChangePercent,we.asset.logo_url=ee.detail.logoUrl,we.current_value=we.current_quantity*ee.detail.newPrice,we.profit_loss.amount=we.current_value-we.total_cost,we.profit_loss.percent=we.total_cost>0?we.profit_loss.amount/we.total_cost*100:0)}clearTimeout(window._dashboardReloadTimer),window._dashboardReloadTimer=setTimeout(async()=>{await H(!0),await K()},1e3)},Ot=async ee=>{if(!(!ee||!ee.detail)){if(x.value&&x.value.positions){const R=x.value.positions.find(we=>{var fe;return((fe=we==null?void 0:we.asset)==null?void 0:fe.id)===ee.detail.assetId});R&&(R.asset.current_price=Number(ee.detail.newPrice),R.asset.price_change_percent=Number(ee.detail.priceChangePercent),R.current_value=R.current_quantity*R.asset.current_price,R.profit_loss.amount=R.current_value-R.total_cost,R.total_cost>0&&(R.profit_loss.percent=R.profit_loss.amount/R.total_cost*100))}clearTimeout(window._dashboardReloadTimer),window._dashboardReloadTimer=setTimeout(async()=>{const R=C.value.toISOString().split("T")[0];await Promise.all([H(!1,R),K(R)])},1e3)}},zt=()=>{window.removeEventListener("asset-price-updated",Ot),window.removeEventListener("portfolio-changed",Te),window.removeEventListener("wallet-transaction-saved",Te),window.removeEventListener("trade-order-created",Te),window.addEventListener("asset-price-updated",Ot),window.addEventListener("portfolio-changed",()=>Te(!1)),window.addEventListener("wallet-transaction-saved",()=>Te(!1)),window.addEventListener("trade-order-created",()=>Te(!1))},Kt=ve(null),Fe=()=>{Kt.value&&clearInterval(Kt.value),Kt.value=window.setInterval(async()=>{e.isAuthenticated&&r.value&&!document.hidden&&await Te(!0)},9e5)};return Xt(async()=>
60{if(zt(),window.addEventListener("asset-data-updated",Tt),e.isAuthenticated){f.value=!0;try{await ct.get("/api/user",{skipLoading:!0}).then(ee=>h.value=ee.data)}catch{}r.value||(f.value=!1)}Fe()}),Ni(()=>{window.removeEventListener("asset-price-updated",Ot),window.removeEventListener("asset-data-updated",Tt),Kt.value&&clearInterval(Kt.value)}),(ee,R)=>{var at,wt,gt,pt,He,it,$t,ze,Je,tt,Jt,Ht,sn,gs,ws,bi,Li,$o,Ln,za,zu,Dl,Yu,Io,Pl,qu,Gu,Mo,No;const we=ur("highcharts"),fe=ur("AssetLogo"),Oe=ur("router-link"),Xe=yd("tooltip");return $(),L("div",bme,[l("div",yme,[l("div",_me,[G.value?($(),L("div",xme,[R[16]||(R[16]=l("div",{class:"d-flex align-items-center mb-3 mb-md-0"},[l("i",{class:"bi bi-stars fs-3 me-3 text-primary"}),l("div",null,[l("h6",{class:"alert-heading mb-1 fw-bold"},"Você está explorando uma Carteira de Demonstração"),l("p",{class:"mb-0 small"},"Nós preenchemos o seu ambiente com dados fictÃcios para você visualizar como a plataforma funciona. Quando quiser inserir seus dados reais, clique no botão para apagar este ambiente e começar de verdade!")])],-1)),l("button",{class:"btn btn-primary fw-bold text-nowrap ms-md-3",onClick:oe,disabled:v.value},[v.value?($(),L("span",Eme,[...R[14]||(R[14]=[l("i",{class:"bi bi-arrow-repeat spin"},null,-1),Pe(" Preparando espaço...",-1)])])):($(),L("span",Sme,[...R[15]||(R[15]=[l("i",{class:"bi bi-rocket-takeoff me-2"},null,-1),Pe("Começar de verdade",-1)])]))],8,wme)])):xe("",!0),et(ED,{currentMonth:I.value,onDateChange:Q,context:"default"},null,8,["currentMonth"]),X.value?($(),L("div",kme,[l("div",Cme,[l("div",Tme,[l("div",Ame,[l("div",Ome,[R[22]||(R[22]=l("div",{class:"metric-icon"},[l("div",{class:"icon-circle bg-surface-secondary d-flex align-items-center justify-content-center"},[l("i",{class:"bi bi-collection"})])],-1)),l("div",Dme,[l("div",Pme,[l("span",$me,pe(he(((at=E.value.portfolio_info)==null?void 0:at.title)||((wt=Ne(c))==null?void 0:wt.title),25)),1),_t(($(),L("a",{href:"#",onClick:R[0]||(R[0]=St(mt=>ee.$openHelp("rendimento-no-mes",!0),["prevent"])),"data-bs-placement":"right",title:"Rendimento no mês"},[...R[17]||(R[17]=[l("i",{class:"bi bi-question-circle-fill text-secondary mx-2"},null,-1)])])),[[Xe]])]),l("div",Ime,[E.value.monthly_summary?($(),L("span",{key:0,class:Me(["value-amount",((gt=E.value.monthly_summary)==null?void 0:gt.variation_value)>=0?"text-positive":"text-negative"])},pe(E.value.monthly_summary.variation_value>=0?"+":"")+pe(ee.$fmtCurrency(E.value.monthly_summary.variation_value)),3)):y.value||g.value?($(),L("span",Mme)):($(),L("span",Nme,"-")),E.value.monthly_summary?($(),L("div",Lme,[l("span",{class:Me(["variation-badge bg-body",ft(E.value.monthly_summary.variation_percent)])},[Pe(pe(Ye(E.value.monthly_summary.variation_percent||0))+" ",1),l("i",{class:Me(["bi",ut(E.value.monthly_summary.variation_percent)])},null,2)],2)])):xe("",!0)]),l("div",Rme,[l("div",Fme,[R[19]||(R[19]=l("div",{class:"sub-value-label text-light"},"Maior alta",-1)),ce.value?($(),L("div",Vme,[l("span",{class:"d-inline-block text-truncate","data-bs-toggle":"tooltip","data-bs-placement":"bottom",title:((He=(pt=ce.value)==null?void 0:pt.asset)==null?void 0:He.code)||((it=ce.value)==null?void 0:it.code)||"-","data-bs-original-title":((ze=($t=ce.value)==null?void 0:$t.asset)==null?void 0:ze.code)||((Je=ce.value)==null?void 0:Je.code)||"-",style:{"max-width":"70px"}},pe(((Jt=(tt=ce.value)==null?void 0:tt.asset)==null?void 0:Jt.code)||((Ht=ce.value)==null?void 0:Ht.code)||"-"),9,Bme),l("small",Ume,"+"+pe((((gs=(sn=ce.value)==null?void 0:sn.profit_loss)==null?void 0:gs.percent)||((ws=ce.value)==null?void 0:ws.profit_percent)||0).toFixed(1))+"%",1)])):y.value||g.value?($(),L("div",jme,[...R[18]||(R[18]=[l("span",{class:"skeleton-sub-value"},null,-1)])])):($(),L("div",Hme,"-"))]),l("div",Wme,[R[21]||(R[21]=l("div",{class:"sub-value-label text-light"},"Maior baixa",-1)),be.value?($(),L("div",zme,[l("span",{class:"d-inline-block text-truncate","data-bs-toggle":"tooltip","data-bs-placement":"bottom",title:((Li=(bi=be.value)==null?void 0:bi.asset)==null?void 0:Li.code)||(($o=be.value)==null?void 0:$o.code)||"-","data-bs-original-title":((za=(Ln=be.value)==null?void 0:Ln.asset)==null?void 0:za.code)||((zu=be.value)==null?void 0:zu.code)||"-",style:{"max-width":"70px"}},pe(((Yu=(Dl=be.value)==null?void 0:Dl.asset)==null?void 0:Yu.code)||((Io=be.value)==null?void 0:Io.code)||"-"),9,Yme),l("small",qme,pe((((qu=(Pl=be.value)==null?void 0:Pl.profit_loss)==null?void 0:qu.percent)||((Gu=be.value)==null?void 0:Gu.profit_percent)||0).toFixed(1))+"%",1)])):y.value||g.value?($(),L("div",Gme,[...R[20]||(R[20]=[l("span",{class:"skeleton-sub-value"},null,-1)])])):($(),L("div",Xme,"-"))])])])])]),l("div",Kme,[l("div",Jme,[R[29]||(R[29]=l("div",{class:"metric-icon"},[l("div",{class:"icon-circle bg-surface-secondary d-flex align-items-center justify-content-center"},[l("i",{class:"bi bi-wallet"}
60)])],-1)),l("div",Qme,[l("div",Zme,[R[24]||(R[24]=Pe("Patrimônio total ",-1)),_t(($(),L("a",{href:"#",onClick:R[1]||(R[1]=St(mt=>ee.$openHelp("patrimonio-total",!0),["prevent"])),"data-bs-placement":"right",title:"Patrimônio total"},[...R[23]||(R[23]=[l("i",{class:"bi bi-question-circle-fill text-secondary mx-2"},null,-1)])])),[[Xe]])]),l("div",ege,[E.value.equity_summary?($(),L("span",tge,pe(ee.$fmtCurrency(E.value.equity_summary.total_equity||0)),1)):y.value||g.value?($(),L("span",sge)):($(),L("span",nge,"-")),E.value.equity_summary?($(),L("div",ige,[l("span",{class:Me(["variation-badge bg-body",ft(E.value.equity_summary.equity_variation_percent)])},[Pe(pe(Ye(E.value.equity_summary.equity_variation_percent||0))+" ",1),l("i",{class:Me(["bi",ut(E.value.equity_summary.equity_variation_percent)])},null,2)],2)])):xe("",!0)]),l("div",rge,[l("div",age,[R[26]||(R[26]=l("div",{class:"sub-value-label text-light"},"Valor investido",-1)),E.value.equity_summary?($(),L("div",oge,pe(ee.$fmtCurrency(E.value.equity_summary.total_invested||0)),1)):y.value||g.value?($(),L("div",lge,[...R[25]||(R[25]=[l("span",{class:"skeleton-sub-value"},null,-1)])])):($(),L("div",uge,"-"))]),l("div",cge,[R[28]||(R[28]=l("div",{class:"sub-value-label text-light"},"Valor Atual",-1)),E.value.equity_summary?($(),L("div",dge,pe(ee.$fmtCurrency(E.value.equity_summary.current_positions_value||0)),1)):y.value||g.value?($(),L("div",hge,[...R[27]||(R[27]=[l("span",{class:"skeleton-sub-value"},null,-1)])])):($(),L("div",fge,"-"))])])])])]),l("div",pge,[l("div",mge,[R[36]||(R[36]=l("div",{class:"metric-icon"},[l("div",{class:"icon-circle bg-surface-secondary d-flex align-items-center justify-content-center"},[l("i",{class:"bi bi-cash-coin"})])],-1)),l("div",gge,[l("div",vge,[R[31]||(R[31]=Pe("Lucro total ",-1)),_t(($(),L("a",{href:"#",onClick:R[2]||(R[2]=St(mt=>ee.$openHelp("lucro-total",!0),["prevent"])),"data-bs-placement":"right",title:"Lucro total"},[...R[30]||(R[30]=[l("i",{class:"bi bi-question-circle-fill text-secondary mx-2"},null,-1)])])),[[Xe]])]),l("div",bge,[E.value.profit_summary?($(),L("span",{key:0,class:Me(["value-amount",We((Mo=E.value.profit_summary)==null?void 0:Mo.total_profit)])},pe(ee.$fmtCurrency(E.value.profit_summary.total_profit)),3)):y.value||g.value?($(),L("span",yge)):($(),L("span",_ge,"-"))]),l("div",xge,[l("div",wge,[R[33]||(R[33]=l("div",{class:"sub-value-label text-light"},"Ganho Capital",-1)),E.value.profit_summary?($(),L("div",{key:0,class:Me(["sub-value-amount",We((No=E.value.profit_summary)==null?void 0:No.gain_capital)])},pe(ee.$fmtCurrency(E.value.profit_summary.gain_capital)),3)):y.value||g.value?($(),L("div",Ege,[...R[32]||(R[32]=[l("span",{class:"skeleton-sub-value"},null,-1)])])):($(),L("div",Sge,"-"))]),l("div",kge,[R[35]||(R[35]=l("div",{class:"sub-value-label text-light"},"Proventos",-1)),E.value.profit_summary?($(),L("div",Cge,pe(ee.$fmtCurrency(E.value.profit_summary.dividends_received||0)),1)):y.value||g.value?($(),L("div",Tge,[...R[34]||(R[34]=[l("span",{class:"skeleton-sub-value"},null,-1)])])):($(),L("div",Age,"-"))])])])])]),l("div",Oge,[l("div",Dge,[R[40]||(R[40]=l("div",{class:"metric-icon"},[l("div",{class:"icon-circle bg-surface-secondary d-flex align-items-center justify-content-center"},[l("i",{class:"bi bi-piggy-bank"})])],-1)),l("div",Pge,[l("div",$ge,[R[38]||(R[38]=Pe("Saldo em caixa ",-1)),_t(($(),L("a",{href:"#",onClick:R[3]||(R[3]=St(mt=>ee.$openHelp("saldo-em-caixa",!0),["prevent"])),"data-bs-placement":"right",title:"Saldo em caixa"},[...R[37]||(R[37]=[l("i",{class:"bi bi-question-circle-fill text-secondary mx-2"},null,-1)])])),[[Xe]])]),l("div",Ige,[E.value.equity_summary?($(),L("span",Mge,pe(ee.$fmtCurrency(E.value.equity_summary.wallet_balance||0)),1)):y.value||g.value?($(),L("span",Nge)):($(),L("span",Lge,"-"))]),R[39]||(R[39]=l("div",{class:"metric-sub-values"},[l("div",{class:"sub-value-item"},[l("div",{class:"sub-value-label text-light"},"Origem"),l("div",{class:"sub-value-amount text-muted"}," Vendas, Aportes e Dividendos ")])],-1))])])])])])])):xe("",!0),X.value?($(),L("div",Rge,[et(vme)])):xe("",!0),X.value?($(),L("div",Fge,[l("div",Vge,[l("div",Bge,[l("div",Uge,[l("nav",jge,[l("div",Hge,[l("div",Wge,[R[42]||(R[42]=Pe("Evolução do patrimônio ",-1)),_t(($(),L("a",{href:"#",onClick:R[4]||(R[4]=St(mt=>ee.$openHelp("evolucao-do-patrimonio",!0),["prevent"])),"data-bs-placement":"right",title:"Evolução do patrimônio"},[...R[41]||(R[41]=[l("i",{class:"bi bi-question-circle-fill text-secondary mx-2"},null,-1)])])),[[Xe]])])]),l("div",zge,[_t(l("select",{"onUpdate:modelValue":R[5]||(R[5]=mt=>A.value=mt),class:"form-select form-select-sm me-2"},[...R[43]||(R[43]=[l("option",{value:"1m"},"1 mês",-1),l("option",{value:"3m"},"3 meses",-1),l("option",{value:"12m"},"12 meses",-1),l("option",{value:"24m"},"24 meses",-1)])],512),[[An,A.value]]),_t(l("select",{"onUpdate:modelValue":R[6]||(R[6]=mt=>O.value=mt),class:"form-select form-select-sm",style:{width:"auto"}},[R[44]||(R[44]=l("option",{value:"all"},"Todas as categorias",-1)),($(!0),L(Ze,null,At(Z.value,mt=>($(),L("option",{key:mt,value:mt},pe(mt),9,Yge))),128))],512),[[An,O.value]])])]),l("div",qge,[z.value||f.value?($(),L("div",Gge,[...R[45]||(R[45]=[l("div",{class:"spinner-border",role:"status"},[l("span",{class:"visually-hidden"},"Carregando...")],-1),l("p",{class:"mt-2"},"Calculando evolução do patrimônio...",-1)])])):W.value&&Ee.value?($(),Ut(we,{key:1,options:W.value},null,8,["options"])):($(),L("div",Xge,[...R[46]||(R[46]=[l("i",{class:"bi bi-bar-chart display-4 opacity-50"},null,-1),l("p",{class:"mt-2"},"Nenhum dado disponÃvel",-1),l("p",{class:"small"},"Realize operações para ver a evolução do seu patrimônio",-1)])]))])])]),l("div",Kge,[l("div",Jge,[l("nav",Qge,[l("div",Zge,[l("div",eve,[R[48]||(R[48]=Pe("Composição ",
60-1)),_t(($(),L("a",{href:"#",onClick:R[7]||(R[7]=St(mt=>ee.$openHelp("composicao-da-carteira",!0),["prevent"])),"data-bs-placement":"right",title:"Composição da carteira"},[...R[47]||(R[47]=[l("i",{class:"bi bi-question-circle-fill text-secondary mx-2"},null,-1)])])),[[Xe]])])]),l("div",tve,[_t(l("select",{"onUpdate:modelValue":R[8]||(R[8]=mt=>j.value=mt),class:"form-select form-select-sm"},[R[49]||(R[49]=l("option",{value:"all"},"Todas as categorias",-1)),($(!0),L(Ze,null,At(Z.value,mt=>($(),L("option",{key:mt,value:mt},pe(mt),9,sve))),128))],512),[[An,j.value]])])]),l("div",nve,[re.value||f.value?($(),L("div",ive,[...R[50]||(R[50]=[l("div",{class:"spinner-border",role:"status"},[l("span",{class:"visually-hidden"},"Carregando...")],-1),l("p",{class:"mt-2"},"Calculando composição da carteira...",-1)])])):M.value&&_e.value?($(),Ut(we,{key:1,options:M.value},null,8,["options"])):($(),L("div",rve,[...R[51]||(R[51]=[l("i",{class:"bi bi-pie-chart display-4 opacity-50"},null,-1),l("p",{class:"mt-2"},"Nenhum dado disponÃvel",-1),l("p",{class:"small"},"Adicione ativos à carteira para ver a composição",-1)])]))])])])])])):xe("",!0),l("div",ave,[g.value?($(),L("div",ove)):xe("",!0),l("nav",lve,[l("div",uve,[l("div",cve,[R[53]||(R[53]=Pe("Resumo da Carteira ",-1)),_t(($(),L("a",{href:"#",onClick:R[9]||(R[9]=St(mt=>ee.$openHelp("resumo-da-carteira",!0),["prevent"])),"data-bs-placement":"right",title:"Resumo da carteira"},[...R[52]||(R[52]=[l("i",{class:"bi bi-question-circle-fill text-secondary mx-2"},null,-1)])])),[[Xe]])])]),l("div",dve,[l("a",{href:"#",onClick:St(Te,["prevent"]),"data-bs-toggle":"tooltip","data-bs-placement":"left",title:"Atualizar dados",class:Me(["mx-2",{"text-muted":g.value}])},[l("i",{class:Me(["bi",g.value?"bi-arrow-clockwise spin":"bi-arrow-clockwise"])},null,2)],2),l("a",{href:"#",onClick:St(Ve,["prevent"]),"data-bs-toggle":"tooltip","data-bs-placement":"left",title:J.value?"Recolher Todas":"Expandir Todas",class:"mx-2"},[l("i",{class:Me(["bi",J.value?"bi-arrows-collapse":"bi-arrows-expand"])},null,2)],8,hve)])]),l("div",fve,[X.value&&ge.value&&Object.keys(ge.value).length>0?($(),L("div",pve,[l("div",mve,[($(!0),L(Ze,null,At(ge.value,(mt,Tr)=>($(),L("div",{key:Tr,class:"category-item mb-3 border rounded"},[l("div",{class:"category-header p-3",onClick:Lt=>Se(Tr),style:{cursor:"pointer"}},[l("div",vve,[l("div",bve,[l("span",{class:"category-indicator me-2",style:zs({backgroundColor:mt.color})},null,4),l("strong",null,pe(Tr),1),l("span",yve,pe(mt.positions.length)+" ativos",1)]),l("div",_ve,[l("div",xve,[R[54]||(R[54]=l("small",{class:"text-muted d-block"},"Valor Total",-1)),l("strong",wve,pe(ee.$fmtCurrency(mt.totals.total_value)),1)]),l("div",Eve,[R[55]||(R[55]=l("small",{class:"text-muted d-block"},"Var. Total",-1)),l("span",{class:Me(mt.totals.total_profit_loss>=0?"text-positive":"text-negative")},[Pe(pe(ee.$fmtCurrency(mt.totals.total_profit_loss))+" ",1),l("small",null,"("+pe(mt.totals.total_profit_loss_percent.toFixed(2))+"%)",1)],2)]),l("div",Sve,[l("div",kve,[l("strong",Cve,pe(mt.totals.portfolio_percent.toFixed(1))+"%",1),l("div",Tve,[($(),L("svg",Ave,[R[56]||(R[56]=l("circle",{cx:"12",cy:"12",r:"10",fill:"none",stroke:"var(--border-color)","stroke-width":"4"},null,-1)),l("circle",{cx:"12",cy:"12",r:"10",fill:"none",stroke:mt.color,"stroke-width":"4","stroke-dasharray":"62.8","stroke-dashoffset":ne(mt.totals.portfolio_percent),transform:"rotate(-90 12 12)"},null,8,Ove)]))])])]),l("i",{class:Me(["bi ms-2",D.value[Tr]?"bi-chevron-up":"bi-chevron-down"])},null,2)])]),l("div",Dve,[l("div",Pve,[l("div",$ve,[l("span",{class:"category-indicator me-2",style:zs({backgroundColor:mt.color})},null,4),l("div",null,[l("strong",Ive,pe(Tr),1),l("span",Mve,pe(mt.positions.length)+" ativos",1)])])]),l("div",Nve,[l("div",Lve,[R[57]||(R[57]=l("small",{class:"text-muted d-block"},"Total",-1)),l("strong",Rve,pe(ee.$fmtCurrency(mt.totals.total_value)),1)]),l("div",null,[l("span",{class:Me(mt.totals.total_profit_loss>=0?"text-positive":"text-negative")},[Pe(pe(ee.$fmtCurrency(mt.totals.total_profit_loss))+" ",1),l("small",null,"("+pe(mt.totals.total_profit_loss_percent.toFixed(2))+"%)",1)],2)])]),l("div",Fve,[l("div",Vve,[l("div",Bve,[($(),L("svg",Uve,[R[58]||(R[58]=l("circle",{cx:"12",cy:"12",r:"10",fill:"none",stroke:"var(--border-color)","stroke-width":"4"},null,-1)),l("circle",{cx:"12",cy:"12",r:"10",fill:"none",stroke:mt.color,"stroke-width":"4","stroke-dasharray":"62.8","stroke-dashoffset":ne(mt.totals.portfolio_percent),transform:"rotate(-90 12 12)"},null,8,jve)]))]),l("span",Hve,pe(mt.totals.portfolio_percent.toFixed(1))+"% ",1)]),l("i",{class:Me(["bi",D.value[Tr]?"bi-chevron-up":"bi-chevron-down"])},null,2)])])],8,gve),D.value[Tr]?($(),L("div",Wve,[l("div",zve,[l("div",Yve,[l("table",qve,[mt.slug==="renda-fixa"||mt.slug==="tesouro-direto"||mt.slug==="tesouro"?($(),L("thead",Gve,[l("tr",null,[R[61]||(R[61]=l("th",{width:"40"}
60,null,-1)),R[62]||(R[62]=l("th",null,"Produto",-1)),R[63]||(R[63]=l("th",{class:"text-end"},"Investido",-1)),R[64]||(R[64]=l("th",{class:"text-end"},"Bruto",-1)),R[65]||(R[65]=l("th",{class:"text-end"},"IR Retido",-1)),l("th",Xve,[R[60]||(R[60]=Pe("LÃquido ",-1)),_t(($(),L("a",{href:"#",onClick:R[10]||(R[10]=St(Lt=>ee.$openHelp("liquido-renda-fixa",!0),["prevent"])),"data-bs-placement":"right",title:"Resultado lÃquido"},[...R[59]||(R[59]=[l("i",{class:"bi bi-question-circle-fill text-secondary mx-2"},null,-1)])])),[[Xe]])]),R[66]||(R[66]=l("th",{class:"text-end"},"L/P",-1)),R[67]||(R[67]=l("th",{class:"text-end"},"% Cart.",-1))])])):($(),L("thead",Kve,[l("tr",null,[R[70]||(R[70]=l("th",{width:"40"},null,-1)),R[71]||(R[71]=l("th",null,"Ativo",-1)),R[72]||(R[72]=l("th",{class:"text-end"},"Quantidade",-1)),l("th",Jve,[R[69]||(R[69]=Pe("P. Médio ",-1)),_t(($(),L("a",{href:"#",onClick:R[11]||(R[11]=St(Lt=>ee.$openHelp("preco-medio",!0),["prevent"])),"data-bs-placement":"right",title:"Preço Médio de Compra"},[...R[68]||(R[68]=[l("i",{class:"bi bi-question-circle-fill text-secondary mx-2"},null,-1)])])),[[Xe]])]),R[73]||(R[73]=l("th",{class:"text-end"},"Cot.",-1)),R[74]||(R[74]=l("th",{class:"text-end"},"Investido",-1)),R[75]||(R[75]=l("th",{class:"text-end"},"Atual",-1)),R[76]||(R[76]=l("th",{class:"text-end"},"L/P",-1)),R[77]||(R[77]=l("th",{class:"text-end"},"% Cart.",-1))])])),l("tbody",null,[($(!0),L(Ze,null,At(mt.positions,Lt=>{var Ya,Gr,Xr,ma,qa,ga,va,Kr,Jr,Ar,$l,qs,Il,Ri,Ml,Or,Lo;return $(),L(Ze,{key:(Ya=Lt.asset)==null?void 0:Ya.id},[mt.slug==="renda-fixa"||mt.slug==="tesouro-direto"||mt.slug==="tesouro"?($(),L("tr",Qve,[l("td",Zve,[et(fe,{"asset-id":(Gr=Lt.asset)==null?void 0:Gr.id,asset:Lt.asset,"show-price":!1,"show-variation":!1,clickable:!0,"auto-update":!1,onClick:Xu=>Qe(Lt.asset)},null,8,["asset-id","asset","onClick"])]),l("td",ebe,[l("div",tbe,[l("span",null,pe(ee.$fmtCurrency(Lt.total_cost)),1),mt.slug==="tesouro"||mt.slug==="tesouro-direto"?($(),L("small",sbe,pe(ot(Lt.current_quantity,mt.slug))+" frações ",1)):xe("",!0)])]),l("td",nbe,pe(ee.$fmtCurrency(((Xr=Lt.renda_fixa_detalhes)==null?void 0:Xr.valor_bruto)||Lt.current_value)),1),l("td",ibe,[l("div",rbe,[((ma=Lt.renda_fixa_detalhes)==null?void 0:ma.imposto_renda)>0?($(),L("span",abe," - "+pe(ee.$fmtCurrency((qa=Lt.renda_fixa_detalhes)==null?void 0:qa.imposto_renda)),1)):($(),L("span",obe,"-")),(ga=Lt.renda_fixa_detalhes)!=null&&ga.aliquota_aplicada?($(),L("small",lbe," ("+pe(Lt.renda_fixa_detalhes.aliquota_aplicada)+") ",1)):xe("",!0)])]),l("td",ube,[l("div",cbe,[l("strong",dbe,pe(ee.$fmtCurrency(((va=Lt.renda_fixa_detalhes)==null?void 0:va.valor_liquido)||Lt.current_value)),1),(Kr=Lt.renda_fixa_detalhes)!=null&&Kr.projetado_vencimento_liquido?($(),L("small",hbe,[_t(($(),L("a",{href:"#",onClick:R[12]||(R[12]=St(Xu=>ee.$openHelp("estimativa-vencimento",!0),["prevent"])),"data-bs-placement":"right",title:"Estimativa no vencimento"},[...R[78]||(R[78]=[l("i",{class:"bi bi-question-circle-fill text-secondary mx-2"},null,-1)])])),[[Xe]]),Pe(" "+pe(ee.$fmtCurrency(Lt.renda_fixa_detalhes.projetado_vencimento_liquido)),1)])):xe("",!0)])]),l("td",fbe,[l("div",pbe,[l("span",{class:Me(((Jr=Lt.profit_loss)==null?void 0:Jr.amount)>=0?"text-positive":"text-negative")},pe(ee.$fmtCurrency((Ar=Lt.profit_loss)==null?void 0:Ar.amount)),3),l("small",{class:Me((($l=Lt.profit_loss)==null?void 0:$l.percent)>=0?"text-positive":"text-negative")}," ("+pe((((qs=Lt.profit_loss)==null?void 0:qs.percent)||0).toFixed(2))+"%) ",3)])]),l("td",mbe,pe(nt(Lt,mt).toFixed(1))+"% ",1)])):($(),L("tr",gbe,[l("td",vbe,[et(fe,{"asset-id":(Il=Lt.asset)==null?void 0:Il.id,asset:Lt.asset,"show-price":!0,"show-variation":!0,clickable:!0,"auto-update":!0,onClick:Xu=>Qe(Lt.asset)},null,8,["asset-id","asset","onClick"])]),l("td",bbe,pe(ot(Lt.current_quantity,mt.slug)),1),l("td",ybe,pe(ee.$fmtCurrency(Lt.average_price)),1),l("td",_be,[q(mt.slug)?($(),L("strong",xbe,pe(ht(Lt.current_price)),1)):($(),L("strong",wbe,pe(ee.$fmtCurrency(Lt.current_price)),1))]),l("td",Ebe,pe(ee.$fmtCurrency(Lt.total_cost)),1),l("td",Sbe,pe(ee.$fmtCurrency(Lt.current_value)),1),l("td",kbe,[l("div",Cbe,[l("span",{class:Me(((Ri=Lt.profit_loss)==null?void 0:Ri.amount)>=0?"text-positive":"text-negative")},pe(ee.$fmtCurrency((Ml=Lt.profit_loss)==null?void 0:Ml.amount)),3),l("small",{class:Me(((Or=Lt.profit_loss)==null?void 0:Or.percent)>=0?"text-positive":"text-negative")}," ("+pe((((Lo=Lt.profit_loss)==null?void 0:Lo.percent)||0).toFixed(2))+"%) ",3)])]),l("td",Tbe,pe(nt(Lt,mt).toFixed(1))+"% ",1)]))],64)}),128))])])])]),l("div",Abe,[l("div",Obe,[($(!0),L(Ze,null,At(mt.positions,Lt=>{var Ya,Gr,Xr,ma,qa,ga,va,Kr,Jr,Ar;return $(),L("div",{key:Lt.asset.id,class:"position-card mb-3 p-3 rounded border"},[l("div",Dbe,[et(fe,{"asset-id":Lt.asset.id,asset:Lt.asset,"show-price":!(mt.slug==="renda-fixa"||mt.slug==="tesouro-direto"||mt.slug==="tesouro"),"show-variation":!(mt.slug==="renda-fixa"||mt.slug==="tesouro-direto"||mt.slug==="tesouro"),clickable:!0,"auto-update":!(mt.slug==="renda-fixa"||mt.slug==="tesouro-direto"||mt.slug==="tesouro"),onClick:$l=>Qe(Lt.asset)},null,8,["asset-id","asset","show-price","show-variation","auto-update","onClick"]),l("span",Pbe,pe(nt(Lt,mt).toFixed(1))+"% ",1)]),mt.slug==="renda-fixa"||mt.slug==="tesouro-direto"||mt.slug==="tesouro"?($(),L(Ze,{key:0},[l("div",$be,[l("div",Ibe,[R[79]||(R[79]=l("small",{class:"text-muted d-block"},"Investido",-1)),l("strong",null,pe(ee.$fmtCurrency(Lt.total_cost)),1)]),mt.slug==="tesouro"||mt.slug==="tesouro-direto"?($(),L("div",Mbe,[R[80]||(R[80]=l("small",{class:"text-muted d-block"},"Quantidade",-1)),l("strong",null,pe(ot(Lt.current_quantity,mt.slug))+" frações",1)])):xe("",!0)]),l("div",Nbe,[l("div",Lbe,[l("div",Rbe,[R[81]||(R[81]=l("small",{class:"text-muted d-block"},"Valor Bruto",-1)),l("strong",Fbe,pe(ee.$fmtCurrency(((Ya=Lt.renda_fixa_detalhes)==null?void 0:Ya.valor_bruto)||Lt.current_value)),1)]),l("div",Vbe,[l("small",Bbe,[R[82]||(R[82]=Pe("IR Retido ",-1)),(Gr=Lt.renda_fixa_detalhes)!=null&&Gr.aliquota_aplicada?($(),L("span",Ube,"("+pe(Lt.renda_fixa_detalhes.aliquota_aplicada)+")",1)):xe("",!0)]),((Xr=Lt.renda_fixa_detalhes)==null?void 0:Xr.imposto_renda)>
600?($(),L("strong",jbe,"- "+pe(ee.$fmtCurrency((ma=Lt.renda_fixa_detalhes)==null?void 0:ma.imposto_renda)),1)):($(),L("span",Hbe,"-"))]),l("div",Wbe,[R[83]||(R[83]=l("small",{class:"text-muted d-block"},"Valor LÃquido",-1)),l("strong",zbe,pe(ee.$fmtCurrency(((qa=Lt.renda_fixa_detalhes)==null?void 0:qa.valor_liquido)||Lt.current_value)),1)]),l("div",Ybe,[R[84]||(R[84]=l("small",{class:"text-muted d-block"},"Vencimento",-1)),(ga=Lt.renda_fixa_detalhes)!=null&&ga.projetado_vencimento_liquido?($(),L("strong",qbe,pe(ee.$fmtCurrency(Lt.renda_fixa_detalhes.projetado_vencimento_liquido)),1)):($(),L("span",Gbe,"-"))])])])],64)):($(),L(Ze,{key:1},[l("div",Xbe,[l("div",Kbe,[R[85]||(R[85]=l("small",{class:"text-muted d-block"},"Quantidade",-1)),l("strong",null,pe(ot(Lt.current_quantity,mt.slug)),1)]),l("div",Jbe,[R[86]||(R[86]=l("small",{class:"text-muted d-block"},"Preço Médio",-1)),l("strong",null,pe(ee.$fmtCurrency(Lt.average_price)),1)]),l("div",Qbe,[R[87]||(R[87]=l("small",{class:"text-muted d-block"},"Cotação",-1)),q(mt.slug)?($(),L("strong",Zbe,pe(ht(Lt.current_price)),1)):($(),L("strong",eye,pe(ee.$fmtCurrency(Lt.current_price)),1))]),l("div",tye,[R[88]||(R[88]=l("small",{class:"text-muted d-block"},"Investido",-1)),l("strong",null,pe(ee.$fmtCurrency(Lt.total_cost)),1)])]),l("div",sye,[l("div",nye,[l("div",iye,[R[89]||(R[89]=l("small",{class:"text-muted d-block"},"Valor Atual",-1)),l("strong",null,pe(ee.$fmtCurrency(Lt.current_value)),1)])])])],64)),l("div",rye,[l("div",aye,[R[90]||(R[90]=l("small",{class:"text-muted"},"Lucro / PrejuÃzo",-1)),l("div",oye,[l("strong",{class:Me((((va=Lt.profit_loss)==null?void 0:va.amount)||0)>=0?"text-positive":"text-negative")},pe(ee.$fmtCurrency(((Kr=Lt.profit_loss)==null?void 0:Kr.amount)||0)),3),l("small",{class:Me(["ms-1",(((Jr=Lt.profit_loss)==null?void 0:Jr.percent)||0)>=0?"text-positive":"text-negative"])}," ("+pe((((Ar=Lt.profit_loss)==null?void 0:Ar.percent)||0).toFixed(2))+"%) ",3)])])])])}),128))])]),l("div",lye,[l("div",uye,[l("div",cye,[R[91]||(R[91]=l("small",{class:"d-block text-muted"},"Valor Investido",-1)),l("strong",null,pe(ee.$fmtCurrency(mt.totals.total_cost)),1)]),l("div",dye,[R[92]||(R[92]=l("small",{class:"d-block text-muted"},"Valor Atual",-1)),l("strong",null,pe(ee.$fmtCurrency(mt.totals.total_value)),1)]),l("div",hye,[R[93]||(R[93]=l("small",{class:"d-block text-muted"},"Ganho de capital",-1)),l("strong",{class:Me(mt.totals.total_profit_loss>=0?"text-positive":"text-negative")},pe(ee.$fmtCurrency(mt.totals.total_profit_loss)),3)]),l("div",fye,[R[94]||(R[94]=l("small",{class:"d-block text-muted"},"Rentabilidade",-1)),l("strong",{class:Me(mt.totals.total_profit_loss_percent>=0?"text-positive":"text-negative")},pe(mt.totals.total_profit_loss_percent.toFixed(2))+"% ",3)])])])])):xe("",!0)]))),128))]),l("div",pye,[l("div",mye,[l("div",gye,[R[95]||(R[95]=l("small",{class:"d-block opacity-75"},"Patrimônio Total",-1)),l("strong",vye,pe(ee.$fmtCurrency(Ce.value.total_value)),1)]),l("div",bye,[R[96]||(R[96]=l("small",{class:"d-block opacity-75"},"Valor Investido",-1)),l("strong",yye,pe(ee.$fmtCurrency(Ce.value.total_cost)),1)]),l("div",_ye,[R[97]||(R[97]=l("small",{class:"d-block opacity-75"},"Valor Atual",-1)),l("strong",xye,pe(ee.$fmtCurrency(Ce.value.current_assets_value)),1)]),l("div",wye,[R[98]||(R[98]=l("small",{class:"d-block opacity-75"},"Ganho de Capital",-1)),l("strong",{class:Me(["fs-5",Ce.value.gain_capital>=0?"text-positive":"text-negative"])},pe(ee.$fmtCurrency(Ce.value.gain_capital)),3)]),l("div",Eye,[R[99]||(R[99]=l("small",{class:"d-block opacity-75"},"Rentabilidade",-1)),l("strong",{class:Me(["fs-5",Ce.value.total_profit_loss_percent>=0?"text-positive":"text-negative"])},pe(Ce.value.total_profit_loss_percent.toFixed(2))+"% ",3)])])])])):g.value?($(),L("div",Sye,[...R[100]||(R[100]=[l("div",{class:"spinner-border",role:"status"},[l("span",{class:"visually-hidden"},"Carregando...")],-1),l("p",{class:"mt-2 text-muted"},"Criando resumo da carteira...",-1)])])):X.value&&!g.value?($(),L("div",kye,[...R[101]||(R[101]=[l("i",{class:"bi bi-inbox display-4 opacity-50"},null,-1),l("p",{class:"mt-2"},"Nenhuma posição em custódia",-1),l("p",{class:"small"},"Realize operações de compra para ver o resumo da sua carteira",-1)])])):X.value?xe("",!0):($(),L("div",Cye,[R[103]||(R[103]=l("i",{class:"bi bi-wallet2 display-4 opacity-50"},null,-1)),R[104]||(R[104]=l("p",{class:"mt-2"},"Selecione uma carteira para ver os detalhes",-1)),l("button",{class:"btn btn-primary mt-2",onClick:je},[...R[102]||(R[102]=[l("i",{class:"bi bi-wallet2 me-1"},null,-1),Pe("Selecionar Carteira ",-1)])])]))])]),l("div",Tye,[l("div",{class:Me(["col
60-md-12",F.value?"col-lg-8":"col-lg-12"])},[l("div",Aye,[R[105]||(R[105]=l("nav",{class:"navbar rounded mb-2"},[l("div",{class:"d-flex flex-column flex-md-row align-items-start align-items-md-center"},[l("div",{class:"title"},"Calendário")]),l("div",{class:"actions d-flex"})],-1)),et(ipe)])],2),_t(l("div",Oye,[l("div",Dye,[l("nav",Pye,[R[107]||(R[107]=l("div",{class:"d-flex flex-column flex-md-row align-items-start align-items-md-center"},[l("div",{class:"title"},"Ativos no radar")],-1)),l("div",$ye,[et(Oe,{to:"/watchlist","data-action":"route",class:"btn btn-sm btn-outline-primary",title:"Ver todos"},{default:vt(()=>[...R[106]||(R[106]=[l("i",{class:"bi bi-arrow-right"},null,-1)])]),_:1})])]),et(Kpe,{onHasDataChanged:R[13]||(R[13]=mt=>F.value=mt)})])],512),[[Rr,F.value]])])])])])}}},Mye=ls(Iye,[["__scopeId","data-v-ac8b1437"]]),Nye={class:"container-fluid bg-dark"},Lye={class:"row min-vh-100"},Rye={class:"col-lg-6 d-flex justify-content-center align-items-center"},Fye={class:"col-11 col-md-8 col-lg-6 mx-auto"},Vye={key:0},Bye={key:0,href:"/auth/google",class:"btn btn-danger w-100 mb-4"},Uye={key:1,class:"text-center mb-4"},jye={key:2,class:"alert alert-danger"},Hye={class:"input-group"},Wye={class:"form-floating"},zye={class:"input-group mt-4"},Yye={class:"form-floating position-relative"},qye=["type"],Gye={class:"form-check mt-3"},Xye={class:"d-flex justify-content-between mt-4"},Kye={class:"d-flex justify-content-end mt-4"},Jye=["disabled"],Qye={key:0,class:"spinner-border spinner-border-sm me-2"},Zye={key:1},e0e={key:0,class:"alert alert-danger"},t0e={class:"d-flex justify-content-between mb-4 gap-1 gap-md-2"},s0e=["onUpdate:modelValue","onInput","onKeydown"],n0e={class:"d-flex justify-content-between mt-4 align-items-center"},i0e=["disabled"],r0e={key:0,class:"spinner-border spinner-border-sm me-2"},a0e={__name:"LoginPage",setup(t){const e=ve(""),s=ve(""),n=ve(!1),i=ve(!1),o=ve(null),r=ve(!1),c=ve("login"),h=ve(["","","","","",""]),f=ve([]),v=gi(),g=Af(),y=tn(),x=Ae(()=>h.value.every(A=>A!==""));function E(){i.value=!i.value}async function P(){var A,O,j,te;r.value=!0,o.value=null;try{(await ct.post("/api/login",{email:e.value,password:s.value,remember:n.value})).data.two_factor?(c.value="two_factor",o.value=null,await vs(),(A=f.value[0])==null||A.focus()):(await y.getUser(),v.push("/dashboard"))}catch(B){((O=B.response)==null?void 0:O.status)===401?o.value="Credenciais inválidas!":o.value=((te=(j=B.response)==null?void 0:j.data)==null?void 0:te.message)||"Erro ao realizar login."}finally{r.value=!1}}async function I(){var O,j;r.value=!0,o.value=null;const A=h.value.join("");try{await ct.post("/auth/two-factor",{code:A}),await y.getUser(),v.push("/dashboard")}catch(te){o.value=((j=(O=te.response)==null?void 0:O.data)==null?void 0:j.message)||"Código inválido ou expirado."}finally{r.value=!1}}function D(A,O){var te;const j=A.target.value;h.value[O]=j.replace(/[^0-9]/g,""),h.value[O]&&O<5&&((te=f.value[O+1])==null||te.focus())}function F(A,O){var j;!h.value[O]&&O>0&&((j=f.value[O-1])==null||j.focus())}function C(A){var j;A.preventDefault();const O=A.clipboardData.getData("text").replace(/[^0-9]/g,"").slice(0,6);if(O){const te=O.split("");te.forEach((z,re)=>{h.value[re]=z});const B=Math.min(te.length,5);(j=f.value[B])==null||j.focus()}}return Xt(()=>{g.query.two_factor==="true"&&(c.value="two_factor",v.replace({query:{}})),g.query.error==="google_failed"&&(o.value="Falha na autenticação com o Google.")}),(A,O)=>{const j=ur("router-link");return $(),L("div",Nye,[l("div",Lye,[l("div",Rye,[l("div",Fye,[O[16]||(O[16]=l("div",{class:"p-4 text-center"},[l("a",{href:"/"},[l("img",{src:"/assets/images/logo.png",alt:"Kativo",style:{"margin-bottom":"1rem",width:"112px"}})])],-1)),c.value==="login"?($(),L("div",Vye,[A.invitationToken?xe("",!0):($(),L("a",Bye,[...O[4]||(O[4]=[l("i",{class:"bi bi-google"},null,-1),Pe(" Entrar com Google ",-1)])])),A.invitationToken?xe("",!0):($(),L("div",Uye,"OU")),o.value?($(),L("div",jye,pe(o.value),1)):xe("",!0),l("form",{onSubmit:St(P,["prevent"])},[l("div",Hye,[O[6]||(O[6]=l("span",{class:"input-group-text"},[l("i",{class:"bi bi-at"})],-1)),l("div",Wye,[_t(l("input",{type:"email","onUpdate:modelValue":O[0]||(O[0]=te=>e.value=te),class:"form-control",id:"email",placeholder:"E-mail",required:""},null,512),[[Xs,e.value]]),O[5]||(O[5]=l("label",{for:"email"},"E-mail",-1))])]),l("div",zye,[O[8]||(O[8]=l("span",{class:"input-group-text"},[l("i",{class:"bi bi-key-fill"})],-1)),l("div",Yye,[_t(l("input",{type:i.value?"text":"password","onUpdate:modelValue":O[1]||(O[1]=te=>s.value=te),class:"form-control",id:"password",placeholder:"Senha",required:""},null,8,qye),[[Kh,s.value]]),O[7]||(O[7]=l("label",{for:"password"},"Senha",-1)),l("button",{type:"button",class:"btn btn-link position-absolute end-0 top-50 translate-middle-y me-2 p-0",onClick:E,tabindex:"-1"},[l("i",{class:Me(i.value?"bi bi-eye-slash":"bi bi-eye")},null,2)])])]),l("div",Gye,[_t(l("input",{class:"form-check-input",type:"checkbox",id:"remember","onUpdate:modelValue":O[2]||(O[2]=te=>n.value=te)},null,512),[[kr,n.value]]),O[9]||(O[9]=l("label",{class:"form-check-label",for:"remember"},"Lembrar-me",-1))]),l("div",Xye,[et(j,{to:"/forgot-password"},{default:vt(()=>[...O[10]||(O[10]=[Pe("Esqueceu a senha?",-1)])]),_:1}),et(j,{to:"/register"},{default:vt(()=>[...O[11]||(O[11]=[Pe("Criar conta",-1)])]),_:1})]),l("div",Kye,[l("button",{type:"submit",class:"btn btn-secondary btn-block",disabled:r.value},[r.value?($(),L("span",Qye)):xe("",!0),O[12]||(O[12]=Pe(" Acessar conta ",-1))],8,Jye)])],32)])):c.value==="two_factor"?($(),L("div",Zye,[O[15]||(O[15]=l("div",{class:"text-center mb-4"},[l("h4",{class:"text-white"},"Autenticação de dois fatores"),l("p",{class:"text-muted"},"Digite o código de 6 dÃgitos enviado para seu e-mail.")],-1)),o.value?($(),L("div",e0e,pe(o.value),1)):xe("",!0),l("form",{onSubmit:St(I,["prevent"])},[l("div",t0e,[($(!0),L(Ze,null,At(h.value,(te,B)=>_t(($(),L("input",{key:B,type:"text",class:"form-control text-center fs-4 p-2",maxlength:"1","onUpdate:modelValue":z=>h.value[B]=z,onInput:z=>D(z,B),onKeydown:es(z=>F(z,B),["delete"]),onPaste:C,ref_for:!0,ref_key:"codeInputs",ref:f,style:{height:"60px"},inputmode:"numeric"},null,40,s0e)),[[Xs,h.value[B]]])),128))]),l("div",n0e,[l("button",{type:"button",class:"btn btn-link text-muted p-0",onClick:O[3]||(O[3]=te=>c.value="login")},[...O[13]||(O[13]=[l("i",{class:"bi bi-arrow-left"},null,-1),Pe(" Voltar ",-1)])]),l("button",{type:"submit",class:"btn btn-primary",disabled:r.value||!x.value},[r.value?($(),L("span",r0e)):xe("",!0),O[14]||(O[14]=Pe(" Verificar Código ",-1))],8,i0e)])],32)])):xe("",!0)])]),O[17]||(O[17]=l("div",{class:"col-lg-6 p-0 position-fixed end-0 top-0 h-100 d-none d-lg-flex text-white align-items-center",style:{background:"var(--gradient-primary)"}},[l("div",{class:"col-8 text-center"},[l("a",{href:"/"},[l("img",{src:"/assets/images/mockup-desktop-mobile.png",alt:"Kativo",class:"img-fluid",style:{"margin-left":"0","padding-left":"0",width:"100%"}})])])],-1))])])}}},o0e=ls(a0e,[["__scopeId","data-v-f6c52783"]]),l0e={class:"container-fluid bg-dark"},u0e={class:"row min-vh-100"},c0e={class:"col-lg-6 d-flex justify-content-center align-items-center"},d0e={class:"col-lg-6 mx-auto"},h0e={key:0,href:"/auth/google",class:"btn btn-danger w-100 mb-4"},f0e={key:1,class:"text-center mb-4"},p0e={key:2,class:"alert alert-danger"},m0e={class:"mb-0"},g0e={class:"input-group"},v0e={class:"form-floating"},b0e={class:"input-group mt-4"},y0e={class:"form-floating"},_0e={key:0,class:"input-group mt-4"},x0e={class:"form-floating"},w0e={key:1,class:"input-group mt-4"},E0e={class:"form-floating"},S0e=["value"],k0e={class:"input-group mt-4"},C0e={class:"form-floating position-relative"},T0e=["type"],A0e={class:"input-group mt-4"},O0e={class:"form-floating position-relative"},D0e=["type"],P0e={class:"form-check mt-4"},$0e={class:"form-check"},I0e={class:"d-flex justify-content-between mt-4"},M0e={class:"d-flex justify-content-end mt-4"},N0e=["disabled"],L0e={key:0,class:"spinner-border spinner-border-sm me-2"},R0e={__name:"RegisterPage",setup(t){const e=gi(),s=Af(),n=tn(),i=ve({name:"",email:"",whatsapp:"",password:"",password_confirmation:"",terms:!1,privacy:!1}),o=ve(!1),r=ve(!1),c=ve([]),h=ve(!1),f=ve(s.query.invitation_token||null),v=ve(null);Pt(v,P=>{P&&(i.value.email=P)}),Xt(async()=>
60{if(f.value)try{const P=await axios.get(`/api/invitations/${f.value}`);P.data.success&&P.data.invitation&&(v.value=P.data.invitation.email)}catch(P){console.error("Erro ao carregar convite:",P),c.value=["Convite inválido ou expirado"]}s.query.email&&(i.value.email=s.query.email)});function g(){o.value=!o.value}function y(){r.value=!r.value}function x(P){let I=P.target.value.replace(/\D/g,"");I.length>10?I=I.replace(/(\d{2})(\d{5})(\d{4})/,"($1) $2-$3"):I.length>5?I=I.replace(/(\d{2})(\d{4})(\d{4})/,"($1) $2-$3"):I.length>2?I=I.replace(/(\d{2})(\d{0,5})/,"($1) $2"):I=I.replace(/(\d{0,2})/,"($1"),i.value.whatsapp=I,P.target.value=I}async function E(){var P,I,D,F;c.value=[],h.value=!0;try{const C={...i.value};f.value&&(C.invitation_token=f.value);const A=await axios.post("/register",C);await n.getUser(),typeof window<"u"&&window.fbq&&(window.fbq("track","CompleteRegistration"),window.fbq("track","Lead")),setTimeout(()=>{e.push("/dashboard")},400)}catch(C){if((I=(P=C.response)==null?void 0:P.data)!=null&&I.errors){const A=[];for(const O in C.response.data.errors)A.push(...C.response.data.errors[O]);c.value=A}else(F=(D=C.response)==null?void 0:D.data)!=null&&F.message?c.value=[C.response.data.message]:c.value=["Erro ao criar conta. Tente novamente."];h.value=!1}}return(P,I)=>{const D=ur("router-link");return $(),L("div",l0e,[l("div",u0e,[l("div",c0e,[l("div",d0e,[I[25]||(I[25]=l("div",{class:"p-4 text-center"},[l("a",{href:"/"},[l("img",{src:"/assets/images/logo.png",alt:"Kativo",style:{"margin-bottom":"1rem",width:"112px"}})])],-1)),f.value?xe("",!0):($(),L("a",h0e,[...I[8]||(I[8]=[l("i",{class:"bi bi-google"},null,-1),Pe(" Entrar com Google ",-1)])])),f.value?xe("",!0):($(),L("div",f0e,"OU")),c.value.length?($(),L("div",p0e,[l("ul",m0e,[($(!0),L(Ze,null,At(c.value,(F,C)=>($(),L("li",{key:C},pe(F),1))),128))])])):xe("",!0),l("form",{onSubmit:St(E,["prevent"])},[l("div",g0e,[I[10]||(I[10]=l("span",{class:"input-group-text"},[l("i",{class:"bi bi-person-fill"})],-1)),l("div",v0e,[_t(l("input",{type:"text","onUpdate:modelValue":I[0]||(I[0]=F=>i.value.name=F),class:"form-control",id:"name",placeholder:"Nome Completo",required:""},null,512),[[Xs,i.value.name]]),I[9]||(I[9]=l("label",{for:"name"},"Nome Completo",-1))])]),l("div",b0e,[I[12]||(I[12]=l("span",{class:"input-group-text"},[l("i",{class:"bi bi-whatsapp"})],-1)),l("div",y0e,[_t(l("input",{type:"text","onUpdate:modelValue":I[1]||(I[1]=F=>i.value.whatsapp=F),onInput:x,class:"form-control",id:"whatsapp",placeholder:"WhatsApp",maxlength:"15",required:""},null,544),[[Xs,i.value.whatsapp]]),I[11]||(I[11]=l("label",{for:"whatsapp"},"WhatsApp",-1))])]),v.value?xe("",!0):($(),L("div",_0e,[I[14]||(I[14]=l("span",{class:"input-group-text"},[l("i",{class:"bi bi-at"})],-1)),l("div",x0e,[_t(l("input",{type:"email","onUpdate:modelValue":I[2]||(I[2]=F=>i.value.email=F),class:"form-control",id:"email",placeholder:"Email",required:""},null,512),[[Xs,i.value.email]]),I[13]||(I[13]=l("label",{for:"email"},"Email",-1))])])),v.value?($(),L("div",w0e,[I[16]||(I[16]=l("span",{class:"input-group-text"},[l("i",{class:"bi bi-at"})],-1)),l("div",E0e,[l("input",{type:"text",value:v.value,class:"form-control",placeholder:"Email",disabled:""},null,8,S0e),I[15]||(I[15]=l("label",null,"Email",-1)),_t(l("input",{type:"hidden","onUpdate:modelValue":I[3]||(I[3]=F=>i.value.email=F)},null,512),[[Xs,i.value.email]])])])):xe("",!0),l("div",k0e,[I[18]||(I[18]=l("span",{class:"input-group-text"},[l("i",{class:"bi bi-key-fill"})],-1)),l("div",C0e,[_t(l("input",{type:o.value?"text":"password","onUpdate:modelValue":I[4]||(I[4]=F=>i.value.password=F),class:"form-control",id:"password",placeholder:"Senha",required:""},null,8,T0e),[[Kh,i.value.password]]),I[17]||(I[17]=l("label",{for:"password"},"Senha",-1)),l("button",{type:"button",class:"btn btn-link position-absolute end-0 top-50 translate-middle-y me-2 p-0",onClick:g,tabindex:"-1"},[l("i",{class:Me(o.value?"bi bi-eye-slash":"bi bi-eye")},null,2)])])]),l("div",A0e,[I[20]||(I[20]=l("span",{class:"input-group-text"},[l("i",{class:"bi bi-key-fill"})],-1)),l("div",O0e,[_t(l("input",{type:r.value?"text":"password","onUpdate:modelValue":I[5]||(I[5]=
60F=>i.value.password_confirmation=F),class:"form-control",id:"confirm_password",placeholder:"Confirmar Senha",required:""},null,8,D0e),[[Kh,i.value.password_confirmation]]),I[19]||(I[19]=l("label",{for:"confirm_password"},"Confirmar Senha",-1)),l("button",{type:"button",class:"btn btn-link position-absolute end-0 top-50 translate-middle-y me-2 p-0",onClick:y,tabindex:"-1"},[l("i",{class:Me(r.value?"bi bi-eye-slash":"bi bi-eye")},null,2)])])]),l("div",P0e,[_t(l("input",{class:"form-check-input",type:"checkbox","onUpdate:modelValue":I[6]||(I[6]=F=>i.value.terms=F),id:"terms",required:""},null,512),[[kr,i.value.terms]]),I[21]||(I[21]=l("label",{class:"form-check-label",for:"terms"}," Li e concordo com os termos de uso. ",-1))]),l("div",$0e,[_t(l("input",{class:"form-check-input",type:"checkbox","onUpdate:modelValue":I[7]||(I[7]=F=>i.value.privacy=F),id:"privacy",required:""},null,512),[[kr,i.value.privacy]]),I[22]||(I[22]=l("label",{class:"form-check-label",for:"privacy"}," Li e concordo com a polÃtica de privacidade. ",-1))]),l("div",I0e,[et(D,{to:"/login"},{default:vt(()=>[...I[23]||(I[23]=[Pe("Já tenho conta",-1)])]),_:1})]),l("div",M0e,[l("button",{type:"submit",class:"btn btn-secondary btn-block",disabled:h.value},[h.value?($(),L("span",L0e)):xe("",!0),I[24]||(I[24]=Pe(" Criar conta ",-1))],8,N0e)])],32),I[26]||(I[26]=l("footer",{class:"text-center text-muted mt-5 mb-4"},[l("small",null,[l("a",{href:"https://www.kativo.com.br/termos-de-uso",target:"_blank",style:{color:"#999"}},"Termos de uso"),l("span",{class:"d-inline-block mx-2"},"â¢"),l("a",{href:"https://www.kativo.com.br/politica-de-privacidade",target:"_blank",style:{color:"#999"}},"PolÃtica de Privacidade")])],-1))])]),I[27]||(I[27]=l("div",{class:"col-lg-6 p-0 position-fixed end-0 top-0 h-100 d-none d-lg-flex text-white align-items-center",style:{background:"var(--gradient-primary)"}},[l("div",{class:"col-8 text-center"},[l("a",{href:"/"},[l("img",{src:"/assets/images/mockup-desktop-mobile.png",alt:"Kativo",class:"img-fluid",style:{"margin-left":"0","padding-left":"0",width:"100%"}})])])],-1))])])}}},F0e=ls(R0e,[["__scopeId","data-v-f4d230f7"]]),V0e=[{path:"/",redirect:"/dashboard"},{path:"/dashboard",name:"dashboard",component:Mye,meta:{requiresAuth:!0}},{path:"/b3",name:"b3",component:()=>cs(()=>import("./B3SyncPage-D3aW1iIO.js"),__vite__mapDeps([0,1])),meta:{requiresAuth:!0,requiresPro:!0}},{path:"/trades",name:"trades",component:()=>cs(()=>import("./TradesPage-BIDTvZS2.js"),__vite__mapDeps([2,3])),meta:{requiresAuth:!0}},{path:"/earnings",name:"earnings",component:()=>cs(()=>import("./EarningsPage-D1LTzokk.js"),__vite__mapDeps([4,5])),meta:{requiresAuth:!0}},{path:"/performance",name:"performance",component:()=>cs(()=>import("./PerformancePage-CytAnXj5.js"),__vite__mapDeps([6,7])),meta:{requiresAuth:!0,requiresPro:!0}},{path:"/taxes",name:"taxes",component:()=>cs(()=>import("./TaxPage-BtPK3RmI.js"),__vite__mapDeps([8,9])),meta:{requiresAuth:!0,requiresPro:!0}},{path:"/annual-tax",name:"annual-tax",component:()=>cs(()=>import("./AnnualTaxAdjustmentPage-DdP5GVVr.js"),__vite__mapDeps([10,11])),meta:{requiresAuth:!0,requiresPro:!0}},{path:"/watchlist",name:"watchlist",component:()=>cs(()=>import("./WatchlistPage-CZ-gfn4j.js"),__vite__mapDeps([12,13])),meta:{requiresAuth:!0,requiresPro:!0}},{path:"/goals",name:"goals",component:()=>cs(()=>import("./GoalsPage-DHl425qb.js"),__vite__mapDeps([14,15])),meta:{requiresAuth:!0,requiresPro:!0}},{path:"/community",name:"community",component:()=>cs(()=>import("./CommunityPage-B53M-UOf.js"),__vite__mapDeps([16,17,18,19])),meta:{requiresAuth:!0}},{path:"/community/profile/:userId",name:"community-profile",component:()=>cs(()=>import("./CommunityProfilePage-CrjGKi1P.js"),__vite__mapDeps([20,17,18,21])),meta:{requiresAuth:!0},props:!0},{path:"/opportunities",name:"opportunities",component:()=>cs(()=>import("./OpportunitiesPage-CeAub6Hs.js"),__vite__mapDeps([22,23])),meta:{requiresAuth:!0,requiresPro:!0}}
60,{path:"/login",name:"login",component:o0e,meta:{hideLayout:!0}},{path:"/register",name:"register",component:F0e,meta:{hideLayout:!0}},{path:"/forgot-password",name:"forgot-password",component:()=>cs(()=>import("./ForgotPasswordPage-D0yuZvIj.js"),__vite__mapDeps([24,25])),meta:{hideLayout:!0}},{path:"/reset-password/:token",name:"reset-password",component:()=>cs(()=>import("./ResetPasswordPage-CjBCbK0h.js"),__vite__mapDeps([26,27])),meta:{hideLayout:!0},props:!0},{path:"/my-account",name:"my-account",component:()=>cs(()=>import("./MyAccountPage-D5TaAajb.js"),__vite__mapDeps([28,29])),meta:{requiresAuth:!0}},{path:"/my-account/plans",name:"my-account-plans",component:()=>cs(()=>import("./MyAccountPlansPage-BWVRyF4J.js"),__vite__mapDeps([30,31])),meta:{requiresAuth:!0}},{path:"/courses",name:"courses",component:()=>cs(()=>import("./CoursesPage-Beje5hVn.js"),__vite__mapDeps([32,33,34])),meta:{requiresAuth:!0}},{path:"/courses/:slug",name:"course-detail",component:()=>cs(()=>import("./CourseDetailPage-_jY2Q8m9.js"),__vite__mapDeps([35,36])),meta:{requiresAuth:!0},props:!0},{path:"/my-courses",name:"my-courses",component:()=>cs(()=>import("./MyCoursesPage-D6RZ_4Wj.js"),__vite__mapDeps([37,38])),meta:{requiresAuth:!0}},{path:"/course/:courseSlug/lesson/:lessonSlug",name:"course-lesson",component:()=>cs(()=>import("./CourseLessonPage-Bv6hj87X.js"),__vite__mapDeps([39,40])),meta:{requiresAuth:!0},props:!0},{path:"/certificates",name:"certificates",component:()=>cs(()=>import("./CertificatesPage-C-9V50dS.js"),__vite__mapDeps([41,42])),meta:{requiresAuth:!0}},{path:"/achievements",name:"achievements",component:()=>cs(()=>import("./AchievementsPage-BGqPdi-7.js"),__vite__mapDeps([43,44])),meta:{requiresAuth:!0}},{path:"/admin/users",name:"admin-users",component:()=>cs(()=>import("./AdminUsersPage-8G_ZBkPt.js"),__vite__mapDeps([45,33,46])),meta:{requiresAuth:!0,requiresAdmin:!0}},{path:"/admin/whatsapp",name:"admin-whatsapp",component:()=>cs(()=>import("./AdminWhatsappPage-BmFDHxaR.js"),__vite__mapDeps([47,48])),meta:{requiresAuth:!0,requiresAdmin:!0}},{path:"/admin/helpdesk",name:"admin-helpdesk",component:()=>cs(()=>import("./AdminHelpdeskPage-DJ6nXo0d.js"),__vite__mapDeps([49,50])),meta:{requiresAuth:!0,requiresAdmin:!0}},{path:"/admin/courses",name:"admin-courses",component:()=>cs(()=>import("./AdminCoursesPage-Cd3nb2k2.js"),__vite__mapDeps([51,33,52])),meta:{requiresAuth:!0,requiresAdmin:!0}},{path:"/admin/courses/create",name:"admin-course-create",component:()=>cs(()=>import("./AdminCourseCreatePage-BcRj-X5I.js"),__vite__mapDeps([53,54,55])),meta:{requiresAuth:!0,requiresAdmin:!0}},{path:"/admin/courses/:id/edit",name:"admin-course-edit",component:()=>cs(()=>import("./AdminCourseEditPage-CsgacHBm.js"),__vite__mapDeps([56,54,57])),meta:{requiresAuth:!0,requiresAdmin:!0},props:!0},{path:"/admin/courses/:id",name:"admin-course-detail",component:()=>cs(()=>import("./AdminCourseDetailPage-CICXDlu-.js"),__vite__mapDeps([58,59])),meta:{requiresAuth:!0,requiresAdmin:!0},props:!0},{path:"/admin/courses/:courseId/modules",name:"admin-course-modules",component:()=>cs(()=>import("./AdminCourseModulesPage-BtM6iAHc.js"),__vite__mapDeps([60,61])),meta:{requiresAuth:!0,requiresAdmin:!0},props:!0},{path:"/admin/courses/:courseId/statistics",name:"admin-course-stats",component:()=>cs(()=>import("./AdminCourseStatsPage-CH8tyunS.js"),__vite__mapDeps([62,63])),meta:{requiresAuth:!0,requiresAdmin:!0},props:!0},{path:"/admin/comments",name:"admin-comments",component:()=>cs(()=>import("./AdminCommentsPage-C2iCN3SL.js"),__vite__mapDeps([64,33,65])),meta:{requiresAuth:!0,requiresAdmin:!0}},{path:"/admin/courses/:courseId/modules/:moduleId/lessons/create",name:"admin-lesson-create",component:()=>cs(()=>import("./AdminLessonCreatePage-DpB8g1e4.js"),__vite__mapDeps([66,54,67])),meta:{requiresAuth:!0,requiresAdmin:!0},props:!0},{path:"/admin/courses/:courseId/lessons/:lessonId/edit",name:"admin-lesson-edit",component:()=>cs(()=>import("./AdminLessonEditPage-Cb2q-FC6.js"),__vite__mapDeps([68,54,69])),meta:{requiresAuth:!0,requiresAdmin:!0},props:!0},{path:"/admin/courses/:courseId/modules/:moduleId",name:"admin-module-detail",component:()=>cs(()=>import("./AdminModuleDetailPage-LIa7zts-.js"),__vite__mapDeps([70,71])),meta:{requiresAuth:!0,requiresAdmin:!0},props:!0},{path:"/admin/courses/:courseId/enrollments",name:"admin-course-enrollments",component:()=>cs(()=>import("./AdminCourseEnrollmentsPage-DaYoM_zF.js"),__vite__mapDeps([72,33,73])),meta:{requiresAuth:!0,requiresAdmin:!0},props:!0},{path:"/admin/newsletter",name:"admin-newsletter",component:()=>cs(()=>import("./AdminNewsletterPage-CqB9yMwf.js"),__vite__mapDeps([74,75,33,76])),meta:{requiresAuth:!0,requiresAdmin:!0}},{path:"/admin/newsletter/campaigns/create",name:"admin-newsletter-campaign-create",component:()=>cs(()=>import("./AdminNewsletterCampaignCreatePage-BoyFK_XV.js"),__vite__mapDeps([77,75,78,54,79])),meta:{requiresAuth:!0,requiresAdmin:!0}},{path:"/admin/newsletter/campaigns/:id/edit",name:"admin-newsletter-campaign-edit",component:()=>cs(()=>import("./AdminNewsletterCampaignEditPage-BIiy4G2p.js"),__vite__mapDeps([80,75,78,54,81])),meta:{requiresAuth:!0,requiresAdmin:!0},props:!0},{path:"/admin/newsletter/contacts/create",name:"admin-newsletter-contact-create",component:()=>cs(()=>import("./AdminNewsletterContactCreatePage-C-qEOzlJ.js"),__vite__mapDeps([82,75])),meta:{requiresAuth:!0,requiresAdmin:!0}},{path:"/:pathMatch(.*)*",redirect:"/dashboard"}],$f=Dj({history:uj(),routes:V0e,scrollBehavior(t,e,s){return s||(t.hash?{el:t.hash,behavior:"smooth"}:{top:0,behavior:"smooth"})}});$f.beforeEach(async(t,e,s)=>{var o,r,c;const n=tn(),i=In();i.startLoading(!0);try{if(t.meta.requiresAuth){if(await n.getUser(),!n.isAuthenticated)return s({name:"login"});if(t.meta.requiresAdmin&&((o=n.user)==null?void 0:o.role)!=="Admin")return s({name:"dashboard"});if(t.meta.requiresPro&&!n.hasProAccess)return s({name:"my-account-plans"});if(t.meta.hideLayout||await pi().ensureActivePortfolio(),t.name==="dashboard"&&((r=n.user)==null?void 0:r.role)==="Admin"&&(e.name==="login"||e.name===void 0))return s({name:"admin-helpdesk"});if(t.matched.some(h=>h.path.startsWith("/courses"))&&!t.matched.some(h=>h.path.startsWith("/admin"))){if(t.name==="courses"||t.name==="course-detail")return s();if(t.meta.requiresPro&&!n.hasProAccess)return s({name:"my-account-plans"})}}return(t.name==="login"||t.name==="register")&&n.isAuthenticated?((c=n.user)==null?void 0:c.role)==="Admin"?s({name:"admin-helpdesk"}):s({name:"dashboard"}):s()}catch(h){return console.error("Erro no beforeEach router:",h),i.stopLoading(),s(!1)}});$f.afterEach(()=>{const t=In(),e=Mn();e.stack.length>0&&e.close(),t.stopLoading()});$f.onError((t,e)=>{In().stopLoading(),console.error("Router onError capturado:",t),(t.name==="ChunkLoadError"||t.message&&t.message.includes("Failed to fetch dynamically imported module")||t.message&&t.message.includes("Importing a module script failed"))&&(console.warn("ð Nova versão do sistema ou instabilidade de cache detectada. Recarregando a página..."),window.location.href=e.fullPath)});var km={exports:{}},B0e=km.exports,aC;function AD(){return aC||(aC=1,(function(t,e){(function(s,n){s._Highcharts=n(),t.exports=s._Highcharts})(typeof window>"u"?B0e:window,()=>(()=>{var oE;let s,n;var i,o,r,c,h,f,v,g,y,x,E,P,I,D,F,C,A,O,j={};j.d=(k,a)=>{for(var u in a)j.o(a,u)&&!j.o(k,u)&&Object.defineProperty(k,u,{enumerable:!0,get:a[u]})},j.o=(k,a)=>Object.prototype.hasOwnProperty.call(k,a);var te={};j.d(te,{default:()=>BN}),(function(k){var a,u,d,p,m,b,_;k.SVG_NS="http://www.w3.org/2000/svg",k.product="Highcharts",k.version="12.4.0",k.win=typeof window<"u"?window:{},k.doc=k.win.document,k.svg=!!((d=(u=(a=k.doc)==null?void 0:a.createElementNS)==null?void 0:u.call(a,k.SVG_NS,"svg"))!=null&&d.createSVGRect),k.pageLang=(b=(m=(p=k.doc)==null?void 0:p.documentElement)==null?void 0:m.closest("[lang]"))==null?void 0:b.lang,k.userAgent=((_=k.win.navigator)==null?void 0:_.userAgent)||"",k.isChrome=k.win.chrome,k.isFirefox=k.userAgent.indexOf("Firefox")!==-1,k.isMS=/(edge|msie|trident)/i.test(k.userAgent)&&!k.win.opera,k.isSafari=!k.isChrome&&k.userAgent.indexOf("Safari")!==-1,k.isTouchDevice=/(Mobile|Android|Windows Phone)/.test(k.userAgent),k.isWebKit=k.userAgent.indexOf("AppleWebKit")!==-1,k.deg2rad=2*Math.PI/360,k.marginNames=["plotTop","marginRight","marginBottom","plotLeft"],k.noop=function(){},k.supportsPassiveEvents=(function(){let w=!1;if(!k.isMS){let S=Object.defineProperty({},"passive",{get:function(){w=!0}});k.win.addEventListener&&k.win.removeEventListener&&(k.win.addEventListener("testPassive",k.noop,S),k.win.removeEventListener("testPassive",k.noop,S))}return w})(),k.charts=[],k.composed=[],k.dateFormats={},k.seriesTypes={},k.symbolSizes={},k.chartCount=0})(i||(i={}));let B=i,{charts:z,doc:re,win:ne}=B;function X(k,a,u,d){let p=a?"Highcharts error":"Highcharts warning";k===32&&(k=`${p}: Deprecated member`);let m=q(k),b=m?`${p} #${k}: www.highcharts.com/errors/${k}/`:k.toString();if(d!==void 0){let _="";m&&(b+="?"),Re(d,function(w,S){_+=` 61 - ${S}: ${w}`,m&&(b+=encodeURI(S)+"="+encodeURI(w))}),b+=_}Be(B,"displayError",{chart:u,code:k,message:b,params:d},function(){if(a)throw Error(b);ne.console&&X.messages.indexOf(b)===-1&&console.warn(b)}),X.messages.push(b)}function G(k,a){return parseInt(k,a||10)}function ce(k){return typeof k=="string"}function be(k){let a=Object.prototype.toString.call(k);return a==="[object Array]"||a==="[object Array Iterator]"}function J(k,a){return!!k&&typeof k=="object"&&(!a||!be(k))}function Z(k){return J(k)&&typeof k.nodeType=="number"}function ge(k){let a=k==null?void 0:k.constructor;return!!(J(k,!0)&&!Z(k)&&(a!=null&&a.name)&&a.name!=="Object")}function q(k){return typeof k=="number"&&!isNaN(k)&&k<1/0&&k>-1/0}function W(k){return k!=null}function M(k,a,u){let d,p=ce(a)&&!W(u),m=(b,_)=>{W(b)?k.setAttribute(_,b):p?(d=k.getAttribute(_))||_!=="class"||(d=k.getAttribute(_+"Name")):k.removeAttribute(_)};return ce(a)?m(u,a):Re(a,m),d}function he(k){return be(k)?k:[k]}function oe(k,a){let u;for(u in k||(k={}),a)k[u]=a[u];return k}function K(){let k=arguments,a=k.length;for(let u=0;u<a;u++){let d=k[u];if(d!=null)return d}}function H(k,a){oe(k.style,a)}function Ee(k){return Math.pow(10,Math.floor(Math.log(k)/Math.LN10))}function _e(k,a){return k>1e14?k:parseFloat(k.toPrecision(a||14))}(X||(X={})).messages=[],Math.easeInOutSine=function(k){return-.5*(Math.cos(Math.PI*k)-1)};let Ce=Array.prototype.find?function(k,a){return k.find(a)}:function(k,a){let u,d=k.length;for(u=0;
vendor: 65,766 bytes, line 61
61u<d;u++)if(a(k[u],u))return k[u]};function Re(k,a,u){for(let d in k)Object.hasOwnProperty.call(k,d)&&a.call(u||k[d],k[d],d,k)}function Ke(k,a,u){function d(b,_){let w=k.removeEventListener;w&&w.call(k,b,_,!1)}function p(b){let _,w;k.nodeName&&(a?(_={})[a]=!0:_=b,Re(_,function(S,N){if(b[N])for(w=b[N].length;w--;)d(N,b[N][w].fn)}))}let m=typeof k=="function"&&k.prototype||k;if(Object.hasOwnProperty.call(m,"hcEvents")){let b=m.hcEvents;if(a){let _=b[a]||[];u?(b[a]=_.filter(function(w){return u!==w.fn}),d(a,u)):(p(b),b[a]=[])}else p(b),delete m.hcEvents}}function Be(k,a,u,d){if(u=u||{},(re==null?void 0:re.createEvent)&&(k.dispatchEvent||k.fireEvent&&k!==B)){let p=re.createEvent("Events");p.initEvent(a,!0,!0),u=oe(p,u),k.dispatchEvent?k.dispatchEvent(u):k.fireEvent(a,u)}else if(k.hcEvents){u.target||oe(u,{preventDefault:function(){u.defaultPrevented=!0},target:k,type:a});let p=[],m=k,b=!1;for(;m.hcEvents;)Object.hasOwnProperty.call(m,"hcEvents")&&m.hcEvents[a]&&(p.length&&(b=!0),p.unshift.apply(p,m.hcEvents[a])),m=Object.getPrototypeOf(m);b&&p.sort((_,w)=>_.order-w.order),p.forEach(_=>{_.fn.call(k,u)===!1&&u.preventDefault()})}d&&!u.defaultPrevented&&d.call(k,u)}let Te=(function(){let k=Math.random().toString(36).substring(2,9)+"-",a=0;return function(){return"highcharts-"+(s?"":k)+a++}})();ne.jQuery&&(ne.jQuery.fn.highcharts=function(){let k=[].slice.call(arguments);if(this[0])return k[0]?(new B[ce(k[0])?k.shift():"Chart"](this[0],k[0],k[1]),this):z[M(this[0],"data-highcharts-chart")]});let Q={addEvent:function(k,a,u,d={}){let p=typeof k=="function"&&k.prototype||k;Object.hasOwnProperty.call(p,"hcEvents")||(p.hcEvents={});let m=p.hcEvents;B.Point&&k instanceof B.Point&&k.series&&k.series.chart&&(k.series.chart.runTrackerClick=!0);let b=k.addEventListener;b&&b.call(k,a,u,!!B.supportsPassiveEvents&&{passive:d.passive===void 0?a.indexOf("touch")!==-1:d.passive,capture:!1}),m[a]||(m[a]=[]);let _={fn:u,order:typeof d.order=="number"?d.order:1/0};return m[a].push(_),m[a].sort((w,S)=>w.order-S.order),function(){Ke(k,a,u)}},arrayMax:function(k){let a=k.length,u=k[0];for(;a--;)k[a]>u&&(u=k[a]);return u},arrayMin:function(k){let a=k.length,u=k[0];for(;a--;)k[a]<u&&(u=k[a]);return u},attr:M,clamp:function(k,a,u){return k>a?k<u?k:u:a},clearTimeout:function(k){W(k)&&clearTimeout(k)},correctFloat:_e,createElement:function(k,a,u,d,p){let m=re.createElement(k);return a&&oe(m,a),p&&H(m,{padding:"0",border:"none",margin:"0"}),u&&H(m,u),d&&d.appendChild(m),m},crisp:function(k,a=0,u){let d=a%2/2,p=u?-1:1;return(Math.round(k*p-d)+d)*p},css:H,defined:W,destroyObjectProperties:function(k,a,u){Re(k,function(d,p){d!==a&&(d!=null&&d.destroy)&&d.destroy(),(d!=null&&d.destroy||!u)&&delete k[p]})},diffObjects:function(k,a,u,d){let p={};return(function m(b,_,w,S){let N=u?_:b;Re(b,function(T,U){if(!S&&d&&d.indexOf(U)>-1&&_[U]){T=he(T),w[U]=[];for(let Y=0;Y<Math.max(T.length,_[U].length);Y++)_[U][Y]&&(T[Y]===void 0?w[U][Y]=_[U][Y]:(w[U][Y]={},m(T[Y],_[U][Y],w[U][Y],S+1)))}else J(T,!0)&&!T.nodeType?(w[U]=be(T)?[]:{},m(T,_[U]||{},w[U],S+1),Object.keys(w[U]).length===0&&(U!=="colorAxis"||S!==0)&&delete w[U]):(b[U]!==_[U]||U in b&&!(U in _))&&U!=="__proto__"&&U!=="constructor"&&(w[U]=N[U])})})(k,a,p,0),p},discardElement:function(k){var a;(a=k==null?void 0:k.parentElement)==null||a.removeChild(k)},erase:function(k,a){let u=k.length;for(;u--;)if(k[u]===a){k.splice(u,1);break}},error:X,extend:oe,extendClass:function(k,a){let u=function(){};return u.prototype=new k,oe(u.prototype,a),u},find:Ce,fireEvent:Be,getAlignFactor:(k="")=>({center:.5,right:1,middle:.5,bottom:1})[k]||0,getClosestDistance:function(k,a){let u,d,p,m=!a;return k.forEach(b=>{if(b.length>1)for(p=b.length-1;p>0;p--)(d=b[p]-b[p-1])<0&&!m?(a==null||a(),a=void 0):d&&(u===void 0||d<u)&&(u=d)}),u},getMagnitude:Ee,getNestedProperty:function(k,a){let u=k.split(".");for(;u.length&&W(a);){let d=u.shift();if(d===void 0||d==="__proto__")return;if(d==="this"){let m;return J(a)&&(m=a["@this"]),m??a}let p=a[d.replace(/[\\'"]/g,"")];if(!W(p)||typeof p=="function"||typeof p.nodeType=="number"||p===ne)return;a=p}return a},getStyle:function k(a,u,d){var b;let p;if(u==="width"){let _=Math.min(a.offsetWidth,a.scrollWidth),w=(b=a.getBoundingClientRect)==null?void 0:b.call(a).width;return w<_&&w>=_-1&&(_=Math.floor(w)),Math.max(0,_-(k(a,"padding-left",!0)||0)-(k(a,"padding-right",!0)||0))}if(u==="height")return Math.max(0,Math.min(a.offsetHeight,a.scrollHeight)-(k(a,"padding-top",!0)||0)-(k(a,"padding-bottom",!0)||0));let m=ne.getComputedStyle(a,void 0);return m&&(p=m.getPropertyValue(u),K(d,u!=="opacity")&&(p=G(p))),p},insertItem:function(k,a){let u,d=k.options.index,p=a.length;for(u=k.options.isInternal?p:0;u<p+1;u++)if(!a[u]||q(d)&&d<K(a[u].options.index,a[u]._i)||a[u].options.isInternal){a.splice(u,0,k);break}return u},isArray:be,isClass:ge,isDOMElement:Z,isFunction:function(k){return typeof k=="function"},isNumber:q,isObject:J,isString:ce,merge:function(k,...a){let u,d=[k,...a],p={},m=function(_,w){return typeof _!="object"&&(_={}),Re(w,function(S,N){N!=="__proto__"&&N!=="constructor"&&(!J(S,!0)||ge(S)||Z(S)?_[N]=w[N]:_[N]=m(_[N]||{},S))}),_};k===!0&&(p=d[1],d=Array.prototype.slice.call(d,2));let b=d.length;for(u=0;u<b;u++)p=m(p,d[u]);return p},normalizeTickInterval:function(k,a,u,d,p){let m,b=k;u=K(u,Ee(k));let _=k/u;for(!a&&(a=p?[1,1.2,1.5,2,2.5,3,4,5,6,8,10]:[1,2,2.5,5,10],d===!1&&(u===1?a=a.filter(function(w){return w%1==0}):u<=.1&&(a=[1/u]))),m=0;m<a.length&&(b=a[m],(!p||!(b*u>=k))&&(p||!(_<=(a[m]+(a[m+1]||a[m]))/2)));m++);return _e(b*u,-Math.round(Math.log(.001)/Math.LN10))},objectEach:Re,offset:function(k){let a=re.documentElement,u=k.parentElement||k.parentNode?k.getBoundingClientRect():{top:0,left:0,width:0,height:0};return{top:u.top+(ne.pageYOffset||a.scrollTop)-(a.clientTop||0),left:u.left+(ne.pageXOffset||a.scrollLeft)-(a.clientLeft||0),width:u.width,height:u.height}},pad:function(k,a,u){return Array((a||2)+1-String(k).replace("-","").length).join(u||"0")+k},pick:K,pInt:G,pushUnique:function(k,a){return 0>k.indexOf(a)&&!!k.push(a)},relativeLength:function(k,a,u){return/%$/.test(k)?a*parseFloat(k)/100+(u||0):parseFloat(k)},removeEvent:Ke,replaceNested:function(k,...a){let u,d;do for(d of(u=k,a))k=k.replace(d[0],d[1]);while(k!==u);return k},splat:he,stableSort:function(k,a){let u,d,p=k.length;for(d=0;d<p;d++)k[d].safeI=d;for(k.sort(function(m,b){return(u=a(m,b))===0?m.safeI-b.safeI:u}),d=0;d<p;d++)delete k[d].safeI},syncTimeout:function(k,a,u){return a>0?setTimeout(k,a,u):(k.call(0,u),-1)},timeUnits:{millisecond:1,second:1e3,minute:6e4,hour:36e5,day:864e5,week:6048e5,month:24192e5,year:314496e5},ucfirst:function(k){return ce(k)?k.substring(0,1).toUpperCase()+k.substring(1):String(k)},uniqueKey:Te,useSerialIds:function(k){return s=K(k,s)},wrap:function(k,a,u){let d=k[a];k[a]=function(){let p=arguments,m=this;return u.apply(this,[function(){return d.apply(m,arguments.length?arguments:p)}].concat([].slice.call(arguments)))}}},{pageLang:Se,win:Ve}=B,{defined:Qe,error:je,extend:nt,isNumber:ft,isObject:ut,isString:Ye,merge:We,objectEach:ot,pad:ht,splat:Tt,timeUnits:Ot,ucfirst:zt}=Q,Kt=B.isSafari&&Ve.Intl&&!Ve.Intl.DateTimeFormat.prototype.formatRange,Fe=k=>k.main===void 0,ee=class{constructor(k,a){this.options={timezone:"UTC"},this.variableTimezone=!1,this.Date=Ve.Date,this.update(k),this.lang=a}update(k={}){this.dTLCache={},this.options=k=We(!0,this.options,k);let{timezoneOffset:a,useUTC:u,locale:d}=k;this.Date=k.Date||Ve.Date||Date;let p=k.timezone;Qe(u)&&(p=u?"UTC":void 0),a&&a%60==0&&(p="Etc/GMT"+(a>0?"+":"")+a/60),this.variableTimezone=p!=="UTC"&&(p==null?void 0:p.indexOf("Etc/GMT"))!==0,this.timezone=p,this.lang&&d&&(this.lang.locale=d),["months","shortMonths","weekdays","shortWeekdays"].forEach(m=>{let b=/months/i.test(m),_=/short/.test(m),w={timeZone:"UTC"};w[b?"month":"weekday"]=_?"short":"long",this[m]=(b?[0,1,2,3,4,5,6,7,8,9,10,11]:[3,4,5,6,7,8,9]).map(S=>this.dateFormat(w,(b?31:1)*24*36e5*S))})}toParts(k){let[a,u,d,p,m,b,_]=this.dateTimeFormat({weekday:"narrow",day:"numeric",month:"numeric",year:"numeric",hour:"numeric",minute:"numeric",second:"numeric"},k,"es").split(/(?:, | |\/|:)/g);return[p,d-1,u,m,b,_,Math.floor(Number(k)||0)%1e3,"DLMXJVS".indexOf(a)].map(Number)}dateTimeFormat(k,a,u=this.options.locale||Se){let d=JSON.stringify(k)+u;Ye(k)&&(k=this.str2dtf(k));let p=this.dTLCache[d];if(!p){k.timeZone??(k.timeZone=this.timezone);try{p=new Intl.DateTimeFormat(u,k)}catch(m){/Invalid time zone/i.test(m.message)?(je(34),k.timeZone="UTC",p=new Intl.DateTimeFormat(u,k)):je(m.message,!1)}}return this.dTLCache[d]=p,(p==null?void 0:p.format(a))||""}str2dtf(k,a={}){let u={L:{fractionalSecondDigits:3},S:{second:"2-digit"},M:{minute:"numeric"},H:{hour:"2-digit"},k:{hour:"numeric"},E:{weekday:"narrow"},a:{weekday:"short"},A:{weekday:"long"},d:{day:"2-digit"},e:{day:"numeric"},b:{month:"short"},B:{month:"long"},m:{month:"2-digit"},o:{month:"numeric"},y:{year:"2-digit"},Y:{year:"numeric"}};return Object.keys(u).forEach(d=>{k.indexOf(d)!==-1&&nt(a,u[d])}),a}makeTime(k,a,u=1,d=0,p,m,b){let _=this.Date.UTC(k,a,u,d,p||0,m||0,b||0);if(this.timezone!=="UTC"){let w=this.getTimezoneOffset(_);if(_+=w,[2,3,8,9,10,11].indexOf(a)!==-1&&(d<5||d>20)){let S=this.getTimezoneOffset(_);w!==S?_+=S-w:w-36e5!==this.getTimezoneOffset(_-36e5)||Kt||(_-=36e5)}}return _}parse(k){if(!Ye(k))return k??void 0;let a=(k=k.replace(/\//g,"-").replace(/(GMT|UTC)/,"")).indexOf("Z")>-1||/([+-][0-9]{2}):?[0-9]{2}$/.test(k),u=/^[0-9]{4}-[0-9]{2}(-[0-9]{2}|)$/.test(k);a||u||(k+="Z");let d=Date.parse(k);if(ft(d))return d+(!a||u?this.getTimezoneOffset(d):0)}getTimezoneOffset(k){if(this.timezone!=="UTC"){let[a,u,d,p,m=0]=this.dateTimeFormat({timeZoneName:"shortOffset"},k,"en").split(/(GMT|:)/).map(Number),b=-(60*(d+m/60)*6e4);if(ft(b))return b}return 0}dateFormat(k,a,u){let d=this.lang;if(!Qe(a)||isNaN(a))return(d==null?void 0:d.invalidDate)||"";if(Ye(k=k??"%Y-%m-%d %H:%M:%S")){let p,m=/%\[([a-zA-Z]+)\]/g;for(;p=m.exec(k);)k=k.replace(p[0],this.dateTimeFormat(p[1],a,d==null?void 0:d.locale))}if(Ye(k)&&k.indexOf("%")!==-1){let p=this,[m,b,_,w,S,N,T,U]=this.toParts(a),Y=(d==null?void 0:d.weekdays)||this.weekdays,se=(d==null?void 0:d.shortWeekdays)||this.shortWeekdays,de=(d==null?void 0:d.months)||this.months,ue=(d==null?void 0:d.shortMonths)||this.shortMonths;ot(nt({a:se?se[U]:Y[U].substr(0,3),A:Y[U],d:ht(_),e:ht(_,2," "),w:U,v:(d==null?void 0:d.weekFrom)??"",b:ue[b],B:de[b],m:ht(b+1),o:b+1,y:m.toString().substr(2,2),Y:m,H:ht(w),k:w,I:ht(w%12||12),l:w%12||12,M:ht(S),p:w<12?"AM":"PM",P:w<12?"am":"pm",S:ht(N),L:ht(T,3)},B.dateFormats),function(le,me){if(Ye(k))for(;k.indexOf("%"+me)!==-1;)k=k.replace("%"+me,typeof le=="function"?le.call(p,a):le)})}else if(ut(k)){let p=(this.getTimezoneOffset(a)||0)/36e5,m=this.timezone||"Etc/GMT"+(p>=0?"+":"")+p,{prefix:b="",suffix:_=""}=k;k=b+this.dateTimeFormat(nt({timeZone:m},k),a)+_}return u?zt(k):k}resolveDTLFormat(k){return ut(k,!0)?ut(k,!0)&&Fe(k)?{main:k}:k:{main:(k=Tt(k))[0],from:k[1],to:k[2]}}getDateFormat(k,a,u,d){let p=this.dateFormat("%m-%d %H:%M:%S.%L",a),m="01-01 00:00:00.000",b={millisecond:15,second:12,minute:9,hour:6,day:3},_="millisecond",w=_;for(_ in Ot){if(k&&k===Ot.week&&+this.dateFormat("%w",a)===u&&p.substr(6)===m.substr(6)){_="week";break}if(k&&Ot[_]>k){_=w;break}if(b[_]&&p.substr(b[_])!==m.substr(b[_]))break;_!=="week"&&(w=_)}return this.resolveDTLFormat(d[_]).main}},{defined:R,extend:we,timeUnits:fe}=Q,Oe=class extends ee{getTimeTicks(k,a,u,d){let p=this,m=[],b={},{count:_=1,unitRange:w}=k,[S,N,T,U,Y,se]=p.toParts(a),de=(a||0)%1e3,ue;if(d??(d=1),R(a)){if(de=w>=fe.second?0:_*Math.floor(de/_),w>=fe.second&&(se=w>=fe.minute?0:_*Math.floor(se/_)),w>=fe.minute&&(Y=w>=fe.hour?0:_*Math.floor(Y/_)),w>=fe.hour&&(U=w>=fe.day?0:_*Math.floor(U/_)),w>=fe.day&&(T=w>=fe.month?1:Math.max(1,_*Math.floor(T/_))),w>=fe.month&&(N=w>=fe.year?0:_*Math.floor(N/_)),w>=fe.year&&(S-=S%_),w===fe.week){_&&(a=p.makeTime(S,N,T,U,Y,se,de));let ye=this.dateTimeFormat({timeZone:this.timezone,weekday:"narrow"},a,"es"),Le="DLMXJVS".indexOf(ye);T+=-Le+d+(Le<d?-7:0)}a=p.makeTime(S,N,T,U,Y,se,de),p.variableTimezone&&R(u)&&(ue=u-a>4*fe.month||p.getTimezoneOffset(a)!==p.getTimezoneOffset(u));let le=a,me=1;for(;le<u;)m.push(le),w===fe.year?le=p.makeTime(S+me*_,0):w===fe.month?le=p.makeTime(S,N+me*_):ue&&(w===fe.day||w===fe.week)?le=p.makeTime(S,N,T+me*_*(w===fe.day?1:7)):ue&&w===fe.hour&&_>1?le=p.makeTime(S,N,T,U+me*_):le+=w*_,me++;m.push(le),w<=fe.hour&&m.length<1e4&&m.forEach(ye=>{ye%18e5==0&&p.dateFormat("%H%M%S%L",ye)==="000000000"&&(b[ye]="day")})}return m.info=we(k,{higherRanks:b,totalRange:w*_}),m}},{isTouchDevice:Xe}=B,{fireEvent:at,merge:wt}=Q,gt={colors:["#2caffe","#544fc5","#00e272","#fe6a35","#6b8abc","#d568fb","#2ee0ca","#fa4b42","#feb56a","#91e8e1"],symbols:["circle","diamond","square","triangle","triangle-down"],lang:{weekFrom:"week from",chartTitle:"Chart title",locale:void 0,loading:"Loading...",months:void 0,seriesName:"Series {add index 1}",shortMonths:void 0,weekdays:void 0,numericSymbols:["k","M","G","T","P","E"],pieSliceName:"Slice",resetZoom:"Reset zoom",yAxisTitle:"Values",resetZoomTitle:"Reset zoom level 1:1"},global:{buttonTheme:{fill:"#f7f7f7",padding:8,r:2,stroke:"#cccccc","stroke-width":1,style:{color:"#333333",cursor:"pointer",fontSize:"0.8em",fontWeight:"normal"},states:{hover:{fill:"#e6e6e6"},select:{fill:"#e6e9ff",style:{color:"#000000",fontWeight:"bold"}},disabled:{style:{color:"#cccccc"}}}}},time:{Date:void 0,timezone:"UTC",timezoneOffset:0,useUTC:void 0},chart:{alignThresholds:!1,panning:{enabled:!1,type:"x"},styledMode:!1,borderRadius:0,colorCount:10,allowMutatingData:!0,ignoreHiddenSeries:!0,spacing:[10,10,15,10],resetZoomButton:{theme:{},position:{}},reflow:!0,type:"line",zooming:{singleTouch:!1,resetButton:{theme:{zIndex:6},position:{align:"right",x:-10,y:10}}},width:null,height:null,borderColor:"#334eff",backgroundColor:"#ffffff",plotBorderColor:"#cccccc"},title:{style:{color:"#333333",fontWeight:"bold"},text:"Chart title",margin:15,minScale:.67},subtitle:{style:{color:"#666666",fontSize:"0.8em"},text:""},caption:{margin:15,style:{color:"#666666",fontSize:"0.8em"},text:"",align:"left",verticalAlign:"bottom"},plotOptions:{},legend:{enabled:!0,align:"center",alignColumns:!0,className:"highcharts-no-tooltip",events:{},layout:"horizontal",itemMarginBottom:2,itemMarginTop:2,labelFormatter:function(){return this.name},borderColor:"#999999",borderRadius:0,navigation:{style:{fontSize:"0.8em"},activeColor:"#0022ff",inactiveColor:"#cccccc"},itemStyle:{color:"#333333",cursor:"pointer",fontSize:"0.8em",textDecoration:"none",textOverflow:"ellipsis"},itemHoverStyle:{color:"#000000"},itemHiddenStyle:{color:"#666666",textDecoration:"line-through"},shadow:!1,itemCheckboxStyle:{position:"absolute",width:"13px",height:"13px"},squareSymbol:!0,symbolPadding:5,verticalAlign:"bottom",x:0,y:0,title:{style:{color:"#333333",fontSize:"0.8em",fontWeight:"bold"}}},loading:{labelStyle:{fontWeight:"bold",position:"relative",top:"45%"},style:{position:"absolute",backgroundColor:"#ffffff",opacity:.5,textAlign:"center"}},tooltip:{enabled:!0,animation:{duration:300,easing:k=>Math.sqrt(1-Math.pow(k-1,2))},borderRadius:3,dateTimeLabelFormats:{millisecond:"%[AebHMSL]",second:"%[AebHMS]",minute:"%[AebHM]",hour:"%[AebHM]",day:"%[AebY]",week:"%v %[AebY]",month:"%[BY]",year:"%Y"},footerFormat:"",headerShape:"callout",hideDelay:500,padding:8,position:{x:0,y:3},shared:!1,snap:Xe?25:10,headerFormat:'<span style="font-size: 0.8em">{ucfirst point.key}</span><br/>',pointFormat:'<span style="color:{point.color}">â</span> {series.name}: <b>{point.y}</b><br/>',backgroundColor:"#ffffff",borderWidth:void 0,stickOnContact:!1,style:{color:"#333333",cursor:"default",fontSize:"0.8em"},useHTML:!1},credits:{enabled:!0,href:"https://www.highcharts.com?credits",position:{align:"right",x:-10,verticalAlign:"bottom",y:-5},style:{cursor:"pointer",color:"#999999",fontSize:"0.6em"},text:"Highcharts.com"}},pt=new Oe(gt.time,gt.lang),He={defaultOptions:gt,defaultTime:pt,getOptions:function(){return gt},setOptions:function(k){var a;return at(B,"setOptions",{options:k}),wt(!0,gt,k),k.time&&pt.update(gt.time),k.lang&&"locale"in k.lang&&pt.update({locale:k.lang.locale}),(a=k.lang)!=null&&a.chartTitle&&(gt.title={...gt.title,text:k.lang.chartTitle}),gt}},{win:it}=B,{isNumber:$t,isString:ze,merge:Je,pInt:tt,defined:Jt}=Q,Ht=(k,a,u)=>`color-mix(in srgb,${k},${a} ${100*u}%)`,sn=k=>ze(k)&&!!k&&k!=="none";class gs{static parse(a){return a?new gs(a):gs.None}constructor(a){let u,d,p,m;this.rgba=[NaN,NaN,NaN,NaN],this.input=a;let b=B.Color;if(b&&b!==gs)return new b(a);if(typeof a=="object"&&a.stops!==void 0)this.stops=a.stops.map(_=>new gs(_[1]));else if(typeof a=="string")for(this.input=a=gs.names[a.toLowerCase()]||a,p=gs.parsers.length;p--&&!d;)(u=(m=gs.parsers[p]).regex.exec(a))&&(d=m.parse(u));d&&(this.rgba=d)}get(a){let u=this.input,d=this.rgba;if(this.output)return this.output;if(typeof u=="object"&&this.stops!==void 0){let p=Je(u);return p.stops=[].slice.call(p.stops),this.stops.forEach((m,b)=>{p.stops[b]=[p.stops[b][0],m.get(a)]}),p}return d&&$t(d[0])?a!=="rgb"&&(a||d[3]!==1)?a==="a"?`${d[3]}`:"rgba("+d.join(",")+")":"rgb("+d[0]+","+d[1]+","+d[2]+")":u}brighten(a){let u=this.rgba;if(this.stops)this.stops.forEach(function(d){d.brighten(a)});else if($t(a)&&a!==0)if($t(u[0]))for(let d=0;d<3;d++)u[d]+=tt(255*a),u[d]<0&&(u[d]=0),u[d]>255&&(u[d]=255);else gs.useColorMix&&sn(this.input)&&(this.output=Ht(this.input,a>0?"white":"black",Math.abs(a)));return this}setOpacity(a){return this.rgba[3]=a,this}tweenTo(a,u){let d=this.rgba,p=a.rgba;if(!$t(d[0])||!$t(p[0]))return gs.useColorMix&&sn(this.input)&&sn(a.input)&&u<.99?Ht(this.input,a.input,u):a.input||"none";let m=p[3]!==1||d[3]!==1,b=(w,S)=>w+(d[S]-w)*(1-u),_=p.slice(0,3).map(b).map(Math.round);return m&&_.push(b(p[3],3)),(m?"rgba(":"rgb(")+_.join(",")+")"}}gs.names={white:"#ffffff",black:"#000000"},gs.parsers=[{regex:/rgba\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d?(?:\.\d+)?)\s*\)/,parse:function(k){return[tt(k[1]),tt(k[2]),tt(k[3]),parseFloat(k[4],10)]}},{regex:/rgb\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*\)/,parse:function(k){return[tt(k[1]),tt(k[2]),tt(k[3]),1]}},{regex:/^#([a-f0-9])([a-f0-9])([a-f0-9])([a-f0-9])?$/i,parse:function(k){return[tt(k[1]+k[1],16),tt(k[2]+k[2],16),tt(k[3]+k[3],16),Jt(k[4])?tt(k[4]+k[4],16)/255:1]}},{regex:/^#([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})?$/i,parse:function(k){return[tt(k[1],16),tt(k[2],16),tt(k[3],16),Jt(k[4])?tt(k[4],16)/255:1]}}],gs.useColorMix=(oE=it.CSS)==null?void 0:oE.supports("color","color-mix(in srgb,red,blue 9%)"),gs.None=new gs("");let{parse:ws}=gs,{win:bi}=B,{isNumber:Li,objectEach:$o}=Q;class Ln{constructor(a,u,d){this.pos=NaN,this.options=u,this.elem=a,this.prop=d}dSetter(){let a=this.paths,u=a==null?void 0:a[0],d=a==null?void 0:a[1],p=this.now||0,m=[];if(p!==1&&u&&d)if(u.length===d.length&&p<1)for(let b=0;b<d.length;b++){let _=u[b],w=d[b],S=[];for(let N=0;N<w.length;N++){let T=_[N],U=w[N];Li(T)&&Li(U)&&(w[0]!=="A"||N!==4&&N!==5)?S[N]=T+p*(U-T):S[N]=U}m.push(S)}else m=d;else m=this.toD||[];this.elem.attr("d",m,void 0,!0)}update(){let a=this.elem,u=this.prop,d=this.now,p=this.options.step;this[u+"Setter"]?this[u+"Setter"]():a.attr?a.element&&a.attr(u,d,null,!0):a.style[u]=d+this.unit,p&&p.call(a,d,this)}run(a,u,d){let p=this,m=p.options,b=function(S){return!b.stopped&&p.step(S)},_=bi.requestAnimationFrame||function(S){setTimeout(S,13)},w=function(){for(let S=0;S<Ln.timers.length;S++)Ln.timers[S]()||Ln.timers.splice(S--,1);Ln.timers.length&&_(w)};a!==u||this.elem["forceAnimate:"+this.prop]?(this.startTime=+new Date,this.start=a,this.end=u,this.unit=d,this.now=this.start,this.pos=0,b.elem=this.elem,b.prop=this.prop,b()&&Ln.timers.push(b)===1&&_(w)):(delete m.curAnim[this.prop],m.complete&&Object.keys(m.curAnim).length===0&&m.complete.call(this.elem))}step(a){let u,d,p=+new Date,m=this.options,b=this.elem,_=m.complete,w=m.duration,S=m.curAnim;return b.attr&&!b.element?u=!1:a||p>=w+this.startTime?(this.now=this.end,this.pos=1,this.update(),S[this.prop]=!0,d=!0,$o(S,function(N){N!==!0&&(d=!1)}),d&&_&&_.call(b),u=!1):(this.pos=m.easing((p-this.startTime)/w),this.now=this.start+(this.end-this.start)*this.pos,this.update(),u=!0),u}initPath(a,u,d){let p=a.startX,m=a.endX,b=d.slice(),_=a.isArea,w=_?2:1,S=u&&d.length>u.length&&d.hasStackedCliffs,N,T,U,Y,se=u==null?void 0:u.slice();if(!se||S)return[b,b];function de(le,me){for(;le.length<T;){let ye=le[0],Le=me[T-le.length];if(Le&&ye[0]==="M"&&(Le[0]==="C"?le[0]=["C",ye[1],ye[2],ye[1],ye[2],ye[1],ye[2]]:le[0]=["L",ye[1],ye[2]]),le.unshift(ye),_){let De=le.pop();le.push(le[le.length-1],De)}}}function ue(le){for(;le.length<T;){let me=le[Math.floor(le.length/w)-1].slice();if(me[0]==="C"&&(me[1]=me[5],me[2]=me[6]),_){let ye=le[Math.floor(le.length/w)].slice();le.splice(le.length/2,0,me,ye)}else le.push(me)}}if(p&&m&&m.length){for(U=0;U<p.length;U++)if(p[U]===m[0]){N=U;break}else if(p[0]===m[m.length-p.length+U]){N=U,Y=!0;break}else if(p[p.length-1]===m[m.length-p.length+U]){N=p.length-U;break}N===void 0&&(se=[])}return se.length&&Li(N)&&(T=b.length+N*w,Y?(de(se,b),ue(b)):(de(b,se),ue(se))),[se,b]}fillSetter(){Ln.prototype.strokeSetter.apply(this,arguments)}strokeSetter(){this.elem.attr(this.prop,ws(this.start).tweenTo(ws(this.end),this.pos),void 0,!0)}}Ln.timers=[];let{defined:za,getStyle:zu,isArray:Dl,isNumber:Yu,isObject:Io,merge:Pl,objectEach:qu,pick:Gu}=Q;function Mo(k){return Io(k)?Pl({duration:500,defer:0},k):{duration:500*!!k,defer:0}}function No(k,a){let u=Ln.timers.length;for(;u--;)Ln.timers[u].elem!==k||a&&a!==Ln.timers[u].prop||(Ln.timers[u].stopped=!0)}let mt={animate:function(k,a,u){let d,p="",m,b,_;Io(u)||(_=arguments,u={duration:_[2],easing:_[3],complete:_[4]}),Yu(u.duration)||(u.duration=400),u.easing=typeof u.easing=="function"?u.easing:Math[u.easing]||Math.easeInOutSine,u.curAnim=Pl(a),qu(a,function(w,S){No(k,S),b=new Ln(k,u,S),m=void 0,S==="d"&&Dl(a.d)?(b.paths=b.initPath(k,k.pathArray,a.d),b.toD=a.d,d=0,m=1):k.attr?d=k.attr(S):(d=parseFloat(zu(k,S))||0,S!=="opacity"&&(p="px")),m||(m=w),typeof m=="string"&&m.match("px")&&(m=m.replace(/px/g,"")),b.run(d,m,p)})},animObject:Mo,getDeferredAnimation:function(k,a,u){let d=Mo(a),p=u?[u]:k.series,m=0,b=0;return p.forEach(_=>{let w=Mo(_.options.animation);m=Io(a)&&za(a.defer)?d.defer:Math.max(m,w.duration+w.defer),b=Math.min(d.duration,w.duration)}),k.renderer.forExport&&(m=0),{defer:Math.max(0,m-b),duration:Math.min(m,b)}},setAnimation:function(k,a){a.renderer.globalAnimation=Gu(k,a.options.chart.animation,!0)},stop:No},{SVG_NS:Tr,win:Lt}=B,{attr:Ya,createElement:Gr,css:Xr,error:ma,isFunction:qa,isString:ga,objectEach:va,splat:Kr}=Q,{trustedTypes:Jr}=Lt,Ar=Jr&&qa(Jr.createPolicy)&&Jr.createPolicy("highcharts",{createHTML:k=>k}),$l=Ar?Ar.createHTML(""):"";class qs{static filterUserAttributes(a){return va(a,(u,d)=>{let p=!0;qs.allowedAttributes.indexOf(d)===-1&&(p=!1),["background","dynsrc","href","lowsrc","src"].indexOf(d)!==-1&&(p=ga(u)&&qs.allowedReferences.some(m=>u.indexOf(m)===0)),p||(ma(33,!1,void 0,{"Invalid attribute in config":`${d}`}),delete a[d]),ga(u)&&a[d]&&(a[d]=u.replace(/</g,"<"))}),a}static parseStyle(a){return a.split(";").reduce((u,d)=>{let p=d.split(":").map(b=>b.trim()),m=p.shift();return m&&p.length&&(u[m.replace(/-([a-z])/g,b=>b[1].toUpperCase())]=p.join(":")),u},{})}static setElementHTML(a,u){a.innerHTML=qs.emptyHTML,u&&new qs(u).addToDOM(a)}constructor(a){this.nodes=typeof a=="string"?this.parseMarkup(a):a}addToDOM(a){return(function u(d,p){let m;return Kr(d).forEach(function(b){let _,w=b.tagName,S=b.textContent?B.doc.createTextNode(b.textContent):void 0,N=qs.bypassHTMLFiltering;if(w)if(w==="#text")_=S;else if(qs.allowedTags.indexOf(w)!==-1||N){let T=w==="svg"?Tr:p.namespaceURI||Tr,U=B.doc.createElementNS(T,w),Y=b.attributes||{};va(b,function(se,de){de!=="tagName"&&de!=="attributes"&&de!=="children"&&de!=="style"&&de!=="textContent"&&(Y[de]=se)}),Ya(U,N?Y:qs.filterUserAttributes(Y)),b.style&&Xr(U,b.style),S&&U.appendChild(S),u(b.children||[],U),_=U}else ma(33,!1,void 0,{"Invalid tagName in config":w});_&&p.appendChild(_),m=_}),m})(this.nodes,a)}parseMarkup(a){let u,d=[];a=a.trim().replace(/ style=(["'])/g," data-style=$1");try{u=new DOMParser().parseFromString(Ar?Ar.createHTML(a):a,"text/html")}catch{}if(!u){let m=Gr("div");m.innerHTML=a,u={body:m}}let p=(m,b)=>{let _=m.nodeName.toLowerCase(),w={tagName:_};_==="#text"&&(w.textContent=m.textContent||"");let S=m.attributes;if(S){let N={};[].forEach.call(S,T=>{T.name==="data-style"?w.style=qs.parseStyle(T.value):N[T.name]=T.value}),w.attributes=N}if(m.childNodes.length){let N=[];[].forEach.call(m.childNodes,T=>{p(T,N)}),N.length&&(w.children=N)}b.push(w)};return[].forEach.call(u.body.childNodes,m=>p(m,d)),d}}qs.allowedAttributes=["alt","aria-controls","aria-describedby","aria-expanded","aria-haspopup","aria-hidden","aria-label","aria-labelledby","aria-live","aria-pressed","aria-readonly","aria-roledescription","aria-selected","class","clip-path","color","colspan","cx","cy","d","disabled","dx","dy","fill","filterUnits","flood-color","flood-opacity","height","href","id","in","in2","markerHeight","markerWidth","offset","opacity","operator","orient","padding","paddingLeft","paddingRight","patternUnits","r","radius","refX","refY","result","role","rowspan","scope","slope","src","startOffset","stdDeviation","stroke-linecap","stroke-width","stroke","style","summary","tabindex","tableValues","target","text-align","text-anchor","textAnchor","textLength","title","type","valign","width","x","x1","x2","xlink:href","y","y1","y2","zIndex"],qs.allowedReferences=["https://","http://","mailto:","/","../","./","#"],qs.allowedTags=["#text","a","abbr","b","br","button","caption","circle","clipPath","code","dd","defs","div","dl","dt","em","feComponentTransfer","feComposite","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feMerge","feMergeNode","feMorphology","feOffset","filter","h1","h2","h3","h4","h5","h6","hr","i","img","li","linearGradient","marker","ol","p","path","pattern","pre","rect","small","span","stop","strong","style","sub","sup","svg","table","tbody","td","text","textPath","th","thead","title","tr","tspan","u","ul"],qs.emptyHTML=$l,qs.bypassHTMLFiltering=!1;let{defaultOptions:Il,defaultTime:Ri}=He,{pageLang:Ml}=B,{extend:Or,getNestedProperty:Lo,isArray:Xu,isNumber:Bf,isObject:Iv,isString:Mv,pick:Ed,ucfirst:Nv}=Q,Ku={add:(k,a)=>k+a,divide:(k,a)=>a!==0?k/a:"",eq:(k,a)=>k==a,each:function(k){let a=arguments[arguments.length-1];return!!Xu(k)&&k.map((u,d)=>ba(a.body,Or(Iv(u)?u:{"@this":u},{"@index":d,"@first":d===0,"@last":d===k.length-1}))).join("")},ge:(k,a)=>k>=a,gt:(k,a)=>k>a,if:k=>!!k,le:(k,a)=>k<=a,lt:(k,a)=>k<a,multiply:(k,a)=>k*a,ne:(k,a)=>k!=a,subtract:(k,a)=>k-a,ucfirst:Nv,unless:k=>!k},Sd={},Nl=k=>/^["'].+["']$/.test(k);function ba(k="",a,u){var ue;let d=/\{([a-zA-Z\u00C0-\u017F\d:\.,;\-\/<>\[\]%_@+"'â= #\(\)]+)\}/g,p=/\(([a-zA-Z\u00C0-\u017F\d:\.,;\-\/<>\[\]%_@+"'= ]+)\)/g,m=[],b=/f$/,_=/\.(\d)/,w=((ue=u==null?void 0:u.options)==null?void 0:ue.lang)||Il.lang,S=(u==null?void 0:u.time)||Ri,N=(u==null?void 0:u.numberFormatter)||Uf.bind(u),T=(le="")=>{let me;return le==="true"||le!=="false"&&((me=Number(le)).toString()===le?me:Nl(le)?le.slice(1,-1):Lo(le,a))},U,Y,se=0,de;for(;(U=d.exec(k))!==null;){let le=U,me=p.exec(U[1]);me&&(U=me,de=!0),Y!=null&&Y.isBlock||(Y={ctx:a,expression:U[1],find:U[0],isBlock:U[1].charAt(0)==="#",start:U.index,startInner:U.index+U[0].length,length:U[0].length});let ye=(Y.isBlock?le:U)[1].split(" ")[0].replace("#","");Ku[ye]&&(Y.isBlock&&ye===Y.fn&&se++,Y.fn||(Y.fn=ye));let Le=U[1]==="else";if(Y.isBlock&&Y.fn&&(U[1]===`/${Y.fn}`||Le))if(se)!Le&&se--;else{let De=Y.startInner,Ie=k.substr(De,U.index-De);Y.body===void 0?(Y.body=Ie,Y.startInner=U.index+U[0].length):Y.elseBody=Ie,Y.find+=Ie+U[0],Le||(m.push(Y),Y=void 0)}else Y.isBlock||m.push(Y);if(me&&!(Y!=null&&Y.isBlock))break}return m.forEach(le=>{let me,ye,{body:Le,elseBody:De,expression:Ie,fn:Ge}=le;if(Ge){let Ue=[le],qe=[],rt=Ie.length,dt=0,xt;for(ye=0;ye<=rt;ye++){let Et=Ie.charAt(ye);xt||Et!=='"'&&Et!=="'"?xt===Et&&(xt=""):xt=Et,xt||Et!==" "&&ye!==rt||(qe.push(Ie.substr(dt,ye-dt)),dt=ye+1)}for(ye=Ku[Ge].length;ye--;)Ue.unshift(T(qe[ye+1]));me=Ku[Ge].apply(a,Ue),le.isBlock&&typeof me=="boolean"&&(me=ba(me?Le:De,a,u))}else{let Ue=Nl(Ie)?[Ie]:Ie.split(":"),qe=(me=T(Ue.shift()||""))%1!=0;if(typeof me=="number"&&(Ue.length||qe)){let rt=Ue.join(":");if(b.test(rt)||qe){let dt=parseInt((rt.match(_)||["","-1"])[1],10);me!==null&&(me=N(me,dt,w.decimalPoint,rt.indexOf(",")>-1?w.thousandsSep:""))}else me=S.dateFormat(rt,me)}p.lastIndex=0,p.test(le.find)&&Mv(me)&&(me=`"${me}"`)}k=k.replace(le.find,Ed(me,""))}),de?ba(k,a,u):k}function Uf(k,a,u,d){var de;a*=1;let p,m,[b,_]=(k=+k||0).toString().split("e").map(Number),w=((de=this==null?void 0:this.options)==null?void 0:de.lang)||Il.lang,S=(k.toString().split(".")[1]||"").split("e")[0].length,N=a,T={};u??(u=w.decimalPoint),d??(d=w.thousandsSep),a===-1?a=Math.min(S,20):Bf(a)?a&&_<0&&((m=a+_)>=0?(b=+b.toExponential(m).split("e")[0],a=m):(b=Math.floor(b),k=a<20?+(b*Math.pow(10,_)).toFixed(a):0,_=0)):a=2,_&&(a??(a=2),k=b),Bf(a)&&a>=0&&(T.minimumFractionDigits=a,T.maximumFractionDigits=a),d===""&&(T.useGrouping=!1);let U=d||u,Y=U?"en":(this==null?void 0:this.locale)||w.locale||Ml,se=JSON.stringify(T)+Y;return p=(Sd[se]??(Sd[se]=new Intl.NumberFormat(Y,T))).format(k),U&&(p=p.replace(/([,\.])/g,"_$1").replace(/_\,/g,d??",").replace("_.",u??".")),(a||+p!=0)&&(!(_<0)||N)||(p="0"),_&&+p!=0&&(p+="e"+(_<0?"":"+")+_),p}let ti={dateFormat:function(k,a,u){return Ri.dateFormat(k,a,u)},format:ba,helpers:Ku,numberFormat:Uf};(function(k){let a;k.rendererTypes={},k.getRendererType=function(u=a){return k.rendererTypes[u]||k.rendererTypes[a]},k.registerRendererType=function(u,d,p){k.rendererTypes[u]=d,(!a||p)&&(a=u,B.Renderer=d)}})(o||(o={}));let Ll=o,{clamp:Lv,pick:Rv,pushUnique:Fv,stableSort:kd}=Q;(r||(r={})).distribute=function k(a,u,d){let p=a,m=p.reducedLen||u,b=(ye,Le)=>ye.target-Le.target,_=[],w=a.length,S=[],N=_.push,T,U,Y,se=!0,de,ue,le=0,me;for(T=w;T--;)le+=a[T].size;if(le>m){for(kd(a,(ye,Le)=>(Le.rank||0)-(ye.rank||0)),Y=(me=a[0].rank===a[a.length-1].rank)?w/2:-1,U=me?Y:w-1;Y&&le>m;)de=a[T=Math.floor(U)],Fv(S,T)&&(le-=de.size),U+=Y,me&&U>=a.length&&(Y/=2,U=Y);S.sort((ye,Le)=>Le-ye).forEach(ye=>N.apply(_,a.splice(ye,1)))}for(kd(a,b),a=a.map(ye=>({size:ye.size,targets:[ye.target],align:Rv(ye.align,.5)}));se;){for(T=a.length;T--;)de=a[T],ue=(Math.min.apply(0,de.targets)+Math.max.apply(0,de.targets))/2,de.pos=Lv(ue-de.size*de.align,0,u-de.size);for(T=a.length,se=!1;T--;)T>0&&a[T-1].pos+a[T-1].size>a[T].pos&&(a[T-1].size+=a[T].size,a[T-1].targets=a[T-1].targets.concat(a[T].targets),a[T-1].align=.5,a[T-1].pos+a[T-1].size>u&&(a[T-1].pos=u-a[T-1].size),a.splice(T,1),se=!0)}return N.apply(p,_),T=0,a.some(ye=>{let Le=0;return(ye.targets||[]).some(()=>(p[T].pos=ye.pos+Le,d!==void 0&&Math.abs(p[T].pos-p[T].target)>d?(p.slice(0,T+1).forEach(De=>delete De.pos),p.reducedLen=(p.reducedLen||u)-.1*u,p.reducedLen>.1*u&&k(p,u,d),!0):(Le+=p[T].size,T++,!1)))}),kd(p,b),p};let Ju=r,{animate:Vv,animObject:Cd,stop:ya}=mt,{deg2rad:jf,doc:Ro,svg:Bv,SVG_NS:Qu,win:Hf,isFirefox:Uv}=B,{addEvent:Wf,attr:Td,createElement:jv,crisp:Zu,css:zf,defined:Dr,erase:Hv,extend:Rl,fireEvent:Ad,getAlignFactor:Od,isArray:Dd,isFunction:Wv,isNumber:zv,isObject:ds,isString:ec,merge:Fo,objectEach:Vo,pick:Qr,pInt:Fl,pushUnique:Yv,replaceNested:qv,syncTimeout:Gv,uniqueKey:Yf}=Q;class Rn{_defaultGetter(a){let u=Qr(this[a+"Value"],this[a],this.element?this.element.getAttribute(a):null,0);return/^-?[\d\.]+$/.test(u)&&(u=parseFloat(u)),u}_defaultSetter(a,u,d){d.setAttribute(u,a)}add(a){let u,d=this.renderer,p=this.element;return a&&(this.parentGroup=a),this.textStr!==void 0&&this.element.nodeName==="text"&&d.buildText(this),this.added=!0,(!a||a.handleZ||this.zIndex)&&(u=this.zIndexSetter()),u||(a?a.element:d.box).appendChild(p),this.onAdd&&this.onAdd(),this}addClass(a,u){let d=u?"":this.attr("class")||"";return(a=(a||"").split(/ /g).reduce(function(p,m){return d.indexOf(m)===-1&&p.push(m),p},d?[d]:[]).join(" "))!==d&&this.attr("class",a),this}afterSetters(){this.doTransform&&(this.updateTransform(),this.doTransform=!1)}align(a,u,d,p=!0){let m=this.renderer,b=m.alignedObjects,_=!!a;a?(this.alignOptions=a,this.alignByTranslate=u,this.alignTo=d):(a=this.alignOptions||{},u=this.alignByTranslate,d=this.alignTo);let w=!d||ec(d)?d||"renderer":void 0;w&&(_&&Yv(b,this),d=void 0);let S=Qr(d,m[w],m),N=(S.x||0)+(a.x||0)+((S.width||0)-(a.width||0))*Od(a.align),T=(S.y||0)+(a.y||0)+((S.height||0)-(a.height||0))*Od(a.verticalAlign),U={"text-align":a==null?void 0:a.align};return U[u?"translateX":"x"]=Math.round(N),U[u?"translateY":"y"]=Math.round(T),p&&(this[this.placed?"animate":"attr"](U),this.placed=!0),this.alignAttr=U,this}alignSetter(a){let u={left:"start",center:"middle",right:"end"};u[a]&&(this.alignValue=a,this.element.setAttribute("text-anchor",u[a]))}animate(a,u,d){let p=Cd(Qr(u,this.renderer.globalAnimation,!0)),m=p.defer;return Ro.hidden&&(p.duration=0),p.duration!==0?(d&&(p.complete=d),Gv(()=>{this.element&&Vv(this,a,p)},m)):(this.attr(a,void 0,d||p.complete),Vo(a,function(b,_){p.step&&p.step.call(this,b,{prop:_,pos:1,elem:this})},this)),this}applyTextOutline(a){let u=this.element;a.indexOf("contrast")!==-1&&(a=a.replace(/contrast/g,this.renderer.getContrast(u.style.fill)));let d=a.indexOf(" "),p=a.substring(d+1),m=a.substring(0,d);if(m&&m!=="none"&&B.svg){this.fakeTS=!0,m=m.replace(/(^[\d\.]+)(.*?)$/g,function(N,T,U){return 2*Number(T)+U}),this.removeTextOutline();let b=Ro.createElementNS(Qu,"tspan");Td(b,{class:"highcharts-text-outline",fill:p,stroke:p,"stroke-width":m,"stroke-linejoin":"round"});let _=u.querySelector("textPath")||u;[].forEach.call(_.childNodes,N=>{let T=N.cloneNode(!0);T.removeAttribute&&["fill","stroke","stroke-width","stroke"].forEach(U=>T.removeAttribute(U)),b.appendChild(T)});let w=0;[].forEach.call(_.querySelectorAll("text tspan"),N=>{w+=Number(N.getAttribute("dy"))});let S=Ro.createElementNS(Qu,"tspan");S.textContent="â",Td(S,{x:Number(u.getAttribute("x")),dy:-w}),b.appendChild(S),_.insertBefore(b,_.firstChild)}}attr(a,u,d,p){let{element:m}=this,b=Rn.symbolCustomAttribs,_,w,S=this,N;return typeof a=="string"&&u!==void 0&&(_=a,(a={})[_]=u),typeof a=="string"?S=(this[a+"Getter"]||this._defaultGetter).call(this,a,m):(Vo(a,function(T,U){N=!1,p||ya(this,U),this.symbolName&&b.indexOf(U)!==-1&&(w||(this.symbolAttr(a),w=!0),N=!0),this.rotation&&(U==="x"||U==="y")&&(this.doTransform=!0),N||(this[U+"Setter"]||this._defaultSetter).call(this,T,U,m)},this),this.afterSetters()),d&&d.call(this),S}clip(a){if(a&&!a.clipPath){let u=Yf()+"-",d=this.renderer.createElement("clipPath").attr({id:u}).add(this.renderer.defs);Rl(a,{clipPath:d,id:u,count:0}),a.add(d)}return this.attr("clip-path",a?`url(${this.renderer.url}#${a.id})`:"none")}crisp(a,u){u=Math.round(u||a.strokeWidth||0);let d=a.x||this.x||0,p=a.y||this.y||0,m=(a.width||this.width||0)+d,b=(a.height||this.height||0)+p,_=Zu(d,u),w=Zu(p,u);return Rl(a,{x:_,y:w,width:Zu(m,u)-_,height:Zu(b,u)-w}),Dr(a.strokeWidth)&&(a.strokeWidth=u),a}complexColor(a,u,d){let p=this.renderer,m,b,_,w,S,N,T,U,Y,se,de=[],ue;Ad(this.renderer,"complexColor",{args:arguments},function(){if(a.radialGradient?b="radialGradient":a.linearGradient&&(b="linearGradient"),b){if(_=a[b],S=p.gradients,N=a.stops,Y=d.radialReference,Dd(_)&&(a[b]=_={x1:_[0],y1:_[1],x2:_[2],y2:_[3],gradientUnits:"userSpaceOnUse"}),b==="radialGradient"&&Y&&!Dr(_.gradientUnits)&&(w=_,_=Fo(_,p.getRadialAttr(Y,w),{gradientUnits:"userSpaceOnUse"})),Vo(_,function(le,me){me!=="id"&&de.push(me,le)}),Vo(N,function(le){de.push(le)}),S[de=de.join(",")])se=S[de].attr("id");else{_.id=se=Yf();let le=S[de]=p.createElement(b).attr(_).add(p.defs);le.radAttr=w,le.stops=[],N.forEach(function(me){me[1].indexOf("rgba")===0?(T=(m=gs.parse(me[1])).get("rgb"),U=m.get("a")):(T=me[1],U=1);let ye=p.createElement("stop").attr({offset:me[0],"stop-color":T,"stop-opacity":U}).add(le);le.stops.push(ye)})}ue="url("+p.url+"#"+se+")",d.setAttribute(u,ue),d.gradient=de,a.toString=function(){return ue}}})}css(a){let u=this.styles,d={},p=this.element,m,b=!u;if(u&&Vo(a,function(_,w){u&&u[w]!==_&&(d[w]=_,b=!0)}),b){u&&(a=Rl(u,d)),a.width===null||a.width==="auto"?delete this.textWidth:p.nodeName.toLowerCase()==="text"&&a.width&&(m=this.textWidth=Fl(a.width)),Rl(this.styles,a),m&&!Bv&&this.renderer.forExport&&delete a.width;let _=Uv&&a.fontSize||null;_&&(zv(_)||/^\d+$/.test(_))&&(a.fontSize+="px");let w=Fo(a);p.namespaceURI===this.SVG_NS&&(["textOutline","textOverflow","whiteSpace","width"].forEach(S=>w&&delete w[S]),w.color&&(w.fill=w.color,delete w.color)),zf(p,w)}return this.added&&(this.element.nodeName==="text"&&this.renderer.buildText(this),a.textOutline&&this.applyTextOutline(a.textOutline)),this}dashstyleSetter(a){let u,d=this["stroke-width"];if(d==="inherit"&&(d=1),a){let p=(a=a.toLowerCase()).replace("shortdashdotdot","3,1,1,1,1,1,").replace("shortdashdot","3,1,1,1").replace("shortdot","1,1,").replace("shortdash","3,1,").replace("longdash","8,3,").replace(/dot/g,"1,3,").replace("dash","4,3,").replace(/,$/,"").split(",");for(u=p.length;u--;)p[u]=""+Fl(p[u])*Qr(d,NaN);a=p.join(",").replace(/NaN/g,"none"),this.element.setAttribute("stroke-dasharray",a)}}destroy(){let a=this,u=a.element||{},d=a.renderer,p=u.ownerSVGElement,m=u.nodeName==="SPAN"&&a.parentGroup||void 0,b,_;if(u.onclick=u.onmouseout=u.onmouseover=u.onmousemove=u.point=null,ya(a),a.clipPath&&p){let w=a.clipPath;[].forEach.call(p.querySelectorAll("[clip-path],[CLIP-PATH]"),function(S){S.getAttribute("clip-path").indexOf(w.element.id)>-1&&S.removeAttribute("clip-path")}),a.clipPath=w.destroy()}if(a.stops){for(_=0;_<a.stops.length;_++)a.stops[_].destroy();a.stops.length=0,a.stops=void 0}for(a.safeRemoveChild(u);m!=null&&m.div&&m.div.childNodes.length===0;)b=m.parentGroup,a.safeRemoveChild(m.div),delete m.div,m=b;a.alignOptions&&Hv(d.alignedObjects,a),Vo(a,(w,S)=>{var N,T,U;(((N=a[S])==null?void 0:N.parentGroup)===a||["connector","foreignObject"].indexOf(S)!==-1)&&((U=(T=a[S])==null?void 0:T.destroy)==null||U.call(T)),delete a[S]})}dSetter(a,u,d){Dd(a)&&(typeof a[0]=="string"&&(a=this.renderer.pathToSegments(a)),this.pathArray=a,a=a.reduce((p,m,b)=>m!=null&&m.join?(b?p+" ":"")+m.join(" "):(m||"").toString(),"")),/(NaN| {2}|^$)/.test(a)&&(a="M 0 0"),this[u]!==a&&(d.setAttribute(u,a),this[u]=a)}fillSetter(a,u,d){typeof a=="string"?d.setAttribute(u,a):a&&this.complexColor(a,u,d)}hrefSetter(a,u,d){d.setAttributeNS("http://www.w3.org/1999/xlink",u,a)}getBBox(a,u){let d,p,m,b,{alignValue:_,element:w,renderer:S,styles:N,textStr:T}=this,{cache:U,cacheKeys:Y}=S,se=w.namespaceURI===this.SVG_NS,de=Qr(u,this.rotation,0),ue=S.styledMode?w&&Rn.prototype.getStyle.call(w,"font-size"):N.fontSize;if(Dr(T)&&((b=T.toString()).indexOf("<")===-1&&(b=b.replace(/\d/g,"0")),b+=["",S.rootFontSize,ue,de,this.textWidth,_,N.lineClamp,N.textOverflow,N.fontWeight].join(",")),b&&!a&&(d=U[b]),!d||d.polygon){if(se||S.forExport){try{m=this.fakeTS&&function(me){let ye=w.querySelector(".highcharts-text-outline");ye&&zf(ye,{display:me})},Wv(m)&&m("none"),d=w.getBBox?Rl({},w.getBBox()):{width:w.offsetWidth,height:w.offsetHeight,x:0,y:0},Wv(m)&&m("")}catch{}(!d||d.width<0)&&(d={x:0,y:0,width:0,height:0})}else d=this.htmlGetBBox();p=d.height,se&&(d.height=p={"11px,17":14,"13px,20":16}[`${ue||""},${Math.round(p)}`]||p),de&&(d=this.getRotatedBox(d,de));let le={bBox:d};Ad(this,"afterGetBBox",le),d=le.bBox}if(b&&(T===""||d.height>0)){for(;Y.length>250;)delete U[Y.shift()];U[b]||Y.push(b),U[b]=d}return d}getRotatedBox(a,u){let{x:d,y:p,width:m,height:b}=a,{alignValue:_,translateY:w,rotationOriginX:S=0,rotationOriginY:N=0}=this,T=Od(_),U=Number(this.element.getAttribute("y")||0)-(w?0:p),Y=u*jf,se=(u-90)*jf,de=Math.cos(Y),ue=Math.sin(Y),le=m*de,me=m*ue,ye=Math.cos(se),Le=Math.sin(se),[[De,Ie],[Ge,Ue]]=[S,N].map(Ts=>[Ts-Ts*de,Ts*ue]),qe=d+T*(m-le)+De+Ue+U*ye,rt=qe+le,dt=rt-b*ye,xt=dt-le,Et=p+U-T*me-Ie+Ge+U*Le,Rt=Et+me,It=Rt-b*Le,jt=It-me,Ct=Math.min(qe,rt,dt,xt),Wt=Math.min(Et,Rt,It,jt),hs=Math.max(qe,rt,dt,xt)-Ct,Ss=Math.max(Et,Rt,It,jt)-Wt;return{x:Ct,y:Wt,width:hs,height:Ss,polygon:[[qe,Et],[rt,Rt],[dt,It],[xt,jt]]}}getStyle(a){return Hf.getComputedStyle(this.element||this,"").getPropertyValue(a)}hasClass(a){return(""+this.attr("class")).split(" ").indexOf(a)!==-1}hide(){return this.attr({visibility:"hidden"})}htmlGetBBox(){return{height:0,width:0,x:0,y:0}}constructor(a,u){this.onEvents={},this.opacity=1,this.SVG_NS=Qu,this.element=u==="span"||u==="body"?jv(u):Ro.createElementNS(this.SVG_NS,u),this.renderer=a,this.styles={},Ad(this,"afterInit")}on(a,u){let{onEvents:d}=this;return d[a]&&d[a](),d[a]=Wf(this.element,a,u),this}opacitySetter(a,u,d){let p=Number(Number(a).toFixed(3));this.opacity=p,d.setAttribute(u,p)}reAlign(){var a;(a=this.alignOptions)!=null&&a.width&&this.alignOptions.align!=="left"&&(this.alignOptions.width=this.getBBox().width,this.placed=!1,this.align())}removeClass(a){return this.attr("class",(""+this.attr("class")).replace(ec(a)?RegExp(`(^| )${a}( |$)`):a," ").replace(/ +/g," ").trim())}removeTextOutline(){let a=this.element.querySelector("tspan.highcharts-text-outline");a&&this.safeRemoveChild(a)}safeRemoveChild(a){let u=a.parentNode;u&&u.removeChild(a)}setRadialReference(a){let u=this.element.gradient&&this.renderer.gradients[this.element.gradient]||void 0;return this.element.radialReference=a,u!=null&&u.radAttr&&u.animate(this.renderer.getRadialAttr(a,u.radAttr)),this}shadow(a){var m;let{renderer:u}=this,d=Fo(((m=this.parentGroup)==null?void 0:m.rotation)===90?{offsetX:-1,offsetY:-1}:{},ds(a)?a:{}),p=u.shadowDefinition(d);return this.attr({filter:a?`url(${u.url}#${p})`:"none"})}show(a=!0){return this.attr({visibility:a?"inherit":"visible"})}"stroke-widthSetter"(a,u,d){this[u]=a,d.setAttribute(u,a)}strokeWidth(){if(!this.renderer.styledMode)return this["stroke-width"]||0;let a=this.getStyle("stroke-width"),u=0,d;return/px$/.test(a)?u=Fl(a):a!==""&&(Td(d=Ro.createElementNS(Qu,"rect"),{width:a,"stroke-width":0}),this.element.parentNode.appendChild(d),u=d.getBBox().width,d.parentNode.removeChild(d)),u}symbolAttr(a){let u=this;Rn.symbolCustomAttribs.forEach(function(d){u[d]=Qr(a[d],u[d])}),u.attr({d:u.renderer.symbols[u.symbolName](u.x,u.y,u.width,u.height,u)})}textSetter(a){a!==this.textStr&&(delete this.textPxLength,this.textStr=a,this.added&&this.renderer.buildText(this),this.reAlign())}titleSetter(a){let u=this.element,d=u.getElementsByTagName("title")[0]||Ro.createElementNS(this.SVG_NS,"title");u.insertBefore?u.insertBefore(d,u.firstChild):u.appendChild(d),d.textContent=qv(Qr(a,""),[/<[^>]*>/g,""]).replace(/</g,"<").replace(/>/g,">")}toFront(){let a=this.element;return a.parentNode.appendChild(a),this}translate(a,u){return this.attr({translateX:a,translateY:u})}updateTransform(a="transform"){let{element:u,foreignObject:d,matrix:p,padding:m,rotation:b=0,rotationOriginX:_,rotationOriginY:w,scaleX:S,scaleY:N,text:T,translateX:U=0,translateY:Y=0}=this,se=["translate("+U+","+Y+")"];Dr(p)&&se.push("matrix("+p.join(",")+")"),b&&(se.push("rotate("+b+" "+(_??u.getAttribute("x")??this.x??0)+" "+(w??u.getAttribute("y")??this.y??0)+")"),(T==null?void 0:T.element.tagName)!=="SPAN"||T!=null&&T.foreignObject||T.attr({rotation:b,rotationOriginX:(_||0)-m,rotationOriginY:(w||0)-m})),(Dr(S)||Dr(N))&&se.push("scale("+Qr(S,1)+" "+Qr(N,1)+")"),se.length&&!(T||this).textPath&&((d==null?void 0:d.element)||u).setAttribute(a,se.join(" "))}visibilitySetter(a,u,d){a==="inherit"?d.removeAttribute(u):this[u]!==a&&d.setAttribute(u,a),this[u]=a}xGetter(a){return this.element.nodeName==="circle"&&(a==="x"?a="cx":a==="y"&&(a="cy")),this._defaultGetter(a)}zIndexSetter(a,u){let d=this.renderer,p=this.parentGroup,m=(p||d).element||d.box,b=this.element,_=m===d.box,w,S,N,T=!1,U,Y=this.added,se;if(Dr(a)?(b.setAttribute("data-z-index",a),a*=1,this[u]===a&&(Y=!1)):Dr(this[u])&&b.removeAttribute("data-z-index"),this[u]=a,Y){for((a=this.zIndex)&&p&&(p.handleZ=!0),se=(w=m.childNodes).length-1;se>=0&&!T;se--)U=!Dr(N=(S=w[se]).getAttribute("data-z-index")),S!==b&&(a<0&&U&&!_&&!se?(m.insertBefore(b,w[se]),T=!0):(Fl(N)<=a||U&&(!Dr(a)||a>=0))&&(m.insertBefore(b,w[se+1]),T=!0));T||(m.insertBefore(b,w[3*!!_]),T=!0)}return T}}Rn.symbolCustomAttribs=["anchorX","anchorY","clockwise","end","height","innerR","r","start","width","x","y"],Rn.prototype.strokeSetter=Rn.prototype.fillSetter,Rn.prototype.yGetter=Rn.prototype.xGetter,Rn.prototype.matrixSetter=Rn.prototype.rotationOriginXSetter=Rn.prototype.rotationOriginYSetter=Rn.prototype.rotationSetter=Rn.prototype.scaleXSetter=Rn.prototype.scaleYSetter=Rn.prototype.translateXSetter=Rn.prototype.translateYSetter=Rn.prototype.verticalAlignSetter=function(k,a){this[a]=k,this.doTransform=!0};let Zr=Rn,{defined:qf,extend:Xv,getAlignFactor:Kv,isNumber:Vl,merge:Jv,pick:Bl,removeEvent:Gf}=Q;class Ga extends Zr{constructor(a,u,d,p,m,b,_,w,S,N){let T;super(a,"g"),this.paddingLeftSetter=this.paddingSetter,this.paddingRightSetter=this.paddingSetter,this.doUpdate=!1,this.textStr=u,this.x=d,this.y=p,this.anchorX=b,this.anchorY=_,this.baseline=S,this.className=N,this.addClass(N==="button"?"highcharts-no-tooltip":"highcharts-label"),N&&this.addClass("highcharts-"+N),this.text=a.text(void 0,0,0,w).attr({zIndex:1}),typeof m=="string"&&((T=/^url\((.*?)\)$/.test(m))||this.renderer.symbols[m])&&(this.symbolKey=m),this.bBox=Ga.emptyBBox,this.padding=3,this.baselineOffset=0,this.needsBox=a.styledMode||T,this.deferredAttr={},this.alignFactor=0}alignSetter(a){let u=Kv(a);this.textAlign=a,u!==this.alignFactor&&(this.alignFactor=u,this.bBox&&Vl(this.xSetting)&&this.attr({x:this.xSetting}))}anchorXSetter(a,u){this.anchorX=a,this.boxAttr(u,Math.round(a)-this.getCrispAdjust()-this.xSetting)}anchorYSetter(a,u){this.anchorY=a,this.boxAttr(u,a-this.ySetting)}boxAttr(a,u){this.box?this.box.attr(a,u):this.deferredAttr[a]=u}css(a){if(a){let u={};a=Jv(a),Ga.textProps.forEach(d=>{a[d]!==void 0&&(u[d]=a[d],delete a[d])}),this.text.css(u),"fontSize"in u||"fontWeight"in u?this.updateTextPadding():("width"in u||"textOverflow"in u)&&this.updateBoxSize()}return Zr.prototype.css.call(this,a)}destroy(){Gf(this.element,"mouseenter"),Gf(this.element,"mouseleave"),this.text&&this.text.destroy(),this.box&&(this.box=this.box.destroy()),Zr.prototype.destroy.call(this)}fillSetter(a,u){a&&(this.needsBox=!0),this.fill=a,this.boxAttr(u,a)}getBBox(a,u){this.textStr&&this.bBox.width===0&&this.bBox.height===0&&this.updateBoxSize();let{padding:d,height:p=0,translateX:m=0,translateY:b=0,width:_=0}=this,w=Bl(this.paddingLeft,d),S=u??(this.rotation||0),N={width:_,height:p,x:m+this.bBox.x-w,y:b+this.bBox.y-d+this.baselineOffset};return S&&(N=this.getRotatedBox(N,S)),N}getCrispAdjust(){return(this.renderer.styledMode&&this.box?this.box.strokeWidth():this["stroke-width"]?parseInt(this["stroke-width"],10):0)%2/2}heightSetter(a){this.heightSetting=a,this.doUpdate=!0}afterSetters(){super.afterSetters(),this.doUpdate&&(this.updateBoxSize(),this.doUpdate=!1)}onAdd(){this.text.add(this),this.attr({text:Bl(this.textStr,""),x:this.x||0,y:this.y||0}),this.box&&qf(this.anchorX)&&this.attr({anchorX:this.anchorX,anchorY:this.anchorY})}paddingSetter(a,u){Vl(a)?a!==this[u]&&(this[u]=a,this.updateTextPadding()):this[u]=void 0}rSetter(a,u){this.boxAttr(u,a)}strokeSetter(a,u){this.stroke=a,this.boxAttr(u,a)}"stroke-widthSetter"(a,u){a&&(this.needsBox=!0),this["stroke-width"]=a,this.boxAttr(u,a)}"text-alignSetter"(a){this.textAlign=this["text-align"]=a,this.updateTextPadding()}textSetter(a){a!==void 0&&this.text.attr({text:a}),this.updateTextPadding(),this.reAlign()}updateBoxSize(){let a,u=this.text,d={},p=this.padding,m=this.bBox=(!Vl(this.widthSetting)||!Vl(this.heightSetting)||this.textAlign)&&qf(u.textStr)?u.getBBox(void 0,0):Ga.emptyBBox;this.width=this.getPaddedWidth(),this.height=(this.heightSetting||m.height||0)+2*p;let b=this.renderer.fontMetrics(u);if(this.baselineOffset=p+Math.min((this.text.firstLineMetrics||b).b,m.height||1/0),this.heightSetting&&(this.baselineOffset+=(this.heightSetting-b.h)/2),this.needsBox&&!u.textPath){if(!this.box){let _=this.box=this.symbolKey?this.renderer.symbol(this.symbolKey):this.renderer.rect();_.addClass((this.className==="button"?"":"highcharts-label-box")+(this.className?" highcharts-"+this.className+"-box":"")),_.add(this)}d.x=a=this.getCrispAdjust(),d.y=(this.baseline?-this.baselineOffset:0)+a,d.width=Math.round(this.width),d.height=Math.round(this.height),this.box.attr(Xv(d,this.deferredAttr)),this.deferredAttr={}}}updateTextPadding(){let a=this.text,u=a.styles.textAlign||this.textAlign;if(!a.textPath){this.updateBoxSize();let d=this.baseline?0:this.baselineOffset,p=(this.paddingLeft??this.padding)+Kv(u)*(this.widthSetting??this.bBox.width);(p!==a.x||d!==a.y)&&(a.attr({align:u,x:p}),d!==void 0&&a.attr("y",d)),a.x=p,a.y=d}}widthSetter(a){this.widthSetting=Vl(a)?a:void 0,this.doUpdate=!0}getPaddedWidth(){let a=this.padding,u=Bl(this.paddingLeft,a),d=Bl(this.paddingRight,a);return(this.widthSetting||this.bBox.width||0)+u+d}xSetter(a){this.x=a,this.alignFactor&&(a-=this.alignFactor*this.getPaddedWidth(),this["forceAnimate:x"]=!0),this.anchorX&&(this["forceAnimate:anchorX"]=!0),this.xSetting=Math.round(a),this.attr("translateX",this.xSetting)}ySetter(a){this.anchorY&&(this["forceAnimate:anchorY"]=!0),this.ySetting=this.y=Math.round(a),this.attr("translateY",this.ySetting)}}Ga.emptyBBox={width:0,height:0,x:0,y:0},Ga.textProps=["color","direction","fontFamily","fontSize","fontStyle","fontWeight","lineClamp","lineHeight","textAlign","textDecoration","textOutline","textOverflow","whiteSpace","width"];let{defined:Xf,isNumber:Qv,pick:Ul}=Q;function Pd(k,a,u,d,p){let m=[];if(p){let b=p.start||0,_=p.end||0,w=Ul(p.r,u),S=Ul(p.r,d||u),N=2e-4/(p.borderRadius?1:Math.max(w,1)),T=Math.abs(_-b-2*Math.PI)<N;T&&(b=Math.PI/2,_=2.5*Math.PI-N);let U=p.innerR,Y=Ul(p.open,T),se=Math.cos(b),de=Math.sin(b),ue=Math.cos(_),le=Math.sin(_),me=Ul(p.longArc,_-b-Math.PI<N?0:1),ye=["A",w,S,0,me,Ul(p.clockwise,1),k+w*ue,a+S*le];ye.params={start:b,end:_,cx:k,cy:a},m.push(["M",k+w*se,a+S*de],ye),Xf(U)&&((ye=["A",U,U,0,me,Xf(p.clockwise)?1-p.clockwise:0,k+U*se,a+U*de]).params={start:_,end:b,cx:k,cy:a},m.push(Y?["M",k+U*ue,a+U*le]:["L",k+U*ue,a+U*le],ye)),Y||m.push(["Z"])}return m}function Kf(k,a,u,d,p){return p!=null&&p.r?$d(k,a,u,d,p):[["M",k,a],["L",k+u,a],["L",k+u,a+d],["L",k,a+d],["Z"]]}function $d(k,a,u,d,p){let m=(p==null?void 0:p.r)||0;return[["M",k+m,a],["L",k+u-m,a],["A",m,m,0,0,1,k+u,a+m],["L",k+u,a+d-m],["A",m,m,0,0,1,k+u-m,a+d],["L",k+m,a+d],["A",m,m,0,0,1,k,a+d-m],["L",k,a+m],["A",m,m,0,0,1,k+m,a],["Z"]]}let Jf={arc:Pd,callout:function(k,a,u,d,p){let m=Math.min((p==null?void 0:p.r)||0,u,d),b=m+6,_=p==null?void 0:p.anchorX,w=(p==null?void 0:p.anchorY)||0,S=$d(k,a,u,d,{r:m});if(!Qv(_)||_<u&&_>0&&w<d&&w>0)return S;if(k+_>u-b)if(w>a+b&&w<a+d-b)S.splice(3,1,["L",k+u,w-6],["L",k+u+6,w],["L",k+u,w+6],["L",k+u,a+d-m]);else if(_<u){let N=w<a+b,T=N?a:a+d;S.splice(N?2:5,0,["L",_,w],["L",k+u-m,T])}else S.splice(3,1,["L",k+u,d/2],["L",_,w],["L",k+u,d/2],["L",k+u,a+d-m]);else if(k+_<b)if(w>a+b&&w<a+d-b)S.splice(7,1,["L",k,w+6],["L",k-6,w],["L",k,w-6],["L",k,a+m]);else if(_>0){let N=w<a+b,T=N?a:a+d;S.splice(N?1:6,0,["L",_,w],["L",k+m,T])}else S.splice(7,1,["L",k,d/2],["L",_,w],["L",k,d/2],["L",k,a+m]);else w>d&&_<u-b?S.splice(5,1,["L",_+6,a+d],["L",_,a+d+6],["L",_-6,a+d],["L",k+m,a+d]):w<0&&_>b&&S.splice(1,1,["L",_-6,a],["L",_,a-6],["L",_+6,a],["L",u-m,a]);return S},circle:function(k,a,u,d){return Pd(k+u/2,a+d/2,u/2,d/2,{start:.5*Math.PI,end:2.5*Math.PI,open:!1})},diamond:function(k,a,u,d){return[["M",k+u/2,a],["L",k+u,a+d/2],["L",k+u/2,a+d],["L",k,a+d/2],["Z"]]},rect:Kf,roundedRect:$d,square:Kf,triangle:function(k,a,u,d){return[["M",k+u/2,a],["L",k+u,a+d],["L",k,a+d],["Z"]]},"triangle-down":function(k,a,u,d){return[["M",k,a],["L",k+u,a],["L",k+u/2,a+d],["Z"]]}},{doc:Id,SVG_NS:Zv,win:Qf}=B,{attr:Md,extend:qn,fireEvent:tc,isString:eb,objectEach:ae,pick:V}=Q,ie=(k,a)=>k.substring(0,a)+"â¦",ke=class{constructor(k){let a=k.styles;this.renderer=k.renderer,this.svgElement=k,this.width=k.textWidth,this.textLineHeight=a==null?void 0:a.lineHeight,this.textOutline=a==null?void 0:a.textOutline,this.ellipsis=(a==null?void 0:a.textOverflow)==="ellipsis",this.lineClamp=a==null?void 0:a.lineClamp,this.noWrap=(a==null?void 0:a.whiteSpace)==="nowrap"}buildSVG(){let k=this.svgElement,a=k.element,u=k.renderer,d=V(k.textStr,"").toString(),p=d.indexOf("<")!==-1,m=a.childNodes,b=!k.added&&u.box,_=[d,this.ellipsis,this.noWrap,this.textLineHeight,this.textOutline,k.getStyle("font-size"),k.styles.lineClamp,this.width].join(",");if(_!==k.textCache){k.textCache=_,delete k.actualWidth;for(let w=m.length;w--;)a.removeChild(m[w]);if(p||this.ellipsis||this.width||k.textPath||d.indexOf(" ")!==-1&&(!this.noWrap||/<br.*?>/g.test(d))){if(d!==""){b&&b.appendChild(a);let w=new qs(d);this.modifyTree(w.nodes),w.addToDOM(a),this.modifyDOM(),this.ellipsis&&(a.textContent||"").indexOf("â¦")!==-1&&k.attr("title",this.unescapeEntities(k.textStr||"",["<",">"])),b&&b.removeChild(a)}}else a.appendChild(Id.createTextNode(this.unescapeEntities(d)));eb(this.textOutline)&&k.applyTextOutline&&k.applyTextOutline(this.textOutline)}}modifyDOM(){let k,a=this.svgElement,u=Md(a.element,"x");for(a.firstLineMetrics=void 0;(k=a.element.firstChild)&&/^[\s\u200B]*$/.test(k.textContent||" ");)a.element.removeChild(k);[].forEach.call(a.element.querySelectorAll("tspan.highcharts-br"),(b,_)=>{b.nextSibling&&b.previousSibling&&(_===0&&b.previousSibling.nodeType===1&&(a.firstLineMetrics=a.renderer.fontMetrics(b.previousSibling)),Md(b,{dy:this.getLineHeight(b.nextSibling),x:u}))});let d=this.width||0;if(!d)return;let p=(b,_)=>{var de;let w=b.textContent||"",S=w.replace(/([^\^])-/g,"$1- ").split(" "),N=!this.noWrap&&(S.length>1||a.element.childNodes.length>1),T=this.getLineHeight(_),U=Math.max(0,d-.8*T),Y=0,se=a.actualWidth;if(N){let ue=[],le=[];for(;_.firstChild&&_.firstChild!==b;)le.push(_.firstChild),_.removeChild(_.firstChild);for(;S.length;)if(S.length&&!this.noWrap&&Y>0&&(ue.push(b.textContent||""),b.textContent=S.join(" ").replace(/- /g,"-")),this.truncate(b,void 0,S,Y===0&&se||0,d,U,(me,ye)=>S.slice(0,ye).join(" ").replace(/- /g,"-")),se=a.actualWidth,Y++,this.lineClamp&&Y>=this.lineClamp){S.length&&(this.truncate(b,b.textContent||"",void 0,0,d,U,ie),b.textContent=((de=b.textContent)==null?void 0:de.replace("â¦",""))+"â¦");break}le.forEach(me=>{_.insertBefore(me,b)}),ue.forEach(me=>{_.insertBefore(Id.createTextNode(me),b);let ye=Id.createElementNS(Zv,"tspan");ye.textContent="â",Md(ye,{dy:T,x:u}),_.insertBefore(ye,b)})}else this.ellipsis&&w&&this.truncate(b,w,void 0,0,d,U,ie)},m=b=>{[].slice.call(b.childNodes).forEach(_=>{_.nodeType===Qf.Node.TEXT_NODE?p(_,b):(_.className.baseVal.indexOf("highcharts-br")!==-1&&(a.actualWidth=0),m(_))})};m(a.element)}getLineHeight(k){let a=k.nodeType===Qf.Node.TEXT_NODE?k.parentElement:k;return this.textLineHeight?parseInt(this.textLineHeight.toString(),10):this.renderer.fontMetrics(a||this.svgElement.element).h}modifyTree(k){let a=(u,d)=>{let{attributes:p={},children:m,style:b={},tagName:_}=u,w=this.renderer.styledMode;if(_==="b"||_==="strong"?w?p.class="highcharts-strong":b.fontWeight="bold":(_==="i"||_==="em")&&(w?p.class="highcharts-emphasized":b.fontStyle="italic"),b!=null&&b.color&&(b.fill=b.color),_==="br"){p.class="highcharts-br",u.textContent="â";let S=k[d+1];S!=null&&S.textContent&&(S.textContent=S.textContent.replace(/^ +/gm,""))}else _==="a"&&m&&m.some(S=>S.tagName==="#text")&&(u.children=[{children:m,tagName:"tspan"}]);_!=="#text"&&_!=="a"&&(u.tagName="tspan"),qn(u,{attributes:p,style:b}),m&&m.filter(S=>S.tagName!=="#text").forEach(a)};k.forEach(a),tc(this.svgElement,"afterModifyTree",{nodes:k})}truncate(k,a,u,d,p,m,b){let _,w,S=this.svgElement,{rotation:N}=S,T=[],U=u&&!d?1:0,Y=(a||u||"").length,se=Y;u||(p=m);let de=function(ue,le){let me=le||ue,ye=k.parentNode;if(ye&&T[me]===void 0&&ye.getSubStringLength)try{T[me]=d+ye.getSubStringLength(0,u?me+1:me)}catch{}return T[me]};if(S.rotation=0,d+(w=de(k.textContent.length))>p){for(;U<=Y;)se=Math.ceil((U+Y)/2),u&&(_=b(u,se)),w=de(se,_&&_.length-1),U===Y?U=Y+1:w>p?Y=se-1:U=se;Y===0?k.textContent="":a&&Y===a.length-1||(k.textContent=_||b(a||u,se)),this.ellipsis&&w>p&&this.truncate(k,k.textContent||"",void 0,0,p,m,ie)}u&&u.splice(0,se),S.actualWidth=w,S.rotation=N}unescapeEntities(k,a){return ae(this.renderer.escapes,function(u,d){a&&a.indexOf(u)!==-1||(k=k.toString().replace(RegExp(u,"g"),d))}),k}},{defaultOptions:$e}=He,{charts:lt,deg2rad:kt,doc:Vt,isFirefox:us,isMS:$s,isWebKit:Hs,noop:wn,SVG_NS:sc,symbolSizes:Nd,win:nc}=B,{addEvent:ic,attr:jl,createElement:tb,crisp:Ld,css:rc,defined:Xa,destroyObjectProperties:Zf,extend:_a,isArray:ep,isNumber:ea,isObject:Ka,isString:tp,merge:Rd,pick:Fd,pInt:sb,replaceNested:nb,uniqueKey:sp}=Q;class np{constructor(a,u,d,p,m,b,_){let w,S;this.x=0,this.y=0;let N=this.createElement("svg").attr({version:"1.1",class:"highcharts-root"}),T=N.element;_||N.css(this.getStyle(p||{})),a.appendChild(T),jl(a,"dir","ltr"),a.innerHTML.indexOf("xmlns")===-1&&jl(T,"xmlns",this.SVG_NS),this.box=T,this.boxWrapper=N,this.alignedObjects=[],this.url=this.getReferenceURL(),this.createElement("desc").add().element.appendChild(Vt.createTextNode("Created with Highcharts 12.4.0")),this.defs=this.createElement("defs").add(),this.allowHTML=b,this.forExport=m,this.styledMode=_,this.gradients={},this.cache={},this.cacheKeys=[],this.imgCount=0,this.rootFontSize=N.getStyle("font-size"),this.setSize(u,d,!1),us&&a.getBoundingClientRect&&((w=function(){rc(a,{left:0,top:0}),S=a.getBoundingClientRect(),rc(a,{left:Math.ceil(S.left)-S.left+"px",top:Math.ceil(S.top)-S.top+"px"})})(),this.unSubPixelFix=ic(nc,"resize",w))}definition(a){return new qs([a]).addToDOM(this.defs.element)}getReferenceURL(){if((us||Hs)&&Vt.getElementsByTagName("base").length){if(!Xa(n)){let a=sp(),u=new qs([{tagName:"svg",attributes:{width:8,height:8},children:[{tagName:"defs",children:[{tagName:"clipPath",attributes:{id:a},children:[{tagName:"rect",attributes:{width:4,height:4}}]}]},{tagName:"rect",attributes:{id:"hitme",width:8,height:8,"clip-path":`url(#${a})`,fill:"rgba(0,0,0,0.001)"}}]}]).addToDOM(Vt.body);rc(u,{position:"fixed",top:0,left:0,zIndex:9e5});let d=Vt.elementFromPoint(6,6);n=(d==null?void 0:d.id)==="hitme",Vt.body.removeChild(u)}if(n)return nb(nc.location.href.split("#")[0],[/<[^>]*>/g,""],[/([\('\)])/g,"\\$1"],[/ /g,"%20"])}return""}getStyle(a){return this.style=_a({fontFamily:'-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", sans-serif',fontSize:"1rem"},a),this.style}setStyle(a){this.boxWrapper.css(this.getStyle(a))}isHidden(){return!this.boxWrapper.getBBox().width}destroy(){let a=this.defs;return this.box=null,this.boxWrapper=this.boxWrapper.destroy(),Zf(this.gradients||{}),this.gradients=null,this.defs=a.destroy(),this.unSubPixelFix&&this.unSubPixelFix(),this.alignedObjects=null,null}createElement(a){return new this.Element(this,a)}getRadialAttr(a,u){return{cx:a[0]-a[2]/2+(u.cx||0)*a[2],cy:a[1]-a[2]/2+(u.cy||0)*a[2],r:(u.r||0)*a[2]}}shadowDefinition(a){let u=[`highcharts-drop-shadow-${this.chartIndex}`,...Object.keys(a).map(p=>`${p}-${a[p]}`)].join("-").toLowerCase().replace(/[^a-z\d\-]/g,""),d=Rd({color:"#000000",offsetX:1,offsetY:1,opacity:.15,width:5},a);return this.defs.element.querySelector(`#${u}`)||this.definition({tagName:"filter",attributes:{id:u,filterUnits:d.filterUnits},children:this.getShadowFilterContent(d)}),u}getShadowFilterContent(a){return[{tagName:"feDropShadow",attributes:{dx:a.offsetX,dy:a.offsetY,"flood-color":a.color,"flood-opacity":Math.min(5*a.opacity,1),stdDeviation:a.width/2}}]}buildText(a){new ke(a).buildSVG()}getContrast(a){if(a==="transparent")return"#000000";let u=gs.parse(a).rgba,d=" clamp(0,calc(9e9*(0.5 - (0.2126*r + 0.7152*g + 0.0722*b))),1)";if(ea(u[0])||!gs.useColorMix){let p=u.map(b=>{let _=b/255;return _<=.04?_/12.92:Math.pow((_+.055)/1.055,2.4)}),m=.2126*p[0]+.7152*p[1]+.0722*p[2];return 1.05/(m+.05)>(m+.05)/.05?"#FFFFFF":"#000000"}return"color(from "+a+" srgb"+d+d+d+")"}button(a,u,d,p,m={},b,_,w,S,N){let T=this.label(a,u,d,S,void 0,void 0,N,void 0,"button"),U=this.styledMode,Y=arguments,se=0;m=Rd($e.global.buttonTheme,m),U&&(delete m.fill,delete m.stroke,delete m["stroke-width"]);let de=m.states||{},ue=m.style||{};delete m.states,delete m.style;let le=[qs.filterUserAttributes(m)],me=[ue];return U||["hover","select","disabled"].forEach((ye,Le)=>{le.push(Rd(le[0],qs.filterUserAttributes(Y[Le+5]||de[ye]||{}))),me.push(le[Le+1].style),delete le[Le+1].style}),ic(T.element,$s?"mouseover":"mouseenter",function(){se!==3&&T.setState(1)}),ic(T.element,$s?"mouseout":"mouseleave",function(){se!==3&&T.setState(se)}),T.setState=(ye=0)=>{if(ye!==1&&(T.state=se=ye),T.removeClass(/highcharts-button-(normal|hover|pressed|disabled)/).addClass("highcharts-button-"+["normal","hover","pressed","disabled"][ye]),!U){T.attr(le[ye]);let Le=me[ye];Ka(Le)&&T.css(Le)}},T.attr(le[0]),!U&&(T.css(_a({cursor:"default"},ue)),N&&T.text.css({pointerEvents:"none"})),T.on("touchstart",ye=>ye.stopPropagation()).on("click",function(ye){se!==3&&(p==null||p.call(T,ye))})}crispLine(a,u){let[d,p]=a;return Xa(d[1])&&d[1]===p[1]&&(d[1]=p[1]=Ld(d[1],u)),Xa(d[2])&&d[2]===p[2]&&(d[2]=p[2]=Ld(d[2],u)),a}path(a){let u=this.styledMode?{}:{fill:"none"};return ep(a)?u.d=a:Ka(a)&&_a(u,a),this.createElement("path").attr(u)}circle(a,u,d){let p=Ka(a)?a:a===void 0?{}:{x:a,y:u,r:d},m=this.createElement("circle");return m.xSetter=m.ySetter=function(b,_,w){w.setAttribute("c"+_,b)},m.attr(p)}arc(a,u,d,p,m,b){let _;Ka(a)?(u=(_=a).y,d=_.r,p=_.innerR,m=_.start,b=_.end,a=_.x):_={innerR:p,start:m,end:b};let w=this.symbol("arc",a,u,d,d,_);return w.r=d,w}rect(a,u,d,p,m,b){let _=Ka(a)?a:a===void 0?{}:{x:a,y:u,r:m,width:Math.max(d||0,0),height:Math.max(p||0,0)},w=this.createElement("rect");return this.styledMode||(b!==void 0&&(_["stroke-width"]=b,_a(_,w.crisp(_))),_.fill="none"),w.rSetter=function(S,N,T){w.r=S,jl(T,{rx:S,ry:S})},w.rGetter=function(){return w.r||0},w.attr(_)}roundedRect(a){return this.symbol("roundedRect").attr(a)}setSize(a,u,d){this.width=a,this.height=u,this.boxWrapper.animate({width:a,height:u},{step:function(){this.attr({viewBox:"0 0 "+this.attr("width")+" "+this.attr("height")})},duration:Fd(d,!0)?void 0:0}),this.alignElements()}g(a){let u=this.createElement("g");return a?u.attr({class:"highcharts-"+a}):u}image(a,u,d,p,m,b){let _={preserveAspectRatio:"none"};ea(u)&&(_.x=u),ea(d)&&(_.y=d),ea(p)&&(_.width=p),ea(m)&&(_.height=m);let w=this.createElement("image").attr(_),S=function(N){w.attr({href:a}),b.call(w,N)};if(b){w.attr({href:"data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw=="});let N=new nc.Image;ic(N,"load",S),N.src=a,N.complete&&S({})}else w.attr({href:a});return w}symbol(a,u,d,p,m,b){var ue,le;let _,w,S,N,T=this,U=/^url\((.*?)\)$/,Y=U.test(a),se=!Y&&(this.symbols[a]?a:"circle"),de=se&&this.symbols[se];if(de)typeof u=="number"&&(w=de.call(this.symbols,u||0,d||0,p||0,m||0,b)),_=this.path(w),T.styledMode||_.attr("fill","none"),_a(_,{symbolName:se||void 0,x:u,y:d,width:p,height:m}),b&&_a(_,b);else if(Y){S=a.match(U)[1];let me=_=this.image(S);me.imgwidth=Fd(b==null?void 0:b.width,(ue=Nd[S])==null?void 0:ue.width),me.imgheight=Fd(b==null?void 0:b.height,(le=Nd[S])==null?void 0:le.height),N=ye=>ye.attr({width:ye.width,height:ye.height}),["width","height"].forEach(ye=>{me[`${ye}Setter`]=function(Le,De){this[De]=Le;let{alignByTranslate:Ie,element:Ge,width:Ue,height:qe,imgwidth:rt,imgheight:dt}=this,xt=De==="width"?rt:dt,Et=1;b&&b.backgroundSize==="within"&&Ue&&qe&&rt&&dt?(Et=Math.min(Ue/rt,qe/dt),jl(Ge,{width:Math.round(rt*Et),height:Math.round(dt*Et)})):Ge&&xt&&Ge.setAttribute(De,xt),!Ie&&rt&&dt&&this.translate(((Ue||0)-rt*Et)/2,((qe||0)-dt*Et)/2)}}),Xa(u)&&me.attr({x:u,y:d}),me.isImg=!0,me.symbolUrl=a,Xa(me.imgwidth)&&Xa(me.imgheight)?N(me):(me.attr({width:0,height:0}),tb("img",{onload:function(){let ye=lt[T.chartIndex];this.width===0&&(rc(this,{position:"absolute",top:"-999em"}),Vt.body.appendChild(this)),Nd[S]={width:this.width,height:this.height},me.imgwidth=this.width,me.imgheight=this.height,me.element&&N(me),this.parentNode&&this.parentNode.removeChild(this),T.imgCount--,T.imgCount||!ye||ye.hasLoaded||ye.onload()},src:S}),this.imgCount++)}return _}clipRect(a,u,d,p){return this.rect(a,u,d,p,0)}text(a,u,d,p){let m={};if(p&&(this.allowHTML||!this.forExport))return this.html(a,u,d);m.x=Math.round(u||0),d&&(m.y=Math.round(d)),Xa(a)&&(m.text=a);let b=this.createElement("text").attr(m);return p&&(!this.forExport||this.allowHTML)||(b.xSetter=function(_,w,S){let N=S.getElementsByTagName("tspan"),T=S.getAttribute(w);for(let U=0,Y;U<N.length;U++)(Y=N[U]).getAttribute(w)===T&&Y.setAttribute(w,_);S.setAttribute(w,_)}),b}fontMetrics(a){let u=ea(a)?a:sb(Zr.prototype.getStyle.call(a,"font-size")||0),d=u<24?u+3:Math.round(1.2*u),p=Math.round(.8*d);return{h:d,b:p,f:u}}rotCorr(a,u,d){let p=a;return u&&d&&(p=Math.max(p*Math.cos(u*kt),4)),{x:-a/3*Math.sin(u*kt),y:p}}pathToSegments(a){let u=[],d=[],p={A:8,C:7,H:2,L:3,M:3,Q:5,S:5,T:3,V:2};for(let m=0;m<a.length;m++)tp(d[0])&&ea(a[m])&&d.length===p[d[0].toUpperCase()]&&a.splice(m,0,d[0].replace("M","L").replace("m","l")),typeof a[m]=="string"&&(d.length&&u.push(d.slice(0)),d.length=0),d.push(a[m]);return u.push(d.slice(0)),u}label(a,u,d,p,m,b,_,w,S){return new Ga(this,a,u,d,p,m,b,_,w,S)}
61alignElements(){this.alignedObjects.forEach(a=>a.align())}}_a(np.prototype,{Element:Zr,SVG_NS:sc,escapes:{"&":"&","<":"<",">":">","'":"'",'"':"""},symbols:Jf,draw:wn}),Ll.registerRendererType("svg",np,!0);let{composed:GP,isFirefox:XP}=B,{attr:KP,css:Bo,createElement:JP,defined:Tx,extend:QP,getAlignFactor:ZP,isNumber:ip,pInt:e$,pushUnique:t$}=Q;function Ax(k,a,u){var p;let d=(p=this.div)==null?void 0:p.style;Zr.prototype[`${a}Setter`].call(this,k,a,u),d&&(u.style[a]=d[a]=k)}let s$=(k,a)=>{var u;if(!k.div){let d=KP(k.element,"class"),p=k.css,m=JP("div",d?{className:d}:void 0,{position:"absolute",left:`${k.translateX||0}px`,top:`${k.translateY||0}px`,...k.styles,display:k.display,opacity:k.opacity,visibility:k.visibility},((u=k.parentGroup)==null?void 0:u.div)||a);k.classSetter=(b,_,w)=>{w.setAttribute("class",b),m.className=b},k.translateXSetter=k.translateYSetter=(b,_)=>{k[_]=b,m.style[_==="translateX"?"left":"top"]=`${b}px`,k.doTransform=!0},k.scaleXSetter=k.scaleYSetter=(b,_)=>{k[_]=b,k.doTransform=!0},k.opacitySetter=k.visibilitySetter=Ax,k.css=b=>(p.call(k,b),b.cursor&&(m.style.cursor=b.cursor),b.pointerEvents&&(m.style.pointerEvents=b.pointerEvents),k),k.on=function(){return Zr.prototype.on.apply({element:m,onEvents:k.onEvents},arguments),k},k.div=m}return k.div};class ac extends Zr{static compose(a){t$(GP,this.compose)&&(a.prototype.html=function(u,d,p){return new ac(this,"span").attr({text:u,x:Math.round(d),y:Math.round(p)})})}constructor(a,u){super(a,u),ac.useForeignObject?this.foreignObject=a.createElement("foreignObject").attr({zIndex:2}):this.css({position:"absolute",...a.styledMode?{}:{fontFamily:a.style.fontFamily,fontSize:a.style.fontSize}}),this.element.style.whiteSpace="nowrap"}getSpanCorrection(a,u,d){this.xCorr=-a*d,this.yCorr=-u}css(a){let u,{element:d}=this,p=d.tagName==="SPAN"&&a&&"width"in a,m=p&&a.width;return p&&(delete a.width,this.textWidth=e$(m)||void 0,u=!0),(a==null?void 0:a.textOverflow)==="ellipsis"&&(a.overflow="hidden",a.whiteSpace="nowrap"),a!=null&&a.lineClamp&&(a.display="-webkit-box",a.WebkitLineClamp=a.lineClamp,a.WebkitBoxOrient="vertical",a.overflow="hidden"),ip(Number(a==null?void 0:a.fontSize))&&(a.fontSize+="px"),QP(this.styles,a),Bo(d,a),u&&this.updateTransform(),this}htmlGetBBox(){let{element:a}=this;return{x:a.offsetLeft,y:a.offsetTop,width:a.offsetWidth,height:a.offsetHeight}}updateTransform(){var me;if(!this.added){this.alignOnAdd=!0;return}let{element:a,foreignObject:u,oldTextWidth:d,renderer:p,rotation:m,rotationOriginX:b,rotationOriginY:_,scaleX:w,scaleY:S,styles:{display:N="inline-block",whiteSpace:T},textAlign:U="left",textWidth:Y,translateX:se=0,translateY:de=0,x:ue=0,y:le=0}=this;if(u||Bo(a,{marginLeft:`${se}px`,marginTop:`${de}px`}),a.tagName==="SPAN"){let ye,Le=[m,U,a.innerHTML,Y,this.textAlign].join(","),De=-(((me=this.parentGroup)==null?void 0:me.padding)*1)||0;if(Y!==d){let qe=this.textPxLength?this.textPxLength:(Bo(a,{width:"",whiteSpace:T||"nowrap"}),a.offsetWidth),rt=Y||0,dt=!p.styledMode&&a.style.textOverflow===""&&a.style.webkitLineClamp;(rt>d||qe>rt||dt)&&(/[\-\s\u00AD]/.test(a.textContent||a.innerText)||a.style.textOverflow==="ellipsis")&&(Bo(a,{width:(m||w||qe>rt||dt)&&ip(Y)?Y+"px":"auto",display:N,whiteSpace:T||"normal"}),this.oldTextWidth=Y)}u&&(Bo(a,{display:"inline-block",verticalAlign:"top"}),u.attr({width:p.width,height:p.height})),Le!==this.cTT&&(ye=p.fontMetrics(a).b,Tx(m)&&!u&&(m!==(this.oldRotation||0)||U!==this.oldAlign)&&Bo(a,{transform:`rotate(${m}deg)`,transformOrigin:`${De}% ${De}px`}
vendor: 42,472 bytes, line 61
61),this.getSpanCorrection(!Tx(m)&&!this.textWidth&&this.textPxLength||a.offsetWidth,ye,ZP(U)));let{xCorr:Ie=0,yCorr:Ge=0}=this,Ue={left:`${ue+Ie}px`,top:`${le+Ge}px`,textAlign:U,transformOrigin:`${(b??ue)-Ie-ue-De}px ${(_??le)-Ge-le-De}px`};(w||S)&&(Ue.transform=`scale(${w??1},${S??1})`),u?(super.updateTransform(),ip(ue)&&ip(le)?(u.attr({x:ue+Ie,y:le+Ge,width:a.offsetWidth+3,height:a.offsetHeight,"transform-origin":a.getAttribute("transform-origin")||"0 0"}),Bo(a,{display:N,textAlign:U})):XP&&u.attr({width:0,height:0})):Bo(a,Ue),this.cTT=Le,this.oldRotation=m,this.oldAlign=U}}add(a){let{foreignObject:u,renderer:d}=this,p=d.box.parentNode,m=[];if(u)u.add(a),super.add(d.createElement("body").attr({xmlns:"http://www.w3.org/1999/xhtml"}).css({background:"transparent",margin:"0 3px 0 0"}).add(u));else{let b;if(this.parentGroup=a,a&&!(b=a.div)){let _=a;for(;_;)m.push(_),_=_.parentGroup;for(let w of m.reverse())b=s$(w,p)}(b||p).appendChild(this.element)}return this.added=!0,this.alignOnAdd&&this.updateTransform(),this}textSetter(a){a!==this.textStr&&(delete this.bBox,delete this.oldTextWidth,qs.setElementHTML(this.element,a??""),this.textStr=a,this.doTransform=!0)}alignSetter(a){this.alignValue=this.textAlign=a,this.doTransform=!0}xSetter(a,u){this[u]=a,this.doTransform=!0}}let Hl=ac.prototype;Hl.visibilitySetter=Hl.opacitySetter=Ax,Hl.ySetter=Hl.rotationSetter=Hl.rotationOriginXSetter=Hl.rotationOriginYSetter=Hl.xSetter,(function(k){k.xAxis={alignTicks:!0,allowDecimals:void 0,panningEnabled:!0,zIndex:2,zoomEnabled:!0,dateTimeLabelFormats:{millisecond:{main:"%[HMSL]",range:!1},second:{main:"%[HMS]",range:!1},minute:{main:"%[HM]",range:!1},hour:{main:"%[HM]",range:!1},day:{main:"%[eb]"},week:{main:"%[eb]"},month:{main:"%[bY]"},year:{main:"%Y"}},endOnTick:!1,gridLineDashStyle:"Solid",gridZIndex:1,labels:{autoRotationLimit:80,distance:15,enabled:!0,indentation:10,overflow:"justify",reserveSpace:void 0,rotation:void 0,staggerLines:0,step:0,useHTML:!1,zIndex:7,style:{color:"#333333",cursor:"default",fontSize:"0.8em",textOverflow:"ellipsis"}},maxPadding:.01,minorGridLineDashStyle:"Solid",minorTickLength:2,minorTickPosition:"outside",minorTicksPerMajor:5,minPadding:.01,offset:void 0,reversed:void 0,reversedStacks:!1,showEmpty:!0,showFirstLabel:!0,showLastLabel:!0,startOfWeek:1,startOnTick:!1,tickLength:10,tickPixelInterval:100,tickmarkPlacement:"between",tickPosition:"outside",title:{align:"middle",useHTML:!1,x:0,y:0,style:{color:"#666666",fontSize:"0.8em"}},visible:!0,minorGridLineColor:"#f2f2f2",minorGridLineWidth:1,minorTickColor:"#999999",lineColor:"#333333",lineWidth:1,gridLineColor:"#e6e6e6",gridLineWidth:void 0,tickColor:"#333333"},k.yAxis={reversedStacks:!0,endOnTick:!0,maxPadding:.05,minPadding:.05,tickPixelInterval:72,showLastLabel:!0,labels:{x:void 0},startOnTick:!0,title:{},stackLabels:{animation:{},allowOverlap:!1,enabled:!1,crop:!0,overflow:"justify",formatter:function(){let{numberFormatter:a}=this.axis.chart;return a(this.total||0,-1)},style:{color:"#000000",fontSize:"0.7em",fontWeight:"bold",textOutline:"1px contrast"}},gridLineWidth:1,lineWidth:0}})(c||(c={}));let n$=c,{addEvent:i$,isFunction:r$,objectEach:a$,removeEvent:o$}=Q;(h||(h={})).registerEventOptions=function(k,a){k.eventOptions=k.eventOptions||{},a$(a.events,function(u,d){k.eventOptions[d]!==u&&(k.eventOptions[d]&&(o$(k,d,k.eventOptions[d]),delete k.eventOptions[d]),r$(u)&&(k.eventOptions[d]=u,i$(k,d,u,{order:0})))})};let rp=h,{deg2rad:ib}=B,{clamp:l$,correctFloat:ap,defined:rb,destroyObjectProperties:u$,extend:Ox,fireEvent:Vd,getAlignFactor:c$,isNumber:op,merge:d$,objectEach:h$,pick:xa}=Q,oc=class{constructor(k,a,u,d,p){this.isNew=!0,this.isNewLabel=!0,this.axis=k,this.pos=a,this.type=u||"",this.parameters=p||{},this.tickmarkOffset=this.parameters.tickmarkOffset,this.options=this.parameters.options,Vd(this,"init"),u||d||this.addLabel()}addLabel(){var Ge,Ue;let k=this,a=k.axis,u=a.options,d=a.chart,p=a.categories,m=a.logarithmic,b=a.names,_=k.pos,w=xa((Ge=k.options)==null?void 0:Ge.labels,u.labels),S=a.tickPositions,N=_===S[0],T=_===S[S.length-1],U=(!w.step||w.step===1)&&a.tickInterval===1,Y=S.info,se=k.label,de,ue,le,me=this.parameters.category||(p?xa(p[_],b[_],_):_);m&&op(me)&&(me=ap(m.lin2log(me))),a.dateTime&&(Y?de=(ue=d.time.resolveDTLFormat(u.dateTimeLabelFormats[!((Ue=u.grid)!=null&&Ue.enabled)&&Y.higherRanks[_]||Y.unitName])).main:op(me)&&(de=a.dateTime.getXDateFormat(me,u.dateTimeLabelFormats||{}))),k.isFirst=N,k.isLast=T;let ye={axis:a,chart:d,dateTimeLabelFormat:de,isFirst:N,isLast:T,pos:_,tick:k,tickPositionInfo:Y,value:me};Vd(this,"labelFormat",ye);let Le=qe=>w.formatter?w.formatter.call(qe,qe):w.format?(qe.text=a.defaultLabelFormatter.call(qe),ti.format(w.format,qe,d)):a.defaultLabelFormatter.call(qe),De=Le.call(ye,ye),Ie=ue==null?void 0:ue.list;Ie?k.shortenLabel=function(){for(le=0;le<Ie.length;le++)if(Ox(ye,{dateTimeLabelFormat:Ie[le]}),se.attr({text:Le.call(ye,ye)}),se.getBBox().width<a.getSlotWidth(k)-2*(w.padding||0))return;se.attr({text:""})}:k.shortenLabel=void 0,U&&a._addedPlotLB&&k.moveLabel(De,w),rb(se)||k.movedLabel?se&&se.textStr!==De&&!U&&(!se.textWidth||w.style.width||se.styles.width||se.css({width:null}),se.attr({text:De}),se.textPxLength=se.getBBox().width):(k.label=se=k.createLabel(De,w),k.rotation=0)}createLabel(k,a,u){let d=this.axis,{renderer:p,styledMode:m}=d.chart,b=a.style.whiteSpace,_=rb(k)&&a.enabled?p.text(k,u==null?void 0:u.x,u==null?void 0:u.y,a.useHTML).add(d.labelGroup):void 0;return _&&(m||_.css(d$(a.style)),_.textPxLength=_.getBBox().width,!m&&b&&_.css({whiteSpace:b})),_}destroy(){u$(this,this.axis)}getPosition(k,a,u,d){let p=this.axis,m=p.chart,b=d&&m.oldChartHeight||m.chartHeight,_={x:k?ap(p.translate(a+u,void 0,void 0,d)+p.transB):p.left+p.offset+(p.opposite?(d&&m.oldChartWidth||m.chartWidth)-p.right-p.left:0),y:k?b-p.bottom+p.offset-(p.opposite?p.height:0):ap(b-p.translate(a+u,void 0,void 0,d)-p.transB)};return _.y=l$(_.y,-1e9,1e9),Vd(this,"afterGetPosition",{pos:_}),_}getLabelPosition(k,a,u,d,p,m,b,_){let w,S,N=this.axis,T=N.transA,U=N.isLinked&&N.linkedParent?N.linkedParent.reversed:N.reversed,Y=N.staggerLines,se=N.tickRotCorr||{x:0,y:0},de=d||N.reserveSpaceDefault?0:-N.labelOffset*(N.labelAlign==="center"?.5:1),ue=p.distance,le={};return w=N.side===0?u.rotation?-ue:-u.getBBox().height:N.side===2?se.y+ue:Math.cos(u.rotation*ib)*(se.y-u.getBBox(!1,0).height/2),rb(p.y)&&(w=N.side===0&&N.horiz?p.y+w:p.y),k=k+xa(p.x,[0,1,0,-1][N.side]*ue)+de+se.x-(m&&d?m*T*(U?-1:1):0),a=a+w-(m&&!d?m*T*(U?1:-1):0),Y&&(S=b/(_||1)%Y,N.opposite&&(S=Y-S-1),a+=S*(N.labelOffset/Y)),le.x=k,le.y=Math.round(a),Vd(this,"afterGetLabelPosition",{pos:le,tickmarkOffset:m,index:b}),le}getLabelSize(){return this.label?this.label.getBBox()[this.axis.horiz?"height":"width"]:0}getMarkPath(k,a,u,d,p=!1,m){return m.crispLine([["M",k,a],["L",k+(p?0:-u),a+(p?u:0)]],d)}handleOverflow(k){var ue;let a=this.axis,u=a.options.labels,d=k.x,p=a.chart.chartWidth,m=a.chart.spacing,b=xa(a.labelLeft,Math.min(a.pos,m[3])),_=xa(a.labelRight,Math.max(a.isRadial?0:a.pos+a.len,p-m[1])),w=this.label,S=this.rotation,N=c$(a.labelAlign||w.attr("align")),T=w.getBBox().width,U=a.getSlotWidth(this),Y=U,se=1,de;S||u.overflow!=="justify"?S<0&&d-N*T<b?de=Math.round(d/Math.cos(S*ib)-b):S>0&&d+N*T>_&&(de=Math.round((p-d)/Math.cos(S*ib))):(d-N*T<b?Y=k.x+Y*(1-N)-b:d+(1-N)*T>_&&(Y=_-k.x+Y*N,se=-1),(Y=Math.min(U,Y))<U&&a.labelAlign==="center"&&(k.x+=se*(U-Y-N*(U-Math.min(T,Y)))),(T>Y||a.autoRotation&&((ue=w==null?void 0:w.styles)!=null&&ue.width))&&(de=Y)),de&&w&&(this.shortenLabel?this.shortenLabel():w.css(Ox({},{width:Math.floor(de)+"px",lineClamp:+!a.isRadial})))}moveLabel(k,a){let u=this,d=u.label,p=u.axis,m=!1,b;d&&d.textStr===k?(u.movedLabel=d,m=!0,delete u.label):h$(p.ticks,function(_){m||_.isNew||_===u||!_.label||_.label.textStr!==k||(u.movedLabel=_.label,m=!0,_.labelPos=u.movedLabel.xy,delete _.label)}),!m&&(u.labelPos||d)&&(b=u.labelPos||d.xy,u.movedLabel=u.createLabel(k,a,b),u.movedLabel&&u.movedLabel.attr({opacity:0}))}render(k,a,u){var se;let d=this.axis,p=d.horiz,m=this.pos,b=xa(this.tickmarkOffset,d.tickmarkOffset),_=this.getPosition(p,m,b,a),w=_.x,S=_.y,N=d.pos,T=N+d.len,U=p?w:S,Y=xa(u,(se=this.label)==null?void 0:se.newOpacity,1);!d.chart.polar&&(ap(U)<N||U>T)&&(u=0),u??(u=1),this.isActive=!0,this.renderGridLine(a,u),this.renderMark(_,u),this.renderLabel(_,a,Y,k),this.isNew=!1,Vd(this,"afterRender")}renderGridLine(k,a){let u=this.axis,d=u.options,p={},m=this.pos,b=this.type,_=xa(this.tickmarkOffset,u.tickmarkOffset),w=u.chart.renderer,S=this.gridLine,N,T=d.gridLineWidth,U=d.gridLineColor,Y=d.gridLineDashStyle;this.type==="minor"&&(T=d.minorGridLineWidth,U=d.minorGridLineColor,Y=d.minorGridLineDashStyle),S||(u.chart.styledMode||(p.stroke=U,p["stroke-width"]=T||0,p.dashstyle=Y),b||(p.zIndex=1),k&&(a=0),this.gridLine=S=w.path().attr(p).addClass("highcharts-"+(b?b+"-":"")+"grid-line").add(u.gridGroup)),S&&(N=u.getPlotLinePath({value:m+_,lineWidth:S.strokeWidth(),force:"pass",old:k,acrossPanes:!1}))&&S[k||this.isNew?"attr":"animate"]({d:N,opacity:a})}renderMark(k,a){let u=this.axis,d=u.options,p=u.chart.renderer,m=this.type,b=u.tickSize(m?m+"Tick":"tick"),_=k.x,w=k.y,S=xa(d[m!=="minor"?"tickWidth":"minorTickWidth"],!m&&u.isXAxis?1:0),N=d[m!=="minor"?"tickColor":"minorTickColor"],T=this.mark,U=!T;b&&(u.opposite&&(b[0]=-b[0]),!T&&(this.mark=T=p.path().addClass("highcharts-"+(m?m+"-":"")+"tick").add(u.axisGroup),u.chart.styledMode||T.attr({stroke:N,"stroke-width":S})),T[U?"attr":"animate"]({d:this.getMarkPath(_,w,b[0],T.strokeWidth(),u.horiz,p),opacity:a}))}renderLabel(k,a,u,d){let p=this.axis,m=p.horiz,b=p.options,_=this.label,w=b.labels,S=w.step,N=xa(this.tickmarkOffset,p.tickmarkOffset),T=k.x,U=k.y,Y=!0;_&&op(T)&&(_.xy=k=this.getLabelPosition(T,U,_,m,w,N,d,S),(!this.isFirst||this.isLast||b.showFirstLabel)&&(!this.isLast||this.isFirst||b.showLastLabel)?!m||w.step||w.rotation||a||u===0||this.handleOverflow(k):Y=!1,S&&d%S&&(Y=!1),Y&&op(k.y)?(k.opacity=u,_[this.isNewLabel?"attr":"animate"](k).show(!0),this.isNewLabel=!1):(_.hide(),this.isNewLabel=!0))}replaceMovedLabel(){let k=this.label,a=this.axis;k&&!this.isNew&&(k.animate({opacity:0},void 0,k.destroy),delete this.label),a.isDirty=!0,this.label=this.movedLabel,delete this.movedLabel}},{animObject:f$}=mt,{xAxis:Dx,yAxis:p$}=n$,{defaultOptions:ab}=He,{registerEventOptions:m$}=rp,{deg2rad:g$}=B,{arrayMax:Px,arrayMin:v$,clamp:ob,correctFloat:dr,defined:Qs,destroyObjectProperties:b$,erase:$x,error:lb,extend:lp,fireEvent:fn,getClosestDistance:Ix,insertItem:y$,isArray:Mx,isNumber:Qt,isString:Nx,merge:up,normalizeTickInterval:_$,objectEach:cp,pick:bs,relativeLength:dp,removeEvent:x$,splat:w$,syncTimeout:E$}=Q,Lx=(k,a)=>_$(a,void 0,void 0,bs(k.options.allowDecimals,a<.5||k.tickAmount!==void 0),!!k.tickAmount);lp(ab,{xAxis:Dx,yAxis:up(Dx,p$)});class lc{constructor(a,u,d){this.init(a,u,d)}init(a,u,d=this.coll){let p=d==="xAxis",m=this.isZAxis||(a.inverted?!p:p);this.chart=a,this.horiz=m,this.isXAxis=p,this.coll=d,fn(this,"init",{userOptions:u}),this.opposite=bs(u.opposite,this.opposite),this.side=bs(u.side,this.side,m?2*!this.opposite:this.opposite?1:3),this.setOptions(u);let b=this.options,_=b.labels;this.type??(this.type=b.type||"linear"),this.uniqueNames??(this.uniqueNames=b.uniqueNames??!0),fn(this,"afterSetType"),this.userOptions=u,this.minPixelPadding=0,this.reversed=bs(b.reversed,this.reversed),this.visible=b.visible,this.zoomEnabled=b.zoomEnabled,this.hasNames=this.type==="category"||b.categories===!0,this.categories=Mx(b.categories)&&b.categories||(this.hasNames?[]:void 0),this.names||(this.names=[],this.names.keys={}),this.plotLinesAndBandsGroups={},this.positiveValuesOnly=!!this.logarithmic,this.isLinked=Qs(b.linkedTo),this.ticks={},this.labelEdge=[],this.minorTicks={},this.plotLinesAndBands=[],this.alternateBands={},this.len??(this.len=0),this.minRange=this.userMinRange=b.minRange||b.maxZoom,this.range=b.range,this.offset=b.offset||0,this.max=void 0,this.min=void 0;let w=bs(b.crosshair,w$(a.options.tooltip.crosshairs)[+!p]);this.crosshair=w===!0?{}:w,a.axes.indexOf(this)===-1&&(p?a.axes.splice(a.xAxis.length,0,this):a.axes.push(this),y$(this,a[this.coll])),a.orderItems(this.coll),this.series=this.series||[],a.inverted&&!this.isZAxis&&p&&!Qs(this.reversed)&&(this.reversed=!0),this.labelRotation=Qt(_.rotation)?_.rotation:void 0,m$(this,b),fn(this,"afterInit")}setOptions(a){let u=this.horiz?{labels:{autoRotation:[-45],padding:3},margin:15}:{labels:{padding:1},title:{rotation:90*this.side}};this.options=up(u,this.coll==="yAxis"?{title:{text:this.chart.options.lang.yAxisTitle}}:{},ab[this.coll],a),fn(this,"afterSetOptions",{userOptions:a})}defaultLabelFormatter(){let a=this.axis,{numberFormatter:u}=this.chart,d=Qt(this.value)?this.value:NaN,p=a.chart.time,m=a.categories,b=this.dateTimeLabelFormat,_=ab.lang,w=_.numericSymbols,S=_.numericSymbolMagnitude||1e3,N=a.logarithmic?Math.abs(d):a.tickInterval,T=w==null?void 0:w.length,U,Y;if(m)Y=`${this.value}`;else if(b)Y=p.dateFormat(b,d,!0);else if(T&&w&&N>=1e3)for(;T--&&Y===void 0;)N>=(U=Math.pow(S,T+1))&&10*d%U==0&&w[T]!==null&&d!==0&&(Y=u(d/U,-1)+w[T]);return Y===void 0&&(Y=Math.abs(d)>=1e4?u(d,-1):u(d,-1,void 0,"")),Y}getSeriesExtremes(){let a,u=this;fn(this,"getSeriesExtremes",null,function(){u.hasVisibleSeries=!1,u.dataMin=u.dataMax=u.threshold=void 0,u.softThreshold=!u.isXAxis,u.series.forEach(d=>{if(d.reserveSpace()){let p=d.options,m,b=p.threshold,_,w;if(u.hasVisibleSeries=!0,u.positiveValuesOnly&&0>=(b||0)&&(b=void 0),u.isXAxis)(m=d.getColumn("x")).length&&(m=u.logarithmic?m.filter(S=>S>0):m,_=(a=d.getXExtremes(m)).min,w=a.max,Qt(_)||_ instanceof Date||(m=m.filter(Qt),_=(a=d.getXExtremes(m)).min,w=a.max),m.length&&(u.dataMin=Math.min(bs(u.dataMin,_),_),u.dataMax=Math.max(bs(u.dataMax,w),w)));else{let S=d.applyExtremes();Qt(S.dataMin)&&(_=S.dataMin,u.dataMin=Math.min(bs(u.dataMin,_),_)),Qt(S.dataMax)&&(w=S.dataMax,u.dataMax=Math.max(bs(u.dataMax,w),w)),Qs(b)&&(u.threshold=b),(!p.softThreshold||u.positiveValuesOnly)&&(u.softThreshold=!1)}}})}),fn(this,"afterGetSeriesExtremes")}translate(a,u,d,p,m,b){var de;let _=this.linkedParent||this,w=p&&_.old?_.old.min:_.min;if(!Qt(w))return NaN;let S=_.minPixelPadding,N=(_.isOrdinal||((de=_.brokenAxis)==null?void 0:de.hasBreaks)||_.logarithmic&&m)&&!!_.lin2val,T=1,U=0,Y=p&&_.old?_.old.transA:_.transA,se=0;return Y||(Y=_.transA),d&&(T*=-1,U=_.len),_.reversed&&(T*=-1,U-=T*(_.sector||_.len)),u?(se=(a=a*T+U-S)/Y+w,N&&(se=_.lin2val(se))):(N&&(a=_.val2lin(a)),se=T*(a-w)*Y+U+T*S+(Qt(b)?Y*b:0),_.isRadial||(se=dr(se))),se}toPixels(a,u){var d;return this.translate(((d=this.chart)==null?void 0:d.time.parse(a))??NaN,!1,!this.horiz,void 0,!0)+(u?0:this.pos)}toValue(a,u){return this.translate(a-(u?0:this.pos),!0,!this.horiz,void 0,!0)}getPlotLinePath(a){let u=this,d=u.chart,p=u.left,m=u.top,b=a.old,_=a.value,w=a.lineWidth,S=b&&d.oldChartHeight||d.chartHeight,N=b&&d.oldChartWidth||d.chartWidth,T=u.transB,U=a.translatedValue,Y=a.force,se,de,ue,le,me;function ye(De,Ie,Ge){return Y!=="pass"&&(De<Ie||De>Ge)&&(Y?De=ob(De,Ie,Ge):me=!0),De}let Le={value:_,lineWidth:w,old:b,force:Y,acrossPanes:a.acrossPanes,translatedValue:U};return fn(this,"getPlotLinePath",Le,function(De){se=ue=(U=ob(U=bs(U,u.translate(_,void 0,void 0,b)),-1e9,1e9))+T,de=le=S-U-T,Qt(U)?u.horiz?(de=m,le=S-u.bottom+(u.options.isInternal?0:d.scrollablePixelsY||0),se=ue=ye(se,p,p+u.width)):(se=p,ue=N-u.right+(d.scrollablePixelsX||0),de=le=ye(de,m,m+u.height)):(me=!0,Y=!1),De.path=me&&!Y?void 0:d.renderer.crispLine([["M",se,de],["L",ue,le]],w||1)}),Le.path}getLinearTickPositions(a,u,d){let p,m,b,_=dr(Math.floor(u/a)*a),w=dr(Math.ceil(d/a)*a),S=[];if(dr(_+a)===_&&(b=20),this.single)return[u];for(p=_;p<=w&&(S.push(p),(p=dr(p+a,b))!==m);)m=p;return S}getMinorTickInterval(){let{minorTicks:a,minorTickInterval:u}=this.options;return a===!0?bs(u,"auto"):a!==!1?u:void 0}getMinorTickPositions(){var N;let a=this.options,u=this.tickPositions,d=this.minorTickInterval,p=this.pointRangePadding||0,m=(this.min||0)-p,b=(this.max||0)+p,_=(N=this.brokenAxis)!=null&&N.hasBreaks?this.brokenAxis.unitLength:b-m,w=[],S;if(_&&_/d<this.len/3){let T=this.logarithmic;if(T)this.paddedTicks.forEach(function(U,Y,se){Y&&w.push.apply(w,T.getLogTickPositions(d,se[Y-1],se[Y],!0))});else if(this.dateTime&&this.getMinorTickInterval()==="auto")w=w.concat(this.getTimeTicks(this.dateTime.normalizeTimeTickInterval(d),m,b,a.startOfWeek));else for(S=m+(u[0]-m)%d;S<=b&&S!==w[0];S+=d)w.push(S)}return w.length!==0&&this.trimTicks(w),w}adjustForMinRange(){let a=this.options,u=this.logarithmic,d=this.chart.time,{max:p,min:m,minRange:b}=this,_,w,S,N;this.isXAxis&&b===void 0&&!u&&(b=Qs(a.min)||Qs(a.max)||Qs(a.floor)||Qs(a.ceiling)?null:Math.min(5*(Ix(this.series.map(T=>{let U=T.getColumn("x");return T.xIncrement?U.slice(0,2):U}))||0),this.dataMax-this.dataMin)),Qt(p)&&Qt(m)&&Qt(b)&&p-m<b&&(w=this.dataMax-this.dataMin>=b,_=(b-p+m)/2,S=[m-_,d.parse(a.min)??m-_],w&&(S[2]=u?u.log2lin(this.dataMin):this.dataMin),N=[(m=Px(S))+b,d.parse(a.max)??m+b],w&&(N[2]=u?u.log2lin(this.dataMax):this.dataMax),(p=v$(N))-m<b&&(S[0]=p-b,S[1]=d.parse(a.min)??p-b,m=Px(S))),this.minRange=b,this.min=m,this.max=p}getClosest(){let a,u;if(this.categories)u=1;else{let d=[];this.series.forEach(function(p){let m=p.closestPointRange,b=p.getColumn("x");b.length===1?d.push(b[0]):p.sorted&&Qs(m)&&p.reserveSpace()&&(u=Qs(u)?Math.min(u,m):m)}),d.length&&(d.sort((p,m)=>p-m),a=Ix([d]))}return a&&u?Math.min(a,u):a||u}nameToX(a){let u=Mx(this.options.categories),d=u?this.categories:this.names,p=a.options.x,m;return a.series.requireSorting=!1,Qs(p)||(p=this.uniqueNames&&d?u?d.indexOf(a.name):bs(d.keys[a.name],-1):a.series.autoIncrement()),p===-1?!u&&d&&(m=d.length):Qt(p)&&(m=p),m!==void 0?(this.names[m]=a.name,this.names.keys[a.name]=m):a.x&&(m=a.x),m}updateNames(){let a=this,u=this.names;u.length>0&&(Object.keys(u.keys).forEach(function(d){delete u.keys[d]}),u.length=0,this.minRange=this.userMinRange,(this.series||[]).forEach(d=>{d.xIncrement=null,(!d.points||d.isDirtyData)&&(a.max=Math.max(a.max||0,d.dataTable.rowCount-1),d.processData(),d.generatePoints());let p=d.getColumn("x").slice();d.data.forEach((m,b)=>{let _=p[b];m!=null&&m.options&&m.name!==void 0&&(_=a.nameToX(m))!==void 0&&_!==m.x&&(p[b]=m.x=_)}),d.dataTable.setColumn("x",p)}))}setAxisTranslation(){var U;let a=this,u=a.max-a.min,d=a.linkedParent,p=!!a.categories,m=a.isXAxis,b=a.axisPointRange||0,_,w=0,S=0,N,T=a.transA;(m||p||b)&&(_=a.getClosest(),d?(w=d.minPointOffset,S=d.pointRangePadding):a.series.forEach(function(Y){let se=p?1:m?bs(Y.options.pointRange,_,0):a.axisPointRange||0,de=Y.options.pointPlacement;if(b=Math.max(b,se),!a.single||p){let ue=Y.is("xrange")?!m:m;w=Math.max(w,ue&&Nx(de)?0:se/2),S=Math.max(S,ue&&de==="on"?0:se)}}),N=(U=a.ordinal)!=null&&U.slope&&_?a.ordinal.slope/_:1,a.minPointOffset=w*=N,a.pointRangePadding=S*=N,a.pointRange=Math.min(b,a.single&&p?1:u),m&&(a.closestPointRange=_)),a.translationSlope=a.transA=T=a.staticScale||a.len/(u+S||1),a.transB=a.horiz?a.left:a.bottom,a.minPixelPadding=T*w,fn(this,"afterSetAxisTranslation")}minFromRange(){let{max:a,min:u}=this;return Qt(a)&&Qt(u)&&a-u||void 0}setTickInterval(a){var It,jt,Ct,Wt;let{categories:u,chart:d,dataMax:p,dataMin:m,dateTime:b,isXAxis:_,logarithmic:w,options:S,softThreshold:N}=this,T=d.time,U=Qt(this.threshold)?this.threshold:void 0,Y=this.minRange||0,{ceiling:se,floor:de,linkedTo:ue,softMax:le,softMin:me}=S,ye=Qt(ue)&&((It=d[this.coll])==null?void 0:It[ue]),Le=S.tickPixelInterval,De=S.maxPadding,Ie=S.minPadding,Ge=0,Ue,qe=Qt(S.tickInterval)&&S.tickInterval>=0?S.tickInterval:void 0,rt,dt,xt,Et;if(b||u||ye||this.getTickAmount(),xt=bs(this.userMin,T.parse(S.min)),Et=bs(this.userMax,T.parse(S.max)),ye?(this.linkedParent=ye,Ue=ye.getExtremes(),this.min=bs(Ue.min,Ue.dataMin),this.max=bs(Ue.max,Ue.dataMax),this.type!==ye.type&&lb(11,!0,d)):(N&&Qs(U)&&Qt(p)&&Qt(m)&&(m>=U?(rt=U,Ie=0):p<=U&&(dt=U,De=0)),this.min=bs(xt,rt,m),this.max=bs(Et,dt,p)),Qt(this.max)&&Qt(this.min)&&(w&&(this.positiveValuesOnly&&!a&&0>=Math.min(this.min,bs(m,this.min))&&lb(10,!0,d),this.min=dr(w.log2lin(this.min),16),this.max=dr(w.log2lin(this.max),16)),this.range&&Qt(m)&&(this.userMin=this.min=xt=Math.max(m,this.minFromRange()||0),this.userMax=Et=this.max,this.range=void 0)),fn(this,"foundExtremes"),this.adjustForMinRange(),Qt(this.min)&&Qt(this.max)){if(!Qt(this.userMin)&&Qt(me)&&me<this.min&&(this.min=xt=me),!Qt(this.userMax)&&Qt(le)&&le>this.max&&(this.max=Et=le),u||this.axisPointRange||(jt=this.stacking)!=null&&jt.usePercentage||ye||(Ge=this.max-this.min)&&(!Qs(xt)&&Ie&&(this.min-=Ge*Ie),!Qs(Et)&&De&&(this.max+=Ge*De)),!Qt(this.userMin)&&Qt(de)&&(this.min=Math.max(this.min,de)),!Qt(this.userMax)&&Qt(se)&&(this.max=Math.min(this.max,se)),N&&Qt(m)&&Qt(p)){let hs=U||0;!Qs(xt)&&this.min<hs&&m>=hs?this.min=S.minRange?Math.min(hs,this.max-Y):hs:!Qs(Et)&&this.max>hs&&p<=hs&&(this.max=S.minRange?Math.max(hs,this.min+Y):hs)}!d.polar&&this.min>this.max&&(Qs(S.min)?this.max=this.min:Qs(S.max)&&(this.min=this.max)),Ge=this.max-this.min}if(this.min!==this.max&&Qt(this.min)&&Qt(this.max)?ye&&!qe&&Le===ye.options.tickPixelInterval?this.tickInterval=qe=ye.tickInterval:this.tickInterval=bs(qe,this.tickAmount?Ge/Math.max(this.tickAmount-1,1):void 0,u?1:Ge*Le/Math.max(this.len,Le)):this.tickInterval=1,_&&!a){let hs=this.min!==((Ct=this.old)==null?void 0:Ct.min)||this.max!==((Wt=this.old)==null?void 0:Wt.max);this.series.forEach(function(Ss){var Ts;Ss.forceCrop=(Ts=Ss.forceCropping)==null?void 0:Ts.call(Ss),Ss.processData(hs)}),fn(this,"postProcessData",{hasExtremesChanged:hs})}this.setAxisTranslation(),fn(this,"initialAxisTranslation"),this.pointRange&&!qe&&(this.tickInterval=Math.max(this.pointRange,this.tickInterval));let Rt=bs(S.minTickInterval,b&&!this.series.some(hs=>!hs.sorted)?this.closestPointRange:0);!qe&&Rt&&this.tickInterval<Rt&&(this.tickInterval=Rt),b||w||qe||(this.tickInterval=Lx(this,this.tickInterval)),this.tickAmount||(this.tickInterval=this.unsquish()),this.setTickPositions()}setTickPositions(){var N,T;let a=this.options,u=a.tickPositions,d=a.tickPositioner,p=this.getMinorTickInterval(),m=!this.isPanning,b=m&&a.startOnTick,_=m&&a.endOnTick,w=[],S;if(this.tickmarkOffset=this.categories&&a.tickmarkPlacement==="between"&&this.tickInterval===1?.5:0,this.single=this.min===this.max&&Qs(this.min)&&!this.tickAmount&&(this.min%1==0||a.allowDecimals!==!1),u)w=u.slice();else if(Qt(this.min)&&Qt(this.max)){if(!((N=this.ordinal)!=null&&N.positions)&&(this.max-this.min)/this.tickInterval>Math.max(2*this.len,200))w=[this.min,this.max],lb(19,!1,this.chart);else if(this.dateTime)w=this.getTimeTicks(this.dateTime.normalizeTimeTickInterval(this.tickInterval,a.units),this.min,this.max,a.startOfWeek,(T=this.ordinal)==null?void 0:T.positions,this.closestPointRange,!0);else if(this.logarithmic)w=this.logarithmic.getLogTickPositions(this.tickInterval,this.min,this.max);else{let U=this.tickInterval,Y=U;for(;Y<=2*U&&(w=this.getLinearTickPositions(this.tickInterval,this.min,this.max),this.tickAmount&&w.length>this.tickAmount);)this.tickInterval=Lx(this,Y*=1.1)}w.length>this.len&&(w=[w[0],w[w.length-1]])[0]===w[1]&&(w.length=1),d&&(this.tickPositions=w,(S=d.apply(this,[this.min,this.max]))&&(w=S))}this.tickPositions=w,this.minorTickInterval=p==="auto"&&this.tickInterval?this.tickInterval/a.minorTicksPerMajor:p,this.paddedTicks=w.slice(0),this.trimTicks(w,b,_),!this.isLinked&&Qt(this.min)&&Qt(this.max)&&(this.single&&w.length<2&&!this.categories&&!this.series.some(U=>U.is("heatmap")&&U.options.pointPlacement==="between")&&(this.min-=.5,this.max+=.5),u||S||this.adjustTickAmount()),fn(this,"afterSetTickPositions")}trimTicks(a,u,d){let p=a[0],m=a[a.length-1],b=!this.isOrdinal&&this.minPointOffset||0;if(fn(this,"trimTicks"),!this.isLinked||!this.grid){if(u&&p!==-1/0)this.min=p;else for(;this.min-b>a[0];)a.shift();if(d)this.max=m;else for(;this.max+b<a[a.length-1];)a.pop();a.length===0&&Qs(p)&&!this.options.tickPositions&&a.push((m+p)/2)}}alignToOthers(){let a,u=this,d=u.chart,p=[this],m=u.options,b=d.options.chart,_=this.coll==="yAxis"&&b.alignThresholds,w=[];if(u.thresholdAlignment=void 0,(b.alignTicks!==!1&&m.alignTicks||_)&&m.startOnTick!==!1&&m.endOnTick!==!1&&!u.logarithmic){let S=T=>{let{horiz:U,options:Y}=T;return[U?Y.left:Y.top,Y.width,Y.height,Y.pane].join(",")},N=S(this);d[this.coll].forEach(function(T){let{series:U}=T;U.length&&U.some(Y=>Y.visible)&&T!==u&&S(T)===N&&(a=!0,p.push(T))})}if(a&&_){p.forEach(N=>{let T=N.getThresholdAlignment(u);Qt(T)&&w.push(T)});let S=w.length>1?w.reduce((N,T)=>N+=T,0)/w.length:void 0;p.forEach(N=>{N.thresholdAlignment=S})}return a}getThresholdAlignment(a){if((!Qt(this.dataMin)||this!==a&&this.series.some(u=>u.isDirty||u.isDirtyData))&&this.getSeriesExtremes(),Qt(this.threshold)){let u=ob((this.threshold-(this.dataMin||0))/((this.dataMax||0)-(this.dataMin||0)),0,1);return this.options.reversed&&(u=1-u),u}}getTickAmount(){let a=this.options,u=a.tickPixelInterval,d=a.tickAmount;Qs(a.tickInterval)||d||!(this.len<u)||this.isRadial||this.logarithmic||!a.startOnTick||!a.endOnTick||(d=2),!d&&this.alignToOthers()&&(d=Math.ceil(this.len/u)+1),d<4&&(this.finalTickAmt=d,d=5),this.tickAmount=d}adjustTickAmount(){let a=this,{finalTickAmt:u,max:d,min:p,options:m,tickPositions:b,tickAmount:_,thresholdAlignment:w}=a,S=b==null?void 0:b.length,N=bs(a.threshold,a.softThreshold?0:null),T,U,Y=a.tickInterval,se,de=()=>b.push(dr(b[b.length-1]+Y)),ue=()=>b.unshift(dr(b[0]-Y));if(Qt(w)&&(se=w<.5?Math.ceil(w*(_-1)):Math.floor(w*(_-1)),m.reversed&&(se=_-1-se)),a.hasData()&&Qt(p)&&Qt(d)){let le=()=>{a.transA*=(S-1)/(_-1),a.min=m.startOnTick?b[0]:Math.min(p,b[0]),a.max=m.endOnTick?b[b.length-1]:Math.max(d,b[b.length-1])};if(Qt(se)&&Qt(a.threshold)){for(;b[se]!==N||b.length!==_||b[0]>p||b[b.length-1]<d;){for(b.length=0,b.push(a.threshold);b.length<_;)b[se]===void 0||b[se]>a.threshold?ue():de();if(Y>8*a.tickInterval)break;Y*=2}le()}else if(S<_){for(;b.length<_;)b.length%2||p===N?de():ue();le()}if(Qs(u)){for(U=T=b.length;U--;)(u===3&&U%2==1||u<=2&&U>0&&U<T-1)&&b.splice(U,1);a.finalTickAmt=void 0}}}setScale(){var b,_,w,S,N;let{coll:a,stacking:u}=this,d=!1,p=!1;this.series.forEach(T=>{var U;d=d||T.isDirtyData||T.isDirty,p=p||((U=T.xAxis)==null?void 0:U.isDirty)||!1}),this.setAxisSize();let m=this.len!==((b=this.old)==null?void 0:b.len);m||d||p||this.isLinked||this.forceRedraw||this.userMin!==((_=this.old)==null?void 0:_.userMin)||this.userMax!==((w=this.old)==null?void 0:w.userMax)||this.alignToOthers()?(u&&a==="yAxis"&&u.buildStacks(),this.forceRedraw=!1,this.userMinRange||(this.minRange=void 0),this.getSeriesExtremes(),this.setTickInterval(),u&&a==="xAxis"&&u.buildStacks(),this.isDirty||(this.isDirty=m||this.min!==((S=this.old)==null?void 0:S.min)||this.max!==((N=this.old)==null?void 0:N.max))):u&&u.cleanStacks(),d&&delete this.allExtremes,fn(this,"afterSetScale")}setExtremes(a,u,d=!0,p,m){let b=this.chart;this.series.forEach(_=>{delete _.kdTree}),a=b.time.parse(a),u=b.time.parse(u),fn(this,"setExtremes",m=lp(m,{min:a,max:u}),_=>{this.userMin=_.min,this.userMax=_.max,this.eventArgs=_,d&&b.redraw(p)})}setAxisSize(){let a=this.chart,u=this.options,d=u.offsets||[0,0,0,0],p=this.horiz,m=this.width=Math.round(dp(bs(u.width,a.plotWidth-d[3]+d[1]),a.plotWidth)),b=this.height=Math.round(dp(bs(u.height,a.plotHeight-d[0]+d[2]),a.plotHeight)),_=this.top=Math.round(dp(bs(u.top,a.plotTop+d[0]),a.plotHeight,a.plotTop)),w=this.left=Math.round(dp(bs(u.left,a.plotLeft+d[3]),a.plotWidth,a.plotLeft));this.bottom=a.chartHeight-b-_,this.right=a.chartWidth-m-w,this.len=Math.max(p?m:b,0),this.pos=p?w:_}getExtremes(){let a=this.logarithmic;return{min:a?dr(a.lin2log(this.min)):this.min,max:a?dr(a.lin2log(this.max)):this.max,dataMin:this.dataMin,dataMax:this.dataMax,userMin:this.userMin,userMax:this.userMax}}getThreshold(a){let u=this.logarithmic,d=u?u.lin2log(this.min):this.min,p=u?u.lin2log(this.max):this.max;return a===null||a===-1/0?a=d:a===1/0?a=p:d>a?a=d:p<a&&(a=p),this.translate(a,0,1,0,1)}autoLabelAlign(a){let u=(bs(a,0)-90*this.side+720)%360,d={align:"center"};return fn(this,"autoLabelAlign",d,function(p){u>15&&u<165?p.align="right":u>195&&u<345&&(p.align="left")}),d.align}tickSize(a){let u=this.options,d=bs(u[a==="tick"?"tickWidth":"minorTickWidth"],a==="tick"&&this.isXAxis&&!this.categories?1:0),p=u[a==="tick"?"tickLength":"minorTickLength"],m;d&&p&&(u[a+"Position"]==="inside"&&(p=-p),m=[p,d]);let b={tickSize:m};return fn(this,"afterTickSize",b),b.tickSize}labelMetrics(){let a=this.chart.renderer,u=this.ticks,d=u[Object.keys(u)[0]]||{};return this.chart.renderer.fontMetrics(d.label||d.movedLabel||a.box)}unsquish(){let a=this.options.labels,u=a.padding||0,d=this.horiz,p=this.tickInterval,m=this.len/((+!!this.categories+this.max-this.min)/p),b=a.rotation,_=dr(.8*this.labelMetrics().h),w=Math.max(this.max-this.min,0),S=function(se){let de=(se+2*u)/(m||1);return(de=de>1?Math.ceil(de):1)*p>w&&se!==1/0&&m!==1/0&&w&&(de=Math.ceil(w/p)),dr(de*p)},N=p,T,U=Number.MAX_VALUE,Y;if(d){if(!a.staggerLines&&(Qt(b)?Y=[b]:m<a.autoRotationLimit&&(Y=a.autoRotation)),Y){let se,de;for(let ue of Y)(ue===b||ue&&ue>=-90&&ue<=90)&&(de=(se=S(Math.abs(_/Math.sin(g$*ue))))+Math.abs(ue/360))<U&&(U=de,T=ue,N=se)}}else N=S(.75*_);return this.autoRotation=Y,this.labelRotation=bs(T,Qt(b)?b:0),a.step?p:N}getSlotWidth(a){let u=this.chart,d=this.horiz,p=this.options.labels,m=Math.max(this.tickPositions.length-!this.categories,1),b=u.margin[3];if(a&&Qt(a.slotWidth))return a.slotWidth;if(d&&p.step<2&&!this.isRadial)return p.rotation?0:(this.staggerLines||1)*this.len/m;if(!d){let _=p.style.width;if(_!==void 0)return parseInt(String(_),10);if(!this.opposite&&b)return b-u.spacing[3]}return .33*u.chartWidth}renderUnsquish(){let a=this.chart,u=a.renderer,d=this.tickPositions,p=this.ticks,m=this.options.labels,b=m.style,_=this.horiz,w=this.getSlotWidth(),S=Math.max(1,Math.round(w-(_?2*(m.padding||0):m.distance||0))),N={},T=this.labelMetrics(),U=b.lineClamp,Y,se=U??(Math.floor(this.len/(d.length*T.h))||1),de=0;Nx(m.rotation)||(N.rotation=m.rotation||0),d.forEach(function(ue){var ye;let le=p[ue];le.movedLabel&&le.replaceMovedLabel();let me=((ye=le.label)==null?void 0:ye.textPxLength)||0;me>de&&(de=me)}),this.maxLabelLength=de,this.autoRotation?de>S&&de>T.h?N.rotation=this.labelRotation:this.labelRotation=0:w&&(Y=S),N.rotation&&(Y=de>.5*a.chartHeight?.33*a.chartHeight:de,U||(se=1)),this.labelAlign=m.align||this.autoLabelAlign(this.labelRotation),this.labelAlign&&(N.align=this.labelAlign),d.forEach(function(ue){let le=p[ue],me=le==null?void 0:le.label,ye=b.width,Le={};me&&(me.attr(N),le.shortenLabel?le.shortenLabel():Y&&!ye&&b.whiteSpace!=="nowrap"&&(Y<(me.textPxLength||0)||me.element.tagName==="SPAN")?me.css(lp(Le,{width:`${Y}px`,lineClamp:se})):!me.styles.width||Le.width||ye||me.css({width:"auto"}),le.rotation=N.rotation)},this),this.tickRotCorr=u.rotCorr(T.b,this.labelRotation||0,this.side!==0)}hasData(){return this.series.some(function(a){return a.hasData()})||this.options.showEmpty&&Qs(this.min)&&Qs(this.max)}addTitle(a){let u,d=this.chart.renderer,p=this.horiz,m=this.opposite,b=this.options.title,_=this.chart.styledMode;this.axisTitle||((u=b.textAlign)||(u=(p?{low:"left",middle:"center",high:"right"}:{low:m?"right":"left",middle:"center",high:m?"left":"right"})[b.align]),this.axisTitle=d.text(b.text||"",0,0,b.useHTML).attr({zIndex:7,rotation:b.rotation||0,align:u}).addClass("highcharts-axis-title"),_||this.axisTitle.css(up(b.style)),this.axisTitle.add(this.axisGroup),this.axisTitle.isNew=!0),_||b.style.width||this.isRadial||this.axisTitle.css({width:this.len+"px"}),this.axisTitle[a?"show":"hide"](a)}generateTick(a){let u=this.ticks;u[a]?u[a].addLabel():u[a]=new oc(this,a)}createGroups(){let{axisParent:a,chart:u,coll:d,options:p}=this,m=u.renderer,b=(_,w,S)=>m.g(_).attr({zIndex:S}).addClass(`highcharts-${d.toLowerCase()}${w} `+(this.isRadial?`highcharts-radial-axis${w} `:"")+(p.className||"")).add(a);this.axisGroup||(this.gridGroup=b("grid","-grid",p.gridZIndex),this.axisGroup=b("axis","",p.zIndex),this.labelGroup=b("axis-labels","-labels",p.labels.zIndex))}getOffset(){let a=this,{chart:u,horiz:d,options:p,side:m,ticks:b,tickPositions:_,coll:w}=a,S=u.inverted&&!a.isZAxis?[1,0,3,2][m]:m,N=a.hasData(),T=p.title,U=p.labels,Y=Qt(p.crossing),se=u.axisOffset,de=u.clipOffset,ue=[-1,1,1,-1][m],le,me=0,ye,Le=0,De=0,Ie,Ge;if(a.showAxis=le=N||p.showEmpty,a.staggerLines=a.horiz&&U.staggerLines||void 0,a.createGroups(),N||a.isLinked?(_.forEach(function(Ue){a.generateTick(Ue)}),a.renderUnsquish(),a.reserveSpaceDefault=m===0||m===2||{1:"left",3:"right"}[m]===a.labelAlign,bs(U.reserveSpace,!Y&&null,a.labelAlign==="center"||null,a.reserveSpaceDefault)&&_.forEach(function(Ue){De=Math.max(b[Ue].getLabelSize(),De)}),a.staggerLines&&(De*=a.staggerLines),a.labelOffset=De*(a.opposite?-1:1)):cp(b,function(Ue,qe){Ue.destroy(),delete b[qe]}),T!=null&&T.text&&T.enabled!==!1&&(a.addTitle(le),le&&!Y&&T.reserveSpace!==!1&&(a.titleOffset=me=a.axisTitle.getBBox()[d?"height":"width"],Le=Qs(ye=T.offset)?0:bs(T.margin,d?5:10))),a.renderLine(),a.offset=ue*bs(p.offset,se[m]?se[m]+(p.margin||0):0),a.tickRotCorr=a.tickRotCorr||{x:0,y:0},Ge=m===0?-a.labelMetrics().h:m===2?a.tickRotCorr.y:0,Ie=Math.abs(De)+Le,De&&(Ie-=Ge,Ie+=ue*(d?bs(U.y,a.tickRotCorr.y+ue*U.distance):bs(U.x,ue*U.distance))),a.axisTitleMargin=bs(ye,Ie),a.getMaxLabelDimensions&&(a.maxLabelDimensions=a.getMaxLabelDimensions(b,_)),w!=="colorAxis"&&de){let Ue=this.tickSize("tick");se[m]=Math.max(se[m],(a.axisTitleMargin||0)+me+ue*a.offset,Ie,_!=null&&_.length&&Ue?Ue[0]+ue*a.offset:0);let qe=!a.axisLine||p.offset?0:a.axisLine.strokeWidth()/2;de[S]=Math.max(de[S],qe)}fn(this,"afterGetOffset")}getLinePath(a){let u=this.chart,d=this.opposite,p=this.offset,m=this.horiz,b=this.left+(d?this.width:0)+p,_=u.chartHeight-this.bottom-(d?this.height:0)+p;return d&&(a*=-1),u.renderer.crispLine([["M",m?this.left:b,m?_:this.top],["L",m?u.chartWidth-this.right:b,m?_:u.chartHeight-this.bottom]],a)}renderLine(){!this.axisLine&&(this.axisLine=this.chart.renderer.path().addClass("highcharts-axis-line").add(this.axisGroup),this.chart.styledMode||this.axisLine.attr({stroke:this.options.lineColor,"stroke-width":this.options.lineWidth,zIndex:7}))}getTitlePosition(a){let u=this.horiz,d=this.left,p=this.top,m=this.len,b=this.options.title,_=u?d:p,w=this.opposite,S=this.offset,N=b.x,T=b.y,U=this.chart.renderer.fontMetrics(a),Y=a?Math.max(a.getBBox(!1,0).height-U.h-1,0):0,se={low:_+(u?0:m),middle:_+m/2,high:_+(u?m:0)}[b.align],de=(u?p+this.height:d)+(u?1:-1)*(w?-1:1)*(this.axisTitleMargin||0)+[-Y,Y,U.f,-Y][this.side],ue={x:u?se+N:de+(w?this.width:0)+S+N,y:u?de+T-(w?this.height:0)+S:se+T};return fn(this,"afterGetTitlePosition",{titlePosition:ue}),ue}renderMinorTick(a,u){let d=this.minorTicks;d[a]||(d[a]=new oc(this,a,"minor")),u&&d[a].isNew&&d[a].render(null,!0),d[a].render(null,!1,1)}renderTick(a,u,d){var b;let p=this.isLinked,m=this.ticks;(!p||a>=this.min&&a<=this.max||(b=this.grid)!=null&&b.isColumn)&&(m[a]||(m[a]=new oc(this,a)),d&&m[a].isNew&&m[a].render(u,!0,-1),m[a].render(u))}render(){let a,u,d=this,p=d.chart,m=d.logarithmic,b=p.renderer,_=d.options,w=d.isLinked,S=d.tickPositions,N=d.axisTitle,T=d.ticks,U=d.minorTicks,Y=d.alternateBands,se=_.stackLabels,de=_.alternateGridColor,ue=_.crossing,le=d.tickmarkOffset,me=d.axisLine,ye=d.showAxis,Le=f$(b.globalAnimation);if(d.labelEdge.length=0,d.overlap=!1,[T,U,Y].forEach(function(De){cp(De,function(Ie){Ie.isActive=!1})}),Qt(ue)){let De=this.isXAxis?p.yAxis[0]:p.xAxis[0],Ie=[1,-1,-1,1][this.side];if(De){let Ge=De.toPixels(ue,!0);d.horiz&&(Ge=De.len-Ge),d.offset=Ie*Ge}}if(d.hasData()||w){let De=d.chart.hasRendered&&d.old&&Qt(d.old.min);d.minorTickInterval&&!d.categories&&d.getMinorTickPositions().forEach(function(Ie){d.renderMinorTick(Ie,De)}),S.length&&(S.forEach(function(Ie,Ge){d.renderTick(Ie,Ge,De)}),le&&(d.min===0||d.single)&&(T[-1]||(T[-1]=new oc(d,-1,null,!0)),T[-1].render(-1))),de&&S.forEach(function(Ie,Ge){u=S[Ge+1]!==void 0?S[Ge+1]+le:d.max-le,Ge%2==0&&Ie<d.max&&u<=d.max+(p.polar?-le:le)&&(Y[Ie]||(Y[Ie]=new B.PlotLineOrBand(d,{})),a=Ie+le,Y[Ie].options={from:m?m.lin2log(a):a,to:m?m.lin2log(u):u,color:de,className:"highcharts-alternate-grid"},Y[Ie].render(),Y[Ie].isActive=!0)}),d._addedPlotLB||(d._addedPlotLB=!0,(_.plotLines||[]).concat(_.plotBands||[]).forEach(function(Ie){d.addPlotBandOrLine(Ie)}))}[T,U,Y].forEach(function(De){let Ie=[],Ge=Le.duration;cp(De,function(Ue,qe){Ue.isActive||(Ue.render(qe,!1,0),Ue.isActive=!1,Ie.push(qe))}),E$(function(){let Ue=Ie.length;for(;Ue--;)De[Ie[Ue]]&&!De[Ie[Ue]].isActive&&(De[Ie[Ue]].destroy(),delete De[Ie[Ue]])},De!==Y&&p.hasRendered&&Ge?Ge:0)}),me&&(me[me.isPlaced?"animate":"attr"]({d:this.getLinePath(me.strokeWidth())}),me.isPlaced=!0,me[ye?"show":"hide"](ye)),N&&ye&&(N[N.isNew?"attr":"animate"](d.getTitlePosition(N)),N.isNew=!1),se!=null&&se.enabled&&d.stacking&&d.stacking.renderStackTotals(),d.old={len:d.len,max:d.max,min:d.min,transA:d.transA,userMax:d.userMax,userMin:d.userMin},d.isDirty=!1,fn(this,"afterRender")}redraw(){this.visible&&(this.render(),this.plotLinesAndBands.forEach(function(a){a.render()})),this.series.forEach(function(a){a.isDirty=!0})}getKeepProps(){return this.keepProps||lc.keepProps}destroy(a){let u=this,d=u.plotLinesAndBands,p=this.eventOptions;if(fn(this,"destroy",{keepEvents:a}),a||x$(u),[u.ticks,u.minorTicks,u.alternateBands].forEach(function(m){b$(m)}),d){let m=d.length;for(;m--;)d[m].destroy()}for(let m in["axisLine","axisTitle","axisGroup","gridGroup","labelGroup","cross","scrollbar"].forEach(function(b){u[b]&&(u[b]=u[b].destroy())}),u.plotLinesAndBandsGroups)u.plotLinesAndBandsGroups[m]=u.plotLinesAndBandsGroups[m].destroy();cp(u,function(m,b){u.getKeepProps().indexOf(b)===-1&&delete u[b]}),this.eventOptions=p}drawCrosshair(a,u){var T;let d=this.crosshair,p=(d==null?void 0:d.snap)??!0,m=this.chart,b,_,w,S=this.cross,N;if(fn(this,"drawCrosshair",{e:a,point:u}),a||(a=(T=this.cross)==null?void 0:T.e),d&&(Qs(u)||!p)!==!1){if(p?Qs(u)&&(_=bs(this.coll!=="colorAxis"?u.crosshairPos:null,this.isXAxis?u.plotX:this.len-u.plotY)):_=a&&(this.horiz?a.chartX-this.pos:this.len-a.chartY+this.pos),Qs(_)&&(N={value:u&&(this.isXAxis?u.x:bs(u.stackY,u.y)),translatedValue:_},m.polar&&lp(N,{isCrosshair:!0,chartX:a==null?void 0:a.chartX,chartY:a==null?void 0:a.chartY,point:u}),b=this.getPlotLinePath(N)||null),!Qs(b))return void this.hideCrosshair();w=this.categories&&!this.isRadial,S||(this.cross=S=m.renderer.path().addClass("highcharts-crosshair highcharts-crosshair-"+(w?"category ":"thin ")+(d.className||"")).attr({zIndex:bs(d.zIndex,2)}).add(),!m.styledMode&&(S.attr({stroke:d.color||(w?gs.parse("#ccd3ff").setOpacity(.25).get():"#cccccc"),"stroke-width":bs(d.width,1)}).css({"pointer-events":"none"}),d.dashStyle&&S.attr({dashstyle:d.dashStyle}))),S.show().attr({d:b}),w&&!d.width&&S.attr({"stroke-width":this.transA}),this.cross.e=a}else this.hideCrosshair();fn(this,"afterDrawCrosshair",{e:a,point:u})}hideCrosshair(){this.cross&&this.cross.hide(),fn(this,"afterHideCrosshair")}update(a,u){let d=this.chart;a=up(this.userOptions,a),this.destroy(!0),this.init(d,a),d.isDirtyBox=!0,bs(u,!0)&&d.redraw()}remove(a){let u=this.chart,d=this.coll,p=this.series,m=p.length;for(;m--;)p[m]&&p[m].remove(!1);$x(u.axes,this),$x(u[d]||[],this),u.orderItems(d),this.destroy(),u.isDirtyBox=!0,bs(a,!0)&&u.redraw()}setTitle(a,u){this.update({title:a},u)}setCategories(a,u){this.update({categories:a},u)}}lc.keepProps=["coll","extKey","hcEvents","len","names","series","userMax","userMin"];let{addEvent:S$,getMagnitude:k$,normalizeTickInterval:C$,timeUnits:hp}=Q;(function(k){function a(){return this.chart.time.getTimeTicks.apply(this.chart.time,arguments)}function u(){if(this.type!=="datetime"){this.dateTime=void 0;return}this.dateTime||(this.dateTime=new d(this))}k.compose=function(p){return p.keepProps.includes("dateTime")||(p.keepProps.push("dateTime"),p.prototype.getTimeTicks=a,S$(p,"afterSetType",u)),p};class d{constructor(m){this.axis=m}normalizeTimeTickInterval(m,b){let _=b||[["millisecond",[1,2,5,10,20,25,50,100,200,500]],["second",[1,2,5,10,15,30]],["minute",[1,2,5,10,15,30]],["hour",[1,2,3,4,6,8,12]],["day",[1,2]],["week",[1,2]],["month",[1,2,3,4,6]],["year",null]],w=_[_.length-1],S=hp[w[0]],N=w[1],T;for(T=0;T<_.length&&(S=hp[(w=_[T])[0]],N=w[1],!_[T+1]||!(m<=(S*N[N.length-1]+hp[_[T+1][0]])/2));T++);S===hp.year&&m<5*S&&(N=[1,2,5]);let U=C$(m/S,N,w[0]==="year"?Math.max(k$(m/S),1):1);return{unitRange:S,count:U,unitName:w[0]}}getXDateFormat(m,b){let{axis:_}=this,w=_.chart.time;return _.closestPointRange?w.getDateFormat(_.closestPointRange,m,_.options.startOfWeek,b)||w.resolveDTLFormat(b.year).main:w.resolveDTLFormat(b.day).main}}k.Additions=d})(f||(f={}));let T$=f,{addEvent:Rx,normalizeTickInterval:A$,pick:O$}=Q;(function(k){function a(){this.type!=="logarithmic"?this.logarithmic=void 0:this.logarithmic??(this.logarithmic=new d(this))}function u(){let p=this.logarithmic;p&&(this.lin2val=function(m){return p.lin2log(m)},this.val2lin=function(m){return p.log2lin(m)})}k.compose=function(p){return p.keepProps.includes("logarithmic")||(p.keepProps.push("logarithmic"),Rx(p,"afterSetType",a),Rx(p,"afterInit",u)),p};class d{constructor(m){this.axis=m}getLogTickPositions(m,b,_,w){let S=this.axis,N=S.len,T=S.options,U=[];if(w||(this.minorAutoInterval=void 0),m>=.5)m=Math.round(m),U=S.getLinearTickPositions(m,b,_);else if(m>=.08){let Y,se,de,ue,le,me,ye,Le=Math.floor(b);for(Y=m>.3?[1,2,4]:m>.15?[1,2,4,6,8]:[1,2,3,4,5,6,7,8,9],se=Le;se<_+1&&!ye;se++)for(de=0,ue=Y.length;de<ue&&!ye;de++)(le=this.log2lin(this.lin2log(se)*Y[de]))>b&&(!w||me<=_)&&me!==void 0&&U.push(me),me>_&&(ye=!0),me=le}else{let Y=this.lin2log(b),se=this.lin2log(_),de=w?S.getMinorTickInterval():T.tickInterval,ue=T.tickPixelInterval/(w?5:1),le=w?N/S.tickPositions.length:N;m=A$(m=O$(de==="auto"?null:de,this.minorAutoInterval,(se-Y)*ue/(le||1))),U=S.getLinearTickPositions(m,Y,se).map(this.log2lin),w||(this.minorAutoInterval=m/5)}return w||(S.tickInterval=m),U}lin2log(m){return Math.pow(10,m)}log2lin(m){return Math.log(m)/Math.LN10}}k.Additions=d})(v||(v={}));let D$=v,{erase:P$,extend:$$,isNumber:Fx}=Q;(function(k){let a;function u(S){return this.addPlotBandOrLine(S,"plotBands")}function d(S,N){let T=this.userOptions,U=new a(this,S);if(this.visible&&(U=U.render()),U){if(this._addedPlotLB||(this._addedPlotLB=!0,(T.plotLines||[]).concat(T.plotBands||[]).forEac
61h(Y=>{this.addPlotBandOrLine(Y)})),N){let Y=T[N]||[];Y.push(S),T[N]=Y}this.plotLinesAndBands.push(U)}return U}function p(S){return this.addPlotBandOrLine(S,"plotLines")}function m(S,N,T){T=T||this.options;let U=this.getPlotLinePath({value:N,force:!0,acrossPanes:T.acrossPanes}),Y=[],se=this.horiz,de=!Fx(this.min)||!Fx(this.max)||S<this.min&&N<this.min||S>this.max&&N>this.max,ue=this.getPlotLinePath({value:S,force:!0,acrossPanes:T.acrossPanes}),le,me=1,ye;if(ue&&U)for(de&&(ye=ue.toString()===U.toString(),me=0),le=0;le<ue.length;le+=2){let Le=ue[le],De=ue[le+1],Ie=U[le],Ge=U[le+1];(Le[0]==="M"||Le[0]==="L")&&(De[0]==="M"||De[0]==="L")&&(Ie[0]==="M"||Ie[0]==="L")&&(Ge[0]==="M"||Ge[0]==="L")&&(se&&Ie[1]===Le[1]?(Ie[1]+=me,Ge[1]+=me):se||Ie[2]!==Le[2]||(Ie[2]+=me,Ge[2]+=me),Y.push(["M",Le[1],Le[2]],["L",De[1],De[2]],["L",Ge[1],Ge[2]],["L",Ie[1],Ie[2]],["Z"])),Y.isFlat=ye}return Y}function b(S){this.removePlotBandOrLine(S)}function _(S){let N=this.plotLinesAndBands,T=this.options,U=this.userOptions;if(N){let Y=N.length;for(;Y--;)N[Y].id===S&&N[Y].destroy();[T.plotLines||[],U.plotLines||[],T.plotBands||[],U.plotBands||[]].forEach(function(se){var de;for(Y=se.length;Y--;)((de=se[Y])==null?void 0:de.id)===S&&P$(se,se[Y])})}}function w(S){this.removePlotBandOrLine(S)}k.compose=function(S,N){let T=N.prototype;return T.addPlotBand||(a=S,$$(T,{addPlotBand:u,addPlotLine:p,addPlotBandOrLine:d,getPlotBandPath:m,removePlotBand:b,removePlotLine:w,removePlotBandOrLine:_})),N}})(g||(g={}));let I$=g,{addEvent:M$,arrayMax:Vx,arrayMin:Bx,defined:wa,destroyObjectProperties:N$,erase:L$,fireEvent:R$,merge:Ux,objectEach:F$,pick:V$}=Q;class fp{static compose(a,u){return M$(a,"afterInit",function(){this.labelCollectors.push(()=>{var p;let d=[];for(let m of this.axes)for(let{label:b,options:_}of m.plotLinesAndBands)b&&!((p=_==null?void 0:_.label)!=null&&p.allowOverlap)&&d.push(b);return d})}),I$.compose(fp,u)}constructor(a,u){this.axis=a,this.options=u,this.id=u.id}render(){R$(this,"render");let{axis:a,options:u}=this,{horiz:d,logarithmic:p}=a,{color:m,events:b,zIndex:_=0}=u,{renderer:w,time:S}=a.chart,N={},T=S.parse(u.to),U=S.parse(u.from),Y=S.parse(u.value),se=u.borderWidth,de=u.label,{label:ue,svgElem:le}=this,me=[],ye,Le=wa(U)&&wa(T),De=wa(Y),Ie=!le,Ge={class:"highcharts-plot-"+(Le?"band ":"line ")+(u.className||"")},Ue=Le?"bands":"lines";if(!a.chart.styledMode&&(De?(Ge.stroke=m||"#999999",Ge["stroke-width"]=V$(u.width,1),u.dashStyle&&(Ge.dashstyle=u.dashStyle)):Le&&(Ge.fill=m||"#e6e9ff",se&&(Ge.stroke=u.borderColor,Ge["stroke-width"]=se))),N.zIndex=_,Ue+="-"+_,(ye=a.plotLinesAndBandsGroups[Ue])||(a.plotLinesAndBandsGroups[Ue]=ye=w.g("plot-"+Ue).attr(N).add()),le||(this.svgElem=le=w.path().attr(Ge).add(ye)),wa(Y))me=a.getPlotLinePath({value:(p==null?void 0:p.log2lin(Y))??Y,lineWidth:le.strokeWidth(),acrossPanes:u.acrossPanes});else{if(!(wa(U)&&wa(T)))return;me=a.getPlotBandPath((p==null?void 0:p.log2lin(U))??U,(p==null?void 0:p.log2lin(T))??T,u)}return!this.eventsAdded&&b&&(F$(b,(qe,rt)=>{le==null||le.on(rt,dt=>{b[rt].apply(this,[dt])})}),this.eventsAdded=!0),(Ie||!le.d)&&(me!=null&&me.length)?le.attr({d:me}):le&&(me?(le.show(),le.animate({d:me})):le.d&&(le.hide(),ue&&(this.label=ue=ue.destroy()))),de&&(wa(de.text)||wa(de.formatter))&&(me!=null&&me.length)&&a.width>0&&a.height>0&&!me.isFlat?(de=Ux({align:d&&Le?"center":void 0,x:d?!Le&&4:10,verticalAlign:!d&&Le?"middle":void 0,y:d?Le?16:10:Le?6:-4,rotation:d&&!Le?90:0,...Le?{inside:!0}:{}},de),this.renderLabel(de,me,Le,_)):ue&&ue.hide(),this}renderLabel(a,u,d,p){var se,de,ue;let m=this.axis,b=m.chart.renderer,_=a.inside,w=this.label;w||(this.label=w=b.text(this.getLabelText(a),0,0,a.useHTML).attr({align:a.textAlign||a.align,rotation:a.rotation,class:"highcharts-plot-"+(d?"band":"line")+"-label "+(a.className||""),zIndex:p}),m.chart.styledMode||w.css(Ux({color:(de=(se=m.chart.options.title)==null?void 0:se.style)==null?void 0:de.color,fontSize:"0.8em",textOverflow:d&&!_?"":"ellipsis"},a.style)),w.add());let S=u.xBounds||[u[0][1],u[1][1],d?u[2][1]:u[0][1]],N=u.yBounds||[u[0][2],u[1][2],d?u[2][2]:u[0][2]],T=
vendor: 20,506 bytes, line 61
61Bx(S),U=Bx(N),Y=Vx(S)-T;w.align(a,!1,{x:T,y:U,width:Y,height:Vx(N)-U}),w.alignAttr.y-=b.fontMetrics(w).b,(!w.alignValue||w.alignValue==="left"||wa(_))&&w.css({width:(((ue=a.style)==null?void 0:ue.width)||(d&&_?Y:w.rotation===90?m.height-(w.alignAttr.y-m.top):(a.clip?m.width:m.chart.chartWidth)-(w.alignAttr.x-m.left)))+"px"}),w.show(!0)}getLabelText(a){return wa(a.formatter)?a.formatter.call(this):a.text}destroy(){L$(this.axis.plotLinesAndBands,this),delete this.axis,N$(this)}}let{animObject:B$}=mt,{format:jx}=ti,{composed:U$,dateFormats:j$,doc:Hx,isSafari:H$}=B,{distribute:W$}=Ju,{addEvent:z$,clamp:uc,css:Wx,discardElement:Y$,extend:q$,fireEvent:ub,getAlignFactor:zx,isArray:G$,isNumber:X$,isObject:K$,isString:cb,merge:J$,pick:cc,pushUnique:Q$,splat:db,syncTimeout:Z$}=Q;class hb{constructor(a,u,d){this.allowShared=!0,this.crosshairs=[],this.distance=0,this.isHidden=!0,this.isSticky=!1,this.options={},this.outside=!1,this.chart=a,this.init(a,u),this.pointer=d}bodyFormatter(a){return a.map(u=>{let d=u.series.tooltipOptions,p=u.formatPrefix||"point";return(d[p+"Formatter"]||u.tooltipFormatter).call(u,d[p+"Format"]||"")})}cleanSplit(a){this.chart.series.forEach(function(u){let d=u==null?void 0:u.tt;d&&(!d.isActive||a?u.tt=d.destroy():d.isActive=!1)})}defaultFormatter(a){let u,d=this.points||db(this);return(u=(u=[a.headerFooterFormatter(d[0])]).concat(a.bodyFormatter(d))).push(a.headerFooterFormatter(d[0],!0)),u}destroy(){this.label&&(this.label=this.label.destroy()),this.split&&(this.cleanSplit(!0),this.tt&&(this.tt=this.tt.destroy())),this.renderer&&(this.renderer=this.renderer.destroy(),Y$(this.container)),Q.clearTimeout(this.hideTimer)}getAnchor(a,u){var N;let d,{chart:p,pointer:m}=this,b=p.inverted,_=p.plotTop,w=p.plotLeft;if(a=db(a),(N=a[0].series)!=null&&N.yAxis&&!a[0].series.yAxis.options.reversedStacks&&(a=a.slice().reverse()),this.followPointer&&u)u.chartX===void 0&&(u=m.normalize(u)),d=[u.chartX-w,u.chartY-_];else if(a[0].tooltipPos)d=a[0].tooltipPos;else{let T=0,U=0;a.forEach(function(Y){let se=Y.pos(!0);se&&(T+=se[0],U+=se[1])}),T/=a.length,U/=a.length,this.shared&&a.length>1&&u&&(b?T=u.chartX:U=u.chartY),d=[T-w,U-_]}let S={point:a[0],ret:d};return ub(this,"getAnchor",S),S.ret.map(Math.round)}getClassName(a,u,d){let p=this.options,m=a.series,b=m.options;return[p.className,"highcharts-label",d&&"highcharts-tooltip-header",u?"highcharts-tooltip-box":"highcharts-tooltip",!d&&"highcharts-color-"+cc(a.colorIndex,m.colorIndex),b==null?void 0:b.className].filter(cb).join(" ")}getLabel({anchorX:a,anchorY:u}={anchorX:0,anchorY:0}){let d=this,p=this.chart.styledMode,m=this.options,b=this.split&&this.allowShared,_=this.container,w=this.chart.renderer;if(this.label){let S=!this.label.hasClass("highcharts-label");(!b&&S||b&&!S)&&this.destroy()}if(!this.label){if(this.outside){let S=this.chart,N=S.options.chart.style,T=Ll.getRendererType();this.container=_=B.doc.createElement("div"),_.className="highcharts-tooltip-container "+(S.renderTo.className.match(/(highcharts[a-zA-Z0-9-]+)\s?/gm)||""),Wx(_,{position:"absolute",top:"1px",pointerEvents:"none",zIndex:Math.max(this.options.style.zIndex||0,((N==null?void 0:N.zIndex)||0)+3)}),this.renderer=w=new T(_,0,0,N,void 0,void 0,w.styledMode)}if(b?this.label=w.g("tooltip"):(this.label=w.label("",a,u,m.shape||"callout",void 0,void 0,m.useHTML,void 0,"tooltip").attr({padding:m.padding,r:m.borderRadius}),p||this.label.attr({fill:m.backgroundColor,"stroke-width":m.borderWidth||0}).css(m.style).css({pointerEvents:m.style.pointerEvents||(this.shouldStickOnContact()?"auto":"none")})),d.outside){let S=this.label;[S.xSetter,S.ySetter].forEach((N,T)=>{S[T?"ySetter":"xSetter"]=U=>{N.call(S,d.distance),S[T?"y":"x"]=U,_&&(_.style[T?"top":"left"]=`${U}px`)}})}this.label.attr({zIndex:8}).shadow(m.shadow??!m.fixed).add()}return _&&!_.parentElement&&B.doc.body.appendChild(_),this.label}getPlayingField(){let{body:a,documentElement:u}=Hx,{chart:d,distance:p,outside:m}=this;return{width:m?Math.max(a.scrollWidth,u.scrollWidth,a.offsetWidth,u.offsetWidth,u.clientWidth)-2*p-2:d.chartWidth,height:m?Math.max(a.scrollHeight,u.scrollHeight,a.offsetHeight,u.offsetHeight,u.clientHeight):d.chartHeight}}getPosition(a,u,d){var It,jt;let{distance:p,chart:m,outside:b,pointer:_}=this,{inverted:w,plotLeft:S,plotTop:N,polar:T}=m,{plotX:U=0,plotY:Y=0}=d,se={},de=w&&d.h||0,{height:ue,width:le}=this.getPlayingField(),me=_.getChartPosition(),ye=Ct=>Ct*me.scaleX,Le=Ct=>Ct*me.scaleY,De=Ct=>{let Wt=Ct==="x";return[Ct,Wt?le:ue,Wt?a:u].concat(b?[Wt?ye(a):Le(u),Wt?me.left-p+ye(U+S):me.top-p+Le(Y+N),0,Wt?le:ue]:[Wt?a:u,Wt?U+S:Y+N,Wt?S:N,Wt?S+m.plotWidth:N+m.plotHeight])},Ie=De("y"),Ge=De("x"),Ue,qe=!!d.negative;!T&&((jt=(It=m.hoverSeries)==null?void 0:It.yAxis)!=null&&jt.reversed)&&(qe=!qe);let rt=!this.followPointer&&cc(d.ttBelow,!T&&!w===qe),dt=function(Ct,Wt,hs,Ss,Ts,ai,xs){let Vs=b?Ct==="y"?Le(p):ye(p):p,as=(hs-Ss)/2,Zt=Ss<Ts-p,En=Ts+p+Ss<Wt,Bs=Ts-Vs-hs+as,Zs=Ts+Vs-as;if(rt&&En)se[Ct]=Zs;else if(!rt&&Zt)se[Ct]=Bs;else if(Zt)se[Ct]=Math.min(xs-Ss,Bs-de<0?Bs:Bs-de);else{if(!En)return se[Ct]=0,!1;se[Ct]=Math.max(ai,Zs+de+hs>Wt?Zs:Zs+de)}},xt=function(Ct,Wt,hs,Ss,Ts){if(Ts<p||Ts>Wt-p)return!1;Ts<hs/2?se[Ct]=1:Ts>Wt-Ss/2?se[Ct]=Wt-Ss-2:se[Ct]=Ts-hs/2},Et=function(Ct){[Ie,Ge]=[Ge,Ie],Ue=Ct},Rt=()=>{dt.apply(0,Ie)!==!1?xt.apply(0,Ge)!==!1||Ue||(Et(!0),Rt()):Ue?se.x=se.y=0:(Et(!0),Rt())};return(w&&!T||this.len>1)&&Et(),Rt(),se}getFixedPosition(a,u,d){var U;let p=d.series,{chart:m,options:b,split:_}=this,w=b.position,S=w.relativeTo,N=b.shared||(U=p==null?void 0:p.yAxis)!=null&&U.isRadial&&(S==="pane"||!S)?"plotBox":S,T=N==="chart"?m.renderer:m[N]||m.getClipBox(p,!0);return{x:T.x+(T.width-a)*zx(w.align)+w.x,y:T.y+(T.height-u)*zx(w.verticalAlign)+(!_&&w.y||0)}}hide(a){let u=this;Q.clearTimeout(this.hideTimer),a=cc(a,this.options.hideDelay),this.isHidden||(this.hideTimer=Z$(function(){let d=u.getLabel();u.getLabel().animate({opacity:0},{duration:a&&150,complete:()=>{d.hide(),u.container&&u.container.remove()}}),u.isHidden=!0},a))}init(a,u){this.chart=a,this.options=u,this.crosshairs=[],this.isHidden=!0,this.split=u.split&&!a.inverted&&!a.polar,this.shared=u.shared||this.split,this.outside=cc(u.outside,!!(a.scrollablePixelsX||a.scrollablePixelsY))}shouldStickOnContact(a){return!!(!this.followPointer&&this.options.stickOnContact&&(!a||this.pointer.inClass(a.target,"highcharts-tooltip")))}move(a,u,d,p){let{followPointer:m,options:b}=this,_=B$(!m&&!this.isHidden&&!b.fixed&&b.animation),w=m||(this.len||0)>1,S={x:a,y:u};w?S.anchorX=S.anchorY=NaN:(S.anchorX=d,S.anchorY=p),_.step=()=>this.drawTracker(),this.getLabel().animate(S,_)}refresh(a,u){let{chart:d,options:p,pointer:m,shared:b}=this,_=db(a),w=_[0],S=p.format,N=p.formatter||this.defaultFormatter,T=d.styledMode,U=this.allowShared;if(!p.enabled||!w.series)return;Q.clearTimeout(this.hideTimer),this.allowShared=!(!G$(a)&&a.series&&a.series.noSharedTooltip),U=U&&!this.allowShared,this.followPointer=!this.split&&w.series.tooltipOptions.followPointer;let Y=this.getAnchor(a,u),se=Y[0],de=Y[1];b&&this.allowShared&&(m.applyInactiveState(_),_.forEach(me=>me.setState("hover")),w.points=_),this.len=_.length;let ue=cb(S)?jx(S,w,d):N.call(w,this);w.points=void 0;let le=w.series;if(this.distance=cc(le.tooltipOptions.distance,16),ue===!1)this.hide();else{if(this.split&&this.allowShared)this.renderSplit(ue,_);else{let me=se,ye=de;if(u&&m.isDirectTouch&&(me=u.chartX-d.plotLeft,ye=u.chartY-d.plotTop),!(d.polar||le.options.clip===!1||_.some(Le=>m.isDirectTouch||Le.series.shouldShowTooltip(me,ye))))return void this.hide();{let Le=this.getLabel(U&&this.tt||{});(!p.style.width||T)&&Le.css({width:(this.outside?this.getPlayingField():d.spacingBox).width+"px"}),Le.attr({class:this.getClassName(w),text:ue&&ue.join?ue.join(""):ue}),this.outside&&Le.attr({x:uc(Le.x||0,0,this.getPlayingField().width-(Le.width||0)-1)}),T||Le.attr({stroke:p.borderColor||w.color||le.color||"#666666"}),this.updatePosition({plotX:se,plotY:de,negative:w.negative,ttBelow:w.ttBelow,series:le,h:Y[2]||0})}}this.isHidden&&this.label&&this.label.attr({opacity:1}).show(),this.isHidden=!1}ub(this,"refresh")}renderSplit(a,u){var Ts,ai;let d=this,{chart:p,chart:{chartWidth:m,chartHeight:b,plotHeight:_,plotLeft:w,plotTop:S,scrollablePixelsY:N=0,scrollablePixelsX:T,styledMode:U},distance:Y,options:se,options:{fixed:de,position:ue,positioner:le},pointer:me}=d,{scrollLeft:ye=0,scrollTop:Le=0}=((Ts=p.scrollablePlotArea)==null?void 0:Ts.scrollingContainer)||{},De=d.outside&&typeof T!="number"?Hx.documentElement.getBoundingClientRect():{left:ye,right:ye+m},Ie=d.getLabel(),Ge=this.renderer||p.renderer,Ue=!!((ai=p.xAxis[0])!=null&&ai.opposite),{left:qe,top:rt}=me.getChartPosition(),dt=le||de,xt=S+Le,Et=0,Rt=_-N,It=function(xs,Vs,as,Zt=[0,0],En=!0){let Bs,Zs;if(as.isHeader)Zs=Ue?0:Rt,Bs=uc(Zt[0]-xs/2,De.left,De.right-xs-(d.outside?qe:0));else if(de&&as){let Kn=d.getFixedPosition(xs,Vs,as);Bs=Kn.x,Zs=Kn.y-xt}else Zs=Zt[1]-xt,Bs=uc(Bs=En?Zt[0]-xs-Y:Zt[0]+Y,En?Bs:De.left,De.right);return{x:Bs,y:Zs}};cb(a)&&(a=[!1,a]);let jt=a.slice(0,u.length+1).reduce(function(xs,Vs,as){if(Vs!==!1&&Vs!==""){let Zt=u[as-1]||{isHeader:!0,plotX:u[0].plotX,plotY:_,series:{}},En=Zt.isHeader,Bs=En?d:Zt.series,Zs=Bs.tt=(function(si,nn,Qd){let Ko=si,{isHeader:Gl,series:Zd}=nn,ia=Zd.tooltipOptions||se;if(!Ko){let pc={padding:ia.padding,r:ia.borderRadius};U||(pc.fill=ia.backgroundColor,pc["stroke-width"]=ia.borderWidth??(de&&!Gl?0:1)),Ko=Ge.label("",0,0,ia[Gl?"headerShape":"shape"]||(de&&!Gl?"rect":"callout"),void 0,void 0,ia.useHTML).addClass(d.getClassName(nn,!0,Gl)).attr(pc).add(Ie)}return Ko.isActive=!0,Ko.attr({text:Qd}),U||Ko.css(ia.style).attr({stroke:ia.borderColor||nn.color||Zd.color||"#333333"}),Ko})(Bs.tt,Zt,Vs.toString()),Kn=Zs.getBBox(),Qa=Kn.width+Zs.strokeWidth();En&&(Et=Kn.height,Rt+=Et,Ue&&(xt-=Et));let{anchorX:$r,anchorY:oi}=(function(si){let nn,Qd,{isHeader:Ko,plotX:Gl=0,plotY:Zd=0,series:ia}=si;if(Ko)nn=Math.max(w+Gl,w),Qd=S+_/2;else{let{xAxis:pc,yAxis:lE}=ia;nn=pc.pos+uc(Gl,-Y,pc.len+Y),ia.shouldShowTooltip(0,lE.pos-S+Zd,{ignoreX:!0})&&(Qd=lE.pos+Zd)}return{anchorX:nn=uc(nn,De.left-Y,De.right+Y),anchorY:Qd}})(Zt);if(typeof oi=="number"){let si=Kn.height+1,nn=(le||It).call(d,Qa,si,Zt,[$r,oi]);xs.push({align:dt?0:void 0,anchorX:$r,anchorY:oi,boxWidth:Qa,point:Zt,rank:cc(nn.rank,+!!En),size:si,target:nn.y,tt:Zs,x:nn.x})}else Zs.isActive=!1}return xs},[]);!dt&&jt.some(xs=>{let{outside:Vs}=d,as=(Vs?qe:0)+xs.anchorX;return as<De.left&&as+xs.boxWidth<De.right||as<qe-De.left+xs.boxWidth&&De.right-as>as})&&(jt=jt.map(xs=>{let{x:Vs,y:as}=It.call(this,xs.boxWidth,xs.size,xs.point,[xs.anchorX,xs.anchorY],!1);return q$(xs,{target:as,x:Vs})})),d.cleanSplit(),W$(jt,Rt);let Ct={left:qe,right:qe};jt.forEach(function(xs){let{x:Vs,boxWidth:as,isHeader:Zt}=xs;!Zt&&(d.outside&&qe+Vs<Ct.left&&(Ct.left=qe+Vs),!Zt&&d.outside&&Ct.left+as>Ct.right&&(Ct.right=qe+Vs))}),jt.forEach(function(xs){let{x:Vs,anchorX:as,anchorY:Zt,pos:En,point:{isHeader:Bs}}=xs,Zs={visibility:En===void 0?"hidden":"inherit",x:Vs,y:(En||0)+xt+(de&&ue.y||0),anchorX:as,anchorY:Zt};if(d.outside&&Vs<as){let Kn=qe-Ct.left;Kn>0&&(Bs||(Zs.x=Vs+Kn,Zs.anchorX=as+Kn),Bs&&(Zs.x=(Ct.right-Ct.left)/2,Zs.anchorX=as+Kn))}xs.tt.attr(Zs)});let{container:Wt,outside:hs,renderer:Ss}=d;if(hs&&Wt&&Ss){let{width:xs,height:Vs,x:as,y:Zt}=Ie.getBBox();Ss.setSize(xs+as,Vs+Zt,!1),Wt.style.left=Ct.left+"px",Wt.style.top=rt+"px"}H$&&Ie.attr({opacity:Ie.opacity===1?.999:1})}drawTracker(){if(!this.shouldStickOnContact()){this.tracker&&(this.tracker=this.tracker.destroy());return}let a=this.chart,u=this.label,d=this.shared?a.hoverPoints:a.hoverPoint;if(!u||!d)return;let p={x:0,y:0,width:0,height:0},m=this.getAnchor(d),b=u.getBBox();m[0]+=a.plotLeft-(u.translateX||0),m[1]+=a.plotTop-(u.translateY||0),p.x=Math.min(0,m[0]),p.y=Math.min(0,m[1]),p.width=m[0]<0?Math.max(Math.abs(m[0]),b.width-m[0]):Math.max(Math.abs(m[0]),b.width),p.height=m[1]<0?Math.max(Math.abs(m[1]),b.height-Math.abs(m[1])):Math.max(Math.abs(m[1]),b.height),this.tracker?this.tracker.attr(p):(this.tracker=u.renderer.rect(p).addClass("highcharts-tracker").add(u),a.styledMode||this.tracker.attr({fill:"rgba(0,0,0,0)"}))}styledModeFormat(a){return a.replace('style="font-size: 0.8em"','class="highcharts-header"').replace(/style="color:{(point|series)\.color}"/g,'class="highcharts-color-{$1.colorIndex} {series.options.className} {point.options.className}"')}headerFooterFormatter(a,u){let d=a.series,p=d.tooltipOptions,m=d.xAxis,b=m==null?void 0:m.dateTime,_={isFooter:u,point:a},w=p.xDateFormat||"",S=p[u?"footerFormat":"headerFormat"];return ub(this,"headerFormatter",_,function(N){if(b&&!w&&X$(a.key)&&(w=b.getXDateFormat(a.key,p.dateTimeLabelFormats)),b&&w){if(K$(w)){let T=w;j$[0]=U=>d.chart.time.dateFormat(T,U),w="%0"}(a.tooltipDateKeys||["key"]).forEach(T=>{S=S.replace(RegExp("point\\."+T+"([ \\)}])"),`(point.${T}:${w})$1`)})}d.chart.styledMode&&(S=this.styledModeFormat(S)),N.text=jx(S,a,this.chart)}),_.text||""}update(a){this.destroy(),this.init(this.chart,J$(!0,this.options,a))}updatePosition(a){var De;let{chart:u,container:d,distance:p,options:m,pointer:b,renderer:_}=this,{height:w=0,width:S=0}=this.getLabel(),{fixed:N,positioner:T}=m,{left:U,top:Y,scaleX:se,scaleY:de}=b.getChartPosition(),ue=(T||N&&this.getFixedPosition||this.getPosition).call(this,S,w,a),le=B.doc,me=(a.plotX||0)+u.plotLeft,ye=(a.plotY||0)+u.plotTop,Le;if(_&&d){if(T||N){let{scrollLeft:Ie=0,scrollTop:Ge=0}=((De=u.scrollablePlotArea)==null?void 0:De.scrollingContainer)||{};ue.x+=Ie+U-p,ue.y+=Ge+Y-p}Le=(m.borderWidth||0)+2*p+2,_.setSize(uc(S+Le,0,le.documentElement.clientWidth)-1,w+Le,!1),(se!==1||de!==1)&&(Wx(d,{transform:`scale(${se}, ${de})`}),me*=se,ye*=de),me+=U-ue.x,ye+=Y-ue.y}this.move(Math.round(ue.x),Math.round(ue.y||0),me,ye)}}(function(k){k.compose=function(a){Q$(U$,"Core.Tooltip")&&z$(a,"afterInit",function(){let u=this.chart;u.options.tooltip&&(u.tooltip=new k(u,u.options.tooltip,this))})}})(hb||(hb={}));let Yx=hb,{animObject:eI}=mt,{defaultOptions:tI}=He,{format:sI}=ti,{addEvent:nI,crisp:iI,erase:rI,extend:pp,fireEvent:fb,getNestedProperty:aI,isArray:oI,isFunction:lI,isNumber:Uo,isObject:mp,merge:qx,pick:jo,syncTimeout:uI,removeEvent:Gx,uniqueKey:cI}=Q;class Bd{animateBeforeDestroy(){let a=this,u={x:a.startXPos,opacity:0},d=a.getGraphicalProps();d.singular.forEach(function(p){a[p]=a[p].animate(p==="dataLabel"?{x:a[p].startXPos,y:a[p].startYPos,opacity:0}:u)}),d.plural.forEach(function(p){a[p].forEach(function(m){m.element&&m.animate(pp({x:a.startXPos},m.startYPos?{x:m.startXPos,y:m.startYPos}:{}))})})}applyOptions(a,u){let d=this.series,p=d.options.pointValKey||d.pointValKey;return pp(this,a=Bd.prototype.optionsToObject.call(this,a)),this.options=this.options?pp(this.options,a):a,a.group&&delete this.group,a.dataLabels&&delete this.dataLabels,p&&(this.y=Bd.prototype.getNestedProperty.call(this,p)),this.selected&&(this.state="select"),"name"in this&&u===void 0&&d.xAxis&&d.xAxis.hasNames&&(this.x=d.xAxis.nameToX(this)),this.x===void 0&&d?this.x=u??d.autoIncrement():Uo(a.x)&&d.options.relativeXValue?this.x=d.autoIncrement(a.x):typeof this.x=="string"&&(u??(u=d.chart.time.parse(this.x)),Uo(u)&&(this.x=u)),this.isNull=this.isValid&&!this.isValid(),this.formatPrefix=this.isNull?"null":"point",this}destroy(){if(!this.destroyed){let a=this,u=a.series,d=u.chart,p=u.options.dataSorting,m=d.hoverPoints,b=eI(a.series.chart.renderer.globalAnimation),_=()=>{for(let w in(a.graphic||a.graphics||a.dataLabel||a.dataLabels)&&(Gx(a),a.destroyElements()),a)delete a[w]};a.legendItem&&d.legend.destroyItem(a),m&&(a.setState(),rI(m,a),m.length||(d.hoverPoints=null)),a===d.hoverPoint&&a.onMouseOut(),p!=null&&p.enabled?(this.animateBeforeDestroy(),uI(_,b.duration)):_(),d.pointCount--}this.destroyed=!0}destroyElements(a){let u=this,d=u.getGraphicalProps(a);d.singular.forEach(function(p){u[p]=u[p].destroy()}),d.plural.forEach(function(p){u[p].forEach(function(m){m!=null&&m.element&&m.destroy()}),delete u[p]})}firePointEvent(a,u,d){let p=this,m=this.series.options;p.manageEvent(a),a==="click"&&m.allowPointSelect&&(d=function(b){!p.destroyed&&p.select&&p.select(null,b.ctrlKey||b.metaKey||b.shiftKey)}),fb(p,a,u,d)}getClassName(){var a;return"highcharts-point"+(this.selected?" highcharts-point-select":"")+(this.negative?" highcharts-negative":"")+(this.isNull?" highcharts-null-point":"")+(this.colorIndex!==void 0?" highcharts-color-"+this.colorIndex:"")+(this.options.className?" "+this.options.className:"")+((a=this.zone)!=null&&a.className?" "+this.zone.className.replace("highcharts-negative",""):"")}getGraphicalProps(a){let u,d,p=this,m=[],b={singular:[],plural:[]};for((a=a||{graphic:1,dataLabel:1}).graphic&&m.push("graphic","connector"),a.dataLabel&&m.push("dataLabel","dataLabelPath","dataLabelUpper"),d=m.length;d--;)p[u=m[d]]&&b.singular.push(u);return["graphic","dataLabel"].forEach(function(_){let w=_+"s";a[_]&&p[w]&&b.plural.push(w)}),b}getNestedProperty(a){if(a)return a.indexOf("custom.")===0?aI(a,this.options):this[a]}getZone(){let a=this.series,u=a.zones,d=a.zoneAxis||"y",p,m=0;for(p=u[0];this[d]>=p.value;)p=u[++m];return this.nonZonedColor||(this.nonZonedColor=this.color),p!=null&&p.color&&!this.options.color?this.color=p.color:this.color=this.nonZonedColor,p}hasNewShapeType(){return(this.graphic&&(this.graphic.symbolName||this.graphic.element.nodeName))!==this.shapeType}constructor(a,u,d){this.formatPrefix="point",this.visible=!0,this.point=this,this.series=a,this.applyOptions(u,d),this.id??(this.id=cI()),this.resolveColor(),this.dataLabelOnNull??(this.dataLabelOnNull=a.options.nullInteraction),a.chart.pointCount++,fb(this,"afterInit")}isValid(){return(Uo(this.x)||this.x instanceof Date)&&Uo(this.y)}optionsToObject(a){var N;let u=this.series,d=u.options.keys,p=d||u.pointArrayMap||["y"],m=p.length,b={},_,w=0,S=0;if(Uo(a)||a===null)b[p[0]]=a;else if(oI(a))for(!d&&a.length>m&&((_=typeof a[0])=="string"?(N=u.xAxis)!=null&&N.dateTime?b.x=u.chart.time.parse(a[0]):b.name=a[0]:_==="number"&&(b.x=a[0]),w++);S<m;)d&&a[w]===void 0||(p[S].indexOf(".")>0?Bd.prototype.setNestedProperty(b,a[w],p[S]):b[p[S]]=a[w]),w++,S++;else typeof a=="object"&&(b=a,a.dataLabels&&(u.hasDataLabels=()=>!0),a.marker&&(u._hasPointMarkers=!0));return b}pos(a,u=this.plotY){if(!this.destroyed){let{plotX:d,series:p}=this,{chart:m,xAxis:b,yAxis:_}=p,w=0,S=0;if(Uo(d)&&Uo(u))return a&&(w=b?b.pos:m.plotLeft,S=_?_.pos:m.plotTop),m.inverted&&b&&_?[_.len-u+S,b.len-d+w]:[d+w,u+S]}}resolveColor(){let a=this.series,u=a.chart.options.chart,d=a.chart.styledMode,p,m,b=u.colorCount,_;delete this.nonZonedColor,a.options.colorByPoint?(d||(p=(m=a.options.colors||a.chart.options.colors)[a.colorCounter],b=m.length),_=a.colorCounter,a.colorCounter++,a.colorCounter===b&&(a.colorCounter=0)):(d||(p=a.color),_=a.colorIndex),this.colorIndex=jo(this.options.colorIndex,_),this.color=jo(this.options.color,p)}setNestedProperty(a,u,d){return d.split(".").reduce(function(p,m,b,_){let w=_.length-1===b;return p[m]=w?u:mp(p[m],!0)?p[m]:{},p[m]},a),a}shouldDraw(){return!this.isNull}tooltipFormatter(a){var w;let{chart:u,pointArrayMap:d=["y"],tooltipOptions:p}=this.series,{valueDecimals:m="",valuePrefix:b="",valueSuffix:_=""}=p;return u.styledMode&&(a=((w=u.tooltip)==null?void 0:w.styledModeFormat(a))||a),d.forEach(S=>{S="{point."+S,(b||_)&&(a=a.replace(RegExp(S+"}","g"),b+S+"}"+_)),a=a.replace(RegExp(S+"}","g"),S+":,."+m+"f}")}),sI(a,this,u)}update(a,u,d,p){let m,b=this,_=b.series,w=b.graphic,S=_.chart,N=_.options;function T(){b.applyOptions(a);let U=w&&b.hasMockGraphic,Y=b.y===null?!U:U;w&&Y&&(b.graphic=w.destroy(),delete b.hasMockGraphic),mp(a,!0)&&(w!=null&&w.element&&a&&a.marker&&a.marker.symbol!==void 0&&(b.graphic=w.destroy()),a!=null&&a.dataLabels&&b.dataLabel&&(b.dataLabel=b.dataLabel.destroy())),m=b.index;let se={};for(let de of _.dataColumnKeys())se[de]=b[de];_.dataTable.setRow(se,m),N.data[m]=mp(N.data[m],!0)||mp(a,!0)?b.options:jo(a,N.data[m]),_.isDirty=_.isDirtyData=!0,!_.fixedBox&&_.hasCartesianSeries&&(S.isDirtyBox=!0),N.legendType==="point"&&(S.isDirtyLegend=!0),u&&S.redraw(d)}u=jo(u,!0),p===!1?T():b.firePointEvent("update",{options:a},T)}remove(a,u){this.series.removePoint(this.series.data.indexOf(this),a,u)}select(a,u){let d=this,p=d.series,m=p.chart;a=jo(a,!d.selected),this.selectedStaging=a,d.firePointEvent(a?"select":"unselect",{accumulate:u},function(){d.selected=d.options.selected=a,p.options.data[p.data.indexOf(d)]=d.options,d.setState(a&&"select"),u||m.getSelectedPoints().forEac
61h(function(b){let _=b.series;b.selected&&b!==d&&(b.selected=b.options.selected=!1,_.options.data[_.data.indexOf(b)]=b.options,b.setState(m.hoverPoints&&_.options.inactiveOtherPoints?"inactive":""),b.firePointEvent("unselect"))})}),delete this.selectedStaging}onMouseOver(a){let{inverted:u,pointer:d}=this.series.chart;d&&(a=a?d.normalize(a):d.getChartCoordinatesFromPoint(this,u),d.runPointActions(a,this))}onMouseOut(){let a=this.series.chart;this.firePointEvent("mouseOut"),this.series.options.inactiveOtherPoints||(a.hoverPoints||[]).forEach(function(u){u.setState()}),a.hoverPoints=a.hoverPoint=null}manageEvent(a){var p,m,b,_,w,S,N;let u=qx(this.series.options.point,this.options),d=(p=u.events)==null?void 0:p[a];lI(d)&&(!((m=this.hcEvents)!=null&&m[a])||((_=(b=this.hcEvents)==null?void 0:b[a])==null?void 0:_.map(T=>T.fn).indexOf(d))===-1)?((w=this.importedUserEvent)==null||w.call(this),this.importedUserEvent=nI(this,a,d),this.hcEvents&&(this.hcEvents[a].userEvent=!0)):this.importedUserEvent&&!d&&((S=this.hcEvents)!=null&&S[a])&&((N=this.hcEvents)!=null&&N[a].userEvent)&&(Gx(this,a),delete this.hcEvents[a],Object.keys(this.hcEvents)||delete this.importedUserEvent)}setState(a,u){var Ie,Ge;let d=this.series,p=this.state,m=d.options.states[a||"normal"]||{},b=tI.plotOptions[d.type].marker&&d.options.marker,_=b&&b.enabled===!1,w=((Ie=b==null?void 0:b.states)==null?void 0:Ie[a||"normal"])||{},S=w.enabled===!1,N=this.marker||{},T=d.chart,U=b&&d.markerAttribs,Y=d.halo,se,de,ue,le=d.stateMarkerGraphic,me;if((a=a||"")===this.state&&!u||this.selected&&a!=="select"||m.enabled===!1||a&&(S||_&&w.enabled===!1)||a&&N.states&&N.states[a]&&N.states[a].enabled===!1)return;if(this.state=a,U&&(se=d.markerAttribs(this,a)),this.graphic&&!this.hasMockGraphic){if(p&&this.graphic.removeClass("highcharts-point-"+p),a&&this.graphic.addClass("highcharts-point-"+a),!T.styledMode){de=d.pointAttribs(this,a),ue=jo(T.options.chart.animation,m.animation);let Ue=de.opacity;d.options.inactiveOtherPoints&&Uo(Ue)&&(this.dataLabels||[]).forEach(function(qe){qe&&!qe.hasClass("highcharts-data-label-hidden")&&(qe.animate({opacity:Ue},ue),qe.connector&&qe.connector.animate({opacity:Ue},ue))}),this.graphic.animate(de,ue)}se&&this.graphic.animate(se,jo(T.options.chart.animation,w.animation,b.animation)),le&&le.hide()}else a&&w&&(me=N.symbol||d.symbol,le&&le.currentSymbol!==me&&(le=le.destroy()),se&&(le?le[u?"animate":"attr"]({x:se.x,y:se.y}):me&&(d.stateMarkerGraphic=le=T.renderer.symbol(me,se.x,se.y,se.width,se.height,qx(b,w)).add(d.markerGroup),le.currentSymbol=me)),!T.styledMode&&le&&this.state!=="inactive"&&le.attr(d.pointAttribs(this,a))),le&&(le[a&&this.isInside?"show":"hide"](),le.element.point=this,le.addClass(this.getClassName(),!0));let ye=m.halo,Le=this.graphic||le,De=(Le==null?void 0:Le.visibility)||"inherit";ye!=null&&ye.size&&Le&&De!=="hidden"&&!this.isCluster?(Y||(d.halo=Y=T.renderer.path().add(Le.parentGroup)),Y.show()[u?"animate":"attr"]({d:this.haloPath(ye.size)}),Y.attr({class:"highcharts-halo highcharts-color-"+jo(this.colorIndex,d.colorIndex)+(this.className?" "+this.className:""),visibility:De,zIndex:-1}),Y.point=this,T.styledMode||Y.attr(pp({fill:this.color||d.color,"fill-opacity":ye.opacity},qs.filterUserAttributes(ye.attributes||{})))):(Ge=Y==null?void 0:Y.point)!=null&&Ge.haloPath&&!Y.point.destroyed&&Y.animate({d:Y.point.haloPath(0)},null,Y.hide),fb(this,"afterSetState",{state:a})}haloPath(a){let u=this.pos();return u?this.series.chart.renderer.symbols.circle(iI(u[0],1)-a,u[1]-a,2*a,2*a):[]}}let Ho=Bd,{parse:dI}=gs,{charts:pb,composed:hI,isTouchDevice:fI}=B,{addEvent:Pr,attr:pI,css:mb,extend:gb,find:Xx,fireEvent:Wo,isNumber:gp,isObject:vp,objectEach:mI,offset:gI,pick:Ea,pushUnique:vI,splat:Kx}=Q;class Gn{applyInactiveState(a=[]){var d,p;let u=[];for(let m of(a.forEach(b=>{let _=b.series;u.push(_),_.linkedParent&&u.push(_.linkedParent),_.linkedSeries&&u.push.apply(u,_.linkedSeries),_.navigatorSeries&&u.push(_.navigatorSeries),_.boosted&&_.markerGroup&&u.push.apply(u,this.chart.series.filter(w=>w.markerGroup===_.markerGroup))}),this.chart.series)){let b=m.options;((p=(d=b.states)==null?void 0:d.inactive)==null?void 0:p.enabled)!==!1&&(u.indexOf(m)===-1?m.setState("inactive",!0):b.inactiveOtherPoints&&m.setAllPointsToState("inactive"))}}destroy(){let a=this;
vendor: 4,114 bytes, line 61
61this.eventsToUnbind.forEach(u=>u()),this.eventsToUnbind=[],!B.chartCount&&(Gn.unbindDocumentMouseUp.forEach(u=>u.unbind()),Gn.unbindDocumentMouseUp.length=0,Gn.unbindDocumentTouchEnd&&(Gn.unbindDocumentTouchEnd=Gn.unbindDocumentTouchEnd())),clearInterval(a.tooltipTimeout),mI(a,function(u,d){a[d]=void 0})}getSelectionMarkerAttrs(a,u){let d={args:{chartX:a,chartY:u},attrs:{},shapeType:"rect"};return Wo(this,"getSelectionMarkerAttrs",d,p=>{let m,{chart:b,zoomHor:_,zoomVert:w}=this,{mouseDownX:S=0,mouseDownY:N=0}=b,T=p.attrs;T.x=b.plotLeft,T.y=b.plotTop,T.width=_?1:b.plotWidth,T.height=w?1:b.plotHeight,_&&(T.width=Math.max(1,Math.abs(m=a-S)),T.x=(m>0?0:m)+S),w&&(T.height=Math.max(1,Math.abs(m=u-N)),T.y=(m>0?0:m)+N)}),d}drag(a){let{chart:u}=this,{mouseDownX:d=0,mouseDownY:p=0}=u,{panning:m,panKey:b,selectionMarkerFill:_}=u.options.chart,w=u.plotLeft,S=u.plotTop,N=u.plotWidth,T=u.plotHeight,U=vp(m)?m.enabled:m,Y=b&&a[`${b}Key`],se=a.chartX,de=a.chartY,ue,le=this.selectionMarker;if((!le||!le.touch)&&(se<w?se=w:se>w+N&&(se=w+N),de<S?de=S:de>S+T&&(de=S+T),this.hasDragged=Math.sqrt(Math.pow(d-se,2)+Math.pow(p-de,2)),this.hasDragged>10)){ue=u.isInsidePlot(d-w,p-S,{visiblePlotOnly:!0});let{shapeType:me,attrs:ye}=this.getSelectionMarkerAttrs(se,de);this.hasZoom&&ue&&!Y&&!le&&(this.selectionMarker=le=u.renderer[me](),le.attr({class:"highcharts-selection-marker",zIndex:7}).add(),u.styledMode||le.attr({fill:_||dI("#334eff").setOpacity(.25).get()})),le&&le.attr(ye),ue&&!le&&U&&u.pan(a,m)}}dragStart(a){let u=this.chart;u.mouseIsDown=a.type,u.cancelClick=!1,u.mouseDownX=a.chartX,u.mouseDownY=a.chartY}getSelectionBox(a){let u={args:{marker:a},result:a.getBBox()};return Wo(this,"getSelectionBox",u),u.result}drop(a){let u,{chart:d,selectionMarker:p}=this;for(let m of d.axes)m.isPanning&&(m.isPanning=!1,(m.options.startOnTick||m.options.endOnTick||m.series.some(b=>b.boosted))&&(m.forceRedraw=!0,m.setExtremes(m.userMin,m.userMax,!1),u=!0));if(u&&d.redraw(),p&&a){if(this.hasDragged){let m=this.getSelectionBox(p);d.transform({axes:d.axes.filter(b=>b.zoomEnabled&&(b.coll==="xAxis"&&this.zoomX||b.coll==="yAxis"&&this.zoomY)),selection:{originalEvent:a,xAxis:[],yAxis:[],...m},from:m})}gp(d.index)&&(this.selectionMarker=p.destroy())}d&&gp(d.index)&&(mb(d.container,{cursor:d._cursor}),d.cancelClick=this.hasDragged>10,d.mouseIsDown=!1,this.hasDragged=0,this.pinchDown=[],this.hasPinchMoved=!1)}findNearestKDPoint(a,u,d){let p;return a.forEach(function(m){let b=!(m.noSharedTooltip&&u)&&0>m.options.findNearestPointBy.indexOf("y"),_=m.searchPoint(d,b);vp(_,!0)&&_.series&&(!vp(p,!0)||(function(w,S){var Y,se;let N=w.distX-S.distX,T=w.dist-S.dist,U=((Y=S.series.group)==null?void 0:Y.zIndex)-((se=w.series.group)==null?void 0:se.zIndex);return N!==0&&u?N:T!==0?T:U!==0?U:w.series.index>S.series.index?-1:1})(p,_)>0)&&(p=_)}),p}getChartCoordinatesFromPoint(a,u){let{xAxis:d,yAxis:p}=a.series,m=a.shapeArgs;if(d&&p){let b=a.clientX??a.plotX??0,_=a.plotY||0;return a.isNode&&m&&gp(m.x)&&gp(m.y)&&(b=m.x,_=m.y),u?{chartX:p.len+p.pos-_,chartY:d.len+d.pos-b}:{chartX:b+d.pos,chartY:_+p.pos}}if(m!=null&&m.x&&m.y)return{chartX:m.x,chartY:m.y}}getChartPosition(){if(this.chartPosition)return this.chartPosition;let{container:a}=this.chart,u=gI(a);this.chartPosition={left:u.left,top:u.top,scaleX:1,scaleY:1};let{offsetHeight:d,offsetWidth:p}=a;return p>2&&d>2&&(this.chartPosition.scaleX=u.width/p,this.chartPosition.scaleY=u.height/d),this.chartPosition}getCoordinates(a){let u={xAxis:[],yAxis:[]};for(let d of this.chart.axes)u[d.isXAxis?"xAxis":"yAxis"].push({axis:d,value:d.toValue(a[d.horiz?"chartX":"chartY"])});return u}getHoverData(a,u,d,p,m,b){let _=[],w=function(Y){return Y.visible&&!(!m&&Y.directTouch)&&Ea(Y.options.enableMouseTracking,!0)},S=u,N,T={chartX:b?b.chartX:void 0,chartY:b?b.chartY:void 0,shared:m};Wo(this,"beforeGetHoverData",T),N=S&&!S.stickyTracking?[S]:d.filter(Y=>Y.stickyTracking&&(T.filter||w)(Y));let U=p&&a||!b?a:this.findNearestKDPoint(N,m,b);return S=U==null?void 0:U.series,U&&(m&&!S.noSharedTooltip?(N=d.filter(function(Y){return T.filter?T.filter(Y):w(Y)&&!Y.noSharedTooltip}
61)).forEach(function(Y){var ue;let se=(ue=Y.options)==null?void 0:ue.nullInteraction,de=Xx(Y.points,function(le){return le.x===U.x&&(!le.isNull||!!se)});vp(de)&&(Y.boosted&&Y.boost&&(de=Y.boost.getPoint(de)),_.push(de))}):_.push(U)),Wo(this,"afterGetHoverData",T={hoverPoint:U}),{hoverPoint:T.hoverPoint,hoverSeries:S,hoverPoints:_}}getPointFromEvent(a){let u=a.target,d;for(;u&&!d;)d=u.point,u=u.parentNode;return d}onTrackerMouseOut(a){let u=this.chart,d=a.relatedTarget,p=u.hoverSeries;this.isDirectTouch=!1,!p||!d||p.stickyTracking||this.inClass(d,"highcharts-tooltip")||this.inClass(d,"highcharts-series-"+p.index)&&this.inClass(d,"highcharts-tracker")||p.onMouseOut()}inClass(a,u){let d=a,p;for(;d;){if(p=pI(d,"class")){if(p.indexOf(u)!==-1)return!0;if(p.indexOf("highcharts-container")!==-1)return!1}d=d.parentElement}}constructor(a,u){var d;this.hasDragged=0,this.pointerCaptureEventsToUnbind=[],this.eventsToUnbind=[],this.options=u,this.chart=a,this.runChartClick=!!((d=u.chart.events)!=null&&d.click),this.pinchDown=[],this.setDOMEvents(),Wo(this,"afterInit")}normalize(a,u){let d=a.touches,p=d?d.length?d.item(0):Ea(d.changedTouches,a.changedTouches)[0]:a;u||(u=this.getChartPosition());let m=p.pageX-u.left,b=p.pageY-u.top;return gb(a,{chartX:Math.round(m/=u.scaleX),chartY:Math.round(b/=u.scaleY)})}onContainerClick(a){let u=this.chart,d=u.hoverPoint,p=this.normalize(a),m=u.plotLeft,b=u.plotTop;!u.cancelClick&&(d&&this.inClass(p.target,"highcharts-tracker")?(Wo(d.series,"click",gb(p,{point:d})),u.hoverPoint&&d.firePointEvent("click",p)):(gb(p,this.getCoordinates(p)),u.isInsidePlot(p.chartX-m,p.chartY-b,{visiblePlotOnly:!0})&&Wo(u,"click",p)))}onContainerMouseDown(a){var d;let u=(1&(a.buttons||a.button))==1;a=this.normalize(a),B.isFirefox&&a.button!==0&&this.onContainerMouseMove(a),(a.button===void 0||u)&&(this.zoomOption(a),u&&((d=a.preventDefault)==null||d.call(a)),this.dragStart(a))}onContainerMouseLeave(a){let{pointer:u}=pb[Ea(Gn.hoverChartIndex,-1)]||{};a=this.normalize(a),this.onContainerMouseMove(a),u&&!this.inClass(a.relatedTarget,"highcharts-tooltip")&&(u.reset(),u.chartPosition=void 0)}onContainerMouseEnter(){delete this.chartPosition}onContainerMouseMove(a){var m;let u=this.chart,d=u.tooltip,p=this.normalize(a);this.setHoverChartIndex(a),(u.mouseIsDown==="mousedown"||this.touchSelect(p))&&this.drag(p),!((m=u.exporting)!=null&&m.openMenu)&&(this.inClass(p.target,"highcharts-tracker")||u.isInsidePlot(p.chartX-u.plotLeft,p.chartY-u.plotTop,{visiblePlotOnly:!0}))&&!(d!=null&&d.shouldStickOnContact(p))&&(this.inClass(p.target,"highcharts-no-tooltip")?this.reset(!1,0):this.runPointActions(p))}onDocumentTouchEnd(a){this.onDocumentMouseUp(a)}onContainerTouchMove(a){this.touchSelect(a)?this.onContainerMouseMove(a):this.touch(a)}onContainerTouchStart(a){this.touchSelect(a)?this.onContainerMouseDown(a):(this.zoomOption(a),this.touch(a,!0))}onDocumentMouseMove(a){let u=this.chart,d=u.tooltip,p=this.chartPosition,m=this.normalize(a,p);!p||u.isInsidePlot(m.chartX-u.plotLeft,m.chartY-u.plotTop,{visiblePlotOnly:!0})||d!=null&&d.shouldStickOnContact(m)||m.target!==u.container.ownerDocument&&this.inClass(m.target,"highcharts-tracker")||this.reset()}onDocumentMouseUp(a){var u,d,p;a!=null&&a.touches&&this.hasPinchMoved&&((u=a==null?void 0:a.preventDefault)==null||u.call(a)),(p=(d=pb[Ea(Gn.hoverChartIndex,-1)])==null?void 0:d.pointer)==null||p.drop(a)}pinch(a){let u=this,{chart:d,hasZoom:p,lastTouches:m}=u,b=[].map.call(a.touches||[],T=>u.normalize(T)),_=b.length,w=_===1&&(u.inClass(a.target,"highcharts-tracker")&&d.runTrackerClick||u.runChartClick),S=d.tooltip,N=_===1&&Ea(S==null?void 0:S.options.followTouchMove,!0);_>1?u.initiated=!0:N&&(u.initiated=!1),p&&u.initiated&&!w&&a.cancelable!==!1&&a.preventDefault(),a.type==="touchstart"?(u.pinchDown=b,u.res=!0,d.mouseDownX=a.chartX):N?this.runPointActions(u.normalize(a)):m&&(Wo(d,"touchpan",{originalEvent:a,touches:b},()=>{let T=U=>{let Y=U[0],se=U[1]||Y;return{x:Y.chartX,y:Y.chartY,width:se.chartX-Y.chartX,height:se.chartY-Y.chartY}};d.transform({axes:d.axes.filter(U=>U.zoomEnabled&&(this.zoomHor&&U.horiz||this.zoomVert&&!U.horiz)),to:T(b),from:T(m),trigger:a.type})}),u.res&&(u.res=!1,this.reset(!1,0))),u.lastTouches=b}reset(a,u){let d=this.chart,p=d.hoverSeries,m=d.hoverPoint,b=d.hoverPoints,_=d.tooltip,w=_!=null&&_.shared?b:m;
61a&&w&&Kx(w).forEach(function(S){S.series.isCartesian&&S.plotX===void 0&&(a=!1)}),a?_&&w&&Kx(w).length&&(_.refresh(w),_.shared&&b?b.forEach(function(S){S.setState(S.state,!0),S.series.isCartesian&&(S.series.xAxis.crosshair&&S.series.xAxis.drawCrosshair(null,S),S.series.yAxis.crosshair&&S.series.yAxis.drawCrosshair(null,S))}):m&&(m.setState(m.state,!0),d.axes.forEach(function(S){S.crosshair&&m.series[S.coll]===S&&S.drawCrosshair(null,m)}))):(m&&m.onMouseOut(),b&&b.forEach(function(S){S.setState()}),p&&p.onMouseOut(),_&&_.hide(u),this.unDocMouseMove&&(this.unDocMouseMove=this.unDocMouseMove()),d.axes.forEach(function(S){S.hideCrosshair()}),d.hoverPoints=d.hoverPoint=void 0)}runPointActions(a,u,d){var de;let p=this.chart,m=p.series,b=(de=p.tooltip)!=null&&de.options.enabled?p.tooltip:void 0,_=!!b&&b.shared,w=u||p.hoverPoint,S=(w==null?void 0:w.series)||p.hoverSeries,N=(!a||a.type!=="touchmove")&&(!!u||(S==null?void 0:S.directTouch)&&this.isDirectTouch),T=this.getHoverData(w,S,m,N,_,a);w=T.hoverPoint,S=T.hoverSeries;let U=T.hoverPoints,Y=(S==null?void 0:S.tooltipOptions.followPointer)&&!S.tooltipOptions.split,se=_&&S&&!S.noSharedTooltip;if(w&&(d||w!==p.hoverPoint||b!=null&&b.isHidden)){if((p.hoverPoints||[]).forEach(function(ue){U.indexOf(ue)===-1&&ue.setState()}),p.hoverSeries!==S&&S.onMouseOver(),this.applyInactiveState(U),(U||[]).forEach(function(ue){ue.setState("hover")}),p.hoverPoint&&p.hoverPoint.firePointEvent("mouseOut"),!w.series)return;p.hoverPoints=U,p.hoverPoint=w,w.firePointEvent("mouseOver",void 0,()=>{b&&w&&b.refresh(se?U:w,a)})}else if(Y&&b&&!b.isHidden){let ue=b.getAnchor([{}],a);p.isInsidePlot(ue[0],ue[1],{visiblePlotOnly:!0})&&b.updatePosition({plotX:ue[0],plotY:ue[1]})}this.unDocMouseMove||(this.unDocMouseMove=Pr(p.container.ownerDocument,"mousemove",ue=>{var le,me;return(me=(le=pb[Gn.hoverChartIndex??-1])==null?void 0:le.pointer)==null?void 0:me.onDocumentMouseMove(ue)}),this.eventsToUnbind.push(this.unDocMouseMove)),p.axes.forEach(function(ue){var ye;let le,me=((ye=ue.crosshair)==null?void 0:ye.snap)??!0;me&&((le=p.hoverPoint)&&le.series[ue.coll]===ue||(le=Xx(U,Le=>{var De;return((De=Le.series)==null?void 0:De[ue.coll])===ue}))),le||!me?ue.drawCrosshair(a,le):ue.hideCrosshair()})}setDOMEvents(){let a=this.chart.container,u=a.ownerDocument;a.onmousedown=this.onContainerMouseDown.bind(this),a.onmousemove=this.onContainerMouseMove.bind(this),a.onclick=this.onContainerClick.bind(this),this.eventsToUnbind.push(Pr(a,"mouseenter",this.onContainerMouseEnter.bind(this)),Pr(a,"mouseleave",this.onContainerMouseLeave.bind(this))),Gn.unbindDocumentMouseUp.some(p=>p.doc===u)||Gn.unbindDocumentMouseUp.push({doc:u,unbind:Pr(u,"mouseup",this.onDocumentMouseUp.bind(this))});let d=this.chart.renderTo.parentElement;for(;d&&d.tagName!=="BODY";)this.eventsToUnbind.push(Pr(d,"scroll",()=>{delete this.chartPosition})),d=d.parentElement;this.eventsToUnbind.push(Pr(a,"touchstart",this.onContainerTouchStart.bind(this),{passive:!1}),Pr(a,"touchmove",this.onContainerTouchMove.bind(this),{passive:!1})),Gn.unbindDocumentTouchEnd||(Gn.unbindDocumentTouchEnd=Pr(u,"touchend",this.onDocumentTouchEnd.bind(this),{passive:!1})),this.setPointerCapture(),Pr(this.chart,"redraw",this.setPointerCapture.bind(this))}setPointerCapture(){var m,b;if(!fI)return;let a=this.pointerCaptureEventsToUnbind,u=this.chart,d=u.container,p=Ea((m=u.options.tooltip)==null?void 0:m.followTouchMove,!0)&&u.series.some(_=>_.options.findNearestPointBy.indexOf("y")>-1);!this.hasPointerCapture&&p?(a.push(Pr(d,"pointerdown",_=>{var w,S;(w=_.target)!=null&&w.hasPointerCapture(_.pointerId)&&((S=_.target)==null||S.releasePointerCapture(_.pointerId))}),Pr(d,"pointermove",_=>{var w,S;(S=(w=u.pointer)==null?void 0:w.getPointFromEvent(_))==null||S.onMouseOver(_)})),u.styledMode||mb(d,{"touch-action":"none"}),d.className+=" highcharts-no-touch-action",this.hasPointerCapture=!0):this.hasPointerCapture&&!p&&(a.forEach(_=>_()),a.length=0,u.styledMode||mb(d,{"touch-action":Ea((b=u.options.chart.style)==null?void 0:b["touch-action"],"manipulation")}),d.className=d.className.replace(" highcharts-no-touch-action",""),this.hasPointerCapture=!1)}setHoverChartIndex(a){var p;let u=this.chart,d=B.charts[Ea(Gn.hoverChartIndex,-1)];if(d&&d!==u){let m={relatedTarget:u.container};a&&!(a!=null&&a.relatedTarget)&&Object.assign({},a,m),(p=d.pointer)==null||p.onContainerMouseLeave(a||m)}d!=null&&d.mouseIsDown||(Gn.hoverChartIndex=u.index)}touch(a,u){var b;let d,{chart:p,pinchDown:m=[]}=this;this.setHoverChartIndex(),(a=this.normalize(a)).touches.length===1?p.isInsidePlot(a.chartX-p.plotLeft,a.chartY-p.plotTop,{visiblePlotOnly:!0})&&!((b=p.exporting)!=null&&b.openMenu)?(u&&this.runPointActions(a),a.type==="touchmove"&&(this.hasPinchMoved=d=!!m[0]&&Math.pow(m[0].chartX-a.chartX,2)+Math.pow(m[0].chartY-a.chartY,2)>=16),Ea(d,!0)&&this.pinch(a)):u&&this.reset():a.touches.length===2&&this.pinch(a)}touchSelect(a){return!!(this.chart.zooming.singleTouch&&a.touches&&a.touches.length===1)}zoomOption(a){let u=this.chart,d=u.inverted,p=u.zooming.type||"",m,b;/touch/.test(a.type)&&(p=Ea(u.zooming.pinchType,p)),this.zoomX=m=/x/.test(p),this.zoomY=b=/y/.test(p),this.zoomHor=m&&!d||b&&d,this.zoomVert=b&&!d||m&&d,this.hasZoom=m||b}}Gn.unbindDocumentMouseUp=[],(function(k){k.compose=function(a){vI(hI,"Core.Pointer")&&Pr(a,"beforeRender",function(){this.pointer=new k(this,this.options)})}})(Gn||(Gn={}));let Jx=Gn;(function(k){k.setLength=function(a,u,d){return Array.isArray(a)?(a.length=u,a):a[d?"subarray":"slice"](0,u)},k.splice=function(a,u,d,p,m=[]){if(Array.isArray(a))return Array.isArray(m)||(m=Array.from(m)),{removed:a.splice(u,d,...m),array:a};let b=Object.getPrototypeOf(a).constructor,_=a[p?"subarray":"slice"](u,u+d),w=new b(a.length-d+m.length);
vendor: 17,990 bytes, line 61
61return w.set(a.subarray(0,u),0),w.set(m,u),w.set(a.subarray(u+d),u+m.length),{removed:_,array:w}}})(y||(y={}));let{setLength:bI,splice:Qx}=y,{fireEvent:vb,objectEach:Ud,uniqueKey:jd}=Q,bp=class{constructor(k={}){this.autoId=!k.id,this.columns={},this.id=k.id||jd(),this.modified=this,this.rowCount=0,this.versionTag=jd();let a=0;Ud(k.columns||{},(u,d)=>{this.columns[d]=u.slice(),a=Math.max(a,u.length)}),this.applyRowCount(a)}applyRowCount(k){this.rowCount=k,Ud(this.columns,(a,u)=>{a.length!==k&&(this.columns[u]=bI(a,k))})}deleteRows(k,a=1){if(a>0&&k<this.rowCount){let u=0;Ud(this.columns,(d,p)=>{this.columns[p]=Qx(d,k,a).array,u=d.length}),this.rowCount=u}vb(this,"afterDeleteRows",{rowIndex:k,rowCount:a}),this.versionTag=jd()}getColumn(k,a){return this.columns[k]}getColumns(k,a){return(k||Object.keys(this.columns)).reduce((u,d)=>(u[d]=this.columns[d],u),{})}getRow(k,a){return(a||Object.keys(this.columns)).map(u=>{var d;return(d=this.columns[u])==null?void 0:d[k]})}setColumn(k,a=[],u=0,d){this.setColumns({[k]:a},u,d)}setColumns(k,a,u){let d=this.rowCount;Ud(k,(p,m)=>{this.columns[m]=p.slice(),d=p.length}),this.applyRowCount(d),u!=null&&u.silent||(vb(this,"afterSetColumns"),this.versionTag=jd())}setRow(k,a=this.rowCount,u,d){let{columns:p}=this,m=u?this.rowCount+1:a+1;Ud(k,(b,_)=>{let w=p[_]||(d==null?void 0:d.addColumns)!==!1&&Array(m);w&&(u?w=Qx(w,a,0,!0,[b]).array:w[a]=b,p[_]=w)}),m>this.rowCount&&this.applyRowCount(m),d!=null&&d.silent||(vb(this,"afterSetRows"),this.versionTag=jd())}},{extend:yI,merge:_I,pick:Zx}=Q;(function(k){function a(u,d,p){var Le,De;let m=this.legendItem=this.legendItem||{},{chart:b,options:_}=this,{baseline:w=0,symbolWidth:S,symbolHeight:N}=u,T=this.symbol||"circle",U=N/2,Y=b.renderer,se=m.group,de=w-Math.round((((Le=u.fontMetrics)==null?void 0:Le.b)||N)*(p?.4:.3)),ue={},le,me=_.marker,ye=0;if(b.styledMode||(ue["stroke-width"]=Math.min(_.lineWidth||0,24),_.dashStyle?ue.dashstyle=_.dashStyle:_.linecap!=="square"&&(ue["stroke-linecap"]="round")),m.line=Y.path().addClass("highcharts-graph").attr(ue).add(se),p&&(m.area=Y.path().addClass("highcharts-area").add(se)),ue["stroke-linecap"]&&(ye=Math.min(m.line.strokeWidth(),S)/2),S){let Ie=[["M",ye,de],["L",S-ye,de]];m.line.attr({d:Ie}),(De=m.area)==null||De.attr({d:[...Ie,["L",S-ye,w],["L",ye,w]]})}if(me&&me.enabled!==!1&&S){let Ie=Math.min(Zx(me.radius,U),U);T.indexOf("url")===0&&(me=_I(me,{width:N,height:N}),Ie=0),m.symbol=le=Y.symbol(T,S/2-Ie,de-Ie,2*Ie,2*Ie,yI({context:"legend"},me)).addClass("highcharts-point").add(se),le.isMarker=!0}}k.areaMarker=function(u,d){a.call(this,u,d,!0)},k.lineMarker=a,k.rectangle=function(u,d){let p=d.legendItem||{},m=u.options,b=u.symbolHeight,_=m.squareSymbol,w=_?b:u.symbolWidth;p.symbol=this.chart.renderer.rect(_?(u.symbolWidth-b)/2:0,u.baseline-b+1,w,b,Zx(u.options.symbolRadius,b/2)).addClass("highcharts-point").attr({zIndex:3}).add(p.group)}})(x||(x={}));let ew=x,{defaultOptions:tw}=He,{extend:xI,extendClass:wI,merge:EI}=Q;(function(k){function a(u,d){let p=tw.plotOptions||{},m=d.defaultOptions,b=d.prototype;return b.type=u,b.pointClass||(b.pointClass=Ho),!k.seriesTypes[u]&&(m&&(p[u]=m),k.seriesTypes[u]=d,!0)}k.seriesTypes=B.seriesTypes,k.registerSeriesType=a,k.seriesType=function(u,d,p,m,b){let _=tw.plotOptions||{};if(d=d||"",_[u]=EI(_[d],p),delete k.seriesTypes[u],a(u,wI(k.seriesTypes[d]||Zi,m)),k.seriesTypes[u].prototype.type=u,b){class w extends Ho{}xI(w.prototype,b),k.seriesTypes[u].prototype.pointClass=w}return k.seriesTypes[u]}})(E||(E={}));let yn=E,{animObject:sw,setAnimation:SI}=mt,{defaultOptions:yp}=He,{registerEventOptions:kI}=rp,{svg:CI,win:TI}=B,{seriesTypes:dc}=yn,{format:AI}=ti,{arrayMax:bb,arrayMin:nw,clamp:iw,correctFloat:rw,crisp:OI,defined:Hn,destroyObjectProperties:DI,diffObjects:PI,erase:aw,error:_p,extend:hc,find:$I,fireEvent:pn,getClosestDistance:II,getNestedProperty:ow,insertItem:lw,isArray:uw,isNumber:Xn,isString:MI,merge:Hd,objectEach:yb,pick:mn,removeEvent:NI,syncTimeout:cw}=Q;class ta{constructor(){this.zoneAxis="y"}init(a,u){var w,S,N;let d;pn(this,"init",{options:u}),this.dataTable??(this.dataTable=new bp);let p=a.series;this.eventsToUnbind=[],this.chart=a,this.options=this.setOptions(u);let m=this.options,b=m.visible!==!1;this.linkedSeries=[],this.bindAxes(),hc(this,{name:m.name,state:"",visible:b,selected:m.selected===!0}),kI(this,m);let _=m.events;(_!=null&&_.click||(S=(w=m.point)==null?void 0:w.events)!=null&&S.click||m.allowPointSelect)&&(a.runTrackerClick=!0),this.getColor(),this.getSymbol(),this.isCartesian&&(a.hasCartesianSeries=!0),p.length&&(d=p[p.length-1]),this._i=mn(d==null?void 0:d._i,-1)+1,this.opacity=this.options.opacity,a.orderItems("series",lw(this,p)),(N=m.dataSorting)!=null&&N.enabled?this.setDataSortingOptions():this.points||this.data||this.setData(m.data,!1),pn(this,"afterInit")}is(a){return dc[a]&&this instanceof dc[a]}bindAxes(){let a,u=this,d=u.options,p=u.chart;pn(this,"bindAxes",null,function(){(u.axisTypes||[]).forEach(function(m){(p[m]||[]).forEach(function(b){a=b.options,(mn(d[m],0)===b.index||d[m]!==void 0&&d[m]===a.id)&&(lw(u,b.series),u[m]=b,b.isDirty=!0)}),u[m]||u.optionalAxis===m||_p(18,!0,p)})}),pn(this,"afterBindAxes")}hasData(){return this.visible&&this.dataMax!==void 0&&this.dataMin!==void 0||this.visible&&this.dataTable.rowCount>0}hasMarkerChanged(a,u){let d=a.marker,p=u.marker||{};return d&&(p.enabled&&!d.enabled||p.symbol!==d.symbol||p.height!==d.height||p.width!==d.width)}autoIncrement(a){let u,d=this.options,{pointIntervalUnit:p,relativeXValue:m}=this.options,b=this.chart.time,_=this.xIncrement??b.parse(d.pointStart)??0;if(this.pointInterval=u=mn(this.pointInterval,d.pointInterval,1),m&&Xn(a)&&(u*=a),p){let w=b.toParts(_);p==="day"?w[2]+=u:p==="month"?w[1]+=u:p==="year"&&(w[0]+=u),u=b.makeTime.apply(b,w)-_}return m&&Xn(a)?_+u:(this.xIncrement=_+u,_)}setDataSortingOptions(){let a=this.options;hc(this,{requireSorting:!1,sorted:!1,enabledDataSorting:!0,allowDG:!1}),Hn(a.pointRange)||(a.pointRange=1)}setOptions(a){var ue,le;let u,d=this.chart,p=d.options.plotOptions,m=d.userOptions||{},b=Hd(a),_=d.styledMode,w={plotOptions:p,userOptions:b};pn(this,"setOptions",w);let S=w.plotOptions[this.type],N=m.plotOptions||{},T=N.series||{},U=yp.plotOptions[this.type]||{},Y=N[this.type]||{};S.dataLabels=this.mergeArrays(U.dataLabels,S.dataLabels),this.userOptions=w.userOptions;let se=Hd(S,p.series,Y,b);this.tooltipOptions=Hd(yp.tooltip,(ue=yp.plotOptions.series)==null?void 0:ue.tooltip,U==null?void 0:U.tooltip,d.userOptions.tooltip,(le=N.series)==null?void 0:le.tooltip,Y.tooltip,b.tooltip),this.stickyTracking=mn(b.stickyTracking,Y.stickyTracking,T.stickyTracking,!!this.tooltipOptions.shared&&!this.noSharedTooltip||se.stickyTracking),S.marker===null&&delete se.marker,this.zoneAxis=se.zoneAxis||"y";let de=this.zones=(se.zones||[]).map(me=>({...me}));return(se.negativeColor||se.negativeFillColor)&&!se.zones&&(u={value:se[this.zoneAxis+"Threshold"]||se.threshold||0,className:"highcharts-negative"},_||(u.color=se.negativeColor,u.fillColor=se.negativeFillColor),de.push(u)),de.length&&Hn(de[de.length-1].value)&&de.push(_?{}:{color:this.color,fillColor:this.fillColor}),pn(this,"afterSetOptions",{options:se}),se}getName(){return this.options.name??AI(this.chart.options.lang.seriesName,this,this.chart)}getCyclic(a,u,d){let p,m,b=this.chart,_=`${a}Index`,w=`${a}Counter`,S=(d==null?void 0:d.length)||b.options.chart.colorCount;!u&&(Hn(m=mn(a==="color"?this.options.colorIndex:void 0,this[_]))?p=m:(b.series.length||(b[w]=0),p=b[w]%S,b[w]+=1),d&&(u=d[p])),p!==void 0&&(this[_]=p),this[a]=u}getColor(){this.chart.styledMode?this.getCyclic("color"):this.options.colorByPoint?this.color="#cccccc":this.getCyclic("color",this.options.color||yp.plotOptions[this.type].color,this.chart.options.colors)}getPointsCollection(){return(this.hasGroupedData?this.points:this.data)||[]}getSymbol(){let a=this.options.marker;this.getCyclic("symbol",a.symbol,this.chart.options.symbols)}getColumn(a,u){return(u?this.dataTable.modified:this.dataTable).getColumn(a,!0)||[]}findPointIndex(a,u){var T;let d,p,m,{id:b,x:_}=a,w=this.points,S=this.options.dataSorting,N=this.cropStart||0;if(b){let U=this.chart.get(b);U instanceof Ho&&(d=U)}else if(this.linkedParent||this.enabledDataSorting||this.options.relativeXValue){let U=Y=>!Y.touched&&Y.index===a.index;if(S!=null&&S.matchByName?U=Y=>!Y.touched&&Y.name===a.name:this.options.relativeXValue&&(U=Y=>!Y.touched&&Y.options.x===a.x),!(d=$I(w,U)))return}return d&&(m=d==null?void 0:d.index)!==void 0&&(p=!0),m===void 0&&Xn(_)&&(m=this.getColumn("x").indexOf(_,u)),m!==-1&&m!==void 0&&this.cropped&&(m=m>=N?m-N:m),!p&&Xn(m)&&((T=w[m])!=null&&T.touched)&&(m=void 0),m}updateData(a,u){var de;let{options:d,requireSorting:p}=this,m=d.dataSorting,b=this.points,_=[],w=a.length===b.length,S,N,T,U,Y=!0;if(this.xIncrement=null,a.forEach((ue,le)=>{var Ie;let me,ye=Hn(ue)&&this.pointClass.prototype.optionsToObject.call({series:this},ue)||{},{id:Le,x:De}=ye;Le||Xn(De)?((me=this.findPointIndex(ye,U))===-1||me===void 0?_.push(ue):b[me]&&ue!==((Ie=d.data)==null?void 0:Ie[me])?(b[me].update(ue,!1,void 0,!1),b[me].touched=!0,p&&(U=me+1)):b[me]&&(b[me].touched=!0),(!w||le!==me||m!=null&&m.enabled||this.hasDerivedData)&&(S=!0)):_.push(ue)},this),S)for(N=b.length;N--;)(T=b[N])&&!T.touched&&((de=T.remove)==null||de.call(T,!1,u));else w&&!(m!=null&&m.enabled)?(a.forEach((ue,le)=>{ue===b[le].y||b[le].destroyed||b[le].update(ue,!1,void 0,!1)}),_.length=0):Y=!1;if(b.forEach(ue=>{ue&&(ue.touched=!1)}),!Y)return!1;_.forEach(ue=>{this.addPoint(ue,!1,void 0,void 0,!1)},this);let se=this.getColumn("x");return this.xIncrement===null&&se.length&&(this.xIncrement=bb(se),this.autoIncrement()),!0}dataColumnKeys(){return["x",...this.pointArrayMap||["y"]]}setData(a,u=!0,d,p){var Ge,Ue;let m=this.points,b=(m==null?void 0:m.length)||0,_=this.options,w=this.chart,S=_.dataSorting,N=this.xAxis,T=_.turboThreshold,U=this.dataTable,Y=this.dataColumnKeys(),se=this.pointValKey||"y",de=(this.pointArrayMap||[]).length,ue=_.keys,le,me,ye=0,Le=1,De;w.options.chart.allowMutatingData||(_.data&&delete this.options.data,this.userOptions.data&&delete this.userOptions.data,De=Hd(!0,a));let Ie=(a=De||a||[]).length;if(S!=null&&S.enabled&&(a=this.sortData(a)),w.options.chart.allowMutatingData&&p!==!1&&Ie&&b&&!this.cropped&&!this.hasGroupedData&&this.visible&&!this.boosted&&(me=this.updateData(a,d)),!me){this.xIncrement=null,this.colorCounter=0;let qe=T&&!_.relativeXValue&&Ie>T;if(qe){let rt=this.getFirstValidPoint(a),dt=this.getFirstValidPoint(a,Ie-1,-1),xt=Et=>!!(uw(Et)&&(ue||Xn(Et[0])));if(Xn(rt)&&Xn(dt)){let Et=[],Rt=[];for(let It of a)Et.push(this.autoIncrement()),Rt.push(It);U.setColumns({x:Et,[se]:Rt})}else if(xt(rt)&&xt(dt))if(de){let Et=+(rt.length===de),Rt=Array(Y.length).fill(0).map(()=>[]);for(let It of a){Et&&Rt[0].push(this.autoIncrement());for(let jt=Et;jt<=de;jt++)(Ge=Rt[jt])==null||Ge.push(It[jt-Et])}U.setColumns(Y.reduce((It,jt,Ct)=>(It[jt]=Rt[Ct],It),{}))}else{ue&&(ye=ue.indexOf("x"),Le=ue.indexOf("y"),ye=ye>=0?ye:0,Le=Le>=0?Le:1),rt.length===1&&(Le=0);let Et=[],Rt=[];if(ye===Le)for(let It of a)Et.push(this.autoIncrement()),Rt.push(It[Le]);else for(let It of a)Et.push(It[ye]),Rt.push(It[Le]);U.setColumns({x:Et,[se]:Rt})}else qe=!1}if(!qe){let rt=Y.reduce((dt,xt)=>(dt[xt]=[],dt),{});for(le=0;le<Ie;le++){let dt=this.pointClass.prototype.applyOptions.apply({series:this},[a[le]]);for(let xt of Y)rt[xt][le]=dt[xt]}U.setColumns(rt)}for(MI(this.getColumn("y")[0])&&_p(14,!0,w),this.data=[],this.options.data=this.userOptions.data=a,le=b;le--;)(Ue=m[le])==null||Ue.destroy();N&&(N.minRange=N.userMinRange),this.isDirty=w.isDirtyBox=!0,this.isDirtyData=!!m,d=!1}_.legendType==="point"&&(this.processData(),this.generatePoints()),u&&w.redraw(d)}sortData(a){let u=this,d=u.options.dataSorting.sortKey||"y",p=function(m,b){return Hn(b)&&m.pointClass.prototype.optionsToObject.call({series:m},b)||{}};return a.forEach(function(m,b){a[b]=p(u,m),a[b].index=b},this),a.concat().sort((m,b)=>{let _=ow(d,m),w=ow(d,b);return w<_?-1:+(w>_)}).forEach(function(m,b){m.x=b},this),u.linkedSeries&&u.linkedSeries.forEach(function(m){var w;let b=m.options,_=b.data;!((w=b.dataSorting)!=null&&w.enabled)&&_&&(_.forEach(function(S,N){_[N]=p(m,S),a[N]&&(_[N].x=a[N].x,_[N].index=N)}),m.setData(_,!1))}),a}getProcessedData(a){let u=this,{dataTable:d,isCartesian:p,options:m,xAxis:b}=u,_=m.cropThreshold,w=a||u.getExtremesFromAll,S=b==null?void 0:b.logarithmic,N=d.rowCount,T,U,Y=0,se,de,ue,le=u.getColumn("x"),me=d,ye=!1;return b&&(de=(se=b.getExtremes()).min,ue=se.max,ye=!!(b.categories&&!b.names.length),p&&u.sorted&&!w&&(!_||N>_||u.forceCrop)&&(le[N-1]<de||le[0]>ue?me=new bp:u.getColumn(u.pointValKey||"y").length&&(le[0]<de||le[N-1]>ue)&&(me=(T=this.cropData(d,de,ue)).modified,Y=T.start,U=!0))),le=me.getColumn("x")||[],{modified:me,cropped:U,cropStart:Y,closestPointRange:II([S?le.map(S.log2lin):le],()=>u.requireSorting&&!ye&&_p(15,!1,u.chart))}}processData(a){let u=this.xAxis,d=this.dataTable;if(this.isCartesian&&!this.isDirty&&!u.isDirty&&!this.yAxis.isDirty&&!a)return!1;let p=this.getProcessedData();d.modified=p.modified,this.cropped=p.cropped,this.cropStart=p.cropStart,this.closestPointRange=this.basePointRange=p.closestPointRange,pn(this,"afterProcessData")}cropData(a,u,d){let p=a.getColumn("x",!0)||[],m=p.length,b={},_,w,S=0,N=m;for(_=0;_<m;_++)if(p[_]>=u){S=Math.max(0,_-1);break}for(w=_;w<m;w++)if(p[w]>d){N=w+1;break}for(let T of this.dataColumnKeys()){let U=a.getColumn(T,!0);U&&(b[T]=U.slice(S,N))}return{modified:new bp({columns:b}),start:S,end:N}}generatePoints(){var De,Ie,Ge;let a=this.options,u=this.processedData||a.data,d=this.dataTable.modified,p=this.getColumn("x",!0),m=this.pointClass,b=d.rowCount,_=this.cropStart||0,w=this.hasGroupedData,S=a.keys,N=[],T=(De=a.dataGrouping)!=null&&De.groupAll?_:0,U=(Ie=this.xAxis)==null?void 0:Ie.categories,Y=this.pointArrayMap||["y"],se=this.dataColumnKeys(),de,ue,le,me,ye=this.data,Le;if(!ye&&!w){let Ue=[];Ue.length=(u==null?void 0:u.length)||0,ye=this.data=Ue}for(S&&w&&(this.options.keys=!1),me=0;me<b;me++)ue=_+me,w?((le=new m(this,d.getRow(me,se)||[])).dataGroup=this.groupMap[T+me],(Ge=le.dataGroup)!=null&&Ge.options&&(le.options=le.dataGroup.options,hc(le,le.dataGroup.options),delete le.dataLabels)):(le=ye[ue],Le=u?u[ue]:d.getRow(me,Y),le||Le===void 0||(ye[ue]=le=new m(this,Le,p[me]))),le&&(le.index=w?T+me:ue,N[me]=le,le.category=(U==null?void 0:U[le.x])??le.x,le.key=le.name??le.category);if(this.options.keys=S,ye&&(b!==(de=ye.length)||w))for(me=0;me<de;me++)me!==_||w||(me+=b),ye[me]&&(ye[me].destroyElements(),ye[me].plotX=void 0);this.data=ye,this.points=N,pn(this,"afterGeneratePoints")}getXExtremes(a){return{min:nw(a),max:bb(a)}}getExtremes(a,u){var De;let{xAxis:d,yAxis:p}=this,m=u||this.getExtremesFromAll||this.options.getExtremesFromAll,b=m&&this.cropped?this.dataTable:this.dataTable.modified,_=b.rowCount,w=a||this.stackedYData,S=w?[w]:((De=this.keysAffectYAxis||this.pointArrayMap||["y"])==null?void 0:De.map(Ie=>b.getColumn(Ie,!0)||[]))||[],N=this.getColumn("x",!0),T=[],U=this.requireSorting&&!this.is("column")?1:0,Y=!!p&&p.positiveValuesOnly,se=m||this.cropped||!d,de,ue,le,me=0,ye=0;for(d&&(me=(de=d.getExtremes()).min,ye=de.max),le=0;le<_;le++)if(ue=N[le],se||(N[le+U]||ue)>=me&&(N[le-U]||ue)<=ye)for(let Ie of S){let Ge=Ie[le];Xn(Ge)&&(Ge>0||!Y)&&T.push(Ge)}let Le={activeYData:T,dataMin:nw(T),dataMax:bb(T)};return pn(this,"afterGetExtremes",{dataExtremes:Le}),Le}applyExtremes(){let a=this.getExtremes();return this.dataMin=a.dataMin,this.dataMax=a.dataMax,a}getFirstValidPoint(a,u=0,d=1){let p=a.length,m=u;for(;m>=0&&m<p;){if(Hn(a[m]))return a[m];m+=d}}translate(){var ye;this.generatePoints();let a=this.options,u=a.stacking,d=this.xAxis,p=this.enabledDataSorting,m=this.yAxis,b=this.points,_=b.length,w=this.pointPlacementToXValue(),S=!!w,N=a.threshold,T=a.startFromThreshold?N:0,U=(a==null?void 0:a.nullInteraction)&&m.len,Y,se,de,ue,le=Number.MAX_VALUE;function me(Le){return iw(Le,-1e9,1e9)}for(Y=0;Y<_;Y++){let Le,De=b[Y],Ie=De.x,Ge,Ue,qe=De.y,rt=De.low,dt=u&&((ye=m.stacking)==null?void 0:ye.stacks[(this.negStacks&&qe<(T?0:N)?"-":"")+this.stackKey]);De.plotX=Xn(se=d.translate(Ie,!1,!1,!1,!0,w))?rw(me(se)):void 0,u&&this.visible&&dt&&dt[Ie]&&(ue=this.getStackIndicator(ue,Ie,this.index),!De.isNull&&ue.key&&(Ue=(Ge=dt[Ie]).points[ue.key]),Ge&&uw(Ue)&&(rt=Ue[0],qe=Ue[1],rt===T&&ue.key===dt[Ie].base&&(rt=mn(Xn(N)?N:m.min)),m.positiveValuesOnly&&Hn(rt)&&rt<=0&&(rt=void 0),De.total=De.stackTotal=mn(Ge.total),De.percentage=Hn(De.y)&&Ge.total?De.y/Ge.total*100:void 0,De.stackY=qe,this.irregularWidths||Ge.setOffset(this.pointXOffset||0,this.barW||0,void 0,void 0,void 0,this.xAxis))),De.yBottom=Hn(rt)?me(m.translate(rt,!1,!0,!1,!0)):void 0,this.dataModify&&(qe=this.dataModify.modifyValue(qe,Y)),Xn(qe)&&De.plotX!==void 0?Le=Xn(Le=m.translate(qe,!1,!0,!1,!0))?me(Le):void 0:!Xn(qe)&&U&&(Le=U),De.plotY=Le,De.isInside=this.isPointInside(De),De.clientX=S?rw(d.translate(Ie,!1,!1,!1,!0,w)):se,De.negative=(De.y||0)<(N||0),De.isNull||De.visible===!1||(de!==void 0&&(le=Math.min(le,Math.abs(se-de))),de=se),De.zone=this.zones.length?De.getZone():void 0,!De.graphic&&this.group&&p&&(De.isNew=!0)}this.closestPointRangePx=le,pn(this,"afterTranslate")}getValidPoints(a,u,d){let p=this.chart;return(a||this.points||[]).filter(function(m){let{plotX:b,plotY:_}=m;return(!!d||!m.isNull&&!!Xn(_))&&(!u||!!p.isInsidePlot(b,_,{inverted:p.inverted}))&&m.visible!==!1})}getSharedClipKey(){return this.sharedClipKey=(this.options.xAxis||0)+","+(this.options.yAxis||0),this.sharedClipKey}setClip(){let{chart:a,group:u,markerGroup:d}=this,p=a.sharedClips,m=a.renderer,b=a.getClipBox(this),_=this.getSharedClipKey(),w=p[_];w?w.animate(b):p[_]=w=m.clipRect(b),u&&u.clip(this.options.clip===!1?void 0:w),d&&d.clip()}animate(a){let{chart:u,group:d,markerGroup:p}=this,m=u.inverted,b=sw(this.options.animation),_=[this.getSharedClipKey(),b.duration,b.easing,b.defer].join(","),w=u.sharedCl
61ips[_],S=u.sharedClips[_+"m"];if(a&&d){let N=u.getClipBox(this);if(w)w.attr("height",N.height);else{N.width=0,m&&(N.x=u.plotHeight),w=u.renderer.clipRect(N),u.sharedClips[_]=w;let T={x:-99,y:-99,width:m?u.plotWidth+199:99,height:m?99:u.plotHeight+199};S=u.renderer.clipRect(T),u.sharedClips[_+"m"]=S}d.clip(w),p==null||p.clip(S)}else if(w&&!w.hasClass("highcharts-animating")){let N=u.getClipBox(this),T=b.step;(p!=null&&p.element.childNodes.length||u.series.length>1)&&(b.step=function(U,Y){T&&T.apply(Y,arguments),Y.prop==="width"&&(S!=null&&S.element)&&S.attr(m?"height":"width",U+99)}),w.addClass("highcharts-animating").animate(N,b)}}afterAnimate(){this.setClip(),yb(this.chart.sharedClips,(a,u,d)=>{a&&!this.chart.container.querySelector(`[clip-path="url(#${a.id})"]`)&&(a.destroy(),delete d[u])}),this.finishedAnimating=!0,pn(this,"afterAnimate")}drawPoints(a=this.points){let u,d,p,m,b,_,w,S=this.chart,N=S.styledMode,{colorAxis:T,options:U}=this,Y=U.marker,se=U.nullInteraction,de=this[this.specialGroup||"markerGroup"],ue=this.xAxis,le=mn(Y.enabled,!ue||!!ue.isRadial||null,this.closestPointRangePx>=Y.enabledThreshold*Y.radius);if(Y.enabled!==!1||this._hasPointMarkers)for(u=0;u<a.length;u++){m=(p=(d=a[u]).graphic)?"animate":"attr",b=d.marker||{},_=!!d.marker;let me=d.isNull;if((le&&!Hn(b.enabled)||b.enabled)&&(!me||se)&&d.visible!==!1){let ye=mn(b.symbol,this.symbol,"rect");w=this.markerAttribs(d,d.selected&&"select"),this.enabledDataSorting&&(d.startXPos=ue.reversed?-(w.width||0):ue.width);let Le=d.isInside!==!1;if(!p&&Le&&((w.width||0)>0||d.hasImage)&&(d.graphic=p=S.renderer.symbol(ye,w.x,w.y,w.width,w.height,_?b:Y).add(de),this.enabledDataSorting&&S.hasRendered&&(p.attr({x:d.startXPos}),m="animate")),p&&m==="animate"&&p[Le?"show":"hide"](Le).animate(w),p){let De=this.pointAttribs(d,N||!d.selected?void 0:"select");N?T&&p.css({fill:De.fill}):p[m](De)}p&&p.addClass(d.getClassName(),!0)}else p&&(d.graphic=p.destroy())}}markerAttribs(a,u){let d=this.options,p=d.marker,m=a.marker||{},b=m.symbol||p.symbol,_={},w,S,N=mn(m.radius,p==null?void 0:p.radius);u&&(w=p.states[u],S=m.states&&m.states[u],N=mn(S==null?void 0:S.radius,w==null?void 0:w.radius,N&&N+((w==null?void 0:w.radiusPlus)||0))),a.hasImage=b&&b.indexOf("url")===0,a.hasImage&&(N=0);let T=a.pos();return Xn(N)&&T&&(d.crisp&&(T[0]=OI(T[0],a.hasImage?0:b==="rect"?(p==null?void 0:p.lineWidth)||0:1)),_.x=T[0]-N,_.y=T[1]-N),N&&(_.width=_.height=2*N),_}pointAttribs(a,u){var le;let d=this.options,p=d.marker,m=a==null?void 0:a.options,b=(m==null?void 0:m.marker)||{},_=m==null?void 0:m.color,w=a==null?void 0:a.color,S=(le=a==null?void 0:a.zone)==null?void 0:le.color,N,T,U=this.color,Y,se,de=mn(b.lineWidth,p.lineWidth),ue=a!=null&&a.isNull&&d.nullInteraction?0:1;return U=_||S||w||U,Y=b.fillColor||p.fillColor||U,se=b.lineColor||p.lineColor||U,u=u||"normal",N=p.states[u]||{},de=mn((T=b.states&&b.states[u]||{}).lineWidth,N.lineWidth,de+mn(T.lineWidthPlus,N.lineWidthPlus,0)),Y=T.fillColor||N.fillColor||Y,se=T.lineColor||N.lineColor||se,{stroke:se,"stroke-width":de,fill:Y,opacity:ue=mn(T.opacity,N.opacity,ue)}}destroy(a){var w,S;let u,d,p=this,m=p.chart,b=/AppleWebKit\/533/.test(TI.navigator.userAgent),_=p.data||[];for(pn(p,"destroy",{keepEventsForUpdate:a}),this.removeEvents(a),(p.axisTypes||[]).forEach(function(N){d=p[N],d!=null&&d.series&&(aw(d.series,p),d.isDirty=d.forceRedraw=!0)}),p.legendItem&&p.chart.legend.destroyItem(p),u=_.length;u--;)(S=(w=_[u])==null?void 0:w.destroy)==null||S.call(w);for(let N of p.zones)DI(N,void 0,!0);Q.clearTimeout(p.animationTimeout),yb(p,function(N,T){N instanceof Zr&&!N.survive&&N[b&&T==="group"?"hide":"destroy"]()}),m.hoverSeries===p&&(m.hoverSeries=void 0),aw(m.series,p),m.orderItems("series"),yb(p,function(N,T){a&&T==="hcEvents"||delete p[T]})}applyZones(){let{area:a,chart:u,graph:d,zones:p,points:m,xAxis:b,yAxis:_,zoneAxis:w}=this,{inverted:S,renderer:N}=u,T=this[`${w}Axis`],{isXAxis:U,len:Y=0,minPointOffset:se=0}=T||{},de=((d==null?void 0:d.strokeWidth())||0)/2+1,ue=(le,me=0,ye=0)=>{S&&(ye=Y-ye);let{translated:Le=0,lineClip:De}=le,Ie=ye-Le;
vendor: 9,005 bytes, line 61
61De==null||De.push(["L",me,Math.abs(Ie)<de?ye-de*(Ie<=0?-1:1):Le])};if(p.length&&(d||a)&&T&&Xn(T.min)){let le=T.getExtremes().max+se,me=De=>{De.forEach((Ie,Ge)=>{(Ie[0]==="M"||Ie[0]==="L")&&(De[Ge]=[Ie[0],U?Y-Ie[1]:Ie[1],U?Ie[2]:Y-Ie[2]])})};if(p.forEach(De=>{De.lineClip=[],De.translated=iw(T.toPixels(mn(De.value,le),!0)||0,0,Y)}),d&&!this.showLine&&d.hide(),a&&a.hide(),w==="y"&&m.length<b.len)for(let De of m){let{plotX:Ie,plotY:Ge,zone:Ue}=De,qe=Ue&&p[p.indexOf(Ue)-1];Ue&&ue(Ue,Ie,Ge),qe&&ue(qe,Ie,Ge)}let ye=[],Le=T.toPixels(T.getExtremes().min-se,!0);p.forEach(De=>{var jt,Ct;let Ie=De.lineClip||[],Ge=Math.round(De.translated||0);b.reversed&&Ie.reverse();let{clip:Ue,simpleClip:qe}=De,rt=0,dt=0,xt=b.len,Et=_.len;U?(rt=Ge,xt=Le):(dt=Ge,Et=Le);let Rt=[["M",rt,dt],["L",xt,dt],["L",xt,Et],["L",rt,Et],["Z"]],It=[Rt[0],...Ie,Rt[1],Rt[2],...ye,Rt[3],Rt[4]];ye=Ie.reverse(),Le=Ge,S&&(me(It),a&&me(Rt)),Ue?(Ue.animate({d:It}),qe==null||qe.animate({d:Rt})):(Ue=De.clip=N.path(It),a&&(qe=De.simpleClip=N.path(Rt))),d&&((jt=De.graph)==null||jt.clip(Ue)),a&&((Ct=De.area)==null||Ct.clip(qe))})}else this.visible&&(d&&d.show(),a&&a.show())}plotGroup(a,u,d,p,m){let b=this[a],_=!b,w={visibility:d,zIndex:p||.1};return Hn(this.opacity)&&!this.chart.styledMode&&this.state!=="inactive"&&(w.opacity=this.opacity),b||(this[a]=b=this.chart.renderer.g().add(m)),b.addClass("highcharts-"+u+" highcharts-series-"+this.index+" highcharts-"+this.type+"-series "+(Hn(this.colorIndex)?"highcharts-color-"+this.colorIndex+" ":"")+(this.options.className||"")+(b.hasClass("highcharts-tracker")?" highcharts-tracker":""),!0),b.attr(w)[_?"attr":"animate"](this.getPlotBox(u)),b}getPlotBox(a){let u=this.xAxis,d=this.yAxis,p=this.chart,m=p.inverted&&!p.polar&&u&&this.invertible&&a==="series";p.inverted&&(u=d,d=this.xAxis);let b={scale:1,translateX:u?u.left:p.plotLeft,translateY:d?d.top:p.plotTop,name:a};pn(this,"getPlotBox",b);let{scale:_,translateX:w,translateY:S}=b;return{translateX:w,translateY:S,rotation:90*!!m,rotationOriginX:m?_*(u.len-d.len)/2:0,rotationOriginY:m?_*(u.len+d.len)/2:0,scaleX:m?-_:_,scaleY:_}}removeEvents(a){let{eventsToUnbind:u}=this;a||NI(this),u.length&&(u.forEach(d=>{d()}),u.length=0)}render(){var N,T,U,Y,se;let a=this,{chart:u,options:d,hasRendered:p}=a,m=sw(d.animation),b=a.visible?"inherit":"hidden",_=d.zIndex,w=u.seriesGroup,S=a.finishedAnimating?0:m.duration;pn(this,"render"),a.plotGroup("group","series",b,_,w),a.markerGroup=a.plotGroup("markerGroup","markers",b,_,w),d.clip!==!1&&a.setClip(),S&&((N=a.animate)==null||N.call(a,!0)),a.drawGraph&&(a.drawGraph(),a.applyZones()),a.visible&&a.drawPoints(),(T=a.drawDataLabels)==null||T.call(a),(U=a.redrawPoints)==null||U.call(a),d.enableMouseTracking&&((Y=a.drawTracker)==null||Y.call(a)),S&&((se=a.animate)==null||se.call(a)),p||(S&&m.defer&&(S+=m.defer),a.animationTimeout=cw(()=>{a.afterAnimate()},S||0)),a.isDirty=!1,a.hasRendered=!0,pn(a,"afterRender")}redraw(){let a=this.isDirty||this.isDirtyData;this.translate(),this.render(),a&&delete this.kdTree}reserveSpace(){return this.visible||!this.chart.options.chart.ignoreHiddenSeries}searchPoint(a,u){let{xAxis:d,yAxis:p}=this,m=this.chart.inverted;return this.searchKDTree({clientX:m?d.len-a.chartY+d.pos:a.chartX-d.pos,plotY:m?p.len-a.chartX+p.pos:a.chartY-p.pos},u,a)}buildKDTree(a){this.buildingKdTree=!0;let u=this,d=u.options,p=d.findNearestPointBy.indexOf("y")>-1?2:1;delete u.kdTree,cw(function(){u.kdTree=(function m(b,_,w){let S,N,T=b==null?void 0:b.length;if(T)return S=u.kdAxisArray[_%w],b.sort((U,Y)=>(U[S]||0)-(Y[S]||0)),{point:b[N=Math.floor(T/2)],left:m(b.slice(0,N),_+1,w),right:m(b.slice(N+1),_+1,w)}})(u.getValidPoints(void 0,!u.directTouch,d==null?void 0:d.nullInteraction),p,p),u.buildingKdTree=!1},d.kdNow||(a==null?void 0:a.type)==="touchstart"?0:1)}searchKDTree(a,u,d,p,m){let b=this,[_,w]=this.kdAxisArray,S=u?"distX":"dist",N=(b.options.findNearestPointBy||"").indexOf("y")>-1?2:1,T=!!b.isBubble,U=p||((se,de,ue)=>{let le=se[ue]||0,me=de[ue]||0;return[le===me&&se.index>de.index||le<me?se:de,!1]}),Y=m||((se,de)=>se<de);if(this.kdTree||this.buildingKdTree||this.buildKDTree(d),this.kdTree)return(function se(de,ue,le,me){var rt;let ye=ue.point,Le=b.kdAxisArray[le%me],De=ye,Ie=!1;(function(dt,xt){var Ss;let Et=dt[_],Rt=xt[_],It=Hn(Et)&&Hn(Rt)?Et-Rt:null,jt=dt[w],Ct=xt[w],Wt=Hn(jt)&&Hn(Ct)?jt-Ct:0,hs=T&&((Ss=xt.marker)==null?void 0:Ss.radius)||0;xt.dist=Math.sqrt((It&&It*It||0)+Wt*Wt)-hs,xt.distX=Hn(It)?Math.abs(It)-hs:Number.MAX_VALUE})(de,ye);let Ge=(de[Le]||0)-(ye[Le]||0)+(T&&((rt=ye.marker)==null?void 0:rt.radius)||0),Ue=Ge<0?"left":"right",qe=Ge<0?"right":"left";return ue[Ue]&&([De,Ie]=U(ye,se(de,ue[Ue],le+1,me),S)),ue[qe]&&Y(Math.sqrt(Ge*Ge),De[S],Ie)&&(De=U(De,se(de,ue[qe],le+1,me),S)[0]),De})(a,this.kdTree,N,N)}pointPlacementToXValue(){let{options:a,xAxis:u}=this,d=a.pointPlacement;return d==="between"&&(d=u.reversed?-.5:.5),Xn(d)?d*(a.pointRange||u.pointRange):0}isPointInside(a){let{chart:u,xAxis:d,yAxis:p}=this,{plotX:m=-1,plotY:b=-1}=a;return b>=0&&b<=(p?p.len:u.plotHeight)&&m>=0&&m<=(d?d.len:u.plotWidth)}drawTracker(){var U;let a=this,u=a.options,d=u.trackByArea,p=[].concat((d?a.areaPath:a.graphPath)||[]),m=a.chart,b=m.pointer,_=m.renderer,w=((U=m.options.tooltip)==null?void 0:U.snap)||0,S=()=>{u.enableMouseTracking&&m.hoverSeries!==a&&a.onMouseOver()},N="rgba(192,192,192,"+(CI?1e-4:.002)+")",T=a.tracker;T?T.attr({d:p}):a.graph&&(a.tracker=T=_.path(p).attr({visibility:a.visible?"inherit":"hidden",zIndex:2}).addClass(d?"highcharts-tracker-area":"highcharts-tracker-line").add(a.group),m.styledMode||T.attr({"stroke-linecap":"round","stroke-linejoin":"round",stroke:N,fill:d?N:"none","stroke-width":a.graph.strokeWidth()+(d?0:2*w)}),[a.tracker,a.markerGroup,a.dataLabelsGroup].forEach(Y=>{Y&&(Y.addClass("highcharts-tracker").on("mouseover",S).on("mouseout",se=>{b==null||b.onTrackerMouseOut(se)}),u.cursor&&!m.styledMode&&Y.css({cursor:u.cursor}),Y.on("touchstart",S))})),pn(this,"afterDrawTracker")}addPoint(a,u,d,p,m){let b,_,w=this.options,{chart:S,data:N,dataTable:T,xAxis:U}=this,Y=(U==null?void 0:U.hasNames)&&U.names,se=w.data,de=this.getColumn("x");u=mn(u,!0);let ue={series:this};this.pointClass.prototype.applyOptions.apply(ue,[a]);let le=ue.x;if(_=de.length,this.requireSorting&&le<de[_-1])for(b=!0;_&&de[_-1]>le;)_--;T.setRow(ue,_,!0,{addColumns:!1}),Y&&ue.name&&(Y[le]=ue.name),se==null||se.splice(_,0,a),(b||this.processedData)&&(this.data.splice(_,0,null),this.processData()),w.legendType==="point"&&this.generatePoints(),d&&(N[0]&&N[0].remove?N[0].remove(!1):([N,se].filter(Hn).forEach(me=>{me.shift()}),T.deleteRows(0))),m!==!1&&pn(this,"addPoint",{point:ue}),this.isDirty=!0,this.isDirtyData=!0,u&&S.redraw(p)}removePoint(a,u,d){let p=this,{chart:m,data:b,points:_,dataTable:w}=p,S=b[a],N=function(){[(_==null?void 0:_.length)===b.length?_:void 0,b,p.options.data].filter(Hn).forEach(T=>{T.splice(a,1)}),w.deleteRows(a),S==null||S.destroy(),p.isDirty=!0,p.isDirtyData=!0,u&&m.redraw()};SI(d,m),u=mn(u,!0),S?S.firePointEvent("remove",null,N):N()}remove(a,u,d,p){let m=this,b=m.chart;function _(){m.destroy(p),b.isDirtyLegend=b.isDirtyBox=!0,b.linkSeries(p),mn(a,!0)&&b.redraw(u)}d!==!1?pn(m,"remove",null,_):_()}update(a,u){var le,me;pn(this,"update",{options:a=PI(a,this.userOptions)});let d=this,p=d.chart,m=d.userOptions,b=d.initialType||d.type,_=p.options.plotOptions,w=dc[b].prototype,S=d.finishedAnimating&&{animation:!1},N={},T,U,Y=ta.keepProps.slice(),se=a.type||m.type||p.options.chart.type,de=!(this.hasDerivedData||se&&se!==this.type||a.keys!==void 0||a.pointStart!==void 0||a.pointInterval!==void 0||a.relativeXValue!==void 0||a.joinBy||a.mapData||["dataGrouping","pointStart","pointInterval","pointIntervalUnit","keys"].some(ye=>d.hasOptionChanged(ye)));se=se||b,de?(Y.push.apply(Y,ta.keepPropsForPoints),a.visible!==!1&&Y.push("area","graph"),d.parallelArrays.forEach(function(ye){Y.push(ye+"Data")}),a.data&&(a.dataSorting&&hc(d.options.dataSorting,a.dataSorting),this.setData(a.data,!1))):this.dataTable.modified=this.dataTable,a=Hd(m,{index:m.index===void 0?d.index:m.index,pointStart:((le=_==null?void 0:_.series)==null?void 0:le.pointStart)??m.pointStart??d.getColumn("x")[0]},!de&&{data:d.options.data},a,S),de&&a.data&&(a.data=d.options.data),(Y=["group","markerGroup","dataLabelsGroup","transformGroup"].concat(Y)).forEach(function(ye){Y[ye]=d[ye],delete d[ye]});let ue=!1;if(dc[se]){if(ue=se!==d.type,d.remove(!1,!1,!1,!0),ue)if(p.propFromSeries(),Object.setPrototypeOf)Object.setPrototypeOf(d,dc[se].prototype);else{let ye=Object.hasOwnProperty.call(d,"hcEvents")&&d.hcEvents;for(U in w)d[U]=void 0;hc(d,dc[se].prototype),ye?d.hcEvents=ye:delete d.hcEvents}}else _p(17,!0,p,{missingModuleFor:se});if(Y.forEach(function(ye){d[ye]=Y[ye]}),d.init(p,a),de&&this.points)for(let ye of((T=d.options).visible===!1?(N.graphic=1,N.dataLabel=1):(this.hasMarkerChanged(T,m)&&(N.graphic=1),(me=d.hasDataLabels)!=null&&me.call(d)||(N.dataLabel=1)),this.points))ye!=null&&ye.series&&(ye.resolve
61Color(),Object.keys(N).length&&ye.destroyElements(N),T.showInLegend===!1&&ye.legendItem&&p.legend.destroyItem(ye));d.initialType=b,p.linkSeries(),p.setSortedData(),ue&&d.linkedSeries.length&&(d.isDirtyData=!0),pn(this,"afterUpdate"),mn(u,!0)&&p.redraw(!!de&&void 0)}setName(a){this.name=this.options.name=this.userOptions.name=a,this.chart.isDirtyLegend=!0}hasOptionChanged(a){var _,w;let u=this.chart,d=this.options[a],p=u.options.plotOptions,m=this.userOptions[a],b=mn((_=p==null?void 0:p[this.type])==null?void 0:_[a],(w=p==null?void 0:p.series)==null?void 0:w[a]);return m&&!Hn(b)?d!==m:d!==mn(b,d)}onMouseOver(){let a=this.chart,u=a.hoverSeries,d=a.pointer;d==null||d.setHoverChartIndex(),u&&u!==this&&u.onMouseOut(),this.options.events.mouseOver&&pn(this,"mouseOver"),this.setState("hover"),a.hoverSeries=this}onMouseOut(){let a=this.options,u=this.chart,d=u.tooltip,p=u.hoverPoint;u.hoverSeries=null,p&&p.onMouseOut(),this&&a.events.mouseOut&&pn(this,"mouseOut"),d&&!this.stickyTracking&&(!d.shared||this.noSharedTooltip)&&d.hide(),u.series.forEach(function(m){m.setState("",!0)})}setState(a,u){let d=this,p=d.options,m=d.graph,b=p.inactiveOtherPoints,_=p.states,w=mn(_[a||"normal"]&&_[a||"normal"].animation,d.chart.options.chart.animation),S=p.lineWidth,N=p.opacity;if(a=a||"",d.state!==a&&([d.group,d.markerGroup,d.dataLabelsGroup].forEach(function(T){T&&(d.state&&T.removeClass("highcharts-series-"+d.state),a&&T.addClass("highcharts-series-"+a))}),d.state=a,!d.chart.styledMode)){if(_[a]&&_[a].enabled===!1)return;if(a&&(S=_[a].lineWidth||S+(_[a].lineWidthPlus||0),N=mn(_[a].opacity,N)),m&&!m.dashstyle&&Xn(S))for(let T of[m,...this.zones.map(U=>U.graph)])T==null||T.animate({"stroke-width":S},w);b||[d.group,d.markerGroup,d.dataLabelsGroup,d.labelBySeries].forEach(function(T){T&&T.animate({opacity:N},w)})}u&&b&&d.points&&d.setAllPointsToState(a||void 0)}setAllPointsToState(a){this.points.forEach(function(u){u.setState&&u.setState(a)})}setVisible(a,u){var w;let d=this,p=d.chart,m=p.options.chart.ignoreHiddenSeries,b=d.visible;d.visible=a=d.options.visible=d.userOptions.visible=a===void 0?!b:a;let _=a?"show":"hide";["group","dataLabelsGroup","markerGroup","tracker","tt"].forEach(S=>{var N;(N=d[S])==null||N[_]()}),(p.hoverSeries===d||((w=p.hoverPoint)==null?void 0:w.series)===d)&&d.onMouseOut(),d.legendItem&&p.legend.colorizeItem(d,a),d.isDirty=!0,d.options.stacking&&p.series.forEach(S=>{S.options.stacking&&S.visible&&(S.isDirty=!0)}),d.linkedSeries.forEach(S=>{S.setVisible(a,!1)}),m&&(p.isDirtyBox=!0),pn(d,_),u!==!1&&p.redraw()}show(){this.setVisible(!0)}hide(){this.setVisible(!1)}select(a){this.selected=a=this.options.selected=a===void 0?!this.selected:a,this.checkbox&&(this.checkbox.checked=a),pn(this,a?"select":"unselect")}shouldShowTooltip(a,u,d={}){return d.series=this,d.visiblePlotOnly=!0,this.chart.isInsidePlot(a,u,d)}drawLegendSymbol(a,u){var d;(d=ew[this.options.legendSymbol||"rectangle"])==null||d.call(this,a,u)}}ta.defaultOptions={lineWidth:2,allowPointSelect:!1,crisp:!0,showCheckbox:!1,animation:{duration:1e3},enableMouseTracking:!0,events:{},marker:{enabledThreshold:2,lineColor:"#ffffff",lineWidth:0,radius:4,states:{normal:{animation:!0},hover:{animation:{duration:150},enabled:!0,radiusPlus:2,lineWidthPlus:1},select:{fillColor:"#cccccc",lineColor:"#000000",lineWidth:2}}},point:{events:{}},dataLabels:{animation:{},align:"center",borderWidth:0,defer:!0,formatter:function(){let{numberFormatter:k}=this.series.chart;return typeof this.y!="number"?"":k(this.y,-1)},padding:5,style:{fontSize:"0.7em",fontWeight:"bold",color:"contrast",textOutline:"1px contrast"},verticalAlign:"bottom",x:0,y:0},cropThreshold:300,opacity:1,pointRange:0,softThreshold:!0,states:{normal:{animation:!0},hover:{animation:{duration:150},lineWidthPlus:1,marker:{},halo:{size:10,opacity:.25}},select:{animation:{duration:0}},inactive:{animation:{duration:150},opacity:.2}},stickyTracking:!0,turboThreshold:1e3,findNearestPointBy:"x"},ta.types=yn.seriesTypes,ta.registerType=yn.registerSeriesType,ta.keepProps=["colorIndex","eventOptions","navigatorSeries","symbolIndex","baseSeries"],ta.keepPropsForPoints=["data","isDirtyData","isDirtyCanvas","points","dataTable","processedData","xIncrement","cropped","_hasPointMarkers","hasDataLabels","nodes","layout","level","mapMap","mapData","minY","maxY","minX","maxX","transformGroups"],hc(ta.prototype,{axisTypes:["xAxis","yAxis"],coll:"series",colorCounter:0,directTouch:!1,invertible:!0,isCartesian:!0,kdAxisArray:["clientX","plotY"],parallelArrays:["x","y"],pointClass:Ho,requireSorting:!0,sorted:!0}
vendor: 1,316 bytes, line 61
61),yn.series=ta;let Zi=ta,{animObject:LI,setAnimation:RI}=mt,{registerEventOptions:dw}=rp,{composed:FI,marginNames:hw}=B,{distribute:VI}=Ju,{format:BI}=ti,{addEvent:xp,createElement:UI,css:jI,defined:_b,discardElement:HI,find:WI,fireEvent:Ja,isNumber:fw,merge:Wl,pick:sa,pushUnique:zI,relativeLength:YI,stableSort:qI,syncTimeout:GI}=Q;class xb{constructor(a,u){this.allItems=[],this.initialItemY=0,this.itemHeight=0,this.itemMarginBottom=0,this.itemMarginTop=0,this.itemX=0,this.itemY=0,this.lastItemY=0,this.lastLineHeight=0,this.legendHeight=0,this.legendWidth=0,this.maxItemWidth=0,this.maxLegendWidth=0,this.offsetWidth=0,this.padding=0,this.pages=[],this.symbolHeight=0,this.symbolWidth=0,this.titleHeight=0,this.totalItemWidth=0,this.widthOption=0,this.chart=a,this.setOptions(u),u.enabled&&(this.render(),dw(this,u),xp(this.chart,"endResize",function(){this.legend.positionCheckboxes()})),xp(this.chart,"render",()=>{this.options.enabled&&this.proximate&&(this.proximatePositions(),this.positionItems())})}setOptions(a){let u=sa(a.padding,8);this.options=a,this.chart.styledMode||(this.itemStyle=a.itemStyle,this.itemHiddenStyle=Wl(this.itemStyle,a.itemHiddenStyle)),this.itemMarginTop=a.itemMarginTop,this.itemMarginBottom=a.itemMarginBottom,this.padding=u,this.initialItemY=u-5,this.symbolWidth=sa(a.symbolWi
vendor: 20,961 bytes, line 61
61dth,16),this.pages=[],this.proximate=a.layout==="proximate"&&!this.chart.inverted,this.baseline=void 0}update(a,u){let d=this.chart;this.setOptions(Wl(!0,this.options,a)),"events"in this.options&&dw(this,this.options),this.destroy(),d.isDirtyLegend=d.isDirtyBox=!0,sa(u,!0)&&d.redraw(),Ja(this,"afterUpdate",{redraw:u})}colorizeItem(a,u){var S;let d=a.color,{area:p,group:m,label:b,line:_,symbol:w}=a.legendItem||{};if((a instanceof Zi||a instanceof Ho)&&(a.color=((S=a.options)==null?void 0:S.legendSymbolColor)||d),m==null||m[u?"removeClass":"addClass"]("highcharts-legend-item-hidden"),!this.chart.styledMode){let{itemHiddenStyle:N={}}=this,T=N.color,{fillColor:U,fillOpacity:Y,lineColor:se,marker:de}=a.options,ue=le=>(!u&&(le.fill&&(le.fill=T),le.stroke&&(le.stroke=T)),le);b==null||b.css(Wl(u?this.itemStyle:N)),_==null||_.attr(ue({stroke:se||a.color})),w&&w.attr(ue(de&&w.isMarker?a.pointAttribs():{fill:a.color})),p==null||p.attr(ue({fill:U||a.color,"fill-opacity":U?1:Y??.75}))}a.color=d,Ja(this,"afterColorizeItem",{item:a,visible:u})}positionItems(){this.allItems.forEach(this.positionItem,this),this.chart.isResizing||this.positionCheckboxes()}positionItem(a){let{group:u,x:d=0,y:p=0}=a.legendItem||{},m=this.options,b=m.symbolPadding,_=!m.rtl,w=a.checkbox;if(u!=null&&u.element){let S={translateX:_?d:this.legendWidth-d-2*b-4,translateY:p};u[_b(u.translateY)?"animate":"attr"](S,void 0,()=>{Ja(this,"afterPositionItem",{item:a})})}w&&(w.x=d,w.y=p)}destroyItem(a){let u=a.legendItem||{};for(let d of["group","label","line","symbol"])u[d]&&(u[d]=u[d].destroy());a.checkbox=HI(a.checkbox),a.legendItem=void 0}destroy(){for(let a of this.getAllItems())this.destroyItem(a);for(let a of["clipRect","up","down","pager","nav","box","title","group"])this[a]&&(this[a]=this[a].destroy());this.display=null}positionCheckboxes(){var m;let a,u=(m=this.group)==null?void 0:m.alignAttr,d=this.clipHeight||this.legendHeight,p=this.titleHeight;u&&(a=u.translateY,this.allItems.forEach(function(b){let _,w=b.checkbox;w&&(_=a+p+w.y+(this.scrollOffset||0)+3,jI(w,{left:u.translateX+b.checkboxOffset+w.x-20+"px",top:_+"px",display:this.proximate||_>a-6&&_<a+d-6?"":"none"}))},this))}renderTitle(){let a=this.options,u=this.padding,d=a.title,p,m=0;d.text&&(this.title||(this.title=this.chart.renderer.label(d.text,u-3,u-4,void 0,void 0,void 0,a.useHTML,void 0,"legend-title").attr({zIndex:1}),this.chart.styledMode||this.title.css(d.style),this.title.add(this.group)),d.width||this.title.css({width:this.maxLegendWidth+"px"}),m=(p=this.title.getBBox()).height,this.offsetWidth=p.width,this.contentGroup.attr({translateY:m})),this.titleHeight=m}setText(a){let u=this.options;a.legendItem.label.attr({text:u.labelFormat?BI(u.labelFormat,a,this.chart):u.labelFormatter.call(a)})}renderItem(a){var Ge;let u=a.legendItem=a.legendItem||{},d=this.chart,p=d.renderer,m=this.options,b=m.layout==="horizontal",_=this.symbolWidth,w=m.symbolPadding||0,S=this.itemStyle,N=this.itemHiddenStyle,T=b?sa(m.itemDistance,20):0,U=!m.rtl,Y=!a.series,se=!Y&&a.series.drawLegendSymbol?a.series:a,de=se.options,ue=!!this.createCheckboxForItem&&de&&de.showCheckbox,le=m.useHTML,me=a.options.className,ye=u.label,Le=_+w+T+20*!!ue;!ye&&(u.group=p.g("legend-item").addClass("highcharts-"+se.type+"-series highcharts-color-"+a.colorIndex+(me?" "+me:"")+(Y?" highcharts-series-"+a.index:"")).attr({zIndex:1}).add(this.scrollGroup),u.label=ye=p.text("",U?_+w:-w,this.baseline||0,le),d.styledMode||ye.css(Wl(a.visible?S:N)),ye.attr({align:U?"left":"right",zIndex:2}).add(u.group),!this.baseline&&(this.fontMetrics=p.fontMetrics(ye),this.baseline=this.fontMetrics.f+3+this.itemMarginTop,ye.attr("y",this.baseline),this.symbolHeight=sa(m.symbolHeight,this.fontMetrics.f),m.squareSymbol&&(this.symbolWidth=sa(m.symbolWidth,Math.max(this.symbolHeight,16)),Le=this.symbolWidth+w+T+20*!!ue,U&&ye.attr("x",this.symbolWidth+w))),se.drawLegendSymbol(this,a),this.setItemEvents&&this.setItemEvents(a,ye,le)),ue&&!a.checkbox&&this.createCheckboxForItem&&this.createCheckboxForItem(a),this.colorizeItem(a,a.visible),(d.styledMode||!S.width)&&ye.css({width:(m.itemWidth||this.widthOption||d.spacingBox.width)-Le+"px"}),this.setText(a);let De=ye.getBBox(),Ie=((Ge=this.fontMetrics)==null?void 0:Ge.h)||0;a.itemWidth=a.checkboxOffset=m.itemWidth||u.labelWidth||De.width+Le,this.maxItemWidth=Math.max(this.maxItemWidth,a.itemWidth),this.totalItemWidth+=a.itemWidth,this.itemHeight=a.itemHeight=Math.round(u.labelHeight||(De.height>1.5*Ie?De.height:Ie))}layoutItem(a){let u=this.options,d=this.padding,p=u.layout==="horizontal",m=a.itemHeight,b=this.itemMarginBottom,_=this.itemMarginTop,w=p?sa(u.itemDistance,20):0,S=this.maxLegendWidth,N=u.alignColumns&&this.totalItemWidth>S?this.maxItemWidth:a.itemWidth,T=a.legendItem||{};p&&this.itemX-d+N>S&&(this.itemX=d,this.lastLineHeight&&(this.itemY+=_+this.lastLineHeight+b),this.lastLineHeight=0),this.lastItemY=_+this.itemY+b,this.lastLineHeight=Math.max(m,this.lastLineHeight),T.x=this.itemX,T.y=this.itemY,p?this.itemX+=N:(this.itemY+=_+m+b,this.lastLineHeight=m),this.offsetWidth=this.widthOption||Math.max((p?this.itemX-d-(a.checkbox?0:w):N)+d,this.offsetWidth)}getAllItems(){let a=[];return this.chart.series.forEach(function(u){var p;let d=u==null?void 0:u.options;u&&sa(d.showInLegend,!_b(d.linkedTo)&&void 0,!0)&&(a=a.concat(((p=u.legendItem)==null?void 0:p.labels)||(d.legendType==="point"?u.data:u)))}),Ja(this,"afterGetAllItems",{allItems:a}),a}getAlignment(){let a=this.options;return this.proximate?a.align.charAt(0)+"tv":a.floating?"":a.align.charAt(0)+a.verticalAlign.charAt(0)+a.layout.charAt(0)}adjustMargins(a,u){let d=this.chart,p=this.options,m=this.getAlignment();m&&[/(lth|ct|rth)/,/(rtv|rm|rbv)/,/(rbh|cb|lbh)/,/(lbv|lm|ltv)/].forEach((b,_)=>{b.test(m)&&!_b(a[_])&&(d[hw[_]]=Math.max(d[hw[_]],d.legend[(_+1)%2?"legendHeight":"legendWidth"]+[1,-1,-1,1][_]*p[_%2?"x":"y"]+(p.margin??12)+u[_]+(d.titleOffset[_]||0)))})}proximatePositions(){let a,u=this.chart,d=[],p=this.options.align==="left";for(let m of(this.allItems.forEach(function(b){let _,w,S=p,N,T;b.yAxis&&(b.xAxis.options.reversed&&(S=!S),b.points&&(_=WI(S?b.points:b.points.slice(0).reverse(),function(U){return fw(U.plotY)})),w=this.itemMarginTop+b.legendItem.label.getBBox().height+this.itemMarginBottom,T=b.yAxis.top-u.plotTop,N=b.visible?(_?_.plotY:b.yAxis.height)+(T-.3*w):T+b.yAxis.height,d.push({target:N,size:w,item:b}))},this),VI(d,u.plotHeight)))a=m.item.legendItem||{},fw(m.pos)&&(a.y=u.plotTop-u.spacing[0]+m.pos)}render(){let a=this.chart,u=a.renderer,d=this.options,p=this.padding,m=this.getAllItems(),b,_,w,S=this.group,N,T=this.box;this.itemX=p,this.itemY=this.initialItemY,this.offsetWidth=0,this.lastItemY=0,this.widthOption=YI(d.width,a.spacingBox.width-p),N=a.spacingBox.width-2*p-d.x,["rm","lm"].indexOf(this.getAlignment().substring(0,2))>-1&&(N/=2),this.maxLegendWidth=this.widthOption||N,S||(this.group=S=u.g("legend").addClass(d.className||"").attr({zIndex:7}).add(),this.contentGroup=u.g().attr({zIndex:1}).add(S),this.scrollGroup=u.g().add(this.contentGroup)),this.renderTitle(),qI(m,(U,Y)=>{var se,de;return(((se=U.options)==null?void 0:se.legendIndex)||0)-(((de=Y.options)==null?void 0:de.legendIndex)||0)}),d.reversed&&m.reverse(),this.allItems=m,this.display=b=!!m.length,this.lastLineHeight=0,this.maxItemWidth=0,this.totalItemWidth=0,this.itemHeight=0,m.forEach(this.renderItem,this),m.forEach(this.layoutItem,this),_=(this.widthOption||this.offsetWidth)+p,w=this.lastItemY+this.lastLineHeight+this.titleHeight,w=this.handleOverflow(w)+p,T||(this.box=T=u.rect().addClass("highcharts-legend-box").attr({r:d.borderRadius}).add(S)),a.styledMode||T.attr({stroke:d.borderColor,"stroke-width":d.borderWidth||0,fill:d.backgroundColor||"none"}).shadow(d.shadow),_>0&&w>0&&T[T.placed?"animate":"attr"](T.crisp.call({},{x:0,y:0,width:_,height:w},T.strokeWidth())),S[b?"show":"hide"](),a.styledMode&&S.getStyle("display")==="none"&&(_=w=0),this.legendWidth=_,this.legendHeight=w,b&&this.align(),this.proximate||this.positionItems(),Ja(this,"afterRender")}align(a=this.chart.spacingBox){let u=this.chart,d=this.options,p=a.y;/(lth|ct|rth)/.test(this.getAlignment())&&u.titleOffset[0]>0?p+=u.titleOffset[0]:/(lbh|cb|rbh)/.test(this.getAlignment())&&u.titleOffset[2]>0&&(p-=u.titleOffset[2]),p!==a.y&&(a=Wl(a,{y:p})),u.hasRendered||(this.group.placed=!1),this.group.align(Wl(d,{width:this.legendWidth,height:this.legendHeight,verticalAlign:this.proximate?"top":d.verticalAlign}),!0,a)}handleOverflow(a){let u=this,d=this.chart,p=d.renderer,m=this.options,b=m.y,_=m.verticalAlign==="top",w=this.padding,S=m.maxHeight,N=m.navigation,T=sa(N.animation,!0),U=N.arrowSize||12,Y=this.pages,se=this.allItems,de=function(Ue){typeof Ue=="number"?Ge.attr({height:Ue}):Ge&&(u.clipRect=Ge.destroy(),u.contentGroup.clip()),u.contentGroup.div&&(u.contentGroup.div.style.clip=Ue?"rect("+w+"px,9999px,"+(w+Ue)+"px,0)":"auto")},ue=function(Ue){return u[Ue]=p.circle(0,0,1.3*U).translate(U/2,U/2).add(Ie),d.styledMode||u[Ue].attr("fill","rgba(0,0,0,0.0001)"),u[Ue]},le,me,ye,Le,De=d.spacingBox.height+(_?-b:b)-w,Ie=this.nav,Ge=this.clipRect;return m.layout!=="horizontal"||m.verticalAlign==="middle"||m.floating||(De/=2),S&&(De=Math.min(De,S)),Y.length=0,a&&De>0&&a>De&&N.enabled!==!1?(this.clipHeight=le=Math.max(De-20-this.titleHeight-w,0),this.currentPage=sa(this.currentPage,1),this.fullHeight=a,se.forEach((Ue,qe)=>{let rt=(ye=Ue.legendItem||{}).y||0,dt=Math.round(ye.label.getBBox().height),xt=Y.length;(!xt||rt-Y[xt-1]>le&&(me||rt)!==Y[xt-1])&&(Y.push(me||rt),xt++),ye.pageIx=xt-1,me&&Le&&(Le.pageIx=xt-1),qe===se.length-1&&rt+dt-Y[xt-1]>le&&rt>Y[xt-1]&&(Y.push(rt),ye.pageIx=xt),rt!==me&&(me=rt),Le=ye}),Ge||(Ge=u.clipRect=p.clipRect(0,w-2,9999,0),u.contentGroup.clip(Ge)),de(le),Ie||(this.nav=Ie=p.g().attr({zIndex:1}).add(this.group),this.up=p.symbol("triangle",0,0,U,U).add(Ie),ue("upTracker").on("click",function(){u.scroll(-1,T)}),this.pager=p.text("",15,10).addClass("highcharts-legend-navigation"),!d.styledMode&&N.style&&this.pager.css(N.style),this.pager.add(Ie),this.down=p.symbol("triangle-down",0,0,U,U).add(Ie),ue("downTracker").on("click",function(){u.scroll(1,T)})),u.scroll(0),a=De):Ie&&(de(),this.nav=Ie.destroy(),this.scrollGroup.attr({translateY:1}),this.clipHeight=0),a}scroll(a,u){let d=this.chart,p=this.pages,m=p.length,b=this.clipHeight,_=this.options.navigation,w=this.pager,S=this.padding,N=this.currentPage+a;N>m&&(N=m),N>0&&(u!==void 0&&RI(u,d),this.nav.attr({translateX:S,translateY:b+this.padding+7+this.titleHeight,visibility:"inherit"}),[this.up,this.upTracker].forEach(function(T){T.attr({class:N===1?"highcharts-legend-nav-inactive":"highcharts-legend-nav-active"})}),w.attr({text:N+"/"+m}),[this.down,this.downTracker].forEach(function(T){T.attr({x:18+this.pager.getBBox().width,class:N===m?"highcharts-legend-nav-inactive":"highcharts-legend-nav-active"})},this),d.styledMode||(this.up.attr({fill:N===1?_.inactiveColor:_.activeColor}),this.upTracker.css({cursor:N===1?"default":"pointer"}),this.down.attr({fill:N===m?_.inactiveColor:_.activeColor}),this.downTracker.css({cursor:N===m?"default":"pointer"})),this.scrollOffset=-p[N-1]+this.initialItemY,this.scrollGroup.animate({translateY:this.scrollOffset}),this.currentPage=N,this.positionCheckboxes(),GI(()=>{Ja(this,"afterScroll",{currentPage:N})},LI(sa(u,d.renderer.globalAnimation,!0)).duration))}setItemEvents(a,u,d){let p=this,m=a.legendItem||{},b=p.chart.renderer.boxWrapper,_=a instanceof Ho,w=a instanceof Zi,S="highcharts-legend-"+(_?"point":"series")+"-active",N=p.chart.styledMode,T=d?[u,m.symbol]:[m.group],U=Y=>{p.allItems.forEach(se=>{a!==se&&[se].concat(se.linkedSeries||[]).forEach(de=>{de.setState(Y,!_)})})};for(let Y of T)Y&&Y.on("mouseover",function(){a.visible&&U("inactive"),a.setState("hover"),a.visible&&b.addClass(S),N||u.css(p.options.itemHoverStyle)}).on("mouseout",function(){p.chart.styledMode||u.css(Wl(a.visible?p.itemStyle:p.itemHiddenStyle)),U(""),b.removeClass(S),a.setState()}).on("click",function(se){let de=function(){a.setVisible&&a.setVisible(),U(a.visible?"inactive":"")};b.removeClass(S),Ja(p,"itemClick",{browserEvent:se,legendItem:a},de),_?a.firePointEvent("legendItemClick",{browserEvent:se}):w&&Ja(a,"legendItemClick",{browserEvent:se})})}createCheckboxForItem(a){a.checkbox=UI("input",{type:"checkbox",className:"highcharts-legend-checkbox",checked:a.selected,defaultChecked:a.selected},this.options.itemCheckboxStyle,this.chart.container),xp(a.checkbox,"click",function(u){let d=u.target;Ja(a.series||a,"checkboxClick",{checked:d.checked,item:a},function(){a.select()})})}}(function(k){k.compose=function(a){zI(FI,"Core.Legend")&&xp(a,"beforeMargins",function(){this.legend=new k(this,this.options.legend)})}})(xb||(xb={}));let pw=xb,{animate:wb,animObject:XI,setAnimation:Eb}=mt,{defaultOptions:Sb}=He,{numberFormat:KI}=ti,{registerEventOptions:mw}=rp,{charts:zl,doc:Wd,marginNames:gw,svg:JI,win:vw}=B,{seriesTypes:kb}=yn,{addEvent:Cb,attr:bw,createElement:Tb,css:na,defined:zo,diffObjects:yw,discardElement:QI,erase:ZI,error:Ab,extend:Yo,find:Ob,fireEvent:Os,getAlignFactor:eM,getStyle:Db,isArray:tM,isNumber:fc,isObject:sM,isString:wp,merge:Sa,objectEach:Pb,pick:Fi,pInt:nM,relativeLength:_w,removeEvent:xw,splat:Ep,syncTimeout:iM,uniqueKey:rM}=Q;class qo{static chart(a,u,d){return new qo(a,u,d)}constructor(a,u,d){this.sharedClips={};let p=[...arguments];(wp(a)||a.nodeName)&&(this.renderTo=p.shift()),this.init(p[0],p[1])}setZoomOptions(){let a=this.options.chart,u=a.zooming;this.zooming={...u,type:Fi(a.zoomType,u.type),key:Fi(a.zoomKey,u.key),pinchType:Fi(a.pinchType,u.pinchType),singleTouch:Fi(a.zoomBySingleTouch,u.singleTouch,!1),resetButton:Sa(u.resetButton,a.resetZoomButton)}}init(a,u){Os(this,"init",{args:arguments},function(){var b;let d=Sa(Sb,a),p=d.chart,m=this.renderTo||p.renderTo;this.userOptions=Yo({},a),(this.renderTo=wp(m)?Wd.getElementById(m):m)||Ab(13,!0,this),this.margin=[],this.spacing=[],this.labelCollectors=[],this.callback=u,this.isResizing=0,this.options=d,this.axes=[],this.series=[],this.locale=d.lang.locale??((b=this.renderTo.closest("[lang]"))==null?void 0:b.lang),this.time=new Oe(Yo(d.time||{},{locale:this.locale}),d.lang),d.time=this.time.options,this.numberFormatter=(p.numberFormatter||KI).bind(this),this.styledMode=p.styledMode,this.hasCartesianSeries=p.showAxes,this.index=zl.length,zl.push(this),B.chartCount++,mw(this,p),this.xAxis=[],this.yAxis=[],this.pointCount=this.colorCounter=this.symbolCounter=0,this.setZoomOptions(),Os(this,"afterInit"),this.firstRender()})}initSeries(a){let u=this.options.chart,d=a.type||u.type,p=kb[d];p||Ab(17,!0,this,{missingModuleFor:d});let m=new p;return typeof m.init=="function"&&m.init(this,a),m}setSortedData(){this.getSeriesOrderByLinks().forEach(function(a){a.points||a.data||!a.enabledDataSorting||a.setData(a.options.data,!1)})}getSeriesOrderByLinks(){return this.series.concat().sort(function(a,u){return a.linkedSeries.length||u.linkedSeries.length?u.linkedSeries.length-a.linkedSeries.length:0})}orderItems(a,u=0){let d=this[a],p=this.options[a]=Ep(this.options[a]).slice(),m=this.userOptions[a]=this.userOptions[a]?Ep(this.userOptions[a]).slice():[];if(this.hasRendered&&(p.splice(u),m.splice(u)),d)for(let b=u,_=d.length;b<_;++b){let w=d[b];w&&(w.index=b,w instanceof Zi&&(w.name=w.getName()),w.options.isInternal||(p[b]=w.options,m[b]=w.userOptions))}}getClipBox(a,u){var N,T;let d=this.inverted,{xAxis:p,yAxis:m}=a||{},{x:b,y:_,width:w,height:S}=Sa(this.clipBox);return a&&(p&&p.len!==this.plotSizeX&&(w=p.len),m&&m.len!==this.plotSizeY&&(S=m.len),d&&!a.invertible&&([w,S]=[S,w])),u&&(b+=((N=d?m:p)==null?void 0:N.pos)??this.plotLeft,_+=((T=d?p:m)==null?void 0:T.pos)??this.plotTop),{x:b,y:_,width:w,height:S}}isInsidePlot(a,u,d={}){var ue;let{inverted:p,plotBox:m,plotLeft:b,plotTop:_,scrollablePlotBox:w}=this,{scrollLeft:S=0,scrollTop:N=0}=d.visiblePlotOnly&&((ue=this.scrollablePlotArea)==null?void 0:ue.scrollingContainer)||{},T=d.series,U=d.visiblePlotOnly&&w||m,Y=d.inverted?u:a,se=d.inverted?a:u,de={x:Y,y:se,isInsidePlot:!0,options:d};if(!d.ignoreX){let le=T&&(p&&!this.polar?T.yAxis:T.xAxis)||{pos:b,len:1/0},me=d.paneCoordinates?le.pos+Y:b+Y;me>=Math.max(S+b,le.pos)&&me<=Math.min(S+b+U.width,le.pos+le.len)||(de.isInsidePlot=!1)}if(!d.ignoreY&&de.isInsidePlot){let le=!p&&d.axis&&!d.axis.isXAxis&&d.axis||T&&(p?T.xAxis:T.yAxis)||{pos:_,len:1/0},me=d.paneCoordinates?le.pos+se:_+se;me>=Math.max(N+_,le.pos)&&me<=Math.min(N+_+U.height,le.pos+le.len)||(de.isInsidePlot=!1)}return Os(this,"afterIsInsidePlot",de),de.isInsidePlot}redraw(a){Os(this,"beforeRedraw");let u=this.hasCartesianSeries?this.axes:this.colorAxis||[],d=this.series,p=this.pointer,m=this.legend,b=this.userOptions.legend,_=this.renderer,w=_.isHidden(),S=[],N,T,U,Y=this.isDirtyBox,se=this.isDirtyLegend,de;for(_.rootFontSize=_.boxWrapper.getStyle("font-size"),this.setResponsive&&this.setResponsive(!1),Eb(!!this.hasRendered&&a,this),w&&this.temporaryDisplay(),this.layOutTitles(!1),U=d.length;U--;)if(((de=d[U]).options.stacking||de.options.centerInCategory)&&(T=!0,de.isDirty)){N=!0;break}if(N)for(U=d.length;U--;)(de=d[U]).options.stacking&&(de.isDirty=!0);d.forEach(function(ue){ue.isDirty&&(ue.options.legendType==="point"?(typeof ue.updateTotals=="function"&&ue.updateTotals(),se=!0):b&&(b.labelFormatter||b.labelFormat)&&(se=!0)),ue.isDirtyData&&Os(ue,"updatedData")}),se&&m&&m.options.enabled&&(m.render(),this.isDirtyLegend=!1),T&&this.getStacks(),u.forEach(function(ue){ue.updateNames(),ue.setScale()}),this.getMargins(),u.forEach(function(ue){ue.isDirty&&(Y=!0)}),u.forEach(function(ue){let le=ue.min+","+ue.max;ue.extKey!==le&&(ue.extKey=le,S.push(function(){Os(ue,"afterSetExtremes",Yo(ue.eventArgs,ue.getExtremes())),delete ue.eventArgs})),(Y||T)&&ue.redraw()}),Y&&this.drawChartBox(),Os(this,"predraw"),d.forEach(function(ue){(Y||ue.isDirty)&&ue.visible&&ue.redraw(),ue.isDirtyData=!1}),p&&p.reset(!0),_.draw(),Os(this,"redraw"),Os(this,"render"),w&&this.temporaryDisplay(!0),S.forEach(function(ue){ue.call()})}get(a){let u=this.series;function d(m){return m.id===a||m.options&&m.options.id===a}let p=Ob(this.axes,d)||Ob(this.series,d);for(let m=0;!p&&m<u.length;m++)p=Ob(u[m].points||[],d);return p}createAxes(){let a=this.userOptions;for(let u of(Os(this,"createAxes"),["xAxis","yAxis"]))for(let d of a[u]=Ep(a[u]||{}))new lc(this,d,u);Os(this,"afterCreateAxes")}getSelectedPoints(){return this.series.reduce((a,u)=>(u.getPointsCollection().forEach(d=>{Fi(d.selectedStaging,d.selected)&&a.push(d)}),a),[])}getSelectedSeries(){return this.series.filter(a=>a.selected)}setTitle(a,u,d){this.applyDescription("title",a),this.applyDescription("subtitle",u),this.applyDescription("caption",void 0),this.layOutTitles(d)}applyDescription(a,u){var b;let d=this,p=this.options[a]=Sa(this.options[a],u),m=this[a];m&&u&&(this[a]=m=m.destroy()),p&&!m&&((m=this.renderer.text(p.text,0,0,p.useHTML).attr({align:p.align,class:"highcharts-"+a,zIndex:p.zIndex||4}).css({textOverflow:"ellipsis",whiteSpace:"nowrap"}).add()).update=function(_,w){d.applyDescription(a,_),d.layOutTitles(w)},this.styledMode||m.css(Yo(a==="title"?{fontSize:this.options.isStock?"1em":"1.2em"}:{},p.style)),m.textPxLength=m.getBBox().width,m.css({whiteSpace:(b=p.style)==null?void 0:b.whiteSpace}),this[a]=m)}layOutTitles(a=!0){var _,w,S,N;let u=[0,0,0],{options:d,renderer:p,spacingBox:m}=this;["title","subtitle","caption"].forEach(T=>{var ue;let U=this[T],Y=this.options[T],se=Sa(m),de=(U==null?void 0:U.textPxLength)||0;if(U&&Y){Os(this,"layOutTitle",{alignTo:se,key:T,textPxLength:de});let le=p.fontMetrics(U),me=le.b,ye=le.h,Le=Y.verticalAlign||"top",De=Le==="top",Ie=De&&Y.minScale||1,Ge=T==="title"?De?-3:0:De?u[0]+2:0,Ue=Math.min(se.width/de,1),qe=Math.max(Ie,Ue),rt=Sa({y:Le==="bottom"?me:Ge+me},{align:T==="title"?Ue<Ie?"left":"center":(ue=this.title)==null?void 0:ue.alignValue},Y),dt=(Y.width||(Ue>Ie?this.chartWidth:se.width)/qe)+"px";U.alignValue!==rt.align&&(U.placed=!1);let xt=Math.round(U.css({width:dt}).getBBox(Y.useHTML).height);if(rt.height=xt,U.align(rt,!1,se).attr({align:rt.align,scaleX:qe,scaleY:qe,"transform-origin":`${se.x+de*qe*eM(rt.align)} ${ye}`}),!Y.floating){let Et=xt*(xt<1.2*ye?1:qe);Le==="top"?u[0]=Math.ceil(u[0]+Et):Le==="bottom"&&(u[2]=Math.ceil(u[2]+Et))}}},this),u[0]&&(((_=d.title)==null?void 0:_.verticalAlign)||"top")==="top"&&(u[0]+=((w=d.title)==null?void 0:w.margin)||0),u[2]&&((S=d.caption)==null?void 0:S.verticalAlign)==="bottom"&&(u[2]+=((N=d.caption)==null?void 0:N.margin)||0);let b=!this.titleOffset||this.titleOffset.join(",")!==u.join(",");this.titleOffset=u,Os(this,"afterLayOutTitles"),!this.isDirtyBox&&b&&(this.isDirtyBox=this.isDirtyLegend=b,this.hasRendered&&a&&this.isDirtyBox&&this.redraw())}getContainerBox(){let a=[].map.call(this.renderTo.children,d=>{if(d!==this.container){let p=d.style.display;return d.style.display="none",[d,p]}}),u={width:Db(this.renderTo,"width",!0)||0,height:Db(this.renderTo,"height",!0)||0};
61return a.filter(Boolean).forEach(([d,p])=>{d.style.display=p}),u}getChartSize(){var b;let a=this.options.chart,u=a.width,d=a.height,p=this.getContainerBox(),m=p.height<=1||!((b=this.renderTo.parentElement)!=null&&b.style.height)&&this.renderTo.style.height==="100%";this.chartWidth=Math.max(0,u||p.width||600),this.chartHeight=Math.max(0,_w(d,this.chartWidth)||(m?400:p.height)),this.containerBox=p}temporaryDisplay(a){let u=this.renderTo,d;if(a)for(;u!=null&&u.style;)u.hcOrigStyle&&(na(u,u.hcOrigStyle),delete u.hcOrigStyle),u.hcOrigDetached&&(Wd.body.removeChild(u),u.hcOrigDetached=!1),u=u.parentNode;else for(;u!=null&&u.style&&(Wd.body.contains(u)||u.parentNode||(u.hcOrigDetached=!0,Wd.body.appendChild(u)),(Db(u,"display",!1)==="none"||u.hcOricDetached)&&(u.hcOrigStyle={display:u.style.display,height:u.style.height,overflow:u.style.overflow},d={display:"block",overflow:"hidden"},u!==this.renderTo&&(d.height=0),na(u,d),u.offsetWidth||u.style.setProperty("display","block","important")),(u=u.parentNode)!==Wd.body););}setClassName(a){this.container.className="highcharts-container "+(a||"")}getContainer(){var U,Y;let a,u=this.options,d=u.chart,p="data-highcharts-chart",m=rM(),b=this.renderTo,_=nM(bw(b,p));fc(_)&&zl[_]&&zl[_].hasRendered&&zl[_].destroy(),bw(b,p,this.index),b.innerHTML=qs.emptyHTML,d.skipClone||b.offsetWidth||this.temporaryDisplay(),this.getChartSize();let w=this.chartHeight,S=this.chartWidth;na(b,{overflow:"hidden"}),this.styledMode||(a=Yo({position:"relative",overflow:"hidden",width:S+"px",height:w+"px",textAlign:"left",lineHeight:"normal",zIndex:0,"-webkit-tap-highlight-color":"rgba(0,0,0,0)",userSelect:"none","touch-action":"manipulation",outline:"none",padding:"0px"},d.style||{}));let N=Tb("div",{id:m},a,b);this.container=N,this.getChartSize(),S!==this.chartWidth&&(S=this.chartWidth,this.styledMode||na(N,{width:Fi((U=d.style)==null?void 0:U.width,S+"px")})),this.containerBox=this.getContainerBox(),this._cursor=N.style.cursor;let T=d.renderer||!JI?Ll.getRendererType(d.renderer):np;if(this.renderer=new T(N,S,w,void 0,d.forExport,(Y=u.exporting)==null?void 0:Y.allowHTML,this.styledMode),Eb(void 0,this),this.setClassName(d.className),this.styledMode)for(let se in u.defs)this.renderer.definition(u.defs[se]);else this.renderer.setStyle(d.style);this.renderer.chartIndex=this.index,Os(this,"afterGetContainer")}getMargins(a){var m;let{spacing:u,margin:d,titleOffset:p}=this;this.resetMargins(),p[0]&&!zo(d[0])&&(this.plotTop=Math.max(this.plotTop,p[0]+u[0])),p[2]&&!zo(d[2])&&(this.marginBottom=Math.max(this.marginBottom,p[2]+u[2])),(m=this.legend)!=null&&m.display&&this.legend.adjustMargins(d,u),Os(this,"getMargins"),a||this.getAxisMargins()}getAxisMargins(){let a=this,u=a.axisOffset=[0,0,0,0],d=a.colorAxis,p=a.margin,m=b=>{b.forEach(_=>{_.visible&&_.getOffset()})};a.hasCartesianSeries?m(a.axes):d!=null&&d.length&&m(d),gw.forEach((b,_)=>{zo(p[_])||(a[b]+=u[_])}),a.setChartSize()}getOptions(){return yw(this.userOptions,Sb)}reflow(a){var m,b;let u=this,d=u.containerBox,p=u.getContainerBox();(m=u.pointer)==null||delete m.chartPosition,!((b=u.exporting)!=null&&b.isPrinting)&&!u.isResizing&&d&&p.width&&((p.width!==d.width||p.height!==d.height)&&(Q.clearTimeout(u.reflowTimeout),u.reflowTimeout=iM(function(){u.container&&u.setSize(void 0,void 0,!1)},100*!!a)),u.containerBox=p)}setReflow(){let a=this,u=d=>{var p;(p=a.options)!=null&&p.chart.reflow&&a.hasLoaded&&a.reflow(d)};if(typeof ResizeObserver=="function")new ResizeObserver(u).observe(a.renderTo);else{let d=Cb(vw,"resize",u);Cb(this,"destroy",d)}}setSize(a,u,d){let p=this,m=p.renderer;p.isResizing+=1,Eb(d,p);let b=m.globalAnimation;p.oldChartHeight=p.chartHeight,p.oldChartWidth=p.chartWidth,a!==void 0&&(p.options.chart.width=a),u!==void 0&&(p.options.chart.height=u),p.getChartSize();let{chartWidth:_,chartHeight:w,scrollablePixelsX:S=0,scrollablePixelsY:N=0}=p;(p.isDirtyBox||_!==p.oldChartWidth||w!==p.oldChartHeight)&&(p.styledMode||(b?wb:na)(p.container,{width:`${_+S}px`,height:`${w+N}px`},b),p.setChartSize(!0),m.setSize(_,w,b),p.axes.forEach(function(T){T.isDirty=!0,T.setScale()}),p.isDirtyLegend=!0,p.isDirtyBox=!0,p.layOutTitles(),p.getMargins(),p.redraw(b),p.oldChartHeight=void 0,Os(p,"resize"),setTimeout(()=>{p&&Os(p,"endResize")},XI(b).duration)),p.isResizing-=1}
vendor: 14,095 bytes, line 61
61setChartSize(a){let u,d,p,m,{chartHeight:b,chartWidth:_,inverted:w,spacing:S,renderer:N}=this,T=this.clipOffset,U=Math[w?"floor":"round"];this.plotLeft=u=Math.round(this.plotLeft),this.plotTop=d=Math.round(this.plotTop),this.plotWidth=p=Math.max(0,Math.round(_-u-(this.marginRight??0))),this.plotHeight=m=Math.max(0,Math.round(b-d-(this.marginBottom??0))),this.plotSizeX=w?m:p,this.plotSizeY=w?p:m,this.spacingBox=N.spacingBox={x:S[3],y:S[0],width:_-S[3]-S[1],height:b-S[0]-S[2]},this.plotBox=N.plotBox={x:u,y:d,width:p,height:m},T&&(this.clipBox={x:U(T[3]),y:U(T[0]),width:U(this.plotSizeX-T[1]-T[3]),height:U(this.plotSizeY-T[0]-T[2])}),a||(this.axes.forEach(function(Y){Y.setAxisSize(),Y.setAxisTranslation()}),N.alignElements()),Os(this,"afterSetChartSize",{skipAxes:a})}resetMargins(){Os(this,"resetMargins");let a=this,u=a.options.chart,d=u.plotBorderWidth||0,p=Math.round(d)/2;["margin","spacing"].forEach(m=>{let b=u[m],_=sM(b)?b:[b,b,b,b];["Top","Right","Bottom","Left"].forEach((w,S)=>{a[m][S]=u[`${m}${w}`]??_[S]})}),gw.forEach((m,b)=>{a[m]=a.margin[b]??a.spacing[b]}),a.axisOffset=[0,0,0,0],a.clipOffset=[p,p,p,p],a.plotBorderWidth=d}drawChartBox(){let a=this.options.chart,u=this.renderer,d=this.chartWidth,p=this.chartHeight,m=this.styledMode,b=this.plotBGImage,_=a.backgroundColor,w=a.plotBackgroundColor,S=a.plotBackgroundImage,N=this.plotLeft,T=this.plotTop,U=this.plotWidth,Y=this.plotHeight,se=this.plotBox,de=this.clipRect,ue=this.clipBox,le=this.chartBackground,me=this.plotBackground,ye=this.plotBorder,Le,De,Ie,Ge="animate";le||(this.chartBackground=le=u.rect().addClass("highcharts-background").add(),Ge="attr"),m?Le=De=le.strokeWidth():(De=(Le=a.borderWidth||0)+8*!!a.shadow,Ie={fill:_||"none"},(Le||le["stroke-width"])&&(Ie.stroke=a.borderColor,Ie["stroke-width"]=Le),le.attr(Ie).shadow(a.shadow)),le[Ge]({x:De/2,y:De/2,width:d-De-Le%2,height:p-De-Le%2,r:a.borderRadius}),Ge="animate",me||(Ge="attr",this.plotBackground=me=u.rect().addClass("highcharts-plot-background").add()),me[Ge](se),!m&&(me.attr({fill:w||"none"}).shadow(a.plotShadow),S&&(b?(S!==b.attr("href")&&b.attr("href",S),b.animate(se)):this.plotBGImage=u.image(S,N,T,U,Y).add())),de?de.animate({width:ue.width,height:ue.height}):this.clipRect=u.clipRect(ue),Ge="animate",ye||(Ge="attr",this.plotBorder=ye=u.rect().addClass("highcharts-plot-border").attr({zIndex:1}).add()),m||ye.attr({stroke:a.plotBorderColor,"stroke-width":a.plotBorderWidth||0,fill:"none"}),ye[Ge](ye.crisp(se,-ye.strokeWidth())),this.isDirtyBox=!1,Os(this,"afterDrawChartBox")}propFromSeries(){let a,u,d,p=this,m=p.options.chart,b=p.options.series;["inverted","angular","polar"].forEach(function(_){for(u=kb[m.type],d=m[_]||u&&u.prototype[_],a=b==null?void 0:b.length;!d&&a--;)(u=kb[b[a].type])&&u.prototype[_]&&(d=!0);p[_]=d})}linkSeries(a){let u=this,d=u.series;d.forEach(function(p){p.linkedSeries.length=0}),d.forEach(function(p){let{linkedTo:m}=p.options;if(wp(m)){let b;(b=m===":previous"?u.series[p.index-1]:u.get(m))&&b.linkedParent!==p&&(b.linkedSeries.push(p),p.linkedParent=b,b.enabledDataSorting&&p.setDataSortingOptions(),p.visible=Fi(p.options.visible,b.options.visible,p.visible))}}),Os(this,"afterLinkSeries",{isUpdating:a})}renderSeries(){this.series.forEach(function(a){a.translate(),a.render()})}render(){var N;let a=this.axes,u=this.colorAxis,d=this.renderer,p=this.options.chart.axisLayoutRuns||2,m=T=>{T.forEach(U=>{U.visible&&U.render()})},b=0,_=!0,w,S=0;for(let T of(this.setTitle(),Os(this,"beforeMargins"),(N=this.getStacks)==null||N.call(this),this.getMargins(!0),this.setChartSize(),a)){let{options:U}=T,{labels:Y}=U;if(this.hasCartesianSeries&&T.horiz&&T.visible&&Y.enabled&&T.series.length&&T.coll!=="colorAxis"&&!this.polar){b=U.tickLength,T.createGroups();let se=new oc(T,0,"",!0),de=se.createLabel("x",Y);if(se.destroy(),de&&Fi(Y.reserveSpace,!fc(U.crossing))&&(b=de.getBBox().height+Y.distance+Math.max(U.offset||0,0)),b){de==null||de.destroy();break}}}for(this.plotHeight=Math.max(this.plotHeight-b,0);(_||w||p>1)&&S<p;){let T=this.plotWidth,U=this.plotHeight;for(let Y of a)S===0?Y.setScale():(Y.horiz&&_||!Y.horiz&&w)&&Y.setTickInterval(!0);S===0?this.getAxisMargins():this.getMargins(),_=T/this.plotWidth>(S?1:1.1),w=U/this.plotHeight>(S?1:1.05),S++}this.drawChartBox(),this.hasCartesianSeries?m(a):u!=null&&u.length&&m(u),this.seriesGroup||(this.seriesGroup=d.g("series-group").attr({zIndex:3}).shadow(this.options.chart.seriesGroupShadow).add()),this.dataLabelsGroup||(this.dataLabelsGroup=d.g("datalabels-group").attr({zIndex:6}).add()),this.renderSeries(),this.addCredits(),this.setResponsive&&this.setResponsive(),this.hasRendered=!0}addCredits(a){let u=this,d=Sa(!0,this.options.credits,a);d.enabled&&!this.credits&&(this.credits=this.renderer.text(d.text+(this.mapCredits||""),0,0).addClass("highcharts-credits").on("click",function(){d.href&&(vw.location.href=d.href)}).attr({align:d.position.align,zIndex:8}),u.styledMode||this.credits.css(d.style),this.credits.add().align(d.position),this.credits.update=function(p){u.credits=u.credits.destroy(),u.addCredits(p)})}destroy(){var _,w;let a,u=this,d=u.axes,p=u.series,m=u.container,b=m==null?void 0:m.parentNode;for(Os(u,"destroy"),u.renderer.forExport?ZI(zl,u):zl[u.index]=void 0,B.chartCount--,u.renderTo.removeAttribute("data-highcharts-chart"),xw(u),a=d.length;a--;)d[a]=d[a].destroy();for((w=(_=this.scroller)==null?void 0:_.destroy)==null||w.call(_),a=p.length;a--;)p[a]=p[a].destroy();["title","subtitle","chartBackground","plotBackground","plotBGImage","plotBorder","seriesGroup","clipRect","credits","pointer","rangeSelector","legend","resetZoomButton","tooltip","renderer"].forEach(S=>{var N,T;u[S]=(T=(N=u[S])==null?void 0:N.destroy)==null?void 0:T.call(N)}),m&&(m.innerHTML=qs.emptyHTML,xw(m),b&&QI(m)),Pb(u,function(S,N){delete u[N]})}firstRender(){var p;let a=this,u=a.options;a.getContainer(),a.resetMargins(),a.setChartSize(),a.propFromSeries(),a.createAxes();let d=tM(u.series)?u.series:[];u.series=[],d.forEach(function(m){a.initSeries(m)}),a.linkSeries(),a.setSortedData(),Os(a,"beforeRender"),a.render(),(p=a.pointer)==null||p.getChartPosition(),a.renderer.imgCount||a.hasLoaded||a.onload(),a.temporaryDisplay(!0)}onload(){this.callbacks.concat([this.callback]).forEach(function(a){a&&this.index!==void 0&&a.apply(this,[this])},this),Os(this,"load"),Os(this,"render"),zo(this.index)&&this.setReflow(),this.warnIfA11yModuleNotLoaded(),this.hasLoaded=!0}warnIfA11yModuleNotLoaded(){let{options:a,title:u}=this;a&&!this.accessibility&&(this.renderer.boxWrapper.attr({role:"img","aria-label":((u==null?void 0:u.element.textContent)||"").replace(/</g,"<")}),a.accessibility&&a.accessibility.enabled===!1||Ab('Highcharts warning: Consider including the "accessibility.js" module to make your chart more usable for people with disabilities. Set the "accessibility.enabled" option to false to remove this warning. See https://www.highcharts.com/docs/accessibility/accessibility-module.',!1,this))}addSeries(a,u,d){let p,m=this;return a&&(u=Fi(u,!0),Os(m,"addSeries",{options:a},function(){p=m.initSeries(a),m.isDirtyLegend=!0,m.linkSeries(),p.enabledDataSorting&&p.setData(a.data,!1),Os(m,"afterAddSeries",{series:p}),u&&m.redraw(d)})),p}addAxis(a,u,d,p){return this.createAxis(u?"xAxis":"yAxis",{axis:a,redraw:d,animation:p})}addColorAxis(a,u,d){return this.createAxis("colorAxis",{axis:a,redraw:u,animation:d})}createAxis(a,u){let d=new lc(this,u.axis,a);return Fi(u.redraw,!0)&&this.redraw(u.animation),d}showLoading(a){let u=this,d=u.options,p=d.loading,m=function(){b&&na(b,{left:u.plotLeft+"px",top:u.plotTop+"px",width:u.plotWidth+"px",height:u.plotHeight+"px"})},b=u.loadingDiv,_=u.loadingSpan;b||(u.loadingDiv=b=Tb("div",{className:"highcharts-loading highcharts-loading-hidden"},null,u.container)),_||(u.loadingSpan=_=Tb("span",{className:"highcharts-loading-inner"},null,b),Cb(u,"redraw",m)),b.className="highcharts-loading",qs.setElementHTML(_,Fi(a,d.lang.loading,"")),!u.styledMode&&(na(b,Yo(p.style,{zIndex:10})),na(_,p.labelStyle),u.loadingShown||(na(b,{opacity:0,display:""}),wb(b,{opacity:p.style.opacity||.5},{duration:p.showDuration||0}))),u.loadingShown=!0,m()}hideLoading(){let a=this.options,u=this.loadingDiv;u&&(u.className="highcharts-loading highcharts-loading-hidden",this.styledMode||wb(u,{opacity:0},{duration:a.loading.hideDuration||100,complete:function(){na(u,{display:"none"})}})),this.loadingShown=!1}update(a,u,d,p){let m,b,_,w=this,S={credits:"addCredits",title:"setTitle",subtitle:"setSubtitle",caption:"setCaption"},N=a.isResponsiveOptions,T=[];Os(w,"update",{options:a}),N||w.setResponsive(!1,!0),a=yw(a,w.options),w.userOptions=Sa(w.userOptions,a);let U=a.chart;U&&(Sa(!0,w.options.chart,U),this.setZoomOptions(),"className"in U&&w.setClassName(U.className),("inverted"in U||"polar"in U||"type"in U)&&(w.propFromSeries(),m=!0),"alignTicks"in U&&(m=!0),"events"in U&&mw(this,U),Pb(U,function(de,ue){w.propsRequireUpdateSeries.indexOf("chart."+ue)!==-1&&(b=!0),w.propsRequireDirtyBox.indexOf(ue)!==-1&&(w.isDirtyBox=!0),w.propsRequireReflow.indexOf(ue)!==-1&&(w.isDirtyBox=!0,N||(_=!0))}),!w.styledMode&&U.style&&w.renderer.setStyle(w.options.chart.style||{})),!w.styledMode&&a.colors&&(this.options.colors=a.colors),Pb(a,function(de,ue){w[ue]&&typeof w[ue].update=="function"?w[ue].update(de,!1):typeof w[S[ue]]=="function"?w[S[ue]](de):ue!=="colors"&&w.collectionsWithUpdate.indexOf(ue)===-1&&Sa(!0,w.options[ue],a[ue]),ue!=="chart"&&w.propsRequireUpdateSeries.indexOf(ue)!==-1&&(b=!0)}),this.collectionsWithUpdate.forEach(function(de){a[de]&&(Ep(a[de]).forEach(function(ue,le){let me,ye=zo(ue.id);ye&&(me=w.get(ue.id)),!me&&w[de]&&(me=w[de][Fi(ue.index,le)])&&(ye&&zo(me.options.id)||me.options.isInternal)&&(me=void 0),me&&me.coll===de&&(me.update(ue,!1),d&&(me.touched=!0)),!me&&d&&w.collectionsWithInit[de]&&(w.collectionsWithInit[de][0].apply(w,[ue].concat(w.collectionsWithInit[de][1]||[]).concat([!1])).touched=!0)}),d&&w[de].forEach(function(ue){ue.touched||ue.options.isInternal?delete ue.touched:T.push(ue)}))}),T.forEach(function(de){de.chart&&de.remove&&de.remove(!1)}),m&&w.axes.forEach(function(de){de.update({},!1)}),b&&w.getSeriesOrderByLinks().forEach(function(de){de.chart&&de.update({},!1)},this);let Y=U==null?void 0:U.width,se=U&&(wp(U.height)?_w(U.height,Y||w.chartWidth):U.height);_||fc(Y)&&Y!==w.chartWidth||fc(se)&&se!==w.chartHeight?w.setSize(Y,se,p):Fi(u,!0)&&w.redraw(p),Os(w,"afterUpdate",{options:a,redraw:u,animation:p})}setSubtitle(a,u){this.applyDescription("subtitle",a),this.layOutTitles(u)}setCaption(a,u){this.applyDescription("caption",a),this.layOutTitles(u)}showResetZoom(){let a=this,u=Sb.lang,d=a.zooming.resetButton,p=d.theme,m=d.relativeTo==="chart"||d.relativeTo==="spacingBox"?null:"plotBox";function b(){a.zoomOut()}Os(this,"beforeShowResetZoom",null,function(){a.resetZoomButton=a.renderer.button(u.resetZoom,null,null,b,p).attr({align:d.position.align,title:u.resetZoomTitle}).addClass("highcharts-reset-zoom").add().align(d.position,!1,m)}),Os(this,"afterShowResetZoom")}zoomOut(){Os(this,"selection",{resetSelection:!0},()=>this.transform({reset:!0,trigger:"zoom"}))}pan(a,u){let d=this,p=typeof u=="object"?u:{enabled:u,type:"x"},m=p.type,b=m&&d[{x:"xAxis",xy:"axes",y:"yAxis"}[m]].filter(w=>w.options.panningEnabled&&!w.options.isInternal),_=d.options.chart;_!=null&&_.panning&&(_.panning=p),Os(this,"pan",{originalEvent:a},()=>{d.transform({axes:b,event:a,to:{x:a.chartX-(d.mouseDownX||0),y:a.chartY-(d.mouseDownY||0)},trigger:"pan"}),na(d.container,{cursor:"move"})})}transform(a){var se;let{axes:u=this.axes,event:d,from:p={},reset:m,selection:b,to:_={},trigger:w}=a,{inverted:S,time:N}=this;(se=this.hoverPoints)==null||se.forEach(de=>de.setState()),Os(this,"transform",a);let T=a.hasZoomed||!1,U,Y;for(let de of u){let{horiz:ue,len:le,minPointOffset:me=0,options:ye,reversed:Le}=de,De=ue?"width":"height",Ie=ue?"x":"y",Ge=Fi(_[De],de.len),Ue=Fi(p[De],de.len),qe=10>Math.abs(Ge)?1:Ge/Ue,rt=(p[Ie]||0)+Ue/2-de.pos,dt=rt-((_[Ie]??de.pos)+Ge/2-de.pos)/qe,xt=Le&&!S||!Le&&S?-1:1;if(!m&&(rt<0||rt>de.len))continue;let Et=de.chart.polar||de.isOrdinal?0:me*xt||0,Rt=de.toValue(dt,!0),It=de.toValue(dt+le/qe,!0),jt=Rt+Et,Ct=It-Et,Wt=de.allExtremes;if(b&&b[de.coll].push({axis:de,min:Math.min(Rt,It),max:Math.max(Rt,It)}),jt>Ct&&([jt,Ct]=[Ct,jt]),qe===1&&!m&&de.coll==="yAxis"&&!Wt){for(let si of de.series){let nn=si.getExtremes(si.getProcessedData(!0).modified.getColumn("y")||[],!0);Wt??(Wt={dataMin:Number.MAX_VALUE,dataMax:-Number.MAX_VALUE}),fc(nn.dataMin)&&fc(nn.dataMax)&&(Wt.dataMin=Math.min(nn.dataMin,Wt.dataMin),Wt.dataMax=Math.max(nn.dataMax,Wt.dataMax))}de.allExtremes=Wt}let{dataMin:hs,dataMax:Ss,min:Ts,max:ai}=Yo(de.getExtremes(),Wt||{}),xs=N.parse(ye.min),Vs=N.parse(ye.max),as=hs??xs,Zt=Ss??Vs,En=Ct-jt,Bs=de.categories?0:Math.min(En,Zt-as),Zs=as-Bs*(zo(xs)?0:ye.minPadding),Kn=Zt+Bs*(zo(Vs)?0:ye.maxPadding),Qa=de.allowZoomOutside||qe===1||w!=="zoom"&&qe>1,$r=Math.min(xs??Zs,Zs,Qa?Ts:Zs),oi=Math.max(Vs??Kn,Kn,Qa?ai:Kn);(!de.isOrdinal||qe!==1||m)&&(jt<$r&&(jt=$r,qe>=1&&(Ct=jt+En)),Ct>oi&&(Ct=oi,qe>=1&&(jt=Ct-En)),(m||de.series.length&&(jt!==Ts||Ct!==ai)&&jt>=$r&&Ct<=oi)&&(b?b[de.coll].push({axis:de,min:jt,max:Ct}):(de.isPanning=w!=="zoom",de.isPanning&&(Y=!0),de.setExtremes(m?void 0:jt,m?void 0:Ct,!1,!1,{move:dt,trigger:w,scale:qe}),!m&&(jt>$r||Ct<oi)&&w!=="mousewheel"&&(U=!0)),T=!0),this.hasCartesianSeries||m||w==="mousewheel"||(U=!0),d&&(this[ue?"mouseDownX":"mouseDownY"]=d[ue?"chartX":"chartY"]))}return T&&(b?Os(this,"selection",b,()=>{delete a.selection,a.trigger="zoom",this.transform(a)}):(!U||Y||this.resetZoomButton?!U&&this.resetZoomButton&&(this.resetZoomButton=this.resetZoomButton.destroy()):this.showResetZoom(),this.redraw(w==="zoom"&&(this.options.chart.animation??this.pointCount<100)))),T}}Yo(qo.prototype,{callbacks:[],collectionsWithInit:{xAxis:[qo.prototype.addAxis,[!0]],yAxis:[qo.prototype.addAxis,[!1]],series:[qo.prototype.addSeries]},collectionsWithUpdate:["xAxis","yAxis","series"],propsRequireDirtyBox:["backgroundColor","borderColor","borderWidth","borderRadius","plotBackgroun
61dColor","plotBackgroundImage","plotBorderColor","plotBorderWidth","plotShadow","shadow"],propsRequireReflow:["margin","marginTop","marginRight","marginBottom","marginLeft","spacing","spacingTop","spacingRight","spacingBottom","spacingLeft"],propsRequireUpdateSeries:["chart.inverted","chart.polar","chart.ignoreHiddenSeries","chart.type","colors","plotOptions","time","tooltip"]});let{stop:aM}=mt,{composed:oM}=B,{addEvent:Go,createElement:Sp,css:$b,defined:Ib,erase:lM,merge:ww,pushUnique:Ew}=Q;function uM(){let k=this.scrollablePlotArea;(this.scrollablePixelsX||this.scrollablePixelsY)&&!k&&(this.scrollablePlotArea=k=new zd(this)),k==null||k.applyFixed()}function Sw(){this.chart.scrollablePlotArea&&(this.chart.scrollablePlotArea.isDirty=!0)}class zd{static compose(a,u,d){Ew(oM,this.compose)&&(Go(a,"afterInit",Sw),Go(u,"afterSetChartSize",p=>this.afterSetSize(p.target,p)),Go(u,"render",uM),Go(d,"show",Sw))}static afterSetSize(a,u){let d,p,m,{minWidth:b,minHeight:_}=a.options.chart.scrollablePlotArea||{},{clipBox:w,plotBox:S,inverted:N,renderer:T}=a;if(!T.forExport)if(b?(a.scrollablePixelsX=d=Math.max(0,b-a.chartWidth),d&&(a.scrollablePlotBox=ww(a.plotBox),S.width=a.plotWidth+=d,w[N?"height":"width"]+=d,m=!0)):_&&(a.scrollablePixelsY=p=Math.max(0,_-a.chartHeight),Ib(p)&&(a.scrollablePlotBox=ww(a.plotBox),S.height=a.plotHeight+=p,w[N?"width":"height"]+=p,m=!1)),Ib(m)){if(!u.skipAxes)for(let U of a.axes)(U.horiz===m||a.hasParallelCoordinates&&U.coll==="yAxis")&&(U.setAxisSize(),U.setAxisTranslation())}else delete a.scrollablePlotBox}constructor(a){var Y;let u,d=a.options.chart,p=Ll.getRendererType(),m=d.scrollablePlotArea||{},b=this.moveFixedElements.bind(this),_={WebkitOverflowScrolling:"touch",overflowX:"hidden",overflowY:"hidden"};a.scrollablePixelsX&&(_.overflowX="auto"),a.scrollablePixelsY&&(_.overflowY="auto"),this.chart=a;let w=this.parentDiv=Sp("div",{className:"highcharts-scrolling-parent"},{position:"relative"},a.renderTo),S=this.scrollingContainer=Sp("div",{className:"highcharts-scrolling"},_,w),N=this.innerContainer=Sp("div",{className:"highcharts-inner-container"},void 0,S),T=this.fixedDiv=Sp("div",{className:"highcharts-fixed"},{position:"absolute",overflow:"hidden",pointerEvents:"none",zIndex:(((Y=d.style)==null?void 0:Y.zIndex)||0)+2,top:0},void 0,!0),U=this.fixedRenderer=new p(T,a.chartWidth,a.chartHeight,d.style);this.mask=U.path().attr({fill:d.backgroundColor||"#fff","fill-opacity":m.opacity??.85,zIndex:-1}).addClass("highcharts-scrollable-mask").add(),S.parentNode.insertBefore(T,S),$b(a.renderTo,{overflow:"visible"}),Go(a,"afterShowResetZoom",b),Go(a,"afterApplyDrilldown",b),Go(a,"afterLayOutTitles",b),Go(S,"scroll",()=>{let{pointer:se,hoverPoint:de}=a;se&&(delete se.chartPosition,de&&(u=de),se.runPointActions(void 0,u,!0))}),N.appendChild(a.container)}applyFixed(){var rt;let{chart:a,fixedRenderer:u,isDirty:d,scrollingContainer:p}=this,{axisOffset:m,chartWidth:b,chartHeight:_,container:w,plotHeight:S,plotLeft:N,plotTop:T,plotWidth:U,scrollablePixelsX:Y=0,scrollablePixelsY:se=0}=a,{scrollPositionX:de=0,scrollPositionY:ue=0}=a.options.chart.scrollablePlotArea||{},le=b+Y,me=_+se;u.setSize(b,_),(d??!0)&&(this.isDirty=!1,this.moveFixedElements()),aM(a.container),$b(w,{width:`${le}px`,height:`${me}px`}),a.renderer.boxWrapper.attr({width:le,height:me,viewBox:[0,0,le,me].join(" ")}),(rt=a.chartBackground)==null||rt.attr({width:le,height:me}),$b(p,{width:`${b}px`,height:`${_}px`}),Ib(d)||(p.scrollLeft=Y*de,p.scrollTop=se*ue);let ye=T-m[0]-1,Le=N-m[3]-1,De=T+S+m[2]+1,Ie=N+U+m[1]+1,Ge=N+U-Y,Ue=T+S-se,qe=[["M",0,0]];Y?qe=[["M",0,ye],["L",N-1,ye],["L",N-1,De],["L",0,De],["Z"],["M",Ge,ye],["L",b,ye],["L",b,De],["L",Ge,De],["Z"]]:se&&(qe=[["M",Le,0],["L",Le,T-1],["L",Ie,T-1],["L",Ie,0],["Z"],["M",Le,Ue],["L",Le,_],["L",Ie,_],["L",Ie,Ue],["Z"]]),a.redrawTrigger!=="adjustHeight"&&this.mask.attr({d:qe})}moveFixedElements(){let a,{container:u,inverted:d,scrollablePixelsX:p,scrollablePixelsY:m}=this.chart,b=this.fixedRenderer,_=zd.fixedSelectors;if(p&&!d?a=".highcharts-yaxis":p&&d||m&&!d?a=".highcharts-xaxis":m&&d&&(a=".highcharts-yaxis"),a&&!(this.chart.hasParallelCoordinates&&a===".highcharts-yaxis"))for(let w of[`${a}
61:not(.highcharts-radial-axis)`,`${a}-labels:not(.highcharts-radial-axis-labels)`])Ew(_,w);else for(let w of[".highcharts-xaxis",".highcharts-yaxis"])for(let S of[`${w}:not(.highcharts-radial-axis)`,`${w}-labels:not(.highcharts-radial-axis-labels)`])lM(_,S);for(let w of _)[].forEach.call(u.querySelectorAll(w),S=>{(S.namespaceURI===b.SVG_NS?b.box:b.box.parentNode).appendChild(S),S.style.pointerEvents="auto"})}}zd.fixedSelectors=[".highcharts-breadcrumbs-group",".highcharts-contextbutton",".highcharts-caption",".highcharts-credits",".highcharts-drillup-button",".highcharts-legend",".highcharts-legend-checkbox",".highcharts-navigator-series",".highcharts-navigator-xaxis",".highcharts-navigator-yaxis",".highcharts-navigator",".highcharts-range-selector-group",".highcharts-reset-zoom",".highcharts-scrollbar",".highcharts-subtitle",".highcharts-title"];let{format:cM}=ti,{series:dM}=yn,{destroyObjectProperties:hM,fireEvent:kw,getAlignFactor:Mb,isNumber:Nb,pick:Yd}=Q,Cw=class{constructor(k,a,u,d,p){let m=k.chart.inverted,b=k.reversed;this.axis=k;let _=this.isNegative=!!u!=!!b;this.options=a=a||{},this.x=d,this.total=null,this.cumulative=null,this.points={},this.hasValidPoints=!1,this.stack=p,this.leftCliff=0,this.rightCliff=0,this.alignOptions={align:a.align||(m?_?"left":"right":"center"),verticalAlign:a.verticalAlign||(m?"middle":_?"bottom":"top"),y:a.y,x:a.x},this.textAlign=a.textAlign||(m?_?"right":"left":"center")}destroy(){hM(this,this.axis)}render(k){let a=this.axis.chart,u=this.options,d=u.format,p=d?cM(d,this,a):u.formatter.call(this);if(this.label)this.label.attr({text:p,visibility:"hidden"});else{this.label=a.renderer.label(p,null,void 0,u.shape,void 0,void 0,u.useHTML,!1,"stack-labels");let m={r:u.borderRadius||0,text:p,padding:Yd(u.padding,5),visibility:"hidden"};a.styledMode||(m.fill=u.backgroundColor,m.stroke=u.borderColor,m["stroke-width"]=u.borderWidth,this.label.css(u.style||{})),this.label.attr(m),this.label.added||this.label.add(k)}this.label.labelrank=a.plotSizeY,kw(this,"afterRender")}setOffset(k,a,u,d,p,m){let{alignOptions:b,axis:_,label:w,options:S,textAlign:N}=this,T=_.chart,U=this.getStackBox({xOffset:k,width:a,boxBottom:u,boxTop:d,defaultX:p,xAxis:m}),{verticalAlign:Y}=b;if(w&&U){let se=w.getBBox(void 0,0),de=w.padding,ue=Yd(S.overflow,"justify")==="justify",le;b.x=S.x||0,b.y=S.y||0;let{x:me,y:ye}=this.adjustStackPosition({labelBox:se,verticalAlign:Y,textAlign:N});U.x-=me,U.y-=ye,w.align(b,!1,U),(le=T.isInsidePlot(w.alignAttr.x+b.x+me,w.alignAttr.y+b.y+ye))||(ue=!1),ue&&dM.prototype.justifyDataLabel.call(_,w,b,w.alignAttr,se,U),w.attr({x:w.alignAttr.x,y:w.alignAttr.y,rotation:S.rotation,rotationOriginX:se.width*Mb(S.textAlign||"center"),rotationOriginY:se.height/2}),Yd(!ue&&S.crop,!0)&&(le=Nb(w.x)&&Nb(w.y)&&T.isInsidePlot(w.x-de+(w.width||0),w.y)&&T.isInsidePlot(w.x+de,w.y)),w[le?"show":"hide"]()}kw(this,"afterSetOffset",{xOffset:k,width:a})}adjustStackPosition({labelBox:k,verticalAlign:a,textAlign:u}){return{x:k.width/2+k.width/2*(2*Mb(u)-1),y:k.height/2*2*(1-Mb(a))}}getStackBox(k){let a=this.axis,u=a.chart,{boxTop:d,defaultX:p,xOffset:m,width:b,boxBottom:_}=k,w=a.stacking.usePercentage?100:Yd(d,this.total,0),S=a.toPixels(w),N=k.xAxis||u.xAxis[0],T=Yd(p,N.translate(this.x))+m,U=Math.abs(S-a.toPixels(_||Nb(a.min)&&a.logarithmic&&a.logarithmic.lin2log(a.min)||0)),Y=u.inverted,se=this.isNegative;return Y?{x:(se?S:S-U)-u.plotLeft,y:N.height-T-b+N.top-u.plotTop,width:U,height:b}:{x:T+N.transB-u.plotLeft,y:(se?S-U:S)-u.plotTop,width:b,height:U}}},{getDeferredAnimation:fM}=mt,{series:{prototype:pM}}=yn,{addEvent:Tw,correctFloat:qd,defined:Aw,destroyObjectProperties:mM,fireEvent:gM,isNumber:Lb,objectEach:Yl,pick:Rb}=Q;function vM(){let k=this.inverted;this.axes.forEach(a=>{var u;(u=a.stacking)!=null&&u.stacks&&a.hasVisibleSeries&&(a.stacking.oldStacks=a.stacking.stacks)}),this.series.forEach(a=>{var d;let u=((d=a.xAxis)==null?void 0:d.options)||{};a.options.stacking&&a.reserveSpace()&&(a.stackKey=[a.type,Rb(a.options.stack,""),k?u.top:u.left,k?u.height:u.width].join(","))})}function bM(){var a;let k=this.stacking;if(k){let u=k.stacks;Yl(u,(d,p)=>{mM(d),delete u[p]}),(a=k.stackTotalGroup)==null||a.destroy()}}function yM(){this.stacking||(this.stacking=new kM(this))}function _M(k,a,u,d){return!Aw(k)||k.x!==a||d&&k.stackKey!==d?k={x:a,index:0,key:d,stackKey:d}:k.index++,k.key=[u,a,k.index].join(","),k}function xM(){let k,a=this,u=a.yAxis,d=a.stackKey||"",p=u.stacking.stacks,m=a.getColumn("x",!0),b=a.options.stacking,_=a[b+"Stacker"];
vendor: 44,691 bytes, line 61
61_&&[d,"-"+d].forEach(w=>{var Y;let S=m.length,N,T,U;for(;S--;)N=m[S],k=a.getStackIndicator(k,N,a.index,w),T=(Y=p[w])==null?void 0:Y[N],(U=T==null?void 0:T.points[k.key||""])&&_.call(a,U,T,S)})}function wM(k,a,u){let d=a.total?100/a.total:0;k[0]=qd(k[0]*d),k[1]=qd(k[1]*d),this.stackedYData[u]=k[1]}function EM(k){(this.is("column")||this.is("columnrange"))&&(this.options.centerInCategory&&this.chart.series.length>1?pM.setStackedPoints.call(this,k,"group"):k.stacking.resetStacks())}function SM(k,a){var Ue,qe;let u,d,p,m,b,_,w,S=a||this.options.stacking;if(!S||!this.reserveSpace()||({group:"xAxis"}[S]||"yAxis")!==k.coll)return;let N=this.getColumn("x",!0),T=this.getColumn(this.pointValKey||"y",!0),U=[],Y=T.length,se=this.options,de=se.threshold||0,ue=se.startFromThreshold?de:0,le=se.stack,me=a?`${this.type},${S}`:this.stackKey||"",ye="-"+me,Le=this.negStacks,De=k.stacking,Ie=De.stacks,Ge=De.oldStacks;for(De.stacksTouched+=1,w=0;w<Y;w++){let rt=N[w]||0,dt=T[w],xt=Lb(dt)&&dt||0;_=(u=this.getStackIndicator(u,rt,this.index)).key||"",Ie[b=(d=Le&&xt<(ue?0:de))?ye:me]||(Ie[b]={}),Ie[b][rt]||((Ue=Ge[b])!=null&&Ue[rt]?(Ie[b][rt]=Ge[b][rt],Ie[b][rt].total=null):Ie[b][rt]=new Cw(k,k.options.stackLabels,!!d,rt,le)),p=Ie[b][rt],dt!==null?(p.points[_]=p.points[this.index]=[Rb(p.cumulative,ue)],Aw(p.cumulative)||(p.base=_),p.touched=De.stacksTouched,u.index>0&&this.singleStacks===!1&&(p.points[_][0]=p.points[this.index+","+rt+",0"][0])):(delete p.points[_],delete p.points[this.index]);let Et=p.total||0;S==="percent"?(m=d?me:ye,Et=Le&&((qe=Ie[m])!=null&&qe[rt])?(m=Ie[m][rt]).total=Math.max(m.total||0,Et)+Math.abs(xt):qd(Et+Math.abs(xt))):S==="group"?Lb(dt)&&Et++:Et=qd(Et+xt),S==="group"?p.cumulative=(Et||1)-1:p.cumulative=qd(Rb(p.cumulative,ue)+xt),p.total=Et,dt!==null&&(p.points[_].push(p.cumulative),U[w]=p.cumulative,p.hasValidPoints=!0)}S==="percent"&&(De.usePercentage=!0),S!=="group"&&(this.stackedYData=U),De.oldStacks={}}class kM{constructor(a){this.oldStacks={},this.stacks={},this.stacksTouched=0,this.axis=a}buildStacks(){let a,u,d=this.axis,p=d.series,m=d.coll==="xAxis",b=d.options.reversedStacks,_=p.length;for(this.resetStacks(),this.usePercentage=!1,u=_;u--;)a=p[b?u:_-u-1],m&&a.setGroupedPoints(d),a.setStackedPoints(d);if(!m)for(u=0;u<_;u++)p[u].modifyStacks();gM(d,"afterBuildStacks")}cleanStacks(){this.oldStacks&&(this.stacks=this.oldStacks,Yl(this.stacks,a=>{Yl(a,u=>{u.cumulative=u.total})}))}resetStacks(){Yl(this.stacks,a=>{Yl(a,(u,d)=>{Lb(u.touched)&&u.touched<this.stacksTouched?(u.destroy(),delete a[d]):(u.total=null,u.cumulative=null)})})}renderStackTotals(){var _;let a=this.axis,u=a.chart,d=u.renderer,p=this.stacks,m=fM(u,((_=a.options.stackLabels)==null?void 0:_.animation)||!1),b=this.stackTotalGroup=this.stackTotalGroup||d.g("stack-labels").attr({zIndex:6,opacity:0}).add();b.translate(u.plotLeft,u.plotTop),Yl(p,w=>{Yl(w,S=>{S.render(b)})}),b.animate({opacity:1},m)}}(P||(P={})).compose=function(k,a,u){let d=a.prototype,p=u.prototype;d.getStacks||(Tw(k,"init",yM),Tw(k,"destroy",bM),d.getStacks=vM,p.getStackIndicator=_M,p.modifyStacks=xM,p.percentStacker=wM,p.setGroupedPoints=EM,p.setStackedPoints=SM)};let CM=P,{defined:TM,merge:Ow,isObject:AM}=Q;class Dw extends Zi{drawGraph(){let a=this.options,u=(this.gappedPath||this.getGraphPath).call(this),d=this.chart.styledMode;[this,...this.zones].forEach((p,m)=>{let b,_=p.graph,w=_?"animate":"attr",S=p.dashStyle||a.dashStyle;_?(_.endX=this.preventGraphAnimation?null:u.xMap,_.animate({d:u})):u.length&&(p.graph=_=this.chart.renderer.path(u).addClass("highcharts-graph"+(m?` highcharts-zone-graph-${m-1} `:" ")+(m&&p.className||"")).attr({zIndex:1}).add(this.group)),_&&!d&&(b={stroke:!m&&a.lineColor||p.color||this.color||"#cccccc","stroke-width":a.lineWidth||0,fill:this.fillGraph&&this.color||"none"},S?b.dashstyle=S:a.linecap!=="square"&&(b["stroke-linecap"]=b["stroke-linejoin"]="round"),_[w](b).shadow(a.shadow&&Ow({filterUnits:"userSpaceOnUse"},AM(a.shadow)?a.shadow:{}))),_&&(_.startX=u.xMap,_.isArea=u.isArea)})}getGraphPath(a,u,d){let p=this,m=p.options,b=[],_=[],w,S=m.step,N=(a=a||p.points).reversed;return N&&a.reverse(),(S={right:1,center:2}[S]||S&&3)&&N&&(S=4-S),(a=this.getValidPoints(a,!1,m.nullInteraction||!(m.connectNulls&&!u&&!d))).forEach(function(T,U){let Y,se=T.plotX,de=T.plotY,ue=a[U-1],le=T.isNull||typeof de!="number";(T.leftCliff||ue!=null&&ue.rightCliff)&&!d&&(w=!0),le&&!TM(u)&&U>0?w=!m.connectNulls:le&&!u?w=!0:(U===0||w?Y=[["M",T.plotX,T.plotY]]:p.getPointSpline?Y=[p.getPointSpline(a,T,U)]:S?(Y=S===1?[["L",ue.plotX,de]]:S===2?[["L",(ue.plotX+se)/2,ue.plotY],["L",(ue.plotX+se)/2,de]]:[["L",se,ue.plotY]]).push(["L",se,de]):Y=[["L",se,de]],_.push(T.x),S&&(_.push(T.x),S===2&&_.push(T.x)),b.push.apply(b,Y),w=!1)}),b.xMap=_,p.graphPath=b,b}}Dw.defaultOptions=Ow(Zi.defaultOptions,{legendSymbol:"lineMarker"}),yn.registerSeriesType("line",Dw);let{seriesTypes:{line:Fb}}=yn,{extend:OM,merge:DM,objectEach:PM,pick:kp}=Q;class Vb extends Fb{drawGraph(){this.areaPath=[],super.drawGraph.apply(this);let{areaPath:a,options:u}=this;[this,...this.zones].forEach((d,p)=>{let m={},b=d.fillColor||u.fillColor,_=d.area,w=_?"animate":"attr";_?(_.endX=this.preventGraphAnimation?null:a.xMap,_.animate({d:a})):(m.zIndex=0,(_=d.area=this.chart.renderer.path(a).addClass("highcharts-area"+(p?` highcharts-zone-area-${p-1} `:" ")+(p&&d.className||"")).add(this.group)).isArea=!0),this.chart.styledMode||(m.fill=b||d.color||this.color,m["fill-opacity"]=b?1:u.fillOpacity??.75,_.css({pointerEvents:this.stickyTracking?"none":"auto"})),_[w](m),_.startX=a.xMap,_.shiftUnit=u.step?2:1})}getGraphPath(a){let u,d,p,m=Fb.prototype.getGraphPath,b=this.options,_=b.stacking,w=this.yAxis,S=[],N=[],T=this.index,U=w.stacking.stacks[this.stackKey],Y=b.threshold,se=Math.round(w.getThreshold(b.threshold)),de=kp(b.connectNulls,_==="percent"),ue=function(Ie,Ge,Ue){let qe=a[Ie],rt=_&&U[qe.x].points[T],dt=qe[Ue+"Null"]||0,xt=qe[Ue+"Cliff"]||0,Et,Rt,It=!0;xt||dt?(Et=(dt?rt[0]:rt[1])+xt,Rt=rt[0]+xt,It=!!dt):!_&&a[Ge]&&a[Ge].isNull&&(Et=Rt=Y),Et!==void 0&&(N.push({plotX:u,plotY:Et===null?se:w.getThreshold(Et),isNull:It,isCliff:!0}),S.push({plotX:u,plotY:Rt===null?se:w.getThreshold(Rt),doCurve:!1}))};a=a||this.points,_&&(a=this.getStackPoints(a));for(let Ie=0,Ge=a.length;Ie<Ge;++Ie)_||(a[Ie].leftCliff=a[Ie].rightCliff=a[Ie].leftNull=a[Ie].rightNull=void 0),d=a[Ie].isNull,u=kp(a[Ie].rectPlotX,a[Ie].plotX),p=_?kp(a[Ie].yBottom,se):se,(!d||de)&&(de||ue(Ie,Ie-1,"left"),d&&!_&&de||(N.push(a[Ie]),S.push({x:Ie,plotX:u,plotY:p})),de||ue(Ie,Ie+1,"right"));let le=m.call(this,N,!0,!0);S.reversed=!0;let me=m.call(this,S,!0,!0),ye=me[0];ye&&ye[0]==="M"&&(me[0]=["L",ye[1],ye[2]]);let Le=le.concat(me);Le.length&&Le.push(["Z"]);let De=m.call(this,N,!1,de);return this.chart.series.length>1&&_&&N.some(Ie=>Ie.isCliff)&&(Le.hasStackedCliffs=De.hasStackedCliffs=!0),Le.xMap=le.xMap,this.areaPath=Le,De}getStackPoints(a){let u=this,d=[],p=[],m=this.xAxis,b=this.yAxis,_=b.stacking.stacks[this.stackKey],w={},S=b.series,N=S.length,T=b.options.reversedStacks?1:-1,U=S.indexOf(u);if(a=a||this.points,this.options.stacking){for(let se=0;se<a.length;se++)a[se].leftNull=a[se].rightNull=void 0,w[a[se].x]=a[se];PM(_,function(se,de){se.total!==null&&p.push(de)}),p.sort(function(se,de){return se-de});let Y=S.map(se=>se.visible);p.forEach(function(se,de){let ue=0,le,me;if(w[se]&&!w[se].isNull)d.push(w[se]),[-1,1].forEach(function(ye){let Le=ye===1?"rightNull":"leftNull",De=_[p[de+ye]],Ie=0;if(De){let Ge=U;for(;Ge>=0&&Ge<N;){let Ue=S[Ge].index;!(le=De.points[Ue])&&(Ue===u.index?w[se][Le]=!0:Y[Ge]&&(me=_[se].points[Ue])&&(Ie-=me[1]-me[0])),Ge+=T}}w[se][ye===1?"rightCliff":"leftCliff"]=Ie});else{let ye=U;for(;ye>=0&&ye<N;){let Le=S[ye].index;if(le=_[se].points[Le]){ue=le[1];break}ye+=T}ue=kp(ue,0),ue=b.translate(ue,0,1,0,1),d.push({isNull:!0,plotX:m.translate(se,0,0,0,1),x:se,plotY:ue,yBottom:ue})}})}return d}}Vb.defaultOptions=DM(Fb.defaultOptions,{threshold:0,legendSymbol:"areaMarker"}),OM(Vb.prototype,{singleStacks:!1}),yn.registerSeriesType("area",Vb);let{line:Pw}=yn.seriesTypes,{merge:$M,pick:Cp}=Q;class Bb extends Pw{getPointSpline(a,u,d){let p,m,b,_,w=u.plotX||0,S=u.plotY||0,N=a[d-1],T=a[d+1];function U(se){return se&&!se.isNull&&se.doCurve!==!1&&!u.isCliff}if(U(N)&&U(T)){let se=N.plotX||0,de=N.plotY||0,ue=T.plotX||0,le=T.plotY||0,me=0;p=(1.5*w+se)/2.5,m=(1.5*S+de)/2.5,b=(1.5*w+ue)/2.5,_=(1.5*S+le)/2.5,b!==p&&(me=(_-m)*(b-w)/(b-p)+S-_),m+=me,_+=me,m>de&&m>S?(m=Math.max(de,S),_=2*S-m):m<de&&m<S&&(m=Math.min(de,S),_=2*S-m),_>le&&_>S?(_=Math.max(le,S),m=2*S-_):_<le&&_<S&&(_=Math.min(le,S),m=2*S-_),u.rightContX=b,u.rightContY=_,u.controlPoints={low:[p,m],high:[b,_]}}let Y=["C",Cp(N.rightContX,N.plotX,0),Cp(N.rightContY,N.plotY,0),Cp(p,w,0),Cp(m,S,0),w,S];return N.rightContX=N.rightContY=void 0,Y}}Bb.defaultOptions=$M(Pw.defaultOptions),yn.registerSeriesType("spline",Bb);let $w=Bb,{area:IM,area:{prototype:Ub}}=yn.seriesTypes,{extend:MM,merge:NM}=Q;class jb extends $w{}jb.defaultOptions=NM($w.defaultOptions,IM.defaultOptions),MM(jb.prototype,{getGraphPath:Ub.getGraphPath,getStackPoints:Ub.getStackPoints,drawGraph:Ub.drawGraph}),yn.registerSeriesType("areaspline",jb);let{animObject:LM}=mt,{parse:RM}=gs,{noop:FM}=B,{clamp:Tp,crisp:Ap,defined:Iw,extend:Mw,fireEvent:Nw,isArray:Lw,isNumber:Op,merge:Hb,pick:Gd,objectEach:VM}=Q;class Dp extends Zi{animate(a){let u,d,p=this,m=this.yAxis,b=m.pos,_=m.reversed,w=p.options,{clipOffset:S,inverted:N}=this.chart,T={},U=N?"translateX":"translateY";a&&S?(T.scaleY=.001,d=Tp(m.toPixels(w.threshold||0),b,b+m.len),N?T.translateX=(d+=_?-Math.floor(S[0]):Math.ceil(S[2]))-m.len:T.translateY=d+=_?Math.ceil(S[0]):-Math.floor(S[2]),p.clipBox&&p.setClip(),p.group.attr(T)):(u=Number(p.group.attr(U)),p.group.animate({scaleY:1},Mw(LM(p.options.animation),{step:function(Y,se){p.group&&(T[U]=u+se.pos*(b-u),p.group.attr(T))}})))}init(a,u){super.init.apply(this,arguments);let d=this;(a=d.chart).hasRendered&&a.series.forEach(function(p){p.type===d.type&&(p.isDirty=!0)})}getColumnMetrics(){var de,ue;let a=this,u=a.options,d=a.xAxis,p=a.yAxis,m=d.options.reversedStacks,b=d.reversed&&!m||!d.reversed&&m,_={},w,S=0;u.grouping===!1?S=1:a.chart.series.forEach(function(le){let me,ye=le.yAxis,Le=le.options;le.type===a.type&&le.reserveSpace()&&p.len===ye.len&&p.pos===ye.pos&&(Le.stacking&&Le.stacking!=="group"?(_[w=le.stackKey]===void 0&&(_[w]=S++),me=_[w]):Le.grouping!==!1&&(me=S++),le.columnIndex=me)});let N=Math.min(Math.abs(d.transA)*(!((de=d.brokenAxis)!=null&&de.hasBreaks)&&((ue=d.ordinal)==null?void 0:ue.slope)||u.pointRange||d.closestPointRange||d.tickInterval||1),d.len),T=N*u.groupPadding,U=(N-2*T)/(S||1),Y=Math.min(u.maxPointWidth||d.len,Gd(u.pointWidth,U*(1-2*u.pointPadding))),se=(a.columnIndex||0)+ +!!b;return a.columnMetrics={width:Y,offset:(U-Y)/2+(T+se*U-N/2)*(b?-1:1),paddedWidth:U,columnCount:S},a.columnMetrics}crispCol(a,u,d,p){let m=this.borderWidth,b=this.chart.inverted;return p=Ap(u+p,m,b)-(u=Ap(u,m,b)),this.options.crisp&&(d=Ap(a+d,m)-(a=Ap(a,m))),{x:a,y:u,width:d,height:p}}adjustForMissingColumns(a,u,d,p){var m;if(!d.isNull&&p.columnCount>1){let b=this.xAxis.series.filter(N=>N.visible).map(N=>N.index),_=0,w=0;VM((m=this.xAxis.stacking)==null?void 0:m.stacks,N=>{var se;let T=typeof d.x=="number"?(se=N[d.x.toString()])==null?void 0:se.points:void 0,U=T==null?void 0:T[this.index],Y={};if(T&&Lw(U)){let de=this.index,ue=Object.keys(T).filter(le=>!le.match(",")&&T[le]&&T[le].length>1).map(parseFloat).filter(le=>b.indexOf(le)!==-1).filter(le=>{let me=this.chart.series[le].options,ye=me.stacking&&me.stack;if(Iw(ye)){if(Op(Y[ye]))return de===le&&(de=Y[ye]),!1;Y[ye]=le}return!0}).sort((le,me)=>me-le);_=ue.indexOf(de),w=ue.length}}),_=this.xAxis.reversed?w-1-_:_;let S=(w-1)*p.paddedWidth+u;a=(d.plotX||0)+S/2-u-_*p.paddedWidth}return a}translate(){let a=this,u=a.chart,d=a.options,p=a.dense=a.closestPointRange*a.xAxis.transA<2,m=a.borderWidth=Gd(d.borderWidth,+!p),b=a.xAxis,_=a.yAxis,w=d.threshold,S=Gd(d.minPointLength,5),N=a.getColumnMetrics(),T=N.width,U=a.pointXOffset=N.offset,Y=a.dataMin,se=a.dataMax,de=a.translatedThreshold=_.getThreshold(w),ue=a.barW=Math.max(T,1+2*m);d.pointPadding&&d.crisp&&(ue=Math.ceil(ue)),Zi.prototype.translate.apply(a),a.points.forEach(function(le){let me=Gd(le.yBottom,de),ye=999+Math.abs(me),Le=le.plotX||0,De=Tp(le.plotY,-ye,_.len+ye),Ie,Ge=Math.min(De,me),Ue=Math.max(De,me)-Ge,qe=T,rt=Le+U,dt=ue;S&&Math.abs(Ue)<S&&(Ue=S,Ie=!_.reversed&&!le.negative||_.reversed&&le.negative,Op(w)&&Op(se)&&le.y===w&&se<=w&&(_.min||0)<w&&(Y!==se||(_.max||0)<=w)&&(Ie=!Ie,le.negative=!le.negative),Ge=Math.abs(Ge-de)>S?me-S:de-(Ie?S:0)),Iw(le.options.pointWidth)&&(rt-=Math.round(((qe=dt=Math.ceil(le.options.pointWidth))-T)/2)),d.centerInCategory&&(rt=a.adjustForMissingColumns(rt,qe,le,N)),le.barX=rt,le.pointWidth=qe,le.tooltipPos=u.inverted?[Tp(_.len+_.pos-u.plotLeft-De,_.pos-u.plotLeft,_.len+_.pos-u.plotLeft),b.len+b.pos-u.plotTop-rt-dt/2,Ue]:[b.left-u.plotLeft+rt+dt/2,Tp(De+_.pos-u.plotTop,_.pos-u.plotTop,_.len+_.pos-u.plotTop),Ue],le.shapeType=a.pointClass.prototype.shapeType||"roundedRect",le.shapeArgs=a.crispCol(rt,Ge,dt,le.isNull?0:Ue)}),Nw(this,"afterColumnTranslate")}drawGraph(){this.group[this.dense?"addClass":"removeClass"]("highcharts-dense-data")}pointAttribs(a,u){let d=this.options,p=this.pointAttrToOptions||{},m=p.stroke||"borderColor",b=p["stroke-width"]||"borderWidth",_,w,S,N=a&&a.color||this.color,T=a&&a[m]||d[m]||N,U=a&&a.options.dashStyle||d.dashStyle,Y=a&&a[b]||d[b]||this[b]||0,se=a!=null&&a.isNull&&d.nullInteraction?0:(a==null?void 0:a.opacity)??d.opacity??1;a&&this.zones.length&&(w=a.getZone(),N=a.options.color||w&&(w.color||a.nonZonedColor)||this.color,w&&(T=w.borderColor||T,U=w.dashStyle||U,Y=w.borderWidth||Y)),u&&a&&(S=(_=Hb(d.states[u],a.options.states&&a.options.states[u]||{})).brightness,N=_.color||S!==void 0&&RM(N).brighten(_.brightness).get()||N,T=_[m]||T,Y=_[b]||Y,U=_.dashStyle||U,se=Gd(_.opacity,se));let de={fill:N,stroke:T,"stroke-width":Y,opacity:se};return U&&(de.dashstyle=U),de}drawPoints(a=this.points){let u,d=this,p=this.chart,m=d.options,b=m.nullInteraction,_=p.renderer,w=m.animationLimit||250;a.forEach(function(S){let N=S.plotY,T=S.graphic,U=!!T,Y=T&&p.pointCount<w?"animate":"attr";Op(N)&&(S.y!==null||b)?(u=S.shapeArgs,T&&S.hasNewShapeType()&&(T=T.destroy()),d.enabledDataSorting&&(S.startXPos=d.xAxis.reversed?-(u&&u.width||0):d.xAxis.width),!T&&(S.graphic=T=_[S.shapeType](u).add(S.group||d.group),T&&d.enabledDataSorting&&p.hasRendered&&p.pointCount<w&&(T.attr({x:S.startXPos}),U=!0,Y="animate")),T&&U&&T[Y](Hb(u)),p.styledMode||T[Y](d.pointAttribs(S,S.selected&&"select")).shadow(S.allowShadow!==!1&&m.shadow),T&&(T.addClass(S.getClassName(),!0),T.attr({visibility:S.visible?"inherit":"hidden"}))):T&&(S.graphic=T.destroy())})}drawTracker(a=this.points){let u,d=this,p=d.chart,m=p.pointer,b=function(_){m==null||m.normalize(_);let w=m==null?void 0:m.getPointFromEvent(_);m&&w&&d.options.enableMouseTracking&&(p.isInsidePlot(_.chartX-p.plotLeft,_.chartY-p.plotTop,{visiblePlotOnly:!0})||m!=null&&m.inClass(_.target,"highcharts-data-label"))&&(m.isDirectTouch=!0,w.onMouseOver(_))};a.forEach(function(_){u=Lw(_.dataLabels)?_.dataLabels:_.dataLabel?[_.dataLabel]:[],_.graphic&&(_.graphic.element.point=_),u.forEach(function(w){(w.div||w.element).point=_})}),d._hasTracking||(d.trackerGroups.forEach(function(_){d[_]&&(d[_].addClass("highcharts-tracker").on("mouseover",b).on("mouseout",function(w){m==null||m.onTrackerMouseOut(w)}).on("touchstart",b),!p.styledMode&&d.options.cursor&&d[_].css({cursor:d.options.cursor}))}),d._hasTracking=!0),Nw(this,"afterDrawTracker")}remove(){let a=this,u=a.chart;u.hasRendered&&u.series.forEach(function(d){d.type===a.type&&(d.isDirty=!0)}),Zi.prototype.remove.apply(a,arguments)}}Dp.defaultOptions=Hb(Zi.defaultOptions,{borderRadius:3,centerInCategory:!1,groupPadding:.2,marker:null,pointPadding:.1,minPointLength:0,cropThreshold:50,pointRange:null,states:{hover:{halo:!1,brightness:.1},select:{color:"#cccccc",borderColor:"#000000"}},dataLabels:{align:void 0,verticalAlign:void 0,y:void 0},startFromThreshold:!0,stickyTracking:!1,tooltip:{distance:6},threshold:0,borderColor:"#ffffff"}),Mw(Dp.prototype,{directTouch:!0,getSymbol:FM,negStacks:!0,trackerGroups:["group","dataLabelsGroup"]}),yn.registerSeriesType("column",Dp);let Pp=Dp,{getDeferredAnimation:BM}=mt,{format:UM}=ti,{defined:ql,extend:Rw,fireEvent:Wb,getAlignFactor:Fw,isArray:Xo,isString:Xd,merge:Kd,objectEach:jM,pick:Jd,pInt:HM,splat:Vw}=Q;(function(k){function a(){return w(this).some(N=>N==null?void 0:N.enabled)}function u(N,T,U,Y,se){var rt;let{chart:de,enabledDataSorting:ue}=this,le=this.isCartesian&&de.inverted,me=N.plotX,ye=N.plotY,Le=U.rotation||0,De=ql(me)&&ql(ye)&&de.isInsidePlot(me,Math.round(ye),{inverted:le,paneCoordinates:!0,series:this}),Ie=Le===0&&Jd(U.overflow,ue?"none":"justify")==="justify",Ge=this.visible&&N.visible!==!1&&ql(me)&&(N.series.forceDL||ue&&!Ie||De||Jd(U.inside,!!this.options.stacking)&&Y&&de.isInsidePlot(me,le?Y.x+1:Y.y+Y.height-1,{inverted:le,paneCoordinates:!0,series:this})),Ue=N.pos();if(Ge&&Ue){var qe;let dt=T.getBBox(),xt=T.getBBox(void 0,0);if(Y=Rw({x:Ue[0],y:Math.round(Ue[1]),width:0,height:0},Y||{}),U.alignTo==="plotEdges"&&this.isCartesian&&(Y[le?"x":"y"]=0,Y[le?"width":"height"]=((rt=this.yAxis)==null?void 0:rt.len)||0),Rw(U,{width:dt.width,height:dt.height}),qe=Y,ue&&this.xAxis&&!Ie&&this.setDataLabelStartPos(N,T,se,De,qe),T.align(Kd(U,{width:xt.width,height:xt.height}),!1,Y,!1),T.alignAttr.x+=Fw(U.align)*(xt.width-dt.width),T.alignAttr.y+=Fw(U.verticalAlign)*(xt.height-dt.height),T[T.placed?"animate":"attr"]({"text-align":T.alignAttr["text-align"]||"center",x:T.alignAttr.x+(dt.width-xt.width)/2,y:T.alignAttr.y+(dt.height-xt.height)/2,rotationOriginX:(T.width||0)/2,rotationOriginY:(T.height||0)/2}),Ie&&Y.height>=0)this.justifyDataLabel(T,U,T.alignAttr,dt,Y,se);else if(Jd(U.crop,!0)){let{x:Et,y:Rt}=T.alignAttr;Ge=de.isInsidePlot(Et,Rt,{paneCoordinates:!0,series:this})&&de.isInsidePlot(Et+dt.width-1,Rt+dt.height-1,{paneCoordinates:!0,series:this})}U.shape&&!Le&&T[se?"attr":"animate"]({anchorX:Ue[0],anchorY:Ue[1]})}se&&ue&&(T.placed=!1),Ge||ue&&!Ie?(T.show(),T.placed=!0):(T.hide(),T.placed=!1)}function d(){return this.plotGroup("dataLabelsGroup","data-labels",this.hasRendered?"inherit":"hidden",this.options.dataLabels.zIndex||6,this.chart.dataLabelsGroup)}function p(N){let T=this.hasRendered||0,U=this.initDataLabelsGroup().attr({opacity:+T});return!T&&U&&(this.visible&&U.show(),this.options.animation?U.animate({opacity:1},N):U.attr({opacity:1})),U}function m(N){var Ge;let T;N=N||this.points;let U=this,Y=U.chart,se=U.options,de=Y.renderer,{backgroundColor:ue,plotBackgroundColor:le}=Y.options.chart,me=de.getContrast(Xd(le)&&le||Xd(ue)&&ue||"#000000"),ye=w(U),{animation:Le,defer:De}=ye[0],Ie=De?BM(Y,Le,U):{defer:0,duration:0};Wb(this,"drawDataLabels"),(Ge=U.hasDataLabels)!=null&&Ge.call(U)&&(T=this.initDataLabels(Ie),N.forEach(Ue=>{var xt,Et,Rt;let qe=Ue.dataLabels||[],rt=Ue.color||U.color;Vw(_(ye,Ue.dlOptions||((xt=Ue.options)==null?void 0:xt.dataLabels))).forEach((It,jt)=>{var Zs;let Ct=It.enabled&&(Ue.visible||Ue.dataLabelOnHidden)&&(!Ue.isNull||Ue.dataLabelOnNull)&&(function(Kn,Qa){let $r=Qa.filter;if($r){let oi=$r.operator,si=Kn[$r.property],nn=$r.value;return oi===">"&&si>nn||oi==="<"&&si<nn||oi===">="&&si>=nn||oi==="<="&&si<=nn||oi==="=="&&si==nn||oi==="==="&&si===nn||oi==="!="&&si!=nn||oi==="!=="&&si!==nn||!1}return!0})(Ue,It),{backgroundColor:Wt,borderColor:hs,distance:Ss,style:Ts={}}=It,ai,xs,Vs,as={},Zt=qe[jt],En=!Zt,Bs;Ct&&(xs=ql(ai=Jd(It[Ue.formatPrefix+"Format"],It.format))?UM(ai,Ue,Y):(It[Ue.formatPrefix+"Formatter"]||It.formatter).call(Ue,It),Vs=It.rotation,!Y.styledMode&&(Ts.color=Jd(It.color,Ts.color,Xd(U.color)?U.color:void 0,"#000000"),Ts.color==="contrast"?(Wt!=="none"&&(Bs=Wt),Ue.contrastColor=de.getContrast(Bs!=="auto"&&Xd(Bs)&&Bs||(Xd(rt)?rt:"")),Ts.color=Bs||!ql(Ss)&&It.inside||0>HM(Ss||0)||se.stacking?Ue.contrastColor:me):delete Ue.contrastColor,se.cursor&&(Ts.cursor=se.cursor)),as={r:It.borderRadius||0,rotation:Vs,padding:It.padding,zIndex:1},Y.styledMode||(as.fill=Wt==="auto"?Ue.color:Wt,as.stroke=hs==="auto"?Ue.color:hs,as["stroke-width"]=It.borderWidth),jM(as,(Kn,Qa)=>{Kn===void 0&&delete as[Qa]})),!Zt||Ct&&ql(xs)&&!!(Zt.div||(Zs=Zt.text)!=null&&Zs.foreignObject)==!!It.useHTML&&(Zt.rotation&&It.rotation||Zt.rotation===It.rotation)||(Zt=void 0,En=!0),Ct&&ql(xs)&&xs!==""&&(Zt?as.text=xs:(Zt=de.label(xs,0,0,It.shape,void 0,void 0,It.useHTML,void 0,"data-label")).addClass(" highcharts-data-label-color-"+Ue.colorIndex+" "+(It.className||"")+(It.useHTML?" highcharts-tracker":"")),Zt&&(Zt.options=It,Zt.attr(as),Y.styledMode?Ts.width&&Zt.css({width:Ts.width,textOverflow:Ts.textOverflow,whiteSpace:Ts.whiteSpace}):Zt.css(Ts).shadow(It.shadow),Wb(Zt,"beforeAddingDataLabel",{labelOptions:It,point:Ue}),Zt.added||Zt.add(T),U.alignDataLabel(Ue,Zt,It,void 0,En),Zt.isActive=!0,qe[jt]&&qe[jt]!==Zt&&qe[jt].destroy(),qe[jt]=Zt))});let dt=qe.length;for(;dt--;)(Et=qe[dt])!=null&&Et.isActive?qe[dt].isActive=!1:((Rt=qe[dt])==null||Rt.destroy(),qe.splice(dt,1));Ue.dataLabel=qe[0],Ue.dataLabels=qe})),Wb(this,"afterDrawDataLabels")}function b(N,T,U,Y,se,de){let ue=this.chart,le=T.align,me=T.verticalAlign,ye=N.box?0:N.padding||0,Le=ue.inverted?this.yAxis:this.xAxis,De=Le?Le.left-ue.plotLeft:0,Ie=ue.inverted?this.xAxis:this.yAxis,Ge=Ie?Ie.top-ue.plotTop:0,{x:Ue=0,y:qe=0}=T,rt,dt;return(rt=(U.x||0)+ye+De)<0&&(le==="right"&&Ue>=0?(T.align="left",T.inside=!0):Ue-=rt,dt=!0),(rt=(U.x||0)+Y.width-ye+De)>ue.plotWidth&&(le==="left"&&Ue<=0?(T.align="right",T.inside=!0):Ue+=ue.plotWidth-rt,dt=!0),(rt=U.y+ye+Ge)<0&&(me==="bottom"&&qe>=0?(T.verticalAlign="top",T.inside=!0):qe-=rt,dt=!0),(rt=(U.y||0)+Y.height-ye+Ge)>ue.plotHeight&&(me==="top"&&qe<=0?(T.verticalAlign="bottom",T.inside=!0):qe+=ue.plotHeight-rt,dt=!0),dt&&(T.x=Ue,T.y=qe,N.placed=!de,N.align(T,void 0,se)),dt}function _(N,T){let U=[],Y;if(Xo(N)&&!Xo(T))U=N.map(function(se){return Kd(se,T)});else if(Xo(T)&&!Xo(N))U=T.map(function(se){return Kd(N,se)});else if(Xo(N)||Xo(T)){if(Xo(N)&&Xo(T))for(Y=Math.max(N.length,T.length);Y--;)U[Y]=Kd(N[Y],T[Y])}else U=Kd(N,T);return U}function w(N){var U,Y;let T=N.chart.options.plotOptions;return Vw(_(_((U=T==null?void 0:T.series)==null?void 0:U.dataLabels,(Y=T==null?void 0:T[N.type])==null?void 0:Y.dataLabels),N.options.dataLabels))}function S(N,T,U,Y,se){let de=this.chart,ue=de.inverted,le=this.xAxis,me=le.reversed,ye=((ue?T.height:T.width)||0)/2,Le=N.pointWidth,De=Le?Le/2:0;T.startXPos=ue?se.x:me?-ye-De:le.width-ye+De,T.startYPos=ue?me?this.yAxis.height-ye+De:-ye-De:se.y,Y?T.visibility==="hidden"&&(T.show(),T.attr({opacity:0}).animate({opacity:1})):T.attr({opacity:1}).animate({opacity:0},void 0,T.hide),de.hasRendered&&(U&&T.attr({x:T.startXPos,y:T.startYPos}),T.placed=!0)}k.compose=function(N){let T=N.prototype;T.initDataLabels||(T.initDataLabels=p,T.initDataLabelsGroup=d,T.alignDataLabel=u,T.drawDataLabels=m,T.justifyDataLabel=b,T.mergeArrays=_,T.setDataLabelStartPos=S,T.hasDataLabels=a)}})(I||(I={}));let $p=I,{composed:WM}=B,{series:Bw}=yn,{merge:zM,pushUnique:YM}=Q;(function(k){function a(u,d,p,m,b){var de,ue;let{chart:_,options:w}=this,S=_.inverted,N=((de=this.xAxis)==null?void 0:de.len)||_.plotSizeX||0,T=((ue=this.yAxis)==null?void 0:ue.len)||_.plotSizeY||0,U=u.dlBox||u.shapeArgs,Y=u.below??(u.plotY||0)>(this.translatedThreshold??T),se=p.inside??!!w.stacking;if(U){if(m=zM(U),p.overflow!=="allow"||p.crop!==!1||w.clip!==!1){m.y<0&&(m.height+=m.y,m.y=0);let le=m.y+m.height-T;le>0&&le<m.height-1&&(m.height-=le)}S&&(m={x:T-m.y-m.height,y:N-m.x-m.width,width:m.height,height:m.width}),se||(S?(m.x+=Y?0:m.width,m.width=0):(m.y+=Y?m.height:0,m.height=0))}p.align??(p.align=!S||se?"center":Y?"right":"left"),p.verticalAlign??(p.verticalAlign=S||se?"middle":Y?"top":"bottom"),Bw.prototype.alignDataLabel.call(this,u,d,p,m,b),p.inside&&u.contrastColor&&d.css({color:u.contrastColor})}k.compose=function(u){$p.compose(Bw),YM(WM,"ColumnDataLabel")&&(u.prototype.alignDataLabel=a)}})(D||(D={}));let qM=D,{extend:GM,merge:XM}=Q;class zb extends Pp{}zb.defaultOptions=XM(Pp.defaultOptions,{}),GM(zb.prototype,{inverted:!0}),yn.registerSeriesType("bar",zb);let{column:KM,line:Uw}=yn.seriesTypes,{addEvent:JM,extend:QM,merge:ZM}=Q;class Ip extends Uw{applyJitter(){let a=this,u=this.options.jitter,d=this.points.length;u&&this.points.forEach(function(p,m){["x","y"].forEach(function(b,_){if(u[b]&&!p.isNull){let w=`plot${b.toUpperCase()}`,S=a[`${b}Axis`],N=u[b]*S.transA;if(S&&!S.logarithmic){let T=Math.max(0,(p[w]||0)-N),U=Math.min(S.len,(p[w]||0)+N);p[w]=T+(U-T)*(function(Y){let se=1e4*Math.sin(Y);return se-Math.floor(se)})(m+_*d),b==="x"&&(p.clientX=p.plotX)}}})})}drawGraph(){this.options.lineWidth?super.drawGraph():this.graph&&(this.graph=this.graph.destroy())}}Ip.defaultOptions=ZM(Uw.defaultOptions,{lineWidth:0,findNearestPointBy:"xy",jitter:{x:0,y:0},marker:{enabled:!0},tooltip:{headerFormat:'<span style="color:{point.color}">â</span> <span style="font-size: 0.8em"> {series.name}</span><br/>',pointFormat:"x: <b>{point.x}</b><br/>y: <b>{point.y}</b><br/>"}}),QM(Ip.prototype,{drawTracker:KM.prototype.drawTracker,sorted:!1,requireSorting:!1,noSharedTooltip:!0,trackerGroups:["group","markerGroup","dataLabelsGroup"]}),JM(Ip,"afterTranslate",function(){this.applyJitter()}),yn.registerSeriesType("scatter",Ip);let{deg2rad:jw}=B,{fireEvent:eN,isNumber:Yb,pick:Mp,relativeLength:tN}=Q;(function(k){k.getCenter=function(){let a=this.options,u=this.chart,d=2*(a.slicedOffset||0),p=u.plotWidth-2*d,m=u.plotHeight-2*d,b=a.center,_=Math.min(p,m),w=a.thickness,S,N=a.size,T=a.innerSize||0,U,Y;typeof N=="string"&&(N=parseFloat(N)),typeof T=="string"&&(T=parseFloat(T));let se=[Mp(b==null?void 0:b[0],"50%"),Mp(b==null?void 0:b[1],"50%"),Mp(N&&N<0?void 0:a.size,"100%"),Mp(T&&T<0?void 0:a.innerSize||0,"0%")];for(!u.angular||this instanceof Zi||(se[3]=0),U=0;U<4;++U)Y=se[U],S=U<2||U===2&&/%$/.test(Y),se[U]=tN(Y,[p,m,_,se[2]][U])+(S?d:0);return se[3]>se[2]&&(se[3]=se[2]),Yb(w)&&2*w<se[2]&&w>0&&(se[3]=se[2]-2*w),eN(this,"afterGetCenter",{positions:se}),se},k.getStartAndEndRadians=function(a,u){let d=Yb(a)?a:0,p=Yb(u)&&u>d&&u-d<360?u:d+360;return{start:jw*(d+-90),end:jw*(p+-90)}}})(F||(F={}));let Hw=F,{setAnimation:sN}=mt,{addEvent:Ww,defined:nN,extend:iN,isNumber:rN,pick:aN,relativeLength:oN}=Q;class zw extends Ho{getConnectorPath(a){let u=a.dataLabelPosition,d=a.options||{},p=d.connectorShape,m=this.connectorShapes[p]||p;return u&&m.call(this,{...u.computed,alignment:u.alignment},u.connectorPosition,d)||[]}getTranslate(){return this.sliced&&this.slicedTranslation||{translateX:0,translateY:0}}haloPath(a){let u=this.shapeArgs;return this.sliced||!this.visible?[]:this.series.chart.renderer.symbols.arc(u.x,u.y,u.r+a,u.r+a,{innerR:u.r-1,start:u.start,end:u.end,borderRadius:u.borderRadius})}constructor(a,u,d){super(a,u,d),this.half=0,this.name??(this.name=a.chart.options.lang.pieSliceName);let p=m=>{this.slice(m.type==="select")};Ww(this,"select",p),Ww(this,"unselect",p)}isValid(){return rN(this.y)&&this.y>=0}setVisible(a,u=!0){a!==this.visible&&this.update({visible:a??!this.visible},u,void 0,!1)}slice(a,u,d){let p=this.series;sN(d,p.chart),u=aN(u,!0),this.sliced=this.options.sliced=a=nN(a)?a:!this.sliced,p.options.data[p.data.indexOf(this)]=this.options,this.graphic&&this.graphic.animate(this.getTranslate())}}iN(zw.prototype,{connectorShapes:{fixedOffset:function(k,a,u){let d=a.breakAt,p=a.touchingSliceAt,m=u.softConnector?["C",k.x+(k.alignment==="left"?-5:5),k.y,2*d.x-p.x,2*d.y-p.y,d.x,d.y]:["L",d.x,d.y];return[["M",k.x,k.y],m,["L",p.x,p.y]]},straight:function(k,a){let u=a.touchingSliceAt;return[["M",k.x,k.y],["L",u.x,u.y]]},crookedLine:function(k,a,u){let{angle:d=this.angle||0,breakAt:p,touchingSliceAt:m}=a,{series:b}=this,[_,w,S]=b.center,N=S/2,{plotLeft:T,plotWidth:U}=b.chart,Y=k.alignment==="left",{x:se,y:de}=k,ue=p.x;if(u.crookDistance){let me=oN(u.crookDistance,1);ue=Y?_+N+(U+T-_-N)*(1-me):T+(_-N)*me}else ue=_+(w-de)*Math.tan(d-Math.PI/2);let le=[["M",se,de]];return(Y?ue<=se&&ue>=p.x:ue>=se&&ue<=p.x)&&le.push(["L",ue,de]),le.push(["L",p.x,p.y],["L",m.x,m.y]),le}}});let{getStartAndEndRadians:lN}=Hw,{noop:Yw}=B,{clamp:uN,extend:cN,fireEvent:qw,merge:qb,pick:dN}=Q;class Gb extends Zi{animate(a){let u=this,d=u.points,p=u.startAngleRad;a||d.forEach(function(m){let b=m.graphic,_=m.shapeArgs;b&&_&&(b.attr({r:dN(m.startR,u.center&&u.center[3]/2),start:p,end:p}),b.animate({r:_.r,start:_.start,end:_.end},u.options.animation))})}drawEmpty(){let a,u,d=this.startAngleRad,p=this.endAngleRad,m=this.options;this.total===0&&this.center?(a=this.center[0],u=this.center[1],this.graph||(this.graph=this.chart.renderer.arc(a,u,this.center[1]/2,0,d,p).addClass("highcharts-empty-series").add(this.group)),this.graph.attr({d:Jf.arc(a,u,this.center[2]/2,0,{start:d,end:p,innerR:this.center[3]/2})}),this.chart.styledMode||this.graph.attr({"stroke-width":m.borderWidth,fill:m.fillColor||"none",stroke:m.color||"#cccccc"})):this.graph&&(this.graph=this.graph.destroy())}drawPoints(){let a=this.chart.renderer;this.points.forEach(function(u){u.graphic&&u.hasNewShapeType()&&(u.graphic=u.graphic.destroy()),u.graphic||(u.graphic=a[u.shapeType](u.shapeArgs).add(u.series.group),u.delayedRendering=!0)})}generatePoints(){super.generatePoints(),this.updateTotals()}getX(a,u,d,p){let m=this.center,b=this.radii?this.radii[d.index]||0:m[2]/2,_=p.dataLabelPosition,w=(_==null?void 0:_.distance)||0,S=Math.asin(uN((a-m[1])/(b+w),-1,1));return m[0]+Math.cos(S)*(b+w)*(u?-1:1)+(w>0?(u?-1:1)*(p.padding||0):0)}hasData(){return this.points.some(a=>a.visible)}redrawPoints(){let a,u,d,p,m=this,b=m.chart;this.drawEmpty(),m.group&&!b.styledMode&&m.group.shadow(m.options.shadow),m.points.forEach(function(_){let w={};u=_.graphic,!_.isNull&&u?(p=_.shapeArgs,a=_.getTranslate(),b.styledMode||(d=m.pointAttribs(_,_.selected&&"select")),_.delayedRendering?(u.setRadialReference(m.center).attr(p).attr(a),b.styledMode||u.attr(d).attr({"stroke-linejoin":"round"}),_.delayedRendering=!1):(u.setRadialReference(m.center),b.styledMode||qb(!0,w,d),qb(!0,w,p,a),u.animate(w)),u.attr({visibility:_.visible?"inherit":"hidden"}),u.addClass(_.getClassName(),!0)):u&&(_.graphic=u.destroy())})}sortByAngle(a,u){a.sort(function(d,p){return d.angle!==void 0&&(p.angle-d.angle)*u})}translate(a){qw(this,"translate"),this.generatePoints();let u=this.options,d=u.slicedOffset,p=lN(u.startAngle,u.endAngle),m=this.startAngleRad=p.start,b=(this.endAngleRad=p.end)-m,_=this.points,w=u.ignoreHiddenPoint,S=_.length,N,T,U,Y,se,de,ue,le=0;for(a||(this.center=a=this.getCenter()),de=0;de<S;de++){ue=_[de],N=m+le*b,ue.isValid()&&(!w||ue.visible)&&(le+=ue.percentage/100),T=m+le*b;let me={x:a[0],y:a[1],r:a[2]/2,innerR:a[3]/2,start:Math.round(1e3*N)/1e3,end:Math.round(1e3*T)/1e3};ue.shapeType="arc",ue.shapeArgs=me,(U=(T+N)/2)>1.5*Math.PI?U-=2*Math.PI:U<-Math.PI/2&&(U+=2*Math.PI),ue.slicedTranslation={translateX:Math.round(Math.cos(U)*d),translateY:Math.round(Math.sin(U)*d)},Y=Math.cos(U)*a[2]/2,se=Math.sin(U)*a[2]/2,ue.tooltipPos=[a[0]+.7*Y,a[1]+.7*se],ue.half=+(U<-Math.PI/2||U>Math.PI/2),ue.angle=U}qw(this,"afterTranslate")}updateTotals(){let a=this.points,u=a.length,d=this.options.ignoreHiddenPoint,p,m,b=0;for(p=0;p<u;p++)(m=a[p]).isValid()&&(!d||m.visible)&&(b+=m.y);for(p=0,this.total=b;p<u;p++)(m=a[p]).percentage=b>0&&(m.visible||!d)?m.y/b*100:0,m.total=b}}Gb.defaultOptions=qb(Zi.defaultOptions,{borderRadius:3,center:[null,null],clip:!1,colorByPoint:!0,dataLabels:{connectorPadding:5,connectorShape:"crookedLine",crookDistance:void 0,distance:30,enabled:!0,formatter:function(){return this.isNull?void 0:this.name},softConnector:!0,x:0},fillColor:void 0,ignoreHiddenPoint:!0,inactiveOtherPoints:!0,legendType:"point",marker:null,size:null,showInLegend:!1,slicedOffset:10,stickyTracking:!1,tooltip:{followPointer:!0},borderColor:"#ffffff",borderWidth:1,lineWidth:void 0,states:{hover:{brightness:.1}}}),cN(Gb.prototype,{axisTypes:[],directTouch:!0,drawGraph:void 0,drawTracker:Pp.prototype.drawTracker,getCenter:Hw.getCenter,getSymbol:Yw,invertible:!1,isCartesian:!1,noSharedTooltip:!0,pointAttribs:Pp.prototype.pointAttribs,pointClass:zw,requireSorting:!1,searchPoint:Yw,trackerGroups:["group","dataLabelsGroup"]}),yn.registerSeriesType("pie",Gb);let{composed:hN,noop:fN}=B,{distribute:pN}=Ju,{series:Gw}=yn,{arrayMax:mN,clamp:Xw,defined:Kw,isNumber:gN,pick:vN,pushUnique:bN,relativeLength:Jw}=Q;(function(k){let a={radialDistributionY:function(b,_){var w;return(((w=_.dataLabelPosition)==null?void 0:w.top)||0)+b.distributeBox.pos},radialDistributionX:function(b,_,w,S,N){let T=N.dataLabelPosition;return b.getX(w<((T==null?void 0:T.top)||0)+2||w>((T==null?void 0:T.bottom)||0)-2?S:w,_.half,_,N)},justify:function(b,_,w,S){var N;return S[0]+(b.half?-1:1)*(w+(((N=_.dataLabelPosition)==null?void 0:N.distance)||0))},alignToPlotEdges:function(b,_,w,S){let N=b.getBBox().width;return _?N+S:w-N-S},alignToConnectors:function(b,_,w,S){let N=0,T;return b.forEach(function(U){(T=U.dataLabel.getBBox().width)>N&&(N=T)}),_?N+S:w-N-S}};function u(b,_){let w=Math.PI/2,{start:S=0,end:N=0}=b.shapeArgs||{},T=b.angle||0;_>0&&S<w&&N>w&&T>w/2&&T<1.5*w&&(T=T<=w?Math.max(w/2,(S+w)/2):Math.min(1.5*w,(w+N)/2));let{center:U,options:Y}=this,se=U[2]/2,de=Math.cos(T),ue=Math.sin(T),le=U[0]+de*se,me=U[1]+ue*se,ye=Math.min((Y.slicedOffset||0)+(Y.borderWidth||0),_/5);return{natural:{x:le+de*_,y:me+ue*_},computed:{},alignment:_<0?"center":b.half?"right":"left",connectorPosition:{angle:T,breakAt:{x:le+de*ye,y:me+ue*ye},touchingSliceAt:{x:le,y:me}},distance:_}}function d(){var Ge;let b=this,_=b.points,w=b.chart,S=w.plotWidth,N=w.plotHeight,T=w.plotLeft,U=Math.round(w.chartWidth/3),Y=b.center,se=Y[2]/2,de=Y[1],ue=[[],[]],le=[0,0,0,0],me=b.dataLabelPositioners,ye,Le,De,Ie=0;b.visible&&((Ge=b.hasDataLabels)!=null&&Ge.call(b))&&(_.forEach(Ue=>{(Ue.dataLabels||[]).forEach(qe=>{qe.shortened&&(qe.attr({width:"auto"}).css({width:"auto",textOverflow:"clip"}),qe.shortened=!1)})}),Gw.prototype.drawDataLabels.apply(b),_.forEach(Ue=>{(Ue.dataLabels||[]).forEach((qe,rt)=>{var Rt;let dt=Y[2]/2,xt=qe.options,Et=Jw((xt==null?void 0:xt.distance)||0,dt);rt===0&&ue[Ue.half].push(Ue),!Kw((Rt=xt==null?void 0:xt.style)==null?void 0:Rt.width)&&qe.getBBox().width>U&&(qe.css({width:Math.round(.7*U)+"px"}),qe.shortened=!0),qe.dataLabelPosition=this.getDataLabelPosition(Ue,Et),Ie=Math.max(Ie,Et)})}),ue.forEach((Ue,qe)=>{let rt=Ue.length,dt=[],xt,Et,Rt=0,It;rt&&(b.sortByAngle(Ue,qe-.5),Ie>0&&(xt=Math.max(0,de-se-Ie),Et=Math.min(de+se+Ie,w.plotHeight),Ue.forEach(jt=>{(jt.dataLabels||[]).forEach(Ct=>{var hs;let Wt=Ct.dataLabelPosition;Wt&&Wt.distance>0&&(Wt.top=Math.max(0,de-se-Wt.distance),Wt.bottom=Math.min(de+se+Wt.distance,w.plotHeight),Rt=Ct.getBBox().height||21,Ct.lineHeight=w.renderer.fontMetrics(Ct.text||Ct).h+2*Ct.padding,jt.distributeBox={target:(((hs=Ct.dataLabelPosition)==null?void 0:hs.natural.y)||0)-Wt.top+Ct.lineHeight/2,size:Rt,rank:jt.y},dt.push(jt.distributeBox))})}),pN(dt,It=Et+Rt-xt,It/5)),Ue.forEach(jt=>{(jt.dataLabels||[]).forEach(Ct=>{let Wt=Ct.options||{},hs=jt.distributeBox,Ss=Ct.dataLabelPosition,Ts=(Ss==null?void 0:Ss.natural.y)||0,ai=Wt.connectorPadding||0,xs=Ct.lineHeight||21,Vs=(xs-Ct.getBBox().height)/2,as=0,Zt=Ts,En="inherit";if(Ss){if(dt&&Kw(hs)&&Ss.distance>0&&(hs.pos===void 0?En="hidden":(De=hs.size,Zt=me.radialDistributionY(jt,Ct))),Wt.justify)as=me.justify(jt,Ct,se,Y);else switch(Wt.alignTo){case"connectors":as=me.alignToConnectors(Ue,qe,S,T);break;case"plotEdges":as=me.alignToPlotEdges(Ct,qe,S,T);break;default:as=me.radialDistributionX(b,jt,Zt-Vs,Ts,Ct)}if(Ss.attribs={visibility:En,align:Ss.alignment},Ss.posAttribs={x:as+(Wt.x||0)+({left:ai,right:-ai}[Ss.alignment]||0),y:Zt+(Wt.y||0)-xs/2},Ss.computed.x=as,Ss.computed.y=Zt-Vs,vN(Wt.crop,!0)){let Bs;as-(Le=Ct.getBBox().width)<ai&&qe===1?(Bs=Math.round(Le-as+ai),le[3]=Math.max(Bs,le[3])):as+Le>S-ai&&qe===0&&(Bs=Math.round(as+Le-S+ai),le[1]=Math.max(Bs,le[1])),Zt-De/2<0?le[0]=Math.max(Math.round(-Zt+De/2),le[0]):Zt+De/2>N&&(le[2]=Math.max(Math.round(Zt+De/2-N),le[2])),Ss.sideOverflow=Bs}}})}))}),(mN(le)===0||this.verifyDataLabelOverflow(le))&&(this.placeDataLabels(),this.points.forEach(Ue=>{(Ue.dataLabels||[]).forEach(qe=>{var Et;let{connectorColor:rt,connectorWidth:dt=1}=qe.options||{},xt=qe.dataLabelPosition;if(gN(dt)){let Rt;ye=qe.connector,xt&&xt.distance>0?(Rt=!ye,ye||(qe.connector=ye=w.renderer.path().addClass("highcharts-data-label-connector highcharts-color-"+Ue.colorIndex+(Ue.className?" "+Ue.className:"")).add(b.dataLabelsGroup)),w.styledMode||ye.attr({"stroke-width":dt,stroke:rt||Ue.color||"#666666"}),ye[Rt?"attr":"animate"]({d:Ue.getConnectorPath(qe)}),ye.attr({visibility:(Et=xt.attribs)==null?void 0:Et.visibility})):ye&&(qe.connector=ye.destroy())}})})))}function p(){this.points.forEach(b=>{(b.dataLabels||[]).forEach(_=>{var S,N;let w=_.dataLabelPosition;w?(w.sideOverflow&&(_.css({width:Math.max(_.getBBox().width-w.sideOverflow,0)+"px",textOverflow:((N=(S=_.options)==null?void 0:S.style)==null?void 0:N.textOverflow)||"ellipsis"}),_.shortened=!0),_.attr(w.attribs),_[_.moved?"animate":"attr"](w.posAttribs),_.moved=!0):_&&_.attr({y:-9999})}),delete b.distributeBox},this)}function m(b){let _=this.center,w=this.options,S=w.center,N=w.minSize||80,T=N,U=w.size!==null;return!U&&(S[0]!==null?T=Math.max(_[2]-Math.max(b[1],b[3]),N):(T=Math.max(_[2]-b[1]-b[3],N),_[0]+=(b[3]-b[1])/2),S[1]!==null?T=Xw(T,N,_[2]-Math.max(b[0],b[2])):(T=Xw(T,N,_[2]-b[0]-b[2]),_[1]+=(b[0]-b[2])/2),T<_[2]?(_[2]=T,_[3]=Math.min(w.thickness?Math.max(0,T-2*w.thickness):Math.max(0,Jw(w.innerSize||0,T)),T),this.translate(_),this.drawDataLabels&&this.drawDataLabels()):U=!0),U}k.compose=function(b){if($p.compose(Gw),bN(hN,"PieDataLabel")){let _=b.prototype;_.dataLabelPositioners=a,_.alignDataLabel=fN,_.drawDataLabels=d,_.getDataLabelPosition=u,_.placeDataLabels=p,_.verifyDataLabelOverflow=m}}})(C||(C={}));let yN=C;(function(k){k.getCenterOfPoints=function(a){let u=a.reduce((d,p)=>(d.x+=p.x,d.y+=p.y,d),{x:0,y:0});return{x:u.x/a.length,y:u.y/a.length}},k.getDistanceBetweenPoints=function(a,u){return Math.sqrt(Math.pow(u.x-a.x,2)+Math.pow(u.y-a.y,2))},k.getAngleBetweenPoints=function(a,u){return Math.atan2(u.x-a.x,u.y-a.y)},k.pointInPolygon=function({x:a,y:u},d){let p=d.length,m,b,_=!1;for(m=0,b=p-1;m<p;b=m++){let[w,S]=d[m],[N,T]=d[b];S>u!=T>u&&a<(N-w)*(u-S)/(T-S)+w&&(_=!_)}return _}})(A||(A={}));let{pointInPolygon:_N}=A,{addEvent:xN,getAlignFactor:wN,fireEvent:Qw,objectEach:Zw,pick:EN}=Q;function SN(k){let a=k.length,u=(N,T)=>!(T.x>=N.x+N.width||T.x+T.width<=N.x||T.y>=N.y+N.height||T.y+T.height<=N.y),d=(N,T)=>{for(let U of N)if(_N({x:U[0],y:U[1]},T))return!0;return!1},p,m,b,_,w,S=!1;for(let N=0;N<a;N++)(p=k[N])&&(p.oldOpacity=p.opacity,p.newOpacity=1,p.absoluteBox=(function(T){var U,Y;if(T&&(!T.alignAttr||T.placed)){let se=T.box?0:T.padding||0,de=T.alignAttr||{x:T.attr("x"),y:T.attr("y")},{height:ue,polygon:le,width:me}=T.getBBox(),ye=wN(T.alignValue)*me;return T.width=me,T.height=ue,{x:de.x+(((U=T.parentGroup)==null?void 0:U.translateX)||0)+se-ye,y:de.y+(((Y=T.parentGroup)==null?void 0:Y.translateY)||0)+se,width:me-2*se,height:ue-2*se,polygon:le}}})(p));k.sort((N,T)=>(T.labelrank||0)-(N.labelrank||0));for(let N=0;N<a;++N){_=(m=k[N])&&m.absoluteBox;let T=_==null?void 0:_.polygon;for(let U=N+1;U<a;++U){w=(b=k[U])&&b.absoluteBox;let Y=!1;if(_&&w&&m!==b&&m.newOpacity!==0&&b.newOpacity!==0&&m.visibility!=="hidden"&&b.visibility!=="hidden"){let se=w.polygon;if(T&&se&&T!==se?d(T,se)&&(Y=!0):u(_,w)&&(Y=!0),Y){let de=m.labelrank<b.labelrank?m:b,ue=de.text;de.newOpacity=0,ue!=null&&ue.element.querySelector("textPath")&&ue.hide()}}}}for(let N of k)eE(N,this)&&(S=!0);S&&Qw(this,"afterHideAllOverlappingLabels")}function eE(k,a){let u,d=!1;return k&&(u=k.newOpacity,k.oldOpacity!==u&&(k.hasClass("highcharts-data-label")?(k[u?"removeClass":"addClass"]("highcharts-data-label-hidden"),d=!0,k[k.isOld?"animate":"attr"]({opacity:u},void 0,function(){a.styledMode||k.css({pointerEvents:u?"auto":"none"})}),Qw(a,"afterHideOverlappingLabel")):k.attr({opacity:u})),k.isOld=!0),d}function kN(){var u;let k=this,a=[];for(let d of k.labelCollectors||[])a=a.concat(d());for(let d of k.yAxis||[])d.stacking&&d.options.stackLabels&&!d.options.stackLabels.allowOverlap&&Zw(d.stacking.stacks,p=>{Zw(p,m=>{m.label&&a.push(m.label)})});for(let d of k.series||[])if(d.visible&&((u=d.hasDataLabels)!=null&&u.call(d))){let p=m=>{for(let b of m)b.visible&&(b.dataLabels||[]).forEach(_=>{var S;let w=_.options||{};_.labelrank=EN(w.labelrank,b.labelrank,(S=b.shapeArgs)==null?void 0:S.height),w.allowOverlap??Number(w.distance)>0?(_.oldOpacity=_.opacity,_.newOpacity=1,eE(_,k)):a.push(_)})};p(d.nodes||[]),p(d.points)}this.hideOverlappingLabels(a)}let tE={compose:function(k){let a=k.prototype;a.hideOverlappingLabels||(a.hideOverlappingLabels=SN,xN(k,"render",kN))}},{defaultOptions:CN}=He,{noop:sE}=B,{addEvent:nE,extend:TN,isObject:iE,merge:AN,relativeLength:Xb}=Q,ON={radius:0,scope:"stack",where:void 0},rE=sE,aE=sE;function DN(k,a,u,d,p={}){let m=rE(k,a,u,d,p),{brStart:b=!0,brEnd:_=!0,innerR:w=0,r:S=u,start:N=0,end:T=0}=p;if(p.open||!p.borderRadius)return m;let U=T-N,Y=Math.sin(U/2),se=Math.max(Math.min(Xb(p.borderRadius||0,S-w),(S-w)/2,S*Y/(1+Y)),0),de=Math.min(se,U/Math.PI*2*w),ue=m.length-1;for(;ue--;)(b||ue!==0&&ue!==3)&&(_||ue!==1&&ue!==2)&&(function(le,me,ye){let Le,De,Ie,Ge=le[me],Ue=le[me+1];if(Ue[0]==="Z"&&(Ue=le[0]),(Ge[0]==="M"||Ge[0]==="L")&&Ue[0]==="A"?(Le=Ge,De=Ue,Ie=!0):Ge[0]==="A"&&(Ue[0]==="M"||Ue[0]==="L")&&(Le=Ue,De=Ge),Le&&De&&De.params){let qe=De[1],rt=De[5],dt=De.params,{start:xt,end:Et,cx:Rt,cy:It}=dt,jt=rt?qe-ye:qe+ye,Ct=jt?Math.asin(ye/jt):0,Wt=rt?Ct:-Ct,hs=Math.cos(Ct)*jt;Ie?(dt.start=xt+Wt,Le[1]=Rt+hs*Math.cos(xt),Le[2]=It+hs*Math.sin(xt),le.splice(me+1,0,["A",ye,ye,0,0,1,Rt+qe*Math.cos(dt.start),It+qe*Math.sin(dt.start)])):(dt.end=Et-Wt,De[6]=Rt+qe*Math.cos(dt.end),De[7]=It+qe*Math.sin(dt.end),le.splice(me+1,0,["A",ye,ye,0,0,1,Rt+hs*Math.cos(Et),It+hs*Math.sin(Et)])),De[4]=Math.abs(dt.end-dt.start)<Math.PI?0:1}})(m,ue,ue>1?de:se);return m}function PN(){var k,a;if(this.options.borderRadius&&!(this.chart.is3d&&this.chart.is3d())){let{options:u,yAxis:d}=this,p=u.stacking==="percent",m=(a=(k=CN.plotOptions)==null?void 0:k[this.type])==null?void 0:a.borderRadius,b=Kb(u.borderRadius,iE(m)?m:{}),_=d.options.reversed;for(let w of this.points){let{shapeArgs:S}=w;if(w.shapeType==="roundedRect"&&S){let{width:N=0,height:T=0,y:U=0}=S,Y=U,se=T;if(b.scope==="stack"&&w.stackTotal){let me=d.translate(p?100:w.stackTotal,!1,!0,!1,!0),ye=d.translate(u.threshold||0,!1,!0,!1,!0),Le=this.crispCol(0,Math.min(me,ye),0,Math.abs(me-ye));Y=Le.y,se=Le.height}let de=(w.negative?-1:1)*(_?-1:1)==-1,ue=b.where;!ue&&this.is("waterfall")&&Math.abs((w.yBottom||0)-(this.translatedThreshold||0))>this.borderWidth&&(ue="all"),ue||(ue="end");let le=Math.min(Xb(b.radius,N),N/2,ue==="all"?T/2:1/0)||0;ue==="end"&&(de&&(Y-=le),se+=le),TN(S,{brBoxHeight:se,brBoxY:Y,r:le})}}}}function Kb(k,a){return iE(k)||(k={radius:k||0}),AN(ON,a,k)}function $N(){let k=Kb(this.options.borderRadius);for(let a of this.points){let u=a.shapeArgs;u&&(u.borderRadius=Xb(k.radius,(u.r||0)-(u.innerR||0)))}}function IN(k,a,u,d,p={}){let m=aE(k,a,u,d,p),{r:b=0,brBoxHeight:_=d,brBoxY:w=a}=p,S=a-w,N=w+_-(a+d),T=S-b>-.1?0:b,U=N-b>-.1?0:b,Y=Math.max(T&&S,0),se=Math.max(U&&N,0),de=[k+T,a],ue=[k+u-T,a],le=[k+u,a+T],me=[k+u,a+d-U],ye=[k+u-U,a+d],Le=[k+U,a+d],De=[k,a+d-U],Ie=[k,a+T],Ge=(Ue,qe)=>Math.sqrt(Math.pow(Ue,2)-Math.pow(qe,2));if(Y){let Ue=Ge(T,T-Y);de[0]-=Ue,ue[0]+=Ue,le[1]=Ie[1]=a+T-Y}if(d<T-Y){let Ue=Ge(T,T-Y-d);le[0]=me[0]=k+u-T+Ue,ye[0]=Math.min(le[0],ye[0]),Le[0]=Math.max(me[0],Le[0]),De[0]=Ie[0]=k+T-Ue,le[1]=Ie[1]=a+d}if(se){let Ue=Ge(U,U-se);ye[0]+=Ue,Le[0]-=Ue,me[1]=De[1]=a+d-U+se}if(d<U-se){let Ue=Ge(U,U-se-d);le[0]=me[0]=k+u-U+Ue,ue[0]=Math.min(le[0],ue[0]),de[0]=Math.max(me[0],de[0]),De[0]=Ie[0]=k+U-Ue,me[1]=De[1]=a}return m.length=0,m.push(["M",...de],["L",...ue],["A",T,T,0,0,1,...le],["L",...me],["A",U,U,0,0,1,...ye],["L",...Le],["A",U,U,0,0,1,...De],["L",...Ie],["A",T,T,0,0,1,...de],["Z"]),m}let{diffObjects:MN,extend:NN,find:LN,merge:RN,pick:Np,uniqueKey:FN}=Q;(function(k){function a(d,p){let m=d.condition;(m.callback||function(){return this.chartWidth<=Np(m.maxWidth,Number.MAX_VALUE)&&this.chartHeight<=Np(m.maxHeight,Number.MAX_VALUE)&&this.chartWidth>=Np(m.minWidth,0)&&this.chartHeight>=Np(m.minHeight,0)}).call(this)&&p.push(d._id)}function u(d,p){let m=this.options.responsive,b=this.currentResponsive,_=[],w;
61!p&&m&&m.rules&&m.rules.forEach(T=>{T._id===void 0&&(T._id=FN()),this.matchResponsiveRule(T,_)},this);let S=RN(..._.map(T=>LN((m==null?void 0:m.rules)||[],U=>U._id===T)).map(T=>T==null?void 0:T.chartOptions));S.isResponsiveOptions=!0,_=_.toString()||void 0;let N=b==null?void 0:b.ruleIds;_!==N&&(b&&(this.currentResponsive=void 0,this.updatingResponsive=!0,this.update(b.undoOptions,d,!0),this.updatingResponsive=!1),_?((w=MN(S,this.options,!0,this.collectionsWithUpdate)).isResponsiveOptions=!0,this.currentResponsive={ruleIds:_,mergedOptions:S,undoOptions:w},this.updatingResponsive||this.update(S,d,!0)):this.currentResponsive=void 0)}k.compose=function(d){let p=d.prototype;return p.matchResponsiveRule||NN(p,{matchResponsiveRule:a,setResponsive:u}),d}})(O||(O={}));let VN=O;B.AST=qs,B.Axis=lc,B.Chart=qo,B.Color=gs,B.DataLabel=$p,B.DataTableCore=bp,B.Fx=Ln,B.HTMLElement=ac,B.Legend=pw,B.LegendSymbol=ew,B.OverlappingDataLabels=B.OverlappingDataLabels||tE,B.PlotLineOrBand=fp,B.Point=Ho,B.Pointer=Jx,B.RendererRegistry=Ll,B.Series=Zi,B.SeriesRegistry=yn,B.StackItem=Cw,B.SVGElement=Zr,B.SVGRenderer=np,B.Templating=ti,B.Tick=oc,B.Time=Oe,B.Tooltip=Yx,B.animate=mt.animate,B.animObject=mt.animObject,B.chart=qo.chart,B.color=gs.parse,B.dateFormat=ti.dateFormat,B.defaultOptions=He.defaultOptions,B.distribute=Ju.distribute,B.format=ti.format,B.getDeferredAnimation=mt.getDeferredAnimation,B.getOptions=He.getOptions,B.numberFormat=ti.numberFormat,B.seriesType=yn.seriesType,B.setAnimation=mt.setAnimation,B.setOptions=He.setOptions,B.stop=mt.stop,B.time=He.defaultTime,B.timers=Ln.timers,{compose:function(k,a,u){let d=k.types.pie;if(!a.symbolCustomAttribs.includes("borderRadius")){let p=u.prototype.symbols;nE(k,"afterColumnTranslate",PN,{order:9}),nE(d,"afterTranslate",$N),a.symbolCustomAttribs.push("borderRadius","brBoxHeight","brBoxY","brEnd","brStart"),rE=p.arc,aE=p.roundedRect,p.arc=DN,p.roundedRect=IN}},optionsToObject:Kb}.compose(B.Series,B.SVGElement,B.SVGRenderer),qM.compose(B.Series.types.column),$p.compose(B.Series),T$.compose(B.Axis),ac.compose(B.SVGRenderer),pw.compose(B.Chart),D$.compose(B.Axis),tE.compose(B.Chart),yN.compose(B.Series.types.pie),fp.compose(B.Chart,B.Axis),Jx.compose(B.Chart),VN.compose(B.Chart),zd.compose(B.Axis,B.Chart,B.Series),CM.compose(B.Axis,B.Chart,B.Series),Yx.compose(B.Pointer),Q.extend(B,Q);let BN=B;return te.default})())})(km)),km.exports}var U0e=AD();const oC=fd(U0e);var o0={exports:{}},l0={exports:{}},u0={};/** 62* @vue/compiler-core v3.5.24 63* (c) 2018-present Yuxi (Evan) You and Vue contributors 64* @license MIT
vendor: 17,506 bytes, line 65
65**/const id=Symbol(""),jc=Symbol(""),dv=Symbol(""),ef=Symbol(""),z_=Symbol(""),xl=Symbol(""),Y_=Symbol(""),q_=Symbol(""),hv=Symbol(""),fv=Symbol(""),xd=Symbol(""),pv=Symbol(""),G_=Symbol(""),mv=Symbol(""),gv=Symbol(""),vv=Symbol(""),bv=Symbol(""),yv=Symbol(""),_v=Symbol(""),X_=Symbol(""),K_=Symbol(""),If=Symbol(""),tf=Symbol(""),xv=Symbol(""),wv=Symbol(""),rd=Symbol(""),wd=Symbol(""),Ev=Symbol(""),pg=Symbol(""),OD=Symbol(""),mg=Symbol(""),sf=Symbol(""),DD=Symbol(""),PD=Symbol(""),Sv=Symbol(""),$D=Symbol(""),ID=Symbol(""),kv=Symbol(""),J_=Symbol(""),Lu={[id]:"Fragment",[jc]:"Teleport",[dv]:"Suspense",[ef]:"KeepAlive",[z_]:"BaseTransition",[xl]:"openBlock",[Y_]:"createBlock",[q_]:"createElementBlock",[hv]:"createVNode",[fv]:"createElementVNode",[xd]:"createCommentVNode",[pv]:"createTextVNode",[G_]:"createStaticVNode",[mv]:"resolveComponent",[gv]:"resolveDynamicComponent",[vv]:"resolveDirective",[bv]:"resolveFilter",[yv]:"withDirectives",[_v]:"renderList",[X_]:"renderSlot",[K_]:"createSlots",[If]:"toDisplayString",[tf]:"mergeProps",[xv]:"normalizeClass",[wv]:"normalizeStyle",[rd]:"normalizeProps",[wd]:"guardReactiveProps",[Ev]:"toHandlers",[pg]:"camelize",[OD]:"capitalize",[mg]:"toHandlerKey",[sf]:"setBlockTracking",[DD]:"pushScopeId",[PD]:"popScopeId",[Sv]:"withCtx",[$D]:"unref",[ID]:"isRef",[kv]:"withMemo",[J_]:"isMemoSame"};function MD(t){Object.getOwnPropertySymbols(t).forEach(e=>{Lu[e]=t[e]})}const j0e={HTML:0,0:"HTML",SVG:1,1:"SVG",MATH_ML:2,2:"MATH_ML"},H0e={ROOT:0,0:"ROOT",ELEMENT:1,1:"ELEMENT",TEXT:2,2:"TEXT",COMMENT:3,3:"COMMENT",SIMPLE_EXPRESSION:4,4:"SIMPLE_EXPRESSION",INTERPOLATION:5,5:"INTERPOLATION",ATTRIBUTE:6,6:"ATTRIBUTE",DIRECTIVE:7,7:"DIRECTIVE",COMPOUND_EXPRESSION:8,8:"COMPOUND_EXPRESSION",IF:9,9:"IF",IF_BRANCH:10,10:"IF_BRANCH",FOR:11,11:"FOR",TEXT_CALL:12,12:"TEXT_CALL",VNODE_CALL:13,13:"VNODE_CALL",JS_CALL_EXPRESSION:14,14:"JS_CALL_EXPRESSION",JS_OBJECT_EXPRESSION:15,15:"JS_OBJECT_EXPRESSION",JS_PROPERTY:16,16:"JS_PROPERTY",JS_ARRAY_EXPRESSION:17,17:"JS_ARRAY_EXPRESSION",JS_FUNCTION_EXPRESSION:18,18:"JS_FUNCTION_EXPRESSION",JS_CONDITIONAL_EXPRESSION:19,19:"JS_CONDITIONAL_EXPRESSION",JS_CACHE_EXPRESSION:20,20:"JS_CACHE_EXPRESSION",JS_BLOCK_STATEMENT:21,21:"JS_BLOCK_STATEMENT",JS_TEMPLATE_LITERAL:22,22:"JS_TEMPLATE_LITERAL",JS_IF_STATEMENT:23,23:"JS_IF_STATEMENT",JS_ASSIGNMENT_EXPRESSION:24,24:"JS_ASSIGNMENT_EXPRESSION",JS_SEQUENCE_EXPRESSION:25,25:"JS_SEQUENCE_EXPRESSION",JS_RETURN_STATEMENT:26,26:"JS_RETURN_STATEMENT"},W0e={ELEMENT:0,0:"ELEMENT",COMPONENT:1,1:"COMPONENT",SLOT:2,2:"SLOT",TEMPLATE:3,3:"TEMPLATE"},z0e={NOT_CONSTANT:0,0:"NOT_CONSTANT",CAN_SKIP_PATCH:1,1:"CAN_SKIP_PATCH",CAN_CACHE:2,2:"CAN_CACHE",CAN_STRINGIFY:3,3:"CAN_STRINGIFY"},ei={start:{line:1,column:1,offset:0},end:{line:1,column:1,offset:0},source:""};function ND(t,e=""){return{type:0,source:e,children:t,helpers:new Set,components:[],directives:[],hoists:[],imports:[],cached:[],temps:0,codegenNode:void 0,loc:ei}}function ad(t,e,s,n,i,o,r,c=!1,h=!1,f=!1,v=ei){return t&&(c?(t.helper(xl),t.helper(Vu(t.inSSR,f))):t.helper(Fu(t.inSSR,f)),r&&t.helper(yv)),{type:13,tag:e,props:s,children:n,patchFlag:i,dynamicProps:o,directives:r,isBlock:c,disableTracking:h,isComponent:f,loc:v}}function gl(t,e=ei){return{type:17,loc:e,elements:t}}function br(t,e=ei){return{type:15,loc:e,properties:t}}function jn(t,e){return{type:16,loc:ei,key:os(t)?ms(t,!0):t,value:e}}function ms(t,e=!1,s=ei,n=0){return{type:4,loc:s,content:t,isStatic:e,constType:e?3:n}}function Y0e(t,e){return{type:5,loc:e,content:os(t)?ms(t,!1,e):t}}function Br(t,e=ei){return{type:8,loc:e,children:t}}function zn(t,e=[],s=ei){return{type:14,loc:s,callee:t,arguments:e}}function Ru(t,e=void 0,s=!1,n=!1,i=ei){return{type:18,params:t,returns:e,newline:s,isSlot:n,loc:i}}function gg(t,e,s,n=!0){return{type:19,test:t,consequent:e,alternate:s,newline:n,loc:ei}}function LD(t,e,s=!1,n=!1){return{type:20,index:t,value:e,needPauseTracking:s,inVOnce:n,needArraySpread:!1,loc:ei}}function RD(t){return{type:21,body:t,loc:ei}}function q0e(t){return{type:22,elements:t,loc:ei}}function G0e(t,e,s){return{type:23,test:t,consequent:e,alternate:s,loc:ei}}function X0e(t,e){return{type:24,left:t,right:e,loc:ei}}function K0e(t){return{type:25,expressions:t,loc:ei}}function J0e(t){return{type:26,returns:t,loc:ei}}function Fu(t,e){return t||e?hv:fv}function Vu(t,e){return t||e?Y_:q_}function Cv(t,{helper:e,removeHelper:s,inSSR:n}){t.isBlock||(t.isBlock=!0,s(Fu(n,t.isComponent)),e(xl),e(Vu(n,t.isComponent)))}const lC=new Uint8Array([123,123]),uC=new Uint8Array([125,125]);function cC(t){return t>=97&&t<=122||t>=65&&t<=90}function pr(t){return t===32||t===10||t===9||t===12||t===13}function tl(t){return t===47||t===62||pr(t)}function vg(t){const e=new Uint8Array(t.length);for(let s=0;s<t.length;s++)e[s]=t.charCodeAt(s);return e}const yi={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]),TextareaEnd:new Uint8Array([60,47,116,101,120,116,97,114,101,97])};class Q0e{constructor(e,s){this.stack=e,this.cbs=s,this.state=1,this.buffer="",this.sectionStart=0,this.index=0,this.entityStart=0,this.baseState=1,this.inRCDATA=!1,this.inXML=!1,this.inVPre=!1,this.newlines=[],this.mode=0,this.delimiterOpen=lC,this.delimiterClose=uC,this.delimiterIndex=-1,this.currentSequence=void 0,this.sequenceIndex=0}get inSFCRoot(){return this.mode===2&&this.stack.length===0}reset(){this.state=1,this.mode=0,this.buffer="",this.sectionStart=0,this.index=0,this.baseState=1,this.inRCDATA=!1,this.currentSequence=void 0,this.newlines.length=0,this.delimiterOpen=lC,this.delimiterClose=uC}getPos(e){let s=1,n=e+1;for(let i=this.newlines.length-1;i>=0;i--){const o=this.newlines[i];if(e>o){s=i+2,n=e-o;break}}return{column:n,line:s,offset:e}}peek(){return this.buffer.charCodeAt(this.index+1)}stateText(e){e===60?(this.index>this.sectionStart&&this.cbs.ontext(this.sectionStart,this.index),this.state=5,this.sectionStart=this.index):!this.inVPre&&e===this.delimiterOpen[0]&&(this.state=2,this.delimiterIndex=0,this.stateInterpolationOpen(e))}stateInterpolationOpen(e){if(e===this.delimiterOpen[this.delimiterIndex])if(this.delimiterIndex===this.delimiterOpen.length-1){const s=this.index+1-this.delimiterOpen.length;s>this.sectionStart&&this.cbs.ontext(this.sectionStart,s),this.state=3,this.sectionStart=s}else this.delimiterIndex++;else this.inRCDATA?(this.state=32,this.stateInRCDATA(e)):(this.state=1,this.stateText(e))}stateInterpolation(e){e===this.delimiterClose[0]&&(this.state=4,this.delimiterIndex=0,this.stateInterpolationClose(e))}stateInterpolationClose(e){e===this.delimiterClose[this.delimiterIndex]?this.delimiterIndex===this.delimiterClose.length-1?(this.cbs.oninterpolation(this.sectionStart,this.index+1),this.inRCDATA?this.state=32:this.state=1,this.sectionStart=this.index+1):this.delimiterIndex++:(this.state=3,this.stateInterpolation(e))}stateSpecialStartSequence(e){const s=this.sequenceIndex===this.currentSequence.length;if(!(s?tl(e):(e|32)===this.currentSequence[this.sequenceIndex]))this.inRCDATA=!1;else if(!s){this.sequenceIndex++;return}this.sequenceIndex=0,this.state=6,this.stateInTagName(e)}stateInRCDATA(e){if(this.sequenceIndex===this.currentSequence.length){if(e===62||pr(e)){const s=this.index-this.currentSequence.length;if(this.sectionStart<s){const n=this.index;this.index=s,this.cbs.ontext(this.sectionStart,s),this.index=n}this.sectionStart=s+2,this.stateInClosingTagName(e),this.inRCDATA=!1;return}this.sequenceIndex=0}(e|32)===this.currentSequence[this.sequenceIndex]?this.sequenceIndex+=1:this.sequenceIndex===0?this.currentSequence===yi.TitleEnd||this.currentSequence===yi.TextareaEnd&&!this.inSFCRoot?!this.inVPre&&e===this.delimiterOpen[0]&&(this.state=2,this.delimiterIndex=0,this.stateInterpolationOpen(e)):this.fastForwardTo(60)&&(this.sequenceIndex=1):this.sequenceIndex=+(e===60)}stateCDATASequence(e){e===yi.Cdata[this.sequenceIndex]?++this.sequenceIndex===yi.Cdata.length&&(this.state=28,this.currentSequence=yi.CdataEnd,this.sequenceIndex=0,this.sectionStart=this.index+1):(this.sequenceIndex=0,this.state=23,this.stateInDeclaration(e))}fastForwardTo(e){for(;++this.index<this.buffer.length;){const s=this.buffer.charCodeAt(this.index);if(s===10&&this.newlines.push(this.index),s===e)return!0}return this.index=this.buffer.length-1,!1}stateInCommentLike(e){e===this.currentSequence[this.sequenceIndex]?++this.sequenceIndex===this.currentSequence.length&&(this.currentSequence===yi.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=1):this.sequenceIndex===0?this.fastForwardTo(this.currentSequence[0])&&(this.sequenceIndex=1):e!==this.currentSequence[this.sequenceIndex-1]&&(this.sequenceIndex=0)}startSpecial(e,s){this.enterRCDATA(e,s),this.state=31}enterRCDATA(e,s){this.inRCDATA=!0,this.currentSequence=e,this.sequenceIndex=s}stateBeforeTagName(e){e===33?(this.state=22,this.sectionStart=this.index+1):e===63?(this.state=24,this.sectionStart=this.index+1):cC(e)?(this.sectionStart=this.index,this.mode===0?this.state=6:this.inSFCRoot?this.state=34:this.inXML?this.state=6:e===116?this.state=30:this.state=e===115?29:6):e===47?this.state=8:(this.state=1,this.stateText(e))}stateInTagName(e){tl(e)&&this.handleTagName(e)}stateInSFCRootTagName(e){if(tl(e)){const s=this.buffer.slice(this.sectionStart,this.index);s!=="template"&&this.enterRCDATA(vg("</"+s),0),this.handleTagName(e)}}handleTagName(e){this.cbs.onopentagname(this.sectionStart,this.index),this.sectionStart=-1,this.state=11,this.stateBeforeAttrName(e)}stateBeforeClosingTagName(e){pr(e)||(e===62?(this.state=1,this.sectionStart=this.index+1):(this.state=cC(e)?9:27,this.sectionStart=this.index))}stateInClosingTagName(e){(e===62||pr(e))&&(this.cbs.onclosetag(this.sectionStart,this.index),this.sectionStart=-1,this.state=10,this.stateAfterClosingTagName(e))}stateAfterClosingTagName(e){e===62&&(this.state=1,this.sectionStart=this.index+1)}stateBeforeAttrName(e){e===62?(this.cbs.onopentagend(this.index),this.inRCDATA?this.state=32:this.state=1,this.sectionStart=this.index+1):e===47?this.state=7:e===60&&this.peek()===47?(this.cbs.onopentagend(this.index),this.state=5,this.sectionStart=this.index):pr(e)||this.handleAttrStart(e)}handleAttrStart(e){e===118&&this.peek()===45?(this.state=13,this.sectionStart=this.index):e===46||e===58||e===64||e===35?(this.cbs.ondirname(this.index,this.index+1),this.state=14,this.sectionStart=this.index+1):(this.state=12,this.sectionStart=this.index)}stateInSelfClosingTag(e){e===62?(this.cbs.onselfclosingtag(this.index),this.state=1,this.sectionStart=this.index+1,this.inRCDATA=!1):pr(e)||(this.state=11,this.stateBeforeAttrName(e))}stateInAttrName(e){(e===61||tl(e))&&(this.cbs.onattribname(this.sectionStart,this.index),this.handleAttrNameEnd(e))}stateInDirName(e){e===61||tl(e)?(this.cbs.ondirname(this.sectionStart,this.index),this.handleAttrNameEnd(e)):e===58?(this.cbs.ondirname(this.sectionStart,this.index),this.state=14,this.sectionStart=this.index+1):e===46&&(this.cbs.ondirname(this.sectionStart,this.index),this.state=16,this.sectionStart=this.index+1)}stateInDirArg(e){e===61||tl(e)?(this.cbs.ondirarg(this.sectionStart,this.index),this.handleAttrNameEnd(e)):e===91?this.state=15:e===46&&(this.cbs.ondirarg(this.sectionStart,this.index),this.state=16,this.sectionStart=this.index+1)}stateInDynamicDirArg(e){e===93?this.state=14:(e===61||tl(e))&&(this.cbs.ondirarg(this.sectionStart,this.index+1),this.handleAttrNameEnd(e))}stateInDirModifier(e){e===61||tl(e)?(this.cbs.ondirmodifier(this.sectionStart,this.index),this.handleAttrNameEnd(e)):e===46&&(this.cbs.ondirmodifier(this.sectionStart,this.index),this.sectionStart=this.index+1)}handleAttrNameEnd(e){this.sectionStart=this.index,this.state=17,this.cbs.onattribnameend(this.index),this.stateAfterAttrName(e)}stateAfterAttrName(e){e===61?this.state=18:e===47||e===62?(this.cbs.onattribend(0,this.sectionStart),this.sectionStart=-1,this.state=11,this.stateBeforeAttrName(e)):pr(e)||(this.cbs.onattribend(0,this.sectionStart),this.handleAttrStart(e))}stateBeforeAttrValue(e){e===34?(this.state=19,this.sectionStart=this.index+1):e===39?(this.state=20,this.sectionStart=this.index+1):pr(e)||(this.sectionStart=this.index,this.state=21,this.stateInAttrValueNoQuotes(e))}handleInAttrValue(e,s){(e===s||this.fastForwardTo(s))&&(this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=-1,this.cbs.onattribend(s===34?3:2,this.index+1),this.state=11)}stateInAttrValueDoubleQuotes(e){this.handleInAttrValue(e,34)}stateInAttrValueSingleQuotes(e){this.handleInAttrValue(e,39)}stateInAttrValueNoQuotes(e){pr(e)||e===62?(this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=-1,this.cbs.onattribend(1,this.index),this.state=11,this.stateBeforeAttrName(e)):(e===39||e===60||e===61||e===96)&&this.cbs.onerr(18,this.index)}stateBeforeDeclaration(e){e===91?(this.state=26,this.sequenceIndex=0):this.state=e===45?25:23}stateInDeclaration(e){(e===62||this.fastForwardTo(62))&&(this.state=1,this.sectionStart=this.index+1)}stateInProcessingInstruction(e){(e===62||this.fastForwardTo(62))&&(this.cbs.onprocessinginstruction(this.sectionStart,this.index),this.state=1,this.sectionStart=this.index+1)}stateBeforeComment(e){e===45?(this.state=28,this.currentSequence=yi.CommentEnd,this.sequenceIndex=2,this.sectionStart=this.index+1):this.state=23}stateInSpecialComment(e){(e===62||this.fastForwardTo(62))&&(this.cbs.oncomment(this.sectionStart,this.index),this.state=1,this.sectionStart=this.index+1)}stateBeforeSpecialS(e){e===yi.ScriptEnd[3]?this.startSpecial(yi.ScriptEnd,4):e===yi.StyleEnd[3]?this.startSpecial(yi.StyleEnd,4):(this.state=6,this.stateInTagName(e))}stateBeforeSpecialT(e){e===yi.TitleEnd[3]?this.startSpecial(yi.TitleEnd,4):e===yi.TextareaEnd[3]?this.startSpecial(yi.TextareaEnd,4):(this.state=6,this.stateInTagName(e))}startEntity(){}stateInEntity(){}parse(e){for(this.buffer=e;this.index<this.buffer.length;){const s=this.buffer.charCodeAt(this.index);switch(s===10&&this.state!==33&&this.newlines.push(this.index),this.state){case 1:{this.stateText(s);break}case 2:{this.stateInterpolationOpen(s);break}case 3:{this.stateInterpolation(s);break}case 4:{this.stateInterpolationClose(s);break}case 31:{this.stateSpecialStartSequence(s);break}case 32:{this.stateInRCDATA(s);break}case 26:{this.stateCDATASequence(s);break}case 19:{this.stateInAttrValueDoubleQuotes(s);break}case 12:{this.stateInAttrName(s);break}case 13:{this.stateInDirName(s);break}case 14:{this.stateInDirArg(s);break}case 15:{this.stateInDynamicDirArg(s);break}case 16:{this.stateInDirModifier(s);break}case 28:{this.stateInCommentLike(s);break}case 27:{this.stateInSpecialComment(s);break}case 11:{this.stateBeforeAttrName(s);break}case 6:{this.stateInTagName(s);break}case 34:{this.stateInSFCRootTagName(s);break}case 9:{this.stateInClosingTagName(s);break}case 5:{this.stateBeforeTagName(s);break}case 17:{this.stateAfterAttrName(s);break}case 20:{this.stateInAttrValueSingleQuotes(s);break}case 18:{this.stateBeforeAttrValue(s);break}case 8:{this.stateBeforeClosingTagName(s);break}case 10:{this.stateAfterClosingTagName(s);break}case 29:{this.stateBeforeSpecialS(s);break}case 30:{this.stateBeforeSpecialT(s);break}case 21:{this.stateInAttrValueNoQuotes(s);break}case 7:{this.stateInSelfClosingTag(s);break}case 23:{this.stateInDeclaration(s);break}case 22:{this.stateBeforeDeclaration(s);break}case 25:{this.stateBeforeComment(s);break}case 24:{this.stateInProcessingInstruction(s);break}case 33:{this.stateInEntity();break}}this.index++}this.cleanup(),this.finish()}cleanup(){this.sectionStart!==this.index&&(this.state===1||this.state===32&&this.sequenceIndex===0?(this.cbs.ontext(this.sectionStart,this.index),this.sectionStart=this.index):(this.state===19||this.state===20||this.state===21)&&(this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=this.index))}finish(){this.handleTrailingData(),this.cbs.onend()}handleTrailingData(){const e=this.buffer.length;this.sectionStart>=e||(this.state===28?this.currentSequence===yi.CdataEnd?this.cbs.oncdata(this.sectionStart,e):this.cbs.oncomment(this.sectionStart,e):this.state===6||this.state===11||this.state===18||this.state===17||this.state===12||this.state===13||this.state===14||this.state===15||this.state===16||this.state===20||this.state===19||this.state===21||this.state===9||this.cbs.ontext(this.sectionStart,e))}emitCodePoint(e,s){}}const Z0e={COMPILER_IS_ON_ELEMENT:"COMPILER_IS_ON_ELEMENT",COMPILER_V_BIND_SYNC:"COMPILER_V_BIND_SYNC",COMPILER_V_BIND_OBJECT_ORDER:"COMPILER_V_BIND_OBJECT_ORDER",COMPILER_V_ON_NATIVE:"COMPILER_V_ON_NATIVE",COMPILER_V_IF_V_FOR_PRECEDENCE:"COMPILER_V_IF_V_FOR_PRECEDENCE",COMPILER_NATIVE_TEMPLATE:"COMPILER_NATIVE_TEMPLATE",COMPILER_INLINE_TEMPLATE:"COMPILER_INLINE_TEMPLATE",COMPILER_FILTERS:"COMPILER_FILTERS"},e1e={COMPILER_IS_ON_ELEMENT:{message:'Platform-native elements with "is" prop will no longer be treated as components in Vue 3 unless the "is" value is explicitly prefixed with "vue:".',link:"https://v3-migration.vuejs.org/breaking-changes/custom-elements-interop.html"},COMPILER_V_BIND_SYNC:{message:t=>`.sync modifier for v-bind has been removed. Use v-model with argument instead. \`v-bind:${t}.sync\` should be changed to \`v-model:${t
vendor: 1,681 bytes, line 65
65}\`.`,link:"https://v3-migration.vuejs.org/breaking-changes/v-model.html"},COMPILER_V_BIND_OBJECT_ORDER:{message:'v-bind="obj" usage is now order sensitive and behaves like JavaScript object spread: it will now overwrite an existing non-mergeable attribute that appears before v-bind in the case of conflict. To retain 2.x behavior, move v-bind to make it the first attribute. You can also suppress this warning if the usage is intended.',link:"https://v3-migration.vuejs.org/breaking-changes/v-bind.html"},COMPILER_V_ON_NATIVE:{message:".native modifier for v-on has been removed as is no longer necessary.",link:"https://v3-migration.vuejs.org/breaking-changes/v-on-native-modifier-removed.html"},COMPILER_V_IF_V_FOR_PRECEDENCE:{message:"v-if / v-for precedence when used on the same element has changed in Vue 3: v-if now takes higher precedence and will no longer have access to v-for scope variables. It is best to avoid the ambiguity with <template> tags or use a computed property that filters v-for data source.",link:"https://v3-migration.vuejs.org/breaking-changes/v-if-v-for.html"},COMPILER_NATIVE_TEMPLATE:{message:"<template> with no special directives will render as a native template element instead of its inner content in Vue 3."},COMPILER_INLINE_TEMPLATE:{message:'"inline-template" has been removed in Vue 3.',link:"https://v3-migration.vuejs.org/breaking-changes/inline-template-attribute.html"},COMPILER_FILTERS:{message:'filters have been removed in Vue 3. The "|" symbol will be treated as native JavaScript bitwise OR operator. Use method calls or computed properties instead.',link:"https://v3-migration.vuejs.org/breaking-changes/filters.html"}};function
vendor: 52,459 bytes, lines 65-76
65g1(t,{compatConfig:e}){const s=e&&e[t];return t==="MODE"?s||3:s}function wu(t,e){const s=g1("MODE",e),n=g1(t,e);return s===3?n===!0:n!==!1}function od(t,e,s,...n){return wu(t,e)}function t1e(t,e,s,...n){if(g1(t,e)==="suppress-warning")return;const{message:o,link:r}=e1e[t],c=`(deprecation ${t}) ${typeof o=="function"?o(...n):o}${r?` 66 Details: ${r}`:""}`,h=new SyntaxError(c);h.code=t,s&&(h.loc=s),e.onWarn(h)}function Q_(t){throw t}function FD(t){}function dn(t,e,s,n){const i=`https://vuejs.org/error-reference/#compiler-${t}`,o=new SyntaxError(String(i));return o.code=t,o.loc=e,o}const s1e={ABRUPT_CLOSING_OF_EMPTY_COMMENT:0,0:"ABRUPT_CLOSING_OF_EMPTY_COMMENT",CDATA_IN_HTML_CONTENT:1,1:"CDATA_IN_HTML_CONTENT",DUPLICATE_ATTRIBUTE:2,2:"DUPLICATE_ATTRIBUTE",END_TAG_WITH_ATTRIBUTES:3,3:"END_TAG_WITH_ATTRIBUTES",END_TAG_WITH_TRAILING_SOLIDUS:4,4:"END_TAG_WITH_TRAILING_SOLIDUS",EOF_BEFORE_TAG_NAME:5,5:"EOF_BEFORE_TAG_NAME",EOF_IN_CDATA:6,6:"EOF_IN_CDATA",EOF_IN_COMMENT:7,7:"EOF_IN_COMMENT",EOF_IN_SCRIPT_HTML_COMMENT_LIKE_TEXT:8,8:"EOF_IN_SCRIPT_HTML_COMMENT_LIKE_TEXT",EOF_IN_TAG:9,9:"EOF_IN_TAG",INCORRECTLY_CLOSED_COMMENT:10,10:"INCORRECTLY_CLOSED_COMMENT",INCORRECTLY_OPENED_COMMENT:11,11:"INCORRECTLY_OPENED_COMMENT",INVALID_FIRST_CHARACTER_OF_TAG_NAME:12,12:"INVALID_FIRST_CHARACTER_OF_TAG_NAME",MISSING_ATTRIBUTE_VALUE:13,13:"MISSING_ATTRIBUTE_VALUE",MISSING_END_TAG_NAME:14,14:"MISSING_END_TAG_NAME",MISSING_WHITESPACE_BETWEEN_ATTRIBUTES:15,15:"MISSING_WHITESPACE_BETWEEN_ATTRIBUTES",NESTED_COMMENT:16,16:"NESTED_COMMENT",UNEXPECTED_CHARACTER_IN_ATTRIBUTE_NAME:17,17:"UNEXPECTED_CHARACTER_IN_ATTRIBUTE_NAME",UNEXPECTED_CHARACTER_IN_UNQUOTED_ATTRIBUTE_VALUE:18,18:"UNEXPECTED_CHARACTER_IN_UNQUOTED_ATTRIBUTE_VALUE",UNEXPECTED_EQUALS_SIGN_BEFORE_ATTRIBUTE_NAME:19,19:"UNEXPECTED_EQUALS_SIGN_BEFORE_ATTRIBUTE_NAME",UNEXPECTED_NULL_CHARACTER:20,20:"UNEXPECTED_NULL_CHARACTER",UNEXPECTED_QUESTION_MARK_INSTEAD_OF_TAG_NAME:21,21:"UNEXPECTED_QUESTION_MARK_INSTEAD_OF_TAG_NAME",UNEXPECTED_SOLIDUS_IN_TAG:22,22:"UNEXPECTED_SOLIDUS_IN_TAG",X_INVALID_END_TAG:23,23:"X_INVALID_END_TAG",X_MISSING_END_TAG:24,24:"X_MISSING_END_TAG",X_MISSING_INTERPOLATION_END:25,25:"X_MISSING_INTERPOLATION_END",X_MISSING_DIRECTIVE_NAME:26,26:"X_MISSING_DIRECTIVE_NAME",X_MISSING_DYNAMIC_DIRECTIVE_ARGUMENT_END:27,27:"X_MISSING_DYNAMIC_DIRECTIVE_ARGUMENT_END",X_V_IF_NO_EXPRESSION:28,28:"X_V_IF_NO_EXPRESSION",X_V_IF_SAME_KEY:29,29:"X_V_IF_SAME_KEY",X_V_ELSE_NO_ADJACENT_IF:30,30:"X_V_ELSE_NO_ADJACENT_IF",X_V_FOR_NO_EXPRESSION:31,31:"X_V_FOR_NO_EXPRESSION",X_V_FOR_MALFORMED_EXPRESSION:32,32:"X_V_FOR_MALFORMED_EXPRESSION",X_V_FOR_TEMPLATE_KEY_PLACEMENT:33,33:"X_V_FOR_TEMPLATE_KEY_PLACEMENT",X_V_BIND_NO_EXPRESSION:34,34:"X_V_BIND_NO_EXPRESSION",X_V_ON_NO_EXPRESSION:35,35:"X_V_ON_NO_EXPRESSION",X_V_SLOT_UNEXPECTED_DIRECTIVE_ON_SLOT_OUTLET:36,36:"X_V_SLOT_UNEXPECTED_DIRECTIVE_ON_SLOT_OUTLET",X_V_SLOT_MIXED_SLOT_USAGE:37,37:"X_V_SLOT_MIXED_SLOT_USAGE",X_V_SLOT_DUPLICATE_SLOT_NAMES:38,38:"X_V_SLOT_DUPLICATE_SLOT_NAMES",X_V_SLOT_EXTRANEOUS_DEFAULT_SLOT_CHILDREN:39,39:"X_V_SLOT_EXTRANEOUS_DEFAULT_SLOT_CHILDREN",X_V_SLOT_MISPLACED:40,40:"X_V_SLOT_MISPLACED",X_V_MODEL_NO_EXPRESSION:41,41:"X_V_MODEL_NO_EXPRESSION",X_V_MODEL_MALFORMED_EXPRESSION:42,42:"X_V_MODEL_MALFORMED_EXPRESSION",X_V_MODEL_ON_SCOPE_VARIABLE:43,43:"X_V_MODEL_ON_SCOPE_VARIABLE",X_V_MODEL_ON_PROPS:44,44:"X_V_MODEL_ON_PROPS",X_INVALID_EXPRESSION:45,45:"X_INVALID_EXPRESSION",X_KEEP_ALIVE_INVALID_CHILDREN:46,46:"X_KEEP_ALIVE_INVALID_CHILDREN",X_PREFIX_ID_NOT_SUPPORTED:47,47:"X_PREFIX_ID_NOT_SUPPORTED",X_MODULE_MODE_NOT_SUPPORTED:48,48:"X_MODULE_MODE_NOT_SUPPORTED",X_CACHE_HANDLER_NOT_SUPPORTED:49,49:"X_CACHE_HANDLER_NOT_SUPPORTED",X_SCOPE_ID_NOT_SUPPORTED:50,50:"X_SCOPE_ID_NOT_SUPPORTED",X_VNODE_HOOKS:51,51:"X_VNODE_HOOKS",X_V_BIND_INVALID_SAME_NAME_ARGUMENT:52,52:"X_V_BIND_INVALID_SAME_NAME_ARGUMENT",__EXTEND_POINT__:53,53:"__EXTEND_POINT__"},n1e={0:"Illegal comment.",1:"CDATA section is allowed only in XML context.",2:"Duplicate attribute.",3:"End tag cannot have attributes.",4:"Illegal '/' in tags.",5:"Unexpected EOF in tag.",6:"Unexpected EOF in CDATA section.",7:"Unexpected EOF in comment.",8:"Unexpected EOF in script.",9:"Unexpected EOF in tag.",10:"Incorrectly closed comment.",11:"Incorrectly opened comment.",12:"Illegal tag name. Use '<' to print '<'.",13:"Attribute value was expected.",14:"End tag name was expected.",15:"Whitespace was expected.",16:"Unexpected '<!--' in comment.",17:`Attribute name cannot contain U+0022 ("), U+0027 ('), and U+003C (<).`,18:"Unquoted attribute value cannot contain U+0022 (\"), U+0027 ('), U+003C (<), U+003D (=), and U+0060 (`).",19:"Attribute name cannot start with '='.",21:"'<?' is allowed only in XML context.",20:"Unexpected null character.",22:"Illegal '/' in tags.",23:"Invalid end tag.",24:"Element is missing end tag.",25:"Interpolation end sign was not found.",27:"End bracket for dynamic directive argument was not found. Note that dynamic directive argument cannot contain spaces.",26:"Legal directive name was expected.",28:"v-if/v-else-if is missing expression.",29:"v-if/else branches must use unique keys.",30:"v-else/v-else-if has no adjacent v-if or v-else-if.",31:"v-for is missing expression.",32:"v-for has invalid expression.",33:"<template v-for> key should be placed on the <template> tag.",34:"v-bind is missing expression.",52:"v-bind with same-name shorthand only allows static argument.",35:"v-on is missing expression.",36:"Unexpected custom directive on <slot> outlet.",37:"Mixed v-slot usage on both the component and nested <template>. When there are multiple named slots, all slots should use <template> syntax to avoid scope ambiguity.",38:"Duplicate slot names found. ",39:"Extraneous children found when component already has explicitly named default slot. These children will be ignored.",40:"v-slot can only be used on components or <template> tags.",41:"v-model is missing expression.",42:"v-model value must be a valid JavaScript member expression.",43:"v-model cannot be used on v-for or v-slot scope variables because they are not writable.",44:`v-model cannot be used on a prop, because local prop bindings are not writable. 67Use a v-bind binding combined with a v-on listener that emits update:x event instead.`,45:"Error parsing JavaScript expression: ",46:"<KeepAlive> expects exactly one child component.",51:"@vnode-* hooks in templates are no longer supported. Use the vue: prefix instead. For example, @vnode-mounted should be changed to @vue:mounted. @vnode-* hooks support has been removed in 3.4.",47:'"prefixIdentifiers" option is not supported in this build of compiler.',48:"ES module mode is not supported in this build of compiler.",49:'"cacheHandlers" option is only supported when the "prefixIdentifiers" option is enabled.',50:'"scopeId" option is only supported in module mode.',53:""};function i1e(t,e,s=!1,n=[],i=Object.create(null)){}function r1e(t,e,s){return!1}function a1e(t,e){if(t&&(t.type==="ObjectProperty"||t.type==="ArrayPattern")){let s=e.length;for(;s--;){const n=e[s];if(n.type==="AssignmentExpression")return!0;if(n.type!=="ObjectProperty"&&!n.type.endsWith("Pattern"))break}}return!1}function o1e(t){let e=t.length;for(;e--;){const s=t[e];if(s.type==="NewExpression")return!0;if(s.type!=="MemberExpression")break}return!1}function l1e(t,e){for(const s of t.params)for(const n of Ia(s))e(n)}function VD(t,e){const s=t.type==="SwitchCase"?t.consequent:t.body;for(const n of s)if(n.type==="VariableDeclaration"){if(n.declare)continue;for(const i of n.declarations)for(const o of Ia(i.id))e(o)}else if(n.type==="FunctionDeclaration"||n.type==="ClassDeclaration"){if(n.declare||!n.id)continue;e(n.id)}else u1e(n)?c1e(n,!0,e):n.type==="SwitchStatement"&&d1e(n,!0,e)}function u1e(t){return t.type==="ForOfStatement"||t.type==="ForInStatement"||t.type==="ForStatement"}function c1e(t,e,s){const n=t.type==="ForStatement"?t.init:t.left;if(n&&n.type==="VariableDeclaration"&&(n.kind==="var"?e:!e))for(const i of n.declarations)for(const o of Ia(i.id))s(o)}function d1e(t,e,s){for(const n of t.cases){for(const i of n.consequent)if(i.type==="VariableDeclaration"&&(i.kind==="var"?e:!e))for(const o of i.declarations)for(const r of Ia(o.id))s(r);VD(n,s)}}function Ia(t,e=[]){switch(t.type){case"Identifier":e.push(t);break;case"MemberExpression":let s=t;for(;s.type==="MemberExpression";)s=s.object;e.push(s);break;case"ObjectPattern":for(const n of t.properties)n.type==="RestElement"?Ia(n.argument,e):Ia(n.value,e);break;case"ArrayPattern":t.elements.forEach(n=>{n&&Ia(n,e)});break;case"RestElement":Ia(t.argument,e);break;case"AssignmentPattern":Ia(t.left,e);break}return e}const h1e=t=>/Function(?:Expression|Declaration)$|Method$/.test(t.type),BD=t=>t&&(t.type==="ObjectProperty"||t.type==="ObjectMethod")&&!t.computed,f1e=(t,e)=>BD(e)&&e.key===t,UD=["TSAsExpression","TSTypeAssertion","TSNonNullExpression","TSInstantiationExpression","TSSatisfiesExpression"];function jD(t){return UD.includes(t.type)?jD(t.expression):t}const Gi=t=>t.type===4&&t.isStatic;function Z_(t){switch(t){case"Teleport":case"teleport":return jc;case"Suspense":case"suspense":return dv;case"KeepAlive":case"keep-alive":return ef;case"BaseTransition":case"base-transition":return z_}}const p1e=/^$|^\d|[^\$\w\xA0-\uFFFF]/,Mf=t=>!p1e.test(t),ex=/[A-Za-z_$\xA0-\uFFFF]/,m1e=/[\.\?\w$\xA0-\uFFFF]/,g1e=/\s+[.[]\s*|\s*[.[]\s+/g,HD=t=>t.type===4?t.content:t.loc.source,WD=t=>{const e=HD(t).trim().replace(g1e,c=>c.trim());let s=0,n=[],i=0,o=0,r=null;for(let c=0;c<e.length;c++){const h=e.charAt(c);switch(s){case 0:if(h==="[")n.push(s),s=1,i++;else if(h==="(")n.push(s),s=2,o++;else if(!(c===0?ex:m1e).test(h))return!1;break;case 1:h==="'"||h==='"'||h==="`"?(n.push(s),s=3,r=h):h==="["?i++:h==="]"&&(--i||(s=n.pop()));break;case 2:if(h==="'"||h==='"'||h==="`")n.push(s),s=3,r=h;else if(h==="(")o++;else if(h===")"){if(c===e.length-1)return!1;--o||(s=n.pop())}break;case 3:h===r&&(s=n.pop(),r=null);break}}return!i&&!o},v1e=ii,tx=WD,b1e=/^\s*(?:async\s*)?(?:\([^)]*?\)|[\w$_]+)\s*(?::[^=]+)?=>|^\s*(?:async\s+)?function(?:\s+[\w$]+)?\s*\(/,zD=t=>b1e.test(HD(t)),y1e=ii,YD=zD;function _1e(t,e,s=e.length){return qD({offset:t.offset,line:t.line,column:t.column},e,s)}function qD(t,e,s=e.length){let n=0,i=-1;for(let o=0;o<s;o++)e.charCodeAt(o)===10&&(n++,i=o);return t.offset+=s,t.line+=n,t.column=i===-1?t.column+s:s-i,t}function x1e(t,e){if(!t)throw new Error(e||"unexpected compiler condition")}function Wi(t,e,s=!1){for(let n=0;n<t.props.length;n++){const i=t.props[n];if(i.type===7&&(s||i.exp)&&(os(e)?i.name===e:e.test(i.name)))return i}}function Nf(t,e,s=!1,n=!1){for(let i=0;i<t.props.length;i++){const o=t.props[i];if(o.type===6){if(s)continue;if(o.name===e&&(o.value||n))return o}else if(o.name==="bind"&&(o.exp||n)&&hl(o.arg,e))return o}}function hl(t,e){return!!(t&&Gi(t)&&t.content===e)}function GD(t){return t.props.some(e=>e.type===7&&e.name==="bind"&&(!e.arg||e.arg.type!==4||!e.arg.isStatic))}function Cm(t){return t.type===5||t.type===2}function v1(t){return t.type===7&&t.name==="pre"}function sx(t){return t.type===7&&t.name==="slot"}function ld(t){return t.type===1&&t.tagType===3}function nf(t){return t.type===1&&t.tagType===2}const w1e=new Set([rd,wd]);function XD(t,e=[]){if(t&&!os(t)&&t.type===14){const s=t.callee;if(!os(s)&&w1e.has(s))return XD(t.arguments[0],e.concat(t))}return[t,e]}function rf(t,e,s){let n,i=t.type===13?t.props:t.arguments[2],o=[],r;if(i&&!os(i)&&i.type===14){const c=XD(i);i=c[0],o=c[1],r=o[o.length-1]}if(i==null||os(i))n=br([e]);else if(i.type===14){const c=i.arguments[0];!os(c)&&c.type===15?dC(e,c)||c.properties.unshift(e):i.callee===Ev?n=zn(s.helper(tf),[br([e]),i]):i.arguments.unshift(br([e])),!n&&(n=i)}else i.type===15?(dC(e,i)||i.properties.unshift(e),n=i):(n=zn(s.helper(tf),[br([e]),i]),r&&r.callee===wd&&(r=o[o.length-2]));t.type===13?r?r.arguments[0]=n:t.props=n:r?r.arguments[0]=n:t.arguments[2]=n}function dC(t,e){let s=!1;if(t.key.type===4){const n=t.key.content;s=e.properties.some(i=>i.key.type===4&&i.key.content===n)}return s}function ud(t,e){return`_${e}_${t.replace(/[^\w]/g,(s,n)=>s==="-"?"_":t.charCodeAt(n).toString())}`}function oa(t,e){if(!t||Object.keys(e).length===0)return!1;switch(t.type){case 1:for(let s=0;s<t.props.length;s++){const n=t.props[s];if(n.type===7&&(oa(n.arg,e)||oa(n.exp,e)))return!0}return t.children.some(s=>oa(s,e));case 11:return oa(t.source,e)?!0:t.children.some(s=>oa(s,e));case 9:return t.branches.some(s=>oa(s,e));case 10:return oa(t.condition,e)?!0:t.children.some(s=>oa(s,e));case 4:return!t.isStatic&&Mf(t.content)&&!!e[t.content];case 8:return t.children.some(s=>js(s)&&oa(s,e));case 5:case 12:return oa(t.content,e);case 2:case 3:case 20:return!1;default:return!1}}function KD(t){return t.type===14&&t.callee===kv?t.arguments[1].returns:t}const JD=/([\s\S]*?)\s+(?:in|of)\s+(\S[\s\S]*)/,QD={parseMode:"base",ns:0,delimiters:["{{","}}"],getNamespace:()=>0,isVoidTag:au,isPreTag:au,isIgnoreNewlineTag:au,isCustomElement:au,onError:Q_,onWarn:FD,comments:!1,prefixIdentifiers:!1};let Ws=QD,af=null,vo="",Ei=null,Ds=null,sr="",so=-1,tu=-1,nx=0,ll=!1,b1=null;const vn=[],Pn=new Q0e(vn,{onerr:to,ontext(t,e){rm(ci(t,e),t,e)},ontextentity(t,e,s){rm(t,e,s)},oninterpolation(t,e){if(ll)return rm(ci(t,e),t,e);let s=t+Pn.delimiterOpen.length,n=e-Pn.delimiterClose.length;for(;pr(vo.charCodeAt(s));)s++;for(;pr(vo.charCodeAt(n-1));)n--;let i=ci(s,n);i.includes("&")&&(i=Ws.decodeEntities(i,!1)),y1({type:5,content:Am(i,!1,Fn(s,n)),loc:Fn(t,e)})},onopentagname(t,e){const s=ci(t,e);Ei={type:1,tag:s,ns:Ws.getNamespace(s,vn[0],Ws.ns),tagType:0,props:[],children:[],loc:Fn(t-1,e),codegenNode:void 0}},onopentagend(t){fC(t)},onclosetag(t,e){const s=ci(t,e);if(!Ws.isVoidTag(s)){let n=!1;for(let i=0;i<vn.length;i++)if(vn[i].tag.toLowerCase()===s.toLowerCase()){n=!0,i>0&&to(24,vn[0].loc.start.offset);for(let r=0;r<=i;r++){const c=vn.shift();Tm(c,e,r<i)}break}n||to(23,ZD(t,60))}},onselfclosingtag(t){const e=Ei.tag;Ei.isSelfClosing=!0,fC(t),vn[0]&&vn[0].tag===e&&Tm(vn.shift(),t)},onattribname(t,e){Ds={type:6,name:ci(t,e),nameLoc:Fn(t,e),value:void 0,loc:Fn(t)}},ondirname(t,e){const s=ci(t,e),n=s==="."||s===":"?"bind":s==="@"?"on":s==="#"?"slot":s.slice(2);if(!ll&&n===""&&to(26,t),ll||n==="")Ds={type:6,name:s,nameLoc:Fn(t,e),value:void 0,loc:Fn(t)};else if(Ds={type:7,name:n,rawName:s,exp:void 0,arg:void 0,modifiers:s==="."?[ms("prop")]:[],loc:Fn(t)},n==="pre"){ll=Pn.inVPre=!0,b1=Ei;const i=Ei.props;for(let o=0;o<i.length;o++)i[o].type===7&&(i[o]=I1e(i[o]))}},ondirarg(t,e){if(t===e)return;const s=ci(t,e);if(ll&&!v1(Ds))Ds.name+=s,cu(Ds.nameLoc,e);else{const n=s[0]!=="[";Ds.arg=Am(n?s:s.slice(1,-1),n,Fn(t,e),n?3:0)}},ondirmodifier(t,e){const s=ci(t,e);if(ll&&!v1(Ds))Ds.name+="."+s,cu(Ds.nameLoc,e);else if(Ds.name==="slot"){const n=Ds.arg;n&&(n.content+="."+s,cu(n.loc,e))}else{const n=ms(s,!0,Fn(t,e));Ds.modifiers.push(n)}},onattribdata(t,e){sr+=ci(t,e),so<0&&(so=t),tu=e},onattribentity(t,e,s){sr+=t,so<0&&(so=e),tu=s},onattribnameend(t){const e=Ds.loc.start.offset,s=ci(e,t);Ds.type===7&&(Ds.rawName=s),Ei.props.some(n=>(n.type===7?n.rawName:n.name)===s)&&to(2,e)},onattribend(t,e){if(Ei&&Ds){if(cu(Ds.loc,e),t!==0)if(sr.includes("&")&&(sr=Ws.decodeEntities(sr,!0)),Ds.type===6)Ds.name==="class"&&(sr=tP(sr).trim()),t===1&&!sr&&to(13,e),Ds.value={type:2,content:sr,loc:t===1?Fn(so,tu):Fn(so-1,tu+1)},Pn.inSFCRoot&&Ei.tag==="template"&&Ds.name==="lang"&&sr&&sr!=="html"&&Pn.enterRCDATA(vg("</template"),0);else{let s=0;Ds.exp=Am(sr,!1,Fn(so,tu),0,s),Ds.name==="for"&&(Ds.forParseResult=S1e(Ds.exp));let n=-1;Ds.name==="bind"&&(n=Ds.modifiers.findIndex(i=>i.content==="sync"))>-1&&od("COMPILER_V_BIND_SYNC",Ws,Ds.loc,Ds.arg.loc.source)&&(Ds.name="model",Ds.modifiers.splice(n,1))}(Ds.type!==7||Ds.name!=="pre")&&Ei.props.push(Ds)}sr="",so=tu=-1},oncomment(t,e){Ws.comments&&y1({type:3,content:ci(t,e),loc:Fn(t-4,e+3)})},onend(){const t=vo.length;for(let e=0;e<vn.length;e++)Tm(vn[e],t-1),to(24,vn[e].loc.start.offset)},oncdata(t,e){vn[0].ns!==0?rm(ci(t,e),t,e):to(1,t-9)},onprocessinginstruction(t){(vn[0]?vn[0].ns:Ws.ns)===0&&to(21,t-1)}}),hC=/,([^,\}\]]*)(?:,([^,\}\]]*))?$/,E1e=/^\(|\)$/g;function S1e(t){const e=t.loc,s=t.content,n=s.match(JD);if(!n)return;const[,i,o]=n,r=(g,y,x=!1)=>{const E=e.start.offset+y,P=E+g.length;return Am(g,!1,Fn(E,P),0,x?1:0)},c={source:r(o.trim(),s.indexOf(o,i.length)),value:void 0,key:void 0,index:void 0,finalized:!1};let h=i.trim().replace(E1e,"").trim();const f=i.indexOf(h),v=h.match(hC);if(v){h=h.replace(hC,"").trim();const g=v[1].trim();let y;if(g&&(y=s.indexOf(g,f+h.length),c.key=r(g,y,!0)),v[2]){const x=v[2].trim();x&&(c.index=r(x,s.indexOf(x,c.key?y+g.length:f+h.length),!0))}}return h&&(c.value=r(h,f,!0)),c}function ci(t,e){return vo.slice(t,e)}function fC(t){Pn.inSFCRoot&&(Ei.innerLoc=Fn(t+1,t+1)),y1(Ei);const{tag:e,ns:s}=Ei;s===0&&Ws.isPreTag(e)&&nx++,Ws.isVoidTag(e)?Tm(Ei,t):(vn.unshift(Ei),(s===1||s===2)&&(Pn.inXML=!0)),Ei=null}function rm(t,e,s){{const o=vn[0]&&vn[0].tag;o!=="script"&&o!=="style"&&t.includes("&")&&(t=Ws.decodeEntities(t,!1))}const n=vn[0]||af,i=n.children[n.children.length-1];i&&i.type===2?(i.content+=t,cu(i.loc,s)):n.children.push({type:2,content:t,loc:Fn(e,s)})}function Tm(t,e,s=!1){s?cu(t.loc,ZD(e,60)):cu(t.loc,k1e(e,62)+1),Pn.inSFCRoot&&(t.children.length?t.innerLoc.end=Cs({},t.children[t.children.length-1].loc.end):t.innerLoc.end=Cs({},t.innerLoc.start),t.innerLoc.source=ci(t.innerLoc.start.offset,t.innerLoc.end.offset));const{tag:n,ns:i,children:o}=t;if(ll||(n==="slot"?t.tagType=2:pC(t)?t.tagType=3:T1e(t)&&(t.tagType=1)),Pn.inRCDATA||(t.children=eP(o)),i===0&&Ws.isIgnoreNewlineTag(n)){const r=o[0];r&&r.type===2&&(r.content=r.content.replace(/^\r?\n/,""))}i===0&&Ws.isPreTag(n)&&nx--,b1===t&&(ll=Pn.inVPre=!1,b1=null),Pn.inXML&&(vn[0]?vn[0].ns:Ws.ns)===0&&(Pn.inXML=!1);{const r=t.props;if(!Pn.inSFCRoot&&wu("COMPILER_NATIVE_TEMPLATE",Ws)&&t.tag==="template"&&!pC(t)){const h=vn[0]||af,f=h.children.indexOf(t);h.children.splice(f,1,...t.children)}const c=r.find(h=>h.type===6&&h.name==="inline-template");c&&od("COMPILER_INLINE_TEMPLATE",Ws,c.loc)&&t.children.length&&(c.value={type:2,content:ci(t.children[0].loc.start.offset,t.children[t.children.length-1].loc.end.offset),loc:c.loc})}}function k1e(t,e){let s=t;for(;vo.charCodeAt(s)!==e&&s<vo.length-1;)s++;return s}function ZD(t,e){let s=t;for(;vo.charCodeAt(s)!==e&&s>=0;)s--;return s}const C1e=new Set(["if","else","else-if","for","slot"]);function pC({tag:t,props:e}){if(t==="template"){for(let s=0;s<e.length;s++)if(e[s].type===7&&C1e.has(e[s].name))return!0}return!1}function T1e({tag:t,props:e}){if(Ws.isCustomElement(t))return!1;if(t==="component"||A1e(t.charCodeAt(0))||Z_(t)||Ws.isBuiltInComponent&&Ws.isBuiltInComponent(t)||Ws.isNativeTag&&!Ws.isNativeTag(t))return!0;for(let s=0;s<e.length;s++){const n=e[s];if(n.type===6){if(n.name==="is"&&n.value){if(n.value.content.startsWith("vue:"))return!0;if(od("COMPILER_IS_ON_ELEMENT",Ws,n.loc))return!0}}else if(n.name==="bind"&&hl(n.arg,"is")&&od("COMPILER_IS_ON_ELEMENT",Ws,n.loc))return!0}return!1}function A1e(t){return t>64&&t<91}const O1e=/\r\n/g;function eP(t){const e=Ws.whitespace!=="preserve";let s=!1;for(let n=0;n<t.length;n++){const i=t[n];if(i.type===2)if(nx)i.content=i.content.replace(O1e,` 68`);else if(D1e(i.content)){const o=t[n-1]&&t[n-1].type,r=t[n+1]&&t[n+1].type;!o||!r||e&&(o===3&&(r===3||r===1)||o===1&&(r===3||r===1&&P1e(i.content)))?(s=!0,t[n]=null):i.content=" "}else e&&(i.content=tP(i.content))}return s?t.filter(Boolean):t}function D1e(t){for(let e=0;e<t.length;e++)if(!pr(t.charCodeAt(e)))return!1;return!0}function P1e(t){for(let e=0;e<t.length;e++){const s=t.charCodeAt(e);if(s===10||s===13)return!0}return!1}function tP(t){let e="",s=!1;for(let n=0;n<t.length;n++)pr(t.charCodeAt(n))?s||(e+=" ",s=!0):(e+=t[n],s=!1);return e}function y1(t){(vn[0]||af).children.push(t)}function Fn(t,e){return{start:Pn.getPos(t),end:e==null?e:Pn.getPos(e),source:e==null?e:ci(t,e)}}function $1e(t){return Fn(t.start.offset,t.end.offset)}function cu(t,e){t.end=Pn.getPos(e),t.source=ci(t.start.offset,e)}function I1e(t){const e={type:6,name:t.rawName,nameLoc:Fn(t.loc.start.offset,t.loc.start.offset+t.rawName.length),value:void 0,loc:t.loc};if(t.exp){const s=t.exp.loc;s.end.offset<t.loc.end.offset&&(s.start.offset--,s.start.column--,s.end.offset++,s.end.column++),e.value={type:2,content:t.exp.content,loc:s}}return e}function Am(t,e=!1,s,n=0,i=0){return ms(t,e,s,n)}function to(t,e,s){Ws.onError(dn(t,Fn(e,e)))}function M1e(){Pn.reset(),Ei=null,Ds=null,sr="",so=-1,tu=-1,vn.length=0}function ix(t,e){if(M1e(),vo=t,Ws=Cs({},QD),e){let i;for(i in e)e[i]!=null&&(Ws[i]=e[i])}Pn.mode=Ws.parseMode==="html"?1:Ws.parseMode==="sfc"?2:0,Pn.inXML=Ws.ns===1||Ws.ns===2;const s=e&&e.delimiters;s&&(Pn.delimiterOpen=vg(s[0]),Pn.delimiterClose=vg(s[1]));const n=af=ND([],t);return Pn.parse(vo),n.loc=Fn(0,t.length),n.children=eP(n.children),af=null,n}function N1e(t,e){Om(t,void 0,e,!!sP(t))}function sP(t){const e=t.children.filter(s=>s.type!==3);return e.length===1&&e[0].type===1&&!nf(e[0])?e[0]:null}function Om(t,e,s,n=!1,i=!1){const{children:o}=t,r=[];for(let v=0;v<o.length;v++){const g=o[v];if(g.type===1&&g.tagType===0){const y=n?0:ar(g,s);if(y>0){if(y>=2){g.codegenNode.patchFlag=-1,r.push(g);continue}}else{const x=g.codegenNode;if(x.type===13){const E=x.patchFlag;if((E===void 0||E===512||E===1)&&iP(g,s)>=2){const P=rP(g);P&&(x.props=s.hoist(P))}x.dynamicProps&&(x.dynamicProps=s.hoist(x.dynamicProps))}}}else if(g.type===12&&(n?0:ar(g,s))>=2){g.codegenNode.type===14&&g.codegenNode.arguments.length>0&&g.codegenNode.arguments.push("-1"),r.push(g);continue}if(g.type===1){const y=g.tagType===1;y&&s.scopes.vSlot++,Om(g,t,s,!1,i),y&&s.scopes.vSlot--}else if(g.type===11)Om(g,t,s,g.children.length===1,!0);else if(g.type===9)for(let y=0;y<g.branches.length;y++)Om(g.branches[y],t,s,g.branches[y].children.length===1,i)}let c=!1;if(r.length===o.length&&t.type===1){if(t.tagType===0&&t.codegenNode&&t.codegenNode.type===13&&Mt(t.codegenNode.children))t.codegenNode.children=h(gl(t.codegenNode.children)),c=!0;else if(t.tagType===1&&t.codegenNode&&t.codegenNode.type===13&&t.codegenNode.children&&!Mt(t.codegenNode.children)&&t.codegenNode.children.type===15){const v=f(t.codegenNode,"default");v&&(v.returns=h(gl(v.returns)),c=!0)}else if(t.tagType===3&&e&&e.type===1&&e.tagType===1&&e.codegenNode&&e.codegenNode.type===13&&e.codegenNode.children&&!Mt(e.codegenNode.children)&&e.codegenNode.children.type===15){const v=Wi(t,"slot",!0),g=v&&v.arg&&f(e.codegenNode,v.arg);g&&(g.returns=h(gl(g.returns)),c=!0)}}if(!c)for(const v of r)v.codegenNode=s.cache(v.codegenNode);function h(v){const g=s.cache(v);return g.needArraySpread=!0,g}function f(v,g){if(v.children&&!Mt(v.children)&&v.children.type===15){const y=v.children.properties.find(x=>x.key===g||x.key.content===g);return y&&y.value}}r.length&&s.transformHoist&&s.transformHoist(o,s,t)}function ar(t,e){const{constantCache:s}=e;switch(t.type){case 1:if(t.tagType!==0)return 0;const n=s.get(t);if(n!==void 0)return n;const i=t.codegenNode;if(i.type!==13||i.isBlock&&t.tag!=="svg"&&t.tag!=="foreignObject"&&t.tag!=="math")return 0;if(i.patchFlag===void 0){let r=3;const c=iP(t,e);if(c===0)return s.set(t,0),0;c<r&&(r=c);for(let h=0;h<t.children.length;h++){const f=ar(t.children[h],e);if(f===0)return s.set(t,0),0;f<r&&(r=f)}if(r>1)for(let h=0;h<t.props.length;h++){const f=t.props[h];if(f.type===7&&f.name==="bind"&&f.exp){const v=ar(f.exp,e);if(v===0)return s.set(t,0),0;v<r&&(r=v)}}if(i.isBlock){for(let h=0;h<t.props.length;h++)if(t.props[h].type===7)return s.set(t,0),0;e.removeHelper(xl),e.removeHelper(Vu(e.inSSR,i.isComponent)),i.isBlock=!1,e.helper(Fu(e.inSSR,i.isComponent))}return s.set(t,r),r}else return s.set(t,0),0;case 2:case 3:return 3;case 9:case 11:case 10:return 0;case 5:case 12:return ar(t.content,e);case 4:return t.constType;case 8:let o=3;for(let r=0;r<t.children.length;r++){const c=t.children[r];if(os(c)||Ji(c))continue;const h=ar(c,e);if(h===0)return 0;h<o&&(o=h)}return o;case 20:return 2;default:return 0}}const L1e=new Set([xv,wv,rd,wd]);function nP(t,e){if(t.type===14&&!os(t.callee)&&L1e.has(t.callee)){const s=t.arguments[0];if(s.type===4)return ar(s,e);if(s.type===14)return nP(s,e)}return 0}function iP(t,e){let s=3;const n=rP(t);if(n&&n.type===15){const{properties:i}=n;for(let o=0;o<i.length;o++){const{key:r,value:c}=i[o],h=ar(r,e);if(h===0)return h;h<s&&(s=h);let f;if(c.type===4?f=ar(c,e):c.type===14?f=nP(c,e):f=0,f===0)return f;f<s&&(s=f)}}return s}function rP(t){const e=t.codegenNode;if(e.type===13)return e.props}function aP(t,{filename:e="",prefixIdentifiers:s=!1,hoistStatic:n=!1,hmr:i=!1,cacheHandlers:o=!1,nodeTransforms:r=[],directiveTransforms:c={},transformHoist:h=null,isBuiltInComponent:f=ii,isCustomElement:v=ii,expressionPlugins:g=[],scopeId:y=null,slotted:x=!0,ssr:E=!1,inSSR:P=!1,ssrCssVars:I="",bindingMetadata:D=As,inline:F=!1,isTS:C=!1,onError:A=Q_,onWarn:O=FD,compatConfig:j}){const te=e.replace(/\?.*$/,"").match(/([^/\\]+)\.\w+$/),B={filename:e,selfName:te&&Tl(ln(te[1])),prefixIdentifiers:s,hoistStatic:n,hmr:i,cacheHandlers:o,nodeTransforms:r,directiveTransforms:c,transformHoist:h,isBuiltInComponent:f,isCustomElement:v,expressionPlugins:g,scopeId:y,slotted:x,ssr:E,inSSR:P,ssrCssVars:I,bindingMetadata:D,inline:F,isTS:C,onError:A,onWarn:O,compatConfig:j,root:t,helpers:new Map,components:new Set,directives:new Set,hoists:[],imports:[],cached:[],constantCache:new WeakMap,temps:0,identifiers:Object.create(null),scopes:{vFor:0,vSlot:0,vPre:0,vOnce:0},parent:null,grandParent:null,currentNode:t,childIndex:0,inVOnce:!1,helper(z){const re=B.helpers.get(z)||0;return B.helpers.set(z,re+1),z},removeHelper(z){const re=B.helpers.get(z);if(re){const ne=re-1;ne?B.helpers.set(z,ne):B.helpers.delete(z)}},helperString(z){return`_${Lu[B.helper(z)]}`},replaceNode(z){B.parent.children[B.childIndex]=B.currentNode=z},removeNode(z){const re=B.parent.children,ne=z?re.indexOf(z):B.currentNode?B.childIndex:-1;!z||z===B.currentNode?(B.currentNode=null,B.onNodeRemoved()):B.childIndex>ne&&(B.childIndex--,B.onNodeRemoved()),B.parent.children.splice(ne,1)},onNodeRemoved:ii,addIdentifiers(z){},removeIdentifiers(z){},hoist(z){os(z)&&(z=ms(z)),B.hoists.push(z);const re=ms(`_hoisted_${B.hoists.length}`,!1,z.loc,2);return re.hoisted=z,re},cache(z,re=!1,ne=!1){const X=LD(B.cached.length,z,re,ne);return B.cached.push(X),X}};return B.filters=new Set,B}function oP(t,e){const s=aP(t,e);Lf(t,s),e.hoistStatic&&N1e(t,s),e.ssr||R1e(t,s),t.helpers=new Set([...s.helpers.keys()]),t.components=[...s.components],t.directives=[...s.directives],t.imports=s.imports,t.hoists=s.hoists,t.temps=s.temps,t.cached=s.cached,t.transformed=!0,t.filters=[...s.filters]}function R1e(t,e){const{helper:s}=e,{children:n}=t;if(n.length===1){const i=sP(t);if(i&&i.codegenNode){const o=i.codegenNode;o.type===13&&Cv(o,e),t.codegenNode=o}else t.codegenNode=n[0]}else if(n.length>1){let i=64;t.codegenNode=ad(e,s(id),void 0,t.children,i,void 0,void 0,!0,void 0,!1)}}function F1e(t,e){let s=0;const n=()=>{s--};for(;s<t.children.length;s++){const i=t.children[s];os(i)||(e.grandParent=e.parent,e.parent=t,e.childIndex=s,e.onNodeRemoved=n,Lf(i,e))}}function Lf(t,e){e.currentNode=t;const{nodeTransforms:s}=e,n=[];for(let o=0;o<s.length;o++){const r=s[o](t,e);if(r&&(Mt(r)?n.push(...r):n.push(r)),e.currentNode)t=e.currentNode;else return}switch(t.type){case 3:e.ssr||e.helper(xd);break;case 5:e.ssr||e.helper(If);break;case 9:for(let o=0;o<t.branches.length;o++)Lf(t.branches[o],e);break;case 10:case 11:case 1:case 0:F1e(t,e);break}e.currentNode=t;let i=n.length;for(;i--;)n[i]()}function rx(t,e){const s=os(t)?n=>n===t:n=>t.test(n);return(n,i)=>{if(n.type===1){const{props:o}=n;if(n.tagType===3&&o.some(sx))return;const r=[];for(let c=0;c<o.length;c++){const h=o[c];if(h.type===7&&s(h.name)){o.splice(c,1),c--;const f=e(n,h,i);f&&r.push(f)}}return r}}}const Tv="/*@__PURE__*/",lP=t=>`${Lu[t]}: _${Lu[t]}`;function V1e(t,{mode:e="function",prefixIdentifiers:s=e==="module",sourceMap:n=!1,filename:i="template.vue.html",scopeId:o=null,optimizeImports:r=!1,runtimeGlobalName:c="Vue",runtimeModuleName:h="vue",ssrRuntimeModuleName:f="vue/server-renderer",ssr:v=!1,isTS:g=!1,inSSR:y=!1}){const x={mode:e,prefixIdentifiers:s,sourceMap:n,filename:i,scopeId:o,optimizeImports:r,runtimeGlobalName:c,runtimeModuleName:h,ssrRuntimeModuleName:f,ssr:v,isTS:g,inSSR:y,source:t.source,code:"",column:1,line:1,offset:0,indentLevel:0,pure:!1,map:void 0,helper(P){return`_${Lu[P]}`},push(P,I=-2,D){x.code+=P},indent(){E(++x.indentLevel)},deindent(P=!1){P?--x.indentLevel:E(--x.indentLevel)},newline(){E(x.indentLevel)}};function E(P){x.push(` 69`+" ".repeat(P),0)}return x}function uP(t,e={}){const s=V1e(t,e);e.onContextCreated&&e.onContextCreated(s);const{mode:n,push:i,prefixIdentifiers:o,indent:r,deindent:c,newline:h,scopeId:f,ssr:v}=s,g=Array.from(t.helpers),y=g.length>0,x=!o&&n!=="module";B1e(t,s);const P=v?"ssrRender":"render",D=(v?["_ctx","_push","_parent","_attrs"]:["_ctx","_cache"]).join(", ");if(i(`function ${P}(${D}) {`),r(),x&&(i("with (_ctx) {"),r(),y&&(i(`const { ${g.map(lP).join(", ")} } = _Vue 70`,-1),h())),t.components.length&&(c0(t.components,"component",s),(t.directives.length||t.temps>0)&&h()),t.directives.length&&(c0(t.directives,"directive",s),t.temps>0&&h()),t.filters&&t.filters.length&&(h(),c0(t.filters,"filter",s),h()),t.temps>0){i("let ");for(let F=0;F<t.temps;F++)i(`${F>0?", ":""}_temp${F}`)}return(t.components.length||t.directives.length||t.temps)&&(i(` 71`,0),h()),v||i("return "),t.codegenNode?Pi(t.codegenNode,s):i("null"),x&&(c(),i("}")),c(),i("}"),{ast:t,code:s.code,preamble:"",map:s.map?s.map.toJSON():void 0}}function B1e(t,e){const{ssr:s,prefixIdentifiers:n,push:i,newline:o,runtimeModuleName:r,runtimeGlobalName:c,ssrRuntimeModuleName:h}=e,f=c,v=Array.from(t.helpers);if(v.length>0&&(i(`const _Vue = ${f} 72`,-1),t.hoists.length)){const g=[hv,fv,xd,pv,G_].filter(y=>v.includes(y)).map(lP).join(", ");i(`const { ${g} } = _Vue 73`,-1)}U1e(t.hoists,e),o(),i("return ")}function c0(t,e,{helper:s,push:n,newline:i,isTS:o}){const r=s(e==="filter"?bv:e==="component"?mv:vv);for(let c=0;c<t.length;c++){let h=t[c];const f=h.endsWith("__self");f&&(h=h.slice(0,-6)),n(`const ${ud(h,e)} = ${r}(${JSON.stringify(h)}${f?", true":""})${o?"!":""}`),c<t.length-1&&i()}}function U1e(t,e){if(!t.length)return;e.pure=!0;const{push:s,newline:n}=e;n();for(let i=0;i<t.length;i++){const o=t[i];o&&(s(`const _hoisted_${i+1} = `),Pi(o,e),n())}e.pure=!1}function ax(t,e){const s=t.length>3||!1;e.push("["),s&&e.indent(),Rf(t,e,s),s&&e.deindent(),e.push("]")}function Rf(t,e,s=!1,n=!0){const{push:i,newline:o}=e;for(let r=0;r<t.length;r++){const c=t[r];os(c)?i(c,-3):Mt(c)?ax(c,e):Pi(c,e),r<t.length-1&&(s?(n&&i(","),o()):n&&i(", "))}}function Pi(t,e){if(os(t)){e.push(t,-3);return}if(Ji(t)){e.push(e.helper(t));return}switch(t.type){case 1:case 9:case 11:Pi(t.codegenNode,e);break;case 2:j1e(t,e);break;case 4:cP(t,e);break;case 5:H1e(t,e);break;case 12:Pi(t.codegenNode,e);break;case 8:dP(t,e);break;case 3:z1e(t,e);break;case 13:Y1e(t,e);break;case 14:G1e(t,e);break;case 15:X1e(t,e);break;case 17:K1e(t,e);break;case 18:J1e(t,e);break;case 19:Q1e(t,e);break;case 20:Z1e(t,e);break;case 21:Rf(t.body,e,!0,!1);break}}function j1e(t,e){e.push(JSON.stringify(t.content),-3,t)}function cP(t,e){const{content:s,isStatic:n}=t;e.push(n?JSON.stringify(s):s,-3,t)}function H1e(t,e){const{push:s,helper:n,pure:i}=e;i&&s(Tv),s(`${n(If)}(`),Pi(t.content,e),s(")")}function dP(t,e){for(let s=0;s<t.children.length;s++){const n=t.children[s];os(n)?e.push(n,-3):Pi(n,e)}}function W1e(t,e){const{push:s}=e;if(t.type===8)s("["),dP(t,e),s("]");else if(t.isStatic){const n=Mf(t.content)?t.content:JSON.stringify(t.content);s(n,-2,t)}else s(`[${t.content}]`,-3,t)}function z1e(t,e){const{push:s,helper:n,pure:i}=e;i&&s(Tv),s(`${n(xd)}(${JSON.stringify(t.content)})`,-3,t)}function Y1e(t,e){const{push:s,helper:n,pure:i}=e,{tag:o,props:r,children:c,patchFlag:h,dynamicProps:f,directives:v,isBlock:g,disableTracking:y,isComponent:x}=t;let E;h&&(E=String(h)),v&&s(n(yv)+"("),g&&s(`(${n(xl)}(${y?"true":""}), `),i&&s(Tv);const P=g?Vu(e.inSSR,x):Fu(e.inSSR,x);s(n(P)+"(",-2,t),Rf(q1e([o,r,c,E,f]),e),s(")"),g&&s(")"),v&&(s(", "),Pi(v,e),s(")"))}function q1e(t){let e=t.length;for(;e--&&t[e]==null;);return t.slice(0,e+1).map(s=>s||"null")}function G1e(t,e){const{push:s,helper:n,pure:i}=e,o=os(t.callee)?t.callee:n(t.callee);i&&s(Tv),s(o+"(",-2,t),Rf(t.arguments,e),s(")")}function X1e(t,e){const{push:s,indent:n,deindent:i,newline:o}=e,{properties:r}=t;if(!r.length){s("{}",-2,t);return}const c=r.length>1||!1;s(c?"{":"{ "),c&&n();for(let h=0;h<r.length;h++){const{key:f,value:v}=r[h];W1e(f,e),s(": "),Pi(v,e),h<r.length-1&&(s(","),o())}c&&i(),s(c?"}":" }")}function K1e(t,e){ax(t.elements,e)}function J1e(t,e){const{push:s,indent:n,deindent:i}=e,{params:o,returns:r,body:c,newline:h,isSlot:f}=t;f&&s(`_${Lu[Sv]}(`),s("(",-2,t),Mt(o)?Rf(o,e):o&&Pi(o,e),s(") => "),(h||c)&&(s("{"),n()),r?(h&&s("return "),Mt(r)?ax(r,e):Pi(r,e)):c&&Pi(c,e),(h||c)&&(i(),s("}")),f&&(t.isNonScopedSlot&&s(", undefined, true"),s(")"))}function Q1e(t,e){const{test:s,consequent:n,alternate:i,newline:o}=t,{push:r,indent:c,deindent:h,newline:f}=e;if(s.type===4){const g=!Mf(s.content);g&&r("("),cP(s,e),g&&r(")")}else r("("),Pi(s,e),r(")");o&&c(),e.indentLevel++,o||r(" "),r("? "),Pi(n,e),e.indentLevel--,o&&f(),o||r(" "),r(": ");const v=i.type===19;v||e.indentLevel++,Pi(i,e),v||e.indentLevel--,o&&h(!0)}function Z1e(t,e){const{push:s,helper:n,indent:i,deindent:o,newline:r}=e,{needPauseTracking:c,needArraySpread:h}=t;h&&s("[...("),s(`_cache[${t.index}] || (`),c&&(i(),s(`${n(sf)}(-1`),t.inVOnce&&s(", true"),s("),"),r(),s("(")),s(`_cache[${t.index}] = `),Pi(t.value,e),c&&(s(`).cacheIndex = ${t.index},`),r(),s(`${n(sf)}(1),`),r(),s(`_cache[${t.index}]`),o()),s(")"),h&&s(")]")}new RegExp("\\b"+"arguments,await,break,case,catch,class,const,continue,debugger,default,delete,do,else,export,extends,finally,for,function,if,import,let,new,return,super,switch,throw,try,var,void,while,with,yield".split(",").join("\\b|\\b")+"\\b");const e_e=(t,e)=>{if(t.type===5)t.content=Dm(t.content,e);else if(t.type===1){const s=Wi(t,"memo");for(let n=0;n<t.props.length;n++){const i=t.props[n];if(i.type===7&&i.name!=="for"){const o=i.exp,r=i.arg;o&&o.type===4&&!(i.name==="on"&&r)&&!(s&&r&&r.type===4&&r.content==="key")&&(i.exp=Dm(o,e,i.name==="slot")),r&&r.type===4&&!r.isStatic&&(i.arg=Dm(r,e))}}}};function Dm(t,e,s=!1,n=!1,i=Object.create(e.identifiers)){return t}function hP(t){return os(t)?t:t.type===4?t.content:t.children.map(hP).join("")}const t_e=rx(/^(?:if|else|else-if)$/,(t,e,s)=>fP(t,e,s,(n,i,o)=>{const r=s.parent.children;let c=r.indexOf(n),h=0;for(;c-->=0;){const f=r[c];f&&f.type===9&&(h+=f.branches.length)}return()=>{if(o)n.codegenNode=gC(i,h,s);else{const f=s_e(n.codegenNode);f.alternate=gC(i,h+n.branches.length-1,s)}}}));function fP(t,e,s,n){if(e.name!=="else"&&(!e.exp||!e.exp.content.trim())){const i=e.exp?e.exp.loc:t.loc;s.onError(dn(28,e.loc)),e.exp=ms("true",!1,i)}if(e.name==="if"){const i=mC(t,e),o={type:9,loc:$1e(t.loc),branches:[i]};if(s.replaceNode(o),n)return n(o,i,!0)}else{const i=s.parent.children;let o=i.indexOf(t);for(;o-->=-1;){const r=i[o];if(r&&r.type===3){s.removeNode(r);continue}if(r&&r.type===2&&!r.content.trim().length){s.removeNode(r);continue}if(r&&r.type===9){(e.name==="else-if"||e.name==="else")&&r.branches[r.branches.length-1].condition===void 0&&s.onError(dn(30,t.loc)),s.removeNode();const c=mC(t,e);r.branches.push(c);const h=n&&n(r,c,!1);Lf(c,s),h&&h(),s.currentNode=null}else s.onError(dn(30,t.loc));break}}}function mC(t,e){const s=t.tagType===3;return{type:10,loc:t.loc,condition:e.name==="else"?void 0:e.exp,children:s&&!Wi(t,"for")?t.children:[t],userKey:Nf(t,"key"),isTemplateIf:s}}function gC(t,e,s){return t.condition?gg(t.condition,vC(t,e,s),zn(s.helper(xd),['""',"true"])):vC(t,e,s)}function vC(t,e,s){const{helper:n}=s,i=jn("key",ms(`${e}`,!1,ei,2)),{children:o}=t,r=o[0];if(o.length!==1||r.type!==1)if(o.length===1&&r.type===11){const h=r.codegenNode;return rf(h,i,s),h}else return ad(s,n(id),br([i]),o,64,void 0,void 0,!0,!1,!1,t.loc);else{const h=r.codegenNode,f=KD(h);return f.type===13&&Cv(f,s),rf(f,i,s),h}}function s_e(t){for(;;)if(t.type===19)if(t.alternate.type===19)t=t.alternate;else return t;else t.type===20&&(t=t.value)}const n_e=rx("for",(t,e,s)=>{const{helper:n,removeHelper:i}=s;return pP(t,e,s,o=>{const r=zn(n(_v),[o.source]),c=ld(t),h=Wi(t,"memo"),f=Nf(t,"key",!1,!0);f&&f.type;let v=f&&(f.type===6?f.value?ms(f.value.content,!0):void 0:f.exp);const g=f&&v?jn("key",v):null,y=o.source.type===4&&o.source.constType>0,x=y?64:f?128:256;return o.codegenNode=ad(s,n(id),void 0,r,x,void 0,void 0,!0,!y,!1,t.loc),()=>{let E;const{children:P}=o,I=P.length!==1||P[0].type!==1,D=nf(t)?t:c&&t.children.length===1&&nf(t.children[0])?t.children[0]:null;if(D?(E=D.codegenNode,c&&g&&rf(E,g,s)):I?E=ad(s,n(id),g?br([g]):void 0,t.children,64,void 0,void 0,!0,void 0,!1):(E=P[0].codegenNode,c&&g&&rf(E,g,s),E.isBlock!==!y&&(E.isBlock?(i(xl),i(Vu(s.inSSR,E.isComponent))):i(Fu(s.inSSR,E.isComponent))),E.isBlock=!y,E.isBlock?(n(xl),n(Vu(s.inSSR,E.isComponent))):n(Fu(s.inSSR,E.isComponent))),h){const F=Ru(bg(o.parseResult,[ms("_cached")]));F.body=RD([Br(["const _memo = (",h.exp,")"]),Br(["if (_cached",...v?[" && _cached.key === ",v]:[],` && ${s.helperString(J_)}(_cached, _memo)) return _cached`]),Br(["const _item = ",E]),ms("_item.memo = _memo"),ms("return _item")]),r.arguments.push(F,ms("_cache"),ms(String(s.cached.length))),s.cached.push(null)}else r.arguments.push(Ru(bg(o.parseResult),E,!0))}})});function pP(t,e,s,n){if(!e.exp){s.onError(dn(31,e.loc));return}const i=e.forParseResult;if(!i){s.onError(dn(32,e.loc));return}ox(i);const{addIdentifiers:o,removeIdentifiers:r,scopes:c}=s,{source:h,value:f,key:v,index:g}=i,y={type:11,loc:e.loc,source:h,valueAlias:f,keyAlias:v,objectIndexAlias:g,parseResult:i,children:ld(t)?t.children:[t]};s.replaceNode(y),c.vFor++;const x=n&&n(y);return()=>{c.vFor--,x&&x()}}function ox(t,e){t.finalized||(t.finalized=!0)}function bg({value:t,key:e,index:s},n=[]){return i_e([t,e,s,...n])}function i_e(t){let e=t.length;for(;e--&&!t[e];);return t.slice(0,e+1).map((s,n)=>s||ms("_".repeat(n+1),!1))}const bC=ms("undefined",!1),mP=(t,e)=>{if(t.type===1&&(t.tagType===1||t.tagType===3)){const s=Wi(t,"slot");if(s)return s.exp,e.scopes.vSlot++,()=>{e.scopes.vSlot--}}},r_e=(t,e)=>{let s;if(ld(t)&&t.props.some(sx)&&(s=Wi(t,"for"))){const n=s.forParseResult;if(n){ox(n);const{value:i,key:o,index:r}=n,{addIdentifiers:c,removeIdentifiers:h}=e;return i&&c(i),o&&c(o),r&&c(r),()=>{i&&h(i),o&&h(o),r&&h(r)}}}},a_e=(t,e,s,n)=>Ru(t,s,!1,!0,s.length?s[0].loc:n);function gP(t,e,s=a_e){e.helper(Sv);const{children:n,loc:i}=t,o=[],r=[];let c=e.scopes.vSlot>0||e.scopes.vFor>0;const h=Wi(t,"slot",!0);if(h){const{arg:I,exp:D}=h;I&&!Gi(I)&&(c=!0),o.push(jn(I||ms("default",!0),s(D,void 0,n,i)))}let f=!1,v=!1;const g=[],y=new Set;let x=0;for(let I=0;I<n.length;I++){const D=n[I];let F;if(!ld(D)||!(F=Wi(D,"slot",!0))){D.type!==3&&g.push(D);continue}if(h){e.onError(dn(37,F.loc));break}f=!0;const{children:C,loc:A}=D,{arg:O=ms("default",!0),exp:j,loc:te}=F;let B;Gi(O)?B=O?O.content:"default":c=!0;const z=Wi(D,"for"),re=s(j,z,C,A);let ne,X;if(ne=Wi(D,"if"))c=!0,r.push(gg(ne.exp,am(O,re,x++),bC));else if(X=Wi(D,/^else(?:-if)?$/,!0)){let G=I,ce;for(;G--&&(ce=n[G],!(ce.type!==3&&_1(ce))););if(ce&&ld(ce)&&Wi(ce,/^(?:else-)?if$/)){let be=r[r.length-1];for(;be.alternate.type===19;)be=be.alternate;be.alternate=X.exp?gg(X.exp,am(O,re,x++),bC):am(O,re,x++)}else e.onError(dn(30,X.loc))}else if(z){c=!0;const G=z.forParseResult;G?(ox(G),r.push(zn(e.helper(_v),[G.source,Ru(bg(G),am(O,re),!0)]))):e.onError(dn(32,z.loc))}else{if(B){if(y.has(B)){e.onError(dn(38,te));continue}y.add(B),B==="default"&&(v=!0)}o.push(jn(O,re))}}if(!h){const I=(D,F)=>{const C=s(D,void 0,F,i);return e.compatConfig&&(C.isNonScopedSlot=!0),jn("default",C)};f?g.length&&g.some(D=>_1(D))&&(v?e.onError(dn(39,g[0].loc)):o.push(I(void 0,g))):o.push(I(void 0,n))}const E=c?2:Pm(t.children)?3:1;let P=br(o.concat(jn("_",ms(E+"",!1))),i);return r.length&&(P=zn(e.helper(K_),[P,gl(r)])),{slots:P,hasDynamicSlots:c}}function am(t,e,s){const n=[jn("name",t),jn("fn",e)];return s!=null&&n.push(jn("key",ms(String(s),!0))),br(n)}function Pm(t){for(let e=0;e<t.length;e++){const s=t[e];switch(s.type){case 1:if(s.tagType===2||Pm(s.children))return!0;break;case 9:if(Pm(s.branches))return!0;break;case 10:case 11:if(Pm(s.children))return!0;break}}return!1}function _1(t){return t.type!==2&&t.type!==12?!0:t.type===2?!!t.content.trim():_1(t.content)}const vP=new WeakMap,bP=(t,e)=>function(){if(t=e.currentNode,!(t.type===1&&(t.tagType===0||t.tagType===1)))return;const{tag:n,props:i}=t,o=t.tagType===1;let r=o?yP(t,e):`"${n}"`;const c=js(r)&&r.callee===gv;let h,f,v=0,g,y,x,E=c||r===jc||r===dv||!o&&(n==="svg"||n==="foreignObject"||n==="math");if(i.length>0){const P=lx(t,e,void 0,o,c);h=P.props,v=P.patchFlag,y=P.dynamicPropNames;const I=P.directives;x=I&&I.length?gl(I.map(D=>_P(D,e))):void 0,P.shouldUseBlock&&(E=!0)}if(t.children.length>0)if(r===ef&&(E=!0,v|=1024),o&&r!==jc&&r!==ef){const{slots:I,hasDynamicSlots:D}=gP(t,e);f=I,D&&(v|=1024)}else if(t.children.length===1&&r!==jc){const I=t.children[0],D=I.type,F=D===5||D===8;F&&ar(I,e)===0&&(v|=1),F||D===2?f=I:f=t.children}else f=t.children;y&&y.length&&(g=l_e(y)),t.codegenNode=ad(e,r,h,f,v===0?void 0:v,g,x,!!E,!1,o,t.loc)};function yP(t,e,s=!1){let{tag:n}=t;const i=x1(n),o=Nf(t,"is",!1,!0);if(o)if(i||wu("COMPILER_IS_ON_ELEMENT",e)){let c;if(o.type===6?c=o.value&&ms(o.value.content,!0):(c=o.exp,c||(c=ms("is",!1,o.arg.loc))),c)return zn(e.helper(gv),[c])}else o.type===6&&o.value.content.startsWith("vue:")&&(n=o.value.content.slice(4));const r=Z_(n)||e.isBuiltInComponent(n);return r?(s||e.helper(r),r):(e.helper(mv),e.components.add(n),ud(n,"component"))}function lx(t,e,s=t.props,n,i,o=!1){const{tag:r,loc:c,children:h}=t;let f=[];const v=[],g=[],y=h.length>0;let x=!1,E=0,P=!1,I=!1,D=!1,F=!1,C=!1,A=!1;const O=[],j=re=>{f.length&&(v.push(br(yC(f),c)),f=[]),re&&v.push(re)},te=()=>{e.scopes.vFor>0&&f.push(jn(ms("ref_for",!0),ms("true")))},B=({key:re,value:ne})=>{if(Gi(re)){const X=re.content,G=kl(X);if(G&&(!n||i)&&X.toLowerCase()!=="onclick"&&X!=="onUpdate:modelValue"&&!go(X)&&(F=!0),G&&go(X)&&(A=!0),G&&ne.type===14&&(ne=ne.arguments[0]),ne.type===20||(ne.type===4||ne.type===8)&&ar(ne,e)>0)return;X==="ref"?P=!0:X==="class"?I=!0:X==="style"?D=!0:X!=="key"&&!O.includes(X)&&O.push(X),n&&(X==="class"||X==="style")&&!O.includes(X)&&O.push(X)}else C=!0};for(let re=0;re<s.length;re++){const ne=s[re];if(ne.type===6){const{loc:X,name:G,nameLoc:ce,value:be}=ne;let J=!0;if(G==="ref"&&(P=!0,te()),G==="is"&&(x1(r)||be&&be.content.startsWith("vue:")||wu("COMPILER_IS_ON_ELEMENT",e)))continue;f.push(jn(ms(G,!0,ce),ms(be?be.content:"",J,be?be.loc:X)))}else{const{name:X,arg:G,exp:ce,loc:be,modifiers:J}=ne,Z=X==="bind",ge=X==="on";if(X==="slot"){n||e.onError(dn(40,be));continue}if(X==="once"||X==="memo"||X==="is"||Z&&hl(G,"is")&&(x1(r)||wu("COMPILER_IS_ON_ELEMENT",e))||ge&&o)continue;if((Z&&hl(G,"key")||ge&&y&&hl(G,"vue:before-update"))&&(x=!0),Z&&hl(G,"ref")&&te(),!G&&(Z||ge)){if(C=!0,ce)if(Z){if(j(),wu("COMPILER_V_BIND_OBJECT_ORDER",e)){v.unshift(ce);continue}te(),j(),v.push(ce)}else j({type:14,loc:be,callee:e.helper(Ev),arguments:n?[ce]:[ce,"true"]});else e.onError(dn(Z?34:35,be));continue}Z&&J.some(W=>W.content==="prop")&&(E|=32);const q=e.directiveTransforms[X];if(q){const{props:W,needRuntime:M}=q(ne,t,e);!o&&W.forEach(B),ge&&G&&!Gi(G)?j(br(W,c)):f.push(...W),M&&(g.push(ne),Ji(M)&&vP.set(ne,M))}else kA(X)||(g.push(ne),y&&(x=!0))}}let z;if(v.length?(j(),v.length>1?z=zn(e.helper(tf),v,c):z=v[0]):f.length&&(z=br(yC(f),c)),C?E|=16:(I&&!n&&(E|=2),D&&!n&&(E|=4),O.length&&(E|=8),F&&(E|=32)),!x&&(E===0||E===32)&&(P||A||g.length>0)&&(E|=512),!e.inSSR&&z)switch(z.type){case 15:let re=-1,ne=-1,X=!1;for(let be=0;be<z.properties.length;be++){const J=z.properties[be].key;Gi(J)?J.content==="class"?re=be:J.content==="style"&&(ne=be):J.isHandlerKey||(X=!0)}const G=z.properties[re],ce=z.properties[ne];X?z=zn(e.helper(rd),[z]):(G&&!Gi(G.value)&&(G.value=zn(e.helper(xv),[G.value])),ce&&(D||ce.value.type===4&&ce.value.content.trim()[0]==="["||ce.value.type===17)&&(ce.value=zn(e.helper(wv),[ce.value])));break;case 14:break;default:z=zn(e.helper(rd),[zn(e.helper(wd),[z])]);break}return{props:z,directives:g,patchFlag:E,dynamicPropNames:O,shouldUseBlock:x}}function yC(t){const e=new Map,s=[];for(let n=0;n<t.length;n++){const i=t[n];if(i.key.type===8||!i.key.isStatic){s.push(i);continue}const o=i.key.content,r=e.get(o);r?(o==="style"||o==="class"||kl(o))&&o_e(r,i):(e.set(o,i),s.push(i))}return s}function o_e(t,e){t.value.type===17?t.value.elements.push(e.value):t.value=gl([t.value,e.value],t.loc)}function _P(t,e){const s=[],n=vP.get(t);n?s.push(e.helperString(n)):(e.helper(vv),e.directives.add(t.name),s.push(ud(t.name,"directive")));const{loc:i}=t;if(t.exp&&s.push(t.exp),t.arg&&(t.exp||s.push("void 0"),s.push(t.arg)),Object.keys(t.modifiers).length){t.arg||(t.exp||s.push("void 0"),s.push("void 0"));const o=ms("true",!1,i);s.push(br(t.modifiers.map(r=>jn(r,o)),i))}return gl(s,t.loc)}function l_e(t){let e="[";for(let s=0,n=t.length;s<n;s++)e+=JSON.stringify(t[s]),s<n-1&&(e+=", ");return e+"]"}function x1(t){return t==="component"||t==="Component"}const u_e=(t,e)=>{if(nf(t)){const{children:s,loc:n}=t,{slotName:i,slotProps:o}=xP(t,e),r=[e.prefixIdentifiers?"_ctx.$slots":"$slots",i,"{}","undefined","true"];let c=2;o&&(r[2]=o,c=3),s.length&&(r[3]=Ru([],s,!1,!1,n),c=4),e.scopeId&&!e.slotted&&(c=5),r.splice(c),t.codegenNode=zn(e.helper(X_),r,n)}};function xP(t,e){let s='"default"',n;const i=[];for(let o=0;o<t.props.length;o++){const r=t.props[o];if(r.type===6)r.value&&(r.name==="name"?s=JSON.stringify(r.value.content):(r.name=ln(r.name),i.push(r)));else if(r.name==="bind"&&hl(r.arg,"name")){if(r.exp)s=r.exp;else if(r.arg&&r.arg.type===4){const c=ln(r.arg.content);s=r.exp=ms(c,!1,r.arg.loc)}}else r.name==="bind"&&r.arg&&Gi(r.arg)&&(r.arg.content=ln(r.arg.content)),i.push(r)}if(i.length>0){const{props:o,directives:r}=lx(t,e,i,!1,!1);n=o,r.length&&e.onError(dn(36,r[0].loc))}return{slotName:s,slotProps:n}}const ux=(t,e,s,n)=>{const{loc:i,modifiers:o,arg:r}=t;!t.exp&&!o.length&&s.onError(dn(35,i));let c;if(r.type===4)if(r.isStatic){let g=r.content;g.startsWith("vue:")&&(g=`vnode-${g.slice(4)}`);const y=e.tagType!==0||g.startsWith("vnode")||!/[A-Z]/.test(g)?gu(ln(g)):`on:${g}`;c=ms(y,!0,r.loc)}else c=Br([`${s.helperString(mg)}(`,r,")"]);else c=r,c.children.unshift(`${s.helperString(mg)}(`),c.children.push(")");let h=t.exp;h&&!h.content.trim()&&(h=void 0);let f=s.cacheHandlers&&!h&&!s.inVOnce;if(h){const g=tx(h),y=!(g||YD(h)),x=h.content.includes(";");(y||f&&g)&&(h=Br([`${y?"$event":"(...args)"} => ${x?"{":"("}`,h,x?"}":")"]))}let v={props:[jn(c,h||ms("() => {}",!1,i))]};return n&&(v=n(v)),f&&(v.props[0].value=s.cache(v.props[0].value)),v.props.forEach(g=>g.key.isHandlerKey=!0),v},wP=(t,e,s)=>{const{modifiers:n,loc:i}=t,o=t.arg;let{exp:r}=t;return r&&r.type===4&&!r.content.trim()&&(r=void 0),o.type!==4?(o.children.unshift("("),o.children.push(') || ""')):o.isStatic||(o.content=o.content?`${o.content} || ""`:'""'),n.some(c=>c.content==="camel")&&(o.type===4?o.isStatic?o.content=ln(o.content):o.content=`${s.helperString(pg)}(${o.content})`:(o.children.unshift(`${s.helperString(pg)}(`),o.children.push(")"))),s.inSSR||(n.some(c=>c.content==="prop")&&_C(o,"."),n.some(c=>c.content==="attr")&&_C(o,"^")),{props:[jn(o,r)]}},_C=(t,e)=>{t.type===4?t.isStatic?t.content=e+t.content:t.content=`\`${e}\${${t.content}}\``:(t.children.unshift(`'${e}' + (`),t.children.push(")"))},c_e=(t,e)=>{if(t.type===0||t.type===1||t.type===11||t.type===10)return()=>{const s=t.children;let n,i=!1;for(let o=0;o<s.length;o++){const r=s[o];if(Cm(r)){i=!0;for(let c=o+1;c<s.length;c++){const h=s[c];if(Cm(h))n||(n=s[o]=Br([r],r.loc)),n.children.push(" + ",h),s.splice(c,1),c--;else{n=void 0;break}}}}if(!(!i||s.length===1&&(t.type===0||t.type===1&&t.tagType===0&&!t.props.find(o=>o.type===7&&!e.directiveTransforms[o.name])&&t.tag!=="template")))for(let o=0;o<s.length;o++){const r=s[o];if(Cm(r)||r.type===8){const c=[];(r.type!==2||r.content!==" ")&&c.push(r),!e.ssr&&ar(r,e)===0&&c.push("1"),s[o]={type:12,content:r,loc:r.loc,codegenNode:zn(e.helper(pv),c)}}}}},xC=new WeakSet,d_e=(t,e)=>{if(t.type===1&&Wi(t,"once",!0))return xC.has(t)||e.inVOnce||e.inSSR?void 0:(xC.add(t),e.inVOnce=!0,e.helper(sf),()=>{e.inVOnce=!1;const s=e.currentNode;s.codegenNode&&(s.codegenNode=e.cache(s.codegenNode,!0,!0))})},cx=(t,e,s)=>{const{exp:n,arg:i}=t;if(!n)return s.onError(dn(41,t.loc)),om();const o=n.loc.source.trim(),r=n.type===4?n.content:o,c=s.bindingMetadata[o];if(c==="props"||c==="props-aliased")return s.onError(dn(44,n.loc)),om();if(!r.trim()||!tx(n))return s.onError(dn(42,n.loc)),om();const h=i||ms("modelValue",!0),f=i?Gi(i)?`onUpdate:${ln(i.content)}`:Br(['"onUpdate:" + ',i]):"onUpdate:modelValue";let v;const g=s.isTS?"($event: any)":"$event";v=Br([`${g} => ((`,n,") = $event)"]);const y=[jn(h,t.exp),jn(f,v)];if(t.modifiers.length&&e.tagType===1){const x=t.modifiers.map(P=>P.content).map(P=>(Mf(P)?P:JSON.stringify(P))+": true").join(", "),E=i?Gi(i)?`${i.content}Modifiers`:Br([i,' + "Modifiers"']):"modelModifiers";y.push(jn(E,ms(`{ ${x} }`,!1,t.loc,2)))}return om(y)};function om(t=[]){return{props:t}}const h_e=/[\w).+\-_$\]]/,f_e=(t,e)=>{wu("COMPILER_FILTERS",e)&&(t.type===5?yg(t.content,e):t.type===1&&t.props.forEach(s=>{s.type===7&&s.name!=="for"&&s.exp&&yg(s.exp,e)}))};function yg(t,e){if(t.type===4)wC(t,e);else for(let s=0;s<t.children.length;s++){const n=t.children[s];typeof n=="object"&&(n.type===4?wC(n,e):n.type===8?yg(t,e):n.type===5&&yg(n.content,e))}}function wC(t,e){const s=t.content;let n=!1,i=!1,o=!1,r=!1,c=0,h=0,f=0,v=0,g,y,x,E,P=[];for(x=0;x<s.length;x++)if(y=g,g=s.charCodeAt(x),n)g===39&&y!==92&&(n=!1);else if(i)g===34&&y!==92&&(i=!1);else if(o)g===96&&y!==92&&(o=!1);else if(r)g===47&&y!==92&&(r=!1);else if(g===124&&s.charCodeAt(x+1)!==124&&s.charCodeAt(x-1)!==124&&!c&&!h&&!f)E===void 0?(v=x+1,E=s.slice(0,x).trim()):I();else{switch(g){case 34:i=!0;break;case 39:n=!0;break;case 96:o=!0;break;case 40:f++;break;case 41:f--;break;case 91:h++;break;case 93:h--;break;case 123:c++;break;case 125:c--;break}if(g===47){let D=x-1,F;for(;D>=0&&(F=s.charAt(D),F===" ");D--);(!F||!h_e.test(F))&&(r=!0)}}E===void 0?E=s.slice(0,x).trim():v!==0&&I();function I(){P.push(s.slice(v,x).trim()),v=x+1}if(P.length){for(x=0;x<P.length;x++)E=p_e(E,P[x],e);t.content=E,t.ast=void 0}}function p_e(t,e,s){s.helper(bv);const n=e.indexOf("(");if(n<0)return s.filters.add(e),`${ud(e,"filter")}(${t})`;{const i=e.slice(0,n),o=e.slice(n+1);return s.filters.add(i),`${ud(i,"filter")}(${t}${o!==")"?","+o:o}`}}const EC=new WeakSet,m_e=(t,e)=>{if(t.type===1){const s=Wi(t,"memo");return!s||EC.has(t)||e.inSSR?void 0:(EC.add(t),()=>{const n=t.codegenNode||e.currentNode.codegenNode;n&&n.type===13&&(t.tagType!==1&&Cv(n,e),t.codegenNode=zn(e.helper(kv),[s.exp,Ru(void 0,n),"_cache",String(e.cached.length)]),e.cached.push(null))})}},EP=(t,e)=>{if(t.type===1){for(const s of t.props)if(s.type===7&&s.name==="bind"&&(!s.exp||s.exp.type===4&&!s.exp.content.trim())&&s.arg){const n=s.arg;if(n.type!==4||!n.isStatic)e.onError(dn(52,n.loc)),s.exp=ms("",!0,n.loc);else{const i=ln(n.content);(ex.test(i[0])||i[0]==="-")&&(s.exp=ms(i,!1,n.loc))}}}};function SP(t){return[[EP,d_e,t_e,m_e,n_e,f_e,u_e,bP,mP,c_e],{on:ux,bind:wP,model:cx}]}function kP(t,e={}){const s=e.onError||Q_,n=e.mode==="module";e.prefixIdentifiers===!0?s(dn(47)):n&&s(dn(48));const i=!1;e.cacheHandlers&&s(dn(49)),e.scopeId&&!n&&s(dn(50));const o=Cs({},e,{prefixIdentifiers:i}),r=os(t)?ix(t,o):t,[c,h]=SP();return oP(r,Cs({},o,{nodeTransforms:[...c,...e.nodeTransforms||[]],directiveTransforms:Cs({},h,e.directiveTransforms||{})})),uP(r,o)}const g_e={DATA:"data",PROPS:"props",PROPS_ALIASED:"props-aliased",SETUP_LET:"setup-let",SETUP_CONST:"setup-const",SETUP_REACTIVE_CONST:"setup-reactive-const",SETUP_MAYBE_REF:"setup-maybe-ref",SETUP_REF:"setup-ref",OPTIONS:"options",LITERAL_CONST:"literal-const"},CP=()=>({props:[]});/** 74* @vue/compiler-dom v3.5.24 75* (c) 2018-present Yuxi (Evan) You and Vue contributors 76* @license MIT
77**/const dx=Symbol(""),hx=Symbol(""),fx=Symbol(""),px=Symbol(""),_g=Symbol(""),mx=Symbol(""),gx=Symbol(""),vx=Symbol(""),bx=Symbol(""),yx=Symbol("");MD({[dx]:"vModelRadio",[hx]:"vModelCheckbox",[fx]:"vModelText",[px]:"vModelSelect",[_g]:"vModelDynamic",[mx]:"withModifiers",[gx]:"withKeys",[vx]:"vShow",[bx]:"Transition",[yx]:"TransitionGroup"});let wc;function v_e(t,e=!1){return wc||(wc=document.createElement("div")),e?(wc.innerHTML=`<div foo="${t.replace(/"/g,""")}">`,wc.children[0].getAttribute("foo")):(wc.innerHTML=t,wc.textContent)}const _x={parseMode:"html",isVoidTag:DA,isNativeTag:t=>TA(t)||AA(t)||OA(t),isPreTag:t=>t==="pre",isIgnoreNewlineTag:t=>t==="pre"||t==="textarea",decodeEntities:v_e,isBuiltInComponent:t=>{if(t==="Transition"||t==="transition")return bx;if(t==="TransitionGroup"||t==="transition-group")return yx},getNamespace(t,e,s){let n=e?e.ns:s;if(e&&n===2)if(e.tag==="annotation-xml"){if(t==="svg")return 1;e.props.some(i=>i.type===6&&i.name==="encoding"&&i.value!=null&&(i.value.content==="text/html"||i.value.content==="application/xhtml+xml"))&&(n=0)}else/^m(?:[ions]|text)$/.test(e.tag)&&t!=="mglyph"&&t!=="malignmark"&&(n=0);else e&&n===1&&(e.tag==="foreignObject"||e.tag==="desc"||e.tag==="title")&&(n=0);if(n===0){if(t==="svg")return 1;if(t==="math")return 2}return n}},TP=t=>{t.type===1&&t.props.forEach((e,s)=>{e.type===6&&e.name==="style"&&e.value&&(t.props[s]={type:7,name:"bind",arg:ms("style",!0,e.loc),exp:b_e(e.value.content,e.loc),modifiers:[],loc:e.loc})})},b_e=(t,e)=>{const s=t_(t);return ms(JSON.stringify(s),!1,e,3)};function bo(t,e){return dn(t,e)}const y_e={X_V_HTML_NO_EXPRESSION:53,53:"X_V_HTML_NO_EXPRESSION",X_V_HTML_WITH_CHILDREN:54,54:"X_V_HTML_WITH_CHILDREN",X_V_TEXT_NO_EXPRESSION:55,55:"X_V_TEXT_NO_EXPRESSION",X_V_TEXT_WITH_CHILDREN:56,56:"X_V_TEXT_WITH_CHILDREN",X_V_MODEL_ON_INVALID_ELEMENT:57,57:"X_V_MODEL_ON_INVALID_ELEMENT",X_V_MODEL_ARG_ON_ELEMENT:58,58:"X_V_MODEL_ARG_ON_ELEMENT",X_V_MODEL_ON_FILE_INPUT_ELEMENT:59,59:"X_V_MODEL_ON_FILE_INPUT_ELEMENT",X_V_MODEL_UNNECESSARY_VALUE:60,60:"X_V_MODEL_UNNECESSARY_VALUE",X_V_SHOW_NO_EXPRESSION:61,61:"X_V_SHOW_NO_EXPRESSION",X_TRANSITION_INVALID_CHILDREN:62,62:"X_TRANSITION_INVALID_CHILDREN",X_IGNORED_SIDE_EFFECT_TAG:63,63:"X_IGNORED_SIDE_EFFECT_TAG",__EXTEND_POINT__:64,64:"__EXTEND_POINT__"},__e={53:"v-html is missing expression.",54:"v-html will override element children.",55:"v-text is missing expression.",56:"v-text will override element children.",57:"v-model can only be used on <input>, <textarea> and <select> elements.",58:"v-model argument is not supported on plain elements.",59:"v-model cannot be used on file inputs since they are read-only. Use a v-on:change listener instead.",60:"Unnecessary value binding used alongside v-model. It will interfere with v-model's behavior.",61:"v-show is missing expression.",62:"<Transition> expects exactly one child element or component.",63:"Tags with side effect (<script> and <style>) are ignored in client component templates."},x_e=(t,e,s)=>{const{exp:n,loc:i}=t;return n||s.onError(bo(53,i)),e.children.length&&(s.onError(bo(54,i)),e.children.length=0),{props:[jn(ms("innerHTML",!0,i),n||ms("",!0))]}},w_e=(t,e,s)=>{const{exp:n,loc:i}=t;return n||s.onError(bo(55,i)),e.children.length&&(s.onError(bo(56,i)),e.children.length=0),{props:[jn(ms("textContent",!0),n?ar(n,s)>0?n:zn(s.helperString(If),[n],i):ms("",!0))]}},E_e=(t,e,s)=>{const n=cx(t,e,s);if(!n.props.length||e.tagType===1)return n;t.arg&&s.onError(bo(58,t.arg.loc));const{tag:i}=e,o=s.isCustomElement(i);if(i==="input"||i==="textarea"||i==="select"||o){let r=fx,c=!1;if(i==="input"||o){const h=Nf(e,"type");if(h){if(h.type===7)r=_g;else if(h.value)switch(h.value.content){case"radio":r=dx;break;case"checkbox":r=hx;break;case"file":c=!0,s.onError(bo(59,t.loc));break}}else GD(e)&&(r=_g)}else i==="select"&&(r=px);c||(n.needRuntime=s.helper(r))}else s.onError(bo(57,t.loc));return n.props=n.props.filter(r=>!(r.key.type===4&&r.key.content==="modelValue")),n},S_e=ri("passive,once,capture"),k_e=ri("stop,prevent,self,ctrl,shift,alt,meta,exact,middle"),C_e=ri("left,right"),AP=ri("onkeyup,onkeydown,onkeypress"),T_e=(t,e,s,n)=>{const i=[],o=[],r=[];for(let c=0;c<e.length;c++){const h=e[c].content;h==="native"&&od("COMPILER_V_ON_NATIVE",s)||S_e(h)?r.push(h):C_e(h)?Gi(t)?AP(t.content.toLowerCase())?i.push(h):o.push(h):(i.push(h),o.push(h)):k_e(h)?o.push(h):i.push(h)}return{keyModifiers:i,nonKeyModifiers:o,eventOptionModifiers:r}},SC=(t,e)=>Gi(t)&&t.content.toLowerCase()==="onclick"?ms(e,!0):t.type!==4?Br(["(",t,`) === "onClick" ? "${e}" : (`,t,")"]):t,A_e=(t,e,s)=>ux(t,e,s,n=>{const{modifiers:i}=t;if(!i.length)return n;let{key:o,value:r}=n.props[0];const{keyModifiers:c,nonKeyModifiers:h,eventOptionModifiers:f}=T_e(o,i,s,t.loc);if(h.includes("right")&&(o=SC(o,"onContextmenu")),h.includes("middle")&&(o=SC(o,"onMouseup")),h.length&&(r=zn(s.helper(mx),[r,JSON.stringify(h)])),c.length&&(!Gi(o)||AP(o.content.toLowerCase()))&&
77(r=zn(s.helper(gx),[r,JSON.stringify(c)])),f.length){const v=f.map(Tl).join("");o=Gi(o)?ms(`${o.content}${v}`,!0):Br(["(",o,`) + "${v}"`])}return{props:[jn(o,r)]}}),O_e=(t,e,s)=>{const{exp:n,loc:i}=t;return n||s.onError(bo(61,i)),{props:[],needRuntime:s.helper(vx)}},D_e=(t,e)=>{t.type===1&&t.tagType===0&&(t.tag==="script"||t.tag==="style")&&e.removeNode()},OP=[TP],DP={cloak:CP,html:x_e,text:w_e,model:E_e,on:A_e,show:O_e};function P_e(t,e={}){return kP(t,Cs({},_x,e,{nodeTransforms:[D_e,...OP,...e.nodeTransforms||[]],directiveTransforms:Cs({},DP,e.directiveTransforms||{}),transformHoist:null}))}function $_e(t,e={}){return ix(t,Cs({},_x,e))}const I_e=Object.freeze(Object.defineProperty({__proto__:null,BASE_TRANSITION:z_,BindingTypes:g_e,CAMELIZE:pg,CAPITALIZE:OD,CREATE_BLOCK:Y_,CREATE_COMMENT:xd,CREATE_ELEMENT_BLOCK:q_,CREATE_ELEMENT_VNODE:fv,CREATE_SLOTS:K_,CREATE_STATIC:G_,CREATE_TEXT:pv,CREATE_VNODE:hv,CompilerDeprecationTypes:Z0e,ConstantTypes:z0e,DOMDirectiveTransforms:DP,DOMErrorCodes:y_e,DOMErrorMessages:__e,DOMNodeTransforms:OP,ElementTypes:W0e,ErrorCodes:s1e,FRAGMENT:id,GUARD_REACTIVE_PROPS:wd,IS_MEMO_SAME:J_,IS_REF:ID,KEEP_ALIVE:ef,MERGE_PROPS:tf,NORMALIZE_CLASS:xv,NORMALIZE_PROPS:rd,NORMALIZE_STYLE:wv,Namespaces:j0e,No
77deTypes:H0e,OPEN_BLOCK:xl,POP_SCOPE_ID:PD,PUSH_SCOPE_ID:DD,RENDER_LIST:_v,RENDER_SLOT:X_,RESOLVE_COMPONENT:mv,RESOLVE_DIRECTIVE:vv,RESOLVE_DYNAMIC_COMPONENT:gv,RESOLVE_FILTER:bv,SET_BLOCK_TRACKING:sf,SUSPENSE:dv,TELEPORT:jc,TO_DISPLAY_STRING:If,TO_HANDLERS:Ev,TO_HANDLER_KEY:mg,TRANSITION:bx,TRANSITION_GROUP:yx,TS_NODE_TYPES:UD,UNREF:$D,V_MODEL_CHECKBOX:hx,V_MODEL_DYNAMIC:_g,V_MODEL_RADIO:dx,V_MODEL_SELECT:px,V_MODEL_TEXT:fx,V_ON_WITH_KEYS:gx,V_ON_WITH_MODIFIERS:mx,V_SHOW:vx,WITH_CTX:Sv,WITH_DIRECTIVES:yv,WITH_MEMO:kv,advancePositionWithClone:_1e,advancePositionWithMutation:qD,assert:x1e,baseCompile:kP,baseParse:ix,buildDirectiveArgs:_P,buildProps:lx,buildSlots:gP,checkCompatEnabled:od,compile:P_e,convertToBlock:Cv,createArrayExpression:gl,createAssignmentExpression:X0e,createBlockStatement:RD,createCacheExpression:LD,createCallExpression:zn,createCompilerError:dn,createCompoundExpression:Br,createConditionalExpression:gg,createDOMCompilerError:bo,createForLoopParams:bg,createFunctionExpression:Ru,createIfStatement:G0e,createInterpolation:Y0e,createObjectExpression:br,createObjectProperty:jn,createReturnStatement:J0e,createRoot:ND,createSequenceExpression:K0e,createSimpleExpression:ms,createStructuralDirectiveTransform:rx,createTemplateLiteral:q0e,createTransformContext:aP,createVNodeCall:ad,errorMessages:n1e,extractIdentifiers:Ia,findDir:Wi,findProp:Nf,forAliasRE:JD,generate:uP,generateCodeFrame:CA,getBaseTransformPreset:SP,getConstantType:ar,getMemoedVNodeCall:KD,getVNodeBlockHelper:Vu,getVNodeHelper:Fu,hasDynamicKeyVBind:GD,hasScopeRef:oa,helperNameMap:Lu,injectProp:rf,isCoreComponent:Z_,isFnExpression:YD,isFnExpressionBrowser:zD,isFnExpressionNode:y1e,isFunctionType:h1e,isInDestructureAssignment:a1e,isInNewExpression:o1e,isMemberExpression:tx,isMemberExpressionBrowser:WD,isMemberExpressionNode:v1e,isReferencedIdentifier:r1e,isSimpleIdentifier:Mf,isSlotOutlet:nf,isStaticArgOf:hl,isStaticExp:Gi,isStaticProperty:BD,isStaticPropertyKey:f1e,isTemplateNode:ld,isText:Cm,isVPre:v1,isVSlot:sx,locStub:ei,noopDirectiveTransform:CP,parse:$_e,parserOptions:_x,processExpression:Dm,processFor:pP,processIf:fP,processSlotOutlet:xP,registerRuntimeHelpers:MD,resolveComponentType:yP,stringifyExpression:hP,toValidAssetId:ud,trackSlotScopes:mP,trackVForSlotScopes:r_e,transform:oP,transformBind:wP,transformElement:bP,transformExpression:e_e,transformModel:cx,transformOn:ux,transformStyle:TP,transformVBindShorthand:EP,traverseNode:Lf,unwrapTSNode:jD,validFirstIdentCharRE:ex,walkBlockDeclarations:VD,walkFunctionParams:l1e,walkIdentifiers:i1e,warnDeprecation:t1e},Symbol.toStringTag,{value:"Module"})),M_e=Ig(I_e),N_e=Ig(yU),L_e=Ig(dV);/** 78* vue v3.5.24 79* (c) 2018-present Yuxi (Evan) You and Vue contributors 80* @license MIT
81**/var kC;function R_e(){return kC||(kC=1,(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=M_e,s=N_e,n=L_e;function i(h){var f=Object.create(null);if(h)for(var v in h)f[v]=h[v];return f.default=h,Object.freeze(f)}var o=i(s);const r=Object.create(null);function c(h,f){if(!n.isString(h))if(h.nodeType)h=h.innerHTML;else return n.NOOP;const v=n.genCacheKey(h,f),g=r[v];if(g)return g;if(h[0]==="#"){const P=document.querySelector(h);h=P?P.innerHTML:""}const y=n.extend({hoistStatic:!0,onError:void 0,onWarn:n.NOOP},f);!y.isCustomElement&&typeof customElements<"u"&&(y.isCustomElement=P=>!!customElements.get(P));const{code:x}=e.compile(h,y),E=new Function("Vue",x)(o);return E._rc=!0,r[v]=E}s.registerRuntimeCompiler(c),t.compile=c,Object.keys(s).forEach(function(h){h!=="default"&&!Object.prototype.hasOwnProperty.call(t,h)&&(t[h]=s[h])})})(u0)),u0}var CC;function xx(){return CC||(CC=1,l0.exports=R_e()),l0.exports}var TC;function F_e(){return TC||(TC=1,(function(t,e){(function(s,n){t.exports=n(AD(),xx())})(self,((s,n)=>(()=>{var i={879:h=>{h.exports=s}
81,744:h=>{h.exports=n}},o={};function r(h){var f=o[h];if(f!==void 0)return f.exports;var v=o[h]={exports:{}};return i[h](v,v.exports,r),v.exports}r.n=h=>{var f=h&&h.__esModule?()=>h.default:()=>h;return r.d(f,{a:f}),f},r.d=(h,f)=>{for(var v in f)r.o(f,v)&&!r.o(h,v)&&Object.defineProperty(h,v,{enumerable:!0,get:f[v]})},r.o=(h,f)=>Object.prototype.hasOwnProperty.call(h,f),r.r=h=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(h,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(h,"__esModule",{value:!0})};var c={};return(()=>{r.r(c),r.d(c,{Chart:()=>P,default:()=>I});var h=r(879),f=r.n(h),v=function D(F,C){var A=f().isArray(F)?[]:{};function O(j,te){!f().isObject(j,!C)||f().isClass(j)||f().isDOMElement(j)?A[te]=j:A[te]=D(j,C)}return f().isArray(F)?F.forEach((function(j,te){return O(j,te)})):f().objectEach(F,O),A},g=r(744);function y(D){return(function(F){if(Array.isArray(F))return x(F)})(D)||(function(F){if(typeof Symbol<"u"&&F[Symbol.iterator]!=null||F["@@iterator"]!=null)return Array.from(F)})(D)||(function(F,C){if(F){if(typeof F=="string")return x(F,C);var A=Object.prototype.toString.call(F).slice(8,-1);if(A==="Object"&&F.constructor&&(A=F.constructor.name),A==="Map"||A==="Set")return Array.from(F);if(A==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(A))return x(F,C)}})(D)||(function(){throw new TypeError(`Invalid attempt to spread non-iterable instance. 82In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)})()}function x(D,F){(F==null||F>D.length)&&(F=D.length);for(var C=0,A=new Array(F);C<F;C++)A[C]=D[C];return A}const E=function(D){var F=this;return{render:function(){return(0,g.h)("div",{ref:"chart"})},beforeUnmount:function(){var C;return F==null||(C=F.chart)===null||C===void 0?void 0:C.destroy()},props:{constructorType:{type:String,default:"chart"},options:{type:Object,required:!0},callback:Function,updateArgs:{type:Array,default:function(){return[!0,!0]}},highcharts:{type:Object},deepCopyOnUpdate:{type:Boolean,default:!0}},watch:{options:{handler:function(C){var A;(A=this.chart).update.apply(A,[v(C,this.deepCopyOnUpdate)].concat(y(this.updateArgs)))},deep:!0}},mounted:function(){var C=this.highcharts||D;C[this.constructorType]?this.options?this.chart=C[this.constructorType](this.$refs.chart,v(this.options,!0),this.callback?this.callback:null):console.error('The "options" parameter was not passed.'):console.error("'".concat(this.constructorType,"' constructor-type is
82incorrect. Sometimes this error is caused by the fact, that the corresponding module wasn't imported."))}}};var P=E(f());function I(D){var F=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};D.component(F.tagName||"highcharts",E(F.highcharts||f()))}})(),c})()))})(o0)),o0.exports}var V_e=F_e();const B_e=fd(V_e);var d0={exports:{}};/*! 83 * @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved. 84 * For licensing, see LICENSE.md. 85 */var AC;function U_e(){return AC||(AC=1,(function(t,e){(function(s,n){t.exports=n(xx())})(self,s=>(()=>{var n={976:c=>{c.exports=s}},i={};function o(c){var h=i[c];if(h!==void 0)return h.exports;var f=i[c]={exports:{}};return n[c](f,f.exports,o),f.exports}o.d=(c,h)=>{for(var f in h)o.o(h,f)&&!o.o(c,f)&&Object.defineProperty(c,f,{enumerable:!0,get:h[f]})},o.o=(c,h)=>Object.prototype.hasOwnProperty.call(c,h);var r={};return(()=>{o.d(r,{default:()=>he});var c=o(976);const h=function(oe){var K=typeof oe;return oe!=null&&(K=="object"||K=="function")},f=typeof dl=="object"&&dl&&dl.Object===Object&&dl;var v=typeof self=="object"&&self&&self.Object===Object&&self;const g=f||v||Function("return this")(),y=function(){return g.Date.now()};var x=/\s/;const E=function(oe){for(var K=oe.length;K--&&x.test(oe.charAt(K)););return K};var P=/^\s+/;const I=function(oe){return oe&&oe.slice(0,E(oe)+1).replace(P,"")},D=g.Symbol;var F=Object.prototype,C=F.hasOwnProperty,A=F.toString,O=D?D.toStringTag:void 0;const j=function(oe){var K=C.call(oe,O),H=oe[O];try{oe[O]=void 0;var Ee=!0}catch{}var _e=A.call(oe);return Ee&&(K?oe[O]=H:delete oe[O]),_e};var te=Object.prototype.toString;const B=function(oe){return te.call(oe)};var z=D?D.toStringTag:void 0;const re=function(oe){return oe==null?oe===void 0?"[object Undefined]":"[object Null]":z&&z in Object(oe)?j(oe):B(oe)},ne=function(oe){return oe!=null&&typeof oe=="object"},X=function(oe){return typeof oe=="symbol"||ne(oe)&&re(oe)=="[object Symbol]"};var G=/^[-+]0x[0-9a-f]+$/i,ce=/^0b[01]+$/i,be=/^0o[0-7]+$/i,J=parseInt;const Z=function(oe){if(typeof oe=="number")return oe;if(X(oe))return NaN;if(h(oe)){var K=typeof oe.valueOf=="function"?oe.valueOf():oe;oe=h(K)?K+"":K}if(typeof oe!="string")return oe===0?oe:+oe;oe=I(oe);var H=ce.test(oe);return H||be.test(oe)?J(oe.slice(2),H?2:8):G.test(oe)?NaN:+oe};var ge=Math.max,q=Math.min;const W=function(oe,K,H){var Ee,_e,Ce,Re,Ke,Be,Te=0,Q=!1,Se=!1,Ve=!0;if(typeof oe!="function")throw new TypeError("Expected a function");function Qe(We){var ot=Ee,ht=_e;return Ee=_e=void 0,Te=We,Re=oe.apply(ht,ot)}function je(We){return Te=We,Ke=setTimeout(ft,K),Q?Qe(We):Re}function nt(We){var ot=We-Be;return Be===void 0||ot>=K||ot<0||Se&&We-Te>=Ce}function ft(){var We=y();if(nt(We))return ut(We);Ke=setTimeout(ft,(function(ot){var ht=K-(ot-Be);return Se?q(ht,Ce-(ot-Te)):ht})(We))}function ut(We){return Ke=void 0,Ve&&Ee?Qe(We):(Ee=_e=void 0,Re)}function Ye(){var We=y(),ot=nt(We);if(Ee=arguments,_e=this,Be=We,ot){if(Ke===void 0)return je(Be);if(Se)return clearTimeout(Ke),Ke=setTimeout(ft,K),Qe(Be)}return Ke===void 0&&(Ke=setTimeout(ft,K)),Re}return K=Z(K)||0,h(H)&&(Q=!0,Ce=(Se="maxWait"in H)?ge(Z(H.maxWait)||0,K):Ce,Ve="trailing"in H?!!H.trailing:Ve),Ye.cancel=function(){Ke!==void 0&&clearTimeout(Ke),Te=0,Ee=Be=_e=Ke=void 0},Ye.flush=function(){return Ke===void 0?Re:ut(y())},Ye},M=(0,c.defineComponent)({name:"Ckeditor",model:{prop:"modelValue",event:"update:modelValue"},props:{editor:{type:Function,required:!0},config:{type:Object,default:()=>({})},modelValue:{type:String,default:""},tagName:{type:String,default:"div"},disabled:{type:Boolean,default:!1},disableTwoWayDataBinding:{type:Boolean,default:!1}},emits:["ready","destroy","blur","focus","input","update:modelValue"],data:()=>({instance:null,lastEditorData:null}),watch:{modelValue(oe){this.instance&&oe!==this.lastEditorData&&this.instance.data.set(oe)},disabled(oe){oe?this.instance.enableReadOnlyMode("Integration Sample"):this.instance.disableReadOnlyMode("Integration Sample")}},created(){const{CKEDITOR_VERSION:oe}=window;if(oe){const[K]=oe.split(".").map(Number);K<37&&console.warn("The <CKEditor> component requires using CKEditor 5 in version 37 or higher.")}else console.warn('Cannot find the "CKEDITOR_VERSION" in the "window" scope.')}
85,mounted(){const oe=Object.assign({},this.config);this.modelValue&&(oe.initialData=this.modelValue),this.editor.create(this.$el,oe).then(K=>{this.instance=(0,c.markRaw)(K),this.setUpEditorEvents(),this.modelValue!==oe.initialData&&K.data.set(this.modelValue),this.disabled&&K.enableReadOnlyMode("Integration Sample"),this.$emit("ready",K)}).catch(K=>{console.error(K)})},beforeUnmount(){this.instance&&(this.instance.destroy(),this.instance=null),this.$emit("destroy",this.instance)},methods:{setUpEditorEvents(){const oe=this.instance,K=W(H=>{if(this.disableTwoWayDataBinding)return;const Ee=this.lastEditorData=oe.data.get();this.$emit("update:modelValue",Ee,H,oe),this.$emit("input",Ee,H,oe)},300,{leading:!0});oe.model.document.on("change:data",K),oe.editing.view.document.on("focus",H=>{this.$emit("focus",H,oe)}),oe.editing.view.document.on("blur",H=>{this.$emit("blur",H,oe)})}},render(){return(0,c.h)(this.tagName)}});if(!c.version||!c.version.startsWith("3."))throw new Error("The CKEditor plugin works only with Vue 3+. For more information, please refer to https://ckeditor.com/docs/ckeditor5/latest/builds/guides/integration/frameworks/vuejs-v3.html");const he={install(oe){oe.component("Ckeditor",M)},component:M}})(),r=r.default})())})(d0)),d0.exports}var j_e=U_e();const H_e=fd(j_e);var $m={exports:{}};/**! 86 * Sortable 1.14.0 87 * @author RubaXa <[email protected]> 88 * @author owenm <[email protected]> 89 * @license MIT 90 */function OC(t,e){var s=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),s.push.apply(s,n)}return s}function Ua(t){for(var e=1;e<arguments.length;e++){var s=arguments[e]!=null?arguments[e]:{};e%2?OC(Object(s),!0).forEach(function(n){W_e(t,n,s[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(s)):OC(Object(s)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(s,n))})}return t}function Im(t){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Im=function(e){return typeof e}:Im=function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Im(t)}function W_e(t,e,s){return e in t?Object.defineProperty(t,e,{value:s,enumerable:!0,configurable:!0,writable:!0}):t[e]=s,t}function zr(){return zr=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var s=arguments[e];for(var n in s)Object.prototype.hasOwnProperty.call(s,n)&&(t[n]=s[n])}return t},zr.apply(this,arguments)}function z_e(t,e){if(t==null)return{};var s={},n=Object.keys(t),i,o;for(o=0;o<n.length;o++)i=n[o],!(e.indexOf(i)>=0)&&(s[i]=t[i]);return s}function Y_e(t,e){if(t==null)return{};var s=z_e(t,e),n,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(i=0;i<o.length;i++)n=o[i],!(e.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(t,n)&&(s[n]=t[n])}return s}function q_e(t){return G_e(t)||X_e(t)||K_e(t)||J_e()}function G_e(t){if(Array.isArray(t))return w1(t)}function X_e(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function K_e(t,e){if(t){if(typeof t=="string")return w1(t,e);var s=Object.prototype.toString.call(t).slice(8,-1);if(s==="Object"&&t.constructor&&(s=t.constructor.name),s==="Map"||s==="Set")return Array.from(t);if(s==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(s))return w1(t,e)}}function w1(t,e){(e==null||e>t.length)&&(e=t.length);for(var s=0,n=new Array(e);s<e;s++)n[s]=t[s];return n}function J_e(){throw new TypeError(`Invalid attempt to spread non-iterable instance. 91In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var Q_e="1.14.0";function yo(t){if(typeof window<"u"&&window.navigator)return!!navigator.userAgent.match(t)}var Po=yo(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),Ff=yo(/Edge/i),DC=yo(/firefox/i),Mh=yo(/safari/i)&&!yo(/chrome/i)&&!yo(/android/i),PP=yo(/iP(ad|od|hone)/i),Z_e=yo(/chrome/i)&&yo(/android/i),$P={capture:!1,passive:!1};function Ps(t,e,s){t.addEventListener(e,s,!Po&&$P)}function ks(t,e,s){t.removeEventListener(e,s,!Po&&$P)}function xg(t,e){if(e){if(e[0]===">"&&(e=e.substring(1)),t)try{if(t.matches)return t.matches(e);
vendor: 4,539 bytes, line 91
91if(t.msMatchesSelector)return t.msMatchesSelector(e);if(t.webkitMatchesSelector)return t.webkitMatchesSelector(e)}catch{return!1}return!1}}function exe(t){return t.host&&t!==document&&t.host.nodeType?t.host:t.parentNode}function la(t,e,s,n){if(t){s=s||document;do{if(e!=null&&(e[0]===">"?t.parentNode===s&&xg(t,e):xg(t,e))||n&&t===s)return t;if(t===s)break}while(t=exe(t))}return null}var PC=/\s+/g;function _n(t,e,s){if(t&&e)if(t.classList)t.classList[s?"add":"remove"](e);else{var n=(" "+t.className+" ").replace(PC," ").replace(" "+e+" "," ");t.className=(n+(s?" "+e:"")).replace(PC," ")}}function Yt(t,e,s){var n=t&&t.style;if(n){if(s===void 0)return document.defaultView&&document.defaultView.getComputedStyle?s=document.defaultView.getComputedStyle(t,""):t.currentStyle&&(s=t.currentStyle),e===void 0?s:s[e];!(e in n)&&e.indexOf("webkit")===-1&&(e="-webkit-"+e),n[e]=s+(typeof s=="string"?"":"px")}}function Eu(t,e){var s="";if(typeof t=="string")s=t;else do{var n=Yt(t,"transform");n&&n!=="none"&&(s=n+" "+s)}while(!e&&(t=t.parentNode));var i=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return i&&new i(s)}function IP(t,e,s){if(t){var n=t.getElementsByTagName(e),i=0,o=n.length;if(s)for(;i<o;i++)s(n[i],i);return n}return[]}function Fa(){var t=document.scrollingElement;return t||document.documentElement}function bn(t,e,s,n,i){if(!(!t.getBoundingClientRect&&t!==window)){var o,r,c,h,f,v,g;if(t!==window&&t.parentNode&&t!==Fa()?(o=t.getBoundingClientRect(),r=o.top,c=o.left,h=o.bottom,f=o.right,v=o.height,g=o.width):(r=0,c=0,h=window.innerHeight,f=window.innerWidth,v=window.innerHeight,g=window.innerWidth),(e||s)&&t!==window&&(i=i||t.parentNode,!Po))do if(i&&i.getBoundingClientRect&&(Yt(i,"transform")!=="none"||s&&Yt(i,"position")!=="static")){var y=i.getBoundingClientRect();r-=y.top+parseInt(Yt(i,"border-top-width")),c-=y.left+parseInt(Yt(i,"border-left-width")),h=r+o.height,f=c+o.width;break}while(i=i.parentNode);if(n&&t!==window){var x=Eu(i||t),E=x&&x.a,P=x&&x.d;x&&(r/=P,c/=E,g/=E,v/=P,h=r+v,f=c+g)}return{top:r,left:c,bottom:h,right:f,width:g,height:v}}}function $C(t,e,s){for(var n=fl(t,!0),i=bn(t)[e];n;){var o=bn(n)[s],r=void 0;if(r=i>=o,!r)return n;if(n===Fa())break;n=fl(n,!1)}return!1}function cd(t,e,s,n){for(var i=0,o=0,r=t.children;o<r.length;){if(r[o].style.display!=="none"&&r[o]!==is.ghost&&(n||r[o]!==is.dragged)&&la(r[o],s.draggable,t,!1)){if(i===e)return r[o];i++}o++}return null}function wx(t,e){for(var s=t.lastElementChild;s&&(s===is.ghost||Yt(s,"display")==="none"||e&&!xg(s,e));)s=s.previousElementSibling;return s||null}function Tn(t,e){var s=0;if(!t||!t.parentNode)return-1;for(;t=t.previousElementSibling;)t.nodeName.toUpperCase()!=="TEMPLATE"&&t!==is.clone&&(!e||xg(t,e))&&s++;return s}function IC(t){var e=0,s=0,n=Fa();if(t)do{var i=Eu(t),o=i.a,r=i.d;e+=t.scrollLeft*o,s+=t.scrollTop*r}while(t!==n&&(t=t.parentNode));return[e,s]}function txe(t,e){for(var s in t)if(t.hasOwnProperty(s)){for(var n in e)if(e.hasOwnProperty(n)&&e[n]===t[s][n])return Number(s)}return-1}function fl(t,e){if(!t||!t.getBoundingClientRect)return Fa();var s=t,n=!1;do if(s.clientWidth<s.scrollWidth||s.clientHeight<s.scrollHeight){var i=Yt(s);if(s.clientWidth<s.scrollWidth&&(i.overflowX=="auto"||i.overflowX=="scroll")||s.clientHeight<s.scrollHeight&&(i.overflowY=="auto"||i.overflowY=="scroll")){if(!s.getBoundingClientRect||s===document.body)return Fa();if(n||e)return s;n=!0}}while(s=s.parentNode);return Fa()}function sxe(t,e){if(t&&e)for(var s in e)e.hasOwnProperty(s)&&(t[s]=e[s]);return t}function h0(t,e){return Math.round(t.top)===Math.round(e.top)&&Math.round(t.left)===Math.round(e.left)&&Math.round(t.height)===Math.round(e.height)&&Math.round(t.width)===Math.round(e.width)}var Nh;function MP(t,e){return function(){if(!Nh){var s=arguments,n=this;s.length===1?t.call(n,s[0]):t.apply(n,s),Nh=setTimeout(function(){Nh=void 0},e)}}}function nxe(){clearTimeout(Nh),Nh=void 0}function NP(t,e,s){t.scrollLeft+=e,t.scrollTop+=s}function Ex(t){var e=window.Polymer,s=window.jQuery||window.Zepto;return e&&e.dom?e.dom(t).cloneNode(!0):s?s(t).clone(!0)[0]:t.cloneNode(!0)}function MC(t,e){Yt(t,"position","absolute"),Yt(t,"top",e.top),Yt(t,"left",e.left),Yt(t,"width",e.width),Yt(t,"height",e.height)}function f0(t){Yt(t,"position",""),Yt(t,"top",""),Yt(t,"left",""),Yt(t,"width",""),Yt(t,"height","")}var Oi="Sortable"+new Date().getTime();function ixe(){var t=[],e;return{captureAnimationState:function(){if(t=[],!!this.options.animation){var n=[].slice.call(this.el.children);
vendor: 4,657 bytes, line 91
91n.forEach(function(i){if(!(Yt(i,"display")==="none"||i===is.ghost)){t.push({target:i,rect:bn(i)});var o=Ua({},t[t.length-1].rect);if(i.thisAnimationDuration){var r=Eu(i,!0);r&&(o.top-=r.f,o.left-=r.e)}i.fromRect=o}})}},addAnimationState:function(n){t.push(n)},removeAnimationState:function(n){t.splice(txe(t,{target:n}),1)},animateAll:function(n){var i=this;if(!this.options.animation){clearTimeout(e),typeof n=="function"&&n();return}var o=!1,r=0;t.forEach(function(c){var h=0,f=c.target,v=f.fromRect,g=bn(f),y=f.prevFromRect,x=f.prevToRect,E=c.rect,P=Eu(f,!0);P&&(g.top-=P.f,g.left-=P.e),f.toRect=g,f.thisAnimationDuration&&h0(y,g)&&!h0(v,g)&&(E.top-g.top)/(E.left-g.left)===(v.top-g.top)/(v.left-g.left)&&(h=axe(E,y,x,i.options)),h0(g,v)||(f.prevFromRect=v,f.prevToRect=g,h||(h=i.options.animation),i.animate(f,E,g,h)),h&&(o=!0,r=Math.max(r,h),clearTimeout(f.animationResetTimer),f.animationResetTimer=setTimeout(function(){f.animationTime=0,f.prevFromRect=null,f.fromRect=null,f.prevToRect=null,f.thisAnimationDuration=null},h),f.thisAnimationDuration=h)}),clearTimeout(e),o?e=setTimeout(function(){typeof n=="function"&&n()},r):typeof n=="function"&&n(),t=[]},animate:function(n,i,o,r){if(r){Yt(n,"transition",""),Yt(n,"transform","");var c=Eu(this.el),h=c&&c.a,f=c&&c.d,v=(i.left-o.left)/(h||1),g=(i.top-o.top)/(f||1);n.animatingX=!!v,n.animatingY=!!g,Yt(n,"transform","translate3d("+v+"px,"+g+"px,0)"),this.forRepaintDummy=rxe(n),Yt(n,"transition","transform "+r+"ms"+(this.options.easing?" "+this.options.easing:"")),Yt(n,"transform","translate3d(0,0,0)"),typeof n.animated=="number"&&clearTimeout(n.animated),n.animated=setTimeout(function(){Yt(n,"transition",""),Yt(n,"transform",""),n.animated=!1,n.animatingX=!1,n.animatingY=!1},r)}}}}function rxe(t){return t.offsetWidth}function axe(t,e,s,n){return Math.sqrt(Math.pow(e.top-t.top,2)+Math.pow(e.left-t.left,2))/Math.sqrt(Math.pow(e.top-s.top,2)+Math.pow(e.left-s.left,2))*n.animation}var Ec=[],p0={initializeByDefault:!0},Vf={mount:function(e){for(var s in p0)p0.hasOwnProperty(s)&&!(s in e)&&(e[s]=p0[s]);Ec.forEach(function(n){if(n.pluginName===e.pluginName)throw"Sortable: Cannot mount plugin ".concat(e.pluginName," more than once")}),Ec.push(e)},pluginEvent:function(e,s,n){var i=this;this.eventCanceled=!1,n.cancel=function(){i.eventCanceled=!0};var o=e+"Global";Ec.forEach(function(r){s[r.pluginName]&&(s[r.pluginName][o]&&s[r.pluginName][o](Ua({sortable:s},n)),s.options[r.pluginName]&&s[r.pluginName][e]&&s[r.pluginName][e](Ua({sortable:s},n)))})},initializePlugins:function(e,s,n,i){Ec.forEach(function(c){var h=c.pluginName;if(!(!e.options[h]&&!c.initializeByDefault)){var f=new c(e,s,e.options);f.sortable=e,f.options=e.options,e[h]=f,zr(n,f.defaults)}});for(var o in e.options)if(e.options.hasOwnProperty(o)){var r=this.modifyOption(e,o,e.options[o]);typeof r<"u"&&(e.options[o]=r)}},getEventProperties:function(e,s){var n={};return Ec.forEach(function(i){typeof i.eventProperties=="function"&&zr(n,i.eventProperties.call(s[i.pluginName],e))}),n},modifyOption:function(e,s,n){var i;return Ec.forEach(function(o){e[o.pluginName]&&o.optionListeners&&typeof o.optionListeners[s]=="function"&&(i=o.optionListeners[s].call(e[o.pluginName],n))}),i}};function vh(t){var e=t.sortable,s=t.rootEl,n=t.name,i=t.targetEl,o=t.cloneEl,r=t.toEl,c=t.fromEl,h=t.oldIndex,f=t.newIndex,v=t.oldDraggableIndex,g=t.newDraggableIndex,y=t.originalEvent,x=t.putSortable,E=t.extraEventProperties;if(e=e||s&&s[Oi],!!e){var P,I=e.options,D="on"+n.charAt(0).toUpperCase()+n.substr(1);window.CustomEvent&&!Po&&!Ff?P=new CustomEvent(n,{bubbles:!0,cancelable:!0}):(P=document.createEvent("Event"),P.initEvent(n,!0,!0)),P.to=r||s,P.from=c||s,P.item=i||s,P.clone=o,P.oldIndex=h,P.newIndex=f,P.oldDraggableIndex=v,P.newDraggableIndex=g,P.originalEvent=y,P.pullMode=x?x.lastPutMode:void 0;var F=Ua(Ua({},E),Vf.getEventProperties(n,e));for(var C in F)P[C]=F[C];s&&s.dispatchEvent(P),I[D]&&I[D].call(e,P)}}var oxe=["evt"],er=function(e,s){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=n.evt,o=Y_e(n,oxe);Vf.pluginEvent.bind(is)(e,s,Ua({dragEl:Dt,parentEl:Sn,ghostEl:ys,rootEl:gn,nextEl:su,lastDownEl:Mm,cloneEl:kn,cloneHidden:cl,dragStarted:bh,putSortable:ui,activeSortable:is.active,originalEvent:i,oldIndex:Lc,oldDraggableIndex:Lh,newIndex:fr,newDraggableIndex:ul,hideGhostForTarget:VP,unhideGhostForTarget:BP,cloneNowHidden:function(){cl=!0},cloneNowShown:function(){cl=!1},dispatchSortableEvent:function(c){Ui({sortable:s,name:c,originalEvent:i})}},o))};function Ui(t){vh(Ua({putSortable:ui,cloneEl:kn,targetEl:Dt,rootEl:gn,oldIndex:Lc,oldDraggableIndex:Lh,newIndex:fr,newDraggableIndex:ul},t))}
vendor: 24,226 bytes, line 91
91var Dt,Sn,ys,gn,su,Mm,kn,cl,Lc,fr,Lh,ul,lm,ui,$c=!1,wg=!1,Eg=[],Ql,ra,m0,g0,NC,LC,bh,Sc,Rh,Fh=!1,um=!1,Nm,_i,v0=[],E1=!1,Sg=[],Av=typeof document<"u",cm=PP,RC=Ff||Po?"cssFloat":"float",lxe=Av&&!Z_e&&!PP&&"draggable"in document.createElement("div"),LP=(function(){if(Av){if(Po)return!1;var t=document.createElement("x");return t.style.cssText="pointer-events:auto",t.style.pointerEvents==="auto"}})(),RP=function(e,s){var n=Yt(e),i=parseInt(n.width)-parseInt(n.paddingLeft)-parseInt(n.paddingRight)-parseInt(n.borderLeftWidth)-parseInt(n.borderRightWidth),o=cd(e,0,s),r=cd(e,1,s),c=o&&Yt(o),h=r&&Yt(r),f=c&&parseInt(c.marginLeft)+parseInt(c.marginRight)+bn(o).width,v=h&&parseInt(h.marginLeft)+parseInt(h.marginRight)+bn(r).width;if(n.display==="flex")return n.flexDirection==="column"||n.flexDirection==="column-reverse"?"vertical":"horizontal";if(n.display==="grid")return n.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(o&&c.float&&c.float!=="none"){var g=c.float==="left"?"left":"right";return r&&(h.clear==="both"||h.clear===g)?"vertical":"horizontal"}return o&&(c.display==="block"||c.display==="flex"||c.display==="table"||c.display==="grid"||f>=i&&n[RC]==="none"||r&&n[RC]==="none"&&f+v>i)?"vertical":"horizontal"},uxe=function(e,s,n){var i=n?e.left:e.top,o=n?e.right:e.bottom,r=n?e.width:e.height,c=n?s.left:s.top,h=n?s.right:s.bottom,f=n?s.width:s.height;return i===c||o===h||i+r/2===c+f/2},cxe=function(e,s){var n;return Eg.some(function(i){var o=i[Oi].options.emptyInsertThreshold;if(!(!o||wx(i))){var r=bn(i),c=e>=r.left-o&&e<=r.right+o,h=s>=r.top-o&&s<=r.bottom+o;if(c&&h)return n=i}}),n},FP=function(e){function s(o,r){return function(c,h,f,v){var g=c.options.group.name&&h.options.group.name&&c.options.group.name===h.options.group.name;if(o==null&&(r||g))return!0;if(o==null||o===!1)return!1;if(r&&o==="clone")return o;if(typeof o=="function")return s(o(c,h,f,v),r)(c,h,f,v);var y=(r?c:h).options.group.name;return o===!0||typeof o=="string"&&o===y||o.join&&o.indexOf(y)>-1}}var n={},i=e.group;(!i||Im(i)!="object")&&(i={name:i}),n.name=i.name,n.checkPull=s(i.pull,!0),n.checkPut=s(i.put),n.revertClone=i.revertClone,e.group=n},VP=function(){!LP&&ys&&Yt(ys,"display","none")},BP=function(){!LP&&ys&&Yt(ys,"display","")};Av&&document.addEventListener("click",function(t){if(wg)return t.preventDefault(),t.stopPropagation&&t.stopPropagation(),t.stopImmediatePropagation&&t.stopImmediatePropagation(),wg=!1,!1},!0);var Zl=function(e){if(Dt){e=e.touches?e.touches[0]:e;var s=cxe(e.clientX,e.clientY);if(s){var n={};for(var i in e)e.hasOwnProperty(i)&&(n[i]=e[i]);n.target=n.rootEl=s,n.preventDefault=void 0,n.stopPropagation=void 0,s[Oi]._onDragOver(n)}}},dxe=function(e){Dt&&Dt.parentNode[Oi]._isOutsideThisEl(e.target)};function is(t,e){if(!(t&&t.nodeType&&t.nodeType===1))throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(t));this.el=t,this.options=e=zr({},e),t[Oi]=this;var s={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(t.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return RP(t,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(r,c){r.setData("Text",c.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:!1,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:is.supportPointer!==!1&&"PointerEvent"in window&&!Mh,emptyInsertThreshold:5};Vf.initializePlugins(this,t,s);for(var n in s)!(n in e)&&(e[n]=s[n]);FP(e);for(var i in this)i.charAt(0)==="_"&&typeof this[i]=="function"&&(this[i]=this[i].bind(this));this.nativeDraggable=e.forceFallback?!1:lxe,this.nativeDraggable&&(this.options.touchStartThreshold=1),e.supportPointer?Ps(t,"pointerdown",this._onTapStart):(Ps(t,"mousedown",this._onTapStart),Ps(t,"touchstart",this._onTapStart)),this.nativeDraggable&&(Ps(t,"dragover",this),Ps(t,"dragenter",this)),Eg.push(this.el),e.store&&e.store.get&&this.sort(e.store.get(this)||[]),zr(this,ixe())}is.prototype={constructor:is,_isOutsideThisEl:function(e){!this.el.contains(e)&&e!==this.el&&(Sc=null)},_getDirection:function(e,s){return typeof this.options.direction=="function"?this.options.direction.call(this,e,s,Dt):this.options.direction},_onTapStart:function(e){if(e.cancelable){var s=this,n=this.el,i=this.options,o=i.preventOnFilter,r=e.type,c=e.touches&&e.touches[0]||e.pointerType&&e.pointerType==="touch"&&e,h=(c||e).target,f=e.target.shadowRoot&&(e.path&&e.path[0]||e.composedPath&&e.composedPath()[0])||h,v=i.filter;if(yxe(n),!Dt&&!(/mousedown|pointerdown/.test(r)&&e.button!==0||i.disabled)&&!f.isContentEditable&&!(!this.nativeDraggable&&Mh&&h&&h.tagName.toUpperCase()==="SELECT")&&(h=la(h,i.draggable,n,!1),!(h&&h.animated)&&Mm!==h)){if(Lc=Tn(h),Lh=Tn(h,i.draggable),typeof v=="function"){if(v.call(this,e,h,this)){Ui({sortable:s,rootEl:f,name:"filter",targetEl:h,toEl:n,fromEl:n}),er("filter",s,{evt:e}),o&&e.cancelable&&e.preventDefault();return}}else if(v&&(v=v.split(",").some(function(g){if(g=la(f,g.trim(),n,!1),g)return Ui({sortable:s,rootEl:g,name:"filter",targetEl:h,fromEl:n,toEl:n}),er("filter",s,{evt:e}),!0}),v)){o&&e.cancelable&&e.preventDefault();return}i.handle&&!la(f,i.handle,n,!1)||this._prepareDragStart(e,c,h)}}},_prepareDragStart:function(e,s,n){var i=this,o=i.el,r=i.options,c=o.ownerDocument,h;if(n&&!Dt&&n.parentNode===o){var f=bn(n);if(gn=o,Dt=n,Sn=Dt.parentNode,su=Dt.nextSibling,Mm=n,lm=r.group,is.dragged=Dt,Ql={target:Dt,clientX:(s||e).clientX,clientY:(s||e).clientY},NC=Ql.clientX-f.left,LC=Ql.clientY-f.top,this._lastX=(s||e).clientX,this._lastY=(s||e).clientY,Dt.style["will-change"]="all",h=function(){if(er("delayEnded",i,{evt:e}),is.eventCanceled){i._onDrop();return}i._disableDelayedDragEvents(),!DC&&i.nativeDraggable&&(Dt.draggable=!0),i._triggerDragStart(e,s),Ui({sortable:i,name:"choose",originalEvent:e}),_n(Dt,r.chosenClass,!0)},r.ignore.split(",").forEach(function(v){IP(Dt,v.trim(),b0)}),Ps(c,"dragover",Zl),Ps(c,"mousemove",Zl),Ps(c,"touchmove",Zl),Ps(c,"mouseup",i._onDrop),Ps(c,"touchend",i._onDrop),Ps(c,"touchcancel",i._onDrop),DC&&this.nativeDraggable&&(this.options.touchStartThreshold=4,Dt.draggable=!0),er("delayStart",this,{evt:e}),r.delay&&(!r.delayOnTouchOnly||s)&&(!this.nativeDraggable||!(Ff||Po))){if(is.eventCanceled){this._onDrop();return}Ps(c,"mouseup",i._disableDelayedDrag),Ps(c,"touchend",i._disableDelayedDrag),Ps(c,"touchcancel",i._disableDelayedDrag),Ps(c,"mousemove",i._delayedDragTouchMoveHandler),Ps(c,"touchmove",i._delayedDragTouchMoveHandler),r.supportPointer&&Ps(c,"pointermove",i._delayedDragTouchMoveHandler),i._dragStartTimer=setTimeout(h,r.delay)}else h()}},_delayedDragTouchMoveHandler:function(e){var s=e.touches?e.touches[0]:e;Math.max(Math.abs(s.clientX-this._lastX),Math.abs(s.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){Dt&&b0(Dt),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var e=this.el.ownerDocument;ks(e,"mouseup",this._disableDelayedDrag),ks(e,"touchend",this._disableDelayedDrag),ks(e,"touchcancel",this._disableDelayedDrag),ks(e,"mousemove",this._delayedDragTouchMoveHandler),ks(e,"touchmove",this._delayedDragTouchMoveHandler),ks(e,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(e,s){s=s||e.pointerType=="touch"&&e,!this.nativeDraggable||s?this.options.supportPointer?Ps(document,"pointermove",this._onTouchMove):s?Ps(document,"touchmove",this._onTouchMove):Ps(document,"mousemove",this._onTouchMove):(Ps(Dt,"dragend",this),Ps(gn,"dragstart",this._onDragStart));try{document.selection?Lm(function(){document.selection.empty()}):window.getSelection().removeAllRanges()}catch{}},_dragStarted:function(e,s){if($c=!1,gn&&Dt){er("dragStarted",this,{evt:s}),this.nativeDraggable&&Ps(document,"dragover",dxe);var n=this.options;!e&&_n(Dt,n.dragClass,!1),_n(Dt,n.ghostClass,!0),is.active=this,e&&this._appendGhost(),Ui({sortable:this,name:"start",originalEvent:s})}else this._nulling()},_emulateDragOver:function(){if(ra){this._lastX=ra.clientX,this._lastY=ra.clientY,VP();for(var e=document.elementFromPoint(ra.clientX,ra.clientY),s=e;e&&e.shadowRoot&&(e=e.shadowRoot.elementFromPoint(ra.clientX,ra.clientY),e!==s);)s=e;if(Dt.parentNode[Oi]._isOutsideThisEl(e),s)do{if(s[Oi]){var n=void 0;if(n=s[Oi]._onDragOver({clientX:ra.clientX,clientY:ra.clientY,target:e,rootEl:s}),n&&!this.options.dragoverBubble)break}e=s}while(s=s.parentNode);BP()}},_onTouchMove:function(e){if(Ql){var s=this.options,n=s.fallbackTolerance,i=s.fallbackOffset,o=e.touches?e.touches[0]:e,r=ys&&Eu(ys,!0),c=ys&&r&&r.a,h=ys&&r&&r.d,f=cm&&_i&&IC(_i),v=(o.clientX-Ql.clientX+i.x)/(c||1)+(f?f[0]-v0[0]:0)/(c||1),g=(o.clientY-Ql.clientY+i.y)/(h||1)+(f?f[1]-v0[1]:0)/(h||1);if(!is.active&&!$c){if(n&&Math.max(Math.abs(o.clientX-this._lastX),Math.abs(o.clientY-this._lastY))<n)return;this._onDragStart(e,!0)}if(ys){r?(r.e+=v-(m0||0),r.f+=g-(g0||0)):r={a:1,b:0,c:0,d:1,e:v,f:g};var y="matrix(".concat(r.a,",").concat(r.b,",").concat(r.c,",").concat(r.d,",").concat(r.e,",").concat(r.f,")");Yt(ys,"webkitTransform",y),Yt(ys,"mozTransform",y),Yt(ys,"msTransform",y),Yt(ys,"transform",y),m0=v,g0=g,ra=o}e.cancelable&&e.preventDefault()}},_appendGhost:function(){if(!ys){var e=this.options.fallbackOnBody?document.body:gn,s=bn(Dt,!0,cm,!0,e),n=this.options;if(cm){for(_i=e;Yt(_i,"position")==="static"&&Yt(_i,"transform")==="none"&&_i!==document;)_i=_i.parentNode;_i!==document.body&&_i!==document.documentElement?(_i===document&&(_i=Fa()),s.top+=_i.scrollTop,s.left+=_i.scrollLeft):_i=Fa(),v0=IC(_i)}ys=Dt.cloneNode(!0),_n(ys,n.ghostClass,!1),_n(ys,n.fallbackClass,!0),_n(ys,n.dragClass,!0),Yt(ys,"transition",""),Yt(ys,"transform",""),Yt(ys,"box-sizing","border-box"),Yt(ys,"margin",0),Yt(ys,"top",s.top),Yt(ys,"left",s.left),Yt(ys,"width",s.width),Yt(ys,"height",s.height),Yt(ys,"opacity","0.8"),Yt(ys,"position",cm?"absolute":"fixed"),Yt(ys,"zIndex","100000"),Yt(ys,"pointerEvents","none"),is.ghost=ys,e.appendChild(ys),Yt(ys,"transform-origin",NC/parseInt(ys.style.width)*100+"% "+LC/parseInt(ys.style.height)*100+"%")}},_onDragStart:function(e,s){var n=this,i=e.dataTransfer,o=n.options;if(er("dragStart",this,{evt:e}),is.eventCanceled){this._onDrop();return}er("setupClone",this),is.eventCanceled||(kn=Ex(Dt),kn.draggable=!1,kn.style["will-change"]="",this._hideClone(),_n(kn,this.options.chosenClass,!1),is.clone=kn),n.cloneId=Lm(function(){er("clone",n),!is.eventCanceled&&(n.options.removeCloneOnHide||gn.insertBefore(kn,Dt),n._hideClone(),Ui({sortable:n,name:"clone"}))}),!s&&_n(Dt,o.dragClass,!0),s?(wg=!0,n._loopId=setInterval(n._emulateDragOver,50)):(ks(document,"mouseup",n._onDrop),ks(document,"touchend",n._onDrop),ks(document,"touchcancel",n._onDrop),i&&(i.effectAllowed="move",o.setData&&o.setData.call(n,i,Dt)),Ps(document,"drop",n),Yt(Dt,"transform","translateZ(0)")),$c=!0,n._dragStartId=Lm(n._dragStarted.bind(n,s,e)),Ps(document,"selectstart",n),bh=!0,Mh&&Yt(document.body,"user-select","none")},_onDragOver:function(e){var s=this.el,n=e.target,i,o,r,c=this.options,h=c.group,f=is.active,v=lm===h,g=c.sort,y=ui||f,x,E=this,P=!1;if(E1)return;function I(ge,q){er(ge,E,Ua({evt:e,isOwner:v,axis:x?"vertical":"horizontal",revert:r,dragRect:i,targetRect:o,canSort:g,fromSortable:y,target:n,completed:F,onMove:function(M,he){return dm(gn,s,Dt,i,M,bn(M),e,he)},changed:C},q))}function D(){I("dragOverAnimationCapture"),E.captureAnimationState(),E!==y&&y.captureAnimationState()}function F(ge){return I("dragOverCompleted",{insertion:ge}),ge&&(v?f._hideClone():f._showClone(E),E!==y&&(_n(Dt,ui?ui.options.ghostClass:f.options.ghostClass,!1),_n(Dt,c.ghostClass,!0)),ui!==E&&E!==is.active?ui=E:E===is.active&&ui&&(ui=null),y===E&&(E._ignoreWhileAnimating=n),E.animateAll(function(){I("dragOverAnimationComplete"),E._ignoreWhileAnimating=null}),E!==y&&(y.animateAll(),y._ignoreWhileAnimating=null)),(n===Dt&&!Dt.animated||n===s&&!n.animated)&&(Sc=null),!c.dragoverBubble&&!e.rootEl&&n!==document&&(Dt.parentNode[Oi]._isOutsideThisEl(e.target),!ge&&Zl(e)),!c.dragoverBubble&&e.stopPropagation&&e.stopPropagation(),P=!0}function C(){fr=Tn(Dt),ul=Tn(Dt,c.draggable),Ui({sortable:E,name:"change",toEl:s,newIndex:fr,newDraggableIndex:ul,originalEvent:e})}if(e.preventDefault!==void 0&&e.cancelable&&e.preventDefault(),n=la(n,c.draggable,s,!0),I("dragOver"),is.eventCanceled)return P;if(Dt.contains(e.target)||n.animated&&n.animatingX&&n.animatingY||E._ignoreWhileAnimating===n)return F(!1);if(wg=!1,f&&!c.disabled&&(v?g||(r=Sn!==gn):ui===this||(this.lastPutMode=lm.checkPull(this,f,Dt,e))&&h.checkPut(this,f,Dt,e))){if(x=this._getDirection(e,n)==="vertical",i=bn(Dt),I("dragOverValid"),is.eventCanceled)return P;if(r)return Sn=gn,D(),this._hideClone(),I("revert"),is.eventCanceled||(su?gn.insertBefore(Dt,su):gn.appendChild(Dt)),F(!0);var A=wx(s,c.draggable);if(!A||mxe(e,x,this)&&!A.animated){if(A===Dt)return F(!1);if(A&&s===e.target&&(n=A),n&&(o=bn(n)),dm(gn,s,Dt,i,n,o,e,!!n)!==!1)return D(),s.appendChild(Dt),Sn=s,C(),F(!0)}else if(A&&pxe(e,x,this)){var O=cd(s,0,c,!0);if(O===Dt)return F(!1);if(n=O,o=bn(n),dm(gn,s,Dt,i,n,o,e,!1)!==!1)return D(),s.insertBefore(Dt,O),Sn=s,C(),F(!0)}else if(n.parentNode===s){o=bn(n);var j=0,te,B=Dt.parentNode!==s,z=!uxe(Dt.animated&&Dt.toRect||i,n.animated&&n.toRect||o,x),re=x?"top":"left",ne=$C(n,"top","top")||$C(Dt,"top","top"),X=ne?ne.scrollTop:void 0;Sc!==n&&(te=o[re],Fh=!1,um=!z&&c.invertSwap||B),j=gxe(e,n,o,x,z?1:c.swapThreshold,c.invertedSwapThreshold==null?c.swapThreshold:c.invertedSwapThreshold,um,Sc===n);var G;if(j!==0){var ce=Tn(Dt);do ce-=j,G=Sn.children[ce];while(G&&(Yt(G,"display")==="none"||G===ys))}if(j===0||G===n)return F(!1);Sc=n,Rh=j;var be=n.nextElementSibling,J=!1;J=j===1;var Z=dm(gn,s,Dt,i,n,o,e,J);if(Z!==!1)return(Z===1||Z===-1)&&(J=Z===1),E1=!0,setTimeout(fxe,30),D(),J&&!be?s.appendChild(Dt):n.parentNode.insertBefore(Dt,J?be:n),ne&&NP(ne,0,X-ne.scrollTop),Sn=Dt.parentNode,te!==void 0&&!um&&(Nm=Math.abs(te-bn(n)[re])),C(),F(!0)}if(s.contains(Dt))return F(!1)}return!1},_ignoreWhileAnimating:null,_offMoveEvents:function(){ks(document,"mousemove",this._onTouchMove),ks(document,"touchmove",this._onTouchMove),ks(document,"pointermove",this._onTouchMove),ks(document,"dragover",Zl),ks(document,"mousemove",Zl),ks(document,"touchmove",Zl)},_offUpEvents:function(){var e=this.el.ownerDocument;ks(e,"mouseup",this._onDrop),ks(e,"touchend",this._onDrop),ks(e,"pointerup",this._onDrop),ks(e,"touchcancel",this._onDrop),ks(document,"selectstart",this)},_onDrop:function(e){var s=this.el,n=this.options;if(fr=Tn(Dt),ul=Tn(Dt,n.draggable),er("drop",this,{evt:e}),Sn=Dt&&Dt.parentNode,fr=Tn(Dt),ul=Tn(Dt,n.draggable),is.eventCanceled){this._nulling();return}$c=!1,um=!1,Fh=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),S1(this.cloneId),S1(this._dragStartId),this.nativeDraggable&&(ks(document,"drop",this),ks(s,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),Mh&&Yt(document.body,"user-select",""),Yt(Dt,"transform",""),e&&(bh&&(e.cancelable&&e.preventDefault(),!n.dropBubble&&e.stopPropagation()),ys&&ys.parentNode&&ys.parentNode.removeChild(ys),(gn===Sn||ui&&ui.lastPutMode!=="clone")&&kn&&kn.parentNode&&kn.parentNode.removeChild(kn),Dt&&(this.nativeDraggable&&ks(Dt,"dragend",this),b0(Dt),Dt.style["will-change"]="",bh&&!$c&&_n(Dt,ui?ui.options.ghostClass:this.options.ghostClass,!1),_n(Dt,this.options.chosenClass,!1),Ui({sortable:this,name:"unchoose",toEl:Sn,newIndex:null,newDraggableIndex:null,originalEvent:e}),gn!==Sn?(fr>=0&&(Ui({rootEl:Sn,name:"add",toEl:Sn,fromEl:gn,originalEvent:e}),Ui({sortable:this,name:"remove",toEl:Sn,originalEvent:e}),Ui({rootEl:Sn,name:"sort",toEl:Sn,fromEl:gn,originalEvent:e}),Ui({sortable:this,name:"sort",toEl:Sn,originalEvent:e})),ui&&ui.save()):fr!==Lc&&fr>=0&&(Ui({sortable:this,name:"update",toEl:Sn,originalEvent:e}),Ui({sortable:this,name:"sort",toEl:Sn,originalEvent:e})),is.active&&((fr==null||fr===-1)&&(fr=Lc,ul=Lh),Ui({sortable:this,name:"end",toEl:Sn,originalEvent:e}),this.save()))),this._nulling()},_nulling:function(){er("nulling",this),gn=Dt=Sn=ys=su=kn=Mm=cl=Ql=ra=bh=fr=ul=Lc=Lh=Sc=Rh=ui=lm=is.dragged=is.ghost=is.clone=is.active=null,Sg.forEach(function(e){e.checked=!0}),Sg.length=m0=g0=0},handleEvent:function(e){switch(e.type){case"drop":case"dragend":this._onDrop(e);break;case"dragenter":case"dragover":Dt&&(this._onDragOver(e),hxe(e));break;case"selectstart":e.preventDefault();break}},toArray:function(){for(var e=[],s,n=this.el.children,i=0,o=n.length,r=this.options;i<o;i++)s=n[i],la(s,r.draggable,this.el,!1)&&e.push(s.getAttribute(r.dataIdAttr)||bxe(s));return e},sort:function(e,s){var n={},i=this.el;this.toArray().forEach(function(o,r){var c=i.children[r];la(c,this.options.draggable,i,!1)&&(n[o]=c)},this),s&&this.captureAnimationState(),e.forEach(function(o){n[o]&&(i.removeChild(n[o]),i.appendChild(n[o]))}),s&&this.animateAll()},save:function(){var e=this.options.store;e&&e.set&&e.set(this)},closest:function(e,s){return la(e,s||this.options.draggable,this.el,!1)},option:function(e,s){var n=this.options;if(s===void 0)return n[e];var i=Vf.modifyOption(this,e,s);typeof i<"u"?n[e]=i:n[e]=s,e==="group"&&FP(n)},destroy:function(){er("destroy",this);var e=this.el;e[Oi]=null,ks(e,"mousedown",this._onTapStart),ks(e,"touchstart",this._onTapStart),ks(e,"pointerdown",this._onTapStart),this.nativeDraggable&&(ks(e,"dragover",this),ks(e,"dragenter",this)),Array.prototype.forEach.call(e.querySelectorAll("[draggable]"),function(s){s.removeAttribute("draggable")}),this._onDrop(),this._disableDelayedDragEvents(),Eg.splice(Eg.indexOf(this.el),1),this.el=e=null},_hideClone:function(){if(!cl){if(er("hideClone",this),is.eventCanceled)return;Yt(kn,"display","none"),this.options.removeCloneOnHide&&kn.parentNode&&kn.parentNode.removeChild(kn),cl=!0}},_showClone:function(e){if(e.lastPutMode!=="clone"){this._hideClone();return}if(cl){if(er("showClone",this),is.eventCanceled)return;Dt.parentNode==gn&&!this.options.group.revertClone?gn.insertBefore(kn,Dt):su?gn.insertBefore(kn,su):gn.appendChild(kn),this.options.group.revertClone&&this.animate(Dt,kn),Yt(kn,"display",""),cl=!1}}};function hxe(t){t.dataTransfer&&(t.dataTransfer.dropEffect="move"),t.cancelable&&t.preventDefault()}function dm(t,e,s,n,i,o,r,c){var h,f=t[Oi],v=f.options.onMove,g;return window.CustomEvent&&!Po&&!Ff?h=new CustomEvent("move",{bubbles:!0,cancelable:!0}):(h=document.createEvent("Event"),h.initEvent("move",!0,!0)),h.to=e,h.from=t,h.dragged=s,h.draggedRect=n,h.related=i||e,h.relatedRect=o||bn(e),h.willInsertAfter=c,h.originalEvent=r,t.dispatchEvent(h),v&&(g=v.call(f,h,r)),g}function b0(t){t.draggable=!1}function fxe(){E1=!1}function pxe(t,e,s){var n=bn(cd(s.el,0,s.options,!0)),i=10;return e?t.clientX<n.left-i||t.clientY<n.top&&t.clientX<n.right:t.clientY<n.top-i||t.clientY<n.bottom&&t.clientX<n.left}function mxe(t,e,s){var n=bn(wx(s.el,s.options.draggable)),i=10;return e?t.clientX>n.right+i||t.clientX<=n.right&&t.clientY>n.bottom&&t.clientX>=n.left:t.clientX>n.right&&t.clientY>n.top||t.clientX<=n.right&&t.clientY>n.bottom+i}function gxe(t,e,s,n,i,o,r,c){var h=n?t.clientY:t.clientX,f=n?s.height:s.width,v=n?s.top:s.left,g=n?s.bottom:s.right,y=!1;if(!r){if(c&&Nm<f*i){if(!Fh&&(Rh===1?h>v+f*o/2:h<g-f*o/2)&&(Fh=!0),Fh)y=!0;else if(Rh===1?h<v+Nm:h>g-Nm)return-Rh}else if(h>v+f*(1-i)/2&&h<g-f*(1-i)/2)return vxe(e)}return y=y||r,y&&(h<v+f*o/2||h>g-f*o/2)?h>v+f/2?1:-1:0}function vxe(t){return Tn(Dt)<Tn(t)?1:-1}function bxe(t){for(var e=t.tagName+t.className+t.src+t.href+t.textContent,s=e.length,n=0;s--;)n+=e.charCodeAt(s);return n.toString(36)}function yxe(t){Sg.length=0;for(var e=t.getElementsByTagName("input"),s=e.length;s--;){var n=e[s];n.checked&&Sg.push(n)}}function Lm(t){return setTimeout(t,0)}function S1(t){return clearTimeout(t)}Av&&Ps(document,"touchmove",function(t){(is.active||$c)&&t.cancelable&&t.preventDefault()});is.utils={on:Ps,off:ks,css:Yt,find:IP,is:function(e,s){return!!la(e,s,e,!1)},extend:sxe,throttle:MP,closest:la,toggleClass:_n,clone:Ex,index:Tn,nextTick:Lm,cancelNextTick:S1,detectDirection:RP,getChild:cd};is.get=function(t){return t[Oi]};is.mount=function(){for(var t=arguments.length,e=new Array(t),s=0;s<t;s++)e[s]=arguments[s];e[0].constructor===Array&&(e=e[0]),e.forEach(function(n){if(!n.prototype||!n.prototype.constructor)throw"Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(n));n.utils&&(is.utils=Ua(Ua({},is.utils),n.utils)),Vf.mount(n)})};is.create=function(t,e){return new is(t,e)};is.version=Q_e;var Wn=[],yh,k1,C1=!1,y0,_0,kg,_h;function _xe(){function t(){this.defaults={scroll:!0,forceAutoScrollFallback:!1,scrollSensitivity:30,scrollSpeed:10,bubbleScroll:!0};for(var e in this)e.charAt(0)==="_"&&typeof this[e]=="function"&&(this[e]=this[e].bind(this))}return t.prototype={dragStarted:function(s){var n=s.originalEvent;this.sortable.nativeDraggable?Ps(document,"dragover",this._handleAutoScroll):this.options.supportPointer?Ps(document,"pointermove",this._handleFallbackAutoScroll):n.touches?Ps(document,"touchmove",this._handleFallbackAutoScroll):Ps(document,"mousemove",this._handleFallbackAutoScroll)},dragOverCompleted:function(s){var n=s.originalEvent;!this.options.dragOverBubble&&!n.rootEl&&this._handleAutoScroll(n)},drop:function(){this.sortable.nativeDraggable?ks(document,"dragover",this._handleAutoScroll):(ks(document,"pointermove",this._handleFallbackAutoScroll),ks(document,"touchmove",this._handleFallbackAutoScroll),ks(document,"mousemove",this._handleFallbackAutoScroll)),FC(),Rm(),nxe()},nulling:function(){kg=k1=yh=C1=_h=y0=_0=null,Wn.length=0},_handleFallbackAutoScroll:function(s){this._handleAutoScroll(s,!0)},_handleAutoScroll:function(s,n){var i=this,o=(s.touches?s.touches[0]:s).clientX,r=(s.touches?s.touches[0]:s).clientY,c=document.elementFromPoint(o,r);if(kg=s,n||this.options.forceAutoScrollFallback||Ff||Po||Mh){x0(s,this.options,c,n);var h=fl(c,!0);C1&&(!_h||o!==y0||r!==_0)&&(_h&&FC(),_h=setInterval(function(){var f=fl(document.elementFromPoint(o,r),!0);f!==h&&(h=f,Rm()),x0(s,i.options,f,n)},10),y0=o,_0=r)}else{if(!this.options.bubbleScroll||fl(c,!0)===Fa()){Rm();return}x0(s,this.options,fl(c,!1),!1)}}},zr(t,{pluginName:"scroll",initializeByDefault:!0})}function Rm(){Wn.forEach(function(t){clearInterval(t.pid)}),Wn=[]}function FC(){clearInterval(_h)}var x0=MP(function(t,e,s,n){if(e.scroll){var i=(t.touches?t.touches[0]:t).clientX,o=(t.touches?t.touches[0]:t).clientY,r=e.scrollSensitivity,c=e.scrollSpeed,h=Fa(),f=!1,v;k1!==s&&(k1=s,Rm(),yh=e.scroll,v=e.scrollFn,yh===!0&&(yh=fl(s,!0)));var g=0,y=yh;do{var x=y,E=bn(x),P=E.top,I=E.bottom,D=E.left,F=E.right,C=E.width,A=E.height,O=void 0,j=void 0,te=x.scrollWidth,B=x.scrollHeight,z=Yt(x),re=x.scrollLeft,ne=x.scrollTop;x===h?(O=C<te&&(z.overflowX==="auto"||z.overflowX==="scroll"||z.overflowX==="visible"),j=A<B&&(z.overflowY==="auto"||z.overflowY==="scroll"||z.overflowY==="visible")):(O=C<te&&(z.overflowX==="auto"||z.overflowX==="scroll"),j=A<B&&(z.overflowY==="auto"||z.overflowY==="scroll"));var X=O&&(Math.abs(F-i)<=r&&re+C<te)-(Math.abs(D-i)<=r&&!!re),G=j&&(Math.abs(I-o)<=r&&ne+A<B)-(Math.abs(P-o)<=r&&!!ne);if(!Wn[g])for(var ce=0;ce<=g;ce++)Wn[ce]||(Wn[ce]={});(Wn[g].vx!=X||Wn[g].vy!=G||Wn[g].el!==x)&&(Wn[g].el=x,Wn[g].vx=X,Wn[g].vy=G,clearInterval(Wn[g].pid),(X!=0||G!=0)&&(f=!0,Wn[g].pid=setInterval((function(){n&&this.layer===0&&is.active._onTouchMove(kg);var be=Wn[this.layer].vy?Wn[this.layer].vy*c:0,J=Wn[this.layer].vx?Wn[this.layer].vx*c:0;typeof v=="function"&&v.call(is.dragged.parentNode[Oi],J,be,t,kg,Wn[this.layer].el)!=="continue"||NP(Wn[this.layer].el,J,be)}).bind({layer:g}),24))),g++}while(e.bubbleScroll&&y!==h&&(y=fl(y,!1)));C1=f}},30),UP=function(e){var s=e.originalEvent,n=e.putSortable,i=e.dragEl,o=e.activeSortable,r=e.dis
vendor: 52,509 bytes, lines 91-94
91patchSortableEvent,c=e.hideGhostForTarget,h=e.unhideGhostForTarget;if(s){var f=n||o;c();var v=s.changedTouches&&s.changedTouches.length?s.changedTouches[0]:s,g=document.elementFromPoint(v.clientX,v.clientY);h(),f&&!f.el.contains(g)&&(r("spill"),this.onSpill({dragEl:i,putSortable:n}))}};function Sx(){}Sx.prototype={startIndex:null,dragStart:function(e){var s=e.oldDraggableIndex;this.startIndex=s},onSpill:function(e){var s=e.dragEl,n=e.putSortable;this.sortable.captureAnimationState(),n&&n.captureAnimationState();var i=cd(this.sortable.el,this.startIndex,this.options);i?this.sortable.el.insertBefore(s,i):this.sortable.el.appendChild(s),this.sortable.animateAll(),n&&n.animateAll()},drop:UP};zr(Sx,{pluginName:"revertOnSpill"});function kx(){}kx.prototype={onSpill:function(e){var s=e.dragEl,n=e.putSortable,i=n||this.sortable;i.captureAnimationState(),s.parentNode&&s.parentNode.removeChild(s),i.animateAll()},drop:UP};zr(kx,{pluginName:"removeOnSpill"});var Mr;function xxe(){function t(){this.defaults={swapClass:"sortable-swap-highlight"}}return t.prototype={dragStart:function(s){var n=s.dragEl;Mr=n},dragOverValid:function(s){var n=s.completed,i=s.target,o=s.onMove,r=s.activeSortable,c=s.changed,h=s.cancel;if(r.options.swap){var f=this.sortable.el,v=this.options;if(i&&i!==f){var g=Mr;o(i)!==!1?(_n(i,v.swapClass,!0),Mr=i):Mr=null,g&&g!==Mr&&_n(g,v.swapClass,!1)}c(),n(!0),h()}},drop:function(s){var n=s.activeSortable,i=s.putSortable,o=s.dragEl,r=i||this.sortable,c=this.options;Mr&&_n(Mr,c.swapClass,!1),Mr&&(c.swap||i&&i.options.swap)&&o!==Mr&&(r.captureAnimationState(),r!==n&&n.captureAnimationState(),wxe(o,Mr),r.animateAll(),r!==n&&n.animateAll())},nulling:function(){Mr=null}},zr(t,{pluginName:"swap",eventProperties:function(){return{swapItem:Mr}}})}function wxe(t,e){var s=t.parentNode,n=e.parentNode,i,o;!s||!n||s.isEqualNode(e)||n.isEqualNode(t)||(i=Tn(t),o=Tn(e),s.isEqualNode(n)&&i<o&&o++,s.insertBefore(e,s.children[i]),n.insertBefore(t,n.children[o]))}var fs=[],hr=[],dh,aa,hh=!1,tr=!1,kc=!1,rn,fh,hm;function Exe(){function t(e){for(var s in this)s.charAt(0)==="_"&&typeof this[s]=="function"&&(this[s]=this[s].bind(this));e.options.supportPointer?Ps(document,"pointerup",this._deselectMultiDrag):(Ps(document,"mouseup",this._deselectMultiDrag),Ps(document,"touchend",this._deselectMultiDrag)),Ps(document,"keydown",this._checkKeyDown),Ps(document,"keyup",this._checkKeyUp),this.defaults={selectedClass:"sortable-selected",multiDragKey:null,setData:function(i,o){var r="";fs.length&&aa===e?fs.forEach(function(c,h){r+=(h?", ":"")+c.textContent}):r=o.textContent,i.setData("Text",r)}}}return t.prototype={multiDragKeyDown:!1,isMultiDrag:!1,delayStartGlobal:function(s){var n=s.dragEl;rn=n},delayEnded:function(){this.isMultiDrag=~fs.indexOf(rn)},setupClone:function(s){var n=s.sortable,i=s.cancel;if(this.isMultiDrag){for(var o=0;o<fs.length;o++)hr.push(Ex(fs[o])),hr[o].sortableIndex=fs[o].sortableIndex,hr[o].draggable=!1,hr[o].style["will-change"]="",_n(hr[o],this.options.selectedClass,!1),fs[o]===rn&&_n(hr[o],this.options.chosenClass,!1);n._hideClone(),i()}},clone:function(s){var n=s.sortable,i=s.rootEl,o=s.dispatchSortableEvent,r=s.cancel;this.isMultiDrag&&(this.options.removeCloneOnHide||fs.length&&aa===n&&(VC(!0,i),o("clone"),r()))},showClone:function(s){var n=s.cloneNowShown,i=s.rootEl,o=s.cancel;this.isMultiDrag&&(VC(!1,i),hr.forEach(function(r){Yt(r,"display","")}),n(),hm=!1,o())},hideClone:function(s){var n=this;s.sortable;var i=s.cloneNowHidden,o=s.cancel;this.isMultiDrag&&(hr.forEach(function(r){Yt(r,"display","none"),n.options.removeCloneOnHide&&r.parentNode&&r.parentNode.removeChild(r)}),i(),hm=!0,o())},dragStartGlobal:function(s){s.sortable,!this.isMultiDrag&&aa&&aa.multiDrag._deselectMultiDrag(),fs.forEach(function(n){n.sortableIndex=Tn(n)}),fs=fs.sort(function(n,i){return n.sortableIndex-i.sortableIndex}),kc=!0},dragStarted:function(s){var n=this,i=s.sortable;if(this.isMultiDrag){if(this.options.sort&&(i.captureAnimationState(),this.options.animation)){fs.forEach(function(r){r!==rn&&Yt(r,"position","absolute")});var o=bn(rn,!1,!0,!0);fs.forEach(function(r){r!==rn&&MC(r,o)}),tr=!0,hh=!0}i.animateAll(function(){tr=!1,hh=!1,n.options.animation&&fs.forEach(function(r){f0(r)}),n.options.sort&&fm()})}},dragOver:function(s){var n=s.target,i=s.completed,o=s.cancel;tr&&~fs.indexOf(n)&&(i(!1),o())},revert:function(s){var n=s.fromSortable,i=s.rootEl,o=s.sortable,r=s.dragRect;fs.length>1&&(fs.forEach(function(c){o.addAnimationState({target:c,rect:tr?bn(c):r}),f0(c),c.fromRect=r,n.removeAnimationState(c)}),tr=!1,Sxe(!this.options.removeCloneOnHide,i))},dragOverCompleted:function(s){var n=s.sortable,i=s.isOwner,o=s.insertion,r=s.activeSortable,c=s.parentEl,h=s.putSortable,f=this.options;if(o){if(i&&r._hideClone(),hh=!1,f.animation&&fs.length>1&&(tr||!i&&!r.options.sort&&!h)){var v=bn(rn,!1,!0,!0);fs.forEach(function(y){y!==rn&&(MC(y,v),c.appendChild(y))}),tr=!0}if(!i)if(tr||fm(),fs.length>1){var g=hm;r._showClone(n),r.options.animation&&!hm&&g&&hr.forEach(function(y){r.addAnimationState({target:y,rect:fh}),y.fromRect=fh,y.thisAnimationDuration=null})}else r._showClone(n)}},dragOverAnimationCapture:function(s){var n=s.dragRect,i=s.isOwner,o=s.activeSortable;if(fs.forEach(function(c){c.thisAnimationDuration=null}),o.options.animation&&!i&&o.multiDrag.isMultiDrag){fh=zr({},n);var r=Eu(rn,!0);fh.top-=r.f,fh.left-=r.e}},dragOverAnimationComplete:function(){tr&&(tr=!1,fm())},drop:function(s){var n=s.originalEvent,i=s.rootEl,o=s.parentEl,r=s.sortable,c=s.dispatchSortableEvent,h=s.oldIndex,f=s.putSortable,v=f||this.sortable;if(n){var g=this.options,y=o.children;if(!kc)if(g.multiDragKey&&!this.multiDragKeyDown&&this._deselectMultiDrag(),_n(rn,g.selectedClass,!~fs.indexOf(rn)),~fs.indexOf(rn))fs.splice(fs.indexOf(rn),1),dh=null,vh({sortable:r,rootEl:i,name:"deselect",targetEl:rn});else{if(fs.push(rn),vh({sortable:r,rootEl:i,name:"select",targetEl:rn}),n.shiftKey&&dh&&r.el.contains(dh)){var x=Tn(dh),E=Tn(rn);if(~x&&~E&&x!==E){var P,I;for(E>x?(I=x,P=E):(I=E,P=x+1);I<P;I++)~fs.indexOf(y[I])||(_n(y[I],g.selectedClass,!0),fs.push(y[I]),vh({sortable:r,rootEl:i,name:"select",targetEl:y[I]}))}}else dh=rn;aa=v}if(kc&&this.isMultiDrag){if(tr=!1,(o[Oi].options.sort||o!==i)&&fs.length>1){var D=bn(rn),F=Tn(rn,":not(."+this.options.selectedClass+")");if(!hh&&g.animation&&(rn.thisAnimationDuration=null),v.captureAnimationState(),!hh&&(g.animation&&(rn.fromRect=D,fs.forEach(function(A){if(A.thisAnimationDuration=null,A!==rn){var O=tr?bn(A):D;A.fromRect=O,v.addAnimationState({target:A,rect:O})}})),fm(),fs.forEach(function(A){y[F]?o.insertBefore(A,y[F]):o.appendChild(A),F++}),h===Tn(rn))){var C=!1;fs.forEach(function(A){if(A.sortableIndex!==Tn(A)){C=!0;return}}),C&&c("update")}fs.forEach(function(A){f0(A)}),v.animateAll()}aa=v}(i===o||f&&f.lastPutMode!=="clone")&&hr.forEach(function(A){A.parentNode&&A.parentNode.removeChild(A)})}},nullingGlobal:function(){this.isMultiDrag=kc=!1,hr.length=0},destroyGlobal:function(){this._deselectMultiDrag(),ks(document,"pointerup",this._deselectMultiDrag),ks(document,"mouseup",this._deselectMultiDrag),ks(document,"touchend",this._deselectMultiDrag),ks(document,"keydown",this._checkKeyDown),ks(document,"keyup",this._checkKeyUp)},_deselectMultiDrag:function(s){if(!(typeof kc<"u"&&kc)&&aa===this.sortable&&!(s&&la(s.target,this.options.draggable,this.sortable.el,!1))&&!(s&&s.button!==0))for(;fs.length;){var n=fs[0];_n(n,this.options.selectedClass,!1),fs.shift(),vh({sortable:this.sortable,rootEl:this.sortable.el,name:"deselect",targetEl:n})}},_checkKeyDown:function(s){s.key===this.options.multiDragKey&&(this.multiDragKeyDown=!0)},_checkKeyUp:function(s){s.key===this.options.multiDragKey&&(this.multiDragKeyDown=!1)}},zr(t,{pluginName:"multiDrag",utils:{select:function(s){var n=s.parentNode[Oi];!n||!n.options.multiDrag||~fs.indexOf(s)||(aa&&aa!==n&&(aa.multiDrag._deselectMultiDrag(),aa=n),_n(s,n.options.selectedClass,!0),fs.push(s))},deselect:function(s){var n=s.parentNode[Oi],i=fs.indexOf(s);!n||!n.options.multiDrag||!~i||(_n(s,n.options.selectedClass,!1),fs.splice(i,1))}},eventProperties:function(){var s=this,n=[],i=[];return fs.forEach(function(o){n.push({multiDragElement:o,index:o.sortableIndex});var r;tr&&o!==rn?r=-1:tr?r=Tn(o,":not(."+s.options.selectedClass+")"):r=Tn(o),i.push({multiDragElement:o,index:r})}),{items:q_e(fs),clones:[].concat(hr),oldIndicies:n,newIndicies:i}},optionListeners:{multiDragKey:function(s){return s=s.toLowerCase(),s==="ctrl"?s="Control":s.length>1&&(s=s.charAt(0).toUpperCase()+s.substr(1)),s}}})}function Sxe(t,e){fs.forEach(function(s,n){var i=e.children[s.sortableIndex+(t?Number(n):0)];i?e.insertBefore(s,i):e.appendChild(s)})}function VC(t,e){hr.forEach(function(s,n){var i=e.children[s.sortableIndex+(t?Number(n):0)];i?e.insertBefore(s,i):e.appendChild(s)})}function fm(){fs.forEach(function(t){t!==rn&&t.parentNode&&t.parentNode.removeChild(t)})}is.mount(new _xe);is.mount(kx,Sx);const kxe=Object.freeze(Object.defineProperty({__proto__:null,MultiDrag:Exe,Sortable:is,Swap:xxe,default:is},Symbol.toStringTag,{value:"Module"})),Cxe=Ig(kxe);var Txe=$m.exports,BC;function Axe(){return BC||(BC=1,(function(t,e){(function(n,i){t.exports=i(xx(),Cxe)})(typeof self<"u"?self:Txe,function(s,n){return(function(i){var o={};function r(c){if(o[c])return o[c].exports;var h=o[c]={i:c,l:!1,exports:{}};return i[c].call(h.exports,h,h.exports,r),h.l=!0,h.exports}return r.m=i,r.c=o,r.d=function(c,h,f){r.o(c,h)||Object.defineProperty(c,h,{enumerable:!0,get:f})},r.r=function(c){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(c,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(c,"__esModule",{value:!0})},r.t=function(c,h){if(h&1&&(c=r(c)),h&8||h&4&&typeof c=="object"&&c&&c.__esModule)return c;var f=Object.create(null);if(r.r(f),Object.defineProperty(f,"default",{enumerable:!0,value:c}),h&2&&typeof c!="string")for(var v in c)r.d(f,v,(function(g){return c[g]}).bind(null,v));return f},r.n=function(c){var h=c&&c.__esModule?function(){return c.default}:function(){return c};return r.d(h,"a",h),h},r.o=function(c,h){return Object.prototype.hasOwnProperty.call(c,h)},r.p="",r(r.s="fb15")})({"00ee":(function(i,o,r){var c=r("b622"),h=c("toStringTag"),f={};f[h]="z",i.exports=String(f)==="[object z]"}),"0366":(function(i,o,r){var c=r("1c0b");i.exports=function(h,f,v){if(c(h),f===void 0)return h;switch(v){case 0:return function(){return h.call(f)};case 1:return function(g){return h.call(f,g)};case 2:return function(g,y){return h.call(f,g,y)};case 3:return function(g,y,x){return h.call(f,g,y,x)}}return function(){return h.apply(f,arguments)}}}),"057f":(function(i,o,r){var c=r("fc6a"),h=r("241c").f,f={}.toString,v=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],g=function(y){try{return h(y)}catch{return v.slice()}};i.exports.f=function(x){return v&&f.call(x)=="[object Window]"?g(x):h(c(x))}}),"06cf":(function(i,o,r){var c=r("83ab"),h=r("d1e7"),f=r("5c6c"),v=r("fc6a"),g=r("c04e"),y=r("5135"),x=r("0cfb"),E=Object.getOwnPropertyDescriptor;o.f=c?E:function(I,D){if(I=v(I),D=g(D,!0),x)try{return E(I,D)}catch{}if(y(I,D))return f(!h.f.call(I,D),I[D])}}),"0cfb":(function(i,o,r){var c=r("83ab"),h=r("d039"),f=r("cc12");i.exports=!c&&!h(function(){return Object.defineProperty(f("div"),"a",{get:function(){return 7}}).a!=7})}),"13d5":(function(i,o,r){var c=r("23e7"),h=r("d58f").left,f=r("a640"),v=r("ae40"),g=f("reduce"),y=v("reduce",{1:0});c({target:"Array",proto:!0,forced:!g||!y},{reduce:function(E){return h(this,E,arguments.length,arguments.length>1?arguments[1]:void 0)}})}),"14c3":(function(i,o,r){var c=r("c6b6"),h=r("9263");i.exports=function(f,v){var g=f.exec;if(typeof g=="function"){var y=g.call(f,v);if(typeof y!="object")throw TypeError("RegExp exec method returned something other than an Object or null");return y}if(c(f)!=="RegExp")throw TypeError("RegExp#exec called on incompatible receiver");return h.call(f,v)}}),"159b":(function(i,o,r){var c=r("da84"),h=r("fdbc"),f=r("17c2"),v=r("9112");for(var g in h){var y=c[g],x=y&&y.prototype;if(x&&x.forEach!==f)try{v(x,"forEach",f)}catch{x.forEach=f}}}),"17c2":(function(i,o,r){var c=r("b727").forEach,h=r("a640"),f=r("ae40"),v=h("forEach"),g=f("forEach");i.exports=!v||!g?function(x){return c(this,x,arguments.length>1?arguments[1]:void 0)}:[].forEach}),"1be4":(function(i,o,r){var c=r("d066");i.exports=c("document","documentElement")}),"1c0b":(function(i,o){i.exports=function(r){if(typeof r!="function")throw TypeError(String(r)+" is not a function");return r}}),"1c7e":(function(i,o,r){var c=r("b622"),h=c("iterator"),f=!1;try{var v=0,g={next:function(){return{done:!!v++}},return:function(){f=!0}};g[h]=function(){return this},Array.from(g,function(){throw 2})}catch{}i.exports=function(y,x){if(!x&&!f)return!1;var E=!1;try{var P={};P[h]=function(){return{next:function(){return{done:E=!0}}}},y(P)}catch{}return E}}),"1d80":(function(i,o){i.exports=function(r){if(r==null)throw TypeError("Can't call method on "+r);return r}}),"1dde":(function(i,o,r){var c=r("d039"),h=r("b622"),f=r("2d00"),v=h("species");i.exports=function(g){return f>=51||!c(function(){var y=[],x=y.constructor={};return x[v]=function(){return{foo:1}},y[g](Boolean).foo!==1})}}),"23cb":(function(i,o,r){var c=r("a691"),h=Math.max,f=Math.min;i.exports=function(v,g){var y=c(v);return y<0?h(y+g,0):f(y,g)}}),"23e7":(function(i,o,r){var c=r("da84"),h=r("06cf").f,f=r("9112"),v=r("6eeb"),g=r("ce4e"),y=r("e893"),x=r("94ca");i.exports=function(E,P){var I=E.target,D=E.global,F=E.stat,C,A,O,j,te,B;if(D?A=c:F?A=c[I]||g(I,{}):A=(c[I]||{}).prototype,A)for(O in P){if(te=P[O],E.noTargetGet?(B=h(A,O),j=B&&B.value):j=A[O],C=x(D?O:I+(F?".":"#")+O,E.forced),!C&&j!==void 0){if(typeof te==typeof j)continue;y(te,j)}(E.sham||j&&j.sham)&&f(te,"sham",!0),v(A,O,te,E)}}}),"241c":(function(i,o,r){var c=r("ca84"),h=r("7839"),f=h.concat("length","prototype");o.f=Object.getOwnPropertyNames||function(g){return c(g,f)}}),"25f0":(function(i,o,r){var c=r("6eeb"),h=r("825a"),f=r("d039"),v=r("ad6d"),g="toString",y=RegExp.prototype,x=y[g],E=f(function(){return x.call({source:"a",flags:"b"})!="/a/b"}),P=x.name!=g;(E||P)&&c(RegExp.prototype,g,function(){var D=h(this),F=String(D.source),C=D.flags,A=String(C===void 0&&D instanceof RegExp&&!("flags"in y)?v.call(D):C);return"/"+F+"/"+A},{unsafe:!0})}),"2ca0":(function(i,o,r){var c=r("23e7"),h=r("06cf").f,f=r("50c4"),v=r("5a34"),g=r("1d80"),y=r("ab13"),x=r("c430"),E="".startsWith,P=Math.min,I=y("startsWith"),D=!x&&!I&&!!(function(){var F=h(String.prototype,"startsWith");return F&&!F.writable})();c({target:"String",proto:!0,forced:!D&&!I},{startsWith:function(C){var A=String(g(this));v(C);var O=f(P(arguments.length>1?arguments[1]:void 0,A.length)),j=String(C);return E?E.call(A,j,O):A.slice(O,O+j.length)===j}})}),"2d00":(function(i,o,r){var c=r("da84"),h=r("342f"),f=c.process,v=f&&f.versions,g=v&&v.v8,y,x;g?(y=g.split("."),x=y[0]+y[1]):h&&(y=h.match(/Edge\/(\d+)/),(!y||y[1]>=74)&&(y=h.match(/Chrome\/(\d+)/),y&&(x=y[1]))),i.exports=x&&+x}),"342f":(function(i,o,r){var c=r("d066");i.exports=c("navigator","userAgent")||""}),"35a1":(function(i,o,r){var c=r("f5df"),h=r("3f8c"),f=r("b622"),v=f("iterator");i.exports=function(g){if(g!=null)return g[v]||g["@@iterator"]||h[c(g)]}}),"37e8":(function(i,o,r){var c=r("83ab"),h=r("9bf2"),f=r("825a"),v=r("df75");i.exports=c?Object.defineProperties:function(y,x){f(y);for(var E=v(x),P=E.length,I=0,D;P>I;)h.f(y,D=E[I++],x[D]);return y}}),"3bbe":(function(i,o,r){var c=r("861d");i.exports=function(h){if(!c(h)&&h!==null)throw TypeError("Can't set "+String(h)+" as a prototype");return h}}),"3ca3":(function(i,o,r){var c=r("6547").charAt,h=r("69f3"),f=r("7dd0"),v="String Iterator",g=h.set,y=h.getterFor(v);f(String,"String",function(x){g(this,{type:v,string:String(x),index:0})},function(){var E=y(this),P=E.string,I=E.index,D;return I>=P.length?{value:void 0,done:!0}:(D=c(P,I),E.index+=D.length,{value:D,done:!1})})}),"3f8c":(function(i,o){i.exports={}}),4160:(function(i,o,r){var c=r("23e7"),h=r("17c2");c({target:"Array",proto:!0,forced:[].forEach!=h},{forEach:h})}),"428f":(function(i,o,r){var c=r("da84");i.exports=c}),"44ad":(function(i,o,r){var c=r("d039"),h=r("c6b6"),f="".split;i.exports=c(function(){return!Object("z").propertyIsEnumerable(0)})?function(v){return h(v)=="String"?f.call(v,""):Object(v)}:Object}),"44d2":(function(i,o,r){var c=r("b622"),h=r("7c73"),f=r("9bf2"),v=c("unscopables"),g=Array.prototype;g[v]==null&&f.f(g,v,{configurable:!0,value:h(null)}),i.exports=function(y){g[v][y]=!0}}),"44e7":(function(i,o,r){var c=r("861d"),h=r("c6b6"),f=r("b622"),v=f("match");i.exports=function(g){var y;return c(g)&&((y=g[v])!==void 0?!!y:h(g)=="RegExp")}}),4930:(function(i,o,r){var c=r("d039");i.exports=!!Object.getOwnPropertySymbols&&!c(function(){return!String(Symbol())})}),"4d64":(function(i,o,r){var c=r("fc6a"),h=r("50c4"),f=r("23cb"),v=function(g){return function(y,x,E){var P=c(y),I=h(P.length),D=f(E,I),F;if(g&&x!=x){for(;I>D;)if(F=P[D++],F!=F)return!0}else for(;I>D;D++)if((g||D in P)&&P[D]===x)return g||D||0;return!g&&-1}};i.exports={includes:v(!0),indexOf:v(!1)}}),"4de4":(function(i,o,r){var c=r("23e7"),h=r("b727").filter,f=r("1dde"),v=r("ae40"),g=f("filter"),y=v("filter");c({target:"Array",proto:!0,forced:!g||!y},{filter:function(E){return h(this,E,arguments.length>1?arguments[1]:void 0)}})}),"4df4":(function(i,o,r){var c=r("0366"),h=r("7b0b"),f=r("9bdd"),v=r("e95a"),g=r("50c4"),y=r("8418"),x=r("35a1");i.exports=function(P){var I=h(P),D=typeof this=="function"?this:Array,F=arguments.length,C=F>1?arguments[1]:void 0,A=C!==void 0,O=x(I),j=0,te,B,z,re,ne,X;if(A&&(C=c(C,F>2?arguments[2]:void 0,2)),O!=null&&!(D==Array&&v(O)))for(re=O.call(I),ne=re.next,B=new D;!(z=ne.call(re)).done;j++)X=A?f(re,C,[z.value,j],!0):z.value,y(B,j,X);else for(te=g(I.length),B=new D(te);te>j;j++)X=A?C(I[j],j):I[j],y(B,j,X);return B.length=j,B}}),"4fad":(function(i,o,r){var c=r("23e7"),h=r("6f53").entries;c({target:"Object",stat:!0},{entries:function(v){return h(v)}})}),"50c4":(function(i,o,r){var c=r("a691"),h=Math.min;i.exports=function(f){return f>0?h(c(f),9007199254740991):0}}),5135:(function(i,o){var r={}.hasOwnProperty;i.exports=function(c,h){return r.call(c,h)}}),5319:(function(i,o,r){var c=r("d784"),h=r("825a"),f=r("7b0b"),v=r("50c4"),g=r("a691"),y=r("1d80"),x=r("8aa5"),E=r("14c3"),P=Math.max,I=Math.min,D=Math.floor,F=/\$([$&'`]|\d\d?|<[^>]*>)/g,C=/\$([$&'`]|\d\d?)/g,A=function(O){return O===void 0?O:String(O)};c("replace",2,function(O,j,te,B){var z=B.REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE,re=B.REPLACE_KEEPS_$0,ne=z?"$":"$0";return[function(ce,be){var J=y(this),Z=ce==null?void 0:ce[O];return Z!==void 0?Z.call(ce,J,be):j.call(String(J),ce,be)},function(G,ce){if(!z&&re||typeof ce=="string"&&ce.indexOf(ne)===-1){var be=te(j,G,this,ce);if(be.done)return be.value}var J=h(G),Z=String(this),ge=typeof ce=="function";ge||(ce=String(ce));var q=J.global;if(q){var W=J.unicode;J.lastIndex=0}for(var M=[];;){var he=E(J,Z);if(he===null||(M.push(he),!q))break;var oe=String(he[0]);oe===""&&(J.lastIndex=x(Z,v(J.lastIndex),W))}for(var K="",H=0,Ee=0;Ee<M.length;Ee++){he=M[Ee];for(var _e=String(he[0]),Ce=P(I(g(he.index),Z.length),0),Re=[],Ke=1;Ke<he.length;Ke++)Re.push(A(he[Ke]));var Be=he.groups;if(ge){var Te=[_e].concat(Re,Ce,Z);Be!==void 0&&Te.push(Be);var Q=String(ce.apply(void 0,Te))}else Q=X(_e,Z,Ce,Re,Be,ce);Ce>=H&&(K+=Z.slice(H,Ce)+Q,H=Ce+_e.length)}return K+Z.slice(H)}];function X(G,ce,be,J,Z,ge){var q=be+G.length,W=J.length,M=C;return Z!==void 0&&(Z=f(Z),M=F),j.call(ge,M,function(he,oe){var K;switch(oe.charAt(0)){case"$":return"$";case"&":return G;case"`":return ce.slice(0,be);case"'":return ce.slice(q);case"<":K=Z[oe.slice(1,-1)];break;default:var H=+oe;if(H===0)return he;if(H>W){var Ee=D(H/10);return Ee===0?he:Ee<=W?J[Ee-1]===void 0?oe.charAt(1):J[Ee-1]+oe.charAt(1):he}K=J[H-1]}return K===void 0?"":K})}})}),5692:(function(i,o,r){var c=r("c430"),h=r("c6cd");(i.exports=function(f,v){return h[f]||(h[f]=v!==void 0?v:{})})("versions",[]).push({version:"3.6.5",mode:c?"pure":"global",copyright:"© 2020 Denis Pushkarev (zloirock.ru)"})}),"56ef":(function(i,o,r){var c=r("d066"),h=r("241c"),f=r("7418"),v=r("825a");i.exports=c("Reflect","ownKeys")||function(y){var x=h.f(v(y)),E=f.f;return E?x.concat(E(y)):x}}),"5a34":(function(i,o,r){var c=r("44e7");i.exports=function(h){if(c(h))throw TypeError("The method doesn't accept regular expressions");return h}}),"5c6c":(function(i,o){i.exports=function(r,c){return{enumerable:!(r&1),configurable:!(r&2),writable:!(r&4),value:c}}}),"5db7":(function(i,o,r){var c=r("23e7"),h=r("a2bf"),f=r("7b0b"),v=r("50c4"),g=r("1c0b"),y=r("65f0");c({target:"Array",proto:!0},{flatMap:function(E){var P=f(this),I=v(P.length),D;return g(E),D=y(P,0),D.length=h(D,P,P,I,0,1,E,arguments.length>1?arguments[1]:void 0),D}})}),6547:(function(i,o,r){var c=r("a691"),h=r("1d80"),f=function(v){return function(g,y){var x=String(h(g)),E=c(y),P=x.length,I,D;return E<0||E>=P?v?"":void 0:(I=x.charCodeAt(E),I<55296||I>56319||E+1===P||(D=x.charCodeAt(E+1))<56320||D>57343?v?x.charAt(E):I:v?x.slice(E,E+2):(I-55296<<10)+(D-56320)+65536)}};i.exports={codeAt:f(!1),charAt:f(!0)}}),"65f0":(function(i,o,r){var c=r("861d"),h=r("e8b5"),f=r("b622"),v=f("species");i.exports=function(g,y){var x;return h(g)&&(x=g.constructor,typeof x=="function"&&(x===Array||h(x.prototype))?x=void 0:c(x)&&(x=x[v],x===null&&(x=void 0))),new(x===void 0?Array:x)(y===0?0:y)}}),"69f3":(function(i,o,r){var c=r("7f9a"),h=r("da84"),f=r("861d"),v=r("9112"),g=r("5135"),y=r("f772"),x=r("d012"),E=h.WeakMap,P,I,D,F=function(z){return D(z)?I(z):P(z,{})},C=function(z){return function(re){var ne;if(!f(re)||(ne=I(re)).type!==z)throw TypeError("Incompatible receiver, "+z+" required");return ne}};if(c){var A=new E,O=A.get,j=A.has,te=A.set;P=function(z,re){return te.call(A,z,re),re},I=function(z){return O.call(A,z)||{}},D=function(z){return j.call(A,z)}}else{var B=y("state");x[B]=!0,P=function(z,re){return v(z,B,re),re},I=function(z){return g(z,B)?z[B]:{}},D=function(z){return g(z,B)}}i.exports={set:P,get:I,has:D,enforce:F,getterFor:C}}),"6eeb":(function(i,o,r){var c=r("da84"),h=r("9112"),f=r("5135"),v=r("ce4e"),g=r("8925"),y=r("69f3"),x=y.get,E=y.enforce,P=String(String).split("String");(i.exports=function(I,D,F,C){var A=C?!!C.unsafe:!1,O=C?!!C.enumerable:!1,j=C?!!C.noTargetGet:!1;if(typeof F=="function"&&(typeof D=="string"&&!f(F,"name")&&h(F,"name",D),E(F).source=P.join(typeof D=="string"?D:"")),I===c){O?I[D]=F:v(D,F);return}else A?!j&&I[D]&&(O=!0):delete I[D];O?I[D]=F:h(I,D,F)})(Function.prototype,"toString",function(){return typeof this=="function"&&x(this).source||g(this)})}),"6f53":(function(i,o,r){var c=r("83ab"),h=r("df75"),f=r("fc6a"),v=r("d1e7").f,g=function(y){return function(x){for(var E=f(x),P=h(E),I=P.length,D=0,F=[],C;I>D;)C=P[D++],(!c||v.call(E,C))&&F.push(y?[C,E[C]]:E[C]);return F}};i.exports={entries:g(!0),values:g(!1)}}),"73d9":(function(i,o,r){var c=r("44d2");c("flatMap")}),7418:(function(i,o){o.f=Object.getOwnPropertySymbols}),"746f":(function(i,o,r){var c=r("428f"),h=r("5135"),f=r("e538"),v=r("9bf2").f;i.exports=function(g){var y=c.Symbol||(c.Symbol={});h(y,g)||v(y,g,{value:f.f(g)})}}),7839:(function(i,o){i.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]}),"7b0b":(function(i,o,r){var c=r("1d80");i.exports=function(h){return Object(c(h))}}),"7c73":(function(i,o,r){var c=r("825a"),h=r("37e8"),f=r("7839"),v=r("d012"),g=r("1be4"),y=r("cc12"),x=r("f772"),E=">",P="<",I="prototype",D="script",F=x("IE_PROTO"),C=function(){},A=function(z){return P+D+E+z+P+"/"+D+E},O=function(z){z.write(A("")),z.close();var re=z.parentWindow.Object;return z=null,re},j=function(){var z=y("iframe"),re="java"+D+":",ne;return z.style.display="none",g.appendChild(z),z.src=String(re),ne=z.contentWindow.document,ne.open(),ne.write(A("document.F=Object")),ne.close(),ne.F},te,B=function(){try{te=document.domain&&new ActiveXObject("htmlfile")}catch{}B=te?O(te):j();for(var z=f.length;z--;)delete B[I][f[z]];return B()};v[F]=!0,i.exports=Object.create||function(re,ne){var X;return re!==null?(C[I]=c(re),X=new C,C[I]=null,X[F]=re):X=B(),ne===void 0?X:h(X,ne)}}),"7dd0":(function(i,o,r){var c=r("23e7"),h=r("9ed3"),f=r("e163"),v=r("d2bb"),g=r("d44e"),y=r("9112"),x=r("6eeb"),E=r("b622"),P=r("c430"),I=r("3f8c"),D=r("ae93"),F=D.IteratorPrototype,C=D.BUGGY_SAFARI_ITERATORS,A=E("iterator"),O="keys",j="values",te="entries",B=function(){return this};i.exports=function(z,re,ne,X,G,ce,be){h(ne,re,X);var J=function(Ee){if(Ee===G&&M)return M;if(!C&&Ee in q)return q[Ee];switch(Ee){case O:return function(){return new ne(this,Ee)};case j:return function(){return new ne(this,Ee)};case te:return function(){return new ne(this,Ee)}}return function(){return new ne(this)}},Z=re+" Iterator",ge=!1,q=z.prototype,W=q[A]||q["@@iterator"]||G&&q[G],M=!C&&W||J(G),he=re=="Array"&&q.entries||W,oe,K,H;if(he&&(oe=f(he.call(new z)),F!==Object.prototype&&oe.next&&(!P&&f(oe)!==F&&(v?v(oe,F):typeof oe[A]!="function"&&y(oe,A,B)),g(oe,Z,!0,!0),P&&(I[Z]=B))),G==j&&W&&W.name!==j&&(ge=!0,M=function(){return W.call(this)}),(!P||be)&&q[A]!==M&&y(q,A,M),I[re]=M,G)if(K={values:J(j),keys:ce?M:J(O),entries:J(te)},be)for(H in K)(C||ge||!(H in q))&&x(q,H,K[H]);else c({target:re,proto:!0,forced:C||ge},K);return K}}),"7f9a":(function(i,o,r){var c=r("da84"),h=r("8925"),f=c.WeakMap;i.exports=typeof f=="function"&&/native code/.test(h(f))}),"825a":(function(i,o,r){var c=r("861d");i.exports=function(h){if(!c(h))throw TypeError(String(h)+" is not an object");return h}}),"83ab":(function(i,o,r){var c=r("d039");i.exports=!c(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!=7})}),8418:(function(i,o,r){var c=r("c04e"),h=r("9bf2"),f=r("5c6c");i.exports=function(v,g,y){var x=c(g);x in v?h.f(v,x,f(0,y)):v[x]=y}}),"861d":(function(i,o){i.exports=function(r){return typeof r=="object"?r!==null:typeof r=="function"}}),8875:(function(i,o,r){var c,h,f;(function(v,g){h=[],c=g,f=typeof c=="function"?c.apply(o,h):c,f!==void 0&&(i.exports=f)})(typeof self<"u"?self:this,function(){function v(){var g=Object.getOwnPropertyDescriptor(document,"currentScript");if(!g&&"currentScript"in document&&document.currentScript||g&&g.get!==v&&document.currentScript)return document.currentScript;try{throw new Error}catch(te){var y=/.*at [^(]*\((.*):(.+):(.+)\)$/ig,x=/@([^@]*):(\d+):(\d+)\s*$/ig,E=y.exec(te.stack)||x.exec(te.stack),P=E&&E[1]||!1,I=E&&E[2]||!1,D=document.location.href.replace(document.location.hash,""),F,C,A,O=document.getElementsByTagName("script");P===D&&(F=document.documentElement.outerHTML,C=new RegExp("(?:[^\\n]+?\\n){0,"+(I-2)+"}[^<]*<script>([\\d\\D]*?)<\\/script>[\\d\\D]*","i"),A=F.replace(C,"$1").trim());for(var j=0;j<O.length;j++)if(O[j].readyState==="interactive"||O[j].src===P||P===D&&O[j].innerHTML&&O[j].innerHTML.trim()===A)return O[j];return null}}return v})}),8925:(function(i,o,r){var c=r("c6cd"),h=Function.toString;typeof c.inspectSource!="function"&&(c.inspectSource=function(f){return h.call(f)}),i.exports=c.inspectSource}),"8aa5":(function(i,o,r){var c=r("6547").charAt;i.exports=function(h,f,v){return f+(v?c(h,f).length:1)}}),"8bbf":(function(i,o){i.exports=s}),"90e3":(function(i,o){var r=0,c=Math.random();i.exports=function(h){return"Symbol("+String(h===void 0?"":h)+")_"+(++r+c).toString(36)}}),9112:(function(i,o,r){var c=r("83ab"),h=r("9bf2"),f=r("5c6c");i.exports=c?function(v,g,y){return h.f(v,g,f(1,y))}:function(v,g,y){return v[g]=y,v}}),9263:(function(i,o,r){var c=r("ad6d"),h=r("9f7f"),f=RegExp.prototype.exec,v=String.prototype.replace,g=f,y=(function(){var I=/a/,D=/b*/g;return f.call(I,"a"),f.call(D,"a"),I.lastIndex!==0||D.lastIndex!==0})(),x=h.UNSUPPORTED_Y||h.BROKEN_CARET,E=/()??/.exec("")[1]!==void 0,P=y||E||x;P&&(g=function(D){var F=this,C,A,O,j,te=x&&F.sticky,B=c.call(F),z=F.source,re=0,ne=D;return te&&(B=B.replace("y",""),B.indexOf("g")===-1&&(B+="g"),ne=String(D).slice(F.lastIndex),F.lastIndex>0&&(!F.multiline||F.multiline&&D[F.lastIndex-1]!==` 92`)&&(z="(?: "+z+")",ne=" "+ne,re++),A=new RegExp("^(?:"+z+")",B)),E&&(A=new RegExp("^"+z+"$(?!\\s)",B)),y&&(C=F.lastIndex),O=f.call(te?A:F,ne),te?O?(O.input=O.input.slice(re),O[0]=O[0].slice(re),O.index=F.lastIndex,F.lastIndex+=O[0].length):F.lastIndex=0:y&&O&&(F.lastIndex=F.global?O.index+O[0].length:C),E&&O&&O.length>1&&v.call(O[0],A,function(){for(j=1;j<arguments.length-2;j++)arguments[j]===void 0&&(O[j]=void 0)}),O}),i.exports=g}),"94ca":(function(i,o,r){var c=r("d039"),h=/#|\.prototype\./,f=function(E,P){var I=g[v(E)];return I==x?!0:I==y?!1:typeof P=="function"?c(P):!!P},v=f.normalize=function(E){return String(E).replace(h,".").toLowerCase()},g=f.data={},y=f.NATIVE="N",x=f.POLYFILL="P";i.exports=f}),"99af":(function(i,o,r){var c=r("23e7"),h=r("d039"),f=r("e8b5"),v=r("861d"),g=r("7b0b"),y=r("50c4"),x=r("8418"),E=r("65f0"),P=r("1dde"),I=r("b622"),D=r("2d00"),F=I("isConcatSpreadable"),C=9007199254740991,A="Maximum allowed index exceeded",O=D>=51||!h(function(){var z=[];return z[F]=!1,z.concat()[0]!==z}),j=P("concat"),te=function(z){if(!v(z))return!1;var re=z[F];return re!==void 0?!!re:f(z)},B=!O||!j;c({target:"Array",proto:!0,forced:B},{concat:function(re){var ne=g(this),X=E(ne,0),G=0,ce,be,J,Z,ge;for(ce=-1,J=arguments.length;ce<J;ce++)if(ge=ce===-1?ne:arguments[ce],te(ge)){if(Z=y(ge.length),G+Z>C)throw TypeError(A);for(be=0;be<Z;be++,G++)be in ge&&x(X,G,ge[be])}else{if(G>=C)throw TypeError(A);x(X,G++,ge)}return X.length=G,X}})}),"9bdd":(function(i,o,r){var c=r("825a");i.exports=function(h,f,v,g){try{return g?f(c(v)[0],v[1]):f(v)}catch(x){var y=h.return;throw y!==void 0&&c(y.call(h)),x}}}),"9bf2":(function(i,o,r){var c=r("83ab"),h=r("0cfb"),f=r("825a"),v=r("c04e"),g=Object.defineProperty;o.f=c?g:function(x,E,P){if(f(x),E=v(E,!0),f(P),h)try{return g(x,E,P)}catch{}if("get"in P||"set"in P)throw TypeError("Accessors not supported");return"value"in P&&(x[E]=P.value),x}}),"9ed3":(function(i,o,r){var c=r("ae93").IteratorPrototype,h=r("7c73"),f=r("5c6c"),v=r("d44e"),g=r("3f8c"),y=function(){return this};i.exports=function(x,E,P){var I=E+" Iterator";return x.prototype=h(c,{next:f(1,P)}),v(x,I,!1,!0),g[I]=y,x}}),"9f7f":(function(i,o,r){var c=r("d039");function h(f,v){return RegExp(f,v)}o.UNSUPPORTED_Y=c(function(){var f=h("a","y");return f.lastIndex=2,f.exec("abcd")!=null}),o.BROKEN_CARET=c(function(){var f=h("^r","gy");return f.lastIndex=2,f.exec("str")!=null})}),a2bf:(function(i,o,r){var c=r("e8b5"),h=r("50c4"),f=r("0366"),v=function(g,y,x,E,P,I,D,F){for(var C=P,A=0,O=D?f(D,F,3):!1,j;A<E;){if(A in x){if(j=O?O(x[A],A,y):x[A],I>0&&c(j))C=v(g,y,j,h(j.length),C,I-1)-1;else{if(C>=9007199254740991)throw TypeError("Exceed the acceptable array length");g[C]=j}C++}A++}return C};i.exports=v}),a352:(function(i,o){i.exports=n}),a434:(function(i,o,r){var c=r("23e7"),h=r("23cb"),f=r("a691"),v=r("50c4"),g=r("7b0b"),y=r("65f0"),x=r("8418"),E=r("1dde"),P=r("ae40"),I=E("splice"),D=P("splice",{ACCESSORS:!0,0:0,1:2}),F=Math.max,C=Math.min,A=9007199254740991,O="Maximum allowed length exceeded";c({target:"Array",proto:!0,forced:!I||!D},{splice:function(te,B){var z=g(this),re=v(z.length),ne=h(te,re),X=arguments.length,G,ce,be,J,Z,ge;if(X===0?G=ce=0:X===1?(G=0,ce=re-ne):(G=X-2,ce=C(F(f(B),0),re-ne)),re+G-ce>A)throw TypeError(O);for(be=y(z,ce),J=0;J<ce;J++)Z=ne+J,Z in z&&x(be,J,z[Z]);if(be.length=ce,G<ce){for(J=ne;J<re-ce;J++)Z=J+ce,ge=J+G,Z in z?z[ge]=z[Z]:delete z[ge];for(J=re;J>re-ce+G;J--)delete z[J-1]}else if(G>ce)for(J=re-ce;J>ne;J--)Z=J+ce-1,ge=J+G-1,Z in z?z[ge]=z[Z]:delete z[ge];for(J=0;J<G;J++)z[J+ne]=arguments[J+2];return z.length=re-ce+G,be}})}),a4d3:(function(i,o,r){var c=r("23e7"),h=r("da84"),f=r("d066"),v=r("c430"),g=r("83ab"),y=r("4930"),x=r("fdbf"),E=r("d039"),P=r("5135"),I=r("e8b5"),D=r("861d"),F=r("825a"),C=r("7b0b"),A=r("fc6a"),O=r("c04e"),j=r("5c6c"),te=r("7c73"),B=r("df75"),z=r("241c"),re=r("057f"),ne=r("7418"),X=r("06cf"),G=r("9bf2"),ce=r("d1e7"),be=r("9112"),J=r("6eeb"),Z=r("5692"),ge=r("f772"),q=r("d012"),W=r("90e3"),M=r("b622"),he=r("e538"),oe=r("746f"),K=r("d44e"),H=r("69f3"),Ee=r("b727").forEach,_e=ge("hidden"),Ce="Symbol",Re="prototype",Ke=M("toPrimitive"),Be=H.set,Te=H.getterFor(Ce),Q=Object[Re],Se=h.Symbol,Ve=f("JSON","stringify"),Qe=X.f,je=G.f,nt=re.f,ft=ce.f,ut=Z("symbols"),Ye=Z("op-symbols"),We=Z("string-to-symbol-registry"),ot=Z("symbol-to-string-registry"),ht=Z("wks"),Tt=h.QObject,Ot=!Tt||!Tt[Re]||!Tt[Re].findChild,zt=g&&E(function(){return te(je({},"a",{get:function(){return je(this,"a",{value:7}).a}})).a!=7})?function(gt,pt,He){var it=Qe(Q,pt);it&&delete Q[pt],je(gt,pt,He),it&>!==Q&&je(Q,pt,it)}:je,Kt=function(gt,pt){var He=ut[gt]=te(Se[Re]);return Be(He,{type:Ce,tag:gt,description:pt}),g||(He.description=pt),He},Fe=x?function(gt){return typeof gt=="symbol"}:function(gt){return Object(gt)instanceof Se},ee=function(pt,He,it){pt===Q&&ee(Ye,He,it),F(pt);var $t=O(He,!0);return F(it),P(ut,$t)?(it.enumerable?(P(pt,_e)&&pt[_e][$t]&&(pt[_e][$t]=!1),it=te(it,{enumerable:j(0,!1)})):(P(pt,_e)||je(pt,_e,j(1,{})),pt[_e][$t]=!0),zt(pt,$t,it)):je(pt,$t,it)},R=function(pt,He){F(pt);var it=A(He),$t=B(it).concat(at(it));return Ee($t,function(ze){(!g||fe.call(it,ze))&&ee(pt,ze,it[ze])}),pt},we=function(pt,He){return He===void 0?te(pt):R(te(pt),He)},fe=function(pt){var He=O(pt,!0),it=ft.call(this,He);return this===Q&&P(ut,He)&&!P(Ye,He)?!1:it||!P(this,He)||!P(ut,He)||P(this,_e)&&this[_e][He]?it:!0},Oe=function(pt,He){var it=A(pt),$t=O(He,!0);if(!(it===Q&&P(ut,$t)&&!P(Ye,$t))){var ze=Qe(it,$t);return ze&&P(ut,$t)&&!(P(it,_e)&&it[_e][$t])&&(ze.enumerable=!0),ze}},Xe=function(pt){var He=nt(A(pt)),it=[];return Ee(He,function($t){!P(ut,$t)&&!P(q,$t)&&it.push($t)}),it},at=function(pt){var He=pt===Q,it=nt(He?Ye:A(pt)),$t=[];return Ee(it,function(ze){P(ut,ze)&&(!He||P(Q,ze))&&$t.push(ut[ze])}),$t};if(y||(Se=function(){if(this instanceof Se)throw TypeError("Symbol is not a constructor");var pt=!arguments.length||arguments[0]===void 0?void 0:String(arguments[0]),He=W(pt),it=function($t){this===Q&&it.call(Ye,$t),P(this,_e)&&P(this[_e],He)&&(this[_e][He]=!1),zt(this,He,j(1,$t))};return g&&Ot&&zt(Q,He,{configurable:!0,set:it}),Kt(He,pt)},J(Se[Re],"toString",function(){return Te(this).tag}),J(Se,"withoutSetter",function(gt){return Kt(W(gt),gt)}),ce.f=fe,G.f=ee,X.f=Oe,z.f=re.f=Xe,ne.f=at,he.f=function(gt){return Kt(M(gt),gt)},g&&(je(Se[Re],"description",{configurable:!0,get:function(){return Te(this).description}}),v||J(Q,"propertyIsEnumerable",fe,{unsafe:!0}))),c({global:!0,wrap:!0,forced:!y,sham:!y},{Symbol:Se}),Ee(B(ht),function(gt){oe(gt)}),c({target:Ce,stat:!0,forced:!y},{for:function(gt){var pt=String(gt);if(P(We,pt))return We[pt];var He=Se(pt);return We[pt]=He,ot[He]=pt,He},keyFor:function(pt){if(!Fe(pt))throw TypeError(pt+" is not a symbol");if(P(ot,pt))return ot[pt]},useSetter:function(){Ot=!0},useSimple:function(){Ot=!1}}),c({target:"Object",stat:!0,forced:!y,sham:!g},{create:we,defineProperty:ee,defineProperties:R,getOwnPropertyDescriptor:Oe}),c({target:"Object",stat:!0,forced:!y},{getOwnPropertyNames:Xe,getOwnPropertySymbols:at}),c({target:"Object",stat:!0,forced:E(function(){ne.f(1)})},{getOwnPropertySymbols:function(pt){return ne.f(C(pt))}}),Ve){var wt=!y||E(function(){var gt=Se();return Ve([gt])!="[null]"||Ve({a:gt})!="{}"||Ve(Object(gt))!="{}"});c({target:"JSON",stat:!0,forced:wt},{stringify:function(pt,He,it){for(var $t=[pt],ze=1,Je;arguments.length>ze;)$t.push(arguments[ze++]);if(Je=He,!(!D(He)&&pt===void 0||Fe(pt)))return I(He)||(He=function(tt,Jt){if(typeof Je=="function"&&(Jt=Je.call(this,tt,Jt)),!Fe(Jt))return Jt}),$t[1]=He,Ve.apply(null,$t)}})}Se[Re][Ke]||be(Se[Re],Ke,Se[Re].valueOf),K(Se,Ce),q[_e]=!0}),a630:(function(i,o,r){var c=r("23e7"),h=r("4df4"),f=r("1c7e"),v=!f(function(g){Array.from(g)});c({target:"Array",stat:!0,forced:v},{from:h})}),a640:(function(i,o,r){var c=r("d039");i.exports=function(h,f){var v=[][h];return!!v&&c(function(){v.call(null,f||function(){throw 1},1)})}}),a691:(function(i,o){var r=Math.ceil,c=Math.floor;i.exports=function(h){return isNaN(h=+h)?0:(h>0?c:r)(h)}}),ab13:(function(i,o,r){var c=r("b622"),h=c("match");i.exports=function(f){var v=/./;try{"/./"[f](v)}catch{try{return v[h]=!1,"/./"[f](v)}catch{}}return!1}}),ac1f:(function(i,o,r){var c=r("23e7"),h=r("9263");c({target:"RegExp",proto:!0,forced:/./.exec!==h},{exec:h})}),ad6d:(function(i,o,r){var c=r("825a");i.exports=function(){var h=c(this),f="";return h.global&&(f+="g"),h.ignoreCase&&(f+="i"),h.multiline&&(f+="m"),h.dotAll&&(f+="s"),h.unicode&&(f+="u"),h.sticky&&(f+="y"),f}}),ae40:(function(i,o,r){var c=r("83ab"),h=r("d039"),f=r("5135"),v=Object.defineProperty,g={},y=function(x){throw x};i.exports=function(x,E){if(f(g,x))return g[x];E||(E={});var P=[][x],I=f(E,"ACCESSORS")?E.ACCESSORS:!1,D=f(E,0)?E[0]:y,F=f(E,1)?E[1]:void 0;return g[x]=!!P&&!h(function(){if(I&&!c)return!0;var C={length:-1};I?v(C,1,{enumerable:!0,get:y}):C[1]=1,P.call(C,D,F)})}}),ae93:(function(i,o,r){var c=r("e163"),h=r("9112"),f=r("5135"),v=r("b622"),g=r("c430"),y=v("iterator"),x=!1,E=function(){return this},P,I,D;[].keys&&(D=[].keys(),"next"in D?(I=c(c(D)),I!==Object.prototype&&(P=I)):x=!0),P==null&&(P={}),!g&&!f(P,y)&&h(P,y,E),i.exports={IteratorPrototype:P,BUGGY_SAFARI_ITERATORS:x}}),b041:(function(i,o,r){var c=r("00ee"),h=r("f5df");i.exports=c?{}.toString:function(){return"[object "+h(this)+"]"}}),b0c0:(function(i,o,r){var c=r("83ab"),h=r("9bf2").f,f=Function.prototype,v=f.toString,g=/^\s*function ([^ (]*)/,y="name";c&&!(y in f)&&h(f,y,{configurable:!0,get:function(){try{return v.call(this).match(g)[1]}catch{return""}}})}),b622:(function(i,o,r){var c=r("da84"),h=r("5692"),f=r("5135"),v=r("90e3"),g=r("4930"),y=r("fdbf"),x=h("wks"),E=c.Symbol,P=y?E:E&&E.withoutSetter||v;i.exports=function(I){return f(x,I)||(g&&f(E,I)?x[I]=E[I]:x[I]=P("Symbol."+I)),x[I]}}),b64b:(function(i,o,r){var c=r("23e7"),h=r("7b0b"),f=r("df75"),v=r("d039"),g=v(function(){f(1)});c({target:"Object",stat:!0,forced:g},{keys:function(x){return f(h(x))}})}),b727:(function(i,o,r){var c=r("0366"),h=r("44ad"),f=r("7b0b"),v=r("50c4"),g=r("65f0"),y=[].push,x=function(E){var P=E==1,I=E==2,D=E==3,F=E==4,C=E==6,A=E==5||C;return function(O,j,te,B){for(var z=f(O),re=h(z),ne=c(j,te,3),X=v(re.length),G=0,ce=B||g,be=P?ce(O,X):I?ce(O,0):void 0,J,Z;X>G;G++)if((A||G in re)&&(J=re[G],Z=ne(J,G,z),E)){if(P)be[G]=Z;else if(Z)switch(E){case 3:return!0;case 5:return J;case 6:return G;case 2:y.call(be,J)}else if(F)return!1}return C?-1:D||F?F:be}};i.exports={forEach:x(0),map:x(1),filter:x(2),some:x(3),every:x(4),find:x(5),findIndex:x(6)}}),c04e:(function(i,o,r){var c=r("861d");i.exports=function(h,f){if(!c(h))return h;var v,g;if(f&&typeof(v=h.toString)=="function"&&!c(g=v.call(h))||typeof(v=h.valueOf)=="function"&&!c(g=v.call(h))||!f&&typeof(v=h.toString)=="function"&&!c(g=v.call(h)))return g;throw TypeError("Can't convert object to primitive value")}}),c430:(function(i,o){i.exports=!1}),c6b6:(function(i,o){var r={}.toString;i.exports=function(c){return r.call(c).slice(8,-1)}}),c6cd:(function(i,o,r){var c=r("da84"),h=r("ce4e"),f="__core-js_shared__",v=c[f]||h(f,{});i.exports=v}),c740:(function(i,o,r){var c=r("23e7"),h=r("b727").findIndex,f=r("44d2"),v=r("ae40"),g="findIndex",y=!0,x=v(g);g in[]&&Array(1)[g](function(){y=!1}),c({target:"Array",proto:!0,forced:y||!x},{findIndex:function(P){return h(this,P,arguments.length>1?arguments[1]:void 0)}}),f(g)}),c8ba:(function(i,o){var r;r=(function(){return this})();try{r=r||new Function("return this")()}catch{typeof window=="object"&&(r=window)}i.exports=r}),c975:(function(i,o,r){var c=r("23e7"),h=r("4d64").indexOf,f=r("a640"),v=r("ae40"),g=[].indexOf,y=!!g&&1/[1].indexOf(1,-0)<0,x=f("indexOf"),E=v("indexOf",{ACCESSORS:!0,1:0});c({target:"Array",proto:!0,forced:y||!x||!E},{indexOf:function(I){return y?g.apply(this,arguments)||0:h(this,I,arguments.length>1?arguments[1]:void 0)}})}),ca84:(function(i,o,r){var c=r("5135"),h=r("fc6a"),f=r("4d64").indexOf,v=r("d012");i.exports=function(g,y){var x=h(g),E=0,P=[],I;for(I in x)!c(v,I)&&c(x,I)&&P.push(I);for(;y.length>E;)c(x,I=y[E++])&&(~f(P,I)||P.push(I));return P}}),caad:(function(i,o,r){var c=r("23e7"),h=r("4d64").includes,f=r("44d2"),v=r("ae40"),g=v("indexOf",{ACCESSORS:!0,1:0});c({target:"Array",proto:!0,forced:!g},{includes:function(x){return h(this,x,arguments.length>1?arguments[1]:void 0)}}),f("includes")}),cc12:(function(i,o,r){var c=r("da84"),h=r("861d"),f=c.document,v=h(f)&&h(f.createElement);i.exports=function(g){return v?f.createElement(g):{}}}),ce4e:(function(i,o,r){var c=r("da84"),h=r("9112");i.exports=function(f,v){try{h(c,f,v)}catch{c[f]=v}return v}}),d012:(function(i,o){i.exports={}}),d039:(function(i,o){i.exports=function(r){try{return!!r()}catch{return!0}}}),d066:(function(i,o,r){var c=r("428f"),h=r("da84"),f=function(v){return typeof v=="function"?v:void 0};i.exports=function(v,g){return arguments.length<2?f(c[v])||f(h[v]):c[v]&&c[v][g]||h[v]&&h[v][g]}}),d1e7:(function(i,o,r){var c={}.propertyIsEnumerable,h=Object.getOwnPropertyDescriptor,f=h&&!c.call({1:2},1);o.f=f?function(g){var y=h(this,g);return!!y&&y.enumerable}:c}),d28b:(function(i,o,r){var c=r("746f");c("iterator")}),d2bb:(function(i,o,r){var c=r("825a"),h=r("3bbe");i.exports=Object.setPrototypeOf||("__proto__"in{}?(function(){var f=!1,v={},g;try{g=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set,g.call(v,[]),f=v instanceof Array}catch{}return function(x,E){return c(x),h(E),f?g.call(x,E):x.__proto__=E,x}})():void 0)}),d3b7:(function(i,o,r){var c=r("00ee"),h=r("6eeb"),f=r("b041");c||h(Object.prototype,"toString",f,{unsafe:!0})}),d44e:(function(i,o,r){var c=r("9bf2").f,h=r("5135"),f=r("b622"),v=f("toStringTag");i.exports=function(g,y,x){g&&!h(g=x?g:g.prototype,v)&&c(g,v,{configurable:!0,value:y})}}),d58f:(function(i,o,r){var c=r("1c0b"),h=r("7b0b"),f=r("44ad"),v=r("50c4"),g=function(y){return function(x,E,P,I){c(E);var D=h(x),F=f(D),C=v(D.length),A=y?C-1:0,O=y?-1:1;if(P<2)for(;;){if(A in F){I=F[A],A+=O;break}if(A+=O,y?A<0:C<=A)throw TypeError("Reduce of empty array with no initial value")}for(;y?A>=0:C>A;A+=O)A in F&&(I=E(I,F[A],A,D));return I}};i.exports={left:g(!1),right:g(!0)}}),d784:(function(i,o,r){r("ac1f");var c=r("6eeb"),h=r("d039"),f=r("b622"),v=r("9263"),g=r("9112"),y=f("species"),x=!h(function(){var F=/./;return F.exec=function(){var C=[];return C.groups={a:"7"},C},"".replace(F,"$<a>")!=="7"}),E=(function(){return"a".replace(/./,"$0")==="$0"})(),P=f("replace"),I=(function(){return/./[P]?/./[P]("a","$0")==="":!1})(),D=!h(function(){var F=/(?:)/,C=F.exec;F.exec=function(){return C.apply(this,arguments)};var A="ab".split(F);return A.length!==2||A[0]!=="a"||A[1]!=="b"});i.exports=function(F,C,A,O){var j=f(F),te=!h(function(){var G={};return G[j]=function(){return 7},""[F](G)!=7}),B=te&&!h(function(){var G=!1,ce=/a/;return F==="split"&&(ce={},ce.constructor={},ce.constructor[y]=function(){return ce},ce.flags="",ce[j]=/./[j]),ce.exec=function(){return G=!0,null},ce[j](""),!G});if(!te||!B||F==="replace"&&!(x&&E&&!I)||F==="split"&&!D){var z=/./[j],re=A(j,""[F],function(G,ce,be,J,Z){return ce.exec===v?te&&!Z?{done:!0,value:z.call(ce,be,J)}:{done:!0,value:G.call(be,ce,J)}:{done:!1}},{REPLACE_KEEPS_$0:E,REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE:I}),ne=re[0],X=re[1];c(String.prototype,F,ne),c(RegExp.prototype,j,C==2?function(G,ce){return X.call(G,this,ce)}:function(G){return X.call(G,this)})}O&&g(RegExp.prototype[j],"sham",!0)}}),d81d:(function(i,o,r){var c=r("23e7"),h=r("b727").map,f=r("1dde"),v=r("ae40"),g=f("map"),y=v("map");c({target:"Array",proto:!0,forced:!g||!y},{map:function(E){return h(this,E,arguments.length>1?arguments[1]:void 0)}})}),da84:(function(i,o,r){(function(c){var h=function(f){return f&&f.Math==Math&&f};i.exports=h(typeof globalThis=="object"&&globalThis)||h(typeof window=="object"&&window)||h(typeof self=="object"&&self)||h(typeof c=="object"&&c)||Function("return this")()}).call(this,r("c8ba"))}),dbb4:(function(i,o,r){var c=r("23e7"),h=r("83ab"),f=r("56ef"),v=r("fc6a"),g=r("06cf"),y=r("8418");c({target:"Object",stat:!0,sham:!h},{getOwnPropertyDescriptors:function(E){for(var P=v(E),I=g.f,D=f(P),F={},C=0,A,O;D.length>C;)O=I(P,A=D[C++]),O!==void 0&&y(F,A,O);return F}})}),dbf1:(function(i,o,r){(function(c){r.d(o,"a",function(){return f});function h(){return typeof window<"u"?window.console:c.console}var f=h()}).call(this,r("c8ba"))}),ddb0:(function(i,o,r){var c=r("da84"),h=r("fdbc"),f=r("e260"),v=r("9112"),g=r("b622"),y=g("iterator"),x=g("toStringTag"),E=f.values;for(var P in h){var I=c[P],D=I&&I.prototype;if(D){if(D[y]!==E)try{v(D,y,E)}catch{D[y]=E}if(D[x]||v(D,x,P),h[P]){for(var F in f)if(D[F]!==f[F])try{v(D,F,f[F])}catch{D[F]=f[F]}}}}}),df75:(function(i,o,r){var c=r("ca84"),h=r("7839");i.exports=Object.keys||function(v){return c(v,h)}}),e01a:(function(i,o,r){var c=r("23e7"),h=r("83ab"),f=r("da84"),v=r("5135"),g=r("861d"),y=r("9bf2").f,x=r("e893"),E=f.Symbol;if(h&&typeof E=="function"&&(!("description"in E.prototype)||E().description!==void 0)){var P={},I=function(){var j=arguments.length<1||arguments[0]===void 0?void 0:String(arguments[0]),te=this instanceof I?new E(j):j===void 0?E():E(j);return j===""&&(P[te]=!0),te};x(I,E);var D=I.prototype=E.prototype;D.constructor=I;var F=D.toString,C=String(E("test"))=="Symbol(test)",A=/^Symbol\((.*)\)[^)]+$/;y(D,"description",{configurable:!0,get:function(){var j=g(this)?this.valueOf():this,te=F.call(j);if(v(P,j))return"";var B=C?te.slice(7,-1):te.replace(A,"$1");return B===""?void 0:B}}),c({global:!0,forced:!0},{Symbol:I})}}),e163:(function(i,o,r){var c=r("5135"),h=r("7b0b"),f=r("f772"),v=r("e177"),g=f("IE_PROTO"),y=Object.prototype;i.exports=v?Object.getPrototypeOf:function(x){return x=h(x),c(x,g)?x[g]:typeof x.constructor=="function"&&x instanceof x.constructor?x.constructor.prototype:x instanceof Object?y:null}}),e177:(function(i,o,r){var c=r("d039");i.exports=!c(function(){function h(){}return h.prototype.constructor=null,Object.getPrototypeOf(new h)!==h.prototype})}),e260:(function(i,o,r){var c=r("fc6a"),h=r("44d2"),f=r("3f8c"),v=r("69f3"),g=r("7dd0"),y="Array Iterator",x=v.set,E=v.getterFor(y);i.exports=g(Array,"Array",function(P,I){x(this,{type:y,target:c(P),index:0,kind:I})},function(){var P=E(this),I=P.target,D=P.kind,F=P.index++;return!I||F>=I.length?(P.target=void 0,{value:void 0,done:!0}):D=="keys"?{value:F,done:!1}:D=="values"?{value:I[F],done:!1}:{value:[F,I[F]],done:!1}},"values"),f.Arguments=f.Array,h("keys"),h("values"),h("entries")}),e439:(function(i,o,r){var c=r("23e7"),h=r("d039"),f=r("fc6a"),v=r("06cf").f,g=r("83ab"),y=h(function(){v(1)}),x=!g||y;c({target:"Object",stat:!0,forced:x,sham:!g},{getOwnPropertyDescriptor:function(P,I){return v(f(P),I)}})}),e538:(function(i,o,r){var c=r("b622");o.f=c}),e893:(function(i,o,r){var c=r("5135"),h=r("56ef"),f=r("06cf"),v=r("9bf2");i.exports=function(g,y){for(var x=h(y),E=v.f,P=f.f,I=0;I<x.length;I++){var D=x[I];c(g,D)||E(g,D,P(y,D))}}}),e8b5:(function(i,o,r){var c=r("c6b6");i.exports=Array.isArray||function(f){return c(f)=="Array"}}),e95a:(function(i,o,r){var c=r("b622"),h=r("3f8c"),f=c("iterator"),v=Array.prototype;i.exports=function(g){return g!==void 0&&(h.Array===g||v[f]===g)}}),f5df:(function(i,o,r){var c=r("00ee"),h=r("c6b6"),f=r("b622"),v=f("toStringTag"),g=h((function(){return arguments})())=="Arguments",y=function(x,E){try{return x[E]}catch{}};i.exports=c?h:function(x){var E,P,I;return x===void 0?"Undefined":x===null?"Null":typeof(P=y(E=Object(x),v))=="string"?P:g?h(E):(I=h(E))=="Object"&&typeof E.callee=="function"?"Arguments":I}}),f772:(function(i,o,r){var c=r("5692"),h=r("90e3"),f=c("keys");i.exports=function(v){return f[v]||(f[v]=h(v))}}),fb15:(function(i,o,r){if(r.r(o),typeof window<"u"){var c=window.document.currentScript;{var h=r("8875");c=h(),"currentScript"in document||Object.defineProperty(document,"currentScript",{get:h})}var f=c&&c.src.match(/(.+\/)[^/]+\.js(\?.*)?$/);f&&(r.p=f[1])}r("99af"),r("4de4"),r("4160"),r("c975"),r("d81d"),r("a434"),r("159b"),r("a4d3"),r("e439"),r("dbb4"),r("b64b");function v(Fe,ee,R){return ee in Fe?Object.defineProperty(Fe,ee,{value:R,enumerable:!0,configurable:!0,writable:!0}):Fe[ee]=R,Fe}function g(Fe,ee){var R=Object.keys(Fe);if(Object.getOwnPropertySymbols){var we=Object.getOwnPropertySymbols(Fe);ee&&(we=we.filter(function(fe){return Object.getOwnPropertyDescriptor(Fe,fe).enumerable})),R.push.apply(R,we)}return R}function y(Fe){for(var ee=1;ee<arguments.length;ee++){var R=arguments[ee]!=null?arguments[ee]:{};ee%2?g(Object(R),!0).forEach(function(we){v(Fe,we,R[we])}):Object.getOwnPropertyDescriptors?Object.defineProperties(Fe,Object.getOwnPropertyDescriptors(R)):g(Object(R)).forEach(function(we){Object.defineProperty(Fe,we,Object.getOwnPropertyDescriptor(R,we))})}return Fe}function x(Fe){if(Array.isArray(Fe))return Fe}r("e01a"),r("d28b"),r("e260"),r("d3b7"),r("3ca3"),r("ddb0");function E(Fe,ee){if(!(typeof Symbol>"u"||!(Symbol.iterator in Object(Fe)))){var R=[],we=!0,fe=!1,Oe=void 0;try{for(var Xe=Fe[Symbol.iterator](),at;!(we=(at=Xe.next()).done)&&(R.push(at.value),!(ee&&R.length===ee));we=!0);}catch(wt){fe=!0,Oe=wt}finally{try{!we&&Xe.return!=null&&Xe.return()}finally{if(fe)throw Oe}}return R}}r("a630"),r("fb6a"),r("b0c0"),r("25f0");function P(Fe,ee){(ee==null||ee>Fe.length)&&(ee=Fe.length);for(var R=0,we=new Array(ee);R<ee;R++)we[R]=Fe[R];return we}function I(Fe,ee){if(Fe){if(typeof Fe=="string")return P(Fe,ee);var R=Object.prototype.toString.call(Fe).slice(8,-1);if(R==="Object"&&Fe.constructor&&(R=Fe.constructor.name),R==="Map"||R==="Set")return Array.from(Fe);if(R==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(R))return P(Fe,ee)}}function D(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 93In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function F(Fe,ee){return x(Fe)||E(Fe,ee)||I(Fe,ee)||D()}function C(Fe){if(Array.isArray(Fe))return P(Fe)}function A(Fe){if(typeof Symbol<"u"&&Symbol.iterator in Object(Fe))return Array.from(Fe)}function O(){throw new TypeError(`Invalid attempt to spread non-iterable instance. 94In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function j(Fe){return C(Fe)||A(Fe)||I(Fe)||O()}var te=r("a352"),B=r.n(te);function z(Fe){Fe.parentElement!==null&&Fe.parentElement.removeChild(Fe)}function re(Fe,ee,R){var we=R===0?Fe.children[0]:Fe.children[R-1].nextSibling;Fe.insertBefore(ee,we)}var ne=r("dbf1");r("13d5"),r("4fad"),r("ac1f"),r("5319");function X(Fe){var ee=Object.create(null);return function(we){var fe=ee[we];return fe||(ee[we]=Fe(we))}}var G=/-(\w)/g,ce=X(function(Fe){return Fe.replace(G,function(ee,R){return R.toUpperCase()})});r("5db7"),r("73d9");var be=["Start","Add","Remove","Update","End"],J=["Choose","Unchoose","Sort","Filter","Clone"],Z=["Move"],ge=[Z,be,J].flatMap(function(Fe){return Fe}).map(function(Fe){return"on".concat(Fe)}),q={manage:Z,manageAndEmit:be,emit:J};function W(Fe){return ge.indexOf(Fe)!==-1}r("caad"),r("2ca0");var M=["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","label","legend","li","link","main","map","mark","math","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rb","rp","rt","rtc","ruby","s","samp","script","section","select","slot","small","source","span","strong","style","sub","summary","sup","svg","table","tbody","td","template","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr"];function he(Fe){return M.includes(Fe)}function oe(Fe){return["transition-group","TransitionGroup"].includes(Fe)}function K(Fe){return["id","class","role","style"].includes(Fe)||Fe.startsWith("data-")||Fe.startsWith("aria-")||Fe.startsWith("on")}function H(Fe){return Fe.reduce(function(ee,R){var we=F(R,2),fe=we[0],Oe=we[1];return ee[fe]=Oe,ee},{})}function Ee(Fe){var ee=Fe.$attrs,R=Fe.componentData,we=R===void 0?{}:R,fe=H(Object.entries(ee).filter(function(Oe){var Xe=F(Oe,2),at=Xe[0];return Xe[1],K(at)}));return y(y({},fe),we)}function _e(Fe){var ee=Fe.$attrs,R=Fe.callBackBuilder,we=H(Ce(ee));
94Object.entries(R).forEach(function(Oe){var Xe=F(Oe,2),at=Xe[0],wt=Xe[1];q[at].forEach(function(gt){we["on".concat(gt)]=wt(gt)})});var fe="[data-draggable]".concat(we.draggable||"");return y(y({},we),{},{draggable:fe})}function Ce(Fe){return Object.entries(Fe).filter(function(ee){var R=F(ee,2),we=R[0];return R[1],!K(we)}).map(function(ee){var R=F(ee,2),we=R[0],fe=R[1];return[ce(we),fe]}).filter(function(ee){var R=F(ee,2),we=R[0];return R[1],!W(we)})}r("c740");function Re(Fe,ee){if(!(Fe instanceof ee))throw new TypeError("Cannot call a class as a function")}function Ke(Fe,ee){for(var R=0;R<ee.length;R++){var we=ee[R];we.enumerable=we.enumerable||!1,we.configurable=!0,"value"in we&&(we.writable=!0),Object.defineProperty(Fe,we.key,we)}}function Be(Fe,ee,R){return ee&&Ke(Fe.prototype,ee),Fe}var Te=function(ee){var R=ee.el;return R},Q=function(ee,R){return ee.__draggable_context=R},Se=function(ee){return ee.__draggable_context},Ve=(function(){function Fe(ee){var R=ee.nodes,we=R.header,fe=R.default,Oe=R.footer,Xe=ee.root,at=ee.realList;Re(this,Fe),this.defaultNodes=fe,this.children=[].concat(j(we),j(fe),j(Oe)),this.externalComponent=Xe.externalComponent,this.rootTransition=Xe.transition,this.tag=Xe.tag,this.realList=at}return Be(Fe,[{key:"render",value:function(R,we){var fe=this.tag,Oe=this.children,Xe=this._isRootComponent,at=Xe?{default:function(){return Oe}}:Oe;return R(fe,we,at)}},{key:"updated",value:function(){var R=this.defaultNodes,we=this.realList;R.forEach(function(fe,Oe){Q(Te(fe),{element:we[Oe],index:Oe})})}},{key:"getUnderlyingVm",value:function(R){return Se(R)}},{key:"getVmIndexFromDomIndex",value:function(R,we){var fe=this.defaultNodes,Oe=fe.length,Xe=we.children,at=Xe.item(R);if(at===null)return Oe;var wt=Se(at);if(wt)return wt.index;if(Oe===0)return 0;var gt=Te(fe[0]),pt=j(Xe).findIndex(function(He){return He===gt});return R<pt?0:Oe}},{key:"_isRootComponent",get:function(){return this.externalComponent||this.rootTransition}}]),Fe})(),Qe=r("8bbf");function je(Fe,ee){var R=Fe[ee];return R?R():[]}function nt(Fe){var ee=Fe.$slots,R=Fe.realList,we=Fe.getKey,fe=R||[],Oe=["header","footer"].map(function(He){return je(ee,He)}),Xe=F(Oe,2),at=Xe[0],wt=Xe[1],gt=ee.item;if(!gt)throw new Error("draggable element must have an item slot");var pt=fe.flatMap(function(He,it){return gt({element:He,index:it}).map(function($t){return $t.key=we(He),$t.props=y(y({},$t.props||{}),{},{"data-draggable":!0}),$t})});if(pt.length!==fe.length)throw new Error("Item slot must have only one child");return{header:at,footer:wt,default:pt}}function ft(Fe){var ee=oe(Fe),R=!he(Fe)&&!ee;return{transition:ee,externalComponent:R,tag:R?Object(Qe.resolveComponent)(Fe):ee?Qe.TransitionGroup:Fe}}function ut(Fe){var ee=Fe.$slots,R=Fe.tag,we=Fe.realList,fe=Fe.getKey,Oe=nt({$slots:ee,realList:we,getKey:fe}),Xe=ft(R);return new Ve({nodes:Oe,root:Xe,realList:we})}function Ye(Fe,ee){var R=this;Object(Qe.nextTick)(function(){return R.$emit(Fe.toLowerCase(),ee)})}function We(Fe){var ee=this;return function(R,we){if(ee.realList!==null)return ee["onDrag".concat(Fe)](R,we)}}function ot(Fe){var ee=this,R=We.call(this,Fe);return function(we,fe){R.call(ee,we,fe),Ye.call(ee,Fe,we)}}var ht=null,Tt={list:{type:Array,required:!1,default:null},modelValue:{type:Array,required:!1,default:null},itemKey:{type:[String,Function],required:!0},clone:{type:Function,default:function(ee){return ee}},tag:{type:String,default:"div"},move:{type:Function,default:null},componentData:{type:Object,required:!1,default:null}},Ot=["update:modelValue","change"].concat(j([].concat(j(q.manageAndEmit),j(q.emit)).map(function(Fe){return Fe.toLowerCase()}))),zt=Object(Qe.defineComponent)({name:"draggable",inheritAttrs:!1,props:Tt,emits:Ot,data:function(){return{error:!1}},render:function(){try{this.error=!1;var ee=this.$slots,R=this.$attrs,we=this.tag,fe=this.componentData,Oe=this.realList,Xe=this.getKey,at=ut({$slots:ee,tag:we,realList:Oe,getKey:Xe});this.componentStructure=at;var wt=Ee({$attrs:R,componentData:fe});return at.render(Qe.h,wt)}catch(gt){return this.error=!0,Object(Qe.h)("pre",{style:{color:"red"}},gt.stack)}},created:function(){this.list!==null&&this.modelValue!==null&&ne.a.error("modelValue and list props are mutually exclusive! Please set one or another.")}
94,mounted:function(){var ee=this;if(!this.error){var R=this.$attrs,we=this.$el,fe=this.componentStructure;fe.updated();var Oe=_e({$attrs:R,callBackBuilder:{manageAndEmit:function(wt){return ot.call(ee,wt)},emit:function(wt){return Ye.bind(ee,wt)},manage:function(wt){return We.call(ee,wt)}}}),Xe=we.nodeType===1?we:we.parentElement;this._sortable=new B.a(Xe,Oe),this.targetDomElement=Xe,Xe.__draggable_component__=this}},updated:function(){this.componentStructure.updated()},beforeUnmount:function(){this._sortable!==void 0&&this._sortable.destroy()},computed:{realList:function(){var ee=this.list;return ee||this.modelValue},getKey:function(){var ee=this.itemKey;return typeof ee=="function"?ee:function(R){return R[ee]}}},watch:{$attrs:{handler:function(ee){var R=this._sortable;R&&Ce(ee).forEach(function(we){var fe=F(we,2),Oe=fe[0],Xe=fe[1];R.option(Oe,Xe)})},deep:!0}},methods:{getUnderlyingVm:function(ee){return this.componentStructure.getUnderlyingVm(ee)||null},getUnderlyingPotencialDraggableComponent:function(ee){return ee.__draggable_component__},emitChanges:function(ee){var R=this;Object(Qe.nextTick)(function(){return R.$emit("change",ee)})},alterList:function(ee){if(this.list){ee(this.list);return}var R=j(this.modelValue);ee(R),this.$emit("update:modelValue",R)},spliceList:function(){var ee=arguments,R=function(fe){return fe.splice.apply(fe,j(ee))};this.alterList(R)},updatePosition:function(ee,R){var we=function(Oe){return Oe.splice(R,0,Oe.splice(ee,1)[0])};this.alterList(we)},getRelatedContextFromMoveEvent:function(ee){var R=ee.to,we=ee.related,fe=this.getUnderlyingPotencialDraggableComponent(R);if(!fe)return{component:fe};var Oe=fe.realList,Xe={list:Oe,component:fe};if(R!==we&&Oe){var at=fe.getUnderlyingVm(we)||{};return y(y({},at),Xe)}return Xe},getVmIndexFromDomIndex:function(ee){return this.componentStructure.getVmIndexFromDomIndex(ee,this.targetDomElement)},onDragStart:function(ee){this.context=this.getUnderlyingVm(ee.item),ee.item._underlying_vm_=this.clone(this.context.element),ht=ee.item},onDragAdd:function(ee){var R=ee.item._underlying_vm_;if(R!==void 0){z(ee.item);var we=this.getVmIndexFromDomIndex(ee.newIndex);this.spliceList(we,0,R);var fe={element:R,newIndex:we};this.emitChanges({added:fe})}},onDragRemove:function(ee){if(re(this.$el,ee.item,ee.oldIndex),ee.pullMode==="clone"){z(ee.clone);return}var R=this.context,we=R.index,fe=R.element;this.spliceList(we,1);var Oe={element:fe,oldIndex:we};this.emitChanges({removed:Oe})},onDragUpdate:function(ee){z(ee.item),re(ee.from,ee.item,ee.oldIndex);var R=this.context.index,we=this.getVmIndexFromDomIndex(ee.newIndex);this.updatePosition(R,we);var fe={element:this.context.element,oldIndex:R,newIndex:we};this.emitChanges({moved:fe})},computeFutureIndex:function(ee,R){if(!ee.element)return 0;var we=j(R.to.children).filter(function(at){return at.style.display!=="none"}),fe=we.indexOf(R.related),Oe=ee.component.getVmIndexFromDomIndex(fe),Xe=we.indexOf(ht)!==-1;return Xe||!R.willInsertAfter?Oe:Oe+1},onDragMove:function(ee,R){var we=this.move,fe=this.realList;if(!we||!fe)return!0;var Oe=this.getRelatedContextFromMoveEvent(ee),Xe=this.computeFutureIndex(Oe,ee),at=y(y({},this.context),{},{futureIndex:Xe}),wt=y(y({},ee),{},{relatedContext:Oe,draggedContext:at});return we(wt,R)},onDragEnd:function(){ht=null}}}),Kt=zt;o.default=Kt}),fb6a:(function(i,o,r){var c=r("23e7"),h=r("861d"),f=r("e8b5"),v=r("23cb"),g=r("50c4"),y=r("fc6a"),x=r("8418"),E=r("b622"),P=r("1dde"),I=r("ae40"),D=P("slice"),F=I("slice",{ACCESSORS:!0,0:0,1:2}),C=E("species"),A=[].slice,O=Math.max;c({target:"Array",proto:!0,forced:!D||!F},{slice:function(te,B){var z=y(this),re=g(z.length),ne=v(te,re),X=v(B===void 0?re:B,re),G,ce,be;if(f(z)&&(G=z.constructor,typeof G=="function"&&(G===Array||f(G.prototype))?G=void 0:h(G)&&(G=G[C],G===null&&(G=void 0)),G===Array||G===void 0))return A.call(z,ne,X);for(ce=new(G===void 0?Array:G)(O(X-ne,0)),be=0;ne<X;ne++,be++)ne in z&&x(ce,be,z[ne]);return ce.length=be,ce}})}),fc6a:(function(i,o,r){var c=r("44ad"),h=r("1d80");i.exports=function(f){return c(h(f))}}),fdbc:(function(i,o){i.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}}),fdbf:(function(i,o,r){var c=r("4930");i.exports=c&&!Symbol.sham&&typeof Symbol.iterator=="symbol"})}).default})})($m)),$m.exports}var Oxe=Axe();const Dxe=fd(Oxe);function vl(t){return typeof t=="string"||t instanceof String}function UC(t){var e;return typeof t=="object"&&t!=null&&(t==null||(e=t.constructor)==null?void 0:e.name)==="Object"}function jP(t,e){return Array.isArray(e)?jP(t,(s,n)=>e.includes(n)):Object.entries(t).reduce((s,n)=>{let[i,o]=n;return e(o,i)&&(s[i]=o),s},{})}const Gt={NONE:"NONE",LEFT:"LEFT",FORCE_LEFT:"FORCE_LEFT",RIGHT:"RIGHT",FORCE_RIGHT:"FORCE_RIGHT"};function Pxe(t){switch(t){case Gt.LEFT:return Gt.FORCE_LEFT;case Gt.RIGHT:return Gt.FORCE_RIGHT;default:return t}}function w0(t){return t.replace(/([.*+?^=!:${}()|[\]/\\])/g,"\\$1")}function Cg(t,e){if(e===t)return!0;const s=Array.isArray(e),n=Array.isArray(t);let i;
94if(s&&n){if(e.length!=t.length)return!1;for(i=0;i<e.length;i++)if(!Cg(e[i],t[i]))return!1;return!0}if(s!=n)return!1;if(e&&t&&typeof e=="object"&&typeof t=="object"){const o=e instanceof Date,r=t instanceof Date;if(o&&r)return e.getTime()==t.getTime();if(o!=r)return!1;const c=e instanceof RegExp,h=t instanceof RegExp;if(c&&h)return e.toString()==t.toString();if(c!=h)return!1;const f=Object.keys(e);for(i=0;i<f.length;i++)if(!Object.prototype.hasOwnProperty.call(t,f[i]))return!1;for(i=0;i<f.length;i++)if(!Cg(t[f[i]],e[f[i]]))return!1;return!0}else if(e&&t&&typeof e=="function"&&typeof t=="function")return e.toString()===t.toString();return!1}class $xe{constructor(e){for(Object.assign(this,e);this.value.slice(0,this.startChangePos)!==this.oldValue.slice(0,this.startChangePos);)--this.oldSelection.start;if(this.insertedCount)for(;this.value.slice(this.cursorPos)!==this.oldValue.slice(this.oldSelection.end);)this.value.length-this.cursorPos<this.oldValue.length-this.oldSelection.end?++this.oldSelection.end:++this.cursorPos}get startChangePos(){return Math.min(this.cursorPos,this.oldSelection.start)}get insertedCount(){return this.cursorPos-this.startChangePos}get inserted(){return this.value.substr(this.startChangePos,this.insertedCount)}get removedCount(){return Math.max(this.oldSelection.end-this.startChangePos||this.oldValue.length-this.value.length,0)}get removed(){return this.oldValue.substr(this.startChangePos,this.removedCount)}get head(){return this.value.substring(0,this.startChangePos)}get tail(){return this.value.substring(this.startChangePos+this.insertedCount)}get removeDirection(){return!this.removedCount||this.insertedCount?Gt.NONE:(this.oldSelection.end===this.cursorPos||this.oldSelection.start===this.cursorPos)&&this.oldSelection.end===this.oldSelection.start?Gt.RIGHT:Gt.LEFT}}function ps(t,e){return new ps.InputMask(t,e)}function HP(t){if(t==null)throw new Error("mask property should be defined");return t instanceof RegExp?ps.MaskedRegExp:vl(t)?ps.MaskedPattern:t===Date?ps.MaskedDate:t===Number?ps.MaskedNumber:Array.isArray(t)||t===Array?ps.MaskedDynamic:ps.Masked&&t.prototype instanceof ps.Masked?t:ps.Masked&&t instanceof ps.Masked?t.constructor:t instanceof Function?ps.MaskedFunction:(console.warn("Mask not found for mask",t),ps.Masked)}function of(t){if(!t)throw new Error("Options in not defined");if(ps.Masked){if(t.prototype instanceof ps.Masked)return{mask:t};const{mask:e=void 0,...s}=t instanceof ps.Masked?{mask:t}:UC(t)&&t.mask instanceof ps.Masked?t:{};if(e){const n=e.mask;return{...jP(e,(i,o)=>!o.startsWith("_")),mask:e.constructor,_mask:n,...s}}}return UC(t)?{...t}:{mask:t}}function Ao(t){if(ps.Masked&&t instanceof ps.Masked)return t;const e=of(t),s=HP(e.mask);if(!s)throw new Error("Masked class is not found for provided mask "+e.mask+", appropriate module needs to be imported manually before creating mask.");return e.mask===s&&delete e.mask,e._mask&&(e.mask=e._mask,delete e._mask),new s(e)}ps.createMask=Ao;class Cx{get selectionStart(){let e;try{e=this._unsafeSelectionStart}catch{}return e??this.value.length}get selectionEnd(){let e;try{e=this._unsafeSelectionEnd}catch{}return e??this.value.length}select(e,s){if(!(e==null||s==null||e===this.selectionStart&&s===this.selectionEnd))try{this._unsafeSelect(e,s)}catch{}}get isActive(){return!1}}ps.MaskElement=Cx;const jC=90,Ixe=89;class Ov extends Cx{constructor(e){super(),this.input=e,this._onKeydown=this._onKeydown.bind(this),this._onInput=this._onInput.bind(this),this._onBeforeinput=this._onBeforeinput.bind(this),this._onCompositionEnd=this._onCompositionEnd.bind(this)}get rootElement(){var e,s,n;return(e=(s=(n=this.input).getRootNode)==null?void 0:s.call(n))!=null?e:document}get isActive(){return this.input===this.rootElement.activeElement}bindEvents(e){this.input.addEventListener("keydown",this._onKeydown),this.input.addEventListener("input",this._onInput),this.input.addEventListener("beforeinput",this._onBeforeinput),this.input.addEventListener("compositionend",this._onCompositionEnd),this.input.addEventListener("drop",e.drop),this.input.addEventListener("click",e.click),this.input.addEventListener("focus",e.focus),this.input.addEventListener("blur",e.commit),this._handlers=e}_onKeydown(e){if(this._handlers.redo&&(e.keyCode===jC&&e.shiftKey&&(e.metaKey||e.ctrlKey)||e.keyCode===Ixe&&e.ctrlKey))return e.preventDefault(),this._handlers.redo(e);if(this._handlers.undo&&e.keyCode===jC&&(e.metaKey||e.ctrlKey))return e.preventDefault(),this._handlers.undo(e);e.isComposing||this._handlers.selectionChange(e)}_onBeforeinput(e){if(e.inputType==="historyUndo"&&this._handlers.undo)return e.preventDefault(),this._handlers.undo(e);if(e.inputType==="historyRedo"&&this._handlers.redo)return e.preventDefault(),this._handlers.redo(e)}_onCompositionEnd(e){this._handlers.input(e)}_onInput(e){e.isComposing||this._handlers.input(e)}unbindEvents(){this.input.removeEventListener("keydown",this._onKeydown),this.input.removeEventListener("input",this._onInput),this.input.removeEventListener("beforeinput",this._onBeforeinput),this.input.removeEventListener("compositionend",this._onCompositionEnd),this.input.removeEventListener("drop",this._handlers.drop),this.input.removeEventListener("click",this._handlers.click),this.input.removeEventListener("focus",this._handlers.focus),this.input.removeEventListener("blur",this._handlers.commit),this._handlers={}}}ps.HTMLMaskElement=Ov;class Mxe extends Ov{constructor(e){super(e),this.input=e}get _unsafeSelectionStart(){return this.input.selectionStart!=null?this.input.selectionStart:this.value.length}get _unsafeSelectionEnd(){return this.input.selectionEnd}_unsafeSelect(e,s){this.input.setSelectionRange(e,s)}get value(){return this.input.value}set value(e){this.input.value=e}}ps.HTMLMaskElement=Ov;class WP extends Ov{get _unsafeSelectionStart(){const e=this.rootElement,s=e.getSelection&&e.getSelection(),n=s&&s.anchorOffset,i=s&&s.focusOffset;return i==null||n==null||n<i?n:i}get _unsafeSelectionEnd(){const e=this.rootElement,s=e.getSelection&&e.getSelection(),n=s&&s.anchorOffset,i=s&&s.focusOffset;return i==null||n==null||n>i?n:i}_unsafeSelect(e,s){if(!this.rootElement.createRange)return;const n=this.rootElement.createRange();n.setStart(this.input.firstChild||this.input,e),n.setEnd(this.input.last
94Child||this.input,s);const i=this.rootElement,o=i.getSelection&&i.getSelection();o&&(o.removeAllRanges(),o.addRange(n))}get value(){return this.input.textContent||""}set value(e){this.input.textContent=e}}ps.HTMLContenteditableMaskElement=WP;class Dv{constructor(){this.states=[],this.currentIndex=0}get currentState(){return this.states[this.currentIndex]}get isEmpty(){return this.states.length===0}push(e){this.currentIndex<this.states.length-1&&(this.states.length=this.currentIndex+1),this.states.push(e),this.states.length>Dv.MAX_LENGTH&&this.states.shift(),this.currentIndex=this.states.length-1}go(e){return this.currentIndex=Math.min(Math.max(this.currentIndex+e,0),this.states.length-1),this.currentState}undo(){return this.go(-1)}redo(){return this.go(1)}clear(){this.states.length=0,this.currentIndex=0}}Dv.MAX_LENGTH=100;class Nxe{constructor(e,s){this.el=e instanceof Cx?e:e.isContentEditable&&e.tagName!=="INPUT"&&e.tagName!=="TEXTAREA"?new WP(e):new Mxe(e),this.masked=Ao(s),this._listeners={},this._value="",this._unmaskedValue="",this._rawInputValue="",this.history=new Dv,this._saveSelection=this._saveSelection.bind(this),this._onInput=this._onInput.bind(this),this._onChange=this._onChange.bind(this),this._onDrop=this._onDrop.bind(this),this._onFocus=this._onFocus.bind(this),this._onClick=this._onClick.bind(this),this._onUndo=this._onUndo.bind(this),this._onRedo=this._onRedo.bind(this),this.alignCursor=this.alignCursor.bind(this),this.alignCursorFriendly=this.alignCursorFriendly.bind(this),this._bindEvents(),this.updateValue(),this._onChange()}maskEquals(e){var s;return e==null||((s=this.masked)==null?void 0:s.maskEquals(e))}get mask(){return this.masked.mask}set mask(e){if(this.maskEquals(e))return;if(!(e instanceof ps.Masked)&&this.masked.constructor===HP(e)){this.masked.updateOptions({mask:e});return}const s=e instanceof ps.Masked?e:Ao({mask:e});s.unmaskedValue=this.masked.unmaskedValue,this.masked=s}get value(){return this._value}set value(e){this.value!==e&&(this.masked.value=e,this.updateControl("auto"))}get unmaskedValue(){return this._unmaskedValue}set unmaskedValue(e){this.unmaskedValue!==e&&(this.masked.unmaskedValue=e,this.updateControl("auto"))}get rawInputValue(){return this._rawInputValue}set rawInputValue(e){this.rawInputValue!==e&&(this.masked.rawInputValue=e,this.updateControl(),this.alignCursor())}get typedValue(){return this.masked.typedValue}set typedValue(e){this.masked.typedValueEquals(e)||(this.masked.typedValue=e,this.updateControl("auto"))}get displayValue(){return this.masked.displayValue}_bindEvents(){this.el.bindEvents({selectionChange:this._saveSelection,input:this._onInput,drop:this._onDrop,click:this._onClick,focus:this._onFocus,commit:this._onChange,undo:this._onUndo,redo:this._onRedo})}_unbindEvents(){this.el&&this.el.unbindEvents()}_fireEvent(e,s){const n=this._listeners[e];n&&n.forEach(i=>i(s))}get selectionStart(){return this._cursorChanging?this._changingCursorPos:this.el.selectionStart}get cursorPos(){return this._cursorChanging?this._changingCursorPos:this.el.selectionEnd}set cursorPos(e){!this.el||!this.el.isActive||(this.el.select(e,e),this._saveSelection())}_saveSelection(){this.displayValue!==this.el.value&&console.warn("Element value was changed outside of mask. Syncronize mask using `mask.updateValue()` to work properly."),this._selection={start:this.selectionStart,end:this.cursorPos}}updateValue(){this.masked.value=this.el.value,this._value=this.masked.value,this._unmaskedValue=this.masked.unmaskedValue,this._rawInputValue=this.masked.rawInputValue}updateControl(e){const s=this.masked.unmaskedValue,n=this.masked.value,i=this.masked.rawInputValue,o=this.displayValue,r=this.unmaskedValue!==s||this.value!==n||this._rawInputValue!==i;this._unmaskedValue=s,this._value=n,this._rawInputValue=i,this.el.value!==o&&(this.el.value=o),e==="auto"?this.alignCursor():e!=null&&(this.cursorPos=e),r&&this._fireChangeEvents(),!this._historyChanging&&(r||this.history.isEmpty)&&this.history.push({unmaskedValue:s,selection:{start:this.selectionStart,end:this.cursorPos}})}updateOptions(e){const{mask:s,...n}=e,i=!this.maskEquals(s),o=this.masked.optionsIsChanged(n);i&&(this.mask=s),o&&this.masked.updateOptions(n),(i||o)&&this.updateControl()}updateCursor(e){e!=null&&(this.cursorPos=e,this._delayUpdateCursor(e))}
vendor: 7,274 bytes, line 94
94_delayUpdateCursor(e){this._abortUpdateCursor(),this._changingCursorPos=e,this._cursorChanging=setTimeout(()=>{this.el&&(this.cursorPos=this._changingCursorPos,this._abortUpdateCursor())},10)}_fireChangeEvents(){this._fireEvent("accept",this._inputEvent),this.masked.isComplete&&this._fireEvent("complete",this._inputEvent)}_abortUpdateCursor(){this._cursorChanging&&(clearTimeout(this._cursorChanging),delete this._cursorChanging)}alignCursor(){this.cursorPos=this.masked.nearestInputPos(this.masked.nearestInputPos(this.cursorPos,Gt.LEFT))}alignCursorFriendly(){this.selectionStart===this.cursorPos&&this.alignCursor()}on(e,s){return this._listeners[e]||(this._listeners[e]=[]),this._listeners[e].push(s),this}off(e,s){if(!this._listeners[e])return this;if(!s)return delete this._listeners[e],this;const n=this._listeners[e].indexOf(s);return n>=0&&this._listeners[e].splice(n,1),this}_onInput(e){this._inputEvent=e,this._abortUpdateCursor();const s=new $xe({value:this.el.value,cursorPos:this.cursorPos,oldValue:this.displayValue,oldSelection:this._selection}),n=this.masked.rawInputValue,i=this.masked.splice(s.startChangePos,s.removed.length,s.inserted,s.removeDirection,{input:!0,raw:!0}).offset,o=n===this.masked.rawInputValue?s.removeDirection:Gt.NONE;let r=this.masked.nearestInputPos(s.startChangePos+i,o);o!==Gt.NONE&&(r=this.masked.nearestInputPos(r,Gt.NONE)),this.updateControl(r),delete this._inputEvent}_onChange(){this.displayValue!==this.el.value&&this.updateValue(),this.masked.doCommit(),this.updateControl(),this._saveSelection()}_onDrop(e){e.preventDefault(),e.stopPropagation()}_onFocus(e){this.alignCursorFriendly()}_onClick(e){this.alignCursorFriendly()}_onUndo(){this._applyHistoryState(this.history.undo())}_onRedo(){this._applyHistoryState(this.history.redo())}_applyHistoryState(e){e&&(this._historyChanging=!0,this.unmaskedValue=e.unmaskedValue,this.el.select(e.selection.start,e.selection.end),this._saveSelection(),this._historyChanging=!1)}destroy(){this._unbindEvents(),this._listeners.length=0,delete this.el}}ps.InputMask=Nxe;class Es{static normalize(e){return Array.isArray(e)?e:[e,new Es]}constructor(e){Object.assign(this,{inserted:"",rawInserted:"",tailShift:0,skip:!1},e)}aggregate(e){return this.inserted+=e.inserted,this.rawInserted+=e.rawInserted,this.tailShift+=e.tailShift,this.skip=this.skip||e.skip,this}get offset(){return this.tailShift+this.inserted.length}get consumed(){return!!this.rawInserted||this.skip}equals(e){return this.inserted===e.inserted&&this.tailShift===e.tailShift&&this.rawInserted===e.rawInserted&&this.skip===e.skip}}ps.ChangeDetails=Es;class Na{constructor(e,s,n){e===void 0&&(e=""),s===void 0&&(s=0),this.value=e,this.from=s,this.stop=n}toString(){return this.value}extend(e){this.value+=String(e)}appendTo(e){return e.append(this.toString(),{tail:!0}).aggregate(e._appendPlaceholder())}get state(){return{value:this.value,from:this.from,stop:this.stop}}set state(e){Object.assign(this,e)}unshift(e){if(!this.value.length||e!=null&&this.from>=e)return"";const s=this.value[0];return this.value=this.value.slice(1),s}shift(){if(!this.value.length)return"";const e=this.value[this.value.length-1];return this.value=this.value.slice(0,-1),e}}class $i{constructor(e){this._value="",this._update({...$i.DEFAULTS,...e}),this._initialized=!0}updateOptions(e){this.optionsIsChanged(e)&&this.withValueRefresh(this._update.bind(this,e))}_update(e){Object.assign(this,e)}get state(){return{_value:this.value,_rawInputValue:this.rawInputValue}}set state(e){this._value=e._value}reset(){this._value=""}get value(){return this._value}set value(e){this.resolve(e,{input:!0})}resolve(e,s){s===void 0&&(s={input:!0}),this.reset(),this.append(e,s,""),this.doCommit()}get unmaskedValue(){return this.value}set unmaskedValue(e){this.resolve(e,{})}get typedValue(){return this.parse?this.parse(this.value,this):this.unmaskedValue}set typedValue(e){this.format?this.value=this.format(e,this):this.unmaskedValue=String(e)}get rawInputValue(){return this.extractInput(0,this.displayValue.length,{raw:!0})}set rawInputValue(e){this.resolve(e,{raw:!0})}get displayValue(){return this.value}get isComplete(){return!0}get isFilled(){return this.isComplete}nearestInputPos(e,s){return e}totalInputPositions(e,s){return e===void 0&&(e=0),s===void 0&&(s=this.displayValue.length),Math.min(this.displayValue.length,s-e)}extractInput(e,s,n){return e===void 0&&(e=0),s===void 0&&(s=this.displayValue.length),this.displayValue.slice(e,s)}extractTail(e,s){return e===void 0&&(e=0),s===void 0&&(s=this.displayValue.length),new Na(this.extractInput(e,s),e)}appendTail(e){return vl(e)&&(e=new Na(String(e))),e.appendTo(this)}_appendCharRaw(e,s){return e?(this._value+=e,new Es({inserted:e,rawInserted:e})):new Es}_appendChar(e,s,n){s===void 0&&(s={});const i=this.state;let o;if([e,o]=this.doPrepareChar(e,s),e&&(o=o.aggregate(this._appendCharRaw(e,s)),!o.rawInserted&&this.autofix==="pad")){const r=this.state;this.state=i;let c=this.pad(s);const h=this._appendCharRaw(e,s);c=c.aggregate(h),h.rawInserted||c.equals(o)?o=c:this.state=r}if(o.inserted){let r,c=this.doValidate(s)!==!1;if(c&&n!=null){const h=this.state;if(this.overwrite===!0){r=n.state;for(let v=0;v<o.rawInserted.length;++v)n.unshift(this.displayValue.length-o.tailShift)}let f=this.appendTail(n);if(c=f.rawInserted.length===n.toString().length,!(c&&f.inserted)&&this.overwrite==="shift"){this.state=h,r=n.state;for(let v=0;v<o.rawInserted.length;++v)n.shift();f=this.appendTail(n),c=f.rawInserted.length===n.toString().length}c&&f.inserted&&(this.state=h)}c||(o=new Es,this.state=i,n&&r&&(n.state=r))}return o}_appendPlaceholder(){return new Es}_appendEager(){return new Es}append(e,s,n){if(!vl(e))throw new Error("value should be string");const i=vl(n)?new Na(String(n)):n;s!=null&&s.tail&&(s._beforeTailState=this.state);let o;[e,o]=this.doPrepare(e,s);for(let r=0;r<e.length;++r){const c=this._appendChar(e[r],s,i);if(!c.rawInserted&&!this.doSkipInvalid(e[r],s,i))break;o.aggregate(c)}return(this.eager===!0||this.eager==="append")&&s!=null&&s.input&&e&&o.aggregate(this._appendEager()),i!=null&&(o.tailShift+=this.appendTail(i).tailShift),o}remove(e,s){return e===void 0&&(e=0),s===void 0&&(s=this.displayValue.length),this._value=this.displayValue.slice(0,e)+this.displayValue.slice(s),new Es}withValueRefresh(e){if(this._refreshing||!this._initialized)return e();this._refreshing=!0;const s=this.rawInputValue,n=this.value,i=e();return this.rawInputValue=s,this.value&&this.value!==n&&n.indexOf(this.value)===0&&(this.append(n.slice(this.displayValue.length),{},""),this.doCommit()),delete this._refreshing,i}runIsolated(e){if(this._isolated||!this._initialized)return e(this);this._isolated=!0;const s=this.state,n=e(this);return this.state=s,delete this._isolated,n}doSkipInvalid(e,s,n){return!!this.skipInvalid}doPrepare(e,s){return s===void 0&&(s={}),Es.normalize(this.prepare?this.prepare(e,this,s):e)}doPrepareChar(e,s){return s===void 0&&(s={}),Es.normalize(this.prepareChar?this.prepareChar(e,this,s):e)}doValidate(e){return(!this.validate||this.validate(this.value,this,e))&&(!this.parent||this.parent.doValidate(e))}doCommit(){this.commit&&this.commit(this.value,this)}splice(e,s,n,i,o){n===void 0&&(n=""),i===void 0&&(i=Gt.NONE),o===void 0&&(o={input:!0});
94const r=e+s,c=this.extractTail(r),h=this.eager===!0||this.eager==="remove";let f;h&&(i=Pxe(i),f=this.extractInput(0,r,{raw:!0}));let v=e;const g=new Es;if(i!==Gt.NONE&&(v=this.nearestInputPos(e,s>1&&e!==0&&!h?Gt.NONE:i),g.tailShift=v-e),g.aggregate(this.remove(v)),h&&i!==Gt.NONE&&f===this.rawInputValue)if(i===Gt.FORCE_LEFT){let y;for(;f===this.rawInputValue&&(y=this.displayValue.length);)g.aggregate(new Es({tailShift:-1})).aggregate(this.remove(y-1))}else i===Gt.FORCE_RIGHT&&c.unshift();return g.aggregate(this.append(n,o,c))}maskEquals(e){return this.mask===e}optionsIsChanged(e){return!Cg(this,e)}typedValueEquals(e){const s=this.typedValue;return e===s||$i.EMPTY_VALUES.includes(e)&&$i.EMPTY_VALUES.includes(s)||(this.format?this.format(e,this)===this.format(this.typedValue,this):!1)}pad(e){return new Es}}$i.DEFAULTS={skipInvalid:!0};$i.EMPTY_VALUES=[void 0,null,""];ps.Masked=$i;class du{constructor(e,s){e===void 0&&(e=[]),s===void 0&&(s=0),this.chunks=e,this.from=s}toString(){return this.chunks.map(String).join("")}extend(e){if(!String(e))return;e=vl(e)?new Na(String(e)):e;const s=this.chunks[this.chunks.length-1],n=s&&(s.stop===e.stop||e.stop==null)&&e.from===s.from+s.toString().length;if(e instanceof Na)n?s.extend(e.toString()):this.chunks.push(e);else if(e instanceof du){if(e.stop==null){let i;for(;e.chunks.length&&e.chunks[0].stop==null;)i=e.chunks.shift(),i.from+=e.from,this.extend(i)}e.toString()&&(e.stop=e.blockIndex,this.chunks.push(e))}}appendTo(e){if(!(e instanceof ps.MaskedPattern))return new Na(this.toString()).appendTo(e);const s=new Es;for(let n=0;n<this.chunks.length;++n){const i=this.chunks[n],o=e._mapPosToBlock(e.displayValue.length),r=i.stop;let c;if(r!=null&&(!o||o.index<=r)&&((i instanceof du||e._stops.indexOf(r)>=0)&&s.aggregate(e._appendPlaceholder(r)),c=i instanceof du&&e._blocks[r]),c){const h=c.appendTail(i);s.aggregate(h);const f=i.toString().slice(h.rawInserted.length);f&&s.aggregate(e.append(f,{tail:!0}))}else s.aggregate(e.append(i.toString(),{tail:!0}))}return s}get state(){return{chunks:this.chunks.map(e=>e.state),from:this.from,stop:this.stop,blockIndex:this.blockIndex}}set state(e){const{chunks:s,...n}=e;Object.assign(this,n),this.chunks=s.map(i=>{const o="chunks"in i?new du:new Na;return o.state=i,o})}unshift(e){if(!this.chunks.length||e!=null&&this.from>=e)return"";const s=e!=null?e-this.from:e;let n=0;for(;n<this.chunks.length;){const i=this.chunks[n],o=i.unshift(s);if(i.toString()){if(!o)break;++n}else this.chunks.splice(n,1);if(o)return o}return""}shift(){if(!this.chunks.length)return"";let e=this.chunks.length-1;for(;0<=e;){const s=this.chunks[e],n=s.shift();if(s.toString()){if(!n)break;--e}else this.chunks.splice(e,1);if(n)return n}return""}}class Lxe{constructor(e,s){this.masked=e,this._log=[];const{offset:n,index:i}=e._mapPosToBlock(s)||(s<0?{index:0,offset:0}:{index:this.masked._blocks.length,offset:0});this.offset=n,this.index=i,this.ok=!1}get block(){return this.masked._blocks[this.index]}get pos(){return this.masked._blockStartPos(this.index)+this.offset}get state(){return{index:this.index,offset:this.offset,ok:this.ok}}set state(e){Object.assign(this,e)}pushState(){this._log.push(this.state)}popState(){const e=this._log.pop();return e&&(this.state=e),e}bindBlock(){this.block||(this.index<0&&(this.index=0,this.offset=0),this.index>=this.masked._blocks.length&&(this.index=this.masked._blocks.length-1,this.offset=this.block.displayValue.length))}_pushLeft(e){for(this.pushState(),this.bindBlock();0<=this.index;--this.index,this.offset=((s=this.block)==null?void 0:s.displayValue.length)||0){var s;if(e())return this.ok=!0}return this.ok=!1}_pushRight(e){for(this.pushState(),this.bindBlock();this.index<this.masked._blocks.length;++this.index,this.offset=0)if(e())return this.ok=!0;return this.ok=!1}pushLeftBeforeFilled(){return this._pushLeft(()=>{if(!(this.block.isFixed||!this.block.value)&&(this.offset=this.block.nearestInputPos(this.offset,Gt.FORCE_LEFT),this.offset!==0))return!0})}pushLeftBeforeInput(){return this._pushLeft(()=>{if(!this.block.isFixed)return this.offset=this.block.nearestInputPos(this.offset,Gt.LE
94FT),!0})}pushLeftBeforeRequired(){return this._pushLeft(()=>{if(!(this.block.isFixed||this.block.isOptional&&!this.block.value))return this.offset=this.block.nearestInputPos(this.offset,Gt.LEFT),!0})}pushRightBeforeFilled(){return this._pushRight(()=>{if(!(this.block.isFixed||!this.block.value)&&(this.offset=this.block.nearestInputPos(this.offset,Gt.FORCE_RIGHT),this.offset!==this.block.value.length))return!0})}pushRightBeforeInput(){return this._pushRight(()=>{if(!this.block.isFixed)return this.offset=this.block.nearestInputPos(this.offset,Gt.NONE),!0})}pushRightBeforeRequired(){return this._pushRight(()=>{if(!(this.block.isFixed||this.block.isOptional&&!this.block.value))return this.offset=this.block.nearestInputPos(this.offset,Gt.NONE),!0})}}class zP{constructor(e){Object.assign(this,e),this._value="",this.isFixed=!0}get value(){return this._value}get unmaskedValue(){return this.isUnmasking?this.value:""}get rawInputValue(){return this._isRawInput?this.value:""}get displayValue(){return this.value}reset(){this._isRawInput=!1,this._value=""}remove(e,s){return e===void 0&&(e=0),s===void 0&&(s=this._value.length),this._value=this._value.slice(0,e)+this._value.slice(s),this._value||(this._isRawInput=!1),new Es}nearestInputPos(e,s){s===void 0&&(s=Gt.NONE);const n=0,i=this._value.length;switch(s){case Gt.LEFT:case Gt.FORCE_LEFT:return n;case Gt.NONE:case Gt.RIGHT:case Gt.FORCE_RIGHT:default:return i}}totalInputPositions(e,s){return e===void 0&&(e=0),s===void 0&&(s=this._value.length),this._isRawInput?s-e:0}extractInput(e,s,n){return e===void 0&&(e=0),s===void 0&&(s=this._value.length),n===void 0&&(n={}),n.raw&&this._isRawInput&&this._value.slice(e,s)||""}get isComplete(){return!0}get isFilled(){return!!this._value}_appendChar(e,s){if(s===void 0&&(s={}),this.isFilled)return new Es;const n=this.eager===!0||this.eager==="append",o=this.char===e&&(this.isUnmasking||s.input||s.raw)&&(!s.raw||!n)&&!s.tail,r=new Es({inserted:this.char,rawInserted:o?this.char:""});return this._value=this.char,this._isRawInput=o&&(s.raw||s.input),r}_appendEager(){return this._appendChar(this.char,{tail:!0})}_appendPlaceholder(){const e=new Es;return this.isFilled||(this._value=e.inserted=this.char),e}extractTail(){return new Na("")}appendTail(e){return vl(e)&&(e=new Na(String(e))),e.appendTo(this)}append(e,s,n){const i=this._appendChar(e[0],s);return n!=null&&(i.tailShift+=this.appendTail(n).tailShift),i}doCommit(){}get state(){return{_value:this._value,_rawInputValue:this.rawInputValue}}set state(e){this._value=e._value,this._isRawInput=!!e._rawInputValue}pad(e){return this._appendPlaceholder()}}class Tg{constructor(e){const{parent:s,isOptional:n,placeholderChar:i,displayChar:o,lazy:r,eager:c,...h}=e;this.masked=Ao(h),Object.assign(this,{parent:s,isOptional:n,placeholderChar:i,displayChar:o,lazy:r,eager:c})}reset(){this.isFilled=!1,this.masked.reset()}remove(e,s){return e===void 0&&(e=0),s===void 0&&(s=this.value.length),e===0&&s>=1?(this.isFilled=!1,this.masked.remove(e,s)):new Es}get value(){return this.masked.value||(this.isFilled&&!this.isOptional?this.placeholderChar:"")}get unmaskedValue(){return this.masked.unmaskedValue}get rawInputValue(){return this.masked.rawInputValue}get displayValue(){return this.masked.value&&this.displayChar||this.value}get isComplete(){return!!this.masked.value||this.isOptional}_appendChar(e,s){if(s===void 0&&(s={}),this.isFilled)return new Es;const n=this.masked.state;let i=this.masked._appendChar(e,this.currentMaskFlags(s));return i.inserted&&this.doValidate(s)===!1&&(i=new Es,this.masked.state=n),!i.inserted&&!this.isOptional&&!this.lazy&&!s.input&&(i.inserted=this.placeholderChar),i.skip=!i.inserted&&!this.isOptional,this.isFilled=!!i.inserted,i}append(e,s,n){return this.masked.append(e,this.currentMaskFlags(s),n)}_appendPlaceholder(){return this.isFilled||this.isOptional?new Es:(this.isFilled=!0,new Es({inserted:this.placeholderChar}))}_appendEager(){return new Es}extractTail(e,s){return this.masked.extractTail(e,s)}appendTail(e){return this.masked.appendTail(e)}extractInput(e,s,n){return e===void 0&&(e=0),s===void 0&&(s=this.value.length),this.masked.extractInput(e,s,n)}nearestInputPos(e,s){s===void 0&&(s=Gt.NONE);const n=0,i=this.value.length,o=Math.min(Math.max(e,n),i);switch(s){case Gt.LEFT:case Gt.FORCE_LEFT:return this.isComplete?o:n;case Gt.RIGHT:case Gt.FORCE_RIGHT:return this.isComplete?o:i;case Gt.NONE:default:return o}}totalInputPositions(e,s){return e===void 0&&(e=0),s===void 0&&(s=this.value.length),this.value.slice(e,s).length}doValidate(e){return this.masked.doValidate(this.currentMaskFlags(e))&&(!this.parent||this.parent.doValidate(this.currentMaskFlags(e)))}doCommit(){this.masked.doCommit()}get state(){return{_value:this.value,_rawInputValue:this.rawInputValue,masked:this.masked.state,isFilled:this.isFilled}}set state(e){this.masked.state=e.masked,this.isFilled=e.isFilled}currentMaskFlags(e){var s;return{...e,_beforeTailState:(e==null||(s=e._beforeTailState)==null?void 0:s.masked)||(e==null?void 0:e._beforeTailState)}}pad(e){return new Es}}Tg.DEFAULT_DEFINITIONS={0:/\d/,a:/[\u0041-\u005A\u0061-\u007A\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u
940EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]/,"*":/./};class Rxe extends $i{updateOptions(e){super.updateOptions(e)}_update(e){const s=e.mask;s&&(e.validate=n=>n.search(s)>=0),super._update(e)}}ps.MaskedRegExp=Rxe;class Ii extends $i{constructor(e){super({...Ii.DEFAULTS,...e,definitions:Object.assign({},Tg.DEFAULT_DEFINITIONS,e==null?void 0:e.definitions)})}updateOptions(e){super.updateOptions(e)}_update(e){e.definitions=Object.assign({},this.definitions,e.definitions),super._update(e),this._rebuildMask()}_rebuildMask(){const e=this.definitions;this._blocks=[],this.exposeBlock=void 0,this._stops=[],this._maskedBlocks={};const s=this.mask;if(!s||!e)return;let n=!1,i=!1;for(let o=0;o<s.length;++o){if(this.blocks){const f=s.slice(o),v=Object.keys(this.blocks).filter(y=>f.indexOf(y)===0);v.sort((y,x)=>x.length-y.length);const g=v[0];if(g){const{expose:y,repeat:x,...E}=of(this.blocks[g]),P={lazy:this.lazy,eager:this.eager,placeholderChar:this.placeholderChar,displayChar:this.displayChar,overwrite:this.overwrite,autofix:this.autofix,...E,repeat:x,parent:this},I=x!=null?new ps.RepeatBlock(P):Ao(P);I&&(this._blocks.push(I),y&&(this.exposeBlock=I),this._maskedBlocks[g]||(this._maskedBlocks[g]=[]),this._maskedBlocks[g].push(this._blocks.length-1)),o+=g.length-1;continue}}let r=s[o],c=r in e;if(r===Ii.STOP_CHAR){this._stops.push(this._blocks.length);continue}if(r==="{"||r==="}"){n=!n;continue}if(r==="["||r==="]"){i=!i;continue}if(r===Ii.ESCAPE_CHAR){if(++o,r=s[o],!r)break;c=!1}const h=c?new Tg({isOptional:i,lazy:this.lazy,eager:this.eager,placeholderChar:this.placeholderChar,displayChar:this.displayChar,...of(e[r]),parent:this}):new zP({char:r,eager:this.eager,isUnmasking:n});this._blocks.push(h)}}get state(){return{...super.state,_blocks:this._blocks.map(e=>e.state)}}set state(e){if(!e){this.reset();return}const{_blocks:s,...n}=e;this._blocks.forEach((i,o)=>i.state=s[o]),super.state=n}
94reset(){super.reset(),this._blocks.forEach(e=>e.reset())}get isComplete(){return this.exposeBlock?this.exposeBlock.isComplete:this._blocks.every(e=>e.isComplete)}get isFilled(){return this._blocks.every(e=>e.isFilled)}get isFixed(){return this._blocks.every(e=>e.isFixed)}get isOptional(){return this._blocks.every(e=>e.isOptional)}doCommit(){this._blocks.forEach(e=>e.doCommit()),super.doCommit()}get unmaskedValue(){return this.exposeBlock?this.exposeBlock.unmaskedValue:this._blocks.reduce((e,s)=>e+=s.unmaskedValue,"")}set unmaskedValue(e){if(this.exposeBlock){const s=this.extractTail(this._blockStartPos(this._blocks.indexOf(this.exposeBlock))+this.exposeBlock.displayValue.length);this.exposeBlock.unmaskedValue=e,this.appendTail(s),this.doCommit()}else super.unmaskedValue=e}get value(){return this.exposeBlock?this.exposeBlock.value:this._blocks.reduce((e,s)=>e+=s.value,"")}set value(e){if(this.exposeBlock){const s=this.extractTail(this._blockStartPos(this._blocks.indexOf(this.exposeBlock))+this.exposeBlock.displayValue.length);this.exposeBlock.value=e,this.appendTail(s),this.doCommit()}else super.value=e}get typedValue(){return this.exposeBlock?this.exposeBlock.typedValue:super.typedValue}set typedValue(e){if(this.exposeBlock){const s=this.extractTail(this._blockStartPos(this._blocks.indexOf(this.exposeBlock))+this.exposeBlock.displayValue.length);this.exposeBlock.typedValue=e,this.appendTail(s),this.doCommit()}else super.typedValue=e}get displayValue(){return this._blocks.reduce((e,s)=>e+=s.displayValue,"")}appendTail(e){return super.appendTail(e).aggregate(this._appendPlaceholder())}_appendEager(){var e;const s=new Es;let n=(e=this._mapPosToBlock(this.displayValue.length))==null?void 0:e.index;if(n==null)return s;this._blocks[n].isFilled&&++n;for(let i=n;i<this._blocks.length;++i){const o=this._blocks[i]._appendEager();if(!o.inserted)break;s.aggregate(o)}return s}_appendCharRaw(e,s){s===void 0&&(s={});const n=this._mapPosToBlock(this.displayValue.length),i=new Es;if(!n)return i;for(let r=n.index,c;c=this._blocks[r];++r){var o;const h=c._appendChar(e,{...s,_beforeTailState:(o=s._beforeTailState)==null||(o=o._blocks)==null?void 0:o[r]});if(i.aggregate(h),h.consumed)break}return i}extractTail(e,s){e===void 0&&(e=0),s===void 0&&(s=this.displayValue.length);const n=new du;return e===s||this._forEachBlocksInRange(e,s,(i,o,r,c)=>{const h=i.extractTail(r,c);h.stop=this._findStopBefore(o),h.from=this._blockStartPos(o),h instanceof du&&(h.blockIndex=o),n.extend(h)}),n}extractInput(e,s,n){if(e===void 0&&(e=0),s===void 0&&(s=this.displayValue.length),n===void 0&&(n={}),e===s)return"";let i="";return this._forEachBlocksInRange(e,s,(o,r,c,h)=>{i+=o.extractInput(c,h,n)}),i}_findStopBefore(e){let s;for(let n=0;n<this._stops.length;++n){const i=this._stops[n];if(i<=e)s=i;else break}return s}_appendPlaceholder(e){const s=new Es;if(this.lazy&&e==null)return s;const n=this._mapPosToBlock(this.displayValue.length);if(!n)return s;const i=n.index,o=e??this._blocks.length;return this._blocks.slice(i,o).forEach(r=>{if(!r.lazy||e!=null){var c;s.aggregate(r._appendPlaceholder((c=r._blocks)==null?void 0:c.length))}}),s}_mapPosToBlock(e){let s="";for(let n=0;n<this._blocks.length;++n){const i=this._blocks[n],o=s.length;if(s+=i.displayValue,e<=s.length)return{index:n,offset:e-o}}}_blockStartPos(e){return this._blocks.slice(0,e).reduce((s,n)=>s+=n.displayValue.length,0)}_forEachBlocksInRange(e,s,n){s===void 0&&(s=this.displayValue.length);const i=this._mapPosToBlock(e);if(i){const o=this._mapPosToBlock(s),r=o&&i.index===o.index,c=i.offset,h=o&&r?o.offset:this._blocks[i.index].displayValue.length;if(n(this._blocks[i.index],i.index,c,h),o&&!r){for(let f=i.index+1;f<o.index;++f)n(this._blocks[f],f,0,this._blocks[f].displayValue.length);n(this._blocks[o.index],o.index,0,o.offset)}}}remove(e,s){e===void 0&&(e=0),s===void 0&&(s=this.displayValue.length);const n=super.remove(e,s);return this._forEachBlocksInRange(e,s,(i,o,r,c)=>{n.aggregate(i.remove(r,c))}),n}nearestInputPos(e,s){if(s===void 0&&(s=Gt.NONE),!this._blocks.length)return 0;const n=new Lxe(this,e);if(s===Gt.NONE)return n.pushRightBeforeInput()||(n.popState(),n.pushLeftBeforeInput())?n.pos:this.displayValue.length;if(s===Gt.LEFT||s===Gt.FORCE_LEFT){if(s===Gt.LEFT){if(n.pushRightBeforeFilled(),n.ok&&n.pos===e)return e;n.popState()}if(n.pushLeftBeforeInput(),n.pushLeftBeforeRequired(),n.pushLeftBeforeFilled(),s===Gt.LEFT){if(n.pushRightBeforeInput(),n.pushRightBeforeRequired(),n.ok&&n.pos<=e||(n.popState(),n.ok&&n.pos<=e))return n.pos;n.popState()}return n.ok?n.pos:s===Gt.FORCE_LEFT?0:(n.popState(),n.ok||(n.popState(),n.ok)?n.pos:0)}return s===Gt.RIGHT||s===Gt.FORCE_RIGHT?(n.pushRightBeforeInput(),n.pushRightBeforeRequired(),n.pushRightBeforeFilled()?n.pos:s===Gt.FORCE_RIGHT?this.displayValue.length:(n.popState(),n.ok||(n.popState(),n.ok)?n.pos:this.nearestInputPos(e,Gt.LE
94FT))):e}totalInputPositions(e,s){e===void 0&&(e=0),s===void 0&&(s=this.displayValue.length);let n=0;return this._forEachBlocksInRange(e,s,(i,o,r,c)=>{n+=i.totalInputPositions(r,c)}),n}maskedBlock(e){return this.maskedBlocks(e)[0]}maskedBlocks(e){const s=this._maskedBlocks[e];return s?s.map(n=>this._blocks[n]):[]}pad(e){const s=new Es;return this._forEachBlocksInRange(0,this.displayValue.length,n=>s.aggregate(n.pad(e))),s}}Ii.DEFAULTS={...$i.DEFAULTS,lazy:!0,placeholderChar:"_"};Ii.STOP_CHAR="`";Ii.ESCAPE_CHAR="\\";Ii.InputDefinition=Tg;Ii.FixedDefinition=zP;ps.MaskedPattern=Ii;class Fm extends Ii{get _matchFrom(){return this.maxLength-String(this.from).length}constructor(e){super(e)}updateOptions(e){super.updateOptions(e)}_update(e){const{to:s=this.to||0,from:n=this.from||0,maxLength:i=this.maxLength||0,autofix:o=this.autofix,...r}=e;this.to=s,this.from=n,this.maxLength=Math.max(String(s).length,i),this.autofix=o;const c=String(this.from).padStart(this.maxLength,"0"),h=String(this.to).padStart(this.maxLength,"0");let f=0;for(;f<h.length&&h[f]===c[f];)++f;r.mask=h.slice(0,f).replace(/0/g,"\\0")+"0".repeat(this.maxLength-f),super._update(r)}get isComplete(){return super.isComplete&&!!this.value}boundaries(e){let s="",n="";const[,i,o]=e.match(/^(\D*)(\d*)(\D*)/)||[];return o&&(s="0".repeat(i.length)+o,n="9".repeat(i.length)+o),s=s.padEnd(this.maxLength,"0"),n=n.padEnd(this.maxLength,"9"),[s,n]}doPrepareChar(e,s){s===void 0&&(s={});let n;return[e,n]=super.doPrepareChar(e.replace(/\D/g,""),s),e||(n.skip=!this.isComplete),[e,n]}_appendCharRaw(e,s){if(s===void 0&&(s={}),!this.autofix||this.value.length+1>this.maxLength)return super._appendCharRaw(e,s);const n=String(this.from).padStart(this.maxLength,"0"),i=String(this.to).padStart(this.maxLength,"0"),[o,r]=this.boundaries(this.value+e);return Number(r)<this.from?super._appendCharRaw(n[this.value.length],s):Number(o)>this.to?!s.tail&&this.autofix==="pad"&&this.value.length+1<this.maxLength?super._appendCharRaw(n[this.value.length],s).aggregate(this._appendCharRaw(e,s)):super._appendCharRaw(i[this.value.length],s):super._appendCharRaw(e,s)}doValidate(e){const s=this.value;if(s.search(/[^0]/)===-1&&s.length<=this._matchFrom)return!0;const[i,o]=this.boundaries(s);return this.from<=Number(o)&&Number(i)<=this.to&&super.doValidate(e)}pad(e){const s=new Es;if(this.value.length===this.maxLength)return s;const n=this.value,i=this.maxLength-this.value.length;if(i){this.reset();for(let o=0;o<i;++o)s.aggregate(super._appendCharRaw("0",e));n.split("").forEach(o=>this._appendCharRaw(o))}return s}}ps.MaskedRange=Fm;const Fxe="d{.}`m{.}`Y";class co extends Ii{static extractPatternOptions(e){const{mask:s,pattern:n,...i}=e;return{...i,mask:vl(s)?s:n}}constructor(e){super(co.extractPatternOptions({...co.DEFAULTS,...e}))}updateOptions(e){super.updateOptions(e)}_update(e){const{mask:s,pattern:n,blocks:i,...o}={...co.DEFAULTS,...e},r=Object.assign({},co.GET_DEFAULT_BLOCKS());e.min&&(r.Y.from=e.min.getFullYear()),e.max&&(r.Y.to=e.max.getFullYear()),e.min&&e.max&&r.Y.from===r.Y.to&&(r.m.from=e.min.getMonth()+1,r.m.to=e.max.getMonth()+1,r.m.from===r.m.to&&(r.d.from=e.min.getDate(),r.d.to=e.max.getDate())),Object.assign(r,this.blocks,i),super._update({...o,mask:vl(s)?s:n,blocks:r})}doValidate(e){const s=this.date;return super.doValidate(e)&&(!this.isComplete||this.isDateExist(this.value)&&s!=null&&(this.min==null||this.min<=s)&&(this.max==null||s<=this.max))}isDateExist(e){return this.format(this.parse(e,this),this).indexOf(e)>=0}get date(){return this.typedValue}set date(e){this.typedValue=e}get typedValue(){return this.isComplete?super.typedValue:null}set typedValue(e){super.typedValue=e}maskEquals(e){return e===Date||super.maskEquals(e)}optionsIsChanged(e){return super.optionsIsChanged(co.extractPatternOptions(e))}}co.GET_DEFAULT_BLOCKS=()=>({d:{mask:Fm,from:1,to:31,maxLength:2},m:{mask:Fm,from:1,to:12,maxLength:2},Y:{mask:Fm,from:1900,to:9999}});co.DEFAULTS={...Ii.DEFAULTS,mask:Date,pattern:Fxe,format:(t,e)=>{if(!t)return"";const s=String(t.getDate()).padStart(2,"0"),n=String(t.getMonth()+1).padStart(2,"0"),i=t.getFullYear();return[s,n,i].join(".")},parse:(t,e)=>{const[s,n,i]=t.split(".").map(Number);return new Date(i,n-1,s)}};ps.MaskedDate=co;class Pv extends $i{constructor(e){super({...Pv.DEFAULTS,...e}),this.currentMask=void 0}updateOptions(e){super.updateOptions(e)}_update(e){super._update(e),"mask"in e&&(this.exposeMask=void 0,this.compiledMasks=Array.isArray(e.mask)?e.mask.map(s=>{const{expose:n,...i}=of(s),o=Ao({overwrite:this._overwrite,eager:this._eager,skipInvalid:this._skipInvalid,...i});return n&&(this.exposeMask=o),o}):[])}_appendCharRaw(e,s){s===void 0&&(s={});const n=this._applyDispatch(e,s);return this.currentMask&&n.aggregate(this.currentMask._appendChar(e,this.currentMaskFlags(s))),n}_applyDispatch(e,s,n){e===void 0&&(e=""),s===void 0&&(s={}),n===void 0&&(n="");const i=s.tail&&s._beforeTailState!=null?s._beforeTailState._value:this.value,o=this.rawInputValue,r=s.tail&&s._beforeTailState!=null?s._beforeTailState._rawInputValue:o,c=o.slice(r.length),h=this.currentMask,f=new Es,v=h==null?void 0:h.state;
94return this.currentMask=this.doDispatch(e,{...s},n),this.currentMask&&(this.currentMask!==h?(this.currentMask.reset(),r&&(this.currentMask.append(r,{raw:!0}),f.tailShift=this.currentMask.value.length-i.length),c&&(f.tailShift+=this.currentMask.append(c,{raw:!0,tail:!0}).tailShift)):v&&(this.currentMask.state=v)),f}_appendPlaceholder(){const e=this._applyDispatch();return this.currentMask&&e.aggregate(this.currentMask._appendPlaceholder()),e}_appendEager(){const e=this._applyDispatch();return this.currentMask&&e.aggregate(this.currentMask._appendEager()),e}appendTail(e){const s=new Es;return e&&s.aggregate(this._applyDispatch("",{},e)),s.aggregate(this.currentMask?this.currentMask.appendTail(e):super.appendTail(e))}currentMaskFlags(e){var s,n;return{...e,_beforeTailState:((s=e._beforeTailState)==null?void 0:s.currentMaskRef)===this.currentMask&&((n=e._beforeTailState)==null?void 0:n.currentMask)||e._beforeTailState}}doDispatch(e,s,n){return s===void 0&&(s={}),n===void 0&&(n=""),this.dispatch(e,this,s,n)}doValidate(e){return super.doValidate(e)&&(!this.currentMask||this.currentMask.doValidate(this.currentMaskFlags(e)))}doPrepare(e,s){s===void 0&&(s={});let[n,i]=super.doPrepare(e,s);if(this.currentMask){let o;[n,o]=super.doPrepare(n,this.currentMaskFlags(s)),i=i.aggregate(o)}return[n,i]}doPrepareChar(e,s){s===void 0&&(s={});let[n,i]=super.doPrepareChar(e,s);if(this.currentMask){let o;[n,o]=super.doPrepareChar(n,this.currentMaskFlags(s)),i=i.aggregate(o)}return[n,i]}reset(){var e;(e=this.currentMask)==null||e.reset(),this.compiledMasks.forEach(s=>s.reset())}get value(){return this.exposeMask?this.exposeMask.value:this.currentMask?this.currentMask.value:""}set value(e){this.exposeMask?(this.exposeMask.value=e,this.currentMask=this.exposeMask,this._applyDispatch()):super.value=e}get unmaskedValue(){return this.exposeMask?this.exposeMask.unmaskedValue:this.currentMask?this.currentMask.unmaskedValue:""}set unmaskedValue(e){this.exposeMask?(this.exposeMask.unmaskedValue=e,this.currentMask=this.exposeMask,this._applyDispatch()):super.unmaskedValue=e}get typedValue(){return this.exposeMask?this.exposeMask.typedValue:this.currentMask?this.currentMask.typedValue:""}set typedValue(e){if(this.exposeMask){this.exposeMask.typedValue=e,this.currentMask=this.exposeMask,this._applyDispatch();return}let s=String(e);this.currentMask&&(this.currentMask.typedValue=e,s=this.currentMask.unmaskedValue),this.unmaskedValue=s}get displayValue(){return this.currentMask?this.currentMask.displayValue:""}get isComplete(){var e;return!!((e=this.currentMask)!=null&&e.isComplete)}get isFilled(){var e;return!!((e=this.currentMask)!=null&&e.isFilled)}remove(e,s){const n=new Es;return this.currentMask&&n.aggregate(this.currentMask.remove(e,s)).aggregate(this._applyDispatch()),n}get state(){var e;return{...super.state,_rawInputValue:this.rawInputValue,compiledMasks:this.compiledMasks.map(s=>s.state),currentMaskRef:this.currentMask,currentMask:(e=this.currentMask)==null?void 0:e.state}}set state(e){const{compiledMasks:s,currentMaskRef:n,currentMask:i,...o}=e;s&&this.compiledMasks.forEach((r,c)=>r.state=s[c]),n!=null&&(this.currentMask=n,this.currentMask.state=i),super.state=o}extractInput(e,s,n){return this.currentMask?this.currentMask.extractInput(e,s,n):""}extractTail(e,s){return this.currentMask?this.currentMask.extractTail(e,s):super.extractTail(e,s)}doCommit(){this.currentMask&&this.currentMask.doCommit(),super.doCommit()}nearestInputPos(e,s){return this.currentMask?this.currentMask.nearestInputPos(e,s):super.nearestInputPos(e,s)}get overwrite(){return this.currentMask?this.currentMask.overwrite:this._overwrite}set overwrite(e){this._overwrite=e}get eager(){return this.currentMask?this.currentMask.eager:this._eager}set eager(e){this._eager=e}get skipInvalid(){return this.currentMask?this.currentMask.skipInvalid:this._skipInvalid}set skipInvalid(e){this._skipInvalid=e}get autofix(){return this.currentMask?this.currentMask.autofix:this._autofix}set autofix(e){this._autofix=e}maskEquals(e){return Array.isArray(e)?this.compiledMasks.every((s,n)=>{if(!e[n])return;const{mask:i,...o}=e[n];return Cg(s,o)&&s.maskEquals(i)}):super.maskEquals(e)}typedValueEquals(e){var s;return!!((s=this.currentMask)!=null&&s.typedValueEquals(e))}}Pv.DEFAULTS={...$i.DEFAULTS,dispatch:(t,e,s,n)=>{if(!e.compiledMasks.length)return;const i=e.rawInputValue,o=e.compiledMasks.map((r,c)=>{const h=e.currentMask===r,f=h?r.displayValue.length:r.nearestInputPos(r.displayValue.length,Gt.FORCE_LEFT);return r.rawInputValue!==i?(r.reset(),r.append(i,{raw:!0})):h||r.remove(f),r.append(t,e.currentMaskFlags(s)),r.appendTail(n),{index:c,weight:r.rawInputValue.length,totalInputPositions:r.totalInputPositions(0,Math.max(f,r.nearestInputPos(r.displayValue.length,Gt.FORCE_LEFT)))}});return o.sort((r,c)=>
94c.weight-r.weight||c.totalInputPositions-r.totalInputPositions),e.compiledMasks[o[0].index]}};ps.MaskedDynamic=Pv;class $v extends Ii{constructor(e){super({...$v.DEFAULTS,...e})}updateOptions(e){super.updateOptions(e)}_update(e){const{enum:s,...n}=e;if(s){const i=s.map(c=>c.length),o=Math.min(...i),r=Math.max(...i)-o;n.mask="*".repeat(o),r&&(n.mask+="["+"*".repeat(r)+"]"),this.enum=s}super._update(n)}_appendCharRaw(e,s){s===void 0&&(s={});const n=Math.min(this.nearestInputPos(0,Gt.FORCE_RIGHT),this.value.length),i=this.enum.filter(o=>this.matchValue(o,this.unmaskedValue+e,n));if(i.length){i.length===1&&this._forEachBlocksInRange(0,this.value.length,(r,c)=>{const h=i[0][c];c>=this.value.length||h===r.value||(r.reset(),r._appendChar(h,s))});const o=super._appendCharRaw(i[0][this.value.length],s);return i.length===1&&i[0].slice(this.unmaskedValue.length).split("").forEach(r=>o.aggregate(super._appendCharRaw(r))),o}return new Es({skip:!this.isComplete})}extractTail(e,s){return e===void 0&&(e=0),s===void 0&&(s=this.displayValue.length),new Na("",e)}remove(e,s){if(e===void 0&&(e=0),s===void 0&&(s=this.displayValue.length),e===s)return new Es;const n=Math.min(super.nearestInputPos(0,Gt.FORCE_RIGHT),this.value.length);let i;for(i=e;i>=0&&!(this.enum.filter(c=>this.matchValue(c,this.value.slice(n,i),n)).length>1);--i);const o=super.remove(i,s);return o.tailShift+=i-e,o}get isComplete(){return this.enum.indexOf(this.value)>=0}}$v.DEFAULTS={...Ii.DEFAULTS,matchValue:(t,e,s)=>t.indexOf(e,s)===s};ps.MaskedEnum=$v;class Vxe extends $i{updateOptions(e){super.updateOptions(e)}_update(e){super._update({...e,validate:e.mask})}}ps.MaskedFunction=Vxe;var YP;class gr extends $i{constructor(e){super({...gr.DEFAULTS,...e})}updateOptions(e){super.updateOptions(e)}_update(e){super._update(e),this._updateRegExps()}_updateRegExps(){const e="^"+(this.allowNegative?"[+|\\-]?":""),s="\\d*",n=(this.scale?"("+w0(this.radix)+"\\d{0,"+this.scale+"})?":"")+"$";this._numberRegExp=new RegExp(e+s+n),this._mapToRadixRegExp=new RegExp("["+this.mapToRadix.map(w0).join("")+"]","g"),this._thousandsSeparatorRegExp=new RegExp(w0(this.thousandsSeparator),"g")}_removeThousandsSeparators(e){return e.replace(this._thousandsSeparatorRegExp,"")}_insertThousandsSeparators(e){const s=e.split(this.radix);return s[0]=s[0].replace(/\B(?=(\d{3})+(?!\d))/g,this.thousandsSeparator),s.join(this.radix)}doPrepareChar(e,s){s===void 0&&(s={});const[n,i]=super.doPrepareChar(this._removeThousandsSeparators(this.scale&&this.mapToRadix.length&&(s.input&&s.raw||!s.input&&!s.raw)?e.replace(this._mapToRadixRegExp,this.radix):e),s);return e&&!n&&(i.skip=!0),n&&!this.allowPositive&&!this.value&&n!=="-"&&i.aggregate(this._appendChar("-")),[n,i]}_separatorsCount(e,s){s===void 0&&(s=!1);let n=0;for(let i=0;i<e;++i)this._value.indexOf(this.thousandsSeparator,i)===i&&(++n,s&&(e+=this.thousandsSeparator.length));return n}_separatorsCountFromSlice(e){return e===void 0&&(e=this._value),this._separatorsCount(this._removeThousandsSeparators(e).length,!0)}extractInput(e,s,n){return e===void 0&&(e=0),s===void 0&&(s=this.displayValue.length),[e,s]=this._adjustRangeWithSeparators(e,s),this._removeThousandsSeparators(super.extractInput(e,s,n))}_appendCharRaw(e,s){s===void 0&&(s={});const n=s.tail&&s._beforeTailState?s._beforeTailState._value:this._value,i=this._separatorsCountFromSlice(n);this._value=this._removeThousandsSeparators(this.value);const o=this._value;this._value+=e;const r=this.number;let c=!isNaN(r),h=!1;if(c){let y;this.min!=null&&this.min<0&&this.number<this.min&&(y=this.min),this.max!=null&&this.max>0&&this.number>this.max&&(y=this.max),y!=null&&(this.autofix?(this._value=this.format(y,this).replace(gr.UNMASKED_RADIX,this.radix),h||(h=o===this._value&&!s.tail)):c=!1),c&&(c=!!this._value.match(this._numberRegExp))}let f;c?f=new Es({inserted:this._value.slice(o.length),rawInserted:h?"":e,skip:h}):(this._value=o,f=new Es),this._value=this._insertThousandsSeparators(this._value);const v=s.tail&&s._beforeTailState?s._beforeTailState._value:this._value,g=this._separatorsCountFromSlice(v);return f.tailShift+=(g-i)*this.thousandsSeparator.length,f}_findSeparatorAround(e){if(this.thousandsSeparator){const s=e-this.thousandsSeparator.length+1,n=this.value.indexOf(this.thousandsSeparator,s);if(n<=e)return n}return-1}_adjustRangeWithSeparators(e,s){const n=this._findSeparatorAround(e);n>=0&&(e=n);const i=this._findSeparatorAround(s);return i>=0&&(s=i+this.thousandsSeparator.length),[e,s]}remove(e,s){e===void 0&&(e=0),s===void 0&&(s=this.displayValue.length),[e,s]=this._adjustRangeWithSeparators(e,s);const n=this.value.slice(0,e),i=this.value.slice(s),o=this._separatorsCount(n.length);this._value=this._insertThousandsSeparators(this._removeThousandsSeparators(n+i));const r=this._separatorsCountFromSlice(n);return new Es({tailShift:(r-o)*this.thousandsSeparator.length})}nearestInputPos(e,s){if(!this.thousandsSeparator)return e;switch(s){case Gt.NONE:case Gt.LEFT:case Gt.FORCE_LEFT:{const n=this._findSeparatorAround(e-1);if(n>=0){const i=n+this.thousandsSeparator.length;if(e<i||this.value.length<=i||s===Gt.FORCE_LEFT)return n}break}case Gt.RIGHT:case Gt.FORCE_RIGHT:{const n=this._findSeparatorAround(e);if(n>=0)return n+this.thousandsSeparator.length}}return e}doCommit(){if(this.value){const e=this.number;let s=e;this.min!=null&&(s=Math.max(s,this.min)),this.max!=null&&(s=Math.min(s,this.max)),s!==e&&(this.unmaskedValue=this.format(s,this));let n=this.value;this.normalizeZeros&&(n=this._normalizeZeros(n)),this.padFractionalZeros&&this.scale>0&&(n=this._padFractionalZeros(n)),this._value=n}super.doCommit()}_normalizeZeros(e){const s=this._removeThousandsSeparators(e).split(this.radix);return s[0]=s[0].replace(/^(\D*)(0*)(\d*)/,(n,i,o,r)=>i+r),e.length&&!/\d$/.test(s[0])&&(s[0]=s[0]+"0"),s.length>1&&(s[1]=s[1].replace(/0*$/,""),s[1].length||(s.length=1)),this._insertThousandsSeparators(s.join(this.radix))}_padFractionalZeros(e){if(!e)return e;const s=e.split(this.radix);return s.length<2&&s.push(""),s[1]=s[1].padEnd(this.scale,"0"),s.join(this.radix)}doSkipInvalid(e,s,n){s===void 0&&(s={});const i=this.scale===0&&e!==this.thousandsSeparator&&(e===this.radix||e===gr.UNMASKED_RADIX||this.mapToRadix.includes(e));return super.doSkipInvalid(e,s,n)&&!i}get unmaskedValue(){return this._removeThousandsSeparators(this._normalizeZeros(this.value)).replace(this.radix,gr.UNMASKED_RADIX)}set unmaskedValue(e){super.unmaskedValue=e}get typedValue(){return this.parse(this.unmaskedValue,this)}set typedValue(e){this.rawInputValue=this.format(e,this).replace(gr.UNMASKED_RADIX,this.radix)}get number(){return this.typedValue}set number(e){this.typedValue=e}get allowNegative(){return this.min!=null&&this.min<0||this.max!=null&&this.max<0}get allowPositive(){return this.min!=null&&this.min>0||this.max!=null&&this.max>0}typedValueEquals(e){return(super.typedValueEquals(e)||gr.EMPTY_VALUES.includes(e)&&gr.EMPTY_VALUES.includes(this.typedValue))&&!(e
94===0&&this.value==="")}}YP=gr;gr.UNMASKED_RADIX=".";gr.EMPTY_VALUES=[...$i.EMPTY_VALUES,0];gr.DEFAULTS={...$i.DEFAULTS,mask:Number,radix:",",thousandsSeparator:"",mapToRadix:[YP.UNMASKED_RADIX],min:Number.MIN_SAFE_INTEGER,max:Number.MAX_SAFE_INTEGER,scale:2,normalizeZeros:!0,padFractionalZeros:!1,parse:Number,format:t=>t.toLocaleString("en-US",{useGrouping:!1,maximumFractionDigits:20})};ps.MaskedNumber=gr;const T1={MASKED:"value",UNMASKED:"unmaskedValue",TYPED:"typedValue"};function qP(t,e,s){e===void 0&&(e=T1.MASKED),s===void 0&&(s=T1.MASKED);const n=Ao(t);return i=>n.runIsolated(o=>(o[e]=i,o[s]))}function Bxe(t,e,s,n){return qP(e,s,n)(t)}ps.PIPE_TYPE=T1;ps.createPipe=qP;ps.pipe=Bxe;class Uxe extends Ii{get repeatFrom(){var e;return(e=Array.isArray(this.repeat)?this.repeat[0]:this.repeat===1/0?0:this.repeat)!=null?e:0}get repeatTo(){var e;return(e=Array.isArray(this.repeat)?this.repeat[1]:this.repeat)!=null?e:1/0}constructor(e){super(e)}updateOptions(e){super.updateOptions(e)}_update(e){var s,n,i;const{repeat:o,...r}=of(e);this._blockOpts=Object.assign({},this._blockOpts,r);const c=Ao(this._blockOpts);this.repeat=(s=(n=o??c.repeat)!=null?n:this.repeat)!=null?s:1/0,super._update({mask:"m".repeat(Math.max(this.repeatTo===1/0&&((i=this._blocks)==null?void 0:i.length)||0,this.repeatFrom)),blocks:{m:c},eager:c.eager,overwrite:c.overwrite,skipInvalid:c.skipInvalid,lazy:c.lazy,placeholderChar:c.placeholderChar,displayChar:c.displayChar})}_allocateBlock(e){if(e<this._blocks.length)return this._blocks[e];if(this.repeatTo===1/0||this._blocks.length<this.repeatTo)return this._blocks.push(Ao(this._blockOpts)),this.mask+="m",this._blocks[this._blocks.length-1]}_appendCharRaw(e,s){s===void 0&&(s={});const n=new Es;for(let h=(i=(o=this._mapPosToBlock(this.displayValue.length))==null?void 0:o.index)!=null?i:Math.max(this._blocks.length-1,0),f,v;f=(r=this._blocks[h])!=null?r:v=!v&&this._allocateBlock(h);++h){var i,o,r,c;const g=f._appendChar(e,{...s,_beforeTailState:(c=s._beforeTailState)==null||(c=c._blocks)==null?void 0:c[h]});if(g.skip&&v){this._blocks.pop(),this.mask=this.mask.slice(1);break}if(n.aggregate(g),g.consumed)break}return n}_trimEmptyTail(e,s){var n,i;e===void 0&&(e=0);const o=Math.max(((n=this._mapPosToBlock(e))==null?void 0:n.index)||0,this.repeatFrom,0);let r;s!=null&&(r=(i=this._mapPosToBlock(s))==null?void 0:i.index),r==null&&(r=this._blocks.length-1);let c=0;for(let h=r;o<=h&&!this._blocks[h].unmaskedValue;--h,++c);c&&(this._blocks.splice(r-c+1,c),this.mask=this.mask.slice(c))}reset(){super.reset(),this._trimEmptyTail()}remove(e,s){e===void 0&&(e=0),s===void 0&&(s=this.displayValue.length);const n=super.remove(e,s);return this._trimEmptyTail(e,s),n}totalInputPositions(e,s){return e===void 0&&(e=0),s==null&&this.repeatTo===1/0?1/0:super.totalInputPositions(e,s)}get state(){return super.state}set state(e){this._blocks.length=e._blocks.length,this.mask=this.mask.slice(0,this._blocks.length),super.state=e}}ps.RepeatBlock=Uxe;try{globalThis.IMask=ps}catch{}const jxe={class:"contact-form-offcanvas"},Hxe={key:0,class:"success-message text-center py-5"},Wxe={class:"mb-3"},zxe={class:"input-group input-group-floating"},Yxe={class:"form-floating flex-fill"},qxe={class:"mb-3"},Gxe={class:"input-group input-group-floating"},Xxe={class:"form-floating flex-fill"},Kxe={class:"mb-4"},Jxe={key:1,class:"attachment-preview"},Qxe={class:"preview-container"},Zxe=["src"],ewe={class:"attachment-info mt-2"},twe={class:"text-muted"},swe={class:"text-muted d-block"},nwe={key:0,class:"text-danger small mt-1"},iwe={class:"d-flex gap-2"},rwe=["disabled"],awe={key:0},owe={key:1},lwe={__name:"ContactFormOffcanvas",props:{onSuccess:{type:Function,default:null}},setup(t){const e=gi(),s=tn(),n=Mn(),i=vi(),o=t,r=ve({subject:"",message:""}),c=ve(null),h=ve(null),f=ve(!1),v=ve(!1),g=ve({});Ae(()=>{var A;return((A=s.user)==null?void 0:A.email)||"seu e-mail"});const y=()=>{document.querySelectorAll(".tooltip").forEach(O=>O.remove()),n.close(),e.push("/my-account/plans")},x=()=>{var A;(A=h.value)==null||A.click()},E=A=>{const O=A.target.files[0];if(!O)return;if(O.size>5*1024*1024){g.value.attachment="A imagem não pode exceder 5MB";return}if(!O.type.startsWith("image/")){g.value.attachment="Apenas imagens são permitidas";return}const j=new FileReader;j.onload=te=>{c.value={file:O,preview:te.target.result,name:O.name,size:O.size},g.value.attachment=null},j.readAsDataURL(O)},P=()=>{c.value=null,h.value&&(h.value.value="")},I=A=>A<1024?A+" B":A<1024*1024?(A/1024).toFixed(1)+" KB":(A/(1024*1024)).toFixed(1)+" MB",D=()=>{const A={};return r.value.subject.trim()?r.value.subject.trim().length<3&&(A.subject="Assunto deve ter pelo menos 3 caracteres"):A.subject="Assunto é obrigatório",r.value.message.trim()?r.value.message.trim().length<10&&(A.message="Mensagem deve ter pelo menos 10 caracteres"):A.message="Mensagem é obrigatória",g.value=A,Object.keys(A).length===0},F=async()=>{var A,O,j,te;if(D()){f.value=!0,g.value={};try{const B=new FormData;B.append("subject",r.value.subject.trim()),B.append("message",r.value.message.trim()),c.value&&B.append("attachment",c.value.file);const z=await ct.post("/api/chat/contact-form",B,{headers:{"Content-Type":"multipart/form-data"}});if(z.data.success)v.value=!0,o.onSuccess&&o.onSuccess();else throw new Error(z.data.message||"Erro ao enviar mensagem")}catch(B){console.error("Erro ao enviar formulário:",B);const z=((O=(A=B.response)==null?void 0:A.data)==null?void 0:O.message)||"Erro ao enviar mensagem. Tente novamente.";i.show(z,"error"),(te=(j=B.response)==null?void 0:j.data)!=null&&te.errors&&(g.value=B.response.data.errors)}finally{f.value=!1}}},C=()=>{n.close()};return(A,O)=>($(),L("div",jxe,[O[13]||(O[13]=l("div",{class:"contact-header mb-4"},[l("p",{class:"text-muted small mb-0"}," Preencha o formulário abaixo e nossa equipe entrará em contato em até 5 dias úteis pelo e-mail cadastrado. ")],-1)),v.value?($(),L("div",Hxe,[O[3]||(O[3]=$u('<div class="mb-4" data-v-1ef47343><i class="bi bi-envelope-check fs-1 text-success" data-v-1ef47343></i></div><h5 class="fw-bold mb-3" data-v-1ef47343>Mensagem enviada com sucesso!</h5><p class="text-muted mb-4" data-v-1ef47343> Nossa equipe responderá em até 5 dias úteis no e-mail. </p><p class="text-muted" data-v-1ef47343> Contrate o <strong data-v-1ef47343>plano PRO</strong> com o <strong data-v-1ef47343>Suporte IA e Humano</strong>
94 para interagir com a nossa equipe. </p><p data-v-1ef47343><i class="bi bi-arrow-down fs-3 text-secondary" data-v-1ef47343></i></p>',5)),l("button",{class:"btn btn-primary",onClick:y},[...O[2]||(O[2]=[l("i",{class:"bi bi-check-circle me-2"},null,-1),Pe("Planos & Licenças ",-1)])])])):($(),L("form",{key:1,onSubmit:St(F,["prevent"]),class:"contact-form"},[l("div",Wxe,[l("div",zxe,[O[5]||(O[5]=l("span",{class:"input-group-text"},[l("i",{class:"bi bi-chat-text"})],-1)),l("div",Yxe,[_t(l("input",{"onUpdate:modelValue":O[0]||(O[0]=j=>r.value.subject=j),type:"text",class:Me(["form-control",{"is-invalid":g.value.subject}]),id:"subjectInput",placeholder:"Assunto",required:""},null,2),[[Xs,r.value.subject]]),O[4]||(O[4]=l("label",{for:"subjectInput"},"Assunto",-1))])])]),l("div",qxe,[l("div",Gxe,[O[7]||(O[7]=l("span",{class:"input-group-text"},[l("i",{class:"bi bi-envelope-paper"})],-1)),l("div",Xxe,[_t(l("textarea",{"onUpdate:modelValue":O[1]||(O[1]=j=>r.value.message=j),class:Me(["form-control",{"is-invalid":g.value.message}]),id:"messageInput",placeholder:"Mensagem",rows:"7",style:{"min-height":"150px",resize:"vertical"},required:""},null,2),[[Xs,r.value.message]]),O[6]||(O[6]=l("label",{for:"messageInput"},"Mensagem",-1))])])]),l("div",Kxe,[O[10]||(O[10]=l("label",{class:"form-label fw-semibold"},"Anexo (opcional)",-1)),l("div",{class:Me(["attachment-area",{"has-attachment":c.value}])},[l("input",{type:"file",ref_key:"fileInput",ref:h,accept:"image/*",onChange:E,class:"d-none"},null,544),c.value?($(),L("div",Jxe,[l("div",Qxe,[l("img",{src:c.value.preview,alt:"Preview",class:"preview-image"},null,8,Zxe),l("button",{type:"button",class:"btn-remove",onClick:P},[...O[9]||(O[9]=[l("i",{class:"bi bi-x-lg"},null,-1)])])]),l("div",ewe,[l("small",twe,pe(c.value.name),1),l("small",swe,pe(I(c.value.size)),1)])])):($(),L("div",{key:0,class:"attachment-placeholder",onClick:x},[...O[8]||(O[8]=[l("i",{class:"bi bi-cloud-upload fs-3 text-muted"},null,-1),l("p",{class:"mb-0 small mt-2"},"Clique para selecionar uma imagem",-1),l("small",{class:"text-muted"},"Formatos: JPG, PNG, GIF (max 5MB)",-1)])]))],2),g.value.attachment?($(),L("div",nwe,pe(g.value.attachment),1)):xe("",!0)]),l("div",iwe,[l("button",{type:"submit",class:"btn btn-primary flex-grow-1",disabled:f.value},[f.value?($(),L("span",awe,[...O[11]||(O[11]=[l("span",{class:"spinner-border spinner-border-sm me-2",role:"status"},null,-1),Pe(" Enviando... ",-1)])])):($(),L("span",owe,[...O[12]||(O[12]=[l("i",{class:"bi bi-send me-2"},null,-1),Pe("Enviar mensagem ",-1)])]))],8,rwe),l("button",{type:"button",class:"btn btn-outline-secondary",onClick:C}," Cancelar ")])],32))]))}},uwe=ls(lwe,[["__scopeId","data-v-1ef47343"]]),cwe={class:"help-offcanvas"},dwe={class:"help-header mb-4"},hwe={class:"input-group"},fwe={class:"form-floating flex-grow-1"},pwe={class:"help-list-container"},mwe={key:0,class:"breadcrumb mb-3"},gwe={key:0,class:"breadcrumb-item active"},vwe=["onClick"],bwe={key:1,class:"text-center text-muted py-4"},ywe={key:2,class:"search-results"},_we={class:"mb-3 d-flex align-items-center gap-2"},xwe={class:"badge bg-primary bg-opacity-10 text-white border border-primary-subtle px-3 py-2"},wwe=["onClick"],Ewe={class:"card"},Swe={class:"card-body"},kwe={class:"d-flex align-items-center gap-2 mb-2"},Cwe={class:"badge bg-light text-dark small border"},Twe={class:"text-muted small ms-auto"},Awe={class:"fw-bold text-dark lh-sm mb-2",style:{"font-size":"0.95rem"}},Owe={class:"mb-0 text-muted small lh-sm"},Dwe={key:3,class:"no-results text-center py-5"},Pwe={class:"text-muted small mb-4"},$we={key:0,class:"suggestions mt-4"},Iwe={class:"d-flex flex-wrap gap-2 justify-content-center"},Mwe=["onClick"],Nwe={key:4,class:"article-content pb-4"},Lwe={class:"fw-bold text-dark mb-3 lh-sm"},Rwe={class:"d-flex align-items-center gap-3 mb-4 text-muted small border-bottom pb-3"},Fwe={class:"badge bg-light text-dark border"},Vwe=["innerHTML"],Bwe={class:"article-feedback bg-light border rounded-3 p-3 mb-4 text-center"},Uwe={class:"d-flex justify-content-center gap-2"},jwe={key:5,class:"help-home pb-4"},Hwe={key:0,class:"categories mb-4"},Wwe={class:"d-flex flex-wrap gap-2"},zwe=["onClick"],Ywe={key:1,class:"popular-articles mb-4"},qwe=["onClick"],Gwe={class:"card"},Xwe={class:"card-body py-2 px-3"},Kwe={class:"d-flex align-items-center gap-2"},Jwe={class:"flex-grow-1"},Qwe={class:"mb-1 fw-bold text-dark",style:{"font-size":"0.9rem"}},Zwe={class:"d-flex gap-2 text-muted small"},eEe={key:2,class:"text-center py-5"},tEe={key:6,class:"text-center py-4"},sEe={__name:"HelpOffcanvas",props:{title:{type:String,default:""},initialSearch:{type:String,default:""},autoOpen:{type:Boolean,default:!1}},setup(t){const e=Mn(),s=U_(),n=tn(),i=ve(""),o=ve(""),r=ve([]),c=ve(null),h=ve([]),f=ve([]),v=ve(!1),g=ve(!0),y=ve(null),x=ve(!1),E=ve(null),P=ve(""),I=t,D=()=>{e.close(),n.hasModule("pro_support")?setTimeout(()=>{var q;window.$openChat?window.$openChat({view:s.lastView,tab:s.lastHistoryTab,sessionId:((q=s.currentSession)==null?void 0:q.id)||null}):console.warn("Função global window.$openChat não encontrada.")},350):setTimeout(()=>{e.open(uwe,{title:"Fale conosco",onSuccess:()=>{}})},350)},F=()=>
94{if(I.autoOpen){e.back();return}c.value?c.value=null:e.back()},C=Ae(()=>{const q=[];return c.value?c.value.category&&q.push({label:c.value.category,action:()=>{G(c.value.category)}}):P.value?q.push({label:P.value,action:()=>{}}):i.value&&r.value.length>0?q.push({label:`Busca: "${i.value}"`,action:()=>{}}):i.value&&!v.value&&q.push({label:`Busca: "${i.value}"`,action:()=>{}}),q});Xt(async()=>{await vs(),await B(),i.value=I.initialSearch,x.value=I.autoOpen,I.autoOpen?await ne(!0):(o.value=I.initialSearch,await ne(!1))}),Pt(c,q=>{q&&A(q.id)}),Pt(o,q=>{q&&q.length>0&&(x.value=!1)}),Pt(i,q=>{q&&q.length>0&&(c.value=null,P.value="",x.value=!1)});const A=q=>{const W=JSON.parse(localStorage.getItem("helpArticleRatings")||"{}");E.value=W[q]!==void 0?W[q]:null},O=()=>{i.value="",o.value="",r.value=[],c.value=null,x.value=!1,E.value=null,P.value=""},j=async q=>{c.value&&(E.value===q?await te(null):await te(q))},te=async q=>{try{q!==null&&(await ct.post(`/api/help/article/${c.value.id}/rate`,{helpful:q}),q?(c.value.helpful_count++,E.value===!1&&(c.value.not_helpful_count=Math.max(0,c.value.not_helpful_count-1))):(c.value.not_helpful_count++,E.value===!0&&(c.value.helpful_count=Math.max(0,c.value.helpful_count-1))));const W=JSON.parse(localStorage.getItem("helpArticleRatings")||"{}");q===null?delete W[c.value.id]:W[c.value.id]=q,localStorage.setItem("helpArticleRatings",JSON.stringify(W)),E.value=q}catch(W){console.error("Erro ao avaliar artigo:",W)}},B=async()=>{g.value=!0;try{const[q,W]=await Promise.all([ct.get("/api/help/popular"),ct.get("/api/help/categories")]);h.value=q.data||[],f.value=W.data||[]}catch(q){console.error("Erro ao carregar conteúdo popular:",q),h.value=[],f.value=[]}finally{g.value=!1}},z=()=>{i.value="",o.value="",r.value=[],c.value=null,x.value=!1,E.value=null,P.value=""},re=Z(async()=>{o.value.length>1?(x.value=!1,i.value=o.value,c.value=null,P.value="",await ne(!1)):(r.value=[],c.value=null,P.value="",x.value=!1)},300),ne=async(q=!1)=>{if(!q&&!i.value){O();return}if(q&&!i.value){O();return}v.value=!0,c.value=null,P.value="";try{const W=await ct.get("/api/help/search",{params:{term:i.value,get_full_content:q?"true":"false"}});r.value=W.data||[],q&&W.data&&W.data.length>0&&await X(W.data[0])}catch(W){console.error("Erro na busca:",W),r.value=[]}finally{v.value=!1}},X=async q=>{v.value=!0;try{if(q.content)c.value=q;else{const W=await ct.get(`/api/help/article/${q.slug}`);c.value=W.data}A(c.value.id)}catch(W){console.error("Erro ao carregar artigo:",W)}finally{v.value=!1}},G=async q=>{P.value=q,i.value=q,o.value="",x.value=!1,v.value=!0;try{const W=await ct.get(`/api/help/category/${q}`);r.value=W.data||[],c.value=null}catch(W){console.error("Erro ao buscar por categoria:",W),r.value=[]}finally{v.value=!1}},ce=q=>q.content?q.content_type==="html"?q.content:q.content_type==="markdown"?be(q.content):q.content.replace(/\n/g,"<br>"):"",be=q=>{const W=[[/^# (.*$)/gim,"<h1>$1</h1>"],[/^## (.*$)/gim,"<h2>$1</h2>"],[/^### (.*$)/gim,"<h3>$1</h3>"],[/\*\*(.*?)\*\*/g,"<strong>$1</strong>"],[/\*(.*?)\*/g,"<em>$1</em>"],[/^- (.*$)/gim,"<li>$1</li>"],[/(<li>.*<\/li>)/gs,"<ul>$1</ul>"],[/`(.*?)`/g,"<code>$1</code>"],[/\n/g,"<br>"]];let M=q;return W.forEach(([he,oe])=>{M=M.replace(he,oe)}),M},J=(q,W)=>{if(!q)return"";const M=q.replace(/<[^>]*>/g,"");return M.length>W?M.substring(0,W)+"...":M};function Z(q,W){let M;return function(...oe){const K=()=>{clearTimeout(M),q(...oe)};clearTimeout(M),M=setTimeout(K,W)}}const ge=Ae(()=>{const q=["preço médio","cálculo","investimentos","ações","carteira","relatório","rentabilidade","dividendos"];if(!Array.isArray(q))return[];if(!i.value||typeof i.value!="string")return q.slice(0,6);const W=i.value.toLowerCase().trim();if(W==="")return q.slice(0,6);try{return(q.filter(he=>!he||typeof he!="string"?!1:he.toLowerCase().includes(W))||[]).slice(0,4)}catch(M){return console.error("Error filtering suggestions:",M),[]}});return(q,W)=>($(),L("div",cwe,[l("div",dwe,[l("div",hwe,[W[6]||(W[6]=l("span",{class:"input-group-text"},[l("i",{class:"bi bi-search"})],-1)),l("div",fwe,[_t(l("input",{type:"text",class:"form-control","onUpdate:modelValue":W[0]||(W[0]=M=>
94o.value=M),onInput:W[1]||(W[1]=(...M)=>Ne(re)&&Ne(re)(...M)),placeholder:"Digite sua dúvida...",id:"helpSearch",ref_key:"searchInput",ref:y},null,544),[[Xs,o.value]]),W[4]||(W[4]=l("label",{for:"helpSearch"},"Como podemos ajudar?",-1))]),o.value?($(),L("button",{key:0,class:"btn btn-primary",onClick:z},[...W[5]||(W[5]=[l("i",{class:"bi bi-x"},null,-1)])])):xe("",!0)])]),l("div",pwe,[C.value.length>0?($(),L("div",mwe,[l("span",{class:"breadcrumb-item cursor-pointer",onClick:O},[...W[7]||(W[7]=[l("i",{class:"bi bi-house me-1"},null,-1),Pe(" InÃcio ",-1)])]),($(!0),L(Ze,null,At(C.value,(M,he)=>($(),L("span",{key:he},[W[8]||(W[8]=l("span",{class:"breadcrumb-divider mx-2"},"/",-1)),he===C.value.length-1?($(),L("span",gwe,pe(M.label),1)):($(),L("span",{key:1,class:"breadcrumb-item cursor-pointer",onClick:M.action},pe(M.label),9,vwe))]))),128))])):xe("",!0),v.value?($(),L("div",bwe,[...W[9]||(W[9]=[l("div",{class:"spinner-border",role:"status"},[l("span",{class:"visually-hidden"},"Carregando...")],-1),l("p",{class:"text-muted small mt-2"},"Buscando artigos...",-1)])])):r.value.length>0&&!c.value?($(),L("div",ywe,[l("div",_we,[l("span",xwe,[W[10]||(W[10]=l("i",{class:"bi bi-search me-1"},null,-1)),Pe(" "+pe(r.value.length)+" resultado(s) ",1)])]),($(!0),L(Ze,null,At(r.value,M=>($(),L("div",{key:M.id,class:"help-item mb-3",onClick:he=>X(M)},[l("div",Ewe,[l("div",Swe,[l("div",kwe,[l("span",Cwe,[W[11]||(W[11]=l("i",{class:"bi bi-tag me-1"},null,-1)),Pe(" "+pe(M.category),1)]),l("span",Twe,[W[12]||(W[12]=l("i",{class:"bi bi-eye me-1"},null,-1)),Pe(" "+pe(M.views),1)])]),l("h6",Awe,pe(M.title),1),l("p",Owe,pe(M.short_content||J(M.content,120)),1)])])],8,wwe))),128))])):i.value&&!v.value&&!c.value?($(),L("div",Dwe,[W[15]||(W[15]=l("div",{class:"mb-3"},[l("i",{class:"bi bi-search display-4 text-muted"})],-1)),W[16]||(W[16]=l("p",{class:"text-muted mb-2 fs-5"},"Nenhum artigo encontrado",-1)),l("p",Pwe,'Não encontramos resultados para "'+pe(i.value)+'"',1),ge.value&&ge.value.length>0?($(),L("div",$we,[W[14]||(W[14]=l("p",{class:"small text-muted mb-2"},"Tente pesquisar por:",-1)),l("div",Iwe,[($(!0),L(Ze,null,At(ge.value,M=>($(),L("span",{key:M,class:"badge bg-light text-dark border cursor-pointer px-3 py-2 suggestion-badge",onClick:he=>{i.value=M,o.value=M,ne(!1)}},[W[13]||(W[13]=l("i",{class:"bi bi-search me-1 text-muted"},null,-1)),Pe(" "+pe(M),1)],8,Mwe))),128))])])):xe("",!0)])):c.value?($(),L("div",Nwe,[l("button",{class:"btn btn-sm btn-outline-secondary mb-3 rounded-pill px-3",onClick:F},[...W[17]||(W[17]=[l("i",{class:"bi bi-arrow-left me-1"},null,-1),Pe(" Voltar ",-1)])]),l("h4",Lwe,pe(c.value.title),1),l("div",Rwe,[l("span",Fwe,[W[18]||(W[18]=l("i",{class:"bi bi-tag me-1"},null,-1)),Pe(" "+pe(c.value.category),1)]),l("span",null,[W[19]||(W[19]=l("i",{class:"bi bi-eye me-1"},null,-1)),Pe(" "+pe(c.value.views)+" leituras",1)]),l("span",null,[W[20]||(W[20]=l("i",{class:"bi bi-hand-thumbs-up me-1 text-success"},null,-1)),Pe(" "+pe(c.value.helpful_count),1)])]),l("div",{class:"article-body mb-5 text-dark lh-base",innerHTML:ce(c.value)},null,8,Vwe),l("div",Bwe,[W[23]||(W[23]=l("p",{class:"small text-dark mb-3 fw-bold"},"Este artigo resolveu sua dúvida?",-1)),l("div",Uwe,[l("button",{class:Me(["btn btn-sm px-4",E.value===!0?"btn-success":"btn-outline-success"]),onClick:W[2]||(W[2]=M=>j(!0))},[...W[21]||(W[21]=[l("i",{class:"bi bi-hand-thumbs-up me-1"},null,-1),Pe(" Sim ",-1)])],2),l("button",{class:Me(["btn btn-sm px-4",E.value===!1?"btn-danger":"btn-outline-danger"]),onClick:W[3]||(W[3]=M=>j(!1))},[...W[22]||(W[22]=[l("i",{class:"bi bi-hand-thumbs-down me-1"},null,-1),Pe(" Não ",-1)])],2)])]),l("div",{class:"support-section text-center py-4 mt-2 border-top bg-light rounded-3"},[W[25]||(W[25]=l("i",{class:"bi bi-chat-dots fs-3 text-primary mb-2 d-block"},null,-1)),W[26]||(W[26]=l("p",{class:"fw-bold text-dark mb-1"},"Não encontrou o que procurava?",-1)),W[27]||(W[27]=l("p",{class:"small text-muted mb-3"},"Entre em contato direto com a gente.",-1)),l("div",{class:"d-flex justify-content-center gap-2"},[l("button",{class:"btn btn-primary btn-sm px-3",onClick:D},[...W[24]||(W[24]=[l("i",{class:"bi bi-chat-dots me-1"},null,-1),Pe(" Falar com Suporte ",-1)])])])])])):!g.value&&!v.value?($(),L("div",jwe,[f.value.length>0?($(),L("div",Hwe,[W[28]||(W[28]=l("h6",{class:"fw-bold text-dark mb-3"},[l("i",{class:"bi bi-grid me-2 text-primary"}),Pe("Tópicos Populares")],-1)),l("div",Wwe,[($(!0),L(Ze,null,At(f.value,M=>($(),L("button",{key:M,class:"btn btn-sm btn-outline-secondary rounded-pill",onClick:he=>G(M)},pe(M),9,zwe))),128))])])):xe("",!0),h.value.length>0?($(),L("div",Ywe,[W[32]||(W[32]=l("h6",{class:"fw-bold text-dark mb-3"},[l("i",{class:"bi bi-star me-2 text-warning"}),Pe("Artigos em Destaque")],-1)),($(!0),L(Ze,null,At(h.value,M=>($(),L("div",{key:M.id,class:"help-item mb-3",onClick:he=>X(M)},[l("div",Gwe,[l("div",Xwe,[l("div",Kwe,[l("div",Jwe,[l("p",Qwe,pe(M.title),1),l("div",Zwe,[l("span",null,pe(M.category),1),W[30]||(W[30]=l("span",null,"â¢",-1)),l("span",null,[W[29]||(W[29]=l("i",{class:"bi bi-eye"},null,-1)),Pe(" "+pe(M.views),1)])])]),W[31]||(W[31]=l("i",{class:"bi bi-chevron-right text-muted opacity-50"},null,-1))])])])],8,qwe))),128))])):xe("",!0),f.value.length===0&&h.value.length===0?($(),L("div",eEe,[...W[33]||(W[33]=[l("i",{class:"bi bi-journal-plus display-4 text-muted mb-3 opacity-50"},null,-1),l("p",{class:"text-dark fw-bold mb-1"},"Central de ajuda em construção",-1),l("p",{class:"text-muted small"},"Em breve teremos diversos artigos aqui.",-1)])])):xe("",!0),l("div",{class:"support-section text-center py-4 mt-2 border-top bg-light rounded-3"},[W[35]||(W[35]=l("i",{class:"bi bi-chat-dots fs-3 text-primary mb-2 d-block"},null,-1)),W[36]||(W[36]=l("p",{class:"fw-bold text-dark mb-1"},"Não encontrou o que procurava?",-1)),W[37]||(W[37]=l("p",{class:"small text-muted mb-3"},"Entre em contato direto com a gente.",-1)),l("div",{class:"d-flex justify-content-center gap-2"},[l("button",{class:"btn btn-primary btn-sm px-3",onClick:D},[...W[34]||(W[34]=[l("i",{class:"bi bi-chat-dots me-1"},null,-1),Pe(" Falar com Suporte ",-1)])])])])])):g.value?($(),L("div",tEe,[...W[38]||(W[38]=[l("div",{class:"spinner-border text-primary",role:"status"},[l("span",{class:"visually-hidden"},"Carregando...")],-1),l("p",{class:"text-muted small mt-2"},"Preparando central de ajuda...",-1)])])):xe("",!0)])]))}},nEe=ls(sEe,[["__scopeId","data-v-bdb8996a"]]),iEe={class:"chat-header"},rEe={class:"d-flex align-items-center"},aEe={key:0,class:"d-flex justify-content-center align-items-center h-100"},oEe={key:1},lEe={key:0,class:"history-view"},uEe={class:"nav nav-tabs nav-justified mb-3"},cEe=["onClick","disabled"],dEe={key:0,class:"badge bg-danger ms-1"}
94,hEe={class:"history-list"},fEe={key:0,class:"text-center p-4"},pEe=["onClick"],mEe={class:"d-flex justify-content-between align-items-start"},gEe={class:"flex-grow-1"},vEe={class:"text-muted"},bEe={class:"mb-0 small text-muted"},yEe={class:"d-flex align-items-center"},_Ee={key:0,class:"unread-indicator me-2"},xEe=["onClick","disabled"],wEe={key:0,class:"text-center p-4 text-muted"},EEe={key:1,class:"chat-view"},SEe={class:"message-bubble"},kEe={key:0,class:"mt-2"},CEe=["src","alt","onClick"],TEe={class:"d-block text-muted"},AEe={class:"message-time"},OEe={key:1,class:"message ai"},DEe={key:0},PEe={key:1},$Ee={key:0,class:"mb-3"},IEe={class:"d-flex flex-wrap gap-2"},MEe=["src","onClick"],NEe=["onClick"],LEe={class:"chat-input-area"},REe={key:0},FEe={class:"input-group"},VEe=["disabled"],BEe=["disabled"],UEe={key:1,class:"normal-message-area"},jEe={class:"input-group"},HEe=["disabled"],WEe=["disabled"],zEe=["disabled"],YEe={key:2,class:"mt-2 d-flex justify-content-between align-items-center"},qEe={class:"text-muted"},GEe={key:0},XEe={key:1},KEe={key:2},JEe={class:"modal fade",id:"imageModal",tabindex:"-1"},QEe={class:"modal-dialog modal-dialog-centered modal-lg"},ZEe={class:"modal-content"},eSe={class:"modal-body text-center"},tSe=["src"],sSe={__name:"ChatOffcanvas",setup(t){var $t;const e=gi(),s=Mn(),n=U_(),i=($t=Qi())==null?void 0:$t.appContext.app,o=tn(),r=ve(null),c=ve([]),h=ve("");ve(null);const f=ve("history"),v=ve("Open"),g=ve(""),y=ve(""),x=ve(null),E=ve(!1),P=ve(!1),I=ve([]),D=ve(null),F=ve(!1),C=ve(""),A=ve(!1),O=ve(!1),j=ve(!0),te=ve(!1),B=ve(null),z=ve(null),re=ve(!1),ne=ve(!1),X=ve({Open:0,Analyzing:0,Resolved:0}),G=ve(window.innerHeight),ce=[{value:"Open",label:"Aberto"},{value:"Analyzing",label:"Analisando"},{value:"Resolved",label:"Resolvido"}],be=Ae(()=>[...I.value].sort((ze,Je)=>{const tt=new Date(W(ze)).getTime();return new Date(W(Je)).getTime()-tt})),J=()=>{document.querySelectorAll(".tooltip").forEach(Je=>Je.remove()),s.close(),e.push("/my-account/plans")},Z=ze=>{confirm(`Tem certeza que deseja excluir o chat "${ze.subject}"?`)&&Ee(ze.id)},ge=ze=>!ze.messages||ze.messages.length===0?!1:ze.messages.some(Je=>Je.sender_type==="admin"&&Je.is_read===!1),q=ze=>{var Jt,Ht;if(!ze.messages||ze.messages.length===0)return"Sem mensagens";const Je=ze.messages[0];let tt=(Je.message||"").replace(/<[^>]*>/g,"");return(Jt=Je.metadata)!=null&&Jt.is_note&&(tt="[Observação] "+tt),(Ht=Je.metadata)!=null&&Ht.attachments&&(tt=`ð· ${Je.metadata.attachments.length} imagem(ns)`),tt.length>50?tt.substring(0,50)+"...":tt},W=ze=>{if(!ze.messages||ze.messages.length===0)return M(ze.updated_at);const Je=ze.messages[0];return M(Je.created_at)},M=ze=>{if(!ze)return"";const Je=new Date(ze),tt=new Date,Jt=Math.abs(tt-Je),Ht=Math.floor(Jt/(1e3*60*60*24));return he(Je)?Je.toLocaleTimeString("pt-BR",{hour:"2-digit",minute:"2-digit"}):oe(Je)?"Ontem":Ht<7?Je.toLocaleDateString("pt-BR",{weekday:"short"}).replace(".",""):Je.toLocaleDateString("pt-BR",{day:"2-digit",month:"2-digit",year:K(Je,tt)?"numeric":void 0})},he=ze=>{const Je=new Date;return ze.getDate()===Je.getDate()&&ze.getMonth()===Je.getMonth()&&ze.getFullYear()===Je.getFullYear()},oe=ze=>{const Je=new Date;return Je.setDate(Je.getDate()-1),ze.getDate()===Je.getDate()&&ze.getMonth()===Je.getMonth()&&ze.getFullYear()===Je.getFullYear()},K=(ze,Je)=>ze.getFullYear()!==Je.getFullYear(),H=ze=>{var Je;return((Je=ce.find(tt=>tt.value===ze))==null?void 0:Je.label)||ze},Ee=async ze=>{var Je;if(!te.value){te.value=!0;try{await ct.put(`/api/chat/sessions/${ze}/soft-delete`),I.value=I.value.filter(tt=>tt.id!==ze),((Je=D.value)==null?void 0:Je.id)===ze&&(D.value=null,f.value="history")}catch{}finally{te.value=!1}}},_e=async()=>{if(O.value){A.value=!0;try{const ze=localStorage.getItem("chatState");if(ze){const{view:Je,historyTab:tt,currentSessionId:Jt,transferSubject:Ht}=JSON.parse(ze);if(tt&&(v.value=tt),Ht&&(C.value=Ht),await Ke(),Jt&&Je==="chat"){const sn=I.value.find(gs=>gs.id===Jt);if(sn){await Be(sn),A.value=!1;return}}if(Je==="chat"){const sn=I.value.find(gs=>gs.status==="Open");if(sn){await Be(sn),A.value=!1;return}f.value="history"}else f.value=Je||"history"}else{await Ke();const Je=I.value.find(tt=>tt.status==="Open");Je&&await Be(Je)}}catch{f.value="history"}finally{A.value=!1}}},Ce=()=>{f.value="history",v.value="Open",g.value="",y.value="",I.value=[],D.value=null,E.value=!1,P.value=!1,c.value=[]},Re=async ze=>{if(!ne.value){ne.value=!0,v.value=ze;try{await Ke(),gt()}catch{}finally{ne.value=!1}}},Ke=async()=>
94{if(O.value)try{const ze=await ct.get(`/api/chat/sessions?status=${v.value}`);I.value=ze.data.data||ze.data||[],I.value.length===0&&f.value==="chat"&&(f.value="history")}catch{I.value=[]}},Be=async ze=>{try{const Je=await ct.get(`/api/chat/sessions/${ze.id}`);D.value=Je.data,F.value=D.value.status==="Analyzing"||D.value.human_support_requested===!0,C.value=D.value.subject||"",f.value="chat",n.lastView="chat",n.currentSession=D.value,await ct.post(`/api/chat/sessions/${D.value.id}/read-messages`).catch(tt=>{console.log("Erro ao marcar como lida (ignorado):",tt)}),typeof window.loadFloatingUnreadCount=="function"&&window.loadFloatingUnreadCount(),Ot()}catch(Je){console.error("Erro ao abrir sessão:",Je),f.value="history"}},Te=async()=>{if(O.value)try{const ze=await ct.get(`/api/chat/sessions/${D.value.id}`);D.value=ze.data,Ot()}catch{}},Q=async()=>{try{A.value=!0,F.value=!1,C.value="",y.value="";const ze=await ct.post("/api/chat/sessions",{subject:"Nova conversa"});D.value=ze.data,g.value="",f.value="chat",await Te(),gt()}catch{}finally{A.value=!1}},Se=()=>{j.value=!1,f.value="history",D.value=null,n.lastView="history",n.currentSession=null;const ze={view:"history",historyTab:v.value,currentSessionId:null};localStorage.setItem("chatState",JSON.stringify(ze)),Ke(),setTimeout(()=>{j.value=!0},100)},Ve=async(ze,Je,tt)=>(await ct.post(`/api/chat/sessions/${ze}/message`,{message:Je,sender_type:tt})).data,Qe=async(ze,Je)=>(await ct.post(`/api/chat/sessions/${ze}/message`,Je,{headers:{"Content-Type":"multipart/form-data"}})).data,je=ze=>{if(ze.key==="Enter"){if(ze.shiftKey||window.innerWidth<=768)return;ze.preventDefault(),nt()}},nt=async()=>{var ze;if(!(!g.value.trim()&&c.value.length===0&&!y.value.trim()||E.value||!O.value)){E.value=!0;try{let Je=(ze=D.value)==null?void 0:ze.id,tt=g.value.trim();F.value&&y.value.trim()&&!C.value&&(tt=y.value.trim());let Jt=null;if(c.value.length>0){const Ht=new FormData;tt&&Ht.append("message",tt),c.value.forEach((sn,gs)=>{Ht.append(`attachments[${gs}]`,sn.file)}),Jt=await Qe(Je,Ht)}else Jt=await Ve(Je,tt,"user");if(Jt&&Xe(Jt),c.value=[],g.value="",Ot(),F.value&&y.value.trim()&&!C.value){const Ht=y.value.trim();C.value=Ht,ct.put(`/api/chat/sessions/${Je}`,{subject:Ht.substring(0,50)}).catch(()=>{});const sn=await Ve(Je,"Solicitação enviada! Nossa equipe entrará em contato em breve.","system");Xe(sn),y.value="",Ot();return}P.value=!0,Ot(),F.value||await ft(Je,tt)}catch(Je){console.error(Je)}finally{E.value=!1,P.value=!1,Ot()}}},ft=async(ze,Je)=>{try{const tt=await ct.post("/api/chat/gpt-response",{message:Je,session_id:ze});tt.data&&tt.data.reply&&Xe({id:tt.data.message_id||Date.now(),chat_session_id:ze,sender_type:tt.data.sender_type||"ai",message:tt.data.reply,created_at:new Date().toISOString()})}catch{const Jt=await Ve(ze,"Desculpe, estou com dificuldades técnicas. Por favor, tente novamente.","ai");Xe(Jt)}},ut=ze=>{i&&i.config.globalProperties.$openHelp&&i.config.globalProperties.$openHelp(ze,!0)},Ye=ze=>{const Je=ze.target.closest(".article-link");if(Je){ze.preventDefault(),ze.stopPropagation(),ze.stopImmediatePropagation();const tt=Je.getAttribute("data-slug");tt&&typeof window.$openHelp=="function"&&window.$openHelp(tt,!0)}},We=()=>{vs(()=>{x.value&&(x.value.removeEventListener("click",Ye),x.value.addEventListener("click",Ye))})},ot=async()=>{var ze;if((ze=D.value)!=null&&ze.id)try{ct.put(`/api/chat/sessions/${D.value.id}/flow`,{human_support_requested:!0,flow_stage:"human"});const Je=await Ve(D.value.id,"Antes de começarmos, informe um assunto para organizar esse atendimento.","system");Xe(Je),F.value=!0,Ot()}catch{}},ht=async()=>{y.value.trim()&&await nt()},Tt=async()=>{var ze;if(!(!((ze=D.value)!=null&&ze.id)||!O.value))try{await ct.put(`/api/chat/sessions/${D.value.id}/status`,{status:"Open"}),F.value=!1,C.value="";const Je=await Ve(D.value.id,"Conversa reaberta. Como posso ajudar?","system");Xe(Je),D.value.status="Open",Ot()}catch{}},Ot=()=>{vs(()=>{setTimeout(()=>{x.value&&(x.value.scrollTop=x.value.scrollHeight)},100)})},zt=ze=>({Open:"text-warning",Analyzing:"text-info",Resolved:"text-success"})[ze]||"text-secondary",Kt=()=>{var ze;return(ze=r.value)==null?void 0:ze.click()},Fe=ze=>{const Je=ze.target.files;if(Je.length){for(let tt=0;tt<Je.length;tt++){const Jt=Je[tt];if(Jt.type.startsWith("image/")){const Ht=new FileReader;Ht.onload=sn=>{c.value.push({file:Jt,preview:sn.target.result,name:Jt.name})}
94,Ht.readAsDataURL(Jt)}}ze.target.value=""}},ee=ze=>c.value.splice(ze,1),R=ze=>{h.value=ze,re.value=!0,vs(()=>{const Je=document.getElementById("imageModal");if(Je){const tt=document.createElement("div");tt.className="modal-backdrop fade show",tt.id="imageModalBackdrop",document.body.appendChild(tt),Je.classList.add("show"),Je.style.display="block",Je.style.zIndex="99999",tt.onclick=we}})},we=()=>{const ze=document.getElementById("imageModal"),Je=document.getElementById("imageModalBackdrop");ze&&(ze.classList.remove("show"),ze.style.display="none"),Je&&document.body.removeChild(Je),re.value=!1},fe=ze=>{ze.target.style.display="none"},Oe=ze=>ze?ze.startsWith("http")||ze.startsWith("//")?ze:ze.startsWith("/")?window.location.origin+ze:ze.startsWith("storage/")?window.location.origin+"/"+ze:ze:"",Xe=ze=>{if(!D.value)return;D.value.messages.some(tt=>tt.id==ze.id)||(D.value.messages.push(ze),Ot())},at=ze=>{var tt;const Je=ze.detail;f.value==="chat"&&((tt=D.value)==null?void 0:tt.id)==Je.chat_session_id&&(Xe(Je),Je.sender_type==="admin"&&!document.hidden&&document.hasFocus()&&ct.post(`/api/chat/sessions/${D.value.id}/read-messages`).catch(()=>{}))},wt=ze=>{var tt;const Je=ze.detail;f.value==="chat"&&((tt=D.value)==null?void 0:tt.id)==Je&&D.value.messages.forEach(Jt=>{Jt.sender_type==="user"&&(Jt.is_read=!0)})},gt=()=>{var ze;!O.value||!j.value||(n.lastView=f.value,n.lastHistoryTab=v.value,n.currentSession=D.value,localStorage.setItem("chatState",JSON.stringify({view:f.value,historyTab:v.value,currentSessionId:((ze=D.value)==null?void 0:ze.id)||null,transferSubject:C.value})))},pt={props:["message","metadata"],emits:["open-article"],template:'<div v-html="message"></div>'},He=()=>{G.value=window.visualViewport?window.visualViewport.height:window.innerHeight,f.value==="chat"&&Ot()},it=()=>{!document.hidden&&f.value==="chat"&&D.value&&D.value.messages.some(Je=>Je.sender_type==="admin"&&Je.is_read===!1)&&ct.post(`/api/chat/sessions/${D.value.id}/read-messages`).catch(()=>{})};return Xt(()=>{O.value=!0;const ze=document.getElementById("imageModal");ze&&(ze.removeAttribute("data-bs-backdrop"),ze.removeAttribute("data-bs-keyboard")),o.hasModule("pro_support")&&_e(),window.addEventListener("chat-message-received",at),window.addEventListener("chat-messages-read",wt),document.addEventListener("visibilitychange",it),window.visualViewport?window.visualViewport.addEventListener("resize",He):window.addEventListener("resize",He),He(),vs(()=>{x.value&&x.value.addEventListener("click",Ye)})}),Ni(()=>{x.value&&x.value.removeEventListener("click",Ye),we(),window.removeEventListener("chat-message-received",at),window.removeEventListener("chat-messages-read",wt),document.removeEventListener("visibilitychange",it),window.visualViewport?window.visualViewport.removeEventListener("resize",He):window.removeEventListener("resize",He)}),v_(()=>{O.value=!0,o.hasModule("pro_support")&&_e()}),b_(()=>{Ce()}),Pt(()=>{var ze;return(ze=D.value)==null?void 0:ze.messages},()=>{x.value&&We(),O.value&&Ot()},{deep:!0,immediate:!0}),Pt([f,v,D],()=>{O.value&&j.value&>()},{deep:!0}),Pt(re,ze=>{ze?document.body.style.overflow="hidden":(document.body.style.overflow="auto",we())}),(ze,Je)=>{var tt,Jt,Ht,sn,gs;return $(),L(Ze,null,[l("div",{class:"chat-container d-flex flex-column",style:zs({"--vh":G.value+"px"})},[l("div",iEe,[l("div",rEe,[f.value==="chat"?($(),L("button",{key:0,onClick:Se,class:"btn btn-sm btn-outline-secondary mb-3 rounded-pill px-3"},[...Je[2]||(Je[2]=[l("i",{class:"bi bi-arrow-left me-1"},null,-1),Pe(" Voltar ",-1)])])):xe("",!0)])]),l("div",{class:Me(["chat-content",{"blurred-locked":!Ne(o).hasModule("pro_support")}])},[A.value?($(),L("div",aEe,[...Je[3]||(Je[3]=[l("div",{class:"text-center text-muted"},[l("div",{class:"spinner-border",role:"status"},[l("span",{class:"visually-hidden"},"Carregando...")]),l("p",{class:"text-muted small mt-2"},"Carregando chat...")],-1)])])):($(),L("div",oEe,[f.value==="history"?($(),L("div",lEe,[l("ul",uEe,[($(),L(Ze,null,At(ce,ws=>l("li",{class:"nav-item",key:ws.value},[l("button",{class:Me(["nav-link",{active:v.value===ws.value}]),onClick:bi=>Re(ws.value),disabled:ne.value},[Pe(pe(ws.label)+" ",1),X.value[ws.value]>0?($(),L("span",dEe,pe(X.value[ws.value]),1)):xe("",!0)],10,cEe)])),64))]),l("div",hEe,[
94ne.value?($(),L("div",fEe,[...Je[4]||(Je[4]=[l("div",{class:"spinner-border spinner-border-sm text-muted",role:"status"},[l("span",{class:"visually-hidden"},"Carregando...")],-1),l("p",{class:"text-muted small mt-2"},"Carregando...",-1)])])):($(),L(Ze,{key:1},[($(!0),L(Ze,null,At(be.value,ws=>($(),L("div",{key:ws.id,class:"session-item p-3 border-bottom"},[l("div",{onClick:bi=>Be(ws)},[l("div",mEe,[l("div",gEe,[l("small",vEe,pe(W(ws)),1),Je[5]||(Je[5]=l("br",null,null,-1)),l("strong",null,pe(ws.subject||"Sem assunto"),1),l("p",bEe,pe(q(ws)),1)]),l("div",yEe,[ge(ws)?($(),L("span",_Ee)):xe("",!0),l("button",{class:"btn btn-link text-primary",onClick:St(bi=>Z(ws),["stop"]),disabled:te.value},[...Je[6]||(Je[6]=[l("i",{class:"bi bi-trash fs-5"},null,-1)])],8,xEe)])])],8,pEe)]))),128)),I.value.length===0?($(),L("div",wEe," Nenhum atendimento "+pe(H(v.value).toLowerCase())+" encontrado ",1)):xe("",!0)],64))])])):($(),L("div",EEe,[l("div",{ref_key:"messagesContainer",ref:x,class:"messages-area",onClick:Ye},[(tt=D.value)!=null&&tt.messages?($(!0),L(Ze,{key:0},At(D.value.messages,ws=>{var bi;return $(),L(Ze,{key:ws.id},[(bi=ws.metadata)!=null&&bi.is_note?xe("",!0):($(),L("div",{key:0,class:Me(["message",ws.sender_type])},[l("div",SEe,[et(pt,{message:ws.message,metadata:ws.metadata,onOpenArticle:ut},null,8,["message","metadata"]),ws.metadata&&ws.metadata.attachments?($(),L("div",kEe,[($(!0),L(Ze,null,At(ws.metadata.attachments,(Li,$o)=>($(),L("div",{key:$o,class:"attachment-preview"},[l("img",{src:Oe(Li.url),alt:Li.name,class:"img-thumbnail",onClick:Ln=>R(Oe(Li.url)),style:{"max-width":"200px",cursor:"pointer"},onError:fe},null,40,CEe),l("small",TEe,pe(Li.name),1)]))),128))])):xe("",!0),l("div",AEe,pe(M(ws.created_at)),1)])],2))],64)}),128)):xe("",!0),P.value&&!F.value?($(),L("div",OEe,[...Je[7]||(Je[7]=[l("div",{class:"message-bubble"},[l("div",{class:"message-content"},[l("div",{class:"typing-indicator"},[l("span"),l("span"),l("span")])])],-1)])])):xe("",!0)],512)]))]))],2),l("div",{class:Me(["chat-footer",{"blurred-locked":!Ne(o).hasModule("pro_support")}])},[f.value==="history"?($(),L("div",DEe,[l("button",{onClick:Q,class:"btn btn-primary w-100"},[...Je[8]||(Je[8]=[l("i",{class:"bi bi-plus-circle me-2"},null,-1),Pe("Nova Conversa ",-1)])])])):xe("",!0),f.value==="chat"?($(),L("div",PEe,[c.value.length>0?($(),L("div",$Ee,[l("div",IEe,[($(!0),L(Ze,null,At(c.value,(ws,bi)=>($(),L("div",{key:bi,class:"position-relative"},[l("img",{src:ws.preview,class:"img-thumbnail",style:{width:"80px",height:"80px","object-fit":"cover"},onClick:Li=>R(ws.preview)},null,8,MEe),l("button",{class:"btn btn-sm btn-danger position-absolute top-0 end-0",onClick:Li=>ee(bi),style:{transform:"translate(50%, -50%)"}},[...Je[9]||(Je[9]=[l("i",{class:"bi bi-x"},null,-1)])],8,NEe)]))),128))])])):xe("",!0),l("div",LEe,[F.value&&!C.value?($(),L("div",REe,[l("div",FEe,[_t(l("input",{"onUpdate:modelValue":Je[0]||(Je[0]=ws=>y.value=ws),onKeyup:es(ht,["enter"]),type:"text",class:"form-control",placeholder:"Digite o assunto do atendimento...",disabled:E.value,ref_key:"transferSubjectInputRef",ref:z},null,40,VEe),[[Xs,y.value]]),l("button",{class:"btn btn-primary",onClick:ht,disabled:E.value||!y.value.trim()},[...Je[10]||(Je[10]=[l("i",{class:"bi bi-send"},null,-1)])],8,BEe)])])):($(),L("div",UEe,[l("div",jEe,[l("input",{type:"file",ref_key:"fileInput",ref:r,multiple:"",accept:"image/*",onChange:Fe,class:"d-none"},null,544),l("button",{class:"btn btn-secondary",onClick:Kt,disabled:E.value||((Jt=D.value)==null?void 0:Jt.status)==="Resolved"},[...Je[11]||(Je[11]=[l("i",{class:"bi bi-paperclip"},null,-1)])],8,HEe),_t(l("textarea",{"onUpdate:modelValue":Je[1]||(Je[1]=ws=>g.value=ws),onKeydown:je,class:"form-control",placeholder:"Digite sua mensagem...",disabled:E.value||((Ht=D.value)==null?void 0:Ht.status)==="Resolved"||F.value&&!C.value,ref_key:"messageInputRef",ref:B,rows:"2",style:{resize:"none"}},null,40,WEe),[[Xs,g.value]]),l("button",{class:"btn btn-primary",onClick:nt,disabled:E.value||!g.value.trim()&&c.value.length===0&&!y.value.trim()||((sn=D.value)==null?void 0:sn.status)==="Resolved"||F.value&&!C.value},[...Je[12]||(Je[12]=[l("i",{class:"bi bi-send"},null,-1)])],8,zEe)])])),D.value?($(),L("div",YEe,[l("small",qEe,[Je[13]||(Je[13]=Pe(" Status: ",-1)),l("span",{class:Me(zt(D.value.status))},pe(H(D.value.status)),3)]),D.value.status==="Open"&&((gs=D.value.messages)==null?void 0:gs.length)>2&&!F.value?($(),L("div",GEe,[l("small",null,[l("a",{href:"#",onClick:St(ot,["prevent"]),class:"text-primary"}
94,[...Je[14]||(Je[14]=[l("i",{class:"bi bi-person-check me-1"},null,-1),Pe("Falar com atendente ",-1)])])])])):xe("",!0),F.value&&!C.value?($(),L("div",XEe,[...Je[15]||(Je[15]=[l("small",{class:"text-warning"},[l("i",{class:"bi bi-clock me-1"}),Pe("Solicitação enviada ")],-1)])])):xe("",!0),D.value.status==="Resolved"?($(),L("div",KEe,[l("small",null,[l("a",{href:"#",onClick:St(Tt,["prevent"]),class:"text-success"},[...Je[16]||(Je[16]=[l("i",{class:"bi bi-arrow-clockwise me-1"},null,-1),Pe("Reabrir conversa ",-1)])])])])):xe("",!0)])):xe("",!0)])])):xe("",!0)],2),Ne(o).hasModule("pro_support")?xe("",!0):($(),L("div",{key:0,class:"pro-watermark d-flex flex-column align-items-center justify-content-center",onClick:J},[...Je[17]||(Je[17]=[l("i",{class:"bi bi-lock"},null,-1),l("span",{class:"pro-text"},"Módulo Suporte",-1),l("small",null,"Adquira este recurso em Planos & Licenças",-1)])]))],4),($(),Ut(f_,{to:"body"},[l("div",JEe,[l("div",QEe,[l("div",ZEe,[l("div",{class:"modal-header"},[Je[18]||(Je[18]=l("h5",{class:"modal-title"},"Visualizar imagem",-1)),l("button",{type:"button",class:"btn-close",onClick:we})]),l("div",eSe,[l("img",{src:h.value,class:"img-fluid",style:{"max-height":"70vh"}},null,8,tSe)])])])])]))],64)}}},HC=ls(sSe,[["__scopeId","data-v-825dda1f"]]),nSe={install:t=>{t.component("FloatingChatButton",wD),t.component("ChatOffcanvas",HC);const e=(s="",n=!1)=>{Mn().open(nEe,{title:"Central de ajuda",initialSearch:s,autoOpen:n})};t.config.globalProperties.$openHelp=e,t.config.globalProperties.$openChat=()=>{Mn().open(HC,{title:"Chat de suporte"})},window.$openHelp=e,window.$openChat=t.config.globalProperties.$openChat,t.config.globalProperties.$fmtCurrency=s=>In().hideValues?"R$ â¢â¢â¢â¢â¢â¢":((s==null||isNaN(s))&&(s=0),new Intl.NumberFormat("pt-BR",{style:"currency",currency:"BRL"}).format(s)),t.config.globalProperties.$fmtDate=(s,n={},i=!1)=>{if(!s)return"";const o={day:"2-digit",month:"2-digit",year:"numeric"};return i&&Object.assign(o,{hour:"2-digit",minute:"2-digit",hour12:!1}),new Date(s).toLocaleDateString("pt-BR",{...o,...n})},t.config.globalProperties.$fmtTime=s=>new Date(s).toLocaleTimeString("pt-BR",{hour:"2-digit",minute:"2-digit"})}},iSe={class:"portfolio-stats"},rSe={key:0,class:"stats-loading"},aSe={key:1,class:"stats-simple"},oSe={class:"stat-left"},lSe={class:"text-primary"},uSe={class:"stat-right"},cSe={key:2,class:"stats-empty"},dSe={__name:"PortfolioStats",props:{portfolioId:{type:[Number,String],default:null},autoRefresh:{type:Boolean,default:!1}},setup(t){const e=t;pi();const s=ve(null),n=ve(!1),i=ve(null);async function o(){var y,x;if(!e.portfolioId){s.value=null;return}n.value=!0,i.value=null;try{const E=await ct.get("/api/portfolio/simple-stats",{params:{portfolio_id:e.portfolioId}});E.data.success&&E.data.data?s.value=E.data.data:s.value=null}catch(E){console.error("Erro ao carregar estatÃsticas:",E),i.value=((x=(y=E.response)==null?void 0:y.data)==null?void 0:x.message)||E.message,s.value=null}finally{n.value=!1}}function r(y){return y==null?"R$ 0,00":new Intl.NumberFormat("pt-BR",{style:"currency",currency:"BRL"}).format(y)}function c(y){if(y==null)return"R$ 0";
94const x=Math.abs(y);return x>=1e6?`R$ ${(y/1e6).toFixed(1)}M`:x>=1e3?`R$ ${(y/1e3).toFixed(1)}K`:r(y)}function h(y){return y==null?"0,00%":`${y>=0?"+":""}${y.toFixed(2)}%`}function f(y){return y>0?"text-positive":y<0?"text-negative":"text-muted"}function v(y){return y>0?"bi-arrow-up-short":y<0?"bi-arrow-down-short":"bi-dash"}Pt(()=>e.portfolioId,y=>{y?o():s.value=null});let g=null;return Xt(()=>{e.portfolioId&&o(),e.autoRefresh&&(g=setInterval(o,3e4))}),Ni(()=>{g&&clearInterval(g)}),(y,x)=>($(),L("div",iSe,[n.value?($(),L("div",rSe,[...x[0]||(x[0]=[l("div",{class:"spinner-border spinner-border-sm text-muted",role:"status"},[l("span",{class:"visually-hidden"},"Carregando...")],-1),l("small",{class:"text-muted ms-2"},"Carregando...",-1)])])):s.value&&s.value.total_value!==void 0?($(),L("div",aSe,[l("div",oSe,[l("div",lSe,pe(c(s.value.total_value)),1)]),l("div",uSe,[l("div",{class:Me(["result-value",f(s.value.total_profit_loss)])},pe(c(s.value.total_profit_loss)),3),l("div",{class:Me(["result-percentage",f(s.value.total_profit_loss)])},pe(h(s.value.total_profit_loss_percent)),3),l("div",{class:Me(["result-icon",f(s.value.total_profit_loss)])},[l("i",{class:Me(["bi",v(s.value.total_profit_loss)])},null,2)],2)])])):($(),L("div",cSe,[...x[1]||(x[1]=[l("small",{class:"text-muted"},"-",-1)])]))]))}},hSe=ls(dSe,[["__scopeId","data-v-82473119"]]);window.bootstrap=xA;const fSe=async()=>{try{const t=[{name:"stock",import:()=>cs(()=>import("./stock-BMwjN2ds.js").then(e=>e.s),[])},{name:"accessibility",import:()=>cs(()=>import("./accessibility-9KWostBD.js").then(e=>e.a),[])},{name:"highcharts-more",import:()=>cs(()=>import("./highcharts-more-BCw4q5W4.js").then(e=>e.h),[])}];for(const e of t)try{const s=await e.import();typeof s.default=="function"?s.default(oC):typeof s=="function"&&s(oC)}catch(s){console.warn(`â ï¸ Could not load module "${e.name}":`,s.message)}}catch(t){console.error("ð¥ Error initializing Highcharts:",t)}};fSe();const qr=ag(tse),pSe=_U();qr.use(pSe);qr.use($f);qr.use(nSe);qr.use(B_e);qr.use(H_e);qr.component("VueDatePicker",cv);qr.component("draggable",Dxe);qr.component("PortfolioStats",hSe);qr.component("AssetLogo",_d);qr.directive("mask",{mounted(t,e){ps(t,{mask:e.value})}});qr.directive("tooltip",{mounted(t){if(window.matchMedia("(max-width: 991px)").matches||"ontouchstart"in window||navigator.maxTouchPoints>0)return;const s=new mi(t,{trigger:"hover"});t.addEventListener("click",()=>{s.hide(),t.blur()})},unmounted(t){const e=mi.getInstance(t);e&&e.dispose()}});$f.isReady().then(()=>{qr.mount("#app"),cs(()=>import("./bootstrap.bundle.min-DkixtKwm.js").then(t=>t.b),[]).then(()=>{console.log("Bootstrap loaded successfully"),typeof xA<"u"&&[].slice.call(document.querySelectorAll('[data-bs-toggle="popover"]')).map(t=>new bf(t))}).catch(t=>console.error("Failed to load Bootstrap:",t))});export{cs as $,Xs as A,Ha as B,D_ as C,mr as D,Mn as E,Ze as F,In as G,Pt as H,_d as I,kce as J,bce as K,H_ as L,ED as M,Ut as N,P_ as O,vs as P,tn as Q,ur as R,yd as S,Df as T,kr as U,W_ as V,UO as W,ppe as X,rC as Y,Rr as Z,ls as _,vi as a,kie as a0,ja as a1,gi as a2,cr as a3,Pf as a4,c_ as a5,Gj as a6,pa as a7,es as a8,Af as a9,Kh as aa,en as ab,Xh as ac,Bte as ad,oC as ae,Au as af,dl as ag,Dxe as ah,j_ as ai,MSe as aj,NSe as ak,Yn as b,Ae as c,Ni as d,L as e,l as f,fd as g,$u as h,xe as i,Pe as j,zs as k,At as l,Ne as m,Me as n,Xt as o,ct as p,$ as q,ve as r,et as s,pe as t,pi as u,St as v,vt as w,_t as x,An as y,Ms as z};
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.