jplan-pack 0.6.777 → 0.6.778
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{AuthRoute-BnD3J_zP.mjs → AuthRoute-WMU1pbUA.mjs} +1 -1
- package/dist/{AuthRoute-Cayv-2a7.js → AuthRoute-erpJEq_n.js} +1 -1
- package/dist/{WidgetLabel-CFgh4FZD.js → WidgetLabel-D8ylPIK3.js} +1 -1
- package/dist/{WidgetLabel-nn78GlBK.mjs → WidgetLabel-ZCToiLIR.mjs} +1 -1
- package/dist/{WidgetShortcut-BXkcrgYX.mjs → WidgetShortcut-Cn1w88PY.mjs} +1 -1
- package/dist/{WidgetShortcut-RoBZjq7l.js → WidgetShortcut-sAmGH6RV.js} +1 -1
- package/dist/{WidgetSpacer-BnPDSwXZ.js → WidgetSpacer-Cj5C3BDd.js} +1 -1
- package/dist/{WidgetSpacer-DqvZn6qB.mjs → WidgetSpacer-V-ByW7BA.mjs} +1 -1
- package/dist/{WidgetTask-DGW9p-OA.mjs → WidgetTask-BtU0NCN3.mjs} +1 -1
- package/dist/{WidgetTask-DG3M_p8v.js → WidgetTask-CuTgN5T3.js} +1 -1
- package/dist/{index-CqNnhsmr.mjs → index-CmT9JXJM.mjs} +2579 -2522
- package/dist/{index-1uxYAAOu.js → index-DaZK9Aoh.js} +32 -32
- package/dist/index.css +1 -1
- package/dist/jplan-pack.cjs.js +1 -1
- package/dist/jplan-pack.es.js +45 -44
- package/dist/types/components/form/JNumberField.d.ts +20 -0
- package/dist/types/components/form/JTextField.d.ts +1 -0
- package/dist/types/components/index.d.ts +2 -0
- package/package.json +1 -1
@@ -1,35 +1,35 @@
|
|
1
|
-
"use strict";const c=require("vue"),gf=require("@vueuse/core"),Ge=require("vuetify/lib/components/VBtn/index.mjs"),
|
1
|
+
"use strict";const c=require("vue"),gf=require("@vueuse/core"),Ge=require("vuetify/lib/components/VBtn/index.mjs"),uo=require("vuetify/components"),Ca=require("vuetify/lib/components/VIcon/index.mjs"),xt=require("vuetify/lib/components/VCard/index.mjs"),rl=require("vuetify/lib/components/VDialog/index.mjs"),Ho=require("vuetify/lib/components/VDivider/index.mjs"),qe=require("vuetify/lib/components/VGrid/index.mjs"),Ry=require("vuetify/lib/components/VAvatar/index.mjs"),pf=require("vuetify/lib/components/VImg/index.mjs"),Qt=require("vuetify/lib/components/VList/index.mjs"),_f=require("vuetify/lib/components/VMenu/index.mjs"),Oy=require("vuetify/lib/components/VDataTable/index.mjs"),AO=require("vuetify/lib/components/VTextField/index.mjs"),fs=require("vuetify/lib/components/VSelect/index.mjs"),kO=require("vuetify/lib/components/VCheckbox/index.mjs"),NO=require("vuetify/lib/components/VChip/index.mjs"),yi=require("vuetify/lib/components/VLabel/index.mjs"),RO=require("vuetify/lib/components/VAutocomplete/index.mjs"),OO=require("vuetify/lib/components/VTextarea/index.mjs"),PO=require("vuetify/lib/components/VBtnToggle/index.mjs");function MO(n){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(n){for(const t in n)if(t!=="default"){const r=Object.getOwnPropertyDescriptor(n,t);Object.defineProperty(e,t,r.get?r:{enumerable:!0,get:()=>n[t]})}}return e.default=n,Object.freeze(e)}const DO=MO(gf),LO={key:0},xO={key:1},xs=c.defineComponent({__name:"CopyButton",props:{contentToCopy:{},size:{},color:{}},setup(n){const e=n,{copy:t,copied:r,isSupported:o}=gf.useClipboard();return(a,l)=>{const d=c.resolveComponent("CopyIcon");return c.unref(o)?(c.openBlock(),c.createElementBlock("span",LO,[c.createVNode(Ge.VBtn,{icon:"",variant:"text",onClick:l[0]||(l[0]=h=>c.unref(t)(e.contentToCopy)),size:a.size,color:a.color},{default:c.withCtx(()=>[c.createVNode(d,{size:a.size},null,8,["size"])]),_:1},8,["size","color"]),c.unref(r)?(c.openBlock(),c.createElementBlock("span",{key:0,style:c.normalizeStyle({fontSize:typeof e.size=="number"?e.size-4+"px":void 0}),class:"ms-1"}," Copied ",4)):c.createCommentVNode("",!0)])):(c.openBlock(),c.createElementBlock("p",xO,"Your browser does not support Clipboard API"))}}}),l_=c.defineComponent({__name:"IconSet",props:{item:{},level:{default:0},size:{default:25},stroke:{default:1.5},color:{},svg:{default:null}},setup(n){return(e,t)=>(c.openBlock(),c.createElementBlock(c.Fragment,null,[typeof e.item=="object"&&"name"in e.item?(c.openBlock(),c.createBlock(c.resolveDynamicComponent(e.item.name),{key:0,size:e.size,"stroke-width":e.stroke,color:e.color},null,8,["size","stroke-width","color"])):c.createCommentVNode("",!0),typeof e.item=="string"?(c.openBlock(),c.createBlock(Ca.VIcon,{key:1,color:e.color,size:e.size},{default:c.withCtx(()=>[c.createTextVNode(c.toDisplayString(e.item),1)]),_:1},8,["color","size"])):c.createCommentVNode("",!0)],64))}}),Py=c.defineComponent({__name:"JIconBtn",props:{variant:{default:"text"},icon:{},color:{default:"secondary"},tooltip:{},size:{}},emits:["click"],setup(n){const e=n,t=c.useSlots();return(r,o)=>r.tooltip?(c.openBlock(),c.createBlock(c.unref(uo.VTooltip),{key:0,text:r.tooltip,"open-delay":"1000"},{activator:c.withCtx(({props:a})=>[c.createVNode(c.unref(uo.VBtn),c.mergeProps(a,{variant:r.variant,color:r.color,icon:"",size:r.size,onClick:o[0]||(o[0]=l=>r.$emit("click"))}),{default:c.withCtx(()=>[!c.unref(t).default&&a.icon?(c.openBlock(),c.createBlock(l_,{key:0,item:a.icon,size:a.size},null,8,["item","size"])):c.createCommentVNode("",!0),c.renderSlot(r.$slots,"default")]),_:2},1040,["variant","color","size"])]),_:3},8,["text"])):(c.openBlock(),c.createBlock(c.unref(uo.VBtn),{key:1,variant:r.variant,color:r.color,icon:"",size:r.size,onClick:o[1]||(o[1]=a=>r.$emit("click"))},{default:c.withCtx(()=>[!c.unref(t).default&&e.icon?(c.openBlock(),c.createBlock(l_,{key:0,item:e.icon,size:e.size},null,8,["item","size"])):c.createCommentVNode("",!0),c.renderSlot(r.$slots,"default")]),_:3},8,["variant","color","size"]))}}),My=c.defineComponent({__name:"JBtn",props:{variant:{default:"flat"},text:{},icon:{},color:{default:"secondary"},tooltip:{}},emits:["click"],setup(n){return(e,t)=>(c.openBlock(),c.createBlock(c.unref(uo.VBtn),{"prepend-icon":e.icon,variant:e.variant,color:e.color,tooltip:e.tooltip,onClick:t[0]||(t[0]=r=>e.$emit("click"))},{default:c.withCtx(()=>[c.createTextVNode(c.toDisplayString(e.text)+" ",1),c.renderSlot(e.$slots,"default")]),_:3},8,["prepend-icon","variant","color","tooltip"]))}});var Dy=!1;function Uc(n,e,t){return Array.isArray(n)?(n.length=Math.max(n.length,e),n.splice(e,1,t),t):(n[e]=t,t)}function xd(n,e){if(Array.isArray(n)){n.splice(e,1);return}delete n[e]}function UO(){return Ly().__VUE_DEVTOOLS_GLOBAL_HOOK__}function Ly(){return typeof navigator<"u"&&typeof window<"u"?window:typeof globalThis<"u"?globalThis:{}}const BO=typeof Proxy=="function",VO="devtools-plugin:setup",FO="plugin:settings:set";let zi,Th;function HO(){var n;return zi!==void 0||(typeof window<"u"&&window.performance?(zi=!0,Th=window.performance):typeof globalThis<"u"&&(!((n=globalThis.perf_hooks)===null||n===void 0)&&n.performance)?(zi=!0,Th=globalThis.perf_hooks.performance):zi=!1),zi}function $O(){return HO()?Th.now():Date.now()}class KO{constructor(e,t){this.target=null,this.targetQueue=[],this.onQueue=[],this.plugin=e,this.hook=t;const r={};if(e.settings)for(const l in e.settings){const d=e.settings[l];r[l]=d.defaultValue}const o=`__vue-devtools-plugin-settings__${e.id}`;let a=Object.assign({},r);try{const l=localStorage.getItem(o),d=JSON.parse(l);Object.assign(a,d)}catch{}this.fallbacks={getSettings(){return a},setSettings(l){try{localStorage.setItem(o,JSON.stringify(l))}catch{}a=l},now(){return $O()}},t&&t.on(FO,(l,d)=>{l===this.plugin.id&&this.fallbacks.setSettings(d)}),this.proxiedOn=new Proxy({},{get:(l,d)=>this.target?this.target.on[d]:(...h)=>{this.onQueue.push({method:d,args:h})}}),this.proxiedTarget=new Proxy({},{get:(l,d)=>this.target?this.target[d]:d==="on"?this.proxiedOn:Object.keys(this.fallbacks).includes(d)?(...h)=>(this.targetQueue.push({method:d,args:h,resolve:()=>{}}),this.fallbacks[d](...h)):(...h)=>new Promise(f=>{this.targetQueue.push({method:d,args:h,resolve:f})})})}async setRealTarget(e){this.target=e;for(const t of this.onQueue)this.target.on[t.method](...t.args);for(const t of this.targetQueue)t.resolve(await this.target[t.method](...t.args))}}function vf(n,e){const t=n,r=Ly(),o=UO(),a=BO&&t.enableEarlyProxy;if(o&&(r.__VUE_DEVTOOLS_PLUGIN_API_AVAILABLE__||!a))o.emit(VO,n,e);else{const l=a?new KO(t,o):null;(r.__VUE_DEVTOOLS_PLUGINS__=r.__VUE_DEVTOOLS_PLUGINS__||[]).push({pluginDescriptor:t,setupFn:e,proxy:l}),l&&e(l.proxiedTarget)}}/*!
|
2
2
|
* pinia v2.2.6
|
3
3
|
* (c) 2024 Eduardo San Martin Morote
|
4
4
|
* @license MIT
|
5
|
-
*/let ss;const Ts=n=>ss=n,xy=process.env.NODE_ENV!=="production"?Symbol("pinia"):Symbol();function Ea(n){return n&&typeof n=="object"&&Object.prototype.toString.call(n)==="[object Object]"&&typeof n.toJSON!="function"}var Fr;(function(n){n.direct="direct",n.patchObject="patch object",n.patchFunction="patch function"})(Fr||(Fr={}));const
|
5
|
+
*/let ss;const Ts=n=>ss=n,xy=process.env.NODE_ENV!=="production"?Symbol("pinia"):Symbol();function Ea(n){return n&&typeof n=="object"&&Object.prototype.toString.call(n)==="[object Object]"&&typeof n.toJSON!="function"}var Fr;(function(n){n.direct="direct",n.patchObject="patch object",n.patchFunction="patch function"})(Fr||(Fr={}));const fi=typeof window<"u",u_=typeof window=="object"&&window.window===window?window:typeof self=="object"&&self.self===self?self:typeof global=="object"&&global.global===global?global:typeof globalThis=="object"?globalThis:{HTMLElement:null};function WO(n,{autoBom:e=!1}={}){return e&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(n.type)?new Blob(["\uFEFF",n],{type:n.type}):n}function yf(n,e,t){const r=new XMLHttpRequest;r.open("GET",n),r.responseType="blob",r.onload=function(){Vy(r.response,e,t)},r.onerror=function(){console.error("could not download file")},r.send()}function Uy(n){const e=new XMLHttpRequest;e.open("HEAD",n,!1);try{e.send()}catch{}return e.status>=200&&e.status<=299}function ol(n){try{n.dispatchEvent(new MouseEvent("click"))}catch{const t=document.createEvent("MouseEvents");t.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),n.dispatchEvent(t)}}const il=typeof navigator=="object"?navigator:{userAgent:""},By=/Macintosh/.test(il.userAgent)&&/AppleWebKit/.test(il.userAgent)&&!/Safari/.test(il.userAgent),Vy=fi?typeof HTMLAnchorElement<"u"&&"download"in HTMLAnchorElement.prototype&&!By?zO:"msSaveOrOpenBlob"in il?GO:qO:()=>{};function zO(n,e="download",t){const r=document.createElement("a");r.download=e,r.rel="noopener",typeof n=="string"?(r.href=n,r.origin!==location.origin?Uy(r.href)?yf(n,e,t):(r.target="_blank",ol(r)):ol(r)):(r.href=URL.createObjectURL(n),setTimeout(function(){URL.revokeObjectURL(r.href)},4e4),setTimeout(function(){ol(r)},0))}function GO(n,e="download",t){if(typeof n=="string")if(Uy(n))yf(n,e,t);else{const r=document.createElement("a");r.href=n,r.target="_blank",setTimeout(function(){ol(r)})}else navigator.msSaveOrOpenBlob(WO(n,t),e)}function qO(n,e,t,r){if(r=r||open("","_blank"),r&&(r.document.title=r.document.body.innerText="downloading..."),typeof n=="string")return yf(n,e,t);const o=n.type==="application/octet-stream",a=/constructor/i.test(String(u_.HTMLElement))||"safari"in u_,l=/CriOS\/[\d]+/.test(navigator.userAgent);if((l||o&&a||By)&&typeof FileReader<"u"){const d=new FileReader;d.onloadend=function(){let h=d.result;if(typeof h!="string")throw r=null,new Error("Wrong reader.result type");h=l?h:h.replace(/^data:[^;]*;/,"data:attachment/file;"),r?r.location.href=h:location.assign(h),r=null},d.readAsDataURL(n)}else{const d=URL.createObjectURL(n);r?r.location.assign(d):location.href=d,r=null,setTimeout(function(){URL.revokeObjectURL(d)},4e4)}}function Ut(n,e){const t="🍍 "+n;typeof __VUE_DEVTOOLS_TOAST__=="function"?__VUE_DEVTOOLS_TOAST__(t,e):e==="error"?console.error(t):e==="warn"?console.warn(t):console.log(t)}function Cf(n){return"_a"in n&&"install"in n}function Fy(){if(!("clipboard"in navigator))return Ut("Your browser doesn't support the Clipboard API","error"),!0}function Hy(n){return n instanceof Error&&n.message.toLowerCase().includes("document is not focused")?(Ut('You need to activate the "Emulate a focused page" setting in the "Rendering" panel of devtools.',"warn"),!0):!1}async function jO(n){if(!Fy())try{await navigator.clipboard.writeText(JSON.stringify(n.state.value)),Ut("Global state copied to clipboard.")}catch(e){if(Hy(e))return;Ut("Failed to serialize the state. Check the console for more details.","error"),console.error(e)}}async function YO(n){if(!Fy())try{$y(n,JSON.parse(await navigator.clipboard.readText())),Ut("Global state pasted from clipboard.")}catch(e){if(Hy(e))return;Ut("Failed to deserialize the state from clipboard. Check the console for more details.","error"),console.error(e)}}async function JO(n){try{Vy(new Blob([JSON.stringify(n.state.value)],{type:"text/plain;charset=utf-8"}),"pinia-state.json")}catch(e){Ut("Failed to export the state as JSON. Check the console for more details.","error"),console.error(e)}}let ro;function QO(){ro||(ro=document.createElement("input"),ro.type="file",ro.accept=".json");function n(){return new Promise((e,t)=>{ro.onchange=async()=>{const r=ro.files;if(!r)return e(null);const o=r.item(0);return e(o?{text:await o.text(),file:o}:null)},ro.oncancel=()=>e(null),ro.onerror=t,ro.click()})}return n}async function XO(n){try{const t=await QO()();if(!t)return;const{text:r,file:o}=t;$y(n,JSON.parse(r)),Ut(`Global state imported from "${o.name}".`)}catch(e){Ut("Failed to import the state from JSON. Check the console for more details.","error"),console.error(e)}}function $y(n,e){for(const t in e){const r=n.state.value[t];r?Object.assign(r,e[t]):n.state.value[t]=e[t]}}function gr(n){return{_custom:{display:n}}}const Ky="🍍 Pinia (root)",al="_root";function ZO(n){return Cf(n)?{id:al,label:Ky}:{id:n.$id,label:n.$id}}function e0(n){if(Cf(n)){const t=Array.from(n._s.keys()),r=n._s;return{state:t.map(a=>({editable:!0,key:a,value:n.state.value[a]})),getters:t.filter(a=>r.get(a)._getters).map(a=>{const l=r.get(a);return{editable:!1,key:a,value:l._getters.reduce((d,h)=>(d[h]=l[h],d),{})}})}}const e={state:Object.keys(n.$state).map(t=>({editable:!0,key:t,value:n.$state[t]}))};return n._getters&&n._getters.length&&(e.getters=n._getters.map(t=>({editable:!1,key:t,value:n[t]}))),n._customProperties.size&&(e.customProperties=Array.from(n._customProperties).map(t=>({editable:!0,key:t,value:n[t]}))),e}function t0(n){return n?Array.isArray(n)?n.reduce((e,t)=>(e.keys.push(t.key),e.operations.push(t.type),e.oldValue[t.key]=t.oldValue,e.newValue[t.key]=t.newValue,e),{oldValue:{},keys:[],operations:[],newValue:{}}):{operation:gr(n.type),key:gr(n.key),oldValue:n.oldValue,newValue:n.newValue}:{}}function n0(n){switch(n){case Fr.direct:return"mutation";case Fr.patchFunction:return"$patch";case Fr.patchObject:return"$patch";default:return"unknown"}}let ha=!0;const sl=[],ui="pinia:mutations",Zt="pinia",{assign:r0}=Object,Cl=n=>"🍍 "+n;function o0(n,e){vf({id:"dev.esm.pinia",label:"Pinia 🍍",logo:"https://pinia.vuejs.org/logo.svg",packageName:"pinia",homepage:"https://pinia.vuejs.org",componentStateTypes:sl,app:n},t=>{typeof t.now!="function"&&Ut("You seem to be using an outdated version of Vue Devtools. Are you still using the Beta release instead of the stable one? You can find the links at https://devtools.vuejs.org/guide/installation.html."),t.addTimelineLayer({id:ui,label:"Pinia 🍍",color:15064968}),t.addInspector({id:Zt,label:"Pinia 🍍",icon:"storage",treeFilterPlaceholder:"Search stores",actions:[{icon:"content_copy",action:()=>{jO(e)},tooltip:"Serialize and copy the state"},{icon:"content_paste",action:async()=>{await YO(e),t.sendInspectorTree(Zt),t.sendInspectorState(Zt)},tooltip:"Replace the state with the content of your clipboard"},{icon:"save",action:()=>{JO(e)},tooltip:"Save the state as a JSON file"},{icon:"folder_open",action:async()=>{await XO(e),t.sendInspectorTree(Zt),t.sendInspectorState(Zt)},tooltip:"Import the state from a JSON file"}],nodeActions:[{icon:"restore",tooltip:'Reset the state (with "$reset")',action:r=>{const o=e._s.get(r);o?typeof o.$reset!="function"?Ut(`Cannot reset "${r}" store because it doesn't have a "$reset" method implemented.`,"warn"):(o.$reset(),Ut(`Store "${r}" reset.`)):Ut(`Cannot reset "${r}" store because it wasn't found.`,"warn")}}]}),t.on.inspectComponent((r,o)=>{const a=r.componentInstance&&r.componentInstance.proxy;if(a&&a._pStores){const l=r.componentInstance.proxy._pStores;Object.values(l).forEach(d=>{r.instanceData.state.push({type:Cl(d.$id),key:"state",editable:!0,value:d._isOptionsAPI?{_custom:{value:c.toRaw(d.$state),actions:[{icon:"restore",tooltip:"Reset the state of this store",action:()=>d.$reset()}]}}:Object.keys(d.$state).reduce((h,f)=>(h[f]=d.$state[f],h),{})}),d._getters&&d._getters.length&&r.instanceData.state.push({type:Cl(d.$id),key:"getters",editable:!1,value:d._getters.reduce((h,f)=>{try{h[f]=d[f]}catch(g){h[f]=g}return h},{})})})}}),t.on.getInspectorTree(r=>{if(r.app===n&&r.inspectorId===Zt){let o=[e];o=o.concat(Array.from(e._s.values())),r.rootNodes=(r.filter?o.filter(a=>"$id"in a?a.$id.toLowerCase().includes(r.filter.toLowerCase()):Ky.toLowerCase().includes(r.filter.toLowerCase())):o).map(ZO)}}),globalThis.$pinia=e,t.on.getInspectorState(r=>{if(r.app===n&&r.inspectorId===Zt){const o=r.nodeId===al?e:e._s.get(r.nodeId);if(!o)return;o&&(r.nodeId!==al&&(globalThis.$store=c.toRaw(o)),r.state=e0(o))}}),t.on.editInspectorState((r,o)=>{if(r.app===n&&r.inspectorId===Zt){const a=r.nodeId===al?e:e._s.get(r.nodeId);if(!a)return Ut(`store "${r.nodeId}" not found`,"error");const{path:l}=r;Cf(a)?l.unshift("state"):(l.length!==1||!a._customProperties.has(l[0])||l[0]in a.$state)&&l.unshift("$state"),ha=!1,r.set(a,l,r.state.value),ha=!0}}),t.on.editComponentState(r=>{if(r.type.startsWith("🍍")){const o=r.type.replace(/^🍍\s*/,""),a=e._s.get(o);if(!a)return Ut(`store "${o}" not found`,"error");const{path:l}=r;if(l[0]!=="state")return Ut(`Invalid path for store "${o}":
|
6
6
|
${l}
|
7
|
-
Only state can be modified.`);l[0]="$state",
|
7
|
+
Only state can be modified.`);l[0]="$state",ha=!1,r.set(a,l,r.state.value),ha=!0}})})}function i0(n,e){sl.includes(Cl(e.$id))||sl.push(Cl(e.$id)),vf({id:"dev.esm.pinia",label:"Pinia 🍍",logo:"https://pinia.vuejs.org/logo.svg",packageName:"pinia",homepage:"https://pinia.vuejs.org",componentStateTypes:sl,app:n,settings:{logStoreChanges:{label:"Notify about new/deleted stores",type:"boolean",defaultValue:!0}}},t=>{const r=typeof t.now=="function"?t.now.bind(t):Date.now;e.$onAction(({after:l,onError:d,name:h,args:f})=>{const g=Wy++;t.addTimelineEvent({layerId:ui,event:{time:r(),title:"🛫 "+h,subtitle:"start",data:{store:gr(e.$id),action:gr(h),args:f},groupId:g}}),l(_=>{Vo=void 0,t.addTimelineEvent({layerId:ui,event:{time:r(),title:"🛬 "+h,subtitle:"end",data:{store:gr(e.$id),action:gr(h),args:f,result:_},groupId:g}})}),d(_=>{Vo=void 0,t.addTimelineEvent({layerId:ui,event:{time:r(),logType:"error",title:"💥 "+h,subtitle:"end",data:{store:gr(e.$id),action:gr(h),args:f,error:_},groupId:g}})})},!0),e._customProperties.forEach(l=>{c.watch(()=>c.unref(e[l]),(d,h)=>{t.notifyComponentUpdate(),t.sendInspectorState(Zt),ha&&t.addTimelineEvent({layerId:ui,event:{time:r(),title:"Change",subtitle:l,data:{newValue:d,oldValue:h},groupId:Vo}})},{deep:!0})}),e.$subscribe(({events:l,type:d},h)=>{if(t.notifyComponentUpdate(),t.sendInspectorState(Zt),!ha)return;const f={time:r(),title:n0(d),data:r0({store:gr(e.$id)},t0(l)),groupId:Vo};d===Fr.patchFunction?f.subtitle="⤵️":d===Fr.patchObject?f.subtitle="🧩":l&&!Array.isArray(l)&&(f.subtitle=l.type),l&&(f.data["rawEvent(s)"]={_custom:{display:"DebuggerEvent",type:"object",tooltip:"raw DebuggerEvent[]",value:l}}),t.addTimelineEvent({layerId:ui,event:f})},{detached:!0,flush:"sync"});const o=e._hotUpdate;e._hotUpdate=c.markRaw(l=>{o(l),t.addTimelineEvent({layerId:ui,event:{time:r(),title:"🔥 "+e.$id,subtitle:"HMR update",data:{store:gr(e.$id),info:gr("HMR update")}}}),t.notifyComponentUpdate(),t.sendInspectorTree(Zt),t.sendInspectorState(Zt)});const{$dispose:a}=e;e.$dispose=()=>{a(),t.notifyComponentUpdate(),t.sendInspectorTree(Zt),t.sendInspectorState(Zt),t.getSettings().logStoreChanges&&Ut(`Disposed "${e.$id}" store 🗑`)},t.notifyComponentUpdate(),t.sendInspectorTree(Zt),t.sendInspectorState(Zt),t.getSettings().logStoreChanges&&Ut(`"${e.$id}" store installed 🆕`)})}let Wy=0,Vo;function d_(n,e,t){const r=e.reduce((o,a)=>(o[a]=c.toRaw(n)[a],o),{});for(const o in r)n[o]=function(){const a=Wy,l=t?new Proxy(n,{get(...h){return Vo=a,Reflect.get(...h)},set(...h){return Vo=a,Reflect.set(...h)}}):n;Vo=a;const d=r[o].apply(l,arguments);return Vo=void 0,d}}function a0({app:n,store:e,options:t}){if(!e.$id.startsWith("__hot:")){if(e._isOptionsAPI=!!t.state,!e._p._testing){d_(e,Object.keys(t.actions),e._isOptionsAPI);const r=e._hotUpdate;c.toRaw(e)._hotUpdate=function(o){r.apply(this,arguments),d_(e,Object.keys(o._hmrPayload.actions),!!e._isOptionsAPI)}}i0(n,e)}}function s0(){const n=c.effectScope(!0),e=n.run(()=>c.ref({}));let t=[],r=[];const o=c.markRaw({install(a){Ts(o),o._a=a,a.provide(xy,o),a.config.globalProperties.$pinia=o,process.env.NODE_ENV!=="production"&&process.env.NODE_ENV!=="test"&&fi&&o0(a,o),r.forEach(l=>t.push(l)),r=[]},use(a){return!this._a&&!Dy?r.push(a):t.push(a),this},_p:t,_a:null,_e:n,_s:new Map,state:e});return process.env.NODE_ENV!=="production"&&process.env.NODE_ENV!=="test"&&typeof Proxy<"u"&&o.use(a0),o}function zy(n,e){for(const t in e){const r=e[t];if(!(t in n))continue;const o=n[t];Ea(o)&&Ea(r)&&!c.isRef(r)&&!c.isReactive(r)?n[t]=zy(o,r):n[t]=r}return n}const c0=()=>{};function h_(n,e,t,r=c0){n.push(e);const o=()=>{const a=n.indexOf(e);a>-1&&(n.splice(a,1),r())};return!t&&c.getCurrentScope()&&c.onScopeDispose(o),o}function Gi(n,...e){n.slice().forEach(t=>{t(...e)})}const l0=n=>n(),f_=Symbol(),Ud=Symbol();function Gy(n,e){n instanceof Map&&e instanceof Map?e.forEach((t,r)=>n.set(r,t)):n instanceof Set&&e instanceof Set&&e.forEach(n.add,n);for(const t in e){if(!e.hasOwnProperty(t))continue;const r=e[t],o=n[t];Ea(o)&&Ea(r)&&n.hasOwnProperty(t)&&!c.isRef(r)&&!c.isReactive(r)?n[t]=Gy(o,r):n[t]=r}return n}process.env.NODE_ENV!=="production"?Symbol("pinia:skipHydration"):Symbol();const{assign:tr}=Object;function m_(n){return!!(c.isRef(n)&&n.effect)}function g_(n,e,t,r){const{state:o,actions:a,getters:l}=e,d=t.state.value[n];let h;function f(){!d&&(process.env.NODE_ENV==="production"||!r)&&(t.state.value[n]=o?o():{});const g=process.env.NODE_ENV!=="production"&&r?c.toRefs(c.ref(o?o():{}).value):c.toRefs(t.state.value[n]);return tr(g,a,Object.keys(l||{}).reduce((_,p)=>(process.env.NODE_ENV!=="production"&&p in g&&console.warn(`[🍍]: A getter cannot have the same name as another state property. Rename one of them. Found with "${p}" in store "${n}".`),_[p]=c.markRaw(c.computed(()=>{Ts(t);const w=t._s.get(n);return l[p].call(w,w)})),_),{}))}return h=u0(n,f,e,t,r,!0),h}function u0(n,e,t={},r,o,a){let l;const d=tr({actions:{}},t);if(process.env.NODE_ENV!=="production"&&!r._e.active)throw new Error("Pinia destroyed");const h={deep:!0};process.env.NODE_ENV!=="production"&&!Dy&&(h.onTrigger=X=>{f?w=X:f==!1&&!M._hotUpdating&&(Array.isArray(w)?w.push(X):console.error("🍍 debuggerEvents should be an array. This is most likely an internal Pinia bug."))});let f,g,_=[],p=[],w;const C=r.state.value[n],T=c.ref({});let k;function S(X){let ee;f=g=!1,process.env.NODE_ENV!=="production"&&(w=[]),typeof X=="function"?(X(r.state.value[n]),ee={type:Fr.patchFunction,storeId:n,events:w}):(Gy(r.state.value[n],X),ee={type:Fr.patchObject,payload:X,storeId:n,events:w});const ue=k=Symbol();c.nextTick().then(()=>{k===ue&&(f=!0)}),g=!0,Gi(_,ee,r.state.value[n])}const N=function(){const{state:ee}=t,ue=ee?ee():{};this.$patch(Be=>{tr(Be,ue)})};function D(){l.stop(),_=[],p=[],r._s.delete(n)}const L=(X,ee="")=>{if(f_ in X)return X[Ud]=ee,X;const ue=function(){Ts(r);const Be=Array.from(arguments),Ct=[],rn=[];function qt(Et){Ct.push(Et)}function Mt(Et){rn.push(Et)}Gi(p,{args:Be,name:ue[Ud],store:M,after:qt,onError:Mt});let at;try{at=X.apply(this&&this.$id===n?this:M,Be)}catch(Et){throw Gi(rn,Et),Et}return at instanceof Promise?at.then(Et=>(Gi(Ct,Et),Et)).catch(Et=>(Gi(rn,Et),Promise.reject(Et))):(Gi(Ct,at),at)};return ue[f_]=!0,ue[Ud]=ee,ue},K=c.markRaw({actions:{},getters:{},state:[],hotState:T}),q={_p:r,$id:n,$onAction:h_.bind(null,p),$patch:S,$reset:N,$subscribe(X,ee={}){const ue=h_(_,X,ee.detached,()=>Be()),Be=l.run(()=>c.watch(()=>r.state.value[n],Ct=>{(ee.flush==="sync"?g:f)&&X({storeId:n,type:Fr.direct,events:w},Ct)},tr({},h,ee)));return ue},$dispose:D},M=c.reactive(process.env.NODE_ENV!=="production"||process.env.NODE_ENV!=="production"&&process.env.NODE_ENV!=="test"&&fi?tr({_hmrPayload:K,_customProperties:c.markRaw(new Set)},q):q);r._s.set(n,M);const ae=(r._a&&r._a.runWithContext||l0)(()=>r._e.run(()=>(l=c.effectScope()).run(()=>e({action:L}))));for(const X in ae){const ee=ae[X];if(c.isRef(ee)&&!m_(ee)||c.isReactive(ee))process.env.NODE_ENV!=="production"&&o&&Uc(T.value,X,c.toRef(ae,X)),process.env.NODE_ENV!=="production"&&K.state.push(X);else if(typeof ee=="function"){const ue=process.env.NODE_ENV!=="production"&&o?ee:L(ee,X);ae[X]=ue,process.env.NODE_ENV!=="production"&&(K.actions[X]=ee),d.actions[X]=ee}else process.env.NODE_ENV!=="production"&&m_(ee)&&(K.getters[X]=t.getters[X],fi&&(ae._getters||(ae._getters=c.markRaw([]))).push(X))}if(tr(M,ae),tr(c.toRaw(M),ae),Object.defineProperty(M,"$state",{get:()=>process.env.NODE_ENV!=="production"&&o?T.value:r.state.value[n],set:X=>{if(process.env.NODE_ENV!=="production"&&o)throw new Error("cannot set hotState");S(ee=>{tr(ee,X)})}}),process.env.NODE_ENV!=="production"&&(M._hotUpdate=c.markRaw(X=>{M._hotUpdating=!0,X._hmrPayload.state.forEach(ee=>{if(ee in M.$state){const ue=X.$state[ee],Be=M.$state[ee];typeof ue=="object"&&Ea(ue)&&Ea(Be)?zy(ue,Be):X.$state[ee]=Be}Uc(M,ee,c.toRef(X.$state,ee))}),Object.keys(M.$state).forEach(ee=>{ee in X.$state||xd(M,ee)}),f=!1,g=!1,r.state.value[n]=c.toRef(X._hmrPayload,"hotState"),g=!0,c.nextTick().then(()=>{f=!0});for(const ee in X._hmrPayload.actions){const ue=X[ee];Uc(M,ee,L(ue,ee))}for(const ee in X._hmrPayload.getters){const ue=X._hmrPayload.getters[ee],Be=c.computed(()=>(Ts(r),ue.call(M,M)));Uc(M,ee,Be)}Object.keys(M._hmrPayload.getters).forEach(ee=>{ee in X._hmrPayload.getters||xd(M,ee)}),Object.keys(M._hmrPayload.actions).forEach(ee=>{ee in X._hmrPayload.actions||xd(M,ee)}),M._hmrPayload=X._hmrPayload,M._getters=X._getters,M._hotUpdating=!1})),process.env.NODE_ENV!=="production"&&process.env.NODE_ENV!=="test"&&fi){const X={writable:!0,configurable:!0,enumerable:!1};["_p","_hmrPayload","_getters","_customProperties"].forEach(ee=>{Object.defineProperty(M,ee,tr({value:M[ee]},X))})}return r._p.forEach(X=>{if(process.env.NODE_ENV!=="production"&&process.env.NODE_ENV!=="test"&&fi){const ee=l.run(()=>X({store:M,app:r._a,pinia:r,options:d}));Object.keys(ee||{}).forEach(ue=>M._customProperties.add(ue)),tr(M,ee)}else tr(M,l.run(()=>X({store:M,app:r._a,pinia:r,options:d})))}),process.env.NODE_ENV!=="production"&&M.$state&&typeof M.$state=="object"&&typeof M.$state.constructor=="function"&&!M.$state.constructor.toString().includes("[native code]")&&console.warn(`[🍍]: The "state" must be a plain object. It cannot be
|
8
8
|
state: () => new MyClass()
|
9
|
-
Found in store "${M.$id}".`),C&&a&&t.hydrate&&t.hydrate(M.$state,C),f=!0,g=!0,M}/*! #__NO_SIDE_EFFECTS__ */function
|
9
|
+
Found in store "${M.$id}".`),C&&a&&t.hydrate&&t.hydrate(M.$state,C),f=!0,g=!0,M}/*! #__NO_SIDE_EFFECTS__ */function d0(n,e,t){let r,o;if(typeof n=="string")r=n,o=e;else if(o=n,r=n.id,process.env.NODE_ENV!=="production"&&typeof r!="string")throw new Error('[🍍]: "defineStore()" must be passed a store id as its first argument.');function a(l,d){const h=c.hasInjectionContext();if(l=(process.env.NODE_ENV==="test"&&ss&&ss._testing?null:l)||(h?c.inject(xy,null):null),l&&Ts(l),process.env.NODE_ENV!=="production"&&!ss)throw new Error(`[🍍]: "getActivePinia()" was called but there was no active Pinia. Are you trying to use a store before calling "app.use(pinia)"?
|
10
10
|
See https://pinia.vuejs.org/core-concepts/outside-component-usage.html for help.
|
11
|
-
This will fail in production.`);l=ss,l._s.has(r)||(g_(r,o,l),process.env.NODE_ENV!=="production"&&(a._pinia=l));const f=l._s.get(r);if(process.env.NODE_ENV!=="production"&&d){const g="__hot:"+r,_=g_(g,tr({},o),l,!0);d._hotUpdate(_),delete l.state.value[g],l._s.delete(g)}if(process.env.NODE_ENV!=="production"&&hi){const g=c.getCurrentInstance();if(g&&g.proxy&&!d){const _=g.proxy,p="_pStores"in _?_._pStores:_._pStores={};p[r]=f}}return f}return a.$id=r,a}const d0=u0({id:"customizer",state:()=>({Sidebar_drawer:!0,Customizer_drawer:!1,mini_sidebar:!1,setHorizontalLayout:!1,actTheme:"DarkJPLANTheme",fontTheme:"Roboto",inputBg:!1,boxed:!1}),getters:{},actions:{SET_SIDEBAR_DRAWER(){this.Sidebar_drawer=!this.Sidebar_drawer},SET_MINI_SIDEBAR(n){this.mini_sidebar=n},SET_CUSTOMIZER_DRAWER(n){this.Customizer_drawer=n},SET_LAYOUT(n){this.setHorizontalLayout=n},SET_THEME(n){this.actTheme=n},SET_FONT(n){this.fontTheme=n}}}),Gi=c.ref({}),Us=n=>{const e=c.computed(()=>n?Gi.value[n]||!1:Gi.value.default||!1),t=()=>{n?Gi.value[n]=!0:Gi.value.default=!0},r=()=>{n?Gi.value[n]=!1:Gi.value.default=!1};return c.onUnmounted(()=>{r()}),c.onMounted(()=>{r()}),{isDialogActive:e,openDialog:t,closeDialog:r}};var h0=Object.defineProperty,p_=Object.getOwnPropertySymbols,f0=Object.prototype.hasOwnProperty,m0=Object.prototype.propertyIsEnumerable,__=(n,e,t)=>e in n?h0(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,qy=(n,e)=>{for(var t in e||(e={}))f0.call(e,t)&&__(n,t,e[t]);if(p_)for(var t of p_(e))m0.call(e,t)&&__(n,t,e[t]);return n},Hl=n=>typeof n=="function",$l=n=>typeof n=="string",jy=n=>$l(n)&&n.trim().length>0,g0=n=>typeof n=="number",fi=n=>typeof n>"u",bs=n=>typeof n=="object"&&n!==null,p0=n=>Hr(n,"tag")&&jy(n.tag),Yy=n=>window.TouchEvent&&n instanceof TouchEvent,Jy=n=>Hr(n,"component")&&Qy(n.component),_0=n=>Hl(n)||bs(n),Qy=n=>!fi(n)&&($l(n)||_0(n)||Jy(n)),v_=n=>bs(n)&&["height","width","right","left","top","bottom"].every(e=>g0(n[e])),Hr=(n,e)=>(bs(n)||Hl(n))&&e in n,v0=(n=>()=>n++)(0);function Bd(n){return Yy(n)?n.targetTouches[0].clientX:n.clientX}function y_(n){return Yy(n)?n.targetTouches[0].clientY:n.clientY}var y0=n=>{fi(n.remove)?n.parentNode&&n.parentNode.removeChild(n):n.remove()},Bs=n=>Jy(n)?Bs(n.component):p0(n)?c.defineComponent({render(){return n}}):typeof n=="string"?n:c.toRaw(c.unref(n)),C0=n=>{if(typeof n=="string")return n;const e=Hr(n,"props")&&bs(n.props)?n.props:{},t=Hr(n,"listeners")&&bs(n.listeners)?n.listeners:{};return{component:Bs(n),props:e,listeners:t}},E0=()=>typeof window<"u",Kl=class{constructor(){this.allHandlers={}}getHandlers(n){return this.allHandlers[n]||[]}on(n,e){const t=this.getHandlers(n);t.push(e),this.allHandlers[n]=t}off(n,e){const t=this.getHandlers(n);t.splice(t.indexOf(e)>>>0,1)}emit(n,e){this.getHandlers(n).forEach(r=>r(e))}},w0=n=>["on","off","emit"].every(e=>Hr(n,e)&&Hl(n[e]));exports.TYPE=void 0;(function(n){n.SUCCESS="success",n.ERROR="error",n.WARNING="warning",n.INFO="info",n.DEFAULT="default"})(exports.TYPE||(exports.TYPE={}));exports.POSITION=void 0;(function(n){n.TOP_LEFT="top-left",n.TOP_CENTER="top-center",n.TOP_RIGHT="top-right",n.BOTTOM_LEFT="bottom-left",n.BOTTOM_CENTER="bottom-center",n.BOTTOM_RIGHT="bottom-right"})(exports.POSITION||(exports.POSITION={}));var Ln;(function(n){n.ADD="add",n.DISMISS="dismiss",n.UPDATE="update",n.CLEAR="clear",n.UPDATE_DEFAULTS="update_defaults"})(Ln||(Ln={}));var vr="Vue-Toastification",_r={type:{type:String,default:exports.TYPE.DEFAULT},classNames:{type:[String,Array],default:()=>[]},trueBoolean:{type:Boolean,default:!0}},Xy={type:_r.type,customIcon:{type:[String,Boolean,Object,Function],default:!0}},cl={component:{type:[String,Object,Function,Boolean],default:"button"},classNames:_r.classNames,showOnHover:{type:Boolean,default:!1},ariaLabel:{type:String,default:"close"}},bh={timeout:{type:[Number,Boolean],default:5e3},hideProgressBar:{type:Boolean,default:!1},isRunning:{type:Boolean,default:!1}},Zy={transition:{type:[Object,String],default:`${vr}__bounce`}},T0={position:{type:String,default:exports.POSITION.TOP_RIGHT},draggable:_r.trueBoolean,draggablePercent:{type:Number,default:.6},pauseOnFocusLoss:_r.trueBoolean,pauseOnHover:_r.trueBoolean,closeOnClick:_r.trueBoolean,timeout:bh.timeout,hideProgressBar:bh.hideProgressBar,toastClassName:_r.classNames,bodyClassName:_r.classNames,icon:Xy.customIcon,closeButton:cl.component,closeButtonClassName:cl.classNames,showCloseButtonOnHover:cl.showOnHover,accessibility:{type:Object,default:()=>({toastRole:"alert",closeButtonLabel:"close"})},rtl:{type:Boolean,default:!1},eventBus:{type:Object,required:!1,default:()=>new Kl}},b0={id:{type:[String,Number],required:!0,default:0},type:_r.type,content:{type:[String,Object,Function],required:!0,default:""},onClick:{type:Function,default:void 0},onClose:{type:Function,default:void 0}},I0={container:{type:[Object,Function],default:()=>document.body},newestOnTop:_r.trueBoolean,maxToasts:{type:Number,default:20},transition:Zy.transition,toastDefaults:Object,filterBeforeCreate:{type:Function,default:n=>n},filterToasts:{type:Function,default:n=>n},containerClassName:_r.classNames,onMounted:Function,shareAppContext:[Boolean,Object]},uo={CORE_TOAST:T0,TOAST:b0,CONTAINER:I0,PROGRESS_BAR:bh,ICON:Xy,TRANSITION:Zy,CLOSE_BUTTON:cl},eC=c.defineComponent({name:"VtProgressBar",props:uo.PROGRESS_BAR,data(){return{hasClass:!0}},computed:{style(){return{animationDuration:`${this.timeout}ms`,animationPlayState:this.isRunning?"running":"paused",opacity:this.hideProgressBar?0:1}},cpClass(){return this.hasClass?`${vr}__progress-bar`:""}},watch:{timeout(){this.hasClass=!1,this.$nextTick(()=>this.hasClass=!0)}},mounted(){this.$el.addEventListener("animationend",this.animationEnded)},beforeUnmount(){this.$el.removeEventListener("animationend",this.animationEnded)},methods:{animationEnded(){this.$emit("close-toast")}}});function S0(n,e){return c.openBlock(),c.createElementBlock("div",{style:c.normalizeStyle(n.style),class:c.normalizeClass(n.cpClass)},null,6)}eC.render=S0;var A0=eC,tC=c.defineComponent({name:"VtCloseButton",props:uo.CLOSE_BUTTON,computed:{buttonComponent(){return this.component!==!1?Bs(this.component):"button"},classes(){const n=[`${vr}__close-button`];return this.showOnHover&&n.push("show-on-hover"),n.concat(this.classNames)}}}),k0=c.createTextVNode(" × ");function N0(n,e){return c.openBlock(),c.createBlock(c.resolveDynamicComponent(n.buttonComponent),c.mergeProps({"aria-label":n.ariaLabel,class:n.classes},n.$attrs),{default:c.withCtx(()=>[k0]),_:1},16,["aria-label","class"])}tC.render=N0;var R0=tC,nC={},O0={"aria-hidden":"true",focusable:"false","data-prefix":"fas","data-icon":"check-circle",class:"svg-inline--fa fa-check-circle fa-w-16",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},P0=c.createElementVNode("path",{fill:"currentColor",d:"M504 256c0 136.967-111.033 248-248 248S8 392.967 8 256 119.033 8 256 8s248 111.033 248 248zM227.314 387.314l184-184c6.248-6.248 6.248-16.379 0-22.627l-22.627-22.627c-6.248-6.249-16.379-6.249-22.628 0L216 308.118l-70.059-70.059c-6.248-6.248-16.379-6.248-22.628 0l-22.627 22.627c-6.248 6.248-6.248 16.379 0 22.627l104 104c6.249 6.249 16.379 6.249 22.628.001z"},null,-1),M0=[P0];function D0(n,e){return c.openBlock(),c.createElementBlock("svg",O0,M0)}nC.render=D0;var L0=nC,rC={},x0={"aria-hidden":"true",focusable:"false","data-prefix":"fas","data-icon":"info-circle",class:"svg-inline--fa fa-info-circle fa-w-16",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},U0=c.createElementVNode("path",{fill:"currentColor",d:"M256 8C119.043 8 8 119.083 8 256c0 136.997 111.043 248 248 248s248-111.003 248-248C504 119.083 392.957 8 256 8zm0 110c23.196 0 42 18.804 42 42s-18.804 42-42 42-42-18.804-42-42 18.804-42 42-42zm56 254c0 6.627-5.373 12-12 12h-88c-6.627 0-12-5.373-12-12v-24c0-6.627 5.373-12 12-12h12v-64h-12c-6.627 0-12-5.373-12-12v-24c0-6.627 5.373-12 12-12h64c6.627 0 12 5.373 12 12v100h12c6.627 0 12 5.373 12 12v24z"},null,-1),B0=[U0];function V0(n,e){return c.openBlock(),c.createElementBlock("svg",x0,B0)}rC.render=V0;var C_=rC,oC={},F0={"aria-hidden":"true",focusable:"false","data-prefix":"fas","data-icon":"exclamation-circle",class:"svg-inline--fa fa-exclamation-circle fa-w-16",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},H0=c.createElementVNode("path",{fill:"currentColor",d:"M504 256c0 136.997-111.043 248-248 248S8 392.997 8 256C8 119.083 119.043 8 256 8s248 111.083 248 248zm-248 50c-25.405 0-46 20.595-46 46s20.595 46 46 46 46-20.595 46-46-20.595-46-46-46zm-43.673-165.346l7.418 136c.347 6.364 5.609 11.346 11.982 11.346h48.546c6.373 0 11.635-4.982 11.982-11.346l7.418-136c.375-6.874-5.098-12.654-11.982-12.654h-63.383c-6.884 0-12.356 5.78-11.981 12.654z"},null,-1),$0=[H0];function K0(n,e){return c.openBlock(),c.createElementBlock("svg",F0,$0)}oC.render=K0;var W0=oC,iC={},z0={"aria-hidden":"true",focusable:"false","data-prefix":"fas","data-icon":"exclamation-triangle",class:"svg-inline--fa fa-exclamation-triangle fa-w-18",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 576 512"},G0=c.createElementVNode("path",{fill:"currentColor",d:"M569.517 440.013C587.975 472.007 564.806 512 527.94 512H48.054c-36.937 0-59.999-40.055-41.577-71.987L246.423 23.985c18.467-32.009 64.72-31.951 83.154 0l239.94 416.028zM288 354c-25.405 0-46 20.595-46 46s20.595 46 46 46 46-20.595 46-46-20.595-46-46-46zm-43.673-165.346l7.418 136c.347 6.364 5.609 11.346 11.982 11.346h48.546c6.373 0 11.635-4.982 11.982-11.346l7.418-136c.375-6.874-5.098-12.654-11.982-12.654h-63.383c-6.884 0-12.356 5.78-11.981 12.654z"},null,-1),q0=[G0];function j0(n,e){return c.openBlock(),c.createElementBlock("svg",z0,q0)}iC.render=j0;var Y0=iC,aC=c.defineComponent({name:"VtIcon",props:uo.ICON,computed:{customIconChildren(){return Hr(this.customIcon,"iconChildren")?this.trimValue(this.customIcon.iconChildren):""},customIconClass(){return $l(this.customIcon)?this.trimValue(this.customIcon):Hr(this.customIcon,"iconClass")?this.trimValue(this.customIcon.iconClass):""},customIconTag(){return Hr(this.customIcon,"iconTag")?this.trimValue(this.customIcon.iconTag,"i"):"i"},hasCustomIcon(){return this.customIconClass.length>0},component(){return this.hasCustomIcon?this.customIconTag:Qy(this.customIcon)?Bs(this.customIcon):this.iconTypeComponent},iconTypeComponent(){return{[exports.TYPE.DEFAULT]:C_,[exports.TYPE.INFO]:C_,[exports.TYPE.SUCCESS]:L0,[exports.TYPE.ERROR]:Y0,[exports.TYPE.WARNING]:W0}[this.type]},iconClasses(){const n=[`${vr}__icon`];return this.hasCustomIcon?n.concat(this.customIconClass):n}},methods:{trimValue(n,e=""){return jy(n)?n.trim():e}}});function J0(n,e){return c.openBlock(),c.createBlock(c.resolveDynamicComponent(n.component),{class:c.normalizeClass(n.iconClasses)},{default:c.withCtx(()=>[c.createTextVNode(c.toDisplayString(n.customIconChildren),1)]),_:1},8,["class"])}aC.render=J0;var Q0=aC,sC=c.defineComponent({name:"VtToast",components:{ProgressBar:A0,CloseButton:R0,Icon:Q0},inheritAttrs:!1,props:Object.assign({},uo.CORE_TOAST,uo.TOAST),data(){return{isRunning:!0,disableTransitions:!1,beingDragged:!1,dragStart:0,dragPos:{x:0,y:0},dragRect:{}}},computed:{classes(){const n=[`${vr}__toast`,`${vr}__toast--${this.type}`,`${this.position}`].concat(this.toastClassName);return this.disableTransitions&&n.push("disable-transition"),this.rtl&&n.push(`${vr}__toast--rtl`),n},bodyClasses(){return[`${vr}__toast-${$l(this.content)?"body":"component-body"}`].concat(this.bodyClassName)},draggableStyle(){return this.dragStart===this.dragPos.x?{}:this.beingDragged?{transform:`translateX(${this.dragDelta}px)`,opacity:1-Math.abs(this.dragDelta/this.removalDistance)}:{transition:"transform 0.2s, opacity 0.2s",transform:"translateX(0)",opacity:1}},dragDelta(){return this.beingDragged?this.dragPos.x-this.dragStart:0},removalDistance(){return v_(this.dragRect)?(this.dragRect.right-this.dragRect.left)*this.draggablePercent:0}},mounted(){this.draggable&&this.draggableSetup(),this.pauseOnFocusLoss&&this.focusSetup()},beforeUnmount(){this.draggable&&this.draggableCleanup(),this.pauseOnFocusLoss&&this.focusCleanup()},methods:{hasProp:Hr,getVueComponentFromObj:Bs,closeToast(){this.eventBus.emit(Ln.DISMISS,this.id)},clickHandler(){this.onClick&&this.onClick(this.closeToast),this.closeOnClick&&(!this.beingDragged||this.dragStart===this.dragPos.x)&&this.closeToast()},timeoutHandler(){this.closeToast()},hoverPause(){this.pauseOnHover&&(this.isRunning=!1)},hoverPlay(){this.pauseOnHover&&(this.isRunning=!0)},focusPause(){this.isRunning=!1},focusPlay(){this.isRunning=!0},focusSetup(){addEventListener("blur",this.focusPause),addEventListener("focus",this.focusPlay)},focusCleanup(){removeEventListener("blur",this.focusPause),removeEventListener("focus",this.focusPlay)},draggableSetup(){const n=this.$el;n.addEventListener("touchstart",this.onDragStart,{passive:!0}),n.addEventListener("mousedown",this.onDragStart),addEventListener("touchmove",this.onDragMove,{passive:!1}),addEventListener("mousemove",this.onDragMove),addEventListener("touchend",this.onDragEnd),addEventListener("mouseup",this.onDragEnd)},draggableCleanup(){const n=this.$el;n.removeEventListener("touchstart",this.onDragStart),n.removeEventListener("mousedown",this.onDragStart),removeEventListener("touchmove",this.onDragMove),removeEventListener("mousemove",this.onDragMove),removeEventListener("touchend",this.onDragEnd),removeEventListener("mouseup",this.onDragEnd)},onDragStart(n){this.beingDragged=!0,this.dragPos={x:Bd(n),y:y_(n)},this.dragStart=Bd(n),this.dragRect=this.$el.getBoundingClientRect()},onDragMove(n){this.beingDragged&&(n.preventDefault(),this.isRunning&&(this.isRunning=!1),this.dragPos={x:Bd(n),y:y_(n)})},onDragEnd(){this.beingDragged&&(Math.abs(this.dragDelta)>=this.removalDistance?(this.disableTransitions=!0,this.$nextTick(()=>this.closeToast())):setTimeout(()=>{this.beingDragged=!1,v_(this.dragRect)&&this.pauseOnHover&&this.dragRect.bottom>=this.dragPos.y&&this.dragPos.y>=this.dragRect.top&&this.dragRect.left<=this.dragPos.x&&this.dragPos.x<=this.dragRect.right?this.isRunning=!1:this.isRunning=!0}))}}}),X0=["role"];function Z0(n,e){const t=c.resolveComponent("Icon"),r=c.resolveComponent("CloseButton"),o=c.resolveComponent("ProgressBar");return c.openBlock(),c.createElementBlock("div",{class:c.normalizeClass(n.classes),style:c.normalizeStyle(n.draggableStyle),onClick:e[0]||(e[0]=(...a)=>n.clickHandler&&n.clickHandler(...a)),onMouseenter:e[1]||(e[1]=(...a)=>n.hoverPause&&n.hoverPause(...a)),onMouseleave:e[2]||(e[2]=(...a)=>n.hoverPlay&&n.hoverPlay(...a))},[n.icon?(c.openBlock(),c.createBlock(t,{key:0,"custom-icon":n.icon,type:n.type},null,8,["custom-icon","type"])):c.createCommentVNode("v-if",!0),c.createElementVNode("div",{role:n.accessibility.toastRole||"alert",class:c.normalizeClass(n.bodyClasses)},[typeof n.content=="string"?(c.openBlock(),c.createElementBlock(c.Fragment,{key:0},[c.createTextVNode(c.toDisplayString(n.content),1)],2112)):(c.openBlock(),c.createBlock(c.resolveDynamicComponent(n.getVueComponentFromObj(n.content)),c.mergeProps({key:1,"toast-id":n.id},n.hasProp(n.content,"props")?n.content.props:{},c.toHandlers(n.hasProp(n.content,"listeners")?n.content.listeners:{}),{onCloseToast:n.closeToast}),null,16,["toast-id","onCloseToast"]))],10,X0),n.closeButton?(c.openBlock(),c.createBlock(r,{key:1,component:n.closeButton,"class-names":n.closeButtonClassName,"show-on-hover":n.showCloseButtonOnHover,"aria-label":n.accessibility.closeButtonLabel,onClick:c.withModifiers(n.closeToast,["stop"])},null,8,["component","class-names","show-on-hover","aria-label","onClick"])):c.createCommentVNode("v-if",!0),n.timeout?(c.openBlock(),c.createBlock(o,{key:2,"is-running":n.isRunning,"hide-progress-bar":n.hideProgressBar,timeout:n.timeout,onCloseToast:n.timeoutHandler},null,8,["is-running","hide-progress-bar","timeout","onCloseToast"])):c.createCommentVNode("v-if",!0)],38)}sC.render=Z0;var eP=sC,cC=c.defineComponent({name:"VtTransition",props:uo.TRANSITION,emits:["leave"],methods:{hasProp:Hr,leave(n){n instanceof HTMLElement&&(n.style.left=n.offsetLeft+"px",n.style.top=n.offsetTop+"px",n.style.width=getComputedStyle(n).width,n.style.position="absolute")}}});function tP(n,e){return c.openBlock(),c.createBlock(c.TransitionGroup,{tag:"div","enter-active-class":n.transition.enter?n.transition.enter:`${n.transition}-enter-active`,"move-class":n.transition.move?n.transition.move:`${n.transition}-move`,"leave-active-class":n.transition.leave?n.transition.leave:`${n.transition}-leave-active`,onLeave:n.leave},{default:c.withCtx(()=>[c.renderSlot(n.$slots,"default")]),_:3},8,["enter-active-class","move-class","leave-active-class","onLeave"])}cC.render=tP;var nP=cC,lC=c.defineComponent({name:"VueToastification",devtools:{hide:!0},components:{Toast:eP,VtTransition:nP},props:Object.assign({},uo.CORE_TOAST,uo.CONTAINER,uo.TRANSITION),data(){return{count:0,positions:Object.values(exports.POSITION),toasts:{},defaults:{}}},computed:{toastArray(){return Object.values(this.toasts)},filteredToasts(){return this.defaults.filterToasts(this.toastArray)}},beforeMount(){const n=this.eventBus;n.on(Ln.ADD,this.addToast),n.on(Ln.CLEAR,this.clearToasts),n.on(Ln.DISMISS,this.dismissToast),n.on(Ln.UPDATE,this.updateToast),n.on(Ln.UPDATE_DEFAULTS,this.updateDefaults),this.defaults=this.$props},mounted(){this.setup(this.container)},methods:{async setup(n){Hl(n)&&(n=await n()),y0(this.$el),n.appendChild(this.$el)},setToast(n){fi(n.id)||(this.toasts[n.id]=n)},addToast(n){n.content=C0(n.content);const e=Object.assign({},this.defaults,n.type&&this.defaults.toastDefaults&&this.defaults.toastDefaults[n.type],n),t=this.defaults.filterBeforeCreate(e,this.toastArray);t&&this.setToast(t)},dismissToast(n){const e=this.toasts[n];!fi(e)&&!fi(e.onClose)&&e.onClose(),delete this.toasts[n]},clearToasts(){Object.keys(this.toasts).forEach(n=>{this.dismissToast(n)})},getPositionToasts(n){const e=this.filteredToasts.filter(t=>t.position===n).slice(0,this.defaults.maxToasts);return this.defaults.newestOnTop?e.reverse():e},updateDefaults(n){fi(n.container)||this.setup(n.container),this.defaults=Object.assign({},this.defaults,n)},updateToast({id:n,options:e,create:t}){this.toasts[n]?(e.timeout&&e.timeout===this.toasts[n].timeout&&e.timeout++,this.setToast(Object.assign({},this.toasts[n],e))):t&&this.addToast(Object.assign({},{id:n},e))},getClasses(n){return[`${vr}__container`,n].concat(this.defaults.containerClassName)}}});function rP(n,e){const t=c.resolveComponent("Toast"),r=c.resolveComponent("VtTransition");return c.openBlock(),c.createElementBlock("div",null,[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(n.positions,o=>(c.openBlock(),c.createElementBlock("div",{key:o},[c.createVNode(r,{transition:n.defaults.transition,class:c.normalizeClass(n.getClasses(o))},{default:c.withCtx(()=>[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(n.getPositionToasts(o),a=>(c.openBlock(),c.createBlock(t,c.mergeProps({key:a.id},a),null,16))),128))]),_:2},1032,["transition","class"])]))),128))])}lC.render=rP;var oP=lC,E_=(n={},e=!0)=>{const t=n.eventBus=n.eventBus||new Kl;e&&c.nextTick(()=>{const a=c.createApp(oP,qy({},n)),l=a.mount(document.createElement("div")),d=n.onMounted;if(fi(d)||d(l,a),n.shareAppContext){const h=n.shareAppContext;h===!0?console.warn(`[${vr}] App to share context with was not provided.`):(a._context.components=h._context.components,a._context.directives=h._context.directives,a._context.mixins=h._context.mixins,a._context.provides=h._context.provides,a.config.globalProperties=h.config.globalProperties)}});const r=(a,l)=>{const d=Object.assign({},{id:v0(),type:exports.TYPE.DEFAULT},l,{content:a});return t.emit(Ln.ADD,d),d.id};r.clear=()=>t.emit(Ln.CLEAR,void 0),r.updateDefaults=a=>{t.emit(Ln.UPDATE_DEFAULTS,a)},r.dismiss=a=>{t.emit(Ln.DISMISS,a)};function o(a,{content:l,options:d},h=!1){const f=Object.assign({},d,{content:l});t.emit(Ln.UPDATE,{id:a,options:f,create:h})}return r.update=o,r.success=(a,l)=>r(a,Object.assign({},l,{type:exports.TYPE.SUCCESS})),r.info=(a,l)=>r(a,Object.assign({},l,{type:exports.TYPE.INFO})),r.error=(a,l)=>r(a,Object.assign({},l,{type:exports.TYPE.ERROR})),r.warning=(a,l)=>r(a,Object.assign({},l,{type:exports.TYPE.WARNING})),r},iP=()=>{const n=()=>console.warn(`[${vr}] This plugin does not support SSR!`);return new Proxy(n,{get(){return n}})};function Is(n){return E0()?w0(n)?E_({eventBus:n},!1):E_(n,!0):iP()}var Wl=Symbol("VueToastification"),Ef=new Kl,aP=(n,e)=>{(e==null?void 0:e.shareAppContext)===!0&&(e.shareAppContext=n);const t=Is(qy({eventBus:Ef},e));n.provide(Wl,t)},sP=n=>{const e=Is(n);c.getCurrentInstance()&&c.provide(Wl,e)},sr=n=>{if(n)return Is(n);const e=c.getCurrentInstance()?c.inject(Wl,void 0):void 0;return e||Is(Ef)},cP=aP;const rs=c.ref([]),os=c.ref([]);function uC(){const n=sr();function e(g,_,p={}){n[g](_),os.value.push({id:crypto.randomUUID(),read:!1,type:g,message:_,timestamp:new Date,meta:{url:p.url||"",method:p.method||"",status:p.status||0}})}function t(g,_){n[g](_),rs.value.push({id:crypto.randomUUID(),read:!1,type:g,message:_,timestamp:new Date})}const r={server:{success:(g,_)=>e("success",g,_),error:(g,_)=>e("error",g,_),warning:(g,_)=>e("warning",g,_),info:(g,_)=>e("info",g)},client:{success:g=>t("success",g),error:g=>t("error",g),warning:g=>t("warning",g),info:g=>t("info",g)}};function o(){return rs.value.filter(g=>!g.read)}function a(){return os.value.filter(g=>!g.read)}function l(){return[...o(),...a()].sort((g,_)=>_.timestamp.getTime()-g.timestamp.getTime())}function d(){return o().length+a().length}function h(g){const _=rs.value.find(p=>p.id===g)||os.value.find(p=>p.id===g);_&&(_.read=!0)}function f(){rs.value.forEach(g=>g.read=!0),os.value.forEach(g=>g.read=!0)}return{client:rs,server:os,toast:r,getUnreadClient:o,getUnreadServer:a,getNewNotifications:l,getUnreadCount:d,markAsRead:h,markAllAsRead:f}}const ve=c.ref(!1);var dC={name:"CircleOffIcon",props:{size:{type:[Number,String],default:24}},render(){const n=this.$props.size+"px",e=this.$data.attrs||{},t={width:e.width||n,height:e.height||n};return c.createVNode("svg",c.mergeProps({xmlns:"http://www.w3.org/2000/svg",class:"icon-tabler icon-tabler-circle-off",width:"24",height:"24",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},t),[c.createTextVNode(" "),c.createVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null),c.createTextVNode(" "),c.createVNode("path",{d:"M20.042 16.045a9 9 0 0 0 -12.087 -12.087m-2.318 1.677a9 9 0 1 0 12.725 12.73"},null),c.createTextVNode(" "),c.createVNode("path",{d:"M3 3l18 18"},null),c.createTextVNode(" ")])}},lP={name:"DotsVerticalIcon",props:{size:{type:[Number,String],default:24}},render(){const n=this.$props.size+"px",e=this.$data.attrs||{},t={width:e.width||n,height:e.height||n};return c.createVNode("svg",c.mergeProps({xmlns:"http://www.w3.org/2000/svg",class:"icon-tabler icon-tabler-dots-vertical",width:"24",height:"24",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},t),[c.createTextVNode(" "),c.createVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null),c.createTextVNode(" "),c.createVNode("path",{d:"M12 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"},null),c.createTextVNode(" "),c.createVNode("path",{d:"M12 19m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"},null),c.createTextVNode(" "),c.createVNode("path",{d:"M12 5m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"},null),c.createTextVNode(" ")])}},uP={name:"DotsIcon",props:{size:{type:[Number,String],default:24}},render(){const n=this.$props.size+"px",e=this.$data.attrs||{},t={width:e.width||n,height:e.height||n};return c.createVNode("svg",c.mergeProps({xmlns:"http://www.w3.org/2000/svg",class:"icon-tabler icon-tabler-dots",width:"24",height:"24",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},t),[c.createTextVNode(" "),c.createVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null),c.createTextVNode(" "),c.createVNode("path",{d:"M5 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"},null),c.createTextVNode(" "),c.createVNode("path",{d:"M12 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"},null),c.createTextVNode(" "),c.createVNode("path",{d:"M19 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"},null),c.createTextVNode(" ")])}},dP={name:"EraserIcon",props:{size:{type:[Number,String],default:24}},render(){const n=this.$props.size+"px",e=this.$data.attrs||{},t={width:e.width||n,height:e.height||n};return c.createVNode("svg",c.mergeProps({xmlns:"http://www.w3.org/2000/svg",class:"icon-tabler icon-tabler-eraser",width:"24",height:"24",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},t),[c.createTextVNode(" "),c.createVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null),c.createTextVNode(" "),c.createVNode("path",{d:"M19 20h-10.5l-4.21 -4.3a1 1 0 0 1 0 -1.41l10 -10a1 1 0 0 1 1.41 0l5 5a1 1 0 0 1 0 1.41l-9.2 9.3"},null),c.createTextVNode(" "),c.createVNode("path",{d:"M18 13.3l-6.3 -6.3"},null),c.createTextVNode(" ")])}},hC={name:"ExclamationCircleIcon",props:{size:{type:[Number,String],default:24}},render(){const n=this.$props.size+"px",e=this.$data.attrs||{},t={width:e.width||n,height:e.height||n};return c.createVNode("svg",c.mergeProps({xmlns:"http://www.w3.org/2000/svg",class:"icon-tabler icon-tabler-exclamation-circle",width:"24",height:"24",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},t),[c.createTextVNode(" "),c.createVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null),c.createTextVNode(" "),c.createVNode("path",{d:"M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0"},null),c.createTextVNode(" "),c.createVNode("path",{d:"M12 9v4"},null),c.createTextVNode(" "),c.createVNode("path",{d:"M12 16v.01"},null),c.createTextVNode(" ")])}},hP={name:"FilterIcon",props:{size:{type:[Number,String],default:24}},render(){const n=this.$props.size+"px",e=this.$data.attrs||{},t={width:e.width||n,height:e.height||n};return c.createVNode("svg",c.mergeProps({xmlns:"http://www.w3.org/2000/svg",class:"icon-tabler icon-tabler-filter",width:"24",height:"24",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},t),[c.createTextVNode(" "),c.createVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null),c.createTextVNode(" "),c.createVNode("path",{d:"M4 4h16v2.172a2 2 0 0 1 -.586 1.414l-4.414 4.414v7l-6 2v-8.5l-4.48 -4.928a2 2 0 0 1 -.52 -1.345v-2.227z"},null),c.createTextVNode(" ")])}},fP={name:"GripVerticalIcon",props:{size:{type:[Number,String],default:24}},render(){const n=this.$props.size+"px",e=this.$data.attrs||{},t={width:e.width||n,height:e.height||n};return c.createVNode("svg",c.mergeProps({xmlns:"http://www.w3.org/2000/svg",class:"icon-tabler icon-tabler-grip-vertical",width:"24",height:"24",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},t),[c.createTextVNode(" "),c.createVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null),c.createTextVNode(" "),c.createVNode("path",{d:"M9 5m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"},null),c.createTextVNode(" "),c.createVNode("path",{d:"M9 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"},null),c.createTextVNode(" "),c.createVNode("path",{d:"M9 19m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"},null),c.createTextVNode(" "),c.createVNode("path",{d:"M15 5m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"},null),c.createTextVNode(" "),c.createVNode("path",{d:"M15 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"},null),c.createTextVNode(" "),c.createVNode("path",{d:"M15 19m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"},null),c.createTextVNode(" ")])}},mP={name:"HierarchyIcon",props:{size:{type:[Number,String],default:24}},render(){const n=this.$props.size+"px",e=this.$data.attrs||{},t={width:e.width||n,height:e.height||n};return c.createVNode("svg",c.mergeProps({xmlns:"http://www.w3.org/2000/svg",class:"icon-tabler icon-tabler-hierarchy",width:"24",height:"24",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},t),[c.createTextVNode(" "),c.createVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null),c.createTextVNode(" "),c.createVNode("path",{d:"M12 5m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"},null),c.createTextVNode(" "),c.createVNode("path",{d:"M5 19m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"},null),c.createTextVNode(" "),c.createVNode("path",{d:"M19 19m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"},null),c.createTextVNode(" "),c.createVNode("path",{d:"M6.5 17.5l5.5 -4.5l5.5 4.5"},null),c.createTextVNode(" "),c.createVNode("path",{d:"M12 7l0 6"},null),c.createTextVNode(" ")])}},gP={name:"LayoutSidebarRightCollapseIcon",props:{size:{type:[Number,String],default:24}},render(){const n=this.$props.size+"px",e=this.$data.attrs||{},t={width:e.width||n,height:e.height||n};return c.createVNode("svg",c.mergeProps({xmlns:"http://www.w3.org/2000/svg",class:"icon-tabler icon-tabler-layout-sidebar-right-collapse",width:"24",height:"24",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},t),[c.createTextVNode(" "),c.createVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null),c.createTextVNode(" "),c.createVNode("path",{d:"M4 4m0 2a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v12a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2z"},null),c.createTextVNode(" "),c.createVNode("path",{d:"M15 4v16"},null),c.createTextVNode(" "),c.createVNode("path",{d:"M9 10l2 2l-2 2"},null),c.createTextVNode(" ")])}},pP={name:"RefreshIcon",props:{size:{type:[Number,String],default:24}},render(){const n=this.$props.size+"px",e=this.$data.attrs||{},t={width:e.width||n,height:e.height||n};return c.createVNode("svg",c.mergeProps({xmlns:"http://www.w3.org/2000/svg",class:"icon-tabler icon-tabler-refresh",width:"24",height:"24",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},t),[c.createTextVNode(" "),c.createVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null),c.createTextVNode(" "),c.createVNode("path",{d:"M20 11a8.1 8.1 0 0 0 -15.5 -2m-.5 -4v4h4"},null),c.createTextVNode(" "),c.createVNode("path",{d:"M4 13a8.1 8.1 0 0 0 15.5 2m.5 4v-4h-4"},null),c.createTextVNode(" ")])}},_P={name:"SearchIcon",props:{size:{type:[Number,String],default:24}},render(){const n=this.$props.size+"px",e=this.$data.attrs||{},t={width:e.width||n,height:e.height||n};return c.createVNode("svg",c.mergeProps({xmlns:"http://www.w3.org/2000/svg",class:"icon-tabler icon-tabler-search",width:"24",height:"24",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},t),[c.createTextVNode(" "),c.createVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null),c.createTextVNode(" "),c.createVNode("path",{d:"M10 10m-7 0a7 7 0 1 0 14 0a7 7 0 1 0 -14 0"},null),c.createTextVNode(" "),c.createVNode("path",{d:"M21 21l-6 -6"},null),c.createTextVNode(" ")])}},vP={name:"TableIcon",props:{size:{type:[Number,String],default:24}},render(){const n=this.$props.size+"px",e=this.$data.attrs||{},t={width:e.width||n,height:e.height||n};return c.createVNode("svg",c.mergeProps({xmlns:"http://www.w3.org/2000/svg",class:"icon-tabler icon-tabler-table",width:"24",height:"24",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},t),[c.createTextVNode(" "),c.createVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null),c.createTextVNode(" "),c.createVNode("path",{d:"M3 5a2 2 0 0 1 2 -2h14a2 2 0 0 1 2 2v14a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2v-14z"},null),c.createTextVNode(" "),c.createVNode("path",{d:"M3 10h18"},null),c.createTextVNode(" "),c.createVNode("path",{d:"M10 3v18"},null),c.createTextVNode(" ")])}};const yP={class:"d-flex align-center"},CP={key:1},EP={class:"ms-auto"},Vs=c.defineComponent({__name:"JDialog",props:{ddId:{},variant:{default:"global"},title:{},text:{},width:{default:"500"},reference:{type:Boolean},buttons:{type:Boolean,default:!0},scrim:{default:"background"}},emits:["onSave","onCancel"],setup(n,{emit:e}){const t=n,r=e,o=c.ref(!1),{isDialogActive:a,closeDialog:l}=Us(t.ddId);async function d(){try{await r("onCancel")}catch(f){console.error(f)}l()}async function h(){o.value=!0;try{await r("onSave")}catch(f){console.error(f)}o.value=!1,l()}return(f,g)=>(c.openBlock(),c.createElementBlock(c.Fragment,null,[f.variant==="global"?(c.openBlock(),c.createBlock(rl.VDialog,{key:0,scrim:t.scrim,width:t.width,modelValue:c.unref(a),"onUpdate:modelValue":g[0]||(g[0]=_=>c.isRef(a)?a.value=_:null),"onClick:outside":d},{default:c.withCtx(()=>[c.createVNode(xt.VCard,{rounded:"",loading:o.value},{default:c.withCtx(()=>[c.createVNode(xt.VCardTitle,{class:"mt-2 px-5 d-flex"},{default:c.withCtx(()=>[c.createElementVNode("div",yP,[f.$slots.title?c.renderSlot(f.$slots,"title",{key:0}):(c.openBlock(),c.createElementBlock("div",CP,c.toDisplayString(t.title),1))]),c.createElementVNode("div",EP,[c.renderSlot(f.$slots,"heading-actions"),c.createVNode(Ge.VBtn,{class:"ms-auto",icon:"mdi-window-close",onClick:d,variant:"plain"})])]),_:3}),c.createVNode(Ho.VDivider,{class:"mx-5"}),c.createVNode(xt.VCardText,{class:"overflow-y-scroll"},{default:c.withCtx(()=>[c.renderSlot(f.$slots,"default")]),_:3}),f.$slots.footer?(c.openBlock(),c.createElementBlock(c.Fragment,{key:0},[c.createVNode(Ho.VDivider,{class:"mx-5 mt-2"}),c.createVNode(xt.VCardActions,null,{default:c.withCtx(()=>[c.renderSlot(f.$slots,"footer")]),_:3})],64)):c.createCommentVNode("",!0),t.buttons?(c.openBlock(),c.createElementBlock(c.Fragment,{key:1},[c.createVNode(Ho.VDivider,{class:"mx-5 mt-2"}),c.createVNode(xt.VCardActions,null,{default:c.withCtx(()=>[f.$slots.metadata?(c.openBlock(),c.createBlock(qe.VCol,{key:0,cols:"auto",class:"text-sm-subtitle-2 text-medium-emphasis ma-0 pa-0"},{default:c.withCtx(()=>[c.renderSlot(f.$slots,"metadata")]),_:3})):c.createCommentVNode("",!0),c.createVNode(qe.VSpacer),c.createVNode(Ge.VBtn,{class:"j-btn-form",variant:"outlined",color:"secondary",onClick:d},{default:c.withCtx(()=>[c.createTextVNode(c.toDisplayString(f.$t("actions.cancel")),1)]),_:1}),c.createVNode(Ge.VBtn,{class:"j-btn-form",variant:"flat",color:"secondary",onClick:h,loading:o.value},{default:c.withCtx(()=>[c.createTextVNode(c.toDisplayString(f.$t("actions.save")),1)]),_:1},8,["loading"])]),_:3})],64)):c.createCommentVNode("",!0)]),_:3},8,["loading"])]),_:3},8,["scrim","width","modelValue"])):c.createCommentVNode("",!0),f.variant==="confirm"?(c.openBlock(),c.createBlock(rl.VDialog,{key:1,scrim:"background",width:t.width,modelValue:c.unref(a),"onUpdate:modelValue":g[1]||(g[1]=_=>c.isRef(a)?a.value=_:null),"onClick:outside":d},{default:c.withCtx(()=>[c.createVNode(xt.VCard,{loading:o.value,title:t.title,rounded:"","min-height":"300"},{prepend:c.withCtx(()=>[c.createVNode(c.unref(hC),{color:"rgb(var(--v-theme-secondary))"})]),append:c.withCtx(()=>[c.createVNode(Ge.VBtn,{class:"ms-auto",icon:"mdi-window-close",onClick:d,variant:"plain"})]),default:c.withCtx(()=>[c.createVNode(xt.VCardText,{class:"text-center mt-7"},{default:c.withCtx(()=>[c.createTextVNode(c.toDisplayString(t.text),1)]),_:1}),c.createVNode(xt.VCardActions,{class:"d-flex"},{default:c.withCtx(()=>[c.createVNode(Ge.VBtn,{class:"flex-grow-1",variant:"outlined",color:"secondary",onClick:d},{default:c.withCtx(()=>[c.createTextVNode(c.toDisplayString(f.$t("actions.cancel")),1)]),_:1}),c.createVNode(Ge.VBtn,{class:"flex-grow-1",variant:"flat",color:"secondary",onClick:h},{default:c.withCtx(()=>[c.createTextVNode(c.toDisplayString(f.$t("actions.confirm")),1)]),_:1})]),_:1})]),_:1},8,["loading","title"])]),_:1},8,["width","modelValue"])):c.createCommentVNode("",!0),f.variant==="empty"?(c.openBlock(),c.createBlock(rl.VDialog,{key:2,scrim:t.scrim,width:t.width,modelValue:c.unref(a),"onUpdate:modelValue":g[2]||(g[2]=_=>c.isRef(a)?a.value=_:null),"onClick:outside":d},{default:c.withCtx(()=>[c.renderSlot(f.$slots,"default")]),_:3},8,["scrim","width","modelValue"])):c.createCommentVNode("",!0)],64))}});/*!
|
11
|
+
This will fail in production.`);l=ss,l._s.has(r)||(g_(r,o,l),process.env.NODE_ENV!=="production"&&(a._pinia=l));const f=l._s.get(r);if(process.env.NODE_ENV!=="production"&&d){const g="__hot:"+r,_=g_(g,tr({},o),l,!0);d._hotUpdate(_),delete l.state.value[g],l._s.delete(g)}if(process.env.NODE_ENV!=="production"&&fi){const g=c.getCurrentInstance();if(g&&g.proxy&&!d){const _=g.proxy,p="_pStores"in _?_._pStores:_._pStores={};p[r]=f}}return f}return a.$id=r,a}const h0=d0({id:"customizer",state:()=>({Sidebar_drawer:!0,Customizer_drawer:!1,mini_sidebar:!1,setHorizontalLayout:!1,actTheme:"DarkJPLANTheme",fontTheme:"Roboto",inputBg:!1,boxed:!1}),getters:{},actions:{SET_SIDEBAR_DRAWER(){this.Sidebar_drawer=!this.Sidebar_drawer},SET_MINI_SIDEBAR(n){this.mini_sidebar=n},SET_CUSTOMIZER_DRAWER(n){this.Customizer_drawer=n},SET_LAYOUT(n){this.setHorizontalLayout=n},SET_THEME(n){this.actTheme=n},SET_FONT(n){this.fontTheme=n}}}),qi=c.ref({}),Us=n=>{const e=c.computed(()=>n?qi.value[n]||!1:qi.value.default||!1),t=()=>{n?qi.value[n]=!0:qi.value.default=!0},r=()=>{n?qi.value[n]=!1:qi.value.default=!1};return c.onUnmounted(()=>{r()}),c.onMounted(()=>{r()}),{isDialogActive:e,openDialog:t,closeDialog:r}};var f0=Object.defineProperty,p_=Object.getOwnPropertySymbols,m0=Object.prototype.hasOwnProperty,g0=Object.prototype.propertyIsEnumerable,__=(n,e,t)=>e in n?f0(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,qy=(n,e)=>{for(var t in e||(e={}))m0.call(e,t)&&__(n,t,e[t]);if(p_)for(var t of p_(e))g0.call(e,t)&&__(n,t,e[t]);return n},Hl=n=>typeof n=="function",$l=n=>typeof n=="string",jy=n=>$l(n)&&n.trim().length>0,p0=n=>typeof n=="number",mi=n=>typeof n>"u",bs=n=>typeof n=="object"&&n!==null,_0=n=>Hr(n,"tag")&&jy(n.tag),Yy=n=>window.TouchEvent&&n instanceof TouchEvent,Jy=n=>Hr(n,"component")&&Qy(n.component),v0=n=>Hl(n)||bs(n),Qy=n=>!mi(n)&&($l(n)||v0(n)||Jy(n)),v_=n=>bs(n)&&["height","width","right","left","top","bottom"].every(e=>p0(n[e])),Hr=(n,e)=>(bs(n)||Hl(n))&&e in n,y0=(n=>()=>n++)(0);function Bd(n){return Yy(n)?n.targetTouches[0].clientX:n.clientX}function y_(n){return Yy(n)?n.targetTouches[0].clientY:n.clientY}var C0=n=>{mi(n.remove)?n.parentNode&&n.parentNode.removeChild(n):n.remove()},Bs=n=>Jy(n)?Bs(n.component):_0(n)?c.defineComponent({render(){return n}}):typeof n=="string"?n:c.toRaw(c.unref(n)),E0=n=>{if(typeof n=="string")return n;const e=Hr(n,"props")&&bs(n.props)?n.props:{},t=Hr(n,"listeners")&&bs(n.listeners)?n.listeners:{};return{component:Bs(n),props:e,listeners:t}},w0=()=>typeof window<"u",Kl=class{constructor(){this.allHandlers={}}getHandlers(n){return this.allHandlers[n]||[]}on(n,e){const t=this.getHandlers(n);t.push(e),this.allHandlers[n]=t}off(n,e){const t=this.getHandlers(n);t.splice(t.indexOf(e)>>>0,1)}emit(n,e){this.getHandlers(n).forEach(r=>r(e))}},T0=n=>["on","off","emit"].every(e=>Hr(n,e)&&Hl(n[e]));exports.TYPE=void 0;(function(n){n.SUCCESS="success",n.ERROR="error",n.WARNING="warning",n.INFO="info",n.DEFAULT="default"})(exports.TYPE||(exports.TYPE={}));exports.POSITION=void 0;(function(n){n.TOP_LEFT="top-left",n.TOP_CENTER="top-center",n.TOP_RIGHT="top-right",n.BOTTOM_LEFT="bottom-left",n.BOTTOM_CENTER="bottom-center",n.BOTTOM_RIGHT="bottom-right"})(exports.POSITION||(exports.POSITION={}));var Ln;(function(n){n.ADD="add",n.DISMISS="dismiss",n.UPDATE="update",n.CLEAR="clear",n.UPDATE_DEFAULTS="update_defaults"})(Ln||(Ln={}));var vr="Vue-Toastification",_r={type:{type:String,default:exports.TYPE.DEFAULT},classNames:{type:[String,Array],default:()=>[]},trueBoolean:{type:Boolean,default:!0}},Xy={type:_r.type,customIcon:{type:[String,Boolean,Object,Function],default:!0}},cl={component:{type:[String,Object,Function,Boolean],default:"button"},classNames:_r.classNames,showOnHover:{type:Boolean,default:!1},ariaLabel:{type:String,default:"close"}},bh={timeout:{type:[Number,Boolean],default:5e3},hideProgressBar:{type:Boolean,default:!1},isRunning:{type:Boolean,default:!1}},Zy={transition:{type:[Object,String],default:`${vr}__bounce`}},b0={position:{type:String,default:exports.POSITION.TOP_RIGHT},draggable:_r.trueBoolean,draggablePercent:{type:Number,default:.6},pauseOnFocusLoss:_r.trueBoolean,pauseOnHover:_r.trueBoolean,closeOnClick:_r.trueBoolean,timeout:bh.timeout,hideProgressBar:bh.hideProgressBar,toastClassName:_r.classNames,bodyClassName:_r.classNames,icon:Xy.customIcon,closeButton:cl.component,closeButtonClassName:cl.classNames,showCloseButtonOnHover:cl.showOnHover,accessibility:{type:Object,default:()=>({toastRole:"alert",closeButtonLabel:"close"})},rtl:{type:Boolean,default:!1},eventBus:{type:Object,required:!1,default:()=>new Kl}},S0={id:{type:[String,Number],required:!0,default:0},type:_r.type,content:{type:[String,Object,Function],required:!0,default:""},onClick:{type:Function,default:void 0},onClose:{type:Function,default:void 0}},I0={container:{type:[Object,Function],default:()=>document.body},newestOnTop:_r.trueBoolean,maxToasts:{type:Number,default:20},transition:Zy.transition,toastDefaults:Object,filterBeforeCreate:{type:Function,default:n=>n},filterToasts:{type:Function,default:n=>n},containerClassName:_r.classNames,onMounted:Function,shareAppContext:[Boolean,Object]},ho={CORE_TOAST:b0,TOAST:S0,CONTAINER:I0,PROGRESS_BAR:bh,ICON:Xy,TRANSITION:Zy,CLOSE_BUTTON:cl},eC=c.defineComponent({name:"VtProgressBar",props:ho.PROGRESS_BAR,data(){return{hasClass:!0}},computed:{style(){return{animationDuration:`${this.timeout}ms`,animationPlayState:this.isRunning?"running":"paused",opacity:this.hideProgressBar?0:1}},cpClass(){return this.hasClass?`${vr}__progress-bar`:""}},watch:{timeout(){this.hasClass=!1,this.$nextTick(()=>this.hasClass=!0)}},mounted(){this.$el.addEventListener("animationend",this.animationEnded)},beforeUnmount(){this.$el.removeEventListener("animationend",this.animationEnded)},methods:{animationEnded(){this.$emit("close-toast")}}});function A0(n,e){return c.openBlock(),c.createElementBlock("div",{style:c.normalizeStyle(n.style),class:c.normalizeClass(n.cpClass)},null,6)}eC.render=A0;var k0=eC,tC=c.defineComponent({name:"VtCloseButton",props:ho.CLOSE_BUTTON,computed:{buttonComponent(){return this.component!==!1?Bs(this.component):"button"},classes(){const n=[`${vr}__close-button`];return this.showOnHover&&n.push("show-on-hover"),n.concat(this.classNames)}}}),N0=c.createTextVNode(" × ");function R0(n,e){return c.openBlock(),c.createBlock(c.resolveDynamicComponent(n.buttonComponent),c.mergeProps({"aria-label":n.ariaLabel,class:n.classes},n.$attrs),{default:c.withCtx(()=>[N0]),_:1},16,["aria-label","class"])}tC.render=R0;var O0=tC,nC={},P0={"aria-hidden":"true",focusable:"false","data-prefix":"fas","data-icon":"check-circle",class:"svg-inline--fa fa-check-circle fa-w-16",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},M0=c.createElementVNode("path",{fill:"currentColor",d:"M504 256c0 136.967-111.033 248-248 248S8 392.967 8 256 119.033 8 256 8s248 111.033 248 248zM227.314 387.314l184-184c6.248-6.248 6.248-16.379 0-22.627l-22.627-22.627c-6.248-6.249-16.379-6.249-22.628 0L216 308.118l-70.059-70.059c-6.248-6.248-16.379-6.248-22.628 0l-22.627 22.627c-6.248 6.248-6.248 16.379 0 22.627l104 104c6.249 6.249 16.379 6.249 22.628.001z"},null,-1),D0=[M0];function L0(n,e){return c.openBlock(),c.createElementBlock("svg",P0,D0)}nC.render=L0;var x0=nC,rC={},U0={"aria-hidden":"true",focusable:"false","data-prefix":"fas","data-icon":"info-circle",class:"svg-inline--fa fa-info-circle fa-w-16",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},B0=c.createElementVNode("path",{fill:"currentColor",d:"M256 8C119.043 8 8 119.083 8 256c0 136.997 111.043 248 248 248s248-111.003 248-248C504 119.083 392.957 8 256 8zm0 110c23.196 0 42 18.804 42 42s-18.804 42-42 42-42-18.804-42-42 18.804-42 42-42zm56 254c0 6.627-5.373 12-12 12h-88c-6.627 0-12-5.373-12-12v-24c0-6.627 5.373-12 12-12h12v-64h-12c-6.627 0-12-5.373-12-12v-24c0-6.627 5.373-12 12-12h64c6.627 0 12 5.373 12 12v100h12c6.627 0 12 5.373 12 12v24z"},null,-1),V0=[B0];function F0(n,e){return c.openBlock(),c.createElementBlock("svg",U0,V0)}rC.render=F0;var C_=rC,oC={},H0={"aria-hidden":"true",focusable:"false","data-prefix":"fas","data-icon":"exclamation-circle",class:"svg-inline--fa fa-exclamation-circle fa-w-16",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},$0=c.createElementVNode("path",{fill:"currentColor",d:"M504 256c0 136.997-111.043 248-248 248S8 392.997 8 256C8 119.083 119.043 8 256 8s248 111.083 248 248zm-248 50c-25.405 0-46 20.595-46 46s20.595 46 46 46 46-20.595 46-46-20.595-46-46-46zm-43.673-165.346l7.418 136c.347 6.364 5.609 11.346 11.982 11.346h48.546c6.373 0 11.635-4.982 11.982-11.346l7.418-136c.375-6.874-5.098-12.654-11.982-12.654h-63.383c-6.884 0-12.356 5.78-11.981 12.654z"},null,-1),K0=[$0];function W0(n,e){return c.openBlock(),c.createElementBlock("svg",H0,K0)}oC.render=W0;var z0=oC,iC={},G0={"aria-hidden":"true",focusable:"false","data-prefix":"fas","data-icon":"exclamation-triangle",class:"svg-inline--fa fa-exclamation-triangle fa-w-18",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 576 512"},q0=c.createElementVNode("path",{fill:"currentColor",d:"M569.517 440.013C587.975 472.007 564.806 512 527.94 512H48.054c-36.937 0-59.999-40.055-41.577-71.987L246.423 23.985c18.467-32.009 64.72-31.951 83.154 0l239.94 416.028zM288 354c-25.405 0-46 20.595-46 46s20.595 46 46 46 46-20.595 46-46-20.595-46-46-46zm-43.673-165.346l7.418 136c.347 6.364 5.609 11.346 11.982 11.346h48.546c6.373 0 11.635-4.982 11.982-11.346l7.418-136c.375-6.874-5.098-12.654-11.982-12.654h-63.383c-6.884 0-12.356 5.78-11.981 12.654z"},null,-1),j0=[q0];function Y0(n,e){return c.openBlock(),c.createElementBlock("svg",G0,j0)}iC.render=Y0;var J0=iC,aC=c.defineComponent({name:"VtIcon",props:ho.ICON,computed:{customIconChildren(){return Hr(this.customIcon,"iconChildren")?this.trimValue(this.customIcon.iconChildren):""},customIconClass(){return $l(this.customIcon)?this.trimValue(this.customIcon):Hr(this.customIcon,"iconClass")?this.trimValue(this.customIcon.iconClass):""},customIconTag(){return Hr(this.customIcon,"iconTag")?this.trimValue(this.customIcon.iconTag,"i"):"i"},hasCustomIcon(){return this.customIconClass.length>0},component(){return this.hasCustomIcon?this.customIconTag:Qy(this.customIcon)?Bs(this.customIcon):this.iconTypeComponent},iconTypeComponent(){return{[exports.TYPE.DEFAULT]:C_,[exports.TYPE.INFO]:C_,[exports.TYPE.SUCCESS]:x0,[exports.TYPE.ERROR]:J0,[exports.TYPE.WARNING]:z0}[this.type]},iconClasses(){const n=[`${vr}__icon`];return this.hasCustomIcon?n.concat(this.customIconClass):n}},methods:{trimValue(n,e=""){return jy(n)?n.trim():e}}});function Q0(n,e){return c.openBlock(),c.createBlock(c.resolveDynamicComponent(n.component),{class:c.normalizeClass(n.iconClasses)},{default:c.withCtx(()=>[c.createTextVNode(c.toDisplayString(n.customIconChildren),1)]),_:1},8,["class"])}aC.render=Q0;var X0=aC,sC=c.defineComponent({name:"VtToast",components:{ProgressBar:k0,CloseButton:O0,Icon:X0},inheritAttrs:!1,props:Object.assign({},ho.CORE_TOAST,ho.TOAST),data(){return{isRunning:!0,disableTransitions:!1,beingDragged:!1,dragStart:0,dragPos:{x:0,y:0},dragRect:{}}},computed:{classes(){const n=[`${vr}__toast`,`${vr}__toast--${this.type}`,`${this.position}`].concat(this.toastClassName);return this.disableTransitions&&n.push("disable-transition"),this.rtl&&n.push(`${vr}__toast--rtl`),n},bodyClasses(){return[`${vr}__toast-${$l(this.content)?"body":"component-body"}`].concat(this.bodyClassName)},draggableStyle(){return this.dragStart===this.dragPos.x?{}:this.beingDragged?{transform:`translateX(${this.dragDelta}px)`,opacity:1-Math.abs(this.dragDelta/this.removalDistance)}:{transition:"transform 0.2s, opacity 0.2s",transform:"translateX(0)",opacity:1}},dragDelta(){return this.beingDragged?this.dragPos.x-this.dragStart:0},removalDistance(){return v_(this.dragRect)?(this.dragRect.right-this.dragRect.left)*this.draggablePercent:0}},mounted(){this.draggable&&this.draggableSetup(),this.pauseOnFocusLoss&&this.focusSetup()},beforeUnmount(){this.draggable&&this.draggableCleanup(),this.pauseOnFocusLoss&&this.focusCleanup()},methods:{hasProp:Hr,getVueComponentFromObj:Bs,closeToast(){this.eventBus.emit(Ln.DISMISS,this.id)},clickHandler(){this.onClick&&this.onClick(this.closeToast),this.closeOnClick&&(!this.beingDragged||this.dragStart===this.dragPos.x)&&this.closeToast()},timeoutHandler(){this.closeToast()},hoverPause(){this.pauseOnHover&&(this.isRunning=!1)},hoverPlay(){this.pauseOnHover&&(this.isRunning=!0)},focusPause(){this.isRunning=!1},focusPlay(){this.isRunning=!0},focusSetup(){addEventListener("blur",this.focusPause),addEventListener("focus",this.focusPlay)},focusCleanup(){removeEventListener("blur",this.focusPause),removeEventListener("focus",this.focusPlay)},draggableSetup(){const n=this.$el;n.addEventListener("touchstart",this.onDragStart,{passive:!0}),n.addEventListener("mousedown",this.onDragStart),addEventListener("touchmove",this.onDragMove,{passive:!1}),addEventListener("mousemove",this.onDragMove),addEventListener("touchend",this.onDragEnd),addEventListener("mouseup",this.onDragEnd)},draggableCleanup(){const n=this.$el;n.removeEventListener("touchstart",this.onDragStart),n.removeEventListener("mousedown",this.onDragStart),removeEventListener("touchmove",this.onDragMove),removeEventListener("mousemove",this.onDragMove),removeEventListener("touchend",this.onDragEnd),removeEventListener("mouseup",this.onDragEnd)},onDragStart(n){this.beingDragged=!0,this.dragPos={x:Bd(n),y:y_(n)},this.dragStart=Bd(n),this.dragRect=this.$el.getBoundingClientRect()},onDragMove(n){this.beingDragged&&(n.preventDefault(),this.isRunning&&(this.isRunning=!1),this.dragPos={x:Bd(n),y:y_(n)})},onDragEnd(){this.beingDragged&&(Math.abs(this.dragDelta)>=this.removalDistance?(this.disableTransitions=!0,this.$nextTick(()=>this.closeToast())):setTimeout(()=>{this.beingDragged=!1,v_(this.dragRect)&&this.pauseOnHover&&this.dragRect.bottom>=this.dragPos.y&&this.dragPos.y>=this.dragRect.top&&this.dragRect.left<=this.dragPos.x&&this.dragPos.x<=this.dragRect.right?this.isRunning=!1:this.isRunning=!0}))}}}),Z0=["role"];function eP(n,e){const t=c.resolveComponent("Icon"),r=c.resolveComponent("CloseButton"),o=c.resolveComponent("ProgressBar");return c.openBlock(),c.createElementBlock("div",{class:c.normalizeClass(n.classes),style:c.normalizeStyle(n.draggableStyle),onClick:e[0]||(e[0]=(...a)=>n.clickHandler&&n.clickHandler(...a)),onMouseenter:e[1]||(e[1]=(...a)=>n.hoverPause&&n.hoverPause(...a)),onMouseleave:e[2]||(e[2]=(...a)=>n.hoverPlay&&n.hoverPlay(...a))},[n.icon?(c.openBlock(),c.createBlock(t,{key:0,"custom-icon":n.icon,type:n.type},null,8,["custom-icon","type"])):c.createCommentVNode("v-if",!0),c.createElementVNode("div",{role:n.accessibility.toastRole||"alert",class:c.normalizeClass(n.bodyClasses)},[typeof n.content=="string"?(c.openBlock(),c.createElementBlock(c.Fragment,{key:0},[c.createTextVNode(c.toDisplayString(n.content),1)],2112)):(c.openBlock(),c.createBlock(c.resolveDynamicComponent(n.getVueComponentFromObj(n.content)),c.mergeProps({key:1,"toast-id":n.id},n.hasProp(n.content,"props")?n.content.props:{},c.toHandlers(n.hasProp(n.content,"listeners")?n.content.listeners:{}),{onCloseToast:n.closeToast}),null,16,["toast-id","onCloseToast"]))],10,Z0),n.closeButton?(c.openBlock(),c.createBlock(r,{key:1,component:n.closeButton,"class-names":n.closeButtonClassName,"show-on-hover":n.showCloseButtonOnHover,"aria-label":n.accessibility.closeButtonLabel,onClick:c.withModifiers(n.closeToast,["stop"])},null,8,["component","class-names","show-on-hover","aria-label","onClick"])):c.createCommentVNode("v-if",!0),n.timeout?(c.openBlock(),c.createBlock(o,{key:2,"is-running":n.isRunning,"hide-progress-bar":n.hideProgressBar,timeout:n.timeout,onCloseToast:n.timeoutHandler},null,8,["is-running","hide-progress-bar","timeout","onCloseToast"])):c.createCommentVNode("v-if",!0)],38)}sC.render=eP;var tP=sC,cC=c.defineComponent({name:"VtTransition",props:ho.TRANSITION,emits:["leave"],methods:{hasProp:Hr,leave(n){n instanceof HTMLElement&&(n.style.left=n.offsetLeft+"px",n.style.top=n.offsetTop+"px",n.style.width=getComputedStyle(n).width,n.style.position="absolute")}}});function nP(n,e){return c.openBlock(),c.createBlock(c.TransitionGroup,{tag:"div","enter-active-class":n.transition.enter?n.transition.enter:`${n.transition}-enter-active`,"move-class":n.transition.move?n.transition.move:`${n.transition}-move`,"leave-active-class":n.transition.leave?n.transition.leave:`${n.transition}-leave-active`,onLeave:n.leave},{default:c.withCtx(()=>[c.renderSlot(n.$slots,"default")]),_:3},8,["enter-active-class","move-class","leave-active-class","onLeave"])}cC.render=nP;var rP=cC,lC=c.defineComponent({name:"VueToastification",devtools:{hide:!0},components:{Toast:tP,VtTransition:rP},props:Object.assign({},ho.CORE_TOAST,ho.CONTAINER,ho.TRANSITION),data(){return{count:0,positions:Object.values(exports.POSITION),toasts:{},defaults:{}}},computed:{toastArray(){return Object.values(this.toasts)},filteredToasts(){return this.defaults.filterToasts(this.toastArray)}},beforeMount(){const n=this.eventBus;n.on(Ln.ADD,this.addToast),n.on(Ln.CLEAR,this.clearToasts),n.on(Ln.DISMISS,this.dismissToast),n.on(Ln.UPDATE,this.updateToast),n.on(Ln.UPDATE_DEFAULTS,this.updateDefaults),this.defaults=this.$props},mounted(){this.setup(this.container)},methods:{async setup(n){Hl(n)&&(n=await n()),C0(this.$el),n.appendChild(this.$el)},setToast(n){mi(n.id)||(this.toasts[n.id]=n)},addToast(n){n.content=E0(n.content);const e=Object.assign({},this.defaults,n.type&&this.defaults.toastDefaults&&this.defaults.toastDefaults[n.type],n),t=this.defaults.filterBeforeCreate(e,this.toastArray);t&&this.setToast(t)},dismissToast(n){const e=this.toasts[n];!mi(e)&&!mi(e.onClose)&&e.onClose(),delete this.toasts[n]},clearToasts(){Object.keys(this.toasts).forEach(n=>{this.dismissToast(n)})},getPositionToasts(n){const e=this.filteredToasts.filter(t=>t.position===n).slice(0,this.defaults.maxToasts);return this.defaults.newestOnTop?e.reverse():e},updateDefaults(n){mi(n.container)||this.setup(n.container),this.defaults=Object.assign({},this.defaults,n)},updateToast({id:n,options:e,create:t}){this.toasts[n]?(e.timeout&&e.timeout===this.toasts[n].timeout&&e.timeout++,this.setToast(Object.assign({},this.toasts[n],e))):t&&this.addToast(Object.assign({},{id:n},e))},getClasses(n){return[`${vr}__container`,n].concat(this.defaults.containerClassName)}}});function oP(n,e){const t=c.resolveComponent("Toast"),r=c.resolveComponent("VtTransition");return c.openBlock(),c.createElementBlock("div",null,[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(n.positions,o=>(c.openBlock(),c.createElementBlock("div",{key:o},[c.createVNode(r,{transition:n.defaults.transition,class:c.normalizeClass(n.getClasses(o))},{default:c.withCtx(()=>[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(n.getPositionToasts(o),a=>(c.openBlock(),c.createBlock(t,c.mergeProps({key:a.id},a),null,16))),128))]),_:2},1032,["transition","class"])]))),128))])}lC.render=oP;var iP=lC,E_=(n={},e=!0)=>{const t=n.eventBus=n.eventBus||new Kl;e&&c.nextTick(()=>{const a=c.createApp(iP,qy({},n)),l=a.mount(document.createElement("div")),d=n.onMounted;if(mi(d)||d(l,a),n.shareAppContext){const h=n.shareAppContext;h===!0?console.warn(`[${vr}] App to share context with was not provided.`):(a._context.components=h._context.components,a._context.directives=h._context.directives,a._context.mixins=h._context.mixins,a._context.provides=h._context.provides,a.config.globalProperties=h.config.globalProperties)}});const r=(a,l)=>{const d=Object.assign({},{id:y0(),type:exports.TYPE.DEFAULT},l,{content:a});return t.emit(Ln.ADD,d),d.id};r.clear=()=>t.emit(Ln.CLEAR,void 0),r.updateDefaults=a=>{t.emit(Ln.UPDATE_DEFAULTS,a)},r.dismiss=a=>{t.emit(Ln.DISMISS,a)};function o(a,{content:l,options:d},h=!1){const f=Object.assign({},d,{content:l});t.emit(Ln.UPDATE,{id:a,options:f,create:h})}return r.update=o,r.success=(a,l)=>r(a,Object.assign({},l,{type:exports.TYPE.SUCCESS})),r.info=(a,l)=>r(a,Object.assign({},l,{type:exports.TYPE.INFO})),r.error=(a,l)=>r(a,Object.assign({},l,{type:exports.TYPE.ERROR})),r.warning=(a,l)=>r(a,Object.assign({},l,{type:exports.TYPE.WARNING})),r},aP=()=>{const n=()=>console.warn(`[${vr}] This plugin does not support SSR!`);return new Proxy(n,{get(){return n}})};function Ss(n){return w0()?T0(n)?E_({eventBus:n},!1):E_(n,!0):aP()}var Wl=Symbol("VueToastification"),Ef=new Kl,sP=(n,e)=>{(e==null?void 0:e.shareAppContext)===!0&&(e.shareAppContext=n);const t=Ss(qy({eventBus:Ef},e));n.provide(Wl,t)},cP=n=>{const e=Ss(n);c.getCurrentInstance()&&c.provide(Wl,e)},sr=n=>{if(n)return Ss(n);const e=c.getCurrentInstance()?c.inject(Wl,void 0):void 0;return e||Ss(Ef)},lP=sP;const rs=c.ref([]),os=c.ref([]);function uC(){const n=sr();function e(g,_,p={}){n[g](_),os.value.push({id:crypto.randomUUID(),read:!1,type:g,message:_,timestamp:new Date,meta:{url:p.url||"",method:p.method||"",status:p.status||0}})}function t(g,_){n[g](_),rs.value.push({id:crypto.randomUUID(),read:!1,type:g,message:_,timestamp:new Date})}const r={server:{success:(g,_)=>e("success",g,_),error:(g,_)=>e("error",g,_),warning:(g,_)=>e("warning",g,_),info:(g,_)=>e("info",g)},client:{success:g=>t("success",g),error:g=>t("error",g),warning:g=>t("warning",g),info:g=>t("info",g)}};function o(){return rs.value.filter(g=>!g.read)}function a(){return os.value.filter(g=>!g.read)}function l(){return[...o(),...a()].sort((g,_)=>_.timestamp.getTime()-g.timestamp.getTime())}function d(){return o().length+a().length}function h(g){const _=rs.value.find(p=>p.id===g)||os.value.find(p=>p.id===g);_&&(_.read=!0)}function f(){rs.value.forEach(g=>g.read=!0),os.value.forEach(g=>g.read=!0)}return{client:rs,server:os,toast:r,getUnreadClient:o,getUnreadServer:a,getNewNotifications:l,getUnreadCount:d,markAsRead:h,markAllAsRead:f}}const ve=c.ref(!1);var dC={name:"CircleOffIcon",props:{size:{type:[Number,String],default:24}},render(){const n=this.$props.size+"px",e=this.$data.attrs||{},t={width:e.width||n,height:e.height||n};return c.createVNode("svg",c.mergeProps({xmlns:"http://www.w3.org/2000/svg",class:"icon-tabler icon-tabler-circle-off",width:"24",height:"24",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},t),[c.createTextVNode(" "),c.createVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null),c.createTextVNode(" "),c.createVNode("path",{d:"M20.042 16.045a9 9 0 0 0 -12.087 -12.087m-2.318 1.677a9 9 0 1 0 12.725 12.73"},null),c.createTextVNode(" "),c.createVNode("path",{d:"M3 3l18 18"},null),c.createTextVNode(" ")])}},uP={name:"DotsVerticalIcon",props:{size:{type:[Number,String],default:24}},render(){const n=this.$props.size+"px",e=this.$data.attrs||{},t={width:e.width||n,height:e.height||n};return c.createVNode("svg",c.mergeProps({xmlns:"http://www.w3.org/2000/svg",class:"icon-tabler icon-tabler-dots-vertical",width:"24",height:"24",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},t),[c.createTextVNode(" "),c.createVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null),c.createTextVNode(" "),c.createVNode("path",{d:"M12 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"},null),c.createTextVNode(" "),c.createVNode("path",{d:"M12 19m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"},null),c.createTextVNode(" "),c.createVNode("path",{d:"M12 5m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"},null),c.createTextVNode(" ")])}},dP={name:"DotsIcon",props:{size:{type:[Number,String],default:24}},render(){const n=this.$props.size+"px",e=this.$data.attrs||{},t={width:e.width||n,height:e.height||n};return c.createVNode("svg",c.mergeProps({xmlns:"http://www.w3.org/2000/svg",class:"icon-tabler icon-tabler-dots",width:"24",height:"24",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},t),[c.createTextVNode(" "),c.createVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null),c.createTextVNode(" "),c.createVNode("path",{d:"M5 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"},null),c.createTextVNode(" "),c.createVNode("path",{d:"M12 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"},null),c.createTextVNode(" "),c.createVNode("path",{d:"M19 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"},null),c.createTextVNode(" ")])}},hP={name:"EraserIcon",props:{size:{type:[Number,String],default:24}},render(){const n=this.$props.size+"px",e=this.$data.attrs||{},t={width:e.width||n,height:e.height||n};return c.createVNode("svg",c.mergeProps({xmlns:"http://www.w3.org/2000/svg",class:"icon-tabler icon-tabler-eraser",width:"24",height:"24",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},t),[c.createTextVNode(" "),c.createVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null),c.createTextVNode(" "),c.createVNode("path",{d:"M19 20h-10.5l-4.21 -4.3a1 1 0 0 1 0 -1.41l10 -10a1 1 0 0 1 1.41 0l5 5a1 1 0 0 1 0 1.41l-9.2 9.3"},null),c.createTextVNode(" "),c.createVNode("path",{d:"M18 13.3l-6.3 -6.3"},null),c.createTextVNode(" ")])}},hC={name:"ExclamationCircleIcon",props:{size:{type:[Number,String],default:24}},render(){const n=this.$props.size+"px",e=this.$data.attrs||{},t={width:e.width||n,height:e.height||n};return c.createVNode("svg",c.mergeProps({xmlns:"http://www.w3.org/2000/svg",class:"icon-tabler icon-tabler-exclamation-circle",width:"24",height:"24",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},t),[c.createTextVNode(" "),c.createVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null),c.createTextVNode(" "),c.createVNode("path",{d:"M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0"},null),c.createTextVNode(" "),c.createVNode("path",{d:"M12 9v4"},null),c.createTextVNode(" "),c.createVNode("path",{d:"M12 16v.01"},null),c.createTextVNode(" ")])}},fP={name:"FilterIcon",props:{size:{type:[Number,String],default:24}},render(){const n=this.$props.size+"px",e=this.$data.attrs||{},t={width:e.width||n,height:e.height||n};return c.createVNode("svg",c.mergeProps({xmlns:"http://www.w3.org/2000/svg",class:"icon-tabler icon-tabler-filter",width:"24",height:"24",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},t),[c.createTextVNode(" "),c.createVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null),c.createTextVNode(" "),c.createVNode("path",{d:"M4 4h16v2.172a2 2 0 0 1 -.586 1.414l-4.414 4.414v7l-6 2v-8.5l-4.48 -4.928a2 2 0 0 1 -.52 -1.345v-2.227z"},null),c.createTextVNode(" ")])}},mP={name:"GripVerticalIcon",props:{size:{type:[Number,String],default:24}},render(){const n=this.$props.size+"px",e=this.$data.attrs||{},t={width:e.width||n,height:e.height||n};return c.createVNode("svg",c.mergeProps({xmlns:"http://www.w3.org/2000/svg",class:"icon-tabler icon-tabler-grip-vertical",width:"24",height:"24",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},t),[c.createTextVNode(" "),c.createVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null),c.createTextVNode(" "),c.createVNode("path",{d:"M9 5m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"},null),c.createTextVNode(" "),c.createVNode("path",{d:"M9 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"},null),c.createTextVNode(" "),c.createVNode("path",{d:"M9 19m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"},null),c.createTextVNode(" "),c.createVNode("path",{d:"M15 5m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"},null),c.createTextVNode(" "),c.createVNode("path",{d:"M15 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"},null),c.createTextVNode(" "),c.createVNode("path",{d:"M15 19m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"},null),c.createTextVNode(" ")])}},gP={name:"HierarchyIcon",props:{size:{type:[Number,String],default:24}},render(){const n=this.$props.size+"px",e=this.$data.attrs||{},t={width:e.width||n,height:e.height||n};return c.createVNode("svg",c.mergeProps({xmlns:"http://www.w3.org/2000/svg",class:"icon-tabler icon-tabler-hierarchy",width:"24",height:"24",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},t),[c.createTextVNode(" "),c.createVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null),c.createTextVNode(" "),c.createVNode("path",{d:"M12 5m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"},null),c.createTextVNode(" "),c.createVNode("path",{d:"M5 19m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"},null),c.createTextVNode(" "),c.createVNode("path",{d:"M19 19m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"},null),c.createTextVNode(" "),c.createVNode("path",{d:"M6.5 17.5l5.5 -4.5l5.5 4.5"},null),c.createTextVNode(" "),c.createVNode("path",{d:"M12 7l0 6"},null),c.createTextVNode(" ")])}},pP={name:"LayoutSidebarRightCollapseIcon",props:{size:{type:[Number,String],default:24}},render(){const n=this.$props.size+"px",e=this.$data.attrs||{},t={width:e.width||n,height:e.height||n};return c.createVNode("svg",c.mergeProps({xmlns:"http://www.w3.org/2000/svg",class:"icon-tabler icon-tabler-layout-sidebar-right-collapse",width:"24",height:"24",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},t),[c.createTextVNode(" "),c.createVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null),c.createTextVNode(" "),c.createVNode("path",{d:"M4 4m0 2a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v12a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2z"},null),c.createTextVNode(" "),c.createVNode("path",{d:"M15 4v16"},null),c.createTextVNode(" "),c.createVNode("path",{d:"M9 10l2 2l-2 2"},null),c.createTextVNode(" ")])}},_P={name:"RefreshIcon",props:{size:{type:[Number,String],default:24}},render(){const n=this.$props.size+"px",e=this.$data.attrs||{},t={width:e.width||n,height:e.height||n};return c.createVNode("svg",c.mergeProps({xmlns:"http://www.w3.org/2000/svg",class:"icon-tabler icon-tabler-refresh",width:"24",height:"24",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},t),[c.createTextVNode(" "),c.createVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null),c.createTextVNode(" "),c.createVNode("path",{d:"M20 11a8.1 8.1 0 0 0 -15.5 -2m-.5 -4v4h4"},null),c.createTextVNode(" "),c.createVNode("path",{d:"M4 13a8.1 8.1 0 0 0 15.5 2m.5 4v-4h-4"},null),c.createTextVNode(" ")])}},vP={name:"SearchIcon",props:{size:{type:[Number,String],default:24}},render(){const n=this.$props.size+"px",e=this.$data.attrs||{},t={width:e.width||n,height:e.height||n};return c.createVNode("svg",c.mergeProps({xmlns:"http://www.w3.org/2000/svg",class:"icon-tabler icon-tabler-search",width:"24",height:"24",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},t),[c.createTextVNode(" "),c.createVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null),c.createTextVNode(" "),c.createVNode("path",{d:"M10 10m-7 0a7 7 0 1 0 14 0a7 7 0 1 0 -14 0"},null),c.createTextVNode(" "),c.createVNode("path",{d:"M21 21l-6 -6"},null),c.createTextVNode(" ")])}},yP={name:"TableIcon",props:{size:{type:[Number,String],default:24}},render(){const n=this.$props.size+"px",e=this.$data.attrs||{},t={width:e.width||n,height:e.height||n};return c.createVNode("svg",c.mergeProps({xmlns:"http://www.w3.org/2000/svg",class:"icon-tabler icon-tabler-table",width:"24",height:"24",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},t),[c.createTextVNode(" "),c.createVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null),c.createTextVNode(" "),c.createVNode("path",{d:"M3 5a2 2 0 0 1 2 -2h14a2 2 0 0 1 2 2v14a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2v-14z"},null),c.createTextVNode(" "),c.createVNode("path",{d:"M3 10h18"},null),c.createTextVNode(" "),c.createVNode("path",{d:"M10 3v18"},null),c.createTextVNode(" ")])}};const CP={class:"d-flex align-center"},EP={key:1},wP={class:"ms-auto"},Vs=c.defineComponent({__name:"JDialog",props:{ddId:{},variant:{default:"global"},title:{},text:{},width:{default:"500"},reference:{type:Boolean},buttons:{type:Boolean,default:!0},scrim:{default:"background"}},emits:["onSave","onCancel"],setup(n,{emit:e}){const t=n,r=e,o=c.ref(!1),{isDialogActive:a,closeDialog:l}=Us(t.ddId);async function d(){try{await r("onCancel")}catch(f){console.error(f)}l()}async function h(){o.value=!0;try{await r("onSave")}catch(f){console.error(f)}o.value=!1,l()}return(f,g)=>(c.openBlock(),c.createElementBlock(c.Fragment,null,[f.variant==="global"?(c.openBlock(),c.createBlock(rl.VDialog,{key:0,scrim:t.scrim,width:t.width,modelValue:c.unref(a),"onUpdate:modelValue":g[0]||(g[0]=_=>c.isRef(a)?a.value=_:null),"onClick:outside":d},{default:c.withCtx(()=>[c.createVNode(xt.VCard,{rounded:"",loading:o.value},{default:c.withCtx(()=>[c.createVNode(xt.VCardTitle,{class:"mt-2 px-5 d-flex"},{default:c.withCtx(()=>[c.createElementVNode("div",CP,[f.$slots.title?c.renderSlot(f.$slots,"title",{key:0}):(c.openBlock(),c.createElementBlock("div",EP,c.toDisplayString(t.title),1))]),c.createElementVNode("div",wP,[c.renderSlot(f.$slots,"heading-actions"),c.createVNode(Ge.VBtn,{class:"ms-auto",icon:"mdi-window-close",onClick:d,variant:"plain"})])]),_:3}),c.createVNode(Ho.VDivider,{class:"mx-5"}),c.createVNode(xt.VCardText,{class:"overflow-y-scroll"},{default:c.withCtx(()=>[c.renderSlot(f.$slots,"default")]),_:3}),f.$slots.footer?(c.openBlock(),c.createElementBlock(c.Fragment,{key:0},[c.createVNode(Ho.VDivider,{class:"mx-5 mt-2"}),c.createVNode(xt.VCardActions,null,{default:c.withCtx(()=>[c.renderSlot(f.$slots,"footer")]),_:3})],64)):c.createCommentVNode("",!0),t.buttons?(c.openBlock(),c.createElementBlock(c.Fragment,{key:1},[c.createVNode(Ho.VDivider,{class:"mx-5 mt-2"}),c.createVNode(xt.VCardActions,null,{default:c.withCtx(()=>[f.$slots.metadata?(c.openBlock(),c.createBlock(qe.VCol,{key:0,cols:"auto",class:"text-sm-subtitle-2 text-medium-emphasis ma-0 pa-0"},{default:c.withCtx(()=>[c.renderSlot(f.$slots,"metadata")]),_:3})):c.createCommentVNode("",!0),c.createVNode(qe.VSpacer),c.createVNode(Ge.VBtn,{class:"j-btn-form",variant:"outlined",color:"secondary",onClick:d},{default:c.withCtx(()=>[c.createTextVNode(c.toDisplayString(f.$t("actions.cancel")),1)]),_:1}),c.createVNode(Ge.VBtn,{class:"j-btn-form",variant:"flat",color:"secondary",onClick:h,loading:o.value},{default:c.withCtx(()=>[c.createTextVNode(c.toDisplayString(f.$t("actions.save")),1)]),_:1},8,["loading"])]),_:3})],64)):c.createCommentVNode("",!0)]),_:3},8,["loading"])]),_:3},8,["scrim","width","modelValue"])):c.createCommentVNode("",!0),f.variant==="confirm"?(c.openBlock(),c.createBlock(rl.VDialog,{key:1,scrim:"background",width:t.width,modelValue:c.unref(a),"onUpdate:modelValue":g[1]||(g[1]=_=>c.isRef(a)?a.value=_:null),"onClick:outside":d},{default:c.withCtx(()=>[c.createVNode(xt.VCard,{loading:o.value,title:t.title,rounded:"","min-height":"300"},{prepend:c.withCtx(()=>[c.createVNode(c.unref(hC),{color:"rgb(var(--v-theme-secondary))"})]),append:c.withCtx(()=>[c.createVNode(Ge.VBtn,{class:"ms-auto",icon:"mdi-window-close",onClick:d,variant:"plain"})]),default:c.withCtx(()=>[c.createVNode(xt.VCardText,{class:"text-center mt-7"},{default:c.withCtx(()=>[c.createTextVNode(c.toDisplayString(t.text),1)]),_:1}),c.createVNode(xt.VCardActions,{class:"d-flex"},{default:c.withCtx(()=>[c.createVNode(Ge.VBtn,{class:"flex-grow-1",variant:"outlined",color:"secondary",onClick:d},{default:c.withCtx(()=>[c.createTextVNode(c.toDisplayString(f.$t("actions.cancel")),1)]),_:1}),c.createVNode(Ge.VBtn,{class:"flex-grow-1",variant:"flat",color:"secondary",onClick:h},{default:c.withCtx(()=>[c.createTextVNode(c.toDisplayString(f.$t("actions.confirm")),1)]),_:1})]),_:1})]),_:1},8,["loading","title"])]),_:1},8,["width","modelValue"])):c.createCommentVNode("",!0),f.variant==="empty"?(c.openBlock(),c.createBlock(rl.VDialog,{key:2,scrim:t.scrim,width:t.width,modelValue:c.unref(a),"onUpdate:modelValue":g[2]||(g[2]=_=>c.isRef(a)?a.value=_:null),"onClick:outside":d},{default:c.withCtx(()=>[c.renderSlot(f.$slots,"default")]),_:3},8,["scrim","width","modelValue"])):c.createCommentVNode("",!0)],64))}});/*!
|
12
12
|
* shared v11.1.3
|
13
13
|
* (c) 2025 kazuya kawaguchi
|
14
14
|
* Released under the MIT License.
|
15
|
-
*/const wr=typeof window<"u";let Un,
|
16
|
-
`)}function Go(n,e){typeof console<"u"&&(console.warn("[intlify] "+n),e&&console.warn(e.stack))}const
|
15
|
+
*/const wr=typeof window<"u";let Un,Ci;if(process.env.NODE_ENV!=="production"){const n=wr&&window.performance;n&&n.mark&&n.measure&&n.clearMarks&&n.clearMeasures&&(Un=e=>{n.mark(e)},Ci=(e,t,r)=>{n.measure(e,t,r),n.clearMarks(t),n.clearMarks(r)})}const TP=/\{([0-9a-zA-Z]+)\}/g;function zl(n,...e){return e.length===1&&Le(e[0])&&(e=e[0]),(!e||!e.hasOwnProperty)&&(e={}),n.replace(TP,(t,r)=>e.hasOwnProperty(r)?e[r]:"")}const Gr=(n,e=!1)=>e?Symbol.for(n):Symbol(n),bP=(n,e,t)=>SP({l:n,k:e,s:t}),SP=n=>JSON.stringify(n).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029").replace(/\u0027/g,"\\u0027"),Tt=n=>typeof n=="number"&&isFinite(n),IP=n=>wf(n)==="[object Date]",wa=n=>wf(n)==="[object RegExp]",Gl=n=>ke(n)&&Object.keys(n).length===0,Ot=Object.assign,AP=Object.create,Ye=(n=null)=>AP(n);let w_;const gi=()=>w_||(w_=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:Ye());function T_(n){return n.replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}const kP=Object.prototype.hasOwnProperty;function yr(n,e){return kP.call(n,e)}const vt=Array.isArray,Xe=n=>typeof n=="function",ne=n=>typeof n=="string",Ue=n=>typeof n=="boolean",Le=n=>n!==null&&typeof n=="object",NP=n=>Le(n)&&Xe(n.then)&&Xe(n.catch),fC=Object.prototype.toString,wf=n=>fC.call(n),ke=n=>wf(n)==="[object Object]",RP=n=>n==null?"":vt(n)||ke(n)&&n.toString===fC?JSON.stringify(n,null,2):String(n);function Tf(n,e=""){return n.reduce((t,r,o)=>o===0?t+r:t+e+r,"")}const b_=2;function OP(n,e=0,t=n.length){const r=n.split(/\r?\n/);let o=0;const a=[];for(let l=0;l<r.length;l++)if(o+=r[l].length+1,o>=e){for(let d=l-b_;d<=l+b_||t>o;d++){if(d<0||d>=r.length)continue;const h=d+1;a.push(`${h}${" ".repeat(3-String(h).length)}| ${r[d]}`);const f=r[d].length;if(d===l){const g=e-(o-f)+1,_=Math.max(1,t>o?f-g:t-e);a.push(" | "+" ".repeat(g)+"^".repeat(_))}else if(d>l){if(t>o){const g=Math.max(Math.min(t-o,f),1);a.push(" | "+"^".repeat(g))}o+=f+1}}break}return a.join(`
|
16
|
+
`)}function Go(n,e){typeof console<"u"&&(console.warn("[intlify] "+n),e&&console.warn(e.stack))}const S_={};function bf(n){S_[n]||(S_[n]=!0,Go(n))}function Sf(){const n=new Map;return{events:n,on(t,r){const o=n.get(t);o&&o.push(r)||n.set(t,[r])},off(t,r){const o=n.get(t);o&&o.splice(o.indexOf(r)>>>0,1)},emit(t,r){(n.get(t)||[]).slice().map(o=>o(r)),(n.get("*")||[]).slice().map(o=>o(t,r))}}}const Bc=n=>!Le(n)||vt(n);function ll(n,e){if(Bc(n)||Bc(e))throw new Error("Invalid value");const t=[{src:n,des:e}];for(;t.length;){const{src:r,des:o}=t.pop();Object.keys(r).forEach(a=>{a!=="__proto__"&&(Le(r[a])&&!Le(o[a])&&(o[a]=Array.isArray(r[a])?[]:Ye()),Bc(o[a])||Bc(r[a])?o[a]=r[a]:t.push({src:r[a],des:o[a]}))})}}/*!
|
17
17
|
* message-compiler v11.1.3
|
18
18
|
* (c) 2025 kazuya kawaguchi
|
19
19
|
* Released under the MIT License.
|
20
|
-
*/function
|
21
|
-
`,BP="\u2028",VP="\u2029";function FP(n){const e=n;let t=0,r=1,o=1,a=0;const l=M=>e[M]===UP&&e[M+1]===un,d=M=>e[M]===un,h=M=>e[M]===VP,f=M=>e[M]===BP,g=M=>l(M)||d(M)||h(M)||f(M),_=()=>t,p=()=>r,w=()=>o,C=()=>a,T=M=>l(M)||h(M)||f(M)?un:e[M],k=()=>T(t),I=()=>T(t+a);function N(){return a=0,g(t)&&(r++,o=0),l(t)&&t++,t++,o++,e[t]}function D(){return l(t+a)&&a++,a++,e[t+a]}function L(){t=0,r=1,o=1,a=0}function K(M=0){a=M}function q(){const M=t+a;for(;M!==t;)N();a=0}return{index:_,line:p,column:w,peekOffset:C,charAt:T,currentChar:k,currentPeek:I,next:N,peek:D,reset:L,resetPeek:K,skipToPeek:q}}const Ro=void 0,HP=".",S_="'",$P="tokenizer";function KP(n,e={}){const t=e.location!==!1,r=FP(n),o=()=>r.index(),a=()=>OP(r.line(),r.column(),r.index()),l=a(),d=o(),h={currentType:13,offset:d,startLoc:l,endLoc:l,lastType:13,lastOffset:d,lastStartLoc:l,lastEndLoc:l,braceNest:0,inLinked:!1,text:""},f=()=>h,{onError:g}=e;function _(A,R,G,...oe){const Je=f();if(R.column+=G,R.offset+=G,g){const et=t?Ih(Je.startLoc,R):null,Me=Na(A,et,{domain:$P,args:oe});g(Me)}}function p(A,R,G){A.endLoc=a(),A.currentType=R;const oe={type:R};return t&&(oe.loc=Ih(A.startLoc,A.endLoc)),G!=null&&(oe.value=G),oe}const w=A=>p(A,13);function C(A,R){return A.currentChar()===R?(A.next(),R):(_(ye.EXPECTED_TOKEN,a(),0,R),"")}function T(A){let R="";for(;A.currentPeek()===oo||A.currentPeek()===un;)R+=A.currentPeek(),A.peek();return R}function k(A){const R=T(A);return A.skipToPeek(),R}function I(A){if(A===Ro)return!1;const R=A.charCodeAt(0);return R>=97&&R<=122||R>=65&&R<=90||R===95}function N(A){if(A===Ro)return!1;const R=A.charCodeAt(0);return R>=48&&R<=57}function D(A,R){const{currentType:G}=R;if(G!==2)return!1;T(A);const oe=I(A.currentPeek());return A.resetPeek(),oe}function L(A,R){const{currentType:G}=R;if(G!==2)return!1;T(A);const oe=A.currentPeek()==="-"?A.peek():A.currentPeek(),Je=N(oe);return A.resetPeek(),Je}function K(A,R){const{currentType:G}=R;if(G!==2)return!1;T(A);const oe=A.currentPeek()===S_;return A.resetPeek(),oe}function q(A,R){const{currentType:G}=R;if(G!==7)return!1;T(A);const oe=A.currentPeek()===".";return A.resetPeek(),oe}function M(A,R){const{currentType:G}=R;if(G!==8)return!1;T(A);const oe=I(A.currentPeek());return A.resetPeek(),oe}function ce(A,R){const{currentType:G}=R;if(!(G===7||G===11))return!1;T(A);const oe=A.currentPeek()===":";return A.resetPeek(),oe}function ae(A,R){const{currentType:G}=R;if(G!==9)return!1;const oe=()=>{const et=A.currentPeek();return et==="{"?I(A.peek()):et==="@"||et==="|"||et===":"||et==="."||et===oo||!et?!1:et===un?(A.peek(),oe()):ee(A,!1)},Je=oe();return A.resetPeek(),Je}function X(A){T(A);const R=A.currentPeek()==="|";return A.resetPeek(),R}function ee(A,R=!0){const G=(Je=!1,et="")=>{const Me=A.currentPeek();return Me==="{"||Me==="@"||!Me?Je:Me==="|"?!(et===oo||et===un):Me===oo?(A.peek(),G(!0,oo)):Me===un?(A.peek(),G(!0,un)):!0},oe=G();return R&&A.resetPeek(),oe}function ue(A,R){const G=A.currentChar();return G===Ro?Ro:R(G)?(A.next(),G):null}function Be(A){const R=A.charCodeAt(0);return R>=97&&R<=122||R>=65&&R<=90||R>=48&&R<=57||R===95||R===36}function Ct(A){return ue(A,Be)}function rn(A){const R=A.charCodeAt(0);return R>=97&&R<=122||R>=65&&R<=90||R>=48&&R<=57||R===95||R===36||R===45}function qt(A){return ue(A,rn)}function Mt(A){const R=A.charCodeAt(0);return R>=48&&R<=57}function at(A){return ue(A,Mt)}function Et(A){const R=A.charCodeAt(0);return R>=48&&R<=57||R>=65&&R<=70||R>=97&&R<=102}function on(A){return ue(A,Et)}function St(A){let R="",G="";for(;R=at(A);)G+=R;return G}function Yo(A){let R="";for(;;){const G=A.currentChar();if(G==="{"||G==="}"||G==="@"||G==="|"||!G)break;if(G===oo||G===un)if(ee(A))R+=G,A.next();else{if(X(A))break;R+=G,A.next()}else R+=G,A.next()}return R}function Ua(A){k(A);let R="",G="";for(;R=qt(A);)G+=R;return A.currentChar()===Ro&&_(ye.UNTERMINATED_CLOSING_BRACE,a(),0),G}function Ba(A){k(A);let R="";return A.currentChar()==="-"?(A.next(),R+=`-${St(A)}`):R+=St(A),A.currentChar()===Ro&&_(ye.UNTERMINATED_CLOSING_BRACE,a(),0),R}function Sr(A){return A!==S_&&A!==un}function Jo(A){k(A),C(A,"'");let R="",G="";for(;R=ue(A,Sr);)R==="\\"?G+=Va(A):G+=R;const oe=A.currentChar();return oe===un||oe===Ro?(_(ye.UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER,a(),0),oe===un&&(A.next(),C(A,"'")),G):(C(A,"'"),G)}function Va(A){const R=A.currentChar();switch(R){case"\\":case"'":return A.next(),`\\${R}`;case"u":return Ar(A,R,4);case"U":return Ar(A,R,6);default:return _(ye.UNKNOWN_ESCAPE_SEQUENCE,a(),0,R),""}}function Ar(A,R,G){C(A,R);let oe="";for(let Je=0;Je<G;Je++){const et=on(A);if(!et){_(ye.INVALID_UNICODE_ESCAPE_SEQUENCE,a(),0,`\\${R}${oe}${A.currentChar()}`);break}oe+=et}return`\\${R}${oe}`}function qr(A){return A!=="{"&&A!=="}"&&A!==oo&&A!==un}function Fa(A){k(A);let R="",G="";for(;R=ue(A,qr);)G+=R;return G}function _o(A){let R="",G="";for(;R=Ct(A);)G+=R;return G}function vo(A){const R=G=>{const oe=A.currentChar();return oe==="{"||oe==="@"||oe==="|"||oe==="("||oe===")"||!oe||oe===oo?G:(G+=oe,A.next(),R(G))};return R("")}function yo(A){k(A);const R=C(A,"|");return k(A),R}function Vt(A,R){let G=null;switch(A.currentChar()){case"{":return R.braceNest>=1&&_(ye.NOT_ALLOW_NEST_PLACEHOLDER,a(),0),A.next(),G=p(R,2,"{"),k(A),R.braceNest++,G;case"}":return R.braceNest>0&&R.currentType===2&&_(ye.EMPTY_PLACEHOLDER,a(),0),A.next(),G=p(R,3,"}"),R.braceNest--,R.braceNest>0&&k(A),R.inLinked&&R.braceNest===0&&(R.inLinked=!1),G;case"@":return R.braceNest>0&&_(ye.UNTERMINATED_CLOSING_BRACE,a(),0),G=En(A,R)||w(R),R.braceNest=0,G;default:{let Je=!0,et=!0,Me=!0;if(X(A))return R.braceNest>0&&_(ye.UNTERMINATED_CLOSING_BRACE,a(),0),G=p(R,1,yo(A)),R.braceNest=0,R.inLinked=!1,G;if(R.braceNest>0&&(R.currentType===4||R.currentType===5||R.currentType===6))return _(ye.UNTERMINATED_CLOSING_BRACE,a(),0),R.braceNest=0,Qo(A,R);if(Je=D(A,R))return G=p(R,4,Ua(A)),k(A),G;if(et=L(A,R))return G=p(R,5,Ba(A)),k(A),G;if(Me=K(A,R))return G=p(R,6,Jo(A)),k(A),G;if(!Je&&!et&&!Me)return G=p(R,12,Fa(A)),_(ye.INVALID_TOKEN_IN_PLACEHOLDER,a(),0,G.value),k(A),G;break}}return G}function En(A,R){const{currentType:G}=R;let oe=null;const Je=A.currentChar();switch((G===7||G===8||G===11||G===9)&&(Je===un||Je===oo)&&_(ye.INVALID_LINKED_FORMAT,a(),0),Je){case"@":return A.next(),oe=p(R,7,"@"),R.inLinked=!0,oe;case".":return k(A),A.next(),p(R,8,".");case":":return k(A),A.next(),p(R,9,":");default:return X(A)?(oe=p(R,1,yo(A)),R.braceNest=0,R.inLinked=!1,oe):q(A,R)||ce(A,R)?(k(A),En(A,R)):M(A,R)?(k(A),p(R,11,_o(A))):ae(A,R)?(k(A),Je==="{"?Vt(A,R)||oe:p(R,10,vo(A))):(G===7&&_(ye.INVALID_LINKED_FORMAT,a(),0),R.braceNest=0,R.inLinked=!1,Qo(A,R))}}function Qo(A,R){let G={type:13};if(R.braceNest>0)return Vt(A,R)||w(R);if(R.inLinked)return En(A,R)||w(R);switch(A.currentChar()){case"{":return Vt(A,R)||w(R);case"}":return _(ye.UNBALANCED_CLOSING_BRACE,a(),0),A.next(),p(R,3,"}");case"@":return En(A,R)||w(R);default:{if(X(A))return G=p(R,1,yo(A)),R.braceNest=0,R.inLinked=!1,G;if(ee(A))return p(R,0,Yo(A));break}}return G}function wn(){const{currentType:A,offset:R,startLoc:G,endLoc:oe}=h;return h.lastType=A,h.lastOffset=R,h.lastStartLoc=G,h.lastEndLoc=oe,h.offset=o(),h.startLoc=a(),r.currentChar()===Ro?p(h,13):Qo(r,h)}return{nextToken:wn,currentOffset:o,currentPosition:a,context:f}}const WP="parser",zP=/(?:\\\\|\\'|\\u([0-9a-fA-F]{4})|\\U([0-9a-fA-F]{6}))/g;function GP(n,e,t){switch(n){case"\\\\":return"\\";case"\\'":return"'";default:{const r=parseInt(e||t,16);return r<=55295||r>=57344?String.fromCodePoint(r):"�"}}}function qP(n={}){const e=n.location!==!1,{onError:t}=n;function r(I,N,D,L,...K){const q=I.currentPosition();if(q.offset+=L,q.column+=L,t){const M=e?Ih(D,q):null,ce=Na(N,M,{domain:WP,args:K});t(ce)}}function o(I,N,D){const L={type:I};return e&&(L.start=N,L.end=N,L.loc={start:D,end:D}),L}function a(I,N,D,L){e&&(I.end=N,I.loc&&(I.loc.end=D))}function l(I,N){const D=I.context(),L=o(3,D.offset,D.startLoc);return L.value=N,a(L,I.currentOffset(),I.currentPosition()),L}function d(I,N){const D=I.context(),{lastOffset:L,lastStartLoc:K}=D,q=o(5,L,K);return q.index=parseInt(N,10),I.nextToken(),a(q,I.currentOffset(),I.currentPosition()),q}function h(I,N){const D=I.context(),{lastOffset:L,lastStartLoc:K}=D,q=o(4,L,K);return q.key=N,I.nextToken(),a(q,I.currentOffset(),I.currentPosition()),q}function f(I,N){const D=I.context(),{lastOffset:L,lastStartLoc:K}=D,q=o(9,L,K);return q.value=N.replace(zP,GP),I.nextToken(),a(q,I.currentOffset(),I.currentPosition()),q}function g(I){const N=I.nextToken(),D=I.context(),{lastOffset:L,lastStartLoc:K}=D,q=o(8,L,K);return N.type!==11?(r(I,ye.UNEXPECTED_EMPTY_LINKED_MODIFIER,D.lastStartLoc,0),q.value="",a(q,L,K),{nextConsumeToken:N,node:q}):(N.value==null&&r(I,ye.UNEXPECTED_LEXICAL_ANALYSIS,D.lastStartLoc,0,Pr(N)),q.value=N.value||"",a(q,I.currentOffset(),I.currentPosition()),{node:q})}function _(I,N){const D=I.context(),L=o(7,D.offset,D.startLoc);return L.value=N,a(L,I.currentOffset(),I.currentPosition()),L}function p(I){const N=I.context(),D=o(6,N.offset,N.startLoc);let L=I.nextToken();if(L.type===8){const K=g(I);D.modifier=K.node,L=K.nextConsumeToken||I.nextToken()}switch(L.type!==9&&r(I,ye.UNEXPECTED_LEXICAL_ANALYSIS,N.lastStartLoc,0,Pr(L)),L=I.nextToken(),L.type===2&&(L=I.nextToken()),L.type){case 10:L.value==null&&r(I,ye.UNEXPECTED_LEXICAL_ANALYSIS,N.lastStartLoc,0,Pr(L)),D.key=_(I,L.value||"");break;case 4:L.value==null&&r(I,ye.UNEXPECTED_LEXICAL_ANALYSIS,N.lastStartLoc,0,Pr(L)),D.key=h(I,L.value||"");break;case 5:L.value==null&&r(I,ye.UNEXPECTED_LEXICAL_ANALYSIS,N.lastStartLoc,0,Pr(L)),D.key=d(I,L.value||"");break;case 6:L.value==null&&r(I,ye.UNEXPECTED_LEXICAL_ANALYSIS,N.lastStartLoc,0,Pr(L)),D.key=f(I,L.value||"");break;default:{r(I,ye.UNEXPECTED_EMPTY_LINKED_KEY,N.lastStartLoc,0);const K=I.context(),q=o(7,K.offset,K.startLoc);return q.value="",a(q,K.offset,K.startLoc),D.key=q,a(D,K.offset,K.startLoc),{nextConsumeToken:L,node:D}}}return a(D,I.currentOffset(),I.currentPosition()),{node:D}}function w(I){const N=I.context(),D=N.currentType===1?I.currentOffset():N.offset,L=N.currentType===1?N.endLoc:N.startLoc,K=o(2,D,L);K.items=[];let q=null;do{const ae=q||I.nextToken();switch(q=null,ae.type){case 0:ae.value==null&&r(I,ye.UNEXPECTED_LEXICAL_ANALYSIS,N.lastStartLoc,0,Pr(ae)),K.items.push(l(I,ae.value||""));break;case 5:ae.value==null&&r(I,ye.UNEXPECTED_LEXICAL_ANALYSIS,N.lastStartLoc,0,Pr(ae)),K.items.push(d(I,ae.value||""));break;case 4:ae.value==null&&r(I,ye.UNEXPECTED_LEXICAL_ANALYSIS,N.lastStartLoc,0,Pr(ae)),K.items.push(h(I,ae.value||""));break;case 6:ae.value==null&&r(I,ye.UNEXPECTED_LEXICAL_ANALYSIS,N.lastStartLoc,0,Pr(ae)),K.items.push(f(I,ae.value||""));break;case 7:{const X=p(I);K.items.push(X.node),q=X.nextConsumeToken||null;break}}}while(N.currentType!==13&&N.currentType!==1);const M=N.currentType===1?N.lastOffset:I.currentOffset(),ce=N.currentType===1?N.lastEndLoc:I.currentPosition();return a(K,M,ce),K}function C(I,N,D,L){const K=I.context();let q=L.items.length===0;const M=o(1,N,D);M.cases=[],M.cases.push(L);do{const ce=w(I);q||(q=ce.items.length===0),M.cases.push(ce)}while(K.currentType!==13);return q&&r(I,ye.MUST_HAVE_MESSAGES_IN_PLURAL,D,0),a(M,I.currentOffset(),I.currentPosition()),M}function T(I){const N=I.context(),{offset:D,startLoc:L}=N,K=w(I);return N.currentType===13?K:C(I,D,L,K)}function k(I){const N=KP(I,Ot({},n)),D=N.context(),L=o(0,D.offset,D.startLoc);return e&&L.loc&&(L.loc.source=I),L.body=T(N),n.onCacheKey&&(L.cacheKey=n.onCacheKey(I)),D.currentType!==13&&r(N,ye.UNEXPECTED_LEXICAL_ANALYSIS,D.lastStartLoc,0,I[D.offset]||""),a(L,N.currentOffset(),N.currentPosition()),L}return{parse:k}}function Pr(n){if(n.type===13)return"EOF";const e=(n.value||"").replace(/\r?\n/gu,"\\n");return e.length>10?e.slice(0,9)+"…":e}function jP(n,e={}){const t={ast:n,helpers:new Set};return{context:()=>t,helper:a=>(t.helpers.add(a),a)}}function A_(n,e){for(let t=0;t<n.length;t++)Sf(n[t],e)}function Sf(n,e){switch(n.type){case 1:A_(n.cases,e),e.helper("plural");break;case 2:A_(n.items,e);break;case 6:{Sf(n.key,e),e.helper("linked"),e.helper("type");break}case 5:e.helper("interpolate"),e.helper("list");break;case 4:e.helper("interpolate"),e.helper("named");break}}function YP(n,e={}){const t=jP(n);t.helper("normalize"),n.body&&Sf(n.body,t);const r=t.context();n.helpers=Array.from(r.helpers)}function JP(n){const e=n.body;return e.type===2?k_(e):e.cases.forEach(t=>k_(t)),n}function k_(n){if(n.items.length===1){const e=n.items[0];(e.type===3||e.type===9)&&(n.static=e.value,delete e.value)}else{const e=[];for(let t=0;t<n.items.length;t++){const r=n.items[t];if(!(r.type===3||r.type===9)||r.value==null)break;e.push(r.value)}if(e.length===n.items.length){n.static=Tf(e);for(let t=0;t<n.items.length;t++){const r=n.items[t];(r.type===3||r.type===9)&&delete r.value}}}}const QP="minifier";function oa(n){switch(n.t=n.type,n.type){case 0:{const e=n;oa(e.body),e.b=e.body,delete e.body;break}case 1:{const e=n,t=e.cases;for(let r=0;r<t.length;r++)oa(t[r]);e.c=t,delete e.cases;break}case 2:{const e=n,t=e.items;for(let r=0;r<t.length;r++)oa(t[r]);e.i=t,delete e.items,e.static&&(e.s=e.static,delete e.static);break}case 3:case 9:case 8:case 7:{const e=n;e.value&&(e.v=e.value,delete e.value);break}case 6:{const e=n;oa(e.key),e.k=e.key,delete e.key,e.modifier&&(oa(e.modifier),e.m=e.modifier,delete e.modifier);break}case 5:{const e=n;e.i=e.index,delete e.index;break}case 4:{const e=n;e.k=e.key,delete e.key;break}default:if(process.env.NODE_ENV!=="production")throw Na(ye.UNHANDLED_MINIFIER_NODE_TYPE,null,{domain:QP,args:[n.type]})}delete n.type}const XP="parser";function ZP(n,e){const{sourceMap:t,filename:r,breakLineCode:o,needIndent:a}=e,l=e.location!==!1,d={filename:r,code:"",column:1,line:1,offset:0,map:void 0,breakLineCode:o,needIndent:a,indentLevel:0};l&&n.loc&&(d.source=n.loc.source);const h=()=>d;function f(k,I){d.code+=k}function g(k,I=!0){const N=I?o:"";f(a?N+" ".repeat(k):N)}function _(k=!0){const I=++d.indentLevel;k&&g(I)}function p(k=!0){const I=--d.indentLevel;k&&g(I)}function w(){g(d.indentLevel)}return{context:h,push:f,indent:_,deindent:p,newline:w,helper:k=>`_${k}`,needIndent:()=>d.needIndent}}function e1(n,e){const{helper:t}=n;n.push(`${t("linked")}(`),Ta(n,e.key),e.modifier?(n.push(", "),Ta(n,e.modifier),n.push(", _type")):n.push(", undefined, _type"),n.push(")")}function t1(n,e){const{helper:t,needIndent:r}=n;n.push(`${t("normalize")}([`),n.indent(r());const o=e.items.length;for(let a=0;a<o&&(Ta(n,e.items[a]),a!==o-1);a++)n.push(", ");n.deindent(r()),n.push("])")}function n1(n,e){const{helper:t,needIndent:r}=n;if(e.cases.length>1){n.push(`${t("plural")}([`),n.indent(r());const o=e.cases.length;for(let a=0;a<o&&(Ta(n,e.cases[a]),a!==o-1);a++)n.push(", ");n.deindent(r()),n.push("])")}}function r1(n,e){e.body?Ta(n,e.body):n.push("null")}function Ta(n,e){const{helper:t}=n;switch(e.type){case 0:r1(n,e);break;case 1:n1(n,e);break;case 2:t1(n,e);break;case 6:e1(n,e);break;case 8:n.push(JSON.stringify(e.value),e);break;case 7:n.push(JSON.stringify(e.value),e);break;case 5:n.push(`${t("interpolate")}(${t("list")}(${e.index}))`,e);break;case 4:n.push(`${t("interpolate")}(${t("named")}(${JSON.stringify(e.key)}))`,e);break;case 9:n.push(JSON.stringify(e.value),e);break;case 3:n.push(JSON.stringify(e.value),e);break;default:if(process.env.NODE_ENV!=="production")throw Na(ye.UNHANDLED_CODEGEN_NODE_TYPE,null,{domain:XP,args:[e.type]})}}const o1=(n,e={})=>{const t=ne(e.mode)?e.mode:"normal",r=ne(e.filename)?e.filename:"message.intl",o=!!e.sourceMap,a=e.breakLineCode!=null?e.breakLineCode:t==="arrow"?";":`
|
22
|
-
`,l=e.needIndent?e.needIndent:t!=="arrow",d=n.helpers||[],h=
|
20
|
+
*/function PP(n,e,t){return{line:n,column:e,offset:t}}function Sh(n,e,t){return{start:n,end:e}}const ye={EXPECTED_TOKEN:1,INVALID_TOKEN_IN_PLACEHOLDER:2,UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER:3,UNKNOWN_ESCAPE_SEQUENCE:4,INVALID_UNICODE_ESCAPE_SEQUENCE:5,UNBALANCED_CLOSING_BRACE:6,UNTERMINATED_CLOSING_BRACE:7,EMPTY_PLACEHOLDER:8,NOT_ALLOW_NEST_PLACEHOLDER:9,INVALID_LINKED_FORMAT:10,MUST_HAVE_MESSAGES_IN_PLURAL:11,UNEXPECTED_EMPTY_LINKED_MODIFIER:12,UNEXPECTED_EMPTY_LINKED_KEY:13,UNEXPECTED_LEXICAL_ANALYSIS:14,UNHANDLED_CODEGEN_NODE_TYPE:15,UNHANDLED_MINIFIER_NODE_TYPE:16},MP=17,DP={[ye.EXPECTED_TOKEN]:"Expected token: '{0}'",[ye.INVALID_TOKEN_IN_PLACEHOLDER]:"Invalid token in placeholder: '{0}'",[ye.UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER]:"Unterminated single quote in placeholder",[ye.UNKNOWN_ESCAPE_SEQUENCE]:"Unknown escape sequence: \\{0}",[ye.INVALID_UNICODE_ESCAPE_SEQUENCE]:"Invalid unicode escape sequence: {0}",[ye.UNBALANCED_CLOSING_BRACE]:"Unbalanced closing brace",[ye.UNTERMINATED_CLOSING_BRACE]:"Unterminated closing brace",[ye.EMPTY_PLACEHOLDER]:"Empty placeholder",[ye.NOT_ALLOW_NEST_PLACEHOLDER]:"Not allowed nest placeholder",[ye.INVALID_LINKED_FORMAT]:"Invalid linked format",[ye.MUST_HAVE_MESSAGES_IN_PLURAL]:"Plural must have messages",[ye.UNEXPECTED_EMPTY_LINKED_MODIFIER]:"Unexpected empty linked modifier",[ye.UNEXPECTED_EMPTY_LINKED_KEY]:"Unexpected empty linked key",[ye.UNEXPECTED_LEXICAL_ANALYSIS]:"Unexpected lexical analysis in token: '{0}'",[ye.UNHANDLED_CODEGEN_NODE_TYPE]:"unhandled codegen node type: '{0}'",[ye.UNHANDLED_MINIFIER_NODE_TYPE]:"unhandled mimifier node type: '{0}'"};function Na(n,e,t={}){const{domain:r,messages:o,args:a}=t,l=process.env.NODE_ENV!=="production"?zl((o||DP)[n]||"",...a||[]):n,d=new SyntaxError(String(l));return d.code=n,e&&(d.location=e),d.domain=r,d}function LP(n){throw n}const xP=/<\/?[\w\s="/.':;#-\/]+>/,UP=n=>xP.test(n),oo=" ",BP="\r",un=`
|
21
|
+
`,VP="\u2028",FP="\u2029";function HP(n){const e=n;let t=0,r=1,o=1,a=0;const l=M=>e[M]===BP&&e[M+1]===un,d=M=>e[M]===un,h=M=>e[M]===FP,f=M=>e[M]===VP,g=M=>l(M)||d(M)||h(M)||f(M),_=()=>t,p=()=>r,w=()=>o,C=()=>a,T=M=>l(M)||h(M)||f(M)?un:e[M],k=()=>T(t),S=()=>T(t+a);function N(){return a=0,g(t)&&(r++,o=0),l(t)&&t++,t++,o++,e[t]}function D(){return l(t+a)&&a++,a++,e[t+a]}function L(){t=0,r=1,o=1,a=0}function K(M=0){a=M}function q(){const M=t+a;for(;M!==t;)N();a=0}return{index:_,line:p,column:w,peekOffset:C,charAt:T,currentChar:k,currentPeek:S,next:N,peek:D,reset:L,resetPeek:K,skipToPeek:q}}const Oo=void 0,$P=".",I_="'",KP="tokenizer";function WP(n,e={}){const t=e.location!==!1,r=HP(n),o=()=>r.index(),a=()=>PP(r.line(),r.column(),r.index()),l=a(),d=o(),h={currentType:13,offset:d,startLoc:l,endLoc:l,lastType:13,lastOffset:d,lastStartLoc:l,lastEndLoc:l,braceNest:0,inLinked:!1,text:""},f=()=>h,{onError:g}=e;function _(A,R,G,...oe){const Je=f();if(R.column+=G,R.offset+=G,g){const et=t?Sh(Je.startLoc,R):null,Me=Na(A,et,{domain:KP,args:oe});g(Me)}}function p(A,R,G){A.endLoc=a(),A.currentType=R;const oe={type:R};return t&&(oe.loc=Sh(A.startLoc,A.endLoc)),G!=null&&(oe.value=G),oe}const w=A=>p(A,13);function C(A,R){return A.currentChar()===R?(A.next(),R):(_(ye.EXPECTED_TOKEN,a(),0,R),"")}function T(A){let R="";for(;A.currentPeek()===oo||A.currentPeek()===un;)R+=A.currentPeek(),A.peek();return R}function k(A){const R=T(A);return A.skipToPeek(),R}function S(A){if(A===Oo)return!1;const R=A.charCodeAt(0);return R>=97&&R<=122||R>=65&&R<=90||R===95}function N(A){if(A===Oo)return!1;const R=A.charCodeAt(0);return R>=48&&R<=57}function D(A,R){const{currentType:G}=R;if(G!==2)return!1;T(A);const oe=S(A.currentPeek());return A.resetPeek(),oe}function L(A,R){const{currentType:G}=R;if(G!==2)return!1;T(A);const oe=A.currentPeek()==="-"?A.peek():A.currentPeek(),Je=N(oe);return A.resetPeek(),Je}function K(A,R){const{currentType:G}=R;if(G!==2)return!1;T(A);const oe=A.currentPeek()===I_;return A.resetPeek(),oe}function q(A,R){const{currentType:G}=R;if(G!==7)return!1;T(A);const oe=A.currentPeek()===".";return A.resetPeek(),oe}function M(A,R){const{currentType:G}=R;if(G!==8)return!1;T(A);const oe=S(A.currentPeek());return A.resetPeek(),oe}function ce(A,R){const{currentType:G}=R;if(!(G===7||G===11))return!1;T(A);const oe=A.currentPeek()===":";return A.resetPeek(),oe}function ae(A,R){const{currentType:G}=R;if(G!==9)return!1;const oe=()=>{const et=A.currentPeek();return et==="{"?S(A.peek()):et==="@"||et==="|"||et===":"||et==="."||et===oo||!et?!1:et===un?(A.peek(),oe()):ee(A,!1)},Je=oe();return A.resetPeek(),Je}function X(A){T(A);const R=A.currentPeek()==="|";return A.resetPeek(),R}function ee(A,R=!0){const G=(Je=!1,et="")=>{const Me=A.currentPeek();return Me==="{"||Me==="@"||!Me?Je:Me==="|"?!(et===oo||et===un):Me===oo?(A.peek(),G(!0,oo)):Me===un?(A.peek(),G(!0,un)):!0},oe=G();return R&&A.resetPeek(),oe}function ue(A,R){const G=A.currentChar();return G===Oo?Oo:R(G)?(A.next(),G):null}function Be(A){const R=A.charCodeAt(0);return R>=97&&R<=122||R>=65&&R<=90||R>=48&&R<=57||R===95||R===36}function Ct(A){return ue(A,Be)}function rn(A){const R=A.charCodeAt(0);return R>=97&&R<=122||R>=65&&R<=90||R>=48&&R<=57||R===95||R===36||R===45}function qt(A){return ue(A,rn)}function Mt(A){const R=A.charCodeAt(0);return R>=48&&R<=57}function at(A){return ue(A,Mt)}function Et(A){const R=A.charCodeAt(0);return R>=48&&R<=57||R>=65&&R<=70||R>=97&&R<=102}function on(A){return ue(A,Et)}function It(A){let R="",G="";for(;R=at(A);)G+=R;return G}function Jo(A){let R="";for(;;){const G=A.currentChar();if(G==="{"||G==="}"||G==="@"||G==="|"||!G)break;if(G===oo||G===un)if(ee(A))R+=G,A.next();else{if(X(A))break;R+=G,A.next()}else R+=G,A.next()}return R}function Ua(A){k(A);let R="",G="";for(;R=qt(A);)G+=R;return A.currentChar()===Oo&&_(ye.UNTERMINATED_CLOSING_BRACE,a(),0),G}function Ba(A){k(A);let R="";return A.currentChar()==="-"?(A.next(),R+=`-${It(A)}`):R+=It(A),A.currentChar()===Oo&&_(ye.UNTERMINATED_CLOSING_BRACE,a(),0),R}function Ir(A){return A!==I_&&A!==un}function Qo(A){k(A),C(A,"'");let R="",G="";for(;R=ue(A,Ir);)R==="\\"?G+=Va(A):G+=R;const oe=A.currentChar();return oe===un||oe===Oo?(_(ye.UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER,a(),0),oe===un&&(A.next(),C(A,"'")),G):(C(A,"'"),G)}function Va(A){const R=A.currentChar();switch(R){case"\\":case"'":return A.next(),`\\${R}`;case"u":return Ar(A,R,4);case"U":return Ar(A,R,6);default:return _(ye.UNKNOWN_ESCAPE_SEQUENCE,a(),0,R),""}}function Ar(A,R,G){C(A,R);let oe="";for(let Je=0;Je<G;Je++){const et=on(A);if(!et){_(ye.INVALID_UNICODE_ESCAPE_SEQUENCE,a(),0,`\\${R}${oe}${A.currentChar()}`);break}oe+=et}return`\\${R}${oe}`}function qr(A){return A!=="{"&&A!=="}"&&A!==oo&&A!==un}function Fa(A){k(A);let R="",G="";for(;R=ue(A,qr);)G+=R;return G}function vo(A){let R="",G="";for(;R=Ct(A);)G+=R;return G}function yo(A){const R=G=>{const oe=A.currentChar();return oe==="{"||oe==="@"||oe==="|"||oe==="("||oe===")"||!oe||oe===oo?G:(G+=oe,A.next(),R(G))};return R("")}function Co(A){k(A);const R=C(A,"|");return k(A),R}function Vt(A,R){let G=null;switch(A.currentChar()){case"{":return R.braceNest>=1&&_(ye.NOT_ALLOW_NEST_PLACEHOLDER,a(),0),A.next(),G=p(R,2,"{"),k(A),R.braceNest++,G;case"}":return R.braceNest>0&&R.currentType===2&&_(ye.EMPTY_PLACEHOLDER,a(),0),A.next(),G=p(R,3,"}"),R.braceNest--,R.braceNest>0&&k(A),R.inLinked&&R.braceNest===0&&(R.inLinked=!1),G;case"@":return R.braceNest>0&&_(ye.UNTERMINATED_CLOSING_BRACE,a(),0),G=En(A,R)||w(R),R.braceNest=0,G;default:{let Je=!0,et=!0,Me=!0;if(X(A))return R.braceNest>0&&_(ye.UNTERMINATED_CLOSING_BRACE,a(),0),G=p(R,1,Co(A)),R.braceNest=0,R.inLinked=!1,G;if(R.braceNest>0&&(R.currentType===4||R.currentType===5||R.currentType===6))return _(ye.UNTERMINATED_CLOSING_BRACE,a(),0),R.braceNest=0,Xo(A,R);if(Je=D(A,R))return G=p(R,4,Ua(A)),k(A),G;if(et=L(A,R))return G=p(R,5,Ba(A)),k(A),G;if(Me=K(A,R))return G=p(R,6,Qo(A)),k(A),G;if(!Je&&!et&&!Me)return G=p(R,12,Fa(A)),_(ye.INVALID_TOKEN_IN_PLACEHOLDER,a(),0,G.value),k(A),G;break}}return G}function En(A,R){const{currentType:G}=R;let oe=null;const Je=A.currentChar();switch((G===7||G===8||G===11||G===9)&&(Je===un||Je===oo)&&_(ye.INVALID_LINKED_FORMAT,a(),0),Je){case"@":return A.next(),oe=p(R,7,"@"),R.inLinked=!0,oe;case".":return k(A),A.next(),p(R,8,".");case":":return k(A),A.next(),p(R,9,":");default:return X(A)?(oe=p(R,1,Co(A)),R.braceNest=0,R.inLinked=!1,oe):q(A,R)||ce(A,R)?(k(A),En(A,R)):M(A,R)?(k(A),p(R,11,vo(A))):ae(A,R)?(k(A),Je==="{"?Vt(A,R)||oe:p(R,10,yo(A))):(G===7&&_(ye.INVALID_LINKED_FORMAT,a(),0),R.braceNest=0,R.inLinked=!1,Xo(A,R))}}function Xo(A,R){let G={type:13};if(R.braceNest>0)return Vt(A,R)||w(R);if(R.inLinked)return En(A,R)||w(R);switch(A.currentChar()){case"{":return Vt(A,R)||w(R);case"}":return _(ye.UNBALANCED_CLOSING_BRACE,a(),0),A.next(),p(R,3,"}");case"@":return En(A,R)||w(R);default:{if(X(A))return G=p(R,1,Co(A)),R.braceNest=0,R.inLinked=!1,G;if(ee(A))return p(R,0,Jo(A));break}}return G}function wn(){const{currentType:A,offset:R,startLoc:G,endLoc:oe}=h;return h.lastType=A,h.lastOffset=R,h.lastStartLoc=G,h.lastEndLoc=oe,h.offset=o(),h.startLoc=a(),r.currentChar()===Oo?p(h,13):Xo(r,h)}return{nextToken:wn,currentOffset:o,currentPosition:a,context:f}}const zP="parser",GP=/(?:\\\\|\\'|\\u([0-9a-fA-F]{4})|\\U([0-9a-fA-F]{6}))/g;function qP(n,e,t){switch(n){case"\\\\":return"\\";case"\\'":return"'";default:{const r=parseInt(e||t,16);return r<=55295||r>=57344?String.fromCodePoint(r):"�"}}}function jP(n={}){const e=n.location!==!1,{onError:t}=n;function r(S,N,D,L,...K){const q=S.currentPosition();if(q.offset+=L,q.column+=L,t){const M=e?Sh(D,q):null,ce=Na(N,M,{domain:zP,args:K});t(ce)}}function o(S,N,D){const L={type:S};return e&&(L.start=N,L.end=N,L.loc={start:D,end:D}),L}function a(S,N,D,L){e&&(S.end=N,S.loc&&(S.loc.end=D))}function l(S,N){const D=S.context(),L=o(3,D.offset,D.startLoc);return L.value=N,a(L,S.currentOffset(),S.currentPosition()),L}function d(S,N){const D=S.context(),{lastOffset:L,lastStartLoc:K}=D,q=o(5,L,K);return q.index=parseInt(N,10),S.nextToken(),a(q,S.currentOffset(),S.currentPosition()),q}function h(S,N){const D=S.context(),{lastOffset:L,lastStartLoc:K}=D,q=o(4,L,K);return q.key=N,S.nextToken(),a(q,S.currentOffset(),S.currentPosition()),q}function f(S,N){const D=S.context(),{lastOffset:L,lastStartLoc:K}=D,q=o(9,L,K);return q.value=N.replace(GP,qP),S.nextToken(),a(q,S.currentOffset(),S.currentPosition()),q}function g(S){const N=S.nextToken(),D=S.context(),{lastOffset:L,lastStartLoc:K}=D,q=o(8,L,K);return N.type!==11?(r(S,ye.UNEXPECTED_EMPTY_LINKED_MODIFIER,D.lastStartLoc,0),q.value="",a(q,L,K),{nextConsumeToken:N,node:q}):(N.value==null&&r(S,ye.UNEXPECTED_LEXICAL_ANALYSIS,D.lastStartLoc,0,Pr(N)),q.value=N.value||"",a(q,S.currentOffset(),S.currentPosition()),{node:q})}function _(S,N){const D=S.context(),L=o(7,D.offset,D.startLoc);return L.value=N,a(L,S.currentOffset(),S.currentPosition()),L}function p(S){const N=S.context(),D=o(6,N.offset,N.startLoc);let L=S.nextToken();if(L.type===8){const K=g(S);D.modifier=K.node,L=K.nextConsumeToken||S.nextToken()}switch(L.type!==9&&r(S,ye.UNEXPECTED_LEXICAL_ANALYSIS,N.lastStartLoc,0,Pr(L)),L=S.nextToken(),L.type===2&&(L=S.nextToken()),L.type){case 10:L.value==null&&r(S,ye.UNEXPECTED_LEXICAL_ANALYSIS,N.lastStartLoc,0,Pr(L)),D.key=_(S,L.value||"");break;case 4:L.value==null&&r(S,ye.UNEXPECTED_LEXICAL_ANALYSIS,N.lastStartLoc,0,Pr(L)),D.key=h(S,L.value||"");break;case 5:L.value==null&&r(S,ye.UNEXPECTED_LEXICAL_ANALYSIS,N.lastStartLoc,0,Pr(L)),D.key=d(S,L.value||"");break;case 6:L.value==null&&r(S,ye.UNEXPECTED_LEXICAL_ANALYSIS,N.lastStartLoc,0,Pr(L)),D.key=f(S,L.value||"");break;default:{r(S,ye.UNEXPECTED_EMPTY_LINKED_KEY,N.lastStartLoc,0);const K=S.context(),q=o(7,K.offset,K.startLoc);return q.value="",a(q,K.offset,K.startLoc),D.key=q,a(D,K.offset,K.startLoc),{nextConsumeToken:L,node:D}}}return a(D,S.currentOffset(),S.currentPosition()),{node:D}}function w(S){const N=S.context(),D=N.currentType===1?S.currentOffset():N.offset,L=N.currentType===1?N.endLoc:N.startLoc,K=o(2,D,L);K.items=[];let q=null;do{const ae=q||S.nextToken();switch(q=null,ae.type){case 0:ae.value==null&&r(S,ye.UNEXPECTED_LEXICAL_ANALYSIS,N.lastStartLoc,0,Pr(ae)),K.items.push(l(S,ae.value||""));break;case 5:ae.value==null&&r(S,ye.UNEXPECTED_LEXICAL_ANALYSIS,N.lastStartLoc,0,Pr(ae)),K.items.push(d(S,ae.value||""));break;case 4:ae.value==null&&r(S,ye.UNEXPECTED_LEXICAL_ANALYSIS,N.lastStartLoc,0,Pr(ae)),K.items.push(h(S,ae.value||""));break;case 6:ae.value==null&&r(S,ye.UNEXPECTED_LEXICAL_ANALYSIS,N.lastStartLoc,0,Pr(ae)),K.items.push(f(S,ae.value||""));break;case 7:{const X=p(S);K.items.push(X.node),q=X.nextConsumeToken||null;break}}}while(N.currentType!==13&&N.currentType!==1);const M=N.currentType===1?N.lastOffset:S.currentOffset(),ce=N.currentType===1?N.lastEndLoc:S.currentPosition();return a(K,M,ce),K}function C(S,N,D,L){const K=S.context();let q=L.items.length===0;const M=o(1,N,D);M.cases=[],M.cases.push(L);do{const ce=w(S);q||(q=ce.items.length===0),M.cases.push(ce)}while(K.currentType!==13);return q&&r(S,ye.MUST_HAVE_MESSAGES_IN_PLURAL,D,0),a(M,S.currentOffset(),S.currentPosition()),M}function T(S){const N=S.context(),{offset:D,startLoc:L}=N,K=w(S);return N.currentType===13?K:C(S,D,L,K)}function k(S){const N=WP(S,Ot({},n)),D=N.context(),L=o(0,D.offset,D.startLoc);return e&&L.loc&&(L.loc.source=S),L.body=T(N),n.onCacheKey&&(L.cacheKey=n.onCacheKey(S)),D.currentType!==13&&r(N,ye.UNEXPECTED_LEXICAL_ANALYSIS,D.lastStartLoc,0,S[D.offset]||""),a(L,N.currentOffset(),N.currentPosition()),L}return{parse:k}}function Pr(n){if(n.type===13)return"EOF";const e=(n.value||"").replace(/\r?\n/gu,"\\n");return e.length>10?e.slice(0,9)+"…":e}function YP(n,e={}){const t={ast:n,helpers:new Set};return{context:()=>t,helper:a=>(t.helpers.add(a),a)}}function A_(n,e){for(let t=0;t<n.length;t++)If(n[t],e)}function If(n,e){switch(n.type){case 1:A_(n.cases,e),e.helper("plural");break;case 2:A_(n.items,e);break;case 6:{If(n.key,e),e.helper("linked"),e.helper("type");break}case 5:e.helper("interpolate"),e.helper("list");break;case 4:e.helper("interpolate"),e.helper("named");break}}function JP(n,e={}){const t=YP(n);t.helper("normalize"),n.body&&If(n.body,t);const r=t.context();n.helpers=Array.from(r.helpers)}function QP(n){const e=n.body;return e.type===2?k_(e):e.cases.forEach(t=>k_(t)),n}function k_(n){if(n.items.length===1){const e=n.items[0];(e.type===3||e.type===9)&&(n.static=e.value,delete e.value)}else{const e=[];for(let t=0;t<n.items.length;t++){const r=n.items[t];if(!(r.type===3||r.type===9)||r.value==null)break;e.push(r.value)}if(e.length===n.items.length){n.static=Tf(e);for(let t=0;t<n.items.length;t++){const r=n.items[t];(r.type===3||r.type===9)&&delete r.value}}}}const XP="minifier";function ia(n){switch(n.t=n.type,n.type){case 0:{const e=n;ia(e.body),e.b=e.body,delete e.body;break}case 1:{const e=n,t=e.cases;for(let r=0;r<t.length;r++)ia(t[r]);e.c=t,delete e.cases;break}case 2:{const e=n,t=e.items;for(let r=0;r<t.length;r++)ia(t[r]);e.i=t,delete e.items,e.static&&(e.s=e.static,delete e.static);break}case 3:case 9:case 8:case 7:{const e=n;e.value&&(e.v=e.value,delete e.value);break}case 6:{const e=n;ia(e.key),e.k=e.key,delete e.key,e.modifier&&(ia(e.modifier),e.m=e.modifier,delete e.modifier);break}case 5:{const e=n;e.i=e.index,delete e.index;break}case 4:{const e=n;e.k=e.key,delete e.key;break}default:if(process.env.NODE_ENV!=="production")throw Na(ye.UNHANDLED_MINIFIER_NODE_TYPE,null,{domain:XP,args:[n.type]})}delete n.type}const ZP="parser";function e1(n,e){const{sourceMap:t,filename:r,breakLineCode:o,needIndent:a}=e,l=e.location!==!1,d={filename:r,code:"",column:1,line:1,offset:0,map:void 0,breakLineCode:o,needIndent:a,indentLevel:0};l&&n.loc&&(d.source=n.loc.source);const h=()=>d;function f(k,S){d.code+=k}function g(k,S=!0){const N=S?o:"";f(a?N+" ".repeat(k):N)}function _(k=!0){const S=++d.indentLevel;k&&g(S)}function p(k=!0){const S=--d.indentLevel;k&&g(S)}function w(){g(d.indentLevel)}return{context:h,push:f,indent:_,deindent:p,newline:w,helper:k=>`_${k}`,needIndent:()=>d.needIndent}}function t1(n,e){const{helper:t}=n;n.push(`${t("linked")}(`),Ta(n,e.key),e.modifier?(n.push(", "),Ta(n,e.modifier),n.push(", _type")):n.push(", undefined, _type"),n.push(")")}function n1(n,e){const{helper:t,needIndent:r}=n;n.push(`${t("normalize")}([`),n.indent(r());const o=e.items.length;for(let a=0;a<o&&(Ta(n,e.items[a]),a!==o-1);a++)n.push(", ");n.deindent(r()),n.push("])")}function r1(n,e){const{helper:t,needIndent:r}=n;if(e.cases.length>1){n.push(`${t("plural")}([`),n.indent(r());const o=e.cases.length;for(let a=0;a<o&&(Ta(n,e.cases[a]),a!==o-1);a++)n.push(", ");n.deindent(r()),n.push("])")}}function o1(n,e){e.body?Ta(n,e.body):n.push("null")}function Ta(n,e){const{helper:t}=n;switch(e.type){case 0:o1(n,e);break;case 1:r1(n,e);break;case 2:n1(n,e);break;case 6:t1(n,e);break;case 8:n.push(JSON.stringify(e.value),e);break;case 7:n.push(JSON.stringify(e.value),e);break;case 5:n.push(`${t("interpolate")}(${t("list")}(${e.index}))`,e);break;case 4:n.push(`${t("interpolate")}(${t("named")}(${JSON.stringify(e.key)}))`,e);break;case 9:n.push(JSON.stringify(e.value),e);break;case 3:n.push(JSON.stringify(e.value),e);break;default:if(process.env.NODE_ENV!=="production")throw Na(ye.UNHANDLED_CODEGEN_NODE_TYPE,null,{domain:ZP,args:[e.type]})}}const i1=(n,e={})=>{const t=ne(e.mode)?e.mode:"normal",r=ne(e.filename)?e.filename:"message.intl",o=!!e.sourceMap,a=e.breakLineCode!=null?e.breakLineCode:t==="arrow"?";":`
|
22
|
+
`,l=e.needIndent?e.needIndent:t!=="arrow",d=n.helpers||[],h=e1(n,{mode:t,filename:r,sourceMap:o,breakLineCode:a,needIndent:l});h.push(t==="normal"?"function __msg__ (ctx) {":"(ctx) => {"),h.indent(l),d.length>0&&(h.push(`const { ${Tf(d.map(_=>`${_}: _${_}`),", ")} } = ctx`),h.newline()),h.push("return "),Ta(h,n),h.deindent(l),h.push("}"),delete n.helpers;const{code:f,map:g}=h.context();return{ast:n,code:f,map:g?g.toJSON():void 0}};function a1(n,e={}){const t=Ot({},e),r=!!t.jit,o=!!t.minify,a=t.optimize==null?!0:t.optimize,d=jP(t).parse(n);return r?(a&&QP(d),o&&ia(d),{ast:d,code:""}):(JP(d,t),i1(d,t))}/*!
|
23
23
|
* core-base v11.1.3
|
24
24
|
* (c) 2025 kazuya kawaguchi
|
25
25
|
* Released under the MIT License.
|
26
|
-
*/function a1(){typeof __INTLIFY_PROD_DEVTOOLS__!="boolean"&&(mi().__INTLIFY_PROD_DEVTOOLS__=!1),typeof __INTLIFY_DROP_MESSAGE_COMPILER__!="boolean"&&(mi().__INTLIFY_DROP_MESSAGE_COMPILER__=!1)}function ir(n){return Le(n)&&Af(n)===0&&(yr(n,"b")||yr(n,"body"))}const mC=["b","body"];function s1(n){return qo(n,mC)}const gC=["c","cases"];function c1(n){return qo(n,gC,[])}const pC=["s","static"];function l1(n){return qo(n,pC)}const _C=["i","items"];function u1(n){return qo(n,_C,[])}const vC=["t","type"];function Af(n){return qo(n,vC)}const yC=["v","value"];function Vc(n,e){const t=qo(n,yC);if(t!=null)return t;throw Ss(e)}const CC=["m","modifier"];function d1(n){return qo(n,CC)}const EC=["k","key"];function h1(n){const e=qo(n,EC);if(e)return e;throw Ss(6)}function qo(n,e,t){for(let r=0;r<e.length;r++){const o=e[r];if(yr(n,o)&&n[o]!=null)return n[o]}return t}const wC=[...mC,...gC,...pC,..._C,...EC,...CC,...yC,...vC];function Ss(n){return new Error(`unhandled node type: ${n}`)}function Vd(n){return t=>f1(t,n)}function f1(n,e){const t=s1(e);if(t==null)throw Ss(0);if(Af(t)===1){const a=c1(t);return n.plural(a.reduce((l,d)=>[...l,N_(n,d)],[]))}else return N_(n,t)}function N_(n,e){const t=l1(e);if(t!=null)return n.type==="text"?t:n.normalize([t]);{const r=u1(e).reduce((o,a)=>[...o,Sh(n,a)],[]);return n.normalize(r)}}function Sh(n,e){const t=Af(e);switch(t){case 3:return Vc(e,t);case 9:return Vc(e,t);case 4:{const r=e;if(yr(r,"k")&&r.k)return n.interpolate(n.named(r.k));if(yr(r,"key")&&r.key)return n.interpolate(n.named(r.key));throw Ss(t)}case 5:{const r=e;if(yr(r,"i")&&Tt(r.i))return n.interpolate(n.list(r.i));if(yr(r,"index")&&Tt(r.index))return n.interpolate(n.list(r.index));throw Ss(t)}case 6:{const r=e,o=d1(r),a=h1(r);return n.linked(Sh(n,a),o?Sh(n,o):void 0,n.type)}case 7:return Vc(e,t);case 8:return Vc(e,t);default:throw new Error(`unhandled node on format message part: ${t}`)}}const m1="Detected HTML in '{source}' message. Recommend not using HTML messages to avoid XSS.";function g1(n,e){e&&xP(n)&&Go(zl(m1,{source:n}))}const p1=n=>n;let Fc=Ye();function _1(n,e={}){let t=!1;const r=e.onError||DP;return e.onError=o=>{t=!0,r(o)},{...i1(n,e),detectError:t}}function v1(n,e){if(!__INTLIFY_DROP_MESSAGE_COMPILER__&&ne(n)){const t=Ue(e.warnHtmlMessage)?e.warnHtmlMessage:!0;process.env.NODE_ENV!=="production"&&g1(n,t);const o=(e.onCacheKey||p1)(n),a=Fc[o];if(a)return a;const{ast:l,detectError:d}=_1(n,{...e,location:process.env.NODE_ENV!=="production",jit:!0}),h=Vd(l);return d?h:Fc[o]=h}else{if(process.env.NODE_ENV!=="production"&&!ir(n))return Go(`the message that is resolve with key '${e.key}' is not supported for jit compilation`),()=>n;const t=n.cacheKey;if(t){const r=Fc[t];return r||(Fc[t]=Vd(n))}else return Vd(n)}}let As=null;function y1(n){As=n}function C1(n,e,t){As&&As.emit("i18n:init",{timestamp:Date.now(),i18n:n,version:e,meta:t})}const E1=w1("function:translate");function w1(n){return e=>As&&As.emit(n,e)}const en={INVALID_ARGUMENT:PP,INVALID_DATE_ARGUMENT:18,INVALID_ISO_DATE_ARGUMENT:19,NOT_SUPPORT_NON_STRING_MESSAGE:20,NOT_SUPPORT_LOCALE_PROMISE_VALUE:21,NOT_SUPPORT_LOCALE_ASYNC_FUNCTION:22,NOT_SUPPORT_LOCALE_TYPE:23},T1=24;function so(n){return Na(n,null,process.env.NODE_ENV!=="production"?{messages:b1}:void 0)}const b1={[en.INVALID_ARGUMENT]:"Invalid arguments",[en.INVALID_DATE_ARGUMENT]:"The date provided is an invalid Date object.Make sure your Date represents a valid date.",[en.INVALID_ISO_DATE_ARGUMENT]:"The argument provided is not a valid ISO date string",[en.NOT_SUPPORT_NON_STRING_MESSAGE]:"Not support non-string message",[en.NOT_SUPPORT_LOCALE_PROMISE_VALUE]:"cannot support promise value",[en.NOT_SUPPORT_LOCALE_ASYNC_FUNCTION]:"cannot support async function",[en.NOT_SUPPORT_LOCALE_TYPE]:"cannot support locale type"};function kf(n,e){return e.locale!=null?R_(e.locale):R_(n.locale)}let Fd;function R_(n){if(ne(n))return n;if(Xe(n)){if(n.resolvedOnce&&Fd!=null)return Fd;if(n.constructor.name==="Function"){const e=n();if(kP(e))throw so(en.NOT_SUPPORT_LOCALE_PROMISE_VALUE);return Fd=e}else throw so(en.NOT_SUPPORT_LOCALE_ASYNC_FUNCTION)}else throw so(en.NOT_SUPPORT_LOCALE_TYPE)}function I1(n,e,t){return[...new Set([t,...vt(e)?e:Le(e)?Object.keys(e):ne(e)?[e]:[t]])]}function TC(n,e,t){const r=ne(t)?t:ks,o=n;o.__localeChainCache||(o.__localeChainCache=new Map);let a=o.__localeChainCache.get(r);if(!a){a=[];let l=[t];for(;vt(l);)l=O_(a,l,e);const d=vt(e)||!ke(e)?e:e.default?e.default:null;l=ne(d)?[d]:d,vt(l)&&O_(a,l,!1),o.__localeChainCache.set(r,a)}return a}function O_(n,e,t){let r=!0;for(let o=0;o<e.length&&Ue(r);o++){const a=e[o];ne(a)&&(r=S1(n,e[o],t))}return r}function S1(n,e,t){let r;const o=e.split("-");do{const a=o.join("-");r=A1(n,a,t),o.splice(-1,1)}while(o.length&&r===!0);return r}function A1(n,e,t){let r=!1;if(!n.includes(e)&&(r=!0,e)){r=e[e.length-1]!=="!";const o=e.replace(/!/g,"");n.push(o),(vt(t)||ke(t))&&t[o]&&(r=t[o])}return r}const jo=[];jo[0]={w:[0],i:[3,0],"[":[4],o:[7]};jo[1]={w:[1],".":[2],"[":[4],o:[7]};jo[2]={w:[2],i:[3,0],0:[3,0]};jo[3]={i:[3,0],0:[3,0],w:[1,1],".":[2,1],"[":[4,1],o:[7,1]};jo[4]={"'":[5,0],'"':[6,0],"[":[4,2],"]":[1,3],o:8,l:[4,0]};jo[5]={"'":[4,0],o:8,l:[5,0]};jo[6]={'"':[4,0],o:8,l:[6,0]};const k1=/^\s?(?:true|false|-?[\d.]+|'[^']*'|"[^"]*")\s?$/;function N1(n){return k1.test(n)}function R1(n){const e=n.charCodeAt(0),t=n.charCodeAt(n.length-1);return e===t&&(e===34||e===39)?n.slice(1,-1):n}function O1(n){if(n==null)return"o";switch(n.charCodeAt(0)){case 91:case 93:case 46:case 34:case 39:return n;case 95:case 36:case 45:return"i";case 9:case 10:case 13:case 160:case 65279:case 8232:case 8233:return"w"}return"i"}function P1(n){const e=n.trim();return n.charAt(0)==="0"&&isNaN(parseInt(n))?!1:N1(e)?R1(e):"*"+e}function M1(n){const e=[];let t=-1,r=0,o=0,a,l,d,h,f,g,_;const p=[];p[0]=()=>{l===void 0?l=d:l+=d},p[1]=()=>{l!==void 0&&(e.push(l),l=void 0)},p[2]=()=>{p[0](),o++},p[3]=()=>{if(o>0)o--,r=4,p[0]();else{if(o=0,l===void 0||(l=P1(l),l===!1))return!1;p[1]()}};function w(){const C=n[t+1];if(r===5&&C==="'"||r===6&&C==='"')return t++,d="\\"+C,p[0](),!0}for(;r!==null;)if(t++,a=n[t],!(a==="\\"&&w())){if(h=O1(a),_=jo[r],f=_[h]||_.l||8,f===8||(r=f[0],f[1]!==void 0&&(g=p[f[1]],g&&(d=a,g()===!1))))return;if(r===7)return e}}const P_=new Map;function D1(n,e){return Le(n)?n[e]:null}function L1(n,e){if(!Le(n))return null;let t=P_.get(e);if(t||(t=M1(e),t&&P_.set(e,t)),!t)return null;const r=t.length;let o=n,a=0;for(;a<r;){const l=t[a];if(wC.includes(l)&&ir(o))return null;const d=o[l];if(d===void 0||Xe(o))return null;o=d,a++}return o}const _n={NOT_FOUND_KEY:1,FALLBACK_TO_TRANSLATE:2,CANNOT_FORMAT_NUMBER:3,FALLBACK_TO_NUMBER_FORMAT:4,CANNOT_FORMAT_DATE:5,FALLBACK_TO_DATE_FORMAT:6,EXPERIMENTAL_CUSTOM_MESSAGE_COMPILER:7},x1=8,U1={[_n.NOT_FOUND_KEY]:"Not found '{key}' key in '{locale}' locale messages.",[_n.FALLBACK_TO_TRANSLATE]:"Fall back to translate '{key}' key with '{target}' locale.",[_n.CANNOT_FORMAT_NUMBER]:"Cannot format a number value due to not supported Intl.NumberFormat.",[_n.FALLBACK_TO_NUMBER_FORMAT]:"Fall back to number format '{key}' key with '{target}' locale.",[_n.CANNOT_FORMAT_DATE]:"Cannot format a date value due to not supported Intl.DateTimeFormat.",[_n.FALLBACK_TO_DATE_FORMAT]:"Fall back to datetime format '{key}' key with '{target}' locale.",[_n.EXPERIMENTAL_CUSTOM_MESSAGE_COMPILER]:"This project is using Custom Message Compiler, which is an experimental feature. It may receive breaking changes or be removed in the future."};function yi(n,...e){return zl(U1[n],...e)}const B1="11.1.3",ql=-1,ks="en-US",El="",M_=n=>`${n.charAt(0).toLocaleUpperCase()}${n.substr(1)}`;function V1(){return{upper:(n,e)=>e==="text"&&ne(n)?n.toUpperCase():e==="vnode"&&Le(n)&&"__v_isVNode"in n?n.children.toUpperCase():n,lower:(n,e)=>e==="text"&&ne(n)?n.toLowerCase():e==="vnode"&&Le(n)&&"__v_isVNode"in n?n.children.toLowerCase():n,capitalize:(n,e)=>e==="text"&&ne(n)?M_(n):e==="vnode"&&Le(n)&&"__v_isVNode"in n?M_(n.children):n}}let bC;function F1(n){bC=n}let IC;function H1(n){IC=n}let SC;function $1(n){SC=n}let AC=null;const K1=n=>{AC=n},W1=()=>AC;let kC=null;const D_=n=>{kC=n},z1=()=>kC;let L_=0;function G1(n={}){const e=Xe(n.onWarn)?n.onWarn:Go,t=ne(n.version)?n.version:B1,r=ne(n.locale)||Xe(n.locale)?n.locale:ks,o=Xe(r)?ks:r,a=vt(n.fallbackLocale)||ke(n.fallbackLocale)||ne(n.fallbackLocale)||n.fallbackLocale===!1?n.fallbackLocale:o,l=ke(n.messages)?n.messages:Hd(o),d=ke(n.datetimeFormats)?n.datetimeFormats:Hd(o),h=ke(n.numberFormats)?n.numberFormats:Hd(o),f=Ot(Ye(),n.modifiers,V1()),g=n.pluralRules||Ye(),_=Xe(n.missing)?n.missing:null,p=Ue(n.missingWarn)||wa(n.missingWarn)?n.missingWarn:!0,w=Ue(n.fallbackWarn)||wa(n.fallbackWarn)?n.fallbackWarn:!0,C=!!n.fallbackFormat,T=!!n.unresolving,k=Xe(n.postTranslation)?n.postTranslation:null,I=ke(n.processor)?n.processor:null,N=Ue(n.warnHtmlMessage)?n.warnHtmlMessage:!0,D=!!n.escapeParameter,L=Xe(n.messageCompiler)?n.messageCompiler:bC;process.env.NODE_ENV!=="production"&&Xe(n.messageCompiler)&&bf(yi(_n.EXPERIMENTAL_CUSTOM_MESSAGE_COMPILER));const K=Xe(n.messageResolver)?n.messageResolver:IC||D1,q=Xe(n.localeFallbacker)?n.localeFallbacker:SC||I1,M=Le(n.fallbackContext)?n.fallbackContext:void 0,ce=n,ae=Le(ce.__datetimeFormatters)?ce.__datetimeFormatters:new Map,X=Le(ce.__numberFormatters)?ce.__numberFormatters:new Map,ee=Le(ce.__meta)?ce.__meta:{};L_++;const ue={version:t,cid:L_,locale:r,fallbackLocale:a,messages:l,modifiers:f,pluralRules:g,missing:_,missingWarn:p,fallbackWarn:w,fallbackFormat:C,unresolving:T,postTranslation:k,processor:I,warnHtmlMessage:N,escapeParameter:D,messageCompiler:L,messageResolver:K,localeFallbacker:q,fallbackContext:M,onWarn:e,__meta:ee};return ue.datetimeFormats=d,ue.numberFormats=h,ue.__datetimeFormatters=ae,ue.__numberFormatters=X,process.env.NODE_ENV!=="production"&&(ue.__v_emitter=ce.__v_emitter!=null?ce.__v_emitter:void 0),(process.env.NODE_ENV!=="production"||__INTLIFY_PROD_DEVTOOLS__)&&C1(ue,t,ee),ue}const Hd=n=>({[n]:Ye()});function jl(n,e){return n instanceof RegExp?n.test(e):n}function NC(n,e){return n instanceof RegExp?n.test(e):n}function Nf(n,e,t,r,o){const{missing:a,onWarn:l}=n;if(process.env.NODE_ENV!=="production"){const d=n.__v_emitter;d&&d.emit("missing",{locale:t,key:e,type:o,groupId:`${o}:${e}`})}if(a!==null){const d=a(n,t,e,o);return ne(d)?d:e}else return process.env.NODE_ENV!=="production"&&NC(r,e)&&l(yi(_n.NOT_FOUND_KEY,{key:e,locale:t})),e}function is(n,e,t){const r=n;r.__localeChainCache=new Map,n.localeFallbacker(n,t,e)}function RC(n,e){return n===e?!1:n.split("-")[0]===e.split("-")[0]}function q1(n,e){const t=e.indexOf(n);if(t===-1)return!1;for(let r=t+1;r<e.length;r++)if(RC(n,e[r]))return!0;return!1}const x_=typeof Intl<"u",OC={dateTimeFormat:x_&&typeof Intl.DateTimeFormat<"u",numberFormat:x_&&typeof Intl.NumberFormat<"u"};function U_(n,...e){const{datetimeFormats:t,unresolving:r,fallbackLocale:o,onWarn:a,localeFallbacker:l}=n,{__datetimeFormatters:d}=n;if(process.env.NODE_ENV!=="production"&&!OC.dateTimeFormat)return a(yi(_n.CANNOT_FORMAT_DATE)),El;const[h,f,g,_]=Ah(...e),p=Ue(g.missingWarn)?g.missingWarn:n.missingWarn,w=Ue(g.fallbackWarn)?g.fallbackWarn:n.fallbackWarn,C=!!g.part,T=kf(n,g),k=l(n,o,T);if(!ne(h)||h==="")return new Intl.DateTimeFormat(T,_).format(f);let I={},N,D=null,L=T,K=null;const q="datetime format";for(let ae=0;ae<k.length;ae++){if(N=K=k[ae],process.env.NODE_ENV!=="production"&&T!==N&&jl(w,h)&&a(yi(_n.FALLBACK_TO_DATE_FORMAT,{key:h,target:N})),process.env.NODE_ENV!=="production"&&T!==N){const X=n.__v_emitter;X&&X.emit("fallback",{type:q,key:h,from:L,to:K,groupId:`${q}:${h}`})}if(I=t[N]||{},D=I[h],ke(D))break;Nf(n,h,N,p,q),L=K}if(!ke(D)||!ne(N))return r?ql:h;let M=`${N}__${h}`;Gl(_)||(M=`${M}__${JSON.stringify(_)}`);let ce=d.get(M);return ce||(ce=new Intl.DateTimeFormat(N,Ot({},D,_)),d.set(M,ce)),C?ce.formatToParts(f):ce.format(f)}const PC=["localeMatcher","weekday","era","year","month","day","hour","minute","second","timeZoneName","formatMatcher","hour12","timeZone","dateStyle","timeStyle","calendar","dayPeriod","numberingSystem","hourCycle","fractionalSecondDigits"];function Ah(...n){const[e,t,r,o]=n,a=Ye();let l=Ye(),d;if(ne(e)){const h=e.match(/(\d{4}-\d{2}-\d{2})(T|\s)?(.*)/);if(!h)throw so(en.INVALID_ISO_DATE_ARGUMENT);const f=h[3]?h[3].trim().startsWith("T")?`${h[1].trim()}${h[3].trim()}`:`${h[1].trim()}T${h[3].trim()}`:h[1].trim();d=new Date(f);try{d.toISOString()}catch{throw so(en.INVALID_ISO_DATE_ARGUMENT)}}else if(IP(e)){if(isNaN(e.getTime()))throw so(en.INVALID_DATE_ARGUMENT);d=e}else if(Tt(e))d=e;else throw so(en.INVALID_ARGUMENT);return ne(t)?a.key=t:ke(t)&&Object.keys(t).forEach(h=>{PC.includes(h)?l[h]=t[h]:a[h]=t[h]}),ne(r)?a.locale=r:ke(r)&&(l=r),ke(o)&&(l=o),[a.key||"",d,a,l]}function B_(n,e,t){const r=n;for(const o in t){const a=`${e}__${o}`;r.__datetimeFormatters.has(a)&&r.__datetimeFormatters.delete(a)}}function V_(n,...e){const{numberFormats:t,unresolving:r,fallbackLocale:o,onWarn:a,localeFallbacker:l}=n,{__numberFormatters:d}=n;if(process.env.NODE_ENV!=="production"&&!OC.numberFormat)return a(yi(_n.CANNOT_FORMAT_NUMBER)),El;const[h,f,g,_]=kh(...e),p=Ue(g.missingWarn)?g.missingWarn:n.missingWarn,w=Ue(g.fallbackWarn)?g.fallbackWarn:n.fallbackWarn,C=!!g.part,T=kf(n,g),k=l(n,o,T);if(!ne(h)||h==="")return new Intl.NumberFormat(T,_).format(f);let I={},N,D=null,L=T,K=null;const q="number format";for(let ae=0;ae<k.length;ae++){if(N=K=k[ae],process.env.NODE_ENV!=="production"&&T!==N&&jl(w,h)&&a(yi(_n.FALLBACK_TO_NUMBER_FORMAT,{key:h,target:N})),process.env.NODE_ENV!=="production"&&T!==N){const X=n.__v_emitter;X&&X.emit("fallback",{type:q,key:h,from:L,to:K,groupId:`${q}:${h}`})}if(I=t[N]||{},D=I[h],ke(D))break;Nf(n,h,N,p,q),L=K}if(!ke(D)||!ne(N))return r?ql:h;let M=`${N}__${h}`;Gl(_)||(M=`${M}__${JSON.stringify(_)}`);let ce=d.get(M);return ce||(ce=new Intl.NumberFormat(N,Ot({},D,_)),d.set(M,ce)),C?ce.formatToParts(f):ce.format(f)}const MC=["localeMatcher","style","currency","currencyDisplay","currencySign","useGrouping","minimumIntegerDigits","minimumFractionDigits","maximumFractionDigits","minimumSignificantDigits","maximumSignificantDigits","compactDisplay","notation","signDisplay","unit","unitDisplay","roundingMode","roundingPriority","roundingIncrement","trailingZeroDisplay"];function kh(...n){const[e,t,r,o]=n,a=Ye();let l=Ye();if(!Tt(e))throw so(en.INVALID_ARGUMENT);const d=e;return ne(t)?a.key=t:ke(t)&&Object.keys(t).forEach(h=>{MC.includes(h)?l[h]=t[h]:a[h]=t[h]}),ne(r)?a.locale=r:ke(r)&&(l=r),ke(o)&&(l=o),[a.key||"",d,a,l]}function F_(n,e,t){const r=n;for(const o in t){const a=`${e}__${o}`;r.__numberFormatters.has(a)&&r.__numberFormatters.delete(a)}}const j1=n=>n,Y1=n=>"",J1="text",Q1=n=>n.length===0?"":Tf(n),X1=NP;function H_(n,e){return n=Math.abs(n),e===2?n?n>1?1:0:1:n?Math.min(n,2):0}function Z1(n){const e=Tt(n.pluralIndex)?n.pluralIndex:-1;return n.named&&(Tt(n.named.count)||Tt(n.named.n))?Tt(n.named.count)?n.named.count:Tt(n.named.n)?n.named.n:e:e}function eM(n,e){e.count||(e.count=n),e.n||(e.n=n)}function tM(n={}){const e=n.locale,t=Z1(n),r=Le(n.pluralRules)&&ne(e)&&Xe(n.pluralRules[e])?n.pluralRules[e]:H_,o=Le(n.pluralRules)&&ne(e)&&Xe(n.pluralRules[e])?H_:void 0,a=I=>I[r(t,I.length,o)],l=n.list||[],d=I=>l[I],h=n.named||Ye();Tt(n.pluralIndex)&&eM(t,h);const f=I=>h[I];function g(I,N){const D=Xe(n.messages)?n.messages(I,!!N):Le(n.messages)?n.messages[I]:!1;return D||(n.parent?n.parent.message(I):Y1)}const _=I=>n.modifiers?n.modifiers[I]:j1,p=ke(n.processor)&&Xe(n.processor.normalize)?n.processor.normalize:Q1,w=ke(n.processor)&&Xe(n.processor.interpolate)?n.processor.interpolate:X1,C=ke(n.processor)&&ne(n.processor.type)?n.processor.type:J1,k={list:d,named:f,plural:a,linked:(I,...N)=>{const[D,L]=N;let K="text",q="";N.length===1?Le(D)?(q=D.modifier||q,K=D.type||K):ne(D)&&(q=D||q):N.length===2&&(ne(D)&&(q=D||q),ne(L)&&(K=L||K));const M=g(I,!0)(k),ce=K==="vnode"&&vt(M)&&q?M[0]:M;return q?_(q)(ce,K):ce},message:g,type:C,interpolate:w,normalize:p,values:Ot(Ye(),l,h)};return k}const $_=()=>"",or=n=>Xe(n);function K_(n,...e){const{fallbackFormat:t,postTranslation:r,unresolving:o,messageCompiler:a,fallbackLocale:l,messages:d}=n,[h,f]=Nh(...e),g=Ue(f.missingWarn)?f.missingWarn:n.missingWarn,_=Ue(f.fallbackWarn)?f.fallbackWarn:n.fallbackWarn,p=Ue(f.escapeParameter)?f.escapeParameter:n.escapeParameter,w=!!f.resolvedMessage,C=ne(f.default)||Ue(f.default)?Ue(f.default)?a?h:()=>h:f.default:t?a?h:()=>h:null,T=t||C!=null&&(ne(C)||Xe(C)),k=kf(n,f);p&&nM(f);let[I,N,D]=w?[h,k,d[k]||Ye()]:DC(n,h,k,l,_,g),L=I,K=h;if(!w&&!(ne(L)||ir(L)||or(L))&&T&&(L=C,K=L),!w&&(!(ne(L)||ir(L)||or(L))||!ne(N)))return o?ql:h;if(process.env.NODE_ENV!=="production"&&ne(L)&&n.messageCompiler==null)return Go(`The message format compilation is not supported in this build. Because message compiler isn't included. You need to pre-compilation all message format. So translate function return '${h}'.`),h;let q=!1;const M=()=>{q=!0},ce=or(L)?L:LC(n,h,N,L,K,M);if(q)return L;const ae=aM(n,N,D,f),X=tM(ae),ee=rM(n,ce,X),ue=r?r(ee,h):ee;if(process.env.NODE_ENV!=="production"||__INTLIFY_PROD_DEVTOOLS__){const Be={timestamp:Date.now(),key:ne(h)?h:or(L)?L.key:"",locale:N||(or(L)?L.locale:""),format:ne(L)?L:or(L)?L.source:"",message:ue};Be.meta=Ot({},n.__meta,W1()||{}),E1(Be)}return ue}function nM(n){vt(n.list)?n.list=n.list.map(e=>ne(e)?T_(e):e):Le(n.named)&&Object.keys(n.named).forEach(e=>{ne(n.named[e])&&(n.named[e]=T_(n.named[e]))})}function DC(n,e,t,r,o,a){const{messages:l,onWarn:d,messageResolver:h,localeFallbacker:f}=n,g=f(n,r,t);let _=Ye(),p,w=null,C=t,T=null;const k="translate";for(let I=0;I<g.length;I++){if(p=T=g[I],process.env.NODE_ENV!=="production"&&t!==p&&!RC(t,p)&&jl(o,e)&&d(yi(_n.FALLBACK_TO_TRANSLATE,{key:e,target:p})),process.env.NODE_ENV!=="production"&&t!==p){const K=n.__v_emitter;K&&K.emit("fallback",{type:k,key:e,from:C,to:T,groupId:`${k}:${e}`})}_=l[p]||Ye();let N=null,D,L;if(process.env.NODE_ENV!=="production"&&wr&&(N=window.performance.now(),D="intlify-message-resolve-start",L="intlify-message-resolve-end",Un&&Un(D)),(w=h(_,e))===null&&(w=_[e]),process.env.NODE_ENV!=="production"&&wr){const K=window.performance.now(),q=n.__v_emitter;q&&N&&w&&q.emit("message-resolve",{type:"message-resolve",key:e,message:w,time:K-N,groupId:`${k}:${e}`}),D&&L&&Un&&vi&&(Un(L),vi("intlify message resolve",D,L))}if(ne(w)||ir(w)||or(w))break;if(!q1(p,g)){const K=Nf(n,e,p,a,k);K!==e&&(w=K)}C=T}return[w,p,_]}function LC(n,e,t,r,o,a){const{messageCompiler:l,warnHtmlMessage:d}=n;if(or(r)){const p=r;return p.locale=p.locale||t,p.key=p.key||e,p}if(l==null){const p=()=>r;return p.locale=t,p.key=e,p}let h=null,f,g;process.env.NODE_ENV!=="production"&&wr&&(h=window.performance.now(),f="intlify-message-compilation-start",g="intlify-message-compilation-end",Un&&Un(f));const _=l(r,oM(n,t,o,r,d,a));if(process.env.NODE_ENV!=="production"&&wr){const p=window.performance.now(),w=n.__v_emitter;w&&h&&w.emit("message-compilation",{type:"message-compilation",message:r,time:p-h,groupId:`translate:${e}`}),f&&g&&Un&&vi&&(Un(g),vi("intlify message compilation",f,g))}return _.locale=t,_.key=e,_.source=r,_}function rM(n,e,t){let r=null,o,a;process.env.NODE_ENV!=="production"&&wr&&(r=window.performance.now(),o="intlify-message-evaluation-start",a="intlify-message-evaluation-end",Un&&Un(o));const l=e(t);if(process.env.NODE_ENV!=="production"&&wr){const d=window.performance.now(),h=n.__v_emitter;h&&r&&h.emit("message-evaluation",{type:"message-evaluation",value:l,time:d-r,groupId:`translate:${e.key}`}),o&&a&&Un&&vi&&(Un(a),vi("intlify message evaluation",o,a))}return l}function Nh(...n){const[e,t,r]=n,o=Ye();if(!ne(e)&&!Tt(e)&&!or(e)&&!ir(e))throw so(en.INVALID_ARGUMENT);const a=Tt(e)?String(e):(or(e),e);return Tt(t)?o.plural=t:ne(t)?o.default=t:ke(t)&&!Gl(t)?o.named=t:vt(t)&&(o.list=t),Tt(r)?o.plural=r:ne(r)?o.default=r:ke(r)&&Ot(o,r),[a,o]}function oM(n,e,t,r,o,a){return{locale:e,key:t,warnHtmlMessage:o,onError:l=>{if(a&&a(l),process.env.NODE_ENV!=="production"){const d=iM(r),h=`Message compilation error: ${l.message}`,f=l.location&&d&&RP(d,l.location.start.offset,l.location.end.offset),g=n.__v_emitter;g&&d&&g.emit("compile-error",{message:d,error:l.message,start:l.location&&l.location.start.offset,end:l.location&&l.location.end.offset,groupId:`translate:${t}`}),console.error(f?`${h}
|
27
|
-
${f}`:h)}else throw l},onCacheKey:l=>
|
26
|
+
*/function s1(){typeof __INTLIFY_PROD_DEVTOOLS__!="boolean"&&(gi().__INTLIFY_PROD_DEVTOOLS__=!1),typeof __INTLIFY_DROP_MESSAGE_COMPILER__!="boolean"&&(gi().__INTLIFY_DROP_MESSAGE_COMPILER__=!1)}function ir(n){return Le(n)&&Af(n)===0&&(yr(n,"b")||yr(n,"body"))}const mC=["b","body"];function c1(n){return qo(n,mC)}const gC=["c","cases"];function l1(n){return qo(n,gC,[])}const pC=["s","static"];function u1(n){return qo(n,pC)}const _C=["i","items"];function d1(n){return qo(n,_C,[])}const vC=["t","type"];function Af(n){return qo(n,vC)}const yC=["v","value"];function Vc(n,e){const t=qo(n,yC);if(t!=null)return t;throw Is(e)}const CC=["m","modifier"];function h1(n){return qo(n,CC)}const EC=["k","key"];function f1(n){const e=qo(n,EC);if(e)return e;throw Is(6)}function qo(n,e,t){for(let r=0;r<e.length;r++){const o=e[r];if(yr(n,o)&&n[o]!=null)return n[o]}return t}const wC=[...mC,...gC,...pC,..._C,...EC,...CC,...yC,...vC];function Is(n){return new Error(`unhandled node type: ${n}`)}function Vd(n){return t=>m1(t,n)}function m1(n,e){const t=c1(e);if(t==null)throw Is(0);if(Af(t)===1){const a=l1(t);return n.plural(a.reduce((l,d)=>[...l,N_(n,d)],[]))}else return N_(n,t)}function N_(n,e){const t=u1(e);if(t!=null)return n.type==="text"?t:n.normalize([t]);{const r=d1(e).reduce((o,a)=>[...o,Ih(n,a)],[]);return n.normalize(r)}}function Ih(n,e){const t=Af(e);switch(t){case 3:return Vc(e,t);case 9:return Vc(e,t);case 4:{const r=e;if(yr(r,"k")&&r.k)return n.interpolate(n.named(r.k));if(yr(r,"key")&&r.key)return n.interpolate(n.named(r.key));throw Is(t)}case 5:{const r=e;if(yr(r,"i")&&Tt(r.i))return n.interpolate(n.list(r.i));if(yr(r,"index")&&Tt(r.index))return n.interpolate(n.list(r.index));throw Is(t)}case 6:{const r=e,o=h1(r),a=f1(r);return n.linked(Ih(n,a),o?Ih(n,o):void 0,n.type)}case 7:return Vc(e,t);case 8:return Vc(e,t);default:throw new Error(`unhandled node on format message part: ${t}`)}}const g1="Detected HTML in '{source}' message. Recommend not using HTML messages to avoid XSS.";function p1(n,e){e&&UP(n)&&Go(zl(g1,{source:n}))}const _1=n=>n;let Fc=Ye();function v1(n,e={}){let t=!1;const r=e.onError||LP;return e.onError=o=>{t=!0,r(o)},{...a1(n,e),detectError:t}}function y1(n,e){if(!__INTLIFY_DROP_MESSAGE_COMPILER__&&ne(n)){const t=Ue(e.warnHtmlMessage)?e.warnHtmlMessage:!0;process.env.NODE_ENV!=="production"&&p1(n,t);const o=(e.onCacheKey||_1)(n),a=Fc[o];if(a)return a;const{ast:l,detectError:d}=v1(n,{...e,location:process.env.NODE_ENV!=="production",jit:!0}),h=Vd(l);return d?h:Fc[o]=h}else{if(process.env.NODE_ENV!=="production"&&!ir(n))return Go(`the message that is resolve with key '${e.key}' is not supported for jit compilation`),()=>n;const t=n.cacheKey;if(t){const r=Fc[t];return r||(Fc[t]=Vd(n))}else return Vd(n)}}let As=null;function C1(n){As=n}function E1(n,e,t){As&&As.emit("i18n:init",{timestamp:Date.now(),i18n:n,version:e,meta:t})}const w1=T1("function:translate");function T1(n){return e=>As&&As.emit(n,e)}const en={INVALID_ARGUMENT:MP,INVALID_DATE_ARGUMENT:18,INVALID_ISO_DATE_ARGUMENT:19,NOT_SUPPORT_NON_STRING_MESSAGE:20,NOT_SUPPORT_LOCALE_PROMISE_VALUE:21,NOT_SUPPORT_LOCALE_ASYNC_FUNCTION:22,NOT_SUPPORT_LOCALE_TYPE:23},b1=24;function so(n){return Na(n,null,process.env.NODE_ENV!=="production"?{messages:S1}:void 0)}const S1={[en.INVALID_ARGUMENT]:"Invalid arguments",[en.INVALID_DATE_ARGUMENT]:"The date provided is an invalid Date object.Make sure your Date represents a valid date.",[en.INVALID_ISO_DATE_ARGUMENT]:"The argument provided is not a valid ISO date string",[en.NOT_SUPPORT_NON_STRING_MESSAGE]:"Not support non-string message",[en.NOT_SUPPORT_LOCALE_PROMISE_VALUE]:"cannot support promise value",[en.NOT_SUPPORT_LOCALE_ASYNC_FUNCTION]:"cannot support async function",[en.NOT_SUPPORT_LOCALE_TYPE]:"cannot support locale type"};function kf(n,e){return e.locale!=null?R_(e.locale):R_(n.locale)}let Fd;function R_(n){if(ne(n))return n;if(Xe(n)){if(n.resolvedOnce&&Fd!=null)return Fd;if(n.constructor.name==="Function"){const e=n();if(NP(e))throw so(en.NOT_SUPPORT_LOCALE_PROMISE_VALUE);return Fd=e}else throw so(en.NOT_SUPPORT_LOCALE_ASYNC_FUNCTION)}else throw so(en.NOT_SUPPORT_LOCALE_TYPE)}function I1(n,e,t){return[...new Set([t,...vt(e)?e:Le(e)?Object.keys(e):ne(e)?[e]:[t]])]}function TC(n,e,t){const r=ne(t)?t:ks,o=n;o.__localeChainCache||(o.__localeChainCache=new Map);let a=o.__localeChainCache.get(r);if(!a){a=[];let l=[t];for(;vt(l);)l=O_(a,l,e);const d=vt(e)||!ke(e)?e:e.default?e.default:null;l=ne(d)?[d]:d,vt(l)&&O_(a,l,!1),o.__localeChainCache.set(r,a)}return a}function O_(n,e,t){let r=!0;for(let o=0;o<e.length&&Ue(r);o++){const a=e[o];ne(a)&&(r=A1(n,e[o],t))}return r}function A1(n,e,t){let r;const o=e.split("-");do{const a=o.join("-");r=k1(n,a,t),o.splice(-1,1)}while(o.length&&r===!0);return r}function k1(n,e,t){let r=!1;if(!n.includes(e)&&(r=!0,e)){r=e[e.length-1]!=="!";const o=e.replace(/!/g,"");n.push(o),(vt(t)||ke(t))&&t[o]&&(r=t[o])}return r}const jo=[];jo[0]={w:[0],i:[3,0],"[":[4],o:[7]};jo[1]={w:[1],".":[2],"[":[4],o:[7]};jo[2]={w:[2],i:[3,0],0:[3,0]};jo[3]={i:[3,0],0:[3,0],w:[1,1],".":[2,1],"[":[4,1],o:[7,1]};jo[4]={"'":[5,0],'"':[6,0],"[":[4,2],"]":[1,3],o:8,l:[4,0]};jo[5]={"'":[4,0],o:8,l:[5,0]};jo[6]={'"':[4,0],o:8,l:[6,0]};const N1=/^\s?(?:true|false|-?[\d.]+|'[^']*'|"[^"]*")\s?$/;function R1(n){return N1.test(n)}function O1(n){const e=n.charCodeAt(0),t=n.charCodeAt(n.length-1);return e===t&&(e===34||e===39)?n.slice(1,-1):n}function P1(n){if(n==null)return"o";switch(n.charCodeAt(0)){case 91:case 93:case 46:case 34:case 39:return n;case 95:case 36:case 45:return"i";case 9:case 10:case 13:case 160:case 65279:case 8232:case 8233:return"w"}return"i"}function M1(n){const e=n.trim();return n.charAt(0)==="0"&&isNaN(parseInt(n))?!1:R1(e)?O1(e):"*"+e}function D1(n){const e=[];let t=-1,r=0,o=0,a,l,d,h,f,g,_;const p=[];p[0]=()=>{l===void 0?l=d:l+=d},p[1]=()=>{l!==void 0&&(e.push(l),l=void 0)},p[2]=()=>{p[0](),o++},p[3]=()=>{if(o>0)o--,r=4,p[0]();else{if(o=0,l===void 0||(l=M1(l),l===!1))return!1;p[1]()}};function w(){const C=n[t+1];if(r===5&&C==="'"||r===6&&C==='"')return t++,d="\\"+C,p[0](),!0}for(;r!==null;)if(t++,a=n[t],!(a==="\\"&&w())){if(h=P1(a),_=jo[r],f=_[h]||_.l||8,f===8||(r=f[0],f[1]!==void 0&&(g=p[f[1]],g&&(d=a,g()===!1))))return;if(r===7)return e}}const P_=new Map;function L1(n,e){return Le(n)?n[e]:null}function x1(n,e){if(!Le(n))return null;let t=P_.get(e);if(t||(t=D1(e),t&&P_.set(e,t)),!t)return null;const r=t.length;let o=n,a=0;for(;a<r;){const l=t[a];if(wC.includes(l)&&ir(o))return null;const d=o[l];if(d===void 0||Xe(o))return null;o=d,a++}return o}const _n={NOT_FOUND_KEY:1,FALLBACK_TO_TRANSLATE:2,CANNOT_FORMAT_NUMBER:3,FALLBACK_TO_NUMBER_FORMAT:4,CANNOT_FORMAT_DATE:5,FALLBACK_TO_DATE_FORMAT:6,EXPERIMENTAL_CUSTOM_MESSAGE_COMPILER:7},U1=8,B1={[_n.NOT_FOUND_KEY]:"Not found '{key}' key in '{locale}' locale messages.",[_n.FALLBACK_TO_TRANSLATE]:"Fall back to translate '{key}' key with '{target}' locale.",[_n.CANNOT_FORMAT_NUMBER]:"Cannot format a number value due to not supported Intl.NumberFormat.",[_n.FALLBACK_TO_NUMBER_FORMAT]:"Fall back to number format '{key}' key with '{target}' locale.",[_n.CANNOT_FORMAT_DATE]:"Cannot format a date value due to not supported Intl.DateTimeFormat.",[_n.FALLBACK_TO_DATE_FORMAT]:"Fall back to datetime format '{key}' key with '{target}' locale.",[_n.EXPERIMENTAL_CUSTOM_MESSAGE_COMPILER]:"This project is using Custom Message Compiler, which is an experimental feature. It may receive breaking changes or be removed in the future."};function Ei(n,...e){return zl(B1[n],...e)}const V1="11.1.3",ql=-1,ks="en-US",El="",M_=n=>`${n.charAt(0).toLocaleUpperCase()}${n.substr(1)}`;function F1(){return{upper:(n,e)=>e==="text"&&ne(n)?n.toUpperCase():e==="vnode"&&Le(n)&&"__v_isVNode"in n?n.children.toUpperCase():n,lower:(n,e)=>e==="text"&&ne(n)?n.toLowerCase():e==="vnode"&&Le(n)&&"__v_isVNode"in n?n.children.toLowerCase():n,capitalize:(n,e)=>e==="text"&&ne(n)?M_(n):e==="vnode"&&Le(n)&&"__v_isVNode"in n?M_(n.children):n}}let bC;function H1(n){bC=n}let SC;function $1(n){SC=n}let IC;function K1(n){IC=n}let AC=null;const W1=n=>{AC=n},z1=()=>AC;let kC=null;const D_=n=>{kC=n},G1=()=>kC;let L_=0;function q1(n={}){const e=Xe(n.onWarn)?n.onWarn:Go,t=ne(n.version)?n.version:V1,r=ne(n.locale)||Xe(n.locale)?n.locale:ks,o=Xe(r)?ks:r,a=vt(n.fallbackLocale)||ke(n.fallbackLocale)||ne(n.fallbackLocale)||n.fallbackLocale===!1?n.fallbackLocale:o,l=ke(n.messages)?n.messages:Hd(o),d=ke(n.datetimeFormats)?n.datetimeFormats:Hd(o),h=ke(n.numberFormats)?n.numberFormats:Hd(o),f=Ot(Ye(),n.modifiers,F1()),g=n.pluralRules||Ye(),_=Xe(n.missing)?n.missing:null,p=Ue(n.missingWarn)||wa(n.missingWarn)?n.missingWarn:!0,w=Ue(n.fallbackWarn)||wa(n.fallbackWarn)?n.fallbackWarn:!0,C=!!n.fallbackFormat,T=!!n.unresolving,k=Xe(n.postTranslation)?n.postTranslation:null,S=ke(n.processor)?n.processor:null,N=Ue(n.warnHtmlMessage)?n.warnHtmlMessage:!0,D=!!n.escapeParameter,L=Xe(n.messageCompiler)?n.messageCompiler:bC;process.env.NODE_ENV!=="production"&&Xe(n.messageCompiler)&&bf(Ei(_n.EXPERIMENTAL_CUSTOM_MESSAGE_COMPILER));const K=Xe(n.messageResolver)?n.messageResolver:SC||L1,q=Xe(n.localeFallbacker)?n.localeFallbacker:IC||I1,M=Le(n.fallbackContext)?n.fallbackContext:void 0,ce=n,ae=Le(ce.__datetimeFormatters)?ce.__datetimeFormatters:new Map,X=Le(ce.__numberFormatters)?ce.__numberFormatters:new Map,ee=Le(ce.__meta)?ce.__meta:{};L_++;const ue={version:t,cid:L_,locale:r,fallbackLocale:a,messages:l,modifiers:f,pluralRules:g,missing:_,missingWarn:p,fallbackWarn:w,fallbackFormat:C,unresolving:T,postTranslation:k,processor:S,warnHtmlMessage:N,escapeParameter:D,messageCompiler:L,messageResolver:K,localeFallbacker:q,fallbackContext:M,onWarn:e,__meta:ee};return ue.datetimeFormats=d,ue.numberFormats=h,ue.__datetimeFormatters=ae,ue.__numberFormatters=X,process.env.NODE_ENV!=="production"&&(ue.__v_emitter=ce.__v_emitter!=null?ce.__v_emitter:void 0),(process.env.NODE_ENV!=="production"||__INTLIFY_PROD_DEVTOOLS__)&&E1(ue,t,ee),ue}const Hd=n=>({[n]:Ye()});function jl(n,e){return n instanceof RegExp?n.test(e):n}function NC(n,e){return n instanceof RegExp?n.test(e):n}function Nf(n,e,t,r,o){const{missing:a,onWarn:l}=n;if(process.env.NODE_ENV!=="production"){const d=n.__v_emitter;d&&d.emit("missing",{locale:t,key:e,type:o,groupId:`${o}:${e}`})}if(a!==null){const d=a(n,t,e,o);return ne(d)?d:e}else return process.env.NODE_ENV!=="production"&&NC(r,e)&&l(Ei(_n.NOT_FOUND_KEY,{key:e,locale:t})),e}function is(n,e,t){const r=n;r.__localeChainCache=new Map,n.localeFallbacker(n,t,e)}function RC(n,e){return n===e?!1:n.split("-")[0]===e.split("-")[0]}function j1(n,e){const t=e.indexOf(n);if(t===-1)return!1;for(let r=t+1;r<e.length;r++)if(RC(n,e[r]))return!0;return!1}const x_=typeof Intl<"u",OC={dateTimeFormat:x_&&typeof Intl.DateTimeFormat<"u",numberFormat:x_&&typeof Intl.NumberFormat<"u"};function U_(n,...e){const{datetimeFormats:t,unresolving:r,fallbackLocale:o,onWarn:a,localeFallbacker:l}=n,{__datetimeFormatters:d}=n;if(process.env.NODE_ENV!=="production"&&!OC.dateTimeFormat)return a(Ei(_n.CANNOT_FORMAT_DATE)),El;const[h,f,g,_]=Ah(...e),p=Ue(g.missingWarn)?g.missingWarn:n.missingWarn,w=Ue(g.fallbackWarn)?g.fallbackWarn:n.fallbackWarn,C=!!g.part,T=kf(n,g),k=l(n,o,T);if(!ne(h)||h==="")return new Intl.DateTimeFormat(T,_).format(f);let S={},N,D=null,L=T,K=null;const q="datetime format";for(let ae=0;ae<k.length;ae++){if(N=K=k[ae],process.env.NODE_ENV!=="production"&&T!==N&&jl(w,h)&&a(Ei(_n.FALLBACK_TO_DATE_FORMAT,{key:h,target:N})),process.env.NODE_ENV!=="production"&&T!==N){const X=n.__v_emitter;X&&X.emit("fallback",{type:q,key:h,from:L,to:K,groupId:`${q}:${h}`})}if(S=t[N]||{},D=S[h],ke(D))break;Nf(n,h,N,p,q),L=K}if(!ke(D)||!ne(N))return r?ql:h;let M=`${N}__${h}`;Gl(_)||(M=`${M}__${JSON.stringify(_)}`);let ce=d.get(M);return ce||(ce=new Intl.DateTimeFormat(N,Ot({},D,_)),d.set(M,ce)),C?ce.formatToParts(f):ce.format(f)}const PC=["localeMatcher","weekday","era","year","month","day","hour","minute","second","timeZoneName","formatMatcher","hour12","timeZone","dateStyle","timeStyle","calendar","dayPeriod","numberingSystem","hourCycle","fractionalSecondDigits"];function Ah(...n){const[e,t,r,o]=n,a=Ye();let l=Ye(),d;if(ne(e)){const h=e.match(/(\d{4}-\d{2}-\d{2})(T|\s)?(.*)/);if(!h)throw so(en.INVALID_ISO_DATE_ARGUMENT);const f=h[3]?h[3].trim().startsWith("T")?`${h[1].trim()}${h[3].trim()}`:`${h[1].trim()}T${h[3].trim()}`:h[1].trim();d=new Date(f);try{d.toISOString()}catch{throw so(en.INVALID_ISO_DATE_ARGUMENT)}}else if(IP(e)){if(isNaN(e.getTime()))throw so(en.INVALID_DATE_ARGUMENT);d=e}else if(Tt(e))d=e;else throw so(en.INVALID_ARGUMENT);return ne(t)?a.key=t:ke(t)&&Object.keys(t).forEach(h=>{PC.includes(h)?l[h]=t[h]:a[h]=t[h]}),ne(r)?a.locale=r:ke(r)&&(l=r),ke(o)&&(l=o),[a.key||"",d,a,l]}function B_(n,e,t){const r=n;for(const o in t){const a=`${e}__${o}`;r.__datetimeFormatters.has(a)&&r.__datetimeFormatters.delete(a)}}function V_(n,...e){const{numberFormats:t,unresolving:r,fallbackLocale:o,onWarn:a,localeFallbacker:l}=n,{__numberFormatters:d}=n;if(process.env.NODE_ENV!=="production"&&!OC.numberFormat)return a(Ei(_n.CANNOT_FORMAT_NUMBER)),El;const[h,f,g,_]=kh(...e),p=Ue(g.missingWarn)?g.missingWarn:n.missingWarn,w=Ue(g.fallbackWarn)?g.fallbackWarn:n.fallbackWarn,C=!!g.part,T=kf(n,g),k=l(n,o,T);if(!ne(h)||h==="")return new Intl.NumberFormat(T,_).format(f);let S={},N,D=null,L=T,K=null;const q="number format";for(let ae=0;ae<k.length;ae++){if(N=K=k[ae],process.env.NODE_ENV!=="production"&&T!==N&&jl(w,h)&&a(Ei(_n.FALLBACK_TO_NUMBER_FORMAT,{key:h,target:N})),process.env.NODE_ENV!=="production"&&T!==N){const X=n.__v_emitter;X&&X.emit("fallback",{type:q,key:h,from:L,to:K,groupId:`${q}:${h}`})}if(S=t[N]||{},D=S[h],ke(D))break;Nf(n,h,N,p,q),L=K}if(!ke(D)||!ne(N))return r?ql:h;let M=`${N}__${h}`;Gl(_)||(M=`${M}__${JSON.stringify(_)}`);let ce=d.get(M);return ce||(ce=new Intl.NumberFormat(N,Ot({},D,_)),d.set(M,ce)),C?ce.formatToParts(f):ce.format(f)}const MC=["localeMatcher","style","currency","currencyDisplay","currencySign","useGrouping","minimumIntegerDigits","minimumFractionDigits","maximumFractionDigits","minimumSignificantDigits","maximumSignificantDigits","compactDisplay","notation","signDisplay","unit","unitDisplay","roundingMode","roundingPriority","roundingIncrement","trailingZeroDisplay"];function kh(...n){const[e,t,r,o]=n,a=Ye();let l=Ye();if(!Tt(e))throw so(en.INVALID_ARGUMENT);const d=e;return ne(t)?a.key=t:ke(t)&&Object.keys(t).forEach(h=>{MC.includes(h)?l[h]=t[h]:a[h]=t[h]}),ne(r)?a.locale=r:ke(r)&&(l=r),ke(o)&&(l=o),[a.key||"",d,a,l]}function F_(n,e,t){const r=n;for(const o in t){const a=`${e}__${o}`;r.__numberFormatters.has(a)&&r.__numberFormatters.delete(a)}}const Y1=n=>n,J1=n=>"",Q1="text",X1=n=>n.length===0?"":Tf(n),Z1=RP;function H_(n,e){return n=Math.abs(n),e===2?n?n>1?1:0:1:n?Math.min(n,2):0}function eM(n){const e=Tt(n.pluralIndex)?n.pluralIndex:-1;return n.named&&(Tt(n.named.count)||Tt(n.named.n))?Tt(n.named.count)?n.named.count:Tt(n.named.n)?n.named.n:e:e}function tM(n,e){e.count||(e.count=n),e.n||(e.n=n)}function nM(n={}){const e=n.locale,t=eM(n),r=Le(n.pluralRules)&&ne(e)&&Xe(n.pluralRules[e])?n.pluralRules[e]:H_,o=Le(n.pluralRules)&&ne(e)&&Xe(n.pluralRules[e])?H_:void 0,a=S=>S[r(t,S.length,o)],l=n.list||[],d=S=>l[S],h=n.named||Ye();Tt(n.pluralIndex)&&tM(t,h);const f=S=>h[S];function g(S,N){const D=Xe(n.messages)?n.messages(S,!!N):Le(n.messages)?n.messages[S]:!1;return D||(n.parent?n.parent.message(S):J1)}const _=S=>n.modifiers?n.modifiers[S]:Y1,p=ke(n.processor)&&Xe(n.processor.normalize)?n.processor.normalize:X1,w=ke(n.processor)&&Xe(n.processor.interpolate)?n.processor.interpolate:Z1,C=ke(n.processor)&&ne(n.processor.type)?n.processor.type:Q1,k={list:d,named:f,plural:a,linked:(S,...N)=>{const[D,L]=N;let K="text",q="";N.length===1?Le(D)?(q=D.modifier||q,K=D.type||K):ne(D)&&(q=D||q):N.length===2&&(ne(D)&&(q=D||q),ne(L)&&(K=L||K));const M=g(S,!0)(k),ce=K==="vnode"&&vt(M)&&q?M[0]:M;return q?_(q)(ce,K):ce},message:g,type:C,interpolate:w,normalize:p,values:Ot(Ye(),l,h)};return k}const $_=()=>"",or=n=>Xe(n);function K_(n,...e){const{fallbackFormat:t,postTranslation:r,unresolving:o,messageCompiler:a,fallbackLocale:l,messages:d}=n,[h,f]=Nh(...e),g=Ue(f.missingWarn)?f.missingWarn:n.missingWarn,_=Ue(f.fallbackWarn)?f.fallbackWarn:n.fallbackWarn,p=Ue(f.escapeParameter)?f.escapeParameter:n.escapeParameter,w=!!f.resolvedMessage,C=ne(f.default)||Ue(f.default)?Ue(f.default)?a?h:()=>h:f.default:t?a?h:()=>h:null,T=t||C!=null&&(ne(C)||Xe(C)),k=kf(n,f);p&&rM(f);let[S,N,D]=w?[h,k,d[k]||Ye()]:DC(n,h,k,l,_,g),L=S,K=h;if(!w&&!(ne(L)||ir(L)||or(L))&&T&&(L=C,K=L),!w&&(!(ne(L)||ir(L)||or(L))||!ne(N)))return o?ql:h;if(process.env.NODE_ENV!=="production"&&ne(L)&&n.messageCompiler==null)return Go(`The message format compilation is not supported in this build. Because message compiler isn't included. You need to pre-compilation all message format. So translate function return '${h}'.`),h;let q=!1;const M=()=>{q=!0},ce=or(L)?L:LC(n,h,N,L,K,M);if(q)return L;const ae=sM(n,N,D,f),X=nM(ae),ee=oM(n,ce,X),ue=r?r(ee,h):ee;if(process.env.NODE_ENV!=="production"||__INTLIFY_PROD_DEVTOOLS__){const Be={timestamp:Date.now(),key:ne(h)?h:or(L)?L.key:"",locale:N||(or(L)?L.locale:""),format:ne(L)?L:or(L)?L.source:"",message:ue};Be.meta=Ot({},n.__meta,z1()||{}),w1(Be)}return ue}function rM(n){vt(n.list)?n.list=n.list.map(e=>ne(e)?T_(e):e):Le(n.named)&&Object.keys(n.named).forEach(e=>{ne(n.named[e])&&(n.named[e]=T_(n.named[e]))})}function DC(n,e,t,r,o,a){const{messages:l,onWarn:d,messageResolver:h,localeFallbacker:f}=n,g=f(n,r,t);let _=Ye(),p,w=null,C=t,T=null;const k="translate";for(let S=0;S<g.length;S++){if(p=T=g[S],process.env.NODE_ENV!=="production"&&t!==p&&!RC(t,p)&&jl(o,e)&&d(Ei(_n.FALLBACK_TO_TRANSLATE,{key:e,target:p})),process.env.NODE_ENV!=="production"&&t!==p){const K=n.__v_emitter;K&&K.emit("fallback",{type:k,key:e,from:C,to:T,groupId:`${k}:${e}`})}_=l[p]||Ye();let N=null,D,L;if(process.env.NODE_ENV!=="production"&&wr&&(N=window.performance.now(),D="intlify-message-resolve-start",L="intlify-message-resolve-end",Un&&Un(D)),(w=h(_,e))===null&&(w=_[e]),process.env.NODE_ENV!=="production"&&wr){const K=window.performance.now(),q=n.__v_emitter;q&&N&&w&&q.emit("message-resolve",{type:"message-resolve",key:e,message:w,time:K-N,groupId:`${k}:${e}`}),D&&L&&Un&&Ci&&(Un(L),Ci("intlify message resolve",D,L))}if(ne(w)||ir(w)||or(w))break;if(!j1(p,g)){const K=Nf(n,e,p,a,k);K!==e&&(w=K)}C=T}return[w,p,_]}function LC(n,e,t,r,o,a){const{messageCompiler:l,warnHtmlMessage:d}=n;if(or(r)){const p=r;return p.locale=p.locale||t,p.key=p.key||e,p}if(l==null){const p=()=>r;return p.locale=t,p.key=e,p}let h=null,f,g;process.env.NODE_ENV!=="production"&&wr&&(h=window.performance.now(),f="intlify-message-compilation-start",g="intlify-message-compilation-end",Un&&Un(f));const _=l(r,iM(n,t,o,r,d,a));if(process.env.NODE_ENV!=="production"&&wr){const p=window.performance.now(),w=n.__v_emitter;w&&h&&w.emit("message-compilation",{type:"message-compilation",message:r,time:p-h,groupId:`translate:${e}`}),f&&g&&Un&&Ci&&(Un(g),Ci("intlify message compilation",f,g))}return _.locale=t,_.key=e,_.source=r,_}function oM(n,e,t){let r=null,o,a;process.env.NODE_ENV!=="production"&&wr&&(r=window.performance.now(),o="intlify-message-evaluation-start",a="intlify-message-evaluation-end",Un&&Un(o));const l=e(t);if(process.env.NODE_ENV!=="production"&&wr){const d=window.performance.now(),h=n.__v_emitter;h&&r&&h.emit("message-evaluation",{type:"message-evaluation",value:l,time:d-r,groupId:`translate:${e.key}`}),o&&a&&Un&&Ci&&(Un(a),Ci("intlify message evaluation",o,a))}return l}function Nh(...n){const[e,t,r]=n,o=Ye();if(!ne(e)&&!Tt(e)&&!or(e)&&!ir(e))throw so(en.INVALID_ARGUMENT);const a=Tt(e)?String(e):(or(e),e);return Tt(t)?o.plural=t:ne(t)?o.default=t:ke(t)&&!Gl(t)?o.named=t:vt(t)&&(o.list=t),Tt(r)?o.plural=r:ne(r)?o.default=r:ke(r)&&Ot(o,r),[a,o]}function iM(n,e,t,r,o,a){return{locale:e,key:t,warnHtmlMessage:o,onError:l=>{if(a&&a(l),process.env.NODE_ENV!=="production"){const d=aM(r),h=`Message compilation error: ${l.message}`,f=l.location&&d&&OP(d,l.location.start.offset,l.location.end.offset),g=n.__v_emitter;g&&d&&g.emit("compile-error",{message:d,error:l.message,start:l.location&&l.location.start.offset,end:l.location&&l.location.end.offset,groupId:`translate:${t}`}),console.error(f?`${h}
|
27
|
+
${f}`:h)}else throw l},onCacheKey:l=>bP(e,t,l)}}function aM(n){if(ne(n))return n;if(n.loc&&n.loc.source)return n.loc.source}function sM(n,e,t,r){const{modifiers:o,pluralRules:a,messageResolver:l,fallbackLocale:d,fallbackWarn:h,missingWarn:f,fallbackContext:g}=n,p={locale:e,modifiers:o,pluralRules:a,messages:(w,C)=>{let T=l(t,w);if(T==null&&(g||C)){const[,,k]=DC(g||n,w,e,d,h,f);T=l(k,w)}if(ne(T)||ir(T)){let k=!1;const N=LC(n,w,e,T,w,()=>{k=!0});return k?$_:N}else return or(T)?T:$_}};return n.processor&&(p.processor=n.processor),r.list&&(p.list=r.list),r.named&&(p.named=r.named),Tt(r.plural)&&(p.pluralIndex=r.plural),p}s1();/*!
|
28
28
|
* vue-i18n v11.1.3
|
29
29
|
* (c) 2025 kazuya kawaguchi
|
30
30
|
* Released under the MIT License.
|
31
|
-
*/const
|
32
|
-
About how to use the Composition API mode, see https://vue-i18n.intlify.dev/guide/advanced/composition.html`,[xr.DEPRECATE_TRANSLATE_CUSTOME_DIRECTIVE]:"'v-t' has been deprecated in v11. Use translate APIs ('t' or '$t') instead."};function Fs(n,...e){return zl(uM[n],...e)}function Rs(n){if(!Le(n)||ir(n))return n;for(const e in n)if(yr(n,e))if(!e.includes("."))Le(n[e])&&Rs(n[e]);else{const t=e.split("."),r=t.length-1;let o=n,a=!1;for(let l=0;l<r;l++){if(t[l]==="__proto__")throw new Error(`unsafe key: ${t[l]}`);if(t[l]in o||(o[t[l]]=Ye()),!Le(o[t[l]])){process.env.NODE_ENV!=="production"&&Go(Fs(xr.IGNORE_OBJ_FLATTEN,{key:t[l]})),a=!0;break}o=o[t[l]]}if(a||(ir(o)?wC.includes(t[r])||delete n[e]:(o[t[r]]=n[e],delete n[e])),!ir(o)){const l=o[t[r]];Le(l)&&Rs(l)}}return n}function Rf(n,e){const{messages:t,__i18n:r,messageResolver:o,flatJson:a}=e,l=ke(t)?t:vt(r)?Ye():{[n]:Ye()};if(vt(r)&&r.forEach(d=>{if("locale"in d&&"resource"in d){const{locale:h,resource:f}=d;h?(l[h]=l[h]||Ye(),ll(f,l[h])):ll(f,l)}else ne(d)&&ll(JSON.parse(d),l)}),o==null&&a)for(const d in l)yr(l,d)&&Rs(l[d]);return l}function BC(n){return n.type}function VC(n,e,t){let r=Le(e.messages)?e.messages:Ye();"__i18nGlobal"in t&&(r=Rf(n.locale.value,{messages:r,__i18n:t.__i18nGlobal}));const o=Object.keys(r);o.length&&o.forEach(a=>{n.mergeLocaleMessage(a,r[a])});{if(Le(e.datetimeFormats)){const a=Object.keys(e.datetimeFormats);a.length&&a.forEach(l=>{n.mergeDateTimeFormat(l,e.datetimeFormats[l])})}if(Le(e.numberFormats)){const a=Object.keys(e.numberFormats);a.length&&a.forEach(l=>{n.mergeNumberFormat(l,e.numberFormats[l])})}}}function W_(n){return c.createVNode(c.Text,null,n,0)}const z_="__INTLIFY_META__",G_=()=>[],dM=()=>!1;let q_=0;function j_(n){return(e,t,r,o)=>n(t,r,c.getCurrentInstance()||void 0,o)}const hM=()=>{const n=c.getCurrentInstance();let e=null;return n&&(e=BC(n)[z_])?{[z_]:e}:null};function Of(n={}){const{__root:e,__injectWithOption:t}=n,r=e===void 0,o=n.flatJson,a=wr?c.ref:c.shallowRef;let l=Ue(n.inheritLocale)?n.inheritLocale:!0;const d=a(e&&l?e.locale.value:ne(n.locale)?n.locale:ks),h=a(e&&l?e.fallbackLocale.value:ne(n.fallbackLocale)||vt(n.fallbackLocale)||ke(n.fallbackLocale)||n.fallbackLocale===!1?n.fallbackLocale:d.value),f=a(Rf(d.value,n)),g=a(ke(n.datetimeFormats)?n.datetimeFormats:{[d.value]:{}}),_=a(ke(n.numberFormats)?n.numberFormats:{[d.value]:{}});let p=e?e.missingWarn:Ue(n.missingWarn)||wa(n.missingWarn)?n.missingWarn:!0,w=e?e.fallbackWarn:Ue(n.fallbackWarn)||wa(n.fallbackWarn)?n.fallbackWarn:!0,C=e?e.fallbackRoot:Ue(n.fallbackRoot)?n.fallbackRoot:!0,T=!!n.fallbackFormat,k=Xe(n.missing)?n.missing:null,I=Xe(n.missing)?j_(n.missing):null,N=Xe(n.postTranslation)?n.postTranslation:null,D=e?e.warnHtmlMessage:Ue(n.warnHtmlMessage)?n.warnHtmlMessage:!0,L=!!n.escapeParameter;const K=e?e.modifiers:ke(n.modifiers)?n.modifiers:{};let q=n.pluralRules||e&&e.pluralRules,M;M=(()=>{r&&D_(null);const F={version:sM,locale:d.value,fallbackLocale:h.value,messages:f.value,modifiers:K,pluralRules:q,missing:I===null?void 0:I,missingWarn:p,fallbackWarn:w,fallbackFormat:T,unresolving:!0,postTranslation:N===null?void 0:N,warnHtmlMessage:D,escapeParameter:L,messageResolver:n.messageResolver,messageCompiler:n.messageCompiler,__meta:{framework:"vue"}};F.datetimeFormats=g.value,F.numberFormats=_.value,F.__datetimeFormatters=ke(M)?M.__datetimeFormatters:void 0,F.__numberFormatters=ke(M)?M.__numberFormatters:void 0,process.env.NODE_ENV!=="production"&&(F.__v_emitter=ke(M)?M.__v_emitter:void 0);const J=G1(F);return r&&D_(J),J})(),is(M,d.value,h.value);function ae(){return[d.value,h.value,f.value,g.value,_.value]}const X=c.computed({get:()=>d.value,set:F=>{M.locale=F,d.value=F}}),ee=c.computed({get:()=>h.value,set:F=>{M.fallbackLocale=F,h.value=F,is(M,d.value,F)}}),ue=c.computed(()=>f.value),Be=c.computed(()=>g.value),Ct=c.computed(()=>_.value);function rn(){return Xe(N)?N:null}function qt(F){N=F,M.postTranslation=F}function Mt(){return k}function at(F){F!==null&&(I=j_(F)),k=F,M.missing=I}function Et(F,J){return F!=="translate"||!J.resolvedMessage}const on=(F,J,Ne,ze,cr,Co)=>{ae();let kr;try{process.env.NODE_ENV!=="production"||__INTLIFY_PROD_DEVTOOLS__,r||(M.fallbackContext=e?z1():void 0),kr=F(M)}finally{process.env.NODE_ENV!=="production"||__INTLIFY_PROD_DEVTOOLS__,r||(M.fallbackContext=void 0)}if(Ne!=="translate exists"&&Tt(kr)&&kr===ql||Ne==="translate exists"&&!kr){const[lr,Ha]=J();if(process.env.NODE_ENV!=="production"&&e&&ne(lr)&&Et(Ne,Ha)&&(C&&(jl(w,lr)||NC(p,lr))&&Go(Fs(xr.FALLBACK_TO_ROOT,{key:lr,type:Ne})),process.env.NODE_ENV!=="production")){const{__v_emitter:Ni}=M;Ni&&C&&Ni.emit("fallback",{type:Ne,key:lr,to:"global",groupId:`${Ne}:${lr}`})}return e&&C?ze(e):cr(lr)}else{if(Co(kr))return kr;throw Cn(rt.UNEXPECTED_RETURN_TYPE)}};function St(...F){return on(J=>Reflect.apply(K_,null,[J,...F]),()=>Nh(...F),"translate",J=>Reflect.apply(J.t,J,[...F]),J=>J,J=>ne(J))}function Yo(...F){const[J,Ne,ze]=F;if(ze&&!Le(ze))throw Cn(rt.INVALID_ARGUMENT);return St(J,Ne,Ot({resolvedMessage:!0},ze||{}))}function Ua(...F){return on(J=>Reflect.apply(U_,null,[J,...F]),()=>Ah(...F),"datetime format",J=>Reflect.apply(J.d,J,[...F]),()=>El,J=>ne(J))}function Ba(...F){return on(J=>Reflect.apply(V_,null,[J,...F]),()=>kh(...F),"number format",J=>Reflect.apply(J.n,J,[...F]),()=>El,J=>ne(J))}function Sr(F){return F.map(J=>ne(J)||Tt(J)||Ue(J)?W_(String(J)):J)}const Va={normalize:Sr,interpolate:F=>F,type:"vnode"};function Ar(...F){return on(J=>{let Ne;const ze=J;try{ze.processor=Va,Ne=Reflect.apply(K_,null,[ze,...F])}finally{ze.processor=null}return Ne},()=>Nh(...F),"translate",J=>J[Rh](...F),J=>[W_(J)],J=>vt(J))}function qr(...F){return on(J=>Reflect.apply(V_,null,[J,...F]),()=>kh(...F),"number format",J=>J[Ph](...F),G_,J=>ne(J)||vt(J))}function Fa(...F){return on(J=>Reflect.apply(U_,null,[J,...F]),()=>Ah(...F),"datetime format",J=>J[Oh](...F),G_,J=>ne(J)||vt(J))}function _o(F){q=F,M.pluralRules=q}function vo(F,J){return on(()=>{if(!F)return!1;const Ne=ne(J)?J:d.value,ze=En(Ne),cr=M.messageResolver(ze,F);return ir(cr)||or(cr)||ne(cr)},()=>[F],"translate exists",Ne=>Reflect.apply(Ne.te,Ne,[F,J]),dM,Ne=>Ue(Ne))}function yo(F){let J=null;const Ne=TC(M,h.value,d.value);for(let ze=0;ze<Ne.length;ze++){const cr=f.value[Ne[ze]]||{},Co=M.messageResolver(cr,F);if(Co!=null){J=Co;break}}return J}function Vt(F){const J=yo(F);return J??(e?e.tm(F)||{}:{})}function En(F){return f.value[F]||{}}function Qo(F,J){if(o){const Ne={[F]:J};for(const ze in Ne)yr(Ne,ze)&&Rs(Ne[ze]);J=Ne[F]}f.value[F]=J,M.messages=f.value}function wn(F,J){f.value[F]=f.value[F]||{};const Ne={[F]:J};if(o)for(const ze in Ne)yr(Ne,ze)&&Rs(Ne[ze]);J=Ne[F],ll(J,f.value[F]),M.messages=f.value}function A(F){return g.value[F]||{}}function R(F,J){g.value[F]=J,M.datetimeFormats=g.value,B_(M,F,J)}function G(F,J){g.value[F]=Ot(g.value[F]||{},J),M.datetimeFormats=g.value,B_(M,F,J)}function oe(F){return _.value[F]||{}}function Je(F,J){_.value[F]=J,M.numberFormats=_.value,F_(M,F,J)}function et(F,J){_.value[F]=Ot(_.value[F]||{},J),M.numberFormats=_.value,F_(M,F,J)}q_++,e&&wr&&(c.watch(e.locale,F=>{l&&(d.value=F,M.locale=F,is(M,d.value,h.value))}),c.watch(e.fallbackLocale,F=>{l&&(h.value=F,M.fallbackLocale=F,is(M,d.value,h.value))}));const Me={id:q_,locale:X,fallbackLocale:ee,get inheritLocale(){return l},set inheritLocale(F){l=F,F&&e&&(d.value=e.locale.value,h.value=e.fallbackLocale.value,is(M,d.value,h.value))},get availableLocales(){return Object.keys(f.value).sort()},messages:ue,get modifiers(){return K},get pluralRules(){return q||{}},get isGlobal(){return r},get missingWarn(){return p},set missingWarn(F){p=F,M.missingWarn=p},get fallbackWarn(){return w},set fallbackWarn(F){w=F,M.fallbackWarn=w},get fallbackRoot(){return C},set fallbackRoot(F){C=F},get fallbackFormat(){return T},set fallbackFormat(F){T=F,M.fallbackFormat=T},get warnHtmlMessage(){return D},set warnHtmlMessage(F){D=F,M.warnHtmlMessage=F},get escapeParameter(){return L},set escapeParameter(F){L=F,M.escapeParameter=F},t:St,getLocaleMessage:En,setLocaleMessage:Qo,mergeLocaleMessage:wn,getPostTranslationHandler:rn,setPostTranslationHandler:qt,getMissingHandler:Mt,setMissingHandler:at,[xC]:_o};return Me.datetimeFormats=Be,Me.numberFormats=Ct,Me.rt=Yo,Me.te=vo,Me.tm=Vt,Me.d=Ua,Me.n=Ba,Me.getDateTimeFormat=A,Me.setDateTimeFormat=R,Me.mergeDateTimeFormat=G,Me.getNumberFormat=oe,Me.setNumberFormat=Je,Me.mergeNumberFormat=et,Me[UC]=t,Me[Rh]=Ar,Me[Oh]=Fa,Me[Ph]=qr,process.env.NODE_ENV!=="production"&&(Me[Ci]=F=>{M.__v_emitter=F},Me[Ns]=()=>{M.__v_emitter=void 0}),Me}const FC="vue-i18n: composer properties",$d={"vue-devtools-plugin-vue-i18n":"Vue I18n DevTools","vue-i18n-resource-inspector":"Vue I18n DevTools","vue-i18n-timeline":"Vue I18n"},fM={"vue-i18n-resource-inspector":"Search for scopes ..."},mM={"vue-i18n-timeline":16764185};let Dh;async function gM(n,e){return new Promise((t,r)=>{try{vf({id:"vue-devtools-plugin-vue-i18n",label:$d["vue-devtools-plugin-vue-i18n"],packageName:"vue-i18n",homepage:"https://vue-i18n.intlify.dev",logo:"https://vue-i18n.intlify.dev/vue-i18n-devtools-logo.png",componentStateTypes:[FC],app:n},o=>{Dh=o,o.on.visitComponentTree(({componentInstance:l,treeNode:d})=>{pM(l,d,e)}),o.on.inspectComponent(({componentInstance:l,instanceData:d})=>{l.vnode.el&&l.vnode.el.__VUE_I18N__&&d&&(e.mode==="legacy"?l.vnode.el.__VUE_I18N__!==e.global.__composer&&Y_(d,l.vnode.el.__VUE_I18N__):Y_(d,l.vnode.el.__VUE_I18N__))}),o.addInspector({id:"vue-i18n-resource-inspector",label:$d["vue-i18n-resource-inspector"],icon:"language",treeFilterPlaceholder:fM["vue-i18n-resource-inspector"]}),o.on.getInspectorTree(l=>{l.app===n&&l.inspectorId==="vue-i18n-resource-inspector"&&EM(l,e)});const a=new Map;o.on.getInspectorState(async l=>{if(l.app===n&&l.inspectorId==="vue-i18n-resource-inspector")if(o.unhighlightElement(),TM(l,e),l.nodeId==="global"){if(!a.has(l.app)){const[d]=await o.getComponentInstances(l.app);a.set(l.app,d)}o.highlightElement(a.get(l.app))}else{const d=wM(l.nodeId,e);d&&o.highlightElement(d)}}),o.on.editInspectorState(l=>{l.app===n&&l.inspectorId==="vue-i18n-resource-inspector"&&IM(l,e)}),o.addTimelineLayer({id:"vue-i18n-timeline",label:$d["vue-i18n-timeline"],color:mM["vue-i18n-timeline"]}),t(!0)})}catch(o){console.error(o),r(!1)}})}function HC(n){return n.type.name||n.type.displayName||n.type.__file||"Anonymous"}function pM(n,e,t){const r=t.mode==="composition"?t.global:t.global.__composer;if(n&&n.vnode.el&&n.vnode.el.__VUE_I18N__&&n.vnode.el.__VUE_I18N__!==r){const o={label:`i18n (${HC(n)} Scope)`,textColor:0,backgroundColor:16764185};e.tags.push(o)}}function Y_(n,e){const t=FC;n.state.push({type:t,key:"locale",editable:!0,value:e.locale.value}),n.state.push({type:t,key:"availableLocales",editable:!1,value:e.availableLocales}),n.state.push({type:t,key:"fallbackLocale",editable:!0,value:e.fallbackLocale.value}),n.state.push({type:t,key:"inheritLocale",editable:!0,value:e.inheritLocale}),n.state.push({type:t,key:"messages",editable:!1,value:Pf(e.messages.value)}),n.state.push({type:t,key:"datetimeFormats",editable:!1,value:e.datetimeFormats.value}),n.state.push({type:t,key:"numberFormats",editable:!1,value:e.numberFormats.value})}function Pf(n){const e={};return Object.keys(n).forEach(t=>{const r=n[t];Xe(r)&&"source"in r?e[t]=CM(r):ir(r)&&r.loc&&r.loc.source?e[t]=r.loc.source:Le(r)?e[t]=Pf(r):e[t]=r}),e}const _M={"<":"<",">":">",'"':""","&":"&"};function vM(n){return n.replace(/[<>"&]/g,yM)}function yM(n){return _M[n]||n}function CM(n){return{_custom:{type:"function",display:`<span>ƒ</span> ${n.source?`("${vM(n.source)}")`:"(?)"}`}}}function EM(n,e){n.rootNodes.push({id:"global",label:"Global Scope"});const t=e.mode==="composition"?e.global:e.global.__composer;for(const[r,o]of e.__instances){const a=e.mode==="composition"?o:o.__composer;t!==a&&n.rootNodes.push({id:a.id.toString(),label:`${HC(r)} Scope`})}}function wM(n,e){let t=null;if(n!=="global"){for(const[r,o]of e.__instances.entries())if(o.id.toString()===n){t=r;break}}return t}function $C(n,e){if(n==="global")return e.mode==="composition"?e.global:e.global.__composer;{const t=Array.from(e.__instances.values()).find(r=>r.id.toString()===n);return t?e.mode==="composition"?t:t.__composer:null}}function TM(n,e){const t=$C(n.nodeId,e);return t&&(n.state=bM(t)),null}function bM(n){const e={},t="Locale related info",r=[{type:t,key:"locale",editable:!0,value:n.locale.value},{type:t,key:"fallbackLocale",editable:!0,value:n.fallbackLocale.value},{type:t,key:"availableLocales",editable:!1,value:n.availableLocales},{type:t,key:"inheritLocale",editable:!0,value:n.inheritLocale}];e[t]=r;const o="Locale messages info",a=[{type:o,key:"messages",editable:!1,value:Pf(n.messages.value)}];e[o]=a;{const l="Datetime formats info",d=[{type:l,key:"datetimeFormats",editable:!1,value:n.datetimeFormats.value}];e[l]=d;const h="Datetime formats info",f=[{type:h,key:"numberFormats",editable:!1,value:n.numberFormats.value}];e[h]=f}return e}function Os(n,e){if(Dh){let t;e&&"groupId"in e&&(t=e.groupId,delete e.groupId),Dh.addTimelineEvent({layerId:"vue-i18n-timeline",event:{title:n,groupId:t,time:Date.now(),meta:{},data:e||{},logType:n==="compile-error"?"error":n==="fallback"||n==="missing"?"warning":"default"}})}}function IM(n,e){const t=$C(n.nodeId,e);if(t){const[r]=n.path;r==="locale"&&ne(n.state.value)?t.locale.value=n.state.value:r==="fallbackLocale"&&(ne(n.state.value)||vt(n.state.value)||Le(n.state.value))?t.fallbackLocale.value=n.state.value:r==="inheritLocale"&&Ue(n.state.value)&&(t.inheritLocale=n.state.value)}}function SM(n){const e=ne(n.locale)?n.locale:ks,t=ne(n.fallbackLocale)||vt(n.fallbackLocale)||ke(n.fallbackLocale)||n.fallbackLocale===!1?n.fallbackLocale:e,r=Xe(n.missing)?n.missing:void 0,o=Ue(n.silentTranslationWarn)||wa(n.silentTranslationWarn)?!n.silentTranslationWarn:!0,a=Ue(n.silentFallbackWarn)||wa(n.silentFallbackWarn)?!n.silentFallbackWarn:!0,l=Ue(n.fallbackRoot)?n.fallbackRoot:!0,d=!!n.formatFallbackMessages,h=ke(n.modifiers)?n.modifiers:{},f=n.pluralizationRules,g=Xe(n.postTranslation)?n.postTranslation:void 0,_=ne(n.warnHtmlInMessage)?n.warnHtmlInMessage!=="off":!0,p=!!n.escapeParameterHtml,w=Ue(n.sync)?n.sync:!0;let C=n.messages;if(ke(n.sharedMessages)){const K=n.sharedMessages;C=Object.keys(K).reduce((M,ce)=>{const ae=M[ce]||(M[ce]={});return Ot(ae,K[ce]),M},C||{})}const{__i18n:T,__root:k,__injectWithOption:I}=n,N=n.datetimeFormats,D=n.numberFormats,L=n.flatJson;return{locale:e,fallbackLocale:t,messages:C,flatJson:L,datetimeFormats:N,numberFormats:D,missing:r,missingWarn:o,fallbackWarn:a,fallbackRoot:l,fallbackFormat:d,modifiers:h,pluralRules:f,postTranslation:g,warnHtmlMessage:_,escapeParameter:p,messageResolver:n.messageResolver,inheritLocale:w,__i18n:T,__root:k,__injectWithOption:I}}function Lh(n={}){const e=Of(SM(n)),{__extender:t}=n,r={id:e.id,get locale(){return e.locale.value},set locale(o){e.locale.value=o},get fallbackLocale(){return e.fallbackLocale.value},set fallbackLocale(o){e.fallbackLocale.value=o},get messages(){return e.messages.value},get datetimeFormats(){return e.datetimeFormats.value},get numberFormats(){return e.numberFormats.value},get availableLocales(){return e.availableLocales},get missing(){return e.getMissingHandler()},set missing(o){e.setMissingHandler(o)},get silentTranslationWarn(){return Ue(e.missingWarn)?!e.missingWarn:e.missingWarn},set silentTranslationWarn(o){e.missingWarn=Ue(o)?!o:o},get silentFallbackWarn(){return Ue(e.fallbackWarn)?!e.fallbackWarn:e.fallbackWarn},set silentFallbackWarn(o){e.fallbackWarn=Ue(o)?!o:o},get modifiers(){return e.modifiers},get formatFallbackMessages(){return e.fallbackFormat},set formatFallbackMessages(o){e.fallbackFormat=o},get postTranslation(){return e.getPostTranslationHandler()},set postTranslation(o){e.setPostTranslationHandler(o)},get sync(){return e.inheritLocale},set sync(o){e.inheritLocale=o},get warnHtmlInMessage(){return e.warnHtmlMessage?"warn":"off"},set warnHtmlInMessage(o){e.warnHtmlMessage=o!=="off"},get escapeParameterHtml(){return e.escapeParameter},set escapeParameterHtml(o){e.escapeParameter=o},get pluralizationRules(){return e.pluralRules||{}},__composer:e,t(...o){return Reflect.apply(e.t,e,[...o])},rt(...o){return Reflect.apply(e.rt,e,[...o])},te(o,a){return e.te(o,a)},tm(o){return e.tm(o)},getLocaleMessage(o){return e.getLocaleMessage(o)},setLocaleMessage(o,a){e.setLocaleMessage(o,a)},mergeLocaleMessage(o,a){e.mergeLocaleMessage(o,a)},d(...o){return Reflect.apply(e.d,e,[...o])},getDateTimeFormat(o){return e.getDateTimeFormat(o)},setDateTimeFormat(o,a){e.setDateTimeFormat(o,a)},mergeDateTimeFormat(o,a){e.mergeDateTimeFormat(o,a)},n(...o){return Reflect.apply(e.n,e,[...o])},getNumberFormat(o){return e.getNumberFormat(o)},setNumberFormat(o,a){e.setNumberFormat(o,a)},mergeNumberFormat(o,a){e.mergeNumberFormat(o,a)}};return r.__extender=t,process.env.NODE_ENV!=="production"&&(r.__enableEmitter=o=>{const a=e;a[Ci]&&a[Ci](o)},r.__disableEmitter=()=>{const o=e;o[Ns]&&o[Ns]()}),r}function AM(n,e,t){return{beforeCreate(){const r=c.getCurrentInstance();if(!r)throw Cn(rt.UNEXPECTED_ERROR);const o=this.$options;if(o.i18n){const a=o.i18n;if(o.__i18n&&(a.__i18n=o.__i18n),a.__root=e,this===this.$root)this.$i18n=J_(n,a);else{a.__injectWithOption=!0,a.__extender=t.__vueI18nExtend,this.$i18n=Lh(a);const l=this.$i18n;l.__extender&&(l.__disposer=l.__extender(this.$i18n))}}else if(o.__i18n)if(this===this.$root)this.$i18n=J_(n,o);else{this.$i18n=Lh({__i18n:o.__i18n,__injectWithOption:!0,__extender:t.__vueI18nExtend,__root:e});const a=this.$i18n;a.__extender&&(a.__disposer=a.__extender(this.$i18n))}else this.$i18n=n;o.__i18nGlobal&&VC(e,o,o),this.$t=(...a)=>this.$i18n.t(...a),this.$rt=(...a)=>this.$i18n.rt(...a),this.$te=(a,l)=>this.$i18n.te(a,l),this.$d=(...a)=>this.$i18n.d(...a),this.$n=(...a)=>this.$i18n.n(...a),this.$tm=a=>this.$i18n.tm(a),t.__setInstance(r,this.$i18n)},mounted(){if(process.env.NODE_ENV!=="production"&&this.$el&&this.$i18n){const r=this.$i18n;this.$el.__VUE_I18N__=r.__composer;const o=this.__v_emitter=If();r.__enableEmitter&&r.__enableEmitter(o),o.on("*",Os)}},unmounted(){const r=c.getCurrentInstance();if(!r)throw Cn(rt.UNEXPECTED_ERROR);const o=this.$i18n;process.env.NODE_ENV!=="production"&&this.$el&&this.$el.__VUE_I18N__&&(this.__v_emitter&&(this.__v_emitter.off("*",Os),delete this.__v_emitter),this.$i18n&&(o.__disableEmitter&&o.__disableEmitter(),delete this.$el.__VUE_I18N__)),delete this.$t,delete this.$rt,delete this.$te,delete this.$d,delete this.$n,delete this.$tm,o.__disposer&&(o.__disposer(),delete o.__disposer,delete o.__extender),t.__deleteInstance(r),delete this.$i18n}}}function J_(n,e){n.locale=e.locale||n.locale,n.fallbackLocale=e.fallbackLocale||n.fallbackLocale,n.missing=e.missing||n.missing,n.silentTranslationWarn=e.silentTranslationWarn||n.silentFallbackWarn,n.silentFallbackWarn=e.silentFallbackWarn||n.silentFallbackWarn,n.formatFallbackMessages=e.formatFallbackMessages||n.formatFallbackMessages,n.postTranslation=e.postTranslation||n.postTranslation,n.warnHtmlInMessage=e.warnHtmlInMessage||n.warnHtmlInMessage,n.escapeParameterHtml=e.escapeParameterHtml||n.escapeParameterHtml,n.sync=e.sync||n.sync,n.__composer[xC](e.pluralizationRules||n.pluralizationRules);const t=Rf(n.locale,{messages:e.messages,__i18n:e.__i18n});return Object.keys(t).forEach(r=>n.mergeLocaleMessage(r,t[r])),e.datetimeFormats&&Object.keys(e.datetimeFormats).forEach(r=>n.mergeDateTimeFormat(r,e.datetimeFormats[r])),e.numberFormats&&Object.keys(e.numberFormats).forEach(r=>n.mergeNumberFormat(r,e.numberFormats[r])),n}const Mf={tag:{type:[String,Object]},locale:{type:String},scope:{type:String,validator:n=>n==="parent"||n==="global",default:"parent"},i18n:{type:Object}};function kM({slots:n},e){return e.length===1&&e[0]==="default"?(n.default?n.default():[]).reduce((r,o)=>[...r,...o.type===c.Fragment?o.children:[o]],[]):e.reduce((t,r)=>{const o=n[r];return o&&(t[r]=o()),t},Ye())}function KC(){return c.Fragment}const NM=c.defineComponent({name:"i18n-t",props:Ot({keypath:{type:String,required:!0},plural:{type:[Number,String],validator:n=>Tt(n)||!isNaN(n)}},Mf),setup(n,e){const{slots:t,attrs:r}=e,o=n.i18n||Fn({useScope:n.scope,__useComponent:!0});return()=>{const a=Object.keys(t).filter(_=>_!=="_"),l=Ye();n.locale&&(l.locale=n.locale),n.plural!==void 0&&(l.plural=ne(n.plural)?+n.plural:n.plural);const d=kM(e,a),h=o[Rh](n.keypath,d,l),f=Ot(Ye(),r),g=ne(n.tag)||Le(n.tag)?n.tag:KC();return c.h(g,f,h)}}}),Q_=NM;function RM(n){return vt(n)&&!ne(n[0])}function WC(n,e,t,r){const{slots:o,attrs:a}=e;return()=>{const l={part:!0};let d=Ye();n.locale&&(l.locale=n.locale),ne(n.format)?l.key=n.format:Le(n.format)&&(ne(n.format.key)&&(l.key=n.format.key),d=Object.keys(n.format).reduce((p,w)=>t.includes(w)?Ot(Ye(),p,{[w]:n.format[w]}):p,Ye()));const h=r(n.value,l,d);let f=[l.key];vt(h)?f=h.map((p,w)=>{const C=o[p.type],T=C?C({[p.type]:p.value,index:w,parts:h}):[p.value];return RM(T)&&(T[0].key=`${p.type}-${w}`),T}):ne(h)&&(f=[h]);const g=Ot(Ye(),a),_=ne(n.tag)||Le(n.tag)?n.tag:KC();return c.h(_,g,f)}}const OM=c.defineComponent({name:"i18n-n",props:Ot({value:{type:Number,required:!0},format:{type:[String,Object]}},Mf),setup(n,e){const t=n.i18n||Fn({useScope:n.scope,__useComponent:!0});return WC(n,e,MC,(...r)=>t[Ph](...r))}}),X_=OM;function PM(n,e){const t=n;if(n.mode==="composition")return t.__getInstance(e)||n.global;{const r=t.__getInstance(e);return r!=null?r.__composer:n.global.__composer}}function MM(n){const e=l=>{process.env.NODE_ENV!=="production"&&bf(Fs(xr.DEPRECATE_TRANSLATE_CUSTOME_DIRECTIVE));const{instance:d,value:h}=l;if(!d||!d.$)throw Cn(rt.UNEXPECTED_ERROR);const f=PM(n,d.$),g=Z_(h);return[Reflect.apply(f.t,f,[...ev(g)]),f]};return{created:(l,d)=>{const[h,f]=e(d);wr&&n.global===f&&(l.__i18nWatcher=c.watch(f.locale,()=>{d.instance&&d.instance.$forceUpdate()})),l.__composer=f,l.textContent=h},unmounted:l=>{wr&&l.__i18nWatcher&&(l.__i18nWatcher(),l.__i18nWatcher=void 0,delete l.__i18nWatcher),l.__composer&&(l.__composer=void 0,delete l.__composer)},beforeUpdate:(l,{value:d})=>{if(l.__composer){const h=l.__composer,f=Z_(d);l.textContent=Reflect.apply(h.t,h,[...ev(f)])}},getSSRProps:l=>{const[d]=e(l);return{textContent:d}}}}function Z_(n){if(ne(n))return{path:n};if(ke(n)){if(!("path"in n))throw Cn(rt.REQUIRED_VALUE,"path");return n}else throw Cn(rt.INVALID_VALUE)}function ev(n){const{path:e,locale:t,args:r,choice:o,plural:a}=n,l={},d=r||{};return ne(t)&&(l.locale=t),Tt(o)&&(l.plural=o),Tt(a)&&(l.plural=a),[e,d,l]}function DM(n,e,...t){const r=ke(t[0])?t[0]:{};(Ue(r.globalInstall)?r.globalInstall:!0)&&([Q_.name,"I18nT"].forEach(a=>n.component(a,Q_)),[X_.name,"I18nN"].forEach(a=>n.component(a,X_)),[nv.name,"I18nD"].forEach(a=>n.component(a,nv))),n.directive("t",MM(e))}const LM=Gr("global-vue-i18n");function xM(n={}){const e=__VUE_I18N_LEGACY_API__&&Ue(n.legacy)?n.legacy:__VUE_I18N_LEGACY_API__;process.env.NODE_ENV!=="production"&&e&&bf(Fs(xr.DEPRECATE_LEGACY_MODE));const t=Ue(n.globalInjection)?n.globalInjection:!0,r=new Map,[o,a]=UM(n,e),l=Gr(process.env.NODE_ENV!=="production"?"vue-i18n":"");function d(_){return r.get(_)||null}function h(_,p){r.set(_,p)}function f(_){r.delete(_)}const g={get mode(){return __VUE_I18N_LEGACY_API__&&e?"legacy":"composition"},async install(_,...p){if(process.env.NODE_ENV!=="production"&&(_.__VUE_I18N__=g),_.__VUE_I18N_SYMBOL__=l,_.provide(_.__VUE_I18N_SYMBOL__,g),ke(p[0])){const T=p[0];g.__composerExtend=T.__composerExtend,g.__vueI18nExtend=T.__vueI18nExtend}let w=null;!e&&t&&(w=zM(_,g.global)),__VUE_I18N_FULL_INSTALL__&&DM(_,g,...p),__VUE_I18N_LEGACY_API__&&e&&_.mixin(AM(a,a.__composer,g));const C=_.unmount;if(_.unmount=()=>{w&&w(),g.dispose(),C()},process.env.NODE_ENV!=="production"){if(!await gM(_,g))throw Cn(rt.CANNOT_SETUP_VUE_DEVTOOLS_PLUGIN);const k=If();if(e){const I=a;I.__enableEmitter&&I.__enableEmitter(k)}else{const I=a;I[Ci]&&I[Ci](k)}k.on("*",Os)}},get global(){return a},dispose(){o.stop()},__instances:r,__getInstance:d,__setInstance:h,__deleteInstance:f};return g}function Fn(n={}){const e=c.getCurrentInstance();if(e==null)throw Cn(rt.MUST_BE_CALL_SETUP_TOP);if(!e.isCE&&e.appContext.app!=null&&!e.appContext.app.__VUE_I18N_SYMBOL__)throw Cn(rt.NOT_INSTALLED);const t=BM(e),r=FM(t),o=BC(e),a=VM(n,o);if(a==="global")return VC(r,n,o),r;if(a==="parent"){let h=HM(t,e,n.__useComponent);return h==null&&(process.env.NODE_ENV!=="production"&&Go(Fs(xr.NOT_FOUND_PARENT_SCOPE)),h=r),h}const l=t;let d=l.__getInstance(e);if(d==null){const h=Ot({},n);"__i18n"in o&&(h.__i18n=o.__i18n),r&&(h.__root=r),d=Of(h),l.__composerExtend&&(d[Mh]=l.__composerExtend(d)),KM(l,e,d),l.__setInstance(e,d)}return d}function UM(n,e){const t=c.effectScope(),r=__VUE_I18N_LEGACY_API__&&e?t.run(()=>Lh(n)):t.run(()=>Of(n));if(r==null)throw Cn(rt.UNEXPECTED_ERROR);return[t,r]}function BM(n){const e=c.inject(n.isCE?LM:n.appContext.app.__VUE_I18N_SYMBOL__);if(!e)throw Cn(n.isCE?rt.NOT_INSTALLED_WITH_PROVIDE:rt.UNEXPECTED_ERROR);return e}function VM(n,e){return Gl(n)?"__i18n"in e?"local":"global":n.useScope?n.useScope:"local"}function FM(n){return n.mode==="composition"?n.global:n.global.__composer}function HM(n,e,t=!1){let r=null;const o=e.root;let a=$M(e,t);for(;a!=null;){const l=n;if(n.mode==="composition")r=l.__getInstance(a);else if(__VUE_I18N_LEGACY_API__){const d=l.__getInstance(a);d!=null&&(r=d.__composer,t&&r&&!r[UC]&&(r=null))}if(r!=null||o===a)break;a=a.parent}return r}function $M(n,e=!1){return n==null?null:e&&n.vnode.ctx||n.parent}function KM(n,e,t){let r=null;c.onMounted(()=>{if(process.env.NODE_ENV!=="production"&&e.vnode.el){e.vnode.el.__VUE_I18N__=t,r=If();const o=t;o[Ci]&&o[Ci](r),r.on("*",Os)}},e),c.onUnmounted(()=>{const o=t;process.env.NODE_ENV!=="production"&&e.vnode.el&&e.vnode.el.__VUE_I18N__&&(r&&r.off("*",Os),o[Ns]&&o[Ns](),delete e.vnode.el.__VUE_I18N__),n.__deleteInstance(e);const a=o[Mh];a&&(a(),delete o[Mh])},e)}const WM=["locale","fallbackLocale","availableLocales"],tv=["t","rt","d","n","tm","te"];function zM(n,e){const t=Object.create(null);return WM.forEach(o=>{const a=Object.getOwnPropertyDescriptor(e,o);if(!a)throw Cn(rt.UNEXPECTED_ERROR);const l=c.isRef(a.value)?{get(){return a.value.value},set(d){a.value.value=d}}:{get(){return a.get&&a.get()}};Object.defineProperty(t,o,l)}),n.config.globalProperties.$i18n=t,tv.forEach(o=>{const a=Object.getOwnPropertyDescriptor(e,o);if(!a||!a.value)throw Cn(rt.UNEXPECTED_ERROR);Object.defineProperty(n.config.globalProperties,`$${o}`,a)}),()=>{delete n.config.globalProperties.$i18n,tv.forEach(o=>{delete n.config.globalProperties[`$${o}`]})}}const GM=c.defineComponent({name:"i18n-d",props:Ot({value:{type:[Number,Date],required:!0},format:{type:[String,Object]}},Mf),setup(n,e){const t=n.i18n||Fn({useScope:n.scope,__useComponent:!0});return WC(n,e,PC,(...r)=>t[Oh](...r))}}),nv=GM;cM();F1(v1);H1(L1);$1(TC);if(process.env.NODE_ENV!=="production"||__INTLIFY_PROD_DEVTOOLS__){const n=mi();n.__INTLIFY__=!0,y1(n.__INTLIFY_DEVTOOLS_GLOBAL_HOOK__)}process.env.NODE_ENV;const Df=c.defineComponent({__name:"DeleteAllBtn",emits:["removeAll"],setup(n,{emit:e}){const{openDialog:t}=Us("delete-all-__J"),{t:r}=Fn(),o=e;return(a,l)=>(c.openBlock(),c.createElementBlock(c.Fragment,null,[c.createVNode(Vs,{"dd-id":"delete-all-__J",variant:"confirm",title:c.unref(r)("dialogs.deleteAll.title"),text:c.unref(r)("dialogs.deleteAll.text"),onOnSave:l[0]||(l[0]=()=>o("removeAll"))},null,8,["title","text"]),c.createVNode(Ge.VBtn,{onClick:c.unref(t),variant:"plain",color:"secondary","prepend-icon":"mdi-delete"},{default:c.withCtx(()=>[c.createTextVNode(c.toDisplayString(c.unref(r)("actions.deleteAll")),1)]),_:1},8,["onClick"])],64))}}),zC=c.defineComponent({__name:"EditButton",emits:["editAll"],setup(n,{emit:e}){const t=e;return(r,o)=>(c.openBlock(),c.createBlock(Ge.VBtn,{onClick:o[0]||(o[0]=a=>t("editAll")),variant:"plain",color:"secondary","prepend-icon":"mdi-pencil"},{default:c.withCtx(()=>o[1]||(o[1]=[c.createTextVNode(" Edit")])),_:1}))}}),GC=c.defineComponent({__name:"DotsMenu",props:{variant:{default:"text"},color:{},orientation:{},size:{}},setup(n){return(e,t)=>(c.openBlock(),c.createBlock(c.unref(Fo.VMenu),{"close-on-content-click":!0},{activator:c.withCtx(({props:r})=>[c.createVNode(c.unref(Fo.VBtn),c.mergeProps({variant:e.variant},r,{icon:""}),{default:c.withCtx(()=>[e.orientation==="y"?(c.openBlock(),c.createBlock(c.unref(lP),{key:0,size:e.size,color:`rgb(var(--v-theme-${e.color}))`,class:"cursor-pointer"},null,8,["size","color"])):(c.openBlock(),c.createBlock(c.unref(uP),{key:1,size:e.size,color:`rgb(var(--v-theme-${e.color}))`,class:"cursor-pointer"},null,8,["size","color"]))]),_:2},1040,["variant"])]),default:c.withCtx(()=>[c.renderSlot(e.$slots,"default")]),_:3}))}}),Yl=c.defineComponent({__name:"ParentCard",props:{title:{},height:{default:"100%"},loading:{type:Boolean}},setup(n){const e=n;return(t,r)=>(c.openBlock(),c.createBlock(xt.VCard,{"min-height":t.height,height:t.height,loading:t.loading,class:"bg-surface rounded-sm pa-5"},{default:c.withCtx(()=>[e.title?(c.openBlock(),c.createBlock(xt.VCardTitle,{key:0,class:"pa-0"},{default:c.withCtx(()=>[c.createTextVNode(c.toDisplayString(e.title),1)]),_:1})):c.createCommentVNode("",!0),c.renderSlot(t.$slots,"default")]),_:3},8,["min-height","height","loading"]))}}),qC=c.defineComponent({__name:"ConfirmDialog",props:{title:{},text:{},width:{},loading:{type:Boolean}},emits:["onSave","onCancel"],setup(n,{emit:e}){const t=n,r=c.ref(!1),o=c.ref(!1);c.onUnmounted(()=>{r.value=!1});const a=e;async function l(){try{await a("onCancel")}catch(h){console.error(h)}r.value=!1}async function d(){o.value=!0;try{await a("onSave")}catch(h){console.error(h)}o.value=!1,r.value=!1}return(h,f)=>(c.openBlock(),c.createBlock(rl.VDialog,{scrim:"rgb(0,0,0,100)",width:t.width},{activator:c.withCtx(({isActive:g,props:_})=>[c.renderSlot(h.$slots,"button",c.normalizeProps(c.guardReactiveProps({isActive:g,props:_})))]),default:c.withCtx(({isActive:g})=>[c.createVNode(xt.VCard,{loading:o.value,title:t.title,rounded:"","min-height":"300"},{prepend:c.withCtx(()=>[c.createVNode(c.unref(hC),{color:"rgb(var(--v-theme-secondary))"})]),append:c.withCtx(()=>[c.createVNode(Ge.VBtn,{class:"ms-auto",icon:"mdi-window-close",onClick:l,variant:"plain"})]),default:c.withCtx(()=>[c.createVNode(xt.VCardText,{class:"text-center mt-7"},{default:c.withCtx(()=>[c.createTextVNode(c.toDisplayString(t.text),1)]),_:1}),c.createVNode(xt.VCardActions,{class:"d-flex"},{default:c.withCtx(()=>[c.createVNode(Ge.VBtn,{class:"flex-grow-1",variant:"outlined",color:"secondary",onClick:l},{default:c.withCtx(()=>[c.createTextVNode(c.toDisplayString(h.$t("actions.cancel")),1)]),_:1}),c.createVNode(Ge.VBtn,{class:"flex-grow-1",variant:"flat",color:"secondary",onClick:d},{default:c.withCtx(()=>[c.createTextVNode(c.toDisplayString(h.$t("actions.confirm")),1)]),_:1})]),_:1})]),_:1},8,["loading","title"])]),_:3},8,["width"]))}}),Kd="https://app-files.jplan.com.br/pub/resources/profile-placeholder.svg",jC=c.defineComponent({__name:"JAvatar",props:{src:{}},setup(n){const e=n,t=c.ref(e.src),r=c.computed(()=>t.value||Kd);function o(){t.value=Kd}return(a,l)=>(c.openBlock(),c.createBlock(Ry.VAvatar,{size:"50"},{default:c.withCtx(()=>[c.createVNode(pf.VImg,{src:r.value,"lazy-src":Kd,onError:o,width:"50",alt:"profile-placeholder"},null,8,["src"])]),_:1}))}}),Wd="https://app-files.jplan.com.br/pub/resources/profile-placeholder.svg",YC=c.defineComponent({__name:"AvatarPicture",props:{img:{},size:{}},setup(n){const e=n,t=c.ref(e.img),r=c.computed(()=>t.value||Wd);function o(){t.value=Wd}return(a,l)=>(c.openBlock(),c.createBlock(Ry.VAvatar,{size:a.size},{default:c.withCtx(()=>[c.createVNode(pf.VImg,{src:r.value,"lazy-src":Wd,onError:o,width:"40",alt:"Avatar"},null,8,["src"])]),_:1},8,["size"]))}}),qM=c.defineComponent({__name:"ContextMenu",setup(n){const e=c.ref(!1),t=c.ref({x:0,y:0}),r=a=>{a.preventDefault(),t.value={x:a.clientX,y:a.clientY},e.value=!0},o=()=>{e.value=!1};return c.onMounted(()=>{document.addEventListener("click",o)}),c.onUnmounted(()=>{document.removeEventListener("click",o)}),(a,l)=>(c.openBlock(),c.createElementBlock("div",{onContextmenu:c.withModifiers(r,["right"]),class:"relative w-full h-full"},[c.renderSlot(a.$slots,"default",{},void 0,!0),c.createVNode(_f.VMenu,{modelValue:e.value,"onUpdate:modelValue":l[0]||(l[0]=d=>e.value=d),style:c.normalizeStyle({top:`${t.value.y}px`,left:`${t.value.x}px`,position:"absolute"})},{default:c.withCtx(()=>[c.createVNode(Qt.VList,{onClick:o},{default:c.withCtx(()=>[c.renderSlot(a.$slots,"actions",{},void 0,!0)]),_:3})]),_:3},8,["modelValue","style"])],32))}}),Si=(n,e)=>{const t=n.__vccOpts||n;for(const[r,o]of e)t[r]=o;return t},JC=Si(qM,[["__scopeId","data-v-ad4e4a5d"]]),jM={class:"d-inline-flex"},QC=c.defineComponent({__name:"UiTable",props:c.mergeModels({headers:{},items:{default:()=>[]},actions:{},loading:{type:Boolean},columns:{default:()=>[]},sortBy:{}},{selection:{},selectionModifiers:{}}),emits:["update:selection"],setup(n){const e=n,t=c.computed(()=>{var o;if(e.headers)return e.headers;if(e.columns)return(o=e.columns)==null?void 0:o.filter(a=>a.checked)}),r=c.useModel(n,"selection");return(o,a)=>(c.openBlock(),c.createBlock(Oy.VDataTable,{modelValue:r.value,"onUpdate:modelValue":a[0]||(a[0]=l=>r.value=l),"fixed-header":"","fixed-footer":"","items-per-page":"10",headers:t.value,items:o.items,"items-length":o.items.length,loading:o.loading||!1,"item-value":"_id","return-object":"","show-select":"","sort-by":o.sortBy,height:"calc(100vh - 320px)",class:"customize-table"},{top:c.withCtx(()=>a[1]||(a[1]=[c.createElementVNode("span",{class:"mt-5"},null,-1)])),"item.avatar":c.withCtx(({item:l})=>[c.renderSlot(o.$slots,"avatar",{item:l})]),"item.active":c.withCtx(({item:l})=>[c.renderSlot(o.$slots,"active",{item:l})]),"item.image":c.withCtx(({item:l})=>[c.renderSlot(o.$slots,"image",{item:l})]),"item.picture":c.withCtx(({item:l})=>[c.renderSlot(o.$slots,"picture",{item:l})]),"item.icon":c.withCtx(({item:l})=>[c.renderSlot(o.$slots,"icon",{item:l})]),"item.actions":c.withCtx(({item:l})=>[c.createElementVNode("div",jM,[c.renderSlot(o.$slots,"actions",{item:l})])]),"no-data":c.withCtx(()=>[!o.loading&&o.items.length===0?(c.openBlock(),c.createElementBlock(c.Fragment,{key:0},[c.createTextVNode(" This table is empty.")],64)):c.createCommentVNode("",!0)]),_:3},8,["modelValue","headers","items","items-length","loading","sort-by"]))}}),XC=6048e5,YM=864e5,rv=Symbol.for("constructDateFrom");function Ko(n,e){return typeof n=="function"?n(e):n&&typeof n=="object"&&rv in n?n[rv](e):n instanceof Date?new n.constructor(e):new Date(e)}function br(n,e){return Ko(e||n,n)}let JM={};function Jl(){return JM}function Ps(n,e){var d,h,f,g;const t=Jl(),r=(e==null?void 0:e.weekStartsOn)??((h=(d=e==null?void 0:e.locale)==null?void 0:d.options)==null?void 0:h.weekStartsOn)??t.weekStartsOn??((g=(f=t.locale)==null?void 0:f.options)==null?void 0:g.weekStartsOn)??0,o=br(n,e==null?void 0:e.in),a=o.getDay(),l=(a<r?7:0)+a-r;return o.setDate(o.getDate()-l),o.setHours(0,0,0,0),o}function wl(n,e){return Ps(n,{...e,weekStartsOn:1})}function ZC(n,e){const t=br(n,e==null?void 0:e.in),r=t.getFullYear(),o=Ko(t,0);o.setFullYear(r+1,0,4),o.setHours(0,0,0,0);const a=wl(o),l=Ko(t,0);l.setFullYear(r,0,4),l.setHours(0,0,0,0);const d=wl(l);return t.getTime()>=a.getTime()?r+1:t.getTime()>=d.getTime()?r:r-1}function ov(n){const e=br(n),t=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return t.setUTCFullYear(e.getFullYear()),+n-+t}function QM(n,...e){const t=Ko.bind(null,e.find(r=>typeof r=="object"));return e.map(t)}function iv(n,e){const t=br(n,e==null?void 0:e.in);return t.setHours(0,0,0,0),t}function XM(n,e,t){const[r,o]=QM(t==null?void 0:t.in,n,e),a=iv(r),l=iv(o),d=+a-ov(a),h=+l-ov(l);return Math.round((d-h)/YM)}function ZM(n,e){const t=ZC(n,e),r=Ko(n,0);return r.setFullYear(t,0,4),r.setHours(0,0,0,0),wl(r)}function eD(n){return n instanceof Date||typeof n=="object"&&Object.prototype.toString.call(n)==="[object Date]"}function tD(n){return!(!eD(n)&&typeof n!="number"||isNaN(+br(n)))}function nD(n,e){const t=br(n,e==null?void 0:e.in);return t.setFullYear(t.getFullYear(),0,1),t.setHours(0,0,0,0),t}const rD={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"}},oD=(n,e,t)=>{let r;const o=rD[n];return typeof o=="string"?r=o:e===1?r=o.one:r=o.other.replace("{{count}}",e.toString()),t!=null&&t.addSuffix?t.comparison&&t.comparison>0?"in "+r:r+" ago":r};function ar(n){return(e={})=>{const t=e.width?String(e.width):n.defaultWidth;return n.formats[t]||n.formats[n.defaultWidth]}}const iD={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},aD={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},sD={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},cD={date:ar({formats:iD,defaultWidth:"full"}),time:ar({formats:aD,defaultWidth:"full"}),dateTime:ar({formats:sD,defaultWidth:"full"})},lD={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},uD=(n,e,t,r)=>lD[n];function bt(n){return(e,t)=>{const r=t!=null&&t.context?String(t.context):"standalone";let o;if(r==="formatting"&&n.formattingValues){const l=n.defaultFormattingWidth||n.defaultWidth,d=t!=null&&t.width?String(t.width):l;o=n.formattingValues[d]||n.formattingValues[l]}else{const l=n.defaultWidth,d=t!=null&&t.width?String(t.width):n.defaultWidth;o=n.values[d]||n.values[l]}const a=n.argumentCallback?n.argumentCallback(e):e;return o[a]}}const dD={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},hD={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},fD={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"]},mD={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"]},gD={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"}},pD={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"}},_D=(n,e)=>{const t=Number(n),r=t%100;if(r>20||r<10)switch(r%10){case 1:return t+"st";case 2:return t+"nd";case 3:return t+"rd"}return t+"th"},vD={ordinalNumber:_D,era:bt({values:dD,defaultWidth:"wide"}),quarter:bt({values:hD,defaultWidth:"wide",argumentCallback:n=>n-1}),month:bt({values:fD,defaultWidth:"wide"}),day:bt({values:mD,defaultWidth:"wide"}),dayPeriod:bt({values:gD,defaultWidth:"wide",formattingValues:pD,defaultFormattingWidth:"wide"})};function It(n){return(e,t={})=>{const r=t.width,o=r&&n.matchPatterns[r]||n.matchPatterns[n.defaultMatchWidth],a=e.match(o);if(!a)return null;const l=a[0],d=r&&n.parsePatterns[r]||n.parsePatterns[n.defaultParseWidth],h=Array.isArray(d)?CD(d,_=>_.test(l)):yD(d,_=>_.test(l));let f;f=n.valueCallback?n.valueCallback(h):h,f=t.valueCallback?t.valueCallback(f):f;const g=e.slice(l.length);return{value:f,rest:g}}}function yD(n,e){for(const t in n)if(Object.prototype.hasOwnProperty.call(n,t)&&e(n[t]))return t}function CD(n,e){for(let t=0;t<n.length;t++)if(e(n[t]))return t}function Ql(n){return(e,t={})=>{const r=e.match(n.matchPattern);if(!r)return null;const o=r[0],a=e.match(n.parsePattern);if(!a)return null;let l=n.valueCallback?n.valueCallback(a[0]):a[0];l=t.valueCallback?t.valueCallback(l):l;const d=e.slice(o.length);return{value:l,rest:d}}}const ED=/^(\d+)(th|st|nd|rd)?/i,wD=/\d+/i,TD={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},bD={any:[/^b/i,/^(a|c)/i]},ID={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},SD={any:[/1/i,/2/i,/3/i,/4/i]},AD={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},kD={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]},ND={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},RD={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]},OD={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},PD={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}},MD={ordinalNumber:Ql({matchPattern:ED,parsePattern:wD,valueCallback:n=>parseInt(n,10)}),era:It({matchPatterns:TD,defaultMatchWidth:"wide",parsePatterns:bD,defaultParseWidth:"any"}),quarter:It({matchPatterns:ID,defaultMatchWidth:"wide",parsePatterns:SD,defaultParseWidth:"any",valueCallback:n=>n+1}),month:It({matchPatterns:AD,defaultMatchWidth:"wide",parsePatterns:kD,defaultParseWidth:"any"}),day:It({matchPatterns:ND,defaultMatchWidth:"wide",parsePatterns:RD,defaultParseWidth:"any"}),dayPeriod:It({matchPatterns:OD,defaultMatchWidth:"any",parsePatterns:PD,defaultParseWidth:"any"})},Lf={code:"en-US",formatDistance:oD,formatLong:cD,formatRelative:uD,localize:vD,match:MD,options:{weekStartsOn:0,firstWeekContainsDate:1}};function DD(n,e){const t=br(n,e==null?void 0:e.in);return XM(t,nD(t))+1}function LD(n,e){const t=br(n,e==null?void 0:e.in),r=+wl(t)-+ZM(t);return Math.round(r/XC)+1}function eE(n,e){var g,_,p,w;const t=br(n,e==null?void 0:e.in),r=t.getFullYear(),o=Jl(),a=(e==null?void 0:e.firstWeekContainsDate)??((_=(g=e==null?void 0:e.locale)==null?void 0:g.options)==null?void 0:_.firstWeekContainsDate)??o.firstWeekContainsDate??((w=(p=o.locale)==null?void 0:p.options)==null?void 0:w.firstWeekContainsDate)??1,l=Ko((e==null?void 0:e.in)||n,0);l.setFullYear(r+1,0,a),l.setHours(0,0,0,0);const d=Ps(l,e),h=Ko((e==null?void 0:e.in)||n,0);h.setFullYear(r,0,a),h.setHours(0,0,0,0);const f=Ps(h,e);return+t>=+d?r+1:+t>=+f?r:r-1}function xD(n,e){var d,h,f,g;const t=Jl(),r=(e==null?void 0:e.firstWeekContainsDate)??((h=(d=e==null?void 0:e.locale)==null?void 0:d.options)==null?void 0:h.firstWeekContainsDate)??t.firstWeekContainsDate??((g=(f=t.locale)==null?void 0:f.options)==null?void 0:g.firstWeekContainsDate)??1,o=eE(n,e),a=Ko((e==null?void 0:e.in)||n,0);return a.setFullYear(o,0,r),a.setHours(0,0,0,0),Ps(a,e)}function UD(n,e){const t=br(n,e==null?void 0:e.in),r=+Ps(t,e)-+xD(t,e);return Math.round(r/XC)+1}function We(n,e){const t=n<0?"-":"",r=Math.abs(n).toString().padStart(e,"0");return t+r}const Oo={y(n,e){const t=n.getFullYear(),r=t>0?t:1-t;return We(e==="yy"?r%100:r,e.length)},M(n,e){const t=n.getMonth();return e==="M"?String(t+1):We(t+1,2)},d(n,e){return We(n.getDate(),e.length)},a(n,e){const t=n.getHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return t.toUpperCase();case"aaa":return t;case"aaaaa":return t[0];case"aaaa":default:return t==="am"?"a.m.":"p.m."}},h(n,e){return We(n.getHours()%12||12,e.length)},H(n,e){return We(n.getHours(),e.length)},m(n,e){return We(n.getMinutes(),e.length)},s(n,e){return We(n.getSeconds(),e.length)},S(n,e){const t=e.length,r=n.getMilliseconds(),o=Math.trunc(r*Math.pow(10,t-3));return We(o,e.length)}},qi={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},av={G:function(n,e,t){const r=n.getFullYear()>0?1:0;switch(e){case"G":case"GG":case"GGG":return t.era(r,{width:"abbreviated"});case"GGGGG":return t.era(r,{width:"narrow"});case"GGGG":default:return t.era(r,{width:"wide"})}},y:function(n,e,t){if(e==="yo"){const r=n.getFullYear(),o=r>0?r:1-r;return t.ordinalNumber(o,{unit:"year"})}return Oo.y(n,e)},Y:function(n,e,t,r){const o=eE(n,r),a=o>0?o:1-o;if(e==="YY"){const l=a%100;return We(l,2)}return e==="Yo"?t.ordinalNumber(a,{unit:"year"}):We(a,e.length)},R:function(n,e){const t=ZC(n);return We(t,e.length)},u:function(n,e){const t=n.getFullYear();return We(t,e.length)},Q:function(n,e,t){const r=Math.ceil((n.getMonth()+1)/3);switch(e){case"Q":return String(r);case"QQ":return We(r,2);case"Qo":return t.ordinalNumber(r,{unit:"quarter"});case"QQQ":return t.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return t.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return t.quarter(r,{width:"wide",context:"formatting"})}},q:function(n,e,t){const r=Math.ceil((n.getMonth()+1)/3);switch(e){case"q":return String(r);case"qq":return We(r,2);case"qo":return t.ordinalNumber(r,{unit:"quarter"});case"qqq":return t.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return t.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return t.quarter(r,{width:"wide",context:"standalone"})}},M:function(n,e,t){const r=n.getMonth();switch(e){case"M":case"MM":return Oo.M(n,e);case"Mo":return t.ordinalNumber(r+1,{unit:"month"});case"MMM":return t.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return t.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return t.month(r,{width:"wide",context:"formatting"})}},L:function(n,e,t){const r=n.getMonth();switch(e){case"L":return String(r+1);case"LL":return We(r+1,2);case"Lo":return t.ordinalNumber(r+1,{unit:"month"});case"LLL":return t.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return t.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return t.month(r,{width:"wide",context:"standalone"})}},w:function(n,e,t,r){const o=UD(n,r);return e==="wo"?t.ordinalNumber(o,{unit:"week"}):We(o,e.length)},I:function(n,e,t){const r=LD(n);return e==="Io"?t.ordinalNumber(r,{unit:"week"}):We(r,e.length)},d:function(n,e,t){return e==="do"?t.ordinalNumber(n.getDate(),{unit:"date"}):Oo.d(n,e)},D:function(n,e,t){const r=DD(n);return e==="Do"?t.ordinalNumber(r,{unit:"dayOfYear"}):We(r,e.length)},E:function(n,e,t){const r=n.getDay();switch(e){case"E":case"EE":case"EEE":return t.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return t.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return t.day(r,{width:"short",context:"formatting"});case"EEEE":default:return t.day(r,{width:"wide",context:"formatting"})}},e:function(n,e,t,r){const o=n.getDay(),a=(o-r.weekStartsOn+8)%7||7;switch(e){case"e":return String(a);case"ee":return We(a,2);case"eo":return t.ordinalNumber(a,{unit:"day"});case"eee":return t.day(o,{width:"abbreviated",context:"formatting"});case"eeeee":return t.day(o,{width:"narrow",context:"formatting"});case"eeeeee":return t.day(o,{width:"short",context:"formatting"});case"eeee":default:return t.day(o,{width:"wide",context:"formatting"})}},c:function(n,e,t,r){const o=n.getDay(),a=(o-r.weekStartsOn+8)%7||7;switch(e){case"c":return String(a);case"cc":return We(a,e.length);case"co":return t.ordinalNumber(a,{unit:"day"});case"ccc":return t.day(o,{width:"abbreviated",context:"standalone"});case"ccccc":return t.day(o,{width:"narrow",context:"standalone"});case"cccccc":return t.day(o,{width:"short",context:"standalone"});case"cccc":default:return t.day(o,{width:"wide",context:"standalone"})}},i:function(n,e,t){const r=n.getDay(),o=r===0?7:r;switch(e){case"i":return String(o);case"ii":return We(o,e.length);case"io":return t.ordinalNumber(o,{unit:"day"});case"iii":return t.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return t.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return t.day(r,{width:"short",context:"formatting"});case"iiii":default:return t.day(r,{width:"wide",context:"formatting"})}},a:function(n,e,t){const o=n.getHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return t.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"aaa":return t.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return t.dayPeriod(o,{width:"narrow",context:"formatting"});case"aaaa":default:return t.dayPeriod(o,{width:"wide",context:"formatting"})}},b:function(n,e,t){const r=n.getHours();let o;switch(r===12?o=qi.noon:r===0?o=qi.midnight:o=r/12>=1?"pm":"am",e){case"b":case"bb":return t.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"bbb":return t.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return t.dayPeriod(o,{width:"narrow",context:"formatting"});case"bbbb":default:return t.dayPeriod(o,{width:"wide",context:"formatting"})}},B:function(n,e,t){const r=n.getHours();let o;switch(r>=17?o=qi.evening:r>=12?o=qi.afternoon:r>=4?o=qi.morning:o=qi.night,e){case"B":case"BB":case"BBB":return t.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"BBBBB":return t.dayPeriod(o,{width:"narrow",context:"formatting"});case"BBBB":default:return t.dayPeriod(o,{width:"wide",context:"formatting"})}},h:function(n,e,t){if(e==="ho"){let r=n.getHours()%12;return r===0&&(r=12),t.ordinalNumber(r,{unit:"hour"})}return Oo.h(n,e)},H:function(n,e,t){return e==="Ho"?t.ordinalNumber(n.getHours(),{unit:"hour"}):Oo.H(n,e)},K:function(n,e,t){const r=n.getHours()%12;return e==="Ko"?t.ordinalNumber(r,{unit:"hour"}):We(r,e.length)},k:function(n,e,t){let r=n.getHours();return r===0&&(r=24),e==="ko"?t.ordinalNumber(r,{unit:"hour"}):We(r,e.length)},m:function(n,e,t){return e==="mo"?t.ordinalNumber(n.getMinutes(),{unit:"minute"}):Oo.m(n,e)},s:function(n,e,t){return e==="so"?t.ordinalNumber(n.getSeconds(),{unit:"second"}):Oo.s(n,e)},S:function(n,e){return Oo.S(n,e)},X:function(n,e,t){const r=n.getTimezoneOffset();if(r===0)return"Z";switch(e){case"X":return cv(r);case"XXXX":case"XX":return ui(r);case"XXXXX":case"XXX":default:return ui(r,":")}},x:function(n,e,t){const r=n.getTimezoneOffset();switch(e){case"x":return cv(r);case"xxxx":case"xx":return ui(r);case"xxxxx":case"xxx":default:return ui(r,":")}},O:function(n,e,t){const r=n.getTimezoneOffset();switch(e){case"O":case"OO":case"OOO":return"GMT"+sv(r,":");case"OOOO":default:return"GMT"+ui(r,":")}},z:function(n,e,t){const r=n.getTimezoneOffset();switch(e){case"z":case"zz":case"zzz":return"GMT"+sv(r,":");case"zzzz":default:return"GMT"+ui(r,":")}},t:function(n,e,t){const r=Math.trunc(+n/1e3);return We(r,e.length)},T:function(n,e,t){return We(+n,e.length)}};function sv(n,e=""){const t=n>0?"-":"+",r=Math.abs(n),o=Math.trunc(r/60),a=r%60;return a===0?t+String(o):t+String(o)+e+We(a,2)}function cv(n,e){return n%60===0?(n>0?"-":"+")+We(Math.abs(n)/60,2):ui(n,e)}function ui(n,e=""){const t=n>0?"-":"+",r=Math.abs(n),o=We(Math.trunc(r/60),2),a=We(r%60,2);return t+o+e+a}const lv=(n,e)=>{switch(n){case"P":return e.date({width:"short"});case"PP":return e.date({width:"medium"});case"PPP":return e.date({width:"long"});case"PPPP":default:return e.date({width:"full"})}},tE=(n,e)=>{switch(n){case"p":return e.time({width:"short"});case"pp":return e.time({width:"medium"});case"ppp":return e.time({width:"long"});case"pppp":default:return e.time({width:"full"})}},BD=(n,e)=>{const t=n.match(/(P+)(p+)?/)||[],r=t[1],o=t[2];if(!o)return lv(n,e);let a;switch(r){case"P":a=e.dateTime({width:"short"});break;case"PP":a=e.dateTime({width:"medium"});break;case"PPP":a=e.dateTime({width:"long"});break;case"PPPP":default:a=e.dateTime({width:"full"});break}return a.replace("{{date}}",lv(r,e)).replace("{{time}}",tE(o,e))},VD={p:tE,P:BD},FD=/^D+$/,HD=/^Y+$/,$D=["D","DD","YY","YYYY"];function KD(n){return FD.test(n)}function WD(n){return HD.test(n)}function zD(n,e,t){const r=GD(n,e,t);if(console.warn(r),$D.includes(n))throw new RangeError(r)}function GD(n,e,t){const r=n[0]==="Y"?"years":"days of the month";return`Use \`${n.toLowerCase()}\` instead of \`${n}\` (in \`${e}\`) for formatting ${r} to the input \`${t}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const qD=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,jD=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,YD=/^'([^]*?)'?$/,JD=/''/g,QD=/[a-zA-Z]/;function XD(n,e,t){var g,_,p,w,C,T,k,I;const r=Jl(),o=(t==null?void 0:t.locale)??r.locale??Lf,a=(t==null?void 0:t.firstWeekContainsDate)??((_=(g=t==null?void 0:t.locale)==null?void 0:g.options)==null?void 0:_.firstWeekContainsDate)??r.firstWeekContainsDate??((w=(p=r.locale)==null?void 0:p.options)==null?void 0:w.firstWeekContainsDate)??1,l=(t==null?void 0:t.weekStartsOn)??((T=(C=t==null?void 0:t.locale)==null?void 0:C.options)==null?void 0:T.weekStartsOn)??r.weekStartsOn??((I=(k=r.locale)==null?void 0:k.options)==null?void 0:I.weekStartsOn)??0,d=br(n,t==null?void 0:t.in);if(!tD(d))throw new RangeError("Invalid time value");let h=e.match(jD).map(N=>{const D=N[0];if(D==="p"||D==="P"){const L=VD[D];return L(N,o.formatLong)}return N}).join("").match(qD).map(N=>{if(N==="''")return{isToken:!1,value:"'"};const D=N[0];if(D==="'")return{isToken:!1,value:ZD(N)};if(av[D])return{isToken:!0,value:N};if(D.match(QD))throw new RangeError("Format string contains an unescaped latin alphabet character `"+D+"`");return{isToken:!1,value:N}});o.localize.preprocessor&&(h=o.localize.preprocessor(d,h));const f={firstWeekContainsDate:a,weekStartsOn:l,locale:o};return h.map(N=>{if(!N.isToken)return N.value;const D=N.value;(!(t!=null&&t.useAdditionalWeekYearTokens)&&WD(D)||!(t!=null&&t.useAdditionalDayOfYearTokens)&&KD(D))&&zD(D,e,String(n));const L=av[D[0]];return L(d,D,o.localize,f)}).join("")}function ZD(n){const e=n.match(YD);return e?e[1].replace(JD,"'"):n}const uv={lessThanXSeconds:{standalone:{one:"weniger als 1 Sekunde",other:"weniger als {{count}} Sekunden"},withPreposition:{one:"weniger als 1 Sekunde",other:"weniger als {{count}} Sekunden"}},xSeconds:{standalone:{one:"1 Sekunde",other:"{{count}} Sekunden"},withPreposition:{one:"1 Sekunde",other:"{{count}} Sekunden"}},halfAMinute:{standalone:"eine halbe Minute",withPreposition:"einer halben Minute"},lessThanXMinutes:{standalone:{one:"weniger als 1 Minute",other:"weniger als {{count}} Minuten"},withPreposition:{one:"weniger als 1 Minute",other:"weniger als {{count}} Minuten"}},xMinutes:{standalone:{one:"1 Minute",other:"{{count}} Minuten"},withPreposition:{one:"1 Minute",other:"{{count}} Minuten"}},aboutXHours:{standalone:{one:"etwa 1 Stunde",other:"etwa {{count}} Stunden"},withPreposition:{one:"etwa 1 Stunde",other:"etwa {{count}} Stunden"}},xHours:{standalone:{one:"1 Stunde",other:"{{count}} Stunden"},withPreposition:{one:"1 Stunde",other:"{{count}} Stunden"}},xDays:{standalone:{one:"1 Tag",other:"{{count}} Tage"},withPreposition:{one:"1 Tag",other:"{{count}} Tagen"}},aboutXWeeks:{standalone:{one:"etwa 1 Woche",other:"etwa {{count}} Wochen"},withPreposition:{one:"etwa 1 Woche",other:"etwa {{count}} Wochen"}},xWeeks:{standalone:{one:"1 Woche",other:"{{count}} Wochen"},withPreposition:{one:"1 Woche",other:"{{count}} Wochen"}},aboutXMonths:{standalone:{one:"etwa 1 Monat",other:"etwa {{count}} Monate"},withPreposition:{one:"etwa 1 Monat",other:"etwa {{count}} Monaten"}},xMonths:{standalone:{one:"1 Monat",other:"{{count}} Monate"},withPreposition:{one:"1 Monat",other:"{{count}} Monaten"}},aboutXYears:{standalone:{one:"etwa 1 Jahr",other:"etwa {{count}} Jahre"},withPreposition:{one:"etwa 1 Jahr",other:"etwa {{count}} Jahren"}},xYears:{standalone:{one:"1 Jahr",other:"{{count}} Jahre"},withPreposition:{one:"1 Jahr",other:"{{count}} Jahren"}},overXYears:{standalone:{one:"mehr als 1 Jahr",other:"mehr als {{count}} Jahre"},withPreposition:{one:"mehr als 1 Jahr",other:"mehr als {{count}} Jahren"}},almostXYears:{standalone:{one:"fast 1 Jahr",other:"fast {{count}} Jahre"},withPreposition:{one:"fast 1 Jahr",other:"fast {{count}} Jahren"}}},eL=(n,e,t)=>{let r;const o=t!=null&&t.addSuffix?uv[n].withPreposition:uv[n].standalone;return typeof o=="string"?r=o:e===1?r=o.one:r=o.other.replace("{{count}}",String(e)),t!=null&&t.addSuffix?t.comparison&&t.comparison>0?"in "+r:"vor "+r:r},tL={full:"EEEE, do MMMM y",long:"do MMMM y",medium:"do MMM y",short:"dd.MM.y"},nL={full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},rL={full:"{{date}} 'um' {{time}}",long:"{{date}} 'um' {{time}}",medium:"{{date}} {{time}}",short:"{{date}} {{time}}"},oL={date:ar({formats:tL,defaultWidth:"full"}),time:ar({formats:nL,defaultWidth:"full"}),dateTime:ar({formats:rL,defaultWidth:"full"})},iL={lastWeek:"'letzten' eeee 'um' p",yesterday:"'gestern um' p",today:"'heute um' p",tomorrow:"'morgen um' p",nextWeek:"eeee 'um' p",other:"P"},aL=(n,e,t,r)=>iL[n],sL={narrow:["v.Chr.","n.Chr."],abbreviated:["v.Chr.","n.Chr."],wide:["vor Christus","nach Christus"]},cL={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1. Quartal","2. Quartal","3. Quartal","4. Quartal"]},xh={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mär","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Dez"],wide:["Januar","Februar","März","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember"]},lL={narrow:xh.narrow,abbreviated:["Jan.","Feb.","März","Apr.","Mai","Juni","Juli","Aug.","Sep.","Okt.","Nov.","Dez."],wide:xh.wide},uL={narrow:["S","M","D","M","D","F","S"],short:["So","Mo","Di","Mi","Do","Fr","Sa"],abbreviated:["So.","Mo.","Di.","Mi.","Do.","Fr.","Sa."],wide:["Sonntag","Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag"]},dL={narrow:{am:"vm.",pm:"nm.",midnight:"Mitternacht",noon:"Mittag",morning:"Morgen",afternoon:"Nachm.",evening:"Abend",night:"Nacht"},abbreviated:{am:"vorm.",pm:"nachm.",midnight:"Mitternacht",noon:"Mittag",morning:"Morgen",afternoon:"Nachmittag",evening:"Abend",night:"Nacht"},wide:{am:"vormittags",pm:"nachmittags",midnight:"Mitternacht",noon:"Mittag",morning:"Morgen",afternoon:"Nachmittag",evening:"Abend",night:"Nacht"}},hL={narrow:{am:"vm.",pm:"nm.",midnight:"Mitternacht",noon:"Mittag",morning:"morgens",afternoon:"nachm.",evening:"abends",night:"nachts"},abbreviated:{am:"vorm.",pm:"nachm.",midnight:"Mitternacht",noon:"Mittag",morning:"morgens",afternoon:"nachmittags",evening:"abends",night:"nachts"},wide:{am:"vormittags",pm:"nachmittags",midnight:"Mitternacht",noon:"Mittag",morning:"morgens",afternoon:"nachmittags",evening:"abends",night:"nachts"}},fL=n=>Number(n)+".",mL={ordinalNumber:fL,era:bt({values:sL,defaultWidth:"wide"}),quarter:bt({values:cL,defaultWidth:"wide",argumentCallback:n=>n-1}),month:bt({values:xh,formattingValues:lL,defaultWidth:"wide"}),day:bt({values:uL,defaultWidth:"wide"}),dayPeriod:bt({values:dL,defaultWidth:"wide",formattingValues:hL,defaultFormattingWidth:"wide"})},gL=/^(\d+)(\.)?/i,pL=/\d+/i,_L={narrow:/^(v\.? ?Chr\.?|n\.? ?Chr\.?)/i,abbreviated:/^(v\.? ?Chr\.?|n\.? ?Chr\.?)/i,wide:/^(vor Christus|vor unserer Zeitrechnung|nach Christus|unserer Zeitrechnung)/i},vL={any:[/^v/i,/^n/i]},yL={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](\.)? Quartal/i},CL={any:[/1/i,/2/i,/3/i,/4/i]},EL={narrow:/^[jfmasond]/i,abbreviated:/^(j[aä]n|feb|mär[z]?|apr|mai|jun[i]?|jul[i]?|aug|sep|okt|nov|dez)\.?/i,wide:/^(januar|februar|märz|april|mai|juni|juli|august|september|oktober|november|dezember)/i},wL={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:[/^j[aä]/i,/^f/i,/^mär/i,/^ap/i,/^mai/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},TL={narrow:/^[smdmf]/i,short:/^(so|mo|di|mi|do|fr|sa)/i,abbreviated:/^(son?|mon?|die?|mit?|don?|fre?|sam?)\.?/i,wide:/^(sonntag|montag|dienstag|mittwoch|donnerstag|freitag|samstag)/i},bL={any:[/^so/i,/^mo/i,/^di/i,/^mi/i,/^do/i,/^f/i,/^sa/i]},IL={narrow:/^(vm\.?|nm\.?|Mitternacht|Mittag|morgens|nachm\.?|abends|nachts)/i,abbreviated:/^(vorm\.?|nachm\.?|Mitternacht|Mittag|morgens|nachm\.?|abends|nachts)/i,wide:/^(vormittags|nachmittags|Mitternacht|Mittag|morgens|nachmittags|abends|nachts)/i},SL={any:{am:/^v/i,pm:/^n/i,midnight:/^Mitte/i,noon:/^Mitta/i,morning:/morgens/i,afternoon:/nachmittags/i,evening:/abends/i,night:/nachts/i}},AL={ordinalNumber:Ql({matchPattern:gL,parsePattern:pL,valueCallback:n=>parseInt(n)}),era:It({matchPatterns:_L,defaultMatchWidth:"wide",parsePatterns:vL,defaultParseWidth:"any"}),quarter:It({matchPatterns:yL,defaultMatchWidth:"wide",parsePatterns:CL,defaultParseWidth:"any",valueCallback:n=>n+1}),month:It({matchPatterns:EL,defaultMatchWidth:"wide",parsePatterns:wL,defaultParseWidth:"any"}),day:It({matchPatterns:TL,defaultMatchWidth:"wide",parsePatterns:bL,defaultParseWidth:"any"}),dayPeriod:It({matchPatterns:IL,defaultMatchWidth:"wide",parsePatterns:SL,defaultParseWidth:"any"})},kL={code:"de",formatDistance:eL,formatLong:oL,formatRelative:aL,localize:mL,match:AL,options:{weekStartsOn:1,firstWeekContainsDate:4}},NL={lessThanXSeconds:{one:"moins d’une seconde",other:"moins de {{count}} secondes"},xSeconds:{one:"1 seconde",other:"{{count}} secondes"},halfAMinute:"30 secondes",lessThanXMinutes:{one:"moins d’une minute",other:"moins de {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"environ 1 heure",other:"environ {{count}} heures"},xHours:{one:"1 heure",other:"{{count}} heures"},xDays:{one:"1 jour",other:"{{count}} jours"},aboutXWeeks:{one:"environ 1 semaine",other:"environ {{count}} semaines"},xWeeks:{one:"1 semaine",other:"{{count}} semaines"},aboutXMonths:{one:"environ 1 mois",other:"environ {{count}} mois"},xMonths:{one:"1 mois",other:"{{count}} mois"},aboutXYears:{one:"environ 1 an",other:"environ {{count}} ans"},xYears:{one:"1 an",other:"{{count}} ans"},overXYears:{one:"plus d’un an",other:"plus de {{count}} ans"},almostXYears:{one:"presqu’un an",other:"presque {{count}} ans"}},RL=(n,e,t)=>{let r;const o=NL[n];return typeof o=="string"?r=o:e===1?r=o.one:r=o.other.replace("{{count}}",String(e)),t!=null&&t.addSuffix?t.comparison&&t.comparison>0?"dans "+r:"il y a "+r:r},OL={full:"EEEE d MMMM y",long:"d MMMM y",medium:"d MMM y",short:"dd/MM/y"},PL={full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},ML={full:"{{date}} 'à' {{time}}",long:"{{date}} 'à' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},DL={date:ar({formats:OL,defaultWidth:"full"}),time:ar({formats:PL,defaultWidth:"full"}),dateTime:ar({formats:ML,defaultWidth:"full"})},LL={lastWeek:"eeee 'dernier à' p",yesterday:"'hier à' p",today:"'aujourd’hui à' p",tomorrow:"'demain à' p'",nextWeek:"eeee 'prochain à' p",other:"P"},xL=(n,e,t,r)=>LL[n],UL={narrow:["av. J.-C","ap. J.-C"],abbreviated:["av. J.-C","ap. J.-C"],wide:["avant Jésus-Christ","après Jésus-Christ"]},BL={narrow:["T1","T2","T3","T4"],abbreviated:["1er trim.","2ème trim.","3ème trim.","4ème trim."],wide:["1er trimestre","2ème trimestre","3ème trimestre","4ème trimestre"]},VL={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["janv.","févr.","mars","avr.","mai","juin","juil.","août","sept.","oct.","nov.","déc."],wide:["janvier","février","mars","avril","mai","juin","juillet","août","septembre","octobre","novembre","décembre"]},FL={narrow:["D","L","M","M","J","V","S"],short:["di","lu","ma","me","je","ve","sa"],abbreviated:["dim.","lun.","mar.","mer.","jeu.","ven.","sam."],wide:["dimanche","lundi","mardi","mercredi","jeudi","vendredi","samedi"]},HL={narrow:{am:"AM",pm:"PM",midnight:"minuit",noon:"midi",morning:"mat.",afternoon:"ap.m.",evening:"soir",night:"mat."},abbreviated:{am:"AM",pm:"PM",midnight:"minuit",noon:"midi",morning:"matin",afternoon:"après-midi",evening:"soir",night:"matin"},wide:{am:"AM",pm:"PM",midnight:"minuit",noon:"midi",morning:"du matin",afternoon:"de l’après-midi",evening:"du soir",night:"du matin"}},$L=(n,e)=>{const t=Number(n),r=e==null?void 0:e.unit;if(t===0)return"0";const o=["year","week","hour","minute","second"];let a;return t===1?a=r&&o.includes(r)?"ère":"er":a="ème",t+a},KL=["MMM","MMMM"],WL={preprocessor:(n,e)=>n.getDate()===1||!e.some(r=>r.isToken&&KL.includes(r.value))?e:e.map(r=>r.isToken&&r.value==="do"?{isToken:!0,value:"d"}:r),ordinalNumber:$L,era:bt({values:UL,defaultWidth:"wide"}),quarter:bt({values:BL,defaultWidth:"wide",argumentCallback:n=>n-1}),month:bt({values:VL,defaultWidth:"wide"}),day:bt({values:FL,defaultWidth:"wide"}),dayPeriod:bt({values:HL,defaultWidth:"wide"})},zL=/^(\d+)(ième|ère|ème|er|e)?/i,GL=/\d+/i,qL={narrow:/^(av\.J\.C|ap\.J\.C|ap\.J\.-C)/i,abbreviated:/^(av\.J\.-C|av\.J-C|apr\.J\.-C|apr\.J-C|ap\.J-C)/i,wide:/^(avant Jésus-Christ|après Jésus-Christ)/i},jL={any:[/^av/i,/^ap/i]},YL={narrow:/^T?[1234]/i,abbreviated:/^[1234](er|ème|e)? trim\.?/i,wide:/^[1234](er|ème|e)? trimestre/i},JL={any:[/1/i,/2/i,/3/i,/4/i]},QL={narrow:/^[jfmasond]/i,abbreviated:/^(janv|févr|mars|avr|mai|juin|juill|juil|août|sept|oct|nov|déc)\.?/i,wide:/^(janvier|février|mars|avril|mai|juin|juillet|août|septembre|octobre|novembre|décembre)/i},XL={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,/^av/i,/^ma/i,/^juin/i,/^juil/i,/^ao/i,/^s/i,/^o/i,/^n/i,/^d/i]},ZL={narrow:/^[lmjvsd]/i,short:/^(di|lu|ma|me|je|ve|sa)/i,abbreviated:/^(dim|lun|mar|mer|jeu|ven|sam)\.?/i,wide:/^(dimanche|lundi|mardi|mercredi|jeudi|vendredi|samedi)/i},ex={narrow:[/^d/i,/^l/i,/^m/i,/^m/i,/^j/i,/^v/i,/^s/i],any:[/^di/i,/^lu/i,/^ma/i,/^me/i,/^je/i,/^ve/i,/^sa/i]},tx={narrow:/^(a|p|minuit|midi|mat\.?|ap\.?m\.?|soir|nuit)/i,any:/^([ap]\.?\s?m\.?|du matin|de l'après[-\s]midi|du soir|de la nuit)/i},nx={any:{am:/^a/i,pm:/^p/i,midnight:/^min/i,noon:/^mid/i,morning:/mat/i,afternoon:/ap/i,evening:/soir/i,night:/nuit/i}},rx={ordinalNumber:Ql({matchPattern:zL,parsePattern:GL,valueCallback:n=>parseInt(n)}),era:It({matchPatterns:qL,defaultMatchWidth:"wide",parsePatterns:jL,defaultParseWidth:"any"}),quarter:It({matchPatterns:YL,defaultMatchWidth:"wide",parsePatterns:JL,defaultParseWidth:"any",valueCallback:n=>n+1}),month:It({matchPatterns:QL,defaultMatchWidth:"wide",parsePatterns:XL,defaultParseWidth:"any"}),day:It({matchPatterns:ZL,defaultMatchWidth:"wide",parsePatterns:ex,defaultParseWidth:"any"}),dayPeriod:It({matchPatterns:tx,defaultMatchWidth:"any",parsePatterns:nx,defaultParseWidth:"any"})},ox={code:"fr",formatDistance:RL,formatLong:DL,formatRelative:xL,localize:WL,match:rx,options:{weekStartsOn:1,firstWeekContainsDate:4}},ix={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"}},ax=(n,e,t)=>{let r;const o=ix[n];return typeof o=="string"?r=o:e===1?r=o.one:r=o.other.replace("{{count}}",String(e)),t!=null&&t.addSuffix?t.comparison&&t.comparison>0?"em "+r:"há "+r:r},sx={full:"EEEE, d 'de' MMMM 'de' y",long:"d 'de' MMMM 'de' y",medium:"d MMM y",short:"dd/MM/yyyy"},cx={full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},lx={full:"{{date}} 'às' {{time}}",long:"{{date}} 'às' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},ux={date:ar({formats:sx,defaultWidth:"full"}),time:ar({formats:cx,defaultWidth:"full"}),dateTime:ar({formats:lx,defaultWidth:"full"})},dx={lastWeek:n=>{const e=n.getDay();return"'"+(e===0||e===6?"último":"última")+"' eeee 'às' p"},yesterday:"'ontem às' p",today:"'hoje às' p",tomorrow:"'amanhã às' p",nextWeek:"eeee 'às' p",other:"P"},hx=(n,e,t,r)=>{const o=dx[n];return typeof o=="function"?o(e):o},fx={narrow:["AC","DC"],abbreviated:["AC","DC"],wide:["antes de cristo","depois de cristo"]},mx={narrow:["1","2","3","4"],abbreviated:["T1","T2","T3","T4"],wide:["1º trimestre","2º trimestre","3º trimestre","4º trimestre"]},gx={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"]},px={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"]},_x={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"}},vx={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"}},yx=(n,e)=>{const t=Number(n);return(e==null?void 0:e.unit)==="week"?t+"ª":t+"º"},Cx={ordinalNumber:yx,era:bt({values:fx,defaultWidth:"wide"}),quarter:bt({values:mx,defaultWidth:"wide",argumentCallback:n=>n-1}),month:bt({values:gx,defaultWidth:"wide"}),day:bt({values:px,defaultWidth:"wide"}),dayPeriod:bt({values:_x,defaultWidth:"wide",formattingValues:vx,defaultFormattingWidth:"wide"})},Ex=/^(\d+)[ºªo]?/i,wx=/\d+/i,Tx={narrow:/^(ac|dc|a|d)/i,abbreviated:/^(a\.?\s?c\.?|d\.?\s?c\.?)/i,wide:/^(antes de cristo|depois de cristo)/i},bx={any:[/^ac/i,/^dc/i],wide:[/^antes de cristo/i,/^depois de cristo/i]},Ix={narrow:/^[1234]/i,abbreviated:/^T[1234]/i,wide:/^[1234](º)? trimestre/i},Sx={any:[/1/i,/2/i,/3/i,/4/i]},Ax={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},kx={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]},Nx={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},Rx={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]},Ox={narrow:/^(a|p|mn|md|(da) (manhã|tarde|noite))/i,any:/^([ap]\.?\s?m\.?|meia[-\s]noite|meio[-\s]dia|(da) (manhã|tarde|noite))/i},Px={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}},Mx={ordinalNumber:Ql({matchPattern:Ex,parsePattern:wx,valueCallback:n=>parseInt(n,10)}),era:It({matchPatterns:Tx,defaultMatchWidth:"wide",parsePatterns:bx,defaultParseWidth:"any"}),quarter:It({matchPatterns:Ix,defaultMatchWidth:"wide",parsePatterns:Sx,defaultParseWidth:"any",valueCallback:n=>n+1}),month:It({matchPatterns:Ax,defaultMatchWidth:"wide",parsePatterns:kx,defaultParseWidth:"any"}),day:It({matchPatterns:Nx,defaultMatchWidth:"wide",parsePatterns:Rx,defaultParseWidth:"any"}),dayPeriod:It({matchPatterns:Ox,defaultMatchWidth:"any",parsePatterns:Px,defaultParseWidth:"any"})},Dx={code:"pt-BR",formatDistance:ax,formatLong:ux,formatRelative:hx,localize:Cx,match:Mx,options:{weekStartsOn:0,firstWeekContainsDate:1}},Lx={"en-US":Lf,"pt-BR":Dx,"fr-FR":ox,"de-DE":kL};function ms(n){if(!n)return"";const{locale:e}=Fn(),t=e.value,r=Lx[t]||Lf;try{const o=typeof n=="string"||n===null?new Date(n||""):n;return isNaN(o.getTime())?"":XD(o,"PPpp",{locale:r})}catch(o){return console.error("Error formatting date:",o),""}}const Uh="https://app-files.jplan.com.br/pub/resources/assets/thumbs/empty_list.svg";function xx(n){const{clientX:e,clientY:t}=n,{innerWidth:r,innerHeight:o}=window;return{x:Math.min(e,r-350),y:Math.min(t,o-200)}}const Ux={key:0,class:"d-flex mt-4 flex-column align-center justify-center w-100"},Bx={key:1,class:"mt-4 h-100 rounded-sm"},Vx={class:"d-inline-flex"},Fx={class:"d-inline-flex"},Hx={class:"d-inline-flex"},nE=c.defineComponent({__name:"TableAdvanced",props:c.mergeModels({headers:{},items:{default:()=>[]},actions:{},loading:{type:Boolean},columns:{default:()=>[]},sortBy:{},dateFields:{},customFields:{},search:{},filterKeys:{},selectOnRowClick:{type:Boolean}},{selection:{},selectionModifiers:{}}),emits:c.mergeModels(["rowClick"],["update:selection"]),setup(n,{emit:e}){const t=[{value:50,title:"50"},{value:100,title:"100"},{value:500,title:"500"},{value:1e3,title:"1000"},{value:-1,title:"$vuetify.dataFooter.itemsPerPageAll"}],r=n,o=e,a=c.computed(()=>r.headers?r.headers:r.columns?r.columns.filter(p=>p.checked):[]),l=c.useModel(n,"selection"),d=c.ref(!1),h=c.ref({x:0,y:0}),f=c.ref(null),g=async(p,{item:w})=>{p.preventDefault(),f.value=w,h.value=xx(p),d.value=!0};function _(p,{item:w}){var T;if(o("rowClick",w),!r.selectOnRowClick||!((T=l.value)!=null&&T.length))return;const C=l.value.findIndex(k=>k===w);return C!==-1?l.value.splice(C,1):l.value.push(w),w}return(p,w)=>!p.loading&&p.items.length===0?(c.openBlock(),c.createElementBlock("div",Ux,[c.createVNode(pf.VImg,{"lazy-src":c.unref(Uh),src:c.unref(Uh),height:"600",width:"600"},null,8,["lazy-src","src"]),w[2]||(w[2]=c.createElementVNode("p",{class:"text-center text-body-1 w-100"},"No records found.",-1))])):(c.openBlock(),c.createElementBlock("div",Bx,[c.createVNode(_f.VMenu,{modelValue:d.value,"onUpdate:modelValue":w[0]||(w[0]=C=>d.value=C),"close-on-content-click":!0,"min-width":"350",style:c.normalizeStyle({position:"fixed",left:`${h.value.x}px`,top:`${h.value.y}px`})},{default:c.withCtx(()=>[c.renderSlot(p.$slots,"contextmenu",{item:f.value})]),_:3},8,["modelValue","style"]),c.createVNode(Oy.VDataTable,{modelValue:l.value,"onUpdate:modelValue":w[1]||(w[1]=C=>l.value=C),"fixed-header":"","fixed-footer":"","items-per-page":"50",headers:a.value,items:p.items,"items-length":p.items.length,loading:p.loading||!1,"return-object":"","show-select":"","sort-by":p.sortBy,search:p.search,"filter-keys":p.filterKeys,height:"calc(100vh - 320px)",class:"customize-table bg-containerBg","onContextmenu:row":g,"onClick:row":_,"items-per-page-options":t},c.createSlots({"item.avatar":c.withCtx(({item:C})=>[c.renderSlot(p.$slots,"avatar",{item:C})]),"item.active":c.withCtx(({item:C})=>[c.renderSlot(p.$slots,"active",{item:C})]),"item.image":c.withCtx(({item:C})=>[c.renderSlot(p.$slots,"image",{item:C})]),"item.picture":c.withCtx(({item:C})=>[c.renderSlot(p.$slots,"picture",{item:C})]),"item.icon":c.withCtx(({item:C})=>[c.renderSlot(p.$slots,"icon",{item:C})]),"item.actions":c.withCtx(({item:C})=>[c.createElementVNode("div",Fx,[c.renderSlot(p.$slots,"actions",{item:C})])]),"no-data":c.withCtx(()=>[w[3]||(w[3]=c.createElementVNode("p",null,"No results found.",-1))]),_:2},[c.renderList(p.customFields,C=>({name:`item.${C}`,fn:c.withCtx(({item:T})=>[c.createElementVNode("div",Vx,[c.renderSlot(p.$slots,C,{item:T})])])})),c.renderList(p.dateFields,C=>({name:`item.${C}`,fn:c.withCtx(({item:T})=>[c.createElementVNode("div",Hx,c.toDisplayString(c.unref(ms)(T[C])),1)])}))]),1032,["modelValue","headers","items","items-length","loading","sort-by","search","filter-keys"])]))}}),Xl=c.defineComponent({__name:"SearchFilter",props:c.mergeModels({placeholder:{}},{search:{},searchModifiers:{}}),emits:["update:search"],setup(n){const e=c.useModel(n,"search"),{t}=Fn();return(r,o)=>(c.openBlock(),c.createBlock(SO.VTextField,{class:"bg-containerBg pa-1 rounded-sm elevation-1","persistent-placeholder":"",placeholder:r.placeholder??c.unref(t)("placeholders.search"),variant:"plain","hide-details":"",density:"compact",modelValue:e.value,"onUpdate:modelValue":o[0]||(o[0]=a=>e.value=a)},{"prepend-inner":c.withCtx(()=>[c.createVNode(c.unref(_P),{size:"15",class:"ma-1 me-1"})]),_:1},8,["placeholder","modelValue"]))}}),$x=c.defineComponent({__name:"TableHeader",props:c.mergeModels({columns:{},filter_visualize:{type:Boolean,default:!0}},{search:{},searchModifiers:{}}),emits:c.mergeModels(["refresh","remove"],["update:search"]),setup(n,{emit:e}){var g,_;const t=n,r=c.computed(()=>t.columns),o=e,a=c.useModel(n,"search"),{openDialog:l}=Us("col-settings"),d=c.getCurrentInstance(),h=((g=d==null?void 0:d.vnode.props)==null?void 0:g.onRemove)!==void 0||((_=d==null?void 0:d.vnode.props)==null?void 0:_["onUpdate:remove"])!==void 0,{t:f}=Fn();return(p,w)=>(c.openBlock(),c.createElementBlock("div",null,[c.createVNode(c.unref(Vf),{modelValue:r.value,"onUpdate:modelValue":w[0]||(w[0]=C=>r.value=C)},null,8,["modelValue"]),c.createVNode(qe.VRow,{"no-gutters":"",align:"center"},{default:c.withCtx(()=>[c.createVNode(qe.VCol,{cols:"12",md:"6",class:"d-flex align-center flex-wrap gap-2"},{default:c.withCtx(()=>[c.createElementVNode("div",null,[c.createVNode(c.unref(hP),{class:"mt-1 me-2",color:"rgb(var(--v-theme-lightprimary))"})]),c.renderSlot(p.$slots,"filter",{},void 0,!0),p.$slots.filter?c.createCommentVNode("",!0):(c.openBlock(),c.createBlock(fs.VSelect,{key:0,items:["Move data","Copy","Duplicate","Loop"],variant:"solo","bg-color":"containerBg",rounded:"false",placeholder:c.unref(f)("placeholders.selectFilter"),density:"compact",class:"filter-field","hide-details":"",multiple:"",clearable:""},null,8,["placeholder"])),c.createVNode(Ge.VBtn,{icon:"",variant:"text",onClick:w[1]||(w[1]=C=>o("refresh"))},{default:c.withCtx(()=>[c.createVNode(c.unref(pP),{color:"rgb(var(--v-theme-secondary))"})]),_:1}),c.createVNode(Ge.VBtn,{icon:"",variant:"text"},{default:c.withCtx(()=>[c.createVNode(c.unref(dP),{color:"rgb(var(--v-theme-secondary))"})]),_:1})]),_:3}),c.createVNode(qe.VCol,{cols:"12",md:"6",class:"d-flex align-center justify-end flex-wrap gap-2"},{default:c.withCtx(()=>[c.renderSlot(p.$slots,"top-right",{},void 0,!0),c.createVNode(Ge.VBtn,{class:"me-2",icon:"",variant:"text",onClick:c.unref(l)},{default:c.withCtx(()=>[c.createVNode(c.unref(gP),{color:"rgb(var(--v-theme-secondary))"})]),_:1},8,["onClick"]),c.createVNode(Xl,{class:"search-field",modelValue:a.value,"onUpdate:modelValue":w[2]||(w[2]=C=>a.value=C)},null,8,["modelValue"])]),_:3})]),_:3}),c.createVNode(Ho.VDivider,{class:"my-4"}),c.createVNode(qe.VRow,{align:"center"},{default:c.withCtx(()=>[c.createVNode(qe.VCol,{md:"3",cols:"6",class:"d-flex flex-wrap gap-2"},{default:c.withCtx(()=>[c.renderSlot(p.$slots,"left-prepend",{},void 0,!0),c.unref(h)?(c.openBlock(),c.createBlock(c.unref(Df),{key:0,onRemoveAll:w[3]||(w[3]=C=>o("remove"))})):c.createCommentVNode("",!0),c.renderSlot(p.$slots,"left-append",{},void 0,!0)]),_:3}),c.createVNode(qe.VCol,{md:"9",cols:"12",class:"d-flex justify-end align-center flex-wrap gap-2"},{default:c.withCtx(()=>[c.renderSlot(p.$slots,"right-prepend",{},void 0,!0),p.filter_visualize?(c.openBlock(),c.createElementBlock(c.Fragment,{key:0},[c.createVNode(c.unref(vP),{class:"me-2",color:"rgb(var(--v-theme-secondary))"}),c.createVNode(fs.VSelect,{items:[],variant:"solo","bg-color":"containerBg",rounded:"false",placeholder:c.unref(f)("placeholders.visualize"),density:"compact",class:"bottom-field me-2","hide-details":"",multiple:"",clearable:""},null,8,["placeholder"])],64)):c.createCommentVNode("",!0),c.createVNode(c.unref(mP),{class:"me-2",color:"rgb(var(--v-theme-secondary))"}),c.createVNode(fs.VSelect,{items:["Move data","Copy","Duplicate","Loop"],variant:"solo","bg-color":"containerBg",rounded:"false",placeholder:c.unref(f)("placeholders.actions"),density:"compact",class:"bottom-field","hide-details":"",clearable:""},null,8,["placeholder"])]),_:3})]),_:3})]))}}),rE=Si($x,[["__scopeId","data-v-58865e47"]]);/*!
|
31
|
+
*/const cM="11.1.3";function lM(){typeof __VUE_I18N_FULL_INSTALL__!="boolean"&&(gi().__VUE_I18N_FULL_INSTALL__=!0),typeof __VUE_I18N_LEGACY_API__!="boolean"&&(gi().__VUE_I18N_LEGACY_API__=!0),typeof __INTLIFY_DROP_MESSAGE_COMPILER__!="boolean"&&(gi().__INTLIFY_DROP_MESSAGE_COMPILER__=!1),typeof __INTLIFY_PROD_DEVTOOLS__!="boolean"&&(gi().__INTLIFY_PROD_DEVTOOLS__=!1)}const rt={UNEXPECTED_RETURN_TYPE:b1,INVALID_ARGUMENT:25,MUST_BE_CALL_SETUP_TOP:26,NOT_INSTALLED:27,REQUIRED_VALUE:28,INVALID_VALUE:29,CANNOT_SETUP_VUE_DEVTOOLS_PLUGIN:30,NOT_INSTALLED_WITH_PROVIDE:31,UNEXPECTED_ERROR:32,NOT_COMPATIBLE_LEGACY_VUE_I18N:33,NOT_AVAILABLE_COMPOSITION_IN_LEGACY:34};function Cn(n,...e){return Na(n,null,process.env.NODE_ENV!=="production"?{messages:uM,args:e}:void 0)}const uM={[rt.UNEXPECTED_RETURN_TYPE]:"Unexpected return type in composer",[rt.INVALID_ARGUMENT]:"Invalid argument",[rt.MUST_BE_CALL_SETUP_TOP]:"Must be called at the top of a `setup` function",[rt.NOT_INSTALLED]:"Need to install with `app.use` function",[rt.UNEXPECTED_ERROR]:"Unexpected error",[rt.REQUIRED_VALUE]:"Required in value: {0}",[rt.INVALID_VALUE]:"Invalid value",[rt.CANNOT_SETUP_VUE_DEVTOOLS_PLUGIN]:"Cannot setup vue-devtools plugin",[rt.NOT_INSTALLED_WITH_PROVIDE]:"Need to install with `provide` function",[rt.NOT_COMPATIBLE_LEGACY_VUE_I18N]:"Not compatible legacy VueI18n.",[rt.NOT_AVAILABLE_COMPOSITION_IN_LEGACY]:"Not available Compostion API in Legacy API mode. Please make sure that the legacy API mode is working properly"},Rh=Gr("__translateVNode"),Oh=Gr("__datetimeParts"),Ph=Gr("__numberParts"),wi=Gr("__enableEmitter"),Ns=Gr("__disableEmitter"),xC=Gr("__setPluralRules"),UC=Gr("__injectWithOption"),Mh=Gr("__dispose"),xr={FALLBACK_TO_ROOT:U1,NOT_FOUND_PARENT_SCOPE:9,IGNORE_OBJ_FLATTEN:10,DEPRECATE_LEGACY_MODE:11,DEPRECATE_TRANSLATE_CUSTOME_DIRECTIVE:12},dM={[xr.FALLBACK_TO_ROOT]:"Fall back to {type} '{key}' with root locale.",[xr.NOT_FOUND_PARENT_SCOPE]:"Not found parent scope. use the global scope.",[xr.IGNORE_OBJ_FLATTEN]:"Ignore object flatten: '{key}' key has an string value",[xr.DEPRECATE_LEGACY_MODE]:`Legacy API mode has been deprecated in v11. Use Composition API mode instead.
|
32
|
+
About how to use the Composition API mode, see https://vue-i18n.intlify.dev/guide/advanced/composition.html`,[xr.DEPRECATE_TRANSLATE_CUSTOME_DIRECTIVE]:"'v-t' has been deprecated in v11. Use translate APIs ('t' or '$t') instead."};function Fs(n,...e){return zl(dM[n],...e)}function Rs(n){if(!Le(n)||ir(n))return n;for(const e in n)if(yr(n,e))if(!e.includes("."))Le(n[e])&&Rs(n[e]);else{const t=e.split("."),r=t.length-1;let o=n,a=!1;for(let l=0;l<r;l++){if(t[l]==="__proto__")throw new Error(`unsafe key: ${t[l]}`);if(t[l]in o||(o[t[l]]=Ye()),!Le(o[t[l]])){process.env.NODE_ENV!=="production"&&Go(Fs(xr.IGNORE_OBJ_FLATTEN,{key:t[l]})),a=!0;break}o=o[t[l]]}if(a||(ir(o)?wC.includes(t[r])||delete n[e]:(o[t[r]]=n[e],delete n[e])),!ir(o)){const l=o[t[r]];Le(l)&&Rs(l)}}return n}function Rf(n,e){const{messages:t,__i18n:r,messageResolver:o,flatJson:a}=e,l=ke(t)?t:vt(r)?Ye():{[n]:Ye()};if(vt(r)&&r.forEach(d=>{if("locale"in d&&"resource"in d){const{locale:h,resource:f}=d;h?(l[h]=l[h]||Ye(),ll(f,l[h])):ll(f,l)}else ne(d)&&ll(JSON.parse(d),l)}),o==null&&a)for(const d in l)yr(l,d)&&Rs(l[d]);return l}function BC(n){return n.type}function VC(n,e,t){let r=Le(e.messages)?e.messages:Ye();"__i18nGlobal"in t&&(r=Rf(n.locale.value,{messages:r,__i18n:t.__i18nGlobal}));const o=Object.keys(r);o.length&&o.forEach(a=>{n.mergeLocaleMessage(a,r[a])});{if(Le(e.datetimeFormats)){const a=Object.keys(e.datetimeFormats);a.length&&a.forEach(l=>{n.mergeDateTimeFormat(l,e.datetimeFormats[l])})}if(Le(e.numberFormats)){const a=Object.keys(e.numberFormats);a.length&&a.forEach(l=>{n.mergeNumberFormat(l,e.numberFormats[l])})}}}function W_(n){return c.createVNode(c.Text,null,n,0)}const z_="__INTLIFY_META__",G_=()=>[],hM=()=>!1;let q_=0;function j_(n){return(e,t,r,o)=>n(t,r,c.getCurrentInstance()||void 0,o)}const fM=()=>{const n=c.getCurrentInstance();let e=null;return n&&(e=BC(n)[z_])?{[z_]:e}:null};function Of(n={}){const{__root:e,__injectWithOption:t}=n,r=e===void 0,o=n.flatJson,a=wr?c.ref:c.shallowRef;let l=Ue(n.inheritLocale)?n.inheritLocale:!0;const d=a(e&&l?e.locale.value:ne(n.locale)?n.locale:ks),h=a(e&&l?e.fallbackLocale.value:ne(n.fallbackLocale)||vt(n.fallbackLocale)||ke(n.fallbackLocale)||n.fallbackLocale===!1?n.fallbackLocale:d.value),f=a(Rf(d.value,n)),g=a(ke(n.datetimeFormats)?n.datetimeFormats:{[d.value]:{}}),_=a(ke(n.numberFormats)?n.numberFormats:{[d.value]:{}});let p=e?e.missingWarn:Ue(n.missingWarn)||wa(n.missingWarn)?n.missingWarn:!0,w=e?e.fallbackWarn:Ue(n.fallbackWarn)||wa(n.fallbackWarn)?n.fallbackWarn:!0,C=e?e.fallbackRoot:Ue(n.fallbackRoot)?n.fallbackRoot:!0,T=!!n.fallbackFormat,k=Xe(n.missing)?n.missing:null,S=Xe(n.missing)?j_(n.missing):null,N=Xe(n.postTranslation)?n.postTranslation:null,D=e?e.warnHtmlMessage:Ue(n.warnHtmlMessage)?n.warnHtmlMessage:!0,L=!!n.escapeParameter;const K=e?e.modifiers:ke(n.modifiers)?n.modifiers:{};let q=n.pluralRules||e&&e.pluralRules,M;M=(()=>{r&&D_(null);const F={version:cM,locale:d.value,fallbackLocale:h.value,messages:f.value,modifiers:K,pluralRules:q,missing:S===null?void 0:S,missingWarn:p,fallbackWarn:w,fallbackFormat:T,unresolving:!0,postTranslation:N===null?void 0:N,warnHtmlMessage:D,escapeParameter:L,messageResolver:n.messageResolver,messageCompiler:n.messageCompiler,__meta:{framework:"vue"}};F.datetimeFormats=g.value,F.numberFormats=_.value,F.__datetimeFormatters=ke(M)?M.__datetimeFormatters:void 0,F.__numberFormatters=ke(M)?M.__numberFormatters:void 0,process.env.NODE_ENV!=="production"&&(F.__v_emitter=ke(M)?M.__v_emitter:void 0);const J=q1(F);return r&&D_(J),J})(),is(M,d.value,h.value);function ae(){return[d.value,h.value,f.value,g.value,_.value]}const X=c.computed({get:()=>d.value,set:F=>{M.locale=F,d.value=F}}),ee=c.computed({get:()=>h.value,set:F=>{M.fallbackLocale=F,h.value=F,is(M,d.value,F)}}),ue=c.computed(()=>f.value),Be=c.computed(()=>g.value),Ct=c.computed(()=>_.value);function rn(){return Xe(N)?N:null}function qt(F){N=F,M.postTranslation=F}function Mt(){return k}function at(F){F!==null&&(S=j_(F)),k=F,M.missing=S}function Et(F,J){return F!=="translate"||!J.resolvedMessage}const on=(F,J,Ne,ze,cr,Eo)=>{ae();let kr;try{process.env.NODE_ENV!=="production"||__INTLIFY_PROD_DEVTOOLS__,r||(M.fallbackContext=e?G1():void 0),kr=F(M)}finally{process.env.NODE_ENV!=="production"||__INTLIFY_PROD_DEVTOOLS__,r||(M.fallbackContext=void 0)}if(Ne!=="translate exists"&&Tt(kr)&&kr===ql||Ne==="translate exists"&&!kr){const[lr,Ha]=J();if(process.env.NODE_ENV!=="production"&&e&&ne(lr)&&Et(Ne,Ha)&&(C&&(jl(w,lr)||NC(p,lr))&&Go(Fs(xr.FALLBACK_TO_ROOT,{key:lr,type:Ne})),process.env.NODE_ENV!=="production")){const{__v_emitter:Ri}=M;Ri&&C&&Ri.emit("fallback",{type:Ne,key:lr,to:"global",groupId:`${Ne}:${lr}`})}return e&&C?ze(e):cr(lr)}else{if(Eo(kr))return kr;throw Cn(rt.UNEXPECTED_RETURN_TYPE)}};function It(...F){return on(J=>Reflect.apply(K_,null,[J,...F]),()=>Nh(...F),"translate",J=>Reflect.apply(J.t,J,[...F]),J=>J,J=>ne(J))}function Jo(...F){const[J,Ne,ze]=F;if(ze&&!Le(ze))throw Cn(rt.INVALID_ARGUMENT);return It(J,Ne,Ot({resolvedMessage:!0},ze||{}))}function Ua(...F){return on(J=>Reflect.apply(U_,null,[J,...F]),()=>Ah(...F),"datetime format",J=>Reflect.apply(J.d,J,[...F]),()=>El,J=>ne(J))}function Ba(...F){return on(J=>Reflect.apply(V_,null,[J,...F]),()=>kh(...F),"number format",J=>Reflect.apply(J.n,J,[...F]),()=>El,J=>ne(J))}function Ir(F){return F.map(J=>ne(J)||Tt(J)||Ue(J)?W_(String(J)):J)}const Va={normalize:Ir,interpolate:F=>F,type:"vnode"};function Ar(...F){return on(J=>{let Ne;const ze=J;try{ze.processor=Va,Ne=Reflect.apply(K_,null,[ze,...F])}finally{ze.processor=null}return Ne},()=>Nh(...F),"translate",J=>J[Rh](...F),J=>[W_(J)],J=>vt(J))}function qr(...F){return on(J=>Reflect.apply(V_,null,[J,...F]),()=>kh(...F),"number format",J=>J[Ph](...F),G_,J=>ne(J)||vt(J))}function Fa(...F){return on(J=>Reflect.apply(U_,null,[J,...F]),()=>Ah(...F),"datetime format",J=>J[Oh](...F),G_,J=>ne(J)||vt(J))}function vo(F){q=F,M.pluralRules=q}function yo(F,J){return on(()=>{if(!F)return!1;const Ne=ne(J)?J:d.value,ze=En(Ne),cr=M.messageResolver(ze,F);return ir(cr)||or(cr)||ne(cr)},()=>[F],"translate exists",Ne=>Reflect.apply(Ne.te,Ne,[F,J]),hM,Ne=>Ue(Ne))}function Co(F){let J=null;const Ne=TC(M,h.value,d.value);for(let ze=0;ze<Ne.length;ze++){const cr=f.value[Ne[ze]]||{},Eo=M.messageResolver(cr,F);if(Eo!=null){J=Eo;break}}return J}function Vt(F){const J=Co(F);return J??(e?e.tm(F)||{}:{})}function En(F){return f.value[F]||{}}function Xo(F,J){if(o){const Ne={[F]:J};for(const ze in Ne)yr(Ne,ze)&&Rs(Ne[ze]);J=Ne[F]}f.value[F]=J,M.messages=f.value}function wn(F,J){f.value[F]=f.value[F]||{};const Ne={[F]:J};if(o)for(const ze in Ne)yr(Ne,ze)&&Rs(Ne[ze]);J=Ne[F],ll(J,f.value[F]),M.messages=f.value}function A(F){return g.value[F]||{}}function R(F,J){g.value[F]=J,M.datetimeFormats=g.value,B_(M,F,J)}function G(F,J){g.value[F]=Ot(g.value[F]||{},J),M.datetimeFormats=g.value,B_(M,F,J)}function oe(F){return _.value[F]||{}}function Je(F,J){_.value[F]=J,M.numberFormats=_.value,F_(M,F,J)}function et(F,J){_.value[F]=Ot(_.value[F]||{},J),M.numberFormats=_.value,F_(M,F,J)}q_++,e&&wr&&(c.watch(e.locale,F=>{l&&(d.value=F,M.locale=F,is(M,d.value,h.value))}),c.watch(e.fallbackLocale,F=>{l&&(h.value=F,M.fallbackLocale=F,is(M,d.value,h.value))}));const Me={id:q_,locale:X,fallbackLocale:ee,get inheritLocale(){return l},set inheritLocale(F){l=F,F&&e&&(d.value=e.locale.value,h.value=e.fallbackLocale.value,is(M,d.value,h.value))},get availableLocales(){return Object.keys(f.value).sort()},messages:ue,get modifiers(){return K},get pluralRules(){return q||{}},get isGlobal(){return r},get missingWarn(){return p},set missingWarn(F){p=F,M.missingWarn=p},get fallbackWarn(){return w},set fallbackWarn(F){w=F,M.fallbackWarn=w},get fallbackRoot(){return C},set fallbackRoot(F){C=F},get fallbackFormat(){return T},set fallbackFormat(F){T=F,M.fallbackFormat=T},get warnHtmlMessage(){return D},set warnHtmlMessage(F){D=F,M.warnHtmlMessage=F},get escapeParameter(){return L},set escapeParameter(F){L=F,M.escapeParameter=F},t:It,getLocaleMessage:En,setLocaleMessage:Xo,mergeLocaleMessage:wn,getPostTranslationHandler:rn,setPostTranslationHandler:qt,getMissingHandler:Mt,setMissingHandler:at,[xC]:vo};return Me.datetimeFormats=Be,Me.numberFormats=Ct,Me.rt=Jo,Me.te=yo,Me.tm=Vt,Me.d=Ua,Me.n=Ba,Me.getDateTimeFormat=A,Me.setDateTimeFormat=R,Me.mergeDateTimeFormat=G,Me.getNumberFormat=oe,Me.setNumberFormat=Je,Me.mergeNumberFormat=et,Me[UC]=t,Me[Rh]=Ar,Me[Oh]=Fa,Me[Ph]=qr,process.env.NODE_ENV!=="production"&&(Me[wi]=F=>{M.__v_emitter=F},Me[Ns]=()=>{M.__v_emitter=void 0}),Me}const FC="vue-i18n: composer properties",$d={"vue-devtools-plugin-vue-i18n":"Vue I18n DevTools","vue-i18n-resource-inspector":"Vue I18n DevTools","vue-i18n-timeline":"Vue I18n"},mM={"vue-i18n-resource-inspector":"Search for scopes ..."},gM={"vue-i18n-timeline":16764185};let Dh;async function pM(n,e){return new Promise((t,r)=>{try{vf({id:"vue-devtools-plugin-vue-i18n",label:$d["vue-devtools-plugin-vue-i18n"],packageName:"vue-i18n",homepage:"https://vue-i18n.intlify.dev",logo:"https://vue-i18n.intlify.dev/vue-i18n-devtools-logo.png",componentStateTypes:[FC],app:n},o=>{Dh=o,o.on.visitComponentTree(({componentInstance:l,treeNode:d})=>{_M(l,d,e)}),o.on.inspectComponent(({componentInstance:l,instanceData:d})=>{l.vnode.el&&l.vnode.el.__VUE_I18N__&&d&&(e.mode==="legacy"?l.vnode.el.__VUE_I18N__!==e.global.__composer&&Y_(d,l.vnode.el.__VUE_I18N__):Y_(d,l.vnode.el.__VUE_I18N__))}),o.addInspector({id:"vue-i18n-resource-inspector",label:$d["vue-i18n-resource-inspector"],icon:"language",treeFilterPlaceholder:mM["vue-i18n-resource-inspector"]}),o.on.getInspectorTree(l=>{l.app===n&&l.inspectorId==="vue-i18n-resource-inspector"&&wM(l,e)});const a=new Map;o.on.getInspectorState(async l=>{if(l.app===n&&l.inspectorId==="vue-i18n-resource-inspector")if(o.unhighlightElement(),bM(l,e),l.nodeId==="global"){if(!a.has(l.app)){const[d]=await o.getComponentInstances(l.app);a.set(l.app,d)}o.highlightElement(a.get(l.app))}else{const d=TM(l.nodeId,e);d&&o.highlightElement(d)}}),o.on.editInspectorState(l=>{l.app===n&&l.inspectorId==="vue-i18n-resource-inspector"&&IM(l,e)}),o.addTimelineLayer({id:"vue-i18n-timeline",label:$d["vue-i18n-timeline"],color:gM["vue-i18n-timeline"]}),t(!0)})}catch(o){console.error(o),r(!1)}})}function HC(n){return n.type.name||n.type.displayName||n.type.__file||"Anonymous"}function _M(n,e,t){const r=t.mode==="composition"?t.global:t.global.__composer;if(n&&n.vnode.el&&n.vnode.el.__VUE_I18N__&&n.vnode.el.__VUE_I18N__!==r){const o={label:`i18n (${HC(n)} Scope)`,textColor:0,backgroundColor:16764185};e.tags.push(o)}}function Y_(n,e){const t=FC;n.state.push({type:t,key:"locale",editable:!0,value:e.locale.value}),n.state.push({type:t,key:"availableLocales",editable:!1,value:e.availableLocales}),n.state.push({type:t,key:"fallbackLocale",editable:!0,value:e.fallbackLocale.value}),n.state.push({type:t,key:"inheritLocale",editable:!0,value:e.inheritLocale}),n.state.push({type:t,key:"messages",editable:!1,value:Pf(e.messages.value)}),n.state.push({type:t,key:"datetimeFormats",editable:!1,value:e.datetimeFormats.value}),n.state.push({type:t,key:"numberFormats",editable:!1,value:e.numberFormats.value})}function Pf(n){const e={};return Object.keys(n).forEach(t=>{const r=n[t];Xe(r)&&"source"in r?e[t]=EM(r):ir(r)&&r.loc&&r.loc.source?e[t]=r.loc.source:Le(r)?e[t]=Pf(r):e[t]=r}),e}const vM={"<":"<",">":">",'"':""","&":"&"};function yM(n){return n.replace(/[<>"&]/g,CM)}function CM(n){return vM[n]||n}function EM(n){return{_custom:{type:"function",display:`<span>ƒ</span> ${n.source?`("${yM(n.source)}")`:"(?)"}`}}}function wM(n,e){n.rootNodes.push({id:"global",label:"Global Scope"});const t=e.mode==="composition"?e.global:e.global.__composer;for(const[r,o]of e.__instances){const a=e.mode==="composition"?o:o.__composer;t!==a&&n.rootNodes.push({id:a.id.toString(),label:`${HC(r)} Scope`})}}function TM(n,e){let t=null;if(n!=="global"){for(const[r,o]of e.__instances.entries())if(o.id.toString()===n){t=r;break}}return t}function $C(n,e){if(n==="global")return e.mode==="composition"?e.global:e.global.__composer;{const t=Array.from(e.__instances.values()).find(r=>r.id.toString()===n);return t?e.mode==="composition"?t:t.__composer:null}}function bM(n,e){const t=$C(n.nodeId,e);return t&&(n.state=SM(t)),null}function SM(n){const e={},t="Locale related info",r=[{type:t,key:"locale",editable:!0,value:n.locale.value},{type:t,key:"fallbackLocale",editable:!0,value:n.fallbackLocale.value},{type:t,key:"availableLocales",editable:!1,value:n.availableLocales},{type:t,key:"inheritLocale",editable:!0,value:n.inheritLocale}];e[t]=r;const o="Locale messages info",a=[{type:o,key:"messages",editable:!1,value:Pf(n.messages.value)}];e[o]=a;{const l="Datetime formats info",d=[{type:l,key:"datetimeFormats",editable:!1,value:n.datetimeFormats.value}];e[l]=d;const h="Datetime formats info",f=[{type:h,key:"numberFormats",editable:!1,value:n.numberFormats.value}];e[h]=f}return e}function Os(n,e){if(Dh){let t;e&&"groupId"in e&&(t=e.groupId,delete e.groupId),Dh.addTimelineEvent({layerId:"vue-i18n-timeline",event:{title:n,groupId:t,time:Date.now(),meta:{},data:e||{},logType:n==="compile-error"?"error":n==="fallback"||n==="missing"?"warning":"default"}})}}function IM(n,e){const t=$C(n.nodeId,e);if(t){const[r]=n.path;r==="locale"&&ne(n.state.value)?t.locale.value=n.state.value:r==="fallbackLocale"&&(ne(n.state.value)||vt(n.state.value)||Le(n.state.value))?t.fallbackLocale.value=n.state.value:r==="inheritLocale"&&Ue(n.state.value)&&(t.inheritLocale=n.state.value)}}function AM(n){const e=ne(n.locale)?n.locale:ks,t=ne(n.fallbackLocale)||vt(n.fallbackLocale)||ke(n.fallbackLocale)||n.fallbackLocale===!1?n.fallbackLocale:e,r=Xe(n.missing)?n.missing:void 0,o=Ue(n.silentTranslationWarn)||wa(n.silentTranslationWarn)?!n.silentTranslationWarn:!0,a=Ue(n.silentFallbackWarn)||wa(n.silentFallbackWarn)?!n.silentFallbackWarn:!0,l=Ue(n.fallbackRoot)?n.fallbackRoot:!0,d=!!n.formatFallbackMessages,h=ke(n.modifiers)?n.modifiers:{},f=n.pluralizationRules,g=Xe(n.postTranslation)?n.postTranslation:void 0,_=ne(n.warnHtmlInMessage)?n.warnHtmlInMessage!=="off":!0,p=!!n.escapeParameterHtml,w=Ue(n.sync)?n.sync:!0;let C=n.messages;if(ke(n.sharedMessages)){const K=n.sharedMessages;C=Object.keys(K).reduce((M,ce)=>{const ae=M[ce]||(M[ce]={});return Ot(ae,K[ce]),M},C||{})}const{__i18n:T,__root:k,__injectWithOption:S}=n,N=n.datetimeFormats,D=n.numberFormats,L=n.flatJson;return{locale:e,fallbackLocale:t,messages:C,flatJson:L,datetimeFormats:N,numberFormats:D,missing:r,missingWarn:o,fallbackWarn:a,fallbackRoot:l,fallbackFormat:d,modifiers:h,pluralRules:f,postTranslation:g,warnHtmlMessage:_,escapeParameter:p,messageResolver:n.messageResolver,inheritLocale:w,__i18n:T,__root:k,__injectWithOption:S}}function Lh(n={}){const e=Of(AM(n)),{__extender:t}=n,r={id:e.id,get locale(){return e.locale.value},set locale(o){e.locale.value=o},get fallbackLocale(){return e.fallbackLocale.value},set fallbackLocale(o){e.fallbackLocale.value=o},get messages(){return e.messages.value},get datetimeFormats(){return e.datetimeFormats.value},get numberFormats(){return e.numberFormats.value},get availableLocales(){return e.availableLocales},get missing(){return e.getMissingHandler()},set missing(o){e.setMissingHandler(o)},get silentTranslationWarn(){return Ue(e.missingWarn)?!e.missingWarn:e.missingWarn},set silentTranslationWarn(o){e.missingWarn=Ue(o)?!o:o},get silentFallbackWarn(){return Ue(e.fallbackWarn)?!e.fallbackWarn:e.fallbackWarn},set silentFallbackWarn(o){e.fallbackWarn=Ue(o)?!o:o},get modifiers(){return e.modifiers},get formatFallbackMessages(){return e.fallbackFormat},set formatFallbackMessages(o){e.fallbackFormat=o},get postTranslation(){return e.getPostTranslationHandler()},set postTranslation(o){e.setPostTranslationHandler(o)},get sync(){return e.inheritLocale},set sync(o){e.inheritLocale=o},get warnHtmlInMessage(){return e.warnHtmlMessage?"warn":"off"},set warnHtmlInMessage(o){e.warnHtmlMessage=o!=="off"},get escapeParameterHtml(){return e.escapeParameter},set escapeParameterHtml(o){e.escapeParameter=o},get pluralizationRules(){return e.pluralRules||{}},__composer:e,t(...o){return Reflect.apply(e.t,e,[...o])},rt(...o){return Reflect.apply(e.rt,e,[...o])},te(o,a){return e.te(o,a)},tm(o){return e.tm(o)},getLocaleMessage(o){return e.getLocaleMessage(o)},setLocaleMessage(o,a){e.setLocaleMessage(o,a)},mergeLocaleMessage(o,a){e.mergeLocaleMessage(o,a)},d(...o){return Reflect.apply(e.d,e,[...o])},getDateTimeFormat(o){return e.getDateTimeFormat(o)},setDateTimeFormat(o,a){e.setDateTimeFormat(o,a)},mergeDateTimeFormat(o,a){e.mergeDateTimeFormat(o,a)},n(...o){return Reflect.apply(e.n,e,[...o])},getNumberFormat(o){return e.getNumberFormat(o)},setNumberFormat(o,a){e.setNumberFormat(o,a)},mergeNumberFormat(o,a){e.mergeNumberFormat(o,a)}};return r.__extender=t,process.env.NODE_ENV!=="production"&&(r.__enableEmitter=o=>{const a=e;a[wi]&&a[wi](o)},r.__disableEmitter=()=>{const o=e;o[Ns]&&o[Ns]()}),r}function kM(n,e,t){return{beforeCreate(){const r=c.getCurrentInstance();if(!r)throw Cn(rt.UNEXPECTED_ERROR);const o=this.$options;if(o.i18n){const a=o.i18n;if(o.__i18n&&(a.__i18n=o.__i18n),a.__root=e,this===this.$root)this.$i18n=J_(n,a);else{a.__injectWithOption=!0,a.__extender=t.__vueI18nExtend,this.$i18n=Lh(a);const l=this.$i18n;l.__extender&&(l.__disposer=l.__extender(this.$i18n))}}else if(o.__i18n)if(this===this.$root)this.$i18n=J_(n,o);else{this.$i18n=Lh({__i18n:o.__i18n,__injectWithOption:!0,__extender:t.__vueI18nExtend,__root:e});const a=this.$i18n;a.__extender&&(a.__disposer=a.__extender(this.$i18n))}else this.$i18n=n;o.__i18nGlobal&&VC(e,o,o),this.$t=(...a)=>this.$i18n.t(...a),this.$rt=(...a)=>this.$i18n.rt(...a),this.$te=(a,l)=>this.$i18n.te(a,l),this.$d=(...a)=>this.$i18n.d(...a),this.$n=(...a)=>this.$i18n.n(...a),this.$tm=a=>this.$i18n.tm(a),t.__setInstance(r,this.$i18n)},mounted(){if(process.env.NODE_ENV!=="production"&&this.$el&&this.$i18n){const r=this.$i18n;this.$el.__VUE_I18N__=r.__composer;const o=this.__v_emitter=Sf();r.__enableEmitter&&r.__enableEmitter(o),o.on("*",Os)}},unmounted(){const r=c.getCurrentInstance();if(!r)throw Cn(rt.UNEXPECTED_ERROR);const o=this.$i18n;process.env.NODE_ENV!=="production"&&this.$el&&this.$el.__VUE_I18N__&&(this.__v_emitter&&(this.__v_emitter.off("*",Os),delete this.__v_emitter),this.$i18n&&(o.__disableEmitter&&o.__disableEmitter(),delete this.$el.__VUE_I18N__)),delete this.$t,delete this.$rt,delete this.$te,delete this.$d,delete this.$n,delete this.$tm,o.__disposer&&(o.__disposer(),delete o.__disposer,delete o.__extender),t.__deleteInstance(r),delete this.$i18n}}}function J_(n,e){n.locale=e.locale||n.locale,n.fallbackLocale=e.fallbackLocale||n.fallbackLocale,n.missing=e.missing||n.missing,n.silentTranslationWarn=e.silentTranslationWarn||n.silentFallbackWarn,n.silentFallbackWarn=e.silentFallbackWarn||n.silentFallbackWarn,n.formatFallbackMessages=e.formatFallbackMessages||n.formatFallbackMessages,n.postTranslation=e.postTranslation||n.postTranslation,n.warnHtmlInMessage=e.warnHtmlInMessage||n.warnHtmlInMessage,n.escapeParameterHtml=e.escapeParameterHtml||n.escapeParameterHtml,n.sync=e.sync||n.sync,n.__composer[xC](e.pluralizationRules||n.pluralizationRules);const t=Rf(n.locale,{messages:e.messages,__i18n:e.__i18n});return Object.keys(t).forEach(r=>n.mergeLocaleMessage(r,t[r])),e.datetimeFormats&&Object.keys(e.datetimeFormats).forEach(r=>n.mergeDateTimeFormat(r,e.datetimeFormats[r])),e.numberFormats&&Object.keys(e.numberFormats).forEach(r=>n.mergeNumberFormat(r,e.numberFormats[r])),n}const Mf={tag:{type:[String,Object]},locale:{type:String},scope:{type:String,validator:n=>n==="parent"||n==="global",default:"parent"},i18n:{type:Object}};function NM({slots:n},e){return e.length===1&&e[0]==="default"?(n.default?n.default():[]).reduce((r,o)=>[...r,...o.type===c.Fragment?o.children:[o]],[]):e.reduce((t,r)=>{const o=n[r];return o&&(t[r]=o()),t},Ye())}function KC(){return c.Fragment}const RM=c.defineComponent({name:"i18n-t",props:Ot({keypath:{type:String,required:!0},plural:{type:[Number,String],validator:n=>Tt(n)||!isNaN(n)}},Mf),setup(n,e){const{slots:t,attrs:r}=e,o=n.i18n||Fn({useScope:n.scope,__useComponent:!0});return()=>{const a=Object.keys(t).filter(_=>_!=="_"),l=Ye();n.locale&&(l.locale=n.locale),n.plural!==void 0&&(l.plural=ne(n.plural)?+n.plural:n.plural);const d=NM(e,a),h=o[Rh](n.keypath,d,l),f=Ot(Ye(),r),g=ne(n.tag)||Le(n.tag)?n.tag:KC();return c.h(g,f,h)}}}),Q_=RM;function OM(n){return vt(n)&&!ne(n[0])}function WC(n,e,t,r){const{slots:o,attrs:a}=e;return()=>{const l={part:!0};let d=Ye();n.locale&&(l.locale=n.locale),ne(n.format)?l.key=n.format:Le(n.format)&&(ne(n.format.key)&&(l.key=n.format.key),d=Object.keys(n.format).reduce((p,w)=>t.includes(w)?Ot(Ye(),p,{[w]:n.format[w]}):p,Ye()));const h=r(n.value,l,d);let f=[l.key];vt(h)?f=h.map((p,w)=>{const C=o[p.type],T=C?C({[p.type]:p.value,index:w,parts:h}):[p.value];return OM(T)&&(T[0].key=`${p.type}-${w}`),T}):ne(h)&&(f=[h]);const g=Ot(Ye(),a),_=ne(n.tag)||Le(n.tag)?n.tag:KC();return c.h(_,g,f)}}const PM=c.defineComponent({name:"i18n-n",props:Ot({value:{type:Number,required:!0},format:{type:[String,Object]}},Mf),setup(n,e){const t=n.i18n||Fn({useScope:n.scope,__useComponent:!0});return WC(n,e,MC,(...r)=>t[Ph](...r))}}),X_=PM;function MM(n,e){const t=n;if(n.mode==="composition")return t.__getInstance(e)||n.global;{const r=t.__getInstance(e);return r!=null?r.__composer:n.global.__composer}}function DM(n){const e=l=>{process.env.NODE_ENV!=="production"&&bf(Fs(xr.DEPRECATE_TRANSLATE_CUSTOME_DIRECTIVE));const{instance:d,value:h}=l;if(!d||!d.$)throw Cn(rt.UNEXPECTED_ERROR);const f=MM(n,d.$),g=Z_(h);return[Reflect.apply(f.t,f,[...ev(g)]),f]};return{created:(l,d)=>{const[h,f]=e(d);wr&&n.global===f&&(l.__i18nWatcher=c.watch(f.locale,()=>{d.instance&&d.instance.$forceUpdate()})),l.__composer=f,l.textContent=h},unmounted:l=>{wr&&l.__i18nWatcher&&(l.__i18nWatcher(),l.__i18nWatcher=void 0,delete l.__i18nWatcher),l.__composer&&(l.__composer=void 0,delete l.__composer)},beforeUpdate:(l,{value:d})=>{if(l.__composer){const h=l.__composer,f=Z_(d);l.textContent=Reflect.apply(h.t,h,[...ev(f)])}},getSSRProps:l=>{const[d]=e(l);return{textContent:d}}}}function Z_(n){if(ne(n))return{path:n};if(ke(n)){if(!("path"in n))throw Cn(rt.REQUIRED_VALUE,"path");return n}else throw Cn(rt.INVALID_VALUE)}function ev(n){const{path:e,locale:t,args:r,choice:o,plural:a}=n,l={},d=r||{};return ne(t)&&(l.locale=t),Tt(o)&&(l.plural=o),Tt(a)&&(l.plural=a),[e,d,l]}function LM(n,e,...t){const r=ke(t[0])?t[0]:{};(Ue(r.globalInstall)?r.globalInstall:!0)&&([Q_.name,"I18nT"].forEach(a=>n.component(a,Q_)),[X_.name,"I18nN"].forEach(a=>n.component(a,X_)),[nv.name,"I18nD"].forEach(a=>n.component(a,nv))),n.directive("t",DM(e))}const xM=Gr("global-vue-i18n");function UM(n={}){const e=__VUE_I18N_LEGACY_API__&&Ue(n.legacy)?n.legacy:__VUE_I18N_LEGACY_API__;process.env.NODE_ENV!=="production"&&e&&bf(Fs(xr.DEPRECATE_LEGACY_MODE));const t=Ue(n.globalInjection)?n.globalInjection:!0,r=new Map,[o,a]=BM(n,e),l=Gr(process.env.NODE_ENV!=="production"?"vue-i18n":"");function d(_){return r.get(_)||null}function h(_,p){r.set(_,p)}function f(_){r.delete(_)}const g={get mode(){return __VUE_I18N_LEGACY_API__&&e?"legacy":"composition"},async install(_,...p){if(process.env.NODE_ENV!=="production"&&(_.__VUE_I18N__=g),_.__VUE_I18N_SYMBOL__=l,_.provide(_.__VUE_I18N_SYMBOL__,g),ke(p[0])){const T=p[0];g.__composerExtend=T.__composerExtend,g.__vueI18nExtend=T.__vueI18nExtend}let w=null;!e&&t&&(w=GM(_,g.global)),__VUE_I18N_FULL_INSTALL__&&LM(_,g,...p),__VUE_I18N_LEGACY_API__&&e&&_.mixin(kM(a,a.__composer,g));const C=_.unmount;if(_.unmount=()=>{w&&w(),g.dispose(),C()},process.env.NODE_ENV!=="production"){if(!await pM(_,g))throw Cn(rt.CANNOT_SETUP_VUE_DEVTOOLS_PLUGIN);const k=Sf();if(e){const S=a;S.__enableEmitter&&S.__enableEmitter(k)}else{const S=a;S[wi]&&S[wi](k)}k.on("*",Os)}},get global(){return a},dispose(){o.stop()},__instances:r,__getInstance:d,__setInstance:h,__deleteInstance:f};return g}function Fn(n={}){const e=c.getCurrentInstance();if(e==null)throw Cn(rt.MUST_BE_CALL_SETUP_TOP);if(!e.isCE&&e.appContext.app!=null&&!e.appContext.app.__VUE_I18N_SYMBOL__)throw Cn(rt.NOT_INSTALLED);const t=VM(e),r=HM(t),o=BC(e),a=FM(n,o);if(a==="global")return VC(r,n,o),r;if(a==="parent"){let h=$M(t,e,n.__useComponent);return h==null&&(process.env.NODE_ENV!=="production"&&Go(Fs(xr.NOT_FOUND_PARENT_SCOPE)),h=r),h}const l=t;let d=l.__getInstance(e);if(d==null){const h=Ot({},n);"__i18n"in o&&(h.__i18n=o.__i18n),r&&(h.__root=r),d=Of(h),l.__composerExtend&&(d[Mh]=l.__composerExtend(d)),WM(l,e,d),l.__setInstance(e,d)}return d}function BM(n,e){const t=c.effectScope(),r=__VUE_I18N_LEGACY_API__&&e?t.run(()=>Lh(n)):t.run(()=>Of(n));if(r==null)throw Cn(rt.UNEXPECTED_ERROR);return[t,r]}function VM(n){const e=c.inject(n.isCE?xM:n.appContext.app.__VUE_I18N_SYMBOL__);if(!e)throw Cn(n.isCE?rt.NOT_INSTALLED_WITH_PROVIDE:rt.UNEXPECTED_ERROR);return e}function FM(n,e){return Gl(n)?"__i18n"in e?"local":"global":n.useScope?n.useScope:"local"}function HM(n){return n.mode==="composition"?n.global:n.global.__composer}function $M(n,e,t=!1){let r=null;const o=e.root;let a=KM(e,t);for(;a!=null;){const l=n;if(n.mode==="composition")r=l.__getInstance(a);else if(__VUE_I18N_LEGACY_API__){const d=l.__getInstance(a);d!=null&&(r=d.__composer,t&&r&&!r[UC]&&(r=null))}if(r!=null||o===a)break;a=a.parent}return r}function KM(n,e=!1){return n==null?null:e&&n.vnode.ctx||n.parent}function WM(n,e,t){let r=null;c.onMounted(()=>{if(process.env.NODE_ENV!=="production"&&e.vnode.el){e.vnode.el.__VUE_I18N__=t,r=Sf();const o=t;o[wi]&&o[wi](r),r.on("*",Os)}},e),c.onUnmounted(()=>{const o=t;process.env.NODE_ENV!=="production"&&e.vnode.el&&e.vnode.el.__VUE_I18N__&&(r&&r.off("*",Os),o[Ns]&&o[Ns](),delete e.vnode.el.__VUE_I18N__),n.__deleteInstance(e);const a=o[Mh];a&&(a(),delete o[Mh])},e)}const zM=["locale","fallbackLocale","availableLocales"],tv=["t","rt","d","n","tm","te"];function GM(n,e){const t=Object.create(null);return zM.forEach(o=>{const a=Object.getOwnPropertyDescriptor(e,o);if(!a)throw Cn(rt.UNEXPECTED_ERROR);const l=c.isRef(a.value)?{get(){return a.value.value},set(d){a.value.value=d}}:{get(){return a.get&&a.get()}};Object.defineProperty(t,o,l)}),n.config.globalProperties.$i18n=t,tv.forEach(o=>{const a=Object.getOwnPropertyDescriptor(e,o);if(!a||!a.value)throw Cn(rt.UNEXPECTED_ERROR);Object.defineProperty(n.config.globalProperties,`$${o}`,a)}),()=>{delete n.config.globalProperties.$i18n,tv.forEach(o=>{delete n.config.globalProperties[`$${o}`]})}}const qM=c.defineComponent({name:"i18n-d",props:Ot({value:{type:[Number,Date],required:!0},format:{type:[String,Object]}},Mf),setup(n,e){const t=n.i18n||Fn({useScope:n.scope,__useComponent:!0});return WC(n,e,PC,(...r)=>t[Oh](...r))}}),nv=qM;lM();H1(y1);$1(x1);K1(TC);if(process.env.NODE_ENV!=="production"||__INTLIFY_PROD_DEVTOOLS__){const n=gi();n.__INTLIFY__=!0,C1(n.__INTLIFY_DEVTOOLS_GLOBAL_HOOK__)}process.env.NODE_ENV;const Df=c.defineComponent({__name:"DeleteAllBtn",emits:["removeAll"],setup(n,{emit:e}){const{openDialog:t}=Us("delete-all-__J"),{t:r}=Fn(),o=e;return(a,l)=>(c.openBlock(),c.createElementBlock(c.Fragment,null,[c.createVNode(Vs,{"dd-id":"delete-all-__J",variant:"confirm",title:c.unref(r)("dialogs.deleteAll.title"),text:c.unref(r)("dialogs.deleteAll.text"),onOnSave:l[0]||(l[0]=()=>o("removeAll"))},null,8,["title","text"]),c.createVNode(Ge.VBtn,{onClick:c.unref(t),variant:"plain",color:"secondary","prepend-icon":"mdi-delete"},{default:c.withCtx(()=>[c.createTextVNode(c.toDisplayString(c.unref(r)("actions.deleteAll")),1)]),_:1},8,["onClick"])],64))}}),zC=c.defineComponent({__name:"EditButton",emits:["editAll"],setup(n,{emit:e}){const t=e;return(r,o)=>(c.openBlock(),c.createBlock(Ge.VBtn,{onClick:o[0]||(o[0]=a=>t("editAll")),variant:"plain",color:"secondary","prepend-icon":"mdi-pencil"},{default:c.withCtx(()=>o[1]||(o[1]=[c.createTextVNode(" Edit")])),_:1}))}}),GC=c.defineComponent({__name:"DotsMenu",props:{variant:{default:"text"},color:{},orientation:{},size:{}},setup(n){return(e,t)=>(c.openBlock(),c.createBlock(c.unref(uo.VMenu),{"close-on-content-click":!0},{activator:c.withCtx(({props:r})=>[c.createVNode(c.unref(uo.VBtn),c.mergeProps({variant:e.variant},r,{icon:""}),{default:c.withCtx(()=>[e.orientation==="y"?(c.openBlock(),c.createBlock(c.unref(uP),{key:0,size:e.size,color:`rgb(var(--v-theme-${e.color}))`,class:"cursor-pointer"},null,8,["size","color"])):(c.openBlock(),c.createBlock(c.unref(dP),{key:1,size:e.size,color:`rgb(var(--v-theme-${e.color}))`,class:"cursor-pointer"},null,8,["size","color"]))]),_:2},1040,["variant"])]),default:c.withCtx(()=>[c.renderSlot(e.$slots,"default")]),_:3}))}}),Yl=c.defineComponent({__name:"ParentCard",props:{title:{},height:{default:"100%"},loading:{type:Boolean}},setup(n){const e=n;return(t,r)=>(c.openBlock(),c.createBlock(xt.VCard,{"min-height":t.height,height:t.height,loading:t.loading,class:"bg-surface rounded-sm pa-5"},{default:c.withCtx(()=>[e.title?(c.openBlock(),c.createBlock(xt.VCardTitle,{key:0,class:"pa-0"},{default:c.withCtx(()=>[c.createTextVNode(c.toDisplayString(e.title),1)]),_:1})):c.createCommentVNode("",!0),c.renderSlot(t.$slots,"default")]),_:3},8,["min-height","height","loading"]))}}),qC=c.defineComponent({__name:"ConfirmDialog",props:{title:{},text:{},width:{},loading:{type:Boolean}},emits:["onSave","onCancel"],setup(n,{emit:e}){const t=n,r=c.ref(!1),o=c.ref(!1);c.onUnmounted(()=>{r.value=!1});const a=e;async function l(){try{await a("onCancel")}catch(h){console.error(h)}r.value=!1}async function d(){o.value=!0;try{await a("onSave")}catch(h){console.error(h)}o.value=!1,r.value=!1}return(h,f)=>(c.openBlock(),c.createBlock(rl.VDialog,{scrim:"rgb(0,0,0,100)",width:t.width},{activator:c.withCtx(({isActive:g,props:_})=>[c.renderSlot(h.$slots,"button",c.normalizeProps(c.guardReactiveProps({isActive:g,props:_})))]),default:c.withCtx(({isActive:g})=>[c.createVNode(xt.VCard,{loading:o.value,title:t.title,rounded:"","min-height":"300"},{prepend:c.withCtx(()=>[c.createVNode(c.unref(hC),{color:"rgb(var(--v-theme-secondary))"})]),append:c.withCtx(()=>[c.createVNode(Ge.VBtn,{class:"ms-auto",icon:"mdi-window-close",onClick:l,variant:"plain"})]),default:c.withCtx(()=>[c.createVNode(xt.VCardText,{class:"text-center mt-7"},{default:c.withCtx(()=>[c.createTextVNode(c.toDisplayString(t.text),1)]),_:1}),c.createVNode(xt.VCardActions,{class:"d-flex"},{default:c.withCtx(()=>[c.createVNode(Ge.VBtn,{class:"flex-grow-1",variant:"outlined",color:"secondary",onClick:l},{default:c.withCtx(()=>[c.createTextVNode(c.toDisplayString(h.$t("actions.cancel")),1)]),_:1}),c.createVNode(Ge.VBtn,{class:"flex-grow-1",variant:"flat",color:"secondary",onClick:d},{default:c.withCtx(()=>[c.createTextVNode(c.toDisplayString(h.$t("actions.confirm")),1)]),_:1})]),_:1})]),_:1},8,["loading","title"])]),_:3},8,["width"]))}}),Kd="https://app-files.jplan.com.br/pub/resources/profile-placeholder.svg",jC=c.defineComponent({__name:"JAvatar",props:{src:{}},setup(n){const e=n,t=c.ref(e.src),r=c.computed(()=>t.value||Kd);function o(){t.value=Kd}return(a,l)=>(c.openBlock(),c.createBlock(Ry.VAvatar,{size:"50"},{default:c.withCtx(()=>[c.createVNode(pf.VImg,{src:r.value,"lazy-src":Kd,onError:o,width:"50",alt:"profile-placeholder"},null,8,["src"])]),_:1}))}}),Wd="https://app-files.jplan.com.br/pub/resources/profile-placeholder.svg",YC=c.defineComponent({__name:"AvatarPicture",props:{img:{},size:{}},setup(n){const e=n,t=c.ref(e.img),r=c.computed(()=>t.value||Wd);function o(){t.value=Wd}return(a,l)=>(c.openBlock(),c.createBlock(Ry.VAvatar,{size:a.size},{default:c.withCtx(()=>[c.createVNode(pf.VImg,{src:r.value,"lazy-src":Wd,onError:o,width:"40",alt:"Avatar"},null,8,["src"])]),_:1},8,["size"]))}}),jM=c.defineComponent({__name:"ContextMenu",setup(n){const e=c.ref(!1),t=c.ref({x:0,y:0}),r=a=>{a.preventDefault(),t.value={x:a.clientX,y:a.clientY},e.value=!0},o=()=>{e.value=!1};return c.onMounted(()=>{document.addEventListener("click",o)}),c.onUnmounted(()=>{document.removeEventListener("click",o)}),(a,l)=>(c.openBlock(),c.createElementBlock("div",{onContextmenu:c.withModifiers(r,["right"]),class:"relative w-full h-full"},[c.renderSlot(a.$slots,"default",{},void 0,!0),c.createVNode(_f.VMenu,{modelValue:e.value,"onUpdate:modelValue":l[0]||(l[0]=d=>e.value=d),style:c.normalizeStyle({top:`${t.value.y}px`,left:`${t.value.x}px`,position:"absolute"})},{default:c.withCtx(()=>[c.createVNode(Qt.VList,{onClick:o},{default:c.withCtx(()=>[c.renderSlot(a.$slots,"actions",{},void 0,!0)]),_:3})]),_:3},8,["modelValue","style"])],32))}}),Yo=(n,e)=>{const t=n.__vccOpts||n;for(const[r,o]of e)t[r]=o;return t},JC=Yo(jM,[["__scopeId","data-v-ad4e4a5d"]]),YM={class:"d-inline-flex"},QC=c.defineComponent({__name:"UiTable",props:c.mergeModels({headers:{},items:{default:()=>[]},actions:{},loading:{type:Boolean},columns:{default:()=>[]},sortBy:{}},{selection:{},selectionModifiers:{}}),emits:["update:selection"],setup(n){const e=n,t=c.computed(()=>{var o;if(e.headers)return e.headers;if(e.columns)return(o=e.columns)==null?void 0:o.filter(a=>a.checked)}),r=c.useModel(n,"selection");return(o,a)=>(c.openBlock(),c.createBlock(Oy.VDataTable,{modelValue:r.value,"onUpdate:modelValue":a[0]||(a[0]=l=>r.value=l),"fixed-header":"","fixed-footer":"","items-per-page":"10",headers:t.value,items:o.items,"items-length":o.items.length,loading:o.loading||!1,"item-value":"_id","return-object":"","show-select":"","sort-by":o.sortBy,height:"calc(100vh - 320px)",class:"customize-table"},{top:c.withCtx(()=>a[1]||(a[1]=[c.createElementVNode("span",{class:"mt-5"},null,-1)])),"item.avatar":c.withCtx(({item:l})=>[c.renderSlot(o.$slots,"avatar",{item:l})]),"item.active":c.withCtx(({item:l})=>[c.renderSlot(o.$slots,"active",{item:l})]),"item.image":c.withCtx(({item:l})=>[c.renderSlot(o.$slots,"image",{item:l})]),"item.picture":c.withCtx(({item:l})=>[c.renderSlot(o.$slots,"picture",{item:l})]),"item.icon":c.withCtx(({item:l})=>[c.renderSlot(o.$slots,"icon",{item:l})]),"item.actions":c.withCtx(({item:l})=>[c.createElementVNode("div",YM,[c.renderSlot(o.$slots,"actions",{item:l})])]),"no-data":c.withCtx(()=>[!o.loading&&o.items.length===0?(c.openBlock(),c.createElementBlock(c.Fragment,{key:0},[c.createTextVNode(" This table is empty.")],64)):c.createCommentVNode("",!0)]),_:3},8,["modelValue","headers","items","items-length","loading","sort-by"]))}}),XC=6048e5,JM=864e5,rv=Symbol.for("constructDateFrom");function Ko(n,e){return typeof n=="function"?n(e):n&&typeof n=="object"&&rv in n?n[rv](e):n instanceof Date?new n.constructor(e):new Date(e)}function br(n,e){return Ko(e||n,n)}let QM={};function Jl(){return QM}function Ps(n,e){var d,h,f,g;const t=Jl(),r=(e==null?void 0:e.weekStartsOn)??((h=(d=e==null?void 0:e.locale)==null?void 0:d.options)==null?void 0:h.weekStartsOn)??t.weekStartsOn??((g=(f=t.locale)==null?void 0:f.options)==null?void 0:g.weekStartsOn)??0,o=br(n,e==null?void 0:e.in),a=o.getDay(),l=(a<r?7:0)+a-r;return o.setDate(o.getDate()-l),o.setHours(0,0,0,0),o}function wl(n,e){return Ps(n,{...e,weekStartsOn:1})}function ZC(n,e){const t=br(n,e==null?void 0:e.in),r=t.getFullYear(),o=Ko(t,0);o.setFullYear(r+1,0,4),o.setHours(0,0,0,0);const a=wl(o),l=Ko(t,0);l.setFullYear(r,0,4),l.setHours(0,0,0,0);const d=wl(l);return t.getTime()>=a.getTime()?r+1:t.getTime()>=d.getTime()?r:r-1}function ov(n){const e=br(n),t=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return t.setUTCFullYear(e.getFullYear()),+n-+t}function XM(n,...e){const t=Ko.bind(null,e.find(r=>typeof r=="object"));return e.map(t)}function iv(n,e){const t=br(n,e==null?void 0:e.in);return t.setHours(0,0,0,0),t}function ZM(n,e,t){const[r,o]=XM(t==null?void 0:t.in,n,e),a=iv(r),l=iv(o),d=+a-ov(a),h=+l-ov(l);return Math.round((d-h)/JM)}function eD(n,e){const t=ZC(n,e),r=Ko(n,0);return r.setFullYear(t,0,4),r.setHours(0,0,0,0),wl(r)}function tD(n){return n instanceof Date||typeof n=="object"&&Object.prototype.toString.call(n)==="[object Date]"}function nD(n){return!(!tD(n)&&typeof n!="number"||isNaN(+br(n)))}function rD(n,e){const t=br(n,e==null?void 0:e.in);return t.setFullYear(t.getFullYear(),0,1),t.setHours(0,0,0,0),t}const oD={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"}},iD=(n,e,t)=>{let r;const o=oD[n];return typeof o=="string"?r=o:e===1?r=o.one:r=o.other.replace("{{count}}",e.toString()),t!=null&&t.addSuffix?t.comparison&&t.comparison>0?"in "+r:r+" ago":r};function ar(n){return(e={})=>{const t=e.width?String(e.width):n.defaultWidth;return n.formats[t]||n.formats[n.defaultWidth]}}const aD={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},sD={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},cD={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},lD={date:ar({formats:aD,defaultWidth:"full"}),time:ar({formats:sD,defaultWidth:"full"}),dateTime:ar({formats:cD,defaultWidth:"full"})},uD={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},dD=(n,e,t,r)=>uD[n];function bt(n){return(e,t)=>{const r=t!=null&&t.context?String(t.context):"standalone";let o;if(r==="formatting"&&n.formattingValues){const l=n.defaultFormattingWidth||n.defaultWidth,d=t!=null&&t.width?String(t.width):l;o=n.formattingValues[d]||n.formattingValues[l]}else{const l=n.defaultWidth,d=t!=null&&t.width?String(t.width):n.defaultWidth;o=n.values[d]||n.values[l]}const a=n.argumentCallback?n.argumentCallback(e):e;return o[a]}}const hD={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},fD={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},mD={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"]},gD={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"]},pD={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"}},_D={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"}},vD=(n,e)=>{const t=Number(n),r=t%100;if(r>20||r<10)switch(r%10){case 1:return t+"st";case 2:return t+"nd";case 3:return t+"rd"}return t+"th"},yD={ordinalNumber:vD,era:bt({values:hD,defaultWidth:"wide"}),quarter:bt({values:fD,defaultWidth:"wide",argumentCallback:n=>n-1}),month:bt({values:mD,defaultWidth:"wide"}),day:bt({values:gD,defaultWidth:"wide"}),dayPeriod:bt({values:pD,defaultWidth:"wide",formattingValues:_D,defaultFormattingWidth:"wide"})};function St(n){return(e,t={})=>{const r=t.width,o=r&&n.matchPatterns[r]||n.matchPatterns[n.defaultMatchWidth],a=e.match(o);if(!a)return null;const l=a[0],d=r&&n.parsePatterns[r]||n.parsePatterns[n.defaultParseWidth],h=Array.isArray(d)?ED(d,_=>_.test(l)):CD(d,_=>_.test(l));let f;f=n.valueCallback?n.valueCallback(h):h,f=t.valueCallback?t.valueCallback(f):f;const g=e.slice(l.length);return{value:f,rest:g}}}function CD(n,e){for(const t in n)if(Object.prototype.hasOwnProperty.call(n,t)&&e(n[t]))return t}function ED(n,e){for(let t=0;t<n.length;t++)if(e(n[t]))return t}function Ql(n){return(e,t={})=>{const r=e.match(n.matchPattern);if(!r)return null;const o=r[0],a=e.match(n.parsePattern);if(!a)return null;let l=n.valueCallback?n.valueCallback(a[0]):a[0];l=t.valueCallback?t.valueCallback(l):l;const d=e.slice(o.length);return{value:l,rest:d}}}const wD=/^(\d+)(th|st|nd|rd)?/i,TD=/\d+/i,bD={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},SD={any:[/^b/i,/^(a|c)/i]},ID={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},AD={any:[/1/i,/2/i,/3/i,/4/i]},kD={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},ND={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]},RD={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},OD={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]},PD={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},MD={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}},DD={ordinalNumber:Ql({matchPattern:wD,parsePattern:TD,valueCallback:n=>parseInt(n,10)}),era:St({matchPatterns:bD,defaultMatchWidth:"wide",parsePatterns:SD,defaultParseWidth:"any"}),quarter:St({matchPatterns:ID,defaultMatchWidth:"wide",parsePatterns:AD,defaultParseWidth:"any",valueCallback:n=>n+1}),month:St({matchPatterns:kD,defaultMatchWidth:"wide",parsePatterns:ND,defaultParseWidth:"any"}),day:St({matchPatterns:RD,defaultMatchWidth:"wide",parsePatterns:OD,defaultParseWidth:"any"}),dayPeriod:St({matchPatterns:PD,defaultMatchWidth:"any",parsePatterns:MD,defaultParseWidth:"any"})},Lf={code:"en-US",formatDistance:iD,formatLong:lD,formatRelative:dD,localize:yD,match:DD,options:{weekStartsOn:0,firstWeekContainsDate:1}};function LD(n,e){const t=br(n,e==null?void 0:e.in);return ZM(t,rD(t))+1}function xD(n,e){const t=br(n,e==null?void 0:e.in),r=+wl(t)-+eD(t);return Math.round(r/XC)+1}function eE(n,e){var g,_,p,w;const t=br(n,e==null?void 0:e.in),r=t.getFullYear(),o=Jl(),a=(e==null?void 0:e.firstWeekContainsDate)??((_=(g=e==null?void 0:e.locale)==null?void 0:g.options)==null?void 0:_.firstWeekContainsDate)??o.firstWeekContainsDate??((w=(p=o.locale)==null?void 0:p.options)==null?void 0:w.firstWeekContainsDate)??1,l=Ko((e==null?void 0:e.in)||n,0);l.setFullYear(r+1,0,a),l.setHours(0,0,0,0);const d=Ps(l,e),h=Ko((e==null?void 0:e.in)||n,0);h.setFullYear(r,0,a),h.setHours(0,0,0,0);const f=Ps(h,e);return+t>=+d?r+1:+t>=+f?r:r-1}function UD(n,e){var d,h,f,g;const t=Jl(),r=(e==null?void 0:e.firstWeekContainsDate)??((h=(d=e==null?void 0:e.locale)==null?void 0:d.options)==null?void 0:h.firstWeekContainsDate)??t.firstWeekContainsDate??((g=(f=t.locale)==null?void 0:f.options)==null?void 0:g.firstWeekContainsDate)??1,o=eE(n,e),a=Ko((e==null?void 0:e.in)||n,0);return a.setFullYear(o,0,r),a.setHours(0,0,0,0),Ps(a,e)}function BD(n,e){const t=br(n,e==null?void 0:e.in),r=+Ps(t,e)-+UD(t,e);return Math.round(r/XC)+1}function We(n,e){const t=n<0?"-":"",r=Math.abs(n).toString().padStart(e,"0");return t+r}const Po={y(n,e){const t=n.getFullYear(),r=t>0?t:1-t;return We(e==="yy"?r%100:r,e.length)},M(n,e){const t=n.getMonth();return e==="M"?String(t+1):We(t+1,2)},d(n,e){return We(n.getDate(),e.length)},a(n,e){const t=n.getHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return t.toUpperCase();case"aaa":return t;case"aaaaa":return t[0];case"aaaa":default:return t==="am"?"a.m.":"p.m."}},h(n,e){return We(n.getHours()%12||12,e.length)},H(n,e){return We(n.getHours(),e.length)},m(n,e){return We(n.getMinutes(),e.length)},s(n,e){return We(n.getSeconds(),e.length)},S(n,e){const t=e.length,r=n.getMilliseconds(),o=Math.trunc(r*Math.pow(10,t-3));return We(o,e.length)}},ji={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},av={G:function(n,e,t){const r=n.getFullYear()>0?1:0;switch(e){case"G":case"GG":case"GGG":return t.era(r,{width:"abbreviated"});case"GGGGG":return t.era(r,{width:"narrow"});case"GGGG":default:return t.era(r,{width:"wide"})}},y:function(n,e,t){if(e==="yo"){const r=n.getFullYear(),o=r>0?r:1-r;return t.ordinalNumber(o,{unit:"year"})}return Po.y(n,e)},Y:function(n,e,t,r){const o=eE(n,r),a=o>0?o:1-o;if(e==="YY"){const l=a%100;return We(l,2)}return e==="Yo"?t.ordinalNumber(a,{unit:"year"}):We(a,e.length)},R:function(n,e){const t=ZC(n);return We(t,e.length)},u:function(n,e){const t=n.getFullYear();return We(t,e.length)},Q:function(n,e,t){const r=Math.ceil((n.getMonth()+1)/3);switch(e){case"Q":return String(r);case"QQ":return We(r,2);case"Qo":return t.ordinalNumber(r,{unit:"quarter"});case"QQQ":return t.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return t.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return t.quarter(r,{width:"wide",context:"formatting"})}},q:function(n,e,t){const r=Math.ceil((n.getMonth()+1)/3);switch(e){case"q":return String(r);case"qq":return We(r,2);case"qo":return t.ordinalNumber(r,{unit:"quarter"});case"qqq":return t.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return t.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return t.quarter(r,{width:"wide",context:"standalone"})}},M:function(n,e,t){const r=n.getMonth();switch(e){case"M":case"MM":return Po.M(n,e);case"Mo":return t.ordinalNumber(r+1,{unit:"month"});case"MMM":return t.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return t.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return t.month(r,{width:"wide",context:"formatting"})}},L:function(n,e,t){const r=n.getMonth();switch(e){case"L":return String(r+1);case"LL":return We(r+1,2);case"Lo":return t.ordinalNumber(r+1,{unit:"month"});case"LLL":return t.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return t.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return t.month(r,{width:"wide",context:"standalone"})}},w:function(n,e,t,r){const o=BD(n,r);return e==="wo"?t.ordinalNumber(o,{unit:"week"}):We(o,e.length)},I:function(n,e,t){const r=xD(n);return e==="Io"?t.ordinalNumber(r,{unit:"week"}):We(r,e.length)},d:function(n,e,t){return e==="do"?t.ordinalNumber(n.getDate(),{unit:"date"}):Po.d(n,e)},D:function(n,e,t){const r=LD(n);return e==="Do"?t.ordinalNumber(r,{unit:"dayOfYear"}):We(r,e.length)},E:function(n,e,t){const r=n.getDay();switch(e){case"E":case"EE":case"EEE":return t.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return t.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return t.day(r,{width:"short",context:"formatting"});case"EEEE":default:return t.day(r,{width:"wide",context:"formatting"})}},e:function(n,e,t,r){const o=n.getDay(),a=(o-r.weekStartsOn+8)%7||7;switch(e){case"e":return String(a);case"ee":return We(a,2);case"eo":return t.ordinalNumber(a,{unit:"day"});case"eee":return t.day(o,{width:"abbreviated",context:"formatting"});case"eeeee":return t.day(o,{width:"narrow",context:"formatting"});case"eeeeee":return t.day(o,{width:"short",context:"formatting"});case"eeee":default:return t.day(o,{width:"wide",context:"formatting"})}},c:function(n,e,t,r){const o=n.getDay(),a=(o-r.weekStartsOn+8)%7||7;switch(e){case"c":return String(a);case"cc":return We(a,e.length);case"co":return t.ordinalNumber(a,{unit:"day"});case"ccc":return t.day(o,{width:"abbreviated",context:"standalone"});case"ccccc":return t.day(o,{width:"narrow",context:"standalone"});case"cccccc":return t.day(o,{width:"short",context:"standalone"});case"cccc":default:return t.day(o,{width:"wide",context:"standalone"})}},i:function(n,e,t){const r=n.getDay(),o=r===0?7:r;switch(e){case"i":return String(o);case"ii":return We(o,e.length);case"io":return t.ordinalNumber(o,{unit:"day"});case"iii":return t.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return t.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return t.day(r,{width:"short",context:"formatting"});case"iiii":default:return t.day(r,{width:"wide",context:"formatting"})}},a:function(n,e,t){const o=n.getHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return t.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"aaa":return t.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return t.dayPeriod(o,{width:"narrow",context:"formatting"});case"aaaa":default:return t.dayPeriod(o,{width:"wide",context:"formatting"})}},b:function(n,e,t){const r=n.getHours();let o;switch(r===12?o=ji.noon:r===0?o=ji.midnight:o=r/12>=1?"pm":"am",e){case"b":case"bb":return t.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"bbb":return t.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return t.dayPeriod(o,{width:"narrow",context:"formatting"});case"bbbb":default:return t.dayPeriod(o,{width:"wide",context:"formatting"})}},B:function(n,e,t){const r=n.getHours();let o;switch(r>=17?o=ji.evening:r>=12?o=ji.afternoon:r>=4?o=ji.morning:o=ji.night,e){case"B":case"BB":case"BBB":return t.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"BBBBB":return t.dayPeriod(o,{width:"narrow",context:"formatting"});case"BBBB":default:return t.dayPeriod(o,{width:"wide",context:"formatting"})}},h:function(n,e,t){if(e==="ho"){let r=n.getHours()%12;return r===0&&(r=12),t.ordinalNumber(r,{unit:"hour"})}return Po.h(n,e)},H:function(n,e,t){return e==="Ho"?t.ordinalNumber(n.getHours(),{unit:"hour"}):Po.H(n,e)},K:function(n,e,t){const r=n.getHours()%12;return e==="Ko"?t.ordinalNumber(r,{unit:"hour"}):We(r,e.length)},k:function(n,e,t){let r=n.getHours();return r===0&&(r=24),e==="ko"?t.ordinalNumber(r,{unit:"hour"}):We(r,e.length)},m:function(n,e,t){return e==="mo"?t.ordinalNumber(n.getMinutes(),{unit:"minute"}):Po.m(n,e)},s:function(n,e,t){return e==="so"?t.ordinalNumber(n.getSeconds(),{unit:"second"}):Po.s(n,e)},S:function(n,e){return Po.S(n,e)},X:function(n,e,t){const r=n.getTimezoneOffset();if(r===0)return"Z";switch(e){case"X":return cv(r);case"XXXX":case"XX":return di(r);case"XXXXX":case"XXX":default:return di(r,":")}},x:function(n,e,t){const r=n.getTimezoneOffset();switch(e){case"x":return cv(r);case"xxxx":case"xx":return di(r);case"xxxxx":case"xxx":default:return di(r,":")}},O:function(n,e,t){const r=n.getTimezoneOffset();switch(e){case"O":case"OO":case"OOO":return"GMT"+sv(r,":");case"OOOO":default:return"GMT"+di(r,":")}},z:function(n,e,t){const r=n.getTimezoneOffset();switch(e){case"z":case"zz":case"zzz":return"GMT"+sv(r,":");case"zzzz":default:return"GMT"+di(r,":")}},t:function(n,e,t){const r=Math.trunc(+n/1e3);return We(r,e.length)},T:function(n,e,t){return We(+n,e.length)}};function sv(n,e=""){const t=n>0?"-":"+",r=Math.abs(n),o=Math.trunc(r/60),a=r%60;return a===0?t+String(o):t+String(o)+e+We(a,2)}function cv(n,e){return n%60===0?(n>0?"-":"+")+We(Math.abs(n)/60,2):di(n,e)}function di(n,e=""){const t=n>0?"-":"+",r=Math.abs(n),o=We(Math.trunc(r/60),2),a=We(r%60,2);return t+o+e+a}const lv=(n,e)=>{switch(n){case"P":return e.date({width:"short"});case"PP":return e.date({width:"medium"});case"PPP":return e.date({width:"long"});case"PPPP":default:return e.date({width:"full"})}},tE=(n,e)=>{switch(n){case"p":return e.time({width:"short"});case"pp":return e.time({width:"medium"});case"ppp":return e.time({width:"long"});case"pppp":default:return e.time({width:"full"})}},VD=(n,e)=>{const t=n.match(/(P+)(p+)?/)||[],r=t[1],o=t[2];if(!o)return lv(n,e);let a;switch(r){case"P":a=e.dateTime({width:"short"});break;case"PP":a=e.dateTime({width:"medium"});break;case"PPP":a=e.dateTime({width:"long"});break;case"PPPP":default:a=e.dateTime({width:"full"});break}return a.replace("{{date}}",lv(r,e)).replace("{{time}}",tE(o,e))},FD={p:tE,P:VD},HD=/^D+$/,$D=/^Y+$/,KD=["D","DD","YY","YYYY"];function WD(n){return HD.test(n)}function zD(n){return $D.test(n)}function GD(n,e,t){const r=qD(n,e,t);if(console.warn(r),KD.includes(n))throw new RangeError(r)}function qD(n,e,t){const r=n[0]==="Y"?"years":"days of the month";return`Use \`${n.toLowerCase()}\` instead of \`${n}\` (in \`${e}\`) for formatting ${r} to the input \`${t}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const jD=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,YD=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,JD=/^'([^]*?)'?$/,QD=/''/g,XD=/[a-zA-Z]/;function ZD(n,e,t){var g,_,p,w,C,T,k,S;const r=Jl(),o=(t==null?void 0:t.locale)??r.locale??Lf,a=(t==null?void 0:t.firstWeekContainsDate)??((_=(g=t==null?void 0:t.locale)==null?void 0:g.options)==null?void 0:_.firstWeekContainsDate)??r.firstWeekContainsDate??((w=(p=r.locale)==null?void 0:p.options)==null?void 0:w.firstWeekContainsDate)??1,l=(t==null?void 0:t.weekStartsOn)??((T=(C=t==null?void 0:t.locale)==null?void 0:C.options)==null?void 0:T.weekStartsOn)??r.weekStartsOn??((S=(k=r.locale)==null?void 0:k.options)==null?void 0:S.weekStartsOn)??0,d=br(n,t==null?void 0:t.in);if(!nD(d))throw new RangeError("Invalid time value");let h=e.match(YD).map(N=>{const D=N[0];if(D==="p"||D==="P"){const L=FD[D];return L(N,o.formatLong)}return N}).join("").match(jD).map(N=>{if(N==="''")return{isToken:!1,value:"'"};const D=N[0];if(D==="'")return{isToken:!1,value:eL(N)};if(av[D])return{isToken:!0,value:N};if(D.match(XD))throw new RangeError("Format string contains an unescaped latin alphabet character `"+D+"`");return{isToken:!1,value:N}});o.localize.preprocessor&&(h=o.localize.preprocessor(d,h));const f={firstWeekContainsDate:a,weekStartsOn:l,locale:o};return h.map(N=>{if(!N.isToken)return N.value;const D=N.value;(!(t!=null&&t.useAdditionalWeekYearTokens)&&zD(D)||!(t!=null&&t.useAdditionalDayOfYearTokens)&&WD(D))&&GD(D,e,String(n));const L=av[D[0]];return L(d,D,o.localize,f)}).join("")}function eL(n){const e=n.match(JD);return e?e[1].replace(QD,"'"):n}const uv={lessThanXSeconds:{standalone:{one:"weniger als 1 Sekunde",other:"weniger als {{count}} Sekunden"},withPreposition:{one:"weniger als 1 Sekunde",other:"weniger als {{count}} Sekunden"}},xSeconds:{standalone:{one:"1 Sekunde",other:"{{count}} Sekunden"},withPreposition:{one:"1 Sekunde",other:"{{count}} Sekunden"}},halfAMinute:{standalone:"eine halbe Minute",withPreposition:"einer halben Minute"},lessThanXMinutes:{standalone:{one:"weniger als 1 Minute",other:"weniger als {{count}} Minuten"},withPreposition:{one:"weniger als 1 Minute",other:"weniger als {{count}} Minuten"}},xMinutes:{standalone:{one:"1 Minute",other:"{{count}} Minuten"},withPreposition:{one:"1 Minute",other:"{{count}} Minuten"}},aboutXHours:{standalone:{one:"etwa 1 Stunde",other:"etwa {{count}} Stunden"},withPreposition:{one:"etwa 1 Stunde",other:"etwa {{count}} Stunden"}},xHours:{standalone:{one:"1 Stunde",other:"{{count}} Stunden"},withPreposition:{one:"1 Stunde",other:"{{count}} Stunden"}},xDays:{standalone:{one:"1 Tag",other:"{{count}} Tage"},withPreposition:{one:"1 Tag",other:"{{count}} Tagen"}},aboutXWeeks:{standalone:{one:"etwa 1 Woche",other:"etwa {{count}} Wochen"},withPreposition:{one:"etwa 1 Woche",other:"etwa {{count}} Wochen"}},xWeeks:{standalone:{one:"1 Woche",other:"{{count}} Wochen"},withPreposition:{one:"1 Woche",other:"{{count}} Wochen"}},aboutXMonths:{standalone:{one:"etwa 1 Monat",other:"etwa {{count}} Monate"},withPreposition:{one:"etwa 1 Monat",other:"etwa {{count}} Monaten"}},xMonths:{standalone:{one:"1 Monat",other:"{{count}} Monate"},withPreposition:{one:"1 Monat",other:"{{count}} Monaten"}},aboutXYears:{standalone:{one:"etwa 1 Jahr",other:"etwa {{count}} Jahre"},withPreposition:{one:"etwa 1 Jahr",other:"etwa {{count}} Jahren"}},xYears:{standalone:{one:"1 Jahr",other:"{{count}} Jahre"},withPreposition:{one:"1 Jahr",other:"{{count}} Jahren"}},overXYears:{standalone:{one:"mehr als 1 Jahr",other:"mehr als {{count}} Jahre"},withPreposition:{one:"mehr als 1 Jahr",other:"mehr als {{count}} Jahren"}},almostXYears:{standalone:{one:"fast 1 Jahr",other:"fast {{count}} Jahre"},withPreposition:{one:"fast 1 Jahr",other:"fast {{count}} Jahren"}}},tL=(n,e,t)=>{let r;const o=t!=null&&t.addSuffix?uv[n].withPreposition:uv[n].standalone;return typeof o=="string"?r=o:e===1?r=o.one:r=o.other.replace("{{count}}",String(e)),t!=null&&t.addSuffix?t.comparison&&t.comparison>0?"in "+r:"vor "+r:r},nL={full:"EEEE, do MMMM y",long:"do MMMM y",medium:"do MMM y",short:"dd.MM.y"},rL={full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},oL={full:"{{date}} 'um' {{time}}",long:"{{date}} 'um' {{time}}",medium:"{{date}} {{time}}",short:"{{date}} {{time}}"},iL={date:ar({formats:nL,defaultWidth:"full"}),time:ar({formats:rL,defaultWidth:"full"}),dateTime:ar({formats:oL,defaultWidth:"full"})},aL={lastWeek:"'letzten' eeee 'um' p",yesterday:"'gestern um' p",today:"'heute um' p",tomorrow:"'morgen um' p",nextWeek:"eeee 'um' p",other:"P"},sL=(n,e,t,r)=>aL[n],cL={narrow:["v.Chr.","n.Chr."],abbreviated:["v.Chr.","n.Chr."],wide:["vor Christus","nach Christus"]},lL={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1. Quartal","2. Quartal","3. Quartal","4. Quartal"]},xh={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mär","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Dez"],wide:["Januar","Februar","März","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember"]},uL={narrow:xh.narrow,abbreviated:["Jan.","Feb.","März","Apr.","Mai","Juni","Juli","Aug.","Sep.","Okt.","Nov.","Dez."],wide:xh.wide},dL={narrow:["S","M","D","M","D","F","S"],short:["So","Mo","Di","Mi","Do","Fr","Sa"],abbreviated:["So.","Mo.","Di.","Mi.","Do.","Fr.","Sa."],wide:["Sonntag","Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag"]},hL={narrow:{am:"vm.",pm:"nm.",midnight:"Mitternacht",noon:"Mittag",morning:"Morgen",afternoon:"Nachm.",evening:"Abend",night:"Nacht"},abbreviated:{am:"vorm.",pm:"nachm.",midnight:"Mitternacht",noon:"Mittag",morning:"Morgen",afternoon:"Nachmittag",evening:"Abend",night:"Nacht"},wide:{am:"vormittags",pm:"nachmittags",midnight:"Mitternacht",noon:"Mittag",morning:"Morgen",afternoon:"Nachmittag",evening:"Abend",night:"Nacht"}},fL={narrow:{am:"vm.",pm:"nm.",midnight:"Mitternacht",noon:"Mittag",morning:"morgens",afternoon:"nachm.",evening:"abends",night:"nachts"},abbreviated:{am:"vorm.",pm:"nachm.",midnight:"Mitternacht",noon:"Mittag",morning:"morgens",afternoon:"nachmittags",evening:"abends",night:"nachts"},wide:{am:"vormittags",pm:"nachmittags",midnight:"Mitternacht",noon:"Mittag",morning:"morgens",afternoon:"nachmittags",evening:"abends",night:"nachts"}},mL=n=>Number(n)+".",gL={ordinalNumber:mL,era:bt({values:cL,defaultWidth:"wide"}),quarter:bt({values:lL,defaultWidth:"wide",argumentCallback:n=>n-1}),month:bt({values:xh,formattingValues:uL,defaultWidth:"wide"}),day:bt({values:dL,defaultWidth:"wide"}),dayPeriod:bt({values:hL,defaultWidth:"wide",formattingValues:fL,defaultFormattingWidth:"wide"})},pL=/^(\d+)(\.)?/i,_L=/\d+/i,vL={narrow:/^(v\.? ?Chr\.?|n\.? ?Chr\.?)/i,abbreviated:/^(v\.? ?Chr\.?|n\.? ?Chr\.?)/i,wide:/^(vor Christus|vor unserer Zeitrechnung|nach Christus|unserer Zeitrechnung)/i},yL={any:[/^v/i,/^n/i]},CL={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](\.)? Quartal/i},EL={any:[/1/i,/2/i,/3/i,/4/i]},wL={narrow:/^[jfmasond]/i,abbreviated:/^(j[aä]n|feb|mär[z]?|apr|mai|jun[i]?|jul[i]?|aug|sep|okt|nov|dez)\.?/i,wide:/^(januar|februar|märz|april|mai|juni|juli|august|september|oktober|november|dezember)/i},TL={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:[/^j[aä]/i,/^f/i,/^mär/i,/^ap/i,/^mai/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},bL={narrow:/^[smdmf]/i,short:/^(so|mo|di|mi|do|fr|sa)/i,abbreviated:/^(son?|mon?|die?|mit?|don?|fre?|sam?)\.?/i,wide:/^(sonntag|montag|dienstag|mittwoch|donnerstag|freitag|samstag)/i},SL={any:[/^so/i,/^mo/i,/^di/i,/^mi/i,/^do/i,/^f/i,/^sa/i]},IL={narrow:/^(vm\.?|nm\.?|Mitternacht|Mittag|morgens|nachm\.?|abends|nachts)/i,abbreviated:/^(vorm\.?|nachm\.?|Mitternacht|Mittag|morgens|nachm\.?|abends|nachts)/i,wide:/^(vormittags|nachmittags|Mitternacht|Mittag|morgens|nachmittags|abends|nachts)/i},AL={any:{am:/^v/i,pm:/^n/i,midnight:/^Mitte/i,noon:/^Mitta/i,morning:/morgens/i,afternoon:/nachmittags/i,evening:/abends/i,night:/nachts/i}},kL={ordinalNumber:Ql({matchPattern:pL,parsePattern:_L,valueCallback:n=>parseInt(n)}),era:St({matchPatterns:vL,defaultMatchWidth:"wide",parsePatterns:yL,defaultParseWidth:"any"}),quarter:St({matchPatterns:CL,defaultMatchWidth:"wide",parsePatterns:EL,defaultParseWidth:"any",valueCallback:n=>n+1}),month:St({matchPatterns:wL,defaultMatchWidth:"wide",parsePatterns:TL,defaultParseWidth:"any"}),day:St({matchPatterns:bL,defaultMatchWidth:"wide",parsePatterns:SL,defaultParseWidth:"any"}),dayPeriod:St({matchPatterns:IL,defaultMatchWidth:"wide",parsePatterns:AL,defaultParseWidth:"any"})},NL={code:"de",formatDistance:tL,formatLong:iL,formatRelative:sL,localize:gL,match:kL,options:{weekStartsOn:1,firstWeekContainsDate:4}},RL={lessThanXSeconds:{one:"moins d’une seconde",other:"moins de {{count}} secondes"},xSeconds:{one:"1 seconde",other:"{{count}} secondes"},halfAMinute:"30 secondes",lessThanXMinutes:{one:"moins d’une minute",other:"moins de {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"environ 1 heure",other:"environ {{count}} heures"},xHours:{one:"1 heure",other:"{{count}} heures"},xDays:{one:"1 jour",other:"{{count}} jours"},aboutXWeeks:{one:"environ 1 semaine",other:"environ {{count}} semaines"},xWeeks:{one:"1 semaine",other:"{{count}} semaines"},aboutXMonths:{one:"environ 1 mois",other:"environ {{count}} mois"},xMonths:{one:"1 mois",other:"{{count}} mois"},aboutXYears:{one:"environ 1 an",other:"environ {{count}} ans"},xYears:{one:"1 an",other:"{{count}} ans"},overXYears:{one:"plus d’un an",other:"plus de {{count}} ans"},almostXYears:{one:"presqu’un an",other:"presque {{count}} ans"}},OL=(n,e,t)=>{let r;const o=RL[n];return typeof o=="string"?r=o:e===1?r=o.one:r=o.other.replace("{{count}}",String(e)),t!=null&&t.addSuffix?t.comparison&&t.comparison>0?"dans "+r:"il y a "+r:r},PL={full:"EEEE d MMMM y",long:"d MMMM y",medium:"d MMM y",short:"dd/MM/y"},ML={full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},DL={full:"{{date}} 'à' {{time}}",long:"{{date}} 'à' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},LL={date:ar({formats:PL,defaultWidth:"full"}),time:ar({formats:ML,defaultWidth:"full"}),dateTime:ar({formats:DL,defaultWidth:"full"})},xL={lastWeek:"eeee 'dernier à' p",yesterday:"'hier à' p",today:"'aujourd’hui à' p",tomorrow:"'demain à' p'",nextWeek:"eeee 'prochain à' p",other:"P"},UL=(n,e,t,r)=>xL[n],BL={narrow:["av. J.-C","ap. J.-C"],abbreviated:["av. J.-C","ap. J.-C"],wide:["avant Jésus-Christ","après Jésus-Christ"]},VL={narrow:["T1","T2","T3","T4"],abbreviated:["1er trim.","2ème trim.","3ème trim.","4ème trim."],wide:["1er trimestre","2ème trimestre","3ème trimestre","4ème trimestre"]},FL={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["janv.","févr.","mars","avr.","mai","juin","juil.","août","sept.","oct.","nov.","déc."],wide:["janvier","février","mars","avril","mai","juin","juillet","août","septembre","octobre","novembre","décembre"]},HL={narrow:["D","L","M","M","J","V","S"],short:["di","lu","ma","me","je","ve","sa"],abbreviated:["dim.","lun.","mar.","mer.","jeu.","ven.","sam."],wide:["dimanche","lundi","mardi","mercredi","jeudi","vendredi","samedi"]},$L={narrow:{am:"AM",pm:"PM",midnight:"minuit",noon:"midi",morning:"mat.",afternoon:"ap.m.",evening:"soir",night:"mat."},abbreviated:{am:"AM",pm:"PM",midnight:"minuit",noon:"midi",morning:"matin",afternoon:"après-midi",evening:"soir",night:"matin"},wide:{am:"AM",pm:"PM",midnight:"minuit",noon:"midi",morning:"du matin",afternoon:"de l’après-midi",evening:"du soir",night:"du matin"}},KL=(n,e)=>{const t=Number(n),r=e==null?void 0:e.unit;if(t===0)return"0";const o=["year","week","hour","minute","second"];let a;return t===1?a=r&&o.includes(r)?"ère":"er":a="ème",t+a},WL=["MMM","MMMM"],zL={preprocessor:(n,e)=>n.getDate()===1||!e.some(r=>r.isToken&&WL.includes(r.value))?e:e.map(r=>r.isToken&&r.value==="do"?{isToken:!0,value:"d"}:r),ordinalNumber:KL,era:bt({values:BL,defaultWidth:"wide"}),quarter:bt({values:VL,defaultWidth:"wide",argumentCallback:n=>n-1}),month:bt({values:FL,defaultWidth:"wide"}),day:bt({values:HL,defaultWidth:"wide"}),dayPeriod:bt({values:$L,defaultWidth:"wide"})},GL=/^(\d+)(ième|ère|ème|er|e)?/i,qL=/\d+/i,jL={narrow:/^(av\.J\.C|ap\.J\.C|ap\.J\.-C)/i,abbreviated:/^(av\.J\.-C|av\.J-C|apr\.J\.-C|apr\.J-C|ap\.J-C)/i,wide:/^(avant Jésus-Christ|après Jésus-Christ)/i},YL={any:[/^av/i,/^ap/i]},JL={narrow:/^T?[1234]/i,abbreviated:/^[1234](er|ème|e)? trim\.?/i,wide:/^[1234](er|ème|e)? trimestre/i},QL={any:[/1/i,/2/i,/3/i,/4/i]},XL={narrow:/^[jfmasond]/i,abbreviated:/^(janv|févr|mars|avr|mai|juin|juill|juil|août|sept|oct|nov|déc)\.?/i,wide:/^(janvier|février|mars|avril|mai|juin|juillet|août|septembre|octobre|novembre|décembre)/i},ZL={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,/^av/i,/^ma/i,/^juin/i,/^juil/i,/^ao/i,/^s/i,/^o/i,/^n/i,/^d/i]},ex={narrow:/^[lmjvsd]/i,short:/^(di|lu|ma|me|je|ve|sa)/i,abbreviated:/^(dim|lun|mar|mer|jeu|ven|sam)\.?/i,wide:/^(dimanche|lundi|mardi|mercredi|jeudi|vendredi|samedi)/i},tx={narrow:[/^d/i,/^l/i,/^m/i,/^m/i,/^j/i,/^v/i,/^s/i],any:[/^di/i,/^lu/i,/^ma/i,/^me/i,/^je/i,/^ve/i,/^sa/i]},nx={narrow:/^(a|p|minuit|midi|mat\.?|ap\.?m\.?|soir|nuit)/i,any:/^([ap]\.?\s?m\.?|du matin|de l'après[-\s]midi|du soir|de la nuit)/i},rx={any:{am:/^a/i,pm:/^p/i,midnight:/^min/i,noon:/^mid/i,morning:/mat/i,afternoon:/ap/i,evening:/soir/i,night:/nuit/i}},ox={ordinalNumber:Ql({matchPattern:GL,parsePattern:qL,valueCallback:n=>parseInt(n)}),era:St({matchPatterns:jL,defaultMatchWidth:"wide",parsePatterns:YL,defaultParseWidth:"any"}),quarter:St({matchPatterns:JL,defaultMatchWidth:"wide",parsePatterns:QL,defaultParseWidth:"any",valueCallback:n=>n+1}),month:St({matchPatterns:XL,defaultMatchWidth:"wide",parsePatterns:ZL,defaultParseWidth:"any"}),day:St({matchPatterns:ex,defaultMatchWidth:"wide",parsePatterns:tx,defaultParseWidth:"any"}),dayPeriod:St({matchPatterns:nx,defaultMatchWidth:"any",parsePatterns:rx,defaultParseWidth:"any"})},ix={code:"fr",formatDistance:OL,formatLong:LL,formatRelative:UL,localize:zL,match:ox,options:{weekStartsOn:1,firstWeekContainsDate:4}},ax={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"}},sx=(n,e,t)=>{let r;const o=ax[n];return typeof o=="string"?r=o:e===1?r=o.one:r=o.other.replace("{{count}}",String(e)),t!=null&&t.addSuffix?t.comparison&&t.comparison>0?"em "+r:"há "+r:r},cx={full:"EEEE, d 'de' MMMM 'de' y",long:"d 'de' MMMM 'de' y",medium:"d MMM y",short:"dd/MM/yyyy"},lx={full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},ux={full:"{{date}} 'às' {{time}}",long:"{{date}} 'às' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},dx={date:ar({formats:cx,defaultWidth:"full"}),time:ar({formats:lx,defaultWidth:"full"}),dateTime:ar({formats:ux,defaultWidth:"full"})},hx={lastWeek:n=>{const e=n.getDay();return"'"+(e===0||e===6?"último":"última")+"' eeee 'às' p"},yesterday:"'ontem às' p",today:"'hoje às' p",tomorrow:"'amanhã às' p",nextWeek:"eeee 'às' p",other:"P"},fx=(n,e,t,r)=>{const o=hx[n];return typeof o=="function"?o(e):o},mx={narrow:["AC","DC"],abbreviated:["AC","DC"],wide:["antes de cristo","depois de cristo"]},gx={narrow:["1","2","3","4"],abbreviated:["T1","T2","T3","T4"],wide:["1º trimestre","2º trimestre","3º trimestre","4º trimestre"]},px={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"]},_x={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"]},vx={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"}},yx={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"}},Cx=(n,e)=>{const t=Number(n);return(e==null?void 0:e.unit)==="week"?t+"ª":t+"º"},Ex={ordinalNumber:Cx,era:bt({values:mx,defaultWidth:"wide"}),quarter:bt({values:gx,defaultWidth:"wide",argumentCallback:n=>n-1}),month:bt({values:px,defaultWidth:"wide"}),day:bt({values:_x,defaultWidth:"wide"}),dayPeriod:bt({values:vx,defaultWidth:"wide",formattingValues:yx,defaultFormattingWidth:"wide"})},wx=/^(\d+)[ºªo]?/i,Tx=/\d+/i,bx={narrow:/^(ac|dc|a|d)/i,abbreviated:/^(a\.?\s?c\.?|d\.?\s?c\.?)/i,wide:/^(antes de cristo|depois de cristo)/i},Sx={any:[/^ac/i,/^dc/i],wide:[/^antes de cristo/i,/^depois de cristo/i]},Ix={narrow:/^[1234]/i,abbreviated:/^T[1234]/i,wide:/^[1234](º)? trimestre/i},Ax={any:[/1/i,/2/i,/3/i,/4/i]},kx={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},Nx={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]},Rx={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},Ox={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]},Px={narrow:/^(a|p|mn|md|(da) (manhã|tarde|noite))/i,any:/^([ap]\.?\s?m\.?|meia[-\s]noite|meio[-\s]dia|(da) (manhã|tarde|noite))/i},Mx={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}},Dx={ordinalNumber:Ql({matchPattern:wx,parsePattern:Tx,valueCallback:n=>parseInt(n,10)}),era:St({matchPatterns:bx,defaultMatchWidth:"wide",parsePatterns:Sx,defaultParseWidth:"any"}),quarter:St({matchPatterns:Ix,defaultMatchWidth:"wide",parsePatterns:Ax,defaultParseWidth:"any",valueCallback:n=>n+1}),month:St({matchPatterns:kx,defaultMatchWidth:"wide",parsePatterns:Nx,defaultParseWidth:"any"}),day:St({matchPatterns:Rx,defaultMatchWidth:"wide",parsePatterns:Ox,defaultParseWidth:"any"}),dayPeriod:St({matchPatterns:Px,defaultMatchWidth:"any",parsePatterns:Mx,defaultParseWidth:"any"})},Lx={code:"pt-BR",formatDistance:sx,formatLong:dx,formatRelative:fx,localize:Ex,match:Dx,options:{weekStartsOn:0,firstWeekContainsDate:1}},xx={"en-US":Lf,"pt-BR":Lx,"fr-FR":ix,"de-DE":NL};function ms(n){if(!n)return"";const{locale:e}=Fn(),t=e.value,r=xx[t]||Lf;try{const o=typeof n=="string"||n===null?new Date(n||""):n;return isNaN(o.getTime())?"":ZD(o,"PPpp",{locale:r})}catch(o){return console.error("Error formatting date:",o),""}}const Uh="https://app-files.jplan.com.br/pub/resources/assets/thumbs/empty_list.svg";function Ux(n){const{clientX:e,clientY:t}=n,{innerWidth:r,innerHeight:o}=window;return{x:Math.min(e,r-350),y:Math.min(t,o-200)}}const Bx={key:0,class:"d-flex mt-4 flex-column align-center justify-center w-100"},Vx={key:1,class:"mt-4 h-100 rounded-sm"},Fx={class:"d-inline-flex"},Hx={class:"d-inline-flex"},$x={class:"d-inline-flex"},nE=c.defineComponent({__name:"TableAdvanced",props:c.mergeModels({headers:{},items:{default:()=>[]},actions:{},loading:{type:Boolean},columns:{default:()=>[]},sortBy:{},dateFields:{},customFields:{},search:{},filterKeys:{},selectOnRowClick:{type:Boolean}},{selection:{},selectionModifiers:{}}),emits:c.mergeModels(["rowClick"],["update:selection"]),setup(n,{emit:e}){const t=[{value:50,title:"50"},{value:100,title:"100"},{value:500,title:"500"},{value:1e3,title:"1000"},{value:-1,title:"$vuetify.dataFooter.itemsPerPageAll"}],r=n,o=e,a=c.computed(()=>r.headers?r.headers:r.columns?r.columns.filter(p=>p.checked):[]),l=c.useModel(n,"selection"),d=c.ref(!1),h=c.ref({x:0,y:0}),f=c.ref(null),g=async(p,{item:w})=>{p.preventDefault(),f.value=w,h.value=Ux(p),d.value=!0};function _(p,{item:w}){var T;if(o("rowClick",w),!r.selectOnRowClick||!((T=l.value)!=null&&T.length))return;const C=l.value.findIndex(k=>k===w);return C!==-1?l.value.splice(C,1):l.value.push(w),w}return(p,w)=>!p.loading&&p.items.length===0?(c.openBlock(),c.createElementBlock("div",Bx,[c.createVNode(pf.VImg,{"lazy-src":c.unref(Uh),src:c.unref(Uh),height:"600",width:"600"},null,8,["lazy-src","src"]),w[2]||(w[2]=c.createElementVNode("p",{class:"text-center text-body-1 w-100"},"No records found.",-1))])):(c.openBlock(),c.createElementBlock("div",Vx,[c.createVNode(_f.VMenu,{modelValue:d.value,"onUpdate:modelValue":w[0]||(w[0]=C=>d.value=C),"close-on-content-click":!0,"min-width":"350",style:c.normalizeStyle({position:"fixed",left:`${h.value.x}px`,top:`${h.value.y}px`})},{default:c.withCtx(()=>[c.renderSlot(p.$slots,"contextmenu",{item:f.value})]),_:3},8,["modelValue","style"]),c.createVNode(Oy.VDataTable,{modelValue:l.value,"onUpdate:modelValue":w[1]||(w[1]=C=>l.value=C),"fixed-header":"","fixed-footer":"","items-per-page":"50",headers:a.value,items:p.items,"items-length":p.items.length,loading:p.loading||!1,"return-object":"","show-select":"","sort-by":p.sortBy,search:p.search,"filter-keys":p.filterKeys,height:"calc(100vh - 320px)",class:"customize-table bg-containerBg","onContextmenu:row":g,"onClick:row":_,"items-per-page-options":t},c.createSlots({"item.avatar":c.withCtx(({item:C})=>[c.renderSlot(p.$slots,"avatar",{item:C})]),"item.active":c.withCtx(({item:C})=>[c.renderSlot(p.$slots,"active",{item:C})]),"item.image":c.withCtx(({item:C})=>[c.renderSlot(p.$slots,"image",{item:C})]),"item.picture":c.withCtx(({item:C})=>[c.renderSlot(p.$slots,"picture",{item:C})]),"item.icon":c.withCtx(({item:C})=>[c.renderSlot(p.$slots,"icon",{item:C})]),"item.actions":c.withCtx(({item:C})=>[c.createElementVNode("div",Hx,[c.renderSlot(p.$slots,"actions",{item:C})])]),"no-data":c.withCtx(()=>[w[3]||(w[3]=c.createElementVNode("p",null,"No results found.",-1))]),_:2},[c.renderList(p.customFields,C=>({name:`item.${C}`,fn:c.withCtx(({item:T})=>[c.createElementVNode("div",Fx,[c.renderSlot(p.$slots,C,{item:T})])])})),c.renderList(p.dateFields,C=>({name:`item.${C}`,fn:c.withCtx(({item:T})=>[c.createElementVNode("div",$x,c.toDisplayString(c.unref(ms)(T[C])),1)])}))]),1032,["modelValue","headers","items","items-length","loading","sort-by","search","filter-keys"])]))}}),Xl=c.defineComponent({__name:"SearchFilter",props:c.mergeModels({placeholder:{}},{search:{},searchModifiers:{}}),emits:["update:search"],setup(n){const e=c.useModel(n,"search"),{t}=Fn();return(r,o)=>(c.openBlock(),c.createBlock(AO.VTextField,{class:"bg-containerBg pa-1 rounded-sm elevation-1","persistent-placeholder":"",placeholder:r.placeholder??c.unref(t)("placeholders.search"),variant:"plain","hide-details":"",density:"compact",modelValue:e.value,"onUpdate:modelValue":o[0]||(o[0]=a=>e.value=a)},{"prepend-inner":c.withCtx(()=>[c.createVNode(c.unref(vP),{size:"15",class:"ma-1 me-1"})]),_:1},8,["placeholder","modelValue"]))}}),Kx=c.defineComponent({__name:"TableHeader",props:c.mergeModels({columns:{},filter_visualize:{type:Boolean,default:!0}},{search:{},searchModifiers:{}}),emits:c.mergeModels(["refresh","remove"],["update:search"]),setup(n,{emit:e}){var g,_;const t=n,r=c.computed(()=>t.columns),o=e,a=c.useModel(n,"search"),{openDialog:l}=Us("col-settings"),d=c.getCurrentInstance(),h=((g=d==null?void 0:d.vnode.props)==null?void 0:g.onRemove)!==void 0||((_=d==null?void 0:d.vnode.props)==null?void 0:_["onUpdate:remove"])!==void 0,{t:f}=Fn();return(p,w)=>(c.openBlock(),c.createElementBlock("div",null,[c.createVNode(c.unref(Vf),{modelValue:r.value,"onUpdate:modelValue":w[0]||(w[0]=C=>r.value=C)},null,8,["modelValue"]),c.createVNode(qe.VRow,{"no-gutters":"",align:"center"},{default:c.withCtx(()=>[c.createVNode(qe.VCol,{cols:"12",md:"6",class:"d-flex align-center flex-wrap gap-2"},{default:c.withCtx(()=>[c.createElementVNode("div",null,[c.createVNode(c.unref(fP),{class:"mt-1 me-2",color:"rgb(var(--v-theme-lightprimary))"})]),c.renderSlot(p.$slots,"filter",{},void 0,!0),p.$slots.filter?c.createCommentVNode("",!0):(c.openBlock(),c.createBlock(fs.VSelect,{key:0,items:["Move data","Copy","Duplicate","Loop"],variant:"solo","bg-color":"containerBg",rounded:"false",placeholder:c.unref(f)("placeholders.selectFilter"),density:"compact",class:"filter-field","hide-details":"",multiple:"",clearable:""},null,8,["placeholder"])),c.createVNode(Ge.VBtn,{icon:"",variant:"text",onClick:w[1]||(w[1]=C=>o("refresh"))},{default:c.withCtx(()=>[c.createVNode(c.unref(_P),{color:"rgb(var(--v-theme-secondary))"})]),_:1}),c.createVNode(Ge.VBtn,{icon:"",variant:"text"},{default:c.withCtx(()=>[c.createVNode(c.unref(hP),{color:"rgb(var(--v-theme-secondary))"})]),_:1})]),_:3}),c.createVNode(qe.VCol,{cols:"12",md:"6",class:"d-flex align-center justify-end flex-wrap gap-2"},{default:c.withCtx(()=>[c.renderSlot(p.$slots,"top-right",{},void 0,!0),c.createVNode(Ge.VBtn,{class:"me-2",icon:"",variant:"text",onClick:c.unref(l)},{default:c.withCtx(()=>[c.createVNode(c.unref(pP),{color:"rgb(var(--v-theme-secondary))"})]),_:1},8,["onClick"]),c.createVNode(Xl,{class:"search-field",modelValue:a.value,"onUpdate:modelValue":w[2]||(w[2]=C=>a.value=C)},null,8,["modelValue"])]),_:3})]),_:3}),c.createVNode(Ho.VDivider,{class:"my-4"}),c.createVNode(qe.VRow,{align:"center"},{default:c.withCtx(()=>[c.createVNode(qe.VCol,{md:"3",cols:"6",class:"d-flex flex-wrap gap-2"},{default:c.withCtx(()=>[c.renderSlot(p.$slots,"left-prepend",{},void 0,!0),c.unref(h)?(c.openBlock(),c.createBlock(c.unref(Df),{key:0,onRemoveAll:w[3]||(w[3]=C=>o("remove"))})):c.createCommentVNode("",!0),c.renderSlot(p.$slots,"left-append",{},void 0,!0)]),_:3}),c.createVNode(qe.VCol,{md:"9",cols:"12",class:"d-flex justify-end align-center flex-wrap gap-2"},{default:c.withCtx(()=>[c.renderSlot(p.$slots,"right-prepend",{},void 0,!0),p.filter_visualize?(c.openBlock(),c.createElementBlock(c.Fragment,{key:0},[c.createVNode(c.unref(yP),{class:"me-2",color:"rgb(var(--v-theme-secondary))"}),c.createVNode(fs.VSelect,{items:[],variant:"solo","bg-color":"containerBg",rounded:"false",placeholder:c.unref(f)("placeholders.visualize"),density:"compact",class:"bottom-field me-2","hide-details":"",multiple:"",clearable:""},null,8,["placeholder"])],64)):c.createCommentVNode("",!0),c.createVNode(c.unref(gP),{class:"me-2",color:"rgb(var(--v-theme-secondary))"}),c.createVNode(fs.VSelect,{items:["Move data","Copy","Duplicate","Loop"],variant:"solo","bg-color":"containerBg",rounded:"false",placeholder:c.unref(f)("placeholders.actions"),density:"compact",class:"bottom-field","hide-details":"",clearable:""},null,8,["placeholder"])]),_:3})]),_:3})]))}}),rE=Yo(Kx,[["__scopeId","data-v-58865e47"]]);/*!
|
33
33
|
* vue-draggable-next v2.2.0
|
34
34
|
* (c) 2023 Anish George
|
35
35
|
* @license MIT
|
@@ -38,22 +38,22 @@ About how to use the Composition API mode, see https://vue-i18n.intlify.dev/guid
|
|
38
38
|
* @author RubaXa <trash@rubaxa.org>
|
39
39
|
* @author owenm <owen23355@gmail.com>
|
40
40
|
* @license MIT
|
41
|
-
*/function dv(n,e){var t=Object.keys(n);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(n);e&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(n,o).enumerable})),t.push.apply(t,r)}return t}function Wr(n){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?dv(Object(t),!0).forEach(function(r){Kx(n,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(t)):dv(Object(t)).forEach(function(r){Object.defineProperty(n,r,Object.getOwnPropertyDescriptor(t,r))})}return n}function ul(n){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?ul=function(e){return typeof e}:ul=function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ul(n)}function Kx(n,e,t){return e in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}function mo(){return mo=Object.assign||function(n){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r])}return n},mo.apply(this,arguments)}function Wx(n,e){if(n==null)return{};var t={},r=Object.keys(n),o,a;for(a=0;a<r.length;a++)o=r[a],!(e.indexOf(o)>=0)&&(t[o]=n[o]);return t}function zx(n,e){if(n==null)return{};var t=Wx(n,e),r,o;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(n);for(o=0;o<a.length;o++)r=a[o],!(e.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(n,r)&&(t[r]=n[r])}return t}var Gx="1.14.0";function ho(n){if(typeof window<"u"&&window.navigator)return!!navigator.userAgent.match(n)}var po=ho(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),Hs=ho(/Edge/i),hv=ho(/firefox/i),gs=ho(/safari/i)&&!ho(/chrome/i)&&!ho(/android/i),oE=ho(/iP(ad|od|hone)/i),qx=ho(/chrome/i)&&ho(/android/i),iE={capture:!1,passive:!1};function Fe(n,e,t){n.addEventListener(e,t,!po&&iE)}function xe(n,e,t){n.removeEventListener(e,t,!po&&iE)}function Tl(n,e){if(e){if(e[0]===">"&&(e=e.substring(1)),n)try{if(n.matches)return n.matches(e);if(n.msMatchesSelector)return n.msMatchesSelector(e);if(n.webkitMatchesSelector)return n.webkitMatchesSelector(e)}catch{return!1}return!1}}function jx(n){return n.host&&n!==document&&n.host.nodeType?n.host:n.parentNode}function Lr(n,e,t,r){if(n){t=t||document;do{if(e!=null&&(e[0]===">"?n.parentNode===t&&Tl(n,e):Tl(n,e))||r&&n===t)return n;if(n===t)break}while(n=jx(n))}return null}var fv=/\s+/g;function Nn(n,e,t){if(n&&e)if(n.classList)n.classList[t?"add":"remove"](e);else{var r=(" "+n.className+" ").replace(fv," ").replace(" "+e+" "," ");n.className=(r+(t?" "+e:"")).replace(fv," ")}}function pe(n,e,t){var r=n&&n.style;if(r){if(t===void 0)return document.defaultView&&document.defaultView.getComputedStyle?t=document.defaultView.getComputedStyle(n,""):n.currentStyle&&(t=n.currentStyle),e===void 0?t:t[e];!(e in r)&&e.indexOf("webkit")===-1&&(e="-webkit-"+e),r[e]=t+(typeof t=="string"?"":"px")}}function pa(n,e){var t="";if(typeof n=="string")t=n;else do{var r=pe(n,"transform");r&&r!=="none"&&(t=r+" "+t)}while(!e&&(n=n.parentNode));var o=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return o&&new o(t)}function aE(n,e,t){if(n){var r=n.getElementsByTagName(e),o=0,a=r.length;if(t)for(;o<a;o++)t(r[o],o);return r}return[]}function $r(){var n=document.scrollingElement;return n||document.documentElement}function Rt(n,e,t,r,o){if(!(!n.getBoundingClientRect&&n!==window)){var a,l,d,h,f,g,_;if(n!==window&&n.parentNode&&n!==$r()?(a=n.getBoundingClientRect(),l=a.top,d=a.left,h=a.bottom,f=a.right,g=a.height,_=a.width):(l=0,d=0,h=window.innerHeight,f=window.innerWidth,g=window.innerHeight,_=window.innerWidth),(e||t)&&n!==window&&(o=o||n.parentNode,!po))do if(o&&o.getBoundingClientRect&&(pe(o,"transform")!=="none"||t&&pe(o,"position")!=="static")){var p=o.getBoundingClientRect();l-=p.top+parseInt(pe(o,"border-top-width")),d-=p.left+parseInt(pe(o,"border-left-width")),h=l+a.height,f=d+a.width;break}while(o=o.parentNode);if(r&&n!==window){var w=pa(o||n),C=w&&w.a,T=w&&w.d;w&&(l/=T,d/=C,_/=C,g/=T,h=l+g,f=d+_)}return{top:l,left:d,bottom:h,right:f,width:_,height:g}}}function mv(n,e,t){for(var r=Vo(n,!0),o=Rt(n)[e];r;){var a=Rt(r)[t],l=void 0;if(l=o>=a,!l)return r;if(r===$r())break;r=Vo(r,!1)}return!1}function ba(n,e,t,r){for(var o=0,a=0,l=n.children;a<l.length;){if(l[a].style.display!=="none"&&l[a]!==_e.ghost&&(r||l[a]!==_e.dragged)&&Lr(l[a],t.draggable,n,!1)){if(o===e)return l[a];o++}a++}return null}function xf(n,e){for(var t=n.lastElementChild;t&&(t===_e.ghost||pe(t,"display")==="none"||e&&!Tl(t,e));)t=t.previousElementSibling;return t||null}function rr(n,e){var t=0;if(!n||!n.parentNode)return-1;for(;n=n.previousElementSibling;)n.nodeName.toUpperCase()!=="TEMPLATE"&&n!==_e.clone&&(!e||Tl(n,e))&&t++;return t}function gv(n){var e=0,t=0,r=$r();if(n)do{var o=pa(n),a=o.a,l=o.d;e+=n.scrollLeft*a,t+=n.scrollTop*l}while(n!==r&&(n=n.parentNode));return[e,t]}function Yx(n,e){for(var t in n)if(n.hasOwnProperty(t)){for(var r in e)if(e.hasOwnProperty(r)&&e[r]===n[t][r])return Number(t)}return-1}function Vo(n,e){if(!n||!n.getBoundingClientRect)return $r();var t=n,r=!1;do if(t.clientWidth<t.scrollWidth||t.clientHeight<t.scrollHeight){var o=pe(t);if(t.clientWidth<t.scrollWidth&&(o.overflowX=="auto"||o.overflowX=="scroll")||t.clientHeight<t.scrollHeight&&(o.overflowY=="auto"||o.overflowY=="scroll")){if(!t.getBoundingClientRect||t===document.body)return $r();if(r||e)return t;r=!0}}while(t=t.parentNode);return $r()}function Jx(n,e){if(n&&e)for(var t in e)e.hasOwnProperty(t)&&(n[t]=e[t]);return n}function zd(n,e){return Math.round(n.top)===Math.round(e.top)&&Math.round(n.left)===Math.round(e.left)&&Math.round(n.height)===Math.round(e.height)&&Math.round(n.width)===Math.round(e.width)}var ps;function sE(n,e){return function(){if(!ps){var t=arguments,r=this;t.length===1?n.call(r,t[0]):n.apply(r,t),ps=setTimeout(function(){ps=void 0},e)}}}function Qx(){clearTimeout(ps),ps=void 0}function cE(n,e,t){n.scrollLeft+=e,n.scrollTop+=t}function lE(n){var e=window.Polymer,t=window.jQuery||window.Zepto;return e&&e.dom?e.dom(n).cloneNode(!0):t?t(n).clone(!0)[0]:n.cloneNode(!0)}var xn="Sortable"+new Date().getTime();function Xx(){var n=[],e;return{captureAnimationState:function(){if(n=[],!!this.options.animation){var r=[].slice.call(this.el.children);r.forEach(function(o){if(!(pe(o,"display")==="none"||o===_e.ghost)){n.push({target:o,rect:Rt(o)});var a=Wr({},n[n.length-1].rect);if(o.thisAnimationDuration){var l=pa(o,!0);l&&(a.top-=l.f,a.left-=l.e)}o.fromRect=a}})}},addAnimationState:function(r){n.push(r)},removeAnimationState:function(r){n.splice(Yx(n,{target:r}),1)},animateAll:function(r){var o=this;if(!this.options.animation){clearTimeout(e),typeof r=="function"&&r();return}var a=!1,l=0;n.forEach(function(d){var h=0,f=d.target,g=f.fromRect,_=Rt(f),p=f.prevFromRect,w=f.prevToRect,C=d.rect,T=pa(f,!0);T&&(_.top-=T.f,_.left-=T.e),f.toRect=_,f.thisAnimationDuration&&zd(p,_)&&!zd(g,_)&&(C.top-_.top)/(C.left-_.left)===(g.top-_.top)/(g.left-_.left)&&(h=eU(C,p,w,o.options)),zd(_,g)||(f.prevFromRect=g,f.prevToRect=_,h||(h=o.options.animation),o.animate(f,C,_,h)),h&&(a=!0,l=Math.max(l,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),a?e=setTimeout(function(){typeof r=="function"&&r()},l):typeof r=="function"&&r(),n=[]},animate:function(r,o,a,l){if(l){pe(r,"transition",""),pe(r,"transform","");var d=pa(this.el),h=d&&d.a,f=d&&d.d,g=(o.left-a.left)/(h||1),_=(o.top-a.top)/(f||1);r.animatingX=!!g,r.animatingY=!!_,pe(r,"transform","translate3d("+g+"px,"+_+"px,0)"),this.forRepaintDummy=Zx(r),pe(r,"transition","transform "+l+"ms"+(this.options.easing?" "+this.options.easing:"")),pe(r,"transform","translate3d(0,0,0)"),typeof r.animated=="number"&&clearTimeout(r.animated),r.animated=setTimeout(function(){pe(r,"transition",""),pe(r,"transform",""),r.animated=!1,r.animatingX=!1,r.animatingY=!1},l)}}}}function Zx(n){return n.offsetWidth}function eU(n,e,t,r){return Math.sqrt(Math.pow(e.top-n.top,2)+Math.pow(e.left-n.left,2))/Math.sqrt(Math.pow(e.top-t.top,2)+Math.pow(e.left-t.left,2))*r.animation}var ji=[],Gd={initializeByDefault:!0},$s={mount:function(e){for(var t in Gd)Gd.hasOwnProperty(t)&&!(t in e)&&(e[t]=Gd[t]);ji.forEach(function(r){if(r.pluginName===e.pluginName)throw"Sortable: Cannot mount plugin ".concat(e.pluginName," more than once")}),ji.push(e)},pluginEvent:function(e,t,r){var o=this;this.eventCanceled=!1,r.cancel=function(){o.eventCanceled=!0};var a=e+"Global";ji.forEach(function(l){t[l.pluginName]&&(t[l.pluginName][a]&&t[l.pluginName][a](Wr({sortable:t},r)),t.options[l.pluginName]&&t[l.pluginName][e]&&t[l.pluginName][e](Wr({sortable:t},r)))})},initializePlugins:function(e,t,r,o){ji.forEach(function(d){var h=d.pluginName;if(!(!e.options[h]&&!d.initializeByDefault)){var f=new d(e,t,e.options);f.sortable=e,f.options=e.options,e[h]=f,mo(r,f.defaults)}});for(var a in e.options)if(e.options.hasOwnProperty(a)){var l=this.modifyOption(e,a,e.options[a]);typeof l<"u"&&(e.options[a]=l)}},getEventProperties:function(e,t){var r={};return ji.forEach(function(o){typeof o.eventProperties=="function"&&mo(r,o.eventProperties.call(t[o.pluginName],e))}),r},modifyOption:function(e,t,r){var o;return ji.forEach(function(a){e[a.pluginName]&&a.optionListeners&&typeof a.optionListeners[t]=="function"&&(o=a.optionListeners[t].call(e[a.pluginName],r))}),o}};function tU(n){var e=n.sortable,t=n.rootEl,r=n.name,o=n.targetEl,a=n.cloneEl,l=n.toEl,d=n.fromEl,h=n.oldIndex,f=n.newIndex,g=n.oldDraggableIndex,_=n.newDraggableIndex,p=n.originalEvent,w=n.putSortable,C=n.extraEventProperties;if(e=e||t&&t[xn],!!e){var T,k=e.options,I="on"+r.charAt(0).toUpperCase()+r.substr(1);window.CustomEvent&&!po&&!Hs?T=new CustomEvent(r,{bubbles:!0,cancelable:!0}):(T=document.createEvent("Event"),T.initEvent(r,!0,!0)),T.to=l||t,T.from=d||t,T.item=o||t,T.clone=a,T.oldIndex=h,T.newIndex=f,T.oldDraggableIndex=g,T.newDraggableIndex=_,T.originalEvent=p,T.pullMode=w?w.lastPutMode:void 0;var N=Wr(Wr({},C),$s.getEventProperties(r,e));for(var D in N)T[D]=N[D];t&&t.dispatchEvent(T),k[I]&&k[I].call(e,T)}}var nU=["evt"],pn=function(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o=r.evt,a=zx(r,nU);$s.pluginEvent.bind(_e)(e,t,Wr({dragEl:Z,parentEl:ft,ghostEl:we,rootEl:ct,nextEl:di,lastDownEl:dl,cloneEl:mt,cloneHidden:Lo,dragStarted:cs,putSortable:zt,activeSortable:_e.active,originalEvent:o,oldIndex:ha,oldDraggableIndex:_s,newIndex:Rn,newDraggableIndex:Do,hideGhostForTarget:fE,unhideGhostForTarget:mE,cloneNowHidden:function(){Lo=!0},cloneNowShown:function(){Lo=!1},dispatchSortableEvent:function(d){ln({sortable:t,name:d,originalEvent:o})}},a))};function ln(n){tU(Wr({putSortable:zt,cloneEl:mt,targetEl:Z,rootEl:ct,oldIndex:ha,oldDraggableIndex:_s,newIndex:Rn,newDraggableIndex:Do},n))}var Z,ft,we,ct,di,dl,mt,Lo,ha,Rn,_s,Do,Hc,zt,ia=!1,bl=!1,Il=[],si,mr,qd,jd,pv,_v,cs,Yi,vs,ys=!1,$c=!1,hl,Jt,Yd=[],Bh=!1,Sl=[],Zl=typeof document<"u",Kc=oE,vv=Hs||po?"cssFloat":"float",rU=Zl&&!qx&&!oE&&"draggable"in document.createElement("div"),uE=function(){if(Zl){if(po)return!1;var n=document.createElement("x");return n.style.cssText="pointer-events:auto",n.style.pointerEvents==="auto"}}(),dE=function(e,t){var r=pe(e),o=parseInt(r.width)-parseInt(r.paddingLeft)-parseInt(r.paddingRight)-parseInt(r.borderLeftWidth)-parseInt(r.borderRightWidth),a=ba(e,0,t),l=ba(e,1,t),d=a&&pe(a),h=l&&pe(l),f=d&&parseInt(d.marginLeft)+parseInt(d.marginRight)+Rt(a).width,g=h&&parseInt(h.marginLeft)+parseInt(h.marginRight)+Rt(l).width;if(r.display==="flex")return r.flexDirection==="column"||r.flexDirection==="column-reverse"?"vertical":"horizontal";if(r.display==="grid")return r.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(a&&d.float&&d.float!=="none"){var _=d.float==="left"?"left":"right";return l&&(h.clear==="both"||h.clear===_)?"vertical":"horizontal"}return a&&(d.display==="block"||d.display==="flex"||d.display==="table"||d.display==="grid"||f>=o&&r[vv]==="none"||l&&r[vv]==="none"&&f+g>o)?"vertical":"horizontal"},oU=function(e,t,r){var o=r?e.left:e.top,a=r?e.right:e.bottom,l=r?e.width:e.height,d=r?t.left:t.top,h=r?t.right:t.bottom,f=r?t.width:t.height;return o===d||a===h||o+l/2===d+f/2},iU=function(e,t){var r;return Il.some(function(o){var a=o[xn].options.emptyInsertThreshold;if(!(!a||xf(o))){var l=Rt(o),d=e>=l.left-a&&e<=l.right+a,h=t>=l.top-a&&t<=l.bottom+a;if(d&&h)return r=o}}),r},hE=function(e){function t(a,l){return function(d,h,f,g){var _=d.options.group.name&&h.options.group.name&&d.options.group.name===h.options.group.name;if(a==null&&(l||_))return!0;if(a==null||a===!1)return!1;if(l&&a==="clone")return a;if(typeof a=="function")return t(a(d,h,f,g),l)(d,h,f,g);var p=(l?d:h).options.group.name;return a===!0||typeof a=="string"&&a===p||a.join&&a.indexOf(p)>-1}}var r={},o=e.group;(!o||ul(o)!="object")&&(o={name:o}),r.name=o.name,r.checkPull=t(o.pull,!0),r.checkPut=t(o.put),r.revertClone=o.revertClone,e.group=r},fE=function(){!uE&&we&&pe(we,"display","none")},mE=function(){!uE&&we&&pe(we,"display","")};Zl&&document.addEventListener("click",function(n){if(bl)return n.preventDefault(),n.stopPropagation&&n.stopPropagation(),n.stopImmediatePropagation&&n.stopImmediatePropagation(),bl=!1,!1},!0);var ci=function(e){if(Z){e=e.touches?e.touches[0]:e;var t=iU(e.clientX,e.clientY);if(t){var r={};for(var o in e)e.hasOwnProperty(o)&&(r[o]=e[o]);r.target=r.rootEl=t,r.preventDefault=void 0,r.stopPropagation=void 0,t[xn]._onDragOver(r)}}},aU=function(e){Z&&Z.parentNode[xn]._isOutsideThisEl(e.target)};function _e(n,e){if(!(n&&n.nodeType&&n.nodeType===1))throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(n));this.el=n,this.options=e=mo({},e),n[xn]=this;var t={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(n.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return dE(n,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(l,d){l.setData("Text",d.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:_e.supportPointer!==!1&&"PointerEvent"in window&&!gs,emptyInsertThreshold:5};$s.initializePlugins(this,n,t);for(var r in t)!(r in e)&&(e[r]=t[r]);hE(e);for(var o in this)o.charAt(0)==="_"&&typeof this[o]=="function"&&(this[o]=this[o].bind(this));this.nativeDraggable=e.forceFallback?!1:rU,this.nativeDraggable&&(this.options.touchStartThreshold=1),e.supportPointer?Fe(n,"pointerdown",this._onTapStart):(Fe(n,"mousedown",this._onTapStart),Fe(n,"touchstart",this._onTapStart)),this.nativeDraggable&&(Fe(n,"dragover",this),Fe(n,"dragenter",this)),Il.push(this.el),e.store&&e.store.get&&this.sort(e.store.get(this)||[]),mo(this,Xx())}_e.prototype={constructor:_e,_isOutsideThisEl:function(e){!this.el.contains(e)&&e!==this.el&&(Yi=null)},_getDirection:function(e,t){return typeof this.options.direction=="function"?this.options.direction.call(this,e,t,Z):this.options.direction},_onTapStart:function(e){if(e.cancelable){var t=this,r=this.el,o=this.options,a=o.preventOnFilter,l=e.type,d=e.touches&&e.touches[0]||e.pointerType&&e.pointerType==="touch"&&e,h=(d||e).target,f=e.target.shadowRoot&&(e.path&&e.path[0]||e.composedPath&&e.composedPath()[0])||h,g=o.filter;if(mU(r),!Z&&!(/mousedown|pointerdown/.test(l)&&e.button!==0||o.disabled)&&!f.isContentEditable&&!(!this.nativeDraggable&&gs&&h&&h.tagName.toUpperCase()==="SELECT")&&(h=Lr(h,o.draggable,r,!1),!(h&&h.animated)&&dl!==h)){if(ha=rr(h),_s=rr(h,o.draggable),typeof g=="function"){if(g.call(this,e,h,this)){ln({sortable:t,rootEl:f,name:"filter",targetEl:h,toEl:r,fromEl:r}),pn("filter",t,{evt:e}),a&&e.cancelable&&e.preventDefault();return}}else if(g&&(g=g.split(",").some(function(_){if(_=Lr(f,_.trim(),r,!1),_)return ln({sortable:t,rootEl:_,name:"filter",targetEl:h,fromEl:r,toEl:r}),pn("filter",t,{evt:e}),!0}),g)){a&&e.cancelable&&e.preventDefault();return}o.handle&&!Lr(f,o.handle,r,!1)||this._prepareDragStart(e,d,h)}}},_prepareDragStart:function(e,t,r){var o=this,a=o.el,l=o.options,d=a.ownerDocument,h;if(r&&!Z&&r.parentNode===a){var f=Rt(r);if(ct=a,Z=r,ft=Z.parentNode,di=Z.nextSibling,dl=r,Hc=l.group,_e.dragged=Z,si={target:Z,clientX:(t||e).clientX,clientY:(t||e).clientY},pv=si.clientX-f.left,_v=si.clientY-f.top,this._lastX=(t||e).clientX,this._lastY=(t||e).clientY,Z.style["will-change"]="all",h=function(){if(pn("delayEnded",o,{evt:e}),_e.eventCanceled){o._onDrop();return}o._disableDelayedDragEvents(),!hv&&o.nativeDraggable&&(Z.draggable=!0),o._triggerDragStart(e,t),ln({sortable:o,name:"choose",originalEvent:e}),Nn(Z,l.chosenClass,!0)},l.ignore.split(",").forEach(function(g){aE(Z,g.trim(),Jd)}),Fe(d,"dragover",ci),Fe(d,"mousemove",ci),Fe(d,"touchmove",ci),Fe(d,"mouseup",o._onDrop),Fe(d,"touchend",o._onDrop),Fe(d,"touchcancel",o._onDrop),hv&&this.nativeDraggable&&(this.options.touchStartThreshold=4,Z.draggable=!0),pn("delayStart",this,{evt:e}),l.delay&&(!l.delayOnTouchOnly||t)&&(!this.nativeDraggable||!(Hs||po))){if(_e.eventCanceled){this._onDrop();return}Fe(d,"mouseup",o._disableDelayedDrag),Fe(d,"touchend",o._disableDelayedDrag),Fe(d,"touchcancel",o._disableDelayedDrag),Fe(d,"mousemove",o._delayedDragTouchMoveHandler),Fe(d,"touchmove",o._delayedDragTouchMoveHandler),l.supportPointer&&Fe(d,"pointermove",o._delayedDragTouchMoveHandler),o._dragStartTimer=setTimeout(h,l.delay)}else h()}},_delayedDragTouchMoveHandler:function(e){var t=e.touches?e.touches[0]:e;Math.max(Math.abs(t.clientX-this._lastX),Math.abs(t.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){Z&&Jd(Z),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var e=this.el.ownerDocument;xe(e,"mouseup",this._disableDelayedDrag),xe(e,"touchend",this._disableDelayedDrag),xe(e,"touchcancel",this._disableDelayedDrag),xe(e,"mousemove",this._delayedDragTouchMoveHandler),xe(e,"touchmove",this._delayedDragTouchMoveHandler),xe(e,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(e,t){t=t||e.pointerType=="touch"&&e,!this.nativeDraggable||t?this.options.supportPointer?Fe(document,"pointermove",this._onTouchMove):t?Fe(document,"touchmove",this._onTouchMove):Fe(document,"mousemove",this._onTouchMove):(Fe(Z,"dragend",this),Fe(ct,"dragstart",this._onDragStart));try{document.selection?fl(function(){document.selection.empty()}):window.getSelection().removeAllRanges()}catch{}},_dragStarted:function(e,t){if(ia=!1,ct&&Z){pn("dragStarted",this,{evt:t}),this.nativeDraggable&&Fe(document,"dragover",aU);var r=this.options;!e&&Nn(Z,r.dragClass,!1),Nn(Z,r.ghostClass,!0),_e.active=this,e&&this._appendGhost(),ln({sortable:this,name:"start",originalEvent:t})}else this._nulling()},_emulateDragOver:function(){if(mr){this._lastX=mr.clientX,this._lastY=mr.clientY,fE();for(var e=document.elementFromPoint(mr.clientX,mr.clientY),t=e;e&&e.shadowRoot&&(e=e.shadowRoot.elementFromPoint(mr.clientX,mr.clientY),e!==t);)t=e;if(Z.parentNode[xn]._isOutsideThisEl(e),t)do{if(t[xn]){var r=void 0;if(r=t[xn]._onDragOver({clientX:mr.clientX,clientY:mr.clientY,target:e,rootEl:t}),r&&!this.options.dragoverBubble)break}e=t}while(t=t.parentNode);mE()}},_onTouchMove:function(e){if(si){var t=this.options,r=t.fallbackTolerance,o=t.fallbackOffset,a=e.touches?e.touches[0]:e,l=we&&pa(we,!0),d=we&&l&&l.a,h=we&&l&&l.d,f=Kc&&Jt&&gv(Jt),g=(a.clientX-si.clientX+o.x)/(d||1)+(f?f[0]-Yd[0]:0)/(d||1),_=(a.clientY-si.clientY+o.y)/(h||1)+(f?f[1]-Yd[1]:0)/(h||1);if(!_e.active&&!ia){if(r&&Math.max(Math.abs(a.clientX-this._lastX),Math.abs(a.clientY-this._lastY))<r)return;this._onDragStart(e,!0)}if(we){l?(l.e+=g-(qd||0),l.f+=_-(jd||0)):l={a:1,b:0,c:0,d:1,e:g,f:_};var p="matrix(".concat(l.a,",").concat(l.b,",").concat(l.c,",").concat(l.d,",").concat(l.e,",").concat(l.f,")");pe(we,"webkitTransform",p),pe(we,"mozTransform",p),pe(we,"msTransform",p),pe(we,"transform",p),qd=g,jd=_,mr=a}e.cancelable&&e.preventDefault()}},_appendGhost:function(){if(!we){var e=this.options.fallbackOnBody?document.body:ct,t=Rt(Z,!0,Kc,!0,e),r=this.options;if(Kc){for(Jt=e;pe(Jt,"position")==="static"&&pe(Jt,"transform")==="none"&&Jt!==document;)Jt=Jt.parentNode;Jt!==document.body&&Jt!==document.documentElement?(Jt===document&&(Jt=$r()),t.top+=Jt.scrollTop,t.left+=Jt.scrollLeft):Jt=$r(),Yd=gv(Jt)}we=Z.cloneNode(!0),Nn(we,r.ghostClass,!1),Nn(we,r.fallbackClass,!0),Nn(we,r.dragClass,!0),pe(we,"transition",""),pe(we,"transform",""),pe(we,"box-sizing","border-box"),pe(we,"margin",0),pe(we,"top",t.top),pe(we,"left",t.left),pe(we,"width",t.width),pe(we,"height",t.height),pe(we,"opacity","0.8"),pe(we,"position",Kc?"absolute":"fixed"),pe(we,"zIndex","100000"),pe(we,"pointerEvents","none"),_e.ghost=we,e.appendChild(we),pe(we,"transform-origin",pv/parseInt(we.style.width)*100+"% "+_v/parseInt(we.style.height)*100+"%")}},_onDragStart:function(e,t){var r=this,o=e.dataTransfer,a=r.options;if(pn("dragStart",this,{evt:e}),_e.eventCanceled){this._onDrop();return}pn("setupClone",this),_e.eventCanceled||(mt=lE(Z),mt.draggable=!1,mt.style["will-change"]="",this._hideClone(),Nn(mt,this.options.chosenClass,!1),_e.clone=mt),r.cloneId=fl(function(){pn("clone",r),!_e.eventCanceled&&(r.options.removeCloneOnHide||ct.insertBefore(mt,Z),r._hideClone(),ln({sortable:r,name:"clone"}))}),!t&&Nn(Z,a.dragClass,!0),t?(bl=!0,r._loopId=setInterval(r._emulateDragOver,50)):(xe(document,"mouseup",r._onDrop),xe(document,"touchend",r._onDrop),xe(document,"touchcancel",r._onDrop),o&&(o.effectAllowed="move",a.setData&&a.setData.call(r,o,Z)),Fe(document,"drop",r),pe(Z,"transform","translateZ(0)")),ia=!0,r._dragStartId=fl(r._dragStarted.bind(r,t,e)),Fe(document,"selectstart",r),cs=!0,gs&&pe(document.body,"user-select","none")},_onDragOver:function(e){var t=this.el,r=e.target,o,a,l,d=this.options,h=d.group,f=_e.active,g=Hc===h,_=d.sort,p=zt||f,w,C=this,T=!1;if(Bh)return;function k(at,Et){pn(at,C,Wr({evt:e,isOwner:g,axis:w?"vertical":"horizontal",revert:l,dragRect:o,targetRect:a,canSort:_,fromSortable:p,target:r,completed:N,onMove:function(St,Yo){return Wc(ct,t,Z,o,St,Rt(St),e,Yo)},changed:D},Et))}function I(){k("dragOverAnimationCapture"),C.captureAnimationState(),C!==p&&p.captureAnimationState()}function N(at){return k("dragOverCompleted",{insertion:at}),at&&(g?f._hideClone():f._showClone(C),C!==p&&(Nn(Z,zt?zt.options.ghostClass:f.options.ghostClass,!1),Nn(Z,d.ghostClass,!0)),zt!==C&&C!==_e.active?zt=C:C===_e.active&&zt&&(zt=null),p===C&&(C._ignoreWhileAnimating=r),C.animateAll(function(){k("dragOverAnimationComplete"),C._ignoreWhileAnimating=null}),C!==p&&(p.animateAll(),p._ignoreWhileAnimating=null)),(r===Z&&!Z.animated||r===t&&!r.animated)&&(Yi=null),!d.dragoverBubble&&!e.rootEl&&r!==document&&(Z.parentNode[xn]._isOutsideThisEl(e.target),!at&&ci(e)),!d.dragoverBubble&&e.stopPropagation&&e.stopPropagation(),T=!0}function D(){Rn=rr(Z),Do=rr(Z,d.draggable),ln({sortable:C,name:"change",toEl:t,newIndex:Rn,newDraggableIndex:Do,originalEvent:e})}if(e.preventDefault!==void 0&&e.cancelable&&e.preventDefault(),r=Lr(r,d.draggable,t,!0),k("dragOver"),_e.eventCanceled)return T;if(Z.contains(e.target)||r.animated&&r.animatingX&&r.animatingY||C._ignoreWhileAnimating===r)return N(!1);if(bl=!1,f&&!d.disabled&&(g?_||(l=ft!==ct):zt===this||(this.lastPutMode=Hc.checkPull(this,f,Z,e))&&h.checkPut(this,f,Z,e))){if(w=this._getDirection(e,r)==="vertical",o=Rt(Z),k("dragOverValid"),_e.eventCanceled)return T;if(l)return ft=ct,I(),this._hideClone(),k("revert"),_e.eventCanceled||(di?ct.insertBefore(Z,di):ct.appendChild(Z)),N(!0);var L=xf(t,d.draggable);if(!L||uU(e,w,this)&&!L.animated){if(L===Z)return N(!1);if(L&&t===e.target&&(r=L),r&&(a=Rt(r)),Wc(ct,t,Z,o,r,a,e,!!r)!==!1)return I(),t.appendChild(Z),ft=t,D(),N(!0)}else if(L&&lU(e,w,this)){var K=ba(t,0,d,!0);if(K===Z)return N(!1);if(r=K,a=Rt(r),Wc(ct,t,Z,o,r,a,e,!1)!==!1)return I(),t.insertBefore(Z,K),ft=t,D(),N(!0)}else if(r.parentNode===t){a=Rt(r);var q=0,M,ce=Z.parentNode!==t,ae=!oU(Z.animated&&Z.toRect||o,r.animated&&r.toRect||a,w),X=w?"top":"left",ee=mv(r,"top","top")||mv(Z,"top","top"),ue=ee?ee.scrollTop:void 0;Yi!==r&&(M=a[X],ys=!1,$c=!ae&&d.invertSwap||ce),q=dU(e,r,a,w,ae?1:d.swapThreshold,d.invertedSwapThreshold==null?d.swapThreshold:d.invertedSwapThreshold,$c,Yi===r);var Be;if(q!==0){var Ct=rr(Z);do Ct-=q,Be=ft.children[Ct];while(Be&&(pe(Be,"display")==="none"||Be===we))}if(q===0||Be===r)return N(!1);Yi=r,vs=q;var rn=r.nextElementSibling,qt=!1;qt=q===1;var Mt=Wc(ct,t,Z,o,r,a,e,qt);if(Mt!==!1)return(Mt===1||Mt===-1)&&(qt=Mt===1),Bh=!0,setTimeout(cU,30),I(),qt&&!rn?t.appendChild(Z):r.parentNode.insertBefore(Z,qt?rn:r),ee&&cE(ee,0,ue-ee.scrollTop),ft=Z.parentNode,M!==void 0&&!$c&&(hl=Math.abs(M-Rt(r)[X])),D(),N(!0)}if(t.contains(Z))return N(!1)}return!1},_ignoreWhileAnimating:null,_offMoveEvents:function(){xe(document,"mousemove",this._onTouchMove),xe(document,"touchmove",this._onTouchMove),xe(document,"pointermove",this._onTouchMove),xe(document,"dragover",ci),xe(document,"mousemove",ci),xe(document,"touchmove",ci)},_offUpEvents:function(){var e=this.el.ownerDocument;xe(e,"mouseup",this._onDrop),xe(e,"touchend",this._onDrop),xe(e,"pointerup",this._onDrop),xe(e,"touchcancel",this._onDrop),xe(document,"selectstart",this)},_onDrop:function(e){var t=this.el,r=this.options;if(Rn=rr(Z),Do=rr(Z,r.draggable),pn("drop",this,{evt:e}),ft=Z&&Z.parentNode,Rn=rr(Z),Do=rr(Z,r.draggable),_e.eventCanceled){this._nulling();return}ia=!1,$c=!1,ys=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),Vh(this.cloneId),Vh(this._dragStartId),this.nativeDraggable&&(xe(document,"drop",this),xe(t,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),gs&&pe(document.body,"user-select",""),pe(Z,"transform",""),e&&(cs&&(e.cancelable&&e.preventDefault(),!r.dropBubble&&e.stopPropagation()),we&&we.parentNode&&we.parentNode.removeChild(we),(ct===ft||zt&&zt.lastPutMode!=="clone")&&mt&&mt.parentNode&&mt.parentNode.removeChild(mt),Z&&(this.nativeDraggable&&xe(Z,"dragend",this),Jd(Z),Z.style["will-change"]="",cs&&!ia&&Nn(Z,zt?zt.options.ghostClass:this.options.ghostClass,!1),Nn(Z,this.options.chosenClass,!1),ln({sortable:this,name:"unchoose",toEl:ft,newIndex:null,newDraggableIndex:null,originalEvent:e}),ct!==ft?(Rn>=0&&(ln({rootEl:ft,name:"add",toEl:ft,fromEl:ct,originalEvent:e}),ln({sortable:this,name:"remove",toEl:ft,originalEvent:e}),ln({rootEl:ft,name:"sort",toEl:ft,fromEl:ct,originalEvent:e}),ln({sortable:this,name:"sort",toEl:ft,originalEvent:e})),zt&&zt.save()):Rn!==ha&&Rn>=0&&(ln({sortable:this,name:"update",toEl:ft,originalEvent:e}),ln({sortable:this,name:"sort",toEl:ft,originalEvent:e})),_e.active&&((Rn==null||Rn===-1)&&(Rn=ha,Do=_s),ln({sortable:this,name:"end",toEl:ft,originalEvent:e}),this.save()))),this._nulling()},_nulling:function(){pn("nulling",this),ct=Z=ft=we=di=mt=dl=Lo=si=mr=cs=Rn=Do=ha=_s=Yi=vs=zt=Hc=_e.dragged=_e.ghost=_e.clone=_e.active=null,Sl.forEach(function(e){e.checked=!0}),Sl.length=qd=jd=0},handleEvent:function(e){switch(e.type){case"drop":case"dragend":this._onDrop(e);break;case"dragenter":case"dragover":Z&&(this._onDragOver(e),sU(e));break;case"selectstart":e.preventDefault();break}},toArray:function(){for(var e=[],t,r=this.el.children,o=0,a=r.length,l=this.options;o<a;o++)t=r[o],Lr(t,l.draggable,this.el,!1)&&e.push(t.getAttribute(l.dataIdAttr)||fU(t));return e},sort:function(e,t){var r={},o=this.el;this.toArray().forEach(function(a,l){var d=o.children[l];Lr(d,this.options.draggable,o,!1)&&(r[a]=d)},this),t&&this.captureAnimationState(),e.forEach(function(a){r[a]&&(o.removeChild(r[a]),o.appendChild(r[a]))}),t&&this.animateAll()},save:function(){var e=this.options.store;e&&e.set&&e.set(this)},closest:function(e,t){return Lr(e,t||this.options.draggable,this.el,!1)},option:function(e,t){var r=this.options;if(t===void 0)return r[e];var o=$s.modifyOption(this,e,t);typeof o<"u"?r[e]=o:r[e]=t,e==="group"&&hE(r)},destroy:function(){pn("destroy",this);var e=this.el;e[xn]=null,xe(e,"mousedown",this._onTapStart),xe(e,"touchstart",this._onTapStart),xe(e,"pointerdown",this._onTapStart),this.nativeDraggable&&(xe(e,"dragover",this),xe(e,"dragenter",this)),Array.prototype.forEach.call(e.querySelectorAll("[draggable]"),function(t){t.removeAttribute("draggable")}),this._onDrop(),this._disableDelayedDragEvents(),Il.splice(Il.indexOf(this.el),1),this.el=e=null},_hideClone:function(){if(!Lo){if(pn("hideClone",this),_e.eventCanceled)return;pe(mt,"display","none"),this.options.removeCloneOnHide&&mt.parentNode&&mt.parentNode.removeChild(mt),Lo=!0}},_showClone:function(e){if(e.lastPutMode!=="clone"){this._hideClone();return}if(Lo){if(pn("showClone",this),_e.eventCanceled)return;Z.parentNode==ct&&!this.options.group.revertClone?ct.insertBefore(mt,Z):di?ct.insertBefore(mt,di):ct.appendChild(mt),this.options.group.revertClone&&this.animate(Z,mt),pe(mt,"display",""),Lo=!1}}};function sU(n){n.dataTransfer&&(n.dataTransfer.dropEffect="move"),n.cancelable&&n.preventDefault()}function Wc(n,e,t,r,o,a,l,d){var h,f=n[xn],g=f.options.onMove,_;return window.CustomEvent&&!po&&!Hs?h=new CustomEvent("move",{bubbles:!0,cancelable:!0}):(h=document.createEvent("Event"),h.initEvent("move",!0,!0)),h.to=e,h.from=n,h.dragged=t,h.draggedRect=r,h.related=o||e,h.relatedRect=a||Rt(e),h.willInsertAfter=d,h.originalEvent=l,n.dispatchEvent(h),g&&(_=g.call(f,h,l)),_}function Jd(n){n.draggable=!1}function cU(){Bh=!1}function lU(n,e,t){var r=Rt(ba(t.el,0,t.options,!0)),o=10;return e?n.clientX<r.left-o||n.clientY<r.top&&n.clientX<r.right:n.clientY<r.top-o||n.clientY<r.bottom&&n.clientX<r.left}function uU(n,e,t){var r=Rt(xf(t.el,t.options.draggable)),o=10;return e?n.clientX>r.right+o||n.clientX<=r.right&&n.clientY>r.bottom&&n.clientX>=r.left:n.clientX>r.right&&n.clientY>r.top||n.clientX<=r.right&&n.clientY>r.bottom+o}function dU(n,e,t,r,o,a,l,d){var h=r?n.clientY:n.clientX,f=r?t.height:t.width,g=r?t.top:t.left,_=r?t.bottom:t.right,p=!1;if(!l){if(d&&hl<f*o){if(!ys&&(vs===1?h>g+f*a/2:h<_-f*a/2)&&(ys=!0),ys)p=!0;else if(vs===1?h<g+hl:h>_-hl)return-vs}else if(h>g+f*(1-o)/2&&h<_-f*(1-o)/2)return hU(e)}return p=p||l,p&&(h<g+f*a/2||h>_-f*a/2)?h>g+f/2?1:-1:0}function hU(n){return rr(Z)<rr(n)?1:-1}function fU(n){for(var e=n.tagName+n.className+n.src+n.href+n.textContent,t=e.length,r=0;t--;)r+=e.charCodeAt(t);return r.toString(36)}function mU(n){Sl.length=0;for(var e=n.getElementsByTagName("input"),t=e.length;t--;){var r=e[t];r.checked&&Sl.push(r)}}function fl(n){return setTimeout(n,0)}function Vh(n){return clearTimeout(n)}Zl&&Fe(document,"touchmove",function(n){(_e.active||ia)&&n.cancelable&&n.preventDefault()});_e.utils={on:Fe,off:xe,css:pe,find:aE,is:function(e,t){return!!Lr(e,t,e,!1)},extend:Jx,throttle:sE,closest:Lr,toggleClass:Nn,clone:lE,index:rr,nextTick:fl,cancelNextTick:Vh,detectDirection:dE,getChild:ba};_e.get=function(n){return n[xn]};_e.mount=function(){for(var n=arguments.length,e=new Array(n),t=0;t<n;t++)e[t]=arguments[t];e[0].constructor===Array&&(e=e[0]),e.forEach(function(r){if(!r.prototype||!r.prototype.constructor)throw"Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(r));r.utils&&(_e.utils=Wr(Wr({},_e.utils),r.utils)),$s.mount(r)})};_e.create=function(n,e){return new _e(n,e)};_e.version=Gx;var wt=[],ls,Fh,Hh=!1,Qd,Xd,Al,us;function gU(){function n(){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 n.prototype={dragStarted:function(t){var r=t.originalEvent;this.sortable.nativeDraggable?Fe(document,"dragover",this._handleAutoScroll):this.options.supportPointer?Fe(document,"pointermove",this._handleFallbackAutoScroll):r.touches?Fe(document,"touchmove",this._handleFallbackAutoScroll):Fe(document,"mousemove",this._handleFallbackAutoScroll)},dragOverCompleted:function(t){var r=t.originalEvent;!this.options.dragOverBubble&&!r.rootEl&&this._handleAutoScroll(r)},drop:function(){this.sortable.nativeDraggable?xe(document,"dragover",this._handleAutoScroll):(xe(document,"pointermove",this._handleFallbackAutoScroll),xe(document,"touchmove",this._handleFallbackAutoScroll),xe(document,"mousemove",this._handleFallbackAutoScroll)),yv(),ml(),Qx()},nulling:function(){Al=Fh=ls=Hh=us=Qd=Xd=null,wt.length=0},_handleFallbackAutoScroll:function(t){this._handleAutoScroll(t,!0)},_handleAutoScroll:function(t,r){var o=this,a=(t.touches?t.touches[0]:t).clientX,l=(t.touches?t.touches[0]:t).clientY,d=document.elementFromPoint(a,l);if(Al=t,r||this.options.forceAutoScrollFallback||Hs||po||gs){Zd(t,this.options,d,r);var h=Vo(d,!0);Hh&&(!us||a!==Qd||l!==Xd)&&(us&&yv(),us=setInterval(function(){var f=Vo(document.elementFromPoint(a,l),!0);f!==h&&(h=f,ml()),Zd(t,o.options,f,r)},10),Qd=a,Xd=l)}else{if(!this.options.bubbleScroll||Vo(d,!0)===$r()){ml();return}Zd(t,this.options,Vo(d,!1),!1)}}},mo(n,{pluginName:"scroll",initializeByDefault:!0})}function ml(){wt.forEach(function(n){clearInterval(n.pid)}),wt=[]}function yv(){clearInterval(us)}var Zd=sE(function(n,e,t,r){if(e.scroll){var o=(n.touches?n.touches[0]:n).clientX,a=(n.touches?n.touches[0]:n).clientY,l=e.scrollSensitivity,d=e.scrollSpeed,h=$r(),f=!1,g;Fh!==t&&(Fh=t,ml(),ls=e.scroll,g=e.scrollFn,ls===!0&&(ls=Vo(t,!0)));var _=0,p=ls;do{var w=p,C=Rt(w),T=C.top,k=C.bottom,I=C.left,N=C.right,D=C.width,L=C.height,K=void 0,q=void 0,M=w.scrollWidth,ce=w.scrollHeight,ae=pe(w),X=w.scrollLeft,ee=w.scrollTop;w===h?(K=D<M&&(ae.overflowX==="auto"||ae.overflowX==="scroll"||ae.overflowX==="visible"),q=L<ce&&(ae.overflowY==="auto"||ae.overflowY==="scroll"||ae.overflowY==="visible")):(K=D<M&&(ae.overflowX==="auto"||ae.overflowX==="scroll"),q=L<ce&&(ae.overflowY==="auto"||ae.overflowY==="scroll"));var ue=K&&(Math.abs(N-o)<=l&&X+D<M)-(Math.abs(I-o)<=l&&!!X),Be=q&&(Math.abs(k-a)<=l&&ee+L<ce)-(Math.abs(T-a)<=l&&!!ee);if(!wt[_])for(var Ct=0;Ct<=_;Ct++)wt[Ct]||(wt[Ct]={});(wt[_].vx!=ue||wt[_].vy!=Be||wt[_].el!==w)&&(wt[_].el=w,wt[_].vx=ue,wt[_].vy=Be,clearInterval(wt[_].pid),(ue!=0||Be!=0)&&(f=!0,wt[_].pid=setInterval((function(){r&&this.layer===0&&_e.active._onTouchMove(Al);var rn=wt[this.layer].vy?wt[this.layer].vy*d:0,qt=wt[this.layer].vx?wt[this.layer].vx*d:0;typeof g=="function"&&g.call(_e.dragged.parentNode[xn],qt,rn,n,Al,wt[this.layer].el)!=="continue"||cE(wt[this.layer].el,qt,rn)}).bind({layer:_}),24))),_++}while(e.bubbleScroll&&p!==h&&(p=Vo(p,!1)));Hh=f}},30),gE=function(e){var t=e.originalEvent,r=e.putSortable,o=e.dragEl,a=e.activeSortable,l=e.dispatchSortableEvent,d=e.hideGhostForTarget,h=e.unhideGhostForTarget;if(t){var f=r||a;d();var g=t.changedTouches&&t.changedTouches.length?t.changedTouches[0]:t,_=document.elementFromPoint(g.clientX,g.clientY);h(),f&&!f.el.contains(_)&&(l("spill"),this.onSpill({dragEl:o,putSortable:r}))}};function Uf(){}Uf.prototype={startIndex:null,dragStart:function(e){var t=e.oldDraggableIndex;this.startIndex=t},onSpill:function(e){var t=e.dragEl,r=e.putSortable;this.sortable.captureAnimationState(),r&&r.captureAnimationState();var o=ba(this.sortable.el,this.startIndex,this.options);o?this.sortable.el.insertBefore(t,o):this.sortable.el.appendChild(t),this.sortable.animateAll(),r&&r.animateAll()},drop:gE};mo(Uf,{pluginName:"revertOnSpill"});function Bf(){}Bf.prototype={onSpill:function(e){var t=e.dragEl,r=e.putSortable,o=r||this.sortable;o.captureAnimationState(),t.parentNode&&t.parentNode.removeChild(t),o.animateAll()},drop:gE};mo(Bf,{pluginName:"removeOnSpill"});_e.mount(new gU);_e.mount(Bf,Uf);function pU(){return typeof window<"u"?window.console:global.console}const _U=pU();function vU(n){const e=Object.create(null);return function(r){return e[r]||(e[r]=n(r))}}const yU=/-(\w)/g,Cv=vU(n=>n.replace(yU,(e,t)=>t?t.toUpperCase():""));function eh(n){n.parentElement!==null&&n.parentElement.removeChild(n)}function Ev(n,e,t){const r=t===0?n.children[0]:n.children[t-1].nextSibling;n.insertBefore(e,r)}function CU(n,e){return Object.values(n).indexOf(e)}function EU(n,e,t,r){if(!n)return[];const o=Object.values(n),a=e.length-r;return[...e].map((d,h)=>h>=a?o.length:o.indexOf(d))}function pE(n,e){this.$nextTick(()=>this.$emit(n.toLowerCase(),e))}function wU(n){return e=>{this.realList!==null&&this["onDrag"+n](e),pE.call(this,n,e)}}function TU(n){return["transition-group","TransitionGroup"].includes(n)}function bU(n){if(!n||n.length!==1)return!1;const[{type:e}]=n;return e?TU(e.name):!1}function IU(n,e){return e?{...e.props,...e.attrs}:n}const $h=["Start","Add","Remove","Update","End"],Kh=["Choose","Unchoose","Sort","Filter","Clone"],SU=["Move",...$h,...Kh].map(n=>"on"+n);let th=null;const AU={options:Object,list:{type:Array,required:!1,default:null},noTransitionOnDrag:{type:Boolean,default:!1},clone:{type:Function,default:n=>n},tag:{type:String,default:"div"},move:{type:Function,default:null},componentData:{type:Object,required:!1,default:null},component:{type:String,default:null},modelValue:{type:Array,required:!1,default:null}},kU=c.defineComponent({name:"VueDraggableNext",inheritAttrs:!1,emits:["update:modelValue","move","change",...$h.map(n=>n.toLowerCase()),...Kh.map(n=>n.toLowerCase())],props:AU,data(){return{transitionMode:!1,noneFunctionalComponentMode:!1,headerOffset:0,footerOffset:0,_sortable:{},visibleIndexes:[],context:{}}},render(){const n=this.$slots.default?this.$slots.default():null,e=IU(this.$attrs,this.componentData);return n?(this.transitionMode=bU(n),c.h(this.getTag(),e,n)):c.h(this.getTag(),e,[])},created(){this.list!==null&&this.modelValue!==null&&_U.error("list props are mutually exclusive! Please set one.")},mounted(){const n={};$h.forEach(o=>{n["on"+o]=wU.call(this,o)}),Kh.forEach(o=>{n["on"+o]=pE.bind(this,o)});const e=Object.keys(this.$attrs).reduce((o,a)=>(o[Cv(a)]=this.$attrs[a],o),{}),t=Object.assign({},e,n,{onMove:(o,a)=>this.onDragMove(o,a)});!("draggable"in t)&&(t.draggable=">*");const r=this.$el.nodeType===1?this.$el:this.$el.parentElement;this._sortable=new _e(r,t),r.__draggable_component__=this,this.computeIndexes()},beforeUnmount(){try{this._sortable!==void 0&&this._sortable.destroy()}catch{}},computed:{realList(){return this.list?this.list:this.modelValue}},watch:{$attrs:{handler(n){this.updateOptions(n)},deep:!0},realList(){this.computeIndexes()}},methods:{getTag(){return this.component?c.resolveComponent(this.component):this.tag},updateOptions(n){for(var e in n){const t=Cv(e);SU.indexOf(t)===-1&&this._sortable.option(t,n[e])}},getChildrenNodes(){return this.$el.children},computeIndexes(){this.$nextTick(()=>{this.visibleIndexes=EU(this.getChildrenNodes(),this.$el.children,this.transitionMode,this.footerOffset)})},getUnderlyingVm(n){const e=CU(this.getChildrenNodes()||[],n);if(e===-1)return null;const t=this.realList[e];return{index:e,element:t}},emitChanges(n){this.$nextTick(()=>{this.$emit("change",n)})},alterList(n){if(this.list){n(this.list);return}const e=[...this.modelValue];n(e),this.$emit("update:modelValue",e)},spliceList(){const n=e=>e.splice(...arguments);this.alterList(n)},updatePosition(n,e){const t=r=>r.splice(e,0,r.splice(n,1)[0]);this.alterList(t)},getVmIndex(n){const e=this.visibleIndexes,t=e.length;return n>t-1?t:e[n]},getComponent(){return this.$slots.default?this.$slots.default()[0].componentInstance:null},resetTransitionData(n){if(!this.noTransitionOnDrag||!this.transitionMode)return;var e=this.getChildrenNodes();e[n].data=null;const t=this.getComponent();t.children=[],t.kept=void 0},onDragStart(n){this.computeIndexes(),this.context=this.getUnderlyingVm(n.item),this.context&&(n.item._underlying_vm_=this.clone(this.context.element),th=n.item)},onDragAdd(n){const e=n.item._underlying_vm_;if(e===void 0)return;eh(n.item);const t=this.getVmIndex(n.newIndex);this.spliceList(t,0,e),this.computeIndexes();const r={element:e,newIndex:t};this.emitChanges({added:r})},onDragRemove(n){if(Ev(this.$el,n.item,n.oldIndex),n.pullMode==="clone"){eh(n.clone);return}if(!this.context)return;const e=this.context.index;this.spliceList(e,1);const t={element:this.context.element,oldIndex:e};this.resetTransitionData(e),this.emitChanges({removed:t})},onDragUpdate(n){eh(n.item),Ev(n.from,n.item,n.oldIndex);const e=this.context.index,t=this.getVmIndex(n.newIndex);this.updatePosition(e,t);const r={element:this.context.element,oldIndex:e,newIndex:t};this.emitChanges({moved:r})},updateProperty(n,e){n.hasOwnProperty(e)&&(n[e]+=this.headerOffset)},onDragMove(n,e){const t=this.move;if(!t||!this.realList)return!0;const r=this.getRelatedContextFromMoveEvent(n),o=this.context,a=this.computeFutureIndex(r,n);Object.assign(o,{futureIndex:a});const l=Object.assign({},n,{relatedContext:r,draggedContext:o});return t(l,e)},onDragEnd(){this.computeIndexes(),th=null},getTrargetedComponent(n){return n.__draggable_component__},getRelatedContextFromMoveEvent({to:n,related:e}){const t=this.getTrargetedComponent(n);if(!t)return{component:t};const r=t.realList,o={list:r,component:t};if(n!==e&&r&&t.getUnderlyingVm){const a=t.getUnderlyingVm(e);if(a)return Object.assign(a,o)}return o},computeFutureIndex(n,e){const t=[...e.to.children].filter(l=>l.style.display!=="none");if(t.length===0)return 0;const r=t.indexOf(e.related),o=n.component.getVmIndex(r);return t.indexOf(th)!==-1||!e.willInsertAfter?o:o+1}}}),NU={class:"d-flex flex-row align-center"},Vf=c.defineComponent({__name:"ColumnSettingsDialog",props:{modelValue:{},modelModifiers:{}},emits:["update:modelValue"],setup(n){const e=c.useModel(n,"modelValue"),t=c.ref(""),r=c.computed(()=>{var a;return(a=e.value)==null?void 0:a.filter(l=>l.title.toLowerCase().includes(t.value.toLowerCase()))}),{t:o}=Fn();return(a,l)=>{const d=c.resolveComponent("v-list-item-content");return c.openBlock(),c.createBlock(Vs,{"dd-id":"col-settings",buttons:!1,title:c.unref(o)("dialogs.columnSettings.title")},{default:c.withCtx(()=>[c.createVNode(Xl,{modelValue:t.value,"onUpdate:modelValue":l[0]||(l[0]=h=>t.value=h)},null,8,["modelValue"]),c.createVNode(Qt.VList,null,{default:c.withCtx(()=>[c.createVNode(c.unref(kU),{list:r.value,animation:200,"ghost-class":"ghost-card"},{default:c.withCtx(()=>[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(r.value,h=>(c.openBlock(),c.createBlock(Qt.VListItem,{key:h.key,class:"pa-0"},{default:c.withCtx(()=>[c.createElementVNode("div",NU,[c.createVNode(c.unref(fP),{class:"cursor-grab mb-2"}),c.createVNode(Qt.VListItemAction,null,{default:c.withCtx(()=>[c.createVNode(AO.VCheckbox,{modelValue:h.checked,"onUpdate:modelValue":f=>h.checked=f},null,8,["modelValue","onUpdate:modelValue"])]),_:2},1024),c.createVNode(d,null,{default:c.withCtx(()=>[c.createVNode(Qt.VListItemTitle,{class:"mb-1"},{default:c.withCtx(()=>[c.createTextVNode(c.toDisplayString(h.title)+" ",1)]),_:2},1024)]),_:2},1024),h.icon?(c.openBlock(),c.createBlock(ya.VIcon,{key:0},{default:c.withCtx(()=>[c.createTextVNode(c.toDisplayString(h.icon),1)]),_:2},1024)):c.createCommentVNode("",!0)])]),_:2},1024))),128))]),_:1},8,["list"])]),_:1})]),_:1},8,["title"])}}}),RU=["src","height","width"],OU={key:0,class:"text-center text-h6"},PU={key:1,class:"text-center text-h5"},MU={key:0,class:"text-center"},DU={class:"d-flex justify-center align-center mt-4 ga-3"},Ff=c.defineComponent({__name:"TableCard",props:{item:{},columns:{},size:{},image:{},tags:{},route:{},callback:{type:Function}},setup(n){const e=n,t=()=>{var o;return((o=e.columns.find(a=>a.isHeader))==null?void 0:o.key)||""},r=()=>{var o;return((o=e.columns.find(a=>a.isSubtitle))==null?void 0:o.key)||""};return(o,a)=>(c.openBlock(),c.createBlock(xt.VCard,{onClick:o.callback,ripple:"",class:"d-flex flex-column pa-4pa-4 bg-containerBg"},{default:c.withCtx(()=>[c.createVNode(xt.VCardActions,null,{default:c.withCtx(()=>[c.createVNode(qe.VRow,{"no-gutters":"",align:"center",justify:"end"},{default:c.withCtx(()=>[c.renderSlot(o.$slots,"actions",{item:o.item})]),_:3})]),_:3}),c.createVNode(xt.VCardTitle,null,{default:c.withCtx(()=>[c.createVNode(qe.VRow,{"no-gutters":"",align:"center",justify:"center"},{default:c.withCtx(()=>[o.image?(c.openBlock(),c.createElementBlock("img",{key:0,src:o.image,height:o.size,width:o.size,alt:""},null,8,RU)):c.createCommentVNode("",!0)]),_:1})]),_:1}),t()?(c.openBlock(),c.createElementBlock("div",OU,c.toDisplayString(o.item[t()]),1)):c.createCommentVNode("",!0),r()?(c.openBlock(),c.createElementBlock("div",PU,c.toDisplayString(o.item[r()]),1)):c.createCommentVNode("",!0),c.createVNode(Ho.VDivider,{class:"ma-3"}),c.createVNode(xt.VCardText,{class:"d-flex flex-column align-center pa-4 pt-1"},{default:c.withCtx(()=>[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(o.columns,l=>(c.openBlock(),c.createElementBlock(c.Fragment,{key:l.key},[o.item[l.key]&&!l.isHeader&&!l.isSubtitle?(c.openBlock(),c.createElementBlock("div",MU,c.toDisplayString(l.title)+": "+c.toDisplayString(o.item[l.key]),1)):c.createCommentVNode("",!0)],64))),128)),c.createElementVNode("div",DU,[o.tags?(c.openBlock(!0),c.createElementBlock(c.Fragment,{key:0},c.renderList(o.tags,l=>(c.openBlock(),c.createBlock(kO.VChip,{class:"pa-3",key:l},{default:c.withCtx(()=>[c.createTextVNode(c.toDisplayString(l),1)]),_:2},1024))),128)):c.createCommentVNode("",!0)])]),_:1})]),_:3},8,["onClick"]))}}),LU=c.defineComponent({__name:"TableCardsView",props:{data:{},columns:{},size:{},itemKey:{}},setup(n){return(e,t)=>(c.openBlock(),c.createBlock(qe.VRow,{class:"mt-5 border tb-cards-h",wrap:""},{default:c.withCtx(()=>[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(e.data,r=>(c.openBlock(),c.createBlock(qe.VCol,{cols:"12",sm:"6",md:"4",lg:"3",class:"pa-2",key:r[e.itemKey]},{default:c.withCtx(()=>[c.createVNode(Ff,{item:r,columns:e.columns,size:e.size},{actions:c.withCtx(({item:o})=>[c.renderSlot(e.$slots,"actions",{item:o},void 0,!0)]),_:2},1032,["item","columns","size"])]),_:2},1024))),128))]),_:3}))}}),_E=Si(LU,[["__scopeId","data-v-e1a4ccbc"]]),xU={key:0,class:"mb-2 ms-1"},UU=c.defineComponent({__name:"JTextField",props:c.mergeModels({name:{},label:{},type:{default:"text"},readonly:{type:Boolean},density:{},rules:{},hideDetails:{type:Boolean}},{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(n){const e=c.useModel(n,"modelValue");return(t,r)=>(c.openBlock(),c.createElementBlock("div",null,[t.name?(c.openBlock(),c.createElementBlock("p",xU,c.toDisplayString(t.name),1)):c.createCommentVNode("",!0),t.label?(c.openBlock(),c.createBlock(Ca.VLabel,{key:1,class:"text-subtitle-1 text-high-emphasis mb-2"},{default:c.withCtx(()=>[c.createTextVNode(c.toDisplayString(t.label),1)]),_:1})):c.createCommentVNode("",!0),c.createVNode(c.unref(Fo.VTextField),{variant:"solo-filled","bg-color":t.readonly?"containerBg30":"containerBg",color:"secondary",rounded:"sm",type:t.type,density:t.density,rules:t.rules,modelValue:e.value,"onUpdate:modelValue":r[0]||(r[0]=o=>e.value=o),class:"j-field",readonly:t.readonly,"hide-details":t.hideDetails},null,8,["bg-color","type","density","rules","modelValue","readonly","hide-details"])]))}}),vE=Si(UU,[["__scopeId","data-v-9f0f7687"]]);function yE(n,e){return function(){return n.apply(e,arguments)}}const{toString:BU}=Object.prototype,{getPrototypeOf:Hf}=Object,eu=(n=>e=>{const t=BU.call(e);return n[t]||(n[t]=t.slice(8,-1).toLowerCase())})(Object.create(null)),Ir=n=>(n=n.toLowerCase(),e=>eu(e)===n),tu=n=>e=>typeof e===n,{isArray:Ra}=Array,Ms=tu("undefined");function VU(n){return n!==null&&!Ms(n)&&n.constructor!==null&&!Ms(n.constructor)&&Vn(n.constructor.isBuffer)&&n.constructor.isBuffer(n)}const CE=Ir("ArrayBuffer");function FU(n){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(n):e=n&&n.buffer&&CE(n.buffer),e}const HU=tu("string"),Vn=tu("function"),EE=tu("number"),nu=n=>n!==null&&typeof n=="object",$U=n=>n===!0||n===!1,gl=n=>{if(eu(n)!=="object")return!1;const e=Hf(n);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in n)&&!(Symbol.iterator in n)},KU=Ir("Date"),WU=Ir("File"),zU=Ir("Blob"),GU=Ir("FileList"),qU=n=>nu(n)&&Vn(n.pipe),jU=n=>{let e;return n&&(typeof FormData=="function"&&n instanceof FormData||Vn(n.append)&&((e=eu(n))==="formdata"||e==="object"&&Vn(n.toString)&&n.toString()==="[object FormData]"))},YU=Ir("URLSearchParams"),[JU,QU,XU,ZU]=["ReadableStream","Request","Response","Headers"].map(Ir),eB=n=>n.trim?n.trim():n.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Ks(n,e,{allOwnKeys:t=!1}={}){if(n===null||typeof n>"u")return;let r,o;if(typeof n!="object"&&(n=[n]),Ra(n))for(r=0,o=n.length;r<o;r++)e.call(null,n[r],r,n);else{const a=t?Object.getOwnPropertyNames(n):Object.keys(n),l=a.length;let d;for(r=0;r<l;r++)d=a[r],e.call(null,n[d],d,n)}}function wE(n,e){e=e.toLowerCase();const t=Object.keys(n);let r=t.length,o;for(;r-- >0;)if(o=t[r],e===o.toLowerCase())return o;return null}const gi=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,TE=n=>!Ms(n)&&n!==gi;function Wh(){const{caseless:n}=TE(this)&&this||{},e={},t=(r,o)=>{const a=n&&wE(e,o)||o;gl(e[a])&&gl(r)?e[a]=Wh(e[a],r):gl(r)?e[a]=Wh({},r):Ra(r)?e[a]=r.slice():e[a]=r};for(let r=0,o=arguments.length;r<o;r++)arguments[r]&&Ks(arguments[r],t);return e}const tB=(n,e,t,{allOwnKeys:r}={})=>(Ks(e,(o,a)=>{t&&Vn(o)?n[a]=yE(o,t):n[a]=o},{allOwnKeys:r}),n),nB=n=>(n.charCodeAt(0)===65279&&(n=n.slice(1)),n),rB=(n,e,t,r)=>{n.prototype=Object.create(e.prototype,r),n.prototype.constructor=n,Object.defineProperty(n,"super",{value:e.prototype}),t&&Object.assign(n.prototype,t)},oB=(n,e,t,r)=>{let o,a,l;const d={};if(e=e||{},n==null)return e;do{for(o=Object.getOwnPropertyNames(n),a=o.length;a-- >0;)l=o[a],(!r||r(l,n,e))&&!d[l]&&(e[l]=n[l],d[l]=!0);n=t!==!1&&Hf(n)}while(n&&(!t||t(n,e))&&n!==Object.prototype);return e},iB=(n,e,t)=>{n=String(n),(t===void 0||t>n.length)&&(t=n.length),t-=e.length;const r=n.indexOf(e,t);return r!==-1&&r===t},aB=n=>{if(!n)return null;if(Ra(n))return n;let e=n.length;if(!EE(e))return null;const t=new Array(e);for(;e-- >0;)t[e]=n[e];return t},sB=(n=>e=>n&&e instanceof n)(typeof Uint8Array<"u"&&Hf(Uint8Array)),cB=(n,e)=>{const r=(n&&n[Symbol.iterator]).call(n);let o;for(;(o=r.next())&&!o.done;){const a=o.value;e.call(n,a[0],a[1])}},lB=(n,e)=>{let t;const r=[];for(;(t=n.exec(e))!==null;)r.push(t);return r},uB=Ir("HTMLFormElement"),dB=n=>n.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(t,r,o){return r.toUpperCase()+o}),wv=(({hasOwnProperty:n})=>(e,t)=>n.call(e,t))(Object.prototype),hB=Ir("RegExp"),bE=(n,e)=>{const t=Object.getOwnPropertyDescriptors(n),r={};Ks(t,(o,a)=>{let l;(l=e(o,a,n))!==!1&&(r[a]=l||o)}),Object.defineProperties(n,r)},fB=n=>{bE(n,(e,t)=>{if(Vn(n)&&["arguments","caller","callee"].indexOf(t)!==-1)return!1;const r=n[t];if(Vn(r)){if(e.enumerable=!1,"writable"in e){e.writable=!1;return}e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+t+"'")})}})},mB=(n,e)=>{const t={},r=o=>{o.forEach(a=>{t[a]=!0})};return Ra(n)?r(n):r(String(n).split(e)),t},gB=()=>{},pB=(n,e)=>n!=null&&Number.isFinite(n=+n)?n:e,nh="abcdefghijklmnopqrstuvwxyz",Tv="0123456789",IE={DIGIT:Tv,ALPHA:nh,ALPHA_DIGIT:nh+nh.toUpperCase()+Tv},_B=(n=16,e=IE.ALPHA_DIGIT)=>{let t="";const{length:r}=e;for(;n--;)t+=e[Math.random()*r|0];return t};function vB(n){return!!(n&&Vn(n.append)&&n[Symbol.toStringTag]==="FormData"&&n[Symbol.iterator])}const yB=n=>{const e=new Array(10),t=(r,o)=>{if(nu(r)){if(e.indexOf(r)>=0)return;if(!("toJSON"in r)){e[o]=r;const a=Ra(r)?[]:{};return Ks(r,(l,d)=>{const h=t(l,o+1);!Ms(h)&&(a[d]=h)}),e[o]=void 0,a}}return r};return t(n,0)},CB=Ir("AsyncFunction"),EB=n=>n&&(nu(n)||Vn(n))&&Vn(n.then)&&Vn(n.catch),SE=((n,e)=>n?setImmediate:e?((t,r)=>(gi.addEventListener("message",({source:o,data:a})=>{o===gi&&a===t&&r.length&&r.shift()()},!1),o=>{r.push(o),gi.postMessage(t,"*")}))(`axios@${Math.random()}`,[]):t=>setTimeout(t))(typeof setImmediate=="function",Vn(gi.postMessage)),wB=typeof queueMicrotask<"u"?queueMicrotask.bind(gi):typeof process<"u"&&process.nextTick||SE,B={isArray:Ra,isArrayBuffer:CE,isBuffer:VU,isFormData:jU,isArrayBufferView:FU,isString:HU,isNumber:EE,isBoolean:$U,isObject:nu,isPlainObject:gl,isReadableStream:JU,isRequest:QU,isResponse:XU,isHeaders:ZU,isUndefined:Ms,isDate:KU,isFile:WU,isBlob:zU,isRegExp:hB,isFunction:Vn,isStream:qU,isURLSearchParams:YU,isTypedArray:sB,isFileList:GU,forEach:Ks,merge:Wh,extend:tB,trim:eB,stripBOM:nB,inherits:rB,toFlatObject:oB,kindOf:eu,kindOfTest:Ir,endsWith:iB,toArray:aB,forEachEntry:cB,matchAll:lB,isHTMLForm:uB,hasOwnProperty:wv,hasOwnProp:wv,reduceDescriptors:bE,freezeMethods:fB,toObjectSet:mB,toCamelCase:dB,noop:gB,toFiniteNumber:pB,findKey:wE,global:gi,isContextDefined:TE,ALPHABET:IE,generateString:_B,isSpecCompliantForm:vB,toJSONObject:yB,isAsyncFn:CB,isThenable:EB,setImmediate:SE,asap:wB};function Te(n,e,t,r,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=n,this.name="AxiosError",e&&(this.code=e),t&&(this.config=t),r&&(this.request=r),o&&(this.response=o,this.status=o.status?o.status:null)}B.inherits(Te,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:B.toJSONObject(this.config),code:this.code,status:this.status}}});const AE=Te.prototype,kE={};["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(n=>{kE[n]={value:n}});Object.defineProperties(Te,kE);Object.defineProperty(AE,"isAxiosError",{value:!0});Te.from=(n,e,t,r,o,a)=>{const l=Object.create(AE);return B.toFlatObject(n,l,function(h){return h!==Error.prototype},d=>d!=="isAxiosError"),Te.call(l,n.message,e,t,r,o),l.cause=n,l.name=n.name,a&&Object.assign(l,a),l};const TB=null;function zh(n){return B.isPlainObject(n)||B.isArray(n)}function NE(n){return B.endsWith(n,"[]")?n.slice(0,-2):n}function bv(n,e,t){return n?n.concat(e).map(function(o,a){return o=NE(o),!t&&a?"["+o+"]":o}).join(t?".":""):e}function bB(n){return B.isArray(n)&&!n.some(zh)}const IB=B.toFlatObject(B,{},null,function(e){return/^is[A-Z]/.test(e)});function ru(n,e,t){if(!B.isObject(n))throw new TypeError("target must be an object");e=e||new FormData,t=B.toFlatObject(t,{metaTokens:!0,dots:!1,indexes:!1},!1,function(T,k){return!B.isUndefined(k[T])});const r=t.metaTokens,o=t.visitor||g,a=t.dots,l=t.indexes,h=(t.Blob||typeof Blob<"u"&&Blob)&&B.isSpecCompliantForm(e);if(!B.isFunction(o))throw new TypeError("visitor must be a function");function f(C){if(C===null)return"";if(B.isDate(C))return C.toISOString();if(!h&&B.isBlob(C))throw new Te("Blob is not supported. Use a Buffer instead.");return B.isArrayBuffer(C)||B.isTypedArray(C)?h&&typeof Blob=="function"?new Blob([C]):Buffer.from(C):C}function g(C,T,k){let I=C;if(C&&!k&&typeof C=="object"){if(B.endsWith(T,"{}"))T=r?T:T.slice(0,-2),C=JSON.stringify(C);else if(B.isArray(C)&&bB(C)||(B.isFileList(C)||B.endsWith(T,"[]"))&&(I=B.toArray(C)))return T=NE(T),I.forEach(function(D,L){!(B.isUndefined(D)||D===null)&&e.append(l===!0?bv([T],L,a):l===null?T:T+"[]",f(D))}),!1}return zh(C)?!0:(e.append(bv(k,T,a),f(C)),!1)}const _=[],p=Object.assign(IB,{defaultVisitor:g,convertValue:f,isVisitable:zh});function w(C,T){if(!B.isUndefined(C)){if(_.indexOf(C)!==-1)throw Error("Circular reference detected in "+T.join("."));_.push(C),B.forEach(C,function(I,N){(!(B.isUndefined(I)||I===null)&&o.call(e,I,B.isString(N)?N.trim():N,T,p))===!0&&w(I,T?T.concat(N):[N])}),_.pop()}}if(!B.isObject(n))throw new TypeError("data must be an object");return w(n),e}function Iv(n){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(n).replace(/[!'()~]|%20|%00/g,function(r){return e[r]})}function $f(n,e){this._pairs=[],n&&ru(n,this,e)}const RE=$f.prototype;RE.append=function(e,t){this._pairs.push([e,t])};RE.toString=function(e){const t=e?function(r){return e.call(this,r,Iv)}:Iv;return this._pairs.map(function(o){return t(o[0])+"="+t(o[1])},"").join("&")};function SB(n){return encodeURIComponent(n).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function OE(n,e,t){if(!e)return n;const r=t&&t.encode||SB;B.isFunction(t)&&(t={serialize:t});const o=t&&t.serialize;let a;if(o?a=o(e,t):a=B.isURLSearchParams(e)?e.toString():new $f(e,t).toString(r),a){const l=n.indexOf("#");l!==-1&&(n=n.slice(0,l)),n+=(n.indexOf("?")===-1?"?":"&")+a}return n}class Sv{constructor(){this.handlers=[]}use(e,t,r){return this.handlers.push({fulfilled:e,rejected:t,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){B.forEach(this.handlers,function(r){r!==null&&e(r)})}}const PE={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},AB=typeof URLSearchParams<"u"?URLSearchParams:$f,kB=typeof FormData<"u"?FormData:null,NB=typeof Blob<"u"?Blob:null,RB={isBrowser:!0,classes:{URLSearchParams:AB,FormData:kB,Blob:NB},protocols:["http","https","file","blob","url","data"]},Kf=typeof window<"u"&&typeof document<"u",Gh=typeof navigator=="object"&&navigator||void 0,OB=Kf&&(!Gh||["ReactNative","NativeScript","NS"].indexOf(Gh.product)<0),PB=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",MB=Kf&&window.location.href||"http://localhost",DB=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Kf,hasStandardBrowserEnv:OB,hasStandardBrowserWebWorkerEnv:PB,navigator:Gh,origin:MB},Symbol.toStringTag,{value:"Module"})),nn={...DB,...RB};function LB(n,e){return ru(n,new nn.classes.URLSearchParams,Object.assign({visitor:function(t,r,o,a){return nn.isNode&&B.isBuffer(t)?(this.append(r,t.toString("base64")),!1):a.defaultVisitor.apply(this,arguments)}},e))}function xB(n){return B.matchAll(/\w+|\[(\w*)]/g,n).map(e=>e[0]==="[]"?"":e[1]||e[0])}function UB(n){const e={},t=Object.keys(n);let r;const o=t.length;let a;for(r=0;r<o;r++)a=t[r],e[a]=n[a];return e}function ME(n){function e(t,r,o,a){let l=t[a++];if(l==="__proto__")return!0;const d=Number.isFinite(+l),h=a>=t.length;return l=!l&&B.isArray(o)?o.length:l,h?(B.hasOwnProp(o,l)?o[l]=[o[l],r]:o[l]=r,!d):((!o[l]||!B.isObject(o[l]))&&(o[l]=[]),e(t,r,o[l],a)&&B.isArray(o[l])&&(o[l]=UB(o[l])),!d)}if(B.isFormData(n)&&B.isFunction(n.entries)){const t={};return B.forEachEntry(n,(r,o)=>{e(xB(r),o,t,0)}),t}return null}function BB(n,e,t){if(B.isString(n))try{return(e||JSON.parse)(n),B.trim(n)}catch(r){if(r.name!=="SyntaxError")throw r}return(0,JSON.stringify)(n)}const Ws={transitional:PE,adapter:["xhr","http","fetch"],transformRequest:[function(e,t){const r=t.getContentType()||"",o=r.indexOf("application/json")>-1,a=B.isObject(e);if(a&&B.isHTMLForm(e)&&(e=new FormData(e)),B.isFormData(e))return o?JSON.stringify(ME(e)):e;if(B.isArrayBuffer(e)||B.isBuffer(e)||B.isStream(e)||B.isFile(e)||B.isBlob(e)||B.isReadableStream(e))return e;if(B.isArrayBufferView(e))return e.buffer;if(B.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let d;if(a){if(r.indexOf("application/x-www-form-urlencoded")>-1)return LB(e,this.formSerializer).toString();if((d=B.isFileList(e))||r.indexOf("multipart/form-data")>-1){const h=this.env&&this.env.FormData;return ru(d?{"files[]":e}:e,h&&new h,this.formSerializer)}}return a||o?(t.setContentType("application/json",!1),BB(e)):e}],transformResponse:[function(e){const t=this.transitional||Ws.transitional,r=t&&t.forcedJSONParsing,o=this.responseType==="json";if(B.isResponse(e)||B.isReadableStream(e))return e;if(e&&B.isString(e)&&(r&&!this.responseType||o)){const l=!(t&&t.silentJSONParsing)&&o;try{return JSON.parse(e)}catch(d){if(l)throw d.name==="SyntaxError"?Te.from(d,Te.ERR_BAD_RESPONSE,this,null,this.response):d}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:nn.classes.FormData,Blob:nn.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};B.forEach(["delete","get","head","post","put","patch"],n=>{Ws.headers[n]={}});const VB=B.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"]),FB=n=>{const e={};let t,r,o;return n&&n.split(`
|
42
|
-
`).forEach(function(l){o=l.indexOf(":"),t=l.substring(0,o).trim().toLowerCase(),r=l.substring(o+1).trim(),!(!t||e[t]&&
|
43
|
-
`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){const r=new this(e);return t.forEach(o=>r.set(o)),r}static accessor(e){const r=(this[Av]=this[Av]={accessors:{}}).accessors,o=this.prototype;function a(l){const d=as(l);r[d]||(WB(o,l),r[d]=!0)}return B.isArray(e)?e.forEach(a):a(e),this}}yn.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);B.reduceDescriptors(yn.prototype,({value:n},e)=>{let t=e[0].toUpperCase()+e.slice(1);return{get:()=>n,set(r){this[t]=r}}});B.freezeMethods(yn);function oh(n,e){const t=this||Ws,r=e||t,o=yn.from(r.headers);let a=r.data;return B.forEach(n,function(d){a=d.call(t,a,o.normalize(),e?e.status:void 0)}),o.normalize(),a}function DE(n){return!!(n&&n.__CANCEL__)}function Oa(n,e,t){Te.call(this,n??"canceled",Te.ERR_CANCELED,e,t),this.name="CanceledError"}B.inherits(Oa,Te,{__CANCEL__:!0});function LE(n,e,t){const r=t.config.validateStatus;!t.status||!r||r(t.status)?n(t):e(new Te("Request failed with status code "+t.status,[Te.ERR_BAD_REQUEST,Te.ERR_BAD_RESPONSE][Math.floor(t.status/100)-4],t.config,t.request,t))}function zB(n){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(n);return e&&e[1]||""}function GB(n,e){n=n||10;const t=new Array(n),r=new Array(n);let o=0,a=0,l;return e=e!==void 0?e:1e3,function(h){const f=Date.now(),g=r[a];l||(l=f),t[o]=h,r[o]=f;let _=a,p=0;for(;_!==o;)p+=t[_++],_=_%n;if(o=(o+1)%n,o===a&&(a=(a+1)%n),f-l<e)return;const w=g&&f-g;return w?Math.round(p*1e3/w):void 0}}function qB(n,e){let t=0,r=1e3/e,o,a;const l=(f,g=Date.now())=>{t=g,o=null,a&&(clearTimeout(a),a=null),n.apply(null,f)};return[(...f)=>{const g=Date.now(),_=g-t;_>=r?l(f,g):(o=f,a||(a=setTimeout(()=>{a=null,l(o)},r-_)))},()=>o&&l(o)]}const kl=(n,e,t=3)=>{let r=0;const o=GB(50,250);return qB(a=>{const l=a.loaded,d=a.lengthComputable?a.total:void 0,h=l-r,f=o(h),g=l<=d;r=l;const _={loaded:l,total:d,progress:d?l/d:void 0,bytes:h,rate:f||void 0,estimated:f&&d&&g?(d-l)/f:void 0,event:a,lengthComputable:d!=null,[e?"download":"upload"]:!0};n(_)},t)},kv=(n,e)=>{const t=n!=null;return[r=>e[0]({lengthComputable:t,total:n,loaded:r}),e[1]]},Nv=n=>(...e)=>B.asap(()=>n(...e)),jB=nn.hasStandardBrowserEnv?((n,e)=>t=>(t=new URL(t,nn.origin),n.protocol===t.protocol&&n.host===t.host&&(e||n.port===t.port)))(new URL(nn.origin),nn.navigator&&/(msie|trident)/i.test(nn.navigator.userAgent)):()=>!0,YB=nn.hasStandardBrowserEnv?{write(n,e,t,r,o,a){const l=[n+"="+encodeURIComponent(e)];B.isNumber(t)&&l.push("expires="+new Date(t).toGMTString()),B.isString(r)&&l.push("path="+r),B.isString(o)&&l.push("domain="+o),a===!0&&l.push("secure"),document.cookie=l.join("; ")},read(n){const e=document.cookie.match(new RegExp("(^|;\\s*)("+n+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove(n){this.write(n,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function JB(n){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(n)}function QB(n,e){return e?n.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):n}function xE(n,e){return n&&!JB(e)?QB(n,e):e}const Rv=n=>n instanceof yn?{...n}:n;function Ei(n,e){e=e||{};const t={};function r(f,g,_,p){return B.isPlainObject(f)&&B.isPlainObject(g)?B.merge.call({caseless:p},f,g):B.isPlainObject(g)?B.merge({},g):B.isArray(g)?g.slice():g}function o(f,g,_,p){if(B.isUndefined(g)){if(!B.isUndefined(f))return r(void 0,f,_,p)}else return r(f,g,_,p)}function a(f,g){if(!B.isUndefined(g))return r(void 0,g)}function l(f,g){if(B.isUndefined(g)){if(!B.isUndefined(f))return r(void 0,f)}else return r(void 0,g)}function d(f,g,_){if(_ in e)return r(f,g);if(_ in n)return r(void 0,f)}const h={url:a,method:a,data:a,baseURL:l,transformRequest:l,transformResponse:l,paramsSerializer:l,timeout:l,timeoutMessage:l,withCredentials:l,withXSRFToken:l,adapter:l,responseType:l,xsrfCookieName:l,xsrfHeaderName:l,onUploadProgress:l,onDownloadProgress:l,decompress:l,maxContentLength:l,maxBodyLength:l,beforeRedirect:l,transport:l,httpAgent:l,httpsAgent:l,cancelToken:l,socketPath:l,responseEncoding:l,validateStatus:d,headers:(f,g,_)=>o(Rv(f),Rv(g),_,!0)};return B.forEach(Object.keys(Object.assign({},n,e)),function(g){const _=h[g]||o,p=_(n[g],e[g],g);B.isUndefined(p)&&_!==d||(t[g]=p)}),t}const UE=n=>{const e=Ei({},n);let{data:t,withXSRFToken:r,xsrfHeaderName:o,xsrfCookieName:a,headers:l,auth:d}=e;e.headers=l=yn.from(l),e.url=OE(xE(e.baseURL,e.url),n.params,n.paramsSerializer),d&&l.set("Authorization","Basic "+btoa((d.username||"")+":"+(d.password?unescape(encodeURIComponent(d.password)):"")));let h;if(B.isFormData(t)){if(nn.hasStandardBrowserEnv||nn.hasStandardBrowserWebWorkerEnv)l.setContentType(void 0);else if((h=l.getContentType())!==!1){const[f,...g]=h?h.split(";").map(_=>_.trim()).filter(Boolean):[];l.setContentType([f||"multipart/form-data",...g].join("; "))}}if(nn.hasStandardBrowserEnv&&(r&&B.isFunction(r)&&(r=r(e)),r||r!==!1&&jB(e.url))){const f=o&&a&&YB.read(a);f&&l.set(o,f)}return e},XB=typeof XMLHttpRequest<"u",ZB=XB&&function(n){return new Promise(function(t,r){const o=UE(n);let a=o.data;const l=yn.from(o.headers).normalize();let{responseType:d,onUploadProgress:h,onDownloadProgress:f}=o,g,_,p,w,C;function T(){w&&w(),C&&C(),o.cancelToken&&o.cancelToken.unsubscribe(g),o.signal&&o.signal.removeEventListener("abort",g)}let k=new XMLHttpRequest;k.open(o.method.toUpperCase(),o.url,!0),k.timeout=o.timeout;function I(){if(!k)return;const D=yn.from("getAllResponseHeaders"in k&&k.getAllResponseHeaders()),K={data:!d||d==="text"||d==="json"?k.responseText:k.response,status:k.status,statusText:k.statusText,headers:D,config:n,request:k};LE(function(M){t(M),T()},function(M){r(M),T()},K),k=null}"onloadend"in k?k.onloadend=I:k.onreadystatechange=function(){!k||k.readyState!==4||k.status===0&&!(k.responseURL&&k.responseURL.indexOf("file:")===0)||setTimeout(I)},k.onabort=function(){k&&(r(new Te("Request aborted",Te.ECONNABORTED,n,k)),k=null)},k.onerror=function(){r(new Te("Network Error",Te.ERR_NETWORK,n,k)),k=null},k.ontimeout=function(){let L=o.timeout?"timeout of "+o.timeout+"ms exceeded":"timeout exceeded";const K=o.transitional||PE;o.timeoutErrorMessage&&(L=o.timeoutErrorMessage),r(new Te(L,K.clarifyTimeoutError?Te.ETIMEDOUT:Te.ECONNABORTED,n,k)),k=null},a===void 0&&l.setContentType(null),"setRequestHeader"in k&&B.forEach(l.toJSON(),function(L,K){k.setRequestHeader(K,L)}),B.isUndefined(o.withCredentials)||(k.withCredentials=!!o.withCredentials),d&&d!=="json"&&(k.responseType=o.responseType),f&&([p,C]=kl(f,!0),k.addEventListener("progress",p)),h&&k.upload&&([_,w]=kl(h),k.upload.addEventListener("progress",_),k.upload.addEventListener("loadend",w)),(o.cancelToken||o.signal)&&(g=D=>{k&&(r(!D||D.type?new Oa(null,n,k):D),k.abort(),k=null)},o.cancelToken&&o.cancelToken.subscribe(g),o.signal&&(o.signal.aborted?g():o.signal.addEventListener("abort",g)));const N=zB(o.url);if(N&&nn.protocols.indexOf(N)===-1){r(new Te("Unsupported protocol "+N+":",Te.ERR_BAD_REQUEST,n));return}k.send(a||null)})},eV=(n,e)=>{const{length:t}=n=n?n.filter(Boolean):[];if(e||t){let r=new AbortController,o;const a=function(f){if(!o){o=!0,d();const g=f instanceof Error?f:this.reason;r.abort(g instanceof Te?g:new Oa(g instanceof Error?g.message:g))}};let l=e&&setTimeout(()=>{l=null,a(new Te(`timeout ${e} of ms exceeded`,Te.ETIMEDOUT))},e);const d=()=>{n&&(l&&clearTimeout(l),l=null,n.forEach(f=>{f.unsubscribe?f.unsubscribe(a):f.removeEventListener("abort",a)}),n=null)};n.forEach(f=>f.addEventListener("abort",a));const{signal:h}=r;return h.unsubscribe=()=>B.asap(d),h}},tV=function*(n,e){let t=n.byteLength;if(t<e){yield n;return}let r=0,o;for(;r<t;)o=r+e,yield n.slice(r,o),r=o},nV=async function*(n,e){for await(const t of rV(n))yield*tV(t,e)},rV=async function*(n){if(n[Symbol.asyncIterator]){yield*n;return}const e=n.getReader();try{for(;;){const{done:t,value:r}=await e.read();if(t)break;yield r}}finally{await e.cancel()}},Ov=(n,e,t,r)=>{const o=nV(n,e);let a=0,l,d=h=>{l||(l=!0,r&&r(h))};return new ReadableStream({async pull(h){try{const{done:f,value:g}=await o.next();if(f){d(),h.close();return}let _=g.byteLength;if(t){let p=a+=_;t(p)}h.enqueue(new Uint8Array(g))}catch(f){throw d(f),f}},cancel(h){return d(h),o.return()}},{highWaterMark:2})},ou=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",BE=ou&&typeof ReadableStream=="function",oV=ou&&(typeof TextEncoder=="function"?(n=>e=>n.encode(e))(new TextEncoder):async n=>new Uint8Array(await new Response(n).arrayBuffer())),VE=(n,...e)=>{try{return!!n(...e)}catch{return!1}},iV=BE&&VE(()=>{let n=!1;const e=new Request(nn.origin,{body:new ReadableStream,method:"POST",get duplex(){return n=!0,"half"}}).headers.has("Content-Type");return n&&!e}),Pv=64*1024,qh=BE&&VE(()=>B.isReadableStream(new Response("").body)),Nl={stream:qh&&(n=>n.body)};ou&&(n=>{["text","arrayBuffer","blob","formData","stream"].forEach(e=>{!Nl[e]&&(Nl[e]=B.isFunction(n[e])?t=>t[e]():(t,r)=>{throw new Te(`Response type '${e}' is not supported`,Te.ERR_NOT_SUPPORT,r)})})})(new Response);const aV=async n=>{if(n==null)return 0;if(B.isBlob(n))return n.size;if(B.isSpecCompliantForm(n))return(await new Request(nn.origin,{method:"POST",body:n}).arrayBuffer()).byteLength;if(B.isArrayBufferView(n)||B.isArrayBuffer(n))return n.byteLength;if(B.isURLSearchParams(n)&&(n=n+""),B.isString(n))return(await oV(n)).byteLength},sV=async(n,e)=>{const t=B.toFiniteNumber(n.getContentLength());return t??aV(e)},cV=ou&&(async n=>{let{url:e,method:t,data:r,signal:o,cancelToken:a,timeout:l,onDownloadProgress:d,onUploadProgress:h,responseType:f,headers:g,withCredentials:_="same-origin",fetchOptions:p}=UE(n);f=f?(f+"").toLowerCase():"text";let w=eV([o,a&&a.toAbortSignal()],l),C;const T=w&&w.unsubscribe&&(()=>{w.unsubscribe()});let k;try{if(h&&iV&&t!=="get"&&t!=="head"&&(k=await sV(g,r))!==0){let K=new Request(e,{method:"POST",body:r,duplex:"half"}),q;if(B.isFormData(r)&&(q=K.headers.get("content-type"))&&g.setContentType(q),K.body){const[M,ce]=kv(k,kl(Nv(h)));r=Ov(K.body,Pv,M,ce)}}B.isString(_)||(_=_?"include":"omit");const I="credentials"in Request.prototype;C=new Request(e,{...p,signal:w,method:t.toUpperCase(),headers:g.normalize().toJSON(),body:r,duplex:"half",credentials:I?_:void 0});let N=await fetch(C);const D=qh&&(f==="stream"||f==="response");if(qh&&(d||D&&T)){const K={};["status","statusText","headers"].forEach(ae=>{K[ae]=N[ae]});const q=B.toFiniteNumber(N.headers.get("content-length")),[M,ce]=d&&kv(q,kl(Nv(d),!0))||[];N=new Response(Ov(N.body,Pv,M,()=>{ce&&ce(),T&&T()}),K)}f=f||"text";let L=await Nl[B.findKey(Nl,f)||"text"](N,n);return!D&&T&&T(),await new Promise((K,q)=>{LE(K,q,{data:L,headers:yn.from(N.headers),status:N.status,statusText:N.statusText,config:n,request:C})})}catch(I){throw T&&T(),I&&I.name==="TypeError"&&/fetch/i.test(I.message)?Object.assign(new Te("Network Error",Te.ERR_NETWORK,n,C),{cause:I.cause||I}):Te.from(I,I&&I.code,n,C)}}),jh={http:TB,xhr:ZB,fetch:cV};B.forEach(jh,(n,e)=>{if(n){try{Object.defineProperty(n,"name",{value:e})}catch{}Object.defineProperty(n,"adapterName",{value:e})}});const Mv=n=>`- ${n}`,lV=n=>B.isFunction(n)||n===null||n===!1,FE={getAdapter:n=>{n=B.isArray(n)?n:[n];const{length:e}=n;let t,r;const o={};for(let a=0;a<e;a++){t=n[a];let l;if(r=t,!lV(t)&&(r=jh[(l=String(t)).toLowerCase()],r===void 0))throw new Te(`Unknown adapter '${l}'`);if(r)break;o[l||"#"+a]=r}if(!r){const a=Object.entries(o).map(([d,h])=>`adapter ${d} `+(h===!1?"is not supported by the environment":"is not available in the build"));let l=e?a.length>1?`since :
|
41
|
+
*/function dv(n,e){var t=Object.keys(n);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(n);e&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(n,o).enumerable})),t.push.apply(t,r)}return t}function Wr(n){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?dv(Object(t),!0).forEach(function(r){Wx(n,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(t)):dv(Object(t)).forEach(function(r){Object.defineProperty(n,r,Object.getOwnPropertyDescriptor(t,r))})}return n}function ul(n){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?ul=function(e){return typeof e}:ul=function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ul(n)}function Wx(n,e,t){return e in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}function go(){return go=Object.assign||function(n){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r])}return n},go.apply(this,arguments)}function zx(n,e){if(n==null)return{};var t={},r=Object.keys(n),o,a;for(a=0;a<r.length;a++)o=r[a],!(e.indexOf(o)>=0)&&(t[o]=n[o]);return t}function Gx(n,e){if(n==null)return{};var t=zx(n,e),r,o;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(n);for(o=0;o<a.length;o++)r=a[o],!(e.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(n,r)&&(t[r]=n[r])}return t}var qx="1.14.0";function fo(n){if(typeof window<"u"&&window.navigator)return!!navigator.userAgent.match(n)}var _o=fo(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),Hs=fo(/Edge/i),hv=fo(/firefox/i),gs=fo(/safari/i)&&!fo(/chrome/i)&&!fo(/android/i),oE=fo(/iP(ad|od|hone)/i),jx=fo(/chrome/i)&&fo(/android/i),iE={capture:!1,passive:!1};function Fe(n,e,t){n.addEventListener(e,t,!_o&&iE)}function xe(n,e,t){n.removeEventListener(e,t,!_o&&iE)}function Tl(n,e){if(e){if(e[0]===">"&&(e=e.substring(1)),n)try{if(n.matches)return n.matches(e);if(n.msMatchesSelector)return n.msMatchesSelector(e);if(n.webkitMatchesSelector)return n.webkitMatchesSelector(e)}catch{return!1}return!1}}function Yx(n){return n.host&&n!==document&&n.host.nodeType?n.host:n.parentNode}function Lr(n,e,t,r){if(n){t=t||document;do{if(e!=null&&(e[0]===">"?n.parentNode===t&&Tl(n,e):Tl(n,e))||r&&n===t)return n;if(n===t)break}while(n=Yx(n))}return null}var fv=/\s+/g;function Nn(n,e,t){if(n&&e)if(n.classList)n.classList[t?"add":"remove"](e);else{var r=(" "+n.className+" ").replace(fv," ").replace(" "+e+" "," ");n.className=(r+(t?" "+e:"")).replace(fv," ")}}function pe(n,e,t){var r=n&&n.style;if(r){if(t===void 0)return document.defaultView&&document.defaultView.getComputedStyle?t=document.defaultView.getComputedStyle(n,""):n.currentStyle&&(t=n.currentStyle),e===void 0?t:t[e];!(e in r)&&e.indexOf("webkit")===-1&&(e="-webkit-"+e),r[e]=t+(typeof t=="string"?"":"px")}}function _a(n,e){var t="";if(typeof n=="string")t=n;else do{var r=pe(n,"transform");r&&r!=="none"&&(t=r+" "+t)}while(!e&&(n=n.parentNode));var o=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return o&&new o(t)}function aE(n,e,t){if(n){var r=n.getElementsByTagName(e),o=0,a=r.length;if(t)for(;o<a;o++)t(r[o],o);return r}return[]}function $r(){var n=document.scrollingElement;return n||document.documentElement}function Rt(n,e,t,r,o){if(!(!n.getBoundingClientRect&&n!==window)){var a,l,d,h,f,g,_;if(n!==window&&n.parentNode&&n!==$r()?(a=n.getBoundingClientRect(),l=a.top,d=a.left,h=a.bottom,f=a.right,g=a.height,_=a.width):(l=0,d=0,h=window.innerHeight,f=window.innerWidth,g=window.innerHeight,_=window.innerWidth),(e||t)&&n!==window&&(o=o||n.parentNode,!_o))do if(o&&o.getBoundingClientRect&&(pe(o,"transform")!=="none"||t&&pe(o,"position")!=="static")){var p=o.getBoundingClientRect();l-=p.top+parseInt(pe(o,"border-top-width")),d-=p.left+parseInt(pe(o,"border-left-width")),h=l+a.height,f=d+a.width;break}while(o=o.parentNode);if(r&&n!==window){var w=_a(o||n),C=w&&w.a,T=w&&w.d;w&&(l/=T,d/=C,_/=C,g/=T,h=l+g,f=d+_)}return{top:l,left:d,bottom:h,right:f,width:_,height:g}}}function mv(n,e,t){for(var r=Fo(n,!0),o=Rt(n)[e];r;){var a=Rt(r)[t],l=void 0;if(l=o>=a,!l)return r;if(r===$r())break;r=Fo(r,!1)}return!1}function ba(n,e,t,r){for(var o=0,a=0,l=n.children;a<l.length;){if(l[a].style.display!=="none"&&l[a]!==_e.ghost&&(r||l[a]!==_e.dragged)&&Lr(l[a],t.draggable,n,!1)){if(o===e)return l[a];o++}a++}return null}function xf(n,e){for(var t=n.lastElementChild;t&&(t===_e.ghost||pe(t,"display")==="none"||e&&!Tl(t,e));)t=t.previousElementSibling;return t||null}function rr(n,e){var t=0;if(!n||!n.parentNode)return-1;for(;n=n.previousElementSibling;)n.nodeName.toUpperCase()!=="TEMPLATE"&&n!==_e.clone&&(!e||Tl(n,e))&&t++;return t}function gv(n){var e=0,t=0,r=$r();if(n)do{var o=_a(n),a=o.a,l=o.d;e+=n.scrollLeft*a,t+=n.scrollTop*l}while(n!==r&&(n=n.parentNode));return[e,t]}function Jx(n,e){for(var t in n)if(n.hasOwnProperty(t)){for(var r in e)if(e.hasOwnProperty(r)&&e[r]===n[t][r])return Number(t)}return-1}function Fo(n,e){if(!n||!n.getBoundingClientRect)return $r();var t=n,r=!1;do if(t.clientWidth<t.scrollWidth||t.clientHeight<t.scrollHeight){var o=pe(t);if(t.clientWidth<t.scrollWidth&&(o.overflowX=="auto"||o.overflowX=="scroll")||t.clientHeight<t.scrollHeight&&(o.overflowY=="auto"||o.overflowY=="scroll")){if(!t.getBoundingClientRect||t===document.body)return $r();if(r||e)return t;r=!0}}while(t=t.parentNode);return $r()}function Qx(n,e){if(n&&e)for(var t in e)e.hasOwnProperty(t)&&(n[t]=e[t]);return n}function zd(n,e){return Math.round(n.top)===Math.round(e.top)&&Math.round(n.left)===Math.round(e.left)&&Math.round(n.height)===Math.round(e.height)&&Math.round(n.width)===Math.round(e.width)}var ps;function sE(n,e){return function(){if(!ps){var t=arguments,r=this;t.length===1?n.call(r,t[0]):n.apply(r,t),ps=setTimeout(function(){ps=void 0},e)}}}function Xx(){clearTimeout(ps),ps=void 0}function cE(n,e,t){n.scrollLeft+=e,n.scrollTop+=t}function lE(n){var e=window.Polymer,t=window.jQuery||window.Zepto;return e&&e.dom?e.dom(n).cloneNode(!0):t?t(n).clone(!0)[0]:n.cloneNode(!0)}var xn="Sortable"+new Date().getTime();function Zx(){var n=[],e;return{captureAnimationState:function(){if(n=[],!!this.options.animation){var r=[].slice.call(this.el.children);r.forEach(function(o){if(!(pe(o,"display")==="none"||o===_e.ghost)){n.push({target:o,rect:Rt(o)});var a=Wr({},n[n.length-1].rect);if(o.thisAnimationDuration){var l=_a(o,!0);l&&(a.top-=l.f,a.left-=l.e)}o.fromRect=a}})}},addAnimationState:function(r){n.push(r)},removeAnimationState:function(r){n.splice(Jx(n,{target:r}),1)},animateAll:function(r){var o=this;if(!this.options.animation){clearTimeout(e),typeof r=="function"&&r();return}var a=!1,l=0;n.forEach(function(d){var h=0,f=d.target,g=f.fromRect,_=Rt(f),p=f.prevFromRect,w=f.prevToRect,C=d.rect,T=_a(f,!0);T&&(_.top-=T.f,_.left-=T.e),f.toRect=_,f.thisAnimationDuration&&zd(p,_)&&!zd(g,_)&&(C.top-_.top)/(C.left-_.left)===(g.top-_.top)/(g.left-_.left)&&(h=tU(C,p,w,o.options)),zd(_,g)||(f.prevFromRect=g,f.prevToRect=_,h||(h=o.options.animation),o.animate(f,C,_,h)),h&&(a=!0,l=Math.max(l,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),a?e=setTimeout(function(){typeof r=="function"&&r()},l):typeof r=="function"&&r(),n=[]},animate:function(r,o,a,l){if(l){pe(r,"transition",""),pe(r,"transform","");var d=_a(this.el),h=d&&d.a,f=d&&d.d,g=(o.left-a.left)/(h||1),_=(o.top-a.top)/(f||1);r.animatingX=!!g,r.animatingY=!!_,pe(r,"transform","translate3d("+g+"px,"+_+"px,0)"),this.forRepaintDummy=eU(r),pe(r,"transition","transform "+l+"ms"+(this.options.easing?" "+this.options.easing:"")),pe(r,"transform","translate3d(0,0,0)"),typeof r.animated=="number"&&clearTimeout(r.animated),r.animated=setTimeout(function(){pe(r,"transition",""),pe(r,"transform",""),r.animated=!1,r.animatingX=!1,r.animatingY=!1},l)}}}}function eU(n){return n.offsetWidth}function tU(n,e,t,r){return Math.sqrt(Math.pow(e.top-n.top,2)+Math.pow(e.left-n.left,2))/Math.sqrt(Math.pow(e.top-t.top,2)+Math.pow(e.left-t.left,2))*r.animation}var Yi=[],Gd={initializeByDefault:!0},$s={mount:function(e){for(var t in Gd)Gd.hasOwnProperty(t)&&!(t in e)&&(e[t]=Gd[t]);Yi.forEach(function(r){if(r.pluginName===e.pluginName)throw"Sortable: Cannot mount plugin ".concat(e.pluginName," more than once")}),Yi.push(e)},pluginEvent:function(e,t,r){var o=this;this.eventCanceled=!1,r.cancel=function(){o.eventCanceled=!0};var a=e+"Global";Yi.forEach(function(l){t[l.pluginName]&&(t[l.pluginName][a]&&t[l.pluginName][a](Wr({sortable:t},r)),t.options[l.pluginName]&&t[l.pluginName][e]&&t[l.pluginName][e](Wr({sortable:t},r)))})},initializePlugins:function(e,t,r,o){Yi.forEach(function(d){var h=d.pluginName;if(!(!e.options[h]&&!d.initializeByDefault)){var f=new d(e,t,e.options);f.sortable=e,f.options=e.options,e[h]=f,go(r,f.defaults)}});for(var a in e.options)if(e.options.hasOwnProperty(a)){var l=this.modifyOption(e,a,e.options[a]);typeof l<"u"&&(e.options[a]=l)}},getEventProperties:function(e,t){var r={};return Yi.forEach(function(o){typeof o.eventProperties=="function"&&go(r,o.eventProperties.call(t[o.pluginName],e))}),r},modifyOption:function(e,t,r){var o;return Yi.forEach(function(a){e[a.pluginName]&&a.optionListeners&&typeof a.optionListeners[t]=="function"&&(o=a.optionListeners[t].call(e[a.pluginName],r))}),o}};function nU(n){var e=n.sortable,t=n.rootEl,r=n.name,o=n.targetEl,a=n.cloneEl,l=n.toEl,d=n.fromEl,h=n.oldIndex,f=n.newIndex,g=n.oldDraggableIndex,_=n.newDraggableIndex,p=n.originalEvent,w=n.putSortable,C=n.extraEventProperties;if(e=e||t&&t[xn],!!e){var T,k=e.options,S="on"+r.charAt(0).toUpperCase()+r.substr(1);window.CustomEvent&&!_o&&!Hs?T=new CustomEvent(r,{bubbles:!0,cancelable:!0}):(T=document.createEvent("Event"),T.initEvent(r,!0,!0)),T.to=l||t,T.from=d||t,T.item=o||t,T.clone=a,T.oldIndex=h,T.newIndex=f,T.oldDraggableIndex=g,T.newDraggableIndex=_,T.originalEvent=p,T.pullMode=w?w.lastPutMode:void 0;var N=Wr(Wr({},C),$s.getEventProperties(r,e));for(var D in N)T[D]=N[D];t&&t.dispatchEvent(T),k[S]&&k[S].call(e,T)}}var rU=["evt"],pn=function(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o=r.evt,a=Gx(r,rU);$s.pluginEvent.bind(_e)(e,t,Wr({dragEl:Z,parentEl:ft,ghostEl:we,rootEl:ct,nextEl:hi,lastDownEl:dl,cloneEl:mt,cloneHidden:xo,dragStarted:cs,putSortable:zt,activeSortable:_e.active,originalEvent:o,oldIndex:fa,oldDraggableIndex:_s,newIndex:Rn,newDraggableIndex:Lo,hideGhostForTarget:fE,unhideGhostForTarget:mE,cloneNowHidden:function(){xo=!0},cloneNowShown:function(){xo=!1},dispatchSortableEvent:function(d){ln({sortable:t,name:d,originalEvent:o})}},a))};function ln(n){nU(Wr({putSortable:zt,cloneEl:mt,targetEl:Z,rootEl:ct,oldIndex:fa,oldDraggableIndex:_s,newIndex:Rn,newDraggableIndex:Lo},n))}var Z,ft,we,ct,hi,dl,mt,xo,fa,Rn,_s,Lo,Hc,zt,aa=!1,bl=!1,Sl=[],ci,mr,qd,jd,pv,_v,cs,Ji,vs,ys=!1,$c=!1,hl,Jt,Yd=[],Bh=!1,Il=[],Zl=typeof document<"u",Kc=oE,vv=Hs||_o?"cssFloat":"float",oU=Zl&&!jx&&!oE&&"draggable"in document.createElement("div"),uE=function(){if(Zl){if(_o)return!1;var n=document.createElement("x");return n.style.cssText="pointer-events:auto",n.style.pointerEvents==="auto"}}(),dE=function(e,t){var r=pe(e),o=parseInt(r.width)-parseInt(r.paddingLeft)-parseInt(r.paddingRight)-parseInt(r.borderLeftWidth)-parseInt(r.borderRightWidth),a=ba(e,0,t),l=ba(e,1,t),d=a&&pe(a),h=l&&pe(l),f=d&&parseInt(d.marginLeft)+parseInt(d.marginRight)+Rt(a).width,g=h&&parseInt(h.marginLeft)+parseInt(h.marginRight)+Rt(l).width;if(r.display==="flex")return r.flexDirection==="column"||r.flexDirection==="column-reverse"?"vertical":"horizontal";if(r.display==="grid")return r.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(a&&d.float&&d.float!=="none"){var _=d.float==="left"?"left":"right";return l&&(h.clear==="both"||h.clear===_)?"vertical":"horizontal"}return a&&(d.display==="block"||d.display==="flex"||d.display==="table"||d.display==="grid"||f>=o&&r[vv]==="none"||l&&r[vv]==="none"&&f+g>o)?"vertical":"horizontal"},iU=function(e,t,r){var o=r?e.left:e.top,a=r?e.right:e.bottom,l=r?e.width:e.height,d=r?t.left:t.top,h=r?t.right:t.bottom,f=r?t.width:t.height;return o===d||a===h||o+l/2===d+f/2},aU=function(e,t){var r;return Sl.some(function(o){var a=o[xn].options.emptyInsertThreshold;if(!(!a||xf(o))){var l=Rt(o),d=e>=l.left-a&&e<=l.right+a,h=t>=l.top-a&&t<=l.bottom+a;if(d&&h)return r=o}}),r},hE=function(e){function t(a,l){return function(d,h,f,g){var _=d.options.group.name&&h.options.group.name&&d.options.group.name===h.options.group.name;if(a==null&&(l||_))return!0;if(a==null||a===!1)return!1;if(l&&a==="clone")return a;if(typeof a=="function")return t(a(d,h,f,g),l)(d,h,f,g);var p=(l?d:h).options.group.name;return a===!0||typeof a=="string"&&a===p||a.join&&a.indexOf(p)>-1}}var r={},o=e.group;(!o||ul(o)!="object")&&(o={name:o}),r.name=o.name,r.checkPull=t(o.pull,!0),r.checkPut=t(o.put),r.revertClone=o.revertClone,e.group=r},fE=function(){!uE&&we&&pe(we,"display","none")},mE=function(){!uE&&we&&pe(we,"display","")};Zl&&document.addEventListener("click",function(n){if(bl)return n.preventDefault(),n.stopPropagation&&n.stopPropagation(),n.stopImmediatePropagation&&n.stopImmediatePropagation(),bl=!1,!1},!0);var li=function(e){if(Z){e=e.touches?e.touches[0]:e;var t=aU(e.clientX,e.clientY);if(t){var r={};for(var o in e)e.hasOwnProperty(o)&&(r[o]=e[o]);r.target=r.rootEl=t,r.preventDefault=void 0,r.stopPropagation=void 0,t[xn]._onDragOver(r)}}},sU=function(e){Z&&Z.parentNode[xn]._isOutsideThisEl(e.target)};function _e(n,e){if(!(n&&n.nodeType&&n.nodeType===1))throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(n));this.el=n,this.options=e=go({},e),n[xn]=this;var t={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(n.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return dE(n,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(l,d){l.setData("Text",d.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:_e.supportPointer!==!1&&"PointerEvent"in window&&!gs,emptyInsertThreshold:5};$s.initializePlugins(this,n,t);for(var r in t)!(r in e)&&(e[r]=t[r]);hE(e);for(var o in this)o.charAt(0)==="_"&&typeof this[o]=="function"&&(this[o]=this[o].bind(this));this.nativeDraggable=e.forceFallback?!1:oU,this.nativeDraggable&&(this.options.touchStartThreshold=1),e.supportPointer?Fe(n,"pointerdown",this._onTapStart):(Fe(n,"mousedown",this._onTapStart),Fe(n,"touchstart",this._onTapStart)),this.nativeDraggable&&(Fe(n,"dragover",this),Fe(n,"dragenter",this)),Sl.push(this.el),e.store&&e.store.get&&this.sort(e.store.get(this)||[]),go(this,Zx())}_e.prototype={constructor:_e,_isOutsideThisEl:function(e){!this.el.contains(e)&&e!==this.el&&(Ji=null)},_getDirection:function(e,t){return typeof this.options.direction=="function"?this.options.direction.call(this,e,t,Z):this.options.direction},_onTapStart:function(e){if(e.cancelable){var t=this,r=this.el,o=this.options,a=o.preventOnFilter,l=e.type,d=e.touches&&e.touches[0]||e.pointerType&&e.pointerType==="touch"&&e,h=(d||e).target,f=e.target.shadowRoot&&(e.path&&e.path[0]||e.composedPath&&e.composedPath()[0])||h,g=o.filter;if(gU(r),!Z&&!(/mousedown|pointerdown/.test(l)&&e.button!==0||o.disabled)&&!f.isContentEditable&&!(!this.nativeDraggable&&gs&&h&&h.tagName.toUpperCase()==="SELECT")&&(h=Lr(h,o.draggable,r,!1),!(h&&h.animated)&&dl!==h)){if(fa=rr(h),_s=rr(h,o.draggable),typeof g=="function"){if(g.call(this,e,h,this)){ln({sortable:t,rootEl:f,name:"filter",targetEl:h,toEl:r,fromEl:r}),pn("filter",t,{evt:e}),a&&e.cancelable&&e.preventDefault();return}}else if(g&&(g=g.split(",").some(function(_){if(_=Lr(f,_.trim(),r,!1),_)return ln({sortable:t,rootEl:_,name:"filter",targetEl:h,fromEl:r,toEl:r}),pn("filter",t,{evt:e}),!0}),g)){a&&e.cancelable&&e.preventDefault();return}o.handle&&!Lr(f,o.handle,r,!1)||this._prepareDragStart(e,d,h)}}},_prepareDragStart:function(e,t,r){var o=this,a=o.el,l=o.options,d=a.ownerDocument,h;if(r&&!Z&&r.parentNode===a){var f=Rt(r);if(ct=a,Z=r,ft=Z.parentNode,hi=Z.nextSibling,dl=r,Hc=l.group,_e.dragged=Z,ci={target:Z,clientX:(t||e).clientX,clientY:(t||e).clientY},pv=ci.clientX-f.left,_v=ci.clientY-f.top,this._lastX=(t||e).clientX,this._lastY=(t||e).clientY,Z.style["will-change"]="all",h=function(){if(pn("delayEnded",o,{evt:e}),_e.eventCanceled){o._onDrop();return}o._disableDelayedDragEvents(),!hv&&o.nativeDraggable&&(Z.draggable=!0),o._triggerDragStart(e,t),ln({sortable:o,name:"choose",originalEvent:e}),Nn(Z,l.chosenClass,!0)},l.ignore.split(",").forEach(function(g){aE(Z,g.trim(),Jd)}),Fe(d,"dragover",li),Fe(d,"mousemove",li),Fe(d,"touchmove",li),Fe(d,"mouseup",o._onDrop),Fe(d,"touchend",o._onDrop),Fe(d,"touchcancel",o._onDrop),hv&&this.nativeDraggable&&(this.options.touchStartThreshold=4,Z.draggable=!0),pn("delayStart",this,{evt:e}),l.delay&&(!l.delayOnTouchOnly||t)&&(!this.nativeDraggable||!(Hs||_o))){if(_e.eventCanceled){this._onDrop();return}Fe(d,"mouseup",o._disableDelayedDrag),Fe(d,"touchend",o._disableDelayedDrag),Fe(d,"touchcancel",o._disableDelayedDrag),Fe(d,"mousemove",o._delayedDragTouchMoveHandler),Fe(d,"touchmove",o._delayedDragTouchMoveHandler),l.supportPointer&&Fe(d,"pointermove",o._delayedDragTouchMoveHandler),o._dragStartTimer=setTimeout(h,l.delay)}else h()}},_delayedDragTouchMoveHandler:function(e){var t=e.touches?e.touches[0]:e;Math.max(Math.abs(t.clientX-this._lastX),Math.abs(t.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){Z&&Jd(Z),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var e=this.el.ownerDocument;xe(e,"mouseup",this._disableDelayedDrag),xe(e,"touchend",this._disableDelayedDrag),xe(e,"touchcancel",this._disableDelayedDrag),xe(e,"mousemove",this._delayedDragTouchMoveHandler),xe(e,"touchmove",this._delayedDragTouchMoveHandler),xe(e,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(e,t){t=t||e.pointerType=="touch"&&e,!this.nativeDraggable||t?this.options.supportPointer?Fe(document,"pointermove",this._onTouchMove):t?Fe(document,"touchmove",this._onTouchMove):Fe(document,"mousemove",this._onTouchMove):(Fe(Z,"dragend",this),Fe(ct,"dragstart",this._onDragStart));try{document.selection?fl(function(){document.selection.empty()}):window.getSelection().removeAllRanges()}catch{}},_dragStarted:function(e,t){if(aa=!1,ct&&Z){pn("dragStarted",this,{evt:t}),this.nativeDraggable&&Fe(document,"dragover",sU);var r=this.options;!e&&Nn(Z,r.dragClass,!1),Nn(Z,r.ghostClass,!0),_e.active=this,e&&this._appendGhost(),ln({sortable:this,name:"start",originalEvent:t})}else this._nulling()},_emulateDragOver:function(){if(mr){this._lastX=mr.clientX,this._lastY=mr.clientY,fE();for(var e=document.elementFromPoint(mr.clientX,mr.clientY),t=e;e&&e.shadowRoot&&(e=e.shadowRoot.elementFromPoint(mr.clientX,mr.clientY),e!==t);)t=e;if(Z.parentNode[xn]._isOutsideThisEl(e),t)do{if(t[xn]){var r=void 0;if(r=t[xn]._onDragOver({clientX:mr.clientX,clientY:mr.clientY,target:e,rootEl:t}),r&&!this.options.dragoverBubble)break}e=t}while(t=t.parentNode);mE()}},_onTouchMove:function(e){if(ci){var t=this.options,r=t.fallbackTolerance,o=t.fallbackOffset,a=e.touches?e.touches[0]:e,l=we&&_a(we,!0),d=we&&l&&l.a,h=we&&l&&l.d,f=Kc&&Jt&&gv(Jt),g=(a.clientX-ci.clientX+o.x)/(d||1)+(f?f[0]-Yd[0]:0)/(d||1),_=(a.clientY-ci.clientY+o.y)/(h||1)+(f?f[1]-Yd[1]:0)/(h||1);if(!_e.active&&!aa){if(r&&Math.max(Math.abs(a.clientX-this._lastX),Math.abs(a.clientY-this._lastY))<r)return;this._onDragStart(e,!0)}if(we){l?(l.e+=g-(qd||0),l.f+=_-(jd||0)):l={a:1,b:0,c:0,d:1,e:g,f:_};var p="matrix(".concat(l.a,",").concat(l.b,",").concat(l.c,",").concat(l.d,",").concat(l.e,",").concat(l.f,")");pe(we,"webkitTransform",p),pe(we,"mozTransform",p),pe(we,"msTransform",p),pe(we,"transform",p),qd=g,jd=_,mr=a}e.cancelable&&e.preventDefault()}},_appendGhost:function(){if(!we){var e=this.options.fallbackOnBody?document.body:ct,t=Rt(Z,!0,Kc,!0,e),r=this.options;if(Kc){for(Jt=e;pe(Jt,"position")==="static"&&pe(Jt,"transform")==="none"&&Jt!==document;)Jt=Jt.parentNode;Jt!==document.body&&Jt!==document.documentElement?(Jt===document&&(Jt=$r()),t.top+=Jt.scrollTop,t.left+=Jt.scrollLeft):Jt=$r(),Yd=gv(Jt)}we=Z.cloneNode(!0),Nn(we,r.ghostClass,!1),Nn(we,r.fallbackClass,!0),Nn(we,r.dragClass,!0),pe(we,"transition",""),pe(we,"transform",""),pe(we,"box-sizing","border-box"),pe(we,"margin",0),pe(we,"top",t.top),pe(we,"left",t.left),pe(we,"width",t.width),pe(we,"height",t.height),pe(we,"opacity","0.8"),pe(we,"position",Kc?"absolute":"fixed"),pe(we,"zIndex","100000"),pe(we,"pointerEvents","none"),_e.ghost=we,e.appendChild(we),pe(we,"transform-origin",pv/parseInt(we.style.width)*100+"% "+_v/parseInt(we.style.height)*100+"%")}},_onDragStart:function(e,t){var r=this,o=e.dataTransfer,a=r.options;if(pn("dragStart",this,{evt:e}),_e.eventCanceled){this._onDrop();return}pn("setupClone",this),_e.eventCanceled||(mt=lE(Z),mt.draggable=!1,mt.style["will-change"]="",this._hideClone(),Nn(mt,this.options.chosenClass,!1),_e.clone=mt),r.cloneId=fl(function(){pn("clone",r),!_e.eventCanceled&&(r.options.removeCloneOnHide||ct.insertBefore(mt,Z),r._hideClone(),ln({sortable:r,name:"clone"}))}),!t&&Nn(Z,a.dragClass,!0),t?(bl=!0,r._loopId=setInterval(r._emulateDragOver,50)):(xe(document,"mouseup",r._onDrop),xe(document,"touchend",r._onDrop),xe(document,"touchcancel",r._onDrop),o&&(o.effectAllowed="move",a.setData&&a.setData.call(r,o,Z)),Fe(document,"drop",r),pe(Z,"transform","translateZ(0)")),aa=!0,r._dragStartId=fl(r._dragStarted.bind(r,t,e)),Fe(document,"selectstart",r),cs=!0,gs&&pe(document.body,"user-select","none")},_onDragOver:function(e){var t=this.el,r=e.target,o,a,l,d=this.options,h=d.group,f=_e.active,g=Hc===h,_=d.sort,p=zt||f,w,C=this,T=!1;if(Bh)return;function k(at,Et){pn(at,C,Wr({evt:e,isOwner:g,axis:w?"vertical":"horizontal",revert:l,dragRect:o,targetRect:a,canSort:_,fromSortable:p,target:r,completed:N,onMove:function(It,Jo){return Wc(ct,t,Z,o,It,Rt(It),e,Jo)},changed:D},Et))}function S(){k("dragOverAnimationCapture"),C.captureAnimationState(),C!==p&&p.captureAnimationState()}function N(at){return k("dragOverCompleted",{insertion:at}),at&&(g?f._hideClone():f._showClone(C),C!==p&&(Nn(Z,zt?zt.options.ghostClass:f.options.ghostClass,!1),Nn(Z,d.ghostClass,!0)),zt!==C&&C!==_e.active?zt=C:C===_e.active&&zt&&(zt=null),p===C&&(C._ignoreWhileAnimating=r),C.animateAll(function(){k("dragOverAnimationComplete"),C._ignoreWhileAnimating=null}),C!==p&&(p.animateAll(),p._ignoreWhileAnimating=null)),(r===Z&&!Z.animated||r===t&&!r.animated)&&(Ji=null),!d.dragoverBubble&&!e.rootEl&&r!==document&&(Z.parentNode[xn]._isOutsideThisEl(e.target),!at&&li(e)),!d.dragoverBubble&&e.stopPropagation&&e.stopPropagation(),T=!0}function D(){Rn=rr(Z),Lo=rr(Z,d.draggable),ln({sortable:C,name:"change",toEl:t,newIndex:Rn,newDraggableIndex:Lo,originalEvent:e})}if(e.preventDefault!==void 0&&e.cancelable&&e.preventDefault(),r=Lr(r,d.draggable,t,!0),k("dragOver"),_e.eventCanceled)return T;if(Z.contains(e.target)||r.animated&&r.animatingX&&r.animatingY||C._ignoreWhileAnimating===r)return N(!1);if(bl=!1,f&&!d.disabled&&(g?_||(l=ft!==ct):zt===this||(this.lastPutMode=Hc.checkPull(this,f,Z,e))&&h.checkPut(this,f,Z,e))){if(w=this._getDirection(e,r)==="vertical",o=Rt(Z),k("dragOverValid"),_e.eventCanceled)return T;if(l)return ft=ct,S(),this._hideClone(),k("revert"),_e.eventCanceled||(hi?ct.insertBefore(Z,hi):ct.appendChild(Z)),N(!0);var L=xf(t,d.draggable);if(!L||dU(e,w,this)&&!L.animated){if(L===Z)return N(!1);if(L&&t===e.target&&(r=L),r&&(a=Rt(r)),Wc(ct,t,Z,o,r,a,e,!!r)!==!1)return S(),t.appendChild(Z),ft=t,D(),N(!0)}else if(L&&uU(e,w,this)){var K=ba(t,0,d,!0);if(K===Z)return N(!1);if(r=K,a=Rt(r),Wc(ct,t,Z,o,r,a,e,!1)!==!1)return S(),t.insertBefore(Z,K),ft=t,D(),N(!0)}else if(r.parentNode===t){a=Rt(r);var q=0,M,ce=Z.parentNode!==t,ae=!iU(Z.animated&&Z.toRect||o,r.animated&&r.toRect||a,w),X=w?"top":"left",ee=mv(r,"top","top")||mv(Z,"top","top"),ue=ee?ee.scrollTop:void 0;Ji!==r&&(M=a[X],ys=!1,$c=!ae&&d.invertSwap||ce),q=hU(e,r,a,w,ae?1:d.swapThreshold,d.invertedSwapThreshold==null?d.swapThreshold:d.invertedSwapThreshold,$c,Ji===r);var Be;if(q!==0){var Ct=rr(Z);do Ct-=q,Be=ft.children[Ct];while(Be&&(pe(Be,"display")==="none"||Be===we))}if(q===0||Be===r)return N(!1);Ji=r,vs=q;var rn=r.nextElementSibling,qt=!1;qt=q===1;var Mt=Wc(ct,t,Z,o,r,a,e,qt);if(Mt!==!1)return(Mt===1||Mt===-1)&&(qt=Mt===1),Bh=!0,setTimeout(lU,30),S(),qt&&!rn?t.appendChild(Z):r.parentNode.insertBefore(Z,qt?rn:r),ee&&cE(ee,0,ue-ee.scrollTop),ft=Z.parentNode,M!==void 0&&!$c&&(hl=Math.abs(M-Rt(r)[X])),D(),N(!0)}if(t.contains(Z))return N(!1)}return!1},_ignoreWhileAnimating:null,_offMoveEvents:function(){xe(document,"mousemove",this._onTouchMove),xe(document,"touchmove",this._onTouchMove),xe(document,"pointermove",this._onTouchMove),xe(document,"dragover",li),xe(document,"mousemove",li),xe(document,"touchmove",li)},_offUpEvents:function(){var e=this.el.ownerDocument;xe(e,"mouseup",this._onDrop),xe(e,"touchend",this._onDrop),xe(e,"pointerup",this._onDrop),xe(e,"touchcancel",this._onDrop),xe(document,"selectstart",this)},_onDrop:function(e){var t=this.el,r=this.options;if(Rn=rr(Z),Lo=rr(Z,r.draggable),pn("drop",this,{evt:e}),ft=Z&&Z.parentNode,Rn=rr(Z),Lo=rr(Z,r.draggable),_e.eventCanceled){this._nulling();return}aa=!1,$c=!1,ys=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),Vh(this.cloneId),Vh(this._dragStartId),this.nativeDraggable&&(xe(document,"drop",this),xe(t,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),gs&&pe(document.body,"user-select",""),pe(Z,"transform",""),e&&(cs&&(e.cancelable&&e.preventDefault(),!r.dropBubble&&e.stopPropagation()),we&&we.parentNode&&we.parentNode.removeChild(we),(ct===ft||zt&&zt.lastPutMode!=="clone")&&mt&&mt.parentNode&&mt.parentNode.removeChild(mt),Z&&(this.nativeDraggable&&xe(Z,"dragend",this),Jd(Z),Z.style["will-change"]="",cs&&!aa&&Nn(Z,zt?zt.options.ghostClass:this.options.ghostClass,!1),Nn(Z,this.options.chosenClass,!1),ln({sortable:this,name:"unchoose",toEl:ft,newIndex:null,newDraggableIndex:null,originalEvent:e}),ct!==ft?(Rn>=0&&(ln({rootEl:ft,name:"add",toEl:ft,fromEl:ct,originalEvent:e}),ln({sortable:this,name:"remove",toEl:ft,originalEvent:e}),ln({rootEl:ft,name:"sort",toEl:ft,fromEl:ct,originalEvent:e}),ln({sortable:this,name:"sort",toEl:ft,originalEvent:e})),zt&&zt.save()):Rn!==fa&&Rn>=0&&(ln({sortable:this,name:"update",toEl:ft,originalEvent:e}),ln({sortable:this,name:"sort",toEl:ft,originalEvent:e})),_e.active&&((Rn==null||Rn===-1)&&(Rn=fa,Lo=_s),ln({sortable:this,name:"end",toEl:ft,originalEvent:e}),this.save()))),this._nulling()},_nulling:function(){pn("nulling",this),ct=Z=ft=we=hi=mt=dl=xo=ci=mr=cs=Rn=Lo=fa=_s=Ji=vs=zt=Hc=_e.dragged=_e.ghost=_e.clone=_e.active=null,Il.forEach(function(e){e.checked=!0}),Il.length=qd=jd=0},handleEvent:function(e){switch(e.type){case"drop":case"dragend":this._onDrop(e);break;case"dragenter":case"dragover":Z&&(this._onDragOver(e),cU(e));break;case"selectstart":e.preventDefault();break}},toArray:function(){for(var e=[],t,r=this.el.children,o=0,a=r.length,l=this.options;o<a;o++)t=r[o],Lr(t,l.draggable,this.el,!1)&&e.push(t.getAttribute(l.dataIdAttr)||mU(t));return e},sort:function(e,t){var r={},o=this.el;this.toArray().forEach(function(a,l){var d=o.children[l];Lr(d,this.options.draggable,o,!1)&&(r[a]=d)},this),t&&this.captureAnimationState(),e.forEach(function(a){r[a]&&(o.removeChild(r[a]),o.appendChild(r[a]))}),t&&this.animateAll()},save:function(){var e=this.options.store;e&&e.set&&e.set(this)},closest:function(e,t){return Lr(e,t||this.options.draggable,this.el,!1)},option:function(e,t){var r=this.options;if(t===void 0)return r[e];var o=$s.modifyOption(this,e,t);typeof o<"u"?r[e]=o:r[e]=t,e==="group"&&hE(r)},destroy:function(){pn("destroy",this);var e=this.el;e[xn]=null,xe(e,"mousedown",this._onTapStart),xe(e,"touchstart",this._onTapStart),xe(e,"pointerdown",this._onTapStart),this.nativeDraggable&&(xe(e,"dragover",this),xe(e,"dragenter",this)),Array.prototype.forEach.call(e.querySelectorAll("[draggable]"),function(t){t.removeAttribute("draggable")}),this._onDrop(),this._disableDelayedDragEvents(),Sl.splice(Sl.indexOf(this.el),1),this.el=e=null},_hideClone:function(){if(!xo){if(pn("hideClone",this),_e.eventCanceled)return;pe(mt,"display","none"),this.options.removeCloneOnHide&&mt.parentNode&&mt.parentNode.removeChild(mt),xo=!0}},_showClone:function(e){if(e.lastPutMode!=="clone"){this._hideClone();return}if(xo){if(pn("showClone",this),_e.eventCanceled)return;Z.parentNode==ct&&!this.options.group.revertClone?ct.insertBefore(mt,Z):hi?ct.insertBefore(mt,hi):ct.appendChild(mt),this.options.group.revertClone&&this.animate(Z,mt),pe(mt,"display",""),xo=!1}}};function cU(n){n.dataTransfer&&(n.dataTransfer.dropEffect="move"),n.cancelable&&n.preventDefault()}function Wc(n,e,t,r,o,a,l,d){var h,f=n[xn],g=f.options.onMove,_;return window.CustomEvent&&!_o&&!Hs?h=new CustomEvent("move",{bubbles:!0,cancelable:!0}):(h=document.createEvent("Event"),h.initEvent("move",!0,!0)),h.to=e,h.from=n,h.dragged=t,h.draggedRect=r,h.related=o||e,h.relatedRect=a||Rt(e),h.willInsertAfter=d,h.originalEvent=l,n.dispatchEvent(h),g&&(_=g.call(f,h,l)),_}function Jd(n){n.draggable=!1}function lU(){Bh=!1}function uU(n,e,t){var r=Rt(ba(t.el,0,t.options,!0)),o=10;return e?n.clientX<r.left-o||n.clientY<r.top&&n.clientX<r.right:n.clientY<r.top-o||n.clientY<r.bottom&&n.clientX<r.left}function dU(n,e,t){var r=Rt(xf(t.el,t.options.draggable)),o=10;return e?n.clientX>r.right+o||n.clientX<=r.right&&n.clientY>r.bottom&&n.clientX>=r.left:n.clientX>r.right&&n.clientY>r.top||n.clientX<=r.right&&n.clientY>r.bottom+o}function hU(n,e,t,r,o,a,l,d){var h=r?n.clientY:n.clientX,f=r?t.height:t.width,g=r?t.top:t.left,_=r?t.bottom:t.right,p=!1;if(!l){if(d&&hl<f*o){if(!ys&&(vs===1?h>g+f*a/2:h<_-f*a/2)&&(ys=!0),ys)p=!0;else if(vs===1?h<g+hl:h>_-hl)return-vs}else if(h>g+f*(1-o)/2&&h<_-f*(1-o)/2)return fU(e)}return p=p||l,p&&(h<g+f*a/2||h>_-f*a/2)?h>g+f/2?1:-1:0}function fU(n){return rr(Z)<rr(n)?1:-1}function mU(n){for(var e=n.tagName+n.className+n.src+n.href+n.textContent,t=e.length,r=0;t--;)r+=e.charCodeAt(t);return r.toString(36)}function gU(n){Il.length=0;for(var e=n.getElementsByTagName("input"),t=e.length;t--;){var r=e[t];r.checked&&Il.push(r)}}function fl(n){return setTimeout(n,0)}function Vh(n){return clearTimeout(n)}Zl&&Fe(document,"touchmove",function(n){(_e.active||aa)&&n.cancelable&&n.preventDefault()});_e.utils={on:Fe,off:xe,css:pe,find:aE,is:function(e,t){return!!Lr(e,t,e,!1)},extend:Qx,throttle:sE,closest:Lr,toggleClass:Nn,clone:lE,index:rr,nextTick:fl,cancelNextTick:Vh,detectDirection:dE,getChild:ba};_e.get=function(n){return n[xn]};_e.mount=function(){for(var n=arguments.length,e=new Array(n),t=0;t<n;t++)e[t]=arguments[t];e[0].constructor===Array&&(e=e[0]),e.forEach(function(r){if(!r.prototype||!r.prototype.constructor)throw"Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(r));r.utils&&(_e.utils=Wr(Wr({},_e.utils),r.utils)),$s.mount(r)})};_e.create=function(n,e){return new _e(n,e)};_e.version=qx;var wt=[],ls,Fh,Hh=!1,Qd,Xd,Al,us;function pU(){function n(){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 n.prototype={dragStarted:function(t){var r=t.originalEvent;this.sortable.nativeDraggable?Fe(document,"dragover",this._handleAutoScroll):this.options.supportPointer?Fe(document,"pointermove",this._handleFallbackAutoScroll):r.touches?Fe(document,"touchmove",this._handleFallbackAutoScroll):Fe(document,"mousemove",this._handleFallbackAutoScroll)},dragOverCompleted:function(t){var r=t.originalEvent;!this.options.dragOverBubble&&!r.rootEl&&this._handleAutoScroll(r)},drop:function(){this.sortable.nativeDraggable?xe(document,"dragover",this._handleAutoScroll):(xe(document,"pointermove",this._handleFallbackAutoScroll),xe(document,"touchmove",this._handleFallbackAutoScroll),xe(document,"mousemove",this._handleFallbackAutoScroll)),yv(),ml(),Xx()},nulling:function(){Al=Fh=ls=Hh=us=Qd=Xd=null,wt.length=0},_handleFallbackAutoScroll:function(t){this._handleAutoScroll(t,!0)},_handleAutoScroll:function(t,r){var o=this,a=(t.touches?t.touches[0]:t).clientX,l=(t.touches?t.touches[0]:t).clientY,d=document.elementFromPoint(a,l);if(Al=t,r||this.options.forceAutoScrollFallback||Hs||_o||gs){Zd(t,this.options,d,r);var h=Fo(d,!0);Hh&&(!us||a!==Qd||l!==Xd)&&(us&&yv(),us=setInterval(function(){var f=Fo(document.elementFromPoint(a,l),!0);f!==h&&(h=f,ml()),Zd(t,o.options,f,r)},10),Qd=a,Xd=l)}else{if(!this.options.bubbleScroll||Fo(d,!0)===$r()){ml();return}Zd(t,this.options,Fo(d,!1),!1)}}},go(n,{pluginName:"scroll",initializeByDefault:!0})}function ml(){wt.forEach(function(n){clearInterval(n.pid)}),wt=[]}function yv(){clearInterval(us)}var Zd=sE(function(n,e,t,r){if(e.scroll){var o=(n.touches?n.touches[0]:n).clientX,a=(n.touches?n.touches[0]:n).clientY,l=e.scrollSensitivity,d=e.scrollSpeed,h=$r(),f=!1,g;Fh!==t&&(Fh=t,ml(),ls=e.scroll,g=e.scrollFn,ls===!0&&(ls=Fo(t,!0)));var _=0,p=ls;do{var w=p,C=Rt(w),T=C.top,k=C.bottom,S=C.left,N=C.right,D=C.width,L=C.height,K=void 0,q=void 0,M=w.scrollWidth,ce=w.scrollHeight,ae=pe(w),X=w.scrollLeft,ee=w.scrollTop;w===h?(K=D<M&&(ae.overflowX==="auto"||ae.overflowX==="scroll"||ae.overflowX==="visible"),q=L<ce&&(ae.overflowY==="auto"||ae.overflowY==="scroll"||ae.overflowY==="visible")):(K=D<M&&(ae.overflowX==="auto"||ae.overflowX==="scroll"),q=L<ce&&(ae.overflowY==="auto"||ae.overflowY==="scroll"));var ue=K&&(Math.abs(N-o)<=l&&X+D<M)-(Math.abs(S-o)<=l&&!!X),Be=q&&(Math.abs(k-a)<=l&&ee+L<ce)-(Math.abs(T-a)<=l&&!!ee);if(!wt[_])for(var Ct=0;Ct<=_;Ct++)wt[Ct]||(wt[Ct]={});(wt[_].vx!=ue||wt[_].vy!=Be||wt[_].el!==w)&&(wt[_].el=w,wt[_].vx=ue,wt[_].vy=Be,clearInterval(wt[_].pid),(ue!=0||Be!=0)&&(f=!0,wt[_].pid=setInterval((function(){r&&this.layer===0&&_e.active._onTouchMove(Al);var rn=wt[this.layer].vy?wt[this.layer].vy*d:0,qt=wt[this.layer].vx?wt[this.layer].vx*d:0;typeof g=="function"&&g.call(_e.dragged.parentNode[xn],qt,rn,n,Al,wt[this.layer].el)!=="continue"||cE(wt[this.layer].el,qt,rn)}).bind({layer:_}),24))),_++}while(e.bubbleScroll&&p!==h&&(p=Fo(p,!1)));Hh=f}},30),gE=function(e){var t=e.originalEvent,r=e.putSortable,o=e.dragEl,a=e.activeSortable,l=e.dispatchSortableEvent,d=e.hideGhostForTarget,h=e.unhideGhostForTarget;if(t){var f=r||a;d();var g=t.changedTouches&&t.changedTouches.length?t.changedTouches[0]:t,_=document.elementFromPoint(g.clientX,g.clientY);h(),f&&!f.el.contains(_)&&(l("spill"),this.onSpill({dragEl:o,putSortable:r}))}};function Uf(){}Uf.prototype={startIndex:null,dragStart:function(e){var t=e.oldDraggableIndex;this.startIndex=t},onSpill:function(e){var t=e.dragEl,r=e.putSortable;this.sortable.captureAnimationState(),r&&r.captureAnimationState();var o=ba(this.sortable.el,this.startIndex,this.options);o?this.sortable.el.insertBefore(t,o):this.sortable.el.appendChild(t),this.sortable.animateAll(),r&&r.animateAll()},drop:gE};go(Uf,{pluginName:"revertOnSpill"});function Bf(){}Bf.prototype={onSpill:function(e){var t=e.dragEl,r=e.putSortable,o=r||this.sortable;o.captureAnimationState(),t.parentNode&&t.parentNode.removeChild(t),o.animateAll()},drop:gE};go(Bf,{pluginName:"removeOnSpill"});_e.mount(new pU);_e.mount(Bf,Uf);function _U(){return typeof window<"u"?window.console:global.console}const vU=_U();function yU(n){const e=Object.create(null);return function(r){return e[r]||(e[r]=n(r))}}const CU=/-(\w)/g,Cv=yU(n=>n.replace(CU,(e,t)=>t?t.toUpperCase():""));function eh(n){n.parentElement!==null&&n.parentElement.removeChild(n)}function Ev(n,e,t){const r=t===0?n.children[0]:n.children[t-1].nextSibling;n.insertBefore(e,r)}function EU(n,e){return Object.values(n).indexOf(e)}function wU(n,e,t,r){if(!n)return[];const o=Object.values(n),a=e.length-r;return[...e].map((d,h)=>h>=a?o.length:o.indexOf(d))}function pE(n,e){this.$nextTick(()=>this.$emit(n.toLowerCase(),e))}function TU(n){return e=>{this.realList!==null&&this["onDrag"+n](e),pE.call(this,n,e)}}function bU(n){return["transition-group","TransitionGroup"].includes(n)}function SU(n){if(!n||n.length!==1)return!1;const[{type:e}]=n;return e?bU(e.name):!1}function IU(n,e){return e?{...e.props,...e.attrs}:n}const $h=["Start","Add","Remove","Update","End"],Kh=["Choose","Unchoose","Sort","Filter","Clone"],AU=["Move",...$h,...Kh].map(n=>"on"+n);let th=null;const kU={options:Object,list:{type:Array,required:!1,default:null},noTransitionOnDrag:{type:Boolean,default:!1},clone:{type:Function,default:n=>n},tag:{type:String,default:"div"},move:{type:Function,default:null},componentData:{type:Object,required:!1,default:null},component:{type:String,default:null},modelValue:{type:Array,required:!1,default:null}},NU=c.defineComponent({name:"VueDraggableNext",inheritAttrs:!1,emits:["update:modelValue","move","change",...$h.map(n=>n.toLowerCase()),...Kh.map(n=>n.toLowerCase())],props:kU,data(){return{transitionMode:!1,noneFunctionalComponentMode:!1,headerOffset:0,footerOffset:0,_sortable:{},visibleIndexes:[],context:{}}},render(){const n=this.$slots.default?this.$slots.default():null,e=IU(this.$attrs,this.componentData);return n?(this.transitionMode=SU(n),c.h(this.getTag(),e,n)):c.h(this.getTag(),e,[])},created(){this.list!==null&&this.modelValue!==null&&vU.error("list props are mutually exclusive! Please set one.")},mounted(){const n={};$h.forEach(o=>{n["on"+o]=TU.call(this,o)}),Kh.forEach(o=>{n["on"+o]=pE.bind(this,o)});const e=Object.keys(this.$attrs).reduce((o,a)=>(o[Cv(a)]=this.$attrs[a],o),{}),t=Object.assign({},e,n,{onMove:(o,a)=>this.onDragMove(o,a)});!("draggable"in t)&&(t.draggable=">*");const r=this.$el.nodeType===1?this.$el:this.$el.parentElement;this._sortable=new _e(r,t),r.__draggable_component__=this,this.computeIndexes()},beforeUnmount(){try{this._sortable!==void 0&&this._sortable.destroy()}catch{}},computed:{realList(){return this.list?this.list:this.modelValue}},watch:{$attrs:{handler(n){this.updateOptions(n)},deep:!0},realList(){this.computeIndexes()}},methods:{getTag(){return this.component?c.resolveComponent(this.component):this.tag},updateOptions(n){for(var e in n){const t=Cv(e);AU.indexOf(t)===-1&&this._sortable.option(t,n[e])}},getChildrenNodes(){return this.$el.children},computeIndexes(){this.$nextTick(()=>{this.visibleIndexes=wU(this.getChildrenNodes(),this.$el.children,this.transitionMode,this.footerOffset)})},getUnderlyingVm(n){const e=EU(this.getChildrenNodes()||[],n);if(e===-1)return null;const t=this.realList[e];return{index:e,element:t}},emitChanges(n){this.$nextTick(()=>{this.$emit("change",n)})},alterList(n){if(this.list){n(this.list);return}const e=[...this.modelValue];n(e),this.$emit("update:modelValue",e)},spliceList(){const n=e=>e.splice(...arguments);this.alterList(n)},updatePosition(n,e){const t=r=>r.splice(e,0,r.splice(n,1)[0]);this.alterList(t)},getVmIndex(n){const e=this.visibleIndexes,t=e.length;return n>t-1?t:e[n]},getComponent(){return this.$slots.default?this.$slots.default()[0].componentInstance:null},resetTransitionData(n){if(!this.noTransitionOnDrag||!this.transitionMode)return;var e=this.getChildrenNodes();e[n].data=null;const t=this.getComponent();t.children=[],t.kept=void 0},onDragStart(n){this.computeIndexes(),this.context=this.getUnderlyingVm(n.item),this.context&&(n.item._underlying_vm_=this.clone(this.context.element),th=n.item)},onDragAdd(n){const e=n.item._underlying_vm_;if(e===void 0)return;eh(n.item);const t=this.getVmIndex(n.newIndex);this.spliceList(t,0,e),this.computeIndexes();const r={element:e,newIndex:t};this.emitChanges({added:r})},onDragRemove(n){if(Ev(this.$el,n.item,n.oldIndex),n.pullMode==="clone"){eh(n.clone);return}if(!this.context)return;const e=this.context.index;this.spliceList(e,1);const t={element:this.context.element,oldIndex:e};this.resetTransitionData(e),this.emitChanges({removed:t})},onDragUpdate(n){eh(n.item),Ev(n.from,n.item,n.oldIndex);const e=this.context.index,t=this.getVmIndex(n.newIndex);this.updatePosition(e,t);const r={element:this.context.element,oldIndex:e,newIndex:t};this.emitChanges({moved:r})},updateProperty(n,e){n.hasOwnProperty(e)&&(n[e]+=this.headerOffset)},onDragMove(n,e){const t=this.move;if(!t||!this.realList)return!0;const r=this.getRelatedContextFromMoveEvent(n),o=this.context,a=this.computeFutureIndex(r,n);Object.assign(o,{futureIndex:a});const l=Object.assign({},n,{relatedContext:r,draggedContext:o});return t(l,e)},onDragEnd(){this.computeIndexes(),th=null},getTrargetedComponent(n){return n.__draggable_component__},getRelatedContextFromMoveEvent({to:n,related:e}){const t=this.getTrargetedComponent(n);if(!t)return{component:t};const r=t.realList,o={list:r,component:t};if(n!==e&&r&&t.getUnderlyingVm){const a=t.getUnderlyingVm(e);if(a)return Object.assign(a,o)}return o},computeFutureIndex(n,e){const t=[...e.to.children].filter(l=>l.style.display!=="none");if(t.length===0)return 0;const r=t.indexOf(e.related),o=n.component.getVmIndex(r);return t.indexOf(th)!==-1||!e.willInsertAfter?o:o+1}}}),RU={class:"d-flex flex-row align-center"},Vf=c.defineComponent({__name:"ColumnSettingsDialog",props:{modelValue:{},modelModifiers:{}},emits:["update:modelValue"],setup(n){const e=c.useModel(n,"modelValue"),t=c.ref(""),r=c.computed(()=>{var a;return(a=e.value)==null?void 0:a.filter(l=>l.title.toLowerCase().includes(t.value.toLowerCase()))}),{t:o}=Fn();return(a,l)=>{const d=c.resolveComponent("v-list-item-content");return c.openBlock(),c.createBlock(Vs,{"dd-id":"col-settings",buttons:!1,title:c.unref(o)("dialogs.columnSettings.title")},{default:c.withCtx(()=>[c.createVNode(Xl,{modelValue:t.value,"onUpdate:modelValue":l[0]||(l[0]=h=>t.value=h)},null,8,["modelValue"]),c.createVNode(Qt.VList,null,{default:c.withCtx(()=>[c.createVNode(c.unref(NU),{list:r.value,animation:200,"ghost-class":"ghost-card"},{default:c.withCtx(()=>[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(r.value,h=>(c.openBlock(),c.createBlock(Qt.VListItem,{key:h.key,class:"pa-0"},{default:c.withCtx(()=>[c.createElementVNode("div",RU,[c.createVNode(c.unref(mP),{class:"cursor-grab mb-2"}),c.createVNode(Qt.VListItemAction,null,{default:c.withCtx(()=>[c.createVNode(kO.VCheckbox,{modelValue:h.checked,"onUpdate:modelValue":f=>h.checked=f},null,8,["modelValue","onUpdate:modelValue"])]),_:2},1024),c.createVNode(d,null,{default:c.withCtx(()=>[c.createVNode(Qt.VListItemTitle,{class:"mb-1"},{default:c.withCtx(()=>[c.createTextVNode(c.toDisplayString(h.title)+" ",1)]),_:2},1024)]),_:2},1024),h.icon?(c.openBlock(),c.createBlock(Ca.VIcon,{key:0},{default:c.withCtx(()=>[c.createTextVNode(c.toDisplayString(h.icon),1)]),_:2},1024)):c.createCommentVNode("",!0)])]),_:2},1024))),128))]),_:1},8,["list"])]),_:1})]),_:1},8,["title"])}}}),OU=["src","height","width"],PU={key:0,class:"text-center text-h6"},MU={key:1,class:"text-center text-h5"},DU={key:0,class:"text-center"},LU={class:"d-flex justify-center align-center mt-4 ga-3"},Ff=c.defineComponent({__name:"TableCard",props:{item:{},columns:{},size:{},image:{},tags:{},route:{},callback:{type:Function}},setup(n){const e=n,t=()=>{var o;return((o=e.columns.find(a=>a.isHeader))==null?void 0:o.key)||""},r=()=>{var o;return((o=e.columns.find(a=>a.isSubtitle))==null?void 0:o.key)||""};return(o,a)=>(c.openBlock(),c.createBlock(xt.VCard,{onClick:o.callback,ripple:"",class:"d-flex flex-column pa-4pa-4 bg-containerBg"},{default:c.withCtx(()=>[c.createVNode(xt.VCardActions,null,{default:c.withCtx(()=>[c.createVNode(qe.VRow,{"no-gutters":"",align:"center",justify:"end"},{default:c.withCtx(()=>[c.renderSlot(o.$slots,"actions",{item:o.item})]),_:3})]),_:3}),c.createVNode(xt.VCardTitle,null,{default:c.withCtx(()=>[c.createVNode(qe.VRow,{"no-gutters":"",align:"center",justify:"center"},{default:c.withCtx(()=>[o.image?(c.openBlock(),c.createElementBlock("img",{key:0,src:o.image,height:o.size,width:o.size,alt:""},null,8,OU)):c.createCommentVNode("",!0)]),_:1})]),_:1}),t()?(c.openBlock(),c.createElementBlock("div",PU,c.toDisplayString(o.item[t()]),1)):c.createCommentVNode("",!0),r()?(c.openBlock(),c.createElementBlock("div",MU,c.toDisplayString(o.item[r()]),1)):c.createCommentVNode("",!0),c.createVNode(Ho.VDivider,{class:"ma-3"}),c.createVNode(xt.VCardText,{class:"d-flex flex-column align-center pa-4 pt-1"},{default:c.withCtx(()=>[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(o.columns,l=>(c.openBlock(),c.createElementBlock(c.Fragment,{key:l.key},[o.item[l.key]&&!l.isHeader&&!l.isSubtitle?(c.openBlock(),c.createElementBlock("div",DU,c.toDisplayString(l.title)+": "+c.toDisplayString(o.item[l.key]),1)):c.createCommentVNode("",!0)],64))),128)),c.createElementVNode("div",LU,[o.tags?(c.openBlock(!0),c.createElementBlock(c.Fragment,{key:0},c.renderList(o.tags,l=>(c.openBlock(),c.createBlock(NO.VChip,{class:"pa-3",key:l},{default:c.withCtx(()=>[c.createTextVNode(c.toDisplayString(l),1)]),_:2},1024))),128)):c.createCommentVNode("",!0)])]),_:1})]),_:3},8,["onClick"]))}}),xU=c.defineComponent({__name:"TableCardsView",props:{data:{},columns:{},size:{},itemKey:{}},setup(n){return(e,t)=>(c.openBlock(),c.createBlock(qe.VRow,{class:"mt-5 border tb-cards-h",wrap:""},{default:c.withCtx(()=>[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(e.data,r=>(c.openBlock(),c.createBlock(qe.VCol,{cols:"12",sm:"6",md:"4",lg:"3",class:"pa-2",key:r[e.itemKey]},{default:c.withCtx(()=>[c.createVNode(Ff,{item:r,columns:e.columns,size:e.size},{actions:c.withCtx(({item:o})=>[c.renderSlot(e.$slots,"actions",{item:o},void 0,!0)]),_:2},1032,["item","columns","size"])]),_:2},1024))),128))]),_:3}))}}),_E=Yo(xU,[["__scopeId","data-v-e1a4ccbc"]]),UU={key:0,class:"mb-2 ms-1"},BU=c.defineComponent({__name:"JTextField",props:c.mergeModels({name:{},label:{},type:{default:"text"},readonly:{type:Boolean},density:{},rules:{},hideDetails:{type:Boolean},min:{}},{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(n){const e=c.useModel(n,"modelValue");return(t,r)=>(c.openBlock(),c.createElementBlock("div",null,[t.name?(c.openBlock(),c.createElementBlock("p",UU,c.toDisplayString(t.name),1)):c.createCommentVNode("",!0),t.label?(c.openBlock(),c.createBlock(yi.VLabel,{key:1,class:"text-subtitle-1 text-high-emphasis mb-2"},{default:c.withCtx(()=>[c.createTextVNode(c.toDisplayString(t.label),1)]),_:1})):c.createCommentVNode("",!0),c.createVNode(c.unref(uo.VTextField),{variant:"solo-filled","bg-color":t.readonly?"containerBg30":"containerBg",color:"secondary",rounded:"sm",type:t.type,density:t.density,rules:t.rules,modelValue:e.value,"onUpdate:modelValue":r[0]||(r[0]=o=>e.value=o),class:"j-field",readonly:t.readonly,"hide-details":t.hideDetails,min:t.min},null,8,["bg-color","type","density","rules","modelValue","readonly","hide-details","min"])]))}}),vE=Yo(BU,[["__scopeId","data-v-6d6a3851"]]);function yE(n,e){return function(){return n.apply(e,arguments)}}const{toString:VU}=Object.prototype,{getPrototypeOf:Hf}=Object,eu=(n=>e=>{const t=VU.call(e);return n[t]||(n[t]=t.slice(8,-1).toLowerCase())})(Object.create(null)),Sr=n=>(n=n.toLowerCase(),e=>eu(e)===n),tu=n=>e=>typeof e===n,{isArray:Ra}=Array,Ms=tu("undefined");function FU(n){return n!==null&&!Ms(n)&&n.constructor!==null&&!Ms(n.constructor)&&Vn(n.constructor.isBuffer)&&n.constructor.isBuffer(n)}const CE=Sr("ArrayBuffer");function HU(n){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(n):e=n&&n.buffer&&CE(n.buffer),e}const $U=tu("string"),Vn=tu("function"),EE=tu("number"),nu=n=>n!==null&&typeof n=="object",KU=n=>n===!0||n===!1,gl=n=>{if(eu(n)!=="object")return!1;const e=Hf(n);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in n)&&!(Symbol.iterator in n)},WU=Sr("Date"),zU=Sr("File"),GU=Sr("Blob"),qU=Sr("FileList"),jU=n=>nu(n)&&Vn(n.pipe),YU=n=>{let e;return n&&(typeof FormData=="function"&&n instanceof FormData||Vn(n.append)&&((e=eu(n))==="formdata"||e==="object"&&Vn(n.toString)&&n.toString()==="[object FormData]"))},JU=Sr("URLSearchParams"),[QU,XU,ZU,eB]=["ReadableStream","Request","Response","Headers"].map(Sr),tB=n=>n.trim?n.trim():n.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Ks(n,e,{allOwnKeys:t=!1}={}){if(n===null||typeof n>"u")return;let r,o;if(typeof n!="object"&&(n=[n]),Ra(n))for(r=0,o=n.length;r<o;r++)e.call(null,n[r],r,n);else{const a=t?Object.getOwnPropertyNames(n):Object.keys(n),l=a.length;let d;for(r=0;r<l;r++)d=a[r],e.call(null,n[d],d,n)}}function wE(n,e){e=e.toLowerCase();const t=Object.keys(n);let r=t.length,o;for(;r-- >0;)if(o=t[r],e===o.toLowerCase())return o;return null}const pi=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,TE=n=>!Ms(n)&&n!==pi;function Wh(){const{caseless:n}=TE(this)&&this||{},e={},t=(r,o)=>{const a=n&&wE(e,o)||o;gl(e[a])&&gl(r)?e[a]=Wh(e[a],r):gl(r)?e[a]=Wh({},r):Ra(r)?e[a]=r.slice():e[a]=r};for(let r=0,o=arguments.length;r<o;r++)arguments[r]&&Ks(arguments[r],t);return e}const nB=(n,e,t,{allOwnKeys:r}={})=>(Ks(e,(o,a)=>{t&&Vn(o)?n[a]=yE(o,t):n[a]=o},{allOwnKeys:r}),n),rB=n=>(n.charCodeAt(0)===65279&&(n=n.slice(1)),n),oB=(n,e,t,r)=>{n.prototype=Object.create(e.prototype,r),n.prototype.constructor=n,Object.defineProperty(n,"super",{value:e.prototype}),t&&Object.assign(n.prototype,t)},iB=(n,e,t,r)=>{let o,a,l;const d={};if(e=e||{},n==null)return e;do{for(o=Object.getOwnPropertyNames(n),a=o.length;a-- >0;)l=o[a],(!r||r(l,n,e))&&!d[l]&&(e[l]=n[l],d[l]=!0);n=t!==!1&&Hf(n)}while(n&&(!t||t(n,e))&&n!==Object.prototype);return e},aB=(n,e,t)=>{n=String(n),(t===void 0||t>n.length)&&(t=n.length),t-=e.length;const r=n.indexOf(e,t);return r!==-1&&r===t},sB=n=>{if(!n)return null;if(Ra(n))return n;let e=n.length;if(!EE(e))return null;const t=new Array(e);for(;e-- >0;)t[e]=n[e];return t},cB=(n=>e=>n&&e instanceof n)(typeof Uint8Array<"u"&&Hf(Uint8Array)),lB=(n,e)=>{const r=(n&&n[Symbol.iterator]).call(n);let o;for(;(o=r.next())&&!o.done;){const a=o.value;e.call(n,a[0],a[1])}},uB=(n,e)=>{let t;const r=[];for(;(t=n.exec(e))!==null;)r.push(t);return r},dB=Sr("HTMLFormElement"),hB=n=>n.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(t,r,o){return r.toUpperCase()+o}),wv=(({hasOwnProperty:n})=>(e,t)=>n.call(e,t))(Object.prototype),fB=Sr("RegExp"),bE=(n,e)=>{const t=Object.getOwnPropertyDescriptors(n),r={};Ks(t,(o,a)=>{let l;(l=e(o,a,n))!==!1&&(r[a]=l||o)}),Object.defineProperties(n,r)},mB=n=>{bE(n,(e,t)=>{if(Vn(n)&&["arguments","caller","callee"].indexOf(t)!==-1)return!1;const r=n[t];if(Vn(r)){if(e.enumerable=!1,"writable"in e){e.writable=!1;return}e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+t+"'")})}})},gB=(n,e)=>{const t={},r=o=>{o.forEach(a=>{t[a]=!0})};return Ra(n)?r(n):r(String(n).split(e)),t},pB=()=>{},_B=(n,e)=>n!=null&&Number.isFinite(n=+n)?n:e,nh="abcdefghijklmnopqrstuvwxyz",Tv="0123456789",SE={DIGIT:Tv,ALPHA:nh,ALPHA_DIGIT:nh+nh.toUpperCase()+Tv},vB=(n=16,e=SE.ALPHA_DIGIT)=>{let t="";const{length:r}=e;for(;n--;)t+=e[Math.random()*r|0];return t};function yB(n){return!!(n&&Vn(n.append)&&n[Symbol.toStringTag]==="FormData"&&n[Symbol.iterator])}const CB=n=>{const e=new Array(10),t=(r,o)=>{if(nu(r)){if(e.indexOf(r)>=0)return;if(!("toJSON"in r)){e[o]=r;const a=Ra(r)?[]:{};return Ks(r,(l,d)=>{const h=t(l,o+1);!Ms(h)&&(a[d]=h)}),e[o]=void 0,a}}return r};return t(n,0)},EB=Sr("AsyncFunction"),wB=n=>n&&(nu(n)||Vn(n))&&Vn(n.then)&&Vn(n.catch),IE=((n,e)=>n?setImmediate:e?((t,r)=>(pi.addEventListener("message",({source:o,data:a})=>{o===pi&&a===t&&r.length&&r.shift()()},!1),o=>{r.push(o),pi.postMessage(t,"*")}))(`axios@${Math.random()}`,[]):t=>setTimeout(t))(typeof setImmediate=="function",Vn(pi.postMessage)),TB=typeof queueMicrotask<"u"?queueMicrotask.bind(pi):typeof process<"u"&&process.nextTick||IE,B={isArray:Ra,isArrayBuffer:CE,isBuffer:FU,isFormData:YU,isArrayBufferView:HU,isString:$U,isNumber:EE,isBoolean:KU,isObject:nu,isPlainObject:gl,isReadableStream:QU,isRequest:XU,isResponse:ZU,isHeaders:eB,isUndefined:Ms,isDate:WU,isFile:zU,isBlob:GU,isRegExp:fB,isFunction:Vn,isStream:jU,isURLSearchParams:JU,isTypedArray:cB,isFileList:qU,forEach:Ks,merge:Wh,extend:nB,trim:tB,stripBOM:rB,inherits:oB,toFlatObject:iB,kindOf:eu,kindOfTest:Sr,endsWith:aB,toArray:sB,forEachEntry:lB,matchAll:uB,isHTMLForm:dB,hasOwnProperty:wv,hasOwnProp:wv,reduceDescriptors:bE,freezeMethods:mB,toObjectSet:gB,toCamelCase:hB,noop:pB,toFiniteNumber:_B,findKey:wE,global:pi,isContextDefined:TE,ALPHABET:SE,generateString:vB,isSpecCompliantForm:yB,toJSONObject:CB,isAsyncFn:EB,isThenable:wB,setImmediate:IE,asap:TB};function Te(n,e,t,r,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=n,this.name="AxiosError",e&&(this.code=e),t&&(this.config=t),r&&(this.request=r),o&&(this.response=o,this.status=o.status?o.status:null)}B.inherits(Te,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:B.toJSONObject(this.config),code:this.code,status:this.status}}});const AE=Te.prototype,kE={};["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(n=>{kE[n]={value:n}});Object.defineProperties(Te,kE);Object.defineProperty(AE,"isAxiosError",{value:!0});Te.from=(n,e,t,r,o,a)=>{const l=Object.create(AE);return B.toFlatObject(n,l,function(h){return h!==Error.prototype},d=>d!=="isAxiosError"),Te.call(l,n.message,e,t,r,o),l.cause=n,l.name=n.name,a&&Object.assign(l,a),l};const bB=null;function zh(n){return B.isPlainObject(n)||B.isArray(n)}function NE(n){return B.endsWith(n,"[]")?n.slice(0,-2):n}function bv(n,e,t){return n?n.concat(e).map(function(o,a){return o=NE(o),!t&&a?"["+o+"]":o}).join(t?".":""):e}function SB(n){return B.isArray(n)&&!n.some(zh)}const IB=B.toFlatObject(B,{},null,function(e){return/^is[A-Z]/.test(e)});function ru(n,e,t){if(!B.isObject(n))throw new TypeError("target must be an object");e=e||new FormData,t=B.toFlatObject(t,{metaTokens:!0,dots:!1,indexes:!1},!1,function(T,k){return!B.isUndefined(k[T])});const r=t.metaTokens,o=t.visitor||g,a=t.dots,l=t.indexes,h=(t.Blob||typeof Blob<"u"&&Blob)&&B.isSpecCompliantForm(e);if(!B.isFunction(o))throw new TypeError("visitor must be a function");function f(C){if(C===null)return"";if(B.isDate(C))return C.toISOString();if(!h&&B.isBlob(C))throw new Te("Blob is not supported. Use a Buffer instead.");return B.isArrayBuffer(C)||B.isTypedArray(C)?h&&typeof Blob=="function"?new Blob([C]):Buffer.from(C):C}function g(C,T,k){let S=C;if(C&&!k&&typeof C=="object"){if(B.endsWith(T,"{}"))T=r?T:T.slice(0,-2),C=JSON.stringify(C);else if(B.isArray(C)&&SB(C)||(B.isFileList(C)||B.endsWith(T,"[]"))&&(S=B.toArray(C)))return T=NE(T),S.forEach(function(D,L){!(B.isUndefined(D)||D===null)&&e.append(l===!0?bv([T],L,a):l===null?T:T+"[]",f(D))}),!1}return zh(C)?!0:(e.append(bv(k,T,a),f(C)),!1)}const _=[],p=Object.assign(IB,{defaultVisitor:g,convertValue:f,isVisitable:zh});function w(C,T){if(!B.isUndefined(C)){if(_.indexOf(C)!==-1)throw Error("Circular reference detected in "+T.join("."));_.push(C),B.forEach(C,function(S,N){(!(B.isUndefined(S)||S===null)&&o.call(e,S,B.isString(N)?N.trim():N,T,p))===!0&&w(S,T?T.concat(N):[N])}),_.pop()}}if(!B.isObject(n))throw new TypeError("data must be an object");return w(n),e}function Sv(n){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(n).replace(/[!'()~]|%20|%00/g,function(r){return e[r]})}function $f(n,e){this._pairs=[],n&&ru(n,this,e)}const RE=$f.prototype;RE.append=function(e,t){this._pairs.push([e,t])};RE.toString=function(e){const t=e?function(r){return e.call(this,r,Sv)}:Sv;return this._pairs.map(function(o){return t(o[0])+"="+t(o[1])},"").join("&")};function AB(n){return encodeURIComponent(n).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function OE(n,e,t){if(!e)return n;const r=t&&t.encode||AB;B.isFunction(t)&&(t={serialize:t});const o=t&&t.serialize;let a;if(o?a=o(e,t):a=B.isURLSearchParams(e)?e.toString():new $f(e,t).toString(r),a){const l=n.indexOf("#");l!==-1&&(n=n.slice(0,l)),n+=(n.indexOf("?")===-1?"?":"&")+a}return n}class Iv{constructor(){this.handlers=[]}use(e,t,r){return this.handlers.push({fulfilled:e,rejected:t,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){B.forEach(this.handlers,function(r){r!==null&&e(r)})}}const PE={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},kB=typeof URLSearchParams<"u"?URLSearchParams:$f,NB=typeof FormData<"u"?FormData:null,RB=typeof Blob<"u"?Blob:null,OB={isBrowser:!0,classes:{URLSearchParams:kB,FormData:NB,Blob:RB},protocols:["http","https","file","blob","url","data"]},Kf=typeof window<"u"&&typeof document<"u",Gh=typeof navigator=="object"&&navigator||void 0,PB=Kf&&(!Gh||["ReactNative","NativeScript","NS"].indexOf(Gh.product)<0),MB=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",DB=Kf&&window.location.href||"http://localhost",LB=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Kf,hasStandardBrowserEnv:PB,hasStandardBrowserWebWorkerEnv:MB,navigator:Gh,origin:DB},Symbol.toStringTag,{value:"Module"})),nn={...LB,...OB};function xB(n,e){return ru(n,new nn.classes.URLSearchParams,Object.assign({visitor:function(t,r,o,a){return nn.isNode&&B.isBuffer(t)?(this.append(r,t.toString("base64")),!1):a.defaultVisitor.apply(this,arguments)}},e))}function UB(n){return B.matchAll(/\w+|\[(\w*)]/g,n).map(e=>e[0]==="[]"?"":e[1]||e[0])}function BB(n){const e={},t=Object.keys(n);let r;const o=t.length;let a;for(r=0;r<o;r++)a=t[r],e[a]=n[a];return e}function ME(n){function e(t,r,o,a){let l=t[a++];if(l==="__proto__")return!0;const d=Number.isFinite(+l),h=a>=t.length;return l=!l&&B.isArray(o)?o.length:l,h?(B.hasOwnProp(o,l)?o[l]=[o[l],r]:o[l]=r,!d):((!o[l]||!B.isObject(o[l]))&&(o[l]=[]),e(t,r,o[l],a)&&B.isArray(o[l])&&(o[l]=BB(o[l])),!d)}if(B.isFormData(n)&&B.isFunction(n.entries)){const t={};return B.forEachEntry(n,(r,o)=>{e(UB(r),o,t,0)}),t}return null}function VB(n,e,t){if(B.isString(n))try{return(e||JSON.parse)(n),B.trim(n)}catch(r){if(r.name!=="SyntaxError")throw r}return(0,JSON.stringify)(n)}const Ws={transitional:PE,adapter:["xhr","http","fetch"],transformRequest:[function(e,t){const r=t.getContentType()||"",o=r.indexOf("application/json")>-1,a=B.isObject(e);if(a&&B.isHTMLForm(e)&&(e=new FormData(e)),B.isFormData(e))return o?JSON.stringify(ME(e)):e;if(B.isArrayBuffer(e)||B.isBuffer(e)||B.isStream(e)||B.isFile(e)||B.isBlob(e)||B.isReadableStream(e))return e;if(B.isArrayBufferView(e))return e.buffer;if(B.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let d;if(a){if(r.indexOf("application/x-www-form-urlencoded")>-1)return xB(e,this.formSerializer).toString();if((d=B.isFileList(e))||r.indexOf("multipart/form-data")>-1){const h=this.env&&this.env.FormData;return ru(d?{"files[]":e}:e,h&&new h,this.formSerializer)}}return a||o?(t.setContentType("application/json",!1),VB(e)):e}],transformResponse:[function(e){const t=this.transitional||Ws.transitional,r=t&&t.forcedJSONParsing,o=this.responseType==="json";if(B.isResponse(e)||B.isReadableStream(e))return e;if(e&&B.isString(e)&&(r&&!this.responseType||o)){const l=!(t&&t.silentJSONParsing)&&o;try{return JSON.parse(e)}catch(d){if(l)throw d.name==="SyntaxError"?Te.from(d,Te.ERR_BAD_RESPONSE,this,null,this.response):d}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:nn.classes.FormData,Blob:nn.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};B.forEach(["delete","get","head","post","put","patch"],n=>{Ws.headers[n]={}});const FB=B.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"]),HB=n=>{const e={};let t,r,o;return n&&n.split(`
|
42
|
+
`).forEach(function(l){o=l.indexOf(":"),t=l.substring(0,o).trim().toLowerCase(),r=l.substring(o+1).trim(),!(!t||e[t]&&FB[t])&&(t==="set-cookie"?e[t]?e[t].push(r):e[t]=[r]:e[t]=e[t]?e[t]+", "+r:r)}),e},Av=Symbol("internals");function as(n){return n&&String(n).trim().toLowerCase()}function pl(n){return n===!1||n==null?n:B.isArray(n)?n.map(pl):String(n)}function $B(n){const e=Object.create(null),t=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=t.exec(n);)e[r[1]]=r[2];return e}const KB=n=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(n.trim());function rh(n,e,t,r,o){if(B.isFunction(r))return r.call(this,e,t);if(o&&(e=t),!!B.isString(e)){if(B.isString(r))return e.indexOf(r)!==-1;if(B.isRegExp(r))return r.test(e)}}function WB(n){return n.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,t,r)=>t.toUpperCase()+r)}function zB(n,e){const t=B.toCamelCase(" "+e);["get","set","has"].forEach(r=>{Object.defineProperty(n,r+t,{value:function(o,a,l){return this[r].call(this,e,o,a,l)},configurable:!0})})}class yn{constructor(e){e&&this.set(e)}set(e,t,r){const o=this;function a(d,h,f){const g=as(h);if(!g)throw new Error("header name must be a non-empty string");const _=B.findKey(o,g);(!_||o[_]===void 0||f===!0||f===void 0&&o[_]!==!1)&&(o[_||h]=pl(d))}const l=(d,h)=>B.forEach(d,(f,g)=>a(f,g,h));if(B.isPlainObject(e)||e instanceof this.constructor)l(e,t);else if(B.isString(e)&&(e=e.trim())&&!KB(e))l(HB(e),t);else if(B.isHeaders(e))for(const[d,h]of e.entries())a(h,d,r);else e!=null&&a(t,e,r);return this}get(e,t){if(e=as(e),e){const r=B.findKey(this,e);if(r){const o=this[r];if(!t)return o;if(t===!0)return $B(o);if(B.isFunction(t))return t.call(this,o,r);if(B.isRegExp(t))return t.exec(o);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=as(e),e){const r=B.findKey(this,e);return!!(r&&this[r]!==void 0&&(!t||rh(this,this[r],r,t)))}return!1}delete(e,t){const r=this;let o=!1;function a(l){if(l=as(l),l){const d=B.findKey(r,l);d&&(!t||rh(r,r[d],d,t))&&(delete r[d],o=!0)}}return B.isArray(e)?e.forEach(a):a(e),o}clear(e){const t=Object.keys(this);let r=t.length,o=!1;for(;r--;){const a=t[r];(!e||rh(this,this[a],a,e,!0))&&(delete this[a],o=!0)}return o}normalize(e){const t=this,r={};return B.forEach(this,(o,a)=>{const l=B.findKey(r,a);if(l){t[l]=pl(o),delete t[a];return}const d=e?WB(a):String(a).trim();d!==a&&delete t[a],t[d]=pl(o),r[d]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return B.forEach(this,(r,o)=>{r!=null&&r!==!1&&(t[o]=e&&B.isArray(r)?r.join(", "):r)}),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,t])=>e+": "+t).join(`
|
43
|
+
`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){const r=new this(e);return t.forEach(o=>r.set(o)),r}static accessor(e){const r=(this[Av]=this[Av]={accessors:{}}).accessors,o=this.prototype;function a(l){const d=as(l);r[d]||(zB(o,l),r[d]=!0)}return B.isArray(e)?e.forEach(a):a(e),this}}yn.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);B.reduceDescriptors(yn.prototype,({value:n},e)=>{let t=e[0].toUpperCase()+e.slice(1);return{get:()=>n,set(r){this[t]=r}}});B.freezeMethods(yn);function oh(n,e){const t=this||Ws,r=e||t,o=yn.from(r.headers);let a=r.data;return B.forEach(n,function(d){a=d.call(t,a,o.normalize(),e?e.status:void 0)}),o.normalize(),a}function DE(n){return!!(n&&n.__CANCEL__)}function Oa(n,e,t){Te.call(this,n??"canceled",Te.ERR_CANCELED,e,t),this.name="CanceledError"}B.inherits(Oa,Te,{__CANCEL__:!0});function LE(n,e,t){const r=t.config.validateStatus;!t.status||!r||r(t.status)?n(t):e(new Te("Request failed with status code "+t.status,[Te.ERR_BAD_REQUEST,Te.ERR_BAD_RESPONSE][Math.floor(t.status/100)-4],t.config,t.request,t))}function GB(n){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(n);return e&&e[1]||""}function qB(n,e){n=n||10;const t=new Array(n),r=new Array(n);let o=0,a=0,l;return e=e!==void 0?e:1e3,function(h){const f=Date.now(),g=r[a];l||(l=f),t[o]=h,r[o]=f;let _=a,p=0;for(;_!==o;)p+=t[_++],_=_%n;if(o=(o+1)%n,o===a&&(a=(a+1)%n),f-l<e)return;const w=g&&f-g;return w?Math.round(p*1e3/w):void 0}}function jB(n,e){let t=0,r=1e3/e,o,a;const l=(f,g=Date.now())=>{t=g,o=null,a&&(clearTimeout(a),a=null),n.apply(null,f)};return[(...f)=>{const g=Date.now(),_=g-t;_>=r?l(f,g):(o=f,a||(a=setTimeout(()=>{a=null,l(o)},r-_)))},()=>o&&l(o)]}const kl=(n,e,t=3)=>{let r=0;const o=qB(50,250);return jB(a=>{const l=a.loaded,d=a.lengthComputable?a.total:void 0,h=l-r,f=o(h),g=l<=d;r=l;const _={loaded:l,total:d,progress:d?l/d:void 0,bytes:h,rate:f||void 0,estimated:f&&d&&g?(d-l)/f:void 0,event:a,lengthComputable:d!=null,[e?"download":"upload"]:!0};n(_)},t)},kv=(n,e)=>{const t=n!=null;return[r=>e[0]({lengthComputable:t,total:n,loaded:r}),e[1]]},Nv=n=>(...e)=>B.asap(()=>n(...e)),YB=nn.hasStandardBrowserEnv?((n,e)=>t=>(t=new URL(t,nn.origin),n.protocol===t.protocol&&n.host===t.host&&(e||n.port===t.port)))(new URL(nn.origin),nn.navigator&&/(msie|trident)/i.test(nn.navigator.userAgent)):()=>!0,JB=nn.hasStandardBrowserEnv?{write(n,e,t,r,o,a){const l=[n+"="+encodeURIComponent(e)];B.isNumber(t)&&l.push("expires="+new Date(t).toGMTString()),B.isString(r)&&l.push("path="+r),B.isString(o)&&l.push("domain="+o),a===!0&&l.push("secure"),document.cookie=l.join("; ")},read(n){const e=document.cookie.match(new RegExp("(^|;\\s*)("+n+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove(n){this.write(n,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function QB(n){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(n)}function XB(n,e){return e?n.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):n}function xE(n,e){return n&&!QB(e)?XB(n,e):e}const Rv=n=>n instanceof yn?{...n}:n;function Ti(n,e){e=e||{};const t={};function r(f,g,_,p){return B.isPlainObject(f)&&B.isPlainObject(g)?B.merge.call({caseless:p},f,g):B.isPlainObject(g)?B.merge({},g):B.isArray(g)?g.slice():g}function o(f,g,_,p){if(B.isUndefined(g)){if(!B.isUndefined(f))return r(void 0,f,_,p)}else return r(f,g,_,p)}function a(f,g){if(!B.isUndefined(g))return r(void 0,g)}function l(f,g){if(B.isUndefined(g)){if(!B.isUndefined(f))return r(void 0,f)}else return r(void 0,g)}function d(f,g,_){if(_ in e)return r(f,g);if(_ in n)return r(void 0,f)}const h={url:a,method:a,data:a,baseURL:l,transformRequest:l,transformResponse:l,paramsSerializer:l,timeout:l,timeoutMessage:l,withCredentials:l,withXSRFToken:l,adapter:l,responseType:l,xsrfCookieName:l,xsrfHeaderName:l,onUploadProgress:l,onDownloadProgress:l,decompress:l,maxContentLength:l,maxBodyLength:l,beforeRedirect:l,transport:l,httpAgent:l,httpsAgent:l,cancelToken:l,socketPath:l,responseEncoding:l,validateStatus:d,headers:(f,g,_)=>o(Rv(f),Rv(g),_,!0)};return B.forEach(Object.keys(Object.assign({},n,e)),function(g){const _=h[g]||o,p=_(n[g],e[g],g);B.isUndefined(p)&&_!==d||(t[g]=p)}),t}const UE=n=>{const e=Ti({},n);let{data:t,withXSRFToken:r,xsrfHeaderName:o,xsrfCookieName:a,headers:l,auth:d}=e;e.headers=l=yn.from(l),e.url=OE(xE(e.baseURL,e.url),n.params,n.paramsSerializer),d&&l.set("Authorization","Basic "+btoa((d.username||"")+":"+(d.password?unescape(encodeURIComponent(d.password)):"")));let h;if(B.isFormData(t)){if(nn.hasStandardBrowserEnv||nn.hasStandardBrowserWebWorkerEnv)l.setContentType(void 0);else if((h=l.getContentType())!==!1){const[f,...g]=h?h.split(";").map(_=>_.trim()).filter(Boolean):[];l.setContentType([f||"multipart/form-data",...g].join("; "))}}if(nn.hasStandardBrowserEnv&&(r&&B.isFunction(r)&&(r=r(e)),r||r!==!1&&YB(e.url))){const f=o&&a&&JB.read(a);f&&l.set(o,f)}return e},ZB=typeof XMLHttpRequest<"u",eV=ZB&&function(n){return new Promise(function(t,r){const o=UE(n);let a=o.data;const l=yn.from(o.headers).normalize();let{responseType:d,onUploadProgress:h,onDownloadProgress:f}=o,g,_,p,w,C;function T(){w&&w(),C&&C(),o.cancelToken&&o.cancelToken.unsubscribe(g),o.signal&&o.signal.removeEventListener("abort",g)}let k=new XMLHttpRequest;k.open(o.method.toUpperCase(),o.url,!0),k.timeout=o.timeout;function S(){if(!k)return;const D=yn.from("getAllResponseHeaders"in k&&k.getAllResponseHeaders()),K={data:!d||d==="text"||d==="json"?k.responseText:k.response,status:k.status,statusText:k.statusText,headers:D,config:n,request:k};LE(function(M){t(M),T()},function(M){r(M),T()},K),k=null}"onloadend"in k?k.onloadend=S:k.onreadystatechange=function(){!k||k.readyState!==4||k.status===0&&!(k.responseURL&&k.responseURL.indexOf("file:")===0)||setTimeout(S)},k.onabort=function(){k&&(r(new Te("Request aborted",Te.ECONNABORTED,n,k)),k=null)},k.onerror=function(){r(new Te("Network Error",Te.ERR_NETWORK,n,k)),k=null},k.ontimeout=function(){let L=o.timeout?"timeout of "+o.timeout+"ms exceeded":"timeout exceeded";const K=o.transitional||PE;o.timeoutErrorMessage&&(L=o.timeoutErrorMessage),r(new Te(L,K.clarifyTimeoutError?Te.ETIMEDOUT:Te.ECONNABORTED,n,k)),k=null},a===void 0&&l.setContentType(null),"setRequestHeader"in k&&B.forEach(l.toJSON(),function(L,K){k.setRequestHeader(K,L)}),B.isUndefined(o.withCredentials)||(k.withCredentials=!!o.withCredentials),d&&d!=="json"&&(k.responseType=o.responseType),f&&([p,C]=kl(f,!0),k.addEventListener("progress",p)),h&&k.upload&&([_,w]=kl(h),k.upload.addEventListener("progress",_),k.upload.addEventListener("loadend",w)),(o.cancelToken||o.signal)&&(g=D=>{k&&(r(!D||D.type?new Oa(null,n,k):D),k.abort(),k=null)},o.cancelToken&&o.cancelToken.subscribe(g),o.signal&&(o.signal.aborted?g():o.signal.addEventListener("abort",g)));const N=GB(o.url);if(N&&nn.protocols.indexOf(N)===-1){r(new Te("Unsupported protocol "+N+":",Te.ERR_BAD_REQUEST,n));return}k.send(a||null)})},tV=(n,e)=>{const{length:t}=n=n?n.filter(Boolean):[];if(e||t){let r=new AbortController,o;const a=function(f){if(!o){o=!0,d();const g=f instanceof Error?f:this.reason;r.abort(g instanceof Te?g:new Oa(g instanceof Error?g.message:g))}};let l=e&&setTimeout(()=>{l=null,a(new Te(`timeout ${e} of ms exceeded`,Te.ETIMEDOUT))},e);const d=()=>{n&&(l&&clearTimeout(l),l=null,n.forEach(f=>{f.unsubscribe?f.unsubscribe(a):f.removeEventListener("abort",a)}),n=null)};n.forEach(f=>f.addEventListener("abort",a));const{signal:h}=r;return h.unsubscribe=()=>B.asap(d),h}},nV=function*(n,e){let t=n.byteLength;if(t<e){yield n;return}let r=0,o;for(;r<t;)o=r+e,yield n.slice(r,o),r=o},rV=async function*(n,e){for await(const t of oV(n))yield*nV(t,e)},oV=async function*(n){if(n[Symbol.asyncIterator]){yield*n;return}const e=n.getReader();try{for(;;){const{done:t,value:r}=await e.read();if(t)break;yield r}}finally{await e.cancel()}},Ov=(n,e,t,r)=>{const o=rV(n,e);let a=0,l,d=h=>{l||(l=!0,r&&r(h))};return new ReadableStream({async pull(h){try{const{done:f,value:g}=await o.next();if(f){d(),h.close();return}let _=g.byteLength;if(t){let p=a+=_;t(p)}h.enqueue(new Uint8Array(g))}catch(f){throw d(f),f}},cancel(h){return d(h),o.return()}},{highWaterMark:2})},ou=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",BE=ou&&typeof ReadableStream=="function",iV=ou&&(typeof TextEncoder=="function"?(n=>e=>n.encode(e))(new TextEncoder):async n=>new Uint8Array(await new Response(n).arrayBuffer())),VE=(n,...e)=>{try{return!!n(...e)}catch{return!1}},aV=BE&&VE(()=>{let n=!1;const e=new Request(nn.origin,{body:new ReadableStream,method:"POST",get duplex(){return n=!0,"half"}}).headers.has("Content-Type");return n&&!e}),Pv=64*1024,qh=BE&&VE(()=>B.isReadableStream(new Response("").body)),Nl={stream:qh&&(n=>n.body)};ou&&(n=>{["text","arrayBuffer","blob","formData","stream"].forEach(e=>{!Nl[e]&&(Nl[e]=B.isFunction(n[e])?t=>t[e]():(t,r)=>{throw new Te(`Response type '${e}' is not supported`,Te.ERR_NOT_SUPPORT,r)})})})(new Response);const sV=async n=>{if(n==null)return 0;if(B.isBlob(n))return n.size;if(B.isSpecCompliantForm(n))return(await new Request(nn.origin,{method:"POST",body:n}).arrayBuffer()).byteLength;if(B.isArrayBufferView(n)||B.isArrayBuffer(n))return n.byteLength;if(B.isURLSearchParams(n)&&(n=n+""),B.isString(n))return(await iV(n)).byteLength},cV=async(n,e)=>{const t=B.toFiniteNumber(n.getContentLength());return t??sV(e)},lV=ou&&(async n=>{let{url:e,method:t,data:r,signal:o,cancelToken:a,timeout:l,onDownloadProgress:d,onUploadProgress:h,responseType:f,headers:g,withCredentials:_="same-origin",fetchOptions:p}=UE(n);f=f?(f+"").toLowerCase():"text";let w=tV([o,a&&a.toAbortSignal()],l),C;const T=w&&w.unsubscribe&&(()=>{w.unsubscribe()});let k;try{if(h&&aV&&t!=="get"&&t!=="head"&&(k=await cV(g,r))!==0){let K=new Request(e,{method:"POST",body:r,duplex:"half"}),q;if(B.isFormData(r)&&(q=K.headers.get("content-type"))&&g.setContentType(q),K.body){const[M,ce]=kv(k,kl(Nv(h)));r=Ov(K.body,Pv,M,ce)}}B.isString(_)||(_=_?"include":"omit");const S="credentials"in Request.prototype;C=new Request(e,{...p,signal:w,method:t.toUpperCase(),headers:g.normalize().toJSON(),body:r,duplex:"half",credentials:S?_:void 0});let N=await fetch(C);const D=qh&&(f==="stream"||f==="response");if(qh&&(d||D&&T)){const K={};["status","statusText","headers"].forEach(ae=>{K[ae]=N[ae]});const q=B.toFiniteNumber(N.headers.get("content-length")),[M,ce]=d&&kv(q,kl(Nv(d),!0))||[];N=new Response(Ov(N.body,Pv,M,()=>{ce&&ce(),T&&T()}),K)}f=f||"text";let L=await Nl[B.findKey(Nl,f)||"text"](N,n);return!D&&T&&T(),await new Promise((K,q)=>{LE(K,q,{data:L,headers:yn.from(N.headers),status:N.status,statusText:N.statusText,config:n,request:C})})}catch(S){throw T&&T(),S&&S.name==="TypeError"&&/fetch/i.test(S.message)?Object.assign(new Te("Network Error",Te.ERR_NETWORK,n,C),{cause:S.cause||S}):Te.from(S,S&&S.code,n,C)}}),jh={http:bB,xhr:eV,fetch:lV};B.forEach(jh,(n,e)=>{if(n){try{Object.defineProperty(n,"name",{value:e})}catch{}Object.defineProperty(n,"adapterName",{value:e})}});const Mv=n=>`- ${n}`,uV=n=>B.isFunction(n)||n===null||n===!1,FE={getAdapter:n=>{n=B.isArray(n)?n:[n];const{length:e}=n;let t,r;const o={};for(let a=0;a<e;a++){t=n[a];let l;if(r=t,!uV(t)&&(r=jh[(l=String(t)).toLowerCase()],r===void 0))throw new Te(`Unknown adapter '${l}'`);if(r)break;o[l||"#"+a]=r}if(!r){const a=Object.entries(o).map(([d,h])=>`adapter ${d} `+(h===!1?"is not supported by the environment":"is not available in the build"));let l=e?a.length>1?`since :
|
44
44
|
`+a.map(Mv).join(`
|
45
|
-
`):" "+Mv(a[0]):"as no adapter specified";throw new Te("There is no suitable adapter to dispatch the request "+l,"ERR_NOT_SUPPORT")}return r},adapters:jh};function ih(n){if(n.cancelToken&&n.cancelToken.throwIfRequested(),n.signal&&n.signal.aborted)throw new Oa(null,n)}function Dv(n){return ih(n),n.headers=yn.from(n.headers),n.data=oh.call(n,n.transformRequest),["post","put","patch"].indexOf(n.method)!==-1&&n.headers.setContentType("application/x-www-form-urlencoded",!1),FE.getAdapter(n.adapter||Ws.adapter)(n).then(function(r){return ih(n),r.data=oh.call(n,n.transformResponse,r),r.headers=yn.from(r.headers),r},function(r){return DE(r)||(ih(n),r&&r.response&&(r.response.data=oh.call(n,n.transformResponse,r.response),r.response.headers=yn.from(r.response.headers))),Promise.reject(r)})}const HE="1.7.9",iu={};["object","boolean","number","function","string","symbol"].forEach((n,e)=>{iu[n]=function(r){return typeof r===n||"a"+(e<1?"n ":" ")+n}});const Lv={};iu.transitional=function(e,t,r){function o(a,l){return"[Axios v"+HE+"] Transitional option '"+a+"'"+l+(r?". "+r:"")}return(a,l,d)=>{if(e===!1)throw new Te(o(l," has been removed"+(t?" in "+t:"")),Te.ERR_DEPRECATED);return t&&!Lv[l]&&(Lv[l]=!0,console.warn(o(l," has been deprecated since v"+t+" and will be removed in the near future"))),e?e(a,l,d):!0}};iu.spelling=function(e){return(t,r)=>(console.warn(`${r} is likely a misspelling of ${e}`),!0)};function
|
46
|
-
`+a):r.stack=a}catch{}}throw r}}_request(e,t){typeof e=="string"?(t=t||{},t.url=e):t=e||{},t=
|
45
|
+
`):" "+Mv(a[0]):"as no adapter specified";throw new Te("There is no suitable adapter to dispatch the request "+l,"ERR_NOT_SUPPORT")}return r},adapters:jh};function ih(n){if(n.cancelToken&&n.cancelToken.throwIfRequested(),n.signal&&n.signal.aborted)throw new Oa(null,n)}function Dv(n){return ih(n),n.headers=yn.from(n.headers),n.data=oh.call(n,n.transformRequest),["post","put","patch"].indexOf(n.method)!==-1&&n.headers.setContentType("application/x-www-form-urlencoded",!1),FE.getAdapter(n.adapter||Ws.adapter)(n).then(function(r){return ih(n),r.data=oh.call(n,n.transformResponse,r),r.headers=yn.from(r.headers),r},function(r){return DE(r)||(ih(n),r&&r.response&&(r.response.data=oh.call(n,n.transformResponse,r.response),r.response.headers=yn.from(r.response.headers))),Promise.reject(r)})}const HE="1.7.9",iu={};["object","boolean","number","function","string","symbol"].forEach((n,e)=>{iu[n]=function(r){return typeof r===n||"a"+(e<1?"n ":" ")+n}});const Lv={};iu.transitional=function(e,t,r){function o(a,l){return"[Axios v"+HE+"] Transitional option '"+a+"'"+l+(r?". "+r:"")}return(a,l,d)=>{if(e===!1)throw new Te(o(l," has been removed"+(t?" in "+t:"")),Te.ERR_DEPRECATED);return t&&!Lv[l]&&(Lv[l]=!0,console.warn(o(l," has been deprecated since v"+t+" and will be removed in the near future"))),e?e(a,l,d):!0}};iu.spelling=function(e){return(t,r)=>(console.warn(`${r} is likely a misspelling of ${e}`),!0)};function dV(n,e,t){if(typeof n!="object")throw new Te("options must be an object",Te.ERR_BAD_OPTION_VALUE);const r=Object.keys(n);let o=r.length;for(;o-- >0;){const a=r[o],l=e[a];if(l){const d=n[a],h=d===void 0||l(d,a,n);if(h!==!0)throw new Te("option "+a+" must be "+h,Te.ERR_BAD_OPTION_VALUE);continue}if(t!==!0)throw new Te("Unknown option "+a,Te.ERR_BAD_OPTION)}}const _l={assertOptions:dV,validators:iu},Mr=_l.validators;class vi{constructor(e){this.defaults=e,this.interceptors={request:new Iv,response:new Iv}}async request(e,t){try{return await this._request(e,t)}catch(r){if(r instanceof Error){let o={};Error.captureStackTrace?Error.captureStackTrace(o):o=new Error;const a=o.stack?o.stack.replace(/^.+\n/,""):"";try{r.stack?a&&!String(r.stack).endsWith(a.replace(/^.+\n.+\n/,""))&&(r.stack+=`
|
46
|
+
`+a):r.stack=a}catch{}}throw r}}_request(e,t){typeof e=="string"?(t=t||{},t.url=e):t=e||{},t=Ti(this.defaults,t);const{transitional:r,paramsSerializer:o,headers:a}=t;r!==void 0&&_l.assertOptions(r,{silentJSONParsing:Mr.transitional(Mr.boolean),forcedJSONParsing:Mr.transitional(Mr.boolean),clarifyTimeoutError:Mr.transitional(Mr.boolean)},!1),o!=null&&(B.isFunction(o)?t.paramsSerializer={serialize:o}:_l.assertOptions(o,{encode:Mr.function,serialize:Mr.function},!0)),_l.assertOptions(t,{baseUrl:Mr.spelling("baseURL"),withXsrfToken:Mr.spelling("withXSRFToken")},!0),t.method=(t.method||this.defaults.method||"get").toLowerCase();let l=a&&B.merge(a.common,a[t.method]);a&&B.forEach(["delete","get","head","post","put","patch","common"],C=>{delete a[C]}),t.headers=yn.concat(l,a);const d=[];let h=!0;this.interceptors.request.forEach(function(T){typeof T.runWhen=="function"&&T.runWhen(t)===!1||(h=h&&T.synchronous,d.unshift(T.fulfilled,T.rejected))});const f=[];this.interceptors.response.forEach(function(T){f.push(T.fulfilled,T.rejected)});let g,_=0,p;if(!h){const C=[Dv.bind(this),void 0];for(C.unshift.apply(C,d),C.push.apply(C,f),p=C.length,g=Promise.resolve(t);_<p;)g=g.then(C[_++],C[_++]);return g}p=d.length;let w=t;for(_=0;_<p;){const C=d[_++],T=d[_++];try{w=C(w)}catch(k){T.call(this,k);break}}try{g=Dv.call(this,w)}catch(C){return Promise.reject(C)}for(_=0,p=f.length;_<p;)g=g.then(f[_++],f[_++]);return g}getUri(e){e=Ti(this.defaults,e);const t=xE(e.baseURL,e.url);return OE(t,e.params,e.paramsSerializer)}}B.forEach(["delete","get","head","options"],function(e){vi.prototype[e]=function(t,r){return this.request(Ti(r||{},{method:e,url:t,data:(r||{}).data}))}});B.forEach(["post","put","patch"],function(e){function t(r){return function(a,l,d){return this.request(Ti(d||{},{method:e,headers:r?{"Content-Type":"multipart/form-data"}:{},url:a,data:l}))}}vi.prototype[e]=t(),vi.prototype[e+"Form"]=t(!0)});class Wf{constructor(e){if(typeof e!="function")throw new TypeError("executor must be a function.");let t;this.promise=new Promise(function(a){t=a});const r=this;this.promise.then(o=>{if(!r._listeners)return;let a=r._listeners.length;for(;a-- >0;)r._listeners[a](o);r._listeners=null}),this.promise.then=o=>{let a;const l=new Promise(d=>{r.subscribe(d),a=d}).then(o);return l.cancel=function(){r.unsubscribe(a)},l},e(function(a,l,d){r.reason||(r.reason=new Oa(a,l,d),t(r.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 t=this._listeners.indexOf(e);t!==-1&&this._listeners.splice(t,1)}toAbortSignal(){const e=new AbortController,t=r=>{e.abort(r)};return this.subscribe(t),e.signal.unsubscribe=()=>this.unsubscribe(t),e.signal}static source(){let e;return{token:new Wf(function(o){e=o}),cancel:e}}}function hV(n){return function(t){return n.apply(null,t)}}function fV(n){return B.isObject(n)&&n.isAxiosError===!0}const Yh={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent: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};Object.entries(Yh).forEach(([n,e])=>{Yh[e]=n});function $E(n){const e=new vi(n),t=yE(vi.prototype.request,e);return B.extend(t,vi.prototype,e,{allOwnKeys:!0}),B.extend(t,e,null,{allOwnKeys:!0}),t.create=function(o){return $E(Ti(n,o))},t}const yt=$E(Ws);yt.Axios=vi;yt.CanceledError=Oa;yt.CancelToken=Wf;yt.isCancel=DE;yt.VERSION=HE;yt.toFormData=ru;yt.AxiosError=Te;yt.Cancel=yt.CanceledError;yt.all=function(e){return Promise.all(e)};yt.spread=hV;yt.isAxiosError=fV;yt.mergeConfig=Ti;yt.AxiosHeaders=yn;yt.formToJSON=n=>ME(B.isHTMLForm(n)?new FormData(n):n);yt.getAdapter=FE.getAdapter;yt.HttpStatusCode=Yh;yt.default=yt;async function mV({url:n,method:e,header:t={},body:r,bearerToken:o}){const a=o?{Authorization:`Bearer ${o}`}:{};try{return(await yt({url:n,method:e,headers:{...t,...a},data:r??{}})).data}catch(l){throw console.error(`Request failed for ${e} ${n}:`,l),l}}var zc=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function gV(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var ds={exports:{}};/**
|
47
47
|
* @license
|
48
48
|
* Lodash <https://lodash.com/>
|
49
49
|
* Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
|
50
50
|
* Released under MIT license <https://lodash.com/license>
|
51
51
|
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
|
52
52
|
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
53
|
-
*/var gV=ds.exports,xv;function pV(){return xv||(xv=1,function(n,e){(function(){var t,r="4.17.21",o=200,a="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",l="Expected a function",d="Invalid `variable` option passed into `_.template`",h="__lodash_hash_undefined__",f=500,g="__lodash_placeholder__",_=1,p=2,w=4,C=1,T=2,k=1,I=2,N=4,D=8,L=16,K=32,q=64,M=128,ce=256,ae=512,X=30,ee="...",ue=800,Be=16,Ct=1,rn=2,qt=3,Mt=1/0,at=9007199254740991,Et=17976931348623157e292,on=NaN,St=4294967295,Yo=St-1,Ua=St>>>1,Ba=[["ary",M],["bind",k],["bindKey",I],["curry",D],["curryRight",L],["flip",ae],["partial",K],["partialRight",q],["rearg",ce]],Sr="[object Arguments]",Jo="[object Array]",Va="[object AsyncFunction]",Ar="[object Boolean]",qr="[object Date]",Fa="[object DOMException]",_o="[object Error]",vo="[object Function]",yo="[object GeneratorFunction]",Vt="[object Map]",En="[object Number]",Qo="[object Null]",wn="[object Object]",A="[object Promise]",R="[object Proxy]",G="[object RegExp]",oe="[object Set]",Je="[object String]",et="[object Symbol]",Me="[object Undefined]",F="[object WeakMap]",J="[object WeakSet]",Ne="[object ArrayBuffer]",ze="[object DataView]",cr="[object Float32Array]",Co="[object Float64Array]",kr="[object Int8Array]",lr="[object Int16Array]",Ha="[object Int32Array]",Ni="[object Uint8Array]",Eu="[object Uint8ClampedArray]",wu="[object Uint16Array]",Tu="[object Uint32Array]",qT=/\b__p \+= '';/g,jT=/\b(__p \+=) '' \+/g,YT=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Dm=/&(?:amp|lt|gt|quot|#39);/g,Lm=/[&<>"']/g,JT=RegExp(Dm.source),QT=RegExp(Lm.source),XT=/<%-([\s\S]+?)%>/g,ZT=/<%([\s\S]+?)%>/g,xm=/<%=([\s\S]+?)%>/g,eb=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,tb=/^\w*$/,nb=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,bu=/[\\^$.*+?()[\]{}|]/g,rb=RegExp(bu.source),Iu=/^\s+/,ob=/\s/,ib=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,ab=/\{\n\/\* \[wrapped with (.+)\] \*/,sb=/,? & /,cb=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,lb=/[()=,{}\[\]\/\s]/,ub=/\\(\\)?/g,db=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Um=/\w*$/,hb=/^[-+]0x[0-9a-f]+$/i,fb=/^0b[01]+$/i,mb=/^\[object .+?Constructor\]$/,gb=/^0o[0-7]+$/i,pb=/^(?:0|[1-9]\d*)$/,_b=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Ys=/($^)/,vb=/['\n\r\u2028\u2029\\]/g,Js="\\ud800-\\udfff",yb="\\u0300-\\u036f",Cb="\\ufe20-\\ufe2f",Eb="\\u20d0-\\u20ff",Bm=yb+Cb+Eb,Vm="\\u2700-\\u27bf",Fm="a-z\\xdf-\\xf6\\xf8-\\xff",wb="\\xac\\xb1\\xd7\\xf7",Tb="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",bb="\\u2000-\\u206f",Ib=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Hm="A-Z\\xc0-\\xd6\\xd8-\\xde",$m="\\ufe0e\\ufe0f",Km=wb+Tb+bb+Ib,Su="['’]",Sb="["+Js+"]",Wm="["+Km+"]",Qs="["+Bm+"]",zm="\\d+",Ab="["+Vm+"]",Gm="["+Fm+"]",qm="[^"+Js+Km+zm+Vm+Fm+Hm+"]",Au="\\ud83c[\\udffb-\\udfff]",kb="(?:"+Qs+"|"+Au+")",jm="[^"+Js+"]",ku="(?:\\ud83c[\\udde6-\\uddff]){2}",Nu="[\\ud800-\\udbff][\\udc00-\\udfff]",Ri="["+Hm+"]",Ym="\\u200d",Jm="(?:"+Gm+"|"+qm+")",Nb="(?:"+Ri+"|"+qm+")",Qm="(?:"+Su+"(?:d|ll|m|re|s|t|ve))?",Xm="(?:"+Su+"(?:D|LL|M|RE|S|T|VE))?",Zm=kb+"?",eg="["+$m+"]?",Rb="(?:"+Ym+"(?:"+[jm,ku,Nu].join("|")+")"+eg+Zm+")*",Ob="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Pb="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",tg=eg+Zm+Rb,Mb="(?:"+[Ab,ku,Nu].join("|")+")"+tg,Db="(?:"+[jm+Qs+"?",Qs,ku,Nu,Sb].join("|")+")",Lb=RegExp(Su,"g"),xb=RegExp(Qs,"g"),Ru=RegExp(Au+"(?="+Au+")|"+Db+tg,"g"),Ub=RegExp([Ri+"?"+Gm+"+"+Qm+"(?="+[Wm,Ri,"$"].join("|")+")",Nb+"+"+Xm+"(?="+[Wm,Ri+Jm,"$"].join("|")+")",Ri+"?"+Jm+"+"+Qm,Ri+"+"+Xm,Pb,Ob,zm,Mb].join("|"),"g"),Bb=RegExp("["+Ym+Js+Bm+$m+"]"),Vb=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Fb=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Hb=-1,ot={};ot[cr]=ot[Co]=ot[kr]=ot[lr]=ot[Ha]=ot[Ni]=ot[Eu]=ot[wu]=ot[Tu]=!0,ot[Sr]=ot[Jo]=ot[Ne]=ot[Ar]=ot[ze]=ot[qr]=ot[_o]=ot[vo]=ot[Vt]=ot[En]=ot[wn]=ot[G]=ot[oe]=ot[Je]=ot[F]=!1;var tt={};tt[Sr]=tt[Jo]=tt[Ne]=tt[ze]=tt[Ar]=tt[qr]=tt[cr]=tt[Co]=tt[kr]=tt[lr]=tt[Ha]=tt[Vt]=tt[En]=tt[wn]=tt[G]=tt[oe]=tt[Je]=tt[et]=tt[Ni]=tt[Eu]=tt[wu]=tt[Tu]=!0,tt[_o]=tt[vo]=tt[F]=!1;var $b={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},Kb={"&":"&","<":"<",">":">",'"':""","'":"'"},Wb={"&":"&","<":"<",">":">",""":'"',"'":"'"},zb={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Gb=parseFloat,qb=parseInt,ng=typeof zc=="object"&&zc&&zc.Object===Object&&zc,jb=typeof self=="object"&&self&&self.Object===Object&&self,Ft=ng||jb||Function("return this")(),Ou=e&&!e.nodeType&&e,Xo=Ou&&!0&&n&&!n.nodeType&&n,rg=Xo&&Xo.exports===Ou,Pu=rg&&ng.process,Hn=function(){try{var O=Xo&&Xo.require&&Xo.require("util").types;return O||Pu&&Pu.binding&&Pu.binding("util")}catch{}}(),og=Hn&&Hn.isArrayBuffer,ig=Hn&&Hn.isDate,ag=Hn&&Hn.isMap,sg=Hn&&Hn.isRegExp,cg=Hn&&Hn.isSet,lg=Hn&&Hn.isTypedArray;function Tn(O,H,U){switch(U.length){case 0:return O.call(H);case 1:return O.call(H,U[0]);case 2:return O.call(H,U[0],U[1]);case 3:return O.call(H,U[0],U[1],U[2])}return O.apply(H,U)}function Yb(O,H,U,re){for(var Ce=-1,Ve=O==null?0:O.length;++Ce<Ve;){var At=O[Ce];H(re,At,U(At),O)}return re}function $n(O,H){for(var U=-1,re=O==null?0:O.length;++U<re&&H(O[U],U,O)!==!1;);return O}function Jb(O,H){for(var U=O==null?0:O.length;U--&&H(O[U],U,O)!==!1;);return O}function ug(O,H){for(var U=-1,re=O==null?0:O.length;++U<re;)if(!H(O[U],U,O))return!1;return!0}function Eo(O,H){for(var U=-1,re=O==null?0:O.length,Ce=0,Ve=[];++U<re;){var At=O[U];H(At,U,O)&&(Ve[Ce++]=At)}return Ve}function Xs(O,H){var U=O==null?0:O.length;return!!U&&Oi(O,H,0)>-1}function Mu(O,H,U){for(var re=-1,Ce=O==null?0:O.length;++re<Ce;)if(U(H,O[re]))return!0;return!1}function st(O,H){for(var U=-1,re=O==null?0:O.length,Ce=Array(re);++U<re;)Ce[U]=H(O[U],U,O);return Ce}function wo(O,H){for(var U=-1,re=H.length,Ce=O.length;++U<re;)O[Ce+U]=H[U];return O}function Du(O,H,U,re){var Ce=-1,Ve=O==null?0:O.length;for(re&&Ve&&(U=O[++Ce]);++Ce<Ve;)U=H(U,O[Ce],Ce,O);return U}function Qb(O,H,U,re){var Ce=O==null?0:O.length;for(re&&Ce&&(U=O[--Ce]);Ce--;)U=H(U,O[Ce],Ce,O);return U}function Lu(O,H){for(var U=-1,re=O==null?0:O.length;++U<re;)if(H(O[U],U,O))return!0;return!1}var Xb=xu("length");function Zb(O){return O.split("")}function eI(O){return O.match(cb)||[]}function dg(O,H,U){var re;return U(O,function(Ce,Ve,At){if(H(Ce,Ve,At))return re=Ve,!1}),re}function Zs(O,H,U,re){for(var Ce=O.length,Ve=U+(re?1:-1);re?Ve--:++Ve<Ce;)if(H(O[Ve],Ve,O))return Ve;return-1}function Oi(O,H,U){return H===H?hI(O,H,U):Zs(O,hg,U)}function tI(O,H,U,re){for(var Ce=U-1,Ve=O.length;++Ce<Ve;)if(re(O[Ce],H))return Ce;return-1}function hg(O){return O!==O}function fg(O,H){var U=O==null?0:O.length;return U?Bu(O,H)/U:on}function xu(O){return function(H){return H==null?t:H[O]}}function Uu(O){return function(H){return O==null?t:O[H]}}function mg(O,H,U,re,Ce){return Ce(O,function(Ve,At,Qe){U=re?(re=!1,Ve):H(U,Ve,At,Qe)}),U}function nI(O,H){var U=O.length;for(O.sort(H);U--;)O[U]=O[U].value;return O}function Bu(O,H){for(var U,re=-1,Ce=O.length;++re<Ce;){var Ve=H(O[re]);Ve!==t&&(U=U===t?Ve:U+Ve)}return U}function Vu(O,H){for(var U=-1,re=Array(O);++U<O;)re[U]=H(U);return re}function rI(O,H){return st(H,function(U){return[U,O[U]]})}function gg(O){return O&&O.slice(0,yg(O)+1).replace(Iu,"")}function bn(O){return function(H){return O(H)}}function Fu(O,H){return st(H,function(U){return O[U]})}function $a(O,H){return O.has(H)}function pg(O,H){for(var U=-1,re=O.length;++U<re&&Oi(H,O[U],0)>-1;);return U}function _g(O,H){for(var U=O.length;U--&&Oi(H,O[U],0)>-1;);return U}function oI(O,H){for(var U=O.length,re=0;U--;)O[U]===H&&++re;return re}var iI=Uu($b),aI=Uu(Kb);function sI(O){return"\\"+zb[O]}function cI(O,H){return O==null?t:O[H]}function Pi(O){return Bb.test(O)}function lI(O){return Vb.test(O)}function uI(O){for(var H,U=[];!(H=O.next()).done;)U.push(H.value);return U}function Hu(O){var H=-1,U=Array(O.size);return O.forEach(function(re,Ce){U[++H]=[Ce,re]}),U}function vg(O,H){return function(U){return O(H(U))}}function To(O,H){for(var U=-1,re=O.length,Ce=0,Ve=[];++U<re;){var At=O[U];(At===H||At===g)&&(O[U]=g,Ve[Ce++]=U)}return Ve}function ec(O){var H=-1,U=Array(O.size);return O.forEach(function(re){U[++H]=re}),U}function dI(O){var H=-1,U=Array(O.size);return O.forEach(function(re){U[++H]=[re,re]}),U}function hI(O,H,U){for(var re=U-1,Ce=O.length;++re<Ce;)if(O[re]===H)return re;return-1}function fI(O,H,U){for(var re=U+1;re--;)if(O[re]===H)return re;return re}function Mi(O){return Pi(O)?gI(O):Xb(O)}function ur(O){return Pi(O)?pI(O):Zb(O)}function yg(O){for(var H=O.length;H--&&ob.test(O.charAt(H)););return H}var mI=Uu(Wb);function gI(O){for(var H=Ru.lastIndex=0;Ru.test(O);)++H;return H}function pI(O){return O.match(Ru)||[]}function _I(O){return O.match(Ub)||[]}var vI=function O(H){H=H==null?Ft:Di.defaults(Ft.Object(),H,Di.pick(Ft,Fb));var U=H.Array,re=H.Date,Ce=H.Error,Ve=H.Function,At=H.Math,Qe=H.Object,$u=H.RegExp,yI=H.String,Kn=H.TypeError,tc=U.prototype,CI=Ve.prototype,Li=Qe.prototype,nc=H["__core-js_shared__"],rc=CI.toString,$e=Li.hasOwnProperty,EI=0,Cg=function(){var i=/[^.]+$/.exec(nc&&nc.keys&&nc.keys.IE_PROTO||"");return i?"Symbol(src)_1."+i:""}(),oc=Li.toString,wI=rc.call(Qe),TI=Ft._,bI=$u("^"+rc.call($e).replace(bu,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),ic=rg?H.Buffer:t,bo=H.Symbol,ac=H.Uint8Array,Eg=ic?ic.allocUnsafe:t,sc=vg(Qe.getPrototypeOf,Qe),wg=Qe.create,Tg=Li.propertyIsEnumerable,cc=tc.splice,bg=bo?bo.isConcatSpreadable:t,Ka=bo?bo.iterator:t,Zo=bo?bo.toStringTag:t,lc=function(){try{var i=oi(Qe,"defineProperty");return i({},"",{}),i}catch{}}(),II=H.clearTimeout!==Ft.clearTimeout&&H.clearTimeout,SI=re&&re.now!==Ft.Date.now&&re.now,AI=H.setTimeout!==Ft.setTimeout&&H.setTimeout,uc=At.ceil,dc=At.floor,Ku=Qe.getOwnPropertySymbols,kI=ic?ic.isBuffer:t,Ig=H.isFinite,NI=tc.join,RI=vg(Qe.keys,Qe),kt=At.max,jt=At.min,OI=re.now,PI=H.parseInt,Sg=At.random,MI=tc.reverse,Wu=oi(H,"DataView"),Wa=oi(H,"Map"),zu=oi(H,"Promise"),xi=oi(H,"Set"),za=oi(H,"WeakMap"),Ga=oi(Qe,"create"),hc=za&&new za,Ui={},DI=ii(Wu),LI=ii(Wa),xI=ii(zu),UI=ii(xi),BI=ii(za),fc=bo?bo.prototype:t,qa=fc?fc.valueOf:t,Ag=fc?fc.toString:t;function y(i){if(dt(i)&&!Ee(i)&&!(i instanceof Oe)){if(i instanceof Wn)return i;if($e.call(i,"__wrapped__"))return kp(i)}return new Wn(i)}var Bi=function(){function i(){}return function(s){if(!ut(s))return{};if(wg)return wg(s);i.prototype=s;var u=new i;return i.prototype=t,u}}();function mc(){}function Wn(i,s){this.__wrapped__=i,this.__actions__=[],this.__chain__=!!s,this.__index__=0,this.__values__=t}y.templateSettings={escape:XT,evaluate:ZT,interpolate:xm,variable:"",imports:{_:y}},y.prototype=mc.prototype,y.prototype.constructor=y,Wn.prototype=Bi(mc.prototype),Wn.prototype.constructor=Wn;function Oe(i){this.__wrapped__=i,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=St,this.__views__=[]}function VI(){var i=new Oe(this.__wrapped__);return i.__actions__=hn(this.__actions__),i.__dir__=this.__dir__,i.__filtered__=this.__filtered__,i.__iteratees__=hn(this.__iteratees__),i.__takeCount__=this.__takeCount__,i.__views__=hn(this.__views__),i}function FI(){if(this.__filtered__){var i=new Oe(this);i.__dir__=-1,i.__filtered__=!0}else i=this.clone(),i.__dir__*=-1;return i}function HI(){var i=this.__wrapped__.value(),s=this.__dir__,u=Ee(i),m=s<0,v=u?i.length:0,E=ZS(0,v,this.__views__),b=E.start,S=E.end,P=S-b,W=m?S:b-1,z=this.__iteratees__,j=z.length,te=0,se=jt(P,this.__takeCount__);if(!u||!m&&v==P&&se==P)return Qg(i,this.__actions__);var he=[];e:for(;P--&&te<se;){W+=s;for(var Ie=-1,fe=i[W];++Ie<j;){var Re=z[Ie],Pe=Re.iteratee,An=Re.type,cn=Pe(fe);if(An==rn)fe=cn;else if(!cn){if(An==Ct)continue e;break e}}he[te++]=fe}return he}Oe.prototype=Bi(mc.prototype),Oe.prototype.constructor=Oe;function ei(i){var s=-1,u=i==null?0:i.length;for(this.clear();++s<u;){var m=i[s];this.set(m[0],m[1])}}function $I(){this.__data__=Ga?Ga(null):{},this.size=0}function KI(i){var s=this.has(i)&&delete this.__data__[i];return this.size-=s?1:0,s}function WI(i){var s=this.__data__;if(Ga){var u=s[i];return u===h?t:u}return $e.call(s,i)?s[i]:t}function zI(i){var s=this.__data__;return Ga?s[i]!==t:$e.call(s,i)}function GI(i,s){var u=this.__data__;return this.size+=this.has(i)?0:1,u[i]=Ga&&s===t?h:s,this}ei.prototype.clear=$I,ei.prototype.delete=KI,ei.prototype.get=WI,ei.prototype.has=zI,ei.prototype.set=GI;function jr(i){var s=-1,u=i==null?0:i.length;for(this.clear();++s<u;){var m=i[s];this.set(m[0],m[1])}}function qI(){this.__data__=[],this.size=0}function jI(i){var s=this.__data__,u=gc(s,i);if(u<0)return!1;var m=s.length-1;return u==m?s.pop():cc.call(s,u,1),--this.size,!0}function YI(i){var s=this.__data__,u=gc(s,i);return u<0?t:s[u][1]}function JI(i){return gc(this.__data__,i)>-1}function QI(i,s){var u=this.__data__,m=gc(u,i);return m<0?(++this.size,u.push([i,s])):u[m][1]=s,this}jr.prototype.clear=qI,jr.prototype.delete=jI,jr.prototype.get=YI,jr.prototype.has=JI,jr.prototype.set=QI;function Yr(i){var s=-1,u=i==null?0:i.length;for(this.clear();++s<u;){var m=i[s];this.set(m[0],m[1])}}function XI(){this.size=0,this.__data__={hash:new ei,map:new(Wa||jr),string:new ei}}function ZI(i){var s=Ac(this,i).delete(i);return this.size-=s?1:0,s}function eS(i){return Ac(this,i).get(i)}function tS(i){return Ac(this,i).has(i)}function nS(i,s){var u=Ac(this,i),m=u.size;return u.set(i,s),this.size+=u.size==m?0:1,this}Yr.prototype.clear=XI,Yr.prototype.delete=ZI,Yr.prototype.get=eS,Yr.prototype.has=tS,Yr.prototype.set=nS;function ti(i){var s=-1,u=i==null?0:i.length;for(this.__data__=new Yr;++s<u;)this.add(i[s])}function rS(i){return this.__data__.set(i,h),this}function oS(i){return this.__data__.has(i)}ti.prototype.add=ti.prototype.push=rS,ti.prototype.has=oS;function dr(i){var s=this.__data__=new jr(i);this.size=s.size}function iS(){this.__data__=new jr,this.size=0}function aS(i){var s=this.__data__,u=s.delete(i);return this.size=s.size,u}function sS(i){return this.__data__.get(i)}function cS(i){return this.__data__.has(i)}function lS(i,s){var u=this.__data__;if(u instanceof jr){var m=u.__data__;if(!Wa||m.length<o-1)return m.push([i,s]),this.size=++u.size,this;u=this.__data__=new Yr(m)}return u.set(i,s),this.size=u.size,this}dr.prototype.clear=iS,dr.prototype.delete=aS,dr.prototype.get=sS,dr.prototype.has=cS,dr.prototype.set=lS;function kg(i,s){var u=Ee(i),m=!u&&ai(i),v=!u&&!m&&No(i),E=!u&&!m&&!v&&$i(i),b=u||m||v||E,S=b?Vu(i.length,yI):[],P=S.length;for(var W in i)(s||$e.call(i,W))&&!(b&&(W=="length"||v&&(W=="offset"||W=="parent")||E&&(W=="buffer"||W=="byteLength"||W=="byteOffset")||Zr(W,P)))&&S.push(W);return S}function Ng(i){var s=i.length;return s?i[nd(0,s-1)]:t}function uS(i,s){return kc(hn(i),ni(s,0,i.length))}function dS(i){return kc(hn(i))}function Gu(i,s,u){(u!==t&&!hr(i[s],u)||u===t&&!(s in i))&&Jr(i,s,u)}function ja(i,s,u){var m=i[s];(!($e.call(i,s)&&hr(m,u))||u===t&&!(s in i))&&Jr(i,s,u)}function gc(i,s){for(var u=i.length;u--;)if(hr(i[u][0],s))return u;return-1}function hS(i,s,u,m){return Io(i,function(v,E,b){s(m,v,u(v),b)}),m}function Rg(i,s){return i&&Rr(s,Dt(s),i)}function fS(i,s){return i&&Rr(s,mn(s),i)}function Jr(i,s,u){s=="__proto__"&&lc?lc(i,s,{configurable:!0,enumerable:!0,value:u,writable:!0}):i[s]=u}function qu(i,s){for(var u=-1,m=s.length,v=U(m),E=i==null;++u<m;)v[u]=E?t:Ad(i,s[u]);return v}function ni(i,s,u){return i===i&&(u!==t&&(i=i<=u?i:u),s!==t&&(i=i>=s?i:s)),i}function zn(i,s,u,m,v,E){var b,S=s&_,P=s&p,W=s&w;if(u&&(b=v?u(i,m,v,E):u(i)),b!==t)return b;if(!ut(i))return i;var z=Ee(i);if(z){if(b=tA(i),!S)return hn(i,b)}else{var j=Yt(i),te=j==vo||j==yo;if(No(i))return ep(i,S);if(j==wn||j==Sr||te&&!v){if(b=P||te?{}:yp(i),!S)return P?WS(i,fS(b,i)):KS(i,Rg(b,i))}else{if(!tt[j])return v?i:{};b=nA(i,j,S)}}E||(E=new dr);var se=E.get(i);if(se)return se;E.set(i,b),jp(i)?i.forEach(function(fe){b.add(zn(fe,s,u,fe,i,E))}):Gp(i)&&i.forEach(function(fe,Re){b.set(Re,zn(fe,s,u,Re,i,E))});var he=W?P?fd:hd:P?mn:Dt,Ie=z?t:he(i);return $n(Ie||i,function(fe,Re){Ie&&(Re=fe,fe=i[Re]),ja(b,Re,zn(fe,s,u,Re,i,E))}),b}function mS(i){var s=Dt(i);return function(u){return Og(u,i,s)}}function Og(i,s,u){var m=u.length;if(i==null)return!m;for(i=Qe(i);m--;){var v=u[m],E=s[v],b=i[v];if(b===t&&!(v in i)||!E(b))return!1}return!0}function Pg(i,s,u){if(typeof i!="function")throw new Kn(l);return ts(function(){i.apply(t,u)},s)}function Ya(i,s,u,m){var v=-1,E=Xs,b=!0,S=i.length,P=[],W=s.length;if(!S)return P;u&&(s=st(s,bn(u))),m?(E=Mu,b=!1):s.length>=o&&(E=$a,b=!1,s=new ti(s));e:for(;++v<S;){var z=i[v],j=u==null?z:u(z);if(z=m||z!==0?z:0,b&&j===j){for(var te=W;te--;)if(s[te]===j)continue e;P.push(z)}else E(s,j,m)||P.push(z)}return P}var Io=ip(Nr),Mg=ip(Yu,!0);function gS(i,s){var u=!0;return Io(i,function(m,v,E){return u=!!s(m,v,E),u}),u}function pc(i,s,u){for(var m=-1,v=i.length;++m<v;){var E=i[m],b=s(E);if(b!=null&&(S===t?b===b&&!Sn(b):u(b,S)))var S=b,P=E}return P}function pS(i,s,u,m){var v=i.length;for(u=be(u),u<0&&(u=-u>v?0:v+u),m=m===t||m>v?v:be(m),m<0&&(m+=v),m=u>m?0:Jp(m);u<m;)i[u++]=s;return i}function Dg(i,s){var u=[];return Io(i,function(m,v,E){s(m,v,E)&&u.push(m)}),u}function Ht(i,s,u,m,v){var E=-1,b=i.length;for(u||(u=oA),v||(v=[]);++E<b;){var S=i[E];s>0&&u(S)?s>1?Ht(S,s-1,u,m,v):wo(v,S):m||(v[v.length]=S)}return v}var ju=ap(),Lg=ap(!0);function Nr(i,s){return i&&ju(i,s,Dt)}function Yu(i,s){return i&&Lg(i,s,Dt)}function _c(i,s){return Eo(s,function(u){return eo(i[u])})}function ri(i,s){s=Ao(s,i);for(var u=0,m=s.length;i!=null&&u<m;)i=i[Or(s[u++])];return u&&u==m?i:t}function xg(i,s,u){var m=s(i);return Ee(i)?m:wo(m,u(i))}function an(i){return i==null?i===t?Me:Qo:Zo&&Zo in Qe(i)?XS(i):dA(i)}function Ju(i,s){return i>s}function _S(i,s){return i!=null&&$e.call(i,s)}function vS(i,s){return i!=null&&s in Qe(i)}function yS(i,s,u){return i>=jt(s,u)&&i<kt(s,u)}function Qu(i,s,u){for(var m=u?Mu:Xs,v=i[0].length,E=i.length,b=E,S=U(E),P=1/0,W=[];b--;){var z=i[b];b&&s&&(z=st(z,bn(s))),P=jt(z.length,P),S[b]=!u&&(s||v>=120&&z.length>=120)?new ti(b&&z):t}z=i[0];var j=-1,te=S[0];e:for(;++j<v&&W.length<P;){var se=z[j],he=s?s(se):se;if(se=u||se!==0?se:0,!(te?$a(te,he):m(W,he,u))){for(b=E;--b;){var Ie=S[b];if(!(Ie?$a(Ie,he):m(i[b],he,u)))continue e}te&&te.push(he),W.push(se)}}return W}function CS(i,s,u,m){return Nr(i,function(v,E,b){s(m,u(v),E,b)}),m}function Ja(i,s,u){s=Ao(s,i),i=Tp(i,s);var m=i==null?i:i[Or(qn(s))];return m==null?t:Tn(m,i,u)}function Ug(i){return dt(i)&&an(i)==Sr}function ES(i){return dt(i)&&an(i)==Ne}function wS(i){return dt(i)&&an(i)==qr}function Qa(i,s,u,m,v){return i===s?!0:i==null||s==null||!dt(i)&&!dt(s)?i!==i&&s!==s:TS(i,s,u,m,Qa,v)}function TS(i,s,u,m,v,E){var b=Ee(i),S=Ee(s),P=b?Jo:Yt(i),W=S?Jo:Yt(s);P=P==Sr?wn:P,W=W==Sr?wn:W;var z=P==wn,j=W==wn,te=P==W;if(te&&No(i)){if(!No(s))return!1;b=!0,z=!1}if(te&&!z)return E||(E=new dr),b||$i(i)?pp(i,s,u,m,v,E):JS(i,s,P,u,m,v,E);if(!(u&C)){var se=z&&$e.call(i,"__wrapped__"),he=j&&$e.call(s,"__wrapped__");if(se||he){var Ie=se?i.value():i,fe=he?s.value():s;return E||(E=new dr),v(Ie,fe,u,m,E)}}return te?(E||(E=new dr),QS(i,s,u,m,v,E)):!1}function bS(i){return dt(i)&&Yt(i)==Vt}function Xu(i,s,u,m){var v=u.length,E=v,b=!m;if(i==null)return!E;for(i=Qe(i);v--;){var S=u[v];if(b&&S[2]?S[1]!==i[S[0]]:!(S[0]in i))return!1}for(;++v<E;){S=u[v];var P=S[0],W=i[P],z=S[1];if(b&&S[2]){if(W===t&&!(P in i))return!1}else{var j=new dr;if(m)var te=m(W,z,P,i,s,j);if(!(te===t?Qa(z,W,C|T,m,j):te))return!1}}return!0}function Bg(i){if(!ut(i)||aA(i))return!1;var s=eo(i)?bI:mb;return s.test(ii(i))}function IS(i){return dt(i)&&an(i)==G}function SS(i){return dt(i)&&Yt(i)==oe}function AS(i){return dt(i)&&Dc(i.length)&&!!ot[an(i)]}function Vg(i){return typeof i=="function"?i:i==null?gn:typeof i=="object"?Ee(i)?$g(i[0],i[1]):Hg(i):s_(i)}function Zu(i){if(!es(i))return RI(i);var s=[];for(var u in Qe(i))$e.call(i,u)&&u!="constructor"&&s.push(u);return s}function kS(i){if(!ut(i))return uA(i);var s=es(i),u=[];for(var m in i)m=="constructor"&&(s||!$e.call(i,m))||u.push(m);return u}function ed(i,s){return i<s}function Fg(i,s){var u=-1,m=fn(i)?U(i.length):[];return Io(i,function(v,E,b){m[++u]=s(v,E,b)}),m}function Hg(i){var s=gd(i);return s.length==1&&s[0][2]?Ep(s[0][0],s[0][1]):function(u){return u===i||Xu(u,i,s)}}function $g(i,s){return _d(i)&&Cp(s)?Ep(Or(i),s):function(u){var m=Ad(u,i);return m===t&&m===s?kd(u,i):Qa(s,m,C|T)}}function vc(i,s,u,m,v){i!==s&&ju(s,function(E,b){if(v||(v=new dr),ut(E))NS(i,s,b,u,vc,m,v);else{var S=m?m(yd(i,b),E,b+"",i,s,v):t;S===t&&(S=E),Gu(i,b,S)}},mn)}function NS(i,s,u,m,v,E,b){var S=yd(i,u),P=yd(s,u),W=b.get(P);if(W){Gu(i,u,W);return}var z=E?E(S,P,u+"",i,s,b):t,j=z===t;if(j){var te=Ee(P),se=!te&&No(P),he=!te&&!se&&$i(P);z=P,te||se||he?Ee(S)?z=S:gt(S)?z=hn(S):se?(j=!1,z=ep(P,!0)):he?(j=!1,z=tp(P,!0)):z=[]:ns(P)||ai(P)?(z=S,ai(S)?z=Qp(S):(!ut(S)||eo(S))&&(z=yp(P))):j=!1}j&&(b.set(P,z),v(z,P,m,E,b),b.delete(P)),Gu(i,u,z)}function Kg(i,s){var u=i.length;if(u)return s+=s<0?u:0,Zr(s,u)?i[s]:t}function Wg(i,s,u){s.length?s=st(s,function(E){return Ee(E)?function(b){return ri(b,E.length===1?E[0]:E)}:E}):s=[gn];var m=-1;s=st(s,bn(de()));var v=Fg(i,function(E,b,S){var P=st(s,function(W){return W(E)});return{criteria:P,index:++m,value:E}});return nI(v,function(E,b){return $S(E,b,u)})}function RS(i,s){return zg(i,s,function(u,m){return kd(i,m)})}function zg(i,s,u){for(var m=-1,v=s.length,E={};++m<v;){var b=s[m],S=ri(i,b);u(S,b)&&Xa(E,Ao(b,i),S)}return E}function OS(i){return function(s){return ri(s,i)}}function td(i,s,u,m){var v=m?tI:Oi,E=-1,b=s.length,S=i;for(i===s&&(s=hn(s)),u&&(S=st(i,bn(u)));++E<b;)for(var P=0,W=s[E],z=u?u(W):W;(P=v(S,z,P,m))>-1;)S!==i&&cc.call(S,P,1),cc.call(i,P,1);return i}function Gg(i,s){for(var u=i?s.length:0,m=u-1;u--;){var v=s[u];if(u==m||v!==E){var E=v;Zr(v)?cc.call(i,v,1):id(i,v)}}return i}function nd(i,s){return i+dc(Sg()*(s-i+1))}function PS(i,s,u,m){for(var v=-1,E=kt(uc((s-i)/(u||1)),0),b=U(E);E--;)b[m?E:++v]=i,i+=u;return b}function rd(i,s){var u="";if(!i||s<1||s>at)return u;do s%2&&(u+=i),s=dc(s/2),s&&(i+=i);while(s);return u}function Se(i,s){return Cd(wp(i,s,gn),i+"")}function MS(i){return Ng(Ki(i))}function DS(i,s){var u=Ki(i);return kc(u,ni(s,0,u.length))}function Xa(i,s,u,m){if(!ut(i))return i;s=Ao(s,i);for(var v=-1,E=s.length,b=E-1,S=i;S!=null&&++v<E;){var P=Or(s[v]),W=u;if(P==="__proto__"||P==="constructor"||P==="prototype")return i;if(v!=b){var z=S[P];W=m?m(z,P,S):t,W===t&&(W=ut(z)?z:Zr(s[v+1])?[]:{})}ja(S,P,W),S=S[P]}return i}var qg=hc?function(i,s){return hc.set(i,s),i}:gn,LS=lc?function(i,s){return lc(i,"toString",{configurable:!0,enumerable:!1,value:Rd(s),writable:!0})}:gn;function xS(i){return kc(Ki(i))}function Gn(i,s,u){var m=-1,v=i.length;s<0&&(s=-s>v?0:v+s),u=u>v?v:u,u<0&&(u+=v),v=s>u?0:u-s>>>0,s>>>=0;for(var E=U(v);++m<v;)E[m]=i[m+s];return E}function US(i,s){var u;return Io(i,function(m,v,E){return u=s(m,v,E),!u}),!!u}function yc(i,s,u){var m=0,v=i==null?m:i.length;if(typeof s=="number"&&s===s&&v<=Ua){for(;m<v;){var E=m+v>>>1,b=i[E];b!==null&&!Sn(b)&&(u?b<=s:b<s)?m=E+1:v=E}return v}return od(i,s,gn,u)}function od(i,s,u,m){var v=0,E=i==null?0:i.length;if(E===0)return 0;s=u(s);for(var b=s!==s,S=s===null,P=Sn(s),W=s===t;v<E;){var z=dc((v+E)/2),j=u(i[z]),te=j!==t,se=j===null,he=j===j,Ie=Sn(j);if(b)var fe=m||he;else W?fe=he&&(m||te):S?fe=he&&te&&(m||!se):P?fe=he&&te&&!se&&(m||!Ie):se||Ie?fe=!1:fe=m?j<=s:j<s;fe?v=z+1:E=z}return jt(E,Yo)}function jg(i,s){for(var u=-1,m=i.length,v=0,E=[];++u<m;){var b=i[u],S=s?s(b):b;if(!u||!hr(S,P)){var P=S;E[v++]=b===0?0:b}}return E}function Yg(i){return typeof i=="number"?i:Sn(i)?on:+i}function In(i){if(typeof i=="string")return i;if(Ee(i))return st(i,In)+"";if(Sn(i))return Ag?Ag.call(i):"";var s=i+"";return s=="0"&&1/i==-Mt?"-0":s}function So(i,s,u){var m=-1,v=Xs,E=i.length,b=!0,S=[],P=S;if(u)b=!1,v=Mu;else if(E>=o){var W=s?null:jS(i);if(W)return ec(W);b=!1,v=$a,P=new ti}else P=s?[]:S;e:for(;++m<E;){var z=i[m],j=s?s(z):z;if(z=u||z!==0?z:0,b&&j===j){for(var te=P.length;te--;)if(P[te]===j)continue e;s&&P.push(j),S.push(z)}else v(P,j,u)||(P!==S&&P.push(j),S.push(z))}return S}function id(i,s){return s=Ao(s,i),i=Tp(i,s),i==null||delete i[Or(qn(s))]}function Jg(i,s,u,m){return Xa(i,s,u(ri(i,s)),m)}function Cc(i,s,u,m){for(var v=i.length,E=m?v:-1;(m?E--:++E<v)&&s(i[E],E,i););return u?Gn(i,m?0:E,m?E+1:v):Gn(i,m?E+1:0,m?v:E)}function Qg(i,s){var u=i;return u instanceof Oe&&(u=u.value()),Du(s,function(m,v){return v.func.apply(v.thisArg,wo([m],v.args))},u)}function ad(i,s,u){var m=i.length;if(m<2)return m?So(i[0]):[];for(var v=-1,E=U(m);++v<m;)for(var b=i[v],S=-1;++S<m;)S!=v&&(E[v]=Ya(E[v]||b,i[S],s,u));return So(Ht(E,1),s,u)}function Xg(i,s,u){for(var m=-1,v=i.length,E=s.length,b={};++m<v;){var S=m<E?s[m]:t;u(b,i[m],S)}return b}function sd(i){return gt(i)?i:[]}function cd(i){return typeof i=="function"?i:gn}function Ao(i,s){return Ee(i)?i:_d(i,s)?[i]:Ap(He(i))}var BS=Se;function ko(i,s,u){var m=i.length;return u=u===t?m:u,!s&&u>=m?i:Gn(i,s,u)}var Zg=II||function(i){return Ft.clearTimeout(i)};function ep(i,s){if(s)return i.slice();var u=i.length,m=Eg?Eg(u):new i.constructor(u);return i.copy(m),m}function ld(i){var s=new i.constructor(i.byteLength);return new ac(s).set(new ac(i)),s}function VS(i,s){var u=s?ld(i.buffer):i.buffer;return new i.constructor(u,i.byteOffset,i.byteLength)}function FS(i){var s=new i.constructor(i.source,Um.exec(i));return s.lastIndex=i.lastIndex,s}function HS(i){return qa?Qe(qa.call(i)):{}}function tp(i,s){var u=s?ld(i.buffer):i.buffer;return new i.constructor(u,i.byteOffset,i.length)}function np(i,s){if(i!==s){var u=i!==t,m=i===null,v=i===i,E=Sn(i),b=s!==t,S=s===null,P=s===s,W=Sn(s);if(!S&&!W&&!E&&i>s||E&&b&&P&&!S&&!W||m&&b&&P||!u&&P||!v)return 1;if(!m&&!E&&!W&&i<s||W&&u&&v&&!m&&!E||S&&u&&v||!b&&v||!P)return-1}return 0}function $S(i,s,u){for(var m=-1,v=i.criteria,E=s.criteria,b=v.length,S=u.length;++m<b;){var P=np(v[m],E[m]);if(P){if(m>=S)return P;var W=u[m];return P*(W=="desc"?-1:1)}}return i.index-s.index}function rp(i,s,u,m){for(var v=-1,E=i.length,b=u.length,S=-1,P=s.length,W=kt(E-b,0),z=U(P+W),j=!m;++S<P;)z[S]=s[S];for(;++v<b;)(j||v<E)&&(z[u[v]]=i[v]);for(;W--;)z[S++]=i[v++];return z}function op(i,s,u,m){for(var v=-1,E=i.length,b=-1,S=u.length,P=-1,W=s.length,z=kt(E-S,0),j=U(z+W),te=!m;++v<z;)j[v]=i[v];for(var se=v;++P<W;)j[se+P]=s[P];for(;++b<S;)(te||v<E)&&(j[se+u[b]]=i[v++]);return j}function hn(i,s){var u=-1,m=i.length;for(s||(s=U(m));++u<m;)s[u]=i[u];return s}function Rr(i,s,u,m){var v=!u;u||(u={});for(var E=-1,b=s.length;++E<b;){var S=s[E],P=m?m(u[S],i[S],S,u,i):t;P===t&&(P=i[S]),v?Jr(u,S,P):ja(u,S,P)}return u}function KS(i,s){return Rr(i,pd(i),s)}function WS(i,s){return Rr(i,_p(i),s)}function Ec(i,s){return function(u,m){var v=Ee(u)?Yb:hS,E=s?s():{};return v(u,i,de(m,2),E)}}function Vi(i){return Se(function(s,u){var m=-1,v=u.length,E=v>1?u[v-1]:t,b=v>2?u[2]:t;for(E=i.length>3&&typeof E=="function"?(v--,E):t,b&&sn(u[0],u[1],b)&&(E=v<3?t:E,v=1),s=Qe(s);++m<v;){var S=u[m];S&&i(s,S,m,E)}return s})}function ip(i,s){return function(u,m){if(u==null)return u;if(!fn(u))return i(u,m);for(var v=u.length,E=s?v:-1,b=Qe(u);(s?E--:++E<v)&&m(b[E],E,b)!==!1;);return u}}function ap(i){return function(s,u,m){for(var v=-1,E=Qe(s),b=m(s),S=b.length;S--;){var P=b[i?S:++v];if(u(E[P],P,E)===!1)break}return s}}function zS(i,s,u){var m=s&k,v=Za(i);function E(){var b=this&&this!==Ft&&this instanceof E?v:i;return b.apply(m?u:this,arguments)}return E}function sp(i){return function(s){s=He(s);var u=Pi(s)?ur(s):t,m=u?u[0]:s.charAt(0),v=u?ko(u,1).join(""):s.slice(1);return m[i]()+v}}function Fi(i){return function(s){return Du(i_(o_(s).replace(Lb,"")),i,"")}}function Za(i){return function(){var s=arguments;switch(s.length){case 0:return new i;case 1:return new i(s[0]);case 2:return new i(s[0],s[1]);case 3:return new i(s[0],s[1],s[2]);case 4:return new i(s[0],s[1],s[2],s[3]);case 5:return new i(s[0],s[1],s[2],s[3],s[4]);case 6:return new i(s[0],s[1],s[2],s[3],s[4],s[5]);case 7:return new i(s[0],s[1],s[2],s[3],s[4],s[5],s[6])}var u=Bi(i.prototype),m=i.apply(u,s);return ut(m)?m:u}}function GS(i,s,u){var m=Za(i);function v(){for(var E=arguments.length,b=U(E),S=E,P=Hi(v);S--;)b[S]=arguments[S];var W=E<3&&b[0]!==P&&b[E-1]!==P?[]:To(b,P);if(E-=W.length,E<u)return hp(i,s,wc,v.placeholder,t,b,W,t,t,u-E);var z=this&&this!==Ft&&this instanceof v?m:i;return Tn(z,this,b)}return v}function cp(i){return function(s,u,m){var v=Qe(s);if(!fn(s)){var E=de(u,3);s=Dt(s),u=function(S){return E(v[S],S,v)}}var b=i(s,u,m);return b>-1?v[E?s[b]:b]:t}}function lp(i){return Xr(function(s){var u=s.length,m=u,v=Wn.prototype.thru;for(i&&s.reverse();m--;){var E=s[m];if(typeof E!="function")throw new Kn(l);if(v&&!b&&Sc(E)=="wrapper")var b=new Wn([],!0)}for(m=b?m:u;++m<u;){E=s[m];var S=Sc(E),P=S=="wrapper"?md(E):t;P&&vd(P[0])&&P[1]==(M|D|K|ce)&&!P[4].length&&P[9]==1?b=b[Sc(P[0])].apply(b,P[3]):b=E.length==1&&vd(E)?b[S]():b.thru(E)}return function(){var W=arguments,z=W[0];if(b&&W.length==1&&Ee(z))return b.plant(z).value();for(var j=0,te=u?s[j].apply(this,W):z;++j<u;)te=s[j].call(this,te);return te}})}function wc(i,s,u,m,v,E,b,S,P,W){var z=s&M,j=s&k,te=s&I,se=s&(D|L),he=s&ae,Ie=te?t:Za(i);function fe(){for(var Re=arguments.length,Pe=U(Re),An=Re;An--;)Pe[An]=arguments[An];if(se)var cn=Hi(fe),kn=oI(Pe,cn);if(m&&(Pe=rp(Pe,m,v,se)),E&&(Pe=op(Pe,E,b,se)),Re-=kn,se&&Re<W){var pt=To(Pe,cn);return hp(i,s,wc,fe.placeholder,u,Pe,pt,S,P,W-Re)}var fr=j?u:this,no=te?fr[i]:i;return Re=Pe.length,S?Pe=hA(Pe,S):he&&Re>1&&Pe.reverse(),z&&P<Re&&(Pe.length=P),this&&this!==Ft&&this instanceof fe&&(no=Ie||Za(no)),no.apply(fr,Pe)}return fe}function up(i,s){return function(u,m){return CS(u,i,s(m),{})}}function Tc(i,s){return function(u,m){var v;if(u===t&&m===t)return s;if(u!==t&&(v=u),m!==t){if(v===t)return m;typeof u=="string"||typeof m=="string"?(u=In(u),m=In(m)):(u=Yg(u),m=Yg(m)),v=i(u,m)}return v}}function ud(i){return Xr(function(s){return s=st(s,bn(de())),Se(function(u){var m=this;return i(s,function(v){return Tn(v,m,u)})})})}function bc(i,s){s=s===t?" ":In(s);var u=s.length;if(u<2)return u?rd(s,i):s;var m=rd(s,uc(i/Mi(s)));return Pi(s)?ko(ur(m),0,i).join(""):m.slice(0,i)}function qS(i,s,u,m){var v=s&k,E=Za(i);function b(){for(var S=-1,P=arguments.length,W=-1,z=m.length,j=U(z+P),te=this&&this!==Ft&&this instanceof b?E:i;++W<z;)j[W]=m[W];for(;P--;)j[W++]=arguments[++S];return Tn(te,v?u:this,j)}return b}function dp(i){return function(s,u,m){return m&&typeof m!="number"&&sn(s,u,m)&&(u=m=t),s=to(s),u===t?(u=s,s=0):u=to(u),m=m===t?s<u?1:-1:to(m),PS(s,u,m,i)}}function Ic(i){return function(s,u){return typeof s=="string"&&typeof u=="string"||(s=jn(s),u=jn(u)),i(s,u)}}function hp(i,s,u,m,v,E,b,S,P,W){var z=s&D,j=z?b:t,te=z?t:b,se=z?E:t,he=z?t:E;s|=z?K:q,s&=~(z?q:K),s&N||(s&=~(k|I));var Ie=[i,s,v,se,j,he,te,S,P,W],fe=u.apply(t,Ie);return vd(i)&&bp(fe,Ie),fe.placeholder=m,Ip(fe,i,s)}function dd(i){var s=At[i];return function(u,m){if(u=jn(u),m=m==null?0:jt(be(m),292),m&&Ig(u)){var v=(He(u)+"e").split("e"),E=s(v[0]+"e"+(+v[1]+m));return v=(He(E)+"e").split("e"),+(v[0]+"e"+(+v[1]-m))}return s(u)}}var jS=xi&&1/ec(new xi([,-0]))[1]==Mt?function(i){return new xi(i)}:Md;function fp(i){return function(s){var u=Yt(s);return u==Vt?Hu(s):u==oe?dI(s):rI(s,i(s))}}function Qr(i,s,u,m,v,E,b,S){var P=s&I;if(!P&&typeof i!="function")throw new Kn(l);var W=m?m.length:0;if(W||(s&=~(K|q),m=v=t),b=b===t?b:kt(be(b),0),S=S===t?S:be(S),W-=v?v.length:0,s&q){var z=m,j=v;m=v=t}var te=P?t:md(i),se=[i,s,u,m,v,z,j,E,b,S];if(te&&lA(se,te),i=se[0],s=se[1],u=se[2],m=se[3],v=se[4],S=se[9]=se[9]===t?P?0:i.length:kt(se[9]-W,0),!S&&s&(D|L)&&(s&=~(D|L)),!s||s==k)var he=zS(i,s,u);else s==D||s==L?he=GS(i,s,S):(s==K||s==(k|K))&&!v.length?he=qS(i,s,u,m):he=wc.apply(t,se);var Ie=te?qg:bp;return Ip(Ie(he,se),i,s)}function mp(i,s,u,m){return i===t||hr(i,Li[u])&&!$e.call(m,u)?s:i}function gp(i,s,u,m,v,E){return ut(i)&&ut(s)&&(E.set(s,i),vc(i,s,t,gp,E),E.delete(s)),i}function YS(i){return ns(i)?t:i}function pp(i,s,u,m,v,E){var b=u&C,S=i.length,P=s.length;if(S!=P&&!(b&&P>S))return!1;var W=E.get(i),z=E.get(s);if(W&&z)return W==s&&z==i;var j=-1,te=!0,se=u&T?new ti:t;for(E.set(i,s),E.set(s,i);++j<S;){var he=i[j],Ie=s[j];if(m)var fe=b?m(Ie,he,j,s,i,E):m(he,Ie,j,i,s,E);if(fe!==t){if(fe)continue;te=!1;break}if(se){if(!Lu(s,function(Re,Pe){if(!$a(se,Pe)&&(he===Re||v(he,Re,u,m,E)))return se.push(Pe)})){te=!1;break}}else if(!(he===Ie||v(he,Ie,u,m,E))){te=!1;break}}return E.delete(i),E.delete(s),te}function JS(i,s,u,m,v,E,b){switch(u){case ze:if(i.byteLength!=s.byteLength||i.byteOffset!=s.byteOffset)return!1;i=i.buffer,s=s.buffer;case Ne:return!(i.byteLength!=s.byteLength||!E(new ac(i),new ac(s)));case Ar:case qr:case En:return hr(+i,+s);case _o:return i.name==s.name&&i.message==s.message;case G:case Je:return i==s+"";case Vt:var S=Hu;case oe:var P=m&C;if(S||(S=ec),i.size!=s.size&&!P)return!1;var W=b.get(i);if(W)return W==s;m|=T,b.set(i,s);var z=pp(S(i),S(s),m,v,E,b);return b.delete(i),z;case et:if(qa)return qa.call(i)==qa.call(s)}return!1}function QS(i,s,u,m,v,E){var b=u&C,S=hd(i),P=S.length,W=hd(s),z=W.length;if(P!=z&&!b)return!1;for(var j=P;j--;){var te=S[j];if(!(b?te in s:$e.call(s,te)))return!1}var se=E.get(i),he=E.get(s);if(se&&he)return se==s&&he==i;var Ie=!0;E.set(i,s),E.set(s,i);for(var fe=b;++j<P;){te=S[j];var Re=i[te],Pe=s[te];if(m)var An=b?m(Pe,Re,te,s,i,E):m(Re,Pe,te,i,s,E);if(!(An===t?Re===Pe||v(Re,Pe,u,m,E):An)){Ie=!1;break}fe||(fe=te=="constructor")}if(Ie&&!fe){var cn=i.constructor,kn=s.constructor;cn!=kn&&"constructor"in i&&"constructor"in s&&!(typeof cn=="function"&&cn instanceof cn&&typeof kn=="function"&&kn instanceof kn)&&(Ie=!1)}return E.delete(i),E.delete(s),Ie}function Xr(i){return Cd(wp(i,t,Op),i+"")}function hd(i){return xg(i,Dt,pd)}function fd(i){return xg(i,mn,_p)}var md=hc?function(i){return hc.get(i)}:Md;function Sc(i){for(var s=i.name+"",u=Ui[s],m=$e.call(Ui,s)?u.length:0;m--;){var v=u[m],E=v.func;if(E==null||E==i)return v.name}return s}function Hi(i){var s=$e.call(y,"placeholder")?y:i;return s.placeholder}function de(){var i=y.iteratee||Od;return i=i===Od?Vg:i,arguments.length?i(arguments[0],arguments[1]):i}function Ac(i,s){var u=i.__data__;return iA(s)?u[typeof s=="string"?"string":"hash"]:u.map}function gd(i){for(var s=Dt(i),u=s.length;u--;){var m=s[u],v=i[m];s[u]=[m,v,Cp(v)]}return s}function oi(i,s){var u=cI(i,s);return Bg(u)?u:t}function XS(i){var s=$e.call(i,Zo),u=i[Zo];try{i[Zo]=t;var m=!0}catch{}var v=oc.call(i);return m&&(s?i[Zo]=u:delete i[Zo]),v}var pd=Ku?function(i){return i==null?[]:(i=Qe(i),Eo(Ku(i),function(s){return Tg.call(i,s)}))}:Dd,_p=Ku?function(i){for(var s=[];i;)wo(s,pd(i)),i=sc(i);return s}:Dd,Yt=an;(Wu&&Yt(new Wu(new ArrayBuffer(1)))!=ze||Wa&&Yt(new Wa)!=Vt||zu&&Yt(zu.resolve())!=A||xi&&Yt(new xi)!=oe||za&&Yt(new za)!=F)&&(Yt=function(i){var s=an(i),u=s==wn?i.constructor:t,m=u?ii(u):"";if(m)switch(m){case DI:return ze;case LI:return Vt;case xI:return A;case UI:return oe;case BI:return F}return s});function ZS(i,s,u){for(var m=-1,v=u.length;++m<v;){var E=u[m],b=E.size;switch(E.type){case"drop":i+=b;break;case"dropRight":s-=b;break;case"take":s=jt(s,i+b);break;case"takeRight":i=kt(i,s-b);break}}return{start:i,end:s}}function eA(i){var s=i.match(ab);return s?s[1].split(sb):[]}function vp(i,s,u){s=Ao(s,i);for(var m=-1,v=s.length,E=!1;++m<v;){var b=Or(s[m]);if(!(E=i!=null&&u(i,b)))break;i=i[b]}return E||++m!=v?E:(v=i==null?0:i.length,!!v&&Dc(v)&&Zr(b,v)&&(Ee(i)||ai(i)))}function tA(i){var s=i.length,u=new i.constructor(s);return s&&typeof i[0]=="string"&&$e.call(i,"index")&&(u.index=i.index,u.input=i.input),u}function yp(i){return typeof i.constructor=="function"&&!es(i)?Bi(sc(i)):{}}function nA(i,s,u){var m=i.constructor;switch(s){case Ne:return ld(i);case Ar:case qr:return new m(+i);case ze:return VS(i,u);case cr:case Co:case kr:case lr:case Ha:case Ni:case Eu:case wu:case Tu:return tp(i,u);case Vt:return new m;case En:case Je:return new m(i);case G:return FS(i);case oe:return new m;case et:return HS(i)}}function rA(i,s){var u=s.length;if(!u)return i;var m=u-1;return s[m]=(u>1?"& ":"")+s[m],s=s.join(u>2?", ":" "),i.replace(ib,`{
|
53
|
+
*/var pV=ds.exports,xv;function _V(){return xv||(xv=1,function(n,e){(function(){var t,r="4.17.21",o=200,a="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",l="Expected a function",d="Invalid `variable` option passed into `_.template`",h="__lodash_hash_undefined__",f=500,g="__lodash_placeholder__",_=1,p=2,w=4,C=1,T=2,k=1,S=2,N=4,D=8,L=16,K=32,q=64,M=128,ce=256,ae=512,X=30,ee="...",ue=800,Be=16,Ct=1,rn=2,qt=3,Mt=1/0,at=9007199254740991,Et=17976931348623157e292,on=NaN,It=4294967295,Jo=It-1,Ua=It>>>1,Ba=[["ary",M],["bind",k],["bindKey",S],["curry",D],["curryRight",L],["flip",ae],["partial",K],["partialRight",q],["rearg",ce]],Ir="[object Arguments]",Qo="[object Array]",Va="[object AsyncFunction]",Ar="[object Boolean]",qr="[object Date]",Fa="[object DOMException]",vo="[object Error]",yo="[object Function]",Co="[object GeneratorFunction]",Vt="[object Map]",En="[object Number]",Xo="[object Null]",wn="[object Object]",A="[object Promise]",R="[object Proxy]",G="[object RegExp]",oe="[object Set]",Je="[object String]",et="[object Symbol]",Me="[object Undefined]",F="[object WeakMap]",J="[object WeakSet]",Ne="[object ArrayBuffer]",ze="[object DataView]",cr="[object Float32Array]",Eo="[object Float64Array]",kr="[object Int8Array]",lr="[object Int16Array]",Ha="[object Int32Array]",Ri="[object Uint8Array]",Eu="[object Uint8ClampedArray]",wu="[object Uint16Array]",Tu="[object Uint32Array]",jT=/\b__p \+= '';/g,YT=/\b(__p \+=) '' \+/g,JT=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Dm=/&(?:amp|lt|gt|quot|#39);/g,Lm=/[&<>"']/g,QT=RegExp(Dm.source),XT=RegExp(Lm.source),ZT=/<%-([\s\S]+?)%>/g,eb=/<%([\s\S]+?)%>/g,xm=/<%=([\s\S]+?)%>/g,tb=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,nb=/^\w*$/,rb=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,bu=/[\\^$.*+?()[\]{}|]/g,ob=RegExp(bu.source),Su=/^\s+/,ib=/\s/,ab=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,sb=/\{\n\/\* \[wrapped with (.+)\] \*/,cb=/,? & /,lb=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,ub=/[()=,{}\[\]\/\s]/,db=/\\(\\)?/g,hb=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Um=/\w*$/,fb=/^[-+]0x[0-9a-f]+$/i,mb=/^0b[01]+$/i,gb=/^\[object .+?Constructor\]$/,pb=/^0o[0-7]+$/i,_b=/^(?:0|[1-9]\d*)$/,vb=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Ys=/($^)/,yb=/['\n\r\u2028\u2029\\]/g,Js="\\ud800-\\udfff",Cb="\\u0300-\\u036f",Eb="\\ufe20-\\ufe2f",wb="\\u20d0-\\u20ff",Bm=Cb+Eb+wb,Vm="\\u2700-\\u27bf",Fm="a-z\\xdf-\\xf6\\xf8-\\xff",Tb="\\xac\\xb1\\xd7\\xf7",bb="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",Sb="\\u2000-\\u206f",Ib=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Hm="A-Z\\xc0-\\xd6\\xd8-\\xde",$m="\\ufe0e\\ufe0f",Km=Tb+bb+Sb+Ib,Iu="['’]",Ab="["+Js+"]",Wm="["+Km+"]",Qs="["+Bm+"]",zm="\\d+",kb="["+Vm+"]",Gm="["+Fm+"]",qm="[^"+Js+Km+zm+Vm+Fm+Hm+"]",Au="\\ud83c[\\udffb-\\udfff]",Nb="(?:"+Qs+"|"+Au+")",jm="[^"+Js+"]",ku="(?:\\ud83c[\\udde6-\\uddff]){2}",Nu="[\\ud800-\\udbff][\\udc00-\\udfff]",Oi="["+Hm+"]",Ym="\\u200d",Jm="(?:"+Gm+"|"+qm+")",Rb="(?:"+Oi+"|"+qm+")",Qm="(?:"+Iu+"(?:d|ll|m|re|s|t|ve))?",Xm="(?:"+Iu+"(?:D|LL|M|RE|S|T|VE))?",Zm=Nb+"?",eg="["+$m+"]?",Ob="(?:"+Ym+"(?:"+[jm,ku,Nu].join("|")+")"+eg+Zm+")*",Pb="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Mb="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",tg=eg+Zm+Ob,Db="(?:"+[kb,ku,Nu].join("|")+")"+tg,Lb="(?:"+[jm+Qs+"?",Qs,ku,Nu,Ab].join("|")+")",xb=RegExp(Iu,"g"),Ub=RegExp(Qs,"g"),Ru=RegExp(Au+"(?="+Au+")|"+Lb+tg,"g"),Bb=RegExp([Oi+"?"+Gm+"+"+Qm+"(?="+[Wm,Oi,"$"].join("|")+")",Rb+"+"+Xm+"(?="+[Wm,Oi+Jm,"$"].join("|")+")",Oi+"?"+Jm+"+"+Qm,Oi+"+"+Xm,Mb,Pb,zm,Db].join("|"),"g"),Vb=RegExp("["+Ym+Js+Bm+$m+"]"),Fb=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Hb=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],$b=-1,ot={};ot[cr]=ot[Eo]=ot[kr]=ot[lr]=ot[Ha]=ot[Ri]=ot[Eu]=ot[wu]=ot[Tu]=!0,ot[Ir]=ot[Qo]=ot[Ne]=ot[Ar]=ot[ze]=ot[qr]=ot[vo]=ot[yo]=ot[Vt]=ot[En]=ot[wn]=ot[G]=ot[oe]=ot[Je]=ot[F]=!1;var tt={};tt[Ir]=tt[Qo]=tt[Ne]=tt[ze]=tt[Ar]=tt[qr]=tt[cr]=tt[Eo]=tt[kr]=tt[lr]=tt[Ha]=tt[Vt]=tt[En]=tt[wn]=tt[G]=tt[oe]=tt[Je]=tt[et]=tt[Ri]=tt[Eu]=tt[wu]=tt[Tu]=!0,tt[vo]=tt[yo]=tt[F]=!1;var Kb={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},Wb={"&":"&","<":"<",">":">",'"':""","'":"'"},zb={"&":"&","<":"<",">":">",""":'"',"'":"'"},Gb={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},qb=parseFloat,jb=parseInt,ng=typeof zc=="object"&&zc&&zc.Object===Object&&zc,Yb=typeof self=="object"&&self&&self.Object===Object&&self,Ft=ng||Yb||Function("return this")(),Ou=e&&!e.nodeType&&e,Zo=Ou&&!0&&n&&!n.nodeType&&n,rg=Zo&&Zo.exports===Ou,Pu=rg&&ng.process,Hn=function(){try{var O=Zo&&Zo.require&&Zo.require("util").types;return O||Pu&&Pu.binding&&Pu.binding("util")}catch{}}(),og=Hn&&Hn.isArrayBuffer,ig=Hn&&Hn.isDate,ag=Hn&&Hn.isMap,sg=Hn&&Hn.isRegExp,cg=Hn&&Hn.isSet,lg=Hn&&Hn.isTypedArray;function Tn(O,H,U){switch(U.length){case 0:return O.call(H);case 1:return O.call(H,U[0]);case 2:return O.call(H,U[0],U[1]);case 3:return O.call(H,U[0],U[1],U[2])}return O.apply(H,U)}function Jb(O,H,U,re){for(var Ce=-1,Ve=O==null?0:O.length;++Ce<Ve;){var At=O[Ce];H(re,At,U(At),O)}return re}function $n(O,H){for(var U=-1,re=O==null?0:O.length;++U<re&&H(O[U],U,O)!==!1;);return O}function Qb(O,H){for(var U=O==null?0:O.length;U--&&H(O[U],U,O)!==!1;);return O}function ug(O,H){for(var U=-1,re=O==null?0:O.length;++U<re;)if(!H(O[U],U,O))return!1;return!0}function wo(O,H){for(var U=-1,re=O==null?0:O.length,Ce=0,Ve=[];++U<re;){var At=O[U];H(At,U,O)&&(Ve[Ce++]=At)}return Ve}function Xs(O,H){var U=O==null?0:O.length;return!!U&&Pi(O,H,0)>-1}function Mu(O,H,U){for(var re=-1,Ce=O==null?0:O.length;++re<Ce;)if(U(H,O[re]))return!0;return!1}function st(O,H){for(var U=-1,re=O==null?0:O.length,Ce=Array(re);++U<re;)Ce[U]=H(O[U],U,O);return Ce}function To(O,H){for(var U=-1,re=H.length,Ce=O.length;++U<re;)O[Ce+U]=H[U];return O}function Du(O,H,U,re){var Ce=-1,Ve=O==null?0:O.length;for(re&&Ve&&(U=O[++Ce]);++Ce<Ve;)U=H(U,O[Ce],Ce,O);return U}function Xb(O,H,U,re){var Ce=O==null?0:O.length;for(re&&Ce&&(U=O[--Ce]);Ce--;)U=H(U,O[Ce],Ce,O);return U}function Lu(O,H){for(var U=-1,re=O==null?0:O.length;++U<re;)if(H(O[U],U,O))return!0;return!1}var Zb=xu("length");function eS(O){return O.split("")}function tS(O){return O.match(lb)||[]}function dg(O,H,U){var re;return U(O,function(Ce,Ve,At){if(H(Ce,Ve,At))return re=Ve,!1}),re}function Zs(O,H,U,re){for(var Ce=O.length,Ve=U+(re?1:-1);re?Ve--:++Ve<Ce;)if(H(O[Ve],Ve,O))return Ve;return-1}function Pi(O,H,U){return H===H?fS(O,H,U):Zs(O,hg,U)}function nS(O,H,U,re){for(var Ce=U-1,Ve=O.length;++Ce<Ve;)if(re(O[Ce],H))return Ce;return-1}function hg(O){return O!==O}function fg(O,H){var U=O==null?0:O.length;return U?Bu(O,H)/U:on}function xu(O){return function(H){return H==null?t:H[O]}}function Uu(O){return function(H){return O==null?t:O[H]}}function mg(O,H,U,re,Ce){return Ce(O,function(Ve,At,Qe){U=re?(re=!1,Ve):H(U,Ve,At,Qe)}),U}function rS(O,H){var U=O.length;for(O.sort(H);U--;)O[U]=O[U].value;return O}function Bu(O,H){for(var U,re=-1,Ce=O.length;++re<Ce;){var Ve=H(O[re]);Ve!==t&&(U=U===t?Ve:U+Ve)}return U}function Vu(O,H){for(var U=-1,re=Array(O);++U<O;)re[U]=H(U);return re}function oS(O,H){return st(H,function(U){return[U,O[U]]})}function gg(O){return O&&O.slice(0,yg(O)+1).replace(Su,"")}function bn(O){return function(H){return O(H)}}function Fu(O,H){return st(H,function(U){return O[U]})}function $a(O,H){return O.has(H)}function pg(O,H){for(var U=-1,re=O.length;++U<re&&Pi(H,O[U],0)>-1;);return U}function _g(O,H){for(var U=O.length;U--&&Pi(H,O[U],0)>-1;);return U}function iS(O,H){for(var U=O.length,re=0;U--;)O[U]===H&&++re;return re}var aS=Uu(Kb),sS=Uu(Wb);function cS(O){return"\\"+Gb[O]}function lS(O,H){return O==null?t:O[H]}function Mi(O){return Vb.test(O)}function uS(O){return Fb.test(O)}function dS(O){for(var H,U=[];!(H=O.next()).done;)U.push(H.value);return U}function Hu(O){var H=-1,U=Array(O.size);return O.forEach(function(re,Ce){U[++H]=[Ce,re]}),U}function vg(O,H){return function(U){return O(H(U))}}function bo(O,H){for(var U=-1,re=O.length,Ce=0,Ve=[];++U<re;){var At=O[U];(At===H||At===g)&&(O[U]=g,Ve[Ce++]=U)}return Ve}function ec(O){var H=-1,U=Array(O.size);return O.forEach(function(re){U[++H]=re}),U}function hS(O){var H=-1,U=Array(O.size);return O.forEach(function(re){U[++H]=[re,re]}),U}function fS(O,H,U){for(var re=U-1,Ce=O.length;++re<Ce;)if(O[re]===H)return re;return-1}function mS(O,H,U){for(var re=U+1;re--;)if(O[re]===H)return re;return re}function Di(O){return Mi(O)?pS(O):Zb(O)}function ur(O){return Mi(O)?_S(O):eS(O)}function yg(O){for(var H=O.length;H--&&ib.test(O.charAt(H)););return H}var gS=Uu(zb);function pS(O){for(var H=Ru.lastIndex=0;Ru.test(O);)++H;return H}function _S(O){return O.match(Ru)||[]}function vS(O){return O.match(Bb)||[]}var yS=function O(H){H=H==null?Ft:Li.defaults(Ft.Object(),H,Li.pick(Ft,Hb));var U=H.Array,re=H.Date,Ce=H.Error,Ve=H.Function,At=H.Math,Qe=H.Object,$u=H.RegExp,CS=H.String,Kn=H.TypeError,tc=U.prototype,ES=Ve.prototype,xi=Qe.prototype,nc=H["__core-js_shared__"],rc=ES.toString,$e=xi.hasOwnProperty,wS=0,Cg=function(){var i=/[^.]+$/.exec(nc&&nc.keys&&nc.keys.IE_PROTO||"");return i?"Symbol(src)_1."+i:""}(),oc=xi.toString,TS=rc.call(Qe),bS=Ft._,SS=$u("^"+rc.call($e).replace(bu,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),ic=rg?H.Buffer:t,So=H.Symbol,ac=H.Uint8Array,Eg=ic?ic.allocUnsafe:t,sc=vg(Qe.getPrototypeOf,Qe),wg=Qe.create,Tg=xi.propertyIsEnumerable,cc=tc.splice,bg=So?So.isConcatSpreadable:t,Ka=So?So.iterator:t,ei=So?So.toStringTag:t,lc=function(){try{var i=ii(Qe,"defineProperty");return i({},"",{}),i}catch{}}(),IS=H.clearTimeout!==Ft.clearTimeout&&H.clearTimeout,AS=re&&re.now!==Ft.Date.now&&re.now,kS=H.setTimeout!==Ft.setTimeout&&H.setTimeout,uc=At.ceil,dc=At.floor,Ku=Qe.getOwnPropertySymbols,NS=ic?ic.isBuffer:t,Sg=H.isFinite,RS=tc.join,OS=vg(Qe.keys,Qe),kt=At.max,jt=At.min,PS=re.now,MS=H.parseInt,Ig=At.random,DS=tc.reverse,Wu=ii(H,"DataView"),Wa=ii(H,"Map"),zu=ii(H,"Promise"),Ui=ii(H,"Set"),za=ii(H,"WeakMap"),Ga=ii(Qe,"create"),hc=za&&new za,Bi={},LS=ai(Wu),xS=ai(Wa),US=ai(zu),BS=ai(Ui),VS=ai(za),fc=So?So.prototype:t,qa=fc?fc.valueOf:t,Ag=fc?fc.toString:t;function y(i){if(dt(i)&&!Ee(i)&&!(i instanceof Oe)){if(i instanceof Wn)return i;if($e.call(i,"__wrapped__"))return kp(i)}return new Wn(i)}var Vi=function(){function i(){}return function(s){if(!ut(s))return{};if(wg)return wg(s);i.prototype=s;var u=new i;return i.prototype=t,u}}();function mc(){}function Wn(i,s){this.__wrapped__=i,this.__actions__=[],this.__chain__=!!s,this.__index__=0,this.__values__=t}y.templateSettings={escape:ZT,evaluate:eb,interpolate:xm,variable:"",imports:{_:y}},y.prototype=mc.prototype,y.prototype.constructor=y,Wn.prototype=Vi(mc.prototype),Wn.prototype.constructor=Wn;function Oe(i){this.__wrapped__=i,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=It,this.__views__=[]}function FS(){var i=new Oe(this.__wrapped__);return i.__actions__=hn(this.__actions__),i.__dir__=this.__dir__,i.__filtered__=this.__filtered__,i.__iteratees__=hn(this.__iteratees__),i.__takeCount__=this.__takeCount__,i.__views__=hn(this.__views__),i}function HS(){if(this.__filtered__){var i=new Oe(this);i.__dir__=-1,i.__filtered__=!0}else i=this.clone(),i.__dir__*=-1;return i}function $S(){var i=this.__wrapped__.value(),s=this.__dir__,u=Ee(i),m=s<0,v=u?i.length:0,E=eA(0,v,this.__views__),b=E.start,I=E.end,P=I-b,W=m?I:b-1,z=this.__iteratees__,j=z.length,te=0,se=jt(P,this.__takeCount__);if(!u||!m&&v==P&&se==P)return Qg(i,this.__actions__);var he=[];e:for(;P--&&te<se;){W+=s;for(var Se=-1,fe=i[W];++Se<j;){var Re=z[Se],Pe=Re.iteratee,An=Re.type,cn=Pe(fe);if(An==rn)fe=cn;else if(!cn){if(An==Ct)continue e;break e}}he[te++]=fe}return he}Oe.prototype=Vi(mc.prototype),Oe.prototype.constructor=Oe;function ti(i){var s=-1,u=i==null?0:i.length;for(this.clear();++s<u;){var m=i[s];this.set(m[0],m[1])}}function KS(){this.__data__=Ga?Ga(null):{},this.size=0}function WS(i){var s=this.has(i)&&delete this.__data__[i];return this.size-=s?1:0,s}function zS(i){var s=this.__data__;if(Ga){var u=s[i];return u===h?t:u}return $e.call(s,i)?s[i]:t}function GS(i){var s=this.__data__;return Ga?s[i]!==t:$e.call(s,i)}function qS(i,s){var u=this.__data__;return this.size+=this.has(i)?0:1,u[i]=Ga&&s===t?h:s,this}ti.prototype.clear=KS,ti.prototype.delete=WS,ti.prototype.get=zS,ti.prototype.has=GS,ti.prototype.set=qS;function jr(i){var s=-1,u=i==null?0:i.length;for(this.clear();++s<u;){var m=i[s];this.set(m[0],m[1])}}function jS(){this.__data__=[],this.size=0}function YS(i){var s=this.__data__,u=gc(s,i);if(u<0)return!1;var m=s.length-1;return u==m?s.pop():cc.call(s,u,1),--this.size,!0}function JS(i){var s=this.__data__,u=gc(s,i);return u<0?t:s[u][1]}function QS(i){return gc(this.__data__,i)>-1}function XS(i,s){var u=this.__data__,m=gc(u,i);return m<0?(++this.size,u.push([i,s])):u[m][1]=s,this}jr.prototype.clear=jS,jr.prototype.delete=YS,jr.prototype.get=JS,jr.prototype.has=QS,jr.prototype.set=XS;function Yr(i){var s=-1,u=i==null?0:i.length;for(this.clear();++s<u;){var m=i[s];this.set(m[0],m[1])}}function ZS(){this.size=0,this.__data__={hash:new ti,map:new(Wa||jr),string:new ti}}function eI(i){var s=Ac(this,i).delete(i);return this.size-=s?1:0,s}function tI(i){return Ac(this,i).get(i)}function nI(i){return Ac(this,i).has(i)}function rI(i,s){var u=Ac(this,i),m=u.size;return u.set(i,s),this.size+=u.size==m?0:1,this}Yr.prototype.clear=ZS,Yr.prototype.delete=eI,Yr.prototype.get=tI,Yr.prototype.has=nI,Yr.prototype.set=rI;function ni(i){var s=-1,u=i==null?0:i.length;for(this.__data__=new Yr;++s<u;)this.add(i[s])}function oI(i){return this.__data__.set(i,h),this}function iI(i){return this.__data__.has(i)}ni.prototype.add=ni.prototype.push=oI,ni.prototype.has=iI;function dr(i){var s=this.__data__=new jr(i);this.size=s.size}function aI(){this.__data__=new jr,this.size=0}function sI(i){var s=this.__data__,u=s.delete(i);return this.size=s.size,u}function cI(i){return this.__data__.get(i)}function lI(i){return this.__data__.has(i)}function uI(i,s){var u=this.__data__;if(u instanceof jr){var m=u.__data__;if(!Wa||m.length<o-1)return m.push([i,s]),this.size=++u.size,this;u=this.__data__=new Yr(m)}return u.set(i,s),this.size=u.size,this}dr.prototype.clear=aI,dr.prototype.delete=sI,dr.prototype.get=cI,dr.prototype.has=lI,dr.prototype.set=uI;function kg(i,s){var u=Ee(i),m=!u&&si(i),v=!u&&!m&&Ro(i),E=!u&&!m&&!v&&Ki(i),b=u||m||v||E,I=b?Vu(i.length,CS):[],P=I.length;for(var W in i)(s||$e.call(i,W))&&!(b&&(W=="length"||v&&(W=="offset"||W=="parent")||E&&(W=="buffer"||W=="byteLength"||W=="byteOffset")||Zr(W,P)))&&I.push(W);return I}function Ng(i){var s=i.length;return s?i[nd(0,s-1)]:t}function dI(i,s){return kc(hn(i),ri(s,0,i.length))}function hI(i){return kc(hn(i))}function Gu(i,s,u){(u!==t&&!hr(i[s],u)||u===t&&!(s in i))&&Jr(i,s,u)}function ja(i,s,u){var m=i[s];(!($e.call(i,s)&&hr(m,u))||u===t&&!(s in i))&&Jr(i,s,u)}function gc(i,s){for(var u=i.length;u--;)if(hr(i[u][0],s))return u;return-1}function fI(i,s,u,m){return Io(i,function(v,E,b){s(m,v,u(v),b)}),m}function Rg(i,s){return i&&Rr(s,Dt(s),i)}function mI(i,s){return i&&Rr(s,mn(s),i)}function Jr(i,s,u){s=="__proto__"&&lc?lc(i,s,{configurable:!0,enumerable:!0,value:u,writable:!0}):i[s]=u}function qu(i,s){for(var u=-1,m=s.length,v=U(m),E=i==null;++u<m;)v[u]=E?t:Ad(i,s[u]);return v}function ri(i,s,u){return i===i&&(u!==t&&(i=i<=u?i:u),s!==t&&(i=i>=s?i:s)),i}function zn(i,s,u,m,v,E){var b,I=s&_,P=s&p,W=s&w;if(u&&(b=v?u(i,m,v,E):u(i)),b!==t)return b;if(!ut(i))return i;var z=Ee(i);if(z){if(b=nA(i),!I)return hn(i,b)}else{var j=Yt(i),te=j==yo||j==Co;if(Ro(i))return ep(i,I);if(j==wn||j==Ir||te&&!v){if(b=P||te?{}:yp(i),!I)return P?zI(i,mI(b,i)):WI(i,Rg(b,i))}else{if(!tt[j])return v?i:{};b=rA(i,j,I)}}E||(E=new dr);var se=E.get(i);if(se)return se;E.set(i,b),jp(i)?i.forEach(function(fe){b.add(zn(fe,s,u,fe,i,E))}):Gp(i)&&i.forEach(function(fe,Re){b.set(Re,zn(fe,s,u,Re,i,E))});var he=W?P?fd:hd:P?mn:Dt,Se=z?t:he(i);return $n(Se||i,function(fe,Re){Se&&(Re=fe,fe=i[Re]),ja(b,Re,zn(fe,s,u,Re,i,E))}),b}function gI(i){var s=Dt(i);return function(u){return Og(u,i,s)}}function Og(i,s,u){var m=u.length;if(i==null)return!m;for(i=Qe(i);m--;){var v=u[m],E=s[v],b=i[v];if(b===t&&!(v in i)||!E(b))return!1}return!0}function Pg(i,s,u){if(typeof i!="function")throw new Kn(l);return ts(function(){i.apply(t,u)},s)}function Ya(i,s,u,m){var v=-1,E=Xs,b=!0,I=i.length,P=[],W=s.length;if(!I)return P;u&&(s=st(s,bn(u))),m?(E=Mu,b=!1):s.length>=o&&(E=$a,b=!1,s=new ni(s));e:for(;++v<I;){var z=i[v],j=u==null?z:u(z);if(z=m||z!==0?z:0,b&&j===j){for(var te=W;te--;)if(s[te]===j)continue e;P.push(z)}else E(s,j,m)||P.push(z)}return P}var Io=ip(Nr),Mg=ip(Yu,!0);function pI(i,s){var u=!0;return Io(i,function(m,v,E){return u=!!s(m,v,E),u}),u}function pc(i,s,u){for(var m=-1,v=i.length;++m<v;){var E=i[m],b=s(E);if(b!=null&&(I===t?b===b&&!In(b):u(b,I)))var I=b,P=E}return P}function _I(i,s,u,m){var v=i.length;for(u=be(u),u<0&&(u=-u>v?0:v+u),m=m===t||m>v?v:be(m),m<0&&(m+=v),m=u>m?0:Jp(m);u<m;)i[u++]=s;return i}function Dg(i,s){var u=[];return Io(i,function(m,v,E){s(m,v,E)&&u.push(m)}),u}function Ht(i,s,u,m,v){var E=-1,b=i.length;for(u||(u=iA),v||(v=[]);++E<b;){var I=i[E];s>0&&u(I)?s>1?Ht(I,s-1,u,m,v):To(v,I):m||(v[v.length]=I)}return v}var ju=ap(),Lg=ap(!0);function Nr(i,s){return i&&ju(i,s,Dt)}function Yu(i,s){return i&&Lg(i,s,Dt)}function _c(i,s){return wo(s,function(u){return eo(i[u])})}function oi(i,s){s=ko(s,i);for(var u=0,m=s.length;i!=null&&u<m;)i=i[Or(s[u++])];return u&&u==m?i:t}function xg(i,s,u){var m=s(i);return Ee(i)?m:To(m,u(i))}function an(i){return i==null?i===t?Me:Xo:ei&&ei in Qe(i)?ZI(i):hA(i)}function Ju(i,s){return i>s}function vI(i,s){return i!=null&&$e.call(i,s)}function yI(i,s){return i!=null&&s in Qe(i)}function CI(i,s,u){return i>=jt(s,u)&&i<kt(s,u)}function Qu(i,s,u){for(var m=u?Mu:Xs,v=i[0].length,E=i.length,b=E,I=U(E),P=1/0,W=[];b--;){var z=i[b];b&&s&&(z=st(z,bn(s))),P=jt(z.length,P),I[b]=!u&&(s||v>=120&&z.length>=120)?new ni(b&&z):t}z=i[0];var j=-1,te=I[0];e:for(;++j<v&&W.length<P;){var se=z[j],he=s?s(se):se;if(se=u||se!==0?se:0,!(te?$a(te,he):m(W,he,u))){for(b=E;--b;){var Se=I[b];if(!(Se?$a(Se,he):m(i[b],he,u)))continue e}te&&te.push(he),W.push(se)}}return W}function EI(i,s,u,m){return Nr(i,function(v,E,b){s(m,u(v),E,b)}),m}function Ja(i,s,u){s=ko(s,i),i=Tp(i,s);var m=i==null?i:i[Or(qn(s))];return m==null?t:Tn(m,i,u)}function Ug(i){return dt(i)&&an(i)==Ir}function wI(i){return dt(i)&&an(i)==Ne}function TI(i){return dt(i)&&an(i)==qr}function Qa(i,s,u,m,v){return i===s?!0:i==null||s==null||!dt(i)&&!dt(s)?i!==i&&s!==s:bI(i,s,u,m,Qa,v)}function bI(i,s,u,m,v,E){var b=Ee(i),I=Ee(s),P=b?Qo:Yt(i),W=I?Qo:Yt(s);P=P==Ir?wn:P,W=W==Ir?wn:W;var z=P==wn,j=W==wn,te=P==W;if(te&&Ro(i)){if(!Ro(s))return!1;b=!0,z=!1}if(te&&!z)return E||(E=new dr),b||Ki(i)?pp(i,s,u,m,v,E):QI(i,s,P,u,m,v,E);if(!(u&C)){var se=z&&$e.call(i,"__wrapped__"),he=j&&$e.call(s,"__wrapped__");if(se||he){var Se=se?i.value():i,fe=he?s.value():s;return E||(E=new dr),v(Se,fe,u,m,E)}}return te?(E||(E=new dr),XI(i,s,u,m,v,E)):!1}function SI(i){return dt(i)&&Yt(i)==Vt}function Xu(i,s,u,m){var v=u.length,E=v,b=!m;if(i==null)return!E;for(i=Qe(i);v--;){var I=u[v];if(b&&I[2]?I[1]!==i[I[0]]:!(I[0]in i))return!1}for(;++v<E;){I=u[v];var P=I[0],W=i[P],z=I[1];if(b&&I[2]){if(W===t&&!(P in i))return!1}else{var j=new dr;if(m)var te=m(W,z,P,i,s,j);if(!(te===t?Qa(z,W,C|T,m,j):te))return!1}}return!0}function Bg(i){if(!ut(i)||sA(i))return!1;var s=eo(i)?SS:gb;return s.test(ai(i))}function II(i){return dt(i)&&an(i)==G}function AI(i){return dt(i)&&Yt(i)==oe}function kI(i){return dt(i)&&Dc(i.length)&&!!ot[an(i)]}function Vg(i){return typeof i=="function"?i:i==null?gn:typeof i=="object"?Ee(i)?$g(i[0],i[1]):Hg(i):s_(i)}function Zu(i){if(!es(i))return OS(i);var s=[];for(var u in Qe(i))$e.call(i,u)&&u!="constructor"&&s.push(u);return s}function NI(i){if(!ut(i))return dA(i);var s=es(i),u=[];for(var m in i)m=="constructor"&&(s||!$e.call(i,m))||u.push(m);return u}function ed(i,s){return i<s}function Fg(i,s){var u=-1,m=fn(i)?U(i.length):[];return Io(i,function(v,E,b){m[++u]=s(v,E,b)}),m}function Hg(i){var s=gd(i);return s.length==1&&s[0][2]?Ep(s[0][0],s[0][1]):function(u){return u===i||Xu(u,i,s)}}function $g(i,s){return _d(i)&&Cp(s)?Ep(Or(i),s):function(u){var m=Ad(u,i);return m===t&&m===s?kd(u,i):Qa(s,m,C|T)}}function vc(i,s,u,m,v){i!==s&&ju(s,function(E,b){if(v||(v=new dr),ut(E))RI(i,s,b,u,vc,m,v);else{var I=m?m(yd(i,b),E,b+"",i,s,v):t;I===t&&(I=E),Gu(i,b,I)}},mn)}function RI(i,s,u,m,v,E,b){var I=yd(i,u),P=yd(s,u),W=b.get(P);if(W){Gu(i,u,W);return}var z=E?E(I,P,u+"",i,s,b):t,j=z===t;if(j){var te=Ee(P),se=!te&&Ro(P),he=!te&&!se&&Ki(P);z=P,te||se||he?Ee(I)?z=I:gt(I)?z=hn(I):se?(j=!1,z=ep(P,!0)):he?(j=!1,z=tp(P,!0)):z=[]:ns(P)||si(P)?(z=I,si(I)?z=Qp(I):(!ut(I)||eo(I))&&(z=yp(P))):j=!1}j&&(b.set(P,z),v(z,P,m,E,b),b.delete(P)),Gu(i,u,z)}function Kg(i,s){var u=i.length;if(u)return s+=s<0?u:0,Zr(s,u)?i[s]:t}function Wg(i,s,u){s.length?s=st(s,function(E){return Ee(E)?function(b){return oi(b,E.length===1?E[0]:E)}:E}):s=[gn];var m=-1;s=st(s,bn(de()));var v=Fg(i,function(E,b,I){var P=st(s,function(W){return W(E)});return{criteria:P,index:++m,value:E}});return rS(v,function(E,b){return KI(E,b,u)})}function OI(i,s){return zg(i,s,function(u,m){return kd(i,m)})}function zg(i,s,u){for(var m=-1,v=s.length,E={};++m<v;){var b=s[m],I=oi(i,b);u(I,b)&&Xa(E,ko(b,i),I)}return E}function PI(i){return function(s){return oi(s,i)}}function td(i,s,u,m){var v=m?nS:Pi,E=-1,b=s.length,I=i;for(i===s&&(s=hn(s)),u&&(I=st(i,bn(u)));++E<b;)for(var P=0,W=s[E],z=u?u(W):W;(P=v(I,z,P,m))>-1;)I!==i&&cc.call(I,P,1),cc.call(i,P,1);return i}function Gg(i,s){for(var u=i?s.length:0,m=u-1;u--;){var v=s[u];if(u==m||v!==E){var E=v;Zr(v)?cc.call(i,v,1):id(i,v)}}return i}function nd(i,s){return i+dc(Ig()*(s-i+1))}function MI(i,s,u,m){for(var v=-1,E=kt(uc((s-i)/(u||1)),0),b=U(E);E--;)b[m?E:++v]=i,i+=u;return b}function rd(i,s){var u="";if(!i||s<1||s>at)return u;do s%2&&(u+=i),s=dc(s/2),s&&(i+=i);while(s);return u}function Ie(i,s){return Cd(wp(i,s,gn),i+"")}function DI(i){return Ng(Wi(i))}function LI(i,s){var u=Wi(i);return kc(u,ri(s,0,u.length))}function Xa(i,s,u,m){if(!ut(i))return i;s=ko(s,i);for(var v=-1,E=s.length,b=E-1,I=i;I!=null&&++v<E;){var P=Or(s[v]),W=u;if(P==="__proto__"||P==="constructor"||P==="prototype")return i;if(v!=b){var z=I[P];W=m?m(z,P,I):t,W===t&&(W=ut(z)?z:Zr(s[v+1])?[]:{})}ja(I,P,W),I=I[P]}return i}var qg=hc?function(i,s){return hc.set(i,s),i}:gn,xI=lc?function(i,s){return lc(i,"toString",{configurable:!0,enumerable:!1,value:Rd(s),writable:!0})}:gn;function UI(i){return kc(Wi(i))}function Gn(i,s,u){var m=-1,v=i.length;s<0&&(s=-s>v?0:v+s),u=u>v?v:u,u<0&&(u+=v),v=s>u?0:u-s>>>0,s>>>=0;for(var E=U(v);++m<v;)E[m]=i[m+s];return E}function BI(i,s){var u;return Io(i,function(m,v,E){return u=s(m,v,E),!u}),!!u}function yc(i,s,u){var m=0,v=i==null?m:i.length;if(typeof s=="number"&&s===s&&v<=Ua){for(;m<v;){var E=m+v>>>1,b=i[E];b!==null&&!In(b)&&(u?b<=s:b<s)?m=E+1:v=E}return v}return od(i,s,gn,u)}function od(i,s,u,m){var v=0,E=i==null?0:i.length;if(E===0)return 0;s=u(s);for(var b=s!==s,I=s===null,P=In(s),W=s===t;v<E;){var z=dc((v+E)/2),j=u(i[z]),te=j!==t,se=j===null,he=j===j,Se=In(j);if(b)var fe=m||he;else W?fe=he&&(m||te):I?fe=he&&te&&(m||!se):P?fe=he&&te&&!se&&(m||!Se):se||Se?fe=!1:fe=m?j<=s:j<s;fe?v=z+1:E=z}return jt(E,Jo)}function jg(i,s){for(var u=-1,m=i.length,v=0,E=[];++u<m;){var b=i[u],I=s?s(b):b;if(!u||!hr(I,P)){var P=I;E[v++]=b===0?0:b}}return E}function Yg(i){return typeof i=="number"?i:In(i)?on:+i}function Sn(i){if(typeof i=="string")return i;if(Ee(i))return st(i,Sn)+"";if(In(i))return Ag?Ag.call(i):"";var s=i+"";return s=="0"&&1/i==-Mt?"-0":s}function Ao(i,s,u){var m=-1,v=Xs,E=i.length,b=!0,I=[],P=I;if(u)b=!1,v=Mu;else if(E>=o){var W=s?null:YI(i);if(W)return ec(W);b=!1,v=$a,P=new ni}else P=s?[]:I;e:for(;++m<E;){var z=i[m],j=s?s(z):z;if(z=u||z!==0?z:0,b&&j===j){for(var te=P.length;te--;)if(P[te]===j)continue e;s&&P.push(j),I.push(z)}else v(P,j,u)||(P!==I&&P.push(j),I.push(z))}return I}function id(i,s){return s=ko(s,i),i=Tp(i,s),i==null||delete i[Or(qn(s))]}function Jg(i,s,u,m){return Xa(i,s,u(oi(i,s)),m)}function Cc(i,s,u,m){for(var v=i.length,E=m?v:-1;(m?E--:++E<v)&&s(i[E],E,i););return u?Gn(i,m?0:E,m?E+1:v):Gn(i,m?E+1:0,m?v:E)}function Qg(i,s){var u=i;return u instanceof Oe&&(u=u.value()),Du(s,function(m,v){return v.func.apply(v.thisArg,To([m],v.args))},u)}function ad(i,s,u){var m=i.length;if(m<2)return m?Ao(i[0]):[];for(var v=-1,E=U(m);++v<m;)for(var b=i[v],I=-1;++I<m;)I!=v&&(E[v]=Ya(E[v]||b,i[I],s,u));return Ao(Ht(E,1),s,u)}function Xg(i,s,u){for(var m=-1,v=i.length,E=s.length,b={};++m<v;){var I=m<E?s[m]:t;u(b,i[m],I)}return b}function sd(i){return gt(i)?i:[]}function cd(i){return typeof i=="function"?i:gn}function ko(i,s){return Ee(i)?i:_d(i,s)?[i]:Ap(He(i))}var VI=Ie;function No(i,s,u){var m=i.length;return u=u===t?m:u,!s&&u>=m?i:Gn(i,s,u)}var Zg=IS||function(i){return Ft.clearTimeout(i)};function ep(i,s){if(s)return i.slice();var u=i.length,m=Eg?Eg(u):new i.constructor(u);return i.copy(m),m}function ld(i){var s=new i.constructor(i.byteLength);return new ac(s).set(new ac(i)),s}function FI(i,s){var u=s?ld(i.buffer):i.buffer;return new i.constructor(u,i.byteOffset,i.byteLength)}function HI(i){var s=new i.constructor(i.source,Um.exec(i));return s.lastIndex=i.lastIndex,s}function $I(i){return qa?Qe(qa.call(i)):{}}function tp(i,s){var u=s?ld(i.buffer):i.buffer;return new i.constructor(u,i.byteOffset,i.length)}function np(i,s){if(i!==s){var u=i!==t,m=i===null,v=i===i,E=In(i),b=s!==t,I=s===null,P=s===s,W=In(s);if(!I&&!W&&!E&&i>s||E&&b&&P&&!I&&!W||m&&b&&P||!u&&P||!v)return 1;if(!m&&!E&&!W&&i<s||W&&u&&v&&!m&&!E||I&&u&&v||!b&&v||!P)return-1}return 0}function KI(i,s,u){for(var m=-1,v=i.criteria,E=s.criteria,b=v.length,I=u.length;++m<b;){var P=np(v[m],E[m]);if(P){if(m>=I)return P;var W=u[m];return P*(W=="desc"?-1:1)}}return i.index-s.index}function rp(i,s,u,m){for(var v=-1,E=i.length,b=u.length,I=-1,P=s.length,W=kt(E-b,0),z=U(P+W),j=!m;++I<P;)z[I]=s[I];for(;++v<b;)(j||v<E)&&(z[u[v]]=i[v]);for(;W--;)z[I++]=i[v++];return z}function op(i,s,u,m){for(var v=-1,E=i.length,b=-1,I=u.length,P=-1,W=s.length,z=kt(E-I,0),j=U(z+W),te=!m;++v<z;)j[v]=i[v];for(var se=v;++P<W;)j[se+P]=s[P];for(;++b<I;)(te||v<E)&&(j[se+u[b]]=i[v++]);return j}function hn(i,s){var u=-1,m=i.length;for(s||(s=U(m));++u<m;)s[u]=i[u];return s}function Rr(i,s,u,m){var v=!u;u||(u={});for(var E=-1,b=s.length;++E<b;){var I=s[E],P=m?m(u[I],i[I],I,u,i):t;P===t&&(P=i[I]),v?Jr(u,I,P):ja(u,I,P)}return u}function WI(i,s){return Rr(i,pd(i),s)}function zI(i,s){return Rr(i,_p(i),s)}function Ec(i,s){return function(u,m){var v=Ee(u)?Jb:fI,E=s?s():{};return v(u,i,de(m,2),E)}}function Fi(i){return Ie(function(s,u){var m=-1,v=u.length,E=v>1?u[v-1]:t,b=v>2?u[2]:t;for(E=i.length>3&&typeof E=="function"?(v--,E):t,b&&sn(u[0],u[1],b)&&(E=v<3?t:E,v=1),s=Qe(s);++m<v;){var I=u[m];I&&i(s,I,m,E)}return s})}function ip(i,s){return function(u,m){if(u==null)return u;if(!fn(u))return i(u,m);for(var v=u.length,E=s?v:-1,b=Qe(u);(s?E--:++E<v)&&m(b[E],E,b)!==!1;);return u}}function ap(i){return function(s,u,m){for(var v=-1,E=Qe(s),b=m(s),I=b.length;I--;){var P=b[i?I:++v];if(u(E[P],P,E)===!1)break}return s}}function GI(i,s,u){var m=s&k,v=Za(i);function E(){var b=this&&this!==Ft&&this instanceof E?v:i;return b.apply(m?u:this,arguments)}return E}function sp(i){return function(s){s=He(s);var u=Mi(s)?ur(s):t,m=u?u[0]:s.charAt(0),v=u?No(u,1).join(""):s.slice(1);return m[i]()+v}}function Hi(i){return function(s){return Du(i_(o_(s).replace(xb,"")),i,"")}}function Za(i){return function(){var s=arguments;switch(s.length){case 0:return new i;case 1:return new i(s[0]);case 2:return new i(s[0],s[1]);case 3:return new i(s[0],s[1],s[2]);case 4:return new i(s[0],s[1],s[2],s[3]);case 5:return new i(s[0],s[1],s[2],s[3],s[4]);case 6:return new i(s[0],s[1],s[2],s[3],s[4],s[5]);case 7:return new i(s[0],s[1],s[2],s[3],s[4],s[5],s[6])}var u=Vi(i.prototype),m=i.apply(u,s);return ut(m)?m:u}}function qI(i,s,u){var m=Za(i);function v(){for(var E=arguments.length,b=U(E),I=E,P=$i(v);I--;)b[I]=arguments[I];var W=E<3&&b[0]!==P&&b[E-1]!==P?[]:bo(b,P);if(E-=W.length,E<u)return hp(i,s,wc,v.placeholder,t,b,W,t,t,u-E);var z=this&&this!==Ft&&this instanceof v?m:i;return Tn(z,this,b)}return v}function cp(i){return function(s,u,m){var v=Qe(s);if(!fn(s)){var E=de(u,3);s=Dt(s),u=function(I){return E(v[I],I,v)}}var b=i(s,u,m);return b>-1?v[E?s[b]:b]:t}}function lp(i){return Xr(function(s){var u=s.length,m=u,v=Wn.prototype.thru;for(i&&s.reverse();m--;){var E=s[m];if(typeof E!="function")throw new Kn(l);if(v&&!b&&Ic(E)=="wrapper")var b=new Wn([],!0)}for(m=b?m:u;++m<u;){E=s[m];var I=Ic(E),P=I=="wrapper"?md(E):t;P&&vd(P[0])&&P[1]==(M|D|K|ce)&&!P[4].length&&P[9]==1?b=b[Ic(P[0])].apply(b,P[3]):b=E.length==1&&vd(E)?b[I]():b.thru(E)}return function(){var W=arguments,z=W[0];if(b&&W.length==1&&Ee(z))return b.plant(z).value();for(var j=0,te=u?s[j].apply(this,W):z;++j<u;)te=s[j].call(this,te);return te}})}function wc(i,s,u,m,v,E,b,I,P,W){var z=s&M,j=s&k,te=s&S,se=s&(D|L),he=s&ae,Se=te?t:Za(i);function fe(){for(var Re=arguments.length,Pe=U(Re),An=Re;An--;)Pe[An]=arguments[An];if(se)var cn=$i(fe),kn=iS(Pe,cn);if(m&&(Pe=rp(Pe,m,v,se)),E&&(Pe=op(Pe,E,b,se)),Re-=kn,se&&Re<W){var pt=bo(Pe,cn);return hp(i,s,wc,fe.placeholder,u,Pe,pt,I,P,W-Re)}var fr=j?u:this,no=te?fr[i]:i;return Re=Pe.length,I?Pe=fA(Pe,I):he&&Re>1&&Pe.reverse(),z&&P<Re&&(Pe.length=P),this&&this!==Ft&&this instanceof fe&&(no=Se||Za(no)),no.apply(fr,Pe)}return fe}function up(i,s){return function(u,m){return EI(u,i,s(m),{})}}function Tc(i,s){return function(u,m){var v;if(u===t&&m===t)return s;if(u!==t&&(v=u),m!==t){if(v===t)return m;typeof u=="string"||typeof m=="string"?(u=Sn(u),m=Sn(m)):(u=Yg(u),m=Yg(m)),v=i(u,m)}return v}}function ud(i){return Xr(function(s){return s=st(s,bn(de())),Ie(function(u){var m=this;return i(s,function(v){return Tn(v,m,u)})})})}function bc(i,s){s=s===t?" ":Sn(s);var u=s.length;if(u<2)return u?rd(s,i):s;var m=rd(s,uc(i/Di(s)));return Mi(s)?No(ur(m),0,i).join(""):m.slice(0,i)}function jI(i,s,u,m){var v=s&k,E=Za(i);function b(){for(var I=-1,P=arguments.length,W=-1,z=m.length,j=U(z+P),te=this&&this!==Ft&&this instanceof b?E:i;++W<z;)j[W]=m[W];for(;P--;)j[W++]=arguments[++I];return Tn(te,v?u:this,j)}return b}function dp(i){return function(s,u,m){return m&&typeof m!="number"&&sn(s,u,m)&&(u=m=t),s=to(s),u===t?(u=s,s=0):u=to(u),m=m===t?s<u?1:-1:to(m),MI(s,u,m,i)}}function Sc(i){return function(s,u){return typeof s=="string"&&typeof u=="string"||(s=jn(s),u=jn(u)),i(s,u)}}function hp(i,s,u,m,v,E,b,I,P,W){var z=s&D,j=z?b:t,te=z?t:b,se=z?E:t,he=z?t:E;s|=z?K:q,s&=~(z?q:K),s&N||(s&=~(k|S));var Se=[i,s,v,se,j,he,te,I,P,W],fe=u.apply(t,Se);return vd(i)&&bp(fe,Se),fe.placeholder=m,Sp(fe,i,s)}function dd(i){var s=At[i];return function(u,m){if(u=jn(u),m=m==null?0:jt(be(m),292),m&&Sg(u)){var v=(He(u)+"e").split("e"),E=s(v[0]+"e"+(+v[1]+m));return v=(He(E)+"e").split("e"),+(v[0]+"e"+(+v[1]-m))}return s(u)}}var YI=Ui&&1/ec(new Ui([,-0]))[1]==Mt?function(i){return new Ui(i)}:Md;function fp(i){return function(s){var u=Yt(s);return u==Vt?Hu(s):u==oe?hS(s):oS(s,i(s))}}function Qr(i,s,u,m,v,E,b,I){var P=s&S;if(!P&&typeof i!="function")throw new Kn(l);var W=m?m.length:0;if(W||(s&=~(K|q),m=v=t),b=b===t?b:kt(be(b),0),I=I===t?I:be(I),W-=v?v.length:0,s&q){var z=m,j=v;m=v=t}var te=P?t:md(i),se=[i,s,u,m,v,z,j,E,b,I];if(te&&uA(se,te),i=se[0],s=se[1],u=se[2],m=se[3],v=se[4],I=se[9]=se[9]===t?P?0:i.length:kt(se[9]-W,0),!I&&s&(D|L)&&(s&=~(D|L)),!s||s==k)var he=GI(i,s,u);else s==D||s==L?he=qI(i,s,I):(s==K||s==(k|K))&&!v.length?he=jI(i,s,u,m):he=wc.apply(t,se);var Se=te?qg:bp;return Sp(Se(he,se),i,s)}function mp(i,s,u,m){return i===t||hr(i,xi[u])&&!$e.call(m,u)?s:i}function gp(i,s,u,m,v,E){return ut(i)&&ut(s)&&(E.set(s,i),vc(i,s,t,gp,E),E.delete(s)),i}function JI(i){return ns(i)?t:i}function pp(i,s,u,m,v,E){var b=u&C,I=i.length,P=s.length;if(I!=P&&!(b&&P>I))return!1;var W=E.get(i),z=E.get(s);if(W&&z)return W==s&&z==i;var j=-1,te=!0,se=u&T?new ni:t;for(E.set(i,s),E.set(s,i);++j<I;){var he=i[j],Se=s[j];if(m)var fe=b?m(Se,he,j,s,i,E):m(he,Se,j,i,s,E);if(fe!==t){if(fe)continue;te=!1;break}if(se){if(!Lu(s,function(Re,Pe){if(!$a(se,Pe)&&(he===Re||v(he,Re,u,m,E)))return se.push(Pe)})){te=!1;break}}else if(!(he===Se||v(he,Se,u,m,E))){te=!1;break}}return E.delete(i),E.delete(s),te}function QI(i,s,u,m,v,E,b){switch(u){case ze:if(i.byteLength!=s.byteLength||i.byteOffset!=s.byteOffset)return!1;i=i.buffer,s=s.buffer;case Ne:return!(i.byteLength!=s.byteLength||!E(new ac(i),new ac(s)));case Ar:case qr:case En:return hr(+i,+s);case vo:return i.name==s.name&&i.message==s.message;case G:case Je:return i==s+"";case Vt:var I=Hu;case oe:var P=m&C;if(I||(I=ec),i.size!=s.size&&!P)return!1;var W=b.get(i);if(W)return W==s;m|=T,b.set(i,s);var z=pp(I(i),I(s),m,v,E,b);return b.delete(i),z;case et:if(qa)return qa.call(i)==qa.call(s)}return!1}function XI(i,s,u,m,v,E){var b=u&C,I=hd(i),P=I.length,W=hd(s),z=W.length;if(P!=z&&!b)return!1;for(var j=P;j--;){var te=I[j];if(!(b?te in s:$e.call(s,te)))return!1}var se=E.get(i),he=E.get(s);if(se&&he)return se==s&&he==i;var Se=!0;E.set(i,s),E.set(s,i);for(var fe=b;++j<P;){te=I[j];var Re=i[te],Pe=s[te];if(m)var An=b?m(Pe,Re,te,s,i,E):m(Re,Pe,te,i,s,E);if(!(An===t?Re===Pe||v(Re,Pe,u,m,E):An)){Se=!1;break}fe||(fe=te=="constructor")}if(Se&&!fe){var cn=i.constructor,kn=s.constructor;cn!=kn&&"constructor"in i&&"constructor"in s&&!(typeof cn=="function"&&cn instanceof cn&&typeof kn=="function"&&kn instanceof kn)&&(Se=!1)}return E.delete(i),E.delete(s),Se}function Xr(i){return Cd(wp(i,t,Op),i+"")}function hd(i){return xg(i,Dt,pd)}function fd(i){return xg(i,mn,_p)}var md=hc?function(i){return hc.get(i)}:Md;function Ic(i){for(var s=i.name+"",u=Bi[s],m=$e.call(Bi,s)?u.length:0;m--;){var v=u[m],E=v.func;if(E==null||E==i)return v.name}return s}function $i(i){var s=$e.call(y,"placeholder")?y:i;return s.placeholder}function de(){var i=y.iteratee||Od;return i=i===Od?Vg:i,arguments.length?i(arguments[0],arguments[1]):i}function Ac(i,s){var u=i.__data__;return aA(s)?u[typeof s=="string"?"string":"hash"]:u.map}function gd(i){for(var s=Dt(i),u=s.length;u--;){var m=s[u],v=i[m];s[u]=[m,v,Cp(v)]}return s}function ii(i,s){var u=lS(i,s);return Bg(u)?u:t}function ZI(i){var s=$e.call(i,ei),u=i[ei];try{i[ei]=t;var m=!0}catch{}var v=oc.call(i);return m&&(s?i[ei]=u:delete i[ei]),v}var pd=Ku?function(i){return i==null?[]:(i=Qe(i),wo(Ku(i),function(s){return Tg.call(i,s)}))}:Dd,_p=Ku?function(i){for(var s=[];i;)To(s,pd(i)),i=sc(i);return s}:Dd,Yt=an;(Wu&&Yt(new Wu(new ArrayBuffer(1)))!=ze||Wa&&Yt(new Wa)!=Vt||zu&&Yt(zu.resolve())!=A||Ui&&Yt(new Ui)!=oe||za&&Yt(new za)!=F)&&(Yt=function(i){var s=an(i),u=s==wn?i.constructor:t,m=u?ai(u):"";if(m)switch(m){case LS:return ze;case xS:return Vt;case US:return A;case BS:return oe;case VS:return F}return s});function eA(i,s,u){for(var m=-1,v=u.length;++m<v;){var E=u[m],b=E.size;switch(E.type){case"drop":i+=b;break;case"dropRight":s-=b;break;case"take":s=jt(s,i+b);break;case"takeRight":i=kt(i,s-b);break}}return{start:i,end:s}}function tA(i){var s=i.match(sb);return s?s[1].split(cb):[]}function vp(i,s,u){s=ko(s,i);for(var m=-1,v=s.length,E=!1;++m<v;){var b=Or(s[m]);if(!(E=i!=null&&u(i,b)))break;i=i[b]}return E||++m!=v?E:(v=i==null?0:i.length,!!v&&Dc(v)&&Zr(b,v)&&(Ee(i)||si(i)))}function nA(i){var s=i.length,u=new i.constructor(s);return s&&typeof i[0]=="string"&&$e.call(i,"index")&&(u.index=i.index,u.input=i.input),u}function yp(i){return typeof i.constructor=="function"&&!es(i)?Vi(sc(i)):{}}function rA(i,s,u){var m=i.constructor;switch(s){case Ne:return ld(i);case Ar:case qr:return new m(+i);case ze:return FI(i,u);case cr:case Eo:case kr:case lr:case Ha:case Ri:case Eu:case wu:case Tu:return tp(i,u);case Vt:return new m;case En:case Je:return new m(i);case G:return HI(i);case oe:return new m;case et:return $I(i)}}function oA(i,s){var u=s.length;if(!u)return i;var m=u-1;return s[m]=(u>1?"& ":"")+s[m],s=s.join(u>2?", ":" "),i.replace(ab,`{
|
54
54
|
/* [wrapped with `+s+`] */
|
55
|
-
`)}function oA(i){return Ee(i)||ai(i)||!!(bg&&i&&i[bg])}function Zr(i,s){var u=typeof i;return s=s??at,!!s&&(u=="number"||u!="symbol"&&pb.test(i))&&i>-1&&i%1==0&&i<s}function sn(i,s,u){if(!ut(u))return!1;var m=typeof s;return(m=="number"?fn(u)&&Zr(s,u.length):m=="string"&&s in u)?hr(u[s],i):!1}function _d(i,s){if(Ee(i))return!1;var u=typeof i;return u=="number"||u=="symbol"||u=="boolean"||i==null||Sn(i)?!0:tb.test(i)||!eb.test(i)||s!=null&&i in Qe(s)}function iA(i){var s=typeof i;return s=="string"||s=="number"||s=="symbol"||s=="boolean"?i!=="__proto__":i===null}function vd(i){var s=Sc(i),u=y[s];if(typeof u!="function"||!(s in Oe.prototype))return!1;if(i===u)return!0;var m=md(u);return!!m&&i===m[0]}function aA(i){return!!Cg&&Cg in i}var sA=nc?eo:Ld;function es(i){var s=i&&i.constructor,u=typeof s=="function"&&s.prototype||Li;return i===u}function Cp(i){return i===i&&!ut(i)}function Ep(i,s){return function(u){return u==null?!1:u[i]===s&&(s!==t||i in Qe(u))}}function cA(i){var s=Pc(i,function(m){return u.size===f&&u.clear(),m}),u=s.cache;return s}function lA(i,s){var u=i[1],m=s[1],v=u|m,E=v<(k|I|M),b=m==M&&u==D||m==M&&u==ce&&i[7].length<=s[8]||m==(M|ce)&&s[7].length<=s[8]&&u==D;if(!(E||b))return i;m&k&&(i[2]=s[2],v|=u&k?0:N);var S=s[3];if(S){var P=i[3];i[3]=P?rp(P,S,s[4]):S,i[4]=P?To(i[3],g):s[4]}return S=s[5],S&&(P=i[5],i[5]=P?op(P,S,s[6]):S,i[6]=P?To(i[5],g):s[6]),S=s[7],S&&(i[7]=S),m&M&&(i[8]=i[8]==null?s[8]:jt(i[8],s[8])),i[9]==null&&(i[9]=s[9]),i[0]=s[0],i[1]=v,i}function uA(i){var s=[];if(i!=null)for(var u in Qe(i))s.push(u);return s}function dA(i){return oc.call(i)}function wp(i,s,u){return s=kt(s===t?i.length-1:s,0),function(){for(var m=arguments,v=-1,E=kt(m.length-s,0),b=U(E);++v<E;)b[v]=m[s+v];v=-1;for(var S=U(s+1);++v<s;)S[v]=m[v];return S[s]=u(b),Tn(i,this,S)}}function Tp(i,s){return s.length<2?i:ri(i,Gn(s,0,-1))}function hA(i,s){for(var u=i.length,m=jt(s.length,u),v=hn(i);m--;){var E=s[m];i[m]=Zr(E,u)?v[E]:t}return i}function yd(i,s){if(!(s==="constructor"&&typeof i[s]=="function")&&s!="__proto__")return i[s]}var bp=Sp(qg),ts=AI||function(i,s){return Ft.setTimeout(i,s)},Cd=Sp(LS);function Ip(i,s,u){var m=s+"";return Cd(i,rA(m,fA(eA(m),u)))}function Sp(i){var s=0,u=0;return function(){var m=OI(),v=Be-(m-u);if(u=m,v>0){if(++s>=ue)return arguments[0]}else s=0;return i.apply(t,arguments)}}function kc(i,s){var u=-1,m=i.length,v=m-1;for(s=s===t?m:s;++u<s;){var E=nd(u,v),b=i[E];i[E]=i[u],i[u]=b}return i.length=s,i}var Ap=cA(function(i){var s=[];return i.charCodeAt(0)===46&&s.push(""),i.replace(nb,function(u,m,v,E){s.push(v?E.replace(ub,"$1"):m||u)}),s});function Or(i){if(typeof i=="string"||Sn(i))return i;var s=i+"";return s=="0"&&1/i==-Mt?"-0":s}function ii(i){if(i!=null){try{return rc.call(i)}catch{}try{return i+""}catch{}}return""}function fA(i,s){return $n(Ba,function(u){var m="_."+u[0];s&u[1]&&!Xs(i,m)&&i.push(m)}),i.sort()}function kp(i){if(i instanceof Oe)return i.clone();var s=new Wn(i.__wrapped__,i.__chain__);return s.__actions__=hn(i.__actions__),s.__index__=i.__index__,s.__values__=i.__values__,s}function mA(i,s,u){(u?sn(i,s,u):s===t)?s=1:s=kt(be(s),0);var m=i==null?0:i.length;if(!m||s<1)return[];for(var v=0,E=0,b=U(uc(m/s));v<m;)b[E++]=Gn(i,v,v+=s);return b}function gA(i){for(var s=-1,u=i==null?0:i.length,m=0,v=[];++s<u;){var E=i[s];E&&(v[m++]=E)}return v}function pA(){var i=arguments.length;if(!i)return[];for(var s=U(i-1),u=arguments[0],m=i;m--;)s[m-1]=arguments[m];return wo(Ee(u)?hn(u):[u],Ht(s,1))}var _A=Se(function(i,s){return gt(i)?Ya(i,Ht(s,1,gt,!0)):[]}),vA=Se(function(i,s){var u=qn(s);return gt(u)&&(u=t),gt(i)?Ya(i,Ht(s,1,gt,!0),de(u,2)):[]}),yA=Se(function(i,s){var u=qn(s);return gt(u)&&(u=t),gt(i)?Ya(i,Ht(s,1,gt,!0),t,u):[]});function CA(i,s,u){var m=i==null?0:i.length;return m?(s=u||s===t?1:be(s),Gn(i,s<0?0:s,m)):[]}function EA(i,s,u){var m=i==null?0:i.length;return m?(s=u||s===t?1:be(s),s=m-s,Gn(i,0,s<0?0:s)):[]}function wA(i,s){return i&&i.length?Cc(i,de(s,3),!0,!0):[]}function TA(i,s){return i&&i.length?Cc(i,de(s,3),!0):[]}function bA(i,s,u,m){var v=i==null?0:i.length;return v?(u&&typeof u!="number"&&sn(i,s,u)&&(u=0,m=v),pS(i,s,u,m)):[]}function Np(i,s,u){var m=i==null?0:i.length;if(!m)return-1;var v=u==null?0:be(u);return v<0&&(v=kt(m+v,0)),Zs(i,de(s,3),v)}function Rp(i,s,u){var m=i==null?0:i.length;if(!m)return-1;var v=m-1;return u!==t&&(v=be(u),v=u<0?kt(m+v,0):jt(v,m-1)),Zs(i,de(s,3),v,!0)}function Op(i){var s=i==null?0:i.length;return s?Ht(i,1):[]}function IA(i){var s=i==null?0:i.length;return s?Ht(i,Mt):[]}function SA(i,s){var u=i==null?0:i.length;return u?(s=s===t?1:be(s),Ht(i,s)):[]}function AA(i){for(var s=-1,u=i==null?0:i.length,m={};++s<u;){var v=i[s];m[v[0]]=v[1]}return m}function Pp(i){return i&&i.length?i[0]:t}function kA(i,s,u){var m=i==null?0:i.length;if(!m)return-1;var v=u==null?0:be(u);return v<0&&(v=kt(m+v,0)),Oi(i,s,v)}function NA(i){var s=i==null?0:i.length;return s?Gn(i,0,-1):[]}var RA=Se(function(i){var s=st(i,sd);return s.length&&s[0]===i[0]?Qu(s):[]}),OA=Se(function(i){var s=qn(i),u=st(i,sd);return s===qn(u)?s=t:u.pop(),u.length&&u[0]===i[0]?Qu(u,de(s,2)):[]}),PA=Se(function(i){var s=qn(i),u=st(i,sd);return s=typeof s=="function"?s:t,s&&u.pop(),u.length&&u[0]===i[0]?Qu(u,t,s):[]});function MA(i,s){return i==null?"":NI.call(i,s)}function qn(i){var s=i==null?0:i.length;return s?i[s-1]:t}function DA(i,s,u){var m=i==null?0:i.length;if(!m)return-1;var v=m;return u!==t&&(v=be(u),v=v<0?kt(m+v,0):jt(v,m-1)),s===s?fI(i,s,v):Zs(i,hg,v,!0)}function LA(i,s){return i&&i.length?Kg(i,be(s)):t}var xA=Se(Mp);function Mp(i,s){return i&&i.length&&s&&s.length?td(i,s):i}function UA(i,s,u){return i&&i.length&&s&&s.length?td(i,s,de(u,2)):i}function BA(i,s,u){return i&&i.length&&s&&s.length?td(i,s,t,u):i}var VA=Xr(function(i,s){var u=i==null?0:i.length,m=qu(i,s);return Gg(i,st(s,function(v){return Zr(v,u)?+v:v}).sort(np)),m});function FA(i,s){var u=[];if(!(i&&i.length))return u;var m=-1,v=[],E=i.length;for(s=de(s,3);++m<E;){var b=i[m];s(b,m,i)&&(u.push(b),v.push(m))}return Gg(i,v),u}function Ed(i){return i==null?i:MI.call(i)}function HA(i,s,u){var m=i==null?0:i.length;return m?(u&&typeof u!="number"&&sn(i,s,u)?(s=0,u=m):(s=s==null?0:be(s),u=u===t?m:be(u)),Gn(i,s,u)):[]}function $A(i,s){return yc(i,s)}function KA(i,s,u){return od(i,s,de(u,2))}function WA(i,s){var u=i==null?0:i.length;if(u){var m=yc(i,s);if(m<u&&hr(i[m],s))return m}return-1}function zA(i,s){return yc(i,s,!0)}function GA(i,s,u){return od(i,s,de(u,2),!0)}function qA(i,s){var u=i==null?0:i.length;if(u){var m=yc(i,s,!0)-1;if(hr(i[m],s))return m}return-1}function jA(i){return i&&i.length?jg(i):[]}function YA(i,s){return i&&i.length?jg(i,de(s,2)):[]}function JA(i){var s=i==null?0:i.length;return s?Gn(i,1,s):[]}function QA(i,s,u){return i&&i.length?(s=u||s===t?1:be(s),Gn(i,0,s<0?0:s)):[]}function XA(i,s,u){var m=i==null?0:i.length;return m?(s=u||s===t?1:be(s),s=m-s,Gn(i,s<0?0:s,m)):[]}function ZA(i,s){return i&&i.length?Cc(i,de(s,3),!1,!0):[]}function ek(i,s){return i&&i.length?Cc(i,de(s,3)):[]}var tk=Se(function(i){return So(Ht(i,1,gt,!0))}),nk=Se(function(i){var s=qn(i);return gt(s)&&(s=t),So(Ht(i,1,gt,!0),de(s,2))}),rk=Se(function(i){var s=qn(i);return s=typeof s=="function"?s:t,So(Ht(i,1,gt,!0),t,s)});function ok(i){return i&&i.length?So(i):[]}function ik(i,s){return i&&i.length?So(i,de(s,2)):[]}function ak(i,s){return s=typeof s=="function"?s:t,i&&i.length?So(i,t,s):[]}function wd(i){if(!(i&&i.length))return[];var s=0;return i=Eo(i,function(u){if(gt(u))return s=kt(u.length,s),!0}),Vu(s,function(u){return st(i,xu(u))})}function Dp(i,s){if(!(i&&i.length))return[];var u=wd(i);return s==null?u:st(u,function(m){return Tn(s,t,m)})}var sk=Se(function(i,s){return gt(i)?Ya(i,s):[]}),ck=Se(function(i){return ad(Eo(i,gt))}),lk=Se(function(i){var s=qn(i);return gt(s)&&(s=t),ad(Eo(i,gt),de(s,2))}),uk=Se(function(i){var s=qn(i);return s=typeof s=="function"?s:t,ad(Eo(i,gt),t,s)}),dk=Se(wd);function hk(i,s){return Xg(i||[],s||[],ja)}function fk(i,s){return Xg(i||[],s||[],Xa)}var mk=Se(function(i){var s=i.length,u=s>1?i[s-1]:t;return u=typeof u=="function"?(i.pop(),u):t,Dp(i,u)});function Lp(i){var s=y(i);return s.__chain__=!0,s}function gk(i,s){return s(i),i}function Nc(i,s){return s(i)}var pk=Xr(function(i){var s=i.length,u=s?i[0]:0,m=this.__wrapped__,v=function(E){return qu(E,i)};return s>1||this.__actions__.length||!(m instanceof Oe)||!Zr(u)?this.thru(v):(m=m.slice(u,+u+(s?1:0)),m.__actions__.push({func:Nc,args:[v],thisArg:t}),new Wn(m,this.__chain__).thru(function(E){return s&&!E.length&&E.push(t),E}))});function _k(){return Lp(this)}function vk(){return new Wn(this.value(),this.__chain__)}function yk(){this.__values__===t&&(this.__values__=Yp(this.value()));var i=this.__index__>=this.__values__.length,s=i?t:this.__values__[this.__index__++];return{done:i,value:s}}function Ck(){return this}function Ek(i){for(var s,u=this;u instanceof mc;){var m=kp(u);m.__index__=0,m.__values__=t,s?v.__wrapped__=m:s=m;var v=m;u=u.__wrapped__}return v.__wrapped__=i,s}function wk(){var i=this.__wrapped__;if(i instanceof Oe){var s=i;return this.__actions__.length&&(s=new Oe(this)),s=s.reverse(),s.__actions__.push({func:Nc,args:[Ed],thisArg:t}),new Wn(s,this.__chain__)}return this.thru(Ed)}function Tk(){return Qg(this.__wrapped__,this.__actions__)}var bk=Ec(function(i,s,u){$e.call(i,u)?++i[u]:Jr(i,u,1)});function Ik(i,s,u){var m=Ee(i)?ug:gS;return u&&sn(i,s,u)&&(s=t),m(i,de(s,3))}function Sk(i,s){var u=Ee(i)?Eo:Dg;return u(i,de(s,3))}var Ak=cp(Np),kk=cp(Rp);function Nk(i,s){return Ht(Rc(i,s),1)}function Rk(i,s){return Ht(Rc(i,s),Mt)}function Ok(i,s,u){return u=u===t?1:be(u),Ht(Rc(i,s),u)}function xp(i,s){var u=Ee(i)?$n:Io;return u(i,de(s,3))}function Up(i,s){var u=Ee(i)?Jb:Mg;return u(i,de(s,3))}var Pk=Ec(function(i,s,u){$e.call(i,u)?i[u].push(s):Jr(i,u,[s])});function Mk(i,s,u,m){i=fn(i)?i:Ki(i),u=u&&!m?be(u):0;var v=i.length;return u<0&&(u=kt(v+u,0)),Lc(i)?u<=v&&i.indexOf(s,u)>-1:!!v&&Oi(i,s,u)>-1}var Dk=Se(function(i,s,u){var m=-1,v=typeof s=="function",E=fn(i)?U(i.length):[];return Io(i,function(b){E[++m]=v?Tn(s,b,u):Ja(b,s,u)}),E}),Lk=Ec(function(i,s,u){Jr(i,u,s)});function Rc(i,s){var u=Ee(i)?st:Fg;return u(i,de(s,3))}function xk(i,s,u,m){return i==null?[]:(Ee(s)||(s=s==null?[]:[s]),u=m?t:u,Ee(u)||(u=u==null?[]:[u]),Wg(i,s,u))}var Uk=Ec(function(i,s,u){i[u?0:1].push(s)},function(){return[[],[]]});function Bk(i,s,u){var m=Ee(i)?Du:mg,v=arguments.length<3;return m(i,de(s,4),u,v,Io)}function Vk(i,s,u){var m=Ee(i)?Qb:mg,v=arguments.length<3;return m(i,de(s,4),u,v,Mg)}function Fk(i,s){var u=Ee(i)?Eo:Dg;return u(i,Mc(de(s,3)))}function Hk(i){var s=Ee(i)?Ng:MS;return s(i)}function $k(i,s,u){(u?sn(i,s,u):s===t)?s=1:s=be(s);var m=Ee(i)?uS:DS;return m(i,s)}function Kk(i){var s=Ee(i)?dS:xS;return s(i)}function Wk(i){if(i==null)return 0;if(fn(i))return Lc(i)?Mi(i):i.length;var s=Yt(i);return s==Vt||s==oe?i.size:Zu(i).length}function zk(i,s,u){var m=Ee(i)?Lu:US;return u&&sn(i,s,u)&&(s=t),m(i,de(s,3))}var Gk=Se(function(i,s){if(i==null)return[];var u=s.length;return u>1&&sn(i,s[0],s[1])?s=[]:u>2&&sn(s[0],s[1],s[2])&&(s=[s[0]]),Wg(i,Ht(s,1),[])}),Oc=SI||function(){return Ft.Date.now()};function qk(i,s){if(typeof s!="function")throw new Kn(l);return i=be(i),function(){if(--i<1)return s.apply(this,arguments)}}function Bp(i,s,u){return s=u?t:s,s=i&&s==null?i.length:s,Qr(i,M,t,t,t,t,s)}function Vp(i,s){var u;if(typeof s!="function")throw new Kn(l);return i=be(i),function(){return--i>0&&(u=s.apply(this,arguments)),i<=1&&(s=t),u}}var Td=Se(function(i,s,u){var m=k;if(u.length){var v=To(u,Hi(Td));m|=K}return Qr(i,m,s,u,v)}),Fp=Se(function(i,s,u){var m=k|I;if(u.length){var v=To(u,Hi(Fp));m|=K}return Qr(s,m,i,u,v)});function Hp(i,s,u){s=u?t:s;var m=Qr(i,D,t,t,t,t,t,s);return m.placeholder=Hp.placeholder,m}function $p(i,s,u){s=u?t:s;var m=Qr(i,L,t,t,t,t,t,s);return m.placeholder=$p.placeholder,m}function Kp(i,s,u){var m,v,E,b,S,P,W=0,z=!1,j=!1,te=!0;if(typeof i!="function")throw new Kn(l);s=jn(s)||0,ut(u)&&(z=!!u.leading,j="maxWait"in u,E=j?kt(jn(u.maxWait)||0,s):E,te="trailing"in u?!!u.trailing:te);function se(pt){var fr=m,no=v;return m=v=t,W=pt,b=i.apply(no,fr),b}function he(pt){return W=pt,S=ts(Re,s),z?se(pt):b}function Ie(pt){var fr=pt-P,no=pt-W,c_=s-fr;return j?jt(c_,E-no):c_}function fe(pt){var fr=pt-P,no=pt-W;return P===t||fr>=s||fr<0||j&&no>=E}function Re(){var pt=Oc();if(fe(pt))return Pe(pt);S=ts(Re,Ie(pt))}function Pe(pt){return S=t,te&&m?se(pt):(m=v=t,b)}function An(){S!==t&&Zg(S),W=0,m=P=v=S=t}function cn(){return S===t?b:Pe(Oc())}function kn(){var pt=Oc(),fr=fe(pt);if(m=arguments,v=this,P=pt,fr){if(S===t)return he(P);if(j)return Zg(S),S=ts(Re,s),se(P)}return S===t&&(S=ts(Re,s)),b}return kn.cancel=An,kn.flush=cn,kn}var jk=Se(function(i,s){return Pg(i,1,s)}),Yk=Se(function(i,s,u){return Pg(i,jn(s)||0,u)});function Jk(i){return Qr(i,ae)}function Pc(i,s){if(typeof i!="function"||s!=null&&typeof s!="function")throw new Kn(l);var u=function(){var m=arguments,v=s?s.apply(this,m):m[0],E=u.cache;if(E.has(v))return E.get(v);var b=i.apply(this,m);return u.cache=E.set(v,b)||E,b};return u.cache=new(Pc.Cache||Yr),u}Pc.Cache=Yr;function Mc(i){if(typeof i!="function")throw new Kn(l);return function(){var s=arguments;switch(s.length){case 0:return!i.call(this);case 1:return!i.call(this,s[0]);case 2:return!i.call(this,s[0],s[1]);case 3:return!i.call(this,s[0],s[1],s[2])}return!i.apply(this,s)}}function Qk(i){return Vp(2,i)}var Xk=BS(function(i,s){s=s.length==1&&Ee(s[0])?st(s[0],bn(de())):st(Ht(s,1),bn(de()));var u=s.length;return Se(function(m){for(var v=-1,E=jt(m.length,u);++v<E;)m[v]=s[v].call(this,m[v]);return Tn(i,this,m)})}),bd=Se(function(i,s){var u=To(s,Hi(bd));return Qr(i,K,t,s,u)}),Wp=Se(function(i,s){var u=To(s,Hi(Wp));return Qr(i,q,t,s,u)}),Zk=Xr(function(i,s){return Qr(i,ce,t,t,t,s)});function eN(i,s){if(typeof i!="function")throw new Kn(l);return s=s===t?s:be(s),Se(i,s)}function tN(i,s){if(typeof i!="function")throw new Kn(l);return s=s==null?0:kt(be(s),0),Se(function(u){var m=u[s],v=ko(u,0,s);return m&&wo(v,m),Tn(i,this,v)})}function nN(i,s,u){var m=!0,v=!0;if(typeof i!="function")throw new Kn(l);return ut(u)&&(m="leading"in u?!!u.leading:m,v="trailing"in u?!!u.trailing:v),Kp(i,s,{leading:m,maxWait:s,trailing:v})}function rN(i){return Bp(i,1)}function oN(i,s){return bd(cd(s),i)}function iN(){if(!arguments.length)return[];var i=arguments[0];return Ee(i)?i:[i]}function aN(i){return zn(i,w)}function sN(i,s){return s=typeof s=="function"?s:t,zn(i,w,s)}function cN(i){return zn(i,_|w)}function lN(i,s){return s=typeof s=="function"?s:t,zn(i,_|w,s)}function uN(i,s){return s==null||Og(i,s,Dt(s))}function hr(i,s){return i===s||i!==i&&s!==s}var dN=Ic(Ju),hN=Ic(function(i,s){return i>=s}),ai=Ug(function(){return arguments}())?Ug:function(i){return dt(i)&&$e.call(i,"callee")&&!Tg.call(i,"callee")},Ee=U.isArray,fN=og?bn(og):ES;function fn(i){return i!=null&&Dc(i.length)&&!eo(i)}function gt(i){return dt(i)&&fn(i)}function mN(i){return i===!0||i===!1||dt(i)&&an(i)==Ar}var No=kI||Ld,gN=ig?bn(ig):wS;function pN(i){return dt(i)&&i.nodeType===1&&!ns(i)}function _N(i){if(i==null)return!0;if(fn(i)&&(Ee(i)||typeof i=="string"||typeof i.splice=="function"||No(i)||$i(i)||ai(i)))return!i.length;var s=Yt(i);if(s==Vt||s==oe)return!i.size;if(es(i))return!Zu(i).length;for(var u in i)if($e.call(i,u))return!1;return!0}function vN(i,s){return Qa(i,s)}function yN(i,s,u){u=typeof u=="function"?u:t;var m=u?u(i,s):t;return m===t?Qa(i,s,t,u):!!m}function Id(i){if(!dt(i))return!1;var s=an(i);return s==_o||s==Fa||typeof i.message=="string"&&typeof i.name=="string"&&!ns(i)}function CN(i){return typeof i=="number"&&Ig(i)}function eo(i){if(!ut(i))return!1;var s=an(i);return s==vo||s==yo||s==Va||s==R}function zp(i){return typeof i=="number"&&i==be(i)}function Dc(i){return typeof i=="number"&&i>-1&&i%1==0&&i<=at}function ut(i){var s=typeof i;return i!=null&&(s=="object"||s=="function")}function dt(i){return i!=null&&typeof i=="object"}var Gp=ag?bn(ag):bS;function EN(i,s){return i===s||Xu(i,s,gd(s))}function wN(i,s,u){return u=typeof u=="function"?u:t,Xu(i,s,gd(s),u)}function TN(i){return qp(i)&&i!=+i}function bN(i){if(sA(i))throw new Ce(a);return Bg(i)}function IN(i){return i===null}function SN(i){return i==null}function qp(i){return typeof i=="number"||dt(i)&&an(i)==En}function ns(i){if(!dt(i)||an(i)!=wn)return!1;var s=sc(i);if(s===null)return!0;var u=$e.call(s,"constructor")&&s.constructor;return typeof u=="function"&&u instanceof u&&rc.call(u)==wI}var Sd=sg?bn(sg):IS;function AN(i){return zp(i)&&i>=-at&&i<=at}var jp=cg?bn(cg):SS;function Lc(i){return typeof i=="string"||!Ee(i)&&dt(i)&&an(i)==Je}function Sn(i){return typeof i=="symbol"||dt(i)&&an(i)==et}var $i=lg?bn(lg):AS;function kN(i){return i===t}function NN(i){return dt(i)&&Yt(i)==F}function RN(i){return dt(i)&&an(i)==J}var ON=Ic(ed),PN=Ic(function(i,s){return i<=s});function Yp(i){if(!i)return[];if(fn(i))return Lc(i)?ur(i):hn(i);if(Ka&&i[Ka])return uI(i[Ka]());var s=Yt(i),u=s==Vt?Hu:s==oe?ec:Ki;return u(i)}function to(i){if(!i)return i===0?i:0;if(i=jn(i),i===Mt||i===-Mt){var s=i<0?-1:1;return s*Et}return i===i?i:0}function be(i){var s=to(i),u=s%1;return s===s?u?s-u:s:0}function Jp(i){return i?ni(be(i),0,St):0}function jn(i){if(typeof i=="number")return i;if(Sn(i))return on;if(ut(i)){var s=typeof i.valueOf=="function"?i.valueOf():i;i=ut(s)?s+"":s}if(typeof i!="string")return i===0?i:+i;i=gg(i);var u=fb.test(i);return u||gb.test(i)?qb(i.slice(2),u?2:8):hb.test(i)?on:+i}function Qp(i){return Rr(i,mn(i))}function MN(i){return i?ni(be(i),-at,at):i===0?i:0}function He(i){return i==null?"":In(i)}var DN=Vi(function(i,s){if(es(s)||fn(s)){Rr(s,Dt(s),i);return}for(var u in s)$e.call(s,u)&&ja(i,u,s[u])}),Xp=Vi(function(i,s){Rr(s,mn(s),i)}),xc=Vi(function(i,s,u,m){Rr(s,mn(s),i,m)}),LN=Vi(function(i,s,u,m){Rr(s,Dt(s),i,m)}),xN=Xr(qu);function UN(i,s){var u=Bi(i);return s==null?u:Rg(u,s)}var BN=Se(function(i,s){i=Qe(i);var u=-1,m=s.length,v=m>2?s[2]:t;for(v&&sn(s[0],s[1],v)&&(m=1);++u<m;)for(var E=s[u],b=mn(E),S=-1,P=b.length;++S<P;){var W=b[S],z=i[W];(z===t||hr(z,Li[W])&&!$e.call(i,W))&&(i[W]=E[W])}return i}),VN=Se(function(i){return i.push(t,gp),Tn(Zp,t,i)});function FN(i,s){return dg(i,de(s,3),Nr)}function HN(i,s){return dg(i,de(s,3),Yu)}function $N(i,s){return i==null?i:ju(i,de(s,3),mn)}function KN(i,s){return i==null?i:Lg(i,de(s,3),mn)}function WN(i,s){return i&&Nr(i,de(s,3))}function zN(i,s){return i&&Yu(i,de(s,3))}function GN(i){return i==null?[]:_c(i,Dt(i))}function qN(i){return i==null?[]:_c(i,mn(i))}function Ad(i,s,u){var m=i==null?t:ri(i,s);return m===t?u:m}function jN(i,s){return i!=null&&vp(i,s,_S)}function kd(i,s){return i!=null&&vp(i,s,vS)}var YN=up(function(i,s,u){s!=null&&typeof s.toString!="function"&&(s=oc.call(s)),i[s]=u},Rd(gn)),JN=up(function(i,s,u){s!=null&&typeof s.toString!="function"&&(s=oc.call(s)),$e.call(i,s)?i[s].push(u):i[s]=[u]},de),QN=Se(Ja);function Dt(i){return fn(i)?kg(i):Zu(i)}function mn(i){return fn(i)?kg(i,!0):kS(i)}function XN(i,s){var u={};return s=de(s,3),Nr(i,function(m,v,E){Jr(u,s(m,v,E),m)}),u}function ZN(i,s){var u={};return s=de(s,3),Nr(i,function(m,v,E){Jr(u,v,s(m,v,E))}),u}var eR=Vi(function(i,s,u){vc(i,s,u)}),Zp=Vi(function(i,s,u,m){vc(i,s,u,m)}),tR=Xr(function(i,s){var u={};if(i==null)return u;var m=!1;s=st(s,function(E){return E=Ao(E,i),m||(m=E.length>1),E}),Rr(i,fd(i),u),m&&(u=zn(u,_|p|w,YS));for(var v=s.length;v--;)id(u,s[v]);return u});function nR(i,s){return e_(i,Mc(de(s)))}var rR=Xr(function(i,s){return i==null?{}:RS(i,s)});function e_(i,s){if(i==null)return{};var u=st(fd(i),function(m){return[m]});return s=de(s),zg(i,u,function(m,v){return s(m,v[0])})}function oR(i,s,u){s=Ao(s,i);var m=-1,v=s.length;for(v||(v=1,i=t);++m<v;){var E=i==null?t:i[Or(s[m])];E===t&&(m=v,E=u),i=eo(E)?E.call(i):E}return i}function iR(i,s,u){return i==null?i:Xa(i,s,u)}function aR(i,s,u,m){return m=typeof m=="function"?m:t,i==null?i:Xa(i,s,u,m)}var t_=fp(Dt),n_=fp(mn);function sR(i,s,u){var m=Ee(i),v=m||No(i)||$i(i);if(s=de(s,4),u==null){var E=i&&i.constructor;v?u=m?new E:[]:ut(i)?u=eo(E)?Bi(sc(i)):{}:u={}}return(v?$n:Nr)(i,function(b,S,P){return s(u,b,S,P)}),u}function cR(i,s){return i==null?!0:id(i,s)}function lR(i,s,u){return i==null?i:Jg(i,s,cd(u))}function uR(i,s,u,m){return m=typeof m=="function"?m:t,i==null?i:Jg(i,s,cd(u),m)}function Ki(i){return i==null?[]:Fu(i,Dt(i))}function dR(i){return i==null?[]:Fu(i,mn(i))}function hR(i,s,u){return u===t&&(u=s,s=t),u!==t&&(u=jn(u),u=u===u?u:0),s!==t&&(s=jn(s),s=s===s?s:0),ni(jn(i),s,u)}function fR(i,s,u){return s=to(s),u===t?(u=s,s=0):u=to(u),i=jn(i),yS(i,s,u)}function mR(i,s,u){if(u&&typeof u!="boolean"&&sn(i,s,u)&&(s=u=t),u===t&&(typeof s=="boolean"?(u=s,s=t):typeof i=="boolean"&&(u=i,i=t)),i===t&&s===t?(i=0,s=1):(i=to(i),s===t?(s=i,i=0):s=to(s)),i>s){var m=i;i=s,s=m}if(u||i%1||s%1){var v=Sg();return jt(i+v*(s-i+Gb("1e-"+((v+"").length-1))),s)}return nd(i,s)}var gR=Fi(function(i,s,u){return s=s.toLowerCase(),i+(u?r_(s):s)});function r_(i){return Nd(He(i).toLowerCase())}function o_(i){return i=He(i),i&&i.replace(_b,iI).replace(xb,"")}function pR(i,s,u){i=He(i),s=In(s);var m=i.length;u=u===t?m:ni(be(u),0,m);var v=u;return u-=s.length,u>=0&&i.slice(u,v)==s}function _R(i){return i=He(i),i&&QT.test(i)?i.replace(Lm,aI):i}function vR(i){return i=He(i),i&&rb.test(i)?i.replace(bu,"\\$&"):i}var yR=Fi(function(i,s,u){return i+(u?"-":"")+s.toLowerCase()}),CR=Fi(function(i,s,u){return i+(u?" ":"")+s.toLowerCase()}),ER=sp("toLowerCase");function wR(i,s,u){i=He(i),s=be(s);var m=s?Mi(i):0;if(!s||m>=s)return i;var v=(s-m)/2;return bc(dc(v),u)+i+bc(uc(v),u)}function TR(i,s,u){i=He(i),s=be(s);var m=s?Mi(i):0;return s&&m<s?i+bc(s-m,u):i}function bR(i,s,u){i=He(i),s=be(s);var m=s?Mi(i):0;return s&&m<s?bc(s-m,u)+i:i}function IR(i,s,u){return u||s==null?s=0:s&&(s=+s),PI(He(i).replace(Iu,""),s||0)}function SR(i,s,u){return(u?sn(i,s,u):s===t)?s=1:s=be(s),rd(He(i),s)}function AR(){var i=arguments,s=He(i[0]);return i.length<3?s:s.replace(i[1],i[2])}var kR=Fi(function(i,s,u){return i+(u?"_":"")+s.toLowerCase()});function NR(i,s,u){return u&&typeof u!="number"&&sn(i,s,u)&&(s=u=t),u=u===t?St:u>>>0,u?(i=He(i),i&&(typeof s=="string"||s!=null&&!Sd(s))&&(s=In(s),!s&&Pi(i))?ko(ur(i),0,u):i.split(s,u)):[]}var RR=Fi(function(i,s,u){return i+(u?" ":"")+Nd(s)});function OR(i,s,u){return i=He(i),u=u==null?0:ni(be(u),0,i.length),s=In(s),i.slice(u,u+s.length)==s}function PR(i,s,u){var m=y.templateSettings;u&&sn(i,s,u)&&(s=t),i=He(i),s=xc({},s,m,mp);var v=xc({},s.imports,m.imports,mp),E=Dt(v),b=Fu(v,E),S,P,W=0,z=s.interpolate||Ys,j="__p += '",te=$u((s.escape||Ys).source+"|"+z.source+"|"+(z===xm?db:Ys).source+"|"+(s.evaluate||Ys).source+"|$","g"),se="//# sourceURL="+($e.call(s,"sourceURL")?(s.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Hb+"]")+`
|
56
|
-
`;i.replace(te,function(fe,Re,Pe,An,cn,kn){return Pe||(Pe=An),j+=i.slice(W,kn).replace(
|
55
|
+
`)}function iA(i){return Ee(i)||si(i)||!!(bg&&i&&i[bg])}function Zr(i,s){var u=typeof i;return s=s??at,!!s&&(u=="number"||u!="symbol"&&_b.test(i))&&i>-1&&i%1==0&&i<s}function sn(i,s,u){if(!ut(u))return!1;var m=typeof s;return(m=="number"?fn(u)&&Zr(s,u.length):m=="string"&&s in u)?hr(u[s],i):!1}function _d(i,s){if(Ee(i))return!1;var u=typeof i;return u=="number"||u=="symbol"||u=="boolean"||i==null||In(i)?!0:nb.test(i)||!tb.test(i)||s!=null&&i in Qe(s)}function aA(i){var s=typeof i;return s=="string"||s=="number"||s=="symbol"||s=="boolean"?i!=="__proto__":i===null}function vd(i){var s=Ic(i),u=y[s];if(typeof u!="function"||!(s in Oe.prototype))return!1;if(i===u)return!0;var m=md(u);return!!m&&i===m[0]}function sA(i){return!!Cg&&Cg in i}var cA=nc?eo:Ld;function es(i){var s=i&&i.constructor,u=typeof s=="function"&&s.prototype||xi;return i===u}function Cp(i){return i===i&&!ut(i)}function Ep(i,s){return function(u){return u==null?!1:u[i]===s&&(s!==t||i in Qe(u))}}function lA(i){var s=Pc(i,function(m){return u.size===f&&u.clear(),m}),u=s.cache;return s}function uA(i,s){var u=i[1],m=s[1],v=u|m,E=v<(k|S|M),b=m==M&&u==D||m==M&&u==ce&&i[7].length<=s[8]||m==(M|ce)&&s[7].length<=s[8]&&u==D;if(!(E||b))return i;m&k&&(i[2]=s[2],v|=u&k?0:N);var I=s[3];if(I){var P=i[3];i[3]=P?rp(P,I,s[4]):I,i[4]=P?bo(i[3],g):s[4]}return I=s[5],I&&(P=i[5],i[5]=P?op(P,I,s[6]):I,i[6]=P?bo(i[5],g):s[6]),I=s[7],I&&(i[7]=I),m&M&&(i[8]=i[8]==null?s[8]:jt(i[8],s[8])),i[9]==null&&(i[9]=s[9]),i[0]=s[0],i[1]=v,i}function dA(i){var s=[];if(i!=null)for(var u in Qe(i))s.push(u);return s}function hA(i){return oc.call(i)}function wp(i,s,u){return s=kt(s===t?i.length-1:s,0),function(){for(var m=arguments,v=-1,E=kt(m.length-s,0),b=U(E);++v<E;)b[v]=m[s+v];v=-1;for(var I=U(s+1);++v<s;)I[v]=m[v];return I[s]=u(b),Tn(i,this,I)}}function Tp(i,s){return s.length<2?i:oi(i,Gn(s,0,-1))}function fA(i,s){for(var u=i.length,m=jt(s.length,u),v=hn(i);m--;){var E=s[m];i[m]=Zr(E,u)?v[E]:t}return i}function yd(i,s){if(!(s==="constructor"&&typeof i[s]=="function")&&s!="__proto__")return i[s]}var bp=Ip(qg),ts=kS||function(i,s){return Ft.setTimeout(i,s)},Cd=Ip(xI);function Sp(i,s,u){var m=s+"";return Cd(i,oA(m,mA(tA(m),u)))}function Ip(i){var s=0,u=0;return function(){var m=PS(),v=Be-(m-u);if(u=m,v>0){if(++s>=ue)return arguments[0]}else s=0;return i.apply(t,arguments)}}function kc(i,s){var u=-1,m=i.length,v=m-1;for(s=s===t?m:s;++u<s;){var E=nd(u,v),b=i[E];i[E]=i[u],i[u]=b}return i.length=s,i}var Ap=lA(function(i){var s=[];return i.charCodeAt(0)===46&&s.push(""),i.replace(rb,function(u,m,v,E){s.push(v?E.replace(db,"$1"):m||u)}),s});function Or(i){if(typeof i=="string"||In(i))return i;var s=i+"";return s=="0"&&1/i==-Mt?"-0":s}function ai(i){if(i!=null){try{return rc.call(i)}catch{}try{return i+""}catch{}}return""}function mA(i,s){return $n(Ba,function(u){var m="_."+u[0];s&u[1]&&!Xs(i,m)&&i.push(m)}),i.sort()}function kp(i){if(i instanceof Oe)return i.clone();var s=new Wn(i.__wrapped__,i.__chain__);return s.__actions__=hn(i.__actions__),s.__index__=i.__index__,s.__values__=i.__values__,s}function gA(i,s,u){(u?sn(i,s,u):s===t)?s=1:s=kt(be(s),0);var m=i==null?0:i.length;if(!m||s<1)return[];for(var v=0,E=0,b=U(uc(m/s));v<m;)b[E++]=Gn(i,v,v+=s);return b}function pA(i){for(var s=-1,u=i==null?0:i.length,m=0,v=[];++s<u;){var E=i[s];E&&(v[m++]=E)}return v}function _A(){var i=arguments.length;if(!i)return[];for(var s=U(i-1),u=arguments[0],m=i;m--;)s[m-1]=arguments[m];return To(Ee(u)?hn(u):[u],Ht(s,1))}var vA=Ie(function(i,s){return gt(i)?Ya(i,Ht(s,1,gt,!0)):[]}),yA=Ie(function(i,s){var u=qn(s);return gt(u)&&(u=t),gt(i)?Ya(i,Ht(s,1,gt,!0),de(u,2)):[]}),CA=Ie(function(i,s){var u=qn(s);return gt(u)&&(u=t),gt(i)?Ya(i,Ht(s,1,gt,!0),t,u):[]});function EA(i,s,u){var m=i==null?0:i.length;return m?(s=u||s===t?1:be(s),Gn(i,s<0?0:s,m)):[]}function wA(i,s,u){var m=i==null?0:i.length;return m?(s=u||s===t?1:be(s),s=m-s,Gn(i,0,s<0?0:s)):[]}function TA(i,s){return i&&i.length?Cc(i,de(s,3),!0,!0):[]}function bA(i,s){return i&&i.length?Cc(i,de(s,3),!0):[]}function SA(i,s,u,m){var v=i==null?0:i.length;return v?(u&&typeof u!="number"&&sn(i,s,u)&&(u=0,m=v),_I(i,s,u,m)):[]}function Np(i,s,u){var m=i==null?0:i.length;if(!m)return-1;var v=u==null?0:be(u);return v<0&&(v=kt(m+v,0)),Zs(i,de(s,3),v)}function Rp(i,s,u){var m=i==null?0:i.length;if(!m)return-1;var v=m-1;return u!==t&&(v=be(u),v=u<0?kt(m+v,0):jt(v,m-1)),Zs(i,de(s,3),v,!0)}function Op(i){var s=i==null?0:i.length;return s?Ht(i,1):[]}function IA(i){var s=i==null?0:i.length;return s?Ht(i,Mt):[]}function AA(i,s){var u=i==null?0:i.length;return u?(s=s===t?1:be(s),Ht(i,s)):[]}function kA(i){for(var s=-1,u=i==null?0:i.length,m={};++s<u;){var v=i[s];m[v[0]]=v[1]}return m}function Pp(i){return i&&i.length?i[0]:t}function NA(i,s,u){var m=i==null?0:i.length;if(!m)return-1;var v=u==null?0:be(u);return v<0&&(v=kt(m+v,0)),Pi(i,s,v)}function RA(i){var s=i==null?0:i.length;return s?Gn(i,0,-1):[]}var OA=Ie(function(i){var s=st(i,sd);return s.length&&s[0]===i[0]?Qu(s):[]}),PA=Ie(function(i){var s=qn(i),u=st(i,sd);return s===qn(u)?s=t:u.pop(),u.length&&u[0]===i[0]?Qu(u,de(s,2)):[]}),MA=Ie(function(i){var s=qn(i),u=st(i,sd);return s=typeof s=="function"?s:t,s&&u.pop(),u.length&&u[0]===i[0]?Qu(u,t,s):[]});function DA(i,s){return i==null?"":RS.call(i,s)}function qn(i){var s=i==null?0:i.length;return s?i[s-1]:t}function LA(i,s,u){var m=i==null?0:i.length;if(!m)return-1;var v=m;return u!==t&&(v=be(u),v=v<0?kt(m+v,0):jt(v,m-1)),s===s?mS(i,s,v):Zs(i,hg,v,!0)}function xA(i,s){return i&&i.length?Kg(i,be(s)):t}var UA=Ie(Mp);function Mp(i,s){return i&&i.length&&s&&s.length?td(i,s):i}function BA(i,s,u){return i&&i.length&&s&&s.length?td(i,s,de(u,2)):i}function VA(i,s,u){return i&&i.length&&s&&s.length?td(i,s,t,u):i}var FA=Xr(function(i,s){var u=i==null?0:i.length,m=qu(i,s);return Gg(i,st(s,function(v){return Zr(v,u)?+v:v}).sort(np)),m});function HA(i,s){var u=[];if(!(i&&i.length))return u;var m=-1,v=[],E=i.length;for(s=de(s,3);++m<E;){var b=i[m];s(b,m,i)&&(u.push(b),v.push(m))}return Gg(i,v),u}function Ed(i){return i==null?i:DS.call(i)}function $A(i,s,u){var m=i==null?0:i.length;return m?(u&&typeof u!="number"&&sn(i,s,u)?(s=0,u=m):(s=s==null?0:be(s),u=u===t?m:be(u)),Gn(i,s,u)):[]}function KA(i,s){return yc(i,s)}function WA(i,s,u){return od(i,s,de(u,2))}function zA(i,s){var u=i==null?0:i.length;if(u){var m=yc(i,s);if(m<u&&hr(i[m],s))return m}return-1}function GA(i,s){return yc(i,s,!0)}function qA(i,s,u){return od(i,s,de(u,2),!0)}function jA(i,s){var u=i==null?0:i.length;if(u){var m=yc(i,s,!0)-1;if(hr(i[m],s))return m}return-1}function YA(i){return i&&i.length?jg(i):[]}function JA(i,s){return i&&i.length?jg(i,de(s,2)):[]}function QA(i){var s=i==null?0:i.length;return s?Gn(i,1,s):[]}function XA(i,s,u){return i&&i.length?(s=u||s===t?1:be(s),Gn(i,0,s<0?0:s)):[]}function ZA(i,s,u){var m=i==null?0:i.length;return m?(s=u||s===t?1:be(s),s=m-s,Gn(i,s<0?0:s,m)):[]}function ek(i,s){return i&&i.length?Cc(i,de(s,3),!1,!0):[]}function tk(i,s){return i&&i.length?Cc(i,de(s,3)):[]}var nk=Ie(function(i){return Ao(Ht(i,1,gt,!0))}),rk=Ie(function(i){var s=qn(i);return gt(s)&&(s=t),Ao(Ht(i,1,gt,!0),de(s,2))}),ok=Ie(function(i){var s=qn(i);return s=typeof s=="function"?s:t,Ao(Ht(i,1,gt,!0),t,s)});function ik(i){return i&&i.length?Ao(i):[]}function ak(i,s){return i&&i.length?Ao(i,de(s,2)):[]}function sk(i,s){return s=typeof s=="function"?s:t,i&&i.length?Ao(i,t,s):[]}function wd(i){if(!(i&&i.length))return[];var s=0;return i=wo(i,function(u){if(gt(u))return s=kt(u.length,s),!0}),Vu(s,function(u){return st(i,xu(u))})}function Dp(i,s){if(!(i&&i.length))return[];var u=wd(i);return s==null?u:st(u,function(m){return Tn(s,t,m)})}var ck=Ie(function(i,s){return gt(i)?Ya(i,s):[]}),lk=Ie(function(i){return ad(wo(i,gt))}),uk=Ie(function(i){var s=qn(i);return gt(s)&&(s=t),ad(wo(i,gt),de(s,2))}),dk=Ie(function(i){var s=qn(i);return s=typeof s=="function"?s:t,ad(wo(i,gt),t,s)}),hk=Ie(wd);function fk(i,s){return Xg(i||[],s||[],ja)}function mk(i,s){return Xg(i||[],s||[],Xa)}var gk=Ie(function(i){var s=i.length,u=s>1?i[s-1]:t;return u=typeof u=="function"?(i.pop(),u):t,Dp(i,u)});function Lp(i){var s=y(i);return s.__chain__=!0,s}function pk(i,s){return s(i),i}function Nc(i,s){return s(i)}var _k=Xr(function(i){var s=i.length,u=s?i[0]:0,m=this.__wrapped__,v=function(E){return qu(E,i)};return s>1||this.__actions__.length||!(m instanceof Oe)||!Zr(u)?this.thru(v):(m=m.slice(u,+u+(s?1:0)),m.__actions__.push({func:Nc,args:[v],thisArg:t}),new Wn(m,this.__chain__).thru(function(E){return s&&!E.length&&E.push(t),E}))});function vk(){return Lp(this)}function yk(){return new Wn(this.value(),this.__chain__)}function Ck(){this.__values__===t&&(this.__values__=Yp(this.value()));var i=this.__index__>=this.__values__.length,s=i?t:this.__values__[this.__index__++];return{done:i,value:s}}function Ek(){return this}function wk(i){for(var s,u=this;u instanceof mc;){var m=kp(u);m.__index__=0,m.__values__=t,s?v.__wrapped__=m:s=m;var v=m;u=u.__wrapped__}return v.__wrapped__=i,s}function Tk(){var i=this.__wrapped__;if(i instanceof Oe){var s=i;return this.__actions__.length&&(s=new Oe(this)),s=s.reverse(),s.__actions__.push({func:Nc,args:[Ed],thisArg:t}),new Wn(s,this.__chain__)}return this.thru(Ed)}function bk(){return Qg(this.__wrapped__,this.__actions__)}var Sk=Ec(function(i,s,u){$e.call(i,u)?++i[u]:Jr(i,u,1)});function Ik(i,s,u){var m=Ee(i)?ug:pI;return u&&sn(i,s,u)&&(s=t),m(i,de(s,3))}function Ak(i,s){var u=Ee(i)?wo:Dg;return u(i,de(s,3))}var kk=cp(Np),Nk=cp(Rp);function Rk(i,s){return Ht(Rc(i,s),1)}function Ok(i,s){return Ht(Rc(i,s),Mt)}function Pk(i,s,u){return u=u===t?1:be(u),Ht(Rc(i,s),u)}function xp(i,s){var u=Ee(i)?$n:Io;return u(i,de(s,3))}function Up(i,s){var u=Ee(i)?Qb:Mg;return u(i,de(s,3))}var Mk=Ec(function(i,s,u){$e.call(i,u)?i[u].push(s):Jr(i,u,[s])});function Dk(i,s,u,m){i=fn(i)?i:Wi(i),u=u&&!m?be(u):0;var v=i.length;return u<0&&(u=kt(v+u,0)),Lc(i)?u<=v&&i.indexOf(s,u)>-1:!!v&&Pi(i,s,u)>-1}var Lk=Ie(function(i,s,u){var m=-1,v=typeof s=="function",E=fn(i)?U(i.length):[];return Io(i,function(b){E[++m]=v?Tn(s,b,u):Ja(b,s,u)}),E}),xk=Ec(function(i,s,u){Jr(i,u,s)});function Rc(i,s){var u=Ee(i)?st:Fg;return u(i,de(s,3))}function Uk(i,s,u,m){return i==null?[]:(Ee(s)||(s=s==null?[]:[s]),u=m?t:u,Ee(u)||(u=u==null?[]:[u]),Wg(i,s,u))}var Bk=Ec(function(i,s,u){i[u?0:1].push(s)},function(){return[[],[]]});function Vk(i,s,u){var m=Ee(i)?Du:mg,v=arguments.length<3;return m(i,de(s,4),u,v,Io)}function Fk(i,s,u){var m=Ee(i)?Xb:mg,v=arguments.length<3;return m(i,de(s,4),u,v,Mg)}function Hk(i,s){var u=Ee(i)?wo:Dg;return u(i,Mc(de(s,3)))}function $k(i){var s=Ee(i)?Ng:DI;return s(i)}function Kk(i,s,u){(u?sn(i,s,u):s===t)?s=1:s=be(s);var m=Ee(i)?dI:LI;return m(i,s)}function Wk(i){var s=Ee(i)?hI:UI;return s(i)}function zk(i){if(i==null)return 0;if(fn(i))return Lc(i)?Di(i):i.length;var s=Yt(i);return s==Vt||s==oe?i.size:Zu(i).length}function Gk(i,s,u){var m=Ee(i)?Lu:BI;return u&&sn(i,s,u)&&(s=t),m(i,de(s,3))}var qk=Ie(function(i,s){if(i==null)return[];var u=s.length;return u>1&&sn(i,s[0],s[1])?s=[]:u>2&&sn(s[0],s[1],s[2])&&(s=[s[0]]),Wg(i,Ht(s,1),[])}),Oc=AS||function(){return Ft.Date.now()};function jk(i,s){if(typeof s!="function")throw new Kn(l);return i=be(i),function(){if(--i<1)return s.apply(this,arguments)}}function Bp(i,s,u){return s=u?t:s,s=i&&s==null?i.length:s,Qr(i,M,t,t,t,t,s)}function Vp(i,s){var u;if(typeof s!="function")throw new Kn(l);return i=be(i),function(){return--i>0&&(u=s.apply(this,arguments)),i<=1&&(s=t),u}}var Td=Ie(function(i,s,u){var m=k;if(u.length){var v=bo(u,$i(Td));m|=K}return Qr(i,m,s,u,v)}),Fp=Ie(function(i,s,u){var m=k|S;if(u.length){var v=bo(u,$i(Fp));m|=K}return Qr(s,m,i,u,v)});function Hp(i,s,u){s=u?t:s;var m=Qr(i,D,t,t,t,t,t,s);return m.placeholder=Hp.placeholder,m}function $p(i,s,u){s=u?t:s;var m=Qr(i,L,t,t,t,t,t,s);return m.placeholder=$p.placeholder,m}function Kp(i,s,u){var m,v,E,b,I,P,W=0,z=!1,j=!1,te=!0;if(typeof i!="function")throw new Kn(l);s=jn(s)||0,ut(u)&&(z=!!u.leading,j="maxWait"in u,E=j?kt(jn(u.maxWait)||0,s):E,te="trailing"in u?!!u.trailing:te);function se(pt){var fr=m,no=v;return m=v=t,W=pt,b=i.apply(no,fr),b}function he(pt){return W=pt,I=ts(Re,s),z?se(pt):b}function Se(pt){var fr=pt-P,no=pt-W,c_=s-fr;return j?jt(c_,E-no):c_}function fe(pt){var fr=pt-P,no=pt-W;return P===t||fr>=s||fr<0||j&&no>=E}function Re(){var pt=Oc();if(fe(pt))return Pe(pt);I=ts(Re,Se(pt))}function Pe(pt){return I=t,te&&m?se(pt):(m=v=t,b)}function An(){I!==t&&Zg(I),W=0,m=P=v=I=t}function cn(){return I===t?b:Pe(Oc())}function kn(){var pt=Oc(),fr=fe(pt);if(m=arguments,v=this,P=pt,fr){if(I===t)return he(P);if(j)return Zg(I),I=ts(Re,s),se(P)}return I===t&&(I=ts(Re,s)),b}return kn.cancel=An,kn.flush=cn,kn}var Yk=Ie(function(i,s){return Pg(i,1,s)}),Jk=Ie(function(i,s,u){return Pg(i,jn(s)||0,u)});function Qk(i){return Qr(i,ae)}function Pc(i,s){if(typeof i!="function"||s!=null&&typeof s!="function")throw new Kn(l);var u=function(){var m=arguments,v=s?s.apply(this,m):m[0],E=u.cache;if(E.has(v))return E.get(v);var b=i.apply(this,m);return u.cache=E.set(v,b)||E,b};return u.cache=new(Pc.Cache||Yr),u}Pc.Cache=Yr;function Mc(i){if(typeof i!="function")throw new Kn(l);return function(){var s=arguments;switch(s.length){case 0:return!i.call(this);case 1:return!i.call(this,s[0]);case 2:return!i.call(this,s[0],s[1]);case 3:return!i.call(this,s[0],s[1],s[2])}return!i.apply(this,s)}}function Xk(i){return Vp(2,i)}var Zk=VI(function(i,s){s=s.length==1&&Ee(s[0])?st(s[0],bn(de())):st(Ht(s,1),bn(de()));var u=s.length;return Ie(function(m){for(var v=-1,E=jt(m.length,u);++v<E;)m[v]=s[v].call(this,m[v]);return Tn(i,this,m)})}),bd=Ie(function(i,s){var u=bo(s,$i(bd));return Qr(i,K,t,s,u)}),Wp=Ie(function(i,s){var u=bo(s,$i(Wp));return Qr(i,q,t,s,u)}),eN=Xr(function(i,s){return Qr(i,ce,t,t,t,s)});function tN(i,s){if(typeof i!="function")throw new Kn(l);return s=s===t?s:be(s),Ie(i,s)}function nN(i,s){if(typeof i!="function")throw new Kn(l);return s=s==null?0:kt(be(s),0),Ie(function(u){var m=u[s],v=No(u,0,s);return m&&To(v,m),Tn(i,this,v)})}function rN(i,s,u){var m=!0,v=!0;if(typeof i!="function")throw new Kn(l);return ut(u)&&(m="leading"in u?!!u.leading:m,v="trailing"in u?!!u.trailing:v),Kp(i,s,{leading:m,maxWait:s,trailing:v})}function oN(i){return Bp(i,1)}function iN(i,s){return bd(cd(s),i)}function aN(){if(!arguments.length)return[];var i=arguments[0];return Ee(i)?i:[i]}function sN(i){return zn(i,w)}function cN(i,s){return s=typeof s=="function"?s:t,zn(i,w,s)}function lN(i){return zn(i,_|w)}function uN(i,s){return s=typeof s=="function"?s:t,zn(i,_|w,s)}function dN(i,s){return s==null||Og(i,s,Dt(s))}function hr(i,s){return i===s||i!==i&&s!==s}var hN=Sc(Ju),fN=Sc(function(i,s){return i>=s}),si=Ug(function(){return arguments}())?Ug:function(i){return dt(i)&&$e.call(i,"callee")&&!Tg.call(i,"callee")},Ee=U.isArray,mN=og?bn(og):wI;function fn(i){return i!=null&&Dc(i.length)&&!eo(i)}function gt(i){return dt(i)&&fn(i)}function gN(i){return i===!0||i===!1||dt(i)&&an(i)==Ar}var Ro=NS||Ld,pN=ig?bn(ig):TI;function _N(i){return dt(i)&&i.nodeType===1&&!ns(i)}function vN(i){if(i==null)return!0;if(fn(i)&&(Ee(i)||typeof i=="string"||typeof i.splice=="function"||Ro(i)||Ki(i)||si(i)))return!i.length;var s=Yt(i);if(s==Vt||s==oe)return!i.size;if(es(i))return!Zu(i).length;for(var u in i)if($e.call(i,u))return!1;return!0}function yN(i,s){return Qa(i,s)}function CN(i,s,u){u=typeof u=="function"?u:t;var m=u?u(i,s):t;return m===t?Qa(i,s,t,u):!!m}function Sd(i){if(!dt(i))return!1;var s=an(i);return s==vo||s==Fa||typeof i.message=="string"&&typeof i.name=="string"&&!ns(i)}function EN(i){return typeof i=="number"&&Sg(i)}function eo(i){if(!ut(i))return!1;var s=an(i);return s==yo||s==Co||s==Va||s==R}function zp(i){return typeof i=="number"&&i==be(i)}function Dc(i){return typeof i=="number"&&i>-1&&i%1==0&&i<=at}function ut(i){var s=typeof i;return i!=null&&(s=="object"||s=="function")}function dt(i){return i!=null&&typeof i=="object"}var Gp=ag?bn(ag):SI;function wN(i,s){return i===s||Xu(i,s,gd(s))}function TN(i,s,u){return u=typeof u=="function"?u:t,Xu(i,s,gd(s),u)}function bN(i){return qp(i)&&i!=+i}function SN(i){if(cA(i))throw new Ce(a);return Bg(i)}function IN(i){return i===null}function AN(i){return i==null}function qp(i){return typeof i=="number"||dt(i)&&an(i)==En}function ns(i){if(!dt(i)||an(i)!=wn)return!1;var s=sc(i);if(s===null)return!0;var u=$e.call(s,"constructor")&&s.constructor;return typeof u=="function"&&u instanceof u&&rc.call(u)==TS}var Id=sg?bn(sg):II;function kN(i){return zp(i)&&i>=-at&&i<=at}var jp=cg?bn(cg):AI;function Lc(i){return typeof i=="string"||!Ee(i)&&dt(i)&&an(i)==Je}function In(i){return typeof i=="symbol"||dt(i)&&an(i)==et}var Ki=lg?bn(lg):kI;function NN(i){return i===t}function RN(i){return dt(i)&&Yt(i)==F}function ON(i){return dt(i)&&an(i)==J}var PN=Sc(ed),MN=Sc(function(i,s){return i<=s});function Yp(i){if(!i)return[];if(fn(i))return Lc(i)?ur(i):hn(i);if(Ka&&i[Ka])return dS(i[Ka]());var s=Yt(i),u=s==Vt?Hu:s==oe?ec:Wi;return u(i)}function to(i){if(!i)return i===0?i:0;if(i=jn(i),i===Mt||i===-Mt){var s=i<0?-1:1;return s*Et}return i===i?i:0}function be(i){var s=to(i),u=s%1;return s===s?u?s-u:s:0}function Jp(i){return i?ri(be(i),0,It):0}function jn(i){if(typeof i=="number")return i;if(In(i))return on;if(ut(i)){var s=typeof i.valueOf=="function"?i.valueOf():i;i=ut(s)?s+"":s}if(typeof i!="string")return i===0?i:+i;i=gg(i);var u=mb.test(i);return u||pb.test(i)?jb(i.slice(2),u?2:8):fb.test(i)?on:+i}function Qp(i){return Rr(i,mn(i))}function DN(i){return i?ri(be(i),-at,at):i===0?i:0}function He(i){return i==null?"":Sn(i)}var LN=Fi(function(i,s){if(es(s)||fn(s)){Rr(s,Dt(s),i);return}for(var u in s)$e.call(s,u)&&ja(i,u,s[u])}),Xp=Fi(function(i,s){Rr(s,mn(s),i)}),xc=Fi(function(i,s,u,m){Rr(s,mn(s),i,m)}),xN=Fi(function(i,s,u,m){Rr(s,Dt(s),i,m)}),UN=Xr(qu);function BN(i,s){var u=Vi(i);return s==null?u:Rg(u,s)}var VN=Ie(function(i,s){i=Qe(i);var u=-1,m=s.length,v=m>2?s[2]:t;for(v&&sn(s[0],s[1],v)&&(m=1);++u<m;)for(var E=s[u],b=mn(E),I=-1,P=b.length;++I<P;){var W=b[I],z=i[W];(z===t||hr(z,xi[W])&&!$e.call(i,W))&&(i[W]=E[W])}return i}),FN=Ie(function(i){return i.push(t,gp),Tn(Zp,t,i)});function HN(i,s){return dg(i,de(s,3),Nr)}function $N(i,s){return dg(i,de(s,3),Yu)}function KN(i,s){return i==null?i:ju(i,de(s,3),mn)}function WN(i,s){return i==null?i:Lg(i,de(s,3),mn)}function zN(i,s){return i&&Nr(i,de(s,3))}function GN(i,s){return i&&Yu(i,de(s,3))}function qN(i){return i==null?[]:_c(i,Dt(i))}function jN(i){return i==null?[]:_c(i,mn(i))}function Ad(i,s,u){var m=i==null?t:oi(i,s);return m===t?u:m}function YN(i,s){return i!=null&&vp(i,s,vI)}function kd(i,s){return i!=null&&vp(i,s,yI)}var JN=up(function(i,s,u){s!=null&&typeof s.toString!="function"&&(s=oc.call(s)),i[s]=u},Rd(gn)),QN=up(function(i,s,u){s!=null&&typeof s.toString!="function"&&(s=oc.call(s)),$e.call(i,s)?i[s].push(u):i[s]=[u]},de),XN=Ie(Ja);function Dt(i){return fn(i)?kg(i):Zu(i)}function mn(i){return fn(i)?kg(i,!0):NI(i)}function ZN(i,s){var u={};return s=de(s,3),Nr(i,function(m,v,E){Jr(u,s(m,v,E),m)}),u}function eR(i,s){var u={};return s=de(s,3),Nr(i,function(m,v,E){Jr(u,v,s(m,v,E))}),u}var tR=Fi(function(i,s,u){vc(i,s,u)}),Zp=Fi(function(i,s,u,m){vc(i,s,u,m)}),nR=Xr(function(i,s){var u={};if(i==null)return u;var m=!1;s=st(s,function(E){return E=ko(E,i),m||(m=E.length>1),E}),Rr(i,fd(i),u),m&&(u=zn(u,_|p|w,JI));for(var v=s.length;v--;)id(u,s[v]);return u});function rR(i,s){return e_(i,Mc(de(s)))}var oR=Xr(function(i,s){return i==null?{}:OI(i,s)});function e_(i,s){if(i==null)return{};var u=st(fd(i),function(m){return[m]});return s=de(s),zg(i,u,function(m,v){return s(m,v[0])})}function iR(i,s,u){s=ko(s,i);var m=-1,v=s.length;for(v||(v=1,i=t);++m<v;){var E=i==null?t:i[Or(s[m])];E===t&&(m=v,E=u),i=eo(E)?E.call(i):E}return i}function aR(i,s,u){return i==null?i:Xa(i,s,u)}function sR(i,s,u,m){return m=typeof m=="function"?m:t,i==null?i:Xa(i,s,u,m)}var t_=fp(Dt),n_=fp(mn);function cR(i,s,u){var m=Ee(i),v=m||Ro(i)||Ki(i);if(s=de(s,4),u==null){var E=i&&i.constructor;v?u=m?new E:[]:ut(i)?u=eo(E)?Vi(sc(i)):{}:u={}}return(v?$n:Nr)(i,function(b,I,P){return s(u,b,I,P)}),u}function lR(i,s){return i==null?!0:id(i,s)}function uR(i,s,u){return i==null?i:Jg(i,s,cd(u))}function dR(i,s,u,m){return m=typeof m=="function"?m:t,i==null?i:Jg(i,s,cd(u),m)}function Wi(i){return i==null?[]:Fu(i,Dt(i))}function hR(i){return i==null?[]:Fu(i,mn(i))}function fR(i,s,u){return u===t&&(u=s,s=t),u!==t&&(u=jn(u),u=u===u?u:0),s!==t&&(s=jn(s),s=s===s?s:0),ri(jn(i),s,u)}function mR(i,s,u){return s=to(s),u===t?(u=s,s=0):u=to(u),i=jn(i),CI(i,s,u)}function gR(i,s,u){if(u&&typeof u!="boolean"&&sn(i,s,u)&&(s=u=t),u===t&&(typeof s=="boolean"?(u=s,s=t):typeof i=="boolean"&&(u=i,i=t)),i===t&&s===t?(i=0,s=1):(i=to(i),s===t?(s=i,i=0):s=to(s)),i>s){var m=i;i=s,s=m}if(u||i%1||s%1){var v=Ig();return jt(i+v*(s-i+qb("1e-"+((v+"").length-1))),s)}return nd(i,s)}var pR=Hi(function(i,s,u){return s=s.toLowerCase(),i+(u?r_(s):s)});function r_(i){return Nd(He(i).toLowerCase())}function o_(i){return i=He(i),i&&i.replace(vb,aS).replace(Ub,"")}function _R(i,s,u){i=He(i),s=Sn(s);var m=i.length;u=u===t?m:ri(be(u),0,m);var v=u;return u-=s.length,u>=0&&i.slice(u,v)==s}function vR(i){return i=He(i),i&&XT.test(i)?i.replace(Lm,sS):i}function yR(i){return i=He(i),i&&ob.test(i)?i.replace(bu,"\\$&"):i}var CR=Hi(function(i,s,u){return i+(u?"-":"")+s.toLowerCase()}),ER=Hi(function(i,s,u){return i+(u?" ":"")+s.toLowerCase()}),wR=sp("toLowerCase");function TR(i,s,u){i=He(i),s=be(s);var m=s?Di(i):0;if(!s||m>=s)return i;var v=(s-m)/2;return bc(dc(v),u)+i+bc(uc(v),u)}function bR(i,s,u){i=He(i),s=be(s);var m=s?Di(i):0;return s&&m<s?i+bc(s-m,u):i}function SR(i,s,u){i=He(i),s=be(s);var m=s?Di(i):0;return s&&m<s?bc(s-m,u)+i:i}function IR(i,s,u){return u||s==null?s=0:s&&(s=+s),MS(He(i).replace(Su,""),s||0)}function AR(i,s,u){return(u?sn(i,s,u):s===t)?s=1:s=be(s),rd(He(i),s)}function kR(){var i=arguments,s=He(i[0]);return i.length<3?s:s.replace(i[1],i[2])}var NR=Hi(function(i,s,u){return i+(u?"_":"")+s.toLowerCase()});function RR(i,s,u){return u&&typeof u!="number"&&sn(i,s,u)&&(s=u=t),u=u===t?It:u>>>0,u?(i=He(i),i&&(typeof s=="string"||s!=null&&!Id(s))&&(s=Sn(s),!s&&Mi(i))?No(ur(i),0,u):i.split(s,u)):[]}var OR=Hi(function(i,s,u){return i+(u?" ":"")+Nd(s)});function PR(i,s,u){return i=He(i),u=u==null?0:ri(be(u),0,i.length),s=Sn(s),i.slice(u,u+s.length)==s}function MR(i,s,u){var m=y.templateSettings;u&&sn(i,s,u)&&(s=t),i=He(i),s=xc({},s,m,mp);var v=xc({},s.imports,m.imports,mp),E=Dt(v),b=Fu(v,E),I,P,W=0,z=s.interpolate||Ys,j="__p += '",te=$u((s.escape||Ys).source+"|"+z.source+"|"+(z===xm?hb:Ys).source+"|"+(s.evaluate||Ys).source+"|$","g"),se="//# sourceURL="+($e.call(s,"sourceURL")?(s.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++$b+"]")+`
|
56
|
+
`;i.replace(te,function(fe,Re,Pe,An,cn,kn){return Pe||(Pe=An),j+=i.slice(W,kn).replace(yb,cS),Re&&(I=!0,j+=`' +
|
57
57
|
__e(`+Re+`) +
|
58
58
|
'`),cn&&(P=!0,j+=`';
|
59
59
|
`+cn+`;
|
@@ -63,13 +63,13 @@ __p += '`),Pe&&(j+=`' +
|
|
63
63
|
`;var he=$e.call(s,"variable")&&s.variable;if(!he)j=`with (obj) {
|
64
64
|
`+j+`
|
65
65
|
}
|
66
|
-
`;else if(
|
66
|
+
`;else if(ub.test(he))throw new Ce(d);j=(P?j.replace(jT,""):j).replace(YT,"$1").replace(JT,"$1;"),j="function("+(he||"obj")+`) {
|
67
67
|
`+(he?"":`obj || (obj = {});
|
68
|
-
`)+"var __t, __p = ''"+(
|
68
|
+
`)+"var __t, __p = ''"+(I?", __e = _.escape":"")+(P?`, __j = Array.prototype.join;
|
69
69
|
function print() { __p += __j.call(arguments, '') }
|
70
70
|
`:`;
|
71
71
|
`)+j+`return __p
|
72
|
-
}`;var Ie=a_(function(){return Ve(E,se+"return "+j).apply(t,b)});if(Ie.source=j,Id(Ie))throw Ie;return Ie}function MR(i){return He(i).toLowerCase()}function DR(i){return He(i).toUpperCase()}function LR(i,s,u){if(i=He(i),i&&(u||s===t))return gg(i);if(!i||!(s=In(s)))return i;var m=ur(i),v=ur(s),E=pg(m,v),b=_g(m,v)+1;return ko(m,E,b).join("")}function xR(i,s,u){if(i=He(i),i&&(u||s===t))return i.slice(0,yg(i)+1);if(!i||!(s=In(s)))return i;var m=ur(i),v=_g(m,ur(s))+1;return ko(m,0,v).join("")}function UR(i,s,u){if(i=He(i),i&&(u||s===t))return i.replace(Iu,"");if(!i||!(s=In(s)))return i;var m=ur(i),v=pg(m,ur(s));return ko(m,v).join("")}function BR(i,s){var u=X,m=ee;if(ut(s)){var v="separator"in s?s.separator:v;u="length"in s?be(s.length):u,m="omission"in s?In(s.omission):m}i=He(i);var E=i.length;if(Pi(i)){var b=ur(i);E=b.length}if(u>=E)return i;var S=u-Mi(m);if(S<1)return m;var P=b?ko(b,0,S).join(""):i.slice(0,S);if(v===t)return P+m;if(b&&(S+=P.length-S),Sd(v)){if(i.slice(S).search(v)){var W,z=P;for(v.global||(v=$u(v.source,He(Um.exec(v))+"g")),v.lastIndex=0;W=v.exec(z);)var j=W.index;P=P.slice(0,j===t?S:j)}}else if(i.indexOf(In(v),S)!=S){var te=P.lastIndexOf(v);te>-1&&(P=P.slice(0,te))}return P+m}function VR(i){return i=He(i),i&&JT.test(i)?i.replace(Dm,mI):i}var FR=Fi(function(i,s,u){return i+(u?" ":"")+s.toUpperCase()}),Nd=sp("toUpperCase");function i_(i,s,u){return i=He(i),s=u?t:s,s===t?lI(i)?_I(i):eI(i):i.match(s)||[]}var a_=Se(function(i,s){try{return Tn(i,t,s)}catch(u){return Id(u)?u:new Ce(u)}}),HR=Xr(function(i,s){return $n(s,function(u){u=Or(u),Jr(i,u,Td(i[u],i))}),i});function $R(i){var s=i==null?0:i.length,u=de();return i=s?st(i,function(m){if(typeof m[1]!="function")throw new Kn(l);return[u(m[0]),m[1]]}):[],Se(function(m){for(var v=-1;++v<s;){var E=i[v];if(Tn(E[0],this,m))return Tn(E[1],this,m)}})}function KR(i){return mS(zn(i,_))}function Rd(i){return function(){return i}}function WR(i,s){return i==null||i!==i?s:i}var zR=lp(),GR=lp(!0);function gn(i){return i}function Od(i){return Vg(typeof i=="function"?i:zn(i,_))}function qR(i){return Hg(zn(i,_))}function jR(i,s){return $g(i,zn(s,_))}var YR=Se(function(i,s){return function(u){return Ja(u,i,s)}}),JR=Se(function(i,s){return function(u){return Ja(i,u,s)}});function Pd(i,s,u){var m=Dt(s),v=_c(s,m);u==null&&!(ut(s)&&(v.length||!m.length))&&(u=s,s=i,i=this,v=_c(s,Dt(s)));var E=!(ut(u)&&"chain"in u)||!!u.chain,b=eo(i);return $n(v,function(S){var P=s[S];i[S]=P,b&&(i.prototype[S]=function(){var W=this.__chain__;if(E||W){var z=i(this.__wrapped__),j=z.__actions__=hn(this.__actions__);return j.push({func:P,args:arguments,thisArg:i}),z.__chain__=W,z}return P.apply(i,wo([this.value()],arguments))})}),i}function QR(){return Ft._===this&&(Ft._=TI),this}function Md(){}function XR(i){return i=be(i),Se(function(s){return Kg(s,i)})}var ZR=ud(st),eO=ud(ug),tO=ud(Lu);function s_(i){return _d(i)?xu(Or(i)):OS(i)}function nO(i){return function(s){return i==null?t:ri(i,s)}}var rO=dp(),oO=dp(!0);function Dd(){return[]}function Ld(){return!1}function iO(){return{}}function aO(){return""}function sO(){return!0}function cO(i,s){if(i=be(i),i<1||i>at)return[];var u=St,m=jt(i,St);s=de(s),i-=St;for(var v=Vu(m,s);++u<i;)s(u);return v}function lO(i){return Ee(i)?st(i,Or):Sn(i)?[i]:hn(Ap(He(i)))}function uO(i){var s=++EI;return He(i)+s}var dO=Tc(function(i,s){return i+s},0),hO=dd("ceil"),fO=Tc(function(i,s){return i/s},1),mO=dd("floor");function gO(i){return i&&i.length?pc(i,gn,Ju):t}function pO(i,s){return i&&i.length?pc(i,de(s,2),Ju):t}function _O(i){return fg(i,gn)}function vO(i,s){return fg(i,de(s,2))}function yO(i){return i&&i.length?pc(i,gn,ed):t}function CO(i,s){return i&&i.length?pc(i,de(s,2),ed):t}var EO=Tc(function(i,s){return i*s},1),wO=dd("round"),TO=Tc(function(i,s){return i-s},0);function bO(i){return i&&i.length?Bu(i,gn):0}function IO(i,s){return i&&i.length?Bu(i,de(s,2)):0}return y.after=qk,y.ary=Bp,y.assign=DN,y.assignIn=Xp,y.assignInWith=xc,y.assignWith=LN,y.at=xN,y.before=Vp,y.bind=Td,y.bindAll=HR,y.bindKey=Fp,y.castArray=iN,y.chain=Lp,y.chunk=mA,y.compact=gA,y.concat=pA,y.cond=$R,y.conforms=KR,y.constant=Rd,y.countBy=bk,y.create=UN,y.curry=Hp,y.curryRight=$p,y.debounce=Kp,y.defaults=BN,y.defaultsDeep=VN,y.defer=jk,y.delay=Yk,y.difference=_A,y.differenceBy=vA,y.differenceWith=yA,y.drop=CA,y.dropRight=EA,y.dropRightWhile=wA,y.dropWhile=TA,y.fill=bA,y.filter=Sk,y.flatMap=Nk,y.flatMapDeep=Rk,y.flatMapDepth=Ok,y.flatten=Op,y.flattenDeep=IA,y.flattenDepth=SA,y.flip=Jk,y.flow=zR,y.flowRight=GR,y.fromPairs=AA,y.functions=GN,y.functionsIn=qN,y.groupBy=Pk,y.initial=NA,y.intersection=RA,y.intersectionBy=OA,y.intersectionWith=PA,y.invert=YN,y.invertBy=JN,y.invokeMap=Dk,y.iteratee=Od,y.keyBy=Lk,y.keys=Dt,y.keysIn=mn,y.map=Rc,y.mapKeys=XN,y.mapValues=ZN,y.matches=qR,y.matchesProperty=jR,y.memoize=Pc,y.merge=eR,y.mergeWith=Zp,y.method=YR,y.methodOf=JR,y.mixin=Pd,y.negate=Mc,y.nthArg=XR,y.omit=tR,y.omitBy=nR,y.once=Qk,y.orderBy=xk,y.over=ZR,y.overArgs=Xk,y.overEvery=eO,y.overSome=tO,y.partial=bd,y.partialRight=Wp,y.partition=Uk,y.pick=rR,y.pickBy=e_,y.property=s_,y.propertyOf=nO,y.pull=xA,y.pullAll=Mp,y.pullAllBy=UA,y.pullAllWith=BA,y.pullAt=VA,y.range=rO,y.rangeRight=oO,y.rearg=Zk,y.reject=Fk,y.remove=FA,y.rest=eN,y.reverse=Ed,y.sampleSize=$k,y.set=iR,y.setWith=aR,y.shuffle=Kk,y.slice=HA,y.sortBy=Gk,y.sortedUniq=jA,y.sortedUniqBy=YA,y.split=NR,y.spread=tN,y.tail=JA,y.take=QA,y.takeRight=XA,y.takeRightWhile=ZA,y.takeWhile=ek,y.tap=gk,y.throttle=nN,y.thru=Nc,y.toArray=Yp,y.toPairs=t_,y.toPairsIn=n_,y.toPath=lO,y.toPlainObject=Qp,y.transform=sR,y.unary=rN,y.union=tk,y.unionBy=nk,y.unionWith=rk,y.uniq=ok,y.uniqBy=ik,y.uniqWith=ak,y.unset=cR,y.unzip=wd,y.unzipWith=Dp,y.update=lR,y.updateWith=uR,y.values=Ki,y.valuesIn=dR,y.without=sk,y.words=i_,y.wrap=oN,y.xor=ck,y.xorBy=lk,y.xorWith=uk,y.zip=dk,y.zipObject=hk,y.zipObjectDeep=fk,y.zipWith=mk,y.entries=t_,y.entriesIn=n_,y.extend=Xp,y.extendWith=xc,Pd(y,y),y.add=dO,y.attempt=a_,y.camelCase=gR,y.capitalize=r_,y.ceil=hO,y.clamp=hR,y.clone=aN,y.cloneDeep=cN,y.cloneDeepWith=lN,y.cloneWith=sN,y.conformsTo=uN,y.deburr=o_,y.defaultTo=WR,y.divide=fO,y.endsWith=pR,y.eq=hr,y.escape=_R,y.escapeRegExp=vR,y.every=Ik,y.find=Ak,y.findIndex=Np,y.findKey=FN,y.findLast=kk,y.findLastIndex=Rp,y.findLastKey=HN,y.floor=mO,y.forEach=xp,y.forEachRight=Up,y.forIn=$N,y.forInRight=KN,y.forOwn=WN,y.forOwnRight=zN,y.get=Ad,y.gt=dN,y.gte=hN,y.has=jN,y.hasIn=kd,y.head=Pp,y.identity=gn,y.includes=Mk,y.indexOf=kA,y.inRange=fR,y.invoke=QN,y.isArguments=ai,y.isArray=Ee,y.isArrayBuffer=fN,y.isArrayLike=fn,y.isArrayLikeObject=gt,y.isBoolean=mN,y.isBuffer=No,y.isDate=gN,y.isElement=pN,y.isEmpty=_N,y.isEqual=vN,y.isEqualWith=yN,y.isError=Id,y.isFinite=CN,y.isFunction=eo,y.isInteger=zp,y.isLength=Dc,y.isMap=Gp,y.isMatch=EN,y.isMatchWith=wN,y.isNaN=TN,y.isNative=bN,y.isNil=SN,y.isNull=IN,y.isNumber=qp,y.isObject=ut,y.isObjectLike=dt,y.isPlainObject=ns,y.isRegExp=Sd,y.isSafeInteger=AN,y.isSet=jp,y.isString=Lc,y.isSymbol=Sn,y.isTypedArray=$i,y.isUndefined=kN,y.isWeakMap=NN,y.isWeakSet=RN,y.join=MA,y.kebabCase=yR,y.last=qn,y.lastIndexOf=DA,y.lowerCase=CR,y.lowerFirst=ER,y.lt=ON,y.lte=PN,y.max=gO,y.maxBy=pO,y.mean=_O,y.meanBy=vO,y.min=yO,y.minBy=CO,y.stubArray=Dd,y.stubFalse=Ld,y.stubObject=iO,y.stubString=aO,y.stubTrue=sO,y.multiply=EO,y.nth=LA,y.noConflict=QR,y.noop=Md,y.now=Oc,y.pad=wR,y.padEnd=TR,y.padStart=bR,y.parseInt=IR,y.random=mR,y.reduce=Bk,y.reduceRight=Vk,y.repeat=SR,y.replace=AR,y.result=oR,y.round=wO,y.runInContext=O,y.sample=Hk,y.size=Wk,y.snakeCase=kR,y.some=zk,y.sortedIndex=$A,y.sortedIndexBy=KA,y.sortedIndexOf=WA,y.sortedLastIndex=zA,y.sortedLastIndexBy=GA,y.sortedLastIndexOf=qA,y.startCase=RR,y.startsWith=OR,y.subtract=TO,y.sum=bO,y.sumBy=IO,y.template=PR,y.times=cO,y.toFinite=to,y.toInteger=be,y.toLength=Jp,y.toLower=MR,y.toNumber=jn,y.toSafeInteger=MN,y.toString=He,y.toUpper=DR,y.trim=LR,y.trimEnd=xR,y.trimStart=UR,y.truncate=BR,y.unescape=VR,y.uniqueId=uO,y.upperCase=FR,y.upperFirst=Nd,y.each=xp,y.eachRight=Up,y.first=Pp,Pd(y,function(){var i={};return Nr(y,function(s,u){$e.call(y.prototype,u)||(i[u]=s)}),i}(),{chain:!1}),y.VERSION=r,$n(["bind","bindKey","curry","curryRight","partial","partialRight"],function(i){y[i].placeholder=y}),$n(["drop","take"],function(i,s){Oe.prototype[i]=function(u){u=u===t?1:kt(be(u),0);var m=this.__filtered__&&!s?new Oe(this):this.clone();return m.__filtered__?m.__takeCount__=jt(u,m.__takeCount__):m.__views__.push({size:jt(u,St),type:i+(m.__dir__<0?"Right":"")}),m},Oe.prototype[i+"Right"]=function(u){return this.reverse()[i](u).reverse()}}),$n(["filter","map","takeWhile"],function(i,s){var u=s+1,m=u==Ct||u==qt;Oe.prototype[i]=function(v){var E=this.clone();return E.__iteratees__.push({iteratee:de(v,3),type:u}),E.__filtered__=E.__filtered__||m,E}}),$n(["head","last"],function(i,s){var u="take"+(s?"Right":"");Oe.prototype[i]=function(){return this[u](1).value()[0]}}),$n(["initial","tail"],function(i,s){var u="drop"+(s?"":"Right");Oe.prototype[i]=function(){return this.__filtered__?new Oe(this):this[u](1)}}),Oe.prototype.compact=function(){return this.filter(gn)},Oe.prototype.find=function(i){return this.filter(i).head()},Oe.prototype.findLast=function(i){return this.reverse().find(i)},Oe.prototype.invokeMap=Se(function(i,s){return typeof i=="function"?new Oe(this):this.map(function(u){return Ja(u,i,s)})}),Oe.prototype.reject=function(i){return this.filter(Mc(de(i)))},Oe.prototype.slice=function(i,s){i=be(i);var u=this;return u.__filtered__&&(i>0||s<0)?new Oe(u):(i<0?u=u.takeRight(-i):i&&(u=u.drop(i)),s!==t&&(s=be(s),u=s<0?u.dropRight(-s):u.take(s-i)),u)},Oe.prototype.takeRightWhile=function(i){return this.reverse().takeWhile(i).reverse()},Oe.prototype.toArray=function(){return this.take(St)},Nr(Oe.prototype,function(i,s){var u=/^(?:filter|find|map|reject)|While$/.test(s),m=/^(?:head|last)$/.test(s),v=y[m?"take"+(s=="last"?"Right":""):s],E=m||/^find/.test(s);v&&(y.prototype[s]=function(){var b=this.__wrapped__,S=m?[1]:arguments,P=b instanceof Oe,W=S[0],z=P||Ee(b),j=function(Re){var Pe=v.apply(y,wo([Re],S));return m&&te?Pe[0]:Pe};z&&u&&typeof W=="function"&&W.length!=1&&(P=z=!1);var te=this.__chain__,se=!!this.__actions__.length,he=E&&!te,Ie=P&&!se;if(!E&&z){b=Ie?b:new Oe(this);var fe=i.apply(b,S);return fe.__actions__.push({func:Nc,args:[j],thisArg:t}),new Wn(fe,te)}return he&&Ie?i.apply(this,S):(fe=this.thru(j),he?m?fe.value()[0]:fe.value():fe)})}),$n(["pop","push","shift","sort","splice","unshift"],function(i){var s=tc[i],u=/^(?:push|sort|unshift)$/.test(i)?"tap":"thru",m=/^(?:pop|shift)$/.test(i);y.prototype[i]=function(){var v=arguments;if(m&&!this.__chain__){var E=this.value();return s.apply(Ee(E)?E:[],v)}return this[u](function(b){return s.apply(Ee(b)?b:[],v)})}}),Nr(Oe.prototype,function(i,s){var u=y[s];if(u){var m=u.name+"";$e.call(Ui,m)||(Ui[m]=[]),Ui[m].push({name:s,func:u})}}),Ui[wc(t,I).name]=[{name:"wrapper",func:t}],Oe.prototype.clone=VI,Oe.prototype.reverse=FI,Oe.prototype.value=HI,y.prototype.at=pk,y.prototype.chain=_k,y.prototype.commit=vk,y.prototype.next=yk,y.prototype.plant=Ek,y.prototype.reverse=wk,y.prototype.toJSON=y.prototype.valueOf=y.prototype.value=Tk,y.prototype.first=y.prototype.head,Ka&&(y.prototype[Ka]=Ck),y},Di=vI();Xo?((Xo.exports=Di)._=Di,Ou._=Di):Ft._=Di}).call(gV)}(ds,ds.exports)),ds.exports}var Pa=pV();const vl=mV(Pa);function Ma(n,e,t=[]){const r=vV(e);if(!r)return n;const o=r.split(" ");return n.filter(a=>_V(a,o,t))}function _V(n,e,t){return t.some(r=>{const o=vl.get(n,r);if(vl.isNil(o))return!1;const a=vl.toString(o).toLowerCase();return e.every(l=>a.includes(l))})}function vV(n){return vl.trim(n).toLowerCase().replace(/\s+/g," ")}const yV={class:"text-faded mt-7"},CV={key:0,class:"d-flex align-baseline mb-1"},EV={class:"me-1"},wV={class:"max-w-_form-metadataJ"},TV={key:0,class:"mb-1"},bV={key:1,class:"mb-1"},IV={class:"mb-1"},au=c.defineComponent({__name:"FormMetadata",props:{meta:{},id:{}},setup(n){const{t:e}=Fn();return(t,r)=>(c.openBlock(),c.createElementBlock("div",yV,[c.createVNode(qe.VRow,{"no-gutters":"",class:"align-end ga-3",align:"center"},{default:c.withCtx(()=>[c.renderSlot(t.$slots,"default"),c.createVNode(qe.VCol,{cols:"auto",class:"pa-2"},{default:c.withCtx(()=>[t.id?(c.openBlock(),c.createElementBlock("p",CV,[c.createElementVNode("b",EV,c.toDisplayString(t.id.title)+": ",1),c.createElementVNode("span",wV,c.toDisplayString(t.id.key||"-"),1),c.createElementVNode("span",null,[c.createVNode(xs,{"content-to-copy":t.id.key,size:15},null,8,["content-to-copy"])])])):c.createCommentVNode("",!0),c.createElementVNode("p",null,[c.createElementVNode("b",null,c.toDisplayString(c.unref(e)("forms.metadata.created"))+": ",1),c.createTextVNode(c.toDisplayString(c.unref(ms)(t.meta.created_at))+" - "+c.toDisplayString(t.meta.created_by),1)])]),_:1}),c.createVNode(qe.VCol,{cols:"auto",class:"d-flex flex-column align-baseline px-2 mt-1"},{default:c.withCtx(()=>[t.meta.updated_at&&t.meta.updated_by?(c.openBlock(),c.createElementBlock("p",TV,[c.createElementVNode("b",null,c.toDisplayString(c.unref(e)("forms.metadata.updated"))+": ",1),c.createTextVNode(c.toDisplayString(c.unref(ms)(t.meta.updated_at))+" - "+c.toDisplayString(t.meta.updated_by),1)])):(c.openBlock(),c.createElementBlock("p",bV,[c.createElementVNode("b",null,c.toDisplayString(c.unref(e)("forms.metadata.modified"))+": ",1),c.createTextVNode(c.toDisplayString(c.unref(ms)(t.meta.modified_at))+" - "+c.toDisplayString(t.meta.modified_by),1)])),c.createElementVNode("p",IV,[c.createElementVNode("b",null,c.toDisplayString(c.unref(e)("forms.metadata.delegated"))+": ",1),c.createTextVNode(c.toDisplayString(t.meta.delegated_at)+" - "+c.toDisplayString(t.meta.delegated_by),1)])]),_:1})]),_:3})]))}}),SV={key:0,class:"mb-2 ms-1"},KE=c.defineComponent({__name:"JSelect",props:c.mergeModels({name:{},label:{},placeholder:{},readonly:{type:Boolean},items:{},itemTitle:{},itemValue:{},density:{},loading:{type:Boolean},clearable:{type:Boolean,default:!0},rules:{},hideDetails:{type:Boolean}},{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(n){const e=c.useModel(n,"modelValue");return(t,r)=>(c.openBlock(),c.createElementBlock(c.Fragment,null,[t.name?(c.openBlock(),c.createElementBlock("p",SV,c.toDisplayString(t.name),1)):c.createCommentVNode("",!0),t.label?(c.openBlock(),c.createBlock(Ca.VLabel,{key:1,class:"text-subtitle-1 text-high-emphasis mb-2"},{default:c.withCtx(()=>[c.createTextVNode(c.toDisplayString(t.label),1)]),_:1})):c.createCommentVNode("",!0),c.createVNode(c.unref(Fo.VSelect),{modelValue:e.value,"onUpdate:modelValue":r[0]||(r[0]=o=>e.value=o),variant:"solo-filled",items:t.items,"item-title":t.itemTitle,"item-value":t.itemValue,loading:t.loading,placeholder:t.placeholder,density:t.density,"bg-color":t.readonly?"containerBg30":"containerBg",rounded:"false",class:"j-field",style:{"min-height":"44.5px"},clearable:!t.readonly&&t.clearable,readonly:t.readonly,rules:t.rules,"hide-details":t.hideDetails},null,8,["modelValue","items","item-title","item-value","loading","placeholder","density","bg-color","clearable","readonly","rules","hide-details"])],64))}}),AV={key:0,class:"mb-2 ms-1"},kV={key:3,class:"j-field px-4 py-3 rounded-sm bg-containerBg elevation-10"},WE=c.defineComponent({__name:"JAutocomplete",props:c.mergeModels({name:{},label:{},placeholder:{},readonly:{type:Boolean},items:{},itemTitle:{},itemValue:{},density:{},loading:{type:Boolean},clearable:{type:Boolean,default:!0}},{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(n){const e=c.useModel(n,"modelValue"),t=n,r=c.computed(()=>t.readonly?"solo":"solo-filled"),o=c.computed(()=>{if(Array.isArray(t.items)&&t.items.length>0&&e!=null)if(typeof t.items[0]=="object"&&t.itemValue&&t.itemTitle){const a=t.items.find(l=>l[t.itemValue]===e);return a?a[t.itemTitle]:e}else{const a=t.items.indexOf(e);return a!==-1?t.items[a]:e}return e});return(a,l)=>(c.openBlock(),c.createElementBlock(c.Fragment,null,[t.name?(c.openBlock(),c.createElementBlock("p",AV,c.toDisplayString(t.name),1)):c.createCommentVNode("",!0),t.label?(c.openBlock(),c.createBlock(Ca.VLabel,{key:1,class:"text-subtitle-1 text-high-emphasis mb-2"},{default:c.withCtx(()=>[c.createTextVNode(c.toDisplayString(t.label),1)]),_:1})):c.createCommentVNode("",!0),t.readonly?(c.openBlock(),c.createElementBlock("div",kV,c.toDisplayString(o.value),1)):(c.openBlock(),c.createBlock(NO.VAutocomplete,{key:2,modelValue:e.value,"onUpdate:modelValue":l[0]||(l[0]=d=>e.value=d),variant:r.value,items:t.items,"item-title":t.itemTitle,"item-value":t.itemValue,loading:t.loading,placeholder:t.placeholder,density:t.density,"bg-color":"containerBg",rounded:"false","hide-details":"",class:"j-field",clearable:t.clearable,readonly:t.readonly},null,8,["modelValue","variant","items","item-title","item-value","loading","placeholder","density","clearable","readonly"]))],64))}}),NV={key:0,class:"mb-2 ms-1"},zE=c.defineComponent({__name:"JTextArea",props:c.mergeModels({name:{},label:{},readonly:{type:Boolean},rows:{},hideDetails:{type:Boolean}},{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(n){const e=c.useModel(n,"modelValue");return(t,r)=>(c.openBlock(),c.createElementBlock(c.Fragment,null,[t.name?(c.openBlock(),c.createElementBlock("p",NV,c.toDisplayString(t.name),1)):c.createCommentVNode("",!0),t.label?(c.openBlock(),c.createBlock(Ca.VLabel,{key:1,class:"text-subtitle-1 text-high-emphasis mb-2"},{default:c.withCtx(()=>[c.createTextVNode(c.toDisplayString(t.label),1)]),_:1})):c.createCommentVNode("",!0),c.createVNode(RO.VTextarea,{variant:"solo-filled","bg-color":t.readonly?"containerBg30":"containerBg",rounded:"false",rows:t.rows,hideDetails:t.hideDetails,modelValue:e.value,"onUpdate:modelValue":r[0]||(r[0]=o=>e.value=o),"no-resize":"",readonly:t.readonly,class:"j-textarea"},null,8,["bg-color","rows","hideDetails","modelValue","readonly"])],64))}}),GE=c.defineComponent({__name:"CancelButton",props:{title:{}},emits:["cancel"],setup(n,{emit:e}){const t=e,{t:r}=Fn();return(o,a)=>(c.openBlock(),c.createBlock(Ge.VBtn,{color:"secondary",variant:"outlined",onClick:a[0]||(a[0]=l=>t("cancel")),class:"me-2 j-btn-form"},{default:c.withCtx(()=>[c.createTextVNode(c.toDisplayString(o.title?c.unref(r)("actions.cancel"):c.unref(r)("actions.back")),1)]),_:1}))}}),qE=c.defineComponent({__name:"SaveButton",props:{disabled:{type:Boolean}},emits:["onSave"],setup(n,{emit:e}){const t=e,r=c.ref(!1);async function o(){r.value=!0,await t("onSave"),r.value=!1}const{t:a}=Fn();return(l,d)=>(c.openBlock(),c.createBlock(Ge.VBtn,{disabled:l.disabled,loading:r.value,color:"secondary",onClick:o,onKeydown:c.withKeys(o,["enter"]),class:"j-btn-form"},{default:c.withCtx(()=>[c.createTextVNode(c.toDisplayString(c.unref(a)("actions.save")),1)]),_:1},8,["disabled","loading"]))}}),RV={class:"mt-4"},jE=c.defineComponent({__name:"JForm",props:{title:{},metadata:{},id:{},cancelReturn:{type:Boolean}},emits:["onSave","onCancel"],setup(n,{emit:e}){const t=e;return(r,o)=>(c.openBlock(),c.createBlock(Yl,{title:r.title,class:"d-flex flex-column ma-0"},{default:c.withCtx(()=>[r.title?(c.openBlock(),c.createBlock(Ho.VDivider,{key:0})):c.createCommentVNode("",!0),c.createElementVNode("div",RV,[c.renderSlot(r.$slots,"default")]),c.createVNode(xt.VCardText,{class:"pa-0 mx-0 align-content-end"},{default:c.withCtx(()=>[c.createVNode(qe.VRow,{justify:"space-between",class:"mt-4"},{default:c.withCtx(()=>[c.createVNode(qe.VCol,{cols:"auto",class:"text-sm-subtitle-2 text-medium-emphasis"},{default:c.withCtx(()=>[c.createVNode(au,{id:r.id,meta:r.metadata},null,8,["id","meta"])]),_:1}),c.createVNode(qe.VSpacer),c.createVNode(qe.VCol,{cols:"auto",class:"align-content-end"},{default:c.withCtx(()=>[c.createVNode(GE,{"cancel-return":r.cancelReturn,onCancel:o[0]||(o[0]=a=>t("onCancel"))},null,8,["cancel-return"]),c.createVNode(qE,{onOnSave:o[1]||(o[1]=a=>t("onSave"))})]),_:1})]),_:1})]),_:1})]),_:3},8,["title"]))}}),OV={class:"d-flex align-items-center"},PV={key:0,class:"d-flex align-center"},MV={class:"ms-1"},DV={class:"d-flex"},LV={class:"d-flex mb-1 align-center"},xV={class:"min-w-100 relative"},YE=c.defineComponent({__name:"TabFormHeader",props:{id:{},readonly:{type:Boolean,default:!1}},emits:["update:isEdition","save","cancel","delete","disable"],setup(n,{emit:e}){var _;const t=n,r=e,o=c.getCurrentInstance(),a=((_=o==null?void 0:o.vnode.props)==null?void 0:_.onDisable)!==void 0,l=c.ref(t.readonly);function d(){r("cancel"),l.value=!1,r("update:isEdition",l.value)}function h(){l.value=!l.value,r("update:isEdition",l.value)}async function f(){r("delete"),r("disable")}const{t:g}=Fn();return(p,w)=>(c.openBlock(),c.createElementBlock("div",OV,[p.id?(c.openBlock(),c.createElementBlock("div",PV,[w[0]||(w[0]=c.createElementVNode("b",null,"ID:",-1)),c.createElementVNode("span",MV,c.toDisplayString(p.id),1),c.createVNode(xs,{"content-to-copy":p.id,size:20},null,8,["content-to-copy"])])):c.createCommentVNode("",!0),c.createVNode(qe.VSpacer),c.createElementVNode("div",DV,[c.createVNode(Ge.VBtn,{onClick:f,variant:"text"},{default:c.withCtx(()=>[a?(c.openBlock(),c.createBlock(c.unref(dC),{key:0,size:"11",class:"me-2"})):(c.openBlock(),c.createBlock(ya.VIcon,{key:1,class:"me-2"},{default:c.withCtx(()=>w[1]||(w[1]=[c.createTextVNode("mdi-delete-outline")])),_:1})),c.createTextVNode(" "+c.toDisplayString(a?c.unref(g)("actions.disable"):c.unref(g)("actions.delete")),1)]),_:1}),c.createElementVNode("div",LV,[c.createVNode(Ho.VDivider,{class:"mx-2 my-1",vertical:""}),c.createElementVNode("div",xV,[c.withDirectives(c.createVNode(Ge.VBtn,{onClick:h,variant:"text",color:"secondary","prepend-icon":"mdi-pencil",width:"95"},{default:c.withCtx(()=>[c.createTextVNode(c.toDisplayString(c.unref(g)("actions.edit")),1)]),_:1},512),[[c.vShow,!l.value]]),c.withDirectives(c.createVNode(Ge.VBtn,{onClick:d,variant:"text",color:"secondary",width:"95"},{default:c.withCtx(()=>[c.createVNode(ya.VIcon,{class:"pt-1 pe-2"},{default:c.withCtx(()=>w[2]||(w[2]=[c.createTextVNode("mdi-close")])),_:1}),c.createTextVNode(" "+c.toDisplayString(c.unref(g)("actions.cancel")),1)]),_:1},512),[[c.vShow,l.value]])])])])]))}}),UV={class:"d-flex align-items-center"},BV={key:0,class:"d-flex align-center"},VV={class:"ms-1"},FV={class:"d-flex"},HV={class:"d-flex mb-1 align-center"},$V={class:"min-w-100 relative"},JE=c.defineComponent({__name:"TabFormHeaderV2",props:c.mergeModels({id:{}},{modelValue:{type:Boolean},modelModifiers:{}}),emits:c.mergeModels(["save","cancel","delete","disable"],["update:modelValue"]),setup(n,{emit:e}){var g;const t=c.useModel(n,"modelValue"),r=e,o=c.getCurrentInstance(),a=((g=o==null?void 0:o.vnode.props)==null?void 0:g.onDisable)!==void 0;function l(){r("cancel"),t.value=!0}function d(){t.value=!t.value}async function h(){r("delete"),r("disable")}const{t:f}=Fn();return(_,p)=>(c.openBlock(),c.createElementBlock("div",UV,[_.id?(c.openBlock(),c.createElementBlock("div",BV,[p[0]||(p[0]=c.createElementVNode("b",null,"ID:",-1)),c.createElementVNode("span",VV,c.toDisplayString(_.id),1),c.createVNode(xs,{"content-to-copy":_.id,size:20},null,8,["content-to-copy"])])):c.createCommentVNode("",!0),c.createVNode(qe.VSpacer),c.createElementVNode("div",FV,[c.createVNode(Ge.VBtn,{onClick:h,variant:"text"},{default:c.withCtx(()=>[a?(c.openBlock(),c.createBlock(c.unref(dC),{key:0,size:"11",class:"me-2"})):(c.openBlock(),c.createBlock(ya.VIcon,{key:1,class:"me-2"},{default:c.withCtx(()=>p[1]||(p[1]=[c.createTextVNode("mdi-delete-outline")])),_:1})),c.createTextVNode(" "+c.toDisplayString(a?c.unref(f)("actions.disable"):c.unref(f)("actions.delete")),1)]),_:1}),c.createElementVNode("div",HV,[c.createVNode(Ho.VDivider,{class:"mx-2 my-1",vertical:""}),c.createElementVNode("div",$V,[c.withDirectives(c.createVNode(Ge.VBtn,{onClick:d,variant:"text",color:"secondary","prepend-icon":"mdi-pencil",width:"95"},{default:c.withCtx(()=>[c.createTextVNode(c.toDisplayString(c.unref(f)("actions.edit")),1)]),_:1},512),[[c.vShow,t.value]]),c.withDirectives(c.createVNode(Ge.VBtn,{onClick:l,variant:"text",color:"secondary",width:"95"},{default:c.withCtx(()=>[c.createVNode(ya.VIcon,{class:"pt-1 pe-2"},{default:c.withCtx(()=>p[2]||(p[2]=[c.createTextVNode("mdi-close")])),_:1}),c.createTextVNode(" "+c.toDisplayString(c.unref(f)("actions.cancel")),1)]),_:1},512),[[c.vShow,!t.value]])])])])]))}}),KV={class:"d-flex flex-column"},WV={class:"height d-flex flex-column"},zV={class:"d-flex justify-between align-end"},GV=c.defineComponent({__name:"FormHeadless",props:{id:{},metadata:{},readonly:{type:Boolean,default:!1}},emits:["save","cancel"],setup(n,{emit:e}){const t=e,r=c.getCurrentInstance(),o=c.computed(()=>{var l;return!!((l=r==null?void 0:r.vnode.props)!=null&&l.onSave)}),a=c.computed(()=>{var l;return!!((l=r==null?void 0:r.vnode.props)!=null&&l.onCancel)});return(l,d)=>(c.openBlock(),c.createBlock(Yl,null,{default:c.withCtx(()=>[c.createElementVNode("div",KV,[c.createElementVNode("div",WV,[c.renderSlot(l.$slots,"default",{},void 0,!0)])]),c.createElementVNode("div",zV,[c.createVNode(qe.VRow,{"no-gutters":"",justify:"space-between",class:"w-100"},{default:c.withCtx(()=>[c.createVNode(qe.VCol,{cols:"auto",class:"text-sm-subtitle-2 text-medium-emphasis"},{default:c.withCtx(()=>[c.createVNode(au,{id:l.id,meta:l.metadata},null,8,["id","meta"])]),_:1}),l.readonly?c.createCommentVNode("",!0):(c.openBlock(),c.createBlock(qe.VCol,{key:0,class:"d-flex align-end",cols:"auto"},{default:c.withCtx(()=>[a.value?(c.openBlock(),c.createBlock(GE,{key:0,title:"Back",onCancel:d[0]||(d[0]=h=>t("cancel"))})):c.createCommentVNode("",!0),o.value?(c.openBlock(),c.createBlock(qE,{key:1,onOnSave:d[1]||(d[1]=h=>t("save"))})):c.createCommentVNode("",!0)]),_:1}))]),_:1})])]),_:3}))}}),QE=Si(GV,[["__scopeId","data-v-e7e4d99c"]]);/**
|
72
|
+
}`;var Se=a_(function(){return Ve(E,se+"return "+j).apply(t,b)});if(Se.source=j,Sd(Se))throw Se;return Se}function DR(i){return He(i).toLowerCase()}function LR(i){return He(i).toUpperCase()}function xR(i,s,u){if(i=He(i),i&&(u||s===t))return gg(i);if(!i||!(s=Sn(s)))return i;var m=ur(i),v=ur(s),E=pg(m,v),b=_g(m,v)+1;return No(m,E,b).join("")}function UR(i,s,u){if(i=He(i),i&&(u||s===t))return i.slice(0,yg(i)+1);if(!i||!(s=Sn(s)))return i;var m=ur(i),v=_g(m,ur(s))+1;return No(m,0,v).join("")}function BR(i,s,u){if(i=He(i),i&&(u||s===t))return i.replace(Su,"");if(!i||!(s=Sn(s)))return i;var m=ur(i),v=pg(m,ur(s));return No(m,v).join("")}function VR(i,s){var u=X,m=ee;if(ut(s)){var v="separator"in s?s.separator:v;u="length"in s?be(s.length):u,m="omission"in s?Sn(s.omission):m}i=He(i);var E=i.length;if(Mi(i)){var b=ur(i);E=b.length}if(u>=E)return i;var I=u-Di(m);if(I<1)return m;var P=b?No(b,0,I).join(""):i.slice(0,I);if(v===t)return P+m;if(b&&(I+=P.length-I),Id(v)){if(i.slice(I).search(v)){var W,z=P;for(v.global||(v=$u(v.source,He(Um.exec(v))+"g")),v.lastIndex=0;W=v.exec(z);)var j=W.index;P=P.slice(0,j===t?I:j)}}else if(i.indexOf(Sn(v),I)!=I){var te=P.lastIndexOf(v);te>-1&&(P=P.slice(0,te))}return P+m}function FR(i){return i=He(i),i&&QT.test(i)?i.replace(Dm,gS):i}var HR=Hi(function(i,s,u){return i+(u?" ":"")+s.toUpperCase()}),Nd=sp("toUpperCase");function i_(i,s,u){return i=He(i),s=u?t:s,s===t?uS(i)?vS(i):tS(i):i.match(s)||[]}var a_=Ie(function(i,s){try{return Tn(i,t,s)}catch(u){return Sd(u)?u:new Ce(u)}}),$R=Xr(function(i,s){return $n(s,function(u){u=Or(u),Jr(i,u,Td(i[u],i))}),i});function KR(i){var s=i==null?0:i.length,u=de();return i=s?st(i,function(m){if(typeof m[1]!="function")throw new Kn(l);return[u(m[0]),m[1]]}):[],Ie(function(m){for(var v=-1;++v<s;){var E=i[v];if(Tn(E[0],this,m))return Tn(E[1],this,m)}})}function WR(i){return gI(zn(i,_))}function Rd(i){return function(){return i}}function zR(i,s){return i==null||i!==i?s:i}var GR=lp(),qR=lp(!0);function gn(i){return i}function Od(i){return Vg(typeof i=="function"?i:zn(i,_))}function jR(i){return Hg(zn(i,_))}function YR(i,s){return $g(i,zn(s,_))}var JR=Ie(function(i,s){return function(u){return Ja(u,i,s)}}),QR=Ie(function(i,s){return function(u){return Ja(i,u,s)}});function Pd(i,s,u){var m=Dt(s),v=_c(s,m);u==null&&!(ut(s)&&(v.length||!m.length))&&(u=s,s=i,i=this,v=_c(s,Dt(s)));var E=!(ut(u)&&"chain"in u)||!!u.chain,b=eo(i);return $n(v,function(I){var P=s[I];i[I]=P,b&&(i.prototype[I]=function(){var W=this.__chain__;if(E||W){var z=i(this.__wrapped__),j=z.__actions__=hn(this.__actions__);return j.push({func:P,args:arguments,thisArg:i}),z.__chain__=W,z}return P.apply(i,To([this.value()],arguments))})}),i}function XR(){return Ft._===this&&(Ft._=bS),this}function Md(){}function ZR(i){return i=be(i),Ie(function(s){return Kg(s,i)})}var eO=ud(st),tO=ud(ug),nO=ud(Lu);function s_(i){return _d(i)?xu(Or(i)):PI(i)}function rO(i){return function(s){return i==null?t:oi(i,s)}}var oO=dp(),iO=dp(!0);function Dd(){return[]}function Ld(){return!1}function aO(){return{}}function sO(){return""}function cO(){return!0}function lO(i,s){if(i=be(i),i<1||i>at)return[];var u=It,m=jt(i,It);s=de(s),i-=It;for(var v=Vu(m,s);++u<i;)s(u);return v}function uO(i){return Ee(i)?st(i,Or):In(i)?[i]:hn(Ap(He(i)))}function dO(i){var s=++wS;return He(i)+s}var hO=Tc(function(i,s){return i+s},0),fO=dd("ceil"),mO=Tc(function(i,s){return i/s},1),gO=dd("floor");function pO(i){return i&&i.length?pc(i,gn,Ju):t}function _O(i,s){return i&&i.length?pc(i,de(s,2),Ju):t}function vO(i){return fg(i,gn)}function yO(i,s){return fg(i,de(s,2))}function CO(i){return i&&i.length?pc(i,gn,ed):t}function EO(i,s){return i&&i.length?pc(i,de(s,2),ed):t}var wO=Tc(function(i,s){return i*s},1),TO=dd("round"),bO=Tc(function(i,s){return i-s},0);function SO(i){return i&&i.length?Bu(i,gn):0}function IO(i,s){return i&&i.length?Bu(i,de(s,2)):0}return y.after=jk,y.ary=Bp,y.assign=LN,y.assignIn=Xp,y.assignInWith=xc,y.assignWith=xN,y.at=UN,y.before=Vp,y.bind=Td,y.bindAll=$R,y.bindKey=Fp,y.castArray=aN,y.chain=Lp,y.chunk=gA,y.compact=pA,y.concat=_A,y.cond=KR,y.conforms=WR,y.constant=Rd,y.countBy=Sk,y.create=BN,y.curry=Hp,y.curryRight=$p,y.debounce=Kp,y.defaults=VN,y.defaultsDeep=FN,y.defer=Yk,y.delay=Jk,y.difference=vA,y.differenceBy=yA,y.differenceWith=CA,y.drop=EA,y.dropRight=wA,y.dropRightWhile=TA,y.dropWhile=bA,y.fill=SA,y.filter=Ak,y.flatMap=Rk,y.flatMapDeep=Ok,y.flatMapDepth=Pk,y.flatten=Op,y.flattenDeep=IA,y.flattenDepth=AA,y.flip=Qk,y.flow=GR,y.flowRight=qR,y.fromPairs=kA,y.functions=qN,y.functionsIn=jN,y.groupBy=Mk,y.initial=RA,y.intersection=OA,y.intersectionBy=PA,y.intersectionWith=MA,y.invert=JN,y.invertBy=QN,y.invokeMap=Lk,y.iteratee=Od,y.keyBy=xk,y.keys=Dt,y.keysIn=mn,y.map=Rc,y.mapKeys=ZN,y.mapValues=eR,y.matches=jR,y.matchesProperty=YR,y.memoize=Pc,y.merge=tR,y.mergeWith=Zp,y.method=JR,y.methodOf=QR,y.mixin=Pd,y.negate=Mc,y.nthArg=ZR,y.omit=nR,y.omitBy=rR,y.once=Xk,y.orderBy=Uk,y.over=eO,y.overArgs=Zk,y.overEvery=tO,y.overSome=nO,y.partial=bd,y.partialRight=Wp,y.partition=Bk,y.pick=oR,y.pickBy=e_,y.property=s_,y.propertyOf=rO,y.pull=UA,y.pullAll=Mp,y.pullAllBy=BA,y.pullAllWith=VA,y.pullAt=FA,y.range=oO,y.rangeRight=iO,y.rearg=eN,y.reject=Hk,y.remove=HA,y.rest=tN,y.reverse=Ed,y.sampleSize=Kk,y.set=aR,y.setWith=sR,y.shuffle=Wk,y.slice=$A,y.sortBy=qk,y.sortedUniq=YA,y.sortedUniqBy=JA,y.split=RR,y.spread=nN,y.tail=QA,y.take=XA,y.takeRight=ZA,y.takeRightWhile=ek,y.takeWhile=tk,y.tap=pk,y.throttle=rN,y.thru=Nc,y.toArray=Yp,y.toPairs=t_,y.toPairsIn=n_,y.toPath=uO,y.toPlainObject=Qp,y.transform=cR,y.unary=oN,y.union=nk,y.unionBy=rk,y.unionWith=ok,y.uniq=ik,y.uniqBy=ak,y.uniqWith=sk,y.unset=lR,y.unzip=wd,y.unzipWith=Dp,y.update=uR,y.updateWith=dR,y.values=Wi,y.valuesIn=hR,y.without=ck,y.words=i_,y.wrap=iN,y.xor=lk,y.xorBy=uk,y.xorWith=dk,y.zip=hk,y.zipObject=fk,y.zipObjectDeep=mk,y.zipWith=gk,y.entries=t_,y.entriesIn=n_,y.extend=Xp,y.extendWith=xc,Pd(y,y),y.add=hO,y.attempt=a_,y.camelCase=pR,y.capitalize=r_,y.ceil=fO,y.clamp=fR,y.clone=sN,y.cloneDeep=lN,y.cloneDeepWith=uN,y.cloneWith=cN,y.conformsTo=dN,y.deburr=o_,y.defaultTo=zR,y.divide=mO,y.endsWith=_R,y.eq=hr,y.escape=vR,y.escapeRegExp=yR,y.every=Ik,y.find=kk,y.findIndex=Np,y.findKey=HN,y.findLast=Nk,y.findLastIndex=Rp,y.findLastKey=$N,y.floor=gO,y.forEach=xp,y.forEachRight=Up,y.forIn=KN,y.forInRight=WN,y.forOwn=zN,y.forOwnRight=GN,y.get=Ad,y.gt=hN,y.gte=fN,y.has=YN,y.hasIn=kd,y.head=Pp,y.identity=gn,y.includes=Dk,y.indexOf=NA,y.inRange=mR,y.invoke=XN,y.isArguments=si,y.isArray=Ee,y.isArrayBuffer=mN,y.isArrayLike=fn,y.isArrayLikeObject=gt,y.isBoolean=gN,y.isBuffer=Ro,y.isDate=pN,y.isElement=_N,y.isEmpty=vN,y.isEqual=yN,y.isEqualWith=CN,y.isError=Sd,y.isFinite=EN,y.isFunction=eo,y.isInteger=zp,y.isLength=Dc,y.isMap=Gp,y.isMatch=wN,y.isMatchWith=TN,y.isNaN=bN,y.isNative=SN,y.isNil=AN,y.isNull=IN,y.isNumber=qp,y.isObject=ut,y.isObjectLike=dt,y.isPlainObject=ns,y.isRegExp=Id,y.isSafeInteger=kN,y.isSet=jp,y.isString=Lc,y.isSymbol=In,y.isTypedArray=Ki,y.isUndefined=NN,y.isWeakMap=RN,y.isWeakSet=ON,y.join=DA,y.kebabCase=CR,y.last=qn,y.lastIndexOf=LA,y.lowerCase=ER,y.lowerFirst=wR,y.lt=PN,y.lte=MN,y.max=pO,y.maxBy=_O,y.mean=vO,y.meanBy=yO,y.min=CO,y.minBy=EO,y.stubArray=Dd,y.stubFalse=Ld,y.stubObject=aO,y.stubString=sO,y.stubTrue=cO,y.multiply=wO,y.nth=xA,y.noConflict=XR,y.noop=Md,y.now=Oc,y.pad=TR,y.padEnd=bR,y.padStart=SR,y.parseInt=IR,y.random=gR,y.reduce=Vk,y.reduceRight=Fk,y.repeat=AR,y.replace=kR,y.result=iR,y.round=TO,y.runInContext=O,y.sample=$k,y.size=zk,y.snakeCase=NR,y.some=Gk,y.sortedIndex=KA,y.sortedIndexBy=WA,y.sortedIndexOf=zA,y.sortedLastIndex=GA,y.sortedLastIndexBy=qA,y.sortedLastIndexOf=jA,y.startCase=OR,y.startsWith=PR,y.subtract=bO,y.sum=SO,y.sumBy=IO,y.template=MR,y.times=lO,y.toFinite=to,y.toInteger=be,y.toLength=Jp,y.toLower=DR,y.toNumber=jn,y.toSafeInteger=DN,y.toString=He,y.toUpper=LR,y.trim=xR,y.trimEnd=UR,y.trimStart=BR,y.truncate=VR,y.unescape=FR,y.uniqueId=dO,y.upperCase=HR,y.upperFirst=Nd,y.each=xp,y.eachRight=Up,y.first=Pp,Pd(y,function(){var i={};return Nr(y,function(s,u){$e.call(y.prototype,u)||(i[u]=s)}),i}(),{chain:!1}),y.VERSION=r,$n(["bind","bindKey","curry","curryRight","partial","partialRight"],function(i){y[i].placeholder=y}),$n(["drop","take"],function(i,s){Oe.prototype[i]=function(u){u=u===t?1:kt(be(u),0);var m=this.__filtered__&&!s?new Oe(this):this.clone();return m.__filtered__?m.__takeCount__=jt(u,m.__takeCount__):m.__views__.push({size:jt(u,It),type:i+(m.__dir__<0?"Right":"")}),m},Oe.prototype[i+"Right"]=function(u){return this.reverse()[i](u).reverse()}}),$n(["filter","map","takeWhile"],function(i,s){var u=s+1,m=u==Ct||u==qt;Oe.prototype[i]=function(v){var E=this.clone();return E.__iteratees__.push({iteratee:de(v,3),type:u}),E.__filtered__=E.__filtered__||m,E}}),$n(["head","last"],function(i,s){var u="take"+(s?"Right":"");Oe.prototype[i]=function(){return this[u](1).value()[0]}}),$n(["initial","tail"],function(i,s){var u="drop"+(s?"":"Right");Oe.prototype[i]=function(){return this.__filtered__?new Oe(this):this[u](1)}}),Oe.prototype.compact=function(){return this.filter(gn)},Oe.prototype.find=function(i){return this.filter(i).head()},Oe.prototype.findLast=function(i){return this.reverse().find(i)},Oe.prototype.invokeMap=Ie(function(i,s){return typeof i=="function"?new Oe(this):this.map(function(u){return Ja(u,i,s)})}),Oe.prototype.reject=function(i){return this.filter(Mc(de(i)))},Oe.prototype.slice=function(i,s){i=be(i);var u=this;return u.__filtered__&&(i>0||s<0)?new Oe(u):(i<0?u=u.takeRight(-i):i&&(u=u.drop(i)),s!==t&&(s=be(s),u=s<0?u.dropRight(-s):u.take(s-i)),u)},Oe.prototype.takeRightWhile=function(i){return this.reverse().takeWhile(i).reverse()},Oe.prototype.toArray=function(){return this.take(It)},Nr(Oe.prototype,function(i,s){var u=/^(?:filter|find|map|reject)|While$/.test(s),m=/^(?:head|last)$/.test(s),v=y[m?"take"+(s=="last"?"Right":""):s],E=m||/^find/.test(s);v&&(y.prototype[s]=function(){var b=this.__wrapped__,I=m?[1]:arguments,P=b instanceof Oe,W=I[0],z=P||Ee(b),j=function(Re){var Pe=v.apply(y,To([Re],I));return m&&te?Pe[0]:Pe};z&&u&&typeof W=="function"&&W.length!=1&&(P=z=!1);var te=this.__chain__,se=!!this.__actions__.length,he=E&&!te,Se=P&&!se;if(!E&&z){b=Se?b:new Oe(this);var fe=i.apply(b,I);return fe.__actions__.push({func:Nc,args:[j],thisArg:t}),new Wn(fe,te)}return he&&Se?i.apply(this,I):(fe=this.thru(j),he?m?fe.value()[0]:fe.value():fe)})}),$n(["pop","push","shift","sort","splice","unshift"],function(i){var s=tc[i],u=/^(?:push|sort|unshift)$/.test(i)?"tap":"thru",m=/^(?:pop|shift)$/.test(i);y.prototype[i]=function(){var v=arguments;if(m&&!this.__chain__){var E=this.value();return s.apply(Ee(E)?E:[],v)}return this[u](function(b){return s.apply(Ee(b)?b:[],v)})}}),Nr(Oe.prototype,function(i,s){var u=y[s];if(u){var m=u.name+"";$e.call(Bi,m)||(Bi[m]=[]),Bi[m].push({name:s,func:u})}}),Bi[wc(t,S).name]=[{name:"wrapper",func:t}],Oe.prototype.clone=FS,Oe.prototype.reverse=HS,Oe.prototype.value=$S,y.prototype.at=_k,y.prototype.chain=vk,y.prototype.commit=yk,y.prototype.next=Ck,y.prototype.plant=wk,y.prototype.reverse=Tk,y.prototype.toJSON=y.prototype.valueOf=y.prototype.value=bk,y.prototype.first=y.prototype.head,Ka&&(y.prototype[Ka]=Ek),y},Li=yS();Zo?((Zo.exports=Li)._=Li,Ou._=Li):Ft._=Li}).call(pV)}(ds,ds.exports)),ds.exports}var Pa=_V();const vl=gV(Pa);function Ma(n,e,t=[]){const r=yV(e);if(!r)return n;const o=r.split(" ");return n.filter(a=>vV(a,o,t))}function vV(n,e,t){return t.some(r=>{const o=vl.get(n,r);if(vl.isNil(o))return!1;const a=vl.toString(o).toLowerCase();return e.every(l=>a.includes(l))})}function yV(n){return vl.trim(n).toLowerCase().replace(/\s+/g," ")}const CV={class:"text-faded mt-7"},EV={key:0,class:"d-flex align-baseline mb-1"},wV={class:"me-1"},TV={class:"max-w-_form-metadataJ"},bV={key:0,class:"mb-1"},SV={key:1,class:"mb-1"},IV={class:"mb-1"},au=c.defineComponent({__name:"FormMetadata",props:{meta:{},id:{}},setup(n){const{t:e}=Fn();return(t,r)=>(c.openBlock(),c.createElementBlock("div",CV,[c.createVNode(qe.VRow,{"no-gutters":"",class:"align-end ga-3",align:"center"},{default:c.withCtx(()=>[c.renderSlot(t.$slots,"default"),c.createVNode(qe.VCol,{cols:"auto",class:"pa-2"},{default:c.withCtx(()=>[t.id?(c.openBlock(),c.createElementBlock("p",EV,[c.createElementVNode("b",wV,c.toDisplayString(t.id.title)+": ",1),c.createElementVNode("span",TV,c.toDisplayString(t.id.key||"-"),1),c.createElementVNode("span",null,[c.createVNode(xs,{"content-to-copy":t.id.key,size:15},null,8,["content-to-copy"])])])):c.createCommentVNode("",!0),c.createElementVNode("p",null,[c.createElementVNode("b",null,c.toDisplayString(c.unref(e)("forms.metadata.created"))+": ",1),c.createTextVNode(c.toDisplayString(c.unref(ms)(t.meta.created_at))+" - "+c.toDisplayString(t.meta.created_by),1)])]),_:1}),c.createVNode(qe.VCol,{cols:"auto",class:"d-flex flex-column align-baseline px-2 mt-1"},{default:c.withCtx(()=>[t.meta.updated_at&&t.meta.updated_by?(c.openBlock(),c.createElementBlock("p",bV,[c.createElementVNode("b",null,c.toDisplayString(c.unref(e)("forms.metadata.updated"))+": ",1),c.createTextVNode(c.toDisplayString(c.unref(ms)(t.meta.updated_at))+" - "+c.toDisplayString(t.meta.updated_by),1)])):(c.openBlock(),c.createElementBlock("p",SV,[c.createElementVNode("b",null,c.toDisplayString(c.unref(e)("forms.metadata.modified"))+": ",1),c.createTextVNode(c.toDisplayString(c.unref(ms)(t.meta.modified_at))+" - "+c.toDisplayString(t.meta.modified_by),1)])),c.createElementVNode("p",IV,[c.createElementVNode("b",null,c.toDisplayString(c.unref(e)("forms.metadata.delegated"))+": ",1),c.createTextVNode(c.toDisplayString(t.meta.delegated_at)+" - "+c.toDisplayString(t.meta.delegated_by),1)])]),_:1})]),_:3})]))}}),AV={key:0,class:"mb-2 ms-1"},KE=c.defineComponent({__name:"JSelect",props:c.mergeModels({name:{},label:{},placeholder:{},readonly:{type:Boolean},items:{},itemTitle:{},itemValue:{},density:{},loading:{type:Boolean},clearable:{type:Boolean,default:!0},rules:{},hideDetails:{type:Boolean}},{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(n){const e=c.useModel(n,"modelValue");return(t,r)=>(c.openBlock(),c.createElementBlock(c.Fragment,null,[t.name?(c.openBlock(),c.createElementBlock("p",AV,c.toDisplayString(t.name),1)):c.createCommentVNode("",!0),t.label?(c.openBlock(),c.createBlock(yi.VLabel,{key:1,class:"text-subtitle-1 text-high-emphasis mb-2"},{default:c.withCtx(()=>[c.createTextVNode(c.toDisplayString(t.label),1)]),_:1})):c.createCommentVNode("",!0),c.createVNode(c.unref(uo.VSelect),{modelValue:e.value,"onUpdate:modelValue":r[0]||(r[0]=o=>e.value=o),variant:"solo-filled",items:t.items,"item-title":t.itemTitle,"item-value":t.itemValue,loading:t.loading,placeholder:t.placeholder,density:t.density,"bg-color":t.readonly?"containerBg30":"containerBg",rounded:"false",class:"j-field",style:{"min-height":"44.5px"},clearable:!t.readonly&&t.clearable,readonly:t.readonly,rules:t.rules,"hide-details":t.hideDetails},null,8,["modelValue","items","item-title","item-value","loading","placeholder","density","bg-color","clearable","readonly","rules","hide-details"])],64))}}),kV={key:0,class:"mb-2 ms-1"},NV=c.defineComponent({__name:"JNumberField",props:c.mergeModels({name:{},label:{},readonly:{type:Boolean},density:{},rules:{},hideDetails:{type:Boolean},min:{},max:{}},{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(n){const e=c.useModel(n,"modelValue"),t=n,r=o=>{t.min===0&&(o.key==="-"||o.key==="Subtract")&&o.preventDefault()};return(o,a)=>(c.openBlock(),c.createElementBlock("div",null,[o.name?(c.openBlock(),c.createElementBlock("p",kV,c.toDisplayString(o.name),1)):c.createCommentVNode("",!0),o.label?(c.openBlock(),c.createBlock(yi.VLabel,{key:1,class:"text-subtitle-1 text-high-emphasis mb-2"},{default:c.withCtx(()=>[c.createTextVNode(c.toDisplayString(o.label),1)]),_:1})):c.createCommentVNode("",!0),c.createVNode(c.unref(uo.VTextField),{variant:"solo-filled","bg-color":o.readonly?"containerBg30":"containerBg",color:"secondary",rounded:"sm",type:"number",density:o.density,rules:o.rules,modelValue:e.value,"onUpdate:modelValue":a[0]||(a[0]=l=>e.value=l),class:"j-field",readonly:o.readonly,"hide-details":o.hideDetails,min:o.min,max:o.max,onKeydown:r},null,8,["bg-color","density","rules","modelValue","readonly","hide-details","min","max"])]))}}),WE=Yo(NV,[["__scopeId","data-v-d1af7bd1"]]),RV={key:0,class:"mb-2 ms-1"},OV={key:3,class:"j-field px-4 py-3 rounded-sm bg-containerBg elevation-10"},zE=c.defineComponent({__name:"JAutocomplete",props:c.mergeModels({name:{},label:{},placeholder:{},readonly:{type:Boolean},items:{},itemTitle:{},itemValue:{},density:{},loading:{type:Boolean},clearable:{type:Boolean,default:!0}},{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(n){const e=c.useModel(n,"modelValue"),t=n,r=c.computed(()=>t.readonly?"solo":"solo-filled"),o=c.computed(()=>{if(Array.isArray(t.items)&&t.items.length>0&&e!=null)if(typeof t.items[0]=="object"&&t.itemValue&&t.itemTitle){const a=t.items.find(l=>l[t.itemValue]===e);return a?a[t.itemTitle]:e}else{const a=t.items.indexOf(e);return a!==-1?t.items[a]:e}return e});return(a,l)=>(c.openBlock(),c.createElementBlock(c.Fragment,null,[t.name?(c.openBlock(),c.createElementBlock("p",RV,c.toDisplayString(t.name),1)):c.createCommentVNode("",!0),t.label?(c.openBlock(),c.createBlock(yi.VLabel,{key:1,class:"text-subtitle-1 text-high-emphasis mb-2"},{default:c.withCtx(()=>[c.createTextVNode(c.toDisplayString(t.label),1)]),_:1})):c.createCommentVNode("",!0),t.readonly?(c.openBlock(),c.createElementBlock("div",OV,c.toDisplayString(o.value),1)):(c.openBlock(),c.createBlock(RO.VAutocomplete,{key:2,modelValue:e.value,"onUpdate:modelValue":l[0]||(l[0]=d=>e.value=d),variant:r.value,items:t.items,"item-title":t.itemTitle,"item-value":t.itemValue,loading:t.loading,placeholder:t.placeholder,density:t.density,"bg-color":"containerBg",rounded:"false","hide-details":"",class:"j-field",clearable:t.clearable,readonly:t.readonly},null,8,["modelValue","variant","items","item-title","item-value","loading","placeholder","density","clearable","readonly"]))],64))}}),PV={key:0,class:"mb-2 ms-1"},GE=c.defineComponent({__name:"JTextArea",props:c.mergeModels({name:{},label:{},readonly:{type:Boolean},rows:{},hideDetails:{type:Boolean}},{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(n){const e=c.useModel(n,"modelValue");return(t,r)=>(c.openBlock(),c.createElementBlock(c.Fragment,null,[t.name?(c.openBlock(),c.createElementBlock("p",PV,c.toDisplayString(t.name),1)):c.createCommentVNode("",!0),t.label?(c.openBlock(),c.createBlock(yi.VLabel,{key:1,class:"text-subtitle-1 text-high-emphasis mb-2"},{default:c.withCtx(()=>[c.createTextVNode(c.toDisplayString(t.label),1)]),_:1})):c.createCommentVNode("",!0),c.createVNode(OO.VTextarea,{variant:"solo-filled","bg-color":t.readonly?"containerBg30":"containerBg",rounded:"false",rows:t.rows,hideDetails:t.hideDetails,modelValue:e.value,"onUpdate:modelValue":r[0]||(r[0]=o=>e.value=o),"no-resize":"",readonly:t.readonly,class:"j-textarea"},null,8,["bg-color","rows","hideDetails","modelValue","readonly"])],64))}}),qE=c.defineComponent({__name:"CancelButton",props:{title:{}},emits:["cancel"],setup(n,{emit:e}){const t=e,{t:r}=Fn();return(o,a)=>(c.openBlock(),c.createBlock(Ge.VBtn,{color:"secondary",variant:"outlined",onClick:a[0]||(a[0]=l=>t("cancel")),class:"me-2 j-btn-form"},{default:c.withCtx(()=>[c.createTextVNode(c.toDisplayString(o.title?c.unref(r)("actions.cancel"):c.unref(r)("actions.back")),1)]),_:1}))}}),jE=c.defineComponent({__name:"SaveButton",props:{disabled:{type:Boolean}},emits:["onSave"],setup(n,{emit:e}){const t=e,r=c.ref(!1);async function o(){r.value=!0,await t("onSave"),r.value=!1}const{t:a}=Fn();return(l,d)=>(c.openBlock(),c.createBlock(Ge.VBtn,{disabled:l.disabled,loading:r.value,color:"secondary",onClick:o,onKeydown:c.withKeys(o,["enter"]),class:"j-btn-form"},{default:c.withCtx(()=>[c.createTextVNode(c.toDisplayString(c.unref(a)("actions.save")),1)]),_:1},8,["disabled","loading"]))}}),MV={class:"mt-4"},YE=c.defineComponent({__name:"JForm",props:{title:{},metadata:{},id:{},cancelReturn:{type:Boolean}},emits:["onSave","onCancel"],setup(n,{emit:e}){const t=e;return(r,o)=>(c.openBlock(),c.createBlock(Yl,{title:r.title,class:"d-flex flex-column ma-0"},{default:c.withCtx(()=>[r.title?(c.openBlock(),c.createBlock(Ho.VDivider,{key:0})):c.createCommentVNode("",!0),c.createElementVNode("div",MV,[c.renderSlot(r.$slots,"default")]),c.createVNode(xt.VCardText,{class:"pa-0 mx-0 align-content-end"},{default:c.withCtx(()=>[c.createVNode(qe.VRow,{justify:"space-between",class:"mt-4"},{default:c.withCtx(()=>[c.createVNode(qe.VCol,{cols:"auto",class:"text-sm-subtitle-2 text-medium-emphasis"},{default:c.withCtx(()=>[c.createVNode(au,{id:r.id,meta:r.metadata},null,8,["id","meta"])]),_:1}),c.createVNode(qe.VSpacer),c.createVNode(qe.VCol,{cols:"auto",class:"align-content-end"},{default:c.withCtx(()=>[c.createVNode(qE,{"cancel-return":r.cancelReturn,onCancel:o[0]||(o[0]=a=>t("onCancel"))},null,8,["cancel-return"]),c.createVNode(jE,{onOnSave:o[1]||(o[1]=a=>t("onSave"))})]),_:1})]),_:1})]),_:1})]),_:3},8,["title"]))}}),DV={class:"d-flex align-items-center"},LV={key:0,class:"d-flex align-center"},xV={class:"ms-1"},UV={class:"d-flex"},BV={class:"d-flex mb-1 align-center"},VV={class:"min-w-100 relative"},JE=c.defineComponent({__name:"TabFormHeader",props:{id:{},readonly:{type:Boolean,default:!1}},emits:["update:isEdition","save","cancel","delete","disable"],setup(n,{emit:e}){var _;const t=n,r=e,o=c.getCurrentInstance(),a=((_=o==null?void 0:o.vnode.props)==null?void 0:_.onDisable)!==void 0,l=c.ref(t.readonly);function d(){r("cancel"),l.value=!1,r("update:isEdition",l.value)}function h(){l.value=!l.value,r("update:isEdition",l.value)}async function f(){r("delete"),r("disable")}const{t:g}=Fn();return(p,w)=>(c.openBlock(),c.createElementBlock("div",DV,[p.id?(c.openBlock(),c.createElementBlock("div",LV,[w[0]||(w[0]=c.createElementVNode("b",null,"ID:",-1)),c.createElementVNode("span",xV,c.toDisplayString(p.id),1),c.createVNode(xs,{"content-to-copy":p.id,size:20},null,8,["content-to-copy"])])):c.createCommentVNode("",!0),c.createVNode(qe.VSpacer),c.createElementVNode("div",UV,[c.createVNode(Ge.VBtn,{onClick:f,variant:"text"},{default:c.withCtx(()=>[a?(c.openBlock(),c.createBlock(c.unref(dC),{key:0,size:"11",class:"me-2"})):(c.openBlock(),c.createBlock(Ca.VIcon,{key:1,class:"me-2"},{default:c.withCtx(()=>w[1]||(w[1]=[c.createTextVNode("mdi-delete-outline")])),_:1})),c.createTextVNode(" "+c.toDisplayString(a?c.unref(g)("actions.disable"):c.unref(g)("actions.delete")),1)]),_:1}),c.createElementVNode("div",BV,[c.createVNode(Ho.VDivider,{class:"mx-2 my-1",vertical:""}),c.createElementVNode("div",VV,[c.withDirectives(c.createVNode(Ge.VBtn,{onClick:h,variant:"text",color:"secondary","prepend-icon":"mdi-pencil",width:"95"},{default:c.withCtx(()=>[c.createTextVNode(c.toDisplayString(c.unref(g)("actions.edit")),1)]),_:1},512),[[c.vShow,!l.value]]),c.withDirectives(c.createVNode(Ge.VBtn,{onClick:d,variant:"text",color:"secondary",width:"95"},{default:c.withCtx(()=>[c.createVNode(Ca.VIcon,{class:"pt-1 pe-2"},{default:c.withCtx(()=>w[2]||(w[2]=[c.createTextVNode("mdi-close")])),_:1}),c.createTextVNode(" "+c.toDisplayString(c.unref(g)("actions.cancel")),1)]),_:1},512),[[c.vShow,l.value]])])])])]))}}),FV={class:"d-flex align-items-center"},HV={key:0,class:"d-flex align-center"},$V={class:"ms-1"},KV={class:"d-flex"},WV={class:"d-flex mb-1 align-center"},zV={class:"min-w-100 relative"},QE=c.defineComponent({__name:"TabFormHeaderV2",props:c.mergeModels({id:{}},{modelValue:{type:Boolean},modelModifiers:{}}),emits:c.mergeModels(["save","cancel","delete","disable"],["update:modelValue"]),setup(n,{emit:e}){var g;const t=c.useModel(n,"modelValue"),r=e,o=c.getCurrentInstance(),a=((g=o==null?void 0:o.vnode.props)==null?void 0:g.onDisable)!==void 0;function l(){r("cancel"),t.value=!0}function d(){t.value=!t.value}async function h(){r("delete"),r("disable")}const{t:f}=Fn();return(_,p)=>(c.openBlock(),c.createElementBlock("div",FV,[_.id?(c.openBlock(),c.createElementBlock("div",HV,[p[0]||(p[0]=c.createElementVNode("b",null,"ID:",-1)),c.createElementVNode("span",$V,c.toDisplayString(_.id),1),c.createVNode(xs,{"content-to-copy":_.id,size:20},null,8,["content-to-copy"])])):c.createCommentVNode("",!0),c.createVNode(qe.VSpacer),c.createElementVNode("div",KV,[c.createVNode(Ge.VBtn,{onClick:h,variant:"text"},{default:c.withCtx(()=>[a?(c.openBlock(),c.createBlock(c.unref(dC),{key:0,size:"11",class:"me-2"})):(c.openBlock(),c.createBlock(Ca.VIcon,{key:1,class:"me-2"},{default:c.withCtx(()=>p[1]||(p[1]=[c.createTextVNode("mdi-delete-outline")])),_:1})),c.createTextVNode(" "+c.toDisplayString(a?c.unref(f)("actions.disable"):c.unref(f)("actions.delete")),1)]),_:1}),c.createElementVNode("div",WV,[c.createVNode(Ho.VDivider,{class:"mx-2 my-1",vertical:""}),c.createElementVNode("div",zV,[c.withDirectives(c.createVNode(Ge.VBtn,{onClick:d,variant:"text",color:"secondary","prepend-icon":"mdi-pencil",width:"95"},{default:c.withCtx(()=>[c.createTextVNode(c.toDisplayString(c.unref(f)("actions.edit")),1)]),_:1},512),[[c.vShow,t.value]]),c.withDirectives(c.createVNode(Ge.VBtn,{onClick:l,variant:"text",color:"secondary",width:"95"},{default:c.withCtx(()=>[c.createVNode(Ca.VIcon,{class:"pt-1 pe-2"},{default:c.withCtx(()=>p[2]||(p[2]=[c.createTextVNode("mdi-close")])),_:1}),c.createTextVNode(" "+c.toDisplayString(c.unref(f)("actions.cancel")),1)]),_:1},512),[[c.vShow,!t.value]])])])])]))}}),GV={class:"d-flex flex-column"},qV={class:"height d-flex flex-column"},jV={class:"d-flex justify-between align-end"},YV=c.defineComponent({__name:"FormHeadless",props:{id:{},metadata:{},readonly:{type:Boolean,default:!1}},emits:["save","cancel"],setup(n,{emit:e}){const t=e,r=c.getCurrentInstance(),o=c.computed(()=>{var l;return!!((l=r==null?void 0:r.vnode.props)!=null&&l.onSave)}),a=c.computed(()=>{var l;return!!((l=r==null?void 0:r.vnode.props)!=null&&l.onCancel)});return(l,d)=>(c.openBlock(),c.createBlock(Yl,null,{default:c.withCtx(()=>[c.createElementVNode("div",GV,[c.createElementVNode("div",qV,[c.renderSlot(l.$slots,"default",{},void 0,!0)])]),c.createElementVNode("div",jV,[c.createVNode(qe.VRow,{"no-gutters":"",justify:"space-between",class:"w-100"},{default:c.withCtx(()=>[c.createVNode(qe.VCol,{cols:"auto",class:"text-sm-subtitle-2 text-medium-emphasis"},{default:c.withCtx(()=>[c.createVNode(au,{id:l.id,meta:l.metadata},null,8,["id","meta"])]),_:1}),l.readonly?c.createCommentVNode("",!0):(c.openBlock(),c.createBlock(qe.VCol,{key:0,class:"d-flex align-end",cols:"auto"},{default:c.withCtx(()=>[a.value?(c.openBlock(),c.createBlock(qE,{key:0,title:"Back",onCancel:d[0]||(d[0]=h=>t("cancel"))})):c.createCommentVNode("",!0),o.value?(c.openBlock(),c.createBlock(jE,{key:1,onOnSave:d[1]||(d[1]=h=>t("save"))})):c.createCommentVNode("",!0)]),_:1}))]),_:1})])]),_:3}))}}),XE=Yo(YV,[["__scopeId","data-v-e7e4d99c"]]);/**
|
73
73
|
* @license @tabler/icons-vue v3.22.0 - MIT
|
74
74
|
*
|
75
75
|
* This source code is licensed under the MIT license.
|
@@ -84,30 +84,30 @@ function print() { __p += __j.call(arguments, '') }
|
|
84
84
|
*
|
85
85
|
* This source code is licensed under the MIT license.
|
86
86
|
* See the LICENSE file in the root directory of this source tree.
|
87
|
-
*/var
|
87
|
+
*/var JV=zs("outline","buildings","IconBuildings",[["path",{d:"M4 21v-15c0 -1 1 -2 2 -2h5c1 0 2 1 2 2v15",key:"svg-0"}],["path",{d:"M16 8h2c1 0 2 1 2 2v11",key:"svg-1"}],["path",{d:"M3 21h18",key:"svg-2"}],["path",{d:"M10 12v0",key:"svg-3"}],["path",{d:"M10 16v0",key:"svg-4"}],["path",{d:"M10 8v0",key:"svg-5"}],["path",{d:"M7 12v0",key:"svg-6"}],["path",{d:"M7 16v0",key:"svg-7"}],["path",{d:"M7 8v0",key:"svg-8"}],["path",{d:"M17 12v0",key:"svg-9"}],["path",{d:"M17 16v0",key:"svg-10"}]]);/**
|
88
88
|
* @license @tabler/icons-vue v3.22.0 - MIT
|
89
89
|
*
|
90
90
|
* This source code is licensed under the MIT license.
|
91
91
|
* See the LICENSE file in the root directory of this source tree.
|
92
|
-
*/var
|
92
|
+
*/var QV=zs("outline","universe","IconUniverse",[["path",{d:"M7.027 11.477a5 5 0 1 0 5.496 -4.45a4.951 4.951 0 0 0 -3.088 .681",key:"svg-0"}],["path",{d:"M5.636 5.636a9 9 0 1 0 3.555 -2.188",key:"svg-1"}],["path",{d:"M18 5m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-2"}],["path",{d:"M12 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-3"}],["path",{d:"M9 16m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-4"}]]);/**
|
93
93
|
* @license @tabler/icons-vue v3.22.0 - MIT
|
94
94
|
*
|
95
95
|
* This source code is licensed under the MIT license.
|
96
96
|
* See the LICENSE file in the root directory of this source tree.
|
97
|
-
*/var
|
97
|
+
*/var XV=zs("outline","user","IconUser",[["path",{d:"M8 7a4 4 0 1 0 8 0a4 4 0 0 0 -8 0",key:"svg-0"}],["path",{d:"M6 21v-2a4 4 0 0 1 4 -4h4a4 4 0 0 1 4 4v2",key:"svg-1"}]]);/**
|
98
98
|
* @license @tabler/icons-vue v3.22.0 - MIT
|
99
99
|
*
|
100
100
|
* This source code is licensed under the MIT license.
|
101
101
|
* See the LICENSE file in the root directory of this source tree.
|
102
|
-
*/var
|
102
|
+
*/var ZV=zs("outline","users","IconUsers",[["path",{d:"M9 7m-4 0a4 4 0 1 0 8 0a4 4 0 1 0 -8 0",key:"svg-0"}],["path",{d:"M3 21v-2a4 4 0 0 1 4 -4h4a4 4 0 0 1 4 4v2",key:"svg-1"}],["path",{d:"M16 3.13a4 4 0 0 1 0 7.75",key:"svg-2"}],["path",{d:"M21 21v-2a4 4 0 0 0 -3 -3.85",key:"svg-3"}]]);/**
|
103
103
|
* @license @tabler/icons-vue v3.22.0 - MIT
|
104
104
|
*
|
105
105
|
* This source code is licensed under the MIT license.
|
106
106
|
* See the LICENSE file in the root directory of this source tree.
|
107
|
-
*/var QV=zs("filled","caret-right-filled","IconCaretRightFilled",[["path",{d:"M9 6c0 -.852 .986 -1.297 1.623 -.783l.084 .076l6 6a1 1 0 0 1 .083 1.32l-.083 .094l-6 6l-.094 .083l-.077 .054l-.096 .054l-.036 .017l-.067 .027l-.108 .032l-.053 .01l-.06 .01l-.057 .004l-.059 .002l-.059 -.002l-.058 -.005l-.06 -.009l-.052 -.01l-.108 -.032l-.067 -.027l-.132 -.07l-.09 -.065l-.081 -.073l-.083 -.094l-.054 -.077l-.054 -.096l-.017 -.036l-.027 -.067l-.032 -.108l-.01 -.053l-.01 -.06l-.004 -.057l-.002 -12.059z",key:"svg-0"}]]);/*! @azure/msal-common v14.16.0 2024-11-05 */const V={LIBRARY_NAME:"MSAL.JS",SKU:"msal.js.common",CACHE_PREFIX:"msal",DEFAULT_AUTHORITY:"https://login.microsoftonline.com/common/",DEFAULT_AUTHORITY_HOST:"login.microsoftonline.com",DEFAULT_COMMON_TENANT:"common",ADFS:"adfs",DSTS:"dstsv2",AAD_INSTANCE_DISCOVERY_ENDPT:"https://login.microsoftonline.com/common/discovery/instance?api-version=1.1&authorization_endpoint=",CIAM_AUTH_URL:".ciamlogin.com",AAD_TENANT_DOMAIN_SUFFIX:".onmicrosoft.com",RESOURCE_DELIM:"|",NO_ACCOUNT:"NO_ACCOUNT",CLAIMS:"claims",CONSUMER_UTID:"9188040d-6c67-4c5b-b112-36a304b66dad",OPENID_SCOPE:"openid",PROFILE_SCOPE:"profile",OFFLINE_ACCESS_SCOPE:"offline_access",EMAIL_SCOPE:"email",CODE_RESPONSE_TYPE:"code",CODE_GRANT_TYPE:"authorization_code",RT_GRANT_TYPE:"refresh_token",FRAGMENT_RESPONSE_MODE:"fragment",S256_CODE_CHALLENGE_METHOD:"S256",URL_FORM_CONTENT_TYPE:"application/x-www-form-urlencoded;charset=utf-8",AUTHORIZATION_PENDING:"authorization_pending",NOT_DEFINED:"not_defined",EMPTY_STRING:"",NOT_APPLICABLE:"N/A",NOT_AVAILABLE:"Not Available",FORWARD_SLASH:"/",IMDS_ENDPOINT:"http://169.254.169.254/metadata/instance/compute/location",IMDS_VERSION:"2020-06-01",IMDS_TIMEOUT:2e3,AZURE_REGION_AUTO_DISCOVER_FLAG:"TryAutoDetect",REGIONAL_AUTH_PUBLIC_CLOUD_SUFFIX:"login.microsoft.com",KNOWN_PUBLIC_CLOUDS:["login.microsoftonline.com","login.windows.net","login.microsoft.com","sts.windows.net"],TOKEN_RESPONSE_TYPE:"token",ID_TOKEN_RESPONSE_TYPE:"id_token",SHR_NONCE_VALIDITY:240,INVALID_INSTANCE:"invalid_instance"},Gc={SUCCESS:200,SUCCESS_RANGE_START:200,SUCCESS_RANGE_END:299,REDIRECT:302,CLIENT_ERROR:400,CLIENT_ERROR_RANGE_START:400,BAD_REQUEST:400,UNAUTHORIZED:401,NOT_FOUND:404,REQUEST_TIMEOUT:408,TOO_MANY_REQUESTS:429,CLIENT_ERROR_RANGE_END:499,SERVER_ERROR:500,SERVER_ERROR_RANGE_START:500,SERVICE_UNAVAILABLE:503,GATEWAY_TIMEOUT:504,SERVER_ERROR_RANGE_END:599,MULTI_SIDED_ERROR:600},Da=[V.OPENID_SCOPE,V.PROFILE_SCOPE,V.OFFLINE_ACCESS_SCOPE],Bv=[...Da,V.EMAIL_SCOPE],dn={CONTENT_TYPE:"Content-Type",CONTENT_LENGTH:"Content-Length",RETRY_AFTER:"Retry-After",CCS_HEADER:"X-AnchorMailbox",WWWAuthenticate:"WWW-Authenticate",AuthenticationInfo:"Authentication-Info",X_MS_REQUEST_ID:"x-ms-request-id",X_MS_HTTP_VERSION:"x-ms-httpver"},Lt={ID_TOKEN:"idtoken",CLIENT_INFO:"client.info",ADAL_ID_TOKEN:"adal.idtoken",ERROR:"error",ERROR_DESC:"error.description",ACTIVE_ACCOUNT:"active-account",ACTIVE_ACCOUNT_FILTERS:"active-account-filters"},$o={COMMON:"common",ORGANIZATIONS:"organizations",CONSUMERS:"consumers"},qc={ACCESS_TOKEN:"access_token",XMS_CC:"xms_cc"},Bt={LOGIN:"login",SELECT_ACCOUNT:"select_account",CONSENT:"consent",NONE:"none",CREATE:"create",NO_SESSION:"no_session"},Vv={PLAIN:"plain",S256:"S256"},Gs={QUERY:"query",FRAGMENT:"fragment"},XV={...Gs,FORM_POST:"form_post"},XE={IMPLICIT_GRANT:"implicit",AUTHORIZATION_CODE_GRANT:"authorization_code",CLIENT_CREDENTIALS_GRANT:"client_credentials",RESOURCE_OWNER_PASSWORD_GRANT:"password",REFRESH_TOKEN_GRANT:"refresh_token",DEVICE_CODE_GRANT:"device_code",JWT_BEARER:"urn:ietf:params:oauth:grant-type:jwt-bearer"},jc={MSSTS_ACCOUNT_TYPE:"MSSTS",ADFS_ACCOUNT_TYPE:"ADFS",MSAV1_ACCOUNT_TYPE:"MSA",GENERIC_ACCOUNT_TYPE:"Generic"},tn={CACHE_KEY_SEPARATOR:"-",CLIENT_INFO_SEPARATOR:"."},ge={ID_TOKEN:"IdToken",ACCESS_TOKEN:"AccessToken",ACCESS_TOKEN_WITH_AUTH_SCHEME:"AccessToken_With_AuthScheme",REFRESH_TOKEN:"RefreshToken"},zf="appmetadata",ZV="client_info",Cs="1",Rl={CACHE_KEY:"authority-metadata",REFRESH_TIME_SECONDS:3600*24},On={CONFIG:"config",CACHE:"cache",NETWORK:"network",HARDCODED_VALUES:"hardcoded_values"},Wt={SCHEMA_VERSION:5,MAX_CUR_HEADER_BYTES:80,MAX_LAST_HEADER_BYTES:330,MAX_CACHED_ERRORS:50,CACHE_KEY:"server-telemetry",CATEGORY_SEPARATOR:"|",VALUE_SEPARATOR:",",OVERFLOW_TRUE:"1",OVERFLOW_FALSE:"0",UNKNOWN_ERROR:"unknown_error"},je={BEARER:"Bearer",POP:"pop",SSH:"ssh-cert"},Es={DEFAULT_THROTTLE_TIME_SECONDS:60,DEFAULT_MAX_THROTTLE_TIME_SECONDS:3600,THROTTLING_PREFIX:"throttling",X_MS_LIB_CAPABILITY_VALUE:"retry-after, h429"},Fv={INVALID_GRANT_ERROR:"invalid_grant",CLIENT_MISMATCH_ERROR:"client_mismatch"},Hv={username:"username",password:"password"},Yc={httpSuccess:200,httpBadRequest:400},Ji={FAILED_AUTO_DETECTION:"1",INTERNAL_CACHE:"2",ENVIRONMENT_VARIABLE:"3",IMDS:"4"},ah={CONFIGURED_MATCHES_DETECTED:"1",CONFIGURED_NO_AUTO_DETECTION:"2",CONFIGURED_NOT_DETECTED:"3",AUTO_DETECTION_REQUESTED_SUCCESSFUL:"4",AUTO_DETECTION_REQUESTED_FAILED:"5"},Mo={NOT_APPLICABLE:"0",FORCE_REFRESH_OR_CLAIMS:"1",NO_CACHED_ACCESS_TOKEN:"2",CACHED_ACCESS_TOKEN_EXPIRED:"3",PROACTIVELY_REFRESHED:"4"},eF={Jwt:"JWT",Jwk:"JWK",Pop:"pop"},tF=300;/*! @azure/msal-common v14.16.0 2024-11-05 */const Gf="unexpected_error",nF="post_request_failed";/*! @azure/msal-common v14.16.0 2024-11-05 */const $v={[Gf]:"Unexpected error in authentication.",[nF]:"Post request failed from the network, could be a 4xx/5xx or a network unavailability. Please check the exact error code for details."};class lt extends Error{constructor(e,t,r){const o=t?`${e}: ${t}`:e;super(o),Object.setPrototypeOf(this,lt.prototype),this.errorCode=e||V.EMPTY_STRING,this.errorMessage=t||V.EMPTY_STRING,this.subError=r||V.EMPTY_STRING,this.name="AuthError"}setCorrelationId(e){this.correlationId=e}}function ZE(n,e){return new lt(n,e?`${$v[n]} ${e}`:$v[n])}/*! @azure/msal-common v14.16.0 2024-11-05 */const qf="client_info_decoding_error",ew="client_info_empty_error",jf="token_parsing_error",tw="null_or_empty_token",ao="endpoints_resolution_error",nw="network_error",rw="openid_config_error",ow="hash_not_deserialized",Ia="invalid_state",iw="state_mismatch",Ol="state_not_found",aw="nonce_mismatch",Yf="auth_time_not_found",sw="max_age_transpired",rF="multiple_matching_tokens",oF="multiple_matching_accounts",cw="multiple_matching_appMetadata",lw="request_cannot_be_made",uw="cannot_remove_empty_scope",dw="cannot_append_scopeset",Jh="empty_input_scopeset",iF="device_code_polling_cancelled",aF="device_code_expired",sF="device_code_unknown_error",Jf="no_account_in_silent_request",hw="invalid_cache_record",Qf="invalid_cache_environment",Qh="no_account_found",Xh="no_crypto_object",Zh="unexpected_credential_type",cF="invalid_assertion",lF="invalid_client_credential",co="token_refresh_required",uF="user_timeout_reached",fw="token_claims_cnf_required_for_signedjwt",mw="authorization_code_missing_from_server_response",gw="binding_key_not_removed",pw="end_session_endpoint_not_supported",Xf="key_id_missing",dF="no_network_connectivity",hF="user_canceled",fF="missing_tenant_id_error",Ae="method_not_implemented",mF="nested_app_auth_bridge_disabled";/*! @azure/msal-common v14.16.0 2024-11-05 */const Kv={[qf]:"The client info could not be parsed/decoded correctly",[ew]:"The client info was empty",[jf]:"Token cannot be parsed",[tw]:"The token is null or empty",[ao]:"Endpoints cannot be resolved",[nw]:"Network request failed",[rw]:"Could not retrieve endpoints. Check your authority and verify the .well-known/openid-configuration endpoint returns the required endpoints.",[ow]:"The hash parameters could not be deserialized",[Ia]:"State was not the expected format",[iw]:"State mismatch error",[Ol]:"State not found",[aw]:"Nonce mismatch error",[Yf]:"Max Age was requested and the ID token is missing the auth_time variable. auth_time is an optional claim and is not enabled by default - it must be enabled. See https://aka.ms/msaljs/optional-claims for more information.",[sw]:"Max Age is set to 0, or too much time has elapsed since the last end-user authentication.",[rF]:"The cache contains multiple tokens satisfying the requirements. Call AcquireToken again providing more requirements such as authority or account.",[oF]:"The cache contains multiple accounts satisfying the given parameters. Please pass more info to obtain the correct account",[cw]:"The cache contains multiple appMetadata satisfying the given parameters. Please pass more info to obtain the correct appMetadata",[lw]:"Token request cannot be made without authorization code or refresh token.",[uw]:"Cannot remove null or empty scope from ScopeSet",[dw]:"Cannot append ScopeSet",[Jh]:"Empty input ScopeSet cannot be processed",[iF]:"Caller has cancelled token endpoint polling during device code flow by setting DeviceCodeRequest.cancel = true.",[aF]:"Device code is expired.",[sF]:"Device code stopped polling for unknown reasons.",[Jf]:"Please pass an account object, silent flow is not supported without account information",[hw]:"Cache record object was null or undefined.",[Qf]:"Invalid environment when attempting to create cache entry",[Qh]:"No account found in cache for given key.",[Xh]:"No crypto object detected.",[Zh]:"Unexpected credential type.",[cF]:"Client assertion must meet requirements described in https://tools.ietf.org/html/rfc7515",[lF]:"Client credential (secret, certificate, or assertion) must not be empty when creating a confidential client. An application should at most have one credential",[co]:"Cannot return token from cache because it must be refreshed. This may be due to one of the following reasons: forceRefresh parameter is set to true, claims have been requested, there is no cached access token or it is expired.",[uF]:"User defined timeout for device code polling reached",[fw]:"Cannot generate a POP jwt if the token_claims are not populated",[mw]:"Server response does not contain an authorization code to proceed",[gw]:"Could not remove the credential's binding key from storage.",[pw]:"The provided authority does not support logout",[Xf]:"A keyId value is missing from the requested bound token's cache record and is required to match the token to it's stored binding key.",[dF]:"No network connectivity. Check your internet connection.",[hF]:"User cancelled the flow.",[fF]:"A tenant id - not common, organizations, or consumers - must be specified when using the client_credentials flow.",[Ae]:"This method has not been implemented",[mF]:"The nested app auth bridge is disabled"};class su extends lt{constructor(e,t){super(e,t?`${Kv[e]}: ${t}`:Kv[e]),this.name="ClientAuthError",Object.setPrototypeOf(this,su.prototype)}}function Y(n,e){return new su(n,e)}/*! @azure/msal-common v14.16.0 2024-11-05 */const Pl={createNewGuid:()=>{throw Y(Ae)},base64Decode:()=>{throw Y(Ae)},base64Encode:()=>{throw Y(Ae)},base64UrlEncode:()=>{throw Y(Ae)},encodeKid:()=>{throw Y(Ae)},async getPublicKeyThumbprint(){throw Y(Ae)},async removeTokenBindingKey(){throw Y(Ae)},async clearKeystore(){throw Y(Ae)},async signJwt(){throw Y(Ae)},async hashString(){throw Y(Ae)}};/*! @azure/msal-common v14.16.0 2024-11-05 */var nt;(function(n){n[n.Error=0]="Error",n[n.Warning=1]="Warning",n[n.Info=2]="Info",n[n.Verbose=3]="Verbose",n[n.Trace=4]="Trace"})(nt||(nt={}));class Wo{constructor(e,t,r){this.level=nt.Info;const o=()=>{},a=e||Wo.createDefaultLoggerOptions();this.localCallback=a.loggerCallback||o,this.piiLoggingEnabled=a.piiLoggingEnabled||!1,this.level=typeof a.logLevel=="number"?a.logLevel:nt.Info,this.correlationId=a.correlationId||V.EMPTY_STRING,this.packageName=t||V.EMPTY_STRING,this.packageVersion=r||V.EMPTY_STRING}static createDefaultLoggerOptions(){return{loggerCallback:()=>{},piiLoggingEnabled:!1,logLevel:nt.Info}}clone(e,t,r){return new Wo({loggerCallback:this.localCallback,piiLoggingEnabled:this.piiLoggingEnabled,logLevel:this.level,correlationId:r||this.correlationId},e,t)}logMessage(e,t){if(t.logLevel>this.level||!this.piiLoggingEnabled&&t.containsPii)return;const a=`${`[${new Date().toUTCString()}] : [${t.correlationId||this.correlationId||""}]`} : ${this.packageName}@${this.packageVersion} : ${nt[t.logLevel]} - ${e}`;this.executeCallback(t.logLevel,a,t.containsPii||!1)}executeCallback(e,t,r){this.localCallback&&this.localCallback(e,t,r)}error(e,t){this.logMessage(e,{logLevel:nt.Error,containsPii:!1,correlationId:t||V.EMPTY_STRING})}errorPii(e,t){this.logMessage(e,{logLevel:nt.Error,containsPii:!0,correlationId:t||V.EMPTY_STRING})}warning(e,t){this.logMessage(e,{logLevel:nt.Warning,containsPii:!1,correlationId:t||V.EMPTY_STRING})}warningPii(e,t){this.logMessage(e,{logLevel:nt.Warning,containsPii:!0,correlationId:t||V.EMPTY_STRING})}info(e,t){this.logMessage(e,{logLevel:nt.Info,containsPii:!1,correlationId:t||V.EMPTY_STRING})}infoPii(e,t){this.logMessage(e,{logLevel:nt.Info,containsPii:!0,correlationId:t||V.EMPTY_STRING})}verbose(e,t){this.logMessage(e,{logLevel:nt.Verbose,containsPii:!1,correlationId:t||V.EMPTY_STRING})}verbosePii(e,t){this.logMessage(e,{logLevel:nt.Verbose,containsPii:!0,correlationId:t||V.EMPTY_STRING})}trace(e,t){this.logMessage(e,{logLevel:nt.Trace,containsPii:!1,correlationId:t||V.EMPTY_STRING})}tracePii(e,t){this.logMessage(e,{logLevel:nt.Trace,containsPii:!0,correlationId:t||V.EMPTY_STRING})}isPiiLoggingEnabled(){return this.piiLoggingEnabled||!1}}/*! @azure/msal-common v14.16.0 2024-11-05 */const _w="@azure/msal-common",Zf="14.16.0";/*! @azure/msal-common v14.16.0 2024-11-05 */const em={None:"none",AzurePublic:"https://login.microsoftonline.com",AzurePpe:"https://login.windows-ppe.net",AzureChina:"https://login.chinacloudapi.cn",AzureGermany:"https://login.microsoftonline.de",AzureUsGovernment:"https://login.microsoftonline.us"};/*! @azure/msal-common v14.16.0 2024-11-05 */function Ai(n,e){const t=gF(n);try{const r=e(t);return JSON.parse(r)}catch{throw Y(jf)}}function gF(n){if(!n)throw Y(tw);const t=/^([^\.\s]*)\.([^\.\s]+)\.([^\.\s]*)$/.exec(n);if(!t||t.length<4)throw Y(jf);return t[2]}function vw(n,e){if(e===0||Date.now()-3e5>n+e)throw Y(sw)}/*! @azure/msal-common v14.16.0 2024-11-05 */function zr(){return Math.round(new Date().getTime()/1e3)}function ef(n,e){const t=Number(n)||0;return zr()+e>t}function pF(n){return Number(n)>zr()}/*! @azure/msal-common v14.16.0 2024-11-05 */function fa(n){return[_F(n),vF(n),yF(n),CF(n),EF(n)].join(tn.CACHE_KEY_SEPARATOR).toLowerCase()}function cu(n,e,t,r,o){return{credentialType:ge.ID_TOKEN,homeAccountId:n,environment:e,clientId:r,secret:t,realm:o}}function lu(n,e,t,r,o,a,l,d,h,f,g,_,p,w,C){var k,I;const T={homeAccountId:n,credentialType:ge.ACCESS_TOKEN,secret:t,cachedAt:zr().toString(),expiresOn:l.toString(),extendedExpiresOn:d.toString(),environment:e,clientId:r,realm:o,target:a,tokenType:g||je.BEARER};if(_&&(T.userAssertionHash=_),f&&(T.refreshOn=f.toString()),w&&(T.requestedClaims=w,T.requestedClaimsHash=C),((k=T.tokenType)==null?void 0:k.toLowerCase())!==je.BEARER.toLowerCase())switch(T.credentialType=ge.ACCESS_TOKEN_WITH_AUTH_SCHEME,T.tokenType){case je.POP:const N=Ai(t,h);if(!((I=N==null?void 0:N.cnf)!=null&&I.kid))throw Y(fw);T.keyId=N.cnf.kid;break;case je.SSH:T.keyId=p}return T}function yw(n,e,t,r,o,a,l){const d={credentialType:ge.REFRESH_TOKEN,homeAccountId:n,environment:e,clientId:r,secret:t};return a&&(d.userAssertionHash=a),o&&(d.familyId=o),l&&(d.expiresOn=l.toString()),d}function tm(n){return n.hasOwnProperty("homeAccountId")&&n.hasOwnProperty("environment")&&n.hasOwnProperty("credentialType")&&n.hasOwnProperty("clientId")&&n.hasOwnProperty("secret")}function Wv(n){return n?tm(n)&&n.hasOwnProperty("realm")&&n.hasOwnProperty("target")&&(n.credentialType===ge.ACCESS_TOKEN||n.credentialType===ge.ACCESS_TOKEN_WITH_AUTH_SCHEME):!1}function zv(n){return n?tm(n)&&n.hasOwnProperty("realm")&&n.credentialType===ge.ID_TOKEN:!1}function Gv(n){return n?tm(n)&&n.credentialType===ge.REFRESH_TOKEN:!1}function _F(n){return[n.homeAccountId,n.environment].join(tn.CACHE_KEY_SEPARATOR).toLowerCase()}function vF(n){const e=n.credentialType===ge.REFRESH_TOKEN&&n.familyId||n.clientId;return[n.credentialType,e,n.realm||""].join(tn.CACHE_KEY_SEPARATOR).toLowerCase()}function yF(n){return(n.target||"").toLowerCase()}function CF(n){return(n.requestedClaimsHash||"").toLowerCase()}function EF(n){return n.tokenType&&n.tokenType.toLowerCase()!==je.BEARER.toLowerCase()?n.tokenType.toLowerCase():""}function wF(n,e){const t=n.indexOf(Wt.CACHE_KEY)===0;let r=!0;return e&&(r=e.hasOwnProperty("failedRequests")&&e.hasOwnProperty("errors")&&e.hasOwnProperty("cacheHits")),t&&r}function TF(n,e){let t=!1;n&&(t=n.indexOf(Es.THROTTLING_PREFIX)===0);let r=!0;return e&&(r=e.hasOwnProperty("throttleTime")),t&&r}function bF({environment:n,clientId:e}){return[zf,n,e].join(tn.CACHE_KEY_SEPARATOR).toLowerCase()}function IF(n,e){return e?n.indexOf(zf)===0&&e.hasOwnProperty("clientId")&&e.hasOwnProperty("environment"):!1}function SF(n,e){return e?n.indexOf(Rl.CACHE_KEY)===0&&e.hasOwnProperty("aliases")&&e.hasOwnProperty("preferred_cache")&&e.hasOwnProperty("preferred_network")&&e.hasOwnProperty("canonical_authority")&&e.hasOwnProperty("authorization_endpoint")&&e.hasOwnProperty("token_endpoint")&&e.hasOwnProperty("issuer")&&e.hasOwnProperty("aliasesFromNetwork")&&e.hasOwnProperty("endpointsFromNetwork")&&e.hasOwnProperty("expiresAt")&&e.hasOwnProperty("jwks_uri"):!1}function qv(){return zr()+Rl.REFRESH_TIME_SECONDS}function Jc(n,e,t){n.authorization_endpoint=e.authorization_endpoint,n.token_endpoint=e.token_endpoint,n.end_session_endpoint=e.end_session_endpoint,n.issuer=e.issuer,n.endpointsFromNetwork=t,n.jwks_uri=e.jwks_uri}function sh(n,e,t){n.aliases=e.aliases,n.preferred_cache=e.preferred_cache,n.preferred_network=e.preferred_network,n.aliasesFromNetwork=t}function jv(n){return n.expiresAt<=zr()}/*! @azure/msal-common v14.16.0 2024-11-05 */const Cw="redirect_uri_empty",AF="claims_request_parsing_error",Ew="authority_uri_insecure",hs="url_parse_error",ww="empty_url_error",Tw="empty_input_scopes_error",bw="invalid_prompt_value",nm="invalid_claims",Iw="token_request_empty",Sw="logout_request_empty",Aw="invalid_code_challenge_method",rm="pkce_params_missing",om="invalid_cloud_discovery_metadata",kw="invalid_authority_metadata",Nw="untrusted_authority",uu="missing_ssh_jwk",Rw="missing_ssh_kid",kF="missing_nonce_authentication_header",NF="invalid_authentication_header",Ow="cannot_set_OIDCOptions",Pw="cannot_allow_native_broker",Mw="authority_mismatch";/*! @azure/msal-common v14.16.0 2024-11-05 */const RF={[Cw]:"A redirect URI is required for all calls, and none has been set.",[AF]:"Could not parse the given claims request object.",[Ew]:"Authority URIs must use https. Please see here for valid authority configuration options: https://docs.microsoft.com/en-us/azure/active-directory/develop/msal-js-initializing-client-applications#configuration-options",[hs]:"URL could not be parsed into appropriate segments.",[ww]:"URL was empty or null.",[Tw]:"Scopes cannot be passed as null, undefined or empty array because they are required to obtain an access token.",[bw]:"Please see here for valid configuration options: https://azuread.github.io/microsoft-authentication-library-for-js/ref/modules/_azure_msal_common.html#commonauthorizationurlrequest",[nm]:"Given claims parameter must be a stringified JSON object.",[Iw]:"Token request was empty and not found in cache.",[Sw]:"The logout request was null or undefined.",[Aw]:'code_challenge_method passed is invalid. Valid values are "plain" and "S256".',[rm]:"Both params: code_challenge and code_challenge_method are to be passed if to be sent in the request",[om]:"Invalid cloudDiscoveryMetadata provided. Must be a stringified JSON object containing tenant_discovery_endpoint and metadata fields",[kw]:"Invalid authorityMetadata provided. Must by a stringified JSON object containing authorization_endpoint, token_endpoint, issuer fields.",[Nw]:"The provided authority is not a trusted authority. Please include this authority in the knownAuthorities config parameter.",[uu]:"Missing sshJwk in SSH certificate request. A stringified JSON Web Key is required when using the SSH authentication scheme.",[Rw]:"Missing sshKid in SSH certificate request. A string that uniquely identifies the public SSH key is required when using the SSH authentication scheme.",[kF]:"Unable to find an authentication header containing server nonce. Either the Authentication-Info or WWW-Authenticate headers must be present in order to obtain a server nonce.",[NF]:"Invalid authentication header provided",[Ow]:"Cannot set OIDCOptions parameter. Please change the protocol mode to OIDC or use a non-Microsoft authority.",[Pw]:"Cannot set allowNativeBroker parameter to true when not in AAD protocol mode.",[Mw]:"Authority mismatch error. Authority provided in login request or PublicClientApplication config does not match the environment of the provided account. Please use a matching account or make an interactive request to login to this authority."};class im extends lt{constructor(e){super(e,RF[e]),this.name="ClientConfigurationError",Object.setPrototypeOf(this,im.prototype)}}function Ze(n){return new im(n)}/*! @azure/msal-common v14.16.0 2024-11-05 */class Cr{static isEmptyObj(e){if(e)try{const t=JSON.parse(e);return Object.keys(t).length===0}catch{}return!0}static startsWith(e,t){return e.indexOf(t)===0}static endsWith(e,t){return e.length>=t.length&&e.lastIndexOf(t)===e.length-t.length}static queryStringToObject(e){const t={},r=e.split("&"),o=a=>decodeURIComponent(a.replace(/\+/g," "));return r.forEach(a=>{if(a.trim()){const[l,d]=a.split(/=(.+)/g,2);l&&d&&(t[o(l)]=o(d))}}),t}static trimArrayEntries(e){return e.map(t=>t.trim())}static removeEmptyStringsFromArray(e){return e.filter(t=>!!t)}static jsonParseHelper(e){try{return JSON.parse(e)}catch{return null}}static matchPattern(e,t){return new RegExp(e.replace(/\\/g,"\\\\").replace(/\*/g,"[^ ]*").replace(/\?/g,"\\?")).test(t)}}/*! @azure/msal-common v14.16.0 2024-11-05 */class _t{constructor(e){const t=e?Cr.trimArrayEntries([...e]):[],r=t?Cr.removeEmptyStringsFromArray(t):[];this.validateInputScopes(r),this.scopes=new Set,r.forEach(o=>this.scopes.add(o))}static fromString(e){const r=(e||V.EMPTY_STRING).split(" ");return new _t(r)}static createSearchScopes(e){const t=new _t(e);return t.containsOnlyOIDCScopes()?t.removeScope(V.OFFLINE_ACCESS_SCOPE):t.removeOIDCScopes(),t}validateInputScopes(e){if(!e||e.length<1)throw Ze(Tw)}containsScope(e){const t=this.printScopesLowerCase().split(" "),r=new _t(t);return e?r.scopes.has(e.toLowerCase()):!1}containsScopeSet(e){return!e||e.scopes.size<=0?!1:this.scopes.size>=e.scopes.size&&e.asArray().every(t=>this.containsScope(t))}containsOnlyOIDCScopes(){let e=0;return Bv.forEach(t=>{this.containsScope(t)&&(e+=1)}),this.scopes.size===e}appendScope(e){e&&this.scopes.add(e.trim())}appendScopes(e){try{e.forEach(t=>this.appendScope(t))}catch{throw Y(dw)}}removeScope(e){if(!e)throw Y(uw);this.scopes.delete(e.trim())}removeOIDCScopes(){Bv.forEach(e=>{this.scopes.delete(e)})}unionScopeSets(e){if(!e)throw Y(Jh);const t=new Set;return e.scopes.forEach(r=>t.add(r.toLowerCase())),this.scopes.forEach(r=>t.add(r.toLowerCase())),t}intersectingScopeSets(e){if(!e)throw Y(Jh);e.containsOnlyOIDCScopes()||e.removeOIDCScopes();const t=this.unionScopeSets(e),r=e.getScopeCount(),o=this.getScopeCount();return t.size<o+r}getScopeCount(){return this.scopes.size}asArray(){const e=[];return this.scopes.forEach(t=>e.push(t)),e}printScopes(){return this.scopes?this.asArray().join(" "):V.EMPTY_STRING}printScopesLowerCase(){return this.printScopes().toLowerCase()}}/*! @azure/msal-common v14.16.0 2024-11-05 */function Ml(n,e){if(!n)throw Y(ew);try{const t=e(n);return JSON.parse(t)}catch{throw Y(qf)}}function ma(n){if(!n)throw Y(qf);const e=n.split(tn.CLIENT_INFO_SEPARATOR,2);return{uid:e[0],utid:e.length<2?V.EMPTY_STRING:e[1]}}/*! @azure/msal-common v14.16.0 2024-11-05 */function Dl(n,e){return!!n&&!!e&&n===e.split(".")[1]}function am(n,e,t,r){if(r){const{oid:o,sub:a,tid:l,name:d,tfp:h,acr:f}=r,g=l||h||f||"";return{tenantId:g,localAccountId:o||a||"",name:d,isHomeTenant:Dl(g,n)}}else return{tenantId:t,localAccountId:e,isHomeTenant:Dl(t,n)}}function sm(n,e,t,r){let o=n;if(e){const{isHomeTenant:a,...l}=e;o={...n,...l}}if(t){const{isHomeTenant:a,...l}=am(n.homeAccountId,n.localAccountId,n.tenantId,t);return o={...o,...l,idTokenClaims:t,idToken:r},o}return o}/*! @azure/msal-common v14.16.0 2024-11-05 */const pr={Default:0,Adfs:1,Dsts:2,Ciam:3};/*! @azure/msal-common v14.16.0 2024-11-05 */function Dw(n){return n&&(n.tid||n.tfp||n.acr)||null}/*! @azure/msal-common v14.16.0 2024-11-05 */const fo={AAD:"AAD",OIDC:"OIDC"};/*! @azure/msal-common v14.16.0 2024-11-05 */class Pt{generateAccountId(){return[this.homeAccountId,this.environment].join(tn.CACHE_KEY_SEPARATOR).toLowerCase()}generateAccountKey(){return Pt.generateAccountCacheKey({homeAccountId:this.homeAccountId,environment:this.environment,tenantId:this.realm,username:this.username,localAccountId:this.localAccountId})}getAccountInfo(){return{homeAccountId:this.homeAccountId,environment:this.environment,tenantId:this.realm,username:this.username,localAccountId:this.localAccountId,name:this.name,nativeAccountId:this.nativeAccountId,authorityType:this.authorityType,tenantProfiles:new Map((this.tenantProfiles||[]).map(e=>[e.tenantId,e]))}}isSingleTenant(){return!this.tenantProfiles}static generateAccountCacheKey(e){const t=e.homeAccountId.split(".")[1];return[e.homeAccountId,e.environment||"",t||e.tenantId||""].join(tn.CACHE_KEY_SEPARATOR).toLowerCase()}static createAccount(e,t,r){var f,g,_,p,w,C;const o=new Pt;t.authorityType===pr.Adfs?o.authorityType=jc.ADFS_ACCOUNT_TYPE:t.protocolMode===fo.AAD?o.authorityType=jc.MSSTS_ACCOUNT_TYPE:o.authorityType=jc.GENERIC_ACCOUNT_TYPE;let a;e.clientInfo&&r&&(a=Ml(e.clientInfo,r)),o.clientInfo=e.clientInfo,o.homeAccountId=e.homeAccountId,o.nativeAccountId=e.nativeAccountId;const l=e.environment||t&&t.getPreferredCache();if(!l)throw Y(Qf);o.environment=l,o.realm=(a==null?void 0:a.utid)||Dw(e.idTokenClaims)||"",o.localAccountId=(a==null?void 0:a.uid)||((f=e.idTokenClaims)==null?void 0:f.oid)||((g=e.idTokenClaims)==null?void 0:g.sub)||"";const d=((_=e.idTokenClaims)==null?void 0:_.preferred_username)||((p=e.idTokenClaims)==null?void 0:p.upn),h=(w=e.idTokenClaims)!=null&&w.emails?e.idTokenClaims.emails[0]:null;if(o.username=d||h||"",o.name=((C=e.idTokenClaims)==null?void 0:C.name)||"",o.cloudGraphHostName=e.cloudGraphHostName,o.msGraphHost=e.msGraphHost,e.tenantProfiles)o.tenantProfiles=e.tenantProfiles;else{const T=am(e.homeAccountId,o.localAccountId,o.realm,e.idTokenClaims);o.tenantProfiles=[T]}return o}static createFromAccountInfo(e,t,r){var a;const o=new Pt;return o.authorityType=e.authorityType||jc.GENERIC_ACCOUNT_TYPE,o.homeAccountId=e.homeAccountId,o.localAccountId=e.localAccountId,o.nativeAccountId=e.nativeAccountId,o.realm=e.tenantId,o.environment=e.environment,o.username=e.username,o.name=e.name,o.cloudGraphHostName=t,o.msGraphHost=r,o.tenantProfiles=Array.from(((a=e.tenantProfiles)==null?void 0:a.values())||[]),o}static generateHomeAccountId(e,t,r,o,a){if(!(t===pr.Adfs||t===pr.Dsts)){if(e)try{const l=Ml(e,o.base64Decode);if(l.uid&&l.utid)return`${l.uid}.${l.utid}`}catch{}r.warning("No client info in response")}return(a==null?void 0:a.sub)||""}static isAccountEntity(e){return e?e.hasOwnProperty("homeAccountId")&&e.hasOwnProperty("environment")&&e.hasOwnProperty("realm")&&e.hasOwnProperty("localAccountId")&&e.hasOwnProperty("username")&&e.hasOwnProperty("authorityType"):!1}static accountInfoIsEqual(e,t,r){if(!e||!t)return!1;let o=!0;if(r){const a=e.idTokenClaims||{},l=t.idTokenClaims||{};o=a.iat===l.iat&&a.nonce===l.nonce}return e.homeAccountId===t.homeAccountId&&e.localAccountId===t.localAccountId&&e.username===t.username&&e.tenantId===t.tenantId&&e.environment===t.environment&&e.nativeAccountId===t.nativeAccountId&&o}}/*! @azure/msal-common v14.16.0 2024-11-05 */function Lw(n){return n.startsWith("#/")?n.substring(2):n.startsWith("#")||n.startsWith("?")?n.substring(1):n}function Ll(n){if(!n||n.indexOf("=")<0)return null;try{const e=Lw(n),t=Object.fromEntries(new URLSearchParams(e));if(t.code||t.error||t.error_description||t.state)return t}catch{throw Y(ow)}return null}/*! @azure/msal-common v14.16.0 2024-11-05 */class De{get urlString(){return this._urlString}constructor(e){if(this._urlString=e,!this._urlString)throw Ze(ww);e.includes("#")||(this._urlString=De.canonicalizeUri(e))}static canonicalizeUri(e){if(e){let t=e.toLowerCase();return Cr.endsWith(t,"?")?t=t.slice(0,-1):Cr.endsWith(t,"?/")&&(t=t.slice(0,-2)),Cr.endsWith(t,"/")||(t+="/"),t}return e}validateAsUri(){let e;try{e=this.getUrlComponents()}catch{throw Ze(hs)}if(!e.HostNameAndPort||!e.PathSegments)throw Ze(hs);if(!e.Protocol||e.Protocol.toLowerCase()!=="https:")throw Ze(Ew)}static appendQueryString(e,t){return t?e.indexOf("?")<0?`${e}?${t}`:`${e}&${t}`:e}static removeHashFromUrl(e){return De.canonicalizeUri(e.split("#")[0])}replaceTenantPath(e){const t=this.getUrlComponents(),r=t.PathSegments;return e&&r.length!==0&&(r[0]===$o.COMMON||r[0]===$o.ORGANIZATIONS)&&(r[0]=e),De.constructAuthorityUriFromObject(t)}getUrlComponents(){const e=RegExp("^(([^:/?#]+):)?(//([^/?#]*))?([^?#]*)(\\?([^#]*))?(#(.*))?"),t=this.urlString.match(e);if(!t)throw Ze(hs);const r={Protocol:t[1],HostNameAndPort:t[4],AbsolutePath:t[5],QueryString:t[7]};let o=r.AbsolutePath.split("/");return o=o.filter(a=>a&&a.length>0),r.PathSegments=o,r.QueryString&&r.QueryString.endsWith("/")&&(r.QueryString=r.QueryString.substring(0,r.QueryString.length-1)),r}static getDomainFromUrl(e){const t=RegExp("^([^:/?#]+://)?([^/?#]*)"),r=e.match(t);if(!r)throw Ze(hs);return r[2]}static getAbsoluteUrl(e,t){if(e[0]===V.FORWARD_SLASH){const o=new De(t).getUrlComponents();return o.Protocol+"//"+o.HostNameAndPort+e}return e}static constructAuthorityUriFromObject(e){return new De(e.Protocol+"//"+e.HostNameAndPort+"/"+e.PathSegments.join("/"))}static hashContainsKnownProperties(e){return!!Ll(e)}}/*! @azure/msal-common v14.16.0 2024-11-05 */const xw={endpointMetadata:{"login.microsoftonline.com":{token_endpoint:"https://login.microsoftonline.com/{tenantid}/oauth2/v2.0/token",jwks_uri:"https://login.microsoftonline.com/{tenantid}/discovery/v2.0/keys",issuer:"https://login.microsoftonline.com/{tenantid}/v2.0",authorization_endpoint:"https://login.microsoftonline.com/{tenantid}/oauth2/v2.0/authorize",end_session_endpoint:"https://login.microsoftonline.com/{tenantid}/oauth2/v2.0/logout"},"login.chinacloudapi.cn":{token_endpoint:"https://login.chinacloudapi.cn/{tenantid}/oauth2/v2.0/token",jwks_uri:"https://login.chinacloudapi.cn/{tenantid}/discovery/v2.0/keys",issuer:"https://login.partner.microsoftonline.cn/{tenantid}/v2.0",authorization_endpoint:"https://login.chinacloudapi.cn/{tenantid}/oauth2/v2.0/authorize",end_session_endpoint:"https://login.chinacloudapi.cn/{tenantid}/oauth2/v2.0/logout"},"login.microsoftonline.us":{token_endpoint:"https://login.microsoftonline.us/{tenantid}/oauth2/v2.0/token",jwks_uri:"https://login.microsoftonline.us/{tenantid}/discovery/v2.0/keys",issuer:"https://login.microsoftonline.us/{tenantid}/v2.0",authorization_endpoint:"https://login.microsoftonline.us/{tenantid}/oauth2/v2.0/authorize",end_session_endpoint:"https://login.microsoftonline.us/{tenantid}/oauth2/v2.0/logout"}},instanceDiscoveryMetadata:{tenant_discovery_endpoint:"https://{canonicalAuthority}/v2.0/.well-known/openid-configuration",metadata:[{preferred_network:"login.microsoftonline.com",preferred_cache:"login.windows.net",aliases:["login.microsoftonline.com","login.windows.net","login.microsoft.com","sts.windows.net"]},{preferred_network:"login.partner.microsoftonline.cn",preferred_cache:"login.partner.microsoftonline.cn",aliases:["login.partner.microsoftonline.cn","login.chinacloudapi.cn"]},{preferred_network:"login.microsoftonline.de",preferred_cache:"login.microsoftonline.de",aliases:["login.microsoftonline.de"]},{preferred_network:"login.microsoftonline.us",preferred_cache:"login.microsoftonline.us",aliases:["login.microsoftonline.us","login.usgovcloudapi.net"]},{preferred_network:"login-us.microsoftonline.com",preferred_cache:"login-us.microsoftonline.com",aliases:["login-us.microsoftonline.com"]}]}},Yv=xw.endpointMetadata,cm=xw.instanceDiscoveryMetadata,Uw=new Set;cm.metadata.forEach(n=>{n.aliases.forEach(e=>{Uw.add(e)})});function OF(n,e){var o;let t;const r=n.canonicalAuthority;if(r){const a=new De(r).getUrlComponents().HostNameAndPort;t=Jv(a,(o=n.cloudDiscoveryMetadata)==null?void 0:o.metadata,On.CONFIG,e)||Jv(a,cm.metadata,On.HARDCODED_VALUES,e)||n.knownAuthorities}return t||[]}function Jv(n,e,t,r){if(r==null||r.trace(`getAliasesFromMetadata called with source: ${t}`),n&&e){const o=xl(e,n);if(o)return r==null||r.trace(`getAliasesFromMetadata: found cloud discovery metadata in ${t}, returning aliases`),o.aliases;r==null||r.trace(`getAliasesFromMetadata: did not find cloud discovery metadata in ${t}`)}return null}function PF(n){return xl(cm.metadata,n)}function xl(n,e){for(let t=0;t<n.length;t++){const r=n[t];if(r.aliases.includes(e))return r}return null}/*! @azure/msal-common v14.16.0 2024-11-05 */const Bw="cache_quota_exceeded",lm="cache_error_unknown";/*! @azure/msal-common v14.16.0 2024-11-05 */const ch={[Bw]:"Exceeded cache storage capacity.",[lm]:"Unexpected error occurred when using cache storage."};class _a extends Error{constructor(e,t){const r=t||(ch[e]?ch[e]:ch[lm]);super(`${e}: ${r}`),Object.setPrototypeOf(this,_a.prototype),this.name="CacheError",this.errorCode=e,this.errorMessage=r}}/*! @azure/msal-common v14.16.0 2024-11-05 */class Sa{constructor(e,t,r,o){this.clientId=e,this.cryptoImpl=t,this.commonLogger=r.clone(_w,Zf),this.staticAuthorityOptions=o}getAllAccounts(e){return this.buildTenantProfiles(this.getAccountsFilteredBy(e||{}),e)}getAccountInfoFilteredBy(e){const t=this.getAllAccounts(e);return t.length>1?t.sort(o=>o.idTokenClaims?-1:1)[0]:t.length===1?t[0]:null}getBaseAccountInfo(e){const t=this.getAccountsFilteredBy(e);return t.length>0?t[0].getAccountInfo():null}buildTenantProfiles(e,t){return e.flatMap(r=>this.getTenantProfilesFromAccountEntity(r,t==null?void 0:t.tenantId,t))}getTenantedAccountInfoByFilter(e,t,r,o){let a=null,l;if(o&&!this.tenantProfileMatchesFilter(r,o))return null;const d=this.getIdToken(e,t,r.tenantId);return d&&(l=Ai(d.secret,this.cryptoImpl.base64Decode),!this.idTokenClaimsMatchTenantProfileFilter(l,o))?null:(a=sm(e,r,l,d==null?void 0:d.secret),a)}getTenantProfilesFromAccountEntity(e,t,r){const o=e.getAccountInfo();let a=o.tenantProfiles||new Map;const l=this.getTokenKeys();if(t){const h=a.get(t);if(h)a=new Map([[t,h]]);else return[]}const d=[];return a.forEach(h=>{const f=this.getTenantedAccountInfoByFilter(o,l,h,r);f&&d.push(f)}),d}tenantProfileMatchesFilter(e,t){return!(t.localAccountId&&!this.matchLocalAccountIdFromTenantProfile(e,t.localAccountId)||t.name&&e.name!==t.name||t.isHomeTenant!==void 0&&e.isHomeTenant!==t.isHomeTenant)}idTokenClaimsMatchTenantProfileFilter(e,t){return!(t&&(t.localAccountId&&!this.matchLocalAccountIdFromTokenClaims(e,t.localAccountId)||t.loginHint&&!this.matchLoginHintFromTokenClaims(e,t.loginHint)||t.username&&!this.matchUsername(e.preferred_username,t.username)||t.name&&!this.matchName(e,t.name)||t.sid&&!this.matchSid(e,t.sid)))}async saveCacheRecord(e,t,r){var o,a,l,d;if(!e)throw Y(hw);try{e.account&&this.setAccount(e.account),e.idToken&&(t==null?void 0:t.idToken)!==!1&&this.setIdTokenCredential(e.idToken),e.accessToken&&(t==null?void 0:t.accessToken)!==!1&&await this.saveAccessToken(e.accessToken),e.refreshToken&&(t==null?void 0:t.refreshToken)!==!1&&this.setRefreshTokenCredential(e.refreshToken),e.appMetadata&&this.setAppMetadata(e.appMetadata)}catch(h){throw(o=this.commonLogger)==null||o.error("CacheManager.saveCacheRecord: failed"),h instanceof Error?((a=this.commonLogger)==null||a.errorPii(`CacheManager.saveCacheRecord: ${h.message}`,r),h.name==="QuotaExceededError"||h.name==="NS_ERROR_DOM_QUOTA_REACHED"||h.message.includes("exceeded the quota")?((l=this.commonLogger)==null||l.error("CacheManager.saveCacheRecord: exceeded storage quota",r),new _a(Bw)):new _a(h.name,h.message)):((d=this.commonLogger)==null||d.errorPii(`CacheManager.saveCacheRecord: ${h}`,r),new _a(lm))}}async saveAccessToken(e){const t={clientId:e.clientId,credentialType:e.credentialType,environment:e.environment,homeAccountId:e.homeAccountId,realm:e.realm,tokenType:e.tokenType,requestedClaimsHash:e.requestedClaimsHash},r=this.getTokenKeys(),o=_t.fromString(e.target),a=[];r.accessToken.forEach(l=>{if(!this.accessTokenKeyMatchesFilter(l,t,!1))return;const d=this.getAccessTokenCredential(l);d&&this.credentialMatchesFilter(d,t)&&_t.fromString(d.target).intersectingScopeSets(o)&&a.push(this.removeAccessToken(l))}),await Promise.all(a),this.setAccessTokenCredential(e)}getAccountsFilteredBy(e){const t=this.getAccountKeys(),r=[];return t.forEach(o=>{var h;if(!this.isAccountKey(o,e.homeAccountId))return;const a=this.getAccount(o,this.commonLogger);if(!a||e.homeAccountId&&!this.matchHomeAccountId(a,e.homeAccountId)||e.username&&!this.matchUsername(a.username,e.username)||e.environment&&!this.matchEnvironment(a,e.environment)||e.realm&&!this.matchRealm(a,e.realm)||e.nativeAccountId&&!this.matchNativeAccountId(a,e.nativeAccountId)||e.authorityType&&!this.matchAuthorityType(a,e.authorityType))return;const l={localAccountId:e==null?void 0:e.localAccountId,name:e==null?void 0:e.name},d=(h=a.tenantProfiles)==null?void 0:h.filter(f=>this.tenantProfileMatchesFilter(f,l));d&&d.length===0||r.push(a)}),r}isAccountKey(e,t,r){return!(e.split(tn.CACHE_KEY_SEPARATOR).length<3||t&&!e.toLowerCase().includes(t.toLowerCase())||r&&!e.toLowerCase().includes(r.toLowerCase()))}isCredentialKey(e){if(e.split(tn.CACHE_KEY_SEPARATOR).length<6)return!1;const t=e.toLowerCase();if(t.indexOf(ge.ID_TOKEN.toLowerCase())===-1&&t.indexOf(ge.ACCESS_TOKEN.toLowerCase())===-1&&t.indexOf(ge.ACCESS_TOKEN_WITH_AUTH_SCHEME.toLowerCase())===-1&&t.indexOf(ge.REFRESH_TOKEN.toLowerCase())===-1)return!1;if(t.indexOf(ge.REFRESH_TOKEN.toLowerCase())>-1){const r=`${ge.REFRESH_TOKEN}${tn.CACHE_KEY_SEPARATOR}${this.clientId}${tn.CACHE_KEY_SEPARATOR}`,o=`${ge.REFRESH_TOKEN}${tn.CACHE_KEY_SEPARATOR}${Cs}${tn.CACHE_KEY_SEPARATOR}`;if(t.indexOf(r.toLowerCase())===-1&&t.indexOf(o.toLowerCase())===-1)return!1}else if(t.indexOf(this.clientId.toLowerCase())===-1)return!1;return!0}credentialMatchesFilter(e,t){return!(t.clientId&&!this.matchClientId(e,t.clientId)||t.userAssertionHash&&!this.matchUserAssertionHash(e,t.userAssertionHash)||typeof t.homeAccountId=="string"&&!this.matchHomeAccountId(e,t.homeAccountId)||t.environment&&!this.matchEnvironment(e,t.environment)||t.realm&&!this.matchRealm(e,t.realm)||t.credentialType&&!this.matchCredentialType(e,t.credentialType)||t.familyId&&!this.matchFamilyId(e,t.familyId)||t.target&&!this.matchTarget(e,t.target)||(t.requestedClaimsHash||e.requestedClaimsHash)&&e.requestedClaimsHash!==t.requestedClaimsHash||e.credentialType===ge.ACCESS_TOKEN_WITH_AUTH_SCHEME&&(t.tokenType&&!this.matchTokenType(e,t.tokenType)||t.tokenType===je.SSH&&t.keyId&&!this.matchKeyId(e,t.keyId)))}getAppMetadataFilteredBy(e){const t=this.getKeys(),r={};return t.forEach(o=>{if(!this.isAppMetadata(o))return;const a=this.getAppMetadata(o);a&&(e.environment&&!this.matchEnvironment(a,e.environment)||e.clientId&&!this.matchClientId(a,e.clientId)||(r[o]=a))}),r}getAuthorityMetadataByAlias(e){const t=this.getAuthorityMetadataKeys();let r=null;return t.forEach(o=>{if(!this.isAuthorityMetadata(o)||o.indexOf(this.clientId)===-1)return;const a=this.getAuthorityMetadata(o);a&&a.aliases.indexOf(e)!==-1&&(r=a)}),r}async removeAllAccounts(){const e=this.getAccountKeys(),t=[];e.forEach(r=>{t.push(this.removeAccount(r))}),await Promise.all(t)}async removeAccount(e){const t=this.getAccount(e,this.commonLogger);t&&(await this.removeAccountContext(t),this.removeItem(e))}async removeAccountContext(e){const t=this.getTokenKeys(),r=e.generateAccountId(),o=[];t.idToken.forEach(a=>{a.indexOf(r)===0&&this.removeIdToken(a)}),t.accessToken.forEach(a=>{a.indexOf(r)===0&&o.push(this.removeAccessToken(a))}),t.refreshToken.forEach(a=>{a.indexOf(r)===0&&this.removeRefreshToken(a)}),await Promise.all(o)}updateOutdatedCachedAccount(e,t,r){var o;if(t&&t.isSingleTenant()){(o=this.commonLogger)==null||o.verbose("updateOutdatedCachedAccount: Found a single-tenant (outdated) account entity in the cache, migrating to multi-tenant account entity");const a=this.getAccountKeys().filter(g=>g.startsWith(t.homeAccountId)),l=[];a.forEach(g=>{const _=this.getCachedAccountEntity(g);_&&l.push(_)});const d=l.find(g=>Dl(g.realm,g.homeAccountId))||l[0];d.tenantProfiles=l.map(g=>({tenantId:g.realm,localAccountId:g.localAccountId,name:g.name,isHomeTenant:Dl(g.realm,g.homeAccountId)}));const h=Sa.toObject(new Pt,{...d}),f=h.generateAccountKey();return a.forEach(g=>{g!==f&&this.removeOutdatedAccount(e)}),this.setAccount(h),r==null||r.verbose("Updated an outdated account entity in the cache"),h}return t}async removeAccessToken(e){const t=this.getAccessTokenCredential(e);if(t){if(t.credentialType.toLowerCase()===ge.ACCESS_TOKEN_WITH_AUTH_SCHEME.toLowerCase()&&t.tokenType===je.POP){const o=t.keyId;if(o)try{await this.cryptoImpl.removeTokenBindingKey(o)}catch{throw Y(gw)}}return this.removeItem(e)}}removeAppMetadata(){return this.getKeys().forEach(t=>{this.isAppMetadata(t)&&this.removeItem(t)}),!0}readAccountFromCache(e){const t=Pt.generateAccountCacheKey(e);return this.getAccount(t,this.commonLogger)}getIdToken(e,t,r,o,a){this.commonLogger.trace("CacheManager - getIdToken called");const l={homeAccountId:e.homeAccountId,environment:e.environment,credentialType:ge.ID_TOKEN,clientId:this.clientId,realm:r},d=this.getIdTokensByFilter(l,t),h=d.size;if(h<1)return this.commonLogger.info("CacheManager:getIdToken - No token found"),null;if(h>1){let f=d;if(!r){const g=new Map;d.forEach((p,w)=>{p.realm===e.tenantId&&g.set(w,p)});const _=g.size;if(_<1)return this.commonLogger.info("CacheManager:getIdToken - Multiple ID tokens found for account but none match account entity tenant id, returning first result"),d.values().next().value;if(_===1)return this.commonLogger.info("CacheManager:getIdToken - Multiple ID tokens found for account, defaulting to home tenant profile"),g.values().next().value;f=g}return this.commonLogger.info("CacheManager:getIdToken - Multiple matching ID tokens found, clearing them"),f.forEach((g,_)=>{this.removeIdToken(_)}),o&&a&&o.addFields({multiMatchedID:d.size},a),null}return this.commonLogger.info("CacheManager:getIdToken - Returning ID token"),d.values().next().value}getIdTokensByFilter(e,t){const r=t&&t.idToken||this.getTokenKeys().idToken,o=new Map;return r.forEach(a=>{if(!this.idTokenKeyMatchesFilter(a,{clientId:this.clientId,...e}))return;const l=this.getIdTokenCredential(a);l&&this.credentialMatchesFilter(l,e)&&o.set(a,l)}),o}idTokenKeyMatchesFilter(e,t){const r=e.toLowerCase();return!(t.clientId&&r.indexOf(t.clientId.toLowerCase())===-1||t.homeAccountId&&r.indexOf(t.homeAccountId.toLowerCase())===-1)}removeIdToken(e){this.removeItem(e)}removeRefreshToken(e){this.removeItem(e)}getAccessToken(e,t,r,o,a,l){this.commonLogger.trace("CacheManager - getAccessToken called");const d=_t.createSearchScopes(t.scopes),h=t.authenticationScheme||je.BEARER,f=h&&h.toLowerCase()!==je.BEARER.toLowerCase()?ge.ACCESS_TOKEN_WITH_AUTH_SCHEME:ge.ACCESS_TOKEN,g={homeAccountId:e.homeAccountId,environment:e.environment,credentialType:f,clientId:this.clientId,realm:o||e.tenantId,target:d,tokenType:h,keyId:t.sshKid,requestedClaimsHash:t.requestedClaimsHash},_=r&&r.accessToken||this.getTokenKeys().accessToken,p=[];_.forEach(C=>{if(this.accessTokenKeyMatchesFilter(C,g,!0)){const T=this.getAccessTokenCredential(C);T&&this.credentialMatchesFilter(T,g)&&p.push(T)}});const w=p.length;return w<1?(this.commonLogger.info("CacheManager:getAccessToken - No token found"),null):w>1?(this.commonLogger.info("CacheManager:getAccessToken - Multiple access tokens found, clearing them"),p.forEach(C=>{this.removeAccessToken(fa(C))}),a&&l&&a.addFields({multiMatchedAT:p.length},l),null):(this.commonLogger.info("CacheManager:getAccessToken - Returning access token"),p[0])}accessTokenKeyMatchesFilter(e,t,r){const o=e.toLowerCase();if(t.clientId&&o.indexOf(t.clientId.toLowerCase())===-1||t.homeAccountId&&o.indexOf(t.homeAccountId.toLowerCase())===-1||t.realm&&o.indexOf(t.realm.toLowerCase())===-1||t.requestedClaimsHash&&o.indexOf(t.requestedClaimsHash.toLowerCase())===-1)return!1;if(t.target){const a=t.target.asArray();for(let l=0;l<a.length;l++){if(r&&!o.includes(a[l].toLowerCase()))return!1;if(!r&&o.includes(a[l].toLowerCase()))return!0}}return!0}getAccessTokensByFilter(e){const t=this.getTokenKeys(),r=[];return t.accessToken.forEach(o=>{if(!this.accessTokenKeyMatchesFilter(o,e,!0))return;const a=this.getAccessTokenCredential(o);a&&this.credentialMatchesFilter(a,e)&&r.push(a)}),r}getRefreshToken(e,t,r,o,a){this.commonLogger.trace("CacheManager - getRefreshToken called");const l=t?Cs:void 0,d={homeAccountId:e.homeAccountId,environment:e.environment,credentialType:ge.REFRESH_TOKEN,clientId:this.clientId,familyId:l},h=r&&r.refreshToken||this.getTokenKeys().refreshToken,f=[];h.forEach(_=>{if(this.refreshTokenKeyMatchesFilter(_,d)){const p=this.getRefreshTokenCredential(_);p&&this.credentialMatchesFilter(p,d)&&f.push(p)}});const g=f.length;return g<1?(this.commonLogger.info("CacheManager:getRefreshToken - No refresh token found."),null):(g>1&&o&&a&&o.addFields({multiMatchedRT:g},a),this.commonLogger.info("CacheManager:getRefreshToken - returning refresh token"),f[0])}refreshTokenKeyMatchesFilter(e,t){const r=e.toLowerCase();return!(t.familyId&&r.indexOf(t.familyId.toLowerCase())===-1||!t.familyId&&t.clientId&&r.indexOf(t.clientId.toLowerCase())===-1||t.homeAccountId&&r.indexOf(t.homeAccountId.toLowerCase())===-1)}readAppMetadataFromCache(e){const t={environment:e,clientId:this.clientId},r=this.getAppMetadataFilteredBy(t),o=Object.keys(r).map(l=>r[l]),a=o.length;if(a<1)return null;if(a>1)throw Y(cw);return o[0]}isAppMetadataFOCI(e){const t=this.readAppMetadataFromCache(e);return!!(t&&t.familyId===Cs)}matchHomeAccountId(e,t){return typeof e.homeAccountId=="string"&&t===e.homeAccountId}matchLocalAccountIdFromTokenClaims(e,t){const r=e.oid||e.sub;return t===r}matchLocalAccountIdFromTenantProfile(e,t){return e.localAccountId===t}matchName(e,t){var r;return t.toLowerCase()===((r=e.name)==null?void 0:r.toLowerCase())}matchUsername(e,t){return!!(e&&typeof e=="string"&&(t==null?void 0:t.toLowerCase())===e.toLowerCase())}matchUserAssertionHash(e,t){return!!(e.userAssertionHash&&t===e.userAssertionHash)}matchEnvironment(e,t){if(this.staticAuthorityOptions){const o=OF(this.staticAuthorityOptions,this.commonLogger);if(o.includes(t)&&o.includes(e.environment))return!0}const r=this.getAuthorityMetadataByAlias(t);return!!(r&&r.aliases.indexOf(e.environment)>-1)}matchCredentialType(e,t){return e.credentialType&&t.toLowerCase()===e.credentialType.toLowerCase()}matchClientId(e,t){return!!(e.clientId&&t===e.clientId)}matchFamilyId(e,t){return!!(e.familyId&&t===e.familyId)}matchRealm(e,t){var r;return((r=e.realm)==null?void 0:r.toLowerCase())===t.toLowerCase()}matchNativeAccountId(e,t){return!!(e.nativeAccountId&&t===e.nativeAccountId)}matchLoginHintFromTokenClaims(e,t){return e.login_hint===t||e.preferred_username===t||e.upn===t}matchSid(e,t){return e.sid===t}matchAuthorityType(e,t){return!!(e.authorityType&&t.toLowerCase()===e.authorityType.toLowerCase())}matchTarget(e,t){return e.credentialType!==ge.ACCESS_TOKEN&&e.credentialType!==ge.ACCESS_TOKEN_WITH_AUTH_SCHEME||!e.target?!1:_t.fromString(e.target).containsScopeSet(t)}matchTokenType(e,t){return!!(e.tokenType&&e.tokenType===t)}matchKeyId(e,t){return!!(e.keyId&&e.keyId===t)}isAppMetadata(e){return e.indexOf(zf)!==-1}isAuthorityMetadata(e){return e.indexOf(Rl.CACHE_KEY)!==-1}generateAuthorityMetadataCacheKey(e){return`${Rl.CACHE_KEY}-${this.clientId}-${e}`}static toObject(e,t){for(const r in t)e[r]=t[r];return e}}class MF extends Sa{setAccount(){throw Y(Ae)}getAccount(){throw Y(Ae)}getCachedAccountEntity(){throw Y(Ae)}setIdTokenCredential(){throw Y(Ae)}getIdTokenCredential(){throw Y(Ae)}setAccessTokenCredential(){throw Y(Ae)}getAccessTokenCredential(){throw Y(Ae)}setRefreshTokenCredential(){throw Y(Ae)}getRefreshTokenCredential(){throw Y(Ae)}setAppMetadata(){throw Y(Ae)}getAppMetadata(){throw Y(Ae)}setServerTelemetry(){throw Y(Ae)}getServerTelemetry(){throw Y(Ae)}setAuthorityMetadata(){throw Y(Ae)}getAuthorityMetadata(){throw Y(Ae)}getAuthorityMetadataKeys(){throw Y(Ae)}setThrottlingCache(){throw Y(Ae)}getThrottlingCache(){throw Y(Ae)}removeItem(){throw Y(Ae)}getKeys(){throw Y(Ae)}getAccountKeys(){throw Y(Ae)}getTokenKeys(){throw Y(Ae)}updateCredentialCacheKey(){throw Y(Ae)}removeOutdatedAccount(){throw Y(Ae)}}/*! @azure/msal-common v14.16.0 2024-11-05 */const Vw={tokenRenewalOffsetSeconds:tF,preventCorsPreflight:!1},DF={loggerCallback:()=>{},piiLoggingEnabled:!1,logLevel:nt.Info,correlationId:V.EMPTY_STRING},LF={claimsBasedCachingEnabled:!1},xF={async sendGetRequestAsync(){throw Y(Ae)},async sendPostRequestAsync(){throw Y(Ae)}},UF={sku:V.SKU,version:Zf,cpu:V.EMPTY_STRING,os:V.EMPTY_STRING},BF={clientSecret:V.EMPTY_STRING,clientAssertion:void 0},VF={azureCloudInstance:em.None,tenant:`${V.DEFAULT_COMMON_TENANT}`},FF={application:{appName:"",appVersion:""}};function HF({authOptions:n,systemOptions:e,loggerOptions:t,cacheOptions:r,storageInterface:o,networkInterface:a,cryptoInterface:l,clientCredentials:d,libraryInfo:h,telemetry:f,serverTelemetryManager:g,persistencePlugin:_,serializableCache:p}){const w={...DF,...t};return{authOptions:$F(n),systemOptions:{...Vw,...e},loggerOptions:w,cacheOptions:{...LF,...r},storageInterface:o||new MF(n.clientId,Pl,new Wo(w)),networkInterface:a||xF,cryptoInterface:l||Pl,clientCredentials:d||BF,libraryInfo:{...UF,...h},telemetry:{...FF,...f},serverTelemetryManager:g||null,persistencePlugin:_||null,serializableCache:p||null}}function $F(n){return{clientCapabilities:[],azureCloudOptions:VF,skipAuthorityMetadataCache:!1,instanceAware:!1,...n}}function tf(n){return n.authOptions.authority.options.protocolMode===fo.OIDC}/*! @azure/msal-common v14.16.0 2024-11-05 */const Bn={HOME_ACCOUNT_ID:"home_account_id",UPN:"UPN"};/*! @azure/msal-common v14.16.0 2024-11-05 */const wi="client_id",Fw="redirect_uri",Qv="response_type",KF="response_mode",WF="grant_type",zF="claims",GF="scope",qF="refresh_token",jF="state",YF="nonce",JF="prompt",QF="code",XF="code_challenge",ZF="code_challenge_method",e2="code_verifier",t2="client-request-id",n2="x-client-SKU",r2="x-client-VER",o2="x-client-OS",i2="x-client-CPU",a2="x-client-current-telemetry",s2="x-client-last-telemetry",c2="x-ms-lib-capability",l2="x-app-name",u2="x-app-ver",d2="post_logout_redirect_uri",h2="id_token_hint",f2="device_code",m2="client_secret",g2="client_assertion",p2="client_assertion_type",Xv="token_type",Zv="req_cnf",_2="assertion",v2="requested_token_use",ey="return_spa_code",y2="nativebroker",C2="logout_hint",E2="sid",w2="login_hint",T2="domain_hint",b2="x-client-xtra-sku",um="brk_client_id",nf="brk_redirect_uri";/*! @azure/msal-common v14.16.0 2024-11-05 */class aa{static validateRedirectUri(e){if(!e)throw Ze(Cw)}static validatePrompt(e){const t=[];for(const r in Bt)t.push(Bt[r]);if(t.indexOf(e)<0)throw Ze(bw)}static validateClaims(e){try{JSON.parse(e)}catch{throw Ze(nm)}}static validateCodeChallengeParams(e,t){if(!e||!t)throw Ze(rm);this.validateCodeChallengeMethod(t)}static validateCodeChallengeMethod(e){if([Vv.PLAIN,Vv.S256].indexOf(e)<0)throw Ze(Aw)}}/*! @azure/msal-common v14.16.0 2024-11-05 */function I2(n,e,t){if(!e)return;const r=n.get(wi);r&&n.has(um)&&(t==null||t.addFields({embeddedClientId:r,embeddedRedirectUri:n.get(Fw)},e))}class ws{constructor(e,t){this.parameters=new Map,this.performanceClient=t,this.correlationId=e}addResponseTypeCode(){this.parameters.set(Qv,encodeURIComponent(V.CODE_RESPONSE_TYPE))}addResponseTypeForTokenAndIdToken(){this.parameters.set(Qv,encodeURIComponent(`${V.TOKEN_RESPONSE_TYPE} ${V.ID_TOKEN_RESPONSE_TYPE}`))}addResponseMode(e){this.parameters.set(KF,encodeURIComponent(e||XV.QUERY))}addNativeBroker(){this.parameters.set(y2,encodeURIComponent("1"))}addScopes(e,t=!0,r=Da){t&&!r.includes("openid")&&!e.includes("openid")&&r.push("openid");const o=t?[...e||[],...r]:e||[],a=new _t(o);this.parameters.set(GF,encodeURIComponent(a.printScopes()))}addClientId(e){this.parameters.set(wi,encodeURIComponent(e))}addRedirectUri(e){aa.validateRedirectUri(e),this.parameters.set(Fw,encodeURIComponent(e))}addPostLogoutRedirectUri(e){aa.validateRedirectUri(e),this.parameters.set(d2,encodeURIComponent(e))}addIdTokenHint(e){this.parameters.set(h2,encodeURIComponent(e))}addDomainHint(e){this.parameters.set(T2,encodeURIComponent(e))}addLoginHint(e){this.parameters.set(w2,encodeURIComponent(e))}addCcsUpn(e){this.parameters.set(dn.CCS_HEADER,encodeURIComponent(`UPN:${e}`))}addCcsOid(e){this.parameters.set(dn.CCS_HEADER,encodeURIComponent(`Oid:${e.uid}@${e.utid}`))}addSid(e){this.parameters.set(E2,encodeURIComponent(e))}addClaims(e,t){const r=this.addClientCapabilitiesToClaims(e,t);aa.validateClaims(r),this.parameters.set(zF,encodeURIComponent(r))}addCorrelationId(e){this.parameters.set(t2,encodeURIComponent(e))}addLibraryInfo(e){this.parameters.set(n2,e.sku),this.parameters.set(r2,e.version),e.os&&this.parameters.set(o2,e.os),e.cpu&&this.parameters.set(i2,e.cpu)}addApplicationTelemetry(e){e!=null&&e.appName&&this.parameters.set(l2,e.appName),e!=null&&e.appVersion&&this.parameters.set(u2,e.appVersion)}addPrompt(e){aa.validatePrompt(e),this.parameters.set(`${JF}`,encodeURIComponent(e))}addState(e){e&&this.parameters.set(jF,encodeURIComponent(e))}addNonce(e){this.parameters.set(YF,encodeURIComponent(e))}addCodeChallengeParams(e,t){if(aa.validateCodeChallengeParams(e,t),e&&t)this.parameters.set(XF,encodeURIComponent(e)),this.parameters.set(ZF,encodeURIComponent(t));else throw Ze(rm)}addAuthorizationCode(e){this.parameters.set(QF,encodeURIComponent(e))}addDeviceCode(e){this.parameters.set(f2,encodeURIComponent(e))}addRefreshToken(e){this.parameters.set(qF,encodeURIComponent(e))}addCodeVerifier(e){this.parameters.set(e2,encodeURIComponent(e))}addClientSecret(e){this.parameters.set(m2,encodeURIComponent(e))}addClientAssertion(e){e&&this.parameters.set(g2,encodeURIComponent(e))}addClientAssertionType(e){e&&this.parameters.set(p2,encodeURIComponent(e))}addOboAssertion(e){this.parameters.set(_2,encodeURIComponent(e))}addRequestTokenUse(e){this.parameters.set(v2,encodeURIComponent(e))}addGrantType(e){this.parameters.set(WF,encodeURIComponent(e))}addClientInfo(){this.parameters.set(ZV,"1")}addExtraQueryParameters(e){Object.entries(e).forEach(([t,r])=>{!this.parameters.has(t)&&r&&this.parameters.set(t,r)})}addClientCapabilitiesToClaims(e,t){let r;if(!e)r={};else try{r=JSON.parse(e)}catch{throw Ze(nm)}return t&&t.length>0&&(r.hasOwnProperty(qc.ACCESS_TOKEN)||(r[qc.ACCESS_TOKEN]={}),r[qc.ACCESS_TOKEN][qc.XMS_CC]={values:t}),JSON.stringify(r)}addUsername(e){this.parameters.set(Hv.username,encodeURIComponent(e))}addPassword(e){this.parameters.set(Hv.password,encodeURIComponent(e))}addPopToken(e){e&&(this.parameters.set(Xv,je.POP),this.parameters.set(Zv,encodeURIComponent(e)))}addSshJwk(e){e&&(this.parameters.set(Xv,je.SSH),this.parameters.set(Zv,encodeURIComponent(e)))}addServerTelemetry(e){this.parameters.set(a2,e.generateCurrentRequestHeaderValue()),this.parameters.set(s2,e.generateLastRequestHeaderValue())}addThrottling(){this.parameters.set(c2,Es.X_MS_LIB_CAPABILITY_VALUE)}addLogoutHint(e){this.parameters.set(C2,encodeURIComponent(e))}addBrokerParameters(e){const t={};t[um]=e.brokerClientId,t[nf]=e.brokerRedirectUri,this.addExtraQueryParameters(t)}createQueryString(){const e=new Array;return this.parameters.forEach((t,r)=>{e.push(`${r}=${t}`)}),I2(this.parameters,this.correlationId,this.performanceClient),e.join("&")}}/*! @azure/msal-common v14.16.0 2024-11-05 */function S2(n){return n.hasOwnProperty("authorization_endpoint")&&n.hasOwnProperty("token_endpoint")&&n.hasOwnProperty("issuer")&&n.hasOwnProperty("jwks_uri")}/*! @azure/msal-common v14.16.0 2024-11-05 */function A2(n){return n.hasOwnProperty("tenant_discovery_endpoint")&&n.hasOwnProperty("metadata")}/*! @azure/msal-common v14.16.0 2024-11-05 */function k2(n){return n.hasOwnProperty("error")&&n.hasOwnProperty("error_description")}/*! @azure/msal-common v14.16.0 2024-11-05 */const x={AcquireTokenByCode:"acquireTokenByCode",AcquireTokenByRefreshToken:"acquireTokenByRefreshToken",AcquireTokenSilent:"acquireTokenSilent",AcquireTokenSilentAsync:"acquireTokenSilentAsync",AcquireTokenPopup:"acquireTokenPopup",AcquireTokenPreRedirect:"acquireTokenPreRedirect",AcquireTokenRedirect:"acquireTokenRedirect",CryptoOptsGetPublicKeyThumbprint:"cryptoOptsGetPublicKeyThumbprint",CryptoOptsSignJwt:"cryptoOptsSignJwt",SilentCacheClientAcquireToken:"silentCacheClientAcquireToken",SilentIframeClientAcquireToken:"silentIframeClientAcquireToken",AwaitConcurrentIframe:"awaitConcurrentIframe",SilentRefreshClientAcquireToken:"silentRefreshClientAcquireToken",SsoSilent:"ssoSilent",StandardInteractionClientGetDiscoveredAuthority:"standardInteractionClientGetDiscoveredAuthority",FetchAccountIdWithNativeBroker:"fetchAccountIdWithNativeBroker",NativeInteractionClientAcquireToken:"nativeInteractionClientAcquireToken",BaseClientCreateTokenRequestHeaders:"baseClientCreateTokenRequestHeaders",NetworkClientSendPostRequestAsync:"networkClientSendPostRequestAsync",RefreshTokenClientExecutePostToTokenEndpoint:"refreshTokenClientExecutePostToTokenEndpoint",AuthorizationCodeClientExecutePostToTokenEndpoint:"authorizationCodeClientExecutePostToTokenEndpoint",BrokerHandhshake:"brokerHandshake",AcquireTokenByRefreshTokenInBroker:"acquireTokenByRefreshTokenInBroker",AcquireTokenByBroker:"acquireTokenByBroker",RefreshTokenClientExecuteTokenRequest:"refreshTokenClientExecuteTokenRequest",RefreshTokenClientAcquireToken:"refreshTokenClientAcquireToken",RefreshTokenClientAcquireTokenWithCachedRefreshToken:"refreshTokenClientAcquireTokenWithCachedRefreshToken",RefreshTokenClientAcquireTokenByRefreshToken:"refreshTokenClientAcquireTokenByRefreshToken",RefreshTokenClientCreateTokenRequestBody:"refreshTokenClientCreateTokenRequestBody",AcquireTokenFromCache:"acquireTokenFromCache",SilentFlowClientAcquireCachedToken:"silentFlowClientAcquireCachedToken",SilentFlowClientGenerateResultFromCacheRecord:"silentFlowClientGenerateResultFromCacheRecord",AcquireTokenBySilentIframe:"acquireTokenBySilentIframe",InitializeBaseRequest:"initializeBaseRequest",InitializeSilentRequest:"initializeSilentRequest",InitializeClientApplication:"initializeClientApplication",SilentIframeClientTokenHelper:"silentIframeClientTokenHelper",SilentHandlerInitiateAuthRequest:"silentHandlerInitiateAuthRequest",SilentHandlerMonitorIframeForHash:"silentHandlerMonitorIframeForHash",SilentHandlerLoadFrame:"silentHandlerLoadFrame",SilentHandlerLoadFrameSync:"silentHandlerLoadFrameSync",StandardInteractionClientCreateAuthCodeClient:"standardInteractionClientCreateAuthCodeClient",StandardInteractionClientGetClientConfiguration:"standardInteractionClientGetClientConfiguration",StandardInteractionClientInitializeAuthorizationRequest:"standardInteractionClientInitializeAuthorizationRequest",StandardInteractionClientInitializeAuthorizationCodeRequest:"standardInteractionClientInitializeAuthorizationCodeRequest",GetAuthCodeUrl:"getAuthCodeUrl",HandleCodeResponseFromServer:"handleCodeResponseFromServer",HandleCodeResponse:"handleCodeResponse",UpdateTokenEndpointAuthority:"updateTokenEndpointAuthority",AuthClientAcquireToken:"authClientAcquireToken",AuthClientExecuteTokenRequest:"authClientExecuteTokenRequest",AuthClientCreateTokenRequestBody:"authClientCreateTokenRequestBody",AuthClientCreateQueryString:"authClientCreateQueryString",PopTokenGenerateCnf:"popTokenGenerateCnf",PopTokenGenerateKid:"popTokenGenerateKid",HandleServerTokenResponse:"handleServerTokenResponse",DeserializeResponse:"deserializeResponse",AuthorityFactoryCreateDiscoveredInstance:"authorityFactoryCreateDiscoveredInstance",AuthorityResolveEndpointsAsync:"authorityResolveEndpointsAsync",AuthorityResolveEndpointsFromLocalSources:"authorityResolveEndpointsFromLocalSources",AuthorityGetCloudDiscoveryMetadataFromNetwork:"authorityGetCloudDiscoveryMetadataFromNetwork",AuthorityUpdateCloudDiscoveryMetadata:"authorityUpdateCloudDiscoveryMetadata",AuthorityGetEndpointMetadataFromNetwork:"authorityGetEndpointMetadataFromNetwork",AuthorityUpdateEndpointMetadata:"authorityUpdateEndpointMetadata",AuthorityUpdateMetadataWithRegionalInformation:"authorityUpdateMetadataWithRegionalInformation",RegionDiscoveryDetectRegion:"regionDiscoveryDetectRegion",RegionDiscoveryGetRegionFromIMDS:"regionDiscoveryGetRegionFromIMDS",RegionDiscoveryGetCurrentVersion:"regionDiscoveryGetCurrentVersion",AcquireTokenByCodeAsync:"acquireTokenByCodeAsync",GetEndpointMetadataFromNetwork:"getEndpointMetadataFromNetwork",GetCloudDiscoveryMetadataFromNetworkMeasurement:"getCloudDiscoveryMetadataFromNetworkMeasurement",HandleRedirectPromiseMeasurement:"handleRedirectPromise",HandleNativeRedirectPromiseMeasurement:"handleNativeRedirectPromise",UpdateCloudDiscoveryMetadataMeasurement:"updateCloudDiscoveryMetadataMeasurement",UsernamePasswordClientAcquireToken:"usernamePasswordClientAcquireToken",NativeMessageHandlerHandshake:"nativeMessageHandlerHandshake",NativeGenerateAuthResult:"nativeGenerateAuthResult",RemoveHiddenIframe:"removeHiddenIframe",ClearTokensAndKeysWithClaims:"clearTokensAndKeysWithClaims",CacheManagerGetRefreshToken:"cacheManagerGetRefreshToken",GeneratePkceCodes:"generatePkceCodes",GenerateCodeVerifier:"generateCodeVerifier",GenerateCodeChallengeFromVerifier:"generateCodeChallengeFromVerifier",Sha256Digest:"sha256Digest",GetRandomValues:"getRandomValues"},N2={NotStarted:0,InProgress:1,Completed:2};/*! @azure/msal-common v14.16.0 2024-11-05 */const ki=(n,e,t,r,o)=>(...a)=>{t.trace(`Executing function ${e}`);const l=r==null?void 0:r.startMeasurement(e,o);if(o){const d=e+"CallCount";r==null||r.incrementFields({[d]:1},o)}try{const d=n(...a);return l==null||l.end({success:!0}),t.trace(`Returning result from ${e}`),d}catch(d){t.trace(`Error occurred in ${e}`);try{t.trace(JSON.stringify(d))}catch{t.trace("Unable to print error message.")}throw l==null||l.end({success:!1},d),d}},Q=(n,e,t,r,o)=>(...a)=>{t.trace(`Executing function ${e}`);const l=r==null?void 0:r.startMeasurement(e,o);if(o){const d=e+"CallCount";r==null||r.incrementFields({[d]:1},o)}return r==null||r.setPreQueueTime(e,o),n(...a).then(d=>(t.trace(`Returning result from ${e}`),l==null||l.end({success:!0}),d)).catch(d=>{t.trace(`Error occurred in ${e}`);try{t.trace(JSON.stringify(d))}catch{t.trace("Unable to print error message.")}throw l==null||l.end({success:!1},d),d})};/*! @azure/msal-common v14.16.0 2024-11-05 */class du{constructor(e,t,r,o){this.networkInterface=e,this.logger=t,this.performanceClient=r,this.correlationId=o}async detectRegion(e,t){var o;(o=this.performanceClient)==null||o.addQueueMeasurement(x.RegionDiscoveryDetectRegion,this.correlationId);let r=e;if(r)t.region_source=Ji.ENVIRONMENT_VARIABLE;else{const a=du.IMDS_OPTIONS;try{const l=await Q(this.getRegionFromIMDS.bind(this),x.RegionDiscoveryGetRegionFromIMDS,this.logger,this.performanceClient,this.correlationId)(V.IMDS_VERSION,a);if(l.status===Yc.httpSuccess&&(r=l.body,t.region_source=Ji.IMDS),l.status===Yc.httpBadRequest){const d=await Q(this.getCurrentVersion.bind(this),x.RegionDiscoveryGetCurrentVersion,this.logger,this.performanceClient,this.correlationId)(a);if(!d)return t.region_source=Ji.FAILED_AUTO_DETECTION,null;const h=await Q(this.getRegionFromIMDS.bind(this),x.RegionDiscoveryGetRegionFromIMDS,this.logger,this.performanceClient,this.correlationId)(d,a);h.status===Yc.httpSuccess&&(r=h.body,t.region_source=Ji.IMDS)}}catch{return t.region_source=Ji.FAILED_AUTO_DETECTION,null}}return r||(t.region_source=Ji.FAILED_AUTO_DETECTION),r||null}async getRegionFromIMDS(e,t){var r;return(r=this.performanceClient)==null||r.addQueueMeasurement(x.RegionDiscoveryGetRegionFromIMDS,this.correlationId),this.networkInterface.sendGetRequestAsync(`${V.IMDS_ENDPOINT}?api-version=${e}&format=text`,t,V.IMDS_TIMEOUT)}async getCurrentVersion(e){var t;(t=this.performanceClient)==null||t.addQueueMeasurement(x.RegionDiscoveryGetCurrentVersion,this.correlationId);try{const r=await this.networkInterface.sendGetRequestAsync(`${V.IMDS_ENDPOINT}?format=json`,e);return r.status===Yc.httpBadRequest&&r.body&&r.body["newest-versions"]&&r.body["newest-versions"].length>0?r.body["newest-versions"][0]:null}catch{return null}}}du.IMDS_OPTIONS={headers:{Metadata:"true"}};/*! @azure/msal-common v14.16.0 2024-11-05 */class Xt{constructor(e,t,r,o,a,l,d,h){this.canonicalAuthority=e,this._canonicalAuthority.validateAsUri(),this.networkInterface=t,this.cacheManager=r,this.authorityOptions=o,this.regionDiscoveryMetadata={region_used:void 0,region_source:void 0,region_outcome:void 0},this.logger=a,this.performanceClient=d,this.correlationId=l,this.managedIdentity=h||!1,this.regionDiscovery=new du(t,this.logger,this.performanceClient,this.correlationId)}getAuthorityType(e){if(e.HostNameAndPort.endsWith(V.CIAM_AUTH_URL))return pr.Ciam;const t=e.PathSegments;if(t.length)switch(t[0].toLowerCase()){case V.ADFS:return pr.Adfs;case V.DSTS:return pr.Dsts}return pr.Default}get authorityType(){return this.getAuthorityType(this.canonicalAuthorityUrlComponents)}get protocolMode(){return this.authorityOptions.protocolMode}get options(){return this.authorityOptions}get canonicalAuthority(){return this._canonicalAuthority.urlString}set canonicalAuthority(e){this._canonicalAuthority=new De(e),this._canonicalAuthority.validateAsUri(),this._canonicalAuthorityUrlComponents=null}get canonicalAuthorityUrlComponents(){return this._canonicalAuthorityUrlComponents||(this._canonicalAuthorityUrlComponents=this._canonicalAuthority.getUrlComponents()),this._canonicalAuthorityUrlComponents}get hostnameAndPort(){return this.canonicalAuthorityUrlComponents.HostNameAndPort.toLowerCase()}get tenant(){return this.canonicalAuthorityUrlComponents.PathSegments[0]}get authorizationEndpoint(){if(this.discoveryComplete())return this.replacePath(this.metadata.authorization_endpoint);throw Y(ao)}get tokenEndpoint(){if(this.discoveryComplete())return this.replacePath(this.metadata.token_endpoint);throw Y(ao)}get deviceCodeEndpoint(){if(this.discoveryComplete())return this.replacePath(this.metadata.token_endpoint.replace("/token","/devicecode"));throw Y(ao)}get endSessionEndpoint(){if(this.discoveryComplete()){if(!this.metadata.end_session_endpoint)throw Y(pw);return this.replacePath(this.metadata.end_session_endpoint)}else throw Y(ao)}get selfSignedJwtAudience(){if(this.discoveryComplete())return this.replacePath(this.metadata.issuer);throw Y(ao)}get jwksUri(){if(this.discoveryComplete())return this.replacePath(this.metadata.jwks_uri);throw Y(ao)}canReplaceTenant(e){return e.PathSegments.length===1&&!Xt.reservedTenantDomains.has(e.PathSegments[0])&&this.getAuthorityType(e)===pr.Default&&this.protocolMode===fo.AAD}replaceTenant(e){return e.replace(/{tenant}|{tenantid}/g,this.tenant)}replacePath(e){let t=e;const o=new De(this.metadata.canonical_authority).getUrlComponents(),a=o.PathSegments;return this.canonicalAuthorityUrlComponents.PathSegments.forEach((d,h)=>{let f=a[h];if(h===0&&this.canReplaceTenant(o)){const g=new De(this.metadata.authorization_endpoint).getUrlComponents().PathSegments[0];f!==g&&(this.logger.verbose(`Replacing tenant domain name ${f} with id ${g}`),f=g)}d!==f&&(t=t.replace(`/${f}/`,`/${d}/`))}),this.replaceTenant(t)}get defaultOpenIdConfigurationEndpoint(){const e=this.hostnameAndPort;return this.canonicalAuthority.endsWith("v2.0/")||this.authorityType===pr.Adfs||this.protocolMode!==fo.AAD&&!this.isAliasOfKnownMicrosoftAuthority(e)?`${this.canonicalAuthority}.well-known/openid-configuration`:`${this.canonicalAuthority}v2.0/.well-known/openid-configuration`}discoveryComplete(){return!!this.metadata}async resolveEndpointsAsync(){var o,a;(o=this.performanceClient)==null||o.addQueueMeasurement(x.AuthorityResolveEndpointsAsync,this.correlationId);const e=this.getCurrentMetadataEntity(),t=await Q(this.updateCloudDiscoveryMetadata.bind(this),x.AuthorityUpdateCloudDiscoveryMetadata,this.logger,this.performanceClient,this.correlationId)(e);this.canonicalAuthority=this.canonicalAuthority.replace(this.hostnameAndPort,e.preferred_network);const r=await Q(this.updateEndpointMetadata.bind(this),x.AuthorityUpdateEndpointMetadata,this.logger,this.performanceClient,this.correlationId)(e);this.updateCachedMetadata(e,t,{source:r}),(a=this.performanceClient)==null||a.addFields({cloudDiscoverySource:t,authorityEndpointSource:r},this.correlationId)}getCurrentMetadataEntity(){let e=this.cacheManager.getAuthorityMetadataByAlias(this.hostnameAndPort);return e||(e={aliases:[],preferred_cache:this.hostnameAndPort,preferred_network:this.hostnameAndPort,canonical_authority:this.canonicalAuthority,authorization_endpoint:"",token_endpoint:"",end_session_endpoint:"",issuer:"",aliasesFromNetwork:!1,endpointsFromNetwork:!1,expiresAt:qv(),jwks_uri:""}),e}updateCachedMetadata(e,t,r){t!==On.CACHE&&(r==null?void 0:r.source)!==On.CACHE&&(e.expiresAt=qv(),e.canonical_authority=this.canonicalAuthority);const o=this.cacheManager.generateAuthorityMetadataCacheKey(e.preferred_cache);this.cacheManager.setAuthorityMetadata(o,e),this.metadata=e}async updateEndpointMetadata(e){var o,a,l;(o=this.performanceClient)==null||o.addQueueMeasurement(x.AuthorityUpdateEndpointMetadata,this.correlationId);const t=this.updateEndpointMetadataFromLocalSources(e);if(t){if(t.source===On.HARDCODED_VALUES&&(a=this.authorityOptions.azureRegionConfiguration)!=null&&a.azureRegion&&t.metadata){const d=await Q(this.updateMetadataWithRegionalInformation.bind(this),x.AuthorityUpdateMetadataWithRegionalInformation,this.logger,this.performanceClient,this.correlationId)(t.metadata);Jc(e,d,!1),e.canonical_authority=this.canonicalAuthority}return t.source}let r=await Q(this.getEndpointMetadataFromNetwork.bind(this),x.AuthorityGetEndpointMetadataFromNetwork,this.logger,this.performanceClient,this.correlationId)();if(r)return(l=this.authorityOptions.azureRegionConfiguration)!=null&&l.azureRegion&&(r=await Q(this.updateMetadataWithRegionalInformation.bind(this),x.AuthorityUpdateMetadataWithRegionalInformation,this.logger,this.performanceClient,this.correlationId)(r)),Jc(e,r,!0),On.NETWORK;throw Y(rw,this.defaultOpenIdConfigurationEndpoint)}updateEndpointMetadataFromLocalSources(e){this.logger.verbose("Attempting to get endpoint metadata from authority configuration");const t=this.getEndpointMetadataFromConfig();if(t)return this.logger.verbose("Found endpoint metadata in authority configuration"),Jc(e,t,!1),{source:On.CONFIG};if(this.logger.verbose("Did not find endpoint metadata in the config... Attempting to get endpoint metadata from the hardcoded values."),this.authorityOptions.skipAuthorityMetadataCache)this.logger.verbose("Skipping hardcoded metadata cache since skipAuthorityMetadataCache is set to true. Attempting to get endpoint metadata from the network metadata cache.");else{const o=this.getEndpointMetadataFromHardcodedValues();if(o)return Jc(e,o,!1),{source:On.HARDCODED_VALUES,metadata:o};this.logger.verbose("Did not find endpoint metadata in hardcoded values... Attempting to get endpoint metadata from the network metadata cache.")}const r=jv(e);return this.isAuthoritySameType(e)&&e.endpointsFromNetwork&&!r?(this.logger.verbose("Found endpoint metadata in the cache."),{source:On.CACHE}):(r&&this.logger.verbose("The metadata entity is expired."),null)}isAuthoritySameType(e){return new De(e.canonical_authority).getUrlComponents().PathSegments.length===this.canonicalAuthorityUrlComponents.PathSegments.length}getEndpointMetadataFromConfig(){if(this.authorityOptions.authorityMetadata)try{return JSON.parse(this.authorityOptions.authorityMetadata)}catch{throw Ze(kw)}return null}async getEndpointMetadataFromNetwork(){var r;(r=this.performanceClient)==null||r.addQueueMeasurement(x.AuthorityGetEndpointMetadataFromNetwork,this.correlationId);const e={},t=this.defaultOpenIdConfigurationEndpoint;this.logger.verbose(`Authority.getEndpointMetadataFromNetwork: attempting to retrieve OAuth endpoints from ${t}`);try{const o=await this.networkInterface.sendGetRequestAsync(t,e);return S2(o.body)?o.body:(this.logger.verbose("Authority.getEndpointMetadataFromNetwork: could not parse response as OpenID configuration"),null)}catch(o){return this.logger.verbose(`Authority.getEndpointMetadataFromNetwork: ${o}`),null}}getEndpointMetadataFromHardcodedValues(){return this.hostnameAndPort in Yv?Yv[this.hostnameAndPort]:null}async updateMetadataWithRegionalInformation(e){var r,o,a;(r=this.performanceClient)==null||r.addQueueMeasurement(x.AuthorityUpdateMetadataWithRegionalInformation,this.correlationId);const t=(o=this.authorityOptions.azureRegionConfiguration)==null?void 0:o.azureRegion;if(t){if(t!==V.AZURE_REGION_AUTO_DISCOVER_FLAG)return this.regionDiscoveryMetadata.region_outcome=ah.CONFIGURED_NO_AUTO_DETECTION,this.regionDiscoveryMetadata.region_used=t,Xt.replaceWithRegionalInformation(e,t);const l=await Q(this.regionDiscovery.detectRegion.bind(this.regionDiscovery),x.RegionDiscoveryDetectRegion,this.logger,this.performanceClient,this.correlationId)((a=this.authorityOptions.azureRegionConfiguration)==null?void 0:a.environmentRegion,this.regionDiscoveryMetadata);if(l)return this.regionDiscoveryMetadata.region_outcome=ah.AUTO_DETECTION_REQUESTED_SUCCESSFUL,this.regionDiscoveryMetadata.region_used=l,Xt.replaceWithRegionalInformation(e,l);this.regionDiscoveryMetadata.region_outcome=ah.AUTO_DETECTION_REQUESTED_FAILED}return e}async updateCloudDiscoveryMetadata(e){var o;(o=this.performanceClient)==null||o.addQueueMeasurement(x.AuthorityUpdateCloudDiscoveryMetadata,this.correlationId);const t=this.updateCloudDiscoveryMetadataFromLocalSources(e);if(t)return t;const r=await Q(this.getCloudDiscoveryMetadataFromNetwork.bind(this),x.AuthorityGetCloudDiscoveryMetadataFromNetwork,this.logger,this.performanceClient,this.correlationId)();if(r)return sh(e,r,!0),On.NETWORK;throw Ze(Nw)}updateCloudDiscoveryMetadataFromLocalSources(e){this.logger.verbose("Attempting to get cloud discovery metadata from authority configuration"),this.logger.verbosePii(`Known Authorities: ${this.authorityOptions.knownAuthorities||V.NOT_APPLICABLE}`),this.logger.verbosePii(`Authority Metadata: ${this.authorityOptions.authorityMetadata||V.NOT_APPLICABLE}`),this.logger.verbosePii(`Canonical Authority: ${e.canonical_authority||V.NOT_APPLICABLE}`);const t=this.getCloudDiscoveryMetadataFromConfig();if(t)return this.logger.verbose("Found cloud discovery metadata in authority configuration"),sh(e,t,!1),On.CONFIG;if(this.logger.verbose("Did not find cloud discovery metadata in the config... Attempting to get cloud discovery metadata from the hardcoded values."),this.options.skipAuthorityMetadataCache)this.logger.verbose("Skipping hardcoded cloud discovery metadata cache since skipAuthorityMetadataCache is set to true. Attempting to get cloud discovery metadata from the network metadata cache.");else{const o=PF(this.hostnameAndPort);if(o)return this.logger.verbose("Found cloud discovery metadata from hardcoded values."),sh(e,o,!1),On.HARDCODED_VALUES;this.logger.verbose("Did not find cloud discovery metadata in hardcoded values... Attempting to get cloud discovery metadata from the network metadata cache.")}const r=jv(e);return this.isAuthoritySameType(e)&&e.aliasesFromNetwork&&!r?(this.logger.verbose("Found cloud discovery metadata in the cache."),On.CACHE):(r&&this.logger.verbose("The metadata entity is expired."),null)}getCloudDiscoveryMetadataFromConfig(){if(this.authorityType===pr.Ciam)return this.logger.verbose("CIAM authorities do not support cloud discovery metadata, generate the aliases from authority host."),Xt.createCloudDiscoveryMetadataFromHost(this.hostnameAndPort);if(this.authorityOptions.cloudDiscoveryMetadata){this.logger.verbose("The cloud discovery metadata has been provided as a network response, in the config.");try{this.logger.verbose("Attempting to parse the cloud discovery metadata.");const e=JSON.parse(this.authorityOptions.cloudDiscoveryMetadata),t=xl(e.metadata,this.hostnameAndPort);if(this.logger.verbose("Parsed the cloud discovery metadata."),t)return this.logger.verbose("There is returnable metadata attached to the parsed cloud discovery metadata."),t;this.logger.verbose("There is no metadata attached to the parsed cloud discovery metadata.")}catch{throw this.logger.verbose("Unable to parse the cloud discovery metadata. Throwing Invalid Cloud Discovery Metadata Error."),Ze(om)}}return this.isInKnownAuthorities()?(this.logger.verbose("The host is included in knownAuthorities. Creating new cloud discovery metadata from the host."),Xt.createCloudDiscoveryMetadataFromHost(this.hostnameAndPort)):null}async getCloudDiscoveryMetadataFromNetwork(){var o;(o=this.performanceClient)==null||o.addQueueMeasurement(x.AuthorityGetCloudDiscoveryMetadataFromNetwork,this.correlationId);const e=`${V.AAD_INSTANCE_DISCOVERY_ENDPT}${this.canonicalAuthority}oauth2/v2.0/authorize`,t={};let r=null;try{const a=await this.networkInterface.sendGetRequestAsync(e,t);let l,d;if(A2(a.body))l=a.body,d=l.metadata,this.logger.verbosePii(`tenant_discovery_endpoint is: ${l.tenant_discovery_endpoint}`);else if(k2(a.body)){if(this.logger.warning(`A CloudInstanceDiscoveryErrorResponse was returned. The cloud instance discovery network request's status code is: ${a.status}`),l=a.body,l.error===V.INVALID_INSTANCE)return this.logger.error("The CloudInstanceDiscoveryErrorResponse error is invalid_instance."),null;this.logger.warning(`The CloudInstanceDiscoveryErrorResponse error is ${l.error}`),this.logger.warning(`The CloudInstanceDiscoveryErrorResponse error description is ${l.error_description}`),this.logger.warning("Setting the value of the CloudInstanceDiscoveryMetadata (returned from the network) to []"),d=[]}else return this.logger.error("AAD did not return a CloudInstanceDiscoveryResponse or CloudInstanceDiscoveryErrorResponse"),null;this.logger.verbose("Attempting to find a match between the developer's authority and the CloudInstanceDiscoveryMetadata returned from the network request."),r=xl(d,this.hostnameAndPort)}catch(a){if(a instanceof lt)this.logger.error(`There was a network error while attempting to get the cloud discovery instance metadata.
|
107
|
+
*/var eF=zs("filled","caret-right-filled","IconCaretRightFilled",[["path",{d:"M9 6c0 -.852 .986 -1.297 1.623 -.783l.084 .076l6 6a1 1 0 0 1 .083 1.32l-.083 .094l-6 6l-.094 .083l-.077 .054l-.096 .054l-.036 .017l-.067 .027l-.108 .032l-.053 .01l-.06 .01l-.057 .004l-.059 .002l-.059 -.002l-.058 -.005l-.06 -.009l-.052 -.01l-.108 -.032l-.067 -.027l-.132 -.07l-.09 -.065l-.081 -.073l-.083 -.094l-.054 -.077l-.054 -.096l-.017 -.036l-.027 -.067l-.032 -.108l-.01 -.053l-.01 -.06l-.004 -.057l-.002 -12.059z",key:"svg-0"}]]);/*! @azure/msal-common v14.16.0 2024-11-05 */const V={LIBRARY_NAME:"MSAL.JS",SKU:"msal.js.common",CACHE_PREFIX:"msal",DEFAULT_AUTHORITY:"https://login.microsoftonline.com/common/",DEFAULT_AUTHORITY_HOST:"login.microsoftonline.com",DEFAULT_COMMON_TENANT:"common",ADFS:"adfs",DSTS:"dstsv2",AAD_INSTANCE_DISCOVERY_ENDPT:"https://login.microsoftonline.com/common/discovery/instance?api-version=1.1&authorization_endpoint=",CIAM_AUTH_URL:".ciamlogin.com",AAD_TENANT_DOMAIN_SUFFIX:".onmicrosoft.com",RESOURCE_DELIM:"|",NO_ACCOUNT:"NO_ACCOUNT",CLAIMS:"claims",CONSUMER_UTID:"9188040d-6c67-4c5b-b112-36a304b66dad",OPENID_SCOPE:"openid",PROFILE_SCOPE:"profile",OFFLINE_ACCESS_SCOPE:"offline_access",EMAIL_SCOPE:"email",CODE_RESPONSE_TYPE:"code",CODE_GRANT_TYPE:"authorization_code",RT_GRANT_TYPE:"refresh_token",FRAGMENT_RESPONSE_MODE:"fragment",S256_CODE_CHALLENGE_METHOD:"S256",URL_FORM_CONTENT_TYPE:"application/x-www-form-urlencoded;charset=utf-8",AUTHORIZATION_PENDING:"authorization_pending",NOT_DEFINED:"not_defined",EMPTY_STRING:"",NOT_APPLICABLE:"N/A",NOT_AVAILABLE:"Not Available",FORWARD_SLASH:"/",IMDS_ENDPOINT:"http://169.254.169.254/metadata/instance/compute/location",IMDS_VERSION:"2020-06-01",IMDS_TIMEOUT:2e3,AZURE_REGION_AUTO_DISCOVER_FLAG:"TryAutoDetect",REGIONAL_AUTH_PUBLIC_CLOUD_SUFFIX:"login.microsoft.com",KNOWN_PUBLIC_CLOUDS:["login.microsoftonline.com","login.windows.net","login.microsoft.com","sts.windows.net"],TOKEN_RESPONSE_TYPE:"token",ID_TOKEN_RESPONSE_TYPE:"id_token",SHR_NONCE_VALIDITY:240,INVALID_INSTANCE:"invalid_instance"},Gc={SUCCESS:200,SUCCESS_RANGE_START:200,SUCCESS_RANGE_END:299,REDIRECT:302,CLIENT_ERROR:400,CLIENT_ERROR_RANGE_START:400,BAD_REQUEST:400,UNAUTHORIZED:401,NOT_FOUND:404,REQUEST_TIMEOUT:408,TOO_MANY_REQUESTS:429,CLIENT_ERROR_RANGE_END:499,SERVER_ERROR:500,SERVER_ERROR_RANGE_START:500,SERVICE_UNAVAILABLE:503,GATEWAY_TIMEOUT:504,SERVER_ERROR_RANGE_END:599,MULTI_SIDED_ERROR:600},Da=[V.OPENID_SCOPE,V.PROFILE_SCOPE,V.OFFLINE_ACCESS_SCOPE],Bv=[...Da,V.EMAIL_SCOPE],dn={CONTENT_TYPE:"Content-Type",CONTENT_LENGTH:"Content-Length",RETRY_AFTER:"Retry-After",CCS_HEADER:"X-AnchorMailbox",WWWAuthenticate:"WWW-Authenticate",AuthenticationInfo:"Authentication-Info",X_MS_REQUEST_ID:"x-ms-request-id",X_MS_HTTP_VERSION:"x-ms-httpver"},Lt={ID_TOKEN:"idtoken",CLIENT_INFO:"client.info",ADAL_ID_TOKEN:"adal.idtoken",ERROR:"error",ERROR_DESC:"error.description",ACTIVE_ACCOUNT:"active-account",ACTIVE_ACCOUNT_FILTERS:"active-account-filters"},$o={COMMON:"common",ORGANIZATIONS:"organizations",CONSUMERS:"consumers"},qc={ACCESS_TOKEN:"access_token",XMS_CC:"xms_cc"},Bt={LOGIN:"login",SELECT_ACCOUNT:"select_account",CONSENT:"consent",NONE:"none",CREATE:"create",NO_SESSION:"no_session"},Vv={PLAIN:"plain",S256:"S256"},Gs={QUERY:"query",FRAGMENT:"fragment"},tF={...Gs,FORM_POST:"form_post"},ZE={IMPLICIT_GRANT:"implicit",AUTHORIZATION_CODE_GRANT:"authorization_code",CLIENT_CREDENTIALS_GRANT:"client_credentials",RESOURCE_OWNER_PASSWORD_GRANT:"password",REFRESH_TOKEN_GRANT:"refresh_token",DEVICE_CODE_GRANT:"device_code",JWT_BEARER:"urn:ietf:params:oauth:grant-type:jwt-bearer"},jc={MSSTS_ACCOUNT_TYPE:"MSSTS",ADFS_ACCOUNT_TYPE:"ADFS",MSAV1_ACCOUNT_TYPE:"MSA",GENERIC_ACCOUNT_TYPE:"Generic"},tn={CACHE_KEY_SEPARATOR:"-",CLIENT_INFO_SEPARATOR:"."},ge={ID_TOKEN:"IdToken",ACCESS_TOKEN:"AccessToken",ACCESS_TOKEN_WITH_AUTH_SCHEME:"AccessToken_With_AuthScheme",REFRESH_TOKEN:"RefreshToken"},zf="appmetadata",nF="client_info",Cs="1",Rl={CACHE_KEY:"authority-metadata",REFRESH_TIME_SECONDS:3600*24},On={CONFIG:"config",CACHE:"cache",NETWORK:"network",HARDCODED_VALUES:"hardcoded_values"},Wt={SCHEMA_VERSION:5,MAX_CUR_HEADER_BYTES:80,MAX_LAST_HEADER_BYTES:330,MAX_CACHED_ERRORS:50,CACHE_KEY:"server-telemetry",CATEGORY_SEPARATOR:"|",VALUE_SEPARATOR:",",OVERFLOW_TRUE:"1",OVERFLOW_FALSE:"0",UNKNOWN_ERROR:"unknown_error"},je={BEARER:"Bearer",POP:"pop",SSH:"ssh-cert"},Es={DEFAULT_THROTTLE_TIME_SECONDS:60,DEFAULT_MAX_THROTTLE_TIME_SECONDS:3600,THROTTLING_PREFIX:"throttling",X_MS_LIB_CAPABILITY_VALUE:"retry-after, h429"},Fv={INVALID_GRANT_ERROR:"invalid_grant",CLIENT_MISMATCH_ERROR:"client_mismatch"},Hv={username:"username",password:"password"},Yc={httpSuccess:200,httpBadRequest:400},Qi={FAILED_AUTO_DETECTION:"1",INTERNAL_CACHE:"2",ENVIRONMENT_VARIABLE:"3",IMDS:"4"},ah={CONFIGURED_MATCHES_DETECTED:"1",CONFIGURED_NO_AUTO_DETECTION:"2",CONFIGURED_NOT_DETECTED:"3",AUTO_DETECTION_REQUESTED_SUCCESSFUL:"4",AUTO_DETECTION_REQUESTED_FAILED:"5"},Do={NOT_APPLICABLE:"0",FORCE_REFRESH_OR_CLAIMS:"1",NO_CACHED_ACCESS_TOKEN:"2",CACHED_ACCESS_TOKEN_EXPIRED:"3",PROACTIVELY_REFRESHED:"4"},rF={Jwt:"JWT",Jwk:"JWK",Pop:"pop"},oF=300;/*! @azure/msal-common v14.16.0 2024-11-05 */const Gf="unexpected_error",iF="post_request_failed";/*! @azure/msal-common v14.16.0 2024-11-05 */const $v={[Gf]:"Unexpected error in authentication.",[iF]:"Post request failed from the network, could be a 4xx/5xx or a network unavailability. Please check the exact error code for details."};class lt extends Error{constructor(e,t,r){const o=t?`${e}: ${t}`:e;super(o),Object.setPrototypeOf(this,lt.prototype),this.errorCode=e||V.EMPTY_STRING,this.errorMessage=t||V.EMPTY_STRING,this.subError=r||V.EMPTY_STRING,this.name="AuthError"}setCorrelationId(e){this.correlationId=e}}function ew(n,e){return new lt(n,e?`${$v[n]} ${e}`:$v[n])}/*! @azure/msal-common v14.16.0 2024-11-05 */const qf="client_info_decoding_error",tw="client_info_empty_error",jf="token_parsing_error",nw="null_or_empty_token",ao="endpoints_resolution_error",rw="network_error",ow="openid_config_error",iw="hash_not_deserialized",Sa="invalid_state",aw="state_mismatch",Ol="state_not_found",sw="nonce_mismatch",Yf="auth_time_not_found",cw="max_age_transpired",aF="multiple_matching_tokens",sF="multiple_matching_accounts",lw="multiple_matching_appMetadata",uw="request_cannot_be_made",dw="cannot_remove_empty_scope",hw="cannot_append_scopeset",Jh="empty_input_scopeset",cF="device_code_polling_cancelled",lF="device_code_expired",uF="device_code_unknown_error",Jf="no_account_in_silent_request",fw="invalid_cache_record",Qf="invalid_cache_environment",Qh="no_account_found",Xh="no_crypto_object",Zh="unexpected_credential_type",dF="invalid_assertion",hF="invalid_client_credential",co="token_refresh_required",fF="user_timeout_reached",mw="token_claims_cnf_required_for_signedjwt",gw="authorization_code_missing_from_server_response",pw="binding_key_not_removed",_w="end_session_endpoint_not_supported",Xf="key_id_missing",mF="no_network_connectivity",gF="user_canceled",pF="missing_tenant_id_error",Ae="method_not_implemented",_F="nested_app_auth_bridge_disabled";/*! @azure/msal-common v14.16.0 2024-11-05 */const Kv={[qf]:"The client info could not be parsed/decoded correctly",[tw]:"The client info was empty",[jf]:"Token cannot be parsed",[nw]:"The token is null or empty",[ao]:"Endpoints cannot be resolved",[rw]:"Network request failed",[ow]:"Could not retrieve endpoints. Check your authority and verify the .well-known/openid-configuration endpoint returns the required endpoints.",[iw]:"The hash parameters could not be deserialized",[Sa]:"State was not the expected format",[aw]:"State mismatch error",[Ol]:"State not found",[sw]:"Nonce mismatch error",[Yf]:"Max Age was requested and the ID token is missing the auth_time variable. auth_time is an optional claim and is not enabled by default - it must be enabled. See https://aka.ms/msaljs/optional-claims for more information.",[cw]:"Max Age is set to 0, or too much time has elapsed since the last end-user authentication.",[aF]:"The cache contains multiple tokens satisfying the requirements. Call AcquireToken again providing more requirements such as authority or account.",[sF]:"The cache contains multiple accounts satisfying the given parameters. Please pass more info to obtain the correct account",[lw]:"The cache contains multiple appMetadata satisfying the given parameters. Please pass more info to obtain the correct appMetadata",[uw]:"Token request cannot be made without authorization code or refresh token.",[dw]:"Cannot remove null or empty scope from ScopeSet",[hw]:"Cannot append ScopeSet",[Jh]:"Empty input ScopeSet cannot be processed",[cF]:"Caller has cancelled token endpoint polling during device code flow by setting DeviceCodeRequest.cancel = true.",[lF]:"Device code is expired.",[uF]:"Device code stopped polling for unknown reasons.",[Jf]:"Please pass an account object, silent flow is not supported without account information",[fw]:"Cache record object was null or undefined.",[Qf]:"Invalid environment when attempting to create cache entry",[Qh]:"No account found in cache for given key.",[Xh]:"No crypto object detected.",[Zh]:"Unexpected credential type.",[dF]:"Client assertion must meet requirements described in https://tools.ietf.org/html/rfc7515",[hF]:"Client credential (secret, certificate, or assertion) must not be empty when creating a confidential client. An application should at most have one credential",[co]:"Cannot return token from cache because it must be refreshed. This may be due to one of the following reasons: forceRefresh parameter is set to true, claims have been requested, there is no cached access token or it is expired.",[fF]:"User defined timeout for device code polling reached",[mw]:"Cannot generate a POP jwt if the token_claims are not populated",[gw]:"Server response does not contain an authorization code to proceed",[pw]:"Could not remove the credential's binding key from storage.",[_w]:"The provided authority does not support logout",[Xf]:"A keyId value is missing from the requested bound token's cache record and is required to match the token to it's stored binding key.",[mF]:"No network connectivity. Check your internet connection.",[gF]:"User cancelled the flow.",[pF]:"A tenant id - not common, organizations, or consumers - must be specified when using the client_credentials flow.",[Ae]:"This method has not been implemented",[_F]:"The nested app auth bridge is disabled"};class su extends lt{constructor(e,t){super(e,t?`${Kv[e]}: ${t}`:Kv[e]),this.name="ClientAuthError",Object.setPrototypeOf(this,su.prototype)}}function Y(n,e){return new su(n,e)}/*! @azure/msal-common v14.16.0 2024-11-05 */const Pl={createNewGuid:()=>{throw Y(Ae)},base64Decode:()=>{throw Y(Ae)},base64Encode:()=>{throw Y(Ae)},base64UrlEncode:()=>{throw Y(Ae)},encodeKid:()=>{throw Y(Ae)},async getPublicKeyThumbprint(){throw Y(Ae)},async removeTokenBindingKey(){throw Y(Ae)},async clearKeystore(){throw Y(Ae)},async signJwt(){throw Y(Ae)},async hashString(){throw Y(Ae)}};/*! @azure/msal-common v14.16.0 2024-11-05 */var nt;(function(n){n[n.Error=0]="Error",n[n.Warning=1]="Warning",n[n.Info=2]="Info",n[n.Verbose=3]="Verbose",n[n.Trace=4]="Trace"})(nt||(nt={}));class Wo{constructor(e,t,r){this.level=nt.Info;const o=()=>{},a=e||Wo.createDefaultLoggerOptions();this.localCallback=a.loggerCallback||o,this.piiLoggingEnabled=a.piiLoggingEnabled||!1,this.level=typeof a.logLevel=="number"?a.logLevel:nt.Info,this.correlationId=a.correlationId||V.EMPTY_STRING,this.packageName=t||V.EMPTY_STRING,this.packageVersion=r||V.EMPTY_STRING}static createDefaultLoggerOptions(){return{loggerCallback:()=>{},piiLoggingEnabled:!1,logLevel:nt.Info}}clone(e,t,r){return new Wo({loggerCallback:this.localCallback,piiLoggingEnabled:this.piiLoggingEnabled,logLevel:this.level,correlationId:r||this.correlationId},e,t)}logMessage(e,t){if(t.logLevel>this.level||!this.piiLoggingEnabled&&t.containsPii)return;const a=`${`[${new Date().toUTCString()}] : [${t.correlationId||this.correlationId||""}]`} : ${this.packageName}@${this.packageVersion} : ${nt[t.logLevel]} - ${e}`;this.executeCallback(t.logLevel,a,t.containsPii||!1)}executeCallback(e,t,r){this.localCallback&&this.localCallback(e,t,r)}error(e,t){this.logMessage(e,{logLevel:nt.Error,containsPii:!1,correlationId:t||V.EMPTY_STRING})}errorPii(e,t){this.logMessage(e,{logLevel:nt.Error,containsPii:!0,correlationId:t||V.EMPTY_STRING})}warning(e,t){this.logMessage(e,{logLevel:nt.Warning,containsPii:!1,correlationId:t||V.EMPTY_STRING})}warningPii(e,t){this.logMessage(e,{logLevel:nt.Warning,containsPii:!0,correlationId:t||V.EMPTY_STRING})}info(e,t){this.logMessage(e,{logLevel:nt.Info,containsPii:!1,correlationId:t||V.EMPTY_STRING})}infoPii(e,t){this.logMessage(e,{logLevel:nt.Info,containsPii:!0,correlationId:t||V.EMPTY_STRING})}verbose(e,t){this.logMessage(e,{logLevel:nt.Verbose,containsPii:!1,correlationId:t||V.EMPTY_STRING})}verbosePii(e,t){this.logMessage(e,{logLevel:nt.Verbose,containsPii:!0,correlationId:t||V.EMPTY_STRING})}trace(e,t){this.logMessage(e,{logLevel:nt.Trace,containsPii:!1,correlationId:t||V.EMPTY_STRING})}tracePii(e,t){this.logMessage(e,{logLevel:nt.Trace,containsPii:!0,correlationId:t||V.EMPTY_STRING})}isPiiLoggingEnabled(){return this.piiLoggingEnabled||!1}}/*! @azure/msal-common v14.16.0 2024-11-05 */const vw="@azure/msal-common",Zf="14.16.0";/*! @azure/msal-common v14.16.0 2024-11-05 */const em={None:"none",AzurePublic:"https://login.microsoftonline.com",AzurePpe:"https://login.windows-ppe.net",AzureChina:"https://login.chinacloudapi.cn",AzureGermany:"https://login.microsoftonline.de",AzureUsGovernment:"https://login.microsoftonline.us"};/*! @azure/msal-common v14.16.0 2024-11-05 */function ki(n,e){const t=vF(n);try{const r=e(t);return JSON.parse(r)}catch{throw Y(jf)}}function vF(n){if(!n)throw Y(nw);const t=/^([^\.\s]*)\.([^\.\s]+)\.([^\.\s]*)$/.exec(n);if(!t||t.length<4)throw Y(jf);return t[2]}function yw(n,e){if(e===0||Date.now()-3e5>n+e)throw Y(cw)}/*! @azure/msal-common v14.16.0 2024-11-05 */function zr(){return Math.round(new Date().getTime()/1e3)}function ef(n,e){const t=Number(n)||0;return zr()+e>t}function yF(n){return Number(n)>zr()}/*! @azure/msal-common v14.16.0 2024-11-05 */function ma(n){return[CF(n),EF(n),wF(n),TF(n),bF(n)].join(tn.CACHE_KEY_SEPARATOR).toLowerCase()}function cu(n,e,t,r,o){return{credentialType:ge.ID_TOKEN,homeAccountId:n,environment:e,clientId:r,secret:t,realm:o}}function lu(n,e,t,r,o,a,l,d,h,f,g,_,p,w,C){var k,S;const T={homeAccountId:n,credentialType:ge.ACCESS_TOKEN,secret:t,cachedAt:zr().toString(),expiresOn:l.toString(),extendedExpiresOn:d.toString(),environment:e,clientId:r,realm:o,target:a,tokenType:g||je.BEARER};if(_&&(T.userAssertionHash=_),f&&(T.refreshOn=f.toString()),w&&(T.requestedClaims=w,T.requestedClaimsHash=C),((k=T.tokenType)==null?void 0:k.toLowerCase())!==je.BEARER.toLowerCase())switch(T.credentialType=ge.ACCESS_TOKEN_WITH_AUTH_SCHEME,T.tokenType){case je.POP:const N=ki(t,h);if(!((S=N==null?void 0:N.cnf)!=null&&S.kid))throw Y(mw);T.keyId=N.cnf.kid;break;case je.SSH:T.keyId=p}return T}function Cw(n,e,t,r,o,a,l){const d={credentialType:ge.REFRESH_TOKEN,homeAccountId:n,environment:e,clientId:r,secret:t};return a&&(d.userAssertionHash=a),o&&(d.familyId=o),l&&(d.expiresOn=l.toString()),d}function tm(n){return n.hasOwnProperty("homeAccountId")&&n.hasOwnProperty("environment")&&n.hasOwnProperty("credentialType")&&n.hasOwnProperty("clientId")&&n.hasOwnProperty("secret")}function Wv(n){return n?tm(n)&&n.hasOwnProperty("realm")&&n.hasOwnProperty("target")&&(n.credentialType===ge.ACCESS_TOKEN||n.credentialType===ge.ACCESS_TOKEN_WITH_AUTH_SCHEME):!1}function zv(n){return n?tm(n)&&n.hasOwnProperty("realm")&&n.credentialType===ge.ID_TOKEN:!1}function Gv(n){return n?tm(n)&&n.credentialType===ge.REFRESH_TOKEN:!1}function CF(n){return[n.homeAccountId,n.environment].join(tn.CACHE_KEY_SEPARATOR).toLowerCase()}function EF(n){const e=n.credentialType===ge.REFRESH_TOKEN&&n.familyId||n.clientId;return[n.credentialType,e,n.realm||""].join(tn.CACHE_KEY_SEPARATOR).toLowerCase()}function wF(n){return(n.target||"").toLowerCase()}function TF(n){return(n.requestedClaimsHash||"").toLowerCase()}function bF(n){return n.tokenType&&n.tokenType.toLowerCase()!==je.BEARER.toLowerCase()?n.tokenType.toLowerCase():""}function SF(n,e){const t=n.indexOf(Wt.CACHE_KEY)===0;let r=!0;return e&&(r=e.hasOwnProperty("failedRequests")&&e.hasOwnProperty("errors")&&e.hasOwnProperty("cacheHits")),t&&r}function IF(n,e){let t=!1;n&&(t=n.indexOf(Es.THROTTLING_PREFIX)===0);let r=!0;return e&&(r=e.hasOwnProperty("throttleTime")),t&&r}function AF({environment:n,clientId:e}){return[zf,n,e].join(tn.CACHE_KEY_SEPARATOR).toLowerCase()}function kF(n,e){return e?n.indexOf(zf)===0&&e.hasOwnProperty("clientId")&&e.hasOwnProperty("environment"):!1}function NF(n,e){return e?n.indexOf(Rl.CACHE_KEY)===0&&e.hasOwnProperty("aliases")&&e.hasOwnProperty("preferred_cache")&&e.hasOwnProperty("preferred_network")&&e.hasOwnProperty("canonical_authority")&&e.hasOwnProperty("authorization_endpoint")&&e.hasOwnProperty("token_endpoint")&&e.hasOwnProperty("issuer")&&e.hasOwnProperty("aliasesFromNetwork")&&e.hasOwnProperty("endpointsFromNetwork")&&e.hasOwnProperty("expiresAt")&&e.hasOwnProperty("jwks_uri"):!1}function qv(){return zr()+Rl.REFRESH_TIME_SECONDS}function Jc(n,e,t){n.authorization_endpoint=e.authorization_endpoint,n.token_endpoint=e.token_endpoint,n.end_session_endpoint=e.end_session_endpoint,n.issuer=e.issuer,n.endpointsFromNetwork=t,n.jwks_uri=e.jwks_uri}function sh(n,e,t){n.aliases=e.aliases,n.preferred_cache=e.preferred_cache,n.preferred_network=e.preferred_network,n.aliasesFromNetwork=t}function jv(n){return n.expiresAt<=zr()}/*! @azure/msal-common v14.16.0 2024-11-05 */const Ew="redirect_uri_empty",RF="claims_request_parsing_error",ww="authority_uri_insecure",hs="url_parse_error",Tw="empty_url_error",bw="empty_input_scopes_error",Sw="invalid_prompt_value",nm="invalid_claims",Iw="token_request_empty",Aw="logout_request_empty",kw="invalid_code_challenge_method",rm="pkce_params_missing",om="invalid_cloud_discovery_metadata",Nw="invalid_authority_metadata",Rw="untrusted_authority",uu="missing_ssh_jwk",Ow="missing_ssh_kid",OF="missing_nonce_authentication_header",PF="invalid_authentication_header",Pw="cannot_set_OIDCOptions",Mw="cannot_allow_native_broker",Dw="authority_mismatch";/*! @azure/msal-common v14.16.0 2024-11-05 */const MF={[Ew]:"A redirect URI is required for all calls, and none has been set.",[RF]:"Could not parse the given claims request object.",[ww]:"Authority URIs must use https. Please see here for valid authority configuration options: https://docs.microsoft.com/en-us/azure/active-directory/develop/msal-js-initializing-client-applications#configuration-options",[hs]:"URL could not be parsed into appropriate segments.",[Tw]:"URL was empty or null.",[bw]:"Scopes cannot be passed as null, undefined or empty array because they are required to obtain an access token.",[Sw]:"Please see here for valid configuration options: https://azuread.github.io/microsoft-authentication-library-for-js/ref/modules/_azure_msal_common.html#commonauthorizationurlrequest",[nm]:"Given claims parameter must be a stringified JSON object.",[Iw]:"Token request was empty and not found in cache.",[Aw]:"The logout request was null or undefined.",[kw]:'code_challenge_method passed is invalid. Valid values are "plain" and "S256".',[rm]:"Both params: code_challenge and code_challenge_method are to be passed if to be sent in the request",[om]:"Invalid cloudDiscoveryMetadata provided. Must be a stringified JSON object containing tenant_discovery_endpoint and metadata fields",[Nw]:"Invalid authorityMetadata provided. Must by a stringified JSON object containing authorization_endpoint, token_endpoint, issuer fields.",[Rw]:"The provided authority is not a trusted authority. Please include this authority in the knownAuthorities config parameter.",[uu]:"Missing sshJwk in SSH certificate request. A stringified JSON Web Key is required when using the SSH authentication scheme.",[Ow]:"Missing sshKid in SSH certificate request. A string that uniquely identifies the public SSH key is required when using the SSH authentication scheme.",[OF]:"Unable to find an authentication header containing server nonce. Either the Authentication-Info or WWW-Authenticate headers must be present in order to obtain a server nonce.",[PF]:"Invalid authentication header provided",[Pw]:"Cannot set OIDCOptions parameter. Please change the protocol mode to OIDC or use a non-Microsoft authority.",[Mw]:"Cannot set allowNativeBroker parameter to true when not in AAD protocol mode.",[Dw]:"Authority mismatch error. Authority provided in login request or PublicClientApplication config does not match the environment of the provided account. Please use a matching account or make an interactive request to login to this authority."};class im extends lt{constructor(e){super(e,MF[e]),this.name="ClientConfigurationError",Object.setPrototypeOf(this,im.prototype)}}function Ze(n){return new im(n)}/*! @azure/msal-common v14.16.0 2024-11-05 */class Cr{static isEmptyObj(e){if(e)try{const t=JSON.parse(e);return Object.keys(t).length===0}catch{}return!0}static startsWith(e,t){return e.indexOf(t)===0}static endsWith(e,t){return e.length>=t.length&&e.lastIndexOf(t)===e.length-t.length}static queryStringToObject(e){const t={},r=e.split("&"),o=a=>decodeURIComponent(a.replace(/\+/g," "));return r.forEach(a=>{if(a.trim()){const[l,d]=a.split(/=(.+)/g,2);l&&d&&(t[o(l)]=o(d))}}),t}static trimArrayEntries(e){return e.map(t=>t.trim())}static removeEmptyStringsFromArray(e){return e.filter(t=>!!t)}static jsonParseHelper(e){try{return JSON.parse(e)}catch{return null}}static matchPattern(e,t){return new RegExp(e.replace(/\\/g,"\\\\").replace(/\*/g,"[^ ]*").replace(/\?/g,"\\?")).test(t)}}/*! @azure/msal-common v14.16.0 2024-11-05 */class _t{constructor(e){const t=e?Cr.trimArrayEntries([...e]):[],r=t?Cr.removeEmptyStringsFromArray(t):[];this.validateInputScopes(r),this.scopes=new Set,r.forEach(o=>this.scopes.add(o))}static fromString(e){const r=(e||V.EMPTY_STRING).split(" ");return new _t(r)}static createSearchScopes(e){const t=new _t(e);return t.containsOnlyOIDCScopes()?t.removeScope(V.OFFLINE_ACCESS_SCOPE):t.removeOIDCScopes(),t}validateInputScopes(e){if(!e||e.length<1)throw Ze(bw)}containsScope(e){const t=this.printScopesLowerCase().split(" "),r=new _t(t);return e?r.scopes.has(e.toLowerCase()):!1}containsScopeSet(e){return!e||e.scopes.size<=0?!1:this.scopes.size>=e.scopes.size&&e.asArray().every(t=>this.containsScope(t))}containsOnlyOIDCScopes(){let e=0;return Bv.forEach(t=>{this.containsScope(t)&&(e+=1)}),this.scopes.size===e}appendScope(e){e&&this.scopes.add(e.trim())}appendScopes(e){try{e.forEach(t=>this.appendScope(t))}catch{throw Y(hw)}}removeScope(e){if(!e)throw Y(dw);this.scopes.delete(e.trim())}removeOIDCScopes(){Bv.forEach(e=>{this.scopes.delete(e)})}unionScopeSets(e){if(!e)throw Y(Jh);const t=new Set;return e.scopes.forEach(r=>t.add(r.toLowerCase())),this.scopes.forEach(r=>t.add(r.toLowerCase())),t}intersectingScopeSets(e){if(!e)throw Y(Jh);e.containsOnlyOIDCScopes()||e.removeOIDCScopes();const t=this.unionScopeSets(e),r=e.getScopeCount(),o=this.getScopeCount();return t.size<o+r}getScopeCount(){return this.scopes.size}asArray(){const e=[];return this.scopes.forEach(t=>e.push(t)),e}printScopes(){return this.scopes?this.asArray().join(" "):V.EMPTY_STRING}printScopesLowerCase(){return this.printScopes().toLowerCase()}}/*! @azure/msal-common v14.16.0 2024-11-05 */function Ml(n,e){if(!n)throw Y(tw);try{const t=e(n);return JSON.parse(t)}catch{throw Y(qf)}}function ga(n){if(!n)throw Y(qf);const e=n.split(tn.CLIENT_INFO_SEPARATOR,2);return{uid:e[0],utid:e.length<2?V.EMPTY_STRING:e[1]}}/*! @azure/msal-common v14.16.0 2024-11-05 */function Dl(n,e){return!!n&&!!e&&n===e.split(".")[1]}function am(n,e,t,r){if(r){const{oid:o,sub:a,tid:l,name:d,tfp:h,acr:f}=r,g=l||h||f||"";return{tenantId:g,localAccountId:o||a||"",name:d,isHomeTenant:Dl(g,n)}}else return{tenantId:t,localAccountId:e,isHomeTenant:Dl(t,n)}}function sm(n,e,t,r){let o=n;if(e){const{isHomeTenant:a,...l}=e;o={...n,...l}}if(t){const{isHomeTenant:a,...l}=am(n.homeAccountId,n.localAccountId,n.tenantId,t);return o={...o,...l,idTokenClaims:t,idToken:r},o}return o}/*! @azure/msal-common v14.16.0 2024-11-05 */const pr={Default:0,Adfs:1,Dsts:2,Ciam:3};/*! @azure/msal-common v14.16.0 2024-11-05 */function Lw(n){return n&&(n.tid||n.tfp||n.acr)||null}/*! @azure/msal-common v14.16.0 2024-11-05 */const mo={AAD:"AAD",OIDC:"OIDC"};/*! @azure/msal-common v14.16.0 2024-11-05 */class Pt{generateAccountId(){return[this.homeAccountId,this.environment].join(tn.CACHE_KEY_SEPARATOR).toLowerCase()}generateAccountKey(){return Pt.generateAccountCacheKey({homeAccountId:this.homeAccountId,environment:this.environment,tenantId:this.realm,username:this.username,localAccountId:this.localAccountId})}getAccountInfo(){return{homeAccountId:this.homeAccountId,environment:this.environment,tenantId:this.realm,username:this.username,localAccountId:this.localAccountId,name:this.name,nativeAccountId:this.nativeAccountId,authorityType:this.authorityType,tenantProfiles:new Map((this.tenantProfiles||[]).map(e=>[e.tenantId,e]))}}isSingleTenant(){return!this.tenantProfiles}static generateAccountCacheKey(e){const t=e.homeAccountId.split(".")[1];return[e.homeAccountId,e.environment||"",t||e.tenantId||""].join(tn.CACHE_KEY_SEPARATOR).toLowerCase()}static createAccount(e,t,r){var f,g,_,p,w,C;const o=new Pt;t.authorityType===pr.Adfs?o.authorityType=jc.ADFS_ACCOUNT_TYPE:t.protocolMode===mo.AAD?o.authorityType=jc.MSSTS_ACCOUNT_TYPE:o.authorityType=jc.GENERIC_ACCOUNT_TYPE;let a;e.clientInfo&&r&&(a=Ml(e.clientInfo,r)),o.clientInfo=e.clientInfo,o.homeAccountId=e.homeAccountId,o.nativeAccountId=e.nativeAccountId;const l=e.environment||t&&t.getPreferredCache();if(!l)throw Y(Qf);o.environment=l,o.realm=(a==null?void 0:a.utid)||Lw(e.idTokenClaims)||"",o.localAccountId=(a==null?void 0:a.uid)||((f=e.idTokenClaims)==null?void 0:f.oid)||((g=e.idTokenClaims)==null?void 0:g.sub)||"";const d=((_=e.idTokenClaims)==null?void 0:_.preferred_username)||((p=e.idTokenClaims)==null?void 0:p.upn),h=(w=e.idTokenClaims)!=null&&w.emails?e.idTokenClaims.emails[0]:null;if(o.username=d||h||"",o.name=((C=e.idTokenClaims)==null?void 0:C.name)||"",o.cloudGraphHostName=e.cloudGraphHostName,o.msGraphHost=e.msGraphHost,e.tenantProfiles)o.tenantProfiles=e.tenantProfiles;else{const T=am(e.homeAccountId,o.localAccountId,o.realm,e.idTokenClaims);o.tenantProfiles=[T]}return o}static createFromAccountInfo(e,t,r){var a;const o=new Pt;return o.authorityType=e.authorityType||jc.GENERIC_ACCOUNT_TYPE,o.homeAccountId=e.homeAccountId,o.localAccountId=e.localAccountId,o.nativeAccountId=e.nativeAccountId,o.realm=e.tenantId,o.environment=e.environment,o.username=e.username,o.name=e.name,o.cloudGraphHostName=t,o.msGraphHost=r,o.tenantProfiles=Array.from(((a=e.tenantProfiles)==null?void 0:a.values())||[]),o}static generateHomeAccountId(e,t,r,o,a){if(!(t===pr.Adfs||t===pr.Dsts)){if(e)try{const l=Ml(e,o.base64Decode);if(l.uid&&l.utid)return`${l.uid}.${l.utid}`}catch{}r.warning("No client info in response")}return(a==null?void 0:a.sub)||""}static isAccountEntity(e){return e?e.hasOwnProperty("homeAccountId")&&e.hasOwnProperty("environment")&&e.hasOwnProperty("realm")&&e.hasOwnProperty("localAccountId")&&e.hasOwnProperty("username")&&e.hasOwnProperty("authorityType"):!1}static accountInfoIsEqual(e,t,r){if(!e||!t)return!1;let o=!0;if(r){const a=e.idTokenClaims||{},l=t.idTokenClaims||{};o=a.iat===l.iat&&a.nonce===l.nonce}return e.homeAccountId===t.homeAccountId&&e.localAccountId===t.localAccountId&&e.username===t.username&&e.tenantId===t.tenantId&&e.environment===t.environment&&e.nativeAccountId===t.nativeAccountId&&o}}/*! @azure/msal-common v14.16.0 2024-11-05 */function xw(n){return n.startsWith("#/")?n.substring(2):n.startsWith("#")||n.startsWith("?")?n.substring(1):n}function Ll(n){if(!n||n.indexOf("=")<0)return null;try{const e=xw(n),t=Object.fromEntries(new URLSearchParams(e));if(t.code||t.error||t.error_description||t.state)return t}catch{throw Y(iw)}return null}/*! @azure/msal-common v14.16.0 2024-11-05 */class De{get urlString(){return this._urlString}constructor(e){if(this._urlString=e,!this._urlString)throw Ze(Tw);e.includes("#")||(this._urlString=De.canonicalizeUri(e))}static canonicalizeUri(e){if(e){let t=e.toLowerCase();return Cr.endsWith(t,"?")?t=t.slice(0,-1):Cr.endsWith(t,"?/")&&(t=t.slice(0,-2)),Cr.endsWith(t,"/")||(t+="/"),t}return e}validateAsUri(){let e;try{e=this.getUrlComponents()}catch{throw Ze(hs)}if(!e.HostNameAndPort||!e.PathSegments)throw Ze(hs);if(!e.Protocol||e.Protocol.toLowerCase()!=="https:")throw Ze(ww)}static appendQueryString(e,t){return t?e.indexOf("?")<0?`${e}?${t}`:`${e}&${t}`:e}static removeHashFromUrl(e){return De.canonicalizeUri(e.split("#")[0])}replaceTenantPath(e){const t=this.getUrlComponents(),r=t.PathSegments;return e&&r.length!==0&&(r[0]===$o.COMMON||r[0]===$o.ORGANIZATIONS)&&(r[0]=e),De.constructAuthorityUriFromObject(t)}getUrlComponents(){const e=RegExp("^(([^:/?#]+):)?(//([^/?#]*))?([^?#]*)(\\?([^#]*))?(#(.*))?"),t=this.urlString.match(e);if(!t)throw Ze(hs);const r={Protocol:t[1],HostNameAndPort:t[4],AbsolutePath:t[5],QueryString:t[7]};let o=r.AbsolutePath.split("/");return o=o.filter(a=>a&&a.length>0),r.PathSegments=o,r.QueryString&&r.QueryString.endsWith("/")&&(r.QueryString=r.QueryString.substring(0,r.QueryString.length-1)),r}static getDomainFromUrl(e){const t=RegExp("^([^:/?#]+://)?([^/?#]*)"),r=e.match(t);if(!r)throw Ze(hs);return r[2]}static getAbsoluteUrl(e,t){if(e[0]===V.FORWARD_SLASH){const o=new De(t).getUrlComponents();return o.Protocol+"//"+o.HostNameAndPort+e}return e}static constructAuthorityUriFromObject(e){return new De(e.Protocol+"//"+e.HostNameAndPort+"/"+e.PathSegments.join("/"))}static hashContainsKnownProperties(e){return!!Ll(e)}}/*! @azure/msal-common v14.16.0 2024-11-05 */const Uw={endpointMetadata:{"login.microsoftonline.com":{token_endpoint:"https://login.microsoftonline.com/{tenantid}/oauth2/v2.0/token",jwks_uri:"https://login.microsoftonline.com/{tenantid}/discovery/v2.0/keys",issuer:"https://login.microsoftonline.com/{tenantid}/v2.0",authorization_endpoint:"https://login.microsoftonline.com/{tenantid}/oauth2/v2.0/authorize",end_session_endpoint:"https://login.microsoftonline.com/{tenantid}/oauth2/v2.0/logout"},"login.chinacloudapi.cn":{token_endpoint:"https://login.chinacloudapi.cn/{tenantid}/oauth2/v2.0/token",jwks_uri:"https://login.chinacloudapi.cn/{tenantid}/discovery/v2.0/keys",issuer:"https://login.partner.microsoftonline.cn/{tenantid}/v2.0",authorization_endpoint:"https://login.chinacloudapi.cn/{tenantid}/oauth2/v2.0/authorize",end_session_endpoint:"https://login.chinacloudapi.cn/{tenantid}/oauth2/v2.0/logout"},"login.microsoftonline.us":{token_endpoint:"https://login.microsoftonline.us/{tenantid}/oauth2/v2.0/token",jwks_uri:"https://login.microsoftonline.us/{tenantid}/discovery/v2.0/keys",issuer:"https://login.microsoftonline.us/{tenantid}/v2.0",authorization_endpoint:"https://login.microsoftonline.us/{tenantid}/oauth2/v2.0/authorize",end_session_endpoint:"https://login.microsoftonline.us/{tenantid}/oauth2/v2.0/logout"}},instanceDiscoveryMetadata:{tenant_discovery_endpoint:"https://{canonicalAuthority}/v2.0/.well-known/openid-configuration",metadata:[{preferred_network:"login.microsoftonline.com",preferred_cache:"login.windows.net",aliases:["login.microsoftonline.com","login.windows.net","login.microsoft.com","sts.windows.net"]},{preferred_network:"login.partner.microsoftonline.cn",preferred_cache:"login.partner.microsoftonline.cn",aliases:["login.partner.microsoftonline.cn","login.chinacloudapi.cn"]},{preferred_network:"login.microsoftonline.de",preferred_cache:"login.microsoftonline.de",aliases:["login.microsoftonline.de"]},{preferred_network:"login.microsoftonline.us",preferred_cache:"login.microsoftonline.us",aliases:["login.microsoftonline.us","login.usgovcloudapi.net"]},{preferred_network:"login-us.microsoftonline.com",preferred_cache:"login-us.microsoftonline.com",aliases:["login-us.microsoftonline.com"]}]}},Yv=Uw.endpointMetadata,cm=Uw.instanceDiscoveryMetadata,Bw=new Set;cm.metadata.forEach(n=>{n.aliases.forEach(e=>{Bw.add(e)})});function DF(n,e){var o;let t;const r=n.canonicalAuthority;if(r){const a=new De(r).getUrlComponents().HostNameAndPort;t=Jv(a,(o=n.cloudDiscoveryMetadata)==null?void 0:o.metadata,On.CONFIG,e)||Jv(a,cm.metadata,On.HARDCODED_VALUES,e)||n.knownAuthorities}return t||[]}function Jv(n,e,t,r){if(r==null||r.trace(`getAliasesFromMetadata called with source: ${t}`),n&&e){const o=xl(e,n);if(o)return r==null||r.trace(`getAliasesFromMetadata: found cloud discovery metadata in ${t}, returning aliases`),o.aliases;r==null||r.trace(`getAliasesFromMetadata: did not find cloud discovery metadata in ${t}`)}return null}function LF(n){return xl(cm.metadata,n)}function xl(n,e){for(let t=0;t<n.length;t++){const r=n[t];if(r.aliases.includes(e))return r}return null}/*! @azure/msal-common v14.16.0 2024-11-05 */const Vw="cache_quota_exceeded",lm="cache_error_unknown";/*! @azure/msal-common v14.16.0 2024-11-05 */const ch={[Vw]:"Exceeded cache storage capacity.",[lm]:"Unexpected error occurred when using cache storage."};class va extends Error{constructor(e,t){const r=t||(ch[e]?ch[e]:ch[lm]);super(`${e}: ${r}`),Object.setPrototypeOf(this,va.prototype),this.name="CacheError",this.errorCode=e,this.errorMessage=r}}/*! @azure/msal-common v14.16.0 2024-11-05 */class Ia{constructor(e,t,r,o){this.clientId=e,this.cryptoImpl=t,this.commonLogger=r.clone(vw,Zf),this.staticAuthorityOptions=o}getAllAccounts(e){return this.buildTenantProfiles(this.getAccountsFilteredBy(e||{}),e)}getAccountInfoFilteredBy(e){const t=this.getAllAccounts(e);return t.length>1?t.sort(o=>o.idTokenClaims?-1:1)[0]:t.length===1?t[0]:null}getBaseAccountInfo(e){const t=this.getAccountsFilteredBy(e);return t.length>0?t[0].getAccountInfo():null}buildTenantProfiles(e,t){return e.flatMap(r=>this.getTenantProfilesFromAccountEntity(r,t==null?void 0:t.tenantId,t))}getTenantedAccountInfoByFilter(e,t,r,o){let a=null,l;if(o&&!this.tenantProfileMatchesFilter(r,o))return null;const d=this.getIdToken(e,t,r.tenantId);return d&&(l=ki(d.secret,this.cryptoImpl.base64Decode),!this.idTokenClaimsMatchTenantProfileFilter(l,o))?null:(a=sm(e,r,l,d==null?void 0:d.secret),a)}getTenantProfilesFromAccountEntity(e,t,r){const o=e.getAccountInfo();let a=o.tenantProfiles||new Map;const l=this.getTokenKeys();if(t){const h=a.get(t);if(h)a=new Map([[t,h]]);else return[]}const d=[];return a.forEach(h=>{const f=this.getTenantedAccountInfoByFilter(o,l,h,r);f&&d.push(f)}),d}tenantProfileMatchesFilter(e,t){return!(t.localAccountId&&!this.matchLocalAccountIdFromTenantProfile(e,t.localAccountId)||t.name&&e.name!==t.name||t.isHomeTenant!==void 0&&e.isHomeTenant!==t.isHomeTenant)}idTokenClaimsMatchTenantProfileFilter(e,t){return!(t&&(t.localAccountId&&!this.matchLocalAccountIdFromTokenClaims(e,t.localAccountId)||t.loginHint&&!this.matchLoginHintFromTokenClaims(e,t.loginHint)||t.username&&!this.matchUsername(e.preferred_username,t.username)||t.name&&!this.matchName(e,t.name)||t.sid&&!this.matchSid(e,t.sid)))}async saveCacheRecord(e,t,r){var o,a,l,d;if(!e)throw Y(fw);try{e.account&&this.setAccount(e.account),e.idToken&&(t==null?void 0:t.idToken)!==!1&&this.setIdTokenCredential(e.idToken),e.accessToken&&(t==null?void 0:t.accessToken)!==!1&&await this.saveAccessToken(e.accessToken),e.refreshToken&&(t==null?void 0:t.refreshToken)!==!1&&this.setRefreshTokenCredential(e.refreshToken),e.appMetadata&&this.setAppMetadata(e.appMetadata)}catch(h){throw(o=this.commonLogger)==null||o.error("CacheManager.saveCacheRecord: failed"),h instanceof Error?((a=this.commonLogger)==null||a.errorPii(`CacheManager.saveCacheRecord: ${h.message}`,r),h.name==="QuotaExceededError"||h.name==="NS_ERROR_DOM_QUOTA_REACHED"||h.message.includes("exceeded the quota")?((l=this.commonLogger)==null||l.error("CacheManager.saveCacheRecord: exceeded storage quota",r),new va(Vw)):new va(h.name,h.message)):((d=this.commonLogger)==null||d.errorPii(`CacheManager.saveCacheRecord: ${h}`,r),new va(lm))}}async saveAccessToken(e){const t={clientId:e.clientId,credentialType:e.credentialType,environment:e.environment,homeAccountId:e.homeAccountId,realm:e.realm,tokenType:e.tokenType,requestedClaimsHash:e.requestedClaimsHash},r=this.getTokenKeys(),o=_t.fromString(e.target),a=[];r.accessToken.forEach(l=>{if(!this.accessTokenKeyMatchesFilter(l,t,!1))return;const d=this.getAccessTokenCredential(l);d&&this.credentialMatchesFilter(d,t)&&_t.fromString(d.target).intersectingScopeSets(o)&&a.push(this.removeAccessToken(l))}),await Promise.all(a),this.setAccessTokenCredential(e)}getAccountsFilteredBy(e){const t=this.getAccountKeys(),r=[];return t.forEach(o=>{var h;if(!this.isAccountKey(o,e.homeAccountId))return;const a=this.getAccount(o,this.commonLogger);if(!a||e.homeAccountId&&!this.matchHomeAccountId(a,e.homeAccountId)||e.username&&!this.matchUsername(a.username,e.username)||e.environment&&!this.matchEnvironment(a,e.environment)||e.realm&&!this.matchRealm(a,e.realm)||e.nativeAccountId&&!this.matchNativeAccountId(a,e.nativeAccountId)||e.authorityType&&!this.matchAuthorityType(a,e.authorityType))return;const l={localAccountId:e==null?void 0:e.localAccountId,name:e==null?void 0:e.name},d=(h=a.tenantProfiles)==null?void 0:h.filter(f=>this.tenantProfileMatchesFilter(f,l));d&&d.length===0||r.push(a)}),r}isAccountKey(e,t,r){return!(e.split(tn.CACHE_KEY_SEPARATOR).length<3||t&&!e.toLowerCase().includes(t.toLowerCase())||r&&!e.toLowerCase().includes(r.toLowerCase()))}isCredentialKey(e){if(e.split(tn.CACHE_KEY_SEPARATOR).length<6)return!1;const t=e.toLowerCase();if(t.indexOf(ge.ID_TOKEN.toLowerCase())===-1&&t.indexOf(ge.ACCESS_TOKEN.toLowerCase())===-1&&t.indexOf(ge.ACCESS_TOKEN_WITH_AUTH_SCHEME.toLowerCase())===-1&&t.indexOf(ge.REFRESH_TOKEN.toLowerCase())===-1)return!1;if(t.indexOf(ge.REFRESH_TOKEN.toLowerCase())>-1){const r=`${ge.REFRESH_TOKEN}${tn.CACHE_KEY_SEPARATOR}${this.clientId}${tn.CACHE_KEY_SEPARATOR}`,o=`${ge.REFRESH_TOKEN}${tn.CACHE_KEY_SEPARATOR}${Cs}${tn.CACHE_KEY_SEPARATOR}`;if(t.indexOf(r.toLowerCase())===-1&&t.indexOf(o.toLowerCase())===-1)return!1}else if(t.indexOf(this.clientId.toLowerCase())===-1)return!1;return!0}credentialMatchesFilter(e,t){return!(t.clientId&&!this.matchClientId(e,t.clientId)||t.userAssertionHash&&!this.matchUserAssertionHash(e,t.userAssertionHash)||typeof t.homeAccountId=="string"&&!this.matchHomeAccountId(e,t.homeAccountId)||t.environment&&!this.matchEnvironment(e,t.environment)||t.realm&&!this.matchRealm(e,t.realm)||t.credentialType&&!this.matchCredentialType(e,t.credentialType)||t.familyId&&!this.matchFamilyId(e,t.familyId)||t.target&&!this.matchTarget(e,t.target)||(t.requestedClaimsHash||e.requestedClaimsHash)&&e.requestedClaimsHash!==t.requestedClaimsHash||e.credentialType===ge.ACCESS_TOKEN_WITH_AUTH_SCHEME&&(t.tokenType&&!this.matchTokenType(e,t.tokenType)||t.tokenType===je.SSH&&t.keyId&&!this.matchKeyId(e,t.keyId)))}getAppMetadataFilteredBy(e){const t=this.getKeys(),r={};return t.forEach(o=>{if(!this.isAppMetadata(o))return;const a=this.getAppMetadata(o);a&&(e.environment&&!this.matchEnvironment(a,e.environment)||e.clientId&&!this.matchClientId(a,e.clientId)||(r[o]=a))}),r}getAuthorityMetadataByAlias(e){const t=this.getAuthorityMetadataKeys();let r=null;return t.forEach(o=>{if(!this.isAuthorityMetadata(o)||o.indexOf(this.clientId)===-1)return;const a=this.getAuthorityMetadata(o);a&&a.aliases.indexOf(e)!==-1&&(r=a)}),r}async removeAllAccounts(){const e=this.getAccountKeys(),t=[];e.forEach(r=>{t.push(this.removeAccount(r))}),await Promise.all(t)}async removeAccount(e){const t=this.getAccount(e,this.commonLogger);t&&(await this.removeAccountContext(t),this.removeItem(e))}async removeAccountContext(e){const t=this.getTokenKeys(),r=e.generateAccountId(),o=[];t.idToken.forEach(a=>{a.indexOf(r)===0&&this.removeIdToken(a)}),t.accessToken.forEach(a=>{a.indexOf(r)===0&&o.push(this.removeAccessToken(a))}),t.refreshToken.forEach(a=>{a.indexOf(r)===0&&this.removeRefreshToken(a)}),await Promise.all(o)}updateOutdatedCachedAccount(e,t,r){var o;if(t&&t.isSingleTenant()){(o=this.commonLogger)==null||o.verbose("updateOutdatedCachedAccount: Found a single-tenant (outdated) account entity in the cache, migrating to multi-tenant account entity");const a=this.getAccountKeys().filter(g=>g.startsWith(t.homeAccountId)),l=[];a.forEach(g=>{const _=this.getCachedAccountEntity(g);_&&l.push(_)});const d=l.find(g=>Dl(g.realm,g.homeAccountId))||l[0];d.tenantProfiles=l.map(g=>({tenantId:g.realm,localAccountId:g.localAccountId,name:g.name,isHomeTenant:Dl(g.realm,g.homeAccountId)}));const h=Ia.toObject(new Pt,{...d}),f=h.generateAccountKey();return a.forEach(g=>{g!==f&&this.removeOutdatedAccount(e)}),this.setAccount(h),r==null||r.verbose("Updated an outdated account entity in the cache"),h}return t}async removeAccessToken(e){const t=this.getAccessTokenCredential(e);if(t){if(t.credentialType.toLowerCase()===ge.ACCESS_TOKEN_WITH_AUTH_SCHEME.toLowerCase()&&t.tokenType===je.POP){const o=t.keyId;if(o)try{await this.cryptoImpl.removeTokenBindingKey(o)}catch{throw Y(pw)}}return this.removeItem(e)}}removeAppMetadata(){return this.getKeys().forEach(t=>{this.isAppMetadata(t)&&this.removeItem(t)}),!0}readAccountFromCache(e){const t=Pt.generateAccountCacheKey(e);return this.getAccount(t,this.commonLogger)}getIdToken(e,t,r,o,a){this.commonLogger.trace("CacheManager - getIdToken called");const l={homeAccountId:e.homeAccountId,environment:e.environment,credentialType:ge.ID_TOKEN,clientId:this.clientId,realm:r},d=this.getIdTokensByFilter(l,t),h=d.size;if(h<1)return this.commonLogger.info("CacheManager:getIdToken - No token found"),null;if(h>1){let f=d;if(!r){const g=new Map;d.forEach((p,w)=>{p.realm===e.tenantId&&g.set(w,p)});const _=g.size;if(_<1)return this.commonLogger.info("CacheManager:getIdToken - Multiple ID tokens found for account but none match account entity tenant id, returning first result"),d.values().next().value;if(_===1)return this.commonLogger.info("CacheManager:getIdToken - Multiple ID tokens found for account, defaulting to home tenant profile"),g.values().next().value;f=g}return this.commonLogger.info("CacheManager:getIdToken - Multiple matching ID tokens found, clearing them"),f.forEach((g,_)=>{this.removeIdToken(_)}),o&&a&&o.addFields({multiMatchedID:d.size},a),null}return this.commonLogger.info("CacheManager:getIdToken - Returning ID token"),d.values().next().value}getIdTokensByFilter(e,t){const r=t&&t.idToken||this.getTokenKeys().idToken,o=new Map;return r.forEach(a=>{if(!this.idTokenKeyMatchesFilter(a,{clientId:this.clientId,...e}))return;const l=this.getIdTokenCredential(a);l&&this.credentialMatchesFilter(l,e)&&o.set(a,l)}),o}idTokenKeyMatchesFilter(e,t){const r=e.toLowerCase();return!(t.clientId&&r.indexOf(t.clientId.toLowerCase())===-1||t.homeAccountId&&r.indexOf(t.homeAccountId.toLowerCase())===-1)}removeIdToken(e){this.removeItem(e)}removeRefreshToken(e){this.removeItem(e)}getAccessToken(e,t,r,o,a,l){this.commonLogger.trace("CacheManager - getAccessToken called");const d=_t.createSearchScopes(t.scopes),h=t.authenticationScheme||je.BEARER,f=h&&h.toLowerCase()!==je.BEARER.toLowerCase()?ge.ACCESS_TOKEN_WITH_AUTH_SCHEME:ge.ACCESS_TOKEN,g={homeAccountId:e.homeAccountId,environment:e.environment,credentialType:f,clientId:this.clientId,realm:o||e.tenantId,target:d,tokenType:h,keyId:t.sshKid,requestedClaimsHash:t.requestedClaimsHash},_=r&&r.accessToken||this.getTokenKeys().accessToken,p=[];_.forEach(C=>{if(this.accessTokenKeyMatchesFilter(C,g,!0)){const T=this.getAccessTokenCredential(C);T&&this.credentialMatchesFilter(T,g)&&p.push(T)}});const w=p.length;return w<1?(this.commonLogger.info("CacheManager:getAccessToken - No token found"),null):w>1?(this.commonLogger.info("CacheManager:getAccessToken - Multiple access tokens found, clearing them"),p.forEach(C=>{this.removeAccessToken(ma(C))}),a&&l&&a.addFields({multiMatchedAT:p.length},l),null):(this.commonLogger.info("CacheManager:getAccessToken - Returning access token"),p[0])}accessTokenKeyMatchesFilter(e,t,r){const o=e.toLowerCase();if(t.clientId&&o.indexOf(t.clientId.toLowerCase())===-1||t.homeAccountId&&o.indexOf(t.homeAccountId.toLowerCase())===-1||t.realm&&o.indexOf(t.realm.toLowerCase())===-1||t.requestedClaimsHash&&o.indexOf(t.requestedClaimsHash.toLowerCase())===-1)return!1;if(t.target){const a=t.target.asArray();for(let l=0;l<a.length;l++){if(r&&!o.includes(a[l].toLowerCase()))return!1;if(!r&&o.includes(a[l].toLowerCase()))return!0}}return!0}getAccessTokensByFilter(e){const t=this.getTokenKeys(),r=[];return t.accessToken.forEach(o=>{if(!this.accessTokenKeyMatchesFilter(o,e,!0))return;const a=this.getAccessTokenCredential(o);a&&this.credentialMatchesFilter(a,e)&&r.push(a)}),r}getRefreshToken(e,t,r,o,a){this.commonLogger.trace("CacheManager - getRefreshToken called");const l=t?Cs:void 0,d={homeAccountId:e.homeAccountId,environment:e.environment,credentialType:ge.REFRESH_TOKEN,clientId:this.clientId,familyId:l},h=r&&r.refreshToken||this.getTokenKeys().refreshToken,f=[];h.forEach(_=>{if(this.refreshTokenKeyMatchesFilter(_,d)){const p=this.getRefreshTokenCredential(_);p&&this.credentialMatchesFilter(p,d)&&f.push(p)}});const g=f.length;return g<1?(this.commonLogger.info("CacheManager:getRefreshToken - No refresh token found."),null):(g>1&&o&&a&&o.addFields({multiMatchedRT:g},a),this.commonLogger.info("CacheManager:getRefreshToken - returning refresh token"),f[0])}refreshTokenKeyMatchesFilter(e,t){const r=e.toLowerCase();return!(t.familyId&&r.indexOf(t.familyId.toLowerCase())===-1||!t.familyId&&t.clientId&&r.indexOf(t.clientId.toLowerCase())===-1||t.homeAccountId&&r.indexOf(t.homeAccountId.toLowerCase())===-1)}readAppMetadataFromCache(e){const t={environment:e,clientId:this.clientId},r=this.getAppMetadataFilteredBy(t),o=Object.keys(r).map(l=>r[l]),a=o.length;if(a<1)return null;if(a>1)throw Y(lw);return o[0]}isAppMetadataFOCI(e){const t=this.readAppMetadataFromCache(e);return!!(t&&t.familyId===Cs)}matchHomeAccountId(e,t){return typeof e.homeAccountId=="string"&&t===e.homeAccountId}matchLocalAccountIdFromTokenClaims(e,t){const r=e.oid||e.sub;return t===r}matchLocalAccountIdFromTenantProfile(e,t){return e.localAccountId===t}matchName(e,t){var r;return t.toLowerCase()===((r=e.name)==null?void 0:r.toLowerCase())}matchUsername(e,t){return!!(e&&typeof e=="string"&&(t==null?void 0:t.toLowerCase())===e.toLowerCase())}matchUserAssertionHash(e,t){return!!(e.userAssertionHash&&t===e.userAssertionHash)}matchEnvironment(e,t){if(this.staticAuthorityOptions){const o=DF(this.staticAuthorityOptions,this.commonLogger);if(o.includes(t)&&o.includes(e.environment))return!0}const r=this.getAuthorityMetadataByAlias(t);return!!(r&&r.aliases.indexOf(e.environment)>-1)}matchCredentialType(e,t){return e.credentialType&&t.toLowerCase()===e.credentialType.toLowerCase()}matchClientId(e,t){return!!(e.clientId&&t===e.clientId)}matchFamilyId(e,t){return!!(e.familyId&&t===e.familyId)}matchRealm(e,t){var r;return((r=e.realm)==null?void 0:r.toLowerCase())===t.toLowerCase()}matchNativeAccountId(e,t){return!!(e.nativeAccountId&&t===e.nativeAccountId)}matchLoginHintFromTokenClaims(e,t){return e.login_hint===t||e.preferred_username===t||e.upn===t}matchSid(e,t){return e.sid===t}matchAuthorityType(e,t){return!!(e.authorityType&&t.toLowerCase()===e.authorityType.toLowerCase())}matchTarget(e,t){return e.credentialType!==ge.ACCESS_TOKEN&&e.credentialType!==ge.ACCESS_TOKEN_WITH_AUTH_SCHEME||!e.target?!1:_t.fromString(e.target).containsScopeSet(t)}matchTokenType(e,t){return!!(e.tokenType&&e.tokenType===t)}matchKeyId(e,t){return!!(e.keyId&&e.keyId===t)}isAppMetadata(e){return e.indexOf(zf)!==-1}isAuthorityMetadata(e){return e.indexOf(Rl.CACHE_KEY)!==-1}generateAuthorityMetadataCacheKey(e){return`${Rl.CACHE_KEY}-${this.clientId}-${e}`}static toObject(e,t){for(const r in t)e[r]=t[r];return e}}class xF extends Ia{setAccount(){throw Y(Ae)}getAccount(){throw Y(Ae)}getCachedAccountEntity(){throw Y(Ae)}setIdTokenCredential(){throw Y(Ae)}getIdTokenCredential(){throw Y(Ae)}setAccessTokenCredential(){throw Y(Ae)}getAccessTokenCredential(){throw Y(Ae)}setRefreshTokenCredential(){throw Y(Ae)}getRefreshTokenCredential(){throw Y(Ae)}setAppMetadata(){throw Y(Ae)}getAppMetadata(){throw Y(Ae)}setServerTelemetry(){throw Y(Ae)}getServerTelemetry(){throw Y(Ae)}setAuthorityMetadata(){throw Y(Ae)}getAuthorityMetadata(){throw Y(Ae)}getAuthorityMetadataKeys(){throw Y(Ae)}setThrottlingCache(){throw Y(Ae)}getThrottlingCache(){throw Y(Ae)}removeItem(){throw Y(Ae)}getKeys(){throw Y(Ae)}getAccountKeys(){throw Y(Ae)}getTokenKeys(){throw Y(Ae)}updateCredentialCacheKey(){throw Y(Ae)}removeOutdatedAccount(){throw Y(Ae)}}/*! @azure/msal-common v14.16.0 2024-11-05 */const Fw={tokenRenewalOffsetSeconds:oF,preventCorsPreflight:!1},UF={loggerCallback:()=>{},piiLoggingEnabled:!1,logLevel:nt.Info,correlationId:V.EMPTY_STRING},BF={claimsBasedCachingEnabled:!1},VF={async sendGetRequestAsync(){throw Y(Ae)},async sendPostRequestAsync(){throw Y(Ae)}},FF={sku:V.SKU,version:Zf,cpu:V.EMPTY_STRING,os:V.EMPTY_STRING},HF={clientSecret:V.EMPTY_STRING,clientAssertion:void 0},$F={azureCloudInstance:em.None,tenant:`${V.DEFAULT_COMMON_TENANT}`},KF={application:{appName:"",appVersion:""}};function WF({authOptions:n,systemOptions:e,loggerOptions:t,cacheOptions:r,storageInterface:o,networkInterface:a,cryptoInterface:l,clientCredentials:d,libraryInfo:h,telemetry:f,serverTelemetryManager:g,persistencePlugin:_,serializableCache:p}){const w={...UF,...t};return{authOptions:zF(n),systemOptions:{...Fw,...e},loggerOptions:w,cacheOptions:{...BF,...r},storageInterface:o||new xF(n.clientId,Pl,new Wo(w)),networkInterface:a||VF,cryptoInterface:l||Pl,clientCredentials:d||HF,libraryInfo:{...FF,...h},telemetry:{...KF,...f},serverTelemetryManager:g||null,persistencePlugin:_||null,serializableCache:p||null}}function zF(n){return{clientCapabilities:[],azureCloudOptions:$F,skipAuthorityMetadataCache:!1,instanceAware:!1,...n}}function tf(n){return n.authOptions.authority.options.protocolMode===mo.OIDC}/*! @azure/msal-common v14.16.0 2024-11-05 */const Bn={HOME_ACCOUNT_ID:"home_account_id",UPN:"UPN"};/*! @azure/msal-common v14.16.0 2024-11-05 */const bi="client_id",Hw="redirect_uri",Qv="response_type",GF="response_mode",qF="grant_type",jF="claims",YF="scope",JF="refresh_token",QF="state",XF="nonce",ZF="prompt",e2="code",t2="code_challenge",n2="code_challenge_method",r2="code_verifier",o2="client-request-id",i2="x-client-SKU",a2="x-client-VER",s2="x-client-OS",c2="x-client-CPU",l2="x-client-current-telemetry",u2="x-client-last-telemetry",d2="x-ms-lib-capability",h2="x-app-name",f2="x-app-ver",m2="post_logout_redirect_uri",g2="id_token_hint",p2="device_code",_2="client_secret",v2="client_assertion",y2="client_assertion_type",Xv="token_type",Zv="req_cnf",C2="assertion",E2="requested_token_use",ey="return_spa_code",w2="nativebroker",T2="logout_hint",b2="sid",S2="login_hint",I2="domain_hint",A2="x-client-xtra-sku",um="brk_client_id",nf="brk_redirect_uri";/*! @azure/msal-common v14.16.0 2024-11-05 */class sa{static validateRedirectUri(e){if(!e)throw Ze(Ew)}static validatePrompt(e){const t=[];for(const r in Bt)t.push(Bt[r]);if(t.indexOf(e)<0)throw Ze(Sw)}static validateClaims(e){try{JSON.parse(e)}catch{throw Ze(nm)}}static validateCodeChallengeParams(e,t){if(!e||!t)throw Ze(rm);this.validateCodeChallengeMethod(t)}static validateCodeChallengeMethod(e){if([Vv.PLAIN,Vv.S256].indexOf(e)<0)throw Ze(kw)}}/*! @azure/msal-common v14.16.0 2024-11-05 */function k2(n,e,t){if(!e)return;const r=n.get(bi);r&&n.has(um)&&(t==null||t.addFields({embeddedClientId:r,embeddedRedirectUri:n.get(Hw)},e))}class ws{constructor(e,t){this.parameters=new Map,this.performanceClient=t,this.correlationId=e}addResponseTypeCode(){this.parameters.set(Qv,encodeURIComponent(V.CODE_RESPONSE_TYPE))}addResponseTypeForTokenAndIdToken(){this.parameters.set(Qv,encodeURIComponent(`${V.TOKEN_RESPONSE_TYPE} ${V.ID_TOKEN_RESPONSE_TYPE}`))}addResponseMode(e){this.parameters.set(GF,encodeURIComponent(e||tF.QUERY))}addNativeBroker(){this.parameters.set(w2,encodeURIComponent("1"))}addScopes(e,t=!0,r=Da){t&&!r.includes("openid")&&!e.includes("openid")&&r.push("openid");const o=t?[...e||[],...r]:e||[],a=new _t(o);this.parameters.set(YF,encodeURIComponent(a.printScopes()))}addClientId(e){this.parameters.set(bi,encodeURIComponent(e))}addRedirectUri(e){sa.validateRedirectUri(e),this.parameters.set(Hw,encodeURIComponent(e))}addPostLogoutRedirectUri(e){sa.validateRedirectUri(e),this.parameters.set(m2,encodeURIComponent(e))}addIdTokenHint(e){this.parameters.set(g2,encodeURIComponent(e))}addDomainHint(e){this.parameters.set(I2,encodeURIComponent(e))}addLoginHint(e){this.parameters.set(S2,encodeURIComponent(e))}addCcsUpn(e){this.parameters.set(dn.CCS_HEADER,encodeURIComponent(`UPN:${e}`))}addCcsOid(e){this.parameters.set(dn.CCS_HEADER,encodeURIComponent(`Oid:${e.uid}@${e.utid}`))}addSid(e){this.parameters.set(b2,encodeURIComponent(e))}addClaims(e,t){const r=this.addClientCapabilitiesToClaims(e,t);sa.validateClaims(r),this.parameters.set(jF,encodeURIComponent(r))}addCorrelationId(e){this.parameters.set(o2,encodeURIComponent(e))}addLibraryInfo(e){this.parameters.set(i2,e.sku),this.parameters.set(a2,e.version),e.os&&this.parameters.set(s2,e.os),e.cpu&&this.parameters.set(c2,e.cpu)}addApplicationTelemetry(e){e!=null&&e.appName&&this.parameters.set(h2,e.appName),e!=null&&e.appVersion&&this.parameters.set(f2,e.appVersion)}addPrompt(e){sa.validatePrompt(e),this.parameters.set(`${ZF}`,encodeURIComponent(e))}addState(e){e&&this.parameters.set(QF,encodeURIComponent(e))}addNonce(e){this.parameters.set(XF,encodeURIComponent(e))}addCodeChallengeParams(e,t){if(sa.validateCodeChallengeParams(e,t),e&&t)this.parameters.set(t2,encodeURIComponent(e)),this.parameters.set(n2,encodeURIComponent(t));else throw Ze(rm)}addAuthorizationCode(e){this.parameters.set(e2,encodeURIComponent(e))}addDeviceCode(e){this.parameters.set(p2,encodeURIComponent(e))}addRefreshToken(e){this.parameters.set(JF,encodeURIComponent(e))}addCodeVerifier(e){this.parameters.set(r2,encodeURIComponent(e))}addClientSecret(e){this.parameters.set(_2,encodeURIComponent(e))}addClientAssertion(e){e&&this.parameters.set(v2,encodeURIComponent(e))}addClientAssertionType(e){e&&this.parameters.set(y2,encodeURIComponent(e))}addOboAssertion(e){this.parameters.set(C2,encodeURIComponent(e))}addRequestTokenUse(e){this.parameters.set(E2,encodeURIComponent(e))}addGrantType(e){this.parameters.set(qF,encodeURIComponent(e))}addClientInfo(){this.parameters.set(nF,"1")}addExtraQueryParameters(e){Object.entries(e).forEach(([t,r])=>{!this.parameters.has(t)&&r&&this.parameters.set(t,r)})}addClientCapabilitiesToClaims(e,t){let r;if(!e)r={};else try{r=JSON.parse(e)}catch{throw Ze(nm)}return t&&t.length>0&&(r.hasOwnProperty(qc.ACCESS_TOKEN)||(r[qc.ACCESS_TOKEN]={}),r[qc.ACCESS_TOKEN][qc.XMS_CC]={values:t}),JSON.stringify(r)}addUsername(e){this.parameters.set(Hv.username,encodeURIComponent(e))}addPassword(e){this.parameters.set(Hv.password,encodeURIComponent(e))}addPopToken(e){e&&(this.parameters.set(Xv,je.POP),this.parameters.set(Zv,encodeURIComponent(e)))}addSshJwk(e){e&&(this.parameters.set(Xv,je.SSH),this.parameters.set(Zv,encodeURIComponent(e)))}addServerTelemetry(e){this.parameters.set(l2,e.generateCurrentRequestHeaderValue()),this.parameters.set(u2,e.generateLastRequestHeaderValue())}addThrottling(){this.parameters.set(d2,Es.X_MS_LIB_CAPABILITY_VALUE)}addLogoutHint(e){this.parameters.set(T2,encodeURIComponent(e))}addBrokerParameters(e){const t={};t[um]=e.brokerClientId,t[nf]=e.brokerRedirectUri,this.addExtraQueryParameters(t)}createQueryString(){const e=new Array;return this.parameters.forEach((t,r)=>{e.push(`${r}=${t}`)}),k2(this.parameters,this.correlationId,this.performanceClient),e.join("&")}}/*! @azure/msal-common v14.16.0 2024-11-05 */function N2(n){return n.hasOwnProperty("authorization_endpoint")&&n.hasOwnProperty("token_endpoint")&&n.hasOwnProperty("issuer")&&n.hasOwnProperty("jwks_uri")}/*! @azure/msal-common v14.16.0 2024-11-05 */function R2(n){return n.hasOwnProperty("tenant_discovery_endpoint")&&n.hasOwnProperty("metadata")}/*! @azure/msal-common v14.16.0 2024-11-05 */function O2(n){return n.hasOwnProperty("error")&&n.hasOwnProperty("error_description")}/*! @azure/msal-common v14.16.0 2024-11-05 */const x={AcquireTokenByCode:"acquireTokenByCode",AcquireTokenByRefreshToken:"acquireTokenByRefreshToken",AcquireTokenSilent:"acquireTokenSilent",AcquireTokenSilentAsync:"acquireTokenSilentAsync",AcquireTokenPopup:"acquireTokenPopup",AcquireTokenPreRedirect:"acquireTokenPreRedirect",AcquireTokenRedirect:"acquireTokenRedirect",CryptoOptsGetPublicKeyThumbprint:"cryptoOptsGetPublicKeyThumbprint",CryptoOptsSignJwt:"cryptoOptsSignJwt",SilentCacheClientAcquireToken:"silentCacheClientAcquireToken",SilentIframeClientAcquireToken:"silentIframeClientAcquireToken",AwaitConcurrentIframe:"awaitConcurrentIframe",SilentRefreshClientAcquireToken:"silentRefreshClientAcquireToken",SsoSilent:"ssoSilent",StandardInteractionClientGetDiscoveredAuthority:"standardInteractionClientGetDiscoveredAuthority",FetchAccountIdWithNativeBroker:"fetchAccountIdWithNativeBroker",NativeInteractionClientAcquireToken:"nativeInteractionClientAcquireToken",BaseClientCreateTokenRequestHeaders:"baseClientCreateTokenRequestHeaders",NetworkClientSendPostRequestAsync:"networkClientSendPostRequestAsync",RefreshTokenClientExecutePostToTokenEndpoint:"refreshTokenClientExecutePostToTokenEndpoint",AuthorizationCodeClientExecutePostToTokenEndpoint:"authorizationCodeClientExecutePostToTokenEndpoint",BrokerHandhshake:"brokerHandshake",AcquireTokenByRefreshTokenInBroker:"acquireTokenByRefreshTokenInBroker",AcquireTokenByBroker:"acquireTokenByBroker",RefreshTokenClientExecuteTokenRequest:"refreshTokenClientExecuteTokenRequest",RefreshTokenClientAcquireToken:"refreshTokenClientAcquireToken",RefreshTokenClientAcquireTokenWithCachedRefreshToken:"refreshTokenClientAcquireTokenWithCachedRefreshToken",RefreshTokenClientAcquireTokenByRefreshToken:"refreshTokenClientAcquireTokenByRefreshToken",RefreshTokenClientCreateTokenRequestBody:"refreshTokenClientCreateTokenRequestBody",AcquireTokenFromCache:"acquireTokenFromCache",SilentFlowClientAcquireCachedToken:"silentFlowClientAcquireCachedToken",SilentFlowClientGenerateResultFromCacheRecord:"silentFlowClientGenerateResultFromCacheRecord",AcquireTokenBySilentIframe:"acquireTokenBySilentIframe",InitializeBaseRequest:"initializeBaseRequest",InitializeSilentRequest:"initializeSilentRequest",InitializeClientApplication:"initializeClientApplication",SilentIframeClientTokenHelper:"silentIframeClientTokenHelper",SilentHandlerInitiateAuthRequest:"silentHandlerInitiateAuthRequest",SilentHandlerMonitorIframeForHash:"silentHandlerMonitorIframeForHash",SilentHandlerLoadFrame:"silentHandlerLoadFrame",SilentHandlerLoadFrameSync:"silentHandlerLoadFrameSync",StandardInteractionClientCreateAuthCodeClient:"standardInteractionClientCreateAuthCodeClient",StandardInteractionClientGetClientConfiguration:"standardInteractionClientGetClientConfiguration",StandardInteractionClientInitializeAuthorizationRequest:"standardInteractionClientInitializeAuthorizationRequest",StandardInteractionClientInitializeAuthorizationCodeRequest:"standardInteractionClientInitializeAuthorizationCodeRequest",GetAuthCodeUrl:"getAuthCodeUrl",HandleCodeResponseFromServer:"handleCodeResponseFromServer",HandleCodeResponse:"handleCodeResponse",UpdateTokenEndpointAuthority:"updateTokenEndpointAuthority",AuthClientAcquireToken:"authClientAcquireToken",AuthClientExecuteTokenRequest:"authClientExecuteTokenRequest",AuthClientCreateTokenRequestBody:"authClientCreateTokenRequestBody",AuthClientCreateQueryString:"authClientCreateQueryString",PopTokenGenerateCnf:"popTokenGenerateCnf",PopTokenGenerateKid:"popTokenGenerateKid",HandleServerTokenResponse:"handleServerTokenResponse",DeserializeResponse:"deserializeResponse",AuthorityFactoryCreateDiscoveredInstance:"authorityFactoryCreateDiscoveredInstance",AuthorityResolveEndpointsAsync:"authorityResolveEndpointsAsync",AuthorityResolveEndpointsFromLocalSources:"authorityResolveEndpointsFromLocalSources",AuthorityGetCloudDiscoveryMetadataFromNetwork:"authorityGetCloudDiscoveryMetadataFromNetwork",AuthorityUpdateCloudDiscoveryMetadata:"authorityUpdateCloudDiscoveryMetadata",AuthorityGetEndpointMetadataFromNetwork:"authorityGetEndpointMetadataFromNetwork",AuthorityUpdateEndpointMetadata:"authorityUpdateEndpointMetadata",AuthorityUpdateMetadataWithRegionalInformation:"authorityUpdateMetadataWithRegionalInformation",RegionDiscoveryDetectRegion:"regionDiscoveryDetectRegion",RegionDiscoveryGetRegionFromIMDS:"regionDiscoveryGetRegionFromIMDS",RegionDiscoveryGetCurrentVersion:"regionDiscoveryGetCurrentVersion",AcquireTokenByCodeAsync:"acquireTokenByCodeAsync",GetEndpointMetadataFromNetwork:"getEndpointMetadataFromNetwork",GetCloudDiscoveryMetadataFromNetworkMeasurement:"getCloudDiscoveryMetadataFromNetworkMeasurement",HandleRedirectPromiseMeasurement:"handleRedirectPromise",HandleNativeRedirectPromiseMeasurement:"handleNativeRedirectPromise",UpdateCloudDiscoveryMetadataMeasurement:"updateCloudDiscoveryMetadataMeasurement",UsernamePasswordClientAcquireToken:"usernamePasswordClientAcquireToken",NativeMessageHandlerHandshake:"nativeMessageHandlerHandshake",NativeGenerateAuthResult:"nativeGenerateAuthResult",RemoveHiddenIframe:"removeHiddenIframe",ClearTokensAndKeysWithClaims:"clearTokensAndKeysWithClaims",CacheManagerGetRefreshToken:"cacheManagerGetRefreshToken",GeneratePkceCodes:"generatePkceCodes",GenerateCodeVerifier:"generateCodeVerifier",GenerateCodeChallengeFromVerifier:"generateCodeChallengeFromVerifier",Sha256Digest:"sha256Digest",GetRandomValues:"getRandomValues"},P2={NotStarted:0,InProgress:1,Completed:2};/*! @azure/msal-common v14.16.0 2024-11-05 */const Ni=(n,e,t,r,o)=>(...a)=>{t.trace(`Executing function ${e}`);const l=r==null?void 0:r.startMeasurement(e,o);if(o){const d=e+"CallCount";r==null||r.incrementFields({[d]:1},o)}try{const d=n(...a);return l==null||l.end({success:!0}),t.trace(`Returning result from ${e}`),d}catch(d){t.trace(`Error occurred in ${e}`);try{t.trace(JSON.stringify(d))}catch{t.trace("Unable to print error message.")}throw l==null||l.end({success:!1},d),d}},Q=(n,e,t,r,o)=>(...a)=>{t.trace(`Executing function ${e}`);const l=r==null?void 0:r.startMeasurement(e,o);if(o){const d=e+"CallCount";r==null||r.incrementFields({[d]:1},o)}return r==null||r.setPreQueueTime(e,o),n(...a).then(d=>(t.trace(`Returning result from ${e}`),l==null||l.end({success:!0}),d)).catch(d=>{t.trace(`Error occurred in ${e}`);try{t.trace(JSON.stringify(d))}catch{t.trace("Unable to print error message.")}throw l==null||l.end({success:!1},d),d})};/*! @azure/msal-common v14.16.0 2024-11-05 */class du{constructor(e,t,r,o){this.networkInterface=e,this.logger=t,this.performanceClient=r,this.correlationId=o}async detectRegion(e,t){var o;(o=this.performanceClient)==null||o.addQueueMeasurement(x.RegionDiscoveryDetectRegion,this.correlationId);let r=e;if(r)t.region_source=Qi.ENVIRONMENT_VARIABLE;else{const a=du.IMDS_OPTIONS;try{const l=await Q(this.getRegionFromIMDS.bind(this),x.RegionDiscoveryGetRegionFromIMDS,this.logger,this.performanceClient,this.correlationId)(V.IMDS_VERSION,a);if(l.status===Yc.httpSuccess&&(r=l.body,t.region_source=Qi.IMDS),l.status===Yc.httpBadRequest){const d=await Q(this.getCurrentVersion.bind(this),x.RegionDiscoveryGetCurrentVersion,this.logger,this.performanceClient,this.correlationId)(a);if(!d)return t.region_source=Qi.FAILED_AUTO_DETECTION,null;const h=await Q(this.getRegionFromIMDS.bind(this),x.RegionDiscoveryGetRegionFromIMDS,this.logger,this.performanceClient,this.correlationId)(d,a);h.status===Yc.httpSuccess&&(r=h.body,t.region_source=Qi.IMDS)}}catch{return t.region_source=Qi.FAILED_AUTO_DETECTION,null}}return r||(t.region_source=Qi.FAILED_AUTO_DETECTION),r||null}async getRegionFromIMDS(e,t){var r;return(r=this.performanceClient)==null||r.addQueueMeasurement(x.RegionDiscoveryGetRegionFromIMDS,this.correlationId),this.networkInterface.sendGetRequestAsync(`${V.IMDS_ENDPOINT}?api-version=${e}&format=text`,t,V.IMDS_TIMEOUT)}async getCurrentVersion(e){var t;(t=this.performanceClient)==null||t.addQueueMeasurement(x.RegionDiscoveryGetCurrentVersion,this.correlationId);try{const r=await this.networkInterface.sendGetRequestAsync(`${V.IMDS_ENDPOINT}?format=json`,e);return r.status===Yc.httpBadRequest&&r.body&&r.body["newest-versions"]&&r.body["newest-versions"].length>0?r.body["newest-versions"][0]:null}catch{return null}}}du.IMDS_OPTIONS={headers:{Metadata:"true"}};/*! @azure/msal-common v14.16.0 2024-11-05 */class Xt{constructor(e,t,r,o,a,l,d,h){this.canonicalAuthority=e,this._canonicalAuthority.validateAsUri(),this.networkInterface=t,this.cacheManager=r,this.authorityOptions=o,this.regionDiscoveryMetadata={region_used:void 0,region_source:void 0,region_outcome:void 0},this.logger=a,this.performanceClient=d,this.correlationId=l,this.managedIdentity=h||!1,this.regionDiscovery=new du(t,this.logger,this.performanceClient,this.correlationId)}getAuthorityType(e){if(e.HostNameAndPort.endsWith(V.CIAM_AUTH_URL))return pr.Ciam;const t=e.PathSegments;if(t.length)switch(t[0].toLowerCase()){case V.ADFS:return pr.Adfs;case V.DSTS:return pr.Dsts}return pr.Default}get authorityType(){return this.getAuthorityType(this.canonicalAuthorityUrlComponents)}get protocolMode(){return this.authorityOptions.protocolMode}get options(){return this.authorityOptions}get canonicalAuthority(){return this._canonicalAuthority.urlString}set canonicalAuthority(e){this._canonicalAuthority=new De(e),this._canonicalAuthority.validateAsUri(),this._canonicalAuthorityUrlComponents=null}get canonicalAuthorityUrlComponents(){return this._canonicalAuthorityUrlComponents||(this._canonicalAuthorityUrlComponents=this._canonicalAuthority.getUrlComponents()),this._canonicalAuthorityUrlComponents}get hostnameAndPort(){return this.canonicalAuthorityUrlComponents.HostNameAndPort.toLowerCase()}get tenant(){return this.canonicalAuthorityUrlComponents.PathSegments[0]}get authorizationEndpoint(){if(this.discoveryComplete())return this.replacePath(this.metadata.authorization_endpoint);throw Y(ao)}get tokenEndpoint(){if(this.discoveryComplete())return this.replacePath(this.metadata.token_endpoint);throw Y(ao)}get deviceCodeEndpoint(){if(this.discoveryComplete())return this.replacePath(this.metadata.token_endpoint.replace("/token","/devicecode"));throw Y(ao)}get endSessionEndpoint(){if(this.discoveryComplete()){if(!this.metadata.end_session_endpoint)throw Y(_w);return this.replacePath(this.metadata.end_session_endpoint)}else throw Y(ao)}get selfSignedJwtAudience(){if(this.discoveryComplete())return this.replacePath(this.metadata.issuer);throw Y(ao)}get jwksUri(){if(this.discoveryComplete())return this.replacePath(this.metadata.jwks_uri);throw Y(ao)}canReplaceTenant(e){return e.PathSegments.length===1&&!Xt.reservedTenantDomains.has(e.PathSegments[0])&&this.getAuthorityType(e)===pr.Default&&this.protocolMode===mo.AAD}replaceTenant(e){return e.replace(/{tenant}|{tenantid}/g,this.tenant)}replacePath(e){let t=e;const o=new De(this.metadata.canonical_authority).getUrlComponents(),a=o.PathSegments;return this.canonicalAuthorityUrlComponents.PathSegments.forEach((d,h)=>{let f=a[h];if(h===0&&this.canReplaceTenant(o)){const g=new De(this.metadata.authorization_endpoint).getUrlComponents().PathSegments[0];f!==g&&(this.logger.verbose(`Replacing tenant domain name ${f} with id ${g}`),f=g)}d!==f&&(t=t.replace(`/${f}/`,`/${d}/`))}),this.replaceTenant(t)}get defaultOpenIdConfigurationEndpoint(){const e=this.hostnameAndPort;return this.canonicalAuthority.endsWith("v2.0/")||this.authorityType===pr.Adfs||this.protocolMode!==mo.AAD&&!this.isAliasOfKnownMicrosoftAuthority(e)?`${this.canonicalAuthority}.well-known/openid-configuration`:`${this.canonicalAuthority}v2.0/.well-known/openid-configuration`}discoveryComplete(){return!!this.metadata}async resolveEndpointsAsync(){var o,a;(o=this.performanceClient)==null||o.addQueueMeasurement(x.AuthorityResolveEndpointsAsync,this.correlationId);const e=this.getCurrentMetadataEntity(),t=await Q(this.updateCloudDiscoveryMetadata.bind(this),x.AuthorityUpdateCloudDiscoveryMetadata,this.logger,this.performanceClient,this.correlationId)(e);this.canonicalAuthority=this.canonicalAuthority.replace(this.hostnameAndPort,e.preferred_network);const r=await Q(this.updateEndpointMetadata.bind(this),x.AuthorityUpdateEndpointMetadata,this.logger,this.performanceClient,this.correlationId)(e);this.updateCachedMetadata(e,t,{source:r}),(a=this.performanceClient)==null||a.addFields({cloudDiscoverySource:t,authorityEndpointSource:r},this.correlationId)}getCurrentMetadataEntity(){let e=this.cacheManager.getAuthorityMetadataByAlias(this.hostnameAndPort);return e||(e={aliases:[],preferred_cache:this.hostnameAndPort,preferred_network:this.hostnameAndPort,canonical_authority:this.canonicalAuthority,authorization_endpoint:"",token_endpoint:"",end_session_endpoint:"",issuer:"",aliasesFromNetwork:!1,endpointsFromNetwork:!1,expiresAt:qv(),jwks_uri:""}),e}updateCachedMetadata(e,t,r){t!==On.CACHE&&(r==null?void 0:r.source)!==On.CACHE&&(e.expiresAt=qv(),e.canonical_authority=this.canonicalAuthority);const o=this.cacheManager.generateAuthorityMetadataCacheKey(e.preferred_cache);this.cacheManager.setAuthorityMetadata(o,e),this.metadata=e}async updateEndpointMetadata(e){var o,a,l;(o=this.performanceClient)==null||o.addQueueMeasurement(x.AuthorityUpdateEndpointMetadata,this.correlationId);const t=this.updateEndpointMetadataFromLocalSources(e);if(t){if(t.source===On.HARDCODED_VALUES&&(a=this.authorityOptions.azureRegionConfiguration)!=null&&a.azureRegion&&t.metadata){const d=await Q(this.updateMetadataWithRegionalInformation.bind(this),x.AuthorityUpdateMetadataWithRegionalInformation,this.logger,this.performanceClient,this.correlationId)(t.metadata);Jc(e,d,!1),e.canonical_authority=this.canonicalAuthority}return t.source}let r=await Q(this.getEndpointMetadataFromNetwork.bind(this),x.AuthorityGetEndpointMetadataFromNetwork,this.logger,this.performanceClient,this.correlationId)();if(r)return(l=this.authorityOptions.azureRegionConfiguration)!=null&&l.azureRegion&&(r=await Q(this.updateMetadataWithRegionalInformation.bind(this),x.AuthorityUpdateMetadataWithRegionalInformation,this.logger,this.performanceClient,this.correlationId)(r)),Jc(e,r,!0),On.NETWORK;throw Y(ow,this.defaultOpenIdConfigurationEndpoint)}updateEndpointMetadataFromLocalSources(e){this.logger.verbose("Attempting to get endpoint metadata from authority configuration");const t=this.getEndpointMetadataFromConfig();if(t)return this.logger.verbose("Found endpoint metadata in authority configuration"),Jc(e,t,!1),{source:On.CONFIG};if(this.logger.verbose("Did not find endpoint metadata in the config... Attempting to get endpoint metadata from the hardcoded values."),this.authorityOptions.skipAuthorityMetadataCache)this.logger.verbose("Skipping hardcoded metadata cache since skipAuthorityMetadataCache is set to true. Attempting to get endpoint metadata from the network metadata cache.");else{const o=this.getEndpointMetadataFromHardcodedValues();if(o)return Jc(e,o,!1),{source:On.HARDCODED_VALUES,metadata:o};this.logger.verbose("Did not find endpoint metadata in hardcoded values... Attempting to get endpoint metadata from the network metadata cache.")}const r=jv(e);return this.isAuthoritySameType(e)&&e.endpointsFromNetwork&&!r?(this.logger.verbose("Found endpoint metadata in the cache."),{source:On.CACHE}):(r&&this.logger.verbose("The metadata entity is expired."),null)}isAuthoritySameType(e){return new De(e.canonical_authority).getUrlComponents().PathSegments.length===this.canonicalAuthorityUrlComponents.PathSegments.length}getEndpointMetadataFromConfig(){if(this.authorityOptions.authorityMetadata)try{return JSON.parse(this.authorityOptions.authorityMetadata)}catch{throw Ze(Nw)}return null}async getEndpointMetadataFromNetwork(){var r;(r=this.performanceClient)==null||r.addQueueMeasurement(x.AuthorityGetEndpointMetadataFromNetwork,this.correlationId);const e={},t=this.defaultOpenIdConfigurationEndpoint;this.logger.verbose(`Authority.getEndpointMetadataFromNetwork: attempting to retrieve OAuth endpoints from ${t}`);try{const o=await this.networkInterface.sendGetRequestAsync(t,e);return N2(o.body)?o.body:(this.logger.verbose("Authority.getEndpointMetadataFromNetwork: could not parse response as OpenID configuration"),null)}catch(o){return this.logger.verbose(`Authority.getEndpointMetadataFromNetwork: ${o}`),null}}getEndpointMetadataFromHardcodedValues(){return this.hostnameAndPort in Yv?Yv[this.hostnameAndPort]:null}async updateMetadataWithRegionalInformation(e){var r,o,a;(r=this.performanceClient)==null||r.addQueueMeasurement(x.AuthorityUpdateMetadataWithRegionalInformation,this.correlationId);const t=(o=this.authorityOptions.azureRegionConfiguration)==null?void 0:o.azureRegion;if(t){if(t!==V.AZURE_REGION_AUTO_DISCOVER_FLAG)return this.regionDiscoveryMetadata.region_outcome=ah.CONFIGURED_NO_AUTO_DETECTION,this.regionDiscoveryMetadata.region_used=t,Xt.replaceWithRegionalInformation(e,t);const l=await Q(this.regionDiscovery.detectRegion.bind(this.regionDiscovery),x.RegionDiscoveryDetectRegion,this.logger,this.performanceClient,this.correlationId)((a=this.authorityOptions.azureRegionConfiguration)==null?void 0:a.environmentRegion,this.regionDiscoveryMetadata);if(l)return this.regionDiscoveryMetadata.region_outcome=ah.AUTO_DETECTION_REQUESTED_SUCCESSFUL,this.regionDiscoveryMetadata.region_used=l,Xt.replaceWithRegionalInformation(e,l);this.regionDiscoveryMetadata.region_outcome=ah.AUTO_DETECTION_REQUESTED_FAILED}return e}async updateCloudDiscoveryMetadata(e){var o;(o=this.performanceClient)==null||o.addQueueMeasurement(x.AuthorityUpdateCloudDiscoveryMetadata,this.correlationId);const t=this.updateCloudDiscoveryMetadataFromLocalSources(e);if(t)return t;const r=await Q(this.getCloudDiscoveryMetadataFromNetwork.bind(this),x.AuthorityGetCloudDiscoveryMetadataFromNetwork,this.logger,this.performanceClient,this.correlationId)();if(r)return sh(e,r,!0),On.NETWORK;throw Ze(Rw)}updateCloudDiscoveryMetadataFromLocalSources(e){this.logger.verbose("Attempting to get cloud discovery metadata from authority configuration"),this.logger.verbosePii(`Known Authorities: ${this.authorityOptions.knownAuthorities||V.NOT_APPLICABLE}`),this.logger.verbosePii(`Authority Metadata: ${this.authorityOptions.authorityMetadata||V.NOT_APPLICABLE}`),this.logger.verbosePii(`Canonical Authority: ${e.canonical_authority||V.NOT_APPLICABLE}`);const t=this.getCloudDiscoveryMetadataFromConfig();if(t)return this.logger.verbose("Found cloud discovery metadata in authority configuration"),sh(e,t,!1),On.CONFIG;if(this.logger.verbose("Did not find cloud discovery metadata in the config... Attempting to get cloud discovery metadata from the hardcoded values."),this.options.skipAuthorityMetadataCache)this.logger.verbose("Skipping hardcoded cloud discovery metadata cache since skipAuthorityMetadataCache is set to true. Attempting to get cloud discovery metadata from the network metadata cache.");else{const o=LF(this.hostnameAndPort);if(o)return this.logger.verbose("Found cloud discovery metadata from hardcoded values."),sh(e,o,!1),On.HARDCODED_VALUES;this.logger.verbose("Did not find cloud discovery metadata in hardcoded values... Attempting to get cloud discovery metadata from the network metadata cache.")}const r=jv(e);return this.isAuthoritySameType(e)&&e.aliasesFromNetwork&&!r?(this.logger.verbose("Found cloud discovery metadata in the cache."),On.CACHE):(r&&this.logger.verbose("The metadata entity is expired."),null)}getCloudDiscoveryMetadataFromConfig(){if(this.authorityType===pr.Ciam)return this.logger.verbose("CIAM authorities do not support cloud discovery metadata, generate the aliases from authority host."),Xt.createCloudDiscoveryMetadataFromHost(this.hostnameAndPort);if(this.authorityOptions.cloudDiscoveryMetadata){this.logger.verbose("The cloud discovery metadata has been provided as a network response, in the config.");try{this.logger.verbose("Attempting to parse the cloud discovery metadata.");const e=JSON.parse(this.authorityOptions.cloudDiscoveryMetadata),t=xl(e.metadata,this.hostnameAndPort);if(this.logger.verbose("Parsed the cloud discovery metadata."),t)return this.logger.verbose("There is returnable metadata attached to the parsed cloud discovery metadata."),t;this.logger.verbose("There is no metadata attached to the parsed cloud discovery metadata.")}catch{throw this.logger.verbose("Unable to parse the cloud discovery metadata. Throwing Invalid Cloud Discovery Metadata Error."),Ze(om)}}return this.isInKnownAuthorities()?(this.logger.verbose("The host is included in knownAuthorities. Creating new cloud discovery metadata from the host."),Xt.createCloudDiscoveryMetadataFromHost(this.hostnameAndPort)):null}async getCloudDiscoveryMetadataFromNetwork(){var o;(o=this.performanceClient)==null||o.addQueueMeasurement(x.AuthorityGetCloudDiscoveryMetadataFromNetwork,this.correlationId);const e=`${V.AAD_INSTANCE_DISCOVERY_ENDPT}${this.canonicalAuthority}oauth2/v2.0/authorize`,t={};let r=null;try{const a=await this.networkInterface.sendGetRequestAsync(e,t);let l,d;if(R2(a.body))l=a.body,d=l.metadata,this.logger.verbosePii(`tenant_discovery_endpoint is: ${l.tenant_discovery_endpoint}`);else if(O2(a.body)){if(this.logger.warning(`A CloudInstanceDiscoveryErrorResponse was returned. The cloud instance discovery network request's status code is: ${a.status}`),l=a.body,l.error===V.INVALID_INSTANCE)return this.logger.error("The CloudInstanceDiscoveryErrorResponse error is invalid_instance."),null;this.logger.warning(`The CloudInstanceDiscoveryErrorResponse error is ${l.error}`),this.logger.warning(`The CloudInstanceDiscoveryErrorResponse error description is ${l.error_description}`),this.logger.warning("Setting the value of the CloudInstanceDiscoveryMetadata (returned from the network) to []"),d=[]}else return this.logger.error("AAD did not return a CloudInstanceDiscoveryResponse or CloudInstanceDiscoveryErrorResponse"),null;this.logger.verbose("Attempting to find a match between the developer's authority and the CloudInstanceDiscoveryMetadata returned from the network request."),r=xl(d,this.hostnameAndPort)}catch(a){if(a instanceof lt)this.logger.error(`There was a network error while attempting to get the cloud discovery instance metadata.
|
108
108
|
Error: ${a.errorCode}
|
109
109
|
Error Description: ${a.errorMessage}`);else{const l=a;this.logger.error(`A non-MSALJS error was thrown while attempting to get the cloud instance discovery metadata.
|
110
110
|
Error: ${l.name}
|
111
|
-
Error Description: ${l.message}`)}return null}return r||(this.logger.warning("The developer's authority was not found within the CloudInstanceDiscoveryMetadata returned from the network request."),this.logger.verbose("Creating custom Authority for custom domain scenario."),r=Xt.createCloudDiscoveryMetadataFromHost(this.hostnameAndPort)),r}isInKnownAuthorities(){return this.authorityOptions.knownAuthorities.filter(t=>t&&De.getDomainFromUrl(t).toLowerCase()===this.hostnameAndPort).length>0}static generateAuthority(e,t){let r;if(t&&t.azureCloudInstance!==em.None){const o=t.tenant?t.tenant:V.DEFAULT_COMMON_TENANT;r=`${t.azureCloudInstance}/${o}/`}return r||e}static createCloudDiscoveryMetadataFromHost(e){return{preferred_network:e,preferred_cache:e,aliases:[e]}}getPreferredCache(){if(this.managedIdentity)return V.DEFAULT_AUTHORITY_HOST;if(this.discoveryComplete())return this.metadata.preferred_cache;throw Y(ao)}isAlias(e){return this.metadata.aliases.indexOf(e)>-1}isAliasOfKnownMicrosoftAuthority(e){return Uw.has(e)}static isPublicCloudAuthority(e){return V.KNOWN_PUBLIC_CLOUDS.indexOf(e)>=0}static buildRegionalAuthorityString(e,t,r){const o=new De(e);o.validateAsUri();const a=o.getUrlComponents();let l=`${t}.${a.HostNameAndPort}`;this.isPublicCloudAuthority(a.HostNameAndPort)&&(l=`${t}.${V.REGIONAL_AUTH_PUBLIC_CLOUD_SUFFIX}`);const d=De.constructAuthorityUriFromObject({...o.getUrlComponents(),HostNameAndPort:l}).urlString;return r?`${d}?${r}`:d}static replaceWithRegionalInformation(e,t){const r={...e};return r.authorization_endpoint=Xt.buildRegionalAuthorityString(r.authorization_endpoint,t),r.token_endpoint=Xt.buildRegionalAuthorityString(r.token_endpoint,t),r.end_session_endpoint&&(r.end_session_endpoint=Xt.buildRegionalAuthorityString(r.end_session_endpoint,t)),r}static transformCIAMAuthority(e){let t=e;const o=new De(e).getUrlComponents();if(o.PathSegments.length===0&&o.HostNameAndPort.endsWith(V.CIAM_AUTH_URL)){const a=o.HostNameAndPort.split(".")[0];t=`${t}${a}${V.AAD_TENANT_DOMAIN_SUFFIX}`}return t}}Xt.reservedTenantDomains=new Set(["{tenant}","{tenantid}",$o.COMMON,$o.CONSUMERS,$o.ORGANIZATIONS]);function R2(n){var o;const r=(o=new De(n).getUrlComponents().PathSegments.slice(-1)[0])==null?void 0:o.toLowerCase();switch(r){case $o.COMMON:case $o.ORGANIZATIONS:case $o.CONSUMERS:return;default:return r}}function Hw(n){return n.endsWith(V.FORWARD_SLASH)?n:`${n}${V.FORWARD_SLASH}`}function O2(n){const e=n.cloudDiscoveryMetadata;let t;if(e)try{t=JSON.parse(e)}catch{throw Ze(om)}return{canonicalAuthority:n.authority?Hw(n.authority):void 0,knownAuthorities:n.knownAuthorities,cloudDiscoveryMetadata:t}}/*! @azure/msal-common v14.16.0 2024-11-05 */async function $w(n,e,t,r,o,a,l){l==null||l.addQueueMeasurement(x.AuthorityFactoryCreateDiscoveredInstance,a);const d=Xt.transformCIAMAuthority(Hw(n)),h=new Xt(d,e,t,r,o,a,l);try{return await Q(h.resolveEndpointsAsync.bind(h),x.AuthorityResolveEndpointsAsync,o,l,a)(),h}catch{throw Y(ao)}}/*! @azure/msal-common v14.16.0 2024-11-05 */class zo extends lt{constructor(e,t,r,o,a){super(e,t,r),this.name="ServerError",this.errorNo=o,this.status=a,Object.setPrototypeOf(this,zo.prototype)}}/*! @azure/msal-common v14.16.0 2024-11-05 */class Ur{static generateThrottlingStorageKey(e){return`${Es.THROTTLING_PREFIX}.${JSON.stringify(e)}`}static preProcess(e,t){var a;const r=Ur.generateThrottlingStorageKey(t),o=e.getThrottlingCache(r);if(o){if(o.throttleTime<Date.now()){e.removeItem(r);return}throw new zo(((a=o.errorCodes)==null?void 0:a.join(" "))||V.EMPTY_STRING,o.errorMessage,o.subError)}}static postProcess(e,t,r){if(Ur.checkResponseStatus(r)||Ur.checkResponseForRetryAfter(r)){const o={throttleTime:Ur.calculateThrottleTime(parseInt(r.headers[dn.RETRY_AFTER])),error:r.body.error,errorCodes:r.body.error_codes,errorMessage:r.body.error_description,subError:r.body.suberror};e.setThrottlingCache(Ur.generateThrottlingStorageKey(t),o)}}static checkResponseStatus(e){return e.status===429||e.status>=500&&e.status<600}static checkResponseForRetryAfter(e){return e.headers?e.headers.hasOwnProperty(dn.RETRY_AFTER)&&(e.status<200||e.status>=300):!1}static calculateThrottleTime(e){const t=e<=0?0:e,r=Date.now()/1e3;return Math.floor(Math.min(r+(t||Es.DEFAULT_THROTTLE_TIME_SECONDS),r+Es.DEFAULT_MAX_THROTTLE_TIME_SECONDS)*1e3)}static removeThrottle(e,t,r,o){const a={clientId:t,authority:r.authority,scopes:r.scopes,homeAccountIdentifier:o,claims:r.claims,authenticationScheme:r.authenticationScheme,resourceRequestMethod:r.resourceRequestMethod,resourceRequestUri:r.resourceRequestUri,shrClaims:r.shrClaims,sshKid:r.sshKid},l=this.generateThrottlingStorageKey(a);e.removeItem(l)}}/*! @azure/msal-common v14.16.0 2024-11-05 */class hu extends lt{constructor(e,t,r){super(e.errorCode,e.errorMessage,e.subError),Object.setPrototypeOf(this,hu.prototype),this.name="NetworkError",this.error=e,this.httpStatus=t,this.responseHeaders=r}}function ty(n,e,t){return new hu(n,e,t)}/*! @azure/msal-common v14.16.0 2024-11-05 */class dm{constructor(e,t){this.config=HF(e),this.logger=new Wo(this.config.loggerOptions,_w,Zf),this.cryptoUtils=this.config.cryptoInterface,this.cacheManager=this.config.storageInterface,this.networkClient=this.config.networkInterface,this.serverTelemetryManager=this.config.serverTelemetryManager,this.authority=this.config.authOptions.authority,this.performanceClient=t}createTokenRequestHeaders(e){const t={};if(t[dn.CONTENT_TYPE]=V.URL_FORM_CONTENT_TYPE,!this.config.systemOptions.preventCorsPreflight&&e)switch(e.type){case Bn.HOME_ACCOUNT_ID:try{const r=ma(e.credential);t[dn.CCS_HEADER]=`Oid:${r.uid}@${r.utid}`}catch(r){this.logger.verbose("Could not parse home account ID for CCS Header: "+r)}break;case Bn.UPN:t[dn.CCS_HEADER]=`UPN: ${e.credential}`;break}return t}async executePostToTokenEndpoint(e,t,r,o,a,l){var h;l&&((h=this.performanceClient)==null||h.addQueueMeasurement(l,a));const d=await this.sendPostRequest(o,e,{body:t,headers:r},a);return this.config.serverTelemetryManager&&d.status<500&&d.status!==429&&this.config.serverTelemetryManager.clearTelemetryCache(),d}async sendPostRequest(e,t,r,o){var l,d,h;Ur.preProcess(this.cacheManager,e);let a;try{a=await Q(this.networkClient.sendPostRequestAsync.bind(this.networkClient),x.NetworkClientSendPostRequestAsync,this.logger,this.performanceClient,o)(t,r);const f=a.headers||{};(d=this.performanceClient)==null||d.addFields({refreshTokenSize:((l=a.body.refresh_token)==null?void 0:l.length)||0,httpVerToken:f[dn.X_MS_HTTP_VERSION]||"",requestId:f[dn.X_MS_REQUEST_ID]||""},o)}catch(f){if(f instanceof hu){const g=f.responseHeaders;throw g&&((h=this.performanceClient)==null||h.addFields({httpVerToken:g[dn.X_MS_HTTP_VERSION]||"",requestId:g[dn.X_MS_REQUEST_ID]||"",contentTypeHeader:g[dn.CONTENT_TYPE]||void 0,contentLengthHeader:g[dn.CONTENT_LENGTH]||void 0,httpStatus:f.httpStatus},o)),f.error}throw f instanceof lt?f:Y(nw)}return Ur.postProcess(this.cacheManager,e,a),a}async updateAuthority(e,t){var a;(a=this.performanceClient)==null||a.addQueueMeasurement(x.UpdateTokenEndpointAuthority,t);const r=`https://${e}/${this.authority.tenant}/`,o=await $w(r,this.networkClient,this.cacheManager,this.authority.options,this.logger,t,this.performanceClient);this.authority=o}createTokenQueryParameters(e){const t=new ws(e.correlationId,this.performanceClient);return e.embeddedClientId&&t.addBrokerParameters({brokerClientId:this.config.authOptions.clientId,brokerRedirectUri:this.config.authOptions.redirectUri}),e.tokenQueryParameters&&t.addExtraQueryParameters(e.tokenQueryParameters),t.addCorrelationId(e.correlationId),t.createQueryString()}}/*! @azure/msal-common v14.16.0 2024-11-05 */const Ul="no_tokens_found",Kw="native_account_unavailable",hm="refresh_token_expired",P2="interaction_required",M2="consent_required",D2="login_required",fu="bad_token";/*! @azure/msal-common v14.16.0 2024-11-05 */const ny=[P2,M2,D2,fu],L2=["message_only","additional_action","basic_action","user_password_expired","consent_required","bad_token"],x2={[Ul]:"No refresh token found in the cache. Please sign-in.",[Kw]:"The requested account is not available in the native broker. It may have been deleted or logged out. Please sign-in again using an interactive API.",[hm]:"Refresh token has expired.",[fu]:"Identity provider returned bad_token due to an expired or invalid refresh token. Please invoke an interactive API to resolve."};class Tr extends lt{constructor(e,t,r,o,a,l,d,h){super(e,t,r),Object.setPrototypeOf(this,Tr.prototype),this.timestamp=o||V.EMPTY_STRING,this.traceId=a||V.EMPTY_STRING,this.correlationId=l||V.EMPTY_STRING,this.claims=d||V.EMPTY_STRING,this.name="InteractionRequiredAuthError",this.errorNo=h}}function ry(n,e,t){const r=!!n&&ny.indexOf(n)>-1,o=!!t&&L2.indexOf(t)>-1,a=!!e&&ny.some(l=>e.indexOf(l)>-1);return r||a||o}function rf(n){return new Tr(n,x2[n])}/*! @azure/msal-common v14.16.0 2024-11-05 */class Er{static setRequestState(e,t,r){const o=Er.generateLibraryState(e,r);return t?`${o}${V.RESOURCE_DELIM}${t}`:o}static generateLibraryState(e,t){if(!e)throw Y(Xh);const r={id:e.createNewGuid()};t&&(r.meta=t);const o=JSON.stringify(r);return e.base64Encode(o)}static parseRequestState(e,t){if(!e)throw Y(Xh);if(!t)throw Y(Ia);try{const r=t.split(V.RESOURCE_DELIM),o=r[0],a=r.length>1?r.slice(1).join(V.RESOURCE_DELIM):V.EMPTY_STRING,l=e.base64Decode(o),d=JSON.parse(l);return{userRequestState:a||V.EMPTY_STRING,libraryState:d}}catch{throw Y(Ia)}}}/*! @azure/msal-common v14.16.0 2024-11-05 */const U2={SW:"sw",UHW:"uhw"};class Aa{constructor(e,t){this.cryptoUtils=e,this.performanceClient=t}async generateCnf(e,t){var a;(a=this.performanceClient)==null||a.addQueueMeasurement(x.PopTokenGenerateCnf,e.correlationId);const r=await Q(this.generateKid.bind(this),x.PopTokenGenerateCnf,t,this.performanceClient,e.correlationId)(e),o=this.cryptoUtils.base64UrlEncode(JSON.stringify(r));return{kid:r.kid,reqCnfString:o}}async generateKid(e){var r;return(r=this.performanceClient)==null||r.addQueueMeasurement(x.PopTokenGenerateKid,e.correlationId),{kid:await this.cryptoUtils.getPublicKeyThumbprint(e),xms_ksl:U2.SW}}async signPopToken(e,t,r){return this.signPayload(e,t,r)}async signPayload(e,t,r,o){const{resourceRequestMethod:a,resourceRequestUri:l,shrClaims:d,shrNonce:h,shrOptions:f}=r,g=l?new De(l):void 0,_=g==null?void 0:g.getUrlComponents();return this.cryptoUtils.signJwt({at:e,ts:zr(),m:a==null?void 0:a.toUpperCase(),u:_==null?void 0:_.HostNameAndPort,nonce:h||this.cryptoUtils.createNewGuid(),p:_==null?void 0:_.AbsolutePath,q:_!=null&&_.QueryString?[[],_.QueryString]:void 0,client_claims:d||void 0,...o},t,f,r.correlationId)}}/*! @azure/msal-common v14.16.0 2024-11-05 */class B2{constructor(e,t){this.cache=e,this.hasChanged=t}get cacheHasChanged(){return this.hasChanged}get tokenCache(){return this.cache}}/*! @azure/msal-common v14.16.0 2024-11-05 */function V2(n){var r,o;const e="code=",t=(r=n.error_uri)==null?void 0:r.lastIndexOf(e);return t&&t>=0?(o=n.error_uri)==null?void 0:o.substring(t+e.length):void 0}class Ti{constructor(e,t,r,o,a,l,d){this.clientId=e,this.cacheStorage=t,this.cryptoObj=r,this.logger=o,this.serializableCache=a,this.persistencePlugin=l,this.performanceClient=d}validateServerAuthorizationCodeResponse(e,t){if(!e.state||!t)throw e.state?Y(Ol,"Cached State"):Y(Ol,"Server State");let r,o;try{r=decodeURIComponent(e.state)}catch{throw Y(Ia,e.state)}try{o=decodeURIComponent(t)}catch{throw Y(Ia,e.state)}if(r!==o)throw Y(iw);if(e.error||e.error_description||e.suberror){const a=V2(e);throw ry(e.error,e.error_description,e.suberror)?new Tr(e.error||"",e.error_description,e.suberror,e.timestamp||"",e.trace_id||"",e.correlation_id||"",e.claims||"",a):new zo(e.error||"",e.error_description,e.suberror,a)}}validateTokenResponse(e,t){var r;if(e.error||e.error_description||e.suberror){const o=`Error(s): ${e.error_codes||V.NOT_AVAILABLE} - Timestamp: ${e.timestamp||V.NOT_AVAILABLE} - Description: ${e.error_description||V.NOT_AVAILABLE} - Correlation ID: ${e.correlation_id||V.NOT_AVAILABLE} - Trace ID: ${e.trace_id||V.NOT_AVAILABLE}`,a=(r=e.error_codes)!=null&&r.length?e.error_codes[0]:void 0,l=new zo(e.error,o,e.suberror,a,e.status);if(t&&e.status&&e.status>=Gc.SERVER_ERROR_RANGE_START&&e.status<=Gc.SERVER_ERROR_RANGE_END){this.logger.warning(`executeTokenRequest:validateTokenResponse - AAD is currently unavailable and the access token is unable to be refreshed.
|
111
|
+
Error Description: ${l.message}`)}return null}return r||(this.logger.warning("The developer's authority was not found within the CloudInstanceDiscoveryMetadata returned from the network request."),this.logger.verbose("Creating custom Authority for custom domain scenario."),r=Xt.createCloudDiscoveryMetadataFromHost(this.hostnameAndPort)),r}isInKnownAuthorities(){return this.authorityOptions.knownAuthorities.filter(t=>t&&De.getDomainFromUrl(t).toLowerCase()===this.hostnameAndPort).length>0}static generateAuthority(e,t){let r;if(t&&t.azureCloudInstance!==em.None){const o=t.tenant?t.tenant:V.DEFAULT_COMMON_TENANT;r=`${t.azureCloudInstance}/${o}/`}return r||e}static createCloudDiscoveryMetadataFromHost(e){return{preferred_network:e,preferred_cache:e,aliases:[e]}}getPreferredCache(){if(this.managedIdentity)return V.DEFAULT_AUTHORITY_HOST;if(this.discoveryComplete())return this.metadata.preferred_cache;throw Y(ao)}isAlias(e){return this.metadata.aliases.indexOf(e)>-1}isAliasOfKnownMicrosoftAuthority(e){return Bw.has(e)}static isPublicCloudAuthority(e){return V.KNOWN_PUBLIC_CLOUDS.indexOf(e)>=0}static buildRegionalAuthorityString(e,t,r){const o=new De(e);o.validateAsUri();const a=o.getUrlComponents();let l=`${t}.${a.HostNameAndPort}`;this.isPublicCloudAuthority(a.HostNameAndPort)&&(l=`${t}.${V.REGIONAL_AUTH_PUBLIC_CLOUD_SUFFIX}`);const d=De.constructAuthorityUriFromObject({...o.getUrlComponents(),HostNameAndPort:l}).urlString;return r?`${d}?${r}`:d}static replaceWithRegionalInformation(e,t){const r={...e};return r.authorization_endpoint=Xt.buildRegionalAuthorityString(r.authorization_endpoint,t),r.token_endpoint=Xt.buildRegionalAuthorityString(r.token_endpoint,t),r.end_session_endpoint&&(r.end_session_endpoint=Xt.buildRegionalAuthorityString(r.end_session_endpoint,t)),r}static transformCIAMAuthority(e){let t=e;const o=new De(e).getUrlComponents();if(o.PathSegments.length===0&&o.HostNameAndPort.endsWith(V.CIAM_AUTH_URL)){const a=o.HostNameAndPort.split(".")[0];t=`${t}${a}${V.AAD_TENANT_DOMAIN_SUFFIX}`}return t}}Xt.reservedTenantDomains=new Set(["{tenant}","{tenantid}",$o.COMMON,$o.CONSUMERS,$o.ORGANIZATIONS]);function M2(n){var o;const r=(o=new De(n).getUrlComponents().PathSegments.slice(-1)[0])==null?void 0:o.toLowerCase();switch(r){case $o.COMMON:case $o.ORGANIZATIONS:case $o.CONSUMERS:return;default:return r}}function $w(n){return n.endsWith(V.FORWARD_SLASH)?n:`${n}${V.FORWARD_SLASH}`}function D2(n){const e=n.cloudDiscoveryMetadata;let t;if(e)try{t=JSON.parse(e)}catch{throw Ze(om)}return{canonicalAuthority:n.authority?$w(n.authority):void 0,knownAuthorities:n.knownAuthorities,cloudDiscoveryMetadata:t}}/*! @azure/msal-common v14.16.0 2024-11-05 */async function Kw(n,e,t,r,o,a,l){l==null||l.addQueueMeasurement(x.AuthorityFactoryCreateDiscoveredInstance,a);const d=Xt.transformCIAMAuthority($w(n)),h=new Xt(d,e,t,r,o,a,l);try{return await Q(h.resolveEndpointsAsync.bind(h),x.AuthorityResolveEndpointsAsync,o,l,a)(),h}catch{throw Y(ao)}}/*! @azure/msal-common v14.16.0 2024-11-05 */class zo extends lt{constructor(e,t,r,o,a){super(e,t,r),this.name="ServerError",this.errorNo=o,this.status=a,Object.setPrototypeOf(this,zo.prototype)}}/*! @azure/msal-common v14.16.0 2024-11-05 */class Ur{static generateThrottlingStorageKey(e){return`${Es.THROTTLING_PREFIX}.${JSON.stringify(e)}`}static preProcess(e,t){var a;const r=Ur.generateThrottlingStorageKey(t),o=e.getThrottlingCache(r);if(o){if(o.throttleTime<Date.now()){e.removeItem(r);return}throw new zo(((a=o.errorCodes)==null?void 0:a.join(" "))||V.EMPTY_STRING,o.errorMessage,o.subError)}}static postProcess(e,t,r){if(Ur.checkResponseStatus(r)||Ur.checkResponseForRetryAfter(r)){const o={throttleTime:Ur.calculateThrottleTime(parseInt(r.headers[dn.RETRY_AFTER])),error:r.body.error,errorCodes:r.body.error_codes,errorMessage:r.body.error_description,subError:r.body.suberror};e.setThrottlingCache(Ur.generateThrottlingStorageKey(t),o)}}static checkResponseStatus(e){return e.status===429||e.status>=500&&e.status<600}static checkResponseForRetryAfter(e){return e.headers?e.headers.hasOwnProperty(dn.RETRY_AFTER)&&(e.status<200||e.status>=300):!1}static calculateThrottleTime(e){const t=e<=0?0:e,r=Date.now()/1e3;return Math.floor(Math.min(r+(t||Es.DEFAULT_THROTTLE_TIME_SECONDS),r+Es.DEFAULT_MAX_THROTTLE_TIME_SECONDS)*1e3)}static removeThrottle(e,t,r,o){const a={clientId:t,authority:r.authority,scopes:r.scopes,homeAccountIdentifier:o,claims:r.claims,authenticationScheme:r.authenticationScheme,resourceRequestMethod:r.resourceRequestMethod,resourceRequestUri:r.resourceRequestUri,shrClaims:r.shrClaims,sshKid:r.sshKid},l=this.generateThrottlingStorageKey(a);e.removeItem(l)}}/*! @azure/msal-common v14.16.0 2024-11-05 */class hu extends lt{constructor(e,t,r){super(e.errorCode,e.errorMessage,e.subError),Object.setPrototypeOf(this,hu.prototype),this.name="NetworkError",this.error=e,this.httpStatus=t,this.responseHeaders=r}}function ty(n,e,t){return new hu(n,e,t)}/*! @azure/msal-common v14.16.0 2024-11-05 */class dm{constructor(e,t){this.config=WF(e),this.logger=new Wo(this.config.loggerOptions,vw,Zf),this.cryptoUtils=this.config.cryptoInterface,this.cacheManager=this.config.storageInterface,this.networkClient=this.config.networkInterface,this.serverTelemetryManager=this.config.serverTelemetryManager,this.authority=this.config.authOptions.authority,this.performanceClient=t}createTokenRequestHeaders(e){const t={};if(t[dn.CONTENT_TYPE]=V.URL_FORM_CONTENT_TYPE,!this.config.systemOptions.preventCorsPreflight&&e)switch(e.type){case Bn.HOME_ACCOUNT_ID:try{const r=ga(e.credential);t[dn.CCS_HEADER]=`Oid:${r.uid}@${r.utid}`}catch(r){this.logger.verbose("Could not parse home account ID for CCS Header: "+r)}break;case Bn.UPN:t[dn.CCS_HEADER]=`UPN: ${e.credential}`;break}return t}async executePostToTokenEndpoint(e,t,r,o,a,l){var h;l&&((h=this.performanceClient)==null||h.addQueueMeasurement(l,a));const d=await this.sendPostRequest(o,e,{body:t,headers:r},a);return this.config.serverTelemetryManager&&d.status<500&&d.status!==429&&this.config.serverTelemetryManager.clearTelemetryCache(),d}async sendPostRequest(e,t,r,o){var l,d,h;Ur.preProcess(this.cacheManager,e);let a;try{a=await Q(this.networkClient.sendPostRequestAsync.bind(this.networkClient),x.NetworkClientSendPostRequestAsync,this.logger,this.performanceClient,o)(t,r);const f=a.headers||{};(d=this.performanceClient)==null||d.addFields({refreshTokenSize:((l=a.body.refresh_token)==null?void 0:l.length)||0,httpVerToken:f[dn.X_MS_HTTP_VERSION]||"",requestId:f[dn.X_MS_REQUEST_ID]||""},o)}catch(f){if(f instanceof hu){const g=f.responseHeaders;throw g&&((h=this.performanceClient)==null||h.addFields({httpVerToken:g[dn.X_MS_HTTP_VERSION]||"",requestId:g[dn.X_MS_REQUEST_ID]||"",contentTypeHeader:g[dn.CONTENT_TYPE]||void 0,contentLengthHeader:g[dn.CONTENT_LENGTH]||void 0,httpStatus:f.httpStatus},o)),f.error}throw f instanceof lt?f:Y(rw)}return Ur.postProcess(this.cacheManager,e,a),a}async updateAuthority(e,t){var a;(a=this.performanceClient)==null||a.addQueueMeasurement(x.UpdateTokenEndpointAuthority,t);const r=`https://${e}/${this.authority.tenant}/`,o=await Kw(r,this.networkClient,this.cacheManager,this.authority.options,this.logger,t,this.performanceClient);this.authority=o}createTokenQueryParameters(e){const t=new ws(e.correlationId,this.performanceClient);return e.embeddedClientId&&t.addBrokerParameters({brokerClientId:this.config.authOptions.clientId,brokerRedirectUri:this.config.authOptions.redirectUri}),e.tokenQueryParameters&&t.addExtraQueryParameters(e.tokenQueryParameters),t.addCorrelationId(e.correlationId),t.createQueryString()}}/*! @azure/msal-common v14.16.0 2024-11-05 */const Ul="no_tokens_found",Ww="native_account_unavailable",hm="refresh_token_expired",L2="interaction_required",x2="consent_required",U2="login_required",fu="bad_token";/*! @azure/msal-common v14.16.0 2024-11-05 */const ny=[L2,x2,U2,fu],B2=["message_only","additional_action","basic_action","user_password_expired","consent_required","bad_token"],V2={[Ul]:"No refresh token found in the cache. Please sign-in.",[Ww]:"The requested account is not available in the native broker. It may have been deleted or logged out. Please sign-in again using an interactive API.",[hm]:"Refresh token has expired.",[fu]:"Identity provider returned bad_token due to an expired or invalid refresh token. Please invoke an interactive API to resolve."};class Tr extends lt{constructor(e,t,r,o,a,l,d,h){super(e,t,r),Object.setPrototypeOf(this,Tr.prototype),this.timestamp=o||V.EMPTY_STRING,this.traceId=a||V.EMPTY_STRING,this.correlationId=l||V.EMPTY_STRING,this.claims=d||V.EMPTY_STRING,this.name="InteractionRequiredAuthError",this.errorNo=h}}function ry(n,e,t){const r=!!n&&ny.indexOf(n)>-1,o=!!t&&B2.indexOf(t)>-1,a=!!e&&ny.some(l=>e.indexOf(l)>-1);return r||a||o}function rf(n){return new Tr(n,V2[n])}/*! @azure/msal-common v14.16.0 2024-11-05 */class Er{static setRequestState(e,t,r){const o=Er.generateLibraryState(e,r);return t?`${o}${V.RESOURCE_DELIM}${t}`:o}static generateLibraryState(e,t){if(!e)throw Y(Xh);const r={id:e.createNewGuid()};t&&(r.meta=t);const o=JSON.stringify(r);return e.base64Encode(o)}static parseRequestState(e,t){if(!e)throw Y(Xh);if(!t)throw Y(Sa);try{const r=t.split(V.RESOURCE_DELIM),o=r[0],a=r.length>1?r.slice(1).join(V.RESOURCE_DELIM):V.EMPTY_STRING,l=e.base64Decode(o),d=JSON.parse(l);return{userRequestState:a||V.EMPTY_STRING,libraryState:d}}catch{throw Y(Sa)}}}/*! @azure/msal-common v14.16.0 2024-11-05 */const F2={SW:"sw",UHW:"uhw"};class Aa{constructor(e,t){this.cryptoUtils=e,this.performanceClient=t}async generateCnf(e,t){var a;(a=this.performanceClient)==null||a.addQueueMeasurement(x.PopTokenGenerateCnf,e.correlationId);const r=await Q(this.generateKid.bind(this),x.PopTokenGenerateCnf,t,this.performanceClient,e.correlationId)(e),o=this.cryptoUtils.base64UrlEncode(JSON.stringify(r));return{kid:r.kid,reqCnfString:o}}async generateKid(e){var r;return(r=this.performanceClient)==null||r.addQueueMeasurement(x.PopTokenGenerateKid,e.correlationId),{kid:await this.cryptoUtils.getPublicKeyThumbprint(e),xms_ksl:F2.SW}}async signPopToken(e,t,r){return this.signPayload(e,t,r)}async signPayload(e,t,r,o){const{resourceRequestMethod:a,resourceRequestUri:l,shrClaims:d,shrNonce:h,shrOptions:f}=r,g=l?new De(l):void 0,_=g==null?void 0:g.getUrlComponents();return this.cryptoUtils.signJwt({at:e,ts:zr(),m:a==null?void 0:a.toUpperCase(),u:_==null?void 0:_.HostNameAndPort,nonce:h||this.cryptoUtils.createNewGuid(),p:_==null?void 0:_.AbsolutePath,q:_!=null&&_.QueryString?[[],_.QueryString]:void 0,client_claims:d||void 0,...o},t,f,r.correlationId)}}/*! @azure/msal-common v14.16.0 2024-11-05 */class H2{constructor(e,t){this.cache=e,this.hasChanged=t}get cacheHasChanged(){return this.hasChanged}get tokenCache(){return this.cache}}/*! @azure/msal-common v14.16.0 2024-11-05 */function $2(n){var r,o;const e="code=",t=(r=n.error_uri)==null?void 0:r.lastIndexOf(e);return t&&t>=0?(o=n.error_uri)==null?void 0:o.substring(t+e.length):void 0}class Si{constructor(e,t,r,o,a,l,d){this.clientId=e,this.cacheStorage=t,this.cryptoObj=r,this.logger=o,this.serializableCache=a,this.persistencePlugin=l,this.performanceClient=d}validateServerAuthorizationCodeResponse(e,t){if(!e.state||!t)throw e.state?Y(Ol,"Cached State"):Y(Ol,"Server State");let r,o;try{r=decodeURIComponent(e.state)}catch{throw Y(Sa,e.state)}try{o=decodeURIComponent(t)}catch{throw Y(Sa,e.state)}if(r!==o)throw Y(aw);if(e.error||e.error_description||e.suberror){const a=$2(e);throw ry(e.error,e.error_description,e.suberror)?new Tr(e.error||"",e.error_description,e.suberror,e.timestamp||"",e.trace_id||"",e.correlation_id||"",e.claims||"",a):new zo(e.error||"",e.error_description,e.suberror,a)}}validateTokenResponse(e,t){var r;if(e.error||e.error_description||e.suberror){const o=`Error(s): ${e.error_codes||V.NOT_AVAILABLE} - Timestamp: ${e.timestamp||V.NOT_AVAILABLE} - Description: ${e.error_description||V.NOT_AVAILABLE} - Correlation ID: ${e.correlation_id||V.NOT_AVAILABLE} - Trace ID: ${e.trace_id||V.NOT_AVAILABLE}`,a=(r=e.error_codes)!=null&&r.length?e.error_codes[0]:void 0,l=new zo(e.error,o,e.suberror,a,e.status);if(t&&e.status&&e.status>=Gc.SERVER_ERROR_RANGE_START&&e.status<=Gc.SERVER_ERROR_RANGE_END){this.logger.warning(`executeTokenRequest:validateTokenResponse - AAD is currently unavailable and the access token is unable to be refreshed.
|
112
112
|
${l}`);return}else if(t&&e.status&&e.status>=Gc.CLIENT_ERROR_RANGE_START&&e.status<=Gc.CLIENT_ERROR_RANGE_END){this.logger.warning(`executeTokenRequest:validateTokenResponse - AAD is currently available but is unable to refresh the access token.
|
113
|
-
${l}`);return}throw ry(e.error,e.error_description,e.suberror)?new Tr(e.error,e.error_description,e.suberror,e.timestamp||V.EMPTY_STRING,e.trace_id||V.EMPTY_STRING,e.correlation_id||V.EMPTY_STRING,e.claims||V.EMPTY_STRING,a):l}}async handleServerTokenResponse(e,t,r,o,a,l,d,h,f){var C;(C=this.performanceClient)==null||C.addQueueMeasurement(x.HandleServerTokenResponse,e.correlation_id);let g;if(e.id_token){if(g=Ai(e.id_token||V.EMPTY_STRING,this.cryptoObj.base64Decode),a&&a.nonce&&g.nonce!==a.nonce)throw Y(aw);if(o.maxAge||o.maxAge===0){const T=g.auth_time;if(!T)throw Y(Yf);vw(T,o.maxAge)}}this.homeAccountIdentifier=Pt.generateHomeAccountId(e.client_info||V.EMPTY_STRING,t.authorityType,this.logger,this.cryptoObj,g);let _;a&&a.state&&(_=Er.parseRequestState(this.cryptoObj,a.state)),e.key_id=e.key_id||o.sshKid||void 0;const p=this.generateCacheRecord(e,t,r,o,g,l,a);let w;try{if(this.persistencePlugin&&this.serializableCache&&(this.logger.verbose("Persistence enabled, calling beforeCacheAccess"),w=new B2(this.serializableCache,!0),await this.persistencePlugin.beforeCacheAccess(w)),d&&!h&&p.account){const T=p.account.generateAccountKey();if(!this.cacheStorage.getAccount(T,this.logger))return this.logger.warning("Account used to refresh tokens not in persistence, refreshed tokens will not be stored in the cache"),await Ti.generateAuthenticationResult(this.cryptoObj,t,p,!1,o,g,_,void 0,f)}await this.cacheStorage.saveCacheRecord(p,o.storeInCache,o.correlationId)}finally{this.persistencePlugin&&this.serializableCache&&w&&(this.logger.verbose("Persistence enabled, calling afterCacheAccess"),await this.persistencePlugin.afterCacheAccess(w))}return Ti.generateAuthenticationResult(this.cryptoObj,t,p,!1,o,g,_,e,f)}generateCacheRecord(e,t,r,o,a,l,d){const h=t.getPreferredCache();if(!h)throw Y(Qf);const f=Dw(a);let g,_;e.id_token&&a&&(g=cu(this.homeAccountIdentifier,h,e.id_token,this.clientId,f||""),_=fm(this.cacheStorage,t,this.homeAccountIdentifier,this.cryptoObj.base64Decode,a,e.client_info,h,f,d,void 0,this.logger));let p=null;if(e.access_token){const T=e.scope?_t.fromString(e.scope):new _t(o.scopes||[]),k=(typeof e.expires_in=="string"?parseInt(e.expires_in,10):e.expires_in)||0,I=(typeof e.ext_expires_in=="string"?parseInt(e.ext_expires_in,10):e.ext_expires_in)||0,N=(typeof e.refresh_in=="string"?parseInt(e.refresh_in,10):e.refresh_in)||void 0,D=r+k,L=D+I,K=N&&N>0?r+N:void 0;p=lu(this.homeAccountIdentifier,h,e.access_token,this.clientId,f||t.tenant||"",T.printScopes(),D,L,this.cryptoObj.base64Decode,K,e.token_type,l,e.key_id,o.claims,o.requestedClaimsHash)}let w=null;if(e.refresh_token){let T;if(e.refresh_token_expires_in){const k=typeof e.refresh_token_expires_in=="string"?parseInt(e.refresh_token_expires_in,10):e.refresh_token_expires_in;T=r+k}w=yw(this.homeAccountIdentifier,h,e.refresh_token,this.clientId,e.foci,l,T)}let C=null;return e.foci&&(C={clientId:this.clientId,environment:h,familyId:e.foci}),{account:_,idToken:g,accessToken:p,refreshToken:w,appMetadata:C}}static async generateAuthenticationResult(e,t,r,o,a,l,d,h,f){var D,L,K,q,M;let g=V.EMPTY_STRING,_=[],p=null,w,C,T=V.EMPTY_STRING;if(r.accessToken){if(r.accessToken.tokenType===je.POP&&!a.popKid){const ce=new Aa(e),{secret:ae,keyId:X}=r.accessToken;if(!X)throw Y(Xf);g=await ce.signPopToken(ae,X,a)}else g=r.accessToken.secret;_=_t.fromString(r.accessToken.target).asArray(),p=new Date(Number(r.accessToken.expiresOn)*1e3),w=new Date(Number(r.accessToken.extendedExpiresOn)*1e3),r.accessToken.refreshOn&&(C=new Date(Number(r.accessToken.refreshOn)*1e3))}r.appMetadata&&(T=r.appMetadata.familyId===Cs?Cs:"");const k=(l==null?void 0:l.oid)||(l==null?void 0:l.sub)||"",I=(l==null?void 0:l.tid)||"";h!=null&&h.spa_accountid&&r.account&&(r.account.nativeAccountId=h==null?void 0:h.spa_accountid);const N=r.account?sm(r.account.getAccountInfo(),void 0,l,(D=r.idToken)==null?void 0:D.secret):null;return{authority:t.canonicalAuthority,uniqueId:k,tenantId:I,scopes:_,account:N,idToken:((L=r==null?void 0:r.idToken)==null?void 0:L.secret)||"",idTokenClaims:l||{},accessToken:g,fromCache:o,expiresOn:p,extExpiresOn:w,refreshOn:C,correlationId:a.correlationId,requestId:f||V.EMPTY_STRING,familyId:T,tokenType:((K=r.accessToken)==null?void 0:K.tokenType)||V.EMPTY_STRING,state:d?d.userRequestState:V.EMPTY_STRING,cloudGraphHostName:((q=r.account)==null?void 0:q.cloudGraphHostName)||V.EMPTY_STRING,msGraphHost:((M=r.account)==null?void 0:M.msGraphHost)||V.EMPTY_STRING,code:h==null?void 0:h.spa_code,fromNativeBroker:!1}}}function fm(n,e,t,r,o,a,l,d,h,f,g){g==null||g.verbose("setCachedAccount called");const p=n.getAccountKeys().find(I=>I.startsWith(t));let w=null;p&&(w=n.getAccount(p,g));const C=w||Pt.createAccount({homeAccountId:t,idTokenClaims:o,clientInfo:a,environment:l,cloudGraphHostName:h==null?void 0:h.cloud_graph_host_name,msGraphHost:h==null?void 0:h.msgraph_host,nativeAccountId:f},e,r),T=C.tenantProfiles||[],k=d||C.realm;if(k&&!T.find(I=>I.tenantId===k)){const I=am(t,C.localAccountId,k,o);T.push(I)}return C.tenantProfiles=T,C}/*! @azure/msal-common v14.16.0 2024-11-05 */async function Ww(n,e,t){return typeof n=="string"?n:n({clientId:e,tokenEndpoint:t})}/*! @azure/msal-common v14.16.0 2024-11-05 */class zw extends dm{constructor(e,t){var r;super(e,t),this.includeRedirectUri=!0,this.oidcDefaultScopes=(r=this.config.authOptions.authority.options.OIDCOptions)==null?void 0:r.defaultScopes}async getAuthCodeUrl(e){var r;(r=this.performanceClient)==null||r.addQueueMeasurement(x.GetAuthCodeUrl,e.correlationId);const t=await Q(this.createAuthCodeUrlQueryString.bind(this),x.AuthClientCreateQueryString,this.logger,this.performanceClient,e.correlationId)(e);return De.appendQueryString(this.authority.authorizationEndpoint,t)}async acquireToken(e,t){var d,h;if((d=this.performanceClient)==null||d.addQueueMeasurement(x.AuthClientAcquireToken,e.correlationId),!e.code)throw Y(lw);const r=zr(),o=await Q(this.executeTokenRequest.bind(this),x.AuthClientExecuteTokenRequest,this.logger,this.performanceClient,e.correlationId)(this.authority,e),a=(h=o.headers)==null?void 0:h[dn.X_MS_REQUEST_ID],l=new Ti(this.config.authOptions.clientId,this.cacheManager,this.cryptoUtils,this.logger,this.config.serializableCache,this.config.persistencePlugin,this.performanceClient);return l.validateTokenResponse(o.body),Q(l.handleServerTokenResponse.bind(l),x.HandleServerTokenResponse,this.logger,this.performanceClient,e.correlationId)(o.body,this.authority,r,e,t,void 0,void 0,void 0,a)}handleFragmentResponse(e,t){if(new Ti(this.config.authOptions.clientId,this.cacheManager,this.cryptoUtils,this.logger,null,null).validateServerAuthorizationCodeResponse(e,t),!e.code)throw Y(mw);return e}getLogoutUri(e){if(!e)throw Ze(Sw);const t=this.createLogoutUrlQueryString(e);return De.appendQueryString(this.authority.endSessionEndpoint,t)}async executeTokenRequest(e,t){var f,g;(f=this.performanceClient)==null||f.addQueueMeasurement(x.AuthClientExecuteTokenRequest,t.correlationId);const r=this.createTokenQueryParameters(t),o=De.appendQueryString(e.tokenEndpoint,r),a=await Q(this.createTokenRequestBody.bind(this),x.AuthClientCreateTokenRequestBody,this.logger,this.performanceClient,t.correlationId)(t);let l;if(t.clientInfo)try{const _=Ml(t.clientInfo,this.cryptoUtils.base64Decode);l={credential:`${_.uid}${tn.CLIENT_INFO_SEPARATOR}${_.utid}`,type:Bn.HOME_ACCOUNT_ID}}catch(_){this.logger.verbose("Could not parse client info for CCS Header: "+_)}const d=this.createTokenRequestHeaders(l||t.ccsCredential),h={clientId:((g=t.tokenBodyParameters)==null?void 0:g.clientId)||this.config.authOptions.clientId,authority:e.canonicalAuthority,scopes:t.scopes,claims:t.claims,authenticationScheme:t.authenticationScheme,resourceRequestMethod:t.resourceRequestMethod,resourceRequestUri:t.resourceRequestUri,shrClaims:t.shrClaims,sshKid:t.sshKid};return Q(this.executePostToTokenEndpoint.bind(this),x.AuthorizationCodeClientExecutePostToTokenEndpoint,this.logger,this.performanceClient,t.correlationId)(o,a,d,h,t.correlationId,x.AuthorizationCodeClientExecutePostToTokenEndpoint)}async createTokenRequestBody(e){var o,a;(o=this.performanceClient)==null||o.addQueueMeasurement(x.AuthClientCreateTokenRequestBody,e.correlationId);const t=new ws(e.correlationId,this.performanceClient);if(t.addClientId(e.embeddedClientId||((a=e.tokenBodyParameters)==null?void 0:a[wi])||this.config.authOptions.clientId),this.includeRedirectUri?t.addRedirectUri(e.redirectUri):aa.validateRedirectUri(e.redirectUri),t.addScopes(e.scopes,!0,this.oidcDefaultScopes),t.addAuthorizationCode(e.code),t.addLibraryInfo(this.config.libraryInfo),t.addApplicationTelemetry(this.config.telemetry.application),t.addThrottling(),this.serverTelemetryManager&&!tf(this.config)&&t.addServerTelemetry(this.serverTelemetryManager),e.codeVerifier&&t.addCodeVerifier(e.codeVerifier),this.config.clientCredentials.clientSecret&&t.addClientSecret(this.config.clientCredentials.clientSecret),this.config.clientCredentials.clientAssertion){const l=this.config.clientCredentials.clientAssertion;t.addClientAssertion(await Ww(l.assertion,this.config.authOptions.clientId,e.resourceRequestUri)),t.addClientAssertionType(l.assertionType)}if(t.addGrantType(XE.AUTHORIZATION_CODE_GRANT),t.addClientInfo(),e.authenticationScheme===je.POP){const l=new Aa(this.cryptoUtils,this.performanceClient);let d;e.popKid?d=this.cryptoUtils.encodeKid(e.popKid):d=(await Q(l.generateCnf.bind(l),x.PopTokenGenerateCnf,this.logger,this.performanceClient,e.correlationId)(e,this.logger)).reqCnfString,t.addPopToken(d)}else if(e.authenticationScheme===je.SSH)if(e.sshJwk)t.addSshJwk(e.sshJwk);else throw Ze(uu);(!Cr.isEmptyObj(e.claims)||this.config.authOptions.clientCapabilities&&this.config.authOptions.clientCapabilities.length>0)&&t.addClaims(e.claims,this.config.authOptions.clientCapabilities);let r;if(e.clientInfo)try{const l=Ml(e.clientInfo,this.cryptoUtils.base64Decode);r={credential:`${l.uid}${tn.CLIENT_INFO_SEPARATOR}${l.utid}`,type:Bn.HOME_ACCOUNT_ID}}catch(l){this.logger.verbose("Could not parse client info for CCS Header: "+l)}else r=e.ccsCredential;if(this.config.systemOptions.preventCorsPreflight&&r)switch(r.type){case Bn.HOME_ACCOUNT_ID:try{const l=ma(r.credential);t.addCcsOid(l)}catch(l){this.logger.verbose("Could not parse home account ID for CCS Header: "+l)}break;case Bn.UPN:t.addCcsUpn(r.credential);break}return e.embeddedClientId&&t.addBrokerParameters({brokerClientId:this.config.authOptions.clientId,brokerRedirectUri:this.config.authOptions.redirectUri}),e.tokenBodyParameters&&t.addExtraQueryParameters(e.tokenBodyParameters),e.enableSpaAuthorizationCode&&(!e.tokenBodyParameters||!e.tokenBodyParameters[ey])&&t.addExtraQueryParameters({[ey]:"1"}),t.createQueryString()}async createAuthCodeUrlQueryString(e){var a,l;const t=e.correlationId||this.config.cryptoInterface.createNewGuid();(a=this.performanceClient)==null||a.addQueueMeasurement(x.AuthClientCreateQueryString,t);const r=new ws(t,this.performanceClient);r.addClientId(e.embeddedClientId||((l=e.extraQueryParameters)==null?void 0:l[wi])||this.config.authOptions.clientId);const o=[...e.scopes||[],...e.extraScopesToConsent||[]];if(r.addScopes(o,!0,this.oidcDefaultScopes),r.addRedirectUri(e.redirectUri),r.addCorrelationId(t),r.addResponseMode(e.responseMode),r.addResponseTypeCode(),r.addLibraryInfo(this.config.libraryInfo),tf(this.config)||r.addApplicationTelemetry(this.config.telemetry.application),r.addClientInfo(),e.codeChallenge&&e.codeChallengeMethod&&r.addCodeChallengeParams(e.codeChallenge,e.codeChallengeMethod),e.prompt&&r.addPrompt(e.prompt),e.domainHint&&r.addDomainHint(e.domainHint),e.prompt!==Bt.SELECT_ACCOUNT)if(e.sid&&e.prompt===Bt.NONE)this.logger.verbose("createAuthCodeUrlQueryString: Prompt is none, adding sid from request"),r.addSid(e.sid);else if(e.account){const d=this.extractAccountSid(e.account);let h=this.extractLoginHint(e.account);if(h&&e.domainHint&&(this.logger.warning('AuthorizationCodeClient.createAuthCodeUrlQueryString: "domainHint" param is set, skipping opaque "login_hint" claim. Please consider not passing domainHint'),h=null),h){this.logger.verbose("createAuthCodeUrlQueryString: login_hint claim present on account"),r.addLoginHint(h);try{const f=ma(e.account.homeAccountId);r.addCcsOid(f)}catch{this.logger.verbose("createAuthCodeUrlQueryString: Could not parse home account ID for CCS Header")}}else if(d&&e.prompt===Bt.NONE){this.logger.verbose("createAuthCodeUrlQueryString: Prompt is none, adding sid from account"),r.addSid(d);try{const f=ma(e.account.homeAccountId);r.addCcsOid(f)}catch{this.logger.verbose("createAuthCodeUrlQueryString: Could not parse home account ID for CCS Header")}}else if(e.loginHint)this.logger.verbose("createAuthCodeUrlQueryString: Adding login_hint from request"),r.addLoginHint(e.loginHint),r.addCcsUpn(e.loginHint);else if(e.account.username){this.logger.verbose("createAuthCodeUrlQueryString: Adding login_hint from account"),r.addLoginHint(e.account.username);try{const f=ma(e.account.homeAccountId);r.addCcsOid(f)}catch{this.logger.verbose("createAuthCodeUrlQueryString: Could not parse home account ID for CCS Header")}}}else e.loginHint&&(this.logger.verbose("createAuthCodeUrlQueryString: No account, adding login_hint from request"),r.addLoginHint(e.loginHint),r.addCcsUpn(e.loginHint));else this.logger.verbose("createAuthCodeUrlQueryString: Prompt is select_account, ignoring account hints");if(e.nonce&&r.addNonce(e.nonce),e.state&&r.addState(e.state),(e.claims||this.config.authOptions.clientCapabilities&&this.config.authOptions.clientCapabilities.length>0)&&r.addClaims(e.claims,this.config.authOptions.clientCapabilities),e.embeddedClientId&&r.addBrokerParameters({brokerClientId:this.config.authOptions.clientId,brokerRedirectUri:this.config.authOptions.redirectUri}),this.addExtraQueryParams(e,r),e.nativeBroker&&(r.addNativeBroker(),e.authenticationScheme===je.POP)){const d=new Aa(this.cryptoUtils);let h;e.popKid?h=this.cryptoUtils.encodeKid(e.popKid):h=(await Q(d.generateCnf.bind(d),x.PopTokenGenerateCnf,this.logger,this.performanceClient,e.correlationId)(e,this.logger)).reqCnfString,r.addPopToken(h)}return r.createQueryString()}createLogoutUrlQueryString(e){const t=new ws(e.correlationId,this.performanceClient);return e.postLogoutRedirectUri&&t.addPostLogoutRedirectUri(e.postLogoutRedirectUri),e.correlationId&&t.addCorrelationId(e.correlationId),e.idTokenHint&&t.addIdTokenHint(e.idTokenHint),e.state&&t.addState(e.state),e.logoutHint&&t.addLogoutHint(e.logoutHint),this.addExtraQueryParams(e,t),t.createQueryString()}addExtraQueryParams(e,t){!(e.extraQueryParameters&&e.extraQueryParameters.hasOwnProperty("instance_aware"))&&this.config.authOptions.instanceAware&&(e.extraQueryParameters=e.extraQueryParameters||{},e.extraQueryParameters.instance_aware="true"),e.extraQueryParameters&&t.addExtraQueryParameters(e.extraQueryParameters)}extractAccountSid(e){var t;return((t=e.idTokenClaims)==null?void 0:t.sid)||null}extractLoginHint(e){var t;return((t=e.idTokenClaims)==null?void 0:t.login_hint)||null}}/*! @azure/msal-common v14.16.0 2024-11-05 */const F2=300;class of extends dm{constructor(e,t){super(e,t)}async acquireToken(e){var l,d;(l=this.performanceClient)==null||l.addQueueMeasurement(x.RefreshTokenClientAcquireToken,e.correlationId);const t=zr(),r=await Q(this.executeTokenRequest.bind(this),x.RefreshTokenClientExecuteTokenRequest,this.logger,this.performanceClient,e.correlationId)(e,this.authority),o=(d=r.headers)==null?void 0:d[dn.X_MS_REQUEST_ID],a=new Ti(this.config.authOptions.clientId,this.cacheManager,this.cryptoUtils,this.logger,this.config.serializableCache,this.config.persistencePlugin);return a.validateTokenResponse(r.body),Q(a.handleServerTokenResponse.bind(a),x.HandleServerTokenResponse,this.logger,this.performanceClient,e.correlationId)(r.body,this.authority,t,e,void 0,void 0,!0,e.forceCache,o)}async acquireTokenByRefreshToken(e){var r;if(!e)throw Ze(Iw);if((r=this.performanceClient)==null||r.addQueueMeasurement(x.RefreshTokenClientAcquireTokenByRefreshToken,e.correlationId),!e.account)throw Y(Jf);if(this.cacheManager.isAppMetadataFOCI(e.account.environment))try{return await Q(this.acquireTokenWithCachedRefreshToken.bind(this),x.RefreshTokenClientAcquireTokenWithCachedRefreshToken,this.logger,this.performanceClient,e.correlationId)(e,!0)}catch(o){const a=o instanceof Tr&&o.errorCode===Ul,l=o instanceof zo&&o.errorCode===Fv.INVALID_GRANT_ERROR&&o.subError===Fv.CLIENT_MISMATCH_ERROR;if(a||l)return Q(this.acquireTokenWithCachedRefreshToken.bind(this),x.RefreshTokenClientAcquireTokenWithCachedRefreshToken,this.logger,this.performanceClient,e.correlationId)(e,!1);throw o}return Q(this.acquireTokenWithCachedRefreshToken.bind(this),x.RefreshTokenClientAcquireTokenWithCachedRefreshToken,this.logger,this.performanceClient,e.correlationId)(e,!1)}async acquireTokenWithCachedRefreshToken(e,t){var a;(a=this.performanceClient)==null||a.addQueueMeasurement(x.RefreshTokenClientAcquireTokenWithCachedRefreshToken,e.correlationId);const r=ki(this.cacheManager.getRefreshToken.bind(this.cacheManager),x.CacheManagerGetRefreshToken,this.logger,this.performanceClient,e.correlationId)(e.account,t,void 0,this.performanceClient,e.correlationId);if(!r)throw rf(Ul);if(r.expiresOn&&ef(r.expiresOn,e.refreshTokenExpirationOffsetSeconds||F2))throw rf(hm);const o={...e,refreshToken:r.secret,authenticationScheme:e.authenticationScheme||je.BEARER,ccsCredential:{credential:e.account.homeAccountId,type:Bn.HOME_ACCOUNT_ID}};try{return await Q(this.acquireToken.bind(this),x.RefreshTokenClientAcquireToken,this.logger,this.performanceClient,e.correlationId)(o)}catch(l){if(l instanceof Tr&&l.subError===fu){this.logger.verbose("acquireTokenWithRefreshToken: bad refresh token, removing from cache");const d=fa(r);this.cacheManager.removeRefreshToken(d)}throw l}}async executeTokenRequest(e,t){var h,f;(h=this.performanceClient)==null||h.addQueueMeasurement(x.RefreshTokenClientExecuteTokenRequest,e.correlationId);const r=this.createTokenQueryParameters(e),o=De.appendQueryString(t.tokenEndpoint,r),a=await Q(this.createTokenRequestBody.bind(this),x.RefreshTokenClientCreateTokenRequestBody,this.logger,this.performanceClient,e.correlationId)(e),l=this.createTokenRequestHeaders(e.ccsCredential),d={clientId:((f=e.tokenBodyParameters)==null?void 0:f.clientId)||this.config.authOptions.clientId,authority:t.canonicalAuthority,scopes:e.scopes,claims:e.claims,authenticationScheme:e.authenticationScheme,resourceRequestMethod:e.resourceRequestMethod,resourceRequestUri:e.resourceRequestUri,shrClaims:e.shrClaims,sshKid:e.sshKid};return Q(this.executePostToTokenEndpoint.bind(this),x.RefreshTokenClientExecutePostToTokenEndpoint,this.logger,this.performanceClient,e.correlationId)(o,a,l,d,e.correlationId,x.RefreshTokenClientExecutePostToTokenEndpoint)}async createTokenRequestBody(e){var o,a,l;(o=this.performanceClient)==null||o.addQueueMeasurement(x.RefreshTokenClientCreateTokenRequestBody,e.correlationId);const t=e.correlationId,r=new ws(t,this.performanceClient);if(r.addClientId(e.embeddedClientId||((a=e.tokenBodyParameters)==null?void 0:a[wi])||this.config.authOptions.clientId),e.redirectUri&&r.addRedirectUri(e.redirectUri),r.addScopes(e.scopes,!0,(l=this.config.authOptions.authority.options.OIDCOptions)==null?void 0:l.defaultScopes),r.addGrantType(XE.REFRESH_TOKEN_GRANT),r.addClientInfo(),r.addLibraryInfo(this.config.libraryInfo),r.addApplicationTelemetry(this.config.telemetry.application),r.addThrottling(),this.serverTelemetryManager&&!tf(this.config)&&r.addServerTelemetry(this.serverTelemetryManager),r.addRefreshToken(e.refreshToken),this.config.clientCredentials.clientSecret&&r.addClientSecret(this.config.clientCredentials.clientSecret),this.config.clientCredentials.clientAssertion){const d=this.config.clientCredentials.clientAssertion;r.addClientAssertion(await Ww(d.assertion,this.config.authOptions.clientId,e.resourceRequestUri)),r.addClientAssertionType(d.assertionType)}if(e.authenticationScheme===je.POP){const d=new Aa(this.cryptoUtils,this.performanceClient);let h;e.popKid?h=this.cryptoUtils.encodeKid(e.popKid):h=(await Q(d.generateCnf.bind(d),x.PopTokenGenerateCnf,this.logger,this.performanceClient,e.correlationId)(e,this.logger)).reqCnfString,r.addPopToken(h)}else if(e.authenticationScheme===je.SSH)if(e.sshJwk)r.addSshJwk(e.sshJwk);else throw Ze(uu);if((!Cr.isEmptyObj(e.claims)||this.config.authOptions.clientCapabilities&&this.config.authOptions.clientCapabilities.length>0)&&r.addClaims(e.claims,this.config.authOptions.clientCapabilities),this.config.systemOptions.preventCorsPreflight&&e.ccsCredential)switch(e.ccsCredential.type){case Bn.HOME_ACCOUNT_ID:try{const d=ma(e.ccsCredential.credential);r.addCcsOid(d)}catch(d){this.logger.verbose("Could not parse home account ID for CCS Header: "+d)}break;case Bn.UPN:r.addCcsUpn(e.ccsCredential.credential);break}return e.embeddedClientId&&r.addBrokerParameters({brokerClientId:this.config.authOptions.clientId,brokerRedirectUri:this.config.authOptions.redirectUri}),e.tokenBodyParameters&&r.addExtraQueryParameters(e.tokenBodyParameters),r.createQueryString()}}/*! @azure/msal-common v14.16.0 2024-11-05 */class H2 extends dm{constructor(e,t){super(e,t)}async acquireToken(e){var t;try{const[r,o]=await this.acquireCachedToken({...e,scopes:(t=e.scopes)!=null&&t.length?e.scopes:[...Da]});return o===Mo.PROACTIVELY_REFRESHED&&(this.logger.info("SilentFlowClient:acquireCachedToken - Cached access token's refreshOn property has been exceeded'. It's not expired, but must be refreshed."),new of(this.config,this.performanceClient).acquireTokenByRefreshToken(e).catch(()=>{})),r}catch(r){if(r instanceof su&&r.errorCode===co)return new of(this.config,this.performanceClient).acquireTokenByRefreshToken(e);throw r}}async acquireCachedToken(e){var h;(h=this.performanceClient)==null||h.addQueueMeasurement(x.SilentFlowClientAcquireCachedToken,e.correlationId);let t=Mo.NOT_APPLICABLE;if(e.forceRefresh||!this.config.cacheOptions.claimsBasedCachingEnabled&&!Cr.isEmptyObj(e.claims))throw this.setCacheOutcome(Mo.FORCE_REFRESH_OR_CLAIMS,e.correlationId),Y(co);if(!e.account)throw Y(Jf);const r=e.account.tenantId||R2(e.authority),o=this.cacheManager.getTokenKeys(),a=this.cacheManager.getAccessToken(e.account,e,o,r,this.performanceClient,e.correlationId);if(a){if(pF(a.cachedAt)||ef(a.expiresOn,this.config.systemOptions.tokenRenewalOffsetSeconds))throw this.setCacheOutcome(Mo.CACHED_ACCESS_TOKEN_EXPIRED,e.correlationId),Y(co);a.refreshOn&&ef(a.refreshOn,0)&&(t=Mo.PROACTIVELY_REFRESHED)}else throw this.setCacheOutcome(Mo.NO_CACHED_ACCESS_TOKEN,e.correlationId),Y(co);const l=e.authority||this.authority.getPreferredCache(),d={account:this.cacheManager.readAccountFromCache(e.account),accessToken:a,idToken:this.cacheManager.getIdToken(e.account,o,r,this.performanceClient,e.correlationId),refreshToken:null,appMetadata:this.cacheManager.readAppMetadataFromCache(l)};return this.setCacheOutcome(t,e.correlationId),this.config.serverTelemetryManager&&this.config.serverTelemetryManager.incrementCacheHits(),[await Q(this.generateResultFromCacheRecord.bind(this),x.SilentFlowClientGenerateResultFromCacheRecord,this.logger,this.performanceClient,e.correlationId)(d,e),t]}setCacheOutcome(e,t){var r,o;(r=this.serverTelemetryManager)==null||r.setCacheOutcome(e),(o=this.performanceClient)==null||o.addFields({cacheOutcome:e},t),e!==Mo.NOT_APPLICABLE&&this.logger.info(`Token refresh is required due to cache outcome: ${e}`)}async generateResultFromCacheRecord(e,t){var o;(o=this.performanceClient)==null||o.addQueueMeasurement(x.SilentFlowClientGenerateResultFromCacheRecord,t.correlationId);let r;if(e.idToken&&(r=Ai(e.idToken.secret,this.config.cryptoInterface.base64Decode)),t.maxAge||t.maxAge===0){const a=r==null?void 0:r.auth_time;if(!a)throw Y(Yf);vw(a,t.maxAge)}return Ti.generateAuthenticationResult(this.cryptoUtils,this.authority,e,!0,t,r)}}/*! @azure/msal-common v14.16.0 2024-11-05 */const $2={sendGetRequestAsync:()=>Promise.reject(Y(Ae)),sendPostRequestAsync:()=>Promise.reject(Y(Ae))};/*! @azure/msal-common v14.16.0 2024-11-05 */const oy=",",Gw="|";function K2(n){const{skus:e,libraryName:t,libraryVersion:r,extensionName:o,extensionVersion:a}=n,l=new Map([[0,[t,r]],[2,[o,a]]]);let d=[];if(e!=null&&e.length){if(d=e.split(oy),d.length<4)return e}else d=Array.from({length:4},()=>Gw);return l.forEach((h,f)=>{var g,_;h.length===2&&((g=h[0])!=null&&g.length)&&((_=h[1])!=null&&_.length)&&W2({skuArr:d,index:f,skuName:h[0],skuVersion:h[1]})}),d.join(oy)}function W2(n){const{skuArr:e,index:t,skuName:r,skuVersion:o}=n;t>=e.length||(e[t]=[r,o].join(Gw))}class Ds{constructor(e,t){this.cacheOutcome=Mo.NOT_APPLICABLE,this.cacheManager=t,this.apiId=e.apiId,this.correlationId=e.correlationId,this.wrapperSKU=e.wrapperSKU||V.EMPTY_STRING,this.wrapperVer=e.wrapperVer||V.EMPTY_STRING,this.telemetryCacheKey=Wt.CACHE_KEY+tn.CACHE_KEY_SEPARATOR+e.clientId}generateCurrentRequestHeaderValue(){const e=`${this.apiId}${Wt.VALUE_SEPARATOR}${this.cacheOutcome}`,t=[this.wrapperSKU,this.wrapperVer],r=this.getNativeBrokerErrorCode();r!=null&&r.length&&t.push(`broker_error=${r}`);const o=t.join(Wt.VALUE_SEPARATOR),a=this.getRegionDiscoveryFields(),l=[e,a].join(Wt.VALUE_SEPARATOR);return[Wt.SCHEMA_VERSION,l,o].join(Wt.CATEGORY_SEPARATOR)}generateLastRequestHeaderValue(){const e=this.getLastRequests(),t=Ds.maxErrorsToSend(e),r=e.failedRequests.slice(0,2*t).join(Wt.VALUE_SEPARATOR),o=e.errors.slice(0,t).join(Wt.VALUE_SEPARATOR),a=e.errors.length,l=t<a?Wt.OVERFLOW_TRUE:Wt.OVERFLOW_FALSE,d=[a,l].join(Wt.VALUE_SEPARATOR);return[Wt.SCHEMA_VERSION,e.cacheHits,r,o,d].join(Wt.CATEGORY_SEPARATOR)}cacheFailedRequest(e){const t=this.getLastRequests();t.errors.length>=Wt.MAX_CACHED_ERRORS&&(t.failedRequests.shift(),t.failedRequests.shift(),t.errors.shift()),t.failedRequests.push(this.apiId,this.correlationId),e instanceof Error&&e&&e.toString()?e instanceof lt?e.subError?t.errors.push(e.subError):e.errorCode?t.errors.push(e.errorCode):t.errors.push(e.toString()):t.errors.push(e.toString()):t.errors.push(Wt.UNKNOWN_ERROR),this.cacheManager.setServerTelemetry(this.telemetryCacheKey,t)}incrementCacheHits(){const e=this.getLastRequests();return e.cacheHits+=1,this.cacheManager.setServerTelemetry(this.telemetryCacheKey,e),e.cacheHits}getLastRequests(){const e={failedRequests:[],errors:[],cacheHits:0};return this.cacheManager.getServerTelemetry(this.telemetryCacheKey)||e}clearTelemetryCache(){const e=this.getLastRequests(),t=Ds.maxErrorsToSend(e),r=e.errors.length;if(t===r)this.cacheManager.removeItem(this.telemetryCacheKey);else{const o={failedRequests:e.failedRequests.slice(t*2),errors:e.errors.slice(t),cacheHits:0};this.cacheManager.setServerTelemetry(this.telemetryCacheKey,o)}}static maxErrorsToSend(e){let t,r=0,o=0;const a=e.errors.length;for(t=0;t<a;t++){const l=e.failedRequests[2*t]||V.EMPTY_STRING,d=e.failedRequests[2*t+1]||V.EMPTY_STRING,h=e.errors[t]||V.EMPTY_STRING;if(o+=l.toString().length+d.toString().length+h.length+3,o<Wt.MAX_LAST_HEADER_BYTES)r+=1;else break}return r}getRegionDiscoveryFields(){const e=[];return e.push(this.regionUsed||V.EMPTY_STRING),e.push(this.regionSource||V.EMPTY_STRING),e.push(this.regionOutcome||V.EMPTY_STRING),e.join(",")}updateRegionDiscoveryMetadata(e){this.regionUsed=e.region_used,this.regionSource=e.region_source,this.regionOutcome=e.region_outcome}setCacheOutcome(e){this.cacheOutcome=e}setNativeBrokerErrorCode(e){const t=this.getLastRequests();t.nativeBrokerErrorCode=e,this.cacheManager.setServerTelemetry(this.telemetryCacheKey,t)}getNativeBrokerErrorCode(){return this.getLastRequests().nativeBrokerErrorCode}clearNativeBrokerErrorCode(){const e=this.getLastRequests();delete e.nativeBrokerErrorCode,this.cacheManager.setServerTelemetry(this.telemetryCacheKey,e)}static makeExtraSkuString(e){return K2(e)}}/*! @azure/msal-common v14.16.0 2024-11-05 */const qw="missing_kid_error",jw="missing_alg_error";/*! @azure/msal-common v14.16.0 2024-11-05 */const z2={[qw]:"The JOSE Header for the requested JWT, JWS or JWK object requires a keyId to be configured as the 'kid' header claim. No 'kid' value was provided.",[jw]:"The JOSE Header for the requested JWT, JWS or JWK object requires an algorithm to be specified as the 'alg' header claim. No 'alg' value was provided."};class mm extends lt{constructor(e,t){super(e,t),this.name="JoseHeaderError",Object.setPrototypeOf(this,mm.prototype)}}function iy(n){return new mm(n,z2[n])}/*! @azure/msal-common v14.16.0 2024-11-05 */class gm{constructor(e){this.typ=e.typ,this.alg=e.alg,this.kid=e.kid}static getShrHeaderString(e){if(!e.kid)throw iy(qw);if(!e.alg)throw iy(jw);const t=new gm({typ:e.typ||eF.Pop,kid:e.kid,alg:e.alg});return JSON.stringify(t)}}/*! @azure/msal-common v14.16.0 2024-11-05 */class ay{startMeasurement(){}endMeasurement(){}flushMeasurement(){return null}}class G2{generateId(){return"callback-id"}startMeasurement(e,t){return{end:()=>null,discard:()=>{},add:()=>{},increment:()=>{},event:{eventId:this.generateId(),status:N2.InProgress,authority:"",libraryName:"",libraryVersion:"",clientId:"",name:e,startTimeMs:Date.now(),correlationId:t||""},measurement:new ay}}startPerformanceMeasurement(){return new ay}calculateQueuedTime(){return 0}addQueueMeasurement(){}setPreQueueTime(){}endMeasurement(){return null}discardMeasurements(){}removePerformanceCallback(){return!0}addPerformanceCallback(){return""}emitEvents(){}addFields(){}incrementFields(){}cacheEventByCorrelationId(){}}/*! @azure/msal-browser v3.28.1 2025-01-14 */const pm="pkce_not_created",af="crypto_nonexistent",mu="empty_navigate_uri",Yw="hash_empty_error",_m="no_state_in_hash",Jw="hash_does_not_contain_known_properties",Qw="unable_to_parse_state",Xw="state_interaction_type_mismatch",Zw="interaction_in_progress",eT="popup_window_error",tT="empty_window_error",bi="user_cancelled",q2="monitor_popup_timeout",nT="monitor_window_timeout",rT="redirect_in_iframe",oT="block_iframe_reload",iT="block_nested_popups",j2="iframe_closed_prematurely",gu="silent_logout_unsupported",aT="no_account_error",Y2="silent_prompt_value_error",sT="no_token_request_cache_error",cT="unable_to_parse_token_request_cache_error",vm="no_cached_authority_error",J2="auth_request_not_set_error",Q2="invalid_cache_type",pu="non_browser_environment",sa="database_not_open",Bl="no_network_connectivity",lT="post_request_failed",uT="get_request_failed",sf="failed_to_parse_response",dT="unable_to_load_token",ym="crypto_key_not_found",hT="auth_code_required",fT="auth_code_or_nativeAccountId_required",mT="spa_code_and_nativeAccountId_present",Cm="database_unavailable",gT="unable_to_acquire_token_from_native_platform",pT="native_handshake_timeout",_T="native_extension_not_installed",qs="native_connection_not_established",vT="uninitialized_public_client_application",yT="native_prompt_not_supported",CT="invalid_base64_string",ET="invalid_pop_token_request",wT="failed_to_build_headers",TT="failed_to_parse_headers";/*! @azure/msal-browser v3.28.1 2025-01-14 */const io="For more visit: aka.ms/msaljs/browser-errors",X2={[pm]:"The PKCE code challenge and verifier could not be generated.",[af]:"The crypto object or function is not available.",[mu]:"Navigation URI is empty. Please check stack trace for more info.",[Yw]:`Hash value cannot be processed because it is empty. Please verify that your redirectUri is not clearing the hash. ${io}`,[_m]:"Hash does not contain state. Please verify that the request originated from msal.",[Jw]:`Hash does not contain known properites. Please verify that your redirectUri is not changing the hash. ${io}`,[Qw]:"Unable to parse state. Please verify that the request originated from msal.",[Xw]:"Hash contains state but the interaction type does not match the caller.",[Zw]:`Interaction is currently in progress. Please ensure that this interaction has been completed before calling an interactive API. ${io}`,[eT]:"Error opening popup window. This can happen if you are using IE or if popups are blocked in the browser.",[tT]:"window.open returned null or undefined window object.",[bi]:"User cancelled the flow.",[q2]:`Token acquisition in popup failed due to timeout. ${io}`,[nT]:`Token acquisition in iframe failed due to timeout. ${io}`,[rT]:"Redirects are not supported for iframed or brokered applications. Please ensure you are using MSAL.js in a top frame of the window if using the redirect APIs, or use the popup APIs.",[oT]:`Request was blocked inside an iframe because MSAL detected an authentication response. ${io}`,[iT]:"Request was blocked inside a popup because MSAL detected it was running in a popup.",[j2]:"The iframe being monitored was closed prematurely.",[gu]:"Silent logout not supported. Please call logoutRedirect or logoutPopup instead.",[aT]:"No account object provided to acquireTokenSilent and no active account has been set. Please call setActiveAccount or provide an account on the request.",[Y2]:"The value given for the prompt value is not valid for silent requests - must be set to 'none' or 'no_session'.",[sT]:"No token request found in cache.",[cT]:"The cached token request could not be parsed.",[vm]:"No cached authority found.",[J2]:"Auth Request not set. Please ensure initiateAuthRequest was called from the InteractionHandler",[Q2]:"Invalid cache type",[pu]:"Login and token requests are not supported in non-browser environments.",[sa]:"Database is not open!",[Bl]:"No network connectivity. Check your internet connection.",[lT]:"Network request failed: If the browser threw a CORS error, check that the redirectUri is registered in the Azure App Portal as type 'SPA'",[uT]:"Network request failed. Please check the network trace to determine root cause.",[sf]:"Failed to parse network response. Check network trace.",[dT]:"Error loading token to cache.",[ym]:"Cryptographic Key or Keypair not found in browser storage.",[hT]:"An authorization code must be provided (as the `code` property on the request) to this flow.",[fT]:"An authorization code or nativeAccountId must be provided to this flow.",[mT]:"Request cannot contain both spa code and native account id.",[Cm]:"IndexedDB, which is required for persistent cryptographic key storage, is unavailable. This may be caused by browser privacy features which block persistent storage in third-party contexts.",[gT]:`Unable to acquire token from native platform. ${io}`,[pT]:"Timed out while attempting to establish connection to browser extension",[_T]:"Native extension is not installed. If you think this is a mistake call the initialize function.",[qs]:`Connection to native platform has not been established. Please install a compatible browser extension and run initialize(). ${io}`,[vT]:`You must call and await the initialize function before attempting to call any other MSAL API. ${io}`,[yT]:"The provided prompt is not supported by the native platform. This request should be routed to the web based flow.",[CT]:"Invalid base64 encoded string.",[ET]:"Invalid PoP token request. The request should not have both a popKid value and signPopToken set to true.",[wT]:"Failed to build request headers object.",[TT]:"Failed to parse response headers"};class js extends lt{constructor(e,t){super(e,X2[e],t),Object.setPrototypeOf(this,js.prototype),this.name="BrowserAuthError"}}function ie(n,e){return new js(n,e)}/*! @azure/msal-browser v3.28.1 2025-01-14 */const Dn={INTERACTION_IN_PROGRESS_VALUE:"interaction_in_progress",INVALID_GRANT_ERROR:"invalid_grant",POPUP_WIDTH:483,POPUP_HEIGHT:600,POPUP_NAME_PREFIX:"msal",DEFAULT_POLL_INTERVAL_MS:30,MSAL_SKU:"msal.js.browser"},ga={CHANNEL_ID:"53ee284d-920a-4b59-9d30-a60315b26836",PREFERRED_EXTENSION_ID:"ppnbnpeolgkicgegkbkbjmhlideopiji",MATS_TELEMETRY:"MATS"},pi={HandshakeRequest:"Handshake",HandshakeResponse:"HandshakeResponse",GetToken:"GetToken",Response:"Response"},vn={LocalStorage:"localStorage",SessionStorage:"sessionStorage",MemoryStorage:"memoryStorage"},sy={GET:"GET",POST:"POST"},Ke={AUTHORITY:"authority",ACQUIRE_TOKEN_ACCOUNT:"acquireToken.account",SESSION_STATE:"session.state",REQUEST_STATE:"request.state",NONCE_IDTOKEN:"nonce.id_token",ORIGIN_URI:"request.origin",RENEW_STATUS:"token.renew.status",URL_HASH:"urlHash",REQUEST_PARAMS:"request.params",SCOPES:"scopes",INTERACTION_STATUS_KEY:"interaction.status",CCS_CREDENTIAL:"ccs.credential",CORRELATION_ID:"request.correlationId",NATIVE_REQUEST:"request.native",REDIRECT_CONTEXT:"request.redirect.context"},Po={ACCOUNT_KEYS:"msal.account.keys",TOKEN_KEYS:"msal.token.keys"},Qc={WRAPPER_SKU:"wrapper.sku",WRAPPER_VER:"wrapper.version"},it={acquireTokenRedirect:861,acquireTokenPopup:862,ssoSilent:863,acquireTokenSilent_authCode:864,handleRedirectPromise:865,acquireTokenByCode:866,acquireTokenSilent_silentFlow:61,logout:961,logoutPopup:962};var le;(function(n){n.Redirect="redirect",n.Popup="popup",n.Silent="silent",n.None="none"})(le||(le={}));const cy={scopes:Da},bT="jwk",cf="msal.db",Z2=1,eH=`${cf}.keys`,Pn={Default:0,AccessToken:1,AccessTokenAndRefreshToken:2,RefreshToken:3,RefreshTokenAndNetwork:4,Skip:5},tH=[Pn.Default,Pn.Skip,Pn.RefreshTokenAndNetwork],nH="msal.browser.log.level",rH="msal.browser.log.pii";/*! @azure/msal-browser v3.28.1 2025-01-14 */function Xc(n){return encodeURIComponent(Em(n).replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_"))}function _u(n){return IT(n).replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")}function Em(n){return IT(new TextEncoder().encode(n))}function IT(n){const e=Array.from(n,t=>String.fromCodePoint(t)).join("");return btoa(e)}/*! @azure/msal-browser v3.28.1 2025-01-14 */const oH="RSASSA-PKCS1-v1_5",ST="SHA-256",iH=2048,aH=new Uint8Array([1,0,1]),ly="0123456789abcdef",uy=new Uint32Array(1),sH="crypto_subtle_undefined",wm={name:oH,hash:ST,modulusLength:iH,publicExponent:aH};function cH(n){if(!window)throw ie(pu);if(!window.crypto)throw ie(af);if(!n&&!window.crypto.subtle)throw ie(af,sH)}async function AT(n,e,t){e==null||e.addQueueMeasurement(x.Sha256Digest,t);const o=new TextEncoder().encode(n);return window.crypto.subtle.digest(ST,o)}function lH(n){return window.crypto.getRandomValues(n)}function lh(){return window.crypto.getRandomValues(uy),uy[0]}function go(){const n=Date.now(),e=lh()*1024+(lh()&1023),t=new Uint8Array(16),r=Math.trunc(e/2**30),o=e&2**30-1,a=lh();t[0]=n/2**40,t[1]=n/2**32,t[2]=n/2**24,t[3]=n/2**16,t[4]=n/2**8,t[5]=n,t[6]=112|r>>>8,t[7]=r,t[8]=128|o>>>24,t[9]=o>>>16,t[10]=o>>>8,t[11]=o,t[12]=a>>>24,t[13]=a>>>16,t[14]=a>>>8,t[15]=a;let l="";for(let d=0;d<t.length;d++)l+=ly.charAt(t[d]>>>4),l+=ly.charAt(t[d]&15),(d===3||d===5||d===7||d===9)&&(l+="-");return l}async function uH(n,e){return window.crypto.subtle.generateKey(wm,n,e)}async function uh(n){return window.crypto.subtle.exportKey(bT,n)}async function dH(n,e,t){return window.crypto.subtle.importKey(bT,n,wm,e,t)}async function hH(n,e){return window.crypto.subtle.sign(wm,n,e)}async function kT(n){const e=await AT(n),t=new Uint8Array(e);return _u(t)}/*! @azure/msal-browser v3.28.1 2025-01-14 */const Ls="storage_not_supported",lf="stubbed_public_client_application_called",Vl="in_mem_redirect_unavailable";/*! @azure/msal-browser v3.28.1 2025-01-14 */const yl={[Ls]:"Given storage configuration option was not supported.",[lf]:"Stub instance of Public Client Application was called. If using msal-react, please ensure context is not used without a provider. For more visit: aka.ms/msaljs/browser-errors",[Vl]:"Redirect cannot be supported. In-memory storage was selected and storeAuthStateInCookie=false, which would cause the library to be unable to handle the incoming hash. If you would like to use the redirect API, please use session/localStorage or set storeAuthStateInCookie=true."};yl[Ls],yl[lf],yl[Vl];class Tm extends lt{constructor(e,t){super(e,t),this.name="BrowserConfigurationAuthError",Object.setPrototypeOf(this,Tm.prototype)}}function bm(n){return new Tm(n,yl[n])}/*! @azure/msal-browser v3.28.1 2025-01-14 */function fH(n){n.location.hash="",typeof n.history.replaceState=="function"&&n.history.replaceState(null,"",`${n.location.origin}${n.location.pathname}${n.location.search}`)}function mH(n){const e=n.split("#");e.shift(),window.location.hash=e.length>0?e.join("#"):""}function Im(){return window.parent!==window}function gH(){return typeof window<"u"&&!!window.opener&&window.opener!==window&&typeof window.name=="string"&&window.name.indexOf(`${Dn.POPUP_NAME_PREFIX}.`)===0}function lo(){return typeof window<"u"&&window.location?window.location.href.split("?")[0].split("#")[0]:""}function pH(){const e=new De(window.location.href).getUrlComponents();return`${e.Protocol}//${e.HostNameAndPort}/`}function _H(){if(De.hashContainsKnownProperties(window.location.hash)&&Im())throw ie(oT)}function vH(n){if(Im()&&!n)throw ie(rT)}function yH(){if(gH())throw ie(iT)}function NT(){if(typeof window>"u")throw ie(pu)}function RT(n){if(!n)throw ie(vT)}function Sm(n){NT(),_H(),yH(),RT(n)}function dy(n,e){if(Sm(n),vH(e.system.allowRedirectInIframe),e.cache.cacheLocation===vn.MemoryStorage&&!e.cache.storeAuthStateInCookie)throw bm(Vl)}function OT(n){const e=document.createElement("link");e.rel="preconnect",e.href=new URL(n).origin,e.crossOrigin="anonymous",document.head.appendChild(e),window.setTimeout(()=>{try{document.head.removeChild(e)}catch{}},1e4)}function CH(){return go()}/*! @azure/msal-browser v3.28.1 2025-01-14 */class Fl{navigateInternal(e,t){return Fl.defaultNavigateWindow(e,t)}navigateExternal(e,t){return Fl.defaultNavigateWindow(e,t)}static defaultNavigateWindow(e,t){return t.noHistory?window.location.replace(e):window.location.assign(e),new Promise(r=>{setTimeout(()=>{r(!0)},t.timeout)})}}/*! @azure/msal-browser v3.28.1 2025-01-14 */class EH{async sendGetRequestAsync(e,t){let r,o={},a=0;const l=hy(t);try{r=await fetch(e,{method:sy.GET,headers:l})}catch{throw ie(window.navigator.onLine?uT:Bl)}o=fy(r.headers);try{return a=r.status,{headers:o,body:await r.json(),status:a}}catch{throw ty(ie(sf),a,o)}}async sendPostRequestAsync(e,t){const r=t&&t.body||"",o=hy(t);let a,l=0,d={};try{a=await fetch(e,{method:sy.POST,headers:o,body:r})}catch{throw ie(window.navigator.onLine?lT:Bl)}d=fy(a.headers);try{return l=a.status,{headers:d,body:await a.json(),status:l}}catch{throw ty(ie(sf),l,d)}}}function hy(n){try{const e=new Headers;if(!(n&&n.headers))return e;const t=n.headers;return Object.entries(t).forEach(([r,o])=>{e.append(r,o)}),e}catch{throw ie(wT)}}function fy(n){try{const e={};return n.forEach((t,r)=>{e[r]=t}),e}catch{throw ie(TT)}}/*! @azure/msal-browser v3.28.1 2025-01-14 */const wH=6e4,uf=1e4,TH=3e4,bH=2e3;function IH({auth:n,cache:e,system:t,telemetry:r},o){const a={clientId:V.EMPTY_STRING,authority:`${V.DEFAULT_AUTHORITY}`,knownAuthorities:[],cloudDiscoveryMetadata:V.EMPTY_STRING,authorityMetadata:V.EMPTY_STRING,redirectUri:typeof window<"u"?lo():"",postLogoutRedirectUri:V.EMPTY_STRING,navigateToLoginRequestUrl:!0,clientCapabilities:[],protocolMode:fo.AAD,OIDCOptions:{serverResponseType:Gs.FRAGMENT,defaultScopes:[V.OPENID_SCOPE,V.PROFILE_SCOPE,V.OFFLINE_ACCESS_SCOPE]},azureCloudOptions:{azureCloudInstance:em.None,tenant:V.EMPTY_STRING},skipAuthorityMetadataCache:!1,supportsNestedAppAuth:!1,instanceAware:!1},l={cacheLocation:vn.SessionStorage,temporaryCacheLocation:vn.SessionStorage,storeAuthStateInCookie:!1,secureCookies:!1,cacheMigrationEnabled:!!(e&&e.cacheLocation===vn.LocalStorage),claimsBasedCachingEnabled:!1},d={loggerCallback:()=>{},logLevel:nt.Info,piiLoggingEnabled:!1},f={...{...Vw,loggerOptions:d,networkClient:o?new EH:$2,navigationClient:new Fl,loadFrameTimeout:0,windowHashTimeout:(t==null?void 0:t.loadFrameTimeout)||wH,iframeHashTimeout:(t==null?void 0:t.loadFrameTimeout)||uf,navigateFrameWait:0,redirectNavigationTimeout:TH,asyncPopups:!1,allowRedirectInIframe:!1,allowNativeBroker:!1,nativeBrokerHandshakeTimeout:(t==null?void 0:t.nativeBrokerHandshakeTimeout)||bH,pollIntervalMilliseconds:Dn.DEFAULT_POLL_INTERVAL_MS},...t,loggerOptions:(t==null?void 0:t.loggerOptions)||d},g={application:{appName:V.EMPTY_STRING,appVersion:V.EMPTY_STRING},client:new G2};if((n==null?void 0:n.protocolMode)!==fo.OIDC&&(n!=null&&n.OIDCOptions)&&new Wo(f.loggerOptions).warning(JSON.stringify(Ze(Ow))),n!=null&&n.protocolMode&&n.protocolMode!==fo.AAD&&(f!=null&&f.allowNativeBroker))throw Ze(Pw);return{auth:{...a,...n,OIDCOptions:{...a.OIDCOptions,...n==null?void 0:n.OIDCOptions}},cache:{...l,...e},system:f,telemetry:{...g,...r}}}/*! @azure/msal-browser v3.28.1 2025-01-14 */const SH="@azure/msal-browser",vu="3.28.1";/*! @azure/msal-browser v3.28.1 2025-01-14 */class Am{static loggerCallback(e,t){switch(e){case nt.Error:console.error(t);return;case nt.Info:console.info(t);return;case nt.Verbose:console.debug(t);return;case nt.Warning:console.warn(t);return;default:console.log(t);return}}constructor(e){var h;this.browserEnvironment=typeof window<"u",this.config=IH(e,this.browserEnvironment);let t;try{t=window[vn.SessionStorage]}catch{}const r=t==null?void 0:t.getItem(nH),o=(h=t==null?void 0:t.getItem(rH))==null?void 0:h.toLowerCase(),a=o==="true"?!0:o==="false"?!1:void 0,l={...this.config.system.loggerOptions},d=r&&Object.keys(nt).includes(r)?nt[r]:void 0;d&&(l.loggerCallback=Am.loggerCallback,l.logLevel=d),a!==void 0&&(l.piiLoggingEnabled=a),this.logger=new Wo(l,SH,vu),this.available=!1}getConfig(){return this.config}getLogger(){return this.logger}isAvailable(){return this.available}isBrowserEnvironment(){return this.browserEnvironment}}/*! @azure/msal-browser v3.28.1 2025-01-14 */class Ii extends Am{getModuleName(){return Ii.MODULE_NAME}getId(){return Ii.ID}async initialize(){return this.available=typeof window<"u",this.available}}Ii.MODULE_NAME="";Ii.ID="StandardOperatingContext";/*! @azure/msal-browser v3.28.1 2025-01-14 */function Kr(n){return new TextDecoder().decode(AH(n))}function AH(n){let e=n.replace(/-/g,"+").replace(/_/g,"/");switch(e.length%4){case 0:break;case 2:e+="==";break;case 3:e+="=";break;default:throw ie(CT)}const t=atob(e);return Uint8Array.from(t,r=>r.codePointAt(0)||0)}/*! @azure/msal-browser v3.28.1 2025-01-14 */class kH{constructor(){this.dbName=cf,this.version=Z2,this.tableName=eH,this.dbOpen=!1}async open(){return new Promise((e,t)=>{const r=window.indexedDB.open(this.dbName,this.version);r.addEventListener("upgradeneeded",o=>{o.target.result.createObjectStore(this.tableName)}),r.addEventListener("success",o=>{const a=o;this.db=a.target.result,this.dbOpen=!0,e()}),r.addEventListener("error",()=>t(ie(Cm)))})}closeConnection(){const e=this.db;e&&this.dbOpen&&(e.close(),this.dbOpen=!1)}async validateDbIsOpen(){if(!this.dbOpen)return this.open()}async getItem(e){return await this.validateDbIsOpen(),new Promise((t,r)=>{if(!this.db)return r(ie(sa));const l=this.db.transaction([this.tableName],"readonly").objectStore(this.tableName).get(e);l.addEventListener("success",d=>{const h=d;this.closeConnection(),t(h.target.result)}),l.addEventListener("error",d=>{this.closeConnection(),r(d)})})}async setItem(e,t){return await this.validateDbIsOpen(),new Promise((r,o)=>{if(!this.db)return o(ie(sa));const d=this.db.transaction([this.tableName],"readwrite").objectStore(this.tableName).put(t,e);d.addEventListener("success",()=>{this.closeConnection(),r()}),d.addEventListener("error",h=>{this.closeConnection(),o(h)})})}async removeItem(e){return await this.validateDbIsOpen(),new Promise((t,r)=>{if(!this.db)return r(ie(sa));const l=this.db.transaction([this.tableName],"readwrite").objectStore(this.tableName).delete(e);l.addEventListener("success",()=>{this.closeConnection(),t()}),l.addEventListener("error",d=>{this.closeConnection(),r(d)})})}async getKeys(){return await this.validateDbIsOpen(),new Promise((e,t)=>{if(!this.db)return t(ie(sa));const a=this.db.transaction([this.tableName],"readonly").objectStore(this.tableName).getAllKeys();a.addEventListener("success",l=>{const d=l;this.closeConnection(),e(d.target.result)}),a.addEventListener("error",l=>{this.closeConnection(),t(l)})})}async containsKey(e){return await this.validateDbIsOpen(),new Promise((t,r)=>{if(!this.db)return r(ie(sa));const l=this.db.transaction([this.tableName],"readonly").objectStore(this.tableName).count(e);l.addEventListener("success",d=>{const h=d;this.closeConnection(),t(h.target.result===1)}),l.addEventListener("error",d=>{this.closeConnection(),r(d)})})}async deleteDatabase(){return this.db&&this.dbOpen&&this.closeConnection(),new Promise((e,t)=>{const r=window.indexedDB.deleteDatabase(cf),o=setTimeout(()=>t(!1),200);r.addEventListener("success",()=>(clearTimeout(o),e(!0))),r.addEventListener("blocked",()=>(clearTimeout(o),e(!0))),r.addEventListener("error",()=>(clearTimeout(o),t(!1)))})}}/*! @azure/msal-browser v3.28.1 2025-01-14 */class df{constructor(){this.cache=new Map}getItem(e){return this.cache.get(e)||null}setItem(e,t){this.cache.set(e,t)}removeItem(e){this.cache.delete(e)}getKeys(){const e=[];return this.cache.forEach((t,r)=>{e.push(r)}),e}containsKey(e){return this.cache.has(e)}clear(){this.cache.clear()}}/*! @azure/msal-browser v3.28.1 2025-01-14 */class NH{constructor(e){this.inMemoryCache=new df,this.indexedDBCache=new kH,this.logger=e}handleDatabaseAccessError(e){if(e instanceof js&&e.errorCode===Cm)this.logger.error("Could not access persistent storage. This may be caused by browser privacy features which block persistent storage in third-party contexts.");else throw e}async getItem(e){const t=this.inMemoryCache.getItem(e);if(!t)try{return this.logger.verbose("Queried item not found in in-memory cache, now querying persistent storage."),await this.indexedDBCache.getItem(e)}catch(r){this.handleDatabaseAccessError(r)}return t}async setItem(e,t){this.inMemoryCache.setItem(e,t);try{await this.indexedDBCache.setItem(e,t)}catch(r){this.handleDatabaseAccessError(r)}}async removeItem(e){this.inMemoryCache.removeItem(e);try{await this.indexedDBCache.removeItem(e)}catch(t){this.handleDatabaseAccessError(t)}}async getKeys(){const e=this.inMemoryCache.getKeys();if(e.length===0)try{return this.logger.verbose("In-memory cache is empty, now querying persistent storage."),await this.indexedDBCache.getKeys()}catch(t){this.handleDatabaseAccessError(t)}return e}async containsKey(e){const t=this.inMemoryCache.containsKey(e);if(!t)try{return this.logger.verbose("Key not found in in-memory cache, now querying persistent storage."),await this.indexedDBCache.containsKey(e)}catch(r){this.handleDatabaseAccessError(r)}return t}clearInMemory(){this.logger.verbose("Deleting in-memory keystore"),this.inMemoryCache.clear(),this.logger.verbose("In-memory keystore deleted")}async clearPersistent(){try{this.logger.verbose("Deleting persistent keystore");const e=await this.indexedDBCache.deleteDatabase();return e&&this.logger.verbose("Persistent keystore deleted"),e}catch(e){return this.handleDatabaseAccessError(e),!1}}}/*! @azure/msal-browser v3.28.1 2025-01-14 */class ka{constructor(e,t,r){this.logger=e,cH(r??!1),this.cache=new NH(this.logger),this.performanceClient=t}createNewGuid(){return go()}base64Encode(e){return Em(e)}base64Decode(e){return Kr(e)}base64UrlEncode(e){return Xc(e)}encodeKid(e){return this.base64UrlEncode(JSON.stringify({kid:e}))}async getPublicKeyThumbprint(e){var g;const t=(g=this.performanceClient)==null?void 0:g.startMeasurement(x.CryptoOptsGetPublicKeyThumbprint,e.correlationId),r=await uH(ka.EXTRACTABLE,ka.POP_KEY_USAGES),o=await uh(r.publicKey),a={e:o.e,kty:o.kty,n:o.n},l=my(a),d=await this.hashString(l),h=await uh(r.privateKey),f=await dH(h,!1,["sign"]);return await this.cache.setItem(d,{privateKey:f,publicKey:r.publicKey,requestMethod:e.resourceRequestMethod,requestUri:e.resourceRequestUri}),t&&t.end({success:!0}),d}async removeTokenBindingKey(e){return await this.cache.removeItem(e),!await this.cache.containsKey(e)}async clearKeystore(){this.cache.clearInMemory();try{return await this.cache.clearPersistent(),!0}catch(e){return e instanceof Error?this.logger.error(`Clearing keystore failed with error: ${e.message}`):this.logger.error("Clearing keystore failed with unknown error"),!1}}async signJwt(e,t,r,o){var D;const a=(D=this.performanceClient)==null?void 0:D.startMeasurement(x.CryptoOptsSignJwt,o),l=await this.cache.getItem(t);if(!l)throw ie(ym);const d=await uh(l.publicKey),h=my(d),f=Xc(JSON.stringify({kid:t})),g=gm.getShrHeaderString({...r==null?void 0:r.header,alg:d.alg,kid:f}),_=Xc(g);e.cnf={jwk:JSON.parse(h)};const p=Xc(JSON.stringify(e)),w=`${_}.${p}`,T=new TextEncoder().encode(w),k=await hH(l.privateKey,T),I=_u(new Uint8Array(k)),N=`${w}.${I}`;return a&&a.end({success:!0}),N}async hashString(e){return kT(e)}}ka.POP_KEY_USAGES=["sign","verify"];ka.EXTRACTABLE=!0;function my(n){return JSON.stringify(n,Object.keys(n).sort())}/*! @azure/msal-browser v3.28.1 2025-01-14 */class RH{constructor(){if(!window.localStorage)throw bm(Ls)}getItem(e){return window.localStorage.getItem(e)}setItem(e,t){window.localStorage.setItem(e,t)}removeItem(e){window.localStorage.removeItem(e)}getKeys(){return Object.keys(window.localStorage)}containsKey(e){return window.localStorage.hasOwnProperty(e)}}/*! @azure/msal-browser v3.28.1 2025-01-14 */class OH{constructor(){if(!window.sessionStorage)throw bm(Ls)}getItem(e){return window.sessionStorage.getItem(e)}setItem(e,t){window.sessionStorage.setItem(e,t)}removeItem(e){window.sessionStorage.removeItem(e)}getKeys(){return Object.keys(window.sessionStorage)}containsKey(e){return window.sessionStorage.hasOwnProperty(e)}}/*! @azure/msal-browser v3.28.1 2025-01-14 */function PT(n,e){if(!e)return null;try{return Er.parseRequestState(n,e).libraryState.meta}catch{throw Y(Ia)}}/*! @azure/msal-browser v3.28.1 2025-01-14 */const PH=24*60*60*1e3;class MH{getItem(e){const t=`${encodeURIComponent(e)}`,r=document.cookie.split(";");for(let o=0;o<r.length;o++){const a=r[o],[l,...d]=decodeURIComponent(a).trim().split("="),h=d.join("=");if(l===t)return h}return""}setItem(e,t,r,o=!0){let a=`${encodeURIComponent(e)}=${encodeURIComponent(t)};path=/;SameSite=Lax;`;if(r){const l=DH(r);a+=`expires=${l};`}o&&(a+="Secure;"),document.cookie=a}removeItem(e){this.setItem(e,"",-1)}getKeys(){const e=document.cookie.split(";"),t=[];return e.forEach(r=>{const o=decodeURIComponent(r).trim().split("=");t.push(o[0])}),t}containsKey(e){return this.getKeys().includes(e)}}function DH(n){const e=new Date;return new Date(e.getTime()+n*PH).toUTCString()}/*! @azure/msal-browser v3.28.1 2025-01-14 */class hf extends Sa{constructor(e,t,r,o,a,l){super(e,r,o,a),this.cacheConfig=t,this.logger=o,this.internalStorage=new df,this.browserStorage=this.setupBrowserStorage(this.cacheConfig.cacheLocation),this.temporaryCacheStorage=this.setupBrowserStorage(this.cacheConfig.temporaryCacheLocation),this.cookieStorage=new MH,t.cacheMigrationEnabled&&(this.migrateCacheEntries(),this.createKeyMaps()),this.performanceClient=l}setupBrowserStorage(e){try{switch(e){case vn.LocalStorage:return new RH;case vn.SessionStorage:return new OH;case vn.MemoryStorage:default:break}}catch(t){this.logger.error(t)}return this.cacheConfig.cacheLocation=vn.MemoryStorage,new df}migrateCacheEntries(){const e=`${V.CACHE_PREFIX}.${Lt.ID_TOKEN}`,t=`${V.CACHE_PREFIX}.${Lt.CLIENT_INFO}`,r=`${V.CACHE_PREFIX}.${Lt.ERROR}`,o=`${V.CACHE_PREFIX}.${Lt.ERROR_DESC}`,a=this.browserStorage.getItem(e),l=this.browserStorage.getItem(t),d=this.browserStorage.getItem(r),h=this.browserStorage.getItem(o),f=[a,l,d,h];[Lt.ID_TOKEN,Lt.CLIENT_INFO,Lt.ERROR,Lt.ERROR_DESC].forEach((_,p)=>{const w=f[p];w&&this.setTemporaryCache(_,w,!0)})}createKeyMaps(){this.logger.trace("BrowserCacheManager - createKeyMaps called.");const e=this.getItem(Po.ACCOUNT_KEYS),t=this.getItem(`${Po.TOKEN_KEYS}.${this.clientId}`);if(e&&t){this.logger.verbose("BrowserCacheManager:createKeyMaps - account and token key maps already exist, skipping migration.");return}this.browserStorage.getKeys().forEach(o=>{if(this.isCredentialKey(o)){const a=this.getItem(o);if(a){const l=this.validateAndParseJson(a);if(l&&l.hasOwnProperty("credentialType"))switch(l.credentialType){case ge.ID_TOKEN:if(zv(l)){this.logger.trace("BrowserCacheManager:createKeyMaps - idToken found, saving key to token key map"),this.logger.tracePii(`BrowserCacheManager:createKeyMaps - idToken with key: ${o} found, saving key to token key map`);const d=l,h=this.updateCredentialCacheKey(o,d);this.addTokenKey(h,ge.ID_TOKEN);return}else this.logger.trace("BrowserCacheManager:createKeyMaps - key found matching idToken schema with value containing idToken credentialType field but value failed IdTokenEntity validation, skipping."),this.logger.tracePii(`BrowserCacheManager:createKeyMaps - failed idToken validation on key: ${o}`);break;case ge.ACCESS_TOKEN:case ge.ACCESS_TOKEN_WITH_AUTH_SCHEME:if(Wv(l)){this.logger.trace("BrowserCacheManager:createKeyMaps - accessToken found, saving key to token key map"),this.logger.tracePii(`BrowserCacheManager:createKeyMaps - accessToken with key: ${o} found, saving key to token key map`);const d=l,h=this.updateCredentialCacheKey(o,d);this.addTokenKey(h,ge.ACCESS_TOKEN);return}else this.logger.trace("BrowserCacheManager:createKeyMaps - key found matching accessToken schema with value containing accessToken credentialType field but value failed AccessTokenEntity validation, skipping."),this.logger.tracePii(`BrowserCacheManager:createKeyMaps - failed accessToken validation on key: ${o}`);break;case ge.REFRESH_TOKEN:if(Gv(l)){this.logger.trace("BrowserCacheManager:createKeyMaps - refreshToken found, saving key to token key map"),this.logger.tracePii(`BrowserCacheManager:createKeyMaps - refreshToken with key: ${o} found, saving key to token key map`);const d=l,h=this.updateCredentialCacheKey(o,d);this.addTokenKey(h,ge.REFRESH_TOKEN);return}else this.logger.trace("BrowserCacheManager:createKeyMaps - key found matching refreshToken schema with value containing refreshToken credentialType field but value failed RefreshTokenEntity validation, skipping."),this.logger.tracePii(`BrowserCacheManager:createKeyMaps - failed refreshToken validation on key: ${o}`);break}}}if(this.isAccountKey(o)){const a=this.getItem(o);if(a){const l=this.validateAndParseJson(a);l&&Pt.isAccountEntity(l)&&(this.logger.trace("BrowserCacheManager:createKeyMaps - account found, saving key to account key map"),this.logger.tracePii(`BrowserCacheManager:createKeyMaps - account with key: ${o} found, saving key to account key map`),this.addAccountKeyToMap(o))}}})}validateAndParseJson(e){try{const t=JSON.parse(e);return t&&typeof t=="object"?t:null}catch{return null}}getItem(e){return this.browserStorage.getItem(e)}setItem(e,t){this.browserStorage.setItem(e,t)}getAccount(e,t){this.logger.trace("BrowserCacheManager.getAccount called");const r=this.getCachedAccountEntity(e);return this.updateOutdatedCachedAccount(e,r,t)}getCachedAccountEntity(e){const t=this.getItem(e);if(!t)return this.removeAccountKeyFromMap(e),null;const r=this.validateAndParseJson(t);return!r||!Pt.isAccountEntity(r)?(this.removeAccountKeyFromMap(e),null):Sa.toObject(new Pt,r)}setAccount(e){this.logger.trace("BrowserCacheManager.setAccount called");const t=e.generateAccountKey();this.setItem(t,JSON.stringify(e)),this.addAccountKeyToMap(t)}getAccountKeys(){this.logger.trace("BrowserCacheManager.getAccountKeys called");const e=this.getItem(Po.ACCOUNT_KEYS);return e?JSON.parse(e):(this.logger.verbose("BrowserCacheManager.getAccountKeys - No account keys found"),[])}addAccountKeyToMap(e){this.logger.trace("BrowserCacheManager.addAccountKeyToMap called"),this.logger.tracePii(`BrowserCacheManager.addAccountKeyToMap called with key: ${e}`);const t=this.getAccountKeys();t.indexOf(e)===-1?(t.push(e),this.setItem(Po.ACCOUNT_KEYS,JSON.stringify(t)),this.logger.verbose("BrowserCacheManager.addAccountKeyToMap account key added")):this.logger.verbose("BrowserCacheManager.addAccountKeyToMap account key already exists in map")}removeAccountKeyFromMap(e){this.logger.trace("BrowserCacheManager.removeAccountKeyFromMap called"),this.logger.tracePii(`BrowserCacheManager.removeAccountKeyFromMap called with key: ${e}`);const t=this.getAccountKeys(),r=t.indexOf(e);r>-1?(t.splice(r,1),this.setItem(Po.ACCOUNT_KEYS,JSON.stringify(t)),this.logger.trace("BrowserCacheManager.removeAccountKeyFromMap account key removed")):this.logger.trace("BrowserCacheManager.removeAccountKeyFromMap key not found in existing map")}async removeAccount(e){super.removeAccount(e),this.removeAccountKeyFromMap(e)}removeOutdatedAccount(e){this.removeItem(e),this.removeAccountKeyFromMap(e)}removeIdToken(e){super.removeIdToken(e),this.removeTokenKey(e,ge.ID_TOKEN)}async removeAccessToken(e){super.removeAccessToken(e),this.removeTokenKey(e,ge.ACCESS_TOKEN)}removeRefreshToken(e){super.removeRefreshToken(e),this.removeTokenKey(e,ge.REFRESH_TOKEN)}getTokenKeys(){this.logger.trace("BrowserCacheManager.getTokenKeys called");const e=this.getItem(`${Po.TOKEN_KEYS}.${this.clientId}`);if(e){const t=this.validateAndParseJson(e);if(t&&t.hasOwnProperty("idToken")&&t.hasOwnProperty("accessToken")&&t.hasOwnProperty("refreshToken"))return t;this.logger.error("BrowserCacheManager.getTokenKeys - Token keys found but in an unknown format. Returning empty key map.")}else this.logger.verbose("BrowserCacheManager.getTokenKeys - No token keys found");return{idToken:[],accessToken:[],refreshToken:[]}}addTokenKey(e,t){this.logger.trace("BrowserCacheManager addTokenKey called");const r=this.getTokenKeys();switch(t){case ge.ID_TOKEN:r.idToken.indexOf(e)===-1&&(this.logger.info("BrowserCacheManager: addTokenKey - idToken added to map"),r.idToken.push(e));break;case ge.ACCESS_TOKEN:r.accessToken.indexOf(e)===-1&&(this.logger.info("BrowserCacheManager: addTokenKey - accessToken added to map"),r.accessToken.push(e));break;case ge.REFRESH_TOKEN:r.refreshToken.indexOf(e)===-1&&(this.logger.info("BrowserCacheManager: addTokenKey - refreshToken added to map"),r.refreshToken.push(e));break;default:throw this.logger.error(`BrowserCacheManager:addTokenKey - CredentialType provided invalid. CredentialType: ${t}`),Y(Zh)}this.setItem(`${Po.TOKEN_KEYS}.${this.clientId}`,JSON.stringify(r))}removeTokenKey(e,t){this.logger.trace("BrowserCacheManager removeTokenKey called");const r=this.getTokenKeys();switch(t){case ge.ID_TOKEN:this.logger.infoPii(`BrowserCacheManager: removeTokenKey - attempting to remove idToken with key: ${e} from map`);const o=r.idToken.indexOf(e);o>-1?(this.logger.info("BrowserCacheManager: removeTokenKey - idToken removed from map"),r.idToken.splice(o,1)):this.logger.info("BrowserCacheManager: removeTokenKey - idToken does not exist in map. Either it was previously removed or it was never added.");break;case ge.ACCESS_TOKEN:this.logger.infoPii(`BrowserCacheManager: removeTokenKey - attempting to remove accessToken with key: ${e} from map`);const a=r.accessToken.indexOf(e);a>-1?(this.logger.info("BrowserCacheManager: removeTokenKey - accessToken removed from map"),r.accessToken.splice(a,1)):this.logger.info("BrowserCacheManager: removeTokenKey - accessToken does not exist in map. Either it was previously removed or it was never added.");break;case ge.REFRESH_TOKEN:this.logger.infoPii(`BrowserCacheManager: removeTokenKey - attempting to remove refreshToken with key: ${e} from map`);const l=r.refreshToken.indexOf(e);l>-1?(this.logger.info("BrowserCacheManager: removeTokenKey - refreshToken removed from map"),r.refreshToken.splice(l,1)):this.logger.info("BrowserCacheManager: removeTokenKey - refreshToken does not exist in map. Either it was previously removed or it was never added.");break;default:throw this.logger.error(`BrowserCacheManager:removeTokenKey - CredentialType provided invalid. CredentialType: ${t}`),Y(Zh)}this.setItem(`${Po.TOKEN_KEYS}.${this.clientId}`,JSON.stringify(r))}getIdTokenCredential(e){const t=this.getItem(e);if(!t)return this.logger.trace("BrowserCacheManager.getIdTokenCredential: called, no cache hit"),this.removeTokenKey(e,ge.ID_TOKEN),null;const r=this.validateAndParseJson(t);return!r||!zv(r)?(this.logger.trace("BrowserCacheManager.getIdTokenCredential: called, no cache hit"),this.removeTokenKey(e,ge.ID_TOKEN),null):(this.logger.trace("BrowserCacheManager.getIdTokenCredential: cache hit"),r)}setIdTokenCredential(e){this.logger.trace("BrowserCacheManager.setIdTokenCredential called");const t=fa(e);this.setItem(t,JSON.stringify(e)),this.addTokenKey(t,ge.ID_TOKEN)}getAccessTokenCredential(e){const t=this.getItem(e);if(!t)return this.logger.trace("BrowserCacheManager.getAccessTokenCredential: called, no cache hit"),this.removeTokenKey(e,ge.ACCESS_TOKEN),null;const r=this.validateAndParseJson(t);return!r||!Wv(r)?(this.logger.trace("BrowserCacheManager.getAccessTokenCredential: called, no cache hit"),this.removeTokenKey(e,ge.ACCESS_TOKEN),null):(this.logger.trace("BrowserCacheManager.getAccessTokenCredential: cache hit"),r)}setAccessTokenCredential(e){this.logger.trace("BrowserCacheManager.setAccessTokenCredential called");const t=fa(e);this.setItem(t,JSON.stringify(e)),this.addTokenKey(t,ge.ACCESS_TOKEN)}getRefreshTokenCredential(e){const t=this.getItem(e);if(!t)return this.logger.trace("BrowserCacheManager.getRefreshTokenCredential: called, no cache hit"),this.removeTokenKey(e,ge.REFRESH_TOKEN),null;const r=this.validateAndParseJson(t);return!r||!Gv(r)?(this.logger.trace("BrowserCacheManager.getRefreshTokenCredential: called, no cache hit"),this.removeTokenKey(e,ge.REFRESH_TOKEN),null):(this.logger.trace("BrowserCacheManager.getRefreshTokenCredential: cache hit"),r)}setRefreshTokenCredential(e){this.logger.trace("BrowserCacheManager.setRefreshTokenCredential called");const t=fa(e);this.setItem(t,JSON.stringify(e)),this.addTokenKey(t,ge.REFRESH_TOKEN)}getAppMetadata(e){const t=this.getItem(e);if(!t)return this.logger.trace("BrowserCacheManager.getAppMetadata: called, no cache hit"),null;const r=this.validateAndParseJson(t);return!r||!IF(e,r)?(this.logger.trace("BrowserCacheManager.getAppMetadata: called, no cache hit"),null):(this.logger.trace("BrowserCacheManager.getAppMetadata: cache hit"),r)}setAppMetadata(e){this.logger.trace("BrowserCacheManager.setAppMetadata called");const t=bF(e);this.setItem(t,JSON.stringify(e))}getServerTelemetry(e){const t=this.getItem(e);if(!t)return this.logger.trace("BrowserCacheManager.getServerTelemetry: called, no cache hit"),null;const r=this.validateAndParseJson(t);return!r||!wF(e,r)?(this.logger.trace("BrowserCacheManager.getServerTelemetry: called, no cache hit"),null):(this.logger.trace("BrowserCacheManager.getServerTelemetry: cache hit"),r)}setServerTelemetry(e,t){this.logger.trace("BrowserCacheManager.setServerTelemetry called"),this.setItem(e,JSON.stringify(t))}getAuthorityMetadata(e){const t=this.internalStorage.getItem(e);if(!t)return this.logger.trace("BrowserCacheManager.getAuthorityMetadata: called, no cache hit"),null;const r=this.validateAndParseJson(t);return r&&SF(e,r)?(this.logger.trace("BrowserCacheManager.getAuthorityMetadata: cache hit"),r):null}getAuthorityMetadataKeys(){return this.internalStorage.getKeys().filter(t=>this.isAuthorityMetadata(t))}setWrapperMetadata(e,t){this.internalStorage.setItem(Qc.WRAPPER_SKU,e),this.internalStorage.setItem(Qc.WRAPPER_VER,t)}getWrapperMetadata(){const e=this.internalStorage.getItem(Qc.WRAPPER_SKU)||V.EMPTY_STRING,t=this.internalStorage.getItem(Qc.WRAPPER_VER)||V.EMPTY_STRING;return[e,t]}setAuthorityMetadata(e,t){this.logger.trace("BrowserCacheManager.setAuthorityMetadata called"),this.internalStorage.setItem(e,JSON.stringify(t))}getActiveAccount(){const e=this.generateCacheKey(Lt.ACTIVE_ACCOUNT_FILTERS),t=this.getItem(e);if(!t){this.logger.trace("BrowserCacheManager.getActiveAccount: No active account filters cache schema found, looking for legacy schema");const o=this.generateCacheKey(Lt.ACTIVE_ACCOUNT),a=this.getItem(o);if(!a)return this.logger.trace("BrowserCacheManager.getActiveAccount: No active account found"),null;const l=this.getAccountInfoFilteredBy({localAccountId:a});return l?(this.logger.trace("BrowserCacheManager.getActiveAccount: Legacy active account cache schema found"),this.logger.trace("BrowserCacheManager.getActiveAccount: Adding active account filters cache schema"),this.setActiveAccount(l),l):null}const r=this.validateAndParseJson(t);return r?(this.logger.trace("BrowserCacheManager.getActiveAccount: Active account filters schema found"),this.getAccountInfoFilteredBy({homeAccountId:r.homeAccountId,localAccountId:r.localAccountId,tenantId:r.tenantId})):(this.logger.trace("BrowserCacheManager.getActiveAccount: No active account found"),null)}setActiveAccount(e){const t=this.generateCacheKey(Lt.ACTIVE_ACCOUNT_FILTERS),r=this.generateCacheKey(Lt.ACTIVE_ACCOUNT);if(e){this.logger.verbose("setActiveAccount: Active account set");const o={homeAccountId:e.homeAccountId,localAccountId:e.localAccountId,tenantId:e.tenantId};this.browserStorage.setItem(t,JSON.stringify(o)),this.browserStorage.setItem(r,e.localAccountId)}else this.logger.verbose("setActiveAccount: No account passed, active account not set"),this.browserStorage.removeItem(t),this.browserStorage.removeItem(r)}getThrottlingCache(e){const t=this.getItem(e);if(!t)return this.logger.trace("BrowserCacheManager.getThrottlingCache: called, no cache hit"),null;const r=this.validateAndParseJson(t);return!r||!TF(e,r)?(this.logger.trace("BrowserCacheManager.getThrottlingCache: called, no cache hit"),null):(this.logger.trace("BrowserCacheManager.getThrottlingCache: cache hit"),r)}setThrottlingCache(e,t){this.logger.trace("BrowserCacheManager.setThrottlingCache called"),this.setItem(e,JSON.stringify(t))}getTemporaryCache(e,t){const r=t?this.generateCacheKey(e):e;if(this.cacheConfig.storeAuthStateInCookie){const a=this.cookieStorage.getItem(r);if(a)return this.logger.trace("BrowserCacheManager.getTemporaryCache: storeAuthStateInCookies set to true, retrieving from cookies"),a}const o=this.temporaryCacheStorage.getItem(r);if(!o){if(this.cacheConfig.cacheLocation===vn.LocalStorage){const a=this.browserStorage.getItem(r);if(a)return this.logger.trace("BrowserCacheManager.getTemporaryCache: Temporary cache item found in local storage"),a}return this.logger.trace("BrowserCacheManager.getTemporaryCache: No cache item found in local storage"),null}return this.logger.trace("BrowserCacheManager.getTemporaryCache: Temporary cache item returned"),o}setTemporaryCache(e,t,r){const o=r?this.generateCacheKey(e):e;this.temporaryCacheStorage.setItem(o,t),this.cacheConfig.storeAuthStateInCookie&&(this.logger.trace("BrowserCacheManager.setTemporaryCache: storeAuthStateInCookie set to true, setting item cookie"),this.cookieStorage.setItem(o,t,void 0,this.cacheConfig.secureCookies))}removeItem(e){this.browserStorage.removeItem(e)}removeTemporaryItem(e){this.temporaryCacheStorage.removeItem(e),this.cacheConfig.storeAuthStateInCookie&&(this.logger.trace("BrowserCacheManager.removeItem: storeAuthStateInCookie is true, clearing item cookie"),this.cookieStorage.removeItem(e))}getKeys(){return this.browserStorage.getKeys()}async clear(){await this.removeAllAccounts(),this.removeAppMetadata(),this.temporaryCacheStorage.getKeys().forEach(e=>{(e.indexOf(V.CACHE_PREFIX)!==-1||e.indexOf(this.clientId)!==-1)&&this.removeTemporaryItem(e)}),this.browserStorage.getKeys().forEach(e=>{(e.indexOf(V.CACHE_PREFIX)!==-1||e.indexOf(this.clientId)!==-1)&&this.browserStorage.removeItem(e)}),this.internalStorage.clear()}async clearTokensAndKeysWithClaims(e,t){e.addQueueMeasurement(x.ClearTokensAndKeysWithClaims,t);const r=this.getTokenKeys(),o=[];r.accessToken.forEach(a=>{const l=this.getAccessTokenCredential(a);l!=null&&l.requestedClaimsHash&&a.includes(l.requestedClaimsHash.toLowerCase())&&o.push(this.removeAccessToken(a))}),await Promise.all(o),o.length>0&&this.logger.warning(`${o.length} access tokens with claims in the cache keys have been removed from the cache.`)}generateCacheKey(e){return this.validateAndParseJson(e)?JSON.stringify(e):Cr.startsWith(e,V.CACHE_PREFIX)||Cr.startsWith(e,Lt.ADAL_ID_TOKEN)?e:`${V.CACHE_PREFIX}.${this.clientId}.${e}`}generateAuthorityKey(e){const{libraryState:{id:t}}=Er.parseRequestState(this.cryptoImpl,e);return this.generateCacheKey(`${Ke.AUTHORITY}.${t}`)}generateNonceKey(e){const{libraryState:{id:t}}=Er.parseRequestState(this.cryptoImpl,e);return this.generateCacheKey(`${Ke.NONCE_IDTOKEN}.${t}`)}generateStateKey(e){const{libraryState:{id:t}}=Er.parseRequestState(this.cryptoImpl,e);return this.generateCacheKey(`${Ke.REQUEST_STATE}.${t}`)}getCachedAuthority(e){const t=this.generateStateKey(e),r=this.getTemporaryCache(t);if(!r)return null;const o=this.generateAuthorityKey(r);return this.getTemporaryCache(o)}updateCacheEntries(e,t,r,o,a){this.logger.trace("BrowserCacheManager.updateCacheEntries called");const l=this.generateStateKey(e);this.setTemporaryCache(l,e,!1);const d=this.generateNonceKey(e);this.setTemporaryCache(d,t,!1);const h=this.generateAuthorityKey(e);if(this.setTemporaryCache(h,r,!1),a){const f={credential:a.homeAccountId,type:Bn.HOME_ACCOUNT_ID};this.setTemporaryCache(Ke.CCS_CREDENTIAL,JSON.stringify(f),!0)}else if(o){const f={credential:o,type:Bn.UPN};this.setTemporaryCache(Ke.CCS_CREDENTIAL,JSON.stringify(f),!0)}}resetRequestCache(e){this.logger.trace("BrowserCacheManager.resetRequestCache called"),e&&(this.temporaryCacheStorage.getKeys().forEach(t=>{t.indexOf(e)!==-1&&this.removeTemporaryItem(t)}),this.removeTemporaryItem(this.generateStateKey(e)),this.removeTemporaryItem(this.generateNonceKey(e)),this.removeTemporaryItem(this.generateAuthorityKey(e))),this.removeTemporaryItem(this.generateCacheKey(Ke.REQUEST_PARAMS)),this.removeTemporaryItem(this.generateCacheKey(Ke.ORIGIN_URI)),this.removeTemporaryItem(this.generateCacheKey(Ke.URL_HASH)),this.removeTemporaryItem(this.generateCacheKey(Ke.CORRELATION_ID)),this.removeTemporaryItem(this.generateCacheKey(Ke.CCS_CREDENTIAL)),this.removeTemporaryItem(this.generateCacheKey(Ke.NATIVE_REQUEST)),this.setInteractionInProgress(!1)}cleanRequestByState(e){if(this.logger.trace("BrowserCacheManager.cleanRequestByState called"),e){const t=this.generateStateKey(e),r=this.temporaryCacheStorage.getItem(t);this.logger.infoPii(`BrowserCacheManager.cleanRequestByState: Removing temporary cache items for state: ${r}`),this.resetRequestCache(r||V.EMPTY_STRING)}}cleanRequestByInteractionType(e){this.logger.trace("BrowserCacheManager.cleanRequestByInteractionType called"),this.temporaryCacheStorage.getKeys().forEach(t=>{if(t.indexOf(Ke.REQUEST_STATE)===-1)return;const r=this.temporaryCacheStorage.getItem(t);if(!r)return;const o=PT(this.cryptoImpl,r);o&&o.interactionType===e&&(this.logger.infoPii(`BrowserCacheManager.cleanRequestByInteractionType: Removing temporary cache items for state: ${r}`),this.resetRequestCache(r))}),this.setInteractionInProgress(!1)}cacheCodeRequest(e){this.logger.trace("BrowserCacheManager.cacheCodeRequest called");const t=Em(JSON.stringify(e));this.setTemporaryCache(Ke.REQUEST_PARAMS,t,!0)}getCachedRequest(e){this.logger.trace("BrowserCacheManager.getCachedRequest called");const t=this.getTemporaryCache(Ke.REQUEST_PARAMS,!0);if(!t)throw ie(sT);let r;try{r=JSON.parse(Kr(t))}catch(o){throw this.logger.errorPii(`Attempted to parse: ${t}`),this.logger.error(`Parsing cached token request threw with error: ${o}`),ie(cT)}if(this.removeTemporaryItem(this.generateCacheKey(Ke.REQUEST_PARAMS)),!r.authority){const o=this.generateAuthorityKey(e),a=this.getTemporaryCache(o);if(!a)throw ie(vm);r.authority=a}return r}getCachedNativeRequest(){this.logger.trace("BrowserCacheManager.getCachedNativeRequest called");const e=this.getTemporaryCache(Ke.NATIVE_REQUEST,!0);if(!e)return this.logger.trace("BrowserCacheManager.getCachedNativeRequest: No cached native request found"),null;const t=this.validateAndParseJson(e);return t||(this.logger.error("BrowserCacheManager.getCachedNativeRequest: Unable to parse native request"),null)}isInteractionInProgress(e){const t=this.getInteractionInProgress();return e?t===this.clientId:!!t}getInteractionInProgress(){const e=`${V.CACHE_PREFIX}.${Ke.INTERACTION_STATUS_KEY}`;return this.getTemporaryCache(e,!1)}setInteractionInProgress(e){const t=`${V.CACHE_PREFIX}.${Ke.INTERACTION_STATUS_KEY}`;if(e){if(this.getInteractionInProgress())throw ie(Zw);this.setTemporaryCache(t,this.clientId,!1)}else!e&&this.getInteractionInProgress()===this.clientId&&this.removeTemporaryItem(t)}getLegacyLoginHint(){const e=this.getTemporaryCache(Lt.ADAL_ID_TOKEN);e&&(this.browserStorage.removeItem(Lt.ADAL_ID_TOKEN),this.logger.verbose("Cached ADAL id token retrieved."));const t=this.getTemporaryCache(Lt.ID_TOKEN,!0);t&&(this.browserStorage.removeItem(this.generateCacheKey(Lt.ID_TOKEN)),this.logger.verbose("Cached MSAL.js v1 id token retrieved"));const r=t||e;if(r){const o=Ai(r,Kr);if(o.preferred_username)return this.logger.verbose("No SSO params used and ADAL/MSAL v1 token retrieved, setting ADAL/MSAL v1 preferred_username as loginHint"),o.preferred_username;if(o.upn)return this.logger.verbose("No SSO params used and ADAL/MSAL v1 token retrieved, setting ADAL/MSAL v1 upn as loginHint"),o.upn;this.logger.verbose("No SSO params used and ADAL/MSAL v1 token retrieved, however, no account hint claim found. Enable preferred_username or upn id token claim to get SSO.")}return null}updateCredentialCacheKey(e,t){const r=fa(t);if(e!==r){const o=this.getItem(e);if(o)return this.browserStorage.removeItem(e),this.setItem(r,o),this.logger.verbose(`Updated an outdated ${t.credentialType} cache key`),r;this.logger.error(`Attempted to update an outdated ${t.credentialType} cache key but no item matching the outdated key was found in storage`)}return e}async hydrateCache(e,t){var d,h,f;const r=cu((d=e.account)==null?void 0:d.homeAccountId,(h=e.account)==null?void 0:h.environment,e.idToken,this.clientId,e.tenantId);let o;t.claims&&(o=await this.cryptoImpl.hashString(t.claims));const a=lu((f=e.account)==null?void 0:f.homeAccountId,e.account.environment,e.accessToken,this.clientId,e.tenantId,e.scopes.join(" "),e.expiresOn?e.expiresOn.getTime()/1e3:0,e.extExpiresOn?e.extExpiresOn.getTime()/1e3:0,Kr,void 0,e.tokenType,void 0,t.sshKid,t.claims,o),l={idToken:r,accessToken:a};return this.saveCacheRecord(l)}async saveCacheRecord(e,t,r){try{await super.saveCacheRecord(e,t,r)}catch(o){if(o instanceof _a&&this.performanceClient&&r)try{const a=this.getTokenKeys();this.performanceClient.addFields({cacheRtCount:a.refreshToken.length,cacheIdCount:a.idToken.length,cacheAtCount:a.accessToken.length},r)}catch{}throw o}}}const LH=(n,e)=>{const t={cacheLocation:vn.MemoryStorage,temporaryCacheLocation:vn.MemoryStorage,storeAuthStateInCookie:!1,secureCookies:!1,cacheMigrationEnabled:!1,claimsBasedCachingEnabled:!1};return new hf(n,t,Pl,e)};/*! @azure/msal-browser v3.28.1 2025-01-14 */function xH(n,e,t,r){return n.verbose("getAllAccounts called"),t?e.getAllAccounts(r):[]}function UH(n,e,t){if(e.trace("getAccount called"),Object.keys(n).length===0)return e.warning("getAccount: No accountFilter provided"),null;const r=t.getAccountInfoFilteredBy(n);return r?(e.verbose("getAccount: Account matching provided filter found, returning"),r):(e.verbose("getAccount: No matching account found, returning null"),null)}function BH(n,e,t){if(e.trace("getAccountByUsername called"),!n)return e.warning("getAccountByUsername: No username provided"),null;const r=t.getAccountInfoFilteredBy({username:n});return r?(e.verbose("getAccountByUsername: Account matching username found, returning"),e.verbosePii(`getAccountByUsername: Returning signed-in accounts matching username: ${n}`),r):(e.verbose("getAccountByUsername: No matching account found, returning null"),null)}function VH(n,e,t){if(e.trace("getAccountByHomeId called"),!n)return e.warning("getAccountByHomeId: No homeAccountId provided"),null;const r=t.getAccountInfoFilteredBy({homeAccountId:n});return r?(e.verbose("getAccountByHomeId: Account matching homeAccountId found, returning"),e.verbosePii(`getAccountByHomeId: Returning signed-in accounts matching homeAccountId: ${n}`),r):(e.verbose("getAccountByHomeId: No matching account found, returning null"),null)}function FH(n,e,t){if(e.trace("getAccountByLocalId called"),!n)return e.warning("getAccountByLocalId: No localAccountId provided"),null;const r=t.getAccountInfoFilteredBy({localAccountId:n});return r?(e.verbose("getAccountByLocalId: Account matching localAccountId found, returning"),e.verbosePii(`getAccountByLocalId: Returning signed-in accounts matching localAccountId: ${n}`),r):(e.verbose("getAccountByLocalId: No matching account found, returning null"),null)}function HH(n,e){e.setActiveAccount(n)}function $H(n){return n.getActiveAccount()}/*! @azure/msal-browser v3.28.1 2025-01-14 */const me={INITIALIZE_START:"msal:initializeStart",INITIALIZE_END:"msal:initializeEnd",ACCOUNT_ADDED:"msal:accountAdded",ACCOUNT_REMOVED:"msal:accountRemoved",ACTIVE_ACCOUNT_CHANGED:"msal:activeAccountChanged",LOGIN_START:"msal:loginStart",LOGIN_SUCCESS:"msal:loginSuccess",LOGIN_FAILURE:"msal:loginFailure",ACQUIRE_TOKEN_START:"msal:acquireTokenStart",ACQUIRE_TOKEN_SUCCESS:"msal:acquireTokenSuccess",ACQUIRE_TOKEN_FAILURE:"msal:acquireTokenFailure",ACQUIRE_TOKEN_NETWORK_START:"msal:acquireTokenFromNetworkStart",SSO_SILENT_START:"msal:ssoSilentStart",SSO_SILENT_SUCCESS:"msal:ssoSilentSuccess",SSO_SILENT_FAILURE:"msal:ssoSilentFailure",ACQUIRE_TOKEN_BY_CODE_START:"msal:acquireTokenByCodeStart",ACQUIRE_TOKEN_BY_CODE_SUCCESS:"msal:acquireTokenByCodeSuccess",ACQUIRE_TOKEN_BY_CODE_FAILURE:"msal:acquireTokenByCodeFailure",HANDLE_REDIRECT_START:"msal:handleRedirectStart",HANDLE_REDIRECT_END:"msal:handleRedirectEnd",POPUP_OPENED:"msal:popupOpened",LOGOUT_START:"msal:logoutStart",LOGOUT_SUCCESS:"msal:logoutSuccess",LOGOUT_FAILURE:"msal:logoutFailure",LOGOUT_END:"msal:logoutEnd",RESTORE_FROM_BFCACHE:"msal:restoreFromBFCache"};/*! @azure/msal-browser v3.28.1 2025-01-14 */class KH{constructor(e){this.eventCallbacks=new Map,this.logger=e||new Wo({})}addEventCallback(e,t,r){if(typeof window<"u"){const o=r||CH();return this.eventCallbacks.has(o)?(this.logger.error(`Event callback with id: ${o} is already registered. Please provide a unique id or remove the existing callback and try again.`),null):(this.eventCallbacks.set(o,[e,t||[]]),this.logger.verbose(`Event callback registered with id: ${o}`),o)}return null}removeEventCallback(e){this.eventCallbacks.delete(e),this.logger.verbose(`Event callback ${e} removed.`)}emitEvent(e,t,r,o){if(typeof window<"u"){const a={eventType:e,interactionType:t||null,payload:r||null,error:o||null,timestamp:Date.now()};this.eventCallbacks.forEach(([l,d],h)=>{(d.length===0||d.includes(e))&&(this.logger.verbose(`Emitting event to callback ${h}: ${e}`),l.apply(null,[a]))})}}}/*! @azure/msal-browser v3.28.1 2025-01-14 */class MT{constructor(e,t,r,o,a,l,d,h,f){this.config=e,this.browserStorage=t,this.browserCrypto=r,this.networkClient=this.config.system.networkClient,this.eventHandler=a,this.navigationClient=l,this.nativeMessageHandler=h,this.correlationId=f||go(),this.logger=o.clone(Dn.MSAL_SKU,vu,this.correlationId),this.performanceClient=d}async clearCacheOnLogout(e){if(e){Pt.accountInfoIsEqual(e,this.browserStorage.getActiveAccount(),!1)&&(this.logger.verbose("Setting active account to null"),this.browserStorage.setActiveAccount(null));try{await this.browserStorage.removeAccount(Pt.generateAccountCacheKey(e)),this.logger.verbose("Cleared cache items belonging to the account provided in the logout request.")}catch{this.logger.error("Account provided in logout request was not found. Local cache unchanged.")}}else try{this.logger.verbose("No account provided in logout request, clearing all cache items.",this.correlationId),await this.browserStorage.clear(),await this.browserCrypto.clearKeystore()}catch{this.logger.error("Attempted to clear all MSAL cache items and failed. Local cache unchanged.")}}getRedirectUri(e){this.logger.verbose("getRedirectUri called");const t=e||this.config.auth.redirectUri;return De.getAbsoluteUrl(t,lo())}initializeServerTelemetryManager(e,t){this.logger.verbose("initializeServerTelemetryManager called");const r={clientId:this.config.auth.clientId,correlationId:this.correlationId,apiId:e,forceRefresh:t||!1,wrapperSKU:this.browserStorage.getWrapperMetadata()[0],wrapperVer:this.browserStorage.getWrapperMetadata()[1]};return new Ds(r,this.browserStorage)}async getDiscoveredAuthority(e){const{account:t}=e,r=e.requestExtraQueryParameters&&e.requestExtraQueryParameters.hasOwnProperty("instance_aware")?e.requestExtraQueryParameters.instance_aware:void 0;this.performanceClient.addQueueMeasurement(x.StandardInteractionClientGetDiscoveredAuthority,this.correlationId);const o={protocolMode:this.config.auth.protocolMode,OIDCOptions:this.config.auth.OIDCOptions,knownAuthorities:this.config.auth.knownAuthorities,cloudDiscoveryMetadata:this.config.auth.cloudDiscoveryMetadata,authorityMetadata:this.config.auth.authorityMetadata,skipAuthorityMetadataCache:this.config.auth.skipAuthorityMetadataCache},a=e.requestAuthority||this.config.auth.authority,l=r!=null&&r.length?r==="true":this.config.auth.instanceAware,d=t&&l?this.config.auth.authority.replace(De.getDomainFromUrl(a),t.environment):a,h=Xt.generateAuthority(d,e.requestAzureCloudOptions||this.config.auth.azureCloudOptions),f=await Q($w,x.AuthorityFactoryCreateDiscoveredInstance,this.logger,this.performanceClient,this.correlationId)(h,this.config.system.networkClient,this.browserStorage,o,this.logger,this.correlationId,this.performanceClient);if(t&&!f.isAlias(t.environment))throw Ze(Mw);return f}}/*! @azure/msal-browser v3.28.1 2025-01-14 */const WH=32;async function zH(n,e,t){n.addQueueMeasurement(x.GeneratePkceCodes,t);const r=ki(GH,x.GenerateCodeVerifier,e,n,t)(n,e,t),o=await Q(qH,x.GenerateCodeChallengeFromVerifier,e,n,t)(r,n,e,t);return{verifier:r,challenge:o}}function GH(n,e,t){try{const r=new Uint8Array(WH);return ki(lH,x.GetRandomValues,e,n,t)(r),_u(r)}catch{throw ie(pm)}}async function qH(n,e,t,r){e.addQueueMeasurement(x.GenerateCodeChallengeFromVerifier,r);try{const o=await Q(AT,x.Sha256Digest,t,e,r)(n,e,r);return _u(new Uint8Array(o))}catch{throw ie(pm)}}/*! @azure/msal-browser v3.28.1 2025-01-14 */async function km(n,e,t,r){t.addQueueMeasurement(x.InitializeBaseRequest,n.correlationId);const o=n.authority||e.auth.authority,a=[...n&&n.scopes||[]],l={...n,correlationId:n.correlationId,authority:o,scopes:a};if(!l.authenticationScheme)l.authenticationScheme=je.BEARER,r.verbose(`Authentication Scheme wasn't explicitly set in request, defaulting to "Bearer" request`);else{if(l.authenticationScheme===je.SSH){if(!n.sshJwk)throw Ze(uu);if(!n.sshKid)throw Ze(Rw)}r.verbose(`Authentication Scheme set to "${l.authenticationScheme}" as configured in Auth request`)}return e.cache.claimsBasedCachingEnabled&&n.claims&&!Cr.isEmptyObj(n.claims)&&(l.requestedClaimsHash=await kT(n.claims)),l}async function jH(n,e,t,r,o){r.addQueueMeasurement(x.InitializeSilentRequest,n.correlationId);const a=await Q(km,x.InitializeBaseRequest,o,r,n.correlationId)(n,t,r,o);return{...n,...a,account:e,forceRefresh:n.forceRefresh||!1}}/*! @azure/msal-browser v3.28.1 2025-01-14 */class La extends MT{async initializeAuthorizationCodeRequest(e){this.performanceClient.addQueueMeasurement(x.StandardInteractionClientInitializeAuthorizationCodeRequest,this.correlationId);const t=await Q(zH,x.GeneratePkceCodes,this.logger,this.performanceClient,this.correlationId)(this.performanceClient,this.logger,this.correlationId),r={...e,redirectUri:e.redirectUri,code:V.EMPTY_STRING,codeVerifier:t.verifier};return e.codeChallenge=t.challenge,e.codeChallengeMethod=V.S256_CODE_CHALLENGE_METHOD,r}initializeLogoutRequest(e){this.logger.verbose("initializeLogoutRequest called",e==null?void 0:e.correlationId);const t={correlationId:this.correlationId||go(),...e};if(e)if(e.logoutHint)this.logger.verbose("logoutHint has already been set in logoutRequest");else if(e.account){const r=this.getLogoutHintFromIdTokenClaims(e.account);r&&(this.logger.verbose("Setting logoutHint to login_hint ID Token Claim value for the account provided"),t.logoutHint=r)}else this.logger.verbose("logoutHint was not set and account was not passed into logout request, logoutHint will not be set");else this.logger.verbose("logoutHint will not be set since no logout request was configured");return!e||e.postLogoutRedirectUri!==null?e&&e.postLogoutRedirectUri?(this.logger.verbose("Setting postLogoutRedirectUri to uri set on logout request",t.correlationId),t.postLogoutRedirectUri=De.getAbsoluteUrl(e.postLogoutRedirectUri,lo())):this.config.auth.postLogoutRedirectUri===null?this.logger.verbose("postLogoutRedirectUri configured as null and no uri set on request, not passing post logout redirect",t.correlationId):this.config.auth.postLogoutRedirectUri?(this.logger.verbose("Setting postLogoutRedirectUri to configured uri",t.correlationId),t.postLogoutRedirectUri=De.getAbsoluteUrl(this.config.auth.postLogoutRedirectUri,lo())):(this.logger.verbose("Setting postLogoutRedirectUri to current page",t.correlationId),t.postLogoutRedirectUri=De.getAbsoluteUrl(lo(),lo())):this.logger.verbose("postLogoutRedirectUri passed as null, not setting post logout redirect uri",t.correlationId),t}getLogoutHintFromIdTokenClaims(e){const t=e.idTokenClaims;if(t){if(t.login_hint)return t.login_hint;this.logger.verbose("The ID Token Claims tied to the provided account do not contain a login_hint claim, logoutHint will not be added to logout request")}else this.logger.verbose("The provided account does not contain ID Token Claims, logoutHint will not be added to logout request");return null}async createAuthCodeClient(e){this.performanceClient.addQueueMeasurement(x.StandardInteractionClientCreateAuthCodeClient,this.correlationId);const t=await Q(this.getClientConfiguration.bind(this),x.StandardInteractionClientGetClientConfiguration,this.logger,this.performanceClient,this.correlationId)(e);return new zw(t,this.performanceClient)}async getClientConfiguration(e){const{serverTelemetryManager:t,requestAuthority:r,requestAzureCloudOptions:o,requestExtraQueryParameters:a,account:l}=e;this.performanceClient.addQueueMeasurement(x.StandardInteractionClientGetClientConfiguration,this.correlationId);const d=await Q(this.getDiscoveredAuthority.bind(this),x.StandardInteractionClientGetDiscoveredAuthority,this.logger,this.performanceClient,this.correlationId)({requestAuthority:r,requestAzureCloudOptions:o,requestExtraQueryParameters:a,account:l}),h=this.config.system.loggerOptions;return{authOptions:{clientId:this.config.auth.clientId,authority:d,clientCapabilities:this.config.auth.clientCapabilities,redirectUri:this.config.auth.redirectUri},systemOptions:{tokenRenewalOffsetSeconds:this.config.system.tokenRenewalOffsetSeconds,preventCorsPreflight:!0},loggerOptions:{loggerCallback:h.loggerCallback,piiLoggingEnabled:h.piiLoggingEnabled,logLevel:h.logLevel,correlationId:this.correlationId},cacheOptions:{claimsBasedCachingEnabled:this.config.cache.claimsBasedCachingEnabled},cryptoInterface:this.browserCrypto,networkInterface:this.networkClient,storageInterface:this.browserStorage,serverTelemetryManager:t,libraryInfo:{sku:Dn.MSAL_SKU,version:vu,cpu:V.EMPTY_STRING,os:V.EMPTY_STRING},telemetry:this.config.telemetry}}async initializeAuthorizationRequest(e,t){this.performanceClient.addQueueMeasurement(x.StandardInteractionClientInitializeAuthorizationRequest,this.correlationId);const r=this.getRedirectUri(e.redirectUri),o={interactionType:t},a=Er.setRequestState(this.browserCrypto,e&&e.state||V.EMPTY_STRING,o),d={...await Q(km,x.InitializeBaseRequest,this.logger,this.performanceClient,this.correlationId)({...e,correlationId:this.correlationId},this.config,this.performanceClient,this.logger),redirectUri:r,state:a,nonce:e.nonce||go(),responseMode:this.config.auth.OIDCOptions.serverResponseType};if(e.loginHint||e.sid)return d;const h=e.account||this.browserStorage.getActiveAccount();if(h&&(this.logger.verbose("Setting validated request account",this.correlationId),this.logger.verbosePii(`Setting validated request account: ${h.homeAccountId}`,this.correlationId),d.account=h),!d.loginHint&&!h){const f=this.browserStorage.getLegacyLoginHint();f&&(d.loginHint=f)}return d}}/*! @azure/msal-browser v3.28.1 2025-01-14 */const YH="ContentError",DT="user_switch";/*! @azure/msal-browser v3.28.1 2025-01-14 */const JH="USER_INTERACTION_REQUIRED",QH="USER_CANCEL",XH="NO_NETWORK",ZH="PERSISTENT_ERROR",e$="DISABLED",t$="ACCOUNT_UNAVAILABLE";/*! @azure/msal-browser v3.28.1 2025-01-14 */const n$=-2147186943,r$={[DT]:"User attempted to switch accounts in the native broker, which is not allowed. All new accounts must sign-in through the standard web flow first, please try again."};class Br extends lt{constructor(e,t,r){super(e,t),Object.setPrototypeOf(this,Br.prototype),this.name="NativeAuthError",this.ext=r}}function ca(n){if(n.ext&&n.ext.status&&(n.ext.status===ZH||n.ext.status===e$)||n.ext&&n.ext.error&&n.ext.error===n$)return!0;switch(n.errorCode){case YH:return!0;default:return!1}}function ff(n,e,t){if(t&&t.status)switch(t.status){case t$:return rf(Kw);case JH:return new Tr(n,e);case QH:return ie(bi);case XH:return ie(Bl)}return new Br(n,r$[n]||e,t)}/*! @azure/msal-browser v3.28.1 2025-01-14 */class LT extends La{async acquireToken(e){this.performanceClient.addQueueMeasurement(x.SilentCacheClientAcquireToken,e.correlationId);const t=this.initializeServerTelemetryManager(it.acquireTokenSilent_silentFlow),r=await Q(this.getClientConfiguration.bind(this),x.StandardInteractionClientGetClientConfiguration,this.logger,this.performanceClient,this.correlationId)({serverTelemetryManager:t,requestAuthority:e.authority,requestAzureCloudOptions:e.azureCloudOptions,account:e.account}),o=new H2(r,this.performanceClient);this.logger.verbose("Silent auth client created");try{const l=(await Q(o.acquireCachedToken.bind(o),x.SilentFlowClientAcquireCachedToken,this.logger,this.performanceClient,e.correlationId)(e))[0];return this.performanceClient.addFields({fromCache:!0},e.correlationId),l}catch(a){throw a instanceof js&&a.errorCode===ym&&this.logger.verbose("Signing keypair for bound access token not found. Refreshing bound access token and generating a new crypto keypair."),a}}logout(e){this.logger.verbose("logoutRedirect called");const t=this.initializeLogoutRequest(e);return this.clearCacheOnLogout(t==null?void 0:t.account)}}/*! @azure/msal-browser v3.28.1 2025-01-14 */class va extends MT{constructor(e,t,r,o,a,l,d,h,f,g,_,p){var C;super(e,t,r,o,a,l,h,f,p),this.apiId=d,this.accountId=g,this.nativeMessageHandler=f,this.nativeStorageManager=_,this.silentCacheClient=new LT(e,this.nativeStorageManager,r,o,a,l,h,f,p),this.serverTelemetryManager=this.initializeServerTelemetryManager(this.apiId);const w=this.nativeMessageHandler.getExtensionId()===ga.PREFERRED_EXTENSION_ID?"chrome":(C=this.nativeMessageHandler.getExtensionId())!=null&&C.length?"unknown":void 0;this.skus=Ds.makeExtraSkuString({libraryName:Dn.MSAL_SKU,libraryVersion:vu,extensionName:w,extensionVersion:this.nativeMessageHandler.getExtensionVersion()})}addRequestSKUs(e){e.extraParameters={...e.extraParameters,[b2]:this.skus}}async acquireToken(e){this.performanceClient.addQueueMeasurement(x.NativeInteractionClientAcquireToken,e.correlationId),this.logger.trace("NativeInteractionClient - acquireToken called.");const t=this.performanceClient.startMeasurement(x.NativeInteractionClientAcquireToken,e.correlationId),r=zr();try{const o=await this.initializeNativeRequest(e);try{const f=await this.acquireTokensFromCache(this.accountId,o);return t.end({success:!0,isNativeBroker:!1,fromCache:!0}),f}catch{this.logger.info("MSAL internal Cache does not contain tokens, proceed to make a native call")}const{...a}=o,l={method:pi.GetToken,request:a},d=await this.nativeMessageHandler.sendMessage(l),h=this.validateNativeResponse(d);return await this.handleNativeResponse(h,o,r).then(f=>(t.end({success:!0,isNativeBroker:!0,requestId:f.requestId}),this.serverTelemetryManager.clearNativeBrokerErrorCode(),f)).catch(f=>{throw t.end({success:!1,errorCode:f.errorCode,subErrorCode:f.subError,isNativeBroker:!0}),f})}catch(o){throw o instanceof Br&&this.serverTelemetryManager.setNativeBrokerErrorCode(o.errorCode),o}}createSilentCacheRequest(e,t){return{authority:e.authority,correlationId:this.correlationId,scopes:_t.fromString(e.scope).asArray(),account:t,forceRefresh:!1}}async acquireTokensFromCache(e,t){if(!e)throw this.logger.warning("NativeInteractionClient:acquireTokensFromCache - No nativeAccountId provided"),Y(Qh);const r=this.browserStorage.getBaseAccountInfo({nativeAccountId:e});if(!r)throw Y(Qh);try{const o=this.createSilentCacheRequest(t,r),a=await this.silentCacheClient.acquireToken(o),l={...r,idTokenClaims:a==null?void 0:a.idTokenClaims,idToken:a==null?void 0:a.idToken};return{...a,account:l}}catch(o){throw o}}async acquireTokenRedirect(e,t){this.logger.trace("NativeInteractionClient - acquireTokenRedirect called.");const{...r}=e;delete r.onRedirectNavigate;const o=await this.initializeNativeRequest(r),a={method:pi.GetToken,request:o};try{const h=await this.nativeMessageHandler.sendMessage(a);this.validateNativeResponse(h)}catch(h){if(h instanceof Br&&(this.serverTelemetryManager.setNativeBrokerErrorCode(h.errorCode),ca(h)))throw h}this.browserStorage.setTemporaryCache(Ke.NATIVE_REQUEST,JSON.stringify(o),!0);const l={apiId:it.acquireTokenRedirect,timeout:this.config.system.redirectNavigationTimeout,noHistory:!1},d=this.config.auth.navigateToLoginRequestUrl?window.location.href:this.getRedirectUri(e.redirectUri);t.end({success:!0}),await this.navigationClient.navigateExternal(d,l)}async handleRedirectPromise(e,t){if(this.logger.trace("NativeInteractionClient - handleRedirectPromise called."),!this.browserStorage.isInteractionInProgress(!0))return this.logger.info("handleRedirectPromise called but there is no interaction in progress, returning null."),null;const r=this.browserStorage.getCachedNativeRequest();if(!r)return this.logger.verbose("NativeInteractionClient - handleRedirectPromise called but there is no cached request, returning null."),e&&t&&(e==null||e.addFields({errorCode:"no_cached_request"},t)),null;const{prompt:o,...a}=r;o&&this.logger.verbose("NativeInteractionClient - handleRedirectPromise called and prompt was included in the original request, removing prompt from cached request to prevent second interaction with native broker window."),this.browserStorage.removeItem(this.browserStorage.generateCacheKey(Ke.NATIVE_REQUEST));const l={method:pi.GetToken,request:a},d=zr();try{this.logger.verbose("NativeInteractionClient - handleRedirectPromise sending message to native broker.");const h=await this.nativeMessageHandler.sendMessage(l);this.validateNativeResponse(h);const f=this.handleNativeResponse(h,a,d);this.browserStorage.setInteractionInProgress(!1);const g=await f;return this.serverTelemetryManager.clearNativeBrokerErrorCode(),g}catch(h){throw this.browserStorage.setInteractionInProgress(!1),h}}logout(){return this.logger.trace("NativeInteractionClient - logout called."),Promise.reject("Logout not implemented yet")}async handleNativeResponse(e,t,r){var g;this.logger.trace("NativeInteractionClient - handleNativeResponse called.");const o=Ai(e.id_token,Kr),a=this.createHomeAccountIdentifier(e,o),l=(g=this.browserStorage.getAccountInfoFilteredBy({nativeAccountId:t.accountId}))==null?void 0:g.homeAccountId;if(a!==l&&e.account.id!==t.accountId)throw ff(DT);const d=await this.getDiscoveredAuthority({requestAuthority:t.authority}),h=fm(this.browserStorage,d,a,Kr,o,e.client_info,void 0,o.tid,void 0,e.account.id,this.logger),f=await this.generateAuthenticationResult(e,t,o,h,d.canonicalAuthority,r);return this.cacheAccount(h),this.cacheNativeTokens(e,t,a,o,e.access_token,f.tenantId,r),f}createHomeAccountIdentifier(e,t){return Pt.generateHomeAccountId(e.client_info||V.EMPTY_STRING,pr.Default,this.logger,this.browserCrypto,t)}generateScopes(e,t){return e.scope?_t.fromString(e.scope):_t.fromString(t.scope)}async generatePopAccessToken(e,t){if(t.tokenType===je.POP&&t.signPopToken){if(e.shr)return this.logger.trace("handleNativeServerResponse: SHR is enabled in native layer"),e.shr;const r=new Aa(this.browserCrypto),o={resourceRequestMethod:t.resourceRequestMethod,resourceRequestUri:t.resourceRequestUri,shrClaims:t.shrClaims,shrNonce:t.shrNonce};if(!t.keyId)throw Y(Xf);return r.signPopToken(e.access_token,t.keyId,o)}else return e.access_token}async generateAuthenticationResult(e,t,r,o,a,l){const d=this.addTelemetryFromNativeResponse(e),h=e.scope?_t.fromString(e.scope):_t.fromString(t.scope),f=e.account.properties||{},g=f.UID||r.oid||r.sub||V.EMPTY_STRING,_=f.TenantId||r.tid||V.EMPTY_STRING,p=sm(o.getAccountInfo(),void 0,r,e.id_token);p.nativeAccountId!==e.account.id&&(p.nativeAccountId=e.account.id);const w=await this.generatePopAccessToken(e,t),C=t.tokenType===je.POP?je.POP:je.BEARER;return{authority:a,uniqueId:g,tenantId:_,scopes:h.asArray(),account:p,idToken:e.id_token,idTokenClaims:r,accessToken:w,fromCache:d?this.isResponseFromCache(d):!1,expiresOn:new Date(Number(l+e.expires_in)*1e3),tokenType:C,correlationId:this.correlationId,state:e.state,fromNativeBroker:!0}}cacheAccount(e){this.browserStorage.setAccount(e),this.browserStorage.removeAccountContext(e).catch(t=>{this.logger.error(`Error occurred while removing account context from browser storage. ${t}`)})}cacheNativeTokens(e,t,r,o,a,l,d){const h=cu(r,t.authority,e.id_token||"",t.clientId,o.tid||""),f=t.tokenType===je.POP?V.SHR_NONCE_VALIDITY:(typeof e.expires_in=="string"?parseInt(e.expires_in,10):e.expires_in)||0,g=d+f,_=this.generateScopes(e,t),p=lu(r,t.authority,a,t.clientId,o.tid||l,_.printScopes(),g,0,Kr,void 0,t.tokenType,void 0,t.keyId),w={idToken:h,accessToken:p};this.nativeStorageManager.saveCacheRecord(w,t.storeInCache)}addTelemetryFromNativeResponse(e){const t=this.getMATSFromResponse(e);return t?(this.performanceClient.addFields({extensionId:this.nativeMessageHandler.getExtensionId(),extensionVersion:this.nativeMessageHandler.getExtensionVersion(),matsBrokerVersion:t.broker_version,matsAccountJoinOnStart:t.account_join_on_start,matsAccountJoinOnEnd:t.account_join_on_end,matsDeviceJoin:t.device_join,matsPromptBehavior:t.prompt_behavior,matsApiErrorCode:t.api_error_code,matsUiVisible:t.ui_visible,matsSilentCode:t.silent_code,matsSilentBiSubCode:t.silent_bi_sub_code,matsSilentMessage:t.silent_message,matsSilentStatus:t.silent_status,matsHttpStatus:t.http_status,matsHttpEventCount:t.http_event_count},this.correlationId),t):null}validateNativeResponse(e){if(e.hasOwnProperty("access_token")&&e.hasOwnProperty("id_token")&&e.hasOwnProperty("client_info")&&e.hasOwnProperty("account")&&e.hasOwnProperty("scope")&&e.hasOwnProperty("expires_in"))return e;throw ZE(Gf,"Response missing expected properties.")}getMATSFromResponse(e){if(e.properties.MATS)try{return JSON.parse(e.properties.MATS)}catch{this.logger.error("NativeInteractionClient - Error parsing MATS telemetry, returning null instead")}return null}isResponseFromCache(e){return typeof e.is_cached>"u"?(this.logger.verbose("NativeInteractionClient - MATS telemetry does not contain field indicating if response was served from cache. Returning false."),!1):!!e.is_cached}async initializeNativeRequest(e){this.logger.trace("NativeInteractionClient - initializeNativeRequest called");const t=e.authority||this.config.auth.authority;e.account&&await this.getDiscoveredAuthority({requestAuthority:t,requestAzureCloudOptions:e.azureCloudOptions,account:e.account});const r=new De(t);r.validateAsUri();const{scopes:o,...a}=e,l=new _t(o||[]);l.appendScopes(Da);const d=()=>{switch(this.apiId){case it.ssoSilent:case it.acquireTokenSilent_silentFlow:return this.logger.trace("initializeNativeRequest: silent request sets prompt to none"),Bt.NONE}if(!e.prompt){this.logger.trace("initializeNativeRequest: prompt was not provided");return}switch(e.prompt){case Bt.NONE:case Bt.CONSENT:case Bt.LOGIN:return this.logger.trace("initializeNativeRequest: prompt is compatible with native flow"),e.prompt;default:throw this.logger.trace(`initializeNativeRequest: prompt = ${e.prompt} is not compatible with native flow`),ie(yT)}},h={...a,accountId:this.accountId,clientId:this.config.auth.clientId,authority:r.urlString,scope:l.printScopes(),redirectUri:this.getRedirectUri(e.redirectUri),prompt:d(),correlationId:this.correlationId,tokenType:e.authenticationScheme,windowTitleSubstring:document.title,extraParameters:{...e.extraQueryParameters,...e.tokenQueryParameters},extendedExpiryToken:!1,keyId:e.popKid};if(h.signPopToken&&e.popKid)throw ie(ET);if(this.handleExtraBrokerParams(h),h.extraParameters=h.extraParameters||{},h.extraParameters.telemetry=ga.MATS_TELEMETRY,e.authenticationScheme===je.POP){const f={resourceRequestUri:e.resourceRequestUri,resourceRequestMethod:e.resourceRequestMethod,shrClaims:e.shrClaims,shrNonce:e.shrNonce},g=new Aa(this.browserCrypto);let _;if(h.keyId)_=this.browserCrypto.base64UrlEncode(JSON.stringify({kid:h.keyId})),h.signPopToken=!1;else{const p=await Q(g.generateCnf.bind(g),x.PopTokenGenerateCnf,this.logger,this.performanceClient,e.correlationId)(f,this.logger);_=p.reqCnfString,h.keyId=p.kid,h.signPopToken=!0}h.reqCnf=_}return this.addRequestSKUs(h),h}handleExtraBrokerParams(e){var a;const t=e.extraParameters&&e.extraParameters.hasOwnProperty(um)&&e.extraParameters.hasOwnProperty(nf)&&e.extraParameters.hasOwnProperty(wi);if(!e.embeddedClientId&&!t)return;let r="";const o=e.redirectUri;e.embeddedClientId?(e.redirectUri=this.config.auth.redirectUri,r=e.embeddedClientId):e.extraParameters&&(e.redirectUri=e.extraParameters[nf],r=e.extraParameters[wi]),e.extraParameters={child_client_id:r,child_redirect_uri:o},(a=this.performanceClient)==null||a.addFields({embeddedClientId:r,embeddedRedirectUri:o},e.correlationId)}}/*! @azure/msal-browser v3.28.1 2025-01-14 */class Vr{constructor(e,t,r,o){this.logger=e,this.handshakeTimeoutMs=t,this.extensionId=o,this.resolvers=new Map,this.handshakeResolvers=new Map,this.messageChannel=new MessageChannel,this.windowListener=this.onWindowMessage.bind(this),this.performanceClient=r,this.handshakeEvent=r.startMeasurement(x.NativeMessageHandlerHandshake)}async sendMessage(e){this.logger.trace("NativeMessageHandler - sendMessage called.");const t={channel:ga.CHANNEL_ID,extensionId:this.extensionId,responseId:go(),body:e};return this.logger.trace("NativeMessageHandler - Sending request to browser extension"),this.logger.tracePii(`NativeMessageHandler - Sending request to browser extension: ${JSON.stringify(t)}`),this.messageChannel.port1.postMessage(t),new Promise((r,o)=>{this.resolvers.set(t.responseId,{resolve:r,reject:o})})}static async createProvider(e,t,r){e.trace("NativeMessageHandler - createProvider called.");try{const o=new Vr(e,t,r,ga.PREFERRED_EXTENSION_ID);return await o.sendHandshakeRequest(),o}catch{const a=new Vr(e,t,r);return await a.sendHandshakeRequest(),a}}async sendHandshakeRequest(){this.logger.trace("NativeMessageHandler - sendHandshakeRequest called."),window.addEventListener("message",this.windowListener,!1);const e={channel:ga.CHANNEL_ID,extensionId:this.extensionId,responseId:go(),body:{method:pi.HandshakeRequest}};return this.handshakeEvent.add({extensionId:this.extensionId,extensionHandshakeTimeoutMs:this.handshakeTimeoutMs}),this.messageChannel.port1.onmessage=t=>{this.onChannelMessage(t)},window.postMessage(e,window.origin,[this.messageChannel.port2]),new Promise((t,r)=>{this.handshakeResolvers.set(e.responseId,{resolve:t,reject:r}),this.timeoutId=window.setTimeout(()=>{window.removeEventListener("message",this.windowListener,!1),this.messageChannel.port1.close(),this.messageChannel.port2.close(),this.handshakeEvent.end({extensionHandshakeTimedOut:!0,success:!1}),r(ie(pT)),this.handshakeResolvers.delete(e.responseId)},this.handshakeTimeoutMs)})}onWindowMessage(e){if(this.logger.trace("NativeMessageHandler - onWindowMessage called"),e.source!==window)return;const t=e.data;if(!(!t.channel||t.channel!==ga.CHANNEL_ID)&&!(t.extensionId&&t.extensionId!==this.extensionId)&&t.body.method===pi.HandshakeRequest){const r=this.handshakeResolvers.get(t.responseId);if(!r){this.logger.trace(`NativeMessageHandler.onWindowMessage - resolver can't be found for request ${t.responseId}`);return}this.logger.verbose(t.extensionId?`Extension with id: ${t.extensionId} not installed`:"No extension installed"),clearTimeout(this.timeoutId),this.messageChannel.port1.close(),this.messageChannel.port2.close(),window.removeEventListener("message",this.windowListener,!1),this.handshakeEvent.end({success:!1,extensionInstalled:!1}),r.reject(ie(_T))}}onChannelMessage(e){this.logger.trace("NativeMessageHandler - onChannelMessage called.");const t=e.data,r=this.resolvers.get(t.responseId),o=this.handshakeResolvers.get(t.responseId);try{const a=t.body.method;if(a===pi.Response){if(!r)return;const l=t.body.response;if(this.logger.trace("NativeMessageHandler - Received response from browser extension"),this.logger.tracePii(`NativeMessageHandler - Received response from browser extension: ${JSON.stringify(l)}`),l.status!=="Success")r.reject(ff(l.code,l.description,l.ext));else if(l.result)l.result.code&&l.result.description?r.reject(ff(l.result.code,l.result.description,l.result.ext)):r.resolve(l.result);else throw ZE(Gf,"Event does not contain result.");this.resolvers.delete(t.responseId)}else if(a===pi.HandshakeResponse){if(!o){this.logger.trace(`NativeMessageHandler.onChannelMessage - resolver can't be found for request ${t.responseId}`);return}clearTimeout(this.timeoutId),window.removeEventListener("message",this.windowListener,!1),this.extensionId=t.extensionId,this.extensionVersion=t.body.version,this.logger.verbose(`NativeMessageHandler - Received HandshakeResponse from extension: ${this.extensionId}`),this.handshakeEvent.end({extensionInstalled:!0,success:!0}),o.resolve(),this.handshakeResolvers.delete(t.responseId)}}catch(a){this.logger.error("Error parsing response from WAM Extension"),this.logger.errorPii(`Error parsing response from WAM Extension: ${a}`),this.logger.errorPii(`Unable to parse ${e}`),r?r.reject(a):o&&o.reject(a)}}getExtensionId(){return this.extensionId}getExtensionVersion(){return this.extensionVersion}static isNativeAvailable(e,t,r,o){if(t.trace("isNativeAvailable called"),!e.system.allowNativeBroker)return t.trace("isNativeAvailable: allowNativeBroker is not enabled, returning false"),!1;if(!r)return t.trace("isNativeAvailable: WAM extension provider is not initialized, returning false"),!1;if(o)switch(o){case je.BEARER:case je.POP:return t.trace("isNativeAvailable: authenticationScheme is supported, returning true"),!0;default:return t.trace("isNativeAvailable: authenticationScheme is not supported, returning false"),!1}return!0}}/*! @azure/msal-browser v3.28.1 2025-01-14 */class Nm{constructor(e,t,r,o,a){this.authModule=e,this.browserStorage=t,this.authCodeRequest=r,this.logger=o,this.performanceClient=a}async handleCodeResponse(e,t){this.performanceClient.addQueueMeasurement(x.HandleCodeResponse,t.correlationId);let r;try{r=this.authModule.handleFragmentResponse(e,t.state)}catch(o){throw o instanceof zo&&o.subError===bi?ie(bi):o}return Q(this.handleCodeResponseFromServer.bind(this),x.HandleCodeResponseFromServer,this.logger,this.performanceClient,t.correlationId)(r,t)}async handleCodeResponseFromServer(e,t,r=!0){if(this.performanceClient.addQueueMeasurement(x.HandleCodeResponseFromServer,t.correlationId),this.logger.trace("InteractionHandler.handleCodeResponseFromServer called"),this.authCodeRequest.code=e.code,e.cloud_instance_host_name&&await Q(this.authModule.updateAuthority.bind(this.authModule),x.UpdateTokenEndpointAuthority,this.logger,this.performanceClient,t.correlationId)(e.cloud_instance_host_name,t.correlationId),r&&(e.nonce=t.nonce||void 0),e.state=t.state,e.client_info)this.authCodeRequest.clientInfo=e.client_info;else{const a=this.createCcsCredentials(t);a&&(this.authCodeRequest.ccsCredential=a)}return await Q(this.authModule.acquireToken.bind(this.authModule),x.AuthClientAcquireToken,this.logger,this.performanceClient,t.correlationId)(this.authCodeRequest,e)}createCcsCredentials(e){return e.account?{credential:e.account.homeAccountId,type:Bn.HOME_ACCOUNT_ID}:e.loginHint?{credential:e.loginHint,type:Bn.UPN}:null}}/*! @azure/msal-browser v3.28.1 2025-01-14 */function xT(n,e,t){const r=Ll(n);if(!r)throw Lw(n)?(t.error(`A ${e} is present in the iframe but it does not contain known properties. It's likely that the ${e} has been replaced by code running on the redirectUri page.`),t.errorPii(`The ${e} detected is: ${n}`),ie(Jw)):(t.error(`The request has returned to the redirectUri but a ${e} is not present. It's likely that the ${e} has been removed or the page has been redirected by code running on the redirectUri page.`),ie(Yw));return r}function o$(n,e,t){if(!n.state)throw ie(_m);const r=PT(e,n.state);if(!r)throw ie(Qw);if(r.interactionType!==t)throw ie(Xw)}/*! @azure/msal-browser v3.28.1 2025-01-14 */class i$ extends La{constructor(e,t,r,o,a,l,d,h,f,g){super(e,t,r,o,a,l,d,f,g),this.unloadWindow=this.unloadWindow.bind(this),this.nativeStorage=h}acquireToken(e){try{const r={popupName:this.generatePopupName(e.scopes||Da,e.authority||this.config.auth.authority),popupWindowAttributes:e.popupWindowAttributes||{},popupWindowParent:e.popupWindowParent??window};return this.config.system.asyncPopups?(this.logger.verbose("asyncPopups set to true, acquiring token"),this.acquireTokenPopupAsync(e,r)):(this.logger.verbose("asyncPopup set to false, opening popup before acquiring token"),r.popup=this.openSizedPopup("about:blank",r),this.acquireTokenPopupAsync(e,r))}catch(t){return Promise.reject(t)}}logout(e){try{this.logger.verbose("logoutPopup called");const t=this.initializeLogoutRequest(e),r={popupName:this.generateLogoutPopupName(t),popupWindowAttributes:(e==null?void 0:e.popupWindowAttributes)||{},popupWindowParent:(e==null?void 0:e.popupWindowParent)??window},o=e&&e.authority,a=e&&e.mainWindowRedirectUri;return this.config.system.asyncPopups?(this.logger.verbose("asyncPopups set to true"),this.logoutPopupAsync(t,r,o,a)):(this.logger.verbose("asyncPopup set to false, opening popup"),r.popup=this.openSizedPopup("about:blank",r),this.logoutPopupAsync(t,r,o,a))}catch(t){return Promise.reject(t)}}async acquireTokenPopupAsync(e,t){var a;this.logger.verbose("acquireTokenPopupAsync called");const r=this.initializeServerTelemetryManager(it.acquireTokenPopup),o=await Q(this.initializeAuthorizationRequest.bind(this),x.StandardInteractionClientInitializeAuthorizationRequest,this.logger,this.performanceClient,this.correlationId)(e,le.Popup);OT(o.authority);try{const l=await Q(this.initializeAuthorizationCodeRequest.bind(this),x.StandardInteractionClientInitializeAuthorizationCodeRequest,this.logger,this.performanceClient,this.correlationId)(o),d=await Q(this.createAuthCodeClient.bind(this),x.StandardInteractionClientCreateAuthCodeClient,this.logger,this.performanceClient,this.correlationId)({serverTelemetryManager:r,requestAuthority:o.authority,requestAzureCloudOptions:o.azureCloudOptions,requestExtraQueryParameters:o.extraQueryParameters,account:o.account}),h=Vr.isNativeAvailable(this.config,this.logger,this.nativeMessageHandler,e.authenticationScheme);let f;h&&(f=this.performanceClient.startMeasurement(x.FetchAccountIdWithNativeBroker,e.correlationId));const g=await d.getAuthCodeUrl({...o,nativeBroker:h}),_=new Nm(d,this.browserStorage,l,this.logger,this.performanceClient),p=this.initiateAuthRequest(g,t);this.eventHandler.emitEvent(me.POPUP_OPENED,le.Popup,{popupWindow:p},null);const w=await this.monitorPopupForHash(p,t.popupWindowParent),C=ki(xT,x.DeserializeResponse,this.logger,this.performanceClient,this.correlationId)(w,this.config.auth.OIDCOptions.serverResponseType,this.logger);if(Ur.removeThrottle(this.browserStorage,this.config.auth.clientId,l),C.accountId){if(this.logger.verbose("Account id found in hash, calling WAM for token"),f&&f.end({success:!0,isNativeBroker:!0}),!this.nativeMessageHandler)throw ie(qs);const k=new va(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,it.acquireTokenPopup,this.performanceClient,this.nativeMessageHandler,C.accountId,this.nativeStorage,o.correlationId),{userRequestState:I}=Er.parseRequestState(this.browserCrypto,o.state);return await k.acquireToken({...o,state:I,prompt:void 0})}return await _.handleCodeResponse(C,o)}catch(l){throw(a=t.popup)==null||a.close(),l instanceof lt&&(l.setCorrelationId(this.correlationId),r.cacheFailedRequest(l)),l}}async logoutPopupAsync(e,t,r,o){var l,d,h,f;this.logger.verbose("logoutPopupAsync called"),this.eventHandler.emitEvent(me.LOGOUT_START,le.Popup,e);const a=this.initializeServerTelemetryManager(it.logoutPopup);try{await this.clearCacheOnLogout(e.account);const g=await Q(this.createAuthCodeClient.bind(this),x.StandardInteractionClientCreateAuthCodeClient,this.logger,this.performanceClient,this.correlationId)({serverTelemetryManager:a,requestAuthority:r,account:e.account||void 0});try{g.authority.endSessionEndpoint}catch{if((l=e.account)!=null&&l.homeAccountId&&e.postLogoutRedirectUri&&g.authority.protocolMode===fo.OIDC){if(this.browserStorage.removeAccount((d=e.account)==null?void 0:d.homeAccountId),this.eventHandler.emitEvent(me.LOGOUT_SUCCESS,le.Popup,e),o){const w={apiId:it.logoutPopup,timeout:this.config.system.redirectNavigationTimeout,noHistory:!1},C=De.getAbsoluteUrl(o,lo());await this.navigationClient.navigateInternal(C,w)}(h=t.popup)==null||h.close();return}}const _=g.getLogoutUri(e);this.eventHandler.emitEvent(me.LOGOUT_SUCCESS,le.Popup,e);const p=this.openPopup(_,t);if(this.eventHandler.emitEvent(me.POPUP_OPENED,le.Popup,{popupWindow:p},null),await this.monitorPopupForHash(p,t.popupWindowParent).catch(()=>{}),o){const w={apiId:it.logoutPopup,timeout:this.config.system.redirectNavigationTimeout,noHistory:!1},C=De.getAbsoluteUrl(o,lo());this.logger.verbose("Redirecting main window to url specified in the request"),this.logger.verbosePii(`Redirecting main window to: ${C}`),await this.navigationClient.navigateInternal(C,w)}else this.logger.verbose("No main window navigation requested")}catch(g){throw(f=t.popup)==null||f.close(),g instanceof lt&&(g.setCorrelationId(this.correlationId),a.cacheFailedRequest(g)),this.browserStorage.setInteractionInProgress(!1),this.eventHandler.emitEvent(me.LOGOUT_FAILURE,le.Popup,null,g),this.eventHandler.emitEvent(me.LOGOUT_END,le.Popup),g}this.eventHandler.emitEvent(me.LOGOUT_END,le.Popup)}initiateAuthRequest(e,t){if(e)return this.logger.infoPii(`Navigate to: ${e}`),this.openPopup(e,t);throw this.logger.error("Navigate url is empty"),ie(mu)}monitorPopupForHash(e,t){return new Promise((r,o)=>{this.logger.verbose("PopupHandler.monitorPopupForHash - polling started");const a=setInterval(()=>{if(e.closed){this.logger.error("PopupHandler.monitorPopupForHash - window closed"),clearInterval(a),o(ie(bi));return}let l="";try{l=e.location.href}catch{}if(!l||l==="about:blank")return;clearInterval(a);let d="";const h=this.config.auth.OIDCOptions.serverResponseType;e&&(h===Gs.QUERY?d=e.location.search:d=e.location.hash),this.logger.verbose("PopupHandler.monitorPopupForHash - popup window is on same origin as caller"),r(d)},this.config.system.pollIntervalMilliseconds)}).finally(()=>{this.cleanPopup(e,t)})}openPopup(e,t){try{let r;if(t.popup?(r=t.popup,this.logger.verbosePii(`Navigating popup window to: ${e}`),r.location.assign(e)):typeof t.popup>"u"&&(this.logger.verbosePii(`Opening popup window to: ${e}`),r=this.openSizedPopup(e,t)),!r)throw ie(tT);return r.focus&&r.focus(),this.currentWindow=r,t.popupWindowParent.addEventListener("beforeunload",this.unloadWindow),r}catch(r){throw this.logger.error("error opening popup "+r.message),this.browserStorage.setInteractionInProgress(!1),ie(eT)}}openSizedPopup(e,{popupName:t,popupWindowAttributes:r,popupWindowParent:o}){var w,C,T,k;const a=o.screenLeft?o.screenLeft:o.screenX,l=o.screenTop?o.screenTop:o.screenY,d=o.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,h=o.innerHeight||document.documentElement.clientHeight||document.body.clientHeight;let f=(w=r.popupSize)==null?void 0:w.width,g=(C=r.popupSize)==null?void 0:C.height,_=(T=r.popupPosition)==null?void 0:T.top,p=(k=r.popupPosition)==null?void 0:k.left;return(!f||f<0||f>d)&&(this.logger.verbose("Default popup window width used. Window width not configured or invalid."),f=Dn.POPUP_WIDTH),(!g||g<0||g>h)&&(this.logger.verbose("Default popup window height used. Window height not configured or invalid."),g=Dn.POPUP_HEIGHT),(!_||_<0||_>h)&&(this.logger.verbose("Default popup window top position used. Window top not configured or invalid."),_=Math.max(0,h/2-Dn.POPUP_HEIGHT/2+l)),(!p||p<0||p>d)&&(this.logger.verbose("Default popup window left position used. Window left not configured or invalid."),p=Math.max(0,d/2-Dn.POPUP_WIDTH/2+a)),o.open(e,t,`width=${f}, height=${g}, top=${_}, left=${p}, scrollbars=yes`)}unloadWindow(e){this.browserStorage.cleanRequestByInteractionType(le.Popup),this.currentWindow&&this.currentWindow.close(),e.preventDefault()}cleanPopup(e,t){e.close(),t.removeEventListener("beforeunload",this.unloadWindow),this.browserStorage.setInteractionInProgress(!1)}generatePopupName(e,t){return`${Dn.POPUP_NAME_PREFIX}.${this.config.auth.clientId}.${e.join("-")}.${t}.${this.correlationId}`}generateLogoutPopupName(e){const t=e.account&&e.account.homeAccountId;return`${Dn.POPUP_NAME_PREFIX}.${this.config.auth.clientId}.${t}.${this.correlationId}`}}/*! @azure/msal-browser v3.28.1 2025-01-14 */class gy{constructor(e,t,r,o,a){this.authModule=e,this.browserStorage=t,this.authCodeRequest=r,this.logger=o,this.performanceClient=a}async initiateAuthRequest(e,t){if(this.logger.verbose("RedirectHandler.initiateAuthRequest called"),e){t.redirectStartPage&&(this.logger.verbose("RedirectHandler.initiateAuthRequest: redirectStartPage set, caching start page"),this.browserStorage.setTemporaryCache(Ke.ORIGIN_URI,t.redirectStartPage,!0)),this.browserStorage.setTemporaryCache(Ke.CORRELATION_ID,this.authCodeRequest.correlationId,!0),this.browserStorage.cacheCodeRequest(this.authCodeRequest),this.logger.infoPii(`RedirectHandler.initiateAuthRequest: Navigate to: ${e}`);const r={apiId:it.acquireTokenRedirect,timeout:t.redirectTimeout,noHistory:!1};if(typeof t.onRedirectNavigate=="function")if(this.logger.verbose("RedirectHandler.initiateAuthRequest: Invoking onRedirectNavigate callback"),t.onRedirectNavigate(e)!==!1){this.logger.verbose("RedirectHandler.initiateAuthRequest: onRedirectNavigate did not return false, navigating"),await t.navigationClient.navigateExternal(e,r);return}else{this.logger.verbose("RedirectHandler.initiateAuthRequest: onRedirectNavigate returned false, stopping navigation");return}else{this.logger.verbose("RedirectHandler.initiateAuthRequest: Navigating window to navigate url"),await t.navigationClient.navigateExternal(e,r);return}}else throw this.logger.info("RedirectHandler.initiateAuthRequest: Navigate url is empty"),ie(mu)}async handleCodeResponse(e,t){this.logger.verbose("RedirectHandler.handleCodeResponse called"),this.browserStorage.setInteractionInProgress(!1);const r=this.browserStorage.generateStateKey(t),o=this.browserStorage.getTemporaryCache(r);if(!o)throw Y(Ol,"Cached State");let a;try{a=this.authModule.handleFragmentResponse(e,o)}catch(f){throw f instanceof zo&&f.subError===bi?ie(bi):f}const l=this.browserStorage.generateNonceKey(o),d=this.browserStorage.getTemporaryCache(l);if(this.authCodeRequest.code=a.code,a.cloud_instance_host_name&&await Q(this.authModule.updateAuthority.bind(this.authModule),x.UpdateTokenEndpointAuthority,this.logger,this.performanceClient,this.authCodeRequest.correlationId)(a.cloud_instance_host_name,this.authCodeRequest.correlationId),a.nonce=d||void 0,a.state=o,a.client_info)this.authCodeRequest.clientInfo=a.client_info;else{const f=this.checkCcsCredentials();f&&(this.authCodeRequest.ccsCredential=f)}const h=await this.authModule.acquireToken(this.authCodeRequest,a);return this.browserStorage.cleanRequestByState(t),h}checkCcsCredentials(){const e=this.browserStorage.getTemporaryCache(Ke.CCS_CREDENTIAL,!0);if(e)try{return JSON.parse(e)}catch{this.authModule.logger.error("Cache credential could not be parsed"),this.authModule.logger.errorPii(`Cache credential could not be parsed: ${e}`)}return null}}/*! @azure/msal-browser v3.28.1 2025-01-14 */function a$(){if(typeof window>"u"||typeof window.performance>"u"||typeof window.performance.getEntriesByType!="function")return;const n=window.performance.getEntriesByType("navigation"),e=n.length?n[0]:void 0;return e==null?void 0:e.type}class s$ extends La{constructor(e,t,r,o,a,l,d,h,f,g){super(e,t,r,o,a,l,d,f,g),this.nativeStorage=h}async acquireToken(e){const t=await Q(this.initializeAuthorizationRequest.bind(this),x.StandardInteractionClientInitializeAuthorizationRequest,this.logger,this.performanceClient,this.correlationId)(e,le.Redirect);this.browserStorage.updateCacheEntries(t.state,t.nonce,t.authority,t.loginHint||"",t.account||null);const r=this.initializeServerTelemetryManager(it.acquireTokenRedirect),o=a=>{a.persisted&&(this.logger.verbose("Page was restored from back/forward cache. Clearing temporary cache."),this.browserStorage.cleanRequestByState(t.state),this.eventHandler.emitEvent(me.RESTORE_FROM_BFCACHE,le.Redirect))};try{const a=await Q(this.initializeAuthorizationCodeRequest.bind(this),x.StandardInteractionClientInitializeAuthorizationCodeRequest,this.logger,this.performanceClient,this.correlationId)(t),l=await Q(this.createAuthCodeClient.bind(this),x.StandardInteractionClientCreateAuthCodeClient,this.logger,this.performanceClient,this.correlationId)({serverTelemetryManager:r,requestAuthority:t.authority,requestAzureCloudOptions:t.azureCloudOptions,requestExtraQueryParameters:t.extraQueryParameters,account:t.account}),d=new gy(l,this.browserStorage,a,this.logger,this.performanceClient),h=await l.getAuthCodeUrl({...t,nativeBroker:Vr.isNativeAvailable(this.config,this.logger,this.nativeMessageHandler,e.authenticationScheme)}),f=this.getRedirectStartPage(e.redirectStartPage);return this.logger.verbosePii(`Redirect start page: ${f}`),window.addEventListener("pageshow",o),await d.initiateAuthRequest(h,{navigationClient:this.navigationClient,redirectTimeout:this.config.system.redirectNavigationTimeout,redirectStartPage:f,onRedirectNavigate:e.onRedirectNavigate||this.config.auth.onRedirectNavigate})}catch(a){throw a instanceof lt&&(a.setCorrelationId(this.correlationId),r.cacheFailedRequest(a)),window.removeEventListener("pageshow",o),this.browserStorage.cleanRequestByState(t.state),a}}async handleRedirectPromise(e="",t){const r=this.initializeServerTelemetryManager(it.handleRedirectPromise);try{if(!this.browserStorage.isInteractionInProgress(!0))return this.logger.info("handleRedirectPromise called but there is no interaction in progress, returning null."),null;const[o,a]=this.getRedirectResponse(e||"");if(!o)return this.logger.info("handleRedirectPromise did not detect a response as a result of a redirect. Cleaning temporary cache."),this.browserStorage.cleanRequestByInteractionType(le.Redirect),a$()!=="back_forward"?t.event.errorCode="no_server_response":this.logger.verbose("Back navigation event detected. Muting no_server_response error"),null;const l=this.browserStorage.getTemporaryCache(Ke.ORIGIN_URI,!0)||V.EMPTY_STRING,d=De.removeHashFromUrl(l),h=De.removeHashFromUrl(window.location.href);if(d===h&&this.config.auth.navigateToLoginRequestUrl)return this.logger.verbose("Current page is loginRequestUrl, handling response"),l.indexOf("#")>-1&&mH(l),await this.handleResponse(o,r);if(this.config.auth.navigateToLoginRequestUrl){if(!Im()||this.config.system.allowRedirectInIframe){this.browserStorage.setTemporaryCache(Ke.URL_HASH,a,!0);const f={apiId:it.handleRedirectPromise,timeout:this.config.system.redirectNavigationTimeout,noHistory:!0};let g=!0;if(!l||l==="null"){const _=pH();this.browserStorage.setTemporaryCache(Ke.ORIGIN_URI,_,!0),this.logger.warning("Unable to get valid login request url from cache, redirecting to home page"),g=await this.navigationClient.navigateInternal(_,f)}else this.logger.verbose(`Navigating to loginRequestUrl: ${l}`),g=await this.navigationClient.navigateInternal(l,f);if(!g)return await this.handleResponse(o,r)}}else return this.logger.verbose("NavigateToLoginRequestUrl set to false, handling response"),await this.handleResponse(o,r);return null}catch(o){throw o instanceof lt&&(o.setCorrelationId(this.correlationId),r.cacheFailedRequest(o)),this.browserStorage.cleanRequestByInteractionType(le.Redirect),o}}getRedirectResponse(e){this.logger.verbose("getRedirectResponseHash called");let t=e;t||(this.config.auth.OIDCOptions.serverResponseType===Gs.QUERY?t=window.location.search:t=window.location.hash);let r=Ll(t);if(r){try{o$(r,this.browserCrypto,le.Redirect)}catch(a){return a instanceof lt&&this.logger.error(`Interaction type validation failed due to ${a.errorCode}: ${a.errorMessage}`),[null,""]}return fH(window),this.logger.verbose("Hash contains known properties, returning response hash"),[r,t]}const o=this.browserStorage.getTemporaryCache(Ke.URL_HASH,!0);return this.browserStorage.removeItem(this.browserStorage.generateCacheKey(Ke.URL_HASH)),o&&(r=Ll(o),r)?(this.logger.verbose("Hash does not contain known properties, returning cached hash"),[r,o]):[null,""]}async handleResponse(e,t){const r=e.state;if(!r)throw ie(_m);const o=this.browserStorage.getCachedRequest(r);if(this.logger.verbose("handleResponse called, retrieved cached request"),e.accountId){if(this.logger.verbose("Account id found in hash, calling WAM for token"),!this.nativeMessageHandler)throw ie(qs);const h=new va(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,it.acquireTokenPopup,this.performanceClient,this.nativeMessageHandler,e.accountId,this.nativeStorage,o.correlationId),{userRequestState:f}=Er.parseRequestState(this.browserCrypto,r);return h.acquireToken({...o,state:f,prompt:void 0}).finally(()=>{this.browserStorage.cleanRequestByState(r)})}const a=this.browserStorage.getCachedAuthority(r);if(!a)throw ie(vm);const l=await Q(this.createAuthCodeClient.bind(this),x.StandardInteractionClientCreateAuthCodeClient,this.logger,this.performanceClient,this.correlationId)({serverTelemetryManager:t,requestAuthority:a});return Ur.removeThrottle(this.browserStorage,this.config.auth.clientId,o),new gy(l,this.browserStorage,o,this.logger,this.performanceClient).handleCodeResponse(e,r)}async logout(e){var o,a;this.logger.verbose("logoutRedirect called");const t=this.initializeLogoutRequest(e),r=this.initializeServerTelemetryManager(it.logout);try{this.eventHandler.emitEvent(me.LOGOUT_START,le.Redirect,e),await this.clearCacheOnLogout(t.account);const l={apiId:it.logout,timeout:this.config.system.redirectNavigationTimeout,noHistory:!1},d=await Q(this.createAuthCodeClient.bind(this),x.StandardInteractionClientCreateAuthCodeClient,this.logger,this.performanceClient,this.correlationId)({serverTelemetryManager:r,requestAuthority:e&&e.authority,requestExtraQueryParameters:e==null?void 0:e.extraQueryParameters,account:e&&e.account||void 0});if(d.authority.protocolMode===fo.OIDC)try{d.authority.endSessionEndpoint}catch{if((o=t.account)!=null&&o.homeAccountId){this.browserStorage.removeAccount((a=t.account)==null?void 0:a.homeAccountId),this.eventHandler.emitEvent(me.LOGOUT_SUCCESS,le.Redirect,t);return}}const h=d.getLogoutUri(t);if(this.eventHandler.emitEvent(me.LOGOUT_SUCCESS,le.Redirect,t),e&&typeof e.onRedirectNavigate=="function")if(e.onRedirectNavigate(h)!==!1){this.logger.verbose("Logout onRedirectNavigate did not return false, navigating"),this.browserStorage.getInteractionInProgress()||this.browserStorage.setInteractionInProgress(!0),await this.navigationClient.navigateExternal(h,l);return}else this.browserStorage.setInteractionInProgress(!1),this.logger.verbose("Logout onRedirectNavigate returned false, stopping navigation");else{this.browserStorage.getInteractionInProgress()||this.browserStorage.setInteractionInProgress(!0),await this.navigationClient.navigateExternal(h,l);return}}catch(l){throw l instanceof lt&&(l.setCorrelationId(this.correlationId),r.cacheFailedRequest(l)),this.eventHandler.emitEvent(me.LOGOUT_FAILURE,le.Redirect,null,l),this.eventHandler.emitEvent(me.LOGOUT_END,le.Redirect),l}this.eventHandler.emitEvent(me.LOGOUT_END,le.Redirect)}getRedirectStartPage(e){const t=e||window.location.href;return De.getAbsoluteUrl(t,lo())}}/*! @azure/msal-browser v3.28.1 2025-01-14 */async function c$(n,e,t,r,o){if(e.addQueueMeasurement(x.SilentHandlerInitiateAuthRequest,r),!n)throw t.info("Navigate url is empty"),ie(mu);return o?Q(u$,x.SilentHandlerLoadFrame,t,e,r)(n,o,e,r):ki(d$,x.SilentHandlerLoadFrameSync,t,e,r)(n)}async function l$(n,e,t,r,o,a,l){return r.addQueueMeasurement(x.SilentHandlerMonitorIframeForHash,a),new Promise((d,h)=>{e<uf&&o.warning(`system.loadFrameTimeout or system.iframeHashTimeout set to lower (${e}ms) than the default (${uf}ms). This may result in timeouts.`);const f=window.setTimeout(()=>{window.clearInterval(g),h(ie(nT))},e),g=window.setInterval(()=>{let _="";const p=n.contentWindow;try{_=p?p.location.href:""}catch{}if(!_||_==="about:blank")return;let w="";p&&(l===Gs.QUERY?w=p.location.search:w=p.location.hash),window.clearTimeout(f),window.clearInterval(g),d(w)},t)}).finally(()=>{ki(h$,x.RemoveHiddenIframe,o,r,a)(n)})}function u$(n,e,t,r){return t.addQueueMeasurement(x.SilentHandlerLoadFrame,r),new Promise((o,a)=>{const l=UT();window.setTimeout(()=>{if(!l){a("Unable to load iframe");return}l.src=n,o(l)},e)})}function d$(n){const e=UT();return e.src=n,e}function UT(){const n=document.createElement("iframe");return n.className="msalSilentIframe",n.style.visibility="hidden",n.style.position="absolute",n.style.width=n.style.height="0",n.style.border="0",n.setAttribute("sandbox","allow-scripts allow-same-origin allow-forms"),document.body.appendChild(n),n}function h$(n){document.body===n.parentNode&&document.body.removeChild(n)}/*! @azure/msal-browser v3.28.1 2025-01-14 */class f$ extends La{constructor(e,t,r,o,a,l,d,h,f,g,_){super(e,t,r,o,a,l,h,g,_),this.apiId=d,this.nativeStorage=f}async acquireToken(e){this.performanceClient.addQueueMeasurement(x.SilentIframeClientAcquireToken,e.correlationId),!e.loginHint&&!e.sid&&(!e.account||!e.account.username)&&this.logger.warning("No user hint provided. The authorization server may need more information to complete this request.");const t={...e};t.prompt?t.prompt!==Bt.NONE&&t.prompt!==Bt.NO_SESSION&&(this.logger.warning(`SilentIframeClient. Replacing invalid prompt ${t.prompt} with ${Bt.NONE}`),t.prompt=Bt.NONE):t.prompt=Bt.NONE;const r=await Q(this.initializeAuthorizationRequest.bind(this),x.StandardInteractionClientInitializeAuthorizationRequest,this.logger,this.performanceClient,e.correlationId)(t,le.Silent);OT(r.authority);const o=this.initializeServerTelemetryManager(this.apiId);let a;try{return a=await Q(this.createAuthCodeClient.bind(this),x.StandardInteractionClientCreateAuthCodeClient,this.logger,this.performanceClient,e.correlationId)({serverTelemetryManager:o,requestAuthority:r.authority,requestAzureCloudOptions:r.azureCloudOptions,requestExtraQueryParameters:r.extraQueryParameters,account:r.account}),await Q(this.silentTokenHelper.bind(this),x.SilentIframeClientTokenHelper,this.logger,this.performanceClient,e.correlationId)(a,r)}catch(l){if(l instanceof lt&&(l.setCorrelationId(this.correlationId),o.cacheFailedRequest(l)),!a||!(l instanceof lt)||l.errorCode!==Dn.INVALID_GRANT_ERROR)throw l;this.performanceClient.addFields({retryError:l.errorCode},this.correlationId);const d=await Q(this.initializeAuthorizationRequest.bind(this),x.StandardInteractionClientInitializeAuthorizationRequest,this.logger,this.performanceClient,e.correlationId)(t,le.Silent);return await Q(this.silentTokenHelper.bind(this),x.SilentIframeClientTokenHelper,this.logger,this.performanceClient,this.correlationId)(a,d)}}logout(){return Promise.reject(ie(gu))}async silentTokenHelper(e,t){const r=t.correlationId;this.performanceClient.addQueueMeasurement(x.SilentIframeClientTokenHelper,r);const o=await Q(this.initializeAuthorizationCodeRequest.bind(this),x.StandardInteractionClientInitializeAuthorizationCodeRequest,this.logger,this.performanceClient,r)(t),a=await Q(e.getAuthCodeUrl.bind(e),x.GetAuthCodeUrl,this.logger,this.performanceClient,r)({...t,nativeBroker:Vr.isNativeAvailable(this.config,this.logger,this.nativeMessageHandler,t.authenticationScheme)}),l=new Nm(e,this.browserStorage,o,this.logger,this.performanceClient),d=await Q(c$,x.SilentHandlerInitiateAuthRequest,this.logger,this.performanceClient,r)(a,this.performanceClient,this.logger,r,this.config.system.navigateFrameWait),h=this.config.auth.OIDCOptions.serverResponseType,f=await Q(l$,x.SilentHandlerMonitorIframeForHash,this.logger,this.performanceClient,r)(d,this.config.system.iframeHashTimeout,this.config.system.pollIntervalMilliseconds,this.performanceClient,this.logger,r,h),g=ki(xT,x.DeserializeResponse,this.logger,this.performanceClient,this.correlationId)(f,h,this.logger);if(g.accountId){if(this.logger.verbose("Account id found in hash, calling WAM for token"),!this.nativeMessageHandler)throw ie(qs);const _=new va(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,this.apiId,this.performanceClient,this.nativeMessageHandler,g.accountId,this.browserStorage,r),{userRequestState:p}=Er.parseRequestState(this.browserCrypto,t.state);return Q(_.acquireToken.bind(_),x.NativeInteractionClientAcquireToken,this.logger,this.performanceClient,r)({...t,state:p,prompt:t.prompt||Bt.NONE})}return Q(l.handleCodeResponse.bind(l),x.HandleCodeResponse,this.logger,this.performanceClient,r)(g,t)}}/*! @azure/msal-browser v3.28.1 2025-01-14 */class m$ extends La{async acquireToken(e){this.performanceClient.addQueueMeasurement(x.SilentRefreshClientAcquireToken,e.correlationId);const t=await Q(km,x.InitializeBaseRequest,this.logger,this.performanceClient,e.correlationId)(e,this.config,this.performanceClient,this.logger),r={...e,...t};e.redirectUri&&(r.redirectUri=this.getRedirectUri(e.redirectUri));const o=this.initializeServerTelemetryManager(it.acquireTokenSilent_silentFlow),a=await this.createRefreshTokenClient({serverTelemetryManager:o,authorityUrl:r.authority,azureCloudOptions:r.azureCloudOptions,account:r.account});return Q(a.acquireTokenByRefreshToken.bind(a),x.RefreshTokenClientAcquireTokenByRefreshToken,this.logger,this.performanceClient,e.correlationId)(r).catch(l=>{throw l.setCorrelationId(this.correlationId),o.cacheFailedRequest(l),l})}logout(){return Promise.reject(ie(gu))}async createRefreshTokenClient(e){const t=await Q(this.getClientConfiguration.bind(this),x.StandardInteractionClientGetClientConfiguration,this.logger,this.performanceClient,this.correlationId)({serverTelemetryManager:e.serverTelemetryManager,requestAuthority:e.authorityUrl,requestAzureCloudOptions:e.azureCloudOptions,requestExtraQueryParameters:e.extraQueryParameters,account:e.account});return new of(t,this.performanceClient)}}/*! @azure/msal-browser v3.28.1 2025-01-14 */class g${constructor(e,t,r,o){this.isBrowserEnvironment=typeof window<"u",this.config=e,this.storage=t,this.logger=r,this.cryptoObj=o}loadExternalTokens(e,t,r){if(!this.isBrowserEnvironment)throw ie(pu);const o=t.id_token?Ai(t.id_token,Kr):void 0,a={protocolMode:this.config.auth.protocolMode,knownAuthorities:this.config.auth.knownAuthorities,cloudDiscoveryMetadata:this.config.auth.cloudDiscoveryMetadata,authorityMetadata:this.config.auth.authorityMetadata,skipAuthorityMetadataCache:this.config.auth.skipAuthorityMetadataCache},l=e.authority?new Xt(Xt.generateAuthority(e.authority,e.azureCloudOptions),this.config.system.networkClient,this.storage,a,this.logger,e.correlationId||go()):void 0,d=this.loadAccount(e,r.clientInfo||t.client_info||"",o,l),h=this.loadIdToken(t,d.homeAccountId,d.environment,d.realm),f=this.loadAccessToken(e,t,d.homeAccountId,d.environment,d.realm,r),g=this.loadRefreshToken(t,d.homeAccountId,d.environment);return this.generateAuthenticationResult(e,{account:d,idToken:h,accessToken:f,refreshToken:g},o,l)}loadAccount(e,t,r,o){if(this.logger.verbose("TokenCache - loading account"),e.account){const h=Pt.createFromAccountInfo(e.account);return this.storage.setAccount(h),h}else if(!o||!t&&!r)throw this.logger.error("TokenCache - if an account is not provided on the request, authority and either clientInfo or idToken must be provided instead."),ie(dT);const a=Pt.generateHomeAccountId(t,o.authorityType,this.logger,this.cryptoObj,r),l=r==null?void 0:r.tid,d=fm(this.storage,o,a,Kr,r,t,o.hostnameAndPort,l,void 0,void 0,this.logger);return this.storage.setAccount(d),d}loadIdToken(e,t,r,o){if(!e.id_token)return this.logger.verbose("TokenCache - no id token found in response"),null;this.logger.verbose("TokenCache - loading id token");const a=cu(t,r,e.id_token,this.config.auth.clientId,o);return this.storage.setIdTokenCredential(a),a}loadAccessToken(e,t,r,o,a,l){if(t.access_token)if(t.expires_in){if(!t.scope&&(!e.scopes||!e.scopes.length))return this.logger.error("TokenCache - scopes not specified in the request or response. Cannot add token to the cache."),null}else return this.logger.error("TokenCache - no expiration set on the access token. Cannot add it to the cache."),null;else return this.logger.verbose("TokenCache - no access token found in response"),null;this.logger.verbose("TokenCache - loading access token");const d=t.scope?_t.fromString(t.scope):new _t(e.scopes),h=l.expiresOn||t.expires_in+new Date().getTime()/1e3,f=l.extendedExpiresOn||(t.ext_expires_in||t.expires_in)+new Date().getTime()/1e3,g=lu(r,o,t.access_token,this.config.auth.clientId,a,d.printScopes(),h,f,Kr);return this.storage.setAccessTokenCredential(g),g}loadRefreshToken(e,t,r){if(!e.refresh_token)return this.logger.verbose("TokenCache - no refresh token found in response"),null;this.logger.verbose("TokenCache - loading refresh token");const o=yw(t,r,e.refresh_token,this.config.auth.clientId,e.foci,void 0,e.refresh_token_expires_in);return this.storage.setRefreshTokenCredential(o),o}generateAuthenticationResult(e,t,r,o){var g,_,p;let a="",l=[],d=null,h;t!=null&&t.accessToken&&(a=t.accessToken.secret,l=_t.fromString(t.accessToken.target).asArray(),d=new Date(Number(t.accessToken.expiresOn)*1e3),h=new Date(Number(t.accessToken.extendedExpiresOn)*1e3));const f=t.account;return{authority:o?o.canonicalAuthority:"",uniqueId:t.account.localAccountId,tenantId:t.account.realm,scopes:l,account:f.getAccountInfo(),idToken:((g=t.idToken)==null?void 0:g.secret)||"",idTokenClaims:r||{},accessToken:a,fromCache:!0,expiresOn:d,correlationId:e.correlationId||"",requestId:"",extExpiresOn:h,familyId:((_=t.refreshToken)==null?void 0:_.familyId)||"",tokenType:((p=t==null?void 0:t.accessToken)==null?void 0:p.tokenType)||"",state:e.state||"",cloudGraphHostName:f.cloudGraphHostName||"",msGraphHost:f.msGraphHost||"",fromNativeBroker:!1}}}/*! @azure/msal-browser v3.28.1 2025-01-14 */class p$ extends zw{constructor(e){super(e),this.includeRedirectUri=!1}}/*! @azure/msal-browser v3.28.1 2025-01-14 */class _$ extends La{constructor(e,t,r,o,a,l,d,h,f,g){super(e,t,r,o,a,l,h,f,g),this.apiId=d}async acquireToken(e){if(!e.code)throw ie(hT);const t=await Q(this.initializeAuthorizationRequest.bind(this),x.StandardInteractionClientInitializeAuthorizationRequest,this.logger,this.performanceClient,e.correlationId)(e,le.Silent),r=this.initializeServerTelemetryManager(this.apiId);try{const o={...t,code:e.code},a=await Q(this.getClientConfiguration.bind(this),x.StandardInteractionClientGetClientConfiguration,this.logger,this.performanceClient,e.correlationId)({serverTelemetryManager:r,requestAuthority:t.authority,requestAzureCloudOptions:t.azureCloudOptions,requestExtraQueryParameters:t.extraQueryParameters,account:t.account}),l=new p$(a);this.logger.verbose("Auth code client created");const d=new Nm(l,this.browserStorage,o,this.logger,this.performanceClient);return await Q(d.handleCodeResponseFromServer.bind(d),x.HandleCodeResponseFromServer,this.logger,this.performanceClient,e.correlationId)({code:e.code,msgraph_host:e.msGraphHost,cloud_graph_host_name:e.cloudGraphHostName,cloud_instance_host_name:e.cloudInstanceHostName},t,!1)}catch(o){throw o instanceof lt&&(o.setCorrelationId(this.correlationId),r.cacheFailedRequest(o)),o}}logout(){return Promise.reject(ie(gu))}}/*! @azure/msal-browser v3.28.1 2025-01-14 */function Dr(n){const e=n==null?void 0:n.idTokenClaims;if(e!=null&&e.tfp||e!=null&&e.acr)return"B2C";if(e!=null&&e.tid){if((e==null?void 0:e.tid)==="9188040d-6c67-4c5b-b112-36a304b66dad")return"MSA"}else return;return"AAD"}function Zc(n,e){try{Sm(n)}catch(t){throw e.end({success:!1},t),t}}class yu{constructor(e){this.operatingContext=e,this.isBrowserEnvironment=this.operatingContext.isBrowserEnvironment(),this.config=e.getConfig(),this.initialized=!1,this.logger=this.operatingContext.getLogger(),this.networkClient=this.config.system.networkClient,this.navigationClient=this.config.system.navigationClient,this.redirectResponse=new Map,this.hybridAuthCodeResponses=new Map,this.performanceClient=this.config.telemetry.client,this.browserCrypto=this.isBrowserEnvironment?new ka(this.logger,this.performanceClient):Pl,this.eventHandler=new KH(this.logger),this.browserStorage=this.isBrowserEnvironment?new hf(this.config.auth.clientId,this.config.cache,this.browserCrypto,this.logger,O2(this.config.auth),this.performanceClient):LH(this.config.auth.clientId,this.logger);const t={cacheLocation:vn.MemoryStorage,temporaryCacheLocation:vn.MemoryStorage,storeAuthStateInCookie:!1,secureCookies:!1,cacheMigrationEnabled:!1,claimsBasedCachingEnabled:!1};this.nativeInternalStorage=new hf(this.config.auth.clientId,t,this.browserCrypto,this.logger,void 0,this.performanceClient),this.tokenCache=new g$(this.config,this.browserStorage,this.logger,this.browserCrypto),this.activeSilentTokenRequests=new Map,this.trackPageVisibility=this.trackPageVisibility.bind(this),this.trackPageVisibilityWithMeasurement=this.trackPageVisibilityWithMeasurement.bind(this),this.listeningToStorageEvents=!1,this.handleAccountCacheChange=this.handleAccountCacheChange.bind(this)}static async createController(e,t){const r=new yu(e);return await r.initialize(t),r}trackPageVisibility(e){e&&(this.logger.info("Perf: Visibility change detected"),this.performanceClient.incrementFields({visibilityChangeCount:1},e))}async initialize(e){if(this.logger.trace("initialize called"),this.initialized){this.logger.info("initialize has already been called, exiting early.");return}if(!this.isBrowserEnvironment){this.logger.info("in non-browser environment, exiting early."),this.initialized=!0,this.eventHandler.emitEvent(me.INITIALIZE_END);return}const t=(e==null?void 0:e.correlationId)||this.getRequestCorrelationId(),r=this.config.system.allowNativeBroker,o=this.performanceClient.startMeasurement(x.InitializeClientApplication,t);if(this.eventHandler.emitEvent(me.INITIALIZE_START),r)try{this.nativeExtensionProvider=await Vr.createProvider(this.logger,this.config.system.nativeBrokerHandshakeTimeout,this.performanceClient)}catch(a){this.logger.verbose(a)}this.config.cache.claimsBasedCachingEnabled||(this.logger.verbose("Claims-based caching is disabled. Clearing the previous cache with claims"),await Q(this.browserStorage.clearTokensAndKeysWithClaims.bind(this.browserStorage),x.ClearTokensAndKeysWithClaims,this.logger,this.performanceClient,t)(this.performanceClient,t)),this.initialized=!0,this.eventHandler.emitEvent(me.INITIALIZE_END),o.end({allowNativeBroker:r,success:!0})}async handleRedirectPromise(e){if(this.logger.verbose("handleRedirectPromise called"),RT(this.initialized),this.isBrowserEnvironment){const t=e||"";let r=this.redirectResponse.get(t);return typeof r>"u"?(r=this.handleRedirectPromiseInternal(e),this.redirectResponse.set(t,r),this.logger.verbose("handleRedirectPromise has been called for the first time, storing the promise")):this.logger.verbose("handleRedirectPromise has been called previously, returning the result from the first call"),r}return this.logger.verbose("handleRedirectPromise returns null, not browser environment"),null}async handleRedirectPromiseInternal(e){const t=this.getAllAccounts(),r=this.browserStorage.getCachedNativeRequest(),o=r&&Vr.isNativeAvailable(this.config,this.logger,this.nativeExtensionProvider)&&this.nativeExtensionProvider&&!e,a=o?r==null?void 0:r.correlationId:this.browserStorage.getTemporaryCache(Ke.CORRELATION_ID,!0)||"",l=this.performanceClient.startMeasurement(x.AcquireTokenRedirect,a);this.eventHandler.emitEvent(me.HANDLE_REDIRECT_START,le.Redirect);let d;if(o&&this.nativeExtensionProvider){this.logger.trace("handleRedirectPromise - acquiring token from native platform");const h=new va(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,it.handleRedirectPromise,this.performanceClient,this.nativeExtensionProvider,r.accountId,this.nativeInternalStorage,r.correlationId);d=Q(h.handleRedirectPromise.bind(h),x.HandleNativeRedirectPromiseMeasurement,this.logger,this.performanceClient,l.event.correlationId)(this.performanceClient,l.event.correlationId)}else{this.logger.trace("handleRedirectPromise - acquiring token from web flow");const h=this.createRedirectClient(a);d=Q(h.handleRedirectPromise.bind(h),x.HandleRedirectPromiseMeasurement,this.logger,this.performanceClient,l.event.correlationId)(e,l)}return d.then(h=>(h?(t.length<this.getAllAccounts().length?(this.eventHandler.emitEvent(me.LOGIN_SUCCESS,le.Redirect,h),this.logger.verbose("handleRedirectResponse returned result, login success")):(this.eventHandler.emitEvent(me.ACQUIRE_TOKEN_SUCCESS,le.Redirect,h),this.logger.verbose("handleRedirectResponse returned result, acquire token success")),l.end({success:!0,accountType:Dr(h.account)})):l.event.errorCode?l.end({success:!1}):l.discard(),this.eventHandler.emitEvent(me.HANDLE_REDIRECT_END,le.Redirect),h)).catch(h=>{const f=h;throw t.length>0?this.eventHandler.emitEvent(me.ACQUIRE_TOKEN_FAILURE,le.Redirect,null,f):this.eventHandler.emitEvent(me.LOGIN_FAILURE,le.Redirect,null,f),this.eventHandler.emitEvent(me.HANDLE_REDIRECT_END,le.Redirect),l.end({success:!1},f),h})}async acquireTokenRedirect(e){const t=this.getRequestCorrelationId(e);this.logger.verbose("acquireTokenRedirect called",t);const r=this.performanceClient.startMeasurement(x.AcquireTokenPreRedirect,t);r.add({accountType:Dr(e.account),scenarioId:e.scenarioId});const o=e.onRedirectNavigate;if(o)e.onRedirectNavigate=l=>{const d=typeof o=="function"?o(l):void 0;return d!==!1?r.end({success:!0}):r.discard(),d};else{const l=this.config.auth.onRedirectNavigate;this.config.auth.onRedirectNavigate=d=>{const h=typeof l=="function"?l(d):void 0;return h!==!1?r.end({success:!0}):r.discard(),h}}const a=this.getAllAccounts().length>0;try{dy(this.initialized,this.config),this.browserStorage.setInteractionInProgress(!0),a?this.eventHandler.emitEvent(me.ACQUIRE_TOKEN_START,le.Redirect,e):this.eventHandler.emitEvent(me.LOGIN_START,le.Redirect,e);let l;return this.nativeExtensionProvider&&this.canUseNative(e)?l=new va(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,it.acquireTokenRedirect,this.performanceClient,this.nativeExtensionProvider,this.getNativeAccountId(e),this.nativeInternalStorage,t).acquireTokenRedirect(e,r).catch(h=>{if(h instanceof Br&&ca(h))return this.nativeExtensionProvider=void 0,this.createRedirectClient(t).acquireToken(e);if(h instanceof Tr)return this.logger.verbose("acquireTokenRedirect - Resolving interaction required error thrown by native broker by falling back to web flow"),this.createRedirectClient(t).acquireToken(e);throw this.browserStorage.setInteractionInProgress(!1),h}):l=this.createRedirectClient(t).acquireToken(e),await l}catch(l){throw r.end({success:!1},l),a?this.eventHandler.emitEvent(me.ACQUIRE_TOKEN_FAILURE,le.Redirect,null,l):this.eventHandler.emitEvent(me.LOGIN_FAILURE,le.Redirect,null,l),l}}acquireTokenPopup(e){const t=this.getRequestCorrelationId(e),r=this.performanceClient.startMeasurement(x.AcquireTokenPopup,t);r.add({scenarioId:e.scenarioId,accountType:Dr(e.account)});try{this.logger.verbose("acquireTokenPopup called",t),Zc(this.initialized,r),this.browserStorage.setInteractionInProgress(!0)}catch(l){return Promise.reject(l)}const o=this.getAllAccounts();o.length>0?this.eventHandler.emitEvent(me.ACQUIRE_TOKEN_START,le.Popup,e):this.eventHandler.emitEvent(me.LOGIN_START,le.Popup,e);let a;return this.canUseNative(e)?a=this.acquireTokenNative({...e,correlationId:t},it.acquireTokenPopup).then(l=>(this.browserStorage.setInteractionInProgress(!1),r.end({success:!0,isNativeBroker:!0,accountType:Dr(l.account)}),l)).catch(l=>{if(l instanceof Br&&ca(l))return this.nativeExtensionProvider=void 0,this.createPopupClient(t).acquireToken(e);if(l instanceof Tr)return this.logger.verbose("acquireTokenPopup - Resolving interaction required error thrown by native broker by falling back to web flow"),this.createPopupClient(t).acquireToken(e);throw this.browserStorage.setInteractionInProgress(!1),l}):a=this.createPopupClient(t).acquireToken(e),a.then(l=>(o.length<this.getAllAccounts().length?this.eventHandler.emitEvent(me.LOGIN_SUCCESS,le.Popup,l):this.eventHandler.emitEvent(me.ACQUIRE_TOKEN_SUCCESS,le.Popup,l),r.end({success:!0,accessTokenSize:l.accessToken.length,idTokenSize:l.idToken.length,accountType:Dr(l.account)}),l)).catch(l=>(o.length>0?this.eventHandler.emitEvent(me.ACQUIRE_TOKEN_FAILURE,le.Popup,null,l):this.eventHandler.emitEvent(me.LOGIN_FAILURE,le.Popup,null,l),r.end({success:!1},l),Promise.reject(l)))}trackPageVisibilityWithMeasurement(){const e=this.ssoSilentMeasurement||this.acquireTokenByCodeAsyncMeasurement;e&&(this.logger.info("Perf: Visibility change detected in ",e.event.name),e.increment({visibilityChangeCount:1}))}async ssoSilent(e){var a,l;const t=this.getRequestCorrelationId(e),r={...e,prompt:e.prompt,correlationId:t};this.ssoSilentMeasurement=this.performanceClient.startMeasurement(x.SsoSilent,t),(a=this.ssoSilentMeasurement)==null||a.add({scenarioId:e.scenarioId,accountType:Dr(e.account)}),Zc(this.initialized,this.ssoSilentMeasurement),(l=this.ssoSilentMeasurement)==null||l.increment({visibilityChangeCount:0}),document.addEventListener("visibilitychange",this.trackPageVisibilityWithMeasurement),this.logger.verbose("ssoSilent called",t),this.eventHandler.emitEvent(me.SSO_SILENT_START,le.Silent,r);let o;return this.canUseNative(r)?o=this.acquireTokenNative(r,it.ssoSilent).catch(d=>{if(d instanceof Br&&ca(d))return this.nativeExtensionProvider=void 0,this.createSilentIframeClient(r.correlationId).acquireToken(r);throw d}):o=this.createSilentIframeClient(r.correlationId).acquireToken(r),o.then(d=>{var h;return this.eventHandler.emitEvent(me.SSO_SILENT_SUCCESS,le.Silent,d),(h=this.ssoSilentMeasurement)==null||h.end({success:!0,isNativeBroker:d.fromNativeBroker,accessTokenSize:d.accessToken.length,idTokenSize:d.idToken.length,accountType:Dr(d.account)}),d}).catch(d=>{var h;throw this.eventHandler.emitEvent(me.SSO_SILENT_FAILURE,le.Silent,null,d),(h=this.ssoSilentMeasurement)==null||h.end({success:!1},d),d}).finally(()=>{document.removeEventListener("visibilitychange",this.trackPageVisibilityWithMeasurement)})}async acquireTokenByCode(e){const t=this.getRequestCorrelationId(e);this.logger.trace("acquireTokenByCode called",t);const r=this.performanceClient.startMeasurement(x.AcquireTokenByCode,t);Zc(this.initialized,r),this.eventHandler.emitEvent(me.ACQUIRE_TOKEN_BY_CODE_START,le.Silent,e),r.add({scenarioId:e.scenarioId});try{if(e.code&&e.nativeAccountId)throw ie(mT);if(e.code){const o=e.code;let a=this.hybridAuthCodeResponses.get(o);return a?(this.logger.verbose("Existing acquireTokenByCode request found",t),r.discard()):(this.logger.verbose("Initiating new acquireTokenByCode request",t),a=this.acquireTokenByCodeAsync({...e,correlationId:t}).then(l=>(this.eventHandler.emitEvent(me.ACQUIRE_TOKEN_BY_CODE_SUCCESS,le.Silent,l),this.hybridAuthCodeResponses.delete(o),r.end({success:!0,isNativeBroker:l.fromNativeBroker,accessTokenSize:l.accessToken.length,idTokenSize:l.idToken.length,accountType:Dr(l.account)}),l)).catch(l=>{throw this.hybridAuthCodeResponses.delete(o),this.eventHandler.emitEvent(me.ACQUIRE_TOKEN_BY_CODE_FAILURE,le.Silent,null,l),r.end({success:!1},l),l}),this.hybridAuthCodeResponses.set(o,a)),await a}else if(e.nativeAccountId)if(this.canUseNative(e,e.nativeAccountId)){const o=await this.acquireTokenNative({...e,correlationId:t},it.acquireTokenByCode,e.nativeAccountId).catch(a=>{throw a instanceof Br&&ca(a)&&(this.nativeExtensionProvider=void 0),a});return r.end({accountType:Dr(o.account),success:!0}),o}else throw ie(gT);else throw ie(fT)}catch(o){throw this.eventHandler.emitEvent(me.ACQUIRE_TOKEN_BY_CODE_FAILURE,le.Silent,null,o),r.end({success:!1},o),o}}async acquireTokenByCodeAsync(e){var o;return this.logger.trace("acquireTokenByCodeAsync called",e.correlationId),this.acquireTokenByCodeAsyncMeasurement=this.performanceClient.startMeasurement(x.AcquireTokenByCodeAsync,e.correlationId),(o=this.acquireTokenByCodeAsyncMeasurement)==null||o.increment({visibilityChangeCount:0}),document.addEventListener("visibilitychange",this.trackPageVisibilityWithMeasurement),await this.createSilentAuthCodeClient(e.correlationId).acquireToken(e).then(a=>{var l;return(l=this.acquireTokenByCodeAsyncMeasurement)==null||l.end({success:!0,fromCache:a.fromCache,isNativeBroker:a.fromNativeBroker}),a}).catch(a=>{var l;throw(l=this.acquireTokenByCodeAsyncMeasurement)==null||l.end({success:!1},a),a}).finally(()=>{document.removeEventListener("visibilitychange",this.trackPageVisibilityWithMeasurement)})}async acquireTokenFromCache(e,t){switch(this.performanceClient.addQueueMeasurement(x.AcquireTokenFromCache,e.correlationId),t){case Pn.Default:case Pn.AccessToken:case Pn.AccessTokenAndRefreshToken:const r=this.createSilentCacheClient(e.correlationId);return Q(r.acquireToken.bind(r),x.SilentCacheClientAcquireToken,this.logger,this.performanceClient,e.correlationId)(e);default:throw Y(co)}}async acquireTokenByRefreshToken(e,t){switch(this.performanceClient.addQueueMeasurement(x.AcquireTokenByRefreshToken,e.correlationId),t){case Pn.Default:case Pn.AccessTokenAndRefreshToken:case Pn.RefreshToken:case Pn.RefreshTokenAndNetwork:const r=this.createSilentRefreshClient(e.correlationId);return Q(r.acquireToken.bind(r),x.SilentRefreshClientAcquireToken,this.logger,this.performanceClient,e.correlationId)(e);default:throw Y(co)}}async acquireTokenBySilentIframe(e){this.performanceClient.addQueueMeasurement(x.AcquireTokenBySilentIframe,e.correlationId);const t=this.createSilentIframeClient(e.correlationId);return Q(t.acquireToken.bind(t),x.SilentIframeClientAcquireToken,this.logger,this.performanceClient,e.correlationId)(e)}async logout(e){const t=this.getRequestCorrelationId(e);return this.logger.warning("logout API is deprecated and will be removed in msal-browser v3.0.0. Use logoutRedirect instead.",t),this.logoutRedirect({correlationId:t,...e})}async logoutRedirect(e){const t=this.getRequestCorrelationId(e);return dy(this.initialized,this.config),this.browserStorage.setInteractionInProgress(!0),this.createRedirectClient(t).logout(e)}logoutPopup(e){try{const t=this.getRequestCorrelationId(e);return Sm(this.initialized),this.browserStorage.setInteractionInProgress(!0),this.createPopupClient(t).logout(e)}catch(t){return Promise.reject(t)}}async clearCache(e){if(!this.isBrowserEnvironment){this.logger.info("in non-browser environment, returning early.");return}const t=this.getRequestCorrelationId(e);return this.createSilentCacheClient(t).logout(e)}getAllAccounts(e){return xH(this.logger,this.browserStorage,this.isBrowserEnvironment,e)}getAccount(e){return UH(e,this.logger,this.browserStorage)}getAccountByUsername(e){return BH(e,this.logger,this.browserStorage)}getAccountByHomeId(e){return VH(e,this.logger,this.browserStorage)}getAccountByLocalId(e){return FH(e,this.logger,this.browserStorage)}setActiveAccount(e){HH(e,this.browserStorage)}getActiveAccount(){return $H(this.browserStorage)}async hydrateCache(e,t){this.logger.verbose("hydrateCache called");const r=Pt.createFromAccountInfo(e.account,e.cloudGraphHostName,e.msGraphHost);return this.browserStorage.setAccount(r),e.fromNativeBroker?(this.logger.verbose("Response was from native broker, storing in-memory"),this.nativeInternalStorage.hydrateCache(e,t)):this.browserStorage.hydrateCache(e,t)}async acquireTokenNative(e,t,r){if(this.logger.trace("acquireTokenNative called"),!this.nativeExtensionProvider)throw ie(qs);return new va(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,t,this.performanceClient,this.nativeExtensionProvider,r||this.getNativeAccountId(e),this.nativeInternalStorage,e.correlationId).acquireToken(e)}canUseNative(e,t){if(this.logger.trace("canUseNative called"),!Vr.isNativeAvailable(this.config,this.logger,this.nativeExtensionProvider,e.authenticationScheme))return this.logger.trace("canUseNative: isNativeAvailable returned false, returning false"),!1;if(e.prompt)switch(e.prompt){case Bt.NONE:case Bt.CONSENT:case Bt.LOGIN:this.logger.trace("canUseNative: prompt is compatible with native flow");break;default:return this.logger.trace(`canUseNative: prompt = ${e.prompt} is not compatible with native flow, returning false`),!1}return!t&&!this.getNativeAccountId(e)?(this.logger.trace("canUseNative: nativeAccountId is not available, returning false"),!1):!0}getNativeAccountId(e){const t=e.account||this.getAccount({loginHint:e.loginHint,sid:e.sid})||this.getActiveAccount();return t&&t.nativeAccountId||""}createPopupClient(e){return new i$(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,this.performanceClient,this.nativeInternalStorage,this.nativeExtensionProvider,e)}createRedirectClient(e){return new s$(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,this.performanceClient,this.nativeInternalStorage,this.nativeExtensionProvider,e)}createSilentIframeClient(e){return new f$(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,it.ssoSilent,this.performanceClient,this.nativeInternalStorage,this.nativeExtensionProvider,e)}createSilentCacheClient(e){return new LT(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,this.performanceClient,this.nativeExtensionProvider,e)}createSilentRefreshClient(e){return new m$(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,this.performanceClient,this.nativeExtensionProvider,e)}createSilentAuthCodeClient(e){return new _$(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,it.acquireTokenByCode,this.performanceClient,this.nativeExtensionProvider,e)}addEventCallback(e,t){return this.eventHandler.addEventCallback(e,t)}removeEventCallback(e){this.eventHandler.removeEventCallback(e)}addPerformanceCallback(e){return NT(),this.performanceClient.addPerformanceCallback(e)}removePerformanceCallback(e){return this.performanceClient.removePerformanceCallback(e)}enableAccountStorageEvents(){typeof window>"u"||(this.listeningToStorageEvents?this.logger.verbose("Account storage listener already registered."):(this.logger.verbose("Adding account storage listener."),this.listeningToStorageEvents=!0,window.addEventListener("storage",this.handleAccountCacheChange)))}disableAccountStorageEvents(){typeof window>"u"||(this.listeningToStorageEvents?(this.logger.verbose("Removing account storage listener."),window.removeEventListener("storage",this.handleAccountCacheChange),this.listeningToStorageEvents=!1):this.logger.verbose("No account storage listener registered."))}handleAccountCacheChange(e){var t;try{(t=e.key)!=null&&t.includes(Lt.ACTIVE_ACCOUNT_FILTERS)&&this.eventHandler.emitEvent(me.ACTIVE_ACCOUNT_CHANGED);const r=e.newValue||e.oldValue;if(!r)return;const o=JSON.parse(r);if(typeof o!="object"||!Pt.isAccountEntity(o))return;const l=Sa.toObject(new Pt,o).getAccountInfo();!e.oldValue&&e.newValue?(this.logger.info("Account was added to cache in a different window"),this.eventHandler.emitEvent(me.ACCOUNT_ADDED,void 0,l)):!e.newValue&&e.oldValue&&(this.logger.info("Account was removed from cache in a different window"),this.eventHandler.emitEvent(me.ACCOUNT_REMOVED,void 0,l))}catch{return}}getTokenCache(){return this.tokenCache}getLogger(){return this.logger}setLogger(e){this.logger=e}initializeWrapperLibrary(e,t){this.browserStorage.setWrapperMetadata(e,t)}setNavigationClient(e){this.navigationClient=e}getConfiguration(){return this.config}getPerformanceClient(){return this.performanceClient}isBrowserEnv(){return this.isBrowserEnvironment}getRequestCorrelationId(e){return e!=null&&e.correlationId?e.correlationId:this.isBrowserEnvironment?go():V.EMPTY_STRING}async loginRedirect(e){const t=this.getRequestCorrelationId(e);return this.logger.verbose("loginRedirect called",t),this.acquireTokenRedirect({correlationId:t,...e||cy})}loginPopup(e){const t=this.getRequestCorrelationId(e);return this.logger.verbose("loginPopup called",t),this.acquireTokenPopup({correlationId:t,...e||cy})}async acquireTokenSilent(e){const t=this.getRequestCorrelationId(e),r=this.performanceClient.startMeasurement(x.AcquireTokenSilent,t);r.add({cacheLookupPolicy:e.cacheLookupPolicy,scenarioId:e.scenarioId}),Zc(this.initialized,r),this.logger.verbose("acquireTokenSilent called",t);const o=e.account||this.getActiveAccount();if(!o)throw ie(aT);r.add({accountType:Dr(o)});const a={clientId:this.config.auth.clientId,authority:e.authority||V.EMPTY_STRING,scopes:e.scopes,homeAccountIdentifier:o.homeAccountId,claims:e.claims,authenticationScheme:e.authenticationScheme,resourceRequestMethod:e.resourceRequestMethod,resourceRequestUri:e.resourceRequestUri,shrClaims:e.shrClaims,sshKid:e.sshKid,shrOptions:e.shrOptions},l=JSON.stringify(a),d=this.activeSilentTokenRequests.get(l);if(typeof d>"u"){this.logger.verbose("acquireTokenSilent called for the first time, storing active request",t);const h=Q(this.acquireTokenSilentAsync.bind(this),x.AcquireTokenSilentAsync,this.logger,this.performanceClient,t)({...e,correlationId:t},o).then(f=>(this.activeSilentTokenRequests.delete(l),r.end({success:!0,fromCache:f.fromCache,isNativeBroker:f.fromNativeBroker,cacheLookupPolicy:e.cacheLookupPolicy,accessTokenSize:f.accessToken.length,idTokenSize:f.idToken.length}),f)).catch(f=>{throw this.activeSilentTokenRequests.delete(l),r.end({success:!1},f),f});return this.activeSilentTokenRequests.set(l,h),{...await h,state:e.state}}else return this.logger.verbose("acquireTokenSilent has been called previously, returning the result from the first call",t),r.discard(),{...await d,state:e.state}}async acquireTokenSilentAsync(e,t){const r=()=>this.trackPageVisibility(e.correlationId);this.performanceClient.addQueueMeasurement(x.AcquireTokenSilentAsync,e.correlationId),this.eventHandler.emitEvent(me.ACQUIRE_TOKEN_START,le.Silent,e),e.correlationId&&this.performanceClient.incrementFields({visibilityChangeCount:0},e.correlationId),document.addEventListener("visibilitychange",r);const o=await Q(jH,x.InitializeSilentRequest,this.logger,this.performanceClient,e.correlationId)(e,t,this.config,this.performanceClient,this.logger),a=e.cacheLookupPolicy||Pn.Default;return this.acquireTokenSilentNoIframe(o,a).catch(async d=>{if(v$(d,a))if(this.activeIframeRequest)if(a!==Pn.Skip){const[f,g]=this.activeIframeRequest;this.logger.verbose(`Iframe request is already in progress, awaiting resolution for request with correlationId: ${g}`,o.correlationId);const _=this.performanceClient.startMeasurement(x.AwaitConcurrentIframe,o.correlationId);_.add({awaitIframeCorrelationId:g});const p=await f;if(_.end({success:p}),p)return this.logger.verbose(`Parallel iframe request with correlationId: ${g} succeeded. Retrying cache and/or RT redemption`,o.correlationId),this.acquireTokenSilentNoIframe(o,a);throw this.logger.info(`Iframe request with correlationId: ${g} failed. Interaction is required.`),d}else return this.logger.warning("Another iframe request is currently in progress and CacheLookupPolicy is set to Skip. This may result in degraded performance and/or reliability for both calls. Please consider changing the CacheLookupPolicy to take advantage of request queuing and token cache.",o.correlationId),Q(this.acquireTokenBySilentIframe.bind(this),x.AcquireTokenBySilentIframe,this.logger,this.performanceClient,o.correlationId)(o);else{let f;return this.activeIframeRequest=[new Promise(g=>{f=g}),o.correlationId],this.logger.verbose("Refresh token expired/invalid or CacheLookupPolicy is set to Skip, attempting acquire token by iframe.",o.correlationId),Q(this.acquireTokenBySilentIframe.bind(this),x.AcquireTokenBySilentIframe,this.logger,this.performanceClient,o.correlationId)(o).then(g=>(f(!0),g)).catch(g=>{throw f(!1),g}).finally(()=>{this.activeIframeRequest=void 0})}else throw d}).then(d=>(this.eventHandler.emitEvent(me.ACQUIRE_TOKEN_SUCCESS,le.Silent,d),e.correlationId&&this.performanceClient.addFields({fromCache:d.fromCache,isNativeBroker:d.fromNativeBroker},e.correlationId),d)).catch(d=>{throw this.eventHandler.emitEvent(me.ACQUIRE_TOKEN_FAILURE,le.Silent,null,d),d}).finally(()=>{document.removeEventListener("visibilitychange",r)})}async acquireTokenSilentNoIframe(e,t){return Vr.isNativeAvailable(this.config,this.logger,this.nativeExtensionProvider,e.authenticationScheme)&&e.account.nativeAccountId?(this.logger.verbose("acquireTokenSilent - attempting to acquire token from native platform"),this.acquireTokenNative(e,it.acquireTokenSilent_silentFlow).catch(async r=>{throw r instanceof Br&&ca(r)?(this.logger.verbose("acquireTokenSilent - native platform unavailable, falling back to web flow"),this.nativeExtensionProvider=void 0,Y(co)):r})):(this.logger.verbose("acquireTokenSilent - attempting to acquire token from web flow"),Q(this.acquireTokenFromCache.bind(this),x.AcquireTokenFromCache,this.logger,this.performanceClient,e.correlationId)(e,t).catch(r=>{if(t===Pn.AccessToken)throw r;return this.eventHandler.emitEvent(me.ACQUIRE_TOKEN_NETWORK_START,le.Silent,e),Q(this.acquireTokenByRefreshToken.bind(this),x.AcquireTokenByRefreshToken,this.logger,this.performanceClient,e.correlationId)(e,t)}))}}function v$(n,e){const t=!(n instanceof Tr&&n.subError!==fu),r=n.errorCode===Dn.INVALID_GRANT_ERROR||n.errorCode===co,o=t&&r||n.errorCode===Ul||n.errorCode===hm,a=tH.includes(e);return o&&a}/*! @azure/msal-browser v3.28.1 2025-01-14 */async function y$(n,e){const t=new Ii(n);return await t.initialize(),yu.createController(t,e)}/*! @azure/msal-browser v3.28.1 2025-01-14 */class Rm{static async createPublicClientApplication(e){const t=await y$(e);return new Rm(e,t)}constructor(e,t){this.controller=t||new yu(new Ii(e))}async initialize(e){return this.controller.initialize(e)}async acquireTokenPopup(e){return this.controller.acquireTokenPopup(e)}acquireTokenRedirect(e){return this.controller.acquireTokenRedirect(e)}acquireTokenSilent(e){return this.controller.acquireTokenSilent(e)}acquireTokenByCode(e){return this.controller.acquireTokenByCode(e)}addEventCallback(e,t){return this.controller.addEventCallback(e,t)}removeEventCallback(e){return this.controller.removeEventCallback(e)}addPerformanceCallback(e){return this.controller.addPerformanceCallback(e)}removePerformanceCallback(e){return this.controller.removePerformanceCallback(e)}enableAccountStorageEvents(){this.controller.enableAccountStorageEvents()}disableAccountStorageEvents(){this.controller.disableAccountStorageEvents()}getAccount(e){return this.controller.getAccount(e)}getAccountByHomeId(e){return this.controller.getAccountByHomeId(e)}getAccountByLocalId(e){return this.controller.getAccountByLocalId(e)}getAccountByUsername(e){return this.controller.getAccountByUsername(e)}getAllAccounts(e){return this.controller.getAllAccounts(e)}handleRedirectPromise(e){return this.controller.handleRedirectPromise(e)}loginPopup(e){return this.controller.loginPopup(e)}loginRedirect(e){return this.controller.loginRedirect(e)}logout(e){return this.controller.logout(e)}logoutRedirect(e){return this.controller.logoutRedirect(e)}logoutPopup(e){return this.controller.logoutPopup(e)}ssoSilent(e){return this.controller.ssoSilent(e)}getTokenCache(){return this.controller.getTokenCache()}getLogger(){return this.controller.getLogger()}setLogger(e){this.controller.setLogger(e)}setActiveAccount(e){this.controller.setActiveAccount(e)}getActiveAccount(){return this.controller.getActiveAccount()}initializeWrapperLibrary(e,t){return this.controller.initializeWrapperLibrary(e,t)}setNavigationClient(e){this.controller.setNavigationClient(e)}getConfiguration(){return this.controller.getConfiguration()}async hydrateCache(e,t){return this.controller.hydrateCache(e,t)}clearCache(e){return this.controller.clearCache(e)}}const dh=process.env.JPLAN_WEBAPP__APP_PROXY_TENANT_NAME??"",C$=process.env.JPLAN_WEBAPP__APP_PROXY_CLIENT_ID??"",E$=process.env.JPLAN_WEBAPP__APP_PROXY_USER_FLOW??"",mf=process.env.JPLAN_WEBAPP__URL_AUTH??process.env.JPLAN_WEBAPP__URL_BASE??"",w$={auth:{clientId:C$,authority:`https://${dh}.b2clogin.com/${dh}.onmicrosoft.com/${E$}`,knownAuthorities:[`${dh}.b2clogin.com`],redirectUri:process.env.JPLAN_AUTOMATION_ENVIRONMENT?`${mf}/_/dashboard`:mf},cache:{cacheLocation:"localStorage",storeAuthStateInCookie:!1},system:{loggerOptions:{loggerCallback:(n,e)=>{n===nt.Error&&console.error(e)},logLevel:nt.Warning}}},BT=(n,e)=>({scopes:["https://graph.microsoft.com/.default","openid","profile"],redirectStartPage:`${mf}${n}`,extraQueryParameters:e}),Gt=new Rm(w$),py=c.ref(null);function VT(){async function n(e){var t;if(e)try{const r=e.idTokenClaims;if(!(r!=null&&r.aud))throw new Error("User audience (aud) is missing in ID token claims");const o=localStorage.getItem(`msal.token.keys.${r.aud}`);if(!o)throw new Error(`Token keys para ${r.aud} não encontrados no localStorage`);const a=JSON.parse(o),l=(t=a==null?void 0:a.idToken)==null?void 0:t[0];if(!l)throw new Error("idToken não encontrado nos token keys");const d=localStorage.getItem(l);if(!d)throw new Error(`Dados do token para ID ${l} não encontrados no localStorage`);const h=JSON.parse(d),f=h==null?void 0:h.secret;if(!f)throw new Error("Secret não encontrado nos dados do token");sessionStorage.setItem("isAuthenticated","true"),py.value=f}catch(r){console.error("Erro ao obter token de acesso:",r)}}return{jToken:py,setJToken:n}}let el=null;const nr=c.ref(null),Qi=c.ref(null),FT=c.ref(Math.floor(Date.now()/1e3));gf.useIntervalFn(()=>T$(),1e3);function T$(){var r,o;if(!((o=(r=nr.value)==null?void 0:r.idTokenClaims)!=null&&o.exp))return;const n=Math.floor(Date.now()/1e3),e=300,t=nr.value.idTokenClaims.exp;FT.value=t-n-e}function Om(){if(el)return el;const{setJToken:n,jToken:e}=VT(),t=c.computed(()=>!!nr.value),r=c.computed(()=>nr.value);let o;async function a(p,w){if(!t.value)switch(p){case"redirect":w&&(o=w,await h());break;case"tab":default:await l();break}}const l=async()=>new Promise((p,w)=>{try{localStorage.clear();const C=process.env.JPLAN_WEBAPP__URL_AUTH,T=window.open(C);if(!T){console.error("Failed to open authentication window"),w("Failed to open authentication window");return}const k=Date.now(),I=6e4,N=setInterval(()=>{if(Date.now()-k>I||T.closed){clearInterval(N),console.error("Authentication canceled or timeout reached."),w("Authentication canceled or timeout reached.");return}Object.keys(localStorage).some(L=>L.startsWith("msal.account.keys"))&&(clearInterval(N),d(),T.close(),p())},500)}catch(C){console.error("Error in handleRedirect:",C),w(C)}}),d=async()=>{try{await Gt.initialize();const p=Gt.getActiveAccount();if(p)nr.value=p;else{const w=await Gt.handleRedirectPromise();w?(Gt.setActiveAccount(w.account),nr.value=Gt.getActiveAccount()):console.error("Falha na autenticação")}}catch(p){console.error("Erro no processo de autenticação:",p)}nr.value&&await n(nr.value)},h=async()=>{try{await Gt.initialize();const p=await Gt.handleRedirectPromise();if(!p||Gt.getAllAccounts().length===0){const w=BT(o);await Gt.loginRedirect(w);return}Gt.setActiveAccount(p.account),nr.value=Gt.getActiveAccount(),nr.value&&await n(nr.value),Qi.value="updated"}catch(p){console.error("handleRedirect failed",p)}};async function f(){ve.value=!0,Qi.value="updating";try{const p=await Gt.acquireTokenSilent({scopes:["https://graph.microsoft.com/.default","openid","profile"]});Gt.setActiveAccount(p.account),await n(nr.value),Qi.value="updated"}catch(p){console.error("Failed to refresh token, forcing new login.",p),Qi.value="error",localStorage.clear(),window.location.reload()}ve.value=!1}const g=async()=>{try{await Gt.initialize(),localStorage.clear(),await Gt.logoutRedirect({postLogoutRedirectUri:"/"})}catch(p){console.error("Logout error",p)}};c.watch(FT,async p=>{p<=0&&Qi.value==="updated"&&await f()});const _=c.computed(()=>e.value);return el={isAuthenticated:t,authState:Qi,account:r,token:_,refreshToken:f,handleRedirect:a,logout:g},el}const{jToken:_y}=VT(),Pm=()=>{const{toast:n}=uC(),e=yt.create({headers:{"Content-Type":"application/json"}});function t(l,d){const h={url:l.url||"",method:(l.method||"get").toUpperCase(),status:(d==null?void 0:d.status)||0};return{success:f=>n.server.success(f,h),error:f=>n.server.error(f,h),warning:f=>n.server.warning(f,h),info:f=>n.server.info(f,h)}}c.watch(_y,l=>{e.interceptors.request.use(d=>(l&&(d.headers.Authorization=`Bearer ${l}`),d))},{immediate:!0});let r=1;e.interceptors.response.use(l=>(l.notify=t(l.config,l),l),async l=>{var d;if(l.config&&(l.notify=t(l.config,l.response)),l.config&&l.config.headers){const h=l.config;if(((d=l.response)==null?void 0:d.status)===401&&r>0){r--;try{return h.headers.Authorization=`Bearer ${_y.value}`,await e(h)}catch(f){return Promise.reject(f)}}}return Promise.reject(l)});async function o({url:l,method:d,header:h={},body:f,baseURL:g}){return g&&(e.defaults.baseURL=g),e({url:l,method:d,headers:h,data:f})}async function a({url:l,method:d,header:h,body:f,baseURL:g}){return g&&(e.defaults.baseURL=g),e({url:l,method:d,headers:h,data:f})}return Object.assign(e,{_request:o,rawRequest:a})},{request:vy}=Pm(),yy=c.ref(null),Cy=c.ref("default"),hh=c.ref(null),fh=c.ref({scope_type:"org"});function Cu(){var _,p;const{handleRedirect:n,account:e,logout:t}=Om();(p=(_=e.value)==null?void 0:_.idTokenClaims)==null||p.domain;const r=c.computed(()=>{var w,C;return{domain:(C=(w=e.value)==null?void 0:w.idTokenClaims)==null?void 0:C.domain,environment:Cy.value,...fh.value}}),o=c.computed(()=>fh.value);async function a(){var w;(!e.value||!((w=e.value.idTokenClaims)!=null&&w.email))&&await n();try{await l(),await d()}catch{}}async function l(){var w,C;try{const T=(C=(w=e.value)==null?void 0:w.idTokenClaims)==null?void 0:C.email;if(!T)throw new Error("Email is undefined");const k=await vy({url:`https://api.jplan.com.br/platform/user/profile/?email=${T}`,method:"GET"});hh.value=k.data??null}catch(T){console.error("Failed to fetch user profile:",T)}}async function d(){var w;try{if(!((w=hh.value)!=null&&w.email))throw new Error("User email is undefined");const C=await vy({url:"https://api.jplan.com.br/platform/user/domain/",method:"GET"});yy.value=C.data.data??[]}catch(C){console.error("Failed to fetch user domains:",C)}}function h(w){fh.value=w}function f(w){Cy.value=w,h(r.value)}async function g(w,C){const T=BT(w,{request_domain:C});await Gt.loginRedirect(T)}return{__init__:a,user:hh,userDomains:yy,setEnv:f,setScope:h,changeDomain:g,session:r,scope:o,logout:t}}const b$={path:"/_/dashboard",component:()=>Promise.resolve().then(()=>require("./AuthRoute-Cayv-2a7.js")),meta:{requiresAuth:!1}},I$={path:"/jplan-auth-fail",component:()=>Promise.resolve().then(()=>require("./AuthFailRoute-DHl-IhUQ.js")),meta:{requiresAuth:!1}},{isAuthenticated:Ey,handleRedirect:S$}=Om(),A$=Cu();function k$(n,e){n.addRoute(b$),n.addRoute(I$),n.beforeEach(async(t,r,o)=>{function a(d){return d.matched.some(h=>h.meta.requiresAuth)}if(!a(t))return o();if(!Ey.value){ve.value=!0;try{await S$(e,t.fullPath),await A$.__init__()}catch(d){console.error("Fail to authenticate",d),await n.push("/jplan-auth-fail")}ve.value=!1}if(Ey.value){if(localStorage.getItem("returnRoute")&&localStorage.getItem("returnRoute")!==null){const d=localStorage.getItem("returnRoute")??"/";console.log("trying to go to saved route:",d),o(d),localStorage.removeItem("returnRoute");return}o()}})}const{scope:wy}=Cu();function N$(){const n=Pm(),e=c.ref({scope_type:"org"});async function t(r){e.value=r}return c.watch(wy,()=>{n.interceptors.request.use(r=>{const o=r.headers,a=o.Authorization;a&&(o.Authorization=a);const l=wy.value;return l&&(l.scope_type&&(o["j-scope-type"]=l.scope_type,l.organization&&(o["j-scope-organization"]=l.organization),l.team&&(o["j-scope-team"]=l.team)),l.environment&&(o["j-scope-environment"]=l.environment)),r})},{immediate:!0}),Object.assign(n,{setScope:t,scope:e})}function xa(n){const e=N$();e.defaults.baseURL=n;const t=c.ref({scope_type:"org"});async function r(o){t.value=o}return c.watch(t,()=>{e.interceptors.request.use(o=>{const a=t.value;return delete o.headers["j-scope-type"],delete o.headers["j-scope-organization"],delete o.headers["j-scope-team"],a!=null&&a.scope_type&&(o.headers["j-scope-type"]=a.scope_type),a!=null&&a.organization&&(o.headers["j-scope-organization"]=a.organization),a!=null&&a.team&&(o.headers["j-scope-team"]=a.team),o})},{immediate:!0}),Object.assign(e,{setScope:r,scope:t})}const Ty={enUS:{widget:"widget",spacer:"spacer"},ptBr:{widget:"widget",spacer:"Espaçador"}},Mm={"pt-BR":{placeholders:{selectFilter:"Selecionar filtro",visualize:"Visualizar",actions:"Ações",search:"Pesquisar"},dialogs:{columnSettings:{title:"Configurações de coluna"},scope:{title:"Escopo",unknown:"Desconhecido",domain:"Domínio",environment:"Ambiente",organizational:"Organizacional",organization:"Organização",team:"Time",user:"Usuário",none:"Nenhum",selectOrganization:"Selecione uma Organização",selectTeam:"Selecione um Time"},deleteAll:{title:"Confirme a ação",text:"Tem certeza que deseja apagar todos os selecionados?"}},actions:{save:"Salvar",cancel:"Cancelar",edit:"Editar",delete:"Apagar",disable:"Desabilitar",confirm:"Confirmar",back:"Voltar",deleteAll:"Apagar"},forms:{metadata:{created:"Criado",updated:"Atualizado",modified:"Modificado",delegated:"Delegado"}},$vuetify:{dataFooter:{itemsPerPageAll:"Todos",itemsPerPageText:"Itens por página:",pageText:"{0}-{1} de {2}"}},toast:{error:{create_failed:"Falha ao criar {entity}",update_failed:"Falha ao atualizar {entity}",delete_failed:"Falha ao apagar {entity}",fetch_failed:"Falha ao buscar {entity}",activate_failed:"Falha ao ativar {entity}",deactivate_failed:"Falha ao desativar {entity}",link_failed:"Falha ao vincular {entity}",unlink_failed:"Falha ao desvincular {entity}"},success:{create_success:"{entity} criado com sucesso",update_success:"{entity} atualizado com sucesso",delete_success:"{entity} apagado com sucesso",activate_success:"{entity} ativado com sucesso",deactivate_success:"{entity} desativado com sucesso",link_success:"{entity} vinculado com sucesso",unlink_success:"{entity} desvinculado com sucesso"},info:{already_linked:"{entity} já está vinculado",select_valid_item:"Selecione um item válido"}},app:{widget:Ty.ptBr}},"en-US":{placeholders:{selectFilter:"Select a filter",visualize:"Visualize",actions:"Actions",search:"Search"},dialogs:{columnSettings:{title:"Column Settings"},scope:{title:"Scope",unknown:"Unknown",domain:"Domain",environment:"Environment",organizational:"Organizational",organization:"Organization",team:"Team",user:"User",none:"None",selectOrganization:"Select a organization",selectTeam:"Select a Team"},deleteAll:{title:"Confirm action",text:"Are you sure you want to delete all selected items?"}},actions:{save:"Save",cancel:"Cancel",edit:"Edit",delete:"Delete",disable:"Disable",back:"Back",confirm:"Confirm",deleteAll:"Delete"},forms:{metadata:{created:"Created",updated:"Updated",modified:"Modified",delegated:"Delegated"}},$vuetify:{dataFooter:{itemsPerPageAll:"All",itemsPerPageText:"Items per page:",pageText:"{0}-{1} of {2}"}},toast:{error:{create_failed:"Failed to create {entity}",update_failed:"Failed to update {entity}",delete_failed:"Failed to delete {entity}",fetch_failed:"Failed to fetch {entity}",activate_failed:"Failed to activate {entity}",deactivate_failed:"Failed to deactivate {entity}",link_failed:"Failed to link {entity}",unlink_failed:"Failed to unlink {entity}"},success:{create_success:"{entity} created successfully",update_success:"{entity} updated successfully",delete_success:"{entity} deleted successfully",activate_success:"{entity} activated successfully",deactivate_success:"{entity} deactivated successfully",link_success:"{entity} linked successfully",unlink_success:"{entity} unlinked successfully"},info:{already_linked:"{entity} is already linked",select_valid_item:"Please select a valid item"}},app:{widget:Ty.ptBr}}},R$=Object.keys(Mm),by=navigator.language,O$=R$.includes(by)?by:"pt-BR",$=xM({locale:O$,fallbackLocale:"en-US",messages:Mm});function P$(){const n=xa("https://api.jplan.com.br/management/organization"),{error:e}=sr();return{async getOrgList(t){try{const r=t?`?filter_query=${t}`:"",o=await n.get(`/list/${r}`);if(o.data.error)throw e($.global.t("toast.error.fetch_failed",{entity:"Organization"})),new Error(o.data.error);return o.data.data}catch(r){console.error("Error in getOrgList:",r),e($.global.t("toast.error.fetch_failed",{entity:"Organization"}));return}},async createOrg(t){var r,o;try{const a=await n.post("/item",t);return a.status>=200&&a.status<300?a:void 0}catch(a){throw console.error("Error in createOrg:",a),e(((o=(r=a.response)==null?void 0:r.data)==null?void 0:o.message)||$.global.t("toast.error.create_failed",{entity:"Organization"})),a}},async updateOrg(t){var r,o;try{const a=await n.patch("/item",t);if(a.data.error)throw e($.global.t("toast.error.update_failed",{entity:"Organization"})),new Error(a.data.error);return a}catch(a){throw console.error("Error in updateOrg:",a),e(((o=(r=a.response)==null?void 0:r.data)==null?void 0:o.message)||$.global.t("toast.error.update_failed",{entity:"Organization"})),a}},async getOrg(t){var r,o;try{const a=await n.get(`/item/${t}`);if(a.data.error)throw e($.global.t("toast.error.fetch_failed",{entity:"Organization"})),new Error(a.data.error);return a.data}catch(a){throw console.error("Error in getOrg:",a),e(((o=(r=a.response)==null?void 0:r.data)==null?void 0:o.message)||$.global.t("toast.error.fetch_failed",{entity:"Organization"})),a}},async activateOrg(t){var r,o;try{const a=await n.post(`/item/${t}/activate`);if(a.data.error)throw e($.global.t("toast.error.activate_failed",{entity:"Organization"})),new Error(a.data.error)}catch(a){throw console.error("Error in activateOrg:",a),e(((o=(r=a.response)==null?void 0:r.data)==null?void 0:o.message)||$.global.t("toast.error.activate_failed",{entity:"Organization"})),a}},async deactivateOrg(t){var r,o;try{const a=await n.post(`/item/${t}/deactivate`);if(a.data.error)throw e($.global.t("toast.error.deactivate_failed",{entity:"Organization"})),new Error(a.data.error)}catch(a){throw console.error("Error in deactivateOrg:",a),e(((o=(r=a.response)==null?void 0:r.data)==null?void 0:o.message)||$.global.t("toast.error.deactivate_failed",{entity:"Organization"})),a}}}}const xo=P$();function M$(){const n=xa("https://api.jplan.com.br/management/branch/"),{error:e}=sr();return{async getBranchList(t){try{const r=t?`?filter_query=${t}`:"",o=await n.get(`/list/${r}`);if(o.data.error){e($.global.t("toast.error.fetch_failed",{entity:"Branch"}));return}return o.data.data}catch(r){console.error("Error in getBranchList:",r),e($.global.t("toast.error.fetch_failed",{entity:"Branch"}))}},async createBranch(t){var r,o;try{const a=await n.post("/item",t);return a.status>=200&&a.status<300?a:void 0}catch(a){console.error("Error in createBranch:",a),e(((o=(r=a.response)==null?void 0:r.data)==null?void 0:o.message)||$.global.t("toast.error.create_failed",{entity:"Branch"}))}},async updateBranch(t){var r,o;try{const a=await n.patch("/item",t);if(a.data.error){e(a.data.error||$.global.t("toast.error.update_failed",{entity:"Branch"}));return}return a}catch(a){console.error("Error in updateBranch:",a),e(((o=(r=a.response)==null?void 0:r.data)==null?void 0:o.message)||$.global.t("toast.error.update_failed",{entity:"Branch"}))}},async getBranch(t){var r,o;try{const a=await n.get(`/item/${t}`);if(a.data.error){e(a.data.error||$.global.t("toast.error.fetch_failed",{entity:"Branch"}));return}return a.data}catch(a){console.error("Error in getBranch:",a),e(((o=(r=a.response)==null?void 0:r.data)==null?void 0:o.message)||$.global.t("toast.error.fetch_failed",{entity:"Branch"}))}},async activateBranch(t){var r,o;try{const a=await n.post(`/item/${t}/activate`);if(a.data.error){e(a.data.error||$.global.t("toast.error.activate_failed",{entity:"Branch"}));return}}catch(a){console.error("Error in activateBranch:",a),e(((o=(r=a.response)==null?void 0:r.data)==null?void 0:o.message)||$.global.t("toast.error.activate_failed",{entity:"Branch"}))}},async deactivateBranch(t){var r,o;try{const a=await n.post(`/item/${t}/deactivate`);if(a.data.error){e(a.data.error||$.global.t("toast.error.deactivate_failed",{entity:"Branch"}));return}}catch(a){console.error("Error in deactivateBranch:",a),e(((o=(r=a.response)==null?void 0:r.data)==null?void 0:o.message)||$.global.t("toast.error.deactivate_failed",{entity:"Branch"}))}}}}const Uo=M$();function D$(){const n=xa("https://api.jplan.com.br/management/team"),{error:e}=sr();return{async getTeamList(t){try{const r=t?`?filter_query=${t}`:"",o=await n.get(`/list/${r}`);if(o.data.error)throw e($.global.t("toast.error.fetch_failed",{entity:"Team"})),new Error(o.data.error);return o.data.data}catch(r){console.error("Error in getTeamList:",r),e($.global.t("toast.error.fetch_failed",{entity:"Team"}));return}},async createTeam(t){var r,o;try{const a=await n.post("/item",t);if(a.data.error)throw e($.global.t("toast.error.create_failed",{entity:"Team"})),new Error(a.data.error);return a}catch(a){throw console.error("Error in createTeam:",a),e(((o=(r=a.response)==null?void 0:r.data)==null?void 0:o.message)||$.global.t("toast.error.create_failed",{entity:"Team"})),a}},async updateTeam(t){var r,o;try{const a=await n.patch("/item",t);return a.status>=200&&a.status<300?a:void 0}catch(a){throw console.error("Error in updateTeam:",a),e(((o=(r=a.response)==null?void 0:r.data)==null?void 0:o.message)||$.global.t("toast.error.update_failed",{entity:"Team"})),a}},async getTeam(t){var r,o;try{const a=await n.get(`/item/${t}`);return a.data.error&&e($.global.t("toast.error.fetch_failed",{entity:"Team"})),a.data}catch(a){console.error("Error in getTeam:",a),e(((o=(r=a.response)==null?void 0:r.data)==null?void 0:o.message)||$.global.t("toast.error.fetch_failed",{entity:"Team"}));return}},async activateTeam(t){var r,o;try{const a=await n.post(`/item/${t}/activate`);if(a.data.error)throw e($.global.t("toast.error.activate_failed",{entity:"Team"})),new Error(a.data.error)}catch(a){throw console.error("Error in activateTeam:",a),e(((o=(r=a.response)==null?void 0:r.data)==null?void 0:o.message)||$.global.t("toast.error.activate_failed",{entity:"Team"})),a}},async deactivateTeam(t){var r,o;try{const a=await n.post(`/item/${t}/deactivate`);if(a.data.error)throw e($.global.t("toast.error.deactivate_failed",{entity:"Team"})),new Error(a.data.error)}catch(a){throw console.error("Error in deactivateTeam:",a),e(((o=(r=a.response)==null?void 0:r.data)==null?void 0:o.message)||$.global.t("toast.error.deactivate_failed",{entity:"Team"})),a}},async getTeamUserList(t,r){try{const o=r?`?filter_query=${r}`:"",a=await n.get(`/item/${t}/user/list/${o}`);if(a.data.error)throw e($.global.t("toast.error.fetch_failed",{entity:"User"})),new Error(a.data.error);return a.data.data}catch(o){console.error("Error in getTeamUserList:",o),e($.global.t("toast.error.fetch_failed",{entity:"User"}));return}},async linkManageUser(t,r){try{const o=await n.post(`/item/${t}/user/item/`,r);if(o.data.error)throw e($.global.t("toast.error.link_failed",{entity:"User"})),new Error(o.data.error);return o.data}catch(o){console.error("Error in link User:",o),e($.global.t("toast.error.link_failed",{entity:"User"}));return}},async updateManageUser(t,r){try{const o=await n.patch(`/item/${t}/user/item/`,r);if(o.data.error)throw e($.global.t("toast.error.update_failed",{entity:"User"})),new Error(o.data.error);return o.data.data}catch(o){throw console.error("Error in update User:",o),e($.global.t("toast.error.update_failed",{entity:"User"})),o}},async getManageUser(t,r,o){try{const a=o?`?filter_query=${o}`:"",l=await n.get(`/item/${t}/user/item/${r}/${a}`);if(l.data.error)throw e($.global.t("toast.error.fetch_failed",{entity:"User"})),new Error(l.data.error);return l.data.data}catch(a){console.error("Error in getUser:",a),e($.global.t("toast.error.fetch_failed",{entity:"User"}));return}},async unlinkManageUser(t,r,o){try{const a=o?`?filter_query=${o}`:"";await n.delete(`/item/${t}/user/item/${r}/${a}`)}catch(a){throw console.error("Error in unlink User:",a),e($.global.t("toast.error.unlink_failed",{entity:"User"})),a}}}}const Mn=D$();let tl=!1;const mh=c.ref(!1),Yn=c.ref([]),Iy=c.ref([]),ht=c.ref(null),Xi=c.ref([]),Zi=c.ref([]),HT=()=>{const n=sr(),e=async C=>{mh.value=!0;const T=C?`_active eq true and ${C}`:"_active eq true",k=await xo.getOrgList(T);k&&(Yn.value=k,tl=!0),mh.value=!1},t=async C=>{var T;return(T=Yn.value)!=null&&T.length||await e(C),Yn.value};function r(C){if(!Yn.value)throw new Error("Data not stored yet");const T=Ma(Yn.value,C,["name","description"]);return C!==""?T:Yn.value}const o=C=>{Iy.value=C},a=C=>{ht.value=Pa.cloneDeep(C)},l=async C=>await xo.getOrg(C),d=async()=>{if(ht.value!=null){const C=await xo.createOrg(ht.value);return C!=null&&C.data.created_at&&(n.success($.global.t("toast.success.create_success",{entity:"Organization"})),tl&&Yn.value.push(C.data)),C==null?void 0:C.data}},h=async()=>{if(ve.value=!0,ht.value&&ht.value.__id){const C=await xo.updateOrg(ht.value);if(tl&&(C!=null&&C.data.__id)){const T=Yn.value.findIndex(k=>k.__id===C.data.__id);return T!==-1?(Yn.value[T]=C.data,n.success($.global.t("toast.success.update_success",{entity:"Organization"}))):n.error($.global.t("toast.error.update_failed",{entity:"Organization"})),ve.value=!1,C.data}}else ve.value=!1,n.error($.global.t("toast.error.update_failed",{entity:"Organization"}))},f=async()=>{if(ve.value=!0,ht.value&&ht.value.created_at){if(await xo.deactivateOrg(ht.value.__id),tl){const C=Yn.value.findIndex(T=>{var k;return T.__id===((k=ht.value)==null?void 0:k.__id)});if(C!==-1)return Yn.value.splice(C,1),ht.value;n.error($.global.t("toast.error.deactivate_failed",{entity:"Organization"}))}ve.value=!1}};async function g(C){ve.value=!0;try{if(ht.value&&ht.value.__id){const T={...C,organization:ht.value.__id};if(!await Uo.updateBranch(T)){ve.value=!1;return}if(Xi.value.findIndex(N=>N.__id===C.__id)===-1)return n.success($.global.t("toast.success.link_success",{entity:"Branch"})),Xi.value.push(T),T;n.info($.global.t("toast.info.already_linked",{entity:"Branch"}))}}catch(T){console.error(T)}finally{ve.value=!1}}async function _(C){if(ve.value=!0,ht.value&&ht.value.__id){const T={...C,organization:null};if(!await Uo.updateBranch(T)){ve.value=!1;return}const I=Xi.value.findIndex(N=>N.__id===C.__id);if(I!==-1)return Xi.value.splice(I,1),ve.value=!1,Xi.value;throw new Error("Item not found to remove")}ve.value=!1}async function p(C){ve.value=!0;try{if(ht.value&&ht.value.__id){const T={...C,organization:ht.value.__id};if(!await Mn.updateTeam(T)){ve.value=!1;return}if(Zi.value.findIndex(N=>N.__id===C.__id)===-1)return n.success($.global.t("toast.success.link_success",{entity:"Team"})),Zi.value.push(T),T;n.info($.global.t("toast.info.already_linked",{entity:"Team"}))}}catch(T){console.error(T)}finally{ve.value=!1}}async function w(C){if(ve.value=!0,ht.value&&ht.value.__id){const T={...C,organization:null};if(!await Mn.updateTeam(T)){ve.value=!1;return}const I=Zi.value.findIndex(N=>N.__id===C.__id);if(I!==-1)return Zi.value.splice(I,1),ve.value=!1,Zi.value;throw new Error("Item not found to remove")}ve.value=!1}return{data:Yn,loading:mh,columns:Iy,item:ht,filterData:r,__init__:e,getData:t,setColumns:o,setItem:a,getItem:l,createItem:d,updateItem:h,removeItem:f,orgBranches:Xi,orgTeams:Zi,linkBranch:g,unlinkBranch:_,linkTeam:p,unlinkTeam:w}};let nl=!1;const Jn=c.ref([]),Sy=c.ref([]),Nt=c.ref(null),gh=c.ref(!1),ea=c.ref([]),$T=()=>{const n=sr(),e=async p=>{gh.value=!0;const w=p?`_active eq true and ${p}`:"_active eq true",C=await Mn.getTeamList(w);C&&(Jn.value=C,nl=!0),gh.value=!1},t=async p=>(Jn.value.length||await e(p),Jn.value);function r(p){if(!Jn.value)throw new Error("Data not stored yet");const w=Ma(Jn.value,p,["name","description"]);return p!==""?w:Jn.value}const o=p=>{Sy.value=p},a=p=>{Nt.value=Pa.cloneDeep(p)},l=async p=>await Mn.getTeam(p),d=async()=>{if(Nt.value!=null){const p=await Mn.createTeam(Nt.value);return p!=null&&p.data.created_at&&(n.success($.global.t("toast.success.create_success",{entity:"Team"})),nl&&Jn.value.push(p.data)),p==null?void 0:p.data}},h=async()=>{if(ve.value=!0,Nt.value&&Nt.value.__id){const p=await Mn.updateTeam(Nt.value);if(nl&&(p!=null&&p.data.__id)){const w=Jn.value.findIndex(C=>C.__id===p.data.__id);return w!==-1?(Jn.value[w]=p.data,n.success($.global.t("toast.success.update_success",{entity:"Team"}))):n.error($.global.t("toast.error.update_failed",{entity:"Team"})),p.data}}else n.error($.global.t("toast.error.update_failed",{entity:"Team"}))},f=async()=>{if(Nt.value&&Nt.value.created_at&&(await Mn.deactivateTeam(Nt.value.__id),nl)){const p=Jn.value.findIndex(w=>{var C;return w.__id===((C=Nt.value)==null?void 0:C.__id)});if(p!==-1)return Jn.value.splice(p,1),Nt.value;n.error($.global.t("toast.error.deactivate_failed",{entity:"Team"}))}};async function g(p){var w;if(ve.value=!0,(w=Nt.value)!=null&&w.__id)if(ea.value.findIndex(T=>T.__id===p.__id)===-1)try{const T=await Mn.linkManageUser(Nt.value.__id,{team:Nt.value.__id,user:p.__id,role:"string",joined_at:"string",comments:"string"}),k=await Mn.getTeamUserList(Nt.value.__id);return k&&(ea.value=k),n.success($.global.t("toast.success.link_success",{entity:"User"})),T}catch(T){console.error(T),n.error($.global.t("toast.error.link_failed",{entity:"User"}))}finally{ve.value=!1}else n.info($.global.t("toast.info.already_linked",{entity:"User"}));else console.warn("No item selected or item ID is missing."),n.info($.global.t("toast.info.select_valid_item"));ve.value=!1}async function _(p){if(ve.value=!0,Nt.value&&Nt.value.__id){const w=ea.value.findIndex(C=>C.__id===p);if(w!==-1)return await Mn.unlinkManageUser(Nt.value.__id,p),ea.value.splice(w,1),ve.value=!1,ea.value;throw new Error("Item not found to remove")}ve.value=!1}return{data:Jn,loading:gh,columns:Sy,item:Nt,usersTeam:ea,__init__:e,getData:t,filterData:r,setColumns:o,setItem:a,getItem:l,createItem:d,updateItem:h,removeItem:f,linkUser:g,unlinkUser:_}},KT=c.defineComponent({__name:"GlobalScopeFilter",setup(n){var T,k,I;const{openDialog:e}=Us("global-scope__J-"),{user:t,scope:r,session:o,setScope:a}=Cu(),{getData:l,data:d}=HT(),{getData:h,data:f}=$T(),g=c.ref(!1);c.onBeforeMount(async()=>{g.value=!0,await l(),await h(),g.value=!1});const _=c.ref({scope_type:(T=r.value)==null?void 0:T.scope_type,organization:((k=r.value)==null?void 0:k.organization)??"org",team:(I=r.value)==null?void 0:I.team});function p(){var N,D,L;_.value={...r.value,scope_type:(N=r.value)==null?void 0:N.scope_type,organization:((D=r.value)==null?void 0:D.organization)??"",team:(L=r.value)==null?void 0:L.team},e()}const w=c.computed(()=>{var N;switch((N=r.value)==null?void 0:N.scope_type){case"user":return YV;case"org":return qV;case"team":return JV;default:return jV}});async function C(){var N;((N=r.value)==null?void 0:N.scope_type)!==""&&a(_.value)}return(N,D)=>(c.openBlock(),c.createElementBlock(c.Fragment,null,[c.createVNode(Ge.VBtn,{onClick:p,icon:"",class:"text-secondary",color:"surface",rounded:"sm",size:"small",variant:"flat"},{default:c.withCtx(()=>[(c.openBlock(),c.createBlock(c.resolveDynamicComponent(w.value),{size:"20"}))]),_:1}),c.createVNode(c.unref(Vs),{loading:g.value,title:c.unref($).global.t("dialogs.scope.title"),"dd-id":"global-scope__J-",onOnSave:C},{default:c.withCtx(()=>[c.createElementVNode("div",null,[c.createVNode(qe.VRow,null,{default:c.withCtx(()=>[c.createVNode(qe.VCol,{cols:"4",class:"d-flex flex-row align-center"},{default:c.withCtx(()=>[c.createVNode(Qt.VListItem,null,{default:c.withCtx(()=>[c.createVNode(Qt.VListItemTitle,null,{default:c.withCtx(()=>[c.createTextVNode(c.toDisplayString(c.unref($).global.t("dialogs.scope.user")),1)]),_:1}),c.createVNode(Qt.VListItemSubtitle,null,{default:c.withCtx(()=>{var L;return[c.createTextVNode(c.toDisplayString(((L=c.unref(t))==null?void 0:L.name)||c.unref($).global.t("dialogs.scope.unknownUser")),1)]}),_:1})]),_:1})]),_:1}),c.createVNode(qe.VCol,{cols:"4"},{default:c.withCtx(()=>[c.createVNode(Qt.VListItem,null,{default:c.withCtx(()=>[c.createVNode(Qt.VListItemTitle,null,{default:c.withCtx(()=>[c.createTextVNode(c.toDisplayString(c.unref($).global.t("dialogs.scope.environment")),1)]),_:1}),c.createVNode(Qt.VListItemSubtitle,null,{default:c.withCtx(()=>[c.createTextVNode(c.toDisplayString(c.unref(o).domain),1)]),_:1})]),_:1})]),_:1}),c.createVNode(qe.VCol,{cols:"4"},{default:c.withCtx(()=>[c.createVNode(Qt.VListItem,null,{default:c.withCtx(()=>[c.createVNode(Qt.VListItemTitle,null,{default:c.withCtx(()=>[c.createTextVNode(c.toDisplayString(c.unref($).global.t("dialogs.scope.environment")),1)]),_:1}),c.createVNode(Qt.VListItemSubtitle,null,{default:c.withCtx(()=>[c.createTextVNode(c.toDisplayString(c.unref(o).environment),1)]),_:1})]),_:1})]),_:1})]),_:1}),c.createVNode(OO.VBtnToggle,{density:"compact",variant:"outlined",modelValue:_.value.scope_type,"onUpdate:modelValue":D[0]||(D[0]=L=>_.value.scope_type=L),class:"d-flex justify-center my-4"},{default:c.withCtx(()=>[c.createVNode(Ge.VBtn,{value:"org",label:c.unref($).global.t("dialogs.scope.organizational"),color:"secondary"},{default:c.withCtx(()=>[c.createTextVNode(c.toDisplayString(c.unref($).global.t("dialogs.scope.organizational")),1)]),_:1},8,["label"]),c.createVNode(Ge.VBtn,{value:"team",label:c.unref($).global.t("dialogs.scope.team"),color:"secondary"},{default:c.withCtx(()=>[c.createTextVNode(c.toDisplayString(c.unref($).global.t("dialogs.scope.team")),1)]),_:1},8,["label"]),c.createVNode(Ge.VBtn,{value:"user",label:c.unref($).global.t("dialogs.scope.user"),color:"secondary"},{default:c.withCtx(()=>[c.createTextVNode(c.toDisplayString(c.unref($).global.t("dialogs.scope.user")),1)]),_:1},8,["label"]),c.createVNode(Ge.VBtn,{value:"",label:c.unref($).global.t("dialogs.scope.none"),color:"lightext"},{default:c.withCtx(()=>[c.createTextVNode(c.toDisplayString(c.unref($).global.t("dialogs.scope.none")),1)]),_:1},8,["label"])]),_:1},8,["modelValue"]),c.createElementVNode("div",null,[c.createVNode(Ca.VLabel,{class:"text-subtitle-1 text-high-emphasis mb-2"},{default:c.withCtx(()=>[c.createTextVNode(c.toDisplayString(c.unref($).global.t("dialogs.scope.organization")),1)]),_:1}),c.createVNode(fs.VSelect,{items:c.unref(d),"item-title":"name","item-value":"__id",variant:"solo","bg-color":"containerBg",rounded:"false",placeholder:c.unref($).global.t("dialogs.scope.selectOrganization"),class:"min-w-50",modelValue:_.value.organization,"onUpdate:modelValue":D[1]||(D[1]=L=>_.value.organization=L),clearable:""},null,8,["items","placeholder","modelValue"]),c.createVNode(Ca.VLabel,{class:"text-subtitle-1 text-high-emphasis mb-2"},{default:c.withCtx(()=>[c.createTextVNode(c.toDisplayString(c.unref($).global.t("dialogs.scope.team")),1)]),_:1}),c.createVNode(fs.VSelect,{items:c.unref(f),"item-title":"name","item-value":"__id",variant:"solo","bg-color":"containerBg",rounded:"false",placeholder:c.unref($).global.t("dialogs.scope.selectTeam"),class:"min-w-50",modelValue:_.value.team,"onUpdate:modelValue":D[2]||(D[2]=L=>_.value.team=L),clearable:""},null,8,["items","placeholder","modelValue"])])])]),_:1},8,["loading","title"])],64))}}),L$={},x$={class:"double-ring-spinner-container"};function U$(n,e){return c.openBlock(),c.createElementBlock("div",x$,e[0]||(e[0]=[c.createElementVNode("div",{class:"spinner-loading"},[c.createElementVNode("div"),c.createElementVNode("div"),c.createElementVNode("div",null,[c.createElementVNode("div")]),c.createElementVNode("div",null,[c.createElementVNode("div")])],-1)]))}const WT=Si(L$,[["render",U$],["__scopeId","data-v-00d7a69f"]]),B$={key:0,class:"_jspinner-overlay_jj"},zT=c.defineComponent({__name:"GlobalSpinner",setup(n){return(e,t)=>c.unref(ve)?(c.openBlock(),c.createElementBlock("div",B$,t[0]||(t[0]=[c.createElementVNode("div",{class:"j-double-ring-spinner-container"},[c.createElementVNode("div",{class:"j-global-spinner-loading"},[c.createElementVNode("div"),c.createElementVNode("div"),c.createElementVNode("div",null,[c.createElementVNode("div")]),c.createElementVNode("div",null,[c.createElementVNode("div")])])],-1)]))):c.createCommentVNode("",!0)}}),GT=c.defineComponent({__name:"SubMenu",props:{title:{}},setup(n,{expose:e}){return e({props:n}),(r,o)=>(c.openBlock(),c.createBlock(Qt.VListItem,{onClick:o[0]||(o[0]=()=>{}),density:"compact"},{append:c.withCtx(()=>[c.createVNode(c.unref(QV))]),default:c.withCtx(()=>[c.createVNode(Qt.VListItemTitle,null,{default:c.withCtx(()=>[c.createTextVNode(c.toDisplayString(r.title),1)]),_:1}),c.createVNode(_f.VMenu,{activator:"parent","open-on-hover":"",submenu:"",density:"compact"},{default:c.withCtx(()=>[c.renderSlot(r.$slots,"default")]),_:3})]),_:3}))}}),V$=Object.freeze(Object.defineProperty({__proto__:null,AvatarPicture:YC,ColumnSettingsDialog:Vf,ConfirmDialog:qC,ContextMenu:JC,CopyButton:xs,DeleteAllBtn:Df,DotsMenu:GC,EditButton:zC,FormHeadless:QE,FormMetadata:au,GlobalScopeFilter:KT,GlobalSpinner:zT,JAutocomplete:WE,JAvatar:jC,JBtn:My,JDialog:Vs,JForm:jE,JIconBtn:Py,JSelect:KE,JTextArea:zE,JTextField:vE,ParentCard:Yl,SearchFilter:Xl,SpinnerLoader:WT,SubMenu:GT,TabFormHeader:YE,TabFormHeaderV2:JE,TableAdvanced:nE,TableCard:Ff,TableCardsView:_E,TableHeader:rE,UiTable:QC},Symbol.toStringTag,{value:"Module"})),F$=a0(),H$={transition:"Vue-Toastification__fade",maxToasts:20,newestOnTop:!0};let ph=!1;const _h=c.ref(!1),Qn=c.ref([]),Ay=c.ref([]),$t=c.ref(null),ta=c.ref([]),$$=()=>{const n=sr(),e=async p=>{_h.value=!0;const w=p?`_active eq true and ${p}`:"_active eq true",C=await Uo.getBranchList(w);C&&(Qn.value=C,ph=!0),_h.value=!1},t=async p=>(Qn.value.length||await e(p),Qn.value);function r(p){if(!Qn.value)throw new Error("Data not stored yet");const w=Ma(Qn.value,p,["name","description"]);return p!==""?w:Qn.value}const o=p=>{Ay.value=p},a=p=>{$t.value=Pa.cloneDeep(p)},l=async p=>await Uo.getBranch(p),d=async()=>{if($t.value!=null){const p=await Uo.createBranch($t.value);return p!=null&&p.data.created_at&&(n.success($.global.t("toast.success.create_success",{entity:"Branch"})),ph&&Qn.value.push(p.data)),p==null?void 0:p.data}},h=async()=>{if($t.value&&$t.value.__id){const p=await Uo.updateBranch($t.value);if(ph&&p){const w=Qn.value.findIndex(C=>C.__id===p.data.__id);return w!==-1?(Qn.value[w]=p.data,n.success($.global.t("toast.success.update_success",{entity:"Branch"}))):n.error($.global.t("toast.error.update_failed",{entity:"Branch"})),p}}else n.error($.global.t("toast.error.update_failed",{entity:"Branch"}))},f=async()=>{if($t.value&&$t.value.created_at){await Uo.deactivateBranch($t.value.__id);const p=Qn.value.findIndex(w=>{var C;return w.__id===((C=$t.value)==null?void 0:C.__id)});if(p!==-1)return Qn.value.splice(p,1),$t.value;n.error($.global.t("toast.error.deactivate_failed",{entity:"Branch"}))}};async function g(p){ve.value=!0;try{if($t.value&&$t.value.__id){const w={...p,branch:$t.value.__id};if(!await Mn.updateTeam(w)){n.error($.global.t("toast.error.link_failed",{entity:"Team"}));return}if(ta.value.findIndex(k=>k.__id===p.__id)===-1)return n.success($.global.t("toast.success.link_success",{entity:"Team"})),ta.value.push(w),w;n.info($.global.t("toast.info.already_linked",{entity:"Team"}))}else throw new Error("Item is not defined")}catch(w){console.error(w)}finally{ve.value=!1}}async function _(p){if(ve.value=!0,$t.value&&$t.value.__id){const w={...p,branch:null};if(!await Mn.updateTeam(w))return;const T=ta.value.findIndex(k=>k.__id===p.__id);if(T!==-1)return ta.value.splice(T,1),ve.value=!1,ta.value;throw new Error("Item not found to remove")}ve.value=!1}return{data:Qn,columns:Ay,item:$t,loading:_h,__init__:e,getData:t,filterData:r,setColumns:o,setItem:a,getItem:l,createItem:d,updateItem:h,removeItem:f,branchTeams:ta,linkTeam:g,unlinkTeam:_}};function K$(){const n=xa("https://api.jplan.com.br/management/division"),{error:e}=sr();return{async getDivisionList(t){try{const r=t?`?filter_query=${t}`:"",o=await n.get(`/list/${r}`);if(o.data.error)throw e($.global.t("toast.error.fetch_failed",{entity:"Division"})),new Error(o.data.error);return o.data.data}catch(r){console.error("Error in getDivisionList:",r),e($.global.t("toast.error.fetch_failed",{entity:"Division"}));return}},async createDivision(t){var r,o;try{const a=await n.post("/item",t);return a.status>=200&&a.status<300?a:void 0}catch(a){throw console.error("Error in createDivision:",a),e(((o=(r=a.response)==null?void 0:r.data)==null?void 0:o.message)||$.global.t("toast.error.create_failed",{entity:"Division"})),a}},async updateDivision(t){var r,o;try{const a=await n.patch("/item",t);if(a.data.error)throw e($.global.t("toast.error.update_failed",{entity:"Division"})),new Error(a.data.error);return a}catch(a){throw console.error("Error in updateDivision:",a),e(((o=(r=a.response)==null?void 0:r.data)==null?void 0:o.message)||$.global.t("toast.error.update_failed",{entity:"Division"})),a}},async getDivision(t){var r,o;try{const a=await n.get(`/item/${t}`);if(a.data.error)throw e($.global.t("toast.error.fetch_failed",{entity:"Division"})),new Error(a.data.error);return a.data}catch(a){throw console.error("Error in getDivision:",a),e(((o=(r=a.response)==null?void 0:r.data)==null?void 0:o.message)||$.global.t("toast.error.fetch_failed",{entity:"Division"})),a}},async activateDivision(t){var r,o;try{const a=await n.post(`/item/${t}/activate`);if(a.data.error)throw e($.global.t("toast.error.activate_failed",{entity:"Division"})),new Error(a.data.error)}catch(a){throw console.error("Error in activateDivision:",a),e(((o=(r=a.response)==null?void 0:r.data)==null?void 0:o.message)||$.global.t("toast.error.activate_failed",{entity:"Division"})),a}},async deactivateDivision(t){var r,o;try{const a=await n.post(`/item/${t}/deactivate`);if(a.data.error)throw e($.global.t("toast.error.deactivate_failed",{entity:"Division"})),new Error(a.data.error)}catch(a){throw console.error("Error in deactivateDivision:",a),e(((o=(r=a.response)==null?void 0:r.data)==null?void 0:o.message)||$.global.t("toast.error.deactivate_failed",{entity:"Division"})),a}}}}const la=K$();let vh=!1;const yh=c.ref(!1),Xn=c.ref([]),ky=c.ref([]),Kt=c.ref(null),na=c.ref([]),W$=()=>{const n=sr(),e=async p=>{yh.value=!0;const w=p?`_active eq true and ${p}`:"_active eq true",C=await la.getDivisionList(w);C&&(Xn.value=C,vh=!0),yh.value=!1},t=async p=>(Xn.value.length||await e(p),Xn.value);function r(p){if(!Xn.value)throw new Error("Data not stored yet");const w=Ma(Xn.value,p,["name","description"]);return p!==""?w:Xn.value}const o=p=>{ky.value=p},a=p=>{Kt.value=Pa.cloneDeep(p)},l=async p=>await la.getDivision(p),d=async()=>{if(Kt.value!=null){const p=await la.createDivision(Kt.value);return p!=null&&p.data.created_at&&(n.success($.global.t("toast.success.create_success",{entity:"Division"})),vh&&Xn.value.push(p.data)),p==null?void 0:p.data}},h=async()=>{if(ve.value=!0,Kt.value&&Kt.value.__id){const p=await la.updateDivision(Kt.value);if(vh&&(p!=null&&p.data.__id)){const w=Xn.value.findIndex(C=>C.__id===p.data.__id);return w!==-1?(Xn.value[w]=p.data,n.success($.global.t("toast.success.update_success",{entity:"Division"}))):n.error($.global.t("toast.error.update_failed",{entity:"Division"})),ve.value=!1,p}}else ve.value=!1,n.error($.global.t("toast.error.update_failed",{entity:"Division"}))},f=async()=>{if(ve.value=!0,Kt.value&&Kt.value.created_at){await la.deactivateDivision(Kt.value.__id);const p=Xn.value.findIndex(w=>{var C;return w.__id===((C=Kt.value)==null?void 0:C.__id)});if(p!==-1)return Xn.value.splice(p,1),Kt.value;n.error($.global.t("toast.error.deactivate_failed",{entity:"Division"}))}ve.value=!1};async function g(p){ve.value=!0;try{if(Kt.value&&Kt.value.__id){const w={...p,division:Kt.value.__id};return await xo.updateOrg(w)?(na.value.findIndex(k=>k.__id===p.__id)===-1?(n.success($.global.t("toast.success.link_success",{entity:"Organization"})),na.value.push(w)):n.info($.global.t("toast.info.already_linked",{entity:"Organization"})),w):void 0}else throw new Error("Item is not defined")}catch(w){console.error(w)}finally{ve.value=!1}}async function _(p){if(ve.value=!0,Kt.value&&Kt.value.__id){const w={...p,division:null};if(!await xo.updateOrg(w))return;const T=na.value.findIndex(k=>k.__id===p.__id);if(T!==-1)na.value.splice(T,1);else throw new Error("Item not found to remove")}else throw new Error("Item is not defined");return ve.value=!1,na.value}return{data:Xn,columns:ky,item:Kt,loading:yh,__init__:e,filterData:r,getData:t,setColumns:o,setItem:a,getItem:l,createItem:d,updateItem:h,removeItem:f,orgs:na,linkDivision:g,unlinkDivision:_}};function z$(){const n=xa("https://api.jplan.com.br/management/user"),{error:e}=sr();return{async getManageUserList(t){try{const r=t?`?filter_query=${t}`:"",o=await n.get(`/list/${r}`);if(o.data.error)throw e($.global.t("toast.error.fetch_failed",{entity:"User"})),new Error(o.data.error);return o.data.data}catch(r){console.error("Error in getManageUserList:",r),e($.global.t("toast.error.fetch_failed",{entity:"User"}));return}},async createManageUser(t){var r,o;try{const a=await n.post("/item",t);return a.status>=200&&a.status<300?a:void 0}catch(a){throw console.error("Error in createManageUser:",a),e(((o=(r=a.response)==null?void 0:r.data)==null?void 0:o.message)||$.global.t("toast.error.create_failed",{entity:"User"})),a}},async updateManageUser(t){var r,o;try{const a=await n.patch("/item",t);if(a.data.error)throw e($.global.t("toast.error.update_failed",{entity:"User"})),new Error(a.data.error);return a}catch(a){throw console.error("Error in updateManageUser:",a),e(((o=(r=a.response)==null?void 0:r.data)==null?void 0:o.message)||$.global.t("toast.error.update_failed",{entity:"User"})),a}},async getManageUser(t){var r,o;try{const a=await n.get(`/item/${t}`);if(a.data.error)throw e($.global.t("toast.error.fetch_failed",{entity:"User"})),new Error(a.data.error);return a.data}catch(a){console.error("Error in getManageUser:",a),e(((o=(r=a.response)==null?void 0:r.data)==null?void 0:o.message)||$.global.t("toast.error.fetch_failed",{entity:"User"}));return}},async activateManageUser(t){var r,o;try{const a=await n.post(`/item/${t}/activate`);if(a.data.error)throw e($.global.t("toast.error.activate_failed",{entity:"User"})),new Error(a.data.error)}catch(a){throw console.error("Error in activateManageUser:",a),e(((o=(r=a.response)==null?void 0:r.data)==null?void 0:o.message)||$.global.t("toast.error.activate_failed",{entity:"User"})),a}},async deactivateManageUser(t){var r,o;try{const a=await n.post(`/item/${t}/deactivate`);if(a.data.error)throw e($.global.t("toast.error.deactivate_failed",{entity:"User"})),new Error(a.data.error)}catch(a){throw console.error("Error in deactivateManageUser:",a),e(((o=(r=a.response)==null?void 0:r.data)==null?void 0:o.message)||$.global.t("toast.error.deactivate_failed",{entity:"User"})),a}}}}const ua=z$();let Ch=!1,Eh=c.ref(!1);const Zn=c.ref([]),Ny=c.ref([]),er=c.ref(null),G$=c.ref(null),q$=c.ref([]),j$=()=>{const n=sr(),e=async g=>{Eh.value=!0;const _=g?`_active eq true and ${g}`:"_active eq true",p=await ua.getManageUserList(_);p&&(Zn.value=p,Ch=!0),Eh.value=!1},t=async g=>(Zn.value.length||await e(g),Zn.value);function r(g){if(!Zn.value)throw new Error("Data not stored yet");const _=Ma(Zn.value,g,["name","description"]);return g!==""?_:Zn.value}return{data:Zn,loading:Eh,columns:Ny,item:er,filterData:r,__init__:e,getData:t,setColumns:g=>{Ny.value=g},setItem:g=>{er.value=Pa.cloneDeep(g)},getItem:async g=>await ua.getManageUser(g),createItem:async()=>{if(er.value!=null){const g=crypto.randomUUID(),_=await ua.createManageUser({...er.value,__id:g});return _!=null&&_.data.created_at&&(n.success($.global.t("toast.success.create_success",{entity:"User"})),Ch&&Zn.value.push(_.data)),_==null?void 0:_.data}},updateItem:async()=>{if(ve.value=!0,er.value&&er.value.created_at){const g=await ua.updateManageUser(er.value);if(Ch&&(g!=null&&g.data)){const _=Zn.value.findIndex(p=>p.__id===(g==null?void 0:g.data.__id));_!==-1?(Zn.value[_]=g==null?void 0:g.data,n.success($.global.t("toast.success.update_success",{entity:"User"}))):n.error($.global.t("toast.error.update_failed",{entity:"User"}))}return ve.value=!1,g==null?void 0:g.data}},removeItem:async()=>{if(er.value&&er.value.created_at){try{await ua.deactivateManageUser(er.value.__id)}catch{n.error($.global.t("toast.error.deactivate_failed",{entity:"User"}));return}const g=Zn.value.findIndex(_=>{var p;return _.__id===((p=er.value)==null?void 0:p.__id)});if(g!==-1)return Zn.value.splice(g,1),n.success($.global.t("toast.success.deactivate_success",{entity:"User"})),er.value}},userOrg:G$,userTeams:q$}},wh=Object.freeze({colNum:24,rowHeight:50,useCssTransforms:!0,responsive:!0,margin:[12,10]}),ra=c.ref(!1),Y$=c.ref([]);function J$(){const n=c.ref({...wh,isResizable:!1,isDraggable:!1,useStyleCursor:!1,cursor:"default"});function e(){if(ra.value=!ra.value,n.value.isDraggable=ra.value,n.value.isResizable=ra.value,!ra.value){n.value.useStyleCursor=!0,n.value.cursor="pointer";return}n.value.useStyleCursor=!1,n.value.cursor="move"}function t(){n.value={...wh,isResizable:!1,isDraggable:!1,useStyleCursor:!1,cursor:"default"}}return{DEFAULT_CONFIG:wh,config:n,layout:Y$,edition:ra,toggleEdit:e,resetLayout:t}}const Q$=c.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./WidgetTask-DG3M_p8v.js"))),X$=c.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./WidgetImage-CmXW7a_H.js"))),Z$=c.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./WidgetShortcut-RoBZjq7l.js"))),e4=c.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./WidgetSpacer-BnPDSwXZ.js"))),t4=c.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./WidgetLabel-CFgh4FZD.js"))),n4=c.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./WidgetChartBar-ChMg_dbz.js"))),r4=c.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./WidgetChartPie-C2AIgVQ2.js"))),o4={WidgetSpacer:e4,WidgetLabel:t4,WidgetTask:Q$,WidgetImage:X$,WidgetShortcut:Z$,WidgetChartBar:n4,WidgetChartPie:r4},i4={defaultI18n:!0},a4=(n,e)=>{const t={...i4,...e};n.use(F$),n.use(cP,H$),t.defaultI18n&&n.use($),Object.entries(V$).forEach(([r,o])=>{n.component(r,o)}),Object.entries(MO).forEach(([r,o])=>{n.provide(r,o)})},s4={install:a4};exports.ContextMenu=JC;exports.EmptyListImg=Uh;exports.EventBus=Kl;exports.FormHeadless=QE;exports.HttpCore=fV;exports.I18nMessages=Mm;exports.JTextField=vE;exports.SpinnerLoader=WT;exports.TableCardsView=_E;exports.TableHeader=rE;exports.__spinner=ve;exports._export_sfc=Si;exports._sfc_main=Vs;exports._sfc_main$1=QC;exports._sfc_main$10=My;exports._sfc_main$11=Df;exports._sfc_main$12=zC;exports._sfc_main$13=Py;exports._sfc_main$14=KE;exports._sfc_main$15=WE;exports._sfc_main$16=zE;exports._sfc_main$17=jE;exports._sfc_main$18=YE;exports._sfc_main$19=JE;exports._sfc_main$2=nE;exports._sfc_main$20=Yl;exports._sfc_main$21=jC;exports._sfc_main$22=YC;exports._sfc_main$23=GT;exports._sfc_main$24=KT;exports._sfc_main$25=zT;exports._sfc_main$3=Vf;exports._sfc_main$4=Ff;exports._sfc_main$5=Xl;exports._sfc_main$6=qC;exports._sfc_main$7=xs;exports._sfc_main$8=GC;exports._sfc_main$9=au;exports.branchInstance=Uo;exports.coreClient=Pm;exports.createToastInterface=Is;exports.dateFormat=ms;exports.divisionInstance=la;exports.filterQuery=Ma;exports.globalEventBus=Ef;exports.i18n=$;exports.index=s4;exports.manageUserInstance=ua;exports.msal=Gt;exports.orgInstance=xo;exports.provideToast=sP;exports.scopedClient=xa;exports.setupAuthGuard=k$;exports.teamInstance=Mn;exports.toastInjectionKey=Wl;exports.useAuth=Om;exports.useBranchStore=$$;exports.useCustomizer=d0;exports.useDashboardStore=J$;exports.useDialog=Us;exports.useDivisionStore=W$;exports.useManageUserStore=j$;exports.useNotifications=uC;exports.useOrganizationStore=HT;exports.useSession=Cu;exports.useTeamStore=$T;exports.useToast=sr;exports.widgets=o4;
|
113
|
+
${l}`);return}throw ry(e.error,e.error_description,e.suberror)?new Tr(e.error,e.error_description,e.suberror,e.timestamp||V.EMPTY_STRING,e.trace_id||V.EMPTY_STRING,e.correlation_id||V.EMPTY_STRING,e.claims||V.EMPTY_STRING,a):l}}async handleServerTokenResponse(e,t,r,o,a,l,d,h,f){var C;(C=this.performanceClient)==null||C.addQueueMeasurement(x.HandleServerTokenResponse,e.correlation_id);let g;if(e.id_token){if(g=ki(e.id_token||V.EMPTY_STRING,this.cryptoObj.base64Decode),a&&a.nonce&&g.nonce!==a.nonce)throw Y(sw);if(o.maxAge||o.maxAge===0){const T=g.auth_time;if(!T)throw Y(Yf);yw(T,o.maxAge)}}this.homeAccountIdentifier=Pt.generateHomeAccountId(e.client_info||V.EMPTY_STRING,t.authorityType,this.logger,this.cryptoObj,g);let _;a&&a.state&&(_=Er.parseRequestState(this.cryptoObj,a.state)),e.key_id=e.key_id||o.sshKid||void 0;const p=this.generateCacheRecord(e,t,r,o,g,l,a);let w;try{if(this.persistencePlugin&&this.serializableCache&&(this.logger.verbose("Persistence enabled, calling beforeCacheAccess"),w=new H2(this.serializableCache,!0),await this.persistencePlugin.beforeCacheAccess(w)),d&&!h&&p.account){const T=p.account.generateAccountKey();if(!this.cacheStorage.getAccount(T,this.logger))return this.logger.warning("Account used to refresh tokens not in persistence, refreshed tokens will not be stored in the cache"),await Si.generateAuthenticationResult(this.cryptoObj,t,p,!1,o,g,_,void 0,f)}await this.cacheStorage.saveCacheRecord(p,o.storeInCache,o.correlationId)}finally{this.persistencePlugin&&this.serializableCache&&w&&(this.logger.verbose("Persistence enabled, calling afterCacheAccess"),await this.persistencePlugin.afterCacheAccess(w))}return Si.generateAuthenticationResult(this.cryptoObj,t,p,!1,o,g,_,e,f)}generateCacheRecord(e,t,r,o,a,l,d){const h=t.getPreferredCache();if(!h)throw Y(Qf);const f=Lw(a);let g,_;e.id_token&&a&&(g=cu(this.homeAccountIdentifier,h,e.id_token,this.clientId,f||""),_=fm(this.cacheStorage,t,this.homeAccountIdentifier,this.cryptoObj.base64Decode,a,e.client_info,h,f,d,void 0,this.logger));let p=null;if(e.access_token){const T=e.scope?_t.fromString(e.scope):new _t(o.scopes||[]),k=(typeof e.expires_in=="string"?parseInt(e.expires_in,10):e.expires_in)||0,S=(typeof e.ext_expires_in=="string"?parseInt(e.ext_expires_in,10):e.ext_expires_in)||0,N=(typeof e.refresh_in=="string"?parseInt(e.refresh_in,10):e.refresh_in)||void 0,D=r+k,L=D+S,K=N&&N>0?r+N:void 0;p=lu(this.homeAccountIdentifier,h,e.access_token,this.clientId,f||t.tenant||"",T.printScopes(),D,L,this.cryptoObj.base64Decode,K,e.token_type,l,e.key_id,o.claims,o.requestedClaimsHash)}let w=null;if(e.refresh_token){let T;if(e.refresh_token_expires_in){const k=typeof e.refresh_token_expires_in=="string"?parseInt(e.refresh_token_expires_in,10):e.refresh_token_expires_in;T=r+k}w=Cw(this.homeAccountIdentifier,h,e.refresh_token,this.clientId,e.foci,l,T)}let C=null;return e.foci&&(C={clientId:this.clientId,environment:h,familyId:e.foci}),{account:_,idToken:g,accessToken:p,refreshToken:w,appMetadata:C}}static async generateAuthenticationResult(e,t,r,o,a,l,d,h,f){var D,L,K,q,M;let g=V.EMPTY_STRING,_=[],p=null,w,C,T=V.EMPTY_STRING;if(r.accessToken){if(r.accessToken.tokenType===je.POP&&!a.popKid){const ce=new Aa(e),{secret:ae,keyId:X}=r.accessToken;if(!X)throw Y(Xf);g=await ce.signPopToken(ae,X,a)}else g=r.accessToken.secret;_=_t.fromString(r.accessToken.target).asArray(),p=new Date(Number(r.accessToken.expiresOn)*1e3),w=new Date(Number(r.accessToken.extendedExpiresOn)*1e3),r.accessToken.refreshOn&&(C=new Date(Number(r.accessToken.refreshOn)*1e3))}r.appMetadata&&(T=r.appMetadata.familyId===Cs?Cs:"");const k=(l==null?void 0:l.oid)||(l==null?void 0:l.sub)||"",S=(l==null?void 0:l.tid)||"";h!=null&&h.spa_accountid&&r.account&&(r.account.nativeAccountId=h==null?void 0:h.spa_accountid);const N=r.account?sm(r.account.getAccountInfo(),void 0,l,(D=r.idToken)==null?void 0:D.secret):null;return{authority:t.canonicalAuthority,uniqueId:k,tenantId:S,scopes:_,account:N,idToken:((L=r==null?void 0:r.idToken)==null?void 0:L.secret)||"",idTokenClaims:l||{},accessToken:g,fromCache:o,expiresOn:p,extExpiresOn:w,refreshOn:C,correlationId:a.correlationId,requestId:f||V.EMPTY_STRING,familyId:T,tokenType:((K=r.accessToken)==null?void 0:K.tokenType)||V.EMPTY_STRING,state:d?d.userRequestState:V.EMPTY_STRING,cloudGraphHostName:((q=r.account)==null?void 0:q.cloudGraphHostName)||V.EMPTY_STRING,msGraphHost:((M=r.account)==null?void 0:M.msGraphHost)||V.EMPTY_STRING,code:h==null?void 0:h.spa_code,fromNativeBroker:!1}}}function fm(n,e,t,r,o,a,l,d,h,f,g){g==null||g.verbose("setCachedAccount called");const p=n.getAccountKeys().find(S=>S.startsWith(t));let w=null;p&&(w=n.getAccount(p,g));const C=w||Pt.createAccount({homeAccountId:t,idTokenClaims:o,clientInfo:a,environment:l,cloudGraphHostName:h==null?void 0:h.cloud_graph_host_name,msGraphHost:h==null?void 0:h.msgraph_host,nativeAccountId:f},e,r),T=C.tenantProfiles||[],k=d||C.realm;if(k&&!T.find(S=>S.tenantId===k)){const S=am(t,C.localAccountId,k,o);T.push(S)}return C.tenantProfiles=T,C}/*! @azure/msal-common v14.16.0 2024-11-05 */async function zw(n,e,t){return typeof n=="string"?n:n({clientId:e,tokenEndpoint:t})}/*! @azure/msal-common v14.16.0 2024-11-05 */class Gw extends dm{constructor(e,t){var r;super(e,t),this.includeRedirectUri=!0,this.oidcDefaultScopes=(r=this.config.authOptions.authority.options.OIDCOptions)==null?void 0:r.defaultScopes}async getAuthCodeUrl(e){var r;(r=this.performanceClient)==null||r.addQueueMeasurement(x.GetAuthCodeUrl,e.correlationId);const t=await Q(this.createAuthCodeUrlQueryString.bind(this),x.AuthClientCreateQueryString,this.logger,this.performanceClient,e.correlationId)(e);return De.appendQueryString(this.authority.authorizationEndpoint,t)}async acquireToken(e,t){var d,h;if((d=this.performanceClient)==null||d.addQueueMeasurement(x.AuthClientAcquireToken,e.correlationId),!e.code)throw Y(uw);const r=zr(),o=await Q(this.executeTokenRequest.bind(this),x.AuthClientExecuteTokenRequest,this.logger,this.performanceClient,e.correlationId)(this.authority,e),a=(h=o.headers)==null?void 0:h[dn.X_MS_REQUEST_ID],l=new Si(this.config.authOptions.clientId,this.cacheManager,this.cryptoUtils,this.logger,this.config.serializableCache,this.config.persistencePlugin,this.performanceClient);return l.validateTokenResponse(o.body),Q(l.handleServerTokenResponse.bind(l),x.HandleServerTokenResponse,this.logger,this.performanceClient,e.correlationId)(o.body,this.authority,r,e,t,void 0,void 0,void 0,a)}handleFragmentResponse(e,t){if(new Si(this.config.authOptions.clientId,this.cacheManager,this.cryptoUtils,this.logger,null,null).validateServerAuthorizationCodeResponse(e,t),!e.code)throw Y(gw);return e}getLogoutUri(e){if(!e)throw Ze(Aw);const t=this.createLogoutUrlQueryString(e);return De.appendQueryString(this.authority.endSessionEndpoint,t)}async executeTokenRequest(e,t){var f,g;(f=this.performanceClient)==null||f.addQueueMeasurement(x.AuthClientExecuteTokenRequest,t.correlationId);const r=this.createTokenQueryParameters(t),o=De.appendQueryString(e.tokenEndpoint,r),a=await Q(this.createTokenRequestBody.bind(this),x.AuthClientCreateTokenRequestBody,this.logger,this.performanceClient,t.correlationId)(t);let l;if(t.clientInfo)try{const _=Ml(t.clientInfo,this.cryptoUtils.base64Decode);l={credential:`${_.uid}${tn.CLIENT_INFO_SEPARATOR}${_.utid}`,type:Bn.HOME_ACCOUNT_ID}}catch(_){this.logger.verbose("Could not parse client info for CCS Header: "+_)}const d=this.createTokenRequestHeaders(l||t.ccsCredential),h={clientId:((g=t.tokenBodyParameters)==null?void 0:g.clientId)||this.config.authOptions.clientId,authority:e.canonicalAuthority,scopes:t.scopes,claims:t.claims,authenticationScheme:t.authenticationScheme,resourceRequestMethod:t.resourceRequestMethod,resourceRequestUri:t.resourceRequestUri,shrClaims:t.shrClaims,sshKid:t.sshKid};return Q(this.executePostToTokenEndpoint.bind(this),x.AuthorizationCodeClientExecutePostToTokenEndpoint,this.logger,this.performanceClient,t.correlationId)(o,a,d,h,t.correlationId,x.AuthorizationCodeClientExecutePostToTokenEndpoint)}async createTokenRequestBody(e){var o,a;(o=this.performanceClient)==null||o.addQueueMeasurement(x.AuthClientCreateTokenRequestBody,e.correlationId);const t=new ws(e.correlationId,this.performanceClient);if(t.addClientId(e.embeddedClientId||((a=e.tokenBodyParameters)==null?void 0:a[bi])||this.config.authOptions.clientId),this.includeRedirectUri?t.addRedirectUri(e.redirectUri):sa.validateRedirectUri(e.redirectUri),t.addScopes(e.scopes,!0,this.oidcDefaultScopes),t.addAuthorizationCode(e.code),t.addLibraryInfo(this.config.libraryInfo),t.addApplicationTelemetry(this.config.telemetry.application),t.addThrottling(),this.serverTelemetryManager&&!tf(this.config)&&t.addServerTelemetry(this.serverTelemetryManager),e.codeVerifier&&t.addCodeVerifier(e.codeVerifier),this.config.clientCredentials.clientSecret&&t.addClientSecret(this.config.clientCredentials.clientSecret),this.config.clientCredentials.clientAssertion){const l=this.config.clientCredentials.clientAssertion;t.addClientAssertion(await zw(l.assertion,this.config.authOptions.clientId,e.resourceRequestUri)),t.addClientAssertionType(l.assertionType)}if(t.addGrantType(ZE.AUTHORIZATION_CODE_GRANT),t.addClientInfo(),e.authenticationScheme===je.POP){const l=new Aa(this.cryptoUtils,this.performanceClient);let d;e.popKid?d=this.cryptoUtils.encodeKid(e.popKid):d=(await Q(l.generateCnf.bind(l),x.PopTokenGenerateCnf,this.logger,this.performanceClient,e.correlationId)(e,this.logger)).reqCnfString,t.addPopToken(d)}else if(e.authenticationScheme===je.SSH)if(e.sshJwk)t.addSshJwk(e.sshJwk);else throw Ze(uu);(!Cr.isEmptyObj(e.claims)||this.config.authOptions.clientCapabilities&&this.config.authOptions.clientCapabilities.length>0)&&t.addClaims(e.claims,this.config.authOptions.clientCapabilities);let r;if(e.clientInfo)try{const l=Ml(e.clientInfo,this.cryptoUtils.base64Decode);r={credential:`${l.uid}${tn.CLIENT_INFO_SEPARATOR}${l.utid}`,type:Bn.HOME_ACCOUNT_ID}}catch(l){this.logger.verbose("Could not parse client info for CCS Header: "+l)}else r=e.ccsCredential;if(this.config.systemOptions.preventCorsPreflight&&r)switch(r.type){case Bn.HOME_ACCOUNT_ID:try{const l=ga(r.credential);t.addCcsOid(l)}catch(l){this.logger.verbose("Could not parse home account ID for CCS Header: "+l)}break;case Bn.UPN:t.addCcsUpn(r.credential);break}return e.embeddedClientId&&t.addBrokerParameters({brokerClientId:this.config.authOptions.clientId,brokerRedirectUri:this.config.authOptions.redirectUri}),e.tokenBodyParameters&&t.addExtraQueryParameters(e.tokenBodyParameters),e.enableSpaAuthorizationCode&&(!e.tokenBodyParameters||!e.tokenBodyParameters[ey])&&t.addExtraQueryParameters({[ey]:"1"}),t.createQueryString()}async createAuthCodeUrlQueryString(e){var a,l;const t=e.correlationId||this.config.cryptoInterface.createNewGuid();(a=this.performanceClient)==null||a.addQueueMeasurement(x.AuthClientCreateQueryString,t);const r=new ws(t,this.performanceClient);r.addClientId(e.embeddedClientId||((l=e.extraQueryParameters)==null?void 0:l[bi])||this.config.authOptions.clientId);const o=[...e.scopes||[],...e.extraScopesToConsent||[]];if(r.addScopes(o,!0,this.oidcDefaultScopes),r.addRedirectUri(e.redirectUri),r.addCorrelationId(t),r.addResponseMode(e.responseMode),r.addResponseTypeCode(),r.addLibraryInfo(this.config.libraryInfo),tf(this.config)||r.addApplicationTelemetry(this.config.telemetry.application),r.addClientInfo(),e.codeChallenge&&e.codeChallengeMethod&&r.addCodeChallengeParams(e.codeChallenge,e.codeChallengeMethod),e.prompt&&r.addPrompt(e.prompt),e.domainHint&&r.addDomainHint(e.domainHint),e.prompt!==Bt.SELECT_ACCOUNT)if(e.sid&&e.prompt===Bt.NONE)this.logger.verbose("createAuthCodeUrlQueryString: Prompt is none, adding sid from request"),r.addSid(e.sid);else if(e.account){const d=this.extractAccountSid(e.account);let h=this.extractLoginHint(e.account);if(h&&e.domainHint&&(this.logger.warning('AuthorizationCodeClient.createAuthCodeUrlQueryString: "domainHint" param is set, skipping opaque "login_hint" claim. Please consider not passing domainHint'),h=null),h){this.logger.verbose("createAuthCodeUrlQueryString: login_hint claim present on account"),r.addLoginHint(h);try{const f=ga(e.account.homeAccountId);r.addCcsOid(f)}catch{this.logger.verbose("createAuthCodeUrlQueryString: Could not parse home account ID for CCS Header")}}else if(d&&e.prompt===Bt.NONE){this.logger.verbose("createAuthCodeUrlQueryString: Prompt is none, adding sid from account"),r.addSid(d);try{const f=ga(e.account.homeAccountId);r.addCcsOid(f)}catch{this.logger.verbose("createAuthCodeUrlQueryString: Could not parse home account ID for CCS Header")}}else if(e.loginHint)this.logger.verbose("createAuthCodeUrlQueryString: Adding login_hint from request"),r.addLoginHint(e.loginHint),r.addCcsUpn(e.loginHint);else if(e.account.username){this.logger.verbose("createAuthCodeUrlQueryString: Adding login_hint from account"),r.addLoginHint(e.account.username);try{const f=ga(e.account.homeAccountId);r.addCcsOid(f)}catch{this.logger.verbose("createAuthCodeUrlQueryString: Could not parse home account ID for CCS Header")}}}else e.loginHint&&(this.logger.verbose("createAuthCodeUrlQueryString: No account, adding login_hint from request"),r.addLoginHint(e.loginHint),r.addCcsUpn(e.loginHint));else this.logger.verbose("createAuthCodeUrlQueryString: Prompt is select_account, ignoring account hints");if(e.nonce&&r.addNonce(e.nonce),e.state&&r.addState(e.state),(e.claims||this.config.authOptions.clientCapabilities&&this.config.authOptions.clientCapabilities.length>0)&&r.addClaims(e.claims,this.config.authOptions.clientCapabilities),e.embeddedClientId&&r.addBrokerParameters({brokerClientId:this.config.authOptions.clientId,brokerRedirectUri:this.config.authOptions.redirectUri}),this.addExtraQueryParams(e,r),e.nativeBroker&&(r.addNativeBroker(),e.authenticationScheme===je.POP)){const d=new Aa(this.cryptoUtils);let h;e.popKid?h=this.cryptoUtils.encodeKid(e.popKid):h=(await Q(d.generateCnf.bind(d),x.PopTokenGenerateCnf,this.logger,this.performanceClient,e.correlationId)(e,this.logger)).reqCnfString,r.addPopToken(h)}return r.createQueryString()}createLogoutUrlQueryString(e){const t=new ws(e.correlationId,this.performanceClient);return e.postLogoutRedirectUri&&t.addPostLogoutRedirectUri(e.postLogoutRedirectUri),e.correlationId&&t.addCorrelationId(e.correlationId),e.idTokenHint&&t.addIdTokenHint(e.idTokenHint),e.state&&t.addState(e.state),e.logoutHint&&t.addLogoutHint(e.logoutHint),this.addExtraQueryParams(e,t),t.createQueryString()}addExtraQueryParams(e,t){!(e.extraQueryParameters&&e.extraQueryParameters.hasOwnProperty("instance_aware"))&&this.config.authOptions.instanceAware&&(e.extraQueryParameters=e.extraQueryParameters||{},e.extraQueryParameters.instance_aware="true"),e.extraQueryParameters&&t.addExtraQueryParameters(e.extraQueryParameters)}extractAccountSid(e){var t;return((t=e.idTokenClaims)==null?void 0:t.sid)||null}extractLoginHint(e){var t;return((t=e.idTokenClaims)==null?void 0:t.login_hint)||null}}/*! @azure/msal-common v14.16.0 2024-11-05 */const K2=300;class of extends dm{constructor(e,t){super(e,t)}async acquireToken(e){var l,d;(l=this.performanceClient)==null||l.addQueueMeasurement(x.RefreshTokenClientAcquireToken,e.correlationId);const t=zr(),r=await Q(this.executeTokenRequest.bind(this),x.RefreshTokenClientExecuteTokenRequest,this.logger,this.performanceClient,e.correlationId)(e,this.authority),o=(d=r.headers)==null?void 0:d[dn.X_MS_REQUEST_ID],a=new Si(this.config.authOptions.clientId,this.cacheManager,this.cryptoUtils,this.logger,this.config.serializableCache,this.config.persistencePlugin);return a.validateTokenResponse(r.body),Q(a.handleServerTokenResponse.bind(a),x.HandleServerTokenResponse,this.logger,this.performanceClient,e.correlationId)(r.body,this.authority,t,e,void 0,void 0,!0,e.forceCache,o)}async acquireTokenByRefreshToken(e){var r;if(!e)throw Ze(Iw);if((r=this.performanceClient)==null||r.addQueueMeasurement(x.RefreshTokenClientAcquireTokenByRefreshToken,e.correlationId),!e.account)throw Y(Jf);if(this.cacheManager.isAppMetadataFOCI(e.account.environment))try{return await Q(this.acquireTokenWithCachedRefreshToken.bind(this),x.RefreshTokenClientAcquireTokenWithCachedRefreshToken,this.logger,this.performanceClient,e.correlationId)(e,!0)}catch(o){const a=o instanceof Tr&&o.errorCode===Ul,l=o instanceof zo&&o.errorCode===Fv.INVALID_GRANT_ERROR&&o.subError===Fv.CLIENT_MISMATCH_ERROR;if(a||l)return Q(this.acquireTokenWithCachedRefreshToken.bind(this),x.RefreshTokenClientAcquireTokenWithCachedRefreshToken,this.logger,this.performanceClient,e.correlationId)(e,!1);throw o}return Q(this.acquireTokenWithCachedRefreshToken.bind(this),x.RefreshTokenClientAcquireTokenWithCachedRefreshToken,this.logger,this.performanceClient,e.correlationId)(e,!1)}async acquireTokenWithCachedRefreshToken(e,t){var a;(a=this.performanceClient)==null||a.addQueueMeasurement(x.RefreshTokenClientAcquireTokenWithCachedRefreshToken,e.correlationId);const r=Ni(this.cacheManager.getRefreshToken.bind(this.cacheManager),x.CacheManagerGetRefreshToken,this.logger,this.performanceClient,e.correlationId)(e.account,t,void 0,this.performanceClient,e.correlationId);if(!r)throw rf(Ul);if(r.expiresOn&&ef(r.expiresOn,e.refreshTokenExpirationOffsetSeconds||K2))throw rf(hm);const o={...e,refreshToken:r.secret,authenticationScheme:e.authenticationScheme||je.BEARER,ccsCredential:{credential:e.account.homeAccountId,type:Bn.HOME_ACCOUNT_ID}};try{return await Q(this.acquireToken.bind(this),x.RefreshTokenClientAcquireToken,this.logger,this.performanceClient,e.correlationId)(o)}catch(l){if(l instanceof Tr&&l.subError===fu){this.logger.verbose("acquireTokenWithRefreshToken: bad refresh token, removing from cache");const d=ma(r);this.cacheManager.removeRefreshToken(d)}throw l}}async executeTokenRequest(e,t){var h,f;(h=this.performanceClient)==null||h.addQueueMeasurement(x.RefreshTokenClientExecuteTokenRequest,e.correlationId);const r=this.createTokenQueryParameters(e),o=De.appendQueryString(t.tokenEndpoint,r),a=await Q(this.createTokenRequestBody.bind(this),x.RefreshTokenClientCreateTokenRequestBody,this.logger,this.performanceClient,e.correlationId)(e),l=this.createTokenRequestHeaders(e.ccsCredential),d={clientId:((f=e.tokenBodyParameters)==null?void 0:f.clientId)||this.config.authOptions.clientId,authority:t.canonicalAuthority,scopes:e.scopes,claims:e.claims,authenticationScheme:e.authenticationScheme,resourceRequestMethod:e.resourceRequestMethod,resourceRequestUri:e.resourceRequestUri,shrClaims:e.shrClaims,sshKid:e.sshKid};return Q(this.executePostToTokenEndpoint.bind(this),x.RefreshTokenClientExecutePostToTokenEndpoint,this.logger,this.performanceClient,e.correlationId)(o,a,l,d,e.correlationId,x.RefreshTokenClientExecutePostToTokenEndpoint)}async createTokenRequestBody(e){var o,a,l;(o=this.performanceClient)==null||o.addQueueMeasurement(x.RefreshTokenClientCreateTokenRequestBody,e.correlationId);const t=e.correlationId,r=new ws(t,this.performanceClient);if(r.addClientId(e.embeddedClientId||((a=e.tokenBodyParameters)==null?void 0:a[bi])||this.config.authOptions.clientId),e.redirectUri&&r.addRedirectUri(e.redirectUri),r.addScopes(e.scopes,!0,(l=this.config.authOptions.authority.options.OIDCOptions)==null?void 0:l.defaultScopes),r.addGrantType(ZE.REFRESH_TOKEN_GRANT),r.addClientInfo(),r.addLibraryInfo(this.config.libraryInfo),r.addApplicationTelemetry(this.config.telemetry.application),r.addThrottling(),this.serverTelemetryManager&&!tf(this.config)&&r.addServerTelemetry(this.serverTelemetryManager),r.addRefreshToken(e.refreshToken),this.config.clientCredentials.clientSecret&&r.addClientSecret(this.config.clientCredentials.clientSecret),this.config.clientCredentials.clientAssertion){const d=this.config.clientCredentials.clientAssertion;r.addClientAssertion(await zw(d.assertion,this.config.authOptions.clientId,e.resourceRequestUri)),r.addClientAssertionType(d.assertionType)}if(e.authenticationScheme===je.POP){const d=new Aa(this.cryptoUtils,this.performanceClient);let h;e.popKid?h=this.cryptoUtils.encodeKid(e.popKid):h=(await Q(d.generateCnf.bind(d),x.PopTokenGenerateCnf,this.logger,this.performanceClient,e.correlationId)(e,this.logger)).reqCnfString,r.addPopToken(h)}else if(e.authenticationScheme===je.SSH)if(e.sshJwk)r.addSshJwk(e.sshJwk);else throw Ze(uu);if((!Cr.isEmptyObj(e.claims)||this.config.authOptions.clientCapabilities&&this.config.authOptions.clientCapabilities.length>0)&&r.addClaims(e.claims,this.config.authOptions.clientCapabilities),this.config.systemOptions.preventCorsPreflight&&e.ccsCredential)switch(e.ccsCredential.type){case Bn.HOME_ACCOUNT_ID:try{const d=ga(e.ccsCredential.credential);r.addCcsOid(d)}catch(d){this.logger.verbose("Could not parse home account ID for CCS Header: "+d)}break;case Bn.UPN:r.addCcsUpn(e.ccsCredential.credential);break}return e.embeddedClientId&&r.addBrokerParameters({brokerClientId:this.config.authOptions.clientId,brokerRedirectUri:this.config.authOptions.redirectUri}),e.tokenBodyParameters&&r.addExtraQueryParameters(e.tokenBodyParameters),r.createQueryString()}}/*! @azure/msal-common v14.16.0 2024-11-05 */class W2 extends dm{constructor(e,t){super(e,t)}async acquireToken(e){var t;try{const[r,o]=await this.acquireCachedToken({...e,scopes:(t=e.scopes)!=null&&t.length?e.scopes:[...Da]});return o===Do.PROACTIVELY_REFRESHED&&(this.logger.info("SilentFlowClient:acquireCachedToken - Cached access token's refreshOn property has been exceeded'. It's not expired, but must be refreshed."),new of(this.config,this.performanceClient).acquireTokenByRefreshToken(e).catch(()=>{})),r}catch(r){if(r instanceof su&&r.errorCode===co)return new of(this.config,this.performanceClient).acquireTokenByRefreshToken(e);throw r}}async acquireCachedToken(e){var h;(h=this.performanceClient)==null||h.addQueueMeasurement(x.SilentFlowClientAcquireCachedToken,e.correlationId);let t=Do.NOT_APPLICABLE;if(e.forceRefresh||!this.config.cacheOptions.claimsBasedCachingEnabled&&!Cr.isEmptyObj(e.claims))throw this.setCacheOutcome(Do.FORCE_REFRESH_OR_CLAIMS,e.correlationId),Y(co);if(!e.account)throw Y(Jf);const r=e.account.tenantId||M2(e.authority),o=this.cacheManager.getTokenKeys(),a=this.cacheManager.getAccessToken(e.account,e,o,r,this.performanceClient,e.correlationId);if(a){if(yF(a.cachedAt)||ef(a.expiresOn,this.config.systemOptions.tokenRenewalOffsetSeconds))throw this.setCacheOutcome(Do.CACHED_ACCESS_TOKEN_EXPIRED,e.correlationId),Y(co);a.refreshOn&&ef(a.refreshOn,0)&&(t=Do.PROACTIVELY_REFRESHED)}else throw this.setCacheOutcome(Do.NO_CACHED_ACCESS_TOKEN,e.correlationId),Y(co);const l=e.authority||this.authority.getPreferredCache(),d={account:this.cacheManager.readAccountFromCache(e.account),accessToken:a,idToken:this.cacheManager.getIdToken(e.account,o,r,this.performanceClient,e.correlationId),refreshToken:null,appMetadata:this.cacheManager.readAppMetadataFromCache(l)};return this.setCacheOutcome(t,e.correlationId),this.config.serverTelemetryManager&&this.config.serverTelemetryManager.incrementCacheHits(),[await Q(this.generateResultFromCacheRecord.bind(this),x.SilentFlowClientGenerateResultFromCacheRecord,this.logger,this.performanceClient,e.correlationId)(d,e),t]}setCacheOutcome(e,t){var r,o;(r=this.serverTelemetryManager)==null||r.setCacheOutcome(e),(o=this.performanceClient)==null||o.addFields({cacheOutcome:e},t),e!==Do.NOT_APPLICABLE&&this.logger.info(`Token refresh is required due to cache outcome: ${e}`)}async generateResultFromCacheRecord(e,t){var o;(o=this.performanceClient)==null||o.addQueueMeasurement(x.SilentFlowClientGenerateResultFromCacheRecord,t.correlationId);let r;if(e.idToken&&(r=ki(e.idToken.secret,this.config.cryptoInterface.base64Decode)),t.maxAge||t.maxAge===0){const a=r==null?void 0:r.auth_time;if(!a)throw Y(Yf);yw(a,t.maxAge)}return Si.generateAuthenticationResult(this.cryptoUtils,this.authority,e,!0,t,r)}}/*! @azure/msal-common v14.16.0 2024-11-05 */const z2={sendGetRequestAsync:()=>Promise.reject(Y(Ae)),sendPostRequestAsync:()=>Promise.reject(Y(Ae))};/*! @azure/msal-common v14.16.0 2024-11-05 */const oy=",",qw="|";function G2(n){const{skus:e,libraryName:t,libraryVersion:r,extensionName:o,extensionVersion:a}=n,l=new Map([[0,[t,r]],[2,[o,a]]]);let d=[];if(e!=null&&e.length){if(d=e.split(oy),d.length<4)return e}else d=Array.from({length:4},()=>qw);return l.forEach((h,f)=>{var g,_;h.length===2&&((g=h[0])!=null&&g.length)&&((_=h[1])!=null&&_.length)&&q2({skuArr:d,index:f,skuName:h[0],skuVersion:h[1]})}),d.join(oy)}function q2(n){const{skuArr:e,index:t,skuName:r,skuVersion:o}=n;t>=e.length||(e[t]=[r,o].join(qw))}class Ds{constructor(e,t){this.cacheOutcome=Do.NOT_APPLICABLE,this.cacheManager=t,this.apiId=e.apiId,this.correlationId=e.correlationId,this.wrapperSKU=e.wrapperSKU||V.EMPTY_STRING,this.wrapperVer=e.wrapperVer||V.EMPTY_STRING,this.telemetryCacheKey=Wt.CACHE_KEY+tn.CACHE_KEY_SEPARATOR+e.clientId}generateCurrentRequestHeaderValue(){const e=`${this.apiId}${Wt.VALUE_SEPARATOR}${this.cacheOutcome}`,t=[this.wrapperSKU,this.wrapperVer],r=this.getNativeBrokerErrorCode();r!=null&&r.length&&t.push(`broker_error=${r}`);const o=t.join(Wt.VALUE_SEPARATOR),a=this.getRegionDiscoveryFields(),l=[e,a].join(Wt.VALUE_SEPARATOR);return[Wt.SCHEMA_VERSION,l,o].join(Wt.CATEGORY_SEPARATOR)}generateLastRequestHeaderValue(){const e=this.getLastRequests(),t=Ds.maxErrorsToSend(e),r=e.failedRequests.slice(0,2*t).join(Wt.VALUE_SEPARATOR),o=e.errors.slice(0,t).join(Wt.VALUE_SEPARATOR),a=e.errors.length,l=t<a?Wt.OVERFLOW_TRUE:Wt.OVERFLOW_FALSE,d=[a,l].join(Wt.VALUE_SEPARATOR);return[Wt.SCHEMA_VERSION,e.cacheHits,r,o,d].join(Wt.CATEGORY_SEPARATOR)}cacheFailedRequest(e){const t=this.getLastRequests();t.errors.length>=Wt.MAX_CACHED_ERRORS&&(t.failedRequests.shift(),t.failedRequests.shift(),t.errors.shift()),t.failedRequests.push(this.apiId,this.correlationId),e instanceof Error&&e&&e.toString()?e instanceof lt?e.subError?t.errors.push(e.subError):e.errorCode?t.errors.push(e.errorCode):t.errors.push(e.toString()):t.errors.push(e.toString()):t.errors.push(Wt.UNKNOWN_ERROR),this.cacheManager.setServerTelemetry(this.telemetryCacheKey,t)}incrementCacheHits(){const e=this.getLastRequests();return e.cacheHits+=1,this.cacheManager.setServerTelemetry(this.telemetryCacheKey,e),e.cacheHits}getLastRequests(){const e={failedRequests:[],errors:[],cacheHits:0};return this.cacheManager.getServerTelemetry(this.telemetryCacheKey)||e}clearTelemetryCache(){const e=this.getLastRequests(),t=Ds.maxErrorsToSend(e),r=e.errors.length;if(t===r)this.cacheManager.removeItem(this.telemetryCacheKey);else{const o={failedRequests:e.failedRequests.slice(t*2),errors:e.errors.slice(t),cacheHits:0};this.cacheManager.setServerTelemetry(this.telemetryCacheKey,o)}}static maxErrorsToSend(e){let t,r=0,o=0;const a=e.errors.length;for(t=0;t<a;t++){const l=e.failedRequests[2*t]||V.EMPTY_STRING,d=e.failedRequests[2*t+1]||V.EMPTY_STRING,h=e.errors[t]||V.EMPTY_STRING;if(o+=l.toString().length+d.toString().length+h.length+3,o<Wt.MAX_LAST_HEADER_BYTES)r+=1;else break}return r}getRegionDiscoveryFields(){const e=[];return e.push(this.regionUsed||V.EMPTY_STRING),e.push(this.regionSource||V.EMPTY_STRING),e.push(this.regionOutcome||V.EMPTY_STRING),e.join(",")}updateRegionDiscoveryMetadata(e){this.regionUsed=e.region_used,this.regionSource=e.region_source,this.regionOutcome=e.region_outcome}setCacheOutcome(e){this.cacheOutcome=e}setNativeBrokerErrorCode(e){const t=this.getLastRequests();t.nativeBrokerErrorCode=e,this.cacheManager.setServerTelemetry(this.telemetryCacheKey,t)}getNativeBrokerErrorCode(){return this.getLastRequests().nativeBrokerErrorCode}clearNativeBrokerErrorCode(){const e=this.getLastRequests();delete e.nativeBrokerErrorCode,this.cacheManager.setServerTelemetry(this.telemetryCacheKey,e)}static makeExtraSkuString(e){return G2(e)}}/*! @azure/msal-common v14.16.0 2024-11-05 */const jw="missing_kid_error",Yw="missing_alg_error";/*! @azure/msal-common v14.16.0 2024-11-05 */const j2={[jw]:"The JOSE Header for the requested JWT, JWS or JWK object requires a keyId to be configured as the 'kid' header claim. No 'kid' value was provided.",[Yw]:"The JOSE Header for the requested JWT, JWS or JWK object requires an algorithm to be specified as the 'alg' header claim. No 'alg' value was provided."};class mm extends lt{constructor(e,t){super(e,t),this.name="JoseHeaderError",Object.setPrototypeOf(this,mm.prototype)}}function iy(n){return new mm(n,j2[n])}/*! @azure/msal-common v14.16.0 2024-11-05 */class gm{constructor(e){this.typ=e.typ,this.alg=e.alg,this.kid=e.kid}static getShrHeaderString(e){if(!e.kid)throw iy(jw);if(!e.alg)throw iy(Yw);const t=new gm({typ:e.typ||rF.Pop,kid:e.kid,alg:e.alg});return JSON.stringify(t)}}/*! @azure/msal-common v14.16.0 2024-11-05 */class ay{startMeasurement(){}endMeasurement(){}flushMeasurement(){return null}}class Y2{generateId(){return"callback-id"}startMeasurement(e,t){return{end:()=>null,discard:()=>{},add:()=>{},increment:()=>{},event:{eventId:this.generateId(),status:P2.InProgress,authority:"",libraryName:"",libraryVersion:"",clientId:"",name:e,startTimeMs:Date.now(),correlationId:t||""},measurement:new ay}}startPerformanceMeasurement(){return new ay}calculateQueuedTime(){return 0}addQueueMeasurement(){}setPreQueueTime(){}endMeasurement(){return null}discardMeasurements(){}removePerformanceCallback(){return!0}addPerformanceCallback(){return""}emitEvents(){}addFields(){}incrementFields(){}cacheEventByCorrelationId(){}}/*! @azure/msal-browser v3.28.1 2025-01-14 */const pm="pkce_not_created",af="crypto_nonexistent",mu="empty_navigate_uri",Jw="hash_empty_error",_m="no_state_in_hash",Qw="hash_does_not_contain_known_properties",Xw="unable_to_parse_state",Zw="state_interaction_type_mismatch",eT="interaction_in_progress",tT="popup_window_error",nT="empty_window_error",Ii="user_cancelled",J2="monitor_popup_timeout",rT="monitor_window_timeout",oT="redirect_in_iframe",iT="block_iframe_reload",aT="block_nested_popups",Q2="iframe_closed_prematurely",gu="silent_logout_unsupported",sT="no_account_error",X2="silent_prompt_value_error",cT="no_token_request_cache_error",lT="unable_to_parse_token_request_cache_error",vm="no_cached_authority_error",Z2="auth_request_not_set_error",eH="invalid_cache_type",pu="non_browser_environment",ca="database_not_open",Bl="no_network_connectivity",uT="post_request_failed",dT="get_request_failed",sf="failed_to_parse_response",hT="unable_to_load_token",ym="crypto_key_not_found",fT="auth_code_required",mT="auth_code_or_nativeAccountId_required",gT="spa_code_and_nativeAccountId_present",Cm="database_unavailable",pT="unable_to_acquire_token_from_native_platform",_T="native_handshake_timeout",vT="native_extension_not_installed",qs="native_connection_not_established",yT="uninitialized_public_client_application",CT="native_prompt_not_supported",ET="invalid_base64_string",wT="invalid_pop_token_request",TT="failed_to_build_headers",bT="failed_to_parse_headers";/*! @azure/msal-browser v3.28.1 2025-01-14 */const io="For more visit: aka.ms/msaljs/browser-errors",tH={[pm]:"The PKCE code challenge and verifier could not be generated.",[af]:"The crypto object or function is not available.",[mu]:"Navigation URI is empty. Please check stack trace for more info.",[Jw]:`Hash value cannot be processed because it is empty. Please verify that your redirectUri is not clearing the hash. ${io}`,[_m]:"Hash does not contain state. Please verify that the request originated from msal.",[Qw]:`Hash does not contain known properites. Please verify that your redirectUri is not changing the hash. ${io}`,[Xw]:"Unable to parse state. Please verify that the request originated from msal.",[Zw]:"Hash contains state but the interaction type does not match the caller.",[eT]:`Interaction is currently in progress. Please ensure that this interaction has been completed before calling an interactive API. ${io}`,[tT]:"Error opening popup window. This can happen if you are using IE or if popups are blocked in the browser.",[nT]:"window.open returned null or undefined window object.",[Ii]:"User cancelled the flow.",[J2]:`Token acquisition in popup failed due to timeout. ${io}`,[rT]:`Token acquisition in iframe failed due to timeout. ${io}`,[oT]:"Redirects are not supported for iframed or brokered applications. Please ensure you are using MSAL.js in a top frame of the window if using the redirect APIs, or use the popup APIs.",[iT]:`Request was blocked inside an iframe because MSAL detected an authentication response. ${io}`,[aT]:"Request was blocked inside a popup because MSAL detected it was running in a popup.",[Q2]:"The iframe being monitored was closed prematurely.",[gu]:"Silent logout not supported. Please call logoutRedirect or logoutPopup instead.",[sT]:"No account object provided to acquireTokenSilent and no active account has been set. Please call setActiveAccount or provide an account on the request.",[X2]:"The value given for the prompt value is not valid for silent requests - must be set to 'none' or 'no_session'.",[cT]:"No token request found in cache.",[lT]:"The cached token request could not be parsed.",[vm]:"No cached authority found.",[Z2]:"Auth Request not set. Please ensure initiateAuthRequest was called from the InteractionHandler",[eH]:"Invalid cache type",[pu]:"Login and token requests are not supported in non-browser environments.",[ca]:"Database is not open!",[Bl]:"No network connectivity. Check your internet connection.",[uT]:"Network request failed: If the browser threw a CORS error, check that the redirectUri is registered in the Azure App Portal as type 'SPA'",[dT]:"Network request failed. Please check the network trace to determine root cause.",[sf]:"Failed to parse network response. Check network trace.",[hT]:"Error loading token to cache.",[ym]:"Cryptographic Key or Keypair not found in browser storage.",[fT]:"An authorization code must be provided (as the `code` property on the request) to this flow.",[mT]:"An authorization code or nativeAccountId must be provided to this flow.",[gT]:"Request cannot contain both spa code and native account id.",[Cm]:"IndexedDB, which is required for persistent cryptographic key storage, is unavailable. This may be caused by browser privacy features which block persistent storage in third-party contexts.",[pT]:`Unable to acquire token from native platform. ${io}`,[_T]:"Timed out while attempting to establish connection to browser extension",[vT]:"Native extension is not installed. If you think this is a mistake call the initialize function.",[qs]:`Connection to native platform has not been established. Please install a compatible browser extension and run initialize(). ${io}`,[yT]:`You must call and await the initialize function before attempting to call any other MSAL API. ${io}`,[CT]:"The provided prompt is not supported by the native platform. This request should be routed to the web based flow.",[ET]:"Invalid base64 encoded string.",[wT]:"Invalid PoP token request. The request should not have both a popKid value and signPopToken set to true.",[TT]:"Failed to build request headers object.",[bT]:"Failed to parse response headers"};class js extends lt{constructor(e,t){super(e,tH[e],t),Object.setPrototypeOf(this,js.prototype),this.name="BrowserAuthError"}}function ie(n,e){return new js(n,e)}/*! @azure/msal-browser v3.28.1 2025-01-14 */const Dn={INTERACTION_IN_PROGRESS_VALUE:"interaction_in_progress",INVALID_GRANT_ERROR:"invalid_grant",POPUP_WIDTH:483,POPUP_HEIGHT:600,POPUP_NAME_PREFIX:"msal",DEFAULT_POLL_INTERVAL_MS:30,MSAL_SKU:"msal.js.browser"},pa={CHANNEL_ID:"53ee284d-920a-4b59-9d30-a60315b26836",PREFERRED_EXTENSION_ID:"ppnbnpeolgkicgegkbkbjmhlideopiji",MATS_TELEMETRY:"MATS"},_i={HandshakeRequest:"Handshake",HandshakeResponse:"HandshakeResponse",GetToken:"GetToken",Response:"Response"},vn={LocalStorage:"localStorage",SessionStorage:"sessionStorage",MemoryStorage:"memoryStorage"},sy={GET:"GET",POST:"POST"},Ke={AUTHORITY:"authority",ACQUIRE_TOKEN_ACCOUNT:"acquireToken.account",SESSION_STATE:"session.state",REQUEST_STATE:"request.state",NONCE_IDTOKEN:"nonce.id_token",ORIGIN_URI:"request.origin",RENEW_STATUS:"token.renew.status",URL_HASH:"urlHash",REQUEST_PARAMS:"request.params",SCOPES:"scopes",INTERACTION_STATUS_KEY:"interaction.status",CCS_CREDENTIAL:"ccs.credential",CORRELATION_ID:"request.correlationId",NATIVE_REQUEST:"request.native",REDIRECT_CONTEXT:"request.redirect.context"},Mo={ACCOUNT_KEYS:"msal.account.keys",TOKEN_KEYS:"msal.token.keys"},Qc={WRAPPER_SKU:"wrapper.sku",WRAPPER_VER:"wrapper.version"},it={acquireTokenRedirect:861,acquireTokenPopup:862,ssoSilent:863,acquireTokenSilent_authCode:864,handleRedirectPromise:865,acquireTokenByCode:866,acquireTokenSilent_silentFlow:61,logout:961,logoutPopup:962};var le;(function(n){n.Redirect="redirect",n.Popup="popup",n.Silent="silent",n.None="none"})(le||(le={}));const cy={scopes:Da},ST="jwk",cf="msal.db",nH=1,rH=`${cf}.keys`,Pn={Default:0,AccessToken:1,AccessTokenAndRefreshToken:2,RefreshToken:3,RefreshTokenAndNetwork:4,Skip:5},oH=[Pn.Default,Pn.Skip,Pn.RefreshTokenAndNetwork],iH="msal.browser.log.level",aH="msal.browser.log.pii";/*! @azure/msal-browser v3.28.1 2025-01-14 */function Xc(n){return encodeURIComponent(Em(n).replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_"))}function _u(n){return IT(n).replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")}function Em(n){return IT(new TextEncoder().encode(n))}function IT(n){const e=Array.from(n,t=>String.fromCodePoint(t)).join("");return btoa(e)}/*! @azure/msal-browser v3.28.1 2025-01-14 */const sH="RSASSA-PKCS1-v1_5",AT="SHA-256",cH=2048,lH=new Uint8Array([1,0,1]),ly="0123456789abcdef",uy=new Uint32Array(1),uH="crypto_subtle_undefined",wm={name:sH,hash:AT,modulusLength:cH,publicExponent:lH};function dH(n){if(!window)throw ie(pu);if(!window.crypto)throw ie(af);if(!n&&!window.crypto.subtle)throw ie(af,uH)}async function kT(n,e,t){e==null||e.addQueueMeasurement(x.Sha256Digest,t);const o=new TextEncoder().encode(n);return window.crypto.subtle.digest(AT,o)}function hH(n){return window.crypto.getRandomValues(n)}function lh(){return window.crypto.getRandomValues(uy),uy[0]}function po(){const n=Date.now(),e=lh()*1024+(lh()&1023),t=new Uint8Array(16),r=Math.trunc(e/2**30),o=e&2**30-1,a=lh();t[0]=n/2**40,t[1]=n/2**32,t[2]=n/2**24,t[3]=n/2**16,t[4]=n/2**8,t[5]=n,t[6]=112|r>>>8,t[7]=r,t[8]=128|o>>>24,t[9]=o>>>16,t[10]=o>>>8,t[11]=o,t[12]=a>>>24,t[13]=a>>>16,t[14]=a>>>8,t[15]=a;let l="";for(let d=0;d<t.length;d++)l+=ly.charAt(t[d]>>>4),l+=ly.charAt(t[d]&15),(d===3||d===5||d===7||d===9)&&(l+="-");return l}async function fH(n,e){return window.crypto.subtle.generateKey(wm,n,e)}async function uh(n){return window.crypto.subtle.exportKey(ST,n)}async function mH(n,e,t){return window.crypto.subtle.importKey(ST,n,wm,e,t)}async function gH(n,e){return window.crypto.subtle.sign(wm,n,e)}async function NT(n){const e=await kT(n),t=new Uint8Array(e);return _u(t)}/*! @azure/msal-browser v3.28.1 2025-01-14 */const Ls="storage_not_supported",lf="stubbed_public_client_application_called",Vl="in_mem_redirect_unavailable";/*! @azure/msal-browser v3.28.1 2025-01-14 */const yl={[Ls]:"Given storage configuration option was not supported.",[lf]:"Stub instance of Public Client Application was called. If using msal-react, please ensure context is not used without a provider. For more visit: aka.ms/msaljs/browser-errors",[Vl]:"Redirect cannot be supported. In-memory storage was selected and storeAuthStateInCookie=false, which would cause the library to be unable to handle the incoming hash. If you would like to use the redirect API, please use session/localStorage or set storeAuthStateInCookie=true."};yl[Ls],yl[lf],yl[Vl];class Tm extends lt{constructor(e,t){super(e,t),this.name="BrowserConfigurationAuthError",Object.setPrototypeOf(this,Tm.prototype)}}function bm(n){return new Tm(n,yl[n])}/*! @azure/msal-browser v3.28.1 2025-01-14 */function pH(n){n.location.hash="",typeof n.history.replaceState=="function"&&n.history.replaceState(null,"",`${n.location.origin}${n.location.pathname}${n.location.search}`)}function _H(n){const e=n.split("#");e.shift(),window.location.hash=e.length>0?e.join("#"):""}function Sm(){return window.parent!==window}function vH(){return typeof window<"u"&&!!window.opener&&window.opener!==window&&typeof window.name=="string"&&window.name.indexOf(`${Dn.POPUP_NAME_PREFIX}.`)===0}function lo(){return typeof window<"u"&&window.location?window.location.href.split("?")[0].split("#")[0]:""}function yH(){const e=new De(window.location.href).getUrlComponents();return`${e.Protocol}//${e.HostNameAndPort}/`}function CH(){if(De.hashContainsKnownProperties(window.location.hash)&&Sm())throw ie(iT)}function EH(n){if(Sm()&&!n)throw ie(oT)}function wH(){if(vH())throw ie(aT)}function RT(){if(typeof window>"u")throw ie(pu)}function OT(n){if(!n)throw ie(yT)}function Im(n){RT(),CH(),wH(),OT(n)}function dy(n,e){if(Im(n),EH(e.system.allowRedirectInIframe),e.cache.cacheLocation===vn.MemoryStorage&&!e.cache.storeAuthStateInCookie)throw bm(Vl)}function PT(n){const e=document.createElement("link");e.rel="preconnect",e.href=new URL(n).origin,e.crossOrigin="anonymous",document.head.appendChild(e),window.setTimeout(()=>{try{document.head.removeChild(e)}catch{}},1e4)}function TH(){return po()}/*! @azure/msal-browser v3.28.1 2025-01-14 */class Fl{navigateInternal(e,t){return Fl.defaultNavigateWindow(e,t)}navigateExternal(e,t){return Fl.defaultNavigateWindow(e,t)}static defaultNavigateWindow(e,t){return t.noHistory?window.location.replace(e):window.location.assign(e),new Promise(r=>{setTimeout(()=>{r(!0)},t.timeout)})}}/*! @azure/msal-browser v3.28.1 2025-01-14 */class bH{async sendGetRequestAsync(e,t){let r,o={},a=0;const l=hy(t);try{r=await fetch(e,{method:sy.GET,headers:l})}catch{throw ie(window.navigator.onLine?dT:Bl)}o=fy(r.headers);try{return a=r.status,{headers:o,body:await r.json(),status:a}}catch{throw ty(ie(sf),a,o)}}async sendPostRequestAsync(e,t){const r=t&&t.body||"",o=hy(t);let a,l=0,d={};try{a=await fetch(e,{method:sy.POST,headers:o,body:r})}catch{throw ie(window.navigator.onLine?uT:Bl)}d=fy(a.headers);try{return l=a.status,{headers:d,body:await a.json(),status:l}}catch{throw ty(ie(sf),l,d)}}}function hy(n){try{const e=new Headers;if(!(n&&n.headers))return e;const t=n.headers;return Object.entries(t).forEach(([r,o])=>{e.append(r,o)}),e}catch{throw ie(TT)}}function fy(n){try{const e={};return n.forEach((t,r)=>{e[r]=t}),e}catch{throw ie(bT)}}/*! @azure/msal-browser v3.28.1 2025-01-14 */const SH=6e4,uf=1e4,IH=3e4,AH=2e3;function kH({auth:n,cache:e,system:t,telemetry:r},o){const a={clientId:V.EMPTY_STRING,authority:`${V.DEFAULT_AUTHORITY}`,knownAuthorities:[],cloudDiscoveryMetadata:V.EMPTY_STRING,authorityMetadata:V.EMPTY_STRING,redirectUri:typeof window<"u"?lo():"",postLogoutRedirectUri:V.EMPTY_STRING,navigateToLoginRequestUrl:!0,clientCapabilities:[],protocolMode:mo.AAD,OIDCOptions:{serverResponseType:Gs.FRAGMENT,defaultScopes:[V.OPENID_SCOPE,V.PROFILE_SCOPE,V.OFFLINE_ACCESS_SCOPE]},azureCloudOptions:{azureCloudInstance:em.None,tenant:V.EMPTY_STRING},skipAuthorityMetadataCache:!1,supportsNestedAppAuth:!1,instanceAware:!1},l={cacheLocation:vn.SessionStorage,temporaryCacheLocation:vn.SessionStorage,storeAuthStateInCookie:!1,secureCookies:!1,cacheMigrationEnabled:!!(e&&e.cacheLocation===vn.LocalStorage),claimsBasedCachingEnabled:!1},d={loggerCallback:()=>{},logLevel:nt.Info,piiLoggingEnabled:!1},f={...{...Fw,loggerOptions:d,networkClient:o?new bH:z2,navigationClient:new Fl,loadFrameTimeout:0,windowHashTimeout:(t==null?void 0:t.loadFrameTimeout)||SH,iframeHashTimeout:(t==null?void 0:t.loadFrameTimeout)||uf,navigateFrameWait:0,redirectNavigationTimeout:IH,asyncPopups:!1,allowRedirectInIframe:!1,allowNativeBroker:!1,nativeBrokerHandshakeTimeout:(t==null?void 0:t.nativeBrokerHandshakeTimeout)||AH,pollIntervalMilliseconds:Dn.DEFAULT_POLL_INTERVAL_MS},...t,loggerOptions:(t==null?void 0:t.loggerOptions)||d},g={application:{appName:V.EMPTY_STRING,appVersion:V.EMPTY_STRING},client:new Y2};if((n==null?void 0:n.protocolMode)!==mo.OIDC&&(n!=null&&n.OIDCOptions)&&new Wo(f.loggerOptions).warning(JSON.stringify(Ze(Pw))),n!=null&&n.protocolMode&&n.protocolMode!==mo.AAD&&(f!=null&&f.allowNativeBroker))throw Ze(Mw);return{auth:{...a,...n,OIDCOptions:{...a.OIDCOptions,...n==null?void 0:n.OIDCOptions}},cache:{...l,...e},system:f,telemetry:{...g,...r}}}/*! @azure/msal-browser v3.28.1 2025-01-14 */const NH="@azure/msal-browser",vu="3.28.1";/*! @azure/msal-browser v3.28.1 2025-01-14 */class Am{static loggerCallback(e,t){switch(e){case nt.Error:console.error(t);return;case nt.Info:console.info(t);return;case nt.Verbose:console.debug(t);return;case nt.Warning:console.warn(t);return;default:console.log(t);return}}constructor(e){var h;this.browserEnvironment=typeof window<"u",this.config=kH(e,this.browserEnvironment);let t;try{t=window[vn.SessionStorage]}catch{}const r=t==null?void 0:t.getItem(iH),o=(h=t==null?void 0:t.getItem(aH))==null?void 0:h.toLowerCase(),a=o==="true"?!0:o==="false"?!1:void 0,l={...this.config.system.loggerOptions},d=r&&Object.keys(nt).includes(r)?nt[r]:void 0;d&&(l.loggerCallback=Am.loggerCallback,l.logLevel=d),a!==void 0&&(l.piiLoggingEnabled=a),this.logger=new Wo(l,NH,vu),this.available=!1}getConfig(){return this.config}getLogger(){return this.logger}isAvailable(){return this.available}isBrowserEnvironment(){return this.browserEnvironment}}/*! @azure/msal-browser v3.28.1 2025-01-14 */class Ai extends Am{getModuleName(){return Ai.MODULE_NAME}getId(){return Ai.ID}async initialize(){return this.available=typeof window<"u",this.available}}Ai.MODULE_NAME="";Ai.ID="StandardOperatingContext";/*! @azure/msal-browser v3.28.1 2025-01-14 */function Kr(n){return new TextDecoder().decode(RH(n))}function RH(n){let e=n.replace(/-/g,"+").replace(/_/g,"/");switch(e.length%4){case 0:break;case 2:e+="==";break;case 3:e+="=";break;default:throw ie(ET)}const t=atob(e);return Uint8Array.from(t,r=>r.codePointAt(0)||0)}/*! @azure/msal-browser v3.28.1 2025-01-14 */class OH{constructor(){this.dbName=cf,this.version=nH,this.tableName=rH,this.dbOpen=!1}async open(){return new Promise((e,t)=>{const r=window.indexedDB.open(this.dbName,this.version);r.addEventListener("upgradeneeded",o=>{o.target.result.createObjectStore(this.tableName)}),r.addEventListener("success",o=>{const a=o;this.db=a.target.result,this.dbOpen=!0,e()}),r.addEventListener("error",()=>t(ie(Cm)))})}closeConnection(){const e=this.db;e&&this.dbOpen&&(e.close(),this.dbOpen=!1)}async validateDbIsOpen(){if(!this.dbOpen)return this.open()}async getItem(e){return await this.validateDbIsOpen(),new Promise((t,r)=>{if(!this.db)return r(ie(ca));const l=this.db.transaction([this.tableName],"readonly").objectStore(this.tableName).get(e);l.addEventListener("success",d=>{const h=d;this.closeConnection(),t(h.target.result)}),l.addEventListener("error",d=>{this.closeConnection(),r(d)})})}async setItem(e,t){return await this.validateDbIsOpen(),new Promise((r,o)=>{if(!this.db)return o(ie(ca));const d=this.db.transaction([this.tableName],"readwrite").objectStore(this.tableName).put(t,e);d.addEventListener("success",()=>{this.closeConnection(),r()}),d.addEventListener("error",h=>{this.closeConnection(),o(h)})})}async removeItem(e){return await this.validateDbIsOpen(),new Promise((t,r)=>{if(!this.db)return r(ie(ca));const l=this.db.transaction([this.tableName],"readwrite").objectStore(this.tableName).delete(e);l.addEventListener("success",()=>{this.closeConnection(),t()}),l.addEventListener("error",d=>{this.closeConnection(),r(d)})})}async getKeys(){return await this.validateDbIsOpen(),new Promise((e,t)=>{if(!this.db)return t(ie(ca));const a=this.db.transaction([this.tableName],"readonly").objectStore(this.tableName).getAllKeys();a.addEventListener("success",l=>{const d=l;this.closeConnection(),e(d.target.result)}),a.addEventListener("error",l=>{this.closeConnection(),t(l)})})}async containsKey(e){return await this.validateDbIsOpen(),new Promise((t,r)=>{if(!this.db)return r(ie(ca));const l=this.db.transaction([this.tableName],"readonly").objectStore(this.tableName).count(e);l.addEventListener("success",d=>{const h=d;this.closeConnection(),t(h.target.result===1)}),l.addEventListener("error",d=>{this.closeConnection(),r(d)})})}async deleteDatabase(){return this.db&&this.dbOpen&&this.closeConnection(),new Promise((e,t)=>{const r=window.indexedDB.deleteDatabase(cf),o=setTimeout(()=>t(!1),200);r.addEventListener("success",()=>(clearTimeout(o),e(!0))),r.addEventListener("blocked",()=>(clearTimeout(o),e(!0))),r.addEventListener("error",()=>(clearTimeout(o),t(!1)))})}}/*! @azure/msal-browser v3.28.1 2025-01-14 */class df{constructor(){this.cache=new Map}getItem(e){return this.cache.get(e)||null}setItem(e,t){this.cache.set(e,t)}removeItem(e){this.cache.delete(e)}getKeys(){const e=[];return this.cache.forEach((t,r)=>{e.push(r)}),e}containsKey(e){return this.cache.has(e)}clear(){this.cache.clear()}}/*! @azure/msal-browser v3.28.1 2025-01-14 */class PH{constructor(e){this.inMemoryCache=new df,this.indexedDBCache=new OH,this.logger=e}handleDatabaseAccessError(e){if(e instanceof js&&e.errorCode===Cm)this.logger.error("Could not access persistent storage. This may be caused by browser privacy features which block persistent storage in third-party contexts.");else throw e}async getItem(e){const t=this.inMemoryCache.getItem(e);if(!t)try{return this.logger.verbose("Queried item not found in in-memory cache, now querying persistent storage."),await this.indexedDBCache.getItem(e)}catch(r){this.handleDatabaseAccessError(r)}return t}async setItem(e,t){this.inMemoryCache.setItem(e,t);try{await this.indexedDBCache.setItem(e,t)}catch(r){this.handleDatabaseAccessError(r)}}async removeItem(e){this.inMemoryCache.removeItem(e);try{await this.indexedDBCache.removeItem(e)}catch(t){this.handleDatabaseAccessError(t)}}async getKeys(){const e=this.inMemoryCache.getKeys();if(e.length===0)try{return this.logger.verbose("In-memory cache is empty, now querying persistent storage."),await this.indexedDBCache.getKeys()}catch(t){this.handleDatabaseAccessError(t)}return e}async containsKey(e){const t=this.inMemoryCache.containsKey(e);if(!t)try{return this.logger.verbose("Key not found in in-memory cache, now querying persistent storage."),await this.indexedDBCache.containsKey(e)}catch(r){this.handleDatabaseAccessError(r)}return t}clearInMemory(){this.logger.verbose("Deleting in-memory keystore"),this.inMemoryCache.clear(),this.logger.verbose("In-memory keystore deleted")}async clearPersistent(){try{this.logger.verbose("Deleting persistent keystore");const e=await this.indexedDBCache.deleteDatabase();return e&&this.logger.verbose("Persistent keystore deleted"),e}catch(e){return this.handleDatabaseAccessError(e),!1}}}/*! @azure/msal-browser v3.28.1 2025-01-14 */class ka{constructor(e,t,r){this.logger=e,dH(r??!1),this.cache=new PH(this.logger),this.performanceClient=t}createNewGuid(){return po()}base64Encode(e){return Em(e)}base64Decode(e){return Kr(e)}base64UrlEncode(e){return Xc(e)}encodeKid(e){return this.base64UrlEncode(JSON.stringify({kid:e}))}async getPublicKeyThumbprint(e){var g;const t=(g=this.performanceClient)==null?void 0:g.startMeasurement(x.CryptoOptsGetPublicKeyThumbprint,e.correlationId),r=await fH(ka.EXTRACTABLE,ka.POP_KEY_USAGES),o=await uh(r.publicKey),a={e:o.e,kty:o.kty,n:o.n},l=my(a),d=await this.hashString(l),h=await uh(r.privateKey),f=await mH(h,!1,["sign"]);return await this.cache.setItem(d,{privateKey:f,publicKey:r.publicKey,requestMethod:e.resourceRequestMethod,requestUri:e.resourceRequestUri}),t&&t.end({success:!0}),d}async removeTokenBindingKey(e){return await this.cache.removeItem(e),!await this.cache.containsKey(e)}async clearKeystore(){this.cache.clearInMemory();try{return await this.cache.clearPersistent(),!0}catch(e){return e instanceof Error?this.logger.error(`Clearing keystore failed with error: ${e.message}`):this.logger.error("Clearing keystore failed with unknown error"),!1}}async signJwt(e,t,r,o){var D;const a=(D=this.performanceClient)==null?void 0:D.startMeasurement(x.CryptoOptsSignJwt,o),l=await this.cache.getItem(t);if(!l)throw ie(ym);const d=await uh(l.publicKey),h=my(d),f=Xc(JSON.stringify({kid:t})),g=gm.getShrHeaderString({...r==null?void 0:r.header,alg:d.alg,kid:f}),_=Xc(g);e.cnf={jwk:JSON.parse(h)};const p=Xc(JSON.stringify(e)),w=`${_}.${p}`,T=new TextEncoder().encode(w),k=await gH(l.privateKey,T),S=_u(new Uint8Array(k)),N=`${w}.${S}`;return a&&a.end({success:!0}),N}async hashString(e){return NT(e)}}ka.POP_KEY_USAGES=["sign","verify"];ka.EXTRACTABLE=!0;function my(n){return JSON.stringify(n,Object.keys(n).sort())}/*! @azure/msal-browser v3.28.1 2025-01-14 */class MH{constructor(){if(!window.localStorage)throw bm(Ls)}getItem(e){return window.localStorage.getItem(e)}setItem(e,t){window.localStorage.setItem(e,t)}removeItem(e){window.localStorage.removeItem(e)}getKeys(){return Object.keys(window.localStorage)}containsKey(e){return window.localStorage.hasOwnProperty(e)}}/*! @azure/msal-browser v3.28.1 2025-01-14 */class DH{constructor(){if(!window.sessionStorage)throw bm(Ls)}getItem(e){return window.sessionStorage.getItem(e)}setItem(e,t){window.sessionStorage.setItem(e,t)}removeItem(e){window.sessionStorage.removeItem(e)}getKeys(){return Object.keys(window.sessionStorage)}containsKey(e){return window.sessionStorage.hasOwnProperty(e)}}/*! @azure/msal-browser v3.28.1 2025-01-14 */function MT(n,e){if(!e)return null;try{return Er.parseRequestState(n,e).libraryState.meta}catch{throw Y(Sa)}}/*! @azure/msal-browser v3.28.1 2025-01-14 */const LH=24*60*60*1e3;class xH{getItem(e){const t=`${encodeURIComponent(e)}`,r=document.cookie.split(";");for(let o=0;o<r.length;o++){const a=r[o],[l,...d]=decodeURIComponent(a).trim().split("="),h=d.join("=");if(l===t)return h}return""}setItem(e,t,r,o=!0){let a=`${encodeURIComponent(e)}=${encodeURIComponent(t)};path=/;SameSite=Lax;`;if(r){const l=UH(r);a+=`expires=${l};`}o&&(a+="Secure;"),document.cookie=a}removeItem(e){this.setItem(e,"",-1)}getKeys(){const e=document.cookie.split(";"),t=[];return e.forEach(r=>{const o=decodeURIComponent(r).trim().split("=");t.push(o[0])}),t}containsKey(e){return this.getKeys().includes(e)}}function UH(n){const e=new Date;return new Date(e.getTime()+n*LH).toUTCString()}/*! @azure/msal-browser v3.28.1 2025-01-14 */class hf extends Ia{constructor(e,t,r,o,a,l){super(e,r,o,a),this.cacheConfig=t,this.logger=o,this.internalStorage=new df,this.browserStorage=this.setupBrowserStorage(this.cacheConfig.cacheLocation),this.temporaryCacheStorage=this.setupBrowserStorage(this.cacheConfig.temporaryCacheLocation),this.cookieStorage=new xH,t.cacheMigrationEnabled&&(this.migrateCacheEntries(),this.createKeyMaps()),this.performanceClient=l}setupBrowserStorage(e){try{switch(e){case vn.LocalStorage:return new MH;case vn.SessionStorage:return new DH;case vn.MemoryStorage:default:break}}catch(t){this.logger.error(t)}return this.cacheConfig.cacheLocation=vn.MemoryStorage,new df}migrateCacheEntries(){const e=`${V.CACHE_PREFIX}.${Lt.ID_TOKEN}`,t=`${V.CACHE_PREFIX}.${Lt.CLIENT_INFO}`,r=`${V.CACHE_PREFIX}.${Lt.ERROR}`,o=`${V.CACHE_PREFIX}.${Lt.ERROR_DESC}`,a=this.browserStorage.getItem(e),l=this.browserStorage.getItem(t),d=this.browserStorage.getItem(r),h=this.browserStorage.getItem(o),f=[a,l,d,h];[Lt.ID_TOKEN,Lt.CLIENT_INFO,Lt.ERROR,Lt.ERROR_DESC].forEach((_,p)=>{const w=f[p];w&&this.setTemporaryCache(_,w,!0)})}createKeyMaps(){this.logger.trace("BrowserCacheManager - createKeyMaps called.");const e=this.getItem(Mo.ACCOUNT_KEYS),t=this.getItem(`${Mo.TOKEN_KEYS}.${this.clientId}`);if(e&&t){this.logger.verbose("BrowserCacheManager:createKeyMaps - account and token key maps already exist, skipping migration.");return}this.browserStorage.getKeys().forEach(o=>{if(this.isCredentialKey(o)){const a=this.getItem(o);if(a){const l=this.validateAndParseJson(a);if(l&&l.hasOwnProperty("credentialType"))switch(l.credentialType){case ge.ID_TOKEN:if(zv(l)){this.logger.trace("BrowserCacheManager:createKeyMaps - idToken found, saving key to token key map"),this.logger.tracePii(`BrowserCacheManager:createKeyMaps - idToken with key: ${o} found, saving key to token key map`);const d=l,h=this.updateCredentialCacheKey(o,d);this.addTokenKey(h,ge.ID_TOKEN);return}else this.logger.trace("BrowserCacheManager:createKeyMaps - key found matching idToken schema with value containing idToken credentialType field but value failed IdTokenEntity validation, skipping."),this.logger.tracePii(`BrowserCacheManager:createKeyMaps - failed idToken validation on key: ${o}`);break;case ge.ACCESS_TOKEN:case ge.ACCESS_TOKEN_WITH_AUTH_SCHEME:if(Wv(l)){this.logger.trace("BrowserCacheManager:createKeyMaps - accessToken found, saving key to token key map"),this.logger.tracePii(`BrowserCacheManager:createKeyMaps - accessToken with key: ${o} found, saving key to token key map`);const d=l,h=this.updateCredentialCacheKey(o,d);this.addTokenKey(h,ge.ACCESS_TOKEN);return}else this.logger.trace("BrowserCacheManager:createKeyMaps - key found matching accessToken schema with value containing accessToken credentialType field but value failed AccessTokenEntity validation, skipping."),this.logger.tracePii(`BrowserCacheManager:createKeyMaps - failed accessToken validation on key: ${o}`);break;case ge.REFRESH_TOKEN:if(Gv(l)){this.logger.trace("BrowserCacheManager:createKeyMaps - refreshToken found, saving key to token key map"),this.logger.tracePii(`BrowserCacheManager:createKeyMaps - refreshToken with key: ${o} found, saving key to token key map`);const d=l,h=this.updateCredentialCacheKey(o,d);this.addTokenKey(h,ge.REFRESH_TOKEN);return}else this.logger.trace("BrowserCacheManager:createKeyMaps - key found matching refreshToken schema with value containing refreshToken credentialType field but value failed RefreshTokenEntity validation, skipping."),this.logger.tracePii(`BrowserCacheManager:createKeyMaps - failed refreshToken validation on key: ${o}`);break}}}if(this.isAccountKey(o)){const a=this.getItem(o);if(a){const l=this.validateAndParseJson(a);l&&Pt.isAccountEntity(l)&&(this.logger.trace("BrowserCacheManager:createKeyMaps - account found, saving key to account key map"),this.logger.tracePii(`BrowserCacheManager:createKeyMaps - account with key: ${o} found, saving key to account key map`),this.addAccountKeyToMap(o))}}})}validateAndParseJson(e){try{const t=JSON.parse(e);return t&&typeof t=="object"?t:null}catch{return null}}getItem(e){return this.browserStorage.getItem(e)}setItem(e,t){this.browserStorage.setItem(e,t)}getAccount(e,t){this.logger.trace("BrowserCacheManager.getAccount called");const r=this.getCachedAccountEntity(e);return this.updateOutdatedCachedAccount(e,r,t)}getCachedAccountEntity(e){const t=this.getItem(e);if(!t)return this.removeAccountKeyFromMap(e),null;const r=this.validateAndParseJson(t);return!r||!Pt.isAccountEntity(r)?(this.removeAccountKeyFromMap(e),null):Ia.toObject(new Pt,r)}setAccount(e){this.logger.trace("BrowserCacheManager.setAccount called");const t=e.generateAccountKey();this.setItem(t,JSON.stringify(e)),this.addAccountKeyToMap(t)}getAccountKeys(){this.logger.trace("BrowserCacheManager.getAccountKeys called");const e=this.getItem(Mo.ACCOUNT_KEYS);return e?JSON.parse(e):(this.logger.verbose("BrowserCacheManager.getAccountKeys - No account keys found"),[])}addAccountKeyToMap(e){this.logger.trace("BrowserCacheManager.addAccountKeyToMap called"),this.logger.tracePii(`BrowserCacheManager.addAccountKeyToMap called with key: ${e}`);const t=this.getAccountKeys();t.indexOf(e)===-1?(t.push(e),this.setItem(Mo.ACCOUNT_KEYS,JSON.stringify(t)),this.logger.verbose("BrowserCacheManager.addAccountKeyToMap account key added")):this.logger.verbose("BrowserCacheManager.addAccountKeyToMap account key already exists in map")}removeAccountKeyFromMap(e){this.logger.trace("BrowserCacheManager.removeAccountKeyFromMap called"),this.logger.tracePii(`BrowserCacheManager.removeAccountKeyFromMap called with key: ${e}`);const t=this.getAccountKeys(),r=t.indexOf(e);r>-1?(t.splice(r,1),this.setItem(Mo.ACCOUNT_KEYS,JSON.stringify(t)),this.logger.trace("BrowserCacheManager.removeAccountKeyFromMap account key removed")):this.logger.trace("BrowserCacheManager.removeAccountKeyFromMap key not found in existing map")}async removeAccount(e){super.removeAccount(e),this.removeAccountKeyFromMap(e)}removeOutdatedAccount(e){this.removeItem(e),this.removeAccountKeyFromMap(e)}removeIdToken(e){super.removeIdToken(e),this.removeTokenKey(e,ge.ID_TOKEN)}async removeAccessToken(e){super.removeAccessToken(e),this.removeTokenKey(e,ge.ACCESS_TOKEN)}removeRefreshToken(e){super.removeRefreshToken(e),this.removeTokenKey(e,ge.REFRESH_TOKEN)}getTokenKeys(){this.logger.trace("BrowserCacheManager.getTokenKeys called");const e=this.getItem(`${Mo.TOKEN_KEYS}.${this.clientId}`);if(e){const t=this.validateAndParseJson(e);if(t&&t.hasOwnProperty("idToken")&&t.hasOwnProperty("accessToken")&&t.hasOwnProperty("refreshToken"))return t;this.logger.error("BrowserCacheManager.getTokenKeys - Token keys found but in an unknown format. Returning empty key map.")}else this.logger.verbose("BrowserCacheManager.getTokenKeys - No token keys found");return{idToken:[],accessToken:[],refreshToken:[]}}addTokenKey(e,t){this.logger.trace("BrowserCacheManager addTokenKey called");const r=this.getTokenKeys();switch(t){case ge.ID_TOKEN:r.idToken.indexOf(e)===-1&&(this.logger.info("BrowserCacheManager: addTokenKey - idToken added to map"),r.idToken.push(e));break;case ge.ACCESS_TOKEN:r.accessToken.indexOf(e)===-1&&(this.logger.info("BrowserCacheManager: addTokenKey - accessToken added to map"),r.accessToken.push(e));break;case ge.REFRESH_TOKEN:r.refreshToken.indexOf(e)===-1&&(this.logger.info("BrowserCacheManager: addTokenKey - refreshToken added to map"),r.refreshToken.push(e));break;default:throw this.logger.error(`BrowserCacheManager:addTokenKey - CredentialType provided invalid. CredentialType: ${t}`),Y(Zh)}this.setItem(`${Mo.TOKEN_KEYS}.${this.clientId}`,JSON.stringify(r))}removeTokenKey(e,t){this.logger.trace("BrowserCacheManager removeTokenKey called");const r=this.getTokenKeys();switch(t){case ge.ID_TOKEN:this.logger.infoPii(`BrowserCacheManager: removeTokenKey - attempting to remove idToken with key: ${e} from map`);const o=r.idToken.indexOf(e);o>-1?(this.logger.info("BrowserCacheManager: removeTokenKey - idToken removed from map"),r.idToken.splice(o,1)):this.logger.info("BrowserCacheManager: removeTokenKey - idToken does not exist in map. Either it was previously removed or it was never added.");break;case ge.ACCESS_TOKEN:this.logger.infoPii(`BrowserCacheManager: removeTokenKey - attempting to remove accessToken with key: ${e} from map`);const a=r.accessToken.indexOf(e);a>-1?(this.logger.info("BrowserCacheManager: removeTokenKey - accessToken removed from map"),r.accessToken.splice(a,1)):this.logger.info("BrowserCacheManager: removeTokenKey - accessToken does not exist in map. Either it was previously removed or it was never added.");break;case ge.REFRESH_TOKEN:this.logger.infoPii(`BrowserCacheManager: removeTokenKey - attempting to remove refreshToken with key: ${e} from map`);const l=r.refreshToken.indexOf(e);l>-1?(this.logger.info("BrowserCacheManager: removeTokenKey - refreshToken removed from map"),r.refreshToken.splice(l,1)):this.logger.info("BrowserCacheManager: removeTokenKey - refreshToken does not exist in map. Either it was previously removed or it was never added.");break;default:throw this.logger.error(`BrowserCacheManager:removeTokenKey - CredentialType provided invalid. CredentialType: ${t}`),Y(Zh)}this.setItem(`${Mo.TOKEN_KEYS}.${this.clientId}`,JSON.stringify(r))}getIdTokenCredential(e){const t=this.getItem(e);if(!t)return this.logger.trace("BrowserCacheManager.getIdTokenCredential: called, no cache hit"),this.removeTokenKey(e,ge.ID_TOKEN),null;const r=this.validateAndParseJson(t);return!r||!zv(r)?(this.logger.trace("BrowserCacheManager.getIdTokenCredential: called, no cache hit"),this.removeTokenKey(e,ge.ID_TOKEN),null):(this.logger.trace("BrowserCacheManager.getIdTokenCredential: cache hit"),r)}setIdTokenCredential(e){this.logger.trace("BrowserCacheManager.setIdTokenCredential called");const t=ma(e);this.setItem(t,JSON.stringify(e)),this.addTokenKey(t,ge.ID_TOKEN)}getAccessTokenCredential(e){const t=this.getItem(e);if(!t)return this.logger.trace("BrowserCacheManager.getAccessTokenCredential: called, no cache hit"),this.removeTokenKey(e,ge.ACCESS_TOKEN),null;const r=this.validateAndParseJson(t);return!r||!Wv(r)?(this.logger.trace("BrowserCacheManager.getAccessTokenCredential: called, no cache hit"),this.removeTokenKey(e,ge.ACCESS_TOKEN),null):(this.logger.trace("BrowserCacheManager.getAccessTokenCredential: cache hit"),r)}setAccessTokenCredential(e){this.logger.trace("BrowserCacheManager.setAccessTokenCredential called");const t=ma(e);this.setItem(t,JSON.stringify(e)),this.addTokenKey(t,ge.ACCESS_TOKEN)}getRefreshTokenCredential(e){const t=this.getItem(e);if(!t)return this.logger.trace("BrowserCacheManager.getRefreshTokenCredential: called, no cache hit"),this.removeTokenKey(e,ge.REFRESH_TOKEN),null;const r=this.validateAndParseJson(t);return!r||!Gv(r)?(this.logger.trace("BrowserCacheManager.getRefreshTokenCredential: called, no cache hit"),this.removeTokenKey(e,ge.REFRESH_TOKEN),null):(this.logger.trace("BrowserCacheManager.getRefreshTokenCredential: cache hit"),r)}setRefreshTokenCredential(e){this.logger.trace("BrowserCacheManager.setRefreshTokenCredential called");const t=ma(e);this.setItem(t,JSON.stringify(e)),this.addTokenKey(t,ge.REFRESH_TOKEN)}getAppMetadata(e){const t=this.getItem(e);if(!t)return this.logger.trace("BrowserCacheManager.getAppMetadata: called, no cache hit"),null;const r=this.validateAndParseJson(t);return!r||!kF(e,r)?(this.logger.trace("BrowserCacheManager.getAppMetadata: called, no cache hit"),null):(this.logger.trace("BrowserCacheManager.getAppMetadata: cache hit"),r)}setAppMetadata(e){this.logger.trace("BrowserCacheManager.setAppMetadata called");const t=AF(e);this.setItem(t,JSON.stringify(e))}getServerTelemetry(e){const t=this.getItem(e);if(!t)return this.logger.trace("BrowserCacheManager.getServerTelemetry: called, no cache hit"),null;const r=this.validateAndParseJson(t);return!r||!SF(e,r)?(this.logger.trace("BrowserCacheManager.getServerTelemetry: called, no cache hit"),null):(this.logger.trace("BrowserCacheManager.getServerTelemetry: cache hit"),r)}setServerTelemetry(e,t){this.logger.trace("BrowserCacheManager.setServerTelemetry called"),this.setItem(e,JSON.stringify(t))}getAuthorityMetadata(e){const t=this.internalStorage.getItem(e);if(!t)return this.logger.trace("BrowserCacheManager.getAuthorityMetadata: called, no cache hit"),null;const r=this.validateAndParseJson(t);return r&&NF(e,r)?(this.logger.trace("BrowserCacheManager.getAuthorityMetadata: cache hit"),r):null}getAuthorityMetadataKeys(){return this.internalStorage.getKeys().filter(t=>this.isAuthorityMetadata(t))}setWrapperMetadata(e,t){this.internalStorage.setItem(Qc.WRAPPER_SKU,e),this.internalStorage.setItem(Qc.WRAPPER_VER,t)}getWrapperMetadata(){const e=this.internalStorage.getItem(Qc.WRAPPER_SKU)||V.EMPTY_STRING,t=this.internalStorage.getItem(Qc.WRAPPER_VER)||V.EMPTY_STRING;return[e,t]}setAuthorityMetadata(e,t){this.logger.trace("BrowserCacheManager.setAuthorityMetadata called"),this.internalStorage.setItem(e,JSON.stringify(t))}getActiveAccount(){const e=this.generateCacheKey(Lt.ACTIVE_ACCOUNT_FILTERS),t=this.getItem(e);if(!t){this.logger.trace("BrowserCacheManager.getActiveAccount: No active account filters cache schema found, looking for legacy schema");const o=this.generateCacheKey(Lt.ACTIVE_ACCOUNT),a=this.getItem(o);if(!a)return this.logger.trace("BrowserCacheManager.getActiveAccount: No active account found"),null;const l=this.getAccountInfoFilteredBy({localAccountId:a});return l?(this.logger.trace("BrowserCacheManager.getActiveAccount: Legacy active account cache schema found"),this.logger.trace("BrowserCacheManager.getActiveAccount: Adding active account filters cache schema"),this.setActiveAccount(l),l):null}const r=this.validateAndParseJson(t);return r?(this.logger.trace("BrowserCacheManager.getActiveAccount: Active account filters schema found"),this.getAccountInfoFilteredBy({homeAccountId:r.homeAccountId,localAccountId:r.localAccountId,tenantId:r.tenantId})):(this.logger.trace("BrowserCacheManager.getActiveAccount: No active account found"),null)}setActiveAccount(e){const t=this.generateCacheKey(Lt.ACTIVE_ACCOUNT_FILTERS),r=this.generateCacheKey(Lt.ACTIVE_ACCOUNT);if(e){this.logger.verbose("setActiveAccount: Active account set");const o={homeAccountId:e.homeAccountId,localAccountId:e.localAccountId,tenantId:e.tenantId};this.browserStorage.setItem(t,JSON.stringify(o)),this.browserStorage.setItem(r,e.localAccountId)}else this.logger.verbose("setActiveAccount: No account passed, active account not set"),this.browserStorage.removeItem(t),this.browserStorage.removeItem(r)}getThrottlingCache(e){const t=this.getItem(e);if(!t)return this.logger.trace("BrowserCacheManager.getThrottlingCache: called, no cache hit"),null;const r=this.validateAndParseJson(t);return!r||!IF(e,r)?(this.logger.trace("BrowserCacheManager.getThrottlingCache: called, no cache hit"),null):(this.logger.trace("BrowserCacheManager.getThrottlingCache: cache hit"),r)}setThrottlingCache(e,t){this.logger.trace("BrowserCacheManager.setThrottlingCache called"),this.setItem(e,JSON.stringify(t))}getTemporaryCache(e,t){const r=t?this.generateCacheKey(e):e;if(this.cacheConfig.storeAuthStateInCookie){const a=this.cookieStorage.getItem(r);if(a)return this.logger.trace("BrowserCacheManager.getTemporaryCache: storeAuthStateInCookies set to true, retrieving from cookies"),a}const o=this.temporaryCacheStorage.getItem(r);if(!o){if(this.cacheConfig.cacheLocation===vn.LocalStorage){const a=this.browserStorage.getItem(r);if(a)return this.logger.trace("BrowserCacheManager.getTemporaryCache: Temporary cache item found in local storage"),a}return this.logger.trace("BrowserCacheManager.getTemporaryCache: No cache item found in local storage"),null}return this.logger.trace("BrowserCacheManager.getTemporaryCache: Temporary cache item returned"),o}setTemporaryCache(e,t,r){const o=r?this.generateCacheKey(e):e;this.temporaryCacheStorage.setItem(o,t),this.cacheConfig.storeAuthStateInCookie&&(this.logger.trace("BrowserCacheManager.setTemporaryCache: storeAuthStateInCookie set to true, setting item cookie"),this.cookieStorage.setItem(o,t,void 0,this.cacheConfig.secureCookies))}removeItem(e){this.browserStorage.removeItem(e)}removeTemporaryItem(e){this.temporaryCacheStorage.removeItem(e),this.cacheConfig.storeAuthStateInCookie&&(this.logger.trace("BrowserCacheManager.removeItem: storeAuthStateInCookie is true, clearing item cookie"),this.cookieStorage.removeItem(e))}getKeys(){return this.browserStorage.getKeys()}async clear(){await this.removeAllAccounts(),this.removeAppMetadata(),this.temporaryCacheStorage.getKeys().forEach(e=>{(e.indexOf(V.CACHE_PREFIX)!==-1||e.indexOf(this.clientId)!==-1)&&this.removeTemporaryItem(e)}),this.browserStorage.getKeys().forEach(e=>{(e.indexOf(V.CACHE_PREFIX)!==-1||e.indexOf(this.clientId)!==-1)&&this.browserStorage.removeItem(e)}),this.internalStorage.clear()}async clearTokensAndKeysWithClaims(e,t){e.addQueueMeasurement(x.ClearTokensAndKeysWithClaims,t);const r=this.getTokenKeys(),o=[];r.accessToken.forEach(a=>{const l=this.getAccessTokenCredential(a);l!=null&&l.requestedClaimsHash&&a.includes(l.requestedClaimsHash.toLowerCase())&&o.push(this.removeAccessToken(a))}),await Promise.all(o),o.length>0&&this.logger.warning(`${o.length} access tokens with claims in the cache keys have been removed from the cache.`)}generateCacheKey(e){return this.validateAndParseJson(e)?JSON.stringify(e):Cr.startsWith(e,V.CACHE_PREFIX)||Cr.startsWith(e,Lt.ADAL_ID_TOKEN)?e:`${V.CACHE_PREFIX}.${this.clientId}.${e}`}generateAuthorityKey(e){const{libraryState:{id:t}}=Er.parseRequestState(this.cryptoImpl,e);return this.generateCacheKey(`${Ke.AUTHORITY}.${t}`)}generateNonceKey(e){const{libraryState:{id:t}}=Er.parseRequestState(this.cryptoImpl,e);return this.generateCacheKey(`${Ke.NONCE_IDTOKEN}.${t}`)}generateStateKey(e){const{libraryState:{id:t}}=Er.parseRequestState(this.cryptoImpl,e);return this.generateCacheKey(`${Ke.REQUEST_STATE}.${t}`)}getCachedAuthority(e){const t=this.generateStateKey(e),r=this.getTemporaryCache(t);if(!r)return null;const o=this.generateAuthorityKey(r);return this.getTemporaryCache(o)}updateCacheEntries(e,t,r,o,a){this.logger.trace("BrowserCacheManager.updateCacheEntries called");const l=this.generateStateKey(e);this.setTemporaryCache(l,e,!1);const d=this.generateNonceKey(e);this.setTemporaryCache(d,t,!1);const h=this.generateAuthorityKey(e);if(this.setTemporaryCache(h,r,!1),a){const f={credential:a.homeAccountId,type:Bn.HOME_ACCOUNT_ID};this.setTemporaryCache(Ke.CCS_CREDENTIAL,JSON.stringify(f),!0)}else if(o){const f={credential:o,type:Bn.UPN};this.setTemporaryCache(Ke.CCS_CREDENTIAL,JSON.stringify(f),!0)}}resetRequestCache(e){this.logger.trace("BrowserCacheManager.resetRequestCache called"),e&&(this.temporaryCacheStorage.getKeys().forEach(t=>{t.indexOf(e)!==-1&&this.removeTemporaryItem(t)}),this.removeTemporaryItem(this.generateStateKey(e)),this.removeTemporaryItem(this.generateNonceKey(e)),this.removeTemporaryItem(this.generateAuthorityKey(e))),this.removeTemporaryItem(this.generateCacheKey(Ke.REQUEST_PARAMS)),this.removeTemporaryItem(this.generateCacheKey(Ke.ORIGIN_URI)),this.removeTemporaryItem(this.generateCacheKey(Ke.URL_HASH)),this.removeTemporaryItem(this.generateCacheKey(Ke.CORRELATION_ID)),this.removeTemporaryItem(this.generateCacheKey(Ke.CCS_CREDENTIAL)),this.removeTemporaryItem(this.generateCacheKey(Ke.NATIVE_REQUEST)),this.setInteractionInProgress(!1)}cleanRequestByState(e){if(this.logger.trace("BrowserCacheManager.cleanRequestByState called"),e){const t=this.generateStateKey(e),r=this.temporaryCacheStorage.getItem(t);this.logger.infoPii(`BrowserCacheManager.cleanRequestByState: Removing temporary cache items for state: ${r}`),this.resetRequestCache(r||V.EMPTY_STRING)}}cleanRequestByInteractionType(e){this.logger.trace("BrowserCacheManager.cleanRequestByInteractionType called"),this.temporaryCacheStorage.getKeys().forEach(t=>{if(t.indexOf(Ke.REQUEST_STATE)===-1)return;const r=this.temporaryCacheStorage.getItem(t);if(!r)return;const o=MT(this.cryptoImpl,r);o&&o.interactionType===e&&(this.logger.infoPii(`BrowserCacheManager.cleanRequestByInteractionType: Removing temporary cache items for state: ${r}`),this.resetRequestCache(r))}),this.setInteractionInProgress(!1)}cacheCodeRequest(e){this.logger.trace("BrowserCacheManager.cacheCodeRequest called");const t=Em(JSON.stringify(e));this.setTemporaryCache(Ke.REQUEST_PARAMS,t,!0)}getCachedRequest(e){this.logger.trace("BrowserCacheManager.getCachedRequest called");const t=this.getTemporaryCache(Ke.REQUEST_PARAMS,!0);if(!t)throw ie(cT);let r;try{r=JSON.parse(Kr(t))}catch(o){throw this.logger.errorPii(`Attempted to parse: ${t}`),this.logger.error(`Parsing cached token request threw with error: ${o}`),ie(lT)}if(this.removeTemporaryItem(this.generateCacheKey(Ke.REQUEST_PARAMS)),!r.authority){const o=this.generateAuthorityKey(e),a=this.getTemporaryCache(o);if(!a)throw ie(vm);r.authority=a}return r}getCachedNativeRequest(){this.logger.trace("BrowserCacheManager.getCachedNativeRequest called");const e=this.getTemporaryCache(Ke.NATIVE_REQUEST,!0);if(!e)return this.logger.trace("BrowserCacheManager.getCachedNativeRequest: No cached native request found"),null;const t=this.validateAndParseJson(e);return t||(this.logger.error("BrowserCacheManager.getCachedNativeRequest: Unable to parse native request"),null)}isInteractionInProgress(e){const t=this.getInteractionInProgress();return e?t===this.clientId:!!t}getInteractionInProgress(){const e=`${V.CACHE_PREFIX}.${Ke.INTERACTION_STATUS_KEY}`;return this.getTemporaryCache(e,!1)}setInteractionInProgress(e){const t=`${V.CACHE_PREFIX}.${Ke.INTERACTION_STATUS_KEY}`;if(e){if(this.getInteractionInProgress())throw ie(eT);this.setTemporaryCache(t,this.clientId,!1)}else!e&&this.getInteractionInProgress()===this.clientId&&this.removeTemporaryItem(t)}getLegacyLoginHint(){const e=this.getTemporaryCache(Lt.ADAL_ID_TOKEN);e&&(this.browserStorage.removeItem(Lt.ADAL_ID_TOKEN),this.logger.verbose("Cached ADAL id token retrieved."));const t=this.getTemporaryCache(Lt.ID_TOKEN,!0);t&&(this.browserStorage.removeItem(this.generateCacheKey(Lt.ID_TOKEN)),this.logger.verbose("Cached MSAL.js v1 id token retrieved"));const r=t||e;if(r){const o=ki(r,Kr);if(o.preferred_username)return this.logger.verbose("No SSO params used and ADAL/MSAL v1 token retrieved, setting ADAL/MSAL v1 preferred_username as loginHint"),o.preferred_username;if(o.upn)return this.logger.verbose("No SSO params used and ADAL/MSAL v1 token retrieved, setting ADAL/MSAL v1 upn as loginHint"),o.upn;this.logger.verbose("No SSO params used and ADAL/MSAL v1 token retrieved, however, no account hint claim found. Enable preferred_username or upn id token claim to get SSO.")}return null}updateCredentialCacheKey(e,t){const r=ma(t);if(e!==r){const o=this.getItem(e);if(o)return this.browserStorage.removeItem(e),this.setItem(r,o),this.logger.verbose(`Updated an outdated ${t.credentialType} cache key`),r;this.logger.error(`Attempted to update an outdated ${t.credentialType} cache key but no item matching the outdated key was found in storage`)}return e}async hydrateCache(e,t){var d,h,f;const r=cu((d=e.account)==null?void 0:d.homeAccountId,(h=e.account)==null?void 0:h.environment,e.idToken,this.clientId,e.tenantId);let o;t.claims&&(o=await this.cryptoImpl.hashString(t.claims));const a=lu((f=e.account)==null?void 0:f.homeAccountId,e.account.environment,e.accessToken,this.clientId,e.tenantId,e.scopes.join(" "),e.expiresOn?e.expiresOn.getTime()/1e3:0,e.extExpiresOn?e.extExpiresOn.getTime()/1e3:0,Kr,void 0,e.tokenType,void 0,t.sshKid,t.claims,o),l={idToken:r,accessToken:a};return this.saveCacheRecord(l)}async saveCacheRecord(e,t,r){try{await super.saveCacheRecord(e,t,r)}catch(o){if(o instanceof va&&this.performanceClient&&r)try{const a=this.getTokenKeys();this.performanceClient.addFields({cacheRtCount:a.refreshToken.length,cacheIdCount:a.idToken.length,cacheAtCount:a.accessToken.length},r)}catch{}throw o}}}const BH=(n,e)=>{const t={cacheLocation:vn.MemoryStorage,temporaryCacheLocation:vn.MemoryStorage,storeAuthStateInCookie:!1,secureCookies:!1,cacheMigrationEnabled:!1,claimsBasedCachingEnabled:!1};return new hf(n,t,Pl,e)};/*! @azure/msal-browser v3.28.1 2025-01-14 */function VH(n,e,t,r){return n.verbose("getAllAccounts called"),t?e.getAllAccounts(r):[]}function FH(n,e,t){if(e.trace("getAccount called"),Object.keys(n).length===0)return e.warning("getAccount: No accountFilter provided"),null;const r=t.getAccountInfoFilteredBy(n);return r?(e.verbose("getAccount: Account matching provided filter found, returning"),r):(e.verbose("getAccount: No matching account found, returning null"),null)}function HH(n,e,t){if(e.trace("getAccountByUsername called"),!n)return e.warning("getAccountByUsername: No username provided"),null;const r=t.getAccountInfoFilteredBy({username:n});return r?(e.verbose("getAccountByUsername: Account matching username found, returning"),e.verbosePii(`getAccountByUsername: Returning signed-in accounts matching username: ${n}`),r):(e.verbose("getAccountByUsername: No matching account found, returning null"),null)}function $H(n,e,t){if(e.trace("getAccountByHomeId called"),!n)return e.warning("getAccountByHomeId: No homeAccountId provided"),null;const r=t.getAccountInfoFilteredBy({homeAccountId:n});return r?(e.verbose("getAccountByHomeId: Account matching homeAccountId found, returning"),e.verbosePii(`getAccountByHomeId: Returning signed-in accounts matching homeAccountId: ${n}`),r):(e.verbose("getAccountByHomeId: No matching account found, returning null"),null)}function KH(n,e,t){if(e.trace("getAccountByLocalId called"),!n)return e.warning("getAccountByLocalId: No localAccountId provided"),null;const r=t.getAccountInfoFilteredBy({localAccountId:n});return r?(e.verbose("getAccountByLocalId: Account matching localAccountId found, returning"),e.verbosePii(`getAccountByLocalId: Returning signed-in accounts matching localAccountId: ${n}`),r):(e.verbose("getAccountByLocalId: No matching account found, returning null"),null)}function WH(n,e){e.setActiveAccount(n)}function zH(n){return n.getActiveAccount()}/*! @azure/msal-browser v3.28.1 2025-01-14 */const me={INITIALIZE_START:"msal:initializeStart",INITIALIZE_END:"msal:initializeEnd",ACCOUNT_ADDED:"msal:accountAdded",ACCOUNT_REMOVED:"msal:accountRemoved",ACTIVE_ACCOUNT_CHANGED:"msal:activeAccountChanged",LOGIN_START:"msal:loginStart",LOGIN_SUCCESS:"msal:loginSuccess",LOGIN_FAILURE:"msal:loginFailure",ACQUIRE_TOKEN_START:"msal:acquireTokenStart",ACQUIRE_TOKEN_SUCCESS:"msal:acquireTokenSuccess",ACQUIRE_TOKEN_FAILURE:"msal:acquireTokenFailure",ACQUIRE_TOKEN_NETWORK_START:"msal:acquireTokenFromNetworkStart",SSO_SILENT_START:"msal:ssoSilentStart",SSO_SILENT_SUCCESS:"msal:ssoSilentSuccess",SSO_SILENT_FAILURE:"msal:ssoSilentFailure",ACQUIRE_TOKEN_BY_CODE_START:"msal:acquireTokenByCodeStart",ACQUIRE_TOKEN_BY_CODE_SUCCESS:"msal:acquireTokenByCodeSuccess",ACQUIRE_TOKEN_BY_CODE_FAILURE:"msal:acquireTokenByCodeFailure",HANDLE_REDIRECT_START:"msal:handleRedirectStart",HANDLE_REDIRECT_END:"msal:handleRedirectEnd",POPUP_OPENED:"msal:popupOpened",LOGOUT_START:"msal:logoutStart",LOGOUT_SUCCESS:"msal:logoutSuccess",LOGOUT_FAILURE:"msal:logoutFailure",LOGOUT_END:"msal:logoutEnd",RESTORE_FROM_BFCACHE:"msal:restoreFromBFCache"};/*! @azure/msal-browser v3.28.1 2025-01-14 */class GH{constructor(e){this.eventCallbacks=new Map,this.logger=e||new Wo({})}addEventCallback(e,t,r){if(typeof window<"u"){const o=r||TH();return this.eventCallbacks.has(o)?(this.logger.error(`Event callback with id: ${o} is already registered. Please provide a unique id or remove the existing callback and try again.`),null):(this.eventCallbacks.set(o,[e,t||[]]),this.logger.verbose(`Event callback registered with id: ${o}`),o)}return null}removeEventCallback(e){this.eventCallbacks.delete(e),this.logger.verbose(`Event callback ${e} removed.`)}emitEvent(e,t,r,o){if(typeof window<"u"){const a={eventType:e,interactionType:t||null,payload:r||null,error:o||null,timestamp:Date.now()};this.eventCallbacks.forEach(([l,d],h)=>{(d.length===0||d.includes(e))&&(this.logger.verbose(`Emitting event to callback ${h}: ${e}`),l.apply(null,[a]))})}}}/*! @azure/msal-browser v3.28.1 2025-01-14 */class DT{constructor(e,t,r,o,a,l,d,h,f){this.config=e,this.browserStorage=t,this.browserCrypto=r,this.networkClient=this.config.system.networkClient,this.eventHandler=a,this.navigationClient=l,this.nativeMessageHandler=h,this.correlationId=f||po(),this.logger=o.clone(Dn.MSAL_SKU,vu,this.correlationId),this.performanceClient=d}async clearCacheOnLogout(e){if(e){Pt.accountInfoIsEqual(e,this.browserStorage.getActiveAccount(),!1)&&(this.logger.verbose("Setting active account to null"),this.browserStorage.setActiveAccount(null));try{await this.browserStorage.removeAccount(Pt.generateAccountCacheKey(e)),this.logger.verbose("Cleared cache items belonging to the account provided in the logout request.")}catch{this.logger.error("Account provided in logout request was not found. Local cache unchanged.")}}else try{this.logger.verbose("No account provided in logout request, clearing all cache items.",this.correlationId),await this.browserStorage.clear(),await this.browserCrypto.clearKeystore()}catch{this.logger.error("Attempted to clear all MSAL cache items and failed. Local cache unchanged.")}}getRedirectUri(e){this.logger.verbose("getRedirectUri called");const t=e||this.config.auth.redirectUri;return De.getAbsoluteUrl(t,lo())}initializeServerTelemetryManager(e,t){this.logger.verbose("initializeServerTelemetryManager called");const r={clientId:this.config.auth.clientId,correlationId:this.correlationId,apiId:e,forceRefresh:t||!1,wrapperSKU:this.browserStorage.getWrapperMetadata()[0],wrapperVer:this.browserStorage.getWrapperMetadata()[1]};return new Ds(r,this.browserStorage)}async getDiscoveredAuthority(e){const{account:t}=e,r=e.requestExtraQueryParameters&&e.requestExtraQueryParameters.hasOwnProperty("instance_aware")?e.requestExtraQueryParameters.instance_aware:void 0;this.performanceClient.addQueueMeasurement(x.StandardInteractionClientGetDiscoveredAuthority,this.correlationId);const o={protocolMode:this.config.auth.protocolMode,OIDCOptions:this.config.auth.OIDCOptions,knownAuthorities:this.config.auth.knownAuthorities,cloudDiscoveryMetadata:this.config.auth.cloudDiscoveryMetadata,authorityMetadata:this.config.auth.authorityMetadata,skipAuthorityMetadataCache:this.config.auth.skipAuthorityMetadataCache},a=e.requestAuthority||this.config.auth.authority,l=r!=null&&r.length?r==="true":this.config.auth.instanceAware,d=t&&l?this.config.auth.authority.replace(De.getDomainFromUrl(a),t.environment):a,h=Xt.generateAuthority(d,e.requestAzureCloudOptions||this.config.auth.azureCloudOptions),f=await Q(Kw,x.AuthorityFactoryCreateDiscoveredInstance,this.logger,this.performanceClient,this.correlationId)(h,this.config.system.networkClient,this.browserStorage,o,this.logger,this.correlationId,this.performanceClient);if(t&&!f.isAlias(t.environment))throw Ze(Dw);return f}}/*! @azure/msal-browser v3.28.1 2025-01-14 */const qH=32;async function jH(n,e,t){n.addQueueMeasurement(x.GeneratePkceCodes,t);const r=Ni(YH,x.GenerateCodeVerifier,e,n,t)(n,e,t),o=await Q(JH,x.GenerateCodeChallengeFromVerifier,e,n,t)(r,n,e,t);return{verifier:r,challenge:o}}function YH(n,e,t){try{const r=new Uint8Array(qH);return Ni(hH,x.GetRandomValues,e,n,t)(r),_u(r)}catch{throw ie(pm)}}async function JH(n,e,t,r){e.addQueueMeasurement(x.GenerateCodeChallengeFromVerifier,r);try{const o=await Q(kT,x.Sha256Digest,t,e,r)(n,e,r);return _u(new Uint8Array(o))}catch{throw ie(pm)}}/*! @azure/msal-browser v3.28.1 2025-01-14 */async function km(n,e,t,r){t.addQueueMeasurement(x.InitializeBaseRequest,n.correlationId);const o=n.authority||e.auth.authority,a=[...n&&n.scopes||[]],l={...n,correlationId:n.correlationId,authority:o,scopes:a};if(!l.authenticationScheme)l.authenticationScheme=je.BEARER,r.verbose(`Authentication Scheme wasn't explicitly set in request, defaulting to "Bearer" request`);else{if(l.authenticationScheme===je.SSH){if(!n.sshJwk)throw Ze(uu);if(!n.sshKid)throw Ze(Ow)}r.verbose(`Authentication Scheme set to "${l.authenticationScheme}" as configured in Auth request`)}return e.cache.claimsBasedCachingEnabled&&n.claims&&!Cr.isEmptyObj(n.claims)&&(l.requestedClaimsHash=await NT(n.claims)),l}async function QH(n,e,t,r,o){r.addQueueMeasurement(x.InitializeSilentRequest,n.correlationId);const a=await Q(km,x.InitializeBaseRequest,o,r,n.correlationId)(n,t,r,o);return{...n,...a,account:e,forceRefresh:n.forceRefresh||!1}}/*! @azure/msal-browser v3.28.1 2025-01-14 */class La extends DT{async initializeAuthorizationCodeRequest(e){this.performanceClient.addQueueMeasurement(x.StandardInteractionClientInitializeAuthorizationCodeRequest,this.correlationId);const t=await Q(jH,x.GeneratePkceCodes,this.logger,this.performanceClient,this.correlationId)(this.performanceClient,this.logger,this.correlationId),r={...e,redirectUri:e.redirectUri,code:V.EMPTY_STRING,codeVerifier:t.verifier};return e.codeChallenge=t.challenge,e.codeChallengeMethod=V.S256_CODE_CHALLENGE_METHOD,r}initializeLogoutRequest(e){this.logger.verbose("initializeLogoutRequest called",e==null?void 0:e.correlationId);const t={correlationId:this.correlationId||po(),...e};if(e)if(e.logoutHint)this.logger.verbose("logoutHint has already been set in logoutRequest");else if(e.account){const r=this.getLogoutHintFromIdTokenClaims(e.account);r&&(this.logger.verbose("Setting logoutHint to login_hint ID Token Claim value for the account provided"),t.logoutHint=r)}else this.logger.verbose("logoutHint was not set and account was not passed into logout request, logoutHint will not be set");else this.logger.verbose("logoutHint will not be set since no logout request was configured");return!e||e.postLogoutRedirectUri!==null?e&&e.postLogoutRedirectUri?(this.logger.verbose("Setting postLogoutRedirectUri to uri set on logout request",t.correlationId),t.postLogoutRedirectUri=De.getAbsoluteUrl(e.postLogoutRedirectUri,lo())):this.config.auth.postLogoutRedirectUri===null?this.logger.verbose("postLogoutRedirectUri configured as null and no uri set on request, not passing post logout redirect",t.correlationId):this.config.auth.postLogoutRedirectUri?(this.logger.verbose("Setting postLogoutRedirectUri to configured uri",t.correlationId),t.postLogoutRedirectUri=De.getAbsoluteUrl(this.config.auth.postLogoutRedirectUri,lo())):(this.logger.verbose("Setting postLogoutRedirectUri to current page",t.correlationId),t.postLogoutRedirectUri=De.getAbsoluteUrl(lo(),lo())):this.logger.verbose("postLogoutRedirectUri passed as null, not setting post logout redirect uri",t.correlationId),t}getLogoutHintFromIdTokenClaims(e){const t=e.idTokenClaims;if(t){if(t.login_hint)return t.login_hint;this.logger.verbose("The ID Token Claims tied to the provided account do not contain a login_hint claim, logoutHint will not be added to logout request")}else this.logger.verbose("The provided account does not contain ID Token Claims, logoutHint will not be added to logout request");return null}async createAuthCodeClient(e){this.performanceClient.addQueueMeasurement(x.StandardInteractionClientCreateAuthCodeClient,this.correlationId);const t=await Q(this.getClientConfiguration.bind(this),x.StandardInteractionClientGetClientConfiguration,this.logger,this.performanceClient,this.correlationId)(e);return new Gw(t,this.performanceClient)}async getClientConfiguration(e){const{serverTelemetryManager:t,requestAuthority:r,requestAzureCloudOptions:o,requestExtraQueryParameters:a,account:l}=e;this.performanceClient.addQueueMeasurement(x.StandardInteractionClientGetClientConfiguration,this.correlationId);const d=await Q(this.getDiscoveredAuthority.bind(this),x.StandardInteractionClientGetDiscoveredAuthority,this.logger,this.performanceClient,this.correlationId)({requestAuthority:r,requestAzureCloudOptions:o,requestExtraQueryParameters:a,account:l}),h=this.config.system.loggerOptions;return{authOptions:{clientId:this.config.auth.clientId,authority:d,clientCapabilities:this.config.auth.clientCapabilities,redirectUri:this.config.auth.redirectUri},systemOptions:{tokenRenewalOffsetSeconds:this.config.system.tokenRenewalOffsetSeconds,preventCorsPreflight:!0},loggerOptions:{loggerCallback:h.loggerCallback,piiLoggingEnabled:h.piiLoggingEnabled,logLevel:h.logLevel,correlationId:this.correlationId},cacheOptions:{claimsBasedCachingEnabled:this.config.cache.claimsBasedCachingEnabled},cryptoInterface:this.browserCrypto,networkInterface:this.networkClient,storageInterface:this.browserStorage,serverTelemetryManager:t,libraryInfo:{sku:Dn.MSAL_SKU,version:vu,cpu:V.EMPTY_STRING,os:V.EMPTY_STRING},telemetry:this.config.telemetry}}async initializeAuthorizationRequest(e,t){this.performanceClient.addQueueMeasurement(x.StandardInteractionClientInitializeAuthorizationRequest,this.correlationId);const r=this.getRedirectUri(e.redirectUri),o={interactionType:t},a=Er.setRequestState(this.browserCrypto,e&&e.state||V.EMPTY_STRING,o),d={...await Q(km,x.InitializeBaseRequest,this.logger,this.performanceClient,this.correlationId)({...e,correlationId:this.correlationId},this.config,this.performanceClient,this.logger),redirectUri:r,state:a,nonce:e.nonce||po(),responseMode:this.config.auth.OIDCOptions.serverResponseType};if(e.loginHint||e.sid)return d;const h=e.account||this.browserStorage.getActiveAccount();if(h&&(this.logger.verbose("Setting validated request account",this.correlationId),this.logger.verbosePii(`Setting validated request account: ${h.homeAccountId}`,this.correlationId),d.account=h),!d.loginHint&&!h){const f=this.browserStorage.getLegacyLoginHint();f&&(d.loginHint=f)}return d}}/*! @azure/msal-browser v3.28.1 2025-01-14 */const XH="ContentError",LT="user_switch";/*! @azure/msal-browser v3.28.1 2025-01-14 */const ZH="USER_INTERACTION_REQUIRED",e$="USER_CANCEL",t$="NO_NETWORK",n$="PERSISTENT_ERROR",r$="DISABLED",o$="ACCOUNT_UNAVAILABLE";/*! @azure/msal-browser v3.28.1 2025-01-14 */const i$=-2147186943,a$={[LT]:"User attempted to switch accounts in the native broker, which is not allowed. All new accounts must sign-in through the standard web flow first, please try again."};class Br extends lt{constructor(e,t,r){super(e,t),Object.setPrototypeOf(this,Br.prototype),this.name="NativeAuthError",this.ext=r}}function la(n){if(n.ext&&n.ext.status&&(n.ext.status===n$||n.ext.status===r$)||n.ext&&n.ext.error&&n.ext.error===i$)return!0;switch(n.errorCode){case XH:return!0;default:return!1}}function ff(n,e,t){if(t&&t.status)switch(t.status){case o$:return rf(Ww);case ZH:return new Tr(n,e);case e$:return ie(Ii);case t$:return ie(Bl)}return new Br(n,a$[n]||e,t)}/*! @azure/msal-browser v3.28.1 2025-01-14 */class xT extends La{async acquireToken(e){this.performanceClient.addQueueMeasurement(x.SilentCacheClientAcquireToken,e.correlationId);const t=this.initializeServerTelemetryManager(it.acquireTokenSilent_silentFlow),r=await Q(this.getClientConfiguration.bind(this),x.StandardInteractionClientGetClientConfiguration,this.logger,this.performanceClient,this.correlationId)({serverTelemetryManager:t,requestAuthority:e.authority,requestAzureCloudOptions:e.azureCloudOptions,account:e.account}),o=new W2(r,this.performanceClient);this.logger.verbose("Silent auth client created");try{const l=(await Q(o.acquireCachedToken.bind(o),x.SilentFlowClientAcquireCachedToken,this.logger,this.performanceClient,e.correlationId)(e))[0];return this.performanceClient.addFields({fromCache:!0},e.correlationId),l}catch(a){throw a instanceof js&&a.errorCode===ym&&this.logger.verbose("Signing keypair for bound access token not found. Refreshing bound access token and generating a new crypto keypair."),a}}logout(e){this.logger.verbose("logoutRedirect called");const t=this.initializeLogoutRequest(e);return this.clearCacheOnLogout(t==null?void 0:t.account)}}/*! @azure/msal-browser v3.28.1 2025-01-14 */class ya extends DT{constructor(e,t,r,o,a,l,d,h,f,g,_,p){var C;super(e,t,r,o,a,l,h,f,p),this.apiId=d,this.accountId=g,this.nativeMessageHandler=f,this.nativeStorageManager=_,this.silentCacheClient=new xT(e,this.nativeStorageManager,r,o,a,l,h,f,p),this.serverTelemetryManager=this.initializeServerTelemetryManager(this.apiId);const w=this.nativeMessageHandler.getExtensionId()===pa.PREFERRED_EXTENSION_ID?"chrome":(C=this.nativeMessageHandler.getExtensionId())!=null&&C.length?"unknown":void 0;this.skus=Ds.makeExtraSkuString({libraryName:Dn.MSAL_SKU,libraryVersion:vu,extensionName:w,extensionVersion:this.nativeMessageHandler.getExtensionVersion()})}addRequestSKUs(e){e.extraParameters={...e.extraParameters,[A2]:this.skus}}async acquireToken(e){this.performanceClient.addQueueMeasurement(x.NativeInteractionClientAcquireToken,e.correlationId),this.logger.trace("NativeInteractionClient - acquireToken called.");const t=this.performanceClient.startMeasurement(x.NativeInteractionClientAcquireToken,e.correlationId),r=zr();try{const o=await this.initializeNativeRequest(e);try{const f=await this.acquireTokensFromCache(this.accountId,o);return t.end({success:!0,isNativeBroker:!1,fromCache:!0}),f}catch{this.logger.info("MSAL internal Cache does not contain tokens, proceed to make a native call")}const{...a}=o,l={method:_i.GetToken,request:a},d=await this.nativeMessageHandler.sendMessage(l),h=this.validateNativeResponse(d);return await this.handleNativeResponse(h,o,r).then(f=>(t.end({success:!0,isNativeBroker:!0,requestId:f.requestId}),this.serverTelemetryManager.clearNativeBrokerErrorCode(),f)).catch(f=>{throw t.end({success:!1,errorCode:f.errorCode,subErrorCode:f.subError,isNativeBroker:!0}),f})}catch(o){throw o instanceof Br&&this.serverTelemetryManager.setNativeBrokerErrorCode(o.errorCode),o}}createSilentCacheRequest(e,t){return{authority:e.authority,correlationId:this.correlationId,scopes:_t.fromString(e.scope).asArray(),account:t,forceRefresh:!1}}async acquireTokensFromCache(e,t){if(!e)throw this.logger.warning("NativeInteractionClient:acquireTokensFromCache - No nativeAccountId provided"),Y(Qh);const r=this.browserStorage.getBaseAccountInfo({nativeAccountId:e});if(!r)throw Y(Qh);try{const o=this.createSilentCacheRequest(t,r),a=await this.silentCacheClient.acquireToken(o),l={...r,idTokenClaims:a==null?void 0:a.idTokenClaims,idToken:a==null?void 0:a.idToken};return{...a,account:l}}catch(o){throw o}}async acquireTokenRedirect(e,t){this.logger.trace("NativeInteractionClient - acquireTokenRedirect called.");const{...r}=e;delete r.onRedirectNavigate;const o=await this.initializeNativeRequest(r),a={method:_i.GetToken,request:o};try{const h=await this.nativeMessageHandler.sendMessage(a);this.validateNativeResponse(h)}catch(h){if(h instanceof Br&&(this.serverTelemetryManager.setNativeBrokerErrorCode(h.errorCode),la(h)))throw h}this.browserStorage.setTemporaryCache(Ke.NATIVE_REQUEST,JSON.stringify(o),!0);const l={apiId:it.acquireTokenRedirect,timeout:this.config.system.redirectNavigationTimeout,noHistory:!1},d=this.config.auth.navigateToLoginRequestUrl?window.location.href:this.getRedirectUri(e.redirectUri);t.end({success:!0}),await this.navigationClient.navigateExternal(d,l)}async handleRedirectPromise(e,t){if(this.logger.trace("NativeInteractionClient - handleRedirectPromise called."),!this.browserStorage.isInteractionInProgress(!0))return this.logger.info("handleRedirectPromise called but there is no interaction in progress, returning null."),null;const r=this.browserStorage.getCachedNativeRequest();if(!r)return this.logger.verbose("NativeInteractionClient - handleRedirectPromise called but there is no cached request, returning null."),e&&t&&(e==null||e.addFields({errorCode:"no_cached_request"},t)),null;const{prompt:o,...a}=r;o&&this.logger.verbose("NativeInteractionClient - handleRedirectPromise called and prompt was included in the original request, removing prompt from cached request to prevent second interaction with native broker window."),this.browserStorage.removeItem(this.browserStorage.generateCacheKey(Ke.NATIVE_REQUEST));const l={method:_i.GetToken,request:a},d=zr();try{this.logger.verbose("NativeInteractionClient - handleRedirectPromise sending message to native broker.");const h=await this.nativeMessageHandler.sendMessage(l);this.validateNativeResponse(h);const f=this.handleNativeResponse(h,a,d);this.browserStorage.setInteractionInProgress(!1);const g=await f;return this.serverTelemetryManager.clearNativeBrokerErrorCode(),g}catch(h){throw this.browserStorage.setInteractionInProgress(!1),h}}logout(){return this.logger.trace("NativeInteractionClient - logout called."),Promise.reject("Logout not implemented yet")}async handleNativeResponse(e,t,r){var g;this.logger.trace("NativeInteractionClient - handleNativeResponse called.");const o=ki(e.id_token,Kr),a=this.createHomeAccountIdentifier(e,o),l=(g=this.browserStorage.getAccountInfoFilteredBy({nativeAccountId:t.accountId}))==null?void 0:g.homeAccountId;if(a!==l&&e.account.id!==t.accountId)throw ff(LT);const d=await this.getDiscoveredAuthority({requestAuthority:t.authority}),h=fm(this.browserStorage,d,a,Kr,o,e.client_info,void 0,o.tid,void 0,e.account.id,this.logger),f=await this.generateAuthenticationResult(e,t,o,h,d.canonicalAuthority,r);return this.cacheAccount(h),this.cacheNativeTokens(e,t,a,o,e.access_token,f.tenantId,r),f}createHomeAccountIdentifier(e,t){return Pt.generateHomeAccountId(e.client_info||V.EMPTY_STRING,pr.Default,this.logger,this.browserCrypto,t)}generateScopes(e,t){return e.scope?_t.fromString(e.scope):_t.fromString(t.scope)}async generatePopAccessToken(e,t){if(t.tokenType===je.POP&&t.signPopToken){if(e.shr)return this.logger.trace("handleNativeServerResponse: SHR is enabled in native layer"),e.shr;const r=new Aa(this.browserCrypto),o={resourceRequestMethod:t.resourceRequestMethod,resourceRequestUri:t.resourceRequestUri,shrClaims:t.shrClaims,shrNonce:t.shrNonce};if(!t.keyId)throw Y(Xf);return r.signPopToken(e.access_token,t.keyId,o)}else return e.access_token}async generateAuthenticationResult(e,t,r,o,a,l){const d=this.addTelemetryFromNativeResponse(e),h=e.scope?_t.fromString(e.scope):_t.fromString(t.scope),f=e.account.properties||{},g=f.UID||r.oid||r.sub||V.EMPTY_STRING,_=f.TenantId||r.tid||V.EMPTY_STRING,p=sm(o.getAccountInfo(),void 0,r,e.id_token);p.nativeAccountId!==e.account.id&&(p.nativeAccountId=e.account.id);const w=await this.generatePopAccessToken(e,t),C=t.tokenType===je.POP?je.POP:je.BEARER;return{authority:a,uniqueId:g,tenantId:_,scopes:h.asArray(),account:p,idToken:e.id_token,idTokenClaims:r,accessToken:w,fromCache:d?this.isResponseFromCache(d):!1,expiresOn:new Date(Number(l+e.expires_in)*1e3),tokenType:C,correlationId:this.correlationId,state:e.state,fromNativeBroker:!0}}cacheAccount(e){this.browserStorage.setAccount(e),this.browserStorage.removeAccountContext(e).catch(t=>{this.logger.error(`Error occurred while removing account context from browser storage. ${t}`)})}cacheNativeTokens(e,t,r,o,a,l,d){const h=cu(r,t.authority,e.id_token||"",t.clientId,o.tid||""),f=t.tokenType===je.POP?V.SHR_NONCE_VALIDITY:(typeof e.expires_in=="string"?parseInt(e.expires_in,10):e.expires_in)||0,g=d+f,_=this.generateScopes(e,t),p=lu(r,t.authority,a,t.clientId,o.tid||l,_.printScopes(),g,0,Kr,void 0,t.tokenType,void 0,t.keyId),w={idToken:h,accessToken:p};this.nativeStorageManager.saveCacheRecord(w,t.storeInCache)}addTelemetryFromNativeResponse(e){const t=this.getMATSFromResponse(e);return t?(this.performanceClient.addFields({extensionId:this.nativeMessageHandler.getExtensionId(),extensionVersion:this.nativeMessageHandler.getExtensionVersion(),matsBrokerVersion:t.broker_version,matsAccountJoinOnStart:t.account_join_on_start,matsAccountJoinOnEnd:t.account_join_on_end,matsDeviceJoin:t.device_join,matsPromptBehavior:t.prompt_behavior,matsApiErrorCode:t.api_error_code,matsUiVisible:t.ui_visible,matsSilentCode:t.silent_code,matsSilentBiSubCode:t.silent_bi_sub_code,matsSilentMessage:t.silent_message,matsSilentStatus:t.silent_status,matsHttpStatus:t.http_status,matsHttpEventCount:t.http_event_count},this.correlationId),t):null}validateNativeResponse(e){if(e.hasOwnProperty("access_token")&&e.hasOwnProperty("id_token")&&e.hasOwnProperty("client_info")&&e.hasOwnProperty("account")&&e.hasOwnProperty("scope")&&e.hasOwnProperty("expires_in"))return e;throw ew(Gf,"Response missing expected properties.")}getMATSFromResponse(e){if(e.properties.MATS)try{return JSON.parse(e.properties.MATS)}catch{this.logger.error("NativeInteractionClient - Error parsing MATS telemetry, returning null instead")}return null}isResponseFromCache(e){return typeof e.is_cached>"u"?(this.logger.verbose("NativeInteractionClient - MATS telemetry does not contain field indicating if response was served from cache. Returning false."),!1):!!e.is_cached}async initializeNativeRequest(e){this.logger.trace("NativeInteractionClient - initializeNativeRequest called");const t=e.authority||this.config.auth.authority;e.account&&await this.getDiscoveredAuthority({requestAuthority:t,requestAzureCloudOptions:e.azureCloudOptions,account:e.account});const r=new De(t);r.validateAsUri();const{scopes:o,...a}=e,l=new _t(o||[]);l.appendScopes(Da);const d=()=>{switch(this.apiId){case it.ssoSilent:case it.acquireTokenSilent_silentFlow:return this.logger.trace("initializeNativeRequest: silent request sets prompt to none"),Bt.NONE}if(!e.prompt){this.logger.trace("initializeNativeRequest: prompt was not provided");return}switch(e.prompt){case Bt.NONE:case Bt.CONSENT:case Bt.LOGIN:return this.logger.trace("initializeNativeRequest: prompt is compatible with native flow"),e.prompt;default:throw this.logger.trace(`initializeNativeRequest: prompt = ${e.prompt} is not compatible with native flow`),ie(CT)}},h={...a,accountId:this.accountId,clientId:this.config.auth.clientId,authority:r.urlString,scope:l.printScopes(),redirectUri:this.getRedirectUri(e.redirectUri),prompt:d(),correlationId:this.correlationId,tokenType:e.authenticationScheme,windowTitleSubstring:document.title,extraParameters:{...e.extraQueryParameters,...e.tokenQueryParameters},extendedExpiryToken:!1,keyId:e.popKid};if(h.signPopToken&&e.popKid)throw ie(wT);if(this.handleExtraBrokerParams(h),h.extraParameters=h.extraParameters||{},h.extraParameters.telemetry=pa.MATS_TELEMETRY,e.authenticationScheme===je.POP){const f={resourceRequestUri:e.resourceRequestUri,resourceRequestMethod:e.resourceRequestMethod,shrClaims:e.shrClaims,shrNonce:e.shrNonce},g=new Aa(this.browserCrypto);let _;if(h.keyId)_=this.browserCrypto.base64UrlEncode(JSON.stringify({kid:h.keyId})),h.signPopToken=!1;else{const p=await Q(g.generateCnf.bind(g),x.PopTokenGenerateCnf,this.logger,this.performanceClient,e.correlationId)(f,this.logger);_=p.reqCnfString,h.keyId=p.kid,h.signPopToken=!0}h.reqCnf=_}return this.addRequestSKUs(h),h}handleExtraBrokerParams(e){var a;const t=e.extraParameters&&e.extraParameters.hasOwnProperty(um)&&e.extraParameters.hasOwnProperty(nf)&&e.extraParameters.hasOwnProperty(bi);if(!e.embeddedClientId&&!t)return;let r="";const o=e.redirectUri;e.embeddedClientId?(e.redirectUri=this.config.auth.redirectUri,r=e.embeddedClientId):e.extraParameters&&(e.redirectUri=e.extraParameters[nf],r=e.extraParameters[bi]),e.extraParameters={child_client_id:r,child_redirect_uri:o},(a=this.performanceClient)==null||a.addFields({embeddedClientId:r,embeddedRedirectUri:o},e.correlationId)}}/*! @azure/msal-browser v3.28.1 2025-01-14 */class Vr{constructor(e,t,r,o){this.logger=e,this.handshakeTimeoutMs=t,this.extensionId=o,this.resolvers=new Map,this.handshakeResolvers=new Map,this.messageChannel=new MessageChannel,this.windowListener=this.onWindowMessage.bind(this),this.performanceClient=r,this.handshakeEvent=r.startMeasurement(x.NativeMessageHandlerHandshake)}async sendMessage(e){this.logger.trace("NativeMessageHandler - sendMessage called.");const t={channel:pa.CHANNEL_ID,extensionId:this.extensionId,responseId:po(),body:e};return this.logger.trace("NativeMessageHandler - Sending request to browser extension"),this.logger.tracePii(`NativeMessageHandler - Sending request to browser extension: ${JSON.stringify(t)}`),this.messageChannel.port1.postMessage(t),new Promise((r,o)=>{this.resolvers.set(t.responseId,{resolve:r,reject:o})})}static async createProvider(e,t,r){e.trace("NativeMessageHandler - createProvider called.");try{const o=new Vr(e,t,r,pa.PREFERRED_EXTENSION_ID);return await o.sendHandshakeRequest(),o}catch{const a=new Vr(e,t,r);return await a.sendHandshakeRequest(),a}}async sendHandshakeRequest(){this.logger.trace("NativeMessageHandler - sendHandshakeRequest called."),window.addEventListener("message",this.windowListener,!1);const e={channel:pa.CHANNEL_ID,extensionId:this.extensionId,responseId:po(),body:{method:_i.HandshakeRequest}};return this.handshakeEvent.add({extensionId:this.extensionId,extensionHandshakeTimeoutMs:this.handshakeTimeoutMs}),this.messageChannel.port1.onmessage=t=>{this.onChannelMessage(t)},window.postMessage(e,window.origin,[this.messageChannel.port2]),new Promise((t,r)=>{this.handshakeResolvers.set(e.responseId,{resolve:t,reject:r}),this.timeoutId=window.setTimeout(()=>{window.removeEventListener("message",this.windowListener,!1),this.messageChannel.port1.close(),this.messageChannel.port2.close(),this.handshakeEvent.end({extensionHandshakeTimedOut:!0,success:!1}),r(ie(_T)),this.handshakeResolvers.delete(e.responseId)},this.handshakeTimeoutMs)})}onWindowMessage(e){if(this.logger.trace("NativeMessageHandler - onWindowMessage called"),e.source!==window)return;const t=e.data;if(!(!t.channel||t.channel!==pa.CHANNEL_ID)&&!(t.extensionId&&t.extensionId!==this.extensionId)&&t.body.method===_i.HandshakeRequest){const r=this.handshakeResolvers.get(t.responseId);if(!r){this.logger.trace(`NativeMessageHandler.onWindowMessage - resolver can't be found for request ${t.responseId}`);return}this.logger.verbose(t.extensionId?`Extension with id: ${t.extensionId} not installed`:"No extension installed"),clearTimeout(this.timeoutId),this.messageChannel.port1.close(),this.messageChannel.port2.close(),window.removeEventListener("message",this.windowListener,!1),this.handshakeEvent.end({success:!1,extensionInstalled:!1}),r.reject(ie(vT))}}onChannelMessage(e){this.logger.trace("NativeMessageHandler - onChannelMessage called.");const t=e.data,r=this.resolvers.get(t.responseId),o=this.handshakeResolvers.get(t.responseId);try{const a=t.body.method;if(a===_i.Response){if(!r)return;const l=t.body.response;if(this.logger.trace("NativeMessageHandler - Received response from browser extension"),this.logger.tracePii(`NativeMessageHandler - Received response from browser extension: ${JSON.stringify(l)}`),l.status!=="Success")r.reject(ff(l.code,l.description,l.ext));else if(l.result)l.result.code&&l.result.description?r.reject(ff(l.result.code,l.result.description,l.result.ext)):r.resolve(l.result);else throw ew(Gf,"Event does not contain result.");this.resolvers.delete(t.responseId)}else if(a===_i.HandshakeResponse){if(!o){this.logger.trace(`NativeMessageHandler.onChannelMessage - resolver can't be found for request ${t.responseId}`);return}clearTimeout(this.timeoutId),window.removeEventListener("message",this.windowListener,!1),this.extensionId=t.extensionId,this.extensionVersion=t.body.version,this.logger.verbose(`NativeMessageHandler - Received HandshakeResponse from extension: ${this.extensionId}`),this.handshakeEvent.end({extensionInstalled:!0,success:!0}),o.resolve(),this.handshakeResolvers.delete(t.responseId)}}catch(a){this.logger.error("Error parsing response from WAM Extension"),this.logger.errorPii(`Error parsing response from WAM Extension: ${a}`),this.logger.errorPii(`Unable to parse ${e}`),r?r.reject(a):o&&o.reject(a)}}getExtensionId(){return this.extensionId}getExtensionVersion(){return this.extensionVersion}static isNativeAvailable(e,t,r,o){if(t.trace("isNativeAvailable called"),!e.system.allowNativeBroker)return t.trace("isNativeAvailable: allowNativeBroker is not enabled, returning false"),!1;if(!r)return t.trace("isNativeAvailable: WAM extension provider is not initialized, returning false"),!1;if(o)switch(o){case je.BEARER:case je.POP:return t.trace("isNativeAvailable: authenticationScheme is supported, returning true"),!0;default:return t.trace("isNativeAvailable: authenticationScheme is not supported, returning false"),!1}return!0}}/*! @azure/msal-browser v3.28.1 2025-01-14 */class Nm{constructor(e,t,r,o,a){this.authModule=e,this.browserStorage=t,this.authCodeRequest=r,this.logger=o,this.performanceClient=a}async handleCodeResponse(e,t){this.performanceClient.addQueueMeasurement(x.HandleCodeResponse,t.correlationId);let r;try{r=this.authModule.handleFragmentResponse(e,t.state)}catch(o){throw o instanceof zo&&o.subError===Ii?ie(Ii):o}return Q(this.handleCodeResponseFromServer.bind(this),x.HandleCodeResponseFromServer,this.logger,this.performanceClient,t.correlationId)(r,t)}async handleCodeResponseFromServer(e,t,r=!0){if(this.performanceClient.addQueueMeasurement(x.HandleCodeResponseFromServer,t.correlationId),this.logger.trace("InteractionHandler.handleCodeResponseFromServer called"),this.authCodeRequest.code=e.code,e.cloud_instance_host_name&&await Q(this.authModule.updateAuthority.bind(this.authModule),x.UpdateTokenEndpointAuthority,this.logger,this.performanceClient,t.correlationId)(e.cloud_instance_host_name,t.correlationId),r&&(e.nonce=t.nonce||void 0),e.state=t.state,e.client_info)this.authCodeRequest.clientInfo=e.client_info;else{const a=this.createCcsCredentials(t);a&&(this.authCodeRequest.ccsCredential=a)}return await Q(this.authModule.acquireToken.bind(this.authModule),x.AuthClientAcquireToken,this.logger,this.performanceClient,t.correlationId)(this.authCodeRequest,e)}createCcsCredentials(e){return e.account?{credential:e.account.homeAccountId,type:Bn.HOME_ACCOUNT_ID}:e.loginHint?{credential:e.loginHint,type:Bn.UPN}:null}}/*! @azure/msal-browser v3.28.1 2025-01-14 */function UT(n,e,t){const r=Ll(n);if(!r)throw xw(n)?(t.error(`A ${e} is present in the iframe but it does not contain known properties. It's likely that the ${e} has been replaced by code running on the redirectUri page.`),t.errorPii(`The ${e} detected is: ${n}`),ie(Qw)):(t.error(`The request has returned to the redirectUri but a ${e} is not present. It's likely that the ${e} has been removed or the page has been redirected by code running on the redirectUri page.`),ie(Jw));return r}function s$(n,e,t){if(!n.state)throw ie(_m);const r=MT(e,n.state);if(!r)throw ie(Xw);if(r.interactionType!==t)throw ie(Zw)}/*! @azure/msal-browser v3.28.1 2025-01-14 */class c$ extends La{constructor(e,t,r,o,a,l,d,h,f,g){super(e,t,r,o,a,l,d,f,g),this.unloadWindow=this.unloadWindow.bind(this),this.nativeStorage=h}acquireToken(e){try{const r={popupName:this.generatePopupName(e.scopes||Da,e.authority||this.config.auth.authority),popupWindowAttributes:e.popupWindowAttributes||{},popupWindowParent:e.popupWindowParent??window};return this.config.system.asyncPopups?(this.logger.verbose("asyncPopups set to true, acquiring token"),this.acquireTokenPopupAsync(e,r)):(this.logger.verbose("asyncPopup set to false, opening popup before acquiring token"),r.popup=this.openSizedPopup("about:blank",r),this.acquireTokenPopupAsync(e,r))}catch(t){return Promise.reject(t)}}logout(e){try{this.logger.verbose("logoutPopup called");const t=this.initializeLogoutRequest(e),r={popupName:this.generateLogoutPopupName(t),popupWindowAttributes:(e==null?void 0:e.popupWindowAttributes)||{},popupWindowParent:(e==null?void 0:e.popupWindowParent)??window},o=e&&e.authority,a=e&&e.mainWindowRedirectUri;return this.config.system.asyncPopups?(this.logger.verbose("asyncPopups set to true"),this.logoutPopupAsync(t,r,o,a)):(this.logger.verbose("asyncPopup set to false, opening popup"),r.popup=this.openSizedPopup("about:blank",r),this.logoutPopupAsync(t,r,o,a))}catch(t){return Promise.reject(t)}}async acquireTokenPopupAsync(e,t){var a;this.logger.verbose("acquireTokenPopupAsync called");const r=this.initializeServerTelemetryManager(it.acquireTokenPopup),o=await Q(this.initializeAuthorizationRequest.bind(this),x.StandardInteractionClientInitializeAuthorizationRequest,this.logger,this.performanceClient,this.correlationId)(e,le.Popup);PT(o.authority);try{const l=await Q(this.initializeAuthorizationCodeRequest.bind(this),x.StandardInteractionClientInitializeAuthorizationCodeRequest,this.logger,this.performanceClient,this.correlationId)(o),d=await Q(this.createAuthCodeClient.bind(this),x.StandardInteractionClientCreateAuthCodeClient,this.logger,this.performanceClient,this.correlationId)({serverTelemetryManager:r,requestAuthority:o.authority,requestAzureCloudOptions:o.azureCloudOptions,requestExtraQueryParameters:o.extraQueryParameters,account:o.account}),h=Vr.isNativeAvailable(this.config,this.logger,this.nativeMessageHandler,e.authenticationScheme);let f;h&&(f=this.performanceClient.startMeasurement(x.FetchAccountIdWithNativeBroker,e.correlationId));const g=await d.getAuthCodeUrl({...o,nativeBroker:h}),_=new Nm(d,this.browserStorage,l,this.logger,this.performanceClient),p=this.initiateAuthRequest(g,t);this.eventHandler.emitEvent(me.POPUP_OPENED,le.Popup,{popupWindow:p},null);const w=await this.monitorPopupForHash(p,t.popupWindowParent),C=Ni(UT,x.DeserializeResponse,this.logger,this.performanceClient,this.correlationId)(w,this.config.auth.OIDCOptions.serverResponseType,this.logger);if(Ur.removeThrottle(this.browserStorage,this.config.auth.clientId,l),C.accountId){if(this.logger.verbose("Account id found in hash, calling WAM for token"),f&&f.end({success:!0,isNativeBroker:!0}),!this.nativeMessageHandler)throw ie(qs);const k=new ya(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,it.acquireTokenPopup,this.performanceClient,this.nativeMessageHandler,C.accountId,this.nativeStorage,o.correlationId),{userRequestState:S}=Er.parseRequestState(this.browserCrypto,o.state);return await k.acquireToken({...o,state:S,prompt:void 0})}return await _.handleCodeResponse(C,o)}catch(l){throw(a=t.popup)==null||a.close(),l instanceof lt&&(l.setCorrelationId(this.correlationId),r.cacheFailedRequest(l)),l}}async logoutPopupAsync(e,t,r,o){var l,d,h,f;this.logger.verbose("logoutPopupAsync called"),this.eventHandler.emitEvent(me.LOGOUT_START,le.Popup,e);const a=this.initializeServerTelemetryManager(it.logoutPopup);try{await this.clearCacheOnLogout(e.account);const g=await Q(this.createAuthCodeClient.bind(this),x.StandardInteractionClientCreateAuthCodeClient,this.logger,this.performanceClient,this.correlationId)({serverTelemetryManager:a,requestAuthority:r,account:e.account||void 0});try{g.authority.endSessionEndpoint}catch{if((l=e.account)!=null&&l.homeAccountId&&e.postLogoutRedirectUri&&g.authority.protocolMode===mo.OIDC){if(this.browserStorage.removeAccount((d=e.account)==null?void 0:d.homeAccountId),this.eventHandler.emitEvent(me.LOGOUT_SUCCESS,le.Popup,e),o){const w={apiId:it.logoutPopup,timeout:this.config.system.redirectNavigationTimeout,noHistory:!1},C=De.getAbsoluteUrl(o,lo());await this.navigationClient.navigateInternal(C,w)}(h=t.popup)==null||h.close();return}}const _=g.getLogoutUri(e);this.eventHandler.emitEvent(me.LOGOUT_SUCCESS,le.Popup,e);const p=this.openPopup(_,t);if(this.eventHandler.emitEvent(me.POPUP_OPENED,le.Popup,{popupWindow:p},null),await this.monitorPopupForHash(p,t.popupWindowParent).catch(()=>{}),o){const w={apiId:it.logoutPopup,timeout:this.config.system.redirectNavigationTimeout,noHistory:!1},C=De.getAbsoluteUrl(o,lo());this.logger.verbose("Redirecting main window to url specified in the request"),this.logger.verbosePii(`Redirecting main window to: ${C}`),await this.navigationClient.navigateInternal(C,w)}else this.logger.verbose("No main window navigation requested")}catch(g){throw(f=t.popup)==null||f.close(),g instanceof lt&&(g.setCorrelationId(this.correlationId),a.cacheFailedRequest(g)),this.browserStorage.setInteractionInProgress(!1),this.eventHandler.emitEvent(me.LOGOUT_FAILURE,le.Popup,null,g),this.eventHandler.emitEvent(me.LOGOUT_END,le.Popup),g}this.eventHandler.emitEvent(me.LOGOUT_END,le.Popup)}initiateAuthRequest(e,t){if(e)return this.logger.infoPii(`Navigate to: ${e}`),this.openPopup(e,t);throw this.logger.error("Navigate url is empty"),ie(mu)}monitorPopupForHash(e,t){return new Promise((r,o)=>{this.logger.verbose("PopupHandler.monitorPopupForHash - polling started");const a=setInterval(()=>{if(e.closed){this.logger.error("PopupHandler.monitorPopupForHash - window closed"),clearInterval(a),o(ie(Ii));return}let l="";try{l=e.location.href}catch{}if(!l||l==="about:blank")return;clearInterval(a);let d="";const h=this.config.auth.OIDCOptions.serverResponseType;e&&(h===Gs.QUERY?d=e.location.search:d=e.location.hash),this.logger.verbose("PopupHandler.monitorPopupForHash - popup window is on same origin as caller"),r(d)},this.config.system.pollIntervalMilliseconds)}).finally(()=>{this.cleanPopup(e,t)})}openPopup(e,t){try{let r;if(t.popup?(r=t.popup,this.logger.verbosePii(`Navigating popup window to: ${e}`),r.location.assign(e)):typeof t.popup>"u"&&(this.logger.verbosePii(`Opening popup window to: ${e}`),r=this.openSizedPopup(e,t)),!r)throw ie(nT);return r.focus&&r.focus(),this.currentWindow=r,t.popupWindowParent.addEventListener("beforeunload",this.unloadWindow),r}catch(r){throw this.logger.error("error opening popup "+r.message),this.browserStorage.setInteractionInProgress(!1),ie(tT)}}openSizedPopup(e,{popupName:t,popupWindowAttributes:r,popupWindowParent:o}){var w,C,T,k;const a=o.screenLeft?o.screenLeft:o.screenX,l=o.screenTop?o.screenTop:o.screenY,d=o.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,h=o.innerHeight||document.documentElement.clientHeight||document.body.clientHeight;let f=(w=r.popupSize)==null?void 0:w.width,g=(C=r.popupSize)==null?void 0:C.height,_=(T=r.popupPosition)==null?void 0:T.top,p=(k=r.popupPosition)==null?void 0:k.left;return(!f||f<0||f>d)&&(this.logger.verbose("Default popup window width used. Window width not configured or invalid."),f=Dn.POPUP_WIDTH),(!g||g<0||g>h)&&(this.logger.verbose("Default popup window height used. Window height not configured or invalid."),g=Dn.POPUP_HEIGHT),(!_||_<0||_>h)&&(this.logger.verbose("Default popup window top position used. Window top not configured or invalid."),_=Math.max(0,h/2-Dn.POPUP_HEIGHT/2+l)),(!p||p<0||p>d)&&(this.logger.verbose("Default popup window left position used. Window left not configured or invalid."),p=Math.max(0,d/2-Dn.POPUP_WIDTH/2+a)),o.open(e,t,`width=${f}, height=${g}, top=${_}, left=${p}, scrollbars=yes`)}unloadWindow(e){this.browserStorage.cleanRequestByInteractionType(le.Popup),this.currentWindow&&this.currentWindow.close(),e.preventDefault()}cleanPopup(e,t){e.close(),t.removeEventListener("beforeunload",this.unloadWindow),this.browserStorage.setInteractionInProgress(!1)}generatePopupName(e,t){return`${Dn.POPUP_NAME_PREFIX}.${this.config.auth.clientId}.${e.join("-")}.${t}.${this.correlationId}`}generateLogoutPopupName(e){const t=e.account&&e.account.homeAccountId;return`${Dn.POPUP_NAME_PREFIX}.${this.config.auth.clientId}.${t}.${this.correlationId}`}}/*! @azure/msal-browser v3.28.1 2025-01-14 */class gy{constructor(e,t,r,o,a){this.authModule=e,this.browserStorage=t,this.authCodeRequest=r,this.logger=o,this.performanceClient=a}async initiateAuthRequest(e,t){if(this.logger.verbose("RedirectHandler.initiateAuthRequest called"),e){t.redirectStartPage&&(this.logger.verbose("RedirectHandler.initiateAuthRequest: redirectStartPage set, caching start page"),this.browserStorage.setTemporaryCache(Ke.ORIGIN_URI,t.redirectStartPage,!0)),this.browserStorage.setTemporaryCache(Ke.CORRELATION_ID,this.authCodeRequest.correlationId,!0),this.browserStorage.cacheCodeRequest(this.authCodeRequest),this.logger.infoPii(`RedirectHandler.initiateAuthRequest: Navigate to: ${e}`);const r={apiId:it.acquireTokenRedirect,timeout:t.redirectTimeout,noHistory:!1};if(typeof t.onRedirectNavigate=="function")if(this.logger.verbose("RedirectHandler.initiateAuthRequest: Invoking onRedirectNavigate callback"),t.onRedirectNavigate(e)!==!1){this.logger.verbose("RedirectHandler.initiateAuthRequest: onRedirectNavigate did not return false, navigating"),await t.navigationClient.navigateExternal(e,r);return}else{this.logger.verbose("RedirectHandler.initiateAuthRequest: onRedirectNavigate returned false, stopping navigation");return}else{this.logger.verbose("RedirectHandler.initiateAuthRequest: Navigating window to navigate url"),await t.navigationClient.navigateExternal(e,r);return}}else throw this.logger.info("RedirectHandler.initiateAuthRequest: Navigate url is empty"),ie(mu)}async handleCodeResponse(e,t){this.logger.verbose("RedirectHandler.handleCodeResponse called"),this.browserStorage.setInteractionInProgress(!1);const r=this.browserStorage.generateStateKey(t),o=this.browserStorage.getTemporaryCache(r);if(!o)throw Y(Ol,"Cached State");let a;try{a=this.authModule.handleFragmentResponse(e,o)}catch(f){throw f instanceof zo&&f.subError===Ii?ie(Ii):f}const l=this.browserStorage.generateNonceKey(o),d=this.browserStorage.getTemporaryCache(l);if(this.authCodeRequest.code=a.code,a.cloud_instance_host_name&&await Q(this.authModule.updateAuthority.bind(this.authModule),x.UpdateTokenEndpointAuthority,this.logger,this.performanceClient,this.authCodeRequest.correlationId)(a.cloud_instance_host_name,this.authCodeRequest.correlationId),a.nonce=d||void 0,a.state=o,a.client_info)this.authCodeRequest.clientInfo=a.client_info;else{const f=this.checkCcsCredentials();f&&(this.authCodeRequest.ccsCredential=f)}const h=await this.authModule.acquireToken(this.authCodeRequest,a);return this.browserStorage.cleanRequestByState(t),h}checkCcsCredentials(){const e=this.browserStorage.getTemporaryCache(Ke.CCS_CREDENTIAL,!0);if(e)try{return JSON.parse(e)}catch{this.authModule.logger.error("Cache credential could not be parsed"),this.authModule.logger.errorPii(`Cache credential could not be parsed: ${e}`)}return null}}/*! @azure/msal-browser v3.28.1 2025-01-14 */function l$(){if(typeof window>"u"||typeof window.performance>"u"||typeof window.performance.getEntriesByType!="function")return;const n=window.performance.getEntriesByType("navigation"),e=n.length?n[0]:void 0;return e==null?void 0:e.type}class u$ extends La{constructor(e,t,r,o,a,l,d,h,f,g){super(e,t,r,o,a,l,d,f,g),this.nativeStorage=h}async acquireToken(e){const t=await Q(this.initializeAuthorizationRequest.bind(this),x.StandardInteractionClientInitializeAuthorizationRequest,this.logger,this.performanceClient,this.correlationId)(e,le.Redirect);this.browserStorage.updateCacheEntries(t.state,t.nonce,t.authority,t.loginHint||"",t.account||null);const r=this.initializeServerTelemetryManager(it.acquireTokenRedirect),o=a=>{a.persisted&&(this.logger.verbose("Page was restored from back/forward cache. Clearing temporary cache."),this.browserStorage.cleanRequestByState(t.state),this.eventHandler.emitEvent(me.RESTORE_FROM_BFCACHE,le.Redirect))};try{const a=await Q(this.initializeAuthorizationCodeRequest.bind(this),x.StandardInteractionClientInitializeAuthorizationCodeRequest,this.logger,this.performanceClient,this.correlationId)(t),l=await Q(this.createAuthCodeClient.bind(this),x.StandardInteractionClientCreateAuthCodeClient,this.logger,this.performanceClient,this.correlationId)({serverTelemetryManager:r,requestAuthority:t.authority,requestAzureCloudOptions:t.azureCloudOptions,requestExtraQueryParameters:t.extraQueryParameters,account:t.account}),d=new gy(l,this.browserStorage,a,this.logger,this.performanceClient),h=await l.getAuthCodeUrl({...t,nativeBroker:Vr.isNativeAvailable(this.config,this.logger,this.nativeMessageHandler,e.authenticationScheme)}),f=this.getRedirectStartPage(e.redirectStartPage);return this.logger.verbosePii(`Redirect start page: ${f}`),window.addEventListener("pageshow",o),await d.initiateAuthRequest(h,{navigationClient:this.navigationClient,redirectTimeout:this.config.system.redirectNavigationTimeout,redirectStartPage:f,onRedirectNavigate:e.onRedirectNavigate||this.config.auth.onRedirectNavigate})}catch(a){throw a instanceof lt&&(a.setCorrelationId(this.correlationId),r.cacheFailedRequest(a)),window.removeEventListener("pageshow",o),this.browserStorage.cleanRequestByState(t.state),a}}async handleRedirectPromise(e="",t){const r=this.initializeServerTelemetryManager(it.handleRedirectPromise);try{if(!this.browserStorage.isInteractionInProgress(!0))return this.logger.info("handleRedirectPromise called but there is no interaction in progress, returning null."),null;const[o,a]=this.getRedirectResponse(e||"");if(!o)return this.logger.info("handleRedirectPromise did not detect a response as a result of a redirect. Cleaning temporary cache."),this.browserStorage.cleanRequestByInteractionType(le.Redirect),l$()!=="back_forward"?t.event.errorCode="no_server_response":this.logger.verbose("Back navigation event detected. Muting no_server_response error"),null;const l=this.browserStorage.getTemporaryCache(Ke.ORIGIN_URI,!0)||V.EMPTY_STRING,d=De.removeHashFromUrl(l),h=De.removeHashFromUrl(window.location.href);if(d===h&&this.config.auth.navigateToLoginRequestUrl)return this.logger.verbose("Current page is loginRequestUrl, handling response"),l.indexOf("#")>-1&&_H(l),await this.handleResponse(o,r);if(this.config.auth.navigateToLoginRequestUrl){if(!Sm()||this.config.system.allowRedirectInIframe){this.browserStorage.setTemporaryCache(Ke.URL_HASH,a,!0);const f={apiId:it.handleRedirectPromise,timeout:this.config.system.redirectNavigationTimeout,noHistory:!0};let g=!0;if(!l||l==="null"){const _=yH();this.browserStorage.setTemporaryCache(Ke.ORIGIN_URI,_,!0),this.logger.warning("Unable to get valid login request url from cache, redirecting to home page"),g=await this.navigationClient.navigateInternal(_,f)}else this.logger.verbose(`Navigating to loginRequestUrl: ${l}`),g=await this.navigationClient.navigateInternal(l,f);if(!g)return await this.handleResponse(o,r)}}else return this.logger.verbose("NavigateToLoginRequestUrl set to false, handling response"),await this.handleResponse(o,r);return null}catch(o){throw o instanceof lt&&(o.setCorrelationId(this.correlationId),r.cacheFailedRequest(o)),this.browserStorage.cleanRequestByInteractionType(le.Redirect),o}}getRedirectResponse(e){this.logger.verbose("getRedirectResponseHash called");let t=e;t||(this.config.auth.OIDCOptions.serverResponseType===Gs.QUERY?t=window.location.search:t=window.location.hash);let r=Ll(t);if(r){try{s$(r,this.browserCrypto,le.Redirect)}catch(a){return a instanceof lt&&this.logger.error(`Interaction type validation failed due to ${a.errorCode}: ${a.errorMessage}`),[null,""]}return pH(window),this.logger.verbose("Hash contains known properties, returning response hash"),[r,t]}const o=this.browserStorage.getTemporaryCache(Ke.URL_HASH,!0);return this.browserStorage.removeItem(this.browserStorage.generateCacheKey(Ke.URL_HASH)),o&&(r=Ll(o),r)?(this.logger.verbose("Hash does not contain known properties, returning cached hash"),[r,o]):[null,""]}async handleResponse(e,t){const r=e.state;if(!r)throw ie(_m);const o=this.browserStorage.getCachedRequest(r);if(this.logger.verbose("handleResponse called, retrieved cached request"),e.accountId){if(this.logger.verbose("Account id found in hash, calling WAM for token"),!this.nativeMessageHandler)throw ie(qs);const h=new ya(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,it.acquireTokenPopup,this.performanceClient,this.nativeMessageHandler,e.accountId,this.nativeStorage,o.correlationId),{userRequestState:f}=Er.parseRequestState(this.browserCrypto,r);return h.acquireToken({...o,state:f,prompt:void 0}).finally(()=>{this.browserStorage.cleanRequestByState(r)})}const a=this.browserStorage.getCachedAuthority(r);if(!a)throw ie(vm);const l=await Q(this.createAuthCodeClient.bind(this),x.StandardInteractionClientCreateAuthCodeClient,this.logger,this.performanceClient,this.correlationId)({serverTelemetryManager:t,requestAuthority:a});return Ur.removeThrottle(this.browserStorage,this.config.auth.clientId,o),new gy(l,this.browserStorage,o,this.logger,this.performanceClient).handleCodeResponse(e,r)}async logout(e){var o,a;this.logger.verbose("logoutRedirect called");const t=this.initializeLogoutRequest(e),r=this.initializeServerTelemetryManager(it.logout);try{this.eventHandler.emitEvent(me.LOGOUT_START,le.Redirect,e),await this.clearCacheOnLogout(t.account);const l={apiId:it.logout,timeout:this.config.system.redirectNavigationTimeout,noHistory:!1},d=await Q(this.createAuthCodeClient.bind(this),x.StandardInteractionClientCreateAuthCodeClient,this.logger,this.performanceClient,this.correlationId)({serverTelemetryManager:r,requestAuthority:e&&e.authority,requestExtraQueryParameters:e==null?void 0:e.extraQueryParameters,account:e&&e.account||void 0});if(d.authority.protocolMode===mo.OIDC)try{d.authority.endSessionEndpoint}catch{if((o=t.account)!=null&&o.homeAccountId){this.browserStorage.removeAccount((a=t.account)==null?void 0:a.homeAccountId),this.eventHandler.emitEvent(me.LOGOUT_SUCCESS,le.Redirect,t);return}}const h=d.getLogoutUri(t);if(this.eventHandler.emitEvent(me.LOGOUT_SUCCESS,le.Redirect,t),e&&typeof e.onRedirectNavigate=="function")if(e.onRedirectNavigate(h)!==!1){this.logger.verbose("Logout onRedirectNavigate did not return false, navigating"),this.browserStorage.getInteractionInProgress()||this.browserStorage.setInteractionInProgress(!0),await this.navigationClient.navigateExternal(h,l);return}else this.browserStorage.setInteractionInProgress(!1),this.logger.verbose("Logout onRedirectNavigate returned false, stopping navigation");else{this.browserStorage.getInteractionInProgress()||this.browserStorage.setInteractionInProgress(!0),await this.navigationClient.navigateExternal(h,l);return}}catch(l){throw l instanceof lt&&(l.setCorrelationId(this.correlationId),r.cacheFailedRequest(l)),this.eventHandler.emitEvent(me.LOGOUT_FAILURE,le.Redirect,null,l),this.eventHandler.emitEvent(me.LOGOUT_END,le.Redirect),l}this.eventHandler.emitEvent(me.LOGOUT_END,le.Redirect)}getRedirectStartPage(e){const t=e||window.location.href;return De.getAbsoluteUrl(t,lo())}}/*! @azure/msal-browser v3.28.1 2025-01-14 */async function d$(n,e,t,r,o){if(e.addQueueMeasurement(x.SilentHandlerInitiateAuthRequest,r),!n)throw t.info("Navigate url is empty"),ie(mu);return o?Q(f$,x.SilentHandlerLoadFrame,t,e,r)(n,o,e,r):Ni(m$,x.SilentHandlerLoadFrameSync,t,e,r)(n)}async function h$(n,e,t,r,o,a,l){return r.addQueueMeasurement(x.SilentHandlerMonitorIframeForHash,a),new Promise((d,h)=>{e<uf&&o.warning(`system.loadFrameTimeout or system.iframeHashTimeout set to lower (${e}ms) than the default (${uf}ms). This may result in timeouts.`);const f=window.setTimeout(()=>{window.clearInterval(g),h(ie(rT))},e),g=window.setInterval(()=>{let _="";const p=n.contentWindow;try{_=p?p.location.href:""}catch{}if(!_||_==="about:blank")return;let w="";p&&(l===Gs.QUERY?w=p.location.search:w=p.location.hash),window.clearTimeout(f),window.clearInterval(g),d(w)},t)}).finally(()=>{Ni(g$,x.RemoveHiddenIframe,o,r,a)(n)})}function f$(n,e,t,r){return t.addQueueMeasurement(x.SilentHandlerLoadFrame,r),new Promise((o,a)=>{const l=BT();window.setTimeout(()=>{if(!l){a("Unable to load iframe");return}l.src=n,o(l)},e)})}function m$(n){const e=BT();return e.src=n,e}function BT(){const n=document.createElement("iframe");return n.className="msalSilentIframe",n.style.visibility="hidden",n.style.position="absolute",n.style.width=n.style.height="0",n.style.border="0",n.setAttribute("sandbox","allow-scripts allow-same-origin allow-forms"),document.body.appendChild(n),n}function g$(n){document.body===n.parentNode&&document.body.removeChild(n)}/*! @azure/msal-browser v3.28.1 2025-01-14 */class p$ extends La{constructor(e,t,r,o,a,l,d,h,f,g,_){super(e,t,r,o,a,l,h,g,_),this.apiId=d,this.nativeStorage=f}async acquireToken(e){this.performanceClient.addQueueMeasurement(x.SilentIframeClientAcquireToken,e.correlationId),!e.loginHint&&!e.sid&&(!e.account||!e.account.username)&&this.logger.warning("No user hint provided. The authorization server may need more information to complete this request.");const t={...e};t.prompt?t.prompt!==Bt.NONE&&t.prompt!==Bt.NO_SESSION&&(this.logger.warning(`SilentIframeClient. Replacing invalid prompt ${t.prompt} with ${Bt.NONE}`),t.prompt=Bt.NONE):t.prompt=Bt.NONE;const r=await Q(this.initializeAuthorizationRequest.bind(this),x.StandardInteractionClientInitializeAuthorizationRequest,this.logger,this.performanceClient,e.correlationId)(t,le.Silent);PT(r.authority);const o=this.initializeServerTelemetryManager(this.apiId);let a;try{return a=await Q(this.createAuthCodeClient.bind(this),x.StandardInteractionClientCreateAuthCodeClient,this.logger,this.performanceClient,e.correlationId)({serverTelemetryManager:o,requestAuthority:r.authority,requestAzureCloudOptions:r.azureCloudOptions,requestExtraQueryParameters:r.extraQueryParameters,account:r.account}),await Q(this.silentTokenHelper.bind(this),x.SilentIframeClientTokenHelper,this.logger,this.performanceClient,e.correlationId)(a,r)}catch(l){if(l instanceof lt&&(l.setCorrelationId(this.correlationId),o.cacheFailedRequest(l)),!a||!(l instanceof lt)||l.errorCode!==Dn.INVALID_GRANT_ERROR)throw l;this.performanceClient.addFields({retryError:l.errorCode},this.correlationId);const d=await Q(this.initializeAuthorizationRequest.bind(this),x.StandardInteractionClientInitializeAuthorizationRequest,this.logger,this.performanceClient,e.correlationId)(t,le.Silent);return await Q(this.silentTokenHelper.bind(this),x.SilentIframeClientTokenHelper,this.logger,this.performanceClient,this.correlationId)(a,d)}}logout(){return Promise.reject(ie(gu))}async silentTokenHelper(e,t){const r=t.correlationId;this.performanceClient.addQueueMeasurement(x.SilentIframeClientTokenHelper,r);const o=await Q(this.initializeAuthorizationCodeRequest.bind(this),x.StandardInteractionClientInitializeAuthorizationCodeRequest,this.logger,this.performanceClient,r)(t),a=await Q(e.getAuthCodeUrl.bind(e),x.GetAuthCodeUrl,this.logger,this.performanceClient,r)({...t,nativeBroker:Vr.isNativeAvailable(this.config,this.logger,this.nativeMessageHandler,t.authenticationScheme)}),l=new Nm(e,this.browserStorage,o,this.logger,this.performanceClient),d=await Q(d$,x.SilentHandlerInitiateAuthRequest,this.logger,this.performanceClient,r)(a,this.performanceClient,this.logger,r,this.config.system.navigateFrameWait),h=this.config.auth.OIDCOptions.serverResponseType,f=await Q(h$,x.SilentHandlerMonitorIframeForHash,this.logger,this.performanceClient,r)(d,this.config.system.iframeHashTimeout,this.config.system.pollIntervalMilliseconds,this.performanceClient,this.logger,r,h),g=Ni(UT,x.DeserializeResponse,this.logger,this.performanceClient,this.correlationId)(f,h,this.logger);if(g.accountId){if(this.logger.verbose("Account id found in hash, calling WAM for token"),!this.nativeMessageHandler)throw ie(qs);const _=new ya(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,this.apiId,this.performanceClient,this.nativeMessageHandler,g.accountId,this.browserStorage,r),{userRequestState:p}=Er.parseRequestState(this.browserCrypto,t.state);return Q(_.acquireToken.bind(_),x.NativeInteractionClientAcquireToken,this.logger,this.performanceClient,r)({...t,state:p,prompt:t.prompt||Bt.NONE})}return Q(l.handleCodeResponse.bind(l),x.HandleCodeResponse,this.logger,this.performanceClient,r)(g,t)}}/*! @azure/msal-browser v3.28.1 2025-01-14 */class _$ extends La{async acquireToken(e){this.performanceClient.addQueueMeasurement(x.SilentRefreshClientAcquireToken,e.correlationId);const t=await Q(km,x.InitializeBaseRequest,this.logger,this.performanceClient,e.correlationId)(e,this.config,this.performanceClient,this.logger),r={...e,...t};e.redirectUri&&(r.redirectUri=this.getRedirectUri(e.redirectUri));const o=this.initializeServerTelemetryManager(it.acquireTokenSilent_silentFlow),a=await this.createRefreshTokenClient({serverTelemetryManager:o,authorityUrl:r.authority,azureCloudOptions:r.azureCloudOptions,account:r.account});return Q(a.acquireTokenByRefreshToken.bind(a),x.RefreshTokenClientAcquireTokenByRefreshToken,this.logger,this.performanceClient,e.correlationId)(r).catch(l=>{throw l.setCorrelationId(this.correlationId),o.cacheFailedRequest(l),l})}logout(){return Promise.reject(ie(gu))}async createRefreshTokenClient(e){const t=await Q(this.getClientConfiguration.bind(this),x.StandardInteractionClientGetClientConfiguration,this.logger,this.performanceClient,this.correlationId)({serverTelemetryManager:e.serverTelemetryManager,requestAuthority:e.authorityUrl,requestAzureCloudOptions:e.azureCloudOptions,requestExtraQueryParameters:e.extraQueryParameters,account:e.account});return new of(t,this.performanceClient)}}/*! @azure/msal-browser v3.28.1 2025-01-14 */class v${constructor(e,t,r,o){this.isBrowserEnvironment=typeof window<"u",this.config=e,this.storage=t,this.logger=r,this.cryptoObj=o}loadExternalTokens(e,t,r){if(!this.isBrowserEnvironment)throw ie(pu);const o=t.id_token?ki(t.id_token,Kr):void 0,a={protocolMode:this.config.auth.protocolMode,knownAuthorities:this.config.auth.knownAuthorities,cloudDiscoveryMetadata:this.config.auth.cloudDiscoveryMetadata,authorityMetadata:this.config.auth.authorityMetadata,skipAuthorityMetadataCache:this.config.auth.skipAuthorityMetadataCache},l=e.authority?new Xt(Xt.generateAuthority(e.authority,e.azureCloudOptions),this.config.system.networkClient,this.storage,a,this.logger,e.correlationId||po()):void 0,d=this.loadAccount(e,r.clientInfo||t.client_info||"",o,l),h=this.loadIdToken(t,d.homeAccountId,d.environment,d.realm),f=this.loadAccessToken(e,t,d.homeAccountId,d.environment,d.realm,r),g=this.loadRefreshToken(t,d.homeAccountId,d.environment);return this.generateAuthenticationResult(e,{account:d,idToken:h,accessToken:f,refreshToken:g},o,l)}loadAccount(e,t,r,o){if(this.logger.verbose("TokenCache - loading account"),e.account){const h=Pt.createFromAccountInfo(e.account);return this.storage.setAccount(h),h}else if(!o||!t&&!r)throw this.logger.error("TokenCache - if an account is not provided on the request, authority and either clientInfo or idToken must be provided instead."),ie(hT);const a=Pt.generateHomeAccountId(t,o.authorityType,this.logger,this.cryptoObj,r),l=r==null?void 0:r.tid,d=fm(this.storage,o,a,Kr,r,t,o.hostnameAndPort,l,void 0,void 0,this.logger);return this.storage.setAccount(d),d}loadIdToken(e,t,r,o){if(!e.id_token)return this.logger.verbose("TokenCache - no id token found in response"),null;this.logger.verbose("TokenCache - loading id token");const a=cu(t,r,e.id_token,this.config.auth.clientId,o);return this.storage.setIdTokenCredential(a),a}loadAccessToken(e,t,r,o,a,l){if(t.access_token)if(t.expires_in){if(!t.scope&&(!e.scopes||!e.scopes.length))return this.logger.error("TokenCache - scopes not specified in the request or response. Cannot add token to the cache."),null}else return this.logger.error("TokenCache - no expiration set on the access token. Cannot add it to the cache."),null;else return this.logger.verbose("TokenCache - no access token found in response"),null;this.logger.verbose("TokenCache - loading access token");const d=t.scope?_t.fromString(t.scope):new _t(e.scopes),h=l.expiresOn||t.expires_in+new Date().getTime()/1e3,f=l.extendedExpiresOn||(t.ext_expires_in||t.expires_in)+new Date().getTime()/1e3,g=lu(r,o,t.access_token,this.config.auth.clientId,a,d.printScopes(),h,f,Kr);return this.storage.setAccessTokenCredential(g),g}loadRefreshToken(e,t,r){if(!e.refresh_token)return this.logger.verbose("TokenCache - no refresh token found in response"),null;this.logger.verbose("TokenCache - loading refresh token");const o=Cw(t,r,e.refresh_token,this.config.auth.clientId,e.foci,void 0,e.refresh_token_expires_in);return this.storage.setRefreshTokenCredential(o),o}generateAuthenticationResult(e,t,r,o){var g,_,p;let a="",l=[],d=null,h;t!=null&&t.accessToken&&(a=t.accessToken.secret,l=_t.fromString(t.accessToken.target).asArray(),d=new Date(Number(t.accessToken.expiresOn)*1e3),h=new Date(Number(t.accessToken.extendedExpiresOn)*1e3));const f=t.account;return{authority:o?o.canonicalAuthority:"",uniqueId:t.account.localAccountId,tenantId:t.account.realm,scopes:l,account:f.getAccountInfo(),idToken:((g=t.idToken)==null?void 0:g.secret)||"",idTokenClaims:r||{},accessToken:a,fromCache:!0,expiresOn:d,correlationId:e.correlationId||"",requestId:"",extExpiresOn:h,familyId:((_=t.refreshToken)==null?void 0:_.familyId)||"",tokenType:((p=t==null?void 0:t.accessToken)==null?void 0:p.tokenType)||"",state:e.state||"",cloudGraphHostName:f.cloudGraphHostName||"",msGraphHost:f.msGraphHost||"",fromNativeBroker:!1}}}/*! @azure/msal-browser v3.28.1 2025-01-14 */class y$ extends Gw{constructor(e){super(e),this.includeRedirectUri=!1}}/*! @azure/msal-browser v3.28.1 2025-01-14 */class C$ extends La{constructor(e,t,r,o,a,l,d,h,f,g){super(e,t,r,o,a,l,h,f,g),this.apiId=d}async acquireToken(e){if(!e.code)throw ie(fT);const t=await Q(this.initializeAuthorizationRequest.bind(this),x.StandardInteractionClientInitializeAuthorizationRequest,this.logger,this.performanceClient,e.correlationId)(e,le.Silent),r=this.initializeServerTelemetryManager(this.apiId);try{const o={...t,code:e.code},a=await Q(this.getClientConfiguration.bind(this),x.StandardInteractionClientGetClientConfiguration,this.logger,this.performanceClient,e.correlationId)({serverTelemetryManager:r,requestAuthority:t.authority,requestAzureCloudOptions:t.azureCloudOptions,requestExtraQueryParameters:t.extraQueryParameters,account:t.account}),l=new y$(a);this.logger.verbose("Auth code client created");const d=new Nm(l,this.browserStorage,o,this.logger,this.performanceClient);return await Q(d.handleCodeResponseFromServer.bind(d),x.HandleCodeResponseFromServer,this.logger,this.performanceClient,e.correlationId)({code:e.code,msgraph_host:e.msGraphHost,cloud_graph_host_name:e.cloudGraphHostName,cloud_instance_host_name:e.cloudInstanceHostName},t,!1)}catch(o){throw o instanceof lt&&(o.setCorrelationId(this.correlationId),r.cacheFailedRequest(o)),o}}logout(){return Promise.reject(ie(gu))}}/*! @azure/msal-browser v3.28.1 2025-01-14 */function Dr(n){const e=n==null?void 0:n.idTokenClaims;if(e!=null&&e.tfp||e!=null&&e.acr)return"B2C";if(e!=null&&e.tid){if((e==null?void 0:e.tid)==="9188040d-6c67-4c5b-b112-36a304b66dad")return"MSA"}else return;return"AAD"}function Zc(n,e){try{Im(n)}catch(t){throw e.end({success:!1},t),t}}class yu{constructor(e){this.operatingContext=e,this.isBrowserEnvironment=this.operatingContext.isBrowserEnvironment(),this.config=e.getConfig(),this.initialized=!1,this.logger=this.operatingContext.getLogger(),this.networkClient=this.config.system.networkClient,this.navigationClient=this.config.system.navigationClient,this.redirectResponse=new Map,this.hybridAuthCodeResponses=new Map,this.performanceClient=this.config.telemetry.client,this.browserCrypto=this.isBrowserEnvironment?new ka(this.logger,this.performanceClient):Pl,this.eventHandler=new GH(this.logger),this.browserStorage=this.isBrowserEnvironment?new hf(this.config.auth.clientId,this.config.cache,this.browserCrypto,this.logger,D2(this.config.auth),this.performanceClient):BH(this.config.auth.clientId,this.logger);const t={cacheLocation:vn.MemoryStorage,temporaryCacheLocation:vn.MemoryStorage,storeAuthStateInCookie:!1,secureCookies:!1,cacheMigrationEnabled:!1,claimsBasedCachingEnabled:!1};this.nativeInternalStorage=new hf(this.config.auth.clientId,t,this.browserCrypto,this.logger,void 0,this.performanceClient),this.tokenCache=new v$(this.config,this.browserStorage,this.logger,this.browserCrypto),this.activeSilentTokenRequests=new Map,this.trackPageVisibility=this.trackPageVisibility.bind(this),this.trackPageVisibilityWithMeasurement=this.trackPageVisibilityWithMeasurement.bind(this),this.listeningToStorageEvents=!1,this.handleAccountCacheChange=this.handleAccountCacheChange.bind(this)}static async createController(e,t){const r=new yu(e);return await r.initialize(t),r}trackPageVisibility(e){e&&(this.logger.info("Perf: Visibility change detected"),this.performanceClient.incrementFields({visibilityChangeCount:1},e))}async initialize(e){if(this.logger.trace("initialize called"),this.initialized){this.logger.info("initialize has already been called, exiting early.");return}if(!this.isBrowserEnvironment){this.logger.info("in non-browser environment, exiting early."),this.initialized=!0,this.eventHandler.emitEvent(me.INITIALIZE_END);return}const t=(e==null?void 0:e.correlationId)||this.getRequestCorrelationId(),r=this.config.system.allowNativeBroker,o=this.performanceClient.startMeasurement(x.InitializeClientApplication,t);if(this.eventHandler.emitEvent(me.INITIALIZE_START),r)try{this.nativeExtensionProvider=await Vr.createProvider(this.logger,this.config.system.nativeBrokerHandshakeTimeout,this.performanceClient)}catch(a){this.logger.verbose(a)}this.config.cache.claimsBasedCachingEnabled||(this.logger.verbose("Claims-based caching is disabled. Clearing the previous cache with claims"),await Q(this.browserStorage.clearTokensAndKeysWithClaims.bind(this.browserStorage),x.ClearTokensAndKeysWithClaims,this.logger,this.performanceClient,t)(this.performanceClient,t)),this.initialized=!0,this.eventHandler.emitEvent(me.INITIALIZE_END),o.end({allowNativeBroker:r,success:!0})}async handleRedirectPromise(e){if(this.logger.verbose("handleRedirectPromise called"),OT(this.initialized),this.isBrowserEnvironment){const t=e||"";let r=this.redirectResponse.get(t);return typeof r>"u"?(r=this.handleRedirectPromiseInternal(e),this.redirectResponse.set(t,r),this.logger.verbose("handleRedirectPromise has been called for the first time, storing the promise")):this.logger.verbose("handleRedirectPromise has been called previously, returning the result from the first call"),r}return this.logger.verbose("handleRedirectPromise returns null, not browser environment"),null}async handleRedirectPromiseInternal(e){const t=this.getAllAccounts(),r=this.browserStorage.getCachedNativeRequest(),o=r&&Vr.isNativeAvailable(this.config,this.logger,this.nativeExtensionProvider)&&this.nativeExtensionProvider&&!e,a=o?r==null?void 0:r.correlationId:this.browserStorage.getTemporaryCache(Ke.CORRELATION_ID,!0)||"",l=this.performanceClient.startMeasurement(x.AcquireTokenRedirect,a);this.eventHandler.emitEvent(me.HANDLE_REDIRECT_START,le.Redirect);let d;if(o&&this.nativeExtensionProvider){this.logger.trace("handleRedirectPromise - acquiring token from native platform");const h=new ya(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,it.handleRedirectPromise,this.performanceClient,this.nativeExtensionProvider,r.accountId,this.nativeInternalStorage,r.correlationId);d=Q(h.handleRedirectPromise.bind(h),x.HandleNativeRedirectPromiseMeasurement,this.logger,this.performanceClient,l.event.correlationId)(this.performanceClient,l.event.correlationId)}else{this.logger.trace("handleRedirectPromise - acquiring token from web flow");const h=this.createRedirectClient(a);d=Q(h.handleRedirectPromise.bind(h),x.HandleRedirectPromiseMeasurement,this.logger,this.performanceClient,l.event.correlationId)(e,l)}return d.then(h=>(h?(t.length<this.getAllAccounts().length?(this.eventHandler.emitEvent(me.LOGIN_SUCCESS,le.Redirect,h),this.logger.verbose("handleRedirectResponse returned result, login success")):(this.eventHandler.emitEvent(me.ACQUIRE_TOKEN_SUCCESS,le.Redirect,h),this.logger.verbose("handleRedirectResponse returned result, acquire token success")),l.end({success:!0,accountType:Dr(h.account)})):l.event.errorCode?l.end({success:!1}):l.discard(),this.eventHandler.emitEvent(me.HANDLE_REDIRECT_END,le.Redirect),h)).catch(h=>{const f=h;throw t.length>0?this.eventHandler.emitEvent(me.ACQUIRE_TOKEN_FAILURE,le.Redirect,null,f):this.eventHandler.emitEvent(me.LOGIN_FAILURE,le.Redirect,null,f),this.eventHandler.emitEvent(me.HANDLE_REDIRECT_END,le.Redirect),l.end({success:!1},f),h})}async acquireTokenRedirect(e){const t=this.getRequestCorrelationId(e);this.logger.verbose("acquireTokenRedirect called",t);const r=this.performanceClient.startMeasurement(x.AcquireTokenPreRedirect,t);r.add({accountType:Dr(e.account),scenarioId:e.scenarioId});const o=e.onRedirectNavigate;if(o)e.onRedirectNavigate=l=>{const d=typeof o=="function"?o(l):void 0;return d!==!1?r.end({success:!0}):r.discard(),d};else{const l=this.config.auth.onRedirectNavigate;this.config.auth.onRedirectNavigate=d=>{const h=typeof l=="function"?l(d):void 0;return h!==!1?r.end({success:!0}):r.discard(),h}}const a=this.getAllAccounts().length>0;try{dy(this.initialized,this.config),this.browserStorage.setInteractionInProgress(!0),a?this.eventHandler.emitEvent(me.ACQUIRE_TOKEN_START,le.Redirect,e):this.eventHandler.emitEvent(me.LOGIN_START,le.Redirect,e);let l;return this.nativeExtensionProvider&&this.canUseNative(e)?l=new ya(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,it.acquireTokenRedirect,this.performanceClient,this.nativeExtensionProvider,this.getNativeAccountId(e),this.nativeInternalStorage,t).acquireTokenRedirect(e,r).catch(h=>{if(h instanceof Br&&la(h))return this.nativeExtensionProvider=void 0,this.createRedirectClient(t).acquireToken(e);if(h instanceof Tr)return this.logger.verbose("acquireTokenRedirect - Resolving interaction required error thrown by native broker by falling back to web flow"),this.createRedirectClient(t).acquireToken(e);throw this.browserStorage.setInteractionInProgress(!1),h}):l=this.createRedirectClient(t).acquireToken(e),await l}catch(l){throw r.end({success:!1},l),a?this.eventHandler.emitEvent(me.ACQUIRE_TOKEN_FAILURE,le.Redirect,null,l):this.eventHandler.emitEvent(me.LOGIN_FAILURE,le.Redirect,null,l),l}}acquireTokenPopup(e){const t=this.getRequestCorrelationId(e),r=this.performanceClient.startMeasurement(x.AcquireTokenPopup,t);r.add({scenarioId:e.scenarioId,accountType:Dr(e.account)});try{this.logger.verbose("acquireTokenPopup called",t),Zc(this.initialized,r),this.browserStorage.setInteractionInProgress(!0)}catch(l){return Promise.reject(l)}const o=this.getAllAccounts();o.length>0?this.eventHandler.emitEvent(me.ACQUIRE_TOKEN_START,le.Popup,e):this.eventHandler.emitEvent(me.LOGIN_START,le.Popup,e);let a;return this.canUseNative(e)?a=this.acquireTokenNative({...e,correlationId:t},it.acquireTokenPopup).then(l=>(this.browserStorage.setInteractionInProgress(!1),r.end({success:!0,isNativeBroker:!0,accountType:Dr(l.account)}),l)).catch(l=>{if(l instanceof Br&&la(l))return this.nativeExtensionProvider=void 0,this.createPopupClient(t).acquireToken(e);if(l instanceof Tr)return this.logger.verbose("acquireTokenPopup - Resolving interaction required error thrown by native broker by falling back to web flow"),this.createPopupClient(t).acquireToken(e);throw this.browserStorage.setInteractionInProgress(!1),l}):a=this.createPopupClient(t).acquireToken(e),a.then(l=>(o.length<this.getAllAccounts().length?this.eventHandler.emitEvent(me.LOGIN_SUCCESS,le.Popup,l):this.eventHandler.emitEvent(me.ACQUIRE_TOKEN_SUCCESS,le.Popup,l),r.end({success:!0,accessTokenSize:l.accessToken.length,idTokenSize:l.idToken.length,accountType:Dr(l.account)}),l)).catch(l=>(o.length>0?this.eventHandler.emitEvent(me.ACQUIRE_TOKEN_FAILURE,le.Popup,null,l):this.eventHandler.emitEvent(me.LOGIN_FAILURE,le.Popup,null,l),r.end({success:!1},l),Promise.reject(l)))}trackPageVisibilityWithMeasurement(){const e=this.ssoSilentMeasurement||this.acquireTokenByCodeAsyncMeasurement;e&&(this.logger.info("Perf: Visibility change detected in ",e.event.name),e.increment({visibilityChangeCount:1}))}async ssoSilent(e){var a,l;const t=this.getRequestCorrelationId(e),r={...e,prompt:e.prompt,correlationId:t};this.ssoSilentMeasurement=this.performanceClient.startMeasurement(x.SsoSilent,t),(a=this.ssoSilentMeasurement)==null||a.add({scenarioId:e.scenarioId,accountType:Dr(e.account)}),Zc(this.initialized,this.ssoSilentMeasurement),(l=this.ssoSilentMeasurement)==null||l.increment({visibilityChangeCount:0}),document.addEventListener("visibilitychange",this.trackPageVisibilityWithMeasurement),this.logger.verbose("ssoSilent called",t),this.eventHandler.emitEvent(me.SSO_SILENT_START,le.Silent,r);let o;return this.canUseNative(r)?o=this.acquireTokenNative(r,it.ssoSilent).catch(d=>{if(d instanceof Br&&la(d))return this.nativeExtensionProvider=void 0,this.createSilentIframeClient(r.correlationId).acquireToken(r);throw d}):o=this.createSilentIframeClient(r.correlationId).acquireToken(r),o.then(d=>{var h;return this.eventHandler.emitEvent(me.SSO_SILENT_SUCCESS,le.Silent,d),(h=this.ssoSilentMeasurement)==null||h.end({success:!0,isNativeBroker:d.fromNativeBroker,accessTokenSize:d.accessToken.length,idTokenSize:d.idToken.length,accountType:Dr(d.account)}),d}).catch(d=>{var h;throw this.eventHandler.emitEvent(me.SSO_SILENT_FAILURE,le.Silent,null,d),(h=this.ssoSilentMeasurement)==null||h.end({success:!1},d),d}).finally(()=>{document.removeEventListener("visibilitychange",this.trackPageVisibilityWithMeasurement)})}async acquireTokenByCode(e){const t=this.getRequestCorrelationId(e);this.logger.trace("acquireTokenByCode called",t);const r=this.performanceClient.startMeasurement(x.AcquireTokenByCode,t);Zc(this.initialized,r),this.eventHandler.emitEvent(me.ACQUIRE_TOKEN_BY_CODE_START,le.Silent,e),r.add({scenarioId:e.scenarioId});try{if(e.code&&e.nativeAccountId)throw ie(gT);if(e.code){const o=e.code;let a=this.hybridAuthCodeResponses.get(o);return a?(this.logger.verbose("Existing acquireTokenByCode request found",t),r.discard()):(this.logger.verbose("Initiating new acquireTokenByCode request",t),a=this.acquireTokenByCodeAsync({...e,correlationId:t}).then(l=>(this.eventHandler.emitEvent(me.ACQUIRE_TOKEN_BY_CODE_SUCCESS,le.Silent,l),this.hybridAuthCodeResponses.delete(o),r.end({success:!0,isNativeBroker:l.fromNativeBroker,accessTokenSize:l.accessToken.length,idTokenSize:l.idToken.length,accountType:Dr(l.account)}),l)).catch(l=>{throw this.hybridAuthCodeResponses.delete(o),this.eventHandler.emitEvent(me.ACQUIRE_TOKEN_BY_CODE_FAILURE,le.Silent,null,l),r.end({success:!1},l),l}),this.hybridAuthCodeResponses.set(o,a)),await a}else if(e.nativeAccountId)if(this.canUseNative(e,e.nativeAccountId)){const o=await this.acquireTokenNative({...e,correlationId:t},it.acquireTokenByCode,e.nativeAccountId).catch(a=>{throw a instanceof Br&&la(a)&&(this.nativeExtensionProvider=void 0),a});return r.end({accountType:Dr(o.account),success:!0}),o}else throw ie(pT);else throw ie(mT)}catch(o){throw this.eventHandler.emitEvent(me.ACQUIRE_TOKEN_BY_CODE_FAILURE,le.Silent,null,o),r.end({success:!1},o),o}}async acquireTokenByCodeAsync(e){var o;return this.logger.trace("acquireTokenByCodeAsync called",e.correlationId),this.acquireTokenByCodeAsyncMeasurement=this.performanceClient.startMeasurement(x.AcquireTokenByCodeAsync,e.correlationId),(o=this.acquireTokenByCodeAsyncMeasurement)==null||o.increment({visibilityChangeCount:0}),document.addEventListener("visibilitychange",this.trackPageVisibilityWithMeasurement),await this.createSilentAuthCodeClient(e.correlationId).acquireToken(e).then(a=>{var l;return(l=this.acquireTokenByCodeAsyncMeasurement)==null||l.end({success:!0,fromCache:a.fromCache,isNativeBroker:a.fromNativeBroker}),a}).catch(a=>{var l;throw(l=this.acquireTokenByCodeAsyncMeasurement)==null||l.end({success:!1},a),a}).finally(()=>{document.removeEventListener("visibilitychange",this.trackPageVisibilityWithMeasurement)})}async acquireTokenFromCache(e,t){switch(this.performanceClient.addQueueMeasurement(x.AcquireTokenFromCache,e.correlationId),t){case Pn.Default:case Pn.AccessToken:case Pn.AccessTokenAndRefreshToken:const r=this.createSilentCacheClient(e.correlationId);return Q(r.acquireToken.bind(r),x.SilentCacheClientAcquireToken,this.logger,this.performanceClient,e.correlationId)(e);default:throw Y(co)}}async acquireTokenByRefreshToken(e,t){switch(this.performanceClient.addQueueMeasurement(x.AcquireTokenByRefreshToken,e.correlationId),t){case Pn.Default:case Pn.AccessTokenAndRefreshToken:case Pn.RefreshToken:case Pn.RefreshTokenAndNetwork:const r=this.createSilentRefreshClient(e.correlationId);return Q(r.acquireToken.bind(r),x.SilentRefreshClientAcquireToken,this.logger,this.performanceClient,e.correlationId)(e);default:throw Y(co)}}async acquireTokenBySilentIframe(e){this.performanceClient.addQueueMeasurement(x.AcquireTokenBySilentIframe,e.correlationId);const t=this.createSilentIframeClient(e.correlationId);return Q(t.acquireToken.bind(t),x.SilentIframeClientAcquireToken,this.logger,this.performanceClient,e.correlationId)(e)}async logout(e){const t=this.getRequestCorrelationId(e);return this.logger.warning("logout API is deprecated and will be removed in msal-browser v3.0.0. Use logoutRedirect instead.",t),this.logoutRedirect({correlationId:t,...e})}async logoutRedirect(e){const t=this.getRequestCorrelationId(e);return dy(this.initialized,this.config),this.browserStorage.setInteractionInProgress(!0),this.createRedirectClient(t).logout(e)}logoutPopup(e){try{const t=this.getRequestCorrelationId(e);return Im(this.initialized),this.browserStorage.setInteractionInProgress(!0),this.createPopupClient(t).logout(e)}catch(t){return Promise.reject(t)}}async clearCache(e){if(!this.isBrowserEnvironment){this.logger.info("in non-browser environment, returning early.");return}const t=this.getRequestCorrelationId(e);return this.createSilentCacheClient(t).logout(e)}getAllAccounts(e){return VH(this.logger,this.browserStorage,this.isBrowserEnvironment,e)}getAccount(e){return FH(e,this.logger,this.browserStorage)}getAccountByUsername(e){return HH(e,this.logger,this.browserStorage)}getAccountByHomeId(e){return $H(e,this.logger,this.browserStorage)}getAccountByLocalId(e){return KH(e,this.logger,this.browserStorage)}setActiveAccount(e){WH(e,this.browserStorage)}getActiveAccount(){return zH(this.browserStorage)}async hydrateCache(e,t){this.logger.verbose("hydrateCache called");const r=Pt.createFromAccountInfo(e.account,e.cloudGraphHostName,e.msGraphHost);return this.browserStorage.setAccount(r),e.fromNativeBroker?(this.logger.verbose("Response was from native broker, storing in-memory"),this.nativeInternalStorage.hydrateCache(e,t)):this.browserStorage.hydrateCache(e,t)}async acquireTokenNative(e,t,r){if(this.logger.trace("acquireTokenNative called"),!this.nativeExtensionProvider)throw ie(qs);return new ya(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,t,this.performanceClient,this.nativeExtensionProvider,r||this.getNativeAccountId(e),this.nativeInternalStorage,e.correlationId).acquireToken(e)}canUseNative(e,t){if(this.logger.trace("canUseNative called"),!Vr.isNativeAvailable(this.config,this.logger,this.nativeExtensionProvider,e.authenticationScheme))return this.logger.trace("canUseNative: isNativeAvailable returned false, returning false"),!1;if(e.prompt)switch(e.prompt){case Bt.NONE:case Bt.CONSENT:case Bt.LOGIN:this.logger.trace("canUseNative: prompt is compatible with native flow");break;default:return this.logger.trace(`canUseNative: prompt = ${e.prompt} is not compatible with native flow, returning false`),!1}return!t&&!this.getNativeAccountId(e)?(this.logger.trace("canUseNative: nativeAccountId is not available, returning false"),!1):!0}getNativeAccountId(e){const t=e.account||this.getAccount({loginHint:e.loginHint,sid:e.sid})||this.getActiveAccount();return t&&t.nativeAccountId||""}createPopupClient(e){return new c$(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,this.performanceClient,this.nativeInternalStorage,this.nativeExtensionProvider,e)}createRedirectClient(e){return new u$(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,this.performanceClient,this.nativeInternalStorage,this.nativeExtensionProvider,e)}createSilentIframeClient(e){return new p$(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,it.ssoSilent,this.performanceClient,this.nativeInternalStorage,this.nativeExtensionProvider,e)}createSilentCacheClient(e){return new xT(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,this.performanceClient,this.nativeExtensionProvider,e)}createSilentRefreshClient(e){return new _$(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,this.performanceClient,this.nativeExtensionProvider,e)}createSilentAuthCodeClient(e){return new C$(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,it.acquireTokenByCode,this.performanceClient,this.nativeExtensionProvider,e)}addEventCallback(e,t){return this.eventHandler.addEventCallback(e,t)}removeEventCallback(e){this.eventHandler.removeEventCallback(e)}addPerformanceCallback(e){return RT(),this.performanceClient.addPerformanceCallback(e)}removePerformanceCallback(e){return this.performanceClient.removePerformanceCallback(e)}enableAccountStorageEvents(){typeof window>"u"||(this.listeningToStorageEvents?this.logger.verbose("Account storage listener already registered."):(this.logger.verbose("Adding account storage listener."),this.listeningToStorageEvents=!0,window.addEventListener("storage",this.handleAccountCacheChange)))}disableAccountStorageEvents(){typeof window>"u"||(this.listeningToStorageEvents?(this.logger.verbose("Removing account storage listener."),window.removeEventListener("storage",this.handleAccountCacheChange),this.listeningToStorageEvents=!1):this.logger.verbose("No account storage listener registered."))}handleAccountCacheChange(e){var t;try{(t=e.key)!=null&&t.includes(Lt.ACTIVE_ACCOUNT_FILTERS)&&this.eventHandler.emitEvent(me.ACTIVE_ACCOUNT_CHANGED);const r=e.newValue||e.oldValue;if(!r)return;const o=JSON.parse(r);if(typeof o!="object"||!Pt.isAccountEntity(o))return;const l=Ia.toObject(new Pt,o).getAccountInfo();!e.oldValue&&e.newValue?(this.logger.info("Account was added to cache in a different window"),this.eventHandler.emitEvent(me.ACCOUNT_ADDED,void 0,l)):!e.newValue&&e.oldValue&&(this.logger.info("Account was removed from cache in a different window"),this.eventHandler.emitEvent(me.ACCOUNT_REMOVED,void 0,l))}catch{return}}getTokenCache(){return this.tokenCache}getLogger(){return this.logger}setLogger(e){this.logger=e}initializeWrapperLibrary(e,t){this.browserStorage.setWrapperMetadata(e,t)}setNavigationClient(e){this.navigationClient=e}getConfiguration(){return this.config}getPerformanceClient(){return this.performanceClient}isBrowserEnv(){return this.isBrowserEnvironment}getRequestCorrelationId(e){return e!=null&&e.correlationId?e.correlationId:this.isBrowserEnvironment?po():V.EMPTY_STRING}async loginRedirect(e){const t=this.getRequestCorrelationId(e);return this.logger.verbose("loginRedirect called",t),this.acquireTokenRedirect({correlationId:t,...e||cy})}loginPopup(e){const t=this.getRequestCorrelationId(e);return this.logger.verbose("loginPopup called",t),this.acquireTokenPopup({correlationId:t,...e||cy})}async acquireTokenSilent(e){const t=this.getRequestCorrelationId(e),r=this.performanceClient.startMeasurement(x.AcquireTokenSilent,t);r.add({cacheLookupPolicy:e.cacheLookupPolicy,scenarioId:e.scenarioId}),Zc(this.initialized,r),this.logger.verbose("acquireTokenSilent called",t);const o=e.account||this.getActiveAccount();if(!o)throw ie(sT);r.add({accountType:Dr(o)});const a={clientId:this.config.auth.clientId,authority:e.authority||V.EMPTY_STRING,scopes:e.scopes,homeAccountIdentifier:o.homeAccountId,claims:e.claims,authenticationScheme:e.authenticationScheme,resourceRequestMethod:e.resourceRequestMethod,resourceRequestUri:e.resourceRequestUri,shrClaims:e.shrClaims,sshKid:e.sshKid,shrOptions:e.shrOptions},l=JSON.stringify(a),d=this.activeSilentTokenRequests.get(l);if(typeof d>"u"){this.logger.verbose("acquireTokenSilent called for the first time, storing active request",t);const h=Q(this.acquireTokenSilentAsync.bind(this),x.AcquireTokenSilentAsync,this.logger,this.performanceClient,t)({...e,correlationId:t},o).then(f=>(this.activeSilentTokenRequests.delete(l),r.end({success:!0,fromCache:f.fromCache,isNativeBroker:f.fromNativeBroker,cacheLookupPolicy:e.cacheLookupPolicy,accessTokenSize:f.accessToken.length,idTokenSize:f.idToken.length}),f)).catch(f=>{throw this.activeSilentTokenRequests.delete(l),r.end({success:!1},f),f});return this.activeSilentTokenRequests.set(l,h),{...await h,state:e.state}}else return this.logger.verbose("acquireTokenSilent has been called previously, returning the result from the first call",t),r.discard(),{...await d,state:e.state}}async acquireTokenSilentAsync(e,t){const r=()=>this.trackPageVisibility(e.correlationId);this.performanceClient.addQueueMeasurement(x.AcquireTokenSilentAsync,e.correlationId),this.eventHandler.emitEvent(me.ACQUIRE_TOKEN_START,le.Silent,e),e.correlationId&&this.performanceClient.incrementFields({visibilityChangeCount:0},e.correlationId),document.addEventListener("visibilitychange",r);const o=await Q(QH,x.InitializeSilentRequest,this.logger,this.performanceClient,e.correlationId)(e,t,this.config,this.performanceClient,this.logger),a=e.cacheLookupPolicy||Pn.Default;return this.acquireTokenSilentNoIframe(o,a).catch(async d=>{if(E$(d,a))if(this.activeIframeRequest)if(a!==Pn.Skip){const[f,g]=this.activeIframeRequest;this.logger.verbose(`Iframe request is already in progress, awaiting resolution for request with correlationId: ${g}`,o.correlationId);const _=this.performanceClient.startMeasurement(x.AwaitConcurrentIframe,o.correlationId);_.add({awaitIframeCorrelationId:g});const p=await f;if(_.end({success:p}),p)return this.logger.verbose(`Parallel iframe request with correlationId: ${g} succeeded. Retrying cache and/or RT redemption`,o.correlationId),this.acquireTokenSilentNoIframe(o,a);throw this.logger.info(`Iframe request with correlationId: ${g} failed. Interaction is required.`),d}else return this.logger.warning("Another iframe request is currently in progress and CacheLookupPolicy is set to Skip. This may result in degraded performance and/or reliability for both calls. Please consider changing the CacheLookupPolicy to take advantage of request queuing and token cache.",o.correlationId),Q(this.acquireTokenBySilentIframe.bind(this),x.AcquireTokenBySilentIframe,this.logger,this.performanceClient,o.correlationId)(o);else{let f;return this.activeIframeRequest=[new Promise(g=>{f=g}),o.correlationId],this.logger.verbose("Refresh token expired/invalid or CacheLookupPolicy is set to Skip, attempting acquire token by iframe.",o.correlationId),Q(this.acquireTokenBySilentIframe.bind(this),x.AcquireTokenBySilentIframe,this.logger,this.performanceClient,o.correlationId)(o).then(g=>(f(!0),g)).catch(g=>{throw f(!1),g}).finally(()=>{this.activeIframeRequest=void 0})}else throw d}).then(d=>(this.eventHandler.emitEvent(me.ACQUIRE_TOKEN_SUCCESS,le.Silent,d),e.correlationId&&this.performanceClient.addFields({fromCache:d.fromCache,isNativeBroker:d.fromNativeBroker},e.correlationId),d)).catch(d=>{throw this.eventHandler.emitEvent(me.ACQUIRE_TOKEN_FAILURE,le.Silent,null,d),d}).finally(()=>{document.removeEventListener("visibilitychange",r)})}async acquireTokenSilentNoIframe(e,t){return Vr.isNativeAvailable(this.config,this.logger,this.nativeExtensionProvider,e.authenticationScheme)&&e.account.nativeAccountId?(this.logger.verbose("acquireTokenSilent - attempting to acquire token from native platform"),this.acquireTokenNative(e,it.acquireTokenSilent_silentFlow).catch(async r=>{throw r instanceof Br&&la(r)?(this.logger.verbose("acquireTokenSilent - native platform unavailable, falling back to web flow"),this.nativeExtensionProvider=void 0,Y(co)):r})):(this.logger.verbose("acquireTokenSilent - attempting to acquire token from web flow"),Q(this.acquireTokenFromCache.bind(this),x.AcquireTokenFromCache,this.logger,this.performanceClient,e.correlationId)(e,t).catch(r=>{if(t===Pn.AccessToken)throw r;return this.eventHandler.emitEvent(me.ACQUIRE_TOKEN_NETWORK_START,le.Silent,e),Q(this.acquireTokenByRefreshToken.bind(this),x.AcquireTokenByRefreshToken,this.logger,this.performanceClient,e.correlationId)(e,t)}))}}function E$(n,e){const t=!(n instanceof Tr&&n.subError!==fu),r=n.errorCode===Dn.INVALID_GRANT_ERROR||n.errorCode===co,o=t&&r||n.errorCode===Ul||n.errorCode===hm,a=oH.includes(e);return o&&a}/*! @azure/msal-browser v3.28.1 2025-01-14 */async function w$(n,e){const t=new Ai(n);return await t.initialize(),yu.createController(t,e)}/*! @azure/msal-browser v3.28.1 2025-01-14 */class Rm{static async createPublicClientApplication(e){const t=await w$(e);return new Rm(e,t)}constructor(e,t){this.controller=t||new yu(new Ai(e))}async initialize(e){return this.controller.initialize(e)}async acquireTokenPopup(e){return this.controller.acquireTokenPopup(e)}acquireTokenRedirect(e){return this.controller.acquireTokenRedirect(e)}acquireTokenSilent(e){return this.controller.acquireTokenSilent(e)}acquireTokenByCode(e){return this.controller.acquireTokenByCode(e)}addEventCallback(e,t){return this.controller.addEventCallback(e,t)}removeEventCallback(e){return this.controller.removeEventCallback(e)}addPerformanceCallback(e){return this.controller.addPerformanceCallback(e)}removePerformanceCallback(e){return this.controller.removePerformanceCallback(e)}enableAccountStorageEvents(){this.controller.enableAccountStorageEvents()}disableAccountStorageEvents(){this.controller.disableAccountStorageEvents()}getAccount(e){return this.controller.getAccount(e)}getAccountByHomeId(e){return this.controller.getAccountByHomeId(e)}getAccountByLocalId(e){return this.controller.getAccountByLocalId(e)}getAccountByUsername(e){return this.controller.getAccountByUsername(e)}getAllAccounts(e){return this.controller.getAllAccounts(e)}handleRedirectPromise(e){return this.controller.handleRedirectPromise(e)}loginPopup(e){return this.controller.loginPopup(e)}loginRedirect(e){return this.controller.loginRedirect(e)}logout(e){return this.controller.logout(e)}logoutRedirect(e){return this.controller.logoutRedirect(e)}logoutPopup(e){return this.controller.logoutPopup(e)}ssoSilent(e){return this.controller.ssoSilent(e)}getTokenCache(){return this.controller.getTokenCache()}getLogger(){return this.controller.getLogger()}setLogger(e){this.controller.setLogger(e)}setActiveAccount(e){this.controller.setActiveAccount(e)}getActiveAccount(){return this.controller.getActiveAccount()}initializeWrapperLibrary(e,t){return this.controller.initializeWrapperLibrary(e,t)}setNavigationClient(e){this.controller.setNavigationClient(e)}getConfiguration(){return this.controller.getConfiguration()}async hydrateCache(e,t){return this.controller.hydrateCache(e,t)}clearCache(e){return this.controller.clearCache(e)}}const dh=process.env.JPLAN_WEBAPP__APP_PROXY_TENANT_NAME??"",T$=process.env.JPLAN_WEBAPP__APP_PROXY_CLIENT_ID??"",b$=process.env.JPLAN_WEBAPP__APP_PROXY_USER_FLOW??"",mf=process.env.JPLAN_WEBAPP__URL_AUTH??process.env.JPLAN_WEBAPP__URL_BASE??"",S$={auth:{clientId:T$,authority:`https://${dh}.b2clogin.com/${dh}.onmicrosoft.com/${b$}`,knownAuthorities:[`${dh}.b2clogin.com`],redirectUri:process.env.JPLAN_AUTOMATION_ENVIRONMENT?`${mf}/_/dashboard`:mf},cache:{cacheLocation:"localStorage",storeAuthStateInCookie:!1},system:{loggerOptions:{loggerCallback:(n,e)=>{n===nt.Error&&console.error(e)},logLevel:nt.Warning}}},VT=(n,e)=>({scopes:["https://graph.microsoft.com/.default","openid","profile"],redirectStartPage:`${mf}${n}`,extraQueryParameters:e}),Gt=new Rm(S$),py=c.ref(null);function FT(){async function n(e){var t;if(e)try{const r=e.idTokenClaims;if(!(r!=null&&r.aud))throw new Error("User audience (aud) is missing in ID token claims");const o=localStorage.getItem(`msal.token.keys.${r.aud}`);if(!o)throw new Error(`Token keys para ${r.aud} não encontrados no localStorage`);const a=JSON.parse(o),l=(t=a==null?void 0:a.idToken)==null?void 0:t[0];if(!l)throw new Error("idToken não encontrado nos token keys");const d=localStorage.getItem(l);if(!d)throw new Error(`Dados do token para ID ${l} não encontrados no localStorage`);const h=JSON.parse(d),f=h==null?void 0:h.secret;if(!f)throw new Error("Secret não encontrado nos dados do token");sessionStorage.setItem("isAuthenticated","true"),py.value=f}catch(r){console.error("Erro ao obter token de acesso:",r)}}return{jToken:py,setJToken:n}}let el=null;const nr=c.ref(null),Xi=c.ref(null),HT=c.ref(Math.floor(Date.now()/1e3));gf.useIntervalFn(()=>I$(),1e3);function I$(){var r,o;if(!((o=(r=nr.value)==null?void 0:r.idTokenClaims)!=null&&o.exp))return;const n=Math.floor(Date.now()/1e3),e=300,t=nr.value.idTokenClaims.exp;HT.value=t-n-e}function Om(){if(el)return el;const{setJToken:n,jToken:e}=FT(),t=c.computed(()=>!!nr.value),r=c.computed(()=>nr.value);let o;async function a(p,w){if(!t.value)switch(p){case"redirect":w&&(o=w,await h());break;case"tab":default:await l();break}}const l=async()=>new Promise((p,w)=>{try{localStorage.clear();const C=process.env.JPLAN_WEBAPP__URL_AUTH,T=window.open(C);if(!T){console.error("Failed to open authentication window"),w("Failed to open authentication window");return}const k=Date.now(),S=6e4,N=setInterval(()=>{if(Date.now()-k>S||T.closed){clearInterval(N),console.error("Authentication canceled or timeout reached."),w("Authentication canceled or timeout reached.");return}Object.keys(localStorage).some(L=>L.startsWith("msal.account.keys"))&&(clearInterval(N),d(),T.close(),p())},500)}catch(C){console.error("Error in handleRedirect:",C),w(C)}}),d=async()=>{try{await Gt.initialize();const p=Gt.getActiveAccount();if(p)nr.value=p;else{const w=await Gt.handleRedirectPromise();w?(Gt.setActiveAccount(w.account),nr.value=Gt.getActiveAccount()):console.error("Falha na autenticação")}}catch(p){console.error("Erro no processo de autenticação:",p)}nr.value&&await n(nr.value)},h=async()=>{try{await Gt.initialize();const p=await Gt.handleRedirectPromise();if(!p||Gt.getAllAccounts().length===0){const w=VT(o);await Gt.loginRedirect(w);return}Gt.setActiveAccount(p.account),nr.value=Gt.getActiveAccount(),nr.value&&await n(nr.value),Xi.value="updated"}catch(p){console.error("handleRedirect failed",p)}};async function f(){ve.value=!0,Xi.value="updating";try{const p=await Gt.acquireTokenSilent({scopes:["https://graph.microsoft.com/.default","openid","profile"]});Gt.setActiveAccount(p.account),await n(nr.value),Xi.value="updated"}catch(p){console.error("Failed to refresh token, forcing new login.",p),Xi.value="error",localStorage.clear(),window.location.reload()}ve.value=!1}const g=async()=>{try{await Gt.initialize(),localStorage.clear(),await Gt.logoutRedirect({postLogoutRedirectUri:"/"})}catch(p){console.error("Logout error",p)}};c.watch(HT,async p=>{p<=0&&Xi.value==="updated"&&await f()});const _=c.computed(()=>e.value);return el={isAuthenticated:t,authState:Xi,account:r,token:_,refreshToken:f,handleRedirect:a,logout:g},el}const{jToken:_y}=FT(),Pm=()=>{const{toast:n}=uC(),e=yt.create({headers:{"Content-Type":"application/json"}});function t(l,d){const h={url:l.url||"",method:(l.method||"get").toUpperCase(),status:(d==null?void 0:d.status)||0};return{success:f=>n.server.success(f,h),error:f=>n.server.error(f,h),warning:f=>n.server.warning(f,h),info:f=>n.server.info(f,h)}}c.watch(_y,l=>{e.interceptors.request.use(d=>(l&&(d.headers.Authorization=`Bearer ${l}`),d))},{immediate:!0});let r=1;e.interceptors.response.use(l=>(l.notify=t(l.config,l),l),async l=>{var d;if(l.config&&(l.notify=t(l.config,l.response)),l.config&&l.config.headers){const h=l.config;if(((d=l.response)==null?void 0:d.status)===401&&r>0){r--;try{return h.headers.Authorization=`Bearer ${_y.value}`,await e(h)}catch(f){return Promise.reject(f)}}}return Promise.reject(l)});async function o({url:l,method:d,header:h={},body:f,baseURL:g}){return g&&(e.defaults.baseURL=g),e({url:l,method:d,headers:h,data:f})}async function a({url:l,method:d,header:h,body:f,baseURL:g}){return g&&(e.defaults.baseURL=g),e({url:l,method:d,headers:h,data:f})}return Object.assign(e,{_request:o,rawRequest:a})},{request:vy}=Pm(),yy=c.ref(null),Cy=c.ref("default"),hh=c.ref(null),fh=c.ref({scope_type:"org"});function Cu(){var _,p;const{handleRedirect:n,account:e,logout:t}=Om();(p=(_=e.value)==null?void 0:_.idTokenClaims)==null||p.domain;const r=c.computed(()=>{var w,C;return{domain:(C=(w=e.value)==null?void 0:w.idTokenClaims)==null?void 0:C.domain,environment:Cy.value,...fh.value}}),o=c.computed(()=>fh.value);async function a(){var w;(!e.value||!((w=e.value.idTokenClaims)!=null&&w.email))&&await n();try{await l(),await d()}catch{}}async function l(){var w,C;try{const T=(C=(w=e.value)==null?void 0:w.idTokenClaims)==null?void 0:C.email;if(!T)throw new Error("Email is undefined");const k=await vy({url:`https://api.jplan.com.br/platform/user/profile/?email=${T}`,method:"GET"});hh.value=k.data??null}catch(T){console.error("Failed to fetch user profile:",T)}}async function d(){var w;try{if(!((w=hh.value)!=null&&w.email))throw new Error("User email is undefined");const C=await vy({url:"https://api.jplan.com.br/platform/user/domain/",method:"GET"});yy.value=C.data.data??[]}catch(C){console.error("Failed to fetch user domains:",C)}}function h(w){fh.value=w}function f(w){Cy.value=w,h(r.value)}async function g(w,C){const T=VT(w,{request_domain:C});await Gt.loginRedirect(T)}return{__init__:a,user:hh,userDomains:yy,setEnv:f,setScope:h,changeDomain:g,session:r,scope:o,logout:t}}const A$={path:"/_/dashboard",component:()=>Promise.resolve().then(()=>require("./AuthRoute-erpJEq_n.js")),meta:{requiresAuth:!1}},k$={path:"/jplan-auth-fail",component:()=>Promise.resolve().then(()=>require("./AuthFailRoute-DHl-IhUQ.js")),meta:{requiresAuth:!1}},{isAuthenticated:Ey,handleRedirect:N$}=Om(),R$=Cu();function O$(n,e){n.addRoute(A$),n.addRoute(k$),n.beforeEach(async(t,r,o)=>{function a(d){return d.matched.some(h=>h.meta.requiresAuth)}if(!a(t))return o();if(!Ey.value){ve.value=!0;try{await N$(e,t.fullPath),await R$.__init__()}catch(d){console.error("Fail to authenticate",d),await n.push("/jplan-auth-fail")}ve.value=!1}if(Ey.value){if(localStorage.getItem("returnRoute")&&localStorage.getItem("returnRoute")!==null){const d=localStorage.getItem("returnRoute")??"/";console.log("trying to go to saved route:",d),o(d),localStorage.removeItem("returnRoute");return}o()}})}const{scope:wy}=Cu();function P$(){const n=Pm(),e=c.ref({scope_type:"org"});async function t(r){e.value=r}return c.watch(wy,()=>{n.interceptors.request.use(r=>{const o=r.headers,a=o.Authorization;a&&(o.Authorization=a);const l=wy.value;return l&&(l.scope_type&&(o["j-scope-type"]=l.scope_type,l.organization&&(o["j-scope-organization"]=l.organization),l.team&&(o["j-scope-team"]=l.team)),l.environment&&(o["j-scope-environment"]=l.environment)),r})},{immediate:!0}),Object.assign(n,{setScope:t,scope:e})}function xa(n){const e=P$();e.defaults.baseURL=n;const t=c.ref({scope_type:"org"});async function r(o){t.value=o}return c.watch(t,()=>{e.interceptors.request.use(o=>{const a=t.value;return delete o.headers["j-scope-type"],delete o.headers["j-scope-organization"],delete o.headers["j-scope-team"],a!=null&&a.scope_type&&(o.headers["j-scope-type"]=a.scope_type),a!=null&&a.organization&&(o.headers["j-scope-organization"]=a.organization),a!=null&&a.team&&(o.headers["j-scope-team"]=a.team),o})},{immediate:!0}),Object.assign(e,{setScope:r,scope:t})}const Ty={enUS:{widget:"widget",spacer:"spacer"},ptBr:{widget:"widget",spacer:"Espaçador"}},Mm={"pt-BR":{placeholders:{selectFilter:"Selecionar filtro",visualize:"Visualizar",actions:"Ações",search:"Pesquisar"},dialogs:{columnSettings:{title:"Configurações de coluna"},scope:{title:"Escopo",unknown:"Desconhecido",domain:"Domínio",environment:"Ambiente",organizational:"Organizacional",organization:"Organização",team:"Time",user:"Usuário",none:"Nenhum",selectOrganization:"Selecione uma Organização",selectTeam:"Selecione um Time"},deleteAll:{title:"Confirme a ação",text:"Tem certeza que deseja apagar todos os selecionados?"}},actions:{save:"Salvar",cancel:"Cancelar",edit:"Editar",delete:"Apagar",disable:"Desabilitar",confirm:"Confirmar",back:"Voltar",deleteAll:"Apagar"},forms:{metadata:{created:"Criado",updated:"Atualizado",modified:"Modificado",delegated:"Delegado"}},$vuetify:{dataFooter:{itemsPerPageAll:"Todos",itemsPerPageText:"Itens por página:",pageText:"{0}-{1} de {2}"}},toast:{error:{create_failed:"Falha ao criar {entity}",update_failed:"Falha ao atualizar {entity}",delete_failed:"Falha ao apagar {entity}",fetch_failed:"Falha ao buscar {entity}",activate_failed:"Falha ao ativar {entity}",deactivate_failed:"Falha ao desativar {entity}",link_failed:"Falha ao vincular {entity}",unlink_failed:"Falha ao desvincular {entity}"},success:{create_success:"{entity} criado com sucesso",update_success:"{entity} atualizado com sucesso",delete_success:"{entity} apagado com sucesso",activate_success:"{entity} ativado com sucesso",deactivate_success:"{entity} desativado com sucesso",link_success:"{entity} vinculado com sucesso",unlink_success:"{entity} desvinculado com sucesso"},info:{already_linked:"{entity} já está vinculado",select_valid_item:"Selecione um item válido"}},app:{widget:Ty.ptBr}},"en-US":{placeholders:{selectFilter:"Select a filter",visualize:"Visualize",actions:"Actions",search:"Search"},dialogs:{columnSettings:{title:"Column Settings"},scope:{title:"Scope",unknown:"Unknown",domain:"Domain",environment:"Environment",organizational:"Organizational",organization:"Organization",team:"Team",user:"User",none:"None",selectOrganization:"Select a organization",selectTeam:"Select a Team"},deleteAll:{title:"Confirm action",text:"Are you sure you want to delete all selected items?"}},actions:{save:"Save",cancel:"Cancel",edit:"Edit",delete:"Delete",disable:"Disable",back:"Back",confirm:"Confirm",deleteAll:"Delete"},forms:{metadata:{created:"Created",updated:"Updated",modified:"Modified",delegated:"Delegated"}},$vuetify:{dataFooter:{itemsPerPageAll:"All",itemsPerPageText:"Items per page:",pageText:"{0}-{1} of {2}"}},toast:{error:{create_failed:"Failed to create {entity}",update_failed:"Failed to update {entity}",delete_failed:"Failed to delete {entity}",fetch_failed:"Failed to fetch {entity}",activate_failed:"Failed to activate {entity}",deactivate_failed:"Failed to deactivate {entity}",link_failed:"Failed to link {entity}",unlink_failed:"Failed to unlink {entity}"},success:{create_success:"{entity} created successfully",update_success:"{entity} updated successfully",delete_success:"{entity} deleted successfully",activate_success:"{entity} activated successfully",deactivate_success:"{entity} deactivated successfully",link_success:"{entity} linked successfully",unlink_success:"{entity} unlinked successfully"},info:{already_linked:"{entity} is already linked",select_valid_item:"Please select a valid item"}},app:{widget:Ty.ptBr}}},M$=Object.keys(Mm),by=navigator.language,D$=M$.includes(by)?by:"pt-BR",$=UM({locale:D$,fallbackLocale:"en-US",messages:Mm});function L$(){const n=xa("https://api.jplan.com.br/management/organization"),{error:e}=sr();return{async getOrgList(t){try{const r=t?`?filter_query=${t}`:"",o=await n.get(`/list/${r}`);if(o.data.error)throw e($.global.t("toast.error.fetch_failed",{entity:"Organization"})),new Error(o.data.error);return o.data.data}catch(r){console.error("Error in getOrgList:",r),e($.global.t("toast.error.fetch_failed",{entity:"Organization"}));return}},async createOrg(t){var r,o;try{const a=await n.post("/item",t);return a.status>=200&&a.status<300?a:void 0}catch(a){throw console.error("Error in createOrg:",a),e(((o=(r=a.response)==null?void 0:r.data)==null?void 0:o.message)||$.global.t("toast.error.create_failed",{entity:"Organization"})),a}},async updateOrg(t){var r,o;try{const a=await n.patch("/item",t);if(a.data.error)throw e($.global.t("toast.error.update_failed",{entity:"Organization"})),new Error(a.data.error);return a}catch(a){throw console.error("Error in updateOrg:",a),e(((o=(r=a.response)==null?void 0:r.data)==null?void 0:o.message)||$.global.t("toast.error.update_failed",{entity:"Organization"})),a}},async getOrg(t){var r,o;try{const a=await n.get(`/item/${t}`);if(a.data.error)throw e($.global.t("toast.error.fetch_failed",{entity:"Organization"})),new Error(a.data.error);return a.data}catch(a){throw console.error("Error in getOrg:",a),e(((o=(r=a.response)==null?void 0:r.data)==null?void 0:o.message)||$.global.t("toast.error.fetch_failed",{entity:"Organization"})),a}},async activateOrg(t){var r,o;try{const a=await n.post(`/item/${t}/activate`);if(a.data.error)throw e($.global.t("toast.error.activate_failed",{entity:"Organization"})),new Error(a.data.error)}catch(a){throw console.error("Error in activateOrg:",a),e(((o=(r=a.response)==null?void 0:r.data)==null?void 0:o.message)||$.global.t("toast.error.activate_failed",{entity:"Organization"})),a}},async deactivateOrg(t){var r,o;try{const a=await n.post(`/item/${t}/deactivate`);if(a.data.error)throw e($.global.t("toast.error.deactivate_failed",{entity:"Organization"})),new Error(a.data.error)}catch(a){throw console.error("Error in deactivateOrg:",a),e(((o=(r=a.response)==null?void 0:r.data)==null?void 0:o.message)||$.global.t("toast.error.deactivate_failed",{entity:"Organization"})),a}}}}const Uo=L$();function x$(){const n=xa("https://api.jplan.com.br/management/branch/"),{error:e}=sr();return{async getBranchList(t){try{const r=t?`?filter_query=${t}`:"",o=await n.get(`/list/${r}`);if(o.data.error){e($.global.t("toast.error.fetch_failed",{entity:"Branch"}));return}return o.data.data}catch(r){console.error("Error in getBranchList:",r),e($.global.t("toast.error.fetch_failed",{entity:"Branch"}))}},async createBranch(t){var r,o;try{const a=await n.post("/item",t);return a.status>=200&&a.status<300?a:void 0}catch(a){console.error("Error in createBranch:",a),e(((o=(r=a.response)==null?void 0:r.data)==null?void 0:o.message)||$.global.t("toast.error.create_failed",{entity:"Branch"}))}},async updateBranch(t){var r,o;try{const a=await n.patch("/item",t);if(a.data.error){e(a.data.error||$.global.t("toast.error.update_failed",{entity:"Branch"}));return}return a}catch(a){console.error("Error in updateBranch:",a),e(((o=(r=a.response)==null?void 0:r.data)==null?void 0:o.message)||$.global.t("toast.error.update_failed",{entity:"Branch"}))}},async getBranch(t){var r,o;try{const a=await n.get(`/item/${t}`);if(a.data.error){e(a.data.error||$.global.t("toast.error.fetch_failed",{entity:"Branch"}));return}return a.data}catch(a){console.error("Error in getBranch:",a),e(((o=(r=a.response)==null?void 0:r.data)==null?void 0:o.message)||$.global.t("toast.error.fetch_failed",{entity:"Branch"}))}},async activateBranch(t){var r,o;try{const a=await n.post(`/item/${t}/activate`);if(a.data.error){e(a.data.error||$.global.t("toast.error.activate_failed",{entity:"Branch"}));return}}catch(a){console.error("Error in activateBranch:",a),e(((o=(r=a.response)==null?void 0:r.data)==null?void 0:o.message)||$.global.t("toast.error.activate_failed",{entity:"Branch"}))}},async deactivateBranch(t){var r,o;try{const a=await n.post(`/item/${t}/deactivate`);if(a.data.error){e(a.data.error||$.global.t("toast.error.deactivate_failed",{entity:"Branch"}));return}}catch(a){console.error("Error in deactivateBranch:",a),e(((o=(r=a.response)==null?void 0:r.data)==null?void 0:o.message)||$.global.t("toast.error.deactivate_failed",{entity:"Branch"}))}}}}const Bo=x$();function U$(){const n=xa("https://api.jplan.com.br/management/team"),{error:e}=sr();return{async getTeamList(t){try{const r=t?`?filter_query=${t}`:"",o=await n.get(`/list/${r}`);if(o.data.error)throw e($.global.t("toast.error.fetch_failed",{entity:"Team"})),new Error(o.data.error);return o.data.data}catch(r){console.error("Error in getTeamList:",r),e($.global.t("toast.error.fetch_failed",{entity:"Team"}));return}},async createTeam(t){var r,o;try{const a=await n.post("/item",t);if(a.data.error)throw e($.global.t("toast.error.create_failed",{entity:"Team"})),new Error(a.data.error);return a}catch(a){throw console.error("Error in createTeam:",a),e(((o=(r=a.response)==null?void 0:r.data)==null?void 0:o.message)||$.global.t("toast.error.create_failed",{entity:"Team"})),a}},async updateTeam(t){var r,o;try{const a=await n.patch("/item",t);return a.status>=200&&a.status<300?a:void 0}catch(a){throw console.error("Error in updateTeam:",a),e(((o=(r=a.response)==null?void 0:r.data)==null?void 0:o.message)||$.global.t("toast.error.update_failed",{entity:"Team"})),a}},async getTeam(t){var r,o;try{const a=await n.get(`/item/${t}`);return a.data.error&&e($.global.t("toast.error.fetch_failed",{entity:"Team"})),a.data}catch(a){console.error("Error in getTeam:",a),e(((o=(r=a.response)==null?void 0:r.data)==null?void 0:o.message)||$.global.t("toast.error.fetch_failed",{entity:"Team"}));return}},async activateTeam(t){var r,o;try{const a=await n.post(`/item/${t}/activate`);if(a.data.error)throw e($.global.t("toast.error.activate_failed",{entity:"Team"})),new Error(a.data.error)}catch(a){throw console.error("Error in activateTeam:",a),e(((o=(r=a.response)==null?void 0:r.data)==null?void 0:o.message)||$.global.t("toast.error.activate_failed",{entity:"Team"})),a}},async deactivateTeam(t){var r,o;try{const a=await n.post(`/item/${t}/deactivate`);if(a.data.error)throw e($.global.t("toast.error.deactivate_failed",{entity:"Team"})),new Error(a.data.error)}catch(a){throw console.error("Error in deactivateTeam:",a),e(((o=(r=a.response)==null?void 0:r.data)==null?void 0:o.message)||$.global.t("toast.error.deactivate_failed",{entity:"Team"})),a}},async getTeamUserList(t,r){try{const o=r?`?filter_query=${r}`:"",a=await n.get(`/item/${t}/user/list/${o}`);if(a.data.error)throw e($.global.t("toast.error.fetch_failed",{entity:"User"})),new Error(a.data.error);return a.data.data}catch(o){console.error("Error in getTeamUserList:",o),e($.global.t("toast.error.fetch_failed",{entity:"User"}));return}},async linkManageUser(t,r){try{const o=await n.post(`/item/${t}/user/item/`,r);if(o.data.error)throw e($.global.t("toast.error.link_failed",{entity:"User"})),new Error(o.data.error);return o.data}catch(o){console.error("Error in link User:",o),e($.global.t("toast.error.link_failed",{entity:"User"}));return}},async updateManageUser(t,r){try{const o=await n.patch(`/item/${t}/user/item/`,r);if(o.data.error)throw e($.global.t("toast.error.update_failed",{entity:"User"})),new Error(o.data.error);return o.data.data}catch(o){throw console.error("Error in update User:",o),e($.global.t("toast.error.update_failed",{entity:"User"})),o}},async getManageUser(t,r,o){try{const a=o?`?filter_query=${o}`:"",l=await n.get(`/item/${t}/user/item/${r}/${a}`);if(l.data.error)throw e($.global.t("toast.error.fetch_failed",{entity:"User"})),new Error(l.data.error);return l.data.data}catch(a){console.error("Error in getUser:",a),e($.global.t("toast.error.fetch_failed",{entity:"User"}));return}},async unlinkManageUser(t,r,o){try{const a=o?`?filter_query=${o}`:"";await n.delete(`/item/${t}/user/item/${r}/${a}`)}catch(a){throw console.error("Error in unlink User:",a),e($.global.t("toast.error.unlink_failed",{entity:"User"})),a}}}}const Mn=U$();let tl=!1;const mh=c.ref(!1),Yn=c.ref([]),Sy=c.ref([]),ht=c.ref(null),Zi=c.ref([]),ea=c.ref([]),$T=()=>{const n=sr(),e=async C=>{mh.value=!0;const T=C?`_active eq true and ${C}`:"_active eq true",k=await Uo.getOrgList(T);k&&(Yn.value=k,tl=!0),mh.value=!1},t=async C=>{var T;return(T=Yn.value)!=null&&T.length||await e(C),Yn.value};function r(C){if(!Yn.value)throw new Error("Data not stored yet");const T=Ma(Yn.value,C,["name","description"]);return C!==""?T:Yn.value}const o=C=>{Sy.value=C},a=C=>{ht.value=Pa.cloneDeep(C)},l=async C=>await Uo.getOrg(C),d=async()=>{if(ht.value!=null){const C=await Uo.createOrg(ht.value);return C!=null&&C.data.created_at&&(n.success($.global.t("toast.success.create_success",{entity:"Organization"})),tl&&Yn.value.push(C.data)),C==null?void 0:C.data}},h=async()=>{if(ve.value=!0,ht.value&&ht.value.__id){const C=await Uo.updateOrg(ht.value);if(tl&&(C!=null&&C.data.__id)){const T=Yn.value.findIndex(k=>k.__id===C.data.__id);return T!==-1?(Yn.value[T]=C.data,n.success($.global.t("toast.success.update_success",{entity:"Organization"}))):n.error($.global.t("toast.error.update_failed",{entity:"Organization"})),ve.value=!1,C.data}}else ve.value=!1,n.error($.global.t("toast.error.update_failed",{entity:"Organization"}))},f=async()=>{if(ve.value=!0,ht.value&&ht.value.created_at){if(await Uo.deactivateOrg(ht.value.__id),tl){const C=Yn.value.findIndex(T=>{var k;return T.__id===((k=ht.value)==null?void 0:k.__id)});if(C!==-1)return Yn.value.splice(C,1),ht.value;n.error($.global.t("toast.error.deactivate_failed",{entity:"Organization"}))}ve.value=!1}};async function g(C){ve.value=!0;try{if(ht.value&&ht.value.__id){const T={...C,organization:ht.value.__id};if(!await Bo.updateBranch(T)){ve.value=!1;return}if(Zi.value.findIndex(N=>N.__id===C.__id)===-1)return n.success($.global.t("toast.success.link_success",{entity:"Branch"})),Zi.value.push(T),T;n.info($.global.t("toast.info.already_linked",{entity:"Branch"}))}}catch(T){console.error(T)}finally{ve.value=!1}}async function _(C){if(ve.value=!0,ht.value&&ht.value.__id){const T={...C,organization:null};if(!await Bo.updateBranch(T)){ve.value=!1;return}const S=Zi.value.findIndex(N=>N.__id===C.__id);if(S!==-1)return Zi.value.splice(S,1),ve.value=!1,Zi.value;throw new Error("Item not found to remove")}ve.value=!1}async function p(C){ve.value=!0;try{if(ht.value&&ht.value.__id){const T={...C,organization:ht.value.__id};if(!await Mn.updateTeam(T)){ve.value=!1;return}if(ea.value.findIndex(N=>N.__id===C.__id)===-1)return n.success($.global.t("toast.success.link_success",{entity:"Team"})),ea.value.push(T),T;n.info($.global.t("toast.info.already_linked",{entity:"Team"}))}}catch(T){console.error(T)}finally{ve.value=!1}}async function w(C){if(ve.value=!0,ht.value&&ht.value.__id){const T={...C,organization:null};if(!await Mn.updateTeam(T)){ve.value=!1;return}const S=ea.value.findIndex(N=>N.__id===C.__id);if(S!==-1)return ea.value.splice(S,1),ve.value=!1,ea.value;throw new Error("Item not found to remove")}ve.value=!1}return{data:Yn,loading:mh,columns:Sy,item:ht,filterData:r,__init__:e,getData:t,setColumns:o,setItem:a,getItem:l,createItem:d,updateItem:h,removeItem:f,orgBranches:Zi,orgTeams:ea,linkBranch:g,unlinkBranch:_,linkTeam:p,unlinkTeam:w}};let nl=!1;const Jn=c.ref([]),Iy=c.ref([]),Nt=c.ref(null),gh=c.ref(!1),ta=c.ref([]),KT=()=>{const n=sr(),e=async p=>{gh.value=!0;const w=p?`_active eq true and ${p}`:"_active eq true",C=await Mn.getTeamList(w);C&&(Jn.value=C,nl=!0),gh.value=!1},t=async p=>(Jn.value.length||await e(p),Jn.value);function r(p){if(!Jn.value)throw new Error("Data not stored yet");const w=Ma(Jn.value,p,["name","description"]);return p!==""?w:Jn.value}const o=p=>{Iy.value=p},a=p=>{Nt.value=Pa.cloneDeep(p)},l=async p=>await Mn.getTeam(p),d=async()=>{if(Nt.value!=null){const p=await Mn.createTeam(Nt.value);return p!=null&&p.data.created_at&&(n.success($.global.t("toast.success.create_success",{entity:"Team"})),nl&&Jn.value.push(p.data)),p==null?void 0:p.data}},h=async()=>{if(ve.value=!0,Nt.value&&Nt.value.__id){const p=await Mn.updateTeam(Nt.value);if(nl&&(p!=null&&p.data.__id)){const w=Jn.value.findIndex(C=>C.__id===p.data.__id);return w!==-1?(Jn.value[w]=p.data,n.success($.global.t("toast.success.update_success",{entity:"Team"}))):n.error($.global.t("toast.error.update_failed",{entity:"Team"})),p.data}}else n.error($.global.t("toast.error.update_failed",{entity:"Team"}))},f=async()=>{if(Nt.value&&Nt.value.created_at&&(await Mn.deactivateTeam(Nt.value.__id),nl)){const p=Jn.value.findIndex(w=>{var C;return w.__id===((C=Nt.value)==null?void 0:C.__id)});if(p!==-1)return Jn.value.splice(p,1),Nt.value;n.error($.global.t("toast.error.deactivate_failed",{entity:"Team"}))}};async function g(p){var w;if(ve.value=!0,(w=Nt.value)!=null&&w.__id)if(ta.value.findIndex(T=>T.__id===p.__id)===-1)try{const T=await Mn.linkManageUser(Nt.value.__id,{team:Nt.value.__id,user:p.__id,role:"string",joined_at:"string",comments:"string"}),k=await Mn.getTeamUserList(Nt.value.__id);return k&&(ta.value=k),n.success($.global.t("toast.success.link_success",{entity:"User"})),T}catch(T){console.error(T),n.error($.global.t("toast.error.link_failed",{entity:"User"}))}finally{ve.value=!1}else n.info($.global.t("toast.info.already_linked",{entity:"User"}));else console.warn("No item selected or item ID is missing."),n.info($.global.t("toast.info.select_valid_item"));ve.value=!1}async function _(p){if(ve.value=!0,Nt.value&&Nt.value.__id){const w=ta.value.findIndex(C=>C.__id===p);if(w!==-1)return await Mn.unlinkManageUser(Nt.value.__id,p),ta.value.splice(w,1),ve.value=!1,ta.value;throw new Error("Item not found to remove")}ve.value=!1}return{data:Jn,loading:gh,columns:Iy,item:Nt,usersTeam:ta,__init__:e,getData:t,filterData:r,setColumns:o,setItem:a,getItem:l,createItem:d,updateItem:h,removeItem:f,linkUser:g,unlinkUser:_}},WT=c.defineComponent({__name:"GlobalScopeFilter",setup(n){var T,k,S;const{openDialog:e}=Us("global-scope__J-"),{user:t,scope:r,session:o,setScope:a}=Cu(),{getData:l,data:d}=$T(),{getData:h,data:f}=KT(),g=c.ref(!1);c.onBeforeMount(async()=>{g.value=!0,await l(),await h(),g.value=!1});const _=c.ref({scope_type:(T=r.value)==null?void 0:T.scope_type,organization:((k=r.value)==null?void 0:k.organization)??"org",team:(S=r.value)==null?void 0:S.team});function p(){var N,D,L;_.value={...r.value,scope_type:(N=r.value)==null?void 0:N.scope_type,organization:((D=r.value)==null?void 0:D.organization)??"",team:(L=r.value)==null?void 0:L.team},e()}const w=c.computed(()=>{var N;switch((N=r.value)==null?void 0:N.scope_type){case"user":return XV;case"org":return JV;case"team":return ZV;default:return QV}});async function C(){var N;((N=r.value)==null?void 0:N.scope_type)!==""&&a(_.value)}return(N,D)=>(c.openBlock(),c.createElementBlock(c.Fragment,null,[c.createVNode(Ge.VBtn,{onClick:p,icon:"",class:"text-secondary",color:"surface",rounded:"sm",size:"small",variant:"flat"},{default:c.withCtx(()=>[(c.openBlock(),c.createBlock(c.resolveDynamicComponent(w.value),{size:"20"}))]),_:1}),c.createVNode(c.unref(Vs),{loading:g.value,title:c.unref($).global.t("dialogs.scope.title"),"dd-id":"global-scope__J-",onOnSave:C},{default:c.withCtx(()=>[c.createElementVNode("div",null,[c.createVNode(qe.VRow,null,{default:c.withCtx(()=>[c.createVNode(qe.VCol,{cols:"4",class:"d-flex flex-row align-center"},{default:c.withCtx(()=>[c.createVNode(Qt.VListItem,null,{default:c.withCtx(()=>[c.createVNode(Qt.VListItemTitle,null,{default:c.withCtx(()=>[c.createTextVNode(c.toDisplayString(c.unref($).global.t("dialogs.scope.user")),1)]),_:1}),c.createVNode(Qt.VListItemSubtitle,null,{default:c.withCtx(()=>{var L;return[c.createTextVNode(c.toDisplayString(((L=c.unref(t))==null?void 0:L.name)||c.unref($).global.t("dialogs.scope.unknownUser")),1)]}),_:1})]),_:1})]),_:1}),c.createVNode(qe.VCol,{cols:"4"},{default:c.withCtx(()=>[c.createVNode(Qt.VListItem,null,{default:c.withCtx(()=>[c.createVNode(Qt.VListItemTitle,null,{default:c.withCtx(()=>[c.createTextVNode(c.toDisplayString(c.unref($).global.t("dialogs.scope.environment")),1)]),_:1}),c.createVNode(Qt.VListItemSubtitle,null,{default:c.withCtx(()=>[c.createTextVNode(c.toDisplayString(c.unref(o).domain),1)]),_:1})]),_:1})]),_:1}),c.createVNode(qe.VCol,{cols:"4"},{default:c.withCtx(()=>[c.createVNode(Qt.VListItem,null,{default:c.withCtx(()=>[c.createVNode(Qt.VListItemTitle,null,{default:c.withCtx(()=>[c.createTextVNode(c.toDisplayString(c.unref($).global.t("dialogs.scope.environment")),1)]),_:1}),c.createVNode(Qt.VListItemSubtitle,null,{default:c.withCtx(()=>[c.createTextVNode(c.toDisplayString(c.unref(o).environment),1)]),_:1})]),_:1})]),_:1})]),_:1}),c.createVNode(PO.VBtnToggle,{density:"compact",variant:"outlined",modelValue:_.value.scope_type,"onUpdate:modelValue":D[0]||(D[0]=L=>_.value.scope_type=L),class:"d-flex justify-center my-4"},{default:c.withCtx(()=>[c.createVNode(Ge.VBtn,{value:"org",label:c.unref($).global.t("dialogs.scope.organizational"),color:"secondary"},{default:c.withCtx(()=>[c.createTextVNode(c.toDisplayString(c.unref($).global.t("dialogs.scope.organizational")),1)]),_:1},8,["label"]),c.createVNode(Ge.VBtn,{value:"team",label:c.unref($).global.t("dialogs.scope.team"),color:"secondary"},{default:c.withCtx(()=>[c.createTextVNode(c.toDisplayString(c.unref($).global.t("dialogs.scope.team")),1)]),_:1},8,["label"]),c.createVNode(Ge.VBtn,{value:"user",label:c.unref($).global.t("dialogs.scope.user"),color:"secondary"},{default:c.withCtx(()=>[c.createTextVNode(c.toDisplayString(c.unref($).global.t("dialogs.scope.user")),1)]),_:1},8,["label"]),c.createVNode(Ge.VBtn,{value:"",label:c.unref($).global.t("dialogs.scope.none"),color:"lightext"},{default:c.withCtx(()=>[c.createTextVNode(c.toDisplayString(c.unref($).global.t("dialogs.scope.none")),1)]),_:1},8,["label"])]),_:1},8,["modelValue"]),c.createElementVNode("div",null,[c.createVNode(yi.VLabel,{class:"text-subtitle-1 text-high-emphasis mb-2"},{default:c.withCtx(()=>[c.createTextVNode(c.toDisplayString(c.unref($).global.t("dialogs.scope.organization")),1)]),_:1}),c.createVNode(fs.VSelect,{items:c.unref(d),"item-title":"name","item-value":"__id",variant:"solo","bg-color":"containerBg",rounded:"false",placeholder:c.unref($).global.t("dialogs.scope.selectOrganization"),class:"min-w-50",modelValue:_.value.organization,"onUpdate:modelValue":D[1]||(D[1]=L=>_.value.organization=L),clearable:""},null,8,["items","placeholder","modelValue"]),c.createVNode(yi.VLabel,{class:"text-subtitle-1 text-high-emphasis mb-2"},{default:c.withCtx(()=>[c.createTextVNode(c.toDisplayString(c.unref($).global.t("dialogs.scope.team")),1)]),_:1}),c.createVNode(fs.VSelect,{items:c.unref(f),"item-title":"name","item-value":"__id",variant:"solo","bg-color":"containerBg",rounded:"false",placeholder:c.unref($).global.t("dialogs.scope.selectTeam"),class:"min-w-50",modelValue:_.value.team,"onUpdate:modelValue":D[2]||(D[2]=L=>_.value.team=L),clearable:""},null,8,["items","placeholder","modelValue"])])])]),_:1},8,["loading","title"])],64))}}),B$={},V$={class:"double-ring-spinner-container"};function F$(n,e){return c.openBlock(),c.createElementBlock("div",V$,e[0]||(e[0]=[c.createElementVNode("div",{class:"spinner-loading"},[c.createElementVNode("div"),c.createElementVNode("div"),c.createElementVNode("div",null,[c.createElementVNode("div")]),c.createElementVNode("div",null,[c.createElementVNode("div")])],-1)]))}const zT=Yo(B$,[["render",F$],["__scopeId","data-v-00d7a69f"]]),H$={key:0,class:"_jspinner-overlay_jj"},GT=c.defineComponent({__name:"GlobalSpinner",setup(n){return(e,t)=>c.unref(ve)?(c.openBlock(),c.createElementBlock("div",H$,t[0]||(t[0]=[c.createElementVNode("div",{class:"j-double-ring-spinner-container"},[c.createElementVNode("div",{class:"j-global-spinner-loading"},[c.createElementVNode("div"),c.createElementVNode("div"),c.createElementVNode("div",null,[c.createElementVNode("div")]),c.createElementVNode("div",null,[c.createElementVNode("div")])])],-1)]))):c.createCommentVNode("",!0)}}),qT=c.defineComponent({__name:"SubMenu",props:{title:{}},setup(n,{expose:e}){return e({props:n}),(r,o)=>(c.openBlock(),c.createBlock(Qt.VListItem,{onClick:o[0]||(o[0]=()=>{}),density:"compact"},{append:c.withCtx(()=>[c.createVNode(c.unref(eF))]),default:c.withCtx(()=>[c.createVNode(Qt.VListItemTitle,null,{default:c.withCtx(()=>[c.createTextVNode(c.toDisplayString(r.title),1)]),_:1}),c.createVNode(_f.VMenu,{activator:"parent","open-on-hover":"",submenu:"",density:"compact"},{default:c.withCtx(()=>[c.renderSlot(r.$slots,"default")]),_:3})]),_:3}))}}),$$=Object.freeze(Object.defineProperty({__proto__:null,AvatarPicture:YC,ColumnSettingsDialog:Vf,ConfirmDialog:qC,ContextMenu:JC,CopyButton:xs,DeleteAllBtn:Df,DotsMenu:GC,EditButton:zC,FormHeadless:XE,FormMetadata:au,GlobalScopeFilter:WT,GlobalSpinner:GT,JAutocomplete:zE,JAvatar:jC,JBtn:My,JDialog:Vs,JForm:YE,JIconBtn:Py,JNumberField:WE,JSelect:KE,JTextArea:GE,JTextField:vE,ParentCard:Yl,SearchFilter:Xl,SpinnerLoader:zT,SubMenu:qT,TabFormHeader:JE,TabFormHeaderV2:QE,TableAdvanced:nE,TableCard:Ff,TableCardsView:_E,TableHeader:rE,UiTable:QC},Symbol.toStringTag,{value:"Module"})),K$=s0(),W$={transition:"Vue-Toastification__fade",maxToasts:20,newestOnTop:!0};let ph=!1;const _h=c.ref(!1),Qn=c.ref([]),Ay=c.ref([]),$t=c.ref(null),na=c.ref([]),z$=()=>{const n=sr(),e=async p=>{_h.value=!0;const w=p?`_active eq true and ${p}`:"_active eq true",C=await Bo.getBranchList(w);C&&(Qn.value=C,ph=!0),_h.value=!1},t=async p=>(Qn.value.length||await e(p),Qn.value);function r(p){if(!Qn.value)throw new Error("Data not stored yet");const w=Ma(Qn.value,p,["name","description"]);return p!==""?w:Qn.value}const o=p=>{Ay.value=p},a=p=>{$t.value=Pa.cloneDeep(p)},l=async p=>await Bo.getBranch(p),d=async()=>{if($t.value!=null){const p=await Bo.createBranch($t.value);return p!=null&&p.data.created_at&&(n.success($.global.t("toast.success.create_success",{entity:"Branch"})),ph&&Qn.value.push(p.data)),p==null?void 0:p.data}},h=async()=>{if($t.value&&$t.value.__id){const p=await Bo.updateBranch($t.value);if(ph&&p){const w=Qn.value.findIndex(C=>C.__id===p.data.__id);return w!==-1?(Qn.value[w]=p.data,n.success($.global.t("toast.success.update_success",{entity:"Branch"}))):n.error($.global.t("toast.error.update_failed",{entity:"Branch"})),p}}else n.error($.global.t("toast.error.update_failed",{entity:"Branch"}))},f=async()=>{if($t.value&&$t.value.created_at){await Bo.deactivateBranch($t.value.__id);const p=Qn.value.findIndex(w=>{var C;return w.__id===((C=$t.value)==null?void 0:C.__id)});if(p!==-1)return Qn.value.splice(p,1),$t.value;n.error($.global.t("toast.error.deactivate_failed",{entity:"Branch"}))}};async function g(p){ve.value=!0;try{if($t.value&&$t.value.__id){const w={...p,branch:$t.value.__id};if(!await Mn.updateTeam(w)){n.error($.global.t("toast.error.link_failed",{entity:"Team"}));return}if(na.value.findIndex(k=>k.__id===p.__id)===-1)return n.success($.global.t("toast.success.link_success",{entity:"Team"})),na.value.push(w),w;n.info($.global.t("toast.info.already_linked",{entity:"Team"}))}else throw new Error("Item is not defined")}catch(w){console.error(w)}finally{ve.value=!1}}async function _(p){if(ve.value=!0,$t.value&&$t.value.__id){const w={...p,branch:null};if(!await Mn.updateTeam(w))return;const T=na.value.findIndex(k=>k.__id===p.__id);if(T!==-1)return na.value.splice(T,1),ve.value=!1,na.value;throw new Error("Item not found to remove")}ve.value=!1}return{data:Qn,columns:Ay,item:$t,loading:_h,__init__:e,getData:t,filterData:r,setColumns:o,setItem:a,getItem:l,createItem:d,updateItem:h,removeItem:f,branchTeams:na,linkTeam:g,unlinkTeam:_}};function G$(){const n=xa("https://api.jplan.com.br/management/division"),{error:e}=sr();return{async getDivisionList(t){try{const r=t?`?filter_query=${t}`:"",o=await n.get(`/list/${r}`);if(o.data.error)throw e($.global.t("toast.error.fetch_failed",{entity:"Division"})),new Error(o.data.error);return o.data.data}catch(r){console.error("Error in getDivisionList:",r),e($.global.t("toast.error.fetch_failed",{entity:"Division"}));return}},async createDivision(t){var r,o;try{const a=await n.post("/item",t);return a.status>=200&&a.status<300?a:void 0}catch(a){throw console.error("Error in createDivision:",a),e(((o=(r=a.response)==null?void 0:r.data)==null?void 0:o.message)||$.global.t("toast.error.create_failed",{entity:"Division"})),a}},async updateDivision(t){var r,o;try{const a=await n.patch("/item",t);if(a.data.error)throw e($.global.t("toast.error.update_failed",{entity:"Division"})),new Error(a.data.error);return a}catch(a){throw console.error("Error in updateDivision:",a),e(((o=(r=a.response)==null?void 0:r.data)==null?void 0:o.message)||$.global.t("toast.error.update_failed",{entity:"Division"})),a}},async getDivision(t){var r,o;try{const a=await n.get(`/item/${t}`);if(a.data.error)throw e($.global.t("toast.error.fetch_failed",{entity:"Division"})),new Error(a.data.error);return a.data}catch(a){throw console.error("Error in getDivision:",a),e(((o=(r=a.response)==null?void 0:r.data)==null?void 0:o.message)||$.global.t("toast.error.fetch_failed",{entity:"Division"})),a}},async activateDivision(t){var r,o;try{const a=await n.post(`/item/${t}/activate`);if(a.data.error)throw e($.global.t("toast.error.activate_failed",{entity:"Division"})),new Error(a.data.error)}catch(a){throw console.error("Error in activateDivision:",a),e(((o=(r=a.response)==null?void 0:r.data)==null?void 0:o.message)||$.global.t("toast.error.activate_failed",{entity:"Division"})),a}},async deactivateDivision(t){var r,o;try{const a=await n.post(`/item/${t}/deactivate`);if(a.data.error)throw e($.global.t("toast.error.deactivate_failed",{entity:"Division"})),new Error(a.data.error)}catch(a){throw console.error("Error in deactivateDivision:",a),e(((o=(r=a.response)==null?void 0:r.data)==null?void 0:o.message)||$.global.t("toast.error.deactivate_failed",{entity:"Division"})),a}}}}const ua=G$();let vh=!1;const yh=c.ref(!1),Xn=c.ref([]),ky=c.ref([]),Kt=c.ref(null),ra=c.ref([]),q$=()=>{const n=sr(),e=async p=>{yh.value=!0;const w=p?`_active eq true and ${p}`:"_active eq true",C=await ua.getDivisionList(w);C&&(Xn.value=C,vh=!0),yh.value=!1},t=async p=>(Xn.value.length||await e(p),Xn.value);function r(p){if(!Xn.value)throw new Error("Data not stored yet");const w=Ma(Xn.value,p,["name","description"]);return p!==""?w:Xn.value}const o=p=>{ky.value=p},a=p=>{Kt.value=Pa.cloneDeep(p)},l=async p=>await ua.getDivision(p),d=async()=>{if(Kt.value!=null){const p=await ua.createDivision(Kt.value);return p!=null&&p.data.created_at&&(n.success($.global.t("toast.success.create_success",{entity:"Division"})),vh&&Xn.value.push(p.data)),p==null?void 0:p.data}},h=async()=>{if(ve.value=!0,Kt.value&&Kt.value.__id){const p=await ua.updateDivision(Kt.value);if(vh&&(p!=null&&p.data.__id)){const w=Xn.value.findIndex(C=>C.__id===p.data.__id);return w!==-1?(Xn.value[w]=p.data,n.success($.global.t("toast.success.update_success",{entity:"Division"}))):n.error($.global.t("toast.error.update_failed",{entity:"Division"})),ve.value=!1,p}}else ve.value=!1,n.error($.global.t("toast.error.update_failed",{entity:"Division"}))},f=async()=>{if(ve.value=!0,Kt.value&&Kt.value.created_at){await ua.deactivateDivision(Kt.value.__id);const p=Xn.value.findIndex(w=>{var C;return w.__id===((C=Kt.value)==null?void 0:C.__id)});if(p!==-1)return Xn.value.splice(p,1),Kt.value;n.error($.global.t("toast.error.deactivate_failed",{entity:"Division"}))}ve.value=!1};async function g(p){ve.value=!0;try{if(Kt.value&&Kt.value.__id){const w={...p,division:Kt.value.__id};return await Uo.updateOrg(w)?(ra.value.findIndex(k=>k.__id===p.__id)===-1?(n.success($.global.t("toast.success.link_success",{entity:"Organization"})),ra.value.push(w)):n.info($.global.t("toast.info.already_linked",{entity:"Organization"})),w):void 0}else throw new Error("Item is not defined")}catch(w){console.error(w)}finally{ve.value=!1}}async function _(p){if(ve.value=!0,Kt.value&&Kt.value.__id){const w={...p,division:null};if(!await Uo.updateOrg(w))return;const T=ra.value.findIndex(k=>k.__id===p.__id);if(T!==-1)ra.value.splice(T,1);else throw new Error("Item not found to remove")}else throw new Error("Item is not defined");return ve.value=!1,ra.value}return{data:Xn,columns:ky,item:Kt,loading:yh,__init__:e,filterData:r,getData:t,setColumns:o,setItem:a,getItem:l,createItem:d,updateItem:h,removeItem:f,orgs:ra,linkDivision:g,unlinkDivision:_}};function j$(){const n=xa("https://api.jplan.com.br/management/user"),{error:e}=sr();return{async getManageUserList(t){try{const r=t?`?filter_query=${t}`:"",o=await n.get(`/list/${r}`);if(o.data.error)throw e($.global.t("toast.error.fetch_failed",{entity:"User"})),new Error(o.data.error);return o.data.data}catch(r){console.error("Error in getManageUserList:",r),e($.global.t("toast.error.fetch_failed",{entity:"User"}));return}},async createManageUser(t){var r,o;try{const a=await n.post("/item",t);return a.status>=200&&a.status<300?a:void 0}catch(a){throw console.error("Error in createManageUser:",a),e(((o=(r=a.response)==null?void 0:r.data)==null?void 0:o.message)||$.global.t("toast.error.create_failed",{entity:"User"})),a}},async updateManageUser(t){var r,o;try{const a=await n.patch("/item",t);if(a.data.error)throw e($.global.t("toast.error.update_failed",{entity:"User"})),new Error(a.data.error);return a}catch(a){throw console.error("Error in updateManageUser:",a),e(((o=(r=a.response)==null?void 0:r.data)==null?void 0:o.message)||$.global.t("toast.error.update_failed",{entity:"User"})),a}},async getManageUser(t){var r,o;try{const a=await n.get(`/item/${t}`);if(a.data.error)throw e($.global.t("toast.error.fetch_failed",{entity:"User"})),new Error(a.data.error);return a.data}catch(a){console.error("Error in getManageUser:",a),e(((o=(r=a.response)==null?void 0:r.data)==null?void 0:o.message)||$.global.t("toast.error.fetch_failed",{entity:"User"}));return}},async activateManageUser(t){var r,o;try{const a=await n.post(`/item/${t}/activate`);if(a.data.error)throw e($.global.t("toast.error.activate_failed",{entity:"User"})),new Error(a.data.error)}catch(a){throw console.error("Error in activateManageUser:",a),e(((o=(r=a.response)==null?void 0:r.data)==null?void 0:o.message)||$.global.t("toast.error.activate_failed",{entity:"User"})),a}},async deactivateManageUser(t){var r,o;try{const a=await n.post(`/item/${t}/deactivate`);if(a.data.error)throw e($.global.t("toast.error.deactivate_failed",{entity:"User"})),new Error(a.data.error)}catch(a){throw console.error("Error in deactivateManageUser:",a),e(((o=(r=a.response)==null?void 0:r.data)==null?void 0:o.message)||$.global.t("toast.error.deactivate_failed",{entity:"User"})),a}}}}const da=j$();let Ch=!1,Eh=c.ref(!1);const Zn=c.ref([]),Ny=c.ref([]),er=c.ref(null),Y$=c.ref(null),J$=c.ref([]),Q$=()=>{const n=sr(),e=async g=>{Eh.value=!0;const _=g?`_active eq true and ${g}`:"_active eq true",p=await da.getManageUserList(_);p&&(Zn.value=p,Ch=!0),Eh.value=!1},t=async g=>(Zn.value.length||await e(g),Zn.value);function r(g){if(!Zn.value)throw new Error("Data not stored yet");const _=Ma(Zn.value,g,["name","description"]);return g!==""?_:Zn.value}return{data:Zn,loading:Eh,columns:Ny,item:er,filterData:r,__init__:e,getData:t,setColumns:g=>{Ny.value=g},setItem:g=>{er.value=Pa.cloneDeep(g)},getItem:async g=>await da.getManageUser(g),createItem:async()=>{if(er.value!=null){const g=crypto.randomUUID(),_=await da.createManageUser({...er.value,__id:g});return _!=null&&_.data.created_at&&(n.success($.global.t("toast.success.create_success",{entity:"User"})),Ch&&Zn.value.push(_.data)),_==null?void 0:_.data}},updateItem:async()=>{if(ve.value=!0,er.value&&er.value.created_at){const g=await da.updateManageUser(er.value);if(Ch&&(g!=null&&g.data)){const _=Zn.value.findIndex(p=>p.__id===(g==null?void 0:g.data.__id));_!==-1?(Zn.value[_]=g==null?void 0:g.data,n.success($.global.t("toast.success.update_success",{entity:"User"}))):n.error($.global.t("toast.error.update_failed",{entity:"User"}))}return ve.value=!1,g==null?void 0:g.data}},removeItem:async()=>{if(er.value&&er.value.created_at){try{await da.deactivateManageUser(er.value.__id)}catch{n.error($.global.t("toast.error.deactivate_failed",{entity:"User"}));return}const g=Zn.value.findIndex(_=>{var p;return _.__id===((p=er.value)==null?void 0:p.__id)});if(g!==-1)return Zn.value.splice(g,1),n.success($.global.t("toast.success.deactivate_success",{entity:"User"})),er.value}},userOrg:Y$,userTeams:J$}},wh=Object.freeze({colNum:24,rowHeight:50,useCssTransforms:!0,responsive:!0,margin:[12,10]}),oa=c.ref(!1),X$=c.ref([]);function Z$(){const n=c.ref({...wh,isResizable:!1,isDraggable:!1,useStyleCursor:!1,cursor:"default"});function e(){if(oa.value=!oa.value,n.value.isDraggable=oa.value,n.value.isResizable=oa.value,!oa.value){n.value.useStyleCursor=!0,n.value.cursor="pointer";return}n.value.useStyleCursor=!1,n.value.cursor="move"}function t(){n.value={...wh,isResizable:!1,isDraggable:!1,useStyleCursor:!1,cursor:"default"}}return{DEFAULT_CONFIG:wh,config:n,layout:X$,edition:oa,toggleEdit:e,resetLayout:t}}const e4=c.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./WidgetTask-CuTgN5T3.js"))),t4=c.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./WidgetImage-CmXW7a_H.js"))),n4=c.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./WidgetShortcut-sAmGH6RV.js"))),r4=c.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./WidgetSpacer-Cj5C3BDd.js"))),o4=c.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./WidgetLabel-D8ylPIK3.js"))),i4=c.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./WidgetChartBar-ChMg_dbz.js"))),a4=c.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./WidgetChartPie-C2AIgVQ2.js"))),s4={WidgetSpacer:r4,WidgetLabel:o4,WidgetTask:e4,WidgetImage:t4,WidgetShortcut:n4,WidgetChartBar:i4,WidgetChartPie:a4},c4={defaultI18n:!0},l4=(n,e)=>{const t={...c4,...e};n.use(K$),n.use(lP,W$),t.defaultI18n&&n.use($),Object.entries($$).forEach(([r,o])=>{n.component(r,o)}),Object.entries(DO).forEach(([r,o])=>{n.provide(r,o)})},u4={install:l4};exports.ContextMenu=JC;exports.EmptyListImg=Uh;exports.EventBus=Kl;exports.FormHeadless=XE;exports.HttpCore=mV;exports.I18nMessages=Mm;exports.JNumberField=WE;exports.JTextField=vE;exports.SpinnerLoader=zT;exports.TableCardsView=_E;exports.TableHeader=rE;exports.__spinner=ve;exports._export_sfc=Yo;exports._sfc_main=Vs;exports._sfc_main$1=QC;exports._sfc_main$10=My;exports._sfc_main$11=Df;exports._sfc_main$12=zC;exports._sfc_main$13=Py;exports._sfc_main$14=KE;exports._sfc_main$15=zE;exports._sfc_main$16=GE;exports._sfc_main$17=YE;exports._sfc_main$18=JE;exports._sfc_main$19=QE;exports._sfc_main$2=nE;exports._sfc_main$20=Yl;exports._sfc_main$21=jC;exports._sfc_main$22=YC;exports._sfc_main$23=qT;exports._sfc_main$24=WT;exports._sfc_main$25=GT;exports._sfc_main$3=Vf;exports._sfc_main$4=Ff;exports._sfc_main$5=Xl;exports._sfc_main$6=qC;exports._sfc_main$7=xs;exports._sfc_main$8=GC;exports._sfc_main$9=au;exports.branchInstance=Bo;exports.coreClient=Pm;exports.createToastInterface=Ss;exports.dateFormat=ms;exports.divisionInstance=ua;exports.filterQuery=Ma;exports.globalEventBus=Ef;exports.i18n=$;exports.index=u4;exports.manageUserInstance=da;exports.msal=Gt;exports.orgInstance=Uo;exports.provideToast=cP;exports.scopedClient=xa;exports.setupAuthGuard=O$;exports.teamInstance=Mn;exports.toastInjectionKey=Wl;exports.useAuth=Om;exports.useBranchStore=z$;exports.useCustomizer=h0;exports.useDashboardStore=Z$;exports.useDialog=Us;exports.useDivisionStore=q$;exports.useManageUserStore=Q$;exports.useNotifications=uC;exports.useOrganizationStore=$T;exports.useSession=Cu;exports.useTeamStore=KT;exports.useToast=sr;exports.widgets=s4;
|