function gn(t,r){return function(){return t.apply(r,arguments)}}const{toString:Zi}=Object.prototype,{getPrototypeOf:pt}=Object,je=(t=>r=>{const s=Zi.call(r);return t[s]||(t[s]=s.slice(8,-1).toLowerCase())})(Object.create(null)),Y=t=>(t=t.toLowerCase(),r=>je(r)===t),Ue=t=>r=>typeof r===t,{isArray:de}=Array,ye=Ue("undefined");function es(t){return t!==null&&!ye(t)&&t.constructor!==null&&!ye(t.constructor)&&W(t.constructor.isBuffer)&&t.constructor.isBuffer(t)}const vn=Y("ArrayBuffer");function ts(t){let r;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?r=ArrayBuffer.isView(t):r=t&&t.buffer&&vn(t.buffer),r}const ns=Ue("string"),W=Ue("function"),bn=Ue("number"),Fe=t=>t!==null&&typeof t=="object",rs=t=>t===!0||t===!1,Oe=t=>{if(je(t)!=="object")return!1;const r=pt(t);return(r===null||r===Object.prototype||Object.getPrototypeOf(r)===null)&&!(Symbol.toStringTag in t)&&!(Symbol.iterator in t)},is=Y("Date"),ss=Y("File"),os=Y("Blob"),as=Y("FileList"),cs=t=>Fe(t)&&W(t.pipe),us=t=>{let r;return t&&(typeof FormData=="function"&&t instanceof FormData||W(t.append)&&((r=je(t))==="formdata"||r==="object"&&W(t.toString)&&t.toString()==="[object FormData]"))},ls=Y("URLSearchParams"),hs=t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function _e(t,r,{allOwnKeys:s=!1}={}){if(t===null||typeof t>"u")return;let o,a;if(typeof t!="object"&&(t=[t]),de(t))for(o=0,a=t.length;o<a;o++)r.call(null,t[o],o,t);else{const u=s?Object.getOwnPropertyNames(t):Object.keys(t),l=u.length;let p;for(o=0;o<l;o++)p=u[o],r.call(null,t[p],p,t)}}function yn(t,r){r=r.toLowerCase();const s=Object.keys(t);let o=s.length,a;for(;o-- >0;)if(a=s[o],r===a.toLowerCase())return a;return null}const wn=(()=>typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global)(),_n=t=>!ye(t)&&t!==wn;function ot(){const{caseless:t}=_n(this)&&this||{},r={},s=(o,a)=>{const u=t&&yn(r,a)||a;Oe(r[u])&&Oe(o)?r[u]=ot(r[u],o):Oe(o)?r[u]=ot({},o):de(o)?r[u]=o.slice():r[u]=o};for(let o=0,a=arguments.length;o<a;o++)arguments[o]&&_e(arguments[o],s);return r}const fs=(t,r,s,{allOwnKeys:o}={})=>(_e(r,(a,u)=>{s&&W(a)?t[u]=gn(a,s):t[u]=a},{allOwnKeys:o}),t),ds=t=>(t.charCodeAt(0)===65279&&(t=t.slice(1)),t),ps=(t,r,s,o)=>{t.prototype=Object.create(r.prototype,o),t.prototype.constructor=t,Object.defineProperty(t,"super",{value:r.prototype}),s&&Object.assign(t.prototype,s)},ms=(t,r,s,o)=>{let a,u,l;const p={};if(r=r||{},t==null)return r;do{for(a=Object.getOwnPropertyNames(t),u=a.length;u-- >0;)l=a[u],(!o||o(l,t,r))&&!p[l]&&(r[l]=t[l],p[l]=!0);t=s!==!1&&pt(t)}while(t&&(!s||s(t,r))&&t!==Object.prototype);return r},gs=(t,r,s)=>{t=String(t),(s===void 0||s>t.length)&&(s=t.length),s-=r.length;const o=t.indexOf(r,s);return o!==-1&&o===s},vs=t=>{if(!t)return null;if(de(t))return t;let r=t.length;if(!bn(r))return null;const s=new Array(r);for(;r-- >0;)s[r]=t[r];return s},bs=(t=>r=>t&&r instanceof t)(typeof Uint8Array<"u"&&pt(Uint8Array)),ys=(t,r)=>{const o=(t&&t[Symbol.iterator]).call(t);let a;for(;(a=o.next())&&!a.done;){const u=a.value;r.call(t,u[0],u[1])}},ws=(t,r)=>{let s;const o=[];for(;(s=t.exec(r))!==null;)o.push(s);return o},_s=Y("HTMLFormElement"),Ss=t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(s,o,a){return o.toUpperCase()+a}),Qt=(({hasOwnProperty:t})=>(r,s)=>t.call(r,s))(Object.prototype),ks=Y("RegExp"),Sn=(t,r)=>{const s=Object.getOwnPropertyDescriptors(t),o={};_e(s,(a,u)=>{let l;(l=r(a,u,t))!==!1&&(o[u]=l||a)}),Object.defineProperties(t,o)},Cs=t=>{Sn(t,(r,s)=>{if(W(t)&&["arguments","caller","callee"].indexOf(s)!==-1)return!1;const o=t[s];if(W(o)){if(r.enumerable=!1,"writable"in r){r.writable=!1;return}r.set||(r.set=()=>{throw Error("Can not rewrite read-only method '"+s+"'")})}})},Ts=(t,r)=>{const s={},o=a=>{a.forEach(u=>{s[u]=!0})};return de(t)?o(t):o(String(t).split(r)),s},Es=()=>{},Ps=(t,r)=>(t=+t,Number.isFinite(t)?t:r),et="abcdefghijklmnopqrstuvwxyz",Yt="0123456789",kn={DIGIT:Yt,ALPHA:et,ALPHA_DIGIT:et+et.toUpperCase()+Yt},xs=(t=16,r=kn.ALPHA_DIGIT)=>{let s="";const{length:o}=r;for(;t--;)s+=r[Math.random()*o|0];return s};function Os(t){return!!(t&&W(t.append)&&t[Symbol.toStringTag]==="FormData"&&t[Symbol.iterator])}const Rs=t=>{const r=new Array(10),s=(o,a)=>{if(Fe(o)){if(r.indexOf(o)>=0)return;if(!("toJSON"in o)){r[a]=o;const u=de(o)?[]:{};return _e(o,(l,p)=>{const g=s(l,a+1);!ye(g)&&(u[p]=g)}),r[a]=void 0,u}}return o};return s(t,0)},As=Y("AsyncFunction"),Ns=t=>t&&(Fe(t)||W(t))&&W(t.then)&&W(t.catch),y={isArray:de,isArrayBuffer:vn,isBuffer:es,isFormData:us,isArrayBufferView:ts,isString:ns,isNumber:bn,isBoolean:rs,isObject:Fe,isPlainObject:Oe,isUndefined:ye,isDate:is,isFile:ss,isBlob:os,isRegExp:ks,isFunction:W,isStream:cs,isURLSearchParams:ls,isTypedArray:bs,isFileList:as,forEach:_e,merge:ot,extend:fs,trim:hs,stripBOM:ds,inherits:ps,toFlatObject:ms,kindOf:je,kindOfTest:Y,endsWith:gs,toArray:vs,forEachEntry:ys,matchAll:ws,isHTMLForm:_s,hasOwnProperty:Qt,hasOwnProp:Qt,reduceDescriptors:Sn,freezeMethods:Cs,toObjectSet:Ts,toCamelCase:Ss,noop:Es,toFiniteNumber:Ps,findKey:yn,global:wn,isContextDefined:_n,ALPHABET:kn,generateString:xs,isSpecCompliantForm:Os,toJSONObject:Rs,isAsyncFn:As,isThenable:Ns};function A(t,r,s,o,a){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=t,this.name="AxiosError",r&&(this.code=r),s&&(this.config=s),o&&(this.request=o),a&&(this.response=a)}y.inherits(A,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:y.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const Cn=A.prototype,Tn={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(t=>{Tn[t]={value:t}});Object.defineProperties(A,Tn);Object.defineProperty(Cn,"isAxiosError",{value:!0});A.from=(t,r,s,o,a,u)=>{const l=Object.create(Cn);return y.toFlatObject(t,l,function(g){return g!==Error.prototype},p=>p!=="isAxiosError"),A.call(l,t.message,r,s,o,a),l.cause=t,l.name=t.name,u&&Object.assign(l,u),l};const Ls=null;function at(t){return y.isPlainObject(t)||y.isArray(t)}function En(t){return y.endsWith(t,"[]")?t.slice(0,-2):t}function Zt(t,r,s){return t?t.concat(r).map(function(a,u){return a=En(a),!s&&u?"["+a+"]":a}).join(s?".":""):r}function Is(t){return y.isArray(t)&&!t.some(at)}const js=y.toFlatObject(y,{},null,function(r){return/^is[A-Z]/.test(r)});function De(t,r,s){if(!y.isObject(t))throw new TypeError("target must be an object");r=r||new FormData,s=y.toFlatObject(s,{metaTokens:!0,dots:!1,indexes:!1},!1,function(d,v){return!y.isUndefined(v[d])});const o=s.metaTokens,a=s.visitor||m,u=s.dots,l=s.indexes,g=(s.Blob||typeof Blob<"u"&&Blob)&&y.isSpecCompliantForm(r);if(!y.isFunction(a))throw new TypeError("visitor must be a function");function C(w){if(w===null)return"";if(y.isDate(w))return w.toISOString();if(!g&&y.isBlob(w))throw new A("Blob is not supported. Use a Buffer instead.");return y.isArrayBuffer(w)||y.isTypedArray(w)?g&&typeof Blob=="function"?new Blob([w]):Buffer.from(w):w}function m(w,d,v){let _=w;if(w&&!v&&typeof w=="object"){if(y.endsWith(d,"{}"))d=o?d:d.slice(0,-2),w=JSON.stringify(w);else if(y.isArray(w)&&Is(w)||(y.isFileList(w)||y.endsWith(d,"[]"))&&(_=y.toArray(w)))return d=En(d),_.forEach(function(R,j){!(y.isUndefined(R)||R===null)&&r.append(l===!0?Zt([d],j,u):l===null?d:d+"[]",C(R))}),!1}return at(w)?!0:(r.append(Zt(v,d,u),C(w)),!1)}const f=[],S=Object.assign(js,{defaultVisitor:m,convertValue:C,isVisitable:at});function T(w,d){if(!y.isUndefined(w)){if(f.indexOf(w)!==-1)throw Error("Circular reference detected in "+d.join("."));f.push(w),y.forEach(w,function(_,P){(!(y.isUndefined(_)||_===null)&&a.call(r,_,y.isString(P)?P.trim():P,d,S))===!0&&T(_,d?d.concat(P):[P])}),f.pop()}}if(!y.isObject(t))throw new TypeError("data must be an object");return T(t),r}function en(t){const r={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,function(o){return r[o]})}function mt(t,r){this._pairs=[],t&&De(t,this,r)}const Pn=mt.prototype;Pn.append=function(r,s){this._pairs.push([r,s])};Pn.toString=function(r){const s=r?function(o){return r.call(this,o,en)}:en;return this._pairs.map(function(a){return s(a[0])+"="+s(a[1])},"").join("&")};function Us(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function xn(t,r,s){if(!r)return t;const o=s&&s.encode||Us,a=s&&s.serialize;let u;if(a?u=a(r,s):u=y.isURLSearchParams(r)?r.toString():new mt(r,s).toString(o),u){const l=t.indexOf("#");l!==-1&&(t=t.slice(0,l)),t+=(t.indexOf("?")===-1?"?":"&")+u}return t}class Fs{constructor(){this.handlers=[]}use(r,s,o){return this.handlers.push({fulfilled:r,rejected:s,synchronous:o?o.synchronous:!1,runWhen:o?o.runWhen:null}),this.handlers.length-1}eject(r){this.handlers[r]&&(this.handlers[r]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(r){y.forEach(this.handlers,function(o){o!==null&&r(o)})}}const tn=Fs,On={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Ds=typeof URLSearchParams<"u"?URLSearchParams:mt,qs=typeof FormData<"u"?FormData:null,Bs=typeof Blob<"u"?Blob:null,Hs={isBrowser:!0,classes:{URLSearchParams:Ds,FormData:qs,Blob:Bs},protocols:["http","https","file","blob","url","data"]},Rn=typeof window<"u"&&typeof document<"u",Ms=(t=>Rn&&["ReactNative","NativeScript","NS"].indexOf(t)<0)(typeof navigator<"u"&&navigator.product),zs=(()=>typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function")(),$s=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Rn,hasStandardBrowserEnv:Ms,hasStandardBrowserWebWorkerEnv:zs},Symbol.toStringTag,{value:"Module"})),Q={...$s,...Hs};function Js(t,r){return De(t,new Q.classes.URLSearchParams,Object.assign({visitor:function(s,o,a,u){return Q.isNode&&y.isBuffer(s)?(this.append(o,s.toString("base64")),!1):u.defaultVisitor.apply(this,arguments)}},r))}function Xs(t){return y.matchAll(/\w+|\[(\w*)]/g,t).map(r=>r[0]==="[]"?"":r[1]||r[0])}function Vs(t){const r={},s=Object.keys(t);let o;const a=s.length;let u;for(o=0;o<a;o++)u=s[o],r[u]=t[u];return r}function An(t){function r(s,o,a,u){let l=s[u++];if(l==="__proto__")return!0;const p=Number.isFinite(+l),g=u>=s.length;return l=!l&&y.isArray(a)?a.length:l,g?(y.hasOwnProp(a,l)?a[l]=[a[l],o]:a[l]=o,!p):((!a[l]||!y.isObject(a[l]))&&(a[l]=[]),r(s,o,a[l],u)&&y.isArray(a[l])&&(a[l]=Vs(a[l])),!p)}if(y.isFormData(t)&&y.isFunction(t.entries)){const s={};return y.forEachEntry(t,(o,a)=>{r(Xs(o),a,s,0)}),s}return null}function Ws(t,r,s){if(y.isString(t))try{return(r||JSON.parse)(t),y.trim(t)}catch(o){if(o.name!=="SyntaxError")throw o}return(s||JSON.stringify)(t)}const gt={transitional:On,adapter:["xhr","http"],transformRequest:[function(r,s){const o=s.getContentType()||"",a=o.indexOf("application/json")>-1,u=y.isObject(r);if(u&&y.isHTMLForm(r)&&(r=new FormData(r)),y.isFormData(r))return a?JSON.stringify(An(r)):r;if(y.isArrayBuffer(r)||y.isBuffer(r)||y.isStream(r)||y.isFile(r)||y.isBlob(r))return r;if(y.isArrayBufferView(r))return r.buffer;if(y.isURLSearchParams(r))return s.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),r.toString();let p;if(u){if(o.indexOf("application/x-www-form-urlencoded")>-1)return Js(r,this.formSerializer).toString();if((p=y.isFileList(r))||o.indexOf("multipart/form-data")>-1){const g=this.env&&this.env.FormData;return De(p?{"files[]":r}:r,g&&new g,this.formSerializer)}}return u||a?(s.setContentType("application/json",!1),Ws(r)):r}],transformResponse:[function(r){const s=this.transitional||gt.transitional,o=s&&s.forcedJSONParsing,a=this.responseType==="json";if(r&&y.isString(r)&&(o&&!this.responseType||a)){const l=!(s&&s.silentJSONParsing)&&a;try{return JSON.parse(r)}catch(p){if(l)throw p.name==="SyntaxError"?A.from(p,A.ERR_BAD_RESPONSE,this,null,this.response):p}}return r}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Q.classes.FormData,Blob:Q.classes.Blob},validateStatus:function(r){return r>=200&&r<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};y.forEach(["delete","get","head","post","put","patch"],t=>{gt.headers[t]={}});const vt=gt,Gs=y.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),Ks=t=>{const r={};let s,o,a;return t&&t.split(`
`).forEach(function(l){a=l.indexOf(":"),s=l.substring(0,a).trim().toLowerCase(),o=l.substring(a+1).trim(),!(!s||r[s]&&Gs[s])&&(s==="set-cookie"?r[s]?r[s].push(o):r[s]=[o]:r[s]=r[s]?r[s]+", "+o:o)}),r},nn=Symbol("internals");function be(t){return t&&String(t).trim().toLowerCase()}function Re(t){return t===!1||t==null?t:y.isArray(t)?t.map(Re):String(t)}function Qs(t){const r=Object.create(null),s=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let o;for(;o=s.exec(t);)r[o[1]]=o[2];return r}const Ys=t=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());function tt(t,r,s,o,a){if(y.isFunction(o))return o.call(this,r,s);if(a&&(r=s),!!y.isString(r)){if(y.isString(o))return r.indexOf(o)!==-1;if(y.isRegExp(o))return o.test(r)}}function Zs(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(r,s,o)=>s.toUpperCase()+o)}function eo(t,r){const s=y.toCamelCase(" "+r);["get","set","has"].forEach(o=>{Object.defineProperty(t,o+s,{value:function(a,u,l){return this[o].call(this,r,a,u,l)},configurable:!0})})}class qe{constructor(r){r&&this.set(r)}set(r,s,o){const a=this;function u(p,g,C){const m=be(g);if(!m)throw new Error("header name must be a non-empty string");const f=y.findKey(a,m);(!f||a[f]===void 0||C===!0||C===void 0&&a[f]!==!1)&&(a[f||g]=Re(p))}const l=(p,g)=>y.forEach(p,(C,m)=>u(C,m,g));return y.isPlainObject(r)||r instanceof this.constructor?l(r,s):y.isString(r)&&(r=r.trim())&&!Ys(r)?l(Ks(r),s):r!=null&&u(s,r,o),this}get(r,s){if(r=be(r),r){const o=y.findKey(this,r);if(o){const a=this[o];if(!s)return a;if(s===!0)return Qs(a);if(y.isFunction(s))return s.call(this,a,o);if(y.isRegExp(s))return s.exec(a);throw new TypeError("parser must be boolean|regexp|function")}}}has(r,s){if(r=be(r),r){const o=y.findKey(this,r);return!!(o&&this[o]!==void 0&&(!s||tt(this,this[o],o,s)))}return!1}delete(r,s){const o=this;let a=!1;function u(l){if(l=be(l),l){const p=y.findKey(o,l);p&&(!s||tt(o,o[p],p,s))&&(delete o[p],a=!0)}}return y.isArray(r)?r.forEach(u):u(r),a}clear(r){const s=Object.keys(this);let o=s.length,a=!1;for(;o--;){const u=s[o];(!r||tt(this,this[u],u,r,!0))&&(delete this[u],a=!0)}return a}normalize(r){const s=this,o={};return y.forEach(this,(a,u)=>{const l=y.findKey(o,u);if(l){s[l]=Re(a),delete s[u];return}const p=r?Zs(u):String(u).trim();p!==u&&delete s[u],s[p]=Re(a),o[p]=!0}),this}concat(...r){return this.constructor.concat(this,...r)}toJSON(r){const s=Object.create(null);return y.forEach(this,(o,a)=>{o!=null&&o!==!1&&(s[a]=r&&y.isArray(o)?o.join(", "):o)}),s}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([r,s])=>r+": "+s).join(`
`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(r){return r instanceof this?r:new this(r)}static concat(r,...s){const o=new this(r);return s.forEach(a=>o.set(a)),o}static accessor(r){const o=(this[nn]=this[nn]={accessors:{}}).accessors,a=this.prototype;function u(l){const p=be(l);o[p]||(eo(a,l),o[p]=!0)}return y.isArray(r)?r.forEach(u):u(r),this}}qe.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);y.reduceDescriptors(qe.prototype,({value:t},r)=>{let s=r[0].toUpperCase()+r.slice(1);return{get:()=>t,set(o){this[s]=o}}});y.freezeMethods(qe);const ne=qe;function nt(t,r){const s=this||vt,o=r||s,a=ne.from(o.headers);let u=o.data;return y.forEach(t,function(p){u=p.call(s,u,a.normalize(),r?r.status:void 0)}),a.normalize(),u}function Nn(t){return!!(t&&t.__CANCEL__)}function Se(t,r,s){A.call(this,t??"canceled",A.ERR_CANCELED,r,s),this.name="CanceledError"}y.inherits(Se,A,{__CANCEL__:!0});function to(t,r,s){const o=s.config.validateStatus;!s.status||!o||o(s.status)?t(s):r(new A("Request failed with status code "+s.status,[A.ERR_BAD_REQUEST,A.ERR_BAD_RESPONSE][Math.floor(s.status/100)-4],s.config,s.request,s))}const no=Q.hasStandardBrowserEnv?{write(t,r,s,o,a,u){const l=[t+"="+encodeURIComponent(r)];y.isNumber(s)&&l.push("expires="+new Date(s).toGMTString()),y.isString(o)&&l.push("path="+o),y.isString(a)&&l.push("domain="+a),u===!0&&l.push("secure"),document.cookie=l.join("; ")},read(t){const r=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return r?decodeURIComponent(r[3]):null},remove(t){this.write(t,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function ro(t){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}function so(t,r){return r?t.replace(/\/?\/$/,"")+"/"+r.replace(/^\/+/,""):t}function Ln(t,r){return t&&!ro(r)?so(t,r):r}const oo=Q.hasStandardBrowserEnv?function(){const r=/(msie|trident)/i.test(navigator.userAgent),s=document.createElement("a");let o;function a(u){let l=u;return r&&(s.setAttribute("href",l),l=s.href),s.setAttribute("href",l),{href:s.href,protocol:s.protocol?s.protocol.replace(/:$/,""):"",host:s.host,search:s.search?s.search.replace(/^\?/,""):"",hash:s.hash?s.hash.replace(/^#/,""):"",hostname:s.hostname,port:s.port,pathname:s.pathname.charAt(0)==="/"?s.pathname:"/"+s.pathname}}return o=a(window.location.href),function(l){const p=y.isString(l)?a(l):l;return p.protocol===o.protocol&&p.host===o.host}}():function(){return function(){return!0}}();function ao(t){const r=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return r&&r[1]||""}function co(t,r){t=t||10;const s=new Array(t),o=new Array(t);let a=0,u=0,l;return r=r!==void 0?r:1e3,function(g){const C=Date.now(),m=o[u];l||(l=C),s[a]=g,o[a]=C;let f=u,S=0;for(;f!==a;)S+=s[f++],f=f%t;if(a=(a+1)%t,a===u&&(u=(u+1)%t),C-l<r)return;const T=m&&C-m;return T?Math.round(S*1e3/T):void 0}}function rn(t,r){let s=0;const o=co(50,250);return a=>{const u=a.loaded,l=a.lengthComputable?a.total:void 0,p=u-s,g=o(p),C=u<=l;s=u;const m={loaded:u,total:l,progress:l?u/l:void 0,bytes:p,rate:g||void 0,estimated:g&&l&&C?(l-u)/g:void 0,event:a};m[r?"download":"upload"]=!0,t(m)}}const uo=typeof XMLHttpRequest<"u",lo=uo&&function(t){return new Promise(function(s,o){let a=t.data;const u=ne.from(t.headers).normalize();let{responseType:l,withXSRFToken:p}=t,g;function C(){t.cancelToken&&t.cancelToken.unsubscribe(g),t.signal&&t.signal.removeEventListener("abort",g)}let m;if(y.isFormData(a)){if(Q.hasStandardBrowserEnv||Q.hasStandardBrowserWebWorkerEnv)u.setContentType(!1);else if((m=u.getContentType())!==!1){const[d,...v]=m?m.split(";").map(_=>_.trim()).filter(Boolean):[];u.setContentType([d||"multipart/form-data",...v].join("; "))}}let f=new XMLHttpRequest;if(t.auth){const d=t.auth.username||"",v=t.auth.password?unescape(encodeURIComponent(t.auth.password)):"";u.set("Authorization","Basic "+btoa(d+":"+v))}const S=Ln(t.baseURL,t.url);f.open(t.method.toUpperCase(),xn(S,t.params,t.paramsSerializer),!0),f.timeout=t.timeout;function T(){if(!f)return;const d=ne.from("getAllResponseHeaders"in f&&f.getAllResponseHeaders()),_={data:!l||l==="text"||l==="json"?f.responseText:f.response,status:f.status,statusText:f.statusText,headers:d,config:t,request:f};to(function(R){s(R),C()},function(R){o(R),C()},_),f=null}if("onloadend"in f?f.onloadend=T:f.onreadystatechange=function(){!f||f.readyState!==4||f.status===0&&!(f.responseURL&&f.responseURL.indexOf("file:")===0)||setTimeout(T)},f.onabort=function(){f&&(o(new A("Request aborted",A.ECONNABORTED,t,f)),f=null)},f.onerror=function(){o(new A("Network Error",A.ERR_NETWORK,t,f)),f=null},f.ontimeout=function(){let v=t.timeout?"timeout of "+t.timeout+"ms exceeded":"timeout exceeded";const _=t.transitional||On;t.timeoutErrorMessage&&(v=t.timeoutErrorMessage),o(new A(v,_.clarifyTimeoutError?A.ETIMEDOUT:A.ECONNABORTED,t,f)),f=null},Q.hasStandardBrowserEnv&&(p&&y.isFunction(p)&&(p=p(t)),p||p!==!1&&oo(S))){const d=t.xsrfHeaderName&&t.xsrfCookieName&&no.read(t.xsrfCookieName);d&&u.set(t.xsrfHeaderName,d)}a===void 0&&u.setContentType(null),"setRequestHeader"in f&&y.forEach(u.toJSON(),function(v,_){f.setRequestHeader(_,v)}),y.isUndefined(t.withCredentials)||(f.withCredentials=!!t.withCredentials),l&&l!=="json"&&(f.responseType=t.responseType),typeof t.onDownloadProgress=="function"&&f.addEventListener("progress",rn(t.onDownloadProgress,!0)),typeof t.onUploadProgress=="function"&&f.upload&&f.upload.addEventListener("progress",rn(t.onUploadProgress)),(t.cancelToken||t.signal)&&(g=d=>{f&&(o(!d||d.type?new Se(null,t,f):d),f.abort(),f=null)},t.cancelToken&&t.cancelToken.subscribe(g),t.signal&&(t.signal.aborted?g():t.signal.addEventListener("abort",g)));const w=ao(S);if(w&&Q.protocols.indexOf(w)===-1){o(new A("Unsupported protocol "+w+":",A.ERR_BAD_REQUEST,t));return}f.send(a||null)})},ct={http:Ls,xhr:lo};y.forEach(ct,(t,r)=>{if(t){try{Object.defineProperty(t,"name",{value:r})}catch{}Object.defineProperty(t,"adapterName",{value:r})}});const sn=t=>`- ${t}`,ho=t=>y.isFunction(t)||t===null||t===!1,In={getAdapter:t=>{t=y.isArray(t)?t:[t];const{length:r}=t;let s,o;const a={};for(let u=0;u<r;u++){s=t[u];let l;if(o=s,!ho(s)&&(o=ct[(l=String(s)).toLowerCase()],o===void 0))throw new A(`Unknown adapter '${l}'`);if(o)break;a[l||"#"+u]=o}if(!o){const u=Object.entries(a).map(([p,g])=>`adapter ${p} `+(g===!1?"is not supported by the environment":"is not available in the build"));let l=r?u.length>1?`since :
`+u.map(sn).join(`
`):" "+sn(u[0]):"as no adapter specified";throw new A("There is no suitable adapter to dispatch the request "+l,"ERR_NOT_SUPPORT")}return o},adapters:ct};function rt(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new Se(null,t)}function on(t){return rt(t),t.headers=ne.from(t.headers),t.data=nt.call(t,t.transformRequest),["post","put","patch"].indexOf(t.method)!==-1&&t.headers.setContentType("application/x-www-form-urlencoded",!1),In.getAdapter(t.adapter||vt.adapter)(t).then(function(o){return rt(t),o.data=nt.call(t,t.transformResponse,o),o.headers=ne.from(o.headers),o},function(o){return Nn(o)||(rt(t),o&&o.response&&(o.response.data=nt.call(t,t.transformResponse,o.response),o.response.headers=ne.from(o.response.headers))),Promise.reject(o)})}const an=t=>t instanceof ne?{...t}:t;function fe(t,r){r=r||{};const s={};function o(C,m,f){return y.isPlainObject(C)&&y.isPlainObject(m)?y.merge.call({caseless:f},C,m):y.isPlainObject(m)?y.merge({},m):y.isArray(m)?m.slice():m}function a(C,m,f){if(y.isUndefined(m)){if(!y.isUndefined(C))return o(void 0,C,f)}else return o(C,m,f)}function u(C,m){if(!y.isUndefined(m))return o(void 0,m)}function l(C,m){if(y.isUndefined(m)){if(!y.isUndefined(C))return o(void 0,C)}else return o(void 0,m)}function p(C,m,f){if(f in r)return o(C,m);if(f in t)return o(void 0,C)}const g={url:u,method:u,data:u,baseURL:l,transformRequest:l,transformResponse:l,paramsSerializer:l,timeout:l,timeoutMessage:l,withCredentials:l,withXSRFToken:l,adapter:l,responseType:l,xsrfCookieName:l,xsrfHeaderName:l,onUploadProgress:l,onDownloadProgress:l,decompress:l,maxContentLength:l,maxBodyLength:l,beforeRedirect:l,transport:l,httpAgent:l,httpsAgent:l,cancelToken:l,socketPath:l,responseEncoding:l,validateStatus:p,headers:(C,m)=>a(an(C),an(m),!0)};return y.forEach(Object.keys(Object.assign({},t,r)),function(m){const f=g[m]||a,S=f(t[m],r[m],m);y.isUndefined(S)&&f!==p||(s[m]=S)}),s}const jn="1.6.8",bt={};["object","boolean","number","function","string","symbol"].forEach((t,r)=>{bt[t]=function(o){return typeof o===t||"a"+(r<1?"n ":" ")+t}});const cn={};bt.transitional=function(r,s,o){function a(u,l){return"[Axios v"+jn+"] Transitional option '"+u+"'"+l+(o?". "+o:"")}return(u,l,p)=>{if(r===!1)throw new A(a(l," has been removed"+(s?" in "+s:"")),A.ERR_DEPRECATED);return s&&!cn[l]&&(cn[l]=!0,console.warn(a(l," has been deprecated since v"+s+" and will be removed in the near future"))),r?r(u,l,p):!0}};function fo(t,r,s){if(typeof t!="object")throw new A("options must be an object",A.ERR_BAD_OPTION_VALUE);const o=Object.keys(t);let a=o.length;for(;a-- >0;){const u=o[a],l=r[u];if(l){const p=t[u],g=p===void 0||l(p,u,t);if(g!==!0)throw new A("option "+u+" must be "+g,A.ERR_BAD_OPTION_VALUE);continue}if(s!==!0)throw new A("Unknown option "+u,A.ERR_BAD_OPTION)}}const ut={assertOptions:fo,validators:bt},ie=ut.validators;class Ne{constructor(r){this.defaults=r,this.interceptors={request:new tn,response:new tn}}async request(r,s){try{return await this._request(r,s)}catch(o){if(o instanceof Error){let a;Error.captureStackTrace?Error.captureStackTrace(a={}):a=new Error;const u=a.stack?a.stack.replace(/^.+\n/,""):"";o.stack?u&&!String(o.stack).endsWith(u.replace(/^.+\n.+\n/,""))&&(o.stack+=`
`+u):o.stack=u}throw o}}_request(r,s){typeof r=="string"?(s=s||{},s.url=r):s=r||{},s=fe(this.defaults,s);const{transitional:o,paramsSerializer:a,headers:u}=s;o!==void 0&&ut.assertOptions(o,{silentJSONParsing:ie.transitional(ie.boolean),forcedJSONParsing:ie.transitional(ie.boolean),clarifyTimeoutError:ie.transitional(ie.boolean)},!1),a!=null&&(y.isFunction(a)?s.paramsSerializer={serialize:a}:ut.assertOptions(a,{encode:ie.function,serialize:ie.function},!0)),s.method=(s.method||this.defaults.method||"get").toLowerCase();let l=u&&y.merge(u.common,u[s.method]);u&&y.forEach(["delete","get","head","post","put","patch","common"],w=>{delete u[w]}),s.headers=ne.concat(l,u);const p=[];let g=!0;this.interceptors.request.forEach(function(d){typeof d.runWhen=="function"&&d.runWhen(s)===!1||(g=g&&d.synchronous,p.unshift(d.fulfilled,d.rejected))});const C=[];this.interceptors.response.forEach(function(d){C.push(d.fulfilled,d.rejected)});let m,f=0,S;if(!g){const w=[on.bind(this),void 0];for(w.unshift.apply(w,p),w.push.apply(w,C),S=w.length,m=Promise.resolve(s);f<S;)m=m.then(w[f++],w[f++]);return m}S=p.length;let T=s;for(f=0;f<S;){const w=p[f++],d=p[f++];try{T=w(T)}catch(v){d.call(this,v);break}}try{m=on.call(this,T)}catch(w){return Promise.reject(w)}for(f=0,S=C.length;f<S;)m=m.then(C[f++],C[f++]);return m}getUri(r){r=fe(this.defaults,r);const s=Ln(r.baseURL,r.url);return xn(s,r.params,r.paramsSerializer)}}y.forEach(["delete","get","head","options"],function(r){Ne.prototype[r]=function(s,o){return this.request(fe(o||{},{method:r,url:s,data:(o||{}).data}))}});y.forEach(["post","put","patch"],function(r){function s(o){return function(u,l,p){return this.request(fe(p||{},{method:r,headers:o?{"Content-Type":"multipart/form-data"}:{},url:u,data:l}))}}Ne.prototype[r]=s(),Ne.prototype[r+"Form"]=s(!0)});const Ae=Ne;class yt{constructor(r){if(typeof r!="function")throw new TypeError("executor must be a function.");let s;this.promise=new Promise(function(u){s=u});const o=this;this.promise.then(a=>{if(!o._listeners)return;let u=o._listeners.length;for(;u-- >0;)o._listeners[u](a);o._listeners=null}),this.promise.then=a=>{let u;const l=new Promise(p=>{o.subscribe(p),u=p}).then(a);return l.cancel=function(){o.unsubscribe(u)},l},r(function(u,l,p){o.reason||(o.reason=new Se(u,l,p),s(o.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(r){if(this.reason){r(this.reason);return}this._listeners?this._listeners.push(r):this._listeners=[r]}unsubscribe(r){if(!this._listeners)return;const s=this._listeners.indexOf(r);s!==-1&&this._listeners.splice(s,1)}static source(){let r;return{token:new yt(function(a){r=a}),cancel:r}}}const po=yt;function mo(t){return function(s){return t.apply(null,s)}}function go(t){return y.isObject(t)&&t.isAxiosError===!0}const lt={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(lt).forEach(([t,r])=>{lt[r]=t});const vo=lt;function Un(t){const r=new Ae(t),s=gn(Ae.prototype.request,r);return y.extend(s,Ae.prototype,r,{allOwnKeys:!0}),y.extend(s,r,null,{allOwnKeys:!0}),s.create=function(a){return Un(fe(t,a))},s}const F=Un(vt);F.Axios=Ae;F.CanceledError=Se;F.CancelToken=po;F.isCancel=Nn;F.VERSION=jn;F.toFormData=De;F.AxiosError=A;F.Cancel=F.CanceledError;F.all=function(r){return Promise.all(r)};F.spread=mo;F.isAxiosError=go;F.mergeConfig=fe;F.AxiosHeaders=ne;F.formToJSON=t=>An(y.isHTMLForm(t)?new FormData(t):t);F.getAdapter=In.getAdapter;F.HttpStatusCode=vo;F.default=F;const Xo=F;function ht(t){"@babel/helpers - typeof";return ht=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},ht(t)}function B(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}function un(t,r){for(var s=0;s<r.length;s++){var o=r[s];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}function H(t,r,s){return r&&un(t.prototype,r),s&&un(t,s),Object.defineProperty(t,"prototype",{writable:!1}),t}function we(){return we=Object.assign||function(t){for(var r=1;r<arguments.length;r++){var s=arguments[r];for(var o in s)Object.prototype.hasOwnProperty.call(s,o)&&(t[o]=s[o])}return t},we.apply(this,arguments)}function X(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(r&&r.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),r&&ft(t,r)}function Le(t){return Le=Object.setPrototypeOf?Object.getPrototypeOf:function(s){return s.__proto__||Object.getPrototypeOf(s)},Le(t)}function ft(t,r){return ft=Object.setPrototypeOf||function(o,a){return o.__proto__=a,o},ft(t,r)}function bo(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function yo(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function wo(t,r){if(r&&(typeof r=="object"||typeof r=="function"))return r;if(r!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return yo(t)}function V(t){var r=bo();return function(){var o=Le(t),a;if(r){var u=Le(this).constructor;a=Reflect.construct(o,arguments,u)}else a=o.apply(this,arguments);return wo(this,a)}}var wt=function(){function t(){B(this,t)}return H(t,[{key:"listenForWhisper",value:function(s,o){return this.listen(".client-"+s,o)}},{key:"notification",value:function(s){return this.listen(".Illuminate\\Notifications\\Events\\BroadcastNotificationCreated",s)}},{key:"stopListeningForWhisper",value:function(s,o){return this.stopListening(".client-"+s,o)}}]),t}(),Fn=function(){function t(r){B(this,t),this.namespace=r}return H(t,[{key:"format",value:function(s){return s.charAt(0)==="."||s.charAt(0)==="\\"?s.substr(1):(this.namespace&&(s=this.namespace+"."+s),s.replace(/\./g,"\\"))}},{key:"setNamespace",value:function(s){this.namespace=s}}]),t}(),Be=function(t){X(s,t);var r=V(s);function s(o,a,u){var l;return B(this,s),l=r.call(this),l.name=a,l.pusher=o,l.options=u,l.eventFormatter=new Fn(l.options.namespace),l.subscribe(),l}return H(s,[{key:"subscribe",value:function(){this.subscription=this.pusher.subscribe(this.name)}},{key:"unsubscribe",value:function(){this.pusher.unsubscribe(this.name)}},{key:"listen",value:function(a,u){return this.on(this.eventFormatter.format(a),u),this}},{key:"listenToAll",value:function(a){var u=this;return this.subscription.bind_global(function(l,p){if(!l.startsWith("pusher:")){var g=u.options.namespace.replace(/\./g,"\\"),C=l.startsWith(g)?l.substring(g.length+1):"."+l;a(C,p)}}),this}},{key:"stopListening",value:function(a,u){return u?this.subscription.unbind(this.eventFormatter.format(a),u):this.subscription.unbind(this.eventFormatter.format(a)),this}},{key:"stopListeningToAll",value:function(a){return a?this.subscription.unbind_global(a):this.subscription.unbind_global(),this}},{key:"subscribed",value:function(a){return this.on("pusher:subscription_succeeded",function(){a()}),this}},{key:"error",value:function(a){return this.on("pusher:subscription_error",function(u){a(u)}),this}},{key:"on",value:function(a,u){return this.subscription.bind(a,u),this}}]),s}(wt),_o=function(t){X(s,t);var r=V(s);function s(){return B(this,s),r.apply(this,arguments)}return H(s,[{key:"whisper",value:function(a,u){return this.pusher.channels.channels[this.name].trigger("client-".concat(a),u),this}}]),s}(Be),So=function(t){X(s,t);var r=V(s);function s(){return B(this,s),r.apply(this,arguments)}return H(s,[{key:"whisper",value:function(a,u){return this.pusher.channels.channels[this.name].trigger("client-".concat(a),u),this}}]),s}(Be),ko=function(t){X(s,t);var r=V(s);function s(){return B(this,s),r.apply(this,arguments)}return H(s,[{key:"here",value:function(a){return this.on("pusher:subscription_succeeded",function(u){a(Object.keys(u.members).map(function(l){return u.members[l]}))}),this}},{key:"joining",value:function(a){return this.on("pusher:member_added",function(u){a(u.info)}),this}},{key:"whisper",value:function(a,u){return this.pusher.channels.channels[this.name].trigger("client-".concat(a),u),this}},{key:"leaving",value:function(a){return this.on("pusher:member_removed",function(u){a(u.info)}),this}}]),s}(Be),Dn=function(t){X(s,t);var r=V(s);function s(o,a,u){var l;return B(this,s),l=r.call(this),l.events={},l.listeners={},l.name=a,l.socket=o,l.options=u,l.eventFormatter=new Fn(l.options.namespace),l.subscribe(),l}return H(s,[{key:"subscribe",value:function(){this.socket.emit("subscribe",{channel:this.name,auth:this.options.auth||{}})}},{key:"unsubscribe",value:function(){this.unbind(),this.socket.emit("unsubscribe",{channel:this.name,auth:this.options.auth||{}})}},{key:"listen",value:function(a,u){return this.on(this.eventFormatter.format(a),u),this}},{key:"stopListening",value:function(a,u){return this.unbindEvent(this.eventFormatter.format(a),u),this}},{key:"subscribed",value:function(a){return this.on("connect",function(u){a(u)}),this}},{key:"error",value:function(a){return this}},{key:"on",value:function(a,u){var l=this;return this.listeners[a]=this.listeners[a]||[],this.events[a]||(this.events[a]=function(p,g){l.name===p&&l.listeners[a]&&l.listeners[a].forEach(function(C){return C(g)})},this.socket.on(a,this.events[a])),this.listeners[a].push(u),this}},{key:"unbind",value:function(){var a=this;Object.keys(this.events).forEach(function(u){a.unbindEvent(u)})}},{key:"unbindEvent",value:function(a,u){this.listeners[a]=this.listeners[a]||[],u&&(this.listeners[a]=this.listeners[a].filter(function(l){return l!==u})),(!u||this.listeners[a].length===0)&&(this.events[a]&&(this.socket.removeListener(a,this.events[a]),delete this.events[a]),delete this.listeners[a])}}]),s}(wt),qn=function(t){X(s,t);var r=V(s);function s(){return B(this,s),r.apply(this,arguments)}return H(s,[{key:"whisper",value:function(a,u){return this.socket.emit("client event",{channel:this.name,event:"client-".concat(a),data:u}),this}}]),s}(Dn),Co=function(t){X(s,t);var r=V(s);function s(){return B(this,s),r.apply(this,arguments)}return H(s,[{key:"here",value:function(a){return this.on("presence:subscribed",function(u){a(u.map(function(l){return l.user_info}))}),this}},{key:"joining",value:function(a){return this.on("presence:joining",function(u){return a(u.user_info)}),this}},{key:"whisper",value:function(a,u){return this.socket.emit("client event",{channel:this.name,event:"client-".concat(a),data:u}),this}},{key:"leaving",value:function(a){return this.on("presence:leaving",function(u){return a(u.user_info)}),this}}]),s}(qn),Ie=function(t){X(s,t);var r=V(s);function s(){return B(this,s),r.apply(this,arguments)}return H(s,[{key:"subscribe",value:function(){}},{key:"unsubscribe",value:function(){}},{key:"listen",value:function(a,u){return this}},{key:"listenToAll",value:function(a){return this}},{key:"stopListening",value:function(a,u){return this}},{key:"subscribed",value:function(a){return this}},{key:"error",value:function(a){return this}},{key:"on",value:function(a,u){return this}}]),s}(wt),ln=function(t){X(s,t);var r=V(s);function s(){return B(this,s),r.apply(this,arguments)}return H(s,[{key:"whisper",value:function(a,u){return this}}]),s}(Ie),To=function(t){X(s,t);var r=V(s);function s(){return B(this,s),r.apply(this,arguments)}return H(s,[{key:"here",value:function(a){return this}},{key:"joining",value:function(a){return this}},{key:"whisper",value:function(a,u){return this}},{key:"leaving",value:function(a){return this}}]),s}(Ie),_t=function(){function t(r){B(this,t),this._defaultOptions={auth:{headers:{}},authEndpoint:"/broadcasting/auth",userAuthentication:{endpoint:"/broadcasting/user-auth",headers:{}},broadcaster:"pusher",csrfToken:null,bearerToken:null,host:null,key:null,namespace:"App.Events"},this.setOptions(r),this.connect()}return H(t,[{key:"setOptions",value:function(s){this.options=we(this._defaultOptions,s);var o=this.csrfToken();return o&&(this.options.auth.headers["X-CSRF-TOKEN"]=o,this.options.userAuthentication.headers["X-CSRF-TOKEN"]=o),o=this.options.bearerToken,o&&(this.options.auth.headers.Authorization="Bearer "+o,this.options.userAuthentication.headers.Authorization="Bearer "+o),s}},{key:"csrfToken",value:function(){var s;return typeof window<"u"&&window.Laravel&&window.Laravel.csrfToken?window.Laravel.csrfToken:this.options.csrfToken?this.options.csrfToken:typeof document<"u"&&typeof document.querySelector=="function"&&(s=document.querySelector('meta[name="csrf-token"]'))?s.getAttribute("content"):null}}]),t}(),hn=function(t){X(s,t);var r=V(s);function s(){var o;return B(this,s),o=r.apply(this,arguments),o.channels={},o}return H(s,[{key:"connect",value:function(){typeof this.options.client<"u"?this.pusher=this.options.client:this.options.Pusher?this.pusher=new this.options.Pusher(this.options.key,this.options):this.pusher=new Pusher(this.options.key,this.options)}},{key:"signin",value:function(){this.pusher.signin()}},{key:"listen",value:function(a,u,l){return this.channel(a).listen(u,l)}},{key:"channel",value:function(a){return this.channels[a]||(this.channels[a]=new Be(this.pusher,a,this.options)),this.channels[a]}},{key:"privateChannel",value:function(a){return this.channels["private-"+a]||(this.channels["private-"+a]=new _o(this.pusher,"private-"+a,this.options)),this.channels["private-"+a]}},{key:"encryptedPrivateChannel",value:function(a){return this.channels["private-encrypted-"+a]||(this.channels["private-encrypted-"+a]=new So(this.pusher,"private-encrypted-"+a,this.options)),this.channels["private-encrypted-"+a]}},{key:"presenceChannel",value:function(a){return this.channels["presence-"+a]||(this.channels["presence-"+a]=new ko(this.pusher,"presence-"+a,this.options)),this.channels["presence-"+a]}},{key:"leave",value:function(a){var u=this,l=[a,"private-"+a,"private-encrypted-"+a,"presence-"+a];l.forEach(function(p,g){u.leaveChannel(p)})}},{key:"leaveChannel",value:function(a){this.channels[a]&&(this.channels[a].unsubscribe(),delete this.channels[a])}},{key:"socketId",value:function(){return this.pusher.connection.socket_id}},{key:"disconnect",value:function(){this.pusher.disconnect()}}]),s}(_t),Eo=function(t){X(s,t);var r=V(s);function s(){var o;return B(this,s),o=r.apply(this,arguments),o.channels={},o}return H(s,[{key:"connect",value:function(){var a=this,u=this.getSocketIO();return this.socket=u(this.options.host,this.options),this.socket.on("reconnect",function(){Object.values(a.channels).forEach(function(l){l.subscribe()})}),this.socket}},{key:"getSocketIO",value:function(){if(typeof this.options.client<"u")return this.options.client;if(typeof io<"u")return io;throw new Error("Socket.io client not found. Should be globally available or passed via options.client")}},{key:"listen",value:function(a,u,l){return this.channel(a).listen(u,l)}},{key:"channel",value:function(a){return this.channels[a]||(this.channels[a]=new Dn(this.socket,a,this.options)),this.channels[a]}},{key:"privateChannel",value:function(a){return this.channels["private-"+a]||(this.channels["private-"+a]=new qn(this.socket,"private-"+a,this.options)),this.channels["private-"+a]}},{key:"presenceChannel",value:function(a){return this.channels["presence-"+a]||(this.channels["presence-"+a]=new Co(this.socket,"presence-"+a,this.options)),this.channels["presence-"+a]}},{key:"leave",value:function(a){var u=this,l=[a,"private-"+a,"presence-"+a];l.forEach(function(p){u.leaveChannel(p)})}},{key:"leaveChannel",value:function(a){this.channels[a]&&(this.channels[a].unsubscribe(),delete this.channels[a])}},{key:"socketId",value:function(){return this.socket.id}},{key:"disconnect",value:function(){this.socket.disconnect()}}]),s}(_t),Po=function(t){X(s,t);var r=V(s);function s(){var o;return B(this,s),o=r.apply(this,arguments),o.channels={},o}return H(s,[{key:"connect",value:function(){}},{key:"listen",value:function(a,u,l){return new Ie}},{key:"channel",value:function(a){return new Ie}},{key:"privateChannel",value:function(a){return new ln}},{key:"encryptedPrivateChannel",value:function(a){return new ln}},{key:"presenceChannel",value:function(a){return new To}},{key:"leave",value:function(a){}},{key:"leaveChannel",value:function(a){}},{key:"socketId",value:function(){return"fake-socket-id"}},{key:"disconnect",value:function(){}}]),s}(_t),Vo=function(){function t(r){B(this,t),this.options=r,this.connect(),this.options.withoutInterceptors||this.registerInterceptors()}return H(t,[{key:"channel",value:function(s){return this.connector.channel(s)}},{key:"connect",value:function(){this.options.broadcaster=="reverb"?this.connector=new hn(we(we({},this.options),{cluster:""})):this.options.broadcaster=="pusher"?this.connector=new hn(this.options):this.options.broadcaster=="socket.io"?this.connector=new Eo(this.options):this.options.broadcaster=="null"?this.connector=new Po(this.options):typeof this.options.broadcaster=="function"&&(this.connector=new this.options.broadcaster(this.options))}},{key:"disconnect",value:function(){this.connector.disconnect()}},{key:"join",value:function(s){return this.connector.presenceChannel(s)}},{key:"leave",value:function(s){this.connector.leave(s)}},{key:"leaveChannel",value:function(s){this.connector.leaveChannel(s)}},{key:"leaveAllChannels",value:function(){for(var s in this.connector.channels)this.leaveChannel(s)}},{key:"listen",value:function(s,o,a){return this.connector.listen(s,o,a)}},{key:"private",value:function(s){return this.connector.privateChannel(s)}},{key:"encryptedPrivate",value:function(s){return this.connector.encryptedPrivateChannel(s)}},{key:"socketId",value:function(){return this.connector.socketId()}},{key:"registerInterceptors",value:function(){typeof Vue=="function"&&Vue.http&&this.registerVueRequestInterceptor(),typeof axios=="function"&&this.registerAxiosRequestInterceptor(),typeof jQuery=="function"&&this.registerjQueryAjaxSetup(),(typeof Turbo>"u"?"undefined":ht(Turbo))==="object"&&this.registerTurboRequestInterceptor()}},{key:"registerVueRequestInterceptor",value:function(){var s=this;Vue.http.interceptors.push(function(o,a){s.socketId()&&o.headers.set("X-Socket-ID",s.socketId()),a()})}},{key:"registerAxiosRequestInterceptor",value:function(){var s=this;axios.interceptors.request.use(function(o){return s.socketId()&&(o.headers["X-Socket-Id"]=s.socketId()),o})}},{key:"registerjQueryAjaxSetup",value:function(){var s=this;typeof jQuery.ajax<"u"&&jQuery.ajaxPrefilter(function(o,a,u){s.socketId()&&u.setRequestHeader("X-Socket-Id",s.socketId())})}},{key:"registerTurboRequestInterceptor",value:function(){var s=this;document.addEventListener("turbo:before-fetch-request",function(o){o.detail.fetchOptions.headers["X-Socket-Id"]=s.socketId()})}}]),t}(),Bn=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Hn(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Mn={exports:{}};/*!
 * Pusher JavaScript Library v8.4.0-rc2
 * https://pusher.com/
 *
 * Copyright 2020, Pusher
 * Released under the MIT licence.
 */(function(t,r){(function(o,a){t.exports=a()})(window,function(){return function(s){var o={};function a(u){if(o[u])return o[u].exports;var l=o[u]={i:u,l:!1,exports:{}};return s[u].call(l.exports,l,l.exports,a),l.l=!0,l.exports}return a.m=s,a.c=o,a.d=function(u,l,p){a.o(u,l)||Object.defineProperty(u,l,{enumerable:!0,get:p})},a.r=function(u){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(u,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(u,"__esModule",{value:!0})},a.t=function(u,l){if(l&1&&(u=a(u)),l&8||l&4&&typeof u=="object"&&u&&u.__esModule)return u;var p=Object.create(null);if(a.r(p),Object.defineProperty(p,"default",{enumerable:!0,value:u}),l&2&&typeof u!="string")for(var g in u)a.d(p,g,(function(C){return u[C]}).bind(null,g));return p},a.n=function(u){var l=u&&u.__esModule?function(){return u.default}:function(){return u};return a.d(l,"a",l),l},a.o=function(u,l){return Object.prototype.hasOwnProperty.call(u,l)},a.p="",a(a.s=2)}([function(s,o,a){var u=this&&this.__extends||function(){var d=function(v,_){return d=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(P,R){P.__proto__=R}||function(P,R){for(var j in R)R.hasOwnProperty(j)&&(P[j]=R[j])},d(v,_)};return function(v,_){d(v,_);function P(){this.constructor=v}v.prototype=_===null?Object.create(_):(P.prototype=_.prototype,new P)}}();Object.defineProperty(o,"__esModule",{value:!0});var l=256,p=function(){function d(v){v===void 0&&(v="="),this._paddingCharacter=v}return d.prototype.encodedLength=function(v){return this._paddingCharacter?(v+2)/3*4|0:(v*8+5)/6|0},d.prototype.encode=function(v){for(var _="",P=0;P<v.length-2;P+=3){var R=v[P]<<16|v[P+1]<<8|v[P+2];_+=this._encodeByte(R>>>3*6&63),_+=this._encodeByte(R>>>2*6&63),_+=this._encodeByte(R>>>1*6&63),_+=this._encodeByte(R>>>0*6&63)}var j=v.length-P;if(j>0){var R=v[P]<<16|(j===2?v[P+1]<<8:0);_+=this._encodeByte(R>>>3*6&63),_+=this._encodeByte(R>>>2*6&63),j===2?_+=this._encodeByte(R>>>1*6&63):_+=this._paddingCharacter||"",_+=this._paddingCharacter||""}return _},d.prototype.maxDecodedLength=function(v){return this._paddingCharacter?v/4*3|0:(v*6+7)/8|0},d.prototype.decodedLength=function(v){return this.maxDecodedLength(v.length-this._getPaddingLength(v))},d.prototype.decode=function(v){if(v.length===0)return new Uint8Array(0);for(var _=this._getPaddingLength(v),P=v.length-_,R=new Uint8Array(this.maxDecodedLength(P)),j=0,D=0,z=0,G=0,$=0,K=0,re=0;D<P-4;D+=4)G=this._decodeChar(v.charCodeAt(D+0)),$=this._decodeChar(v.charCodeAt(D+1)),K=this._decodeChar(v.charCodeAt(D+2)),re=this._decodeChar(v.charCodeAt(D+3)),R[j++]=G<<2|$>>>4,R[j++]=$<<4|K>>>2,R[j++]=K<<6|re,z|=G&l,z|=$&l,z|=K&l,z|=re&l;if(D<P-1&&(G=this._decodeChar(v.charCodeAt(D)),$=this._decodeChar(v.charCodeAt(D+1)),R[j++]=G<<2|$>>>4,z|=G&l,z|=$&l),D<P-2&&(K=this._decodeChar(v.charCodeAt(D+2)),R[j++]=$<<4|K>>>2,z|=K&l),D<P-3&&(re=this._decodeChar(v.charCodeAt(D+3)),R[j++]=K<<6|re,z|=re&l),z!==0)throw new Error("Base64Coder: incorrect characters for decoding");return R},d.prototype._encodeByte=function(v){var _=v;return _+=65,_+=25-v>>>8&0-65-26+97,_+=51-v>>>8&26-97-52+48,_+=61-v>>>8&52-48-62+43,_+=62-v>>>8&62-43-63+47,String.fromCharCode(_)},d.prototype._decodeChar=function(v){var _=l;return _+=(42-v&v-44)>>>8&-l+v-43+62,_+=(46-v&v-48)>>>8&-l+v-47+63,_+=(47-v&v-58)>>>8&-l+v-48+52,_+=(64-v&v-91)>>>8&-l+v-65+0,_+=(96-v&v-123)>>>8&-l+v-97+26,_},d.prototype._getPaddingLength=function(v){var _=0;if(this._paddingCharacter){for(var P=v.length-1;P>=0&&v[P]===this._paddingCharacter;P--)_++;if(v.length<4||_>2)throw new Error("Base64Coder: incorrect padding")}return _},d}();o.Coder=p;var g=new p;function C(d){return g.encode(d)}o.encode=C;function m(d){return g.decode(d)}o.decode=m;var f=function(d){u(v,d);function v(){return d!==null&&d.apply(this,arguments)||this}return v.prototype._encodeByte=function(_){var P=_;return P+=65,P+=25-_>>>8&0-65-26+97,P+=51-_>>>8&26-97-52+48,P+=61-_>>>8&52-48-62+45,P+=62-_>>>8&62-45-63+95,String.fromCharCode(P)},v.prototype._decodeChar=function(_){var P=l;return P+=(44-_&_-46)>>>8&-l+_-45+62,P+=(94-_&_-96)>>>8&-l+_-95+63,P+=(47-_&_-58)>>>8&-l+_-48+52,P+=(64-_&_-91)>>>8&-l+_-65+0,P+=(96-_&_-123)>>>8&-l+_-97+26,P},v}(p);o.URLSafeCoder=f;var S=new f;function T(d){return S.encode(d)}o.encodeURLSafe=T;function w(d){return S.decode(d)}o.decodeURLSafe=w,o.encodedLength=function(d){return g.encodedLength(d)},o.maxDecodedLength=function(d){return g.maxDecodedLength(d)},o.decodedLength=function(d){return g.decodedLength(d)}},function(s,o,a){Object.defineProperty(o,"__esModule",{value:!0});var u="utf8: invalid string",l="utf8: invalid source encoding";function p(m){for(var f=new Uint8Array(g(m)),S=0,T=0;T<m.length;T++){var w=m.charCodeAt(T);w<128?f[S++]=w:w<2048?(f[S++]=192|w>>6,f[S++]=128|w&63):w<55296?(f[S++]=224|w>>12,f[S++]=128|w>>6&63,f[S++]=128|w&63):(T++,w=(w&1023)<<10,w|=m.charCodeAt(T)&1023,w+=65536,f[S++]=240|w>>18,f[S++]=128|w>>12&63,f[S++]=128|w>>6&63,f[S++]=128|w&63)}return f}o.encode=p;function g(m){for(var f=0,S=0;S<m.length;S++){var T=m.charCodeAt(S);if(T<128)f+=1;else if(T<2048)f+=2;else if(T<55296)f+=3;else if(T<=57343){if(S>=m.length-1)throw new Error(u);S++,f+=4}else throw new Error(u)}return f}o.encodedLength=g;function C(m){for(var f=[],S=0;S<m.length;S++){var T=m[S];if(T&128){var w=void 0;if(T<224){if(S>=m.length)throw new Error(l);var d=m[++S];if((d&192)!==128)throw new Error(l);T=(T&31)<<6|d&63,w=128}else if(T<240){if(S>=m.length-1)throw new Error(l);var d=m[++S],v=m[++S];if((d&192)!==128||(v&192)!==128)throw new Error(l);T=(T&15)<<12|(d&63)<<6|v&63,w=2048}else if(T<248){if(S>=m.length-2)throw new Error(l);var d=m[++S],v=m[++S],_=m[++S];if((d&192)!==128||(v&192)!==128||(_&192)!==128)throw new Error(l);T=(T&15)<<18|(d&63)<<12|(v&63)<<6|_&63,w=65536}else throw new Error(l);if(T<w||T>=55296&&T<=57343)throw new Error(l);if(T>=65536){if(T>1114111)throw new Error(l);T-=65536,f.push(String.fromCharCode(55296|T>>10)),T=56320|T&1023}}f.push(String.fromCharCode(T))}return f.join("")}o.decode=C},function(s,o,a){s.exports=a(3).default},function(s,o,a){a.r(o);class u{constructor(e,n){this.lastId=0,this.prefix=e,this.name=n}create(e){this.lastId++;var n=this.lastId,c=this.prefix+n,h=this.name+"["+n+"]",b=!1,k=function(){b||(e.apply(null,arguments),b=!0)};return this[n]=k,{number:n,id:c,name:h,callback:k}}remove(e){delete this[e.number]}}var l=new u("_pusher_script_","Pusher.ScriptReceivers"),p={VERSION:"8.4.0-rc2",PROTOCOL:7,wsPort:80,wssPort:443,wsPath:"",httpHost:"sockjs.pusher.com",httpPort:80,httpsPort:443,httpPath:"/pusher",stats_host:"stats.pusher.com",authEndpoint:"/pusher/auth",authTransport:"ajax",activityTimeout:12e4,pongTimeout:3e4,unavailableTimeout:1e4,userAuthentication:{endpoint:"/pusher/user-auth",transport:"ajax"},channelAuthorization:{endpoint:"/pusher/auth",transport:"ajax"},cdn_http:"http://js.pusher.com",cdn_https:"https://js.pusher.com",dependency_suffix:""},g=p;class C{constructor(e){this.options=e,this.receivers=e.receivers||l,this.loading={}}load(e,n,c){var h=this;if(h.loading[e]&&h.loading[e].length>0)h.loading[e].push(c);else{h.loading[e]=[c];var b=O.createScriptRequest(h.getPath(e,n)),k=h.receivers.create(function(E){if(h.receivers.remove(k),h.loading[e]){var x=h.loading[e];delete h.loading[e];for(var N=function(U){U||b.cleanup()},L=0;L<x.length;L++)x[L](E,N)}});b.send(k)}}getRoot(e){var n,c=O.getDocument().location.protocol;return e&&e.useTLS||c==="https:"?n=this.options.cdn_https:n=this.options.cdn_http,n.replace(/\/*$/,"")+"/"+this.options.version}getPath(e,n){return this.getRoot(n)+"/"+e+this.options.suffix+".js"}}var m=new u("_pusher_dependencies","Pusher.DependenciesReceivers"),f=new C({cdn_http:g.cdn_http,cdn_https:g.cdn_https,version:g.VERSION,suffix:g.dependency_suffix,receivers:m});const S={baseUrl:"https://pusher.com",urls:{authenticationEndpoint:{path:"/docs/channels/server_api/authenticating_users"},authorizationEndpoint:{path:"/docs/channels/server_api/authorizing-users/"},javascriptQuickStart:{path:"/docs/javascript_quick_start"},triggeringClientEvents:{path:"/docs/client_api_guide/client_events#trigger-events"},encryptedChannelSupport:{fullUrl:"https://github.com/pusher/pusher-js/tree/cc491015371a4bde5743d1c87a0fbac0feb53195#encrypted-channel-support"}}};var w={buildLogSuffix:function(i){const e="See:",n=S.urls[i];if(!n)return"";let c;return n.fullUrl?c=n.fullUrl:n.path&&(c=S.baseUrl+n.path),c?`${e} ${c}`:""}},d;(function(i){i.UserAuthentication="user-authentication",i.ChannelAuthorization="channel-authorization"})(d||(d={}));class v extends Error{constructor(e){super(e),Object.setPrototypeOf(this,new.target.prototype)}}class _ extends Error{constructor(e){super(e),Object.setPrototypeOf(this,new.target.prototype)}}class P extends Error{constructor(e){super(e),Object.setPrototypeOf(this,new.target.prototype)}}class R extends Error{constructor(e){super(e),Object.setPrototypeOf(this,new.target.prototype)}}class j extends Error{constructor(e){super(e),Object.setPrototypeOf(this,new.target.prototype)}}class D extends Error{constructor(e){super(e),Object.setPrototypeOf(this,new.target.prototype)}}class z extends Error{constructor(e){super(e),Object.setPrototypeOf(this,new.target.prototype)}}class G extends Error{constructor(e){super(e),Object.setPrototypeOf(this,new.target.prototype)}}class $ extends Error{constructor(e,n){super(n),this.status=e,Object.setPrototypeOf(this,new.target.prototype)}}var re=function(i,e,n,c,h){const b=O.createXHR();b.open("POST",n.endpoint,!0),b.setRequestHeader("Content-Type","application/x-www-form-urlencoded");for(var k in n.headers)b.setRequestHeader(k,n.headers[k]);if(n.headersProvider!=null){let E=n.headersProvider();for(var k in E)b.setRequestHeader(k,E[k])}return b.onreadystatechange=function(){if(b.readyState===4)if(b.status===200){let E,x=!1;try{E=JSON.parse(b.responseText),x=!0}catch{h(new $(200,`JSON returned from ${c.toString()} endpoint was invalid, yet status code was 200. Data was: ${b.responseText}`),null)}x&&h(null,E)}else{let E="";switch(c){case d.UserAuthentication:E=w.buildLogSuffix("authenticationEndpoint");break;case d.ChannelAuthorization:E=`Clients must be authorized to join private or presence channels. ${w.buildLogSuffix("authorizationEndpoint")}`;break}h(new $(b.status,`Unable to retrieve auth string from ${c.toString()} endpoint - received status: ${b.status} from ${n.endpoint}. ${E}`),null)}},b.send(e),b};function $n(i){return Wn(Xn(i))}var pe=String.fromCharCode,ke="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Jn=function(i){var e=i.charCodeAt(0);return e<128?i:e<2048?pe(192|e>>>6)+pe(128|e&63):pe(224|e>>>12&15)+pe(128|e>>>6&63)+pe(128|e&63)},Xn=function(i){return i.replace(/[^\x00-\x7F]/g,Jn)},Vn=function(i){var e=[0,2,1][i.length%3],n=i.charCodeAt(0)<<16|(i.length>1?i.charCodeAt(1):0)<<8|(i.length>2?i.charCodeAt(2):0),c=[ke.charAt(n>>>18),ke.charAt(n>>>12&63),e>=2?"=":ke.charAt(n>>>6&63),e>=1?"=":ke.charAt(n&63)];return c.join("")},Wn=window.btoa||function(i){return i.replace(/[\s\S]{1,3}/g,Vn)};class Gn{constructor(e,n,c,h){this.clear=n,this.timer=e(()=>{this.timer&&(this.timer=h(this.timer))},c)}isRunning(){return this.timer!==null}ensureAborted(){this.timer&&(this.clear(this.timer),this.timer=null)}}var St=Gn;function Kn(i){window.clearTimeout(i)}function Qn(i){window.clearInterval(i)}class oe extends St{constructor(e,n){super(setTimeout,Kn,e,function(c){return n(),null})}}class Yn extends St{constructor(e,n){super(setInterval,Qn,e,function(c){return n(),c})}}var Zn={now(){return Date.now?Date.now():new Date().valueOf()},defer(i){return new oe(0,i)},method(i,...e){var n=Array.prototype.slice.call(arguments,1);return function(c){return c[i].apply(c,n.concat(arguments))}}},M=Zn;function J(i,...e){for(var n=0;n<e.length;n++){var c=e[n];for(var h in c)c[h]&&c[h].constructor&&c[h].constructor===Object?i[h]=J(i[h]||{},c[h]):i[h]=c[h]}return i}function er(){for(var i=["Pusher"],e=0;e<arguments.length;e++)typeof arguments[e]=="string"?i.push(arguments[e]):i.push(Ce(arguments[e]));return i.join(" : ")}function kt(i,e){var n=Array.prototype.indexOf;if(i===null)return-1;if(n&&i.indexOf===n)return i.indexOf(e);for(var c=0,h=i.length;c<h;c++)if(i[c]===e)return c;return-1}function Z(i,e){for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&e(i[n],n,i)}function Ct(i){var e=[];return Z(i,function(n,c){e.push(c)}),e}function tr(i){var e=[];return Z(i,function(n){e.push(n)}),e}function me(i,e,n){for(var c=0;c<i.length;c++)e.call(n||window,i[c],c,i)}function Tt(i,e){for(var n=[],c=0;c<i.length;c++)n.push(e(i[c],c,i,n));return n}function nr(i,e){var n={};return Z(i,function(c,h){n[h]=e(c)}),n}function Et(i,e){e=e||function(h){return!!h};for(var n=[],c=0;c<i.length;c++)e(i[c],c,i,n)&&n.push(i[c]);return n}function Pt(i,e){var n={};return Z(i,function(c,h){(e&&e(c,h,i,n)||c)&&(n[h]=c)}),n}function rr(i){var e=[];return Z(i,function(n,c){e.push([c,n])}),e}function xt(i,e){for(var n=0;n<i.length;n++)if(e(i[n],n,i))return!0;return!1}function ir(i,e){for(var n=0;n<i.length;n++)if(!e(i[n],n,i))return!1;return!0}function sr(i){return nr(i,function(e){return typeof e=="object"&&(e=Ce(e)),encodeURIComponent($n(e.toString()))})}function or(i){var e=Pt(i,function(c){return c!==void 0}),n=Tt(rr(sr(e)),M.method("join","=")).join("&");return n}function ar(i){var e=[],n=[];return function c(h,b){var k,E,x;switch(typeof h){case"object":if(!h)return null;for(k=0;k<e.length;k+=1)if(e[k]===h)return{$ref:n[k]};if(e.push(h),n.push(b),Object.prototype.toString.apply(h)==="[object Array]")for(x=[],k=0;k<h.length;k+=1)x[k]=c(h[k],b+"["+k+"]");else{x={};for(E in h)Object.prototype.hasOwnProperty.call(h,E)&&(x[E]=c(h[E],b+"["+JSON.stringify(E)+"]"))}return x;case"number":case"string":case"boolean":return h}}(i,"$")}function Ce(i){try{return JSON.stringify(i)}catch{return JSON.stringify(ar(i))}}class cr{constructor(){this.globalLog=e=>{window.console&&window.console.log&&window.console.log(e)}}debug(...e){this.log(this.globalLog,e)}warn(...e){this.log(this.globalLogWarn,e)}error(...e){this.log(this.globalLogError,e)}globalLogWarn(e){window.console&&window.console.warn?window.console.warn(e):this.globalLog(e)}globalLogError(e){window.console&&window.console.error?window.console.error(e):this.globalLogWarn(e)}log(e,...n){var c=er.apply(this,arguments);Qe.log?Qe.log(c):Qe.logToConsole&&e.bind(this)(c)}}var I=new cr,ur=function(i,e,n,c,h){(n.headers!==void 0||n.headersProvider!=null)&&I.warn(`To send headers with the ${c.toString()} request, you must use AJAX, rather than JSONP.`);var b=i.nextAuthCallbackID.toString();i.nextAuthCallbackID++;var k=i.getDocument(),E=k.createElement("script");i.auth_callbacks[b]=function(L){h(null,L)};var x="Pusher.auth_callbacks['"+b+"']";E.src=n.endpoint+"?callback="+encodeURIComponent(x)+"&"+e;var N=k.getElementsByTagName("head")[0]||k.documentElement;N.insertBefore(E,N.firstChild)},lr=ur;class hr{constructor(e){this.src=e}send(e){var n=this,c="Error loading "+n.src;n.script=document.createElement("script"),n.script.id=e.id,n.script.src=n.src,n.script.type="text/javascript",n.script.charset="UTF-8",n.script.addEventListener?(n.script.onerror=function(){e.callback(c)},n.script.onload=function(){e.callback(null)}):n.script.onreadystatechange=function(){(n.script.readyState==="loaded"||n.script.readyState==="complete")&&e.callback(null)},n.script.async===void 0&&document.attachEvent&&/opera/i.test(navigator.userAgent)?(n.errorScript=document.createElement("script"),n.errorScript.id=e.id+"_error",n.errorScript.text=e.name+"('"+c+"');",n.script.async=n.errorScript.async=!1):n.script.async=!0;var h=document.getElementsByTagName("head")[0];h.insertBefore(n.script,h.firstChild),n.errorScript&&h.insertBefore(n.errorScript,n.script.nextSibling)}cleanup(){this.script&&(this.script.onload=this.script.onerror=null,this.script.onreadystatechange=null),this.script&&this.script.parentNode&&this.script.parentNode.removeChild(this.script),this.errorScript&&this.errorScript.parentNode&&this.errorScript.parentNode.removeChild(this.errorScript),this.script=null,this.errorScript=null}}class fr{constructor(e,n){this.url=e,this.data=n}send(e){if(!this.request){var n=or(this.data),c=this.url+"/"+e.number+"?"+n;this.request=O.createScriptRequest(c),this.request.send(e)}}cleanup(){this.request&&this.request.cleanup()}}var dr=function(i,e){return function(n,c){var h="http"+(e?"s":"")+"://",b=h+(i.host||i.options.host)+i.options.path,k=O.createJSONPRequest(b,n),E=O.ScriptReceivers.create(function(x,N){l.remove(E),k.cleanup(),N&&N.host&&(i.host=N.host),c&&c(x,N)});k.send(E)}},pr={name:"jsonp",getAgent:dr},mr=pr;function He(i,e,n){var c=i+(e.useTLS?"s":""),h=e.useTLS?e.hostTLS:e.hostNonTLS;return c+"://"+h+n}function Me(i,e){var n="/app/"+i,c="?protocol="+g.PROTOCOL+"&client=js&version="+g.VERSION+(e?"&"+e:"");return n+c}var gr={getInitial:function(i,e){var n=(e.httpPath||"")+Me(i,"flash=false");return He("ws",e,n)}},vr={getInitial:function(i,e){var n=(e.httpPath||"/pusher")+Me(i);return He("http",e,n)}},br={getInitial:function(i,e){return He("http",e,e.httpPath||"/pusher")},getPath:function(i,e){return Me(i)}};class yr{constructor(){this._callbacks={}}get(e){return this._callbacks[ze(e)]}add(e,n,c){var h=ze(e);this._callbacks[h]=this._callbacks[h]||[],this._callbacks[h].push({fn:n,context:c})}remove(e,n,c){if(!e&&!n&&!c){this._callbacks={};return}var h=e?[ze(e)]:Ct(this._callbacks);n||c?this.removeCallback(h,n,c):this.removeAllCallbacks(h)}removeCallback(e,n,c){me(e,function(h){this._callbacks[h]=Et(this._callbacks[h]||[],function(b){return n&&n!==b.fn||c&&c!==b.context}),this._callbacks[h].length===0&&delete this._callbacks[h]},this)}removeAllCallbacks(e){me(e,function(n){delete this._callbacks[n]},this)}}function ze(i){return"_"+i}class ee{constructor(e){this.callbacks=new yr,this.global_callbacks=[],this.failThrough=e}bind(e,n,c){return this.callbacks.add(e,n,c),this}bind_global(e){return this.global_callbacks.push(e),this}unbind(e,n,c){return this.callbacks.remove(e,n,c),this}unbind_global(e){return e?(this.global_callbacks=Et(this.global_callbacks||[],n=>n!==e),this):(this.global_callbacks=[],this)}unbind_all(){return this.unbind(),this.unbind_global(),this}emit(e,n,c){for(var h=0;h<this.global_callbacks.length;h++)this.global_callbacks[h](e,n);var b=this.callbacks.get(e),k=[];if(c?k.push(n,c):n&&k.push(n),b&&b.length>0)for(var h=0;h<b.length;h++)b[h].fn.apply(b[h].context||window,k);else this.failThrough&&this.failThrough(e,n);return this}}class wr extends ee{constructor(e,n,c,h,b){super(),this.initialize=O.transportConnectionInitializer,this.hooks=e,this.name=n,this.priority=c,this.key=h,this.options=b,this.state="new",this.timeline=b.timeline,this.activityTimeout=b.activityTimeout,this.id=this.timeline.generateUniqueID()}handlesActivityChecks(){return!!this.hooks.handlesActivityChecks}supportsPing(){return!!this.hooks.supportsPing}connect(){if(this.socket||this.state!=="initialized")return!1;var e=this.hooks.urls.getInitial(this.key,this.options);try{this.socket=this.hooks.getSocket(e,this.options)}catch(n){return M.defer(()=>{this.onError(n),this.changeState("closed")}),!1}return this.bindListeners(),I.debug("Connecting",{transport:this.name,url:e}),this.changeState("connecting"),!0}close(){return this.socket?(this.socket.close(),!0):!1}send(e){return this.state==="open"?(M.defer(()=>{this.socket&&this.socket.send(e)}),!0):!1}ping(){this.state==="open"&&this.supportsPing()&&this.socket.ping()}onOpen(){this.hooks.beforeOpen&&this.hooks.beforeOpen(this.socket,this.hooks.urls.getPath(this.key,this.options)),this.changeState("open"),this.socket.onopen=void 0}onError(e){this.emit("error",{type:"WebSocketError",error:e}),this.timeline.error(this.buildTimelineMessage({error:e.toString()}))}onClose(e){e?this.changeState("closed",{code:e.code,reason:e.reason,wasClean:e.wasClean}):this.changeState("closed"),this.unbindListeners(),this.socket=void 0}onMessage(e){this.emit("message",e)}onActivity(){this.emit("activity")}bindListeners(){this.socket.onopen=()=>{this.onOpen()},this.socket.onerror=e=>{this.onError(e)},this.socket.onclose=e=>{this.onClose(e)},this.socket.onmessage=e=>{this.onMessage(e)},this.supportsPing()&&(this.socket.onactivity=()=>{this.onActivity()})}unbindListeners(){this.socket&&(this.socket.onopen=void 0,this.socket.onerror=void 0,this.socket.onclose=void 0,this.socket.onmessage=void 0,this.supportsPing()&&(this.socket.onactivity=void 0))}changeState(e,n){this.state=e,this.timeline.info(this.buildTimelineMessage({state:e,params:n})),this.emit(e,n)}buildTimelineMessage(e){return J({cid:this.id},e)}}class le{constructor(e){this.hooks=e}isSupported(e){return this.hooks.isSupported(e)}createConnection(e,n,c,h){return new wr(this.hooks,e,n,c,h)}}var _r=new le({urls:gr,handlesActivityChecks:!1,supportsPing:!1,isInitialized:function(){return!!O.getWebSocketAPI()},isSupported:function(){return!!O.getWebSocketAPI()},getSocket:function(i){return O.createWebSocket(i)}}),Ot={urls:vr,handlesActivityChecks:!1,supportsPing:!0,isInitialized:function(){return!0}},Rt=J({getSocket:function(i){return O.HTTPFactory.createStreamingSocket(i)}},Ot),At=J({getSocket:function(i){return O.HTTPFactory.createPollingSocket(i)}},Ot),Nt={isSupported:function(){return O.isXHRSupported()}},Sr=new le(J({},Rt,Nt)),kr=new le(J({},At,Nt)),Cr={ws:_r,xhr_streaming:Sr,xhr_polling:kr},Te=Cr,Tr=new le({file:"sockjs",urls:br,handlesActivityChecks:!0,supportsPing:!1,isSupported:function(){return!0},isInitialized:function(){return window.SockJS!==void 0},getSocket:function(i,e){return new window.SockJS(i,null,{js_path:f.getPath("sockjs",{useTLS:e.useTLS}),ignore_null_origin:e.ignoreNullOrigin})},beforeOpen:function(i,e){i.send(JSON.stringify({path:e}))}}),Lt={isSupported:function(i){var e=O.isXDRSupported(i.useTLS);return e}},Er=new le(J({},Rt,Lt)),Pr=new le(J({},At,Lt));Te.xdr_streaming=Er,Te.xdr_polling=Pr,Te.sockjs=Tr;var xr=Te;class Or extends ee{constructor(){super();var e=this;window.addEventListener!==void 0&&(window.addEventListener("online",function(){e.emit("online")},!1),window.addEventListener("offline",function(){e.emit("offline")},!1))}isOnline(){return window.navigator.onLine===void 0?!0:window.navigator.onLine}}var Rr=new Or;class Ar{constructor(e,n,c){this.manager=e,this.transport=n,this.minPingDelay=c.minPingDelay,this.maxPingDelay=c.maxPingDelay,this.pingDelay=void 0}createConnection(e,n,c,h){h=J({},h,{activityTimeout:this.pingDelay});var b=this.transport.createConnection(e,n,c,h),k=null,E=function(){b.unbind("open",E),b.bind("closed",x),k=M.now()},x=N=>{if(b.unbind("closed",x),N.code===1002||N.code===1003)this.manager.reportDeath();else if(!N.wasClean&&k){var L=M.now()-k;L<2*this.maxPingDelay&&(this.manager.reportDeath(),this.pingDelay=Math.max(L/2,this.minPingDelay))}};return b.bind("open",E),b}isSupported(e){return this.manager.isAlive()&&this.transport.isSupported(e)}}const It={decodeMessage:function(i){try{var e=JSON.parse(i.data),n=e.data;if(typeof n=="string")try{n=JSON.parse(e.data)}catch{}var c={event:e.event,channel:e.channel,data:n};return e.user_id&&(c.user_id=e.user_id),c}catch(h){throw{type:"MessageParseError",error:h,data:i.data}}},encodeMessage:function(i){return JSON.stringify(i)},processHandshake:function(i){var e=It.decodeMessage(i);if(e.event==="pusher:connection_established"){if(!e.data.activity_timeout)throw"No activity timeout specified in handshake";return{action:"connected",id:e.data.socket_id,activityTimeout:e.data.activity_timeout*1e3}}else{if(e.event==="pusher:error")return{action:this.getCloseAction(e.data),error:this.getCloseError(e.data)};throw"Invalid handshake"}},getCloseAction:function(i){return i.code<4e3?i.code>=1002&&i.code<=1004?"backoff":null:i.code===4e3?"tls_only":i.code<4100?"refused":i.code<4200?"backoff":i.code<4300?"retry":"refused"},getCloseError:function(i){return i.code!==1e3&&i.code!==1001?{type:"PusherError",data:{code:i.code,message:i.reason||i.message}}:null}};var ae=It;class Nr extends ee{constructor(e,n){super(),this.id=e,this.transport=n,this.activityTimeout=n.activityTimeout,this.bindListeners()}handlesActivityChecks(){return this.transport.handlesActivityChecks()}send(e){return this.transport.send(e)}send_event(e,n,c){var h={event:e,data:n};return c&&(h.channel=c),I.debug("Event sent",h),this.send(ae.encodeMessage(h))}ping(){this.transport.supportsPing()?this.transport.ping():this.send_event("pusher:ping",{})}close(){this.transport.close()}bindListeners(){var e={message:c=>{var h;try{h=ae.decodeMessage(c)}catch(b){this.emit("error",{type:"MessageParseError",error:b,data:c.data})}if(h!==void 0){switch(I.debug("Event recd",h),h.event){case"pusher:error":this.emit("error",{type:"PusherError",data:h.data});break;case"pusher:ping":this.emit("ping");break;case"pusher:pong":this.emit("pong");break}this.emit("message",h)}},activity:()=>{this.emit("activity")},error:c=>{this.emit("error",c)},closed:c=>{n(),c&&c.code&&this.handleCloseEvent(c),this.transport=null,this.emit("closed")}},n=()=>{Z(e,(c,h)=>{this.transport.unbind(h,c)})};Z(e,(c,h)=>{this.transport.bind(h,c)})}handleCloseEvent(e){var n=ae.getCloseAction(e),c=ae.getCloseError(e);c&&this.emit("error",c),n&&this.emit(n,{action:n,error:c})}}class Lr{constructor(e,n){this.transport=e,this.callback=n,this.bindListeners()}close(){this.unbindListeners(),this.transport.close()}bindListeners(){this.onMessage=e=>{this.unbindListeners();var n;try{n=ae.processHandshake(e)}catch(c){this.finish("error",{error:c}),this.transport.close();return}n.action==="connected"?this.finish("connected",{connection:new Nr(n.id,this.transport),activityTimeout:n.activityTimeout}):(this.finish(n.action,{error:n.error}),this.transport.close())},this.onClosed=e=>{this.unbindListeners();var n=ae.getCloseAction(e)||"backoff",c=ae.getCloseError(e);this.finish(n,{error:c})},this.transport.bind("message",this.onMessage),this.transport.bind("closed",this.onClosed)}unbindListeners(){this.transport.unbind("message",this.onMessage),this.transport.unbind("closed",this.onClosed)}finish(e,n){this.callback(J({transport:this.transport,action:e},n))}}class Ir{constructor(e,n){this.timeline=e,this.options=n||{}}send(e,n){this.timeline.isEmpty()||this.timeline.send(O.TimelineTransport.getAgent(this,e),n)}}class $e extends ee{constructor(e,n){super(function(c,h){I.debug("No callbacks on "+e+" for "+c)}),this.name=e,this.pusher=n,this.subscribed=!1,this.subscriptionPending=!1,this.subscriptionCancelled=!1}authorize(e,n){return n(null,{auth:""})}trigger(e,n){if(e.indexOf("client-")!==0)throw new v("Event '"+e+"' does not start with 'client-'");if(!this.subscribed){var c=w.buildLogSuffix("triggeringClientEvents");I.warn(`Client event triggered before channel 'subscription_succeeded' event . ${c}`)}return this.pusher.send_event(e,n,this.name)}disconnect(){this.subscribed=!1,this.subscriptionPending=!1}handleEvent(e){var n=e.event,c=e.data;if(n==="pusher_internal:subscription_succeeded")this.handleSubscriptionSucceededEvent(e);else if(n==="pusher_internal:subscription_count")this.handleSubscriptionCountEvent(e);else if(n.indexOf("pusher_internal:")!==0){var h={};this.emit(n,c,h)}}handleSubscriptionSucceededEvent(e){this.subscriptionPending=!1,this.subscribed=!0,this.subscriptionCancelled?this.pusher.unsubscribe(this.name):this.emit("pusher:subscription_succeeded",e.data)}handleSubscriptionCountEvent(e){e.data.subscription_count&&(this.subscriptionCount=e.data.subscription_count),this.emit("pusher:subscription_count",e.data)}subscribe(){this.subscribed||(this.subscriptionPending=!0,this.subscriptionCancelled=!1,this.authorize(this.pusher.connection.socket_id,(e,n)=>{e?(this.subscriptionPending=!1,I.error(e.toString()),this.emit("pusher:subscription_error",Object.assign({},{type:"AuthError",error:e.message},e instanceof $?{status:e.status}:{}))):this.pusher.send_event("pusher:subscribe",{auth:n.auth,channel_data:n.channel_data,channel:this.name})}))}unsubscribe(){this.subscribed=!1,this.pusher.send_event("pusher:unsubscribe",{channel:this.name})}cancelSubscription(){this.subscriptionCancelled=!0}reinstateSubscription(){this.subscriptionCancelled=!1}}class Je extends $e{authorize(e,n){return this.pusher.config.channelAuthorizer({channelName:this.name,socketId:e},n)}}class jr{constructor(){this.reset()}get(e){return Object.prototype.hasOwnProperty.call(this.members,e)?{id:e,info:this.members[e]}:null}each(e){Z(this.members,(n,c)=>{e(this.get(c))})}setMyID(e){this.myID=e}onSubscription(e){this.members=e.presence.hash,this.count=e.presence.count,this.me=this.get(this.myID)}addMember(e){return this.get(e.user_id)===null&&this.count++,this.members[e.user_id]=e.user_info,this.get(e.user_id)}removeMember(e){var n=this.get(e.user_id);return n&&(delete this.members[e.user_id],this.count--),n}reset(){this.members={},this.count=0,this.myID=null,this.me=null}}var Ur=function(i,e,n,c){function h(b){return b instanceof n?b:new n(function(k){k(b)})}return new(n||(n=Promise))(function(b,k){function E(L){try{N(c.next(L))}catch(U){k(U)}}function x(L){try{N(c.throw(L))}catch(U){k(U)}}function N(L){L.done?b(L.value):h(L.value).then(E,x)}N((c=c.apply(i,e||[])).next())})};class Fr extends Je{constructor(e,n){super(e,n),this.members=new jr}authorize(e,n){super.authorize(e,(c,h)=>Ur(this,void 0,void 0,function*(){if(!c)if(h=h,h.channel_data!=null){var b=JSON.parse(h.channel_data);this.members.setMyID(b.user_id)}else if(yield this.pusher.user.signinDonePromise,this.pusher.user.user_data!=null)this.members.setMyID(this.pusher.user.user_data.id);else{let k=w.buildLogSuffix("authorizationEndpoint");I.error(`Invalid auth response for channel '${this.name}', expected 'channel_data' field. ${k}, or the user should be signed in.`),n("Invalid auth response");return}n(c,h)}))}handleEvent(e){var n=e.event;if(n.indexOf("pusher_internal:")===0)this.handleInternalEvent(e);else{var c=e.data,h={};e.user_id&&(h.user_id=e.user_id),this.emit(n,c,h)}}handleInternalEvent(e){var n=e.event,c=e.data;switch(n){case"pusher_internal:subscription_succeeded":this.handleSubscriptionSucceededEvent(e);break;case"pusher_internal:subscription_count":this.handleSubscriptionCountEvent(e);break;case"pusher_internal:member_added":var h=this.members.addMember(c);this.emit("pusher:member_added",h);break;case"pusher_internal:member_removed":var b=this.members.removeMember(c);b&&this.emit("pusher:member_removed",b);break}}handleSubscriptionSucceededEvent(e){this.subscriptionPending=!1,this.subscribed=!0,this.subscriptionCancelled?this.pusher.unsubscribe(this.name):(this.members.onSubscription(e.data),this.emit("pusher:subscription_succeeded",this.members))}disconnect(){this.members.reset(),super.disconnect()}}var Dr=a(1),Xe=a(0);class qr extends Je{constructor(e,n,c){super(e,n),this.key=null,this.nacl=c}authorize(e,n){super.authorize(e,(c,h)=>{if(c){n(c,h);return}let b=h.shared_secret;if(!b){n(new Error(`No shared_secret key in auth payload for encrypted channel: ${this.name}`),null);return}this.key=Object(Xe.decode)(b),delete h.shared_secret,n(null,h)})}trigger(e,n){throw new D("Client events are not currently supported for encrypted channels")}handleEvent(e){var n=e.event,c=e.data;if(n.indexOf("pusher_internal:")===0||n.indexOf("pusher:")===0){super.handleEvent(e);return}this.handleEncryptedEvent(n,c)}handleEncryptedEvent(e,n){if(!this.key){I.debug("Received encrypted event before key has been retrieved from the authEndpoint");return}if(!n.ciphertext||!n.nonce){I.error("Unexpected format for encrypted event, expected object with `ciphertext` and `nonce` fields, got: "+n);return}let c=Object(Xe.decode)(n.ciphertext);if(c.length<this.nacl.secretbox.overheadLength){I.error(`Expected encrypted event ciphertext length to be ${this.nacl.secretbox.overheadLength}, got: ${c.length}`);return}let h=Object(Xe.decode)(n.nonce);if(h.length<this.nacl.secretbox.nonceLength){I.error(`Expected encrypted event nonce length to be ${this.nacl.secretbox.nonceLength}, got: ${h.length}`);return}let b=this.nacl.secretbox.open(c,h,this.key);if(b===null){I.debug("Failed to decrypt an event, probably because it was encrypted with a different key. Fetching a new key from the authEndpoint..."),this.authorize(this.pusher.connection.socket_id,(k,E)=>{if(k){I.error(`Failed to make a request to the authEndpoint: ${E}. Unable to fetch new key, so dropping encrypted event`);return}if(b=this.nacl.secretbox.open(c,h,this.key),b===null){I.error("Failed to decrypt event with new key. Dropping encrypted event");return}this.emit(e,this.getDataToEmit(b))});return}this.emit(e,this.getDataToEmit(b))}getDataToEmit(e){let n=Object(Dr.decode)(e);try{return JSON.parse(n)}catch{return n}}}class Br extends ee{constructor(e,n){super(),this.state="initialized",this.connection=null,this.key=e,this.options=n,this.timeline=this.options.timeline,this.usingTLS=this.options.useTLS,this.errorCallbacks=this.buildErrorCallbacks(),this.connectionCallbacks=this.buildConnectionCallbacks(this.errorCallbacks),this.handshakeCallbacks=this.buildHandshakeCallbacks(this.errorCallbacks);var c=O.getNetwork();c.bind("online",()=>{this.timeline.info({netinfo:"online"}),(this.state==="connecting"||this.state==="unavailable")&&this.retryIn(0)}),c.bind("offline",()=>{this.timeline.info({netinfo:"offline"}),this.connection&&this.sendActivityCheck()}),this.updateStrategy()}switchCluster(e){this.key=e,this.updateStrategy(),this.retryIn(0)}connect(){if(!(this.connection||this.runner)){if(!this.strategy.isSupported()){this.updateState("failed");return}this.updateState("connecting"),this.startConnecting(),this.setUnavailableTimer()}}send(e){return this.connection?this.connection.send(e):!1}send_event(e,n,c){return this.connection?this.connection.send_event(e,n,c):!1}disconnect(){this.disconnectInternally(),this.updateState("disconnected")}isUsingTLS(){return this.usingTLS}startConnecting(){var e=(n,c)=>{n?this.runner=this.strategy.connect(0,e):c.action==="error"?(this.emit("error",{type:"HandshakeError",error:c.error}),this.timeline.error({handshakeError:c.error})):(this.abortConnecting(),this.handshakeCallbacks[c.action](c))};this.runner=this.strategy.connect(0,e)}abortConnecting(){this.runner&&(this.runner.abort(),this.runner=null)}disconnectInternally(){if(this.abortConnecting(),this.clearRetryTimer(),this.clearUnavailableTimer(),this.connection){var e=this.abandonConnection();e.close()}}updateStrategy(){this.strategy=this.options.getStrategy({key:this.key,timeline:this.timeline,useTLS:this.usingTLS})}retryIn(e){this.timeline.info({action:"retry",delay:e}),e>0&&this.emit("connecting_in",Math.round(e/1e3)),this.retryTimer=new oe(e||0,()=>{this.disconnectInternally(),this.connect()})}clearRetryTimer(){this.retryTimer&&(this.retryTimer.ensureAborted(),this.retryTimer=null)}setUnavailableTimer(){this.unavailableTimer=new oe(this.options.unavailableTimeout,()=>{this.updateState("unavailable")})}clearUnavailableTimer(){this.unavailableTimer&&this.unavailableTimer.ensureAborted()}sendActivityCheck(){this.stopActivityCheck(),this.connection.ping(),this.activityTimer=new oe(this.options.pongTimeout,()=>{this.timeline.error({pong_timed_out:this.options.pongTimeout}),this.retryIn(0)})}resetActivityCheck(){this.stopActivityCheck(),this.connection&&!this.connection.handlesActivityChecks()&&(this.activityTimer=new oe(this.activityTimeout,()=>{this.sendActivityCheck()}))}stopActivityCheck(){this.activityTimer&&this.activityTimer.ensureAborted()}buildConnectionCallbacks(e){return J({},e,{message:n=>{this.resetActivityCheck(),this.emit("message",n)},ping:()=>{this.send_event("pusher:pong",{})},activity:()=>{this.resetActivityCheck()},error:n=>{this.emit("error",n)},closed:()=>{this.abandonConnection(),this.shouldRetry()&&this.retryIn(1e3)}})}buildHandshakeCallbacks(e){return J({},e,{connected:n=>{this.activityTimeout=Math.min(this.options.activityTimeout,n.activityTimeout,n.connection.activityTimeout||1/0),this.clearUnavailableTimer(),this.setConnection(n.connection),this.socket_id=this.connection.id,this.updateState("connected",{socket_id:this.socket_id})}})}buildErrorCallbacks(){let e=n=>c=>{c.error&&this.emit("error",{type:"WebSocketError",error:c.error}),n(c)};return{tls_only:e(()=>{this.usingTLS=!0,this.updateStrategy(),this.retryIn(0)}),refused:e(()=>{this.disconnect()}),backoff:e(()=>{this.retryIn(1e3)}),retry:e(()=>{this.retryIn(0)})}}setConnection(e){this.connection=e;for(var n in this.connectionCallbacks)this.connection.bind(n,this.connectionCallbacks[n]);this.resetActivityCheck()}abandonConnection(){if(this.connection){this.stopActivityCheck();for(var e in this.connectionCallbacks)this.connection.unbind(e,this.connectionCallbacks[e]);var n=this.connection;return this.connection=null,n}}updateState(e,n){var c=this.state;if(this.state=e,c!==e){var h=e;h==="connected"&&(h+=" with new socket ID "+n.socket_id),I.debug("State changed",c+" -> "+h),this.timeline.info({state:e,params:n}),this.emit("state_change",{previous:c,current:e}),this.emit(e,n)}}shouldRetry(){return this.state==="connecting"||this.state==="connected"}}class Hr{constructor(){this.channels={}}add(e,n){return this.channels[e]||(this.channels[e]=Mr(e,n)),this.channels[e]}all(){return tr(this.channels)}find(e){return this.channels[e]}remove(e){var n=this.channels[e];return delete this.channels[e],n}disconnect(){Z(this.channels,function(e){e.disconnect()})}}function Mr(i,e){if(i.indexOf("private-encrypted-")===0){if(e.config.nacl)return te.createEncryptedChannel(i,e,e.config.nacl);let n="Tried to subscribe to a private-encrypted- channel but no nacl implementation available",c=w.buildLogSuffix("encryptedChannelSupport");throw new D(`${n}. ${c}`)}else{if(i.indexOf("private-")===0)return te.createPrivateChannel(i,e);if(i.indexOf("presence-")===0)return te.createPresenceChannel(i,e);if(i.indexOf("#")===0)throw new _('Cannot create a channel with name "'+i+'".');return te.createChannel(i,e)}}var zr={createChannels(){return new Hr},createConnectionManager(i,e){return new Br(i,e)},createChannel(i,e){return new $e(i,e)},createPrivateChannel(i,e){return new Je(i,e)},createPresenceChannel(i,e){return new Fr(i,e)},createEncryptedChannel(i,e,n){return new qr(i,e,n)},createTimelineSender(i,e){return new Ir(i,e)},createHandshake(i,e){return new Lr(i,e)},createAssistantToTheTransportManager(i,e,n){return new Ar(i,e,n)}},te=zr;class jt{constructor(e){this.options=e||{},this.livesLeft=this.options.lives||1/0}getAssistant(e){return te.createAssistantToTheTransportManager(this,e,{minPingDelay:this.options.minPingDelay,maxPingDelay:this.options.maxPingDelay})}isAlive(){return this.livesLeft>0}reportDeath(){this.livesLeft-=1}}class ce{constructor(e,n){this.strategies=e,this.loop=!!n.loop,this.failFast=!!n.failFast,this.timeout=n.timeout,this.timeoutLimit=n.timeoutLimit}isSupported(){return xt(this.strategies,M.method("isSupported"))}connect(e,n){var c=this.strategies,h=0,b=this.timeout,k=null,E=(x,N)=>{N?n(null,N):(h=h+1,this.loop&&(h=h%c.length),h<c.length?(b&&(b=b*2,this.timeoutLimit&&(b=Math.min(b,this.timeoutLimit))),k=this.tryStrategy(c[h],e,{timeout:b,failFast:this.failFast},E)):n(!0))};return k=this.tryStrategy(c[h],e,{timeout:b,failFast:this.failFast},E),{abort:function(){k.abort()},forceMinPriority:function(x){e=x,k&&k.forceMinPriority(x)}}}tryStrategy(e,n,c,h){var b=null,k=null;return c.timeout>0&&(b=new oe(c.timeout,function(){k.abort(),h(!0)})),k=e.connect(n,function(E,x){E&&b&&b.isRunning()&&!c.failFast||(b&&b.ensureAborted(),h(E,x))}),{abort:function(){b&&b.ensureAborted(),k.abort()},forceMinPriority:function(E){k.forceMinPriority(E)}}}}class Ve{constructor(e){this.strategies=e}isSupported(){return xt(this.strategies,M.method("isSupported"))}connect(e,n){return $r(this.strategies,e,function(c,h){return function(b,k){if(h[c].error=b,b){Jr(h)&&n(!0);return}me(h,function(E){E.forceMinPriority(k.transport.priority)}),n(null,k)}})}}function $r(i,e,n){var c=Tt(i,function(h,b,k,E){return h.connect(e,n(b,E))});return{abort:function(){me(c,Xr)},forceMinPriority:function(h){me(c,function(b){b.forceMinPriority(h)})}}}function Jr(i){return ir(i,function(e){return!!e.error})}function Xr(i){!i.error&&!i.aborted&&(i.abort(),i.aborted=!0)}class Vr{constructor(e,n,c){this.strategy=e,this.transports=n,this.ttl=c.ttl||1800*1e3,this.usingTLS=c.useTLS,this.timeline=c.timeline}isSupported(){return this.strategy.isSupported()}connect(e,n){var c=this.usingTLS,h=Wr(c),b=h&&h.cacheSkipCount?h.cacheSkipCount:0,k=[this.strategy];if(h&&h.timestamp+this.ttl>=M.now()){var E=this.transports[h.transport];E&&(["ws","wss"].includes(h.transport)||b>3?(this.timeline.info({cached:!0,transport:h.transport,latency:h.latency}),k.push(new ce([E],{timeout:h.latency*2+1e3,failFast:!0}))):b++)}var x=M.now(),N=k.pop().connect(e,function L(U,xe){U?(Ut(c),k.length>0?(x=M.now(),N=k.pop().connect(e,L)):n(U)):(Gr(c,xe.transport.name,M.now()-x,b),n(null,xe))});return{abort:function(){N.abort()},forceMinPriority:function(L){e=L,N&&N.forceMinPriority(L)}}}}function We(i){return"pusherTransport"+(i?"TLS":"NonTLS")}function Wr(i){var e=O.getLocalStorage();if(e)try{var n=e[We(i)];if(n)return JSON.parse(n)}catch{Ut(i)}return null}function Gr(i,e,n,c){var h=O.getLocalStorage();if(h)try{h[We(i)]=Ce({timestamp:M.now(),transport:e,latency:n,cacheSkipCount:c})}catch{}}function Ut(i){var e=O.getLocalStorage();if(e)try{delete e[We(i)]}catch{}}class Ee{constructor(e,{delay:n}){this.strategy=e,this.options={delay:n}}isSupported(){return this.strategy.isSupported()}connect(e,n){var c=this.strategy,h,b=new oe(this.options.delay,function(){h=c.connect(e,n)});return{abort:function(){b.ensureAborted(),h&&h.abort()},forceMinPriority:function(k){e=k,h&&h.forceMinPriority(k)}}}}class ge{constructor(e,n,c){this.test=e,this.trueBranch=n,this.falseBranch=c}isSupported(){var e=this.test()?this.trueBranch:this.falseBranch;return e.isSupported()}connect(e,n){var c=this.test()?this.trueBranch:this.falseBranch;return c.connect(e,n)}}class Kr{constructor(e){this.strategy=e}isSupported(){return this.strategy.isSupported()}connect(e,n){var c=this.strategy.connect(e,function(h,b){b&&c.abort(),n(h,b)});return c}}function ve(i){return function(){return i.isSupported()}}var Qr=function(i,e,n){var c={};function h(Gt,Gi,Ki,Qi,Yi){var Kt=n(i,Gt,Gi,Ki,Qi,Yi);return c[Gt]=Kt,Kt}var b=Object.assign({},e,{hostNonTLS:i.wsHost+":"+i.wsPort,hostTLS:i.wsHost+":"+i.wssPort,httpPath:i.wsPath}),k=Object.assign({},b,{useTLS:!0}),E=Object.assign({},e,{hostNonTLS:i.httpHost+":"+i.httpPort,hostTLS:i.httpHost+":"+i.httpsPort,httpPath:i.httpPath}),x={loop:!0,timeout:15e3,timeoutLimit:6e4},N=new jt({minPingDelay:1e4,maxPingDelay:i.activityTimeout}),L=new jt({lives:2,minPingDelay:1e4,maxPingDelay:i.activityTimeout}),U=h("ws","ws",3,b,N),xe=h("wss","ws",3,k,N),$i=h("sockjs","sockjs",1,E),zt=h("xhr_streaming","xhr_streaming",1,E,L),Ji=h("xdr_streaming","xdr_streaming",1,E,L),$t=h("xhr_polling","xhr_polling",1,E),Xi=h("xdr_polling","xdr_polling",1,E),Jt=new ce([U],x),Vi=new ce([xe],x),Wi=new ce([$i],x),Xt=new ce([new ge(ve(zt),zt,Ji)],x),Vt=new ce([new ge(ve($t),$t,Xi)],x),Wt=new ce([new ge(ve(Xt),new Ve([Xt,new Ee(Vt,{delay:4e3})]),Vt)],x),Ye=new ge(ve(Wt),Wt,Wi),Ze;return e.useTLS?Ze=new Ve([Jt,new Ee(Ye,{delay:2e3})]):Ze=new Ve([Jt,new Ee(Vi,{delay:2e3}),new Ee(Ye,{delay:5e3})]),new Vr(new Kr(new ge(ve(U),Ze,Ye)),c,{ttl:18e5,timeline:e.timeline,useTLS:e.useTLS})},Yr=Qr,Zr=function(){var i=this;i.timeline.info(i.buildTimelineMessage({transport:i.name+(i.options.useTLS?"s":"")})),i.hooks.isInitialized()?i.changeState("initialized"):i.hooks.file?(i.changeState("initializing"),f.load(i.hooks.file,{useTLS:i.options.useTLS},function(e,n){i.hooks.isInitialized()?(i.changeState("initialized"),n(!0)):(e&&i.onError(e),i.onClose(),n(!1))})):i.onClose()},ei={getRequest:function(i){var e=new window.XDomainRequest;return e.ontimeout=function(){i.emit("error",new P),i.close()},e.onerror=function(n){i.emit("error",n),i.close()},e.onprogress=function(){e.responseText&&e.responseText.length>0&&i.onChunk(200,e.responseText)},e.onload=function(){e.responseText&&e.responseText.length>0&&i.onChunk(200,e.responseText),i.emit("finished",200),i.close()},e},abortRequest:function(i){i.ontimeout=i.onerror=i.onprogress=i.onload=null,i.abort()}},ti=ei;const ni=256*1024;class ri extends ee{constructor(e,n,c){super(),this.hooks=e,this.method=n,this.url=c}start(e){this.position=0,this.xhr=this.hooks.getRequest(this),this.unloader=()=>{this.close()},O.addUnloadListener(this.unloader),this.xhr.open(this.method,this.url,!0),this.xhr.setRequestHeader&&this.xhr.setRequestHeader("Content-Type","application/json"),this.xhr.send(e)}close(){this.unloader&&(O.removeUnloadListener(this.unloader),this.unloader=null),this.xhr&&(this.hooks.abortRequest(this.xhr),this.xhr=null)}onChunk(e,n){for(;;){var c=this.advanceBuffer(n);if(c)this.emit("chunk",{status:e,data:c});else break}this.isBufferTooLong(n)&&this.emit("buffer_too_long")}advanceBuffer(e){var n=e.slice(this.position),c=n.indexOf(`
`);return c!==-1?(this.position+=c+1,n.slice(0,c)):null}isBufferTooLong(e){return this.position===e.length&&e.length>ni}}var Ge;(function(i){i[i.CONNECTING=0]="CONNECTING",i[i.OPEN=1]="OPEN",i[i.CLOSED=3]="CLOSED"})(Ge||(Ge={}));var ue=Ge,ii=1;class si{constructor(e,n){this.hooks=e,this.session=Dt(1e3)+"/"+ui(8),this.location=oi(n),this.readyState=ue.CONNECTING,this.openStream()}send(e){return this.sendRaw(JSON.stringify([e]))}ping(){this.hooks.sendHeartbeat(this)}close(e,n){this.onClose(e,n,!0)}sendRaw(e){if(this.readyState===ue.OPEN)try{return O.createSocketRequest("POST",Ft(ai(this.location,this.session))).start(e),!0}catch{return!1}else return!1}reconnect(){this.closeStream(),this.openStream()}onClose(e,n,c){this.closeStream(),this.readyState=ue.CLOSED,this.onclose&&this.onclose({code:e,reason:n,wasClean:c})}onChunk(e){if(e.status===200){this.readyState===ue.OPEN&&this.onActivity();var n,c=e.data.slice(0,1);switch(c){case"o":n=JSON.parse(e.data.slice(1)||"{}"),this.onOpen(n);break;case"a":n=JSON.parse(e.data.slice(1)||"[]");for(var h=0;h<n.length;h++)this.onEvent(n[h]);break;case"m":n=JSON.parse(e.data.slice(1)||"null"),this.onEvent(n);break;case"h":this.hooks.onHeartbeat(this);break;case"c":n=JSON.parse(e.data.slice(1)||"[]"),this.onClose(n[0],n[1],!0);break}}}onOpen(e){this.readyState===ue.CONNECTING?(e&&e.hostname&&(this.location.base=ci(this.location.base,e.hostname)),this.readyState=ue.OPEN,this.onopen&&this.onopen()):this.onClose(1006,"Server lost session",!0)}onEvent(e){this.readyState===ue.OPEN&&this.onmessage&&this.onmessage({data:e})}onActivity(){this.onactivity&&this.onactivity()}onError(e){this.onerror&&this.onerror(e)}openStream(){this.stream=O.createSocketRequest("POST",Ft(this.hooks.getReceiveURL(this.location,this.session))),this.stream.bind("chunk",e=>{this.onChunk(e)}),this.stream.bind("finished",e=>{this.hooks.onFinished(this,e)}),this.stream.bind("buffer_too_long",()=>{this.reconnect()});try{this.stream.start()}catch(e){M.defer(()=>{this.onError(e),this.onClose(1006,"Could not start streaming",!1)})}}closeStream(){this.stream&&(this.stream.unbind_all(),this.stream.close(),this.stream=null)}}function oi(i){var e=/([^\?]*)\/*(\??.*)/.exec(i);return{base:e[1],queryString:e[2]}}function ai(i,e){return i.base+"/"+e+"/xhr_send"}function Ft(i){var e=i.indexOf("?")===-1?"?":"&";return i+e+"t="+ +new Date+"&n="+ii++}function ci(i,e){var n=/(https?:\/\/)([^\/:]+)((\/|:)?.*)/.exec(i);return n[1]+e+n[3]}function Dt(i){return O.randomInt(i)}function ui(i){for(var e=[],n=0;n<i;n++)e.push(Dt(32).toString(32));return e.join("")}var li=si,hi={getReceiveURL:function(i,e){return i.base+"/"+e+"/xhr_streaming"+i.queryString},onHeartbeat:function(i){i.sendRaw("[]")},sendHeartbeat:function(i){i.sendRaw("[]")},onFinished:function(i,e){i.onClose(1006,"Connection interrupted ("+e+")",!1)}},fi=hi,di={getReceiveURL:function(i,e){return i.base+"/"+e+"/xhr"+i.queryString},onHeartbeat:function(){},sendHeartbeat:function(i){i.sendRaw("[]")},onFinished:function(i,e){e===200?i.reconnect():i.onClose(1006,"Connection interrupted ("+e+")",!1)}},pi=di,mi={getRequest:function(i){var e=O.getXHRAPI(),n=new e;return n.onreadystatechange=n.onprogress=function(){switch(n.readyState){case 3:n.responseText&&n.responseText.length>0&&i.onChunk(n.status,n.responseText);break;case 4:n.responseText&&n.responseText.length>0&&i.onChunk(n.status,n.responseText),i.emit("finished",n.status),i.close();break}},n},abortRequest:function(i){i.onreadystatechange=null,i.abort()}},gi=mi,vi={createStreamingSocket(i){return this.createSocket(fi,i)},createPollingSocket(i){return this.createSocket(pi,i)},createSocket(i,e){return new li(i,e)},createXHR(i,e){return this.createRequest(gi,i,e)},createRequest(i,e,n){return new ri(i,e,n)}},qt=vi;qt.createXDR=function(i,e){return this.createRequest(ti,i,e)};var bi=qt,yi={nextAuthCallbackID:1,auth_callbacks:{},ScriptReceivers:l,DependenciesReceivers:m,getDefaultStrategy:Yr,Transports:xr,transportConnectionInitializer:Zr,HTTPFactory:bi,TimelineTransport:mr,getXHRAPI(){return window.XMLHttpRequest},getWebSocketAPI(){return window.WebSocket||window.MozWebSocket},setup(i){window.Pusher=i;var e=()=>{this.onDocumentBody(i.ready)};window.JSON?e():f.load("json2",{},e)},getDocument(){return document},getProtocol(){return this.getDocument().location.protocol},getAuthorizers(){return{ajax:re,jsonp:lr}},onDocumentBody(i){document.body?i():setTimeout(()=>{this.onDocumentBody(i)},0)},createJSONPRequest(i,e){return new fr(i,e)},createScriptRequest(i){return new hr(i)},getLocalStorage(){try{return window.localStorage}catch{return}},createXHR(){return this.getXHRAPI()?this.createXMLHttpRequest():this.createMicrosoftXHR()},createXMLHttpRequest(){var i=this.getXHRAPI();return new i},createMicrosoftXHR(){return new ActiveXObject("Microsoft.XMLHTTP")},getNetwork(){return Rr},createWebSocket(i){var e=this.getWebSocketAPI();return new e(i)},createSocketRequest(i,e){if(this.isXHRSupported())return this.HTTPFactory.createXHR(i,e);if(this.isXDRSupported(e.indexOf("https:")===0))return this.HTTPFactory.createXDR(i,e);throw"Cross-origin HTTP requests are not supported"},isXHRSupported(){var i=this.getXHRAPI();return!!i&&new i().withCredentials!==void 0},isXDRSupported(i){var e=i?"https:":"http:",n=this.getProtocol();return!!window.XDomainRequest&&n===e},addUnloadListener(i){window.addEventListener!==void 0?window.addEventListener("unload",i,!1):window.attachEvent!==void 0&&window.attachEvent("onunload",i)},removeUnloadListener(i){window.addEventListener!==void 0?window.removeEventListener("unload",i,!1):window.detachEvent!==void 0&&window.detachEvent("onunload",i)},randomInt(i){return Math.floor(function(){return(window.crypto||window.msCrypto).getRandomValues(new Uint32Array(1))[0]/Math.pow(2,32)}()*i)}},O=yi,Ke;(function(i){i[i.ERROR=3]="ERROR",i[i.INFO=6]="INFO",i[i.DEBUG=7]="DEBUG"})(Ke||(Ke={}));var Pe=Ke;class wi{constructor(e,n,c){this.key=e,this.session=n,this.events=[],this.options=c||{},this.sent=0,this.uniqueID=0}log(e,n){e<=this.options.level&&(this.events.push(J({},n,{timestamp:M.now()})),this.options.limit&&this.events.length>this.options.limit&&this.events.shift())}error(e){this.log(Pe.ERROR,e)}info(e){this.log(Pe.INFO,e)}debug(e){this.log(Pe.DEBUG,e)}isEmpty(){return this.events.length===0}send(e,n){var c=J({session:this.session,bundle:this.sent+1,key:this.key,lib:"js",version:this.options.version,cluster:this.options.cluster,features:this.options.features,timeline:this.events},this.options.params);return this.events=[],e(c,(h,b)=>{h||this.sent++,n&&n(h,b)}),!0}generateUniqueID(){return this.uniqueID++,this.uniqueID}}class _i{constructor(e,n,c,h){this.name=e,this.priority=n,this.transport=c,this.options=h||{}}isSupported(){return this.transport.isSupported({useTLS:this.options.useTLS})}connect(e,n){if(this.isSupported()){if(this.priority<e)return Bt(new R,n)}else return Bt(new G,n);var c=!1,h=this.transport.createConnection(this.name,this.priority,this.options.key,this.options),b=null,k=function(){h.unbind("initialized",k),h.connect()},E=function(){b=te.createHandshake(h,function(U){c=!0,L(),n(null,U)})},x=function(U){L(),n(U)},N=function(){L();var U;U=Ce(h),n(new j(U))},L=function(){h.unbind("initialized",k),h.unbind("open",E),h.unbind("error",x),h.unbind("closed",N)};return h.bind("initialized",k),h.bind("open",E),h.bind("error",x),h.bind("closed",N),h.initialize(),{abort:()=>{c||(L(),b?b.close():h.close())},forceMinPriority:U=>{c||this.priority<U&&(b?b.close():h.close())}}}}function Bt(i,e){return M.defer(function(){e(i)}),{abort:function(){},forceMinPriority:function(){}}}const{Transports:Si}=O;var ki=function(i,e,n,c,h,b){var k=Si[n];if(!k)throw new z(n);var E=(!i.enabledTransports||kt(i.enabledTransports,e)!==-1)&&(!i.disabledTransports||kt(i.disabledTransports,e)===-1),x;return E?(h=Object.assign({ignoreNullOrigin:i.ignoreNullOrigin},h),x=new _i(e,c,b?b.getAssistant(k):k,h)):x=Ci,x},Ci={isSupported:function(){return!1},connect:function(i,e){var n=M.defer(function(){e(new G)});return{abort:function(){n.ensureAborted()},forceMinPriority:function(){}}}};function Ti(i){if(i==null)throw"You must pass an options object";if(i.cluster==null)throw"Options object must provide a cluster";"disableStats"in i&&I.warn("The disableStats option is deprecated in favor of enableStats")}const Ei=(i,e)=>{var n="socket_id="+encodeURIComponent(i.socketId);for(var c in e.params)n+="&"+encodeURIComponent(c)+"="+encodeURIComponent(e.params[c]);if(e.paramsProvider!=null){let h=e.paramsProvider();for(var c in h)n+="&"+encodeURIComponent(c)+"="+encodeURIComponent(h[c])}return n};var Pi=i=>{if(typeof O.getAuthorizers()[i.transport]>"u")throw`'${i.transport}' is not a recognized auth transport`;return(e,n)=>{const c=Ei(e,i);O.getAuthorizers()[i.transport](O,c,i,d.UserAuthentication,n)}};const xi=(i,e)=>{var n="socket_id="+encodeURIComponent(i.socketId);n+="&channel_name="+encodeURIComponent(i.channelName);for(var c in e.params)n+="&"+encodeURIComponent(c)+"="+encodeURIComponent(e.params[c]);if(e.paramsProvider!=null){let h=e.paramsProvider();for(var c in h)n+="&"+encodeURIComponent(c)+"="+encodeURIComponent(h[c])}return n};var Oi=i=>{if(typeof O.getAuthorizers()[i.transport]>"u")throw`'${i.transport}' is not a recognized auth transport`;return(e,n)=>{const c=xi(e,i);O.getAuthorizers()[i.transport](O,c,i,d.ChannelAuthorization,n)}};const Ri=(i,e,n)=>{const c={authTransport:e.transport,authEndpoint:e.endpoint,auth:{params:e.params,headers:e.headers}};return(h,b)=>{const k=i.channel(h.channelName);n(k,c).authorize(h.socketId,b)}};function Ht(i,e){let n={activityTimeout:i.activityTimeout||g.activityTimeout,cluster:i.cluster,httpPath:i.httpPath||g.httpPath,httpPort:i.httpPort||g.httpPort,httpsPort:i.httpsPort||g.httpsPort,pongTimeout:i.pongTimeout||g.pongTimeout,statsHost:i.statsHost||g.stats_host,unavailableTimeout:i.unavailableTimeout||g.unavailableTimeout,wsPath:i.wsPath||g.wsPath,wsPort:i.wsPort||g.wsPort,wssPort:i.wssPort||g.wssPort,enableStats:ji(i),httpHost:Ai(i),useTLS:Ii(i),wsHost:Ni(i),userAuthenticator:Ui(i),channelAuthorizer:Di(i,e)};return"disabledTransports"in i&&(n.disabledTransports=i.disabledTransports),"enabledTransports"in i&&(n.enabledTransports=i.enabledTransports),"ignoreNullOrigin"in i&&(n.ignoreNullOrigin=i.ignoreNullOrigin),"timelineParams"in i&&(n.timelineParams=i.timelineParams),"nacl"in i&&(n.nacl=i.nacl),n}function Ai(i){return i.httpHost?i.httpHost:i.cluster?`sockjs-${i.cluster}.pusher.com`:g.httpHost}function Ni(i){return i.wsHost?i.wsHost:Li(i.cluster)}function Li(i){return`ws-${i}.pusher.com`}function Ii(i){return O.getProtocol()==="https:"?!0:i.forceTLS!==!1}function ji(i){return"enableStats"in i?i.enableStats:"disableStats"in i?!i.disableStats:!1}const Mt=i=>"customHandler"in i&&i.customHandler!=null;function Ui(i){const e=Object.assign(Object.assign({},g.userAuthentication),i.userAuthentication);return Mt(e)?e.customHandler:Pi(e)}function Fi(i,e){let n;if("channelAuthorization"in i)n=Object.assign(Object.assign({},g.channelAuthorization),i.channelAuthorization);else if(n={transport:i.authTransport||g.authTransport,endpoint:i.authEndpoint||g.authEndpoint},"auth"in i&&("params"in i.auth&&(n.params=i.auth.params),"headers"in i.auth&&(n.headers=i.auth.headers)),"authorizer"in i)return{customHandler:Ri(e,n,i.authorizer)};return n}function Di(i,e){const n=Fi(i,e);return Mt(n)?n.customHandler:Oi(n)}class qi extends ee{constructor(e){super(function(n,c){I.debug(`No callbacks on watchlist events for ${n}`)}),this.pusher=e,this.bindWatchlistInternalEvent()}handleEvent(e){e.data.events.forEach(n=>{this.emit(n.name,n)})}bindWatchlistInternalEvent(){this.pusher.connection.bind("message",e=>{var n=e.event;n==="pusher_internal:watchlist_events"&&this.handleEvent(e)})}}function Bi(){let i,e;return{promise:new Promise((c,h)=>{i=c,e=h}),resolve:i,reject:e}}var Hi=Bi;class Mi extends ee{constructor(e){super(function(n,c){I.debug("No callbacks on user for "+n)}),this.signin_requested=!1,this.user_data=null,this.serverToUserChannel=null,this.signinDonePromise=null,this._signinDoneResolve=null,this._onAuthorize=(n,c)=>{if(n){I.warn(`Error during signin: ${n}`),this._cleanup();return}this.pusher.send_event("pusher:signin",{auth:c.auth,user_data:c.user_data})},this.pusher=e,this.pusher.connection.bind("state_change",({previous:n,current:c})=>{n!=="connected"&&c==="connected"&&this._signin(),n==="connected"&&c!=="connected"&&(this._cleanup(),this._newSigninPromiseIfNeeded())}),this.watchlist=new qi(e),this.pusher.connection.bind("message",n=>{var c=n.event;c==="pusher:signin_success"&&this._onSigninSuccess(n.data),this.serverToUserChannel&&this.serverToUserChannel.name===n.channel&&this.serverToUserChannel.handleEvent(n)})}signin(){this.signin_requested||(this.signin_requested=!0,this._signin())}_signin(){this.signin_requested&&(this._newSigninPromiseIfNeeded(),this.pusher.connection.state==="connected"&&this.pusher.config.userAuthenticator({socketId:this.pusher.connection.socket_id},this._onAuthorize))}_onSigninSuccess(e){try{this.user_data=JSON.parse(e.user_data)}catch{I.error(`Failed parsing user data after signin: ${e.user_data}`),this._cleanup();return}if(typeof this.user_data.id!="string"||this.user_data.id===""){I.error(`user_data doesn't contain an id. user_data: ${this.user_data}`),this._cleanup();return}this._signinDoneResolve(),this._subscribeChannels()}_subscribeChannels(){const e=n=>{n.subscriptionPending&&n.subscriptionCancelled?n.reinstateSubscription():!n.subscriptionPending&&this.pusher.connection.state==="connected"&&n.subscribe()};this.serverToUserChannel=new $e(`#server-to-user-${this.user_data.id}`,this.pusher),this.serverToUserChannel.bind_global((n,c)=>{n.indexOf("pusher_internal:")===0||n.indexOf("pusher:")===0||this.emit(n,c)}),e(this.serverToUserChannel)}_cleanup(){this.user_data=null,this.serverToUserChannel&&(this.serverToUserChannel.unbind_all(),this.serverToUserChannel.disconnect(),this.serverToUserChannel=null),this.signin_requested&&this._signinDoneResolve()}_newSigninPromiseIfNeeded(){if(!this.signin_requested||this.signinDonePromise&&!this.signinDonePromise.done)return;const{promise:e,resolve:n,reject:c}=Hi();e.done=!1;const h=()=>{e.done=!0};e.then(h).catch(h),this.signinDonePromise=e,this._signinDoneResolve=n}}class q{static ready(){q.isReady=!0;for(var e=0,n=q.instances.length;e<n;e++)q.instances[e].connect()}static getClientFeatures(){return Ct(Pt({ws:O.Transports.ws},function(e){return e.isSupported({})}))}constructor(e,n){zi(e),Ti(n),this.key=e,this.options=n,this.config=Ht(this.options,this),this.channels=te.createChannels(),this.global_emitter=new ee,this.sessionID=O.randomInt(1e9),this.timeline=new wi(this.key,this.sessionID,{cluster:this.config.cluster,features:q.getClientFeatures(),params:this.config.timelineParams||{},limit:50,level:Pe.INFO,version:g.VERSION}),this.config.enableStats&&(this.timelineSender=te.createTimelineSender(this.timeline,{host:this.config.statsHost,path:"/timeline/v2/"+O.TimelineTransport.name}));var c=h=>O.getDefaultStrategy(this.config,h,ki);this.connection=te.createConnectionManager(this.key,{getStrategy:c,timeline:this.timeline,activityTimeout:this.config.activityTimeout,pongTimeout:this.config.pongTimeout,unavailableTimeout:this.config.unavailableTimeout,useTLS:!!this.config.useTLS}),this.connection.bind("connected",()=>{this.subscribeAll(),this.timelineSender&&this.timelineSender.send(this.connection.isUsingTLS())}),this.connection.bind("message",h=>{var b=h.event,k=b.indexOf("pusher_internal:")===0;if(h.channel){var E=this.channel(h.channel);E&&E.handleEvent(h)}k||this.global_emitter.emit(h.event,h.data)}),this.connection.bind("connecting",()=>{this.channels.disconnect()}),this.connection.bind("disconnected",()=>{this.channels.disconnect()}),this.connection.bind("error",h=>{I.warn(h)}),q.instances.push(this),this.timeline.info({instances:q.instances.length}),this.user=new Mi(this),q.isReady&&this.connect()}switchCluster(e){const{appKey:n,cluster:c}=e;this.key=n,this.options=Object.assign(Object.assign({},this.options),{cluster:c}),this.config=Ht(this.options,this),this.connection.switchCluster(this.key)}channel(e){return this.channels.find(e)}allChannels(){return this.channels.all()}connect(){if(this.connection.connect(),this.timelineSender&&!this.timelineSenderTimer){var e=this.connection.isUsingTLS(),n=this.timelineSender;this.timelineSenderTimer=new Yn(6e4,function(){n.send(e)})}}disconnect(){this.connection.disconnect(),this.timelineSenderTimer&&(this.timelineSenderTimer.ensureAborted(),this.timelineSenderTimer=null)}bind(e,n,c){return this.global_emitter.bind(e,n,c),this}unbind(e,n,c){return this.global_emitter.unbind(e,n,c),this}bind_global(e){return this.global_emitter.bind_global(e),this}unbind_global(e){return this.global_emitter.unbind_global(e),this}unbind_all(e){return this.global_emitter.unbind_all(),this}subscribeAll(){var e;for(e in this.channels.channels)this.channels.channels.hasOwnProperty(e)&&this.subscribe(e)}subscribe(e){var n=this.channels.add(e,this);return n.subscriptionPending&&n.subscriptionCancelled?n.reinstateSubscription():!n.subscriptionPending&&this.connection.state==="connected"&&n.subscribe(),n}unsubscribe(e){var n=this.channels.find(e);n&&n.subscriptionPending?n.cancelSubscription():(n=this.channels.remove(e),n&&n.subscribed&&n.unsubscribe())}send_event(e,n,c){return this.connection.send_event(e,n,c)}shouldUseTLS(){return this.config.useTLS}signin(){this.user.signin()}}q.instances=[],q.isReady=!1,q.logToConsole=!1,q.Runtime=O,q.ScriptReceivers=O.ScriptReceivers,q.DependenciesReceivers=O.DependenciesReceivers,q.auth_callbacks=O.auth_callbacks;var Qe=o.default=q;function zi(i){if(i==null)throw"You must pass your app key when you instantiate Pusher."}O.setup(q)}])})})(Mn);var xo=Mn.exports;const Wo=Hn(xo);var zn={exports:{}},it={exports:{}},fn;function Oo(){return fn||(fn=1,function(t,r){(function(s,o){t.exports=o()})(Bn,function(){function s(d){return!isNaN(parseFloat(d))&&isFinite(d)}function o(d){return d.charAt(0).toUpperCase()+d.substring(1)}function a(d){return function(){return this[d]}}var u=["isConstructor","isEval","isNative","isToplevel"],l=["columnNumber","lineNumber"],p=["fileName","functionName","source"],g=["args"],C=["evalOrigin"],m=u.concat(l,p,g,C);function f(d){if(d)for(var v=0;v<m.length;v++)d[m[v]]!==void 0&&this["set"+o(m[v])](d[m[v]])}f.prototype={getArgs:function(){return this.args},setArgs:function(d){if(Object.prototype.toString.call(d)!=="[object Array]")throw new TypeError("Args must be an Array");this.args=d},getEvalOrigin:function(){return this.evalOrigin},setEvalOrigin:function(d){if(d instanceof f)this.evalOrigin=d;else if(d instanceof Object)this.evalOrigin=new f(d);else throw new TypeError("Eval Origin must be an Object or StackFrame")},toString:function(){var d=this.getFileName()||"",v=this.getLineNumber()||"",_=this.getColumnNumber()||"",P=this.getFunctionName()||"";return this.getIsEval()?d?"[eval] ("+d+":"+v+":"+_+")":"[eval]:"+v+":"+_:P?P+" ("+d+":"+v+":"+_+")":d+":"+v+":"+_}},f.fromString=function(v){var _=v.indexOf("("),P=v.lastIndexOf(")"),R=v.substring(0,_),j=v.substring(_+1,P).split(","),D=v.substring(P+1);if(D.indexOf("@")===0)var z=/@(.+?)(?::(\d+))?(?::(\d+))?$/.exec(D,""),G=z[1],$=z[2],K=z[3];return new f({functionName:R,args:j||void 0,fileName:G,lineNumber:$||void 0,columnNumber:K||void 0})};for(var S=0;S<u.length;S++)f.prototype["get"+o(u[S])]=a(u[S]),f.prototype["set"+o(u[S])]=function(d){return function(v){this[d]=!!v}}(u[S]);for(var T=0;T<l.length;T++)f.prototype["get"+o(l[T])]=a(l[T]),f.prototype["set"+o(l[T])]=function(d){return function(v){if(!s(v))throw new TypeError(d+" must be a Number");this[d]=Number(v)}}(l[T]);for(var w=0;w<p.length;w++)f.prototype["get"+o(p[w])]=a(p[w]),f.prototype["set"+o(p[w])]=function(d){return function(v){this[d]=String(v)}}(p[w]);return f})}(it)),it.exports}(function(t,r){(function(s,o){t.exports=o(Oo())})(Bn,function(o){var a=/(^|@)\S+:\d+/,u=/^\s*at .*(\S+:\d+|\(native\))/m,l=/^(eval@)?(\[native code])?$/;return{parse:function(g){if(typeof g.stacktrace<"u"||typeof g["opera#sourceloc"]<"u")return this.parseOpera(g);if(g.stack&&g.stack.match(u))return this.parseV8OrIE(g);if(g.stack)return this.parseFFOrSafari(g);throw new Error("Cannot parse given Error object")},extractLocation:function(g){if(g.indexOf(":")===-1)return[g];var C=/(.+?)(?::(\d+))?(?::(\d+))?$/,m=C.exec(g.replace(/[()]/g,""));return[m[1],m[2]||void 0,m[3]||void 0]},parseV8OrIE:function(g){var C=g.stack.split(`
`).filter(function(m){return!!m.match(u)},this);return C.map(function(m){m.indexOf("(eval ")>-1&&(m=m.replace(/eval code/g,"eval").replace(/(\(eval at [^()]*)|(,.*$)/g,""));var f=m.replace(/^\s+/,"").replace(/\(eval code/g,"(").replace(/^.*?\s+/,""),S=f.match(/ (\(.+\)$)/);f=S?f.replace(S[0],""):f;var T=this.extractLocation(S?S[1]:f),w=S&&f||void 0,d=["eval","<anonymous>"].indexOf(T[0])>-1?void 0:T[0];return new o({functionName:w,fileName:d,lineNumber:T[1],columnNumber:T[2],source:m})},this)},parseFFOrSafari:function(g){var C=g.stack.split(`
`).filter(function(m){return!m.match(l)},this);return C.map(function(m){if(m.indexOf(" > eval")>-1&&(m=m.replace(/ line (\d+)(?: > eval line \d+)* > eval:\d+:\d+/g,":$1")),m.indexOf("@")===-1&&m.indexOf(":")===-1)return new o({functionName:m});var f=/((.*".+"[^@]*)?[^@]*)(?:@)/,S=m.match(f),T=S&&S[1]?S[1]:void 0,w=this.extractLocation(m.replace(f,""));return new o({functionName:T,fileName:w[0],lineNumber:w[1],columnNumber:w[2],source:m})},this)},parseOpera:function(g){return!g.stacktrace||g.message.indexOf(`
`)>-1&&g.message.split(`
`).length>g.stacktrace.split(`
`).length?this.parseOpera9(g):g.stack?this.parseOpera11(g):this.parseOpera10(g)},parseOpera9:function(g){for(var C=/Line (\d+).*script (?:in )?(\S+)/i,m=g.message.split(`
`),f=[],S=2,T=m.length;S<T;S+=2){var w=C.exec(m[S]);w&&f.push(new o({fileName:w[2],lineNumber:w[1],source:m[S]}))}return f},parseOpera10:function(g){for(var C=/Line (\d+).*script (?:in )?(\S+)(?:: In function (\S+))?$/i,m=g.stacktrace.split(`
`),f=[],S=0,T=m.length;S<T;S+=2){var w=C.exec(m[S]);w&&f.push(new o({functionName:w[3]||void 0,fileName:w[2],lineNumber:w[1],source:m[S]}))}return f},parseOpera11:function(g){var C=g.stack.split(`
`).filter(function(m){return!!m.match(a)&&!m.match(/^Error created at/)},this);return C.map(function(m){var f=m.split("@"),S=this.extractLocation(f.pop()),T=f.shift()||"",w=T.replace(/<anonymous function(: (\w+))?>/,"$2").replace(/\([^)]*\)/g,"")||void 0,d;T.match(/\(([^)]*)\)/)&&(d=T.replace(/^[^(]+\(([^)]*)\)$/,"$1"));var v=d===void 0||d==="[arguments not available]"?void 0:d.split(",");return new o({functionName:w,args:v,fileName:S[0],lineNumber:S[1],columnNumber:S[2],source:m})},this)}}})})(zn);var Ro=zn.exports;const Ao=Hn(Ro);var he={clientVersion:'"1.0.1"',flareJsKey:"7964eF7ZBNMrtV8R75d8dMducvveXmcb",sourcemapVersion:"1b838c6e-1bce-4470-af01-6a3e464ff209"};function se(t,r,s){return s&&!t&&console.error(`Flare JavaScript client v${he.clientVersion}: ${r}`),!!t}function No(t){let r=[];const s=JSON.stringify(t,function(o,a){if(typeof a=="object"&&a!==null){if(r.indexOf(a)!==-1)try{return JSON.parse(JSON.stringify(a))}catch{return}r.push(a)}return a});return r=null,s}function st(){return Math.round(Date.now()/1e3)}function Lo(t){return t.reduce((r,s)=>r.concat(s),[])}function Io(){return window.document.cookie?{cookies:window.document.cookie.split("; ").reduce((t,r)=>{const[s,o]=r.split(/=/);return t[s]=o,t},{})}:{}}function jo(){return{request:{url:window.document.location.href,useragent:window.navigator.userAgent,referrer:window.document.referrer,readyState:window.document.readyState}}}function Uo(){if(!window.location.search)return{};const t={};return new URLSearchParams(window.location.search).forEach((r,s)=>{t[s]=r}),{request_data:{queryString:t}}}function dn(t){return typeof window>"u"?t:{...Io(),...jo(),...Uo(),...t}}var pn={};function Fo(t,r,s){return new Promise(o=>{if(!t||!r)return o({codeSnippet:{0:`Could not read from file: missing file URL or line number. URL: ${t} lineNumber: ${r}`},trimmedColumnNumber:null});Do(t).then(a=>o(a?qo(a,r,s):{codeSnippet:{0:`Could not read from file: Error while opening file at URL ${t}`},trimmedColumnNumber:null}))})}function Do(t){return pn[t]?Promise.resolve(pn[t]):fetch(t).then(r=>r.status!==200?null:r.text()).catch(()=>null)}function qo(t,r,s,o=1e3,a=40){const u={};let l=null;const p=t.split(`
`);for(let g=-a/2;g<=a/2;g++){const C=r+g;if(C>=0&&p[C]){const m=C+1;if(p[C].length>o){if(s&&s+o/2>o){u[m]=p[C].substr(s-Math.round(o/2),o),m===r&&(l=Math.round(o/2));continue}u[m]=p[C].substr(0,o)+"…";continue}u[m]=p[C]}}return{codeSnippet:u,trimmedColumnNumber:l}}function mn(t){return new Promise(r=>{if(!Bo(t))return se(!1,"Couldn't generate stacktrace of below error:",dt.debug),dt.debug&&console.error(t),r([{line_number:0,column_number:0,method:"unknown",file:"unknown",code_snippet:{0:"Could not read from file: stacktrace missing"},trimmed_column_number:null,class:"unknown"}]);Promise.all(Ao.parse(t).map(s=>new Promise(o=>{Fo(s.fileName,s.lineNumber,s.columnNumber).then(a=>{o({line_number:s.lineNumber||1,column_number:s.columnNumber||1,method:s.functionName||"Anonymous or unknown function",file:s.fileName||"Unknown file",code_snippet:a.codeSnippet,trimmed_column_number:a.trimmedColumnNumber,class:""})})}))).then(r)})}function Bo(t){return!!t&&(!!t.stack||!!t.stacktrace||!!t["opera#sourceloc"])&&typeof(t.stack||t.stacktrace||t["opera#sourceloc"])=="string"&&t.stack!==`${t.name}: ${t.message}`}function Ho(t,r,s={}){return new Promise(o=>{const a=t.reduce((u,l)=>(u.push(Promise.resolve(l.canSolve(r,s))),u),[]);Promise.all(a).then(u=>{const l=[];u.forEach((p,g)=>{p&&l.push(Promise.resolve(t[g].getSolutions(r,s)))}),Promise.all(l).then(p=>{o(Lo(p))})})})}var Mo=class{constructor(){this.version=he.clientVersion,this.config={key:"",reportingUrl:"https://reporting.flareapp.io/api/reports",maxGlowsPerReport:30,maxReportsPerMinute:500},this.glows=[],this.context={context:{}},this.beforeEvaluate=t=>t,this.beforeSubmit=t=>t,this.reportedErrorsTimestamps=[],this.solutionProviders=[],this.sourcemapVersion=he.sourcemapVersion,this.debug=!1,this.stage=void 0}light(t=he.flareJsKey,r=!1){return this.debug=r,!se(t&&typeof t=="string","An empty or incorrect Flare key was passed, errors will not be reported.",this.debug)||!se(Promise,"ES6 promises are not supported in this environment, errors will not be reported.",this.debug)?this:(this.config.key=t,this)}glow(t,r="info",s=[]){const o=st();return this.glows.push({name:t,message_level:r,meta_data:s,time:o,microtime:o}),this.glows.length>this.config.maxGlowsPerReport&&(this.glows=this.glows.slice(this.glows.length-this.config.maxGlowsPerReport)),this}addContext(t,r){return this.context.context[t]=r,this}addContextGroup(t,r){return this.context[t]=r,this}registerSolutionProvider(t){return!se("canSolve"in t,"A solution provider without a [canSolve] property was added.",this.debug)||!se("getSolutions"in t,"A solution provider without a [getSolutions] property was added.",this.debug)?this:(this.solutionProviders.push(t),this)}reportMessage(t,r={},s="Log"){const o=st();mn(Error()).then(a=>{a.shift();const u={notifier:`Flare JavaScript client v${he.clientVersion}`,exception_class:s,seen_at:o,message:t,language:"javascript",glows:this.glows,context:dn({...r,...this.context}),stacktrace:a,sourcemap_version_id:this.sourcemapVersion,solutions:[],stage:this.stage};this.sendReport(u)})}report(t,r={},s={}){Promise.resolve(this.beforeEvaluate(t)).then(o=>{o&&this.createReport(t,r,s).then(a=>a?this.sendReport(a):{})})}createReport(t,r={},s={}){if(!se(t,"No error provided.",this.debug))return Promise.resolve(!1);const o=st();return Promise.all([Ho(this.solutionProviders,t,s),mn(t)]).then(a=>{const[u,l]=a;return se(l.length,"Couldn't generate stacktrace of this error: "+t,this.debug),{notifier:`Flare JavaScript client v${he.clientVersion}`,exception_class:t.constructor&&t.constructor.name?t.constructor.name:"undefined",seen_at:o,message:t.message,language:"javascript",glows:this.glows,context:dn({...r,...this.context}),stacktrace:l,sourcemap_version_id:this.sourcemapVersion,solutions:u,stage:this.stage}})}sendReport(t){se(this.config.key,"The client was not yet initialised with an API key. Run client.light('<flare-project-key>') when you initialise your app. If you are running in dev mode and didn't run the light command on purpose, you can ignore this error.",this.debug)&&(this.maxReportsPerMinuteReached()||Promise.resolve(this.beforeSubmit(t)).then(r=>{r&&(fetch(this.config.reportingUrl,{method:"POST",headers:{"Content-Type":"application/json","X-Requested-With":"XMLHttpRequest","x-api-token":this.config.key},body:No({...r,key:this.config.key})}).then(s=>{s.status!==204&&console.error(`Received response with status ${s.status} from Flare`)},s=>console.error(s)),this.reportedErrorsTimestamps.push(Date.now()))}))}maxReportsPerMinuteReached(){return this.reportedErrorsTimestamps.length>=this.config.maxReportsPerMinute&&this.reportedErrorsTimestamps[this.reportedErrorsTimestamps.length-this.config.maxReportsPerMinute]>Date.now()-60*1e3}test(){return this.report(new Error("The Flare client is set up correctly!")),this}};function zo(){if(typeof window>"u")return;const t=window.flare;if(!window||!t)return;const r=window.onerror,s=window.onunhandledrejection;window.onerror=(o,a,u,l,p)=>{p&&t.report(p),typeof r=="function"&&r(o,a,u,l,p)},window.onunhandledrejection=o=>{o.reason instanceof Error&&t.report(o.reason),typeof s=="function"&&s(o)}}var dt=new Mo;typeof window<"u"&&window&&(window.flare=dt);zo();export{Vo as E,Wo as P,Xo as a,Bn as c,dt as f,Hn as g};
