const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/AppHub-CfMaj6NP.js","assets/formatCurrency-D2Ie2fbs.js","assets/vue.esm-bundler-DFh9r2JB.js","assets/_plugin-vue_export-helper-DlAUqK2U.js","assets/Basket-9HAKx_e6.js","assets/BasketFooter-BvvbrxmC.js","assets/BasketHeader-DBiEMJN0.js","assets/BasketItem-vJRTPY5v.js","assets/BasketLite-B8oVReL7.js","assets/BasketLink-CBBBwbPf.js","assets/Next-BV9m3tqG.js","assets/CheckoutGls-BeUW6jjE.js","assets/utils-9np1lZA4.js","assets/CheckoutWolt-BWZmgfbE.js","assets/BasketSummery-BNFzQ_De.js","assets/CheckoutTable-DM7V0qjk.js","assets/CheckoutRoom-C8ZWEsio.js","assets/CheckoutPickup-BrbrcjQz.js","assets/CheckoutDelivery-DVjzxtuR.js","assets/CheckoutDeliveryV2-BQ8tx4z2.js","assets/CheckoutRestaurant-Dotooq6R.js","assets/CheckoutEpos-kwBrVa5s.js","assets/BasketFooter-D3v3nQpq.js","assets/Checkout-DJB-noy3.js","assets/Customer-5lWo7kXc.js","assets/BasketLite-BaMDq3xW.js","assets/Tracker-DVHlsJgv.js"])))=>i.map(i=>d[i]);
var Rf=Object.defineProperty;var Df=(s,e,t)=>e in s?Rf(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t;var L=(s,e,t)=>Df(s,typeof e!="symbol"?e+"":e,t);import{e as Uc,r as qc,m as zc,i as Nf,w as Mf,a as gi,b as wi,c as Kc,t as Ff,h as Bf,g as jf,o as Hf,n as Vf,d as Wf,f as Yr,j as Uf,k as Nn,l as $n,p as Mn,q as qf,s as Ya,u as zf,v as Kf,x as Gf,y as Yf,z as Zr,A as Zf,B as le,_ as ee}from"./vue.esm-bundler-DFh9r2JB.js";import{_ as Fn}from"./_plugin-vue_export-helper-DlAUqK2U.js";var Xf=!1;/*!
 * pinia v2.2.4
 * (c) 2024 Eduardo San Martin Morote
 * @license MIT
 */let Gc;const qi=s=>Gc=s,Yc=Symbol();function Xr(s){return s&&typeof s=="object"&&Object.prototype.toString.call(s)==="[object Object]"&&typeof s.toJSON!="function"}var wn;(function(s){s.direct="direct",s.patchObject="patch object",s.patchFunction="patch function"})(wn||(wn={}));function Qf(){const s=Uc(!0),e=s.run(()=>qc({}));let t=[],n=[];const i=zc({install(r){qi(i),i._a=r,r.provide(Yc,i),r.config.globalProperties.$pinia=i,n.forEach(o=>t.push(o)),n=[]},use(r){return!this._a&&!Xf?n.push(r):t.push(r),this},_p:t,_a:null,_e:s,_s:new Map,state:e});return i}const Zc=()=>{};function Za(s,e,t,n=Zc){s.push(e);const i=()=>{const r=s.indexOf(e);r>-1&&(s.splice(r,1),n())};return!t&&jf()&&Hf(i),i}function Cs(s,...e){s.slice().forEach(t=>{t(...e)})}const Jf=s=>s(),Xa=Symbol(),_r=Symbol();function Qr(s,e){s instanceof Map&&e instanceof Map?e.forEach((t,n)=>s.set(n,t)):s instanceof Set&&e instanceof Set&&e.forEach(s.add,s);for(const t in e){if(!e.hasOwnProperty(t))continue;const n=e[t],i=s[t];Xr(i)&&Xr(n)&&s.hasOwnProperty(t)&&!wi(n)&&!Kc(n)?s[t]=Qr(i,n):s[t]=n}return s}const eg=Symbol();function tg(s){return!Xr(s)||!s.hasOwnProperty(eg)}const{assign:Rt}=Object;function sg(s){return!!(wi(s)&&s.effect)}function ng(s,e,t,n){const{state:i,actions:r,getters:o}=e,c=t.state.value[s];let u;function h(){c||(t.state.value[s]=i?i():{});const p=Wf(t.state.value[s]);return Rt(p,r,Object.keys(o||{}).reduce((f,g)=>(f[g]=zc(Yr(()=>{qi(t);const m=t._s.get(s);return o[g].call(m,m)})),f),{}))}return u=Xc(s,h,e,t,n,!0),u}function Xc(s,e,t={},n,i,r){let o;const c=Rt({actions:{}},t),u={deep:!0};let h,p,f=[],g=[],m;const E=n.state.value[s];!r&&!E&&(n.state.value[s]={}),qc({});let v;function w(O){let I;h=p=!1,typeof O=="function"?(O(n.state.value[s]),I={type:wn.patchFunction,storeId:s,events:m}):(Qr(n.state.value[s],O),I={type:wn.patchObject,payload:O,storeId:s,events:m});const H=v=Symbol();Vf().then(()=>{v===H&&(h=!0)}),p=!0,Cs(f,I,n.state.value[s])}const S=r?function(){const{state:I}=t,H=I?I():{};this.$patch(Z=>{Rt(Z,H)})}:Zc;function C(){o.stop(),f=[],g=[],n._s.delete(s)}const x=(O,I="")=>{if(Xa in O)return O[_r]=I,O;const H=function(){qi(n);const Z=Array.from(arguments),b=[],G=[];function q(R){b.push(R)}function te(R){G.push(R)}Cs(g,{args:Z,name:H[_r],store:P,after:q,onError:te});let W;try{W=O.apply(this&&this.$id===s?this:P,Z)}catch(R){throw Cs(G,R),R}return W instanceof Promise?W.then(R=>(Cs(b,R),R)).catch(R=>(Cs(G,R),Promise.reject(R))):(Cs(b,W),W)};return H[Xa]=!0,H[_r]=I,H},$={_p:n,$id:s,$onAction:Za.bind(null,g),$patch:w,$reset:S,$subscribe(O,I={}){const H=Za(f,O,I.detached,()=>Z()),Z=o.run(()=>Mf(()=>n.state.value[s],b=>{(I.flush==="sync"?p:h)&&O({storeId:s,type:wn.direct,events:m},b)},Rt({},u,I)));return H},$dispose:C},P=gi($);n._s.set(s,P);const N=(n._a&&n._a.runWithContext||Jf)(()=>n._e.run(()=>(o=Uc()).run(()=>e({action:x}))));for(const O in N){const I=N[O];if(wi(I)&&!sg(I)||Kc(I))r||(E&&tg(I)&&(wi(I)?I.value=E[O]:Qr(I,E[O])),n.state.value[s][O]=I);else if(typeof I=="function"){const H=x(I,O);N[O]=H,c.actions[O]=I}}return Rt(P,N),Rt(Ff(P),N),Object.defineProperty(P,"$state",{get:()=>n.state.value[s],set:O=>{w(I=>{Rt(I,O)})}}),n._p.forEach(O=>{Rt(P,o.run(()=>O({store:P,app:n._a,pinia:n,options:c})))}),E&&r&&t.hydrate&&t.hydrate(P.$state,E),h=!0,p=!0,P}function ig(s,e,t){let n,i;const r=typeof e=="function";n=s,i=r?t:e;function o(c,u){const h=Bf();return c=c||(h?Nf(Yc,null):null),c&&qi(c),c=Gc,c._s.has(n)||(r?Xc(n,e,i,c):ng(n,i,c)),c._s.get(n)}return o.$id=n,o}var Le="top",Ge="bottom",Ye="right",Ie="left",zi="auto",Js=[Le,Ge,Ye,Ie],fs="start",Vs="end",Qc="clippingParents",Mo="viewport",$s="popper",Jc="reference",Jr=Js.reduce(function(s,e){return s.concat([e+"-"+fs,e+"-"+Vs])},[]),Fo=[].concat(Js,[zi]).reduce(function(s,e){return s.concat([e,e+"-"+fs,e+"-"+Vs])},[]),eu="beforeRead",tu="read",su="afterRead",nu="beforeMain",iu="main",ru="afterMain",ou="beforeWrite",au="write",lu="afterWrite",cu=[eu,tu,su,nu,iu,ru,ou,au,lu];function _t(s){return s?(s.nodeName||"").toLowerCase():null}function Ze(s){if(s==null)return window;if(s.toString()!=="[object Window]"){var e=s.ownerDocument;return e&&e.defaultView||window}return s}function gs(s){var e=Ze(s).Element;return s instanceof e||s instanceof Element}function Je(s){var e=Ze(s).HTMLElement;return s instanceof e||s instanceof HTMLElement}function Bo(s){if(typeof ShadowRoot>"u")return!1;var e=Ze(s).ShadowRoot;return s instanceof e||s instanceof ShadowRoot}function rg(s){var e=s.state;Object.keys(e.elements).forEach(function(t){var n=e.styles[t]||{},i=e.attributes[t]||{},r=e.elements[t];!Je(r)||!_t(r)||(Object.assign(r.style,n),Object.keys(i).forEach(function(o){var c=i[o];c===!1?r.removeAttribute(o):r.setAttribute(o,c===!0?"":c)}))})}function og(s){var e=s.state,t={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(e.elements.popper.style,t.popper),e.styles=t,e.elements.arrow&&Object.assign(e.elements.arrow.style,t.arrow),function(){Object.keys(e.elements).forEach(function(n){var i=e.elements[n],r=e.attributes[n]||{},o=Object.keys(e.styles.hasOwnProperty(n)?e.styles[n]:t[n]),c=o.reduce(function(u,h){return u[h]="",u},{});!Je(i)||!_t(i)||(Object.assign(i.style,c),Object.keys(r).forEach(function(u){i.removeAttribute(u)}))})}}const jo={name:"applyStyles",enabled:!0,phase:"write",fn:rg,effect:og,requires:["computeStyles"]};function ft(s){return s.split("-")[0]}var ps=Math.max,Ai=Math.min,Ws=Math.round;function eo(){var s=navigator.userAgentData;return s!=null&&s.brands&&Array.isArray(s.brands)?s.brands.map(function(e){return e.brand+"/"+e.version}).join(" "):navigator.userAgent}function uu(){return!/^((?!chrome|android).)*safari/i.test(eo())}function Us(s,e,t){e===void 0&&(e=!1),t===void 0&&(t=!1);var n=s.getBoundingClientRect(),i=1,r=1;e&&Je(s)&&(i=s.offsetWidth>0&&Ws(n.width)/s.offsetWidth||1,r=s.offsetHeight>0&&Ws(n.height)/s.offsetHeight||1);var o=gs(s)?Ze(s):window,c=o.visualViewport,u=!uu()&&t,h=(n.left+(u&&c?c.offsetLeft:0))/i,p=(n.top+(u&&c?c.offsetTop:0))/r,f=n.width/i,g=n.height/r;return{width:f,height:g,top:p,right:h+f,bottom:p+g,left:h,x:h,y:p}}function Ho(s){var e=Us(s),t=s.offsetWidth,n=s.offsetHeight;return Math.abs(e.width-t)<=1&&(t=e.width),Math.abs(e.height-n)<=1&&(n=e.height),{x:s.offsetLeft,y:s.offsetTop,width:t,height:n}}function du(s,e){var t=e.getRootNode&&e.getRootNode();if(s.contains(e))return!0;if(t&&Bo(t)){var n=e;do{if(n&&s.isSameNode(n))return!0;n=n.parentNode||n.host}while(n)}return!1}function St(s){return Ze(s).getComputedStyle(s)}function ag(s){return["table","td","th"].indexOf(_t(s))>=0}function Gt(s){return((gs(s)?s.ownerDocument:s.document)||window.document).documentElement}function Ki(s){return _t(s)==="html"?s:s.assignedSlot||s.parentNode||(Bo(s)?s.host:null)||Gt(s)}function Qa(s){return!Je(s)||St(s).position==="fixed"?null:s.offsetParent}function lg(s){var e=/firefox/i.test(eo()),t=/Trident/i.test(eo());if(t&&Je(s)){var n=St(s);if(n.position==="fixed")return null}var i=Ki(s);for(Bo(i)&&(i=i.host);Je(i)&&["html","body"].indexOf(_t(i))<0;){var r=St(i);if(r.transform!=="none"||r.perspective!=="none"||r.contain==="paint"||["transform","perspective"].indexOf(r.willChange)!==-1||e&&r.willChange==="filter"||e&&r.filter&&r.filter!=="none")return i;i=i.parentNode}return null}function Bn(s){for(var e=Ze(s),t=Qa(s);t&&ag(t)&&St(t).position==="static";)t=Qa(t);return t&&(_t(t)==="html"||_t(t)==="body"&&St(t).position==="static")?e:t||lg(s)||e}function Vo(s){return["top","bottom"].indexOf(s)>=0?"x":"y"}function An(s,e,t){return ps(s,Ai(e,t))}function cg(s,e,t){var n=An(s,e,t);return n>t?t:n}function hu(){return{top:0,right:0,bottom:0,left:0}}function pu(s){return Object.assign({},hu(),s)}function fu(s,e){return e.reduce(function(t,n){return t[n]=s,t},{})}var ug=function(e,t){return e=typeof e=="function"?e(Object.assign({},t.rects,{placement:t.placement})):e,pu(typeof e!="number"?e:fu(e,Js))};function dg(s){var e,t=s.state,n=s.name,i=s.options,r=t.elements.arrow,o=t.modifiersData.popperOffsets,c=ft(t.placement),u=Vo(c),h=[Ie,Ye].indexOf(c)>=0,p=h?"height":"width";if(!(!r||!o)){var f=ug(i.padding,t),g=Ho(r),m=u==="y"?Le:Ie,E=u==="y"?Ge:Ye,v=t.rects.reference[p]+t.rects.reference[u]-o[u]-t.rects.popper[p],w=o[u]-t.rects.reference[u],S=Bn(r),C=S?u==="y"?S.clientHeight||0:S.clientWidth||0:0,x=v/2-w/2,$=f[m],P=C-g[p]-f[E],j=C/2-g[p]/2+x,N=An($,j,P),O=u;t.modifiersData[n]=(e={},e[O]=N,e.centerOffset=N-j,e)}}function hg(s){var e=s.state,t=s.options,n=t.element,i=n===void 0?"[data-popper-arrow]":n;i!=null&&(typeof i=="string"&&(i=e.elements.popper.querySelector(i),!i)||du(e.elements.popper,i)&&(e.elements.arrow=i))}const gu={name:"arrow",enabled:!0,phase:"main",fn:dg,effect:hg,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function qs(s){return s.split("-")[1]}var pg={top:"auto",right:"auto",bottom:"auto",left:"auto"};function fg(s,e){var t=s.x,n=s.y,i=e.devicePixelRatio||1;return{x:Ws(t*i)/i||0,y:Ws(n*i)/i||0}}function Ja(s){var e,t=s.popper,n=s.popperRect,i=s.placement,r=s.variation,o=s.offsets,c=s.position,u=s.gpuAcceleration,h=s.adaptive,p=s.roundOffsets,f=s.isFixed,g=o.x,m=g===void 0?0:g,E=o.y,v=E===void 0?0:E,w=typeof p=="function"?p({x:m,y:v}):{x:m,y:v};m=w.x,v=w.y;var S=o.hasOwnProperty("x"),C=o.hasOwnProperty("y"),x=Ie,$=Le,P=window;if(h){var j=Bn(t),N="clientHeight",O="clientWidth";if(j===Ze(t)&&(j=Gt(t),St(j).position!=="static"&&c==="absolute"&&(N="scrollHeight",O="scrollWidth")),j=j,i===Le||(i===Ie||i===Ye)&&r===Vs){$=Ge;var I=f&&j===P&&P.visualViewport?P.visualViewport.height:j[N];v-=I-n.height,v*=u?1:-1}if(i===Ie||(i===Le||i===Ge)&&r===Vs){x=Ye;var H=f&&j===P&&P.visualViewport?P.visualViewport.width:j[O];m-=H-n.width,m*=u?1:-1}}var Z=Object.assign({position:c},h&&pg),b=p===!0?fg({x:m,y:v},Ze(t)):{x:m,y:v};if(m=b.x,v=b.y,u){var G;return Object.assign({},Z,(G={},G[$]=C?"0":"",G[x]=S?"0":"",G.transform=(P.devicePixelRatio||1)<=1?"translate("+m+"px, "+v+"px)":"translate3d("+m+"px, "+v+"px, 0)",G))}return Object.assign({},Z,(e={},e[$]=C?v+"px":"",e[x]=S?m+"px":"",e.transform="",e))}function gg(s){var e=s.state,t=s.options,n=t.gpuAcceleration,i=n===void 0?!0:n,r=t.adaptive,o=r===void 0?!0:r,c=t.roundOffsets,u=c===void 0?!0:c,h={placement:ft(e.placement),variation:qs(e.placement),popper:e.elements.popper,popperRect:e.rects.popper,gpuAcceleration:i,isFixed:e.options.strategy==="fixed"};e.modifiersData.popperOffsets!=null&&(e.styles.popper=Object.assign({},e.styles.popper,Ja(Object.assign({},h,{offsets:e.modifiersData.popperOffsets,position:e.options.strategy,adaptive:o,roundOffsets:u})))),e.modifiersData.arrow!=null&&(e.styles.arrow=Object.assign({},e.styles.arrow,Ja(Object.assign({},h,{offsets:e.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:u})))),e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-placement":e.placement})}const Wo={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:gg,data:{}};var Gn={passive:!0};function _g(s){var e=s.state,t=s.instance,n=s.options,i=n.scroll,r=i===void 0?!0:i,o=n.resize,c=o===void 0?!0:o,u=Ze(e.elements.popper),h=[].concat(e.scrollParents.reference,e.scrollParents.popper);return r&&h.forEach(function(p){p.addEventListener("scroll",t.update,Gn)}),c&&u.addEventListener("resize",t.update,Gn),function(){r&&h.forEach(function(p){p.removeEventListener("scroll",t.update,Gn)}),c&&u.removeEventListener("resize",t.update,Gn)}}const Uo={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:_g,data:{}};var mg={left:"right",right:"left",bottom:"top",top:"bottom"};function _i(s){return s.replace(/left|right|bottom|top/g,function(e){return mg[e]})}var vg={start:"end",end:"start"};function el(s){return s.replace(/start|end/g,function(e){return vg[e]})}function qo(s){var e=Ze(s),t=e.pageXOffset,n=e.pageYOffset;return{scrollLeft:t,scrollTop:n}}function zo(s){return Us(Gt(s)).left+qo(s).scrollLeft}function bg(s,e){var t=Ze(s),n=Gt(s),i=t.visualViewport,r=n.clientWidth,o=n.clientHeight,c=0,u=0;if(i){r=i.width,o=i.height;var h=uu();(h||!h&&e==="fixed")&&(c=i.offsetLeft,u=i.offsetTop)}return{width:r,height:o,x:c+zo(s),y:u}}function yg(s){var e,t=Gt(s),n=qo(s),i=(e=s.ownerDocument)==null?void 0:e.body,r=ps(t.scrollWidth,t.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),o=ps(t.scrollHeight,t.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),c=-n.scrollLeft+zo(s),u=-n.scrollTop;return St(i||t).direction==="rtl"&&(c+=ps(t.clientWidth,i?i.clientWidth:0)-r),{width:r,height:o,x:c,y:u}}function Ko(s){var e=St(s),t=e.overflow,n=e.overflowX,i=e.overflowY;return/auto|scroll|overlay|hidden/.test(t+i+n)}function _u(s){return["html","body","#document"].indexOf(_t(s))>=0?s.ownerDocument.body:Je(s)&&Ko(s)?s:_u(Ki(s))}function Sn(s,e){var t;e===void 0&&(e=[]);var n=_u(s),i=n===((t=s.ownerDocument)==null?void 0:t.body),r=Ze(n),o=i?[r].concat(r.visualViewport||[],Ko(n)?n:[]):n,c=e.concat(o);return i?c:c.concat(Sn(Ki(o)))}function to(s){return Object.assign({},s,{left:s.x,top:s.y,right:s.x+s.width,bottom:s.y+s.height})}function Eg(s,e){var t=Us(s,!1,e==="fixed");return t.top=t.top+s.clientTop,t.left=t.left+s.clientLeft,t.bottom=t.top+s.clientHeight,t.right=t.left+s.clientWidth,t.width=s.clientWidth,t.height=s.clientHeight,t.x=t.left,t.y=t.top,t}function tl(s,e,t){return e===Mo?to(bg(s,t)):gs(e)?Eg(e,t):to(yg(Gt(s)))}function wg(s){var e=Sn(Ki(s)),t=["absolute","fixed"].indexOf(St(s).position)>=0,n=t&&Je(s)?Bn(s):s;return gs(n)?e.filter(function(i){return gs(i)&&du(i,n)&&_t(i)!=="body"}):[]}function Ag(s,e,t,n){var i=e==="clippingParents"?wg(s):[].concat(e),r=[].concat(i,[t]),o=r[0],c=r.reduce(function(u,h){var p=tl(s,h,n);return u.top=ps(p.top,u.top),u.right=Ai(p.right,u.right),u.bottom=Ai(p.bottom,u.bottom),u.left=ps(p.left,u.left),u},tl(s,o,n));return c.width=c.right-c.left,c.height=c.bottom-c.top,c.x=c.left,c.y=c.top,c}function mu(s){var e=s.reference,t=s.element,n=s.placement,i=n?ft(n):null,r=n?qs(n):null,o=e.x+e.width/2-t.width/2,c=e.y+e.height/2-t.height/2,u;switch(i){case Le:u={x:o,y:e.y-t.height};break;case Ge:u={x:o,y:e.y+e.height};break;case Ye:u={x:e.x+e.width,y:c};break;case Ie:u={x:e.x-t.width,y:c};break;default:u={x:e.x,y:e.y}}var h=i?Vo(i):null;if(h!=null){var p=h==="y"?"height":"width";switch(r){case fs:u[h]=u[h]-(e[p]/2-t[p]/2);break;case Vs:u[h]=u[h]+(e[p]/2-t[p]/2);break}}return u}function zs(s,e){e===void 0&&(e={});var t=e,n=t.placement,i=n===void 0?s.placement:n,r=t.strategy,o=r===void 0?s.strategy:r,c=t.boundary,u=c===void 0?Qc:c,h=t.rootBoundary,p=h===void 0?Mo:h,f=t.elementContext,g=f===void 0?$s:f,m=t.altBoundary,E=m===void 0?!1:m,v=t.padding,w=v===void 0?0:v,S=pu(typeof w!="number"?w:fu(w,Js)),C=g===$s?Jc:$s,x=s.rects.popper,$=s.elements[E?C:g],P=Ag(gs($)?$:$.contextElement||Gt(s.elements.popper),u,p,o),j=Us(s.elements.reference),N=mu({reference:j,element:x,strategy:"absolute",placement:i}),O=to(Object.assign({},x,N)),I=g===$s?O:j,H={top:P.top-I.top+S.top,bottom:I.bottom-P.bottom+S.bottom,left:P.left-I.left+S.left,right:I.right-P.right+S.right},Z=s.modifiersData.offset;if(g===$s&&Z){var b=Z[i];Object.keys(H).forEach(function(G){var q=[Ye,Ge].indexOf(G)>=0?1:-1,te=[Le,Ge].indexOf(G)>=0?"y":"x";H[G]+=b[te]*q})}return H}function Sg(s,e){e===void 0&&(e={});var t=e,n=t.placement,i=t.boundary,r=t.rootBoundary,o=t.padding,c=t.flipVariations,u=t.allowedAutoPlacements,h=u===void 0?Fo:u,p=qs(n),f=p?c?Jr:Jr.filter(function(E){return qs(E)===p}):Js,g=f.filter(function(E){return h.indexOf(E)>=0});g.length===0&&(g=f);var m=g.reduce(function(E,v){return E[v]=zs(s,{placement:v,boundary:i,rootBoundary:r,padding:o})[ft(v)],E},{});return Object.keys(m).sort(function(E,v){return m[E]-m[v]})}function Tg(s){if(ft(s)===zi)return[];var e=_i(s);return[el(s),e,el(e)]}function Cg(s){var e=s.state,t=s.options,n=s.name;if(!e.modifiersData[n]._skip){for(var i=t.mainAxis,r=i===void 0?!0:i,o=t.altAxis,c=o===void 0?!0:o,u=t.fallbackPlacements,h=t.padding,p=t.boundary,f=t.rootBoundary,g=t.altBoundary,m=t.flipVariations,E=m===void 0?!0:m,v=t.allowedAutoPlacements,w=e.options.placement,S=ft(w),C=S===w,x=u||(C||!E?[_i(w)]:Tg(w)),$=[w].concat(x).reduce(function(X,ie){return X.concat(ft(ie)===zi?Sg(e,{placement:ie,boundary:p,rootBoundary:f,padding:h,flipVariations:E,allowedAutoPlacements:v}):ie)},[]),P=e.rects.reference,j=e.rects.popper,N=new Map,O=!0,I=$[0],H=0;H<$.length;H++){var Z=$[H],b=ft(Z),G=qs(Z)===fs,q=[Le,Ge].indexOf(b)>=0,te=q?"width":"height",W=zs(e,{placement:Z,boundary:p,rootBoundary:f,altBoundary:g,padding:h}),R=q?G?Ye:Ie:G?Ge:Le;P[te]>j[te]&&(R=_i(R));var ge=_i(R),ce=[];if(r&&ce.push(W[b]<=0),c&&ce.push(W[R]<=0,W[ge]<=0),ce.every(function(X){return X})){I=Z,O=!1;break}N.set(Z,ce)}if(O)for(var _e=E?3:1,Be=function(ie){var Se=$.find(function(je){var ye=N.get(je);if(ye)return ye.slice(0,ie).every(function(rt){return rt})});if(Se)return I=Se,"break"},ne=_e;ne>0;ne--){var re=Be(ne);if(re==="break")break}e.placement!==I&&(e.modifiersData[n]._skip=!0,e.placement=I,e.reset=!0)}}const vu={name:"flip",enabled:!0,phase:"main",fn:Cg,requiresIfExists:["offset"],data:{_skip:!1}};function sl(s,e,t){return t===void 0&&(t={x:0,y:0}),{top:s.top-e.height-t.y,right:s.right-e.width+t.x,bottom:s.bottom-e.height+t.y,left:s.left-e.width-t.x}}function nl(s){return[Le,Ye,Ge,Ie].some(function(e){return s[e]>=0})}function kg(s){var e=s.state,t=s.name,n=e.rects.reference,i=e.rects.popper,r=e.modifiersData.preventOverflow,o=zs(e,{elementContext:"reference"}),c=zs(e,{altBoundary:!0}),u=sl(o,n),h=sl(c,i,r),p=nl(u),f=nl(h);e.modifiersData[t]={referenceClippingOffsets:u,popperEscapeOffsets:h,isReferenceHidden:p,hasPopperEscaped:f},e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-reference-hidden":p,"data-popper-escaped":f})}const bu={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:kg};function Og(s,e,t){var n=ft(s),i=[Ie,Le].indexOf(n)>=0?-1:1,r=typeof t=="function"?t(Object.assign({},e,{placement:s})):t,o=r[0],c=r[1];return o=o||0,c=(c||0)*i,[Ie,Ye].indexOf(n)>=0?{x:c,y:o}:{x:o,y:c}}function Pg(s){var e=s.state,t=s.options,n=s.name,i=t.offset,r=i===void 0?[0,0]:i,o=Fo.reduce(function(p,f){return p[f]=Og(f,e.rects,r),p},{}),c=o[e.placement],u=c.x,h=c.y;e.modifiersData.popperOffsets!=null&&(e.modifiersData.popperOffsets.x+=u,e.modifiersData.popperOffsets.y+=h),e.modifiersData[n]=o}const yu={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:Pg};function $g(s){var e=s.state,t=s.name;e.modifiersData[t]=mu({reference:e.rects.reference,element:e.rects.popper,strategy:"absolute",placement:e.placement})}const Go={name:"popperOffsets",enabled:!0,phase:"read",fn:$g,data:{}};function xg(s){return s==="x"?"y":"x"}function Lg(s){var e=s.state,t=s.options,n=s.name,i=t.mainAxis,r=i===void 0?!0:i,o=t.altAxis,c=o===void 0?!1:o,u=t.boundary,h=t.rootBoundary,p=t.altBoundary,f=t.padding,g=t.tether,m=g===void 0?!0:g,E=t.tetherOffset,v=E===void 0?0:E,w=zs(e,{boundary:u,rootBoundary:h,padding:f,altBoundary:p}),S=ft(e.placement),C=qs(e.placement),x=!C,$=Vo(S),P=xg($),j=e.modifiersData.popperOffsets,N=e.rects.reference,O=e.rects.popper,I=typeof v=="function"?v(Object.assign({},e.rects,{placement:e.placement})):v,H=typeof I=="number"?{mainAxis:I,altAxis:I}:Object.assign({mainAxis:0,altAxis:0},I),Z=e.modifiersData.offset?e.modifiersData.offset[e.placement]:null,b={x:0,y:0};if(j){if(r){var G,q=$==="y"?Le:Ie,te=$==="y"?Ge:Ye,W=$==="y"?"height":"width",R=j[$],ge=R+w[q],ce=R-w[te],_e=m?-O[W]/2:0,Be=C===fs?N[W]:O[W],ne=C===fs?-O[W]:-N[W],re=e.elements.arrow,X=m&&re?Ho(re):{width:0,height:0},ie=e.modifiersData["arrow#persistent"]?e.modifiersData["arrow#persistent"].padding:hu(),Se=ie[q],je=ie[te],ye=An(0,N[W],X[W]),rt=x?N[W]/2-_e-ye-Se-H.mainAxis:Be-ye-Se-H.mainAxis,He=x?-N[W]/2+_e+ye+je+H.mainAxis:ne+ye+je+H.mainAxis,dt=e.elements.arrow&&Bn(e.elements.arrow),Ct=dt?$==="y"?dt.clientTop||0:dt.clientLeft||0:0,kt=(G=Z==null?void 0:Z[$])!=null?G:0,Ot=R+rt-kt-Ct,Pt=R+He-kt,ht=An(m?Ai(ge,Ot):ge,R,m?ps(ce,Pt):ce);j[$]=ht,b[$]=ht-R}if(c){var $t,xt=$==="x"?Le:Ie,me=$==="x"?Ge:Ye,Ee=j[P],bs=P==="y"?"height":"width",ke=Ee+w[xt],ys=Ee-w[me],Es=[Le,Ie].indexOf(S)!==-1,nn=($t=Z==null?void 0:Z[P])!=null?$t:0,z=Es?ke:Ee-N[bs]-O[bs]-nn+H.altAxis,Ve=Es?Ee+N[bs]+O[bs]-nn-H.altAxis:ys,ot=m&&Es?cg(z,Ee,Ve):An(m?z:ke,Ee,m?Ve:ys);j[P]=ot,b[P]=ot-Ee}e.modifiersData[n]=b}}const Eu={name:"preventOverflow",enabled:!0,phase:"main",fn:Lg,requiresIfExists:["offset"]};function Ig(s){return{scrollLeft:s.scrollLeft,scrollTop:s.scrollTop}}function Rg(s){return s===Ze(s)||!Je(s)?qo(s):Ig(s)}function Dg(s){var e=s.getBoundingClientRect(),t=Ws(e.width)/s.offsetWidth||1,n=Ws(e.height)/s.offsetHeight||1;return t!==1||n!==1}function Ng(s,e,t){t===void 0&&(t=!1);var n=Je(e),i=Je(e)&&Dg(e),r=Gt(e),o=Us(s,i,t),c={scrollLeft:0,scrollTop:0},u={x:0,y:0};return(n||!n&&!t)&&((_t(e)!=="body"||Ko(r))&&(c=Rg(e)),Je(e)?(u=Us(e,!0),u.x+=e.clientLeft,u.y+=e.clientTop):r&&(u.x=zo(r))),{x:o.left+c.scrollLeft-u.x,y:o.top+c.scrollTop-u.y,width:o.width,height:o.height}}function Mg(s){var e=new Map,t=new Set,n=[];s.forEach(function(r){e.set(r.name,r)});function i(r){t.add(r.name);var o=[].concat(r.requires||[],r.requiresIfExists||[]);o.forEach(function(c){if(!t.has(c)){var u=e.get(c);u&&i(u)}}),n.push(r)}return s.forEach(function(r){t.has(r.name)||i(r)}),n}function Fg(s){var e=Mg(s);return cu.reduce(function(t,n){return t.concat(e.filter(function(i){return i.phase===n}))},[])}function Bg(s){var e;return function(){return e||(e=new Promise(function(t){Promise.resolve().then(function(){e=void 0,t(s())})})),e}}function jg(s){var e=s.reduce(function(t,n){var i=t[n.name];return t[n.name]=i?Object.assign({},i,n,{options:Object.assign({},i.options,n.options),data:Object.assign({},i.data,n.data)}):n,t},{});return Object.keys(e).map(function(t){return e[t]})}var il={placement:"bottom",modifiers:[],strategy:"absolute"};function rl(){for(var s=arguments.length,e=new Array(s),t=0;t<s;t++)e[t]=arguments[t];return!e.some(function(n){return!(n&&typeof n.getBoundingClientRect=="function")})}function Gi(s){s===void 0&&(s={});var e=s,t=e.defaultModifiers,n=t===void 0?[]:t,i=e.defaultOptions,r=i===void 0?il:i;return function(c,u,h){h===void 0&&(h=r);var p={placement:"bottom",orderedModifiers:[],options:Object.assign({},il,r),modifiersData:{},elements:{reference:c,popper:u},attributes:{},styles:{}},f=[],g=!1,m={state:p,setOptions:function(S){var C=typeof S=="function"?S(p.options):S;v(),p.options=Object.assign({},r,p.options,C),p.scrollParents={reference:gs(c)?Sn(c):c.contextElement?Sn(c.contextElement):[],popper:Sn(u)};var x=Fg(jg([].concat(n,p.options.modifiers)));return p.orderedModifiers=x.filter(function($){return $.enabled}),E(),m.update()},forceUpdate:function(){if(!g){var S=p.elements,C=S.reference,x=S.popper;if(rl(C,x)){p.rects={reference:Ng(C,Bn(x),p.options.strategy==="fixed"),popper:Ho(x)},p.reset=!1,p.placement=p.options.placement,p.orderedModifiers.forEach(function(H){return p.modifiersData[H.name]=Object.assign({},H.data)});for(var $=0;$<p.orderedModifiers.length;$++){if(p.reset===!0){p.reset=!1,$=-1;continue}var P=p.orderedModifiers[$],j=P.fn,N=P.options,O=N===void 0?{}:N,I=P.name;typeof j=="function"&&(p=j({state:p,options:O,name:I,instance:m})||p)}}}},update:Bg(function(){return new Promise(function(w){m.forceUpdate(),w(p)})}),destroy:function(){v(),g=!0}};if(!rl(c,u))return m;m.setOptions(h).then(function(w){!g&&h.onFirstUpdate&&h.onFirstUpdate(w)});function E(){p.orderedModifiers.forEach(function(w){var S=w.name,C=w.options,x=C===void 0?{}:C,$=w.effect;if(typeof $=="function"){var P=$({state:p,name:S,instance:m,options:x}),j=function(){};f.push(P||j)}})}function v(){f.forEach(function(w){return w()}),f=[]}return m}}var Hg=Gi(),Vg=[Uo,Go,Wo,jo],Wg=Gi({defaultModifiers:Vg}),Ug=[Uo,Go,Wo,jo,yu,vu,Eu,gu,bu],Yo=Gi({defaultModifiers:Ug});const wu=Object.freeze(Object.defineProperty({__proto__:null,afterMain:ru,afterRead:su,afterWrite:lu,applyStyles:jo,arrow:gu,auto:zi,basePlacements:Js,beforeMain:nu,beforeRead:eu,beforeWrite:ou,bottom:Ge,clippingParents:Qc,computeStyles:Wo,createPopper:Yo,createPopperBase:Hg,createPopperLite:Wg,detectOverflow:zs,end:Vs,eventListeners:Uo,flip:vu,hide:bu,left:Ie,main:iu,modifierPhases:cu,offset:yu,placements:Fo,popper:$s,popperGenerator:Gi,popperOffsets:Go,preventOverflow:Eu,read:tu,reference:Jc,right:Ye,start:fs,top:Le,variationPlacements:Jr,viewport:Mo,write:au},Symbol.toStringTag,{value:"Module"}));/*!
  * Bootstrap v5.3.3 (https://getbootstrap.com/)
  * Copyright 2011-2024 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
  * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
  */const Lt=new Map,mr={set(s,e,t){Lt.has(s)||Lt.set(s,new Map);const n=Lt.get(s);if(!n.has(e)&&n.size!==0){console.error(`Bootstrap doesn't allow more than one instance per element. Bound instance: ${Array.from(n.keys())[0]}.`);return}n.set(e,t)},get(s,e){return Lt.has(s)&&Lt.get(s).get(e)||null},remove(s,e){if(!Lt.has(s))return;const t=Lt.get(s);t.delete(e),t.size===0&&Lt.delete(s)}},qg=1e6,zg=1e3,so="transitionend",Au=s=>(s&&window.CSS&&window.CSS.escape&&(s=s.replace(/#([^\s"#']+)/g,(e,t)=>`#${CSS.escape(t)}`)),s),Kg=s=>s==null?`${s}`:Object.prototype.toString.call(s).match(/\s([a-z]+)/i)[1].toLowerCase(),Gg=s=>{do s+=Math.floor(Math.random()*qg);while(document.getElementById(s));return s},Yg=s=>{if(!s)return 0;let{transitionDuration:e,transitionDelay:t}=window.getComputedStyle(s);const n=Number.parseFloat(e),i=Number.parseFloat(t);return!n&&!i?0:(e=e.split(",")[0],t=t.split(",")[0],(Number.parseFloat(e)+Number.parseFloat(t))*zg)},Su=s=>{s.dispatchEvent(new Event(so))},Et=s=>!s||typeof s!="object"?!1:(typeof s.jquery<"u"&&(s=s[0]),typeof s.nodeType<"u"),qt=s=>Et(s)?s.jquery?s[0]:s:typeof s=="string"&&s.length>0?document.querySelector(Au(s)):null,en=s=>{if(!Et(s)||s.getClientRects().length===0)return!1;const e=getComputedStyle(s).getPropertyValue("visibility")==="visible",t=s.closest("details:not([open])");if(!t)return e;if(t!==s){const n=s.closest("summary");if(n&&n.parentNode!==t||n===null)return!1}return e},zt=s=>!s||s.nodeType!==Node.ELEMENT_NODE||s.classList.contains("disabled")?!0:typeof s.disabled<"u"?s.disabled:s.hasAttribute("disabled")&&s.getAttribute("disabled")!=="false",Tu=s=>{if(!document.documentElement.attachShadow)return null;if(typeof s.getRootNode=="function"){const e=s.getRootNode();return e instanceof ShadowRoot?e:null}return s instanceof ShadowRoot?s:s.parentNode?Tu(s.parentNode):null},Si=()=>{},jn=s=>{s.offsetHeight},Cu=()=>window.jQuery&&!document.body.hasAttribute("data-bs-no-jquery")?window.jQuery:null,vr=[],Zg=s=>{document.readyState==="loading"?(vr.length||document.addEventListener("DOMContentLoaded",()=>{for(const e of vr)e()}),vr.push(s)):s()},st=()=>document.documentElement.dir==="rtl",it=s=>{Zg(()=>{const e=Cu();if(e){const t=s.NAME,n=e.fn[t];e.fn[t]=s.jQueryInterface,e.fn[t].Constructor=s,e.fn[t].noConflict=()=>(e.fn[t]=n,s.jQueryInterface)}})},Ne=(s,e=[],t=s)=>typeof s=="function"?s(...e):t,ku=(s,e,t=!0)=>{if(!t){Ne(s);return}const i=Yg(e)+5;let r=!1;const o=({target:c})=>{c===e&&(r=!0,e.removeEventListener(so,o),Ne(s))};e.addEventListener(so,o),setTimeout(()=>{r||Su(e)},i)},Zo=(s,e,t,n)=>{const i=s.length;let r=s.indexOf(e);return r===-1?!t&&n?s[i-1]:s[0]:(r+=t?1:-1,n&&(r=(r+i)%i),s[Math.max(0,Math.min(r,i-1))])},Xg=/[^.]*(?=\..*)\.|.*/,Qg=/\..*/,Jg=/::\d+$/,br={};let ol=1;const Ou={mouseenter:"mouseover",mouseleave:"mouseout"},e_=new Set(["click","dblclick","mouseup","mousedown","contextmenu","mousewheel","DOMMouseScroll","mouseover","mouseout","mousemove","selectstart","selectend","keydown","keypress","keyup","orientationchange","touchstart","touchmove","touchend","touchcancel","pointerdown","pointermove","pointerup","pointerleave","pointercancel","gesturestart","gesturechange","gestureend","focus","blur","change","reset","select","submit","focusin","focusout","load","unload","beforeunload","resize","move","DOMContentLoaded","readystatechange","error","abort","scroll"]);function Pu(s,e){return e&&`${e}::${ol++}`||s.uidEvent||ol++}function $u(s){const e=Pu(s);return s.uidEvent=e,br[e]=br[e]||{},br[e]}function t_(s,e){return function t(n){return Xo(n,{delegateTarget:s}),t.oneOff&&T.off(s,n.type,e),e.apply(s,[n])}}function s_(s,e,t){return function n(i){const r=s.querySelectorAll(e);for(let{target:o}=i;o&&o!==this;o=o.parentNode)for(const c of r)if(c===o)return Xo(i,{delegateTarget:o}),n.oneOff&&T.off(s,i.type,e,t),t.apply(o,[i])}}function xu(s,e,t=null){return Object.values(s).find(n=>n.callable===e&&n.delegationSelector===t)}function Lu(s,e,t){const n=typeof e=="string",i=n?t:e||t;let r=Iu(s);return e_.has(r)||(r=s),[n,i,r]}function al(s,e,t,n,i){if(typeof e!="string"||!s)return;let[r,o,c]=Lu(e,t,n);e in Ou&&(o=(E=>function(v){if(!v.relatedTarget||v.relatedTarget!==v.delegateTarget&&!v.delegateTarget.contains(v.relatedTarget))return E.call(this,v)})(o));const u=$u(s),h=u[c]||(u[c]={}),p=xu(h,o,r?t:null);if(p){p.oneOff=p.oneOff&&i;return}const f=Pu(o,e.replace(Xg,"")),g=r?s_(s,t,o):t_(s,o);g.delegationSelector=r?t:null,g.callable=o,g.oneOff=i,g.uidEvent=f,h[f]=g,s.addEventListener(c,g,r)}function no(s,e,t,n,i){const r=xu(e[t],n,i);r&&(s.removeEventListener(t,r,!!i),delete e[t][r.uidEvent])}function n_(s,e,t,n){const i=e[t]||{};for(const[r,o]of Object.entries(i))r.includes(n)&&no(s,e,t,o.callable,o.delegationSelector)}function Iu(s){return s=s.replace(Qg,""),Ou[s]||s}const T={on(s,e,t,n){al(s,e,t,n,!1)},one(s,e,t,n){al(s,e,t,n,!0)},off(s,e,t,n){if(typeof e!="string"||!s)return;const[i,r,o]=Lu(e,t,n),c=o!==e,u=$u(s),h=u[o]||{},p=e.startsWith(".");if(typeof r<"u"){if(!Object.keys(h).length)return;no(s,u,o,r,i?t:null);return}if(p)for(const f of Object.keys(u))n_(s,u,f,e.slice(1));for(const[f,g]of Object.entries(h)){const m=f.replace(Jg,"");(!c||e.includes(m))&&no(s,u,o,g.callable,g.delegationSelector)}},trigger(s,e,t){if(typeof e!="string"||!s)return null;const n=Cu(),i=Iu(e),r=e!==i;let o=null,c=!0,u=!0,h=!1;r&&n&&(o=n.Event(e,t),n(s).trigger(o),c=!o.isPropagationStopped(),u=!o.isImmediatePropagationStopped(),h=o.isDefaultPrevented());const p=Xo(new Event(e,{bubbles:c,cancelable:!0}),t);return h&&p.preventDefault(),u&&s.dispatchEvent(p),p.defaultPrevented&&o&&o.preventDefault(),p}};function Xo(s,e={}){for(const[t,n]of Object.entries(e))try{s[t]=n}catch{Object.defineProperty(s,t,{configurable:!0,get(){return n}})}return s}function ll(s){if(s==="true")return!0;if(s==="false")return!1;if(s===Number(s).toString())return Number(s);if(s===""||s==="null")return null;if(typeof s!="string")return s;try{return JSON.parse(decodeURIComponent(s))}catch{return s}}function yr(s){return s.replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`)}const wt={setDataAttribute(s,e,t){s.setAttribute(`data-bs-${yr(e)}`,t)},removeDataAttribute(s,e){s.removeAttribute(`data-bs-${yr(e)}`)},getDataAttributes(s){if(!s)return{};const e={},t=Object.keys(s.dataset).filter(n=>n.startsWith("bs")&&!n.startsWith("bsConfig"));for(const n of t){let i=n.replace(/^bs/,"");i=i.charAt(0).toLowerCase()+i.slice(1,i.length),e[i]=ll(s.dataset[n])}return e},getDataAttribute(s,e){return ll(s.getAttribute(`data-bs-${yr(e)}`))}};class Hn{static get Default(){return{}}static get DefaultType(){return{}}static get NAME(){throw new Error('You have to implement the static method "NAME", for each component!')}_getConfig(e){return e=this._mergeConfigObj(e),e=this._configAfterMerge(e),this._typeCheckConfig(e),e}_configAfterMerge(e){return e}_mergeConfigObj(e,t){const n=Et(t)?wt.getDataAttribute(t,"config"):{};return{...this.constructor.Default,...typeof n=="object"?n:{},...Et(t)?wt.getDataAttributes(t):{},...typeof e=="object"?e:{}}}_typeCheckConfig(e,t=this.constructor.DefaultType){for(const[n,i]of Object.entries(t)){const r=e[n],o=Et(r)?"element":Kg(r);if(!new RegExp(i).test(o))throw new TypeError(`${this.constructor.NAME.toUpperCase()}: Option "${n}" provided type "${o}" but expected type "${i}".`)}}}const i_="5.3.3";class ut extends Hn{constructor(e,t){super(),e=qt(e),e&&(this._element=e,this._config=this._getConfig(t),mr.set(this._element,this.constructor.DATA_KEY,this))}dispose(){mr.remove(this._element,this.constructor.DATA_KEY),T.off(this._element,this.constructor.EVENT_KEY);for(const e of Object.getOwnPropertyNames(this))this[e]=null}_queueCallback(e,t,n=!0){ku(e,t,n)}_getConfig(e){return e=this._mergeConfigObj(e,this._element),e=this._configAfterMerge(e),this._typeCheckConfig(e),e}static getInstance(e){return mr.get(qt(e),this.DATA_KEY)}static getOrCreateInstance(e,t={}){return this.getInstance(e)||new this(e,typeof t=="object"?t:null)}static get VERSION(){return i_}static get DATA_KEY(){return`bs.${this.NAME}`}static get EVENT_KEY(){return`.${this.DATA_KEY}`}static eventName(e){return`${e}${this.EVENT_KEY}`}}const Er=s=>{let e=s.getAttribute("data-bs-target");if(!e||e==="#"){let t=s.getAttribute("href");if(!t||!t.includes("#")&&!t.startsWith("."))return null;t.includes("#")&&!t.startsWith("#")&&(t=`#${t.split("#")[1]}`),e=t&&t!=="#"?t.trim():null}return e?e.split(",").map(t=>Au(t)).join(","):null},B={find(s,e=document.documentElement){return[].concat(...Element.prototype.querySelectorAll.call(e,s))},findOne(s,e=document.documentElement){return Element.prototype.querySelector.call(e,s)},children(s,e){return[].concat(...s.children).filter(t=>t.matches(e))},parents(s,e){const t=[];let n=s.parentNode.closest(e);for(;n;)t.push(n),n=n.parentNode.closest(e);return t},prev(s,e){let t=s.previousElementSibling;for(;t;){if(t.matches(e))return[t];t=t.previousElementSibling}return[]},next(s,e){let t=s.nextElementSibling;for(;t;){if(t.matches(e))return[t];t=t.nextElementSibling}return[]},focusableChildren(s){const e=["a","button","input","textarea","select","details","[tabindex]",'[contenteditable="true"]'].map(t=>`${t}:not([tabindex^="-"])`).join(",");return this.find(e,s).filter(t=>!zt(t)&&en(t))},getSelectorFromElement(s){const e=Er(s);return e&&B.findOne(e)?e:null},getElementFromSelector(s){const e=Er(s);return e?B.findOne(e):null},getMultipleElementsFromSelector(s){const e=Er(s);return e?B.find(e):[]}},Yi=(s,e="hide")=>{const t=`click.dismiss${s.EVENT_KEY}`,n=s.NAME;T.on(document,t,`[data-bs-dismiss="${n}"]`,function(i){if(["A","AREA"].includes(this.tagName)&&i.preventDefault(),zt(this))return;const r=B.getElementFromSelector(this)||this.closest(`.${n}`);s.getOrCreateInstance(r)[e]()})},r_="alert",o_="bs.alert",Ru=`.${o_}`,a_=`close${Ru}`,l_=`closed${Ru}`,c_="fade",u_="show";class Zi extends ut{static get NAME(){return r_}close(){if(T.trigger(this._element,a_).defaultPrevented)return;this._element.classList.remove(u_);const t=this._element.classList.contains(c_);this._queueCallback(()=>this._destroyElement(),this._element,t)}_destroyElement(){this._element.remove(),T.trigger(this._element,l_),this.dispose()}static jQueryInterface(e){return this.each(function(){const t=Zi.getOrCreateInstance(this);if(typeof e=="string"){if(t[e]===void 0||e.startsWith("_")||e==="constructor")throw new TypeError(`No method named "${e}"`);t[e](this)}})}}Yi(Zi,"close");it(Zi);const d_="button",h_="bs.button",p_=`.${h_}`,f_=".data-api",g_="active",cl='[data-bs-toggle="button"]',__=`click${p_}${f_}`;class Xi extends ut{static get NAME(){return d_}toggle(){this._element.setAttribute("aria-pressed",this._element.classList.toggle(g_))}static jQueryInterface(e){return this.each(function(){const t=Xi.getOrCreateInstance(this);e==="toggle"&&t[e]()})}}T.on(document,__,cl,s=>{s.preventDefault();const e=s.target.closest(cl);Xi.getOrCreateInstance(e).toggle()});it(Xi);const m_="swipe",tn=".bs.swipe",v_=`touchstart${tn}`,b_=`touchmove${tn}`,y_=`touchend${tn}`,E_=`pointerdown${tn}`,w_=`pointerup${tn}`,A_="touch",S_="pen",T_="pointer-event",C_=40,k_={endCallback:null,leftCallback:null,rightCallback:null},O_={endCallback:"(function|null)",leftCallback:"(function|null)",rightCallback:"(function|null)"};class Ti extends Hn{constructor(e,t){super(),this._element=e,!(!e||!Ti.isSupported())&&(this._config=this._getConfig(t),this._deltaX=0,this._supportPointerEvents=!!window.PointerEvent,this._initEvents())}static get Default(){return k_}static get DefaultType(){return O_}static get NAME(){return m_}dispose(){T.off(this._element,tn)}_start(e){if(!this._supportPointerEvents){this._deltaX=e.touches[0].clientX;return}this._eventIsPointerPenTouch(e)&&(this._deltaX=e.clientX)}_end(e){this._eventIsPointerPenTouch(e)&&(this._deltaX=e.clientX-this._deltaX),this._handleSwipe(),Ne(this._config.endCallback)}_move(e){this._deltaX=e.touches&&e.touches.length>1?0:e.touches[0].clientX-this._deltaX}_handleSwipe(){const e=Math.abs(this._deltaX);if(e<=C_)return;const t=e/this._deltaX;this._deltaX=0,t&&Ne(t>0?this._config.rightCallback:this._config.leftCallback)}_initEvents(){this._supportPointerEvents?(T.on(this._element,E_,e=>this._start(e)),T.on(this._element,w_,e=>this._end(e)),this._element.classList.add(T_)):(T.on(this._element,v_,e=>this._start(e)),T.on(this._element,b_,e=>this._move(e)),T.on(this._element,y_,e=>this._end(e)))}_eventIsPointerPenTouch(e){return this._supportPointerEvents&&(e.pointerType===S_||e.pointerType===A_)}static isSupported(){return"ontouchstart"in document.documentElement||navigator.maxTouchPoints>0}}const P_="carousel",$_="bs.carousel",Yt=`.${$_}`,Du=".data-api",x_="ArrowLeft",L_="ArrowRight",I_=500,un="next",ks="prev",xs="left",mi="right",R_=`slide${Yt}`,wr=`slid${Yt}`,D_=`keydown${Yt}`,N_=`mouseenter${Yt}`,M_=`mouseleave${Yt}`,F_=`dragstart${Yt}`,B_=`load${Yt}${Du}`,j_=`click${Yt}${Du}`,Nu="carousel",Yn="active",H_="slide",V_="carousel-item-end",W_="carousel-item-start",U_="carousel-item-next",q_="carousel-item-prev",Mu=".active",Fu=".carousel-item",z_=Mu+Fu,K_=".carousel-item img",G_=".carousel-indicators",Y_="[data-bs-slide], [data-bs-slide-to]",Z_='[data-bs-ride="carousel"]',X_={[x_]:mi,[L_]:xs},Q_={interval:5e3,keyboard:!0,pause:"hover",ride:!1,touch:!0,wrap:!0},J_={interval:"(number|boolean)",keyboard:"boolean",pause:"(string|boolean)",ride:"(boolean|string)",touch:"boolean",wrap:"boolean"};class Vn extends ut{constructor(e,t){super(e,t),this._interval=null,this._activeElement=null,this._isSliding=!1,this.touchTimeout=null,this._swipeHelper=null,this._indicatorsElement=B.findOne(G_,this._element),this._addEventListeners(),this._config.ride===Nu&&this.cycle()}static get Default(){return Q_}static get DefaultType(){return J_}static get NAME(){return P_}next(){this._slide(un)}nextWhenVisible(){!document.hidden&&en(this._element)&&this.next()}prev(){this._slide(ks)}pause(){this._isSliding&&Su(this._element),this._clearInterval()}cycle(){this._clearInterval(),this._updateInterval(),this._interval=setInterval(()=>this.nextWhenVisible(),this._config.interval)}_maybeEnableCycle(){if(this._config.ride){if(this._isSliding){T.one(this._element,wr,()=>this.cycle());return}this.cycle()}}to(e){const t=this._getItems();if(e>t.length-1||e<0)return;if(this._isSliding){T.one(this._element,wr,()=>this.to(e));return}const n=this._getItemIndex(this._getActive());if(n===e)return;const i=e>n?un:ks;this._slide(i,t[e])}dispose(){this._swipeHelper&&this._swipeHelper.dispose(),super.dispose()}_configAfterMerge(e){return e.defaultInterval=e.interval,e}_addEventListeners(){this._config.keyboard&&T.on(this._element,D_,e=>this._keydown(e)),this._config.pause==="hover"&&(T.on(this._element,N_,()=>this.pause()),T.on(this._element,M_,()=>this._maybeEnableCycle())),this._config.touch&&Ti.isSupported()&&this._addTouchEventListeners()}_addTouchEventListeners(){for(const n of B.find(K_,this._element))T.on(n,F_,i=>i.preventDefault());const t={leftCallback:()=>this._slide(this._directionToOrder(xs)),rightCallback:()=>this._slide(this._directionToOrder(mi)),endCallback:()=>{this._config.pause==="hover"&&(this.pause(),this.touchTimeout&&clearTimeout(this.touchTimeout),this.touchTimeout=setTimeout(()=>this._maybeEnableCycle(),I_+this._config.interval))}};this._swipeHelper=new Ti(this._element,t)}_keydown(e){if(/input|textarea/i.test(e.target.tagName))return;const t=X_[e.key];t&&(e.preventDefault(),this._slide(this._directionToOrder(t)))}_getItemIndex(e){return this._getItems().indexOf(e)}_setActiveIndicatorElement(e){if(!this._indicatorsElement)return;const t=B.findOne(Mu,this._indicatorsElement);t.classList.remove(Yn),t.removeAttribute("aria-current");const n=B.findOne(`[data-bs-slide-to="${e}"]`,this._indicatorsElement);n&&(n.classList.add(Yn),n.setAttribute("aria-current","true"))}_updateInterval(){const e=this._activeElement||this._getActive();if(!e)return;const t=Number.parseInt(e.getAttribute("data-bs-interval"),10);this._config.interval=t||this._config.defaultInterval}_slide(e,t=null){if(this._isSliding)return;const n=this._getActive(),i=e===un,r=t||Zo(this._getItems(),n,i,this._config.wrap);if(r===n)return;const o=this._getItemIndex(r),c=m=>T.trigger(this._element,m,{relatedTarget:r,direction:this._orderToDirection(e),from:this._getItemIndex(n),to:o});if(c(R_).defaultPrevented||!n||!r)return;const h=!!this._interval;this.pause(),this._isSliding=!0,this._setActiveIndicatorElement(o),this._activeElement=r;const p=i?W_:V_,f=i?U_:q_;r.classList.add(f),jn(r),n.classList.add(p),r.classList.add(p);const g=()=>{r.classList.remove(p,f),r.classList.add(Yn),n.classList.remove(Yn,f,p),this._isSliding=!1,c(wr)};this._queueCallback(g,n,this._isAnimated()),h&&this.cycle()}_isAnimated(){return this._element.classList.contains(H_)}_getActive(){return B.findOne(z_,this._element)}_getItems(){return B.find(Fu,this._element)}_clearInterval(){this._interval&&(clearInterval(this._interval),this._interval=null)}_directionToOrder(e){return st()?e===xs?ks:un:e===xs?un:ks}_orderToDirection(e){return st()?e===ks?xs:mi:e===ks?mi:xs}static jQueryInterface(e){return this.each(function(){const t=Vn.getOrCreateInstance(this,e);if(typeof e=="number"){t.to(e);return}if(typeof e=="string"){if(t[e]===void 0||e.startsWith("_")||e==="constructor")throw new TypeError(`No method named "${e}"`);t[e]()}})}}T.on(document,j_,Y_,function(s){const e=B.getElementFromSelector(this);if(!e||!e.classList.contains(Nu))return;s.preventDefault();const t=Vn.getOrCreateInstance(e),n=this.getAttribute("data-bs-slide-to");if(n){t.to(n),t._maybeEnableCycle();return}if(wt.getDataAttribute(this,"slide")==="next"){t.next(),t._maybeEnableCycle();return}t.prev(),t._maybeEnableCycle()});T.on(window,B_,()=>{const s=B.find(Z_);for(const e of s)Vn.getOrCreateInstance(e)});it(Vn);const em="collapse",tm="bs.collapse",Wn=`.${tm}`,sm=".data-api",nm=`show${Wn}`,im=`shown${Wn}`,rm=`hide${Wn}`,om=`hidden${Wn}`,am=`click${Wn}${sm}`,Ar="show",Ds="collapse",Zn="collapsing",lm="collapsed",cm=`:scope .${Ds} .${Ds}`,um="collapse-horizontal",dm="width",hm="height",pm=".collapse.show, .collapse.collapsing",io='[data-bs-toggle="collapse"]',fm={parent:null,toggle:!0},gm={parent:"(null|element)",toggle:"boolean"};class xn extends ut{constructor(e,t){super(e,t),this._isTransitioning=!1,this._triggerArray=[];const n=B.find(io);for(const i of n){const r=B.getSelectorFromElement(i),o=B.find(r).filter(c=>c===this._element);r!==null&&o.length&&this._triggerArray.push(i)}this._initializeChildren(),this._config.parent||this._addAriaAndCollapsedClass(this._triggerArray,this._isShown()),this._config.toggle&&this.toggle()}static get Default(){return fm}static get DefaultType(){return gm}static get NAME(){return em}toggle(){this._isShown()?this.hide():this.show()}show(){if(this._isTransitioning||this._isShown())return;let e=[];if(this._config.parent&&(e=this._getFirstLevelChildren(pm).filter(c=>c!==this._element).map(c=>xn.getOrCreateInstance(c,{toggle:!1}))),e.length&&e[0]._isTransitioning||T.trigger(this._element,nm).defaultPrevented)return;for(const c of e)c.hide();const n=this._getDimension();this._element.classList.remove(Ds),this._element.classList.add(Zn),this._element.style[n]=0,this._addAriaAndCollapsedClass(this._triggerArray,!0),this._isTransitioning=!0;const i=()=>{this._isTransitioning=!1,this._element.classList.remove(Zn),this._element.classList.add(Ds,Ar),this._element.style[n]="",T.trigger(this._element,im)},o=`scroll${n[0].toUpperCase()+n.slice(1)}`;this._queueCallback(i,this._element,!0),this._element.style[n]=`${this._element[o]}px`}hide(){if(this._isTransitioning||!this._isShown()||T.trigger(this._element,rm).defaultPrevented)return;const t=this._getDimension();this._element.style[t]=`${this._element.getBoundingClientRect()[t]}px`,jn(this._element),this._element.classList.add(Zn),this._element.classList.remove(Ds,Ar);for(const i of this._triggerArray){const r=B.getElementFromSelector(i);r&&!this._isShown(r)&&this._addAriaAndCollapsedClass([i],!1)}this._isTransitioning=!0;const n=()=>{this._isTransitioning=!1,this._element.classList.remove(Zn),this._element.classList.add(Ds),T.trigger(this._element,om)};this._element.style[t]="",this._queueCallback(n,this._element,!0)}_isShown(e=this._element){return e.classList.contains(Ar)}_configAfterMerge(e){return e.toggle=!!e.toggle,e.parent=qt(e.parent),e}_getDimension(){return this._element.classList.contains(um)?dm:hm}_initializeChildren(){if(!this._config.parent)return;const e=this._getFirstLevelChildren(io);for(const t of e){const n=B.getElementFromSelector(t);n&&this._addAriaAndCollapsedClass([t],this._isShown(n))}}_getFirstLevelChildren(e){const t=B.find(cm,this._config.parent);return B.find(e,this._config.parent).filter(n=>!t.includes(n))}_addAriaAndCollapsedClass(e,t){if(e.length)for(const n of e)n.classList.toggle(lm,!t),n.setAttribute("aria-expanded",t)}static jQueryInterface(e){const t={};return typeof e=="string"&&/show|hide/.test(e)&&(t.toggle=!1),this.each(function(){const n=xn.getOrCreateInstance(this,t);if(typeof e=="string"){if(typeof n[e]>"u")throw new TypeError(`No method named "${e}"`);n[e]()}})}}T.on(document,am,io,function(s){(s.target.tagName==="A"||s.delegateTarget&&s.delegateTarget.tagName==="A")&&s.preventDefault();for(const e of B.getMultipleElementsFromSelector(this))xn.getOrCreateInstance(e,{toggle:!1}).toggle()});it(xn);const ul="dropdown",_m="bs.dropdown",ms=`.${_m}`,Qo=".data-api",mm="Escape",dl="Tab",vm="ArrowUp",hl="ArrowDown",bm=2,ym=`hide${ms}`,Em=`hidden${ms}`,wm=`show${ms}`,Am=`shown${ms}`,Bu=`click${ms}${Qo}`,ju=`keydown${ms}${Qo}`,Sm=`keyup${ms}${Qo}`,Ls="show",Tm="dropup",Cm="dropend",km="dropstart",Om="dropup-center",Pm="dropdown-center",ls='[data-bs-toggle="dropdown"]:not(.disabled):not(:disabled)',$m=`${ls}.${Ls}`,vi=".dropdown-menu",xm=".navbar",Lm=".navbar-nav",Im=".dropdown-menu .dropdown-item:not(.disabled):not(:disabled)",Rm=st()?"top-end":"top-start",Dm=st()?"top-start":"top-end",Nm=st()?"bottom-end":"bottom-start",Mm=st()?"bottom-start":"bottom-end",Fm=st()?"left-start":"right-start",Bm=st()?"right-start":"left-start",jm="top",Hm="bottom",Vm={autoClose:!0,boundary:"clippingParents",display:"dynamic",offset:[0,2],popperConfig:null,reference:"toggle"},Wm={autoClose:"(boolean|string)",boundary:"(string|element)",display:"string",offset:"(array|string|function)",popperConfig:"(null|object|function)",reference:"(string|element|object)"};class gt extends ut{constructor(e,t){super(e,t),this._popper=null,this._parent=this._element.parentNode,this._menu=B.next(this._element,vi)[0]||B.prev(this._element,vi)[0]||B.findOne(vi,this._parent),this._inNavbar=this._detectNavbar()}static get Default(){return Vm}static get DefaultType(){return Wm}static get NAME(){return ul}toggle(){return this._isShown()?this.hide():this.show()}show(){if(zt(this._element)||this._isShown())return;const e={relatedTarget:this._element};if(!T.trigger(this._element,wm,e).defaultPrevented){if(this._createPopper(),"ontouchstart"in document.documentElement&&!this._parent.closest(Lm))for(const n of[].concat(...document.body.children))T.on(n,"mouseover",Si);this._element.focus(),this._element.setAttribute("aria-expanded",!0),this._menu.classList.add(Ls),this._element.classList.add(Ls),T.trigger(this._element,Am,e)}}hide(){if(zt(this._element)||!this._isShown())return;const e={relatedTarget:this._element};this._completeHide(e)}dispose(){this._popper&&this._popper.destroy(),super.dispose()}update(){this._inNavbar=this._detectNavbar(),this._popper&&this._popper.update()}_completeHide(e){if(!T.trigger(this._element,ym,e).defaultPrevented){if("ontouchstart"in document.documentElement)for(const n of[].concat(...document.body.children))T.off(n,"mouseover",Si);this._popper&&this._popper.destroy(),this._menu.classList.remove(Ls),this._element.classList.remove(Ls),this._element.setAttribute("aria-expanded","false"),wt.removeDataAttribute(this._menu,"popper"),T.trigger(this._element,Em,e)}}_getConfig(e){if(e=super._getConfig(e),typeof e.reference=="object"&&!Et(e.reference)&&typeof e.reference.getBoundingClientRect!="function")throw new TypeError(`${ul.toUpperCase()}: Option "reference" provided type "object" without a required "getBoundingClientRect" method.`);return e}_createPopper(){if(typeof wu>"u")throw new TypeError("Bootstrap's dropdowns require Popper (https://popper.js.org)");let e=this._element;this._config.reference==="parent"?e=this._parent:Et(this._config.reference)?e=qt(this._config.reference):typeof this._config.reference=="object"&&(e=this._config.reference);const t=this._getPopperConfig();this._popper=Yo(e,this._menu,t)}_isShown(){return this._menu.classList.contains(Ls)}_getPlacement(){const e=this._parent;if(e.classList.contains(Cm))return Fm;if(e.classList.contains(km))return Bm;if(e.classList.contains(Om))return jm;if(e.classList.contains(Pm))return Hm;const t=getComputedStyle(this._menu).getPropertyValue("--bs-position").trim()==="end";return e.classList.contains(Tm)?t?Dm:Rm:t?Mm:Nm}_detectNavbar(){return this._element.closest(xm)!==null}_getOffset(){const{offset:e}=this._config;return typeof e=="string"?e.split(",").map(t=>Number.parseInt(t,10)):typeof e=="function"?t=>e(t,this._element):e}_getPopperConfig(){const e={placement:this._getPlacement(),modifiers:[{name:"preventOverflow",options:{boundary:this._config.boundary}},{name:"offset",options:{offset:this._getOffset()}}]};return(this._inNavbar||this._config.display==="static")&&(wt.setDataAttribute(this._menu,"popper","static"),e.modifiers=[{name:"applyStyles",enabled:!1}]),{...e,...Ne(this._config.popperConfig,[e])}}_selectMenuItem({key:e,target:t}){const n=B.find(Im,this._menu).filter(i=>en(i));n.length&&Zo(n,t,e===hl,!n.includes(t)).focus()}static jQueryInterface(e){return this.each(function(){const t=gt.getOrCreateInstance(this,e);if(typeof e=="string"){if(typeof t[e]>"u")throw new TypeError(`No method named "${e}"`);t[e]()}})}static clearMenus(e){if(e.button===bm||e.type==="keyup"&&e.key!==dl)return;const t=B.find($m);for(const n of t){const i=gt.getInstance(n);if(!i||i._config.autoClose===!1)continue;const r=e.composedPath(),o=r.includes(i._menu);if(r.includes(i._element)||i._config.autoClose==="inside"&&!o||i._config.autoClose==="outside"&&o||i._menu.contains(e.target)&&(e.type==="keyup"&&e.key===dl||/input|select|option|textarea|form/i.test(e.target.tagName)))continue;const c={relatedTarget:i._element};e.type==="click"&&(c.clickEvent=e),i._completeHide(c)}}static dataApiKeydownHandler(e){const t=/input|textarea/i.test(e.target.tagName),n=e.key===mm,i=[vm,hl].includes(e.key);if(!i&&!n||t&&!n)return;e.preventDefault();const r=this.matches(ls)?this:B.prev(this,ls)[0]||B.next(this,ls)[0]||B.findOne(ls,e.delegateTarget.parentNode),o=gt.getOrCreateInstance(r);if(i){e.stopPropagation(),o.show(),o._selectMenuItem(e);return}o._isShown()&&(e.stopPropagation(),o.hide(),r.focus())}}T.on(document,ju,ls,gt.dataApiKeydownHandler);T.on(document,ju,vi,gt.dataApiKeydownHandler);T.on(document,Bu,gt.clearMenus);T.on(document,Sm,gt.clearMenus);T.on(document,Bu,ls,function(s){s.preventDefault(),gt.getOrCreateInstance(this).toggle()});it(gt);const Hu="backdrop",Um="fade",pl="show",fl=`mousedown.bs.${Hu}`,qm={className:"modal-backdrop",clickCallback:null,isAnimated:!1,isVisible:!0,rootElement:"body"},zm={className:"string",clickCallback:"(function|null)",isAnimated:"boolean",isVisible:"boolean",rootElement:"(element|string)"};class Vu extends Hn{constructor(e){super(),this._config=this._getConfig(e),this._isAppended=!1,this._element=null}static get Default(){return qm}static get DefaultType(){return zm}static get NAME(){return Hu}show(e){if(!this._config.isVisible){Ne(e);return}this._append();const t=this._getElement();this._config.isAnimated&&jn(t),t.classList.add(pl),this._emulateAnimation(()=>{Ne(e)})}hide(e){if(!this._config.isVisible){Ne(e);return}this._getElement().classList.remove(pl),this._emulateAnimation(()=>{this.dispose(),Ne(e)})}dispose(){this._isAppended&&(T.off(this._element,fl),this._element.remove(),this._isAppended=!1)}_getElement(){if(!this._element){const e=document.createElement("div");e.className=this._config.className,this._config.isAnimated&&e.classList.add(Um),this._element=e}return this._element}_configAfterMerge(e){return e.rootElement=qt(e.rootElement),e}_append(){if(this._isAppended)return;const e=this._getElement();this._config.rootElement.append(e),T.on(e,fl,()=>{Ne(this._config.clickCallback)}),this._isAppended=!0}_emulateAnimation(e){ku(e,this._getElement(),this._config.isAnimated)}}const Km="focustrap",Gm="bs.focustrap",Ci=`.${Gm}`,Ym=`focusin${Ci}`,Zm=`keydown.tab${Ci}`,Xm="Tab",Qm="forward",gl="backward",Jm={autofocus:!0,trapElement:null},ev={autofocus:"boolean",trapElement:"element"};class Wu extends Hn{constructor(e){super(),this._config=this._getConfig(e),this._isActive=!1,this._lastTabNavDirection=null}static get Default(){return Jm}static get DefaultType(){return ev}static get NAME(){return Km}activate(){this._isActive||(this._config.autofocus&&this._config.trapElement.focus(),T.off(document,Ci),T.on(document,Ym,e=>this._handleFocusin(e)),T.on(document,Zm,e=>this._handleKeydown(e)),this._isActive=!0)}deactivate(){this._isActive&&(this._isActive=!1,T.off(document,Ci))}_handleFocusin(e){const{trapElement:t}=this._config;if(e.target===document||e.target===t||t.contains(e.target))return;const n=B.focusableChildren(t);n.length===0?t.focus():this._lastTabNavDirection===gl?n[n.length-1].focus():n[0].focus()}_handleKeydown(e){e.key===Xm&&(this._lastTabNavDirection=e.shiftKey?gl:Qm)}}const _l=".fixed-top, .fixed-bottom, .is-fixed, .sticky-top",ml=".sticky-top",Xn="padding-right",vl="margin-right";class ro{constructor(){this._element=document.body}getWidth(){const e=document.documentElement.clientWidth;return Math.abs(window.innerWidth-e)}hide(){const e=this.getWidth();this._disableOverFlow(),this._setElementAttributes(this._element,Xn,t=>t+e),this._setElementAttributes(_l,Xn,t=>t+e),this._setElementAttributes(ml,vl,t=>t-e)}reset(){this._resetElementAttributes(this._element,"overflow"),this._resetElementAttributes(this._element,Xn),this._resetElementAttributes(_l,Xn),this._resetElementAttributes(ml,vl)}isOverflowing(){return this.getWidth()>0}_disableOverFlow(){this._saveInitialAttribute(this._element,"overflow"),this._element.style.overflow="hidden"}_setElementAttributes(e,t,n){const i=this.getWidth(),r=o=>{if(o!==this._element&&window.innerWidth>o.clientWidth+i)return;this._saveInitialAttribute(o,t);const c=window.getComputedStyle(o).getPropertyValue(t);o.style.setProperty(t,`${n(Number.parseFloat(c))}px`)};this._applyManipulationCallback(e,r)}_saveInitialAttribute(e,t){const n=e.style.getPropertyValue(t);n&&wt.setDataAttribute(e,t,n)}_resetElementAttributes(e,t){const n=i=>{const r=wt.getDataAttribute(i,t);if(r===null){i.style.removeProperty(t);return}wt.removeDataAttribute(i,t),i.style.setProperty(t,r)};this._applyManipulationCallback(e,n)}_applyManipulationCallback(e,t){if(Et(e)){t(e);return}for(const n of B.find(e,this._element))t(n)}}const tv="modal",sv="bs.modal",nt=`.${sv}`,nv=".data-api",iv="Escape",rv=`hide${nt}`,ov=`hidePrevented${nt}`,Uu=`hidden${nt}`,qu=`show${nt}`,av=`shown${nt}`,lv=`resize${nt}`,cv=`click.dismiss${nt}`,uv=`mousedown.dismiss${nt}`,dv=`keydown.dismiss${nt}`,hv=`click${nt}${nv}`,bl="modal-open",pv="fade",yl="show",Sr="modal-static",fv=".modal.show",gv=".modal-dialog",_v=".modal-body",mv='[data-bs-toggle="modal"]',vv={backdrop:!0,focus:!0,keyboard:!0},bv={backdrop:"(boolean|string)",focus:"boolean",keyboard:"boolean"};class Ks extends ut{constructor(e,t){super(e,t),this._dialog=B.findOne(gv,this._element),this._backdrop=this._initializeBackDrop(),this._focustrap=this._initializeFocusTrap(),this._isShown=!1,this._isTransitioning=!1,this._scrollBar=new ro,this._addEventListeners()}static get Default(){return vv}static get DefaultType(){return bv}static get NAME(){return tv}toggle(e){return this._isShown?this.hide():this.show(e)}show(e){this._isShown||this._isTransitioning||T.trigger(this._element,qu,{relatedTarget:e}).defaultPrevented||(this._isShown=!0,this._isTransitioning=!0,this._scrollBar.hide(),document.body.classList.add(bl),this._adjustDialog(),this._backdrop.show(()=>this._showElement(e)))}hide(){!this._isShown||this._isTransitioning||T.trigger(this._element,rv).defaultPrevented||(this._isShown=!1,this._isTransitioning=!0,this._focustrap.deactivate(),this._element.classList.remove(yl),this._queueCallback(()=>this._hideModal(),this._element,this._isAnimated()))}dispose(){T.off(window,nt),T.off(this._dialog,nt),this._backdrop.dispose(),this._focustrap.deactivate(),super.dispose()}handleUpdate(){this._adjustDialog()}_initializeBackDrop(){return new Vu({isVisible:!!this._config.backdrop,isAnimated:this._isAnimated()})}_initializeFocusTrap(){return new Wu({trapElement:this._element})}_showElement(e){document.body.contains(this._element)||document.body.append(this._element),this._element.style.display="block",this._element.removeAttribute("aria-hidden"),this._element.setAttribute("aria-modal",!0),this._element.setAttribute("role","dialog"),this._element.scrollTop=0;const t=B.findOne(_v,this._dialog);t&&(t.scrollTop=0),jn(this._element),this._element.classList.add(yl);const n=()=>{this._config.focus&&this._focustrap.activate(),this._isTransitioning=!1,T.trigger(this._element,av,{relatedTarget:e})};this._queueCallback(n,this._dialog,this._isAnimated())}_addEventListeners(){T.on(this._element,dv,e=>{if(e.key===iv){if(this._config.keyboard){this.hide();return}this._triggerBackdropTransition()}}),T.on(window,lv,()=>{this._isShown&&!this._isTransitioning&&this._adjustDialog()}),T.on(this._element,uv,e=>{T.one(this._element,cv,t=>{if(!(this._element!==e.target||this._element!==t.target)){if(this._config.backdrop==="static"){this._triggerBackdropTransition();return}this._config.backdrop&&this.hide()}})})}_hideModal(){this._element.style.display="none",this._element.setAttribute("aria-hidden",!0),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._isTransitioning=!1,this._backdrop.hide(()=>{document.body.classList.remove(bl),this._resetAdjustments(),this._scrollBar.reset(),T.trigger(this._element,Uu)})}_isAnimated(){return this._element.classList.contains(pv)}_triggerBackdropTransition(){if(T.trigger(this._element,ov).defaultPrevented)return;const t=this._element.scrollHeight>document.documentElement.clientHeight,n=this._element.style.overflowY;n==="hidden"||this._element.classList.contains(Sr)||(t||(this._element.style.overflowY="hidden"),this._element.classList.add(Sr),this._queueCallback(()=>{this._element.classList.remove(Sr),this._queueCallback(()=>{this._element.style.overflowY=n},this._dialog)},this._dialog),this._element.focus())}_adjustDialog(){const e=this._element.scrollHeight>document.documentElement.clientHeight,t=this._scrollBar.getWidth(),n=t>0;if(n&&!e){const i=st()?"paddingLeft":"paddingRight";this._element.style[i]=`${t}px`}if(!n&&e){const i=st()?"paddingRight":"paddingLeft";this._element.style[i]=`${t}px`}}_resetAdjustments(){this._element.style.paddingLeft="",this._element.style.paddingRight=""}static jQueryInterface(e,t){return this.each(function(){const n=Ks.getOrCreateInstance(this,e);if(typeof e=="string"){if(typeof n[e]>"u")throw new TypeError(`No method named "${e}"`);n[e](t)}})}}T.on(document,hv,mv,function(s){const e=B.getElementFromSelector(this);["A","AREA"].includes(this.tagName)&&s.preventDefault(),T.one(e,qu,i=>{i.defaultPrevented||T.one(e,Uu,()=>{en(this)&&this.focus()})});const t=B.findOne(fv);t&&Ks.getInstance(t).hide(),Ks.getOrCreateInstance(e).toggle(this)});Yi(Ks);it(Ks);const yv="offcanvas",Ev="bs.offcanvas",Tt=`.${Ev}`,zu=".data-api",wv=`load${Tt}${zu}`,Av="Escape",El="show",wl="showing",Al="hiding",Sv="offcanvas-backdrop",Ku=".offcanvas.show",Tv=`show${Tt}`,Cv=`shown${Tt}`,kv=`hide${Tt}`,Sl=`hidePrevented${Tt}`,Gu=`hidden${Tt}`,Ov=`resize${Tt}`,Pv=`click${Tt}${zu}`,$v=`keydown.dismiss${Tt}`,xv='[data-bs-toggle="offcanvas"]',Lv={backdrop:!0,keyboard:!0,scroll:!1},Iv={backdrop:"(boolean|string)",keyboard:"boolean",scroll:"boolean"};class Kt extends ut{constructor(e,t){super(e,t),this._isShown=!1,this._backdrop=this._initializeBackDrop(),this._focustrap=this._initializeFocusTrap(),this._addEventListeners()}static get Default(){return Lv}static get DefaultType(){return Iv}static get NAME(){return yv}toggle(e){return this._isShown?this.hide():this.show(e)}show(e){if(this._isShown||T.trigger(this._element,Tv,{relatedTarget:e}).defaultPrevented)return;this._isShown=!0,this._backdrop.show(),this._config.scroll||new ro().hide(),this._element.setAttribute("aria-modal",!0),this._element.setAttribute("role","dialog"),this._element.classList.add(wl);const n=()=>{(!this._config.scroll||this._config.backdrop)&&this._focustrap.activate(),this._element.classList.add(El),this._element.classList.remove(wl),T.trigger(this._element,Cv,{relatedTarget:e})};this._queueCallback(n,this._element,!0)}hide(){if(!this._isShown||T.trigger(this._element,kv).defaultPrevented)return;this._focustrap.deactivate(),this._element.blur(),this._isShown=!1,this._element.classList.add(Al),this._backdrop.hide();const t=()=>{this._element.classList.remove(El,Al),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._config.scroll||new ro().reset(),T.trigger(this._element,Gu)};this._queueCallback(t,this._element,!0)}dispose(){this._backdrop.dispose(),this._focustrap.deactivate(),super.dispose()}_initializeBackDrop(){const e=()=>{if(this._config.backdrop==="static"){T.trigger(this._element,Sl);return}this.hide()},t=!!this._config.backdrop;return new Vu({className:Sv,isVisible:t,isAnimated:!0,rootElement:this._element.parentNode,clickCallback:t?e:null})}_initializeFocusTrap(){return new Wu({trapElement:this._element})}_addEventListeners(){T.on(this._element,$v,e=>{if(e.key===Av){if(this._config.keyboard){this.hide();return}T.trigger(this._element,Sl)}})}static jQueryInterface(e){return this.each(function(){const t=Kt.getOrCreateInstance(this,e);if(typeof e=="string"){if(t[e]===void 0||e.startsWith("_")||e==="constructor")throw new TypeError(`No method named "${e}"`);t[e](this)}})}}T.on(document,Pv,xv,function(s){const e=B.getElementFromSelector(this);if(["A","AREA"].includes(this.tagName)&&s.preventDefault(),zt(this))return;T.one(e,Gu,()=>{en(this)&&this.focus()});const t=B.findOne(Ku);t&&t!==e&&Kt.getInstance(t).hide(),Kt.getOrCreateInstance(e).toggle(this)});T.on(window,wv,()=>{for(const s of B.find(Ku))Kt.getOrCreateInstance(s).show()});T.on(window,Ov,()=>{for(const s of B.find("[aria-modal][class*=show][class*=offcanvas-]"))getComputedStyle(s).position!=="fixed"&&Kt.getOrCreateInstance(s).hide()});Yi(Kt);it(Kt);const Rv=/^aria-[\w-]*$/i,Yu={"*":["class","dir","id","lang","role",Rv],a:["target","href","title","rel"],area:[],b:[],br:[],col:[],code:[],dd:[],div:[],dl:[],dt:[],em:[],hr:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],i:[],img:["src","srcset","alt","title","width","height"],li:[],ol:[],p:[],pre:[],s:[],small:[],span:[],sub:[],sup:[],strong:[],u:[],ul:[]},Dv=new Set(["background","cite","href","itemtype","longdesc","poster","src","xlink:href"]),Nv=/^(?!javascript:)(?:[a-z0-9+.-]+:|[^&:/?#]*(?:[/?#]|$))/i,Mv=(s,e)=>{const t=s.nodeName.toLowerCase();return e.includes(t)?Dv.has(t)?!!Nv.test(s.nodeValue):!0:e.filter(n=>n instanceof RegExp).some(n=>n.test(t))};function Fv(s,e,t){if(!s.length)return s;if(t&&typeof t=="function")return t(s);const i=new window.DOMParser().parseFromString(s,"text/html"),r=[].concat(...i.body.querySelectorAll("*"));for(const o of r){const c=o.nodeName.toLowerCase();if(!Object.keys(e).includes(c)){o.remove();continue}const u=[].concat(...o.attributes),h=[].concat(e["*"]||[],e[c]||[]);for(const p of u)Mv(p,h)||o.removeAttribute(p.nodeName)}return i.body.innerHTML}const Bv="TemplateFactory",jv={allowList:Yu,content:{},extraClass:"",html:!1,sanitize:!0,sanitizeFn:null,template:"<div></div>"},Hv={allowList:"object",content:"object",extraClass:"(string|function)",html:"boolean",sanitize:"boolean",sanitizeFn:"(null|function)",template:"string"},Vv={entry:"(string|element|function|null)",selector:"(string|element)"};class Wv extends Hn{constructor(e){super(),this._config=this._getConfig(e)}static get Default(){return jv}static get DefaultType(){return Hv}static get NAME(){return Bv}getContent(){return Object.values(this._config.content).map(e=>this._resolvePossibleFunction(e)).filter(Boolean)}hasContent(){return this.getContent().length>0}changeContent(e){return this._checkContent(e),this._config.content={...this._config.content,...e},this}toHtml(){const e=document.createElement("div");e.innerHTML=this._maybeSanitize(this._config.template);for(const[i,r]of Object.entries(this._config.content))this._setContent(e,r,i);const t=e.children[0],n=this._resolvePossibleFunction(this._config.extraClass);return n&&t.classList.add(...n.split(" ")),t}_typeCheckConfig(e){super._typeCheckConfig(e),this._checkContent(e.content)}_checkContent(e){for(const[t,n]of Object.entries(e))super._typeCheckConfig({selector:t,entry:n},Vv)}_setContent(e,t,n){const i=B.findOne(n,e);if(i){if(t=this._resolvePossibleFunction(t),!t){i.remove();return}if(Et(t)){this._putElementInTemplate(qt(t),i);return}if(this._config.html){i.innerHTML=this._maybeSanitize(t);return}i.textContent=t}}_maybeSanitize(e){return this._config.sanitize?Fv(e,this._config.allowList,this._config.sanitizeFn):e}_resolvePossibleFunction(e){return Ne(e,[this])}_putElementInTemplate(e,t){if(this._config.html){t.innerHTML="",t.append(e);return}t.textContent=e.textContent}}const Uv="tooltip",qv=new Set(["sanitize","allowList","sanitizeFn"]),Tr="fade",zv="modal",Qn="show",Kv=".tooltip-inner",Tl=`.${zv}`,Cl="hide.bs.modal",dn="hover",Cr="focus",Gv="click",Yv="manual",Zv="hide",Xv="hidden",Qv="show",Jv="shown",eb="inserted",tb="click",sb="focusin",nb="focusout",ib="mouseenter",rb="mouseleave",ob={AUTO:"auto",TOP:"top",RIGHT:st()?"left":"right",BOTTOM:"bottom",LEFT:st()?"right":"left"},ab={allowList:Yu,animation:!0,boundary:"clippingParents",container:!1,customClass:"",delay:0,fallbackPlacements:["top","right","bottom","left"],html:!1,offset:[0,6],placement:"top",popperConfig:null,sanitize:!0,sanitizeFn:null,selector:!1,template:'<div class="tooltip" role="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',title:"",trigger:"hover focus"},lb={allowList:"object",animation:"boolean",boundary:"(string|element)",container:"(string|element|boolean)",customClass:"(string|function)",delay:"(number|object)",fallbackPlacements:"array",html:"boolean",offset:"(array|string|function)",placement:"(string|function)",popperConfig:"(null|object|function)",sanitize:"boolean",sanitizeFn:"(null|function)",selector:"(string|boolean)",template:"string",title:"(string|element|function)",trigger:"string"};class sn extends ut{constructor(e,t){if(typeof wu>"u")throw new TypeError("Bootstrap's tooltips require Popper (https://popper.js.org)");super(e,t),this._isEnabled=!0,this._timeout=0,this._isHovered=null,this._activeTrigger={},this._popper=null,this._templateFactory=null,this._newContent=null,this.tip=null,this._setListeners(),this._config.selector||this._fixTitle()}static get Default(){return ab}static get DefaultType(){return lb}static get NAME(){return Uv}enable(){this._isEnabled=!0}disable(){this._isEnabled=!1}toggleEnabled(){this._isEnabled=!this._isEnabled}toggle(){if(this._isEnabled){if(this._activeTrigger.click=!this._activeTrigger.click,this._isShown()){this._leave();return}this._enter()}}dispose(){clearTimeout(this._timeout),T.off(this._element.closest(Tl),Cl,this._hideModalHandler),this._element.getAttribute("data-bs-original-title")&&this._element.setAttribute("title",this._element.getAttribute("data-bs-original-title")),this._disposePopper(),super.dispose()}show(){if(this._element.style.display==="none")throw new Error("Please use show on visible elements");if(!(this._isWithContent()&&this._isEnabled))return;const e=T.trigger(this._element,this.constructor.eventName(Qv)),n=(Tu(this._element)||this._element.ownerDocument.documentElement).contains(this._element);if(e.defaultPrevented||!n)return;this._disposePopper();const i=this._getTipElement();this._element.setAttribute("aria-describedby",i.getAttribute("id"));const{container:r}=this._config;if(this._element.ownerDocument.documentElement.contains(this.tip)||(r.append(i),T.trigger(this._element,this.constructor.eventName(eb))),this._popper=this._createPopper(i),i.classList.add(Qn),"ontouchstart"in document.documentElement)for(const c of[].concat(...document.body.children))T.on(c,"mouseover",Si);const o=()=>{T.trigger(this._element,this.constructor.eventName(Jv)),this._isHovered===!1&&this._leave(),this._isHovered=!1};this._queueCallback(o,this.tip,this._isAnimated())}hide(){if(!this._isShown()||T.trigger(this._element,this.constructor.eventName(Zv)).defaultPrevented)return;if(this._getTipElement().classList.remove(Qn),"ontouchstart"in document.documentElement)for(const i of[].concat(...document.body.children))T.off(i,"mouseover",Si);this._activeTrigger[Gv]=!1,this._activeTrigger[Cr]=!1,this._activeTrigger[dn]=!1,this._isHovered=null;const n=()=>{this._isWithActiveTrigger()||(this._isHovered||this._disposePopper(),this._element.removeAttribute("aria-describedby"),T.trigger(this._element,this.constructor.eventName(Xv)))};this._queueCallback(n,this.tip,this._isAnimated())}update(){this._popper&&this._popper.update()}_isWithContent(){return!!this._getTitle()}_getTipElement(){return this.tip||(this.tip=this._createTipElement(this._newContent||this._getContentForTemplate())),this.tip}_createTipElement(e){const t=this._getTemplateFactory(e).toHtml();if(!t)return null;t.classList.remove(Tr,Qn),t.classList.add(`bs-${this.constructor.NAME}-auto`);const n=Gg(this.constructor.NAME).toString();return t.setAttribute("id",n),this._isAnimated()&&t.classList.add(Tr),t}setContent(e){this._newContent=e,this._isShown()&&(this._disposePopper(),this.show())}_getTemplateFactory(e){return this._templateFactory?this._templateFactory.changeContent(e):this._templateFactory=new Wv({...this._config,content:e,extraClass:this._resolvePossibleFunction(this._config.customClass)}),this._templateFactory}_getContentForTemplate(){return{[Kv]:this._getTitle()}}_getTitle(){return this._resolvePossibleFunction(this._config.title)||this._element.getAttribute("data-bs-original-title")}_initializeOnDelegatedTarget(e){return this.constructor.getOrCreateInstance(e.delegateTarget,this._getDelegateConfig())}_isAnimated(){return this._config.animation||this.tip&&this.tip.classList.contains(Tr)}_isShown(){return this.tip&&this.tip.classList.contains(Qn)}_createPopper(e){const t=Ne(this._config.placement,[this,e,this._element]),n=ob[t.toUpperCase()];return Yo(this._element,e,this._getPopperConfig(n))}_getOffset(){const{offset:e}=this._config;return typeof e=="string"?e.split(",").map(t=>Number.parseInt(t,10)):typeof e=="function"?t=>e(t,this._element):e}_resolvePossibleFunction(e){return Ne(e,[this._element])}_getPopperConfig(e){const t={placement:e,modifiers:[{name:"flip",options:{fallbackPlacements:this._config.fallbackPlacements}},{name:"offset",options:{offset:this._getOffset()}},{name:"preventOverflow",options:{boundary:this._config.boundary}},{name:"arrow",options:{element:`.${this.constructor.NAME}-arrow`}},{name:"preSetPlacement",enabled:!0,phase:"beforeMain",fn:n=>{this._getTipElement().setAttribute("data-popper-placement",n.state.placement)}}]};return{...t,...Ne(this._config.popperConfig,[t])}}_setListeners(){const e=this._config.trigger.split(" ");for(const t of e)if(t==="click")T.on(this._element,this.constructor.eventName(tb),this._config.selector,n=>{this._initializeOnDelegatedTarget(n).toggle()});else if(t!==Yv){const n=t===dn?this.constructor.eventName(ib):this.constructor.eventName(sb),i=t===dn?this.constructor.eventName(rb):this.constructor.eventName(nb);T.on(this._element,n,this._config.selector,r=>{const o=this._initializeOnDelegatedTarget(r);o._activeTrigger[r.type==="focusin"?Cr:dn]=!0,o._enter()}),T.on(this._element,i,this._config.selector,r=>{const o=this._initializeOnDelegatedTarget(r);o._activeTrigger[r.type==="focusout"?Cr:dn]=o._element.contains(r.relatedTarget),o._leave()})}this._hideModalHandler=()=>{this._element&&this.hide()},T.on(this._element.closest(Tl),Cl,this._hideModalHandler)}_fixTitle(){const e=this._element.getAttribute("title");e&&(!this._element.getAttribute("aria-label")&&!this._element.textContent.trim()&&this._element.setAttribute("aria-label",e),this._element.setAttribute("data-bs-original-title",e),this._element.removeAttribute("title"))}_enter(){if(this._isShown()||this._isHovered){this._isHovered=!0;return}this._isHovered=!0,this._setTimeout(()=>{this._isHovered&&this.show()},this._config.delay.show)}_leave(){this._isWithActiveTrigger()||(this._isHovered=!1,this._setTimeout(()=>{this._isHovered||this.hide()},this._config.delay.hide))}_setTimeout(e,t){clearTimeout(this._timeout),this._timeout=setTimeout(e,t)}_isWithActiveTrigger(){return Object.values(this._activeTrigger).includes(!0)}_getConfig(e){const t=wt.getDataAttributes(this._element);for(const n of Object.keys(t))qv.has(n)&&delete t[n];return e={...t,...typeof e=="object"&&e?e:{}},e=this._mergeConfigObj(e),e=this._configAfterMerge(e),this._typeCheckConfig(e),e}_configAfterMerge(e){return e.container=e.container===!1?document.body:qt(e.container),typeof e.delay=="number"&&(e.delay={show:e.delay,hide:e.delay}),typeof e.title=="number"&&(e.title=e.title.toString()),typeof e.content=="number"&&(e.content=e.content.toString()),e}_getDelegateConfig(){const e={};for(const[t,n]of Object.entries(this._config))this.constructor.Default[t]!==n&&(e[t]=n);return e.selector=!1,e.trigger="manual",e}_disposePopper(){this._popper&&(this._popper.destroy(),this._popper=null),this.tip&&(this.tip.remove(),this.tip=null)}static jQueryInterface(e){return this.each(function(){const t=sn.getOrCreateInstance(this,e);if(typeof e=="string"){if(typeof t[e]>"u")throw new TypeError(`No method named "${e}"`);t[e]()}})}}it(sn);const cb="popover",ub=".popover-header",db=".popover-body",hb={...sn.Default,content:"",offset:[0,8],placement:"right",template:'<div class="popover" role="tooltip"><div class="popover-arrow"></div><h3 class="popover-header"></h3><div class="popover-body"></div></div>',trigger:"click"},pb={...sn.DefaultType,content:"(null|string|element|function)"};class Jo extends sn{static get Default(){return hb}static get DefaultType(){return pb}static get NAME(){return cb}_isWithContent(){return this._getTitle()||this._getContent()}_getContentForTemplate(){return{[ub]:this._getTitle(),[db]:this._getContent()}}_getContent(){return this._resolvePossibleFunction(this._config.content)}static jQueryInterface(e){return this.each(function(){const t=Jo.getOrCreateInstance(this,e);if(typeof e=="string"){if(typeof t[e]>"u")throw new TypeError(`No method named "${e}"`);t[e]()}})}}it(Jo);const fb="scrollspy",gb="bs.scrollspy",ea=`.${gb}`,_b=".data-api",mb=`activate${ea}`,kl=`click${ea}`,vb=`load${ea}${_b}`,bb="dropdown-item",Os="active",yb='[data-bs-spy="scroll"]',kr="[href]",Eb=".nav, .list-group",Ol=".nav-link",wb=".nav-item",Ab=".list-group-item",Sb=`${Ol}, ${wb} > ${Ol}, ${Ab}`,Tb=".dropdown",Cb=".dropdown-toggle",kb={offset:null,rootMargin:"0px 0px -25%",smoothScroll:!1,target:null,threshold:[.1,.5,1]},Ob={offset:"(number|null)",rootMargin:"string",smoothScroll:"boolean",target:"element",threshold:"array"};class Qi extends ut{constructor(e,t){super(e,t),this._targetLinks=new Map,this._observableSections=new Map,this._rootElement=getComputedStyle(this._element).overflowY==="visible"?null:this._element,this._activeTarget=null,this._observer=null,this._previousScrollData={visibleEntryTop:0,parentScrollTop:0},this.refresh()}static get Default(){return kb}static get DefaultType(){return Ob}static get NAME(){return fb}refresh(){this._initializeTargetsAndObservables(),this._maybeEnableSmoothScroll(),this._observer?this._observer.disconnect():this._observer=this._getNewObserver();for(const e of this._observableSections.values())this._observer.observe(e)}dispose(){this._observer.disconnect(),super.dispose()}_configAfterMerge(e){return e.target=qt(e.target)||document.body,e.rootMargin=e.offset?`${e.offset}px 0px -30%`:e.rootMargin,typeof e.threshold=="string"&&(e.threshold=e.threshold.split(",").map(t=>Number.parseFloat(t))),e}_maybeEnableSmoothScroll(){this._config.smoothScroll&&(T.off(this._config.target,kl),T.on(this._config.target,kl,kr,e=>{const t=this._observableSections.get(e.target.hash);if(t){e.preventDefault();const n=this._rootElement||window,i=t.offsetTop-this._element.offsetTop;if(n.scrollTo){n.scrollTo({top:i,behavior:"smooth"});return}n.scrollTop=i}}))}_getNewObserver(){const e={root:this._rootElement,threshold:this._config.threshold,rootMargin:this._config.rootMargin};return new IntersectionObserver(t=>this._observerCallback(t),e)}_observerCallback(e){const t=o=>this._targetLinks.get(`#${o.target.id}`),n=o=>{this._previousScrollData.visibleEntryTop=o.target.offsetTop,this._process(t(o))},i=(this._rootElement||document.documentElement).scrollTop,r=i>=this._previousScrollData.parentScrollTop;this._previousScrollData.parentScrollTop=i;for(const o of e){if(!o.isIntersecting){this._activeTarget=null,this._clearActiveClass(t(o));continue}const c=o.target.offsetTop>=this._previousScrollData.visibleEntryTop;if(r&&c){if(n(o),!i)return;continue}!r&&!c&&n(o)}}_initializeTargetsAndObservables(){this._targetLinks=new Map,this._observableSections=new Map;const e=B.find(kr,this._config.target);for(const t of e){if(!t.hash||zt(t))continue;const n=B.findOne(decodeURI(t.hash),this._element);en(n)&&(this._targetLinks.set(decodeURI(t.hash),t),this._observableSections.set(t.hash,n))}}_process(e){this._activeTarget!==e&&(this._clearActiveClass(this._config.target),this._activeTarget=e,e.classList.add(Os),this._activateParents(e),T.trigger(this._element,mb,{relatedTarget:e}))}_activateParents(e){if(e.classList.contains(bb)){B.findOne(Cb,e.closest(Tb)).classList.add(Os);return}for(const t of B.parents(e,Eb))for(const n of B.prev(t,Sb))n.classList.add(Os)}_clearActiveClass(e){e.classList.remove(Os);const t=B.find(`${kr}.${Os}`,e);for(const n of t)n.classList.remove(Os)}static jQueryInterface(e){return this.each(function(){const t=Qi.getOrCreateInstance(this,e);if(typeof e=="string"){if(t[e]===void 0||e.startsWith("_")||e==="constructor")throw new TypeError(`No method named "${e}"`);t[e]()}})}}T.on(window,vb,()=>{for(const s of B.find(yb))Qi.getOrCreateInstance(s)});it(Qi);const Pb="tab",$b="bs.tab",vs=`.${$b}`,xb=`hide${vs}`,Lb=`hidden${vs}`,Ib=`show${vs}`,Rb=`shown${vs}`,Db=`click${vs}`,Nb=`keydown${vs}`,Mb=`load${vs}`,Fb="ArrowLeft",Pl="ArrowRight",Bb="ArrowUp",$l="ArrowDown",Or="Home",xl="End",cs="active",Ll="fade",Pr="show",jb="dropdown",Zu=".dropdown-toggle",Hb=".dropdown-menu",$r=`:not(${Zu})`,Vb='.list-group, .nav, [role="tablist"]',Wb=".nav-item, .list-group-item",Ub=`.nav-link${$r}, .list-group-item${$r}, [role="tab"]${$r}`,Xu='[data-bs-toggle="tab"], [data-bs-toggle="pill"], [data-bs-toggle="list"]',xr=`${Ub}, ${Xu}`,qb=`.${cs}[data-bs-toggle="tab"], .${cs}[data-bs-toggle="pill"], .${cs}[data-bs-toggle="list"]`;class Gs extends ut{constructor(e){super(e),this._parent=this._element.closest(Vb),this._parent&&(this._setInitialAttributes(this._parent,this._getChildren()),T.on(this._element,Nb,t=>this._keydown(t)))}static get NAME(){return Pb}show(){const e=this._element;if(this._elemIsActive(e))return;const t=this._getActiveElem(),n=t?T.trigger(t,xb,{relatedTarget:e}):null;T.trigger(e,Ib,{relatedTarget:t}).defaultPrevented||n&&n.defaultPrevented||(this._deactivate(t,e),this._activate(e,t))}_activate(e,t){if(!e)return;e.classList.add(cs),this._activate(B.getElementFromSelector(e));const n=()=>{if(e.getAttribute("role")!=="tab"){e.classList.add(Pr);return}e.removeAttribute("tabindex"),e.setAttribute("aria-selected",!0),this._toggleDropDown(e,!0),T.trigger(e,Rb,{relatedTarget:t})};this._queueCallback(n,e,e.classList.contains(Ll))}_deactivate(e,t){if(!e)return;e.classList.remove(cs),e.blur(),this._deactivate(B.getElementFromSelector(e));const n=()=>{if(e.getAttribute("role")!=="tab"){e.classList.remove(Pr);return}e.setAttribute("aria-selected",!1),e.setAttribute("tabindex","-1"),this._toggleDropDown(e,!1),T.trigger(e,Lb,{relatedTarget:t})};this._queueCallback(n,e,e.classList.contains(Ll))}_keydown(e){if(![Fb,Pl,Bb,$l,Or,xl].includes(e.key))return;e.stopPropagation(),e.preventDefault();const t=this._getChildren().filter(i=>!zt(i));let n;if([Or,xl].includes(e.key))n=t[e.key===Or?0:t.length-1];else{const i=[Pl,$l].includes(e.key);n=Zo(t,e.target,i,!0)}n&&(n.focus({preventScroll:!0}),Gs.getOrCreateInstance(n).show())}_getChildren(){return B.find(xr,this._parent)}_getActiveElem(){return this._getChildren().find(e=>this._elemIsActive(e))||null}_setInitialAttributes(e,t){this._setAttributeIfNotExists(e,"role","tablist");for(const n of t)this._setInitialAttributesOnChild(n)}_setInitialAttributesOnChild(e){e=this._getInnerElement(e);const t=this._elemIsActive(e),n=this._getOuterElement(e);e.setAttribute("aria-selected",t),n!==e&&this._setAttributeIfNotExists(n,"role","presentation"),t||e.setAttribute("tabindex","-1"),this._setAttributeIfNotExists(e,"role","tab"),this._setInitialAttributesOnTargetPanel(e)}_setInitialAttributesOnTargetPanel(e){const t=B.getElementFromSelector(e);t&&(this._setAttributeIfNotExists(t,"role","tabpanel"),e.id&&this._setAttributeIfNotExists(t,"aria-labelledby",`${e.id}`))}_toggleDropDown(e,t){const n=this._getOuterElement(e);if(!n.classList.contains(jb))return;const i=(r,o)=>{const c=B.findOne(r,n);c&&c.classList.toggle(o,t)};i(Zu,cs),i(Hb,Pr),n.setAttribute("aria-expanded",t)}_setAttributeIfNotExists(e,t,n){e.hasAttribute(t)||e.setAttribute(t,n)}_elemIsActive(e){return e.classList.contains(cs)}_getInnerElement(e){return e.matches(xr)?e:B.findOne(xr,e)}_getOuterElement(e){return e.closest(Wb)||e}static jQueryInterface(e){return this.each(function(){const t=Gs.getOrCreateInstance(this);if(typeof e=="string"){if(t[e]===void 0||e.startsWith("_")||e==="constructor")throw new TypeError(`No method named "${e}"`);t[e]()}})}}T.on(document,Db,Xu,function(s){["A","AREA"].includes(this.tagName)&&s.preventDefault(),!zt(this)&&Gs.getOrCreateInstance(this).show()});T.on(window,Mb,()=>{for(const s of B.find(qb))Gs.getOrCreateInstance(s)});it(Gs);const zb="toast",Kb="bs.toast",Zt=`.${Kb}`,Gb=`mouseover${Zt}`,Yb=`mouseout${Zt}`,Zb=`focusin${Zt}`,Xb=`focusout${Zt}`,Qb=`hide${Zt}`,Jb=`hidden${Zt}`,ey=`show${Zt}`,ty=`shown${Zt}`,sy="fade",Il="hide",Jn="show",ei="showing",ny={animation:"boolean",autohide:"boolean",delay:"number"},iy={animation:!0,autohide:!0,delay:5e3};class Ji extends ut{constructor(e,t){super(e,t),this._timeout=null,this._hasMouseInteraction=!1,this._hasKeyboardInteraction=!1,this._setListeners()}static get Default(){return iy}static get DefaultType(){return ny}static get NAME(){return zb}show(){if(T.trigger(this._element,ey).defaultPrevented)return;this._clearTimeout(),this._config.animation&&this._element.classList.add(sy);const t=()=>{this._element.classList.remove(ei),T.trigger(this._element,ty),this._maybeScheduleHide()};this._element.classList.remove(Il),jn(this._element),this._element.classList.add(Jn,ei),this._queueCallback(t,this._element,this._config.animation)}hide(){if(!this.isShown()||T.trigger(this._element,Qb).defaultPrevented)return;const t=()=>{this._element.classList.add(Il),this._element.classList.remove(ei,Jn),T.trigger(this._element,Jb)};this._element.classList.add(ei),this._queueCallback(t,this._element,this._config.animation)}dispose(){this._clearTimeout(),this.isShown()&&this._element.classList.remove(Jn),super.dispose()}isShown(){return this._element.classList.contains(Jn)}_maybeScheduleHide(){this._config.autohide&&(this._hasMouseInteraction||this._hasKeyboardInteraction||(this._timeout=setTimeout(()=>{this.hide()},this._config.delay)))}_onInteraction(e,t){switch(e.type){case"mouseover":case"mouseout":{this._hasMouseInteraction=t;break}case"focusin":case"focusout":{this._hasKeyboardInteraction=t;break}}if(t){this._clearTimeout();return}const n=e.relatedTarget;this._element===n||this._element.contains(n)||this._maybeScheduleHide()}_setListeners(){T.on(this._element,Gb,e=>this._onInteraction(e,!0)),T.on(this._element,Yb,e=>this._onInteraction(e,!1)),T.on(this._element,Zb,e=>this._onInteraction(e,!0)),T.on(this._element,Xb,e=>this._onInteraction(e,!1))}_clearTimeout(){clearTimeout(this._timeout),this._timeout=null}static jQueryInterface(e){return this.each(function(){const t=Ji.getOrCreateInstance(this,e);if(typeof e=="string"){if(typeof t[e]>"u")throw new TypeError(`No method named "${e}"`);t[e](this)}})}}Yi(Ji);it(Ji);function ry(s){return{all:s=s||new Map,on:function(e,t){var n=s.get(e);n?n.push(t):s.set(e,[t])},off:function(e,t){var n=s.get(e);n&&(t?n.splice(n.indexOf(t)>>>0,1):s.set(e,[]))},emit:function(e,t){var n=s.get(e);n&&n.slice().map(function(i){i(t)}),(n=s.get("*"))&&n.slice().map(function(i){i(e,t)})}}}function oy(s,e){switch(s.replace("_","-")){case"af":case"af-ZA":case"bn":case"bn-BD":case"bn-IN":case"bg":case"bg-BG":case"ca":case"ca-AD":case"ca-ES":case"ca-FR":case"ca-IT":case"da":case"da-DK":case"de":case"de-AT":case"de-BE":case"de-CH":case"de-DE":case"de-LI":case"de-LU":case"el":case"el-CY":case"el-GR":case"en":case"en-AG":case"en-AU":case"en-BW":case"en-CA":case"en-DK":case"en-GB":case"en-HK":case"en-IE":case"en-IN":case"en-NG":case"en-NZ":case"en-PH":case"en-SG":case"en-US":case"en-ZA":case"en-ZM":case"en-ZW":case"eo":case"eo-US":case"es":case"es-AR":case"es-BO":case"es-CL":case"es-CO":case"es-CR":case"es-CU":case"es-DO":case"es-EC":case"es-ES":case"es-GT":case"es-HN":case"es-MX":case"es-NI":case"es-PA":case"es-PE":case"es-PR":case"es-PY":case"es-SV":case"es-US":case"es-UY":case"es-VE":case"et":case"et-EE":case"eu":case"eu-ES":case"eu-FR":case"fa":case"fa-IR":case"fi":case"fi-FI":case"fo":case"fo-FO":case"fur":case"fur-IT":case"fy":case"fy-DE":case"fy-NL":case"gl":case"gl-ES":case"gu":case"gu-IN":case"ha":case"ha-NG":case"he":case"he-IL":case"hu":case"hu-HU":case"is":case"is-IS":case"it":case"it-CH":case"it-IT":case"ku":case"ku-TR":case"lb":case"lb-LU":case"ml":case"ml-IN":case"mn":case"mn-MN":case"mr":case"mr-IN":case"nah":case"nb":case"nb-NO":case"ne":case"ne-NP":case"nl":case"nl-AW":case"nl-BE":case"nl-NL":case"nn":case"nn-NO":case"no":case"om":case"om-ET":case"om-KE":case"or":case"or-IN":case"pa":case"pa-IN":case"pa-PK":case"pap":case"pap-AN":case"pap-AW":case"pap-CW":case"ps":case"ps-AF":case"pt":case"pt-BR":case"pt-PT":case"so":case"so-DJ":case"so-ET":case"so-KE":case"so-SO":case"sq":case"sq-AL":case"sq-MK":case"sv":case"sv-FI":case"sv-SE":case"sw":case"sw-KE":case"sw-TZ":case"ta":case"ta-IN":case"ta-LK":case"te":case"te-IN":case"tk":case"tk-TM":case"ur":case"ur-IN":case"ur-PK":case"zu":case"zu-ZA":return e===1?0:1;case"am":case"am-ET":case"bh":case"fil":case"fil-PH":case"fr":case"fr-BE":case"fr-CA":case"fr-CH":case"fr-FR":case"fr-LU":case"gun":case"hi":case"hi-IN":case"hy":case"hy-AM":case"ln":case"ln-CD":case"mg":case"mg-MG":case"nso":case"nso-ZA":case"ti":case"ti-ER":case"ti-ET":case"wa":case"wa-BE":case"xbr":return e===0||e===1?0:1;case"be":case"be-BY":case"bs":case"bs-BA":case"hr":case"hr-HR":case"ru":case"ru-RU":case"ru-UA":case"sr":case"sr-ME":case"sr-RS":case"uk":case"uk-UA":return e%10==1&&e%100!=11?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2;case"cs":case"cs-CZ":case"sk":case"sk-SK":return e==1?0:e>=2&&e<=4?1:2;case"ga":case"ga-IE":return e==1?0:e==2?1:2;case"lt":case"lt-LT":return e%10==1&&e%100!=11?0:e%10>=2&&(e%100<10||e%100>=20)?1:2;case"sl":case"sl-SI":return e%100==1?0:e%100==2?1:e%100==3||e%100==4?2:3;case"mk":case"mk-MK":return e%10==1?0:1;case"mt":case"mt-MT":return e==1?0:e==0||e%100>1&&e%100<11?1:e%100>10&&e%100<20?2:3;case"lv":case"lv-LV":return e==0?0:e%10==1&&e%100!=11?1:2;case"pl":case"pl-PL":return e==1?0:e%10>=2&&e%10<=4&&(e%100<12||e%100>14)?1:2;case"cy":case"cy-GB":return e==1?0:e==2?1:e==8||e==11?2:3;case"ro":case"ro-RO":return e==1?0:e==0||e%100>0&&e%100<20?1:2;case"ar":case"ar-AE":case"ar-BH":case"ar-DZ":case"ar-EG":case"ar-IN":case"ar-IQ":case"ar-JO":case"ar-KW":case"ar-LB":case"ar-LY":case"ar-MA":case"ar-OM":case"ar-QA":case"ar-SA":case"ar-SD":case"ar-SS":case"ar-SY":case"ar-TN":case"ar-YE":return e==0?0:e==1?1:e==2?2:e%100>=3&&e%100<=10?3:e%100>=11&&e%100<=99?4:5;default:return 0}}function ay(s,e,t){let n=s.split("|");const i=ly(n,e);if(i!==null)return i.trim();n=uy(n);const r=oy(t,e);return n.length===1||!n[r]?n[0]:n[r]}function ly(s,e){for(const t of s){let n=cy(t,e);if(n!==null)return n}return null}function cy(s,e){const t=s.match(/^[\{\[]([^\[\]\{\}]*)[\}\]](.*)/s)||[];if(t.length!==3)return null;const n=t[1],i=t[2];if(n.includes(",")){let[r,o]=n.split(",");if(o==="*"&&e>=parseFloat(r))return i;if(r==="*"&&e<=parseFloat(o))return i;if(e>=parseFloat(r)&&e<=parseFloat(o))return i}return parseFloat(n)===e?i:null}function uy(s){return s.map(e=>e.replace(/^[\{\[]([^\[\]\{\}]*)[\}\]]/,""))}const Lr=(s,e,t={})=>{try{return s(e)}catch{return t}},Ir=async(s,e={})=>{try{return(await s).default||e}catch{return e}},dy={BASE_URL:"/build/",DEV:!1,MODE:"production",PROD:!0,SSR:!1,VITE_LARAVEL_VUE_I18N_HAS_PHP:"true",VITE_PUSHER_APP_CLUSTER:"eu",VITE_PUSHER_APP_KEY:"df32f920a6755daf37e9",VITE_PUSHER_HOST:"",VITE_PUSHER_PORT:"443",VITE_PUSHER_SCHEME:"https"};function Rl(s){return s||hy()||py()}function hy(){return typeof process<"u"}function py(){return typeof dy<"u"}const Is=typeof window>"u";let Ps=null;const Dl={lang:!Is&&document.documentElement.lang?document.documentElement.lang.replace("-","_"):null,fallbackLang:"en",fallbackMissingTranslations:!1,resolve:s=>new Promise(e=>e({default:{}})),onLoad:s=>{}},fy={shared:!0},gy={install(s,e={}){e={...fy,...e};const t=e.shared?Xe.getSharedInstance(e,!0):new Xe(e);s.config.globalProperties.$t=(n,i)=>t.trans(n,i),s.config.globalProperties.$tChoice=(n,i,r)=>t.transChoice(n,i,r),s.provide("i18n",t)}};class Xe{constructor(e={}){this.activeMessages=gi({}),this.fallbackMessages=gi({}),this.reset=()=>{Xe.loaded=[],this.options=Dl;for(const[t]of Object.entries(this.activeMessages))this.activeMessages[t]=null;this===Ps&&(Ps=null)},this.options={...Dl,...e},this.options.fallbackMissingTranslations?this.loadFallbackLanguage():this.load()}setOptions(e={},t=!1){return this.options={...this.options,...e},t&&this.load(),this}load(){this[Is?"loadLanguage":"loadLanguageAsync"](this.getActiveLanguage())}loadFallbackLanguage(){if(!Is){this.resolveLangAsync(this.options.resolve,this.options.fallbackLang).then(({default:t})=>{this.applyFallbackLanguage(this.options.fallbackLang,t),this.load()});return}const{default:e}=this.resolveLang(this.options.resolve,this.options.fallbackLang);this.applyFallbackLanguage(this.options.fallbackLang,e),this.loadLanguage(this.getActiveLanguage())}loadLanguage(e,t=!1){const n=Xe.loaded.find(r=>r.lang===e);if(n){this.setLanguage(n);return}const{default:i}=this.resolveLang(this.options.resolve,e);this.applyLanguage(e,i,t,this.loadLanguage)}loadLanguageAsync(e,t=!1,n=!1){var r;n||((r=this.abortController)==null||r.abort(),this.abortController=new AbortController);const i=Xe.loaded.find(o=>o.lang===e);return i?Promise.resolve(this.setLanguage(i)):new Promise((o,c)=>{this.abortController.signal.addEventListener("abort",()=>{o()}),this.resolveLangAsync(this.options.resolve,e).then(({default:u})=>{o(this.applyLanguage(e,u,t,this.loadLanguageAsync))})})}resolveLang(e,t,n={}){return Object.keys(n).length||(n=Lr(e,t)),Rl(Is)?{default:{...n,...Lr(e,`php_${t}`)}}:{default:n}}async resolveLangAsync(e,t){let n=Lr(e,t);if(!(n instanceof Promise))return this.resolveLang(e,t,n);if(Rl(Is)){const i=await Ir(e(`php_${t}`)),r=await Ir(n);return new Promise(o=>o({default:{...i,...r}}))}return new Promise(async i=>i({default:await Ir(n)}))}applyLanguage(e,t,n=!1,i){if(Object.keys(t).length<1){if(/[-_]/g.test(e)&&!n)return i.call(this,e.replace(/[-_]/g,o=>o==="-"?"_":"-"),!0,!0);if(e!==this.options.fallbackLang)return i.call(this,this.options.fallbackLang,!1,!0)}const r={lang:e,messages:t};return this.addLoadedLang(r),this.setLanguage(r)}applyFallbackLanguage(e,t){for(const[n,i]of Object.entries(t))this.fallbackMessages[n]=i;this.addLoadedLang({lang:this.options.fallbackLang,messages:t})}addLoadedLang(e){const t=Xe.loaded.findIndex(n=>n.lang===e.lang);if(t!==-1){Xe.loaded[t]=e;return}Xe.loaded.push(e)}setLanguage({lang:e,messages:t}){Is||document.documentElement.setAttribute("lang",e.replace("_","-")),this.options.lang=e;for(const[n,i]of Object.entries(t))this.activeMessages[n]=i;for(const[n,i]of Object.entries(this.fallbackMessages))(!this.isValid(t[n])||this.activeMessages[n]===n)&&(this.activeMessages[n]=i);for(const[n]of Object.entries(this.activeMessages))!this.isValid(t[n])&&!this.isValid(this.fallbackMessages[n])&&(this.activeMessages[n]=null);return this.options.onLoad(e),e}getActiveLanguage(){return this.options.lang||this.options.fallbackLang}isLoaded(e){return e??(e=this.getActiveLanguage()),Xe.loaded.some(t=>t.lang.replace(/[-_]/g,"-")===e.replace(/[-_]/g,"-"))}trans(e,t={}){return this.wTrans(e,t).value}wTrans(e,t={}){return Uf(()=>{let n=this.findTranslation(e);this.isValid(n)||(n=this.findTranslation(e.replace(/\//g,"."))),this.activeMessages[e]=this.isValid(n)?n:e}),Yr(()=>this.makeReplacements(this.activeMessages[e],t))}transChoice(e,t,n={}){return this.wTransChoice(e,t,n).value}wTransChoice(e,t,n={}){const i=this.wTrans(e,n);return n.count=t.toString(),Yr(()=>this.makeReplacements(ay(i.value,t,this.options.lang),n))}findTranslation(e){if(this.isValid(this.activeMessages[e]))return this.activeMessages[e];if(this.activeMessages[`${e}.0`]!==void 0){const n=Object.entries(this.activeMessages).filter(i=>i[0].startsWith(`${e}.`)).map(i=>i[1]);return gi(n)}return this.activeMessages[e]}makeReplacements(e,t){const n=i=>i.charAt(0).toUpperCase()+i.slice(1);return Object.entries(t||[]).sort((i,r)=>i[0].length>=r[0].length?-1:1).forEach(([i,r])=>{r=r.toString(),e=(e||"").replace(new RegExp(`:${i}`,"g"),r).replace(new RegExp(`:${i.toUpperCase()}`,"g"),r.toUpperCase()).replace(new RegExp(`:${n(i)}`,"g"),n(r))}),e}isValid(e){return e!=null}static getSharedInstance(e,t=!1){return(Ps==null?void 0:Ps.setOptions(e,t))||(Ps=new Xe(e))}}Xe.loaded=[];var It=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function _y(s){return s&&s.__esModule&&Object.prototype.hasOwnProperty.call(s,"default")?s.default:s}var Qu={exports:{}};/*!
* sweetalert2 v11.4.4
* Released under the MIT License.
*/(function(s,e){(function(t,n){s.exports=n()})(It,function(){const t="SweetAlert2:",n=a=>{const l=[];for(let d=0;d<a.length;d++)l.indexOf(a[d])===-1&&l.push(a[d]);return l},i=a=>a.charAt(0).toUpperCase()+a.slice(1),r=a=>Array.prototype.slice.call(a),o=a=>{console.warn("".concat(t," ").concat(typeof a=="object"?a.join(" "):a))},c=a=>{console.error("".concat(t," ").concat(a))},u=[],h=a=>{u.includes(a)||(u.push(a),o(a))},p=(a,l)=>{h('"'.concat(a,'" is deprecated and will be removed in the next major release. Please use "').concat(l,'" instead.'))},f=a=>typeof a=="function"?a():a,g=a=>a&&typeof a.toPromise=="function",m=a=>g(a)?a.toPromise():Promise.resolve(a),E=a=>a&&Promise.resolve(a)===a,v={title:"",titleText:"",text:"",html:"",footer:"",icon:void 0,iconColor:void 0,iconHtml:void 0,template:void 0,toast:!1,showClass:{popup:"swal2-show",backdrop:"swal2-backdrop-show",icon:"swal2-icon-show"},hideClass:{popup:"swal2-hide",backdrop:"swal2-backdrop-hide",icon:"swal2-icon-hide"},customClass:{},target:"body",color:void 0,backdrop:!0,heightAuto:!0,allowOutsideClick:!0,allowEscapeKey:!0,allowEnterKey:!0,stopKeydownPropagation:!0,keydownListenerCapture:!1,showConfirmButton:!0,showDenyButton:!1,showCancelButton:!1,preConfirm:void 0,preDeny:void 0,confirmButtonText:"OK",confirmButtonAriaLabel:"",confirmButtonColor:void 0,denyButtonText:"No",denyButtonAriaLabel:"",denyButtonColor:void 0,cancelButtonText:"Cancel",cancelButtonAriaLabel:"",cancelButtonColor:void 0,buttonsStyling:!0,reverseButtons:!1,focusConfirm:!0,focusDeny:!1,focusCancel:!1,returnFocus:!0,showCloseButton:!1,closeButtonHtml:"&times;",closeButtonAriaLabel:"Close this dialog",loaderHtml:"",showLoaderOnConfirm:!1,showLoaderOnDeny:!1,imageUrl:void 0,imageWidth:void 0,imageHeight:void 0,imageAlt:"",timer:void 0,timerProgressBar:!1,width:void 0,padding:void 0,background:void 0,input:void 0,inputPlaceholder:"",inputLabel:"",inputValue:"",inputOptions:{},inputAutoTrim:!0,inputAttributes:{},inputValidator:void 0,returnInputValueOnDeny:!1,validationMessage:void 0,grow:!1,position:"center",progressSteps:[],currentProgressStep:void 0,progressStepsDistance:void 0,willOpen:void 0,didOpen:void 0,didRender:void 0,willClose:void 0,didClose:void 0,didDestroy:void 0,scrollbarPadding:!0},w=["allowEscapeKey","allowOutsideClick","background","buttonsStyling","cancelButtonAriaLabel","cancelButtonColor","cancelButtonText","closeButtonAriaLabel","closeButtonHtml","color","confirmButtonAriaLabel","confirmButtonColor","confirmButtonText","currentProgressStep","customClass","denyButtonAriaLabel","denyButtonColor","denyButtonText","didClose","didDestroy","footer","hideClass","html","icon","iconColor","iconHtml","imageAlt","imageHeight","imageUrl","imageWidth","preConfirm","preDeny","progressSteps","returnFocus","reverseButtons","showCancelButton","showCloseButton","showConfirmButton","showDenyButton","text","title","titleText","willClose"],S={},C=["allowOutsideClick","allowEnterKey","backdrop","focusConfirm","focusDeny","focusCancel","returnFocus","heightAuto","keydownListenerCapture"],x=a=>Object.prototype.hasOwnProperty.call(v,a),$=a=>w.indexOf(a)!==-1,P=a=>S[a],j=a=>{x(a)||o('Unknown parameter "'.concat(a,'"'))},N=a=>{C.includes(a)&&o('The parameter "'.concat(a,'" is incompatible with toasts'))},O=a=>{P(a)&&p(a,P(a))},I=a=>{!a.backdrop&&a.allowOutsideClick&&o('"allowOutsideClick" parameter requires `backdrop` parameter to be set to `true`');for(const l in a)j(l),a.toast&&N(l),O(l)},H="swal2-",Z=a=>{const l={};for(const d in a)l[a[d]]=H+a[d];return l},b=Z(["container","shown","height-auto","iosfix","popup","modal","no-backdrop","no-transition","toast","toast-shown","show","hide","close","title","html-container","actions","confirm","deny","cancel","default-outline","footer","icon","icon-content","image","input","file","range","select","radio","checkbox","label","textarea","inputerror","input-label","validation-message","progress-steps","active-progress-step","progress-step","progress-step-line","loader","loading","styled","top","top-start","top-end","top-left","top-right","center","center-start","center-end","center-left","center-right","bottom","bottom-start","bottom-end","bottom-left","bottom-right","grow-row","grow-column","grow-fullscreen","rtl","timer-progress-bar","timer-progress-bar-container","scrollbar-measure","icon-success","icon-warning","icon-info","icon-question","icon-error"]),G=Z(["success","warning","info","question","error"]),q=()=>document.body.querySelector(".".concat(b.container)),te=a=>{const l=q();return l?l.querySelector(a):null},W=a=>te(".".concat(a)),R=()=>W(b.popup),ge=()=>W(b.icon),ce=()=>W(b.title),_e=()=>W(b["html-container"]),Be=()=>W(b.image),ne=()=>W(b["progress-steps"]),re=()=>W(b["validation-message"]),X=()=>te(".".concat(b.actions," .").concat(b.confirm)),ie=()=>te(".".concat(b.actions," .").concat(b.deny)),Se=()=>W(b["input-label"]),je=()=>te(".".concat(b.loader)),ye=()=>te(".".concat(b.actions," .").concat(b.cancel)),rt=()=>W(b.actions),He=()=>W(b.footer),dt=()=>W(b["timer-progress-bar"]),Ct=()=>W(b.close),kt=`
  a[href],
  area[href],
  input:not([disabled]),
  select:not([disabled]),
  textarea:not([disabled]),
  button:not([disabled]),
  iframe,
  object,
  embed,
  [tabindex="0"],
  [contenteditable],
  audio[controls],
  video[controls],
  summary
`,Ot=()=>{const a=r(R().querySelectorAll('[tabindex]:not([tabindex="-1"]):not([tabindex="0"])')).sort((d,_)=>{const k=parseInt(d.getAttribute("tabindex")),F=parseInt(_.getAttribute("tabindex"));return k>F?1:k<F?-1:0}),l=r(R().querySelectorAll(kt)).filter(d=>d.getAttribute("tabindex")!=="-1");return n(a.concat(l)).filter(d=>We(d))},Pt=()=>Ee(document.body,b.shown)&&!Ee(document.body,b["toast-shown"])&&!Ee(document.body,b["no-backdrop"]),ht=()=>R()&&Ee(R(),b.toast),$t=()=>R().hasAttribute("data-loading"),xt={previousBodyPadding:null},me=(a,l)=>{if(a.textContent="",l){const d=new DOMParser().parseFromString(l,"text/html");r(d.querySelector("head").childNodes).forEach(_=>{a.appendChild(_)}),r(d.querySelector("body").childNodes).forEach(_=>{a.appendChild(_)})}},Ee=(a,l)=>{if(!l)return!1;const d=l.split(/\s+/);for(let _=0;_<d.length;_++)if(!a.classList.contains(d[_]))return!1;return!0},bs=(a,l)=>{r(a.classList).forEach(d=>{!Object.values(b).includes(d)&&!Object.values(G).includes(d)&&!Object.values(l.showClass).includes(d)&&a.classList.remove(d)})},ke=(a,l,d)=>{if(bs(a,l),l.customClass&&l.customClass[d]){if(typeof l.customClass[d]!="string"&&!l.customClass[d].forEach)return o("Invalid type of customClass.".concat(d,'! Expected string or iterable object, got "').concat(typeof l.customClass[d],'"'));z(a,l.customClass[d])}},ys=(a,l)=>{if(!l)return null;switch(l){case"select":case"textarea":case"file":return a.querySelector(".".concat(b.popup," > .").concat(b[l]));case"checkbox":return a.querySelector(".".concat(b.popup," > .").concat(b.checkbox," input"));case"radio":return a.querySelector(".".concat(b.popup," > .").concat(b.radio," input:checked"))||a.querySelector(".".concat(b.popup," > .").concat(b.radio," input:first-child"));case"range":return a.querySelector(".".concat(b.popup," > .").concat(b.range," input"));default:return a.querySelector(".".concat(b.popup," > .").concat(b.input))}},Es=a=>{if(a.focus(),a.type!=="file"){const l=a.value;a.value="",a.value=l}},nn=(a,l,d)=>{!a||!l||(typeof l=="string"&&(l=l.split(/\s+/).filter(Boolean)),l.forEach(_=>{Array.isArray(a)?a.forEach(k=>{d?k.classList.add(_):k.classList.remove(_)}):d?a.classList.add(_):a.classList.remove(_)}))},z=(a,l)=>{nn(a,l,!0)},Ve=(a,l)=>{nn(a,l,!1)},ot=(a,l)=>{const d=r(a.childNodes);for(let _=0;_<d.length;_++)if(Ee(d[_],l))return d[_]},rn=(a,l,d)=>{d==="".concat(parseInt(d))&&(d=parseInt(d)),d||parseInt(d)===0?a.style[l]=typeof d=="number"?"".concat(d,"px"):d:a.style.removeProperty(l)},we=function(a){let l=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"flex";a.style.display=l},Te=a=>{a.style.display="none"},va=(a,l,d,_)=>{const k=a.querySelector(l);k&&(k.style[d]=_)},Un=(a,l,d)=>{l?we(a,d):Te(a)},We=a=>!!(a&&(a.offsetWidth||a.offsetHeight||a.getClientRects().length)),rh=()=>!We(X())&&!We(ie())&&!We(ye()),ba=a=>a.scrollHeight>a.clientHeight,ya=a=>{const l=window.getComputedStyle(a),d=parseFloat(l.getPropertyValue("animation-duration")||"0"),_=parseFloat(l.getPropertyValue("transition-duration")||"0");return d>0||_>0},ir=function(a){let l=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;const d=dt();We(d)&&(l&&(d.style.transition="none",d.style.width="100%"),setTimeout(()=>{d.style.transition="width ".concat(a/1e3,"s linear"),d.style.width="0%"},10))},oh=()=>{const a=dt(),l=parseInt(window.getComputedStyle(a).width);a.style.removeProperty("transition"),a.style.width="100%";const d=parseInt(window.getComputedStyle(a).width),_=l/d*100;a.style.removeProperty("transition"),a.style.width="".concat(_,"%")},Ea=()=>typeof window>"u"||typeof document>"u",ah=100,V={},lh=()=>{V.previousActiveElement&&V.previousActiveElement.focus?(V.previousActiveElement.focus(),V.previousActiveElement=null):document.body&&document.body.focus()},ch=a=>new Promise(l=>{if(!a)return l();const d=window.scrollX,_=window.scrollY;V.restoreFocusTimeout=setTimeout(()=>{lh(),l()},ah),window.scrollTo(d,_)}),uh=`
 <div aria-labelledby="`.concat(b.title,'" aria-describedby="').concat(b["html-container"],'" class="').concat(b.popup,`" tabindex="-1">
   <button type="button" class="`).concat(b.close,`"></button>
   <ul class="`).concat(b["progress-steps"],`"></ul>
   <div class="`).concat(b.icon,`"></div>
   <img class="`).concat(b.image,`" />
   <h2 class="`).concat(b.title,'" id="').concat(b.title,`"></h2>
   <div class="`).concat(b["html-container"],'" id="').concat(b["html-container"],`"></div>
   <input class="`).concat(b.input,`" />
   <input type="file" class="`).concat(b.file,`" />
   <div class="`).concat(b.range,`">
     <input type="range" />
     <output></output>
   </div>
   <select class="`).concat(b.select,`"></select>
   <div class="`).concat(b.radio,`"></div>
   <label for="`).concat(b.checkbox,'" class="').concat(b.checkbox,`">
     <input type="checkbox" />
     <span class="`).concat(b.label,`"></span>
   </label>
   <textarea class="`).concat(b.textarea,`"></textarea>
   <div class="`).concat(b["validation-message"],'" id="').concat(b["validation-message"],`"></div>
   <div class="`).concat(b.actions,`">
     <div class="`).concat(b.loader,`"></div>
     <button type="button" class="`).concat(b.confirm,`"></button>
     <button type="button" class="`).concat(b.deny,`"></button>
     <button type="button" class="`).concat(b.cancel,`"></button>
   </div>
   <div class="`).concat(b.footer,`"></div>
   <div class="`).concat(b["timer-progress-bar-container"],`">
     <div class="`).concat(b["timer-progress-bar"],`"></div>
   </div>
 </div>
`).replace(/(^|\n)\s*/g,""),dh=()=>{const a=q();return a?(a.remove(),Ve([document.documentElement,document.body],[b["no-backdrop"],b["toast-shown"],b["has-column"]]),!0):!1},Jt=()=>{V.currentInstance.resetValidationMessage()},hh=()=>{const a=R(),l=ot(a,b.input),d=ot(a,b.file),_=a.querySelector(".".concat(b.range," input")),k=a.querySelector(".".concat(b.range," output")),F=ot(a,b.select),ue=a.querySelector(".".concat(b.checkbox," input")),Ue=ot(a,b.textarea);l.oninput=Jt,d.onchange=Jt,F.onchange=Jt,ue.onchange=Jt,Ue.oninput=Jt,_.oninput=()=>{Jt(),k.value=_.value},_.onchange=()=>{Jt(),_.nextSibling.value=_.value}},ph=a=>typeof a=="string"?document.querySelector(a):a,fh=a=>{const l=R();l.setAttribute("role",a.toast?"alert":"dialog"),l.setAttribute("aria-live",a.toast?"polite":"assertive"),a.toast||l.setAttribute("aria-modal","true")},gh=a=>{window.getComputedStyle(a).direction==="rtl"&&z(q(),b.rtl)},_h=a=>{const l=dh();if(Ea()){c("SweetAlert2 requires document to initialize");return}const d=document.createElement("div");d.className=b.container,l&&z(d,b["no-transition"]),me(d,uh);const _=ph(a.target);_.appendChild(d),fh(a),gh(_),hh()},rr=(a,l)=>{a instanceof HTMLElement?l.appendChild(a):typeof a=="object"?mh(a,l):a&&me(l,a)},mh=(a,l)=>{a.jquery?vh(l,a):me(l,a.toString())},vh=(a,l)=>{if(a.textContent="",0 in l)for(let d=0;d in l;d++)a.appendChild(l[d].cloneNode(!0));else a.appendChild(l.cloneNode(!0))},on=(()=>{if(Ea())return!1;const a=document.createElement("div"),l={WebkitAnimation:"webkitAnimationEnd",animation:"animationend"};for(const d in l)if(Object.prototype.hasOwnProperty.call(l,d)&&typeof a.style[d]<"u")return l[d];return!1})(),bh=()=>{const a=document.createElement("div");a.className=b["scrollbar-measure"],document.body.appendChild(a);const l=a.getBoundingClientRect().width-a.clientWidth;return document.body.removeChild(a),l},yh=(a,l)=>{const d=rt(),_=je();!l.showConfirmButton&&!l.showDenyButton&&!l.showCancelButton?Te(d):we(d),ke(d,l,"actions"),Eh(d,_,l),me(_,l.loaderHtml),ke(_,l,"loader")};function Eh(a,l,d){const _=X(),k=ie(),F=ye();or(_,"confirm",d),or(k,"deny",d),or(F,"cancel",d),wh(_,k,F,d),d.reverseButtons&&(d.toast?(a.insertBefore(F,_),a.insertBefore(k,_)):(a.insertBefore(F,l),a.insertBefore(k,l),a.insertBefore(_,l)))}function wh(a,l,d,_){if(!_.buttonsStyling)return Ve([a,l,d],b.styled);z([a,l,d],b.styled),_.confirmButtonColor&&(a.style.backgroundColor=_.confirmButtonColor,z(a,b["default-outline"])),_.denyButtonColor&&(l.style.backgroundColor=_.denyButtonColor,z(l,b["default-outline"])),_.cancelButtonColor&&(d.style.backgroundColor=_.cancelButtonColor,z(d,b["default-outline"]))}function or(a,l,d){Un(a,d["show".concat(i(l),"Button")],"inline-block"),me(a,d["".concat(l,"ButtonText")]),a.setAttribute("aria-label",d["".concat(l,"ButtonAriaLabel")]),a.className=b[l],ke(a,d,"".concat(l,"Button")),z(a,d["".concat(l,"ButtonClass")])}function Ah(a,l){typeof l=="string"?a.style.background=l:l||z([document.documentElement,document.body],b["no-backdrop"])}function Sh(a,l){l in b?z(a,b[l]):(o('The "position" parameter is not valid, defaulting to "center"'),z(a,b.center))}function Th(a,l){if(l&&typeof l=="string"){const d="grow-".concat(l);d in b&&z(a,b[d])}}const Ch=(a,l)=>{const d=q();d&&(Ah(d,l.backdrop),Sh(d,l.position),Th(d,l.grow),ke(d,l,"container"))};var U={awaitingPromise:new WeakMap,promise:new WeakMap,innerParams:new WeakMap,domCache:new WeakMap};const kh=["input","file","range","select","radio","checkbox","textarea"],Oh=(a,l)=>{const d=R(),_=U.innerParams.get(a),k=!_||l.input!==_.input;kh.forEach(F=>{const ue=b[F],Ue=ot(d,ue);xh(F,l.inputAttributes),Ue.className=ue,k&&Te(Ue)}),l.input&&(k&&Ph(l),Lh(l))},Ph=a=>{if(!Re[a.input])return c('Unexpected type of input! Expected "text", "email", "password", "number", "tel", "select", "radio", "checkbox", "textarea", "file" or "url", got "'.concat(a.input,'"'));const l=wa(a.input),d=Re[a.input](l,a);we(d),setTimeout(()=>{Es(d)})},$h=a=>{for(let l=0;l<a.attributes.length;l++){const d=a.attributes[l].name;["type","value","style"].includes(d)||a.removeAttribute(d)}},xh=(a,l)=>{const d=ys(R(),a);if(d){$h(d);for(const _ in l)d.setAttribute(_,l[_])}},Lh=a=>{const l=wa(a.input);a.customClass&&z(l,a.customClass.input)},ar=(a,l)=>{(!a.placeholder||l.inputPlaceholder)&&(a.placeholder=l.inputPlaceholder)},an=(a,l,d)=>{if(d.inputLabel){a.id=b.input;const _=document.createElement("label"),k=b["input-label"];_.setAttribute("for",a.id),_.className=k,z(_,d.customClass.inputLabel),_.innerText=d.inputLabel,l.insertAdjacentElement("beforebegin",_)}},wa=a=>{const l=b[a]?b[a]:b.input;return ot(R(),l)},Re={};Re.text=Re.email=Re.password=Re.number=Re.tel=Re.url=(a,l)=>(typeof l.inputValue=="string"||typeof l.inputValue=="number"?a.value=l.inputValue:E(l.inputValue)||o('Unexpected type of inputValue! Expected "string", "number" or "Promise", got "'.concat(typeof l.inputValue,'"')),an(a,a,l),ar(a,l),a.type=l.input,a),Re.file=(a,l)=>(an(a,a,l),ar(a,l),a),Re.range=(a,l)=>{const d=a.querySelector("input"),_=a.querySelector("output");return d.value=l.inputValue,d.type=l.input,_.value=l.inputValue,an(d,a,l),a},Re.select=(a,l)=>{if(a.textContent="",l.inputPlaceholder){const d=document.createElement("option");me(d,l.inputPlaceholder),d.value="",d.disabled=!0,d.selected=!0,a.appendChild(d)}return an(a,a,l),a},Re.radio=a=>(a.textContent="",a),Re.checkbox=(a,l)=>{const d=ys(R(),"checkbox");d.value="1",d.id=b.checkbox,d.checked=!!l.inputValue;const _=a.querySelector("span");return me(_,l.inputPlaceholder),a},Re.textarea=(a,l)=>{a.value=l.inputValue,ar(a,l),an(a,a,l);const d=_=>parseInt(window.getComputedStyle(_).marginLeft)+parseInt(window.getComputedStyle(_).marginRight);return setTimeout(()=>{if("MutationObserver"in window){const _=parseInt(window.getComputedStyle(R()).width),k=()=>{const F=a.offsetWidth+d(a);F>_?R().style.width="".concat(F,"px"):R().style.width=null};new MutationObserver(k).observe(a,{attributes:!0,attributeFilter:["style"]})}}),a};const Ih=(a,l)=>{const d=_e();ke(d,l,"htmlContainer"),l.html?(rr(l.html,d),we(d,"block")):l.text?(d.textContent=l.text,we(d,"block")):Te(d),Oh(a,l)},Rh=(a,l)=>{const d=He();Un(d,l.footer),l.footer&&rr(l.footer,d),ke(d,l,"footer")},Dh=(a,l)=>{const d=Ct();me(d,l.closeButtonHtml),ke(d,l,"closeButton"),Un(d,l.showCloseButton),d.setAttribute("aria-label",l.closeButtonAriaLabel)},Nh=(a,l)=>{const d=U.innerParams.get(a),_=ge();if(d&&l.icon===d.icon){Sa(_,l),Aa(_,l);return}if(!l.icon&&!l.iconHtml)return Te(_);if(l.icon&&Object.keys(G).indexOf(l.icon)===-1)return c('Unknown icon! Expected "success", "error", "warning", "info" or "question", got "'.concat(l.icon,'"')),Te(_);we(_),Sa(_,l),Aa(_,l),z(_,l.showClass.icon)},Aa=(a,l)=>{for(const d in G)l.icon!==d&&Ve(a,G[d]);z(a,G[l.icon]),jh(a,l),Mh(),ke(a,l,"icon")},Mh=()=>{const a=R(),l=window.getComputedStyle(a).getPropertyValue("background-color"),d=a.querySelectorAll("[class^=swal2-success-circular-line], .swal2-success-fix");for(let _=0;_<d.length;_++)d[_].style.backgroundColor=l},Fh=`
  <div class="swal2-success-circular-line-left"></div>
  <span class="swal2-success-line-tip"></span> <span class="swal2-success-line-long"></span>
  <div class="swal2-success-ring"></div> <div class="swal2-success-fix"></div>
  <div class="swal2-success-circular-line-right"></div>
`,Bh=`
  <span class="swal2-x-mark">
    <span class="swal2-x-mark-line-left"></span>
    <span class="swal2-x-mark-line-right"></span>
  </span>
`,Sa=(a,l)=>{a.textContent="",l.iconHtml?me(a,Ta(l.iconHtml)):l.icon==="success"?me(a,Fh):l.icon==="error"?me(a,Bh):me(a,Ta({question:"?",warning:"!",info:"i"}[l.icon]))},jh=(a,l)=>{if(l.iconColor){a.style.color=l.iconColor,a.style.borderColor=l.iconColor;for(const d of[".swal2-success-line-tip",".swal2-success-line-long",".swal2-x-mark-line-left",".swal2-x-mark-line-right"])va(a,d,"backgroundColor",l.iconColor);va(a,".swal2-success-ring","borderColor",l.iconColor)}},Ta=a=>'<div class="'.concat(b["icon-content"],'">').concat(a,"</div>"),Hh=(a,l)=>{const d=Be();if(!l.imageUrl)return Te(d);we(d,""),d.setAttribute("src",l.imageUrl),d.setAttribute("alt",l.imageAlt),rn(d,"width",l.imageWidth),rn(d,"height",l.imageHeight),d.className=b.image,ke(d,l,"image")},Vh=a=>{const l=document.createElement("li");return z(l,b["progress-step"]),me(l,a),l},Wh=a=>{const l=document.createElement("li");return z(l,b["progress-step-line"]),a.progressStepsDistance&&(l.style.width=a.progressStepsDistance),l},Uh=(a,l)=>{const d=ne();if(!l.progressSteps||l.progressSteps.length===0)return Te(d);we(d),d.textContent="",l.currentProgressStep>=l.progressSteps.length&&o("Invalid currentProgressStep parameter, it should be less than progressSteps.length (currentProgressStep like JS arrays starts from 0)"),l.progressSteps.forEach((_,k)=>{const F=Vh(_);if(d.appendChild(F),k===l.currentProgressStep&&z(F,b["active-progress-step"]),k!==l.progressSteps.length-1){const ue=Wh(l);d.appendChild(ue)}})},qh=(a,l)=>{const d=ce();Un(d,l.title||l.titleText,"block"),l.title&&rr(l.title,d),l.titleText&&(d.innerText=l.titleText),ke(d,l,"title")},zh=(a,l)=>{const d=q(),_=R();l.toast?(rn(d,"width",l.width),_.style.width="100%",_.insertBefore(je(),ge())):rn(_,"width",l.width),rn(_,"padding",l.padding),l.color&&(_.style.color=l.color),l.background&&(_.style.background=l.background),Te(re()),Kh(_,l)},Kh=(a,l)=>{a.className="".concat(b.popup," ").concat(We(a)?l.showClass.popup:""),l.toast?(z([document.documentElement,document.body],b["toast-shown"]),z(a,b.toast)):z(a,b.modal),ke(a,l,"popup"),typeof l.customClass=="string"&&z(a,l.customClass),l.icon&&z(a,b["icon-".concat(l.icon)])},Ca=(a,l)=>{zh(a,l),Ch(a,l),Uh(a,l),Nh(a,l),Hh(a,l),qh(a,l),Dh(a,l),Ih(a,l),yh(a,l),Rh(a,l),typeof l.didRender=="function"&&l.didRender(R())},ws=Object.freeze({cancel:"cancel",backdrop:"backdrop",close:"close",esc:"esc",timer:"timer"}),Gh=()=>{r(document.body.children).forEach(a=>{a===q()||a.contains(q())||(a.hasAttribute("aria-hidden")&&a.setAttribute("data-previous-aria-hidden",a.getAttribute("aria-hidden")),a.setAttribute("aria-hidden","true"))})},ka=()=>{r(document.body.children).forEach(a=>{a.hasAttribute("data-previous-aria-hidden")?(a.setAttribute("aria-hidden",a.getAttribute("data-previous-aria-hidden")),a.removeAttribute("data-previous-aria-hidden")):a.removeAttribute("aria-hidden")})},Oa=["swal-title","swal-html","swal-footer"],Yh=a=>{const l=typeof a.template=="string"?document.querySelector(a.template):a.template;if(!l)return{};const d=l.content;return sp(d),Object.assign(Zh(d),Xh(d),Qh(d),Jh(d),ep(d),tp(d,Oa))},Zh=a=>{const l={};return r(a.querySelectorAll("swal-param")).forEach(d=>{es(d,["name","value"]);const _=d.getAttribute("name"),k=d.getAttribute("value");typeof v[_]=="boolean"&&k==="false"&&(l[_]=!1),typeof v[_]=="object"&&(l[_]=JSON.parse(k))}),l},Xh=a=>{const l={};return r(a.querySelectorAll("swal-button")).forEach(d=>{es(d,["type","color","aria-label"]);const _=d.getAttribute("type");l["".concat(_,"ButtonText")]=d.innerHTML,l["show".concat(i(_),"Button")]=!0,d.hasAttribute("color")&&(l["".concat(_,"ButtonColor")]=d.getAttribute("color")),d.hasAttribute("aria-label")&&(l["".concat(_,"ButtonAriaLabel")]=d.getAttribute("aria-label"))}),l},Qh=a=>{const l={},d=a.querySelector("swal-image");return d&&(es(d,["src","width","height","alt"]),d.hasAttribute("src")&&(l.imageUrl=d.getAttribute("src")),d.hasAttribute("width")&&(l.imageWidth=d.getAttribute("width")),d.hasAttribute("height")&&(l.imageHeight=d.getAttribute("height")),d.hasAttribute("alt")&&(l.imageAlt=d.getAttribute("alt"))),l},Jh=a=>{const l={},d=a.querySelector("swal-icon");return d&&(es(d,["type","color"]),d.hasAttribute("type")&&(l.icon=d.getAttribute("type")),d.hasAttribute("color")&&(l.iconColor=d.getAttribute("color")),l.iconHtml=d.innerHTML),l},ep=a=>{const l={},d=a.querySelector("swal-input");d&&(es(d,["type","label","placeholder","value"]),l.input=d.getAttribute("type")||"text",d.hasAttribute("label")&&(l.inputLabel=d.getAttribute("label")),d.hasAttribute("placeholder")&&(l.inputPlaceholder=d.getAttribute("placeholder")),d.hasAttribute("value")&&(l.inputValue=d.getAttribute("value")));const _=a.querySelectorAll("swal-input-option");return _.length&&(l.inputOptions={},r(_).forEach(k=>{es(k,["value"]);const F=k.getAttribute("value"),ue=k.innerHTML;l.inputOptions[F]=ue})),l},tp=(a,l)=>{const d={};for(const _ in l){const k=l[_],F=a.querySelector(k);F&&(es(F,[]),d[k.replace(/^swal-/,"")]=F.innerHTML.trim())}return d},sp=a=>{const l=Oa.concat(["swal-param","swal-button","swal-image","swal-icon","swal-input","swal-input-option"]);r(a.children).forEach(d=>{const _=d.tagName.toLowerCase();l.indexOf(_)===-1&&o("Unrecognized element <".concat(_,">"))})},es=(a,l)=>{r(a.attributes).forEach(d=>{l.indexOf(d.name)===-1&&o(['Unrecognized attribute "'.concat(d.name,'" on <').concat(a.tagName.toLowerCase(),">."),"".concat(l.length?"Allowed attributes are: ".concat(l.join(", ")):"To set the value, use HTML within the element.")])})};var Pa={email:(a,l)=>/^[a-zA-Z0-9.+_-]+@[a-zA-Z0-9.-]+\.[a-zA-Z0-9-]{2,24}$/.test(a)?Promise.resolve():Promise.resolve(l||"Invalid email address"),url:(a,l)=>/^https?:\/\/(www\.)?[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-z]{2,63}\b([-a-zA-Z0-9@:%_+.~#?&/=]*)$/.test(a)?Promise.resolve():Promise.resolve(l||"Invalid URL")};function np(a){a.inputValidator||Object.keys(Pa).forEach(l=>{a.input===l&&(a.inputValidator=Pa[l])})}function ip(a){(!a.target||typeof a.target=="string"&&!document.querySelector(a.target)||typeof a.target!="string"&&!a.target.appendChild)&&(o('Target parameter is not valid, defaulting to "body"'),a.target="body")}function rp(a){np(a),a.showLoaderOnConfirm&&!a.preConfirm&&o(`showLoaderOnConfirm is set to true, but preConfirm is not defined.
showLoaderOnConfirm should be used together with preConfirm, see usage example:
https://sweetalert2.github.io/#ajax-request`),ip(a),typeof a.title=="string"&&(a.title=a.title.split(`
`).join("<br />")),_h(a)}class op{constructor(l,d){this.callback=l,this.remaining=d,this.running=!1,this.start()}start(){return this.running||(this.running=!0,this.started=new Date,this.id=setTimeout(this.callback,this.remaining)),this.remaining}stop(){return this.running&&(this.running=!1,clearTimeout(this.id),this.remaining-=new Date().getTime()-this.started.getTime()),this.remaining}increase(l){const d=this.running;return d&&this.stop(),this.remaining+=l,d&&this.start(),this.remaining}getTimerLeft(){return this.running&&(this.stop(),this.start()),this.remaining}isRunning(){return this.running}}const ap=()=>{xt.previousBodyPadding===null&&document.body.scrollHeight>window.innerHeight&&(xt.previousBodyPadding=parseInt(window.getComputedStyle(document.body).getPropertyValue("padding-right")),document.body.style.paddingRight="".concat(xt.previousBodyPadding+bh(),"px"))},lp=()=>{xt.previousBodyPadding!==null&&(document.body.style.paddingRight="".concat(xt.previousBodyPadding,"px"),xt.previousBodyPadding=null)},cp=()=>{if((/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream||navigator.platform==="MacIntel"&&navigator.maxTouchPoints>1)&&!Ee(document.body,b.iosfix)){const a=document.body.scrollTop;document.body.style.top="".concat(a*-1,"px"),z(document.body,b.iosfix),dp(),up()}},up=()=>{const a=navigator.userAgent,l=!!a.match(/iPad/i)||!!a.match(/iPhone/i),d=!!a.match(/WebKit/i);l&&d&&!a.match(/CriOS/i)&&R().scrollHeight>window.innerHeight-44&&(q().style.paddingBottom="".concat(44,"px"))},dp=()=>{const a=q();let l;a.ontouchstart=d=>{l=hp(d)},a.ontouchmove=d=>{l&&(d.preventDefault(),d.stopPropagation())}},hp=a=>{const l=a.target,d=q();return pp(a)||fp(a)?!1:l===d||!ba(d)&&l.tagName!=="INPUT"&&l.tagName!=="TEXTAREA"&&!(ba(_e())&&_e().contains(l))},pp=a=>a.touches&&a.touches.length&&a.touches[0].touchType==="stylus",fp=a=>a.touches&&a.touches.length>1,gp=()=>{if(Ee(document.body,b.iosfix)){const a=parseInt(document.body.style.top,10);Ve(document.body,b.iosfix),document.body.style.top="",document.body.scrollTop=a*-1}},$a=10,_p=a=>{const l=q(),d=R();typeof a.willOpen=="function"&&a.willOpen(d);const _=window.getComputedStyle(document.body).overflowY;bp(l,d,a),setTimeout(()=>{mp(l,d)},$a),Pt()&&(vp(l,a.scrollbarPadding,_),Gh()),!ht()&&!V.previousActiveElement&&(V.previousActiveElement=document.activeElement),typeof a.didOpen=="function"&&setTimeout(()=>a.didOpen(d)),Ve(l,b["no-transition"])},xa=a=>{const l=R();if(a.target!==l)return;const d=q();l.removeEventListener(on,xa),d.style.overflowY="auto"},mp=(a,l)=>{on&&ya(l)?(a.style.overflowY="hidden",l.addEventListener(on,xa)):a.style.overflowY="auto"},vp=(a,l,d)=>{cp(),l&&d!=="hidden"&&ap(),setTimeout(()=>{a.scrollTop=0})},bp=(a,l,d)=>{z(a,d.showClass.backdrop),l.style.setProperty("opacity","0","important"),we(l,"grid"),setTimeout(()=>{z(l,d.showClass.popup),l.style.removeProperty("opacity")},$a),z([document.documentElement,document.body],b.shown),d.heightAuto&&d.backdrop&&!d.toast&&z([document.documentElement,document.body],b["height-auto"])},As=a=>{let l=R();l||new Kn,l=R();const d=je();ht()?Te(ge()):yp(l,a),we(d),l.setAttribute("data-loading",!0),l.setAttribute("aria-busy",!0),l.focus()},yp=(a,l)=>{const d=rt(),_=je();!l&&We(X())&&(l=X()),we(d),l&&(Te(l),_.setAttribute("data-button-to-replace",l.className)),_.parentNode.insertBefore(_,l),z([a,d],b.loading)},Ep=(a,l)=>{l.input==="select"||l.input==="radio"?Cp(a,l):["text","email","number","tel","textarea"].includes(l.input)&&(g(l.inputValue)||E(l.inputValue))&&(As(X()),kp(a,l))},wp=(a,l)=>{const d=a.getInput();if(!d)return null;switch(l.input){case"checkbox":return Ap(d);case"radio":return Sp(d);case"file":return Tp(d);default:return l.inputAutoTrim?d.value.trim():d.value}},Ap=a=>a.checked?1:0,Sp=a=>a.checked?a.value:null,Tp=a=>a.files.length?a.getAttribute("multiple")!==null?a.files:a.files[0]:null,Cp=(a,l)=>{const d=R(),_=k=>Op[l.input](d,lr(k),l);g(l.inputOptions)||E(l.inputOptions)?(As(X()),m(l.inputOptions).then(k=>{a.hideLoading(),_(k)})):typeof l.inputOptions=="object"?_(l.inputOptions):c("Unexpected type of inputOptions! Expected object, Map or Promise, got ".concat(typeof l.inputOptions))},kp=(a,l)=>{const d=a.getInput();Te(d),m(l.inputValue).then(_=>{d.value=l.input==="number"?parseFloat(_)||0:"".concat(_),we(d),d.focus(),a.hideLoading()}).catch(_=>{c("Error in inputValue promise: ".concat(_)),d.value="",we(d),d.focus(),a.hideLoading()})},Op={select:(a,l,d)=>{const _=ot(a,b.select),k=(F,ue,Ue)=>{const Oe=document.createElement("option");Oe.value=Ue,me(Oe,ue),Oe.selected=La(Ue,d.inputValue),F.appendChild(Oe)};l.forEach(F=>{const ue=F[0],Ue=F[1];if(Array.isArray(Ue)){const Oe=document.createElement("optgroup");Oe.label=ue,Oe.disabled=!1,_.appendChild(Oe),Ue.forEach(Ts=>k(Oe,Ts[1],Ts[0]))}else k(_,Ue,ue)}),_.focus()},radio:(a,l,d)=>{const _=ot(a,b.radio);l.forEach(F=>{const ue=F[0],Ue=F[1],Oe=document.createElement("input"),Ts=document.createElement("label");Oe.type="radio",Oe.name=b.radio,Oe.value=ue,La(ue,d.inputValue)&&(Oe.checked=!0);const gr=document.createElement("span");me(gr,Ue),gr.className=b.label,Ts.appendChild(Oe),Ts.appendChild(gr),_.appendChild(Ts)});const k=_.querySelectorAll("input");k.length&&k[0].focus()}},lr=a=>{const l=[];return typeof Map<"u"&&a instanceof Map?a.forEach((d,_)=>{let k=d;typeof k=="object"&&(k=lr(k)),l.push([_,k])}):Object.keys(a).forEach(d=>{let _=a[d];typeof _=="object"&&(_=lr(_)),l.push([d,_])}),l},La=(a,l)=>l&&l.toString()===a.toString();function Ia(){const a=U.innerParams.get(this);if(!a)return;const l=U.domCache.get(this);Te(l.loader),ht()?a.icon&&we(ge()):Pp(l),Ve([l.popup,l.actions],b.loading),l.popup.removeAttribute("aria-busy"),l.popup.removeAttribute("data-loading"),l.confirmButton.disabled=!1,l.denyButton.disabled=!1,l.cancelButton.disabled=!1}const Pp=a=>{const l=a.popup.getElementsByClassName(a.loader.getAttribute("data-button-to-replace"));l.length?we(l[0],"inline-block"):rh()&&Te(a.actions)};function $p(a){const l=U.innerParams.get(a||this),d=U.domCache.get(a||this);return d?ys(d.popup,l.input):null}var ln={swalPromiseResolve:new WeakMap,swalPromiseReject:new WeakMap};function Ra(a,l,d,_){ht()?Da(a,_):(ch(d).then(()=>Da(a,_)),V.keydownTarget.removeEventListener("keydown",V.keydownHandler,{capture:V.keydownListenerCapture}),V.keydownHandlerAdded=!1),/^((?!chrome|android).)*safari/i.test(navigator.userAgent)?(l.setAttribute("style","display:none !important"),l.removeAttribute("class"),l.innerHTML=""):l.remove(),Pt()&&(lp(),gp(),ka()),xp()}function xp(){Ve([document.documentElement,document.body],[b.shown,b["height-auto"],b["no-backdrop"],b["toast-shown"]])}function qn(a){a=Dp(a);const l=ln.swalPromiseResolve.get(this),d=Ip(this);this.isAwaitingPromise()?a.isDismissed||(cn(this),l(a)):d&&l(a)}function Lp(){return!!U.awaitingPromise.get(this)}const Ip=a=>{const l=R();if(!l)return!1;const d=U.innerParams.get(a);if(!d||Ee(l,d.hideClass.popup))return!1;Ve(l,d.showClass.popup),z(l,d.hideClass.popup);const _=q();return Ve(_,d.showClass.backdrop),z(_,d.hideClass.backdrop),Np(a,l,d),!0};function Rp(a){const l=ln.swalPromiseReject.get(this);cn(this),l&&l(a)}const cn=a=>{a.isAwaitingPromise()&&(U.awaitingPromise.delete(a),U.innerParams.get(a)||a._destroy())},Dp=a=>typeof a>"u"?{isConfirmed:!1,isDenied:!1,isDismissed:!0}:Object.assign({isConfirmed:!1,isDenied:!1,isDismissed:!1},a),Np=(a,l,d)=>{const _=q(),k=on&&ya(l);typeof d.willClose=="function"&&d.willClose(l),k?Mp(a,l,_,d.returnFocus,d.didClose):Ra(a,_,d.returnFocus,d.didClose)},Mp=(a,l,d,_,k)=>{V.swalCloseEventFinishedCallback=Ra.bind(null,a,d,_,k),l.addEventListener(on,function(F){F.target===l&&(V.swalCloseEventFinishedCallback(),delete V.swalCloseEventFinishedCallback)})},Da=(a,l)=>{setTimeout(()=>{typeof l=="function"&&l.bind(a.params)(),a._destroy()})};function Na(a,l,d){const _=U.domCache.get(a);l.forEach(k=>{_[k].disabled=d})}function Ma(a,l){if(!a)return!1;if(a.type==="radio"){const d=a.parentNode.parentNode.querySelectorAll("input");for(let _=0;_<d.length;_++)d[_].disabled=l}else a.disabled=l}function Fp(){Na(this,["confirmButton","denyButton","cancelButton"],!1)}function Bp(){Na(this,["confirmButton","denyButton","cancelButton"],!0)}function jp(){return Ma(this.getInput(),!1)}function Hp(){return Ma(this.getInput(),!0)}function Vp(a){const l=U.domCache.get(this),d=U.innerParams.get(this);me(l.validationMessage,a),l.validationMessage.className=b["validation-message"],d.customClass&&d.customClass.validationMessage&&z(l.validationMessage,d.customClass.validationMessage),we(l.validationMessage);const _=this.getInput();_&&(_.setAttribute("aria-invalid",!0),_.setAttribute("aria-describedby",b["validation-message"]),Es(_),z(_,b.inputerror))}function Wp(){const a=U.domCache.get(this);a.validationMessage&&Te(a.validationMessage);const l=this.getInput();l&&(l.removeAttribute("aria-invalid"),l.removeAttribute("aria-describedby"),Ve(l,b.inputerror))}function Up(){return U.domCache.get(this).progressSteps}function qp(a){const l=R(),d=U.innerParams.get(this);if(!l||Ee(l,d.hideClass.popup))return o("You're trying to update the closed or closing popup, that won't work. Use the update() method in preConfirm parameter or show a new popup.");const _=zp(a),k=Object.assign({},d,_);Ca(this,k),U.innerParams.set(this,k),Object.defineProperties(this,{params:{value:Object.assign({},this.params,a),writable:!1,enumerable:!0}})}const zp=a=>{const l={};return Object.keys(a).forEach(d=>{$(d)?l[d]=a[d]:o('Invalid parameter to update: "'.concat(d,`". Updatable params are listed here: https://github.com/sweetalert2/sweetalert2/blob/master/src/utils/params.js

If you think this parameter should be updatable, request it here: https://github.com/sweetalert2/sweetalert2/issues/new?template=02_feature_request.md`))}),l};function Kp(){const a=U.domCache.get(this),l=U.innerParams.get(this);if(!l){Fa(this);return}a.popup&&V.swalCloseEventFinishedCallback&&(V.swalCloseEventFinishedCallback(),delete V.swalCloseEventFinishedCallback),V.deferDisposalTimer&&(clearTimeout(V.deferDisposalTimer),delete V.deferDisposalTimer),typeof l.didDestroy=="function"&&l.didDestroy(),Gp(this)}const Gp=a=>{Fa(a),delete a.params,delete V.keydownHandler,delete V.keydownTarget,delete V.currentInstance},Fa=a=>{a.isAwaitingPromise()?(cr(U,a),U.awaitingPromise.set(a,!0)):(cr(ln,a),cr(U,a))},cr=(a,l)=>{for(const d in a)a[d].delete(l)};var Ba=Object.freeze({hideLoading:Ia,disableLoading:Ia,getInput:$p,close:qn,isAwaitingPromise:Lp,rejectPromise:Rp,handleAwaitingPromise:cn,closePopup:qn,closeModal:qn,closeToast:qn,enableButtons:Fp,disableButtons:Bp,enableInput:jp,disableInput:Hp,showValidationMessage:Vp,resetValidationMessage:Wp,getProgressSteps:Up,update:qp,_destroy:Kp});const Yp=a=>{const l=U.innerParams.get(a);a.disableButtons(),l.input?ja(a,"confirm"):dr(a,!0)},Zp=a=>{const l=U.innerParams.get(a);a.disableButtons(),l.returnInputValueOnDeny?ja(a,"deny"):ur(a,!1)},Xp=(a,l)=>{a.disableButtons(),l(ws.cancel)},ja=(a,l)=>{const d=U.innerParams.get(a);if(!d.input)return c('The "input" parameter is needed to be set when using returnInputValueOn'.concat(i(l)));const _=wp(a,d);d.inputValidator?Qp(a,_,l):a.getInput().checkValidity()?l==="deny"?ur(a,_):dr(a,_):(a.enableButtons(),a.showValidationMessage(d.validationMessage))},Qp=(a,l,d)=>{const _=U.innerParams.get(a);a.disableInput(),Promise.resolve().then(()=>m(_.inputValidator(l,_.validationMessage))).then(k=>{a.enableButtons(),a.enableInput(),k?a.showValidationMessage(k):d==="deny"?ur(a,l):dr(a,l)})},ur=(a,l)=>{const d=U.innerParams.get(a||void 0);d.showLoaderOnDeny&&As(ie()),d.preDeny?(U.awaitingPromise.set(a||void 0,!0),Promise.resolve().then(()=>m(d.preDeny(l,d.validationMessage))).then(_=>{_===!1?(a.hideLoading(),cn(a)):a.closePopup({isDenied:!0,value:typeof _>"u"?l:_})}).catch(_=>Va(a||void 0,_))):a.closePopup({isDenied:!0,value:l})},Ha=(a,l)=>{a.closePopup({isConfirmed:!0,value:l})},Va=(a,l)=>{a.rejectPromise(l)},dr=(a,l)=>{const d=U.innerParams.get(a||void 0);d.showLoaderOnConfirm&&As(),d.preConfirm?(a.resetValidationMessage(),U.awaitingPromise.set(a||void 0,!0),Promise.resolve().then(()=>m(d.preConfirm(l,d.validationMessage))).then(_=>{We(re())||_===!1?(a.hideLoading(),cn(a)):Ha(a,typeof _>"u"?l:_)}).catch(_=>Va(a||void 0,_))):Ha(a,l)},Jp=(a,l,d)=>{U.innerParams.get(a).toast?ef(a,l,d):(sf(l),nf(l),rf(a,l,d))},ef=(a,l,d)=>{l.popup.onclick=()=>{const _=U.innerParams.get(a);_&&(tf(_)||_.timer||_.input)||d(ws.close)}},tf=a=>a.showConfirmButton||a.showDenyButton||a.showCancelButton||a.showCloseButton;let zn=!1;const sf=a=>{a.popup.onmousedown=()=>{a.container.onmouseup=function(l){a.container.onmouseup=void 0,l.target===a.container&&(zn=!0)}}},nf=a=>{a.container.onmousedown=()=>{a.popup.onmouseup=function(l){a.popup.onmouseup=void 0,(l.target===a.popup||a.popup.contains(l.target))&&(zn=!0)}}},rf=(a,l,d)=>{l.container.onclick=_=>{const k=U.innerParams.get(a);if(zn){zn=!1;return}_.target===l.container&&f(k.allowOutsideClick)&&d(ws.backdrop)}},of=()=>We(R()),Wa=()=>X()&&X().click(),af=()=>ie()&&ie().click(),lf=()=>ye()&&ye().click(),cf=(a,l,d,_)=>{l.keydownTarget&&l.keydownHandlerAdded&&(l.keydownTarget.removeEventListener("keydown",l.keydownHandler,{capture:l.keydownListenerCapture}),l.keydownHandlerAdded=!1),d.toast||(l.keydownHandler=k=>df(a,k,_),l.keydownTarget=d.keydownListenerCapture?window:R(),l.keydownListenerCapture=d.keydownListenerCapture,l.keydownTarget.addEventListener("keydown",l.keydownHandler,{capture:l.keydownListenerCapture}),l.keydownHandlerAdded=!0)},hr=(a,l,d)=>{const _=Ot();if(_.length)return l=l+d,l===_.length?l=0:l===-1&&(l=_.length-1),_[l].focus();R().focus()},Ua=["ArrowRight","ArrowDown"],uf=["ArrowLeft","ArrowUp"],df=(a,l,d)=>{const _=U.innerParams.get(a);_&&(l.isComposing||l.keyCode===229||(_.stopKeydownPropagation&&l.stopPropagation(),l.key==="Enter"?hf(a,l,_):l.key==="Tab"?pf(l,_):[...Ua,...uf].includes(l.key)?ff(l.key):l.key==="Escape"&&gf(l,_,d)))},hf=(a,l,d)=>{if(f(d.allowEnterKey)&&l.target&&a.getInput()&&l.target.outerHTML===a.getInput().outerHTML){if(["textarea","file"].includes(d.input))return;Wa(),l.preventDefault()}},pf=(a,l)=>{const d=a.target,_=Ot();let k=-1;for(let F=0;F<_.length;F++)if(d===_[F]){k=F;break}a.shiftKey?hr(l,k,-1):hr(l,k,1),a.stopPropagation(),a.preventDefault()},ff=a=>{const l=X(),d=ie(),_=ye();if(![l,d,_].includes(document.activeElement))return;const k=Ua.includes(a)?"nextElementSibling":"previousElementSibling";let F=document.activeElement;for(let ue=0;ue<rt().children.length;ue++){if(F=F[k],!F)return;if(We(F)&&F instanceof HTMLButtonElement)break}F instanceof HTMLButtonElement&&F.focus()},gf=(a,l,d)=>{f(l.allowEscapeKey)&&(a.preventDefault(),d(ws.esc))},_f=a=>typeof a=="object"&&a.jquery,qa=a=>a instanceof Element||_f(a),mf=a=>{const l={};return typeof a[0]=="object"&&!qa(a[0])?Object.assign(l,a[0]):["title","html","icon"].forEach((d,_)=>{const k=a[_];typeof k=="string"||qa(k)?l[d]=k:k!==void 0&&c("Unexpected type of ".concat(d,'! Expected "string" or "Element", got ').concat(typeof k))}),l};function vf(){const a=this;for(var l=arguments.length,d=new Array(l),_=0;_<l;_++)d[_]=arguments[_];return new a(...d)}function bf(a){class l extends this{_main(_,k){return super._main(_,Object.assign({},a,k))}}return l}const yf=()=>V.timeout&&V.timeout.getTimerLeft(),za=()=>{if(V.timeout)return oh(),V.timeout.stop()},Ka=()=>{if(V.timeout){const a=V.timeout.start();return ir(a),a}},Ef=()=>{const a=V.timeout;return a&&(a.running?za():Ka())},wf=a=>{if(V.timeout){const l=V.timeout.increase(a);return ir(l,!0),l}},Af=()=>V.timeout&&V.timeout.isRunning();let Ga=!1;const pr={};function Sf(){let a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"data-swal-template";pr[a]=this,Ga||(document.body.addEventListener("click",Tf),Ga=!0)}const Tf=a=>{for(let l=a.target;l&&l!==document;l=l.parentNode)for(const d in pr){const _=l.getAttribute(d);if(_){pr[d].fire({template:_});return}}};var Cf=Object.freeze({isValidParameter:x,isUpdatableParameter:$,isDeprecatedParameter:P,argsToParams:mf,isVisible:of,clickConfirm:Wa,clickDeny:af,clickCancel:lf,getContainer:q,getPopup:R,getTitle:ce,getHtmlContainer:_e,getImage:Be,getIcon:ge,getInputLabel:Se,getCloseButton:Ct,getActions:rt,getConfirmButton:X,getDenyButton:ie,getCancelButton:ye,getLoader:je,getFooter:He,getTimerProgressBar:dt,getFocusableElements:Ot,getValidationMessage:re,isLoading:$t,fire:vf,mixin:bf,showLoading:As,enableLoading:As,getTimerLeft:yf,stopTimer:za,resumeTimer:Ka,toggleTimer:Ef,increaseTimer:wf,isTimerRunning:Af,bindClickHandler:Sf});let fr;class Ss{constructor(){if(typeof window>"u")return;fr=this;for(var l=arguments.length,d=new Array(l),_=0;_<l;_++)d[_]=arguments[_];const k=Object.freeze(this.constructor.argsToParams(d));Object.defineProperties(this,{params:{value:k,writable:!1,enumerable:!0,configurable:!0}});const F=this._main(this.params);U.promise.set(this,F)}_main(l){let d=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};I(Object.assign({},d,l)),V.currentInstance&&(V.currentInstance._destroy(),Pt()&&ka()),V.currentInstance=this;const _=Of(l,d);rp(_),Object.freeze(_),V.timeout&&(V.timeout.stop(),delete V.timeout),clearTimeout(V.restoreFocusTimeout);const k=Pf(this);return Ca(this,_),U.innerParams.set(this,_),kf(this,k,_)}then(l){return U.promise.get(this).then(l)}finally(l){return U.promise.get(this).finally(l)}}const kf=(a,l,d)=>new Promise((_,k)=>{const F=ue=>{a.closePopup({isDismissed:!0,dismiss:ue})};ln.swalPromiseResolve.set(a,_),ln.swalPromiseReject.set(a,k),l.confirmButton.onclick=()=>Yp(a),l.denyButton.onclick=()=>Zp(a),l.cancelButton.onclick=()=>Xp(a,F),l.closeButton.onclick=()=>F(ws.close),Jp(a,l,F),cf(a,V,d,F),Ep(a,d),_p(d),$f(V,d,F),xf(l,d),setTimeout(()=>{l.container.scrollTop=0})}),Of=(a,l)=>{const d=Yh(a),_=Object.assign({},v,l,d,a);return _.showClass=Object.assign({},v.showClass,_.showClass),_.hideClass=Object.assign({},v.hideClass,_.hideClass),_},Pf=a=>{const l={popup:R(),container:q(),actions:rt(),confirmButton:X(),denyButton:ie(),cancelButton:ye(),loader:je(),closeButton:Ct(),validationMessage:re(),progressSteps:ne()};return U.domCache.set(a,l),l},$f=(a,l,d)=>{const _=dt();Te(_),l.timer&&(a.timeout=new op(()=>{d("timer"),delete a.timeout},l.timer),l.timerProgressBar&&(we(_),ke(_,l,"timerProgressBar"),setTimeout(()=>{a.timeout&&a.timeout.running&&ir(l.timer)})))},xf=(a,l)=>{if(!l.toast){if(!f(l.allowEnterKey))return If();Lf(a,l)||hr(l,-1,1)}},Lf=(a,l)=>l.focusDeny&&We(a.denyButton)?(a.denyButton.focus(),!0):l.focusCancel&&We(a.cancelButton)?(a.cancelButton.focus(),!0):l.focusConfirm&&We(a.confirmButton)?(a.confirmButton.focus(),!0):!1,If=()=>{document.activeElement instanceof HTMLElement&&typeof document.activeElement.blur=="function"&&document.activeElement.blur()};Object.assign(Ss.prototype,Ba),Object.assign(Ss,Cf),Object.keys(Ba).forEach(a=>{Ss[a]=function(){if(fr)return fr[a](...arguments)}}),Ss.DismissReason=ws,Ss.version="11.4.4";const Kn=Ss;return Kn.default=Kn,Kn}),typeof It<"u"&&It.Sweetalert2&&(It.swal=It.sweetAlert=It.Swal=It.SweetAlert=It.Sweetalert2)})(Qu);var my=Qu.exports;const ti=_y(my);let vy=class{static install(e,t={}){var n;const i=ti.mixin(t),r=function(...o){return i.fire.call(i,...o)};Object.assign(r,ti),Object.keys(ti).filter(o=>typeof ti[o]=="function").forEach(o=>{r[o]=i[o].bind(i)}),(n=e.config)!=null&&n.globalProperties&&!e.config.globalProperties.$swal?(e.config.globalProperties.$swal=r,e.provide("$swal",r)):Object.prototype.hasOwnProperty.call(e,"$swal")||(e.prototype.$swal=r,e.swal=r)}};const Nl=s=>{let e=!1,t;return()=>(e||(e=!0,t=s()),t)};class oo{static isServer(){return typeof document>"u"}}function by(s){const e=document.createElement("SCRIPT");if(typeof s!="object")throw new Error("options should  be an object");Array.prototype.isPrototypeOf(s.libraries)&&(s.libraries=s.libraries.join(",")),s.v||(s.v=3.47),s.callback="vueGoogleMapsInit";let n="https://maps.googleapis.com/maps/api/js?"+Object.keys(s).map(i=>encodeURIComponent(i)+"="+encodeURIComponent(s[i])).join("&");return e.setAttribute("src",n),e.setAttribute("async",""),e.setAttribute("defer",""),e}let Ml=!1;function yy(s){if(!oo.isServer()){if(Ml)throw new Error("You already started the loading of google maps");{Ml=!0;const e=by(s);document.head.appendChild(e)}}}const Ju=(s,e,t)=>{for(let n of t){const i=`on${n.charAt(0).toUpperCase()}${n.slice(1)}`.replace(/[-_]+(.)?/g,(r,o)=>o?o.toUpperCase():"");s.$props[i]||s.$attrs[i]?e.addListener(n,r=>{s.$emit(n,r)}):(s.$gmapOptions.autobindAllEvents||s.$attrs[n])&&e.addListener(n,r=>{s.$emit(n,r)})}};function ed(s,e,t,n=!1){let i=!1;function r(){i||(i=!0,s.$nextTick(()=>{i=!1,t()}))}for(let o of e)s.$watch(o,r,{immediate:n})}class Fl{static capitalizeFirstLetter(e){return e.charAt(0).toUpperCase()+e.slice(1)}}function ki(s,e){return Object.keys(e).reduce((t,n)=>(s[n]!==void 0&&(t[n]=s[n]),t),{})}function ta(s,e,t){for(let n in t){let{twoWay:i,type:r,trackProperties:o,noBind:c}=t[n];if(c)continue;const u="set"+Fl.capitalizeFirstLetter(n),h="get"+Fl.capitalizeFirstLetter(n),p=n.toLowerCase()+"_changed",f=s[n];if(typeof e[u]>"u")throw new Error(`${u} is not a method of (the Maps object corresponding to) ${s.$options._componentTag}`);r!==Object||!o?s.$watch(n,()=>{const g=s[n];e[u](g)},{immediate:typeof f<"u",deep:r===Object}):ed(s,o.map(g=>`${n}.${g}`),()=>{e[u](s[n])},s[n]!==void 0),i&&(s.$gmapOptions.autobindAllEvents||s.$attrs[p])&&e.addListener(p,()=>{s.$emit(p,e[h]())})}}const Ey={inject:{$mapPromise:{default:"abcdef"}},provide(){return this.$mapPromise.then(s=>{this.$map=s}),{}}};function Xt(s){const{mappedProps:e,name:t,ctr:n,ctrArgs:i,events:r,beforeCreate:o,afterCreate:c,props:u,...h}=s,p=`$${t}Promise`,f=`$${t}Object`;return wy(!(h.props instanceof Array),"`props` should be an object, not Array"),{...typeof GENERATE_DOC<"u"?{$vgmOptions:s}:{},mixins:[Ey],props:{...u,...sa(e)},render(){return""},provide(){const g=this.$mapPromise.then(m=>{this.$map=m;const E={...this.options,map:m,...ki(this,e)};if(delete E.options,o){const v=o.bind(this)(E);if(v instanceof Promise)return v.then(()=>({options:E}))}return{options:E}}).then(({options:m})=>{const E=n();return this[f]=i?new(Function.prototype.bind.call(E,null,...i(m,ki(this,u||{})))):new E(m),ta(this,this[f],e),Ju(this,this[f],r),c&&c.bind(this)(this[f]),this[f]});return this[p]=g,{[p]:g}},unmounted(){this[f]&&this[f].setMap&&this[f].setMap(null)},...h}}function wy(s,e){if(!s)throw new Error(e)}function sa(s){return Object.entries(s).map(([e,t])=>{const n={};return"type"in t&&(n.type=t.type),"default"in t&&(n.default=t.default),"required"in t&&(n.required=t.required),[e,n]}).reduce((e,[t,n])=>(e[t]=n,e),{})}const Ay={draggable:{type:Boolean},editable:{type:Boolean},options:{twoWay:!1,type:Object},path:{type:Array,twoWay:!0}},Sy=["click","dblclick","drag","dragend","dragstart","mousedown","mousemove","mouseout","mouseover","mouseup","rightclick"],Ty=Xt({mappedProps:Ay,props:{deepWatch:{type:Boolean,default:!1}},events:Sy,name:"polyline",ctr:()=>google.maps.Polyline,afterCreate(){let s=()=>{};this.$watch("path",e=>{if(e){s(),this.$polylineObject.setPath(e);const t=this.$polylineObject.getPath(),n=[],i=()=>{this.$emit("path_changed",this.$polylineObject.getPath())};n.push([t,t.addListener("insert_at",i)]),n.push([t,t.addListener("remove_at",i)]),n.push([t,t.addListener("set_at",i)]),s=()=>{n.map(([r,o])=>google.maps.event.removeListener(o))}}},{deep:this.deepWatch,immediate:!0})}}),Cy={draggable:{type:Boolean},editable:{type:Boolean},options:{type:Object},path:{type:Array,twoWay:!0,noBind:!0},paths:{type:Array,twoWay:!0,noBind:!0}},ky=["click","dblclick","drag","dragend","dragstart","mousedown","mousemove","mouseout","mouseover","mouseup","rightclick"],Oy=Xt({props:{deepWatch:{type:Boolean,default:!1}},events:ky,mappedProps:Cy,name:"polygon",ctr:()=>google.maps.Polygon,beforeCreate(s){s.path||delete s.path,s.paths||delete s.paths},afterCreate(s){let e=()=>{};this.$watch("paths",t=>{if(t){e(),s.setPaths(t);const n=()=>{this.$emit("paths_changed",s.getPaths())},i=[],r=s.getPaths();for(let o=0;o<r.getLength();o++){let c=r.getAt(o);i.push([c,c.addListener("insert_at",n)]),i.push([c,c.addListener("remove_at",n)]),i.push([c,c.addListener("set_at",n)])}i.push([r,r.addListener("insert_at",n)]),i.push([r,r.addListener("remove_at",n)]),i.push([r,r.addListener("set_at",n)]),e=()=>{i.map(([o,c])=>google.maps.event.removeListener(c))}}},{deep:this.deepWatch,immediate:!0}),this.$watch("path",t=>{if(t){e(),s.setPaths(t);const n=s.getPath(),i=[],r=()=>{this.$emit("path_changed",s.getPath())};i.push([n,n.addListener("insert_at",r)]),i.push([n,n.addListener("remove_at",r)]),i.push([n,n.addListener("set_at",r)]),e=()=>{i.map(([o,c])=>google.maps.event.removeListener(c))}}},{deep:this.deepWatch,immediate:!0})}}),Py={center:{type:Object,twoWay:!0,required:!0},radius:{type:Number,twoWay:!0},draggable:{type:Boolean,default:!1},editable:{type:Boolean,default:!1},options:{type:Object,twoWay:!1}},$y=["click","dblclick","drag","dragend","dragstart","mousedown","mousemove","mouseout","mouseover","mouseup","rightclick"],xy=Xt({mappedProps:Py,name:"circle",ctr:()=>google.maps.Circle,events:$y}),Ly={bounds:{type:Object,twoWay:!0},draggable:{type:Boolean,default:!1},editable:{type:Boolean,default:!1},options:{type:Object,twoWay:!1}},Iy=["click","dblclick","drag","dragend","dragstart","mousedown","mousemove","mouseout","mouseover","mouseup","rightclick"],Ry=Xt({mappedProps:Ly,name:"rectangle",ctr:()=>google.maps.Rectangle,events:Iy}),Dy={animation:{twoWay:!0,type:Number},attribution:{type:Object},clickable:{type:Boolean,twoWay:!0,default:!0},cursor:{type:String,twoWay:!0},draggable:{type:Boolean,twoWay:!0,default:!1},icon:{twoWay:!0},label:{},opacity:{type:Number,default:1},options:{type:Object},place:{type:Object},position:{type:Object,twoWay:!0},shape:{type:Object,twoWay:!0},title:{type:String,twoWay:!0},zIndex:{type:Number,twoWay:!0},visible:{twoWay:!0,default:!0}},Rr=["click","rightclick","dblclick","drag","dragstart","dragend","mouseup","mousedown","mouseover","mouseout"],Ny=Xt({mappedProps:Dy,events:Rr,name:"marker",ctr:()=>google.maps.Marker,inject:{$clusterPromise:{default:null}},emits:Rr,unmounted(){this.$markerObject&&(this.$clusterObject?this.$clusterObject.removeMarker(this.$markerObject,!0):this.$markerObject.setMap(null))},beforeCreate(s){return this.$clusterPromise&&(s.map=null),this.$clusterPromise},afterCreate(s){Rr.forEach(e=>{s.addListener(e,t=>{this.$emit(e,t)})}),this.$clusterPromise&&this.$clusterPromise.then(e=>{this.$clusterObject=e,e.addMarker(s)})}});function My(s,e,t,n,i,r){return Mn(),Nn("div",{onClick:e[0]||(e[0]=()=>{console.log("sdfsd")})},[$n(s.$slots,"default")])}const Fy=Fn(Ny,[["render",My]]);var By=function s(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return!1;var n,i,r;if(Array.isArray(e)){if(n=e.length,n!=t.length)return!1;for(i=n;i--!==0;)if(!s(e[i],t[i]))return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===t.toString();if(r=Object.keys(e),n=r.length,n!==Object.keys(t).length)return!1;for(i=n;i--!==0;)if(!Object.prototype.hasOwnProperty.call(t,r[i]))return!1;for(i=n;i--!==0;){var o=r[i];if(!s(e[o],t[o]))return!1}return!0}return e!==e&&t!==t};const Bl=qf(By),jl=[Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array],Dr=1,hn=8;class na{static from(e){if(!(e instanceof ArrayBuffer))throw new Error("Data must be an instance of ArrayBuffer.");const[t,n]=new Uint8Array(e,0,2);if(t!==219)throw new Error("Data does not appear to be in a KDBush format.");const i=n>>4;if(i!==Dr)throw new Error(`Got v${i} data when expected v${Dr}.`);const r=jl[n&15];if(!r)throw new Error("Unrecognized array type.");const[o]=new Uint16Array(e,2,1),[c]=new Uint32Array(e,4,1);return new na(c,o,r,e)}constructor(e,t=64,n=Float64Array,i){if(isNaN(e)||e<0)throw new Error(`Unpexpected numItems value: ${e}.`);this.numItems=+e,this.nodeSize=Math.min(Math.max(+t,2),65535),this.ArrayType=n,this.IndexArrayType=e<65536?Uint16Array:Uint32Array;const r=jl.indexOf(this.ArrayType),o=e*2*this.ArrayType.BYTES_PER_ELEMENT,c=e*this.IndexArrayType.BYTES_PER_ELEMENT,u=(8-c%8)%8;if(r<0)throw new Error(`Unexpected typed array class: ${n}.`);i&&i instanceof ArrayBuffer?(this.data=i,this.ids=new this.IndexArrayType(this.data,hn,e),this.coords=new this.ArrayType(this.data,hn+c+u,e*2),this._pos=e*2,this._finished=!0):(this.data=new ArrayBuffer(hn+o+c+u),this.ids=new this.IndexArrayType(this.data,hn,e),this.coords=new this.ArrayType(this.data,hn+c+u,e*2),this._pos=0,this._finished=!1,new Uint8Array(this.data,0,2).set([219,(Dr<<4)+r]),new Uint16Array(this.data,2,1)[0]=t,new Uint32Array(this.data,4,1)[0]=e)}add(e,t){const n=this._pos>>1;return this.ids[n]=n,this.coords[this._pos++]=e,this.coords[this._pos++]=t,n}finish(){const e=this._pos>>1;if(e!==this.numItems)throw new Error(`Added ${e} items when expected ${this.numItems}.`);return ao(this.ids,this.coords,this.nodeSize,0,this.numItems-1,0),this._finished=!0,this}range(e,t,n,i){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");const{ids:r,coords:o,nodeSize:c}=this,u=[0,r.length-1,0],h=[];for(;u.length;){const p=u.pop()||0,f=u.pop()||0,g=u.pop()||0;if(f-g<=c){for(let w=g;w<=f;w++){const S=o[2*w],C=o[2*w+1];S>=e&&S<=n&&C>=t&&C<=i&&h.push(r[w])}continue}const m=g+f>>1,E=o[2*m],v=o[2*m+1];E>=e&&E<=n&&v>=t&&v<=i&&h.push(r[m]),(p===0?e<=E:t<=v)&&(u.push(g),u.push(m-1),u.push(1-p)),(p===0?n>=E:i>=v)&&(u.push(m+1),u.push(f),u.push(1-p))}return h}within(e,t,n){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");const{ids:i,coords:r,nodeSize:o}=this,c=[0,i.length-1,0],u=[],h=n*n;for(;c.length;){const p=c.pop()||0,f=c.pop()||0,g=c.pop()||0;if(f-g<=o){for(let w=g;w<=f;w++)Hl(r[2*w],r[2*w+1],e,t)<=h&&u.push(i[w]);continue}const m=g+f>>1,E=r[2*m],v=r[2*m+1];Hl(E,v,e,t)<=h&&u.push(i[m]),(p===0?e-n<=E:t-n<=v)&&(c.push(g),c.push(m-1),c.push(1-p)),(p===0?e+n>=E:t+n>=v)&&(c.push(m+1),c.push(f),c.push(1-p))}return u}}function ao(s,e,t,n,i,r){if(i-n<=t)return;const o=n+i>>1;td(s,e,o,n,i,r),ao(s,e,t,n,o-1,1-r),ao(s,e,t,o+1,i,1-r)}function td(s,e,t,n,i,r){for(;i>n;){if(i-n>600){const h=i-n+1,p=t-n+1,f=Math.log(h),g=.5*Math.exp(2*f/3),m=.5*Math.sqrt(f*g*(h-g)/h)*(p-h/2<0?-1:1),E=Math.max(n,Math.floor(t-p*g/h+m)),v=Math.min(i,Math.floor(t+(h-p)*g/h+m));td(s,e,t,E,v,r)}const o=e[2*t+r];let c=n,u=i;for(pn(s,e,n,t),e[2*i+r]>o&&pn(s,e,n,i);c<u;){for(pn(s,e,c,u),c++,u--;e[2*c+r]<o;)c++;for(;e[2*u+r]>o;)u--}e[2*n+r]===o?pn(s,e,n,u):(u++,pn(s,e,u,i)),u<=t&&(n=u+1),t<=u&&(i=u-1)}}function pn(s,e,t,n){Nr(s,t,n),Nr(e,2*t,2*n),Nr(e,2*t+1,2*n+1)}function Nr(s,e,t){const n=s[e];s[e]=s[t],s[t]=n}function Hl(s,e,t,n){const i=s-t,r=e-n;return i*i+r*r}const jy={minZoom:0,maxZoom:16,minPoints:2,radius:40,extent:512,nodeSize:64,log:!1,generateId:!1,reduce:null,map:s=>s},Vl=Math.fround||(s=>e=>(s[0]=+e,s[0]))(new Float32Array(1)),ts=2,Nt=3,Mr=4,Dt=5,sd=6;class Hy{constructor(e){this.options=Object.assign(Object.create(jy),e),this.trees=new Array(this.options.maxZoom+1),this.stride=this.options.reduce?7:6,this.clusterProps=[]}load(e){const{log:t,minZoom:n,maxZoom:i}=this.options;t&&console.time("total time");const r=`prepare ${e.length} points`;t&&console.time(r),this.points=e;const o=[];for(let u=0;u<e.length;u++){const h=e[u];if(!h.geometry)continue;const[p,f]=h.geometry.coordinates,g=Vl(si(p)),m=Vl(ni(f));o.push(g,m,1/0,u,-1,1),this.options.reduce&&o.push(0)}let c=this.trees[i+1]=this._createTree(o);t&&console.timeEnd(r);for(let u=i;u>=n;u--){const h=+Date.now();c=this.trees[u]=this._createTree(this._cluster(c,u)),t&&console.log("z%d: %d clusters in %dms",u,c.numItems,+Date.now()-h)}return t&&console.timeEnd("total time"),this}getClusters(e,t){let n=((e[0]+180)%360+360)%360-180;const i=Math.max(-90,Math.min(90,e[1]));let r=e[2]===180?180:((e[2]+180)%360+360)%360-180;const o=Math.max(-90,Math.min(90,e[3]));if(e[2]-e[0]>=360)n=-180,r=180;else if(n>r){const f=this.getClusters([n,i,180,o],t),g=this.getClusters([-180,i,r,o],t);return f.concat(g)}const c=this.trees[this._limitZoom(t)],u=c.range(si(n),ni(o),si(r),ni(i)),h=c.data,p=[];for(const f of u){const g=this.stride*f;p.push(h[g+Dt]>1?Wl(h,g,this.clusterProps):this.points[h[g+Nt]])}return p}getChildren(e){const t=this._getOriginId(e),n=this._getOriginZoom(e),i="No cluster with the specified id.",r=this.trees[n];if(!r)throw new Error(i);const o=r.data;if(t*this.stride>=o.length)throw new Error(i);const c=this.options.radius/(this.options.extent*Math.pow(2,n-1)),u=o[t*this.stride],h=o[t*this.stride+1],p=r.within(u,h,c),f=[];for(const g of p){const m=g*this.stride;o[m+Mr]===e&&f.push(o[m+Dt]>1?Wl(o,m,this.clusterProps):this.points[o[m+Nt]])}if(f.length===0)throw new Error(i);return f}getLeaves(e,t,n){t=t||10,n=n||0;const i=[];return this._appendLeaves(i,e,t,n,0),i}getTile(e,t,n){const i=this.trees[this._limitZoom(e)],r=Math.pow(2,e),{extent:o,radius:c}=this.options,u=c/o,h=(n-u)/r,p=(n+1+u)/r,f={features:[]};return this._addTileFeatures(i.range((t-u)/r,h,(t+1+u)/r,p),i.data,t,n,r,f),t===0&&this._addTileFeatures(i.range(1-u/r,h,1,p),i.data,r,n,r,f),t===r-1&&this._addTileFeatures(i.range(0,h,u/r,p),i.data,-1,n,r,f),f.features.length?f:null}getClusterExpansionZoom(e){let t=this._getOriginZoom(e)-1;for(;t<=this.options.maxZoom;){const n=this.getChildren(e);if(t++,n.length!==1)break;e=n[0].properties.cluster_id}return t}_appendLeaves(e,t,n,i,r){const o=this.getChildren(t);for(const c of o){const u=c.properties;if(u&&u.cluster?r+u.point_count<=i?r+=u.point_count:r=this._appendLeaves(e,u.cluster_id,n,i,r):r<i?r++:e.push(c),e.length===n)break}return r}_createTree(e){const t=new na(e.length/this.stride|0,this.options.nodeSize,Float32Array);for(let n=0;n<e.length;n+=this.stride)t.add(e[n],e[n+1]);return t.finish(),t.data=e,t}_addTileFeatures(e,t,n,i,r,o){for(const c of e){const u=c*this.stride,h=t[u+Dt]>1;let p,f,g;if(h)p=nd(t,u,this.clusterProps),f=t[u],g=t[u+1];else{const v=this.points[t[u+Nt]];p=v.properties;const[w,S]=v.geometry.coordinates;f=si(w),g=ni(S)}const m={type:1,geometry:[[Math.round(this.options.extent*(f*r-n)),Math.round(this.options.extent*(g*r-i))]],tags:p};let E;h||this.options.generateId?E=t[u+Nt]:E=this.points[t[u+Nt]].id,E!==void 0&&(m.id=E),o.features.push(m)}}_limitZoom(e){return Math.max(this.options.minZoom,Math.min(Math.floor(+e),this.options.maxZoom+1))}_cluster(e,t){const{radius:n,extent:i,reduce:r,minPoints:o}=this.options,c=n/(i*Math.pow(2,t)),u=e.data,h=[],p=this.stride;for(let f=0;f<u.length;f+=p){if(u[f+ts]<=t)continue;u[f+ts]=t;const g=u[f],m=u[f+1],E=e.within(u[f],u[f+1],c),v=u[f+Dt];let w=v;for(const S of E){const C=S*p;u[C+ts]>t&&(w+=u[C+Dt])}if(w>v&&w>=o){let S=g*v,C=m*v,x,$=-1;const P=((f/p|0)<<5)+(t+1)+this.points.length;for(const j of E){const N=j*p;if(u[N+ts]<=t)continue;u[N+ts]=t;const O=u[N+Dt];S+=u[N]*O,C+=u[N+1]*O,u[N+Mr]=P,r&&(x||(x=this._map(u,f,!0),$=this.clusterProps.length,this.clusterProps.push(x)),r(x,this._map(u,N)))}u[f+Mr]=P,h.push(S/w,C/w,1/0,P,-1,w),r&&h.push($)}else{for(let S=0;S<p;S++)h.push(u[f+S]);if(w>1)for(const S of E){const C=S*p;if(!(u[C+ts]<=t)){u[C+ts]=t;for(let x=0;x<p;x++)h.push(u[C+x])}}}}return h}_getOriginId(e){return e-this.points.length>>5}_getOriginZoom(e){return(e-this.points.length)%32}_map(e,t,n){if(e[t+Dt]>1){const o=this.clusterProps[e[t+sd]];return n?Object.assign({},o):o}const i=this.points[e[t+Nt]].properties,r=this.options.map(i);return n&&r===i?Object.assign({},r):r}}function Wl(s,e,t){return{type:"Feature",id:s[e+Nt],properties:nd(s,e,t),geometry:{type:"Point",coordinates:[Vy(s[e]),Wy(s[e+1])]}}}function nd(s,e,t){const n=s[e+Dt],i=n>=1e4?`${Math.round(n/1e3)}k`:n>=1e3?`${Math.round(n/100)/10}k`:n,r=s[e+sd],o=r===-1?{}:Object.assign({},t[r]);return Object.assign(o,{cluster:!0,cluster_id:s[e+Nt],point_count:n,point_count_abbreviated:i})}function si(s){return s/360+.5}function ni(s){const e=Math.sin(s*Math.PI/180),t=.5-.25*Math.log((1+e)/(1-e))/Math.PI;return t<0?0:t>1?1:t}function Vy(s){return(s-.5)*360}function Wy(s){const e=(180-s*360)*Math.PI/180;return 360*Math.atan(Math.exp(e))/Math.PI-90}/*! *****************************************************************************
Copyright (c) Microsoft Corporation.

Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.

THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */function Uy(s,e){var t={};for(var n in s)Object.prototype.hasOwnProperty.call(s,n)&&e.indexOf(n)<0&&(t[n]=s[n]);if(s!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(s);i<n.length;i++)e.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(s,n[i])&&(t[n[i]]=s[n[i]]);return t}class qe{static isAdvancedMarkerAvailable(e){return google.maps.marker&&e.getMapCapabilities().isAdvancedMarkersAvailable===!0}static isAdvancedMarker(e){return google.maps.marker&&e instanceof google.maps.marker.AdvancedMarkerElement}static setMap(e,t){this.isAdvancedMarker(e)?e.map=t:e.setMap(t)}static getPosition(e){if(this.isAdvancedMarker(e)){if(e.position){if(e.position instanceof google.maps.LatLng)return e.position;if(e.position.lat&&e.position.lng)return new google.maps.LatLng(e.position.lat,e.position.lng)}return new google.maps.LatLng(null)}return e.getPosition()}static getVisible(e){return this.isAdvancedMarker(e)?!0:e.getVisible()}}class lo{constructor({markers:e,position:t}){this.markers=e,t&&(t instanceof google.maps.LatLng?this._position=t:this._position=new google.maps.LatLng(t))}get bounds(){if(this.markers.length===0&&!this._position)return;const e=new google.maps.LatLngBounds(this._position,this._position);for(const t of this.markers)e.extend(qe.getPosition(t));return e}get position(){return this._position||this.bounds.getCenter()}get count(){return this.markers.filter(e=>qe.getVisible(e)).length}push(e){this.markers.push(e)}delete(){this.marker&&(qe.setMap(this.marker,null),this.marker=void 0),this.markers.length=0}}class qy{constructor({maxZoom:e=16}){this.maxZoom=e}noop({markers:e}){return zy(e)}}const zy=s=>s.map(t=>new lo({position:qe.getPosition(t),markers:[t]}));class Ky extends qy{constructor(e){var{maxZoom:t,radius:n=60}=e,i=Uy(e,["maxZoom","radius"]);super({maxZoom:t}),this.state={zoom:-1},this.superCluster=new Hy(Object.assign({maxZoom:this.maxZoom,radius:n},i))}calculate(e){let t=!1;const n={zoom:e.map.getZoom()};if(!Bl(e.markers,this.markers)){t=!0,this.markers=[...e.markers];const i=this.markers.map(r=>{const o=qe.getPosition(r);return{type:"Feature",geometry:{type:"Point",coordinates:[o.lng(),o.lat()]},properties:{marker:r}}});this.superCluster.load(i)}return t||(this.state.zoom<=this.maxZoom||n.zoom<=this.maxZoom)&&(t=!Bl(this.state,n)),this.state=n,t&&(this.clusters=this.cluster(e)),{clusters:this.clusters,changed:t}}cluster({map:e}){return this.superCluster.getClusters([-180,-90,180,90],Math.round(e.getZoom())).map(t=>this.transformCluster(t))}transformCluster({geometry:{coordinates:[e,t]},properties:n}){if(n.cluster)return new lo({markers:this.superCluster.getLeaves(n.cluster_id,1/0).map(r=>r.properties.marker),position:{lat:t,lng:e}});const i=n.marker;return new lo({markers:[i],position:qe.getPosition(i)})}}class Gy{constructor(e,t){this.markers={sum:e.length};const n=t.map(r=>r.count),i=n.reduce((r,o)=>r+o,0);this.clusters={count:t.length,markers:{mean:i/t.length,sum:i,min:Math.min(...n),max:Math.max(...n)}}}}class Yy{render({count:e,position:t},n,i){const o=`<svg fill="${e>Math.max(10,n.clusters.markers.mean)?"#ff0000":"#0000ff"}" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 240 240" width="50" height="50">
<circle cx="120" cy="120" opacity=".6" r="70" />
<circle cx="120" cy="120" opacity=".3" r="90" />
<circle cx="120" cy="120" opacity=".2" r="110" />
<text x="50%" y="50%" style="fill:#fff" text-anchor="middle" font-size="50" dominant-baseline="middle" font-family="roboto,arial,sans-serif">${e}</text>
</svg>`,c=`Cluster of ${e} markers`,u=Number(google.maps.Marker.MAX_ZINDEX)+e;if(qe.isAdvancedMarkerAvailable(i)){const f=new DOMParser().parseFromString(o,"image/svg+xml").documentElement;f.setAttribute("transform","translate(0 25)");const g={map:i,position:t,zIndex:u,title:c,content:f};return new google.maps.marker.AdvancedMarkerElement(g)}const h={position:t,zIndex:u,title:c,icon:{url:`data:image/svg+xml;base64,${btoa(o)}`,anchor:new google.maps.Point(25,25)}};return new google.maps.Marker(h)}}function Zy(s,e){for(let t in e.prototype)s.prototype[t]=e.prototype[t]}class ia{constructor(){Zy(ia,google.maps.OverlayView)}}var Tn;(function(s){s.CLUSTERING_BEGIN="clusteringbegin",s.CLUSTERING_END="clusteringend",s.CLUSTER_CLICK="click"})(Tn||(Tn={}));const Xy=(s,e,t)=>{t.fitBounds(e.bounds)};class Ul extends ia{constructor({map:e,markers:t=[],algorithmOptions:n={},algorithm:i=new Ky(n),renderer:r=new Yy,onClusterClick:o=Xy}){super(),this.markers=[...t],this.clusters=[],this.algorithm=i,this.renderer=r,this.onClusterClick=o,e&&this.setMap(e)}addMarker(e,t){this.markers.includes(e)||(this.markers.push(e),t||this.render())}addMarkers(e,t){e.forEach(n=>{this.addMarker(n,!0)}),t||this.render()}removeMarker(e,t){const n=this.markers.indexOf(e);return n===-1?!1:(qe.setMap(e,null),this.markers.splice(n,1),t||this.render(),!0)}removeMarkers(e,t){let n=!1;return e.forEach(i=>{n=this.removeMarker(i,!0)||n}),n&&!t&&this.render(),n}clearMarkers(e){this.markers.length=0,e||this.render()}render(){const e=this.getMap();if(e instanceof google.maps.Map&&e.getProjection()){google.maps.event.trigger(this,Tn.CLUSTERING_BEGIN,this);const{clusters:t,changed:n}=this.algorithm.calculate({markers:this.markers,map:e,mapCanvasProjection:this.getProjection()});if(n||n==null){const i=new Set;for(const o of t)o.markers.length==1&&i.add(o.markers[0]);const r=[];for(const o of this.clusters)o.marker!=null&&(o.markers.length==1?i.has(o.marker)||qe.setMap(o.marker,null):r.push(o.marker));this.clusters=t,this.renderClusters(),requestAnimationFrame(()=>r.forEach(o=>qe.setMap(o,null)))}google.maps.event.trigger(this,Tn.CLUSTERING_END,this)}}onAdd(){this.idleListener=this.getMap().addListener("idle",this.render.bind(this)),this.render()}onRemove(){google.maps.event.removeListener(this.idleListener),this.reset()}reset(){this.markers.forEach(e=>qe.setMap(e,null)),this.clusters.forEach(e=>e.delete()),this.clusters=[]}renderClusters(){const e=new Gy(this.markers,this.clusters),t=this.getMap();this.clusters.forEach(n=>{n.markers.length===1?n.marker=n.markers[0]:(n.marker=this.renderer.render(n,e,t),n.markers.forEach(i=>qe.setMap(i,null)),this.onClusterClick&&n.marker.addListener("click",i=>{google.maps.event.trigger(this,Tn.CLUSTER_CLICK,n),this.onClusterClick(i,n,t)})),qe.setMap(n.marker,t)})}}const Fr={maxZoom:{type:Number,twoWay:!1},batchSizeIE:{type:Number,twoWay:!1},calculator:{type:Function,twoWay:!1},enableRetinaIcons:{type:Boolean,twoWay:!1},gridSize:{type:Number,twoWay:!1},ignoreHidden:{type:Boolean,twoWay:!1},imageExtension:{type:String,twoWay:!1},imagePath:{type:String,twoWay:!1},imageSizes:{type:Array,twoWay:!1},minimumClusterSize:{type:Number,twoWay:!1},styles:{type:Array,twoWay:!1},zoomOnClick:{type:Boolean,twoWay:!1}},Qy=["click","rightclick","dblclick","drag","dragstart","dragend","mouseup","mousedown","mouseover","mouseout"],Jy=Xt({mappedProps:Fr,events:Qy,name:"cluster",ctr:()=>{if(typeof Ul>"u"){const s="MarkerClusterer is not installed!";throw console.error(s),new Error(s)}return Ul},ctrArgs:({map:s,...e})=>[s,[],e],afterCreate(s){const e=()=>{const t=s.getMarkers();s.clearMarkers(),s.addMarkers(t)};for(let t in Fr)Fr[t].twoWay&&this.$on(t.toLowerCase()+"_changed",e)},updated(){this.$clusterObject&&this.$clusterObject.repaint()},beforeUnmount(){this.$children&&this.$children.length&&this.$children.forEach(s=>{s.$clusterObject===this.$clusterObject&&(s.$clusterObject=null)}),this.$clusterObject&&this.$clusterObject.clearMarkers()}});function e0(s,e,t,n,i,r){return Mn(),Nn("div",null,[$n(s.$slots,"default")])}const t0=Fn(Jy,[["render",e0]]),s0={options:{type:Object,required:!1,default(){return{}}},position:{type:Object,twoWay:!0},zIndex:{type:Number,twoWay:!0}},n0=["domready","click","closeclick","content_changed"],i0=Xt({mappedProps:s0,events:n0,name:"infoWindow",ctr:()=>google.maps.InfoWindow,props:{opened:{type:Boolean,default:!0}},inject:{$markerPromise:{default:null}},mounted(){const s=this.$refs.infoWindow;s.parentNode.removeChild(s)},beforeCreate(s){if(s.content=this.$refs.infoWindow,this.$markerPromise)return delete s.position,this.$markerPromise.then(e=>(this.$markerObject=e,e))},emits:["closeclick"],methods:{_openInfoWindow(){this.$infoWindowObject.close(),this.opened?this.$infoWindowObject.open(this.$map,this.$markerObject):this.$emit("closeclick")}},afterCreate(){this._openInfoWindow(),this.$watch("opened",()=>{this._openInfoWindow()})}}),r0={ref:"infoWindow"};function o0(s,e,t,n,i,r){return Mn(),Nn("div",r0,[$n(s.$slots,"default")],512)}const a0=Fn(i0,[["render",o0]]),l0={props:["resizeBus"],data(){return{_actualResizeBus:null}},created(){typeof this.resizeBus>"u"?this.$data._actualResizeBus=this.$gmapDefaultResizeBus:this.$data._actualResizeBus=this.resizeBus},methods:{_resizeCallback(){this.resize()},isFunction(s){return s&&{}.toString.call(s)==="[object Function]"},_delayedResizeCallback(){this.$nextTick(()=>this._resizeCallback())}},watch:{resizeBus(s){this.$data._actualResizeBus=s},"$data._actualResizeBus"(s,e){e&&e.$off("resize",this._delayedResizeCallback)}},unmounted(){this.$data._actualResizeBus&&this.isFunction(this.$data._actualResizeBus.$off)&&this.$data._actualResizeBus.$off("resize",this._delayedResizeCallback)}};function c0(s){let e=0;s(()=>{e+=1},()=>{e=Math.max(0,e-1)},()=>e===0)}const Br={center:{required:!0,twoWay:!0,type:Object,noBind:!0},zoom:{required:!1,twoWay:!0,type:Number,noBind:!0},heading:{type:Number,twoWay:!0},mapTypeId:{twoWay:!0,type:String},tilt:{twoWay:!0,type:Number},options:{type:Object,default(){return{}}}},ql=["bounds_changed","click","dblclick","drag","dragend","dragstart","idle","mousemove","mouseout","mouseover","resize","rightclick","tilesloaded"],u0=["panBy","panTo","panToBounds","fitBounds"].reduce((s,e)=>(s[e]=function(){this.$mapObject&&this.$mapObject[e].apply(this.$mapObject,arguments)},s),{}),d0={resize(){this.$mapObject&&google.maps.event.trigger(this.$mapObject,"resize")},resizePreserveCenter(){if(!this.$mapObject)return;const s=this.$mapObject.getCenter();google.maps.event.trigger(this.$mapObject,"resize"),this.$mapObject.setCenter(s)},_resizeCallback(){this.resizePreserveCenter()}},h0={mixins:[l0],props:sa({...Br,...ql.reduce((s,e)=>({...s,[`on${e.charAt(0).toUpperCase()}${e.slice(1)}`.replace(/[-_]+(.)?/g,(t,n)=>n?n.toUpperCase():"")]:Function}),{})}),inheritAttrs:!1,provide(){return this.$mapPromise=new Promise((s,e)=>{this.$mapPromiseDeferred={resolve:s,reject:e}}),{$mapPromise:this.$mapPromise}},emits:["center_changed","zoom_changed","bounds_changed"],computed:{finalLat(){return this.center&&typeof this.center.lat=="function"?this.center.lat():this.center.lat},finalLng(){return this.center&&typeof this.center.lng=="function"?this.center.lng():this.center.lng},finalLatLng(){return{lat:this.finalLat,lng:this.finalLng}}},watch:{zoom(s){this.$mapObject&&this.$mapObject.setZoom(s)}},mounted(){return this.$gmapApiPromiseLazy().then(()=>{const s=this.$refs["vue-map"],e={...this.options,...ki(this,Br)};return delete e.options,this.$mapObject=new google.maps.Map(s,e),ta(this,this.$mapObject,Br),Ju(this,this.$mapObject,ql),c0((t,n,i)=>{this.$mapObject.addListener("center_changed",()=>{i()&&this.$emit("center_changed",this.$mapObject.getCenter()),n()}),ed(this,["finalLat","finalLng"],()=>{t(),this.$mapObject.setCenter(this.finalLatLng)})}),this.$mapObject.addListener("zoom_changed",()=>{this.$emit("zoom_changed",this.$mapObject.getZoom())}),this.$mapObject.addListener("bounds_changed",()=>{this.$emit("bounds_changed",this.$mapObject.getBounds())}),this.$mapPromiseDeferred.resolve(this.$mapObject),this.$mapObject}).catch(s=>{throw s})},methods:{...d0,...u0}},p0={class:"vue-map-hidden"};function f0(s,e,t,n,i,r){return Mn(),Nn("div",{class:Kf(["vue-map-container",s.$attrs.class])},[Ya("div",{ref:"vue-map",class:"vue-map",style:zf(s.$attrs.style?s.$attrs.style:"")},null,4),Ya("div",p0,[$n(s.$slots,"default")]),$n(s.$slots,"visible")],2)}const g0=Fn(h0,[["render",f0]]),_0={options:{type:Object,twoWay:!1,default:()=>{}},data:{type:Array,twoWay:!0}},m0=[],v0=Xt({mappedProps:_0,name:"heatmap",ctr:()=>google.maps.visualization.HeatmapLayer,events:m0}),b0=s=>{const e=s.addEventListener?s.addEventListener:s.attachEvent;function t(n,i){if(n==="keydown"){const r=i;i=function(o){const c=document.getElementsByClassName("pac-item-selected").length>0;if(o.which===13&&!c){const u=document.createEvent("Event");u.keyCode=40,u.which=40,r.apply(s,[u])}r.apply(s,[o])}}e.apply(s,[n,i])}s.addEventListener=t,s.attachEvent=t},jr={bounds:{type:Object},componentRestrictions:{type:Object,noBind:!0},types:{type:Array,default:function(){return[]}}},y0={selectFirstOnEnter:{required:!1,type:Boolean,default:!1},options:{type:Object}},E0={mounted(){this.$gmapApiPromiseLazy().then(()=>{if(this.selectFirstOnEnter&&b0(this.$refs.input),typeof google.maps.places.Autocomplete!="function")throw new Error("google.maps.places.Autocomplete is undefined. Did you add 'places' to libraries when loading Google Maps?");const s={...ki(this,jr),...this.options};this.$autocomplete=new google.maps.places.Autocomplete(this.$refs.input,s),ta(this,this.$autocomplete,jr),this.$watch("componentRestrictions",e=>{e!==void 0&&this.$autocomplete.setComponentRestrictions(e)}),this.$autocomplete.addListener("place_changed",()=>{this.$emit("place_changed",this.$autocomplete.getPlace())})})},props:{...sa(jr),...y0}};function w0(s,e,t,n,i,r){return Mn(),Nn("input",Gf({ref:"input"},s.$attrs,Yf(s.$attrs,!0)),null,16)}const A0=Fn(E0,[["render",w0]]);let id=null;function S0(s,e){e={installComponents:!0,autobindAllEvents:!1,...e},id=Zr({data:function(){return{gmapApi:null}}});const t=Zr();let n=T0(e);s.mixin({created(){this.$gmapDefaultResizeBus=t,this.$gmapOptions=e,this.$gmapApiPromiseLazy=n}}),s.$gmapDefaultResizeBus=t,s.$gmapApiPromiseLazy=n,e.installComponents&&(s.component("GMapMap",g0),s.component("GMapMarker",Fy),s.component("GMapInfoWindow",a0),s.component("GMapCluster",t0),s.component("GMapPolyline",Ty),s.component("GMapPolygon",Oy),s.component("GMapCircle",xy),s.component("GMapRectangle",Ry),s.component("GMapAutocomplete",A0),s.component("GMapHeatmap",v0))}function T0(s){function e(){return id.gmapApi={},window.google}if(s.load)return Nl(()=>oo.isServer()?new Promise(()=>{}).then(e):new Promise((t,n)=>{try{window.vueGoogleMapsInit=t,yy(s.load)}catch(i){n(i)}}).then(e));{const t=new Promise(n=>{oo.isServer()||(window.vueGoogleMapsInit=n)}).then(e);return Nl(()=>t)}}const ii={BASKET_ADD:"BASKET_ADD",BASKET_DEC:"BASKET_DEC",BASKET_DESTROY:"BASKET_DESTROY",BASKET_INC:"BASKET_INC",BASKET_LOAD:"BASKET_LOAD",BASKET_REMOVE:"BASKET_REMOVE",BASKET_UPDATE:"BASKET_UPDATE",BASKET_CHANGED:"BASKET_CHANGED",PRODUCT_ADD_MODAL:"PRODUCT_ADD_MODAL",PRODUCT_HIDE_MODAL:"PRODUCT_HIDE_MODAL",BASKET_SHOW_MODAL:"BASKET_SHOW_MODAL",BASKET_HIDE_MODAL:"BASKET_HIDE_MODAL",CATEGORY_UPDATE:"CATEGORY_UPDATE",CHECKOUT_ERROR:"CHECKOUT_ERROR"},C0=ig("basket",{state:()=>({data:null,current_delivery:null,delivery:null,errors:{},working:!1,error:!1,calculate_delivery:Date.now()}),actions:{init(s){this.data=s},setDelevery(s){this.delivery=s,this.calculate()},hasItems(){return!!(this.data&&this.data.total_items>0)},calculate(){alert()},getBasket(){this.working=!0,fetch("/basket/content").then(s=>s.json()).then(s=>{this.data=s,this.working=!1})},async demo(s){const e=await Zf("/basket/demo/"+s);this.data=e.data,this.working=!1},Remove(s){if(this.working){console.log("Function is already running.");return}this.working=!0,Http.get(`/basket/${s}/remove`).then(e=>{this.data=e,this.working=!1,this.emitter.emit(ii.BASKET_REMOVE,{})})},Inc(s){if(this.working){console.log("Function is already running.");return}this.working=!0,Http.get(`/basket/${s}/inc`).then(e=>{this.data=e,this.working=!1,this.emitter.emit(ii.BASKET_INC,{})})},Dec(s){if(this.working){console.log("Function is already running.");return}this.working=!0,Http.get(`/basket/${s}/dec`).then(e=>{this.data=e,this.working=!1,this.emitter.emit(ii.BASKET_DEC,{})})},Destroy(){if(this.working){console.log("Function is already running.");return}this.working=!0,Http.get("/basket/destroy").then(s=>{this.data=s,this.working=!1,this.emitter.emit(ii.BASKET_DESTROY,{})})},addOrder(s){this.working=!0,Http.post("/basket/add/order",s).then(e=>{document.location.href=e.route})}}}),y=typeof window<"u"?window:void 0,Me=typeof globalThis<"u"?globalThis:y,rd=Array.prototype,zl=rd.forEach,Kl=rd.indexOf,Ke=Me==null?void 0:Me.navigator,D=Me==null?void 0:Me.document,De=Me==null?void 0:Me.location,ra=Me==null?void 0:Me.fetch,oa=Me!=null&&Me.XMLHttpRequest&&"withCredentials"in new Me.XMLHttpRequest?Me.XMLHttpRequest:void 0,Gl=Me==null?void 0:Me.AbortController,be=Ke==null?void 0:Ke.userAgent,K=y??{},Mt={DEBUG:!1,LIB_VERSION:"1.176.0"},k0=Array.isArray,od=Object.prototype,ad=od.hasOwnProperty,er=od.toString,fe=k0||function(s){return er.call(s)==="[object Array]"},Qe=function(s){return typeof s=="function"},de=function(s){return s===Object(s)&&!fe(s)},bi=function(s){if(de(s)){for(const e in s)if(ad.call(s,e))return!1;return!0}return!1},M=function(s){return s===void 0},Ce=function(s){return er.call(s)=="[object String]"},Yl=function(s){return Ce(s)&&s.trim().length===0},Qt=function(s){return s===null},oe=function(s){return M(s)||Qt(s)},ze=function(s){return er.call(s)=="[object Number]"},us=function(s){return er.call(s)==="[object Boolean]"},O0=s=>s instanceof FormData,Zl="[PostHog.js]",A={_log:function(s){if(y&&(Mt.DEBUG||K.POSTHOG_DEBUG)&&!M(y.console)&&y.console){const i="__rrweb_original__"in y.console[s]?y.console[s].__rrweb_original__:y.console[s];for(var e=arguments.length,t=new Array(e>1?e-1:0),n=1;n<e;n++)t[n-1]=arguments[n];i(Zl,...t)}},info:function(){for(var s=arguments.length,e=new Array(s),t=0;t<s;t++)e[t]=arguments[t];A._log("log",...e)},warn:function(){for(var s=arguments.length,e=new Array(s),t=0;t<s;t++)e[t]=arguments[t];A._log("warn",...e)},error:function(){for(var s=arguments.length,e=new Array(s),t=0;t<s;t++)e[t]=arguments[t];A._log("error",...e)},critical:function(){for(var s=arguments.length,e=new Array(s),t=0;t<s;t++)e[t]=arguments[t];console.error(Zl,...e)},uninitializedWarning:s=>{A.error(`You must initialize PostHog before calling ${s}`)}},Xl=(s,e,t)=>{if(s.config.disable_external_dependency_loading)return A.warn(`${e} was requested but loading of external scripts is disabled.`),t("Loading of external scripts is disabled");const n=()=>{if(!D)return t("document not found");const i=D.createElement("script");i.type="text/javascript",i.crossOrigin="anonymous",i.src=e,i.onload=c=>t(void 0,c),i.onerror=c=>t(c);const r=D.querySelectorAll("body > script");var o;r.length>0?(o=r[0].parentNode)===null||o===void 0||o.insertBefore(i,r[0]):D.body.appendChild(i)};D!=null&&D.body?n():D==null||D.addEventListener("DOMContentLoaded",n)};K.__PosthogExtensions__=K.__PosthogExtensions__||{},K.__PosthogExtensions__.loadExternalDependency=(s,e,t)=>{let n=`/static/${e}.js?v=${s.version}`;e==="toolbar"&&(n=`${n}?&=${Math.floor(Date.now()/3e5)*3e5}`);const i=s.requestRouter.endpointFor("assets",n);Xl(s,i,t)},K.__PosthogExtensions__.loadSiteApp=(s,e,t)=>{const n=s.requestRouter.endpointFor("api",e);Xl(s,n,t)};const Oi={},tr=function(s){return s.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")};function Fs(s,e,t){if(fe(s)){if(zl&&s.forEach===zl)s.forEach(e,t);else if("length"in s&&s.length===+s.length){for(let n=0,i=s.length;n<i;n++)if(n in s&&e.call(t,s[n],n)===Oi)return}}}function J(s,e,t){if(!oe(s)){if(fe(s))return Fs(s,e,t);if(O0(s)){for(const n of s.entries())if(e.call(t,n[1],n[0])===Oi)return}else for(const n in s)if(ad.call(s,n)&&e.call(t,s[n],n)===Oi)return}}const xe=function(s){for(var e=arguments.length,t=new Array(e>1?e-1:0),n=1;n<e;n++)t[n-1]=arguments[n];return Fs(t,function(i){for(const r in i)i[r]!==void 0&&(s[r]=i[r])}),s};function Y(s,e){return s.indexOf(e)!==-1}function yi(s){const e=Object.keys(s);let t=e.length;const n=new Array(t);for(;t--;)n[t]=[e[t],s[e[t]]];return n}const Ql=function(s){try{return s()}catch{return}},P0=function(s){return function(){try{for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return s.apply(this,t)}catch(i){A.critical("Implementation error. Please turn on debug mode and open a ticket on https://app.posthog.com/home#panel=support%3Asupport%3A."),A.critical(i)}}},co=function(s){const e={};return J(s,function(t,n){Ce(t)&&t.length>0&&(e[n]=t)}),e},uo=function(s){return s.replace(/^\$/,"")};function $0(s,e){return function(t,n){const i=new Set;return function r(o,c){if(o!==Object(o))return n?n(o,c):o;if(i.has(o))return;let u;return i.add(o),fe(o)?(u=[],Fs(o,h=>{u.push(r(h))})):(u={},J(o,(h,p)=>{i.has(h)||(u[p]=r(h,p))})),u}(t)}(s,t=>Ce(t)&&!Qt(e)?t.slice(0,e):t)}const x0=function(s){let e,t,n,i="",r=0;for(e=t=0,r=(s=(s+"").replace(/\r\n/g,`
`).replace(/\r/g,`
`)).length,n=0;n<r;n++){const o=s.charCodeAt(n);let c=null;o<128?t++:c=o>127&&o<2048?String.fromCharCode(o>>6|192,63&o|128):String.fromCharCode(o>>12|224,o>>6&63|128,63&o|128),Qt(c)||(t>e&&(i+=s.substring(e,t)),i+=c,e=t=n+1)}return t>e&&(i+=s.substring(e,s.length)),i},yt=function(){function s(e){return e&&(e.preventDefault=s.preventDefault,e.stopPropagation=s.stopPropagation),e}return s.preventDefault=function(){this.returnValue=!1},s.stopPropagation=function(){this.cancelBubble=!0},function(e,t,n,i,r){if(e)if(e.addEventListener&&!i)e.addEventListener(t,n,!!r);else{const o="on"+t,c=e[o];e[o]=function(u,h,p){return function(f){if(!(f=f||s(y==null?void 0:y.event)))return;let g,m=!0;Qe(p)&&(g=p(f));const E=h.call(u,f);return g!==!1&&E!==!1||(m=!1),m}}(e,n,c)}else A.error("No valid element provided to register_event")}}();function L0(s){const e=s==null?void 0:s.hostname;return!!Ce(e)&&e.split(".").slice(-2).join(".")!=="herokuapp.com"}function ld(s,e){for(let t=0;t<s.length;t++)if(e(s[t]))return s[t]}let ct;(function(s){s.GZipJS="gzip-js",s.Base64="base64"})(ct||(ct={}));const cd="$people_distinct_id",vn="__alias",bn="__timers",Jl="$autocapture_disabled_server_side",ho="$heatmaps_enabled_server_side",ec="$exception_capture_enabled_server_side",tc="$exception_capture_endpoint_suffix",sc="$web_vitals_enabled_server_side",nc="$web_vitals_allowed_metrics",po="$session_recording_enabled_server_side",ic="$console_log_recording_enabled_server_side",rc="$session_recording_network_payload_capture",oc="$session_recording_canvas_recording",ac="$replay_sample_rate",lc="$replay_minimum_duration",Pi="$sesid",yn="$session_is_sampled",ri="$session_recording_url_trigger_activated_session",oi="$session_recording_url_trigger_status",Ns="$enabled_feature_flags",fo="$early_access_features",Ms="$stored_person_properties",Ft="$stored_group_properties",go="$surveys",ai="$surveys_activated",$i="$flag_call_reported",vt="$user_state",_o="$client_session_props",mo="$capture_rate_limit",vo="$initial_campaign_params",bo="$initial_referrer_info",cc="$initial_person_info",xi="$epp",yo="__POSTHOG_TOOLBAR__",I0=[cd,vn,"__cmpns",bn,po,ho,Pi,Ns,vt,fo,Ft,Ms,go,$i,_o,mo,vo,bo,xi],Hr="$active_feature_flags",li="$override_feature_flags",uc="$feature_flag_payloads",dc=s=>{const e={};for(const[t,n]of yi(s||{}))n&&(e[t]=n);return e};class R0{constructor(e){this.instance=e,this._override_warning=!1,this.featureFlagEventHandlers=[],this.reloadFeatureFlagsQueued=!1,this.reloadFeatureFlagsInAction=!1}getFlags(){return Object.keys(this.getFlagVariants())}getFlagVariants(){const e=this.instance.get_property(Ns),t=this.instance.get_property(li);if(!t)return e||{};const n=xe({},e),i=Object.keys(t);for(let r=0;r<i.length;r++)n[i[r]]=t[i[r]];return this._override_warning||(A.warn(" Overriding feature flags!",{enabledFlags:e,overriddenFlags:t,finalFlags:n}),this._override_warning=!0),n}getFlagPayloads(){return this.instance.get_property(uc)||{}}reloadFeatureFlags(){this.reloadFeatureFlagsQueued||(this.reloadFeatureFlagsQueued=!0,this._startReloadTimer())}setAnonymousDistinctId(e){this.$anon_distinct_id=e}setReloadingPaused(e){this.reloadFeatureFlagsInAction=e}resetRequestQueue(){this.reloadFeatureFlagsQueued=!1}_startReloadTimer(){this.reloadFeatureFlagsQueued&&!this.reloadFeatureFlagsInAction&&setTimeout(()=>{!this.reloadFeatureFlagsInAction&&this.reloadFeatureFlagsQueued&&(this.reloadFeatureFlagsQueued=!1,this._reloadFeatureFlagsRequest())},5)}_reloadFeatureFlagsRequest(){if(this.instance.config.advanced_disable_feature_flags)return;this.setReloadingPaused(!0);const e=this.instance.config.token,t=this.instance.get_property(Ms),n=this.instance.get_property(Ft),i={token:e,distinct_id:this.instance.get_distinct_id(),groups:this.instance.getGroups(),$anon_distinct_id:this.$anon_distinct_id,person_properties:t,group_properties:n,disable_flags:this.instance.config.advanced_disable_feature_flags||void 0};this.instance._send_request({method:"POST",url:this.instance.requestRouter.endpointFor("api","/decide/?v=3"),data:i,compression:this.instance.config.disable_compression?void 0:ct.Base64,timeout:this.instance.config.feature_flag_request_timeout_ms,callback:r=>{var o;this.setReloadingPaused(!1);let c=!0;r.statusCode===200&&(this.$anon_distinct_id=void 0,c=!1),this.receivedFeatureFlags((o=r.json)!==null&&o!==void 0?o:{},c),this._startReloadTimer()}})}getFeatureFlag(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!(this.instance.decideEndpointWasHit||this.getFlags()&&this.getFlags().length>0))return void A.warn('getFeatureFlag for key "'+e+`" failed. Feature flags didn't load in time.`);const n=this.getFlagVariants()[e],i=`${n}`,r=this.instance.get_property($i)||{};var o;return!t.send_event&&"send_event"in t||e in r&&r[e].includes(i)||(fe(r[e])?r[e].push(i):r[e]=[i],(o=this.instance.persistence)===null||o===void 0||o.register({[$i]:r}),this.instance.capture("$feature_flag_called",{$feature_flag:e,$feature_flag_response:n})),n}getFeatureFlagPayload(e){return this.getFlagPayloads()[e]}isFeatureEnabled(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(this.instance.decideEndpointWasHit||this.getFlags()&&this.getFlags().length>0)return!!this.getFeatureFlag(e,t);A.warn('isFeatureEnabled for key "'+e+`" failed. Feature flags didn't load in time.`)}addFeatureFlagsHandler(e){this.featureFlagEventHandlers.push(e)}removeFeatureFlagsHandler(e){this.featureFlagEventHandlers=this.featureFlagEventHandlers.filter(t=>t!==e)}receivedFeatureFlags(e,t){if(!this.instance.persistence)return;this.instance.decideEndpointWasHit=!0;const n=this.getFlagVariants(),i=this.getFlagPayloads();(function(r,o){let c=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},u=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const h=r.featureFlags,p=r.featureFlagPayloads;if(!h)return;if(fe(h)){const m={};if(h)for(let E=0;E<h.length;E++)m[h[E]]=!0;return void(o&&o.register({[Hr]:h,[Ns]:m}))}let f=h,g=p;r.errorsWhileComputingFlags&&(f={...c,...f},g={...u,...g}),o&&o.register({[Hr]:Object.keys(dc(f)),[Ns]:f||{},[uc]:g||{}})})(e,this.instance.persistence,n,i),this._fireFeatureFlagsCallbacks(t)}override(e){let t=arguments.length>1&&arguments[1]!==void 0&&arguments[1];if(!this.instance.__loaded||!this.instance.persistence)return A.uninitializedWarning("posthog.feature_flags.override");if(this._override_warning=t,e===!1)this.instance.persistence.unregister(li);else if(fe(e)){const n={};for(let i=0;i<e.length;i++)n[e[i]]=!0;this.instance.persistence.register({[li]:n})}else this.instance.persistence.register({[li]:e})}onFeatureFlags(e){if(this.addFeatureFlagsHandler(e),this.instance.decideEndpointWasHit){const{flags:t,flagVariants:n}=this._prepareFeatureFlagsForCallbacks();e(t,n)}return()=>this.removeFeatureFlagsHandler(e)}updateEarlyAccessFeatureEnrollment(e,t){var n;const i={[`$feature_enrollment/${e}`]:t};this.instance.capture("$feature_enrollment_update",{$feature_flag:e,$feature_enrollment:t,$set:i}),this.setPersonPropertiesForFlags(i,!1);const r={...this.getFlagVariants(),[e]:t};(n=this.instance.persistence)===null||n===void 0||n.register({[Hr]:Object.keys(dc(r)),[Ns]:r}),this._fireFeatureFlagsCallbacks()}getEarlyAccessFeatures(e){let t=arguments.length>1&&arguments[1]!==void 0&&arguments[1];const n=this.instance.get_property(fo);if(n&&!t)return e(n);this.instance._send_request({transport:"XHR",url:this.instance.requestRouter.endpointFor("api",`/api/early_access_features/?token=${this.instance.config.token}`),method:"GET",callback:i=>{var r;if(!i.json)return;const o=i.json.earlyAccessFeatures;return(r=this.instance.persistence)===null||r===void 0||r.register({[fo]:o}),e(o)}})}_prepareFeatureFlagsForCallbacks(){const e=this.getFlags(),t=this.getFlagVariants();return{flags:e.filter(n=>t[n]),flagVariants:Object.keys(t).filter(n=>t[n]).reduce((n,i)=>(n[i]=t[i],n),{})}}_fireFeatureFlagsCallbacks(e){const{flags:t,flagVariants:n}=this._prepareFeatureFlagsForCallbacks();this.featureFlagEventHandlers.forEach(i=>i(t,n,{errorsLoading:e}))}setPersonPropertiesForFlags(e){let t=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1];const n=this.instance.get_property(Ms)||{};this.instance.register({[Ms]:{...n,...e}}),t&&this.instance.reloadFeatureFlags()}resetPersonPropertiesForFlags(){this.instance.unregister(Ms)}setGroupPropertiesForFlags(e){let t=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1];const n=this.instance.get_property(Ft)||{};Object.keys(n).length!==0&&Object.keys(n).forEach(i=>{n[i]={...n[i],...e[i]},delete e[i]}),this.instance.register({[Ft]:{...n,...e}}),t&&this.instance.reloadFeatureFlags()}resetGroupPropertiesForFlags(e){if(e){const t=this.instance.get_property(Ft)||{};this.instance.register({[Ft]:{...t,[e]:{}}})}else this.instance.unregister(Ft)}}/**
 * uuidv7: An experimental implementation of the proposed UUID Version 7
 *
 * @license Apache-2.0
 * @copyright 2021-2023 LiosK
 * @packageDocumentation
 *
 * from https://github.com/LiosK/uuidv7/blob/e501462ea3d23241de13192ceae726956f9b3b7d/src/index.ts
 */Math.trunc||(Math.trunc=function(s){return s<0?Math.ceil(s):Math.floor(s)}),Number.isInteger||(Number.isInteger=function(s){return ze(s)&&isFinite(s)&&Math.floor(s)===s});const hc="0123456789abcdef";class Li{constructor(e){if(this.bytes=e,e.length!==16)throw new TypeError("not 128-bit length")}static fromFieldsV7(e,t,n,i){if(!Number.isInteger(e)||!Number.isInteger(t)||!Number.isInteger(n)||!Number.isInteger(i)||e<0||t<0||n<0||i<0||e>0xffffffffffff||t>4095||n>1073741823||i>4294967295)throw new RangeError("invalid field value");const r=new Uint8Array(16);return r[0]=e/2**40,r[1]=e/2**32,r[2]=e/2**24,r[3]=e/65536,r[4]=e/256,r[5]=e,r[6]=112|t>>>8,r[7]=t,r[8]=128|n>>>24,r[9]=n>>>16,r[10]=n>>>8,r[11]=n,r[12]=i>>>24,r[13]=i>>>16,r[14]=i>>>8,r[15]=i,new Li(r)}toString(){let e="";for(let t=0;t<this.bytes.length;t++)e=e+hc.charAt(this.bytes[t]>>>4)+hc.charAt(15&this.bytes[t]),t!==3&&t!==5&&t!==7&&t!==9||(e+="-");if(e.length!==36)throw new Error("Invalid UUIDv7 was generated");return e}clone(){return new Li(this.bytes.slice(0))}equals(e){return this.compareTo(e)===0}compareTo(e){for(let t=0;t<16;t++){const n=this.bytes[t]-e.bytes[t];if(n!==0)return Math.sign(n)}return 0}}class D0{constructor(){L(this,"timestamp",0);L(this,"counter",0);L(this,"random",new N0)}generate(){const e=this.generateOrAbort();if(M(e)){this.timestamp=0;const t=this.generateOrAbort();if(M(t))throw new Error("Could not generate UUID after timestamp reset");return t}return e}generateOrAbort(){const e=Date.now();if(e>this.timestamp)this.timestamp=e,this.resetCounter();else{if(!(e+1e4>this.timestamp))return;this.counter++,this.counter>4398046511103&&(this.timestamp++,this.resetCounter())}return Li.fromFieldsV7(this.timestamp,Math.trunc(this.counter/2**30),this.counter&2**30-1,this.random.nextUint32())}resetCounter(){this.counter=1024*this.random.nextUint32()+(1023&this.random.nextUint32())}}let pc,ud=s=>{if(typeof UUIDV7_DENY_WEAK_RNG<"u"&&UUIDV7_DENY_WEAK_RNG)throw new Error("no cryptographically strong RNG available");for(let e=0;e<s.length;e++)s[e]=65536*Math.trunc(65536*Math.random())+Math.trunc(65536*Math.random());return s};y&&!M(y.crypto)&&crypto.getRandomValues&&(ud=s=>crypto.getRandomValues(s));class N0{constructor(){L(this,"buffer",new Uint32Array(8));L(this,"cursor",1/0)}nextUint32(){return this.cursor>=this.buffer.length&&(ud(this.buffer),this.cursor=0),this.buffer[this.cursor++]}}const Ht=()=>M0().toString(),M0=()=>(pc||(pc=new D0)).generate(),F0="Thu, 01 Jan 1970 00:00:00 GMT";let fn="";const B0=/[a-z0-9][a-z0-9-]+\.[a-z]{2,}$/i;function j0(s,e){if(e){let t=function(n){let i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:D;if(fn)return fn;if(!i||["localhost","127.0.0.1"].includes(n))return"";const r=n.split(".");let o=Math.min(r.length,8);const c="dmn_chk_"+Ht(),u=new RegExp("(^|;)\\s*"+c+"=1");for(;!fn&&o--;){const h=r.slice(o).join("."),p=c+"=1;domain=."+h;i.cookie=p,u.test(i.cookie)&&(i.cookie=p+";expires="+F0,fn=h)}return fn}(s);if(!t){const n=(i=>{const r=i.match(B0);return r?r[0]:""})(s);n!==t&&A.info("Warning: cookie subdomain discovery mismatch",n,t),t=n}return t?"; domain=."+t:""}return""}const At={is_supported:()=>!!D,error:function(s){A.error("cookieStore error: "+s)},get:function(s){if(D){try{const e=s+"=",t=D.cookie.split(";").filter(n=>n.length);for(let n=0;n<t.length;n++){let i=t[n];for(;i.charAt(0)==" ";)i=i.substring(1,i.length);if(i.indexOf(e)===0)return decodeURIComponent(i.substring(e.length,i.length))}}catch{}return null}},parse:function(s){let e;try{e=JSON.parse(At.get(s))||{}}catch{}return e},set:function(s,e,t,n,i){if(D)try{let r="",o="";const c=j0(D.location.hostname,n);if(t){const h=new Date;h.setTime(h.getTime()+24*t*60*60*1e3),r="; expires="+h.toUTCString()}i&&(o="; secure");const u=s+"="+encodeURIComponent(JSON.stringify(e))+r+"; SameSite=Lax; path=/"+c+o;return u.length>3686.4&&A.warn("cookieStore warning: large cookie, len="+u.length),D.cookie=u,u}catch{return}},remove:function(s,e){try{At.set(s,"",-1,e)}catch{return}}};let Vr=null;const pe={is_supported:function(){if(!Qt(Vr))return Vr;let s=!0;if(M(y))s=!1;else try{const e="__mplssupport__";pe.set(e,"xyz"),pe.get(e)!=='"xyz"'&&(s=!1),pe.remove(e)}catch{s=!1}return s||A.error("localStorage unsupported; falling back to cookie store"),Vr=s,s},error:function(s){A.error("localStorage error: "+s)},get:function(s){try{return y==null?void 0:y.localStorage.getItem(s)}catch(e){pe.error(e)}return null},parse:function(s){try{return JSON.parse(pe.get(s))||{}}catch{}return null},set:function(s,e){try{y==null||y.localStorage.setItem(s,JSON.stringify(e))}catch(t){pe.error(t)}},remove:function(s){try{y==null||y.localStorage.removeItem(s)}catch(e){pe.error(e)}}},H0=["distinct_id",Pi,yn,xi],ci={...pe,parse:function(s){try{let e={};try{e=At.parse(s)||{}}catch{}const t=xe(e,JSON.parse(pe.get(s)||"{}"));return pe.set(s,t),t}catch{}return null},set:function(s,e,t,n,i,r){try{pe.set(s,e,void 0,void 0,r);const o={};H0.forEach(c=>{e[c]&&(o[c]=e[c])}),Object.keys(o).length&&At.set(s,o,t,n,i,r)}catch(o){pe.error(o)}},remove:function(s,e){try{y==null||y.localStorage.removeItem(s),At.remove(s,e)}catch(t){pe.error(t)}}},ui={},V0={is_supported:function(){return!0},error:function(s){A.error("memoryStorage error: "+s)},get:function(s){return ui[s]||null},parse:function(s){return ui[s]||null},set:function(s,e){ui[s]=e},remove:function(s){delete ui[s]}};let ss=null;const Ae={is_supported:function(){if(!Qt(ss))return ss;if(ss=!0,M(y))ss=!1;else try{const s="__support__";Ae.set(s,"xyz"),Ae.get(s)!=='"xyz"'&&(ss=!1),Ae.remove(s)}catch{ss=!1}return ss},error:function(s){A.error("sessionStorage error: ",s)},get:function(s){try{return y==null?void 0:y.sessionStorage.getItem(s)}catch(e){Ae.error(e)}return null},parse:function(s){try{return JSON.parse(Ae.get(s))||null}catch{}return null},set:function(s,e){try{y==null||y.sessionStorage.setItem(s,JSON.stringify(e))}catch(t){Ae.error(t)}},remove:function(s){try{y==null||y.sessionStorage.removeItem(s)}catch(e){Ae.error(e)}}},W0=["localhost","127.0.0.1"],Cn=s=>{const e=D==null?void 0:D.createElement("a");return M(e)?null:(e.href=s,e)},Ys=function(s,e){return!!function(t){try{new RegExp(t)}catch{return!1}return!0}(e)&&new RegExp(e).test(s)},U0=function(s){let e,t,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"&";const i=[];return J(s,function(r,o){M(r)||M(o)||o==="undefined"||(e=encodeURIComponent((c=>c instanceof File)(r)?r.name:r.toString()),t=encodeURIComponent(o),i[i.length]=t+"="+e)}),i.join(n)},Ii=function(s,e){const t=((s.split("#")[0]||"").split("?")[1]||"").split("&");let n;for(let i=0;i<t.length;i++){const r=t[i].split("=");if(r[0]===e){n=r;break}}if(!fe(n)||n.length<2)return"";{let i=n[1];try{i=decodeURIComponent(i)}catch{A.error("Skipping decoding for malformed query param: "+i)}return i.replace(/\+/g," ")}},Ri=function(s,e){const t=s.match(new RegExp(e+"=([^&]*)"));return t?t[1]:null},et="Mobile",Di="iOS",pt="Android",Ln="Tablet",dd=pt+" "+Ln,hd="iPad",pd="Apple",fd=pd+" Watch",In="Safari",Zs="BlackBerry",gd="Samsung",_d=gd+"Browser",md=gd+" Internet",Wt="Chrome",q0=Wt+" OS",vd=Wt+" "+Di,aa="Internet Explorer",bd=aa+" "+et,la="Opera",z0=la+" Mini",ca="Edge",yd="Microsoft "+ca,Bs="Firefox",Ed=Bs+" "+Di,Rn="Nintendo",Dn="PlayStation",js="Xbox",wd=pt+" "+et,Ad=et+" "+In,En="Windows",Eo=En+" Phone",fc="Nokia",wo="Ouya",Sd="Generic",K0=Sd+" "+et.toLowerCase(),Td=Sd+" "+Ln.toLowerCase(),Ao="Konqueror",$e="(\\d+(\\.\\d+)?)",Wr=new RegExp("Version/"+$e),G0=new RegExp(js,"i"),Y0=new RegExp(Dn+" \\w+","i"),Z0=new RegExp(Rn+" \\w+","i"),ua=new RegExp(Zs+"|PlayBook|BB10","i"),X0={"NT3.51":"NT 3.11","NT4.0":"NT 4.0","5.0":"2000",5.1:"XP",5.2:"XP","6.0":"Vista",6.1:"7",6.2:"8",6.3:"8.1",6.4:"10","10.0":"10"},Q0=(s,e)=>e&&Y(e,pd)||function(t){return Y(t,In)&&!Y(t,Wt)&&!Y(t,pt)}(s),gc=function(s,e){return e=e||"",Y(s," OPR/")&&Y(s,"Mini")?z0:Y(s," OPR/")?la:ua.test(s)?Zs:Y(s,"IE"+et)||Y(s,"WPDesktop")?bd:Y(s,_d)?md:Y(s,ca)||Y(s,"Edg/")?yd:Y(s,"FBIOS")?"Facebook "+et:Y(s,"UCWEB")||Y(s,"UCBrowser")?"UC Browser":Y(s,"CriOS")?vd:Y(s,"CrMo")?Wt:Y(s,pt)&&Y(s,In)?wd:Y(s,Wt)?Wt:Y(s,"FxiOS")?Ed:Y(s.toLowerCase(),Ao.toLowerCase())?Ao:Q0(s,e)?Y(s,et)?Ad:In:Y(s,Bs)?Bs:Y(s,"MSIE")||Y(s,"Trident/")?aa:Y(s,"Gecko")?Bs:""},J0={[bd]:[new RegExp("rv:"+$e)],[yd]:[new RegExp(ca+"?\\/"+$e)],[Wt]:[new RegExp("("+Wt+"|CrMo)\\/"+$e)],[vd]:[new RegExp("CriOS\\/"+$e)],"UC Browser":[new RegExp("(UCBrowser|UCWEB)\\/"+$e)],[In]:[Wr],[Ad]:[Wr],[la]:[new RegExp("(Opera|OPR)\\/"+$e)],[Bs]:[new RegExp(Bs+"\\/"+$e)],[Ed]:[new RegExp("FxiOS\\/"+$e)],[Ao]:[new RegExp("Konqueror[:/]?"+$e,"i")],[Zs]:[new RegExp(Zs+" "+$e),Wr],[wd]:[new RegExp("android\\s"+$e,"i")],[md]:[new RegExp(_d+"\\/"+$e)],[aa]:[new RegExp("(rv:|MSIE )"+$e)],Mozilla:[new RegExp("rv:"+$e)]},_c=[[new RegExp(js+"; "+js+" (.*?)[);]","i"),s=>[js,s&&s[1]||""]],[new RegExp(Rn,"i"),[Rn,""]],[new RegExp(Dn,"i"),[Dn,""]],[ua,[Zs,""]],[new RegExp(En,"i"),(s,e)=>{if(/Phone/.test(e)||/WPDesktop/.test(e))return[Eo,""];if(new RegExp(et).test(e)&&!/IEMobile\b/.test(e))return[En+" "+et,""];const t=/Windows NT ([0-9.]+)/i.exec(e);if(t&&t[1]){const n=t[1];let i=X0[n]||"";return/arm/i.test(e)&&(i="RT"),[En,i]}return[En,""]}],[/((iPhone|iPad|iPod).*?OS (\d+)_(\d+)_?(\d+)?|iPhone)/,s=>{if(s&&s[3]){const e=[s[3],s[4],s[5]||"0"];return[Di,e.join(".")]}return[Di,""]}],[/(watch.*\/(\d+\.\d+\.\d+)|watch os,(\d+\.\d+),)/i,s=>{let e="";return s&&s.length>=3&&(e=M(s[2])?s[3]:s[2]),["watchOS",e]}],[new RegExp("("+pt+" (\\d+)\\.(\\d+)\\.?(\\d+)?|"+pt+")","i"),s=>{if(s&&s[2]){const e=[s[2],s[3],s[4]||"0"];return[pt,e.join(".")]}return[pt,""]}],[/Mac OS X (\d+)[_.](\d+)[_.]?(\d+)?/i,s=>{const e=["Mac OS X",""];if(s&&s[1]){const t=[s[1],s[2],s[3]||"0"];e[1]=t.join(".")}return e}],[/Mac/i,["Mac OS X",""]],[/CrOS/,[q0,""]],[/Linux|debian/i,["Linux",""]]],mc=function(s){return Z0.test(s)?Rn:Y0.test(s)?Dn:G0.test(s)?js:new RegExp(wo,"i").test(s)?wo:new RegExp("("+Eo+"|WPDesktop)","i").test(s)?Eo:/iPad/.test(s)?hd:/iPod/.test(s)?"iPod Touch":/iPhone/.test(s)?"iPhone":/(watch)(?: ?os[,/]|\d,\d\/)[\d.]+/i.test(s)?fd:ua.test(s)?Zs:/(kobo)\s(ereader|touch)/i.test(s)?"Kobo":new RegExp(fc,"i").test(s)?fc:/(kf[a-z]{2}wi|aeo[c-r]{2})( bui|\))/i.test(s)||/(kf[a-z]+)( bui|\)).+silk\//i.test(s)?"Kindle Fire":/(Android|ZTE)/i.test(s)?!new RegExp(et).test(s)||/(9138B|TB782B|Nexus [97]|pixel c|HUAWEISHT|BTV|noble nook|smart ultra 6)/i.test(s)?/pixel[\daxl ]{1,6}/i.test(s)&&!/pixel c/i.test(s)||/(huaweimed-al00|tah-|APA|SM-G92|i980|zte|U304AA)/i.test(s)||/lmy47v/i.test(s)&&!/QTAQZ3/i.test(s)?pt:dd:pt:new RegExp("(pda|"+et+")","i").test(s)?K0:new RegExp(Ln,"i").test(s)&&!new RegExp(Ln+" pc","i").test(s)?Td:""},di="https?://(.*)",eE=["utm_source","utm_medium","utm_campaign","utm_content","utm_term","gclid","gad_source","gclsrc","dclid","gbraid","wbraid","fbclid","msclkid","twclid","li_fat_id","mc_cid","igshid","ttclid","rdt_cid"],he={campaignParams:function(s){return D?this._campaignParamsFromUrl(D.URL,s):{}},_campaignParamsFromUrl:function(s,e){const t=eE.concat(e||[]),n={};return J(t,function(i){const r=Ii(s,i);n[i]=r||null}),n},_searchEngine:function(s){return s?s.search(di+"google.([^/?]*)")===0?"google":s.search(di+"bing.com")===0?"bing":s.search(di+"yahoo.com")===0?"yahoo":s.search(di+"duckduckgo.com")===0?"duckduckgo":null:null},_searchInfoFromReferrer:function(s){const e=he._searchEngine(s),t=e!="yahoo"?"q":"p",n={};if(!Qt(e)){n.$search_engine=e;const i=D?Ii(D.referrer,t):"";i.length&&(n.ph_keyword=i)}return n},searchInfo:function(){const s=D==null?void 0:D.referrer;return s?this._searchInfoFromReferrer(s):{}},browser:gc,browserVersion:function(s,e){const t=gc(s,e),n=J0[t];if(M(n))return null;for(let i=0;i<n.length;i++){const r=n[i],o=s.match(r);if(o)return parseFloat(o[o.length-2])}return null},browserLanguage:function(){return navigator.language||navigator.userLanguage},os:function(s){for(let e=0;e<_c.length;e++){const[t,n]=_c[e],i=t.exec(s),r=i&&(Qe(n)?n(i,s):n);if(r)return r}return["",""]},device:mc,deviceType:function(s){const e=mc(s);return e===hd||e===dd||e==="Kobo"||e==="Kindle Fire"||e===Td?Ln:e===Rn||e===js||e===Dn||e===wo?"Console":e===fd?"Wearable":e?et:"Desktop"},referrer:function(){return(D==null?void 0:D.referrer)||"$direct"},referringDomain:function(){var s;return D!=null&&D.referrer&&((s=Cn(D.referrer))===null||s===void 0?void 0:s.host)||"$direct"},referrerInfo:function(){return{$referrer:this.referrer(),$referring_domain:this.referringDomain()}},initialPersonInfo:function(){return{r:this.referrer(),u:De==null?void 0:De.href}},initialPersonPropsFromInfo:function(s){var e;const{r:t,u:n}=s,i={$initial_referrer:t,$initial_referring_domain:t==null?void 0:t=="$direct"?"$direct":(e=Cn(t))===null||e===void 0?void 0:e.host};if(n){i.$initial_current_url=n;const r=Cn(n);i.$initial_host=r==null?void 0:r.host,i.$initial_pathname=r==null?void 0:r.pathname,J(this._campaignParamsFromUrl(n),function(o,c){i["$initial_"+uo(c)]=o})}return t&&J(this._searchInfoFromReferrer(t),function(r,o){i["$initial_"+uo(o)]=r}),i},properties:function(){if(!be)return{};const[s,e]=he.os(be);return xe(co({$os:s,$os_version:e,$browser:he.browser(be,navigator.vendor),$device:he.device(be),$device_type:he.deviceType(be)}),{$current_url:De==null?void 0:De.href,$host:De==null?void 0:De.host,$pathname:De==null?void 0:De.pathname,$raw_user_agent:be.length>1e3?be.substring(0,997)+"...":be,$browser_version:he.browserVersion(be,navigator.vendor),$browser_language:he.browserLanguage(),$screen_height:y==null?void 0:y.screen.height,$screen_width:y==null?void 0:y.screen.width,$viewport_height:y==null?void 0:y.innerHeight,$viewport_width:y==null?void 0:y.innerWidth,$lib:"web",$lib_version:Mt.LIB_VERSION,$insert_id:Math.random().toString(36).substring(2,10)+Math.random().toString(36).substring(2,10),$time:Date.now()/1e3})},people_properties:function(){if(!be)return{};const[s,e]=he.os(be);return xe(co({$os:s,$os_version:e,$browser:he.browser(be,navigator.vendor)}),{$browser_version:he.browserVersion(be,navigator.vendor)})}},tE=["cookie","localstorage","localstorage+cookie","sessionstorage","memory"];class Ur{constructor(e){this.config=e,this.props={},this.campaign_params_saved=!1,this.name=(t=>{let n="";return t.token&&(n=t.token.replace(/\+/g,"PL").replace(/\//g,"SL").replace(/=/g,"EQ")),t.persistence_name?"ph_"+t.persistence_name:"ph_"+n+"_posthog"})(e),this.storage=this.buildStorage(e),this.load(),e.debug&&A.info("Persistence loaded",e.persistence,{...this.props}),this.update_config(e,e),this.save()}buildStorage(e){let t;tE.indexOf(e.persistence.toLowerCase())===-1&&(A.critical("Unknown persistence type "+e.persistence+"; falling back to localStorage+cookie"),e.persistence="localStorage+cookie");const n=e.persistence.toLowerCase();return t=n==="localstorage"&&pe.is_supported()?pe:n==="localstorage+cookie"&&ci.is_supported()?ci:n==="sessionstorage"&&Ae.is_supported()?Ae:n==="memory"?V0:n==="cookie"?At:ci.is_supported()?ci:At,t}properties(){const e={};return J(this.props,function(t,n){if(n===Ns&&de(t)){const i=Object.keys(t);for(let r=0;r<i.length;r++)e[`$feature/${i[r]}`]=t[i[r]]}else(function(i,r){let o=!1;return Qt(i)?o:Kl&&i.indexOf===Kl?i.indexOf(r)!=-1:(J(i,function(c){if(o||(o=c===r))return Oi}),o)})(I0,n)||(e[n]=t)}),e}load(){if(this.disabled)return;const e=this.storage.parse(this.name);e&&(this.props=xe({},e))}save(){this.disabled||this.storage.set(this.name,this.props,this.expire_days,this.cross_subdomain,this.secure,this.config.debug)}remove(){this.storage.remove(this.name,!1),this.storage.remove(this.name,!0)}clear(){this.remove(),this.props={}}register_once(e,t,n){if(de(e)){M(t)&&(t="None"),this.expire_days=M(n)?this.default_expiry:n;let i=!1;if(J(e,(r,o)=>{this.props.hasOwnProperty(o)&&this.props[o]!==t||(this.props[o]=r,i=!0)}),i)return this.save(),!0}return!1}register(e,t){if(de(e)){this.expire_days=M(t)?this.default_expiry:t;let n=!1;if(J(e,(i,r)=>{e.hasOwnProperty(r)&&this.props[r]!==i&&(this.props[r]=i,n=!0)}),n)return this.save(),!0}return!1}unregister(e){e in this.props&&(delete this.props[e],this.save())}update_campaign_params(){this.campaign_params_saved||(this.register(he.campaignParams(this.config.custom_campaign_params)),this.campaign_params_saved=!0)}update_search_keyword(){this.register(he.searchInfo())}update_referrer_info(){this.register_once(he.referrerInfo(),void 0)}set_initial_person_info(){this.props[vo]||this.props[bo]||this.register_once({[cc]:he.initialPersonInfo()},void 0)}get_referrer_info(){return co({$referrer:this.props.$referrer,$referring_domain:this.props.$referring_domain})}get_initial_props(){const e={};J([bo,vo],n=>{const i=this.props[n];i&&J(i,function(r,o){e["$initial_"+uo(o)]=r})});const t=this.props[cc];if(t){const n=he.initialPersonPropsFromInfo(t);xe(e,n)}return e}safe_merge(e){return J(this.props,function(t,n){n in e||(e[n]=t)}),e}update_config(e,t){if(this.default_expiry=this.expire_days=e.cookie_expiration,this.set_disabled(e.disable_persistence),this.set_cross_subdomain(e.cross_subdomain_cookie),this.set_secure(e.secure_cookie),e.persistence!==t.persistence){const n=this.buildStorage(e),i=this.props;this.clear(),this.storage=n,this.props=i,this.save()}}set_disabled(e){this.disabled=e,this.disabled?this.remove():this.save()}set_cross_subdomain(e){e!==this.cross_subdomain&&(this.cross_subdomain=e,this.remove(),this.save())}get_cross_subdomain(){return!!this.cross_subdomain}set_secure(e){e!==this.secure&&(this.secure=e,this.remove(),this.save())}set_event_timer(e,t){const n=this.props[bn]||{};n[e]=t,this.props[bn]=n,this.save()}remove_event_timer(e){const t=(this.props[bn]||{})[e];return M(t)||(delete this.props[bn][e],this.save()),t}get_property(e){return this.props[e]}set_property(e,t){this.props[e]=t,this.save()}}function Ni(s){var e;return((e=JSON.stringify(s,function(){const t=[];return function(n,i){if(de(i)){for(;t.length>0&&t.at(-1)!==this;)t.pop();return t.includes(i)?"[Circular]":(t.push(i),i)}return i}}()))===null||e===void 0?void 0:e.length)||0}function So(s){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:66060288e-1;if(s.size>=e&&s.data.length>1){const t=Math.floor(s.data.length/2),n=s.data.slice(0,t),i=s.data.slice(t);return[So({size:Ni(n),data:n,sessionId:s.sessionId,windowId:s.windowId}),So({size:Ni(i),data:i,sessionId:s.sessionId,windowId:s.windowId})].flatMap(r=>r)}return[s]}var Bt=(s=>(s[s.DomContentLoaded=0]="DomContentLoaded",s[s.Load=1]="Load",s[s.FullSnapshot=2]="FullSnapshot",s[s.IncrementalSnapshot=3]="IncrementalSnapshot",s[s.Meta=4]="Meta",s[s.Custom=5]="Custom",s[s.Plugin=6]="Plugin",s))(Bt||{}),lt=(s=>(s[s.Mutation=0]="Mutation",s[s.MouseMove=1]="MouseMove",s[s.MouseInteraction=2]="MouseInteraction",s[s.Scroll=3]="Scroll",s[s.ViewportResize=4]="ViewportResize",s[s.Input=5]="Input",s[s.TouchMove=6]="TouchMove",s[s.MediaInteraction=7]="MediaInteraction",s[s.StyleSheetRule=8]="StyleSheetRule",s[s.CanvasMutation=9]="CanvasMutation",s[s.Font=10]="Font",s[s.Log=11]="Log",s[s.Drag=12]="Drag",s[s.StyleDeclaration=13]="StyleDeclaration",s[s.Selection=14]="Selection",s[s.AdoptedStyleSheet=15]="AdoptedStyleSheet",s[s.CustomElement=16]="CustomElement",s))(lt||{});function da(s){return s?tr(s).split(/\s+/):[]}function vc(s){const e=y==null?void 0:y.location.href;return!!(e&&s&&s.some(t=>e.match(t)))}function Mi(s){let e="";switch(typeof s.className){case"string":e=s.className;break;case"object":e=(s.className&&"baseVal"in s.className?s.className.baseVal:null)||s.getAttribute("class")||"";break;default:e=""}return da(e)}function Cd(s){return oe(s)?null:tr(s).split(/(\s+)/).filter(e=>Hs(e)).join("").replace(/[\r\n]/g," ").replace(/[ ]+/g," ").substring(0,255)}function Fi(s){let e="";return Co(s)&&!xd(s)&&s.childNodes&&s.childNodes.length&&J(s.childNodes,function(t){var n;Od(t)&&t.textContent&&(e+=(n=Cd(t.textContent))!==null&&n!==void 0?n:"")}),tr(e)}function kd(s){return M(s.target)?s.srcElement||null:(e=s.target)!==null&&e!==void 0&&e.shadowRoot?s.composedPath()[0]||null:s.target||null;var e}function sr(s){return!!s&&s.nodeType===1}function Ut(s,e){return!!s&&!!s.tagName&&s.tagName.toLowerCase()===e.toLowerCase()}function Od(s){return!!s&&s.nodeType===3}function Pd(s){return!!s&&s.nodeType===11}const To=["a","button","form","input","select","textarea","label"];function $d(s){const e=s.parentNode;return!(!e||!sr(e))&&e}function sE(s,e){let t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0,n=arguments.length>3?arguments[3]:void 0,i=arguments.length>4?arguments[4]:void 0;if(!y||!s||Ut(s,"html")||!sr(s)||t!=null&&t.url_allowlist&&!vc(t.url_allowlist)||t!=null&&t.url_ignorelist&&vc(t.url_ignorelist))return!1;if(t!=null&&t.dom_event_allowlist){const f=t.dom_event_allowlist;if(f&&!f.some(g=>e.type===g))return!1}let r=!1;const o=[s];let c=!0,u=s;for(;u.parentNode&&!Ut(u,"body");)if(Pd(u.parentNode))o.push(u.parentNode.host),u=u.parentNode.host;else{if(c=$d(u),!c)break;if(n||To.indexOf(c.tagName.toLowerCase())>-1)r=!0;else{const f=y.getComputedStyle(c);f&&f.getPropertyValue("cursor")==="pointer"&&(r=!0)}o.push(c),u=c}if(!function(f,g){const m=g==null?void 0:g.element_allowlist;if(M(m))return!0;for(const E of f)if(m.some(v=>E.tagName.toLowerCase()===v))return!0;return!1}(o,t)||!function(f,g){const m=g==null?void 0:g.css_selector_allowlist;if(M(m))return!0;for(const E of f)if(m.some(v=>E.matches(v)))return!0;return!1}(o,t))return!1;const h=y.getComputedStyle(s);if(h&&h.getPropertyValue("cursor")==="pointer"&&e.type==="click")return!0;const p=s.tagName.toLowerCase();switch(p){case"html":return!1;case"form":return(i||["submit"]).indexOf(e.type)>=0;case"input":case"select":case"textarea":return(i||["change","click"]).indexOf(e.type)>=0;default:return r?(i||["click"]).indexOf(e.type)>=0:(i||["click"]).indexOf(e.type)>=0&&(To.indexOf(p)>-1||s.getAttribute("contenteditable")==="true")}}function Co(s){for(let n=s;n.parentNode&&!Ut(n,"body");n=n.parentNode){const i=Mi(n);if(Y(i,"ph-sensitive")||Y(i,"ph-no-capture"))return!1}if(Y(Mi(s),"ph-include"))return!0;const e=s.type||"";if(Ce(e))switch(e.toLowerCase()){case"hidden":case"password":return!1}const t=s.name||s.id||"";return!(Ce(t)&&/^cc|cardnum|ccnum|creditcard|csc|cvc|cvv|exp|pass|pwd|routing|seccode|securitycode|securitynum|socialsec|socsec|ssn/i.test(t.replace(/[^a-zA-Z0-9]/g,"")))}function xd(s){return!!(Ut(s,"input")&&!["button","checkbox","submit","reset"].includes(s.type)||Ut(s,"select")||Ut(s,"textarea")||s.getAttribute("contenteditable")==="true")}const Ld="(4[0-9]{12}(?:[0-9]{3})?)|(5[1-5][0-9]{14})|(6(?:011|5[0-9]{2})[0-9]{12})|(3[47][0-9]{13})|(3(?:0[0-5]|[68][0-9])[0-9]{11})|((?:2131|1800|35[0-9]{3})[0-9]{11})",nE=new RegExp(`^(?:${Ld})$`),iE=new RegExp(Ld),Id="\\d{3}-?\\d{2}-?\\d{4}",rE=new RegExp(`^(${Id})$`),oE=new RegExp(`(${Id})`);function Hs(s){let e=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1];return!(oe(s)||Ce(s)&&(s=tr(s),(e?nE:iE).test((s||"").replace(/[- ]/g,""))||(e?rE:oE).test(s)))}function bc(s){let e=Fi(s);return e=`${e} ${Rd(s)}`.trim(),Hs(e)?e:""}function Rd(s){let e="";return s&&s.childNodes&&s.childNodes.length&&J(s.childNodes,function(t){var n;if(t&&((n=t.tagName)===null||n===void 0?void 0:n.toLowerCase())==="span")try{const i=Fi(t);e=`${e} ${i}`.trim(),t.childNodes&&t.childNodes.length&&(e=`${e} ${Rd(t)}`.trim())}catch(i){A.error(i)}}),e}function aE(s){return function(e){return e.map(n=>{var i,r;let o="";if(n.tag_name&&(o+=n.tag_name),n.attr_class){n.attr_class.sort();for(const h of n.attr_class)o+=`.${h.replace(/"/g,"")}`}const c={...n.text?{text:n.text}:{},"nth-child":(i=n.nth_child)!==null&&i!==void 0?i:0,"nth-of-type":(r=n.nth_of_type)!==null&&r!==void 0?r:0,...n.href?{href:n.href}:{},...n.attr_id?{attr_id:n.attr_id}:{},...n.attributes},u={};return yi(c).sort((h,p)=>{let[f]=h,[g]=p;return f.localeCompare(g)}).forEach(h=>{let[p,f]=h;return u[yc(p.toString())]=yc(f.toString())}),o+=":",o+=yi(c).map(h=>{let[p,f]=h;return`${p}="${f}"`}).join(""),o}).join(";")}(function(e){return e.map(t=>{var n,i;const r={text:(n=t.$el_text)===null||n===void 0?void 0:n.slice(0,400),tag_name:t.tag_name,href:(i=t.attr__href)===null||i===void 0?void 0:i.slice(0,2048),attr_class:lE(t),attr_id:t.attr__id,nth_child:t.nth_child,nth_of_type:t.nth_of_type,attributes:{}};return yi(t).filter(o=>{let[c]=o;return c.indexOf("attr__")===0}).forEach(o=>{let[c,u]=o;return r.attributes[c]=u}),r})}(s))}function yc(s){return s.replace(/"|\\"/g,'\\"')}function lE(s){const e=s.attr__class;return e?fe(e)?e:da(e):void 0}const ko="[SessionRecording]",Oo="redacted",hi={initiatorTypes:["audio","beacon","body","css","early-hint","embed","fetch","frame","iframe","icon","image","img","input","link","navigation","object","ping","script","track","video","xmlhttprequest"],maskRequestFn:s=>s,recordHeaders:!1,recordBody:!1,recordInitialRequests:!1,recordPerformance:!1,performanceEntryTypeToObserve:["first-input","navigation","paint","resource"],payloadSizeLimitBytes:1e6,payloadHostDenyList:[".lr-ingest.io",".ingest.sentry.io"]},cE=["authorization","x-forwarded-for","authorization","cookie","set-cookie","x-api-key","x-real-ip","remote-addr","forwarded","proxy-authorization","x-csrf-token","x-csrftoken","x-xsrf-token"],uE=["password","secret","passwd","api_key","apikey","auth","credentials","mysql_pwd","privatekey","private_key","token"],dE=["/s/","/e/","/i/"];function Ec(s,e,t,n){if(oe(s))return s;let i=(e==null?void 0:e["content-length"])||function(r){return new Blob([r]).size}(s);return Ce(i)&&(i=parseInt(i)),i>t?ko+` ${n} body too large to record (${i} bytes)`:s}function wc(s,e){if(oe(s))return s;let t=s;return Hs(t,!1)||(t=ko+" "+e+" body "+Oo),J(uE,n=>{var i,r;(i=t)!==null&&i!==void 0&&i.length&&((r=t)===null||r===void 0?void 0:r.indexOf(n))!==-1&&(t=ko+" "+e+" body "+Oo+" as might contain: "+n)}),t}const hE=(s,e)=>{const t={payloadSizeLimitBytes:hi.payloadSizeLimitBytes,performanceEntryTypeToObserve:[...hi.performanceEntryTypeToObserve],payloadHostDenyList:[...e.payloadHostDenyList||[],...hi.payloadHostDenyList]},n=s.session_recording.recordHeaders!==!1&&e.recordHeaders,i=s.session_recording.recordBody!==!1&&e.recordBody,r=s.capture_performance!==!1&&e.recordPerformance,o=(h=>{var p;const f=Math.min(1e6,(p=h.payloadSizeLimitBytes)!==null&&p!==void 0?p:1e6);return g=>(g!=null&&g.requestBody&&(g.requestBody=Ec(g.requestBody,g.requestHeaders,f,"Request")),g!=null&&g.responseBody&&(g.responseBody=Ec(g.responseBody,g.responseHeaders,f,"Response")),g)})(t),c=h=>o((p=>{const f=Cn(p.name);if(!(f&&f.pathname&&dE.some(g=>f.pathname.indexOf(g)===0)))return p})((p=>{const f=p.requestHeaders;return oe(f)||J(Object.keys(f??{}),g=>{cE.includes(g.toLowerCase())&&(f[g]=Oo)}),p})(h))),u=Qe(s.session_recording.maskNetworkRequestFn);return u&&Qe(s.session_recording.maskCapturedNetworkRequestFn)&&A.warn("Both `maskNetworkRequestFn` and `maskCapturedNetworkRequestFn` are defined. `maskNetworkRequestFn` will be ignored."),u&&(s.session_recording.maskCapturedNetworkRequestFn=h=>{const p=s.session_recording.maskNetworkRequestFn({url:h.name});return{...h,name:p==null?void 0:p.url}}),t.maskRequestFn=Qe(s.session_recording.maskCapturedNetworkRequestFn)?h=>{var p,f,g;const m=c(h);return m&&(p=(f=(g=s.session_recording).maskCapturedNetworkRequestFn)===null||f===void 0?void 0:f.call(g,m))!==null&&p!==void 0?p:void 0}:h=>function(p){if(!M(p))return p.requestBody=wc(p.requestBody,"Request"),p.responseBody=wc(p.responseBody,"Response"),p}(c(h)),{...hi,...t,recordHeaders:n,recordBody:i,recordPerformance:r,recordInitialRequests:r}};class pE{constructor(e){L(this,"bucketSize",100);L(this,"refillRate",10);L(this,"mutationBuckets",{});L(this,"loggedTracker",{});L(this,"refillBuckets",()=>{Object.keys(this.mutationBuckets).forEach(e=>{this.mutationBuckets[e]=this.mutationBuckets[e]+this.refillRate,this.mutationBuckets[e]>=this.bucketSize&&delete this.mutationBuckets[e]})});L(this,"getNodeOrRelevantParent",e=>{const t=this.rrweb.mirror.getNode(e);if((t==null?void 0:t.nodeName)!=="svg"&&t instanceof Element){const n=t.closest("svg");if(n)return[this.rrweb.mirror.getId(n),n]}return[e,t]});L(this,"numberOfChanges",e=>{var t,n,i,r,o,c,u,h;return((t=(n=e.removes)===null||n===void 0?void 0:n.length)!==null&&t!==void 0?t:0)+((i=(r=e.attributes)===null||r===void 0?void 0:r.length)!==null&&i!==void 0?i:0)+((o=(c=e.texts)===null||c===void 0?void 0:c.length)!==null&&o!==void 0?o:0)+((u=(h=e.adds)===null||h===void 0?void 0:h.length)!==null&&u!==void 0?u:0)});L(this,"throttleMutations",e=>{if(e.type!==3||e.data.source!==0)return e;const t=e.data,n=this.numberOfChanges(t);t.attributes&&(t.attributes=t.attributes.filter(r=>{var o;const[c,u]=this.getNodeOrRelevantParent(r.id);if(this.mutationBuckets[c]===0)return!1;var h,p;return this.mutationBuckets[c]=(o=this.mutationBuckets[c])!==null&&o!==void 0?o:this.bucketSize,this.mutationBuckets[c]=Math.max(this.mutationBuckets[c]-1,0),this.mutationBuckets[c]===0&&(this.loggedTracker[c]||(this.loggedTracker[c]=!0,(h=(p=this.options).onBlockedNode)===null||h===void 0||h.call(p,c,u))),r}));const i=this.numberOfChanges(t);return i!==0||n===i?e:void 0});var t,n;let i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.rrweb=e,this.options=i,this.refillRate=(t=this.options.refillRate)!==null&&t!==void 0?t:this.refillRate,this.bucketSize=(n=this.options.bucketSize)!==null&&n!==void 0?n:this.bucketSize,setInterval(()=>{this.refillBuckets()},1e3)}}var tt=Uint8Array,Fe=Uint16Array,Xs=Uint32Array,ha=new tt([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),pa=new tt([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),Ac=new tt([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),Dd=function(s,e){for(var t=new Fe(31),n=0;n<31;++n)t[n]=e+=1<<s[n-1];var i=new Xs(t[30]);for(n=1;n<30;++n)for(var r=t[n];r<t[n+1];++r)i[r]=r-t[n]<<5|n;return[t,i]},Nd=Dd(ha,2),fE=Nd[0],Po=Nd[1];fE[28]=258,Po[258]=28;for(var Sc=Dd(pa,0)[1],Md=new Fe(32768),se=0;se<32768;++se){var ns=(43690&se)>>>1|(21845&se)<<1;ns=(61680&(ns=(52428&ns)>>>2|(13107&ns)<<2))>>>4|(3855&ns)<<4,Md[se]=((65280&ns)>>>8|(255&ns)<<8)>>>1}var kn=function(s,e,t){for(var n=s.length,i=0,r=new Fe(e);i<n;++i)++r[s[i]-1];var o,c=new Fe(e);for(i=0;i<e;++i)c[i]=c[i-1]+r[i-1]<<1;for(o=new Fe(n),i=0;i<n;++i)o[i]=Md[c[s[i]-1]++]>>>15-s[i];return o},_s=new tt(288);for(se=0;se<144;++se)_s[se]=8;for(se=144;se<256;++se)_s[se]=9;for(se=256;se<280;++se)_s[se]=7;for(se=280;se<288;++se)_s[se]=8;var Bi=new tt(32);for(se=0;se<32;++se)Bi[se]=5;var gE=kn(_s,9),_E=kn(Bi,5),Fd=function(s){return(s/8>>0)+(7&s&&1)},Bd=function(s,e,t){(t==null||t>s.length)&&(t=s.length);var n=new(s instanceof Fe?Fe:s instanceof Xs?Xs:tt)(t-e);return n.set(s.subarray(e,t)),n},mt=function(s,e,t){t<<=7&e;var n=e/8>>0;s[n]|=t,s[n+1]|=t>>>8},gn=function(s,e,t){t<<=7&e;var n=e/8>>0;s[n]|=t,s[n+1]|=t>>>8,s[n+2]|=t>>>16},qr=function(s,e){for(var t=[],n=0;n<s.length;++n)s[n]&&t.push({s:n,f:s[n]});var i=t.length,r=t.slice();if(!i)return[new tt(0),0];if(i==1){var o=new tt(t[0].s+1);return o[t[0].s]=1,[o,1]}t.sort(function(P,j){return P.f-j.f}),t.push({s:-1,f:25001});var c=t[0],u=t[1],h=0,p=1,f=2;for(t[0]={s:-1,f:c.f+u.f,l:c,r:u};p!=i-1;)c=t[t[h].f<t[f].f?h++:f++],u=t[h!=p&&t[h].f<t[f].f?h++:f++],t[p++]={s:-1,f:c.f+u.f,l:c,r:u};var g=r[0].s;for(n=1;n<i;++n)r[n].s>g&&(g=r[n].s);var m=new Fe(g+1),E=$o(t[p-1],m,0);if(E>e){n=0;var v=0,w=E-e,S=1<<w;for(r.sort(function(P,j){return m[j.s]-m[P.s]||P.f-j.f});n<i;++n){var C=r[n].s;if(!(m[C]>e))break;v+=S-(1<<E-m[C]),m[C]=e}for(v>>>=w;v>0;){var x=r[n].s;m[x]<e?v-=1<<e-m[x]++-1:++n}for(;n>=0&&v;--n){var $=r[n].s;m[$]==e&&(--m[$],++v)}E=e}return[new tt(m),E]},$o=function(s,e,t){return s.s==-1?Math.max($o(s.l,e,t+1),$o(s.r,e,t+1)):e[s.s]=t},Tc=function(s){for(var e=s.length;e&&!s[--e];);for(var t=new Fe(++e),n=0,i=s[0],r=1,o=function(u){t[n++]=u},c=1;c<=e;++c)if(s[c]==i&&c!=e)++r;else{if(!i&&r>2){for(;r>138;r-=138)o(32754);r>2&&(o(r>10?r-11<<5|28690:r-3<<5|12305),r=0)}else if(r>3){for(o(i),--r;r>6;r-=6)o(8304);r>2&&(o(r-3<<5|8208),r=0)}for(;r--;)o(i);r=1,i=s[c]}return[t.subarray(0,n),e]},_n=function(s,e){for(var t=0,n=0;n<e.length;++n)t+=s[n]*e[n];return t},xo=function(s,e,t){var n=t.length,i=Fd(e+2);s[i]=255&n,s[i+1]=n>>>8,s[i+2]=255^s[i],s[i+3]=255^s[i+1];for(var r=0;r<n;++r)s[i+r+4]=t[r];return 8*(i+4+n)},Cc=function(s,e,t,n,i,r,o,c,u,h,p){mt(e,p++,t),++i[256];for(var f=qr(i,15),g=f[0],m=f[1],E=qr(r,15),v=E[0],w=E[1],S=Tc(g),C=S[0],x=S[1],$=Tc(v),P=$[0],j=$[1],N=new Fe(19),O=0;O<C.length;++O)N[31&C[O]]++;for(O=0;O<P.length;++O)N[31&P[O]]++;for(var I=qr(N,7),H=I[0],Z=I[1],b=19;b>4&&!H[Ac[b-1]];--b);var G,q,te,W,R=h+5<<3,ge=_n(i,_s)+_n(r,Bi)+o,ce=_n(i,g)+_n(r,v)+o+14+3*b+_n(N,H)+(2*N[16]+3*N[17]+7*N[18]);if(R<=ge&&R<=ce)return xo(e,p,s.subarray(u,u+h));if(mt(e,p,1+(ce<ge)),p+=2,ce<ge){G=kn(g,m),q=g,te=kn(v,w),W=v;var _e=kn(H,Z);for(mt(e,p,x-257),mt(e,p+5,j-1),mt(e,p+10,b-4),p+=14,O=0;O<b;++O)mt(e,p+3*O,H[Ac[O]]);p+=3*b;for(var Be=[C,P],ne=0;ne<2;++ne){var re=Be[ne];for(O=0;O<re.length;++O){var X=31&re[O];mt(e,p,_e[X]),p+=H[X],X>15&&(mt(e,p,re[O]>>>5&127),p+=re[O]>>>12)}}}else G=gE,q=_s,te=_E,W=Bi;for(O=0;O<c;++O)if(n[O]>255){X=n[O]>>>18&31,gn(e,p,G[X+257]),p+=q[X+257],X>7&&(mt(e,p,n[O]>>>23&31),p+=ha[X]);var ie=31&n[O];gn(e,p,te[ie]),p+=W[ie],ie>3&&(gn(e,p,n[O]>>>5&8191),p+=pa[ie])}else gn(e,p,G[n[O]]),p+=q[n[O]];return gn(e,p,G[256]),p+q[256]},mE=new Xs([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),vE=function(){for(var s=new Xs(256),e=0;e<256;++e){for(var t=e,n=9;--n;)t=(1&t&&3988292384)^t>>>1;s[e]=t}return s}(),bE=function(){var s=4294967295;return{p:function(e){for(var t=s,n=0;n<e.length;++n)t=vE[255&t^e[n]]^t>>>8;s=t},d:function(){return 4294967295^s}}},yE=function(s,e,t,n,i){return function(r,o,c,u,h,p){var f=r.length,g=new tt(u+f+5*(1+Math.floor(f/7e3))+h),m=g.subarray(u,g.length-h),E=0;if(!o||f<8)for(var v=0;v<=f;v+=65535){var w=v+65535;w<f?E=xo(m,E,r.subarray(v,w)):(m[v]=p,E=xo(m,E,r.subarray(v,f)))}else{for(var S=mE[o-1],C=S>>>13,x=8191&S,$=(1<<c)-1,P=new Fe(32768),j=new Fe($+1),N=Math.ceil(c/3),O=2*N,I=function($t){return(r[$t]^r[$t+1]<<N^r[$t+2]<<O)&$},H=new Xs(25e3),Z=new Fe(288),b=new Fe(32),G=0,q=0,te=(v=0,0),W=0,R=0;v<f;++v){var ge=I(v),ce=32767&v,_e=j[ge];if(P[ce]=_e,j[ge]=ce,W<=v){var Be=f-v;if((G>7e3||te>24576)&&Be>423){E=Cc(r,m,0,H,Z,b,q,te,R,v-R,E),te=G=q=0,R=v;for(var ne=0;ne<286;++ne)Z[ne]=0;for(ne=0;ne<30;++ne)b[ne]=0}var re=2,X=0,ie=x,Se=ce-_e&32767;if(Be>2&&ge==I(v-Se))for(var je=Math.min(C,Be)-1,ye=Math.min(32767,v),rt=Math.min(258,Be);Se<=ye&&--ie&&ce!=_e;){if(r[v+re]==r[v+re-Se]){for(var He=0;He<rt&&r[v+He]==r[v+He-Se];++He);if(He>re){if(re=He,X=Se,He>je)break;var dt=Math.min(Se,He-2),Ct=0;for(ne=0;ne<dt;++ne){var kt=v-Se+ne+32768&32767,Ot=kt-P[kt]+32768&32767;Ot>Ct&&(Ct=Ot,_e=kt)}}}Se+=(ce=_e)-(_e=P[ce])+32768&32767}if(X){H[te++]=268435456|Po[re]<<18|Sc[X];var Pt=31&Po[re],ht=31&Sc[X];q+=ha[Pt]+pa[ht],++Z[257+Pt],++b[ht],W=v+re,++G}else H[te++]=r[v],++Z[r[v]]}}E=Cc(r,m,p,H,Z,b,q,te,R,v-R,E)}return Bd(g,0,u+Fd(E)+h)}(s,e.level==null?6:e.level,e.mem==null?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(s.length)))):12+e.mem,t,n,!i)},Lo=function(s,e,t){for(;t;++e)s[e]=t,t>>>=8},EE=function(s,e){var t=e.filename;if(s[0]=31,s[1]=139,s[2]=8,s[8]=e.level<2?4:e.level==9?2:0,s[9]=3,e.mtime!=0&&Lo(s,4,Math.floor(new Date(e.mtime||Date.now())/1e3)),t){s[3]=8;for(var n=0;n<=t.length;++n)s[n+10]=t.charCodeAt(n)}},wE=function(s){return 10+(s.filename&&s.filename.length+1||0)};function jd(s,e){e===void 0&&(e={});var t=bE(),n=s.length;t.p(s);var i=yE(s,e,wE(e),8),r=i.length;return EE(i,e),Lo(i,r-8,t.d()),Lo(i,r-4,n),i}function Hd(s,e){var t=s.length;if(typeof TextEncoder<"u")return new TextEncoder().encode(s);for(var n=new tt(s.length+(s.length>>>1)),i=0,r=function(h){n[i++]=h},o=0;o<t;++o){if(i+5>n.length){var c=new tt(i+8+(t-o<<1));c.set(n),n=c}var u=s.charCodeAt(o);u<128||e?r(u):u<2048?(r(192|u>>>6),r(128|63&u)):u>55295&&u<57344?(r(240|(u=65536+(1047552&u)|1023&s.charCodeAt(++o))>>>18),r(128|u>>>12&63),r(128|u>>>6&63),r(128|63&u)):(r(224|u>>>12),r(128|u>>>6&63),r(128|63&u))}return Bd(n,0,i)}function ds(s,e,t,n){return ze(s)?s>t?(n&&A.warn(n+" cannot be  greater than max: "+t+". Using max value instead."),t):s<e?(n&&A.warn(n+" cannot be less than min: "+e+". Using min value instead."),e):s:(n&&A.warn(n+" must be a number. Defaulting to max value:"+t),t)}const AE=3e5,SE=[lt.MouseMove,lt.MouseInteraction,lt.Scroll,lt.ViewportResize,lt.Input,lt.TouchMove,lt.MediaInteraction,lt.Drag],TE=["trigger_activated","trigger_pending","trigger_disabled"],kc=s=>({rrwebMethod:s,enqueuedAt:Date.now(),attempt:1}),Pe="[SessionRecording]";function is(s){return function(e,t){for(var n="",i=0;i<e.length;){var r=e[i++];r<128||t?n+=String.fromCharCode(r):r<224?n+=String.fromCharCode((31&r)<<6|63&e[i++]):r<240?n+=String.fromCharCode((15&r)<<12|(63&e[i++])<<6|63&e[i++]):(r=((15&r)<<18|(63&e[i++])<<12|(63&e[i++])<<6|63&e[i++])-65536,n+=String.fromCharCode(55296|r>>10,56320|1023&r))}return n}(jd(Hd(JSON.stringify(s))),!0)}function Oc(s){return s.type===Bt.Custom&&s.data.tag==="sessionIdle"}class CE{constructor(e){L(this,"queuedRRWebEvents",[]);L(this,"isIdle",!1);L(this,"_linkedFlagSeen",!1);L(this,"_lastActivityTimestamp",Date.now());L(this,"_linkedFlag",null);L(this,"_removePageViewCaptureHook");L(this,"_onSessionIdListener");L(this,"_persistDecideOnSessionListener");L(this,"_samplingSessionListener");L(this,"_urlTriggers",[]);L(this,"_forceAllowLocalhostNetworkCapture",!1);L(this,"_onBeforeUnload",()=>{this._flushBuffer()});L(this,"_onOffline",()=>{this._tryAddCustomEvent("browser offline",{})});L(this,"_onOnline",()=>{this._tryAddCustomEvent("browser online",{})});L(this,"_onVisibilityChange",()=>{if(D!=null&&D.visibilityState){const e="window "+D.visibilityState;this._tryAddCustomEvent(e,{})}});if(this.instance=e,this._captureStarted=!1,this._endpoint="/s/",this.stopRrweb=void 0,this.receivedDecide=!1,!this.instance.sessionManager)throw A.error(Pe+" started without valid sessionManager"),new Error(Pe+" started without valid sessionManager. This is a bug.");const{sessionId:t,windowId:n}=this.sessionManager.checkAndGetSessionAndWindowId();this.sessionId=t,this.windowId=n,this.buffer=this.clearBuffer(),this.sessionIdleThresholdMilliseconds>=this.sessionManager.sessionTimeoutMs&&A.warn(Pe+` session_idle_threshold_ms (${this.sessionIdleThresholdMilliseconds}) is greater than the session timeout (${this.sessionManager.sessionTimeoutMs}). Session will never be detected as idle`)}get sessionIdleThresholdMilliseconds(){return this.instance.config.session_recording.session_idle_threshold_ms||3e5}get rrwebRecord(){var e,t;return K==null||(e=K.__PosthogExtensions__)===null||e===void 0||(t=e.rrweb)===null||t===void 0?void 0:t.record}get started(){return this._captureStarted}get sessionManager(){if(!this.instance.sessionManager)throw new Error(Pe+" must be started with a valid sessionManager.");return this.instance.sessionManager}get fullSnapshotIntervalMillis(){var e,t;return this.urlTriggerStatus==="trigger_pending"?6e4:(e=(t=this.instance.config.session_recording)===null||t===void 0?void 0:t.full_snapshot_interval_millis)!==null&&e!==void 0?e:AE}get isSampled(){const e=this.instance.get_property(yn);return us(e)?e:null}get sessionDuration(){var e,t;const n=(e=this.buffer)===null||e===void 0?void 0:e.data[((t=this.buffer)===null||t===void 0?void 0:t.data.length)-1],{sessionStartTimestamp:i}=this.sessionManager.checkAndGetSessionAndWindowId(!0);return n?n.timestamp-i:null}get isRecordingEnabled(){const e=!!this.instance.get_property(po),t=!this.instance.config.disable_session_recording;return y&&e&&t}get isConsoleLogCaptureEnabled(){const e=!!this.instance.get_property(ic),t=this.instance.config.enable_recording_console_log;return t??e}get canvasRecording(){var e,t,n,i,r,o;const c=this.instance.config.session_recording.captureCanvas,u=this.instance.get_property(oc),h=(e=(t=c==null?void 0:c.recordCanvas)!==null&&t!==void 0?t:u==null?void 0:u.enabled)!==null&&e!==void 0&&e,p=(n=(i=c==null?void 0:c.canvasFps)!==null&&i!==void 0?i:u==null?void 0:u.fps)!==null&&n!==void 0?n:0,f=(r=(o=c==null?void 0:c.canvasQuality)!==null&&o!==void 0?o:u==null?void 0:u.quality)!==null&&r!==void 0?r:0;return{enabled:h,fps:ds(p,0,12,"canvas recording fps"),quality:ds(f,0,1,"canvas recording quality")}}get networkPayloadCapture(){var e,t;const n=this.instance.get_property(rc),i={recordHeaders:(e=this.instance.config.session_recording)===null||e===void 0?void 0:e.recordHeaders,recordBody:(t=this.instance.config.session_recording)===null||t===void 0?void 0:t.recordBody},r=(i==null?void 0:i.recordHeaders)||(n==null?void 0:n.recordHeaders),o=(i==null?void 0:i.recordBody)||(n==null?void 0:n.recordBody),c=de(this.instance.config.capture_performance)?this.instance.config.capture_performance.network_timing:this.instance.config.capture_performance,u=!!(us(c)?c:n!=null&&n.capturePerformance);return r||o||u?{recordHeaders:r,recordBody:o,recordPerformance:u}:void 0}get sampleRate(){const e=this.instance.get_property(ac);return ze(e)?e:null}get minimumDuration(){const e=this.instance.get_property(lc);return ze(e)?e:null}get status(){return this.receivedDecide?this.isRecordingEnabled?oe(this._linkedFlag)||this._linkedFlagSeen?this.urlTriggerStatus==="trigger_pending"?"buffering":us(this.isSampled)?this.isSampled?"sampled":"disabled":"active":"buffering":"disabled":"buffering"}get urlTriggerStatus(){var e,t;if(this.receivedDecide&&this._urlTriggers.length===0)return"trigger_disabled";const n=(e=this.instance)===null||e===void 0?void 0:e.get_property(oi);var i,r,o,c;return((t=this.instance)===null||t===void 0?void 0:t.get_property(ri))!==this.sessionId?((i=this.instance)===null||i===void 0||(r=i.persistence)===null||r===void 0||r.unregister(ri),(o=this.instance)===null||o===void 0||(c=o.persistence)===null||c===void 0||c.unregister(oi),"trigger_pending"):TE.includes(n)?n:"trigger_pending"}set urlTriggerStatus(e){var t,n;(t=this.instance)===null||t===void 0||(n=t.persistence)===null||n===void 0||n.register({[ri]:this.sessionId,[oi]:e})}startIfEnabledOrStop(e){this.isRecordingEnabled?(this._startCapture(e),y==null||y.addEventListener("beforeunload",this._onBeforeUnload),y==null||y.addEventListener("offline",this._onOffline),y==null||y.addEventListener("online",this._onOnline),y==null||y.addEventListener("visibilitychange",this._onVisibilityChange),this._setupSampling(),oe(this._removePageViewCaptureHook)&&(this._removePageViewCaptureHook=this.instance._addCaptureHook(t=>{try{if(t==="$pageview"){const n=y?this._maskUrl(y.location.href):"";if(!n)return;this._tryAddCustomEvent("$pageview",{href:n})}}catch(n){A.error("Could not add $pageview to rrweb session",n)}})),this._onSessionIdListener||(this._onSessionIdListener=this.sessionManager.onSessionId((t,n,i)=>{var r,o,c,u;i&&(this._tryAddCustomEvent("$session_id_change",{sessionId:t,windowId:n,changeReason:i}),(r=this.instance)===null||r===void 0||(o=r.persistence)===null||o===void 0||o.unregister(ri),(c=this.instance)===null||c===void 0||(u=c.persistence)===null||u===void 0||u.unregister(oi))}))):this.stopRecording()}stopRecording(){var e,t,n;this._captureStarted&&this.stopRrweb&&(this.stopRrweb(),this.stopRrweb=void 0,this._captureStarted=!1,y==null||y.removeEventListener("beforeunload",this._onBeforeUnload),y==null||y.removeEventListener("offline",this._onOffline),y==null||y.removeEventListener("online",this._onOnline),y==null||y.removeEventListener("visibilitychange",this._onVisibilityChange),this.clearBuffer(),clearInterval(this._fullSnapshotTimer),(e=this._removePageViewCaptureHook)===null||e===void 0||e.call(this),this._removePageViewCaptureHook=void 0,(t=this._onSessionIdListener)===null||t===void 0||t.call(this),this._onSessionIdListener=void 0,(n=this._samplingSessionListener)===null||n===void 0||n.call(this),this._samplingSessionListener=void 0,A.info(Pe+" stopped"))}makeSamplingDecision(e){var t;const n=this.sessionId!==e,i=this.sampleRate;var r;if(!ze(i))return void((r=this.instance.persistence)===null||r===void 0||r.register({[yn]:null}));const o=this.isSampled;let c;const u=n||!us(o);u?c=Math.random()<i:c=o,u&&(c?this._reportStarted("sampling"):A.warn(Pe+` Sample rate (${i}) has determined that this sessionId (${e}) will not be sent to the server.`),this._tryAddCustomEvent("samplingDecisionMade",{sampleRate:i,isSampled:c})),(t=this.instance.persistence)===null||t===void 0||t.register({[yn]:c})}afterDecideResponse(e){var t,n,i,r;if(this._persistDecideResponse(e),this._linkedFlag=((t=e.sessionRecording)===null||t===void 0?void 0:t.linkedFlag)||null,(n=e.sessionRecording)!==null&&n!==void 0&&n.endpoint&&(this._endpoint=(r=e.sessionRecording)===null||r===void 0?void 0:r.endpoint),this._setupSampling(),!oe(this._linkedFlag)&&!this._linkedFlagSeen){const o=Ce(this._linkedFlag)?this._linkedFlag:this._linkedFlag.flag,c=Ce(this._linkedFlag)?null:this._linkedFlag.variant;this.instance.onFeatureFlags((u,h)=>{const p=de(h)&&o in h,f=c?h[o]===c:p;if(f){const g={linkedFlag:o,linkedVariant:c},m="linked flag matched";A.info(Pe+" "+m,g),this._tryAddCustomEvent(m,g),this._reportStarted("linked_flag_match")}this._linkedFlagSeen=f})}(i=e.sessionRecording)!==null&&i!==void 0&&i.urlTriggers&&(this._urlTriggers=e.sessionRecording.urlTriggers),this.receivedDecide=!0,this.startIfEnabledOrStop()}_setupSampling(){ze(this.sampleRate)&&oe(this._samplingSessionListener)&&(this._samplingSessionListener=this.sessionManager.onSessionId(e=>{this.makeSamplingDecision(e)}))}_persistDecideResponse(e){if(this.instance.persistence){var t;const n=this.instance.persistence,i=()=>{var r,o,c,u,h,p,f;const g=(r=e.sessionRecording)===null||r===void 0?void 0:r.sampleRate,m=oe(g)?null:parseFloat(g),E=(o=e.sessionRecording)===null||o===void 0?void 0:o.minimumDurationMilliseconds;n.register({[po]:!!e.sessionRecording,[ic]:(c=e.sessionRecording)===null||c===void 0?void 0:c.consoleLogRecordingEnabled,[rc]:{capturePerformance:e.capturePerformance,...(u=e.sessionRecording)===null||u===void 0?void 0:u.networkPayloadCapture},[oc]:{enabled:(h=e.sessionRecording)===null||h===void 0?void 0:h.recordCanvas,fps:(p=e.sessionRecording)===null||p===void 0?void 0:p.canvasFps,quality:(f=e.sessionRecording)===null||f===void 0?void 0:f.canvasQuality},[ac]:m,[lc]:M(E)?null:E})};i(),(t=this._persistDecideOnSessionListener)===null||t===void 0||t.call(this),this._persistDecideOnSessionListener=this.sessionManager.onSessionId(i)}}log(e){var t;let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"log";(t=this.instance.sessionRecording)===null||t===void 0||t.onRRwebEmit({type:6,data:{plugin:"rrweb/console@1",payload:{level:n,trace:[],payload:[JSON.stringify(e)]}},timestamp:Date.now()})}_startCapture(e){if(!M(Object.assign)&&!M(Array.from)&&!(this._captureStarted||this.instance.config.disable_session_recording||this.instance.consent.isOptedOut())){var t,n;this._captureStarted=!0,this.sessionManager.checkAndGetSessionAndWindowId(),this.rrwebRecord?this._onScriptLoaded():(t=K.__PosthogExtensions__)===null||t===void 0||(n=t.loadExternalDependency)===null||n===void 0||n.call(t,this.instance,"recorder",i=>{if(i)return A.error(Pe+" could not load recorder",i);this._onScriptLoaded()}),A.info(Pe+" starting"),this.status==="active"&&this._reportStarted(e||"recording_initialized")}}isInteractiveEvent(e){var t;return e.type===3&&SE.indexOf((t=e.data)===null||t===void 0?void 0:t.source)!==-1}_updateWindowAndSessionIds(e){const t=this.isInteractiveEvent(e);!t&&!this.isIdle&&e.timestamp-this._lastActivityTimestamp>this.sessionIdleThresholdMilliseconds&&(this.isIdle=!0,clearInterval(this._fullSnapshotTimer),this._tryAddCustomEvent("sessionIdle",{eventTimestamp:e.timestamp,lastActivityTimestamp:this._lastActivityTimestamp,threshold:this.sessionIdleThresholdMilliseconds,bufferLength:this.buffer.data.length,bufferSize:this.buffer.size}),this._flushBuffer());let n=!1;if(t&&(this._lastActivityTimestamp=e.timestamp,this.isIdle&&(this.isIdle=!1,this._tryAddCustomEvent("sessionNoLongerIdle",{reason:"user activity",type:e.type}),n=!0)),this.isIdle)return;const{windowId:i,sessionId:r}=this.sessionManager.checkAndGetSessionAndWindowId(!t,e.timestamp),o=this.sessionId!==r,c=this.windowId!==i;this.windowId=i,this.sessionId=r,o||c?(this.stopRecording(),this.startIfEnabledOrStop("session_id_changed")):n&&this._scheduleFullSnapshot()}_tryRRWebMethod(e){try{return e.rrwebMethod(),!0}catch(t){return this.queuedRRWebEvents.length<10?this.queuedRRWebEvents.push({enqueuedAt:e.enqueuedAt||Date.now(),attempt:e.attempt++,rrwebMethod:e.rrwebMethod}):A.warn(Pe+" could not emit queued rrweb event.",t,e),!1}}_tryAddCustomEvent(e,t){return this._tryRRWebMethod(kc(()=>this.rrwebRecord.addCustomEvent(e,t)))}_tryTakeFullSnapshot(){return this._tryRRWebMethod(kc(()=>this.rrwebRecord.takeFullSnapshot()))}_onScriptLoaded(){var e;const t={blockClass:"ph-no-capture",blockSelector:void 0,ignoreClass:"ph-ignore-input",maskTextClass:"ph-mask",maskTextSelector:void 0,maskTextFn:void 0,maskAllInputs:!0,maskInputOptions:{password:!0},maskInputFn:void 0,slimDOMOptions:{},collectFonts:!1,inlineStylesheet:!0,recordCrossOriginIframes:!1},n=this.instance.config.session_recording;for(const[r,o]of Object.entries(n||{}))r in t&&(r==="maskInputOptions"?t.maskInputOptions={password:!0,...o}:t[r]=o);if(this.canvasRecording&&this.canvasRecording.enabled&&(t.recordCanvas=!0,t.sampling={canvas:this.canvasRecording.fps},t.dataURLOptions={type:"image/webp",quality:this.canvasRecording.quality}),!this.rrwebRecord)return void A.error(Pe+"onScriptLoaded was called but rrwebRecord is not available. This indicates something has gone wrong.");this.mutationRateLimiter=(e=this.mutationRateLimiter)!==null&&e!==void 0?e:new pE(this.rrwebRecord,{onBlockedNode:(r,o)=>{const c=`Too many mutations on node '${r}'. Rate limiting. This could be due to SVG animations or something similar`;A.info(c,{node:o}),this.log(Pe+" "+c,"warn")}});const i=this._gatherRRWebPlugins();this.stopRrweb=this.rrwebRecord({emit:r=>{this.onRRwebEmit(r)},plugins:i,...t}),this._lastActivityTimestamp=Date.now(),this.isIdle=!1,this._tryAddCustomEvent("$session_options",{sessionRecordingOptions:t,activePlugins:i.map(r=>r==null?void 0:r.name)}),this._tryAddCustomEvent("$posthog_config",{config:this.instance.config})}_scheduleFullSnapshot(){if(this._fullSnapshotTimer&&clearInterval(this._fullSnapshotTimer),this.isIdle)return;const e=this.fullSnapshotIntervalMillis;e&&(this._fullSnapshotTimer=setInterval(()=>{this._tryTakeFullSnapshot()},e))}_gatherRRWebPlugins(){var e,t,n,i;const r=[],o=(e=K.__PosthogExtensions__)===null||e===void 0||(t=e.rrwebPlugins)===null||t===void 0?void 0:t.getRecordConsolePlugin;o&&this.isConsoleLogCaptureEnabled&&r.push(o());const c=(n=K.__PosthogExtensions__)===null||n===void 0||(i=n.rrwebPlugins)===null||i===void 0?void 0:i.getRecordNetworkPlugin;return this.networkPayloadCapture&&Qe(c)&&(!W0.includes(location.hostname)||this._forceAllowLocalhostNetworkCapture?r.push(c(hE(this.instance.config,this.networkPayloadCapture))):A.info(Pe+" NetworkCapture not started because we are on localhost.")),r}onRRwebEmit(e){var t;if(this._processQueuedEvents(),!e||!de(e))return;if(e.type===Bt.Meta){const c=this._maskUrl(e.data.href);if(this._lastHref=c,!c)return;e.data.href=c}else this._pageViewFallBack();this._checkUrlTrigger(),e.type===Bt.FullSnapshot&&this._scheduleFullSnapshot(),e.type===Bt.FullSnapshot&&this.urlTriggerStatus==="trigger_pending"&&this.clearBuffer();const n=this.mutationRateLimiter?this.mutationRateLimiter.throttleMutations(e):e;if(!n)return;const i=function(c){const u=c;if(u&&de(u)&&u.type===6&&de(u.data)&&u.data.plugin==="rrweb/console@1"){u.data.payload.payload.length>10&&(u.data.payload.payload=u.data.payload.payload.slice(0,10),u.data.payload.payload.push("...[truncated]"));const h=[];for(let p=0;p<u.data.payload.payload.length;p++)u.data.payload.payload[p]&&u.data.payload.payload[p].length>2e3?h.push(u.data.payload.payload[p].slice(0,2e3)+"...[truncated]"):h.push(u.data.payload.payload[p]);return u.data.payload.payload=h,c}return c}(n);if(this._updateWindowAndSessionIds(i),this.isIdle&&!Oc(i))return;if(Oc(i)){const c=i.data.payload;if(c){const u=c.lastActivityTimestamp,h=c.threshold;i.timestamp=u+h}}const r=(t=this.instance.config.session_recording.compress_events)===null||t===void 0||t?function(c){if(Ni(c)<1024)return c;try{if(c.type===Bt.FullSnapshot)return{...c,data:is(c.data),cv:"2024-10"};if(c.type===Bt.IncrementalSnapshot&&c.data.source===lt.Mutation)return{...c,cv:"2024-10",data:{...c.data,texts:is(c.data.texts),attributes:is(c.data.attributes),removes:is(c.data.removes),adds:is(c.data.adds)}};if(c.type===Bt.IncrementalSnapshot&&c.data.source===lt.StyleSheetRule)return{...c,cv:"2024-10",data:{...c.data,adds:is(c.data.adds),removes:is(c.data.removes)}}}catch(u){A.error(Pe+" could not compress event - will use uncompressed event",u)}return c}(i):i,o={$snapshot_bytes:Ni(r),$snapshot_data:r,$session_id:this.sessionId,$window_id:this.windowId};this.status!=="disabled"?this._captureSnapshotBuffered(o):this.clearBuffer()}_pageViewFallBack(){if(this.instance.config.capture_pageview||!y)return;const e=this._maskUrl(y.location.href);this._lastHref!==e&&(this._tryAddCustomEvent("$url_changed",{href:e}),this._lastHref=e)}_processQueuedEvents(){if(this.queuedRRWebEvents.length){const e=[...this.queuedRRWebEvents];this.queuedRRWebEvents=[],e.forEach(t=>{Date.now()-t.enqueuedAt<=2e3&&this._tryRRWebMethod(t)})}}_maskUrl(e){const t=this.instance.config.session_recording;if(t.maskNetworkRequestFn){var n;let i={url:e};return i=t.maskNetworkRequestFn(i),(n=i)===null||n===void 0?void 0:n.url}return e}clearBuffer(){return this.buffer={size:0,data:[],sessionId:this.sessionId,windowId:this.windowId},this.buffer}_flushBuffer(){this.flushBufferTimer&&(clearTimeout(this.flushBufferTimer),this.flushBufferTimer=void 0);const e=this.minimumDuration,t=this.sessionDuration,n=ze(t)&&t>=0,i=ze(e)&&n&&t<e;return this.status==="buffering"||i?(this.flushBufferTimer=setTimeout(()=>{this._flushBuffer()},2e3),this.buffer):(this.buffer.data.length>0&&So(this.buffer).forEach(r=>{this._captureSnapshot({$snapshot_bytes:r.size,$snapshot_data:r.data,$session_id:r.sessionId,$window_id:r.windowId})}),this.clearBuffer())}_captureSnapshotBuffered(e){var t;const n=2+(((t=this.buffer)===null||t===void 0?void 0:t.data.length)||0);!this.isIdle&&(this.buffer.size+e.$snapshot_bytes+n>943718.4||this.buffer.sessionId!==this.sessionId)&&(this.buffer=this._flushBuffer()),this.buffer.size+=e.$snapshot_bytes,this.buffer.data.push(e.$snapshot_data),this.flushBufferTimer||this.isIdle||(this.flushBufferTimer=setTimeout(()=>{this._flushBuffer()},2e3))}_captureSnapshot(e){this.instance.capture("$snapshot",e,{_url:this.instance.requestRouter.endpointFor("api",this._endpoint),_noTruncate:!0,_batchKey:"recordings",skip_client_rate_limiting:!0})}_checkUrlTrigger(){if(y===void 0||!y.location.href)return;const e=y.location.href;this._urlTriggers.some(t=>t.matching==="regex"&&new RegExp(t.url).test(e))&&this._activateUrlTrigger()}_activateUrlTrigger(){this.urlTriggerStatus==="trigger_pending"&&(this.urlTriggerStatus="trigger_activated",this._tryAddCustomEvent("url trigger activated",{}),this._flushBuffer(),A.info(Pe+" recording triggered by URL pattern match"))}overrideLinkedFlag(){this._linkedFlagSeen=!0,this._reportStarted("linked_flag_override")}overrideSampling(){var e;(e=this.instance.persistence)===null||e===void 0||e.register({[yn]:!0}),this._reportStarted("sampling_override")}_reportStarted(e){(arguments.length>1&&arguments[1]!==void 0?arguments[1]:()=>!0)()&&this.instance.register_for_session({$session_recording_start_reason:e})}}class kE{constructor(e){this.instance=e,this.instance.decideEndpointWasHit=this.instance._hasBootstrappedFeatureFlags()}call(){const e={token:this.instance.config.token,distinct_id:this.instance.get_distinct_id(),groups:this.instance.getGroups(),person_properties:this.instance.get_property(Ms),group_properties:this.instance.get_property(Ft),disable_flags:this.instance.config.advanced_disable_feature_flags||this.instance.config.advanced_disable_feature_flags_on_first_load||void 0};this.instance._send_request({method:"POST",url:this.instance.requestRouter.endpointFor("api","/decide/?v=3"),data:e,compression:this.instance.config.disable_compression?void 0:ct.Base64,timeout:this.instance.config.feature_flag_request_timeout_ms,callback:t=>this.parseDecideResponse(t.json)})}parseDecideResponse(e){this.instance.featureFlags.setReloadingPaused(!1),this.instance.featureFlags._startReloadTimer();const t=!e;if(this.instance.config.advanced_disable_feature_flags_on_first_load||this.instance.config.advanced_disable_feature_flags||this.instance.featureFlags.receivedFeatureFlags(e??{},t),t)A.error("Failed to fetch feature flags from PostHog.");else{if(!D||!D.body)return A.info("document not ready yet, trying again in 500 milliseconds..."),void setTimeout(()=>{this.parseDecideResponse(e)},500);if(this.instance._afterDecideResponse(e),e.siteApps)if(this.instance.config.opt_in_site_apps)for(const{id:o,url:c}of e.siteApps){var n,i,r;K[`__$$ph_site_app_${o}`]=this.instance,(n=K.__PosthogExtensions__)===null||n===void 0||(i=(r=n).loadSiteApp)===null||i===void 0||i.call(r,this.instance,c,u=>{if(u)return A.error(`Error while initializing PostHog app with config id ${o}`,u)})}else e.siteApps.length>0&&A.error('PostHog site apps are disabled. Enable the "opt_in_site_apps" config to proceed.')}}}const OE=y!=null&&y.location?Ri(y.location.hash,"__posthog")||Ri(location.hash,"state"):null,Pc="_postHogToolbarParams";var bt;(function(s){s[s.UNINITIALIZED=0]="UNINITIALIZED",s[s.LOADING=1]="LOADING",s[s.LOADED=2]="LOADED"})(bt||(bt={}));class PE{constructor(e){this.instance=e}setToolbarState(e){K.ph_toolbar_state=e}getToolbarState(){var e;return(e=K.ph_toolbar_state)!==null&&e!==void 0?e:bt.UNINITIALIZED}maybeLoadToolbar(){var e,t;let n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:void 0,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:void 0,r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0;if(!y||!D)return!1;n=(e=n)!==null&&e!==void 0?e:y.location,r=(t=r)!==null&&t!==void 0?t:y.history;try{if(!i){try{y.localStorage.setItem("test","test"),y.localStorage.removeItem("test")}catch{return!1}i=y==null?void 0:y.localStorage}const o=OE||Ri(n.hash,"__posthog")||Ri(n.hash,"state");let c;const u=o?Ql(()=>JSON.parse(atob(decodeURIComponent(o))))||Ql(()=>JSON.parse(decodeURIComponent(o))):null;return u&&u.action==="ph_authorize"?(c=u,c.source="url",c&&Object.keys(c).length>0&&(u.desiredHash?n.hash=u.desiredHash:r?r.replaceState(r.state,"",n.pathname+n.search):n.hash="")):(c=JSON.parse(i.getItem(Pc)||"{}"),c.source="localstorage",delete c.userIntent),!(!c.token||this.instance.config.token!==c.token)&&(this.loadToolbar(c),!0)}catch{return!1}}_callLoadToolbar(e){(K.ph_load_toolbar||K.ph_load_editor)(e,this.instance)}loadToolbar(e){const t=!(D==null||!D.getElementById(yo));if(!y||t)return!1;const n=this.instance.requestRouter.region==="custom"&&this.instance.config.advanced_disable_toolbar_metrics,i={token:this.instance.config.token,...e,apiURL:this.instance.requestRouter.endpointFor("ui"),...n?{instrument:!1}:{}};if(y.localStorage.setItem(Pc,JSON.stringify({...i,source:void 0})),this.getToolbarState()===bt.LOADED)this._callLoadToolbar(i);else if(this.getToolbarState()===bt.UNINITIALIZED){var r,o;this.setToolbarState(bt.LOADING),(r=K.__PosthogExtensions__)===null||r===void 0||(o=r.loadExternalDependency)===null||o===void 0||o.call(r,this.instance,"toolbar",c=>{if(c)return A.error("Failed to load toolbar",c),void this.setToolbarState(bt.UNINITIALIZED);this.setToolbarState(bt.LOADED),this._callLoadToolbar(i)}),yt(y,"turbolinks:load",()=>{this.setToolbarState(bt.UNINITIALIZED),this.loadToolbar(i)})}return!0}_loadEditor(e){return this.loadToolbar(e)}maybeLoadEditor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:void 0,t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:void 0,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0;return this.maybeLoadToolbar(e,t,n)}}class $E{constructor(e){L(this,"isPaused",!0);L(this,"queue",[]);L(this,"flushTimeoutMs",3e3);this.sendRequest=e}enqueue(e){this.queue.push(e),this.flushTimeout||this.setFlushTimeout()}unload(){this.clearFlushTimeout();const e=this.queue.length>0?this.formatQueue():{},t=Object.values(e);[...t.filter(i=>i.url.indexOf("/e")===0),...t.filter(i=>i.url.indexOf("/e")!==0)].map(i=>{this.sendRequest({...i,transport:"sendBeacon"})})}enable(){this.isPaused=!1,this.setFlushTimeout()}setFlushTimeout(){this.isPaused||(this.flushTimeout=setTimeout(()=>{if(this.clearFlushTimeout(),this.queue.length>0){const e=this.formatQueue();for(const t in e){const n=e[t],i=new Date().getTime();n.data&&fe(n.data)&&J(n.data,r=>{r.offset=Math.abs(r.timestamp-i),delete r.timestamp}),this.sendRequest(n)}}},this.flushTimeoutMs))}clearFlushTimeout(){clearTimeout(this.flushTimeout),this.flushTimeout=void 0}formatQueue(){const e={};return J(this.queue,t=>{var n;const i=t,r=(i?i.batchKey:null)||i.url;M(e[r])&&(e[r]={...i,data:[]}),(n=e[r].data)===null||n===void 0||n.push(i.data)}),this.queue=[],e}}const xE=!!oa||!!ra,$c="text/plain",ji=(s,e)=>{const[t,n]=s.split("?"),i={...e};n==null||n.split("&").forEach(o=>{const[c]=o.split("=");delete i[c]});let r=U0(i);return r=r?(n?n+"&":"")+r:n,`${t}?${r}`},fa=s=>{let{data:e,compression:t}=s;if(!e)return;if(t===ct.GZipJS){const i=jd(Hd(JSON.stringify(e)),{mtime:0}),r=new Blob([i],{type:$c});return{contentType:$c,body:r,estimatedSize:r.size}}if(t===ct.Base64){const i=function(o){const c="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";let u,h,p,f,g,m,E,v,w=0,S=0,C="";const x=[];if(!o)return o;o=x0(o);do u=o.charCodeAt(w++),h=o.charCodeAt(w++),p=o.charCodeAt(w++),v=u<<16|h<<8|p,f=v>>18&63,g=v>>12&63,m=v>>6&63,E=63&v,x[S++]=c.charAt(f)+c.charAt(g)+c.charAt(m)+c.charAt(E);while(w<o.length);switch(C=x.join(""),o.length%3){case 1:C=C.slice(0,-2)+"==";break;case 2:C=C.slice(0,-1)+"="}return C}(JSON.stringify(e)),r=(o=>"data="+encodeURIComponent(typeof o=="string"?o:JSON.stringify(o)))(i);return{contentType:"application/x-www-form-urlencoded",body:r,estimatedSize:new Blob([r]).size}}const n=JSON.stringify(e);return{contentType:"application/json",body:n,estimatedSize:new Blob([n]).size}},LE=s=>{var e;const t=new oa;t.open(s.method||"GET",s.url,!0);const{contentType:n,body:i}=(e=fa(s))!==null&&e!==void 0?e:{};J(s.headers,function(r,o){t.setRequestHeader(o,r)}),n&&t.setRequestHeader("Content-Type",n),s.timeout&&(t.timeout=s.timeout),t.withCredentials=!0,t.onreadystatechange=()=>{if(t.readyState===4){var r;const o={statusCode:t.status,text:t.responseText};if(t.status===200)try{o.json=JSON.parse(t.responseText)}catch{}(r=s.callback)===null||r===void 0||r.call(s,o)}},t.send(i)},IE=s=>{var e,t;const{contentType:n,body:i,estimatedSize:r}=(e=fa(s))!==null&&e!==void 0?e:{},o=new Headers;J(s.headers,function(h,p){o.append(p,h)}),n&&o.append("Content-Type",n);const c=s.url;let u=null;if(Gl){const h=new Gl;u={signal:h.signal,timeout:setTimeout(()=>h.abort(),s.timeout)}}ra(c,{method:(s==null?void 0:s.method)||"GET",headers:o,keepalive:s.method==="POST"&&(r||0)<65536,body:i,signal:(t=u)===null||t===void 0?void 0:t.signal}).then(h=>h.text().then(p=>{var f;const g={statusCode:h.status,text:p};if(h.status===200)try{g.json=JSON.parse(p)}catch(m){A.error(m)}(f=s.callback)===null||f===void 0||f.call(s,g)})).catch(h=>{var p;A.error(h),(p=s.callback)===null||p===void 0||p.call(s,{statusCode:0,text:h})}).finally(()=>u?clearTimeout(u.timeout):null)},RE=s=>{const e=ji(s.url,{beacon:"1"});try{var t;const{contentType:n,body:i}=(t=fa(s))!==null&&t!==void 0?t:{},r=typeof i=="string"?new Blob([i],{type:n}):i;Ke.sendBeacon(e,r)}catch{}},On=[];oa&&On.push({transport:"XHR",method:LE}),ra&&On.push({transport:"fetch",method:IE}),Ke!=null&&Ke.sendBeacon&&On.push({transport:"sendBeacon",method:RE});class DE{constructor(e){L(this,"isPolling",!1);L(this,"pollIntervalMs",3e3);L(this,"queue",[]);this.instance=e,this.queue=[],this.areWeOnline=!0,!M(y)&&"onLine"in y.navigator&&(this.areWeOnline=y.navigator.onLine,y.addEventListener("online",()=>{this.areWeOnline=!0,this.flush()}),y.addEventListener("offline",()=>{this.areWeOnline=!1}))}retriableRequest(e){let{retriesPerformedSoFar:t,...n}=e;ze(t)&&t>0&&(n.url=ji(n.url,{retry_count:t})),this.instance._send_request({...n,callback:i=>{var r;i.statusCode!==200&&(i.statusCode<400||i.statusCode>=500)&&(t??0)<10?this.enqueue({retriesPerformedSoFar:t,...n}):(r=n.callback)===null||r===void 0||r.call(n,i)}})}enqueue(e){const t=e.retriesPerformedSoFar||0;e.retriesPerformedSoFar=t+1;const n=function(o){const c=3e3*2**o,u=c/2,h=Math.min(18e5,c),p=(Math.random()-.5)*(h-u);return Math.ceil(h+p)}(t),i=Date.now()+n;this.queue.push({retryAt:i,requestOptions:e});let r=`Enqueued failed request for retry in ${n}`;navigator.onLine||(r+=" (Browser is offline)"),A.warn(r),this.isPolling||(this.isPolling=!0,this.poll())}poll(){this.poller&&clearTimeout(this.poller),this.poller=setTimeout(()=>{this.areWeOnline&&this.queue.length>0&&this.flush(),this.poll()},this.pollIntervalMs)}flush(){const e=Date.now(),t=[],n=this.queue.filter(i=>i.retryAt<e||(t.push(i),!1));if(this.queue=t,n.length>0)for(const{requestOptions:i}of n)this.retriableRequest(i)}unload(){this.poller&&(clearTimeout(this.poller),this.poller=void 0);for(const{requestOptions:e}of this.queue)try{this.instance._send_request({...e,transport:"sendBeacon"})}catch(t){A.error(t)}this.queue=[]}}class NE{constructor(e,t,n,i){L(this,"_sessionIdChangedHandlers",[]);var r;this.config=e,this.persistence=t,this._windowId=void 0,this._sessionId=void 0,this._sessionStartTimestamp=null,this._sessionActivityTimestamp=null,this._sessionIdGenerator=n||Ht,this._windowIdGenerator=i||Ht;const o=e.persistence_name||e.token,c=e.session_idle_timeout_seconds||1800;if(this._sessionTimeoutMs=1e3*ds(c,60,1800,"session_idle_timeout_seconds"),this._window_id_storage_key="ph_"+o+"_window_id",this._primary_window_exists_storage_key="ph_"+o+"_primary_window_exists",this._canUseSessionStorage()){const u=Ae.parse(this._window_id_storage_key),h=Ae.parse(this._primary_window_exists_storage_key);u&&!h?this._windowId=u:Ae.remove(this._window_id_storage_key),Ae.set(this._primary_window_exists_storage_key,!0)}if((r=this.config.bootstrap)!==null&&r!==void 0&&r.sessionID)try{const u=(h=>{const p=h.replace(/-/g,"");if(p.length!==32)throw new Error("Not a valid UUID");if(p[12]!=="7")throw new Error("Not a UUIDv7");return parseInt(p.substring(0,12),16)})(this.config.bootstrap.sessionID);this._setSessionId(this.config.bootstrap.sessionID,new Date().getTime(),u)}catch(u){A.error("Invalid sessionID in bootstrap",u)}this._listenToReloadWindow()}get sessionTimeoutMs(){return this._sessionTimeoutMs}onSessionId(e){return M(this._sessionIdChangedHandlers)&&(this._sessionIdChangedHandlers=[]),this._sessionIdChangedHandlers.push(e),this._sessionId&&e(this._sessionId,this._windowId),()=>{this._sessionIdChangedHandlers=this._sessionIdChangedHandlers.filter(t=>t!==e)}}_canUseSessionStorage(){return this.config.persistence!=="memory"&&!this.persistence.disabled&&Ae.is_supported()}_setWindowId(e){e!==this._windowId&&(this._windowId=e,this._canUseSessionStorage()&&Ae.set(this._window_id_storage_key,e))}_getWindowId(){return this._windowId?this._windowId:this._canUseSessionStorage()?Ae.parse(this._window_id_storage_key):null}_setSessionId(e,t,n){e===this._sessionId&&t===this._sessionActivityTimestamp&&n===this._sessionStartTimestamp||(this._sessionStartTimestamp=n,this._sessionActivityTimestamp=t,this._sessionId=e,this.persistence.register({[Pi]:[t,e,n]}))}_getSessionId(){if(this._sessionId&&this._sessionActivityTimestamp&&this._sessionStartTimestamp)return[this._sessionActivityTimestamp,this._sessionId,this._sessionStartTimestamp];const e=this.persistence.props[Pi];return fe(e)&&e.length===2&&e.push(e[0]),e||[0,null,0]}resetSessionId(){this._setSessionId(null,null,null)}_listenToReloadWindow(){y==null||y.addEventListener("beforeunload",()=>{this._canUseSessionStorage()&&Ae.remove(this._primary_window_exists_storage_key)})}checkAndGetSessionAndWindowId(){let e=arguments.length>0&&arguments[0]!==void 0&&arguments[0];const t=(arguments.length>1&&arguments[1]!==void 0?arguments[1]:null)||new Date().getTime();let[n,i,r]=this._getSessionId(),o=this._getWindowId();const c=ze(r)&&r>0&&Math.abs(t-r)>864e5;let u=!1;const h=!i,p=!e&&Math.abs(t-n)>this.sessionTimeoutMs;h||p||c?(i=this._sessionIdGenerator(),o=this._windowIdGenerator(),A.info("[SessionId] new session ID generated",{sessionId:i,windowId:o,changeReason:{noSessionId:h,activityTimeout:p,sessionPastMaximumLength:c}}),r=t,u=!0):o||(o=this._windowIdGenerator(),u=!0);const f=n===0||!e||c?t:n,g=r===0?new Date().getTime():r;return this._setWindowId(o),this._setSessionId(i,f,g),u&&this._sessionIdChangedHandlers.forEach(m=>m(i,o,u?{noSessionId:h,activityTimeout:p,sessionPastMaximumLength:c}:void 0)),{sessionId:i,windowId:o,sessionStartTimestamp:g,changeReason:u?{noSessionId:h,activityTimeout:p,sessionPastMaximumLength:c}:void 0,lastActivityTimestamp:n}}}let hs;(function(s){s.US="us",s.EU="eu",s.CUSTOM="custom"})(hs||(hs={}));const xc="i.posthog.com";class ME{constructor(e){L(this,"_regionCache",{});this.instance=e}get apiHost(){const e=this.instance.config.api_host.trim().replace(/\/$/,"");return e==="https://app.posthog.com"?"https://us.i.posthog.com":e}get uiHost(){var e;let t=(e=this.instance.config.ui_host)===null||e===void 0?void 0:e.replace(/\/$/,"");return t||(t=this.apiHost.replace(`.${xc}`,".posthog.com")),t==="https://app.posthog.com"?"https://us.posthog.com":t}get region(){return this._regionCache[this.apiHost]||(/https:\/\/(app|us|us-assets)(\.i)?\.posthog\.com/i.test(this.apiHost)?this._regionCache[this.apiHost]=hs.US:/https:\/\/(eu|eu-assets)(\.i)?\.posthog\.com/i.test(this.apiHost)?this._regionCache[this.apiHost]=hs.EU:this._regionCache[this.apiHost]=hs.CUSTOM),this._regionCache[this.apiHost]}endpointFor(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";if(t&&(t=t[0]==="/"?t:`/${t}`),e==="ui")return this.uiHost+t;if(this.region===hs.CUSTOM)return this.apiHost+t;const n=xc+t;switch(e){case"assets":return`https://${this.region}-assets.${n}`;case"api":return`https://${this.region}.${n}`}}}const Vd="posthog-js";function Wd(s){let{organization:e,projectId:t,prefix:n,severityAllowList:i=["error"]}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return r=>{var o,c,u,h,p;if(!(i==="*"||i.includes(r.level))||!s.__loaded)return r;r.tags||(r.tags={});const f=s.requestRouter.endpointFor("ui",`/project/${s.config.token}/person/${s.get_distinct_id()}`);r.tags["PostHog Person URL"]=f,s.sessionRecordingStarted()&&(r.tags["PostHog Recording URL"]=s.get_session_replay_url({withTimestamp:!0}));const g=((o=r.exception)===null||o===void 0?void 0:o.values)||[],m={$exception_message:((c=g[0])===null||c===void 0?void 0:c.value)||r.message,$exception_type:(u=g[0])===null||u===void 0?void 0:u.type,$exception_personURL:f,$exception_level:r.level,$exception_list:g,$sentry_event_id:r.event_id,$sentry_exception:r.exception,$sentry_exception_message:((h=g[0])===null||h===void 0?void 0:h.value)||r.message,$sentry_exception_type:(p=g[0])===null||p===void 0?void 0:p.type,$sentry_tags:r.tags,$level:r.level};return e&&t&&(m.$sentry_url=(n||"https://sentry.io/organizations/")+e+"/issues/?project="+t+"&query="+r.event_id),s.exceptions.sendExceptionEvent(m),r}}class FE{constructor(e,t,n,i,r){this.name=Vd,this.setupOnce=function(o){o(Wd(e,{organization:t,projectId:n,prefix:i,severityAllowList:r}))}}}function BE(s,e){const t=s.config.segment;if(!t)return e();(function(n,i){const r=n.config.segment;if(!r)return i();const o=u=>{const h=()=>u.anonymousId()||Ht();n.config.get_device_id=h,u.id()&&(n.register({distinct_id:u.id(),$device_id:h()}),n.persistence.set_property(vt,"identified")),i()},c=r.user();"then"in c&&Qe(c.then)?c.then(u=>o(u)):o(c)})(s,()=>{t.register((n=>{Promise&&Promise.resolve||A.warn("This browser does not have Promise support, and can not use the segment integration");const i=(r,o)=>{var c;if(!o)return r;r.event.userId||r.event.anonymousId===n.get_distinct_id()||(A.info("Segment integration does not have a userId set, resetting PostHog"),n.reset()),r.event.userId&&r.event.userId!==n.get_distinct_id()&&(A.info("Segment integration has a userId set, identifying with PostHog"),n.identify(r.event.userId));const u=n._calculate_event_properties(o,(c=r.event.properties)!==null&&c!==void 0?c:{},new Date);return r.event.properties=Object.assign({},u,r.event.properties),r};return{name:"PostHog JS",type:"enrichment",version:"1.0.0",isLoaded:()=>!0,load:()=>Promise.resolve(),track:r=>i(r,r.event.event),page:r=>i(r,"$pageview"),identify:r=>i(r,"$identify"),screen:r=>i(r,"$screen")}})(s)).then(()=>{e()})})}class jE{constructor(e){this._instance=e}doPageView(e){var t;const n=this._previousPageViewProperties(e);return this._currentPath=(t=y==null?void 0:y.location.pathname)!==null&&t!==void 0?t:"",this._instance.scrollManager.resetContext(),this._prevPageviewTimestamp=e,n}doPageLeave(e){return this._previousPageViewProperties(e)}_previousPageViewProperties(e){const t=this._currentPath,n=this._prevPageviewTimestamp,i=this._instance.scrollManager.getContext();if(!n)return{};let r={};if(i){let{maxScrollHeight:o,lastScrollY:c,maxScrollY:u,maxContentHeight:h,lastContentY:p,maxContentY:f}=i;M(o)||M(c)||M(u)||M(h)||M(p)||M(f)||(o=Math.ceil(o),c=Math.ceil(c),u=Math.ceil(u),h=Math.ceil(h),p=Math.ceil(p),f=Math.ceil(f),r={$prev_pageview_last_scroll:c,$prev_pageview_last_scroll_percentage:o<=1?1:ds(c/o,0,1),$prev_pageview_max_scroll:u,$prev_pageview_max_scroll_percentage:o<=1?1:ds(u/o,0,1),$prev_pageview_last_content:p,$prev_pageview_last_content_percentage:h<=1?1:ds(p/h,0,1),$prev_pageview_max_content:f,$prev_pageview_max_content_percentage:h<=1?1:ds(f/h,0,1)})}return t&&(r.$prev_pageview_pathname=t),n&&(r.$prev_pageview_duration=(e.getTime()-n.getTime())/1e3),r}}let Lc,Hi,at;(function(s){s.Popover="popover",s.API="api",s.Widget="widget"})(Lc||(Lc={})),function(s){s.Open="open",s.MultipleChoice="multiple_choice",s.SingleChoice="single_choice",s.Rating="rating",s.Link="link"}(Hi||(Hi={})),function(s){s.NextQuestion="next_question",s.End="end",s.ResponseBased="response_based",s.SpecificQuestion="specific_question"}(at||(at={}));class Ud{constructor(){L(this,"events",{});this.events={}}on(e,t){return this.events[e]||(this.events[e]=[]),this.events[e].push(t),()=>{this.events[e]=this.events[e].filter(n=>n!==t)}}emit(e,t){for(const n of this.events[e]||[])n(t);for(const n of this.events["*"]||[])n(e,t)}}class os{constructor(e){L(this,"_debugEventEmitter",new Ud);L(this,"checkStep",(e,t)=>this.checkStepEvent(e,t)&&this.checkStepUrl(e,t)&&this.checkStepElement(e,t));L(this,"checkStepEvent",(e,t)=>t==null||!t.event||(e==null?void 0:e.event)===(t==null?void 0:t.event));this.instance=e,this.actionEvents=new Set,this.actionRegistry=new Set}init(){var e;if(!M((e=this.instance)===null||e===void 0?void 0:e._addCaptureHook)){var t;const n=(i,r)=>{this.on(i,r)};(t=this.instance)===null||t===void 0||t._addCaptureHook(n)}}register(e){var t,n;if(!M((t=this.instance)===null||t===void 0?void 0:t._addCaptureHook)&&(e.forEach(r=>{var o,c;(o=this.actionRegistry)===null||o===void 0||o.add(r),(c=r.steps)===null||c===void 0||c.forEach(u=>{var h;(h=this.actionEvents)===null||h===void 0||h.add((u==null?void 0:u.event)||"")})}),(n=this.instance)!==null&&n!==void 0&&n.autocapture)){var i;const r=new Set;e.forEach(o=>{var c;(c=o.steps)===null||c===void 0||c.forEach(u=>{u!=null&&u.selector&&r.add(u==null?void 0:u.selector)})}),(i=this.instance)===null||i===void 0||i.autocapture.setElementSelectors(r)}}on(e,t){var n;t!=null&&e.length!=0&&(this.actionEvents.has(e)||this.actionEvents.has(t==null?void 0:t.event))&&this.actionRegistry&&((n=this.actionRegistry)===null||n===void 0?void 0:n.size)>0&&this.actionRegistry.forEach(i=>{this.checkAction(t,i)&&this._debugEventEmitter.emit("actionCaptured",i.name)})}_addActionHook(e){this.onAction("actionCaptured",t=>e(t))}checkAction(e,t){if((t==null?void 0:t.steps)==null)return!1;for(const n of t.steps)if(this.checkStep(e,n))return!0;return!1}onAction(e,t){return this._debugEventEmitter.on(e,t)}checkStepUrl(e,t){if(t!=null&&t.url){var n;const i=e==null||(n=e.properties)===null||n===void 0?void 0:n.$current_url;if(!i||typeof i!="string"||!os.matchString(i,t==null?void 0:t.url,(t==null?void 0:t.url_matching)||"contains"))return!1}return!0}static matchString(e,t,n){switch(n){case"regex":return!!y&&Ys(e,t);case"exact":return t===e;case"contains":const i=os.escapeStringRegexp(t).replace(/_/g,".").replace(/%/g,".*");return Ys(e,i);default:return!1}}static escapeStringRegexp(e){return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}checkStepElement(e,t){if((t!=null&&t.href||t!=null&&t.tag_name||t!=null&&t.text)&&!this.getElementsList(e).some(i=>!(t!=null&&t.href&&!os.matchString(i.href||"",t==null?void 0:t.href,(t==null?void 0:t.href_matching)||"exact"))&&(t==null||!t.tag_name||i.tag_name===(t==null?void 0:t.tag_name))&&!(t!=null&&t.text&&!os.matchString(i.text||"",t==null?void 0:t.text,(t==null?void 0:t.text_matching)||"exact")&&!os.matchString(i.$el_text||"",t==null?void 0:t.text,(t==null?void 0:t.text_matching)||"exact"))))return!1;if(t!=null&&t.selector){var n;const i=e==null||(n=e.properties)===null||n===void 0?void 0:n.$element_selectors;if(!i||!i.includes(t==null?void 0:t.selector))return!1}return!0}getElementsList(e){return(e==null?void 0:e.properties.$elements)==null?[]:e==null?void 0:e.properties.$elements}}const Ui=class Ui{constructor(e){this.instance=e,this.eventToSurveys=new Map,this.actionToSurveys=new Map}register(e){var t;M((t=this.instance)===null||t===void 0?void 0:t._addCaptureHook)||(this.setupEventBasedSurveys(e),this.setupActionBasedSurveys(e))}setupActionBasedSurveys(e){const t=e.filter(n=>{var i,r,o,c;return((i=n.conditions)===null||i===void 0?void 0:i.actions)&&((r=n.conditions)===null||r===void 0||(o=r.actions)===null||o===void 0||(c=o.values)===null||c===void 0?void 0:c.length)>0});if(t.length!==0){if(this.actionMatcher==null){this.actionMatcher=new os(this.instance),this.actionMatcher.init();const n=i=>{this.onAction(i)};this.actionMatcher._addActionHook(n)}t.forEach(n=>{var i,r,o,c,u,h,p,f,g,m;n.conditions&&(i=n.conditions)!==null&&i!==void 0&&i.actions&&(r=n.conditions)!==null&&r!==void 0&&(o=r.actions)!==null&&o!==void 0&&o.values&&((c=n.conditions)===null||c===void 0||(u=c.actions)===null||u===void 0||(h=u.values)===null||h===void 0?void 0:h.length)>0&&((p=this.actionMatcher)===null||p===void 0||p.register(n.conditions.actions.values),(f=n.conditions)===null||f===void 0||(g=f.actions)===null||g===void 0||(m=g.values)===null||m===void 0||m.forEach(E=>{if(E&&E.name){const v=this.actionToSurveys.get(E.name);v&&v.push(n.id),this.actionToSurveys.set(E.name,v||[n.id])}}))})}}setupEventBasedSurveys(e){var t;e.filter(n=>{var i,r,o,c;return((i=n.conditions)===null||i===void 0?void 0:i.events)&&((r=n.conditions)===null||r===void 0||(o=r.events)===null||o===void 0||(c=o.values)===null||c===void 0?void 0:c.length)>0}).length!==0&&((t=this.instance)===null||t===void 0||t._addCaptureHook((n,i)=>{this.onEvent(n,i)}),e.forEach(n=>{var i,r,o;(i=n.conditions)===null||i===void 0||(r=i.events)===null||r===void 0||(o=r.values)===null||o===void 0||o.forEach(c=>{if(c&&c.name){const u=this.eventToSurveys.get(c.name);u&&u.push(n.id),this.eventToSurveys.set(c.name,u||[n.id])}})}))}onEvent(e,t){var n,i;const r=((n=this.instance)===null||n===void 0||(i=n.persistence)===null||i===void 0?void 0:i.props[ai])||[];if(Ui.SURVEY_SHOWN_EVENT_NAME==e&&t&&r.length>0){var o;const c=t==null||(o=t.properties)===null||o===void 0?void 0:o.$survey_id;if(c){const u=r.indexOf(c);u>=0&&(r.splice(u,1),this._updateActivatedSurveys(r))}}else this.eventToSurveys.has(e)&&this._updateActivatedSurveys(r.concat(this.eventToSurveys.get(e)||[]))}onAction(e){var t,n;const i=((t=this.instance)===null||t===void 0||(n=t.persistence)===null||n===void 0?void 0:n.props[ai])||[];this.actionToSurveys.has(e)&&this._updateActivatedSurveys(i.concat(this.actionToSurveys.get(e)||[]))}_updateActivatedSurveys(e){var t,n;(t=this.instance)===null||t===void 0||(n=t.persistence)===null||n===void 0||n.register({[ai]:[...new Set(e)]})}getSurveys(){var e,t;return((e=this.instance)===null||e===void 0||(t=e.persistence)===null||t===void 0?void 0:t.props[ai])||[]}getEventToSurveys(){return this.eventToSurveys}_getActionMatcher(){return this.actionMatcher}};L(Ui,"SURVEY_SHOWN_EVENT_NAME","survey shown");let Vi=Ui;var qd,ae,zd,as,Ic,Kd,Io,Gd,Ro={},Yd=[],HE=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,ga=Array.isArray;function Vt(s,e){for(var t in e)s[t]=e[t];return s}function Zd(s){var e=s.parentNode;e&&e.removeChild(s)}function zr(s,e,t,n,i){var r={type:s,props:e,key:t,ref:n,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:i??++zd,__i:-1,__u:0};return i==null&&ae.vnode!=null&&ae.vnode(r),r}function _a(s){return s.children}function Ei(s,e){this.props=s,this.context=e}function Qs(s,e){if(e==null)return s.__?Qs(s.__,s.__i+1):null;for(var t;e<s.__k.length;e++)if((t=s.__k[e])!=null&&t.__e!=null)return t.__e;return typeof s.type=="function"?Qs(s):null}function Xd(s){var e,t;if((s=s.__)!=null&&s.__c!=null){for(s.__e=s.__c.base=null,e=0;e<s.__k.length;e++)if((t=s.__k[e])!=null&&t.__e!=null){s.__e=s.__c.base=t.__e;break}return Xd(s)}}function Do(s){(!s.__d&&(s.__d=!0)&&as.push(s)&&!Wi.__r++||Ic!==ae.debounceRendering)&&((Ic=ae.debounceRendering)||Kd)(Wi)}function Wi(){var s,e,t,n,i,r,o,c,u;for(as.sort(Io);s=as.shift();)s.__d&&(e=as.length,n=void 0,r=(i=(t=s).__v).__e,c=[],u=[],(o=t.__P)&&((n=Vt({},i)).__v=i.__v+1,ae.vnode&&ae.vnode(n),eh(o,n,i,t.__n,o.ownerSVGElement!==void 0,32&i.__u?[r]:null,c,r??Qs(i),!!(32&i.__u),u),n.__.__k[n.__i]=n,UE(c,n,u),n.__e!=r&&Xd(n)),as.length>e&&as.sort(Io));Wi.__r=0}function Qd(s,e,t,n,i,r,o,c,u,h,p){var f,g,m,E,v,w=n&&n.__k||Yd,S=e.length;for(t.__d=u,VE(t,e,w),u=t.__d,f=0;f<S;f++)(m=t.__k[f])!=null&&typeof m!="boolean"&&typeof m!="function"&&(g=m.__i===-1?Ro:w[m.__i]||Ro,m.__i=f,eh(s,m,g,i,r,o,c,u,h,p),E=m.__e,m.ref&&g.ref!=m.ref&&(g.ref&&ma(g.ref,null,m),p.push(m.ref,m.__c||E,m)),v==null&&E!=null&&(v=E),65536&m.__u||g.__k===m.__k?u=Jd(m,u,s):typeof m.type=="function"&&m.__d!==void 0?u=m.__d:E&&(u=E.nextSibling),m.__d=void 0,m.__u&=-196609);t.__d=u,t.__e=v}function VE(s,e,t){var n,i,r,o,c,u=e.length,h=t.length,p=h,f=0;for(s.__k=[],n=0;n<u;n++)(i=s.__k[n]=(i=e[n])==null||typeof i=="boolean"||typeof i=="function"?null:typeof i=="string"||typeof i=="number"||typeof i=="bigint"||i.constructor==String?zr(null,i,null,null,i):ga(i)?zr(_a,{children:i},null,null,null):i.constructor===void 0&&i.__b>0?zr(i.type,i.props,i.key,i.ref?i.ref:null,i.__v):i)!=null?(i.__=s,i.__b=s.__b+1,c=WE(i,t,o=n+f,p),i.__i=c,r=null,c!==-1&&(p--,(r=t[c])&&(r.__u|=131072)),r==null||r.__v===null?(c==-1&&f--,typeof i.type!="function"&&(i.__u|=65536)):c!==o&&(c===o+1?f++:c>o?p>u-o?f+=c-o:f--:f=c<o&&c==o-1?c-o:0,c!==n+f&&(i.__u|=65536))):(r=t[n])&&r.key==null&&r.__e&&(r.__e==s.__d&&(s.__d=Qs(r)),No(r,r,!1),t[n]=null,p--);if(p)for(n=0;n<h;n++)(r=t[n])!=null&&!(131072&r.__u)&&(r.__e==s.__d&&(s.__d=Qs(r)),No(r,r))}function Jd(s,e,t){var n,i;if(typeof s.type=="function"){for(n=s.__k,i=0;n&&i<n.length;i++)n[i]&&(n[i].__=s,e=Jd(n[i],e,t));return e}return s.__e!=e&&(t.insertBefore(s.__e,e||null),e=s.__e),e&&e.nextSibling}function WE(s,e,t,n){var i=s.key,r=s.type,o=t-1,c=t+1,u=e[t];if(u===null||u&&i==u.key&&r===u.type)return t;if(n>(u!=null&&!(131072&u.__u)?1:0))for(;o>=0||c<e.length;){if(o>=0){if((u=e[o])&&!(131072&u.__u)&&i==u.key&&r===u.type)return o;o--}if(c<e.length){if((u=e[c])&&!(131072&u.__u)&&i==u.key&&r===u.type)return c;c++}}return-1}function Rc(s,e,t){e[0]==="-"?s.setProperty(e,t??""):s[e]=t==null?"":typeof t!="number"||HE.test(e)?t:t+"px"}function pi(s,e,t,n,i){var r;e:if(e==="style")if(typeof t=="string")s.style.cssText=t;else{if(typeof n=="string"&&(s.style.cssText=n=""),n)for(e in n)t&&e in t||Rc(s.style,e,"");if(t)for(e in t)n&&t[e]===n[e]||Rc(s.style,e,t[e])}else if(e[0]==="o"&&e[1]==="n")r=e!==(e=e.replace(/(PointerCapture)$|Capture$/,"$1")),e=e.toLowerCase()in s?e.toLowerCase().slice(2):e.slice(2),s.l||(s.l={}),s.l[e+r]=t,t?n?t.u=n.u:(t.u=Date.now(),s.addEventListener(e,r?Nc:Dc,r)):s.removeEventListener(e,r?Nc:Dc,r);else{if(i)e=e.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(e!=="width"&&e!=="height"&&e!=="href"&&e!=="list"&&e!=="form"&&e!=="tabIndex"&&e!=="download"&&e!=="rowSpan"&&e!=="colSpan"&&e!=="role"&&e in s)try{s[e]=t??"";break e}catch{}typeof t=="function"||(t==null||t===!1&&e[4]!=="-"?s.removeAttribute(e):s.setAttribute(e,t))}}function Dc(s){var e=this.l[s.type+!1];if(s.t){if(s.t<=e.u)return}else s.t=Date.now();return e(ae.event?ae.event(s):s)}function Nc(s){return this.l[s.type+!0](ae.event?ae.event(s):s)}function eh(s,e,t,n,i,r,o,c,u,h){var p,f,g,m,E,v,w,S,C,x,$,P,j,N,O,I=e.type;if(e.constructor!==void 0)return null;128&t.__u&&(u=!!(32&t.__u),r=[c=e.__e=t.__e]),(p=ae.__b)&&p(e);e:if(typeof I=="function")try{if(S=e.props,C=(p=I.contextType)&&n[p.__c],x=p?C?C.props.value:p.__:n,t.__c?w=(f=e.__c=t.__c).__=f.__E:("prototype"in I&&I.prototype.render?e.__c=f=new I(S,x):(e.__c=f=new Ei(S,x),f.constructor=I,f.render=zE),C&&C.sub(f),f.props=S,f.state||(f.state={}),f.context=x,f.__n=n,g=f.__d=!0,f.__h=[],f._sb=[]),f.__s==null&&(f.__s=f.state),I.getDerivedStateFromProps!=null&&(f.__s==f.state&&(f.__s=Vt({},f.__s)),Vt(f.__s,I.getDerivedStateFromProps(S,f.__s))),m=f.props,E=f.state,f.__v=e,g)I.getDerivedStateFromProps==null&&f.componentWillMount!=null&&f.componentWillMount(),f.componentDidMount!=null&&f.__h.push(f.componentDidMount);else{if(I.getDerivedStateFromProps==null&&S!==m&&f.componentWillReceiveProps!=null&&f.componentWillReceiveProps(S,x),!f.__e&&(f.shouldComponentUpdate!=null&&f.shouldComponentUpdate(S,f.__s,x)===!1||e.__v===t.__v)){for(e.__v!==t.__v&&(f.props=S,f.state=f.__s,f.__d=!1),e.__e=t.__e,e.__k=t.__k,e.__k.forEach(function(H){H&&(H.__=e)}),$=0;$<f._sb.length;$++)f.__h.push(f._sb[$]);f._sb=[],f.__h.length&&o.push(f);break e}f.componentWillUpdate!=null&&f.componentWillUpdate(S,f.__s,x),f.componentDidUpdate!=null&&f.__h.push(function(){f.componentDidUpdate(m,E,v)})}if(f.context=x,f.props=S,f.__P=s,f.__e=!1,P=ae.__r,j=0,"prototype"in I&&I.prototype.render){for(f.state=f.__s,f.__d=!1,P&&P(e),p=f.render(f.props,f.state,f.context),N=0;N<f._sb.length;N++)f.__h.push(f._sb[N]);f._sb=[]}else do f.__d=!1,P&&P(e),p=f.render(f.props,f.state,f.context),f.state=f.__s;while(f.__d&&++j<25);f.state=f.__s,f.getChildContext!=null&&(n=Vt(Vt({},n),f.getChildContext())),g||f.getSnapshotBeforeUpdate==null||(v=f.getSnapshotBeforeUpdate(m,E)),Qd(s,ga(O=p!=null&&p.type===_a&&p.key==null?p.props.children:p)?O:[O],e,t,n,i,r,o,c,u,h),f.base=e.__e,e.__u&=-161,f.__h.length&&o.push(f),w&&(f.__E=f.__=null)}catch(H){e.__v=null,u||r!=null?(e.__e=c,e.__u|=u?160:32,r[r.indexOf(c)]=null):(e.__e=t.__e,e.__k=t.__k),ae.__e(H,e,t)}else r==null&&e.__v===t.__v?(e.__k=t.__k,e.__e=t.__e):e.__e=qE(t.__e,e,t,n,i,r,o,u,h);(p=ae.diffed)&&p(e)}function UE(s,e,t){e.__d=void 0;for(var n=0;n<t.length;n++)ma(t[n],t[++n],t[++n]);ae.__c&&ae.__c(e,s),s.some(function(i){try{s=i.__h,i.__h=[],s.some(function(r){r.call(i)})}catch(r){ae.__e(r,i.__v)}})}function qE(s,e,t,n,i,r,o,c,u){var h,p,f,g,m,E,v,w=t.props,S=e.props,C=e.type;if(C==="svg"&&(i=!0),r!=null){for(h=0;h<r.length;h++)if((m=r[h])&&"setAttribute"in m==!!C&&(C?m.localName===C:m.nodeType===3)){s=m,r[h]=null;break}}if(s==null){if(C===null)return document.createTextNode(S);s=i?document.createElementNS("http://www.w3.org/2000/svg",C):document.createElement(C,S.is&&S),r=null,c=!1}if(C===null)w===S||c&&s.data===S||(s.data=S);else{if(r=r&&qd.call(s.childNodes),w=t.props||Ro,!c&&r!=null)for(w={},h=0;h<s.attributes.length;h++)w[(m=s.attributes[h]).name]=m.value;for(h in w)m=w[h],h=="children"||(h=="dangerouslySetInnerHTML"?f=m:h==="key"||h in S||pi(s,h,null,m,i));for(h in S)m=S[h],h=="children"?g=m:h=="dangerouslySetInnerHTML"?p=m:h=="value"?E=m:h=="checked"?v=m:h==="key"||c&&typeof m!="function"||w[h]===m||pi(s,h,m,w[h],i);if(p)c||f&&(p.__html===f.__html||p.__html===s.innerHTML)||(s.innerHTML=p.__html),e.__k=[];else if(f&&(s.innerHTML=""),Qd(s,ga(g)?g:[g],e,t,n,i&&C!=="foreignObject",r,o,r?r[0]:t.__k&&Qs(t,0),c,u),r!=null)for(h=r.length;h--;)r[h]!=null&&Zd(r[h]);c||(h="value",E!==void 0&&(E!==s[h]||C==="progress"&&!E||C==="option"&&E!==w[h])&&pi(s,h,E,w[h],!1),h="checked",v!==void 0&&v!==s[h]&&pi(s,h,v,w[h],!1))}return s}function ma(s,e,t){try{typeof s=="function"?s(e):s.current=e}catch(n){ae.__e(n,t)}}function No(s,e,t){var n,i;if(ae.unmount&&ae.unmount(s),(n=s.ref)&&(n.current&&n.current!==s.__e||ma(n,null,e)),(n=s.__c)!=null){if(n.componentWillUnmount)try{n.componentWillUnmount()}catch(r){ae.__e(r,e)}n.base=n.__P=null,s.__c=void 0}if(n=s.__k)for(i=0;i<n.length;i++)n[i]&&No(n[i],e,t||typeof s.type!="function");t||s.__e==null||Zd(s.__e),s.__=s.__e=s.__d=void 0}function zE(s,e,t){return this.constructor(s,t)}qd=Yd.slice,ae={__e:function(s,e,t,n){for(var i,r,o;e=e.__;)if((i=e.__c)&&!i.__)try{if((r=i.constructor)&&r.getDerivedStateFromError!=null&&(i.setState(r.getDerivedStateFromError(s)),o=i.__d),i.componentDidCatch!=null&&(i.componentDidCatch(s,n||{}),o=i.__d),o)return i.__E=i}catch(c){s=c}throw s}},zd=0,Ei.prototype.setState=function(s,e){var t;t=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=Vt({},this.state),typeof s=="function"&&(s=s(Vt({},t),this.props)),s&&Vt(t,s),s!=null&&this.__v&&(e&&this._sb.push(e),Do(this))},Ei.prototype.forceUpdate=function(s){this.__v&&(this.__e=!0,s&&this.__h.push(s),Do(this))},Ei.prototype.render=_a,as=[],Kd=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,Io=function(s,e){return s.__v.__b-e.__v.__b},Wi.__r=0,Gd=0;(function(s,e){var t={__c:e="__cC"+Gd++,__:s,Consumer:function(n,i){return n.children(i)},Provider:function(n){var i,r;return this.getChildContext||(i=[],(r={})[e]=this,this.getChildContext=function(){return r},this.shouldComponentUpdate=function(o){this.props.value!==o.value&&i.some(function(c){c.__e=!0,Do(c)})},this.sub=function(o){i.push(o);var c=o.componentWillUnmount;o.componentWillUnmount=function(){i.splice(i.indexOf(o),1),c&&c.call(o)}}),n.children}};t.Provider.__=t.Consumer.contextType=t})({isPreviewMode:!1,previewPageIndex:0,handleCloseSurveyPopup:()=>{},isPopup:!0});const mn="[Surveys]",KE={icontains:s=>!!y&&y.location.href.toLowerCase().indexOf(s.toLowerCase())>-1,not_icontains:s=>!!y&&y.location.href.toLowerCase().indexOf(s.toLowerCase())===-1,regex:s=>!!y&&Ys(y.location.href,s),not_regex:s=>!!y&&!Ys(y.location.href,s),exact:s=>(y==null?void 0:y.location.href)===s,is_not:s=>(y==null?void 0:y.location.href)!==s};class GE{constructor(e){this.instance=e,this._surveyEventReceiver=null}afterDecideResponse(e){this._decideServerResponse=!!e.surveys,this.loadIfEnabled()}reset(){localStorage.removeItem("lastSeenSurveyDate"),(()=>{const t=[];for(let n=0;n<localStorage.length;n++){const i=localStorage.key(n);i!=null&&i.startsWith("seenSurvey_")&&t.push(i)}return t})().forEach(t=>localStorage.removeItem(t))}loadIfEnabled(){var e;const t=K==null||(e=K.__PosthogExtensions__)===null||e===void 0?void 0:e.generateSurveys;var n,i;this.instance.config.disable_surveys||!this._decideServerResponse||t||(this._surveyEventReceiver==null&&(this._surveyEventReceiver=new Vi(this.instance)),(n=K.__PosthogExtensions__)===null||n===void 0||(i=n.loadExternalDependency)===null||i===void 0||i.call(n,this.instance,"surveys",r=>{var o,c;if(r)return A.error(mn,"Could not load surveys script",r);this._surveyManager=(o=K.__PosthogExtensions__)===null||o===void 0||(c=o.generateSurveys)===null||c===void 0?void 0:c.call(o,this.instance)}))}getSurveys(e){let t=arguments.length>1&&arguments[1]!==void 0&&arguments[1];if(this.instance.config.disable_surveys)return e([]);this._surveyEventReceiver==null&&(this._surveyEventReceiver=new Vi(this.instance));const n=this.instance.get_property(go);if(n&&!t)return e(n);this.instance._send_request({url:this.instance.requestRouter.endpointFor("api",`/api/surveys/?token=${this.instance.config.token}`),method:"GET",transport:"XHR",callback:i=>{var r;if(i.statusCode!==200||!i.json)return e([]);const o=i.json.surveys||[],c=o.filter(h=>{var p,f,g,m,E,v,w,S,C,x,$,P;return((p=h.conditions)===null||p===void 0?void 0:p.events)&&((f=h.conditions)===null||f===void 0||(g=f.events)===null||g===void 0?void 0:g.values)&&((m=h.conditions)===null||m===void 0||(E=m.events)===null||E===void 0||(v=E.values)===null||v===void 0?void 0:v.length)>0||((w=h.conditions)===null||w===void 0?void 0:w.actions)&&((S=h.conditions)===null||S===void 0||(C=S.actions)===null||C===void 0?void 0:C.values)&&((x=h.conditions)===null||x===void 0||($=x.actions)===null||$===void 0||(P=$.values)===null||P===void 0?void 0:P.length)>0});var u;return c.length>0&&((u=this._surveyEventReceiver)===null||u===void 0||u.register(c)),(r=this.instance.persistence)===null||r===void 0||r.register({[go]:o}),e(o)}})}getActiveMatchingSurveys(e){let t=arguments.length>1&&arguments[1]!==void 0&&arguments[1];this.getSurveys(n=>{var i;const r=n.filter(u=>!(!u.start_date||u.end_date)).filter(u=>{var h,p,f,g;if(!u.conditions)return!0;const m=(h=u.conditions)===null||h===void 0||!h.url||KE[(p=(f=u.conditions)===null||f===void 0?void 0:f.urlMatchType)!==null&&p!==void 0?p:"icontains"](u.conditions.url),E=(g=u.conditions)===null||g===void 0||!g.selector||(D==null?void 0:D.querySelector(u.conditions.selector));return m&&E}),o=(i=this._surveyEventReceiver)===null||i===void 0?void 0:i.getSurveys(),c=r.filter(u=>{var h,p,f,g,m,E,v,w,S,C;if(!u.linked_flag_key&&!u.targeting_flag_key&&!u.internal_targeting_flag_key)return!0;const x=!u.linked_flag_key||this.instance.featureFlags.isFeatureEnabled(u.linked_flag_key),$=!u.targeting_flag_key||this.instance.featureFlags.isFeatureEnabled(u.targeting_flag_key),P=((h=u.conditions)===null||h===void 0?void 0:h.events)&&((p=u.conditions)===null||p===void 0||(f=p.events)===null||f===void 0?void 0:f.values)&&((g=u.conditions)===null||g===void 0||(m=g.events)===null||m===void 0?void 0:m.values.length)>0,j=((E=u.conditions)===null||E===void 0?void 0:E.actions)&&((v=u.conditions)===null||v===void 0||(w=v.actions)===null||w===void 0?void 0:w.values)&&((S=u.conditions)===null||S===void 0||(C=S.actions)===null||C===void 0?void 0:C.values.length)>0,N=!P&&!j||(o==null?void 0:o.includes(u.id)),O=this._canActivateRepeatedly(u),I=!(u.internal_targeting_flag_key&&!O)||this.instance.featureFlags.isFeatureEnabled(u.internal_targeting_flag_key);return x&&$&&I&&N});return e(c)},t)}getNextSurveyStep(e,t,n){var i;const r=e.questions[t],o=t+1;if((i=r.branching)===null||i===void 0||!i.type)return t===e.questions.length-1?at.End:o;if(r.branching.type===at.End)return at.End;if(r.branching.type===at.SpecificQuestion){if(Number.isInteger(r.branching.index))return r.branching.index}else if(r.branching.type===at.ResponseBased){if(r.type===Hi.SingleChoice){var c,u;const f=r.choices.indexOf(`${n}`);if((c=r.branching)!==null&&c!==void 0&&(u=c.responseValues)!==null&&u!==void 0&&u.hasOwnProperty(f)){const g=r.branching.responseValues[f];return Number.isInteger(g)?g:g===at.End?at.End:o}}else if(r.type===Hi.Rating){var h,p;if(typeof n!="number"||!Number.isInteger(n))throw new Error("The response type must be an integer");const f=function(g,m){if(m===3){if(g<1||g>3)throw new Error("The response must be in range 1-3");return g===1?"negative":g===2?"neutral":"positive"}if(m===5){if(g<1||g>5)throw new Error("The response must be in range 1-5");return g<=2?"negative":g===3?"neutral":"positive"}if(m===7){if(g<1||g>7)throw new Error("The response must be in range 1-7");return g<=3?"negative":g===4?"neutral":"positive"}if(m===10){if(g<0||g>10)throw new Error("The response must be in range 0-10");return g<=6?"detractors":g<=8?"passives":"promoters"}throw new Error("The scale must be one of: 3, 5, 7, 10")}(n,r.scale);if((h=r.branching)!==null&&h!==void 0&&(p=h.responseValues)!==null&&p!==void 0&&p.hasOwnProperty(f)){const g=r.branching.responseValues[f];return Number.isInteger(g)?g:g===at.End?at.End:o}}return o}return A.warn(mn,"Falling back to next question index due to unexpected branching type"),o}_canActivateRepeatedly(e){var t;return oe((t=K.__PosthogExtensions__)===null||t===void 0?void 0:t.canActivateRepeatedly)?(A.warn(mn,"canActivateRepeatedly is not defined, must init before calling"),!1):K.__PosthogExtensions__.canActivateRepeatedly(e)}canRenderSurvey(e){oe(this._surveyManager)?A.warn(mn,"canActivateRepeatedly is not defined, must init before calling"):this.getSurveys(t=>{const n=t.filter(i=>i.id===e)[0];this._surveyManager.canRenderSurvey(n)})}renderSurvey(e,t){oe(this._surveyManager)?A.warn(mn,"canActivateRepeatedly is not defined, must init before calling"):this.getSurveys(n=>{const i=n.filter(r=>r.id===e)[0];this._surveyManager.renderSurvey(i,D==null?void 0:D.querySelector(t))})}}class YE{constructor(e){L(this,"serverLimits",{});L(this,"lastEventRateLimited",!1);L(this,"checkForLimiting",e=>{const t=e.text;if(t&&t.length)try{(JSON.parse(t).quota_limited||[]).forEach(i=>{A.info(`[RateLimiter] ${i||"events"} is quota limited.`),this.serverLimits[i]=new Date().getTime()+6e4})}catch(n){return void A.warn(`[RateLimiter] could not rate limit - continuing. Error: "${n==null?void 0:n.message}"`,{text:t})}});var t,n;this.instance=e,this.captureEventsPerSecond=((t=e.config.rate_limiting)===null||t===void 0?void 0:t.events_per_second)||10,this.captureEventsBurstLimit=Math.max(((n=e.config.rate_limiting)===null||n===void 0?void 0:n.events_burst_limit)||10*this.captureEventsPerSecond,this.captureEventsPerSecond),this.lastEventRateLimited=this.clientRateLimitContext(!0).isRateLimited}clientRateLimitContext(){var e,t,n;let i=arguments.length>0&&arguments[0]!==void 0&&arguments[0];const r=new Date().getTime(),o=(e=(t=this.instance.persistence)===null||t===void 0?void 0:t.get_property(mo))!==null&&e!==void 0?e:{tokens:this.captureEventsBurstLimit,last:r};o.tokens+=(r-o.last)/1e3*this.captureEventsPerSecond,o.last=r,o.tokens>this.captureEventsBurstLimit&&(o.tokens=this.captureEventsBurstLimit);const c=o.tokens<1;return c||i||(o.tokens=Math.max(0,o.tokens-1)),!c||this.lastEventRateLimited||i||this.instance.capture("$$client_ingestion_warning",{$$client_ingestion_warning_message:`posthog-js client rate limited. Config is set to ${this.captureEventsPerSecond} events per second and ${this.captureEventsBurstLimit} events burst limit.`},{skip_client_rate_limiting:!0}),this.lastEventRateLimited=c,(n=this.instance.persistence)===null||n===void 0||n.set_property(mo,o),{isRateLimited:c,remainingTokens:o.tokens}}isServerRateLimited(e){const t=this.serverLimits[e||"events"]||!1;return t!==!1&&new Date().getTime()<t}}const ZE=()=>({initialPathName:(De==null?void 0:De.pathname)||"",referringDomain:he.referringDomain(),...he.campaignParams()});class XE{constructor(e,t,n){L(this,"_onSessionIdCallback",e=>{const t=this._getStoredProps();if(t&&t.sessionId===e)return;const n={sessionId:e,props:this._sessionSourceParamGenerator()};this._persistence.register({[_o]:n})});this._sessionIdManager=e,this._persistence=t,this._sessionSourceParamGenerator=n||ZE,this._sessionIdManager.onSessionId(this._onSessionIdCallback)}_getStoredProps(){return this._persistence.props[_o]}getSessionProps(){var e;const t=(e=this._getStoredProps())===null||e===void 0?void 0:e.props;return t?{$client_session_initial_referring_host:t.referringDomain,$client_session_initial_pathname:t.initialPathName,$client_session_initial_utm_source:t.utm_source,$client_session_initial_utm_campaign:t.utm_campaign,$client_session_initial_utm_medium:t.utm_medium,$client_session_initial_utm_content:t.utm_content,$client_session_initial_utm_term:t.utm_term}:{}}}const QE=["ahrefsbot","ahrefssiteaudit","applebot","baiduspider","bingbot","bingpreview","bot.htm","bot.php","crawler","deepscan","duckduckbot","facebookexternal","facebookcatalog","gptbot","http://yandex.com/bots","hubspot","ia_archiver","linkedinbot","mj12bot","msnbot","nessus","petalbot","pinterest","prerender","rogerbot","screaming frog","semrushbot","sitebulb","slurp","turnitin","twitterbot","vercelbot","yahoo! slurp","yandexbot","headlesschrome","cypress","Google-HotelAdsVerifier","adsbot-google","apis-google","duplexweb-google","feedfetcher-google","google favicon","google web preview","google-read-aloud","googlebot","googleweblight","mediapartners-google","storebot-google","Bytespider;"],Mc=function(s,e){if(!s)return!1;const t=s.toLowerCase();return QE.concat(e||[]).some(n=>{const i=n.toLowerCase();return t.indexOf(i)!==-1})},th=function(s,e){if(!s)return!1;const t=s.userAgent;if(t&&Mc(t,e))return!0;try{const n=s==null?void 0:s.userAgentData;if(n!=null&&n.brands&&n.brands.some(i=>Mc(i==null?void 0:i.brand,e)))return!0}catch{}return!!s.webdriver};class sh{constructor(){this.clicks=[]}isRageClick(e,t,n){const i=this.clicks[this.clicks.length-1];if(i&&Math.abs(e-i.x)+Math.abs(t-i.y)<30&&n-i.timestamp<1e3){if(this.clicks.push({x:e,y:t,timestamp:n}),this.clicks.length===3)return!0}else this.clicks=[{x:e,y:t,timestamp:n}];return!1}}function Fc(s){var e;return s.id===yo||!((e=s.closest)===null||e===void 0||!e.call(s,"#"+yo))}class JE{constructor(e){L(this,"rageclicks",new sh);L(this,"_enabledServerSide",!1);L(this,"_initialized",!1);L(this,"_flushInterval",null);var t;this.instance=e,this._enabledServerSide=!((t=this.instance.persistence)===null||t===void 0||!t.props[ho]),y==null||y.addEventListener("beforeunload",()=>{this.flush()})}get flushIntervalMilliseconds(){let e=5e3;return de(this.instance.config.capture_heatmaps)&&this.instance.config.capture_heatmaps.flush_interval_milliseconds&&(e=this.instance.config.capture_heatmaps.flush_interval_milliseconds),e}get isEnabled(){return M(this.instance.config.capture_heatmaps)?M(this.instance.config.enable_heatmaps)?this._enabledServerSide:this.instance.config.enable_heatmaps:this.instance.config.capture_heatmaps!==!1}startIfEnabled(){if(this.isEnabled){if(this._initialized)return;A.info("[heatmaps] starting..."),this._setupListeners(),this._flushInterval=setInterval(this.flush.bind(this),this.flushIntervalMilliseconds)}else{var e;clearInterval((e=this._flushInterval)!==null&&e!==void 0?e:void 0),this.getAndClearBuffer()}}afterDecideResponse(e){const t=!!e.heatmaps;this.instance.persistence&&this.instance.persistence.register({[ho]:t}),this._enabledServerSide=t,this.startIfEnabled()}getAndClearBuffer(){const e=this.buffer;return this.buffer=void 0,e}_setupListeners(){y&&D&&(yt(D,"click",e=>this._onClick(e||(y==null?void 0:y.event)),!1,!0),yt(D,"mousemove",e=>this._onMouseMove(e||(y==null?void 0:y.event)),!1,!0),this._initialized=!0)}_getProperties(e,t){const n=this.instance.scrollManager.scrollY(),i=this.instance.scrollManager.scrollX(),r=this.instance.scrollManager.scrollElement(),o=function(c,u,h){let p=c;for(;p&&sr(p)&&!Ut(p,"body");){if(p===h)return!1;if(Y(u,y==null?void 0:y.getComputedStyle(p).position))return!0;p=$d(p)}return!1}(kd(e),["fixed","sticky"],r);return{x:e.clientX+(o?0:i),y:e.clientY+(o?0:n),target_fixed:o,type:t}}_onClick(e){var t;if(Fc(e.target))return;const n=this._getProperties(e,"click");(t=this.rageclicks)!==null&&t!==void 0&&t.isRageClick(e.clientX,e.clientY,new Date().getTime())&&this._capture({...n,type:"rageclick"}),this._capture(n)}_onMouseMove(e){Fc(e.target)||(clearTimeout(this._mouseMoveTimeout),this._mouseMoveTimeout=setTimeout(()=>{this._capture(this._getProperties(e,"mousemove"))},500))}_capture(e){if(!y)return;const t=y.location.href;this.buffer=this.buffer||{},this.buffer[t]||(this.buffer[t]=[]),this.buffer[t].push(e)}flush(){this.buffer&&!bi(this.buffer)&&this.instance.capture("$$heatmap",{$heatmap_data:this.getAndClearBuffer()})}}class ew{constructor(e){L(this,"_updateScrollData",()=>{var e,t,n,i;this.context||(this.context={});const r=this.scrollElement(),o=this.scrollY(),c=r?Math.max(0,r.scrollHeight-r.clientHeight):0,u=o+((r==null?void 0:r.clientHeight)||0),h=(r==null?void 0:r.scrollHeight)||0;this.context.lastScrollY=Math.ceil(o),this.context.maxScrollY=Math.max(o,(e=this.context.maxScrollY)!==null&&e!==void 0?e:0),this.context.maxScrollHeight=Math.max(c,(t=this.context.maxScrollHeight)!==null&&t!==void 0?t:0),this.context.lastContentY=u,this.context.maxContentY=Math.max(u,(n=this.context.maxContentY)!==null&&n!==void 0?n:0),this.context.maxContentHeight=Math.max(h,(i=this.context.maxContentHeight)!==null&&i!==void 0?i:0)});this.instance=e}getContext(){return this.context}resetContext(){const e=this.context;return setTimeout(this._updateScrollData,0),e}startMeasuringScrollPosition(){y==null||y.addEventListener("scroll",this._updateScrollData,!0),y==null||y.addEventListener("scrollend",this._updateScrollData,!0),y==null||y.addEventListener("resize",this._updateScrollData)}scrollElement(){if(!this.instance.config.scroll_root_selector)return y==null?void 0:y.document.documentElement;{const e=fe(this.instance.config.scroll_root_selector)?this.instance.config.scroll_root_selector:[this.instance.config.scroll_root_selector];for(const t of e){const n=y==null?void 0:y.document.querySelector(t);if(n)return n}}}scrollY(){if(this.instance.config.scroll_root_selector){const e=this.scrollElement();return e&&e.scrollTop||0}return y&&(y.scrollY||y.pageYOffset||y.document.documentElement.scrollTop)||0}scrollX(){if(this.instance.config.scroll_root_selector){const e=this.scrollElement();return e&&e.scrollLeft||0}return y&&(y.scrollX||y.pageXOffset||y.document.documentElement.scrollLeft)||0}}const Kr="$copy_autocapture";function Gr(s,e){return e.length>s?e.slice(0,s)+"...":e}class tw{constructor(e){L(this,"_initialized",!1);L(this,"_isDisabledServerSide",null);L(this,"rageclicks",new sh);L(this,"_elementsChainAsString",!1);this.instance=e,this._elementSelectors=null}get config(){var e,t;const n=de(this.instance.config.autocapture)?this.instance.config.autocapture:{};return n.url_allowlist=(e=n.url_allowlist)===null||e===void 0?void 0:e.map(i=>new RegExp(i)),n.url_ignorelist=(t=n.url_ignorelist)===null||t===void 0?void 0:t.map(i=>new RegExp(i)),n}_addDomEventHandlers(){if(!this.isBrowserSupported())return void A.info("Disabling Automatic Event Collection because this browser is not supported");if(!y||!D)return;const e=n=>{n=n||(y==null?void 0:y.event);try{this._captureEvent(n)}catch(i){A.error("Failed to capture event",i)}},t=n=>{n=n||(y==null?void 0:y.event),this._captureEvent(n,Kr)};yt(D,"submit",e,!1,!0),yt(D,"change",e,!1,!0),yt(D,"click",e,!1,!0),this.config.capture_copied_text&&(yt(D,"copy",t,!1,!0),yt(D,"cut",t,!1,!0))}startIfEnabled(){this.isEnabled&&!this._initialized&&(this._addDomEventHandlers(),this._initialized=!0)}afterDecideResponse(e){e.elementsChainAsString&&(this._elementsChainAsString=e.elementsChainAsString),this.instance.persistence&&this.instance.persistence.register({[Jl]:!!e.autocapture_opt_out}),this._isDisabledServerSide=!!e.autocapture_opt_out,this.startIfEnabled()}setElementSelectors(e){this._elementSelectors=e}getElementSelectors(e){var t;const n=[];return(t=this._elementSelectors)===null||t===void 0||t.forEach(i=>{const r=D==null?void 0:D.querySelectorAll(i);r==null||r.forEach(o=>{e===o&&n.push(i)})}),n}get isEnabled(){var e,t;const n=(e=this.instance.persistence)===null||e===void 0?void 0:e.props[Jl],i=this._isDisabledServerSide;if(Qt(i)&&!us(n)&&!this.instance.config.advanced_disable_decide)return!1;const r=(t=this._isDisabledServerSide)!==null&&t!==void 0?t:!!n;return!!this.instance.config.autocapture&&!r}_previousElementSibling(e){if(e.previousElementSibling)return e.previousElementSibling;let t=e;do t=t.previousSibling;while(t&&!sr(t));return t}_getAugmentPropertiesFromElement(e){if(!Co(e))return{};const t={};return J(e.attributes,function(n){if(n.name&&n.name.indexOf("data-ph-capture-attribute")===0){const i=n.name.replace("data-ph-capture-attribute-",""),r=n.value;i&&r&&Hs(r)&&(t[i]=r)}}),t}_getPropertiesFromElement(e,t,n){var i;const r=e.tagName.toLowerCase(),o={tag_name:r};To.indexOf(r)>-1&&!n&&(r.toLowerCase()==="a"||r.toLowerCase()==="button"?o.$el_text=Gr(1024,bc(e)):o.$el_text=Gr(1024,Fi(e)));const c=Mi(e);c.length>0&&(o.classes=c.filter(function(g){return g!==""}));const u=(i=this.config)===null||i===void 0?void 0:i.element_attribute_ignorelist;J(e.attributes,function(g){var m;if((!xd(e)||["name","id","class","aria-label"].indexOf(g.name)!==-1)&&(u==null||!u.includes(g.name))&&!t&&Hs(g.value)&&(m=g.name,!Ce(m)||m.substring(0,10)!=="_ngcontent"&&m.substring(0,7)!=="_nghost")){let E=g.value;g.name==="class"&&(E=da(E).join(" ")),o["attr__"+g.name]=Gr(1024,E)}});let h=1,p=1,f=e;for(;f=this._previousElementSibling(f);)h++,f.tagName===e.tagName&&p++;return o.nth_child=h,o.nth_of_type=p,o}_getDefaultProperties(e){return{$event_type:e,$ce_version:1}}_captureEvent(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"$autocapture";if(!this.isEnabled)return;let n=kd(e);var i;Od(n)&&(n=n.parentNode||null),t==="$autocapture"&&e.type==="click"&&e instanceof MouseEvent&&this.instance.config.rageclick&&(i=this.rageclicks)!==null&&i!==void 0&&i.isRageClick(e.clientX,e.clientY,new Date().getTime())&&this._captureEvent(e,"$rageclick");const r=t===Kr;if(n&&sE(n,e,this.config,r,r?["copy","cut"]:void 0)){var o,c;const f=[n];let g=n;for(;g.parentNode&&!Ut(g,"body");)Pd(g.parentNode)?(f.push(g.parentNode.host),g=g.parentNode.host):(f.push(g.parentNode),g=g.parentNode);const m=[],E={};let v,w,S=!1;if(J(f,$=>{const P=Co($);$.tagName.toLowerCase()==="a"&&(v=$.getAttribute("href"),v=P&&Hs(v)&&v),Y(Mi($),"ph-no-capture")&&(S=!0),m.push(this._getPropertiesFromElement($,this.instance.config.mask_all_element_attributes,this.instance.config.mask_all_text));const j=this._getAugmentPropertiesFromElement($);xe(E,j)}),this.instance.config.mask_all_text||(n.tagName.toLowerCase()==="a"||n.tagName.toLowerCase()==="button"?m[0].$el_text=bc(n):m[0].$el_text=Fi(n)),v){var u,h;m[0].attr__href=v;const $=(u=Cn(v))===null||u===void 0?void 0:u.host,P=y==null||(h=y.location)===null||h===void 0?void 0:h.host;$&&P&&$!==P&&(w=v)}if(S)return!1;const C=xe(this._getDefaultProperties(e.type),this._elementsChainAsString?{$elements_chain:aE(m)}:{$elements:m},(o=m[0])!==null&&o!==void 0&&o.$el_text?{$el_text:(c=m[0])===null||c===void 0?void 0:c.$el_text}:{},w&&e.type==="click"?{$external_click_url:w}:{},E),x=this.getElementSelectors(n);if(x&&x.length>0&&(C.$element_selectors=x),t===Kr){var p;const $=Cd(y==null||(p=y.getSelection())===null||p===void 0?void 0:p.toString()),P=e.type||"clipboard";if(!$)return!1;C.$selected_content=$,C.$copy_type=P}return this.instance.capture(t,C),!0}}isBrowserSupported(){return Qe(D==null?void 0:D.querySelectorAll)}}class sw{constructor(e){L(this,"_restoreXHRPatch");L(this,"_restoreFetchPatch");L(this,"_startCapturing",()=>{var e,t,n,i;M(this._restoreXHRPatch)&&((e=K.__PosthogExtensions__)===null||e===void 0||(t=e.tracingHeadersPatchFns)===null||t===void 0||t._patchXHR(this.instance.sessionManager)),M(this._restoreFetchPatch)&&((n=K.__PosthogExtensions__)===null||n===void 0||(i=n.tracingHeadersPatchFns)===null||i===void 0||i._patchFetch(this.instance.sessionManager))});this.instance=e}_loadScript(e){var t,n,i;(t=K.__PosthogExtensions__)!==null&&t!==void 0&&t.tracingHeadersPatchFns&&e(),(n=K.__PosthogExtensions__)===null||n===void 0||(i=n.loadExternalDependency)===null||i===void 0||i.call(n,this.instance,"tracing-headers",r=>{if(r)return A.error("[TRACING-HEADERS] failed to load script",r);e()})}startIfEnabledOrStop(){var e,t;this.instance.config.__add_tracing_headers?this._loadScript(this._startCapturing):((e=this._restoreXHRPatch)===null||e===void 0||e.call(this),(t=this._restoreFetchPatch)===null||t===void 0||t.call(this),this._restoreXHRPatch=void 0,this._restoreFetchPatch=void 0)}}let jt;(function(s){s[s.PENDING=-1]="PENDING",s[s.DENIED=0]="DENIED",s[s.GRANTED=1]="GRANTED"})(jt||(jt={}));class nw{constructor(e){this.instance=e}get config(){return this.instance.config}get consent(){return this.getDnt()?jt.DENIED:this.storedConsent}isOptedOut(){return this.consent===jt.DENIED||this.consent===jt.PENDING&&this.config.opt_out_capturing_by_default}isOptedIn(){return!this.isOptedOut()}optInOut(e){this.storage.set(this.storageKey,e?1:0,this.config.cookie_expiration,this.config.cross_subdomain_cookie,this.config.secure_cookie)}reset(){this.storage.remove(this.storageKey,this.config.cross_subdomain_cookie)}get storageKey(){const{token:e,opt_out_capturing_cookie_prefix:t}=this.instance.config;return(t||"__ph_opt_in_out_")+e}get storedConsent(){const e=this.storage.get(this.storageKey);return e==="1"?jt.GRANTED:e==="0"?jt.DENIED:jt.PENDING}get storage(){if(!this._storage){const e=this.config.opt_out_capturing_persistence_type;this._storage=e==="localStorage"?pe:At;const t=e==="localStorage"?At:pe;t.get(this.storageKey)&&(this._storage.get(this.storageKey)||this.optInOut(t.get(this.storageKey)==="1"),t.remove(this.storageKey,this.config.cross_subdomain_cookie))}return this._storage}getDnt(){return!!this.config.respect_dnt&&!!ld([Ke==null?void 0:Ke.doNotTrack,Ke==null?void 0:Ke.msDoNotTrack,K.doNotTrack],e=>Y([!0,1,"1","yes"],e))}}const fi="[Exception Autocapture]";class iw{constructor(e){L(this,"originalOnUnhandledRejectionHandler");L(this,"startCapturing",()=>{var e,t,n,i;if(!y||!this.isEnabled||this.hasHandlers||this.isCapturing)return;const r=(e=K.__PosthogExtensions__)===null||e===void 0||(t=e.errorWrappingFunctions)===null||t===void 0?void 0:t.wrapOnError,o=(n=K.__PosthogExtensions__)===null||n===void 0||(i=n.errorWrappingFunctions)===null||i===void 0?void 0:i.wrapUnhandledRejection;if(r&&o)try{this.unwrapOnError=r(this.captureException.bind(this)),this.unwrapUnhandledRejection=o(this.captureException.bind(this))}catch(c){A.error(fi+" failed to start",c),this.stopCapturing()}else A.error(fi+" failed to load error wrapping functions - cannot start")});var t;this.instance=e,this.remoteEnabled=!((t=this.instance.persistence)===null||t===void 0||!t.props[ec]),this.startIfEnabled()}get isEnabled(){var e;return(e=this.remoteEnabled)!==null&&e!==void 0&&e}get isCapturing(){var e;return!(y==null||(e=y.onerror)===null||e===void 0||!e.__POSTHOG_INSTRUMENTED__)}get hasHandlers(){return this.originalOnUnhandledRejectionHandler||this.unwrapOnError}startIfEnabled(){this.isEnabled&&!this.isCapturing&&(A.info(fi+" enabled, starting..."),this.loadScript(this.startCapturing))}loadScript(e){var t,n;this.hasHandlers&&e(),(t=K.__PosthogExtensions__)===null||t===void 0||(n=t.loadExternalDependency)===null||n===void 0||n.call(t,this.instance,"exception-autocapture",i=>{if(i)return A.error(fi+" failed to load script",i);e()})}stopCapturing(){var e,t;(e=this.unwrapOnError)===null||e===void 0||e.call(this),(t=this.unwrapUnhandledRejection)===null||t===void 0||t.call(this)}afterDecideResponse(e){const t=e.autocaptureExceptions;this.remoteEnabled=!!t||!1,this.instance.persistence&&this.instance.persistence.register({[ec]:this.remoteEnabled}),this.startIfEnabled()}captureException(e){const t=this.instance.requestRouter.endpointFor("ui");e.$exception_personURL=`${t}/project/${this.instance.config.token}/person/${this.instance.get_distinct_id()}`,this.instance.exceptions.sendExceptionEvent(e)}}const Bc=9e5,rs="[Web Vitals]";class rw{constructor(e){L(this,"_enabledServerSide",!1);L(this,"_initialized",!1);L(this,"buffer",{url:void 0,metrics:[],firstMetricTimestamp:void 0});L(this,"_flushToCapture",()=>{clearTimeout(this._delayedFlushTimer),this.buffer.metrics.length!==0&&(this.instance.capture("$web_vitals",this.buffer.metrics.reduce((e,t)=>({...e,[`$web_vitals_${t.name}_event`]:{...t},[`$web_vitals_${t.name}_value`]:t.value}),{})),this.buffer={url:void 0,metrics:[],firstMetricTimestamp:void 0})});L(this,"_addToBuffer",e=>{var t;const n=(t=this.instance.sessionManager)===null||t===void 0?void 0:t.checkAndGetSessionAndWindowId(!0);if(M(n))return void A.error(rs+"Could not read session ID. Dropping metrics!");this.buffer=this.buffer||{url:void 0,metrics:[],firstMetricTimestamp:void 0};const i=this._currentURL();if(!M(i)){if(oe(e==null?void 0:e.name)||oe(e==null?void 0:e.value))return void A.error(rs+"Invalid metric received",e);if(this._maxAllowedValue&&e.value>=this._maxAllowedValue)return void A.error(rs+"Ignoring metric with value >= "+this._maxAllowedValue,e);this.buffer.url!==i&&(this._flushToCapture(),this._delayedFlushTimer=setTimeout(this._flushToCapture,this.flushToCaptureTimeoutMs)),M(this.buffer.url)&&(this.buffer.url=i),this.buffer.firstMetricTimestamp=M(this.buffer.firstMetricTimestamp)?Date.now():this.buffer.firstMetricTimestamp,e.attribution&&e.attribution.interactionTargetElement&&(e.attribution.interactionTargetElement=void 0),this.buffer.metrics.push({...e,$current_url:i,$session_id:n.sessionId,$window_id:n.windowId,timestamp:Date.now()}),this.buffer.metrics.length===this.allowedMetrics.length&&this._flushToCapture()}});L(this,"_startCapturing",()=>{let e,t,n,i;const r=K.__PosthogExtensions__;M(r)||M(r.postHogWebVitalsCallbacks)||({onLCP:e,onCLS:t,onFCP:n,onINP:i}=r.postHogWebVitalsCallbacks),e&&t&&n&&i?(this.allowedMetrics.indexOf("LCP")>-1&&e(this._addToBuffer.bind(this)),this.allowedMetrics.indexOf("CLS")>-1&&t(this._addToBuffer.bind(this)),this.allowedMetrics.indexOf("FCP")>-1&&n(this._addToBuffer.bind(this)),this.allowedMetrics.indexOf("INP")>-1&&i(this._addToBuffer.bind(this)),this._initialized=!0):A.error(rs+"web vitals callbacks not loaded - not starting")});var t;this.instance=e,this._enabledServerSide=!((t=this.instance.persistence)===null||t===void 0||!t.props[sc]),this.startIfEnabled()}get allowedMetrics(){var e,t;const n=de(this.instance.config.capture_performance)?(e=this.instance.config.capture_performance)===null||e===void 0?void 0:e.web_vitals_allowed_metrics:void 0;return M(n)?((t=this.instance.persistence)===null||t===void 0?void 0:t.props[nc])||["CLS","FCP","INP","LCP"]:n}get flushToCaptureTimeoutMs(){return(de(this.instance.config.capture_performance)?this.instance.config.capture_performance.web_vitals_delayed_flush_ms:void 0)||5e3}get _maxAllowedValue(){const e=de(this.instance.config.capture_performance)&&ze(this.instance.config.capture_performance.__web_vitals_max_value)?this.instance.config.capture_performance.__web_vitals_max_value:Bc;return 0<e&&e<=6e4?Bc:e}get isEnabled(){const e=de(this.instance.config.capture_performance)?this.instance.config.capture_performance.web_vitals:void 0;return us(e)?e:this._enabledServerSide}startIfEnabled(){this.isEnabled&&!this._initialized&&(A.info(rs+" enabled, starting..."),this.loadScript(this._startCapturing))}afterDecideResponse(e){const t=de(e.capturePerformance)&&!!e.capturePerformance.web_vitals,n=de(e.capturePerformance)?e.capturePerformance.web_vitals_allowed_metrics:void 0;this.instance.persistence&&(this.instance.persistence.register({[sc]:t}),this.instance.persistence.register({[nc]:n})),this._enabledServerSide=t,this.startIfEnabled()}loadScript(e){var t,n,i;(t=K.__PosthogExtensions__)!==null&&t!==void 0&&t.postHogWebVitalsCallbacks&&e(),(n=K.__PosthogExtensions__)===null||n===void 0||(i=n.loadExternalDependency)===null||i===void 0||i.call(n,this.instance,"web-vitals",r=>{r?A.error(rs+" failed to load script",r):e()})}_currentURL(){const e=y?y.location.href:void 0;return e||A.error(rs+"Could not determine current URL"),e}}const ow={icontains:(s,e)=>!!y&&e.href.toLowerCase().indexOf(s.toLowerCase())>-1,not_icontains:(s,e)=>!!y&&e.href.toLowerCase().indexOf(s.toLowerCase())===-1,regex:(s,e)=>!!y&&Ys(e.href,s),not_regex:(s,e)=>!!y&&!Ys(e.href,s),exact:(s,e)=>e.href===s,is_not:(s,e)=>e.href!==s};class ve{constructor(e){L(this,"getWebExperimentsAndEvaluateDisplayLogic",(()=>{var e=this;return function(){let t=arguments.length>0&&arguments[0]!==void 0&&arguments[0];e.getWebExperiments(n=>{ve.logInfo("retrieved web experiments from the server"),e._flagToExperiments=new Map,n.forEach(i=>{if(i.feature_flag_key&&e._featureFlags&&e._featureFlags[i.feature_flag_key]){var r;e._flagToExperiments&&(ve.logInfo("setting flag key ",i.feature_flag_key," to web experiment ",i),(r=e._flagToExperiments)===null||r===void 0||r.set(i.feature_flag_key,i));const o=e._featureFlags[i.feature_flag_key];o&&i.variants[o]&&e.applyTransforms(i.name,o,i.variants[o].transforms)}else if(i.variants)for(const o in i.variants){const c=i.variants[o];ve.matchesTestVariant(c)&&e.applyTransforms(i.name,o,c.transforms)}})},t)}})());this.instance=e;const t=n=>{this.applyFeatureFlagChanges(n)};this.instance.onFeatureFlags&&this.instance.onFeatureFlags(t),this._flagToExperiments=new Map}applyFeatureFlagChanges(e){oe(this._flagToExperiments)||this.instance.config.disable_web_experiments||(ve.logInfo("applying feature flags",e),e.forEach(t=>{var n;if(this._flagToExperiments&&(n=this._flagToExperiments)!==null&&n!==void 0&&n.has(t)){var i;const r=this.instance.getFeatureFlag(t),o=(i=this._flagToExperiments)===null||i===void 0?void 0:i.get(t);r&&o!=null&&o.variants[r]&&this.applyTransforms(o.name,r,o.variants[r].transforms)}}))}afterDecideResponse(e){this._is_bot()?ve.logInfo("Refusing to render web experiment since the viewer is a likely bot"):(this._featureFlags=e.featureFlags,this.loadIfEnabled(),this.previewWebExperiment())}previewWebExperiment(){const e=ve.getWindowLocation();if(e!=null&&e.search){const t=Ii(e==null?void 0:e.search,"__experiment_id"),n=Ii(e==null?void 0:e.search,"__experiment_variant");t&&n&&(ve.logInfo(`previewing web experiments ${t} && ${n}`),this.getWebExperiments(i=>{this.showPreviewWebExperiment(parseInt(t),n,i)},!1,!0))}}loadIfEnabled(){this.instance.config.disable_web_experiments||this.getWebExperimentsAndEvaluateDisplayLogic()}getWebExperiments(e,t,n){if(this.instance.config.disable_web_experiments&&!n)return e([]);const i=this.instance.get_property("$web_experiments");if(i&&!t)return e(i);this.instance._send_request({url:this.instance.requestRouter.endpointFor("api",`/api/web_experiments/?token=${this.instance.config.token}`),method:"GET",transport:"XHR",callback:r=>{if(r.statusCode!==200||!r.json)return e([]);const o=r.json.experiments||[];return e(o)}})}showPreviewWebExperiment(e,t,n){const i=n.filter(r=>r.id===e);i&&i.length>0&&(ve.logInfo(`Previewing web experiment [${i[0].name}] with variant [${t}]`),this.applyTransforms(i[0].name,t,i[0].variants[t].transforms,!0))}static matchesTestVariant(e){return!oe(e.conditions)&&ve.matchUrlConditions(e)&&ve.matchUTMConditions(e)}static matchUrlConditions(e){var t;if(oe(e.conditions)||oe((t=e.conditions)===null||t===void 0?void 0:t.url))return!0;const n=ve.getWindowLocation();if(n){var i,r,o;return(i=e.conditions)===null||i===void 0||!i.url||ow[(r=(o=e.conditions)===null||o===void 0?void 0:o.urlMatchType)!==null&&r!==void 0?r:"icontains"](e.conditions.url,n)}return!1}static getWindowLocation(){return y==null?void 0:y.location}static matchUTMConditions(e){var t;if(oe(e.conditions)||oe((t=e.conditions)===null||t===void 0?void 0:t.utm))return!0;const n=he.campaignParams();if(n.utm_source){var i,r,o,c,u,h,p,f,g,m,E,v,w,S,C,x;const $=(i=e.conditions)===null||i===void 0||(r=i.utm)===null||r===void 0||!r.utm_campaign||((o=e.conditions)===null||o===void 0||(c=o.utm)===null||c===void 0?void 0:c.utm_campaign)==n.utm_campaign,P=(u=e.conditions)===null||u===void 0||(h=u.utm)===null||h===void 0||!h.utm_source||((p=e.conditions)===null||p===void 0||(f=p.utm)===null||f===void 0?void 0:f.utm_source)==n.utm_source,j=(g=e.conditions)===null||g===void 0||(m=g.utm)===null||m===void 0||!m.utm_medium||((E=e.conditions)===null||E===void 0||(v=E.utm)===null||v===void 0?void 0:v.utm_medium)==n.utm_medium,N=(w=e.conditions)===null||w===void 0||(S=w.utm)===null||S===void 0||!S.utm_term||((C=e.conditions)===null||C===void 0||(x=C.utm)===null||x===void 0?void 0:x.utm_term)==n.utm_term;return $&&j&&N&&P}return!1}static logInfo(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];A.info(`[WebExperiments] ${e}`,n)}applyTransforms(e,t,n,i){var r;this._is_bot()?ve.logInfo("Refusing to render web experiment since the viewer is a likely bot"):t!=="control"?n.forEach(o=>{if(o.selector){var c;ve.logInfo(`applying transform of variant ${t} for experiment ${e} `,o);let h=0;const p=(c=document)===null||c===void 0?void 0:c.querySelectorAll(o.selector);var u;p==null||p.forEach(f=>{const g=f;h+=1,o.attributes&&o.attributes.forEach(m=>{switch(m.name){case"text":g.innerText=m.value;break;case"html":g.innerHTML=m.value;break;case"cssClass":g.className=m.value;break;default:g.setAttribute(m.name,m.value)}}),o.text&&(g.innerText=o.text),o.html&&(g.parentElement?g.parentElement.innerHTML=o.html:g.innerHTML=o.html),o.css&&g.setAttribute("style",o.css)}),this.instance&&this.instance.capture&&this.instance.capture("$web_experiment_applied",{$web_experiment_name:e,$web_experiment_variant:t,$web_experiment_preview:i,$web_experiment_document_url:(u=ve.getWindowLocation())===null||u===void 0?void 0:u.href,$web_experiment_elements_modified:h})}}):(ve.logInfo("Control variants leave the page unmodified."),this.instance&&this.instance.capture&&this.instance.capture("$web_experiment_applied",{$web_experiment_name:e,$web_experiment_preview:i,$web_experiment_variant:t,$web_experiment_document_url:(r=ve.getWindowLocation())===null||r===void 0?void 0:r.href,$web_experiment_elements_modified:0}))}_is_bot(){return Ke&&this.instance?th(Ke,this.instance.config.custom_blocked_useragents):void 0}}const jc="/e/";class aw{constructor(e){var t;this.instance=e,this._endpointSuffix=((t=this.instance.persistence)===null||t===void 0?void 0:t.props[tc])||jc}get endpoint(){return this.instance.requestRouter.endpointFor("api",this._endpointSuffix)}afterDecideResponse(e){const t=e.autocaptureExceptions;this._endpointSuffix=de(t)&&t.endpoint||jc,this.instance.persistence&&this.instance.persistence.register({[tc]:this._endpointSuffix})}sendExceptionEvent(e){this.instance.capture("$exception",e,{_noTruncate:!0,_batchKey:"exceptionEvent",_url:this.endpoint})}}const Pn={},Hc=()=>{},Rs="posthog";let nh=!xE&&(be==null?void 0:be.indexOf("MSIE"))===-1&&(be==null?void 0:be.indexOf("Mozilla"))===-1;const Vc=()=>{var s;return{api_host:"https://us.i.posthog.com",ui_host:null,token:"",autocapture:!0,rageclick:!0,cross_subdomain_cookie:L0(D==null?void 0:D.location),persistence:"localStorage+cookie",persistence_name:"",loaded:Hc,store_google:!0,custom_campaign_params:[],custom_blocked_useragents:[],save_referrer:!0,capture_pageview:!0,capture_pageleave:"if_capture_pageview",debug:De&&Ce(De==null?void 0:De.search)&&De.search.indexOf("__posthog_debug=true")!==-1||!1,verbose:!1,cookie_expiration:365,upgrade:!1,disable_session_recording:!1,disable_persistence:!1,disable_web_experiments:!0,disable_surveys:!1,enable_recording_console_log:void 0,secure_cookie:(y==null||(s=y.location)===null||s===void 0?void 0:s.protocol)==="https:",ip:!0,opt_out_capturing_by_default:!1,opt_out_persistence_by_default:!1,opt_out_useragent_filter:!1,opt_out_capturing_persistence_type:"localStorage",opt_out_capturing_cookie_prefix:null,opt_in_site_apps:!1,property_denylist:[],respect_dnt:!1,sanitize_properties:null,request_headers:{},inapp_protocol:"//",inapp_link_new_window:!1,request_batching:!0,properties_string_max_length:65535,session_recording:{},mask_all_element_attributes:!1,mask_all_text:!1,advanced_disable_decide:!1,advanced_disable_feature_flags:!1,advanced_disable_feature_flags_on_first_load:!1,advanced_disable_toolbar_metrics:!1,feature_flag_request_timeout_ms:3e3,on_request_error:e=>{const t="Bad HTTP status: "+e.statusCode+" "+e.text;A.error(t)},get_device_id:e=>e,_onCapture:Hc,capture_performance:void 0,name:"posthog",bootstrap:{},disable_compression:!1,session_idle_timeout_seconds:1800,person_profiles:"identified_only",__add_tracing_headers:!1}},Wc=s=>{const e={};M(s.process_person)||(e.person_profiles=s.process_person),M(s.xhr_headers)||(e.request_headers=s.xhr_headers),M(s.cookie_name)||(e.persistence_name=s.cookie_name),M(s.disable_cookie)||(e.disable_persistence=s.disable_cookie);const t=xe({},e,s);return fe(s.property_blacklist)&&(M(s.property_denylist)?t.property_denylist=s.property_blacklist:fe(s.property_denylist)?t.property_denylist=[...s.property_blacklist,...s.property_denylist]:A.error("Invalid value for property_denylist config: "+s.property_denylist)),t};class lw{constructor(){L(this,"__forceAllowLocalhost",!1)}get _forceAllowLocalhost(){return this.__forceAllowLocalhost}set _forceAllowLocalhost(e){A.error("WebPerformanceObserver is deprecated and has no impact on network capture. Use `_forceAllowLocalhostNetworkCapture` on `posthog.sessionRecording`"),this.__forceAllowLocalhost=e}}class nr{constructor(){L(this,"webPerformance",new lw);L(this,"version",Mt.LIB_VERSION);L(this,"_internalEventEmitter",new Ud);this.config=Vc(),this.decideEndpointWasHit=!1,this.SentryIntegration=FE,this.sentryIntegration=e=>function(t,n){const i=Wd(t,n);return{name:Vd,processEvent:r=>i(r)}}(this,e),this.__request_queue=[],this.__loaded=!1,this.analyticsDefaultEndpoint="/e/",this._initialPageviewCaptured=!1,this._initialPersonProfilesConfig=null,this.featureFlags=new R0(this),this.toolbar=new PE(this),this.scrollManager=new ew(this),this.pageViewManager=new jE(this),this.surveys=new GE(this),this.experiments=new ve(this),this.exceptions=new aw(this),this.rateLimiter=new YE(this),this.requestRouter=new ME(this),this.consent=new nw(this),this.people={set:(e,t,n)=>{const i=Ce(e)?{[e]:t}:e;this.setPersonProperties(i),n==null||n({})},set_once:(e,t,n)=>{const i=Ce(e)?{[e]:t}:e;this.setPersonProperties(void 0,i),n==null||n({})}},this.on("eventCaptured",e=>A.info(`send "${e==null?void 0:e.event}"`,e))}init(e,t,n){if(n&&n!==Rs){var i;const r=(i=Pn[n])!==null&&i!==void 0?i:new nr;return r._init(e,t,n),Pn[n]=r,Pn[Rs][n]=r,r}return this._init(e,t,n)}_init(e){var t,n;let i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=arguments.length>2?arguments[2]:void 0;if(M(e)||Yl(e))return A.critical("PostHog was initialized without a token. This likely indicates a misconfiguration. Please check the first argument passed to posthog.init()"),this;if(this.__loaded)return A.warn("You have already initialized PostHog! Re-initializing is a no-op"),this;this.__loaded=!0,this.config={},this._triggered_notifs=[],i.person_profiles&&(this._initialPersonProfilesConfig=i.person_profiles),this.set_config(xe({},Vc(),Wc(i),{name:r,token:e})),this.config.on_xhr_error&&A.error("[posthog] on_xhr_error is deprecated. Use on_request_error instead"),this.compression=i.disable_compression?void 0:ct.GZipJS,this.persistence=new Ur(this.config),this.sessionPersistence=this.config.persistence==="sessionStorage"?this.persistence:new Ur({...this.config,persistence:"sessionStorage"});const o={...this.persistence.props},c={...this.sessionPersistence.props};if(this._requestQueue=new $E(g=>this._send_retriable_request(g)),this._retryQueue=new DE(this),this.__request_queue=[],this.sessionManager=new NE(this.config,this.persistence),this.sessionPropsManager=new XE(this.sessionManager,this.persistence),new sw(this).startIfEnabledOrStop(),this.sessionRecording=new CE(this),this.sessionRecording.startIfEnabledOrStop(),this.config.disable_scroll_properties||this.scrollManager.startMeasuringScrollPosition(),this.autocapture=new tw(this),this.autocapture.startIfEnabled(),this.surveys.loadIfEnabled(),this.heatmaps=new JE(this),this.heatmaps.startIfEnabled(),this.webVitalsAutocapture=new rw(this),this.exceptionObserver=new iw(this),this.exceptionObserver.startIfEnabled(),Mt.DEBUG=Mt.DEBUG||this.config.debug,Mt.DEBUG&&A.info("Starting in debug mode",{this:this,config:i,thisC:{...this.config},p:o,s:c}),this._sync_opt_out_with_persistence(),((t=i.bootstrap)===null||t===void 0?void 0:t.distinctID)!==void 0){var u,h;const g=this.config.get_device_id(Ht()),m=(u=i.bootstrap)!==null&&u!==void 0&&u.isIdentifiedID?g:i.bootstrap.distinctID;this.persistence.set_property(vt,(h=i.bootstrap)!==null&&h!==void 0&&h.isIdentifiedID?"identified":"anonymous"),this.register({distinct_id:i.bootstrap.distinctID,$device_id:m})}if(this._hasBootstrappedFeatureFlags()){var p,f;const g=Object.keys(((p=i.bootstrap)===null||p===void 0?void 0:p.featureFlags)||{}).filter(E=>{var v,w;return!((v=i.bootstrap)===null||v===void 0||(w=v.featureFlags)===null||w===void 0||!w[E])}).reduce((E,v)=>{var w,S;return E[v]=((w=i.bootstrap)===null||w===void 0||(S=w.featureFlags)===null||S===void 0?void 0:S[v])||!1,E},{}),m=Object.keys(((f=i.bootstrap)===null||f===void 0?void 0:f.featureFlagPayloads)||{}).filter(E=>g[E]).reduce((E,v)=>{var w,S,C,x;return(w=i.bootstrap)!==null&&w!==void 0&&(S=w.featureFlagPayloads)!==null&&S!==void 0&&S[v]&&(E[v]=(C=i.bootstrap)===null||C===void 0||(x=C.featureFlagPayloads)===null||x===void 0?void 0:x[v]),E},{});this.featureFlags.receivedFeatureFlags({featureFlags:g,featureFlagPayloads:m})}if(!this.get_distinct_id()){const g=this.config.get_device_id(Ht());this.register_once({distinct_id:g,$device_id:g},""),this.persistence.set_property(vt,"anonymous")}return y==null||(n=y.addEventListener)===null||n===void 0||n.call(y,"onpagehide"in self?"pagehide":"unload",this._handle_unload.bind(this)),this.toolbar.maybeLoadToolbar(),i.segment?BE(this,()=>this._loaded()):this._loaded(),Qe(this.config._onCapture)&&this.on("eventCaptured",g=>this.config._onCapture(g.event,g)),this}_afterDecideResponse(e){var t,n,i,r,o,c,u,h,p;this.compression=void 0,e.supportedCompression&&!this.config.disable_compression&&(this.compression=Y(e.supportedCompression,ct.GZipJS)?ct.GZipJS:Y(e.supportedCompression,ct.Base64)?ct.Base64:void 0),(t=e.analytics)!==null&&t!==void 0&&t.endpoint&&(this.analyticsDefaultEndpoint=e.analytics.endpoint),this.set_config({person_profiles:this._initialPersonProfilesConfig?this._initialPersonProfilesConfig:e.defaultIdentifiedOnly?"identified_only":"always"}),(n=this.sessionRecording)===null||n===void 0||n.afterDecideResponse(e),(i=this.autocapture)===null||i===void 0||i.afterDecideResponse(e),(r=this.heatmaps)===null||r===void 0||r.afterDecideResponse(e),(o=this.experiments)===null||o===void 0||o.afterDecideResponse(e),(c=this.surveys)===null||c===void 0||c.afterDecideResponse(e),(u=this.webVitalsAutocapture)===null||u===void 0||u.afterDecideResponse(e),(h=this.exceptions)===null||h===void 0||h.afterDecideResponse(e),(p=this.exceptionObserver)===null||p===void 0||p.afterDecideResponse(e)}_loaded(){const e=this.config.advanced_disable_decide;e||this.featureFlags.setReloadingPaused(!0);try{this.config.loaded(this)}catch(t){A.critical("`loaded` function failed",t)}this._start_queue_if_opted_in(),this.config.capture_pageview&&setTimeout(()=>{this.consent.isOptedIn()&&this._captureInitialPageview()},1),e||(new kE(this).call(),this.featureFlags.resetRequestQueue())}_start_queue_if_opted_in(){var e;this.has_opted_out_capturing()||this.config.request_batching&&((e=this._requestQueue)===null||e===void 0||e.enable())}_dom_loaded(){this.has_opted_out_capturing()||Fs(this.__request_queue,e=>this._send_retriable_request(e)),this.__request_queue=[],this._start_queue_if_opted_in()}_handle_unload(){var e,t;this.config.request_batching?(this._shouldCapturePageleave()&&this.capture("$pageleave"),(e=this._requestQueue)===null||e===void 0||e.unload(),(t=this._retryQueue)===null||t===void 0||t.unload()):this._shouldCapturePageleave()&&this.capture("$pageleave",null,{transport:"sendBeacon"})}_send_request(e){this.__loaded&&(nh?this.__request_queue.push(e):this.rateLimiter.isServerRateLimited(e.batchKey)||(e.transport=e.transport||this.config.api_transport,e.url=ji(e.url,{ip:this.config.ip?1:0}),e.headers={...this.config.request_headers},e.compression=e.compression==="best-available"?this.compression:e.compression,(t=>{var n,i,r;const o={...t};o.timeout=o.timeout||6e4,o.url=ji(o.url,{_:new Date().getTime().toString(),ver:Mt.LIB_VERSION,compression:o.compression});const c=(n=o.transport)!==null&&n!==void 0?n:"XHR",u=(i=(r=ld(On,h=>h.transport===c))===null||r===void 0?void 0:r.method)!==null&&i!==void 0?i:On[0].method;if(!u)throw new Error("No available transport method");u(o)})({...e,callback:t=>{var n,i,r;this.rateLimiter.checkForLimiting(t),t.statusCode>=400&&((i=(r=this.config).on_request_error)===null||i===void 0||i.call(r,t)),(n=e.callback)===null||n===void 0||n.call(e,t)}})))}_send_retriable_request(e){this._retryQueue?this._retryQueue.retriableRequest(e):this._send_request(e)}_execute_array(e){let t;const n=[],i=[],r=[];Fs(e,c=>{c&&(t=c[0],fe(t)?r.push(c):Qe(c)?c.call(this):fe(c)&&t==="alias"?n.push(c):fe(c)&&t.indexOf("capture")!==-1&&Qe(this[t])?r.push(c):i.push(c))});const o=function(c,u){Fs(c,function(h){if(fe(h[0])){let p=u;J(h,function(f){p=p[f[0]].apply(p,f.slice(1))})}else this[h[0]].apply(this,h.slice(1))},u)};o(n,this),o(i,this),o(r,this)}_hasBootstrappedFeatureFlags(){var e,t;return((e=this.config.bootstrap)===null||e===void 0?void 0:e.featureFlags)&&Object.keys((t=this.config.bootstrap)===null||t===void 0?void 0:t.featureFlags).length>0||!1}push(e){this._execute_array([e])}capture(e,t,n){var i;if(!(this.__loaded&&this.persistence&&this.sessionPersistence&&this._requestQueue))return void A.uninitializedWarning("posthog.capture");if(this.consent.isOptedOut())return;if(M(e)||!Ce(e))return void A.error("No event name provided to posthog.capture");if(!this.config.opt_out_useragent_filter&&this._is_bot())return;const r=n!=null&&n.skip_client_rate_limiting?void 0:this.rateLimiter.clientRateLimitContext();if(r!=null&&r.isRateLimited)return void A.critical("This capture call is ignored due to client rate limiting.");this.sessionPersistence.update_search_keyword(),this.config.store_google&&this.sessionPersistence.update_campaign_params(),this.config.save_referrer&&this.sessionPersistence.update_referrer_info(),(this.config.store_google||this.config.save_referrer)&&this.persistence.set_initial_person_info();const o=new Date,c=(n==null?void 0:n.timestamp)||o;let u={uuid:Ht(),event:e,properties:this._calculate_event_properties(e,t||{},c)};r&&(u.properties.$lib_rate_limit_remaining_tokens=r.remainingTokens),n!=null&&n.$set&&(u.$set=n==null?void 0:n.$set);const h=this._calculate_set_once_properties(n==null?void 0:n.$set_once);h&&(u.$set_once=h),u=$0(u,n!=null&&n._noTruncate?null:this.config.properties_string_max_length),u.timestamp=c,M(n==null?void 0:n.timestamp)||(u.properties.$event_time_override_provided=!0,u.properties.$event_time_override_system_time=o);const p={...u.properties.$set,...u.$set};bi(p)||this.setPersonPropertiesForFlags(p),this._internalEventEmitter.emit("eventCaptured",u);const f={method:"POST",url:(i=n==null?void 0:n._url)!==null&&i!==void 0?i:this.requestRouter.endpointFor("api",this.analyticsDefaultEndpoint),data:u,compression:"best-available",batchKey:n==null?void 0:n._batchKey};return!this.config.request_batching||n&&(n==null||!n._batchKey)||n!=null&&n.send_instantly?this._send_retriable_request(f):this._requestQueue.enqueue(f),u}_addCaptureHook(e){return this.on("eventCaptured",t=>e(t.event,t))}_calculate_event_properties(e,t,n){if(n=n||new Date,!this.persistence||!this.sessionPersistence)return t;const i=this.persistence.remove_event_timer(e);let r={...t};if(r.token=this.config.token,e==="$snapshot"){const h={...this.persistence.properties(),...this.sessionPersistence.properties()};return r.distinct_id=h.distinct_id,(!Ce(r.distinct_id)&&!ze(r.distinct_id)||Yl(r.distinct_id))&&A.error("Invalid distinct_id for replay event. This indicates a bug in your implementation"),r}const o=he.properties();if(this.sessionManager){const{sessionId:h,windowId:p}=this.sessionManager.checkAndGetSessionAndWindowId();r.$session_id=h,r.$window_id=p}if(this.requestRouter.region===hs.CUSTOM&&(r.$lib_custom_api_host=this.config.api_host),this.sessionPropsManager&&this.config.__preview_send_client_session_params&&(e==="$pageview"||e==="$pageleave"||e==="$autocapture")){const h=this.sessionPropsManager.getSessionProps();r=xe(r,h)}if(!this.config.disable_scroll_properties){let h={};e==="$pageview"?h=this.pageViewManager.doPageView(n):e==="$pageleave"&&(h=this.pageViewManager.doPageLeave(n)),r=xe(r,h)}if(e==="$pageview"&&D&&(r.title=D.title),!M(i)){const h=n.getTime()-i;r.$duration=parseFloat((h/1e3).toFixed(3))}be&&this.config.opt_out_useragent_filter&&(r.$browser_type=this._is_bot()?"bot":"browser"),r=xe({},o,this.persistence.properties(),this.sessionPersistence.properties(),r),r.$is_identified=this._isIdentified(),fe(this.config.property_denylist)?J(this.config.property_denylist,function(h){delete r[h]}):A.error("Invalid value for property_denylist config: "+this.config.property_denylist+" or property_blacklist config: "+this.config.property_blacklist);const c=this.config.sanitize_properties;c&&(r=c(r,e));const u=this._hasPersonProcessing();return r.$process_person_profile=u,u&&this._requirePersonProcessing("_calculate_event_properties"),r}_calculate_set_once_properties(e){if(!this.persistence||!this._hasPersonProcessing())return e;let t=xe({},this.persistence.get_initial_props(),e||{});const n=this.config.sanitize_properties;return n&&(t=n(t,"$set_once")),bi(t)?void 0:t}register(e,t){var n;(n=this.persistence)===null||n===void 0||n.register(e,t)}register_once(e,t,n){var i;(i=this.persistence)===null||i===void 0||i.register_once(e,t,n)}register_for_session(e){var t;(t=this.sessionPersistence)===null||t===void 0||t.register(e)}unregister(e){var t;(t=this.persistence)===null||t===void 0||t.unregister(e)}unregister_for_session(e){var t;(t=this.sessionPersistence)===null||t===void 0||t.unregister(e)}_register_single(e,t){this.register({[e]:t})}getFeatureFlag(e,t){return this.featureFlags.getFeatureFlag(e,t)}getFeatureFlagPayload(e){const t=this.featureFlags.getFeatureFlagPayload(e);try{return JSON.parse(t)}catch{return t}}isFeatureEnabled(e,t){return this.featureFlags.isFeatureEnabled(e,t)}reloadFeatureFlags(){this.featureFlags.reloadFeatureFlags()}updateEarlyAccessFeatureEnrollment(e,t){this.featureFlags.updateEarlyAccessFeatureEnrollment(e,t)}getEarlyAccessFeatures(e){let t=arguments.length>1&&arguments[1]!==void 0&&arguments[1];return this.featureFlags.getEarlyAccessFeatures(e,t)}on(e,t){return this._internalEventEmitter.on(e,t)}onFeatureFlags(e){return this.featureFlags.onFeatureFlags(e)}onSessionId(e){var t,n;return(t=(n=this.sessionManager)===null||n===void 0?void 0:n.onSessionId(e))!==null&&t!==void 0?t:()=>{}}getSurveys(e){let t=arguments.length>1&&arguments[1]!==void 0&&arguments[1];this.surveys.getSurveys(e,t)}getActiveMatchingSurveys(e){let t=arguments.length>1&&arguments[1]!==void 0&&arguments[1];this.surveys.getActiveMatchingSurveys(e,t)}renderSurvey(e,t){this.surveys.renderSurvey(e,t)}canRenderSurvey(e){this.surveys.canRenderSurvey(e)}getNextSurveyStep(e,t,n){return this.surveys.getNextSurveyStep(e,t,n)}identify(e,t,n){if(!this.__loaded||!this.persistence)return A.uninitializedWarning("posthog.identify");if(ze(e)&&(e=e.toString(),A.warn("The first argument to posthog.identify was a number, but it should be a string. It has been converted to a string.")),!e)return void A.error("Unique user id has not been set in posthog.identify");if(["distinct_id","distinctid"].includes(e.toLowerCase()))return void A.critical(`The string "${e}" was set in posthog.identify which indicates an error. This ID should be unique to the user and not a hardcoded string.`);if(!this._requirePersonProcessing("posthog.identify"))return;const i=this.get_distinct_id();if(this.register({$user_id:e}),!this.get_property("$device_id")){const o=i;this.register_once({$had_persisted_distinct_id:!0,$device_id:o},"")}e!==i&&e!==this.get_property(vn)&&(this.unregister(vn),this.register({distinct_id:e}));const r=(this.persistence.get_property(vt)||"anonymous")==="anonymous";e!==i&&r?(this.persistence.set_property(vt,"identified"),this.setPersonPropertiesForFlags(t||{},!1),this.capture("$identify",{distinct_id:e,$anon_distinct_id:i},{$set:t||{},$set_once:n||{}}),this.featureFlags.setAnonymousDistinctId(i)):(t||n)&&this.setPersonProperties(t,n),e!==i&&(this.reloadFeatureFlags(),this.unregister($i))}setPersonProperties(e,t){(e||t)&&this._requirePersonProcessing("posthog.setPersonProperties")&&(this.setPersonPropertiesForFlags(e||{}),this.capture("$set",{$set:e||{},$set_once:t||{}}))}group(e,t,n){if(!e||!t)return void A.error("posthog.group requires a group type and group key");if(!this._requirePersonProcessing("posthog.group"))return;const i=this.getGroups();i[e]!==t&&this.resetGroupPropertiesForFlags(e),this.register({$groups:{...i,[e]:t}}),n&&(this.capture("$groupidentify",{$group_type:e,$group_key:t,$group_set:n}),this.setGroupPropertiesForFlags({[e]:n})),i[e]===t||n||this.reloadFeatureFlags()}resetGroups(){this.register({$groups:{}}),this.resetGroupPropertiesForFlags(),this.reloadFeatureFlags()}setPersonPropertiesForFlags(e){let t=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1];this._requirePersonProcessing("posthog.setPersonPropertiesForFlags")&&this.featureFlags.setPersonPropertiesForFlags(e,t)}resetPersonPropertiesForFlags(){this.featureFlags.resetPersonPropertiesForFlags()}setGroupPropertiesForFlags(e){let t=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1];this._requirePersonProcessing("posthog.setGroupPropertiesForFlags")&&this.featureFlags.setGroupPropertiesForFlags(e,t)}resetGroupPropertiesForFlags(e){this.featureFlags.resetGroupPropertiesForFlags(e)}reset(e){var t,n,i,r,o;if(A.info("reset"),!this.__loaded)return A.uninitializedWarning("posthog.reset");const c=this.get_property("$device_id");this.consent.reset(),(t=this.persistence)===null||t===void 0||t.clear(),(n=this.sessionPersistence)===null||n===void 0||n.clear(),(i=this.surveys)===null||i===void 0||i.reset(),(r=this.persistence)===null||r===void 0||r.set_property(vt,"anonymous"),(o=this.sessionManager)===null||o===void 0||o.resetSessionId();const u=this.config.get_device_id(Ht());this.register_once({distinct_id:u,$device_id:e?u:c},"")}get_distinct_id(){return this.get_property("distinct_id")}getGroups(){return this.get_property("$groups")||{}}get_session_id(){var e,t;return(e=(t=this.sessionManager)===null||t===void 0?void 0:t.checkAndGetSessionAndWindowId(!0).sessionId)!==null&&e!==void 0?e:""}get_session_replay_url(e){if(!this.sessionManager)return"";const{sessionId:t,sessionStartTimestamp:n}=this.sessionManager.checkAndGetSessionAndWindowId(!0);let i=this.requestRouter.endpointFor("ui",`/project/${this.config.token}/replay/${t}`);if(e!=null&&e.withTimestamp&&n){var r;const o=(r=e.timestampLookBack)!==null&&r!==void 0?r:10;if(!n)return i;i+=`?t=${Math.max(Math.floor((new Date().getTime()-n)/1e3)-o,0)}`}return i}alias(e,t){return e===this.get_property(cd)?(A.critical("Attempting to create alias for existing People user - aborting."),-2):this._requirePersonProcessing("posthog.alias")?(M(t)&&(t=this.get_distinct_id()),e!==t?(this._register_single(vn,e),this.capture("$create_alias",{alias:e,distinct_id:t})):(A.warn("alias matches current distinct_id - skipping api call."),this.identify(e),-1)):void 0}set_config(e){const t={...this.config};var n,i,r,o;de(e)&&(xe(this.config,Wc(e)),(n=this.persistence)===null||n===void 0||n.update_config(this.config,t),this.sessionPersistence=this.config.persistence==="sessionStorage"?this.persistence:new Ur({...this.config,persistence:"sessionStorage"}),pe.is_supported()&&pe.get("ph_debug")==="true"&&(this.config.debug=!0),this.config.debug&&(Mt.DEBUG=!0,A.info("set_config",{config:e,oldConfig:t,newConfig:{...this.config}})),(i=this.sessionRecording)===null||i===void 0||i.startIfEnabledOrStop(),(r=this.autocapture)===null||r===void 0||r.startIfEnabled(),(o=this.heatmaps)===null||o===void 0||o.startIfEnabled(),this.surveys.loadIfEnabled(),this._sync_opt_out_with_persistence())}startSessionRecording(e){const t=us(e)&&e;if(t||e!=null&&e.sampling||e!=null&&e.linked_flag){var n;const o=(n=this.sessionManager)===null||n===void 0?void 0:n.checkAndGetSessionAndWindowId();var i,r;(t||e!=null&&e.sampling)&&((i=this.sessionRecording)===null||i===void 0||i.overrideSampling(),A.info("Session recording started with sampling override for session: ",o==null?void 0:o.sessionId)),(t||e!=null&&e.linked_flag)&&((r=this.sessionRecording)===null||r===void 0||r.overrideLinkedFlag(),A.info("Session recording started with linked_flags override"))}this.set_config({disable_session_recording:!1})}stopSessionRecording(){this.set_config({disable_session_recording:!0})}sessionRecordingStarted(){var e;return!((e=this.sessionRecording)===null||e===void 0||!e.started)}captureException(e,t){var n;const i=new Error("PostHog syntheticException"),r=Qe((n=K.__PosthogExtensions__)===null||n===void 0?void 0:n.parseErrorAsProperties)?K.__PosthogExtensions__.parseErrorAsProperties([e.message,void 0,void 0,void 0,e],{syntheticException:i}):{$exception_level:"error",$exception_list:[{type:e.name,value:e.message,mechanism:{handled:!0,synthetic:!1}}],...t};this.exceptions.sendExceptionEvent(r)}loadToolbar(e){return this.toolbar.loadToolbar(e)}get_property(e){var t;return(t=this.persistence)===null||t===void 0?void 0:t.props[e]}getSessionProperty(e){var t;return(t=this.sessionPersistence)===null||t===void 0?void 0:t.props[e]}toString(){var e;let t=(e=this.config.name)!==null&&e!==void 0?e:Rs;return t!==Rs&&(t=Rs+"."+t),t}_isIdentified(){var e,t;return((e=this.persistence)===null||e===void 0?void 0:e.get_property(vt))==="identified"||((t=this.sessionPersistence)===null||t===void 0?void 0:t.get_property(vt))==="identified"}_hasPersonProcessing(){var e,t,n,i;return!(this.config.person_profiles==="never"||this.config.person_profiles==="identified_only"&&!this._isIdentified()&&bi(this.getGroups())&&((e=this.persistence)===null||e===void 0||(t=e.props)===null||t===void 0||!t[vn])&&((n=this.persistence)===null||n===void 0||(i=n.props)===null||i===void 0||!i[xi]))}_shouldCapturePageleave(){return this.config.capture_pageleave===!0||this.config.capture_pageleave==="if_capture_pageview"&&this.config.capture_pageview}createPersonProfile(){this._hasPersonProcessing()||this._requirePersonProcessing("posthog.createPersonProfile")&&this.setPersonProperties({},{})}_requirePersonProcessing(e){return this.config.person_profiles==="never"?(A.error(e+' was called, but process_person is set to "never". This call will be ignored.'),!1):(this._register_single(xi,!0),!0)}_sync_opt_out_with_persistence(){var e,t;const n=this.consent.isOptedOut(),i=this.config.opt_out_persistence_by_default,r=this.config.disable_persistence||n&&!!i;var o,c;((e=this.persistence)===null||e===void 0?void 0:e.disabled)!==r&&((o=this.persistence)===null||o===void 0||o.set_disabled(r)),((t=this.sessionPersistence)===null||t===void 0?void 0:t.disabled)!==r&&((c=this.sessionPersistence)===null||c===void 0||c.set_disabled(r))}opt_in_capturing(e){var t;this.consent.optInOut(!0),this._sync_opt_out_with_persistence(),(M(e==null?void 0:e.captureEventName)||e!=null&&e.captureEventName)&&this.capture((t=e==null?void 0:e.captureEventName)!==null&&t!==void 0?t:"$opt_in",e==null?void 0:e.captureProperties,{send_instantly:!0}),this.config.capture_pageview&&this._captureInitialPageview()}opt_out_capturing(){this.consent.optInOut(!1),this._sync_opt_out_with_persistence()}has_opted_in_capturing(){return this.consent.isOptedIn()}has_opted_out_capturing(){return this.consent.isOptedOut()}clear_opt_in_out_capturing(){this.consent.reset(),this._sync_opt_out_with_persistence()}_is_bot(){return Ke?th(Ke,this.config.custom_blocked_useragents):void 0}_captureInitialPageview(){D&&!this._initialPageviewCaptured&&(this._initialPageviewCaptured=!0,this.capture("$pageview",{title:D.title},{send_instantly:!0}))}debug(e){e===!1?(y==null||y.console.log("You've disabled debug mode."),localStorage&&localStorage.removeItem("ph_debug"),this.set_config({debug:!1})):(y==null||y.console.log("You're now in debug mode. All calls to PostHog will be logged in your console.\nYou can disable this with `posthog.debug(false)`."),localStorage&&localStorage.setItem("ph_debug","true"),this.set_config({debug:!0}))}}(function(s,e){for(let t=0;t<e.length;t++)s.prototype[e[t]]=P0(s.prototype[e[t]])})(nr,["identify"]);const cw=function(){const s=Pn[Rs]=new nr;return function(){function e(){e.done||(e.done=!0,nh=!1,J(Pn,function(t){t._dom_loaded()}))}D!=null&&D.addEventListener&&(D.readyState==="complete"?e():D.addEventListener("DOMContentLoaded",e,!1)),y&&yt(y,"load",e,!0)}(),s}(),Q=Zr({});Q.config.globalProperties.emitter=ry();Q.config.globalProperties.$sharedData=window.sharedData;window.sharedData.posthog.enabled&&window.sharedData.posthog.key&&cw.init(window.sharedData.posthog.key,{api_host:"https://app.posthog.com"});Q.use(S0,{load:{key:window.sharedData.app.google_maps_key,language:"da",libraries:"places",v:"3.58"}});Q.use(vy);const ih=Qf();ih.use(({store:s})=>{s.emitter=Q.config.globalProperties.emitter});Q.use(ih);Q.use(gy,{resolve:async s=>await Object.assign({"../../lang/da.json":()=>ee(()=>import("./da-DRlSoKfF.js"),[]),"../../lang/de.json":()=>ee(()=>import("./de-CXyyL6zC.js"),[]),"../../lang/en.json":()=>ee(()=>import("./en-CJFyaJ5p.js"),[]),"../../lang/php_da.json":()=>ee(()=>import("./php_da-BrsAuDIZ.js"),[]),"../../lang/php_en.json":()=>ee(()=>import("./php_en-4hU1dFZ4.js"),[])})[`../../lang/${s}.json`]()});Q.component("app-hub",le(()=>ee(()=>import("./AppHub-CfMaj6NP.js"),__vite__mapDeps([0,1,2,3,4]))));Q.component("basket",le(()=>ee(()=>import("./Basket-9HAKx_e6.js"),__vite__mapDeps([4,2,1,3]))));Q.component("basket-footer",le(()=>ee(()=>import("./BasketFooter-BvvbrxmC.js"),__vite__mapDeps([5,1,3,2]))));Q.component("basket-header",le(()=>ee(()=>import("./BasketHeader-DBiEMJN0.js"),__vite__mapDeps([6,1,3,2]))));Q.component("basket-item",le(()=>ee(()=>import("./BasketItem-vJRTPY5v.js"),__vite__mapDeps([7,2,3]))));Q.component("basket-lite",le(()=>ee(()=>import("./BasketLite-B8oVReL7.js"),__vite__mapDeps([8,2,1,3]))));Q.component("basket-link",le(()=>ee(()=>import("./BasketLink-CBBBwbPf.js"),__vite__mapDeps([9,1,3,2]))));Q.component("basket-next",le(()=>ee(()=>import("./Next-BV9m3tqG.js"),__vite__mapDeps([10,1,5,3,2,6]))));Q.component("checkout-gls",le(()=>ee(()=>import("./CheckoutGls-BeUW6jjE.js"),__vite__mapDeps([11,12,2,3]))));Q.component("checkout-wolt",le(()=>ee(()=>import("./CheckoutWolt-BWZmgfbE.js"),__vite__mapDeps([13,12,1,14,3,2]))));Q.component("checkout-table",le(()=>ee(()=>import("./CheckoutTable-DM7V0qjk.js"),__vite__mapDeps([15,12,14,1,3,2]))));Q.component("checkout-room",le(()=>ee(()=>import("./CheckoutRoom-C8ZWEsio.js"),__vite__mapDeps([16,12,2,3]))));Q.component("checkout-pickup",le(()=>ee(()=>import("./CheckoutPickup-BrbrcjQz.js"),__vite__mapDeps([17,12,2,3]))));Q.component("checkout-delivery",le(()=>ee(()=>import("./CheckoutDelivery-DVjzxtuR.js"),__vite__mapDeps([18,12,14,1,3,2]))));Q.component("checkout-delivery-v2",le(()=>ee(()=>import("./CheckoutDeliveryV2-BQ8tx4z2.js"),__vite__mapDeps([19,12,1,14,3,2]))));Q.component("checkout-restaurant",le(()=>ee(()=>import("./CheckoutRestaurant-Dotooq6R.js"),__vite__mapDeps([20,12,14,1,3,2]))));Q.component("checkout-epos",le(()=>ee(()=>import("./CheckoutEpos-kwBrVa5s.js"),__vite__mapDeps([21,12,14,1,3,2]))));Q.component("epos-basket-footer",le(()=>ee(()=>import("./BasketFooter-D3v3nQpq.js"),__vite__mapDeps([22,2,1,3]))));Q.component("epos-basket-checkout",le(()=>ee(()=>import("./Checkout-DJB-noy3.js"),__vite__mapDeps([23,3,2]))));Q.component("epos-customer",le(()=>ee(()=>import("./Customer-5lWo7kXc.js"),__vite__mapDeps([24,2,3]))));Q.component("epos-basket-lite",le(()=>ee(()=>import("./BasketLite-BaMDq3xW.js"),__vite__mapDeps([25,2,1,3]))));Q.component("food-tracker",le(()=>ee(()=>import("./Tracker-DVHlsJgv.js"),__vite__mapDeps([26,12,1,14,3,2]))));const uw=C0();uw.init(window.sharedData.basket_content);Q.mount("#app");export{Ks as M,C0 as b,ii as e};
