1"use strict";(self.webpackChunk_moskitcrm_moskit_app=self.webpackChunk_moskitcrm_moskit_app||[]).push([[1953],{69220:function(t,e,s){var n=this&&this.__createBinding||(Object.create?function(t,e,s,n){void 0===n&&(n=s);var i=Object.getOwnPropertyDescriptor(e,s);i&&!("get"in i?!e.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return e[s]}}),Object.defineProperty(t,n,i)}:function(t,e,s,n){void 0===n&&(n=s),t[n]=e[s]}),i=this&&this.__exportStar||function(t,e){for(var s in t)"default"===s||Object.prototype.hasOwnProperty.call(e,s)||n(e,t,s)};Object.defineProperty(e,"__esModule",{value:!0}),e.Allow=e.MalformedJSON=e.PartialJSON=e.parseJSON=e.parse=void 0;const o=s(24474);Object.defineProperty(e,"Allow",{enumerable:!0,get:function(){return o.Allow}}),i(s(24474),e);class r extends Error{}e.PartialJSON=r;class a extends Error{}function h(t,e=o.Allow.ALL){if("string"!=typeof t)throw new TypeError("expecting str, got "+typeof t);if(!t.trim())throw new Error(`${t} is empty`);return c(t.trim(),e)}e.MalformedJSON=a,e.parseJSON=h;const c=(t,e)=>{const s=t.length;let n=0;const i=t=>{throw new r(`${t} at position ${n}`)},h=t=>{throw new a(`${t} at position ${n}`)},c=()=>(p(),n>=s&&i("Unexpected end of input"),'"'===t[n]?l():"{"===t[n]?u():"["===t[n]?d():"null"===t.substring(n,n+4)||o.Allow.NULL&e&&s-n<4&&"null".startsWith(t.substring(n))?(n+=4,null):"true"===t.substring(n,n+4)||o.Allow.BOOL&e&&s-n<4&&"true".startsWith(t.substring(n))?(n+=4,!0):"false"===t.substring(n,n+5)||o.Allow.BOOL&e&&s-n<5&&"false".startsWith(t.substring(n))?(n+=5,!1):"Infinity"===t.substring(n,n+8)||o.Allow.INFINITY&e&&s-n<8&&"Infinity".startsWith(t.substring(n))?(n+=8,1/0):"-Infinity"===t.substring(n,n+9)||o.Allow._INFINITY&e&&1<s-n&&s-n<9&&"-Infinity".startsWith(t.substring(n))?(n+=9,-1/0):"NaN"===t.substring(n,n+3)||o.Allow.NAN&e&&s-n<3&&"NaN".startsWith(t.substring(n))?(n+=3,NaN):f()),l=()=>{const r=n;let a=!1;for(n++;n<s&&('"'!==t[n]||a&&"\\"===t[n-1]);)a="\\"===t[n]&&!a,n++;if('"'==t.charAt(n))try{return JSON.parse(t.substring(r,++n-Number(a)))}catch(t){h(String(t))}else if(o.Allow.STR&e)try{return JSON.parse(t.substring(r,n-Number(a))+'"')}catch(e){return JSON.parse(t.substring(r,t.lastIndexOf("\\"))+'"')}i("Unterminated string literal")},u=()=>{n++,p();const r={};try{for(;"}"!==t[n];){if(p(),n>=s&&o.Allow.OBJ&e)return r;const i=l();p(),n++;try{const t=c();r[i]=t}catch(t){if(o.Allow.OBJ&e)return r;throw t}p(),","===t[n]&&n++}}catch(t){if(o.Allow.OBJ&e)return r;i("Expected '}' at end of object")}return n++,r},d=()=>{n++;const s=[];try{for(;"]"!==t[n];)s.push(c()),p(),","===t[n]&&n++}catch(t){if(o.Allow.ARR&e)return s;i("Expected ']' at end of array")}return n++,s},f=()=>{if(0===n){"-"===t&&h("Not sure what '-' is");try{return JSON.parse(t)}catch(s){if(o.Allow.NUM&e)try{return JSON.parse(t.substring(0,t.lastIndexOf("e")))}catch(t){}h(String(s))}}const r=n;for("-"===t[n]&&n++;t[n]&&-1===",]}".indexOf(t[n]);)n++;n!=s||o.Allow.NUM&e||i("Unterminated number literal");try{return JSON.parse(t.substring(r,n))}catch(e){"-"===t.substring(r,n)&&i("Not sure what '-' is");try{return JSON.parse(t.substring(r,t.lastIndexOf("e")))}catch(t){h(String(t))}}},p=()=>{for(;n<s&&" \n\r\t".includes(t[n]);)n++};return c()},l=h;e.parse=l},24474:function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.Allow=e.ALL=e.COLLECTION=e.ATOM=e.SPECIAL=e.INF=e._INFINITY=e.INFINITY=e.NAN=e.BOOL=e.NULL=e.OBJ=e.ARR=e.NUM=e.STR=void 0,e.STR=1,e.NUM=2,e.ARR=4,e.OBJ=8,e.NULL=16,e.BOOL=32,e.NAN=64,e.INFINITY=128,e._INFINITY=256,e.INF=e.INFINITY|e._INFINITY,e.SPECIAL=e.NULL|e.BOOL|e.INF|e.NAN,e.ATOM=e.STR|e.NUM|e.SPECIAL,e.COLLECTION=e.ARR|e.OBJ,e.ALL=e.ATOM|e.COLLECTION,e.Allow={STR:e.STR,NUM:e.NUM,ARR:e.ARR,OBJ:e.OBJ,NULL:e.NULL,BOOL:e.BOOL,NAN:e.NAN,INFINITY:e.INFINITY,_INFINITY:e._INFINITY,INF:e.INF,SPECIAL:e.SPECIAL,ATOM:e.ATOM,COLLECTION:e.COLLECTION,ALL:e.ALL},e.default=e.Allow},38858:function(t,e,s){s.d(e,{yQ:function(){return j}});var n=t=>{if("function"==typeof t)return t;return function(){return t}},i="undefined"!=typeof self?self:null,o="undefined"!=typeof window?window:null,r=i||o||globalThis,a=0,h=1,c=2,l=3,u="closed",d="errored",f="joined",p="joining",g="leaving",b="phx_close",m="phx_error",y="phx_join",T="phx_reply",
1w="phx_leave",k="longpoll",v="websocket",C=4,E="base64url.bearer.phx.",L=class{constructor(t,e,s,n){this.channel=t,this.event=e,this.payload=s||function(){return{}},this.receivedResp=null,this.timeout=n,this.timeoutTimer=null,this.recHooks=[],this.sent=!1}resend(t){this.timeout=t,this.reset(),this.send()}send(){this.hasReceived("timeout")||(this.startTimeout(),this.sent=!0,this.channel.socket.push({topic:this.channel.topic,event:this.event,payload:this.payload(),ref:this.ref,join_ref:this.channel.joinRef()}))}receive(t,e){return this.hasReceived(t)&&e(this.receivedResp.response),this.recHooks.push({status:t,callback:e}),this}reset(){this.cancelRefEvent(),this.ref=null,this.refEvent=null,this.receivedResp=null,this.sent=!1}matchReceive({status:t,response:e,_ref:s}){this.recHooks.filter(e=>e.status===t).forEach(t=>t.callback(e))}cancelRefEvent(){this.refEvent&&this.channel.off(this.refEvent)}cancelTimeout(){clearTimeout(this.timeoutTimer),this.timeoutTimer=null}startTimeout(){this.timeoutTimer&&this.cancelTimeout(),this.cancelRefEvent(),this.ref=this.channel.socket.makeRef(),this.refEvent=this.channel.replyEventName(this.ref),this.channel.on(this.refEvent,t=>{this.cancelRefEvent(),this.cancelTimeout(),this.receivedResp=t,this.matchReceive(t)}),this.timeoutTimer=setTimeout(()=>{this.trigger("timeout",{})},this.timeout)}hasReceived(t){return this.receivedResp&&this.receivedResp.status===t}trigger(t,e){this.channel.trigger(this.refEvent,{status:t,response:e})}},N=class{constructor(t,e){this.callback=t,this.timerCalc=e,this.timer=null,this.tries=0}reset(){this.tries=0,clearTimeout(this.timer)}scheduleTimeout(){clearTimeout(this.timer),this.timer=setTimeout(()=>{this.tries=this.tries+1,this.callback()},this.timerCalc(this.tries+1))}},R=class{constructor(t,e,s){this.state=u,this.topic=t,this.params=n(e||{}),this.socket=s,this.bindings=[],this.bindingRef=0,this.timeout=this.socket.timeout,this.joinedOnce=!1,this.joinPush=new L(this,y,this.params,this.timeout),this.pushBuffer=[],this.stateChangeRefs=[],this.rejoinTimer=new N(()=>{this.socket.isConnected()&&this.rejoin()},this.socket.rejoinAfterMs),this.stateChangeRefs.push(this.socket.onError(()=>this.rejoinTimer.reset())),this.stateChangeRefs.push(this.socket.onOpen(()=>{this.rejoinTimer.reset(),this.isErrored()&&this.rejoin()})),this.joinPush.receive("ok",()=>{this.state=f,this.rejoinTimer.reset(),this.pushBuffer.forEach(t=>t.send()),this.pushBuffer=[]}),this.joinPush.receive("error",()=>{this.state=d,this.socket.isConnected()&&this.rejoinTimer.scheduleTimeout()}),this.onClose(()=>{this.rejoinTimer.reset(),this.socket.hasLogger()&&this.socket.log("channel",`close ${this.topic} ${this.joinRef()}`),this.state=u,this.socket.remove(this)}),this.onError(t=>{this.socket.hasLogger()&&this.socket.log("channel",`error ${this.topic}`,t),this.isJoining()&&this.joinPush.reset(),this.state=d,this.socket.isConnected()&&this.rejoinTimer.scheduleTimeout()}),this.joinPush.receive("timeout",()=>{this.socket.hasLogger()&&this.socket.log("channel",`timeout ${this.topic} (${this.joinRef()})`,this.joinPush.timeout),new L(this,w,n({}),this.timeout).send(),this.state=d,this.joinPush.reset(),this.socket.isConnected()&&this.rejoinTimer.scheduleTimeout()}),this.on(T,(t,e)=>{this.trigger(this.replyEventName(e),t)})}join(t=this.timeout){if(this.joinedOnce)throw new Error("tried to join multiple times. 'join' can only be called a single time per channel instance");return this.timeout=t,this.joinedOnce=!0,this.rejoin(),this.joinPush}onClose(t){this.on(b,t)}onError(t){return this.on(m,e=>t(e))}on(t,e){let s=this.bindingRef++;return this.bindings.push({event:t,ref:s,callback:e}),s}off(t,e){this.bindings=this.bindings.filter(s=>!(s.event===t&&(void 0===e||e===s.ref)))}canPush(){return this.socket.isConnected()&&this.isJoined()}push(t,e,s=this.timeout){if(e=e||{},!this.joinedOnce)throw new Error(`tried to push '${t}' to '${this.topic}' before joining. Use channel.join() before pushing events`);let n=new L(this,t,function(){return e},s);return this.canPush()?n.send():(n.startTimeout(),this.pushBuffer.push(n)),n}leave(t=this.timeout){this.rejoinTimer.reset(),this.joinPush.cancelTimeout(),this.state=g;let e=()=>{this.socket.hasLogger()&&this.socket.log("channel",`leave ${this.topic}`),this.trigger(b,"leave")},s=new L(this,w,n({}),t);return s.receive("ok",()=>e()).receive("timeout",()=>e()),s.send(),this.canPush()||s.trigger("ok",{}),s}onMessage(t,e,s){return e}isMember(t,e,s,n){return this.topic===t&&(!n||n===this.joinRef()||(this.socket.hasLogger()&&this.socket.log("channel","dropping outdated message",{topic:t,event:e,payload:s,joinRef:n}),!1))}joinRef(){return this.joinPush.ref}rejoin(t=this.timeout){this.isLeaving()||(this.socket.leaveOpenTopic(this.topic),this.state=p,this.joinPush.resend(t))}trigger(t,e,s,n){let i=this.onMessage(t,e,s,n);if(e&&!i)throw new Error("channel onMessage callbacks must return the payload, modified or unmodified");let o=this.bindings.filter(e=>e.event===t);for(let t=0;t<o.length;t++){o[t].callback(i,s,n||this.joinRef())}}replyEventName(t){return`chan_reply_${t}`}isClosed(){return this.state===u}isErrored(){return this.state===d}isJoined(){return this.state===f}isJoining(){return this.state===p}isLeaving(){return this.state===g}},O=class{static request(t,e,s,n,i,o,a){if(r.XDomainRequest){let s=new r.XDomainRequest;return this.xdomainRequest(s,t,e,n,i,o,a)}if(r.XMLHttpRequest){let h=new r.XMLHttpRequest;return this.xhrRequest(h,t,e,s,n,i,o,a)}if(r.fetch&&r.AbortController)return this.fetchRequest(t,e,s,n,i,o,a);throw new Error("No suitable XMLHttpRequest implementation found")}static fetchRequest(t,e,s,n,i,o,a){let h={method:t,headers:s,body:n},c=null,l=null;return i&&(c=new AbortController,l=setTimeout(()=>c.abort(),i),h.signal=c.signal),r.fetch(e,h).then(t=>t.text()).then(t=>this.parseJSON(t)).then(t=>{l&&clearTimeout(l),a&&a(t)}).catch(t=>{l&&clearTimeout(l),"AbortError"===t.name&&o?o():a&&a(null)}),c}static xdomainRequest(t,e,s,n,i,o,r){return t.timeout=i,t.open(e,s),t.onload=()=>{let e=this.parseJSON(t.responseText);r&&r(e)},o&&(t.ontimeout=o),t.onprogress=()=>{},t.send(n),t}static xhrRequest(t,e,s,n,i,o,r,a){t.open(e,s,!0),t.timeout=o;for(let[e,s]of Object.entries(n))t.setRequestHeader(e,s);return t.onerror=()=>a&&a(null),t.onreadystatechange=()=>{if(t.readyState===C&&a){let e=this.parseJSON(t.responseText);a(e)}},r&&(t.ontimeout=r),t.send(i),t}static parseJSON(t){if(!t||""===t)return null;try{return JSON.parse(t)}catch{return console&&console.log("failed to parse JSON response",t),null}}static serialize(t,e){let s=[];for(var n in t){if(!Object.prototype.hasOwnProperty.call(t,n))continue;let i=e?`${e}[${n}]`:n,o=t[n];"object"==typeof o?s.push(this.serialize(o,i)):s.push(encodeURIComponent(i)+"="+encodeURIComponent(o))}return s.join("&")}static appendParams(t,e){if(0===Object.keys(e).length)return t;let s=t.match(/\?/)?"&":"?";return`${t}${s}${this.serialize(e)}`}},A=class{constructor(t,e){e&&2===e.length&&e[1].startsWith(E)&&(this.authToken=atob(e[1].slice(21))),this.endPoint=null,this.token=null,this.skipHeartbeat=!0,this.reqs=new Set,this.awaitingBatchAck=!1,this.currentBatch=null,this.currentBatchTimer=null,this.batchBuffer=[],this.onopen=function(){},this.onerror=function(){},this.onmessage=function(){}
1,this.onclose=function(){},this.pollEndpoint=this.normalizeEndpoint(t),this.readyState=a,setTimeout(()=>this.poll(),0)}normalizeEndpoint(t){return t.replace("ws://","http://").replace("wss://","https://").replace(new RegExp("(.*)/"+v),"$1/"+k)}endpointURL(){return O.appendParams(this.pollEndpoint,{token:this.token})}closeAndRetry(t,e,s){this.close(t,e,s),this.readyState=a}ontimeout(){this.onerror("timeout"),this.closeAndRetry(1005,"timeout",!1)}isActive(){return this.readyState===h||this.readyState===a}poll(){const t={Accept:"application/json"};this.authToken&&(t["X-Phoenix-AuthToken"]=this.authToken),this.ajax("GET",t,null,()=>this.ontimeout(),t=>{if(t){var{status:e,token:s,messages:n}=t;if(410===e&&null!==this.token)return this.onerror(410),void this.closeAndRetry(3410,"session_gone",!1);this.token=s}else e=0;switch(e){case 200:n.forEach(t=>{setTimeout(()=>this.onmessage({data:t}),0)}),this.poll();break;case 204:this.poll();break;case 410:this.readyState=h,this.onopen({}),this.poll();break;case 403:this.onerror(403),this.close(1008,"forbidden",!1);break;
1case 0:case 500:this.onerror(500),this.closeAndRetry(1011,"internal server error",500);break;default:throw new Error(`unhandled poll status ${e}`)}})}send(t){"string"!=typeof t&&(t=(t=>{let e="",s=new Uint8Array(t),n=s.byteLength;for(let t=0;t<n;t++)e+=String.fromCharCode(s[t]);return btoa(e)})(t)),this.currentBatch?this.currentBatch.push(t):this.awaitingBatchAck?this.batchBuffer.push(t):(this.currentBatch=[t],this.currentBatchTimer=setTimeout(()=>{this.batchSend(this.currentBatch),this.currentBatch=null},0))}batchSend(t,e=0){this.awaitingBatchAck=!0;const s=e+100,n=t.slice(e,s);this.ajax("POST",{"Content-Type":"application/x-ndjson"},n.join("\n"),()=>this.ontimeout(),e=>{e&&200===e.status?s<t.length?this.batchSend(t,s):this.batchBuffer.length>0?(this.batchSend(this.batchBuffer),this.batchBuffer=[]):this.awaitingBatchAck=!1:(this.awaitingBatchAck=!1,this.onerror(e&&e.status),this.closeAndRetry(1011,"internal server error",!1))})}close(t,e,s){for(let t of this.reqs)t.abort();this.readyState=l;let n=Object.assign({code:1e3,reason:void 0,wasClean:!0},{code:t,reason:e,wasClean:s});this.batchBuffer=[],this.awaitingBatchAck=!1,clearTimeout(this.currentBatchTimer),this.currentBatchTimer=null,"undefined"!=typeof CloseEvent?this.onclose(new CloseEvent("close",n)):this.onclose(n)}ajax(t,e,s,n,i){let o;o=O.request(t,this.endpointURL(),e,s,this.timeout,()=>{this.reqs.delete(o),n()},t=>{this.reqs.delete(o),this.isActive()&&i(t)}),this.reqs.add(o)}},S={HEADER_LENGTH:1,META_LENGTH:4,KINDS:{push:0,reply:1,broadcast:2},encode(t,e){if(t.payload.constructor===ArrayBuffer)return e(this.binaryEncode(t));{let s=[t.join_ref,t.ref,t.topic,t.event,t.payload];return e(JSON.stringify(s))}},decode(t,e){if(t.constructor===ArrayBuffer)return e(this.binaryDecode(t));{let[s,n,i,o,r]=JSON.parse(t);return e({join_ref:s,ref:n,topic:i,event:o,payload:r})}},binaryEncode(t){let{join_ref:e,ref:s,event:n,topic:i,payload:o}=t,r=new TextEncoder,a=r.encode(e),h=r.encode(s),c=r.encode(i),l=r.encode(n);this.assertFieldSize(a.byteLength,"join_ref"),this.assertFieldSize(h.byteLength,"ref"),this.assertFieldSize(c.byteLength,"topic"),this.assertFieldSize(l.byteLength,"event");let u=this.META_LENGTH+a.byteLength+h.byteLength+c.byteLength+l.byteLength,d=new ArrayBuffer(this.HEADER_LENGTH+u),f=new Uint8Array(d),p=new DataView(d),g=0;p.setUint8(g++,this.KINDS.push),p.setUint8(g++,a.byteLength),p.setUint8(g++,h.byteLength),p.setUint8(g++,c.byteLength),p.setUint8(g++,l.byteLength),f.set(a,g),g+=a.byteLength,f.set(h,g),g+=h.b
1yteLength,f.set(c,g),g+=c.byteLength,f.set(l,g),g+=l.byteLength;var b=new Uint8Array(d.byteLength+o.byteLength);return b.set(f,0),b.set(new Uint8Array(o),d.byteLength),b.buffer},assertFieldSize(t,e){if(t>255)throw new Error(`unable to convert ${e} to binary: must be less than or equal to 255 bytes, but is ${t} bytes`)},binaryDecode(t){let e=new DataView(t),s=e.getUint8(0),n=new TextDecoder;switch(s){case this.KINDS.push:return this.decodePush(t,e,n);case this.KINDS.reply:return this.decodeReply(t,e,n);case this.KINDS.broadcast:return this.decodeBroadcast(t,e,n)}},decodePush(t,e,s){let n=e.getUint8(1),i=e.getUint8(2),o=e.getUint8(3),r=this.HEADER_LENGTH+this.META_LENGTH-1,a=s.decode(t.slice(r,r+n));r+=n;let h=s.decode(t.slice(r,r+i));r+=i;let c=s.decode(t.slice(r,r+o));return r+=o,{join_ref:a,ref:null,topic:h,event:c,payload:t.slice(r,t.byteLength)}},decodeReply(t,e,s){let n=e.getUint8(1),i=e.getUint8(2),o=e.getUint8(3),r=e.getUint8(4),a=this.HEADER_LENGTH+this.META_LENGTH,h=s.decode(t.slice(a,a+n));a+=n;let c=s.decode(t.slice(a,a+i));a+=i;let l=s.decode(t.slice(a,a+o));a+=o;let u=s.decode(t.slice(a,a+r));a+=r;let d=t.slice(a,t.byteLength);return{join_ref:h,ref:c,topic:l,event:T,payload:{status:u,response:d}}},decodeBroadcast(t,e,s){let n=e.getUint8(1),i=e.getUint8(2),o=this.HEADER_LENGTH+2,r=s.decode(t.slice(o,o+n));o+=n;let a=s.decode(t.slice(o,o+i));return o+=i,{join_ref:null,ref:null,topic:r,event:a,payload:t.slice(o,t.byteLength)}}},j=class{constructor(t,e={}){this.stateChangeCallbacks={open:[],close:[],error:[],message:[]},this.channels=[],this.sendBuffer=[],this.ref=0,this.fallbackRef=null,this.timeout=e.timeout||1e4,this.transport=e.transport||r.WebSocket||A,this.primaryPassedHealthCheck=!1,this.longPollFallbackMs=e.longPollFallbackMs,this.fallbackTimer=null,this.sessionStore=e.sessionStorage||r&&r.sessionStorage,this.establishedConnections=0,this.defaultEncoder=S.encode.bind(S),this.defaultDecoder=S.decode.bind(S),this.closeWasClean=!0,this.disconnecting=!1,this.binaryType=e.binaryType||"arraybuffer",this.connectClock=1,this.transport!==A?(this.encode=e.encode||this.defaultEncoder,this.decode=e.decode||this.defaultDecoder):(this.encode=this.defaultEncoder,this.decode=this.defaultDecoder);let s=null;o&&o.addEventListener&&(o.addEventListener("pagehide",t=>{this.conn&&(this.disconnect(),s=this.connectClock)}),o.addEventListener("pageshow",t=>{s===this.connectClock&&(s=null,this.connect())}),o.addEventListener("visibilitychange",()=>{this.handleVisibilityChange()}),o.document&&o.document.addEventListener("resume",()=>{this.handleVisibilityChange()})),this.heartbeatIntervalMs=e.heartbeatIntervalMs||3e4,this.rejoinAfterMs=t=>e.rejoinAfterMs?e.rejoinAfterMs(t):[1e3,2e3,5e3][t-1]||1e4,this.reconnectAfterMs=t=>e.reconnectAfterMs?e.reconnectAfterMs(t):[10,50,100,150,200,250,500,1e3,2e3][t-1]||5e3,this.logger=e.logger||null,!this.logger&&e.debug&&(this.logger=(t,e,s)=>{console.log(`${t}: ${e}`,s)}),this.longpollerTimeout=e.longpollerTimeout||2e4,this.params=n(e.params||{}),this.endPoint=`${t}/${v}`,this.vsn=e.vsn||"2.0.0",this.heartbeatTimeoutTimer=null,this.heartbeatTimer=null,this.pendingHeartbeatRef=null,this.reconnectTimer=new N(()=>{if(this.pageHidden)return this.log("Not reconnecting as page is hidden!"),void this.teardown();this.teardown(()=>this.connect())},this.reconnectAfterMs),this.authToken=e.authToken&&n(e.authToken)}get pageHidden(){return!(!o||!o.document)&&"hidden"===o.document.visibilityState}handleVisibilityChange(){this.pageHidden||this.isConnected()||this.closeWasClean||this.teardown(()=>this.connect())}getLongPollTransport(){return A}replaceTransport(t){this.connectClock++,this.closeWasClean=!0,clearTimeout(this.fallbackTimer),this.reconnectTimer.reset(),this.conn&&(this.conn.close(),this.conn=null),this.transport=t}protocol(){return location.protocol.match(/^https/)?"wss":"ws"}endPointURL(){let t=O.appendParams(O.appendParams(this.endPoint,this.params()),{vsn:this.vsn});return"/"!==t.charAt(0)?t:"/"===t.charAt(1)?`${this.protocol()}:${t}`:`${this.protocol()}://${location.host}${t}`}disconnect(t,e,s){this.connectClock++,this.disconnecting=!0,this.closeWasClean=!0,clearTimeout(this.fallbackTimer),this.reconnectTimer.reset(),this.teardown(()=>{this.disconnecting=!1,t&&t()},e,s)}connect(t){t&&(console&&console.log("passing params to connect is deprecated. Instead pass :params to the Socket constructor"),this.params=n(t)),this.conn&&!this.disconnecting||(this.longPollFallbackMs&&this.transport!==A?this.connectWithF
vendor: 4,274 bytes, line 1
1allback(A,this.longPollFallbackMs):this.transportConnect())}log(t,e,s){this.logger&&this.logger(t,e,s)}hasLogger(){return null!==this.logger}onOpen(t){let e=this.makeRef();return this.stateChangeCallbacks.open.push([e,t]),e}onClose(t){let e=this.makeRef();return this.stateChangeCallbacks.close.push([e,t]),e}onError(t){let e=this.makeRef();return this.stateChangeCallbacks.error.push([e,t]),e}onMessage(t){let e=this.makeRef();return this.stateChangeCallbacks.message.push([e,t]),e}ping(t){if(!this.isConnected())return!1;let e=this.makeRef(),s=Date.now();this.push({topic:"phoenix",event:"heartbeat",payload:{},ref:e});let n=this.onMessage(i=>{i.ref===e&&(this.off([n]),t(Date.now()-s))});return!0}transportName(t){return t===A?"LongPoll":t.name}transportConnect(){let t;this.connectClock++,this.closeWasClean=!1,this.authToken&&(t=["phoenix",`${E}${btoa(this.authToken()).replace(/=/g,"")}`]),this.conn=new this.transport(this.endPointURL(),t),this.conn.binaryType=this.binaryType,this.conn.timeout=this.longpollerTimeout,this.conn.onopen=()=>this.onConnOpen(),this.conn.onerror=t=>this.onConnError(t),this.conn.onmessage=t=>this.onConnMessage(t),this.conn.onclose=t=>this.onConnClose(t)}getSession(t){return this.sessionStore&&this.sessionStore.getItem(t)}storeSession(t,e){this.sessionStore&&this.sessionStore.setItem(t,e)}connectWithFallback(t,e=2500){clearTimeout(this.fallbackTimer);let s,n=!1,i=!0,o=this.transportName(t),r=e=>{this.log("transport",`falling back to ${o}...`,e),this.off([void 0,s]),i=!1,this.replaceTransport(t),this.transportConnect()};if(this.getSession(`phx:fallback:${o}`))return r("memorized");this.fallbackTimer=setTimeout(r,e),s=this.onError(t=>{this.log("transport","error",t),i&&!n&&(clearTimeout(this.fallbackTimer),r(t))}),this.fallbackRef&&this.off([this.fallbackRef]),this.fallbackRef=this.onOpen(()=>{if(n=!0,!i){let e=this.transportName(t);return this.primaryPassedHealthCheck||this.storeSession(`phx:fallback:${e}`,"true"),this.log("transport",`established ${e} fallback`)}clearTimeout(this.fallbackTimer),this.fallbackTimer=setTimeout(r,e),this.ping(t=>{this.log("transport","connected to primary after",t),this.primaryPassedHealthCheck=!0,clearTimeout(this.fallbackTimer)})}),this.transportConnect()}clearHeartbeats(){clearTimeout(this.heartbeatTimer),clearTimeout(this.heartbeatTimeoutTimer)}onConnOpen(){this.hasLogger()&&this.log("transport",`${this.transportName(this.transport)} connected to ${this.endPointURL()}`),this.closeWasClean=!1,this.disconnecting=!1,this.establishedConnections++,this.flushSendBuffer(),this.reconnectTimer.reset(),this.resetHeartbeat(),this.stateChangeCallbacks.open.forEach(([,t])=>t())}heartbeatTimeout(){this.pendingHeartbeatRef&&(this.pendingHeartbeatRef=null,this.hasLogger()&&this.log("transport","heartbeat timeout. Attempting to re-establish connection"),this.triggerChanError("heartbeat_timeout"),this.closeWasClean=!1,this.teardown(()=>this.reconnectTimer.scheduleTimeout(),1e3,"heartbeat timeout"))}resetHeartbeat(){this.conn&&this.conn.skipHeartbeat||(this.pendingHeartbeatRef=null,this.clearHeartbeats(),this.heartbeatTimer=setTimeout(()=>this.sendHeartbeat(),this.heartbeatIntervalMs))}teardown(t,e,s){if(!this.conn)return t&&t();const n=this.conn;this.waitForBufferDone(n,()=>{e?n.close(e,s||""):n.close(),this.waitForSocketClosed(n,()=>{this.conn===n&&(this.conn.onopen=function(){},this.conn.onerror=function(){},this.conn.onmessage=function(){},this.conn.onclose=function(){},this.conn=null),t&&t()})})}waitForBufferDone(t,e,s=1){5!==s&&t.bufferedAmount?setTimeout(()=>{this.waitForBufferDone(t,e,s+1)},150*s):e()}waitForSocketClosed(t,e,s=1){5!==s&&t.readyState!==l?setTimeout(()=>{this.waitForSocketClosed(t,e,s+1)},150*s):e()}onConnClose(t){this.conn&&(this.conn.onclose=()=>{});let e=t&&t.code;this.hasLogger()&&this.log("transport","close",t),this.triggerChanError("connection_closed"),this.clearHeartbeats(),this.closeWasClean||1e3===e||this.reconnectTimer.scheduleTimeout(),this.stateChangeCallbacks.close.forEach(([,e])=>e(t))}onConnError(t){this.hasLogger()&&this.log("transport","error",t);let e=this.transport,s=this.establishedConnections;this.stateChangeCallbacks.error.forEach(([,n])=>{n(t,e,s)}),(e===this.transport||s>0)&&this.triggerChanError("connection_error")}
1triggerChanError(t){this.channels.forEach(e=>{e.isErrored()||e.isLeaving()||e.isClosed()||e.trigger(m,{source:"transport",reason:t})})}connectionState(){switch(this.conn&&this.conn.readyState){case a:return"connecting";case h:return"open";case c:return"closing";default:return"closed"}}isConnected(){return"open"===this.connectionState()}remove(t){this.off(t.stateChangeRefs),this.channels=this.channels.filter(e=>e!==t)}off(t){for(let e in this.stateChangeCallbacks)this.stateChangeCallbacks[e]=this.stateChangeCallbacks[e].filter(([e])=>-1===t.indexOf(e))}channel(t,e={}){let s=new R(t,e,this);return this.channels.push(s),s}push(t){if(this.hasLogger()){let{topic:e,event:s,payload:n,ref:i,join_ref:o}=t;this.log("push",`${e} ${s} (${o}, ${i})`,n)}this.isConnected()?this.encode(t,t=>this.conn.send(t)):this.sendBuffer.push(()=>this.encode(t,t=>this.conn.send(t)))}makeRef(){let t=this.ref+1;return t===this.ref?this.ref=0:this.ref=t,this.ref.toString()}sendHeartbeat(){this.pendingHeartbeatRef&&!this.isConnected()||(this.pendingHeartbeatRef=this.makeRef(),this.push({topic:"phoenix",event:"heartbeat",payload:{},ref:this.pendingHeartbeatRef}),this.heartbeatTimeoutTimer=setTimeout(()=>this.heartbeatTimeout(),this.heartbeatIntervalMs))}flushSendBuffer(){this.isConnected()&&this.sendBuffer.length>0&&(this.sendBuffer.forEach(t=>t()),this.sendBuffer=[])}onConnMessage(t){this.decode(t.data,t=>{let{topic:e,event:s,payload:n,ref:i,join_ref:o}=t;i&&i===this.pendingHeartbeatRef&&(this.clearHeartbeats(),this.pendingHeartbeatRef=null,this.heartbeatTimer=setTimeout(()=>this.sendHeartbeat(),this.heartbeatIntervalMs)),this.hasLogger()&&this.log("receive",`${n.status||""} ${e} ${s} ${i&&"("+i+")"||""}`,n);for(let t=0;t<this.channels.length;t++){const r=this.channels[t];r.isMember(e,s,n,o)&&r.trigger(s,n,i,o)}for(let e=0;e<this.stateChangeCallbacks.message.length;e++){let[,s]=this.stateChangeCallbacks.message[e];s(t)}})}leaveOpenTopic(t){let e=this.channels.find(e=>e.topic===t&&(e.isJoined()||e.isJoining()));e&&(this.hasLogger()&&this.log("transport",`leaving duplicate topic "${t}"`),e.leave())}}},10810:function(t,e,s){s.d(e,{Ey:function(){return y},bP:function(){return I},nY:function(){return j}});var n=s(65683); 2/*! 3 * pinia v3.0.1 4 * (c) 2025 Eduardo San Martin Morote 5 * @license MIT 6 */let i;const o=t=>i=t,r=Symbol();function a(t){return t&&"object"==typeof t&&"[object Object]"===Object.prototype.toString.call(t)&&"function"!=typeof t.toJSON}var h;!function(t){t.direct="direct",t.patchObject="patch object",t.patchFunction="patch function"}(h||(h={}));const c="undefined"!=typeof window,l=(()=>"object"==typeof window&&window.window===window?window:"object"==typeof self&&self.self===self?self:"object"==typeof s.g&&s.g.global===s.g?s.g:"object"==typeof globalThis?globalThis:{HTMLElement:null})();function u(t,e,s){const n=new XMLHttpRequest;n.open("GET",t),n.responseType="blob",n.onload=function(){b(n.response,e,s)},n.onerror=function(){console.error("could not download file")},n.send()}function d(t){const e=new XMLHttpRequest;e.open("HEAD",t,!1);try{e.send()}catch(t){}return e.status>=200&&e.status<=299}function f(t){try{t.dispatchEvent(new MouseEvent("click"))}catch(e){const s=document.createEvent("MouseEvents");
6s.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),t.dispatchEvent(s)}}const p="object"==typeof navigator?navigator:{userAgent:""},g=(()=>/Macintosh/.test(p.userAgent)&&/AppleWebKit/.test(p.userAgent)&&!/Safari/.test(p.userAgent))(),b=c?"undefined"!=typeof HTMLAnchorElement&&"download"in HTMLAnchorElement.prototype&&!g?function(t,e="download",s){const n=document.createElement("a");n.download=e,n.rel="noopener","string"==typeof t?(n.href=t,n.origin!==location.origin?d(n.href)?u(t,e,s):(n.target="_blank",f(n)):f(n)):(n.href=URL.createObjectURL(t),setTimeout(function(){URL.revokeObjectURL(n.href)},4e4),setTimeout(function(){f(n)},0))}:"msSaveOrOpenBlob"in p?function(t,e="download",s){if("string"==typeof t)if(d(t))u(t,e,s);else{const e=document.createElement("a");e.href=t,e.target="_blank",setTimeout(function(){f(e)})}else navigator.msSaveOrOpenBlob(function(t,{autoBom:e=!1}={}){return e&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(t.type)?new Blob([String.fromCharCode(65279),t],{type:t.type}):t}(t,s),e)}:function(t,e,s,n){(n=n||open("","_blank"))&&(n.document.title=n.document.body.innerText="downloading...");if("string"==typeof t)return u(t,e,s);const i="application/octet-stream"===t.type,o=/constructor/i.test(String(l.HTMLElement))||"safari"in l,r=/CriOS\/[\d]+/.test(navigator.userAgent);if((r||i&&o||g)&&"undefined"!=typeof FileReader){const e=new FileReader;e.onloadend=function(){let t=e.result;if("string"!=typeof t)throw n=null,new Error("Wrong reader.result type");t=r?t:t.replace(/^data:[^;]*;/,"data:attachment/file;"),n?n.location.href=t:location.assign(t),n=null},e.readAsDataURL(t)}else{const e=URL.createObjectURL(t);n?n.location.assign(e):location.href=e,n=null,setTimeout(function(){URL.revokeObjectURL(e)},4e4)}}:()=>{};const{assign:m}=Object;function y(){const t=(0,n.uY)(!0),e=t.run(()=>(0,n.KR)({}));let s=[],i=[];const a=(0,n.IG)({install(t){o(a),a._a=t,t.provide(r,a),t.config.globalProperties.$pinia=a,i.forEach(t=>s.push(t)),i=[]},use(t){return this._a?s.push(t):i.push(t),this},_p:s,_a:null,_e:t,_s:new Map,state:e});return a}const T=()=>{};function w(t,e,s,i=T){t.push(e);const o=()=>{const s=t.indexOf(e);s>-1&&(t.splice(s,1),i())};return!s&&(0,n.o5)()&&(0,n.jr)(o),o}function k(t,...e){t.slice().forEach(t=>{t(...e)})}const v=t=>t(),C=Symbol(),E=Symbol();function L(t,e){t instanceof Map&&e instanceof Map?e.forEach((e,s)=>t.set(s,e)):t instanceof Set&&e instanceof Set&&e.forEach(t.add,t);for(const s in e){if(!e.hasOwnProperty(s))continue;const i=e[s],o=t[s];a(o)&&a(i)&&t.hasOwnProperty(s)&&!(0,n.i9)(i)&&!(0,n.g8)(i)?t[s]=L(o,i):t[s]=i}return t}const N=Symbol();function R(t){return!a(t)||!t.hasOwnProperty(N)}const{assign:O}=Object;function A(t){return!(!(0,n.i9)(t)||!t.effect)}function S(t,e,s={},i,r,a){let c;const l=O({actions:{}},s);const u={deep:!0};let d,f;let p,g=[],b=[];const m=i.state.value[t];a||m||(i.state.value[t]={});(0,n.KR)({});let y;function N(e){let s;d=f=!1,"function"==typeof e?(e(i.state.value[t]),s={type:h.patchFunction,storeId:t,events:p}):(L(i.state.value[t],e),s={type:h.patchObject,payload:e,storeId:t,events:p});const o=y=Symbol();(0,n.dY)().then(()=>{y===o&&(d=!0)}),f=!0,k(g,s,i.state.value[t])}const S=a?function(){const{state:t}=s,e=t?t():{};this.$patch(t=>{O(t,e)})}:T;const j=(e,s="")=>{if(C in e)return e[E]=s,e;const n=function(){o(i);const s=Array.from(arguments),r=[],a=[];let h;k(b,{args:s,name:n[E],store:_,after:function(t){r.push(t)},onError:function(t){a.push(t)}});try{h=e.apply(this&&this.$id===t?this:_,s)}catch(t){throw k(a,t),t}return h instanceof Promise?h.then(t=>(k(r,t),t)).catch(t=>(k(a,t),Promise.reject(t))):(k(r,h),h)};return n[C]=!0,n[E]=s,n},I={_p:i,$id:t,$onAction:w.bind(null,b),$patch:N,$reset:S,$subscribe(e,s={}){const o=w(g,e,s.detached,()=>r()),r=c.run(()=>(0,n.wB)(()=>i.state.value[t],n=>{("sync"===s.flush?f:d)&&e({storeId:t,type:h.direct,events:p},n)},O({},u,s)));return o},$dispose:function(){c.stop(),g=[],b=[],i._s.delete(t)}},_=(0,n.Kh)(I);i._s.set(t,_);const M=(i._a&&i._a.runWithContext||v)(()=>i._e.run(()=>(c=(0,n.uY)()).run(()=>e({action:j}))));for(const e in M){const s=M[e];if((0,n.i9)(s)&&!A(s)||(0,n.g8)(s))a||(m&&R(s)&&((0,n.i9)(s)?s.value=m[e]:L(s,m[e])),i.state.value[t][e]=s);else if("function"==typeof s){const t=j(s,e);M[e]=t,l.actions[e]=s}else 0}return O(_,M),O((0,n.ux)(_),M),Object.defineProperty(_,"$state",{get:()=>i.state.value[t],set:t=>{N(e=>{O(e,t)})}}),i._p.forEach(t=>{O(_,c.run(()=>t({store:_,app:i._a,pinia:i,options:l})))}),m&&a&&s.hydrate&&s.hydrate(_.$state,m),d=!0,f=!0,_} 7/*! #__NO_SIDE_EFFECTS__ */function j(t,e,s){let a;const h="function"==typeof e;function c(s,c){const l=(0,n.PS)();(s=s||(l?(0,n.WQ)(r,null):null))&&o(s),(s=i)._s.has(t)||(h?S(t,e,a,s):function(t,e,s){const{state:i,actions:r,getters:a}=e,h=s.state.value[t];let c;c=S(t,function(){h||(s.state.value[t]=i?i():{});const e=(0,n.QW)(s.state.value[t]);return O(e,r,Object.keys(a||{}).reduce((e,i)=>(e[i]=(0,n.IG)((0,n.EW)(()=>{o(s);const e=s._s.get(t);return a[i].call(e,e)})),e),{}))},e,s,0,!0)}(t,a,s));return s._s.get(t)}return a=h?s:e,c.$id=t,c}function I(t){const e=(0,n.ux)(t),s={};for(const i in e){const o=e[i];o.effect?s[i]=(0,n.EW)({get:()=>t[i],set(e){t[i]=e}}):((0,n.i9)(o)||(0,n.g8)(o))&&(s[i]=(0,n.lW)(t,i))}return s}}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.