Spaces:
Running
Running
Upload 21 files
Browse filesFiles changed (9)
- public/assets/EmojiPanel-Bf-sbcJk.cssAdded+1
- public/assets/EmojiPanel-CgjLeHhn.jsAdded+1
- public/assets/index-49caZLjx.cssAdded
- public/assets/index-D9bgO9HY.jsAdded
- public/assets/rolldown-runtime-QTnfLwEv.jsAdded+1
- public/assets/socket-CbQsWyoH.jsAdded+1
- public/assets/vendor-BbmWO_jh.jsAdded
- public/index.html+2-2
- public/pwa-sw.js+1-1
1._overlay_1qhis_1{z-index:9999;position:fixed;bottom:80px;left:auto;right:12px}._panel_1qhis_9{background:rgba(var(--card-rgb,42, 38, 51), .95);-webkit-backdrop-filter:blur(25px)saturate(180%);scrollbar-width:none;scrollbar-color:rgba(var(--accent-rgb,167, 79, 255), .3) transparent;will-change:transform, opacity;border:1px solid #ffffff1a;border-radius:20px;width:320px;max-height:380px;padding:10px;overflow-y:auto;box-shadow:0 15px 40px #0009}._panel_1qhis_9[data-entered]{transition:transform .3s cubic-bezier(.34,1.56,.64,1),opacity .25s}._panel_1qhis_9::-webkit-scrollbar{display:none}._tabs_1qhis_33{background:#0003;border-bottom:1px solid #ffffff0d;gap:0;margin-bottom:12px;display:flex}._tab_1qhis_33{text-align:center;color:#888;font-size:calc(13px * var(--font-size-scale));cursor:pointer;background:0 0;border:none;border-bottom:2px solid #0000;flex:1;padding:10px;font-weight:600;transition:all .2s}._tab_1qhis_33._active_1qhis_57{color:var(--accent-solid);border-bottom-color:var(--accent-solid);background:rgba(var(--accent-rgb,167, 79, 255), .05)}._category_1qhis_63{margin-bottom:8px}._categoryTitle_1qhis_67{font-size:calc(12px * var(--font-size-scale));color:#888;text-transform:uppercase;letter-spacing:.5px;padding:4px 8px;font-weight:700}._grid_1qhis_76{grid-template-columns:repeat(8,1fr);gap:2px;display:grid}._emojiBtn_1qhis_82{aspect-ratio:1;cursor:pointer;width:100%;font-size:calc(24px * var(--font-size-scale));background:0 0;border:none;border-radius:8px;justify-content:center;align-items:center;transition:background .15s,transform .1s;display:flex}._emojiBtn_1qhis_82:hover{background:#ffffff1a;transform:scale(1.1)}._emojiBtn_1qhis_82:active{transform:scale(.9)}._stickerGrid_1qhis_105{grid-template-columns:repeat(4,1fr);gap:8px;max-height:300px;display:grid;overflow-y:auto}._stickerSlot_1qhis_113{aspect-ratio:1;border:2px dashed rgba(var(--accent-rgb,157, 78, 221), .2);cursor:pointer;border-radius:12px;justify-content:center;align-items:center;transition:all .2s;display:flex;position:relative;overflow:hidden}._stickerSlot_1qhis_113:hover{border-color:var(--accent-solid);background:rgba(var(--accent-rgb,167, 79, 255), .05)}._stickerSlot_1qhis_113 img{object-fit:cover;border-radius:10px;width:100%;height:100%}._stickerDelete_1qhis_138{color:#fff;width:20px;height:20px;font-size:calc(12px * var(--font-size-scale));cursor:pointer;background:#ff3b30e6;border:none;border-radius:50%;justify-content:center;align-items:center;display:none;position:absolute;top:4px;right:4px}._stickerSlot_1qhis_113:hover ._stickerDelete_1qhis_138{display:flex}._stickerPlus_1qhis_159{font-size:calc(24px * var(--font-size-scale));color:rgba(var(--accent-rgb,157, 78, 221), .35);font-weight:300}@media (width<=768px){._overlay_1qhis_1{bottom:80px;left:15px;right:15px}._panel_1qhis_9{width:auto;max-height:380px}}1import{r as e}from"./rolldown-runtime-QTnfLwEv.js";import{t,u as n}from"./vendor-BbmWO_jh.js";import{t as r}from"./index-D9bgO9HY.js";var i=e(n(),1),a={overlay:`_overlay_1qhis_1`,panel:`_panel_1qhis_9`,tabs:`_tabs_1qhis_33`,tab:`_tab_1qhis_33`,active:`_active_1qhis_57`,category:`_category_1qhis_63`,categoryTitle:`_categoryTitle_1qhis_67`,grid:`_grid_1qhis_76`,emojiBtn:`_emojiBtn_1qhis_82`,stickerGrid:`_stickerGrid_1qhis_105`,stickerSlot:`_stickerSlot_1qhis_113`,stickerDelete:`_stickerDelete_1qhis_138`,stickerPlus:`_stickerPlus_1qhis_159`},o=t(),s={Частые:[`😀`,`😂`,`😍`,`🥰`,`😎`,`🤔`,`😅`,`🙌`,`👍`,`👋`,`❤️`,`🔥`,`✨`,`🎉`,`💯`,`🙏`,`😢`,`😤`,`🫡`,`😈`],Смайлики:`😀.😃.😄.😁.😆.😅.🤣.😂.🙂.🙃.😉.😊.😇.🥰.😍.🤩.😘.😗.😚.😙.🥲.😋.😛.😜.🤪.😝.🤑.🤗.🤭.🫢.🤫.🤔.🫡.🤐.🤨.😐.😑.😶.🫥.😏.😒.🙄.😬.🤥.😌.😔.😪.🤤.😴.😷.🤒.🤕.🤢.🤮.🥵.🥶.🥴.😵.🤯.🤠.🥳.🥸.😎.🤓.🧐`.split(`.`),Жесты:`👋.🤚.🖐️.✋.🖖.🫱.🫲.🫳.🫴.👌.🤌.🤏.✌️.🤞.🫰.🤟.🤘.🤙.👈.👉.👆.🖕.👇.☝️.🫵.👍.👎.✊.👊.🤛.🤜.👏.🙌.🫶.👐.🤲.🤝.🙏.💪`.split(`.`),Сердце:[`❤️`,`🧡`,`💛`,`💚`,`💙`,`💜`,`🖤`,`🤍`,`🤎`,`💔`,`❤️🔥`,`❤️🩹`,`❣️`,`💕`,`💞`,`💓`,`💗`,`💖`,`💘`,`💝`],Животные:`🐶.🐱.🐭.🐹.🐰.🦊.🐻.🐼.🐻❄️.🐨.🐯.🦁.🐮.🐷.🐸.🐵.🙈.🙉.🙊.🐒.🐔.🐧.🐦.🐤.🐣.🐥.🦆.🦅.🦉.🦇.🐺.🐗.🐴.🦄.🐝.🪱.🐛.🦋.🐌.🐞`.split(`.`),Еда:`🍎.🍐.🍊.🍋.🍌.🍉.🍇.🍓.🫐.🍈.🍒.🍑.🥭.🍍.🥥.🥝.🍅.🥑.🍆.🥔.🥕.🌽.🌶️.🫑.🥒.🥬.🥦.🧄.🧅.🍄`.split(`.`),Объекты:`⌚.📱.💻.⌨️.🖥️.🖨️.🖱️.🖲️.💾.💿.📀.📼.📷.📸.📹.🎥.📽️.🎞️.📞.☎️.📟.📠.📺.📻.🎙️.🎚️.🎛️.🧭.⏱️.⏰.📦`.split(`.`)};function c(e){try{let t=localStorage.getItem(e);return t?JSON.parse(t):[]}catch{return[]}}function l(e,t){localStorage.setItem(e,JSON.stringify(t))}function u({onSelect:e,onClose:t,sourceRect:n,closing:u}){let{t:d}=r(),[f,p]=(0,i.useState)(`emoji`),[m,h]=(0,i.useState)(()=>c(`4send_saved_stickers`)),[g,_]=(0,i.useState)(()=>c(`4send_saved_gifs`)),v=(0,i.useRef)(null),y=(0,i.useRef)(null),b=(0,i.useRef)(null),[x,S]=(0,i.useState)(!1),[C,w]=(0,i.useState)(!1),[T,E]=(0,i.useState)(!1),[D,O]=(0,i.useState)(`50% 100%`),k=(0,i.useMemo)(()=>Object.keys(s),[]);(0,i.useLayoutEffect)(()=>{if(!T&&n&&b.current){let e=b.current.getBoundingClientRect();if(e.width>0&&e.height>0){let t=(n.left+n.width/2-e.left)/e.width*100,r=(n.top+n.height/2-e.top)/e.height*100;O(`${t}% ${r}%`),E(!0)}}},[n,T]),(0,i.useEffect)(()=>{T&&!C&&requestAnimationFrame(()=>{requestAnimationFrame(()=>w(!0))})},[T,C]),(0,i.useEffect)(()=>{u&&!x&&(S(!0),setTimeout(t,300))},[u,x,t]);let A=(0,i.useCallback)(()=>{x||(S(!0),setTimeout(t,300))},[t,x]);(0,i.useEffect)(()=>{if(x)return;let e=e=>{e.key===`Escape`&&A()};return document.addEventListener(`keydown`,e),()=>document.removeEventListener(`keydown`,e)},[x,A]);let j=(0,i.useMemo)(()=>T?{transformOrigin:D,transform:C&&!x?`scale(1)`:`scale(0)`,opacity:C&&!x?1:0}:{visibility:`hidden`,opacity:0},[D,T,C,x]),M=(0,i.useCallback)(t=>{e(t)},[e]),N=(0,i.useCallback)(e=>{let t=e.target.files?.[0];if(!t)return;let n=new FileReader;n.onload=()=>{let e=n.result,t=[...m,e];h(t),l(`4send_saved_stickers`,t)},n.readAsDataURL(t),e.target.value=``},[m]),P=(0,i.useCallback)(e=>{let t=e.target.files?.[0];if(!t)return;let n=new FileReader;n.onload=()=>{let e=n.result,t=[...g,e];_(t),l(`4send_saved_gifs`,t)},n.readAsDataURL(t),e.target.value=``},[g]),F=(0,i.useCallback)(e=>{let t=m.filter((t,n)=>n!==e);h(t),l(`4send_saved_stickers`,t)},[m]),I=(0,i.useCallback)(e=>{let t=g.filter((t,n)=>n!==e);_(t),l(`4send_saved_gifs`,t)},[g]);return(0,o.jsx)(`div`,{className:a.overlay,onClick:A,children:(0,o.jsxs)(`div`,{ref:b,className:a.panel,"data-entered":T||void 0,style:j,onClick:e=>e.stopPropagation(),children:[(0,o.jsxs)(`div`,{className:a.tabs,children:[(0,o.jsx)(`button`,{className:`${a.tab} ${f===`emoji`?a.active:``}`,onClick:()=>p(`emoji`),children:d(`Эмодзи`)}),(0,o.jsx)(`button`,{className:`${a.tab} ${f===`stickers`?a.active:``}`,onClick:()=>p(`stickers`),children:d(`Стикеры`)}),(0,o.jsx)(`button`,{className:`${a.tab} ${f===`gifs`?a.active:``}`,onClick:()=>p(`gifs`),children:`GIF`})]}),f===`emoji`&&k.map(e=>(0,o.jsxs)(`div`,{className:a.category,children:[(0,o.jsx)(`div`,{className:a.categoryTitle,children:d(e)}),(0,o.jsx)(`div`,{className:a.grid,children:s[e].map((t,n)=>(0,o.jsx)(`button`,{className:a.emojiBtn,onClick:()=>M(t),children:t},`${e}-${n}`))})]},e)),f===`stickers`&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(`input`,{ref:v,type:`file`,accept:`image/*`,style:{display:`none`},onChange:N}),(0,o.jsxs)(`div`,{className:a.stickerGrid,children:[m.map((t,n)=>(0,o.jsxs)(`div`,{className:a.stickerSlot,onClick:()=>e(t),children:[(0,o.jsx)(`img`,{src:t,alt:``}),(0,o.jsx)(`button`,{className:a.stickerDelete,onClick:e=>{e.stopPropagation(),F(n)},children:`×`})]},n)),(0,o.jsx)(`div`,{className:a.stickerSlot,onClick:()=>v.current?.click(),children:(0,o.jsx)(`span`,{className:a.stickerPlus,children:`+`})})]})]}),f===`gifs`&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(`input`,{ref:y,type:`file`,accept:`image/gif`,style:{display:`none`},onChange:P}),(0,o.jsxs)(`div`,{className:a.stickerGrid,style:{gridTemplateColumns:`repeat(3, 1fr)`},children:[g.map((t,n)=>(0,o.jsxs)(`div`,{className:a.stickerSlot,onClick:()=>e(t),children:[(0,o.jsx)(`img`,{src:t,alt:``}),(0,o.jsx)(`button`,{className:a.stickerDelete,onClick:e=>{e.stopPropagation(),I(n)},children:`×`})]},n)),(0,o.jsx)(`div`,{className:a.stickerSlot,onClick:()=>y.current?.click(),children:(0,o.jsx)(`span`,{className:a.stickerPlus,children:`+`})})]})]})]})})}export{u as default};1var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports),s=(e,n)=>{let r={};for(var i in e)t(r,i,{get:e[i],enumerable:!0});return n||t(r,Symbol.toStringTag,{value:`Module`}),r},c=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},l=(n,r,a)=>(a=n==null?{}:e(i(n)),c(r||!n||!n.__esModule?t(a,`default`,{value:n,enumerable:!0}):a,n));export{s as n,l as r,o as t};1import{n as e}from"./rolldown-runtime-QTnfLwEv.js";var t=Object.create(null);t.open=`0`,t.close=`1`,t.ping=`2`,t.pong=`3`,t.message=`4`,t.upgrade=`5`,t.noop=`6`;var n=Object.create(null);Object.keys(t).forEach(e=>{n[t[e]]=e});var r={type:`error`,data:`parser error`},i=typeof Blob==`function`||typeof Blob<`u`&&Object.prototype.toString.call(Blob)===`[object BlobConstructor]`,a=typeof ArrayBuffer==`function`,o=e=>typeof ArrayBuffer.isView==`function`?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,s=({type:e,data:n},r,s)=>i&&n instanceof Blob?r?s(n):c(n,s):a&&(n instanceof ArrayBuffer||o(n))?r?s(n):c(new Blob([n]),s):s(t[e]+(n||``)),c=(e,t)=>{let n=new FileReader;return n.onload=function(){let e=n.result.split(`,`)[1];t(`b`+(e||``))},n.readAsDataURL(e)};function l(e){return e instanceof Uint8Array?e:e instanceof ArrayBuffer?new Uint8Array(e):new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}var u;function ee(e,t){if(i&&e.data instanceof Blob)return e.data.arrayBuffer().then(l).then(t);if(a&&(e.data instanceof ArrayBuffer||o(e.data)))return t(l(e.data));s(e,!1,e=>{u||=new TextEncoder,t(u.encode(e))})}var te=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/`,d=typeof Uint8Array>`u`?[]:new Uint8Array(256);for(let e=0;e<64;e++)d[te.charCodeAt(e)]=e;var f=e=>{let t=e.length*.75,n=e.length,r,i=0,a,o,s,c;e[e.length-1]===`=`&&(t--,e[e.length-2]===`=`&&t--);let l=new ArrayBuffer(t),u=new Uint8Array(l);for(r=0;r<n;r+=4)a=d[e.charCodeAt(r)],o=d[e.charCodeAt(r+1)],s=d[e.charCodeAt(r+2)],c=d[e.charCodeAt(r+3)],u[i++]=a<<2|o>>4,u[i++]=(o&15)<<4|s>>2,u[i++]=(s&3)<<6|c&63;return l},ne=typeof ArrayBuffer==`function`,p=(e,t)=>{if(typeof e!=`string`)return{type:`message`,data:m(e,t)};let i=e.charAt(0);return i===`b`?{type:`message`,data:re(e.substring(1),t)}:n[i]?e.length>1?{type:n[i],data:e.substring(1)}:{type:n[i]}:r},re=(e,t)=>ne?m(f(e),t):{base64:!0,data:e},m=(e,t)=>{switch(t){case`blob`:return e instanceof Blob?e:new Blob([e]);default:return e instanceof ArrayBuffer?e:e.buffer}},h=``,ie=(e,t)=>{let n=e.length,r=Array(n),i=0;e.forEach((e,a)=>{s(e,!1,e=>{r[a]=e,++i===n&&t(r.join(h))})})},ae=(e,t)=>{let n=e.split(h),r=[];for(let e=0;e<n.length;e++){let i=p(n[e],t);if(r.push(i),i.type===`error`)break}return r};function oe(){return new TransformStream({transform(e,t){ee(e,n=>{let r=n.length,i;if(r<126)i=new Uint8Array(1),new DataView(i.buffer).setUint8(0,r);else if(r<65536){i=new Uint8Array(3);let e=new DataView(i.buffer);e.setUint8(0,126),e.setUint16(1,r)}else{i=new Uint8Array(9);let e=new DataView(i.buffer);e.setUint8(0,127),e.setBigUint64(1,BigInt(r))}e.data&&typeof e.data!=`string`&&(i[0]|=128),t.enqueue(i),t.enqueue(n)})}})}var g;function _(e){return e.reduce((e,t)=>e+t.length,0)}function v(e,t){if(e[0].length===t)return e.shift();let n=new Uint8Array(t),r=0;for(let i=0;i<t;i++)n[i]=e[0][r++],r===e[0].length&&(e.shift(),r=0);return e.length&&r<e[0].length&&(e[0]=e[0].slice(r)),n}function se(e,t){g||=new TextDecoder;let n=[],i=0,a=-1,o=!1;return new TransformStream({transform(s,c){for(n.push(s);;){if(i===0){if(_(n)<1)break;let e=v(n,1);o=(e[0]&128)==128,a=e[0]&127,i=a<126?3:a===126?1:2}else if(i===1){if(_(n)<2)break;let e=v(n,2);a=new DataView(e.buffer,e.byteOffset,e.length).getUint16(0),i=3}else if(i===2){if(_(n)<8)break;let e=v(n,8),t=new DataView(e.buffer,e.byteOffset,e.length),o=t.getUint32(0);if(o>2**21-1){c.enqueue(r);break}a=o*2**32+t.getUint32(4),i=3}else{if(_(n)<a)break;let e=v(n,a);c.enqueue(p(o?e:g.decode(e),t)),i=0}if(a===0||a>e){c.enqueue(r);break}}}})}function y(e){if(e)return b(e)}function b(e){for(var t in y.prototype)e[t]=y.prototype[t];return e}y.prototype.on=y.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks[`$`+e]=this._callbacks[`$`+e]||[]).push(t),this},y.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this},y.prototype.off=y.prototype.removeListener=y.prototype.removeAllListeners=y.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var n=this._callbacks[`$`+e];if(!n)return this;if(arguments.length==1)return delete this._callbacks[`$`+e],this;for(var r,i=0;i<n.length;i++)if(r=n[i],r===t||r.fn===t){n.splice(i,1);break}return n.length===0&&delete this._callbacks[`$`+e],this},y.prototype.emit=function(e){this._callbacks=this._callbacks||{};for(var t=Array(arguments.length-1),n=this._callbacks[`$`+e],r=1;r<arguments.length;r++)t[r-1]=arguments[r];if(n){n=n.slice(0);for(var r=0,i=n.length;r<i;++r)n[r].apply(this,t)}return this},y.prototype.emitReserved=y.prototype.emit,y.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks[`$`+e]||[]},y.prototype.hasListeners=function(e){return!!this.listeners(e).length};var x=typeof Promise==`function`&&typeof Promise.resolve==`function`?e=>Promise.resolve().then(e):(e,t)=>t(e,0),S=typeof self<`u`?self:typeof window<`u`?window:Function(`return this`)(),ce=`arraybuffer`;function C(e,...t){return t.reduce((t,n)=>(e.hasOwnProperty(n)&&(t[n]=e[n]),t),{})}var le=S.setTimeout,ue=S.clearTimeout;function w(e,t){t.useNativeTimers?(e.setTimeoutFn=le.bind(S),e.clearTimeoutFn=ue.bind(S)):(e.setTimeoutFn=S.setTimeout.bind(S),e.clearTimeoutFn=S.clearTimeout.bind(S))}var de=1.33;function fe(e){return typeof e==`string`?pe(e):Math.ceil((e.byteLength||e.size)*de)}function pe(e){let t=0,n=0;for(let r=0,i=e.length;r<i;r++)t=e.charCodeAt(r),t<128?n+=1:t<2048?n+=2:t<55296||t>=57344?n+=3:(r++,n+=4);return n}function T(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function me(e){let t=``;for(let n in e)e.hasOwnProperty(n)&&(t.length&&(t+=`&`),t+=encodeURIComponent(n)+`=`+encodeURIComponent(e[n]));return t}function he(e){let t={},n=e.split(`&`);for(let e=0,r=n.length;e<r;e++){let r=n[e].split(`=`);t[decodeURIComponent(r[0])]=decodeURIComponent(r[1])}return t}var ge=class extends Error{constructor(e,t,n){super(e),this.description=t,this.context=n,this.type=`TransportError`}},E=class extends y{constructor(e){super(),this.writable=!1,w(this,e),this.opts=e,this.query=e.query,this.socket=e.socket,this.supportsBinary=!e.forceBase64}onError(e,t,n){return super.emitReserved(`error`,new ge(e,t,n)),this}open(){return this.readyState=`opening`,this.doOpen(),this}close(){return(this.readyState===`opening`||this.readyState===`open`)&&(this.doClose(),this.onClose()),this}send(e){this.readyState===`open`&&this.write(e)}onOpen(){this.readyState=`open`,this.writable=!0,super.emitReserved(`open`)}onData(e){let t=p(e,this.socket.binaryType);this.onPacket(t)}onPacket(e){super.emitReserved(`packet`,e)}onClose(e){this.readyState=`closed`,super.emitReserved(`close`,e)}pause(e){}createUri(e,t={}){return e+`://`+this._hostname()+this._port()+this.opts.path+this._query(t)}_hostname(){let e=this.opts.hostname;return e.indexOf(`:`)===-1?e:`[`+e+`]`}_port(){return this.opts.port&&(this.opts.secure&&Number(this.opts.port)!==443||!this.opts.secure&&Number(this.opts.port)!==80)?`:`+this.opts.port:``}_query(e){let t=me(e);return t.length?`?`+t:``}},_e=class extends E{constructor(){super(...arguments),this._polling=!1}get name(){return`polling`}doOpen(){this._poll()}pause(e){this.readyState=`pausing`;let t=()=>{this.readyState=`paused`,e()};if(this._polling||!this.writable){let e=0;this._polling&&(e++,this.once(`pollComplete`,function(){--e||t()})),this.writable||(e++,this.once(`drain`,function(){--e||t()}))}else t()}_poll(){this._polling=!0,this.doPoll(),this.emitReserved(`poll`)}onData(e){ae(e,this.socket.binaryType).forEach(e=>{if(this.readyState===`opening`&&e.type===`open`&&this.onOpen(),e.type===`close`)return this.onClose({description:`transport closed by the server`}),!1;this.onPacket(e)}),this.readyState!==`closed`&&(this._polling=!1,this.emitReserved(`pollComplete`),this.readyState===`open`&&this._poll())}doClose(){let e=()=>{this.write([{type:`close`}])};this.readyState===`open`?e():this.once(`open`,e)}write(e){this.writable=!1,ie(e,e=>{this.doWrite(e,()=>{this.writable=!0,this.emitReserved(`drain`)})})}uri(){let e=this.opts.secure?`https`:`http`,t=this.query||{};return!1!==this.opts.timestampRequests&&(t[this.opts.timestampParam]=T()),!this.supportsBinary&&!t.sid&&(t.b64=1),this.createUri(e,t)}},D=!1;try{D=typeof XMLHttpRequest<`u`&&`withCredentials`in new XMLHttpRequest}catch{}var ve=D;function ye(){}var be=class extends _e{constructor(e){if(super(e),typeof location<`u`){let t=location.protocol===`https:`,n=location.port;n||=t?`443`:`80`,this.xd=typeof location<`u`&&e.hostname!==location.hostname||n!==e.port}}doWrite(e,t){let n=this.request({method:`POST`,data:e});n.on(`success`,t),n.on(`error`,(e,t)=>{this.onError(`xhr post error`,e,t)})}doPoll(){let e=this.request();e.on(`data`,this.onData.bind(this)),e.on(`error`,(e,t)=>{this.onError(`xhr poll error`,e,t)}),this.pollXhr=e}},O=class e extends y{constructor(e,t,n){super(),this.createRequest=e,w(this,n),this._opts=n,this._method=n.method||`GET`,this._uri=t,this._data=n.data===void 0?null:n.data,this._create()}_create(){var t;let n=C(this._opts,`agent`,`pfx`,`key`,`passphrase`,`cert`,`ca`,`ciphers`,`rejectUnauthorized`,`autoUnref`);n.xdomain=!!this._opts.xd;let r=this._xhr=this.createRequest(n);try{r.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders){r.setDisableHeaderCheck&&r.setDisableHeaderCheck(!0);for(let e in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(e)&&r.setRequestHeader(e,this._opts.extraHeaders[e])}}catch{}if(this._method===`POST`)try{r.setRequestHeader(`Content-type`,`text/plain;charset=UTF-8`)}catch{}try{r.setRequestHeader(`Accept`,`*/*`)}catch{}(t=this._opts.cookieJar)==null||t.addCookies(r),`withCredentials`in r&&(r.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(r.timeout=this._opts.requestTimeout),r.onreadystatechange=()=>{var e;r.readyState===3&&((e=this._opts.cookieJar)==null||e.parseCookies(r.getResponseHeader(`set-cookie`))),r.readyState===4&&(r.status===200||r.status===1223?this._onLoad():this.setTimeoutFn(()=>{this._onError(typeof r.status==`number`?r.status:0)},0))},r.send(this._data)}catch(e){this.setTimeoutFn(()=>{this._onError(e)},0);return}typeof document<`u`&&(this._index=e.requestsCount++,e.requests[this._index]=this)}_onError(e){this.emitReserved(`error`,e,this._xhr),this._cleanup(!0)}_cleanup(t){if(!(this._xhr===void 0||this._xhr===null)){if(this._xhr.onreadystatechange=ye,t)try{this._xhr.abort()}catch{}typeof document<`u`&&delete e.requests[this._index],this._xhr=null}}_onLoad(){let e=this._xhr.responseText;e!==null&&(this.emitReserved(`data`,e),this.emitReserved(`success`),this._cleanup())}abort(){this._cleanup()}};if(O.requestsCount=0,O.requests={},typeof document<`u`){if(typeof attachEvent==`function`)attachEvent(`onunload`,k);else if(typeof addEventListener==`function`){let e=`onpagehide`in S?`pagehide`:`unload`;addEventListener(e,k,!1)}}function k(){for(let e in O.requests)O.requests.hasOwnProperty(e)&&O.requests[e].abort()}var xe=(function(){let e=A({xdomain:!1});return e&&e.responseType!==null})(),Se=class extends be{constructor(e){super(e);let t=e&&e.forceBase64;this.supportsBinary=xe&&!t}request(e={}){return Object.assign(e,{xd:this.xd},this.opts),new O(A,this.uri(),e)}};function A(e){let t=e.xdomain;try{if(typeof XMLHttpRequest<`u`&&(!t||ve))return new XMLHttpRequest}catch{}if(!t)try{return new S[[`Active`,`Object`].join(`X`)](`Microsoft.XMLHTTP`)}catch{}}var j=typeof navigator<`u`&&typeof navigator.product==`string`&&navigator.product.toLowerCase()===`reactnative`,Ce=class extends E{get name(){return`websocket`}doOpen(){let e=this.uri(),t=this.opts.protocols,n=j?{}:C(this.opts,`agent`,`perMessageDeflate`,`pfx`,`key`,`passphrase`,`cert`,`ca`,`ciphers`,`rejectUnauthorized`,`localAddress`,`protocolVersion`,`origin`,`maxPayload`,`family`,`checkServerIdentity`);this.opts.extraHeaders&&(n.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(e,t,n)}catch(e){return this.emitReserved(`error`,e)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=e=>this.onClose({description:`websocket connection closed`,context:e}),this.ws.onmessage=e=>this.onData(e.data),this.ws.onerror=e=>this.onError(`websocket error`,e)}write(e){this.writable=!1;for(let t=0;t<e.length;t++){let n=e[t],r=t===e.length-1;s(n,this.supportsBinary,e=>{try{this.doWrite(n,e)}catch{}r&&x(()=>{this.writable=!0,this.emitReserved(`drain`)},this.setTimeoutFn)})}}doClose(){this.ws!==void 0&&(this.ws.onerror=()=>{},this.ws.close(),this.ws=null)}uri(){let e=this.opts.secure?`wss`:`ws`,t=this.query||{};return this.opts.timestampRequests&&(t[this.opts.timestampParam]=T()),this.supportsBinary||(t.b64=1),this.createUri(e,t)}},M=S.WebSocket||S.MozWebSocket,we={websocket:class extends Ce{createSocket(e,t,n){return j?new M(e,t,n):t?new M(e,t):new M(e)}doWrite(e,t){this.ws.send(t)}},webtransport:class extends E{get name(){return`webtransport`}doOpen(){try{this._transport=new WebTransport(this.createUri(`https`),this.opts.transportOptions[this.name])}catch(e){return this.emitReserved(`error`,e)}this._transport.closed.then(()=>{this.onClose()}).catch(e=>{this.onError(`webtransport error`,e)}),this._transport.ready.then(()=>{this._transport.createBidirectionalStream().then(e=>{let t=se(2**53-1,this.socket.binaryType),n=e.readable.pipeThrough(t).getReader(),r=oe();r.readable.pipeTo(e.writable),this._writer=r.writable.getWriter();let i=()=>{n.read().then(({done:e,value:t})=>{e||(this.onPacket(t),i())}).catch(e=>{})};i();let a={type:`open`};this.query.sid&&(a.data=`{"sid":"${this.query.sid}"}`),this._writer.write(a).then(()=>this.onOpen())})})}write(e){this.writable=!1;for(let t=0;t<e.length;t++){let n=e[t],r=t===e.length-1;this._writer.write(n).then(()=>{r&&x(()=>{this.writable=!0,this.emitReserved(`drain`)},this.setTimeoutFn)})}}doClose(){var e;(e=this._transport)==null||e.close()}},polling:Se},Te=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,Ee=[`source`,`protocol`,`authority`,`userInfo`,`user`,`password`,`host`,`port`,`relative`,`path`,`directory`,`file`,`query`,`anchor`];function N(e){if(e.length>8e3)throw`URI too long`;let t=e,n=e.indexOf(`[`),r=e.indexOf(`]`);n!=-1&&r!=-1&&(e=e.substring(0,n)+e.substring(n,r).replace(/:/g,`;`)+e.substring(r,e.length));let i=Te.exec(e||``),a={},o=14;for(;o--;)a[Ee[o]]=i[o]||``;return n!=-1&&r!=-1&&(a.source=t,a.host=a.host.substring(1,a.host.length-1).replace(/;/g,`:`),a.authority=a.authority.replace(`[`,``).replace(`]`,``).replace(/;/g,`:`),a.ipv6uri=!0),a.pathNames=De(a,a.path),a.queryKey=Oe(a,a.query),a}function De(e,t){let n=t.replace(/\/{2,9}/g,`/`).split(`/`);return(t.slice(0,1)==`/`||t.length===0)&&n.splice(0,1),t.slice(-1)==`/`&&n.splice(n.length-1,1),n}function Oe(e,t){let n={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(e,t,r){t&&(n[t]=r)}),n}var P=typeof addEventListener==`function`&&typeof removeEventListener==`function`,F=[];P&&addEventListener(`offline`,()=>{F.forEach(e=>e())},!1);var I=class e extends y{constructor(e,t){if(super(),this.binaryType=ce,this.writeBuffer=[],this._prevBufferLen=0,this._pingInterval=-1,this._pingTimeout=-1,this._maxPayload=-1,this._pingTimeoutTime=1/0,e&&typeof e==`object`&&(t=e,e=null),e){let n=N(e);t.hostname=n.host,t.secure=n.protocol===`https`||n.protocol===`wss`,t.port=n.port,n.query&&(t.query=n.query)}else t.host&&(t.hostname=N(t.host).host);w(this,t),this.secure=t.secure==null?typeof location<`u`&&location.protocol===`https:`:t.secure,t.hostname&&!t.port&&(t.port=this.secure?`443`:`80`),this.hostname=t.hostname||(typeof location<`u`?location.hostname:`localhost`),this.port=t.port||(typeof location<`u`&&location.port?location.port:this.secure?`443`:`80`),this.transports=[],this._transportsByName={},t.transports.forEach(e=>{let t=e.prototype.name;this.transports.push(t),this._transportsByName[t]=e}),this.opts=Object.assign({path:`/engine.io`,agent:!1,withCredentials:!1,upgrade:!0,timestampParam:`t`,rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},t),this.opts.path=this.opts.path.replace(/\/$/,``)+(this.opts.addTrailingSlash?`/`:``),typeof this.opts.query==`string`&&(this.opts.query=he(this.opts.query)),P&&(this.opts.closeOnBeforeunload&&(this._beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener(`beforeunload`,this._beforeunloadEventListener,!1)),this.hostname!==`localhost`&&(this._offlineEventListener=()=>{this._onClose(`transport close`,{description:`network connection lost`})},F.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(e){let t=Object.assign({},this.opts.query);t.EIO=4,t.transport=e,this.id&&(t.sid=this.id);let n=Object.assign({},this.opts,{query:t,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[e]);return new this._transportsByName[e](n)}_open(){if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved(`error`,`No transports available`)},0);return}let t=this.opts.rememberUpgrade&&e.priorWebsocketSuccess&&this.transports.indexOf(`websocket`)!==-1?`websocket`:this.transports[0];this.readyState=`opening`;let n=this.createTransport(t);n.open(),this.setTransport(n)}setTransport(e){this.transport&&this.transport.removeAllListeners(),this.transport=e,e.on(`drain`,this._onDrain.bind(this)).on(`packet`,this._onPacket.bind(this)).on(`error`,this._onError.bind(this)).on(`close`,e=>this._onClose(`transport close`,e))}onOpen(){this.readyState=`open`,e.priorWebsocketSuccess=this.transport.name===`websocket`,this.emitReserved(`open`),this.flush()}_onPacket(e){if(this.readyState===`opening`||this.readyState===`open`||this.readyState===`closing`)switch(this.emitReserved(`packet`,e),this.emitReserved(`heartbeat`),e.type){case`open`:this.onHandshake(JSON.parse(e.data));break;case`ping`:this._sendPacket(`pong`),this.emitReserved(`ping`),this.emitReserved(`pong`),this._resetPingTimeout();break;case`error`:let t=Error(`server error`);t.code=e.data,this._onError(t);break;case`message`:this.emitReserved(`data`,e.data),this.emitReserved(`message`,e.data);break}}onHandshake(e){this.emitReserved(`handshake`,e),this.id=e.sid,this.transport.query.sid=e.sid,this._pingInterval=e.pingInterval,this._pingTimeout=e.pingTimeout,this._maxPayload=e.maxPayload,this.onOpen(),this.readyState!==`closed`&&this._resetPingTimeout()}_resetPingTimeout(){this.clearTimeoutFn(this._pingTimeoutTimer);let e=this._pingInterval+this._pingTimeout;this._pingTimeoutTime=Date.now()+e,this._pingTimeoutTimer=this.setTimeoutFn(()=>{this._onClose(`ping timeout`)},e),this.opts.autoUnref&&this._pingTimeoutTimer.unref()}_onDrain(){this.writeBuffer.splice(0,this._prevBufferLen),this._prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved(`drain`):this.flush()}flush(){if(this.readyState!==`closed`&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){let e=this._getWritablePackets();this.transport.send(e),this._prevBufferLen=e.length,this.emitReserved(`flush`)}}_getWritablePackets(){if(!(this._maxPayload&&this.transport.name===`polling`&&this.writeBuffer.length>1))return this.writeBuffer;let e=1;for(let t=0;t<this.writeBuffer.length;t++){let n=this.writeBuffer[t].data;if(n&&(e+=fe(n)),t>0&&e>this._maxPayload)return this.writeBuffer.slice(0,t);e+=2}return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;let e=Date.now()>this._pingTimeoutTime;return e&&(this._pingTimeoutTime=0,x(()=>{this._onClose(`ping timeout`)},this.setTimeoutFn)),e}write(e,t,n){return this._sendPacket(`message`,e,t,n),this}send(e,t,n){return this._sendPacket(`message`,e,t,n),this}_sendPacket(e,t,n,r){if(typeof t==`function`&&(r=t,t=void 0),typeof n==`function`&&(r=n,n=null),this.readyState===`closing`||this.readyState===`closed`)return;n||={},n.compress=!1!==n.compress;let i={type:e,data:t,options:n};this.emitReserved(`packetCreate`,i),this.writeBuffer.push(i),r&&this.once(`flush`,r),this.flush()}close(){let e=()=>{this._onClose(`forced close`),this.transport.close()},t=()=>{this.off(`upgrade`,t),this.off(`upgradeError`,t),e()},n=()=>{this.once(`upgrade`,t),this.once(`upgradeError`,t)};return(this.readyState===`opening`||this.readyState===`open`)&&(this.readyState=`closing`,this.writeBuffer.length?this.once(`drain`,()=>{this.upgrading?n():e()}):this.upgrading?n():e()),this}_onError(t){if(e.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&this.readyState===`opening`)return this.transports.shift(),this._open();this.emitReserved(`error`,t),this._onClose(`transport error`,t)}_onClose(e,t){if(this.readyState===`opening`||this.readyState===`open`||this.readyState===`closing`){if(this.clearTimeoutFn(this._pingTimeoutTimer),this.transport.removeAllListeners(`close`),this.transport.close(),this.transport.removeAllListeners(),P&&(this._beforeunloadEventListener&&removeEventListener(`beforeunload`,this._beforeunloadEventListener,!1),this._offlineEventListener)){let e=F.indexOf(this._offlineEventListener);e!==-1&&F.splice(e,1)}this.readyState=`closed`,this.id=null,this.emitReserved(`close`,e,t),this.writeBuffer=[],this._prevBufferLen=0}}};I.protocol=4;var ke=class extends I{constructor(){super(...arguments),this._upgrades=[]}onOpen(){if(super.onOpen(),this.readyState===`open`&&this.opts.upgrade)for(let e=0;e<this._upgrades.length;e++)this._probe(this._upgrades[e])}_probe(e){let t=this.createTransport(e),n=!1;I.priorWebsocketSuccess=!1;let r=()=>{n||(t.send([{type:`ping`,data:`probe`}]),t.once(`packet`,e=>{if(!n)if(e.type===`pong`&&e.data===`probe`){if(this.upgrading=!0,this.emitReserved(`upgrading`,t),!t)return;I.priorWebsocketSuccess=t.name===`websocket`,this.transport.pause(()=>{n||this.readyState!==`closed`&&(l(),this.setTransport(t),t.send([{type:`upgrade`}]),this.emitReserved(`upgrade`,t),t=null,this.upgrading=!1,this.flush())})}else{let e=Error(`probe error`);e.transport=t.name,this.emitReserved(`upgradeError`,e)}}))};function i(){n||(n=!0,l(),t.close(),t=null)}let a=e=>{let n=Error(`probe error: `+e);n.transport=t.name,i(),this.emitReserved(`upgradeError`,n)};function o(){a(`transport closed`)}function s(){a(`socket closed`)}function c(e){t&&e.name!==t.name&&i()}let l=()=>{t.removeListener(`open`,r),t.removeListener(`error`,a),t.removeListener(`close`,o),this.off(`close`,s),this.off(`upgrading`,c)};t.once(`open`,r),t.once(`error`,a),t.once(`close`,o),this.once(`close`,s),this.once(`upgrading`,c),this._upgrades.indexOf(`webtransport`)!==-1&&e!==`webtransport`?this.setTimeoutFn(()=>{n||t.open()},200):t.open()}onHandshake(e){this._upgrades=this._filterUpgrades(e.upgrades),super.onHandshake(e)}_filterUpgrades(e){let t=[];for(let n=0;n<e.length;n++)~this.transports.indexOf(e[n])&&t.push(e[n]);return t}},L=class extends ke{constructor(e,t={}){let n=typeof e==`object`,r=n?{...e}:{...t};(!r.transports||r.transports&&typeof r.transports[0]==`string`)&&(r.transports=(r.transports||[`polling`,`websocket`,`webtransport`]).map(e=>we[e]).filter(e=>!!e)),super(n?r:e,r)}};L.protocol;function Ae(e,t=``,n){let r=e;n||=typeof location<`u`&&location,e??=n.protocol+`//`+n.host,typeof e==`string`&&(e.charAt(0)===`/`&&(e=e.charAt(1)===`/`?n.protocol+e:n.host+e),/^(https?|wss?):\/\//.test(e)||(e=n===void 0?`https://`+e:n.protocol+`//`+e),r=N(e)),r.port||(/^(http|ws)$/.test(r.protocol)?r.port=`80`:/^(http|ws)s$/.test(r.protocol)&&(r.port=`443`)),r.path=r.path||`/`;let i=r.host.indexOf(`:`)===-1?r.host:`[`+r.host+`]`;return r.id=r.protocol+`://`+i+`:`+r.port+t,r.href=r.protocol+`://`+i+(n&&n.port===r.port?``:`:`+r.port),r}var je=typeof ArrayBuffer==`function`,Me=e=>typeof ArrayBuffer.isView==`function`?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,R=Object.prototype.toString,Ne=typeof Blob==`function`||typeof Blob<`u`&&R.call(Blob)===`[object BlobConstructor]`,Pe=typeof File==`function`||typeof File<`u`&&R.call(File)===`[object FileConstructor]`;function z(e){return je&&(e instanceof ArrayBuffer||Me(e))||Ne&&e instanceof Blob||Pe&&e instanceof File}function B(e,t){if(!e||typeof e!=`object`)return!1;if(Array.isArray(e)){for(let t=0,n=e.length;t<n;t++)if(B(e[t]))return!0;return!1}if(z(e))return!0;if(e.toJSON&&typeof e.toJSON==`function`&&arguments.length===1)return B(e.toJSON(),!0);for(let t in e)if(Object.prototype.hasOwnProperty.call(e,t)&&B(e[t]))return!0;return!1}function Fe(e){let t=[],n=e.data,r=e;return r.data=V(n,t),r.attachments=t.length,{packet:r,buffers:t}}function V(e,t,n){if(!e)return e;if(z(e)){let n={_placeholder:!0,num:t.length};return t.push(e),n}else if(Array.isArray(e)){let n=Array(e.length);for(let r=0;r<e.length;r++)n[r]=V(e[r],t);return n}else if(typeof e==`object`&&!(e instanceof Date)){if(e.toJSON&&typeof e.toJSON==`function`&&!n)return V(e.toJSON(),t,!0);let r={};for(let n in e)Object.prototype.hasOwnProperty.call(e,n)&&(r[n]=V(e[n],t));return r}return e}function Ie(e,t){return e.data=H(e.data,t),delete e.attachments,e}function H(e,t){if(!e)return e;if(e&&e._placeholder===!0){if(typeof e.num==`number`&&e.num>=0&&e.num<t.length)return t[e.num];throw Error(`illegal attachments`)}else if(Array.isArray(e))for(let n=0;n<e.length;n++)e[n]=H(e[n],t);else if(typeof e==`object`)for(let n in e)Object.prototype.hasOwnProperty.call(e,n)&&(e[n]=H(e[n],t));return e}var Le=e({Decoder:()=>ze,Encoder:()=>Re,PacketType:()=>W,isPacketValid:()=>Ue,protocol:()=>5}),U=[`connect`,`connect_error`,`disconnect`,`disconnecting`,`newListener`,`removeListener`],W;(function(e){e[e.CONNECT=0]=`CONNECT`,e[e.DISCONNECT=1]=`DISCONNECT`,e[e.EVENT=2]=`EVENT`,e[e.ACK=3]=`ACK`,e[e.CONNECT_ERROR=4]=`CONNECT_ERROR`,e[e.BINARY_EVENT=5]=`BINARY_EVENT`,e[e.BINARY_ACK=6]=`BINARY_ACK`})(W||={});var Re=class{constructor(e){this.replacer=e}encode(e){return(e.type===W.EVENT||e.type===W.ACK)&&B(e)?this.encodeAsBinary({type:e.type===W.EVENT?W.BINARY_EVENT:W.BINARY_ACK,nsp:e.nsp,data:e.data,id:e.id}):[this.encodeAsString(e)]}encodeAsString(e){let t=``+e.type;return(e.type===W.BINARY_EVENT||e.type===W.BINARY_ACK)&&(t+=e.attachments+`-`),e.nsp&&e.nsp!==`/`&&(t+=e.nsp+`,`),e.id!=null&&(t+=e.id),e.data!=null&&(t+=JSON.stringify(e.data,this.replacer)),t}encodeAsBinary(e){let t=Fe(e),n=this.encodeAsString(t.packet),r=t.buffers;return r.unshift(n),r}},ze=class e extends y{constructor(e){super(),this.opts=Object.assign({reviver:void 0,maxAttachments:10},typeof e==`function`?{reviver:e}:e)}add(e){let t;if(typeof e==`string`){if(this.reconstructor)throw Error(`got plaintext data when reconstructing a packet`);t=this.decodeString(e);let n=t.type===W.BINARY_EVENT;n||t.type===W.BINARY_ACK?(t.type=n?W.EVENT:W.ACK,this.reconstructor=new Be(t)):super.emitReserved(`decoded`,t)}else if(z(e)||e.base64)if(this.reconstructor)t=this.reconstructor.takeBinaryData(e),t&&(this.reconstructor=null,super.emitReserved(`decoded`,t));else throw Error(`got binary data when not reconstructing a packet`);else throw Error(`Unknown type: `+e)}decodeString(t){let n=0,r={type:Number(t.charAt(0))};if(W[r.type]===void 0)throw Error(`unknown packet type `+r.type);if(r.type===W.BINARY_EVENT||r.type===W.BINARY_ACK){let e=n+1;for(;t.charAt(++n)!==`-`&&n!=t.length;);let i=t.substring(e,n);if(i!=Number(i)||t.charAt(n)!==`-`)throw Error(`Illegal attachments`);let a=Number(i);if(!G(a)||a<1)throw Error(`Illegal attachments`);if(a>this.opts.maxAttachments)throw Error(`too many attachments`);r.attachments=a}if(t.charAt(n+1)===`/`){let e=n+1;for(;++n&&!(t.charAt(n)===`,`||n===t.length););r.nsp=t.substring(e,n)}else r.nsp=`/`;let i=t.charAt(n+1);if(i!==``&&Number(i)==i){let e=n+1;for(;++n;){let e=t.charAt(n);if(e==null||Number(e)!=e){--n;break}if(n===t.length)break}r.id=Number(t.substring(e,n+1))}if(t.charAt(++n)){let i=this.tryParse(t.substr(n));if(e.isPayloadValid(r.type,i))r.data=i;else throw Error(`invalid payload`)}return r}tryParse(e){try{return JSON.parse(e,this.opts.reviver)}catch{return!1}}static isPayloadValid(e,t){switch(e){case W.CONNECT:return q(t);case W.DISCONNECT:return t===void 0;case W.CONNECT_ERROR:return typeof t==`string`||q(t);case W.EVENT:case W.BINARY_EVENT:return Array.isArray(t)&&(typeof t[0]==`number`||typeof t[0]==`string`&&U.indexOf(t[0])===-1);case W.ACK:case W.BINARY_ACK:return Array.isArray(t)}}destroy(){this.reconstructor&&=(this.reconstructor.finishedReconstruction(),null)}},Be=class{constructor(e){this.packet=e,this.buffers=[],this.reconPack=e}takeBinaryData(e){if(this.buffers.push(e),this.buffers.length===this.reconPack.attachments){let e=Ie(this.reconPack,this.buffers);return this.finishedReconstruction(),e}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}};function Ve(e){return typeof e==`string`}var G=Number.isInteger||function(e){return typeof e==`number`&&isFinite(e)&&Math.floor(e)===e};function K(e){return e===void 0||G(e)}function q(e){return Object.prototype.toString.call(e)===`[object Object]`}function He(e,t){switch(e){case W.CONNECT:return t===void 0||q(t);case W.DISCONNECT:return t===void 0;case W.EVENT:return Array.isArray(t)&&(typeof t[0]==`number`||typeof t[0]==`string`&&U.indexOf(t[0])===-1);case W.ACK:return Array.isArray(t);case W.CONNECT_ERROR:return typeof t==`string`||q(t);default:return!1}}function Ue(e){return Ve(e.nsp)&&K(e.id)&&He(e.type,e.data)}function J(e,t,n){return e.on(t,n),function(){e.off(t,n)}}var We=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1}),Y=class extends y{constructor(e,t,n){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=e,this.nsp=t,n&&n.auth&&(this.auth=n.auth),this._opts=Object.assign({},n),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;let e=this.io;this.subs=[J(e,`open`,this.onopen.bind(this)),J(e,`packet`,this.onpacket.bind(this)),J(e,`error`,this.onerror.bind(this)),J(e,`close`,this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState===`open`&&this.onopen(),this)}open(){return this.connect()}send(...e){return e.unshift(`message`),this.emit.apply(this,e),this}emit(e,...t){if(We.hasOwnProperty(e))throw Error(`"`+e.toString()+`" is a reserved event name`);if(t.unshift(e),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(t),this;let n={type:W.EVENT,data:t};if(n.options={},n.options.compress=this.flags.compress!==!1,typeof t[t.length-1]==`function`){let e=this.ids++,r=t.pop();this._registerAckCallback(e,r),n.id=e}let r=this.io.engine?.transport?.writable,i=this.connected&&!this.io.engine?._hasPingExpired();return this.flags.volatile&&!r||(i?(this.notifyOutgoingListeners(n),this.packet(n)):this.sendBuffer.push(n)),this.flags={},this}_registerAckCallback(e,t){let n=this.flags.timeout??this._opts.ackTimeout;if(n===void 0){this.acks[e]=t;return}let r=this.io.setTimeoutFn(()=>{delete this.acks[e];for(let t=0;t<this.sendBuffer.length;t++)this.sendBuffer[t].id===e&&this.sendBuffer.splice(t,1);t.call(this,Error(`operation has timed out`))},n),i=(...e)=>{this.io.clearTimeoutFn(r),t.apply(this,e)};i.withError=!0,this.acks[e]=i}emitWithAck(e,...t){return new Promise((n,r)=>{let i=(e,t)=>e?r(e):n(t);i.withError=!0,t.push(i),this.emit(e,...t)})}_addToQueue(e){let t;typeof e[e.length-1]==`function`&&(t=e.pop());let n={id:this._queueSeq++,tryCount:0,pending:!1,args:e,flags:Object.assign({fromQueue:!0},this.flags)};e.push((e,...r)=>(this._queue[0],e===null?(this._queue.shift(),t&&t(null,...r)):n.tryCount>this._opts.retries&&(this._queue.shift(),t&&t(e)),n.pending=!1,this._drainQueue())),this._queue.push(n),this._drainQueue()}_drainQueue(e=!1){if(!this.connected||this._queue.length===0)return;let t=this._queue[0];t.pending&&!e||(t.pending=!0,t.tryCount++,this.flags=t.flags,this.emit.apply(this,t.args))}packet(e){e.nsp=this.nsp,this.io._packet(e)}onopen(){typeof this.auth==`function`?this.auth(e=>{this._sendConnectPacket(e)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(e){this.packet({type:W.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},e):e})}onerror(e){this.connected||this.emitReserved(`connect_error`,e)}onclose(e,t){this.connected=!1,delete this.id,this.emitReserved(`disconnect`,e,t),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach(e=>{if(!this.sendBuffer.some(t=>String(t.id)===e)){let t=this.acks[e];delete this.acks[e],t.withError&&t.call(this,Error(`socket has been disconnected`))}})}onpacket(e){if(e.nsp===this.nsp)switch(e.type){case W.CONNECT:e.data&&e.data.sid?this.onconnect(e.data.sid,e.data.pid):this.emitReserved(`connect_error`,Error(`It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)`));break;case W.EVENT:case W.BINARY_EVENT:this.onevent(e);break;case W.ACK:case W.BINARY_ACK:this.onack(e);break;case W.DISCONNECT:this.ondisconnect();break;case W.CONNECT_ERROR:this.destroy();let t=Error(e.data.message);t.data=e.data.data,this.emitReserved(`connect_error`,t);break}}onevent(e){let t=e.data||[];e.id!=null&&t.push(this.ack(e.id)),this.connected?this.emitEvent(t):this.receiveBuffer.push(Object.freeze(t))}emitEvent(e){if(this._anyListeners&&this._anyListeners.length){let t=this._anyListeners.slice();for(let n of t)n.apply(this,e)}super.emit.apply(this,e),this._pid&&e.length&&typeof e[e.length-1]==`string`&&(this._lastOffset=e[e.length-1])}ack(e){let t=this,n=!1;return function(...r){n||(n=!0,t.packet({type:W.ACK,id:e,data:r}))}}onack(e){let t=this.acks[e.id];typeof t==`function`&&(delete this.acks[e.id],t.withError&&e.data.unshift(null),t.apply(this,e.data))}onconnect(e,t){this.id=e,this.recovered=t&&this._pid===t,this._pid=t,this.connected=!0,this.emitBuffered(),this._drainQueue(!0),this.emitReserved(`connect`)}emitBuffered(){this.receiveBuffer.forEach(e=>this.emitEvent(e)),this.receiveBuffer=[],this.sendBuffer.forEach(e=>{this.notifyOutgoingListeners(e),this.packet(e)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose(`io server disconnect`)}destroy(){this.subs&&=(this.subs.forEach(e=>e()),void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:W.DISCONNECT}),this.destroy(),this.connected&&this.onclose(`io client disconnect`),this}close(){return this.disconnect()}compress(e){return this.flags.compress=e,this}get volatile(){return this.flags.volatile=!0,this}timeout(e){return this.flags.timeout=e,this}onAny(e){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(e),this}prependAny(e){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(e),this}offAny(e){if(!this._anyListeners)return this;if(e){let t=this._anyListeners;for(let n=0;n<t.length;n++)if(e===t[n])return t.splice(n,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(e){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(e),this}prependAnyOutgoing(e){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(e),this}offAnyOutgoing(e){if(!this._anyOutgoingListeners)return this;if(e){let t=this._anyOutgoingListeners;for(let n=0;n<t.length;n++)if(e===t[n])return t.splice(n,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(e){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){let t=this._anyOutgoingListeners.slice();for(let n of t)n.apply(this,e.data)}}};function X(e){e||={},this.ms=e.min||100,this.max=e.max||1e4,this.factor=e.factor||2,this.jitter=e.jitter>0&&e.jitter<=1?e.jitter:0,this.attempts=0}X.prototype.duration=function(){var e=this.ms*this.factor**+this.attempts++;if(this.jitter){var t=Math.random(),n=Math.floor(t*this.jitter*e);e=Math.floor(t*10)&1?e+n:e-n}return Math.min(e,this.max)|0},X.prototype.reset=function(){this.attempts=0},X.prototype.setMin=function(e){this.ms=e},X.prototype.setMax=function(e){this.max=e},X.prototype.setJitter=function(e){this.jitter=e};var Z=class extends y{constructor(e,t){super(),this.nsps={},this.subs=[],e&&typeof e==`object`&&(t=e,e=void 0),t||={},t.path=t.path||`/socket.io`,this.opts=t,w(this,t),this.reconnection(t.reconnection!==!1),this.reconnectionAttempts(t.reconnectionAttempts||1/0),this.reconnectionDelay(t.reconnectionDelay||1e3),this.reconnectionDelayMax(t.reconnectionDelayMax||5e3),this.randomizationFactor(t.randomizationFactor??.5),this.backoff=new X({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(t.timeout==null?2e4:t.timeout),this._readyState=`closed`,this.uri=e;let n=t.parser||Le;this.encoder=new n.Encoder,this.decoder=new n.Decoder,this._autoConnect=t.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(e){return arguments.length?(this._reconnection=!!e,e||(this.skipReconnect=!0),this):this._reconnection}reconnectionAttempts(e){return e===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=e,this)}reconnectionDelay(e){var t;return e===void 0?this._reconnectionDelay:(this._reconnectionDelay=e,(t=this.backoff)==null||t.setMin(e),this)}randomizationFactor(e){var t;return e===void 0?this._randomizationFactor:(this._randomizationFactor=e,(t=this.backoff)==null||t.setJitter(e),this)}reconnectionDelayMax(e){var t;return e===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=e,(t=this.backoff)==null||t.setMax(e),this)}timeout(e){return arguments.length?(this._timeout=e,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(e){if(~this._readyState.indexOf(`open`))return this;this.engine=new L(this.uri,this.opts);let t=this.engine,n=this;this._readyState=`opening`,this.skipReconnect=!1;let r=J(t,`open`,function(){n.onopen(),e&&e()}),i=t=>{this.cleanup(),this._readyState=`closed`,this.emitReserved(`error`,t),e?e(t):this.maybeReconnectOnOpen()},a=J(t,`error`,i);if(!1!==this._timeout){let e=this._timeout,n=this.setTimeoutFn(()=>{r(),i(Error(`timeout`)),t.close()},e);this.opts.autoUnref&&n.unref(),this.subs.push(()=>{this.clearTimeoutFn(n)})}return this.subs.push(r),this.subs.push(a),this}connect(e){return this.open(e)}onopen(){this.cleanup(),this._readyState=`open`,this.emitReserved(`open`);let e=this.engine;this.subs.push(J(e,`ping`,this.onping.bind(this)),J(e,`data`,this.ondata.bind(this)),J(e,`error`,this.onerror.bind(this)),J(e,`close`,this.onclose.bind(this)),J(this.decoder,`decoded`,this.ondecoded.bind(this)))}onping(){this.emitReserved(`ping`)}ondata(e){try{this.decoder.add(e)}catch(e){this.onclose(`parse error`,e)}}ondecoded(e){x(()=>{this.emitReserved(`packet`,e)},this.setTimeoutFn)}onerror(e){this.emitReserved(`error`,e)}socket(e,t){let n=this.nsps[e];return n?this._autoConnect&&!n.active&&n.connect():(n=new Y(this,e,t),this.nsps[e]=n),n}_destroy(e){let t=Object.keys(this.nsps);for(let e of t)if(this.nsps[e].active)return;this._close()}_packet(e){let t=this.encoder.encode(e);for(let n=0;n<t.length;n++)this.engine.write(t[n],e.options)}cleanup(){this.subs.forEach(e=>e()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose(`forced close`)}disconnect(){return this._close()}onclose(e,t){var n;this.cleanup(),(n=this.engine)==null||n.close(),this.backoff.reset(),this._readyState=`closed`,this.emitReserved(`close`,e,t),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;let e=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved(`reconnect_failed`),this._reconnecting=!1;else{let t=this.backoff.duration();this._reconnecting=!0;let n=this.setTimeoutFn(()=>{e.skipReconnect||(this.emitReserved(`reconnect_attempt`,e.backoff.attempts),!e.skipReconnect&&e.open(t=>{t?(e._reconnecting=!1,e.reconnect(),this.emitReserved(`reconnect_error`,t)):e.onreconnect()}))},t);this.opts.autoUnref&&n.unref(),this.subs.push(()=>{this.clearTimeoutFn(n)})}}onreconnect(){let e=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved(`reconnect`,e)}},Q={};function $(e,t){typeof e==`object`&&(t=e,e=void 0),t||={};let n=Ae(e,t.path||`/socket.io`),r=n.source,i=n.id,a=n.path,o=Q[i]&&a in Q[i].nsps,s=t.forceNew||t[`force new connection`]||!1===t.multiplex||o,c;return s?c=new Z(r,t):(Q[i]||(Q[i]=new Z(r,t)),c=Q[i]),n.query&&!t.query&&(t.query=n.queryKey),c.socket(n.path,t)}Object.assign($,{Manager:Z,Socket:Y,io:$,connect:$});export{$ as t};28 unmodified lines2930313232333435363637383928 unmodified lines<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&family=Montserrat:wght@400;500;600;700;800;900&family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=Unbounded:wght@700&family=Onest:wght@400&display=swap" rel="stylesheet">
<link href="https://cdn.jsdelivr.net/npm/@fontsource/gilroy@5.1.0/700.css" rel="stylesheet">
<title>4SEND Messenger</title>
<script type="module" crossorigin src="/assets/index-TzFhLqMV.js"></script> <script type="module" crossorigin src="/assets/index-D9bgO9HY.js"></script> <link rel="modulepreload" crossorigin href="/assets/rolldown-runtime-QTnfLwEv.js"> <link rel="modulepreload" crossorigin href="/assets/vendor-BbmWO_jh.js"> <link rel="modulepreload" crossorigin href="/assets/socket-CbQsWyoH.js"> <link rel="stylesheet" crossorigin href="/assets/index-BIWOTFf5.css"> <link rel="stylesheet" crossorigin href="/assets/index-49caZLjx.css"><link rel="manifest" href="/manifest.webmanifest"><script id="vite-plugin-pwa:register-sw" src="/registerSW.js"></script></head>
<body>
<div id="root"></div>
11try{self[`workbox:core:7.4.0`]&&_()}catch{}var e=(e,...t)=>{let n=e;return t.length>0&&(n+=` :: ${JSON.stringify(t)}`),n},t=class extends Error{constructor(t,n){let r=e(t,n);super(r),this.name=t,this.details=n}},n={googleAnalytics:`googleAnalytics`,precache:`precache-v2`,prefix:`workbox`,runtime:`runtime`,suffix:typeof registration<`u`?registration.scope:``},r=e=>[n.prefix,e,n.suffix].filter(e=>e&&e.length>0).join(`-`),i=e=>{for(let t of Object.keys(n))e(t)},a={updateDetails:e=>{i(t=>{typeof e[t]==`string`&&(n[t]=e[t])})},getGoogleAnalyticsName:e=>e||r(n.googleAnalytics),getPrecacheName:e=>e||r(n.precache),getPrefix:()=>n.prefix,getRuntimeName:e=>e||r(n.runtime),getSuffix:()=>n.suffix};function o(e,t){let n=t();return e.waitUntil(n),n}try{self[`workbox:precaching:7.4.0`]&&_()}catch{}var s=`__WB_REVISION__`;function c(e){if(!e)throw new t(`add-to-cache-list-unexpected-type`,{entry:e});if(typeof e==`string`){let t=new URL(e,location.href);return{cacheKey:t.href,url:t.href}}let{revision:n,url:r}=e;if(!r)throw new t(`add-to-cache-list-unexpected-type`,{entry:e});if(!n){let e=new URL(r,location.href);return{cacheKey:e.href,url:e.href}}let i=new URL(r,location.href),a=new URL(r,location.href);return i.searchParams.set(s,n),{cacheKey:i.href,url:a.href}}var l=class{constructor(){this.updatedURLs=[],this.notUpdatedURLs=[],this.handlerWillStart=async({request:e,state:t})=>{t&&(t.originalRequest=e)},this.cachedResponseWillBeUsed=async({event:e,state:t,cachedResponse:n})=>{if(e.type===`install`&&t&&t.originalRequest&&t.originalRequest instanceof Request){let e=t.originalRequest.url;n?this.notUpdatedURLs.push(e):this.updatedURLs.push(e)}return n}}},u=class{constructor({precacheController:e}){this.cacheKeyWillBeUsed=async({request:e,params:t})=>{let n=t?.cacheKey||this._precacheController.getCacheKeyForURL(e.url);return n?new Request(n,{headers:e.headers}):e},this._precacheController=e}},d;function f(){if(d===void 0){let e=new Response(``);if(`body`in e)try{new Response(e.body),d=!0}catch{d=!1}d=!1}return d}async function p(e,n){let r=null;if(e.url&&(r=new URL(e.url).origin),r!==self.location.origin)throw new t(`cross-origin-copy-response`,{origin:r});let i=e.clone(),a={headers:new Headers(i.headers),status:i.status,statusText:i.statusText},o=n?n(a):a,s=f()?i.body:await i.blob();return new Response(s,o)}var ee=e=>new URL(String(e),location.href).href.replace(RegExp(`^${location.origin}`),``);function m(e,t){let n=new URL(e);for(let e of t)n.searchParams.delete(e);return n.href}async function h(e,t,n,r){let i=m(t.url,n);if(t.url===i)return e.match(t,r);let a=Object.assign(Object.assign({},r),{ignoreSearch:!0}),o=await e.keys(t,a);for(let t of o)if(i===m(t.url,n))return e.match(t,r)}var g=class{constructor(){this.promise=new Promise((e,t)=>{this.resolve=e,this.reject=t})}},v=new Set;async function y(){for(let e of v)await e()}function te(e){return new Promise(t=>setTimeout(t,e))}try{self[`workbox:strategies:7.4.0`]&&_()}catch{}function b(e){return typeof e==`string`?new Request(e):e}var ne=class{constructor(e,t){this._cacheKeys={},Object.assign(this,t),this.event=t.event,this._strategy=e,this._handlerDeferred=new g,this._extendLifetimePromises=[],this._plugins=[...e.plugins],this._pluginStateMap=new Map;for(let e of this._plugins)this._pluginStateMap.set(e,{});this.event.waitUntil(this._handlerDeferred.promise)}async fetch(e){let{event:n}=this,r=b(e);if(r.mode===`navigate`&&n instanceof FetchEvent&&n.preloadResponse){let e=await n.preloadResponse;if(e)return e}let i=this.hasCallback(`fetchDidFail`)?r.clone():null;try{for(let e of this.iterateCallbacks(`requestWillFetch`))r=await e({request:r.clone(),event:n})}catch(e){if(e instanceof Error)throw new t(`plugin-error-request-will-fetch`,{thrownErrorMessage:e.message})}let a=r.clone();try{let e;e=await fetch(r,r.mode===`navigate`?void 0:this._strategy.fetchOptions);for(let t of this.iterateCallbacks(`fetchDidSucceed`))e=await t({event:n,request:a,response:e});return e}catch(e){throw i&&await this.runCallbacks(`fetchDidFail`,{error:e,event:n,originalRequest:i.clone(),request:a.clone()}),e}}async fetchAndCachePut(e){let t=await this.fetch(e),n=t.clone();return this.waitUntil(this.cachePut(e,n)),t}async cacheMatch(e){let t=b(e),n,{cacheName:r,matchOptions:i}=this._strategy,a=await this.getCacheKey(t,`read`),o=Object.assign(Object.assign({},i),{cacheName:r});n=await caches.match(a,o);for(let e of this.iterateCallbacks(`cachedResponseWillBeUsed`))n=await e({cacheName:r,matchOptions:i,cachedResponse:n,request:a,event:this.event})||void 0;return n}async cachePut(e,n){let r=b(e);await te(0);let i=await this.getCacheKey(r,`write`);if(!n)throw new t(`cache-put-with-no-response`,{url:ee(i.url)});let a=await this._ensureResponseSafeToCache(n);if(!a)return!1;let{cacheName:o,matchOptions:s}=this._strategy,c=await self.caches.open(o),l=this.hasCallback(`cacheDidUpdate`),u=l?await h(c,i.clone(),[`__WB_REVISION__`],s):null;try{await c.put(i,l?a.clone():a)}catch(e){if(e instanceof Error)throw e.name===`QuotaExceededError`&&await y(),e}for(let e of this.iterateCallbacks(`cacheDidUpdate`))await e({cacheName:o,oldResponse:u,newResponse:a.clone(),request:i,event:this.event});return!0}async getCacheKey(e,t){let n=`${e.url} | ${t}`;if(!this._cacheKeys[n]){let r=e;for(let e of this.iterateCallbacks(`cacheKeyWillBeUsed`))r=b(await e({mode:t,request:r,event:this.event,params:this.params}));this._cacheKeys[n]=r}return this._cacheKeys[n]}hasCallback(e){for(let t of this._strategy.plugins)if(e in t)return!0;return!1}async runCallbacks(e,t){for(let n of this.iterateCallbacks(e))await n(t)}*iterateCallbacks(e){for(let t of this._strategy.plugins)if(typeof t[e]==`function`){let n=this._pluginStateMap.get(t);yield r=>{let i=Object.assign(Object.assign({},r),{state:n});return t[e](i)}}}waitUntil(e){return this._extendLifetimePromises.push(e),e}async doneWaiting(){for(;this._extendLifetimePromises.length;){let e=this._extendLifetimePromises.splice(0),t=(await Promise.allSettled(e)).find(e=>e.status===`rejected`);if(t)throw t.reason}}destroy(){this._handlerDeferred.resolve(null)}async _ensureResponseSafeToCache(e){let t=e,n=!1;for(let e of this.iterateCallbacks(`cacheWillUpdate`))if(t=await e({request:this.request,response:t,event:this.event})||void 0,n=!0,!t)break;return n||t&&t.status!==200&&(t=void 0),t}},x=class{constructor(e={}){this.cacheName=a.getRuntimeName(e.cacheName),this.plugins=e.plugins||[],this.fetchOptions=e.fetchOptions,this.matchOptions=e.matchOptions}handle(e){let[t]=this.handleAll(e);return t}handleAll(e){e instanceof FetchEvent&&(e={event:e,request:e.request});let t=e.event,n=typeof e.request==`string`?new Request(e.request):e.request,r=`params`in e?e.params:void 0,i=new ne(this,{event:t,request:n,params:r}),a=this._getResponse(i,n,t);return[a,this._awaitComplete(a,i,n,t)]}async _getResponse(e,n,r){await e.runCallbacks(`handlerWillStart`,{event:r,request:n});let i;try{if(i=await this._handle(n,e),!i||i.type===`error`)throw new t(`no-response`,{url:n.url})}catch(t){if(t instanceof Error){for(let a of e.iterateCallbacks(`handlerDidError`))if(i=await a({error:t,event:r,request:n}),i)break}if(!i)throw t}for(let t of e.iterateCallbacks(`handlerWillRespond`))i=await t({event:r,request:n,response:i});return i}async _awaitComplete(e,t,n,r){let i,a;try{i=await e}catch{}try{await t.runCallbacks(`handlerDidRespond`,{event:r,request:n,response:i}),await t.doneWaiting()}catch(e){e instanceof Error&&(a=e)}if(await t.runCallbacks(`handlerDidComplete`,{event:r,request:n,response:i,error:a}),t.destroy(),a)throw a}},S=class e extends x{constructor(t={}){t.cacheName=a.getPrecacheName(t.cacheName),super(t),this._fallbackToNetwork=t.fallbackToNetwork!==!1,this.plugins.push(e.copyRedirectedCacheableResponsesPlugin)}async _handle(e,t){return await t.cacheMatch(e)||(t.event&&t.event.type===`install`?await this._handleInstall(e,t):await this._handleFetch(e,t))}async _handleFetch(e,n){let r,i=n.params||{};if(this._fallbackToNetwork){let t=i.integrity,a=e.integrity,o=!a||a===t;r=await n.fetch(new Request(e,{integrity:e.mode===`no-cors`?void 0:a||t})),t&&o&&e.mode!==`no-cors`&&(this._useDefaultCacheabilityPluginIfNeeded(),await n.cachePut(e,r.clone()))}else throw new t(`missing-precache-entry`,{cacheName:this.cacheName,url:e.url});return r}async _handleInstall(e,n){this._useDefaultCacheabilityPluginIfNeeded();let r=await n.fetch(e);if(!await n.cachePut(e,r.clone()))throw new t(`bad-precaching-response`,{url:e.url,status:r.status});return r}_useDefaultCacheabilityPluginIfNeeded(){let t=null,n=0;for(let[r,i]of this.plugins.entries())i!==e.copyRedirectedCacheableResponsesPlugin&&(i===e.defaultPrecacheCacheabilityPlugin&&(t=r),i.cacheWillUpdate&&n++);n===0?this.plugins.push(e.defaultPrecacheCacheabilityPlugin):n>1&&t!==null&&this.plugins.splice(t,1)}};S.defaultPrecacheCacheabilityPlugin={async cacheWillUpdate({response:e}){return!e||e.status>=400?null:e}},S.copyRedirectedCacheableResponsesPlugin={async cacheWillUpdate({response:e}){return e.redirected?await p(e):e}};var C=class{constructor({cacheName:e,plugins:t=[],fallbackToNetwork:n=!0}={}){this._urlsToCacheKeys=new Map,this._urlsToCacheModes=new Map,this._cacheKeysToIntegrities=new Map,this._strategy=new S({cacheName:a.getPrecacheName(e),plugins:[...t,new u({precacheController:this})],fallbackToNetwork:n}),this.install=this.install.bind(this),this.activate=this.activate.bind(this)}get strategy(){return this._strategy}precache(e){this.addToCacheList(e),this._installAndActiveListenersAdded||=(self.addEventListener(`install`,this.install),self.addEventListener(`activate`,this.activate),!0)}addToCacheList(e){let n=[];for(let r of e){typeof r==`string`?n.push(r):r&&r.revision===void 0&&n.push(r.url);let{cacheKey:e,url:i}=c(r),a=typeof r!=`string`&&r.revision?`reload`:`default`;if(this._urlsToCacheKeys.has(i)&&this._urlsToCacheKeys.get(i)!==e)throw new t(`add-to-cache-list-conflicting-entries`,{firstEntry:this._urlsToCacheKeys.get(i),secondEntry:e});if(typeof r!=`string`&&r.integrity){if(this._cacheKeysToIntegrities.has(e)&&this._cacheKeysToIntegrities.get(e)!==r.integrity)throw new t(`add-to-cache-list-conflicting-integrities`,{url:i});this._cacheKeysToIntegrities.set(e,r.integrity)}if(this._urlsToCacheKeys.set(i,e),this._urlsToCacheModes.set(i,a),n.length>0){let e=`Workbox is precaching URLs without revision info: ${n.join(`, `)}\nThis is generally NOT safe. Learn more at https://bit.ly/wb-precache`;console.warn(e)}}}install(e){return o(e,async()=>{let t=new l;this.strategy.plugins.push(t);for(let[t,n]of this._urlsToCacheKeys){let r=this._cacheKeysToIntegrities.get(n),i=this._urlsToCacheModes.get(t),a=new Request(t,{integrity:r,cache:i,credentials:`same-origin`});await Promise.all(this.strategy.handleAll({params:{cacheKey:n},request:a,event:e}))}let{updatedURLs:n,notUpdatedURLs:r}=t;return{updatedURLs:n,notUpdatedURLs:r}})}activate(e){return o(e,async()=>{let e=await self.caches.open(this.strategy.cacheName),t=await e.keys(),n=new Set(this._urlsToCacheKeys.values()),r=[];for(let i of t)n.has(i.url)||(await e.delete(i),r.push(i.url));return{deletedURLs:r}})}getURLsToCacheKeys(){return this._urlsToCacheKeys}getCachedURLs(){return[...this._urlsToCacheKeys.keys()]}getCacheKeyForURL(e){let t=new URL(e,location.href);return this._urlsToCacheKeys.get(t.href)}getIntegrityForCacheKey(e){return this._cacheKeysToIntegrities.get(e)}async matchPrecache(e){let t=e instanceof Request?e.url:e,n=this.getCacheKeyForURL(t);if(n)return(await self.caches.open(this.strategy.cacheName)).match(n)}createHandlerBoundToURL(e){let n=this.getCacheKeyForURL(e);if(!n)throw new t(`non-precached-url`,{url:e});return t=>(t.request=new Request(e),t.params=Object.assign({cacheKey:n},t.params),this.strategy.handle(t))}},w,T=()=>(w||=new C,w);try{self[`workbox:routing:7.4.0`]&&_()}catch{}var E=e=>e&&typeof e==`object`?e:{handle:e},D=class{constructor(e,t,n=`GET`){this.handler=E(t),this.match=e,this.method=n}setCatchHandler(e){this.catchHandler=E(e)}},re=class extends D{constructor(e,t,n){super(({url:t})=>{let n=e.exec(t.href);if(n&&!(t.origin!==location.origin&&n.index!==0))return n.slice(1)},t,n)}},ie=class{constructor(){this._routes=new Map,this._defaultHandlerMap=new Map}get routes(){return this._routes}addFetchListener(){self.addEventListener(`fetch`,(e=>{let{request:t}=e,n=this.handleRequest({request:t,event:e});n&&e.respondWith(n)}))}addCacheListener(){self.addEventListener(`message`,(e=>{if(e.data&&e.data.type===`CACHE_URLS`){let{payload:t}=e.data,n=Promise.all(t.urlsToCache.map(t=>{typeof t==`string`&&(t=[t]);let n=new Request(...t);return this.handleRequest({request:n,event:e})}));e.waitUntil(n),e.ports&&e.ports[0]&&n.then(()=>e.ports[0].postMessage(!0))}}))}handleRequest({request:e,event:t}){let n=new URL(e.url,location.href);if(!n.protocol.startsWith(`http`))return;let r=n.origin===location.origin,{params:i,route:a}=this.findMatchingRoute({event:t,request:e,sameOrigin:r,url:n}),o=a&&a.handler,s=e.method;if(!o&&this._defaultHandlerMap.has(s)&&(o=this._defaultHandlerMap.get(s)),!o)return;let c;try{c=o.handle({url:n,request:e,event:t,params:i})}catch(e){c=Promise.reject(e)}let l=a&&a.catchHandler;return c instanceof Promise&&(this._catchHandler||l)&&(c=c.catch(async r=>{if(l)try{return await l.handle({url:n,request:e,event:t,params:i})}catch(e){e instanceof Error&&(r=e)}if(this._catchHandler)return this._catchHandler.handle({url:n,request:e,event:t});throw r})),c}findMatchingRoute({url:e,sameOrigin:t,request:n,event:r}){let i=this._routes.get(n.method)||[];for(let a of i){let i,o=a.match({url:e,sameOrigin:t,request:n,event:r});if(o)return i=o,(Array.isArray(i)&&i.length===0||o.constructor===Object&&Object.keys(o).length===0||typeof o==`boolean`)&&(i=void 0),{route:a,params:i}}return{}}setDefaultHandler(e,t=`GET`){this._defaultHandlerMap.set(t,E(e))}setCatchHandler(e){this._catchHandler=E(e)}registerRoute(e){this._routes.has(e.method)||this._routes.set(e.method,[]),this._routes.get(e.method).push(e)}unregisterRoute(e){if(!this._routes.has(e.method))throw new t(`unregister-route-but-not-found-with-method`,{method:e.method});let n=this._routes.get(e.method).indexOf(e);if(n>-1)this._routes.get(e.method).splice(n,1);else throw new t(`unregister-route-route-not-registered`)}},O,ae=()=>(O||(O=new ie,O.addFetchListener(),O.addCacheListener()),O);function k(e,n,r){let i;if(typeof e==`string`){let t=new URL(e,location.href);i=new D(({url:e})=>e.href===t.href,n,r)}else if(e instanceof RegExp)i=new re(e,n,r);else if(typeof e==`function`)i=new D(e,n,r);else if(e instanceof D)i=e;else throw new t(`unsupported-route-type`,{moduleName:`workbox-routing`,funcName:`registerRoute`,paramName:`capture`});return ae().registerRoute(i),i}function oe(e,t=[]){for(let n of[...e.searchParams.keys()])t.some(e=>e.test(n))&&e.searchParams.delete(n);return e}function*se(e,{ignoreURLParametersMatching:t=[/^utm_/,/^fbclid$/],directoryIndex:n=`index.html`,cleanURLs:r=!0,urlManipulation:i}={}){let a=new URL(e,location.href);a.hash=``,yield a.href;let o=oe(a,t);if(yield o.href,n&&o.pathname.endsWith(`/`)){let e=new URL(o.href);e.pathname+=n,yield e.href}if(r){let e=new URL(o.href);e.pathname+=`.html`,yield e.href}if(i){let e=i({url:a});for(let t of e)yield t.href}}var A=class extends D{constructor(e,t){super(({request:n})=>{let r=e.getURLsToCacheKeys();for(let i of se(n.url,t)){let t=r.get(i);if(t)return{cacheKey:t,integrity:e.getIntegrityForCacheKey(t)}}},e.strategy)}};function j(e){k(new A(T(),e))}function M(e){T().precache(e)}function N(e,t){M(e),j(t)}var P=class extends x{async _handle(e,n){let r=await n.cacheMatch(e),i;if(!r)try{r=await n.fetchAndCachePut(e)}catch(e){e instanceof Error&&(i=e)}if(!r)throw new t(`no-response`,{url:e.url,error:i});return r}};function F(e){e.then(()=>{})}var I=(e,t)=>t.some(t=>e instanceof t),L,R;function z(){return L||=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction]}function B(){return R||=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey]}var V=new WeakMap,H=new WeakMap,U=new WeakMap,W=new WeakMap,G=new WeakMap;function ce(e){let t=new Promise((t,n)=>{let r=()=>{e.removeEventListener(`success`,i),e.removeEventListener(`error`,a)},i=()=>{t(q(e.result)),r()},a=()=>{n(e.error),r()};e.addEventListener(`success`,i),e.addEventListener(`error`,a)});return t.then(t=>{t instanceof IDBCursor&&V.set(t,e)}).catch(()=>{}),G.set(t,e),t}function le(e){if(H.has(e))return;let t=new Promise((t,n)=>{let r=()=>{e.removeEventListener(`complete`,i),e.removeEventListener(`error`,a),e.removeEventListener(`abort`,a)},i=()=>{t(),r()},a=()=>{n(e.error||new DOMException(`AbortError`,`AbortError`)),r()};e.addEventListener(`complete`,i),e.addEventListener(`error`,a),e.addEventListener(`abort`,a)});H.set(e,t)}var K={get(e,t,n){if(e instanceof IDBTransaction){if(t===`done`)return H.get(e);if(t===`objectStoreNames`)return e.objectStoreNames||U.get(e);if(t===`store`)return n.objectStoreNames[1]?void 0:n.objectStore(n.objectStoreNames[0])}return q(e[t])},set(e,t,n){return e[t]=n,!0},has(e,t){return e instanceof IDBTransaction&&(t===`done`||t===`store`)||t in e}};function ue(e){K=e(K)}function de(e){return e===IDBDatabase.prototype.transaction&&!(`objectStoreNames`in IDBTransaction.prototype)?function(t,...n){let r=e.call(J(this),t,...n);return U.set(r,t.sort?t.sort():[t]),q(r)}:B().includes(e)?function(...t){return e.apply(J(this),t),q(V.get(this))}:function(...t){return q(e.apply(J(this),t))}}function fe(e){return typeof e==`function`?de(e):(e instanceof IDBTransaction&&le(e),I(e,z())?new Proxy(e,K):e)}function q(e){if(e instanceof IDBRequest)return ce(e);if(W.has(e))return W.get(e);let t=fe(e);return t!==e&&(W.set(e,t),G.set(t,e)),t}var J=e=>G.get(e);function pe(e,t,{blocked:n,upgrade:r,blocking:i,terminated:a}={}){let o=indexedDB.open(e,t),s=q(o);return r&&o.addEventListener(`upgradeneeded`,e=>{r(q(o.result),e.oldVersion,e.newVersion,q(o.transaction),e)}),n&&o.addEventListener(`blocked`,e=>n(e.oldVersion,e.newVersion,e)),s.then(e=>{a&&e.addEventListener(`close`,()=>a()),i&&e.addEventListener(`versionchange`,e=>i(e.oldVersion,e.newVersion,e))}).catch(()=>{}),s}function me(e,{blocked:t}={}){let n=indexedDB.deleteDatabase(e);return t&&n.addEventListener(`blocked`,e=>t(e.oldVersion,e)),q(n).then(()=>void 0)}var he=[`get`,`getKey`,`getAll`,`getAllKeys`,`count`],ge=[`put`,`add`,`delete`,`clear`],Y=new Map;function X(e,t){if(!(e instanceof IDBDatabase&&!(t in e)&&typeof t==`string`))return;if(Y.get(t))return Y.get(t);let n=t.replace(/FromIndex$/,``),r=t!==n,i=ge.includes(n);if(!(n in(r?IDBIndex:IDBObjectStore).prototype)||!(i||he.includes(n)))return;let a=async function(e,...t){let a=this.transaction(e,i?`readwrite`:`readonly`),o=a.store;return r&&(o=o.index(t.shift())),(await Promise.all([o[n](...t),i&&a.done]))[0]};return Y.set(t,a),a}ue(e=>({...e,get:(t,n,r)=>X(t,n)||e.get(t,n,r),has:(t,n)=>!!X(t,n)||e.has(t,n)}));try{self[`workbox:expiration:7.4.0`]&&_()}catch{}var Z=`workbox-expiration`,Q=`cache-entries`,$=e=>{let t=new URL(e,location.href);return t.hash=``,t.href},_e=class{constructor(e){this._db=null,this._cacheName=e}_upgradeDb(e){let t=e.createObjectStore(Q,{keyPath:`id`});t.createIndex(`cacheName`,`cacheName`,{unique:!1}),t.createIndex(`timestamp`,`timestamp`,{unique:!1})}_upgradeDbAndDeleteOldDbs(e){this._upgradeDb(e),this._cacheName&&me(this._cacheName)}async setTimestamp(e,t){e=$(e);let n={url:e,timestamp:t,cacheName:this._cacheName,id:this._getId(e)},r=(await this.getDb()).transaction(Q,`readwrite`,{durability:`relaxed`});await r.store.put(n),await r.done}async getTimestamp(e){return(await(await this.getDb()).get(Q,this._getId(e)))?.timestamp}async expireEntries(e,t){let n=await this.getDb(),r=await n.transaction(Q).store.index(`timestamp`).openCursor(null,`prev`),i=[],a=0;for(;r;){let n=r.value;n.cacheName===this._cacheName&&(e&&n.timestamp<e||t&&a>=t?i.push(r.value):a++),r=await r.continue()}let o=[];for(let e of i)await n.delete(Q,e.id),o.push(e.url);return o}_getId(e){return this._cacheName+`|`+$(e)}async getDb(){return this._db||=await pe(Z,1,{upgrade:this._upgradeDbAndDeleteOldDbs.bind(this)}),this._db}},ve=class{constructor(e,t={}){this._isRunning=!1,this._rerunRequested=!1,this._maxEntries=t.maxEntries,this._maxAgeSeconds=t.maxAgeSeconds,this._matchOptions=t.matchOptions,this._cacheName=e,this._timestampModel=new _e(e)}async expireEntries(){if(this._isRunning){this._rerunRequested=!0;return}this._isRunning=!0;let e=this._maxAgeSeconds?Date.now()-this._maxAgeSeconds*1e3:0,t=await this._timestampModel.expireEntries(e,this._maxEntries),n=await self.caches.open(this._cacheName);for(let e of t)await n.delete(e,this._matchOptions);this._isRunning=!1,this._rerunRequested&&(this._rerunRequested=!1,F(this.expireEntries()))}async updateTimestamp(e){await this._timestampModel.setTimestamp(e,Date.now())}async isURLExpired(e){if(this._maxAgeSeconds){let t=await this._timestampModel.getTimestamp(e),n=Date.now()-this._maxAgeSeconds*1e3;return t===void 0||t<n}else return!1}async delete(){this._rerunRequested=!1,await this._timestampModel.expireEntries(1/0)}};function ye(e){v.add(e)}var be=class{constructor(e={}){this.cachedResponseWillBeUsed=async({event:e,request:t,cacheName:n,cachedResponse:r})=>{if(!r)return null;let i=this._isResponseDateFresh(r),a=this._getCacheExpiration(n);F(a.expireEntries());let o=a.updateTimestamp(t.url);if(e)try{e.waitUntil(o)}catch{}return i?r:null},this.cacheDidUpdate=async({cacheName:e,request:t})=>{let n=this._getCacheExpiration(e);await n.updateTimestamp(t.url),await n.expireEntries()},this._config=e,this._maxAgeSeconds=e.maxAgeSeconds,this._cacheExpirations=new Map,e.purgeOnQuotaError&&ye(()=>this.deleteCacheAndMetadata())}_getCacheExpiration(e){if(e===a.getRuntimeName())throw new t(`expire-custom-caches-only`);let n=this._cacheExpirations.get(e);return n||(n=new ve(e,this._config),this._cacheExpirations.set(e,n)),n}_isResponseDateFresh(e){if(!this._maxAgeSeconds)return!0;let t=this._getDateHeaderTimestamp(e);return t===null||t>=Date.now()-this._maxAgeSeconds*1e3}_getDateHeaderTimestamp(e){if(!e.headers.has(`date`))return null;let t=e.headers.get(`date`),n=new Date(t).getTime();return isNaN(n)?null:n}async deleteCacheAndMetadata(){for(let[e,t]of this._cacheExpirations)await self.caches.delete(e),await t.delete();this._cacheExpirations=new Map}};N([{"revision":"7e6cb67aa9cf28050f2624e28a29f07e","url":"terms.html"},{"revision":"ee34904795012e3493a0c44b9f859308","url":"registerSW.js"},{"revision":"5be4c6cebfb9edbde2d13641ee401057","url":"privacy.html"},{"revision":"247dfacbec1ca7891c2e6a76c720a558","url":"pattern.svg"},{"revision":"f14cd675f0b6e7b885d32809abebae00","url":"notify.mp3"},{"revision":"fec96b0e7214962faeddaebe0b4a7c5a","url":"index.html"},{"revision":"3b4fcfcf393eca4d264dca4a4663bc37","url":"icons.svg"},{"revision":"f46670f29cd911c162da51b955221002","url":"ico.png"},{"revision":"c5e41a91215019a44cdff2c1de5c56a9","url":"changelog.html"},{"revision":"36d60b85b445b4770dc8202baa0d64cf","url":"calling2.mp3"},{"revision":"61ac15422af330e0204ee6cf95634067","url":"calling.mp3"},{"revision":null,"url":"assets/vendor-BbmWO_jh.js"},{"revision":null,"url":"assets/socket-CbQsWyoH.js"},{"revision":null,"url":"assets/rolldown-runtime-QTnfLwEv.js"},{"revision":null,"url":"assets/index-TzFhLqMV.js"},{"revision":null,"url":"assets/index-BIWOTFf5.css"},{"revision":null,"url":"assets/EmojiPanel-Bq2C54qO.js"},{"revision":null,"url":"assets/EmojiPanel-Bf-sbcJk.css"},{"revision":"61ac15422af330e0204ee6cf95634067","url":"calling.mp3"},{"revision":"36d60b85b445b4770dc8202baa0d64cf","url":"calling2.mp3"},{"revision":"f46670f29cd911c162da51b955221002","url":"ico.png"},{"revision":"f14cd675f0b6e7b885d32809abebae00","url":"notify.mp3"},{"revision":"5ba98964a3aeabde9f920bd5fa109422","url":"manifest.webmanifest"}]),k(({url:e})=>e.origin===`https://res.cloudinary.com`,new P({cacheName:`cloudinary-images`,plugins:[new be({maxEntries:100,maxAgeSeconds:3600*24*30})]})),self.addEventListener(`fetch`,e=>{let t=new URL(e.request.url);e.request.method===`POST`&&t.pathname===`/share-target`&&e.respondWith(xe(e.request))});async function xe(e){try{let t=(await e.formData()).get(`media`);if(t){let e=await caches.open(`shared-files`),n=await t.arrayBuffer();await e.put(`shared-file`,new Response(n,{headers:{"Content-Type":t.type,"X-File-Name":encodeURIComponent(t.name),"X-File-Size":String(t.size)}}))}}catch{}return Response.redirect(`/`,303)}self.addEventListener(`install`,()=>{self.skipWaiting()}),self.addEventListener(`activate`,e=>{e.waitUntil(self.clients.claim())}),self.addEventListener(`push`,e=>{let t={};try{t=e.data?e.data.json():{}}catch{t={title:`4SEND`,body:e.data?e.data.text():``}}let n=t.notification||t,r=n.title||t.title||`4SEND`,i=n.body||t.body||``,a=n.icon||`/ico.png`,o=n.click_action||t.data?.click_action||t.data?.url||`/`;e.waitUntil(self.registration.showNotification(r,{body:i,icon:a,data:{url:o},tag:`4send-notification`}))}),self.addEventListener(`notificationclick`,e=>{e.notification.close();let t=e.notification.data&&e.notification.data.url||`/`;e.waitUntil(self.clients.matchAll({type:`window`,includeUncontrolled:!0}).then(e=>{for(let n of e)if(n.focused)return n.navigate(t),n.focus();return e.length>0?e[0].navigate(t).then(e=>e&&e.focus()):self.clients.openWindow(t)}))});try{self[`workbox:core:7.4.0`]&&_()}catch{}var e=(e,...t)=>{let n=e;return t.length>0&&(n+=` :: ${JSON.stringify(t)}`),n},t=class extends Error{constructor(t,n){let r=e(t,n);super(r),this.name=t,this.details=n}},n={googleAnalytics:`googleAnalytics`,precache:`precache-v2`,prefix:`workbox`,runtime:`runtime`,suffix:typeof registration<`u`?registration.scope:``},r=e=>[n.prefix,e,n.suffix].filter(e=>e&&e.length>0).join(`-`),i=e=>{for(let t of Object.keys(n))e(t)},a={updateDetails:e=>{i(t=>{typeof e[t]==`string`&&(n[t]=e[t])})},getGoogleAnalyticsName:e=>e||r(n.googleAnalytics),getPrecacheName:e=>e||r(n.precache),getPrefix:()=>n.prefix,getRuntimeName:e=>e||r(n.runtime),getSuffix:()=>n.suffix};function o(e,t){let n=t();return e.waitUntil(n),n}try{self[`workbox:precaching:7.4.0`]&&_()}catch{}var s=`__WB_REVISION__`;function c(e){if(!e)throw new t(`add-to-cache-list-unexpected-type`,{entry:e});if(typeof e==`string`){let t=new URL(e,location.href);return{cacheKey:t.href,url:t.href}}let{revision:n,url:r}=e;if(!r)throw new t(`add-to-cache-list-unexpected-type`,{entry:e});if(!n){let e=new URL(r,location.href);return{cacheKey:e.href,url:e.href}}let i=new URL(r,location.href),a=new URL(r,location.href);return i.searchParams.set(s,n),{cacheKey:i.href,url:a.href}}var l=class{constructor(){this.updatedURLs=[],this.notUpdatedURLs=[],this.handlerWillStart=async({request:e,state:t})=>{t&&(t.originalRequest=e)},this.cachedResponseWillBeUsed=async({event:e,state:t,cachedResponse:n})=>{if(e.type===`install`&&t&&t.originalRequest&&t.originalRequest instanceof Request){let e=t.originalRequest.url;n?this.notUpdatedURLs.push(e):this.updatedURLs.push(e)}return n}}},u=class{constructor({precacheController:e}){this.cacheKeyWillBeUsed=async({request:e,params:t})=>{let n=t?.cacheKey||this._precacheController.getCacheKeyForURL(e.url);return n?new Request(n,{headers:e.headers}):e},this._precacheController=e}},d;function f(){if(d===void 0){let e=new Response(``);if(`body`in e)try{new Response(e.body),d=!0}catch{d=!1}d=!1}return d}async function p(e,n){let r=null;if(e.url&&(r=new URL(e.url).origin),r!==self.location.origin)throw new t(`cross-origin-copy-response`,{origin:r});let i=e.clone(),a={headers:new Headers(i.headers),status:i.status,statusText:i.statusText},o=n?n(a):a,s=f()?i.body:await i.blob();return new Response(s,o)}var ee=e=>new URL(String(e),location.href).href.replace(RegExp(`^${location.origin}`),``);function m(e,t){let n=new URL(e);for(let e of t)n.searchParams.delete(e);return n.href}async function h(e,t,n,r){let i=m(t.url,n);if(t.url===i)return e.match(t,r);let a=Object.assign(Object.assign({},r),{ignoreSearch:!0}),o=await e.keys(t,a);for(let t of o)if(i===m(t.url,n))return e.match(t,r)}var g=class{constructor(){this.promise=new Promise((e,t)=>{this.resolve=e,this.reject=t})}},v=new Set;async function y(){for(let e of v)await e()}function te(e){return new Promise(t=>setTimeout(t,e))}try{self[`workbox:strategies:7.4.0`]&&_()}catch{}function b(e){return typeof e==`string`?new Request(e):e}var ne=class{constructor(e,t){this._cacheKeys={},Object.assign(this,t),this.event=t.event,this._strategy=e,this._handlerDeferred=new g,this._extendLifetimePromises=[],this._plugins=[...e.plugins],this._pluginStateMap=new Map;for(let e of this._plugins)this._pluginStateMap.set(e,{});this.event.waitUntil(this._handlerDeferred.promise)}async fetch(e){let{event:n}=this,r=b(e);if(r.mode===`navigate`&&n instanceof FetchEvent&&n.preloadResponse){let e=await n.preloadResponse;if(e)return e}let i=this.hasCallback(`fetchDidFail`)?r.clone():null;try{for(let e of this.iterateCallbacks(`requestWillFetch`))r=await e({request:r.clone(),event:n})}catch(e){if(e instanceof Error)throw new t(`plugin-error-request-will-fetch`,{thrownErrorMessage:e.message})}let a=r.clone();try{let e;e=await fetch(r,r.mode===`navigate`?void 0:this._strategy.fetchOptions);for(let t of this.iterateCallbacks(`fetchDidSucceed`))e=await t({event:n,request:a,response:e});return e}catch(e){throw i&&await this.runCallbacks(`fetchDidFail`,{error:e,event:n,originalRequest:i.clone(),request:a.clone()}),e}}async fetchAndCachePut(e){let t=await this.fetch(e),n=t.clone();return this.waitUntil(this.cachePut(e,n)),t}async cacheMatch(e){let t=b(e),n,{cacheName:r,matchOptions:i}=this._strategy,a=await this.getCacheKey(t,`read`),o=Object.assign(Object.assign({},i),{cacheName:r});n=await caches.match(a,o);for(let e of this.iterateCallbacks(`cachedResponseWillBeUsed`))n=await e({cacheName:r,matchOptions:i,cachedResponse:n,request:a,event:this.event})||void 0;return n}async cachePut(e,n){let r=b(e);await te(0);let i=await this.getCacheKey(r,`write`);if(!n)throw new t(`cache-put-with-no-response`,{url:ee(i.url)});let a=await this._ensureResponseSafeToCache(n);if(!a)return!1;let{cacheName:o,matchOptions:s}=this._strategy,c=await self.caches.open(o),l=this.hasCallback(`cacheDidUpdate`),u=l?await h(c,i.clone(),[`__WB_REVISION__`],s):null;try{await c.put(i,l?a.clone():a)}catch(e){if(e instanceof Error)throw e.name===`QuotaExceededError`&&await y(),e}for(let e of this.iterateCallbacks(`cacheDidUpdate`))await e({cacheName:o,oldResponse:u,newResponse:a.clone(),request:i,event:this.event});return!0}async getCacheKey(e,t){let n=`${e.url} | ${t}`;if(!this._cacheKeys[n]){let r=e;for(let e of this.iterateCallbacks(`cacheKeyWillBeUsed`))r=b(await e({mode:t,request:r,event:this.event,params:this.params}));this._cacheKeys[n]=r}return this._cacheKeys[n]}hasCallback(e){for(let t of this._strategy.plugins)if(e in t)return!0;return!1}async runCallbacks(e,t){for(let n of this.iterateCallbacks(e))await n(t)}*iterateCallbacks(e){for(let t of this._strategy.plugins)if(typeof t[e]==`function`){let n=this._pluginStateMap.get(t);yield r=>{let i=Object.assign(Object.assign({},r),{state:n});return t[e](i)}}}waitUntil(e){return this._extendLifetimePromises.push(e),e}async doneWaiting(){for(;this._extendLifetimePromises.length;){let e=this._extendLifetimePromises.splice(0),t=(await Promise.allSettled(e)).find(e=>e.status===`rejected`);if(t)throw t.reason}}destroy(){this._handlerDeferred.resolve(null)}async _ensureResponseSafeToCache(e){let t=e,n=!1;for(let e of this.iterateCallbacks(`cacheWillUpdate`))if(t=await e({request:this.request,response:t,event:this.event})||void 0,n=!0,!t)break;return n||t&&t.status!==200&&(t=void 0),t}},x=class{constructor(e={}){this.cacheName=a.getRuntimeName(e.cacheName),this.plugins=e.plugins||[],this.fetchOptions=e.fetchOptions,this.matchOptions=e.matchOptions}handle(e){let[t]=this.handleAll(e);return t}handleAll(e){e instanceof FetchEvent&&(e={event:e,request:e.request});let t=e.event,n=typeof e.request==`string`?new Request(e.request):e.request,r=`params`in e?e.params:void 0,i=new ne(this,{event:t,request:n,params:r}),a=this._getResponse(i,n,t);return[a,this._awaitComplete(a,i,n,t)]}async _getResponse(e,n,r){await e.runCallbacks(`handlerWillStart`,{event:r,request:n});let i;try{if(i=await this._handle(n,e),!i||i.type===`error`)throw new t(`no-response`,{url:n.url})}catch(t){if(t instanceof Error){for(let a of e.iterateCallbacks(`handlerDidError`))if(i=await a({error:t,event:r,request:n}),i)break}if(!i)throw t}for(let t of e.iterateCallbacks(`handlerWillRespond`))i=await t({event:r,request:n,response:i});return i}async _awaitComplete(e,t,n,r){let i,a;try{i=await e}catch{}try{await t.runCallbacks(`handlerDidRespond`,{event:r,request:n,response:i}),await t.doneWaiting()}catch(e){e instanceof Error&&(a=e)}if(await t.runCallbacks(`handlerDidComplete`,{event:r,request:n,response:i,error:a}),t.destroy(),a)throw a}},S=class e extends x{constructor(t={}){t.cacheName=a.getPrecacheName(t.cacheName),super(t),this._fallbackToNetwork=t.fallbackToNetwork!==!1,this.plugins.push(e.copyRedirectedCacheableResponsesPlugin)}async _handle(e,t){return await t.cacheMatch(e)||(t.event&&t.event.type===`install`?await this._handleInstall(e,t):await this._handleFetch(e,t))}async _handleFetch(e,n){let r,i=n.params||{};if(this._fallbackToNetwork){let t=i.integrity,a=e.integrity,o=!a||a===t;r=await n.fetch(new Request(e,{integrity:e.mode===`no-cors`?void 0:a||t})),t&&o&&e.mode!==`no-cors`&&(this._useDefaultCacheabilityPluginIfNeeded(),await n.cachePut(e,r.clone()))}else throw new t(`missing-precache-entry`,{cacheName:this.cacheName,url:e.url});return r}async _handleInstall(e,n){this._useDefaultCacheabilityPluginIfNeeded();let r=await n.fetch(e);if(!await n.cachePut(e,r.clone()))throw new t(`bad-precaching-response`,{url:e.url,status:r.status});return r}_useDefaultCacheabilityPluginIfNeeded(){let t=null,n=0;for(let[r,i]of this.plugins.entries())i!==e.copyRedirectedCacheableResponsesPlugin&&(i===e.defaultPrecacheCacheabilityPlugin&&(t=r),i.cacheWillUpdate&&n++);n===0?this.plugins.push(e.defaultPrecacheCacheabilityPlugin):n>1&&t!==null&&this.plugins.splice(t,1)}};S.defaultPrecacheCacheabilityPlugin={async cacheWillUpdate({response:e}){return!e||e.status>=400?null:e}},S.copyRedirectedCacheableResponsesPlugin={async cacheWillUpdate({response:e}){return e.redirected?await p(e):e}};var C=class{constructor({cacheName:e,plugins:t=[],fallbackToNetwork:n=!0}={}){this._urlsToCacheKeys=new Map,this._urlsToCacheModes=new Map,this._cacheKeysToIntegrities=new Map,this._strategy=new S({cacheName:a.getPrecacheName(e),plugins:[...t,new u({precacheController:this})],fallbackToNetwork:n}),this.install=this.install.bind(this),this.activate=this.activate.bind(this)}get strategy(){return this._strategy}precache(e){this.addToCacheList(e),this._installAndActiveListenersAdded||=(self.addEventListener(`install`,this.install),self.addEventListener(`activate`,this.activate),!0)}addToCacheList(e){let n=[];for(let r of e){typeof r==`string`?n.push(r):r&&r.revision===void 0&&n.push(r.url);let{cacheKey:e,url:i}=c(r),a=typeof r!=`string`&&r.revision?`reload`:`default`;if(this._urlsToCacheKeys.has(i)&&this._urlsToCacheKeys.get(i)!==e)throw new t(`add-to-cache-list-conflicting-entries`,{firstEntry:this._urlsToCacheKeys.get(i),secondEntry:e});if(typeof r!=`string`&&r.integrity){if(this._cacheKeysToIntegrities.has(e)&&this._cacheKeysToIntegrities.get(e)!==r.integrity)throw new t(`add-to-cache-list-conflicting-integrities`,{url:i});this._cacheKeysToIntegrities.set(e,r.integrity)}if(this._urlsToCacheKeys.set(i,e),this._urlsToCacheModes.set(i,a),n.length>0){let e=`Workbox is precaching URLs without revision info: ${n.join(`, `)}\nThis is generally NOT safe. Learn more at https://bit.ly/wb-precache`;console.warn(e)}}}install(e){return o(e,async()=>{let t=new l;this.strategy.plugins.push(t);for(let[t,n]of this._urlsToCacheKeys){let r=this._cacheKeysToIntegrities.get(n),i=this._urlsToCacheModes.get(t),a=new Request(t,{integrity:r,cache:i,credentials:`same-origin`});await Promise.all(this.strategy.handleAll({params:{cacheKey:n},request:a,event:e}))}let{updatedURLs:n,notUpdatedURLs:r}=t;return{updatedURLs:n,notUpdatedURLs:r}})}activate(e){return o(e,async()=>{let e=await self.caches.open(this.strategy.cacheName),t=await e.keys(),n=new Set(this._urlsToCacheKeys.values()),r=[];for(let i of t)n.has(i.url)||(await e.delete(i),r.push(i.url));return{deletedURLs:r}})}getURLsToCacheKeys(){return this._urlsToCacheKeys}getCachedURLs(){return[...this._urlsToCacheKeys.keys()]}getCacheKeyForURL(e){let t=new URL(e,location.href);return this._urlsToCacheKeys.get(t.href)}getIntegrityForCacheKey(e){return this._cacheKeysToIntegrities.get(e)}async matchPrecache(e){let t=e instanceof Request?e.url:e,n=this.getCacheKeyForURL(t);if(n)return(await self.caches.open(this.strategy.cacheName)).match(n)}createHandlerBoundToURL(e){let n=this.getCacheKeyForURL(e);if(!n)throw new t(`non-precached-url`,{url:e});return t=>(t.request=new Request(e),t.params=Object.assign({cacheKey:n},t.params),this.strategy.handle(t))}},w,T=()=>(w||=new C,w);try{self[`workbox:routing:7.4.0`]&&_()}catch{}var E=e=>e&&typeof e==`object`?e:{handle:e},D=class{constructor(e,t,n=`GET`){this.handler=E(t),this.match=e,this.method=n}setCatchHandler(e){this.catchHandler=E(e)}},re=class extends D{constructor(e,t,n){super(({url:t})=>{let n=e.exec(t.href);if(n&&!(t.origin!==location.origin&&n.index!==0))return n.slice(1)},t,n)}},ie=class{constructor(){this._routes=new Map,this._defaultHandlerMap=new Map}get routes(){return this._routes}addFetchListener(){self.addEventListener(`fetch`,(e=>{let{request:t}=e,n=this.handleRequest({request:t,event:e});n&&e.respondWith(n)}))}addCacheListener(){self.addEventListener(`message`,(e=>{if(e.data&&e.data.type===`CACHE_URLS`){let{payload:t}=e.data,n=Promise.all(t.urlsToCache.map(t=>{typeof t==`string`&&(t=[t]);let n=new Request(...t);return this.handleRequest({request:n,event:e})}));e.waitUntil(n),e.ports&&e.ports[0]&&n.then(()=>e.ports[0].postMessage(!0))}}))}handleRequest({request:e,event:t}){let n=new URL(e.url,location.href);if(!n.protocol.startsWith(`http`))return;let r=n.origin===location.origin,{params:i,route:a}=this.findMatchingRoute({event:t,request:e,sameOrigin:r,url:n}),o=a&&a.handler,s=e.method;if(!o&&this._defaultHandlerMap.has(s)&&(o=this._defaultHandlerMap.get(s)),!o)return;let c;try{c=o.handle({url:n,request:e,event:t,params:i})}catch(e){c=Promise.reject(e)}let l=a&&a.catchHandler;return c instanceof Promise&&(this._catchHandler||l)&&(c=c.catch(async r=>{if(l)try{return await l.handle({url:n,request:e,event:t,params:i})}catch(e){e instanceof Error&&(r=e)}if(this._catchHandler)return this._catchHandler.handle({url:n,request:e,event:t});throw r})),c}findMatchingRoute({url:e,sameOrigin:t,request:n,event:r}){let i=this._routes.get(n.method)||[];for(let a of i){let i,o=a.match({url:e,sameOrigin:t,request:n,event:r});if(o)return i=o,(Array.isArray(i)&&i.length===0||o.constructor===Object&&Object.keys(o).length===0||typeof o==`boolean`)&&(i=void 0),{route:a,params:i}}return{}}setDefaultHandler(e,t=`GET`){this._defaultHandlerMap.set(t,E(e))}setCatchHandler(e){this._catchHandler=E(e)}registerRoute(e){this._routes.has(e.method)||this._routes.set(e.method,[]),this._routes.get(e.method).push(e)}unregisterRoute(e){if(!this._routes.has(e.method))throw new t(`unregister-route-but-not-found-with-method`,{method:e.method});let n=this._routes.get(e.method).indexOf(e);if(n>-1)this._routes.get(e.method).splice(n,1);else throw new t(`unregister-route-route-not-registered`)}},O,ae=()=>(O||(O=new ie,O.addFetchListener(),O.addCacheListener()),O);function k(e,n,r){let i;if(typeof e==`string`){let t=new URL(e,location.href);i=new D(({url:e})=>e.href===t.href,n,r)}else if(e instanceof RegExp)i=new re(e,n,r);else if(typeof e==`function`)i=new D(e,n,r);else if(e instanceof D)i=e;else throw new t(`unsupported-route-type`,{moduleName:`workbox-routing`,funcName:`registerRoute`,paramName:`capture`});return ae().registerRoute(i),i}function oe(e,t=[]){for(let n of[...e.searchParams.keys()])t.some(e=>e.test(n))&&e.searchParams.delete(n);return e}function*se(e,{ignoreURLParametersMatching:t=[/^utm_/,/^fbclid$/],directoryIndex:n=`index.html`,cleanURLs:r=!0,urlManipulation:i}={}){let a=new URL(e,location.href);a.hash=``,yield a.href;let o=oe(a,t);if(yield o.href,n&&o.pathname.endsWith(`/`)){let e=new URL(o.href);e.pathname+=n,yield e.href}if(r){let e=new URL(o.href);e.pathname+=`.html`,yield e.href}if(i){let e=i({url:a});for(let t of e)yield t.href}}var A=class extends D{constructor(e,t){super(({request:n})=>{let r=e.getURLsToCacheKeys();for(let i of se(n.url,t)){let t=r.get(i);if(t)return{cacheKey:t,integrity:e.getIntegrityForCacheKey(t)}}},e.strategy)}};function j(e){k(new A(T(),e))}function M(e){T().precache(e)}function N(e,t){M(e),j(t)}var P=class extends x{async _handle(e,n){let r=await n.cacheMatch(e),i;if(!r)try{r=await n.fetchAndCachePut(e)}catch(e){e instanceof Error&&(i=e)}if(!r)throw new t(`no-response`,{url:e.url,error:i});return r}};function F(e){e.then(()=>{})}var I=(e,t)=>t.some(t=>e instanceof t),L,R;function z(){return L||=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction]}function B(){return R||=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey]}var V=new WeakMap,H=new WeakMap,U=new WeakMap,W=new WeakMap,G=new WeakMap;function ce(e){let t=new Promise((t,n)=>{let r=()=>{e.removeEventListener(`success`,i),e.removeEventListener(`error`,a)},i=()=>{t(q(e.result)),r()},a=()=>{n(e.error),r()};e.addEventListener(`success`,i),e.addEventListener(`error`,a)});return t.then(t=>{t instanceof IDBCursor&&V.set(t,e)}).catch(()=>{}),G.set(t,e),t}function le(e){if(H.has(e))return;let t=new Promise((t,n)=>{let r=()=>{e.removeEventListener(`complete`,i),e.removeEventListener(`error`,a),e.removeEventListener(`abort`,a)},i=()=>{t(),r()},a=()=>{n(e.error||new DOMException(`AbortError`,`AbortError`)),r()};e.addEventListener(`complete`,i),e.addEventListener(`error`,a),e.addEventListener(`abort`,a)});H.set(e,t)}var K={get(e,t,n){if(e instanceof IDBTransaction){if(t===`done`)return H.get(e);if(t===`objectStoreNames`)return e.objectStoreNames||U.get(e);if(t===`store`)return n.objectStoreNames[1]?void 0:n.objectStore(n.objectStoreNames[0])}return q(e[t])},set(e,t,n){return e[t]=n,!0},has(e,t){return e instanceof IDBTransaction&&(t===`done`||t===`store`)||t in e}};function ue(e){K=e(K)}function de(e){return e===IDBDatabase.prototype.transaction&&!(`objectStoreNames`in IDBTransaction.prototype)?function(t,...n){let r=e.call(J(this),t,...n);return U.set(r,t.sort?t.sort():[t]),q(r)}:B().includes(e)?function(...t){return e.apply(J(this),t),q(V.get(this))}:function(...t){return q(e.apply(J(this),t))}}function fe(e){return typeof e==`function`?de(e):(e instanceof IDBTransaction&&le(e),I(e,z())?new Proxy(e,K):e)}function q(e){if(e instanceof IDBRequest)return ce(e);if(W.has(e))return W.get(e);let t=fe(e);return t!==e&&(W.set(e,t),G.set(t,e)),t}var J=e=>G.get(e);function pe(e,t,{blocked:n,upgrade:r,blocking:i,terminated:a}={}){let o=indexedDB.open(e,t),s=q(o);return r&&o.addEventListener(`upgradeneeded`,e=>{r(q(o.result),e.oldVersion,e.newVersion,q(o.transaction),e)}),n&&o.addEventListener(`blocked`,e=>n(e.oldVersion,e.newVersion,e)),s.then(e=>{a&&e.addEventListener(`close`,()=>a()),i&&e.addEventListener(`versionchange`,e=>i(e.oldVersion,e.newVersion,e))}).catch(()=>{}),s}function me(e,{blocked:t}={}){let n=indexedDB.deleteDatabase(e);return t&&n.addEventListener(`blocked`,e=>t(e.oldVersion,e)),q(n).then(()=>void 0)}var he=[`get`,`getKey`,`getAll`,`getAllKeys`,`count`],ge=[`put`,`add`,`delete`,`clear`],Y=new Map;function X(e,t){if(!(e instanceof IDBDatabase&&!(t in e)&&typeof t==`string`))return;if(Y.get(t))return Y.get(t);let n=t.replace(/FromIndex$/,``),r=t!==n,i=ge.includes(n);if(!(n in(r?IDBIndex:IDBObjectStore).prototype)||!(i||he.includes(n)))return;let a=async function(e,...t){let a=this.transaction(e,i?`readwrite`:`readonly`),o=a.store;return r&&(o=o.index(t.shift())),(await Promise.all([o[n](...t),i&&a.done]))[0]};return Y.set(t,a),a}ue(e=>({...e,get:(t,n,r)=>X(t,n)||e.get(t,n,r),has:(t,n)=>!!X(t,n)||e.has(t,n)}));try{self[`workbox:expiration:7.4.0`]&&_()}catch{}var Z=`workbox-expiration`,Q=`cache-entries`,$=e=>{let t=new URL(e,location.href);return t.hash=``,t.href},_e=class{constructor(e){this._db=null,this._cacheName=e}_upgradeDb(e){let t=e.createObjectStore(Q,{keyPath:`id`});t.createIndex(`cacheName`,`cacheName`,{unique:!1}),t.createIndex(`timestamp`,`timestamp`,{unique:!1})}_upgradeDbAndDeleteOldDbs(e){this._upgradeDb(e),this._cacheName&&me(this._cacheName)}async setTimestamp(e,t){e=$(e);let n={url:e,timestamp:t,cacheName:this._cacheName,id:this._getId(e)},r=(await this.getDb()).transaction(Q,`readwrite`,{durability:`relaxed`});await r.store.put(n),await r.done}async getTimestamp(e){return(await(await this.getDb()).get(Q,this._getId(e)))?.timestamp}async expireEntries(e,t){let n=await this.getDb(),r=await n.transaction(Q).store.index(`timestamp`).openCursor(null,`prev`),i=[],a=0;for(;r;){let n=r.value;n.cacheName===this._cacheName&&(e&&n.timestamp<e||t&&a>=t?i.push(r.value):a++),r=await r.continue()}let o=[];for(let e of i)await n.delete(Q,e.id),o.push(e.url);return o}_getId(e){return this._cacheName+`|`+$(e)}async getDb(){return this._db||=await pe(Z,1,{upgrade:this._upgradeDbAndDeleteOldDbs.bind(this)}),this._db}},ve=class{constructor(e,t={}){this._isRunning=!1,this._rerunRequested=!1,this._maxEntries=t.maxEntries,this._maxAgeSeconds=t.maxAgeSeconds,this._matchOptions=t.matchOptions,this._cacheName=e,this._timestampModel=new _e(e)}async expireEntries(){if(this._isRunning){this._rerunRequested=!0;return}this._isRunning=!0;let e=this._maxAgeSeconds?Date.now()-this._maxAgeSeconds*1e3:0,t=await this._timestampModel.expireEntries(e,this._maxEntries),n=await self.caches.open(this._cacheName);for(let e of t)await n.delete(e,this._matchOptions);this._isRunning=!1,this._rerunRequested&&(this._rerunRequested=!1,F(this.expireEntries()))}async updateTimestamp(e){await this._timestampModel.setTimestamp(e,Date.now())}async isURLExpired(e){if(this._maxAgeSeconds){let t=await this._timestampModel.getTimestamp(e),n=Date.now()-this._maxAgeSeconds*1e3;return t===void 0||t<n}else return!1}async delete(){this._rerunRequested=!1,await this._timestampModel.expireEntries(1/0)}};function ye(e){v.add(e)}var be=class{constructor(e={}){this.cachedResponseWillBeUsed=async({event:e,request:t,cacheName:n,cachedResponse:r})=>{if(!r)return null;let i=this._isResponseDateFresh(r),a=this._getCacheExpiration(n);F(a.expireEntries());let o=a.updateTimestamp(t.url);if(e)try{e.waitUntil(o)}catch{}return i?r:null},this.cacheDidUpdate=async({cacheName:e,request:t})=>{let n=this._getCacheExpiration(e);await n.updateTimestamp(t.url),await n.expireEntries()},this._config=e,this._maxAgeSeconds=e.maxAgeSeconds,this._cacheExpirations=new Map,e.purgeOnQuotaError&&ye(()=>this.deleteCacheAndMetadata())}_getCacheExpiration(e){if(e===a.getRuntimeName())throw new t(`expire-custom-caches-only`);let n=this._cacheExpirations.get(e);return n||(n=new ve(e,this._config),this._cacheExpirations.set(e,n)),n}_isResponseDateFresh(e){if(!this._maxAgeSeconds)return!0;let t=this._getDateHeaderTimestamp(e);return t===null||t>=Date.now()-this._maxAgeSeconds*1e3}_getDateHeaderTimestamp(e){if(!e.headers.has(`date`))return null;let t=e.headers.get(`date`),n=new Date(t).getTime();return isNaN(n)?null:n}async deleteCacheAndMetadata(){for(let[e,t]of this._cacheExpirations)await self.caches.delete(e),await t.delete();this._cacheExpirations=new Map}};N([{"revision":"7e6cb67aa9cf28050f2624e28a29f07e","url":"terms.html"},{"revision":"ee34904795012e3493a0c44b9f859308","url":"registerSW.js"},{"revision":"5be4c6cebfb9edbde2d13641ee401057","url":"privacy.html"},{"revision":"247dfacbec1ca7891c2e6a76c720a558","url":"pattern.svg"},{"revision":"f14cd675f0b6e7b885d32809abebae00","url":"notify.mp3"},{"revision":"ac44a8a5ff1013bfe8a024319abaef25","url":"index.html"},{"revision":"3b4fcfcf393eca4d264dca4a4663bc37","url":"icons.svg"},{"revision":"f46670f29cd911c162da51b955221002","url":"ico.png"},{"revision":"c5e41a91215019a44cdff2c1de5c56a9","url":"changelog.html"},{"revision":"36d60b85b445b4770dc8202baa0d64cf","url":"calling2.mp3"},{"revision":"61ac15422af330e0204ee6cf95634067","url":"calling.mp3"},{"revision":null,"url":"assets/vendor-BbmWO_jh.js"},{"revision":null,"url":"assets/socket-CbQsWyoH.js"},{"revision":null,"url":"assets/rolldown-runtime-QTnfLwEv.js"},{"revision":null,"url":"assets/index-D9bgO9HY.js"},{"revision":null,"url":"assets/index-49caZLjx.css"},{"revision":null,"url":"assets/EmojiPanel-CgjLeHhn.js"},{"revision":null,"url":"assets/EmojiPanel-Bf-sbcJk.css"},{"revision":"61ac15422af330e0204ee6cf95634067","url":"calling.mp3"},{"revision":"36d60b85b445b4770dc8202baa0d64cf","url":"calling2.mp3"},{"revision":"f46670f29cd911c162da51b955221002","url":"ico.png"},{"revision":"f14cd675f0b6e7b885d32809abebae00","url":"notify.mp3"},{"revision":"5ba98964a3aeabde9f920bd5fa109422","url":"manifest.webmanifest"}]),k(({url:e})=>e.origin===`https://res.cloudinary.com`,new P({cacheName:`cloudinary-images`,plugins:[new be({maxEntries:100,maxAgeSeconds:3600*24*30})]})),self.addEventListener(`fetch`,e=>{let t=new URL(e.request.url);e.request.method===`POST`&&t.pathname===`/share-target`&&e.respondWith(xe(e.request))});async function xe(e){try{let t=(await e.formData()).get(`media`);if(t){let e=await caches.open(`shared-files`),n=await t.arrayBuffer();await e.put(`shared-file`,new Response(n,{headers:{"Content-Type":t.type,"X-File-Name":encodeURIComponent(t.name),"X-File-Size":String(t.size)}}))}}catch{}return Response.redirect(`/`,303)}self.addEventListener(`install`,()=>{self.skipWaiting()}),self.addEventListener(`activate`,e=>{e.waitUntil(self.clients.claim())}),self.addEventListener(`push`,e=>{let t={};try{t=e.data?e.data.json():{}}catch{t={title:`4SEND`,body:e.data?e.data.text():``}}let n=t.notification||t,r=n.title||t.title||`4SEND`,i=n.body||t.body||``,a=n.icon||`/ico.png`,o=n.click_action||t.data?.click_action||t.data?.url||`/`;e.waitUntil(self.registration.showNotification(r,{body:i,icon:a,data:{url:o},tag:`4send-notification`}))}),self.addEventListener(`notificationclick`,e=>{e.notification.close();let t=e.notification.data&&e.notification.data.url||`/`;e.waitUntil(self.clients.matchAll({type:`window`,includeUncontrolled:!0}).then(e=>{for(let n of e)if(n.focused)return n.navigate(t),n.focus();return e.length>0?e[0].navigate(t).then(e=>e&&e.focus()):self.clients.openWindow(t)}))});public/assets/EmojiPanel-Bf-sbcJk.cssAdded+1
public/assets/EmojiPanel-CgjLeHhn.jsAdded+1
public/assets/index-49caZLjx.cssAdded
public/assets/index-D9bgO9HY.jsAdded
public/assets/rolldown-runtime-QTnfLwEv.jsAdded+1
public/assets/socket-CbQsWyoH.jsAdded+1
public/assets/vendor-BbmWO_jh.jsAdded
public/index.html+2-2
public/pwa-sw.js+1-1