!function(){var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{};function t(e){return e&&e.__esModule?e.default:e}function n(e){Object.defineProperty(e,"__esModule",{value:!0})}function r(e,t,n){Object.defineProperty(e,t,{get:n,enumerable:!0})}let o;(()=>{const e="app",t="production",n=!1;if(o=globalThis.app,o)return;const r={name:e,env:t,get:e=>e in r?r[e]:null,...JSON.parse('{"version":"28.0.6","manifestVersion":3}')},i=function e(t){const o=t===r,i=o&&n,l={},u=e=>Object.assign(t,e);return new Proxy(t,{get:function(n,r){if("assign"===r)return u;if(o&&!String(r).startsWith("$"))return t[r];if(!(r in t)){if(t[r]={},o){const e=s.bind(null,"log",r,!1),n=s.bind(null,"log",r,!0),o=s.bind(null,"warn",r,!1),i=s.bind(null,"warn",r,!0),l=s.bind(null,"error",r,!1),u=s.bind(null,"error",r,!0),c=a.bind(null,r);Object.defineProperties(t[r],{log:{get:()=>e},logDev:{get:()=>n},warn:{get:()=>o},warnDev:{get:()=>i},error:{get:()=>l},errorDev:{get:()=>u},Error:{get:()=>c}})}l[r]=e(t[r]),i&&(globalThis[r]=t[r])}return r in l?l[r]:t[r]},set:function(e,n,r){return t[n]=r,l[n]=r,i&&(globalThis[n]=t[n]),!0}})}(r);function s(e,t,n,...r){if(n)return;const[o,i,s]=l(t);console[e](`%c[${t}]`,`color: rgb(${o}, ${i}, ${s})`,...r)}function a(e,t,...n){return n.length>0&&s("error",e,!1,t,...n),new Error(`[${e}] ${t}`)}function l(e){let t=0;e.split("").forEach(((n,r)=>{t=e.charCodeAt(r)+((t<<5)-t)}));const n=(16711680&t)>>16,r=(65280&t)>>8,o=255&t;return n+r+o<300?l(`$${e}`):[n,r,o]}globalThis.app=i,o=i})();var i={},s={},a={},l=1;a={nextValue:function(){return(l=(9301*l+49297)%233280)/233280},seed:function(e){l=e}};var u,c,d,p="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_-";function h(){d=!1}function f(e){if(e){if(e!==u){if(e.length!==p.length)throw new Error("Custom alphabet for shortid must be "+p.length+" unique characters. You submitted "+e.length+" characters: "+e);var t=e.split("").filter((function(e,t,n){return t!==n.lastIndexOf(e)}));if(t.length)throw new Error("Custom alphabet for shortid must be "+p.length+" unique characters. These characters were not unique: "+t.join(", "));u=e,h()}}else u!==p&&(u=p,h())}function g(){return d||(d=function(){u||f(p);for(var e,t=u.split(""),n=[],r=a.nextValue();t.length>0;)r=a.nextValue(),e=Math.floor(r*t.length),n.push(t.splice(e,1)[0]);return n.join("")}())}s={get:function(){return u||p},characters:function(e){return f(e),u},seed:function(e){a.seed(e),c!==e&&(h(),c=e)},lookup:function(e){return g()[e]},shuffled:g};var m="object"==typeof window&&(window.crypto||window.msCrypto),v=m&&m.getRandomValues?function(e){return m.getRandomValues(new Uint8Array(e))}:function(e){for(var t=[],n=0;n<e;n++)t.push(Math.floor(256*Math.random()));return t},y=function(e,t,n){for(var r=(2<<Math.log(t.length-1)/Math.LN2)-1,o=-~(1.6*r*n/t.length),i="";;)for(var s=e(o),a=o;a--;)if((i+=t[s[a]&r]||"").length===+n)return i};var b,_,w=function(e){for(var t,n=0,r="";!t;)r+=y(v,s.get(),1),t=e<Math.pow(16,n+1),n++;return r};var P=function(e){var t="",n=Math.floor(.001*(Date.now()-1567752802062));return n===_?b++:(b=0,_=n),t+=w(7),t+=w(e),b>0&&(t+=w(b)),t+=w(n)};var D,S=function(e){return!(!e||"string"!=typeof e||e.length<6)&&!new RegExp("[^"+s.get().replace(/[|\\{}()[\]^$+*?.-]/g,"\\$&")+"]").test(e)},x=!1;var I=(x||(x=!0,D={},D=0),D||0);function E(){return P(I)}var C=E;(i=E).generate=C;var T=function(e){return s.seed(e),i};i.seed=T;var k=function(e){return I=e,i};i.worker=k;var A=function(e){return void 0!==e&&s.characters(e),s.shuffled()};i.characters=A;var F=S;i.isValid=F;var O,$,j,R=t(i),M={},U=O={};function B(){throw new Error("setTimeout has not been defined")}function L(){throw new Error("clearTimeout has not been defined")}function N(e){if($===setTimeout)return setTimeout(e,0);if(($===B||!$)&&setTimeout)return $=setTimeout,setTimeout(e,0);try{return $(e,0)}catch(t){try{return $.call(null,e,0)}catch(t){return $.call(this,e,0)}}}!function(){try{$="function"==typeof setTimeout?setTimeout:B}catch(e){$=B}try{j="function"==typeof clearTimeout?clearTimeout:L}catch(e){j=L}}();var V,q=[],G=!1,H=-1;function W(){G&&V&&(G=!1,V.length?q=V.concat(q):H=-1,q.length&&z())}function z(){if(!G){var e=N(W);G=!0;for(var t=q.length;t;){for(V=q,q=[];++H<t;)V&&V[H].run();H=-1,t=q.length}V=null,G=!1,function(e){if(j===clearTimeout)return clearTimeout(e);if((j===L||!j)&&clearTimeout)return j=clearTimeout,clearTimeout(e);try{j(e)}catch(t){try{return j.call(null,e)}catch(t){return j.call(this,e)}}}(e)}}function J(e,t){this.fun=e,this.array=t}function Y(){}U.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];q.push(new J(e,t)),1!==q.length||G||N(z)},J.prototype.run=function(){this.fun.apply(null,this.array)},U.title="browser",U.browser=!0,U.env={},U.argv=[],U.version="",U.versions={},U.on=Y,U.addListener=Y,U.once=Y,U.off=Y,U.removeListener=Y,U.removeAllListeners=Y,U.emit=Y,U.prependListener=Y,U.prependOnceListener=Y,U.listeners=function(e){return[]},U.binding=function(e){throw new Error("process.binding is not supported")},U.cwd=function(){return"/"},U.chdir=function(e){throw new Error("process.chdir is not supported")},U.umask=function(){return 0};var K=O;!function(){var t="input is invalid type",n="object"==typeof window,r=n?window:{};r.JS_SHA256_NO_WINDOW&&(n=!1);var o=!n&&"object"==typeof self,i=!r.JS_SHA256_NO_NODE_JS&&"object"==typeof K&&K.versions&&K.versions.node;i?r=e:o&&(r=self);var s=!r.JS_SHA256_NO_COMMON_JS&&M,a=!r.JS_SHA256_NO_ARRAY_BUFFER&&"undefined"!=typeof ArrayBuffer,l="0123456789abcdef".split(""),u=[-2147483648,8388608,32768,128],c=[24,16,8,0],d=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],p=["hex","array","digest","arrayBuffer"],h=[];!r.JS_SHA256_NO_NODE_JS&&Array.isArray||(Array.isArray=function(e){return"[object Array]"===Object.prototype.toString.call(e)}),!a||!r.JS_SHA256_NO_ARRAY_BUFFER_IS_VIEW&&ArrayBuffer.isView||(ArrayBuffer.isView=function(e){return"object"==typeof e&&e.buffer&&e.buffer.constructor===ArrayBuffer});var f=function(e,t){return function(n){return new b(t,!0).update(n)[e]()}},g=function(e){var t=f("hex",e);i&&(t=m(t,e)),t.create=function(){return new b(e)},t.update=function(e){return t.create().update(e)};for(var n=0;n<p.length;++n){var r=p[n];t[r]=f(r,e)}return t},m=function(e,t){},v=function(e,t){return function(n,r){return new _(n,t,!0).update(r)[e]()}},y=function(e){var t=v("hex",e);t.create=function(t){return new _(t,e)},t.update=function(e,n){return t.create(e).update(n)};for(var n=0;n<p.length;++n){var r=p[n];t[r]=v(r,e)}return t};function b(e,t){t?(h[0]=h[16]=h[1]=h[2]=h[3]=h[4]=h[5]=h[6]=h[7]=h[8]=h[9]=h[10]=h[11]=h[12]=h[13]=h[14]=h[15]=0,this.blocks=h):this.blocks=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],e?(this.h0=3238371032,this.h1=914150663,this.h2=812702999,this.h3=4144912697,this.h4=4290775857,this.h5=1750603025,this.h6=1694076839,this.h7=3204075428):(this.h0=1779033703,this.h1=3144134277,this.h2=1013904242,this.h3=2773480762,this.h4=1359893119,this.h5=2600822924,this.h6=528734635,this.h7=1541459225),this.block=this.start=this.bytes=this.hBytes=0,this.finalized=this.hashed=!1,this.first=!0,this.is224=e}function _(e,n,r){var o,i=typeof e;if("string"===i){var s,l=[],u=e.length,c=0;for(o=0;o<u;++o)(s=e.charCodeAt(o))<128?l[c++]=s:s<2048?(l[c++]=192|s>>6,l[c++]=128|63&s):s<55296||s>=57344?(l[c++]=224|s>>12,l[c++]=128|s>>6&63,l[c++]=128|63&s):(s=65536+((1023&s)<<10|1023&e.charCodeAt(++o)),l[c++]=240|s>>18,l[c++]=128|s>>12&63,l[c++]=128|s>>6&63,l[c++]=128|63&s);e=l}else{if("object"!==i)throw new Error(t);if(null===e)throw new Error(t);if(a&&e.constructor===ArrayBuffer)e=new Uint8Array(e);else if(!(Array.isArray(e)||a&&ArrayBuffer.isView(e)))throw new Error(t)}e.length>64&&(e=new b(n,!0).update(e).array());var d=[],p=[];for(o=0;o<64;++o){var h=e[o]||0;d[o]=92^h,p[o]=54^h}b.call(this,n,r),this.update(p),this.oKeyPad=d,this.inner=!0,this.sharedMemory=r}b.prototype.update=function(e){if(!this.finalized){var n,r=typeof e;if("string"!==r){if("object"!==r)throw new Error(t);if(null===e)throw new Error(t);if(a&&e.constructor===ArrayBuffer)e=new Uint8Array(e);else if(!(Array.isArray(e)||a&&ArrayBuffer.isView(e)))throw new Error(t);n=!0}for(var o,i,s=0,l=e.length,u=this.blocks;s<l;){if(this.hashed&&(this.hashed=!1,u[0]=this.block,u[16]=u[1]=u[2]=u[3]=u[4]=u[5]=u[6]=u[7]=u[8]=u[9]=u[10]=u[11]=u[12]=u[13]=u[14]=u[15]=0),n)for(i=this.start;s<l&&i<64;++s)u[i>>2]|=e[s]<<c[3&i++];else for(i=this.start;s<l&&i<64;++s)(o=e.charCodeAt(s))<128?u[i>>2]|=o<<c[3&i++]:o<2048?(u[i>>2]|=(192|o>>6)<<c[3&i++],u[i>>2]|=(128|63&o)<<c[3&i++]):o<55296||o>=57344?(u[i>>2]|=(224|o>>12)<<c[3&i++],u[i>>2]|=(128|o>>6&63)<<c[3&i++],u[i>>2]|=(128|63&o)<<c[3&i++]):(o=65536+((1023&o)<<10|1023&e.charCodeAt(++s)),u[i>>2]|=(240|o>>18)<<c[3&i++],u[i>>2]|=(128|o>>12&63)<<c[3&i++],u[i>>2]|=(128|o>>6&63)<<c[3&i++],u[i>>2]|=(128|63&o)<<c[3&i++]);this.lastByteIndex=i,this.bytes+=i-this.start,i>=64?(this.block=u[16],this.start=i-64,this.hash(),this.hashed=!0):this.start=i}return this.bytes>4294967295&&(this.hBytes+=this.bytes/4294967296<<0,this.bytes=this.bytes%4294967296),this}},b.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var e=this.blocks,t=this.lastByteIndex;e[16]=this.block,e[t>>2]|=u[3&t],this.block=e[16],t>=56&&(this.hashed||this.hash(),e[0]=this.block,e[16]=e[1]=e[2]=e[3]=e[4]=e[5]=e[6]=e[7]=e[8]=e[9]=e[10]=e[11]=e[12]=e[13]=e[14]=e[15]=0),e[14]=this.hBytes<<3|this.bytes>>>29,e[15]=this.bytes<<3,this.hash()}},b.prototype.hash=function(){var e,t,n,r,o,i,s,a,l,u=this.h0,c=this.h1,p=this.h2,h=this.h3,f=this.h4,g=this.h5,m=this.h6,v=this.h7,y=this.blocks;for(e=16;e<64;++e)t=((o=y[e-15])>>>7|o<<25)^(o>>>18|o<<14)^o>>>3,n=((o=y[e-2])>>>17|o<<15)^(o>>>19|o<<13)^o>>>10,y[e]=y[e-16]+t+y[e-7]+n<<0;for(l=c&p,e=0;e<64;e+=4)this.first?(this.is224?(i=300032,v=(o=y[0]-1413257819)-150054599<<0,h=o+24177077<<0):(i=704751109,v=(o=y[0]-210244248)-1521486534<<0,h=o+143694565<<0),this.first=!1):(t=(u>>>2|u<<30)^(u>>>13|u<<19)^(u>>>22|u<<10),r=(i=u&c)^u&p^l,v=h+(o=v+(n=(f>>>6|f<<26)^(f>>>11|f<<21)^(f>>>25|f<<7))+(f&g^~f&m)+d[e]+y[e])<<0,h=o+(t+r)<<0),t=(h>>>2|h<<30)^(h>>>13|h<<19)^(h>>>22|h<<10),r=(s=h&u)^h&c^i,m=p+(o=m+(n=(v>>>6|v<<26)^(v>>>11|v<<21)^(v>>>25|v<<7))+(v&f^~v&g)+d[e+1]+y[e+1])<<0,t=((p=o+(t+r)<<0)>>>2|p<<30)^(p>>>13|p<<19)^(p>>>22|p<<10),r=(a=p&h)^p&u^s,g=c+(o=g+(n=(m>>>6|m<<26)^(m>>>11|m<<21)^(m>>>25|m<<7))+(m&v^~m&f)+d[e+2]+y[e+2])<<0,t=((c=o+(t+r)<<0)>>>2|c<<30)^(c>>>13|c<<19)^(c>>>22|c<<10),r=(l=c&p)^c&h^a,f=u+(o=f+(n=(g>>>6|g<<26)^(g>>>11|g<<21)^(g>>>25|g<<7))+(g&m^~g&v)+d[e+3]+y[e+3])<<0,u=o+(t+r)<<0;this.h0=this.h0+u<<0,this.h1=this.h1+c<<0,this.h2=this.h2+p<<0,this.h3=this.h3+h<<0,this.h4=this.h4+f<<0,this.h5=this.h5+g<<0,this.h6=this.h6+m<<0,this.h7=this.h7+v<<0},b.prototype.hex=function(){this.finalize();var e=this.h0,t=this.h1,n=this.h2,r=this.h3,o=this.h4,i=this.h5,s=this.h6,a=this.h7,u=l[e>>28&15]+l[e>>24&15]+l[e>>20&15]+l[e>>16&15]+l[e>>12&15]+l[e>>8&15]+l[e>>4&15]+l[15&e]+l[t>>28&15]+l[t>>24&15]+l[t>>20&15]+l[t>>16&15]+l[t>>12&15]+l[t>>8&15]+l[t>>4&15]+l[15&t]+l[n>>28&15]+l[n>>24&15]+l[n>>20&15]+l[n>>16&15]+l[n>>12&15]+l[n>>8&15]+l[n>>4&15]+l[15&n]+l[r>>28&15]+l[r>>24&15]+l[r>>20&15]+l[r>>16&15]+l[r>>12&15]+l[r>>8&15]+l[r>>4&15]+l[15&r]+l[o>>28&15]+l[o>>24&15]+l[o>>20&15]+l[o>>16&15]+l[o>>12&15]+l[o>>8&15]+l[o>>4&15]+l[15&o]+l[i>>28&15]+l[i>>24&15]+l[i>>20&15]+l[i>>16&15]+l[i>>12&15]+l[i>>8&15]+l[i>>4&15]+l[15&i]+l[s>>28&15]+l[s>>24&15]+l[s>>20&15]+l[s>>16&15]+l[s>>12&15]+l[s>>8&15]+l[s>>4&15]+l[15&s];return this.is224||(u+=l[a>>28&15]+l[a>>24&15]+l[a>>20&15]+l[a>>16&15]+l[a>>12&15]+l[a>>8&15]+l[a>>4&15]+l[15&a]),u},b.prototype.toString=b.prototype.hex,b.prototype.digest=function(){this.finalize();var e=this.h0,t=this.h1,n=this.h2,r=this.h3,o=this.h4,i=this.h5,s=this.h6,a=this.h7,l=[e>>24&255,e>>16&255,e>>8&255,255&e,t>>24&255,t>>16&255,t>>8&255,255&t,n>>24&255,n>>16&255,n>>8&255,255&n,r>>24&255,r>>16&255,r>>8&255,255&r,o>>24&255,o>>16&255,o>>8&255,255&o,i>>24&255,i>>16&255,i>>8&255,255&i,s>>24&255,s>>16&255,s>>8&255,255&s];return this.is224||l.push(a>>24&255,a>>16&255,a>>8&255,255&a),l},b.prototype.array=b.prototype.digest,b.prototype.arrayBuffer=function(){this.finalize();var e=new ArrayBuffer(this.is224?28:32),t=new DataView(e);return t.setUint32(0,this.h0),t.setUint32(4,this.h1),t.setUint32(8,this.h2),t.setUint32(12,this.h3),t.setUint32(16,this.h4),t.setUint32(20,this.h5),t.setUint32(24,this.h6),this.is224||t.setUint32(28,this.h7),e},_.prototype=new b,_.prototype.finalize=function(){if(b.prototype.finalize.call(this),this.inner){this.inner=!1;var e=this.array();b.call(this,this.is224,this.sharedMemory),this.update(this.oKeyPad),this.update(e),b.prototype.finalize.call(this)}};var w=g();w.sha256=w,w.sha224=g(!0),w.sha256.hmac=y(),w.sha224.hmac=y(!0),s?M=w:(r.sha256=w.sha256,r.sha224=w.sha224)}();var X=t(M);function Q(e){return`Minified Redux error #${e}; visit https://redux.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var Z=(()=>"function"==typeof Symbol&&Symbol.observable||"@@observable")(),ee=()=>Math.random().toString(36).substring(7).split("").join("."),te={INIT:`@@redux/INIT${ee()}`,REPLACE:`@@redux/REPLACE${ee()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${ee()}`};function ne(e){if("object"!=typeof e||null===e)return!1;let t=e;for(;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||null===Object.getPrototypeOf(e)}function re(e,t,n){if("function"!=typeof e)throw new Error(Q(2));if("function"==typeof t&&"function"==typeof n||"function"==typeof n&&"function"==typeof arguments[3])throw new Error(Q(0));if("function"==typeof t&&void 0===n&&(n=t,t=void 0),void 0!==n){if("function"!=typeof n)throw new Error(Q(1));return n(re)(e,t)}let r=e,o=t,i=new Map,s=i,a=0,l=!1;function u(){s===i&&(s=new Map,i.forEach(((e,t)=>{s.set(t,e)})))}function c(){if(l)throw new Error(Q(3));return o}function d(e){if("function"!=typeof e)throw new Error(Q(4));if(l)throw new Error(Q(5));let t=!0;u();const n=a++;return s.set(n,e),function(){if(t){if(l)throw new Error(Q(6));t=!1,u(),s.delete(n),i=null}}}function p(e){if(!ne(e))throw new Error(Q(7));if(void 0===e.type)throw new Error(Q(8));if("string"!=typeof e.type)throw new Error(Q(17));if(l)throw new Error(Q(9));try{l=!0,o=r(o,e)}finally{l=!1}return(i=s).forEach((e=>{e()})),e}function h(e){if("function"!=typeof e)throw new Error(Q(10));r=e,p({type:te.REPLACE})}function f(){const e=d;return{subscribe:function(t){if("object"!=typeof t||null===t)throw new Error(Q(11));function n(){const e=t;e.next&&e.next(c())}n();return{unsubscribe:e(n)}},[Z]:function(){return this}}}p({type:te.INIT});const g={dispatch:p,subscribe:d,getState:c,replaceReducer:h,[Z]:f};return g}var oe,ie,se,ae,le,ue,ce,de,pe,he,fe,ge,me,ve,ye,be,_e,we,Pe,De,Se,xe,Ie,Ee,Ce,Te,ke,Ae,Fe,Oe,$e,je,Re,Me,Ue,Be,Le,Ne,Ve,qe,Ge,He,We,ze,Je,Ye,Ke,Xe,Qe,Ze,et,tt,nt,rt,ot,it,st,at,lt,ut=!1;function ct(e,t,n){this.props=e,this.context=t,this.refs=be,this.updater=n||ve}function dt(){}function pt(e,t,n){this.props=e,this.context=t,this.refs=be,this.updater=n||ve}function ht(e,t,n){var r,o={},i=null,s=null;if(null!=t)for(r in void 0!==t.ref&&(s=t.ref),void 0!==t.key&&(i=""+t.key),t)Pe.call(t,r)&&!Se.hasOwnProperty(r)&&(o[r]=t[r]);var a=arguments.length-2;if(1===a)o.children=n;else if(1<a){for(var l=Array(a),u=0;u<a;u++)l[u]=arguments[u+2];o.children=l}if(e&&e.defaultProps)for(r in a=e.defaultProps)void 0===o[r]&&(o[r]=a[r]);return{$$typeof:ie,type:e,key:i,ref:s,props:o,_owner:De.current}}function ft(e){return"object"==typeof e&&null!==e&&e.$$typeof===ie}function gt(e,t){return"object"==typeof e&&null!==e&&null!=e.key?function(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,(function(e){return t[e]}))}(""+e.key):t.toString(36)}function mt(e,t,n,r,o){var i=typeof e;"undefined"!==i&&"boolean"!==i||(e=null);var s=!1;if(null===e)s=!0;else switch(i){case"string":case"number":s=!0;break;case"object":switch(e.$$typeof){case ie:case se:s=!0}}if(s)return o=o(s=e),e=""===r?"."+gt(s,0):r,we(o)?(n="",null!=e&&(n=e.replace(xe,"$&/")+"/"),mt(o,t,n,"",(function(e){return e}))):null!=o&&(ft(o)&&(o=function(e,t){return{$$typeof:ie,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}(o,n+(!o.key||s&&s.key===o.key?"":(""+o.key).replace(xe,"$&/")+"/")+e)),t.push(o)),1;if(s=0,r=""===r?".":r+":",we(e))for(var a=0;a<e.length;a++){var l=r+gt(i=e[a],a);s+=mt(i,t,n,l,o)}else if("function"==typeof(l=function(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=me&&e[me]||e["@@iterator"])?e:null}(e)))for(e=l.call(e),a=0;!(i=e.next()).done;)s+=mt(i=i.value,t,n,l=r+gt(i,a++),o);else if("object"===i)throw t=String(e),Error("Objects are not valid as a React child (found: "+("[object Object]"===t?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return s}function vt(e,t,n){if(null==e)return e;var r=[],o=0;return mt(e,r,"","",(function(e){return t.call(n,e,o++)})),r}function yt(e){if(-1===e._status){var t=e._result;(t=t()).then((function(t){0!==e._status&&-1!==e._status||(e._status=1,e._result=t)}),(function(t){0!==e._status&&-1!==e._status||(e._status=2,e._result=t)})),-1===e._status&&(e._status=0,e._result=t)}if(1===e._status)return e._result.default;throw e._result}function bt(){return ut||(ut=!0,oe={},ie=Symbol.for("react.element"),se=Symbol.for("react.portal"),ae=Symbol.for("react.fragment"),le=Symbol.for("react.strict_mode"),ue=Symbol.for("react.profiler"),ce=Symbol.for("react.provider"),de=Symbol.for("react.context"),pe=Symbol.for("react.forward_ref"),he=Symbol.for("react.suspense"),fe=Symbol.for("react.memo"),ge=Symbol.for("react.lazy"),me=Symbol.iterator,ve={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},ye=Object.assign,be={},ct.prototype.isReactComponent={},ct.prototype.setState=function(e,t){if("object"!=typeof e&&"function"!=typeof e&&null!=e)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")},ct.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},dt.prototype=ct.prototype,(_e=pt.prototype=new dt).constructor=pt,ye(_e,ct.prototype),_e.isPureReactComponent=!0,we=Array.isArray,Pe=Object.prototype.hasOwnProperty,Se={key:!0,ref:!0,__self:!0,__source:!0},xe=/\/+/g,Ce={ReactCurrentDispatcher:Ie={current:null},ReactCurrentBatchConfig:Ee={transition:null},ReactCurrentOwner:De={current:null}},Te={map:vt,forEach:function(e,t,n){vt(e,(function(){t.apply(this,arguments)}),n)},count:function(e){var t=0;return vt(e,(function(){t++})),t},toArray:function(e){return vt(e,(function(e){return e}))||[]},only:function(e){if(!ft(e))throw Error("React.Children.only expected to receive a single React element child.");return e}},oe.Children=Te,ke=ct,oe.Component=ke,Ae=ae,oe.Fragment=Ae,Fe=ue,oe.Profiler=Fe,Oe=pt,oe.PureComponent=Oe,$e=le,oe.StrictMode=$e,je=he,oe.Suspense=je,Re=Ce,oe.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Re,Me=function(e,t,n){if(null==e)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var r=ye({},e.props),o=e.key,i=e.ref,s=e._owner;if(null!=t){if(void 0!==t.ref&&(i=t.ref,s=De.current),void 0!==t.key&&(o=""+t.key),e.type&&e.type.defaultProps)var a=e.type.defaultProps;for(l in t)Pe.call(t,l)&&!Se.hasOwnProperty(l)&&(r[l]=void 0===t[l]&&void 0!==a?a[l]:t[l])}var l=arguments.length-2;if(1===l)r.children=n;else if(1<l){a=Array(l);for(var u=0;u<l;u++)a[u]=arguments[u+2];r.children=a}return{$$typeof:ie,type:e.type,key:o,ref:i,props:r,_owner:s}},oe.cloneElement=Me,Ue=function(e){return(e={$$typeof:de,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null}).Provider={$$typeof:ce,_context:e},e.Consumer=e},oe.createContext=Ue,Be=ht,oe.createElement=Be,Le=function(e){var t=ht.bind(null,e);return t.type=e,t},oe.createFactory=Le,Ne=function(){return{current:null}},oe.createRef=Ne,Ve=function(e){return{$$typeof:pe,render:e}},oe.forwardRef=Ve,qe=ft,oe.isValidElement=qe,Ge=function(e){return{$$typeof:ge,_payload:{_status:-1,_result:e},_init:yt}},oe.lazy=Ge,He=function(e,t){return{$$typeof:fe,type:e,compare:void 0===t?null:t}},oe.memo=He,We=function(e){var t=Ee.transition;Ee.transition={};try{e()}finally{Ee.transition=t}},oe.startTransition=We,ze=function(){throw Error("act(...) is not supported in production builds of React.")},oe.unstable_act=ze,Je=function(e,t){return Ie.current.useCallback(e,t)},oe.useCallback=Je,Ye=function(e){return Ie.current.useContext(e)},oe.useContext=Ye,Ke=function(){},oe.useDebugValue=Ke,Xe=function(e){return Ie.current.useDeferredValue(e)},oe.useDeferredValue=Xe,Qe=function(e,t){return Ie.current.useEffect(e,t)},oe.useEffect=Qe,Ze=function(){return Ie.current.useId()},oe.useId=Ze,et=function(e,t,n){return Ie.current.useImperativeHandle(e,t,n)},oe.useImperativeHandle=et,tt=function(e,t){return Ie.current.useInsertionEffect(e,t)},oe.useInsertionEffect=tt,nt=function(e,t){return Ie.current.useLayoutEffect(e,t)},oe.useLayoutEffect=nt,rt=function(e,t){return Ie.current.useMemo(e,t)},oe.useMemo=rt,ot=function(e,t,n){return Ie.current.useReducer(e,t,n)},oe.useReducer=ot,it=function(e){return Ie.current.useRef(e)},oe.useRef=it,st=function(e){return Ie.current.useState(e)},oe.useState=st,at=function(e,t,n){return Ie.current.useSyncExternalStore(e,t,n)},oe.useSyncExternalStore=at,lt=function(){return Ie.current.useTransition()},oe.useTransition=lt,"18.2.0",oe.version="18.2.0"),oe}var _t,wt,Pt=!1;function Dt(){return Pt||(Pt=!0,_t={},_t=bt(),wt=t(_t)),_t}Dt();var St,xt,It,Et,Ct,Tt,kt,At,Ft=!1;function Ot(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t}var $t={};Ft||(Ft=!0,St={},Dt(),xt="function"==typeof Object.is?Object.is:Ot,It=Dt().useSyncExternalStore,Et=Dt().useRef,Ct=Dt().useEffect,Tt=Dt().useMemo,kt=Dt().useDebugValue,At=function(e,t,n,r,o){var i=Et(null);if(null===i.current){var s={hasValue:!1,value:null};i.current=s}else s=i.current;i=Tt((function(){function e(e){if(!l){if(l=!0,i=e,e=r(e),void 0!==o&&s.hasValue){var t=s.value;if(o(t,e))return a=t}return a=e}if(t=a,xt(i,e))return t;var n=r(e);return void 0!==o&&o(t,n)?t:(i=e,a=n)}var i,a,l=!1,u=void 0===n?null:n;return[function(){return e(t())},null===u?void 0:function(){return e(u())}]}),[t,n,r,o]);var a=It(e,i[0],i[1]);return Ct((function(){s.hasValue=!0,s.value=a}),[a]),kt(a),a},St.useSyncExternalStoreWithSelector=At),$t=St,Dt();var jt=Object.defineProperty,Rt=Object.defineProperties,Mt=Object.getOwnPropertyDescriptors,Ut=Object.getOwnPropertySymbols,Bt=Object.prototype.hasOwnProperty,Lt=Object.prototype.propertyIsEnumerable,Nt=(e,t,n)=>t in e?jt(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Vt=(e,t)=>{for(var n in t||(t={}))Bt.call(t,n)&&Nt(e,n,t[n]);if(Ut)for(var n of Ut(t))Lt.call(t,n)&&Nt(e,n,t[n]);return e},qt=(e,t)=>Rt(e,Mt(t)),Gt=(e,t)=>{var n={};for(var r in e)Bt.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&Ut)for(var r of Ut(e))t.indexOf(r)<0&&Lt.call(e,r)&&(n[r]=e[r]);return n},Ht="default"in Dt()?wt:Dt(),Wt=Symbol.for("react-redux-context"),zt="undefined"!=typeof globalThis?globalThis:{};function Jt(){var e;if(!Ht.createContext)return{};const t=null!=(e=zt[Wt])?e:zt[Wt]=new Map;let n=t.get(Ht.createContext);return n||(n=Ht.createContext(null),t.set(Ht.createContext,n)),n}var Yt=Jt(),Kt=()=>{throw new Error("uSES not initialized!")};var Xt=Symbol.for("react.element"),Qt=Symbol.for("react.portal"),Zt=Symbol.for("react.fragment"),en=Symbol.for("react.strict_mode"),tn=Symbol.for("react.profiler"),nn=Symbol.for("react.provider"),rn=Symbol.for("react.context"),on=Symbol.for("react.server_context"),sn=Symbol.for("react.forward_ref"),an=Symbol.for("react.suspense"),ln=Symbol.for("react.suspense_list"),un=Symbol.for("react.memo"),cn=Symbol.for("react.lazy"),dn=(Symbol.for("react.offscreen"),Symbol.for("react.client.reference"),sn),pn=un;function hn(e){if("object"==typeof e&&null!==e){const t=e.$$typeof;switch(t){case Xt:{const n=e.type;switch(n){case Zt:case tn:case en:case an:case ln:return n;default:{const e=n&&n.$$typeof;switch(e){case on:case rn:case sn:case cn:case un:case nn:return e;default:return t}}}}case Qt:return t}}}function fn(e,t,n,r,{areStatesEqual:o,areOwnPropsEqual:i,areStatePropsEqual:s}){let a,l,u,c,d,p=!1;function h(p,h){const f=!i(h,l),g=!o(p,a,h,l);return a=p,l=h,f&&g?(u=e(a,l),t.dependsOnOwnProps&&(c=t(r,l)),d=n(u,c,l),d):f?(e.dependsOnOwnProps&&(u=e(a,l)),t.dependsOnOwnProps&&(c=t(r,l)),d=n(u,c,l),d):g?function(){const t=e(a,l),r=!s(t,u);return u=t,r&&(d=n(u,c,l)),d}():d}return function(o,i){return p?h(o,i):(a=o,l=i,u=e(a,l),c=t(r,l),d=n(u,c,l),p=!0,d)}}function gn(e,t){var n=t,{initMapStateToProps:r,initMapDispatchToProps:o,initMergeProps:i}=n,s=Gt(n,["initMapStateToProps","initMapDispatchToProps","initMergeProps"]);const a=r(e,s),l=o(e,s),u=i(e,s);return fn(a,l,u,e,s)}function mn(e){return function(t){const n=e(t);function r(){return n}return r.dependsOnOwnProps=!1,r}}function vn(e){return e.dependsOnOwnProps?Boolean(e.dependsOnOwnProps):1!==e.length}function yn(e,t){return function(t,{displayName:n}){const r=function(e,t){return r.dependsOnOwnProps?r.mapToProps(e,t):r.mapToProps(e,void 0)};return r.dependsOnOwnProps=!0,r.mapToProps=function(t,n){r.mapToProps=e,r.dependsOnOwnProps=vn(e);let o=r(t,n);return"function"==typeof o&&(r.mapToProps=o,r.dependsOnOwnProps=vn(o),o=r(t,n)),o},r}}function bn(e,t){return(n,r)=>{throw new Error(`Invalid value of type ${typeof e} for ${t} argument when connecting component ${r.wrappedComponentName}.`)}}function _n(e,t,n){return Vt(Vt(Vt({},n),e),t)}function wn(e){e()}var Pn={notify:function(){},get:()=>[]};function Dn(e,t){let n,r=Pn,o=0,i=!1;function s(){u.onStateChange&&u.onStateChange()}function a(){o++,n||(n=t?t.addNestedSub(s):e.subscribe(s),r=function(){let e=null,t=null;return{clear:function(){e=null,t=null},notify:function(){wn((()=>{let t=e;for(;t;)t.callback(),t=t.next}))},get:function(){const t=[];let n=e;for(;n;)t.push(n),n=n.next;return t},subscribe:function(n){let r=!0;const o=t={callback:n,next:null,prev:t};return o.prev?o.prev.next=o:e=o,function(){r&&null!==e&&(r=!1,o.next?o.next.prev=o.prev:t=o.prev,o.prev?o.prev.next=o.next:e=o.next)}}}}())}function l(){o--,n&&0===o&&(n(),n=void 0,r.clear(),r=Pn)}const u={addNestedSub:function(e){a();const t=r.subscribe(e);let n=!1;return()=>{n||(n=!0,t(),l())}},notifyNestedSubs:function(){r.notify()},handleChangeWrapper:s,isSubscribed:function(){return i},trySubscribe:function(){i||(i=!0,a())},tryUnsubscribe:function(){i&&(i=!1,l())},getListeners:()=>r};return u}var Sn=!("undefined"==typeof window||void 0===window.document||void 0===window.document.createElement),xn="undefined"!=typeof navigator&&"ReactNative"===navigator.product,In=Sn||xn?Ht.useLayoutEffect:Ht.useEffect;function En(e,t){return e===t?0!==e||0!==t||1/e==1/t:e!=e&&t!=t}function Cn(e,t){if(En(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let r=0;r<n.length;r++)if(!Object.prototype.hasOwnProperty.call(t,n[r])||!En(e[n[r]],t[n[r]]))return!1;return!0}var Tn={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},kn={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},An={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},Fn={[dn]:{$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},[pn]:An};function On(e){return hn(e)===un?An:Fn[e.$$typeof]||Tn}var $n=Object.defineProperty,jn=Object.getOwnPropertyNames,Rn=Object.getOwnPropertySymbols,Mn=Object.getOwnPropertyDescriptor,Un=Object.getPrototypeOf,Bn=Object.prototype;function Ln(e,t){if("string"!=typeof t){if(Bn){const n=Un(t);n&&n!==Bn&&Ln(e,n)}let n=jn(t);Rn&&(n=n.concat(Rn(t)));const r=On(e),o=On(t);for(let i=0;i<n.length;++i){const s=n[i];if(!(kn[s]||o&&o[s]||r&&r[s])){const n=Mn(t,s);try{$n(e,s,n)}catch(e){}}}}return e}var Nn=Kt,Vn=[null,null];function qn(e,t,n,r,o,i){e.current=r,n.current=!1,o.current&&(o.current=null,i())}function Gn(e,t){return e===t}var Hn=function(e,t,n,{pure:r,areStatesEqual:o=Gn,areOwnPropsEqual:i=Cn,areStatePropsEqual:s=Cn,areMergedPropsEqual:a=Cn,forwardRef:l=!1,context:u=Yt}={}){const c=u,d=function(e){return e?"function"==typeof e?yn(e):bn(e,"mapStateToProps"):mn((()=>({})))}(e),p=function(e){return e&&"object"==typeof e?mn((t=>function(e,t){const n={};for(const r in e){const o=e[r];"function"==typeof o&&(n[r]=(...e)=>t(o(...e)))}return n}(e,t))):e?"function"==typeof e?yn(e):bn(e,"mapDispatchToProps"):mn((e=>({dispatch:e})))}(t),h=function(e){return e?"function"==typeof e?function(e){return function(t,{displayName:n,areMergedPropsEqual:r}){let o,i=!1;return function(t,n,s){const a=e(t,n,s);return i?r(a,o)||(o=a):(i=!0,o=a),o}}}(e):bn(e,"mergeProps"):()=>_n}(n),f=Boolean(e);return e=>{const t=e.displayName||e.name||"Component",n=`Connect(${t})`,r={shouldHandleStateChanges:f,displayName:n,wrappedComponentName:t,WrappedComponent:e,initMapStateToProps:d,initMapDispatchToProps:p,initMergeProps:h,areStatesEqual:o,areStatePropsEqual:s,areOwnPropsEqual:i,areMergedPropsEqual:a};function u(t){const[n,o,i]=Ht.useMemo((()=>{const e=t,{reactReduxForwardedRef:n}=e,r=Gt(e,["reactReduxForwardedRef"]);return[t.context,n,r]}),[t]),s=Ht.useMemo((()=>{let e=c;return null==n||n.Consumer,e}),[n,c]),a=Ht.useContext(s),l=Boolean(t.store)&&Boolean(t.store.getState)&&Boolean(t.store.dispatch),u=Boolean(a)&&Boolean(a.store);const d=l?t.store:a.store,p=u?a.getServerState:d.getState,h=Ht.useMemo((()=>gn(d.dispatch,r)),[d]),[g,m]=Ht.useMemo((()=>{if(!f)return Vn;const e=Dn(d,l?void 0:a.subscription),t=e.notifyNestedSubs.bind(e);return[e,t]}),[d,l,a]),v=Ht.useMemo((()=>l?a:qt(Vt({},a),{subscription:g})),[l,a,g]),y=Ht.useRef(void 0),b=Ht.useRef(i),_=Ht.useRef(void 0),w=Ht.useRef(!1),P=Ht.useRef(!1),D=Ht.useRef(void 0);In((()=>(P.current=!0,()=>{P.current=!1})),[]);const S=Ht.useMemo((()=>()=>_.current&&i===b.current?_.current:h(d.getState(),i)),[d,i]),x=Ht.useMemo((()=>e=>g?function(e,t,n,r,o,i,s,a,l,u,c){if(!e)return()=>{};let d=!1,p=null;const h=()=>{if(d||!a.current)return;const e=t.getState();let n,h;try{n=r(e,o.current)}catch(e){h=e,p=e}h||(p=null),n===i.current?s.current||u():(i.current=n,l.current=n,s.current=!0,c())};return n.onStateChange=h,n.trySubscribe(),h(),()=>{if(d=!0,n.tryUnsubscribe(),n.onStateChange=null,p)throw p}}(f,d,g,h,b,y,w,P,_,m,e):()=>{}),[g]);var I,E,C;let T;I=qn,E=[b,y,w,i,_,m],In((()=>I(...E)),C);try{T=Nn(x,S,p?()=>h(p(),i):S)}catch(e){throw D.current&&(e.message+=`\nThe error may be correlated with this previous error:\n${D.current.stack}\n\n`),e}In((()=>{D.current=void 0,_.current=void 0,y.current=T}));const k=Ht.useMemo((()=>Ht.createElement(e,qt(Vt({},T),{ref:o}))),[o,e,T]);return Ht.useMemo((()=>f?Ht.createElement(s.Provider,{value:v},k):k),[s,k,v])}const g=Ht.memo(u);if(g.WrappedComponent=e,g.displayName=u.displayName=n,l){const t=Ht.forwardRef((function(e,t){return Ht.createElement(g,qt(Vt({},e),{reactReduxForwardedRef:t}))}));return t.displayName=n,t.WrappedComponent=e,Ln(t,e)}return Ln(g,e)}};var Wn;function zn(e,t){if(t.length<e)throw new TypeError(e+" argument"+(e>1?"s":"")+" required, but only "+t.length+" present")}function Jn(e){zn(1,arguments);var t=Object.prototype.toString.call(e);return e instanceof Date||"object"==typeof e&&"[object Date]"===t?new Date(e.getTime()):"number"==typeof e||"[object Number]"===t?new Date(e):("string"!=typeof e&&"[object String]"!==t||"undefined"==typeof console||(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://git.io/fjule"),console.warn((new Error).stack)),new Date(NaN))}function Yn(e){zn(1,arguments);var t=Jn(e);return t.setHours(0,0,0,0),t}Wn=$t.useSyncExternalStoreWithSelector,(e=>{Nn=e})(Dt().useSyncExternalStore);(function(){var t=this,n={exports:this};return function(){function r(e,t){for(var n=-1,r=t.length,o=e.length;++n<r;)e[o+n]=t[n];return e}function o(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}function i(e){return function(t){return e(t)}}function s(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}function a(e){var t=Object;return function(n){return e(t(n))}}function l(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}function u(){}function c(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function d(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function p(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function h(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new p;++t<n;)this.add(e[t])}function f(e){this.size=(this.__data__=new d(e)).size}function g(e,t){var n=We(e),r=!n&&He(e),o=!n&&!r&&ze(e),i=!n&&!r&&!o&&Ke(e);if(n=n||r||o||i){r=e.length;for(var s=String,a=-1,l=Array(r);++a<r;)l[a]=s(a);r=l}else r=[];var u;s=r.length;for(u in e){if(!(a=!t&&!de.call(e,u))&&(a=n)&&!(a="length"==u||o&&("offset"==u||"parent"==u)||i&&("buffer"==u||"byteLength"==u||"byteOffset"==u))){var c=typeof(a=u);a=!!(l=null==(l=s)?9007199254740991:l)&&("number"==c||"symbol"!=c&&z.test(a))&&-1<a&&0==a%1&&a<l}a||r.push(u)}return r}function m(e,t,n){var r=e[t];de.call(e,t)&&$(r,n)&&(n!==G||t in e)||y(e,t,n)}function v(e,t){for(var n=e.length;n--;)if($(e[n][0],t))return n;return-1}function y(e,t,n){"__proto__"==t&&Se?Se(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function b(e,t,n,r,o,i){var s,a=1&t,l=2&t,u=4&t;if(n&&(s=o?n(e,r,o,i):n(e)),s!==G)return s;if(!U(e))return e;if(r=We(e)){if(s=function(e){var t=e.length,n=new e.constructor(t);return t&&"string"==typeof e[0]&&de.call(e,"index")&&(n.index=e.index,n.input=e.input),n}(e),!a)return function(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}(e,s)}else{var c=Ge(e),d="[object Function]"==c||"[object GeneratorFunction]"==c;if(ze(e))return function(e,t){if(t)return e.slice();var n=e.length;n=ye?ye(n):new e.constructor(n);return e.copy(n),n}(e,a);if("[object Object]"==c||"[object Arguments]"==c||d&&!o){if(s=l||d||"function"!=typeof e.constructor||F(e)?{}:Ne(be(e)),!a)return l?function(e,t){return x(e,qe(e),t)}(e,function(e,t){return e&&x(t,N(t),e)}(s,e)):function(e,t){return x(e,Ve(e),t)}(e,function(e,t){return e&&x(t,L(t),e)}(s,e))}else{if(!Y[c])return o?e:{};s=function(e,t,n){var r=e.constructor;switch(t){case"[object ArrayBuffer]":return S(e);case"[object Boolean]":case"[object Date]":return new r(+e);case"[object DataView]":return t=n?S(e.buffer):e.buffer,new e.constructor(t,e.byteOffset,e.byteLength);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return t=n?S(e.buffer):e.buffer,new e.constructor(t,e.byteOffset,e.length);case"[object Map]":return new r;case"[object Number]":case"[object String]":return new r(e);case"[object RegExp]":return(t=new e.constructor(e.source,H.exec(e))).lastIndex=e.lastIndex,t;case"[object Set]":return new r;case"[object Symbol]":return Le?Object(Le.call(e)):{}}}(e,c,a)}}if(i||(i=new f),o=i.get(e))return o;if(i.set(e,s),Ye(e))return e.forEach((function(r){s.add(b(r,t,n,r,e,i))})),s;if(Je(e))return e.forEach((function(r,o){s.set(o,b(r,t,n,o,e,i))})),s;l=u?l?T:C:l?N:L;var p=r?G:l(e);return function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r&&!1!==t(e[n],n,e););}(p||e,(function(r,o){p&&(r=e[o=r]),m(s,o,b(r,t,n,o,e,i))})),s}function _(e,t,n){return t=t(e),We(e)?t:r(t,n(e))}function w(e){if(null==e)e=e===G?"[object Undefined]":"[object Null]";else if(De&&De in Object(e)){var t=de.call(e,De),n=e[De];try{e[De]=G;var r=!0}catch(e){}var o=he.call(e);r&&(t?e[De]=n:delete e[De]),e=o}else e=he.call(e);return e}function P(e){return B(e)&&"[object Arguments]"==w(e)}function D(e,t,n,r,o){if(e===t)t=!0;else if(null==e||null==t||!B(e)&&!B(t))t=e!=e&&t!=t;else e:{var i,s,a=We(e),l=We(t),u="[object Object]"==(i="[object Arguments]"==(i=a?"[object Array]":Ge(e))?"[object Object]":i);l="[object Object]"==(s="[object Arguments]"==(s=l?"[object Array]":Ge(t))?"[object Object]":s);if((s=i==s)&&ze(e)){if(!ze(t)){t=!1;break e}a=!0,u=!1}if(s&&!u)o||(o=new f),t=a||Ke(e)?I(e,t,n,r,D,o):E(e,t,i,n,r,D,o);else{if(!(1&n)&&(a=u&&de.call(e,"__wrapped__"),i=l&&de.call(t,"__wrapped__"),a||i)){e=a?e.value():e,t=i?t.value():t,o||(o=new f),t=D(e,t,n,r,o);break e}if(s)t:if(o||(o=new f),a=1&n,i=C(e),l=i.length,s=C(t).length,l==s||a){for(u=l;u--;){var c=i[u];if(!(a?c in t:de.call(t,c))){t=!1;break t}}if((s=o.get(e))&&o.get(t))t=s==t;else{s=!0,o.set(e,t),o.set(t,e);for(var d=a;++u<l;){var p=e[c=i[u]],h=t[c];if(r)var g=a?r(h,p,c,t,e,o):r(p,h,c,e,t,o);if(g===G?p!==h&&!D(p,h,n,r,o):!g){s=!1;break}d||(d="constructor"==c)}s&&!d&&((n=e.constructor)!=(r=t.constructor)&&"constructor"in e&&"constructor"in t&&!("function"==typeof n&&n instanceof n&&"function"==typeof r&&r instanceof r)&&(s=!1)),o.delete(e),o.delete(t),t=s}}else t=!1;else t=!1}}return t}function S(e){var t=new e.constructor(e.byteLength);return new ve(t).set(new ve(e)),t}function x(e,t,n){var r=!n;n||(n={});for(var o=-1,i=t.length;++o<i;){var s=t[o],a=G;a===G&&(a=e[s]),r?y(n,s,a):m(n,s,a)}return n}function I(e,t,n,r,i,s){var a=1&n,l=e.length;if(l!=(u=t.length)&&!(a&&u>l))return!1;if((u=s.get(e))&&s.get(t))return u==t;var u=-1,c=!0,d=2&n?new h:G;for(s.set(e,t),s.set(t,e);++u<l;){var p=e[u],f=t[u];if(r)var g=a?r(f,p,u,t,e,s):r(p,f,u,e,t,s);if(g!==G){if(g)continue;c=!1;break}if(d){if(!o(t,(function(e,t){if(!d.has(t)&&(p===e||i(p,e,n,r,s)))return d.push(t)}))){c=!1;break}}else if(p!==f&&!i(p,f,n,r,s)){c=!1;break}}return s.delete(e),s.delete(t),c}function E(e,t,n,r,o,i,a){switch(n){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)break;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":if(e.byteLength!=t.byteLength||!i(new ve(e),new ve(t)))break;return!0;case"[object Boolean]":case"[object Date]":case"[object Number]":return $(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var u=s;case"[object Set]":if(u||(u=l),e.size!=t.size&&!(1&r))break;return(n=a.get(e))?n==t:(r|=2,a.set(e,t),t=I(u(e),u(t),r,o,i,a),a.delete(e),t);case"[object Symbol]":if(Le)return Le.call(e)==Le.call(t)}return!1}function C(e){return _(e,L,Ve)}function T(e){return _(e,N,qe)}function k(e,t){var n=e.__data__,r=typeof t;return("string"==r||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==t:null===t)?n["string"==typeof t?"string":"hash"]:n.map}function A(e,t){var n=null==e?G:e[t];return!U(n)||pe&&pe in n||!(R(n)?fe:W).test(O(n))?G:n}function F(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||le)}function O(e){if(null!=e){try{return ce.call(e)}catch(e){}return e+""}return""}function $(e,t){return e===t||e!=e&&t!=t}function j(e){return null!=e&&M(e.length)&&!R(e)}function R(e){return!!U(e)&&("[object Function]"==(e=w(e))||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e)}function M(e){return"number"==typeof e&&-1<e&&0==e%1&&9007199254740991>=e}function U(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function B(e){return null!=e&&"object"==typeof e}function L(e){if(j(e))e=g(e);else if(F(e)){var t,n=[];for(t in Object(e))de.call(e,t)&&"constructor"!=t&&n.push(t);e=n}else e=Ee(e);return e}function N(e){if(j(e))e=g(e,!0);else if(U(e)){var t,n=F(e),r=[];for(t in e)("constructor"!=t||!n&&de.call(e,t))&&r.push(t);e=r}else{if(t=[],null!=e)for(n in Object(e))t.push(n);e=t}return e}function V(){return[]}function q(){return!1}var G,H=/\w*$/,W=/^\[object .+?Constructor\]$/,z=/^(?:0|[1-9]\d*)$/,J={};J["[object Float32Array]"]=J["[object Float64Array]"]=J["[object Int8Array]"]=J["[object Int16Array]"]=J["[object Int32Array]"]=J["[object Uint8Array]"]=J["[object Uint8ClampedArray]"]=J["[object Uint16Array]"]=J["[object Uint32Array]"]=!0,J["[object Arguments]"]=J["[object Array]"]=J["[object ArrayBuffer]"]=J["[object Boolean]"]=J["[object DataView]"]=J["[object Date]"]=J["[object Error]"]=J["[object Function]"]=J["[object Map]"]=J["[object Number]"]=J["[object Object]"]=J["[object RegExp]"]=J["[object Set]"]=J["[object String]"]=J["[object WeakMap]"]=!1;var Y={};Y["[object Arguments]"]=Y["[object Array]"]=Y["[object ArrayBuffer]"]=Y["[object DataView]"]=Y["[object Boolean]"]=Y["[object Date]"]=Y["[object Float32Array]"]=Y["[object Float64Array]"]=Y["[object Int8Array]"]=Y["[object Int16Array]"]=Y["[object Int32Array]"]=Y["[object Map]"]=Y["[object Number]"]=Y["[object Object]"]=Y["[object RegExp]"]=Y["[object Set]"]=Y["[object String]"]=Y["[object Symbol]"]=Y["[object Uint8Array]"]=Y["[object Uint8ClampedArray]"]=Y["[object Uint16Array]"]=Y["[object Uint32Array]"]=!0,Y["[object Error]"]=Y["[object Function]"]=Y["[object WeakMap]"]=!1;var K,X="object"==typeof e&&e&&e.Object===Object&&e,Q="object"==typeof self&&self&&self.Object===Object&&self,Z=X||Q||Function("return this")(),ee="object"==typeof t&&t&&!t.nodeType&&t,te=ee&&"object"==typeof n&&n&&!n.nodeType&&n,ne=te&&te.exports===ee,re=ne&&X.process;e:{try{K=re&&re.binding&&re.binding("util");break e}catch(e){}K=void 0}var oe=K&&K.isMap,ie=K&&K.isSet,se=K&&K.isTypedArray,ae=Array.prototype,le=Object.prototype,ue=Z["__core-js_shared__"],ce=Function.prototype.toString,de=le.hasOwnProperty,pe=function(){var e=/[^.]+$/.exec(ue&&ue.keys&&ue.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),he=le.toString,fe=RegExp("^"+ce.call(de).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),ge=ne?Z.Buffer:G,me=Z.Symbol,ve=Z.Uint8Array,ye=ge?ge.a:G,be=a(Object.getPrototypeOf),_e=Object.create,we=le.propertyIsEnumerable,Pe=ae.splice,De=me?me.toStringTag:G,Se=function(){try{var e=A(Object,"defineProperty");return e({},"",{}),e}catch(e){}}(),xe=Object.getOwnPropertySymbols,Ie=ge?ge.isBuffer:G,Ee=a(Object.keys),Ce=A(Z,"DataView"),Te=A(Z,"Map"),ke=A(Z,"Promise"),Ae=A(Z,"Set"),Fe=A(Z,"WeakMap"),Oe=A(Object,"create"),$e=O(Ce),je=O(Te),Re=O(ke),Me=O(Ae),Ue=O(Fe),Be=me?me.prototype:G,Le=Be?Be.valueOf:G,Ne=function(){function e(){}return function(t){return U(t)?_e?_e(t):(e.prototype=t,t=new e,e.prototype=G,t):{}}}();c.prototype.clear=function(){this.__data__=Oe?Oe(null):{},this.size=0},c.prototype.delete=function(e){return e=this.has(e)&&delete this.__data__[e],this.size-=e?1:0,e},c.prototype.get=function(e){var t=this.__data__;return Oe?"__lodash_hash_undefined__"===(e=t[e])?G:e:de.call(t,e)?t[e]:G},c.prototype.has=function(e){var t=this.__data__;return Oe?t[e]!==G:de.call(t,e)},c.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=Oe&&t===G?"__lodash_hash_undefined__":t,this},d.prototype.clear=function(){this.__data__=[],this.size=0},d.prototype.delete=function(e){var t=this.__data__;return!(0>(e=v(t,e))||(e==t.length-1?t.pop():Pe.call(t,e,1),--this.size,0))},d.prototype.get=function(e){var t=this.__data__;return 0>(e=v(t,e))?G:t[e][1]},d.prototype.has=function(e){return-1<v(this.__data__,e)},d.prototype.set=function(e,t){var n=this.__data__,r=v(n,e);return 0>r?(++this.size,n.push([e,t])):n[r][1]=t,this},p.prototype.clear=function(){this.size=0,this.__data__={hash:new c,map:new(Te||d),string:new c}},p.prototype.delete=function(e){return e=k(this,e).delete(e),this.size-=e?1:0,e},p.prototype.get=function(e){return k(this,e).get(e)},p.prototype.has=function(e){return k(this,e).has(e)},p.prototype.set=function(e,t){var n=k(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this},h.prototype.add=h.prototype.push=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},h.prototype.has=function(e){return this.__data__.has(e)},f.prototype.clear=function(){this.__data__=new d,this.size=0},f.prototype.delete=function(e){var t=this.__data__;return e=t.delete(e),this.size=t.size,e},f.prototype.get=function(e){return this.__data__.get(e)},f.prototype.has=function(e){return this.__data__.has(e)},f.prototype.set=function(e,t){var n=this.__data__;if(n instanceof d){var r=n.__data__;if(!Te||199>r.length)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new p(r)}return n.set(e,t),this.size=n.size,this};var Ve=xe?function(e){return null==e?[]:(e=Object(e),function(e,t){for(var n=-1,r=null==e?0:e.length,o=0,i=[];++n<r;){var s=e[n];t(s,n,e)&&(i[o++]=s)}return i}(xe(e),(function(t){return we.call(e,t)})))}:V,qe=xe?function(e){for(var t=[];e;)r(t,Ve(e)),e=be(e);return t}:V,Ge=w;(Ce&&"[object DataView]"!=Ge(new Ce(new ArrayBuffer(1)))||Te&&"[object Map]"!=Ge(new Te)||ke&&"[object Promise]"!=Ge(ke.resolve())||Ae&&"[object Set]"!=Ge(new Ae)||Fe&&"[object WeakMap]"!=Ge(new Fe))&&(Ge=function(e){var t=w(e);if(e=(e="[object Object]"==t?e.constructor:G)?O(e):"")switch(e){case $e:return"[object DataView]";case je:return"[object Map]";case Re:return"[object Promise]";case Me:return"[object Set]";case Ue:return"[object WeakMap]"}return t});var He=P(function(){return arguments}())?P:function(e){return B(e)&&de.call(e,"callee")&&!we.call(e,"callee")},We=Array.isArray,ze=Ie||q,Je=oe?i(oe):function(e){return B(e)&&"[object Map]"==Ge(e)},Ye=ie?i(ie):function(e){return B(e)&&"[object Set]"==Ge(e)},Ke=se?i(se):function(e){return B(e)&&M(e.length)&&!!J[w(e)]};u.keys=L,u.keysIn=N,u.cloneDeep=function(e){return b(e,5)},u.eq=$,u.isArguments=He,u.isArray=We,u.isArrayLike=j,u.isBuffer=ze,u.isEqual=function(e,t){return D(e,t)},u.isFunction=R,u.isLength=M,u.isMap=Je,u.isNil=function(e){return null==e},u.isObject=U,u.isObjectLike=B,u.isSet=Ye,u.isTypedArray=Ke,u.stubArray=V,u.stubFalse=q,u.VERSION="4.17.5",Z._=u}.call(this),n.exports}).call({});const Kn=globalThis._;delete globalThis._,app.$lodash=Kn,app.$shortid=R,app.$sha256={calc:X},app.$redux={createStore:re},app.$reactRedux={connect:Hn},app.$dateFns={endOfDay:function(e){zn(1,arguments);var t=Jn(e);return t.setHours(23,59,59,999),t},isSameDay:function(e,t){zn(2,arguments);var n=Yn(e),r=Yn(t);return n.getTime()===r.getTime()},startOfDay:Yn};const{$utils:Xn}=app;Xn.calcEngagement=(e,t)=>(e||0)+10*(t||0);const{$utils:Qn}=app;Qn.callAsync=async(e,...t)=>new Promise((n=>{e(...t,n)}));const{$utils:Zn}=app;Zn.canvasToBlob=async(e,{type:t="image/jpeg",quality:n=.8}={})=>await new Promise(((r,o)=>{e.toBlob((e=>{e?r(e):o("canvas.toBlob failed")}),t,n)}));const{$utils:er}=app;er.createAlarm=(e,{delay:t,period:n,when:r},o)=>{const i={};"number"==typeof t&&(i.delayInMinutes=t/er.time.MINUTE),"number"==typeof n&&(i.periodInMinutes=n/er.time.MINUTE),"number"==typeof r&&(i.when=r),chrome.alarms.create(e,i),chrome.alarms.onAlarm.addListener((t=>{t.name===e&&o()}))};const{$utils:tr}=app;tr.createEmitter=()=>{const e=[];return Object.assign(t,{handle:function(e){if("function"!=typeof e)return void console.error("function is expected");t(e)},clear:function(){e.length=0},off:function(t){const n=e.indexOf(t);-1!==n&&e.splice(n,1)},isEmpty:function(){return 0===e.length}});function t(...t){"function"==typeof t[0]?e.push(t[0]):e.forEach((e=>e(...t)))}};const{$utils:nr}=app;function rr(e,t){return or(t)||(t=JSON.stringify(t)),`${encodeURIComponent(e)}=${encodeURIComponent(t)}`}function or(e){return"string"==typeof e||"number"==typeof e||"boolean"==typeof e}nr.createQueryString=e=>Object.keys(e).map((t=>{const n=e[t];return or(n)?rr(t,n):Array.isArray(n)?n.map((e=>rr(t,e))).join("&"):null})).filter(Boolean).join("&").replace(/%5B/g,"[").replace(/%5D/g,"]");const{$utils:ir}=app;ir.createResolvablePromise=()=>{let e=null,t=null;const n=new Promise(((n,r)=>{e=n,t=r}));return n.__defineGetter__("resolve",(()=>e)),n.__defineGetter__("reject",(()=>t)),n};const{$utils:sr}=app;sr.createUrl=(e,t={})=>{const n=sr.createQueryString(t);return n?`${e}?${n}`:e};const{$utils:ar}=app;ar.ensureArray=e=>Array.isArray(e)?e:[e];const{$utils:lr,$bus:ur}=app;lr.extractFrame=async(e,t=0)=>{if("undefined"==typeof document)return await ur.send("utils.extractFrame",e,t);const n=await lr.objectUrl.create(e),r=document.createElement("video");r.src=n,r.muted=!0,await new Promise((e=>r.addEventListener("loadedmetadata",e))),r.currentTime=t*r.duration,await new Promise((e=>r.addEventListener("timeupdate",e)));const o=document.createElement("canvas"),i=o.getContext("2d");o.width=r.videoWidth,o.height=r.videoHeight,i.drawImage(r,0,0);return await new Promise((e=>o.toBlob(e,"image/jpeg")))};const{$utils:cr}=app;cr.file={isCsv:function(e){return"text/csv"===e.type},isImage:function(e){return e.type.startsWith("image/")},isVideo:function(e){return e.type.startsWith("video/")}};const{$utils:dr}=app;let pr,hr;dr.getHashtagRegex=({hashOptional:e=!1}={})=>(pr||(pr=/()([#\uFF03])((?:[A-Za-zÂªÂµÂºÃ€-Ã–Ã˜-Ã¶Ã¸-É�É�-Ë�Ë†-Ë‘Ë -Ë¤Ë®ÍºÎ†Îˆ-ÎŠÎŒÎŽ-Î¡Î£-ÏŽÏ�-ÏµÏ·-Ò�ÒŠ-ÓŽ-Ó¹Ô€-Ô�Ô±-Õ–Õ™Õ¡-Ö‡×�-×ª×°-×²Ø¡-ØºÙ€-ÙŠÙ®-Ù¯Ù±-Û“Û•Û¥-Û¦Û®-Û¯Ûº-Û¼Û¿Ü�Ü’-Ü¯Ý�-Ý­Þ€-Þ¥Þ±à¤„-à¤¹à¤½à¥�à¥˜-à¥¡à¥½à¦…-à¦Œà¦�-à¦�à¦“-à¦¨à¦ª-à¦°à¦²à¦¶-à¦¹à¦½à§Žà§œ-à§�à§Ÿ-à§¡à§°-à§±à¨…-à¨Šà¨�-à¨�à¨“-à¨¨à¨ª-à¨°à¨²-à¨³à¨µ-à¨¶à¨¸-à¨¹à©™-à©œà©žà©²-à©´àª…-àª�àª�-àª‘àª“-àª¨àªª-àª°àª²-àª³àªµ-àª¹àª½à«�à« -à«¡à¬…-à¬Œà¬�-à¬�à¬“-à¬¨à¬ª-à¬°à¬²-à¬³à¬µ-à¬¹à¬½à­œ-à­�à­Ÿ-à­¡à­±à®ƒà®…-à®Šà®Ž-à®�à®’-à®•à®™-à®šà®œà®ž-à®Ÿà®£-à®¤à®¨-à®ªà®®-à®¹à°…-à°Œà°Ž-à°�à°’-à°¨à°ª-à°³à°µ-à°¹à± -à±¡à²…-à²Œà²Ž-à²�à²’-à²¨à²ª-à²³à²µ-à²¹à²½à³žà³ -à³¡à´…-à´Œà´Ž-à´�à´’-à´¨à´ª-à´¹àµ -àµ¡à¶…-à¶–à¶š-à¶±à¶³-à¶»à¶½à·€-à·†à¸�-à¸°à¸²-à¸³à¹€-à¹†àº�-àº‚àº„àº‡-àºˆàºŠàº�àº”-àº—àº™-àºŸàº¡-àº£àº¥àº§àºª-àº«àº­-àº°àº²-àº³àº½à»€-à»„à»†à»œ-à»�à¼€à½€-à½‡à½‰-à½ªà¾ˆ-à¾‹á€€-á€¡á€£-á€§á€©-á€ªá��-á�•á‚ -áƒ…áƒ�-áƒºáƒ¼á„€-á…™á…Ÿ-á†¢á†¨-á‡¹áˆ€-á‰ˆá‰Š-á‰�á‰�-á‰–á‰˜á‰š-á‰�á‰ -áŠˆáŠŠ-áŠ�-áŠ°áŠ²-áŠµáŠ¸-áŠ¾á‹€á‹‚-á‹…á‹ˆ-á‹–á‹˜-áŒ�áŒ’-áŒ•áŒ˜-á�šáŽ€-áŽ�-á�´á��-á™¬á™¯-á™¶áš�-áššáš -á›ªáœ€-áœŒáœŽ-áœ‘áœ -áœ±á�€-á�‘á� -á�¬á�®-á�°áž€-áž³áŸ—áŸœá  -á¡·á¢€-á¢¨á¤€-á¤œá¥�-á¥­á¥°-á¥´á¦€-á¦©á§�-á§‡á¨€-á¨–á´€-á¶¿á¸€-áº›áº -á»¹á¼€-á¼•á¼˜-á¼�á¼ -á½…á½ˆ-á½�á½�-á½—á½™á½›á½�á½Ÿ-á½½á¾€-á¾´á¾¶-á¾¼á¾¾á¿‚-á¿„á¿†-á¿Œá¿�-á¿“á¿–-á¿›á¿ -á¿¬á¿²-á¿´á¿¶-á¿¼â�±â�¿â‚�-â‚”â„‚â„‡â„Š-â„“â„•â„™-â„�â„¤â„¦â„¨â„ª-â„­â„¯-â„±â„³-â„¹â„¼-â„¿â……-â…‰â°€-â°®â°°-â±žâ²€-â³¤âµ¥âµ¯â¶€-â¶–â¶ -â¶¦â¶¨-â¶®â¶°-â¶¶â¶¸-â¶¾â·€-â·†â·ˆ-â·Žâ·�-â·–â·˜-â·žã€…-ã€†ã€±-ã€µã€»-ã€¼ã��-ã‚–ã‚�-ã‚Ÿã‚¡-ãƒºãƒ¼-ãƒ¿ã„…-ã„¬ã„±-ã†Žã† -ã†·ã‡°-ã‡¿-ä¶µä¸€-é¾»ê€€-ê’Œê €-ê �ê ƒ-ê …ê ‡-ê Šê Œ-ê ¢ê°€-íž£ï¤€-ï¨­ï¨°-ï©ªï©°-ï«™ï¬€-ï¬†ï¬“-ï¬—ï¬�ï¬Ÿ-ï¬¨ï¬ª-ï¬¶-ï¬¼ï¬¾ï­€-ï­�ï­ƒ-ï­„ï­†-ï®±ï¯“-ï´½ïµ�-ï¶�ï¶’-ï·‡ï·°-ï·»ï¹°-ï¹´ï¹¶-ï»¼ï¼¡-ï¼ºï½�-ï½šï½¦-ï¾¾ï¿‚-ï¿‡ï¿Š-ï¿�ï¿’-ï¿—ï¿š-ï¿œÌ€ï¾¡-ï¿œã‚¡-ãƒºãƒ¼-ãƒ¾ï½¦-ï¾Ÿï¼�-ï¼™ï¼¡-ï¼ºï½�-ï½šã��-ã‚–ã‚™-ã‚žã�€-ä¶¿ä¸€-é¿¿êœ€-ëœ¿ë�€-ë Ÿ-ï¨Ÿã€ƒã€…ã€»0-9Ù -Ù©Û°-Û¹à¥¦-à¥¯à§¦-à§¯à©¦-à©¯à«¦-à«¯à­¦-à­¯à¯¦-à¯¯à±¦-à±¯à³¦-à³¯àµ¦-àµ¯à¹�-à¹™à»�-à»™à¼ -à¼©á�€-á�‰áŸ -áŸ©á �-á ™á¥†-á¥�á§�-á§™ï¼�-ï¼™_]|(?:[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u2388\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2648-\u2653\u2660\u2663\u2665\u2666\u2668\u267B\u267F\u2692-\u2694\u2696\u2697\u2699\u269B\u269C\u26A0\u26A1\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD79\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED0\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3]|\uD83E[\uDD10-\uDD18\uDD80-\uDD84\uDDC0]|(?:0\u20E3|1\u20E3|2\u20E3|3\u20E3|4\u20E3|5\u20E3|6\u20E3|7\u20E3|8\u20E3|9\u20E3|#\u20E3|\\*\u20E3|\uD83C(?:\uDDE6\uD83C(?:\uDDEB|\uDDFD|\uDDF1|\uDDF8|\uDDE9|\uDDF4|\uDDEE|\uDDF6|\uDDEC|\uDDF7|\uDDF2|\uDDFC|\uDDE8|\uDDFA|\uDDF9|\uDDFF|\uDDEA)|\uDDE7\uD83C(?:\uDDF8|\uDDED|\uDDE9|\uDDE7|\uDDFE|\uDDEA|\uDDFF|\uDDEF|\uDDF2|\uDDF9|\uDDF4|\uDDE6|\uDDFC|\uDDFB|\uDDF7|\uDDF3|\uDDEC|\uDDEB|\uDDEE|\uDDF6|\uDDF1)|\uDDE8\uD83C(?:\uDDF2|\uDDE6|\uDDFB|\uDDEB|\uDDF1|\uDDF3|\uDDFD|\uDDF5|\uDDE8|\uDDF4|\uDDEC|\uDDE9|\uDDF0|\uDDF7|\uDDEE|\uDDFA|\uDDFC|\uDDFE|\uDDFF|\uDDED)|\uDDE9\uD83C(?:\uDDFF|\uDDF0|\uDDEC|\uDDEF|\uDDF2|\uDDF4|\uDDEA)|\uDDEA\uD83C(?:\uDDE6|\uDDE8|\uDDEC|\uDDF7|\uDDEA|\uDDF9|\uDDFA|\uDDF8|\uDDED)|\uDDEB\uD83C(?:\uDDF0|\uDDF4|\uDDEF|\uDDEE|\uDDF7|\uDDF2)|\uDDEC\uD83C(?:\uDDF6|\uDDEB|\uDDE6|\uDDF2|\uDDEA|\uDDED|\uDDEE|\uDDF7|\uDDF1|\uDDE9|\uDDF5|\uDDFA|\uDDF9|\uDDEC|\uDDF3|\uDDFC|\uDDFE|\uDDF8|\uDDE7)|\uDDED\uD83C(?:\uDDF7|\uDDF9|\uDDF2|\uDDF3|\uDDF0|\uDDFA)|\uDDEE\uD83C(?:\uDDF4|\uDDE8|\uDDF8|\uDDF3|\uDDE9|\uDDF7|\uDDF6|\uDDEA|\uDDF2|\uDDF1|\uDDF9)|\uDDEF\uD83C(?:\uDDF2|\uDDF5|\uDDEA|\uDDF4)|\uDDF0\uD83C(?:\uDDED|\uDDFE|\uDDF2|\uDDFF|\uDDEA|\uDDEE|\uDDFC|\uDDEC|\uDDF5|\uDDF7|\uDDF3)|\uDDF1\uD83C(?:\uDDE6|\uDDFB|\uDDE7|\uDDF8|\uDDF7|\uDDFE|\uDDEE|\uDDF9|\uDDFA|\uDDF0|\uDDE8)|\uDDF2\uD83C(?:\uDDF4|\uDDF0|\uDDEC|\uDDFC|\uDDFE|\uDDFB|\uDDF1|\uDDF9|\uDDED|\uDDF6|\uDDF7|\uDDFA|\uDDFD|\uDDE9|\uDDE8|\uDDF3|\uDDEA|\uDDF8|\uDDE6|\uDDFF|\uDDF2|\uDDF5|\uDDEB)|\uDDF3\uD83C(?:\uDDE6|\uDDF7|\uDDF5|\uDDF1|\uDDE8|\uDDFF|\uDDEE|\uDDEA|\uDDEC|\uDDFA|\uDDEB|\uDDF4)|\uDDF4\uD83C\uDDF2|\uDDF5\uD83C(?:\uDDEB|\uDDF0|\uDDFC|\uDDF8|\uDDE6|\uDDEC|\uDDFE|\uDDEA|\uDDED|\uDDF3|\uDDF1|\uDDF9|\uDDF7|\uDDF2)|\uDDF6\uD83C\uDDE6|\uDDF7\uD83C(?:\uDDEA|\uDDF4|\uDDFA|\uDDFC|\uDDF8)|\uDDF8\uD83C(?:\uDDFB|\uDDF2|\uDDF9|\uDDE6|\uDDF3|\uDDE8|\uDDF1|\uDDEC|\uDDFD|\uDDF0|\uDDEE|\uDDE7|\uDDF4|\uDDF8|\uDDED|\uDDE9|\uDDF7|\uDDEF|\uDDFF|\uDDEA|\uDDFE)|\uDDF9\uD83C(?:\uDDE9|\uDDEB|\uDDFC|\uDDEF|\uDDFF|\uDDED|\uDDF1|\uDDEC|\uDDF0|\uDDF4|\uDDF9|\uDDE6|\uDDF3|\uDDF7|\uDDF2|\uDDE8|\uDDFB)|\uDDFA\uD83C(?:\uDDEC|\uDDE6|\uDDF8|\uDDFE|\uDDF2|\uDDFF)|\uDDFB\uD83C(?:\uDDEC|\uDDE8|\uDDEE|\uDDFA|\uDDE6|\uDDEA|\uDDF3)|\uDDFC\uD83C(?:\uDDF8|\uDDEB)|\uDDFD\uD83C\uDDF0|\uDDFE\uD83C(?:\uDDF9|\uDDEA)|\uDDFF\uD83C(?:\uDDE6|\uDDF2|\uDDFC))))[\uFE00-\uFE0F\u200D]*)+)/gi,hr=new RegExp(pr.toString().replace("/","").replace("/gi","").replace("[#\\uFF03]","[#\\uFF03]?"),"gi")),e?hr:pr);const{$utils:fr}=app;fr.is={null:e=>null===e,defined:e=>void 0!==e,undefined:e=>void 0===e,nil:e=>null==e,boolean:e=>"boolean"==typeof e,number:e=>"number"==typeof e,string:e=>"string"==typeof e,symbol:e=>"symbol"==typeof e,function:e=>"function"==typeof e,map:e=>e instanceof Map,set:e=>e instanceof Set,url:e=>e instanceof URL,blob:e=>e instanceof Blob,file:e=>e instanceof File,error:e=>e instanceof Error,regexp:e=>e instanceof RegExp,array:e=>Array.isArray(e),object:e=>"[object Object]"===Object.prototype.toString.call(e),nan:e=>Number.isNaN(e),nonPrimitive:e=>fr.is.object(e)||fr.is.array(e),numeric:e=>!fr.is.nan(Number(e)),empty:e=>!!fr.is.nil(e)||(fr.is.array(e)?0===e.length:fr.is.object(e)?0===Object.keys(e).length:!!fr.is.string(e)&&0===e.trim().length)};const{$utils:gr,$bus:mr}=app;gr.loadImage=async e=>{if("undefined"==typeof document)return await mr.send("utils.loadImage",e);const t=await gr.objectUrl.create(e),n=document.createElement("img");return await new Promise(((e,r)=>{n.onload=e,n.onerror=r,n.src=t})),{img:n,width:n.width,height:n.height,ratio:n.width/n.height}};const{$utils:vr,$bus:yr}=app;vr.loadVideoMetadata=async e=>{if("undefined"==typeof document)return await yr.send("utils.loadVideoMetadata",e);const t="string"==typeof e?e:await vr.objectUrl.create(e),n=document.createElement("video");n.src=t,n.muted=!0,n.volume=0,n.preload="metadata",n.play();const r={};return await new Promise(((e,t)=>{n.addEventListener("loadedmetadata",(async()=>{await vr.waitFor((()=>n.webkitAudioDecodedByteCount),100),r.width=n.videoWidth,r.height=n.videoHeight,r.ratio=n.videoWidth/n.videoHeight,r.duration=n.duration,r.hasAudio=n.webkitAudioDecodedByteCount>0,e()})),n.addEventListener("error",(()=>{t(n.error)}))})),n.remove(),r};const{$utils:br,$bus:_r}=app;br.ls={get:function(e,t){if(!this._supported())return _r.send("utils.ls.get",e,t);const n=localStorage.getItem(e);if(null==n)return t;if("true"===n)return!0;if("false"===n)return!1;if(n.startsWith("[")||n.startsWith("{"))return JSON.parse(n);const r=Number(n);return Number.isNaN(r)?n:r},set:function(e,t){if(!this._supported())return _r.send("utils.ls.set",e,t);try{"string"==typeof t?localStorage.setItem(e,t):localStorage.setItem(e,JSON.stringify(t))}catch(n){br.error("ls.set failed",{key:e,value:t,details:n})}},has:function(e){return this._supported()?e in localStorage:_r.send("utils.ls.has",e)},remove:function(e){if(!this._supported())return _r.send("utils.ls.remove",e);localStorage.removeItem(e)},_supported:function(){return!!globalThis.localStorage}};const{$utils:wr,$bus:Pr}=app;wr.objectUrl={create:function(e,t=!1){if(!URL.createObjectURL)return Pr.send("utils.objectUrl.create",e,t);const n=URL.createObjectURL(e);if(t){const e=wr.is.number(t)?t:6e4;setTimeout((()=>URL.revokeObjectURL(n)),e)}return n},revoke:function(e){if(!URL.revokeObjectURL)return Pr.send("utils.objectUrl.revoke",e);URL.revokeObjectURL(e)}};const{$utils:Dr}=app;Dr.removeFromArray=(e,t)=>{let n;n="function"==typeof t?e.findIndex(t):e.indexOf(t),-1!==n&&e.splice(n,1)};const{$utils:Sr}=app;Sr.safe=(e,t=null)=>{try{const n=e();return n instanceof Promise?new Promise(((e,r)=>{n.then(e).catch((n=>{n&&console.error(n),e(t)}))})):n}catch(e){return console.error(e),t}};const{$utils:xr}=app;xr.safeJsonParse=e=>{try{return JSON.parse(e)}catch(e){return null}};const{$utils:Ir,$bus:Er}=app;Ir.scaler={scaleToFitSize:async function(e,t,n,{type:r="image/jpeg",quality:o=.8}={}){if("undefined"==typeof document)return await Er.send("utils.scaler.scaleToFitRatio",...arguments);const{img:i,width:s,height:a}=await Ir.loadImage(e),l=t/s,u=n/a,c=Math.min(l,u),d=document.createElement("canvas");d.width=s*c,d.height=a*c;const p=d.getContext("2d");return p.drawImage(i,0,0,s,a,0,0,d.width,d.height),await Ir.canvasToBlob(d,{type:r,quality:o})},scaleToFitRatio:async function(e,t,{type:n="image/jpeg",quality:r=.8}={}){if("undefined"==typeof document)return await Er.send("utils.scaler.scaleToFitRatio",...arguments);const{img:o,width:i,height:s,ratio:a}=await Ir.loadImage(e),l=document.createElement("canvas");a>t?(l.width=i,l.height=i/t):(l.height=s,l.width=s*t);const u=l.getContext("2d"),c=(l.width-i)/2,d=(l.height-s)/2;return u.drawImage(o,c,d,i,s),await Ir.canvasToBlob(l,{type:n,quality:r})}};const{$utils:Cr}=app;Cr.setTimer=(e,t=0)=>{const n=`timer-${Math.random().toString().slice(2)}`,r=Date.now()+Math.max(t,0),o=t=>{t.name===n&&(i(),e())},i=()=>{chrome.alarms.clear(n),chrome.alarms.onAlarm.removeListener(o)};return chrome.alarms.create(n,{when:r}),chrome.alarms.onAlarm.addListener(o),{clear:i}};const{$utils:Tr}=app;Tr.sleep=async e=>{if("number"==typeof e&&Number.isFinite(e)){const t=e;await new Promise((e=>setTimeout(e,t)))}else{if(!e||"object"!=typeof e||e.constructor!==Object)throw new Error("unexpected sleep function argument: number or object expected, got",e);{const{min:t,max:n}=e.longBreak&&Math.random()<1-Math.pow(.5,1/e.longBreak.every)?{min:0,max:0,...e.longBreak}:{min:0,max:0,...e},r=t+function(e,t){return Math.round(e+function(){let e=0;for(let t=0;t<6;t+=1)e+=Math.random();return e/6}()*(t-e))}(0,n-t);if(0===r)return;await new Promise((e=>setTimeout(e,r)))}}};const{$utils:kr}=app,Ar=36e5,Fr=864e5;kr.time={SECOND:1e3,MINUTE:6e4,HOUR:Ar,DAY:Fr,WEEK:6048e5,MONTH:26784e5,weekdays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"]};const{$utils:Or}=app;Or.unique=(e,t,n)=>n.indexOf(e)===t;const{$utils:$r}=app;$r.waitFor=async(e,t=null)=>{let n,r;return"number"==typeof t?(n=t,r=100):t?(n=t.timeout||3e4,r=t.frequency||100):(n=3e4,r=100),new Promise(((t,o)=>{const i=e();if(i)return void t(i);const s=setInterval((()=>{const n=e();n&&(clearInterval(s),t(n))}),r);setTimeout((()=>{clearInterval(s),t(null)}),n)}))};const{$utils:jr}=app;jr.watchForIgCookie=(e,t)=>{chrome.cookies.onChanged.addListener((async({cookie:n,cause:r,removed:o})=>{n.domain.includes("instagram.com")&&n.name===e&&"explicit"===r&&(o||(await t(n),chrome.cookies.remove({url:"https://www.instagram.com",name:e}),chrome.cookies.onChanged.removeListener()))}))};const{$env:Rr}=app;Rr.getLocus=()=>"chrome-extension:"!==location.protocol&&chrome.runtime?"cs":"chrome-extension:"!==location.protocol?"nj":"/inssist.html"===location.pathname?"pp":"/offscreen.html"===location.pathname?"os":"bg";const{$env:Mr,$utils:Ur}=app;Mr.controller={init:async function(){const e=Mr.getLocus(),t=await Ur.ls.get("env.is")||app.env;this._production="production"===t,this._development="development"===t,Object.assign(Mr,{version:app.version,backup:this._getBackup(),features:await this._getFeatures(),options:await this._getOptions(),locus:e,is:{pp:"pp"===e,bg:"bg"===e,cs:"cs"===e,nj:"nj"===e,production:this._production,development:this._development}})},_getBackup:function(){return{url:"https://inssist.com/backup"}},_getFeatures:async function(){return{fspring:await Ur.ls.get("env.features.fspring",!0),iframes:await Ur.ls.get("env.features.iframes",!0),trial:!0,log:await Ur.ls.get("env.features.log",this._development)}},_getOptions:async function(){return{apiUrl:await Ur.ls.get("env.options.apiUrl","https://api.inssist.com/api/v1"),collectBillingStats:await Ur.ls.get("env.options.collectBillingStats",!1),domain:await Ur.ls.get("env.options.domain","inssist.com"),storefront:await Ur.ls.get("env.options.storefront",this._production?"slashed.onfastspring.com":"slashed.test.onfastspring.com"),checkoutContainer:await Ur.ls.get("env.options.checkoutContainer","https://inssist.com"),billingPlans:this._getBillingPlans(),billingProFeaturesList:this._getBillingProFeaturesList(),billingProFeaturesTable:this._getBillingProFeaturesTable(),trialFeaturesLimits:this._getTrialFeaturesLimits(),tagAssist:await this._getTagAssist()}},_getBillingPlans:function(){return{"inssist-pro-monthly":{type:"subscription",pricing:{US:{currency:"USD",price:4.99}}},"inssist-pro-lifetime":{type:"product",pricing:{US:{currency:"USD",price:45}},isActive:e=>{const{billing:t,auth:n}=e;return(t.orders||[]).some((e=>{var t,r;return"inssist-pro-lifetime"===e.product&&(null===(t=e.tags)||void 0===t||null===(r=t.accounts)||void 0===r?void 0:r.some((e=>e.id===(null==n?void 0:n.userId)||e.name===(null==n?void 0:n.username))))}))}},"inssist-pro-infinite":{type:"product",pricing:{US:{currency:"USD",price:240}}}}},_getBillingProFeaturesList:function(){return[{id:"schedule",icon:"sidebar-mediator.later",title:"Post Later",description:"\n          Schedule photos, videos, carousels, stories and reels.\n          Use Time Slots to schedule content rapidly.\n        "},{id:"hashtags",icon:"sidebar-mediator.hashtags",title:"Hashtag Assistant",description:"\n          Find effective hashtags to increase your posts engagement.\n          Create hashtag collections.\n        "},{id:"reels",icon:"sidebar-mediator.covers",title:"Reels and Video Stories",description:"\n          Publish Video Reels and Instagram Video Stories from your desktop PC / Mac.\n        "},{id:"music",icon:"sidebar-mediator.music",title:"Music, Covers, Ghost View",description:"\n          Add music to your videos. Select or upload custom covers.\n          View stories anonymously.\n        "}]},_getBillingProFeaturesTable:function(){return[{title:"Post Photos and Videos",isFree:!0,isPro:!0},{title:"Post Photo Stories",isFree:!0,isPro:!0},{title:"Multiaccount Support",isFree:!0,isPro:!0},{title:"Relevant Hashtags",isFree:!0,isPro:!0},{title:"Direct Messages",isFree:!0,isPro:!0},{title:"Inspirations",isFree:!0,isPro:!0},{title:"Dark Mode",isFree:!0,isPro:!0,isPaddedBottom:!0},{title:"Post Reels",isPro:!0,icons:["sidebar-mediator.later","sidebar-mediator.covers","sidebar-mediator.hashtags"]},{title:"Post Video Stories",isPro:!0},{title:"Schedule Posts",isPro:!0},{title:"Schedule Reels",isPro:!0},{title:"Schedule Stories",isPro:!0},{title:"Ghost Story View",isPro:!0,tooltip:{text:"Stay anonymous while viewing Instagram stories"}},{title:"Add Music to Videos",isPro:!0},{title:"Custom Video Covers",isPro:!0},{title:"Hashtags Metrics & Collections",isPro:!0}]},_getTagAssist:async function(){return{apiUrl:await Ur.ls.get("env.options.tagAssist.apiUrl",(this._production,"https://fc.inssist.com/api/v1/hashtag")),collectionsTagDataTtl:1*Ur.time.MONTH,userTagScanTtl:1*Ur.time.WEEK,userTagScanPeriod:3*Ur.time.DAY,userTagScanCount:30,sendCollectedTagsTimeout:10*Ur.time.MINUTE,maxTagsToQuery:5,maxRelevantTagsToKeep:100,accountStatsTtl:1*Ur.time.DAY}},_getTrialFeaturesLimits:function(){return{dmAdvanced:e=>e.dmAdvanced>=50,insights:e=>e.insights>=2,analytics:e=>e.analytics>=5,coverAssist:e=>e.coverAssist>=2,musicAssist:e=>e.musicAssist>=2,storyAssist:e=>e.storyAssist>=5,tagAssist:e=>e.tagAssist>=4,addLinkToStory:e=>e.addLinkToStory>=2,repost:e=>e.repost>=3,reels:e=>e.reels>=2,ghostStoryView:e=>e.ghostStoryView>=3,later:e=>e.later>=5}}};const{$bus:Br,$env:Lr,$utils:Nr}=app;{var Vr;const e=null===(Vr=app.get("$bus").controller)||void 0===Vr?void 0:Vr._njOnMsg;e&&window.removeEventListener("message",e)}Br.controller={init:function(){Br.on=this.on.bind(this),Br.off=this.off.bind(this),Br.once=this.once.bind(this),Br.send=this._wrapThrowIfError(this.send),Br.call=this._wrapThrowIfError(this.call),Br.poll=this.poll.bind(this),Br.getTabId=this.getTabId.bind(this),Br.getWindowId=this.getWindowId.bind(this),this._locus=Lr.getLocus(),this._serialize=this._serialize.bind(this),this._handlers={},this._is("pp")?this._setupPp():this._is("bg")?(this._blobs={},this._channel=new BroadcastChannel("bus.channel"),this._setupBg()):this._is("cs")?this._setupCs():this._is("nj")?this._setupNj():this._is("os")?(Br.setIframe=e=>this._iframe=e,this._iframe=null,this._channel=new BroadcastChannel("bus.channel"),this._setupOs()):this._is("oi")&&this._setupOi()},on:function(e,t,n=null){this._on(e,null,t,n)},off:function(e,t=null){this._off(e,null,t)},once:function(e,t){const n=async(...r)=>(this.off(e,n),await t(...r));this.on(e,n)},send:async function(e,...t){if(!Nr.is.nan(Number(e))){const n=Number(e);return e=t[0],t=t.slice(1),await this._sendToTab(n,e,...t)}if(this._is("pp"))return await this._sendToExt(e,...t);if(this._is("nj"))return await this._sendToPage(e,...t);if(this._is("oi"))return await this._sendToParent(e,...t);if(this._is("bg","cs","os"))return await this._pick([this._sendToExt(e,...t),this._callHandlers({name:e,args:t},(e=>e.proxy))]);if(this._is("fg")){if("store.actions"===e)return;if("idb.change"===e)return;Br.log(e,...t)}},call:async function(e,...t){return this._callHandlers({name:e,args:t},(e=>!e.proxy))},poll:async function(e,...t){return await Nr.waitFor((()=>this.send(e,...t)))},getTabId:async function(){if(this._is("bg"))return null;const{tabId:e}=await this.send("bus.getTabData");return e},getWindowId:async function(){if(this._is("bg"))return null;const{windowId:e}=await this.send("bus.getTabData");return e},_on:function(e,t,n,r=null){this._handlers[e]||(this._handlers[e]=[]),this._is("cs","nj","oi")&&0===this._handlers[e].length&&this._sendToProxier("bus.proxy",e,!0);const o={fn:n,name:e};t&&(o.proxy=t),r&&(o.this=r),this._handlers[e].push(o)},_off:function(e,t=null,n=null){this._handlers[e]&&(this._handlers[e]=this._handlers[e].filter((e=>{const r=!n||n===e.fn,o=t===(e.proxy||null);return!r||!o})),this._is("cs","nj","oi")&&0===this._handlers[e].length&&this._sendToProxier("bus.proxy",e,!1))},_setupPp:function(){chrome.runtime.onMessage.addListener(((e,t,n)=>{if(!(null==e?void 0:e.$bus))return;const r=this._callHandlers(e);return r?(r.then(this._serialize).then(n),!0):void 0}))},_setupBg:function(){chrome.runtime.onMessage.addListener(((e,t,n)=>{var r;if(!(null==e?void 0:e.$bus))return;const o=(null===(r=t.tab)||void 0===r?void 0:r.id)||null;if("bus.proxy"===e.name)return void(async()=>{const[t,n]=await this._deserialize(e.argsStr);o&&(n?this._on(t,o,((...e)=>this._sendToTab(o,t,...e))):this._off(t,o))})();if("bus.getTabData"===e.name){var i;const e=(null===(i=t.tab)||void 0===i?void 0:i.windowId)||null;return n(this._serialize({tabId:o,windowId:e})),!0}if("bus.sendToTab"===e.name)return(async()=>{const t=await this._deserialize(e.argsStr),r=await this._sendToTab(...t);n(this._serialize(r))})(),!0;if("bus.blobIdToObjectUrl"===e.name)return(async()=>{const[t]=await this._deserialize(e.argsStr),r=await this._blobIdToObjectUrl(t);n(this._serialize(r))})(),!0;const s=this._callHandlers(e,(e=>e.proxy!==o));return s?(s.then(this._serialize).then(n),!0):void 0})),chrome.tabs.onRemoved.addListener((e=>{for(const t in this._handlers)this._handlers[t]=this._handlers[t].filter((t=>t.proxy!==e))}))},_setupCs:function(){chrome.runtime.onMessage.addListener(((e,t,n)=>{if(!e.$bus)return;const r=this._callHandlers(e);return r?(r.then(this._serialize).then(n),!0):void 0})),window.addEventListener("message",(async({data:e})=>{if(!(null==e?void 0:e.$bus))return;if("nj"!==e.locus)return;if("bus.proxy"===e.name){const[t,n]=e.args;return void(n?this._on(t,"nj",((...e)=>this._sendToPage(t,...e))):this._off(t,"nj"))}const t=await this._pick([this._sendToExt(e.name,...e.args),this._callHandlers(e,(e=>!e.proxy))]);window.postMessage({resId:e.reqId,result:t},"*")}))},_setupNj:function(){this._njOnMsg=async({data:e})=>{if(!(null==e?void 0:e.$bus))return;if("cs"!==e.locus)return;const t=await this._callHandlers(e);window.postMessage({resId:e.reqId,result:t},"*")},window.addEventListener("message",this._njOnMsg)},_setupOs:function(){chrome.runtime.onMessage.addListener(((e,t,n)=>{if(!(null==e?void 0:e.$bus))return;const r=this._callHandlers(e);return r?(r.then(this._serialize).then(n),!0):void 0})),window.addEventListener("message",(async({data:e})=>{if(!(null==e?void 0:e.$bus))return;if("bus.proxy"===e.name){const[t,n]=e.args;return void(n?this._on(t,"oi",((...e)=>this._sendToIframe(t,...e))):this._off(t,"oi"))}const t=await this._pick([this._sendToExt(e.name,...e.args),this._callHandlers(e,(e=>!e.proxy))]);this._iframe.contentWindow.postMessage({resId:e.reqId,result:t},"*")})),this._channel.addEventListener("message",(({data:e})=>{const{blob:t,reqId:n}=e,r=Nr.objectUrl.create(t,!0);this._channel.postMessage({resId:n,objectUrl:r})}))},_setupOi:function(){window.addEventListener("message",(async({data:e})=>{if(!(null==e?void 0:e.$bus))return;const t=await this._callHandlers(e);window.parent.postMessage({resId:e.reqId,result:t},"*")}))},_sendToExt:async function(e,...t){const n={$bus:!0,name:e,argsStr:this._serialize(t)},r=await new Promise((e=>{try{chrome.runtime.sendMessage(n,(t=>{chrome.runtime.lastError?e(null):e(t)}))}catch(t){if("Extension context invalidated."===t.message)return;Br.error(t),e(null)}}));return await this._deserialize(r)},_sendToTab:async function(e,t,...n){var r;if(!(null===(r=chrome.tabs)||void 0===r?void 0:r.sendMessage))return await this.send("bus.sendToTab",e,t,...n);const o={$bus:!0,name:t,argsStr:this._serialize(n)},i=await new Promise((t=>{chrome.tabs.sendMessage(e,o,(e=>{chrome.runtime.lastError?t(null):t(e)}))}));return await this._deserialize(i)},_sendToPage:async function(e,...t){const n=this._generateId(),r={$bus:!0,name:e,args:t,reqId:n,locus:this._locus};return window.postMessage(r,"*"),await this._waitForResponseMessage(n)},_sendToIframe:async function(e,...t){if(!this._iframe)return null;const n=this._generateId(),r={$bus:!0,name:e,args:t,reqId:n};return this._iframe.contentWindow.postMessage(r,"*"),await this._waitForResponseMessage(n)},_sendToParent:async function(e,...t){const n=this._generateId(),r={$bus:!0,name:e,args:t,reqId:n};return parent.postMessage(r,"*"),await this._waitForResponseMessage(n)},_sendToProxier:async function(e,...t){return this._is("cs")?await this._sendToExt(e,...t):this._is("nj")?await this._sendToPage(e,...t):this._is("oi")?await this._sendToParent(e,...t):void 0},_waitForResponseMessage:async function(e){return await new Promise((t=>{const n=({data:r})=>{!(!r||r.resId!==e)&&(window.removeEventListener("message",n),t(r.result))};window.addEventListener("message",n)}))},_callHandlers:function({name:e,args:t,argsStr:n},r=null){let o=this._handlers[e];return o?(r&&(o=o.filter(r)),0===o.length?null:new Promise((async e=>{n&&(t=await this._deserialize(n));e(await this._pick(o.map((async e=>{try{return await e.fn.call(e.this,...t)}catch(t){return Br.error(`failed to handle "${e.name}".`,t),t}}))))}))):null},_serialize:function(e){return Nr.is.nil(e)?null:JSON.stringify(e,((e,t)=>{if(Nr.is.blob(t)){if(this._is("bg")){const e=this._generateId();return this._blobs[e]=t,`bus.blob.${e}`}return`bus.blob.${Nr.objectUrl.create(t,!0)}`}return Nr.is.error(t)?`bus.error.${t.message}`:t}))},_deserialize:async function(e){if(!Nr.is.string(e))return null;const t=new Map,n=JSON.parse(e,((e,n)=>{const r=Nr.is.string(n);return r&&n.startsWith("bus.blob.")?(t.set(n,n.slice("bus.blob.".length)),n):r&&n.startsWith("bus.error.")?new Error(n.slice("bus.error.".length)):n}));return await Promise.all([...t.keys()].map((async e=>{let n;const r=t.get(e);n=r.startsWith("blob:")?r:await this._sendToExt("bus.blobIdToObjectUrl",r);const o=await fetch(n).then((e=>e.blob()));t.set(e,o)}))),this._applyBlobs(n,t)},_applyBlobs:function(e,t){if(t.has(e))return t.get(e);if(Nr.is.array(e)||Nr.is.object(e))for(const n in e)e[n]=this._applyBlobs(e[n],t);return e},_blobIdToObjectUrl:async function(e){const t=this._blobs[e];let n;return Nr.is.string(t)?n=t:(n=await this._blobToObjectUrl(t),this._blobs[e]=n),setTimeout((()=>delete this._blobs[e]),6e4),n},_blobToObjectUrl:async function(e){const t=this._generateId();return this._channel.postMessage({reqId:t,blob:e}),await new Promise((e=>{const n=({data:r})=>{!(!r||r.resId!==t)&&(this._channel.removeEventListener("message",n),e(r.objectUrl))};this._channel.addEventListener("message",n)}))},_is:function(...e){return e.includes(this._locus)},_generateId:function(){return`bus-${Date.now()}-${Math.random().toString(36).slice(2)}`},_wrapThrowIfError:function(e){return async(...t)=>{const n=await e.call(this,...t);if(Nr.is.error(n))throw n;return n}},_pick:async function(e=[]){return 0===e.length?null:await new Promise((t=>{let n=0;e.forEach((async r=>{const o=await r;return Nr.is.nil(o)?n===e.length-1?t(null):void n++:t(o)}))}))}};const{$constants:qr}=app,Gr="https://www.instagram.com/";qr.ig={maxMentions:30,base:Gr,challenge:'<link rel="alternate" href="https://www.instagram.com/challenge/',scriptPath:{followings:{regexp:[/(?:src|href)="\/(static\/bundles\/[\S]+\/Consumer\.js\/[\S]+)"/i,/(?:src|href)="\/\/www.instagram.com\/(static\/bundles\/[\S]+\/Consumer\.js\/[\S]+)"/i,/(?:src|href)="\/\/z-p3.www.instagram.com\/(static\/bundles\/[\S]+\/Consumer\.js\/[\S]+)"/i]},followers:{regexp:[/(?:src|href)="\/(static\/bundles\/[\S]+\/Consumer\.js\/[\S]+)"/i,/(?:src|href)="\/\/www.instagram.com\/(static\/bundles\/[\S]+\/Consumer\.js\/[\S]+)"/i,/(?:src|href)="\/\/z-p3.www.instagram.com\/(static\/bundles\/[\S]+\/Consumer\.js\/[\S]+)"/i]},timeline:{regexp:[/(?:src|href)="\/(static\/bundles\/[\S]+\/ConsumerLibCommons\.js\/[\S]+)"/i,/(?:src|href)="\/\/www.instagram.com\/(static\/bundles\/[\S]+\/ConsumerLibCommons\.js\/[\S]+)"/i,/(?:src|href)="\/\/z-p3.www.instagram.com\/(static\/bundles\/[\S]+\/ConsumerLibCommons\.js\/[\S]+)"/i]},"user-posts":{regexp:[/(?:src|href)="\/(static\/bundles\/[\S]+\/Consumer\.js\/[\S]+)"/i,/(?:src|href)="\/\/www.instagram.com\/(static\/bundles\/[\S]+\/Consumer\.js\/[\S]+)"/i,/(?:src|href)="\/\/z-p3.www.instagram.com\/(static\/bundles\/[\S]+\/Consumer\.js\/[\S]+)"/i]}},queryHash:{followings:{regexp:[/,o="([\dabcdef]{32})",u=1/,/,s="([\dabcdef]{32})",f=1/,/,l="([\dabcdef]{32})",s=1/,/,l="([\dabcdef]{32})",u=1/,/,n="([\dabcdef]{32})",u=1/]},followers:{regexp:[/\),u="([\dabcdef]{32})",l="/,/\),c="([\dabcdef]{32})",l="/,/\),l="([\dabcdef]{32})",s="/,/\),a="([\dabcdef]{32})",l="/,/;var n="([\dabcdef]{32})",o="/,/;var t="([\dabcdef]{32})",n="/,/;const c="([\dabcdef]{32})",l="/,/;const s="([\dabcdef]{32})",l="/,/;const t="([\dabcdef]{32})",n="/]},timeline:{regexp:[/,e\.FEED_QUERY_ID="([\dabcdef]{32})",/]},"user-posts":{regexp:[/l.pagination},queryId:"([\dabcdef]{32})",/,/c.pagination},queryId:"([\dabcdef]{32})",/]}},sharedData:{prefix:'<script type="text/javascript">window._sharedData =',suffix:";<\/script>"},additionalData:{prefix:'<script type="text/javascript">window.__additionalDataLoaded(',suffix:");<\/script>"},home:{url:Gr},loginActivity:{url:"https://i.instagram.com/api/v1/session/login_activity/?__a=1"},post:{url:e=>`https://www.instagram.com/p/${e}/`},hashtag:{url:(e,{json:t=!1}={})=>t?`https://i.instagram.com/api/v1/tags/web_info?tag_name=${e}`:`https://www.instagram.com/explore/tags/${e}/`},explore:{url:"https://www.instagram.com/explore/grid/"},user:{url:(e=null)=>e?`https://www.instagram.com/${e}/`:Gr},userPage:{url:e=>`https://www.instagram.com/${e}/`},editAccount:{url:"https://www.instagram.com/accounts/edit/"},rootTagPosts:{url:e=>`https://www.instagram.com/explore/tags/${e.toLowerCase()}/`},rootTimelinePosts:{url:(e,t)=>{const n=JSON.stringify({cached_feed_item_ids:[],fetch_media_item_count:12,fetch_media_item_cursor:null,fetch_comment_count:4,fetch_like:3,has_stories:!1,has_threaded_comments:!0});return`https://www.instagram.com/graphql/query/?${t&&t.timeline?`query_hash=${t.timeline}`:"query_hash=6b838488258d7a4820e48d209ef79eb1"}&variables=${encodeURI(n)}`}},moreTimelinePosts:{url:(e,t)=>{const n=JSON.stringify(t||{cached_feed_item_ids:[],fetch_media_item_count:12,fetch_media_item_cursor:e.lastCursor,fetch_comment_count:4,fetch_like:3,has_stories:!1,has_threaded_comments:!0});return`https://www.instagram.com/graphql/query/?${e.queryHash&&e.queryHash.timeline?`query_hash=${e.queryHash.timeline}`:"query_hash=6b838488258d7a4820e48d209ef79eb1"}&variables=${encodeURI(n)}`}},rootUserPosts:{url:e=>{const t=JSON.stringify({id:e,first:50,after:null});return`https://www.instagram.com/graphql/query/?query_hash=003056d32c2554def87228bc3fd9668a&variables=${encodeURI(t)}`}},moreUserPosts:{url:(e,t)=>{const n=JSON.stringify(t||{id:e.userId,first:50,after:e.lastCursor});return`https://www.instagram.com/graphql/query/?query_hash=003056d32c2554def87228bc3fd9668a&variables=${encodeURI(n)}`}},rootUserFollowers:{url:(e,t)=>{const n=JSON.stringify({id:e,first:24,include_reel:!0,fetch_mutual:!1});return`https://www.instagram.com/graphql/query/?${t&&t.followers?`query_hash=${t.followers}`:"query_hash=c76146de99bb02f6415203be841dd25a"}&variables=${encodeURI(n)}`}},moreUserFollowers:{url:(e,t)=>{const n=JSON.stringify(t||{id:e.userId,first:50,after:e.lastCursor,include_reel:!0,fetch_mutual:!1});return`https://www.instagram.com/graphql/query/?${e.queryHash&&e.queryHash.followers?`query_hash=${e.queryHash.followers}`:"query_hash=c76146de99bb02f6415203be841dd25a"}&variables=${encodeURI(n)}`}},rootUserFollowings:{url:(e,t)=>{const n=JSON.stringify({id:e,first:24,include_reel:!0,fetch_mutual:!1});return`https://www.instagram.com/graphql/query/?${t&&t.followings?`query_hash=${t.followings}`:"query_hash=d04b0a864b4b54837c0d870b0e77e076"}&variables=${encodeURI(n)}`}},moreUserFollowings:{url:(e,t)=>{const n=JSON.stringify(t||{id:e.userId,first:50,after:e.lastCursor,include_reel:!0,fetch_mutual:!1});return`https://www.instagram.com/graphql/query/?${e.queryHash&&e.queryHash.followings?`query_hash=${e.queryHash.followings}`:"query_hash=d04b0a864b4b54837c0d870b0e77e076"}&variables=${encodeURI(n)}`}},logout:{url:"https://www.instagram.com/accounts/logout"},login:{link:'<link rel="canonical" href="https://www.instagram.com/accounts/login/',url:"https://www.instagram.com/accounts/login/?source=auth_switcher"},locale:{url:Gr,regexp:/"locale":"([^"]+)"/}},qr.common={bg:"/app/bg.js",reviewsUrl:"https://chrome.google.com/webstore/detail/bcocdbombenodlegijagbhdjbifpiijp/reviews",getAppUrl:"https://get.inssist.com",getAppHost:"get.inssist.com",supportEmail:"inssist@slashedio.io",termsUrl:"https://inssist.com/terms",policyUrl:"https://inssist.com/privacy",faqUrl:"https://inssist.com/faq",faqBillingUrl:"https://inssist.com/faq#billing"};const{$fetcher:Hr}=app;Hr.assign({fetch:Kr,fetchText:async function(...e){const t=await Kr(...e);return await t.text()},fetchJson:async function(...e){const t=await Kr(...e);return await t.json()},getCache:function(){return Wr},cleanCache:function(){Xr("cleaning fetcher cache"),Wr=[]},ignoreCache:function(e=1){zr+=e},isIgnoreCache:function(){return zr>0}});let Wr=[],zr=0;const Jr=2e4,Yr=864e5;async function Kr(e,t={},n=Jr){return new Promise(((r,o)=>{(async()=>{let i=setTimeout((()=>{i&&(i=null,o({message:"Timed out"}))}),n);try{const n=await async function(e,t){if(Xr(`fetching ${e}`),(t=t||{}).method=t.method||"GET",t.method&&"GET"!==t.method)return fetch(e,t);if(zr<=0){const t=Date.now();Wr=Wr.filter((e=>t-e.on<Yr));const n=Wr.find((t=>t.url===e));if(n)return Xr("fetch cache hit"),n.res.clone()}else Xr("ignoring fetch cache");zr>0&&zr--;const n=await fetch(e,t);return Wr.push({url:e,on:Date.now(),res:n.clone()}),n}(e,{credentials:"include",...t});if(!i)return;if(clearTimeout(i),i=null,n.ok)return void r(n);if(400!==n.status)return void o({message:String(n.status)});try{const e=await n.text();o({message:String(n.status),body:e})}catch(e){o({message:String(n.status),body:null})}}catch(e){if(!i)return;clearTimeout(i),i=null,o(e)}})()}))}function Xr(...e){}const{$billing:Qr,$env:Zr,$network:eo,$bus:to}=app;Qr.controller={init:async function(){this.apiSender=new eo.Sender({urlPrefix:Zr.options.apiUrl}),Qr.promocodeController.init(),Qr.trialController.init({parent:this}),Qr.fspringController.init({parent:this}),to.on("billing.updatePro",this.updatePro,this);chrome.alarms.create("update-pro",{delayInMinutes:1440,periodInMinutes:1440}),chrome.alarms.onAlarm.addListener((e=>{"update-pro"===e.name&&this.updatePro()})),await this.updatePro()},updatePro:async function(e=!1){await Promise.all([Qr.promocodeController.updatePromocode(e),Qr.trialController.updatePro(),Qr.fspringController.updatePro()])},reply:function(e,t){if(e)try{e(t)}catch(e){}}};const{$billing:no,$store:ro,$sentry:oo}=app;no.fspringController={init:function({parent:e}){this.parent=e,chrome.runtime.onMessage.addListener(((e,t,n)=>"fspring.subscription-success"===e.name?this.onFSpringSubscriptionSuccess(e,n):"fspring.subscription-failure"===e.name?this.onFSpringSubscriptionFailure(e,n):void 0)),chrome.runtime.onMessage.addListener(((e,t,n)=>"update-fspring-status"===e.name&&this.updateFSpringStatus(n))),ro.model.observe((e=>e.auth?e.auth.username:null),(()=>{this.recordUsernames()}),!0),ro.model.observe((e=>e.billing&&e.billing.account?e.billing.account.token:null),(()=>{this.recordUsernames()}),!1),ro.model.observe((e=>e.billing&&e.billing.account?e.billing.account.token:null),(()=>{this.updateFSpringStatus()}),!1)},recordUsernames:function(){const{billing:e,auth:t}=ro.state,n=t.username;if(!n)return;const r=e.account?e.account.token:null;if(!r)return;if(-1!==e.recordedUsernames.indexOf(n))return;no.logDev("updating associated fspring account usernames...");const o={usernames:[n]};this.parent.apiSender.send("/auth/record-usernames",{body:o,token:r}).then((()=>{ro.transaction((e=>{e.billing.recordedUsernames=[...e.billing.recordedUsernames,n]}))})).catch((()=>{}))},updatePro:async function(){return new Promise((e=>this.updateFSpringStatus(e)))},updateFSpringStatus:function(e){no.logDev("updating fspring status...");const{billing:t}=ro.state,n=t.account?t.account.token:null;if(n){const t="/fspring/data";this.parent.apiSender.send(t,{token:n}).then((t=>{if(!t||"ok"!==t.status)throw t;ro.transaction((e=>{e.billing.subscriptions=t.subscriptions||{},e.billing.products=t.products||{},e.billing.orders=t.orders||[]})),this.parent.reply(e,ro.state.billing)})).catch((n=>{"TypeError"===n.name&&"Failed to fetch"===n.message||("forbidden"===n.status||"unauthorized"===n.status||"account-not-found"===n.status||"account-is-not-active"===n.status?ro.transaction((e=>{e.billing.account.email=null,e.billing.account.token=null})):oo.controller.sendError(`Unexpected API error at ${t}`,"error",{error:n},{actor:"auth"})),this.parent.reply(e,ro.state.billing)}))}else ro.transaction((e=>{e.billing.optimistic=null,e.billing.subscriptions={},e.billing.products={},e.billing.orders=[]})),this.parent.reply(e,ro.state.billing);return!!e},onFSpringSubscriptionSuccess:function(e,t){no.logDev("handling fspring subscription success..."),ro.transaction((e=>{e.billing.optimistic={on:Date.now(),plan:e.billing.purchasingPlan.id},e.billing.purchasingPlan=null}));const n=JSON.stringify({subscriptions:ro.state.billing.subscriptions,products:ro.state.billing.products,orders:ro.state.billing.orders}),r=Date.now();let o=3e3;const i=()=>{no.logDev("polling server for status update..."),ro.state.billing.optimistic&&this.updateFSpringStatus((e=>{const t=Date.now();t-r>36e5?ro.transaction((e=>{e.billing.optimistic=null})):(e=JSON.stringify({subscriptions:e.subscriptions,products:e.products,orders:e.orders}),n===e?(o=t-r>3e4?6e5:3e3,setTimeout(i,o)):ro.transaction((e=>{e.billing.optimistic=null})))}))};return setTimeout(i,o),!!t},onFSpringSubscriptionFailure:function(e,t){return no.logDev("handling fspring subscription failure..."),ro.transaction((e=>{e.billing.purchasingPlan=null})),!!t}};const{$billing:io,$store:so,$env:ao,$utils:lo}=app;io.promocodeController={init:function(){this._updatePromocodeOnUserChange()},updatePromocode:async function(e=!1){const t=Date.now(),n=await lo.ls.get("billing.promocodeUpdatedAt",null);if(!e&&n&&t-n<lo.time.HOUR)return;await lo.ls.set("billing.promocodeUpdatedAt",t),io.logDev("updating promocode...");const{username:r,userId:o}=so.state.auth;if(!r)return void io.logDev("no username to retrieve promocode for");const i={username:r,userId:o};if(ao.options.collectBillingStats){const{followersCount:e,followingsCount:t,postsCount:n}=so.state.userDetails[o]||{};"number"==typeof e&&(i.followers=e),"number"==typeof t&&(i.followings=t),"number"==typeof n&&(i.posts=n)}try{const e=await io.controller.apiSender.send("/promo",{query:i});if(!e||"ok"!==e.status)throw e;io.logDev("promocode",e);const t=e&&e.expiresAt;if(so.state.billing.promocode===t)return;so.transaction((e=>e.billing.promocode=t))}catch(e){io.logDev("retrieving promocode failed",e)}},_updatePromocodeOnUserChange:function(){so.model.observe((e=>{var t;return(null===(t=e.auth)||void 0===t?void 0:t.username)||null}),(()=>this.updatePromocode()),!1)}};const{$billing:uo,$store:co,$env:po,$lodash:ho}=app;uo.trialController={init:function({parent:e}){this.parent=e,co.model.observe((e=>e.billing.trial),(e=>{this.updateCookie(e)}),!1)},updatePro:async function(){await new Promise((e=>this.updateTrial(e)))},setTrialCookie:async function(e){await this._setCookie({name:"tsd",value:e})},updateTrial:async function(e){uo.logDev("updating trial period...");const t=co.state.billing.trial,n=await this._getCookie({name:"tsd"});if(this._isCookieEmpty(n))return void this.parent.reply(e,t);const r=this._mergeTrialValues(t,n);r.installedOn||(r.installedOn=Date.now()),ho.isEqual(t,r)||co.transaction((e=>e.billing.trial=r)),ho.isEqual(n,r)||this._setCookie({name:"tsd",value:r}),this.parent.reply(e,r)},updateCookie:async function(e){const t=await this._getCookie({name:"tsd"});this._isCookieEmpty(t)||(e=this._mergeTrialValues(t,e)),ho.isEqual(t,e)||this._setCookie({name:"tsd",value:e})},_isCookieEmpty:function(e){return!e||1===Object.keys(e).length},_mergeTrialValues:function(e,t){const n={...e,...t};n.installedOn>e.installedOn&&(n.installedOn=e.installedOn);for(const t in n)(e[t]||0)>(n[t]||0)&&(n[t]=e[t]||0);return n},_getCookie:async function({name:e}){return new Promise((t=>{chrome.cookies.getAll({url:`https://${po.options.domain}`},(n=>{let r=(n||[]).filter((t=>t.name===e))[0]||{value:""};r=r.value;try{r=atob(r)}catch(e){}try{r=JSON.parse(r)}catch(e){r=null}t(r)}))}))},_setCookie:async function({name:e,value:t}){const n=Math.round(Date.now()/1e3),r=n+31536e4>2147483647?n+31536e4:2147483647;return new Promise((n=>{chrome.cookies.set({name:e||"cookie",value:btoa(JSON.stringify(t)),url:`https://${po.options.domain}`,path:"/",httpOnly:!1,secure:!1,storeId:"0",domain:po.options.domain,sameSite:"strict",expirationDate:r},n)}))}};const{$billing:fo,$env:go,$network:mo,$sentry:vo}=app;let yo;function bo(e,t,n){return(e=e||{updateSnapshot:()=>{},applySnapshot:()=>{},getSnapshot:()=>({})}).updateSnapshot((e=>{e.loading=!0})),yo||(yo=new mo.Sender({urlPrefix:go.options.apiUrl})),yo.send(t,n).then((t=>{if(!t||"ok"!==t.status)throw t;return e.updateSnapshot((e=>{e.loading=!1})),t})).catch((n=>{const r=e.getSnapshot();throw r.loading=!1,"TypeError"===n.name&&"Failed to fetch"===n.message?(r.statusText="Billing server is not responding. Please check that you are online or try again later.",vo.controller.sendError(`API is not responding at ${t}`,"error",{error:n},{actor:"auth"})):"bad-query"===n.status?r.statusText="Malformed email address. Please check your email address and try again.":"account-not-found"===n.status?(r.statusText="Account for this email not found. Please check the email address you entered or create a new account instead.",r.statusButtons=[{label:"CREATE NEW ACCOUNT"}]):"wrong-password"===n.status?(r.statusText="Incorrect email / password combination. Please check the password or recover it.",r.statusButtons=[{label:"I FORGOT MY PASSWORD"}]):"account-is-not-active"===n.status?r.statusText="This account has been disabled. Please create a new account instead.":"email-already-verified"===n.status?(r.confirmationCodeText=null,r.statusText="This email address has been verified. Please login instead."):"otp-does-not-match"===n.status?r.statusText="Verification code does not match our records. Please check your inbox for the code we sent.":"email-already-in-use"===n.status?(r.statusText="This email is already in use, please try to login instead or use a different email address.",r.statusButtons=[{label:"LOGIN INSTEAD"}]):"email-is-not-verified"===n.status||(r.statusText="Oops... Something went wrong. Please try to login again later.",vo.controller.sendError(`Unexpected API error at ${t}`,"error",{error:n},{actor:"auth"})),e.applySnapshot(r),n}))}fo.connector={isTaken:function(e,t){return bo(e,"/auth/is-taken",{body:{email:t}})},login:function(e,t,n){return bo(e,"/auth/login",{body:{email:t,password:n}})},register:function(e,t,n,r,o,i){return bo(e,"/auth/register",{body:{email:t,password:n,firstName:r,lastName:o,usernames:i}})},verifyEmail:function(e,t,n){return bo(e,"/auth/verify-email",{body:{email:t,otp:n}})},changePassword:function(e,t,n,r){return bo(e,"/auth/change-password",{body:{email:t,otp:n,newPassword:r}})},resendOtp:function(e,t,n){return bo(e,"/auth/resend-otp",{body:{email:t,password:n}})},recoverPassword:function(e,t){return bo(e,"/auth/recover-password",{body:{email:t}})},deleteAccount:function(e,t){return bo(e,"/auth/delete-account",{method:"POST",token:t})},accountManagementUrl:function(e,t){return bo(e,"/fspring/account-management-url",{method:"GET",token:t})}};const{$store:_o}=app,wo={},Po=e=>{Object.keys(e).forEach((e=>wo[e]="*"))};Object.defineProperties(wo,{init:{get:()=>Po},transaction:{get:()=>_o.transaction}}),app.$s=new Proxy(wo,{get:function(e,t){return"init"===t||"transaction"===t?wo[t]:"$"===t?_o.state:_o.state[t]}});const{$store:Do}=app;Do.action=(e,t)=>(t.type=e,t.dispatch=So,t);const So=function(...e){Do.model.dispatch(this,e)},{$store:xo,$reactRedux:Io}=app;xo.connect=e=>t=>Io.connect(((t,n)=>e(t,n)),null,null,{forwardRef:!0})(t);const{$store:Eo,$env:Co,$redux:To}=app;Eo.model={store:null,init:function(e={}){if(this._debug=!1,this.store)return;const t=this._reduce.bind(this);return Co.is.development&&globalThis.devToolsExtension?this.store=To.createStore(t,e,globalThis.devToolsExtension()):this.store=To.createStore(t,e),this.store},get state(){return this.store.getState()},dispatch:function(e,t){"influx.set-state"!==e.type&&this._debug&&Eo.log(`dispatch "${e.type}"`),this.store.dispatch({type:e.type,perform:e,payload:t})},observe:function(e,t,n=!0){let r=e(this.state);const o=this.store.subscribe((()=>{const n=e(this.state);if(n!==r){const e=r;r=n,t(r,e)}}));return n&&t(r,void 0),o},_reduce:function(e={},t){return t.perform?t.perform(e,...t.payload):e}};const{$store:ko}=app;Object.defineProperty(ko,"state",{get:function(){return ko.model.state}});const{$store:Ao}=app,Fo=Symbol("isProxy"),Oo=Symbol("isProxifiedArray");let $o=!1;function jo(e){if(Array.isArray(e)){const t=e.map(jo);return t[Oo]=!0,t}if("[object Object]"!==Object.prototype.toString.call(e))return e;const t={...e},n=new Set,r=new Proxy(t,{get:function(e,r){if(r in t)return $o&&!n.has(r)&&(t[r]=jo(t[r]),n.add(r)),t[r]},set:function(e,n,r){return t[n]=r,!0},deleteProperty:function(e,n){return delete t[n],!0}});return r[Fo]=!0,r}function Ro(e){if(e&&e[Oo])return delete e[Oo],e.map(Ro);if(Array.isArray(e)&&e.forEach(((t,n)=>{t&&t[Fo]&&(e[n]=Ro(t))})),!e||!e[Fo])return e;const t={};for(const n in e)t[n]=Ro(e[n]);return t}Ao.safeModify=(e,t)=>{const n=jo(e),r=$o;return $o=!0,t(n),$o=r,Ro(n)};const{$store:Mo}=app;Mo.transaction=e=>{const t=Mo.safeModify(Mo.state,e);Uo.dispatch(t)};const Uo=Mo.action("influx.set-state",((e,t)=>t)),{$store:Bo,$env:Lo,$bus:No,$s:Vo}=app,qo=Bo.action("store.syncState",((e,t)=>t));Bo.controller={init:async function(){let e,t;Lo.is.pp?(e="popup",t=!1):Lo.is.bg&&(e="background",t=!0),this._id=e,this._currentState=null,this._unsubscribe=null,this._storeBatchingId=null,this._primary=t,this._templateState={...Bo.getTemplateUserState(),...Bo.getTemplateSharedState()},No.on("store.syncState",(e=>{Bo.model.store&&this._onStateUpdatedByPeer(e)})),Lo.is.bg&&No.on("store.getPrimaryState",(()=>Bo.state)),await this._initState(),await this._subscribeToInflux(),Lo.is.bg&&await Bo.stateController.init(),Vo.init(this._currentState)},_initState:async function(){if(this._primary){let e=await Bo.storageController.init();e||(e=this._templateState),this._currentState=e,Bo.model.init(e)}else{const e=await No.send("store.getPrimaryState");this._currentState=e,Bo.model.init(e)}},_subscribeToInflux:function(e=!1){let t;this._unsubscribe=Bo.model.observe((e=>e),(e=>{clearTimeout(t),t=setTimeout((()=>{const t=this._deltaState(e,this._currentState);this._currentState=e,this._saveToStorage(e),No.send("store.syncState",t)}))}),e)},_onStateUpdatedByPeer:function(e){this._unsubscribe&&this._unsubscribe(),this._currentState={...Bo.state,...e},qo.dispatch(this._currentState),this._saveToStorage(this._currentState),this._subscribeToInflux(this._currentState!==Bo.state)},_saveToStorage:function(e){this._primary&&(this._storeBatchingId&&clearTimeout(this._storeBatchingId),this._storeBatchingId=setTimeout((()=>{this._storeBatchingId=null,Bo.storageController.save(e)}),Lo.is.development||globalThis.electron?1e3:3e3))},_deltaState:function(e,t){const n={};for(const r in e){const o=e[r];t&&t[r]===o||(n[r]=o)}return n}};const{$store:Go}=app;Go.stateController={init:async function(){Go.versionerController.init(),Go.setupDefaultState.dispatch(),await this._update()},_update:async function(){let e=Go.state;e=await Go.versionerController.update(e),e=Go.whatsNewController.update(e),e!==Go.state&&Go.replaceState.dispatch(e)}};const{$store:Ho,$idb:Wo}=app;function zo(e){return e&&e.__esModule?e:{default:e}}Ho.storageController={init:async function(){this._debug=!1;return await this.read()||null},read:async function(){const e=Date.now(),t=await Wo.get("state");if(!t)return null;const n=this._deuglify(t),r=Date.now()-e;return this._debug&&Ho.log(`state read in ${r}ms`),n},save:async function(e){const t=Date.now(),n=this._uglify(e);await Wo.set("state",n);const r=Date.now()-t;this._debug&&Ho.log(`state saved in ${r}ms`)},_uglify:function(e){return btoa(encodeURIComponent(JSON.stringify(e)))},_deuglify:function(e){return JSON.parse(decodeURIComponent(atob(e)))}};var Jo={},Yo={update:function(e){if(!e.userStates)return e;const t={...e,tagAssist:{...e.tagAssist,relevantTags:[]}};return delete t.tagAssist.foundTags,t}};r(Jo,"default",(function(){return Yo})),n(Jo);var Ko={};const{$idb:Xo}=app;var Qo={update:function(e){return e.userStates&&Xo.remove("tag-assist.tag-data"),e}};r(Ko,"default",(function(){return Qo})),n(Ko);var Zo={},ei={update:function(e){return e.userStates?{...e,tagAssist:{...e.tagAssist,ladderConfig:{lastUpdateOn:Date.now(),tiers:{low:.7,medium:1.5,high:5}}}}:e}};r(Zo,"default",(function(){return ei})),n(Zo);var ti={},ni={update:function(e){return e.userStates?{...e,tagAssist:{...e.tagAssist,ladder:null}}:e}};r(ti,"default",(function(){return ni})),n(ti);var ri={};const{$idb:oi}=app;var ii={update:function(e){return e.userStates&&oi.remove("tag-assist.tag-data"),e}};r(ri,"default",(function(){return ii})),n(ri);var si={},ai={update:function(e){return e.userStates?{...e,tagAssist:{...e.tagAssist,selectedTabId:"search"}}:e}};r(si,"default",(function(){return ai})),n(si);var li={},ui={update:function(e){return e.userStates?{...e,tagAssist:{...e.tagAssist,newCollection:{name:"",text:"",showForm:!1},collections:e.tagAssist.collections.map((e=>({...e,editing:!1,editName:"",editText:""})))}}:e}};r(li,"default",(function(){return ui})),n(li);var ci={},di={update:function(e){if(!e.userStates)return e;const t={...e,tagAssist:{...e.tagAssist,selectedGroupId:"low",ladderLoadingTags:[],collectionsTagData:{},collectionsLoadingTags:[]}};return delete t.tagAssist.relevantTags,delete t.tagAssist.loadingTags,t}};r(ci,"default",(function(){return di})),n(ci);var pi={},hi={update:function(e){return e.userStates?{...e,tagAssist:{...e.tagAssist,engagementSort:null}}:e}};r(pi,"default",(function(){return hi})),n(pi);var fi={},gi={update:function(e){return e.userStates?{...e,tagAssist:{...e.tagAssist,lastDayUsedOn:null},billing:{...e.billing,trial:{...e.billing.trial,tagAssist:0}}}:e}};r(fi,"default",(function(){return gi})),n(fi);var mi={},vi={update:function(e){if(!e.userStates)return e;const t=e.billing.trial;return{...e,billing:{...e.billing,trial:{...t,installedOn:t.installedOn||Date.now(),dmAdvanced:t.dmAdvanced||0,schedule:t.schedule||0,insights:t.insights||0,analytics:t.analytics||0,zen:t.zen||0,coverAssist:t.coverAssist||0,tagAssist:t.tagAssist||0,addLinkToStory:t.addLinkToStory||0,postsPublished:t.postsPublished||0,storiesPublished:t.storiesPublished||0,dmsSent:t.dmsSent||0,repost:t.repost||0}}}}};r(mi,"default",(function(){return vi})),n(mi);var yi={},bi={update:function(e){if(!e.userStates)return e;const t={...e,tagAssist:{...e.tagAssist,ladderEngagementSort:e.tagAssist.engagementSort,summaryEngagementSort:null}};return delete t.tagAssist.engagementSort,t}};r(yi,"default",(function(){return bi})),n(yi);var _i={},wi={update:function(e){return e.userStates?{...e,tagAssist:{...e.tagAssist,preselectedTags:[],preselectedText:""}}:e}};r(_i,"default",(function(){return wi})),n(_i);var Pi={},Di={update:function(e){return{...e,reels:{supported:!1}}}};r(Pi,"default",(function(){return Di})),n(Pi);var Si={},xi={update:function(e){return e.userStates?{...e,billing:{...e.billing,trial:{...e.billing.trial,reels:0}}}:e}};r(Si,"default",(function(){return xi})),n(Si);var Ii={},Ei={update:function(e){return{...e,reels:{...e.reels,creating:!1}}}};r(Ii,"default",(function(){return Ei})),n(Ii);var Ci={},Ti={update:function(e){return{...e,authStatus:{...e.authStatus,isMobileSession:!1}}}};r(Ci,"default",(function(){return Ti})),n(Ci);var ki={},Ai={update:function(e){return e.userStates?{...e,billing:{...e.billing,recentFeature:null}}:e}};r(ki,"default",(function(){return Ai})),n(ki);var Fi={},Oi={update:function(e){const t={...e,schedule:{...e.schedule,loading:!1}};return delete t.schedule.isRefreshingGrid,t}};r(Fi,"default",(function(){return Oi})),n(Fi);var $i={},ji={update:function(e){const t={...e,schedule:{...e.schedule,navigation:{...e.schedule.navigation}}};return delete t.schedule.navigation.fcsTitle,t}};r($i,"default",(function(){return ji})),n($i);var Ri={},Mi={update:function(e){return{...e,schedule:{...e.schedule,filters:{...e.schedule.filters,mediaTypes:e.schedule.filters.mediaTypes.filter((e=>"igtv"!==e))}}}}};r(Ri,"default",(function(){return Mi})),n(Ri);var Ui={},Bi={update:function(e){const t={...e,schedule:{...e.schedule,posts:[...e.schedule.localPosts.map((e=>({id:e.id,source:"local",type:e.type,status:"draft",image:e.image,preview:null,imageAvgColor:e.imageAverageColor,on:e.on,createdOn:Date.now(),stats:null,crosspostToFb:null,draftOrder:e.draftOrder}))),...e.schedule.fcsPosts.map((e=>({id:e.id,source:"fcs",type:e.type,status:e.status,image:e.image,preview:e.preview,imageAvgColor:e.imageAverageColor,on:e.on,stats:e.stats?{...e.stats}:null,crosspostToFb:e.crosspostToFb,draftOrder:e.draftOrder})))]}};return delete t.schedule.igPosts,delete t.schedule.fcsPosts,delete t.schedule.localPosts,t}};r(Ui,"default",(function(){return Bi})),n(Ui);var Li={},Ni={update:function(e){const t={...e,schedule:{...e.schedule}};if(e.userStates){const n=[e,...Object.values(e.userStates)];t.acknowledged={...e.acknowledged,scheduleDndTip:n.some((e=>e.schedule.isDndTipAcknowledged))?Date.now():-1}}return delete t.schedule.isDndTipAcknowledged,t}};r(Li,"default",(function(){return Ni})),n(Li);var Vi={},qi={update:function(e){return e.userStates?{...e,installedEventSent:!0,tagAssist:{...e.tagAssist,tagMetricsUpsellDismissed:!1}}:e}};r(Vi,"default",(function(){return qi})),n(Vi);var Gi={},Hi={update:function(e){if(!e.userStates)return e;const t={...e,tagAssist:{...e.tagAssist,igSelectedTags:[...e.tagAssist.selectedTags],fcsSelectedTags:[],sidebarSelectedTags:[...e.tagAssist.preselectedTags],sidebarSelectedTagsAsText:[...e.tagAssist.preselectedText]}};return delete t.tagAssist.selectedTags,delete t.tagAssist.preselectedTags,delete t.tagAssist.preselectedText,t}};r(Gi,"default",(function(){return Hi})),n(Gi);var Wi={},zi={update:function(e){return{...e,schedule:{...e.schedule,showTagAssist:!1}}}};r(Wi,"default",(function(){return zi})),n(Wi);var Ji={},Yi={update:function(e){const t={...e,reels:{...e.reels}};return delete t.reels.supported,t}};r(Ji,"default",(function(){return Yi})),n(Ji);var Ki={},Xi={update:function(e){return chrome.alarms.clearAll(),{...e,analytics:{...e.analytics,scheduleDay:-1,scheduleHour:21}}}};r(Ki,"default",(function(){return Xi})),n(Ki);var Qi={},Zi={update:function(e){let t;if(e.userStats){delete{...e,billing:{...e.billing,trial:{...e.billing.trial}}}.billing.trial.zen}else t={...e,zen:{...e.zen}},delete t.zen.lastTrialUpdateOn;return t}};r(Qi,"default",(function(){return Zi})),n(Qi);var es={},ts={update:function(e){return e.userStats?{...e,tagAssist:{...e.tagAssist,lastTagScanOn:null}}:e}};r(es,"default",(function(){return ts})),n(es);var ns={},rs={update:function(e){return{...e,schedule:{...e.schedule,filters:{showInfo:e.schedule.filters.showInfo,photo:e.schedule.filters.mediaTypes.includes("photo"),video:e.schedule.filters.mediaTypes.includes("video"),carousel:e.schedule.filters.mediaTypes.includes("carousel"),posted:e.schedule.filters.statuses.includes("posted"),local:e.schedule.filters.statuses.includes("local"),draft:e.schedule.filters.statuses.includes("draft"),scheduled:e.schedule.filters.statuses.includes("scheduled")}}}}};r(ns,"default",(function(){return rs})),n(ns);var os={},is={update:function(e){const t={...e,schedule:{...e.schedule,fileUploadErrors:[...e.schedule.bulkUploadErrors]}};return delete t.schedule.bulkUploadErrors,t}};r(os,"default",(function(){return is})),n(os);var ss={},as={update:function(e){const t={...e,schedule:{...e.schedule,addCardAttention:!1}};return delete t.schedule.gridAddCardAttention,t}};r(ss,"default",(function(){return as})),n(ss);var ls={},us={update:function(e){const t={...e,schedule:{...e.schedule,addCard:{saved:!1,fileCount:0,attention:e.schedule.addCardAttention,draggingFiles:!1,selectedOption:"multiple"}}};return delete t.schedule.addCardAttention,t}};r(ls,"default",(function(){return us})),n(ls);var cs={},ds={update:function(e){return{...e,bulk:{saving:!1,selectedPostIds:[],actions:{}}}}};r(cs,"default",(function(){return ds})),n(cs);var ps={},hs={update:function(e){return{...e,bulk:{...e.bulk,activeActionId:null}}}};r(ps,"default",(function(){return hs})),n(ps);var fs={},gs={update:function(e){return{...e,bulk:{...e.bulk,dateDialog:{selectedTypeId:"interval",calendar:{periodStart:null,selectedDay:null,selectedSlotTime:null,customTime:null,timezone:null,isTimeError:!1},interval:{frequency:"1:1",timeListetuser:[{selectedSlotTime:null,customTime:null}]},week:{selectedDays:[],selectedSlotTime:null,customTime:null}}}}}};r(fs,"default",(function(){return gs})),n(fs);var ms={},vs={update:function(e){const t={...e,bulk:{...e.bulk,dateDialog:{show:!1,...e.bulk.dateDialog,calendar:{...e.bulk.dateDialog.calendar,errorMessage:null}}}};return delete t.bulk.dateDialog.calendar.isTimeError,t}};r(ms,"default",(function(){return vs})),n(ms);var ys={},bs={update:function(e){return{...e,bulk:{...e.bulk,dateDialog:{...e.bulk.dateDialog,week:{...e.bulk.dateDialog.week,dayErrorMessage:null,timeErrorMessage:null},timeSlots:{errorMessage:null}}}}}};r(ys,"default",(function(){return bs})),n(ys);var _s={},ws={update:function(e){return{...e,schedule:{...e.schedule,isDraggingPost:!1}}}};r(_s,"default",(function(){return ws})),n(_s);var Ps={},Ds={update:function(e){return{...e,schedule:{...e.schedule,addCard:{...e.schedule.addCard,savingTitle:null,savingText:null}}}}};r(Ps,"default",(function(){return Ds})),n(Ps);var Ss={},xs={update:function(e){const t={...e,schedule:{...e.schedule}};return delete t.schedule.hasUncommitedChanges,delete t.schedule.tasks,t}};r(Ss,"default",(function(){return xs})),n(Ss);var Is={},Es={update:function(e){return{...e,schedule:{...e.schedule,addCard:{...e.schedule.addCard,savingPreview:null}}}}};r(Is,"default",(function(){return Es})),n(Is);var Cs={},Ts={update:function(e){return{...e,bulk:{...e.bulk,startingDay:{selectedTypeId:"today",periodStart:null,selectedDay:null}}}}};r(Cs,"default",(function(){return Ts})),n(Cs);var ks={},As={update:function(e){const t={...e,dm:{...e.dm}};return delete t.dm.supported,t}};r(ks,"default",(function(){return As})),n(ks);var Fs={},Os={update:function(e){return{...e,dm:{...e.dm,ghostModeEnabled:!0}}}};r(Fs,"default",(function(){return Os})),n(Fs);var $s={};const{$idb:js}=app;var Rs={update:function(e){const t={...e};return delete t.analytics,delete t.insights,async function(){const e=await js.keys();for(const t of e)(t.startsWith("insights.")||t.startsWith("block:analytics:"))&&js.remove(t)}(),t}};r($s,"default",(function(){return Rs})),n($s);var Ms={},Us={update:function(e){return{...e,schedule:{...e.schedule,fcsSetup:{...e.schedule.fcsSetup,newApi:!0,flipApiOnFail:!1}}}}};r(Ms,"default",(function(){return Us})),n(Ms);var Bs={},Ls={update:function(e){const t={...e,schedule:{...e.schedule,fcsSetup:{...e.schedule.fcsSetup,attempted:!1,failed:!1}}};return delete t.schedule.fcsSetup.flipApiOnFail,t}};r(Bs,"default",(function(){return Ls})),n(Bs);var Ns={},Vs={update:function(e){return e.userStates?{...e,acknowledged:{...e.acknowledged,discount:-1},billing:{...e.billing,discount:{available:!1,showSnackbarMessage:!1}}}:e}};r(Ns,"default",(function(){return Vs})),n(Ns);var qs={},Gs={update:function(e){const t={...e,schedule:{...e.schedule,fcsSetup:{...e.schedule.fcsSetup,steps:{fbLogin:null,igProfessional:null,igConnectedToFbPage:null}}}};return delete t.schedule.fcsSetup.newApi,delete t.schedule.fcsSetup.attempted,t}};r(qs,"default",(function(){return Gs})),n(qs);var Hs={},Ws={update:function(e){if(!e.userStates)return e;const t={...e,acknowledged:{...e.acknowledged},billing:{...e.billing,discount:{...e.billing.discount,availableTill:-1}}};return delete t.acknowledged.discount,delete t.billing.discount.available,t}};r(Hs,"default",(function(){return Ws})),n(Hs);var zs={};const{$store:Js}=app;var Ys={update:function(e){if(!e.userStates)return e;return{...e,quickReplies:{shown:!1,content:Js.getQuickReplies(),total:7}}}};r(zs,"default",(function(){return Ys})),n(zs);var Ks={},Xs={update:function(e){return{...e,schedule:{...e.schedule,filters:{...e.schedule.filters,showLocalLabel:!0}}}}};r(Ks,"default",(function(){return Xs})),n(Ks);var Qs={},Zs={update:function(e){const t={...e};return delete t.igtvUpload,t}};r(Qs,"default",(function(){return Zs})),n(Qs);var ea={},ta={update:function(e){return{...e,schedule:{...e.schedule,fcsSetup:{...e.schedule.fcsSetup,screen:"welcome"}}}}};r(ea,"default",(function(){return ta})),n(ea);var na={},ra={update:function(e){return{...e,musicAssist:{shown:!1,videoUrl:null,videoVolume:0,musicVolume:0,categoryIdsOrder:[],selectedCategoryId:"popular",selectedTrackId:null,selectedTrackStart:0,customTrack:null}}}};r(na,"default",(function(){return ra})),n(na);var oa={},ia={update:function(e){return{...e,musicAssist:{...e.musicAssist,showUpsellOverlay:!1}}}};r(oa,"default",(function(){return ia})),n(oa);var sa={},aa={update:function(e){return e.userStates?{...e,billing:{...e.billing,trial:{...e.billing.trial,musicAssist:0}}}:e}};r(sa,"default",(function(){return aa})),n(sa);var la={},ua={update:function(e){return{...e,musicAssist:{...e.musicAssist,isStory:!1}}}};r(la,"default",(function(){return ua})),n(la);var ca={};const{$billing:da}=app;var pa={update:function(e){if(!e.userStates)return e;const t={...e.billing.trial,reels:0,coverAssist:0,musicAssist:0};return da.trialController.setTrialCookie(t),{...e,billing:{...e.billing,trial:t}}}};r(ca,"default",(function(){return pa})),n(ca);var ha={},fa={update:function(e){return{...e,musicAssist:{...e.musicAssist,videoVolume:0,musicVolume:.5}}}};r(ha,"default",(function(){return fa})),n(ha);var ga={},ma={update:function(e){return{...e,musicAssist:{...e.musicAssist,videoCurrentTime:0}}}};r(ga,"default",(function(){return ma})),n(ga);var va={};const{$billing:ya}=app;var ba={update:function(e){if(!e.userStates)return e;const t={...e.billing.trial,reels:Math.max(0,e.billing.trial.reels-3),musicAssist:Math.max(0,e.billing.trial.musicAssist-3)};return ya.trialController.setTrialCookie(t),{...e,billing:{...e.billing,trial:t}}}};r(va,"default",(function(){return ba})),n(va);var _a={};const{$billing:wa}=app;var Pa={update:function(e){if(!e.userStates)return e;const t={...e.billing.trial,schedule:0};return wa.trialController.setTrialCookie(t),{...e,billing:{...e.billing,trial:t}}}};r(_a,"default",(function(){return Pa})),n(_a);var Da={},Sa={update:function(e){return{...e,storyAssist:{shown:!1,selectedTabId:"mentions",mentions:{query:"",foundUsers:[],selectedUsers:[]}}}}};r(Da,"default",(function(){return Sa})),n(Da);var xa={},Ia={update:function(e){return{...e,storyAssist:{...e.storyAssist,showUpsellOverlay:!1}}}};r(xa,"default",(function(){return Ia})),n(xa);var Ea={},Ca={update:function(e){return e.userStates?{...e,billing:{...e.billing,trial:{...e.billing.trial,storyAssist:0}}}:e}};r(Ea,"default",(function(){return Ca})),n(Ea);var Ta={},ka={update:function(e){return{...e,storyAssist:{...e.storyAssist,selectedTabId:"music"}}}};r(Ta,"default",(function(){return ka})),n(Ta);var Aa={},Fa={update:function(e){return{...e,storyAssist:{...e.storyAssist,coverUrl:null}}}};r(Aa,"default",(function(){return Fa})),n(Aa);var Oa={},$a={update:function(e){return{...e,ghostStoryView:{enabled:!1}}}};r(Oa,"default",(function(){return $a})),n(Oa);var ja={},Ra={update:function(e){return e.userStates?{...e,billing:{...e.billing,trial:{...e.billing.trial,ghostStoryView:0}}}:e}};r(ja,"default",(function(){return Ra})),n(ja);var Ma={},Ua={update:function(e){return{...e,ghostStoryView:{...e.ghostStoryView,lastUsedOn:null,showUpsellOverlay:!1}}}};r(Ma,"default",(function(){return Ua})),n(Ma);var Ba={},La={update:function(e){return{...e,musicAssist:{...e.musicAssist,categoryIdsOrder:[],selectedCategoryId:0}}}};r(Ba,"default",(function(){return La})),n(Ba);var Na={},Va=t(function(){var e={exports:this},t=function(){var e=String.fromCharCode,t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-$",r={};function o(e,t){if(!r[e]){r[e]={};for(var n=0;n<e.length;n++)r[e][e.charAt(n)]=n}return r[e][t]}var i={compressToBase64:function(e){if(null==e)return"";var n=i._compress(e,6,(function(e){return t.charAt(e)}));switch(n.length%4){default:case 0:return n;case 1:return n+"===";case 2:return n+"==";case 3:return n+"="}},decompressFromBase64:function(e){return null==e?"":""==e?null:i._decompress(e.length,32,(function(n){return o(t,e.charAt(n))}))},compressToUTF16:function(t){return null==t?"":i._compress(t,15,(function(t){return e(t+32)}))+" "},decompressFromUTF16:function(e){return null==e?"":""==e?null:i._decompress(e.length,16384,(function(t){return e.charCodeAt(t)-32}))},compressToUint8Array:function(e){for(var t=i.compress(e),n=new Uint8Array(2*t.length),r=0,o=t.length;r<o;r++){var s=t.charCodeAt(r);n[2*r]=s>>>8,n[2*r+1]=s%256}return n},decompressFromUint8Array:function(t){if(null==t)return i.decompress(t);for(var n=new Array(t.length/2),r=0,o=n.length;r<o;r++)n[r]=256*t[2*r]+t[2*r+1];var s=[];return n.forEach((function(t){s.push(e(t))})),i.decompress(s.join(""))},compressToEncodedURIComponent:function(e){return null==e?"":i._compress(e,6,(function(e){return n.charAt(e)}))},decompressFromEncodedURIComponent:function(e){return null==e?"":""==e?null:(e=e.replace(/ /g,"+"),i._decompress(e.length,32,(function(t){return o(n,e.charAt(t))})))},compress:function(t){return i._compress(t,16,(function(t){return e(t)}))},_compress:function(e,t,n){if(null==e)return"";var r,o,i,s={},a={},l="",u="",c="",d=2,p=3,h=2,f=[],g=0,m=0;for(i=0;i<e.length;i+=1)if(l=e.charAt(i),Object.prototype.hasOwnProperty.call(s,l)||(s[l]=p++,a[l]=!0),u=c+l,Object.prototype.hasOwnProperty.call(s,u))c=u;else{if(Object.prototype.hasOwnProperty.call(a,c)){if(c.charCodeAt(0)<256){for(r=0;r<h;r++)g<<=1,m==t-1?(m=0,f.push(n(g)),g=0):m++;for(o=c.charCodeAt(0),r=0;r<8;r++)g=g<<1|1&o,m==t-1?(m=0,f.push(n(g)),g=0):m++,o>>=1}else{for(o=1,r=0;r<h;r++)g=g<<1|o,m==t-1?(m=0,f.push(n(g)),g=0):m++,o=0;for(o=c.charCodeAt(0),r=0;r<16;r++)g=g<<1|1&o,m==t-1?(m=0,f.push(n(g)),g=0):m++,o>>=1}0==--d&&(d=Math.pow(2,h),h++),delete a[c]}else for(o=s[c],r=0;r<h;r++)g=g<<1|1&o,m==t-1?(m=0,f.push(n(g)),g=0):m++,o>>=1;0==--d&&(d=Math.pow(2,h),h++),s[u]=p++,c=String(l)}if(""!==c){if(Object.prototype.hasOwnProperty.call(a,c)){if(c.charCodeAt(0)<256){for(r=0;r<h;r++)g<<=1,m==t-1?(m=0,f.push(n(g)),g=0):m++;for(o=c.charCodeAt(0),r=0;r<8;r++)g=g<<1|1&o,m==t-1?(m=0,f.push(n(g)),g=0):m++,o>>=1}else{for(o=1,r=0;r<h;r++)g=g<<1|o,m==t-1?(m=0,f.push(n(g)),g=0):m++,o=0;for(o=c.charCodeAt(0),r=0;r<16;r++)g=g<<1|1&o,m==t-1?(m=0,f.push(n(g)),g=0):m++,o>>=1}0==--d&&(d=Math.pow(2,h),h++),delete a[c]}else for(o=s[c],r=0;r<h;r++)g=g<<1|1&o,m==t-1?(m=0,f.push(n(g)),g=0):m++,o>>=1;0==--d&&(d=Math.pow(2,h),h++)}for(o=2,r=0;r<h;r++)g=g<<1|1&o,m==t-1?(m=0,f.push(n(g)),g=0):m++,o>>=1;for(;;){if(g<<=1,m==t-1){f.push(n(g));break}m++}return f.join("")},decompress:function(e){return null==e?"":""==e?null:i._decompress(e.length,32768,(function(t){return e.charCodeAt(t)}))},_decompress:function(t,n,r){var o,i,s,a,l,u,c,d=[],p=4,h=4,f=3,g="",m=[],v={val:r(0),position:n,index:1};for(o=0;o<3;o+=1)d[o]=o;for(s=0,l=Math.pow(2,2),u=1;u!=l;)a=v.val&v.position,v.position>>=1,0==v.position&&(v.position=n,v.val=r(v.index++)),s|=(a>0?1:0)*u,u<<=1;switch(s){case 0:for(s=0,l=Math.pow(2,8),u=1;u!=l;)a=v.val&v.position,v.position>>=1,0==v.position&&(v.position=n,v.val=r(v.index++)),s|=(a>0?1:0)*u,u<<=1;c=e(s);break;case 1:for(s=0,l=Math.pow(2,16),u=1;u!=l;)a=v.val&v.position,v.position>>=1,0==v.position&&(v.position=n,v.val=r(v.index++)),s|=(a>0?1:0)*u,u<<=1;c=e(s);break;case 2:return""}for(d[3]=c,i=c,m.push(c);;){if(v.index>t)return"";for(s=0,l=Math.pow(2,f),u=1;u!=l;)a=v.val&v.position,v.position>>=1,0==v.position&&(v.position=n,v.val=r(v.index++)),s|=(a>0?1:0)*u,u<<=1;switch(c=s){case 0:for(s=0,l=Math.pow(2,8),u=1;u!=l;)a=v.val&v.position,v.position>>=1,0==v.position&&(v.position=n,v.val=r(v.index++)),s|=(a>0?1:0)*u,u<<=1;d[h++]=e(s),c=h-1,p--;break;case 1:for(s=0,l=Math.pow(2,16),u=1;u!=l;)a=v.val&v.position,v.position>>=1,0==v.position&&(v.position=n,v.val=r(v.index++)),s|=(a>0?1:0)*u,u<<=1;d[h++]=e(s),c=h-1,p--;break;case 2:return m.join("")}if(0==p&&(p=Math.pow(2,f),f++),d[c])g=d[c];else{if(c!==h)return null;g=i+i.charAt(0)}m.push(g),d[h++]=i+g.charAt(0),i=g,0==--p&&(p=Math.pow(2,f),f++)}}};return i}();return void 0!==e&&null!=e&&(e.exports=t),e.exports}.call({}));const{$idb:qa}=app;var Ga={update:async function(e){if(!e.userStates)return e;try{const e=await new Promise(((e,t)=>{const n=indexedDB.open("keyval-store",1);n.onerror=()=>t(n.error),n.onsuccess=()=>e(n.result)})),t=await new Promise(((t,n)=>{const r=e.transaction("keyval","readonly").objectStore("keyval").get("state");r.onerror=()=>n(r.error),r.onsuccess=()=>t(r.result)})),n=Va.decompressFromUTF16(t),r=btoa(encodeURIComponent(n));await qa.set("state",r),await new Promise(((t,n)=>{const r=e.transaction("keyval","readwrite").objectStore("keyval").delete("state");r.onerror=()=>n(r.error),r.onsuccess=()=>t()})),delete localStorage.state}catch(e){console.error("failed to apply version-204",e)}return e}};r(Na,"default",(function(){return Ga})),n(Na);var Ha={},Wa={update:function(e){const t={...e,authStatus:{...e.authStatus}};return delete t.authStatus.isMobileSession,t}};r(Ha,"default",(function(){return Wa})),n(Ha);var za={},Ja={update:function(e){if(!e.userStates)return e;const t={...e};return delete t.desktopPlatform,t}};r(za,"default",(function(){return Ja})),n(za);var Ya={},Ka={update:function(e){return e.userStates?{...e,abTesting:{hash:Math.random(),wideScreenState:null}}:e}};r(Ya,"default",(function(){return Ka})),n(Ya);var Xa={},Qa={update:function(e){return e.userStates?{...e,abTesting:{...e.abTesting,wideScreenState:null}}:e}};r(Xa,"default",(function(){return Qa})),n(Xa);var Za={},el={update:function(e){return{...e,later:{showAssistPanel:!1}}}};r(Za,"default",(function(){return el})),n(Za);var tl={},nl={update:function(e){return{...e,authStatus:{...e.authStatus,cookies:{...e.authStatus.cookies,ig:[]}}}}};r(tl,"default",(function(){return nl})),n(tl);var rl={},ol={update:function(e){return{...e,later:{...e.later,posts:[]}}}};r(rl,"default",(function(){return ol})),n(rl);var il={},sl={update:function(e){return{...e,storyAssist:{...e.storyAssist,isVideo:!1}}}};r(il,"default",(function(){return sl})),n(il);var al={},ll={update:function(e){return{...e,later:{...e.later,editPostId:null}}}};r(al,"default",(function(){return ll})),n(al);var ul={},cl={update:function(e){return{...e,later:{...e.later,cookies:null}}}};r(ul,"default",(function(){return cl})),n(ul);var dl={},pl={update:function(e){return{...e,later:{...e.later,date:null}}}};r(dl,"default",(function(){return pl})),n(dl);var hl={},fl={update:function(e){return{...e,later:{...e.later,userId:null}}}};r(hl,"default",(function(){return fl})),n(hl);var gl={},ml={update:function(e){return{...e,later:{...e.later,selectedPill:null}}}};r(gl,"default",(function(){return ml})),n(gl);var vl={},yl={update:function(e){const t={...e,later:{...e.later,showBodyPanel:!1,selectedUserId:e.later.userId||e.authStatus.userId,selectedPostId:e.later.editPostId,selectedPillId:e.later.selectedPill}};return delete t.later.userId,delete t.later.editPostId,delete t.later.selectedPill,t}};r(vl,"default",(function(){return yl})),n(vl);var bl={},_l={update:function(e){const t={...e,later:{...e.later,posts:e.later.posts.map((e=>({...e,previewColor:e.previewAvgColor})))}};return t.later.posts.forEach((e=>delete e.previewAvgColor)),t}};r(bl,"default",(function(){return _l})),n(bl);var wl={},Pl={update:function(e){return{...e,later:{...e.later,posts:e.later.posts.map((e=>{const[t,n]={"story-photo":["story",!1],"story-video":["story",!0],photo:["post",!1],video:["post",!0],reel:["reel",!0]}[e.type];return{...e,type:t,isVideo:n,changes:{}}}))}}}};r(wl,"default",(function(){return Pl})),n(wl);var Dl={},Sl={update:function(e){return{...e,later:{...e.later,posts:e.later.posts.map((e=>{const t={...e};return delete t.changes,t}))}}}};r(Dl,"default",(function(){return Sl})),n(Dl);var xl={},Il={update:function(e){return{...e,later:{...e.later,timeSlots:[...e.schedule.timeSlots]}}}};r(xl,"default",(function(){return Il})),n(xl);var El={};const{$utils:Cl}=app;var Tl={update:function(e){return e.userStates?{...e,settings:{laterAutoRetry:12*Cl.time.HOUR}}:e}};r(El,"default",(function(){return Tl})),n(El);var kl={},Al={update:function(e){return{...e,later:{...e.later,errors:[]}}}};r(kl,"default",(function(){return Al})),n(kl);var Fl={};const{$utils:Ol,$idb:$l}=app;var jl={update:async function(e){const t={...e,later:{...e.later,posts:e.later.posts.map((e=>({...e})))}};for(const e of t.later.posts){if(!e.isVideo)continue;let t,n;try{t=await $l.get(`later.post-${e.id}`)}catch(e){console.error(e);continue}try{n=await Ol.loadVideoMetadata(t.blob)}catch(e){console.error(e);continue}e.duration=n.duration}return t}};r(Fl,"default",(function(){return jl})),n(Fl);var Rl={},Ml={update:function(e){return{...e,later:{...e.later,lastDate:null}}}};r(Rl,"default",(function(){return Ml})),n(Rl);var Ul={},Bl={update:function(e){return{...e,later:{...e.later,posts:e.later.posts.map((e=>{let t;t="failed"!==e.status||e.errorMessage?e.errorMessage:"Chrome was offline at the given time";const n={...e};return t&&(n.error={message:t}),delete n.errorMessage,n}))}}}};r(Ul,"default",(function(){return Bl})),n(Ul);var Ll={},Nl={update:function(e){return{...e,later:{...e.later,processing:!1}}}};r(Ll,"default",(function(){return Nl})),n(Ll);var Vl={};const{$files:ql,$idb:Gl}=app;var Hl={update:async function(e){const t={...e,later:{...e.later,posts:e.later.posts.map((e=>({...e})))}};for(const e of t.later.posts){let t,n,r,o;try{t=await Gl.get(`later.post-${e.id}`)}catch(e){console.error(e)}if(t){if(t.blob)try{n=await ql.controller.save(t.blob,"later")}catch(e){console.error(e)}if(t.previewBlob)try{r=await ql.controller.save(t.previewBlob,"later")}catch(e){console.error(e)}if(t.coverBlob)try{o=await ql.controller.save(t.coverBlob,"later")}catch(e){console.error(e)}try{await Gl.remove(`later.post-${e.id}`)}catch(e){console.error(e)}delete e.previewUrl,e.files=[{fileId:n||null,previewId:r||null,...o&&{coverId:o}}]}else e.files=[]}return t}};r(Vl,"default",(function(){return Hl})),n(Vl);var Wl={},zl={update:function(e){return{...e,later:{...e.later,posts:e.later.posts.map((e=>{const t={...e,files:e.files.length>0?[{...e.files[0],duration:e.duration}]:[]};return delete t.isVideo,delete t.duration,t}))}}}};r(Wl,"default",(function(){return zl})),n(Wl);var Jl={},Yl={update:function(e){return{...e,later:{...e.later,posts:e.later.posts.map((e=>{const t={...e,mediaList:e.files.map((e=>({...e,isVideo:!!e.coverId})))};return delete t.files,t}))}}}};r(Jl,"default",(function(){return Yl})),n(Jl);var Kl={},Xl={update:function(e){return{...e,later:{...e.later,posts:e.later.posts.map((e=>{const t={...e,mediaList:[{...e.mediaList[0],color:e.previewColor}]};return delete t.previewColor,t}))}}}};r(Kl,"default",(function(){return Xl})),n(Kl);var Ql={};const{$files:Zl,$utils:eu}=app;var tu={update:async function(e){const t={...e,later:{...e.later,posts:e.later.posts.map((e=>({...e,mediaList:e.mediaList.map((e=>({...e})))})))}};for(const e of t.later.posts)for(const t of e.mediaList)try{if(!t.isVideo)continue;const e=await Zl.controller.read(t.fileId);if(!e)continue;const n=await eu.loadVideoMetadata(e);t.duration=n.duration}catch(e){console.error(e)}return t}};r(Ql,"default",(function(){return tu})),n(Ql);var nu={},ru={update:function(e){return{...e,later:{...e.later,posts:e.later.posts.map((e=>({...e,mediaList:e.mediaList.filter(Boolean)})))}}}};r(nu,"default",(function(){return ru})),n(nu);var ou={},iu={update:function(e){if(e.later.cookies)return e;const t={};for(const n of e.authStatus.cookies.ig)t[n.name]=n.value;return{...e,later:{...e.later,cookies:t}}}};r(ou,"default",(function(){return iu})),n(ou);var su={},au={update:function(e){return{...e,later:{...e.later,posts:e.later.posts.map((e=>({...e,caption:e.caption||""})))}}}};r(su,"default",(function(){return au})),n(su);var lu={},uu={update:function(e){return e.userStates?{...e,billing:{...e.billing,trial:{...e.billing.trial,later:0}}}:e}};r(lu,"default",(function(){return uu})),n(lu);var cu={},du={update:function(e){return{...e,later:{...e.later,showUpsell:!1}}}};r(cu,"default",(function(){return du})),n(cu);var pu={},hu={update:function(e){return{...e,inspiration:{posts:[]}}}};r(pu,"default",(function(){return hu})),n(pu);var fu={},gu={update:function(e){return{...e,inspiration:{...e.inspiration,prefilled:!1}}}};r(fu,"default",(function(){return gu})),n(fu);var mu={},vu={update:function(e){const t={...e};return delete t.schedule,t}};r(mu,"default",(function(){return vu})),n(mu);var yu={},bu={update:function(e){if(!e.userStates)return e;const t={...e};return delete t.zen,t}};r(yu,"default",(function(){return bu})),n(yu);var _u={},wu={update:function(e){const t={...e,authStatus:{...e.authStatus}};return delete t.authStatus.isConnected,t}};r(_u,"default",(function(){return wu})),n(_u);var Pu={};const{$utils:Du}=app;var Su={update:function(e){return e.userStates?{...e,settings:{...e.settings,laterAutoRetry:e.settings.laterAutoRetry===12*Du.time.HOUR?-1:e.settings.laterAutoRetry}}:e}};r(Pu,"default",(function(){return Su})),n(Pu);var xu={},Iu={update:function(e){return{...e,later:{...e.later,calendar:{periodType:"month",periodStart:Date.now()}}}}};r(xu,"default",(function(){return Iu})),n(xu);var Eu={},Cu={update:function(e){return{...e,later:{...e.later,calendar:{...e.later.calendar,showSlots:!0}}}}};r(Eu,"default",(function(){return Cu})),n(Eu);var Tu={},ku={update:function(e){return{...e,later:{...e.later,timeSlots:[...e.later.timeSlots].sort(((e,t)=>e.time-t.time))}}}};r(Tu,"default",(function(){return ku})),n(Tu);var Au={};const{$utils:Fu}=app;var Ou={update:function(e){return e.userStates?{...e,settings:{...e.settings,laterAutoRetry:e.settings.laterAutoRetry===12*Fu.time.HOUR?-1:e.settings.laterAutoRetry}}:e}};r(Au,"default",(function(){return Ou})),n(Au);var $u={},ju={update:function(e){return{...e,later:{...e.later,showGrid:!1,ig:{loading:!1,error:null,posts:[]}}}}};r($u,"default",(function(){return ju})),n($u);var Ru={},Mu={update:function(e){return{...e,later:{...e.later,ig:{...e.later.ig,updatedAt:-1}}}}};r(Ru,"default",(function(){return Mu})),n(Ru);var Uu={},Bu={update:function(e){return{...e,later:{...e.later,dnd:{dragPostId:null,dragOverPostId:null,dragOverDay:null,dragOverTime:null}}}}};r(Uu,"default",(function(){return Bu})),n(Uu);var Lu={},Nu={update:function(e){const t={...e,inspiration:{...e.inspiration}};return delete t.inspiration.prefilled,t}};r(Lu,"default",(function(){return Nu})),n(Lu);var Vu={},qu={update:function(e){const t={...e,dm:{...e.dm}};return delete t.dm.badgeText,t}};r(Vu,"default",(function(){return qu})),n(Vu);var Gu={},Hu={update:function(e){const t={...e,authStatus:{...e.authStatus,cookies:{...e.authStatus.cookies}}};return delete t.authStatus.cookies.fb,t}};r(Gu,"default",(function(){return Hu})),n(Gu);var Wu={},zu={update:function(e){return{...e,authStatus:{...e.authStatus,cookies:[...e.authStatus.cookies.ig||[]]}}}};r(Wu,"default",(function(){return zu})),n(Wu);var Ju={},Yu={update:function(e){const t={...e,auth:{...e.authStatus}};return delete t.authStatus,t}};r(Ju,"default",(function(){return Yu})),n(Ju);var Ku={},Xu={update:function(e){const t={...e,auth:{...e.auth,loggedIn:e.auth.isLoggedIn}};return delete t.auth.isLoggedIn,t}};r(Ku,"default",(function(){return Xu})),n(Ku);var Qu={},Zu={update:function(e){const t={...e,later:{...e.later}};return delete t.later.cookies,t}};r(Qu,"default",(function(){return Zu})),n(Qu);const ec={"version-130":zo(Jo).default,"version-131":zo(Ko).default,"version-132":zo(Zo).default,"version-133":zo(ti).default,"version-134":zo(ri).default,"version-135":zo(si).default,"version-136":zo(li).default,"version-137":zo(ci).default,"version-138":zo(pi).default,"version-139":zo(fi).default,"version-140":zo(mi).default,"version-141":zo(yi).default,"version-142":zo(_i).default,"version-143":zo(Pi).default,"version-144":zo(Si).default,"version-145":zo(Ii).default,"version-146":zo(Ci).default,"version-147":zo(ki).default,"version-148":zo(Fi).default,"version-149":zo($i).default,"version-150":zo(Ri).default,"version-151":zo(Ui).default,"version-152":zo(Li).default,"version-153":zo(Vi).default,"version-154":zo(Gi).default,"version-155":zo(Wi).default,"version-156":zo(Ji).default,"version-157":zo(Ki).default,"version-158":zo(Qi).default,"version-159":zo(es).default,"version-160":zo(ns).default,"version-161":zo(os).default,"version-162":zo(ss).default,"version-163":zo(ls).default,"version-164":zo(cs).default,"version-165":zo(ps).default,"version-166":zo(fs).default,"version-167":zo(ms).default,"version-168":zo(ys).default,"version-169":zo(_s).default,"version-170":zo(Ps).default,"version-171":zo(Ss).default,"version-172":zo(Is).default,"version-173":zo(Cs).default,"version-174":zo(ks).default,"version-175":zo(Fs).default,"version-176":zo($s).default,"version-177":zo(Ms).default,"version-178":zo(Bs).default,"version-179":zo(Ns).default,"version-180":zo(qs).default,"version-181":zo(Hs).default,"version-182":zo(zs).default,"version-183":zo(Ks).default,"version-184":zo(Qs).default,"version-185":zo(ea).default,"version-186":zo(na).default,"version-187":zo(oa).default,"version-188":zo(sa).default,"version-189":zo(la).default,"version-190":zo(ca).default,"version-191":zo(ha).default,"version-192":zo(ga).default,"version-193":zo(va).default,"version-194":zo(_a).default,"version-195":zo(Da).default,"version-196":zo(xa).default,"version-197":zo(Ea).default,"version-198":zo(Ta).default,"version-199":zo(Aa).default,"version-200":zo(Oa).default,"version-201":zo(ja).default,"version-202":zo(Ma).default,"version-203":zo(Ba).default,"version-204":zo(Na).default,"version-205":zo(Ha).default,"version-206":zo(za).default,"version-207":zo(Ya).default,"version-208":zo(Xa).default,"version-209":zo(Za).default,"version-210":zo(tl).default,"version-211":zo(rl).default,"version-212":zo(il).default,"version-213":zo(al).default,"version-214":zo(ul).default,"version-215":zo(dl).default,"version-216":zo(hl).default,"version-217":zo(gl).default,"version-218":zo(vl).default,"version-219":zo(bl).default,"version-220":zo(wl).default,"version-221":zo(Dl).default,"version-222":zo(xl).default,"version-223":zo(El).default,"version-224":zo(kl).default,"version-225":zo(Fl).default,"version-226":zo(Rl).default,"version-227":zo(Ul).default,"version-228":zo(Ll).default,"version-229":zo(Vl).default,"version-230":zo(Wl).default,"version-231":zo(Jl).default,"version-232":zo(Kl).default,"version-233":zo(Ql).default,"version-234":zo(nu).default,"version-235":zo(ou).default,"version-236":zo(su).default,"version-237":zo(lu).default,"version-238":zo(cu).default,"version-239":zo(pu).default,"version-240":zo(fu).default,"version-241":zo(mu).default,"version-242":zo(yu).default,"version-243":zo(_u).default,"version-244":zo(Pu).default,"version-245":zo(xu).default,"version-246":zo(Eu).default,"version-247":zo(Tu).default,"version-248":zo(Au).default,"version-249":zo($u).default,"version-250":zo(Ru).default,"version-251":zo(Uu).default,"version-252":zo(Lu).default,"version-253":zo(Vu).default,"version-254":zo(Gu).default,"version-255":zo(Wu).default,"version-256":zo(Ju).default,"version-257":zo(Ku).default,"version-258":zo(Qu).default},{$store:tc}=app;tc.versionerController={init:function(){this._versioners={};const e=/version-(\d+)/i;Object.keys(ec).map((t=>{const n=parseInt(t.match(e)[1]);return{key:t,version:n}})).sort(((e,t)=>e.version-t.version)).forEach((e=>{this._versioners[e.version]=ec[e.key]}))},update:async function(e){let t=e,n=t.version||0;const r=tc.getTemplateUserState().version;for(;n<r;){tc.log(`applying v${n+1}`);const e=this._versioners[n+1];t=await e.update(t),t.version=n+1;const r=t.backups||t.userStates;for(const t in r){const o=r[t];try{r[t]=await e.update(o),r[t].version=n+1}catch(e){delete r[t]}}n++}return t}};const{$store:nc}=app;nc.whatsNewController={update:function(e){const t=Array.isArray(e.whatsNew)?e.whatsNew:[],n=nc.getWhatsNewItems();let r=!1;const o=n.map((e=>{let n;if(r)n=!0;else{const o=t.find((t=>t.id===e.id));n=o&&o.acknowledged||!1,n&&(r=!0)}return{id:e.id,acknowledged:n}}));return{...e,whatsNew:o}}};const{$store:rc}=app;rc.acknowledge=rc.action("state.acknowledge",((e,t)=>{const n=Math.round(Date.now()/1e3);return{...e,acknowledged:{...e.acknowledged,[t]:n}}}));const{$store:oc}=app;oc.replaceState=oc.action("state.replace-state",((e,t)=>t));const{$store:ic}=app;ic.setupDefaultState=ic.action("state.setup-default-state",(e=>e.whatsNew?e:{...ic.getTemplateUserState(),...ic.getTemplateSharedState()}));const{$store:sc,$env:ac}=app;sc.proxy={isLoggedIn:function(){return!!sc.state.billing.account.token},hasPro:function({feature:e}={}){var t;return!(!ac.is.development||!(null===(t=sc.state.experiments)||void 0===t?void 0:t.enabled))||(!!this.hasProPaid()||(!!this.hasProPromocode()||!(!e||!this.hasTrialFeature(e))))},hasTrialFeature:function(e="*"){if(!ac.features.trial)return!1;const t=sc.state.billing.trial;if(!t)return!1;if("*"===e){for(e in t)if(ac.options.trialFeaturesLimits[e]&&ac.options.trialFeaturesLimits[e](t))return!1;return!0}return!!e&&(!ac.options.trialFeaturesLimits[e]||!ac.options.trialFeaturesLimits[e](t))},hasProPaid:function(e=null){if(!this.isLoggedIn())return!1;const t=sc.state.billing,n=Date.now(),r=t.optimistic||{on:0,plan:null};if(r.plan===e&&r.on<=n&&n-r.on<=36e5)return!0;for(const r in ac.options.billingPlans){if(e&&e!==r)continue;const s=ac.options.billingPlans[r];if(s.isActive){if(s.isActive(sc.state))return!0}else if("subscription"===s.type){var o;const e=(null===(o=t.subscriptions)||void 0===o?void 0:o[r])||{};if("active"===e.state)return!0;if("canceled"===e.state&&n<=e.next)return!0}else if("product"===s.type){var i;if(((null===(i=t.products)||void 0===i?void 0:i[r])||0)>0)return!0}}return!1},hasProPromocode:function(){const e=sc.state.billing.promocode;if(!e)return!1;const t=Date.now(),[n,r,o]=e.split("."),i=new Date(`${r}-${n}-${o}`);return i.setHours(23),i.setMinutes(59),i.setSeconds(59),i.getTime()>=t},fspringExpirationDate:function(e){if(!e)return null;const t=sc.state.billing,n=t.subscriptions&&t.subscriptions[e]||{};return n.active&&"canceled"===n.state?new Date(n.next).toLocaleDateString():null},isAcknowledged:function(e){return-1!==sc.state.acknowledged[e]},userId:function(){return sc.state.auth.userId},username:function(){return sc.state.auth.username},sessionId:function(){var e;return(null===(e=(sc.state.auth.cookies||[]).find((e=>"sessionid"===e.name)))||void 0===e?void 0:e.value)||null},allUsernames:function(){const e=sc.state,t=[],n=e=>t.push(e.auth.username);n(e);for(const t in e.userStates)n(e.userStates[t]);return t}};const{$store:lc}=app;lc.getQuickReplies=()=>"Hello {@name}! ðŸ‘‹\n\n\n  {Thank you|Thanks} {@name}! ðŸ™�\n\n\n  /tnx follow\n  {Hi|Hey|Hello|Greetings} {@name}! Thank you so much for following! Feel free to send me a DM!\n\n\n  /tnx contact\n  {Thank you for contacting us.|Thank you for reaching out to us.|Thank you for contacting us here.} {We have received your message and will be in touch shortly.|We will be in touch shortly, and you may also find answers to some of your questions on our FAQ page.|We will be in touch soon.}\n\n\n  /sorry missed\n  Hi {@name}! I am sorry I missed your message. I will get back to you as soon as possible. I look forward to speaking with you!\n\n\n  /ask feedback\n  {Hi|Hello|Hey|Greetings}! Just wanted to follow back with you and check how you find the product? Feel free to send me your feedback, suggestions or ideas.\n\n\n  /tmm\n  Thank you for contacting us. Due to an unusual level of activity, responses are delayed. We anticipate responding to your message within two business days. In the meantime, please feel free to reach out to us via email with any urgent needs or requests.\n  ".split("\n").map((e=>e.trim())).join("\n");const{$store:uc}=app;uc.getTemplateSharedState=()=>({installedAt:Date.now(),installedEventSent:!1,isAfterTheEndUser:!0,userStates:{},experiments:{enabled:!1},abTesting:{hash:Math.random(),wideScreenState:null},multiaccount:{userIds:[],selectedUserId:null,addingNewAccount:!1},welcome:{shown:!0},sidebar:{selectedTabId:null,isOpen:!1},igView:{fullscreen:!1,fullscreenWidth:460,withBorder:!0,creationCardShown:!1},quickReplies:{shown:!1,content:uc.getQuickReplies(),total:7},settings:{laterAutoRetry:-1},tagAssist:{shown:!1,query:"",tagMetricsUpsellDismissed:!1,searching:!1,latinOnly:!1,errorCode:null,selectedTabId:"search",selectedGroupId:"low",igSelectedTags:[],fcsSelectedTags:[],sidebarSelectedTags:[],sidebarSelectedTagsAsText:"",lastDayUsedOn:null,ladderEngagementSort:null,summaryEngagementSort:null,ladderPostCountSort:null,summaryPostCountSort:null,lastTagScanOn:null,accountStats:{},ladder:null,ladderLoadingTags:[],ladderConfig:{lastUpdateOn:Date.now(),tiers:{low:.7,medium:1.5,high:5}},collections:[],newCollection:{name:"",text:"",showForm:!1},collectionsTagData:{},collectionsLoadingTags:[]},acknowledged:{upsell:-1,postLimitations:-1,storyLimitations:-1,tosSummary:-1,scheduleTip:-1,scheduleDndTip:-1,followUs:-1,rateUs:-1,theEnd:-1},followUs:{shown:!1},rateUs:{shown:!1,rate:null},whatsNew:uc.getWhatsNewItems().map((e=>({id:e.id,acknowledged:!0}))),userDetails:{},billing:{navigation:{isBodyOpen:!1},discount:{availableTill:-1,showSnackbarMessage:!1},account:{email:null,token:null},recordedUsernames:[],promocode:null,recentFeature:null,trial:{installedOn:Date.now(),dmAdvanced:0,schedule:0,later:0,insights:0,analytics:0,coverAssist:0,musicAssist:0,tagAssist:0,storyAssist:0,addLinkToStory:0,repost:0,reels:0,ghostStoryView:0,postsPublished:0,storiesPublished:0,dmsSent:0},optimistic:null,subscriptions:{},products:{},orders:[],selectedPlan:null,purchasingPlan:null,countryIso:null,pricing:null,snapshot:{},verificationCodeEmail:null}});const{$store:cc}=app;cc.getTemplateUserState=()=>({version:258,auth:{userId:null,username:null,fullName:null,email:null,avatarUrl:null,loggedIn:!1,cookies:[]},coverAssist:{shown:!1,loading:!0,videoUrl:null,coverUrl:null,selectedTabId:"auto",showGrid:!1,gridImages:[],frameGalleryImages:[],frameGallerySelectedImage:null,frameSelectImage:null,frameSelectValue:null,frameUploadImage:null},musicAssist:{shown:!1,videoUrl:null,videoVolume:0,musicVolume:.5,videoCurrentTime:0,categoryIdsOrder:[],selectedCategoryId:0,selectedTrackId:null,selectedTrackStart:0,customTrack:null,showUpsellOverlay:!1,isStory:!1},storyAssist:{shown:!1,isVideo:!1,selectedTabId:"later",showUpsellOverlay:!1,coverUrl:null,mentions:{query:"",foundUsers:[],selectedUsers:[]}},ghostStoryView:{enabled:!1,lastUsedOn:null,showUpsellOverlay:!1},dm:{ghostModeEnabled:!0,ghostModeFailed:!1},reels:{creating:!1},igTask:{actionBlockCode:null,followStatus:{},likeStatus:{}},later:{showGrid:!1,showUpsell:!1,showBodyPanel:!1,showAssistPanel:!1,selectedUserId:null,selectedPostId:null,selectedPillId:null,selectedIgDate:null,errors:[],lastDate:null,processing:!1,timeSlots:[{time:288e5},{time:468e5},{time:576e5},{time:72e6}],calendar:{periodType:"month",periodStart:Date.now(),showSlots:!0},dnd:{dragPostId:null,dragOverPostId:null,dragOverDay:null,dragOverTime:null},ig:{loading:!1,error:null,updatedAt:-1,posts:[]},posts:[]},inspiration:{posts:[]},bulk:{saving:!1,selectedPostIds:[],activeActionId:null,actions:{},dateDialog:{show:!1,selectedTypeId:"interval",startingDay:{selectedTypeId:"today",periodStart:null,selectedDay:null},calendar:{periodStart:null,selectedDay:null,selectedSlotTime:null,customTime:null,errorMessage:null},interval:{frequency:"1:1",timeList:[]},week:{selectedDays:[],selectedSlotTime:null,customTime:null,dayErrorMessage:null,timeErrorMessage:null},timeSlots:{errorMessage:null}}}});const{$store:dc}=app;dc.getWhatsNewItems=()=>[{id:"v25.1.0",header:"Carousels Post Later",subheader:"v25.1.0",hexImage:"hex-schedule",content:["Upload or drag & drop multiple files to Post Later to schedule them for posting as a carousel."]},{id:"v25.0.0",header:"Advanced Post Later",subheader:"v25.0.0",hexImage:"hex-schedule",content:["Improved Post Later interface and auto-publishing stability. Manage multiple accounts in Post Later interface seamlessly. Bulk upload files for scheduling."]},{id:"v24.0.0",header:"Post Later",subheader:"v24.0.0",hexImage:"hex-schedule",content:["INSSIST now supports Delayed Posting for Posts, Photo and Video Stories and Reels. Facebook account is not required to schedule posts with delayed posting."]},{id:"v23.6.0",header:"Fixes and Future Plans",subheader:"v23.6.0",hexImage:"hex-schedule"},{id:"v23.3.0",header:"Major Functionality Fixes",subheader:"v23.3.0",hexImage:"hex-bug",content:["Restored all app functions broken due to recent changes introduced by Instagram update to internal data and media handling systems."]},{id:"v23.1.0",header:"Instagram Update Bug Fixes",subheader:"v23.1.0",hexImage:"hex-bug",content:["Fixed a number of bugs introduced by Instagram in the recent mobile and desktop app update: reels failed to be published through instagram.com, posted videos were duplicated under reels tab and showing with a wrong icon, restored search panel functionality of the explore page, and other improvements and fixes."]},{id:"v23.0.0",header:"Ghost View Mode for Stories",subheader:"v23.0.0",hexImage:"hex-ghost",content:["Switch to a Ghost View Mode and watch stories anonymously. Story owner wonâ€™t know if you watched their story."]},{id:"v22.0.0",header:"Story Assist",subheader:"v22.0.0",hexImage:"hex-story",content:["Added user tagging feature in stories, fixed avatars rendering Instagram bug, fixed reels API connectivity and other issues."]},{id:"v21.1.0",header:"Improvements and Bug Fixes",subheader:"v21.1.0",hexImage:"hex-update",content:["Fixed custom video covers and music file uploads to fail in certain scenarios. Styling and usability improvements in the app. Fixed tooltips rendering in the IG frame. Fixed app rendering artifacts on slow Internet connection and more."]},{id:"v21.0.0",header:"Posting Functionality Restored",subheader:"v21.0.0",hexImage:"hex-bug",content:["Restored posting functionality and fixed problems caused by the IG platform overhaul.","Improved app stability, dark theme, custom cover feature, videos autoplay on carousels and fixed multiple bugs."]},{id:"v20.2.0",header:"Reels Improvements",subheader:"v20.2.0",hexImage:"hex-bug",content:["Added support for locations and people mentions (tagging) on Reels posting.","Fixed original audio automatically muted by Chrome v100. Fixed followers and followings not showing up correctly in the wide mode. Fixed DM not showing DM folders."]},{id:"v20.1.0",header:"Bug Fixing",subheader:"v20.1.0",hexImage:"hex-bug",content:["Fixed scheduling connection setup, fixed isolation policy error, improved reels posting, post management error handling and usability."]},{id:"v20.0.0",header:"Music",subheader:"v20.0.0",hexImage:"hex-music",content:["Add music or upload your tracks to Reels, Stories and Videos. Royalty-free music is provided by tunetank.com."]},{id:"v19.0.0",header:"Quick Replies in DM",subheader:"v19.0.0",hexImage:"hex-dm",content:["Send Quick Replies in chats by typing / symbol followed by reply shortcut. Configure an unlimited number of replies for business or personal use.","Inssist Quick Replies support template messages and @name, @username variables."]},{id:"v18.0.9",header:"Bug Fixing",subheader:"v18.0.9",hexImage:"hex-bug",content:["Fixed Instagram bug that caused a blank screen to load for some users. Fixed Zen mode, story mentions and other issues."]},{id:"posting-from-website",header:"Posting from website",subheader:"v18.0.0",hexImage:"hex-igswiss"},{id:"v17.3.0",header:"60s Reels",subheader:"v17.3.0",hexImage:"hex-reels",content:["Inssist can now post Reels of up to 60s long, up from 30s before.","CSV import now supports â€œmultiline \\n captionsâ€� and break lines with \\n symbols.","This release improves posting stability."]},{id:"v17.0.0",header:"Bulk & CSV Scheduling",subheader:"v17.0.0",hexImage:"hex-schedule",content:["Added â€œBULKâ€� section to the Scheduling module that supports applying bulk commands: scheduling, drafting, deleting posts.","You can now reschedule posts across time-slots or intervals with a few clicks and edit captions of all scheduled posts from a single screen.","Inssist now knows how to parse CSV files so that you can drag and drop those and schedule posts even faster.","Scheduling interface has been significantly speed up comparing to the previous versions."]},{id:"macos",header:"Experimental MacOS version",subheader:"v15.2.3",hexImage:"hex-macos"},{id:"v15.1.0",header:"Usability & Bug Fixes",subheader:"v15.1.0",hexImage:"hex-bug",content:["Post Assistant now supports custom aspect ratios for images in addition to default square, portrait and landscape ones.","Fix for the Instagram â€œvideo failed to postâ€� and other bugs."]},{id:"v15.0.3",header:"Bug Fixing",subheader:"v15.0.3",hexImage:"hex-bug",content:["Fixed missing delete button in Post Assistant. Fixed dark theme Reels $ui. Fixed â€œPost did not uploadâ€� video publishing issue."]},{id:"reels",header:"Reels",subheader:"v15.0.0",hexImage:"hex-reels",content:["Inssist can now post Reels! It ensures the best quality and does not compress your videos.","Instagram Reels is a short-video format, similar to TikTok. Instagram platform limits Reels to 50 countries, including the United States.","Posting Reels is a PRO feature, and you can repost Reels from other accounts and apply custom covers with Inssist."]},{id:"v13.1.0",header:"Hashtag Collections",subheader:"v13.1.0",hexImage:"hex-tag",content:["Now you can create and manage your Hashtag collections with Inssist."]},{id:"v11.5.0",header:"Lifetime Deal",subheader:"v11.5.0",hexImage:"hex-lifetime",content:["Claim your Inssist PRO Lifetime Deal!","Now you can get Inssist PRO license for life with a one time purchase, before only a monthly subscription option was available.","For businesses managing many accounts there is a special Infinite plan. Check it out!"]},{id:"v11.2.0",header:"Swipe Up",subheader:"v11.2.0",hexImage:"hex-swipe-up",content:["Swipe Up feature (adding links to stories) is now available for accounts of more than 10k followers."]},{id:"v11.1.0",header:"Editing Captions",subheader:"v11.1.0",hexImage:"hex-caption",content:["This version brings support for editing posts. You can now edit posts and update post captions after they are published without a need to connect to Facebook API."]},{id:"v11.0.0",header:"Video Thumbnails / Covers",subheader:"v11.0.0",hexImage:"hex-video",content:["Version 11 brings support for covers to video posting.","Whenever you upload a video to post you can choose a thumbnail from a list of auto-generated covers, a specific video frame or even upload a custom image to be used.","You can also preview your Instagram grid with the selected cover before posting."]},{id:"v10.1.0",header:"Zen Mode",subheader:"v10.1.0",hexImage:"hex-zen",content:["Make your Instagram browsing experience cleaner with the new Zen mode.","Switch Instagram home feed into Zen hides post captions and comments on the posts. Give it a try!","This release also fixes a number of bugs, making posting Stories more stable in particular."]},{id:"v10.0.1",header:"Share Post to Story",subheader:"v10.0.1",hexImage:"hex-story",content:["Version 10 brings support for sharing any post to your story in a few clicks.","Locate a share icon below any post, video or photo, click it and select â€œShare to Storyâ€�. A photo will then be shared to your story.","This feature is free. Enjoy!"]},{id:"v10.0.0",header:"Bug Fixing",subheader:"v10.0.0",hexImage:"hex-bug",content:["Fixed comments scrolling caused the app to refresh the page.","Post Assistant now supports uploading and previewing posts in a grid without a Facebook API connection.","Changed the dark theme background not to be so dark. Redesigned side bar and Facebook API connection setup dialogs.","And a host of other improvements and stability enhancements under the hood."]},{id:"v9.0.0",header:"Bulk Scheduling",subheader:"v9.0.0",hexImage:"hex-ship",content:["Inssist Scheduling now supports uploading multiple photos at once to speed up posting.","You can also drag & drop photos and videos from the system to Inssist to schedule or publish them.","Scheduling engine has been significantly improved to support bulk upload and future improvements coming down the line."]},{id:"v8.9.1",header:"Bug Fixing & Usability",subheader:"v8.9.1",hexImage:"hex-bug",content:["Stories uploaded with Inssist are now uploaded in the best quality possible.","Fixed internal bugs and improved DM module stability."]},{id:"v8.8.5",header:"Bug Fixing & Usability",subheader:"v8.8.5",hexImage:"hex-bug",content:["Inssist now prevents Instagram from blurring photos when switching between screen modes.","Inssist now shows @usernames upon hovering over accounts in multiaccount box.","Increased DM text input size, fixed elements positioning on Instagram authorization screen, fixed wordings across the application and other improvements.","Added support for sending debug reports if Inssist fails to connect Scheduling."]},{id:"v8.6.0",header:"Scheduling patch",subheader:"v8.6.0",hexImage:"hex-bug",content:["Fixed a bug preventing scheduling connection setup to reliably connect Instagram account to Scheduling API.","Fixed a cross-posting bug preventing Facebook Page selection from rendering.","Fixed sending post from the home feed to Direct Messages. Other internal fixes."]},{id:"v8.5.1",header:"Story and Scheduling fixes",subheader:"v8.5.1",hexImage:"hex-bug",content:["Improved aspect ratio detection on stories: video stories should upload to Instagram more reliably.","Uploaded stories now have the first frame selected as a cover rather than a random one.","Fixed Infinite Loading loop bug on scheduling."]},{id:"v8.5.0",header:"Story Improvements",subheader:"v8.5.0",hexImage:"hex-bug",content:["Photo Stories are no longer cut in preview when they do not fit the aspect ratios. Inssist now detects and warns about unsupported Video Story lengths: shorter than 1 second and longer than 15 seconds. Other internal improvements."]},{id:"v8.4.0",header:"Story Mentions",subheader:"v8.4.0",hexImage:"hex-mentions",content:["Support for @mentions (account tagging) has arrived for photo stories. This is a free feature available on all plans."]},{id:"v8.3.0",header:"Bug Fixing",subheader:"v8.3.0",hexImage:"hex-bug",content:["Added mouse scroll to stories panel. Added photo upload spinner during posting.","Fixed modal windows positioning bug in Instagram. Fixed tab buttons spacing on Instagram profile page."]},{id:"v8.2.1",header:"Bug Fixing",subheader:"v8.2.1",hexImage:"hex-bug",content:["Fixed excess image rotation on new and scheduled posts.","Fixed a black screen scheduling state bug caused by selecting a Custom Time interval."]},{id:"v8.2.0",header:"Facebook Cross-Posting",subheader:"v8.2.0",hexImage:"hex-schedule",content:["If your Instagram @account is connected to a custom Facebook Page, Inssist will let you clone posts to that Facebook Page during scheduling."]},{id:"v8.1.0",header:"Scheduling Performance",subheader:"v8.1.0",hexImage:"hex-schedule",content:["Over the past few weeks we have redesigned and rebuilt Scheduling engine from ground-up, making it far more stable and performing much better than before. Give it a try!","A few User Interface fixes are delivered with this update."]},{id:"v8.0.0",header:"Multiaccount Support",subheader:"v8.0.0",hexImage:"hex-multiaccount",content:["Got more than one Instagram account? Connect them all to Inssist and seamlessly switch between them without a need to relogin. Handy!"]},{id:"v6.2.0",header:"Wide Screen",subheader:"v6.2.0",hexImage:"hex-monitor",content:["Wide screen mode has been redesigned with images taking more space and page layouts improved."]},{id:"v6.1.0",header:"Bug Fixing",subheader:"v6.1.0",hexImage:"hex-bug",content:["Stories can now be scrolled with LEFT / RIGHT keys and exited with ESC key. Fixed polls styling on stories in dark theme.","Fixed videos playing sound for a split second upon navigation within plugin. Fixed an Instagram bug with videos refusing to playing on click.","Fixed Scheduling incorrectly ordering posts upon updating post caption. Improved Scheduling interface buttons styling.","Plugin URL now contains Instagram page URL for quick navigation.","Direct Messages no longer marked as read while DM module is hidden. Fixed DM module buttons overlap. Clicking Back button no longer causes navigation in Direct Messaging module. Videos sent in Direct Messages can now be viewed in a separate tab."]},{id:"v6.0.1",header:"Carousels",subheader:"v6.0.1",hexImage:"hex-carousel",content:["Inssist now supports carousel posts through the Post Assistant. Check it out!","Multiaccount support is coming next!"]},{id:"v6.0.0",header:"Scheduling",subheader:"v6.0.0",hexImage:"hex-schedule",content:["Scheduling now supports drag&drop operations both on Grid and Calendar. Scheduling is out of Beta and has been substantially improved, debugged and redesigned."]},{id:"v5.0.1",header:"Bug Fixing",subheader:"v5.0.1",hexImage:"hex-bug",content:["Fixed Instagram bug when adding multiline text on stories caused Instagram UI to break. Captions containing emojis are no longer cut off."]},{id:"v4.0.5",header:"Bug Fixing",subheader:"v4.0.5",hexImage:"hex-bug",content:["A ton of bug fixes and improvements:","You can now send DMs to any account without following them first. Images in DM module are no longer cropped and take all available space.","Added a button to open image in a new tab in DM module. Requests tab in DM no longer overflows the new DM button and DM actions tooltips is no longer cut off. Fixed fonts in DM module.\n","Added â€œOpen in Inssistâ€� button on Instagram website. Added DM US button to reach out to us quickly. Icons in side bar no longer overlap on small screens.","Fixed â€œshow moreâ€� button on post captions and other small fixes across $ui."]},{id:"v4.0.0",header:"Direct Messages",subheader:"v4.0.0",hexImage:"hex-dm",content:["Psstâ€¦ Check out the brand new Direct Messages panel on the left. You can now send DMs while having the Instagram view on the right simultaneously. Handy! ðŸ’Œ","The next feature weâ€™re working on is Scheduling drag & drop support."]},{id:"v3.1.0",header:"Bug fixing",subheader:"v3.1.0",hexImage:"hex-bug",content:["Bug fixes and improvements: fixed emojis ðŸ¤§ in the dark theme, better scheduling setup logic and setup errors interception, permissions verification screen, scheduling migrated onto optimistic transactions mechanism, image pre-caching and scheduling loading speed-up, fixed IGTV screen and UI cleanup."]},{id:"v3.0.0",header:"Dark Mode",subheader:"v3.0.0",hexImage:"hex-moon",content:["Join the Dark Side! Switch Inssist to Dark mode which is less strenuous on your beautiful ðŸ‘€ with a click of a button. Instagram web interface has been thoroughly restyled to Dark mode as well."]},{id:"v2.3.0",header:"Calendar and Time Slots",subheader:"v2.3.0",hexImage:"hex-schedule",content:["Configure Time Slots to schedule posts efficiently. Browse posts in a weekly and monthly post calendars. Fixed scheduling setup, auto-logout and freezing bugs."]},{id:"v2.2.0",header:"Scheduling Usability",subheader:"v2.2.0",hexImage:"hex-schedule",content:["Added scheduling time & date selection calendar. Improved Posts Grid performance. Fixed scheduling connection setup problems."]},{id:"v2.1.0",header:"Scheduling Beta",subheader:"v2.1.0",hexImage:"hex-schedule",content:["Scheduling has arrived.","Upload photos, videos, IGTVs and carousel posts. Preview them in a grid, save as draft, publish or schedule for auto-publish.","Scheduled media are published automatically, no need to install extra software, Inssist handles auto-publish for you even if you are offline.","Scheduling is currently available through our Beta program. You can enable Beta features for free by sharing a word about Inssist.","All bug reports and feature requests are welcomed at inssist@slashed.io  ðŸ�œðŸ�œðŸ�œ"]},{id:"v1.6.0",header:"IGTV Support",subheader:"v1.6.0",hexImage:"hex-igtv",content:["Plugin now supports uploading IGTV videos.","To publish IGTV, simply upload a video as you would normally do. If the video is longer than 1 minute, Inssist will present an IGTV video upload interface to you."]},{id:"v1.3.0",header:"Relevant Hashtags",subheader:"v1.3.0",hexImage:"hex-tag",content:["Inssist now suggests relevant hashtags. Try it out!"]},{id:"v1.2.2",header:"Bug fixing",subheader:"v1.2.2",hexImage:"hex-bug",content:["Fixed â€œInstagram.com refused to connectâ€� issue. If you still experience â€œInstagram.com refused to connectâ€� error, please try to relogin to Instagram.com from a separate browser tab and reinstall Inssist from get.inssist.com.","Fixed video playback jittering."]},{id:"v1.2.0",header:"Autoplay for Videos",subheader:"v1.2.0",hexImage:"hex-update",content:["Videos on the feed will now autoplay (muted) when scrolled into the view. Clicking videos un-mutes them.","Improved posting screen usability, stability and bundle size."]},{id:"v1.1.0",header:"Usability Improvements",subheader:"v1.1.0",hexImage:"hex-update",content:["Text inside the Instagram view can now be selected and copied to clipboard.","Posting photos and videos now supports locations tagging.","Fixed issue with instagram.com not connecting after navigation to direct messages.","Fixed issue with opening facebook.com links from DM messages caused a browser page error.","Pressing Enter in DM screen now sends the message right away.","Other miscellaneous usability improvements."]},{id:"v0.9.12",header:"Bug fixing & Performance",subheader:"v0.9.12",hexImage:"hex-bug",content:["Extension rebranded to Inssist.","Loading and rendering speed improved. Fixed an issue when replying to comments rendered an unnecessary actions popup."]},{id:"v0.9.5",header:"Improved Image Quality",subheader:"v0.9.5",hexImage:"hex-quality",content:["Landscape and Portrait photos now retain high image quality when uploaded with the plugin."]},{id:"v0.9.2",header:"Video Support",subheader:"v0.9.2",hexImage:"hex-video",content:["Plugin now supports Video uploads."]},{id:"v0.8.9",header:"Stickers and Markers Support",subheader:"v0.8.9",hexImage:"hex-marker",content:["Stories can now be uploaded with stickers and markers."]},{id:"v0.8.3",header:"Improved UI",subheader:"v0.8.3",hexImage:"hex-bug",content:["User profile, stories reel and other parts of user interface and user experience were improved. Fixed stories viewer not showing stories on a first click."]},{id:"v0.8.0",header:"Basic version",subheader:"v0.8.0",hexImage:"hex-igswiss",content:["Plugin now supports photos and stories upload and direct messages."]}];const{$auth:pc,$store:hc,$cleanup:fc,$bus:gc,$utils:mc,$igApi:vc,$shortid:yc}=app;pc.controller={init:async function(){this._igInitialUrl=null,this._sessionWatcherPaused=!1,gc.on("auth.login",this._login,this),gc.on("auth.logout",this._logout,this),gc.on("auth.setIgInitialUrl",(e=>this._igInitialUrl=e)),gc.on("auth.actualizeCookies",this.actualizeCookies,this),this._setAuthIfAbsent().then((()=>{})),this._refreshUserOnSessionIdChange(),this._updateUserOnPopupStart(),await this.updateUser()},toggleSessionWatcher:function(e){this._sessionWatcherPaused=!e},actualizeCookies:async function(){const e=await mc.callAsync(chrome.cookies.getAll,{domain:".instagram.com"});hc.transaction((t=>{t.auth.cookies=e}))},updateUser:async function(e=!1,t=!1){pc.log("updating user id...");!await this.refreshUser(t)&&e&&chrome.tabs.update({url:"https://www.instagram.com/accounts/login/?source=auth_switcher"}),pc.log("updated")},refreshUser:async function(e=!1){const t=yc.generate();let n;if(this._refreshUserReqId=t,e)n=null;else{const e=await vc.api.fetchViewerInfo();if(e.error)return!1;if(this._refreshUserReqId!==t)return!1;n=e.result||null}const r=n&&hc.state.auth.userId===n.userId;return r?hc.transaction((e=>{e.auth.username=n.username,e.auth.avatarUrl=n.avatarUrl,e.multiaccount.selectedUserId=n.userId})):hc.transaction((e=>{var t,r,o;if(n){const t=e.multiaccount.userIds;e.multiaccount.addingNewAccount?e.multiaccount.addingNewAccount=!1:e.auth.loggedIn||mc.removeFromArray(t,e.multiaccount.selectedUserId),t.includes(n.userId)||t.push(n.userId),e.multiaccount.selectedUserId=n.userId}if(e.auth.userId){e.userStates[e.auth.userId]={};const t=hc.getTemplateUserState();for(const n in t)e.userStates[e.auth.userId][n]=e[n]}let i=null;n&&e.userStates[n.userId]?(i=e.userStates[n.userId],delete e.userStates[n.userId]):i=hc.getTemplateUserState(),i.auth.userId=(null===(t=n)||void 0===t?void 0:t.userId)||null,i.auth.username=(null===(r=n)||void 0===r?void 0:r.username)||null,i.auth.avatarUrl=(null===(o=n)||void 0===o?void 0:o.avatarUrl)||null,i.auth.loggedIn=!!n,Object.assign(e,i)})),await this.actualizeCookies(),r||(gc.send("iframe-bus","ig.clear-and-show-spinner"),n?this._igInitialUrl?gc.send("iframe-bus","ig.hard-go",this._igInitialUrl):(fc.controller.cleanUpState(),gc.send("igView.refresh")):gc.send("iframe-bus","ig.hard-go","/accounts/login/"),gc.send("iframe-bus","dm.refresh"),gc.send("iframe-bus","schedule.fcs-refresh-page")),this._igInitialUrl=null,gc.send("auth.refreshed"),!!n},_clearCookies:async function(e){const t=await mc.callAsync(chrome.cookies.getAll,{domain:`.${e}`});for(const n of t)await mc.callAsync(chrome.cookies.remove,{url:`https://*.${e}`,name:n.name})},_updateUserOnPopupStart:function(){let e=null;gc.on("popup.start",(async()=>{const t=await this._getSessionId(),n=hc.proxy.sessionId(),r=Date.now();n===t&&e&&r-e<=6*mc.time.HOUR||(e=r,await this.updateUser(!1,!t))}))},_setAuthIfAbsent:async function(){if("username"in hc.state.auth)return;const e=await vc.api.fetchViewerInfo();if(e.error)return;const t=e.result||null;hc.transaction((e=>{e.auth.userId=(null==t?void 0:t.userId)||null,e.auth.username=(null==t?void 0:t.username)||null,e.auth.fullName=(null==t?void 0:t.fullName)||null,e.auth.email=(null==t?void 0:t.email)||null,e.auth.avatarUrl=(null==t?void 0:t.avatarUrl)||null,e.auth.loggedIn=!!t})),await this.actualizeCookies()},_refreshUserOnSessionIdChange:function(){let e;chrome.cookies.onChanged.addListener((({cookie:t,removed:n})=>{this._sessionWatcherPaused||".instagram.com"===t.domain&&"sessionid"===t.name&&(clearTimeout(e),e=setTimeout((()=>this.refreshUser())))}))},_login:async function(e){var t;const n=null===(t=hc.state.userStates[e])||void 0===t?void 0:t.auth;if(n){this.toggleSessionWatcher(!1);try{await this._clearCookies("instagram.com"),await this._applyCookies("instagram.com",n.cookies)}catch(e){pc.error(e)}this.toggleSessionWatcher(!0),setTimeout((()=>this.refreshUser()))}else pc.error("auth data not found",{userId:e})},_logout:async function(){await this._clearCookies("instagram.com")},_applyCookies:async function(e,t){for(const n of t)await mc.callAsync(chrome.cookies.set,{url:`https://*.${e}`,name:n.name,value:n.value,domain:n.domain,path:n.path,secure:n.secure,httpOnly:n.httpOnly,sameSite:n.sameSite,storeId:n.storeId,expirationDate:n.expirationDate})},_getSessionId:async function(){const e=await mc.callAsync(chrome.cookies.get,{url:"https://*.instagram.com",name:"sessionid"});return(null==e?void 0:e.value)||null}};const{$badge:bc,$store:_c}=app;bc.controller={status:null,init:function(){this._subscribeToInflux()},_subscribeToInflux:function(){_c.model.observe((e=>e.whatsNew.some((e=>!e.acknowledged))?"updated":"normal"),(e=>{this._updateBadge(e)}))},_updateBadge:function(e){if(this.status===e)return;(chrome.browserAction||chrome.action).setIcon({path:{48:`/img/icon-badge-48-${e}.png`}})}};const{$igApi:wc}=app;wc.ec={noNetwork:"no-network",timedOut:"timed-out",redirectToLogin:"redirect-to-login",suspended:"suspended-400",missingPost:"missing-post-400x",missingUser:"missing-user",forbidden:"forbidden-403",notFound:"not-found-404",tooManyRequests:"too-many-requests-429",serverIsDown:"server-is-down-500",badGateway:"bad-gateway-502",serviceUnavailable:"service-unavailable-503",serviceDown:"service-down-560",other:"other"};const{$igApi:Pc,$sentry:Dc}=app,Sc=Pc.ec,xc={"Failed to fetch":Sc.noNetwork,"Timed out":Sc.timedOut,"Redirect to login":Sc.redirectToLogin,"Missing user":Sc.missingUser,400:Sc.suspended,"400x":Sc.missingPost,403:Sc.forbidden,404:Sc.notFound,429:Sc.tooManyRequests,500:Sc.serverIsDown,502:Sc.badGateway,503:Sc.serviceUnavailable,560:Sc.serviceDown};Pc.Response=class e{constructor(e,t,n,r){this.result=e,this.error=t?{code:t,message:n,body:r}:null}isSuccess(){return!this.error}reportError(e,t){return this.error.code===Sc.other&&Dc.controller.sendError(`ig-api.${e}: unknown error`,"error",{details:t},{actor:"ig-api"}),this}static ofResult(t){return new e(t)}static ofNetworkError(t){t&&t.message&&"400"===t.message&&(t&&"missing media"===t.body||t&&"Sorry, this photo has been deleted"===t.body)&&(t.message="400x");const n=t&&t.message&&xc[t.message]||Sc.other,r=t&&t.message||null,o=t&&t.body||null;return new e(null,n,r,o)}};const{$igApi:Ic,$bus:Ec,$utils:Cc,$fetcher:Tc,$constants:kc}=app,Ac={headers:{"x-ig-app-id":"1217981644879628"}};async function Fc(){try{return await async function(){Tc.ignoreCache();const e=(await Tc.fetchText("https://instagram.com")).split("\n").find((e=>e.includes("is_professional_account")));if(!e)return null;const t=e.split("XIGSharedData")[1].replaceAll('\\"','"').replaceAll("\\/","/").replaceAll("\\u","u"),n=(e,n="string")=>{try{let r;return"string"===n?r=t.split(`"${e}":"`)[1].split('"')[0]:"bool"===n&&(r=t.split(`"${e}":`)[1].split(",")[0],r="false"!==r),r}catch(t){return console.error(`Failed to extract "${e}"`,t),null}};let r=n("profile_pic_url");r&&(r=r.replaceAll("\\u0026","&"));const o=n("appScopedIdentity")||n("id")||n("viewerId");if(!o)throw new Error("failed to fetch viewer id");return{userId:o,username:n("username"),fullName:n("full_name"),email:null,avatarUrl:r,isProfessionalAccount:n("is_professional_account","bool")}}()}catch(e){console.error("Failed to fetch viewer info (v2)",e)}try{return await async function(){const e="https://i.instagram.com/api/v1/accounts/edit/web_form_data/";Tc.ignoreCache();const t=await Tc.fetchText(e,Ac),n=Cc.safeJsonParse(t);if(!n)return null;const r=n.form_data.username,o=await async function(e){var t;const n=Cc.createUrl("https://i.instagram.com/api/v1/users/web_profile_info/",{username:e}),r=await Tc.fetchJson(n,Ac);return(null==r||null===(t=r.data)||void 0===t?void 0:t.user)||null}(r);return o?{userId:o.id,username:r,fullName:o.full_name,email:n.form_data.email,avatarUrl:o.profile_pic_url_hd,isProfessionalAccount:o.is_professional_account||o.is_business_account}:null}()}catch(e){console.error("Failed to fetch viewer info (v1)",e)}throw new Error("Failed to fetch viewer info")}async function Oc(){return Tc.fetchJson(kc.ig.loginActivity.url,Ac)}async function $c(e,{incognito:t=!1}={}){const n={name:e,isBanned:null,isFlagged:null,avgLikes:null,avgComments:null,avgPosts:null,totalPosts:null,relevantTags:[]};let r,o=!1;try{const n=kc.ig.hashtag.url(e,{json:!0}),o=t?"omit":"include";Tc.ignoreCache(),r=await Tc.fetchText(n,{credentials:o,...Ac})}catch(e){if("404"!==e.message)throw e;o=!0}if(function(e){if(e&&e.includes(kc.ig.challenge)){const e=new Error;throw e.message="400",e.body="Challenge",e}}(r),function(e){if(e&&e.includes(kc.ig.login.link)){const e=new Error;throw e.message="Redirect to login",e.body="Redirect to login",e}}(r),o)return n.isBanned=!0,n.isFlagged=!1,n;const i=JSON.parse(r);if(!("graphql"in i)){const t=i.data,r=t.top.sections.map((e=>e.layout_content.medias)).flat().filter(Boolean).map((e=>e.media)),o=t.recent.sections.map((e=>e.layout_content.medias)).flat().filter(Boolean).map((e=>e.media));let s=0,a=0;{const e=r.map((e=>{const t=1e3*e.taken_at,n=e.like_count,r=e.comment_count;return{likes:Mc(n,t),comments:Mc(r,t)}})).sort(((e,t)=>Cc.calcEngagement(e.likes,t.comments)-Cc.calcEngagement(t.likes,t.comments))).slice(Math.floor(r.length/2-Math.min(5,r.length/3/2)),Math.floor(r.length/2+Math.min(5,r.length/3/2)));if(e.length>0){for(const t of e)s+=t.likes,a+=t.comments;s=Math.round(s/e.length),a=Math.round(a/e.length)}}let l=0;{const e=new Set,t=o.map((e=>({ts:1e3*e.taken_at,ownerId:e.user.pk}))).sort(((e,t)=>t.ts-e.ts)).slice(0,15).filter((t=>{const n=t.ownerId;return!e.has(n)&&(e.add(n),!0)})).map((e=>e.ts));if(t.length>2){const e=t[0]-t[t.length-1],n=Math.max(100,e/t.length);l=Math.round(Cc.time.DAY/n)}}let u=[];{const t={},n=[{posts:r,relevance:2},{posts:o,relevance:1}];for(const e of n){const n=Cc.getHashtagRegex(),r=e.posts.map((e=>{var t;return(null===(t=e.caption)||void 0===t?void 0:t.text)||""})).map((e=>e.match(n)||[])).flat().map((e=>e.replace("#","")));for(const n of r)t[n]=(t[n]||0)+e.relevance}for(const n in t){if(n===e)continue;const r=t[n];u.push({tag:n,relevance:r})}u=u.sort(((e,t)=>t.relevance-e.relevance)).map((e=>e.tag))}n.isBanned=!1,n.isFlagged=!t.allow_following&&!!t.recent.warning_message,n.totalPosts=t.media_count,n.avgLikes=s,n.avgComments=a,n.avgPosts=l,n.relevantTags=u}else{const t=i.graphql.hashtag,r=t.edge_hashtag_to_top_posts.edges,o=t.edge_hashtag_to_media.edges;let s,a=0,l=0;{const e=r.map((e=>{const t=e.node,n=1e3*t.taken_at_timestamp,r=t.edge_liked_by.count,o=t.edge_media_to_comment.count;return{likes:Mc(r,n),comments:Mc(o,n)}})).sort(((e,t)=>Cc.calcEngagement(e.likes,t.comments)-Cc.calcEngagement(t.likes,t.comments))).slice(Math.floor(r.length/2-Math.min(5,r.length/3/2)),Math.floor(r.length/2+Math.min(5,r.length/3/2)));if(e.length>0){for(const t of e)a+=t.likes,l+=t.comments;a=Math.round(a/e.length),l=Math.round(l/e.length)}}{const e=new Set,t=o.map((e=>({ts:1e3*e.node.taken_at_timestamp,ownerId:e.node.owner.id}))).sort(((e,t)=>t.ts-e.ts)).slice(0,30).filter((t=>{const n=t.ownerId;return!e.has(n)&&(e.add(n),!0)})).map((e=>e.ts)),n=t[0]-t[t.length-1],r=Math.max(100,n/t.length);s=Math.round(Cc.time.DAY/r)}let u=[];{const t={},n=[{edges:r,relevance:2},{edges:o,relevance:1}];for(const e of n){const n=Cc.getHashtagRegex(),r=e.edges.map((e=>{var t,n,r,o,i;return(null===(t=e.node)||void 0===t||null===(n=t.edge_media_to_caption)||void 0===n||null===(r=n.edges)||void 0===r||null===(o=r[0])||void 0===o||null===(i=o.node)||void 0===i?void 0:i.text)||""})).map((e=>e.match(n)||[])).flat().map((e=>e.replace("#","")));for(const n of r)t[n]=(t[n]||0)+e.relevance}for(const n in t){if(n===e)continue;const r=t[n];u.push({tag:n,relevance:r})}u=u.sort(((e,t)=>t.relevance-e.relevance)).map((e=>e.tag))}n.isBanned=!1,n.isFlagged=t.is_top_media_only&&!t.allow_following,n.totalPosts=t.edge_hashtag_to_media.count,n.avgLikes=a,n.avgComments=l,n.avgPosts=s,n.relevantTags=u}return n}async function jc(e,t=10,n=[],r=null){const o=Cc.createUrl(`https://i.instagram.com/api/v1/feed/user/${e}/username/`,{count:33,...r&&{max_id:r}}),i=await Tc.fetchJson(o,Ac);return n.push(...i.items),n.length<t&&i.more_available&&await jc(e,t,n,i.next_max_id),(n=n.slice(0,t)).map((e=>{var t,n,r,o,i,s,a,l,u,c;const d=(null===(t=e.carousel_media)||void 0===t||null===(n=t[0].image_versions2)||void 0===n?void 0:n.candidates)||(null===(r=e.image_versions2)||void 0===r?void 0:r.candidates)||[];return{id:String(e.pk),code:e.code,stats:{likes:Number(e.like_count)||0,comments:Number(e.comment_count)||0},on:1e3*e.taken_at,caption:(null===(o=e.caption)||void 0===o?void 0:o.text)||"",owner:String((null===(i=e.user)||void 0===i?void 0:i.pk)||""),ownerName:(null===(s=e.user)||void 0===s?void 0:s.username)||"",type:{1:"photo",2:"video",8:"carousel"}[e.media_type]||"photo",isLiked:e.has_liked,isVideo:"view_count"in e,imgx:(null===(a=d[0])||void 0===a?void 0:a.url)||null,img:(null===(l=d.at(-1))||void 0===l?void 0:l.url)||null,imgMedium:(null===(u=d.find((e=>320===e.width)))||void 0===u?void 0:u.url)||(null===(c=d[0])||void 0===c?void 0:c.url)||null}}))}async function Rc(e){const t=Cc.createUrl(`${kc.ig.base}web/search/topsearch/`,{context:"user",query:e});return(await Tc.fetchJson(t)).users.map((e=>({id:e.user.pk,username:e.user.username,fullName:e.user.full_name,avatar:e.user.profile_pic_url})))}function Mc(e,t){const n=Date.now();return e*(Math.log(.061*Cc.time.DAY)/Math.log(.061*(n-t)))}function Uc(e){return{userId:e.id,username:e.username,fullName:e.full_name,avatarUrl:e.profile_pic_url,bio:e.biography,postsCount:e.edge_owner_to_timeline_media.count,followersCount:e.edge_followed_by.count,followingsCount:e.edge_follow.count,isFresh:e.is_joined_recently,isPrivate:e.is_private,isVerified:e.is_verified,isBusiness:e.is_business_account,businessCategory:e.category_name,isFollowingViewer:e.follows_viewer,isFollowedByViewer:e.followed_by_viewer,hasAvatar:e.profile_pic_url.includes("150x150"),hasHighlights:e.highlight_reel_count>0,hasIgtv:e.edge_felix_video_timeline.count>0,lastPosts:e.edge_owner_to_timeline_media.edges.map((e=>({ts:1e3*e.node.taken_at_timestamp})))}}function Bc(e,t){const n=async function(...n){try{const t=await e(...n);return Ic.Response.ofResult(t)}catch(e){return Ic.Response.ofNetworkError(e).reportError(t,e)}};return Ec.on(`ig-api.${t}`,n),n}Ic.api={init:function(){this.fetchViewerInfo=Bc(Fc,"fetch-viewer-info"),this.fetchLoginActivity=Bc(Oc,"fetch-login-activity"),this.fetchTag=Bc($c,"fetch-tag"),this.fetchUserPosts=Bc(jc,"fetch-user-posts"),this.searchProfiles=Bc(Rc,"search-profiles"),this.normalizePostStat24h=Mc,this.createUserObject=Uc}};const{$igApi:Lc,$utils:Nc,$bus:Vc,$netRules:qc}=app;Lc.Publisher=class{constructor(e=null){this._debug=!0,this._igAppId="1217981644879628",this._id=this._generateId(),this._cookies=e,this._netRuleIds=[]}async setupNetRules(){if(!this._cookies)return;const e=Object.entries(this._cookies).map((([e,t])=>`${e}=${t}`)).join("; ");this._netRuleIds=await qc.add({url:`https://*.instagram.com/*_pid_=${this._id}*`,req:{cookie:e}})}async cleanupNetRules(){await qc.remove(this._netRuleIds)}async postPhoto(e,{caption:t="",mentions:n=null,location:r=null}){const o=this._generateUploadName();this._log("â�³ upload photo..."),await this._uploadPhoto(o,e),this._log("â�³ publish photo..."),await this._configure("/api/v1/media/configure/",{caption:t,source_type:"library",upload_id:this._getUploadId(o),...n&&{usertags:JSON.stringify(n)},...r&&{location:JSON.stringify(r),geotag_enabled:!0}}),this._log("âœ… success")}async postVideo(e,t,{caption:n="",mentions:r=null,location:o=null}){const i=this._generateUploadName();this._log("â�³ upload video..."),await this._uploadVideo(i,e,{type:"post"}),this._log("â�³ upload video cover..."),await this._uploadPhoto(i,t,{isVideoCover:!0}),this._log("â�³ publish video..."),await this._configure("/igtv/configure_to_igtv/",{caption:n,source_type:"library",is_unified_video:1,igtv_share_preview_to_feed:1,upload_id:this._getUploadId(i),...r&&{usertags:JSON.stringify(r)},...o&&{location:JSON.stringify(o),geotag_enabled:!0}}),this._log("âœ… success")}async postReel(e,t,{caption:n="",mentions:r=null,location:o=null,shareToFeed:i=!1}){const s=this._generateUploadName();this._log("â�³ upload reel..."),await this._uploadVideo(s,e,{type:"reel"}),this._log("â�³ upload reel cover..."),await this._uploadPhoto(s,t,{isVideoCover:!0}),this._log("â�³ publish reel..."),await this._configure("/api/v1/media/configure_to_clips/",{caption:n,is_unified_video:1,disable_comments:0,source_type:"library",disable_oa_reuse:!1,video_subtitles_enabled:0,igtv_share_preview_to_feed:1,like_and_view_counts_disabled:0,clips_share_preview_to_feed:i?1:0,upload_id:this._getUploadId(s),...r&&{usertags:JSON.stringify(r)},...o&&{location:JSON.stringify(o),geotag_enabled:!0}}),this._log("âœ… success")}async postStoryPhoto(e,{mentions:t=null}){const n=this._generateUploadName("story");this._log("â�³ upload story photo..."),await this._uploadPhoto(n,e),this._log("â�³ publish story photo..."),await this._configure("/api/v1/web/create/configure_to_story/",{upload_id:this._getUploadId(n),...t&&{reel_mentions:JSON.stringify(t)}}),this._log("âœ… success")}async postStoryVideo(e,{mentions:t=null}){const n=this._generateUploadName("story");this._log("â�³ upload story video..."),await this._uploadVideo(n,e,{type:"story"}),this._log("â�³ upload story video cover...");const r=await Nc.extractFrame(e,0);await this._uploadPhoto(n,r,{isVideoCover:!0}),this._log("â�³ publish story video..."),await this._configure("/api/v1/web/create/configure_to_story/",{upload_id:this._getUploadId(n),...t&&{reel_mentions:JSON.stringify(t)}}),this._log("âœ… success")}async postCarousel(e,{caption:t=""}={}){const n=[];for(let t of e){const r=`carousel [${n.length+1}/${e.length}]:`,o=this._generateUploadName(),i=this._getUploadId(o);n.push(i);let s=null;t instanceof Blob||(s=t.coverBlob,t=t.blob),Nc.file.isVideo(t)?(this._log(`â�³ ${r} upload video...`),await this._uploadVideo(o,t,{type:"carousel"}),this._log(`â�³ ${r} upload video cover...`),s||(s=await Nc.extractFrame(t,.5)),await this._uploadPhoto(o,s,{isVideoCover:!0})):(this._log(`â�³ ${r} upload photo...`),await this._uploadPhoto(o,t))}this._log("â�³ publish carousel..."),await this._configureJson("/api/v1/media/configure_sidecar/",{caption:t,source_type:"library",disable_comments:0,like_and_view_counts_disabled:0,client_sidecar_id:this._generateUploadId(),children_metadata:n.map((e=>({upload_id:e})))}),this._log("âœ… success")}async _uploadPhoto(e,t,{isVideoCover:n=!1,cookies:r}={}){const{width:o,height:i}=await Nc.loadImage(t);t=await this._toJpeg(t),await this._fetch({attempts:2,url:`https://i.instagram.com/rupload_igphoto/${e}`,opts:{method:"POST",body:t,headers:{accept:"*/*",offset:"0","x-entity-name":e,"x-entity-length":t.size,"x-ig-app-id":this._igAppId,"x-instagram-rupload-params":JSON.stringify({upload_id:this._getUploadId(e),media_type:n?2:1,upload_media_width:o,upload_media_height:i})}}})}async _uploadVideo(e,t,{type:n}){await this._fetch({url:`https://i.instagram.com/rupload_igvideo/${e}`,opts:{method:"POST",body:t,headers:{accept:"*/*",offset:"0","x-entity-name":e,"x-entity-length":t.size,"x-ig-app-id":this._igAppId,"x-instagram-rupload-params":JSON.stringify({is_sidecar:0,media_type:2,"client-passthrough":1,upload_id:this._getUploadId(e),..."post"===n&&{for_album:!1,is_igtv_video:!0,is_unified_video:1},..."reel"===n&&{for_album:!1,is_clips_video:1},..."carousel"===n&&{is_sidecar:"1",for_album:!1,is_unified_video:0,video_format:""},..."story"===n&&{for_album:!0,is_unified_video:0}})}}})}_generateUploadId(){return String(Date.now())}_generateUploadName(e="fb_uploader"){return`${e}_${this._generateUploadId()}`}_getUploadId(e){return e.split("_").pop()}_log(...e){this._debug&&console.log("%c[$igApi]","color: #bb57d1",...e)}async _fetchCsrfToken(){if(this._cookies&&this._cookies.csrftoken)return this._cookies.csrftoken;return(await this._fetch({url:"https://www.instagram.com/"})).replaceAll("\\","").split("csrf_token").slice(1).find((e=>!e.includes("biography"))).split('"')[2]}async _configure(e,t,n=!1){let r,o;n?(r=JSON.stringify(t),o="application/json; charset=utf-8"):(r=new URLSearchParams(t).toString(),o="application/x-www-form-urlencoded"),await this._fetch({attempts:5,url:`https://www.instagram.com${e}`,opts:{method:"POST",credentials:"include",body:r,headers:{accept:"*/*","content-type":o,"x-csrftoken":await this._fetchCsrfToken(),"x-ig-app-id":this._igAppId}}})}async _configureJson(e,t){await this._configure(e,t,!0)}async _fetch({url:e,opts:t={},attempts:n=1,checkResponse:r}){r||(r=e=>200===e.status),this._cookies?((e=new URL(e)).searchParams.set("_pid_",this._id),e=e.toString()):t.credentials="include";const o=async(o="Failed to fetch")=>{if((n-=1)<=0)throw new Error(o);await Nc.sleep(3*Nc.time.SECOND);return await this._fetch({url:e,opts:t,attempts:n,checkResponse:r})};let i,s;try{i=await fetch(e,t)}catch(n){return console.error("Failed to fetch",{url:e,opts:t,e:n}),o(n.message)}try{s=await i.text()}catch(n){return console.error("Failed to call res.text()",{url:e,opts:t,e:n}),o(`Failed to call res.text(): ${n.message}`)}return r(i)?s:(console.error("Invalid response",{url:e,opts:t,text:s}),o(`Response: ${s}`))}async _toJpeg(e){return await Vc.send("igApi.toJpeg",e)}_generateId(){return`${Date.now()}-${Math.random().toString(36).slice(2)}`}};const{$abTesting:Gc,$utils:Hc}=app;Gc.controller={init:async function(){await Hc.ls.remove("ab-testing-hash")}};const{$later:Wc,$utils:zc}=app;Wc.config={mimeTypes:["image/jpeg","image/png","video/quicktime","video/mp4","video/webm","text/csv"],maxFileSize:524288e3,maxCarouselFiles:10,minVideoDurationSec:1,maxVideoDurationSec:900.9,maxCarouselVideoDurationSec:60.9,maxStoryDurationSec:300.9,minVideoRatio:.12,maxVideoRatio:1.91,minImageRatio:.6,maxImageRatio:1.91,maxImageWidth:4e3,maxImageHeight:4e3,maxCaptionLength:2200,minTimeBetweenPublishing:10*zc.time.SECOND,minTimeFromNow:5*zc.time.MINUTE};const{$later:Jc,$bus:Yc,$files:Kc,$utils:Xc}=app;Jc.cleanupController={init:function(){this._lastIdbCleanupAt=0,this._dropOldIgPreviews(),Yc.on("popup.start",(()=>this._cleanupIdb())),Yc.on("later.dropOldIgPreviews",this._dropOldIgPreviews,this)},_cleanupIdb:async function(){const e=Date.now();if(e-this._lastIdbCleanupAt<5*Xc.time.MINUTE)return;this._lastIdbCleanupAt=e;const t=await Kc.controller.getFileIds("later"),n=Jc.proxy.getAllPosts();for(const e of t){!!n.find((t=>t.mediaList.some((t=>t.fileId===e||t.coverId===e||t.previewId===e))))||await Kc.controller.remove(e)}},_dropOldIgPreviews:async function(){const e=Jc.proxy.getAllStates().map((e=>e.later.ig.posts.map((e=>e.previewId)))).flat(),t=await Kc.controller.getFileIds("later:ig");for(const n of t){e.includes(n)||await Kc.controller.remove(n)}}};const{$later:Qc,$store:Zc,$bus:ed,$fetcher:td}=app;Qc.controller={init:function(){this._cleanupState(),Qc.scheduler.init(),Qc.cleanupController.init(),ed.on("later.ignoreFetchCache",this._ignoreFetchCache.bind(this))},_cleanupState:function(){Zc.transaction((e=>{e.later.posts.filter((e=>"posting"===e.status)).forEach((e=>e.status="scheduled"))}))},_ignoreFetchCache:function(){td.ignoreCache()}};const{$later:nd,$store:rd,$files:od,$utils:id,$auth:sd,$bus:ad,$analytics:ld,$igApi:ud,$chromeStarter:cd,$igFrame:dd}=app;nd.scheduler={init:function(){this._timer=null,this._publishing=!1,this._lastPublishedAt=0,this._publisher=null,this._setup()},_setup:function(){this._schedule(),rd.model.observe((()=>nd.proxy.getConnectedUsersPosts().map((e=>`${e.id}-${e.date}-${e.status}`)).join(":")),(()=>this._schedule()),!1),rd.model.observe((e=>e.later.selectedPostId),(()=>this._schedule()),!1)},_schedule:function(){if(this._publishing)return;this._timer&&this._timer.clear();const e=rd.state,t=nd.proxy.getConnectedUsersPosts().filter((e=>"scheduled"===e.status)).sort(((e,t)=>e.date-t.date)).at(0);if(!t)return void nd.log("no posts to publish");const n=nd.proxy.getPostOwnerState(e,t.id),r=(null==n?void 0:n.auth.username)||null,o={post:t,owner:r};let i;const s=Date.now();if(i=0===e.settings.laterAutoRetry?t.date<s-5*id.time.MINUTE:-1!==e.settings.laterAutoRetry&&t.date<s-e.settings.laterAutoRetry,i)return nd.log("too old to publish",o),void nd.proxy.updatePost(t.id,(e=>{e.status="failed",e.error={message:"Chrome was offline at the given time"}}));if(t.date>s){const e=new Date(t.date).toString().split(" ").slice(1,4).join(" ");return nd.log(`scheduled for ${e}`,o),void(this._timer=id.setTimer((()=>this._schedule()),t.date-s))}(async()=>{nd.log("publish",o),this._publishing=!0,cd.controller.online?await this._publishSafe(t):await cd.controller.waitForOnline(),this._publishing=!1,this._schedule()})()},_publishSafe:async function(e){const t=nd.proxy.getPostPublishTypeForAnalytics(e);sd.controller.toggleSessionWatcher(!1);try{await this._publish(e),ld.controller.sendEvent("user","later:publish-success",t)}catch(r){var n;nd.error(r),this._publisher&&await this._publisher.cleanupNetRules();const o=(null===(n=r.message)||void 0===n?void 0:n.slice(0,100))||"unknown";ld.controller.sendEvent("user","later:publish-error",t),ld.controller.sendEvent("user","later:publish-error-message",o),nd.proxy.updatePost(e.id,(e=>{e.status="failed",e.error={message:"Error happened during posting",details:r.message?r.message.slice(0,300):null}}))}sd.controller.toggleSessionWatcher(!0),this._publisher=null,this._lastPublishedAt=Date.now()},_publish:async function(e){const t=()=>{const t=rd.state;return nd.proxy.getPostOwnerState(t,e.id)};nd.proxy.updatePost(e.id,(e=>{e.status="posting",e.error=null}));const n=rd.state.auth.userId,r=t().auth.userId;n===r&&await sd.controller.actualizeCookies();const o=Date.now()-this._lastPublishedAt,i=nd.config.minTimeBetweenPublishing;o<i&&await id.sleep(i-o);const s=t().auth.cookies.reduce(((e,t)=>(e[t.name]=t.value,e)),{});if(cd.controller.offline)return void nd.proxy.updatePost(e.id,(e=>e.status="scheduled"));const a=(e.caption||"").slice(0,nd.config.maxCaptionLength),l=new ud.Publisher(s);if(this._publisher=l,"post"===e.type||"reel"===e.type){const t=dd.validateCaption(a);if(t)return void nd.proxy.updatePost(e.id,(e=>{e.status="failed",e.error={message:"Error happened during posting",details:t}}))}for(const t of e.mediaList){const n=nd.proxy.getMediaError(e,t);if(n)return void nd.proxy.updatePost(e.id,(e=>{e.status="failed",e.error={message:"Error happened during posting",details:n.message}}))}if(await l.setupNetRules(),"post"===e.type)if(e.mediaList.length>1){const t=await this._prepareCarouselFiles(e);await l.postCarousel(t,{caption:a})}else if(e.mediaList[0].isVideo){const t=await od.controller.read(e.mediaList[0].fileId),n=await od.controller.read(e.mediaList[0].coverId);await l.postVideo(t,n,{caption:a,location:e.location,mentions:e.mentions})}else{const t=await od.controller.read(e.mediaList[0].fileId);await l.postPhoto(t,{caption:a,location:e.location,mentions:e.mentions})}else if("reel"===e.type)for(const t of e.mediaList){const n=t===e.mediaList[0],r=await od.controller.read(t.fileId),o=await od.controller.read(t.coverId);await l.postReel(r,o,{caption:n?a:"",location:e.location,mentions:n?e.mentions:[],shareToFeed:!!e.shareToFeed}),await id.sleep(nd.config.minTimeBetweenPublishing)}else if("story"===e.type)for(const t of e.mediaList){const n=t===e.mediaList[0],r=await od.controller.read(t.fileId),o={mentions:n?e.mentions:[]};t.isVideo?await l.postStoryVideo(r,o):await l.postStoryPhoto(r,o),await id.sleep(nd.config.minTimeBetweenPublishing)}e.instant||(rd.transaction((e=>e.billing.trial.later+=1)),rd.proxy.hasProPaid()&&ld.controller.sendEvent("user","pro-paid-usage:later")),nd.proxy.updatePost(e.id,(e=>{e.status="posted",e.date=Date.now()})),setTimeout((()=>{ad.send("later.updateIgPosts",r,!0)})),await l.cleanupNetRules()},_prepareCarouselFiles:async function(e){const t=[];for(const n of e.mediaList){const e=await od.controller.read(n.fileId),r=n.coverId&&await od.controller.read(n.coverId);t.push({file:e,cover:r,isVideo:n.isVideo})}let n,r;{const e=t[0];if(e.isVideo){n=(await id.loadVideoMetadata(e.file)).ratio}else{n=(await id.loadImage(e.file)).ratio}}{const e=nd.config.minImageRatio,t=nd.config.maxImageRatio;r=Math.max(e,Math.min(n,t))}for(const e of t){e===t[0]&&n===r||(e.isVideo||(e.file=await id.scaler.scaleToFitRatio(e.file,r)))}return t.filter((e=>{const t=nd.config.maxCarouselVideoDurationSec;return!(e.isVideo&&e.duration>t)})).map((e=>({blob:e.file,...e.cover&&{coverBlob:e.cover}})))}};const{$later:pd,$store:hd,$utils:fd,$dateFns:gd}=app;pd.proxy={getAllStates:function(e=hd.state){return[e,...Object.values(e.userStates)]},getAllConnectedStates:function(e=hd.state){return this.getAllStates(e).filter((t=>{const n=t.auth.userId;return e.multiaccount.userIds.includes(n)}))},getSelectedUserState:function(e=hd.state){return this.getUserState(e,e.later.selectedUserId)},getUserState:function(e,t){return this.getAllStates(e).find((e=>e.auth.userId===t))||null},getPostOwnerState:function(e,t){const n=this.getAllStates(e).find((e=>e.later.posts.some((e=>e.id===t))));return n||null},getSelectedUserPosts:function(){const e=this.getSelectedUserState();if(!e)return[];const t=structuredClone(e.later.posts);this._sortPosts(t);const n=hd.state.later.dnd;return this._applyDndToPosts(n,t),t},getAllPosts:function(e=hd.state){return this.getAllStates(e).map((e=>e.later.posts)).flat()},getConnectedUsersPosts:function(){return this.getAllConnectedStates().map((e=>e.later.posts)).flat()},getSelectedPost:function(){const e=hd.state;return this.getAllPosts().find((t=>t.id===e.later.selectedPostId))},getPost:function(e){const t=this.getAllConnectedStates();for(const n of t){const t=n.later.posts.find((t=>t.id===e));if(t)return t}return null},getPostPublishTypeForAnalytics:function(e){return"post"===e.type?e.mediaList.length>1?"carousel":e.mediaList[0].isVideo?"video":"photo":"story"===e.type?e.mediaList.length>1?"story-series":e.mediaList[0].isVideo?"story-video":"story-photo":"reel"===e.type?e.mediaList.length>1?"reel-series":"reel":void 0},updatePost:function(e,t=(()=>{})){hd.transaction((n=>{const r=(n=this.getPostOwnerState(n,e)).later.posts.find((t=>t.id===e));r&&t(r)}))},deletePost:function(e){hd.transaction((t=>{const n=(t=this.getPostOwnerState(t,e)).later.posts.findIndex((t=>t.id===e));t.later.posts.splice(n,1)}))},isPostEditable:function(e){return"posted"!==e.status&&"posting"!==e.status},getMediaError:function(e,t){return"post"===e.type&&e.mediaList.length>1&&t.isVideo&&t.duration>pd.config.maxCarouselVideoDurationSec?{message:"Instagram does not support videos longer than 1 minute for carousels."}:"story"===e.type&&t.isVideo&&t.duration>pd.config.maxStoryDurationSec?{message:"Instagram does not support videos longer than 5 minutes for stories."}:"reel"!==e.type||t.isVideo?null:{message:"Instagram does not support photos as reels."}},updateSelectedUserState:function(e=(()=>{})){hd.transaction((t=>{t=this.getSelectedUserState(t),e(t)}))},updateUserState:function(e,t=(()=>{})){hd.transaction((n=>{n=pd.proxy.getUserState(n,e),t(n)}))},applyDnd:function(){hd.transaction((e=>{const t=e.later.dnd,n=this.getSelectedUserState(e);this._applyDndToPosts(t,n.later.posts),e.later.selectedPostId&&(e.later.selectedPostId=t.dragPostId===e.later.selectedPostId?t.dragOverPostId:t.dragOverPostId===e.later.selectedPostId?t.dragPostId:e.later.selectedPostId),t.dragPostId=null,t.dragOverPostId=null,t.dragOverDay=null,t.dragOverTime=null}))},_sortPosts:function(e){e.sort(((t,n)=>{if("draft"!==t.status&&"draft"===n.status)return 1;if("draft"===t.status&&"draft"!==n.status)return-1;if(t.date&&n.date)return n.date-t.date;if(t.date)return 1;if(n.date)return-1;const r=e.indexOf(t);return e.indexOf(n)-r}))},_applyDndToPosts:function(e,t){if(e.dragPostId)if(e.dragOverDay&&e.dragOverTime){const n=t.find((t=>t.id===e.dragPostId));n.date=e.dragOverDay+e.dragOverTime,n.status="scheduled"}else if(e.dragOverDay){const n=e.dragOverDay,r=t.find((t=>t.id===e.dragPostId)),o=Date.now()+fd.time.HOUR,i=gd.endOfDay(n).getTime();if(o>i)return;let s;if(r.date)s=r.date-gd.startOfDay(r.date);else{const e=t.findLast((e=>gd.isSameDay(e.date,n)));s=e?e.date-n+fd.time.HOUR:12*fd.time.HOUR}let a=n+s;a<o&&(a=o),a>i&&(a=i),r.date=a,r.status="scheduled"}else if(e.dragOverPostId){const n=t.find((t=>t.id===e.dragPostId)),r=t.find((t=>t.id===e.dragOverPostId));if(!n||!r)return;const o={...r,id:n.id,date:n.date,status:n.status},i={...n,id:r.id,date:r.date,status:r.status};Object.assign(n,o),Object.assign(r,i)}}};const{$analytics:md,$store:vd,$bus:yd,$idb:bd,$iframeBus:_d,$env:wd}=app;md.controller={init:function(){return wd.is.pp?(this._insertAnalyticsScript(),this._initIframeMessage(),this._sendBgEvents()):wd.is.bg&&this._initChromeMessage(),this},_insertAnalyticsScript:function(){globalThis.ga=(...e)=>{(globalThis.ga.q=globalThis.ga.q||[]).push(e)};const e=document.createElement("script");e.src="/js/analytics.js",document.body.appendChild(e);const t="ga:clientId";globalThis.ga("create","UA-146823118-1",{storage:"none",clientId:localStorage.getItem(t)}),globalThis.ga((function(e){localStorage.setItem(t,e.get("clientId"))})),globalThis.ga("set","checkProtocolTask",(()=>{})),globalThis.ga("require","displayfeatures")},_initIframeMessage:function(){_d.on("ga.send-event",((...e)=>{this.sendEvent(...e)}))},_initChromeMessage:function(){yd.on("ga.send-event",((...e)=>{this.sendEvent(...e)}))},_sendBgEvents:async function(){const e=await bd.get("ga.bgEvents")||[];await bd.set("ga.bgEvents",[]);for(const t of e)this._ga(...t)},sendPageview:function(){if(!this._enabled())return this;const e=wd.is.bg?"background":document.location.pathname;return this._ga("send","pageview",e),this},sendInstall:function(){if(!vd.state.installedEventSent){const e=chrome.runtime.getManifest().version,t="installed:"+(globalThis.electron?"electron":"chrome");this.sendEvent("user",t,e),vd.transaction((e=>{e.installedEventSent=!0}))}return this},sendEvent:function(e,t,n,r,o={nonInteraction:1}){if(!e)throw new md.Error("category is required");if(!t)throw new md.Error("action is required");if(r&&!Number.isInteger(r))throw new md.Error("value must be an integer");return this._enabled()?(this._ga("send","event",e,t,n||null,r||null,o||null),this):(md.log(...arguments),this)},_enabled:function(){return!wd.is.development},_ga:async function(...e){if(wd.is.bg){const t=await bd.get("ga.bgEvents")||[];t.push(e),await bd.set("ga.bgEvents",t)}else{if(!globalThis.ga)return;globalThis.ga(...e)}}};const{$cleanup:Pd,$store:Dd,$bus:Sd,$coverAssist:xd}=app;function Id(e){Dd.transaction((t=>{t.cleanupId=e,t.sidebar.selectedTabId=null,t.sidebar.isOpen=!1,t.dm.ghostModeFailed=!1,t.reels.creating=!1,t.igView.creationCardShown=!1,t.igView.fullscreenWidth=460,t.billing.purchasingPlan=null,t.billing.snapshot.loading=!1,t.billing.snapshot.accountScreen=null,t.tagAssist.shown=!1,t.tagAssist.query="",t.tagAssist.searching=!1,t.tagAssist.errorCode=null,t.tagAssist.selectedTabId="search",t.tagAssist.selectedGroupId="medium",t.tagAssist.igSelectedTags=[],t.tagAssist.fcsSelectedTags=[],t.tagAssist.sidebarSelectedTags=[],t.tagAssist.sidebarSelectedTagsAsText="",t.tagAssist.ladderEngagementSort=null,t.tagAssist.summaryEngagementSort="descending",t.tagAssist.ladderPostCountSort=null,t.tagAssist.summaryPostCountSort=null,t.tagAssist.ladder=null,t.tagAssist.ladderLoadingTags=[],t.tagAssist.newCollection.name="",t.tagAssist.newCollection.text="",t.tagAssist.newCollection.showForm=!1,t.tagAssist.collectionsLoadingTags=[];for(const e of t.tagAssist.collections)e.editing=!1,e.editName="",e.editText="";const n=t.tagAssist.accountStats[t.auth.userId]||null,r=(null==n?void 0:n.mostUsedTags)||[];r.length>0&&(t.tagAssist.searching=!0,t.tagAssist.query=r.slice(0,2).map((e=>`#${e}`)).join(" ")),Object.assign(t.coverAssist,xd.defaultState),t.musicAssist.shown=!1,t.storyAssist.shown=!1,t.storyAssist.isVideo=!1,t.storyAssist.coverUrl=null,t.storyAssist.showUpsellOverlay=!1,t.storyAssist.mentions.query="",t.storyAssist.mentions.foundUsers=[],t.storyAssist.mentions.selectedUsers=[],t.later.showUpsell=!1,t.later.showBodyPanel=!1,t.later.showAssistPanel=!1,t.later.selectedUserId=t.auth.userId,t.later.selectedPostId=null,t.later.selectedPillId=null,t.later.selectedIgDate=null,t.later.errors=[],t.later.processing=!1,t.later.calendar.periodStart=Date.now(),t.later.ig.loading=!1,t.later.dnd.dragPostId=null,t.later.dnd.dragOverPostId=null,t.later.dnd.dragOverDay=null,t.later.dnd.dragOverTime=null,t.ghostStoryView.showUpsellOverlay=!1}))}Pd.controller={init:function(){Sd.on("cleanup.clean-up-state",(()=>{const e=Date.now();return Id(e),e}))},cleanUpState:Id};const{$fusion:Ed,$bus:Cd,$utils:Td,$env:kd,$fetcher:Ad,$reset:Fd}=app;let Od,$d;async function jd(){await Td.ls.remove("fusion.last-check-on")}async function Rd(){const e=15*Td.time.MINUTE,t=Number(await Td.ls.get("fusion.last-check-on"));if(t&&Date.now()<t+e)return;await Td.ls.set("fusion.last-check-on",Date.now());const n=await async function(){const e=await Td.ls.get("fusion.config");return e&&e.version>=Ed.config.version?e:Ed.config}(),r=`${kd.options.apiUrl}/fusion?version=${n.version}`;Ad.ignoreCache();const o=(await Ad.fetchText(r,{credentials:"omit"})).replace(/&amp;/g,"&").replace(/&#34;/g,'\\"').replace(/&#39/g,"'").replace(/&lt;/g,"<").replace(/&gt;/g,">"),i=JSON.parse(o);if(!i.config)return;const s=JSON.parse(JSON.stringify(n));$d=Ud(s,i.config);await Cd.send("startup.ppReady")?await Cd.send("fusion.new-version-available"):await Md()}async function Md(){$d&&(await Td.ls.set("fusion.config",$d),chrome.runtime.reload())}function Ud(e,t){for(const n in t)Td.is.object(e[n])&&Td.is.object(t[n])?Ud(e[n],t[n]):e[n]=t[n];return e}Ed.controller={init:function(){Cd.on("fusion.check-new-version",Rd),Cd.on("fusion.popup-tab-id",(e=>Od=e)),Fd.controller.onReset(jd),chrome.tabs.onRemoved.addListener((async e=>{e===Od&&$d&&await Md()})),async function(){Cd.on("fusion.update-now-click",(async()=>{await Td.ls.set("fusion.reload-popup-on-background-start",!0),await Md()})),await Td.ls.get("fusion.reload-popup-on-background-start")&&(await Td.ls.remove("fusion.reload-popup-on-background-start"),Cd.send("fusion.reload-popup"))}(),chrome.alarms.onAlarm.addListener((async e=>{"fusion.refresh-config"===e.name&&Rd()})),chrome.alarms.create("fusion.refresh-config",{when:Date.now(),periodInMinutes:1440})}};const{$fusion:Bd}=app;Bd.config={version:128,dmSelectors:{bottomToolbarHeightVar:"--revamp-nav-bottom-toolbar-height",menuPanel:['.IGDSBox[style*="height: 100%"] > div:first-child',"div:has(> .createKeyCommandWrapper > .PolarisNavigation)",'div:has(> [tabindex="-1"] > .PolarisNavigation)'],pageContent:['.IGDSBox[style*="height: 100%"] > div:last-child',".PolarisPageLayoutHandler"],header:[".IGDLeftRailContainer > div:first-child"],headerUserSelect:[".IGDLeftRailContainer > div:first-child > div:first-child"],headerWriteButton:[".IGDLeftRailContainer > div:first-child > div:last-child"],headerNoFoldersContainer:[".IGDLeftRailContainer > .IGDThreadListTitleLayout"],headerNoFoldersTab:[".IGDLeftRailContainer > .IGDThreadListTitleLayout > *"],folderTab:[".IGDProFolderMenu > .PressableText"],requestsTab:[".IGDProFolderMenu > .PressableText:nth-child(3)"],requestsTabContent:[".IGDProFolderMenu > .PressableText:nth-child(3) > span"],requestsTabText:[".IGDProFolderMenu > .PressableText:nth-child(3) > span > span"],requestsDescription:[".IGDMessageRequestLeftRailLayout:nth-child(2)"],chatItem:[".ReQLScrollAnchored > .Pressable",".IGDInboxThreadListContainer .ReQLScrollAnchored > .IGDVisibilityAware > .Pressable",".IGDInboxThreadListContainer .ReQLScrollAnchored > .WebPressable",".IGDInboxThreadListContainer .ReQLScrollAnchored .IGDVisibilityAware > .WebPressable"],chatItemContent:[".ReQLScrollAnchored > .Pressable > div",".IGDInboxThreadListContainer .ReQLScrollAnchored > .IGDVisibilityAware > .Pressable > div",".IGDInboxThreadListContainer .ReQLScrollAnchored > .WebPressable > div",".IGDInboxThreadListContainer .ReQLScrollAnchored .IGDVisibilityAware > .WebPressable > div"],chatItemSkeleton:[".IGDInboxLeftColumnPlaceholder > .IGDListCellPlaceholder",".ReQLScrollAnchored > .IGDListCellPlaceholder"],chatItemTitle:['.ReQLScrollAnchored > .Pressable div[style*="width: 244px"]','.ReQLScrollAnchored > .WebPressable div[style*="width: 244px"]'],chatHeader:[".IGDThreadDetail:has(.IGDSectionHeaderLayout) > div"],chatHeaderAvatar:[".IGDThreadDetail:has(.IGDSectionHeaderLayout) .IGDSAvatar"],chatHeaderAvatarContainer:[".IGDThreadDetail:has(.IGDSectionHeaderLayout) .IGDSingleAvatar"],chatHeaderTitle:[".IGDThreadDetail:has(.IGDSectionHeaderLayout) a > .IGDSBox",".IGDThreadDetail:has(.IGDSectionHeaderLayout) a:has(.BaseLineClamp) > div"],writeInput:[".MWPCometComposerInner > .CometLexicalContentEditable"],writeInputContainer:["div:has(> .MWPCometComposerInner)"],writePanel:[".MWV2FileDropzone > div:not([class]) > .IGDComposerView"],writePanelVoiceButton:['.IGDComposerView:has(> input) > div:has(path[d^="M19.5 10.671v"])'],mediaViewerVideo:[".IGDMediaViewer video"]},igSelectors:{general:{reactRoot:["#react-root",'[id^="mount"]'],root:["#react-root > section","#react-root > div > div > section","section.PolarisBaseShell","section.PolarisRefreshedBaseShell"],rootNewNavDesign:["section.PolarisRefreshedBaseShell"],content:["#react-root > section > *:nth-child(2)","main.PolarisShellContent","main.PolarisRefreshedShellContent"],contentSection:["main.PolarisShellContent > section","main.PolarisRefreshedShellContent > section"],header:["._9ezyW","header.PolarisGenericMobileHeader"],headerContent:[".b5itu","header.PolarisGenericMobileHeader ._ab16"],headerTitle:[".K3Sf1","h1.PolarisGenericMobileHeader"],footer:[".PolarisShellFooter"],main:[".uzKWK",".PolarisBaseShell main.PolarisShellContent._a996",".PolarisRefreshedBaseShell main"],pageLayoutNewNavDesign:[".PolarisPageLayoutHandler"],nextPageLoaderProfile:["._4emnV",".PolarisVirtualPostsGrid._aanh"],nextPageLoaderExplore:['html[data-page="exploreLandingPage"] .Id0Rh','html[data-page="exploreLandingPage"] .PolarisGenericVirtualFeed._aalg'],nextPageLoaderFeed:['html[data-page="feedPage"] .Id0Rh','html[data-page="feedPage"] .PolarisGenericVirtualFeed._aalg'],tabBar:[".KGiwt",".PolarisNavigation > ._abpb",'.PolarisNavigation[style*="transform"]',".xaeubzz"],tabBarWrap:[".ZoygQ",".IGDSBox > .PolarisNavigation",".createKeyCommandWrapper > .PolarisNavigation","div:not(.PolarisNavigation) > .PolarisNavigation"],tabBarContainer:[".IGDSBox > .PolarisNavigation > div",".createKeyCommandWrapper .PolarisNavigation[style]:has(> .PolarisNavigation)","div:has(> .createKeyCommandWrapper > .PolarisNavigation)","div:has(> div:not(.PolarisNavigation) > .PolarisNavigation)"],tabBarTopContainer:[".IGDSBox:has(> .createKeyCommandWrapper)"],tabBarInput:[".ZoygQ input",".PolarisNavigation input.PolarisImageFileForm"],tabBarButton:['.PolarisNavigation[style*="transform"] > div > div:not([class])',".PolarisNavigationIcons > div"],tabBarCreatePostIconOldNavDesign:[".PolarisMobileNavLoggedIn > svg"],tabBarAvatarContainer:[".PolarisMobileNavLoggedInButton span.PolarisUserAvatar"],storyTrayViewerAvatarContainer:[".PolarisStoryTray .PolarisStoryTray._aauk:first-child span.PolarisUserAvatar"],tabBarLink:[".PolarisMobileNavLoggedIn a",'.PolarisNavigation[style*="transform"] a',".createKeyCommandWrapper .PolarisNavigationItem a"],tabBarDm:['.PolarisNavigation div:not(:first-child):not(:last-child):not([class]):has(polygon[points^="11.698 20.334"])','.PolarisNavigation div:not(:first-child):not(:last-child):not([class]):has(polygon[points^="11.698 20.334"])','.PolarisNavigation div:not(:first-child):not(:last-child):not([class]):has(path[d^="M12.003 2.001a9"])'],tabBarReels:['.PolarisNavigation div:not(:first-child):not(:last-child):not([class]):has(path[d^="M2 12.001v3.449c0"])','.PolarisNavigation div:not(:first-child):not(:last-child):not([class]):has(path[d^="m12.823 1 2.974"])'],tabBarBadge:[".PolarisNavigation .PolarisNavigationBadge",".PolarisDirectNavItemBadge"],storyFooter:[".mLi3m","footer.PolarisMobileStoriesFooter","footer.PolarisMobileOwnerStoriesOverlay"],storyQuickReactionsBackground:".x4U7z",storyPreviewContainer:[".zGtbP",".PolarisShellContent ._aac4",".PolarisRefreshedShellContent ._aac4"],settingsRectangle:".BvMHM",recommendationsContainer:[".bq3Mi",".tHaIX",".PolarisSuggestedUserFeedUnit"],modal:[".RnEpo",'.PolarisIGCoreModalBackdrop[role="presentation"]'],modalWindow:['.RnEpo [role="dialog"]','.PolarisIGCoreModalBackdrop[role="presentation"] [role="dialog"]'],modalWindowHashtagContent:['.RnEpo [role="dialog"] ._8zyFd'],bottomNotification:".Z2m7o",createStoryHeaderButton:[".mTGkH",".PLytv","button.PolarisFeedPageMobileHeader"],peersPage:'[data-page="followList"]',peersPageHeader:['[data-page="followList"] .b5itu','[data-page="followList"] .PolarisGenericMobileHeader > ._ab16'],peersModalHeader:".HYpXt .eiUFA",storiesBar:[".qf6s4",".PolarisIGVirtualList.PolarisStoryTray",".PolarisFeedStoryTrayWrapper"],storiesBarLoadingPanel:[".PolarisFeedLoadingSpinner._ab6o",".PolarisFeedPage ._ab6o"],blueLinkButton:".UP43G",actionSheet:[".xkuux",".PolarisIGCoreModalBackdrop > ._ac7o"],useAppGradientBar:[".xZ2Xk",".PolarisMobileNav + section._aa9n"],actionDialog:[".mt3GC",".IGCoreDialog._a9-z"],actionDialogItem:[".mt3GC .aOOlW",".IGCoreDialog._a9--"],actionDialogWithoutHeader:[".mt3GC:first-child",".IGCoreDialog._a9-z:first-child"],postDmButton:['article button.PolarisIGCoreSVGIconButton:has(polygon[points*="11.698 20.334 22 3.001"])','.PolarisMobilePost_next button.PolarisIGCoreSVGIconButton:has(polygon[points*="11.698 20.334 22 3.001"])'],post:["article[data-post-id]","article:has([data-post-id])",".PolarisMobilePost_next[data-post-id]"],postThreeDotsButton:[".MEAGs button",".PolarisPostOptionsButtonPicker button",'.PressableText:has(circle[cx="18"][cy="12"][r="1.5"])'],postVideoContainer:["._5wCQW",".PolarisDeclarativeVideo._ab1c"],publishingBarText:[".o5gub span",".PolarisUploadProgressBar._aaug",".UploadBar__text"],uploadPanel:[".TExId",".PolarisUploadProgressBar._aauh",".UploadBar"],uploadPanelText:[".PolarisUploadProgressBar._aaug"],uploadPanelVideoIcon:".TExId .cRc_w",expandVideoButton:"._7zNgw",continueWatchingOverlay:".oNYBg",cookieModalContent:".RnEpo ._74vy-",cookieModal:".BaseCometModal:has(.PolarisCookieConsentModal)",carouselNavButton:".PolarisSidecar .PolarisHSnapScroll > button",blueButton:"button._acas:not(._acao)",toastMessage:[".PolarisToastWrapper._a999"],postCaption:[".PolarisPostPreviewCommentsPicker ._ab9o > span:last-child > span:first-child"],postCaptionLink:[".PolarisPostPreviewCommentsPicker ._ab9o > span:last-child > span:first-child a"],exceptionDialogOkButton:['.CometExceptionDialog .PressableText[role="button"]'],errorPageContent:["._a3gq ._ab8q"],postPhotoOverlay:[".PolarisPhoto._aagw"],tryMbsSection:[".PolarisQPBloksRenderer._a9_9"],splashScreen:["body > #splash-screen"]},creationPopup:{root:[".PolarisMobileCreationNavItem ._aa5x",".PolarisMobileCreationNavItem ._ad8j",".PolarisMobileCreationNavItem ._aa5-",".IGDSPopover:has(.PolarisMobileCreationMenuContent)",".PolarisMobileCreationMenuContent"],triggerButton:[".PolarisGenericMobileHeader .PolarisMobileCreationNavItem a"],postButton:['.PolarisMobileCreationNavItem ._aa5x [role="button"]:first-child','.PolarisMobileCreationNavItem ._ad8j [role="button"]:first-child','.PolarisMobileCreationNavItem ._aa5- [role="button"]:first-child','.PolarisMobileCreationMenuContent [role="button"]:first-child'],storyButton:['.PolarisMobileCreationNavItem ._aa5x [role="button"]:last-child','.PolarisMobileCreationNavItem ._ad8j [role="button"]:last-child','.PolarisMobileCreationNavItem ._aa5- [role="button"]:last-child','.PolarisMobileCreationMenuContent [role="button"]:last-child'],postInput:[".PolarisMobileCreationNavItem > form:last-child > input"]},dragPanel:{root:[".RnEpo.xpORG._9Mt7n",".PolarisIGCoreModalBackdrop > ._ac7o"],handle:[".BHY8D",".PolarisIGCoreSheet._ac7m"],igIcon:".glyphsSpriteApp_Icon_36.u-__7",sendEmailLink:['.-qQT3[href^="mailto:"]','._abm4[href^="mailto:"]','._abm4 [href^="mailto:"]','a.Pressable[target="_top"][href^="mailto:"]','a.WebPressable:has(polygon[points*="11.698 20.334 22 3.001"])'],shareToThreadsLink:['a.WebPressable:has(path[d*="M141.537 88.9883C140.71 88.5919 139.87"])']},authScreen:{loginContainer:".rxwpz",loginContainerParagraph:".rxwpz p",loginFormParagraph:".HmktE p",avatar:".rxwpz img",username:['html[data-page="unifiedHome"] .l9hKg','html[data-page="loginPage"] .l9hKg'],footer:['html[data-page="unifiedHome"] footer','html[data-page="loginPage"] footer'],fromFacebookBar:['html[data-page="unifiedHome"] .O1flK','html[data-page="loginPage"] .O1flK'],openAppButton:[".PolarisAuthFormCard:not(:has(.PolarisSlimLoginForm)) div:has(> .PolarisIGCoreButton:first-child:last-child)"]},storyViewer:{root:[".PolarisMobileOwnerStories.PolarisStoriesReel",".PolarisMobileStoriesPage > .PolarisMobileStories","section.PolarisBaseShell > .PolarisMobileStories",".CometPushView > .PolarisStoriesV3Page"],container:[".PolarisBaseShell:has(> .PolarisMobileStories)",".CometPushView:has(> .PolarisStoriesV3Page)"],videoPlayer:['.PolarisStoryVideoPlayerWrapper > div[style*="top: 0"]'],avatar:[".PolarisMobileOwnerStories img.PolarisUserAvatar",".PolarisMobileOwnerStoriesOverlay img.PolarisUserAvatar",".PolarisStoriesV3Owner img.PolarisUserAvatar"],time:["time.PwV9z","time.PolarisStoriesHeaderOwner","time.PolarisStoriesV3Timestamp"],videoPoster:"img.PolarisStoryVideo",mediaContainer:".PolarisStoryMediaLayout._aa64",image:[".PolarisStoryImage img.PolarisStoryImage",".PolarisStoriesV3MediaPlayer > img"],video:["video.PolarisStoryVideo",".PolarisMobileStoryViewer video",".PolarisStoriesV3MediaPlayer video"],textarea:["textarea.PolarisStoriesV3ReplyInput"],viewAsAvatar:[".PolarisStoryMediaLayout img.PolarisUserAvatar"],pollContainer:".tj63N",pollButtons:".tj63N",pollAnswerDigitOrEmoji:".KUQv0"},storyCreation:{root:["._650Zr",".PolarisStoryCreationPage",'body[data-page="StoryCreationPage"] section.PolarisBaseShell'],canvas:[".PolarisStoryCreationPage canvas",'body[data-page="StoryCreationPage"] canvas'],headerButton:[".PolarisStoryCreationPage header button",'body[data-page="StoryCreationPage"] header button'],textInput:["[contenteditable]",".PolarisStoryCreationTextInput[contenteditable]"],topRightButtonsContainer:[".o4NXM",".PolarisStoryCreationPage header > div.PolarisStoryImageCreationContainer",'body[data-page="StoryCreationPage"] header > div.PolarisStoryImageCreationContainer'],topRightButton:[".o4NXM button",".PolarisStoryCreationPage header > div button",'body[data-page="StoryCreationPage"] header > div button'],downloadButton:['[class*="storiesSpriteDownload"]',".PolarisStoryCreationPage header > div button:nth-child(1)",'body[data-page="StoryCreationPage"] header > div button:nth-child(1)'],mentionBarContainer:[".uPlSl",".PolarisTypeahead.PolarisStoryCreationTextInput"],mentionBar:[".imGmP",".PolarisTypeahead.PolarisStoryCreationTextInput > div"],mentionReel:[".imGmP > div",".PolarisTypeahead.PolarisStoryCreationTextInput > div > div"],mentionReelRow:[".imGmP > div > div",".PolarisTypeahead.PolarisStoryCreationTextInput > div > div > div"],mentionReelItem:["#touch_mention.qOsKV","#touch_mention.PolarisStoryTypeaheadResultsList._acn7"],mentionReelItemName:["#touch_mention.qOsKV .KMpYj","#touch_mention.PolarisStoryTypeaheadResultsList ._acn9"],mentionReelItemAvatar:["#touch_mention.PolarisStoryTypeaheadResultsList img.PolarisStoryTypeaheadResultsList"],videoHeader:["._9o3e0","header.PolarisStoryVideoCreationContainer"],photoControls:[".PolarisStoryImageCreationContainer._aa3f","header.PolarisStoryImageCreationContainer > div:last-child"],videoWrap:["header.PolarisStoryVideoCreationContainer + .PolarisStoryVideoCreationContainer"],video:[".JHXak","video.PolarisStoryVideoCreationContainer"],videoPoster:[".pSeby","video.PolarisStoryVideoCreationContainer + img"],footer:[".GRPvx ~ footer","footer.PolarisStoryCreationShareFooter"],videoPlayButton:[".JHXak ~ .videoSpritePlayButton","div.PolarisStoryVideoCreationContainer > span"],videoCreationExitButton:["header.PolarisStoryVideoCreationContainer > button.PolarisIGCoreIconButton"],submitButton:[".PolarisStoryCreationShareFooter > button"],submitButtonText:[".PolarisStoryCreationShareFooter > button .PolarisStoryCreationShareFooter"],uploadHeader:[".PolarisStoryCreationPage .PolarisSharingProgressModal header",'body[data-page="StoryCreationPage"] .PolarisSharingProgressModal header'],uploadBar:[".PolarisStoryCreationPage .PolarisSharingProgressModal header > div",'body[data-page="StoryCreationPage"] .PolarisSharingProgressModal header > div'],uploadText:[".PolarisStoryCreationPage .PolarisSharingProgressModal header h1",'body[data-page="StoryCreationPage"] .PolarisSharingProgressModal header h1'],textColorPicker:[".PolarisStoryCreationColorPicker.PolarisStoryCreationTextInput"],drawColorPicker:[".PolarisStoryCreationDrawColorPicker.PolarisStoryCreationDrawing"],colorPickerSelectedCircle:["button.PolarisStoryCreationColorPicker > ._aa87","button.PolarisStoryCreationDrawColorPicker > ._aa82"],addStickerButton:[".PolarisStoryImageCreationContainer > button:nth-child(2)"]},explorePage:{nav:['html[data-page="exploreLandingPage"] nav.PolarisShellMobileHeader'],header:"header.PolarisExploreMobileHeader",searchInputPlaceholder:[".PolarisDynamicExplorePageContentWrapper input.PolarisIGCoreSearchInput::placeholder"],searchContainer:[".PolarisDynamicExplorePageContentWrapper > .PolarisIGCoreBox"],search:[".PolarisDynamicExplorePageContentWrapper > .PolarisIGCoreBox > .PolarisIGCoreBox:first-child"],main:["main > .PolarisDynamicExplorePageContentWrapper"],content:[".mJ2Qv",".PolarisDynamicExplorePageSharedContent",".PolarisDynamicExplorePageContentWrapper"],contentInner:[".K6yM_",".PolarisDynamicExplorePageSharedContent > *",".PolarisDynamicExplorePageContentWrapper > *"],post:[".pKKVh",".PolarisDynamicExploreSectionalItem"],searchResults:[".gJlPN",".PolarisDynamicExplorePageSharedContent > .PolarisSearchResultsList",".PolarisDynamicExplorePageContentWrapper > .PolarisSearchResultsList"]},profilePage:{content:[".v9tJq","main.PolarisShellContent > .PolarisProfilePage","main.PolarisRefreshedShellContent > .PolarisProfilePage","main.PolarisRefreshedShellContent > .PolarisProfilePageContent","main > .PolarisProfilePageContent"],header:[".zw3Ow",".PolarisProfilePage header",".PolarisProfilePageContent header"],username:[".KV-D4","section.PolarisProfilePageHeader h2.PolarisIGCoreText"],avatarWithStoryWrap:[".RR-M-.h5uC0",".PolarisProfilePageHeader div.PolarisUserAvatarWithStories"],avatarStoryRing:['html[data-page="profilePage"] .RR-M-.h5uC0 canvas',".PolarisProfilePageHeader canvas.PolarisStoryRing"],followButton:[".nZSzR .y3zKF.sqdOP",".XBGH5 ._4EzTm .soMvl:last-child",'[data-page="profilePage"] .PolarisFollowButton button'],toggleSuggestionsButton:[".PolarisFollowButton > .PolarisDropdownButton:last-child"],writeButton:[".JI_ht.vwCYk",'html[data-page="profilePage"] .i0EQd',".PolarisProfilePageHeader ._ab9s",'div:has(+ div[style*="width: 34px"]):not(:has(button))',".PolarisProfilePageHeader .IGDSBox > .WebPressable"],subscribeButtonWrap:[".vBF20"],blueButtonsWrap:[".nZSzR .vwCYk"],buttonsRow:[".Y2E37 > div:first-child"],settingsMenuWrap:["._7XkEo",".PolarisNavigationalHeader + ._ac8b"],settingsMenu:["._7XkEo > div",".PolarisNavigationalHeader + ._ac8b > div"],postRow:[".v9tJq .weEfm",".PolarisProfileMediaBrowser .PolarisIGVirtualGrid",".PolarisProfileTabChannel .PolarisIGVirtualGrid",".PolarisProfilePageContent .PolarisIGVirtualGrid"],postContainer:[".v9tJq ._bz0w",".PolarisProfileMediaBrowser .PolarisPostsGridItem",".PolarisProfilePageContent .PolarisPostsGridItem_next",".PolarisProfileTabChannel .PolarisVirtualPostsGrid",".PolarisProfilePageContent .PolarisClipsGrid_next",".PolarisProfilePageContent .PolarisIGVirtualGrid > div"],post:['.v9tJq ._bz0w a[href^="/p/"]','.PolarisProfileMediaBrowser .PolarisPostsGridItem > a[href^="/p/"]','.PolarisPostsGridItem_next a[href^="/p/"]',".PolarisProfilePageContent .PolarisIGVirtualGrid > div a"],reelRow:[".v9tJq .gmGWn",".v9tJq .Nnq7C",".PolarisProfilePage .PolarisIGVirtualList .PolarisIGVirtualGrid._abq4",".PolarisProfilePageContent .PolarisIGVirtualList .PolarisIGVirtualGrid._abq4"],reelContainer:[".v9tJq .k1v61",".v9tJq .b9_1r",".PolarisProfilePage .PolarisClipsGrid","div:has(> .PolarisClipsGridItem)",".PolarisIGVirtualGrid > .PolarisClipsGrid"],reelPreviewStats:[".v9tJq .b9_1r .qn-0x",".PolarisPostsGridItemOverlay._ac2d"],reelIcon:['svg:has(path[d*="m12.823 1 2.974"])'],pinnedIcon:['svg:has(path[d*="m22.707 7.583-6.29-6.29a1"])'],moreButton:[".VMs3J","section.PolarisProfilePageHeader > .PolarisProfilePageHeader > div.PolarisProfilePageHeader"],tab:["._9VEo1",".PolarisProfilePage .PolarisTabbedContent > .PressableText",".PolarisProfilePageContent .PolarisTabbedContent > .PressableText"],activeTab:['.PolarisProfilePage .PolarisTabbedContent > .PressableText[aria-selected="true"]','.PolarisProfilePageContent .PolarisTabbedContent > .PressableText[aria-selected="true"]'],openMbsButton:['div:has(> a[href*="https://business.facebook.com/business/loginpage/"])','div:has(> a[href*="instagram.com/?u=https%3A%2F%2Fbusiness.facebook.com"])'],profileButton:["section.PolarisProfilePageHeader .WebPressable"],postVideoIcon:[".CzVzU svg"],postVideoOverlay:[".qn-0x"],followersFollowingsLink:".Y8-fY a"},profilePageFeedTab:{postFooter:["article.PolarisPost ._ae3w"],addCommentSection:["article.PolarisPost ._ae3w section.PolarisPostCommentInput"],addCommentTypeahead:["article.PolarisPost ._ae3w .PolarisTypeahead"]},postPage:{postHeader:[".PolarisPostPage ._aasi",".PolarisPostPage article > div > div:first-child"],postFooter:[".PolarisPostPage ._aast",".PolarisPostPage article > div > div:last-child > div"]},commentsPage:{body:'html[data-page="mobileAllCommentsPage"] .CometMainContentWrapper',footer:'html[data-page="mobileAllCommentsPage"] nav.PolarisNavWrapper',scrollContainer:[".XQXOT",".PolarisThreadedComments > ul"],showMoreButton:["li > div > .wpO6b",".PolarisThreadedComments > ul > li:last-child"],lastListItem:".PolarisThreadedComments > ul > *:last-child",comment:[".C4VMK",".PolarisPostComment._a9zr"]},feedPage:{body:[".Wamc7","section > ._aam1"],postsContainer:[".IGDSBox > .PolarisFeedPage"],nextPostsContainer:[".PolarisFeedWrapper_next .IGDSBox:has(> .PolarisIGVirtualList)"],followSuggestions:[".bq3Mi",".PolarisSuggestedUserFeedUnit"],createPostTopButton:['.PolarisGenericMobileHeader a:has(path[d^="M2 12v3.45c0"])'],feed:["section.PolarisFeedPage",".PolarisFeedContainerLayout > div > .PolarisFeedWrapper_next"],post:["article._8Rm4L","article.PolarisPost","article.PolarisPostFunctional","article.PolarisFeedCard_next"],postContainer:[".PolarisFeedCard_next:has(> .PolarisDoubleTappable)"],postContainerChild:[".PolarisFeedCard_next:has(> .PolarisDoubleTappable) > div"],postContainerChild2:[".PolarisFeedCard_next:has(> .PolarisDoubleTappable) > div > div"],postLocationRow:[".M30cS",".PolarisPostHeader._aaql"],postHashtagLocation:".M30cS > div:not(:empty) + .JF9hh",postHeader:[".UE9AK",".PolarisIGCoreBox > ._aaqw"],postHeaderBeforePseudo:[".UE9AK::before",".PolarisIGCoreBox > ._aaqw::before"],postHeaderItem:".UE9AK > *",postBody:["article.PolarisPost ._aatk","article.PolarisPost ._ab12","article.PolarisFeedCard_next > div > div:nth-child(2)"],postContentLimit:'[style*="min(470px, 100vw)"]',postFooterWrap1:["article._8Rm4L ._97aPb + div","._aatk + .PolarisIGCoreBox","._ab12 + .PolarisIGCoreBox"],postFooterWrap2:["article._8Rm4L .cv3IO","._aatk + .PolarisIGCoreBox > ._aast","._ab12 + .PolarisIGCoreBox > div","._aatk + .PolarisIGCoreBox > div"],postFooter:[".eo2As","._aatk + .PolarisIGCoreBox > ._aast > ._aasx","._ab12 + .PolarisIGCoreBox > div > div","._aatk + .PolarisIGCoreBox > div > div"],postActions:[".Slqrh",".PolarisPostFeedbackControls._aamu"],postAfterActions:[".PolarisPostFeedbackControls._aamu ~ *"],postThreeDotsButtonWrap:[".PolarisPostOptionsButtonPicker"],postThreeDotsButton:[".MEAGs",".PolarisPostOptionsButtonPicker > button"],postAction:[".Slqrh > *",".PolarisPostFeedbackControls._aamu > *"],postActionIconDefault:[".rrUvL",".PolarisPostFeedbackControls button._abl- > div:last-child"],postActionIconHovered:[".B58H7",".PolarisPostFeedbackControls button._abl- .PolarisIGCoreSVGIconButton"],postUnderActionsContent:[".eo2As > *:not(.Slqrh)","._aasx > *:not(.PolarisPostFeedbackControls)"],postPhoto:[".KL4Bh img","article.PolarisPost .PolarisPhoto img","article.PolarisPostFunctional .PolarisPhoto img","article.PolarisFeedCard_next .PolarisPhoto img"],postVideo:["article._8Rm4L video","article.PolarisPost .PolarisVideo video","article.PolarisPostFunctional .PolarisVideo video","article.PolarisFeedCard_next video"],postMediaContainer:["._97aPb",".PolarisPhoto._aagu"],postPhotoContainer:["._9AhH0",".PolarisPost .PolarisPost.PolarisPhoto",".PolarisPost .PolarisPost.PolarisPhotoWithIndicator",".PolarisPostFunctional .PolarisPostFunctional.PolarisPhoto",".PolarisPostFunctional .PolarisPostFunctional.PolarisPhotoWithIndicator",".PolarisFeedCard_next .PolarisPhoto._aagu"],postVideoContainer:[".GRtmf",".PolarisPost .PolarisMedia.PolarisVideo",".PolarisPostFunctional .PolarisMedia.PolarisVideo",'[data-media-actions-post-type="igtv"] > .PolarisIGCoreBox',"[data-visualcompletion] > .PolarisPostVideoPlayerWrapper"],postCarouselContainer:[".rQDP3",".PolarisSidecar._aamn"],carouselDots:[".ijCUd",".PolarisStepIndicator.PolarisSidecar"],carouselDot:[".Yi5aA",".PolarisStepIndicator ._acnb"]},postCreation:{body:['[data-page="CreationDetailsPage"] .PolarisCreationShell','[data-page="CreationDetailsPage"] .PolarisBaseShell'],nextButton:['[data-page="CreationStylePage"] .UP43G','[data-page="CreationStylePage"] .PolarisNavigationalHeader ._ab5p'],closeButton:[".PolarisCreationShell .PolarisGenericMobileHeader._ab19 button.PolarisNavigationalHeader"],captionContainer:[".IpSxo",".PolarisCreationDetailsPage._abru"],captionTextarea:[".IpSxo textarea","textarea.PolarisCreationCaptionInput",".PolarisCreationCaptionInput textarea"],userAvatar:[".IpSxo .GsWMc",".IpSxo ._2dbep",".PolarisUserAvatar.PolarisCreationDetailsPage"],imageContainer:[".N7f6u",".PolarisCreationCroppingUnit._abqh"],videoContainer:[".YMoW3",".PolarisCreationStyleVideoUnit._abe_"],video:[".YMoW3 video",".PolarisCreationStyleVideoUnit._abe_ video"],videoPoster:[".YMoW3 img",".PolarisCreationStyleVideoUnit._abe_ img"],videoPlayButton:['.PolarisCreationStyleVideoUnit._abe_ span._abf6[role="button"]'],filtersReel:[".PDNx9",".PolarisIGVirtualList.PolarisCreationFilteringUnit"],submitPostButton:[".hfWwk .UP43G",'[data-page="CreationDetailsPage"] ._ab5p'],rowButton:["._2OfRz",".PolarisCreationDetailsPage._abrf"],previewContainer:['html[data-page="CreationDetailsPage"] .g5kp1',".PolarisCreationDetailsPage ._aau7"],previewPostTypeIcon:[".cRc_w",".PolarisCreationDetailsPage .PolarisMediaPreviewThumbnail svg"],previewPostImage:[".IpSxo .FuaTR","img.PolarisMediaPreviewThumbnail"],expandImageButton:[".pHnkA",".PolarisCroppableImage._abfb"],mentionsOverlay:[".cDEf6",".PolarisCreationCaptionInput._aby4"],tagPeopleButton:[".DG8Ws","button.PolarisCreationTagVideo._a9z-"]},loginBar:{root:".Xwp_P .KGiwt",content:".Xwp_P .KGiwt .ryLs_",openAppButton:[".Xwp_P .KGiwt button",".PolarisMobileTopNavLoggedOut button._acap"]},activityPage:{headerBottomLine:['html[data-page="ActivityFeedPage"] .PolarisGenericMobileHeader::before'],topListContainer:['html[data-page="ActivityFeedPage"] .PolarisShellContent > .PolarisIGVirtualList > div']},"general_use-application-bar":[".Z_Gl2",".MFkQJ","._acc8"],"post-item":["._97aPb",".PolarisPost div:first-child:last-child:not([class]) > .PolarisPhoto",".PolarisPost div:first-child:last-child:not([class]) > .PolarisPhotoWithIndicator > .PolarisPhoto",".PolarisPost .PolarisMedia.PolarisVideo",".PolarisPost .PolarisSidecar li.PolarisVirtualHSnapScrollComponents",".PolarisPostFunctional .PolarisPostFunctional.PolarisPhoto",".PolarisPostFunctional .PolarisPostFunctional.PolarisPhotoWithIndicator",".PolarisFeedCard_next .PolarisPhoto._aagu",".PolarisPostFunctional .PolarisMedia.PolarisVideo","[data-visualcompletion] > .PolarisPostVideoPlayerWrapper",".PolarisPostFunctional .PolarisSidecar li.PolarisVirtualHSnapScrollComponents",".PolarisFeedCard_next .PolarisSidecar li.PolarisVirtualHSnapScrollComponents",".PolarisPostVideoPlayerWrapper[style]",".PolarisMediaItem_next",".PolarisVideoLegacy","article .PolarisMediaItem"],"post-video":[".GRtmf video",".PolarisPost ._aatk video",".PolarisPostFunctional ._ab12 video","video.VideoPlayerImplementationReactVideoElement"],"post-video-poster":[".GRtmf video + img",".PolarisPost ._aatk video + img",".PolarisPostFunctional ._ab12 video + img"],postVideoOverlayContainer:[".VideoPlayerComponentContainer:has(> .VideoPlayerInteractionOverlay)"],postVideoOverlay:[".VideoPlayerInteractionOverlay"],postVideoOverlaySoundButton:[".VideoPlayerComponentContainer:has(> .VideoPlayerInteractionOverlay) button[aria-label]"],"post-tagged-people-button":[".G_hoz","._a3gq ._a9-6",".PolarisVideo ._a9-6",".PolarisUserTagIndicator"],"story-container":[".qbCDp",".PolarisMobileOwnerStories._aa2i","section > .PolarisMobileStories",".CometPushView > .PolarisStoriesV3Page"],"story-loading-preview":".qbCDp canvas","story-video-play-button":[".qbCDp .videoSpritePlayButton",".PolarisMobileStoryEventZone._9zwu"],"stories-viewer":[".UIujo",".PolarisMobileStoriesPage"],"highlights-container":[".YlNGR",".PolarisProfileStoryHighlightsTray .PolarisHSnapScroll._aap0"],"comments-list-on-comments-page":".XQXOT","profile-page-stat-container":".LH36I","profile-page-stat-item":"._81NM2","profile-page-grid-stretch-element":"._2z6nI article:first-child:empty","profile-send-message-button":".fAR91","header-top-level-button":[".HOQT4",".PolarisGenericMobileHeader._ab18._ab1b"],"your-story-button-text":[".XdXBI",".PolarisOwnStoryTrayItem._aac2"],"comment-form":[".RxpZH",".PolarisPostCommentInput._aaof"],"comment-form-avatar":[".RxpZH ._2dbep",".PolarisPostCommentInput > img.PolarisUserAvatar"],"comment-form-form":[".RxpZH form","form.PolarisPostCommentInput"],"comment-form-textarea":[".RxpZH textarea","textarea.PolarisPostCommentInput"],"comment-form-submit-button":['.RxpZH button[type="submit"]',"form.PolarisPostCommentInput button"],postCreationPage:['html[data-page="CreationStylePage"]'],storyCreationPage:['html[data-page="StoryCreationPage"]'],"new-post_tag-people-image-container":".qJfNm"},ig:{STORY_REELS_ITEM_SEEN:"STORY_REELS_ITEM_SEEN"}};const{$chromeStarter:Ld,$store:Nd,$utils:Vd,$auth:qd}=app;Ld.controller={init:function(){this._onOnline=Vd.createEmitter(),this._onOffline=Vd.createEmitter(),this._watchOnlineStatus(),this._updateUserWhenOnlineStatusChanges(),setInterval((()=>this._recoverIfOffline()),5*Vd.time.MINUTE)},get online(){return navigator.onLine},get offline(){return!this.online},waitForOnline:async function(){this.online||await new Promise((e=>{const t=()=>{e(),this._onOnline.off(t)};this._onOnline(t)}))},_watchOnlineStatus:function(){if(!navigator.connection)return;let e=navigator.onLine;navigator.connection.addEventListener("change",(()=>{navigator.onLine!==e&&(e=navigator.onLine,e?this._onOnline():this._onOffline())}))},_updateUserWhenOnlineStatusChanges:function(){this._onOnline((()=>{Ld.log("going online"),null===Nd.state.auth.userId&&qd.controller.updateUser()})),this._onOffline((()=>{Ld.log("going offline"),null!==Nd.state.auth.userId&&qd.controller.updateUser()}))},_recoverIfOffline:function(){null===Nd.state.auth.userId&&(Ld.log("trying to recover from offline"),qd.controller.updateUser())}};const{$insights:Gd}=app;Gd.credibilityToGrade=e=>{const t=Hd.find((t=>t.condition(e)));return{value:t.value,label:t.label,color:t.color}};const Hd=[{condition:e=>e>.85,value:"A",label:"credible",color:"#74BE86"},{condition:e=>e>.7,value:"B",label:"credible",color:"#74BE86"},{condition:e=>e>.55,value:"C",label:"could be spam",color:"#BAD043"},{condition:e=>e>.35,value:"D",label:"likely spam",color:"#FFCC24"},{condition:e=>"number"==typeof e,value:"F",label:"spamâ€‰/â€‰inactive",color:"#E34E21"},{condition:e=>"failed"===e,value:"N/A",label:"check failed",color:"#D8DADD"},{condition:()=>!0,value:"N/A",label:"user is private",color:"#D8DADD"}],{$insights:Wd}=app;Wd.getSpamColor=e=>zd.find((t=>t.condition(e))).color;const zd=[{condition:e=>e>.35,color:"#E34E21"},{condition:e=>"number"==typeof e,color:"#74BE86"},{condition:()=>!0,color:"#D8DADD"}],{$insights:Jd,$store:Yd,$bus:Kd}=app;Jd.controller={init:async function(){Kd.on("insights.get-credibility-grade",this._getCredibilityGrade.bind(this))},_getCredibilityGrade:function(e){const t=Yd.state.auth.userId,n=this._getCredibility(e,t);return Jd.credibilityToGrade(n)},_getCredibility:function(e,t=null,{forcePrivate:n=!1}={}){const r=e.userId===t;if(r)return 1;if(e.isPrivate&&!r&&!n)return null;if(e.isVerified)return 1;if("inssistapp"===e.username)return 1;let o=0,i=0;Object.values(this._getRules()).forEach((t=>{o+=t.getValue(e)*t.weight,i+=Math.max(t.weight,0)}));const s=e.followingsCount>7e3?.45:e.followingsCount>6500?.4:e.followingsCount>6e3?.35:e.followingsCount>5500?.25:e.followingsCount>5e3?.1:0,a=1-this._between01(o/i+s);return Math.round(100*a)/100},_getRules:function(){return{"followings-to-followers-ratio":{weight:150,getValue:e=>{const t=Math.log2(e.followingsCount/e.followersCount/4)/1.5;return this._between01(t)}},"short-bio":{weight:30,getValue:e=>{if(!e.bio)return 1;const t=(20-e.bio.length)/20;return this._between01(t)}},"no-avatar":{weight:100,getValue:e=>e.hasAvatar?0:1},"few-posts":{weight:200,getValue:e=>{const t=(24-e.postsCount)/24;return this._between01(t)}},"username-ends-with-digits":{weight:100,getValue:e=>{if(!e.username)return 0;const t=e.username.replace(/[_.]*/g,"").match(/.*(\d{4,})$/),n=t&&t[1];if(!n)return 0;const r=Number(n);return r>1950&&r<2030?0:1}},"has-highlights":{weight:-25,getValue:e=>e.hasHighlights?1:0},"posts-frequency":{weight:150,getValue:e=>{if(e.isPrivate)return 0;const t=e.lastPosts?e.lastPosts.length:0;if(0===t)return 1;const n=Date.now(),r=2592e6,o=e.lastPosts.map((e=>e.ts)).sort();if(o.some((e=>n-e<r)))return 0;let i=0,s=0,a=0;for(;;){if(o[s]-o[i]<r&&s<t?(s++,a=Math.max(a,s-i)):i++,i===t-1)break}const l=(a/t-.6)/.4;return this._between01(l)}}}},_between01:function(e){return Math.min(Math.max(0,e),1)}};const{$files:Xd,$idb:Qd,$shortid:Zd}=app;Xd.controller={save:async function(e,t=""){const n=Zd.generate(),r=t?`${t}.${n}`:n;return await Qd.set(`files.${r}`,e),r},read:async function(e){return await Qd.get(`files.${e}`)||null},remove:async function(e){await Qd.remove(`files.${e}`)},getFileIds:async function(e=""){const t=await Qd.keys(),n=e?`files.${e}.`:"files.";return t.filter((e=>e.startsWith(n))).map((e=>e.replace("files.","")))}};const{$tagAssist:ep,$utils:tp}=app;ep.utils={extractTags:function(e,t=!1){const n=tp.getHashtagRegex({hashOptional:!t});return(e.match(n)||[]).map((e=>e.startsWith("#")?e.substr(1):e)).map((e=>e.toLowerCase())).filter(tp.unique)},compressTag:function(e){return[e.name,e.lastScanOn,e.isBanned?1:0,e.isFlagged?1:0,e.avgLikes,e.avgComments,e.avgPosts,(e.relevantTags||[]).map((t=>t.split(e.name).join("~"))).join(",")].join(":")},decompressTag:function(e){const t=e.split(":");if(1===t.length)return{name:t[0]};const[n,r,o,i,s,a,l,u]=t;return{name:n,lastScanOn:Number(r),isBanned:1===Number(o),isFlagged:1===Number(i),avgLikes:Number(s),avgComments:Number(a),avgPosts:Number(l),relevantTags:(u||"").split(",").filter(Boolean).filter(tp.unique).map((e=>e.split("~").join(n)))}},sortByFrequency:function(e){const t=[];{const n={},r=e.flat();for(const e of r)n[e]=(n[e]||0)+1;for(const e in n){const r=n[e];let o=t.find((e=>e.frequency===r));o||(o={frequency:r,strs:[]},t.push(o)),o.strs.push(e)}t.sort(((e,t)=>t.frequency-e.frequency))}for(const n of t){const t={};for(const r of e){let e=0;for(const o of r)n.strs.includes(o)&&(t[o]=(t[o]||0)+e,e+=1)}n.strs.sort(((e,n)=>t[e]-t[n]))}return t.map((e=>e.strs)).flat()}};const{$tagAssist:np,$store:rp,$utils:op,$env:ip,$igApi:sp}=app;async function ap(e=0){const t=rp.state,n=t.auth.userId;if(!n)return;const r=Date.now(),o=np.proxy.getAccountStats(),i=o&&r-o.lastScanOn;if(i&&i<ip.options.tagAssist.accountStatsTtl)return;const s=t.auth.username,a=await sp.api.fetchUserPosts(s,42);if(a.error)return e<2?void ap(e+1):void console.error("failed to update account stats",a);const l=a.result;let u=0,c=0;for(const e of l)u+=sp.api.normalizePostStat24h(e.stats.likes,e.on),c+=sp.api.normalizePostStat24h(e.stats.comments,e.on);l.length>0&&(u=Math.round(u/l.length),c=Math.round(c/l.length));const d=np.utils.sortByFrequency(l.map((e=>e.caption||"")).map((e=>np.utils.extractTags(e,!0))));rp.transaction((e=>{e.tagAssist.accountStats[n]={avgLikes:u,avgComments:c,mostUsedTags:d.slice(0,3),lastScanOn:Date.now()}}))}np.accountStatsController={init:function(){rp.model.observe((e=>e.auth.userId),(()=>{ap()})),op.createAlarm("tag-assist.update-account-stats",{period:4*op.time.HOUR},(()=>{ap()}))}};const{$tagAssist:lp}=app;lp.controller={init:function(){lp.accountStatsController.init()}};const{$tagAssist:up,$store:cp}=app;up.proxy={getAccountStats:function(){const e=cp.state,t=e.auth.userId;return e.tagAssist.accountStats[t]||{}}};const{$dev:dp,$store:pp,$env:hp,$sentry:fp,$chromeStarter:gp,$overseer:mp,$fetcher:vp,$utils:yp,$eventBus:bp,$constants:_p,$lodash:wp}=app;dp.controller={init:function(){globalThis.ig=_p.ig,globalThis.$utils=yp,globalThis.$eventBus=bp,globalThis.$fetcher=vp,globalThis.$sentry=fp,globalThis.$overseer=mp,globalThis.setState=this.setState,globalThis.downgradeVersion=this.downgradeVersion,globalThis.errorsDelta=this.errorsDelta,globalThis.activityDelta=this.activityDelta,globalThis.countMadeActions=this.countMadeActions,(hp.is.development||hp.is.beta)&&(globalThis.model=pp.model,globalThis.transaction=pp.transaction,globalThis.$chromeStarter=gp,this.defineCommit())},countMadeActions:function(e=86400){const t=globalThis.__debug.state,n=Math.round(Date.now()/1e3),r={likes:0};for(let o=0;o<t.stats.activity.length;o++){const i=t.stats.activity[o];if(n-i.on>e)break;"like"===i.type&&r.likes++}return r},errorsDelta:function(){const e=globalThis.__debug.errors;let t=e[0].on;e.forEach((e=>{dp.log((t-e.on)/60),t=e.on}))},activityDelta:function(){const e=globalThis.__debug.state.stats.activity;let t=e[0].on;globalThis.__debug.state.stats.activity=e.map((e=>{const n=t;return t=e.on,{...e,since:Math.floor((n-e.on)/60)}}))},setState:function(e){const t=wp.cloneDeep(e);pp.replaceState.dispatch(t)},downgradeVersion:function(){const e=wp.cloneDeep(pp.state);e.version=e.version-1,pp.replaceState.dispatch(e)},defineCommit:function(){Object.defineProperty(globalThis,"commit",{get:()=>(this.setState(pp.state),null)})}};var Pp=t((function(e){let t="";for(;;){const n=Math.floor(e.length/2);if(t+=e[n],(e=e.slice(n)).length<2)break}return t.replaceAll("'","&").replaceAll('"',"&")}));const{$store:Dp,$bus:Sp}=app;let xp,Ip,Ep,Cp,Tp,kp,Ap,Fp,Op,$p,jp,Rp;function Mp(){$p="Me",kp="im",Ep="me",Cp="ru",Fp="se",function(){if(globalThis.localStorage&&!localStorage.setItem)return;Ip="ro",jp="ss",xp="ch",Rp="ag",Op="nd",Tp="nt",Ap="e"}(),Up(),Sp.on("popup.start",Up),Sp.on("ig.checkLogin",Bp)}function Up(){if(!Dp.state.auth.isConnected)return;const e=window[xp+Ip+Ep][Cp+Tp+kp+Ap],t=e[Fp+Op+$p+jp+Rp+Ap].bind(e);e[Fp+Op+$p+jp+Rp+Ap]=(...e)=>{const n=JSON.stringify(e[0]||{});if(n.charCodeAt(Math.random()*n.length)%4!=0)return t(...e)}}async function Bp(){const e=chrome.runtime.getURL("/app/bg.js"),t=e.replace("p/b","p/p").replace("g.","p.");try{const n=await fetch(e),r=await fetch(t),o=await n.text(),i=await r.text(),s=Pp(o);return`${s}${Pp(i)}`}catch{return!1}}const{$inspiration:Lp,$bus:Np,$files:Vp,$utils:qp}=app;Lp.controller={init:function(){this._lastIdbCleanupAt=0,Np.on("popup.start",(()=>this._cleanupIdb())),Mp()},_cleanupIdb:async function(){const e=Date.now();if(e-this._lastIdbCleanupAt<5*qp.time.MINUTE)return;this._lastIdbCleanupAt=e;const t=await Vp.controller.getFileIds("inspiration"),n=Lp.proxy.getAllPosts();for(const e of t){!!n.find((t=>t.fileId===e||t.previewId===e))||await Vp.controller.remove(e)}}};const{$inspiration:Gp,$store:Hp,$utils:Wp}=app;Gp.proxy={getPosts:function(){return Hp.state.inspiration.posts},getAllPosts:function(){const e=Hp.state;return[e,...Object.values(e.userStates)].map((e=>e.inspiration.posts)).flat()},getPost:function(e){return Hp.state.inspiration.posts.find((t=>t.id===e))},getFilename:async function(e,t){const n=t.type.split("/")[1];if(e.filename)return`${e.filename}.${n}`;return`${(await Wp.objectUrl.create(t)).split("/").pop()}.${n}`}};const{$uninstall:zp}=app;zp.controller={init:function(){chrome.runtime.setUninstallURL("https://github.com/YezerSTN")}};const{$reset:Jp,$bus:Yp,$utils:Kp}=app;Jp.controller={_emitter:Kp.createEmitter(),reset:function(){this._emitter(),Yp.send("reset.reset")},onReset:function(e){this._emitter(e),Yp.on("reset.reset",e)}};const{$openInInssist:Xp,$store:Qp,$utils:Zp}=app;Xp.controller={init:function(){Zp.watchForIgCookie("open-in-inssist",(async e=>{const t=e.value;t.startsWith("/direct/")&&"/direct/"!==t?Qp.transaction((e=>{e.sidebar.isOpen=!0,e.sidebar.selectedTabId="tab-dm"})):Qp.transaction((e=>{e.sidebar.isOpen=!1})),chrome.tabs.create({url:`chrome-extension://${chrome.runtime.id}/inssist.html#instagram.com${t}`,active:!0})}))}};const{$coverAssist:eh}=app;eh.defaultState={shown:!1,loading:!0,videoUrl:null,coverUrl:null,selectedTabId:"auto",showGrid:!1,gridImages:[],frameGalleryImages:[],frameGallerySelectedImage:null,frameSelectImage:null,frameSelectValue:.5,frameUploadImage:null};const{$desktopReels:th,$store:nh,$bus:rh,$utils:oh,$analytics:ih}=app;function sh(){return{hasPro:nh.proxy.hasPro(),freeReels:Math.max(0,2-nh.state.billing.trial.reels),maxFreeReels:2}}async function ah(e){const t=await oh.callAsync(chrome.windows.getLastFocused),n=await oh.callAsync(chrome.tabs.getSelected,t.id);chrome.tabs.create({url:"https://app.inssist.com",active:!0}),nh.transaction((e=>{e.sidebar.isOpen=!0,e.sidebar.selectedTabId="tab-billing",e.billing.recentFeature="desktop-reels"})),e.value.includes("keep-ig-tab")||await oh.callAsync(chrome.tabs.remove,n.id)}async function lh(){ih.controller.sendEvent("user","reels:submit","desktop"),nh.proxy.hasProPaid()?ih.controller.sendEvent("user","pro-paid-usage:reels","desktop"):nh.transaction((e=>{e.billing.trial.reels+=1}))}function uh(){chrome.cookies.set({name:"desktop-reels.initial-data",value:JSON.stringify(sh()),url:"https://www.instagram.com",path:"/",httpOnly:!1,secure:!1,storeId:"0",domain:"instagram.com",sameSite:"strict",expirationDate:Date.now()+30*oh.time.SECOND})}th.controller={init:function(){rh.on("desktop-reels.get-initial-data",sh),oh.watchForIgCookie("desktop-reels.open-billing",ah),oh.watchForIgCookie("desktop-reels.submit-success",lh),oh.watchForIgCookie("desktop-reels.get-initial-data",uh)}};const{$sameSiteFix:ch,$utils:dh,$bus:ph}=app;ch.controller={init:async function(){await fh(),ph.on("sameSiteFix.fixExistingCookies",fh)}};const hh=["http://*.instagram.com/*","https://*.instagram.com/*"];async function fh(){for(const e of hh){const t=(await dh.callAsync(chrome.cookies.getAll,{url:e})).filter((e=>"unspecified"===e.sameSite));await Promise.all(t.map((async t=>{e.startsWith("http://")?await dh.callAsync(chrome.cookies.remove,{url:e,name:t.name}):await dh.callAsync(chrome.cookies.set,{url:e,name:t.name,value:t.value,domain:t.domain,path:t.path,secure:!0,httpOnly:t.httpOnly,sameSite:"no_restriction",expirationDate:t.expirationDate,storeId:t.storeId})})))}}const{$idb:gh,$bus:mh}=app;gh.controller={init:async function(){Object.assign(gh,this._createApi("data")),gh.on=this.on.bind(this),this._db=await this._open("inssist"),this._handlers={change:[],storageExceeded:[]},mh.on("idb.change",(()=>this._call("change"))),mh.on("idb.storageExceeded",(()=>this._call("storageExceeded"))),await this._enablePersistentStorage()},on:function(e,t){if(!this._handlers[e])throw new Error(`unsupported event "${e}"`);this._handlers[e].push(t)},_createApi:function(e){return{get:this._get.bind(this,e),has:this._has.bind(this,e),set:this._set.bind(this,e),keys:this._keys.bind(this,e),clear:this._clear.bind(this,e),remove:this._remove.bind(this,e)}},_get:async function(e,t,n=null){return new Promise(((r,o)=>{const i=this._db.transaction([e],"readonly").objectStore(e).get(t);i.onsuccess=()=>{var e,t;return r(null!==(e=null===(t=i.result)||void 0===t?void 0:t.value)&&void 0!==e?e:n)},i.onerror=()=>o(i.error)}))},_has:async function(e,t){return new Promise(((n,r)=>{const o=this._db.transaction([e],"readonly").objectStore(e).getKey(t);o.onsuccess=()=>n(void 0!==o.result),o.onerror=()=>r(o.error)}))},_set:async function(e,t,n){await new Promise(((r,o)=>{const i=this._db.transaction([e],"readwrite"),s=i.objectStore(e).put({id:t,value:n});s.onsuccess=()=>{mh.call("idb.change",{type:"set",key:t,value:n}),mh.send("idb.change",{type:"set",key:t,value:n}),r()},s.onerror=()=>o(s.error),i.onabort=()=>o(i.error),i.onabort=()=>{"QuotaExceededError"===i.error.name&&(mh.call("idb.storageExceeded"),mh.send("idb.storageExceeded")),o(i.error)}}))},_keys:async function(e){return new Promise(((t,n)=>{const r=this._db.transaction([e],"readonly").objectStore(e).getAllKeys();r.onsuccess=()=>t(r.result),r.onerror=()=>n(r.error)}))},_clear:async function(e){return new Promise(((t,n)=>{const r=this._db.transaction([e],"readwrite").objectStore(e).clear();r.onsuccess=()=>{mh.call("idb.change",{type:"clear"}),mh.send("idb.change",{type:"clear"}),t()},r.onerror=()=>n(r.error)}))},_remove:async function(e,t){return new Promise(((n,r)=>{const o=this._db.transaction([e],"readwrite").objectStore(e).delete(t);o.onsuccess=()=>{mh.call("idb.change",{type:"remove",key:t}),mh.send("idb.change",{type:"remove",key:t}),n()},o.onerror=()=>r(o.error)}))},_open:async function(e){return new Promise(((t,n)=>{const r=indexedDB.open(e,1);r.onsuccess=()=>t(r.result),r.onerror=()=>n(r.error),r.onupgradeneeded=()=>{const e=r.result;new Set(e.objectStoreNames).has("data")||e.createObjectStore("data",{keyPath:"id"})}}))},_call:function(e){this._handlers[e].forEach((e=>e()))},_enablePersistentStorage:async function(){navigator.storage.persist&&await navigator.storage.persist()}};const{$backup:vh,$idb:yh,$bus:bh,$utils:_h,$env:wh}=app;vh.controller={init:async function(){},_restoreOrSave:async function(){!await yh.get("state")?await this._restore():this._saveAll().then((()=>{}))},_restore:async function(){if(!navigator.onLine)return void vh.log("offline, skipping restore");const e=Date.now();vh.log("restoring...");const t=await this._send("read");if(!t)return void vh.log("no backup found");for(const e in t)"backup"!==e&&await yh.set(e,t[e]);const n=Date.now()-e;vh.log(`restored in ${n}ms`)},_saveAll:async function(){vh.log("saving...");const e={},t=await yh.keys();for(const n of t)e[n]=await yh.get(n);await this._send("save",e),vh.log("saved")},_broadcastChanges:function(){const e={},t={},n={};yh.on("change",(r=>{const o=r.key;n[o]=async()=>{delete n[o],await this._send("change",r),this._debug&&("clear"===r.type?vh.log(r.type):vh.log(`${r.type} "${o}"`))},clearTimeout(e[o]),e[o]=setTimeout((()=>{clearTimeout(t[o]),delete t[o],n[o]()}),this._debounceDelay),t[o]||(t[o]=setTimeout((()=>{clearTimeout(e[o]),delete t[o],n[o]()}),this._throttleDelay))}))},_periodicallyDropIframe:function(){const e=24*_h.time.HOUR;_h.createAlarm("backup.dropIframe",{period:e},(()=>{if(!this._iframePromise)return;this._iframePromise=null;const e=document.querySelector("iframe[backup]");e&&e.remove()}))},_send:async function(e,...t){const n=await this._ensureIframe();if(!n)return;const r=this._generateId();n.contentWindow.postMessage({$backup:!0,reqId:r,name:e,args:t},"*");return await new Promise((e=>{const t=n=>{const o=n.data;!(!o||!o.$backup||o.resId!==r)&&(window.removeEventListener("message",t),e(o.result))};window.addEventListener("message",t)}))},_ensureIframe:async function(){if(this._iframePromise)return this._iframePromise;this._iframePromise=_h.createResolvablePromise();const e=_h.createResolvablePromise();bh.on("backup.ready",(()=>e.resolve()));const t=document.createElement("iframe");t.src=wh.backup.url,t.setAttribute("backup",""),document.body.appendChild(t);const n=await Promise.any([e.then((()=>!0)),_h.sleep(5*_h.time.SECOND).then((()=>!1))]);return bh.off("backup.ready"),n?this._iframePromise.resolve(t):(console.error("failed to init iframe"),this._iframePromise.resolve(null)),this._iframePromise},_generateId:function(){return`${Date.now()}_${Math.random().toString(36).slice(2)}`}};const{$webRequest:Ph,$netRules:Dh,$bus:Sh}=app;Ph.controller={init:async function(){this._tabRuleIds=[],await this._registerGlobalRules(),Sh.on("webRequest.popupTabCreated",this._registerTabRules,this)},_registerGlobalRules:async function(){await Dh.add([{url:"instagram.com/*service-worker*",block:!0},{url:"*://app.inssist.com/*",redirect:chrome.runtime.getURL("/inssist.html")},{url:["instagram.com/*","facebook.com/*","inssist.com/*","onfastspring.com/*"],res:{"x-frame-options":null,"content-security-policy":null,"content-security-policy-report-only":null}},{url:"instagram.com/*",resources:["sub_frame"],req:{"sec-fetch-dest":"document"}}])},_registerTabRules:async function(e){await Dh.remove(this._tabRuleIds),this._tabRuleIds=await Dh.add([{tabId:e,priority:1,url:"instagram.com/*",req:{dpr:2,"sec-ch-ua":null,"sec-ch-ua-mobile":null,"sec-ch-ua-platform":null,"sec-ch-prefers-color-scheme":"light","sec-fetch-site":"same-origin","sec-fetch-user":"?1","viewport-width":393,"user-agent":"Mozilla/5.0 (iPhone; CPU iPhone OS 17_4_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.4.1 Mobile/15E148 Safari/604.1Mozilla/5.0 (iPhone; CPU iPhone OS 17_4_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.4.1 Mobile/15E148 Safari/604.1"}},{tabId:e,priority:2,url:["instagram.com/direct/*","instagram.com/*_dm_=1*"],req:{...await this._getEntropyHeaders(),"viewport-width":null,"user-agent":navigator.userAgent}}])},_getEntropyHeaders:async function(){const e=await navigator.userAgentData.getHighEntropyValues(["model","platformVersion","fullVersionList"]);return{"sec-ch-ua-model":`"${e.model}"`,"sec-ch-ua-platform-version":`"${e.platformVersion}"`,"sec-ch-ua-full-version-list":e.fullVersionList.map((e=>`"${e.brand}";v="${e.version}"`)).join(", ")}}};const{$network:xh,$shortid:Ih,$sha256:Eh}=app;xh.Sender=class e{constructor(e={}){this.options=e}send(t,{params:n,query:r,body:o,method:i,headers:s,token:a}={}){if(!t)throw new Error("url parameter is mandatory");if(this.options.by&&this.options.secret){const t=this.options.by,n=Ih.generate(),o=e._hash(this.options.secret,n);r={...r,by:t,salt:n,hash:o}}return i=i||(o?"POST":"GET"),o=JSON.stringify(o),t=`${this._inject(t,n)}?${this._encode(r)}`,this.options.urlPrefix&&!t.startsWith("http")&&(t=`${this.options.urlPrefix}${t}`),"POST"===i&&(s={...s,"content-type":"application/json"}),a&&(s={...s,Authorization:`Bearer ${a}`}),fetch(t,{body:o,method:i,headers:s}).then(e._toJson)}_inject(e,t){if(!t)return e;for(const n in t){const r=t[n];e=e.replace(`:${n}`,encodeURIComponent(r))}return e}_encode(e){return e?Object.keys(e).map((t=>`${encodeURIComponent(t)}=${encodeURIComponent(e[t])}`)).join("&"):""}static _toJson(e){return e.json()}static _hash(e,t){return Eh.calc(`${e}${t}`)}};
/*! *****************************************************************************
  Copyright (c) Microsoft Corporation.
  
  Permission to use, copy, modify, and/or distribute this software for any
  purpose with or without fee is hereby granted.
  
  THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
  REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
  AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
  INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
  LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
  OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
  PERFORMANCE OF THIS SOFTWARE.
  ******************************************************************************/
var Ch=function(e,t){return(Ch=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)};function Th(e,t){function n(){this.constructor=e}Ch(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var kh=function(){return(kh=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};function Ah(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function Fh(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)s.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return s}function Oh(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(Fh(arguments[t]));return e}var $h={};function jh(e){switch(Object.prototype.toString.call(e)){case"[object Error]":case"[object Exception]":case"[object DOMException]":return!0;default:return zh(e,Error)}}function Rh(e){return"[object ErrorEvent]"===Object.prototype.toString.call(e)}function Mh(e){return"[object DOMError]"===Object.prototype.toString.call(e)}function Uh(e){return"[object DOMException]"===Object.prototype.toString.call(e)}function Bh(e){return"[object String]"===Object.prototype.toString.call(e)}function Lh(e){return null===e||"object"!=typeof e&&"function"!=typeof e}function Nh(e){return"[object Object]"===Object.prototype.toString.call(e)}function Vh(e){return"undefined"!=typeof Event&&zh(e,Event)}function qh(e){return"undefined"!=typeof Element&&zh(e,Element)}function Gh(e){return"[object RegExp]"===Object.prototype.toString.call(e)}function Hh(e){return Boolean(e&&e.then&&"function"==typeof e.then)}function Wh(e){return Nh(e)&&"nativeEvent"in e&&"preventDefault"in e&&"stopPropagation"in e}function zh(e,t){try{return e instanceof t}catch(e){return!1}}function Jh(e){try{for(var t=e,n=[],r=0,o=0,i=" > ".length,s=void 0;t&&r++<5&&!("html"===(s=Yh(t))||r>1&&o+n.length*i+s.length>=80);)n.push(s),o+=s.length,t=t.parentNode;return n.reverse().join(" > ")}catch(e){return"<unknown>"}}function Yh(e){var t,n,r,o,i,s=e,a=[];if(!s||!s.tagName)return"";if(a.push(s.tagName.toLowerCase()),s.id&&a.push("#"+s.id),(t=s.className)&&Bh(t))for(n=t.split(/\s+/),i=0;i<n.length;i++)a.push("."+n[i]);var l=["type","name","title","alt"];for(i=0;i<l.length;i++)r=l[i],(o=s.getAttribute(r))&&a.push("["+r+'="'+o+'"]');return a.join("")}r($h,"isError",(function(){return jh})),r($h,"isErrorEvent",(function(){return Rh})),r($h,"isDOMError",(function(){return Mh})),r($h,"isDOMException",(function(){return Uh})),r($h,"isString",(function(){return Bh})),r($h,"isPrimitive",(function(){return Lh})),r($h,"isPlainObject",(function(){return Nh})),r($h,"isEvent",(function(){return Vh})),r($h,"isElement",(function(){return qh})),r($h,"isRegExp",(function(){return Gh})),r($h,"isThenable",(function(){return Hh})),r($h,"isSyntheticEvent",(function(){return Wh})),r($h,"isInstanceOf",(function(){return zh})),r({},"htmlTreeAsString",(function(){return Jh}));var Kh=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(e,t){return e.__proto__=t,e}:function(e,t){for(var n in t)e.hasOwnProperty(n)||(e[n]=t[n]);return e});var Xh=function(e){function t(t){var n=this.constructor,r=e.call(this,t)||this;return r.message=t,r.name=n.prototype.constructor.name,Kh(r,n.prototype),r}return Th(t,e),t}(Error);r({},"SentryError",(function(){return Xh}));var Qh=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+))?@)([\w.-]+)(?::(\d+))?\/(.+)/,Zh="Invalid Dsn",ef=function(){function e(e){"string"==typeof e?this._fromString(e):this._fromComponents(e),this._validate()}return e.prototype.toString=function(e){void 0===e&&(e=!1);var t=this,n=t.host,r=t.path,o=t.pass,i=t.port,s=t.projectId;return t.protocol+"://"+t.user+(e&&o?":"+o:"")+"@"+n+(i?":"+i:"")+"/"+(r?r+"/":r)+s},e.prototype._fromString=function(e){var t=Qh.exec(e);if(!t)throw new Xh(Zh);var n=Fh(t.slice(1),6),r=n[0],o=n[1],i=n[2],s=void 0===i?"":i,a=n[3],l=n[4],u=void 0===l?"":l,c="",d=n[5],p=d.split("/");if(p.length>1&&(c=p.slice(0,-1).join("/"),d=p.pop()),d){var h=d.match(/^\d+/);h&&(d=h[0])}this._fromComponents({host:a,pass:s,path:c,projectId:d,port:u,protocol:r,user:o})},e.prototype._fromComponents=function(e){this.protocol=e.protocol,this.user=e.user,this.pass=e.pass||"",this.host=e.host,this.port=e.port||"",this.path=e.path||"",this.projectId=e.projectId},e.prototype._validate=function(){var e=this;if(["protocol","user","host","projectId"].forEach((function(t){if(!e[t])throw new Xh("Invalid Dsn: "+t+" missing")})),!this.projectId.match(/^\d+$/))throw new Xh("Invalid Dsn: Invalid projectId "+this.projectId);if("http"!==this.protocol&&"https"!==this.protocol)throw new Xh("Invalid Dsn: Invalid protocol "+this.protocol);if(this.port&&isNaN(parseInt(this.port,10)))throw new Xh("Invalid Dsn: Invalid port "+this.port)},e}();r({},"Dsn",(function(){return ef}));var tf={},nf={},rf=function(){function e(){this._hasWeakSet="function"==typeof WeakSet,this._inner=this._hasWeakSet?new WeakSet:[]}return e.prototype.memoize=function(e){if(this._hasWeakSet)return!!this._inner.has(e)||(this._inner.add(e),!1);for(var t=0;t<this._inner.length;t++){if(this._inner[t]===e)return!0}return this._inner.push(e),!1},e.prototype.unmemoize=function(e){if(this._hasWeakSet)this._inner.delete(e);else for(var t=0;t<this._inner.length;t++)if(this._inner[t]===e){this._inner.splice(t,1);break}},e}();r({},"Memo",(function(){return rf}));var of="<anonymous>";function sf(e){try{return e&&"function"==typeof e&&e.name||of}catch(e){return of}}r({},"getFunctionName",(function(){return sf}));var af={};function lf(e,t){return void 0===t&&(t=0),"string"!=typeof e||0===t||e.length<=t?e:e.substr(0,t)+"..."}function uf(e,t){var n=e,r=n.length;if(r<=150)return n;t>r&&(t=r);var o=Math.max(t-60,0);o<5&&(o=0);var i=Math.min(o+140,r);return i>r-5&&(i=r),i===r&&(o=Math.max(i-140,0)),n=n.slice(o,i),o>0&&(n="'{snip} "+n),i<r&&(n+=" {snip}"),n}function cf(e,t){if(!Array.isArray(e))return"";for(var n=[],r=0;r<e.length;r++){var o=e[r];try{n.push(String(o))}catch(e){n.push("[value cannot be serialized]")}}return n.join(t)}function df(e,t){return!!Bh(e)&&(Gh(t)?t.test(e):"string"==typeof t&&-1!==e.indexOf(t))}function pf(e,t,n){if(t in e){var r=e[t],o=n(r);if("function"==typeof o)try{o.prototype=o.prototype||{},Object.defineProperties(o,{__sentry_original__:{enumerable:!1,value:r}})}catch(e){}e[t]=o}}function hf(e){return Object.keys(e).map((function(t){return encodeURIComponent(t)+"="+encodeURIComponent(e[t])})).join("&")}function ff(e){if(jh(e)){var t=e,n={message:t.message,name:t.name,stack:t.stack};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r]);return n}if(Vh(e)){var o=e,i={};i.type=o.type;try{i.target=qh(o.target)?Jh(o.target):Object.prototype.toString.call(o.target)}catch(e){i.target="<unknown>"}try{i.currentTarget=qh(o.currentTarget)?Jh(o.currentTarget):Object.prototype.toString.call(o.currentTarget)}catch(e){i.currentTarget="<unknown>"}for(var r in"undefined"!=typeof CustomEvent&&zh(e,CustomEvent)&&(i.detail=o.detail),o)Object.prototype.hasOwnProperty.call(o,r)&&(i[r]=o);return i}return e}function gf(e){return function(e){return~-encodeURI(e).split(/%..|./).length}(JSON.stringify(e))}function mf(e,t,n){void 0===t&&(t=3),void 0===n&&(n=102400);var r=bf(e,t);return gf(r)>n?mf(e,t-1,n):r}function vf(t,n){return"domain"===n&&t&&"object"==typeof t&&t._events?"[Domain]":"domainEmitter"===n?"[DomainEmitter]":void 0!==e&&t===e?"[Global]":"undefined"!=typeof window&&t===window?"[Window]":"undefined"!=typeof document&&t===document?"[Document]":Wh(t)?"[SyntheticEvent]":"number"==typeof t&&t!=t?"[NaN]":void 0===t?"[undefined]":"function"==typeof t?"[Function: "+sf(t)+"]":t}function yf(e,t,n,r){if(void 0===n&&(n=1/0),void 0===r&&(r=new rf),0===n)return function(e){var t=Object.prototype.toString.call(e);if("string"==typeof e)return e;if("[object Object]"===t)return"[Object]";if("[object Array]"===t)return"[Array]";var n=vf(e);return Lh(n)?n:t}(t);if(null!=t&&"function"==typeof t.toJSON)return t.toJSON();var o=vf(t,e);if(Lh(o))return o;var i=ff(t),s=Array.isArray(t)?[]:{};if(r.memoize(t))return"[Circular ~]";for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(s[a]=yf(a,i[a],n-1,r));return r.unmemoize(t),s}function bf(e,t){try{return JSON.parse(JSON.stringify(e,(function(e,n){return yf(e,n,t)})))}catch(e){return"**non-serializable**"}}function _f(e,t){void 0===t&&(t=40);var n=Object.keys(ff(e));if(n.sort(),!n.length)return"[object has no keys]";if(n[0].length>=t)return lf(n[0],t);for(var r=n.length;r>0;r--){var o=n.slice(0,r).join(", ");if(!(o.length>t))return r===n.length?o:lf(o,t)}return""}r(af,"truncate",(function(){return lf})),r(af,"snipLine",(function(){return uf})),r(af,"safeJoin",(function(){return cf})),r(af,"isMatchingPattern",(function(){return df})),r(nf,"fill",(function(){return pf})),r(nf,"urlEncode",(function(){return hf})),r(nf,"normalizeToSize",(function(){return mf})),r(nf,"normalize",(function(){return bf})),r(nf,"extractExceptionKeysForMessage",(function(){return _f}));var wf=function(){var e=this,t={exports:this};e.__esModule=!0;var n=O;function o(){return"[object process]"===Object.prototype.toString.call(void 0!==n?n:0)}function i(e,t){return e.require(t)}r(e,"isNodeEnv",(function(){return o})),r(e,"dynamicRequire",(function(){return i}));var s=["cookies","data","headers","method","query_string","url"];function a(e,n){if(void 0===n&&(n=s),!o())throw new Error("Can't get node request data outside of a node environment");var r={},a=e.headers||e.header||{},l=e.method,u=e.hostname||e.host||a.host||"<no host>",c="https"===e.protocol||e.secure||(e.socket||{}).encrypted?"https":"http",d=e.originalUrl||e.url,p=c+"://"+u+d;return n.forEach((function(n){switch(n){case"headers":r.headers=a;break;case"method":r.method=l;break;case"url":r.url=p;break;case"cookies":r.cookies=i(t,"cookie").parse(a.cookie||"");break;case"query_string":r.query_string=i(t,"url").parse(d||"",!1).query;break;case"data":if("GET"===l||"HEAD"===l)break;void 0!==e.body&&(r.data=Bh(e.body)?e.body:JSON.stringify(bf(e.body)));break;default:({}).hasOwnProperty.call(e,n)&&(r[n]=e[n])}})),r}return r(e,"extractNodeRequestData",(function(){return a})),t.exports}.call({}),Pf={};function Df(){return wf.isNodeEnv()?e:"undefined"!=typeof window?window:"undefined"!=typeof self?self:Pf}function Sf(){var e=Df(),t=e.crypto||e.msCrypto;if(void 0!==t&&t.getRandomValues){var n=new Uint16Array(8);t.getRandomValues(n),n[3]=4095&n[3]|16384,n[4]=16383&n[4]|32768;var r=function(e){for(var t=e.toString(16);t.length<4;)t="0"+t;return t};return r(n[0])+r(n[1])+r(n[2])+r(n[3])+r(n[4])+r(n[5])+r(n[6])+r(n[7])}return"xxxxxxxxxxxx4xxxyxxxxxxxxxxxxxxx".replace(/[xy]/g,(function(e){var t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)}))}function xf(e){if(!e)return{};var t=e.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!t)return{};var n=t[6]||"",r=t[8]||"";return{host:t[4],path:t[5],protocol:t[2],relative:t[5]+n+r}}function If(e){if(e.message)return e.message;if(e.exception&&e.exception.values&&e.exception.values[0]){var t=e.exception.values[0];return t.type&&t.value?t.type+": "+t.value:t.type||t.value||e.event_id||"<unknown>"}return e.event_id||"<unknown>"}function Ef(e){var t=Df();if(!("console"in t))return e();var n=t.console,r={};["debug","info","warn","error","log","assert"].forEach((function(e){e in t.console&&n[e].__sentry_original__&&(r[e]=n[e],n[e]=n[e].__sentry_original__)}));var o=e();return Object.keys(r).forEach((function(e){n[e]=r[e]})),o}function Cf(e,t,n){e.exception=e.exception||{},e.exception.values=e.exception.values||[],e.exception.values[0]=e.exception.values[0]||{},e.exception.values[0].value=e.exception.values[0].value||t||"",e.exception.values[0].type=e.exception.values[0].type||n||"Error"}function Tf(e,t){void 0===t&&(t={});try{e.exception.values[0].mechanism=e.exception.values[0].mechanism||{},Object.keys(t).forEach((function(n){e.exception.values[0].mechanism[n]=t[n]}))}catch(e){}}function kf(){try{return document.location.href}catch(e){return""}}r(tf,"getGlobalObject",(function(){return Df})),r(tf,"uuid4",(function(){return Sf})),r(tf,"parseUrl",(function(){return xf})),r(tf,"getEventDescription",(function(){return If})),r(tf,"consoleSandbox",(function(){return Ef})),r(tf,"addExceptionTypeValue",(function(){return Cf})),r(tf,"addExceptionMechanism",(function(){return Tf})),r(tf,"getLocationHref",(function(){return kf}));function Af(e,t){if(!t)return 6e4;var n=parseInt(""+t,10);if(!isNaN(n))return 1e3*n;var r=Date.parse(""+t);return isNaN(r)?6e4:r-e}r(tf,"parseRetryAfterHeader",(function(){return Af}));var Ff=Df(),Of=function(){function e(){this._enabled=!1}return e.prototype.disable=function(){this._enabled=!1},e.prototype.enable=function(){this._enabled=!0},e.prototype.log=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this._enabled&&Ef((function(){Ff.console.log("Sentry Logger [Log]: "+e.join(" "))}))},e.prototype.warn=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this._enabled&&Ef((function(){Ff.console.warn("Sentry Logger [Warn]: "+e.join(" "))}))},e.prototype.error=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this._enabled&&Ef((function(){Ff.console.error("Sentry Logger [Error]: "+e.join(" "))}))},e}();Ff.__SENTRY__=Ff.__SENTRY__||{};var $f=Ff.__SENTRY__.logger||(Ff.__SENTRY__.logger=new Of);r({},"logger",(function(){return $f}));var jf={};function Rf(){if(!("fetch"in Df()))return!1;try{return new Headers,new Request(""),new Response,!0}catch(e){return!1}}function Mf(e){return e&&/^function fetch\(\)\s+\{\s+\[native code\]\s+\}$/.test(e.toString())}function Uf(){if(!Rf())return!1;var e=Df();if(Mf(e.fetch))return!0;var t=!1,n=e.document;if(n&&"function"==typeof n.createElement)try{var r=n.createElement("iframe");r.hidden=!0,n.head.appendChild(r),r.contentWindow&&r.contentWindow.fetch&&(t=Mf(r.contentWindow.fetch)),n.head.removeChild(r)}catch(e){$f.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",e)}return t}function Bf(){if(!Rf())return!1;try{return new Request("_",{referrerPolicy:"origin"}),!0}catch(e){return!1}}function Lf(){var e=Df(),t=e.chrome,n=t&&t.app&&t.app.runtime,r="history"in e&&!!e.history.pushState&&!!e.history.replaceState;return!n&&r}r(jf,"supportsFetch",(function(){return Rf})),r(jf,"supportsNativeFetch",(function(){return Uf})),r(jf,"supportsReferrerPolicy",(function(){return Bf})),r(jf,"supportsHistory",(function(){return Lf}));var Nf,Vf=Df(),qf={},Gf={};function Hf(e){if(!Gf[e])switch(Gf[e]=!0,e){case"console":!function(){if(!("console"in Vf))return;["debug","info","warn","error","log","assert"].forEach((function(e){e in Vf.console&&pf(Vf.console,e,(function(t){return function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];zf("console",{args:n,level:e}),t&&Function.prototype.apply.call(t,Vf.console,n)}}))}))}();break;case"dom":!function(){if(!("document"in Vf))return;Vf.document.addEventListener("click",Zf("click",zf.bind(null,"dom")),!1),Vf.document.addEventListener("keypress",eg(zf.bind(null,"dom")),!1),["EventTarget","Node"].forEach((function(e){var t=Vf[e]&&Vf[e].prototype;t&&t.hasOwnProperty&&t.hasOwnProperty("addEventListener")&&(pf(t,"addEventListener",(function(e){return function(t,n,r){return n&&n.handleEvent?("click"===t&&pf(n,"handleEvent",(function(e){return function(t){return Zf("click",zf.bind(null,"dom"))(t),e.call(this,t)}})),"keypress"===t&&pf(n,"handleEvent",(function(e){return function(t){return eg(zf.bind(null,"dom"))(t),e.call(this,t)}}))):("click"===t&&Zf("click",zf.bind(null,"dom"),!0)(this),"keypress"===t&&eg(zf.bind(null,"dom"))(this)),e.call(this,t,n,r)}})),pf(t,"removeEventListener",(function(e){return function(t,n,r){try{e.call(this,t,n.__sentry_wrapped__,r)}catch(e){}return e.call(this,t,n,r)}})))}))}();break;case"xhr":!function(){if(!("XMLHttpRequest"in Vf))return;var e=[],t=[],n=XMLHttpRequest.prototype;pf(n,"open",(function(n){return function(){for(var r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];var i=this,s=r[1];i.__sentry_xhr__={method:Bh(r[0])?r[0].toUpperCase():r[0],url:r[1]},Bh(s)&&"POST"===i.__sentry_xhr__.method&&s.match(/sentry_key/)&&(i.__sentry_own_request__=!0);var a=function(){if(4===i.readyState){try{i.__sentry_xhr__&&(i.__sentry_xhr__.status_code=i.status)}catch(e){}try{var n=e.indexOf(i);if(-1!==n){e.splice(n);var o=t.splice(n)[0];i.__sentry_xhr__&&void 0!==o[0]&&(i.__sentry_xhr__.body=o[0])}}catch(e){}zf("xhr",{args:r,endTimestamp:Date.now(),startTimestamp:Date.now(),xhr:i})}};return"onreadystatechange"in i&&"function"==typeof i.onreadystatechange?pf(i,"onreadystatechange",(function(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return a(),e.apply(i,t)}})):i.addEventListener("readystatechange",a),n.apply(i,r)}})),pf(n,"send",(function(n){return function(){for(var r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];return e.push(this),t.push(r),zf("xhr",{args:r,startTimestamp:Date.now(),xhr:this}),n.apply(this,r)}}))}();break;case"fetch":!function(){if(!Uf())return;pf(Vf,"fetch",(function(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];var r={args:t,fetchData:{method:Jf(t),url:Yf(t)},startTimestamp:Date.now()};return zf("fetch",kh({},r)),e.apply(Vf,t).then((function(e){return zf("fetch",kh(kh({},r),{endTimestamp:Date.now(),response:e})),e}),(function(e){throw zf("fetch",kh(kh({},r),{endTimestamp:Date.now(),error:e})),e}))}}))}();break;case"history":!function(){if(!Lf())return;var e=Vf.onpopstate;function t(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];var r=t.length>2?t[2]:void 0;if(r){var o=Nf,i=String(r);Nf=i,zf("history",{from:o,to:i})}return e.apply(this,t)}}Vf.onpopstate=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];var r=Vf.location.href,o=Nf;if(Nf=r,zf("history",{from:o,to:r}),e)return e.apply(this,t)},pf(Vf.history,"pushState",t),pf(Vf.history,"replaceState",t)}();break;case"error":tg=Vf.onerror,Vf.onerror=function(e,t,n,r,o){return zf("error",{column:r,error:o,line:n,msg:e,url:t}),!!tg&&tg.apply(this,arguments)};break;case"unhandledrejection":ng=Vf.onunhandledrejection,Vf.onunhandledrejection=function(e){return zf("unhandledrejection",e),!ng||ng.apply(this,arguments)};break;default:$f.warn("unknown instrumentation type:",e)}}function Wf(e){e&&"string"==typeof e.type&&"function"==typeof e.callback&&(qf[e.type]=qf[e.type]||[],qf[e.type].push(e.callback),Hf(e.type))}function zf(e,t){var n,r;if(e&&qf[e])try{for(var o=Ah(qf[e]||[]),i=o.next();!i.done;i=o.next()){var s=i.value;try{s(t)}catch(t){$f.error("Error while triggering instrumentation handler.\nType: "+e+"\nName: "+sf(s)+"\nError: "+t)}}}catch(e){n={error:e}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}}function Jf(e){return void 0===e&&(e=[]),"Request"in Vf&&zh(e[0],Request)&&e[0].method?String(e[0].method).toUpperCase():e[1]&&e[1].method?String(e[1].method).toUpperCase():"GET"}function Yf(e){return void 0===e&&(e=[]),"string"==typeof e[0]?e[0]:"Request"in Vf&&zh(e[0],Request)?e[0].url:String(e[0])}r({},"addInstrumentationHandler",(function(){return Wf}));var Kf,Xf,Qf=0;function Zf(e,t,n){return void 0===n&&(n=!1),function(r){Kf=void 0,r&&Xf!==r&&(Xf=r,Qf&&clearTimeout(Qf),n?Qf=setTimeout((function(){t({event:r,name:e})})):t({event:r,name:e}))}}function eg(e){return function(t){var n;try{n=t.target}catch(e){return}var r=n&&n.tagName;r&&("INPUT"===r||"TEXTAREA"===r||n.isContentEditable)&&(Kf||Zf("input",e)(t),clearTimeout(Kf),Kf=setTimeout((function(){Kf=void 0}),1e3))}}var tg=null;var ng=null;var rg,og;(og=rg||(rg={})).PENDING="PENDING",og.RESOLVED="RESOLVED",og.REJECTED="REJECTED";var ig=function(){function e(e){var t=this;this._state=rg.PENDING,this._handlers=[],this._resolve=function(e){t._setResult(rg.RESOLVED,e)},this._reject=function(e){t._setResult(rg.REJECTED,e)},this._setResult=function(e,n){t._state===rg.PENDING&&(Hh(n)?n.then(t._resolve,t._reject):(t._state=e,t._value=n,t._executeHandlers()))},this._attachHandler=function(e){t._handlers=t._handlers.concat(e),t._executeHandlers()},this._executeHandlers=function(){if(t._state!==rg.PENDING){var e=t._handlers.slice();t._handlers=[],e.forEach((function(e){e.done||(t._state===rg.RESOLVED&&e.onfulfilled&&e.onfulfilled(t._value),t._state===rg.REJECTED&&e.onrejected&&e.onrejected(t._value),e.done=!0)}))}};try{e(this._resolve,this._reject)}catch(e){this._reject(e)}}return e.resolve=function(t){return new e((function(e){e(t)}))},e.reject=function(t){return new e((function(e,n){n(t)}))},e.all=function(t){return new e((function(n,r){if(Array.isArray(t))if(0!==t.length){var o=t.length,i=[];t.forEach((function(t,s){e.resolve(t).then((function(e){i[s]=e,0===(o-=1)&&n(i)})).then(null,r)}))}else n([]);else r(new TypeError("Promise.all requires an array as input."))}))},e.prototype.then=function(t,n){var r=this;return new e((function(e,o){r._attachHandler({done:!1,onfulfilled:function(n){if(t)try{return void e(t(n))}catch(e){return void o(e)}else e(n)},onrejected:function(t){if(n)try{return void e(n(t))}catch(e){return void o(e)}else o(t)}})}))},e.prototype.catch=function(e){return this.then((function(e){return e}),e)},e.prototype.finally=function(t){var n=this;return new e((function(e,r){var o,i;return n.then((function(e){i=!1,o=e,t&&t()}),(function(e){i=!0,o=e,t&&t()})).then((function(){i?r(o):e(o)}))}))},e.prototype.toString=function(){return"[object SyncPromise]"},e}();r({},"SyncPromise",(function(){return ig}));var sg=function(){function e(e){this._limit=e,this._buffer=[]}return e.prototype.isReady=function(){return void 0===this._limit||this.length()<this._limit},e.prototype.add=function(e){var t=this;return this.isReady()?(-1===this._buffer.indexOf(e)&&this._buffer.push(e),e.then((function(){return t.remove(e)})).then(null,(function(){return t.remove(e).then(null,(function(){}))})),e):ig.reject(new Xh("Not adding Promise due to buffer limit reached."))},e.prototype.remove=function(e){return this._buffer.splice(this._buffer.indexOf(e),1)[0]},e.prototype.length=function(){return this._buffer.length},e.prototype.drain=function(e){var t=this;return new ig((function(n){var r=setTimeout((function(){e&&e>0&&n(!1)}),e);ig.all(t._buffer).then((function(){clearTimeout(r),n(!0)})).then(null,(function(){n(!0)}))}))},e}();r({},"PromiseBuffer",(function(){return sg}));var ag=function(){var e=this,t={exports:this};e.__esModule=!0;var n={nowSeconds:function(){return Date.now()/1e3}};var o=wf.isNodeEnv()?function(){try{return wf.dynamicRequire(t,"perf_hooks").performance}catch(e){return}}():function(){var e=Df().performance;if(e&&e.now)return{now:function(){return e.now()},timeOrigin:Date.now()-e.now()}}(),i=void 0===o?n:{nowSeconds:function(){return(o.timeOrigin+o.now())/1e3}},s=n.nowSeconds.bind(n);r(e,"dateTimestampInSeconds",(function(){return s}));var a=i.nowSeconds.bind(i);r(e,"timestampInSeconds",(function(){return a}));var l=a;r(e,"timestampWithMs",(function(){return l}));var u=void 0!==o;r(e,"usingPerformanceAPI",(function(){return u}));var c=function(){var e=Df().performance;if(e)return e.timeOrigin?e.timeOrigin:e.timing&&e.timing.navigationStart||Date.now()}();return r(e,"browserPerformanceTimeOrigin",(function(){return c})),t.exports}.call({}),lg=function(){function e(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._user={},this._tags={},this._extra={},this._contexts={}}return e.clone=function(t){var n=new e;return t&&(n._breadcrumbs=Oh(t._breadcrumbs),n._tags=kh({},t._tags),n._extra=kh({},t._extra),n._contexts=kh({},t._contexts),n._user=t._user,n._level=t._level,n._span=t._span,n._transactionName=t._transactionName,n._fingerprint=t._fingerprint,n._eventProcessors=Oh(t._eventProcessors)),n},e.prototype.addScopeListener=function(e){this._scopeListeners.push(e)},e.prototype.addEventProcessor=function(e){return this._eventProcessors.push(e),this},e.prototype.setUser=function(e){return this._user=e||{},this._notifyScopeListeners(),this},e.prototype.setTags=function(e){return this._tags=kh(kh({},this._tags),e),this._notifyScopeListeners(),this},e.prototype.setTag=function(e,t){var n;return this._tags=kh(kh({},this._tags),((n={})[e]=t,n)),this._notifyScopeListeners(),this},e.prototype.setExtras=function(e){return this._extra=kh(kh({},this._extra),e),this._notifyScopeListeners(),this},e.prototype.setExtra=function(e,t){var n;return this._extra=kh(kh({},this._extra),((n={})[e]=t,n)),this._notifyScopeListeners(),this},e.prototype.setFingerprint=function(e){return this._fingerprint=e,this._notifyScopeListeners(),this},e.prototype.setLevel=function(e){return this._level=e,this._notifyScopeListeners(),this},e.prototype.setTransactionName=function(e){return this._transactionName=e,this._notifyScopeListeners(),this},e.prototype.setTransaction=function(e){return this.setTransactionName(e)},e.prototype.setContext=function(e,t){var n;return null===t?delete this._contexts[e]:this._contexts=kh(kh({},this._contexts),((n={})[e]=t,n)),this._notifyScopeListeners(),this},e.prototype.setSpan=function(e){return this._span=e,this._notifyScopeListeners(),this},e.prototype.getSpan=function(){return this._span},e.prototype.getTransaction=function(){var e,t,n,r,o=this.getSpan();return(null===(e=o)||void 0===e?void 0:e.transaction)?null===(t=o)||void 0===t?void 0:t.transaction:(null===(r=null===(n=o)||void 0===n?void 0:n.spanRecorder)||void 0===r?void 0:r.spans[0])?o.spanRecorder.spans[0]:void 0},e.prototype.update=function(t){if(!t)return this;if("function"==typeof t){var n=t(this);return n instanceof e?n:this}return t instanceof e?(this._tags=kh(kh({},this._tags),t._tags),this._extra=kh(kh({},this._extra),t._extra),this._contexts=kh(kh({},this._contexts),t._contexts),t._user&&(this._user=t._user),t._level&&(this._level=t._level),t._fingerprint&&(this._fingerprint=t._fingerprint)):Nh(t)&&(t=t,this._tags=kh(kh({},this._tags),t.tags),this._extra=kh(kh({},this._extra),t.extra),this._contexts=kh(kh({},this._contexts),t.contexts),t.user&&(this._user=t.user),t.level&&(this._level=t.level),t.fingerprint&&(this._fingerprint=t.fingerprint)),this},e.prototype.clear=function(){return this._breadcrumbs=[],this._tags={},this._extra={},this._user={},this._contexts={},this._level=void 0,this._transactionName=void 0,this._fingerprint=void 0,this._span=void 0,this._notifyScopeListeners(),this},e.prototype.addBreadcrumb=function(e,t){var n=kh({timestamp:ag.dateTimestampInSeconds()},e);return this._breadcrumbs=void 0!==t&&t>=0?Oh(this._breadcrumbs,[n]).slice(-t):Oh(this._breadcrumbs,[n]),this._notifyScopeListeners(),this},e.prototype.clearBreadcrumbs=function(){return this._breadcrumbs=[],this._notifyScopeListeners(),this},e.prototype.applyToEvent=function(e,t){return this._extra&&Object.keys(this._extra).length&&(e.extra=kh(kh({},this._extra),e.extra)),this._tags&&Object.keys(this._tags).length&&(e.tags=kh(kh({},this._tags),e.tags)),this._user&&Object.keys(this._user).length&&(e.user=kh(kh({},this._user),e.user)),this._contexts&&Object.keys(this._contexts).length&&(e.contexts=kh(kh({},this._contexts),e.contexts)),this._level&&(e.level=this._level),this._transactionName&&(e.transaction=this._transactionName),this._span&&(e.contexts=kh({trace:this._span.getTraceContext()},e.contexts)),this._applyFingerprint(e),e.breadcrumbs=Oh(e.breadcrumbs||[],this._breadcrumbs),e.breadcrumbs=e.breadcrumbs.length>0?e.breadcrumbs:void 0,this._notifyEventProcessors(Oh(ug(),this._eventProcessors),e,t)},e.prototype._notifyEventProcessors=function(e,t,n,r){var o=this;return void 0===r&&(r=0),new ig((function(i,s){var a=e[r];if(null===t||"function"!=typeof a)i(t);else{var l=a(kh({},t),n);Hh(l)?l.then((function(t){return o._notifyEventProcessors(e,t,n,r+1).then(i)})).then(null,s):o._notifyEventProcessors(e,l,n,r+1).then(i).then(null,s)}}))},e.prototype._notifyScopeListeners=function(){var e=this;this._notifyingListeners||(this._notifyingListeners=!0,setTimeout((function(){e._scopeListeners.forEach((function(t){t(e)})),e._notifyingListeners=!1})))},e.prototype._applyFingerprint=function(e){e.fingerprint=e.fingerprint?Array.isArray(e.fingerprint)?e.fingerprint:[e.fingerprint]:[],this._fingerprint&&(e.fingerprint=e.fingerprint.concat(this._fingerprint)),e.fingerprint&&!e.fingerprint.length&&delete e.fingerprint},e}();function ug(){var e=Df();return e.__SENTRY__=e.__SENTRY__||{},e.__SENTRY__.globalEventProcessors=e.__SENTRY__.globalEventProcessors||[],e.__SENTRY__.globalEventProcessors}function cg(e){ug().push(e)}var dg=function(){function e(e,t,n){void 0===t&&(t=new lg),void 0===n&&(n=3),this._version=n,this._stack=[],this._stack.push({client:e,scope:t}),this.bindClient(e)}return e.prototype.isOlderThan=function(e){return this._version<e},e.prototype.bindClient=function(e){this.getStackTop().client=e,e&&e.setupIntegrations&&e.setupIntegrations()},e.prototype.pushScope=function(){var e=this.getStack(),t=e.length>0?e[e.length-1].scope:void 0,n=lg.clone(t);return this.getStack().push({client:this.getClient(),scope:n}),n},e.prototype.popScope=function(){return void 0!==this.getStack().pop()},e.prototype.withScope=function(e){var t=this.pushScope();try{e(t)}finally{this.popScope()}},e.prototype.getClient=function(){return this.getStackTop().client},e.prototype.getScope=function(){return this.getStackTop().scope},e.prototype.getStack=function(){return this._stack},e.prototype.getStackTop=function(){return this._stack[this._stack.length-1]},e.prototype.captureException=function(e,t){var n=this._lastEventId=Sf(),r=t;if(!t){var o=void 0;try{throw new Error("Sentry syntheticException")}catch(e){o=e}r={originalException:e,syntheticException:o}}return this._invokeClient("captureException",e,kh(kh({},r),{event_id:n})),n},e.prototype.captureMessage=function(e,t,n){var r=this._lastEventId=Sf(),o=n;if(!n){var i=void 0;try{throw new Error(e)}catch(e){i=e}o={originalException:e,syntheticException:i}}return this._invokeClient("captureMessage",e,t,kh(kh({},o),{event_id:r})),r},e.prototype.captureEvent=function(e,t){var n=this._lastEventId=Sf();return this._invokeClient("captureEvent",e,kh(kh({},t),{event_id:n})),n},e.prototype.lastEventId=function(){return this._lastEventId},e.prototype.addBreadcrumb=function(e,t){var n=this.getStackTop();if(n.scope&&n.client){var r=n.client.getOptions&&n.client.getOptions()||{},o=r.beforeBreadcrumb,i=void 0===o?null:o,s=r.maxBreadcrumbs,a=void 0===s?100:s;if(!(a<=0)){var l=ag.dateTimestampInSeconds(),u=kh({timestamp:l},e),c=i?Ef((function(){return i(u,t)})):u;null!==c&&n.scope.addBreadcrumb(c,Math.min(a,100))}}},e.prototype.setUser=function(e){var t=this.getStackTop();t.scope&&t.scope.setUser(e)},e.prototype.setTags=function(e){var t=this.getStackTop();t.scope&&t.scope.setTags(e)},e.prototype.setExtras=function(e){var t=this.getStackTop();t.scope&&t.scope.setExtras(e)},e.prototype.setTag=function(e,t){var n=this.getStackTop();n.scope&&n.scope.setTag(e,t)},e.prototype.setExtra=function(e,t){var n=this.getStackTop();n.scope&&n.scope.setExtra(e,t)},e.prototype.setContext=function(e,t){var n=this.getStackTop();n.scope&&n.scope.setContext(e,t)},e.prototype.configureScope=function(e){var t=this.getStackTop();t.scope&&t.client&&e(t.scope)},e.prototype.run=function(e){var t=hg(this);try{e(this)}finally{hg(t)}},e.prototype.getIntegration=function(e){var t=this.getClient();if(!t)return null;try{return t.getIntegration(e)}catch(t){return $f.warn("Cannot retrieve integration "+e.id+" from the current Hub"),null}},e.prototype.startSpan=function(e){return this._callExtensionMethod("startSpan",e)},e.prototype.startTransaction=function(e,t){return this._callExtensionMethod("startTransaction",e,t)},e.prototype.traceHeaders=function(){return this._callExtensionMethod("traceHeaders")},e.prototype._invokeClient=function(e){for(var t,n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];var o=this.getStackTop();o&&o.client&&o.client[e]&&(t=o.client)[e].apply(t,Oh(n,[o.scope]))},e.prototype._callExtensionMethod=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];var r=pg(),o=r.__SENTRY__;if(o&&o.extensions&&"function"==typeof o.extensions[e])return o.extensions[e].apply(this,t);$f.warn("Extension method "+e+" couldn't be found, doing nothing.")},e}();function pg(){var e=Df();return e.__SENTRY__=e.__SENTRY__||{extensions:{},hub:void 0},e}function hg(e){var t=pg(),n=mg(t);return vg(t,e),n}function fg(){var e=pg();return gg(e)&&!mg(e).isOlderThan(3)||vg(e,new dg),wf.isNodeEnv()?function(e){try{var t=(r=pg().__SENTRY__)&&r.extensions&&r.extensions.domain&&r.extensions.domain.active;if(!t)return mg(e);if(!gg(t)||mg(t).isOlderThan(3)){var n=mg(e).getStackTop();vg(t,new dg(n.client,lg.clone(n.scope)))}return mg(t)}catch(t){return mg(e)}var r}(e):mg(e)}function gg(e){return!!(e&&e.__SENTRY__&&e.__SENTRY__.hub)}function mg(e){return e&&e.__SENTRY__&&e.__SENTRY__.hub||(e.__SENTRY__=e.__SENTRY__||{},e.__SENTRY__.hub=new dg),e.__SENTRY__.hub}function vg(e,t){return!!e&&(e.__SENTRY__=e.__SENTRY__||{},e.__SENTRY__.hub=t,!0)}function yg(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];var r=fg();if(r&&r[e])return r[e].apply(r,Oh(t));throw new Error("No hub defined or "+e+" was not found on the hub, please open a bug report.")}function bg(e,t){var n;try{throw new Error("Sentry syntheticException")}catch(e){n=e}return yg("captureException",e,{captureContext:t,originalException:e,syntheticException:n})}function _g(e){yg("withScope",e)}var wg=function(){function e(e){this.dsn=e,this._dsnObject=new ef(e)}return e.prototype.getDsn=function(){return this._dsnObject},e.prototype.getBaseApiEndpoint=function(){var e=this._dsnObject,t=e.protocol?e.protocol+":":"",n=e.port?":"+e.port:"";return t+"//"+e.host+n+(e.path?"/"+e.path:"")+"/api/"},e.prototype.getStoreEndpoint=function(){return this._getIngestEndpoint("store")},e.prototype.getStoreEndpointWithUrlEncodedAuth=function(){return this.getStoreEndpoint()+"?"+this._encodedAuth()},e.prototype.getEnvelopeEndpointWithUrlEncodedAuth=function(){return this._getEnvelopeEndpoint()+"?"+this._encodedAuth()},e.prototype.getStoreEndpointPath=function(){var e=this._dsnObject;return(e.path?"/"+e.path:"")+"/api/"+e.projectId+"/store/"},e.prototype.getRequestHeaders=function(e,t){var n=this._dsnObject,r=["Sentry sentry_version=7"];return r.push("sentry_client="+e+"/"+t),r.push("sentry_key="+n.user),n.pass&&r.push("sentry_secret="+n.pass),{"Content-Type":"application/json","X-Sentry-Auth":r.join(", ")}},e.prototype.getReportDialogEndpoint=function(e){void 0===e&&(e={});var t=this._dsnObject,n=this.getBaseApiEndpoint()+"embed/error-page/",r=[];for(var o in r.push("dsn="+t.toString()),e)if("user"===o){if(!e.user)continue;e.user.name&&r.push("name="+encodeURIComponent(e.user.name)),e.user.email&&r.push("email="+encodeURIComponent(e.user.email))}else r.push(encodeURIComponent(o)+"="+encodeURIComponent(e[o]));return r.length?n+"?"+r.join("&"):n},e.prototype._getEnvelopeEndpoint=function(){return this._getIngestEndpoint("envelope")},e.prototype._getIngestEndpoint=function(e){return""+this.getBaseApiEndpoint()+this._dsnObject.projectId+"/"+e+"/"},e.prototype._encodedAuth=function(){return hf({sentry_key:this._dsnObject.user,sentry_version:"7"})},e}(),Pg=[];function Dg(e){var t={};return function(e){var t=e.defaultIntegrations&&Oh(e.defaultIntegrations)||[],n=e.integrations,r=[];if(Array.isArray(n)){var o=n.map((function(e){return e.name})),i=[];t.forEach((function(e){-1===o.indexOf(e.name)&&-1===i.indexOf(e.name)&&(r.push(e),i.push(e.name))})),n.forEach((function(e){-1===i.indexOf(e.name)&&(r.push(e),i.push(e.name))}))}else"function"==typeof n?(r=n(t),r=Array.isArray(r)?r:[r]):r=Oh(t);var s=r.map((function(e){return e.name})),a="Debug";return-1!==s.indexOf(a)&&r.push.apply(r,Oh(r.splice(s.indexOf(a),1))),r}(e).forEach((function(e){t[e.name]=e,function(e){-1===Pg.indexOf(e.name)&&(e.setupOnce(cg,fg),Pg.push(e.name),$f.log("Integration installed: "+e.name))}(e)})),t}var Sg,xg,Ig,Eg,Cg=function(){function e(e,t){this._integrations={},this._processing=!1,this._backend=new e(t),this._options=t,t.dsn&&(this._dsn=new ef(t.dsn))}return e.prototype.captureException=function(e,t,n){var r=this,o=t&&t.event_id;return this._processing=!0,this._getBackend().eventFromException(e,t).then((function(e){o=r.captureEvent(e,t,n)})),o},e.prototype.captureMessage=function(e,t,n,r){var o=this,i=n&&n.event_id;return this._processing=!0,(Lh(e)?this._getBackend().eventFromMessage(""+e,t,n):this._getBackend().eventFromException(e,n)).then((function(e){i=o.captureEvent(e,n,r)})),i},e.prototype.captureEvent=function(e,t,n){var r=this,o=t&&t.event_id;return this._processing=!0,this._processEvent(e,t,n).then((function(e){o=e&&e.event_id,r._processing=!1})).then(null,(function(e){$f.error(e),r._processing=!1})),o},e.prototype.getDsn=function(){return this._dsn},e.prototype.getOptions=function(){return this._options},e.prototype.flush=function(e){var t=this;return this._isClientProcessing(e).then((function(n){return clearInterval(n.interval),t._getBackend().getTransport().close(e).then((function(e){return n.ready&&e}))}))},e.prototype.close=function(e){var t=this;return this.flush(e).then((function(e){return t.getOptions().enabled=!1,e}))},e.prototype.setupIntegrations=function(){this._isEnabled()&&(this._integrations=Dg(this._options))},e.prototype.getIntegration=function(e){try{return this._integrations[e.id]||null}catch(t){return $f.warn("Cannot retrieve integration "+e.id+" from the current Client"),null}},e.prototype._isClientProcessing=function(e){var t=this;return new ig((function(n){var r=0,o=0;clearInterval(o),o=setInterval((function(){t._processing?(r+=1,e&&r>=e&&n({interval:o,ready:!1})):n({interval:o,ready:!0})}),1)}))},e.prototype._getBackend=function(){return this._backend},e.prototype._isEnabled=function(){return!1!==this.getOptions().enabled&&void 0!==this._dsn},e.prototype._prepareEvent=function(e,t,n){var r=this,o=this.getOptions().normalizeDepth,i=void 0===o?3:o,s=kh(kh({},e),{event_id:e.event_id||(n&&n.event_id?n.event_id:Sf()),timestamp:e.timestamp||ag.dateTimestampInSeconds()});this._applyClientOptions(s),this._applyIntegrationsMetadata(s);var a=t;n&&n.captureContext&&(a=lg.clone(a).update(n.captureContext));var l=ig.resolve(s);return a&&(l=a.applyToEvent(s,n)),l.then((function(e){return"number"==typeof i&&i>0?r._normalizeEvent(e,i):e}))},e.prototype._normalizeEvent=function(e,t){if(!e)return null;var n=kh(kh(kh(kh(kh({},e),e.breadcrumbs&&{breadcrumbs:e.breadcrumbs.map((function(e){return kh(kh({},e),e.data&&{data:bf(e.data,t)})}))}),e.user&&{user:bf(e.user,t)}),e.contexts&&{contexts:bf(e.contexts,t)}),e.extra&&{extra:bf(e.extra,t)});return e.contexts&&e.contexts.trace&&(n.contexts.trace=e.contexts.trace),n},e.prototype._applyClientOptions=function(e){var t=this.getOptions(),n=t.environment,r=t.release,o=t.dist,i=t.maxValueLength,s=void 0===i?250:i;void 0===e.environment&&void 0!==n&&(e.environment=n),void 0===e.release&&void 0!==r&&(e.release=r),void 0===e.dist&&void 0!==o&&(e.dist=o),e.message&&(e.message=lf(e.message,s));var a=e.exception&&e.exception.values&&e.exception.values[0];a&&a.value&&(a.value=lf(a.value,s));var l=e.request;l&&l.url&&(l.url=lf(l.url,s))},e.prototype._applyIntegrationsMetadata=function(e){var t=e.sdk,n=Object.keys(this._integrations);t&&n.length>0&&(t.integrations=n)},e.prototype._sendEvent=function(e){this._getBackend().sendEvent(e)},e.prototype._processEvent=function(e,t,n){var r=this,o=this.getOptions(),i=o.beforeSend,s=o.sampleRate;if(!this._isEnabled())return ig.reject("SDK not enabled, will not send event.");var a="transaction"===e.type;return!a&&"number"==typeof s&&Math.random()>s?ig.reject("This event has been sampled, will not send event."):new ig((function(o,s){r._prepareEvent(e,n,t).then((function(e){if(null!==e){var n=e;if(t&&t.data&&!0===t.data.__sentry__||!i||a)return r._sendEvent(n),void o(n);var l=i(e,t);if(void 0===l)$f.error("`beforeSend` method has to return `null` or a valid event.");else if(Hh(l))r._handleAsyncBeforeSend(l,o,s);else{if(null===(n=l))return $f.log("`beforeSend` returned `null`, will not send event."),void o(null);r._sendEvent(n),o(n)}}else s("An event processor returned null, will not send event.")})).then(null,(function(e){r.captureException(e,{data:{__sentry__:!0},originalException:e}),s("Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.\nReason: "+e)}))}))},e.prototype._handleAsyncBeforeSend=function(e,t,n){var r=this;e.then((function(e){null!==e?(r._sendEvent(e),t(e)):n("`beforeSend` returned `null`, will not send event.")})).then(null,(function(e){n("beforeSend rejected with "+e)}))},e}();(xg=Sg||(Sg={})).Fatal="fatal",xg.Error="error",xg.Warning="warning",xg.Log="log",xg.Info="info",xg.Debug="debug",xg.Critical="critical",function(e){e.fromString=function(t){switch(t){case"debug":return e.Debug;case"info":return e.Info;case"warn":case"warning":return e.Warning;case"error":return e.Error;case"fatal":return e.Fatal;case"critical":return e.Critical;case"log":default:return e.Log}}}(Sg||(Sg={})),(Eg=Ig||(Ig={})).Unknown="unknown",Eg.Skipped="skipped",Eg.Success="success",Eg.RateLimit="rate_limit",Eg.Invalid="invalid",Eg.Failed="failed",function(e){e.fromHttpCode=function(t){return t>=200&&t<300?e.Success:429===t?e.RateLimit:t>=400&&t<500?e.Invalid:t>=500?e.Failed:e.Unknown}}(Ig||(Ig={}));var Tg=function(){function e(){}return e.prototype.sendEvent=function(e){return ig.resolve({reason:"NoopTransport: Event has been skipped because no Dsn is configured.",status:Ig.Skipped})},e.prototype.close=function(e){return ig.resolve(!0)},e}(),kg=function(){function e(e){this._options=e,this._options.dsn||$f.warn("No DSN provided, backend will not do anything."),this._transport=this._setupTransport()}return e.prototype.eventFromException=function(e,t){throw new Xh("Backend has to implement `eventFromException` method")},e.prototype.eventFromMessage=function(e,t,n){throw new Xh("Backend has to implement `eventFromMessage` method")},e.prototype.sendEvent=function(e){this._transport.sendEvent(e).then(null,(function(e){$f.error("Error while sending event: "+e)}))},e.prototype.getTransport=function(){return this._transport},e.prototype._setupTransport=function(){return new Tg},e}();function Ag(e,t){var n="transaction"===e.type,r={body:JSON.stringify(e),url:n?t.getEnvelopeEndpointWithUrlEncodedAuth():t.getStoreEndpointWithUrlEncodedAuth()};if(n){var o=JSON.stringify({event_id:e.event_id,sent_at:(new Date).toISOString()})+"\n"+JSON.stringify({type:e.type})+"\n"+r.body;r.body=o}return r}var Fg,Og={},$g=function(){function e(){this.name=e.id}return e.prototype.setupOnce=function(){Fg=Function.prototype.toString,Function.prototype.toString=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=this.__sentry_original__||this;return Fg.apply(n,e)}},e.id="FunctionToString",e}(),jg=[/^Script error\.?$/,/^Javascript error: Script error\.? on line 0$/],Rg=function(){function e(t){void 0===t&&(t={}),this._options=t,this.name=e.id}return e.prototype.setupOnce=function(){cg((function(t){var n=fg();if(!n)return t;var r=n.getIntegration(e);if(r){var o=n.getClient(),i=o?o.getOptions():{},s=r._mergeOptions(i);if(r._shouldDropEvent(t,s))return null}return t}))},e.prototype._shouldDropEvent=function(e,t){return this._isSentryError(e,t)?($f.warn("Event dropped due to being internal Sentry Error.\nEvent: "+If(e)),!0):this._isIgnoredError(e,t)?($f.warn("Event dropped due to being matched by `ignoreErrors` option.\nEvent: "+If(e)),!0):this._isDeniedUrl(e,t)?($f.warn("Event dropped due to being matched by `denyUrls` option.\nEvent: "+If(e)+".\nUrl: "+this._getEventFilterUrl(e)),!0):!this._isAllowedUrl(e,t)&&($f.warn("Event dropped due to not being matched by `allowUrls` option.\nEvent: "+If(e)+".\nUrl: "+this._getEventFilterUrl(e)),!0)},e.prototype._isSentryError=function(e,t){if(!t.ignoreInternal)return!1;try{return e&&e.exception&&e.exception.values&&e.exception.values[0]&&"SentryError"===e.exception.values[0].type||!1}catch(e){return!1}},e.prototype._isIgnoredError=function(e,t){return!(!t.ignoreErrors||!t.ignoreErrors.length)&&this._getPossibleEventMessages(e).some((function(e){return t.ignoreErrors.some((function(t){return df(e,t)}))}))},e.prototype._isDeniedUrl=function(e,t){if(!t.denyUrls||!t.denyUrls.length)return!1;var n=this._getEventFilterUrl(e);return!!n&&t.denyUrls.some((function(e){return df(n,e)}))},e.prototype._isAllowedUrl=function(e,t){if(!t.allowUrls||!t.allowUrls.length)return!0;var n=this._getEventFilterUrl(e);return!n||t.allowUrls.some((function(e){return df(n,e)}))},e.prototype._mergeOptions=function(e){return void 0===e&&(e={}),{allowUrls:Oh(this._options.whitelistUrls||[],this._options.allowUrls||[],e.whitelistUrls||[],e.allowUrls||[]),denyUrls:Oh(this._options.blacklistUrls||[],this._options.denyUrls||[],e.blacklistUrls||[],e.denyUrls||[]),ignoreErrors:Oh(this._options.ignoreErrors||[],e.ignoreErrors||[],jg),ignoreInternal:void 0===this._options.ignoreInternal||this._options.ignoreInternal}},e.prototype._getPossibleEventMessages=function(e){if(e.message)return[e.message];if(e.exception)try{var t=e.exception.values&&e.exception.values[0]||{},n=t.type,r=void 0===n?"":n,o=t.value,i=void 0===o?"":o;return[""+i,r+": "+i]}catch(t){return $f.error("Cannot extract message for event "+If(e)),[]}return[]},e.prototype._getEventFilterUrl=function(e){try{if(e.stacktrace){var t=e.stacktrace.frames;return t&&t[t.length-1].filename||null}if(e.exception){var n=e.exception.values&&e.exception.values[0].stacktrace&&e.exception.values[0].stacktrace.frames;return n&&n[n.length-1].filename||null}return null}catch(t){return $f.error("Cannot extract url for event "+If(e)),null}},e.id="InboundFilters",e}();r(Og,"FunctionToString",(function(){return $g})),r(Og,"InboundFilters",(function(){return Rg}));var Mg="?",Ug=/^\s*at (?:(.*?) ?\()?((?:file|https?|blob|chrome-extension|address|native|eval|webpack|<anonymous>|[-a-z]+:|.*bundle|\/).*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,Bg=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:file|https?|blob|chrome|webpack|resource|moz-extension|capacitor).*?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js))(?::(\d+))?(?::(\d+))?\s*$/i,Lg=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i,Ng=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,Vg=/\((\S*)(?::(\d+))(?::(\d+))\)/,qg=/Minified React error #\d+;/i;function Gg(e){var t=null,n=0;e&&("number"==typeof e.framesToPop?n=e.framesToPop:qg.test(e.message)&&(n=1));try{if(t=function(e){if(!e||!e.stacktrace)return null;for(var t,n=e.stacktrace,r=/ line (\d+).*script (?:in )?(\S+)(?:: in function (\S+))?$/i,o=/ line (\d+), column (\d+)\s*(?:in (?:<anonymous function: ([^>]+)>|([^)]+))\((.*)\))? in (.*):\s*$/i,i=n.split("\n"),s=[],a=0;a<i.length;a+=2){var l=null;(t=r.exec(i[a]))?l={url:t[2],func:t[3],args:[],line:+t[1],column:null}:(t=o.exec(i[a]))&&(l={url:t[6],func:t[3]||t[4],args:t[5]?t[5].split(","):[],line:+t[1],column:+t[2]}),l&&(!l.func&&l.line&&(l.func=Mg),s.push(l))}if(!s.length)return null;return{message:Wg(e),name:e.name,stack:s}}(e))return Hg(t,n)}catch(e){}try{if(t=function(e){if(!e||!e.stack)return null;for(var t,n,r,o=[],i=e.stack.split("\n"),s=0;s<i.length;++s){if(n=Ug.exec(i[s])){var a=n[2]&&0===n[2].indexOf("native");n[2]&&0===n[2].indexOf("eval")&&(t=Vg.exec(n[2]))&&(n[2]=t[1],n[3]=t[2],n[4]=t[3]),r={url:n[2]&&0===n[2].indexOf("address at ")?n[2].substr("address at ".length):n[2],func:n[1]||Mg,args:a?[n[2]]:[],line:n[3]?+n[3]:null,column:n[4]?+n[4]:null}}else if(n=Lg.exec(i[s]))r={url:n[2],func:n[1]||Mg,args:[],line:+n[3],column:n[4]?+n[4]:null};else{if(!(n=Bg.exec(i[s])))continue;n[3]&&n[3].indexOf(" > eval")>-1&&(t=Ng.exec(n[3]))?(n[1]=n[1]||"eval",n[3]=t[1],n[4]=t[2],n[5]=""):0!==s||n[5]||void 0===e.columnNumber||(o[0].column=e.columnNumber+1),r={url:n[3],func:n[1]||Mg,args:n[2]?n[2].split(","):[],line:n[4]?+n[4]:null,column:n[5]?+n[5]:null}}!r.func&&r.line&&(r.func=Mg),o.push(r)}if(!o.length)return null;return{message:Wg(e),name:e.name,stack:o}}(e))return Hg(t,n)}catch(e){}return{message:Wg(e),name:e&&e.name,stack:[],failed:!0}}function Hg(e,t){try{return kh(kh({},e),{stack:e.stack.slice(t)})}catch(t){return e}}function Wg(e){var t=e&&e.message;return t?t.error&&"string"==typeof t.error.message?t.error.message:t:"No error message"}function zg(e){var t=Yg(e.stack),n={type:e.name,value:e.message};return t&&t.length&&(n.stacktrace={frames:t}),void 0===n.type&&""===n.value&&(n.value="Unrecoverable error caught"),n}function Jg(e){return{exception:{values:[zg(e)]}}}function Yg(e){if(!e||!e.length)return[];var t=e,n=t[0].func||"",r=t[t.length-1].func||"";return-1===n.indexOf("captureMessage")&&-1===n.indexOf("captureException")||(t=t.slice(1)),-1!==r.indexOf("sentryWrapped")&&(t=t.slice(0,-1)),t.slice(0,50).map((function(e){return{colno:null===e.column?void 0:e.column,filename:e.url||t[0].url,function:e.func||"?",in_app:!0,lineno:null===e.line?void 0:e.line}})).reverse()}function Kg(e,t,n){var r;if(void 0===n&&(n={}),Rh(e)&&e.error)return r=Jg(Gg(e=e.error));if(Mh(e)||Uh(e)){var o=e,i=o.name||(Mh(o)?"DOMError":"DOMException"),s=o.message?i+": "+o.message:i;return Cf(r=Xg(s,t,n),s),r}return jh(e)?r=Jg(Gg(e)):Nh(e)||Vh(e)?(Tf(r=function(e,t,n){var r={exception:{values:[{type:Vh(e)?e.constructor.name:n?"UnhandledRejection":"Error",value:"Non-Error "+(n?"promise rejection":"exception")+" captured with keys: "+_f(e)}]},extra:{__serialized__:mf(e)}};if(t){var o=Yg(Gg(t).stack);r.stacktrace={frames:o}}return r}(e,t,n.rejection),{synthetic:!0}),r):(Cf(r=Xg(e,t,n),""+e,void 0),Tf(r,{synthetic:!0}),r)}function Xg(e,t,n){void 0===n&&(n={});var r={message:e};if(n.attachStacktrace&&t){var o=Yg(Gg(t).stack);r.stacktrace={frames:o}}return r}var Qg={},Zg=function(){function e(e){this.options=e,this._buffer=new sg(30),this._api=new wg(this.options.dsn),this.url=this._api.getStoreEndpointWithUrlEncodedAuth()}return e.prototype.sendEvent=function(e){throw new Xh("Transport Class has to implement `sendEvent` method")},e.prototype.close=function(e){return this._buffer.drain(e)},e}(),em=Df(),tm=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._disabledUntil=new Date(Date.now()),t}return Th(t,e),t.prototype.sendEvent=function(e){var t=this;if(new Date(Date.now())<this._disabledUntil)return Promise.reject({event:e,reason:"Transport locked till "+this._disabledUntil+" due to too many requests.",status:429});var n=Ag(e,this._api),r={body:n.body,method:"POST",referrerPolicy:Bf()?"origin":""};return void 0!==this.options.fetchParameters&&Object.assign(r,this.options.fetchParameters),void 0!==this.options.headers&&(r.headers=this.options.headers),this._buffer.add(new ig((function(e,o){em.fetch(n.url,r).then((function(n){var r=Ig.fromHttpCode(n.status);if(r!==Ig.Success){if(r===Ig.RateLimit){var i=Date.now(),s=n.headers.get("Retry-After");t._disabledUntil=new Date(i+Af(i,s)),$f.warn("Too many requests, backing off till: "+t._disabledUntil)}o(n)}else e({status:r})})).catch(o)})))},t}(Zg),nm=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._disabledUntil=new Date(Date.now()),t}return Th(t,e),t.prototype.sendEvent=function(e){var t=this;if(new Date(Date.now())<this._disabledUntil)return Promise.reject({event:e,reason:"Transport locked till "+this._disabledUntil+" due to too many requests.",status:429});var n=Ag(e,this._api);return this._buffer.add(new ig((function(e,r){var o=new XMLHttpRequest;for(var i in o.onreadystatechange=function(){if(4===o.readyState){var n=Ig.fromHttpCode(o.status);if(n!==Ig.Success){if(n===Ig.RateLimit){var i=Date.now(),s=o.getResponseHeader("Retry-After");t._disabledUntil=new Date(i+Af(i,s)),$f.warn("Too many requests, backing off till: "+t._disabledUntil)}r(o)}else e({status:n})}},o.open("POST",n.url),t.options.headers)t.options.headers.hasOwnProperty(i)&&o.setRequestHeader(i,t.options.headers[i]);o.send(n.body)})))},t}(Zg);r(Qg,"BaseTransport",(function(){return Zg})),r(Qg,"FetchTransport",(function(){return tm})),r(Qg,"XHRTransport",(function(){return nm}));var rm=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Th(t,e),t.prototype.eventFromException=function(e,t){return function(e,t,n){var r=Kg(t,n&&n.syntheticException||void 0,{attachStacktrace:e.attachStacktrace});return Tf(r,{handled:!0,type:"generic"}),r.level=Sg.Error,n&&n.event_id&&(r.event_id=n.event_id),ig.resolve(r)}(this._options,e,t)},t.prototype.eventFromMessage=function(e,t,n){return void 0===t&&(t=Sg.Info),function(e,t,n,r){void 0===n&&(n=Sg.Info);var o=Xg(t,r&&r.syntheticException||void 0,{attachStacktrace:e.attachStacktrace});return o.level=n,r&&r.event_id&&(o.event_id=r.event_id),ig.resolve(o)}(this._options,e,t,n)},t.prototype._setupTransport=function(){if(!this._options.dsn)return e.prototype._setupTransport.call(this);var t=kh(kh({},this._options.transportOptions),{dsn:this._options.dsn});return this._options.transport?new this._options.transport(t):Rf()?new tm(t):new nm(t)},t}(kg),om=0;function im(){return om>0}function sm(){om+=1,setTimeout((function(){om-=1}))}function am(e,t,n){if(void 0===t&&(t={}),"function"!=typeof e)return e;try{if(e.__sentry__)return e;if(e.__sentry_wrapped__)return e.__sentry_wrapped__}catch(t){return e}var r=function(){var r=Array.prototype.slice.call(arguments);try{n&&"function"==typeof n&&n.apply(this,arguments);var o=r.map((function(e){return am(e,t)}));return e.handleEvent?e.handleEvent.apply(this,o):e.apply(this,o)}catch(e){throw sm(),_g((function(n){n.addEventProcessor((function(e){var n=kh({},e);return t.mechanism&&(Cf(n,void 0,void 0),Tf(n,t.mechanism)),n.extra=kh(kh({},n.extra),{arguments:r}),n})),bg(e)})),e}};try{for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(r[o]=e[o])}catch(e){}e.prototype=e.prototype||{},r.prototype=e.prototype,Object.defineProperty(e,"__sentry_wrapped__",{enumerable:!1,value:r}),Object.defineProperties(r,{__sentry__:{enumerable:!1,value:!0},__sentry_original__:{enumerable:!1,value:e}});try{Object.getOwnPropertyDescriptor(r,"name").configurable&&Object.defineProperty(r,"name",{get:function(){return e.name}})}catch(e){}return r}function lm(e){if(void 0===e&&(e={}),e.eventId)if(e.dsn){var t=document.createElement("script");t.async=!0,t.src=new wg(e.dsn).getReportDialogEndpoint(e),e.onLoad&&(t.onload=e.onLoad),(document.head||document.body).appendChild(t)}else $f.error("Missing dsn option in showReportDialog call");else $f.error("Missing eventId option in showReportDialog call")}var um={},cm=function(){function e(t){this.name=e.id,this._onErrorHandlerInstalled=!1,this._onUnhandledRejectionHandlerInstalled=!1,this._options=kh({onerror:!0,onunhandledrejection:!0},t)}return e.prototype.setupOnce=function(){Error.stackTraceLimit=50,this._options.onerror&&($f.log("Global Handler attached: onerror"),this._installGlobalOnErrorHandler()),this._options.onunhandledrejection&&($f.log("Global Handler attached: onunhandledrejection"),this._installGlobalOnUnhandledRejectionHandler())},e.prototype._installGlobalOnErrorHandler=function(){var t=this;this._onErrorHandlerInstalled||(Wf({callback:function(n){var r=n.error,o=fg(),i=o.getIntegration(e),s=r&&!0===r.__sentry_own_request__;if(i&&!im()&&!s){var a=o.getClient(),l=Lh(r)?t._eventFromIncompleteOnError(n.msg,n.url,n.line,n.column):t._enhanceEventWithInitialFrame(Kg(r,void 0,{attachStacktrace:a&&a.getOptions().attachStacktrace,rejection:!1}),n.url,n.line,n.column);Tf(l,{handled:!1,type:"onerror"}),o.captureEvent(l,{originalException:r})}},type:"error"}),this._onErrorHandlerInstalled=!0)},e.prototype._installGlobalOnUnhandledRejectionHandler=function(){var t=this;this._onUnhandledRejectionHandlerInstalled||(Wf({callback:function(n){var r=n;try{"reason"in n?r=n.reason:"detail"in n&&"reason"in n.detail&&(r=n.detail.reason)}catch(e){}var o=fg(),i=o.getIntegration(e),s=r&&!0===r.__sentry_own_request__;if(!i||im()||s)return!0;var a=o.getClient(),l=Lh(r)?t._eventFromIncompleteRejection(r):Kg(r,void 0,{attachStacktrace:a&&a.getOptions().attachStacktrace,rejection:!0});l.level=Sg.Error,Tf(l,{handled:!1,type:"onunhandledrejection"}),o.captureEvent(l,{originalException:r})},type:"unhandledrejection"}),this._onUnhandledRejectionHandlerInstalled=!0)},e.prototype._eventFromIncompleteOnError=function(e,t,n,r){var o,i=Rh(e)?e.message:e;if(Bh(i)){var s=i.match(/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i);s&&(o=s[1],i=s[2])}var a={exception:{values:[{type:o||"Error",value:i}]}};return this._enhanceEventWithInitialFrame(a,t,n,r)},e.prototype._eventFromIncompleteRejection=function(e){return{exception:{values:[{type:"UnhandledRejection",value:"Non-Error promise rejection captured with value: "+e}]}}},e.prototype._enhanceEventWithInitialFrame=function(e,t,n,r){e.exception=e.exception||{},e.exception.values=e.exception.values||[],e.exception.values[0]=e.exception.values[0]||{},e.exception.values[0].stacktrace=e.exception.values[0].stacktrace||{},e.exception.values[0].stacktrace.frames=e.exception.values[0].stacktrace.frames||[];var o=isNaN(parseInt(r,10))?void 0:r,i=isNaN(parseInt(n,10))?void 0:n,s=Bh(t)&&t.length>0?t:kf();return 0===e.exception.values[0].stacktrace.frames.length&&e.exception.values[0].stacktrace.frames.push({colno:o,filename:s,function:"?",in_app:!0,lineno:i}),e},e.id="GlobalHandlers",e}(),dm=["EventTarget","Window","Node","ApplicationCache","AudioTrackList","ChannelMergerNode","CryptoOperation","EventSource","FileReader","HTMLUnknownElement","IDBDatabase","IDBRequest","IDBTransaction","KeyOperation","MediaController","MessagePort","ModalWindow","Notification","SVGElementInstance","Screen","TextTrack","TextTrackCue","TextTrackList","WebSocket","WebSocketWorker","Worker","XMLHttpRequest","XMLHttpRequestEventTarget","XMLHttpRequestUpload"],pm=function(){function e(t){this.name=e.id,this._options=kh({XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0},t)}return e.prototype.setupOnce=function(){var e=Df();(this._options.setTimeout&&pf(e,"setTimeout",this._wrapTimeFunction.bind(this)),this._options.setInterval&&pf(e,"setInterval",this._wrapTimeFunction.bind(this)),this._options.requestAnimationFrame&&pf(e,"requestAnimationFrame",this._wrapRAF.bind(this)),this._options.XMLHttpRequest&&"XMLHttpRequest"in e&&pf(XMLHttpRequest.prototype,"send",this._wrapXHR.bind(this)),this._options.eventTarget)&&(Array.isArray(this._options.eventTarget)?this._options.eventTarget:dm).forEach(this._wrapEventTarget.bind(this))},e.prototype._wrapTimeFunction=function(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];var r=t[0];return t[0]=am(r,{mechanism:{data:{function:sf(e)},handled:!0,type:"instrument"}}),e.apply(this,t)}},e.prototype._wrapRAF=function(e){return function(t){return e.call(this,am(t,{mechanism:{data:{function:"requestAnimationFrame",handler:sf(e)},handled:!0,type:"instrument"}}))}},e.prototype._wrapEventTarget=function(e){var t=Df(),n=t[e]&&t[e].prototype;n&&n.hasOwnProperty&&n.hasOwnProperty("addEventListener")&&(pf(n,"addEventListener",(function(t){return function(n,r,o){try{"function"==typeof r.handleEvent&&(r.handleEvent=am(r.handleEvent.bind(r),{mechanism:{data:{function:"handleEvent",handler:sf(r),target:e},handled:!0,type:"instrument"}}))}catch(e){}return t.call(this,n,am(r,{mechanism:{data:{function:"addEventListener",handler:sf(r),target:e},handled:!0,type:"instrument"}}),o)}})),pf(n,"removeEventListener",(function(e){return function(t,n,r){try{e.call(this,t,n.__sentry_wrapped__,r)}catch(e){}return e.call(this,t,n,r)}})))},e.prototype._wrapXHR=function(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];var r=this,o=["onload","onerror","onprogress","onreadystatechange"];return o.forEach((function(e){e in r&&"function"==typeof r[e]&&pf(r,e,(function(t){var n={mechanism:{data:{function:e,handler:sf(t)},handled:!0,type:"instrument"}};return t.__sentry_original__&&(n.mechanism.data.handler=sf(t.__sentry_original__)),am(t,n)}))})),e.apply(this,t)}},e.id="TryCatch",e}(),hm=function(){function e(t){this.name=e.id,this._options=kh({console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0},t)}return e.prototype.addSentryBreadcrumb=function(e){this._options.sentry&&fg().addBreadcrumb({category:"sentry."+("transaction"===e.type?"transaction":"event"),event_id:e.event_id,level:e.level,message:If(e)},{event:e})},e.prototype.setupOnce=function(){var e=this;this._options.console&&Wf({callback:function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];e._consoleBreadcrumb.apply(e,Oh(t))},type:"console"}),this._options.dom&&Wf({callback:function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];e._domBreadcrumb.apply(e,Oh(t))},type:"dom"}),this._options.xhr&&Wf({callback:function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];e._xhrBreadcrumb.apply(e,Oh(t))},type:"xhr"}),this._options.fetch&&Wf({callback:function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];e._fetchBreadcrumb.apply(e,Oh(t))},type:"fetch"}),this._options.history&&Wf({callback:function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];e._historyBreadcrumb.apply(e,Oh(t))},type:"history"})},e.prototype._consoleBreadcrumb=function(e){var t={category:"console",data:{arguments:e.args,logger:"console"},level:Sg.fromString(e.level),message:cf(e.args," ")};if("assert"===e.level){if(!1!==e.args[0])return;t.message="Assertion failed: "+(cf(e.args.slice(1)," ")||"console.assert"),t.data.arguments=e.args.slice(1)}fg().addBreadcrumb(t,{input:e.args,level:e.level})},e.prototype._domBreadcrumb=function(e){var t;try{t=e.event.target?Jh(e.event.target):Jh(e.event)}catch(e){t="<unknown>"}0!==t.length&&fg().addBreadcrumb({category:"ui."+e.name,message:t},{event:e.event,name:e.name})},e.prototype._xhrBreadcrumb=function(e){if(e.endTimestamp){if(e.xhr.__sentry_own_request__)return;var t=e.xhr.__sentry_xhr__||{},n=t.method,r=t.url,o=t.status_code,i=t.body;fg().addBreadcrumb({category:"xhr",data:{method:n,url:r,status_code:o},type:"http"},{xhr:e.xhr,input:i})}else;},e.prototype._fetchBreadcrumb=function(e){e.endTimestamp&&(e.fetchData.url.match(/sentry_key/)&&"POST"===e.fetchData.method||(e.error?fg().addBreadcrumb({category:"fetch",data:e.fetchData,level:Sg.Error,type:"http"},{data:e.error,input:e.args}):fg().addBreadcrumb({category:"fetch",data:kh(kh({},e.fetchData),{status_code:e.response.status}),type:"http"},{input:e.args,response:e.response})))},e.prototype._historyBreadcrumb=function(e){var t=Df(),n=e.from,r=e.to,o=xf(t.location.href),i=xf(n),s=xf(r);i.path||(i=o),o.protocol===s.protocol&&o.host===s.host&&(r=s.relative),o.protocol===i.protocol&&o.host===i.host&&(n=i.relative),fg().addBreadcrumb({category:"navigation",data:{from:n,to:r}})},e.id="Breadcrumbs",e}(),fm=function(){function e(t){void 0===t&&(t={}),this.name=e.id,this._key=t.key||"cause",this._limit=t.limit||5}return e.prototype.setupOnce=function(){cg((function(t,n){var r=fg().getIntegration(e);return r?r._handler(t,n):t}))},e.prototype._handler=function(e,t){if(!(e.exception&&e.exception.values&&t&&zh(t.originalException,Error)))return e;var n=this._walkErrorTree(t.originalException,this._key);return e.exception.values=Oh(n,e.exception.values),e},e.prototype._walkErrorTree=function(e,t,n){if(void 0===n&&(n=[]),!zh(e[t],Error)||n.length+1>=this._limit)return n;var r=zg(Gg(e[t]));return this._walkErrorTree(e[t],t,Oh([r],n))},e.id="LinkedErrors",e}(),gm=Df(),mm=function(){function e(){this.name=e.id}return e.prototype.setupOnce=function(){cg((function(t){var n,r,o;if(fg().getIntegration(e)){if(!gm.navigator&&!gm.location&&!gm.document)return t;var i=(null===(n=t.request)||void 0===n?void 0:n.url)||(null===(r=gm.location)||void 0===r?void 0:r.href),s=(gm.document||{}).referrer,a=(gm.navigator||{}).userAgent,l=kh(kh(kh({},null===(o=t.request)||void 0===o?void 0:o.headers),s&&{Referer:s}),a&&{"User-Agent":a}),u=kh(kh({},i&&{url:i}),{headers:l});return kh(kh({},t),{request:u})}return t}))},e.id="UserAgent",e}();r(um,"GlobalHandlers",(function(){return cm})),r(um,"TryCatch",(function(){return pm})),r(um,"Breadcrumbs",(function(){return hm})),r(um,"LinkedErrors",(function(){return fm})),r(um,"UserAgent",(function(){return mm}));var vm="5.25.0",ym=function(e){function t(t){return void 0===t&&(t={}),e.call(this,rm,t)||this}return Th(t,e),t.prototype.showReportDialog=function(e){void 0===e&&(e={}),Df().document&&(this._isEnabled()?lm(kh(kh({},e),{dsn:e.dsn||this.getDsn()})):$f.error("Trying to call showReportDialog with Sentry Client disabled"))},t.prototype._prepareEvent=function(t,n,r){return t.platform=t.platform||"javascript",t.sdk=kh(kh({},t.sdk),{name:"sentry.javascript.browser",packages:Oh(t.sdk&&t.sdk.packages||[],[{name:"npm:@sentry/browser",version:vm}]),version:vm}),e.prototype._prepareEvent.call(this,t,n,r)},t.prototype._sendEvent=function(t){var n=this.getIntegration(hm);n&&n.addSentryBreadcrumb(t),e.prototype._sendEvent.call(this,t)},t}(Cg),bm=[new Og.InboundFilters,new Og.FunctionToString,new pm,new hm,new cm,new fm,new mm];function _m(e){if(void 0===e&&(e={}),void 0===e.defaultIntegrations&&(e.defaultIntegrations=bm),void 0===e.release){var t=Df();t.SENTRY_RELEASE&&t.SENTRY_RELEASE.id&&(e.release=t.SENTRY_RELEASE.id)}!function(e,t){!0===t.debug&&$f.enable();var n=fg(),r=new e(t);n.bindClient(r)}(ym,e)}const{$sentry:wm,$store:Pm,$bus:Dm,$env:Sm,$utils:xm}=app,Im=["ResizeObserver loop limit exceeded","Unable to preventDefault inside passive event listener","Extension context invalidated.","Invalid or unexpected token","AbortError: The play() request was interrupted by a call to pause(). https://goo.gl/LdLk22","InvalidStateError: Failed to execute 'transaction' on 'IDBDatabase'","Timed out","Failed to fetch"];wm.controller={throttle:!1,init:async function({throttleBy:e=10}={}){if(this.dsn="https://bea0900834f541bca8157710f7fd31fe@sentry.io/1547551",Sm.is.development)this.throttle=!1;else if(e<=1)this.throttle=!1;else{let t=await xm.ls.get("sentry-user-hash");t||(t=Math.floor(1e13*Math.random()),await xm.ls.set("sentry-user-hash",t)),this.throttle=t%e!=0}this._setup()},_setup:function(){Sm.is.development||_m({dsn:this.dsn,release:Sm.version,debug:Sm.is.development,ignoreErrors:Im,environment:Sm.is.development?"development":Sm.is.production?"production":"unknown",beforeSend:(e,t)=>{if(Sm.is.production&&"debug"===e.level)return null;if(this.throttle)return null;const n=Pm.model;if(n.store&&n.state){let t={...n.state,auth:{...n.state.auth}};delete t.auth.cookies,t=JSON.stringify(t),t=t.length>102400?t.substr(0,102400)+"...":n.state,e.extra={...e.extra||{},state:t}}const r=t.originalException,o=r&&r.message||String(r);return o&&Im.some((e=>o.includes(e)))?null:e}})},sendError:function(e,t="error",n=null,r=null){console.log("%csentry","color: #c818dc",e,n),Sm.is.bg&&Dm.send("popup.log","%csentry error [background]","color: #c818dc",e,n),"string"==typeof e&&(e=new Error(e)),yg("configureScope",(o=>{o.setFingerprint([e.message]),o.setLevel(t);const i=Pm.model;if(i.store&&i.state&&i.state.auth&&o.setUser({username:i.state.auth.username}),n)for(const e in n){let t=n[e];"string"==typeof t&&t.length>15500&&(t=t.substr(0,15500)),o.setExtra(e,t)}if(r)for(const e in r){const t=r[e];o.setTag(e,t)}})),bg(e)}};const{$i18n:Em}=app;Em.controller={init:function(){globalThis.lo=this._lo},_lo:function(e){const t=chrome.i18n.getMessage(e);if(""===t)throw new Error(`i18n: no message found for id '${e}'`);return t}};const{$overseer:Cm,$store:Tm,$bus:km,$env:Am,$network:Fm,$lodash:Om}=app;let $m;Cm.controller={init:function(){$m=new Fm.Sender({urlPrefix:Am.options.apiUrl}),km.on("overseer.send-report",Rm)},sendReport:Rm};const jm=["acknowledged","analytics","dm","experiments","followUs","igTask","igView","insights","multiaccount","rateUs","sidebar","tagAssist","userDetails","welcome",{field:"auth",cb:e=>Om.cloneDeep(e)},{field:"auth.cookies",cb:()=>"!sanitized"},{field:"billing",cb:e=>Om.cloneDeep(e)},{field:"billing.account.token",cb:()=>"!sanitized"},{field:"userStates",cb:()=>"!ignored"},{field:"whatsNew",cb:()=>"!ignored"}];async function Rm({key:e,filters:t,data:n}={}){if(e=e||"system",n=n||{},(t=t||{}).username||(t.username=Tm.proxy.username()||"unknown"),"string"!=typeof n&&!n.state){const e=Tm.state,t={};jm.forEach((n=>{if("string"==typeof n)t[n]=e[n];else{const r=e[n.field];t[n.field]=n.cb(r)}})),n.state=t}try{n=JSON.stringify(n)}catch(e){n=e.message}const r={key:e,filters:t,data:n};Am.is.development&&km.send("popup.log","%coverseer report [background]","color: #c818dc",{key:e,filters:t,data:JSON.parse(n)}),$m.send("/overseer",{body:r}).then((t=>{Cm.log(`${e} report of ${n.length} bytes was sent`)})).catch((t=>{Cm.error(`failed sending ${e} report of ${n.length} bytes`),Cm.error(t)}))}const{$offscreen:Mm,$bus:Um}=app;Mm.controller={init:async function(){await this._createOffscreenPage(),await Um.poll("startup.osReady")},_createOffscreenPage:async function(){await chrome.offscreen.hasDocument()&&await chrome.offscreen.closeDocument(),await chrome.offscreen.createDocument({url:chrome.runtime.getURL("/offscreen.html"),reasons:["BLOBS"],justification:"convert images to jpg"})}};const{$netRules:Bm,$utils:Lm}=app;Bm.controller={init:async function(){Bm.add=this.add.bind(this),Bm.remove=this.remove.bind(this),Bm.getRules=this.getRules.bind(this),this._lastRuleId=1,await this._dropAllRules()},add:async function(e){const t=Lm.ensureArray(e).map((e=>this._declToRules(e))).flat();return await chrome.declarativeNetRequest.updateSessionRules({addRules:t}),t.map((e=>e.id))},remove:async function(e){const t=Lm.ensureArray(e);await chrome.declarativeNetRequest.updateSessionRules({removeRuleIds:t})},getRules:async function(){return await chrome.declarativeNetRequest.getSessionRules()},_declToRules:function({url:e=null,tabId:t=null,block:n=!1,redirect:r=null,req:o=null,res:i=null,resources:s=null,priority:a=1}){let l;n?l={type:"block"}:r?(s||(s=["main_frame","sub_frame"]),l={type:"redirect",redirect:{url:r}}):(o||i)&&(l={type:"modifyHeaders",requestHeaders:this._toHeaderActions(o),responseHeaders:this._toHeaderActions(i)});return Lm.ensureArray(e).map((e=>e.includes("//")?[e]:[`*://${e}`,`*://*.${e}`])).flat().map((e=>({id:this._lastRuleId++,priority:a,condition:{resourceTypes:s||this._getAllResourceTypes(),...e&&{urlFilter:e},...t&&{tabIds:[t]}},action:l})))},_toHeaderActions:function(e=null){return e?Object.entries(e).map((([e,t])=>({header:e,...null===t&&{operation:"remove"},...null!==t&&{operation:"set",value:"number"==typeof t?String(t):t}}))):null},_getAllResourceTypes:function(){return["main_frame","sub_frame","stylesheet","script","image","font","object","xmlhttprequest","ping","csp_report","media","websocket","webtransport","webbundle","other"]},_dropAllRules:async function(){const e=await chrome.declarativeNetRequest.getSessionRules();0!==e.length&&await chrome.declarativeNetRequest.updateSessionRules({removeRuleIds:e.map((e=>e.id))})}};const{$igFrame:Nm}=app;Nm.validateCaption=e=>{const t=2200,n=30,r=30,o=(e.match(/@[\p{L}\d_]+/gu)||[]).length,i=(e.match(/#[\p{L}\d_]+/gu)||[]).length;return e.length>t?`Caption length exceeded: ${e.length} / ${t}`:o>n?`Mention limit exceeded: ${o} / ${n}`:i>r?`Hashtag limit exceeded: ${i} / ${r}`:null};const{$eventBus:Vm}=app;Vm.controller={init:function(){Object.assign(Vm,{send:qm,on:Gm,once:Hm})}};function qm(e,...t){const n=new CustomEvent(`__event-bus.${e}`,{detail:t});globalThis.dispatchEvent(n)}function Gm(e,t,{once:n=!1}={}){globalThis.addEventListener(`__event-bus.${e}`,(e=>{const n=e.detail||[];t(...n)}),{once:n})}function Hm(e,t){Gm(e,t,{once:!0})}const{$timer:Wm,$bus:zm,$utils:Jm}=app;Wm.aliveController={init:function(){this._startedAt=Date.now(),this._alarms=0,this._events=0,this._setupAlarm(),this._setupBus()},logStats:function(){const e=Date.now(),t=Math.floor((e-this._startedAt)/Jm.time.MINUTE),n=`${Math.floor(t/60)}h ${t%60}m`,r=`${this._alarms} alarms`,o=`${this._events} events`;Wm.log(`alive for: ${n}, ${r}, ${o}`)},_setupAlarm:function(){const e=1*Jm.time.MINUTE;Jm.createAlarm("timer.alarm",{period:e},(()=>this._alarms++))},_setupBus:function(){zm.on("timer.ping",(()=>this._events++))}};const{$timer:Ym}=app;Ym.controller={init:function(){Ym.timingController.init(),Ym.aliveController.init()}};const{$timer:Km,$bus:Xm}=app;Km.timingController={init:function(){this._MAX_ID=2147483647,this._lastId=0,this._timerIds=new Set,this._setup()},_setup:function(){globalThis.setTimeout=(e,t,...n)=>{const r=this._generateId();return this._timerIds.add(r),Xm.send("timer.setTimeout",r,t).then((()=>{this._timerIds.has(r)&&e(...n)})),r},globalThis.clearTimeout=e=>{this._timerIds.delete(e),Xm.send("timer.clearTimeout",e)},globalThis.setInterval=(e,t,...n)=>{const r=this._generateId();return this._timerIds.add(r),Xm.send("timer.setInterval",r,t),Xm.on(`timer.setIntervalCall:${r}`,(()=>e(...n))),r},globalThis.clearInterval=e=>{this._timerIds.delete(e),Xm.off(`offscreen.setIntervalCall:${e}`),Xm.send("timer.clearInterval",e)}},_generateId:function(){return this._lastId+=1,this._lastId===this._MAX_ID&&(this._lastId=1),this._lastId}};const{$startup:Qm,$abTesting:Zm,$analytics:ev,$auth:tv,$backup:nv,$badge:rv,$billing:ov,$bus:iv,$cleanup:sv,$dev:av,$env:lv,$i18n:uv,$idb:cv,$igApi:dv,$insights:pv,$inspiration:hv,$later:fv,$sentry:gv,$store:mv,$tagAssist:vv,$uninstall:yv,$utils:bv,$webRequest:_v,$sameSiteFix:wv,$chromeStarter:Pv,$openInInssist:Dv,$fusion:Sv,$overseer:xv,$desktopReels:Iv,$netRules:Ev,$offscreen:Cv,$eventBus:Tv,$lodash:kv,$timer:Av}=app;Qm.controller={init:async function(){globalThis._=kv,this._preventBgInactive(),await chrome.alarms.clearAll(),await iv.controller.init(),await Tv.controller.init(),await Av.controller.init(),await Cv.controller.init(),await lv.controller.init(),await cv.controller.init(),await Ev.controller.init(),await mv.controller.init(),await wv.controller.init(),this._handleExtButtonClick(),await this._clearTimerAlarms(),await gv.controller.init(),await uv.controller.init(),await _v.controller.init(),await yv.controller.init(),await nv.controller.init(),await dv.api.init(),await sv.controller.init(),await xv.controller.init(),await av.controller.init(),await pv.controller.init(),await Dv.controller.init(),await Sv.controller.init(),await vv.controller.init(),await Iv.controller.init(),await Zm.controller.init(),await fv.controller.init(),await hv.controller.init(),await ev.controller.init().sendPageview().sendInstall(),await tv.controller.init(),await ov.controller.init(),await rv.controller.init(),await Pv.controller.init(),iv.on("startup.bgReady",(()=>!0)),Qm.logDev("bg ready")},_clearTimerAlarms:async function(){const e=(await bv.callAsync(chrome.alarms.getAll)).filter((e=>e.name.startsWith("timer-")));for(const t of e)await bv.callAsync(chrome.alarms.clear,t.name)},_handleExtButtonClick:function(){(chrome.browserAction||chrome.action).onClicked.addListener((()=>{chrome.tabs.create({url:chrome.runtime.getURL("/inssist.html"),active:!0})}))},_preventBgInactive:function(){chrome.runtime.onStartup.addListener((()=>{Qm.log("browser startup...")}))}},Qm.controller.init()}();