1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[636],{92:(e,t,n)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/_app",function(){return n(57088)}])},852:e=>{"use strict";"undefined"!=typeof self?e.exports=self:"undefined"!=typeof window?e.exports=window:e.exports=Function("return this")()},1695:(e,t,n)=>{"use strict";n.d(t,{yG:()=>h,hT:()=>l,fD:()=>p,R2:()=>f,Re:()=>d,EW:()=>i,$q:()=>m,UW:()=>g,$z:()=>a,Qr:()=>s,uS:()=>u,W4:()=>y,SK:()=>v});var r=n(40880);let o=JSON.parse('{"nautil.us":"nautilus"}');function i(e){try{let{hostname:t}=new URL(e);return t}catch(t){(0,r.v)(t,{url:e})}return e}function a(e){try{let{origin:t}=new URL(e);return t}catch(t){(0,r.v)(t,{url:e})}return e}function s(e){if(!e)return"";let t=e.startsWith("//")?"https:".concat(e):e;try{let{origin:e,protocol:n}=new URL(t);return"https:"===n||"http:"===n?e:""}catch(e){return""}}function c(e){return e.endsWith("joinlede.com")}function u(e){let{host:t}=new URL(e);var n=t;let r=n.replace("lede-v2.","");return o[n]?o[n]:o[r]?o[r]:c(n)?n.replace(".lede-v2.joinlede.com",""):n.includes("lede-v2")?n.slice(0,n.lastIndexOf(".")).replace("lede-v2.",""):n.slice(0,n.lastIndexOf("."))}function l(e){let t,n,{protocol:r,hostname:o}=new URL(e),i=u(e);switch("production"){case"production":if(c(o)){n="".concat(i,".lede-admin.joinlede.com");break}t=o.replace("lede-v2.",""),n="lede-admin.".concat(t)}return"".concat(r,"//").concat(n)}n(99742);let d=e=>{let t=l(e);return"".concat(t,"/graphql")},f=e=>c(e)?"joinlede.com":e.replace("lede-v2.",""),p=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n={domain:f(e),path:"/",secure:!0,sameSite:"lax"};return t&&(n.expires=new Date(t)),n},h=e=>{let t=new URL("https://lede-v2.joinlede.com");return new URL("".concat(t.protocol).concat(e.headers.host).concat(e.url)).toString()},v=e=>{let t=i(e);return"wp_auth_token_".concat(t.replaceAll(".","_"))},m=e=>"lede_".concat(e,"_auth_token"),g=e=>"lede_".concat(e,"_refresh_token"),y=e=>"lede_".concat(e,"_user")},4309:(e,t,n)=>{"use strict";let r;n.d(t,{a:()=>O,u:()=>R});var o=n(37876),i=n(14232),a=n(34824),s=n(8345),c=n(50774),u=n(15652),l=n.n(u),d=n(86532),f=n(40880),p=n(37062),h=n(17708),v=n(20844),m=n(1695),g=n(48046),y=n(37036);let b=e=>"type"in e?e:{type:null,payload:e},_={clientSecret:"",email:"",name:"",username:"",avatarUrl:"",customerId:null,token:"",expiration:null,refreshToken:"",refreshExpiration:null,entitlements:[],order:null,pendingOrder:!1,pendingOrderFetchAttempts:0,pendingOrderFetchTime:null,coralToken:"",pageViews:{articles:{global:[]},resetDate:null},paymentIntentId:null,paymentAmount:null,subscriptionId:null,productCart:null,productInterval:n(67685).IX.Annual,intervalModified:!1,customerEnteredCoupon:null,customerEnteredCouponProducts:null,verified:!1,validated:!1,hydrated:!1,welcomed:!1,notification:"",lastPath:"",status:y._.Anonymous,countryCode:"",ip:"",cookieConsent:null,showConsentBanner:!0,resumeSession:null,gift:{recipient:null,code:null},theme:y.B.None,beaconSessionData:{userTrackingId:null,sessionId:null,
1sessionSequence:0,userTrackingExpiration:null,sessionExpiration:null},paymentRetried:!1},w=(e,t)=>{let{type:n,payload:r}=b(t),o=e;switch(n){case g.A.DELAY_PENDING_ORDER:{let{pendingOrderFetchTime:t,pendingOrderFetchAttempts:n}=r;o={...e,pendingOrderFetchTime:t,pendingOrderFetchAttempts:n};break}case g.A.RESOLVE_PENDING_ORDER:{let{order:t,pendingOrder:n,pendingOrderFetchTime:i,pendingOrderFetchAttempts:a}=r;o={...e,order:t,pendingOrder:n,pendingOrderFetchTime:i,pendingOrderFetchAttempts:a};break}case g.A.USER_LOGIN:{let{customer:t,token:n,validated:i,customerId:a,expiration:s,refreshToken:c,refreshExpiration:u,order:l,entitlements:d,coralToken:f,notification:p}=r,{avatarUrl:h,email:v,name:m,verified:g}=t;o={...e,email:v,avatarUrl:h,name:m,verified:g,validated:i,customerId:a,token:n,expiration:s,refreshToken:c,refreshExpiration:u,order:l,entitlements:d,coralToken:f,notification:p};break}case g.A.USER_LOGOUT:{let{coralToken:t,email:n,username:r,verified:i,validated:a,customerId:s,token:c,expiration:u,entitlements:l,refreshToken:d,refreshExpiration:f,pageViews:p,status:h,order:v,productInterval:m,productCart:g,paymentRetried:b}=_;o={...e,coralToken:t,email:n,username:r,verified:i,validated:a,customerId:s,token:c,expiration:u,refreshToken:d,refreshExpiration:f,order:v,entitlements:l,productInterval:m,productCart:g,notification:"logout",paymentRetried:b},(h===y._.Paying||h===y._.PastDue)&&(o.pageViews=p);break}case g.A.USER_REFRESH_TOKEN:{let{token:t,expiration:n,refreshToken:i,refreshExpiration:a,coralToken:s}=r;o={...e,token:t,expiration:n,refreshToken:i,refreshExpiration:a,coralToken:s};break}case g.A.UPDATE_PAGEVIEWS:{let{pageViews:{articles:t}}=r,{pageViews:{articles:n,resetDate:i}}=e,a=Object.keys(t).reduce((e,r)=>{let o=n[r]||[],i=t[r].map(e=>e.split("#")[0].split("?")[0]).filter(e=>!o.includes(e));return{...e,[r]:[...o,...i]}},n);o={...e,pageViews:{articles:a,resetDate:i}};break}case g.A.HYDRATE_USER_DATA:default:{let{pageViews:t}=r,{resetDate:n}=t||{};if(o={...e,...r},t&&t.articles&&Object.keys(t.articles).length){let e=n&&Date.now()>n;if(e&&(o.pageViews={..._.pageViews}),e||!n){let e=new Date;e.setDate(e.getDate()+30),o.pageViews.resetDate=e.getTime()}}}}return{...o,entitlements:((e,t)=>{let{payload:n}=b(t),r=n.entitlements||[];return[...e.entitlements||[],...r].reduce((e,t)=>e.every(e=>e.name!==t.name)?[...e,t]:e,[])})(o,t),status:((e,t)=>{let{payload:n}=b(t),{email:r,validated:o,order:i}={...e,...n};return r&&!o?y._.Registered:r&&o&&!i?y._.LoggedIn:r&&o&&i&&"active"===i.status?y._.Paying:r&&o&&i&&"past_due"===i.status?y._.PastDue:y._.Anonymous})(o,t)}},E=l()(),S=(0,i.createContext)([]),I=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return r||(r=d.createInstance({...e,name:"lede",storeName:"lede",description:"persistent storage of critical state data for the Lede application."})),r}(),k=async e=>{let t=_;try{let n=await I.getItem(e),r=Object.keys(n);r&&r.length&&(t=n)}catch(e){(0,f.R)("user state empty or not an object, initializing...",{location:"getCurrentStorageState",err:e})}return t},A=async(e,t)=>{var n,r,o,i,a,s;let c=await k(t),u=e?{validated:!0,email:null==(n=e.customer)?void 0:n.email,name:null==(r=e.customer)?void 0:r.name,username:null==(o=e.customer)?void 0:o.username,avatarUrl:null==(i=e.customer)?void 0:i.avatarUrl,verified:null==(a=e.customer)?void 0:a.verified,coralToken:e.coralToken,customerId:null==(s=e.customer)?void 0:s.id,token:e.token,expiration:e.tokenExpiration,refreshToken:e.refreshToken,refreshExpiration:e.refreshExpiration,entitlements:e.entitlements,order:e.order}:{validated:!1,customerId:null,order:null,email:null},l=await fetch((0,p.c)("geo"),{method:"GET",headers:{"Cache-Control":"no-cache"}}),d=await l.json();return{...c,...u,...d}},R=()=>{let[e,t,n,r]=(0,i.useContext)(S);return{userData:e,updateUserData:t,userCan:n,userCanWildcard:r}},O=e=>{var t;let{children:n,initialState:r={},darkThemeEnabled:u=!0}=e,l=(0,a.useRouter)(),d=null!=(t=null==l?void 0:l.pathname)?t:null,f=(()=>{let e=(0,h.A)(),[t,n]=(0,i.useState)((0,m.W4)(e));return((0,i.useEffect)(()=>{n((0,m.W4)(e))},[e]),e)?t:"lede_user"})(),b=(0,h.A)(),R=(0,m.$q)(b),O=(0,m.UW)(b),[x,j]=(0,s.A)([f,R,O]),{data:C,update:D}=(0,c.wV)(),T={..._,...r},N=(0,v.A)();u?N&&N!==y.B.None&&(T.theme=N):T.theme=y.B.Light;let[L,U]=(0,i.useReducer)(w,T),{hydrated:P,entitlements:B,customerId:M,pendingOrder:F,pendingOrderFetchTime:W,pendingOrderFetchAttempts:G,token:H,expiration:q,refreshToken:$,refreshExpiration:V,status:z,paymentRetried:K}=L,X=(0,i.useCallback)(async()=>{let e=await A(C,f);
1if(u){if(!N||N===y.B.None){var t,n;e.theme=(null==(n=window)||null==(t=n.matchMedia("(prefers-color-scheme: dark)"))?void 0:t.matches)?y.B.Dark:y.B.Light}}else e.theme=y.B.Light;U({type:g.A.HYDRATE_USER_DATA,payload:{...e,hydrated:!0}})},[P,f,u]),J=(0,i.useCallback)(async e=>{let t={...await k(f),...(e=>{let t=["pageViews","productInterval","productCart","customerEnteredCoupon","customerEnteredCouponProducts","lastPath","notification","welcomed","resumeSession","gift","theme","beaconSessionData","paymentRetried"];return Object.keys(e).reduce((n,r)=>t.includes(r)?{...n,[r]:e[r]}:n,{})})(e)};await I.setItem(f,t)},[f,x]),Y=(0,i.useCallback)(e=>!!B.some(t=>t.name===e),[B]),Q=(0,i.useCallback)(e=>{let t="".concat(e,"-");return!!B.some(n=>n.name===e||n.name.substr(0,t.length)==="".concat(e,"-"))},[B]);return(0,i.useEffect)(()=>{P||X()},[P]),(0,i.useEffect)(()=>{P&&J(L)},[P,L]),(0,i.useEffect)(()=>{P&&H&&j(R,H,(0,m.fD)(E.location.host,q))},[P,H]),(0,i.useEffect)(()=>{P&&$&&j(O,$,(0,m.fD)(E.location.host,V))},[P,$]),(0,i.useEffect)(()=>{P&&K&&z!==y._.PastDue&&U({paymentRetried:!1})},[P,z]),(0,i.useEffect)(()=>{let e=Date.now();P&&M&&F&&W<=e&&fetch((0,p.c)("order",{customerId:M}),{method:"GET",headers:{"Cache-Control":"no-cache"}}).then(e=>e.json()).then(async t=>{if(t.id){U({type:g.A.RESOLVE_PENDING_ORDER,payload:{order:t,pendingOrder:!1,pendingOrderFetchTime:null,pendingOrderFetchAttempts:0}}),D({...C,mustRevalidate:!0});let e=await A(C,f);U({type:g.A.USER_REFRESH_TOKEN,payload:e})}else U({type:g.A.DELAY_PENDING_ORDER,payload:{pendingOrderFetchTime:G<6?e+1e4:e+72e5,pendingOrderFetchAttempts:G+1}})})},[P,M,d,F,G,W]),(0,o.jsx)(S.Provider,{value:(0,i.useMemo)(()=>[L,U,Y,Q],[L]),children:n})}},4361:(e,t,n)=>{e.exports=n(45139)},5130:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var r=n(53441);function o(e,t){void 0===t&&(t={});var n,r,o=(n=e)&&"j"===n[0]&&":"===n[1]?n.substr(2):n;if(void 0===(r=t.doNotParse)&&(r=!o||"{"!==o[0]&&"["!==o[0]&&'"'!==o[0]),!r)try{return JSON.parse(o)}catch(e){}return e}var i=function(){return(i=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)};let a=function(){function e(e,t){var n=this;this.changeListeners=[],this.HAS_DOCUMENT_COOKIE=!1,this.cookies="string"==typeof e?r.q(e,t):"object"==typeof e&&null!==e?e:{},new Promise(function(){n.HAS_DOCUMENT_COOKIE="object"==typeof document&&"string"==typeof document.cookie}).catch(function(){})}return e.prototype._updateBrowserValues=function(e){this.HAS_DOCUMENT_COOKIE&&(this.cookies=r.q(document.cookie,e))},e.prototype._emitChange=function(e){for(var t=0;t<this.changeListeners.length;++t)this.changeListeners[t](e)},e.prototype.get=function(e,t,n){return void 0===t&&(t={}),this._updateBrowserValues(n),o(this.cookies[e],t)},e.prototype.getAll=function(e,t){void 0===e&&(e={}),this._updateBrowserValues(t);var n={};for(var r in this.cookies)n[r]=o(this.cookies[r],e);return n},e.prototype.set=function(e,t,n){var o;"object"==typeof t&&(t=JSON.stringify(t)),this.cookies=i(i({},this.cookies),((o={})[e]=t,o)),this.HAS_DOCUMENT_COOKIE&&(document.cookie=r.l(e,t,n)),this._emitChange({name:e,value:t,options:n})},e.prototype.remove=function(e,t){var n=t=i(i({},t),{expires:new Date(1970,1,1,0,0,1),maxAge:0});this.cookies=i({},this.cookies),delete this.cookies[e],this.HAS_DOCUMENT_COOKIE&&(document.cookie=r.l(e,"",n)),this._emitChange({name:e,value:void 0,options:t})},e.prototype.addChangeListener=function(e){this.changeListeners.push(e)},e.prototype.removeChangeListener=function(e){var t=this.changeListeners.indexOf(e);t>=0&&this.changeListeners.splice(t,1)},e}()},8345:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var r=n(14232),o=n(26252);function i(e){var t=(0,r.useContext)(o.Ay);if(!t)throw Error("Missing <CookiesProvider>");var n=t.getAll(),i=(0,r.useState)(n),a=i[0],s=i[1],c=(0,r.useRef)(a);return"undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement&&(0,r.useLayoutEffect)(function(){function n(){var n=t.getAll();(function(e,t,n){if(!e)return!0;for(var r=0;r<e.length;r++){var o=e[r];if(t[o]!==n[o])return!0}return!1})(e||null,n,c.current)&&s(n),c.current=n}return t.addChangeListener(n),function(){t.removeChangeListener(n)}},[t]),[a,(0,r.useMemo)(function(){return t.set.bind(t)},[t]),(0,r.useMemo)(function(){return t.remove.bind(t)},[t])]}},10221:(e,t,n)=>{"use strict";var r=n(65225);if(r)try{r([],"length")}catch(e){r=null}e.exports=r}
1,15652:(e,t,n)=>{"use strict";var r=n(16576),o=n(852),i=n(87723),a=n(20717),s=i(),c=function(){return s};r(c,{getPolyfill:i,implementation:o,shim:a}),e.exports=c},16576:(e,t,n)=>{"use strict";var r=n(66825),o="function"==typeof Symbol&&"symbol"==typeof Symbol("foo"),i=Object.prototype.toString,a=Array.prototype.concat,s=n(27239),c=n(73677)(),u=function(e,t,n,r){if(t in e){if(!0===r){if(e[t]===n)return}else if("function"!=typeof r||"[object Function]"!==i.call(r)||!r())return}c?s(e,t,n,!0):s(e,t,n)},l=function(e,t){var n=arguments.length>2?arguments[2]:{},i=r(t);o&&(i=a.call(i,Object.getOwnPropertySymbols(t)));for(var s=0;s<i.length;s+=1)u(e,i[s],t[i[s]],n[i[s]])};l.supportsDescriptors=!!c,e.exports=l},17708:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var r=n(34824),o=n(1695);let i=()=>{var e;let t=(0,r.useRouter)(),n=null==t||null==(e=t.query)?void 0:e.siteSlug;return n||(0,o.uS)(window.location.href)}},20717:(e,t,n)=>{"use strict";var r=n(16576),o=n(10221),i=n(87723);e.exports=function(){var e=i();if(r.supportsDescriptors){var t=o(e,"globalThis");(!t||t.configurable&&(t.enumerable||!t.writable||globalThis!==e))&&Object.defineProperty(e,"globalThis",{configurable:!0,enumerable:!1,value:e,writable:!0})}else("object"!=typeof globalThis||globalThis!==e)&&(e.globalThis=e);return e}},20844:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var r=n(37036),o=n(8345);let i=()=>{let[e]=(0,o.A)(),{"vip-go-seg":t}=e;return t&&Object.values(r.B).includes(t)?t:r.B.None}},26252:(e,t,n)=>{"use strict";n.d(t,{Ay:()=>s,Kq:()=>a});var r=n(14232),o=n(85877),i=r.createContext(new o.A),a=i.Provider;i.Consumer;let s=i},27239:(e,t,n)=>{"use strict";var r=n(98857),o=n(71742),i=n(65865),a=n(10221);e.exports=function(e,t,n){if(!e||"object"!=typeof e&&"function"!=typeof e)throw new i("`obj` must be an object or a function`");if("string"!=typeof t&&"symbol"!=typeof t)throw new i("`property` must be a string or a symbol`");if(arguments.length>3&&"boolean"!=typeof arguments[3]&&null!==arguments[3])throw new i("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&"boolean"!=typeof arguments[4]&&null!==arguments[4])throw new i("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&"boolean"!=typeof arguments[5]&&null!==arguments[5])throw new i("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&"boolean"!=typeof arguments[6])throw new i("`loose`, if provided, must be a boolean");var s=arguments.length>3?arguments[3]:null,c=arguments.length>4?arguments[4]:null,u=arguments.length>5?arguments[5]:null,l=arguments.length>6&&arguments[6],d=!!a&&a(e,t);if(r)r(e,t,{configurable:null===u&&d?d.configurable:!u,enumerable:null===s&&d?d.enumerable:!s,value:n,writable:null===c&&d?d.writable:!c});else if(!l&&(s||c||u))throw new o("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");else e[t]=n}},29865:(e,t,n)=>{"use strict";n.d(t,{H:()=>i,R:()=>o});var r=function(e){return e.DEBUG="DEBUG",e.INFO="INFO",e.WARN="WARN",e.ERROR="ERROR",e}(r||{});function o(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"INFO";"INFO"!==r&&"DEBUG"!==r&&console.log(JSON.stringify({context:t,level:r,message:e,requestContext:n,timestamp:Math.round(Date.now()/1e3)}))}let i=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return function(t){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};o(t.message||"An unknown error occurred",{...n,...e,stack:t.stack},r,"ERROR")}}},30590:(e,t,n)=>{"use strict";n.d(t,{A:()=>c});var r=n(14232),o=n(15652),i=n.n(o),a=n(4309);let s=i()(),c=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",{userData:t}=(0,a.u)(),{hydrated:n,cookieConsent:o,showConsentBanner:i}=t,[c,u]=(0,r.useState)(!1);return(0,r.useEffect)(()=>{n&&(i&&s.CC&&"function"==typeof s.CC.allowedCategory?u(s.CC.allowedCategory(e)):u(!0))},[i,o,n,e]),c}},31969:()=>{},34824:(e,t,n)=>{e.exports=n(59784)},37036:(e,t,n)=>{"use strict";n.d(t,{B:()=>r,_:()=>o});
1var r=function(e){return e.None="none",e.Dark="dark",e.Light="light",e}({}),o=function(e){return e.Anonymous="anonymous",e.Unverified="unverified",e.Registered="registered",e.LoggedIn="loggedIn",e.Paying="paying",e.PastDue="pastDue",e}({})},37062:(e,t,n)=>{"use strict";function r(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=new URL("".concat(window.location.origin,"/api/").concat(e));return Object.keys(t).forEach(e=>{t[e]&&n.searchParams.append(e,t[e])}),n.toString()}n.d(t,{c:()=>r})},40880:(e,t,n)=>{"use strict";n.d(t,{R:()=>r.R,v:()=>o});var r=n(29865);let o=(0,r.H)()},42091:(e,t,n)=>{"use strict";n.d(t,{f:()=>T,A:()=>N});var r=n(37876),o=n(14232);n(29865);var i=n(15652),a=n.n(i),s=n(89099),c=n(4309),u=n(30590),l=n(91423);let d=()=>{var e;return"undefined"==typeof crypto||void 0===(null==(e=crypto)?void 0:e.randomUUID)?(0,l.A)():crypto.randomUUID()};var f=n(17708);let p=a()(),h={customer_id:"user_id"};var v=n(1695),m=n(40880);async function g(e,t){try{let n=await fetch(e,{method:"POST",cache:"no-cache",credentials:"include",keepalive:!0,headers:{"Content-Type":"application/json"},body:JSON.stringify(t)});if(!n.ok)throw Error("Beacon request error, status code ".concat(n.status))}catch(e){(0,m.v)(e,{data:t})}}let y=e=>{let t=(0,v.R2)(window.location.host).split(".").slice(-2).join("."),n=["develop","preprod"].includes("production")?"test.".concat(t):t;return"//t.".concat(n).concat(e)},b=async function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{sessionSequence:0},r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};if("page_view"===e||"conversion"===e)return null;let{userTrackingId:o,sessionId:i,sessionSequence:a}=n,s=y("/collect"),c=((e,t,n)=>{let r={eventName:e,eventTimestamp:new Date().toISOString(),customerId:n.customer_id,userAgent:window.navigator.userAgent,ipAddress:n.ip,pageHostname:window.location.hostname,pagePath:window.location.pathname,pageTitle:t.pageTitle,contentType:t.postType,contentId:t.postId,publisher:n.publisher_name,referer:document.referrer,theme:n.theme},o=new URLSearchParams(window.location.search);o.get("giftLink")&&(r.giftLinkHash=o.get("giftLink"));let i=Array.from(o).length>0?{utmSource:o.get("utm_source"),utmMedium:o.get("utm_medium"),utmCampaign:o.get("utm_campaign"),utmTerm:o.get("utm_term"),utmContent:o.get("utm_content")}:{},a=((e,t)=>{let n={};switch(e){case"add_payment_info":case"begin_checkout":case"purchase":case"select_item":case"subscription_upgrade":case"subscription_downgrade":case"subscription_interval_switch":case"subscription_canceled":case"subscription_undo_cancel":var r,o;n.objectId=Array.isArray(null==(r=t)?void 0:r.items)&&(null==(o=r.items[0])?void 0:o.item_id)?parseInt(r.items[0].item_id,10):null,n.objectType=n.objectId?"product":null;break;case"view_item_list":n.objectId=parseInt(null==t?void 0:t.item_list_id,10)||null,n.objectType=n.objectId?"productGroup":null}return{...n,...t}})(e,t);return{...r,...i,...a}})("beacon_page_view"===e?"page_view":e,t,r),u=d();return await g(s,{eventId:u,userTrackingId:o,sessionId:i,sessionSequence:a,...c}),u},_=async(e,t)=>{await g(y("/tick"),{eventId:e,seconds:t})};var w=n(45105),E=n.n(w);let S=e=>{let{userConsented:t,googleAnalyticsPublisherId:n,googleAdWordsConversionId:o,auxiliaryTrackingEnabled:i,anglerConfig:a}=e;return t?(0,r.jsxs)(r.Fragment,{children:[i?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(E(),{strategy:"afterInteractive","data-cookiecategory":"analytics",src:"https://www.googletagmanager.com/gtag/js?id=".concat("G-SM9GDF7L10")}),(0,r.jsx)(E(),{id:"google-analytics","data-cookiecategory":"analytics",strategy:"afterInteractive",children:"\n window.dataLayer = window.dataLayer || [];\n window.gtag = function gtag(){window.dataLayer.push(arguments);}\n gtag('js', new Date());\n gtag('consent', 'default', {\n analytics_storage: 'granted',\n });\n gtag('config', '".concat("G-SM9GDF7L10","', { send_page_view: false });\n if (").concat(!!n,") {\n gtag('config', '").concat(n,"', { send_page_view: false });\n }\n ")}),o?(0,r.jsx)(E(),{id:"google-adwords","data-cookiecategory":"marketing",strategy:"afterInteractive",children:"\n gtag('config', '".concat(o,"', { send_page_view: false });\n ")}):null]}):null,(null==a?void 0:a.workspaceId)&&(null==a?void 0:a.token)?(0,r.jsx)(E(),{id:"angler-sdk",strategy:"afterInteractive",src:"https://static.getangler.ai/dist/analytics/_latest.min.js",onLoad:()=>{var e;(null==(e=window.anglerai)?void 0:e.init)&&window.anglerai.init({workspaceId:a.workspaceId,token:a.token})}}):null]}):null};var I=n(37036);let k=a()(),A=e=>function(t){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};k.gtag&&t&&e&&k.gtag("event",t,{...n,send_to:e})},R=a()(),O={page_view:"page_viewed",begin_checkout:"checkout_started",add_payment_info:"payment_info_submitted",purchase:"checkout_completed",subscription_upgrade:"checkout_completed",gift_purchase:"checkout_completed",product_added_to_cart:"product_added_to_cart",product_removed_from_cart:"product_removed_from_cart",customer_verified:"registration_completed"},x=(e,t,n)=>{var r;let o=O[e];if(!o||!(null==(r=R.anglerai)?void 0:r.sendEvent))return;let i=((e,t,n,r)=>{let o={},i=((e,t)=>{let n={},r=e.customer_id||t.customer_id;r&&(n.id=r.toString());let o=e.customer_email||t.customer_email;return o&&(n.email=o),Object.keys(n).length?n:null})(r,n);if(i&&(o.customer=i),["checkout_started","payment_info_submitted","checkout_completed"].includes(t)&&(o.checkout=(e=>{var t;let n=(e.currency||"USD").toUpperCase(),r={currencyCode:n,totalPrice:{amount:e.value||0,currencyCode:n}};return e.transaction_id&&(r.orderId=e.transaction_id.toString()),(null==(t=e.items)?void 0:t.length)&&(r.lineItems=e.items.map(e=>
1({merchandise:{id:e.item_id,product:{title:e.item_name},price:{amount:e.price,currencyCode:(e.currency||n).toUpperCase()},sku:e.item_variant||null},quantity:e.quantity||1}))),r})(n)),["product_added_to_cart","product_removed_from_cart"].includes(t)){let e=(e=>{var t;let n=null==(t=e.items)?void 0:t[0];if(!n)return null;let r=(n.currency||e.currency||"USD").toUpperCase();return{merchandise:{id:n.item_id,product:{title:n.item_name},price:{amount:n.price,currencyCode:r},sku:n.item_variant||null},cost:{totalAmount:{amount:n.price,currencyCode:r}},quantity:n.quantity||1}})(n);e&&(o.cartLine=e)}let a=[];if("subscription_upgrade"===e&&a.push({name:"checkout_type",value:"upgrade"}),"gift_purchase"===e&&a.push({name:"checkout_type",value:"gift"}),"page_viewed"===t){let e=n.page_path||window.location.pathname;e&&a.push({name:"page_path",value:e}),window.location.href&&a.push({name:"page_url",value:window.location.href}),document.title&&a.push({name:"page_title",value:document.title}),document.referrer&&a.push({name:"page_referrer",value:document.referrer})}return r.publisher_name&&a.push({name:"publisher_name",value:r.publisher_name}),a.length&&(o.customData=a),{eventName:t,data:o}})(e,o,t,n);R.anglerai.sendEvent(i)},j=a()(),C=[],D={data:{event:"",order_id:null,product_id:null,publisher_name:"",customer_id:null,customer_email:null,customer_verified:!1,customer_validated:!1,customer_status:I._.Anonymous,theme:I.B.None},trackEvent:null,setGoogleAnalyticsPublisherId:null,setGoogleAdWordsConversionId:null,setAuxiliaryTrackingEnabled:null,setAnglerConfig:null},T=(0,o.createContext)(D),N=e=>{let t=(0,o.useRef)(!1),{children:n}=e,i=(0,s.useRouter)(),{userData:a,updateUserData:l}=(0,c.u)(),{hydrated:v,beaconSessionData:m,verified:g}=a,y=(0,o.useRef)(null),w=(e=>{let[t,n]=(0,o.useState)(null),r=(0,f.A)(),{customerId:i,email:a,order:s,status:c,verified:u,validated:l,hydrated:d,productCart:p,ip:h,theme:v}=e;return(0,o.useEffect)(()=>{if(d){let e={order_id:null==s?void 0:s.id,product_id:(null==p?void 0:p.id)||(null==s?void 0:s.productId),product_name:null==p?void 0:p.name,publisher_name:r,customer_id:i,customer_email:a,customer_verified:u,customer_validated:l,customer_status:c,ip:h,theme:v};n(Object.keys(e).reduce((t,n)=>e[n]?{...t,[n]:e[n]}:t,{}))}},[d,s,r,i,a,u,l,c,v]),t})(a),[E,I]=(0,o.useState)(null),[k,R]=(0,o.useState)(null),[O,D]=(0,o.useState)(null),[N,L]=(0,o.useState)(null),[U,P]=(0,o.useState)(null),[B,M]=(0,o.useState)(null),[F,W]=(0,o.useState)(null),[G,H]=(0,o.useState)(!1),q=(0,o.useRef)(m),[$,V]=(0,o.useState)(0),z=(0,o.useRef)(!1),K=(0,u.A)("analytics"),X=(0,o.useCallback)(A(B),[B]),J=(0,o.useCallback)(A(F),[F]),Y=(e=>{let t=(0,o.useRef)(null),n=(0,o.useRef)(0),r=(0,o.useRef)(null),i=(0,o.useRef)(5e3),a=(0,o.useRef)(null),s=(0,o.useRef)(e);s.current=e;let c=(0,o.useCallback)(()=>n.current+(null!==r.current?Date.now()-r.current:0),[]),u=(0,o.useCallback)(()=>{null!==a.current&&(clearTimeout(a.current),a.current=null)},[]),l=(0,o.useCallback)(()=>{u(),null!==t.current&&null!==r.current&&(a.current=setTimeout(()=>{null!==t.current&&null!==r.current&&(s.current(t.current,i.current/1e3),i.current+=5e3,l())},Math.max(0,i.current-c())))},[u,c]),d=(0,o.useCallback)(()=>{null!==t.current&&null!==r.current&&(n.current+=Date.now()-r.current,r.current=null,u(),s.current(t.current,Math.round(n.current/1e3)))},[u]),f=(0,o.useCallback)(()=>{null!==t.current&&null===r.current&&(r.current=Date.now(),l())},[l]),p=(0,o.useCallback)(e=>{u(),t.current=e,n.current=0,i.current=5e3,r.current="undefined"!=typeof document&&document.hidden?null:Date.now(),l()},[u,l]);return(0,o.useEffect)(()=>{let e=()=>{document.hidden?d():f()},n=()=>{null!==t.current&&s.current(t.current,Math.round(c()/1e3))};return document.addEventListener("visibilitychange",e),window.addEventListener("pagehide",n),()=>{document.removeEventListener("visibilitychange",e),window.removeEventListener("pagehide",n),u()}},[d,f,c,u]),p})(_);(e=>{(0,o.useEffect)(()=>{if(p&&p.gtag&&e&&Object.keys(e).length){let t=Object.keys(e).reduce((t,n)=>{if(!e[n])return t;let r=Object.keys(h).includes(n)?h[n]:n;return{...t,[r]:e[n]}},{});p.gtag("set",t)}},[e])})(w);let Q=async function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};C.push({eventName:e,eventData:t}),V(e=>e+1)},Z=(0,o.useCallback)(async function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(w&&B&&N){let r=await b(e,n,t,w);"beacon_page_view"===e&&r&&Y(r),"conversion"!==e&&"beacon_page_view"!==e&&X(e,n),F&&"conversion"===e&&J(e,n),U&&x(e,n,w)}else if(w&&!N){let r=await b(e,n,t,w);"beacon_page_view"===e&&r&&Y(r),U&&x(e,n,w)}else C.push({eventName:e,eventData:n})},[w,B,F,U,Y]),ee=()=>{if(!C.length){z.current&&(l({beaconSessionData:q.current}),z.current=!1),H(!1);return}H(!0);let e=(e=>{let{userTrackingId:t,sessionId:n,sessionSequence:r,userTrackingExpiration:o,sessionExpiration:i}=e,a=o>=Date.now()?t:d();return{userTrackingId:a,sessionId:i>=Date.now()?n:d(),sessionSequence:i>=Date.now()?r+1:1,userTrackingExpiration:Date.now()+31536e6,sessionExpiration:Date.now()+18e5}})(q.current),{eventName:t,eventData:n}=C.shift();Z(t,e,n).then(()=>{"page_view"!==t&&"conversion"!==t&&(q.current=e,z.current=!0),setTimeout(ee,50)})},et=(0,o.useCallback)(async function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";e.includes("token=")||e.includes("loginEvent=")||e.includes("hash=")||await Q("page_view",{page_path:window.location.pathname})},[w,Q]);return(0,o.useEffect)(()=>{v&&!j.trackedInitialPageview&&w&&!t.current&&K&&(q.current=m,et(window.location.href),t.current=!0)},[v,m,w,K,et]),(0,o.useEffect)(()=>
1{if(v&&w){if(null===y.current){y.current=!!g;return}!y.current&&g&&Q("customer_verified",{customer_id:a.customerId,customer_email:a.email}),y.current=!!g}},[v,g,w]),(0,o.useEffect)(()=>(i.events.on("routeChangeComplete",et),()=>{i.events.off("routeChangeComplete",et)}),[i,et]),(0,o.useEffect)(()=>{null!==E&&(E?M(["G-SM9GDF7L10",E]):M("G-SM9GDF7L10"))},[E]),(0,o.useEffect)(()=>{null!==k&&null!==O&&k&&O&&W("".concat(k,"/").concat(O))},[k,O]),(0,o.useEffect)(()=>{K&&!G&&w&&null!==B&&C.length&&ee()},[$,w,B,K]),(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(S,{userConsented:K,googleAnalyticsPublisherId:E,googleAdWordsConversionId:k,googleAdWordsConversionLabel:O,globalTrackingData:w,auxiliaryTrackingEnabled:N,anglerConfig:U}),(0,r.jsx)(T.Provider,{value:(0,o.useMemo)(()=>({data:w,trackEvent:Q,setGoogleAnalyticsPublisherId:I,setGoogleAdWordsConversionId:R,setGoogleAdWordsConversionLabel:D,setAuxiliaryTrackingEnabled:L,setAnglerConfig:P}),[w,Q]),children:n})]})}},43737:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=n(99742);function o(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return!(r.env.NEXT_PUBLIC_DISABLE_LEDE_FEATURES?r.env.NEXT_PUBLIC_DISABLE_LEDE_FEATURES.split(","):[]).includes(e)&&(!(e in t)||t[e])}},45105:(e,t,n)=>{e.exports=n(87665)},48046:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=function(e){return e.DELAY_PENDING_ORDER="DELAY_PENDING_ORDER",e.HYDRATE_USER_DATA="HYDRATE_USER_DATA",e.RESOLVE_PENDING_ORDER="RESOLVE_PENDING_ORDER",e.UPDATE_PAGEVIEWS="UPDATE_PAGEVIEWS",e.USER_LOGOUT="USER_LOGOUT",e.USER_LOGIN="USER_LOGIN",e.USER_REFRESH_TOKEN="USER_REFRESH_TOKEN",e}(r||{});let o=r},50774:(e,t,n)=>{"use strict";n.d(t,{CP:()=>el,Ht:()=>ei,Jv:()=>ec,CI:()=>eu,wV:()=>eo});var r,o,i,a,s,c=n(37876),u=n(14232),l=n.t(u,2);class d extends Error{constructor(e,t){e instanceof Error?super(void 0,{cause:{err:e,...e.cause,...t}}):"string"==typeof e?(t instanceof Error&&(t={err:t,...t.cause}),super(e,t)):super(void 0,e),this.name=this.constructor.name,this.type=this.constructor.type??"AuthError",this.kind=this.constructor.kind??"error",Error.captureStackTrace?.(this,this.constructor);let n=`https://errors.authjs.dev#${this.type.toLowerCase()}`;this.message+=`${this.message?". ":""}Read more at ${n}`}}class f extends d{}f.kind="signIn";class p extends d{}p.type="AdapterError";class h extends d{}h.type="AccessDenied";class v extends d{}v.type="CallbackRouteError";class m extends d{}m.type="ErrorPageLoop";class g extends d{}g.type="EventError";class y extends d{}y.type="InvalidCallbackUrl";class b extends f{constructor(){super(...arguments),this.code="credentials"}}b.type="CredentialsSignin";class _ extends d{}_.type="InvalidEndpoints";class w extends d{}w.type="InvalidCheck";class E extends d{}E.type="JWTSessionError";class S extends d{}S.type="MissingAdapter";class I extends d{}I.type="MissingAdapterMethods";class k extends d{}k.type="MissingAuthorize";class A extends d{}A.type="MissingSecret";class R extends f{}R.type="OAuthAccountNotLinked";class O extends f{}O.type="OAuthCallbackError";class x extends d{}x.type="OAuthProfileParseError";class j extends d{}j.type="SessionTokenError";class C extends f{}C.type="OAuthSignInError";class D extends f{}D.type="EmailSignInError";class T extends d{}T.type="SignOutError";class N extends d{}N.type="UnknownAction";class L extends d{}L.type="UnsupportedStrategy";class U extends d{}U.type="InvalidProvider";class P extends d{}P.type="UntrustedHost";class B extends d{}B.type="Verification";class M extends f{}M.type="MissingCSRF";class F extends d{}F.type="DuplicateConditionalUI";class W extends d{}W.type="MissingWebAuthnAutocomplete";class G extends d{}G.type="WebAuthnVerificationError";class H extends f{}H.type="AccountNotLinked";class q extends d{}q.type="ExperimentalFeatureNotEnabled";class $ extends d{}class V extends d{}async function z(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o="".concat(K(t),"/").concat(e);try{var i;let e={headers:{"Content-Type":"application/json",...(null==r||null==(i=r.headers)?void 0:i.cookie)?{cookie:r.headers.cookie}:{}}};(null==r?void 0:r.body)&&(e.body=JSON.stringify(r.body),e.method="POST");let t=await fetch(o,e),n=await t.json();if(!t.ok)throw n;return n}catch(e){return n.error(new $(e.message,e)),null}}function K(e){return e.basePath}function X(){return Math.floor(Date.now()/1e3)}function J(e){let t=new URL("http://localhost:3000/api/auth");e&&!e.startsWith("http")&&(e="https://".concat(e));let n=new URL(e||t),r=("/"===n.pathname?t.pathname:n.pathname).replace(/\/$/,""),o="".concat(n.origin).concat(r);return{origin:n.origin,host:n.host,path:r,base:o,toString:()=>
1o}}var Y=n(99742);let Q={baseUrl:J(null!=(o=Y.env.NEXTAUTH_URL)?o:Y.env.VERCEL_URL).origin,basePath:J(Y.env.NEXTAUTH_URL).path,baseUrlServer:J(null!=(a=null!=(i=Y.env.NEXTAUTH_URL_INTERNAL)?i:Y.env.NEXTAUTH_URL)?a:Y.env.VERCEL_URL).origin,basePathServer:J(null!=(s=Y.env.NEXTAUTH_URL_INTERNAL)?s:Y.env.NEXTAUTH_URL).path,_lastSync:0,_session:void 0,_getSession:()=>{}},Z=null;function ee(){return new BroadcastChannel("next-auth")}function et(){return"undefined"==typeof BroadcastChannel?{postMessage:()=>{},addEventListener:()=>{},removeEventListener:()=>{}}:(null===Z&&(Z=ee()),Z)}let en={debug:console.debug,error:console.error,warn:console.warn},er=null==(r=u.createContext)?void 0:r.call(l,void 0);function eo(e){if(!er)throw Error("React Context is unavailable in Server Components");let t=u.useContext(er),{required:n,onUnauthenticated:r}=null!=e?e:{},o=n&&"unauthenticated"===t.status;return(u.useEffect(()=>{if(o){let e="".concat(Q.basePath,"/signin?").concat(new URLSearchParams({error:"SessionRequired",callbackUrl:window.location.href}));r?r():window.location.href=e}},[o,r]),o)?{data:t.data,update:t.update,status:"loading"}:t}async function ei(e){var t;let n=await z("session",Q,en,e);return(null==(t=null==e?void 0:e.broadcast)||t)&&ee().postMessage({event:"session",data:{trigger:"getSession"}}),n}async function ea(){var e;let t=await z("csrf",Q,en);return null!=(e=null==t?void 0:t.csrfToken)?e:""}async function es(){return z("providers",Q,en)}async function ec(e,t,n){var r,o,i;let{redirect:a=!0}=null!=t?t:{},s=null!=(o=null!=(r=null==t?void 0:t.redirectTo)?r:null==t?void 0:t.callbackUrl)?o:window.location.href,c=K(Q),u=await es();if(!u){window.location.href="".concat(c,"/error");return}if(!e||!(e in u)){window.location.href="".concat(c,"/signin?").concat(new URLSearchParams({callbackUrl:s}));return}let l="credentials"===u[e].type,d="email"===u[e].type,f="".concat(c,"/").concat(l?"callback":"signin","/").concat(e),p=await ea(),h=await fetch("".concat(f,"?").concat(new URLSearchParams(n)),{method:"post",headers:{"Content-Type":"application/x-www-form-urlencoded","X-Auth-Return-Redirect":"1"},body:new URLSearchParams({...t,csrfToken:p,callbackUrl:s})}),v=await h.json();if(a||!(l||d)){let e=null!=(i=v.url)?i:s;window.location.href=e,e.includes("#")&&window.location.reload();return}let m=new URL(v.url).searchParams.get("error"),g=new URL(v.url).searchParams.get("code");return h.ok&&await Q._getSession({event:"storage"}),{error:m,code:g,status:h.status,ok:h.ok,url:m?null:v.url}}async function eu(e){var t,n,r,o;let i=null!=(n=null!=(t=null==e?void 0:e.redirectTo)?t:null==e?void 0:e.callbackUrl)?n:window.location.href,a=K(Q),s=await ea(),c=await fetch("".concat(a,"/signout"),{method:"post",headers:{"Content-Type":"application/x-www-form-urlencoded","X-Auth-Return-Redirect":"1"},body:new URLSearchParams({csrfToken:s,callbackUrl:i})}),u=await c.json();if(et().postMessage({event:"session",data:{trigger:"signout"}}),null==(r=null==e?void 0:e.redirect)||r){let e=null!=(o=u.url)?o:i;window.location.href=e,e.includes("#")&&window.location.reload();return}return await Q._getSession({event:"storage"}),u}function el(e){if(!er)throw Error("React Context is unavailable in Server Components");let{children:t,basePath:n,refetchInterval:r,refetchWhenOffline:o}=e;n&&(Q.basePath=n);let i=void 0!==e.session;Q._lastSync=i?X():0;let[a,s]=u.useState(()=>(i&&(Q._session=e.session),e.session)),[l,d]=u.useState(!i);u.useEffect(()=>(Q._getSession=async function(){let{event:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};try{let t="storage"===e;if(t||void 0===Q._session){Q._lastSync=X(),Q._session=await ei({broadcast:!t}),s(Q._session);return}if(!e||null===Q._session||X()<Q._lastSync)return;Q._lastSync=X(),Q._session=await ei(),s(Q._session)}catch(e){en.error(new V(e.message,e))}finally{d(!1)}},Q._getSession(),()=>{Q._lastSync=0,Q._session=void 0,Q._getSession=()=>{}}),[]),u.useEffect(()=>{let e=()=>Q._getSession({event:"storage"});return et().addEventListener("message",e),()=>et().removeEventListener("message",e)},[]),u.useEffect(()=>{let{refetchOnWindowFocus:t=!0}=e,n=()=>{t&&"visible"===document.visibilityState&&Q._getSession({event:"visibilitychange"})};return document.addEventListener("visibilitychange",n,!1),()=>document.removeEventListener("visibilitychange",n,!1)},[e.refetchOnWindowFocus]);let f=function(){let[e,t]=u.useState("undefined"!=typeof navigator&&navigator.onLine),n=()=>t(!0),r=()=>t(!1);return u.useEffect(()=>(window.addEventListener("online",n),window.addEventListener("offline",r),
1()=>{window.removeEventListener("online",n),window.removeEventListener("offline",r)}),[]),e}(),p=!1!==o||f;u.useEffect(()=>{if(r&&p){let e=setInterval(()=>{Q._session&&Q._getSession({event:"poll"})},1e3*r);return()=>clearInterval(e)}},[r,p]);let h=u.useMemo(()=>({data:a,status:l?"loading":a?"authenticated":"unauthenticated",async update(e){if(l)return;d(!0);let t=await z("session",Q,en,void 0===e?void 0:{body:{csrfToken:await ea(),data:e}});return d(!1),t&&(s(t),et().postMessage({event:"session",data:{trigger:"getSession"}})),t}}),[a,l]);return(0,c.jsx)(er.Provider,{value:h,children:t})}},53441:(e,t)=>{"use strict";t.q=function(e,t){if("string"!=typeof e)throw TypeError("argument str must be a string");for(var r={},o=e.split(";"),i=(t||{}).decode||n,a=0;a<o.length;a++){var s=o[a],c=s.indexOf("=");if(!(c<0)){var u=s.substring(0,c).trim();if(void 0==r[u]){var l=s.substring(c+1,s.length).trim();'"'===l[0]&&(l=l.slice(1,-1)),r[u]=function(e,t){try{return t(e)}catch(t){return e}}(l,i)}}}return r},t.l=function(e,t,n){var i=n||{},a=i.encode||r;if("function"!=typeof a)throw TypeError("option encode is invalid");if(!o.test(e))throw TypeError("argument name is invalid");var s=a(t);if(s&&!o.test(s))throw TypeError("argument val is invalid");var c=e+"="+s;if(null!=i.maxAge){var u=i.maxAge-0;if(isNaN(u)||!isFinite(u))throw TypeError("option maxAge is invalid");c+="; Max-Age="+Math.floor(u)}if(i.domain){if(!o.test(i.domain))throw TypeError("option domain is invalid");c+="; Domain="+i.domain}if(i.path){if(!o.test(i.path))throw TypeError("option path is invalid");c+="; Path="+i.path}if(i.expires){if("function"!=typeof i.expires.toUTCString)throw TypeError("option expires is invali
1d");c+="; Expires="+i.expires.toUTCString()}if(i.httpOnly&&(c+="; HttpOnly"),i.secure&&(c+="; Secure"),i.sameSite)switch("string"==typeof i.sameSite?i.sameSite.toLowerCase():i.sameSite){case!0:case"strict":c+="; SameSite=Strict";break;case"lax":c+="; SameSite=Lax";break;case"none":c+="; SameSite=None";break;default:throw TypeError("option sameSite is invalid")}return c};var n=decodeURIComponent,r=encodeURIComponent,o=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/},53739:e=>{"use strict";let{hostname:t}=new URL("https://lede-v2.joinlede.com");e.exports={images:{useHtmlTag:!1},links:{basePath:"",isInternalLink:(e,n)=>[t,"irving.alley.test","lede-develop.joinlede.com","localhost","127.0.0.1"].includes(e)},wordPressEndpoint:"https://lede-admin.lede.fyi/graphql".replace(/\/graphql(\?.*)?$/,"")}},57088:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>S});var r=n(37876),o=n(4361),i=n.n(o),a=n(14232),s=n(50774),c=n(85877),u=n(5130),l=n(26252),d=function(){var e=function(t,n){return(e=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])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),f=function(e){function t(t){var n=e.call(this,t)||this;return t.cookies?n.cookies=t.cookies:n.cookies=new u.A,n}return d(t,e),t.prototype.render=function(){return a.createElement(l.Kq,{value:this.cookies},this.props.children)},t}(a.Component),p=n(89099),h=n(75389),v=n(4309),m=n(42091);let g="lede_utm",y={utm_source:"utmSource",utm_medium:"utmMedium",utm_campaign:"utmCampaign",utm_term:"utmTerm",utm_content:"utmContent"},b=e=>{if(!e)return;let t=e.trim();if(t)return t.slice(0,255)};var _=n(43737);n(31969),n(96619),n(73815);let w=["coralAdminToken","coralSSOSecret","sendgridApiKey","sendgridId","sendgridUsername","revenueShare"],E=e=>{var t;let{Component:n,pageProps:o,cookies:i}=e;!function(){let e=(0,p.useRouter)(),[t,n]=(0,a.useState)(!1),r=()=>{n(!0)},o=()=>{n(!1)};(0,a.useEffect)(()=>{function n(n){let r=n.target,o=null;if(r instanceof HTMLAnchorElement?o=r:r.parentElement&&r.parentElement instanceof HTMLAnchorElement&&(o=r.parentElement),!o||n.metaKey||n.ctrlKey)return;let i=(0,h.W$)(o.href,window.location.host);"_blank"!==o.target&&i&&"string"==typeof i&&!t&&(n.preventDefault(),e.push(i))}return document.body.addEventListener("click",n),e.events.on("routeChangeStart",r),e.events.on("routeChangeComplete",o),e.events.on("routeChangeError",o),()=>{document.body.removeEventListener("click",n),e.events.off("routeChangeStart",r),e.events.off("routeChangeComplete",o),e.events.off("routeChangeError",o)}},[e,t])}();let u=(0,p.useRouter)(),l=new c.A(i);(0,a.useEffect)(()=>{(()=>{if("undefined"==typeof document)return;let e=(e=>{let t=new URLSearchParams(e),n={};return Object.entries(y).forEach(e=>{let[r,o]=e,i=b(t.get(r));i&&(n[o]=i)}),n})(window.location.search);if(0===Object.keys(e).length)return;let t=(e=>{if(!e)return{};let t=e.split(";").map(e=>e.trim()).find(e=>e.startsWith("".concat(g,"=")));return t?(e=>{if(!e)return{};try{let t=JSON.parse(decodeURIComponent(e));if(!t||"object"!=typeof t)return{};let n={};
1return Object.values(y).forEach(e=>{let r=b(t[e]);r&&(n[e]=r)}),n}catch(e){return{}}})(t.slice(g.length+1)):{}})(document.cookie),n={...e,...t};if(!Object.keys(n).some(e=>n[e]!==t[e]))return;let r="https:"===window.location.protocol?"; Secure":"",o=encodeURIComponent(JSON.stringify(n));document.cookie="".concat(g,"=").concat(o,"; Max-Age=").concat(2592e3,"; Path=/; SameSite=Lax").concat(r)})()},[]);let{session:d}=o,E=(0,a.useRef)(null);!E.current&&(null==(t=o.globalData)?void 0:t.publisher)&&(E.current={...o.globalData,publisher:(e=>{if(!e)return e;let t={...e};return w.forEach(e=>{delete t[e]}),t})(o.globalData.publisher)});let S=E.current||o.globalData,I=(0,_.A)("darktheme",null==S?void 0:S.publisherFeatureFlags);return(0,r.jsx)(s.CP,{session:d,children:(0,r.jsx)(f,{cookies:l,children:(0,r.jsx)(v.a,{darkThemeEnabled:I,children:(0,r.jsx)(m.A,{children:(0,r.jsx)(n,{...o,globalData:S},u.asPath)})})})})};E.getInitialProps=async e=>({...await i().getInitialProps(e),cookies:e.ctx.req.headers.cookie});let S=E},59784:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"useRouter",{enumerable:!0,get:function(){return i}});let r=n(14232),o=n(54387);function i(){return(0,r.useContext)(o.RouterContext)}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},65225:e=>{"use strict";e.exports=Object.getOwnPropertyDescriptor},65701:(e,t,n)=>{"use strict";var r;if(!Object.keys){var o=Object.prototype.hasOwnProperty,i=Object.prototype.toString,a=n(76061),s=Object.prototype.propertyIsEnumerable,c=!s.call({toString:null},"toString"),u=s.call(function(){},"prototype"),l=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],d=function(e){var t=e.constructor;return t&&t.prototype===e},f={$applicationCache:!0,$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$onmozfullscreenchange:!0,$onmozfullscreenerror:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},p=function(){if("undefined"==typeof window)return!1;for(var e in window)try{if(!f["$"+e]&&o.call(window,e)&&null!==window[e]&&"object"==typeof window[e])try{d(window[e])}catch(e){return!0}}catch(e){return!0}return!1}(),h=function(e){if("undefined"==typeof window||!p)return d(e);try{return d(e)}catch(e){return!1}};r=function(e){var t=null!==e&&"object"==typeof e,n="[object Function]"===i.call(e),r=a(e),s=t&&"[object String]"===i.call(e),d=[];if(!t&&!n&&!r)throw TypeError("Object.keys called on a non-object");var f=u&&n;if(s&&e.length>0&&!o.call(e,0))for(var p=0;p<e.length;++p)d.push(String(p));if(r&&e.length>0)for(var v=0;v<e.length;++v)d.push(String(v));else for(var m in e)!(f&&"prototype"===m)&&o.call(e,m)&&d.push(String(m));if(c)for(var g=h(e),y=0;y<l.length;++y)!(g&&"constructor"===l[y])&&o.call(e,l[y])&&d.push(l[y]);return d}}e.exports=r},65865:e=>{"use strict";e.exports=TypeError},66825:(e,t,n)=>{"use strict";var r=Array.prototype.slice,o=n(76061),i=Object.keys,a=i?function(e){return i(e)}:n(65701),s=Object.keys;a.shim=function(){return Object.keys?!function(){var e=Object.keys(arguments);return e&&e.length===arguments.length}(1,2)&&(Object.keys=function(e){return o(e)?s(r.call(e)):s(e)}):Object.keys=a,Object.keys||a},e.exports=a},67685:(e,t,n)=>{"use strict";n.d(t,{IX:()=>r,KI:()=>o,i8:()=>i});var r=function(e){return e.Monthly="monthly",e.Annual="annual",e.OneTime="one-time",e.All="all",e}({}),o=function(e){return e.Beehiiv="beehiiv",e.Sendgrid="sendgrid",e.SES="ses",e.Subtext="subtext",e}({}),i=function(e){return e.Read="read",e.Comment="comment",e.PremiumNewsletter="premium-newsletter",e.AnnualGift="annual-gift",e.Donor="donor",e.NoAds="no-ads",e.PremiumPodcast="premium-podcast",e}({})},71742:e=>{"use strict";e.exports=SyntaxError},73677:(e,t,n)=>{"use strict";var r=n(98857),o=function(){return!!r};o.hasArrayLengthDefineBug=function(){if(!r)return null;try{return 1!==r([],"length",{value:1}).length}catch(e){return!0}},e.exports=o},73815:()=>{}
1,75389:(e,t,n)=>{"use strict";n.d(t,{Kj:()=>s,W$:()=>d,hg:()=>c,iD:()=>u});var r=n(40880),o=n(53739),i=n.n(o);let a=new RegExp("^".concat(i().links.basePath,"/*")),s=e=>(null==e?void 0:e.endsWith("/"))?e.slice(0,-1):e,c=e=>e.endsWith("/")?e:"".concat(e,"/"),u=e=>e.startsWith("/")?e.substring(1):e,l=e=>e.replace("www.","");function d(e,t){try{let{protocol:r,pathname:o,host:c,hostname:u,search:d,hash:f}=new URL(e),p=l(c),h=l(u),v=l(t);if((p===v||h===v)&&("http:"===r||"https:"===r||!r)&&"#"!==e[0]){var n;return"".concat((n=s(o),i().links.basePath?n.replace(a,"/"):n)).concat(d||"").concat(f||"")}}catch(t){(0,r.v)(t,{url:e})}return!1}},76061:e=>{"use strict";var t=Object.prototype.toString;e.exports=function(e){var n=t.call(e),r="[object Arguments]"===n;return r||(r="[object Array]"!==n&&null!==e&&"object"==typeof e&&"number"==typeof e.length&&e.length>=0&&"[object Function]"===t.call(e.callee)),r}},85877:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});let r=n(5130).A},86532:(e,t,n)=>{e.exports=(function e(t,n,r){function o(a,s){if(!n[a]){if(!t[a]){if(i)return i(a,!0);var c=Error("Cannot find module '"+a+"'");throw c.code="MODULE_NOT_FOUND",c}var u=n[a]={exports:{}};t[a][0].call(u.exports,function(e){return o(t[a][1][e]||e)},u,u.exports,e,t,n,r)}return n[a].exports}for(var i=void 0,a=0;a<r.length;a++)o(r[a]);return o})({1:[function(e,t,r){(function(e){"use strict";var n,r,o=e.MutationObserver||e.WebKitMutationObserver;if(o){var i=0,a=new o(l),s=e.document.createTextNode("");a.observe(s,{characterData:!0}),n=function(){s.data=i=++i%2}}else if(e.setImmediate||void 0===e.MessageChannel)n="document"in e&&"onreadystatechange"in e.document.createElement("script")?function(){var t=e.document.createElement("script");t.onreadystatechange=function(){l(),t.onreadystatechange=null,t.parentNode.removeChild(t),t=null},e.document.documentElement.appendChild(t)}:function(){setTimeout(l,0)};else{var c=new e.MessageChannel;c.port1.onmessage=l,n=function(){c.port2.postMessage(0)}}var u=[];function l(){r=!0;for(var e,t,n=u.length;n;){for(t=u,u=[],e=-1;++e<n;)t[e]();n=u.length}r=!1}t.exports=function(e){1!==u.push(e)||r||n()}}).call(this,void 0!==n.g?n.g:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],2:[function(e,t,n){"use strict";var r=e(1);function o(){}var i={},a=["REJECTED"],s=["FULFILLED"],c=["PENDING"];function u(e){if("function"!=typeof e)throw TypeError("resolver must be a function");this.state=c,this.queue=[],this.outcome=void 0,e!==o&&p(this,e)}function l(e,t,n){this.promise=e,"function"==typeof t&&(this.onFulfilled=t,this.callFulfilled=this.otherCallFulfilled),"function"==typeof n&&(this.onRejected=n,this.callRejected=this.otherCallRejected)}function d(e,t,n){r(function(){var r;try{r=t(n)}catch(t){return i.reject(e,t)}r===e?i.reject(e,TypeError("Cannot resolve promise with itself")):i.resolve(e,r)})}function f(e){var t=e&&e.then;if(e&&("object"==typeof e||"function"==typeof e)&&"function"==typeof t)return function(){t.apply(e,arguments)}}function p(e,t){var n=!1;function r(t){n||(n=!0,i.reject(e,t))}function o(t){n||(n=!0,i.resolve(e,t))}var a=h(function(){t(o,r)});"error"===a.status&&r(a.value)}function h(e,t){var n={};try{n.value=e(t),n.status="success"}catch(e){n.status="error",n.value=e}return n}t.exports=u,u.prototype.catch=function(e){return this.then(null,e)},u.prototype.then=function(e,t){if("function"!=typeof e&&this.state===s||"function"!=typeof t&&this.state===a)return this;var n=new this.constructor(o);return this.state!==c?d(n,this.state===s?e:t,this.outcome):this.queue.push(new l(n,e,t)),n},l.prototype.callFulfilled=function(e){i.resolve(this.promise,e)},l.prototype.otherCallFulfilled=function(e){d(this.promise,this.onFulfilled,e)},l.prototype.callRejected=function(e){i.reject(this.promise,e)},l.prototype.otherCallRejected=function(e){d(this.promise,this.onRejected,e)},i.resolve=function(e,t){var n=h(f,t);if("error"===n.status)return i.reject(e,n.value);var r=n.value;if(r)p(e,r);else{e.state=s,e.outcome=t;for(var o=-1,a=e.queue.length;++o<a;)e.queue[o].callFulfilled(t)}return e},i.reject=function(e,t){e.state=a,e.outcome=t;for(var n=-1,r=e.queue.length;++n<r;)e.queue[n].callRejected(t);return e},u.resolve=function(e){return e instanceof this?e:i.resolve(new this(o),e)},u.reject=function(e){var t=new this(o);return i.reject(t,e)},u.all=function(e){var t=this;if("[object Array]"!==Object.prototype.toString.call(e))return this.reject(TypeError("must be an array"));var n=e.length,r=!1;if(!n)return this.resolve([]);for(var a=Array(n),s=0,c=-1,u=new this(o);++c<n;)!function(e,o){t.resolve(e).then(function(e){a[o]=e,++s!==n||r||(r=!0,i.resolve(u,a))},function(e){r||(r=!0,i.reject(u,e))})}(e[c],c);return u},u.race=function(e){var t,n=this;if("[object Array]"!==Object.prototype.toString.call(e))return this.reject(TypeError("must be an array"));var r=e.length,a=!1;if(!r)return this.resolve([]);for(var s=-1,c=new this(o);++s<r;){t=e[s],n.resolve(t).then(function(e){a||(a=!0,i.resolve(c,e))},function(e){a||(a=!0,i.reject(c,e))})}return c}},{1:1}],3:[function(e,t,r){(function(t){"use strict";"function"!=typeof t.Promise&&(t.Promise=e(2))}).call(this,void 0!==n.g?n.g:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{2:2}],4:[function(e,t,n){"use strict";var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o=function(){try{if("undefined"!=typeof indexedDB)return indexedDB;if("undefined"!=typeof webkitIndexedDB)return webkitIndexedDB;if("undefined"!=typeof mozIndexedDB)return mozIndexedDB;if("undefined"!=typeof OIndexedDB)return OIndexedDB;if("undefined"!=typeof msIndexedDB)return msIndexedDB}catch(e){return}}();function i(e,t){e=e||[],t=t||{};try{return new Blob(e,t)}catch(o){if("TypeError"!==o.name)throw o;for(var n=new("undefined"!=typeof BlobBuilder?BlobBuilder:"undefined"!=typeof MSBlobBuilder?MSBlobBuilder:"undefined"!=typeof MozBlobBuilder?MozBlobBuilder:WebKitBlobBuilder),r=0;r<e.length;r+=1)n.append(e[r]);return n.getBlob(t.type)}}"undefined"==typeof Promise&&e(3);var a=Promise;function s(e,t){t&&e.then(function(e){t(null,e)},function(e){t(e)})}
1function c(e,t,n){"function"==typeof t&&e.then(t),"function"==typeof n&&e.catch(n)}function u(e){return"string"!=typeof e&&(console.warn(e+" used as a key, but it is not a string."),e=String(e)),e}function l(){if(arguments.length&&"function"==typeof arguments[arguments.length-1])return arguments[arguments.length-1]}var d="local-forage-detect-blob-support",f=void 0,p={},h=Object.prototype.toString,v="readonly",m="readwrite";function g(e){var t=p[e.name],n={};n.promise=new a(function(e,t){n.resolve=e,n.reject=t}),t.deferredOperations.push(n),t.dbReady?t.dbReady=t.dbReady.then(function(){return n.promise}):t.dbReady=n.promise}function y(e){var t=p[e.name].deferredOperations.pop();if(t)return t.resolve(),t.promise}function b(e,t){var n=p[e.name].deferredOperations.pop();if(n)return n.reject(t),n.promise}function _(e,t){return new a(function(n,r){if(p[e.name]=p[e.name]||A(),e.db)if(!t)return n(e.db);else g(e),e.db.close();var i=[e.name];t&&i.push(e.version);var a=o.open.apply(o,i);t&&(a.onupgradeneeded=function(t){var n=a.result;try{n.createObjectStore(e.storeName),t.oldVersion<=1&&n.createObjectStore(d)}catch(n){if("ConstraintError"===n.name)console.warn('The database "'+e.name+'" has been upgraded from version '+t.oldVersion+" to version "+t.newVersion+', but the storage "'+e.storeName+'" already exists.');else throw n}}),a.onerror=function(e){e.preventDefault(),r(a.error)},a.onsuccess=function(){var t=a.result;t.onversionchange=function(e){e.target.close()},n(t),y(e)}})}function w(e,t){if(!e.db)return!0;var n=!e.db.objectStoreNames.contains(e.storeName),r=e.version<e.db.version,o=e.version>e.db.version;if(r&&(e.version!==t&&console.warn('The database "'+e.name+"\" can't be downgraded from version "+e.db.version+" to version "+e.version+"."),e.version=e.db.version),o||n){if(n){var i=e.db.version+1;i>e.version&&(e.version=i)}return!0}return!1}function E(e){return i([function(e){for(var t=e.length,n=new ArrayBuffer(t),r=new Uint8Array(n),o=0;o<t;o++)r[o]=e.charCodeAt(o);return n}(atob(e.data))],{type:e.type})}function S(e){return e&&e.__local_forage_encoded_blob}function I(e){var t=this,n=t._initReady().then(function(){var e=p[t._dbInfo.name];if(e&&e.dbReady)return e.dbReady});return c(n,e,e),n}function k(e,t,n,r){void 0===r&&(r=1);try{var o=e.db.transaction(e.storeName,t);n(null,o)}catch(o){if(r>0&&(!e.db||"InvalidStateError"===o.name||"NotFoundError"===o.name))return a.resolve().then(function(){if(!e.db||"NotFoundError"===o.name&&!e.db.objectStoreNames.contains(e.storeName)&&e.version<=e.db.version)return e.db&&(e.version=e.db.version+1),_(e,!0)}).then(function(){return(function(e){g(e);for(var t=p[e.name],n=t.forages,r=0;r<n.length;r++){var o=n[r];o._dbInfo.db&&(o._dbInfo.db.close(),o._dbInfo.db=null)}return e.db=null,_(e,!1).then(function(t){return(e.db=t,w(e))?_(e,!0):t}).then(function(r){e.db=t.db=r;for(var o=0;o<n.length;o++)n[o]._dbInfo.db=r}).catch(function(t){throw b(e,t),t})})(e).then(function(){k(e,t,n,r-1)})}).catch(n);n(o)}}function A(){return{forages:[],db:null,dbReady:null,deferredOperations:[]}}var R={_driver:"asyncStorage",_initStorage:function(e){var t=this,n={db:null};if(e)for(var r in e)n[r]=e[r];var o=p[n.name];o||(o=A(),p[n.name]=o),o.forages.push(t),t._initReady||(t._initReady=t.ready,t.ready=I);var i=[];function s(){return a.resolve()}for(var c=0;c<o.forages.length;c++){var u=o.forages[c];u!==t&&i.push(u._initReady().catch(s))}var l=o.forages.slice(0);return a.all(i).then(function(){return n.db=o.db,_(n,!1)}).then(function(e){return(n.db=e,w(n,t._defaultConfig.version))?_(n,!0):e}).then(function(e){n.db=o.db=e,t._dbInfo=n;for(var r=0;r<l.length;r++){var i=l[r];i!==t&&(i._dbInfo.db=n.db,i._dbInfo.version=n.version)}})},_support:function(){try{if(!o||!o.open)return!1;var e="undefined"!=typeof openDatabase&&/(Safari|iPhone|iPad|iPod)/.test(navigator.userAgent)&&!/Chrome/.test(navigator.userAgent)&&!/BlackBerry/.test(navigator.platform),t="function"==typeof fetch&&-1!==fetch.toString().indexOf("[native code");return(!e||t)&&"undefined"!=typeof indexedDB&&"undefined"!=typeof IDBKeyRange}catch(e){return!1}}(),iterate:function(e,t){var n=this,r=new a(function(t,r){n.ready().then(function(){k(n._dbInfo,v,function(o,i){if(o)return r(o);try{var a=i.objectStore(n._dbInfo.storeName).openCursor(),s=1;a.onsuccess=function(){var n=a.result;if(n){var r=n.value;S(r)&&(r=E(r));var o=e(r,n.key,s++);void 0!==o?t(o):n.continue()}else t()},a.onerror=function(){r(a.error)}}catch(e){r(e)}})}).catch(r)});return s(r,t),r},getItem:function(e,t){var n=this;e=u(e);var r=new a(function(t,r){n.ready().then(function(){k(n._dbInfo,v,function(o,i){if(o)return r(o);try{var a=i.objectStore(n._dbInfo.storeName).get(e);a.onsuccess=function(){var e=a.result;void 0===e&&(e=null),S(e)&&(e=E(e)),t(e)},a.onerror=function(){r(a.error)}}catch(e){r(e)}})}).catch(r)});return s(r,t),r},setItem:function(e,t,n){var r=this;e=u(e);var o=new a(function(n,o){var s;r.ready().then(function(){return(s=r._dbInfo,"[object Blob]"===h.call(t))?(function(e){return"boolean"==typeof f?a.resolve(f):new a(function(t){var n=e.transaction(d,m),r=i([""]);n.objectStore(d).put(r,"key"),n.onabort=function(e){e.preventDefault(),e.stopPropagation(),t(!1)},n.oncomplete=function(){var e=navigator.userAgent.match(/Chrome\/(\d+)/);t(navigator.userAgent.match(/Edge\//)||!e||parseInt(e[1],10)>=43)}}).catch(function(){return!1}).then(function(e){return f=e})})(s.db).then(function(e){return e?t:new a(function(e,n){var r=new FileReader;r.onerror=n,r.onloadend=function(n){e({__local_forage_encoded_blob:!0,data:btoa(n.target.result||""),type:t.type})},r.readAsBinaryString(t)})}):t}).then(function(t){k(r._dbInfo,m,function(i,a){if(i)return o(i);try{var s=a.objectStore(r._dbInfo.storeName);null===t&&(t=void 0);var c=s.put(t,e);a.oncomplete=function(){void 0===t&&(t=null),n(t)},a.onabort=a.onerror=function(){var e=c.error?c.error:c.transaction.error;o(e)}}catch(e){o(e)}})}).catch(o)});return s(o,n),o},removeItem:function(e,t){var n=this;e=u(e);var r=new a(function(t,r){n.ready().then(function(){k(n._dbInfo,m,function(o,i){if(o)return r(o);try{var a=i.objectStore(n._dbInfo.storeName).delete(e);i.oncomplete=function(){t()},i.onerror=function(){r(a.error)},i.onabort=function(){var e=a.error?a.error:a.transaction.error;r(e)}}catch(e){r(e)}})}).catch(r)});return s(r,t),r},clear:function(e){var t=this,n=new a(function(e,n){t.ready().then(function(){k(t._dbInfo,m,function(r,o){if(r)return n(r);try{var i=o.objectStore(t._dbInfo.storeName).clear();o.oncomplete=function(){e()},o.onabort=o.onerror=function(){var e=i.error?i.error:i.transaction.error;n(e)}}catch(e){n(e)}})}).catch(n)});return s(n,e),n},length:function(e){var t=this,n=new a(function(e,n){t.ready().then(function(){k(t._dbInfo,v,function(r,o){if(r)return n(r);try{var i=o.objectStore(t._dbInfo.storeName).count();i.onsuccess=function(){e(i.result)},i.onerror=function(){n(i.error)}}catch(e){n(e)}})}).catch(n)});return s(n,e),n},key:function(e,t){var n=this,r=new a(function(t,r){if(e<0)return void t(null);n.ready().then(function(){k(n._dbInfo,v,function(o,i){if(o)return r(o);try{var a=i.objectStore(n._dbInfo.storeName),s=!1,c=a.openKeyCursor();c.onsuccess=function(){var n=c.result;if(!n)return void t(null);0===e||s?t(n.key):(s=!0,n.advance(e))},c.onerror=function(){r(c.error)}}catch(e){r(e)}})}).catch(r)});return s(r,t),r},keys:function(e){var t=this,n=new a(function(e,n){t.ready().then(function(){k(t._dbInfo,v,function(r,o){if(r)return n(r);try{var i=o.objectStore(t._dbInfo.storeName).openKeyCursor(),a=[];i.onsuccess=function(){var t=i.result;if(!t)return void e(a);a.push(t.key),t.continue()},i.onerror=function(){n(i.error)}}catch(e){n(e)}})}).catch(n)});return s(n,e),n},dropInstance:function(e,t){t=l.apply(this,arguments);var n,r=this.config();if((e="function"!=typeof e&&e||{}).name||(e.name=e.name||r.name,e.storeName=e.storeName||r.storeName),e.name){var i=e.name===r.name&&this._dbInfo.db?a.resolve(this._dbInfo.db):_(e,!1).then(function(t){var n=p[e.name],r=n.forages;n.db=t;for(var o=0;o<r.length;o++)r[o]._dbInfo.db=t;return t});n=e.storeName?i.then(function(t){if(t.objectStoreNames.contains(e.storeName)){var n=t.ver
vendor: 4,610 bytes, line 1
1sion+1;g(e);var r=p[e.name],i=r.forages;t.close();for(var s=0;s<i.length;s++){var c=i[s];c._dbInfo.db=null,c._dbInfo.version=n}return new a(function(t,r){var i=o.open(e.name,n);i.onerror=function(e){i.result.close(),r(e)},i.onupgradeneeded=function(){i.result.deleteObjectStore(e.storeName)},i.onsuccess=function(){var e=i.result;e.close(),t(e)}}).then(function(e){r.db=e;for(var t=0;t<i.length;t++){var n=i[t];n._dbInfo.db=e,y(n._dbInfo)}}).catch(function(t){throw(b(e,t)||a.resolve()).catch(function(){}),t})}}):i.then(function(t){g(e);var n=p[e.name],r=n.forages;t.close();for(var i=0;i<r.length;i++)r[i]._dbInfo.db=null;return new a(function(t,n){var r=o.deleteDatabase(e.name);r.onerror=function(){var e=r.result;e&&e.close(),n(r.error)},r.onblocked=function(){console.warn('dropInstance blocked for database "'+e.name+'" until all open connections are closed')},r.onsuccess=function(){var e=r.result;e&&e.close(),t(e)}}).then(function(e){n.db=e;for(var t=0;t<r.length;t++)y(r[t]._dbInfo)}).catch(function(t){throw(b(e,t)||a.resolve()).catch(function(){}),t})})}else n=a.reject("Invalid arguments");return s(n,t),n}},O="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",x=/^~~local_forage_type~([^~]+)~/,j="__lfsc__:",C=j.length,D="arbf",T="blob",N="si08",L="ui08",U="uic8",P="si16",B="si32",M="ur16",F="ui32",W="fl32",G="fl64",H=C+D.length,q=Object.prototype.toString;function $(e){var t,n,r,o,i,a=.75*e.length,s=e.length,c=0;"="===e[e.length-1]&&(a--,"="===e[e.length-2]&&a--);var u=new ArrayBuffer(a),l=new Uint8Array(u);for(t=0;t<s;t+=4)n=O.indexOf(e[t]),r=O.indexOf(e[t+1]),o=O.indexOf(e[t+2]),i=O.indexOf(e[t+3]),l[c++]=n<<2|r>>4,l[c++]=(15&r)<<4|o>>2,l[c++]=(3&o)<<6|63&i;return u}function V(e){var t,n=new Uint8Array(e),r="";for(t=0;t<n.length;t+=3)r+=O[n[t]>>2],r+=O[(3&n[t])<<4|n[t+1]>>4],r+=O[(15&n[t+1])<<2|n[t+2]>>6],r+=O[63&n[t+2]];return n.length%3==2?r=r.substring(0,r.length-1)+"=":n.length%3==1&&(r=r.substring(0,r.length-2)+"=="),r}var z={serialize:function(e,t){var n="";if(e&&(n=q.call(e)),e&&("[object ArrayBuffer]"===n||e.buffer&&"[object ArrayBuffer]"===q.call(e.buffer))){var r,o=j;e instanceof ArrayBuffer?(r=e,o+=D):(r=e.buffer,"[object Int8Array]"===n?o+=N:"[object Uint8Array]"===n?o+=L:"[object Uint8ClampedArray]"===n?o+=U:"[object Int16Array]"===n?o+=P:"[object Uint16Array]"===n?o+=M:"[object Int32Array]"===n?o+=B:"[object Uint32Array]"===n?o+=F:"[object Float32Array]"===n?o+=W:"[object Float64Array]"===n?o+=G:t(Error("Failed to get type for BinaryArray"))),t(o+V(r))}else if("[object Blob]"===n){var i=new FileReader;i.onload=function(){t(j+T+("~~local_forage_type~"+e.type+"~")+V(this.result))},i.readAsArrayBuffer(e)}else try{t(JSON.stringify(e))}catch(n){console.error("Couldn't convert value into a JSON string: ",e),t(null,n)}},deserialize:function(e){if(e.substring(0,C)!==j)return JSON.parse(e);var t,n=e.substring(H),r=e.substring(C,H);if(r===T&&x.test(n)){var o=n.match(x);t=o[1],n=n.substring(o[0].length)}var a=$(n);switch(r){case D:return a;case T:return i([a],{type:t});case N:return new Int8Array(a);case L:return new Uint8Array(a);case U:return new Uint8ClampedArray(a);case P:return new Int16Array(a);case M:return new Uint16Array(a);case B:return new Int32Array(a);case F:return new Uint32Array(a);case W:return new Float32Array(a);case G:return new Float64Array(a);default:throw Error("Unkown type: "+r)}},stringToBuffer:$,bufferToString:V};function K(e,t,n,r){e.executeSql("CREATE TABLE IF NOT EXISTS "+t.storeName+" (id INTEGER PRIMARY KEY, key unique, value)",[],n,r)}function X(e,t,n,r,o,i){e.executeSql(n,r,o,function(e,a){a.code===a.SYNTAX_ERR?e.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name = ?",[t.storeName],function(e,s){s.rows.length?i(e,a):K(e,t,function(){e.executeSql(n,r,o,i)},i)},i):i(e,a)},i)}function J(e,t,n,r){var o=this;e=u(e);var i=new a(function(i,a){o.ready().then(function(){void 0===t&&(t=null);var s=t,c=o._dbInfo;c.serializer.serialize(t,function(t,u){u?a(u):c.db.transaction(function(n){X(n,c,"INSERT OR REPLACE INTO "+c.storeName+" (key, value) VALUES (?, ?)",[e,t],function(){i(s)},function(e,t){a(t)})},function(t){if(t.code===t.QUOTA_ERR){if(r>0)return void i(J.apply(o,[e,s,n,r-1]));a(t)}})})}).catch(a)});return s(i,n),i}var Y={_driver:"webSQLStorage",_initStorage:function(e){var t=this,n={db:null};if(e)for(var r in e)n[r]="string"!=typeof e[r]?e[r].toString():e[r];var o=new a(function(e,r){try{n.db=openDatabase(n.name,String(n.version),n.description,n.size)}catch(e){return r(e)}n.db.transaction(function(o){K(o,n,function(){t._dbInfo=n,e()},function(e,t){r(t)})},r)});
1return n.serializer=z,o},_support:"function"==typeof openDatabase,iterate:function(e,t){var n=this,r=new a(function(t,r){n.ready().then(function(){var o=n._dbInfo;o.db.transaction(function(n){X(n,o,"SELECT * FROM "+o.storeName,[],function(n,r){for(var i=r.rows,a=i.length,s=0;s<a;s++){var c=i.item(s),u=c.value;if(u&&(u=o.serializer.deserialize(u)),void 0!==(u=e(u,c.key,s+1)))return void t(u)}t()},function(e,t){r(t)})})}).catch(r)});return s(r,t),r},getItem:function(e,t){var n=this;e=u(e);var r=new a(function(t,r){n.ready().then(function(){var o=n._dbInfo;o.db.transaction(function(n){X(n,o,"SELECT * FROM "+o.storeName+" WHERE key = ? LIMIT 1",[e],function(e,n){var r=n.rows.length?n.rows.item(0).value:null;r&&(r=o.serializer.deserialize(r)),t(r)},function(e,t){r(t)})})}).catch(r)});return s(r,t),r},setItem:function(e,t,n){return J.apply(this,[e,t,n,1])},removeItem:function(e,t){var n=this;e=u(e);var r=new a(function(t,r){n.ready().then(function(){var o=n._dbInfo;o.db.transaction(function(n){X(n,o,"DELETE FROM "+o.storeName+" WHERE key = ?",[e],function(){t()},function(e,t){r(t)})})}).catch(r)});return s(r,t),r},clear:function(e){var t=this,n=new a(function(e,n){t.ready().then(function(){var r=t._dbInfo;r.db.transaction(function(t){X(t,r,"DELETE FROM "+r.storeName,[],function(){e()},function(e,t){n(t)})})}).catch(n)});return s(n,e),n},length:function(e){var t=this,n=new a(function(e,n){t.ready().then(function(){var r=t._dbInfo;r.db.transaction(function(t){X(t,r,"SELECT COUNT(key) as c FROM "+r.storeName,[],function(t,n){e(n.rows.item(0).c)},function(e,t){n(t)})})}).catch(n)});return s(n,e),n},key:function(e,t){var n=this,r=new a(function(t,r){n.ready().then(function(){var o=n._dbInfo;o.db.transaction(function(n){X(n,o,"SELECT key FROM "+o.storeName+" WHERE id = ? LIMIT 1",[e+1],function(e,n){t(n.rows.length?n.rows.item(0).key:null)},function(e,t){r(t)})})}).catch(r)});return s(r,t),r},keys:function(e){var t=this,n=new a(function(e,n){t.ready().then(function(){var r=t._dbInfo;r.db.transaction(function(t){X(t,r,"SELECT key FROM "+r.storeName,[],function(t,n){for(var r=[],o=0;o<n.rows.length;o++)r.push(n.rows.item(o).key);e(r)},function(e,t){n(t)})})}).catch(n)});return s(n,e),n},dropInstance:function(e,t){t=l.apply(this,arguments);var n,r=this.config();(e="function"!=typeof e&&e||{}).name||(e.name=e.name||r.name,e.storeName=e.storeName||r.storeName);var o=this;return s(n=e.name?new a(function(t){var n;(n=e.name===r.name?o._dbInfo.db:openDatabase(e.name,"","",0),e.storeName)?t({db:n,storeNames:[e.storeName]}):t(new a(function(e,t){n.transaction(function(r){r.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name <> '__WebKitDatabaseInfoTable__'",[],function(t,r){for(var o=[],i=0;i<r.rows.length;i++)o.push(r.rows.item(i).name);e({db:n,storeNames:o})},function(e,n){t(n)})},function(e){t(e)})}))}).then(function(e){return new a(function(t,n){e.db.transaction(function(r){for(var o=[],i=0,s=e.storeNames.length;i<s;i++)o.push(function(e){return new a(function(t,n){r.executeSql("DROP TABLE IF EXISTS "+e,[],function(){t()},function(e,t){n(t)})})}(e.storeNames[i]));a.all(o).then(function(){t()}).catch(function(e){n(e)})},function(e){n(e)})})}):a.reject("Invalid arguments"),t),n}};function Q(e,t){var n=e.name+"/";return e.storeName!==t.storeName&&(n+=e.storeName+"/"),n}var Z={_driver:"localStorageWrapper",_initStorage:function(e){var t={};if(e)for(var n in e)t[n]=e[n];return(t.keyPrefix=Q(e,this._defaultConfig),!function(){var e="_localforage_support_test";try{return localStorage.setItem(e,!0),localStorage.removeItem(e),!1}catch(e){return!0}}()||localStorage.length>0)?(this._dbInfo=t,t.serializer=z,a.resolve()):a.reject()},_support:function(){try{return"undefined"!=typeof localStorage&&"setItem"in localStorage&&!!localStorage.setItem}catch(e){return!1}}(),iterate:function(e,t){var n=this,r=n.ready().then(function(){for(var t=n._dbInfo,r=t.keyPrefix,o=r.length,i=localStorage.length,a=1,s=0;s<i;s++){var c=localStorage.key(s);if(0===c.indexOf(r)){var u=localStorage.getItem(c);if(u&&(u=t.serializer.deserialize(u)),void 0!==(u=e(u,c.substring(o),a++)))return u}}});return s(r,t),r},getItem:function(e,t){var n=this;e=u(e);var r=n.ready().then(function(){var t=n._dbInfo,r=localStorage.getItem(t.keyPrefix+e);return r&&(r=t.serializer.deserialize(r)),r});return s(r,t),r},setItem:function(e,t,n){var r=this;e=u(e);var o=r.ready().then(function(){void 0===t&&(t=null);var n=t;return new a(function(o,i){var a=r._dbInfo;a.serializer.serialize(t,function(t,r){if(r)i(r);else try{localStorage.setItem(a.keyPrefix+e,t),o(n)}catch(e){("QuotaExceededError"===e.name||"NS_ERROR_DOM_QUOTA_REACHED"===e.name)&&i(e),i(e)}})})});return s(o,n),o},removeItem:function(e,t){var n=this;e=u(e);var r=n.ready().then(function(){var t=n._dbInfo;localStorage.removeItem(t.keyPrefix+e)});return s(r,t),r},clear:function(e){var t=this,n=t.ready().then(function(){for(var e=t._dbInfo.keyPrefix,n=localStorage.length-1;n>=0;n--){var r=localStorage.key(n);0===r.indexOf(e)&&localStorage.removeItem(r)}});return s(n,e),n},length:function(e){var t=this.keys().then(function(e){return e.length});return s(t,e),t},key:function(e,t){var n=this,r=n.ready().then(function(){var t,r=n._dbInfo;try{t=localStorage.key(e)}catch(e){t=null}return t&&(t=t.substring(r.keyPrefix.length)),t});return s(r,t),r},keys:function(e){var t=this,n=t.ready().then(function(){for(var e=t._dbInfo,n=localStorage.length,r=[],o=0;o<n;o++){var i=localStorage.key(o);0===i.indexOf(e.keyPrefix)&&r.push(i.substring(e.keyPrefix.length))}return r});return s(n,e),n},dropInstance:function(e,t){if(t=l.apply(this,arguments),!(e="function"!=typeof e&&e||{}).name){var n,r=this.config();e.name=e.name||r.name,e.storeName=e.storeName||r.storeName}var o=this;return s(n=e.name?new a(function(t){t(e.storeName?Q(e,o._defaultConfig):e.name+"/")}).then(function(e){for(var t=localStorage.length-1;t>=0;t--){var n=localStorage.key(t);0===n.indexOf(e)&&localStorage.removeItem(n)}}):a.reject("Invalid arguments"),t),n}},ee=function(e,t){for(var n,r=e.length,o=0;o<r;){if((n=e[o])===t||"number"==typeof n&&"number"==typeof t&&isNaN(n)&&isNaN(t))return!0;o++}return!1},et=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)},en={},er={},eo={INDEXEDDB:R,WEBSQL:Y,LOCALSTORAGE:Z},ei=[eo.INDEXEDDB._driver,eo.WEBSQL._driver,eo.LOCALSTORAGE._driver],ea=["dropInstance"],es=["clear","getItem","iterate","key","keys","length","removeItem","setItem"].concat(ea),ec={description:"",driver:ei.slice(),name:"localforage",size:4980736,storeName:"keyvaluepairs",version:1};function eu(){for(var e=1;e<arguments.length;e++){var t=arguments[e];if(t)for(var n in t)t.hasOwnProperty(n)&&(et(t[n])?arguments[0][n]=t[n].slice():arguments[0][n]=t[n])}return arguments[0]}t.exports=new(function(){function e(t){if(!(this instanceof e))throw TypeError("Cannot call a class as a function");for(var n in eo)if(eo.hasOwnProperty(n)){var r=eo[n],o=r._driver;this[n]=o,en[o]||this.defineDriver(r)}this._defaultConfig=eu({},ec),this._config=eu({},this._defaultConfig,t),this._driverSet=null,this._initDriver=null,this._ready=!1,this._dbInfo=null,this._wrapLibraryMethodsWithReady(),this.setDriver(this._config.driver).catch(function(){})}return e.prototype.config=function(e){if((void 0===e?"undefined":r(e))==="object"){if(this._ready)return Error("Can't call config() after localforage has been used.");for(var t in e){if("storeName"===t&&(e[t]=e[t].replace(/\W/g,"_")),"version"===t&&"number"!=typeof e[t])return Error("Database version must be a number.");this._config[t]=e[t]}return!("driver"in e)||!e.driver||this.setDriver(this._config.driver)}return"string"==typeof e?this._config[e]:this._config},e.prototype.defineDriver=function(e,t,n){var r=new a(function(t,n){try{var r=e._driver,o=Error("Custom driver not compliant; see https://mozilla.github.io/localForage/#definedriver");if(!e._driver)return void n(o);for(var i=es.concat("_initStorage"),c=0,u=i.length;c<u;c++){var l=i[c];if((!ee(ea,l)||e[l])&&"function"!=typeof e[l])return void n(o)}for(var d=function(e){return function(){var t=Error("Method "+e+" is not implemented by the current driver"),n=a.reject(t);return s(n,arguments[arguments.length-1]),n}},f=0,p=ea.length;f<p;f++){var h=ea[f];e[h]||(e[h]=d(h))}var v=function(n){en[r]&&console.info("Redefining LocalForage driver: "+r),en[r]=e,er[r]=n,t()};"_support"in e?e._support&&"function"==typeof e._support?e._support().then(v,n):v(!!e._support):v(!0)}catch(e){n(e)}});return c(r,t,n),r},e.prototype.driver=function(){return this._driver||null},e.prototype.getDriver=function(e,t,n){var r=en[e]?a.resolve(en[e]):a.reject(Error("Driver not found."));return c(r,t,n),r}
1,e.prototype.getSerializer=function(e){var t=a.resolve(z);return c(t,e),t},e.prototype.ready=function(e){var t=this,n=t._driverSet.then(function(){return null===t._ready&&(t._ready=t._initDriver()),t._ready});return c(n,e,e),n},e.prototype.setDriver=function(e,t,n){var r=this;et(e)||(e=[e]);var o=this._getSupportedDrivers(e);function i(){r._config.driver=r.driver()}function s(e){return r._extend(e),i(),r._ready=r._initStorage(r._config),r._ready}var u=null!==this._driverSet?this._driverSet.catch(function(){return a.resolve()}):a.resolve();return this._driverSet=u.then(function(){var e=o[0];return r._dbInfo=null,r._ready=null,r.getDriver(e).then(function(e){r._driver=e._driver,i(),r._wrapLibraryMethodsWithReady(),r._initDriver=function(){var e=0;return function t(){for(;e<o.length;){var n=o[e];return e++,r._dbInfo=null,r._ready=null,r.getDriver(n).then(s).catch(t)}i();var c=Error("No available storage method found.");return r._driverSet=a.reject(c),r._driverSet}()}})}).catch(function(){i();var e=Error("No available storage method found.");return r._driverSet=a.reject(e),r._driverSet}),c(this._driverSet,t,n),this._driverSet},e.prototype.supports=function(e){return!!er[e]},e.prototype._extend=function(e){eu(this,e)},e.prototype._getSupportedDrivers=function(e){for(var t=[],n=0,r=e.length;n<r;n++){var o=e[n];this.supports(o)&&t.push(o)}return t},e.prototype._wrapLibraryMethodsWithReady=function(){for(var e=0,t=es.length;e<t;e++)!function(e,t){e[t]=function(){var n=arguments;return e.ready().then(function(){return e[t].apply(e,n)})}}(this,es[e])},e.prototype.createInstance=function(t){return new e(t)},e}())},{3:3}]},{},[4])(4)},87723:(e,t,n)=>{"use strict";var r=n(852);e.exports=function(){return"object"==typeof n.g&&n.g&&n.g.Math===Math&&n.g.Array===Array?n.g:r}},89099:(e,t,n)=>{e.exports=n(6763)},91423:(e,t,n)=>{"use strict";let r;n.d(t,{A:()=>s});let o={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)},i=new Uint8Array(16),a=[];for(let e=0;e<256;++e)a.push((e+256).toString(16).slice(1));let s=function(e,t,n){if(o.randomUUID&&!t&&!e)return o.randomUUID();let s=(e=e||{}).random||(e.rng||function(){if(!r){if("undefined"==typeof crypto||!crypto.getRandomValues)throw Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");r=crypto.getRandomValues.bind(crypto)}return r(i)})();if(s[6]=15&s[6]|64,s[8]=63&s[8]|128,t){n=n||0;for(let e=0;e<16;++e)t[n+e]=s[e];return t}return function(e,t=0){return(a[e[t+0]]+a[e[t+1]]+a[e[t+2]]+a[e[t+3]]+"-"+a[e[t+4]]+a[e[t+5]]+"-"+a[e[t+6]]+a[e[t+7]]+"-"+a[e[t+8]]+a[e[t+9]]+"-"+a[e[t+10]]+a[e[t+11]]+a[e[t+12]]+a[e[t+13]]+a[e[t+14]]+a[e[t+15]]).toLowerCase()}(s)}},96619:()=>{},98857:e=>{"use strict";var t=Object.defineProperty||!1;if(t)try{t({},"a",{value:1})}catch(e){t=!1}e.exports=t}},e=>{var t=t=>e(e.s=t);e.O(0,[6593,8792],()=>(t(92),t(6763))),_N_E=e.O()}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.