diff --git a/frontend/build/addons.asset.php b/frontend/build/addons.asset.php index 1a1bfd2..9a48cac 100644 --- a/frontend/build/addons.asset.php +++ b/frontend/build/addons.asset.php @@ -1 +1 @@ - array('react', 'react-dom'), 'version' => '1e9dc81dc68591828144'); + array('react', 'react-dom'), 'version' => '71e3e008d37cf1f4a118'); diff --git a/frontend/build/addons.js b/frontend/build/addons.js index 44733f6..7388e5e 100644 --- a/frontend/build/addons.js +++ b/frontend/build/addons.js @@ -1 +1 @@ -(()=>{var e={108:(e,t,n)=>{"use strict";n.d(t,{u:()=>r});const r=(e,t)=>{if(!e)return!0;const n=String(e).split("."),r=String(t).split(".");for(let e=0;ei)return!0;if(t{"use strict";e.exports=JSON.parse('{"ui.button.refreshPage":"Oppdater side","ui.notifications.couldNotLoad":"Kunne ikke laste inn siden","ui.notifications.refreshPage":"Oppdater siden og kontakt vår support hvis problemet vedvarer."}')},488:(e,t,n)=>{"use strict";n.d(t,{Dn:()=>c,M:()=>u,Tc:()=>a,uA:()=>l});const r={EUR:"€",USD:"$",GBP:"£",DKK:"kr",NOK:"kr",SEK:"kr"},i=["DKK","SEK","NOK"],o=e=>r[e]||e,s=(e,t,n)=>i.includes(n)?`${e} ${t}`:`${t} ${e}`,a=(e,t=!1)=>{if(e.prices&&Array.isArray(e.prices)&&e.prices.length>0){const n=e.prices.find(e=>"full"===e.priceType);if(n&&n.amount&&n.currency){const e=o(n.currency),r=Number(n.amount).toFixed(2),i=t&&"undefined"!=typeof window&&"rankmath"===window.marketplaceConfig?.brand;return s(i?`${r}`:r,e,n.currency)}}return null},c=(e,t=!1)=>{if(e.prices&&Array.isArray(e.prices)&&e.prices.length>0){const n=e.prices.find(e=>"rebate"===e.priceType);if(n&&void 0!==n.amount&&null!==n.amount&&n.currency){const e=o(n.currency),r=Number(n.amount).toFixed(2),i=t&&"undefined"!=typeof window&&"rankmath"===window.marketplaceConfig?.brand;return s(i?`${r}`:r,e,n.currency)}}return null},l=e=>{if(e.prices&&Array.isArray(e.prices)){const t=e.prices.find(e=>"full"===e.priceType),n=e.prices.find(e=>"rebate"===e.priceType);if(t&&n&&Number(t.amount)>0&&Number(n.amount)>0)return Math.round(100*(1-Number(n.amount)/Number(t.amount)))}return null},u=(e,t="Free",n=null,r=!1)=>{if("free"===e.licenseType)return t;if(e.prices&&Array.isArray(e.prices)&&e.prices.length>0){const t=e.prices.find(e=>"rebate"===e.priceType);if(t&&"premium"===e.licenseType){if(0===t.amount)return n?.labels?.freeUntilRenewal||"Free until renewal";if(t.amount&&t.currency){const e=o(t.currency),n=Number(t.amount).toFixed(2),i=r&&"undefined"!=typeof window&&"rankmath"===window.marketplaceConfig?.brand;return`${s(i?`${n}`:n,e,t.currency)} `}}let i=e.prices.find(e=>"full"===e.priceType&&(!0===e.isActive||void 0===e.isActive));if(i||(i=e.prices.find(e=>!0===e.isActive)),i||(i=e.prices[0]),i&&i.amount&&i.currency){const e=o(i.currency),t=Number(i.amount).toFixed(2),n=r&&"undefined"!=typeof window&&"rankmath"===window.marketplaceConfig?.brand;return s(n?`${t}`:t,e,i.currency)}}if(e.priceCurrency&&e.priceAmount){const t=o(e.priceCurrency),n=Number(e.priceAmount).toFixed(2);return s(n,t,e.priceCurrency)}return""}},1174:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=n(1609),i=n(7979);function o(){const{uiI18n:e}=(0,i.D)(),t=e?.notifications?.updateWPText?.replace("{0}","6.2");return(0,r.createElement)("div",{className:"marketplace-container gv-flex gv-flex-col gv-flex-wrap gv-gap-lg gv-items-center gv-justify-center gv-p-fluid"},(0,r.createElement)("div",{className:"gv-text-center"},(0,r.createElement)("h5",{className:"gv-header-md gv-mb-sm"},e?.notifications?.updateWPTitle),(0,r.createElement)("p",{className:"gv-text-md gv-mb-lg"},t),(0,r.createElement)("button",{type:"button",className:"gv-button gv-button-primary buttons-min-width",onClick:()=>{window.location.href="undefined"!=typeof window&&window.marketplaceConfig?.wpConfig?.adminUrl?`${window.marketplaceConfig.wpConfig.adminUrl}update-core.php`:"/wp-admin/update-core.php"}},(0,r.createElement)("span",null,e?.updateWPButton))))}},1199:e=>{"use strict";e.exports=JSON.parse('{"ui.button.refreshPage":"Pagina verversen","ui.notifications.couldNotLoad":"Kon de pagina niet laden","ui.notifications.refreshPage":"Ververs de pagina en neem contact op met onze (Engelstalige) support als het probleem zich blijft voordoen."}')},1338:(e,t,n)=>{"use strict";n.d(t,{A:()=>d});var r=n(1609),i=n(7979),o=n(7008),s=n(3220),a=n(6818),c=n(3331),l=n(5404);const u=e=>{if(e.prices&&Array.isArray(e.prices)&&e.prices.length>0){let t=e.prices.find(e=>"full"===e.priceType&&(!0===e.isActive||void 0===e.isActive));return t||(t=e.prices.find(e=>!0===e.isActive)),t||(t=e.prices[0]),{amount:t.amount,currency:t.currency,period:t.period||"month"}}return{amount:e.priceAmount,currency:e.priceCurrency,period:"month"}},p=["active"];function d({plugin:e}){const{assetsBaseUrl:t,pluginInAction:n,subscriptionStatus:d,isCheckingSubscription:h,isOnecomBrand:f,handlePluginAction:g,uiI18n:m,isSpecialPlugin:v,setErrorState:y,wpConfig:b,pendingProcurements:_,setPendingProcurements:w,setLoadingAction:k,setLoadingPlugin:S,subscriptionsList:x,fetchPartnerSubscriptions:C}=(0,i.D)(),[E,I]=(0,r.useState)(!1),[N,O]=(0,r.useState)(null),[A,R]=(0,r.useState)(!1),M=(0,r.useRef)(null),T=d[e.slug],P=h[e.slug],L=t||void 0!==window.marketplaceConfig&&window.marketplaceConfig?.assetsBaseUrl||"",D=L?`${L}assets/`:"",F=!f&&"premium"===e.licenseType,U=F&&e.productId&&x?.length?x.find(t=>t.productId===e.productId&&("active"===t.status||"canceled"===t.status||"pending_cancellation"===t.status)&&t.accessDetails?.downloadUrl):null,j=!(f||"premium"!==e.licenseType||e.installed||U||N),B=(e,t)=>e?e.replace("{0}",t||""):"",$=e?.name||"",z=e=>{const t=b?.ajaxUrl;t&&fetch(t,{method:"POST",body:new URLSearchParams({action:(0,c.R5)("track_status"),nonce:b.nonce,resourceType:"acknowledge-plugin-download",subscriptionId:e||""})})},q=()=>{const e=b?.ajaxUrl;e&&fetch(e,{method:"POST",body:new URLSearchParams({action:(0,c.R5)("clear_subscription_list"),nonce:b.nonce})})},V=(t,n)=>{M.current&&M.current();const r=b?.ajaxUrl;r&&n&&(M.current=(0,a.g)({ajaxUrl:r,nonce:b.nonce,action:(0,c.R5)("track_status"),params:{subscriptionId:n},interval:1e4,onResult:async i=>{if(!i.success)return!1;const s=i?.data?.data,a=s?.status;if(!s||!a)return y({visible:!0,type:"buy_now",pluginSlug:t,message:i?.error||i?.data?.message||i?.data?.error||null}),fetch(r,{method:"POST",body:new URLSearchParams({action:(0,c.R5)("clear_pending_procurement"),nonce:b.nonce,slug:t})}),w(e=>{const n={...e};return delete n[t],n}),!0;if(p.includes(a)){const i=s?.license,a=i?.accessDetails?.downloadUrl;if(O({provisionedAt:i?.provisionedAt||null,expiresAt:i?.expiresAt||null,status:"active"}),fetch(r,{method:"POST",body:new URLSearchParams({action:(0,c.R5)("clear_pending_procurement"),nonce:b.nonce,slug:t})}),w(e=>{const n={...e};return delete n[t],n}),q(),a){const t=u(e);(0,o.sx)("Subscription Created",{product_slug:e.slug||"",product_name:e.name||"",item_name:e.slug||"",subscription_id:n,amount:t.amount,currency:t.currency,period:t.period,provisioned_at:i?.provisionedAt||null,expires_at:i?.expiresAt||null,timestamp:Date.now()}),await g("install",{...e,download:a},"buy_now")&&(z(n),(0,o.$V)({action:"install",plugin:e,result:"success"}))}return C(),!0}return"not_found"===a&&(y({visible:!0,type:"buy_now",pluginSlug:t,message:i?.error||i?.data?.message||i?.data?.error||null}),fetch(r,{method:"POST",body:new URLSearchParams({action:(0,c.R5)("clear_pending_procurement"),nonce:b.nonce,slug:t})}),w(e=>{const n={...e};return delete n[t],n}),!0)},onError:e=>console.error("[Marketplace] Polling error",e)}))};(0,r.useEffect)(()=>{const t=_?.[e.slug];return t?.subscriptionId&&V(e.slug,t.subscriptionId),F&&!x?.length&&C(),()=>{M.current&&M.current()}},[]),(0,r.useEffect)(()=>{if(!F||!e.productId||!x?.length)return;const t=x.find(t=>t.productId===e.productId&&("active"===t.status||"canceled"===t.status||"pending_cancellation"===t.status));t&&O({provisionedAt:t.provisionedAt||null,expiresAt:t.expiresAt||null,status:"canceled"===t.status?"canceled":"active"})},[x]);const W=t=>{const n=!e.installed;if(f&&v(e.slug)&&n&&"install"===t){(0,o.Mh)({buttonName:"Install",buttonAction:"product_install",plugin:e,context:{action:t,result:"initiated"}});const n=new CustomEvent("onecom-plugin-provision",{detail:{slug:e.slug},bubbles:!0,cancelable:!0,composed:!0});return void document.dispatchEvent(n)}"install"===t&&U?.accessDetails?.downloadUrl?g("install",{...e,download:U.accessDetails.downloadUrl},"product_detail"):g(t,e,"product_detail")},H=f&&v(e.slug)&&!e.installed&&!1===T,G=f&&v(e.slug)&&!e.installed&&(P||void 0===T),K=!!_?.[e.slug];return(0,r.createElement)("div",{className:"plugin-actions gv-mt-md"},G?(0,r.createElement)("div",{className:"gv-skeleton gv-heading-md"}):H?(0,r.createElement)("button",{type:"button",className:"gv-button gv-button-primary",onClick:()=>{(0,o.Mh)({buttonName:"Select",buttonAction:"subscribe_addon",plugin:e});const t=new CustomEvent("onecom-subscribe-addon",{detail:{slug:e.slug},bubbles:!0,cancelable:!0,composed:!0});document.dispatchEvent(t)},disabled:P},"Select"):e.installed?e.activated?(0,r.createElement)("button",{type:"button",className:"gv-button gv-button-primary",onClick:()=>{(0,o.Mh)({buttonName:"Manage",buttonAction:"manage_product",context:{product_slug:e.slug,product_name:e.name,has_redirect_url:!(!e.redirectUrl||""===e.redirectUrl.trim()),has_onboarding_url:!(!e.onboardingUrl||""===e.onboardingUrl.trim())}});const t=(0,s.v)(e,!1);(0,s.J)(t)}},(0,r.createElement)("span",null,m?.labels?.manage||"Manage"),(0,r.createElement)("gv-icon",{"aria-hidden":"true",src:`${D}icons/arrow_right.svg`})):(0,r.createElement)("button",{className:"gv-button gv-button-primary",disabled:!!n[e.slug],onClick:()=>W("activate")},n[e.slug]?B("install"===n[e.slug]?m?.notifications?.installing||"Installing {0}":m?.notifications?.activating||"Activating {0}",$):m?.activateButton||e.i18n?.activateButton||"Activate"):j?(0,r.createElement)("button",{type:"button",className:"gv-button gv-button-primary",disabled:E||!!n[e.slug]||K,onClick:()=>{(0,o.Mh)({buttonName:"Buy now",buttonAction:"product_buy",plugin:e,context:{action:"buy"}}),R(!0)}},E||n[e.slug]||K?(0,r.createElement)(r.Fragment,null,(0,r.createElement)("span",{class:"gv-mr-sm"},m?.labels?.processing||"Processing"),(0,r.createElement)("gv-loader",{class:"gv-mode-condensed",src:`${L}assets/images/spinner.svg`})):m?.labels?.buyNowButton||"Buy Now"):(0,r.createElement)("button",{className:"gv-button "+("seo-by-rank-math"===e.slug?"gv-button-secondary":"gv-button-primary"),disabled:n[e.slug],onClick:()=>W("install")},n[e.slug]?B(m?.notifications?.installing||"Installing {0}",$):m?.installButton||e.i18n?.installButton||"Install"),F&&(K?(0,r.createElement)("div",{className:"gv-text-indicator gv-mt-sm"},(0,r.createElement)("div",{className:"gv-indicator gv-state-positive"}),(0,r.createElement)("span",{style:{whiteSpace:"normal"}},m?.notifications?.procurementPending||"Payment successful. The plugin will be available for installation shortly.")):!j&&N?(0,r.createElement)("div",{className:"gv-mt-sm"},N.expiresAt&&(()=>{const e=`${"undefined"!=typeof window&&window.marketplaceConfig?.wpConfig?.adminUrl||"/wp-admin/"}admin.php?page=${"undefined"!=typeof window&&window.marketplaceConfig?.addonsMenuSlug||"onecom-marketplace-products"}`,t=m?.labels?.manageYourAddons||"Manage your addons";return"canceled"===N.status?(0,r.createElement)("div",{className:"gv-text-indicator"},(0,r.createElement)("div",{className:"gv-indicator gv-state-attention"}),(0,r.createElement)("span",{style:{whiteSpace:"normal"}},m?.labels?.subscriptionCanceled||"Subscription cancelled",". ",(0,r.createElement)("a",{href:e},t))):(0,r.createElement)("div",{className:"gv-text-indicator"},(0,r.createElement)("div",{className:"gv-indicator gv-state-positive"}),(0,r.createElement)("span",{style:{whiteSpace:"normal"}},m?.labels?.subscriptionActive||"Subscription active",". ",(0,r.createElement)("a",{href:e},t)))})()):null),(0,r.createElement)(l.A,{isOpen:A,plugin:e,uiI18n:m,assetsBaseUrl:L,onClose:()=>R(!1),onPurchase:()=>{R(!1),(async()=>{(0,o.Mh)({buttonName:"Buy now",buttonAction:"product_buy_confirmation",plugin:e,context:{action:"buy"}}),I(!0),k(B(m?.notifications?.processing||"Purchase in progress, please wait while your payment is processing.",$)),S("");const t=u(e),n=b?.ajaxUrl;if(!n)return I(!1),void k("");try{const r=new URLSearchParams({action:(0,c.R5)("subscribe"),nonce:b.nonce,productId:e.productId||"",priceAmount:t.amount||"",priceCurrency:t.currency||"",pricePeriod:t.period||""}),i=await fetch(n,{method:"POST",body:r}),s=await i.json();if(!s.success)return(0,o.Mh)({buttonName:"Buy now",buttonAction:"buy_now",plugin:e,context:{result:"error",error_message:s.data?.message||"Subscription failed"}}),y({visible:!0,type:"buy_now",pluginSlug:e.slug,message:s?.error||s?.error||s?.data?.message||s?.data?.error||null}),I(!1),void k("");const a=s?.data?.data,l=a?.status,u=a?.subscriptionId;if((0,o.Mh)({buttonName:"Buy now",buttonAction:"buy_now",plugin:e,context:{result:p.includes(l)?"procurement_success":"procurement_pending",subscription_id:u,status:l}}),p.includes(l)){const t=a?.license,n=t?.accessDetails?.downloadUrl;O({provisionedAt:t?.provisionedAt||null,expiresAt:t?.expiresAt||null,status:"active"}),I(!1),k(""),n&&await g("install",{...e,download:n},"buy_now")&&(z(u),(0,o.$V)({action:"install",plugin:e,result:"success"}))}else if("pending"!==l&&"pending_provisioning"!==l||!u)I(!1),k("");else{q();const t=new URLSearchParams({action:(0,c.R5)("save_pending_procurement"),nonce:b.nonce,slug:e.slug,subscriptionId:u,product_id:a?.productId||e.productId||""});fetch(n,{method:"POST",body:t}),w(t=>({...t,[e.slug]:{subscriptionId:u,product_id:a?.productId||e.productId,timestamp:Math.floor(Date.now()/1e3)}})),I(!1),k(""),V(e.slug,u)}}catch(t){console.error("Buy now subscription request failed",t),(0,o.Mh)({buttonName:"Buy now",buttonAction:"buy_now",plugin:e,context:{result:"error",error_message:t.message||"Network error"}}),y({visible:!0,type:"buy_now",pluginSlug:e.slug,message:t.message||null}),I(!1),k("")}})()}}))}},1352:(e,t,n)=>{"use strict";n.d(t,{TO:()=>o.T,gJ:()=>s,hz:()=>a,rV:()=>i.r});var r=n(1609),i=n(7565),o=n(8484);n(1831);const s=(0,r.createContext)();class a{constructor(){this.usedNamespaces={}}addUsedNamespaces(e){e.forEach(e=>{this.usedNamespaces[e]||(this.usedNamespaces[e]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}}},1609:e=>{"use strict";e.exports=window.React},1755:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var r=n(1609),i=n(7979),o=n(8291);function s(){const{assetsBaseUrl:e}=(0,i.D)(),{t}=(0,o.Bd)();return e||void 0!==window.marketplaceConfig&&window.marketplaceConfig,(0,r.createElement)("div",{className:"marketplace-container gv-flex gv-flex-col gv-flex-wrap gv-gap-lg gv-items-center gv-justify-center gv-p-fluid"},(0,r.createElement)("div",{className:"gv-text-center"},(0,r.createElement)("h5",{className:"gv-header-md gv-mb-sm"},t("ui.notifications.couldNotLoad")),(0,r.createElement)("p",{className:"gv-text-md gv-mb-lg"},t("ui.notifications.refreshPage")),(0,r.createElement)("button",{type:"button",className:"gv-button gv-button-primary buttons-min-width",onClick:()=>{window.location.reload()}},(0,r.createElement)("span",null,t("ui.button.refreshPage")))))}},1831:(e,t,n)=>{"use strict";n.d(t,{r:()=>o});var r=n(7565),i=n(8484);const o={type:"3rdParty",init(e){(0,r.P)(e.options.react),(0,i.V)(e)}}},2176:(e,t,n)=>{"use strict";n(8437)},2635:(e,t,n)=>{"use strict";n.r(t),n.d(t,{changeLanguage:()=>Q,createInstance:()=>G,default:()=>H,dir:()=>K,exists:()=>ne,getFixedT:()=>ee,hasLoadedNamespace:()=>ie,init:()=>J,keyFromSelector:()=>I,loadLanguages:()=>se,loadNamespaces:()=>oe,loadResources:()=>Y,reloadResources:()=>Z,setDefaultNamespace:()=>re,t:()=>te,use:()=>X});const r=e=>"string"==typeof e,i=()=>{let e,t;const n=new Promise((n,r)=>{e=n,t=r});return n.resolve=e,n.reject=t,n},o=e=>null==e?"":""+e,s=/###/g,a=e=>e&&e.indexOf("###")>-1?e.replace(s,"."):e,c=e=>!e||r(e),l=(e,t,n)=>{const i=r(t)?t.split("."):t;let o=0;for(;o{const{obj:r,k:i}=l(e,t,Object);if(void 0!==r||1===t.length)return void(r[i]=n);let o=t[t.length-1],s=t.slice(0,t.length-1),a=l(e,s,Object);for(;void 0===a.obj&&s.length;)o=`${s[s.length-1]}.${o}`,s=s.slice(0,s.length-1),a=l(e,s,Object),a?.obj&&void 0!==a.obj[`${a.k}.${o}`]&&(a.obj=void 0);a.obj[`${a.k}.${o}`]=n},p=(e,t)=>{const{obj:n,k:r}=l(e,t);if(n&&Object.prototype.hasOwnProperty.call(n,r))return n[r]},d=(e,t,n)=>{for(const i in t)"__proto__"!==i&&"constructor"!==i&&(i in e?r(e[i])||e[i]instanceof String||r(t[i])||t[i]instanceof String?n&&(e[i]=t[i]):d(e[i],t[i],n):e[i]=t[i]);return e},h=e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var f={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};const g=e=>r(e)?e.replace(/[&<>"'\/]/g,e=>f[e]):e,m=[" ",",","?","!",";"],v=new class{constructor(e){this.capacity=e,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(e){const t=this.regExpMap.get(e);if(void 0!==t)return t;const n=new RegExp(e);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(e,n),this.regExpQueue.push(e),n}}(20),y=(e,t,n=".")=>{if(!e)return;if(e[t]){if(!Object.prototype.hasOwnProperty.call(e,t))return;return e[t]}const r=t.split(n);let i=e;for(let e=0;e-1&&se?.replace("_","-"),_={type:"logger",log(e){this.output("log",e)},warn(e){this.output("warn",e)},error(e){this.output("error",e)},output(e,t){console?.[e]?.apply?.(console,t)}};class w{constructor(e,t={}){this.init(e,t)}init(e,t={}){this.prefix=t.prefix||"i18next:",this.logger=e||_,this.options=t,this.debug=t.debug}log(...e){return this.forward(e,"log","",!0)}warn(...e){return this.forward(e,"warn","",!0)}error(...e){return this.forward(e,"error","")}deprecate(...e){return this.forward(e,"warn","WARNING DEPRECATED: ",!0)}forward(e,t,n,i){return i&&!this.debug?null:(r(e[0])&&(e[0]=`${n}${this.prefix} ${e[0]}`),this.logger[t](e))}create(e){return new w(this.logger,{prefix:`${this.prefix}:${e}:`,...this.options})}clone(e){return(e=e||this.options).prefix=e.prefix||this.prefix,new w(this.logger,e)}}var k=new w;class S{constructor(){this.observers={}}on(e,t){return e.split(" ").forEach(e=>{this.observers[e]||(this.observers[e]=new Map);const n=this.observers[e].get(t)||0;this.observers[e].set(t,n+1)}),this}off(e,t){this.observers[e]&&(t?this.observers[e].delete(t):delete this.observers[e])}emit(e,...t){this.observers[e]&&Array.from(this.observers[e].entries()).forEach(([e,n])=>{for(let r=0;r{for(let i=0;i-1&&this.options.ns.splice(t,1)}getResource(e,t,n,i={}){const o=void 0!==i.keySeparator?i.keySeparator:this.options.keySeparator,s=void 0!==i.ignoreJSONStructure?i.ignoreJSONStructure:this.options.ignoreJSONStructure;let a;e.indexOf(".")>-1?a=e.split("."):(a=[e,t],n&&(Array.isArray(n)?a.push(...n):r(n)&&o?a.push(...n.split(o)):a.push(n)));const c=p(this.data,a);return!c&&!t&&!n&&e.indexOf(".")>-1&&(e=a[0],t=a[1],n=a.slice(2).join(".")),!c&&s&&r(n)?y(this.data?.[e]?.[t],n,o):c}addResource(e,t,n,r,i={silent:!1}){const o=void 0!==i.keySeparator?i.keySeparator:this.options.keySeparator;let s=[e,t];n&&(s=s.concat(o?n.split(o):n)),e.indexOf(".")>-1&&(s=e.split("."),r=t,t=s[1]),this.addNamespaces(t),u(this.data,s,r),i.silent||this.emit("added",e,t,n,r)}addResources(e,t,n,i={silent:!1}){for(const i in n)(r(n[i])||Array.isArray(n[i]))&&this.addResource(e,t,i,n[i],{silent:!0});i.silent||this.emit("added",e,t,n)}addResourceBundle(e,t,n,r,i,o={silent:!1,skipCopy:!1}){let s=[e,t];e.indexOf(".")>-1&&(s=e.split("."),r=n,n=t,t=s[1]),this.addNamespaces(t);let a=p(this.data,s)||{};o.skipCopy||(n=JSON.parse(JSON.stringify(n))),r?d(a,n,i):a={...a,...n},u(this.data,s,a),o.silent||this.emit("added",e,t,n)}removeResourceBundle(e,t){this.hasResourceBundle(e,t)&&delete this.data[e][t],this.removeNamespaces(t),this.emit("removed",e,t)}hasResourceBundle(e,t){return void 0!==this.getResource(e,t)}getResourceBundle(e,t){return t||(t=this.options.defaultNS),this.getResource(e,t)}getDataByLanguage(e){return this.data[e]}hasLanguageSomeTranslations(e){const t=this.getDataByLanguage(e);return!!(t&&Object.keys(t)||[]).find(e=>t[e]&&Object.keys(t[e]).length>0)}toJSON(){return this.data}}var C={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,n,r,i){return e.forEach(e=>{t=this.processors[e]?.process(t,n,r,i)??t}),t}};const E=Symbol("i18next/PATH_KEY");function I(e,t){const{[E]:n}=e(function(){const e=[],t=Object.create(null);let n;return t.get=(r,i)=>(n?.revoke?.(),i===E?e:(e.push(i),n=Proxy.revocable(r,t),n.proxy)),Proxy.revocable(Object.create(null),t).proxy}());return n.join(t?.keySeparator??".")}const N={},O=e=>!r(e)&&"boolean"!=typeof e&&"number"!=typeof e;class A extends S{constructor(e,t={}){super(),((e,t,n)=>{["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"].forEach(e=>{t[e]&&(n[e]=t[e])})})(0,e,this),this.options=t,void 0===this.options.keySeparator&&(this.options.keySeparator="."),this.logger=k.create("translator")}changeLanguage(e){e&&(this.language=e)}exists(e,t={interpolation:{}}){const n={...t};if(null==e)return!1;const r=this.resolve(e,n);return void 0!==r?.res}extractFromKey(e,t){let n=void 0!==t.nsSeparator?t.nsSeparator:this.options.nsSeparator;void 0===n&&(n=":");const i=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator;let o=t.ns||this.options.defaultNS||[];const s=n&&e.indexOf(n)>-1,a=!(this.options.userDefinedKeySeparator||t.keySeparator||this.options.userDefinedNsSeparator||t.nsSeparator||((e,t,n)=>{t=t||"",n=n||"";const r=m.filter(e=>t.indexOf(e)<0&&n.indexOf(e)<0);if(0===r.length)return!0;const i=v.getRegExp(`(${r.map(e=>"?"===e?"\\?":e).join("|")})`);let o=!i.test(e);if(!o){const t=e.indexOf(n);t>0&&!i.test(e.substring(0,t))&&(o=!0)}return o})(e,n,i));if(s&&!a){const t=e.match(this.interpolator.nestingRegexp);if(t&&t.length>0)return{key:e,namespaces:r(o)?[o]:o};const s=e.split(n);(n!==i||n===i&&this.options.ns.indexOf(s[0])>-1)&&(o=s.shift()),e=s.join(i)}return{key:e,namespaces:r(o)?[o]:o}}translate(e,t,n){let i="object"==typeof t?{...t}:t;if("object"!=typeof i&&this.options.overloadTranslationOptionHandler&&(i=this.options.overloadTranslationOptionHandler(arguments)),"object"==typeof i&&(i={...i}),i||(i={}),null==e)return"";"function"==typeof e&&(e=I(e,{...this.options,...i})),Array.isArray(e)||(e=[String(e)]);const o=void 0!==i.returnDetails?i.returnDetails:this.options.returnDetails,s=void 0!==i.keySeparator?i.keySeparator:this.options.keySeparator,{key:a,namespaces:c}=this.extractFromKey(e[e.length-1],i),l=c[c.length-1];let u=void 0!==i.nsSeparator?i.nsSeparator:this.options.nsSeparator;void 0===u&&(u=":");const p=i.lng||this.language,d=i.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if("cimode"===p?.toLowerCase())return d?o?{res:`${l}${u}${a}`,usedKey:a,exactUsedKey:a,usedLng:p,usedNS:l,usedParams:this.getUsedParamsDetails(i)}:`${l}${u}${a}`:o?{res:a,usedKey:a,exactUsedKey:a,usedLng:p,usedNS:l,usedParams:this.getUsedParamsDetails(i)}:a;const h=this.resolve(e,i);let f=h?.res;const g=h?.usedKey||a,m=h?.exactUsedKey||a,v=void 0!==i.joinArrays?i.joinArrays:this.options.joinArrays,y=!this.i18nFormat||this.i18nFormat.handleAsObject,b=void 0!==i.count&&!r(i.count),_=A.hasDefaultValue(i),w=b?this.pluralResolver.getSuffix(p,i.count,i):"",k=i.ordinal&&b?this.pluralResolver.getSuffix(p,i.count,{ordinal:!1}):"",S=b&&!i.ordinal&&0===i.count,x=S&&i[`defaultValue${this.options.pluralSeparator}zero`]||i[`defaultValue${w}`]||i[`defaultValue${k}`]||i.defaultValue;let C=f;y&&!f&&_&&(C=x);const E=O(C),N=Object.prototype.toString.apply(C);if(!(y&&C&&E&&["[object Number]","[object Function]","[object RegExp]"].indexOf(N)<0)||r(v)&&Array.isArray(C))if(y&&r(v)&&Array.isArray(f))f=f.join(v),f&&(f=this.extendTranslation(f,e,i,n));else{let t=!1,r=!1;!this.isValidLookup(f)&&_&&(t=!0,f=x),this.isValidLookup(f)||(r=!0,f=a);const o=(i.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&r?void 0:f,c=_&&x!==f&&this.options.updateMissing;if(r||t||c){if(this.logger.log(c?"updateKey":"missingKey",p,l,a,c?x:f),s){const e=this.resolve(a,{...i,keySeparator:!1});e&&e.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let e=[];const t=this.languageUtils.getFallbackCodes(this.options.fallbackLng,i.lng||this.language);if("fallback"===this.options.saveMissingTo&&t&&t[0])for(let n=0;n{const r=_&&n!==f?n:o;this.options.missingKeyHandler?this.options.missingKeyHandler(e,l,t,r,c,i):this.backendConnector?.saveMissing&&this.backendConnector.saveMissing(e,l,t,r,c,i),this.emit("missingKey",e,l,t,f)};this.options.saveMissing&&(this.options.saveMissingPlurals&&b?e.forEach(e=>{const t=this.pluralResolver.getSuffixes(e,i);S&&i[`defaultValue${this.options.pluralSeparator}zero`]&&t.indexOf(`${this.options.pluralSeparator}zero`)<0&&t.push(`${this.options.pluralSeparator}zero`),t.forEach(t=>{n([e],a+t,i[`defaultValue${t}`]||x)})}):n(e,a,x))}f=this.extendTranslation(f,e,i,h,n),r&&f===a&&this.options.appendNamespaceToMissingKey&&(f=`${l}${u}${a}`),(r||t)&&this.options.parseMissingKeyHandler&&(f=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${l}${u}${a}`:a,t?f:void 0,i))}else{if(!i.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const e=this.options.returnedObjectHandler?this.options.returnedObjectHandler(g,C,{...i,ns:c}):`key '${a} (${this.language})' returned an object instead of string.`;return o?(h.res=e,h.usedParams=this.getUsedParamsDetails(i),h):e}if(s){const e=Array.isArray(C),t=e?[]:{},n=e?m:g;for(const e in C)if(Object.prototype.hasOwnProperty.call(C,e)){const r=`${n}${s}${e}`;t[e]=_&&!f?this.translate(r,{...i,defaultValue:O(x)?x[e]:void 0,joinArrays:!1,ns:c}):this.translate(r,{...i,joinArrays:!1,ns:c}),t[e]===r&&(t[e]=C[e])}f=t}}return o?(h.res=f,h.usedParams=this.getUsedParamsDetails(i),h):f}extendTranslation(e,t,n,i,o){if(this.i18nFormat?.parse)e=this.i18nFormat.parse(e,{...this.options.interpolation.defaultVariables,...n},n.lng||this.language||i.usedLng,i.usedNS,i.usedKey,{resolved:i});else if(!n.skipInterpolation){n.interpolation&&this.interpolator.init({...n,interpolation:{...this.options.interpolation,...n.interpolation}});const s=r(e)&&(void 0!==n?.interpolation?.skipOnVariables?n.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let a;if(s){const t=e.match(this.interpolator.nestingRegexp);a=t&&t.length}let c=n.replace&&!r(n.replace)?n.replace:n;if(this.options.interpolation.defaultVariables&&(c={...this.options.interpolation.defaultVariables,...c}),e=this.interpolator.interpolate(e,c,n.lng||this.language||i.usedLng,n),s){const t=e.match(this.interpolator.nestingRegexp);a<(t&&t.length)&&(n.nest=!1)}!n.lng&&i&&i.res&&(n.lng=this.language||i.usedLng),!1!==n.nest&&(e=this.interpolator.nest(e,(...e)=>o?.[0]!==e[0]||n.context?this.translate(...e,t):(this.logger.warn(`It seems you are nesting recursively key: ${e[0]} in key: ${t[0]}`),null),n)),n.interpolation&&this.interpolator.reset()}const s=n.postProcess||this.options.postProcess,a=r(s)?[s]:s;return null!=e&&a?.length&&!1!==n.applyPostProcessor&&(e=C.handle(a,e,t,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...i,usedParams:this.getUsedParamsDetails(n)},...n}:n,this)),e}resolve(e,t={}){let n,i,o,s,a;return r(e)&&(e=[e]),e.forEach(e=>{if(this.isValidLookup(n))return;const c=this.extractFromKey(e,t),l=c.key;i=l;let u=c.namespaces;this.options.fallbackNS&&(u=u.concat(this.options.fallbackNS));const p=void 0!==t.count&&!r(t.count),d=p&&!t.ordinal&&0===t.count,h=void 0!==t.context&&(r(t.context)||"number"==typeof t.context)&&""!==t.context,f=t.lngs?t.lngs:this.languageUtils.toResolveHierarchy(t.lng||this.language,t.fallbackLng);u.forEach(e=>{this.isValidLookup(n)||(a=e,N[`${f[0]}-${e}`]||!this.utils?.hasLoadedNamespace||this.utils?.hasLoadedNamespace(a)||(N[`${f[0]}-${e}`]=!0,this.logger.warn(`key "${i}" for languages "${f.join(", ")}" won't get resolved as namespace "${a}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),f.forEach(r=>{if(this.isValidLookup(n))return;s=r;const i=[l];if(this.i18nFormat?.addLookupKeys)this.i18nFormat.addLookupKeys(i,l,r,e,t);else{let e;p&&(e=this.pluralResolver.getSuffix(r,t.count,t));const n=`${this.options.pluralSeparator}zero`,o=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(p&&(t.ordinal&&0===e.indexOf(o)&&i.push(l+e.replace(o,this.options.pluralSeparator)),i.push(l+e),d&&i.push(l+n)),h){const r=`${l}${this.options.contextSeparator||"_"}${t.context}`;i.push(r),p&&(t.ordinal&&0===e.indexOf(o)&&i.push(r+e.replace(o,this.options.pluralSeparator)),i.push(r+e),d&&i.push(r+n))}}let a;for(;a=i.pop();)this.isValidLookup(n)||(o=a,n=this.getResource(r,e,a,t))}))})}),{res:n,usedKey:i,exactUsedKey:o,usedLng:s,usedNS:a}}isValidLookup(e){return!(void 0===e||!this.options.returnNull&&null===e||!this.options.returnEmptyString&&""===e)}getResource(e,t,n,r={}){return this.i18nFormat?.getResource?this.i18nFormat.getResource(e,t,n,r):this.resourceStore.getResource(e,t,n,r)}getUsedParamsDetails(e={}){const t=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],n=e.replace&&!r(e.replace);let i=n?e.replace:e;if(n&&void 0!==e.count&&(i.count=e.count),this.options.interpolation.defaultVariables&&(i={...this.options.interpolation.defaultVariables,...i}),!n){i={...i};for(const e of t)delete i[e]}return i}static hasDefaultValue(e){for(const t in e)if(Object.prototype.hasOwnProperty.call(e,t)&&"defaultValue"===t.substring(0,12)&&void 0!==e[t])return!0;return!1}}class R{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=k.create("languageUtils")}getScriptPartFromCode(e){if(!(e=b(e))||e.indexOf("-")<0)return null;const t=e.split("-");return 2===t.length?null:(t.pop(),"x"===t[t.length-1].toLowerCase()?null:this.formatLanguageCode(t.join("-")))}getLanguagePartFromCode(e){if(!(e=b(e))||e.indexOf("-")<0)return e;const t=e.split("-");return this.formatLanguageCode(t[0])}formatLanguageCode(e){if(r(e)&&e.indexOf("-")>-1){let t;try{t=Intl.getCanonicalLocales(e)[0]}catch(e){}return t&&this.options.lowerCaseLng&&(t=t.toLowerCase()),t||(this.options.lowerCaseLng?e.toLowerCase():e)}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}isSupportedCode(e){return("languageOnly"===this.options.load||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(e)>-1}getBestMatchFromCodes(e){if(!e)return null;let t;return e.forEach(e=>{if(t)return;const n=this.formatLanguageCode(e);this.options.supportedLngs&&!this.isSupportedCode(n)||(t=n)}),!t&&this.options.supportedLngs&&e.forEach(e=>{if(t)return;const n=this.getScriptPartFromCode(e);if(this.isSupportedCode(n))return t=n;const r=this.getLanguagePartFromCode(e);if(this.isSupportedCode(r))return t=r;t=this.options.supportedLngs.find(e=>e===r?e:e.indexOf("-")<0&&r.indexOf("-")<0?void 0:e.indexOf("-")>0&&r.indexOf("-")<0&&e.substring(0,e.indexOf("-"))===r||0===e.indexOf(r)&&r.length>1?e:void 0)}),t||(t=this.getFallbackCodes(this.options.fallbackLng)[0]),t}getFallbackCodes(e,t){if(!e)return[];if("function"==typeof e&&(e=e(t)),r(e)&&(e=[e]),Array.isArray(e))return e;if(!t)return e.default||[];let n=e[t];return n||(n=e[this.getScriptPartFromCode(t)]),n||(n=e[this.formatLanguageCode(t)]),n||(n=e[this.getLanguagePartFromCode(t)]),n||(n=e.default),n||[]}toResolveHierarchy(e,t){const n=this.getFallbackCodes((!1===t?[]:t)||this.options.fallbackLng||[],e),i=[],o=e=>{e&&(this.isSupportedCode(e)?i.push(e):this.logger.warn(`rejecting language code not found in supportedLngs: ${e}`))};return r(e)&&(e.indexOf("-")>-1||e.indexOf("_")>-1)?("languageOnly"!==this.options.load&&o(this.formatLanguageCode(e)),"languageOnly"!==this.options.load&&"currentOnly"!==this.options.load&&o(this.getScriptPartFromCode(e)),"currentOnly"!==this.options.load&&o(this.getLanguagePartFromCode(e))):r(e)&&o(this.formatLanguageCode(e)),n.forEach(e=>{i.indexOf(e)<0&&o(this.formatLanguageCode(e))}),i}}const M={zero:0,one:1,two:2,few:3,many:4,other:5},T={select:e=>1===e?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class P{constructor(e,t={}){this.languageUtils=e,this.options=t,this.logger=k.create("pluralResolver"),this.pluralRulesCache={}}addRule(e,t){this.rules[e]=t}clearCache(){this.pluralRulesCache={}}getRule(e,t={}){const n=b("dev"===e?"en":e),r=t.ordinal?"ordinal":"cardinal",i=JSON.stringify({cleanedCode:n,type:r});if(i in this.pluralRulesCache)return this.pluralRulesCache[i];let o;try{o=new Intl.PluralRules(n,{type:r})}catch(n){if(!Intl)return this.logger.error("No Intl support, please use an Intl polyfill!"),T;if(!e.match(/-|_/))return T;const r=this.languageUtils.getLanguagePartFromCode(e);o=this.getRule(r,t)}return this.pluralRulesCache[i]=o,o}needsPlural(e,t={}){let n=this.getRule(e,t);return n||(n=this.getRule("dev",t)),n?.resolvedOptions().pluralCategories.length>1}getPluralFormsOfKey(e,t,n={}){return this.getSuffixes(e,n).map(e=>`${t}${e}`)}getSuffixes(e,t={}){let n=this.getRule(e,t);return n||(n=this.getRule("dev",t)),n?n.resolvedOptions().pluralCategories.sort((e,t)=>M[e]-M[t]).map(e=>`${this.options.prepend}${t.ordinal?`ordinal${this.options.prepend}`:""}${e}`):[]}getSuffix(e,t,n={}){const r=this.getRule(e,n);return r?`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${r.select(t)}`:(this.logger.warn(`no plural rule found for: ${e}`),this.getSuffix("dev",t,n))}}const L=(e,t,n,i=".",o=!0)=>{let s=((e,t,n)=>{const r=p(e,n);return void 0!==r?r:p(t,n)})(e,t,n);return!s&&o&&r(n)&&(s=y(e,n,i),void 0===s&&(s=y(t,n,i))),s},D=e=>e.replace(/\$/g,"$$$$");class F{constructor(e={}){this.logger=k.create("interpolator"),this.options=e,this.format=e?.interpolation?.format||(e=>e),this.init(e)}init(e={}){e.interpolation||(e.interpolation={escapeValue:!0});const{escape:t,escapeValue:n,useRawValueToEscape:r,prefix:i,prefixEscaped:o,suffix:s,suffixEscaped:a,formatSeparator:c,unescapeSuffix:l,unescapePrefix:u,nestingPrefix:p,nestingPrefixEscaped:d,nestingSuffix:f,nestingSuffixEscaped:m,nestingOptionsSeparator:v,maxReplaces:y,alwaysFormat:b}=e.interpolation;this.escape=void 0!==t?t:g,this.escapeValue=void 0===n||n,this.useRawValueToEscape=void 0!==r&&r,this.prefix=i?h(i):o||"{{",this.suffix=s?h(s):a||"}}",this.formatSeparator=c||",",this.unescapePrefix=l?"":u||"-",this.unescapeSuffix=this.unescapePrefix?"":l||"",this.nestingPrefix=p?h(p):d||h("$t("),this.nestingSuffix=f?h(f):m||h(")"),this.nestingOptionsSeparator=v||",",this.maxReplaces=y||1e3,this.alwaysFormat=void 0!==b&&b,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const e=(e,t)=>e?.source===t?(e.lastIndex=0,e):new RegExp(t,"g");this.regexp=e(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=e(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=e(this.nestingRegexp,`${this.nestingPrefix}((?:[^()"']+|"[^"]*"|'[^']*'|\\((?:[^()]|"[^"]*"|'[^']*')*\\))*?)${this.nestingSuffix}`)}interpolate(e,t,n,i){let s,a,c;const l=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},u=e=>{if(e.indexOf(this.formatSeparator)<0){const r=L(t,l,e,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(r,void 0,n,{...i,...t,interpolationkey:e}):r}const r=e.split(this.formatSeparator),o=r.shift().trim(),s=r.join(this.formatSeparator).trim();return this.format(L(t,l,o,this.options.keySeparator,this.options.ignoreJSONStructure),s,n,{...i,...t,interpolationkey:o})};this.resetRegExp();const p=i?.missingInterpolationHandler||this.options.missingInterpolationHandler,d=void 0!==i?.interpolation?.skipOnVariables?i.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:e=>D(e)},{regex:this.regexp,safeValue:e=>this.escapeValue?D(this.escape(e)):D(e)}].forEach(t=>{for(c=0;s=t.regex.exec(e);){const n=s[1].trim();if(a=u(n),void 0===a)if("function"==typeof p){const t=p(e,s,i);a=r(t)?t:""}else if(i&&Object.prototype.hasOwnProperty.call(i,n))a="";else{if(d){a=s[0];continue}this.logger.warn(`missed to pass in variable ${n} for interpolating ${e}`),a=""}else r(a)||this.useRawValueToEscape||(a=o(a));const l=t.safeValue(a);if(e=e.replace(s[0],l),d?(t.regex.lastIndex+=a.length,t.regex.lastIndex-=s[0].length):t.regex.lastIndex=0,c++,c>=this.maxReplaces)break}}),e}nest(e,t,n={}){let i,s,a;const c=(e,t)=>{const n=this.nestingOptionsSeparator;if(e.indexOf(n)<0)return e;const r=e.split(new RegExp(`${n}[ ]*{`));let i=`{${r[1]}`;e=r[0],i=this.interpolate(i,a);const o=i.match(/'/g),s=i.match(/"/g);((o?.length??0)%2==0&&!s||s.length%2!=0)&&(i=i.replace(/'/g,'"'));try{a=JSON.parse(i),t&&(a={...t,...a})}catch(t){return this.logger.warn(`failed parsing options string in nesting for key ${e}`,t),`${e}${n}${i}`}return a.defaultValue&&a.defaultValue.indexOf(this.prefix)>-1&&delete a.defaultValue,e};for(;i=this.nestingRegexp.exec(e);){let l=[];a={...n},a=a.replace&&!r(a.replace)?a.replace:a,a.applyPostProcessor=!1,delete a.defaultValue;const u=/{.*}/.test(i[1])?i[1].lastIndexOf("}")+1:i[1].indexOf(this.formatSeparator);if(-1!==u&&(l=i[1].slice(u).split(this.formatSeparator).map(e=>e.trim()).filter(Boolean),i[1]=i[1].slice(0,u)),s=t(c.call(this,i[1].trim(),a),a),s&&i[0]===e&&!r(s))return s;r(s)||(s=o(s)),s||(this.logger.warn(`missed to resolve ${i[1]} for nesting ${e}`),s=""),l.length&&(s=l.reduce((e,t)=>this.format(e,t,n.lng,{...n,interpolationkey:i[1].trim()}),s.trim())),e=e.replace(i[0],s),this.regexp.lastIndex=0}return e}}const U=e=>{const t={};return(n,r,i)=>{let o=i;i&&i.interpolationkey&&i.formatParams&&i.formatParams[i.interpolationkey]&&i[i.interpolationkey]&&(o={...o,[i.interpolationkey]:void 0});const s=r+JSON.stringify(o);let a=t[s];return a||(a=e(b(r),i),t[s]=a),a(n)}},j=e=>(t,n,r)=>e(b(n),r)(t);class B{constructor(e={}){this.logger=k.create("formatter"),this.options=e,this.init(e)}init(e,t={interpolation:{}}){this.formatSeparator=t.interpolation.formatSeparator||",";const n=t.cacheInBuiltFormats?U:j;this.formats={number:n((e,t)=>{const n=new Intl.NumberFormat(e,{...t});return e=>n.format(e)}),currency:n((e,t)=>{const n=new Intl.NumberFormat(e,{...t,style:"currency"});return e=>n.format(e)}),datetime:n((e,t)=>{const n=new Intl.DateTimeFormat(e,{...t});return e=>n.format(e)}),relativetime:n((e,t)=>{const n=new Intl.RelativeTimeFormat(e,{...t});return e=>n.format(e,t.range||"day")}),list:n((e,t)=>{const n=new Intl.ListFormat(e,{...t});return e=>n.format(e)})}}add(e,t){this.formats[e.toLowerCase().trim()]=t}addCached(e,t){this.formats[e.toLowerCase().trim()]=U(t)}format(e,t,n,r={}){const i=t.split(this.formatSeparator);if(i.length>1&&i[0].indexOf("(")>1&&i[0].indexOf(")")<0&&i.find(e=>e.indexOf(")")>-1)){const e=i.findIndex(e=>e.indexOf(")")>-1);i[0]=[i[0],...i.splice(1,e)].join(this.formatSeparator)}return i.reduce((e,t)=>{const{formatName:i,formatOptions:o}=(e=>{let t=e.toLowerCase().trim();const n={};if(e.indexOf("(")>-1){const r=e.split("(");t=r[0].toLowerCase().trim();const i=r[1].substring(0,r[1].length-1);"currency"===t&&i.indexOf(":")<0?n.currency||(n.currency=i.trim()):"relativetime"===t&&i.indexOf(":")<0?n.range||(n.range=i.trim()):i.split(";").forEach(e=>{if(e){const[t,...r]=e.split(":"),i=r.join(":").trim().replace(/^'+|'+$/g,""),o=t.trim();n[o]||(n[o]=i),"false"===i&&(n[o]=!1),"true"===i&&(n[o]=!0),isNaN(i)||(n[o]=parseInt(i,10))}})}return{formatName:t,formatOptions:n}})(t);if(this.formats[i]){let t=e;try{const s=r?.formatParams?.[r.interpolationkey]||{},a=s.locale||s.lng||r.locale||r.lng||n;t=this.formats[i](e,a,{...o,...r,...s})}catch(e){this.logger.warn(e)}return t}return this.logger.warn(`there was no format function for ${i}`),e},e)}}class $ extends S{constructor(e,t,n,r={}){super(),this.backend=e,this.store=t,this.services=n,this.languageUtils=n.languageUtils,this.options=r,this.logger=k.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=r.maxParallelReads||10,this.readingCalls=0,this.maxRetries=r.maxRetries>=0?r.maxRetries:5,this.retryTimeout=r.retryTimeout>=1?r.retryTimeout:350,this.state={},this.queue=[],this.backend?.init?.(n,r.backend,r)}queueLoad(e,t,n,r){const i={},o={},s={},a={};return e.forEach(e=>{let r=!0;t.forEach(t=>{const s=`${e}|${t}`;!n.reload&&this.store.hasResourceBundle(e,t)?this.state[s]=2:this.state[s]<0||(1===this.state[s]?void 0===o[s]&&(o[s]=!0):(this.state[s]=1,r=!1,void 0===o[s]&&(o[s]=!0),void 0===i[s]&&(i[s]=!0),void 0===a[t]&&(a[t]=!0)))}),r||(s[e]=!0)}),(Object.keys(i).length||Object.keys(o).length)&&this.queue.push({pending:o,pendingCount:Object.keys(o).length,loaded:{},errors:[],callback:r}),{toLoad:Object.keys(i),pending:Object.keys(o),toLoadLanguages:Object.keys(s),toLoadNamespaces:Object.keys(a)}}loaded(e,t,n){const r=e.split("|"),i=r[0],o=r[1];t&&this.emit("failedLoading",i,o,t),!t&&n&&this.store.addResourceBundle(i,o,n,void 0,void 0,{skipCopy:!0}),this.state[e]=t?-1:2,t&&n&&(this.state[e]=0);const s={};this.queue.forEach(n=>{((e,t,n)=>{const{obj:r,k:i}=l(e,t,Object);r[i]=r[i]||[],r[i].push(n)})(n.loaded,[i],o),((e,t)=>{void 0!==e.pending[t]&&(delete e.pending[t],e.pendingCount--)})(n,e),t&&n.errors.push(t),0!==n.pendingCount||n.done||(Object.keys(n.loaded).forEach(e=>{s[e]||(s[e]={});const t=n.loaded[e];t.length&&t.forEach(t=>{void 0===s[e][t]&&(s[e][t]=!0)})}),n.done=!0,n.errors.length?n.callback(n.errors):n.callback())}),this.emit("loaded",s),this.queue=this.queue.filter(e=>!e.done)}read(e,t,n,r=0,i=this.retryTimeout,o){if(!e.length)return o(null,{});if(this.readingCalls>=this.maxParallelReads)return void this.waitingReads.push({lng:e,ns:t,fcName:n,tried:r,wait:i,callback:o});this.readingCalls++;const s=(s,a)=>{if(this.readingCalls--,this.waitingReads.length>0){const e=this.waitingReads.shift();this.read(e.lng,e.ns,e.fcName,e.tried,e.wait,e.callback)}s&&a&&r{this.read.call(this,e,t,n,r+1,2*i,o)},i):o(s,a)},a=this.backend[n].bind(this.backend);if(2!==a.length)return a(e,t,s);try{const n=a(e,t);n&&"function"==typeof n.then?n.then(e=>s(null,e)).catch(s):s(null,n)}catch(e){s(e)}}prepareLoading(e,t,n={},i){if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),i&&i();r(e)&&(e=this.languageUtils.toResolveHierarchy(e)),r(t)&&(t=[t]);const o=this.queueLoad(e,t,n,i);if(!o.toLoad.length)return o.pending.length||i(),null;o.toLoad.forEach(e=>{this.loadOne(e)})}load(e,t,n){this.prepareLoading(e,t,{},n)}reload(e,t,n){this.prepareLoading(e,t,{reload:!0},n)}loadOne(e,t=""){const n=e.split("|"),r=n[0],i=n[1];this.read(r,i,"read",void 0,void 0,(n,o)=>{n&&this.logger.warn(`${t}loading namespace ${i} for language ${r} failed`,n),!n&&o&&this.logger.log(`${t}loaded namespace ${i} for language ${r}`,o),this.loaded(e,n,o)})}saveMissing(e,t,n,r,i,o={},s=()=>{}){if(!this.services?.utils?.hasLoadedNamespace||this.services?.utils?.hasLoadedNamespace(t)){if(null!=n&&""!==n){if(this.backend?.create){const a={...o,isUpdate:i},c=this.backend.create.bind(this.backend);if(c.length<6)try{let i;i=5===c.length?c(e,t,n,r,a):c(e,t,n,r),i&&"function"==typeof i.then?i.then(e=>s(null,e)).catch(s):s(null,i)}catch(e){s(e)}else c(e,t,n,r,s,a)}e&&e[0]&&this.store.addResource(e[0],t,n,r)}}else this.logger.warn(`did not save key "${n}" as the namespace "${t}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")}}const z=()=>({debug:!1,initAsync:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:e=>{let t={};if("object"==typeof e[1]&&(t=e[1]),r(e[1])&&(t.defaultValue=e[1]),r(e[2])&&(t.tDescription=e[2]),"object"==typeof e[2]||"object"==typeof e[3]){const n=e[3]||e[2];Object.keys(n).forEach(e=>{t[e]=n[e]})}return t},interpolation:{escapeValue:!0,format:e=>e,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0},cacheInBuiltFormats:!0}),q=e=>(r(e.ns)&&(e.ns=[e.ns]),r(e.fallbackLng)&&(e.fallbackLng=[e.fallbackLng]),r(e.fallbackNS)&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs?.indexOf?.("cimode")<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),"boolean"==typeof e.initImmediate&&(e.initAsync=e.initImmediate),e),V=()=>{};class W extends S{constructor(e={},t){var n;if(super(),this.options=q(e),this.services={},this.logger=k,this.modules={external:[]},n=this,Object.getOwnPropertyNames(Object.getPrototypeOf(n)).forEach(e=>{"function"==typeof n[e]&&(n[e]=n[e].bind(n))}),t&&!this.isInitialized&&!e.isClone){if(!this.options.initAsync)return this.init(e,t),this;setTimeout(()=>{this.init(e,t)},0)}}init(e={},t){this.isInitializing=!0,"function"==typeof e&&(t=e,e={}),null==e.defaultNS&&e.ns&&(r(e.ns)?e.defaultNS=e.ns:e.ns.indexOf("translation")<0&&(e.defaultNS=e.ns[0]));const n=z();this.options={...n,...this.options,...q(e)},this.options.interpolation={...n.interpolation,...this.options.interpolation},void 0!==e.keySeparator&&(this.options.userDefinedKeySeparator=e.keySeparator),void 0!==e.nsSeparator&&(this.options.userDefinedNsSeparator=e.nsSeparator);const o=e=>e?"function"==typeof e?new e:e:null;if(!this.options.isClone){let e;this.modules.logger?k.init(o(this.modules.logger),this.options):k.init(null,this.options),e=this.modules.formatter?this.modules.formatter:B;const t=new R(this.options);this.store=new x(this.options.resources,this.options);const r=this.services;r.logger=k,r.resourceStore=this.store,r.languageUtils=t,r.pluralResolver=new P(t,{prepend:this.options.pluralSeparator,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),this.options.interpolation.format&&this.options.interpolation.format!==n.interpolation.format&&this.logger.deprecate("init: you are still using the legacy format function, please use the new approach: https://www.i18next.com/translation-function/formatting"),!e||this.options.interpolation.format&&this.options.interpolation.format!==n.interpolation.format||(r.formatter=o(e),r.formatter.init&&r.formatter.init(r,this.options),this.options.interpolation.format=r.formatter.format.bind(r.formatter)),r.interpolator=new F(this.options),r.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},r.backendConnector=new $(o(this.modules.backend),r.resourceStore,r,this.options),r.backendConnector.on("*",(e,...t)=>{this.emit(e,...t)}),this.modules.languageDetector&&(r.languageDetector=o(this.modules.languageDetector),r.languageDetector.init&&r.languageDetector.init(r,this.options.detection,this.options)),this.modules.i18nFormat&&(r.i18nFormat=o(this.modules.i18nFormat),r.i18nFormat.init&&r.i18nFormat.init(this)),this.translator=new A(this.services,this.options),this.translator.on("*",(e,...t)=>{this.emit(e,...t)}),this.modules.external.forEach(e=>{e.init&&e.init(this)})}if(this.format=this.options.interpolation.format,t||(t=V),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const e=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);e.length>0&&"dev"!==e[0]&&(this.options.lng=e[0])}this.services.languageDetector||this.options.lng||this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(e=>{this[e]=(...t)=>this.store[e](...t)}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(e=>{this[e]=(...t)=>(this.store[e](...t),this)});const s=i(),a=()=>{const e=(e,n)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),s.resolve(n),t(e,n)};if(this.languages&&!this.isInitialized)return e(null,this.t.bind(this));this.changeLanguage(this.options.lng,e)};return this.options.resources||!this.options.initAsync?a():setTimeout(a,0),s}loadResources(e,t=V){let n=t;const i=r(e)?e:this.language;if("function"==typeof e&&(n=e),!this.options.resources||this.options.partialBundledLanguages){if("cimode"===i?.toLowerCase()&&(!this.options.preload||0===this.options.preload.length))return n();const e=[],t=t=>{t&&"cimode"!==t&&this.services.languageUtils.toResolveHierarchy(t).forEach(t=>{"cimode"!==t&&e.indexOf(t)<0&&e.push(t)})};i?t(i):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(e=>t(e)),this.options.preload?.forEach?.(e=>t(e)),this.services.backendConnector.load(e,this.options.ns,e=>{e||this.resolvedLanguage||!this.language||this.setResolvedLanguage(this.language),n(e)})}else n(null)}reloadResources(e,t,n){const r=i();return"function"==typeof e&&(n=e,e=void 0),"function"==typeof t&&(n=t,t=void 0),e||(e=this.languages),t||(t=this.options.ns),n||(n=V),this.services.backendConnector.reload(e,t,e=>{r.resolve(),n(e)}),r}use(e){if(!e)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!e.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return"backend"===e.type&&(this.modules.backend=e),("logger"===e.type||e.log&&e.warn&&e.error)&&(this.modules.logger=e),"languageDetector"===e.type&&(this.modules.languageDetector=e),"i18nFormat"===e.type&&(this.modules.i18nFormat=e),"postProcessor"===e.type&&C.addPostProcessor(e),"formatter"===e.type&&(this.modules.formatter=e),"3rdParty"===e.type&&this.modules.external.push(e),this}setResolvedLanguage(e){if(e&&this.languages&&!(["cimode","dev"].indexOf(e)>-1)){for(let e=0;e-1)&&this.store.hasLanguageSomeTranslations(t)){this.resolvedLanguage=t;break}}!this.resolvedLanguage&&this.languages.indexOf(e)<0&&this.store.hasLanguageSomeTranslations(e)&&(this.resolvedLanguage=e,this.languages.unshift(e))}}changeLanguage(e,t){this.isLanguageChangingTo=e;const n=i();this.emit("languageChanging",e);const o=e=>{this.language=e,this.languages=this.services.languageUtils.toResolveHierarchy(e),this.resolvedLanguage=void 0,this.setResolvedLanguage(e)},s=(r,i)=>{i?this.isLanguageChangingTo===e&&(o(i),this.translator.changeLanguage(i),this.isLanguageChangingTo=void 0,this.emit("languageChanged",i),this.logger.log("languageChanged",i)):this.isLanguageChangingTo=void 0,n.resolve((...e)=>this.t(...e)),t&&t(r,(...e)=>this.t(...e))},a=t=>{e||t||!this.services.languageDetector||(t=[]);const n=r(t)?t:t&&t[0],i=this.store.hasLanguageSomeTranslations(n)?n:this.services.languageUtils.getBestMatchFromCodes(r(t)?[t]:t);i&&(this.language||o(i),this.translator.language||this.translator.changeLanguage(i),this.services.languageDetector?.cacheUserLanguage?.(i)),this.loadResources(i,e=>{s(e,i)})};return e||!this.services.languageDetector||this.services.languageDetector.async?!e&&this.services.languageDetector&&this.services.languageDetector.async?0===this.services.languageDetector.detect.length?this.services.languageDetector.detect().then(a):this.services.languageDetector.detect(a):a(e):a(this.services.languageDetector.detect()),n}getFixedT(e,t,n){const i=(e,t,...r)=>{let o;o="object"!=typeof t?this.options.overloadTranslationOptionHandler([e,t].concat(r)):{...t},o.lng=o.lng||i.lng,o.lngs=o.lngs||i.lngs,o.ns=o.ns||i.ns,""!==o.keyPrefix&&(o.keyPrefix=o.keyPrefix||n||i.keyPrefix);const s=this.options.keySeparator||".";let a;return o.keyPrefix&&Array.isArray(e)?a=e.map(e=>("function"==typeof e&&(e=I(e,{...this.options,...t})),`${o.keyPrefix}${s}${e}`)):("function"==typeof e&&(e=I(e,{...this.options,...t})),a=o.keyPrefix?`${o.keyPrefix}${s}${e}`:e),this.t(a,o)};return r(e)?i.lng=e:i.lngs=e,i.ns=t,i.keyPrefix=n,i}t(...e){return this.translator?.translate(...e)}exists(...e){return this.translator?.exists(...e)}setDefaultNamespace(e){this.options.defaultNS=e}hasLoadedNamespace(e,t={}){if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const n=t.lng||this.resolvedLanguage||this.languages[0],r=!!this.options&&this.options.fallbackLng,i=this.languages[this.languages.length-1];if("cimode"===n.toLowerCase())return!0;const o=(e,t)=>{const n=this.services.backendConnector.state[`${e}|${t}`];return-1===n||0===n||2===n};if(t.precheck){const e=t.precheck(this,o);if(void 0!==e)return e}return!(!this.hasResourceBundle(n,e)&&this.services.backendConnector.backend&&(!this.options.resources||this.options.partialBundledLanguages)&&(!o(n,e)||r&&!o(i,e)))}loadNamespaces(e,t){const n=i();return this.options.ns?(r(e)&&(e=[e]),e.forEach(e=>{this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}),this.loadResources(e=>{n.resolve(),t&&t(e)}),n):(t&&t(),Promise.resolve())}loadLanguages(e,t){const n=i();r(e)&&(e=[e]);const o=this.options.preload||[],s=e.filter(e=>o.indexOf(e)<0&&this.services.languageUtils.isSupportedCode(e));return s.length?(this.options.preload=o.concat(s),this.loadResources(e=>{n.resolve(),t&&t(e)}),n):(t&&t(),Promise.resolve())}dir(e){if(e||(e=this.resolvedLanguage||(this.languages?.length>0?this.languages[0]:this.language)),!e)return"rtl";try{const t=new Intl.Locale(e);if(t&&t.getTextInfo){const e=t.getTextInfo();if(e&&e.direction)return e.direction}}catch(e){}const t=this.services?.languageUtils||new R(z());return e.toLowerCase().indexOf("-latn")>1?"ltr":["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"].indexOf(t.getLanguagePartFromCode(e))>-1||e.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(e={},t){return new W(e,t)}cloneInstance(e={},t=V){const n=e.forkResourceStore;n&&delete e.forkResourceStore;const r={...this.options,...e,isClone:!0},i=new W(r);if(void 0===e.debug&&void 0===e.prefix||(i.logger=i.logger.clone(e)),["store","services","language"].forEach(e=>{i[e]=this[e]}),i.services={...this.services},i.services.utils={hasLoadedNamespace:i.hasLoadedNamespace.bind(i)},n){const e=Object.keys(this.store.data).reduce((e,t)=>(e[t]={...this.store.data[t]},e[t]=Object.keys(e[t]).reduce((n,r)=>(n[r]={...e[t][r]},n),e[t]),e),{});i.store=new x(e,r),i.services.resourceStore=i.store}return i.translator=new A(i.services,r),i.translator.on("*",(e,...t)=>{i.emit(e,...t)}),i.init(r,t),i.translator.options=r,i.translator.backendConnector.services.utils={hasLoadedNamespace:i.hasLoadedNamespace.bind(i)},i}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const H=W.createInstance();H.createInstance=W.createInstance;const G=H.createInstance,K=H.dir,J=H.init,Y=H.loadResources,Z=H.reloadResources,X=H.use,Q=H.changeLanguage,ee=H.getFixedT,te=H.t,ne=H.exists,re=H.setDefaultNamespace,ie=H.hasLoadedNamespace,oe=H.loadNamespaces,se=H.loadLanguages},2648:(e,t,n)=>{"use strict";n(1609),n(8437),n(9454)},2875:(e,t,n)=>{"use strict";n.d(t,{x:()=>s});const r=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,i={"&":"&","&":"&","<":"<","<":"<",">":">",">":">","'":"'","'":"'",""":'"',""":'"'," ":" "," ":" ","©":"©","©":"©","®":"®","®":"®","…":"…","…":"…","/":"/","/":"/"},o=e=>i[e],s=e=>e.replace(r,o)},3220:(e,t,n)=>{"use strict";n.d(t,{J:()=>i,v:()=>r});const r=(e,t=!1)=>{let n=e.redirectUrl;const r="seo-by-rank-math"===e.slug||"seo-by-rank-math-pro"===e.slug,i=e.onboardingUrl&&"string"==typeof e.onboardingUrl&&""!==e.onboardingUrl.trim();if(r){const t=window.marketplaceConfig?.wpConfig;(!t||!0!==t.rankMathRegistrationSkip)&&i&&(n=e.onboardingUrl)}else t&&i&&(n=e.onboardingUrl);return n},i=e=>{if(e&&""!==e.trim()){const t=void 0!==window.marketplaceConfig&&window.marketplaceConfig?.wpConfig?.adminUrl;if(t){let n=e;n.startsWith("wp-admin/")&&(n=n.substring(9));const r=`${t}${n}`;window.location.href=r}else{const t=`${window.location.origin}/${e}`;window.location.href=t}return}window.location.href="/wp-admin/plugins.php"}},3227:(e,t,n)=>{"use strict";n(1609),n(7674),n(1352),n(9454)},3273:(e,t,n)=>{"use strict";n(1609),n(1352)},3331:(e,t,n)=>{"use strict";n.d(t,{R5:()=>a,hw:()=>i,j6:()=>s,lQ:()=>c,lb:()=>o});var r=n(1609);const i=(e,t,n)=>e?e.replace(t,n||""):"",o=(e,t,n)=>e.replace(/%([^%]+)%/g,(e,r)=>`${t}${r}${n}`),s=({htmlString:e})=>(0,r.createElement)("span",{dangerouslySetInnerHTML:{__html:e}}),a=e=>`${window.marketplaceConfig?.wpConfig?.ajaxActionPrefix||"marketplace"}_${e}`,c=e=>e?.length?e.reduce((e,t)=>new Date(t.expiresAt)>new Date(e.expiresAt)?t:e):null},3461:e=>{"use strict";e.exports=JSON.parse('{"ui.button.refreshPage":"Päivitä sivu","ui.notifications.couldNotLoad":"Sivua ei voitu ladata","ui.notifications.refreshPage":"Päivitä sivu ja ota yhteyttä asiakaspalveluumme, jos ongelma jatkuu."}')},3526:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=n(1609),i=n(7979);function o(){const{loadingAction:e,loadingPlugin:t,assetsBaseUrl:n}=(0,i.D)();if(!e)return null;const o=`${n||void 0!==window.marketplaceConfig&&window.marketplaceConfig?.assetsBaseUrl||""}assets/images/spinner.svg`;return(0,r.createElement)("div",{className:"loading-overlay show"},(0,r.createElement)("div",{className:"gv-loader-container gv-pos-center gv-pos-absolute"},(0,r.createElement)("gv-loader",{src:o}),(0,r.createElement)("p",null,e)))}},3591:e=>{"use strict";e.exports=JSON.parse('{"ui.button.refreshPage":"Actualizar página","ui.notifications.couldNotLoad":"No se puede cargar la página","ui.notifications.refreshPage":"Actualice la página y póngase en contacto con nuestro servicio de asistencia si el problema persiste."}')},3699:(e,t,n)=>{"use strict";n.d(t,{A:()=>y});var r=n(1609),i=n(7979),o=n(488),s=n(4598),a=n(9962),c=n(4677),l=n(4800),u=(n(6530),n(1755)),p=n(5694),d=n(1174),h=n(7008),f=n(3220),g=n(3331),m=n(6818),v=n(8299);function y(){const{apiBaseUrl:e,assetsBaseUrl:t,pluginInAction:n,setPluginInAction:y,subscriptionStatus:b,fetchSubscriptionStatus:_,isOnecomBrand:w,plugins:k,setPlugins:S,uiI18n:x,setUiI18n:C,handlePluginAction:E,handleCancelSubsAction:I,subscriptionsList:N,setSubscriptionsList:O,fetchPartnerSubscriptions:A,catalogError:R,setCatalogError:M,catalogLoading:T,maintenanceState:P,setMaintenanceState:L,setCatalogLoading:D,currentPluginSlug:F,shouldShowProvision:U,isSpecialPlugin:j,shouldShowPlugin:B,isWpVersionSupported:$,openDeleteModal:z,openCancelSubsModal:q,wpConfig:V,setErrorState:W,pendingProcurements:H,setPendingProcurements:G,setLoadingAction:K,setLoadingPlugin:J}=(0,i.D)(),[Y,Z]=(0,r.useState)(null),[X,Q]=(0,r.useState)(null),ee=(0,r.useRef)(null),[te,ne]=(0,r.useState)(!1),[re,ie]=(0,r.useState)(()=>{const e="undefined"!=typeof window&&window.marketplaceConfig?.pendingCancellations||{};return Object.fromEntries(Object.keys(e).map(e=>[e,!0]))}),oe=(0,r.useRef)({}),se=(0,r.useRef)(!1),ae=(0,r.useRef)(!1),ce=((0,r.useRef)(null),(0,r.useRef)(null)),le=(0,r.useRef)(null),ue=(0,r.useRef)(!1),pe=t||void 0!==window.marketplaceConfig&&window.marketplaceConfig?.assetsBaseUrl||"",de=pe?`${pe}assets/icons/`:"",he=e=>`${"undefined"!=typeof window&&window.marketplaceConfig?.wpConfig?.adminUrl?window.marketplaceConfig.wpConfig.adminUrl:"/wp-admin/"}admin.php?page=${"undefined"!=typeof window&&window.marketplaceConfig?.menuSlug?window.marketplaceConfig.menuSlug:"onecom-marketplace"}&plugin=${e}`,fe=(e,t)=>{const n=V?.ajaxUrl;if(!n||!t)return;oe.current[e]&&oe.current[e]();const r=()=>{fetch(n,{method:"POST",body:new URLSearchParams({action:(0,g.R5)("clear_pending_cancellation"),nonce:V.nonce,slug:e})}),ie(t=>{const n={...t};return delete n[e],n})};oe.current[e]=(0,m.g)({ajaxUrl:n,nonce:V.nonce,action:(0,g.R5)("track_status"),params:{subscriptionId:t,resourceType:"cancellation"},interval:1e4,onResult:n=>{const i=n?.data?.data,o=i?.status;if("canceled"===o){const n=ge?.find(t=>t.slug===e)||{slug:e};return(0,h.sx)("Subscription cancelled",{product_slug:n.slug||"",product_name:n.name||"",item_name:n.slug||"",subscription_id:t,timestamp:Date.now()}),r(),A(),!0}return"pending"!==o&&"pending_cancellation"!==o&&(r(),W({visible:!0,type:"cancel_subscription",pluginSlug:e,message:n?.error||n?.data?.message||n?.data?.error||null}),!0)},onError:t=>{console.error("[Marketplace] Cancel polling error",t),r(),W({visible:!0,type:"cancel_subscription",pluginSlug:e,message:t.message||null})}})};(0,r.useEffect)(()=>{const e="undefined"!=typeof window&&window.marketplaceConfig?.pendingCancellations||{};Object.entries(e).forEach(([e,t])=>{t?.subscriptionId&&fe(e,t.subscriptionId)});const t=oe.current;return()=>{Object.values(t).forEach(e=>e())}},[]),(0,r.useEffect)(()=>{A()},[A]);const ge=(0,r.useMemo)(()=>{if(!k?.length)return[];const e=(N||[]).reduce((e,t)=>(e[t.productId]||(e[t.productId]=[]),e[t.productId].push(t),e),{});return k.map(t=>({...t,subscriptions:e[t.productId]||[],hasSubscription:!!e[t.productId]?.length}))},[k,N]),me=(0,r.useMemo)(()=>{if(!ge?.length)return[];const e=!0===ge.find(e=>"seo-by-rank-math"===e.slug)?.activated,t=!0===ge.find(e=>"seo-by-rank-math-pro"===e.slug)?.activated;return ge.filter(n=>!!B(n)&&(!0===n.featured||"true"===n.featured)&&!0!==n.activated&&("seo-by-rank-math"===n.slug?!e&&!t:"seo-by-rank-math-pro"!==n.slug||e)).sort((e,t)=>(void 0!==e.featuredOrder?parseInt(e.featuredOrder):1/0)-(void 0!==t.featuredOrder?parseInt(t.featuredOrder):1/0)).slice(0,3)},[ge,B]),ve=(0,r.useCallback)(()=>{D(!0),M(null),L({isOn:!1,message:"",buttonLabel:""}),fetch(e).then(e=>{if(!e.ok)throw new Error(`HTTP error! status: ${e.status}`);return ce.current=Date.now(),e.json()}).then(e=>{if((e.is_cached||e.cached)&&(ue.current=!0),!0!==e?.data?.maintenanceMode){if(!(e.success&&e.data&&e.data.catalog))throw(0,h.oe)({category:"addons_page",itemName:"Addons Page",isContentRendered:!1}),new Error("Invalid API response structure");{const t=e.data.catalog;S(t);const n=e.data.uiI18n||e.data.ui_i18n;n&&C(n),w&&t.filter(e=>j(e.slug)).forEach(e=>{_(e.slug)})}}else L({isOn:!0,message:e?.data?.message||"",buttonLabel:e?.data?.buttonLabel||""})}).catch(e=>{console.error("Failed to fetch plugins:",e),(0,h.oe)({category:"addons_page",itemName:"Addons Page",isContentRendered:!1}),M(e.message||x?.notifications?.catalogLoadFailed||"Failed to load plugins")}).finally(()=>{D(!1)})},[e,S,C,M,D,L,w,j,_]);if((0,r.useEffect)(()=>{se.current||(se.current=!0,ve())},[ve]),(0,r.useEffect)(()=>{if(F&&k.length){const e=k.find(e=>e.slug===F);e&&Z(e)}else F||Z(null)},[F,k]),(0,r.useEffect)(()=>{const e=e=>{ee.current&&!ee.current.contains(e.target)&&Q(null)};return null!==X?document.addEventListener("mousedown",e):document.removeEventListener("mousedown",e),()=>{document.removeEventListener("mousedown",e)}},[X]),(0,r.useEffect)(()=>{T||R||!(k.length>0)||F||ae.current||(le.current=Date.now(),"true"===sessionStorage.getItem("mp_skip_page_view")?sessionStorage.removeItem("mp_skip_page_view"):(0,h.oe)({category:"addons_page",itemName:"Addons Page",contentReceivedAt:ce.current,contentRenderedAt:le.current,isCached:ue.current}),ae.current=!0)},[T,R,k.length,F]),T)return(0,r.createElement)("div",{className:"marketplace-container gv-flex gv-flex-col gv-flex-wrap"},(0,r.createElement)("div",{className:"gv-skeleton gv-heading-lg gv-mb-sm",style:{width:"13%"}}),(0,r.createElement)("div",{className:"gv-skeleton gv-text-sm gv-mb-fluid",style:{width:"33%"}}),(0,r.createElement)("div",{className:"gv-flex gv-justify-between gv-items-start"},(0,r.createElement)("div",{className:"gv-w-full"},(0,r.createElement)("div",{className:"gv-skeleton gv-heading-sm gv-mb-sm",style:{width:"13%"}}),(0,r.createElement)("div",{className:"gv-skeleton gv-text-sm gv-mb-md",style:{width:"33%"}})),(0,r.createElement)("div",{className:"gv-skeleton gv-text-sm gv-mb-md",style:{width:"13%"}})),(0,r.createElement)("div",{className:"product-grid gv-grid gv-gap-lg gv-mob-grid-cols-1 gv-tab-grid-cols-2 gv-desk-lg-grid-cols-3 gv-skeleton-loader"},[0,1,2].map(e=>(0,r.createElement)("div",{key:e,className:"gv-card gv-gap-md gv-content-container gv-p-lg gv-grid gv-grid-cols-12 gv-radius"},(0,r.createElement)("div",{className:"gv-desk-span-2 gv-span-3 gv-tab-span-3"},(0,r.createElement)("div",{className:"gv-skeleton gv-icon-tile"})),(0,r.createElement)("div",{className:"gv-desk-span-8 gv-tab-span-7 gv-span-7"},(0,r.createElement)("div",{className:"gv-skeleton gv-mb-xs",style:{height:"20px",width:"70%"}}),(0,r.createElement)("div",{className:"gv-skeleton gv-mb-sm",style:{height:"16px",width:"100%"}}),(0,r.createElement)("div",{className:"gv-skeleton",style:{height:"16px",width:"40%"}})),(0,r.createElement)("div",{className:"gv-span-2 gv-content-center gv-text-right"},(0,r.createElement)("div",{className:"gv-skeleton",style:{height:"24px",width:"24px"}}))))),(0,r.createElement)("div",{className:"gv-data-table gv-mt-lg gv-overflow-x-auto gv-skeleton-loader"},(0,r.createElement)("table",{className:"gv-col-5-shrink gv-col-6-shrink"},(0,r.createElement)("thead",null,(0,r.createElement)("tr",null,(0,r.createElement)("th",{scope:"col"}),(0,r.createElement)("th",{scope:"col"},(0,r.createElement)("div",{className:"gv-skeleton",style:{height:"16px",width:"50px"}})),(0,r.createElement)("th",{scope:"col"},(0,r.createElement)("div",{className:"gv-skeleton",style:{height:"16px",width:"50px"}})),(0,r.createElement)("th",{scope:"col"},(0,r.createElement)("div",{className:"gv-skeleton",style:{height:"16px",width:"50px"}})),(0,r.createElement)("th",{scope:"col"}))),(0,r.createElement)("tbody",null,[0,1].map(e=>(0,r.createElement)("tr",{key:e},(0,r.createElement)("td",{style:{width:"80px"}},(0,r.createElement)("div",{className:"gv-skeleton gv-icon-tile"})),(0,r.createElement)("td",null,(0,r.createElement)("div",{className:"gv-skeleton gv-text-sm"})),(0,r.createElement)("td",null,(0,r.createElement)("div",{className:"gv-skeleton gv-text-sm"})),(0,r.createElement)("td",null,(0,r.createElement)("div",{className:"gv-skeleton gv-text-sm"})),(0,r.createElement)("td",null,(0,r.createElement)("div",{className:"gv-skeleton gv-text-sm",style:{width:"24px"}}))))))));if(P.isOn)return(0,r.createElement)(p.A,{message:P.message,buttonLabel:P.buttonLabel,onRetry:ve});if(R)return(0,r.createElement)(u.A,null);if(!$("6.2"))return(0,r.createElement)(d.A,null);const ye="undefined"!=typeof window&&window.marketplaceConfig?.brand,be=["seo-by-rank-math","seo-by-rank-math-pro"],_e=ge.filter(e=>("rankmath"!==ye||!be.includes(e.slug))&&(e.installed||U(e)||(e=>e.hasSubscription&&e.subscriptions.some(e=>"active"===e.status||"canceled"===e.status&&e.expiresAt&&new Date(e.expiresAt)>new Date))(e)||!!H?.[e.slug]));return(0,r.createElement)("div",{className:"marketplace-container gv-flex gv-flex-col"},(0,r.createElement)("div",{className:"addons-header-wrap"},(0,r.createElement)("h3",null,x?.headings?.myProducts),(0,r.createElement)("p",{className:"gv-text-sm"},x?.text?.myProducts)),me.length>0&&(0,r.createElement)("section",{className:"addons-section gv-mt-fluid"},(0,r.createElement)("div",{className:"addons-header-container gv-flex gv-max-mob-flex-col gv-justify-between gv-items-start gv-tab-gap-lg"},(0,r.createElement)("div",{className:"heading-container gv-flex-1"},(0,r.createElement)("p",{className:"gv-text-bold gv-text-lg gv-mb-xs"},x?.headings?.recommendedProducts),(0,r.createElement)("p",{className:"gv-text-sm gv-mb-md"},x?.text?.recommendedText)),(0,r.createElement)("div",{className:"gv-flex gv-gap-sm gv-flex-shrink-0"},(0,r.createElement)("button",{className:"gv-button gv-button-primary gv-mode-condensed",onClick:()=>{const e="undefined"!=typeof window&&window.marketplaceConfig?.wpConfig?.adminUrl?window.marketplaceConfig.wpConfig.adminUrl:"/wp-admin/",t="undefined"!=typeof window&&window.marketplaceConfig?.menuSlug?window.marketplaceConfig.menuSlug:"onecom-marketplace";window.location.href=`${e}admin.php?page=${t}`}},x.seeAllProducts,(0,r.createElement)("gv-icon",{"aria-hidden":"true",src:`${de}arrow_right.svg`,alt:"See all products"})))),(0,r.createElement)("div",{className:"product-grid gv-grid gv-gap-lg gv-mob-grid-cols-1 gv-tab-grid-cols-2 gv-desk-lg-grid-cols-3 gv-mt-md"},me.map(e=>{U(e);const t=e.i18n.freeTrialPeriod&&""!==e.i18n.freeTrialPeriod.trim()?e.i18n.freeTrialPeriod:x?.labels?.free||"Free",n=(0,o.M)(e,t,x),i=(0,o.Tc)(e),s=(0,o.Dn)(e);return(0,r.createElement)("div",{key:e.slug,className:"gv-card gv-gap-sm gv-content-container gv-p-lg gv-grid gv-grid-cols-12 gv-radius ocmp-plugin-cards",onClick:()=>{window.location.href=he(e.slug)}},(0,r.createElement)("div",{className:"gv-desk-span-2 gv-span-2 gv-tab-span-2"},(0,r.createElement)("img",{className:"gv-icon-tile",src:e.iconUrl||`${de}add_box.svg`,alt:e.name})),(0,r.createElement)("div",{className:"gv-desk-span-9 gv-tab-span-9 gv-span-9 gv-ml-sm"},(0,r.createElement)("div",{className:"gv-flex gv-flex-col gv-justify-between gv-h-full"},(0,r.createElement)("p",{className:"gv-text-sm gv-text-bold gv-mb-xs"},e.name),(0,r.createElement)("p",{className:"oc-card-content gv-text-on-alternative gv-mb-sm gv-text-sm gv-flex-1"},e.i18n.listingDescription||e.i18n.subtitle),(0,r.createElement)("span",{className:"gv-caption-lg gv-text-bold"},(0,r.createElement)(r.Fragment,null,"premium"===e.licenseType&&s>0?null!==s?s:i:n,"free"!==e.licenseType&&n&&n!==t&&n!==(x?.labels?.freeUntilRenewal||"Free until renewal")&&(0,r.createElement)("span",{className:"gv-period"},"/",x?.labels?.timeMonth))))),(0,r.createElement)("div",{className:"gv-span-1 gv-content-center gv-text-right"},(0,r.createElement)("div",{className:"gv-reset-button",style:{display:"inline-block"},"aria-label":`View details for ${e.name}`},(0,r.createElement)("img",{className:"gv-tile",src:`${de}arrow_forward.svg`,alt:`View ${e.name} details`,style:{minWidth:"24px"}}))))}))),_e.length>0&&(0,r.createElement)("section",{className:"addons-section gv-mt-fluid"},!w&&(0,r.createElement)("div",{className:"gv-flex gv-justify-end gv-mt-0"},(0,r.createElement)("button",{className:"gv-button gv-button-secondary gv-mode-condensed",disabled:te,onClick:async()=>{const e=V?.ajaxUrl;if(e){ne(!0),K(x?.notifications?.refreshing||"Refreshing subscriptions..."),J("");try{await fetch(e,{method:"POST",body:new URLSearchParams({action:(0,g.R5)("clear_subscription_list"),nonce:V.nonce})});const t=await fetch(e,{method:"POST",body:new URLSearchParams({action:(0,g.R5)("get_pending_procurements"),nonce:V.nonce})}),n=await t.json();n.success&&G(n.data||{}),await A(),ve()}catch(e){console.error("[Marketplace] Refresh subscriptions error",e)}finally{ne(!1),K(""),J("")}}}},(0,r.createElement)("gv-icon",{"aria-hidden":"true",src:`${de}refresh.svg`}),(0,r.createElement)("span",null,te?x?.labels?.refreshing||"Refreshing...":x?.labels?.refresh||"Refresh"))),(0,r.createElement)("div",{className:"gv-data-table gv-mt-lg gv-addons-table"},(0,r.createElement)("table",{className:"gv-col-5-shrink gv-col-6-shrink"},(0,r.createElement)("thead",null,(0,r.createElement)("tr",null,(0,r.createElement)("th",{scope:"col"}),(0,r.createElement)("th",{scope:"col"},x?.labels?.name),(0,r.createElement)("th",{scope:"col"},x?.labels?.type||"Type"),(0,r.createElement)("th",{scope:"col"},x?.labels?.subscriptions||"Subscription"),(0,r.createElement)("th",{scope:"col"},x?.labels?.status),(0,r.createElement)("th",{scope:"col"}),(0,r.createElement)("th",{scope:"col"}))),(0,r.createElement)("tbody",null,_e.map((e,t)=>{const n=U(e),i=e.hasSubscription?(0,g.lQ)(e.subscriptions):null,o=null!==i?(0,v.Y)(i.expiresAt):"-",s=(null!==i&&null!=i.renewsAt&&(0,v.Y)(i.renewsAt),"canceled"===i?.status&&i?.expiresAt&&new Date(i.expiresAt)>new Date);return(0,r.createElement)("tr",{id:e.slug,key:e.slug},(0,r.createElement)("td",{style:{width:"80px"}},(0,r.createElement)("img",{src:e.iconUrl||`${de}add_box.svg`,alt:e.name,className:"gv-icon-tile",style:{maxWidth:"auto"}})),(0,r.createElement)("td",null,(0,r.createElement)("p",{className:"gv-text-bold"},(0,r.createElement)("a",{href:he(e.slug),className:"gv-text-on-default"},e.name))),(0,r.createElement)("td",null,"free"===e.licenseType?(0,r.createElement)("div",{className:"gv-badge gv-badge-generic"},x?.labels?.freeLabel||"Free"):(0,r.createElement)("div",{className:"gv-badge gv-badge-info"},x?.labels?.premiumLabel||"Premium")),(0,r.createElement)("td",null,!H?.[e.slug]&&"pending"!==i?.status&&o&&"-"!==o?(0,r.createElement)(r.Fragment,null,"expired"===i?.status?(0,r.createElement)("div",{className:"gv-underline"},(0,r.createElement)("p",{style:{color:"red"}},x?.labels?.subscriptionExpired||"Subscription expired")):"canceled"===i?.status?s?(0,r.createElement)("div",{className:"gv-underline"},(0,r.createElement)("p",{className:"gv-text-on-alternative"},x?.labels?.subscriptionCanceled||"Subscription cancelled")):(0,r.createElement)("div",{className:"gv-underline"},(0,r.createElement)("p",{style:{color:"red"}},x?.labels?.subscriptionExpired||"Subscription expired")):"active"===i?.status?(0,r.createElement)("div",{className:"gv-underline"},(0,r.createElement)("p",{className:"gv-text-secondary"},x?.labels?.subscriptionActive||"Subscription active")):null,"expired"===i?.status?(0,r.createElement)("p",null,x?.labels?.expiredOn||"Expired on",": ",o):"canceled"===i?.status?(0,r.createElement)("p",null,x?.labels?.expiresOn||"Expires",": ",o):"active"===i?.status?(0,r.createElement)("p",null,x?.labels?.renewsOn||"Renews",": ",o):null):(0,r.createElement)("p",null,"-")),(0,r.createElement)("td",null,re[e.slug]?(0,r.createElement)("div",{className:"gv-text-indicator"},(0,r.createElement)("span",{className:"gv-indicator gv-state-attention"}),(0,r.createElement)("span",null," ",x?.labels?.cancellationInProgress||"Cancellation in progress..")):(0,r.createElement)("div",{className:"gv-text-indicator"},(0,r.createElement)("span",{className:H?.[e.slug]||e.activated?"gv-indicator gv-state-positive":"gv-indicator gv-state-informative"}),(0,r.createElement)("span",null," ",((e,t,n,r)=>{const i=n?.labels||{};if(H?.[e.slug])return i?.orderBeingProcessed||"Order being processed…";if(t){const n=t.status;if("pending"===n)return i?.subscriptionInProgress||"Subscription in progress";if("failed"===n)return i?.failed||"Failed";if("active"===n)return e.installed?e.activated?i?.active||"Active":i?.notActive||"Not Active":i?.notInstalled||"Not Installed"}return e.activated?i?.active||"Active":r?i?.notInstalled||"Not Installed":i?.notActive||"Not Active"})(e,i,x,n)))),(0,r.createElement)("td",null,!H?.[e.slug]&&((e,t,n,i,o,s)=>{const a=i||{};if(t){const n=t.status;if("pending"===n)return null;if("failed"===n)return null;if("active"===n){const n=t?.accessDetails?.downloadUrl;return e.installed?e.activated?null:(0,r.createElement)("a",{href:"#",className:"gv-action",onClick:t=>{t.preventDefault(),s("activate",e,"addons")}},a?.activateButton||"Activate"):(0,r.createElement)("a",{href:"#",className:"gv-action",onClick:t=>{t.preventDefault(),s("install",e,"addons",n)}},a?.installButton||"Install")}if("canceled"===n){if(t?.expiresAt&&new Date(t.expiresAt)>new Date){if(!e.installed)return(0,r.createElement)("a",{href:"#",className:"gv-action",onClick:n=>{n.preventDefault(),s("install",e,"addons",t?.accessDetails?.downloadUrl)}},a?.installButton||"Install");if(!e.activated)return(0,r.createElement)("a",{href:"#",className:"gv-action",onClick:t=>{t.preventDefault(),s("activate",e,"addons")}},a?.activateButton||"Activate")}return null}}return n?(0,r.createElement)("a",{href:"#",className:"gv-action",onClick:o},a?.installAndActivate||"Install and activate"):e.activated?null:(0,r.createElement)("a",{href:"#",className:"gv-action",onClick:t=>{t.preventDefault(),s("activate",e,"addons")}},a?.activateButton||"Activate")})(e,i,n,x,t=>{t.preventDefault();const n=new CustomEvent("onecom-plugin-provision",{detail:{slug:e.slug},bubbles:!0,cancelable:!0,composed:!0});document.dispatchEvent(n)},E)),(0,r.createElement)("td",null,(e.activated||e.installed&&!n||"active"===i?.status)&&(0,r.createElement)("div",{className:"gv-pos-relative",ref:X===t?ee:null},(0,r.createElement)("button",{type:"button","aria-label":x?.labels?.toggleMenu||"Toggle menu",className:"gv-reset-button",onClick:()=>Q(X===t?null:t)},(0,r.createElement)("gv-icon",{"aria-hidden":"true",src:`${de}more_horiz.svg`})),(0,r.createElement)("div",{className:"gv-contextual-menu gv-pos-right "+(X===t?"":"gv-invisible")},(0,r.createElement)("div",{className:"gv-menu"},(0,r.createElement)("button",{type:"button",className:"gv-btn-close","aria-label":x?.labels?.close||"Close",onClick:()=>Q(null)},(0,r.createElement)("gv-icon",{"aria-hidden":"true",src:`${de}close.svg`})),(0,r.createElement)("ul",null,e.activated&&(0,r.createElement)("li",{className:"gv-mb-0"},(0,r.createElement)("a",{href:"#",className:"gv-menu-item",onClick:t=>{t.preventDefault(),Q(null),(e=>{"undefined"!=typeof window&&window.marketplaceConfig?.data_consent_status&&(0,h.Mh)({buttonName:"Manage",buttonAction:"manage_product",context:{product_slug:e.slug,product_name:e.name,has_redirect_url:!(!e.redirectUrl||""===e.redirectUrl.trim()),has_onboarding_url:!(!e.onboardingUrl||""===e.onboardingUrl.trim())}});const t=(0,f.v)(e,!1);(0,f.J)(t)})(e)}},(0,r.createElement)("gv-icon",{"aria-hidden":"true",src:`${de}settings.svg`}),(0,r.createElement)("span",null,x?.labels?.manage||"Manage"))),e.activated&&(0,r.createElement)("li",{className:"gv-mb-0"},(0,r.createElement)("a",{href:"#",className:"gv-menu-item",onClick:t=>{t.preventDefault(),Q(null),E("deactivate",e,"addons")}},(0,r.createElement)("gv-icon",{"aria-hidden":"true",src:`${de}cancel.svg`}),(0,r.createElement)("span",null,x?.deactivate||"Deactivate"))),(0,r.createElement)("li",{className:"gv-mb-0"},!e.activated&&e.installed&&(0,r.createElement)("a",{href:"#",className:"gv-menu-item",onClick:t=>{t.preventDefault(),Q(null),z(e)}},(0,r.createElement)("gv-icon",{"aria-hidden":"true",src:`${de}delete.svg`}),(0,r.createElement)("span",null,x?.deleteButton||"Delete"))),(0,r.createElement)("li",{className:"gv-mb-0"},"active"===i?.status&&!re[e.slug]&&(0,r.createElement)("button",{className:"gv-menu-item",onClick:t=>{t.preventDefault(),Q(null),q(e,i.subscriptionId,i.expiresAt,()=>((e,t)=>{(0,h.Mh)({buttonName:"Cancel",buttonAction:"product_cancel",plugin:e});const n=V?.ajaxUrl;n&&t&&fetch(n,{method:"POST",body:new URLSearchParams({action:(0,g.R5)("unsubscribe"),nonce:V.nonce,subscriptionId:t})}).then(e=>e.json()).then(r=>{if(!r.success)return void W({visible:!0,type:"cancel_subscription",pluginSlug:e.slug,message:r?.error||r?.error||r?.data?.message||r?.data?.error||null});const i=r?.data?.data,o=i?.status;return"canceled"===o?((0,h.sx)("Subscription cancelled",{product_slug:e.slug||"",product_name:e.name||"",item_name:e.slug||"",subscription_id:t,timestamp:Date.now()}),void A()):"pending_cancellation"===o?(ie(t=>({...t,[e.slug]:!0})),fetch(n,{method:"POST",body:new URLSearchParams({action:(0,g.R5)("save_pending_cancellation"),nonce:V.nonce,slug:e.slug,subscriptionId:t})}),void fe(e.slug,t)):void W({visible:!0,type:"cancel_subscription",pluginSlug:e.slug,message:r?.error||r?.data?.message||r?.data?.error||null})}).catch(t=>{console.error("[Marketplace] Unsubscribe error",t),W({visible:!0,type:"cancel_subscription",pluginSlug:e.slug,message:t.message||null})})})(e,i.subscriptionId))}},(0,r.createElement)("gv-icon",{"aria-hidden":"true",src:`${de}free_cancellation.svg`}),(0,r.createElement)("span",null,x?.cancel||"Cancel")))))))))}))))),(0,r.createElement)(c.A,null),(0,r.createElement)(l.A,null),Y&&!F&&(()=>{const e=(t=Y)&&"seo-by-rank-math"===t.slug?a.A:s.A;var t;return(0,r.createElement)(e,{plugin:Y,onClose:()=>Z(null),loading:T})})())}},3804:(e,t,n)=>{"use strict";n(4915),Object.create(null)},4469:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var r=n(1609),i=n(7979),o=n(7008),s=n(3220);function a({plugin:e}){const{assetsBaseUrl:t,noticeState:n,setNoticeState:a,handlePluginAction:c,cancelReload:l,uiI18n:u}=(0,i.D)();if(!n||!n.visible||n.pluginSlug!==e?.slug)return null;const p=t||void 0!==window.marketplaceConfig&&window.marketplaceConfig?.assetsBaseUrl||"",d=p?`${p}assets/`:"",h="installed"===n.type,f="activated"===n.type,g=(e,t)=>e?e.replace("{0}",t||""):"",m=e?.name||"";return(0,r.createElement)("div",{className:"gv-notice gv-notice-success gv-p-lg gv-max-mob-pt-lg gv-mb-0 gv-mt-lg",style:{gridColumn:"1 / -1",width:"100%"}},(0,r.createElement)("img",{className:"gv-notice-icon",src:`${d}icons/success.svg`,alt:"Success"}),(0,r.createElement)("div",{className:"gv-notice-content"},(0,r.createElement)("div",{className:"gv-notice-title"},h&&g(u?.notifications?.pluginInstalled||"Plugin was installed.",m),f&&g(u?.notifications?.pluginActivated||"Plugin was activated.",m)),(0,r.createElement)("p",{className:"gv-text-sm"},h&&(u?.notifications?.activateNow||"Activate it now to start using it."),f&&g(u?.notifications?.manageInMyProducts||"{0} plugin was activated for this site. You can manage it on the My products page.",m))),h&&(0,r.createElement)("button",{type:"button",className:"gv-action gv-button gv-button-neutral",onClick:()=>{c("activate",e,"product_detail")}},u?.activatePluginButton),f&&(0,r.createElement)("button",{type:"button",className:"gv-action gv-button gv-button-neutral",onClick:()=>{(0,o.Mh)({buttonName:"Get started",buttonAction:"manage_product",plugin:e,context:{product_slug:e.slug,product_name:e.name,has_redirect_url:!(!e.redirectUrl||""===e.redirectUrl.trim()),has_onboarding_url:!(!e.onboardingUrl||""===e.onboardingUrl.trim())}}),l();const t=(0,s.v)(e,!0);(0,s.J)(t)}},(0,r.createElement)("span",null,u?.featuredCta||"Get Started"),(0,r.createElement)("gv-icon",{"aria-hidden":"true",src:`${d}icons/arrow_forward.svg`})),(0,r.createElement)("button",{type:"button",className:"gv-notice-close","aria-label":u?.labels?.close||"Close",onClick:()=>{a({visible:!1,type:null,pluginSlug:null}),sessionStorage.removeItem("mp_success_notice")}},(0,r.createElement)("gv-icon",{"aria-hidden":"true",src:`${d}icons/close.svg`})))}},4598:(e,t,n)=>{"use strict";n.d(t,{A:()=>h});var r=n(1609),i=n(5795),o=n(1338),s=n(4469),a=n(4677),c=n(4694),l=n(6409),u=n(7979),p=n(488),d=n(3331);function h({plugin:e,onClose:t,usePortal:n=!0,loading:h=!1}){const{assetsBaseUrl:f,useWPHandlers:g,pluginInAction:m,uiI18n:v,setNoticeState:y,setErrorState:b}=(0,u.D)(),_=f||void 0!==window.marketplaceConfig&&window.marketplaceConfig?.assetsBaseUrl||"",w=_?`${_}assets/icons/`:"",k="undefined"!=typeof window&&window.marketplaceConfig?.brand||"",S=k?` brand-${k.replace(/[^a-zA-Z0-9_-]/g,"")}`:"";if(h){const e=(0,r.createElement)("div",{className:`gv-surface-dim${S}`},(0,r.createElement)("article",{className:"gv-layout-product gv-p-0 gv-product-single gv-w-max-container gv-mx-auto gv-p-fluid"},(0,r.createElement)("nav",{className:"gv-breadcrumbs gv-area-nav gv-flex-col gv-items-start"},(0,r.createElement)("div",{className:"gv-flex gv-items-center gv-gap-xs"},(0,r.createElement)("div",{className:"gv-skeleton",style:{width:"60px"}}))),(0,r.createElement)("header",{className:"gv-product-header gv-area-header"},(0,r.createElement)("div",{className:"gv-content gv-stack-space-sm gv-text-sm"},(0,r.createElement)("div",{className:"gv-skeleton gv-heading-lg gv-mb-sm",style:{marginBottom:"24px"}}),(0,r.createElement)("div",{className:"gv-skeleton"}),(0,r.createElement)("div",{className:"gv-skeleton"}),(0,r.createElement)("div",{className:"gv-skeleton",style:{width:"80%"}})),(0,r.createElement)("div",{className:"gv-image"},(0,r.createElement)("div",{className:"gv-card-image gv-h-full",style:{marginTop:"75px"}},(0,r.createElement)("div",{className:"gv-skeleton gv-radius-0 gv-h-full",style:{minHeight:"300px"}})))),(0,r.createElement)("section",{className:"gv-product-table gv-features-table gv-products-1 gv-area-table"},(0,r.createElement)("div",{className:"gv-table-container"},(0,r.createElement)("div",{className:"gv-table",role:"table"},(0,r.createElement)("div",{className:"gv-table-header",role:"rowgroup"},(0,r.createElement)("div",{className:"gv-table-row",role:"row"},(0,r.createElement)("div",{className:"gv-product gv-p-0 oc-border-none",role:"columnheader"},(0,r.createElement)("div",{className:"gv-content"},(0,r.createElement)("div",{className:"gv-skeleton gv-heading-md gv-mb-sm"}),(0,r.createElement)("div",{className:"gv-skeleton",style:{width:"70%"}})),(0,r.createElement)("div",{className:"gv-bottom"},(0,r.createElement)("div",{className:"gv-price-container"},(0,r.createElement)("div",{className:"gv-skeleton",style:{width:"120px",height:"32px"}})),(0,r.createElement)("div",{className:"gv-skeleton gv-heading-md gv-mt-md"}))))),(0,r.createElement)("div",{className:"gv-section oc-left-border-0",role:"rowgroup"},(0,r.createElement)("div",{className:"gv-section-header gv-table-row",role:"row"},(0,r.createElement)("div",{className:"gv-cell",role:"cell"},(0,r.createElement)("div",{className:"gv-skeleton gv-heading-md",style:{width:"150px"}}))),[...Array(3)].map((e,t)=>(0,r.createElement)("div",{className:"gv-table-row",role:"row",key:t},(0,r.createElement)("div",{className:"gv-cell",role:"cell"},(0,r.createElement)("div",{className:"gv-skeleton gv-text-sm gv-w-full"})))))))),(0,r.createElement)("div",{className:"gv-area-details gv-grid gv-gap-fluid"},(0,r.createElement)("section",{className:"gv-stack-space-md"},(0,r.createElement)("div",{className:"gv-skeleton gv-heading-md gv-mb-md",style:{width:"180px"}}),(0,r.createElement)("ul",{className:"gv-list-items gv-list-check gv-mode-condensed"},[...Array(3)].map((e,t)=>(0,r.createElement)("li",{key:t},(0,r.createElement)("div",{className:"gv-skeleton gv-text-sm"})))))),(0,r.createElement)("div",{className:"gv-area-content gv-grid gv-gap-fluid"},(0,r.createElement)("section",{className:"gv-text-sm gv-stack-space-md"},(0,r.createElement)("div",{className:"gv-skeleton gv-heading-md gv-mb-md",style:{width:"250px"}}),(0,r.createElement)("div",{className:"gv-grid gv-gap-lg gv-tab-grid-cols-2 gv-desk-lg-grid-cols-3"},[...Array(3)].map((e,t)=>(0,r.createElement)("div",{className:"gv-item gv-stack-space-sm",key:t},(0,r.createElement)("div",{className:"gv-skeleton gv-heading-md gv-mb-sm"}),(0,r.createElement)("div",{className:"gv-skeleton gv-text-sm gv-mb-xs"}),(0,r.createElement)("div",{className:"gv-skeleton gv-text-sm"}))))))));return n?(0,i.createPortal)(e,document.body):e}if(!e)return null;(0,r.useEffect)(()=>{window.scrollTo(0,0)},[e]),(0,r.useEffect)(()=>{y(t=>t.visible&&t.pluginSlug===e.slug?t:{visible:!1,type:null,pluginSlug:null}),b(t=>t.visible&&t.pluginSlug===e.slug?t:{visible:!1,type:null,pluginSlug:null})},[e.slug,y,b]),(0,r.useEffect)(()=>{const e=()=>{y({visible:!1,type:null,pluginSlug:null}),b({visible:!1,type:null,pluginSlug:null})};return window.addEventListener("popstate",e),()=>window.removeEventListener("popstate",e)},[y,b]),void 0!==window.onecomWpVars&&window.onecomWpVars,e.thumbnail;const x=e.bannerUrl||e.image||e.thumbnail||"https://gravity.group.one/guide-images/product-image@2x.png",C=e.name||"Product",E=e.i18n?.description||e.i18n?.subtitle||e.description||e.shortDescription||v?.labels?.noDescription||"No description available.",I=e.i18n?.subtitle,N="free"===e.licenseType,O=e.i18n?.freeTrialText||"",A=O&&""!==O.trim(),R=e.i18n?.freeTrialPeriod||"",M=R&&""!==R.trim(),T=M||A?v?.headings?.freeTrial||"Free trial*":(0,p.M)(e,v?.labels?.free||"Free",v,!0),P=T===(v?.labels?.freeUntilRenewal||"Free until renewal"),L=(0,p.Tc)(e,!0),D=(0,p.Dn)(e,!0),F=(0,p.uA)(e),U="premium"===e.licenseType&&L&&null!==D&&F>0&&!M&&!A,j=(e,t)=>{if(!e||"object"!=typeof e)return[];const n=[];let r=1;for(;e[`${t}${r}`];){const i=e[`${t}${r}`];i&&""!==i.trim()&&n.push(i),r++}return n},B=j(e.i18n,"keyBenefitContent"),$=j(e.i18n,"keyFeatureContent"),z=[];if(e.i18n&&"object"==typeof e.i18n){let t=1;for(;e.i18n[`coreFeatureTitle${t}`]||e.i18n[`coreFeatureContent${t}`];){const n=e.i18n[`coreFeatureTitle${t}`],r=e.i18n[`coreFeatureContent${t}`];n&&""!==n.trim()&&r&&""!==r.trim()&&z.push({name:n,desc:r}),t++}}const q=$,V=B,W=z,H=(0,r.createElement)("div",{className:S},(0,r.createElement)("article",{className:"gv-layout-product gv-p-0 gv-product-single gv-w-max-container gv-mx-auto gv-p-fluid"},(0,r.createElement)(c.A,{iconBase:w,label:v.backButton,onClose:t,disabled:m[e.slug],className:"gv-flex-col gv-items-start"},(0,r.createElement)(s.A,{plugin:e}),(0,r.createElement)(a.A,{plugin:e}),(0,r.createElement)(l.A,{plugin:e})),(0,r.createElement)("header",{className:"gv-product-header gv-area-header"},(0,r.createElement)("div",{className:"gv-content gv-stack-space-md gv-text-sm"},(0,r.createElement)("h3",{className:"gv-title gv-header-lg"},C),(0,r.createElement)("p",{className:"gv-text-sm"},E)),(0,r.createElement)("div",{className:"gv-image"},(0,r.createElement)("picture",null,(0,r.createElement)("source",{media:"(min-width: 600px)",srcSet:`${x} 1x, ${x} 2x`}),(0,r.createElement)("img",{src:x,srcSet:`${x} 1x, ${x} 2x`,alt:`${C} image`})))),(0,r.createElement)("section",{className:"gv-product-table gv-features-table gv-products-1 gv-area-table"},(0,r.createElement)("div",{className:"gv-table-container"},(0,r.createElement)("div",{className:"gv-table",role:"table"},(0,r.createElement)("div",{className:"gv-table-header",role:"rowgroup"},(0,r.createElement)("div",{className:"gv-table-row",role:"row"},(0,r.createElement)("div",{className:"gv-product gv-p-0 oc-border-none",role:"columnheader"},(0,r.createElement)("div",{className:"gv-content"},(0,r.createElement)("h3",{className:"gv-title"},C),(0,r.createElement)("p",null,I)),(0,r.createElement)("div",{className:"gv-bottom"},(0,r.createElement)("div",{className:"gv-price-container"},U&&(0,r.createElement)("div",{className:"gv-price-with-badge single-page-sale"},(0,r.createElement)("span",{className:"gv-price-old"},(0,r.createElement)(d.j6,{htmlString:L})),(0,r.createElement)("div",{className:"gv-badge gv-badge-discount"},v?.labels?.save||"Save"," ",F,"%")),(0,r.createElement)("div",{className:"gv-price"},M||A?(0,r.createElement)("span",{className:"gv-price-text"},T):(0,r.createElement)(r.Fragment,null,(0,r.createElement)("span",{className:"gv-price-text"},(0,r.createElement)(d.j6,{htmlString:"premium"===e.licenseType&&null!==D?null!==D?D:L:T})),!N&&!P&&T&&(0,r.createElement)("span",{className:"gv-period gv-max-mob-p-0"},"/ ",v?.labels?.timeMonth))),M||A?(0,r.createElement)("div",{className:"gv-price-info"},(0,r.createElement)("div",{className:"gv-info"},O)):!N&&T&&L&&null!==D&&(0,r.createElement)("div",{className:"gv-price-info"},(0,r.createElement)("div",{className:"gv-info"},v.labels.untilRenewal," [",(0,r.createElement)(d.j6,{htmlString:D}),"]/",v?.labels?.timeMonth),(0,r.createElement)("div",{className:"gv-info"},v.labels.afterThat," [",(0,r.createElement)(d.j6,{htmlString:L}),"]/",v?.labels?.timeMonth))),g?(0,r.createElement)(o.A,{plugin:e}):e.download&&(0,r.createElement)("a",{href:e.download,download:!0,className:"gv-button gv-button-secondary"},"Download"))))),q.length>0&&(0,r.createElement)("div",{className:"gv-section oc-left-border-0",role:"rowgroup"},(0,r.createElement)("div",{className:"gv-section-header gv-table-row",role:"row"},(0,r.createElement)("div",{className:"gv-cell",role:"cell"},(0,r.createElement)("h4",{className:"gv-title"},v?.headings?.key_features||e.i18n?.keyFeatureHeading||"Key features"))),q.map((e,t)=>(0,r.createElement)("div",{className:"gv-table-row",role:"row",key:t},(0,r.createElement)("div",{className:"gv-cell",role:"cell"},(0,r.createElement)("span",{className:"gv-cell-text"},e)))))))),(0,r.createElement)("div",{className:"gv-area-details gv-grid gv-gap-fluid"},V.length>0&&(0,r.createElement)("section",{className:"gv-stack-space-md"},(0,r.createElement)("h2",{className:"gv-title gv-text-bold gv-text-lg"},v?.headings?.benefit||e.i18n?.benefitHeading||"Key benefits"),(0,r.createElement)("ul",{className:"gv-list-items gv-list-check gv-mode-condensed"},V.map((e,t)=>(0,r.createElement)("li",{key:t},e))))),W.length>0&&(0,r.createElement)("div",{className:"gv-area-content gv-grid gv-gap-fluid"},(0,r.createElement)("section",{className:"gv-text-sm gv-stack-space-md"},(0,r.createElement)("h2",{className:"gv-title gv-text-bold gv-text-lg"},v?.headings?.feature_overview||e.i18n?.featureOverviewHeading||"Core features overview"),(0,r.createElement)("div",{className:"gv-grid gv-gap-lg gv-tab-grid-cols-2 gv-desk-lg-grid-cols-3"},W.map((e,t)=>(0,r.createElement)("div",{className:"gv-item gv-stack-space-sm",key:t},(0,r.createElement)("h3",{className:"gv-title gv-text-bold gv-text-lg"},e.name),(0,r.createElement)("p",{className:"gv-text-sm"},e.desc))))))));return n?(0,i.createPortal)(H,document.body):H}},4601:(e,t,n)=>{"use strict";n.d(t,{D:()=>o});var r=n(7008),i=n(3331);const o=async({plugin:e,apiBaseUrl:t,useWPHandlers:n,wpConfig:o,source:s,uiI18n:a,setLoadingAction:c,setLoadingPlugin:l,setPluginInAction:u,setSuccessState:p,setErrorState:d,reloadTimeoutRef:h})=>{const f="activate";let g=`${t}${f}/${e.slug}`;const m=`download_url=${encodeURIComponent(e.download||"")}`;g=n?`${o.ajaxUrl}?action=${(0,i.R5)(`${f}_plugin`)}&_wpnonce=${o.nonce}&nonce=${o.nonce}&slug=${e.slug}&${m}`:g+(g.includes("?")?"&":"?")+m,setTimeout(async()=>{try{await fetch(g,{method:"POST"})}catch(e){}let n=0;const i=async()=>{try{const n=`${t}active/${e.slug}`,i=await fetch(n),o=await i.json();if(o&&o.activated)return(0,r.Mh)({buttonName:"Activate",buttonAction:"product_activate",plugin:e,context:{action:f,result:"success",special_case:"imagify_redirect"}}),void("product_detail"===s?(sessionStorage.setItem("mp_skip_page_view","true"),sessionStorage.setItem("mp_success_notice",JSON.stringify({visible:!0,type:"activated",pluginSlug:e.slug,successType:"activate"})),h.current=setTimeout(()=>{window.location.reload()},500)):(p({visible:!0,type:"activate",pluginSlug:e.slug}),h.current=setTimeout(()=>{sessionStorage.setItem("mp_skip_page_view","true"),window.location.reload()},3e3),c(""),l("")))}catch(e){console.error("Error checking activation status",e)}n++,n<6?setTimeout(i,1e3):(d({visible:!0,type:"activate",pluginSlug:e.slug}),(0,r.Mh)({buttonName:"Activate",buttonAction:"product_activate",plugin:e,context:{action:f,result:"error",error_message:"Imagify activation timeout after polling"}}),c(""),l(""),u(t=>({...t,[e.slug]:!1})))};setTimeout(i,1e3)},100)}},4677:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=n(1609),i=n(7979);function o({plugin:e}){const{assetsBaseUrl:t,errorState:n,setErrorState:o,uiI18n:s,plugins:a}=(0,i.D)(),c=e||a.find(e=>e.slug===n.pluginSlug),l=n&&n.visible&&n.pluginSlug===c?.slug;if((0,r.useEffect)(()=>{if(l){const e=setTimeout(()=>{d()},5e3);return()=>clearTimeout(e)}},[l]),!l)return null;const u=t||void 0!==window.marketplaceConfig&&window.marketplaceConfig?.assetsBaseUrl||"",p=u?`${u}assets/`:"",d=()=>{o({visible:!1,type:null,pluginSlug:null,message:null})},h="activate"===n.type,f="deactivate"===n.type,g="install"===n.type,m="delete"===n.type,v="buy_now"===n.type,y="cancel_subscription"===n.type,b=(e,t)=>e?e.replace("{0}",t||""):"",_=c?.name||"",w="string"==typeof n.message&&n.message.includes("_")&&!/\s/.test(n.message),k=s?.notifications?.somethingWentWrong||"Something went wrong; please try again.",S=n.message&&!w?n.message:w?k:null;return(0,r.createElement)("div",{className:"gv-toast-container"},(0,r.createElement)("div",{className:"gv-toast gv-toast-alert gv-visible"},(0,r.createElement)("gv-icon",{className:"gv-notice-icon","aria-hidden":"true",src:`${p}icons/error.svg`}),(0,r.createElement)("div",{className:"gv-toast-content"},S||(0,r.createElement)(r.Fragment,null,h&&b(s?.notifications?.pluginActivationFailed||"Couldn't activate plugin.",_),f&&b(s?.notifications?.pluginDeactivationFailed||"Couldn't deactivate plugin.",_),g&&b(s?.notifications?.pluginInstallationFailed||"Couldn't install plugin.",_),m&&b(s?.notifications?.pluginDeletionFailed||"Couldn't delete plugin.",_),v&&(s?.notifications?.procurementFailed||"Couldn't complete the purchase. Please try again."),y&&(s?.notifications?.cancelSubscriptionFailed||"Couldn't cancel the subscription. Please try again later."))),(0,r.createElement)("button",{type:"button",className:"gv-toast-close","aria-label":s?.labels?.close||"Close",onClick:d},(0,r.createElement)("gv-icon",{"aria-hidden":"true",src:`${p}icons/close.svg`}))))}},4694:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=n(1609),i=n(7979);const o=({iconBase:e,label:t,onClose:n,className:o="",disabled:s=!1,children:a})=>{const{uiI18n:c}=(0,i.D)();return(0,r.createElement)("nav",{className:`gv-breadcrumbs gv-area-nav ${o}`},(0,r.createElement)("a",{href:"#",onClick:e=>{if(e.preventDefault(),!s)if("undefined"!=typeof window&&window.history&&window.history.length>1)try{window.history.back()}catch(e){n&&n()}else n&&n()},className:"gv-flex gv-items-center gv-gap-xs",role:"button","aria-label":c?.labels?.goBack||"Go back",style:{opacity:s?.5:1,pointerEvents:s?"none":"auto",cursor:s?"not-allowed":"pointer"},"aria-disabled":s?"true":"false"},(0,r.createElement)("img",{style:{minWidth:"24px"},className:"gv-tile",src:`${e}arrow_back.svg`,alt:"Back"}),(0,r.createElement)("span",null,t)),a)}},4800:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=n(1609),i=n(7979);function o({plugin:e}){const{assetsBaseUrl:t,successState:n,setSuccessState:o,uiI18n:s,plugins:a}=(0,i.D)(),c=e||a.find(e=>e.slug===n.pluginSlug),l=n&&n.visible&&n.pluginSlug===c?.slug;if((0,r.useEffect)(()=>{if(l){const e=setTimeout(()=>{d()},5e3);return()=>clearTimeout(e)}},[l]),!l)return null;const u=t||void 0!==window.marketplaceConfig&&window.marketplaceConfig?.assetsBaseUrl||"",p=u?`${u}assets/`:"",d=()=>{o({visible:!1,type:null,pluginSlug:null})},h="install"===n.type,f="activate"===n.type,g="deactivate"===n.type,m="delete"===n.type,v=(e,t)=>e?e.replace("{0}",t||""):"",y=c?.name||"";return(0,r.createElement)("div",{className:"gv-toast-container"},(0,r.createElement)("div",{className:"gv-toast gv-toast-success gv-visible"},(0,r.createElement)("gv-icon",{className:"gv-notice-icon","aria-hidden":"true",src:`${p}icons/check_circle.svg`}),(0,r.createElement)("div",{className:"gv-toast-content"},h&&v(s?.notifications?.pluginInstalled||"Plugin installed successfully.",y),f&&v(s?.notifications?.pluginActivatedShort||"Plugin activated.",y),g&&v(s?.notifications?.pluginDeactivated||"Plugin deactivated.",y),m&&v(s?.notifications?.pluginDeleted||"Plugin deleted successfully.",y)),(0,r.createElement)("button",{type:"button",className:"gv-toast-close","aria-label":s?.labels?.close||"Close",onClick:d},(0,r.createElement)("gv-icon",{"aria-hidden":"true",src:`${p}icons/close.svg`}))))}},4811:e=>{"use strict";e.exports=JSON.parse('{"ui.button.refreshPage":"Actualiser la page","ui.notifications.couldNotLoad":"Impossible de charger la page","ui.notifications.refreshPage":"Veuillez rafraîchir la page et contact notre support si le problème persiste."}')},4814:(e,t,n)=>{"use strict";n(1609),n(3804),n(9454),n(7565)},4915:e=>{e.exports={area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0}},5036:(e,t,n)=>{"use strict";var r=n(2635),i=n(8291),o=n(7823),s=n(8491),a=n(5205),c=n(3591),l=n(3461),u=n(4811),p=n(7529),d=n(1199),h=n(333);const f={en_GB:{translation:o},da_DK:{translation:s},de_DE:{translation:a},es_ES:{translation:c},fi_FI:{translation:l},fr_FR:{translation:u},it_IT:{translation:p},nl_NL:{translation:d},no_NO:{translation:h},nb_NO:{translation:h},pt_PT:{translation:n(5383)},sv_SE:{translation:n(8300)},fi:{translation:l}};r.default.use(i.r9).init({resources:f,lng:"en_GB",fallbackLng:"en_GB",interpolation:{escapeValue:!1}})},5205:e=>{"use strict";e.exports=JSON.parse('{"ui.button.refreshPage":"Seite aktualisieren","ui.notifications.couldNotLoad":"Die Seite konnte nicht geladen werden","ui.notifications.refreshPage":"Bitte aktualisieren Sie die Seite und Kontakt Sie unser Support, falls das Problem weiterhin besteht."}')},5383:e=>{"use strict";e.exports=JSON.parse('{"ui.button.refreshPage":"Atualizar página","ui.notifications.couldNotLoad":"Não foi possível carregar a página","ui.notifications.refreshPage":"Atualize a página e contacte a nossa equipa de suporte se o problema persistir."}')},5404:(e,t,n)=>{"use strict";n.d(t,{A:()=>c});var r=n(1609),i=n(5795),o=n(488),s=n(7008),a=n(3331);function c({isOpen:e,plugin:t,uiI18n:n,assetsBaseUrl:c,onClose:l,onPurchase:u}){const p=c||"",d=p?`${p}assets/icons/`:"";if((0,r.useEffect)(()=>{const t=e=>{"Escape"===e.key&&l()};return e&&(window.addEventListener("keydown",t),document.body.style.overflow="hidden"),()=>{window.removeEventListener("keydown",t),document.body.style.overflow=""}},[e,l]),!e||!t)return null;const h=t.name||"Product",f=t.i18n?.subtitle||t.i18n?.description||t.description||"",g=t.bannerUrl||t.image||t.thumbnail||"",m=(0,o.M)(t,n?.labels?.free||"Free",n,!0),v=(0,o.Tc)(t,!0),y=(0,o.Dn)(t,!0),b=t.i18n?.freeTrialPeriod&&""!==t.i18n.freeTrialPeriod.trim(),_=t.i18n?.freeTrialText||"",w="undefined"!=typeof window&&window.marketplaceConfig?.brand||"",k=w?`brand-${w.replace(/[^a-zA-Z0-9_-]/g,"")}`:"",S=(0,r.createElement)("div",{className:k},(0,r.createElement)("div",{className:"gv-activated"},(0,r.createElement)("div",{className:"gv-modal gv-upgrade-modal",onClick:e=>{e.target.classList.contains("gv-modal")&&l()}},(0,r.createElement)("div",{className:"gv-modal-content",role:"dialog","aria-labelledby":"id-purchase-modal-title","aria-modal":"true",onClick:e=>e.stopPropagation()},(0,r.createElement)("button",{type:"button",className:"gv-modal-close","aria-label":n?.labels?.close||"Close",onClick:l},(0,r.createElement)("gv-icon",{"aria-hidden":"true",src:`${d}close.svg`})),(0,r.createElement)("div",{className:"gv-modal-body"},(0,r.createElement)("h5",{id:"id-purchase-modal-title"},n?.labels?.purchaseModalTitle||"Get superior website speed"),f&&(0,r.createElement)("p",{className:"gv-product-intro"},f),(0,r.createElement)("div",{className:"gv-product-price"},v&&null!==y&&(0,r.createElement)("div",{className:"gv-price-discount"},(0,r.createElement)("span",{className:"gv-price-old"},(0,r.createElement)(a.j6,{htmlString:v}),"/",n?.labels?.timeMonth)),(0,r.createElement)("div",{className:"gv-price-current"},(0,r.createElement)("span",{className:"gv-price"},b?n?.headings?.freeTrial||"Free trial*":(0,r.createElement)(a.j6,{htmlString:m})),!b&&m&&m!==(n?.labels?.free||"Free")&&m!==(n?.labels?.freeUntilRenewal||"Free until renewal")&&(0,r.createElement)("span",{className:"gv-price-period"},"/",n?.labels?.timeMonth||"mo"))),b&&_&&(0,r.createElement)("div",{className:"gv-product-more-info"},(0,r.createElement)("p",null,_)),(0,r.createElement)("div",{className:"gv-notice gv-notice-info"},(0,r.createElement)("gv-icon",{className:"gv-notice-icon",style:{flexShrink:0},"aria-hidden":"true",src:`${d}info.svg`}),(0,r.createElement)("p",{className:"gv-notice-content"},n?.labels?.purchaseMessage||"Payment will be processed using your saved RankMath method.")),(0,r.createElement)("p",{className:"gv-caption-lg"})),(0,r.createElement)("div",{className:"gv-button-group"},(0,r.createElement)("button",{type:"button",className:"gv-button gv-button-cancel",onClick:()=>{(0,s.Mh)({buttonName:"Cancel",buttonAction:"product_buy_cancel",plugin:t,context:{action:"Cancel"}}),l()}},n?.cancel||"Close"),(0,r.createElement)("button",{type:"button",className:"gv-button gv-button-primary",onClick:u},n?.labels?.buyNowButton||"Buy Now")),g&&(0,r.createElement)("div",{className:"gv-modal-image"},(0,r.createElement)("img",{src:g,alt:`${h}`}))))));return(0,i.createPortal)(S,document.body)}},5694:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=n(1609),i=n(7979);function o({message:e,buttonLabel:t,onRetry:n}){const{assetsBaseUrl:o}=(0,i.D)(),s=e||"We're making some improvements. Please try again in a few minutes.",a=t||"Retry",c=o||void 0!==window.marketplaceConfig&&window.marketplaceConfig?.assetsBaseUrl||"",l=c?`${c}assets/icons/`:"";return(0,r.createElement)("div",{className:"marketplace-container gv-flex gv-flex-col gv-flex-wrap gv-gap-lg gv-items-center gv-surface-bright gv-justify-center gv-p-fluid"},(0,r.createElement)("div",{className:"gv-text-center"},(0,r.createElement)("p",{className:"gv-text-md gv-mb-lg gv-text-bold"},s),(0,r.createElement)("button",{type:"button",className:"gv-button gv-button-primary gv-mode-condensed",onClick:n},(0,r.createElement)("gv-icon",{"aria-hidden":"true",src:`${l}refresh.svg`}),(0,r.createElement)("span",null,a))))}},5696:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var r=n(1609),i=n(7979),o=n(8299);const s=()=>{const{cancelSubsModalState:e,closeCancelSubsModal:t,assetsBaseUrl:n,uiI18n:s}=(0,i.D)(),{isOpen:a,plugin:c,expiresAt:l,onConfirm:u}=e,p=n||void 0!==window.marketplaceConfig&&window.marketplaceConfig?.assetsBaseUrl||"",d=p?`${p}assets/icons/`:"",h=s?.labels||{};if((0,r.useEffect)(()=>{const e=e=>{"Escape"===e.key&&t()};return a&&(window.addEventListener("keydown",e),document.body.style.overflow="hidden"),()=>{window.removeEventListener("keydown",e),document.body.style.overflow=""}},[a,t]),!a||!c)return null;const f=c.name,g=(0,o.Y)(l);return(0,r.createElement)("div",{className:"gv-modal",onClick:e=>{e.target.classList.contains("gv-modal")&&t()}},(0,r.createElement)("div",{className:"gv-modal-content",role:"dialog","aria-labelledby":"id-cancel-subs-modal-title","aria-modal":"true",onClick:e=>e.stopPropagation()},(0,r.createElement)("button",{type:"button",className:"gv-modal-close","aria-label":s?.labels?.close||"Close",onClick:t},(0,r.createElement)("gv-icon",{"aria-hidden":"true",src:`${d}close.svg`})),(0,r.createElement)("div",{className:"gv-modal-body"},(0,r.createElement)("h2",{id:"id-cancel-subs-modal-title",className:"gv-modal-title"},h?.cancelSubscriptionTitle?h.cancelSubscriptionTitle.replace("{0}",f):`Cancel ${f} subscription?`),g&&(0,r.createElement)("p",null,h?.cancelSubscriptionBody?h.cancelSubscriptionBody.replace("{0}",g):(0,r.createElement)(r.Fragment,null,"By cancelling, you will lose access to premium features after your current period ends on ",(0,r.createElement)("span",{className:"gv-text-bold gv-white-space-nowrap"},g),".")),(0,r.createElement)("div",{className:"gv-notice gv-notice-info gv-mt-md"},(0,r.createElement)("gv-icon",{className:"gv-notice-icon","aria-hidden":"true",src:`${d}error.svg`}),(0,r.createElement)("p",{className:"gv-notice-content"},h?.cancelSubscriptionIrreversible?(0,r.createElement)("strong",null,h.cancelSubscriptionIrreversible):(0,r.createElement)(r.Fragment,null,(0,r.createElement)("strong",null,"Cannot be reactivated"),". Returning later means a new subscription at current price — license and settings won't carry over."))),(0,r.createElement)("p",null,h?.cancelSubscriptionInfo||"After the cancellation, you can continue using the plugin until the expiration date. No further charges will be applied.")),(0,r.createElement)("div",{className:"gv-button-group"},(0,r.createElement)("button",{type:"button",className:"gv-button gv-button-cancel",onClick:()=>{"function"==typeof u&&u(),t()}},h?.cancelSubscriptionConfirm||"Confirm cancellation"),(0,r.createElement)("button",{type:"button",className:"gv-button gv-button-primary",onClick:t},h?.cancelSubscriptionKeep||"Keep subscription"))))}},5795:e=>{"use strict";e.exports=window.ReactDOM},5924:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var r=n(1609),i=(n(5795),n(3331)),o=n(7979);const s=()=>{const{deleteModalState:e,closeDeleteModal:t,handlePluginAction:n,assetsBaseUrl:s,uiI18n:a}=(0,o.D)(),{isOpen:c,plugin:l}=e,u=s||void 0!==window.marketplaceConfig&&window.marketplaceConfig?.assetsBaseUrl||"",p=u?`${u}assets/icons/`:"";if((0,r.useEffect)(()=>{const e=e=>{"Escape"===e.key&&t()};return c&&(window.addEventListener("keydown",e),document.body.style.overflow="hidden"),()=>{window.removeEventListener("keydown",e),document.body.style.overflow=""}},[c,t]),!c||!l)return null;const d="premium"===l.licenseType,h=l.name,f="undefined"!=typeof window&&window.marketplaceConfig?.brand||"";return(0,r.createElement)("div",{className:"gv-modal",onClick:e=>{e.target.classList.contains("gv-modal")&&t()}},(0,r.createElement)("div",{className:"gv-modal-content",role:"dialog","aria-labelledby":"id-modal-title","aria-modal":"true",onClick:e=>e.stopPropagation()},(0,r.createElement)("button",{type:"button",className:"gv-modal-close","aria-label":a?.labels?.close||"Close",onClick:t},(0,r.createElement)("gv-icon",{"aria-hidden":"true",src:`${p}close.svg`})),(0,r.createElement)("div",{className:"gv-modal-body"},(0,r.createElement)("h2",{id:"id-modal-title",className:"gv-modal-title"},(0,i.hw)(a?.deletePlugin,"{0}",h),"?"),(0,r.createElement)("p",null,(0,i.hw)(a?.notifications?.deleteModalConfirm,"{0}",h)),d&&"onecom"===f&&(0,r.createElement)("div",{className:"gv-notice gv-notice-info"},(0,r.createElement)("gv-icon",{class:"gv-notice-icon","aria-hidden":"true",src:`${p}/info.svg`}),(0,r.createElement)("p",{className:"gv-notice-content"},(0,r.createElement)(i.j6,{htmlString:(0,i.lb)((0,i.hw)(a?.notifications?.deleteModalInfo,"{0}",h),'',"")})))),(0,r.createElement)("div",{className:"gv-button-group"},(0,r.createElement)("button",{type:"button",className:"gv-button gv-button-cancel",onClick:t},a?.cancel),(0,r.createElement)("button",{type:"button",className:"gv-button gv-button-destructive",onClick:()=>{n("delete",l,"addons"),t()}},a?.deleteButton))))}},6255:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var r=n(1609),i=n(3699),o=n(9599),s=n(7979);const a=({apiBaseUrl:e,useWPHandlers:t,wpConfig:n,enableDefaultStyles:a,assetsBaseUrl:c})=>(0,r.createElement)(s.t,{apiBaseUrl:e,useWPHandlers:t,wpConfig:n,enableDefaultStyles:a,assetsBaseUrl:c},(0,r.createElement)(o.A,null,(0,r.createElement)(i.A,null)))},6409:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=n(1609),i=n(7979);const o=({plugin:e})=>{const{wpConfig:t,assetsBaseUrl:n}=(0,i.D)(),o=n||"undefined"!=typeof window&&window.marketplaceConfig?.assetsBaseUrl||"",s=o?`${o}assets/`:"",a=e?.announcement||null,c=e?.productId||null,l=!!a&&(!a?.expiresAt||new Date(a.expiresAt)>new Date),[u,p]=(0,r.useState)(()=>{if(!c)return!1;const e="undefined"!=typeof window&&window.marketplaceConfig?.dismissedBanners||[];return Array.isArray(e)&&e.includes(c)}),[d,h]=(0,r.useState)(!1);return!c||!l||u||e?.installed?null:(0,r.createElement)("div",{className:"gv-notice gv-notice-upgrade gv-w-full mp-announcement-banner",role:"region","aria-label":`Release announcement: ${a.title}`,style:{gap:"var(--size-sm)",alignItems:"flex-start"}},(0,r.createElement)("style",null,"\n .mp-announcement-banner { padding: var(--size-md) !important; padding-bottom: 10px !important; }\n .mp-announcement-banner .gv-notice-close { padding: var(--size-xs) !important; }\n .mp-announcement-banner .banner-cta { height: 32px !important; font-size: 13px !important; }\n .mp-announcement-banner .gv-acc-content p { white-space: pre-line; }\n @media (max-width: 599px) {\n .mp-announcement-banner { padding: var(--size-lg) !important; }\n .mp-announcement-banner .gv-notice-close { padding: var(--size-sm) !important; }\n }\n "),(0,r.createElement)("gv-icon",{className:"gv-notice-icon","aria-hidden":"true",src:`${s}icons/campaign.svg`,style:{flexShrink:0}}),(0,r.createElement)("div",{className:"gv-notice-content gv-accordion"},(0,r.createElement)("div",{className:"gv-acc-header"},(0,r.createElement)("button",{type:"button",className:"gv-acc-trigger"+(d?" gv-expanded":""),onClick:()=>h(e=>!e),"aria-expanded":d,style:{padding:"var(--size-sm) 0 var(--size-sm) 0"}},(0,r.createElement)("span",{className:"gv-acc-title",style:{fontSize:"13px"}},a.title))),d&&(0,r.createElement)("div",{className:"gv-acc-content gv-pb-0 gv-mb-sm"},(0,r.createElement)("p",null,a.body),(0,r.createElement)("a",{href:a.ctaUrl,target:"_blank",rel:"noopener noreferrer",className:"gv-button gv-button-neutral gv-button-sm gv-mt-md banner-cta",style:{height:"var(--form-element-height)"}},a.ctaLabel,(0,r.createElement)("gv-icon",{"aria-hidden":"true",src:`${s}icons/open_in_new.svg`})))),(0,r.createElement)("button",{type:"button",className:"gv-notice-close",onClick:()=>{if(p(!0),"undefined"!=typeof window&&window.marketplaceConfig){const e=window.marketplaceConfig.dismissedBanners||[];e.includes(c)||(window.marketplaceConfig.dismissedBanners=[...e,c])}try{const e=t?.ajaxUrl||window?.marketplaceConfig?.wpConfig?.ajaxUrl,n=t?.nonce||window?.marketplaceConfig?.wpConfig?.nonce,r=t?.ajaxActionPrefix||window?.marketplaceConfig?.wpConfig?.ajaxActionPrefix||"marketplace";if(e){const t=new URLSearchParams({action:`${r}_dismiss_banner`,nonce:n,banner_slug:c});fetch(e,{method:"POST",body:t}).catch(()=>{})}}catch{}},"aria-label":"Dismiss release announcement"},(0,r.createElement)("gv-icon",{"aria-hidden":"true",src:`${s}icons/close.svg`,style:{width:"var(--size-icon-sm)",height:"var(--size-icon-sm)"}})))}},6530:()=>{var e=Object.defineProperty,t=(t,n,r)=>(((t,n,r)=>{n in t?e(t,n,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[n]=r})(t,"symbol"!=typeof n?n+"":n,r),r);const n={};async function r(e){if(n.hasOwnProperty(e))return n[e];let t;return t=e.startsWith("data:")||!("caches"in self)?fetch(e).then(e=>e.text()):caches.open("gravity").then(async t=>{let n=await t.match(e);return n||(n=await fetch(e),n.ok&&await t.put(e,n.clone())),n.text()}),n[e]=t,t}class i extends HTMLElement{static get observedAttributes(){return["src"]}fetchFlag(e){e&&r(e).then(e=>this.innerHTML=e)}connectedCallback(){this.fetchFlag(this.getAttribute("src"))}attributeChangedCallback(e,t,n){"src"===e&&t!==n&&this.fetchFlag(n)}}t(i,"TAG_NAME","gv-flag");class o extends HTMLElement{static get observedAttributes(){return["src"]}fetchIcon(e){e&&r(e).then(e=>this.innerHTML=e)}connectedCallback(){this.fetchIcon(this.getAttribute("src"))}attributeChangedCallback(e,t,n){"src"===e&&t!==n&&this.fetchIcon(n)}}t(o,"TAG_NAME","gv-icon");class s extends HTMLElement{static get observedAttributes(){return["src"]}fetchIllustration(e){e&&r(e).then(e=>this.innerHTML=e)}connectedCallback(){this.fetchIllustration(this.getAttribute("src"))}attributeChangedCallback(e,t,n){"src"===e&&t!==n&&this.fetchIllustration(n)}}t(s,"TAG_NAME","gv-illustration");class a extends HTMLElement{static get observedAttributes(){return["src"]}fetchIndicator(e){e&&r(e).then(e=>this.innerHTML=e)}connectedCallback(){this.fetchIndicator(this.getAttribute("src"))}attributeChangedCallback(e,t,n){"src"===e&&t!==n&&this.fetchIndicator(n)}}t(a,"TAG_NAME","gv-indicator");class c extends HTMLElement{static get observedAttributes(){return["src"]}fetchLoader(e){e&&r(e).then(e=>this.innerHTML=e)}connectedCallback(){this.fetchLoader(this.getAttribute("src"))}attributeChangedCallback(e,t,n){"src"===e&&t!==n&&this.fetchLoader(n)}}t(c,"TAG_NAME","gv-loader");class l extends HTMLElement{static get observedAttributes(){return["src"]}fetchLogo(e){e&&r(e).then(e=>this.innerHTML=e)}connectedCallback(){this.fetchLogo(this.getAttribute("src"))}attributeChangedCallback(e,t,n){"src"===e&&t!==n&&this.fetchLogo(n)}}t(l,"TAG_NAME","gv-logo");class u extends HTMLElement{static get observedAttributes(){return["src"]}fetchPayIcon(e){e&&r(e).then(e=>this.innerHTML=e)}connectedCallback(){this.fetchPayIcon(this.getAttribute("src"))}attributeChangedCallback(e,t,n){"src"===e&&t!==n&&this.fetchPayIcon(n)}}t(u,"TAG_NAME","gv-pay-icon");class p extends HTMLElement{static get observedAttributes(){return["src"]}fetchTile(e){e&&r(e).then(e=>this.innerHTML=e)}connectedCallback(){this.fetchTile(this.getAttribute("src"))}attributeChangedCallback(e,t,n){"src"===e&&t!==n&&this.fetchTile(n)}}function d(e,t){customElements.get(e)||customElements.define(e,t)}t(p,"TAG_NAME","gv-tile"),d(i.TAG_NAME,i),d(o.TAG_NAME,o),d(s.TAG_NAME,s),d(a.TAG_NAME,a),d(c.TAG_NAME,c),d(l.TAG_NAME,l),d(u.TAG_NAME,u),d(p.TAG_NAME,p)},6751:(e,t,n)=>{"use strict";var r;if(n.d(t,{A:()=>Hh}),"undefined"==typeof window){var i={hostname:""};r={crypto:{randomUUID:function(){throw Error("unsupported")}},navigator:{userAgent:"",onLine:!0},document:{createElement:function(){return{}},location:i,referrer:""},screen:{width:0,height:0},location:i,addEventListener:function(){},removeEventListener:function(){}}}else r=window;function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0||(i[n]=e[n]);return i}function g(e,t){return g=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},g(e,t)}function m(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e}function v(e){var t="function"==typeof Map?new Map:void 0;return v=function(e){if(null===e||(n=e,-1===Function.toString.call(n).indexOf("[native code]")))return e;var n;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,r)}function r(){return c(e,arguments,p(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),g(r,e)},v(e)}function y(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(y=function(){return!!e})()}function b(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return o(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?o(e,t):void 0}}(e))||t){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _(e,t){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}var k,S=Object.defineProperty,x=function(e,t,n){return function(e,t,n){return t in e?S(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n}(e,"symbol"!==(void 0===t?"undefined":m(t))?t+"":t,n)},C=Object.defineProperty,E=function(e,t,n){return function(e,t,n){return t in e?C(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n}(e,"symbol"!==(void 0===t?"undefined":m(t))?t+"":t,n)},I=function(e){return e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment",e}(I||{}),N={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},O={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},A={};function R(e){if(A[e])return A[e];var t=globalThis[e],n=t.prototype,r=e in N?N[e]:void 0,i=Boolean(r&&r.every(function(e){var t,r;return Boolean(null==(r=null==(t=Object.getOwnPropertyDescriptor(n,e))?void 0:t.get)?void 0:r.toString().includes("[native code]"))})),o=e in O?O[e]:void 0,s=Boolean(o&&o.every(function(e){var t;return"function"==typeof n[e]&&(null==(t=n[e])?void 0:t.toString().includes("[native code]"))}));if(i&&s&&!globalThis.Zone)return A[e]=t.prototype,t.prototype;try{var a=document.createElement("iframe");document.body.appendChild(a);var c=a.contentWindow;if(!c)return t.prototype;var l=c[e].prototype;return document.body.removeChild(a),l?A[e]=l:n}catch(e){return n}}var M={};function T(e,t,n){var r,i=e+"."+String(n);if(M[i])return M[i].call(t);var o=R(e),s=null==(r=Object.getOwnPropertyDescriptor(o,n))?void 0:r.get;return s?(M[i]=s,s.call(t)):t[n]}var P=function(e){return T("Node",e,"childNodes")},L=function(e){return T("Node",e,"parentNode")},D=function(e){return T("Node",e,"parentElement")},F=function(e){return T("Node",e,"textContent")},U=function(e){return e&&"host"in e?T("ShadowRoot",e,"host"):null},j=function(e){return e&&"shadowRoot"in e?T("Element",e,"shadowRoot"):null};function B(e){return e.nodeType===e.ELEMENT_NODE}function $(e){var t=e&&"host"in e&&"mode"in e&&U(e)||null;return Boolean(t&&"shadowRoot"in t&&j(t)===e)}function z(e){return"[object ShadowRoot]"===Object.prototype.toString.call(e)}function q(e){try{var t=e.rules||e.cssRules;if(!t)return null;var n=e.href;return!n&&e.ownerNode&&e.ownerNode.ownerDocument&&(n=e.ownerNode.ownerDocument.location.href),(r=Array.from(t,function(e){return V(e,n)}).join("")).includes(" background-clip: text;")&&!r.includes(" -webkit-background-clip: text;")&&(r=r.replace(/\sbackground-clip:\s*text;/g," -webkit-background-clip: text; background-clip: text;")),r}catch(e){return null}var r}function V(e,t){if(function(e){return"styleSheet"in e}(e)){var n;try{n=q(e.styleSheet)||function(e){var t=e.cssText;if(t.split('"').length<3)return t;var n=["@import","url("+JSON.stringify(e.href)+")"];return""===e.layerName?n.push("layer"):e.layerName&&n.push("layer("+e.layerName+")"),e.supportsText&&n.push("supports("+e.supportsText+")"),e.media.length&&n.push(e.media.mediaText),n.join(" ")+";"}(e)}catch(t){n=e.cssText}return e.styleSheet.href?te(n,e.styleSheet.href):n}var r,i=e.cssText;return function(e){return"selectorText"in e}(e)&&e.selectorText.includes(":")&&(r=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm,i=i.replace(r,"$1\\$2")),t?te(i,t):i}var W=function(){function e(){E(this,"idNodeMap",new Map),E(this,"nodeMetaMap",new WeakMap)}var t=e.prototype;return t.getId=function(e){var t;if(!e)return-1;var n=null==(t=this.getMeta(e))?void 0:t.id;return null!=n?n:-1},t.getNode=function(e){return this.idNodeMap.get(e)||null},t.getIds=function(){return Array.from(this.idNodeMap.keys())},t.getMeta=function(e){return this.nodeMetaMap.get(e)||null},t.removeNodeFromMap=function(e){var t=this,n=this.getId(e);this.idNodeMap.delete(n),e.childNodes&&e.childNodes.forEach(function(e){return t.removeNodeFromMap(e)})},t.has=function(e){return this.idNodeMap.has(e)},t.hasNode=function(e){return this.nodeMetaMap.has(e)},t.add=function(e,t){var n=t.id;this.idNodeMap.set(n,e),this.nodeMetaMap.set(e,t)},t.replace=function(e,t){var n=this.getNode(e);if(n){var r=this.nodeMetaMap.get(n);r&&this.nodeMetaMap.set(t,r)}this.idNodeMap.set(e,t)},t.reset=function(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap},e}();function H(e){var t=e.element,n=e.maskInputOptions,r=e.tagName,i=e.type,o=e.value,s=e.maskInputFn,a=o||"",c=i&&G(i);return(n[r.toLowerCase()]||c&&n[c])&&(a=s?s(a,t):"*".repeat(a.length)),a}function G(e){return e.toLowerCase()}var K="__rrweb_original__";function J(e){var t=e.type;return e.hasAttribute("data-rr-is-password")?"password":t?G(t):null}function Y(e,t){var n;try{n=new URL(e,null!=t?t:window.location.href)}catch(e){return null}var r,i=n.pathname.match(/\.([0-9a-z]+)(?:$)/i);return null!=(r=null==i?void 0:i[1])?r:null}var Z=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,X=/^(?:[a-z+]+:)?\/\//i,Q=/^www\..*/i,ee=/^(data:)([^,]*),(.*)/i;function te(e,t){return(e||"").replace(Z,function(e,n,r,i,o,s){var a,c=r||o||s,l=n||i||"";if(!c)return e;if(X.test(c)||Q.test(c))return"url("+l+c+l+")";if(ee.test(c))return"url("+l+c+l+")";if("/"===c[0])return"url("+l+(((a=t).indexOf("//")>-1?a.split("/").slice(0,3).join("/"):a.split("/")[0]).split("?")[0]+c)+l+")";var u=t.split("/"),p=c.split("/");u.pop();for(var d,h=b(p);!(d=h()).done;){var f=d.value;"."!==f&&(".."===f?u.pop():u.push(f))}return"url("+l+u.join("/")+l+")"})}function ne(e,t){return void 0===t&&(t=!1),t?e.replace(/(\/\*[^*]*\*\/)|[\s;]/g,""):e.replace(/(\/\*[^*]*\*\/)|[\s;]/g,"").replace(/0px/g,"0")}var re,ie,oe=1,se=new RegExp("[^a-z0-9-_:]");function ae(){return oe++}var ce=/^[^ \t\n\r\u000c]+/,le=/^[, \t\n\r\u000c]+/,ue=new WeakMap;function pe(e,t){return t&&""!==t.trim()?de(e,t):t}function de(e,t){var n=ue.get(e);if(n||(n=e.createElement("a"),ue.set(e,n)),t){if(t.startsWith("blob:")||t.startsWith("data:"))return t}else t="";return n.setAttribute("href",t),n.href}function he(e,t,n,r){return r?"src"===n||"href"===n&&("use"!==t||"#"!==r[0])||"xlink:href"===n&&"#"!==r[0]?pe(e,r):"background"!==n||"table"!==t&&"td"!==t&&"th"!==t?"srcset"===n?function(e,t){if(""===t.trim())return t;var n=0;function r(e){var r,i=e.exec(t.substring(n));return i?(r=i[0],n+=r.length,r):""}for(var i=[];r(le),!(n>=t.length);){var o=r(ce);if(","===o.slice(-1))o=pe(e,o.substring(0,o.length-1)),i.push(o);else{var s="";o=pe(e,o);for(var a=!1;;){var c=t.charAt(n);if(""===c){i.push((o+s).trim());break}if(a)")"===c&&(a=!1);else{if(","===c){n+=1,i.push((o+s).trim());break}"("===c&&(a=!0)}s+=c,n+=1}}}return i.join(", ")}(e,r):"style"===n?te(r,de(e)):"object"===t&&"data"===n?pe(e,r):r:pe(e,r):r}function fe(e,t,n){return("video"===e||"audio"===e)&&"autoplay"===t}function ge(e,t,n){if(!e)return!1;if(e.nodeType!==e.ELEMENT_NODE)return!!n&&ge(L(e),t,n);for(var r=e.classList.length;r--;){var i=e.classList[r];if(t.test(i))return!0}return!!n&&ge(L(e),t,n)}function me(e,t,n,r){var i;if(B(e)){if(!P(i=e).length)return!1}else{if(null===D(e))return!1;i=D(e)}try{if("string"==typeof t){if(r){if(i.closest("."+t))return!0}else if(i.classList.contains(t))return!0}else if(ge(i,t,r))return!0;if(n)if(r){if(i.closest(n))return!0}else if(i.matches(n))return!0}catch(e){}return!1}function ve(e,t){var n=t.doc,r=t.mirror,i=t.blockClass,o=t.blockSelector,s=t.needsMask,a=t.inlineStylesheet,c=t.maskInputOptions,l=void 0===c?{}:c,u=t.maskTextFn,p=t.maskInputFn,d=t.dataURLOptions,f=void 0===d?{}:d,g=t.inlineImages,m=t.recordCanvas,v=t.keepIframeSrcFn,y=t.newlyAddedElement,b=void 0!==y&&y,_=t.cssCaptured,w=void 0!==_&&_,k=function(e,t){if(t.hasNode(e)){var n=t.getId(e);return 1===n?void 0:n}}(n,r);switch(e.nodeType){case e.DOCUMENT_NODE:return"CSS1Compat"!==e.compatMode?{type:I.Document,childNodes:[],compatMode:e.compatMode}:{type:I.Document,childNodes:[]};case e.DOCUMENT_TYPE_NODE:return{type:I.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId,rootId:k};case e.ELEMENT_NODE:return function(e,t){for(var n,r=t.doc,i=t.inlineStylesheet,o=t.maskInputOptions,s=void 0===o?{}:o,a=t.maskInputFn,c=t.dataURLOptions,l=void 0===c?{}:c,u=t.inlineImages,p=t.recordCanvas,d=t.keepIframeSrcFn,f=t.newlyAddedElement,g=void 0!==f&&f,m=t.rootId,v=function(e,t,n){try{if("string"==typeof t){if(e.classList.contains(t))return!0}else for(var r=e.classList.length;r--;){var i=e.classList[r];if(t.test(i))return!0}if(n)return e.matches(n)}catch(e){}return!1}(e,t.blockClass,t.blockSelector),y=function(e){if(h(e,HTMLFormElement))return"form";var t=G(e.tagName);return se.test(t)?"div":t}(e),b={},_=e.attributes.length,w=0;w<_;w++){var k=e.attributes[w];fe(y,k.name,k.value)||(b[k.name]=he(r,y,G(k.name),k.value))}if("link"===y&&i){var S=Array.from(r.styleSheets).find(function(t){return t.href===e.href}),x=null;S&&(x=q(S)),x&&(delete b.rel,delete b.href,b._cssText=x)}if("style"===y&&e.sheet){var C=q(e.sheet);C&&(e.childNodes.length>1&&(C=function(e,t){return function(e,t,n){void 0===n&&(n=!1);var r=Array.from(t.childNodes),i=[],o=0;if(r.length>1&&e&&"string"==typeof e)for(var s=ne(e,n),a=s.length/e.length,c=1;c2&&""===d[0]&&""!==r[c-1].textContent)h=s.indexOf(p,1);else if(1===d.length){if(p=p.substring(0,p.length-1),(d=s.split(p)).length<=1)return i.push(e),i;u=101}else u===l.length-1&&(h=s.indexOf(p));if(d.length>=2&&u>100){var f=r[c-1].textContent;if(f&&"string"==typeof f){var g=ne(f).length;h=s.indexOf(p,g)}-1===h&&(h=d[0].length)}if(-1!==h){for(var m=Math.floor(h/a);m>0&&m50*r.length)return i.push(e),i;var v=ne(e.substring(0,m),n);if(v.length===h){i.push(e.substring(0,m)),e=e.substring(m),s=s.substring(h);break}v.length",T=R.crossOrigin,P=function(){R.removeEventListener("load",P);try{re.width=R.naturalWidth,re.height=R.naturalHeight,ie.drawImage(R,0,0),b.rr_dataURL=re.toDataURL(l.type,l.quality)}catch(e){if("anonymous"!==R.crossOrigin)return R.crossOrigin="anonymous",void(R.complete&&0!==R.naturalWidth?P():R.addEventListener("load",P));console.warn("Cannot inline img src="+M+"! Error: "+e)}"anonymous"===R.crossOrigin&&(T?b.crossOrigin=T:R.removeAttribute("crossorigin"))};R.complete&&0!==R.naturalWidth?P():R.addEventListener("load",P)}if("audio"===y||"video"===y){var L=b;L.rr_mediaState=e.paused?"paused":"played",L.rr_mediaCurrentTime=e.currentTime,L.rr_mediaPlaybackRate=e.playbackRate,L.rr_mediaMuted=e.muted,L.rr_mediaLoop=e.loop,L.rr_mediaVolume=e.volume}if(g||(e.scrollLeft&&(b.rr_scrollLeft=e.scrollLeft),e.scrollTop&&(b.rr_scrollTop=e.scrollTop)),v){var D=e.getBoundingClientRect(),F=D.width,U=D.height;b={class:b.class,rr_width:F+"px",rr_height:U+"px"}}"iframe"!==y||d(b.src)||(e.contentDocument||(b.rr_src=b.src),delete b.src);try{customElements.get(y)&&(n=!0)}catch(e){}return{type:I.Element,tagName:y,attributes:b,childNodes:[],isSVG:(j=e,Boolean("svg"===j.tagName||j.ownerSVGElement)||void 0),needBlock:v,rootId:m,isCustom:n};var j}(e,{doc:n,blockClass:i,blockSelector:o,inlineStylesheet:a,maskInputOptions:l,maskInputFn:p,dataURLOptions:f,inlineImages:g,recordCanvas:m,keepIframeSrcFn:v,newlyAddedElement:b,rootId:k});case e.TEXT_NODE:return function(e,t){var n=t.needsMask,r=t.maskTextFn,i=t.rootId,o=t.cssCaptured,s=L(e),a=s&&s.tagName,c="",l="STYLE"===a||void 0,u="SCRIPT"===a||void 0;return u?c="SCRIPT_PLACEHOLDER":o||(c=F(e),l&&c&&(c=te(c,de(t.doc)))),!l&&!u&&c&&n&&(c=r?r(c,D(e)):c.replace(/[\S]/g,"*")),{type:I.Text,textContent:c||"",rootId:i}}(e,{doc:n,needsMask:s,maskTextFn:u,rootId:k,cssCaptured:w});case e.CDATA_SECTION_NODE:return{type:I.CDATA,textContent:"",rootId:k};case e.COMMENT_NODE:return{type:I.Comment,textContent:F(e)||"",rootId:k};default:return!1}}function ye(e){return null==e?"":e.toLowerCase()}function be(e,t){var n=t.doc,r=t.mirror,i=t.blockClass,o=t.blockSelector,s=t.maskTextClass,a=t.maskTextSelector,c=t.skipChild,l=void 0!==c&&c,u=t.inlineStylesheet,p=void 0===u||u,d=t.maskInputOptions,h=void 0===d?{}:d,f=t.maskTextFn,g=t.maskInputFn,m=t.slimDOMOptions,v=t.dataURLOptions,y=void 0===v?{}:v,_=t.inlineImages,w=void 0!==_&&_,k=t.recordCanvas,S=void 0!==k&&k,x=t.onSerialize,C=t.onIframeLoad,E=t.iframeLoadTimeout,N=void 0===E?5e3:E,O=t.onStylesheetLoad,A=t.stylesheetLoadTimeout,R=void 0===A?5e3:A,M=t.keepIframeSrcFn,T=void 0===M?function(){return!1}:M,D=t.newlyAddedElement,F=void 0!==D&&D,U=t.cssCaptured,q=void 0!==U&&U,V=t.needsMask,W=t.preserveWhiteSpace,H=void 0===W||W;V||(V=me(e,s,a,void 0===V));var G,K=ve(e,{doc:n,mirror:r,blockClass:i,blockSelector:o,needsMask:V,inlineStylesheet:p,maskInputOptions:h,maskTextFn:f,maskInputFn:g,dataURLOptions:y,inlineImages:w,recordCanvas:S,keepIframeSrcFn:T,newlyAddedElement:F,cssCaptured:q});if(!K)return console.warn(e,"not serialized"),null;G=r.hasNode(e)?r.getId(e):function(e,t){if(t.comment&&e.type===I.Comment)return!0;if(e.type===I.Element){if(t.script&&("script"===e.tagName||"link"===e.tagName&&("preload"===e.attributes.rel&&"script"===e.attributes.as||"modulepreload"===e.attributes.rel)||"link"===e.tagName&&"prefetch"===e.attributes.rel&&"string"==typeof e.attributes.href&&"js"===Y(e.attributes.href)))return!0;if(t.headFavicon&&("link"===e.tagName&&"shortcut icon"===e.attributes.rel||"meta"===e.tagName&&(ye(e.attributes.name).match(/^msapplication-tile(image|color)$/)||"application-name"===ye(e.attributes.name)||"icon"===ye(e.attributes.rel)||"apple-touch-icon"===ye(e.attributes.rel)||"shortcut icon"===ye(e.attributes.rel))))return!0;if("meta"===e.tagName){if(t.headMetaDescKeywords&&ye(e.attributes.name).match(/^description|keywords$/))return!0;if(t.headMetaSocial&&(ye(e.attributes.property).match(/^(og|twitter|fb):/)||ye(e.attributes.name).match(/^(og|twitter):/)||"pinterest"===ye(e.attributes.name)))return!0;if(t.headMetaRobots&&("robots"===ye(e.attributes.name)||"googlebot"===ye(e.attributes.name)||"bingbot"===ye(e.attributes.name)))return!0;if(t.headMetaHttpEquiv&&void 0!==e.attributes["http-equiv"])return!0;if(t.headMetaAuthorship&&("author"===ye(e.attributes.name)||"generator"===ye(e.attributes.name)||"framework"===ye(e.attributes.name)||"publisher"===ye(e.attributes.name)||"progid"===ye(e.attributes.name)||ye(e.attributes.property).match(/^article:/)||ye(e.attributes.property).match(/^product:/)))return!0;if(t.headMetaVerification&&("google-site-verification"===ye(e.attributes.name)||"yandex-verification"===ye(e.attributes.name)||"csrf-token"===ye(e.attributes.name)||"p:domain_verify"===ye(e.attributes.name)||"verify-v1"===ye(e.attributes.name)||"verification"===ye(e.attributes.name)||"shopify-checkout-api-token"===ye(e.attributes.name)))return!0}}return!1}(K,m)||!H&&K.type===I.Text&&!K.textContent.replace(/^\s+|\s+$/gm,"").length?-2:ae();var J=Object.assign(K,{id:G});if(r.add(e,J),-2===G)return null;x&&x(e);var Z=!l;if(J.type===I.Element){Z=Z&&!J.needBlock,delete J.needBlock;var X=j(e);X&&z(X)&&(J.isShadowHost=!0)}if((J.type===I.Document||J.type===I.Element)&&Z){m.headWhitespace&&J.type===I.Element&&"head"===J.tagName&&(H=!1);var Q={doc:n,mirror:r,blockClass:i,blockSelector:o,needsMask:V,maskTextClass:s,maskTextSelector:a,skipChild:l,inlineStylesheet:p,maskInputOptions:h,maskTextFn:f,maskInputFn:g,slimDOMOptions:m,dataURLOptions:y,inlineImages:w,recordCanvas:S,preserveWhiteSpace:H,onSerialize:x,onIframeLoad:C,iframeLoadTimeout:N,onStylesheetLoad:O,stylesheetLoadTimeout:R,keepIframeSrcFn:T,cssCaptured:!1};if(J.type===I.Element&&"textarea"===J.tagName&&void 0!==J.attributes.value);else{J.type===I.Element&&void 0!==J.attributes._cssText&&"string"==typeof J.attributes._cssText&&(Q.cssCaptured=!0);for(var ee,te=b(Array.from(P(e)));!(ee=te()).done;){var ne=be(ee.value,Q);ne&&J.childNodes.push(ne)}}var re=null;if(B(e)&&(re=j(e)))for(var ie,oe=b(Array.from(P(re)));!(ie=oe()).done;){var se=be(ie.value,Q);se&&(z(re)&&(se.isShadow=!0),J.childNodes.push(se))}}var ce=L(e);return ce&&$(ce)&&z(ce)&&(J.isShadow=!0),J.type===I.Element&&"iframe"===J.tagName&&function(e,t,n){var r=e.contentWindow;if(r){var i,o=!1;try{i=r.document.readyState}catch(e){return}if("complete"===i){var s="about:blank";if(r.location.href!==s||e.src===s||""===e.src)return setTimeout(t,0),e.addEventListener("load",t);e.addEventListener("load",t)}else{var a=setTimeout(function(){o||(t(),o=!0)},n);e.addEventListener("load",function(){clearTimeout(a),o=!0,t()})}}}(e,function(){var t=e.contentDocument;if(t&&C){var n=be(t,{doc:t,mirror:r,blockClass:i,blockSelector:o,needsMask:V,maskTextClass:s,maskTextSelector:a,skipChild:!1,inlineStylesheet:p,maskInputOptions:h,maskTextFn:f,maskInputFn:g,slimDOMOptions:m,dataURLOptions:y,inlineImages:w,recordCanvas:S,preserveWhiteSpace:H,onSerialize:x,onIframeLoad:C,iframeLoadTimeout:N,onStylesheetLoad:O,stylesheetLoadTimeout:R,keepIframeSrcFn:T});n&&C(e,n)}},N),J.type===I.Element&&"link"===J.tagName&&"string"==typeof J.attributes.rel&&("stylesheet"===J.attributes.rel||"preload"===J.attributes.rel&&"string"==typeof J.attributes.href&&"css"===Y(J.attributes.href))&&function(e,t,n){var r,i=!1;try{r=e.sheet}catch(e){return}if(!r){var o=setTimeout(function(){i||(t(),i=!0)},n);e.addEventListener("load",function(){clearTimeout(o),i=!0,t()})}}(e,function(){if(O){var t=be(e,{doc:n,mirror:r,blockClass:i,blockSelector:o,needsMask:V,maskTextClass:s,maskTextSelector:a,skipChild:!1,inlineStylesheet:p,maskInputOptions:h,maskTextFn:f,maskInputFn:g,slimDOMOptions:m,dataURLOptions:y,inlineImages:w,recordCanvas:S,preserveWhiteSpace:H,onSerialize:x,onIframeLoad:C,iframeLoadTimeout:N,onStylesheetLoad:O,stylesheetLoadTimeout:R,keepIframeSrcFn:T});t&&O(e,t)}},R),J}function _e(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function we(e){if(e.__esModule)return e;var t=e.default;if("function"==typeof t){var n=function e(){return h(this,e)?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(t){var r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,r.get?r:{enumerable:!0,get:function(){return e[t]}})}),n}var ke={exports:{}},Se=String,xe=function(){return{isColorSupported:!1,reset:Se,bold:Se,dim:Se,italic:Se,underline:Se,inverse:Se,hidden:Se,strikethrough:Se,black:Se,red:Se,green:Se,yellow:Se,blue:Se,magenta:Se,cyan:Se,white:Se,gray:Se,bgBlack:Se,bgRed:Se,bgGreen:Se,bgYellow:Se,bgBlue:Se,bgMagenta:Se,bgCyan:Se,bgWhite:Se}};ke.exports=xe(),ke.exports.createColors=xe;var Ce=ke.exports,Ee=we(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"}))),Ie=Ce,Ne=Ee,Oe=function(e){function t(n,r,i,o,s,a){var c;return(c=e.call(this,n)||this).name="CssSyntaxError",c.reason=n,s&&(c.file=s),o&&(c.source=o),a&&(c.plugin=a),void 0!==r&&void 0!==i&&("number"==typeof r?(c.line=r,c.column=i):(c.line=r.line,c.column=r.column,c.endLine=i.line,c.endColumn=i.column)),c.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(c,t),c}d(t,e);var n=t.prototype;return n.setMessage=function(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"",void 0!==this.line&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason},n.showSourceCode=function(e){var t=this;if(!this.source)return"";var n=this.source;null==e&&(e=Ie.isColorSupported),Ne&&e&&(n=Ne(n));var r,i,o=n.split(/\r?\n/),s=Math.max(this.line-3,0),a=Math.min(this.line+2,o.length),c=String(a).length;if(e){var l=Ie.createColors(!0),u=l.bold,p=l.gray,d=l.red;r=function(e){return u(d(e))},i=function(e){return p(e)}}else r=i=function(e){return e};return o.slice(s,a).map(function(e,n){var o=s+1+n,a=" "+(" "+o).slice(-c)+" | ";if(o===t.line){var l=i(a.replace(/\d/g," "))+e.slice(0,t.column-1).replace(/[^\t]/g," ");return r(">")+i(a)+e+"\n "+l+r("^")}return" "+i(a)+e}).join("\n")},n.toString=function(){var e=this.showSourceCode();return e&&(e="\n\n"+e+"\n"),this.name+": "+this.message+e},t}(v(Error)),Ae=Oe;Oe.default=Oe;var Re={};Re.isClean=Symbol("isClean"),Re.my=Symbol("my");var Me={after:"\n",beforeClose:"\n",beforeComment:"\n",beforeDecl:"\n",beforeOpen:" ",beforeRule:"\n",colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1},Te=function(){function e(e){this.builder=e}var t=e.prototype;return t.atrule=function(e,t){var n="@"+e.name,r=e.params?this.rawValue(e,"params"):"";if(void 0!==e.raws.afterName?n+=e.raws.afterName:r&&(n+=" "),e.nodes)this.block(e,n+r);else{var i=(e.raws.between||"")+(t?";":"");this.builder(n+r+i,e)}},t.beforeAfter=function(e,t){var n;n="decl"===e.type?this.raw(e,null,"beforeDecl"):"comment"===e.type?this.raw(e,null,"beforeComment"):"before"===t?this.raw(e,null,"beforeRule"):this.raw(e,null,"beforeClose");for(var r=e.parent,i=0;r&&"root"!==r.type;)i+=1,r=r.parent;if(n.includes("\n")){var o=this.raw(e,null,"indent");if(o.length)for(var s=0;s0&&"comment"===e.nodes[t].type;)t-=1;for(var n=this.raw(e,"semicolon"),r=0;r0&&void 0!==e.raws.after)return(t=e.raws.after).includes("\n")&&(t=t.replace(/[^\n]+$/,"")),!1}),t&&(t=t.replace(/\S/g,"")),t},t.rawBeforeComment=function(e,t){var n;return e.walkComments(function(e){if(void 0!==e.raws.before)return(n=e.raws.before).includes("\n")&&(n=n.replace(/[^\n]+$/,"")),!1}),void 0===n?n=this.raw(t,null,"beforeDecl"):n&&(n=n.replace(/\S/g,"")),n},t.rawBeforeDecl=function(e,t){var n;return e.walkDecls(function(e){if(void 0!==e.raws.before)return(n=e.raws.before).includes("\n")&&(n=n.replace(/[^\n]+$/,"")),!1}),void 0===n?n=this.raw(t,null,"beforeRule"):n&&(n=n.replace(/\S/g,"")),n},t.rawBeforeOpen=function(e){var t;return e.walk(function(e){if("decl"!==e.type&&void 0!==(t=e.raws.between))return!1}),t},t.rawBeforeRule=function(e){var t;return e.walk(function(n){if(n.nodes&&(n.parent!==e||e.first!==n)&&void 0!==n.raws.before)return(t=n.raws.before).includes("\n")&&(t=t.replace(/[^\n]+$/,"")),!1}),t&&(t=t.replace(/\S/g,"")),t},t.rawColon=function(e){var t;return e.walkDecls(function(e){if(void 0!==e.raws.between)return t=e.raws.between.replace(/[^\s:]/g,""),!1}),t},t.rawEmptyBody=function(e){var t;return e.walk(function(e){if(e.nodes&&0===e.nodes.length&&void 0!==(t=e.raws.after))return!1}),t},t.rawIndent=function(e){return e.raws.indent?e.raws.indent:(e.walk(function(n){var r=n.parent;if(r&&r!==e&&r.parent&&r.parent===e&&void 0!==n.raws.before){var i=n.raws.before.split("\n");return t=(t=i[i.length-1]).replace(/\S/g,""),!1}}),t);var t},t.rawSemicolon=function(e){var t;return e.walk(function(e){if(e.nodes&&e.nodes.length&&"decl"===e.last.type&&void 0!==(t=e.raws.semicolon))return!1}),t},t.rawValue=function(e,t){var n=e[t],r=e.raws[t];return r&&r.value===n?r.raw:n},t.root=function(e){this.body(e),e.raws.after&&this.builder(e.raws.after)},t.rule=function(e){this.block(e,this.rawValue(e,"selector")),e.raws.ownSemicolon&&this.builder(e.raws.ownSemicolon,e,"end")},t.stringify=function(e,t){if(!this[e.type])throw new Error("Unknown AST node type "+e.type+". Maybe you need to change PostCSS stringifier.");this[e.type](e,t)},e}(),Pe=Te;Te.default=Te;var Le=Pe;function De(e,t){new Le(t).stringify(e)}var Fe=De;De.default=De;var Ue=Re.isClean,je=Re.my,Be=Ae,$e=Pe,ze=Fe;function qe(e,t){var n=new e.constructor;for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)&&"proxyCache"!==r){var i=e[r],o=void 0===i?"undefined":m(i);"parent"===r&&"object"===o?t&&(n[r]=t):"source"===r?n[r]=i:Array.isArray(i)?n[r]=i.map(function(e){return qe(e,n)}):("object"===o&&null!==i&&(i=qe(i)),n[r]=i)}return n}var Ve=function(){function e(e){for(var t in void 0===e&&(e={}),this.raws={},this[Ue]=!1,this[je]=!0,e)if("nodes"===t){this.nodes=[];for(var n,r=b(e[t]);!(n=r()).done;){var i=n.value;"function"==typeof i.clone?this.append(i.clone()):this.append(i)}}else this[t]=e[t]}var t=e.prototype;return t.addToError=function(e){if(e.postcssNode=this,e.stack&&this.source&&/\n\s{4}at /.test(e.stack)){var t=this.source;e.stack=e.stack.replace(/\n\s{4}at /,"$&"+t.input.from+":"+t.start.line+":"+t.start.column+"$&")}return e},t.after=function(e){return this.parent.insertAfter(this,e),this},t.assign=function(e){for(var t in void 0===e&&(e={}),e)this[t]=e[t];return this},t.before=function(e){return this.parent.insertBefore(this,e),this},t.cleanRaws=function(e){delete this.raws.before,delete this.raws.after,e||delete this.raws.between},t.clone=function(e){void 0===e&&(e={});var t=qe(this);for(var n in e)t[n]=e[n];return t},t.cloneAfter=function(e){void 0===e&&(e={});var t=this.clone(e);return this.parent.insertAfter(this,t),t},t.cloneBefore=function(e){void 0===e&&(e={});var t=this.clone(e);return this.parent.insertBefore(this,t),t},t.error=function(e,t){if(void 0===t&&(t={}),this.source){var n=this.rangeBy(t),r=n.end,i=n.start;return this.source.input.error(e,{column:i.column,line:i.line},{column:r.column,line:r.line},t)}return new Be(e)},t.getProxyProcessor=function(){return{get:function(e,t){return"proxyOf"===t?e:"root"===t?function(){return e.root().toProxy()}:e[t]},set:function(e,t,n){return e[t]===n||(e[t]=n,"prop"!==t&&"value"!==t&&"name"!==t&&"params"!==t&&"important"!==t&&"text"!==t||e.markDirty()),!0}}},t.markDirty=function(){if(this[Ue]){this[Ue]=!1;for(var e=this;e=e.parent;)e[Ue]=!1}},t.next=function(){if(this.parent){var e=this.parent.index(this);return this.parent.nodes[e+1]}},t.positionBy=function(e,t){var n=this.source.start;if(e.index)n=this.positionInside(e.index,t);else if(e.word){var r=(t=this.toString()).indexOf(e.word);-1!==r&&(n=this.positionInside(r,t))}return n},t.positionInside=function(e,t){for(var n=t||this.toString(),r=this.source.start.column,i=this.source.start.line,o=0;o-1&&r>-1&&(this.annotation=this.getAnnotationURL(e.substring(n,r)))}},t.loadFile=function(e){if(this.root=Xe(e),Ye(e))return this.mapFile=e,Ze(e,"utf-8").toString().trim()},t.loadMap=function(e,t){if(!1===t)return!1;if(t){if("string"==typeof t)return t;if("function"!=typeof t){if(h(t,Ke))return Je.fromSourceMap(t).toString();if(h(t,Je))return t.toString();if(this.isMap(t))return JSON.stringify(t);throw new Error("Unsupported previous source map format: "+t.toString())}var n=t(e);if(n){var r=this.loadFile(n);if(!r)throw new Error("Unable to load previous source map: "+n.toString());return r}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){var i=this.annotation;return e&&(i=Qe(Xe(e),i)),this.loadFile(i)}}},t.startWith=function(e,t){return!!e&&e.substr(0,t.length)===t},t.withContent=function(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)},e}(),tt=et;et.default=et;var nt=Ee.SourceMapConsumer,rt=Ee.SourceMapGenerator,it=Ee.fileURLToPath,ot=Ee.pathToFileURL,st=Ee.isAbsolute,at=Ee.resolve,ct=function(e){void 0===e&&(e=21);for(var t="",n=e;n--;)t+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[64*Math.random()|0];return t},lt=Ee,ut=Ae,pt=tt,dt=Symbol("fromOffsetCache"),ht=Boolean(nt&&rt),ft=Boolean(at&&st),gt=function(){function e(e,t){if(void 0===t&&(t={}),null==e||"object"===(void 0===e?"undefined":m(e))&&!e.toString)throw new Error("PostCSS received "+e+" instead of CSS string");if(this.css=e.toString(),"\ufeff"===this.css[0]||"￾"===this.css[0]?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,t.from&&(!ft||/^\w+:\/\//.test(t.from)||st(t.from)?this.file=t.from:this.file=at(t.from)),ft&&ht){var n=new pt(this.css,t);if(n.text){this.map=n;var r=n.consumer().file;!this.file&&r&&(this.file=this.mapResolve(r))}}this.file||(this.id=""),this.map&&(this.map.file=this.from)}var t=e.prototype;return t.error=function(e,t,n,r){var i,o,s;if(void 0===r&&(r={}),t&&"object"===(void 0===t?"undefined":m(t))){var a=t,c=n;if("number"==typeof a.offset){var l=this.fromOffset(a.offset);t=l.line,n=l.col}else t=a.line,n=a.column;if("number"==typeof c.offset){var u=this.fromOffset(c.offset);o=u.line,s=u.col}else o=c.line,s=c.column}else if(!n){var p=this.fromOffset(t);t=p.line,n=p.col}var d=this.origin(t,n,o,s);return(i=d?new ut(e,void 0===d.endLine?d.line:{column:d.column,line:d.line},void 0===d.endLine?d.column:{column:d.endColumn,line:d.endLine},d.source,d.file,r.plugin):new ut(e,void 0===o?t:{column:n,line:t},void 0===o?n:{column:s,line:o},this.css,this.file,r.plugin)).input={column:n,endColumn:s,endLine:o,line:t,source:this.css},this.file&&(ot&&(i.input.url=ot(this.file).toString()),i.input.file=this.file),i},t.fromOffset=function(e){var t;if(this[dt])t=this[dt];else{var n=this.css.split("\n");t=new Array(n.length);for(var r=0,i=0,o=n.length;i=t[t.length-1])s=t.length-1;else for(var a,c=t.length-2;s>1)])c=a-1;else{if(!(e>=t[a+1])){s=a;break}s=a+1}return{col:e-t[s]+1,line:s+1}},t.mapResolve=function(e){return/^\w+:\/\//.test(e)?e:at(this.map.consumer().sourceRoot||this.map.root||".",e)},t.origin=function(e,t,n,r){if(!this.map)return!1;var i,o,s=this.map.consumer(),a=s.originalPositionFor({column:t,line:e});if(!a.source)return!1;"number"==typeof n&&(i=s.originalPositionFor({column:r,line:n})),o=st(a.source)?ot(a.source):new URL(a.source,this.map.consumer().sourceRoot||ot(this.map.mapFile));var c={column:a.column,endColumn:i&&i.column,endLine:i&&i.line,line:a.line,url:o.toString()};if("file:"===o.protocol){if(!it)throw new Error("file: protocol is not available in this PostCSS build");c.file=it(o)}var l=s.sourceContentFor(a.source);return l&&(c.source=l),c},t.toJSON=function(){for(var e={},t=0,n=["hasBOM","css","file","id"];t=0;t--)"comment"===(e=this.root.nodes[t]).type&&0===e.text.indexOf("# sourceMappingURL=")&&this.root.removeChild(t);else this.css&&(this.css=this.css.replace(/\n*?\/\*#[\S\s]*?\*\/$/gm,""))},t.generate=function(){if(this.clearAnnotation(),Et&&Ct&&this.isMap())return this.generateMap();var e="";return this.stringify(this.root,function(t){e+=t}),[e]},t.generateMap=function(){if(this.root)this.generateString();else if(1===this.previous().length){var e=this.previous()[0].consumer();e.file=this.outputFile(),this.map=yt.fromSourceMap(e,{ignoreInvalidMapping:!0})}else this.map=new yt({file:this.outputFile(),ignoreInvalidMapping:!0}),this.map.addMapping({generated:{column:0,line:1},original:{column:0,line:1},source:this.opts.from?this.toUrl(this.path(this.opts.from)):""});return this.isSourcesContent()&&this.setSourcesContent(),this.root&&this.previous().length>0&&this.applyPrevMaps(),this.isAnnotation()&&this.addAnnotation(),this.isInline()?[this.css]:[this.css,this.map]},t.generateString=function(){var e=this;this.css="",this.map=new yt({file:this.outputFile(),ignoreInvalidMapping:!0});var t,n,r=1,i=1,o="",s={generated:{column:0,line:0},original:{column:0,line:0},source:""};this.stringify(this.root,function(a,c,l){if(e.css+=a,c&&"end"!==l&&(s.generated.line=r,s.generated.column=i-1,c.source&&c.source.start?(s.source=e.sourcePath(c),s.original.line=c.source.start.line,s.original.column=c.source.start.column-1,e.map.addMapping(s)):(s.source=o,s.original.line=1,s.original.column=0,e.map.addMapping(s))),(t=a.match(/\n/g))?(r+=t.length,n=a.lastIndexOf("\n"),i=a.length-n):i+=a.length,c&&"start"!==l){var u=c.parent||{raws:{}};("decl"===c.type||"atrule"===c.type&&!c.nodes)&&c===u.last&&!u.raws.semicolon||(c.source&&c.source.end?(s.source=e.sourcePath(c),s.original.line=c.source.end.line,s.original.column=c.source.end.column-1,s.generated.line=r,s.generated.column=i-2,e.map.addMapping(s)):(s.source=o,s.original.line=1,s.original.column=0,s.generated.line=r,s.generated.column=i-1,e.map.addMapping(s)))}})},t.isAnnotation=function(){return!!this.isInline()||(void 0!==this.mapOpts.annotation?this.mapOpts.annotation:!this.previous().length||this.previous().some(function(e){return e.annotation}))},t.isInline=function(){if(void 0!==this.mapOpts.inline)return this.mapOpts.inline;var e=this.mapOpts.annotation;return(void 0===e||!0===e)&&(!this.previous().length||this.previous().some(function(e){return e.inline}))},t.isMap=function(){return void 0!==this.opts.map?!!this.opts.map:this.previous().length>0},t.isSourcesContent=function(){return void 0!==this.mapOpts.sourcesContent?this.mapOpts.sourcesContent:!this.previous().length||this.previous().some(function(e){return e.withContent()})},t.outputFile=function(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"},t.path=function(e){if(this.mapOpts.absolute)return e;if(60===e.charCodeAt(0))return e;if(/^\w+:\/\//.test(e))return e;var t=this.memoizedPaths.get(e);if(t)return t;var n=this.opts.to?bt(this.opts.to):".";"string"==typeof this.mapOpts.annotation&&(n=bt(wt(n,this.mapOpts.annotation)));var r=_t(n,e);return this.memoizedPaths.set(e,r),r},t.previous=function(){var e=this;if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(function(t){if(t.source&&t.source.input.map){var n=t.source.input.map;e.previousMaps.includes(n)||e.previousMaps.push(n)}});else{var t=new xt(this.originalCSS,this.opts);t.map&&this.previousMaps.push(t.map)}return this.previousMaps},t.setSourcesContent=function(){var e=this,t={};if(this.root)this.root.walk(function(n){if(n.source){var r=n.source.input.from;if(r&&!t[r]){t[r]=!0;var i=e.usesFileUrls?e.toFileUrl(r):e.toUrl(e.path(r));e.map.setSourceContent(i,n.source.input.css)}}});else if(this.css){var n=this.opts.from?this.toUrl(this.path(this.opts.from)):"";this.map.setSourceContent(n,this.css)}},t.sourcePath=function(e){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(e.source.input.from):this.toUrl(this.path(e.source.input.from))},t.toBase64=function(e){return Buffer?Buffer.from(e).toString("base64"):window.btoa(unescape(encodeURIComponent(e)))},t.toFileUrl=function(e){var t=this.memoizedFileURLs.get(e);if(t)return t;if(St){var n=St(e).toString();return this.memoizedFileURLs.set(e,n),n}throw new Error("`map.absolute` option is not available in this PostCSS build")},t.toUrl=function(e){var t=this.memoizedURLs.get(e);if(t)return t;"\\"===kt&&(e=e.replace(/\\/g,"/"));var n=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,n),n},e}(),Nt=function(e){function t(t){var n;return(n=e.call(this,t)||this).type="comment",n}return d(t,e),t}(We),Ot=Nt;Nt.default=Nt;var At,Rt,Mt,Tt,Pt=Re.isClean,Lt=Re.my,Dt=Ge,Ft=Ot;function Ut(e){return e.map(function(e){return e.nodes&&(e.nodes=Ut(e.nodes)),delete e.source,e})}function jt(e){if(e[Pt]=!1,e.proxyOf.nodes)for(var t,n=b(e.proxyOf.nodes);!(t=n()).done;)jt(t.value)}var Bt=function(e){function t(){return e.apply(this,arguments)||this}d(t,e);var n=t.prototype;return n.append=function(){for(var e=arguments.length,t=new Array(e),n=0;n1?t-1:0),i=1;i=e&&(this.indexes[n]=t-1);return this.markDirty(),this},n.replaceValues=function(e,t,n){return n||(n=t,t={}),this.walkDecls(function(r){t.props&&!t.props.includes(r.prop)||t.fast&&!r.value.includes(t.fast)||(r.value=r.value.replace(e,n))}),this.markDirty(),this},n.some=function(e){return this.nodes.some(e)},n.walk=function(e){return this.each(function(t,n){var r;try{r=e(t,n)}catch(e){throw t.addToError(e)}return!1!==r&&t.walk&&(r=t.walk(e)),r})},n.walkAtRules=function(e,t){return t?h(e,RegExp)?this.walk(function(n,r){if("atrule"===n.type&&e.test(n.name))return t(n,r)}):this.walk(function(n,r){if("atrule"===n.type&&n.name===e)return t(n,r)}):(t=e,this.walk(function(e,n){if("atrule"===e.type)return t(e,n)}))},n.walkComments=function(e){return this.walk(function(t,n){if("comment"===t.type)return e(t,n)})},n.walkDecls=function(e,t){return t?h(e,RegExp)?this.walk(function(n,r){if("decl"===n.type&&e.test(n.prop))return t(n,r)}):this.walk(function(n,r){if("decl"===n.type&&n.prop===e)return t(n,r)}):(t=e,this.walk(function(e,n){if("decl"===e.type)return t(e,n)}))},n.walkRules=function(e,t){return t?h(e,RegExp)?this.walk(function(n,r){if("rule"===n.type&&e.test(n.selector))return t(n,r)}):this.walk(function(n,r){if("rule"===n.type&&n.selector===e)return t(n,r)}):(t=e,this.walk(function(e,n){if("rule"===e.type)return t(e,n)}))},l(t,[{key:"first",get:function(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}},{key:"last",get:function(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}}]),t}(We);Bt.registerParse=function(e){At=e},Bt.registerRule=function(e){Rt=e},Bt.registerAtRule=function(e){Mt=e},Bt.registerRoot=function(e){Tt=e};var $t=Bt;Bt.default=Bt,Bt.rebuild=function(e){"atrule"===e.type?Object.setPrototypeOf(e,Mt.prototype):"rule"===e.type?Object.setPrototypeOf(e,Rt.prototype):"decl"===e.type?Object.setPrototypeOf(e,Dt.prototype):"comment"===e.type?Object.setPrototypeOf(e,Ft.prototype):"root"===e.type&&Object.setPrototypeOf(e,Tt.prototype),e[Lt]=!0,e.nodes&&e.nodes.forEach(function(e){Bt.rebuild(e)})};var zt,qt,Vt=function(e){function t(t){var n;return(n=e.call(this,u({type:"document"},t))||this).nodes||(n.nodes=[]),n}return d(t,e),t.prototype.toResult=function(e){return void 0===e&&(e={}),new zt(new qt,this,e).stringify()},t}($t);Vt.registerLazyResult=function(e){zt=e},Vt.registerProcessor=function(e){qt=e};var Wt=Vt;Vt.default=Vt;var Ht=function(){function e(e,t){if(void 0===t&&(t={}),this.type="warning",this.text=e,t.node&&t.node.source){var n=t.node.rangeBy(t);this.line=n.start.line,this.column=n.start.column,this.endLine=n.end.line,this.endColumn=n.end.column}for(var r in t)this[r]=t[r]}return e.prototype.toString=function(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text},e}(),Gt=Ht;Ht.default=Ht;var Kt=Gt,Jt=function(){function e(e,t,n){this.processor=e,this.messages=[],this.root=t,this.opts=n,this.css=void 0,this.map=void 0}var t=e.prototype;return t.toString=function(){return this.css},t.warn=function(e,t){void 0===t&&(t={}),t.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(t.plugin=this.lastPlugin.postcssPlugin);var n=new Kt(e,t);return this.messages.push(n),n},t.warnings=function(){return this.messages.filter(function(e){return"warning"===e.type})},l(e,[{key:"content",get:function(){return this.css}}]),e}(),Yt=Jt;Jt.default=Jt;var Zt="'".charCodeAt(0),Xt='"'.charCodeAt(0),Qt="\\".charCodeAt(0),en="/".charCodeAt(0),tn="\n".charCodeAt(0),nn=" ".charCodeAt(0),rn="\f".charCodeAt(0),on="\t".charCodeAt(0),sn="\r".charCodeAt(0),an="[".charCodeAt(0),cn="]".charCodeAt(0),ln="(".charCodeAt(0),un=")".charCodeAt(0),pn="{".charCodeAt(0),dn="}".charCodeAt(0),hn=";".charCodeAt(0),fn="*".charCodeAt(0),gn=":".charCodeAt(0),mn="@".charCodeAt(0),vn=/[\t\n\f\r "#'()/;[\\\]{}]/g,yn=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,bn=/.[\r\n"'(/\\]/,wn=/[\da-f]/i,kn=$t,Sn=function(e){function t(t){var n;return(n=e.call(this,t)||this).type="atrule",n}d(t,e);var n=t.prototype;return n.append=function(){for(var t=arguments.length,n=new Array(t),r=0;r1?n.raws.before=this.nodes[1].raws.before:delete n.raws.before;else if(this.first!==n)for(var o,s=b(i);!(o=s()).done;)o.value.raws.before=n.raws.before;return i},n.removeChild=function(t,n){var r=this.index(t);return!n&&0===r&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[r].raws.before),e.prototype.removeChild.call(this,t)},n.toResult=function(e){return void 0===e&&(e={}),new Cn(new En,this,e).stringify()},t}(In);Nn.registerLazyResult=function(e){Cn=e},Nn.registerProcessor=function(e){En=e};var On=Nn;Nn.default=Nn,In.registerRoot(Nn);var An={comma:function(e){return An.split(e,[","],!0)},space:function(e){return An.split(e,[" ","\n","\t"])},split:function(e,t,n){for(var r,i=[],o="",s=!1,a=0,c=!1,l="",u=!1,p=b(e);!(r=p()).done;){var d=r.value;u?u=!1:"\\"===d?u=!0:c?d===l&&(c=!1):'"'===d||"'"===d?(c=!0,l=d):"("===d?a+=1:")"===d?a>0&&(a-=1):0===a&&t.includes(d)&&(s=!0),s?(""!==o&&i.push(o.trim()),o="",s=!1):o+=d}return(n||""!==o)&&i.push(o.trim()),i}},Rn=An;An.default=An;var Mn=$t,Tn=Rn,Pn=function(e){function t(t){var n;return(n=e.call(this,t)||this).type="rule",n.nodes||(n.nodes=[]),n}return d(t,e),l(t,[{key:"selectors",get:function(){return Tn.comma(this.selector)},set:function(e){var t=this.selector?this.selector.match(/,\s*/):null,n=t?t[0]:","+this.raw("between","beforeOpen");this.selector=e.join(n)}}]),t}(Mn),Ln=Pn;Pn.default=Pn,Mn.registerRule(Pn);var Dn=Ge,Fn=Ot,Un=xn,jn=On,Bn=Ln,$n={empty:!0,space:!0},zn=function(){function e(e){this.input=e,this.root=new jn,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:e,start:{column:1,line:1,offset:0}}}var t=e.prototype;return t.atrule=function(e){var t,n,r,i=new Un;i.name=e[1].slice(1),""===i.name&&this.unnamedAtrule(i,e),this.init(i,e[2]);for(var o=!1,s=!1,a=[],c=[];!this.tokenizer.endOfFile();){if("("===(t=(e=this.tokenizer.nextToken())[0])||"["===t?c.push("("===t?")":"]"):"{"===t&&c.length>0?c.push("}"):t===c[c.length-1]&&c.pop(),0===c.length){if(";"===t){i.source.end=this.getPosition(e[2]),i.source.end.offset++,this.semicolon=!0;break}if("{"===t){s=!0;break}if("}"===t){if(a.length>0){for(n=a[r=a.length-1];n&&"space"===n[0];)n=a[--r];n&&(i.source.end=this.getPosition(n[3]||n[2]),i.source.end.offset++)}this.end(e);break}a.push(e)}else a.push(e);if(this.tokenizer.endOfFile()){o=!0;break}}i.raws.between=this.spacesAndCommentsFromEnd(a),a.length?(i.raws.afterName=this.spacesAndCommentsFromStart(a),this.raw(i,"params",a),o&&(e=a[a.length-1],i.source.end=this.getPosition(e[3]||e[2]),i.source.end.offset++,this.spaces=i.raws.between,i.raws.between="")):(i.raws.afterName="",i.params=""),s&&(i.nodes=[],this.current=i)},t.checkMissedSemicolon=function(e){var t=this.colon(e);if(!1!==t){for(var n,r=0,i=t-1;i>=0&&("space"===(n=e[i])[0]||2!==(r+=1));i--);throw this.input.error("Missed semicolon","word"===n[0]?n[3]+1:n[2])}},t.colon=function(e){for(var t,n,r,i,o=0,s=b(e.entries());!(i=s()).done;){var a=i.value,c=a[0];if("("===(n=(t=a[1])[0])&&(o+=1),")"===n&&(o-=1),0===o&&":"===n){if(r){if("word"===r[0]&&"progid"===r[1])continue;return c}this.doubleColon(t)}r=t}return!1},t.comment=function(e){var t=new Fn;this.init(t,e[2]),t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++;var n=e[1].slice(2,-2);if(/^\s*$/.test(n))t.text="",t.raws.left=n,t.raws.right="";else{var r=n.match(/^(\s*)([^]*\S)(\s*)$/);t.text=r[2],t.raws.left=r[1],t.raws.right=r[3]}},t.createTokenizer=function(){this.tokenizer=function(e,t){void 0===t&&(t={});var n,r,i,o,s,a,c,l,u,p,d=e.css.valueOf(),h=t.ignoreErrors,f=d.length,g=0,m=[],v=[];function y(t){throw e.error("Unclosed "+t,g)}return{back:function(e){v.push(e)},endOfFile:function(){return 0===v.length&&g>=f},nextToken:function(e){if(v.length)return v.pop();if(!(g>=f)){var t=!!e&&e.ignoreUnclosed;switch(n=d.charCodeAt(g)){case tn:case nn:case on:case sn:case rn:r=g;do{r+=1,n=d.charCodeAt(r)}while(n===nn||n===tn||n===on||n===sn||n===rn);p=["space",d.slice(g,r)],g=r-1;break;case an:case cn:case pn:case dn:case gn:case hn:case un:var b=String.fromCharCode(n);p=[b,b,g];break;case ln:if(l=m.length?m.pop()[1]:"",u=d.charCodeAt(g+1),"url"===l&&u!==Zt&&u!==Xt&&u!==nn&&u!==tn&&u!==on&&u!==rn&&u!==sn){r=g;do{if(a=!1,-1===(r=d.indexOf(")",r+1))){if(h||t){r=g;break}y("bracket")}for(c=r;d.charCodeAt(c-1)===Qt;)c-=1,a=!a}while(a);p=["brackets",d.slice(g,r+1),g,r],g=r}else r=d.indexOf(")",g+1),o=d.slice(g,r+1),-1===r||bn.test(o)?p=["(","(",g]:(p=["brackets",o,g,r],g=r);break;case Zt:case Xt:i=n===Zt?"'":'"',r=g;do{if(a=!1,-1===(r=d.indexOf(i,r+1))){if(h||t){r=g+1;break}y("string")}for(c=r;d.charCodeAt(c-1)===Qt;)c-=1,a=!a}while(a);p=["string",d.slice(g,r+1),g,r],g=r;break;case mn:vn.lastIndex=g+1,vn.test(d),r=0===vn.lastIndex?d.length-1:vn.lastIndex-2,p=["at-word",d.slice(g,r+1),g,r],g=r;break;case Qt:for(r=g,s=!0;d.charCodeAt(r+1)===Qt;)r+=1,s=!s;if(n=d.charCodeAt(r+1),s&&n!==en&&n!==nn&&n!==tn&&n!==on&&n!==sn&&n!==rn&&(r+=1,wn.test(d.charAt(r)))){for(;wn.test(d.charAt(r+1));)r+=1;d.charCodeAt(r+1)===nn&&(r+=1)}p=["word",d.slice(g,r+1),g,r],g=r;break;default:n===en&&d.charCodeAt(g+1)===fn?(0===(r=d.indexOf("*/",g+2)+1)&&(h||t?r=d.length:y("comment")),p=["comment",d.slice(g,r+1),g,r],g=r):(yn.lastIndex=g+1,yn.test(d),r=0===yn.lastIndex?d.length-1:yn.lastIndex-2,p=["word",d.slice(g,r+1),g,r],m.push(p),g=r)}return g++,p}},position:function(){return g}}}(this.input)},t.decl=function(e,t){var n=new Dn;this.init(n,e[0][2]);var r,i=e[e.length-1];for(";"===i[0]&&(this.semicolon=!0,e.pop()),n.source.end=this.getPosition(i[3]||i[2]||function(e){for(var t=e.length-1;t>=0;t--){var n=e[t],r=n[3]||n[2];if(r)return r}}(e)),n.source.end.offset++;"word"!==e[0][0];)1===e.length&&this.unknownWord(e),n.raws.before+=e.shift()[1];for(n.source.start=this.getPosition(e[0][2]),n.prop="";e.length;){var o=e[0][0];if(":"===o||"space"===o||"comment"===o)break;n.prop+=e.shift()[1]}for(n.raws.between="";e.length;){if(":"===(r=e.shift())[0]){n.raws.between+=r[1];break}"word"===r[0]&&/\w/.test(r[1])&&this.unknownWord([r]),n.raws.between+=r[1]}"_"!==n.prop[0]&&"*"!==n.prop[0]||(n.raws.before+=n.prop[0],n.prop=n.prop.slice(1));for(var s,a=[];e.length&&("space"===(s=e[0][0])||"comment"===s);)a.push(e.shift());this.precheckMissedSemicolon(e);for(var c=e.length-1;c>=0;c--){if("!important"===(r=e[c])[1].toLowerCase()){n.important=!0;var l=this.stringFrom(e,c);" !important"!==(l=this.spacesFromEnd(e)+l)&&(n.raws.important=l);break}if("important"===r[1].toLowerCase()){for(var u=e.slice(0),p="",d=c;d>0;d--){var h=u[d][0];if(0===p.trim().indexOf("!")&&"space"!==h)break;p=u.pop()[1]+p}0===p.trim().indexOf("!")&&(n.important=!0,n.raws.important=p,e=u)}if("space"!==r[0]&&"comment"!==r[0])break}var f=e.some(function(e){return"space"!==e[0]&&"comment"!==e[0]});f&&(n.raws.between+=a.map(function(e){return e[1]}).join(""),a=[]),this.raw(n,"value",a.concat(e),t),n.value.includes(":")&&!t&&this.checkMissedSemicolon(e)},t.doubleColon=function(e){throw this.input.error("Double colon",{offset:e[2]},{offset:e[2]+e[1].length})},t.emptyRule=function(e){var t=new Bn;this.init(t,e[2]),t.selector="",t.raws.between="",this.current=t},t.end=function(e){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end=this.getPosition(e[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(e)},t.endFile=function(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.root.source.end=this.getPosition(this.tokenizer.position())},t.freeSemicolon=function(e){if(this.spaces+=e[1],this.current.nodes){var t=this.current.nodes[this.current.nodes.length-1];t&&"rule"===t.type&&!t.raws.ownSemicolon&&(t.raws.ownSemicolon=this.spaces,this.spaces="")}},t.getPosition=function(e){var t=this.input.fromOffset(e);return{column:t.col,line:t.line,offset:e}},t.init=function(e,t){this.current.push(e),e.source={input:this.input,start:this.getPosition(t)},e.raws.before=this.spaces,this.spaces="","comment"!==e.type&&(this.semicolon=!1)},t.other=function(e){for(var t=!1,n=null,r=!1,i=null,o=[],s=e[1].startsWith("--"),a=[],c=e;c;){if(n=c[0],a.push(c),"("===n||"["===n)i||(i=c),o.push("("===n?")":"]");else if(s&&r&&"{"===n)i||(i=c),o.push("}");else if(0===o.length){if(";"===n){if(r)return void this.decl(a,s);break}if("{"===n)return void this.rule(a);if("}"===n){this.tokenizer.back(a.pop()),t=!0;break}":"===n&&(r=!0)}else n===o[o.length-1]&&(o.pop(),0===o.length&&(i=null));c=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(t=!0),o.length>0&&this.unclosedBracket(i),t&&r){if(!s)for(;a.length&&("space"===(c=a[a.length-1][0])||"comment"===c);)this.tokenizer.back(a.pop());this.decl(a,s)}else this.unknownWord(a)},t.parse=function(){for(var e;!this.tokenizer.endOfFile();)switch((e=this.tokenizer.nextToken())[0]){case"space":this.spaces+=e[1];break;case";":this.freeSemicolon(e);break;case"}":this.end(e);break;case"comment":this.comment(e);break;case"at-word":this.atrule(e);break;case"{":this.emptyRule(e);break;default:this.other(e)}this.endFile()},t.precheckMissedSemicolon=function(){},t.raw=function(e,t,n,r){for(var i,o,s,a,c=n.length,l="",u=!0,p=0;p0},t.runAsync=function(){var e=this;return a(function(){var t,n,r,i,o,s,a,c,l,u,p,d;return _(this,function(h){switch(h.label){case 0:e.plugin=0,t=0,h.label=1;case 1:if(!(t0))return[3,13];if(!sr(a=e.visitTick(s)))return[3,12];h.label=9;case 9:return h.trys.push([9,11,,12]),[4,a];case 10:return h.sent(),[3,12];case 11:throw c=h.sent(),l=s[s.length-1].node,e.handleError(c,l);case 12:return[3,8];case 13:return[3,7];case 14:if(!e.listeners.OnceExit)return[3,18];u=function(){var t,n,r,i,s;return _(this,function(a){switch(a.label){case 0:t=d.value,n=t[0],r=t[1],e.result.lastPlugin=n,a.label=1;case 1:return a.trys.push([1,6,,7]),"document"!==o.type?[3,3]:(i=o.nodes.map(function(t){return r(t,e.helpers)}),[4,Promise.all(i)]);case 2:return a.sent(),[3,5];case 3:return[4,r(o,e.helpers)];case 4:a.sent(),a.label=5;case 5:return[3,7];case 6:throw s=a.sent(),e.handleError(s);case 7:return[2]}})},p=b(e.listeners.OnceExit),h.label=15;case 15:return(d=p()).done?[3,18]:[5,w(u())];case 16:h.sent(),h.label=17;case 17:return[3,15];case 18:return e.processed=!0,[2,e.stringify()]}})})()},t.runOnRoot=function(e){var t=this;this.result.lastPlugin=e;try{if("object"===(void 0===e?"undefined":m(e))&&e.Once){if("document"===this.result.root.type){var n=this.result.root.nodes.map(function(n){return e.Once(n,t.helpers)});return sr(n[0])?Promise.all(n):n}return e.Once(this.result.root,this.helpers)}if("function"==typeof e)return e(this.result.root,this.result)}catch(e){throw this.handleError(e)}},t.stringify=function(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();var e=this.result.opts,t=Zn;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);var n=new Yn(t,this.result.root,this.result.opts).generate();return this.result.css=n[0],this.result.map=n[1],this.result},t.sync=function(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(var e,t=b(this.plugins);!(e=t()).done;){var n=e.value;if(sr(this.runOnRoot(n)))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){for(var r=this.result.root;!r[Kn];)r[Kn]=!0,this.walkSync(r);if(this.listeners.OnceExit)if("document"===r.type)for(var i,o=b(r.nodes);!(i=o()).done;){var s=i.value;this.visitSync(this.listeners.OnceExit,s)}else this.visitSync(this.listeners.OnceExit,r)}return this.result},t.then=function(e,t){return this.async().then(e,t)},t.toString=function(){return this.css},t.visitSync=function(e,t){for(var n,r=b(e);!(n=r()).done;){var i=n.value,o=i[0],s=i[1];this.result.lastPlugin=o;var a=void 0;try{a=s(t,this.helpers)}catch(e){throw this.handleError(e,t.proxyOf)}if("root"!==t.type&&"document"!==t.type&&!t.parent)return!0;if(sr(a))throw this.getAsyncError()}},t.visitTick=function(e){var t=e[e.length-1],n=t.node,r=t.visitors;if("root"===n.type||"document"===n.type||n.parent){if(r.length>0&&t.visitorIndex",void 0!==this.line&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason},n.showSourceCode=function(e){var t=this;if(!this.source)return"";var n=this.source;null==e&&(e=ui.isColorSupported),pi&&e&&(n=pi(n));var r,i,o=n.split(/\r?\n/),s=Math.max(this.line-3,0),a=Math.min(this.line+2,o.length),c=String(a).length;if(e){var l=ui.createColors(!0),u=l.bold,p=l.gray,d=l.red;r=function(e){return u(d(e))},i=function(e){return p(e)}}else r=i=function(e){return e};return o.slice(s,a).map(function(e,n){var o=s+1+n,a=" "+(" "+o).slice(-c)+" | ";if(o===t.line){var l=i(a.replace(/\d/g," "))+e.slice(0,t.column-1).replace(/[^\t]/g," ");return r(">")+i(a)+e+"\n "+l+r("^")}return" "+i(a)+e}).join("\n")},n.toString=function(){var e=this.showSourceCode();return e&&(e="\n\n"+e+"\n"),this.name+": "+this.message+e},t}(v(Error)),hi=di;di.default=di;var fi={};fi.isClean=Symbol("isClean"),fi.my=Symbol("my");var gi={after:"\n",beforeClose:"\n",beforeComment:"\n",beforeDecl:"\n",beforeOpen:" ",beforeRule:"\n",colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1},mi=function(){function e(e){this.builder=e}var t=e.prototype;return t.atrule=function(e,t){var n="@"+e.name,r=e.params?this.rawValue(e,"params"):"";if(void 0!==e.raws.afterName?n+=e.raws.afterName:r&&(n+=" "),e.nodes)this.block(e,n+r);else{var i=(e.raws.between||"")+(t?";":"");this.builder(n+r+i,e)}},t.beforeAfter=function(e,t){var n;n="decl"===e.type?this.raw(e,null,"beforeDecl"):"comment"===e.type?this.raw(e,null,"beforeComment"):"before"===t?this.raw(e,null,"beforeRule"):this.raw(e,null,"beforeClose");for(var r=e.parent,i=0;r&&"root"!==r.type;)i+=1,r=r.parent;if(n.includes("\n")){var o=this.raw(e,null,"indent");if(o.length)for(var s=0;s0&&"comment"===e.nodes[t].type;)t-=1;for(var n=this.raw(e,"semicolon"),r=0;r0&&void 0!==e.raws.after)return(t=e.raws.after).includes("\n")&&(t=t.replace(/[^\n]+$/,"")),!1}),t&&(t=t.replace(/\S/g,"")),t},t.rawBeforeComment=function(e,t){var n;return e.walkComments(function(e){if(void 0!==e.raws.before)return(n=e.raws.before).includes("\n")&&(n=n.replace(/[^\n]+$/,"")),!1}),void 0===n?n=this.raw(t,null,"beforeDecl"):n&&(n=n.replace(/\S/g,"")),n},t.rawBeforeDecl=function(e,t){var n;return e.walkDecls(function(e){if(void 0!==e.raws.before)return(n=e.raws.before).includes("\n")&&(n=n.replace(/[^\n]+$/,"")),!1}),void 0===n?n=this.raw(t,null,"beforeRule"):n&&(n=n.replace(/\S/g,"")),n},t.rawBeforeOpen=function(e){var t;return e.walk(function(e){if("decl"!==e.type&&void 0!==(t=e.raws.between))return!1}),t},t.rawBeforeRule=function(e){var t;return e.walk(function(n){if(n.nodes&&(n.parent!==e||e.first!==n)&&void 0!==n.raws.before)return(t=n.raws.before).includes("\n")&&(t=t.replace(/[^\n]+$/,"")),!1}),t&&(t=t.replace(/\S/g,"")),t},t.rawColon=function(e){var t;return e.walkDecls(function(e){if(void 0!==e.raws.between)return t=e.raws.between.replace(/[^\s:]/g,""),!1}),t},t.rawEmptyBody=function(e){var t;return e.walk(function(e){if(e.nodes&&0===e.nodes.length&&void 0!==(t=e.raws.after))return!1}),t},t.rawIndent=function(e){return e.raws.indent?e.raws.indent:(e.walk(function(n){var r=n.parent;if(r&&r!==e&&r.parent&&r.parent===e&&void 0!==n.raws.before){var i=n.raws.before.split("\n");return t=(t=i[i.length-1]).replace(/\S/g,""),!1}}),t);var t},t.rawSemicolon=function(e){var t;return e.walk(function(e){if(e.nodes&&e.nodes.length&&"decl"===e.last.type&&void 0!==(t=e.raws.semicolon))return!1}),t},t.rawValue=function(e,t){var n=e[t],r=e.raws[t];return r&&r.value===n?r.raw:n},t.root=function(e){this.body(e),e.raws.after&&this.builder(e.raws.after)},t.rule=function(e){this.block(e,this.rawValue(e,"selector")),e.raws.ownSemicolon&&this.builder(e.raws.ownSemicolon,e,"end")},t.stringify=function(e,t){if(!this[e.type])throw new Error("Unknown AST node type "+e.type+". Maybe you need to change PostCSS stringifier.");this[e.type](e,t)},e}(),vi=mi;mi.default=mi;var yi=vi;function bi(e,t){new yi(t).stringify(e)}var _i=bi;bi.default=bi;var wi=fi.isClean,ki=fi.my,Si=hi,xi=vi,Ci=_i;function Ei(e,t){var n=new e.constructor;for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)&&"proxyCache"!==r){var i=e[r],o=void 0===i?"undefined":m(i);"parent"===r&&"object"===o?t&&(n[r]=t):"source"===r?n[r]=i:Array.isArray(i)?n[r]=i.map(function(e){return Ei(e,n)}):("object"===o&&null!==i&&(i=Ei(i)),n[r]=i)}return n}var Ii=function(){function e(e){for(var t in void 0===e&&(e={}),this.raws={},this[wi]=!1,this[ki]=!0,e)if("nodes"===t){this.nodes=[];for(var n,r=b(e[t]);!(n=r()).done;){var i=n.value;"function"==typeof i.clone?this.append(i.clone()):this.append(i)}}else this[t]=e[t]}var t=e.prototype;return t.addToError=function(e){if(e.postcssNode=this,e.stack&&this.source&&/\n\s{4}at /.test(e.stack)){var t=this.source;e.stack=e.stack.replace(/\n\s{4}at /,"$&"+t.input.from+":"+t.start.line+":"+t.start.column+"$&")}return e},t.after=function(e){return this.parent.insertAfter(this,e),this},t.assign=function(e){for(var t in void 0===e&&(e={}),e)this[t]=e[t];return this},t.before=function(e){return this.parent.insertBefore(this,e),this},t.cleanRaws=function(e){delete this.raws.before,delete this.raws.after,e||delete this.raws.between},t.clone=function(e){void 0===e&&(e={});var t=Ei(this);for(var n in e)t[n]=e[n];return t},t.cloneAfter=function(e){void 0===e&&(e={});var t=this.clone(e);return this.parent.insertAfter(this,t),t},t.cloneBefore=function(e){void 0===e&&(e={});var t=this.clone(e);return this.parent.insertBefore(this,t),t},t.error=function(e,t){if(void 0===t&&(t={}),this.source){var n=this.rangeBy(t),r=n.end,i=n.start;return this.source.input.error(e,{column:i.column,line:i.line},{column:r.column,line:r.line},t)}return new Si(e)},t.getProxyProcessor=function(){return{get:function(e,t){return"proxyOf"===t?e:"root"===t?function(){return e.root().toProxy()}:e[t]},set:function(e,t,n){return e[t]===n||(e[t]=n,"prop"!==t&&"value"!==t&&"name"!==t&&"params"!==t&&"important"!==t&&"text"!==t||e.markDirty()),!0}}},t.markDirty=function(){if(this[wi]){this[wi]=!1;for(var e=this;e=e.parent;)e[wi]=!1}},t.next=function(){if(this.parent){var e=this.parent.index(this);return this.parent.nodes[e+1]}},t.positionBy=function(e,t){var n=this.source.start;if(e.index)n=this.positionInside(e.index,t);else if(e.word){var r=(t=this.toString()).indexOf(e.word);-1!==r&&(n=this.positionInside(r,t))}return n},t.positionInside=function(e,t){for(var n=t||this.toString(),r=this.source.start.column,i=this.source.start.line,o=0;o-1&&r>-1&&(this.annotation=this.getAnnotationURL(e.substring(n,r)))}},t.loadFile=function(e){if(this.root=Li(e),Ti(e))return this.mapFile=e,Pi(e,"utf-8").toString().trim()},t.loadMap=function(e,t){if(!1===t)return!1;if(t){if("string"==typeof t)return t;if("function"!=typeof t){if(h(t,Ri))return Mi.fromSourceMap(t).toString();if(h(t,Mi))return t.toString();if(this.isMap(t))return JSON.stringify(t);throw new Error("Unsupported previous source map format: "+t.toString())}var n=t(e);if(n){var r=this.loadFile(n);if(!r)throw new Error("Unable to load previous source map: "+n.toString());return r}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){var i=this.annotation;return e&&(i=Di(Li(e),i)),this.loadFile(i)}}},t.startWith=function(e,t){return!!e&&e.substr(0,t.length)===t},t.withContent=function(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)},e}(),Ui=Fi;Fi.default=Fi;var ji=li.SourceMapConsumer,Bi=li.SourceMapGenerator,$i=li.fileURLToPath,zi=li.pathToFileURL,qi=li.isAbsolute,Vi=li.resolve,Wi=function(e){void 0===e&&(e=21);for(var t="",n=e;n--;)t+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[64*Math.random()|0];return t},Hi=li,Gi=hi,Ki=Ui,Ji=Symbol("fromOffsetCache"),Yi=Boolean(ji&&Bi),Zi=Boolean(Vi&&qi),Xi=function(){function e(e,t){if(void 0===t&&(t={}),null==e||"object"===(void 0===e?"undefined":m(e))&&!e.toString)throw new Error("PostCSS received "+e+" instead of CSS string");if(this.css=e.toString(),"\ufeff"===this.css[0]||"￾"===this.css[0]?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,t.from&&(!Zi||/^\w+:\/\//.test(t.from)||qi(t.from)?this.file=t.from:this.file=Vi(t.from)),Zi&&Yi){var n=new Ki(this.css,t);if(n.text){this.map=n;var r=n.consumer().file;!this.file&&r&&(this.file=this.mapResolve(r))}}this.file||(this.id=""),this.map&&(this.map.file=this.from)}var t=e.prototype;return t.error=function(e,t,n,r){var i,o,s;if(void 0===r&&(r={}),t&&"object"===(void 0===t?"undefined":m(t))){var a=t,c=n;if("number"==typeof a.offset){var l=this.fromOffset(a.offset);t=l.line,n=l.col}else t=a.line,n=a.column;if("number"==typeof c.offset){var u=this.fromOffset(c.offset);o=u.line,s=u.col}else o=c.line,s=c.column}else if(!n){var p=this.fromOffset(t);t=p.line,n=p.col}var d=this.origin(t,n,o,s);return(i=d?new Gi(e,void 0===d.endLine?d.line:{column:d.column,line:d.line},void 0===d.endLine?d.column:{column:d.endColumn,line:d.endLine},d.source,d.file,r.plugin):new Gi(e,void 0===o?t:{column:n,line:t},void 0===o?n:{column:s,line:o},this.css,this.file,r.plugin)).input={column:n,endColumn:s,endLine:o,line:t,source:this.css},this.file&&(zi&&(i.input.url=zi(this.file).toString()),i.input.file=this.file),i},t.fromOffset=function(e){var t;if(this[Ji])t=this[Ji];else{var n=this.css.split("\n");t=new Array(n.length);for(var r=0,i=0,o=n.length;i=t[t.length-1])s=t.length-1;else for(var a,c=t.length-2;s>1)])c=a-1;else{if(!(e>=t[a+1])){s=a;break}s=a+1}return{col:e-t[s]+1,line:s+1}},t.mapResolve=function(e){return/^\w+:\/\//.test(e)?e:Vi(this.map.consumer().sourceRoot||this.map.root||".",e)},t.origin=function(e,t,n,r){if(!this.map)return!1;var i,o,s=this.map.consumer(),a=s.originalPositionFor({column:t,line:e});if(!a.source)return!1;"number"==typeof n&&(i=s.originalPositionFor({column:r,line:n})),o=qi(a.source)?zi(a.source):new URL(a.source,this.map.consumer().sourceRoot||zi(this.map.mapFile));var c={column:a.column,endColumn:i&&i.column,endLine:i&&i.line,line:a.line,url:o.toString()};if("file:"===o.protocol){if(!$i)throw new Error("file: protocol is not available in this PostCSS build");c.file=$i(o)}var l=s.sourceContentFor(a.source);return l&&(c.source=l),c},t.toJSON=function(){for(var e={},t=0,n=["hasBOM","css","file","id"];t=0;t--)"comment"===(e=this.root.nodes[t]).type&&0===e.text.indexOf("# sourceMappingURL=")&&this.root.removeChild(t);else this.css&&(this.css=this.css.replace(/\n*?\/\*#[\S\s]*?\*\/$/gm,""))},t.generate=function(){if(this.clearAnnotation(),lo&&co&&this.isMap())return this.generateMap();var e="";return this.stringify(this.root,function(t){e+=t}),[e]},t.generateMap=function(){if(this.root)this.generateString();else if(1===this.previous().length){var e=this.previous()[0].consumer();e.file=this.outputFile(),this.map=to.fromSourceMap(e,{ignoreInvalidMapping:!0})}else this.map=new to({file:this.outputFile(),ignoreInvalidMapping:!0}),this.map.addMapping({generated:{column:0,line:1},original:{column:0,line:1},source:this.opts.from?this.toUrl(this.path(this.opts.from)):""});return this.isSourcesContent()&&this.setSourcesContent(),this.root&&this.previous().length>0&&this.applyPrevMaps(),this.isAnnotation()&&this.addAnnotation(),this.isInline()?[this.css]:[this.css,this.map]},t.generateString=function(){var e=this;this.css="",this.map=new to({file:this.outputFile(),ignoreInvalidMapping:!0});var t,n,r=1,i=1,o="",s={generated:{column:0,line:0},original:{column:0,line:0},source:""};this.stringify(this.root,function(a,c,l){if(e.css+=a,c&&"end"!==l&&(s.generated.line=r,s.generated.column=i-1,c.source&&c.source.start?(s.source=e.sourcePath(c),s.original.line=c.source.start.line,s.original.column=c.source.start.column-1,e.map.addMapping(s)):(s.source=o,s.original.line=1,s.original.column=0,e.map.addMapping(s))),(t=a.match(/\n/g))?(r+=t.length,n=a.lastIndexOf("\n"),i=a.length-n):i+=a.length,c&&"start"!==l){var u=c.parent||{raws:{}};("decl"===c.type||"atrule"===c.type&&!c.nodes)&&c===u.last&&!u.raws.semicolon||(c.source&&c.source.end?(s.source=e.sourcePath(c),s.original.line=c.source.end.line,s.original.column=c.source.end.column-1,s.generated.line=r,s.generated.column=i-2,e.map.addMapping(s)):(s.source=o,s.original.line=1,s.original.column=0,s.generated.line=r,s.generated.column=i-1,e.map.addMapping(s)))}})},t.isAnnotation=function(){return!!this.isInline()||(void 0!==this.mapOpts.annotation?this.mapOpts.annotation:!this.previous().length||this.previous().some(function(e){return e.annotation}))},t.isInline=function(){if(void 0!==this.mapOpts.inline)return this.mapOpts.inline;var e=this.mapOpts.annotation;return(void 0===e||!0===e)&&(!this.previous().length||this.previous().some(function(e){return e.inline}))},t.isMap=function(){return void 0!==this.opts.map?!!this.opts.map:this.previous().length>0},t.isSourcesContent=function(){return void 0!==this.mapOpts.sourcesContent?this.mapOpts.sourcesContent:!this.previous().length||this.previous().some(function(e){return e.withContent()})},t.outputFile=function(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"},t.path=function(e){if(this.mapOpts.absolute)return e;if(60===e.charCodeAt(0))return e;if(/^\w+:\/\//.test(e))return e;var t=this.memoizedPaths.get(e);if(t)return t;var n=this.opts.to?no(this.opts.to):".";"string"==typeof this.mapOpts.annotation&&(n=no(io(n,this.mapOpts.annotation)));var r=ro(n,e);return this.memoizedPaths.set(e,r),r},t.previous=function(){var e=this;if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(function(t){if(t.source&&t.source.input.map){var n=t.source.input.map;e.previousMaps.includes(n)||e.previousMaps.push(n)}});else{var t=new ao(this.originalCSS,this.opts);t.map&&this.previousMaps.push(t.map)}return this.previousMaps},t.setSourcesContent=function(){var e=this,t={};if(this.root)this.root.walk(function(n){if(n.source){var r=n.source.input.from;if(r&&!t[r]){t[r]=!0;var i=e.usesFileUrls?e.toFileUrl(r):e.toUrl(e.path(r));e.map.setSourceContent(i,n.source.input.css)}}});else if(this.css){var n=this.opts.from?this.toUrl(this.path(this.opts.from)):"";this.map.setSourceContent(n,this.css)}},t.sourcePath=function(e){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(e.source.input.from):this.toUrl(this.path(e.source.input.from))},t.toBase64=function(e){return Buffer?Buffer.from(e).toString("base64"):window.btoa(unescape(encodeURIComponent(e)))},t.toFileUrl=function(e){var t=this.memoizedFileURLs.get(e);if(t)return t;if(so){var n=so(e).toString();return this.memoizedFileURLs.set(e,n),n}throw new Error("`map.absolute` option is not available in this PostCSS build")},t.toUrl=function(e){var t=this.memoizedURLs.get(e);if(t)return t;"\\"===oo&&(e=e.replace(/\\/g,"/"));var n=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,n),n},e}(),po=function(e){function t(t){var n;return(n=e.call(this,t)||this).type="comment",n}return d(t,e),t}(Ni),ho=po;po.default=po;var fo,go,mo,vo,yo=fi.isClean,bo=fi.my,_o=Ai,wo=ho;function ko(e){return e.map(function(e){return e.nodes&&(e.nodes=ko(e.nodes)),delete e.source,e})}function So(e){if(e[yo]=!1,e.proxyOf.nodes)for(var t,n=b(e.proxyOf.nodes);!(t=n()).done;)So(t.value)}var xo=function(e){function t(){return e.apply(this,arguments)||this}d(t,e);var n=t.prototype;return n.append=function(){for(var e=arguments.length,t=new Array(e),n=0;n1?t-1:0),i=1;i=e&&(this.indexes[n]=t-1);return this.markDirty(),this},n.replaceValues=function(e,t,n){return n||(n=t,t={}),this.walkDecls(function(r){t.props&&!t.props.includes(r.prop)||t.fast&&!r.value.includes(t.fast)||(r.value=r.value.replace(e,n))}),this.markDirty(),this},n.some=function(e){return this.nodes.some(e)},n.walk=function(e){return this.each(function(t,n){var r;try{r=e(t,n)}catch(e){throw t.addToError(e)}return!1!==r&&t.walk&&(r=t.walk(e)),r})},n.walkAtRules=function(e,t){return t?h(e,RegExp)?this.walk(function(n,r){if("atrule"===n.type&&e.test(n.name))return t(n,r)}):this.walk(function(n,r){if("atrule"===n.type&&n.name===e)return t(n,r)}):(t=e,this.walk(function(e,n){if("atrule"===e.type)return t(e,n)}))},n.walkComments=function(e){return this.walk(function(t,n){if("comment"===t.type)return e(t,n)})},n.walkDecls=function(e,t){return t?h(e,RegExp)?this.walk(function(n,r){if("decl"===n.type&&e.test(n.prop))return t(n,r)}):this.walk(function(n,r){if("decl"===n.type&&n.prop===e)return t(n,r)}):(t=e,this.walk(function(e,n){if("decl"===e.type)return t(e,n)}))},n.walkRules=function(e,t){return t?h(e,RegExp)?this.walk(function(n,r){if("rule"===n.type&&e.test(n.selector))return t(n,r)}):this.walk(function(n,r){if("rule"===n.type&&n.selector===e)return t(n,r)}):(t=e,this.walk(function(e,n){if("rule"===e.type)return t(e,n)}))},l(t,[{key:"first",get:function(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}},{key:"last",get:function(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}}]),t}(Ni);xo.registerParse=function(e){fo=e},xo.registerRule=function(e){go=e},xo.registerAtRule=function(e){mo=e},xo.registerRoot=function(e){vo=e};var Co=xo;xo.default=xo,xo.rebuild=function(e){"atrule"===e.type?Object.setPrototypeOf(e,mo.prototype):"rule"===e.type?Object.setPrototypeOf(e,go.prototype):"decl"===e.type?Object.setPrototypeOf(e,_o.prototype):"comment"===e.type?Object.setPrototypeOf(e,wo.prototype):"root"===e.type&&Object.setPrototypeOf(e,vo.prototype),e[bo]=!0,e.nodes&&e.nodes.forEach(function(e){xo.rebuild(e)})};var Eo,Io,No=function(e){function t(t){var n;return(n=e.call(this,u({type:"document"},t))||this).nodes||(n.nodes=[]),n}return d(t,e),t.prototype.toResult=function(e){return void 0===e&&(e={}),new Eo(new Io,this,e).stringify()},t}(Co);No.registerLazyResult=function(e){Eo=e},No.registerProcessor=function(e){Io=e};var Oo=No;No.default=No;var Ao=function(){function e(e,t){if(void 0===t&&(t={}),this.type="warning",this.text=e,t.node&&t.node.source){var n=t.node.rangeBy(t);this.line=n.start.line,this.column=n.start.column,this.endLine=n.end.line,this.endColumn=n.end.column}for(var r in t)this[r]=t[r]}return e.prototype.toString=function(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text},e}(),Ro=Ao;Ao.default=Ao;var Mo=Ro,To=function(){function e(e,t,n){this.processor=e,this.messages=[],this.root=t,this.opts=n,this.css=void 0,this.map=void 0}var t=e.prototype;return t.toString=function(){return this.css},t.warn=function(e,t){void 0===t&&(t={}),t.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(t.plugin=this.lastPlugin.postcssPlugin);var n=new Mo(e,t);return this.messages.push(n),n},t.warnings=function(){return this.messages.filter(function(e){return"warning"===e.type})},l(e,[{key:"content",get:function(){return this.css}}]),e}(),Po=To;To.default=To;var Lo="'".charCodeAt(0),Do='"'.charCodeAt(0),Fo="\\".charCodeAt(0),Uo="/".charCodeAt(0),jo="\n".charCodeAt(0),Bo=" ".charCodeAt(0),$o="\f".charCodeAt(0),zo="\t".charCodeAt(0),qo="\r".charCodeAt(0),Vo="[".charCodeAt(0),Wo="]".charCodeAt(0),Ho="(".charCodeAt(0),Go=")".charCodeAt(0),Ko="{".charCodeAt(0),Jo="}".charCodeAt(0),Yo=";".charCodeAt(0),Zo="*".charCodeAt(0),Xo=":".charCodeAt(0),Qo="@".charCodeAt(0),es=/[\t\n\f\r "#'()/;[\\\]{}]/g,ts=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,ns=/.[\r\n"'(/\\]/,rs=/[\da-f]/i,is=Co,os=function(e){function t(t){var n;return(n=e.call(this,t)||this).type="atrule",n}d(t,e);var n=t.prototype;return n.append=function(){for(var t=arguments.length,n=new Array(t),r=0;r1?n.raws.before=this.nodes[1].raws.before:delete n.raws.before;else if(this.first!==n)for(var o,s=b(i);!(o=s()).done;)o.value.raws.before=n.raws.before;return i},n.removeChild=function(t,n){var r=this.index(t);return!n&&0===r&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[r].raws.before),e.prototype.removeChild.call(this,t)},n.toResult=function(e){return void 0===e&&(e={}),new as(new cs,this,e).stringify()},t}(ls);us.registerLazyResult=function(e){as=e},us.registerProcessor=function(e){cs=e};var ps=us;us.default=us,ls.registerRoot(us);var ds={comma:function(e){return ds.split(e,[","],!0)},space:function(e){return ds.split(e,[" ","\n","\t"])},split:function(e,t,n){for(var r,i=[],o="",s=!1,a=0,c=!1,l="",u=!1,p=b(e);!(r=p()).done;){var d=r.value;u?u=!1:"\\"===d?u=!0:c?d===l&&(c=!1):'"'===d||"'"===d?(c=!0,l=d):"("===d?a+=1:")"===d?a>0&&(a-=1):0===a&&t.includes(d)&&(s=!0),s?(""!==o&&i.push(o.trim()),o="",s=!1):o+=d}return(n||""!==o)&&i.push(o.trim()),i}},hs=ds;ds.default=ds;var fs=Co,gs=hs,ms=function(e){function t(t){var n;return(n=e.call(this,t)||this).type="rule",n.nodes||(n.nodes=[]),n}return d(t,e),l(t,[{key:"selectors",get:function(){return gs.comma(this.selector)},set:function(e){var t=this.selector?this.selector.match(/,\s*/):null,n=t?t[0]:","+this.raw("between","beforeOpen");this.selector=e.join(n)}}]),t}(fs),vs=ms;ms.default=ms,fs.registerRule(ms);var ys=Ai,bs=ho,_s=ss,ws=ps,ks=vs,Ss={empty:!0,space:!0},xs=function(){function e(e){this.input=e,this.root=new ws,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:e,start:{column:1,line:1,offset:0}}}var t=e.prototype;return t.atrule=function(e){var t,n,r,i=new _s;i.name=e[1].slice(1),""===i.name&&this.unnamedAtrule(i,e),this.init(i,e[2]);for(var o=!1,s=!1,a=[],c=[];!this.tokenizer.endOfFile();){if("("===(t=(e=this.tokenizer.nextToken())[0])||"["===t?c.push("("===t?")":"]"):"{"===t&&c.length>0?c.push("}"):t===c[c.length-1]&&c.pop(),0===c.length){if(";"===t){i.source.end=this.getPosition(e[2]),i.source.end.offset++,this.semicolon=!0;break}if("{"===t){s=!0;break}if("}"===t){if(a.length>0){for(n=a[r=a.length-1];n&&"space"===n[0];)n=a[--r];n&&(i.source.end=this.getPosition(n[3]||n[2]),i.source.end.offset++)}this.end(e);break}a.push(e)}else a.push(e);if(this.tokenizer.endOfFile()){o=!0;break}}i.raws.between=this.spacesAndCommentsFromEnd(a),a.length?(i.raws.afterName=this.spacesAndCommentsFromStart(a),this.raw(i,"params",a),o&&(e=a[a.length-1],i.source.end=this.getPosition(e[3]||e[2]),i.source.end.offset++,this.spaces=i.raws.between,i.raws.between="")):(i.raws.afterName="",i.params=""),s&&(i.nodes=[],this.current=i)},t.checkMissedSemicolon=function(e){var t=this.colon(e);if(!1!==t){for(var n,r=0,i=t-1;i>=0&&("space"===(n=e[i])[0]||2!==(r+=1));i--);throw this.input.error("Missed semicolon","word"===n[0]?n[3]+1:n[2])}},t.colon=function(e){for(var t,n,r,i,o=0,s=b(e.entries());!(i=s()).done;){var a=i.value,c=a[0];if("("===(n=(t=a[1])[0])&&(o+=1),")"===n&&(o-=1),0===o&&":"===n){if(r){if("word"===r[0]&&"progid"===r[1])continue;return c}this.doubleColon(t)}r=t}return!1},t.comment=function(e){var t=new bs;this.init(t,e[2]),t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++;var n=e[1].slice(2,-2);if(/^\s*$/.test(n))t.text="",t.raws.left=n,t.raws.right="";else{var r=n.match(/^(\s*)([^]*\S)(\s*)$/);t.text=r[2],t.raws.left=r[1],t.raws.right=r[3]}},t.createTokenizer=function(){this.tokenizer=function(e,t){void 0===t&&(t={});var n,r,i,o,s,a,c,l,u,p,d=e.css.valueOf(),h=t.ignoreErrors,f=d.length,g=0,m=[],v=[];function y(t){throw e.error("Unclosed "+t,g)}return{back:function(e){v.push(e)},endOfFile:function(){return 0===v.length&&g>=f},nextToken:function(e){if(v.length)return v.pop();if(!(g>=f)){var t=!!e&&e.ignoreUnclosed;switch(n=d.charCodeAt(g)){case jo:case Bo:case zo:case qo:case $o:r=g;do{r+=1,n=d.charCodeAt(r)}while(n===Bo||n===jo||n===zo||n===qo||n===$o);p=["space",d.slice(g,r)],g=r-1;break;case Vo:case Wo:case Ko:case Jo:case Xo:case Yo:case Go:var b=String.fromCharCode(n);p=[b,b,g];break;case Ho:if(l=m.length?m.pop()[1]:"",u=d.charCodeAt(g+1),"url"===l&&u!==Lo&&u!==Do&&u!==Bo&&u!==jo&&u!==zo&&u!==$o&&u!==qo){r=g;do{if(a=!1,-1===(r=d.indexOf(")",r+1))){if(h||t){r=g;break}y("bracket")}for(c=r;d.charCodeAt(c-1)===Fo;)c-=1,a=!a}while(a);p=["brackets",d.slice(g,r+1),g,r],g=r}else r=d.indexOf(")",g+1),o=d.slice(g,r+1),-1===r||ns.test(o)?p=["(","(",g]:(p=["brackets",o,g,r],g=r);break;case Lo:case Do:i=n===Lo?"'":'"',r=g;do{if(a=!1,-1===(r=d.indexOf(i,r+1))){if(h||t){r=g+1;break}y("string")}for(c=r;d.charCodeAt(c-1)===Fo;)c-=1,a=!a}while(a);p=["string",d.slice(g,r+1),g,r],g=r;break;case Qo:es.lastIndex=g+1,es.test(d),r=0===es.lastIndex?d.length-1:es.lastIndex-2,p=["at-word",d.slice(g,r+1),g,r],g=r;break;case Fo:for(r=g,s=!0;d.charCodeAt(r+1)===Fo;)r+=1,s=!s;if(n=d.charCodeAt(r+1),s&&n!==Uo&&n!==Bo&&n!==jo&&n!==zo&&n!==qo&&n!==$o&&(r+=1,rs.test(d.charAt(r)))){for(;rs.test(d.charAt(r+1));)r+=1;d.charCodeAt(r+1)===Bo&&(r+=1)}p=["word",d.slice(g,r+1),g,r],g=r;break;default:n===Uo&&d.charCodeAt(g+1)===Zo?(0===(r=d.indexOf("*/",g+2)+1)&&(h||t?r=d.length:y("comment")),p=["comment",d.slice(g,r+1),g,r],g=r):(ts.lastIndex=g+1,ts.test(d),r=0===ts.lastIndex?d.length-1:ts.lastIndex-2,p=["word",d.slice(g,r+1),g,r],m.push(p),g=r)}return g++,p}},position:function(){return g}}}(this.input)},t.decl=function(e,t){var n=new ys;this.init(n,e[0][2]);var r,i=e[e.length-1];for(";"===i[0]&&(this.semicolon=!0,e.pop()),n.source.end=this.getPosition(i[3]||i[2]||function(e){for(var t=e.length-1;t>=0;t--){var n=e[t],r=n[3]||n[2];if(r)return r}}(e)),n.source.end.offset++;"word"!==e[0][0];)1===e.length&&this.unknownWord(e),n.raws.before+=e.shift()[1];for(n.source.start=this.getPosition(e[0][2]),n.prop="";e.length;){var o=e[0][0];if(":"===o||"space"===o||"comment"===o)break;n.prop+=e.shift()[1]}for(n.raws.between="";e.length;){if(":"===(r=e.shift())[0]){n.raws.between+=r[1];break}"word"===r[0]&&/\w/.test(r[1])&&this.unknownWord([r]),n.raws.between+=r[1]}"_"!==n.prop[0]&&"*"!==n.prop[0]||(n.raws.before+=n.prop[0],n.prop=n.prop.slice(1));for(var s,a=[];e.length&&("space"===(s=e[0][0])||"comment"===s);)a.push(e.shift());this.precheckMissedSemicolon(e);for(var c=e.length-1;c>=0;c--){if("!important"===(r=e[c])[1].toLowerCase()){n.important=!0;var l=this.stringFrom(e,c);" !important"!==(l=this.spacesFromEnd(e)+l)&&(n.raws.important=l);break}if("important"===r[1].toLowerCase()){for(var u=e.slice(0),p="",d=c;d>0;d--){var h=u[d][0];if(0===p.trim().indexOf("!")&&"space"!==h)break;p=u.pop()[1]+p}0===p.trim().indexOf("!")&&(n.important=!0,n.raws.important=p,e=u)}if("space"!==r[0]&&"comment"!==r[0])break}var f=e.some(function(e){return"space"!==e[0]&&"comment"!==e[0]});f&&(n.raws.between+=a.map(function(e){return e[1]}).join(""),a=[]),this.raw(n,"value",a.concat(e),t),n.value.includes(":")&&!t&&this.checkMissedSemicolon(e)},t.doubleColon=function(e){throw this.input.error("Double colon",{offset:e[2]},{offset:e[2]+e[1].length})},t.emptyRule=function(e){var t=new ks;this.init(t,e[2]),t.selector="",t.raws.between="",this.current=t},t.end=function(e){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end=this.getPosition(e[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(e)},t.endFile=function(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.root.source.end=this.getPosition(this.tokenizer.position())},t.freeSemicolon=function(e){if(this.spaces+=e[1],this.current.nodes){var t=this.current.nodes[this.current.nodes.length-1];t&&"rule"===t.type&&!t.raws.ownSemicolon&&(t.raws.ownSemicolon=this.spaces,this.spaces="")}},t.getPosition=function(e){var t=this.input.fromOffset(e);return{column:t.col,line:t.line,offset:e}},t.init=function(e,t){this.current.push(e),e.source={input:this.input,start:this.getPosition(t)},e.raws.before=this.spaces,this.spaces="","comment"!==e.type&&(this.semicolon=!1)},t.other=function(e){for(var t=!1,n=null,r=!1,i=null,o=[],s=e[1].startsWith("--"),a=[],c=e;c;){if(n=c[0],a.push(c),"("===n||"["===n)i||(i=c),o.push("("===n?")":"]");else if(s&&r&&"{"===n)i||(i=c),o.push("}");else if(0===o.length){if(";"===n){if(r)return void this.decl(a,s);break}if("{"===n)return void this.rule(a);if("}"===n){this.tokenizer.back(a.pop()),t=!0;break}":"===n&&(r=!0)}else n===o[o.length-1]&&(o.pop(),0===o.length&&(i=null));c=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(t=!0),o.length>0&&this.unclosedBracket(i),t&&r){if(!s)for(;a.length&&("space"===(c=a[a.length-1][0])||"comment"===c);)this.tokenizer.back(a.pop());this.decl(a,s)}else this.unknownWord(a)},t.parse=function(){for(var e;!this.tokenizer.endOfFile();)switch((e=this.tokenizer.nextToken())[0]){case"space":this.spaces+=e[1];break;case";":this.freeSemicolon(e);break;case"}":this.end(e);break;case"comment":this.comment(e);break;case"at-word":this.atrule(e);break;case"{":this.emptyRule(e);break;default:this.other(e)}this.endFile()},t.precheckMissedSemicolon=function(){},t.raw=function(e,t,n,r){for(var i,o,s,a,c=n.length,l="",u=!0,p=0;p0},t.runAsync=function(){var e=this;return a(function(){var t,n,r,i,o,s,a,c,l,u,p,d;return _(this,function(h){switch(h.label){case 0:e.plugin=0,t=0,h.label=1;case 1:if(!(t0))return[3,13];if(!zs(a=e.visitTick(s)))return[3,12];h.label=9;case 9:return h.trys.push([9,11,,12]),[4,a];case 10:return h.sent(),[3,12];case 11:throw c=h.sent(),l=s[s.length-1].node,e.handleError(c,l);case 12:return[3,8];case 13:return[3,7];case 14:if(!e.listeners.OnceExit)return[3,18];u=function(){var t,n,r,i,s;return _(this,function(a){switch(a.label){case 0:t=d.value,n=t[0],r=t[1],e.result.lastPlugin=n,a.label=1;case 1:return a.trys.push([1,6,,7]),"document"!==o.type?[3,3]:(i=o.nodes.map(function(t){return r(t,e.helpers)}),[4,Promise.all(i)]);case 2:return a.sent(),[3,5];case 3:return[4,r(o,e.helpers)];case 4:a.sent(),a.label=5;case 5:return[3,7];case 6:throw s=a.sent(),e.handleError(s);case 7:return[2]}})},p=b(e.listeners.OnceExit),h.label=15;case 15:return(d=p()).done?[3,18]:[5,w(u())];case 16:h.sent(),h.label=17;case 17:return[3,15];case 18:return e.processed=!0,[2,e.stringify()]}})})()},t.runOnRoot=function(e){var t=this;this.result.lastPlugin=e;try{if("object"===(void 0===e?"undefined":m(e))&&e.Once){if("document"===this.result.root.type){var n=this.result.root.nodes.map(function(n){return e.Once(n,t.helpers)});return zs(n[0])?Promise.all(n):n}return e.Once(this.result.root,this.helpers)}if("function"==typeof e)return e(this.result.root,this.result)}catch(e){throw this.handleError(e)}},t.stringify=function(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();var e=this.result.opts,t=Ts;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);var n=new Ms(t,this.result.root,this.result.opts).generate();return this.result.css=n[0],this.result.map=n[1],this.result},t.sync=function(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(var e,t=b(this.plugins);!(e=t()).done;){var n=e.value;if(zs(this.runOnRoot(n)))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){for(var r=this.result.root;!r[As];)r[As]=!0,this.walkSync(r);if(this.listeners.OnceExit)if("document"===r.type)for(var i,o=b(r.nodes);!(i=o()).done;){var s=i.value;this.visitSync(this.listeners.OnceExit,s)}else this.visitSync(this.listeners.OnceExit,r)}return this.result},t.then=function(e,t){return this.async().then(e,t)},t.toString=function(){return this.css},t.visitSync=function(e,t){for(var n,r=b(e);!(n=r()).done;){var i=n.value,o=i[0],s=i[1];this.result.lastPlugin=o;var a=void 0;try{a=s(t,this.helpers)}catch(e){throw this.handleError(e,t.proxyOf)}if("root"!==t.type&&"document"!==t.type&&!t.parent)return!0;if(zs(a))throw this.getAsyncError()}},t.visitTick=function(e){var t=e[e.length-1],n=t.node,r=t.visitors;if("root"===n.type||"document"===n.type||n.parent){if(r.length>0&&t.visitorIndext?(r&&(clearTimeout(r),r=null),i=c,e.apply(u,s)):r||!1===n.trailing||(r=setTimeout(function(){i=!1===n.leading?0:Date.now(),r=null,e.apply(u,s)},l))}}function sc(e,t,n,r,i){void 0===i&&(i=window);var o=i.Object.getOwnPropertyDescriptor(e,t);return i.Object.defineProperty(e,t,r?n:{set:function(e){var t=this;setTimeout(function(){n.set.call(t,e)},0),o&&o.set&&o.set.call(this,e)}}),function(){return sc(e,t,o||{},!0)}}"undefined"!=typeof window&&window.Proxy&&window.Reflect&&(ic=new Proxy(ic,{get:function(e,t,n){return"map"===t&&console.error(rc),Reflect.get(e,t,n)}}));var ac=Date.now;function cc(e){var t,n,r,i,o=e.document;return{left:o.scrollingElement?o.scrollingElement.scrollLeft:void 0!==e.pageXOffset?e.pageXOffset:o.documentElement.scrollLeft||(null==o?void 0:o.body)&&(null==(t=Ya(o.body))?void 0:t.scrollLeft)||(null==(n=null==o?void 0:o.body)?void 0:n.scrollLeft)||0,top:o.scrollingElement?o.scrollingElement.scrollTop:void 0!==e.pageYOffset?e.pageYOffset:(null==o?void 0:o.documentElement.scrollTop)||(null==o?void 0:o.body)&&(null==(r=Ya(o.body))?void 0:r.scrollTop)||(null==(i=null==o?void 0:o.body)?void 0:i.scrollTop)||0}}function lc(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function uc(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function pc(e){return e?e.nodeType===e.ELEMENT_NODE?e:Ya(e):null}function dc(e,t,n,r){if(!e)return!1;var i=pc(e);if(!i)return!1;try{if("string"==typeof t){if(i.classList.contains(t))return!0;if(r&&null!==i.closest("."+t))return!0}else if(ge(i,t,r))return!0}catch(e){}if(n){if(i.matches(n))return!0;if(r&&null!==i.closest(n))return!0}return!1}function hc(e,t,n){return!("TITLE"!==e.tagName||!n.headTitleMutations)||-2===t.getId(e)}function fc(e,t){if($(e))return!1;var n=t.getId(e);if(!t.has(n))return!0;var r=Ja(e);return(!r||r.nodeType!==e.DOCUMENT_NODE)&&(!r||fc(r,t))}function gc(e){return Boolean(e.changedTouches)}function mc(e,t){return Boolean("IFRAME"===e.nodeName&&t.getMeta(e))}function vc(e,t){return Boolean("LINK"===e.nodeName&&e.nodeType===e.ELEMENT_NODE&&e.getAttribute&&"stylesheet"===e.getAttribute("rel")&&t.getMeta(e))}function yc(e){return!!e&&(h(e,Fa)&&"shadowRoot"in e?Boolean(e.shadowRoot):Boolean(tc(e)))}/[1-9][0-9]{12}/.test(Date.now().toString())||(ac=function(){return(new Date).getTime()});var bc=function(){function e(){x(this,"id",1),x(this,"styleIDMap",new WeakMap),x(this,"idStyleMap",new Map)}var t=e.prototype;return t.getId=function(e){var t;return null!=(t=this.styleIDMap.get(e))?t:-1},t.has=function(e){return this.styleIDMap.has(e)},t.add=function(e,t){return this.has(e)?this.getId(e):(n=void 0===t?this.id++:t,this.styleIDMap.set(e,n),this.idStyleMap.set(n,e),n);var n},t.getStyle=function(e){return this.idStyleMap.get(e)||null},t.reset=function(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1},t.generateId=function(){return this.id++},e}();function _c(e){var t,n=null;return"getRootNode"in e&&(null==(t=Qa(e))?void 0:t.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&ec(Qa(e))&&(n=ec(Qa(e))),n}function wc(e){var t=e.ownerDocument;return!!t&&(Xa(t,e)||function(e){var t=e.ownerDocument;if(!t)return!1;var n=function(e){for(var t,n=e;t=_c(n);)n=t;return n}(e);return Xa(t,n)}(e))}var kc=function(e){return e[e.DomContentLoaded=0]="DomContentLoaded",e[e.Load=1]="Load",e[e.FullSnapshot=2]="FullSnapshot",e[e.IncrementalSnapshot=3]="IncrementalSnapshot",e[e.Meta=4]="Meta",e[e.Custom=5]="Custom",e[e.Plugin=6]="Plugin",e}(kc||{}),Sc=function(e){return e[e.Mutation=0]="Mutation",e[e.MouseMove=1]="MouseMove",e[e.MouseInteraction=2]="MouseInteraction",e[e.Scroll=3]="Scroll",e[e.ViewportResize=4]="ViewportResize",e[e.Input=5]="Input",e[e.TouchMove=6]="TouchMove",e[e.MediaInteraction=7]="MediaInteraction",e[e.StyleSheetRule=8]="StyleSheetRule",e[e.CanvasMutation=9]="CanvasMutation",e[e.Font=10]="Font",e[e.Log=11]="Log",e[e.Drag=12]="Drag",e[e.StyleDeclaration=13]="StyleDeclaration",e[e.Selection=14]="Selection",e[e.AdoptedStyleSheet=15]="AdoptedStyleSheet",e[e.CustomElement=16]="CustomElement",e}(Sc||{}),xc=function(e){return e[e.MouseUp=0]="MouseUp",e[e.MouseDown=1]="MouseDown",e[e.Click=2]="Click",e[e.ContextMenu=3]="ContextMenu",e[e.DblClick=4]="DblClick",e[e.Focus=5]="Focus",e[e.Blur=6]="Blur",e[e.TouchStart=7]="TouchStart",e[e.TouchMove_Departed=8]="TouchMove_Departed",e[e.TouchEnd=9]="TouchEnd",e[e.TouchCancel=10]="TouchCancel",e}(xc||{}),Cc=function(e){return e[e.Mouse=0]="Mouse",e[e.Pen=1]="Pen",e[e.Touch=2]="Touch",e}(Cc||{}),Ec=function(e){return e[e["2D"]=0]="2D",e[e.WebGL=1]="WebGL",e[e.WebGL2=2]="WebGL2",e}(Ec||{}),Ic=function(e){return e[e.Play=0]="Play",e[e.Pause=1]="Pause",e[e.Seeked=2]="Seeked",e[e.VolumeChange=3]="VolumeChange",e[e.RateChange=4]="RateChange",e}(Ic||{}),Nc=function(e){return e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment",e}(Nc||{});function Oc(e){return"__ln"in e}var Ac,Rc=function(){function e(){x(this,"length",0),x(this,"head",null),x(this,"tail",null)}var t=e.prototype;return t.get=function(e){if(e>=this.length)throw new Error("Position outside of list range");for(var t=this.head,n=0;n0&&this.stylesheetManager.adoptStyleSheets(e.contentDocument.adoptedStyleSheets,this.mirror.getId(e.contentDocument))},t.handleMessage=function(e){var t=e;if("rrweb"===t.data.type&&t.origin===t.data.origin&&e.source){var n=this.crossOriginIframeMap.get(e.source);if(n){var r=this.transformCrossOriginEvent(n,t.data.event);r&&this.wrappedEmit(r,t.data.isCheckout)}}},t.transformCrossOriginEvent=function(e,t){var n,r=this;switch(t.type){case kc.FullSnapshot:this.crossOriginIframeMirror.reset(e),this.crossOriginIframeStyleMirror.reset(e),this.replaceIdOnNode(t.data.node,e);var i=t.data.node.id;return this.crossOriginIframeRootIdMap.set(e,i),this.patchRootIdOnNode(t.data.node,i),{timestamp:t.timestamp,type:kc.IncrementalSnapshot,data:{source:Sc.Mutation,adds:[{parentId:this.mirror.getId(e),nextId:null,node:t.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}};case kc.Meta:case kc.Load:case kc.DomContentLoaded:return!1;case kc.Plugin:return t;case kc.Custom:return this.replaceIds(t.data.payload,e,["id","parentId","previousId","nextId"]),t;case kc.IncrementalSnapshot:switch(t.data.source){case Sc.Mutation:return t.data.adds.forEach(function(t){r.replaceIds(t,e,["parentId","nextId","previousId"]),r.replaceIdOnNode(t.node,e);var n=r.crossOriginIframeRootIdMap.get(e);n&&r.patchRootIdOnNode(t.node,n)}),t.data.removes.forEach(function(t){r.replaceIds(t,e,["parentId","id"])}),t.data.attributes.forEach(function(t){r.replaceIds(t,e,["id"])}),t.data.texts.forEach(function(t){r.replaceIds(t,e,["id"])}),t;case Sc.Drag:case Sc.TouchMove:case Sc.MouseMove:return t.data.positions.forEach(function(t){r.replaceIds(t,e,["id"])}),t;case Sc.ViewportResize:return!1;case Sc.MediaInteraction:case Sc.MouseInteraction:case Sc.Scroll:case Sc.CanvasMutation:case Sc.Input:return this.replaceIds(t.data,e,["id"]),t;case Sc.StyleSheetRule:case Sc.StyleDeclaration:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleId"]),t;case Sc.Font:return t;case Sc.Selection:return t.data.ranges.forEach(function(t){r.replaceIds(t,e,["start","end"])}),t;case Sc.AdoptedStyleSheet:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleIds"]),null==(n=t.data.styles)||n.forEach(function(t){r.replaceStyleIds(t,e,["styleId"])}),t}}return!1},t.replace=function(e,t,n,r){for(var i,o=b(r);!(i=o()).done;){var s=i.value;(Array.isArray(t[s])||"number"==typeof t[s])&&(Array.isArray(t[s])?t[s]=e.getIds(n,t[s]):t[s]=e.getId(n,t[s]))}return t},t.replaceIds=function(e,t,n){return this.replace(this.crossOriginIframeMirror,e,t,n)},t.replaceStyleIds=function(e,t,n){return this.replace(this.crossOriginIframeStyleMirror,e,t,n)},t.replaceIdOnNode=function(e,t){var n=this;this.replaceIds(e,t,["id","rootId"]),"childNodes"in e&&e.childNodes.forEach(function(e){n.replaceIdOnNode(e,t)})},t.patchRootIdOnNode=function(e,t){var n=this;e.type===Nc.Document||e.rootId||(e.rootId=t),"childNodes"in e&&e.childNodes.forEach(function(e){n.patchRootIdOnNode(e,t)})},e}(),Qc=function(){function e(e){x(this,"shadowDoms",new WeakSet),x(this,"mutationCb"),x(this,"scrollCb"),x(this,"bypassOptions"),x(this,"mirror"),x(this,"restoreHandlers",[]),this.mutationCb=e.mutationCb,this.scrollCb=e.scrollCb,this.bypassOptions=e.bypassOptions,this.mirror=e.mirror,this.init()}var t=e.prototype;return t.init=function(){this.reset(),this.patchAttachShadow(Element,document)},t.addShadowRoot=function(e,t){var n=this;if(z(e)&&!this.shadowDoms.has(e)){this.shadowDoms.add(e);var r=$c(u({},this.bypassOptions,{doc:t,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this}),e);this.restoreHandlers.push(function(){return r.disconnect()}),this.restoreHandlers.push(zc(u({},this.bypassOptions,{scrollCb:this.scrollCb,doc:e,mirror:this.mirror}))),setTimeout(function(){e.adoptedStyleSheets&&e.adoptedStyleSheets.length>0&&n.bypassOptions.stylesheetManager.adoptStyleSheets(e.adoptedStyleSheets,n.mirror.getId(ec(e))),n.restoreHandlers.push(Gc({mirror:n.mirror,stylesheetManager:n.bypassOptions.stylesheetManager},e))},0)}},t.observeAttachShadow=function(e){e.contentWindow&&e.contentDocument&&this.patchAttachShadow(e.contentWindow.Element,e.contentDocument)},t.patchAttachShadow=function(e,t){var n=this;this.restoreHandlers.push(Ga(e.prototype,"attachShadow",function(e){return function(r){var i=e.call(this,r),o=tc(this);return o&&wc(this)&&n.addShadowRoot(o,t),i}}))},t.reset=function(){this.restoreHandlers.forEach(function(e){try{e()}catch(e){}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet},e}(),el="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",tl="undefined"==typeof Uint8Array?[]:new Uint8Array(256),nl=0;nl<64;nl++)tl[el.charCodeAt(nl)]=nl;var rl=new Map,il=function(e,t,n){if(e&&(al(e,t)||"object"===(void 0===e?"undefined":m(e)))){var r=function(e,t){var n=rl.get(e);return n||(n=new Map,rl.set(e,n)),n.has(t)||n.set(t,[]),n.get(t)}(n,e.constructor.name),i=r.indexOf(e);return-1===i&&(i=r.length,r.push(e)),i}};function ol(e,t,n){return h(e,Array)?e.map(function(e){return ol(e,t,n)}):null===e?e:h(e,Float32Array)||h(e,Float64Array)||h(e,Int32Array)||h(e,Uint32Array)||h(e,Uint8Array)||h(e,Uint16Array)||h(e,Int16Array)||h(e,Int8Array)||h(e,Uint8ClampedArray)?{rr_type:e.constructor.name,args:[Object.values(e)]}:h(e,ArrayBuffer)?{rr_type:e.constructor.name,base64:function(e){var t,n=new Uint8Array(e),r=n.length,i="";for(t=0;t>2],i+=el[(3&n[t])<<4|n[t+1]>>4],i+=el[(15&n[t+1])<<2|n[t+2]>>6],i+=el[63&n[t+2]];return r%3==2?i=i.substring(0,i.length-1)+"=":r%3==1&&(i=i.substring(0,i.length-2)+"=="),i}(e)}:h(e,DataView)?{rr_type:e.constructor.name,args:[ol(e.buffer,t,n),e.byteOffset,e.byteLength]}:h(e,HTMLImageElement)?{rr_type:e.constructor.name,src:e.src}:h(e,HTMLCanvasElement)?{rr_type:"HTMLImageElement",src:e.toDataURL()}:h(e,ImageData)?{rr_type:e.constructor.name,args:[ol(e.data,t,n),e.width,e.height]}:al(e,t)||"object"===(void 0===e?"undefined":m(e))?{rr_type:e.constructor.name,index:il(e,t,n)}:e}var sl=function(e,t,n){return e.map(function(e){return ol(e,t,n)})},al=function(e,t){var n=["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter(function(e){return"function"==typeof t[e]});return Boolean(n.find(function(n){return h(e,t[n])}))};function cl(e,t,n,r){var i=[];try{var o=Ga(e.HTMLCanvasElement.prototype,"getContext",function(e){return function(i){for(var o=arguments.length,s=new Array(o>1?o-1:0),a=1;a0&&(o.styles=s),this.adoptedStyleSheetCb(o)}},t.reset=function(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet},t.trackStylesheetInLinkElement=function(e){},e}(),bl=function(){function e(){x(this,"nodeMap",new WeakMap),x(this,"active",!1)}var t=e.prototype;return t.inOtherBuffer=function(e,t){var n=this.nodeMap.get(e);return n&&Array.from(n).some(function(e){return e!==t})},t.add=function(e,t){var n=this;this.active||(this.active=!0,requestAnimationFrame(function(){n.nodeMap=new WeakMap,n.active=!1})),this.nodeMap.set(e,(this.nodeMap.get(e)||new Set).add(t))},t.destroy=function(){},e}(),_l=!1;try{if(2!==Array.from([1],function(e){return 2*e})[0]){var wl=document.createElement("iframe");document.body.appendChild(wl),Array.from=(null==(k=wl.contentWindow)?void 0:k.Array.from)||Array.from,document.body.removeChild(wl)}}catch(e){console.debug("Unable to override Array.from",e)}var kl,Sl,xl=new W;function Cl(e){void 0===e&&(e={});var t=e.emit,n=e.checkoutEveryNms,r=e.checkoutEveryNth,i=e.blockClass,o=void 0===i?"rr-block":i,s=e.blockSelector,a=void 0===s?null:s,c=e.ignoreClass,l=void 0===c?"rr-ignore":c,p=e.ignoreSelector,d=void 0===p?null:p,h=e.maskTextClass,f=void 0===h?"rr-mask":h,g=e.maskTextSelector,m=void 0===g?null:g,v=e.inlineStylesheet,y=void 0===v||v,_=e.maskAllInputs,w=e.maskInputOptions,k=e.slimDOMOptions,S=e.maskInputFn,x=e.maskTextFn,C=e.hooks,E=e.packFn,I=e.sampling,N=void 0===I?{}:I,O=e.dataURLOptions,A=void 0===O?{}:O,R=e.mousemoveWait,M=e.recordDOM,T=void 0===M||M,P=e.recordCanvas,L=void 0!==P&&P,D=e.recordCrossOriginIframes,F=void 0!==D&&D,U=e.recordAfter,j=void 0===U?"DOMContentLoaded"===e.recordAfter?e.recordAfter:"load":U,B=e.userTriggeredOnInput,$=void 0!==B&&B,z=e.collectFonts,q=void 0!==z&&z,V=e.inlineImages,H=void 0!==V&&V,G=e.plugins,K=e.keepIframeSrcFn,J=void 0===K?function(){return!1}:K,Y=e.ignoreCSSAttributes,Z=void 0===Y?new Set([]):Y,X=e.errorHandler;Ac=X;var Q=!F||window.parent===window,ee=!1;if(!Q)try{window.parent.document&&(ee=!1)}catch(e){ee=!0}if(Q&&!t)throw new Error("emit function is required");if(!Q&&!ee)return function(){};void 0!==R&&void 0===N.mousemove&&(N.mousemove=R),xl.reset();var te,ne=!0===_?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,password:!0,hidden:!0}:void 0!==w?w:{password:!0},re=!0===k||"all"===k?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:"all"===k,headMetaDescKeywords:"all"===k,headTitleMutations:"all"===k}:k||{};!function(e){void 0===e&&(e=window),"NodeList"in e&&!e.NodeList.prototype.forEach&&(e.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in e&&!e.DOMTokenList.prototype.forEach&&(e.DOMTokenList.prototype.forEach=Array.prototype.forEach)}();var ie=0,oe=function(e){for(var t,n=b(G||[]);!(t=n()).done;){var r=t.value;r.eventProcessor&&(e=r.eventProcessor(e))}return E&&!ee&&(e=E(e)),e};fl=function(e,i){var o,s=e;if(s.timestamp=ac(),!(null==(o=jc[0])?void 0:o.isFrozen())||s.type===kc.FullSnapshot||s.type===kc.IncrementalSnapshot&&s.data.source===Sc.Mutation||jc.forEach(function(e){return e.unfreeze()}),Q)null==t||t(oe(s),i);else if(ee){var a={type:"rrweb",event:oe(s),origin:window.location.origin,isCheckout:i};window.parent.postMessage(a,"*")}if(s.type===kc.FullSnapshot)te=s,ie=0;else if(s.type===kc.IncrementalSnapshot){if(s.data.source===Sc.Mutation&&s.data.isAttachIframe)return;ie++;var c=r&&ie>=r,l=n&&s.timestamp-te.timestamp>n;(c||l)&&gl(!0)}};for(var se,ae=function(e){fl({type:kc.IncrementalSnapshot,data:u({source:Sc.Mutation},e)})},ce=function(e){return fl({type:kc.IncrementalSnapshot,data:u({source:Sc.Scroll},e)})},le=function(e){return fl({type:kc.IncrementalSnapshot,data:u({source:Sc.CanvasMutation},e)})},ue=new yl({mutationCb:ae,adoptedStyleSheetCb:function(e){return fl({type:kc.IncrementalSnapshot,data:u({source:Sc.AdoptedStyleSheet},e)})}}),pe=new Xc({mirror:xl,mutationCb:ae,stylesheetManager:ue,recordCrossOriginIframes:F,wrappedEmit:fl}),de=b(G||[]);!(se=de()).done;){var he=se.value;he.getMirror&&he.getMirror({nodeMirror:xl,crossOriginIframeMirror:pe.crossOriginIframeMirror,crossOriginIframeStyleMirror:pe.crossOriginIframeStyleMirror})}var fe=new bl;ml=new vl({recordCanvas:L,mutationCb:le,win:window,blockClass:o,blockSelector:a,mirror:xl,sampling:N.canvas,dataURLOptions:A});var ge=new Qc({mutationCb:ae,scrollCb:ce,bypassOptions:{blockClass:o,blockSelector:a,maskTextClass:f,maskTextSelector:m,inlineStylesheet:y,maskInputOptions:ne,dataURLOptions:A,maskTextFn:x,maskInputFn:S,recordCanvas:L,inlineImages:H,sampling:N,slimDOMOptions:re,iframeManager:pe,stylesheetManager:ue,canvasManager:ml,keepIframeSrcFn:J,processedNodeManager:fe},mirror:xl});gl=function(e){if(void 0===e&&(e=!1),T){fl({type:kc.Meta,data:{href:window.location.href,width:uc(),height:lc()}},e),ue.reset(),ge.init(),jc.forEach(function(e){return e.lock()});var t=function(e,t){var n=t||{},r=n.mirror,i=void 0===r?new W:r,o=n.blockClass,s=n.blockSelector,a=n.maskTextClass,c=n.maskTextSelector,l=n.inlineStylesheet,u=n.inlineImages,p=n.recordCanvas,d=n.maskAllInputs,h=void 0!==d&&d,f=n.slimDOM,g=void 0!==f&&f,m=n.keepIframeSrcFn;return be(e,{doc:e,mirror:i,blockClass:void 0===o?"rr-block":o,blockSelector:void 0===s?null:s,maskTextClass:void 0===a?"rr-mask":a,maskTextSelector:void 0===c?null:c,skipChild:!1,inlineStylesheet:void 0===l||l,maskInputOptions:!0===h?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,password:!0,hidden:!0}:!1===h?{password:!0}:h,maskTextFn:n.maskTextFn,maskInputFn:n.maskInputFn,slimDOMOptions:!0===g||"all"===g?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:"all"===g,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:!1===g?{}:g,dataURLOptions:n.dataURLOptions,inlineImages:void 0!==u&&u,recordCanvas:void 0!==p&&p,preserveWhiteSpace:n.preserveWhiteSpace,onSerialize:n.onSerialize,onIframeLoad:n.onIframeLoad,iframeLoadTimeout:n.iframeLoadTimeout,onStylesheetLoad:n.onStylesheetLoad,stylesheetLoadTimeout:n.stylesheetLoadTimeout,keepIframeSrcFn:void 0===m?function(){return!1}:m,newlyAddedElement:!1})}(document,{mirror:xl,blockClass:o,blockSelector:a,maskTextClass:f,maskTextSelector:m,inlineStylesheet:y,maskAllInputs:ne,maskTextFn:x,maskInputFn:S,slimDOM:re,dataURLOptions:A,recordCanvas:L,inlineImages:H,onSerialize:function(e){mc(e,xl)&&pe.addIframe(e),vc(e,xl)&&ue.trackLinkElement(e),yc(e)&&ge.addShadowRoot(tc(e),document)},onIframeLoad:function(e,t){pe.attachIframe(e,t),ge.observeAttachShadow(e)},onStylesheetLoad:function(e,t){ue.attachLinkElement(e,t)},keepIframeSrcFn:J});if(!t)return console.warn("Failed to snapshot the document");fl({type:kc.FullSnapshot,data:{node:t,initialOffset:cc(window)}},e),jc.forEach(function(e){return e.unlock()}),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&ue.adoptStyleSheets(document.adoptedStyleSheets,xl.getId(document))}};try{var me=[],ve=function(e){var t;return Uc(Kc)({mutationCb:ae,mousemoveCb:function(e,t){return fl({type:kc.IncrementalSnapshot,data:{source:t,positions:e}})},mouseInteractionCb:function(e){return fl({type:kc.IncrementalSnapshot,data:u({source:Sc.MouseInteraction},e)})},scrollCb:ce,viewportResizeCb:function(e){return fl({type:kc.IncrementalSnapshot,data:u({source:Sc.ViewportResize},e)})},inputCb:function(e){return fl({type:kc.IncrementalSnapshot,data:u({source:Sc.Input},e)})},mediaInteractionCb:function(e){return fl({type:kc.IncrementalSnapshot,data:u({source:Sc.MediaInteraction},e)})},styleSheetRuleCb:function(e){return fl({type:kc.IncrementalSnapshot,data:u({source:Sc.StyleSheetRule},e)})},styleDeclarationCb:function(e){return fl({type:kc.IncrementalSnapshot,data:u({source:Sc.StyleDeclaration},e)})},canvasMutationCb:le,fontCb:function(e){return fl({type:kc.IncrementalSnapshot,data:u({source:Sc.Font},e)})},selectionCb:function(e){fl({type:kc.IncrementalSnapshot,data:u({source:Sc.Selection},e)})},customElementCb:function(e){fl({type:kc.IncrementalSnapshot,data:u({source:Sc.CustomElement},e)})},blockClass:o,ignoreClass:l,ignoreSelector:d,maskTextClass:f,maskTextSelector:m,maskInputOptions:ne,inlineStylesheet:y,sampling:N,recordDOM:T,recordCanvas:L,inlineImages:H,userTriggeredOnInput:$,collectFonts:q,doc:e,maskInputFn:S,maskTextFn:x,keepIframeSrcFn:J,blockSelector:a,slimDOMOptions:re,dataURLOptions:A,mirror:xl,iframeManager:pe,stylesheetManager:ue,shadowDomManager:ge,processedNodeManager:fe,canvasManager:ml,ignoreCSSAttributes:Z,plugins:(null==(t=null==G?void 0:G.filter(function(e){return e.observer}))?void 0:t.map(function(e){return{observer:e.observer,options:e.options,callback:function(t){return fl({type:kc.Plugin,data:{plugin:e.name,payload:t}})}}}))||[]},C)};pe.addLoadListener(function(e){try{me.push(ve(e.contentDocument))}catch(e){console.warn(e)}});var ye=function(){gl(),me.push(ve(document)),_l=!0};return"interactive"===document.readyState||"complete"===document.readyState?ye():(me.push(nc("DOMContentLoaded",function(){fl({type:kc.DomContentLoaded,data:{}}),"DOMContentLoaded"===j&&ye()})),me.push(nc("load",function(){fl({type:kc.Load,data:{}}),"load"===j&&ye()},window))),function(){me.forEach(function(e){try{e()}catch(e){String(e).toLowerCase().includes("cross-origin")||console.warn(e)}}),fe.destroy(),_l=!1,Ac=void 0}}catch(e){console.warn(e)}}Cl.addCustomEvent=function(e,t){if(!_l)throw new Error("please add custom event after start recording");fl({type:kc.Custom,data:{tag:e,payload:t}})},Cl.freezePage=function(){jc.forEach(function(e){return e.freeze()})},Cl.takeFullSnapshot=function(e){if(!_l)throw new Error("please take full snapshot after start recording");gl(e)},Cl.mirror=xl,(Sl=kl||(kl={}))[Sl.NotStarted=0]="NotStarted",Sl[Sl.Running=1]="Running",Sl[Sl.Stopped=2]="Stopped",Cl.addCustomEvent,Cl.freezePage,Cl.takeFullSnapshot;var El=Object.defineProperty,Il=function(e,t,n){return function(e,t,n){return t in e?El(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n}(e,"symbol"!==(void 0===t?"undefined":m(t))?t+"":t,n)},Nl=function(){function e(e){Il(this,"fileName"),Il(this,"functionName"),Il(this,"lineNumber"),Il(this,"columnNumber"),this.fileName=e.fileName||"",this.functionName=e.functionName||"",this.lineNumber=e.lineNumber,this.columnNumber=e.columnNumber}return e.prototype.toString=function(){var e=this.lineNumber||"",t=this.columnNumber||"";return this.functionName?this.functionName+" ("+this.fileName+":"+e+":"+t+")":this.fileName+":"+e+":"+t},e}(),Ol=/(^|@)\S+:\d+/,Al=/^\s*at .*(\S+:\d+|\(native\))/m,Rl=/^(eval@)?(\[native code])?$/,Ml={parse:function(e){return e?void 0!==e.stacktrace||void 0!==e["opera#sourceloc"]?this.parseOpera(e):e.stack&&e.stack.match(Al)?this.parseV8OrIE(e):e.stack?this.parseFFOrSafari(e):(console.warn("[console-record-plugin]: Failed to parse error object:",e),[]):[]},extractLocation:function(e){if(-1===e.indexOf(":"))return[e];var t=/(.+?)(?::(\d+))?(?::(\d+))?$/.exec(e.replace(/[()]/g,""));if(!t)throw new Error("Cannot parse given url: "+e);return[t[1],t[2]||void 0,t[3]||void 0]},parseV8OrIE:function(e){return e.stack.split("\n").filter(function(e){return!!e.match(Al)},this).map(function(e){e.indexOf("(eval ")>-1&&(e=e.replace(/eval code/g,"eval").replace(/(\(eval at [^()]*)|(\),.*$)/g,""));var t=e.replace(/^\s+/,"").replace(/\(eval code/g,"("),n=t.match(/ (\((.+):(\d+):(\d+)\)$)/),r=(t=n?t.replace(n[0],""):t).split(/\s+/).slice(1),i=this.extractLocation(n?n[1]:r.pop()),o=r.join(" ")||void 0,s=["eval",""].indexOf(i[0])>-1?void 0:i[0];return new Nl({functionName:o,fileName:s,lineNumber:i[1],columnNumber:i[2]})},this)},parseFFOrSafari:function(e){return e.stack.split("\n").filter(function(e){return!e.match(Rl)},this).map(function(e){if(e.indexOf(" > eval")>-1&&(e=e.replace(/ line (\d+)(?: > eval line \d+)* > eval:\d+:\d+/g,":$1")),-1===e.indexOf("@")&&-1===e.indexOf(":"))return new Nl({functionName:e});var t=/((.*".+"[^@]*)?[^@]*)(?:@)/,n=e.match(t),r=n&&n[1]?n[1]:void 0,i=this.extractLocation(e.replace(t,""));return new Nl({functionName:r,fileName:i[0],lineNumber:i[1],columnNumber:i[2]})},this)},parseOpera:function(e){return!e.stacktrace||e.message.indexOf("\n")>-1&&e.message.split("\n").length>e.stacktrace.split("\n").length?this.parseOpera9(e):e.stack?this.parseOpera11(e):this.parseOpera10(e)},parseOpera9:function(e){for(var t=/Line (\d+).*script (?:in )?(\S+)/i,n=e.message.split("\n"),r=[],i=2,o=n.length;i/,"$2").replace(/\([^)]*\)/g,"")||void 0;return new Nl({functionName:r,fileName:n[0],lineNumber:n[1],columnNumber:n[2]})},this)}};function Tl(e){if(!e||!e.outerHTML)return"";for(var t="";e.parentElement;){var n=e.localName;if(!n)break;n=n.toLowerCase();var r=e.parentElement,i=[];if(r.children&&r.children.length>0)for(var o=0;o1&&(n+=":eq("+i.indexOf(e)+")"),t=n+(t?">"+t:""),e=r}return t}function Pl(e){return"[object Object]"===Object.prototype.toString.call(e)}function Ll(e,t){if(0===t)return!0;for(var n,r=b(Object.keys(e));!(n=r()).done;){var i=n.value;if(Pl(e[i])&&Ll(e[i],t-1))return!0}return!1}function Dl(e,t){var n={numOfKeysLimit:50,depthOfLimit:4};Object.assign(n,t);var r=[],i=[];return JSON.stringify(e,function(e,t){if(r.length>0){var o=r.indexOf(this);~o?r.splice(o+1):r.push(this),~o?i.splice(o,1/0,e):i.push(e),~r.indexOf(t)&&(t=r[0]===t?"[Circular ~]":"[Circular ~."+i.slice(0,r.indexOf(t)).join(".")+"]")}else r.push(t);if(null===t)return t;if(void 0===t)return"undefined";if(Pl(s=t)&&Object.keys(s).length>n.numOfKeysLimit||"function"==typeof s||Pl(s)&&Ll(s,n.depthOfLimit))return function(e){var t=e.toString();return n.stringLengthLimit&&t.length>n.stringLengthLimit&&(t=t.slice(0,n.stringLengthLimit)+"..."),t}(t);var s;if("bigint"===(void 0===t?"undefined":m(t)))return t.toString()+"n";if(h(t,Event)){var a={};for(var c in t){var l=t[c];Array.isArray(l)?a[c]=Tl(l.length?l[0]:null):a[c]=l}return a}return h(t,Node)?h(t,HTMLElement)?t?t.outerHTML:"":t.nodeName:h(t,Error)?t.stack?t.stack+"\nEnd of stack for Error object":t.name+": "+t.message:t})}var Fl={level:["assert","clear","count","countReset","debug","dir","dirxml","error","group","groupCollapsed","groupEnd","info","log","table","time","timeEnd","timeLog","trace","warn"],lengthThreshold:1e3,logger:"console"};function Ul(e,t,n){var r,i=n?Object.assign({},Fl,n):Fl,o=i.logger;if(!o)return function(){};r="string"==typeof o?t[o]:o;var s=0,a=!1,c=[];if(i.level.includes("error")){var l=function(t){var n=t.message,r=t.error,o=Ml.parse(r).map(function(e){return e.toString()}),s=[Dl(n,i.stringifyOptions)];e({level:"error",trace:o,payload:s})};t.addEventListener("error",l),c.push(function(){t.removeEventListener("error",l)});var u=function(t){var n,r;h(t.reason,Error)?r=[Dl("Uncaught (in promise) "+(n=t.reason).name+": "+n.message,i.stringifyOptions)]:(n=new Error,r=[Dl("Uncaught (in promise)",i.stringifyOptions),Dl(t.reason,i.stringifyOptions)]);var o=Ml.parse(n).map(function(e){return e.toString()});e({level:"error",trace:o,payload:r})};t.addEventListener("unhandledrejection",u),c.push(function(){t.removeEventListener("unhandledrejection",u)})}for(var p,d=b(i.level);!(p=d()).done;){var f=p.value;c.push(g(r,f))}return function(){c.forEach(function(e){return e()})};function g(t,n){var r=this;return t[n]?function(t,o){try{if(!(o in t))return function(){};var c=t[o],l=function(t){var o=r;return function(){for(var r=arguments.length,c=new Array(r),l=0;l0&&Wl(Gl,n))}catch(e){Yl.call(new Xl(n),e)}}}function Yl(e){var t=this;t.triggered||(t.triggered=!0,t.def&&(t=t.def),t.msg=e,t.state=2,t.chain.length>0&&Wl(Gl,t))}function Zl(e,t,n,r){for(var i=0;i0&&(t[n]=e)}),t},Tu.truncate=function(e,t){var n;return"string"==typeof e?n=e.slice(0,t):Tu.isArray(e)?(n=[],Tu.each(e,function(e){n.push(Tu.truncate(e,t))})):Tu.isObject(e)?(n={},Tu.each(e,function(e,r){n[r]=Tu.truncate(e,t)})):n=e,n},Tu.JSONEncode=function(e){var t=function(e){var t=/[\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,n={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"};return t.lastIndex=0,t.test(e)?'"'+e.replace(t,function(e){var t=n[e];return"string"==typeof t?t:"\\u"+("0000"+e.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+e+'"'},n=function(e,r){var i="",o=0,s="",a="",c=0,l=i,u=[],p=r[e];switch(p&&"object"==typeof p&&"function"==typeof p.toJSON&&(p=p.toJSON(e)),typeof p){case"string":return t(p);case"number":return isFinite(p)?String(p):"null";case"boolean":case"null":return String(p);case"object":if(!p)return"null";if(i+=" ",u=[],"[object Array]"===bu.apply(p)){for(c=p.length,o=0;o="0"&&iu<="9";)t+=iu,lu();if("."===iu)for(t+=".";lu()&&iu>="0"&&iu<="9";)t+=iu;if("e"===iu||"E"===iu)for(t+=iu,lu(),"-"!==iu&&"+"!==iu||(t+=iu,lu());iu>="0"&&iu<="9";)t+=iu,lu();if(e=+t,isFinite(e))return e;cu("Bad number")},pu=function(){var e,t,n,r="";if('"'===iu)for(;lu();){if('"'===iu)return lu(),r;if("\\"===iu)if(lu(),"u"===iu){for(n=0,t=0;t<4&&(e=parseInt(lu(),16),isFinite(e));t+=1)n=16*n+e;r+=String.fromCharCode(n)}else{if("string"!=typeof au[iu])break;r+=au[iu]}else r+=iu}cu("Bad string")},du=function(){for(;iu&&iu<=" ";)lu()},su=function(){switch(du(),iu){case"{":return function(){var e,t={};if("{"===iu){if(lu("{"),du(),"}"===iu)return lu("}"),t;for(;iu;){if(e=pu(),du(),lu(":"),Object.hasOwnProperty.call(t,e)&&cu('Duplicate key "'+e+'"'),t[e]=su(),du(),"}"===iu)return lu("}"),t;lu(","),du()}}cu("Bad object")}();case"[":return function(){var e=[];if("["===iu){if(lu("["),du(),"]"===iu)return lu("]"),e;for(;iu;){if(e.push(su()),du(),"]"===iu)return lu("]"),e;lu(","),du()}}cu("Bad array")}();case'"':return pu();case"-":return uu();default:return iu>="0"&&iu<="9"?uu():function(){switch(iu){case"t":return lu("t"),lu("r"),lu("u"),lu("e"),!0;case"f":return lu("f"),lu("a"),lu("l"),lu("s"),lu("e"),!1;case"n":return lu("n"),lu("u"),lu("l"),lu("l"),null}cu('Unexpected "'+iu+'"')}()}},function(e){var t;return ou=e,ru=0,iu=" ",t=su(),du(),iu&&cu("Syntax error"),t}),Tu.base64Encode=function(e){var t,n,r,i,o,s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",a=0,c=0,l="",u=[];if(!e)return e;e=Tu.utf8Encode(e);do{t=(o=e.charCodeAt(a++)<<16|e.charCodeAt(a++)<<8|e.charCodeAt(a++))>>18&63,n=o>>12&63,r=o>>6&63,i=63&o,u[c++]=s.charAt(t)+s.charAt(n)+s.charAt(r)+s.charAt(i)}while(a127&&s<2048?String.fromCharCode(s>>6|192,63&s|128):String.fromCharCode(s>>12|224,s>>6&63|128,63&s|128),null!==a&&(n>t&&(o+=e.substring(t,n)),o+=a,t=n=i+1)}return n>t&&(o+=e.substring(t,e.length)),o},Tu.UUID=function(){try{return r.crypto.randomUUID()}catch(n){for(var e=new Array(36),t=0;t<36;t++)e[t]=Math.floor(16*Math.random());return e[14]=4,e[19]=e[19]&=-5,e[19]=e[19]|=8,e[8]=e[13]=e[18]=e[23]="-",Tu.map(e,function(e){return e.toString(16)}).join("")}};var ju=["ahrefsbot","ahrefssiteaudit","amazonbot","baiduspider","bingbot","bingpreview","chrome-lighthouse","facebookexternal","petalbot","pinterest","screaming frog","yahoo! slurp","yandex","adsbot-google","apis-google","duplexweb-google","feedfetcher-google","google favicon","google web preview","google-read-aloud","googlebot","googleweblight","mediapartners-google","storebot-google"];Tu.isBlockedUA=function(e){var t;for(e=e.toLowerCase(),t=0;t=0}function r(t){if(!Su.getElementsByTagName)return[];var r,i,o,s,a,c,l,u,p,d,h=t.split(" "),f=[Su];for(c=0;c-1){o=(i=r.split("#"))[0];var g=i[1],m=Su.getElementById(g);if(!m||o&&m.nodeName.toLowerCase()!=o)return[];f=[m]}else if(r.indexOf(".")>-1){o=(i=r.split("."))[0];var v=i[1];for(o||(o="*"),s=[],a=0,l=0;l-1};break;default:b=function(e){return e.getAttribute(_)}}for(f=[],d=0,l=0;l=3?t[2]:""},currentUrl:function(){return r.location.href},properties:function(e){return"object"!=typeof e&&(e={}),Tu.extend(Tu.strip_empty_properties({$os:Tu.info.os(),$browser:Tu.info.browser(Eu,ku.vendor,xu),$referrer:Su.referrer,$referring_domain:Tu.info.referringDomain(Su.referrer),$device:Tu.info.device(Eu)}),{$current_url:Tu.info.currentUrl(),$browser_version:Tu.info.browserVersion(Eu,ku.vendor,xu),$screen_height:Cu.height,$screen_width:Cu.width,mp_lib:"web",$lib_version:hu.LIB_VERSION,$insert_id:Ku(),time:Tu.timestamp()/1e3},Tu.strip_empty_properties(e))},people_properties:function(){return Tu.extend(Tu.strip_empty_properties({$os:Tu.info.os(),$browser:Tu.info.browser(Eu,ku.vendor,xu)}),{$browser_version:Tu.info.browserVersion(Eu,ku.vendor,xu)})},mpPageViewProperties:function(){return Tu.strip_empty_properties({current_page_title:Su.title,current_domain:r.location.hostname,current_url_path:r.location.pathname,current_url_protocol:r.location.protocol,current_url_search:r.location.search})}};var Ku=function(e){var t=Math.random().toString(36).substring(2,10)+Math.random().toString(36).substring(2,10);return e?t.substring(0,e):t},Ju=/[a-z0-9][a-z0-9-]*\.[a-z]+$/i,Yu=/[a-z0-9][a-z0-9-]+\.[a-z.]{2,6}$/i,Zu=function(e){var t=Yu,n=e.split("."),r=n[n.length-1];(r.length>4||"com"===r||"org"===r)&&(t=Ju);var i=e.match(t);return i?i[0]:""},Xu=function(){},Qu=null,ep=null;"undefined"!=typeof JSON&&(Qu=JSON.stringify,ep=JSON.parse),Qu=Qu||Tu.JSONEncode,ep=ep||Tu.JSONDecode,Tu.info=Tu.info,Tu.info.browser=Tu.info.browser,Tu.info.browserVersion=Tu.info.browserVersion,Tu.info.device=Tu.info.device,Tu.info.properties=Tu.info.properties,Tu.isBlockedUA=Tu.isBlockedUA,Tu.isEmptyObject=Tu.isEmptyObject,Tu.isObject=Tu.isObject,Tu.JSONDecode=Tu.JSONDecode,Tu.JSONEncode=Tu.JSONEncode,Tu.toArray=Tu.toArray,Tu.NPO=eu;var tp="mixpanelRecordingEvents",np="mixpanelRecordingRegistry",rp=[tp,np],ip=function(e){this.dbPromise=null,this.storeName=e};function op(e,t){mp(!0,e,t)}function sp(e,t){mp(!1,e,t)}function ap(e,t){return"1"===gp(e,t)}function cp(e,t){if(function(e){if(e&&e.ignoreDnt)return!1;var t=e&&e.window||r,n=t.navigator||{},i=!1;return Tu.each([n.doNotTrack,n.msDoNotTrack,t.doNotTrack],function(e){Tu.includes([!0,1,"1","yes"],e)&&(i=!0)}),i}(t))return Pu.warn('This browser has "Do Not Track" enabled. This will prevent the Mixpanel SDK from sending any data. To ignore the "Do Not Track" browser setting, initialize the Mixpanel instance with the config "ignore_dnt: true"'),!0;var n="0"===gp(e,t);return n&&Pu.warn("You are opted out of Mixpanel tracking. This will prevent the Mixpanel SDK from sending any data."),n}function lp(e){return vp(e,function(e){return this.get_config(e)})}function up(e){return vp(e,function(e){return this._get_config(e)})}function pp(e){return vp(e,function(e){return this._get_config(e)})}function dp(e,t){hp(t=t||{}).remove(fp(e,t),!!t.crossSubdomainCookie,t.cookieDomain)}function hp(e){return"localStorage"===(e=e||{}).persistenceType?Tu.localStorage:Tu.cookie}function fp(e,t){return((t=t||{}).persistencePrefix||"__mp_opt_in_out_")+e}function gp(e,t){return hp(t).get(fp(e,t))}function mp(e,t,n){Tu.isString(t)&&t.length?(hp(n=n||{}).set(fp(t,n),e?1:0,Tu.isNumber(n.cookieExpiration)?n.cookieExpiration:null,!!n.crossSubdomainCookie,!!n.secureCookie,!!n.crossSiteCookie,n.cookieDomain),n.track&&e&&n.track(n.trackEventName||"$opt_in",n.trackProperties,{send_immediately:!0})):Pu.error("gdpr."+(e?"optIn":"optOut")+" called with an invalid token")}function vp(e,t){return function(){var n=!1;try{var r=t.call(this,"token"),i=t.call(this,"ignore_dnt"),o=t.call(this,"opt_out_tracking_persistence_type"),s=t.call(this,"opt_out_tracking_cookie_prefix"),a=t.call(this,"window");r&&(n=cp(r,{ignoreDnt:i,persistenceType:o,persistencePrefix:s,window:a}))}catch(e){Pu.error("Unexpected error when checking tracking opt-out status: "+e)}if(!n)return e.apply(this,arguments);var c=arguments[arguments.length-1];"function"==typeof c&&c(0)}}ip.prototype._openDb=function(){return new tu(function(e,t){var n=r.indexedDB.open("mixpanelBrowserDb",1);n.onerror=function(){t(n.error)},n.onsuccess=function(){e(n.result)},n.onupgradeneeded=function(e){var t=e.target.result;rp.forEach(function(e){t.createObjectStore(e)})}})},ip.prototype.init=function(){return r.indexedDB?(this.dbPromise||(this.dbPromise=this._openDb()),this.dbPromise.then(function(e){return e instanceof r.IDBDatabase?tu.resolve():tu.reject(e)})):tu.reject("indexedDB is not supported in this browser")},ip.prototype.isInitialized=function(){return!!this.dbPromise},ip.prototype.makeTransaction=function(e,t){var n=this.storeName,r=function(r){return new tu(function(i,o){var s=r.transaction(n,e);s.oncomplete=function(){i(s)},s.onabort=s.onerror=function(){o(s.error)},t(s.objectStore(n))})};return this.dbPromise.then(r).catch(function(e){return e&&"InvalidStateError"===e.name?(this.dbPromise=this._openDb(),this.dbPromise.then(r)):tu.reject(e)}.bind(this))},ip.prototype.setItem=function(e,t){return this.makeTransaction("readwrite",function(n){n.put(t,e)})},ip.prototype.getItem=function(e){var t;return this.makeTransaction("readonly",function(n){t=n.get(e)}).then(function(){return t.result})},ip.prototype.removeItem=function(e){return this.makeTransaction("readwrite",function(t){t.delete(e)})},ip.prototype.getAll=function(){var e;return this.makeTransaction("readonly",function(t){e=t.getAll()}).then(function(){return e.result})};var yp=Du("lock"),bp=function(e,t){t=t||{},this.storageKey=e,this.storage=t.storage||r.localStorage,this.pollIntervalMS=t.pollIntervalMS||100,this.timeoutMS=t.timeoutMS||2e3,this.promiseImpl=t.promiseImpl||tu};bp.prototype.withLock=function(e,t){return new(0,this.promiseImpl)(Tu.bind(function(n,r){var i=t||(new Date).getTime()+"|"+Math.random(),o=(new Date).getTime(),s=this.storageKey,a=this.pollIntervalMS,c=this.timeoutMS,l=this.storage,u=s+":X",p=s+":Y",d=s+":Z",h=function(e){if((new Date).getTime()-o>c)return yp.error("Timeout waiting for mutex on "+s+"; clearing lock. ["+i+"]"),l.removeItem(d),l.removeItem(p),void m();setTimeout(function(){try{e()}catch(e){r(e)}},a*(Math.random()+.1))},f=function(e,t){e()?t():h(function(){f(e,t)})},g=function(){var e=l.getItem(p);return!(e&&e!==i||(l.setItem(p,i),l.getItem(p)!==i&&(zu(l,!0)||r(new Error("localStorage support dropped while acquiring lock")),1)))},m=function(){l.setItem(u,i),f(g,function(){l.getItem(u)!==i?h(function(){l.getItem(p)===i?f(function(){return!l.getItem(d)},v):m()}):v()})},v=function(){l.setItem(d,"1");var t=function(){l.removeItem(d),l.getItem(p)===i&&l.removeItem(p),l.getItem(u)===i&&l.removeItem(u)};e().then(function(e){t(),n(e)}).catch(function(e){t(),r(e)})};try{if(!zu(l,!0))throw new Error("localStorage support check failed");m()}catch(e){r(e)}},this))};var _p=function(e){this.storage=e||r.localStorage};_p.prototype.init=function(){return tu.resolve()},_p.prototype.isInitialized=function(){return!0},_p.prototype.setItem=function(e,t){return new tu(Tu.bind(function(n,r){try{this.storage.setItem(e,Qu(t))}catch(e){r(e)}n()},this))},_p.prototype.getItem=function(e){return new tu(Tu.bind(function(t,n){var r;try{r=ep(this.storage.getItem(e))}catch(e){n(e)}t(r)},this))},_p.prototype.removeItem=function(e){return new tu(Tu.bind(function(t,n){try{this.storage.removeItem(e)}catch(e){n(e)}t()},this))};var wp=Du("batch"),kp=function(e,t){var n,i,o,s;t=t||{},this.storageKey=e,this.usePersistence=t.usePersistence,this.usePersistence&&(this.queueStorage=t.queueStorage||new _p,this.lock=new bp(e,{storage:t.sharedLockStorage||r.localStorage,timeoutMS:t.sharedLockTimeoutMS})),this.reportError=t.errorReporter||Tu.bind(wp.error,wp),this.pid=t.pid||null,this.memQueue=[],this.initialized=!1,t.enqueueThrottleMs?this.enqueuePersisted=(n=Tu.bind(this._enqueuePersisted,this),i=t.enqueueThrottleMs,o=null,s=[],function(e){var t=this;return s.push(e),o||(o=new tu(function(e){setTimeout(function(){var r=n.apply(t,[s]);o=null,s=[],e(r)},i)})),o}):this.enqueuePersisted=Tu.bind(function(e){return this._enqueuePersisted([e])},this)};kp.prototype.ensureInit=function(){return this.initialized||!this.usePersistence?tu.resolve():this.queueStorage.init().then(Tu.bind(function(){this.initialized=!0},this)).catch(Tu.bind(function(e){this.reportError("Error initializing queue persistence. Disabling persistence",e),this.initialized=!0,this.usePersistence=!1},this))},kp.prototype.enqueue=function(e,t){var n={id:Ku(),flushAfter:(new Date).getTime()+2*t,payload:e};return this.usePersistence?this.enqueuePersisted(n):(this.memQueue.push(n),tu.resolve(!0))},kp.prototype._enqueuePersisted=function(e){var t=Tu.bind(function(){return this.ensureInit().then(Tu.bind(function(){return this.readFromStorage()},this)).then(Tu.bind(function(t){return this.saveToStorage(t.concat(e))},this)).then(Tu.bind(function(t){return t&&(this.memQueue=this.memQueue.concat(e)),t},this)).catch(Tu.bind(function(t){return this.reportError("Error enqueueing items",t,e),!1},this))},this);return this.lock.withLock(t,this.pid).catch(Tu.bind(function(e){return this.reportError("Error acquiring storage lock",e),!1},this))},kp.prototype.fillBatch=function(e){var t=this.memQueue.slice(0,e);return this.usePersistence&&t.lengtho.flushAfter&&!r[o.id]&&(o.orphaned=!0,t.push(o),t.length>=e))break}}return t},this)):tu.resolve(t)};var Sp=function(e,t){var n=[];return Tu.each(e,function(e){e.id&&!t[e.id]&&n.push(e)}),n};kp.prototype.removeItemsByID=function(e){var t={};if(Tu.each(e,function(e){t[e]=!0}),this.memQueue=Sp(this.memQueue,t),this.usePersistence){var n=Tu.bind(function(){return this.ensureInit().then(Tu.bind(function(){return this.readFromStorage()},this)).then(Tu.bind(function(e){return e=Sp(e,t),this.saveToStorage(e)},this)).then(Tu.bind(function(){return this.readFromStorage()},this)).then(Tu.bind(function(e){for(var n=0;n5&&(this.reportError("[dupe] item ID sent too many times, not sending",{item:e,batchSize:o.length,timesSent:this.itemIdsSentSuccessfully[r]}),n=!1):this.reportError("[dupe] found item with no ID",{item:e}),n&&a.push(t)}c[e.id]=t},this),a.length<1)return this.requestInProgress=!1,this.resetFlush(),tu.resolve();var l=Tu.bind(function(){return this.queue.removeItemsByID(Tu.map(o,function(e){return e.id})).then(Tu.bind(function(e){return Tu.each(o,Tu.bind(function(e){var t=e.id;t?(this.itemIdsSentSuccessfully[t]=this.itemIdsSentSuccessfully[t]||0,this.itemIdsSentSuccessfully[t]++,this.itemIdsSentSuccessfully[t]>5&&this.reportError("[dupe] item ID sent too many times",{item:e,batchSize:o.length,timesSent:this.itemIdsSentSuccessfully[t]})):this.reportError("[dupe] found item with no ID while removing",{item:e})},this)),e?(this.consecutiveRemovalFailures=0,this.flushOnlyOnInterval&&!s?(this.resetFlush(),tu.resolve()):this.flush()):(++this.consecutiveRemovalFailures>5?(this.reportError("Too many queue failures; disabling batching system."),this.stopAllBatching()):this.resetFlush(),tu.resolve())},this))},this),u=Tu.bind(function(s){this.requestInProgress=!1;try{if(e.unloading)return this.queue.updatePayloads(c);if(Tu.isObject(s)&&"timeout"===s.error&&(new Date).getTime()-n>=t)return this.reportError("Network timeout; retrying"),this.flush();if(Tu.isObject(s)&&(s.httpStatusCode>=500||429===s.httpStatusCode||s.httpStatusCode<=0&&(p=r.navigator.onLine,!Tu.isUndefined(p)&&!p)||"timeout"===s.error)){var a=2*this.flushInterval;return s.retryAfter&&(a=1e3*parseInt(s.retryAfter,10)||a),a=Math.min(6e5,a),this.reportError("Error; retry in "+a+" ms"),this.scheduleFlush(a),tu.resolve()}if(Tu.isObject(s)&&413===s.httpStatusCode){if(o.length>1){var u=Math.max(1,Math.floor(i/2));return this.batchSize=Math.min(this.batchSize,u,o.length-1),this.reportError("413 response; reducing batch size to "+this.batchSize),this.resetFlush(),tu.resolve()}return this.reportError("Single-event request too large; dropping",o),this.resetBatchSize(),l()}return l()}catch(e){this.reportError("Error handling API response",e),this.resetFlush()}var p},this),p={method:"POST",verbose:!0,ignore_json_errors:!0,timeout_ms:t};return e.unloading&&(p.transport="sendBeacon"),Cp.log("MIXPANEL REQUEST:",a),this.sendRequestPromise(a,p).then(u)},this)).catch(Tu.bind(function(e){this.reportError("Error flushing request queue",e),this.resetFlush()},this))},Ep.prototype.reportError=function(e,t){if(Cp.error.apply(Cp.error,arguments),this.errorReporter)try{t instanceof Error||(t=new Error(e)),this.errorReporter(e,t)}catch(t){Cp.error(t)}};var Ip=function(e){var t=Date.now();return!e||t>e.maxExpires||t>e.idleExpires},Np=Du("recorder"),Op=r.CompressionStream,Ap={batch_size:1e3,batch_flush_interval_ms:1e4,batch_request_timeout_ms:9e4,batch_autostart:!0},Rp=new Set([Sc.MouseMove,Sc.MouseInteraction,Sc.Scroll,Sc.ViewportResize,Sc.Input,Sc.TouchMove,Sc.MediaInteraction,Sc.Drag,Sc.Selection]),Mp=function(e){this._mixpanel=e.mixpanelInstance,this._onIdleTimeout=e.onIdleTimeout||Xu,this._onMaxLengthReached=e.onMaxLengthReached||Xu,this._onBatchSent=e.onBatchSent||Xu,this._rrwebRecord=e.rrwebRecord||null,this._stopRecording=null,this.replayId=e.replayId,this.batchStartUrl=e.batchStartUrl||null,this.replayStartUrl=e.replayStartUrl||null,this.idleExpires=e.idleExpires||null,this.maxExpires=e.maxExpires||null,this.replayStartTime=e.replayStartTime||null,this.lastEventTimestamp=e.lastEventTimestamp||null,this.seqNo=e.seqNo||0,this.idleTimeoutId=null,this.maxTimeoutId=null,this.recordMaxMs=fu,this.recordMinMs=0;var t=zu(e.sharedLockStorage,!0)&&!this.getConfig("disable_persistence");this.batcherKey="__mprec_"+this.getConfig("name")+"_"+this.getConfig("token")+"_"+this.replayId,this.queueStorage=new ip(tp),this.batcher=new Ep(this.batcherKey,{errorReporter:this.reportError.bind(this),flushOnlyOnInterval:!0,libConfig:Ap,sendRequestFunc:this.flushEventsWithOptOut.bind(this),queueStorage:this.queueStorage,sharedLockStorage:e.sharedLockStorage,usePersistence:t,stopAllBatchingFunc:this.stopRecording.bind(this),enqueueThrottleMs:250,sharedLockTimeoutMS:1e4})};Mp.prototype.getUserIdInfo=function(){if(this.finalFlushUserIdInfo)return this.finalFlushUserIdInfo;var e={distinct_id:String(this._mixpanel.get_distinct_id())},t=this._mixpanel.get_property("$device_id");t&&(e.$device_id=t);var n=this._mixpanel.get_property("$user_id");return n&&(e.$user_id=n),e},Mp.prototype.unloadPersistedData=function(){return this.batcher.stop(),this.queueStorage.init().catch(function(){this.reportError("Error initializing IndexedDB storage for unloading persisted data.")}.bind(this)).then(function(){return this.getDurationMs()fu&&(this.recordMaxMs=fu,Np.critical("record_max_ms cannot be greater than "+fu+"ms. Capping value.")),this.maxExpires||(this.maxExpires=(new Date).getTime()+this.recordMaxMs),this.recordMinMs=this._getRecordMinMs(),this.replayStartTime||(this.replayStartTime=(new Date).getTime(),this.batchStartUrl=Tu.info.currentUrl(),this.replayStartUrl=Tu.info.currentUrl()),e||this.recordMinMs>0?this.batcher.stop():this.batcher.start();var t=function(){clearTimeout(this.idleTimeoutId);var e=this.getConfig("record_idle_timeout_ms");this.idleTimeoutId=setTimeout(this._onIdleTimeout,e),this.idleExpires=(new Date).getTime()+e}.bind(this);t();var n,r=this.getConfig("record_block_selector");""!==r&&null!==r||(r=void 0);try{this._stopRecording=this._rrwebRecord({emit:function(e){this.idleExpires&&this.idleExpires=this.recordMinMs&&this.batcher.start(),t()),this.__enqueuePromise=this.batcher.enqueue(e),(null===this.lastEventTimestamp||e.timestamp>this.lastEventTimestamp)&&(this.lastEventTimestamp=e.timestamp))}.bind(this),blockClass:this.getConfig("record_block_class"),blockSelector:r,collectFonts:this.getConfig("record_collect_fonts"),dataURLOptions:{type:"image/webp",quality:.6},maskAllInputs:!0,maskTextClass:this.getConfig("record_mask_text_class"),maskTextSelector:this.getConfig("record_mask_text_selector"),recordCanvas:this.getConfig("record_canvas"),sampling:{canvas:15},plugins:this.getConfig("record_console")?[(n={stringifyOptions:{stringLengthLimit:1e3,numOfKeysLimit:50,depthOfLimit:2}},{name:"rrweb/console@1",observer:Ul,options:n})]:[]})}catch(e){this.reportError("Unexpected error when starting rrweb recording.",e)}if("function"!=typeof this._stopRecording)return this.reportError("rrweb failed to start, skipping this recording."),this._stopRecording=null,void this.stopRecording();var i=this.maxExpires-(new Date).getTime();this.maxTimeoutId=setTimeout(this._onMaxLengthReached.bind(this),i)}else Np.log("Recording already in progress, skipping startRecording.");else this.reportError("rrweb record function not provided. ")},Mp.prototype.stopRecording=function(e){if(this.finalFlushUserIdInfo=this.getUserIdInfo(),!this.isRrwebStopped()){try{this._stopRecording()}catch(e){this.reportError("Error with rrweb stopRecording",e)}this._stopRecording=null}var t;return this.batcher.stopped?t=this.batcher.clear():e||(t=this.batcher.flush()),this.batcher.stop(),clearTimeout(this.idleTimeoutId),clearTimeout(this.maxTimeoutId),t},Mp.prototype.isRrwebStopped=function(){return null===this._stopRecording},Mp.prototype.flushEventsWithOptOut=function(e,t,n){var r=function(e){0===e&&(this.stopRecording(),n({error:"Tracking has been opted out, stopping recording."}))}.bind(this);this._flushEvents(e,t,n,r)},Mp.prototype.serialize=function(){var e;try{e=this._mixpanel.get_tab_id()}catch(t){this.reportError("Error getting tab ID for serialization ",t),e=null}return{replayId:this.replayId,seqNo:this.seqNo,replayStartTime:this.replayStartTime,batchStartUrl:this.batchStartUrl,replayStartUrl:this.replayStartUrl,lastEventTimestamp:this.lastEventTimestamp,idleExpires:this.idleExpires,maxExpires:this.maxExpires,tabId:e}},Mp.deserialize=function(e,t){return new Mp(Tu.extend({},t,{replayId:e.replayId,batchStartUrl:e.batchStartUrl,replayStartUrl:e.replayStartUrl,idleExpires:e.idleExpires,maxExpires:e.maxExpires,replayStartTime:e.replayStartTime,lastEventTimestamp:e.lastEventTimestamp,seqNo:e.seqNo,sharedLockStorage:t.sharedLockStorage}))},Mp.prototype._sendRequest=function(e,t,n,i){var o=function(t,n){200===t.status&&this.replayId===e&&(this.seqNo++,this.batchStartUrl=Tu.info.currentUrl()),this._onBatchSent(),i({status:0,httpStatusCode:t.status,responseBody:n,retryAfter:t.headers.get("Retry-After")})}.bind(this),s=this._mixpanel.get_api_host&&this._mixpanel.get_api_host("record")||this.getConfig("api_host");r.fetch(s+"/"+this.getConfig("api_routes").record+"?"+new URLSearchParams(t),{method:"POST",headers:{Authorization:"Basic "+btoa(this.getConfig("token")+":"),"Content-Type":"application/octet-stream"},body:n}).then(function(e){e.json().then(function(t){o(e,t)}).catch(function(e){i({error:e})})}).catch(function(e){i({error:e,httpStatusCode:0})})},Mp.prototype._flushEvents=lp(function(e,t,n){var i=e.length;if(i>0){for(var o=this.replayId,s=1/0,a=-1/0,c=!1,l=0;l=16.4&&o<16.6)}(Eu,ku.vendor,xu)){var h=new Blob([d],{type:"application/json"}).stream().pipeThrough(new Op("gzip"));new Response(h).blob().then(function(e){p.format="gzip",this._sendRequest(o,p,e,n)}.bind(this))}else p.format="body",this._sendRequest(o,p,d,n)}}),Mp.prototype.reportError=function(e,t){Np.error.apply(Np.error,arguments);try{t||e instanceof Error||(e=new Error(e)),this.getConfig("error_reporter")(e,t)}catch(t){Np.error(t)}},Mp.prototype.getDurationMs=function(){return null===this.replayStartTime?0:null===this.lastEventTimestamp?(new Date).getTime()-this.replayStartTime:this.lastEventTimestamp-this.replayStartTime},Mp.prototype._getRecordMinMs=function(){var e=this.getConfig("record_min_ms");return e>8e3?(Np.critical("record_min_ms cannot be greater than 8000ms. Capping value."),8e3):e};var Tp=function(e){this.idb=new ip(np),this.errorReporter=e.errorReporter,this.mixpanelInstance=e.mixpanelInstance,this.sharedLockStorage=e.sharedLockStorage};Tp.prototype.isPersistenceEnabled=function(){return!this.mixpanelInstance.get_config("disable_persistence")},Tp.prototype.handleError=function(e){this.errorReporter("IndexedDB error: ",e)},Tp.prototype.setActiveRecording=function(e){if(!this.isPersistenceEnabled())return tu.resolve();var t=e.tabId;return t?this.idb.init().then(function(){return this.idb.setItem(t,e)}.bind(this)).catch(this.handleError.bind(this)):(console.warn("No tab ID is set, cannot persist recording metadata."),tu.resolve())},Tp.prototype.getActiveRecording=function(){return this.isPersistenceEnabled()?this.idb.init().then(function(){return this.idb.getItem(this.mixpanelInstance.get_tab_id())}.bind(this)).then(function(e){return Ip(e)?null:e}.bind(this)).catch(this.handleError.bind(this)):tu.resolve(null)},Tp.prototype.clearActiveRecording=function(){return this.isPersistenceEnabled()?this.markActiveRecordingExpired():this.deleteActiveRecording()},Tp.prototype.markActiveRecordingExpired=function(){return this.getActiveRecording().then(function(e){if(e)return e.maxExpires=0,this.setActiveRecording(e)}.bind(this)).catch(this.handleError.bind(this))},Tp.prototype.deleteActiveRecording=function(){return this.idb.isInitialized()?this.idb.removeItem(this.mixpanelInstance.get_tab_id()).catch(this.handleError.bind(this)):tu.resolve()},Tp.prototype.flushInactiveRecordings=function(){return this.isPersistenceEnabled()?this.idb.init().then(function(){return this.idb.getAll()}.bind(this)).then(function(e){var t=e.filter(function(e){return Ip(e)}).map(function(e){return Mp.deserialize(e,{mixpanelInstance:this.mixpanelInstance,sharedLockStorage:this.sharedLockStorage}).unloadPersistedData().then(function(){return this.idb.removeItem(e.tabId)}.bind(this)).catch(this.handleError.bind(this))}.bind(this));return tu.all(t)}.bind(this)).catch(this.handleError.bind(this)):tu.resolve([])};var Pp=Du("recorder"),Lp=function(e,t,n){this.mixpanelInstance=e,this.rrwebRecord=t||Cl,this.sharedLockStorage=n,this.recordingRegistry=new Tp({mixpanelInstance:this.mixpanelInstance,errorReporter:Pp.error,sharedLockStorage:n}),this._flushInactivePromise=this.recordingRegistry.flushInactiveRecordings(),this.activeRecording=null,this.stopRecordingInProgress=!1};Lp.prototype.startRecording=function(e){if(e=e||{},!this.activeRecording||this.activeRecording.isRrwebStopped()){var t=function(){Pp.log("Idle timeout reached, restarting recording."),this.resetRecording()}.bind(this),n=function(){Pp.log("Max recording length reached, stopping recording."),this.resetRecording()}.bind(this),r=function(){this.recordingRegistry.setActiveRecording(this.activeRecording.serialize()),this.__flushPromise=this.activeRecording.batcher._flushPromise}.bind(this),i={mixpanelInstance:this.mixpanelInstance,onBatchSent:r,onIdleTimeout:t,onMaxLengthReached:n,replayId:Tu.UUID(),rrwebRecord:this.rrwebRecord,sharedLockStorage:this.sharedLockStorage};return e.activeSerializedRecording?this.activeRecording=Mp.deserialize(e.activeSerializedRecording,i):this.activeRecording=new Mp(i),this.activeRecording.startRecording(e.shouldStopBatcher),this.recordingRegistry.setActiveRecording(this.activeRecording.serialize())}Pp.log("Recording already in progress, skipping startRecording.")},Lp.prototype.stopRecording=function(){return this.stopRecordingInProgress=!0,this._stopCurrentRecording(!1,!0).then(function(){return this.recordingRegistry.clearActiveRecording()}.bind(this)).then(function(){this.stopRecordingInProgress=!1}.bind(this))},Lp.prototype.pauseRecording=function(){return this._stopCurrentRecording(!1)},Lp.prototype._stopCurrentRecording=function(e,t){if(this.activeRecording){var n=this.activeRecording.stopRecording(e);return t&&(this.activeRecording=null),n}return tu.resolve()},Lp.prototype.resumeRecording=function(e){return this.activeRecording&&this.activeRecording.isRrwebStopped()?(this.activeRecording.startRecording(!1),tu.resolve(null)):this.recordingRegistry.getActiveRecording().then(function(t){return t&&!this.stopRecordingInProgress?this.startRecording({activeSerializedRecording:t}):e?this.startRecording({shouldStopBatcher:!1}):(Pp.log("No resumable recording found."),null)}.bind(this))},Lp.prototype.resetRecording=function(){this.stopRecording(),this.startRecording({shouldStopBatcher:!0})},Lp.prototype.getActiveReplayId=function(){return this.activeRecording&&!this.activeRecording.isRrwebStopped()?this.activeRecording.replayId:null},Object.defineProperty(Lp.prototype,"replayId",{get:function(){return this.getActiveReplayId()}}),r.__mp_recorder=Lp;var Dp="change",Fp="click",Up="hashchange",jp="load",Bp="mp_locationchange",$p="popstate",zp="scrollend",qp="scroll",Vp="submit",Wp="visibilitychange",Hp=["clientX","clientY","offsetX","offsetY","pageX","pageY","screenX","screenY","x","y"],Gp=["mp-include"],Kp=["mp-no-track"],Jp=Kp.concat(["mp-sensitive"]),Yp=["aria-label","aria-labelledby","aria-describedby","href","name","role","title","type"],Zp={button:!0,checkbox:!0,combobox:!0,grid:!0,link:!0,listbox:!0,menu:!0,menubar:!0,menuitem:!0,menuitemcheckbox:!0,menuitemradio:!0,navigation:!0,option:!0,radio:!0,radiogroup:!0,searchbox:!0,slider:!0,spinbutton:!0,switch:!0,tab:!0,tablist:!0,textbox:!0,tree:!0,treegrid:!0,treeitem:!0},Xp={base:!0,head:!0,html:!0,link:!0,meta:!0,script:!0,style:!0,title:!0,br:!0,hr:!0,wbr:!0,noscript:!0,picture:!0,source:!0,template:!0,track:!0},Qp={article:!0,div:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,p:!0,section:!0,span:!0},ed=["onclick","onmousedown","onmouseup","onpointerdown","onpointerup","ontouchend","ontouchstart"],td=Du("autocapture");function nd(e){for(var t={},n=rd(e).split(" "),r=0;r0?t[0]:e.target||e.srcElement}function bd(){this.clicks=[]}function _d(e,t){this.changeCallback=e||function(){},this.observerConfig=t,this.observedShadowRoots=null,this.shadowObservers=[]}bd.prototype.isRageClick=function(e,t){var n=(t=t||{}).threshold_px||30,r=t.timeout_ms||1e3,i=t.click_count||4;if(t.interactive_elements_only){var o=yd(e);if(!o||md(o))return!1}var s=Date.now(),a=e.pageX,c=e.pageY,l=this.clicks[this.clicks.length-1];if(l&&s-l.timestamp=i)return this.clicks=[],!0}else this.clicks=[{x:a,y:c,timestamp:s}];return!1},_d.prototype.getEventTarget=function(e){if(this.observedShadowRoots)return yd(e)},_d.prototype.observeFromEvent=function(e){if(this.observedShadowRoots)for(var t=vd(e),n=0;n=t?this.hasChangesAfter(s.timestamp)||i.push(s):this.pendingClicks.push(s)}return i},Cd.prototype.hasChangesAfter=function(e){return this.lastChangeEventTimestamp>=e-100},Cd.prototype.recordChangeEvent=function(){this.lastChangeEventTimestamp=Date.now()},Cd.prototype.triggerProcessing=function(e){this.processingActive||(this.processingActive=!0,this.processRecursively(e))},Cd.prototype.processRecursively=function(e){if(this.isTracking&&this.onDeadClickCallback){var t=e.timeout_ms,n=this;this.processingTimeout=setTimeout(function(){if(n.processingActive){for(var t=n.getDeadClicks(e),r=0;r0?n.processRecursively(e):n.processingActive=!1}},t)}else this.processingActive=!1},Cd.prototype.startTracking=function(){if(!this.isTracking){this.isTracking=!0;var e=this;wd.forEach(function(t){var n=function(){e.recordChangeEvent()};document.addEventListener(t,n,{capture:!0,passive:!0}),e.eventListeners.push({target:document,event:t,handler:n,options:{capture:!0,passive:!0}})}),Sd.forEach(function(t){var n=function(){e.recordChangeEvent()};window.addEventListener(t,n),e.eventListeners.push({target:window,event:t,handler:n})}),kd.forEach(function(t){var n=function(){e.recordChangeEvent()};window.addEventListener(t,n,{passive:!0}),e.eventListeners.push({target:window,event:t,handler:n,options:{passive:!0}})});var t=function(){e.recordChangeEvent()};if(document.addEventListener("selectionchange",t),e.eventListeners.push({target:document,event:"selectionchange",handler:t}),window.MutationObserver)try{this.mutationObserver=new window.MutationObserver(function(){e.recordChangeEvent()}),this.mutationObserver.observe(document.body||document.documentElement,xd)}catch(e){td.critical("Error while setting up mutation observer",e)}if(window.customElements)try{this.shadowDOMObserver=new _d(function(){e.recordChangeEvent()},xd),this.shadowDOMObserver.start()}catch(e){td.critical("Error while setting up shadow DOM observer",e),this.shadowDOMObserver=null}}},Cd.prototype.stopTracking=function(){if(this.isTracking){this.isTracking=!1,this.pendingClicks=[],this.lastChangeEventTimestamp=0,this.processingActive=!1,this.processingTimeout&&(clearTimeout(this.processingTimeout),this.processingTimeout=null);for(var e=0;ethis.maxScrollViewDepth&&(this.maxScrollViewDepth=e),this.previousScrollHeight=Su.body.scrollHeight}}.bind(this));this.listenerScrollDepth=e.listener,r.addEventListener(e.eventType,this.listenerScrollDepth)}},Zd.prototype.initClickTracking=function(){r.removeEventListener(Fp,this.listenerClick),(this.getConfig(Ud)||this.mp.get_config("record_heatmap_data"))&&(td.log("Initializing click tracking"),this.listenerClick=function(e){(this.getConfig(Ud)||this.mp.is_recording_heatmap_data())&&this.trackDomEvent(e,Kd)}.bind(this),r.addEventListener(Fp,this.listenerClick))},Zd.prototype.initDeadClickTracking=function(){this._getClickTrackingConfig(jd)||this.mp.get_config("record_heatmap_data")?(td.log("Initializing dead click tracking"),this._deadClickTracker||(this._deadClickTracker=new Cd(function(e){this.trackDomEvent(e,Jd)}.bind(this)),this._deadClickTracker.startTracking()),this.listenerDeadClick||(this.listenerDeadClick=function(e){var t=this._getClickTrackingConfig(jd);if((t||this.mp.is_recording_heatmap_data())&&!this.currentUrlBlocked()){var n=t||{};n.timeout_ms||(n.timeout_ms=500),this._deadClickTracker.trackClick(e,n)}}.bind(this),r.addEventListener(Fp,this.listenerDeadClick))):this.stopDeadClickTracking()},Zd.prototype.initInputTracking=function(){r.removeEventListener(Dp,this.listenerChange),this.getConfig(Bd)&&(td.log("Initializing input tracking"),this.listenerChange=function(e){this.getConfig(Bd)&&this.trackDomEvent(e,"$mp_input_change")}.bind(this),r.addEventListener(Dp,this.listenerChange))},Zd.prototype.initPageviewTracking=function(){if(r.removeEventListener(Bp,this.listenerLocationchange),this.pageviewTrackingConfig()){td.log("Initializing pageview tracking");var e="",t=!1;this.currentUrlBlocked()||(t=this.mp.track_pageview(Gd)),t&&(e=Tu.info.currentUrl()),this.listenerLocationchange=Fu(function(){if(!this.currentUrlBlocked()){var t=Tu.info.currentUrl(),n=!1,r=t.split("#")[0].split("?")[0]!==e.split("#")[0].split("?")[0],i=this.pageviewTrackingConfig();i===Id?n=t!==e:"url-with-path-and-query-string"===i?n=t.split("#")[0]!==e.split("#")[0]:"url-with-path"===i&&(n=r),n&&(this.mp.track_pageview(Gd)&&(e=t),r&&(this.lastScrollCheckpoint=0,td.log("Path change: re-initializing scroll depth checkpoints")))}}.bind(this)),r.addEventListener(Bp,this.listenerLocationchange)}},Zd.prototype.initRageClickTracking=function(){r.removeEventListener(Fp,this.listenerRageClick),(this._getClickTrackingConfig(zd)||this.mp.get_config("record_heatmap_data"))&&(td.log("Initializing rage click tracking"),this._rageClickTracker||(this._rageClickTracker=new bd),this.listenerRageClick=function(e){var t=this._getClickTrackingConfig(zd);(t||this.mp.is_recording_heatmap_data())&&(this.currentUrlBlocked()||this._rageClickTracker.isRageClick(e,t)&&this.trackDomEvent(e,Yd))}.bind(this),r.addEventListener(Fp,this.listenerRageClick))},Zd.prototype.initScrollTracking=function(){if(r.removeEventListener(zp,this.listenerScroll),r.removeEventListener(qp,this.listenerScroll),this.getConfig(qd)){td.log("Initializing scroll tracking"),this.lastScrollCheckpoint=0;var e=fd(function(){if(this.getConfig(qd)&&!this.currentUrlBlocked()){var e=this.getConfig(Dd),t=(this.getConfig(Fd)||[]).slice().sort(function(e,t){return e-t}),n=r.scrollY,i=Tu.extend({$scroll_top:n},Gd);try{var o=Su.body.scrollHeight,s=Math.round(n/(o-r.innerHeight)*100);if(i.$scroll_height=o,i.$scroll_percentage=s,s>this.lastScrollCheckpoint)for(var a=0;a=c&&this.lastScrollCheckpoint=0;p--)c=this._mixpanel.persistence.load_queue(uh),l=c.pop(),a._mixpanel.persistence.save(),Tu.isEmptyObject(l)||a.append(l,u);var d=this._mixpanel.persistence.load_queue(dh);if(!Tu.isUndefined(d)&&Tu.isArray(d)&&d.length)for(var h,f=function(e,t){0===e&&a._mixpanel.persistence._add_to_people_queue(dh,h),Tu.isUndefined(s)||s(e,t)},g=d.length-1;g>=0;g--)d=this._mixpanel.persistence.load_queue(dh),h=d.pop(),a._mixpanel.persistence.save(),Tu.isEmptyObject(h)||a.remove(h,f)},gh.prototype._is_reserved_property=function(e){return"$distinct_id"===e||"$token"===e||"$device_id"===e||"$user_id"===e||"$had_persisted_distinct_id"===e},gh.prototype.set=gh.prototype.set,gh.prototype.set_once=gh.prototype.set_once,gh.prototype.unset=gh.prototype.unset,gh.prototype.increment=gh.prototype.increment,gh.prototype.append=gh.prototype.append,gh.prototype.remove=gh.prototype.remove,gh.prototype.union=gh.prototype.union,gh.prototype.track_charge=gh.prototype.track_charge,gh.prototype.clear_charges=gh.prototype.clear_charges,gh.prototype.delete_user=gh.prototype.delete_user,gh.prototype.toString=gh.prototype.toString;var mh,vh="__mps",yh="__mpso",bh="__mpus",_h="__mpa",wh="__mpap",kh="__mpr",Sh="__mpu",xh="$people_distinct_id",Ch="__alias",Eh="__timers",Ih=[vh,yh,bh,_h,wh,kh,Sh,xh,Ch,Eh],Nh=function(e){this.props={},this.campaign_params_saved=!1,e.persistence_name?this.name="mp_"+e.persistence_name:this.name="mp_"+e.token+"_mixpanel";var t=e.persistence;"cookie"!==t&&"localStorage"!==t&&(Pu.critical("Unknown persistence type "+t+"; falling back to cookie"),t=e.persistence="cookie"),"localStorage"===t&&Tu.localStorage.is_supported()?this.storage=Tu.localStorage:this.storage=Tu.cookie,this.load(),this.update_config(e),this.upgrade(),this.save()};Nh.prototype.properties=function(){var e={};return this.load(),Tu.each(this.props,function(t,n){Tu.include(Ih,n)||(e[n]=t)}),e},Nh.prototype.load=function(){if(!this.disabled){var e=this.storage.parse(this.name);e&&(this.props=Tu.extend({},e))}},Nh.prototype.upgrade=function(){var e,t;this.storage===Tu.localStorage?(e=Tu.cookie.parse(this.name),Tu.cookie.remove(this.name),Tu.cookie.remove(this.name,!0),e&&this.register_once(e)):this.storage===Tu.cookie&&(t=Tu.localStorage.parse(this.name),Tu.localStorage.remove(this.name),t&&this.register_once(t))},Nh.prototype.save=function(){this.disabled||this.storage.set(this.name,Qu(this.props),this.expire_days,this.cross_subdomain,this.secure,this.cross_site,this.cookie_domain)},Nh.prototype.load_prop=function(e){return this.load(),this.props[e]},Nh.prototype.remove=function(){this.storage.remove(this.name,!1,this.cookie_domain),this.storage.remove(this.name,!0,this.cookie_domain)},Nh.prototype.clear=function(){this.remove(),this.props={}},Nh.prototype.register_once=function(e,t,n){return!!Tu.isObject(e)&&(void 0===t&&(t="None"),this.expire_days=void 0===n?this.default_expiry:n,this.load(),Tu.each(e,function(e,n){this.props.hasOwnProperty(n)&&this.props[n]!==t||(this.props[n]=e)},this),this.save(),!0)},Nh.prototype.register=function(e,t){return!!Tu.isObject(e)&&(this.expire_days=void 0===t?this.default_expiry:t,this.load(),Tu.extend(this.props,e),this.save(),!0)},Nh.prototype.unregister=function(e){this.load(),e in this.props&&(delete this.props[e],this.save())},Nh.prototype.update_search_keyword=function(e){this.register(Tu.info.searchInfo(e))},Nh.prototype.update_referrer_info=function(e){this.register_once({$initial_referrer:e||"$direct",$initial_referring_domain:Tu.info.referringDomain(e)||"$direct"},"")},Nh.prototype.get_referrer_info=function(){return Tu.strip_empty_properties({$initial_referrer:this.props.$initial_referrer,$initial_referring_domain:this.props.$initial_referring_domain})},Nh.prototype.update_config=function(e){this.default_expiry=this.expire_days=e.cookie_expiration,this.set_disabled(e.disable_persistence),this.set_cookie_domain(e.cookie_domain),this.set_cross_site(e.cross_site_cookie),this.set_cross_subdomain(e.cross_subdomain_cookie),this.set_secure(e.secure_cookie)},Nh.prototype.set_disabled=function(e){this.disabled=e,this.disabled?this.remove():this.save()},Nh.prototype.set_cookie_domain=function(e){e!==this.cookie_domain&&(this.remove(),this.cookie_domain=e,this.save())},Nh.prototype.set_cross_site=function(e){e!==this.cross_site&&(this.cross_site=e,this.remove(),this.save())},Nh.prototype.set_cross_subdomain=function(e){e!==this.cross_subdomain&&(this.cross_subdomain=e,this.remove(),this.save())},Nh.prototype.get_cross_subdomain=function(){return this.cross_subdomain},Nh.prototype.set_secure=function(e){e!==this.secure&&(this.secure=!!e,this.remove(),this.save())},Nh.prototype._add_to_people_queue=function(e,t){var n=this._get_queue_key(e),r=t[e],i=this._get_or_create_queue(sh),o=this._get_or_create_queue(ah),s=this._get_or_create_queue(ch),a=this._get_or_create_queue(lh),c=this._get_or_create_queue(ph),l=this._get_or_create_queue(dh,[]),u=this._get_or_create_queue(uh,[]);n===vh?(Tu.extend(i,r),this._pop_from_people_queue(lh,r),this._pop_from_people_queue(ph,r),this._pop_from_people_queue(ch,r)):n===yh?(Tu.each(r,function(e,t){t in o||(o[t]=e)}),this._pop_from_people_queue(ch,r)):n===bh?Tu.each(r,function(e){Tu.each([i,o,a,c],function(t){e in t&&delete t[e]}),Tu.each(u,function(t){e in t&&delete t[e]}),s[e]=!0}):n===_h?(Tu.each(r,function(e,t){t in i?i[t]+=e:(t in a||(a[t]=0),a[t]+=e)},this),this._pop_from_people_queue(ch,r)):n===Sh?(Tu.each(r,function(e,t){Tu.isArray(e)&&(t in c||(c[t]=[]),Tu.each(e,function(e){Tu.include(c[t],e)||c[t].push(e)}))}),this._pop_from_people_queue(ch,r)):n===kh?(l.push(r),this._pop_from_people_queue(uh,r)):n===wh&&(u.push(r),this._pop_from_people_queue(ch,r)),Pu.log("MIXPANEL PEOPLE REQUEST (QUEUED, PENDING IDENTIFY):"),Pu.log(t),this.save()},Nh.prototype._pop_from_people_queue=function(e,t){var n=this.props[this._get_queue_key(e)];Tu.isUndefined(n)||Tu.each(t,function(t,r){e===uh||e===dh?Tu.each(n,function(e){e[r]===t&&delete e[r]}):delete n[r]},this)},Nh.prototype.load_queue=function(e){return this.load_prop(this._get_queue_key(e))},Nh.prototype._get_queue_key=function(e){return e===sh?vh:e===ah?yh:e===ch?bh:e===lh?_h:e===uh?wh:e===dh?kh:e===ph?Sh:void Pu.error("Invalid queue:",e)},Nh.prototype._get_or_create_queue=function(e,t){var n=this._get_queue_key(e);return t=Tu.isUndefined(t)?{}:t,this.props[n]||(this.props[n]=t)},Nh.prototype.set_event_timer=function(e,t){var n=this.load_prop(Eh)||{};n[e]=t,this.props[Eh]=n,this.save()},Nh.prototype.remove_event_timer=function(e){var t=(this.load_prop(Eh)||{})[e];return Tu.isUndefined(t)||(delete this.props[Eh][e],this.save()),t};var Oh,Ah=function(e,t){throw new Error(e+" not available in this build.")},Rh=function(e){return e},Mh="mixpanel",Th="base64",Ph="$device:",Lh=r.XMLHttpRequest&&"withCredentials"in new XMLHttpRequest,Dh=!Lh&&-1===Eu.indexOf("MSIE")&&-1===Eu.indexOf("Mozilla"),Fh=null;ku.sendBeacon&&(Fh=function(){return ku.sendBeacon.apply(ku,arguments)});var Uh={track:"track/",engage:"engage/",groups:"groups/",record:"record/",flags:"flags/"},jh={api_host:"https://api-js.mixpanel.com",api_hosts:{},api_routes:Uh,api_extra_query_params:{},api_method:"POST",api_transport:"XHR",api_payload_format:Th,app_host:"https://mixpanel.com",autocapture:!1,cdn:"https://cdn.mxpnl.com",cross_site_cookie:!1,cross_subdomain_cookie:!0,error_reporter:Xu,flags:!1,persistence:"cookie",persistence_name:"",cookie_domain:"",cookie_name:"",loaded:Xu,mp_loader:null,track_marketing:!0,track_pageview:!1,skip_first_touch_marketing:!1,store_google:!0,stop_utm_persistence:!1,save_referrer:!0,test:!1,verbose:!1,img:!1,debug:!1,track_links_timeout:300,cookie_expiration:365,upgrade:!1,disable_persistence:!1,disable_cookie:!1,secure_cookie:!1,ip:!0,opt_out_tracking_by_default:!1,opt_out_persistence_by_default:!1,opt_out_tracking_persistence_type:"localStorage",opt_out_tracking_cookie_prefix:null,property_blacklist:[],xhr_headers:{},ignore_dnt:!1,batch_requests:!0,batch_size:50,batch_flush_interval_ms:5e3,batch_request_timeout_ms:9e4,batch_autostart:!0,hooks:{},record_block_class:new RegExp("^(mp-block|fs-exclude|amp-block|rr-block|ph-no-capture)$"),record_block_selector:"img, video, audio",record_canvas:!1,record_collect_fonts:!1,record_console:!0,record_heatmap_data:!1,record_idle_timeout_ms:18e5,record_mask_text_class:new RegExp("^(mp-mask|fs-mask|amp-mask|rr-mask|ph-mask)$"),record_mask_text_selector:"*",record_max_ms:fu,record_min_ms:0,record_sessions_percent:0,recorder_src:"https://cdn.mxpnl.com/libs/mixpanel-recorder.min.js"},Bh=!1,$h=function(){},zh=function(e,t,n){var r,i=n===Mh?Oh:Oh[n];if(i&&0===mh)r=i;else{if(i&&!Tu.isArray(i))return void Pu.error("You have already initialized "+n);r=new $h}if(r._cached_groups={},r._init(e,t,n),r.people=new gh,r.people._init(r),!r.get_config("skip_first_touch_marketing")){var o=Tu.info.campaignParams(null),s={},a=!1;Tu.each(o,function(e,t){s["initial_"+t]=e,e&&(a=!0)}),a&&r.people.set_once(s)}return hu.DEBUG=hu.DEBUG||r.get_config("debug"),!Tu.isUndefined(i)&&Tu.isArray(i)&&(r._execute_array.call(r.people,i.people),r._execute_array(i)),r};$h.prototype.init=function(e,t,n){if(Tu.isUndefined(n))this.report_error("You must name your new library: init(token, config, name)");else{if(n!==Mh){var r=zh(e,t,n);return Oh[n]=r,r._loaded(),r}this.report_error("You must initialize the main mixpanel object right after you include the Mixpanel js snippet")}},$h.prototype._init=function(e,t,n){t=t||{},this.__loaded=!0,this.config={};var i={};if("api_payload_format"in t||(t.api_host||jh.api_host).match(/\.mixpanel\.com/)&&(i.api_payload_format="json"),this.set_config(Tu.extend({},jh,i,t,{name:n,token:e,callback_fn:(n===Mh?n:Mh+"."+n)+"._jsc"})),this._jsc=Xu,this.__dom_loaded_queue=[],this.__request_queue=[],this.__disabled_events=[],this._flags={disable_all_events:!1,identify_called:!1},this.request_batchers={},this._batch_requests=this.get_config("batch_requests"),this._batch_requests)if(Tu.localStorage.is_supported(!0)&&Lh){if(this.init_batchers(),Fh&&r.addEventListener){var o=Tu.bind(function(){this.request_batchers.events.stopped||this.request_batchers.events.flush({unloading:!0})},this);r.addEventListener("pagehide",function(e){e.persisted&&o()}),r.addEventListener("visibilitychange",function(){"hidden"===Su.visibilityState&&o()})}}else this._batch_requests=!1,Pu.log("Turning off Mixpanel request-queueing; needs XHR and localStorage support"),Tu.each(this.get_batcher_configs(),function(e){Pu.log("Clearing batch queue "+e.queue_key),Tu.localStorage.remove(e.queue_key)});this.persistence=this.cookie=new Nh(this.config),this.unpersisted_superprops={},this._gdpr_init();var s=Tu.UUID();this.get_distinct_id()||this.register_once({distinct_id:Ph+s,$device_id:s},""),this.flags=new nh({getFullApiRoute:Tu.bind(function(){return this.get_api_host("flags")+"/"+this.get_config("api_routes").flags},this),getConfigFunc:Tu.bind(this.get_config,this),setConfigFunc:Tu.bind(this.set_config,this),getPropertyFunc:Tu.bind(this.get_property,this),trackingFunc:Tu.bind(this.track,this)}),this.flags.init(),this.flags=this.flags,this.autocapture=new Zd(this),this.autocapture.init(),this._init_tab_id(),this._check_and_start_session_recording()},$h.prototype._init_tab_id=function(){if(this.get_config("disable_persistence"))Pu.log("Tab ID initialization skipped due to disable_persistence config");else if(Tu.sessionStorage.is_supported())try{var e=this.get_config("name")+"_"+this.get_config("token"),t="mp_tab_id_"+e,n="mp_gen_new_tab_id_"+e;!Tu.sessionStorage.get(n)&&Tu.sessionStorage.get(t)||Tu.sessionStorage.set(t,"$tab-"+Tu.UUID()),Tu.sessionStorage.set(n,"1"),this.tab_id=Tu.sessionStorage.get(t),r.addEventListener("beforeunload",function(){Tu.sessionStorage.remove(n)})}catch(e){this.report_error("Error initializing tab id",e)}else this.report_error("Session storage is not supported, cannot keep track of unique tab ID.")},$h.prototype.get_tab_id=function(){return this.tab_id||null},$h.prototype._should_load_recorder=function(){if(this.get_config("disable_persistence"))return Pu.log("Load recorder check skipped due to disable_persistence config"),Promise.resolve(!1);var e=new ip(np),t=this.get_tab_id();return e.init().then(function(){return e.getAll()}).then(function(e){for(var n=0;n0&&100*Math.random()<=this.get_config("record_sessions_percent");e||n?t(!0):this._should_load_recorder().then(function(e){e&&t(!1)})}else Pu.critical("Browser does not support MutationObserver; skipping session recording")}),$h.prototype.start_session_recording=function(){this._check_and_start_session_recording(!0)},$h.prototype.stop_session_recording=function(){return this._recorder?this._recorder.stopRecording():Promise.resolve()},$h.prototype.pause_session_recording=function(){return this._recorder?this._recorder.pauseRecording():Promise.resolve()},$h.prototype.resume_session_recording=function(){return this._recorder?this._recorder.resumeRecording():Promise.resolve()},$h.prototype.is_recording_heatmap_data=function(){return this._get_session_replay_id()&&this.get_config("record_heatmap_data")},$h.prototype.get_session_recording_properties=function(){var e={},t=this._get_session_replay_id();return t&&(e.$mp_replay_id=t),e},$h.prototype.get_session_replay_url=function(){var e=null,t=this._get_session_replay_id();return t&&(e="https://mixpanel.com/projects/replay-redirect?"+Tu.HTTPBuildQuery({replay_id:t,distinct_id:this.get_distinct_id(),token:this.get_config("token")})),e},$h.prototype._get_session_replay_id=function(){var e=null;return this._recorder&&(e=this._recorder.replayId),e||null},$h.prototype.__get_recorder=function(){return this._recorder},$h.prototype._loaded=function(){if(this.get_config("loaded")(this),this._set_default_superprops(),this.people.set_once(this.persistence.get_referrer_info()),this.get_config("store_google")&&this.get_config("stop_utm_persistence")){var e=Tu.info.campaignParams(null);Tu.each(e,function(e,t){this.unregister(t)}.bind(this))}},$h.prototype._set_default_superprops=function(){this.persistence.update_search_keyword(Su.referrer),this.get_config("store_google")&&!this.get_config("stop_utm_persistence")&&this.register(Tu.info.campaignParams()),this.get_config("save_referrer")&&this.persistence.update_referrer_info(Su.referrer)},$h.prototype._dom_loaded=function(){Tu.each(this.__dom_loaded_queue,function(e){this._track_dom.apply(this,e)},this),this.has_opted_out_tracking()||Tu.each(this.__request_queue,function(e){this._send_request.apply(this,e)},this),delete this.__dom_loaded_queue,delete this.__request_queue},$h.prototype._track_dom=function(e,t){if(this.get_config("img"))return this.report_error("You can't use DOM tracking functions with img = true."),!1;if(!Bh)return this.__dom_loaded_queue.push([e,t]),!1;var n=(new e).init(this);return n.track.apply(n,t)},$h.prototype._prepare_callback=function(e,t){if(Tu.isUndefined(e))return null;if(Lh)return function(n){e(n,t)};var n=this._jsc,r=""+Math.floor(1e8*Math.random()),i=this.get_config("callback_fn")+"["+r+"]";return n[r]=function(i){delete n[r],e(i,t)},i},$h.prototype._send_request=function(e,t,n,r){var i=!0;if(Dh)return this.__request_queue.push(arguments),i;var o={method:this.get_config("api_method"),transport:this.get_config("api_transport"),verbose:this.get_config("verbose")},s=null;r||!Tu.isFunction(n)&&"string"!=typeof n||(r=n,n=null),n=Tu.extend(o,n||{}),Lh||(n.method="GET");var a="POST"===n.method,c=Fh&&a&&"sendbeacon"===n.transport.toLowerCase(),l=n.verbose;t.verbose&&(l=!0),this.get_config("test")&&(t.test=1),l&&(t.verbose=1),this.get_config("img")&&(t.img=1),Lh||(r?t.callback=r:(l||this.get_config("test"))&&(t.callback="(function(){})")),t.ip=this.get_config("ip")?1:0,t._=(new Date).getTime().toString(),a&&(s="data="+encodeURIComponent(t.data),delete t.data),Tu.extend(t,this.get_config("api_extra_query_params")),e+="?"+Tu.HTTPBuildQuery(t);var u=this;if("img"in t){var p=Su.createElement("img");p.src=e,Su.body.appendChild(p)}else if(c){try{i=Fh(e,s)}catch(e){u.report_error(e),i=!1}try{r&&r(i?1:0)}catch(e){u.report_error(e)}}else if(Lh)try{var d=new XMLHttpRequest;d.open(n.method,e,!0);var h=this.get_config("xhr_headers");if(a&&(h["Content-Type"]="application/x-www-form-urlencoded"),Tu.each(h,function(e,t){d.setRequestHeader(t,e)}),n.timeout_ms&&void 0!==d.timeout){d.timeout=n.timeout_ms;var f=(new Date).getTime()}d.withCredentials=!0,d.onreadystatechange=function(){var e;if(4===d.readyState)if(200===d.status){if(r)if(l){var t;try{t=Tu.JSONDecode(d.responseText)}catch(e){if(u.report_error(e),!n.ignore_json_errors)return;t=d.responseText}r(t)}else r(Number(d.responseText))}else if(e=d.timeout&&!d.status&&(new Date).getTime()-f>=d.timeout?"timeout":"Bad HTTP status: "+d.status+" "+d.statusText,u.report_error(e),r)if(l){var i=d.responseHeaders||{};r({status:0,httpStatusCode:d.status,error:e,retryAfter:i["Retry-After"]})}else r(0)},d.send(s)}catch(e){u.report_error(e),i=!1}else{var g=Su.createElement("script");g.type="text/javascript",g.async=!0,g.defer=!0,g.src=e;var m=Su.getElementsByTagName("script")[0];m.parentNode.insertBefore(g,m)}return i},$h.prototype._execute_array=function(e){var t,n=[],r=[],i=[];Tu.each(e,function(e){e&&(t=e[0],Tu.isArray(t)?i.push(e):"function"==typeof e?e.call(this):Tu.isArray(e)&&"alias"===t?n.push(e):Tu.isArray(e)&&-1!==t.indexOf("track")&&"function"==typeof this[t]?i.push(e):r.push(e))},this);var o=function(e,t){Tu.each(e,function(e){if(Tu.isArray(e[0])){var n=t;Tu.each(e,function(e){n=n[e[0]].apply(n,e.slice(1))})}else this[e[0]].apply(this,e.slice(1))},t)};o(n,this),o(r,this),o(i,this)},$h.prototype.are_batchers_initialized=function(){return!!this.request_batchers.events},$h.prototype.get_batcher_configs=function(){var e="__mpq_"+this.get_config("token");return this._batcher_configs=this._batcher_configs||{events:{type:"events",api_name:"track",queue_key:e+"_ev"},people:{type:"people",api_name:"engage",queue_key:e+"_pp"},groups:{type:"groups",api_name:"groups",queue_key:e+"_gr"}},this._batcher_configs},$h.prototype.init_batchers=function(){if(!this.are_batchers_initialized()){var e=Tu.bind(function(e){return new Ep(e.queue_key,{libConfig:this.config,errorReporter:this.get_config("error_reporter"),sendRequestFunc:Tu.bind(function(t,n,r){var i=this.get_config("api_routes");this._send_request(this.get_api_host(e.api_name)+"/"+i[e.api_name],this._encode_data_for_request(t),n,this._prepare_callback(r,t))},this),beforeSendHook:Tu.bind(function(t){return this._run_hook("before_send_"+e.type,t)},this),stopAllBatchingFunc:Tu.bind(this.stop_batch_senders,this),usePersistence:!0})},this),t=this.get_batcher_configs();this.request_batchers={events:e(t.events),people:e(t.people),groups:e(t.groups)}}this.get_config("batch_autostart")&&this.start_batch_senders()},$h.prototype.start_batch_senders=function(){this._batchers_were_started=!0,this.are_batchers_initialized()&&(this._batch_requests=!0,Tu.each(this.request_batchers,function(e){e.start()}))},$h.prototype.stop_batch_senders=function(){this._batch_requests=!1,Tu.each(this.request_batchers,function(e){e.stop(),e.clear()})},$h.prototype.push=function(e){this._execute_array([e])},$h.prototype.disable=function(e){void 0===e?this._flags.disable_all_events=!0:this.__disabled_events=this.__disabled_events.concat(e)},$h.prototype._encode_data_for_request=function(e){var t=Qu(e);return this.get_config("api_payload_format")===Th&&(t=Tu.base64Encode(t)),{data:t}},$h.prototype._track_or_batch=function(e,t){var n=Tu.truncate(e.data,255),r=e.endpoint,i=e.batcher,o=e.should_send_immediately,s=e.send_request_options||{};t=t||Xu;var a=!0,c=Tu.bind(function(){return s.skip_hooks||(n=this._run_hook("before_send_"+e.type,n)),n?(Pu.log("MIXPANEL REQUEST:"),Pu.log(n),this._send_request(r,this._encode_data_for_request(n),s,this._prepare_callback(t,n))):null},this);return this._batch_requests&&!o?i.enqueue(n).then(function(e){e?t(1,n):c()}):a=c(),a&&n},$h.prototype.track=lp(function(e,t,n,r){r||"function"!=typeof n||(r=n,n=null);var i=(n=n||{}).transport;i&&(n.transport=i);var o=n.send_immediately;if("function"!=typeof r&&(r=Xu),Tu.isUndefined(e))this.report_error("No event name provided to mixpanel.track");else{if(!this._event_is_disabled(e)){(t=Tu.extend({},t)).token=this.get_config("token");var s=this.persistence.remove_event_timer(e);if(!Tu.isUndefined(s)){var a=(new Date).getTime()-s;t.$duration=parseFloat((a/1e3).toFixed(3))}this._set_default_superprops();var c=this.get_config("track_marketing")?Tu.info.marketingParams():{};t=Tu.extend({},Tu.info.properties({mp_loader:this.get_config("mp_loader")}),c,this.persistence.properties(),this.unpersisted_superprops,this.get_session_recording_properties(),t);var l=this.get_config("property_blacklist");Tu.isArray(l)?Tu.each(l,function(e){delete t[e]}):this.report_error("Invalid value for property_blacklist config: "+l);var u={event:e,properties:t};return this._track_or_batch({type:"events",data:u,endpoint:this.get_api_host("events")+"/"+this.get_config("api_routes").track,batcher:this.request_batchers.events,should_send_immediately:o,send_request_options:n},r)}r(0)}}),$h.prototype.set_group=lp(function(e,t,n){Tu.isArray(t)||(t=[t]);var r={};return r[e]=t,this.register(r),this.people.set(e,t,n)}),$h.prototype.add_group=lp(function(e,t,n){var r=this.get_property(e),i={};return void 0===r?(i[e]=[t],this.register(i)):-1===r.indexOf(t)&&(r.push(t),i[e]=r,this.register(i)),this.people.union(e,t,n)}),$h.prototype.remove_group=lp(function(e,t,n){var r=this.get_property(e);if(void 0!==r){var i=r.indexOf(t);i>-1&&(r.splice(i,1),this.register({group_key:r})),0===r.length&&this.unregister(e)}return this.people.remove(e,t,n)}),$h.prototype.track_with_groups=lp(function(e,t,n,r){var i=Tu.extend({},t||{});return Tu.each(n,function(e,t){null!=e&&(i[t]=e)}),this.track(e,i,r)}),$h.prototype._create_map_key=function(e,t){return e+"_"+JSON.stringify(t)},$h.prototype._remove_group_from_cache=function(e,t){delete this._cached_groups[this._create_map_key(e,t)]},$h.prototype.get_group=function(e,t){var n=this._create_map_key(e,t),r=this._cached_groups[n];return void 0!==r&&r._group_key===e&&r._group_id===t||((r=new fh)._init(this,e,t),this._cached_groups[n]=r),r},$h.prototype.track_pageview=lp(function(e,t){"object"!=typeof e&&(e={});var n=(t=t||{}).event_name||"$mp_web_page_view",r=Tu.extend(Tu.info.mpPageViewProperties(),Tu.info.campaignParams(),Tu.info.clickParams()),i=Tu.extend({},r,e);return this.track(n,i)}),$h.prototype.track_links=function(){return this._track_dom.call(this,ih,arguments)},$h.prototype.track_forms=function(){return this._track_dom.call(this,oh,arguments)},$h.prototype.time_event=function(e){Tu.isUndefined(e)?this.report_error("No event name provided to mixpanel.time_event"):this._event_is_disabled(e)||this.persistence.set_event_timer(e,(new Date).getTime())};var qh={persistent:!0},Vh=function(e){var t;return t=Tu.isObject(e)?e:Tu.isUndefined(e)?{}:{days:e},Tu.extend({},qh,t)};$h.prototype.register=function(e,t){var n=Vh(t);n.persistent?this.persistence.register(e,n.days):Tu.extend(this.unpersisted_superprops,e)},$h.prototype.register_once=function(e,t,n){var r=Vh(n);r.persistent?this.persistence.register_once(e,t,r.days):(void 0===t&&(t="None"),Tu.each(e,function(e,n){this.unpersisted_superprops.hasOwnProperty(n)&&this.unpersisted_superprops[n]!==t||(this.unpersisted_superprops[n]=e)},this))},$h.prototype.unregister=function(e,t){(t=Vh(t)).persistent?this.persistence.unregister(e):delete this.unpersisted_superprops[e]},$h.prototype._register_single=function(e,t){var n={};n[e]=t,this.register(n)},$h.prototype.identify=function(e,t,n,r,i,o,s,a){var c=this.get_distinct_id();if(e&&c!==e){if("string"==typeof e&&0===e.indexOf(Ph))return this.report_error("distinct_id cannot have $device: prefix"),-1;this.register({$user_id:e})}if(!this.get_property("$device_id")){var l=c;this.register_once({$had_persisted_distinct_id:!0,$device_id:l},"")}e!==c&&e!==this.get_property(Ch)&&(this.unregister(Ch),this.register({distinct_id:e})),this._flags.identify_called=!0,this.people._flush(t,n,r,i,o,s,a),e!==c&&this.track("$identify",{distinct_id:e,$anon_distinct_id:c},{skip_hooks:!0}),e!==c&&this.flags.fetchFlags()},$h.prototype.reset=function(){this.stop_session_recording(),this.persistence.clear(),this._flags.identify_called=!1;var e=Tu.UUID();this.register_once({distinct_id:Ph+e,$device_id:e},""),this._check_and_start_session_recording()},$h.prototype.get_distinct_id=function(){return this.get_property("distinct_id")},$h.prototype.alias=function(e,t){if(e===this.get_property(xh))return this.report_error("Attempting to create alias for existing People user - aborting."),-2;var n=this;return Tu.isUndefined(t)&&(t=this.get_distinct_id()),e!==t?(this._register_single(Ch,e),this.track("$create_alias",{alias:e,distinct_id:t},{skip_hooks:!0},function(){n.identify(e)})):(this.report_error("alias matches current distinct_id - skipping api call."),this.identify(e),-1)},$h.prototype.name_tag=function(e){this._register_single("mp_name_tag",e)},$h.prototype.set_config=function(e){Tu.isObject(e)&&(Tu.extend(this.config,e),e.batch_size&&Tu.each(this.request_batchers,function(e){e.resetBatchSize()}),this.get_config("persistence_name")||(this.config.persistence_name=this.config.cookie_name),this.get_config("disable_persistence")||(this.config.disable_persistence=this.config.disable_cookie),this.persistence&&this.persistence.update_config(this.config),hu.DEBUG=hu.DEBUG||this.get_config("debug"),("autocapture"in e||"record_heatmap_data"in e)&&this.autocapture&&this.autocapture.init())},$h.prototype.get_config=function(e){return this.config[e]},$h.prototype._run_hook=function(e){var t=(this.config.hooks[e]||Rh).apply(this,yu.call(arguments,1));return void 0===t&&(this.report_error(e+" hook did not return a value"),t=null),t},$h.prototype.get_property=function(e){return this.persistence.load_prop([e])},$h.prototype.get_api_host=function(e){return this.get_config("api_hosts")[e]||this.get_config("api_host")},$h.prototype.toString=function(){var e=this.get_config("name");return e!==Mh&&(e=Mh+"."+e),e},$h.prototype._event_is_disabled=function(e){return Tu.isBlockedUA(Eu)||this._flags.disable_all_events||Tu.include(this.__disabled_events,e)},$h.prototype._gdpr_init=function(){"localStorage"===this.get_config("opt_out_tracking_persistence_type")&&Tu.localStorage.is_supported()&&(!this.has_opted_in_tracking()&&this.has_opted_in_tracking({persistence_type:"cookie"})&&this.opt_in_tracking({enable_persistence:!1}),!this.has_opted_out_tracking()&&this.has_opted_out_tracking({persistence_type:"cookie"})&&this.opt_out_tracking({clear_persistence:!1}),this.clear_opt_in_out_tracking({persistence_type:"cookie",enable_persistence:!1})),this.has_opted_out_tracking()?this._gdpr_update_persistence({clear_persistence:!0}):this.has_opted_in_tracking()||!this.get_config("opt_out_tracking_by_default")&&!Tu.cookie.get("mp_optout")||(Tu.cookie.remove("mp_optout"),this.opt_out_tracking({clear_persistence:this.get_config("opt_out_persistence_by_default")}))},$h.prototype._gdpr_update_persistence=function(e){var t;if(e&&e.clear_persistence)t=!0;else{if(!e||!e.enable_persistence)return;t=!1}this.get_config("disable_persistence")||this.persistence.disabled===t||this.persistence.set_disabled(t),t?(this.stop_batch_senders(),this.stop_session_recording()):this._batchers_were_started&&this.start_batch_senders()},$h.prototype._gdpr_call_func=function(e,t){return t=Tu.extend({track:Tu.bind(this.track,this),persistence_type:this.get_config("opt_out_tracking_persistence_type"),cookie_prefix:this.get_config("opt_out_tracking_cookie_prefix"),cookie_expiration:this.get_config("cookie_expiration"),cross_site_cookie:this.get_config("cross_site_cookie"),cross_subdomain_cookie:this.get_config("cross_subdomain_cookie"),cookie_domain:this.get_config("cookie_domain"),secure_cookie:this.get_config("secure_cookie"),ignore_dnt:this.get_config("ignore_dnt")},t),Tu.localStorage.is_supported()||(t.persistence_type="cookie"),e(this.get_config("token"),{track:t.track,trackEventName:t.track_event_name,trackProperties:t.track_properties,persistenceType:t.persistence_type,persistencePrefix:t.cookie_prefix,cookieDomain:t.cookie_domain,cookieExpiration:t.cookie_expiration,crossSiteCookie:t.cross_site_cookie,crossSubdomainCookie:t.cross_subdomain_cookie,secureCookie:t.secure_cookie,ignoreDnt:t.ignore_dnt})},$h.prototype.opt_in_tracking=function(e){e=Tu.extend({enable_persistence:!0},e),this._gdpr_call_func(op,e),this._gdpr_update_persistence(e)},$h.prototype.opt_out_tracking=function(e){(e=Tu.extend({clear_persistence:!0,delete_user:!0},e)).delete_user&&this.people&&this.people._identify_called()&&(this.people.delete_user(),this.people.clear_charges()),this._gdpr_call_func(sp,e),this._gdpr_update_persistence(e)},$h.prototype.has_opted_in_tracking=function(e){return this._gdpr_call_func(ap,e)},$h.prototype.has_opted_out_tracking=function(e){return this._gdpr_call_func(cp,e)},$h.prototype.clear_opt_in_out_tracking=function(e){e=Tu.extend({enable_persistence:!0},e),this._gdpr_call_func(dp,e),this._gdpr_update_persistence(e)},$h.prototype.report_error=function(e,t){Pu.error.apply(Pu.error,arguments);try{t||e instanceof Error||(e=new Error(e)),this.get_config("error_reporter")(e,t)}catch(t){Pu.error(t)}},$h.prototype.init=$h.prototype.init,$h.prototype.reset=$h.prototype.reset,$h.prototype.disable=$h.prototype.disable,$h.prototype.time_event=$h.prototype.time_event,$h.prototype.track=$h.prototype.track,$h.prototype.track_links=$h.prototype.track_links,$h.prototype.track_forms=$h.prototype.track_forms,$h.prototype.track_pageview=$h.prototype.track_pageview,$h.prototype.register=$h.prototype.register,$h.prototype.register_once=$h.prototype.register_once,$h.prototype.unregister=$h.prototype.unregister,$h.prototype.identify=$h.prototype.identify,$h.prototype.alias=$h.prototype.alias,$h.prototype.name_tag=$h.prototype.name_tag,$h.prototype.set_config=$h.prototype.set_config,$h.prototype.get_config=$h.prototype.get_config,$h.prototype.get_api_host=$h.prototype.get_api_host,$h.prototype.get_property=$h.prototype.get_property,$h.prototype.get_distinct_id=$h.prototype.get_distinct_id,$h.prototype.toString=$h.prototype.toString,$h.prototype.opt_out_tracking=$h.prototype.opt_out_tracking,$h.prototype.opt_in_tracking=$h.prototype.opt_in_tracking,$h.prototype.has_opted_out_tracking=$h.prototype.has_opted_out_tracking,$h.prototype.has_opted_in_tracking=$h.prototype.has_opted_in_tracking,$h.prototype.clear_opt_in_out_tracking=$h.prototype.clear_opt_in_out_tracking,$h.prototype.get_group=$h.prototype.get_group,$h.prototype.set_group=$h.prototype.set_group,$h.prototype.add_group=$h.prototype.add_group,$h.prototype.remove_group=$h.prototype.remove_group,$h.prototype.track_with_groups=$h.prototype.track_with_groups,$h.prototype.start_batch_senders=$h.prototype.start_batch_senders,$h.prototype.stop_batch_senders=$h.prototype.stop_batch_senders,$h.prototype.start_session_recording=$h.prototype.start_session_recording,$h.prototype.stop_session_recording=$h.prototype.stop_session_recording,$h.prototype.pause_session_recording=$h.prototype.pause_session_recording,$h.prototype.resume_session_recording=$h.prototype.resume_session_recording,$h.prototype.get_session_recording_properties=$h.prototype.get_session_recording_properties,$h.prototype.get_session_replay_url=$h.prototype.get_session_replay_url,$h.prototype.get_tab_id=$h.prototype.get_tab_id,$h.prototype.DEFAULT_API_ROUTES=Uh,$h.prototype.__get_recorder=$h.prototype.__get_recorder,Nh.prototype.properties=Nh.prototype.properties,Nh.prototype.update_search_keyword=Nh.prototype.update_search_keyword,Nh.prototype.update_referrer_info=Nh.prototype.update_referrer_info,Nh.prototype.get_cross_subdomain=Nh.prototype.get_cross_subdomain,Nh.prototype.clear=Nh.prototype.clear;var Wh={},Hh=(Ah=function(e,t){t()},mh=0,(Oh=new $h).init=function(e,t,n){if(n)return Oh[n]||(Oh[n]=Wh[n]=zh(e,t,n),Oh[n]._loaded()),Oh[n];var i=Oh;Wh[Mh]?i=Wh[Mh]:e&&((i=zh(e,t,Mh))._loaded(),Wh[Mh]=i),Oh=i,1===mh&&(r[Mh]=Oh),Tu.each(Wh,function(e,t){t!==Mh&&(Oh[t]=e)}),Oh._=Tu},Oh.init(),function(){function e(){e.done||(e.done=!0,Bh=!0,Dh=!1,Tu.each(Wh,function(e){e._dom_loaded()}))}if(Su.addEventListener)"complete"===Su.readyState?e():Su.addEventListener("DOMContentLoaded",e,!1);else if(Su.attachEvent){Su.attachEvent("onreadystatechange",e);var t=!1;try{t=null===r.frameElement}catch(e){}Su.documentElement.doScroll&&t&&function t(){try{Su.documentElement.doScroll("left")}catch(e){return void setTimeout(t,1)}e()}()}Tu.register_event(r,"load",e,!0)}(),Oh)},6818:(e,t,n)=>{"use strict";function r({ajaxUrl:e,nonce:t,action:n,params:r={},interval:i=1e4,onResult:o,onError:s}){let a=!1;const c=setInterval(async()=>{if(!a)try{const i=new URLSearchParams({action:n,nonce:t,...r}),s=await fetch(e,{method:"POST",body:i}),l=await s.json();if(a)return;await Promise.resolve(o(l))&&(a=!0,clearInterval(c))}catch(e){s&&s(e)}},i);return()=>{a=!0,clearInterval(c)}}n.d(t,{g:()=>r})},7008:(e,t,n)=>{"use strict";n.d(t,{$V:()=>p,Mh:()=>d,bi:()=>s,lL:()=>o,oe:()=>u,qt:()=>a,sx:()=>l});var r=n(6751);let i=!1;const o=()=>{try{if("undefined"==typeof window)return!1;if(i)return!0;const e=window.marketplaceConfig||{};if(!e.data_consent_status)return!1;const t=e.mixpanel||{},n=t.token;if(!n||""===n)return!1;r.A.init(n,{api_host:"https://api-eu.mixpanel.com",debug:t.debug||!1,track_pageview:!1,persistence:"localStorage",property_blacklist:["$initial_referrer","$initial_referring_domain","$current_url","$referrer","$referring_domain","mp_lib","$lib_version","$browser","$browser_version","$device","$screen_height","$screen_width","$os","$search_engine"]});const o=t.distinctId;return o&&""!==o&&r.A.identify(o),i=!0,!0}catch(e){return!1}},s=()=>{try{i&&void 0!==r.A&&(r.A.reset(),i=!1)}catch(e){console.error("[MixpanelTracking] Error disabling Mixpanel:",e)}},a=()=>{try{if("undefined"==typeof window)return!1;const e=((window.marketplaceConfig||{}).mixpanel||{}).token;return!(!e||""===e)&&(i=!1,o())}catch(e){return console.error("[MixpanelTracking] Error enabling Mixpanel:",e),!1}},c=()=>{try{if("undefined"==typeof window)return{};const e=((window.marketplaceConfig||{}).mixpanel||{}).globalProperties||{},t=new URLSearchParams(window.location.search).get("page")||"",n={...e,hit_type:"event",page:t||window.location.pathname,path:window.location.pathname+window.location.search,referrer:document.referrer.split("/").filter(Boolean).pop()||""};return Object.fromEntries(Object.entries(n).filter(([e,t])=>""!==t&&null!=t&&(!Array.isArray(t)||0!==t.length)))}catch(e){return{}}},l=(e,t={})=>{try{if(!(()=>{try{return i&&void 0!==r.A}catch(e){return!1}})())return;const n={...c(),...t};r.A.track(e,n)}catch(t){console.error("[MixpanelTracking] Error tracking event:",e,t)}},u=({pluginSlug:e,pluginName:t,category:n,itemName:r,isContentRendered:i=!0,contentReceivedAt:o=null,contentRenderedAt:s=null,isCached:a=!1,visibleConditionalProducts:c=[]}={})=>{try{const u=Date.now(),p={content_received_at:o||u,is_content_rendered:i,is_cached:a};c&&c.length>0&&(p.visible_conditional_products=c),i&&(p.content_rendered_at=s||u),r?p.item_name=r:e&&(p.item_name=e),e&&(p.product_slug=e),t&&(p.product_name=t),n&&(p.item_category=n),l("Page Viewed",p)}catch(e){console.error("[MixpanelTracking] Error tracking page view:",e)}},p=({action:e,plugin:t,result:n="initiated"}={})=>{try{if(!t)return;const r=`Plugin ${e.charAt(0).toUpperCase()+e.slice(1)}`,i={action:e,product_slug:t.slug||"",product_name:t.name||"",item_name:t.slug||"",result:n,timestamp:Date.now()};if(t.categories&&t.categories.length>0){const e="object"==typeof t.categories[0]?t.categories[0].slug||t.categories[0].title:t.categories[0];i.item_category=e}t.licenseType&&(i.license_type=t.licenseType),void 0!==t.priceAmount&&(i.price_amount=t.priceAmount),t.priceCurrency&&(i.price_currency=t.priceCurrency),l(r,i)}catch(e){console.error("[MixpanelTracking] Error tracking plugin action:",e)}},d=({buttonName:e,buttonAction:t,plugin:n=null,context:r={}}={})=>{try{const i={button_name:e||"",button_action:t||"",item_name:e||"",timestamp:Date.now()};n&&Object.assign(i,(e=>{if(!e)return{};const t={product_slug:e.slug||"",product_name:e.name||""};if(e.categories&&e.categories.length>0){const n="object"==typeof e.categories[0]?e.categories[0].slug||e.categories[0].title:e.categories[0];t.item_category=n}return e.licenseType&&(t.license_type=e.licenseType),void 0!==e.priceAmount&&(t.price_amount=e.priceAmount),e.priceCurrency&&(t.price_currency=e.priceCurrency),t})(n)),Object.assign(i,r),l("Button Clicked",i)}catch(e){console.error("[MixpanelTracking] Error tracking button click:",e)}}},7529:e=>{"use strict";e.exports=JSON.parse('{"ui.button.refreshPage":"Aggiorna pagina","ui.notifications.couldNotLoad":"Impossibile caricare la pagina","ui.notifications.refreshPage":"Aggiorna la pagina e contatta il nostro supporto se il problema persiste."}')},7565:(e,t,n)=>{"use strict";n.d(t,{P:()=>i,r:()=>o});let r={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:n(2875).x};const i=(e={})=>{r={...r,...e}},o=()=>r},7674:(e,t,n)=>{"use strict";n(1609),n(1352)},7823:e=>{"use strict";e.exports=JSON.parse('{"ui.button.refreshPage":"Refresh page","ui.notifications.couldNotLoad":"Couldn’t load the page","ui.notifications.refreshPage":"Please refresh the page and contact our support if the issue persists."}')},7829:(e,t,n)=>{"use strict";n(1609),n(4814),n(1352)},7979:(e,t,n)=>{"use strict";n.d(t,{D:()=>d,t:()=>p});var r=n(1609),i=n(7008),o=n(108),s=n(4601),a=n(3331);const c=(0,r.createContext)(null),l={plugin_already_installed:"pluginAlreadyInstalled",install_in_progress:"installInProgress",install_failed_download:"installFailedDownload",install_failed_not_found:"installFailedNotFound",cannot_delete_active:"cannotDeleteActive"},u=(e,t)=>{const n=e?.data?.code;if(n&&l[n]){const e=t?.notifications?.[l[n]];if(e)return e}return e?.error||e?.data?.message||e?.data?.error||null},p=({children:e,apiBaseUrl:t,useWPHandlers:n,wpConfig:l,enableDefaultStyles:p,assetsBaseUrl:d})=>{const[h,f]=(0,r.useState)({}),[g,m]=(0,r.useState)([]),[v,y]=(0,r.useState)({}),[b,_]=(0,r.useState)({}),[w,k]=(0,r.useState)([]),[S,x]=(0,r.useState)({}),[C,E]=(0,r.useState)(""),[I,N]=(0,r.useState)(""),[O,A]=(0,r.useState)({visible:!1,type:null,pluginSlug:null}),[R,M]=(0,r.useState)({visible:!1,type:null,pluginSlug:null}),[T,P]=(0,r.useState)({visible:!1,type:null,pluginSlug:null}),[L,D]=(0,r.useState)(!1),[F,U]=(0,r.useState)(!1),[j,B]=(0,r.useState)(!0),[$,z]=(0,r.useState)({isOn:!1,message:"",buttonLabel:""}),[q,V]=(0,r.useState)({isOpen:!1,plugin:null}),[W,H]=(0,r.useState)({isOpen:!1,plugin:null,subscriptionId:null,expiresAt:null,onConfirm:null}),[G,K]=(0,r.useState)(()=>"undefined"!=typeof window&&window.marketplaceConfig?.pendingProcurements?window.marketplaceConfig.pendingProcurements:{}),[J,Y]=(0,r.useState)(()=>"undefined"!=typeof window?new URLSearchParams(window.location.search).get("plugin"):null);(0,r.useEffect)(()=>{const e=()=>{const e=new URLSearchParams(window.location.search).get("plugin");Y(e)};window.addEventListener("popstate",e);const t=window.history.pushState;window.history.pushState=function(...n){t.apply(this,n),e()};const n=window.history.replaceState;return window.history.replaceState=function(...t){n.apply(this,t),e()},()=>{window.removeEventListener("popstate",e),window.history.pushState=t,window.history.replaceState=n}},[]);const[Z,X]=(0,r.useState)(()=>{const e="undefined"!=typeof window&&window.marketplaceConfig?.data_consent_status;return!0===e||"true"===e||"1"===e||1===e}),Q=((0,r.useRef)({}),(0,r.useRef)(null)),ee="onecom"===("undefined"!=typeof window&&window.marketplaceConfig?.brand),te="undefined"!=typeof window&&window.marketplaceConfig?.activePlugins?window.marketplaceConfig.activePlugins:[],ne="undefined"!=typeof window&&window.marketplaceConfig?.activeThemeAuthor?window.marketplaceConfig.activeThemeAuthor:"",re="undefined"!=typeof window&&window.marketplaceConfig?.wpVersion?window.marketplaceConfig.wpVersion:"";(0,r.useEffect)(()=>{const e=sessionStorage.getItem("mp_success_notice");if(e)try{const t=JSON.parse(e);A({visible:t.visible,type:t.type,pluginSlug:t.pluginSlug}),P({visible:t.visible,type:t.successType,pluginSlug:t.pluginSlug}),setTimeout(()=>{sessionStorage.removeItem("mp_success_notice")},100)}catch(e){console.error("Error parsing persisted success notice",e)}},[]),(0,r.useEffect)(()=>{!0===Z&&(0,i.lL)();const e=e=>{const t=void 0!==e.detail?.data_consent_status&&e.detail.data_consent_status;X(t),!0===t?("undefined"!=typeof window&&window.marketplaceConfig&&(window.marketplaceConfig.data_consent_status=!0),(0,i.qt)()):("undefined"!=typeof window&&window.marketplaceConfig&&(window.marketplaceConfig.data_consent_status=!1),(0,i.bi)())};window.addEventListener("onConsentStatusChanged",e);const t=t=>{if("onecom_data_consent_status"===t.key){const n="1"===t.newValue;e({detail:{data_consent_status:n}})}};return window.addEventListener("storage",t),()=>{window.removeEventListener("onConsentStatusChanged",e),window.removeEventListener("storage",t)}},[]);const ie=(0,r.useCallback)(async e=>{if(ee&&se(e)){_(t=>({...t,[e]:!0}));try{const t=void 0!==window.marketplaceConfig&&window.marketplaceConfig?.wpConfig?.ajaxUrl;if(!t)return void _(t=>({...t,[e]:!1}));const n=new FormData;n.append("action","get_addon_purchase_status"),n.append("addon_purchase_check","true"),n.append("addon_slug",e);const r=await fetch(t,{method:"POST",body:n}),i=await r.json();y(t=>({...t,[e]:i.is_purchased}))}catch(t){y(t=>({...t,[e]:!1}))}finally{_(t=>({...t,[e]:!1}))}}},[ee]),oe=(0,r.useCallback)(()=>{Q.current&&(clearTimeout(Q.current),Q.current=null),sessionStorage.removeItem("mp_success_notice")},[]),se=(0,r.useCallback)(e=>"wp-rocket"===e||"seo-by-rank-math-pro"===e,[]),ae=(0,r.useCallback)(e=>(0,o.u)(re,e),[re]),ce=(0,r.useCallback)(e=>{V({isOpen:!0,plugin:e})},[]),le=(0,r.useCallback)(()=>{V({isOpen:!1,plugin:null})},[]),ue=(0,r.useCallback)((e,t,n,r)=>{H({isOpen:!0,plugin:e,subscriptionId:t,expiresAt:n,onConfirm:r})},[]),pe=(0,r.useCallback)(()=>{H({isOpen:!1,plugin:null,subscriptionId:null,expiresAt:null,onConfirm:null})},[]),de=(0,r.useCallback)(e=>!(!e||!ee)&&se(e.slug)&&!e.installed&&!0===v[e.slug],[ee,v,se]),he=(0,r.useCallback)(e=>{if(!e.rules)return!0;if(e.rules.mustHavePlugins&&Array.isArray(e.rules.mustHavePlugins)){if(0===e.rules.mustHavePlugins.length)return!0;if(!e.rules.mustHavePlugins.some(e=>te.includes(e)))return!1}if(e.rules.mustHaveThemesByAuthor&&"string"==typeof e.rules.mustHaveThemesByAuthor){const t=e.rules.mustHaveThemesByAuthor;if(ne!==t)return!1}return!0},[te,ne]),fe=(0,r.useCallback)(async()=>{if(!ee)try{const e="undefined"!=typeof window&&window.marketplaceConfig?.wpConfig?.ajaxUrl;if(!e)return void console.error("ajaxUrl is missing");const t=new URLSearchParams({action:(0,a.R5)("get_subscriptions_list"),nonce:window.marketplaceConfig?.wpConfig?.nonce}),n=await fetch(e,{method:"POST",body:t}),r=await n.json();if(!r.success)return void m([]);m(r?.data||[])}catch(e){console.error("Error during fetch subscription list",e),m([])}},[ee]),ge=(0,r.useCallback)(async(e,t,n)=>{try{const e="undefined"!=typeof window&&window.marketplaceConfig?.wpConfig?.ajaxUrl;if(!e)return void console.error("ajaxUrl is missing");const r=new URLSearchParams({action:(0,a.R5)("cancel_subscription"),nonce:window.marketplaceConfig?.wpConfig?.nonce,plugin_slug:t.slug,...n?{subscription_id:n}:{}}),i=await fetch(e,{method:"POST",body:r}),o=await i.json();if(!o.success)return void console.error("Cancel subscription failed:",o?.data?.message||"Unknown error");const s=new URLSearchParams({action:(0,a.R5)("get_subscriptions_list"),nonce:window.marketplaceConfig?.wpConfig?.nonce}),c=await fetch(e,{method:"POST",body:s}),l=await c.json();l.success&&m(l?.data||[])}catch(e){console.error("Error during cancel subscription",e)}},[]),me=(0,r.useCallback)(async(e,r,o="",c="")=>{const p="activate"===e&&"imagify"===r.slug;f(t=>({...t,[r.slug]:e}));let d=!1;const h=r.name||r.slug,g=((e,t,n)=>{let r="";const i=n?.notifications||{};switch(e){case"activate":r=i.activating||"Activating {0}";break;case"deactivate":r=i.deactivating||"Deactivating {0}";break;case"install":r=i.installing||"Installing {0}";break;case"delete":r=i.deleting||"Deleting {0}";break;default:return`${e.charAt(0).toUpperCase()+(e.endsWith("e")?e.slice(1,-1):e.slice(1))+"ing"} ${t}`}return r.replace("{0}",t)+"..."})(e,h,S);if(E(g),N(""),p)(0,s.D)({plugin:r,apiBaseUrl:t,useWPHandlers:n,wpConfig:l,source:o,uiI18n:S,setLoadingAction:E,setLoadingPlugin:N,setPluginInAction:f,setSuccessState:P,setErrorState:M,reloadTimeoutRef:Q,trackButtonClick:i.Mh});else try{let s=`${t}/${e}/${r.slug}`;const p=`download_url=${encodeURIComponent(c||r.download||"")}`;s=n?`${l.ajaxUrl}?action=${(0,a.R5)(`${e}_plugin`)}&_wpnonce=${l.nonce}&nonce=${l.nonce}&slug=${r.slug}&${p}`:s+(s.includes("?")?"&":"?")+p;const h=await fetch(s,{method:"POST"}),f=await h.json();if(f.success){if(k(t=>t.map(t=>t.slug===r.slug?{...t,installed:f.data.installed,activated:f.data.activated}:"deactivate"===e&&"seo-by-rank-math"===r.slug&&"seo-by-rank-math-pro"===t.slug?{...t,activated:!1}:"activate"===e&&"seo-by-rank-math-pro"===r.slug&&"seo-by-rank-math"===t.slug?{...t,activated:!0}:t)),"install"===e&&f.data.installed)return(0,i.Mh)({buttonName:"Install",buttonAction:"product_install",plugin:r,context:{action:e,result:"success"}}),"buy_now"===o?(A({visible:!0,type:"installed",pluginSlug:r.slug}),P({visible:!0,type:"install",pluginSlug:r.slug}),!0):(d=!0,void("product_detail"===o?(sessionStorage.setItem("mp_skip_page_view","true"),sessionStorage.setItem("mp_success_notice",JSON.stringify({visible:!0,type:"installed",pluginSlug:r.slug,successType:"install"})),Q.current=setTimeout(()=>{window.location.reload()},500)):(A({visible:!0,type:"installed",pluginSlug:r.slug}),P({visible:!0,type:"install",pluginSlug:r.slug}),Q.current=setTimeout(()=>{sessionStorage.setItem("mp_skip_page_view","true"),window.location.reload()},3e3),E(""),N(""))));if("delete"!==e||f.data.installed){if("activate"===e&&f.data.activated)return d=!0,(0,i.Mh)({buttonName:"Activate",buttonAction:"product_activate",plugin:r,context:{action:e,result:"success"}}),void("product_detail"===o?(sessionStorage.setItem("mp_skip_page_view","true"),sessionStorage.setItem("mp_success_notice",JSON.stringify({visible:!0,type:"activated",pluginSlug:r.slug,successType:"activate"})),Q.current=setTimeout(()=>{window.location.reload()},500)):(P({visible:!0,type:"activate",pluginSlug:r.slug}),Q.current=setTimeout(()=>{sessionStorage.setItem("mp_skip_page_view","true"),window.location.reload()},3e3),E(""),N("")));if("deactivate"===e&&!f.data.activated)return d=!0,P({visible:!0,type:"deactivate",pluginSlug:r.slug}),(0,i.Mh)({buttonName:"Deactivate",buttonAction:"product_deactivate",plugin:r,context:{action:e,result:"success"}}),Q.current=setTimeout(()=>{sessionStorage.setItem("mp_skip_page_view","true"),window.location.reload()},3e3),E(""),void N("")}else A({visible:!0,type:"deleted",pluginSlug:r.slug}),P({visible:!0,type:"delete",pluginSlug:r.slug}),(0,i.Mh)({buttonName:"Delete",buttonAction:"product_delete",plugin:r,context:{action:e,result:"success"}})}else"activate"===e?(M({visible:!0,type:"activate",pluginSlug:r.slug,message:u(f,S)}),(0,i.Mh)({buttonName:"Activate",buttonAction:"product_activate",plugin:r,context:{action:e,result:"error",error_message:f.data?.message||S?.notifications?.pluginActivationFailed||"Activation failed"}})):"deactivate"===e?(M({visible:!0,type:"deactivate",pluginSlug:r.slug,message:u(f,S)}),(0,i.Mh)({buttonName:"Deactivate",buttonAction:"product_deactivate",plugin:r,context:{action:e,result:"error",error_message:f.data?.message||S?.notifications?.pluginDeactivationFailed||"Deactivation failed"}})):"install"===e?(M({visible:!0,type:"install",pluginSlug:r.slug,message:u(f,S)}),(0,i.Mh)({buttonName:"Install",buttonAction:"product_install",plugin:r,context:{action:e,result:"error",error_message:f.data?.message||"Installation failed"}})):"delete"===e?(M({visible:!0,type:"delete",pluginSlug:r.slug,message:u(f,S)}),(0,i.Mh)({buttonName:"Delete",buttonAction:"product_delete",plugin:r,context:{action:e,result:"error",error_message:f.data?.message||S?.notifications?.pluginDeletionFailed||"Deletion failed"}})):alert(f.data?.message||S?.notifications?.actionFailed||"Failed to perform action")}catch(t){console.error("Plugin action failed",t),"activate"!==e&&"install"!==e&&"delete"!==e||(0,i.Mh)({buttonName:"activate"===e?"Activate":"install"===e?"Install":"Delete",buttonAction:"activate"===e?"product_activate":"install"===e?"product_install":"product_delete",plugin:r,context:{action:e,result:"error",error_message:t.message||"Network error"}})}finally{d||f(e=>({...e,[r.slug]:!1})),E(""),N("")}},[t,n,l,S]),ve={apiBaseUrl:t,useWPHandlers:n,wpConfig:l,enableDefaultStyles:p,assetsBaseUrl:d,pluginInAction:h,setPluginInAction:f,subscriptionsList:g,setSubscriptionsList:m,subscriptionStatus:v,isCheckingSubscription:b,fetchPartnerSubscriptions:fe,fetchSubscriptionStatus:ie,isOnecomBrand:ee,plugins:w,setPlugins:k,uiI18n:S,setUiI18n:x,handlePluginAction:me,handleCancelSubsAction:ge,cancelReload:oe,loadingAction:C,setLoadingAction:E,loadingPlugin:I,setLoadingPlugin:N,noticeState:O,setNoticeState:A,errorState:R,setErrorState:M,successState:T,setSuccessState:P,allPluginsActivated:L,setAllPluginsActivated:D,catalogError:F,setCatalogError:U,catalogLoading:j,setCatalogLoading:B,maintenanceState:$,setMaintenanceState:z,currentPluginSlug:J,setCurrentPluginSlug:Y,deleteModalState:q,openDeleteModal:ce,closeDeleteModal:le,cancelSubsModalState:W,openCancelSubsModal:ue,closeCancelSubsModal:pe,shouldShowProvision:de,isSpecialPlugin:se,shouldShowPlugin:he,isWpVersionSupported:ae,wpVersion:re,activePlugins:te,activeThemeAuthor:ne,pendingProcurements:G,setPendingProcurements:K};return(0,r.createElement)(c.Provider,{value:ve},e)},d=()=>{const e=(0,r.useContext)(c);if(!e)throw new Error("useMarketplace must be used within MarketplaceProvider");return e}},8291:(e,t,n)=>{"use strict";n.d(t,{Bd:()=>r.B,r9:()=>i.r}),n(7829),n(4814);var r=n(8437),i=(n(2648),n(2176),n(3273),n(3227),n(7674),n(1831));n(7565),n(1352)},8299:(e,t,n)=>{"use strict";function r(e){if(!e)return"";const t=e instanceof Date?e:new Date(e);if(isNaN(t.getTime()))return"";const n="undefined"!=typeof window&&window.marketplaceConfig||{},r=n.dateFormat||"F j, Y",i=(n.locale||"").replace("_","-")||void 0,o=(e,n)=>{try{return new Intl.DateTimeFormat(i,{[n]:e}).format(t)}catch{return""}},s=t.getFullYear(),a=t.getMonth()+1,c=t.getDate(),l={Y:String(s),y:String(s).slice(-2),F:()=>o("long","month"),M:()=>o("short","month"),m:String(a).padStart(2,"0"),n:String(a),d:String(c).padStart(2,"0"),j:String(c),l:()=>o("long","weekday"),D:()=>o("short","weekday")};let u="";for(let e=0;er})},8300:e=>{"use strict";e.exports=JSON.parse('{"ui.button.refreshPage":"Uppdatera sidan","ui.notifications.couldNotLoad":"Det gick inte att ladda sidan","ui.notifications.refreshPage":"Uppdatera sidan och kontakta vår support om problemet kvarstår."}')},8437:(e,t,n)=>{"use strict";n.d(t,{B:()=>a});var r=n(1609),i=n(1352),o=n(9454);const s=(e,t,n,r)=>e.getFixedT(t,n,r),a=(e,t={})=>{const{i18n:n}=t,{i18n:a,defaultNS:c}=(0,r.useContext)(i.gJ)||{},l=n||a||(0,i.TO)();if(l&&!l.reportNamespaces&&(l.reportNamespaces=new i.hz),!l){(0,o.mc)(l,"NO_I18NEXT_INSTANCE","useTranslation: You will need to pass in an i18next instance by using initReactI18next");const e=(e,t)=>(0,o.Kg)(t)?t:(0,o.Gv)(t)&&(0,o.Kg)(t.defaultValue)?t.defaultValue:Array.isArray(e)?e[e.length-1]:e,t=[e,{},!1];return t.t=e,t.i18n={},t.ready=!1,t}l.options.react?.wait&&(0,o.mc)(l,"DEPRECATED_OPTION","useTranslation: It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");const u={...(0,i.rV)(),...l.options.react,...t},{useSuspense:p,keyPrefix:d}=u;let h=e||c||l.options?.defaultNS;h=(0,o.Kg)(h)?[h]:h||["translation"],l.reportNamespaces.addUsedNamespaces?.(h);const f=(l.isInitialized||l.initializedStoreOnce)&&h.every(e=>(0,o.NM)(e,l,u)),g=((e,t,n,i)=>(0,r.useCallback)(s(e,t,n,i),[e,t,n,i]))(l,t.lng||null,"fallback"===u.nsMode?h:h[0],d),m=()=>g,v=()=>s(l,t.lng||null,"fallback"===u.nsMode?h:h[0],d),[y,b]=(0,r.useState)(m);let _=h.join();t.lng&&(_=`${t.lng}${_}`);const w=((e,t)=>{const n=(0,r.useRef)();return(0,r.useEffect)(()=>{n.current=e},[e,t]),n.current})(_),k=(0,r.useRef)(!0);(0,r.useEffect)(()=>{const{bindI18n:e,bindI18nStore:n}=u;k.current=!0,f||p||(t.lng?(0,o.GA)(l,t.lng,h,()=>{k.current&&b(v)}):(0,o.dM)(l,h,()=>{k.current&&b(v)})),f&&w&&w!==_&&k.current&&b(v);const r=()=>{k.current&&b(v)};return e&&l?.on(e,r),n&&l?.store.on(n,r),()=>{k.current=!1,l&&e&&e?.split(" ").forEach(e=>l.off(e,r)),n&&l&&n.split(" ").forEach(e=>l.store.off(e,r))}},[l,_]),(0,r.useEffect)(()=>{k.current&&f&&b(m)},[l,d,f]);const S=[y,l,f];if(S.t=y,S.i18n=l,S.ready=f,f)return S;if(!f&&!p)return S;throw new Promise(e=>{t.lng?(0,o.GA)(l,t.lng,h,()=>e()):(0,o.dM)(l,h,()=>e())})}},8484:(e,t,n)=>{"use strict";let r;n.d(t,{T:()=>o,V:()=>i});const i=e=>{r=e},o=()=>r},8491:e=>{"use strict";e.exports=JSON.parse('{"ui.button.refreshPage":"Genindlæs side","ui.notifications.couldNotLoad":"Kunne ikke indlæse siden","ui.notifications.refreshPage":"Opdater venligst siden og kontakt vores support, hvis problemet fortsætter."}')},9454:(e,t,n)=>{"use strict";n.d(t,{GA:()=>a,Gv:()=>u,Kg:()=>l,NM:()=>c,dM:()=>s,mc:()=>i});const r={},i=(e,t,n,i)=>{l(n)&&r[n]||(l(n)&&(r[n]=new Date),((e,t,n,r)=>{const i=[n,{code:t,...r||{}}];if(e?.services?.logger?.forward)return e.services.logger.forward(i,"warn","react-i18next::",!0);l(i[0])&&(i[0]=`react-i18next:: ${i[0]}`),e?.services?.logger?.warn?e.services.logger.warn(...i):console?.warn&&console.warn(...i)})(e,t,n,i))},o=(e,t)=>()=>{if(e.isInitialized)t();else{const n=()=>{setTimeout(()=>{e.off("initialized",n)},0),t()};e.on("initialized",n)}},s=(e,t,n)=>{e.loadNamespaces(t,o(e,n))},a=(e,t,n,r)=>{if(l(n)&&(n=[n]),e.options.preload&&e.options.preload.indexOf(t)>-1)return s(e,n,r);n.forEach(t=>{e.options.ns.indexOf(t)<0&&e.options.ns.push(t)}),e.loadLanguages(t,o(e,r))},c=(e,t,n={})=>t.languages&&t.languages.length?t.hasLoadedNamespace(e,{lng:n.lng,precheck:(t,r)=>{if(n.bindI18n&&n.bindI18n.indexOf("languageChanging")>-1&&t.services.backendConnector.backend&&t.isLanguageChangingTo&&!r(t.isLanguageChangingTo,e))return!1}}):(i(t,"NO_LANGUAGES","i18n.languages were undefined or empty",{languages:t.languages}),!0),l=e=>"string"==typeof e,u=e=>"object"==typeof e&&null!==e},9599:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var r=n(1609),i=n(3526),o=n(5924),s=n(5696);const a=({children:e,className:t=""})=>(0,r.createElement)(r.Fragment,null,(0,r.createElement)(i.A,null),(0,r.createElement)("div",{className:"gv-activated"},(0,r.createElement)(o.A,null),(0,r.createElement)(s.A,null)),(0,r.createElement)("div",{className:"gv-activated"},(0,r.createElement)("div",{className:`marketplace-container gv-layout-product gv-w-max-container gv-mx-auto gv-p-fluid ${t}`},e)))},9962:(e,t,n)=>{"use strict";n.d(t,{A:()=>d});var r=n(1609),i=n(5795),o=n(1338),s=n(4469),a=n(4677),c=n(4694),l=n(6409),u=n(7979),p=n(488);function d({plugin:e,onClose:t,usePortal:n=!0,loading:d=!1}){const{assetsBaseUrl:h,useWPHandlers:f,pluginInAction:g,plugins:m,uiI18n:v,noticeState:y,setNoticeState:b,setErrorState:_}=(0,u.D)(),w=m.find(e=>"seo-by-rank-math"===e.slug)||null,k=m.find(e=>"seo-by-rank-math-pro"===e.slug)||null,S=h||void 0!==window.marketplaceConfig&&window.marketplaceConfig?.assetsBaseUrl||"",x=S?`${S}assets/icons/`:"",C="undefined"!=typeof window&&window.marketplaceConfig?.brand||"",E=C?` brand-${C.replace(/[^a-zA-Z0-9_-]/g,"")}`:"";if(d){const e=(0,r.createElement)("div",{className:`gv-surface-dim${E}`},(0,r.createElement)("article",{className:"gv-w-max-container gv-mx-auto"},(0,r.createElement)("nav",{className:"gv-breadcrumbs gv-area-nav gv-mb-lg"},(0,r.createElement)("a",{href:"#",onClick:e=>{if(e.preventDefault(),"undefined"!=typeof window&&window.history&&window.history.length>1)try{window.history.back()}catch(e){t&&t()}else t&&t()}},(0,r.createElement)("gv-icon",{"aria-hidden":"true",src:`${x}arrow_back.svg`}),(0,r.createElement)("span",null,v.backButton))),(0,r.createElement)("header",{className:"gv-area-header"},(0,r.createElement)("div",{className:"gv-image"},(0,r.createElement)("div",{className:"gv-card-image gv-h-full"},(0,r.createElement)("div",{className:"gv-skeleton gv-radius-0 gv-h-full",style:{minHeight:"300px"}})))),(0,r.createElement)("header",{className:"gv-area-header gv-mt-fluid gv-mb-fluid"},(0,r.createElement)("div",{className:"gv-image"},(0,r.createElement)("div",{className:"gv-card-image gv-h-full"},(0,r.createElement)("div",{className:"gv-skeleton gv-radius-0 gv-h-full",style:{minHeight:"300px"}})))),(0,r.createElement)("div",{className:"gv-area-details gv-grid gv-gap-fluid gv-mb-fluid"},(0,r.createElement)("section",{className:"gv-stack-space-md"},(0,r.createElement)("div",{className:"gv-skeleton gv-heading-md gv-mb-md",style:{width:"160px"}}),(0,r.createElement)("ul",{className:""},[...Array(3)].map((e,t)=>(0,r.createElement)("li",{key:t},(0,r.createElement)("div",{className:"gv-skeleton gv-text-sm"})))))),(0,r.createElement)("div",{className:"gv-area-content gv-grid gv-gap-fluid"},(0,r.createElement)("section",{className:"gv-text-sm gv-stack-space-md"},(0,r.createElement)("div",{className:"gv-skeleton gv-heading-md",style:{width:"160px",marginBottom:"28px"}}),(0,r.createElement)("div",{className:"gv-grid gv-gap-lg gv-tab-grid-cols-2 gv-desk-lg-grid-cols-3"},[...Array(3)].map((e,t)=>(0,r.createElement)("div",{className:"gv-item gv-stack-space-sm",key:t},(0,r.createElement)("div",{className:"gv-skeleton gv-heading-md gv-mb-sm",style:{width:"160px"}}),(0,r.createElement)("div",{className:"gv-skeleton gv-text-sm gv-mb-xs"}),(0,r.createElement)("div",{className:"gv-skeleton gv-text-sm"}))))))));return n?(0,i.createPortal)(e,document.body):e}if(!e)return null;const I=(0,r.useRef)(null),N=(0,r.useRef)(null),O=(0,r.useRef)(null),A=(0,r.useRef)(null),R=(0,r.useRef)(null),[M,T]=((0,r.useRef)([]),(0,r.useState)(0));(0,r.useEffect)(()=>{window.scrollTo(0,0)},[e]),(0,r.useEffect)(()=>{b(e=>!e.visible||e.pluginSlug!==w?.slug&&e.pluginSlug!==k?.slug?{visible:!1,type:null,pluginSlug:null}:e),_(e=>!e.visible||e.pluginSlug!==w?.slug&&e.pluginSlug!==k?.slug?{visible:!1,type:null,pluginSlug:null}:e)},[w?.slug,k?.slug,b,_]),(0,r.useEffect)(()=>{const e=()=>{b({visible:!1,type:null,pluginSlug:null}),_({visible:!1,type:null,pluginSlug:null})};return window.addEventListener("popstate",e),()=>window.removeEventListener("popstate",e)},[b,_]),(0,r.useEffect)(()=>{const e=I.current,t=N.current,n=O.current,r=A.current,i=R.current;if(!(e&&t&&n&&r&&i))return;const o=t.querySelector(".gv-previous"),s=t.querySelector(".gv-next");let a=!1,c="top",l=!1,u=!1,p=!1,d=null,h=!1;const f=()=>{const t=e.scrollLeft,n=e.offsetWidth,r=Math.round(t/n);T(r),o&&(0===r?o.classList.add("gv-disabled"):o.classList.remove("gv-disabled")),s&&(r>=Math.round(e.scrollWidth/n)-1?s.classList.add("gv-disabled"):s.classList.remove("gv-disabled"))},g=()=>{const e=parseFloat(getComputedStyle(n).paddingTop)||0,i=r.offsetHeight/2,o=i+e,s=window.innerHeight/2-o,a=2*i;return t.style.transform=`translateY(${o}px)`,t.style.top=`${s}px`,t.style.bottom=`${a}px`,{bottomValue:a,halfHeaderHeight:i}},m=e=>{const r=n.getBoundingClientRect(),i=window.innerHeight-e,o=r.bottom<=i;o!==a&&(a=o,a?t.classList.add("gv-state-bottom"):t.classList.remove("gv-state-bottom"))},v=()=>{if(p)return;let e;e=l?l&&!u?"overlay":"bottom":"top",e!==c&&(p=!0,c=e,"top"===c?(i.classList.add("gv-state-top"),i.classList.remove("gv-state-overlay")):"overlay"===c?(i.classList.remove("gv-state-top"),i.classList.add("gv-state-overlay")):(i.classList.remove("gv-state-top"),i.classList.remove("gv-state-overlay")),requestAnimationFrame(()=>{setTimeout(()=>{p=!1},50)}))},{bottomValue:y}=g();e.addEventListener("scroll",f);const b=new IntersectionObserver(e=>{e.forEach(e=>{!e.isIntersecting&&e.boundingClientRect.top<0?l=!0:(e.isIntersecting||e.boundingClientRect.top>=0)&&(l=!1),v()})},{threshold:[0,1],rootMargin:"0px"}),_=document.createElement("div");_.style.position="absolute",_.style.bottom="0",_.style.left="0",_.style.width="1px",_.style.height="1px",_.style.pointerEvents="none",n.style.position="relative",n.appendChild(_);const w=new IntersectionObserver(e=>{e.forEach(e=>{u=e.isIntersecting,v()})},{threshold:[0],rootMargin:"-100px 0px 0px 0px"});b.observe(i),w.observe(_);const k=()=>{h||(h=!0,requestAnimationFrame(()=>{m(y)}),d=setTimeout(()=>{h=!1},100))},S=()=>{const{bottomValue:e}=g();m(e)};return window.addEventListener("scroll",k),window.addEventListener("resize",S),f(),m(y),v(),()=>{d&&clearTimeout(d),e.removeEventListener("scroll",f),window.removeEventListener("scroll",k),window.removeEventListener("resize",S),b.disconnect(),w.disconnect(),_&&_.parentNode&&_.parentNode.removeChild(_)}},[]),void 0!==window.onecomWpVars&&window.onecomWpVars,e.thumbnail;const P=k.detailsBannerUrl||k.bannerUrl,L=w?.name||e.name||"Product",D=w?.i18n?.description||w?.i18n?.subtitle,F=w?.i18n?.subtitle,U=k?.name||"Rank Math Pro",j=k?.i18n?.subtitle||k?.i18n?.description,B=k?(0,p.M)(k,v?.labels?.free||"Free",v):"",$=B===(v?.labels?.freeUntilRenewal||"Free until renewal"),z=(0,p.Tc)(k),q=(e,t)=>{if(!e||"object"!=typeof e)return[];const n=[];let r=1;for(;e[`${t}${r}`];){const i=e[`${t}${r}`];i&&""!==i.trim()&&n.push(i),r++}return n},V=w?.i18n||e.i18n,W=q(V,"keyBenefitContent"),H=q(w?.i18n,"keyFeatureContent"),G=q(k?.i18n,"keyFeatureContent"),K=Math.max(H.length,G.length),J=[];if(V&&"object"==typeof V){let e=1;for(;V[`coreFeatureTitle${e}`]||V[`coreFeatureContent${e}`];){const t=V[`coreFeatureTitle${e}`],n=V[`coreFeatureContent${e}`];t&&""!==t.trim()&&n&&""!==n.trim()&&J.push({name:t,desc:n}),e++}}const Y=W,Z=J,X=(0,r.createElement)("div",{className:`gv-surface-dim${E}`},(0,r.createElement)("article",{className:"gv-layout-product gv-w-max-container gv-mx-auto gv-p-fluid gv-p-0"},(0,r.createElement)(c.A,{iconBase:x,label:v.backButton,onClose:t,disabled:g[e.slug]},(0,r.createElement)(s.A,{plugin:y?.pluginSlug===k?.slug?k:w}),(0,r.createElement)(a.A,{plugin:w}),(0,r.createElement)(a.A,{plugin:k}),(0,r.createElement)(l.A,{plugin:e})),(0,r.createElement)("header",{className:"gv-product-header gv-area-header"},(0,r.createElement)("div",{className:"gv-content gv-stack-space-md gv-text-sm"},(0,r.createElement)("h3",{className:"gv-title gv-header-lg"},"Rank Math"),(0,r.createElement)("p",{className:"gv-text-sm"},D)),(0,r.createElement)("div",{className:"gv-image"},(0,r.createElement)("picture",null,(0,r.createElement)("source",{media:"(min-width: 600px)",srcSet:`${P} 2x, ${P} 1x`}),(0,r.createElement)("img",{src:P,srcSet:`${P} 2x, ${P} 1x`,alt:"Product image"})))),(0,r.createElement)("section",{className:"gv-product-table gv-features-table gv-products-2 gv-recommended-2 gv-area-table"},(0,r.createElement)("div",{className:"gv-dots-scroll-area"},(0,r.createElement)("div",{className:"gv-table-container"},(0,r.createElement)("div",{className:"gv-slider-nav",ref:N},(0,r.createElement)("button",{type:"button",className:"gv-nav-button gv-previous gv-disabled",onClick:()=>{const e=I.current;if(!e)return;const t=e.offsetWidth;e.scrollTo({left:e.scrollLeft-t,behavior:"smooth"})}},(0,r.createElement)("gv-icon",{"aria-hidden":"true",src:`${x}chevron_left.svg`})),(0,r.createElement)("button",{type:"button",className:"gv-nav-button gv-next",onClick:()=>{const e=I.current;if(!e)return;const t=e.offsetWidth;e.scrollTo({left:e.scrollLeft+t,behavior:"smooth"})}},(0,r.createElement)("gv-icon",{"aria-hidden":"true",src:`${x}chevron_right.svg`}))),(0,r.createElement)("div",{className:"gv-table-slider",ref:I},(0,r.createElement)("div",{className:"gv-table",role:"table",ref:O},(0,r.createElement)("div",{className:"gv-table-header",role:"rowgroup",ref:A},(0,r.createElement)("div",{className:"gv-table-row",role:"row"},(0,r.createElement)("div",{className:"gv-product gv-p-0",role:"columnheader"},(0,r.createElement)("div",{className:"gv-content"},(0,r.createElement)("h3",{className:"gv-title"},`${L} free`),(0,r.createElement)("p",null,F)),(0,r.createElement)("div",{className:"gv-bottom"},(0,r.createElement)("div",{className:"gv-price-container"},(0,r.createElement)("div",{className:"gv-price"},(0,r.createElement)("span",{className:"gv-price-text"},v?.labels?.free||"Free"))),f&&w?(0,r.createElement)(o.A,{plugin:w}):w?.download&&(0,r.createElement)("button",{type:"button",className:"gv-button gv-button-secondary"},v?.installButton||w?.i18n?.installButton||"Install"))),(0,r.createElement)("div",{className:"gv-product gv-p-0",role:"columnheader"},(0,r.createElement)("div",{className:"gv-recommended-label"},v?.labels?.recommended||"Recommended"),(0,r.createElement)("div",{className:"gv-content"},(0,r.createElement)("h3",{className:"gv-title"},U),(0,r.createElement)("p",null,j.substring(0,120),j.length>120?"…":"")),(0,r.createElement)("div",{className:"gv-bottom"},(0,r.createElement)("div",{className:"gv-price-container"},(0,r.createElement)("div",{className:"gv-price"},(0,r.createElement)("span",{className:"gv-price-text"},B,B&&!$&&",-"),B&&!$&&(0,r.createElement)("span",{className:"gv-period"},"/",v?.labels?.timeMonth)),B&&(0,r.createElement)("div",{className:"gv-price-info"},(0,r.createElement)("div",{className:"gv-info"},v.labels.afterThat," [",z,"]/",v?.labels?.timeMonth))),f&&k?(0,r.createElement)(o.A,{plugin:k}):(0,r.createElement)("button",{type:"button",className:"gv-button gv-button-primary"},v?.selectButton||"Select"))))),K>0&&(0,r.createElement)("div",{className:"gv-section",role:"rowgroup"},(0,r.createElement)("div",{className:"gv-section-header gv-table-row",role:"row"},(0,r.createElement)("div",{className:"gv-cell",role:"cell"},(0,r.createElement)("h4",{className:"gv-title"},v?.keyFeatureHeading||w?.i18n?.keyFeatureHeading||"Key features")),(0,r.createElement)("div",{className:"gv-cell",role:"cell"},(0,r.createElement)("h4",{className:"gv-title"},v?.keyFeatureHeading||k?.i18n?.keyFeatureHeading||"Key features"))),Array.from({length:K}).map((e,t)=>(0,r.createElement)("div",{className:"gv-table-row",role:"row",key:t},(0,r.createElement)("div",{className:"gv-cell",role:"cell"},(0,r.createElement)("span",{className:"gv-cell-text"},H[t]||"")),(0,r.createElement)("div",{className:"gv-cell",role:"cell"},(0,r.createElement)("span",{className:"gv-cell-text"},G[t]||"")))))))),(0,r.createElement)("div",{className:"gv-slider-pagination gv-state-top",ref:R},(0,r.createElement)("div",{className:"gv-dots",role:"tablist"},[0,1].map(e=>(0,r.createElement)("span",{key:e,className:"gv-dot "+(M===e?"gv-active":""),role:"tab","aria-selected":M===e?"true":"false","aria-label":`Go to slide ${e+1}`,onClick:()=>(e=>{const t=I.current;if(!t)return;const n=t.offsetWidth;t.scrollTo({left:n*e,behavior:"smooth"})})(e),style:{cursor:"pointer"}})))))),(0,r.createElement)("div",{className:"gv-area-details gv-grid gv-gap-fluid"},Y.length>0&&(0,r.createElement)("section",{className:"gv-stack-space-md"},(0,r.createElement)("h2",{className:"gv-title gv-text-bold gv-text-lg"},v?.benefitHeading||e.i18n?.benefitHeading||"Key benefits"),(0,r.createElement)("ul",{className:"gv-list-items gv-list-check gv-mode-condensed"},Y.map((e,t)=>(0,r.createElement)("li",{key:t},e))))),Z.length>0&&(0,r.createElement)("div",{className:"gv-area-content gv-grid gv-gap-fluid"},(0,r.createElement)("section",{className:"gv-text-sm gv-stack-space-md"},(0,r.createElement)("h2",{className:"gv-title gv-text-bold gv-text-lg"},v?.featureOverviewHeading||e.i18n?.featureOverviewHeading||"Core features overview"),(0,r.createElement)("div",{className:"gv-grid gv-gap-lg gv-tab-grid-cols-2 gv-desk-lg-grid-cols-3"},Z.map((e,t)=>(0,r.createElement)("div",{className:"gv-item gv-stack-space-sm",key:t},(0,r.createElement)("h3",{className:"gv-title gv-text-bold gv-text-lg"},e.name),(0,r.createElement)("p",{className:"gv-text-sm"},e.desc))))))));return n?(0,i.createPortal)(X,document.body):X}}},t={};function n(r){var i=t[r];if(void 0!==i)return i.exports;var o=t[r]={exports:{}};return e[r](o,o.exports,n),o.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var r={};(()=>{"use strict";n.r(r);var e=n(1609),t=n(5795),i=n.n(t),o=n(6255),s=(n(5036),n(108));document.addEventListener("DOMContentLoaded",()=>{const t=document.getElementById("marketplace-addons-root");if(t){const r=window.marketplaceConfig||{};r.locale&&Promise.resolve().then(n.bind(n,2635)).then(({default:e})=>{e.changeLanguage(r.locale)});const a=(0,s.u)(r.wpVersion,"6.2");"function"==typeof i().createRoot&&a?i().createRoot(t).render((0,e.createElement)(o.A,{...r})):i().render((0,e.createElement)(o.A,{...r}),t)}})})(),window.MarketPlaceWP=r})(); \ No newline at end of file +(()=>{var e={108:(e,t,n)=>{"use strict";n.d(t,{u:()=>r});const r=(e,t)=>{if(!e)return!0;const n=String(e).split("."),r=String(t).split(".");for(let e=0;ei)return!0;if(t{"use strict";e.exports=JSON.parse('{"ui.button.refreshPage":"Oppdater side","ui.notifications.couldNotLoad":"Kunne ikke laste inn siden","ui.notifications.refreshPage":"Oppdater siden og kontakt vår support hvis problemet vedvarer."}')},488:(e,t,n)=>{"use strict";n.d(t,{Dn:()=>c,M:()=>u,Tc:()=>a,uA:()=>l});const r={EUR:"€",USD:"$",GBP:"£",DKK:"kr",NOK:"kr",SEK:"kr"},i=["DKK","SEK","NOK"],o=e=>r[e]||e,s=(e,t,n)=>i.includes(n)?`${e} ${t}`:`${t} ${e}`,a=(e,t=!1)=>{if(e.prices&&Array.isArray(e.prices)&&e.prices.length>0){const n=e.prices.find(e=>"full"===e.priceType);if(n&&n.amount&&n.currency){const e=o(n.currency),r=Number(n.amount).toFixed(2),i=t&&"undefined"!=typeof window&&"rankmath"===window.marketplaceConfig?.brand;return s(i?`${r}`:r,e,n.currency)}}return null},c=(e,t=!1)=>{if(e.prices&&Array.isArray(e.prices)&&e.prices.length>0){const n=e.prices.find(e=>"rebate"===e.priceType);if(n&&void 0!==n.amount&&null!==n.amount&&n.currency){const e=o(n.currency),r=Number(n.amount).toFixed(2),i=t&&"undefined"!=typeof window&&"rankmath"===window.marketplaceConfig?.brand;return s(i?`${r}`:r,e,n.currency)}}return null},l=e=>{if(e.prices&&Array.isArray(e.prices)){const t=e.prices.find(e=>"full"===e.priceType),n=e.prices.find(e=>"rebate"===e.priceType);if(t&&n&&Number(t.amount)>0&&Number(n.amount)>0)return Math.round(100*(1-Number(n.amount)/Number(t.amount)))}return null},u=(e,t="Free",n=null,r=!1)=>{if("free"===e.licenseType)return t;if(e.prices&&Array.isArray(e.prices)&&e.prices.length>0){const t=e.prices.find(e=>"rebate"===e.priceType);if(t&&"premium"===e.licenseType){if(0===t.amount)return n?.labels?.freeUntilRenewal||"Free until renewal";if(t.amount&&t.currency){const e=o(t.currency),n=Number(t.amount).toFixed(2),i=r&&"undefined"!=typeof window&&"rankmath"===window.marketplaceConfig?.brand;return`${s(i?`${n}`:n,e,t.currency)} `}}let i=e.prices.find(e=>"full"===e.priceType&&(!0===e.isActive||void 0===e.isActive));if(i||(i=e.prices.find(e=>!0===e.isActive)),i||(i=e.prices[0]),i&&i.amount&&i.currency){const e=o(i.currency),t=Number(i.amount).toFixed(2),n=r&&"undefined"!=typeof window&&"rankmath"===window.marketplaceConfig?.brand;return s(n?`${t}`:t,e,i.currency)}}if(e.priceCurrency&&e.priceAmount){const t=o(e.priceCurrency),n=Number(e.priceAmount).toFixed(2);return s(n,t,e.priceCurrency)}return""}},1174:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=n(1609),i=n(7979);function o(){const{uiI18n:e}=(0,i.D)(),t=e?.notifications?.updateWPText?.replace("{0}","6.2");return(0,r.createElement)("div",{className:"marketplace-container gv-flex gv-flex-col gv-flex-wrap gv-gap-lg gv-items-center gv-justify-center gv-p-fluid"},(0,r.createElement)("div",{className:"gv-text-center"},(0,r.createElement)("h5",{className:"gv-header-md gv-mb-sm"},e?.notifications?.updateWPTitle),(0,r.createElement)("p",{className:"gv-text-md gv-mb-lg"},t),(0,r.createElement)("button",{type:"button",className:"gv-button gv-button-primary buttons-min-width",onClick:()=>{window.location.href="undefined"!=typeof window&&window.marketplaceConfig?.wpConfig?.adminUrl?`${window.marketplaceConfig.wpConfig.adminUrl}update-core.php`:"/wp-admin/update-core.php"}},(0,r.createElement)("span",null,e?.updateWPButton))))}},1199:e=>{"use strict";e.exports=JSON.parse('{"ui.button.refreshPage":"Pagina verversen","ui.notifications.couldNotLoad":"Kon de pagina niet laden","ui.notifications.refreshPage":"Ververs de pagina en neem contact op met onze (Engelstalige) support als het probleem zich blijft voordoen."}')},1338:(e,t,n)=>{"use strict";n.d(t,{A:()=>d});var r=n(1609),i=n(7979),o=n(7008),s=n(3220),a=n(6818),c=n(3331),l=n(5404);const u=e=>{if(e.prices&&Array.isArray(e.prices)&&e.prices.length>0){let t=e.prices.find(e=>"full"===e.priceType&&(!0===e.isActive||void 0===e.isActive));return t||(t=e.prices.find(e=>!0===e.isActive)),t||(t=e.prices[0]),{amount:t.amount,currency:t.currency,period:t.period||"month"}}return{amount:e.priceAmount,currency:e.priceCurrency,period:"month"}},p=["active"];function d({plugin:e}){const{assetsBaseUrl:t,pluginInAction:n,subscriptionStatus:d,isCheckingSubscription:h,isOnecomBrand:f,handlePluginAction:g,uiI18n:m,isSpecialPlugin:v,setErrorState:y,wpConfig:b,pendingProcurements:_,setPendingProcurements:w,setLoadingAction:k,setLoadingPlugin:S,subscriptionsList:x,fetchPartnerSubscriptions:C}=(0,i.D)(),[E,I]=(0,r.useState)(!1),[N,O]=(0,r.useState)(null),[A,R]=(0,r.useState)(!1),M=(0,r.useRef)(null),T=d[e.slug],P=h[e.slug],L=t||void 0!==window.marketplaceConfig&&window.marketplaceConfig?.assetsBaseUrl||"",D=L?`${L}assets/`:"",F=!f&&"premium"===e.licenseType,U=F&&e.productId&&x?.length?x.find(t=>t.productId===e.productId&&("active"===t.status||"canceled"===t.status||"pending_cancellation"===t.status)&&t.accessDetails?.downloadUrl):null,j=!(f||"premium"!==e.licenseType||e.installed||U||N),B=(e,t)=>e?e.replace("{0}",t||""):"",$=e?.name||"",z=e=>{const t=b?.ajaxUrl;t&&fetch(t,{method:"POST",body:new URLSearchParams({action:(0,c.R5)("track_status"),nonce:b.nonce,resourceType:"acknowledge-plugin-download",subscriptionId:e||""})})},q=()=>{const e=b?.ajaxUrl;e&&fetch(e,{method:"POST",body:new URLSearchParams({action:(0,c.R5)("clear_subscription_list"),nonce:b.nonce})})},V=(t,n)=>{M.current&&M.current();const r=b?.ajaxUrl;r&&n&&(M.current=(0,a.g)({ajaxUrl:r,nonce:b.nonce,action:(0,c.R5)("track_status"),params:{subscriptionId:n},interval:1e4,onResult:async i=>{if(!i.success)return!1;const s=i?.data?.data,a=s?.status;if(!s||!a)return y({visible:!0,type:"buy_now",pluginSlug:t,message:i?.error||i?.data?.message||i?.data?.error||null}),fetch(r,{method:"POST",body:new URLSearchParams({action:(0,c.R5)("clear_pending_procurement"),nonce:b.nonce,slug:t})}),w(e=>{const n={...e};return delete n[t],n}),!0;if(p.includes(a)){const i=s?.license,a=i?.accessDetails?.downloadUrl;if(O({provisionedAt:i?.provisionedAt||null,expiresAt:i?.expiresAt||null,status:"active"}),fetch(r,{method:"POST",body:new URLSearchParams({action:(0,c.R5)("clear_pending_procurement"),nonce:b.nonce,slug:t})}),w(e=>{const n={...e};return delete n[t],n}),q(),a){const t=u(e);(0,o.sx)("Subscription Created",{product_slug:e.slug||"",product_name:e.name||"",item_name:e.slug||"",subscription_id:n,amount:t.amount,currency:t.currency,period:t.period,provisioned_at:i?.provisionedAt||null,expires_at:i?.expiresAt||null,timestamp:Date.now()}),await g("install",{...e,download:a},"buy_now")&&(z(n),(0,o.$V)({action:"install",plugin:e,result:"success"}))}return C(),!0}return"not_found"===a&&(y({visible:!0,type:"buy_now",pluginSlug:t,message:i?.error||i?.data?.message||i?.data?.error||null}),fetch(r,{method:"POST",body:new URLSearchParams({action:(0,c.R5)("clear_pending_procurement"),nonce:b.nonce,slug:t})}),w(e=>{const n={...e};return delete n[t],n}),!0)},onError:e=>console.error("[Marketplace] Polling error",e)}))};(0,r.useEffect)(()=>{const t=_?.[e.slug];return t?.subscriptionId&&V(e.slug,t.subscriptionId),F&&!x?.length&&C(),()=>{M.current&&M.current()}},[]),(0,r.useEffect)(()=>{if(!F||!e.productId||!x?.length)return;const t=x.find(t=>t.productId===e.productId&&("active"===t.status||"canceled"===t.status||"pending_cancellation"===t.status));t&&O({provisionedAt:t.provisionedAt||null,expiresAt:t.expiresAt||null,status:"canceled"===t.status?"canceled":"active"})},[x]);const W=t=>{const n=!e.installed;if(f&&v(e.slug)&&n&&"install"===t){(0,o.Mh)({buttonName:"Install",buttonAction:"product_install",plugin:e,context:{action:t,result:"initiated"}});const n=new CustomEvent("onecom-plugin-provision",{detail:{slug:e.slug},bubbles:!0,cancelable:!0,composed:!0});return void document.dispatchEvent(n)}"install"===t&&U?.accessDetails?.downloadUrl?g("install",{...e,download:U.accessDetails.downloadUrl},"product_detail"):g(t,e,"product_detail")},H=f&&v(e.slug)&&!e.installed&&!1===T,G=f&&v(e.slug)&&!e.installed&&(P||void 0===T),K=!!_?.[e.slug];return(0,r.createElement)("div",{className:"plugin-actions gv-mt-md"},G?(0,r.createElement)("div",{className:"gv-skeleton gv-heading-md"}):H?(0,r.createElement)("button",{type:"button",className:"gv-button gv-button-primary",onClick:()=>{(0,o.Mh)({buttonName:"Select",buttonAction:"subscribe_addon",plugin:e});const t=new CustomEvent("onecom-subscribe-addon",{detail:{slug:e.slug},bubbles:!0,cancelable:!0,composed:!0});document.dispatchEvent(t)},disabled:P},"Select"):e.installed?e.activated?(0,r.createElement)("button",{type:"button",className:"gv-button gv-button-primary",onClick:()=>{(0,o.Mh)({buttonName:"Manage",buttonAction:"manage_product",context:{product_slug:e.slug,product_name:e.name,has_redirect_url:!(!e.redirectUrl||""===e.redirectUrl.trim()),has_onboarding_url:!(!e.onboardingUrl||""===e.onboardingUrl.trim())}});const t=(0,s.v)(e,!1);(0,s.J)(t)}},(0,r.createElement)("span",null,m?.labels?.manage||"Manage"),(0,r.createElement)("gv-icon",{"aria-hidden":"true",src:`${D}icons/arrow_right.svg`})):(0,r.createElement)("button",{className:"gv-button gv-button-primary",disabled:!!n[e.slug],onClick:()=>W("activate")},n[e.slug]?B("install"===n[e.slug]?m?.notifications?.installing||"Installing {0}":m?.notifications?.activating||"Activating {0}",$):m?.activateButton||e.i18n?.activateButton||"Activate"):j?(0,r.createElement)("button",{type:"button",className:"gv-button gv-button-primary",disabled:E||!!n[e.slug]||K,onClick:()=>{(0,o.Mh)({buttonName:"Buy now",buttonAction:"product_buy",plugin:e,context:{action:"buy"}}),R(!0)}},E||n[e.slug]||K?(0,r.createElement)(r.Fragment,null,(0,r.createElement)("span",{class:"gv-mr-sm"},m?.labels?.processing||"Processing"),(0,r.createElement)("gv-loader",{class:"gv-mode-condensed",src:`${L}assets/images/spinner.svg`})):m?.labels?.buyNowButton||"Buy Now"):(0,r.createElement)("button",{className:"gv-button "+("seo-by-rank-math"===e.slug?"gv-button-secondary":"gv-button-primary"),disabled:n[e.slug],onClick:()=>W("install")},n[e.slug]?B(m?.notifications?.installing||"Installing {0}",$):m?.installButton||e.i18n?.installButton||"Install"),F&&(K?(0,r.createElement)("div",{className:"gv-text-indicator gv-mt-sm"},(0,r.createElement)("div",{className:"gv-indicator gv-state-positive"}),(0,r.createElement)("span",{style:{whiteSpace:"normal"}},m?.notifications?.procurementPending||"Payment successful. The plugin will be available for installation shortly.")):!j&&N?(0,r.createElement)("div",{className:"gv-mt-sm"},N.expiresAt&&(()=>{const e=`${"undefined"!=typeof window&&window.marketplaceConfig?.wpConfig?.adminUrl||"/wp-admin/"}admin.php?page=${"undefined"!=typeof window&&window.marketplaceConfig?.addonsMenuSlug||"onecom-marketplace-products"}`,t=m?.labels?.manageYourAddons||"Manage your addons";return"canceled"===N.status?(0,r.createElement)("div",{className:"gv-text-indicator"},(0,r.createElement)("div",{className:"gv-indicator gv-state-attention"}),(0,r.createElement)("span",{style:{whiteSpace:"normal"}},m?.labels?.subscriptionCanceled||"Subscription cancelled",". ",(0,r.createElement)("a",{href:e},t))):(0,r.createElement)("div",{className:"gv-text-indicator"},(0,r.createElement)("div",{className:"gv-indicator gv-state-positive"}),(0,r.createElement)("span",{style:{whiteSpace:"normal"}},m?.labels?.subscriptionActive||"Subscription active",". ",(0,r.createElement)("a",{href:e},t)))})()):null),(0,r.createElement)(l.A,{isOpen:A,plugin:e,uiI18n:m,assetsBaseUrl:L,onClose:()=>R(!1),onPurchase:()=>{R(!1),(async()=>{(0,o.Mh)({buttonName:"Buy now",buttonAction:"product_buy_confirmation",plugin:e,context:{action:"buy"}}),I(!0),k(B(m?.notifications?.processing||"Purchase in progress, please wait while your payment is processing.",$)),S("");const t=u(e),n=b?.ajaxUrl;if(!n)return I(!1),void k("");try{const r=new URLSearchParams({action:(0,c.R5)("subscribe"),nonce:b.nonce,productId:e.productId||"",priceAmount:t.amount||"",priceCurrency:t.currency||"",pricePeriod:t.period||""}),i=await fetch(n,{method:"POST",body:r}),s=await i.json();if(!s.success)return(0,o.Mh)({buttonName:"Buy now",buttonAction:"buy_now",plugin:e,context:{result:"error",error_message:s.data?.message||"Subscription failed"}}),y({visible:!0,type:"buy_now",pluginSlug:e.slug,message:s?.error||s?.error||s?.data?.message||s?.data?.error||null}),I(!1),void k("");const a=s?.data?.data,l=a?.status,u=a?.subscriptionId;if((0,o.Mh)({buttonName:"Buy now",buttonAction:"buy_now",plugin:e,context:{result:p.includes(l)?"procurement_success":"procurement_pending",subscription_id:u,status:l}}),p.includes(l)){const t=a?.license,n=t?.accessDetails?.downloadUrl;O({provisionedAt:t?.provisionedAt||null,expiresAt:t?.expiresAt||null,status:"active"}),I(!1),k(""),n&&await g("install",{...e,download:n},"buy_now")&&(z(u),(0,o.$V)({action:"install",plugin:e,result:"success"}))}else if("pending"!==l&&"pending_provisioning"!==l||!u)I(!1),k("");else{q();const t=new URLSearchParams({action:(0,c.R5)("save_pending_procurement"),nonce:b.nonce,slug:e.slug,subscriptionId:u,product_id:a?.productId||e.productId||""});fetch(n,{method:"POST",body:t}),w(t=>({...t,[e.slug]:{subscriptionId:u,product_id:a?.productId||e.productId,timestamp:Math.floor(Date.now()/1e3)}})),I(!1),k(""),V(e.slug,u)}}catch(t){console.error("Buy now subscription request failed",t),(0,o.Mh)({buttonName:"Buy now",buttonAction:"buy_now",plugin:e,context:{result:"error",error_message:t.message||"Network error"}}),y({visible:!0,type:"buy_now",pluginSlug:e.slug,message:t.message||null}),I(!1),k("")}})()}}))}},1352:(e,t,n)=>{"use strict";n.d(t,{TO:()=>o.T,gJ:()=>s,hz:()=>a,rV:()=>i.r});var r=n(1609),i=n(7565),o=n(8484);n(1831);const s=(0,r.createContext)();class a{constructor(){this.usedNamespaces={}}addUsedNamespaces(e){e.forEach(e=>{this.usedNamespaces[e]||(this.usedNamespaces[e]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}}},1609:e=>{"use strict";e.exports=window.React},1755:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var r=n(1609),i=n(7979),o=n(8291);function s(){const{assetsBaseUrl:e}=(0,i.D)(),{t}=(0,o.Bd)();return e||void 0!==window.marketplaceConfig&&window.marketplaceConfig,(0,r.createElement)("div",{className:"marketplace-container gv-flex gv-flex-col gv-flex-wrap gv-gap-lg gv-items-center gv-justify-center gv-p-fluid"},(0,r.createElement)("div",{className:"gv-text-center"},(0,r.createElement)("h5",{className:"gv-header-md gv-mb-sm"},t("ui.notifications.couldNotLoad")),(0,r.createElement)("p",{className:"gv-text-md gv-mb-lg"},t("ui.notifications.refreshPage")),(0,r.createElement)("button",{type:"button",className:"gv-button gv-button-primary buttons-min-width",onClick:()=>{window.location.reload()}},(0,r.createElement)("span",null,t("ui.button.refreshPage")))))}},1831:(e,t,n)=>{"use strict";n.d(t,{r:()=>o});var r=n(7565),i=n(8484);const o={type:"3rdParty",init(e){(0,r.P)(e.options.react),(0,i.V)(e)}}},2176:(e,t,n)=>{"use strict";n(8437)},2635:(e,t,n)=>{"use strict";n.r(t),n.d(t,{changeLanguage:()=>Q,createInstance:()=>G,default:()=>H,dir:()=>K,exists:()=>ne,getFixedT:()=>ee,hasLoadedNamespace:()=>ie,init:()=>J,keyFromSelector:()=>I,loadLanguages:()=>se,loadNamespaces:()=>oe,loadResources:()=>Y,reloadResources:()=>Z,setDefaultNamespace:()=>re,t:()=>te,use:()=>X});const r=e=>"string"==typeof e,i=()=>{let e,t;const n=new Promise((n,r)=>{e=n,t=r});return n.resolve=e,n.reject=t,n},o=e=>null==e?"":""+e,s=/###/g,a=e=>e&&e.indexOf("###")>-1?e.replace(s,"."):e,c=e=>!e||r(e),l=(e,t,n)=>{const i=r(t)?t.split("."):t;let o=0;for(;o{const{obj:r,k:i}=l(e,t,Object);if(void 0!==r||1===t.length)return void(r[i]=n);let o=t[t.length-1],s=t.slice(0,t.length-1),a=l(e,s,Object);for(;void 0===a.obj&&s.length;)o=`${s[s.length-1]}.${o}`,s=s.slice(0,s.length-1),a=l(e,s,Object),a?.obj&&void 0!==a.obj[`${a.k}.${o}`]&&(a.obj=void 0);a.obj[`${a.k}.${o}`]=n},p=(e,t)=>{const{obj:n,k:r}=l(e,t);if(n&&Object.prototype.hasOwnProperty.call(n,r))return n[r]},d=(e,t,n)=>{for(const i in t)"__proto__"!==i&&"constructor"!==i&&(i in e?r(e[i])||e[i]instanceof String||r(t[i])||t[i]instanceof String?n&&(e[i]=t[i]):d(e[i],t[i],n):e[i]=t[i]);return e},h=e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var f={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};const g=e=>r(e)?e.replace(/[&<>"'\/]/g,e=>f[e]):e,m=[" ",",","?","!",";"],v=new class{constructor(e){this.capacity=e,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(e){const t=this.regExpMap.get(e);if(void 0!==t)return t;const n=new RegExp(e);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(e,n),this.regExpQueue.push(e),n}}(20),y=(e,t,n=".")=>{if(!e)return;if(e[t]){if(!Object.prototype.hasOwnProperty.call(e,t))return;return e[t]}const r=t.split(n);let i=e;for(let e=0;e-1&&se?.replace("_","-"),_={type:"logger",log(e){this.output("log",e)},warn(e){this.output("warn",e)},error(e){this.output("error",e)},output(e,t){console?.[e]?.apply?.(console,t)}};class w{constructor(e,t={}){this.init(e,t)}init(e,t={}){this.prefix=t.prefix||"i18next:",this.logger=e||_,this.options=t,this.debug=t.debug}log(...e){return this.forward(e,"log","",!0)}warn(...e){return this.forward(e,"warn","",!0)}error(...e){return this.forward(e,"error","")}deprecate(...e){return this.forward(e,"warn","WARNING DEPRECATED: ",!0)}forward(e,t,n,i){return i&&!this.debug?null:(r(e[0])&&(e[0]=`${n}${this.prefix} ${e[0]}`),this.logger[t](e))}create(e){return new w(this.logger,{prefix:`${this.prefix}:${e}:`,...this.options})}clone(e){return(e=e||this.options).prefix=e.prefix||this.prefix,new w(this.logger,e)}}var k=new w;class S{constructor(){this.observers={}}on(e,t){return e.split(" ").forEach(e=>{this.observers[e]||(this.observers[e]=new Map);const n=this.observers[e].get(t)||0;this.observers[e].set(t,n+1)}),this}off(e,t){this.observers[e]&&(t?this.observers[e].delete(t):delete this.observers[e])}emit(e,...t){this.observers[e]&&Array.from(this.observers[e].entries()).forEach(([e,n])=>{for(let r=0;r{for(let i=0;i-1&&this.options.ns.splice(t,1)}getResource(e,t,n,i={}){const o=void 0!==i.keySeparator?i.keySeparator:this.options.keySeparator,s=void 0!==i.ignoreJSONStructure?i.ignoreJSONStructure:this.options.ignoreJSONStructure;let a;e.indexOf(".")>-1?a=e.split("."):(a=[e,t],n&&(Array.isArray(n)?a.push(...n):r(n)&&o?a.push(...n.split(o)):a.push(n)));const c=p(this.data,a);return!c&&!t&&!n&&e.indexOf(".")>-1&&(e=a[0],t=a[1],n=a.slice(2).join(".")),!c&&s&&r(n)?y(this.data?.[e]?.[t],n,o):c}addResource(e,t,n,r,i={silent:!1}){const o=void 0!==i.keySeparator?i.keySeparator:this.options.keySeparator;let s=[e,t];n&&(s=s.concat(o?n.split(o):n)),e.indexOf(".")>-1&&(s=e.split("."),r=t,t=s[1]),this.addNamespaces(t),u(this.data,s,r),i.silent||this.emit("added",e,t,n,r)}addResources(e,t,n,i={silent:!1}){for(const i in n)(r(n[i])||Array.isArray(n[i]))&&this.addResource(e,t,i,n[i],{silent:!0});i.silent||this.emit("added",e,t,n)}addResourceBundle(e,t,n,r,i,o={silent:!1,skipCopy:!1}){let s=[e,t];e.indexOf(".")>-1&&(s=e.split("."),r=n,n=t,t=s[1]),this.addNamespaces(t);let a=p(this.data,s)||{};o.skipCopy||(n=JSON.parse(JSON.stringify(n))),r?d(a,n,i):a={...a,...n},u(this.data,s,a),o.silent||this.emit("added",e,t,n)}removeResourceBundle(e,t){this.hasResourceBundle(e,t)&&delete this.data[e][t],this.removeNamespaces(t),this.emit("removed",e,t)}hasResourceBundle(e,t){return void 0!==this.getResource(e,t)}getResourceBundle(e,t){return t||(t=this.options.defaultNS),this.getResource(e,t)}getDataByLanguage(e){return this.data[e]}hasLanguageSomeTranslations(e){const t=this.getDataByLanguage(e);return!!(t&&Object.keys(t)||[]).find(e=>t[e]&&Object.keys(t[e]).length>0)}toJSON(){return this.data}}var C={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,n,r,i){return e.forEach(e=>{t=this.processors[e]?.process(t,n,r,i)??t}),t}};const E=Symbol("i18next/PATH_KEY");function I(e,t){const{[E]:n}=e(function(){const e=[],t=Object.create(null);let n;return t.get=(r,i)=>(n?.revoke?.(),i===E?e:(e.push(i),n=Proxy.revocable(r,t),n.proxy)),Proxy.revocable(Object.create(null),t).proxy}());return n.join(t?.keySeparator??".")}const N={},O=e=>!r(e)&&"boolean"!=typeof e&&"number"!=typeof e;class A extends S{constructor(e,t={}){super(),((e,t,n)=>{["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"].forEach(e=>{t[e]&&(n[e]=t[e])})})(0,e,this),this.options=t,void 0===this.options.keySeparator&&(this.options.keySeparator="."),this.logger=k.create("translator")}changeLanguage(e){e&&(this.language=e)}exists(e,t={interpolation:{}}){const n={...t};if(null==e)return!1;const r=this.resolve(e,n);return void 0!==r?.res}extractFromKey(e,t){let n=void 0!==t.nsSeparator?t.nsSeparator:this.options.nsSeparator;void 0===n&&(n=":");const i=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator;let o=t.ns||this.options.defaultNS||[];const s=n&&e.indexOf(n)>-1,a=!(this.options.userDefinedKeySeparator||t.keySeparator||this.options.userDefinedNsSeparator||t.nsSeparator||((e,t,n)=>{t=t||"",n=n||"";const r=m.filter(e=>t.indexOf(e)<0&&n.indexOf(e)<0);if(0===r.length)return!0;const i=v.getRegExp(`(${r.map(e=>"?"===e?"\\?":e).join("|")})`);let o=!i.test(e);if(!o){const t=e.indexOf(n);t>0&&!i.test(e.substring(0,t))&&(o=!0)}return o})(e,n,i));if(s&&!a){const t=e.match(this.interpolator.nestingRegexp);if(t&&t.length>0)return{key:e,namespaces:r(o)?[o]:o};const s=e.split(n);(n!==i||n===i&&this.options.ns.indexOf(s[0])>-1)&&(o=s.shift()),e=s.join(i)}return{key:e,namespaces:r(o)?[o]:o}}translate(e,t,n){let i="object"==typeof t?{...t}:t;if("object"!=typeof i&&this.options.overloadTranslationOptionHandler&&(i=this.options.overloadTranslationOptionHandler(arguments)),"object"==typeof i&&(i={...i}),i||(i={}),null==e)return"";"function"==typeof e&&(e=I(e,{...this.options,...i})),Array.isArray(e)||(e=[String(e)]);const o=void 0!==i.returnDetails?i.returnDetails:this.options.returnDetails,s=void 0!==i.keySeparator?i.keySeparator:this.options.keySeparator,{key:a,namespaces:c}=this.extractFromKey(e[e.length-1],i),l=c[c.length-1];let u=void 0!==i.nsSeparator?i.nsSeparator:this.options.nsSeparator;void 0===u&&(u=":");const p=i.lng||this.language,d=i.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if("cimode"===p?.toLowerCase())return d?o?{res:`${l}${u}${a}`,usedKey:a,exactUsedKey:a,usedLng:p,usedNS:l,usedParams:this.getUsedParamsDetails(i)}:`${l}${u}${a}`:o?{res:a,usedKey:a,exactUsedKey:a,usedLng:p,usedNS:l,usedParams:this.getUsedParamsDetails(i)}:a;const h=this.resolve(e,i);let f=h?.res;const g=h?.usedKey||a,m=h?.exactUsedKey||a,v=void 0!==i.joinArrays?i.joinArrays:this.options.joinArrays,y=!this.i18nFormat||this.i18nFormat.handleAsObject,b=void 0!==i.count&&!r(i.count),_=A.hasDefaultValue(i),w=b?this.pluralResolver.getSuffix(p,i.count,i):"",k=i.ordinal&&b?this.pluralResolver.getSuffix(p,i.count,{ordinal:!1}):"",S=b&&!i.ordinal&&0===i.count,x=S&&i[`defaultValue${this.options.pluralSeparator}zero`]||i[`defaultValue${w}`]||i[`defaultValue${k}`]||i.defaultValue;let C=f;y&&!f&&_&&(C=x);const E=O(C),N=Object.prototype.toString.apply(C);if(!(y&&C&&E&&["[object Number]","[object Function]","[object RegExp]"].indexOf(N)<0)||r(v)&&Array.isArray(C))if(y&&r(v)&&Array.isArray(f))f=f.join(v),f&&(f=this.extendTranslation(f,e,i,n));else{let t=!1,r=!1;!this.isValidLookup(f)&&_&&(t=!0,f=x),this.isValidLookup(f)||(r=!0,f=a);const o=(i.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&r?void 0:f,c=_&&x!==f&&this.options.updateMissing;if(r||t||c){if(this.logger.log(c?"updateKey":"missingKey",p,l,a,c?x:f),s){const e=this.resolve(a,{...i,keySeparator:!1});e&&e.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let e=[];const t=this.languageUtils.getFallbackCodes(this.options.fallbackLng,i.lng||this.language);if("fallback"===this.options.saveMissingTo&&t&&t[0])for(let n=0;n{const r=_&&n!==f?n:o;this.options.missingKeyHandler?this.options.missingKeyHandler(e,l,t,r,c,i):this.backendConnector?.saveMissing&&this.backendConnector.saveMissing(e,l,t,r,c,i),this.emit("missingKey",e,l,t,f)};this.options.saveMissing&&(this.options.saveMissingPlurals&&b?e.forEach(e=>{const t=this.pluralResolver.getSuffixes(e,i);S&&i[`defaultValue${this.options.pluralSeparator}zero`]&&t.indexOf(`${this.options.pluralSeparator}zero`)<0&&t.push(`${this.options.pluralSeparator}zero`),t.forEach(t=>{n([e],a+t,i[`defaultValue${t}`]||x)})}):n(e,a,x))}f=this.extendTranslation(f,e,i,h,n),r&&f===a&&this.options.appendNamespaceToMissingKey&&(f=`${l}${u}${a}`),(r||t)&&this.options.parseMissingKeyHandler&&(f=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${l}${u}${a}`:a,t?f:void 0,i))}else{if(!i.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const e=this.options.returnedObjectHandler?this.options.returnedObjectHandler(g,C,{...i,ns:c}):`key '${a} (${this.language})' returned an object instead of string.`;return o?(h.res=e,h.usedParams=this.getUsedParamsDetails(i),h):e}if(s){const e=Array.isArray(C),t=e?[]:{},n=e?m:g;for(const e in C)if(Object.prototype.hasOwnProperty.call(C,e)){const r=`${n}${s}${e}`;t[e]=_&&!f?this.translate(r,{...i,defaultValue:O(x)?x[e]:void 0,joinArrays:!1,ns:c}):this.translate(r,{...i,joinArrays:!1,ns:c}),t[e]===r&&(t[e]=C[e])}f=t}}return o?(h.res=f,h.usedParams=this.getUsedParamsDetails(i),h):f}extendTranslation(e,t,n,i,o){if(this.i18nFormat?.parse)e=this.i18nFormat.parse(e,{...this.options.interpolation.defaultVariables,...n},n.lng||this.language||i.usedLng,i.usedNS,i.usedKey,{resolved:i});else if(!n.skipInterpolation){n.interpolation&&this.interpolator.init({...n,interpolation:{...this.options.interpolation,...n.interpolation}});const s=r(e)&&(void 0!==n?.interpolation?.skipOnVariables?n.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let a;if(s){const t=e.match(this.interpolator.nestingRegexp);a=t&&t.length}let c=n.replace&&!r(n.replace)?n.replace:n;if(this.options.interpolation.defaultVariables&&(c={...this.options.interpolation.defaultVariables,...c}),e=this.interpolator.interpolate(e,c,n.lng||this.language||i.usedLng,n),s){const t=e.match(this.interpolator.nestingRegexp);a<(t&&t.length)&&(n.nest=!1)}!n.lng&&i&&i.res&&(n.lng=this.language||i.usedLng),!1!==n.nest&&(e=this.interpolator.nest(e,(...e)=>o?.[0]!==e[0]||n.context?this.translate(...e,t):(this.logger.warn(`It seems you are nesting recursively key: ${e[0]} in key: ${t[0]}`),null),n)),n.interpolation&&this.interpolator.reset()}const s=n.postProcess||this.options.postProcess,a=r(s)?[s]:s;return null!=e&&a?.length&&!1!==n.applyPostProcessor&&(e=C.handle(a,e,t,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...i,usedParams:this.getUsedParamsDetails(n)},...n}:n,this)),e}resolve(e,t={}){let n,i,o,s,a;return r(e)&&(e=[e]),e.forEach(e=>{if(this.isValidLookup(n))return;const c=this.extractFromKey(e,t),l=c.key;i=l;let u=c.namespaces;this.options.fallbackNS&&(u=u.concat(this.options.fallbackNS));const p=void 0!==t.count&&!r(t.count),d=p&&!t.ordinal&&0===t.count,h=void 0!==t.context&&(r(t.context)||"number"==typeof t.context)&&""!==t.context,f=t.lngs?t.lngs:this.languageUtils.toResolveHierarchy(t.lng||this.language,t.fallbackLng);u.forEach(e=>{this.isValidLookup(n)||(a=e,N[`${f[0]}-${e}`]||!this.utils?.hasLoadedNamespace||this.utils?.hasLoadedNamespace(a)||(N[`${f[0]}-${e}`]=!0,this.logger.warn(`key "${i}" for languages "${f.join(", ")}" won't get resolved as namespace "${a}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),f.forEach(r=>{if(this.isValidLookup(n))return;s=r;const i=[l];if(this.i18nFormat?.addLookupKeys)this.i18nFormat.addLookupKeys(i,l,r,e,t);else{let e;p&&(e=this.pluralResolver.getSuffix(r,t.count,t));const n=`${this.options.pluralSeparator}zero`,o=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(p&&(t.ordinal&&0===e.indexOf(o)&&i.push(l+e.replace(o,this.options.pluralSeparator)),i.push(l+e),d&&i.push(l+n)),h){const r=`${l}${this.options.contextSeparator||"_"}${t.context}`;i.push(r),p&&(t.ordinal&&0===e.indexOf(o)&&i.push(r+e.replace(o,this.options.pluralSeparator)),i.push(r+e),d&&i.push(r+n))}}let a;for(;a=i.pop();)this.isValidLookup(n)||(o=a,n=this.getResource(r,e,a,t))}))})}),{res:n,usedKey:i,exactUsedKey:o,usedLng:s,usedNS:a}}isValidLookup(e){return!(void 0===e||!this.options.returnNull&&null===e||!this.options.returnEmptyString&&""===e)}getResource(e,t,n,r={}){return this.i18nFormat?.getResource?this.i18nFormat.getResource(e,t,n,r):this.resourceStore.getResource(e,t,n,r)}getUsedParamsDetails(e={}){const t=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],n=e.replace&&!r(e.replace);let i=n?e.replace:e;if(n&&void 0!==e.count&&(i.count=e.count),this.options.interpolation.defaultVariables&&(i={...this.options.interpolation.defaultVariables,...i}),!n){i={...i};for(const e of t)delete i[e]}return i}static hasDefaultValue(e){for(const t in e)if(Object.prototype.hasOwnProperty.call(e,t)&&"defaultValue"===t.substring(0,12)&&void 0!==e[t])return!0;return!1}}class R{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=k.create("languageUtils")}getScriptPartFromCode(e){if(!(e=b(e))||e.indexOf("-")<0)return null;const t=e.split("-");return 2===t.length?null:(t.pop(),"x"===t[t.length-1].toLowerCase()?null:this.formatLanguageCode(t.join("-")))}getLanguagePartFromCode(e){if(!(e=b(e))||e.indexOf("-")<0)return e;const t=e.split("-");return this.formatLanguageCode(t[0])}formatLanguageCode(e){if(r(e)&&e.indexOf("-")>-1){let t;try{t=Intl.getCanonicalLocales(e)[0]}catch(e){}return t&&this.options.lowerCaseLng&&(t=t.toLowerCase()),t||(this.options.lowerCaseLng?e.toLowerCase():e)}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}isSupportedCode(e){return("languageOnly"===this.options.load||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(e)>-1}getBestMatchFromCodes(e){if(!e)return null;let t;return e.forEach(e=>{if(t)return;const n=this.formatLanguageCode(e);this.options.supportedLngs&&!this.isSupportedCode(n)||(t=n)}),!t&&this.options.supportedLngs&&e.forEach(e=>{if(t)return;const n=this.getScriptPartFromCode(e);if(this.isSupportedCode(n))return t=n;const r=this.getLanguagePartFromCode(e);if(this.isSupportedCode(r))return t=r;t=this.options.supportedLngs.find(e=>e===r?e:e.indexOf("-")<0&&r.indexOf("-")<0?void 0:e.indexOf("-")>0&&r.indexOf("-")<0&&e.substring(0,e.indexOf("-"))===r||0===e.indexOf(r)&&r.length>1?e:void 0)}),t||(t=this.getFallbackCodes(this.options.fallbackLng)[0]),t}getFallbackCodes(e,t){if(!e)return[];if("function"==typeof e&&(e=e(t)),r(e)&&(e=[e]),Array.isArray(e))return e;if(!t)return e.default||[];let n=e[t];return n||(n=e[this.getScriptPartFromCode(t)]),n||(n=e[this.formatLanguageCode(t)]),n||(n=e[this.getLanguagePartFromCode(t)]),n||(n=e.default),n||[]}toResolveHierarchy(e,t){const n=this.getFallbackCodes((!1===t?[]:t)||this.options.fallbackLng||[],e),i=[],o=e=>{e&&(this.isSupportedCode(e)?i.push(e):this.logger.warn(`rejecting language code not found in supportedLngs: ${e}`))};return r(e)&&(e.indexOf("-")>-1||e.indexOf("_")>-1)?("languageOnly"!==this.options.load&&o(this.formatLanguageCode(e)),"languageOnly"!==this.options.load&&"currentOnly"!==this.options.load&&o(this.getScriptPartFromCode(e)),"currentOnly"!==this.options.load&&o(this.getLanguagePartFromCode(e))):r(e)&&o(this.formatLanguageCode(e)),n.forEach(e=>{i.indexOf(e)<0&&o(this.formatLanguageCode(e))}),i}}const M={zero:0,one:1,two:2,few:3,many:4,other:5},T={select:e=>1===e?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class P{constructor(e,t={}){this.languageUtils=e,this.options=t,this.logger=k.create("pluralResolver"),this.pluralRulesCache={}}addRule(e,t){this.rules[e]=t}clearCache(){this.pluralRulesCache={}}getRule(e,t={}){const n=b("dev"===e?"en":e),r=t.ordinal?"ordinal":"cardinal",i=JSON.stringify({cleanedCode:n,type:r});if(i in this.pluralRulesCache)return this.pluralRulesCache[i];let o;try{o=new Intl.PluralRules(n,{type:r})}catch(n){if(!Intl)return this.logger.error("No Intl support, please use an Intl polyfill!"),T;if(!e.match(/-|_/))return T;const r=this.languageUtils.getLanguagePartFromCode(e);o=this.getRule(r,t)}return this.pluralRulesCache[i]=o,o}needsPlural(e,t={}){let n=this.getRule(e,t);return n||(n=this.getRule("dev",t)),n?.resolvedOptions().pluralCategories.length>1}getPluralFormsOfKey(e,t,n={}){return this.getSuffixes(e,n).map(e=>`${t}${e}`)}getSuffixes(e,t={}){let n=this.getRule(e,t);return n||(n=this.getRule("dev",t)),n?n.resolvedOptions().pluralCategories.sort((e,t)=>M[e]-M[t]).map(e=>`${this.options.prepend}${t.ordinal?`ordinal${this.options.prepend}`:""}${e}`):[]}getSuffix(e,t,n={}){const r=this.getRule(e,n);return r?`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${r.select(t)}`:(this.logger.warn(`no plural rule found for: ${e}`),this.getSuffix("dev",t,n))}}const L=(e,t,n,i=".",o=!0)=>{let s=((e,t,n)=>{const r=p(e,n);return void 0!==r?r:p(t,n)})(e,t,n);return!s&&o&&r(n)&&(s=y(e,n,i),void 0===s&&(s=y(t,n,i))),s},D=e=>e.replace(/\$/g,"$$$$");class F{constructor(e={}){this.logger=k.create("interpolator"),this.options=e,this.format=e?.interpolation?.format||(e=>e),this.init(e)}init(e={}){e.interpolation||(e.interpolation={escapeValue:!0});const{escape:t,escapeValue:n,useRawValueToEscape:r,prefix:i,prefixEscaped:o,suffix:s,suffixEscaped:a,formatSeparator:c,unescapeSuffix:l,unescapePrefix:u,nestingPrefix:p,nestingPrefixEscaped:d,nestingSuffix:f,nestingSuffixEscaped:m,nestingOptionsSeparator:v,maxReplaces:y,alwaysFormat:b}=e.interpolation;this.escape=void 0!==t?t:g,this.escapeValue=void 0===n||n,this.useRawValueToEscape=void 0!==r&&r,this.prefix=i?h(i):o||"{{",this.suffix=s?h(s):a||"}}",this.formatSeparator=c||",",this.unescapePrefix=l?"":u||"-",this.unescapeSuffix=this.unescapePrefix?"":l||"",this.nestingPrefix=p?h(p):d||h("$t("),this.nestingSuffix=f?h(f):m||h(")"),this.nestingOptionsSeparator=v||",",this.maxReplaces=y||1e3,this.alwaysFormat=void 0!==b&&b,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const e=(e,t)=>e?.source===t?(e.lastIndex=0,e):new RegExp(t,"g");this.regexp=e(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=e(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=e(this.nestingRegexp,`${this.nestingPrefix}((?:[^()"']+|"[^"]*"|'[^']*'|\\((?:[^()]|"[^"]*"|'[^']*')*\\))*?)${this.nestingSuffix}`)}interpolate(e,t,n,i){let s,a,c;const l=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},u=e=>{if(e.indexOf(this.formatSeparator)<0){const r=L(t,l,e,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(r,void 0,n,{...i,...t,interpolationkey:e}):r}const r=e.split(this.formatSeparator),o=r.shift().trim(),s=r.join(this.formatSeparator).trim();return this.format(L(t,l,o,this.options.keySeparator,this.options.ignoreJSONStructure),s,n,{...i,...t,interpolationkey:o})};this.resetRegExp();const p=i?.missingInterpolationHandler||this.options.missingInterpolationHandler,d=void 0!==i?.interpolation?.skipOnVariables?i.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:e=>D(e)},{regex:this.regexp,safeValue:e=>this.escapeValue?D(this.escape(e)):D(e)}].forEach(t=>{for(c=0;s=t.regex.exec(e);){const n=s[1].trim();if(a=u(n),void 0===a)if("function"==typeof p){const t=p(e,s,i);a=r(t)?t:""}else if(i&&Object.prototype.hasOwnProperty.call(i,n))a="";else{if(d){a=s[0];continue}this.logger.warn(`missed to pass in variable ${n} for interpolating ${e}`),a=""}else r(a)||this.useRawValueToEscape||(a=o(a));const l=t.safeValue(a);if(e=e.replace(s[0],l),d?(t.regex.lastIndex+=a.length,t.regex.lastIndex-=s[0].length):t.regex.lastIndex=0,c++,c>=this.maxReplaces)break}}),e}nest(e,t,n={}){let i,s,a;const c=(e,t)=>{const n=this.nestingOptionsSeparator;if(e.indexOf(n)<0)return e;const r=e.split(new RegExp(`${n}[ ]*{`));let i=`{${r[1]}`;e=r[0],i=this.interpolate(i,a);const o=i.match(/'/g),s=i.match(/"/g);((o?.length??0)%2==0&&!s||s.length%2!=0)&&(i=i.replace(/'/g,'"'));try{a=JSON.parse(i),t&&(a={...t,...a})}catch(t){return this.logger.warn(`failed parsing options string in nesting for key ${e}`,t),`${e}${n}${i}`}return a.defaultValue&&a.defaultValue.indexOf(this.prefix)>-1&&delete a.defaultValue,e};for(;i=this.nestingRegexp.exec(e);){let l=[];a={...n},a=a.replace&&!r(a.replace)?a.replace:a,a.applyPostProcessor=!1,delete a.defaultValue;const u=/{.*}/.test(i[1])?i[1].lastIndexOf("}")+1:i[1].indexOf(this.formatSeparator);if(-1!==u&&(l=i[1].slice(u).split(this.formatSeparator).map(e=>e.trim()).filter(Boolean),i[1]=i[1].slice(0,u)),s=t(c.call(this,i[1].trim(),a),a),s&&i[0]===e&&!r(s))return s;r(s)||(s=o(s)),s||(this.logger.warn(`missed to resolve ${i[1]} for nesting ${e}`),s=""),l.length&&(s=l.reduce((e,t)=>this.format(e,t,n.lng,{...n,interpolationkey:i[1].trim()}),s.trim())),e=e.replace(i[0],s),this.regexp.lastIndex=0}return e}}const U=e=>{const t={};return(n,r,i)=>{let o=i;i&&i.interpolationkey&&i.formatParams&&i.formatParams[i.interpolationkey]&&i[i.interpolationkey]&&(o={...o,[i.interpolationkey]:void 0});const s=r+JSON.stringify(o);let a=t[s];return a||(a=e(b(r),i),t[s]=a),a(n)}},j=e=>(t,n,r)=>e(b(n),r)(t);class B{constructor(e={}){this.logger=k.create("formatter"),this.options=e,this.init(e)}init(e,t={interpolation:{}}){this.formatSeparator=t.interpolation.formatSeparator||",";const n=t.cacheInBuiltFormats?U:j;this.formats={number:n((e,t)=>{const n=new Intl.NumberFormat(e,{...t});return e=>n.format(e)}),currency:n((e,t)=>{const n=new Intl.NumberFormat(e,{...t,style:"currency"});return e=>n.format(e)}),datetime:n((e,t)=>{const n=new Intl.DateTimeFormat(e,{...t});return e=>n.format(e)}),relativetime:n((e,t)=>{const n=new Intl.RelativeTimeFormat(e,{...t});return e=>n.format(e,t.range||"day")}),list:n((e,t)=>{const n=new Intl.ListFormat(e,{...t});return e=>n.format(e)})}}add(e,t){this.formats[e.toLowerCase().trim()]=t}addCached(e,t){this.formats[e.toLowerCase().trim()]=U(t)}format(e,t,n,r={}){const i=t.split(this.formatSeparator);if(i.length>1&&i[0].indexOf("(")>1&&i[0].indexOf(")")<0&&i.find(e=>e.indexOf(")")>-1)){const e=i.findIndex(e=>e.indexOf(")")>-1);i[0]=[i[0],...i.splice(1,e)].join(this.formatSeparator)}return i.reduce((e,t)=>{const{formatName:i,formatOptions:o}=(e=>{let t=e.toLowerCase().trim();const n={};if(e.indexOf("(")>-1){const r=e.split("(");t=r[0].toLowerCase().trim();const i=r[1].substring(0,r[1].length-1);"currency"===t&&i.indexOf(":")<0?n.currency||(n.currency=i.trim()):"relativetime"===t&&i.indexOf(":")<0?n.range||(n.range=i.trim()):i.split(";").forEach(e=>{if(e){const[t,...r]=e.split(":"),i=r.join(":").trim().replace(/^'+|'+$/g,""),o=t.trim();n[o]||(n[o]=i),"false"===i&&(n[o]=!1),"true"===i&&(n[o]=!0),isNaN(i)||(n[o]=parseInt(i,10))}})}return{formatName:t,formatOptions:n}})(t);if(this.formats[i]){let t=e;try{const s=r?.formatParams?.[r.interpolationkey]||{},a=s.locale||s.lng||r.locale||r.lng||n;t=this.formats[i](e,a,{...o,...r,...s})}catch(e){this.logger.warn(e)}return t}return this.logger.warn(`there was no format function for ${i}`),e},e)}}class $ extends S{constructor(e,t,n,r={}){super(),this.backend=e,this.store=t,this.services=n,this.languageUtils=n.languageUtils,this.options=r,this.logger=k.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=r.maxParallelReads||10,this.readingCalls=0,this.maxRetries=r.maxRetries>=0?r.maxRetries:5,this.retryTimeout=r.retryTimeout>=1?r.retryTimeout:350,this.state={},this.queue=[],this.backend?.init?.(n,r.backend,r)}queueLoad(e,t,n,r){const i={},o={},s={},a={};return e.forEach(e=>{let r=!0;t.forEach(t=>{const s=`${e}|${t}`;!n.reload&&this.store.hasResourceBundle(e,t)?this.state[s]=2:this.state[s]<0||(1===this.state[s]?void 0===o[s]&&(o[s]=!0):(this.state[s]=1,r=!1,void 0===o[s]&&(o[s]=!0),void 0===i[s]&&(i[s]=!0),void 0===a[t]&&(a[t]=!0)))}),r||(s[e]=!0)}),(Object.keys(i).length||Object.keys(o).length)&&this.queue.push({pending:o,pendingCount:Object.keys(o).length,loaded:{},errors:[],callback:r}),{toLoad:Object.keys(i),pending:Object.keys(o),toLoadLanguages:Object.keys(s),toLoadNamespaces:Object.keys(a)}}loaded(e,t,n){const r=e.split("|"),i=r[0],o=r[1];t&&this.emit("failedLoading",i,o,t),!t&&n&&this.store.addResourceBundle(i,o,n,void 0,void 0,{skipCopy:!0}),this.state[e]=t?-1:2,t&&n&&(this.state[e]=0);const s={};this.queue.forEach(n=>{((e,t,n)=>{const{obj:r,k:i}=l(e,t,Object);r[i]=r[i]||[],r[i].push(n)})(n.loaded,[i],o),((e,t)=>{void 0!==e.pending[t]&&(delete e.pending[t],e.pendingCount--)})(n,e),t&&n.errors.push(t),0!==n.pendingCount||n.done||(Object.keys(n.loaded).forEach(e=>{s[e]||(s[e]={});const t=n.loaded[e];t.length&&t.forEach(t=>{void 0===s[e][t]&&(s[e][t]=!0)})}),n.done=!0,n.errors.length?n.callback(n.errors):n.callback())}),this.emit("loaded",s),this.queue=this.queue.filter(e=>!e.done)}read(e,t,n,r=0,i=this.retryTimeout,o){if(!e.length)return o(null,{});if(this.readingCalls>=this.maxParallelReads)return void this.waitingReads.push({lng:e,ns:t,fcName:n,tried:r,wait:i,callback:o});this.readingCalls++;const s=(s,a)=>{if(this.readingCalls--,this.waitingReads.length>0){const e=this.waitingReads.shift();this.read(e.lng,e.ns,e.fcName,e.tried,e.wait,e.callback)}s&&a&&r{this.read.call(this,e,t,n,r+1,2*i,o)},i):o(s,a)},a=this.backend[n].bind(this.backend);if(2!==a.length)return a(e,t,s);try{const n=a(e,t);n&&"function"==typeof n.then?n.then(e=>s(null,e)).catch(s):s(null,n)}catch(e){s(e)}}prepareLoading(e,t,n={},i){if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),i&&i();r(e)&&(e=this.languageUtils.toResolveHierarchy(e)),r(t)&&(t=[t]);const o=this.queueLoad(e,t,n,i);if(!o.toLoad.length)return o.pending.length||i(),null;o.toLoad.forEach(e=>{this.loadOne(e)})}load(e,t,n){this.prepareLoading(e,t,{},n)}reload(e,t,n){this.prepareLoading(e,t,{reload:!0},n)}loadOne(e,t=""){const n=e.split("|"),r=n[0],i=n[1];this.read(r,i,"read",void 0,void 0,(n,o)=>{n&&this.logger.warn(`${t}loading namespace ${i} for language ${r} failed`,n),!n&&o&&this.logger.log(`${t}loaded namespace ${i} for language ${r}`,o),this.loaded(e,n,o)})}saveMissing(e,t,n,r,i,o={},s=()=>{}){if(!this.services?.utils?.hasLoadedNamespace||this.services?.utils?.hasLoadedNamespace(t)){if(null!=n&&""!==n){if(this.backend?.create){const a={...o,isUpdate:i},c=this.backend.create.bind(this.backend);if(c.length<6)try{let i;i=5===c.length?c(e,t,n,r,a):c(e,t,n,r),i&&"function"==typeof i.then?i.then(e=>s(null,e)).catch(s):s(null,i)}catch(e){s(e)}else c(e,t,n,r,s,a)}e&&e[0]&&this.store.addResource(e[0],t,n,r)}}else this.logger.warn(`did not save key "${n}" as the namespace "${t}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")}}const z=()=>({debug:!1,initAsync:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:e=>{let t={};if("object"==typeof e[1]&&(t=e[1]),r(e[1])&&(t.defaultValue=e[1]),r(e[2])&&(t.tDescription=e[2]),"object"==typeof e[2]||"object"==typeof e[3]){const n=e[3]||e[2];Object.keys(n).forEach(e=>{t[e]=n[e]})}return t},interpolation:{escapeValue:!0,format:e=>e,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0},cacheInBuiltFormats:!0}),q=e=>(r(e.ns)&&(e.ns=[e.ns]),r(e.fallbackLng)&&(e.fallbackLng=[e.fallbackLng]),r(e.fallbackNS)&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs?.indexOf?.("cimode")<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),"boolean"==typeof e.initImmediate&&(e.initAsync=e.initImmediate),e),V=()=>{};class W extends S{constructor(e={},t){var n;if(super(),this.options=q(e),this.services={},this.logger=k,this.modules={external:[]},n=this,Object.getOwnPropertyNames(Object.getPrototypeOf(n)).forEach(e=>{"function"==typeof n[e]&&(n[e]=n[e].bind(n))}),t&&!this.isInitialized&&!e.isClone){if(!this.options.initAsync)return this.init(e,t),this;setTimeout(()=>{this.init(e,t)},0)}}init(e={},t){this.isInitializing=!0,"function"==typeof e&&(t=e,e={}),null==e.defaultNS&&e.ns&&(r(e.ns)?e.defaultNS=e.ns:e.ns.indexOf("translation")<0&&(e.defaultNS=e.ns[0]));const n=z();this.options={...n,...this.options,...q(e)},this.options.interpolation={...n.interpolation,...this.options.interpolation},void 0!==e.keySeparator&&(this.options.userDefinedKeySeparator=e.keySeparator),void 0!==e.nsSeparator&&(this.options.userDefinedNsSeparator=e.nsSeparator);const o=e=>e?"function"==typeof e?new e:e:null;if(!this.options.isClone){let e;this.modules.logger?k.init(o(this.modules.logger),this.options):k.init(null,this.options),e=this.modules.formatter?this.modules.formatter:B;const t=new R(this.options);this.store=new x(this.options.resources,this.options);const r=this.services;r.logger=k,r.resourceStore=this.store,r.languageUtils=t,r.pluralResolver=new P(t,{prepend:this.options.pluralSeparator,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),this.options.interpolation.format&&this.options.interpolation.format!==n.interpolation.format&&this.logger.deprecate("init: you are still using the legacy format function, please use the new approach: https://www.i18next.com/translation-function/formatting"),!e||this.options.interpolation.format&&this.options.interpolation.format!==n.interpolation.format||(r.formatter=o(e),r.formatter.init&&r.formatter.init(r,this.options),this.options.interpolation.format=r.formatter.format.bind(r.formatter)),r.interpolator=new F(this.options),r.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},r.backendConnector=new $(o(this.modules.backend),r.resourceStore,r,this.options),r.backendConnector.on("*",(e,...t)=>{this.emit(e,...t)}),this.modules.languageDetector&&(r.languageDetector=o(this.modules.languageDetector),r.languageDetector.init&&r.languageDetector.init(r,this.options.detection,this.options)),this.modules.i18nFormat&&(r.i18nFormat=o(this.modules.i18nFormat),r.i18nFormat.init&&r.i18nFormat.init(this)),this.translator=new A(this.services,this.options),this.translator.on("*",(e,...t)=>{this.emit(e,...t)}),this.modules.external.forEach(e=>{e.init&&e.init(this)})}if(this.format=this.options.interpolation.format,t||(t=V),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const e=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);e.length>0&&"dev"!==e[0]&&(this.options.lng=e[0])}this.services.languageDetector||this.options.lng||this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(e=>{this[e]=(...t)=>this.store[e](...t)}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(e=>{this[e]=(...t)=>(this.store[e](...t),this)});const s=i(),a=()=>{const e=(e,n)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),s.resolve(n),t(e,n)};if(this.languages&&!this.isInitialized)return e(null,this.t.bind(this));this.changeLanguage(this.options.lng,e)};return this.options.resources||!this.options.initAsync?a():setTimeout(a,0),s}loadResources(e,t=V){let n=t;const i=r(e)?e:this.language;if("function"==typeof e&&(n=e),!this.options.resources||this.options.partialBundledLanguages){if("cimode"===i?.toLowerCase()&&(!this.options.preload||0===this.options.preload.length))return n();const e=[],t=t=>{t&&"cimode"!==t&&this.services.languageUtils.toResolveHierarchy(t).forEach(t=>{"cimode"!==t&&e.indexOf(t)<0&&e.push(t)})};i?t(i):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(e=>t(e)),this.options.preload?.forEach?.(e=>t(e)),this.services.backendConnector.load(e,this.options.ns,e=>{e||this.resolvedLanguage||!this.language||this.setResolvedLanguage(this.language),n(e)})}else n(null)}reloadResources(e,t,n){const r=i();return"function"==typeof e&&(n=e,e=void 0),"function"==typeof t&&(n=t,t=void 0),e||(e=this.languages),t||(t=this.options.ns),n||(n=V),this.services.backendConnector.reload(e,t,e=>{r.resolve(),n(e)}),r}use(e){if(!e)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!e.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return"backend"===e.type&&(this.modules.backend=e),("logger"===e.type||e.log&&e.warn&&e.error)&&(this.modules.logger=e),"languageDetector"===e.type&&(this.modules.languageDetector=e),"i18nFormat"===e.type&&(this.modules.i18nFormat=e),"postProcessor"===e.type&&C.addPostProcessor(e),"formatter"===e.type&&(this.modules.formatter=e),"3rdParty"===e.type&&this.modules.external.push(e),this}setResolvedLanguage(e){if(e&&this.languages&&!(["cimode","dev"].indexOf(e)>-1)){for(let e=0;e-1)&&this.store.hasLanguageSomeTranslations(t)){this.resolvedLanguage=t;break}}!this.resolvedLanguage&&this.languages.indexOf(e)<0&&this.store.hasLanguageSomeTranslations(e)&&(this.resolvedLanguage=e,this.languages.unshift(e))}}changeLanguage(e,t){this.isLanguageChangingTo=e;const n=i();this.emit("languageChanging",e);const o=e=>{this.language=e,this.languages=this.services.languageUtils.toResolveHierarchy(e),this.resolvedLanguage=void 0,this.setResolvedLanguage(e)},s=(r,i)=>{i?this.isLanguageChangingTo===e&&(o(i),this.translator.changeLanguage(i),this.isLanguageChangingTo=void 0,this.emit("languageChanged",i),this.logger.log("languageChanged",i)):this.isLanguageChangingTo=void 0,n.resolve((...e)=>this.t(...e)),t&&t(r,(...e)=>this.t(...e))},a=t=>{e||t||!this.services.languageDetector||(t=[]);const n=r(t)?t:t&&t[0],i=this.store.hasLanguageSomeTranslations(n)?n:this.services.languageUtils.getBestMatchFromCodes(r(t)?[t]:t);i&&(this.language||o(i),this.translator.language||this.translator.changeLanguage(i),this.services.languageDetector?.cacheUserLanguage?.(i)),this.loadResources(i,e=>{s(e,i)})};return e||!this.services.languageDetector||this.services.languageDetector.async?!e&&this.services.languageDetector&&this.services.languageDetector.async?0===this.services.languageDetector.detect.length?this.services.languageDetector.detect().then(a):this.services.languageDetector.detect(a):a(e):a(this.services.languageDetector.detect()),n}getFixedT(e,t,n){const i=(e,t,...r)=>{let o;o="object"!=typeof t?this.options.overloadTranslationOptionHandler([e,t].concat(r)):{...t},o.lng=o.lng||i.lng,o.lngs=o.lngs||i.lngs,o.ns=o.ns||i.ns,""!==o.keyPrefix&&(o.keyPrefix=o.keyPrefix||n||i.keyPrefix);const s=this.options.keySeparator||".";let a;return o.keyPrefix&&Array.isArray(e)?a=e.map(e=>("function"==typeof e&&(e=I(e,{...this.options,...t})),`${o.keyPrefix}${s}${e}`)):("function"==typeof e&&(e=I(e,{...this.options,...t})),a=o.keyPrefix?`${o.keyPrefix}${s}${e}`:e),this.t(a,o)};return r(e)?i.lng=e:i.lngs=e,i.ns=t,i.keyPrefix=n,i}t(...e){return this.translator?.translate(...e)}exists(...e){return this.translator?.exists(...e)}setDefaultNamespace(e){this.options.defaultNS=e}hasLoadedNamespace(e,t={}){if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const n=t.lng||this.resolvedLanguage||this.languages[0],r=!!this.options&&this.options.fallbackLng,i=this.languages[this.languages.length-1];if("cimode"===n.toLowerCase())return!0;const o=(e,t)=>{const n=this.services.backendConnector.state[`${e}|${t}`];return-1===n||0===n||2===n};if(t.precheck){const e=t.precheck(this,o);if(void 0!==e)return e}return!(!this.hasResourceBundle(n,e)&&this.services.backendConnector.backend&&(!this.options.resources||this.options.partialBundledLanguages)&&(!o(n,e)||r&&!o(i,e)))}loadNamespaces(e,t){const n=i();return this.options.ns?(r(e)&&(e=[e]),e.forEach(e=>{this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}),this.loadResources(e=>{n.resolve(),t&&t(e)}),n):(t&&t(),Promise.resolve())}loadLanguages(e,t){const n=i();r(e)&&(e=[e]);const o=this.options.preload||[],s=e.filter(e=>o.indexOf(e)<0&&this.services.languageUtils.isSupportedCode(e));return s.length?(this.options.preload=o.concat(s),this.loadResources(e=>{n.resolve(),t&&t(e)}),n):(t&&t(),Promise.resolve())}dir(e){if(e||(e=this.resolvedLanguage||(this.languages?.length>0?this.languages[0]:this.language)),!e)return"rtl";try{const t=new Intl.Locale(e);if(t&&t.getTextInfo){const e=t.getTextInfo();if(e&&e.direction)return e.direction}}catch(e){}const t=this.services?.languageUtils||new R(z());return e.toLowerCase().indexOf("-latn")>1?"ltr":["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"].indexOf(t.getLanguagePartFromCode(e))>-1||e.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(e={},t){return new W(e,t)}cloneInstance(e={},t=V){const n=e.forkResourceStore;n&&delete e.forkResourceStore;const r={...this.options,...e,isClone:!0},i=new W(r);if(void 0===e.debug&&void 0===e.prefix||(i.logger=i.logger.clone(e)),["store","services","language"].forEach(e=>{i[e]=this[e]}),i.services={...this.services},i.services.utils={hasLoadedNamespace:i.hasLoadedNamespace.bind(i)},n){const e=Object.keys(this.store.data).reduce((e,t)=>(e[t]={...this.store.data[t]},e[t]=Object.keys(e[t]).reduce((n,r)=>(n[r]={...e[t][r]},n),e[t]),e),{});i.store=new x(e,r),i.services.resourceStore=i.store}return i.translator=new A(i.services,r),i.translator.on("*",(e,...t)=>{i.emit(e,...t)}),i.init(r,t),i.translator.options=r,i.translator.backendConnector.services.utils={hasLoadedNamespace:i.hasLoadedNamespace.bind(i)},i}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const H=W.createInstance();H.createInstance=W.createInstance;const G=H.createInstance,K=H.dir,J=H.init,Y=H.loadResources,Z=H.reloadResources,X=H.use,Q=H.changeLanguage,ee=H.getFixedT,te=H.t,ne=H.exists,re=H.setDefaultNamespace,ie=H.hasLoadedNamespace,oe=H.loadNamespaces,se=H.loadLanguages},2648:(e,t,n)=>{"use strict";n(1609),n(8437),n(9454)},2875:(e,t,n)=>{"use strict";n.d(t,{x:()=>s});const r=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,i={"&":"&","&":"&","<":"<","<":"<",">":">",">":">","'":"'","'":"'",""":'"',""":'"'," ":" "," ":" ","©":"©","©":"©","®":"®","®":"®","…":"…","…":"…","/":"/","/":"/"},o=e=>i[e],s=e=>e.replace(r,o)},3220:(e,t,n)=>{"use strict";n.d(t,{J:()=>i,v:()=>r});const r=(e,t=!1)=>{let n=e.redirectUrl;const r="seo-by-rank-math"===e.slug||"seo-by-rank-math-pro"===e.slug,i=e.onboardingUrl&&"string"==typeof e.onboardingUrl&&""!==e.onboardingUrl.trim();if(r){const t=window.marketplaceConfig?.wpConfig;(!t||!0!==t.rankMathRegistrationSkip)&&i&&(n=e.onboardingUrl)}else t&&i&&(n=e.onboardingUrl);return n},i=e=>{if(e&&""!==e.trim()){const t=void 0!==window.marketplaceConfig&&window.marketplaceConfig?.wpConfig?.adminUrl;if(t){let n=e;n.startsWith("wp-admin/")&&(n=n.substring(9));const r=`${t}${n}`;window.location.href=r}else{const t=`${window.location.origin}/${e}`;window.location.href=t}return}window.location.href="/wp-admin/plugins.php"}},3227:(e,t,n)=>{"use strict";n(1609),n(7674),n(1352),n(9454)},3273:(e,t,n)=>{"use strict";n(1609),n(1352)},3331:(e,t,n)=>{"use strict";n.d(t,{R5:()=>a,hw:()=>i,j6:()=>s,lQ:()=>c,lb:()=>o});var r=n(1609);const i=(e,t,n)=>e?e.replace(t,n||""):"",o=(e,t,n)=>e.replace(/%([^%]+)%/g,(e,r)=>`${t}${r}${n}`),s=({htmlString:e})=>(0,r.createElement)("span",{dangerouslySetInnerHTML:{__html:e}}),a=e=>`${window.marketplaceConfig?.wpConfig?.ajaxActionPrefix||"marketplace"}_${e}`,c=e=>e?.length?e.reduce((e,t)=>new Date(t.expiresAt)>new Date(e.expiresAt)?t:e):null},3461:e=>{"use strict";e.exports=JSON.parse('{"ui.button.refreshPage":"Päivitä sivu","ui.notifications.couldNotLoad":"Sivua ei voitu ladata","ui.notifications.refreshPage":"Päivitä sivu ja ota yhteyttä asiakaspalveluumme, jos ongelma jatkuu."}')},3526:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=n(1609),i=n(7979);function o(){const{loadingAction:e,loadingPlugin:t,assetsBaseUrl:n}=(0,i.D)();if(!e)return null;const o=`${n||void 0!==window.marketplaceConfig&&window.marketplaceConfig?.assetsBaseUrl||""}assets/images/spinner.svg`;return(0,r.createElement)("div",{className:"loading-overlay show"},(0,r.createElement)("div",{className:"gv-loader-container gv-pos-center gv-pos-absolute"},(0,r.createElement)("gv-loader",{src:o}),(0,r.createElement)("p",null,e)))}},3591:e=>{"use strict";e.exports=JSON.parse('{"ui.button.refreshPage":"Actualizar página","ui.notifications.couldNotLoad":"No se puede cargar la página","ui.notifications.refreshPage":"Actualice la página y póngase en contacto con nuestro servicio de asistencia si el problema persiste."}')},3699:(e,t,n)=>{"use strict";n.d(t,{A:()=>y});var r=n(1609),i=n(7979),o=n(488),s=n(4598),a=n(9962),c=n(4677),l=n(4800),u=(n(6530),n(1755)),p=n(5694),d=n(1174),h=n(7008),f=n(3220),g=n(3331),m=n(6818),v=n(8299);function y(){const{apiBaseUrl:e,assetsBaseUrl:t,pluginInAction:n,setPluginInAction:y,subscriptionStatus:b,fetchSubscriptionStatus:_,isOnecomBrand:w,plugins:k,setPlugins:S,uiI18n:x,setUiI18n:C,handlePluginAction:E,handleCancelSubsAction:I,subscriptionsList:N,setSubscriptionsList:O,fetchPartnerSubscriptions:A,catalogError:R,setCatalogError:M,catalogLoading:T,maintenanceState:P,setMaintenanceState:L,setCatalogLoading:D,currentPluginSlug:F,shouldShowProvision:U,isSpecialPlugin:j,shouldShowPlugin:B,isWpVersionSupported:$,openDeleteModal:z,openCancelSubsModal:q,wpConfig:V,setErrorState:W,pendingProcurements:H,setPendingProcurements:G,setLoadingAction:K,setLoadingPlugin:J}=(0,i.D)(),[Y,Z]=(0,r.useState)(null),[X,Q]=(0,r.useState)(null),ee=(0,r.useRef)(null),[te,ne]=(0,r.useState)(!1),[re,ie]=(0,r.useState)(()=>{const e="undefined"!=typeof window&&window.marketplaceConfig?.pendingCancellations||{};return Object.fromEntries(Object.keys(e).map(e=>[e,!0]))}),oe=(0,r.useRef)({}),se=(0,r.useRef)(!1),ae=(0,r.useRef)(!1),ce=((0,r.useRef)(null),(0,r.useRef)(null)),le=(0,r.useRef)(null),ue=(0,r.useRef)(!1),pe=t||void 0!==window.marketplaceConfig&&window.marketplaceConfig?.assetsBaseUrl||"",de=pe?`${pe}assets/icons/`:"",he=e=>`${"undefined"!=typeof window&&window.marketplaceConfig?.wpConfig?.adminUrl?window.marketplaceConfig.wpConfig.adminUrl:"/wp-admin/"}admin.php?page=${"undefined"!=typeof window&&window.marketplaceConfig?.menuSlug?window.marketplaceConfig.menuSlug:"onecom-marketplace"}&plugin=${e}`,fe=(e,t)=>{const n=V?.ajaxUrl;if(!n||!t)return;oe.current[e]&&oe.current[e]();const r=()=>{fetch(n,{method:"POST",body:new URLSearchParams({action:(0,g.R5)("clear_pending_cancellation"),nonce:V.nonce,slug:e})}),ie(t=>{const n={...t};return delete n[e],n})};oe.current[e]=(0,m.g)({ajaxUrl:n,nonce:V.nonce,action:(0,g.R5)("track_status"),params:{subscriptionId:t,resourceType:"cancellation"},interval:1e4,onResult:n=>{const i=n?.data?.data,o=i?.status;if("canceled"===o){const n=ge?.find(t=>t.slug===e)||{slug:e};return(0,h.sx)("Subscription cancelled",{product_slug:n.slug||"",product_name:n.name||"",item_name:n.slug||"",subscription_id:t,timestamp:Date.now()}),r(),A(),!0}return"pending"!==o&&"pending_cancellation"!==o&&(r(),W({visible:!0,type:"cancel_subscription",pluginSlug:e,message:n?.error||n?.data?.message||n?.data?.error||null}),!0)},onError:t=>{console.error("[Marketplace] Cancel polling error",t),r(),W({visible:!0,type:"cancel_subscription",pluginSlug:e,message:t.message||null})}})};(0,r.useEffect)(()=>{const e="undefined"!=typeof window&&window.marketplaceConfig?.pendingCancellations||{};Object.entries(e).forEach(([e,t])=>{t?.subscriptionId&&fe(e,t.subscriptionId)});const t=oe.current;return()=>{Object.values(t).forEach(e=>e())}},[]),(0,r.useEffect)(()=>{A()},[A]);const ge=(0,r.useMemo)(()=>{if(!k?.length)return[];const e=(N||[]).reduce((e,t)=>(e[t.productId]||(e[t.productId]=[]),e[t.productId].push(t),e),{});return k.map(t=>({...t,subscriptions:e[t.productId]||[],hasSubscription:!!e[t.productId]?.length}))},[k,N]),me=(0,r.useMemo)(()=>{if(!ge?.length)return[];const e=!0===ge.find(e=>"seo-by-rank-math"===e.slug)?.activated,t=!0===ge.find(e=>"seo-by-rank-math-pro"===e.slug)?.activated;return ge.filter(n=>!!B(n)&&(!0===n.featured||"true"===n.featured)&&!0!==n.activated&&("seo-by-rank-math"===n.slug?!e&&!t:"seo-by-rank-math-pro"!==n.slug||e)).sort((e,t)=>(void 0!==e.featuredOrder?parseInt(e.featuredOrder):1/0)-(void 0!==t.featuredOrder?parseInt(t.featuredOrder):1/0)).slice(0,3)},[ge,B]),ve=(0,r.useCallback)(()=>{D(!0),M(null),L({isOn:!1,message:"",buttonLabel:""}),fetch(e).then(e=>{if(!e.ok)throw new Error(`HTTP error! status: ${e.status}`);return ce.current=Date.now(),e.json()}).then(e=>{if((e.is_cached||e.cached)&&(ue.current=!0),!0!==e?.data?.maintenanceMode){if(!(e.success&&e.data&&e.data.catalog))throw(0,h.oe)({category:"addons_page",itemName:"Addons Page",isContentRendered:!1}),new Error("Invalid API response structure");{const t=e.data.catalog;S(t);const n=e.data.uiI18n||e.data.ui_i18n;n&&C(n),w&&t.filter(e=>j(e.slug)).forEach(e=>{_(e.slug)})}}else L({isOn:!0,message:e?.data?.message||"",buttonLabel:e?.data?.buttonLabel||""})}).catch(e=>{console.error("Failed to fetch plugins:",e),(0,h.oe)({category:"addons_page",itemName:"Addons Page",isContentRendered:!1}),M(e.message||x?.notifications?.catalogLoadFailed||"Failed to load plugins")}).finally(()=>{D(!1)})},[e,S,C,M,D,L,w,j,_]);if((0,r.useEffect)(()=>{se.current||(se.current=!0,ve())},[ve]),(0,r.useEffect)(()=>{if(F&&k.length){const e=k.find(e=>e.slug===F);e&&Z(e)}else F||Z(null)},[F,k]),(0,r.useEffect)(()=>{const e=e=>{ee.current&&!ee.current.contains(e.target)&&Q(null)};return null!==X?document.addEventListener("mousedown",e):document.removeEventListener("mousedown",e),()=>{document.removeEventListener("mousedown",e)}},[X]),(0,r.useEffect)(()=>{T||R||!(k.length>0)||F||ae.current||(le.current=Date.now(),"true"===sessionStorage.getItem("mp_skip_page_view")?sessionStorage.removeItem("mp_skip_page_view"):(0,h.oe)({category:"addons_page",itemName:"Addons Page",contentReceivedAt:ce.current,contentRenderedAt:le.current,isCached:ue.current}),ae.current=!0)},[T,R,k.length,F]),T)return(0,r.createElement)("div",{className:"marketplace-container gv-flex gv-flex-col gv-flex-wrap"},(0,r.createElement)("div",{className:"gv-skeleton gv-heading-lg gv-mb-sm",style:{width:"13%"}}),(0,r.createElement)("div",{className:"gv-skeleton gv-text-sm gv-mb-fluid",style:{width:"33%"}}),(0,r.createElement)("div",{className:"gv-flex gv-justify-between gv-items-start"},(0,r.createElement)("div",{className:"gv-w-full"},(0,r.createElement)("div",{className:"gv-skeleton gv-heading-sm gv-mb-sm",style:{width:"13%"}}),(0,r.createElement)("div",{className:"gv-skeleton gv-text-sm gv-mb-md",style:{width:"33%"}})),(0,r.createElement)("div",{className:"gv-skeleton gv-text-sm gv-mb-md",style:{width:"13%"}})),(0,r.createElement)("div",{className:"product-grid gv-grid gv-gap-lg gv-mob-grid-cols-1 gv-tab-grid-cols-2 gv-desk-lg-grid-cols-3 gv-skeleton-loader"},[0,1,2].map(e=>(0,r.createElement)("div",{key:e,className:"gv-card gv-gap-md gv-content-container gv-p-lg gv-grid gv-grid-cols-12 gv-radius"},(0,r.createElement)("div",{className:"gv-desk-span-2 gv-span-3 gv-tab-span-3"},(0,r.createElement)("div",{className:"gv-skeleton gv-icon-tile"})),(0,r.createElement)("div",{className:"gv-desk-span-8 gv-tab-span-7 gv-span-7"},(0,r.createElement)("div",{className:"gv-skeleton gv-mb-xs",style:{height:"20px",width:"70%"}}),(0,r.createElement)("div",{className:"gv-skeleton gv-mb-sm",style:{height:"16px",width:"100%"}}),(0,r.createElement)("div",{className:"gv-skeleton",style:{height:"16px",width:"40%"}})),(0,r.createElement)("div",{className:"gv-span-2 gv-content-center gv-text-right"},(0,r.createElement)("div",{className:"gv-skeleton",style:{height:"24px",width:"24px"}}))))),(0,r.createElement)("div",{className:"gv-data-table gv-mt-lg gv-overflow-x-auto gv-skeleton-loader"},(0,r.createElement)("table",{className:"gv-col-5-shrink gv-col-6-shrink"},(0,r.createElement)("thead",null,(0,r.createElement)("tr",null,(0,r.createElement)("th",{scope:"col"}),(0,r.createElement)("th",{scope:"col"},(0,r.createElement)("div",{className:"gv-skeleton",style:{height:"16px",width:"50px"}})),(0,r.createElement)("th",{scope:"col"},(0,r.createElement)("div",{className:"gv-skeleton",style:{height:"16px",width:"50px"}})),(0,r.createElement)("th",{scope:"col"},(0,r.createElement)("div",{className:"gv-skeleton",style:{height:"16px",width:"50px"}})),(0,r.createElement)("th",{scope:"col"}))),(0,r.createElement)("tbody",null,[0,1].map(e=>(0,r.createElement)("tr",{key:e},(0,r.createElement)("td",{style:{width:"80px"}},(0,r.createElement)("div",{className:"gv-skeleton gv-icon-tile"})),(0,r.createElement)("td",null,(0,r.createElement)("div",{className:"gv-skeleton gv-text-sm"})),(0,r.createElement)("td",null,(0,r.createElement)("div",{className:"gv-skeleton gv-text-sm"})),(0,r.createElement)("td",null,(0,r.createElement)("div",{className:"gv-skeleton gv-text-sm"})),(0,r.createElement)("td",null,(0,r.createElement)("div",{className:"gv-skeleton gv-text-sm",style:{width:"24px"}}))))))));if(P.isOn)return(0,r.createElement)(p.A,{message:P.message,buttonLabel:P.buttonLabel,onRetry:ve});if(R)return(0,r.createElement)(u.A,null);if(!$("6.2"))return(0,r.createElement)(d.A,null);const ye="undefined"!=typeof window&&window.marketplaceConfig?.brand,be=["seo-by-rank-math","seo-by-rank-math-pro"],_e=ge.filter(e=>("rankmath"!==ye||!be.includes(e.slug))&&(e.installed||U(e)||(e=>e.hasSubscription&&e.subscriptions.some(e=>"active"===e.status||"canceled"===e.status&&e.expiresAt&&new Date(e.expiresAt)>new Date))(e)||!!H?.[e.slug]));return(0,r.createElement)("div",{className:"marketplace-container gv-flex gv-flex-col"},(0,r.createElement)("div",{className:"addons-header-wrap"},(0,r.createElement)("h3",null,x?.headings?.myProducts),(0,r.createElement)("p",{className:"gv-text-sm"},x?.text?.myProducts)),me.length>0&&(0,r.createElement)("section",{className:"addons-section gv-mt-fluid"},(0,r.createElement)("div",{className:"addons-header-container gv-flex gv-max-mob-flex-col gv-justify-between gv-items-start gv-tab-gap-lg"},(0,r.createElement)("div",{className:"heading-container gv-flex-1"},(0,r.createElement)("p",{className:"gv-text-bold gv-text-lg gv-mb-xs"},x?.headings?.recommendedProducts),(0,r.createElement)("p",{className:"gv-text-sm gv-mb-md"},x?.text?.recommendedText)),(0,r.createElement)("div",{className:"gv-flex gv-gap-sm gv-flex-shrink-0"},(0,r.createElement)("button",{className:"gv-button gv-button-primary gv-mode-condensed",onClick:()=>{const e="undefined"!=typeof window&&window.marketplaceConfig?.wpConfig?.adminUrl?window.marketplaceConfig.wpConfig.adminUrl:"/wp-admin/",t="undefined"!=typeof window&&window.marketplaceConfig?.menuSlug?window.marketplaceConfig.menuSlug:"onecom-marketplace";window.location.href=`${e}admin.php?page=${t}`}},x.seeAllProducts,(0,r.createElement)("gv-icon",{"aria-hidden":"true",src:`${de}arrow_right.svg`,alt:"See all products"})))),(0,r.createElement)("div",{className:"product-grid gv-grid gv-gap-lg gv-mob-grid-cols-1 gv-tab-grid-cols-2 gv-desk-lg-grid-cols-3 gv-mt-md"},me.map(e=>{U(e);const t=e.i18n.freeTrialPeriod&&""!==e.i18n.freeTrialPeriod.trim()?e.i18n.freeTrialPeriod:x?.labels?.free||"Free",n=(0,o.M)(e,t,x),i=(0,o.Tc)(e),s=(0,o.Dn)(e),a=(0,o.uA)(e),c=e.i18n?.freeTrialPeriod&&""!==e.i18n.freeTrialPeriod.trim(),l=e.i18n?.freeTrialText&&""!==e.i18n.freeTrialText.trim(),u="premium"===e.licenseType&&i&&s&&a>0&&!c&&!l;return(0,r.createElement)("div",{key:e.slug,className:"gv-card gv-gap-sm gv-content-container gv-p-lg gv-grid gv-grid-cols-12 gv-radius ocmp-plugin-cards",onClick:()=>{window.location.href=he(e.slug)}},(0,r.createElement)("div",{className:"gv-desk-span-2 gv-span-2 gv-tab-span-2"},(0,r.createElement)("img",{className:"gv-icon-tile",src:e.iconUrl||`${de}add_box.svg`,alt:e.name})),(0,r.createElement)("div",{className:"gv-desk-span-9 gv-tab-span-9 gv-span-9 gv-ml-sm"},(0,r.createElement)("div",{className:"gv-flex gv-flex-col gv-justify-between gv-h-full"},(0,r.createElement)("p",{className:"gv-text-sm gv-text-bold gv-mb-xs"},e.name),(0,r.createElement)("p",{className:"oc-card-content gv-text-on-alternative gv-mb-sm gv-text-sm gv-flex-1"},e.i18n.listingDescription||e.i18n.subtitle),u?(0,r.createElement)("div",{className:"ocmp-price-wrapper"},(0,r.createElement)("span",{className:"gv-price-old gv-caption-lg"},i),(0,r.createElement)("span",{className:"gv-caption-lg gv-text-bold"},s,(0,r.createElement)("span",{className:"gv-period"},"/",x?.labels?.timeMonth)),(0,r.createElement)("span",{className:"gv-badge gv-badge-discount"},x?.labels?.save||"Save"," ",a,"%")):(0,r.createElement)("span",{className:"gv-caption-lg gv-text-bold"},(0,r.createElement)(r.Fragment,null,n,"free"!==e.licenseType&&n&&n!==t&&n!==(x?.labels?.freeUntilRenewal||"Free until renewal")&&(0,r.createElement)("span",{className:"gv-period"},"/",x?.labels?.timeMonth))))),(0,r.createElement)("div",{className:"gv-span-1 gv-content-center gv-text-right"},(0,r.createElement)("div",{className:"gv-reset-button",style:{display:"inline-block"},"aria-label":`View details for ${e.name}`},(0,r.createElement)("img",{className:"gv-tile",src:`${de}arrow_forward.svg`,alt:`View ${e.name} details`,style:{minWidth:"24px"}}))))}))),_e.length>0&&(0,r.createElement)("section",{className:"addons-section gv-mt-fluid"},!w&&(0,r.createElement)("div",{className:"gv-flex gv-justify-end gv-mt-0"},(0,r.createElement)("button",{className:"gv-button gv-button-secondary gv-mode-condensed",disabled:te,onClick:async()=>{const e=V?.ajaxUrl;if(e){ne(!0),K(x?.notifications?.refreshing||"Refreshing subscriptions..."),J("");try{await fetch(e,{method:"POST",body:new URLSearchParams({action:(0,g.R5)("clear_subscription_list"),nonce:V.nonce})});const t=await fetch(e,{method:"POST",body:new URLSearchParams({action:(0,g.R5)("get_pending_procurements"),nonce:V.nonce})}),n=await t.json();n.success&&G(n.data||{}),await A(),ve()}catch(e){console.error("[Marketplace] Refresh subscriptions error",e)}finally{ne(!1),K(""),J("")}}}},(0,r.createElement)("gv-icon",{"aria-hidden":"true",src:`${de}refresh.svg`}),(0,r.createElement)("span",null,te?x?.labels?.refreshing||"Refreshing...":x?.labels?.refresh||"Refresh"))),(0,r.createElement)("div",{className:"gv-data-table gv-mt-lg gv-addons-table"},(0,r.createElement)("table",{className:"gv-col-5-shrink gv-col-6-shrink"},(0,r.createElement)("thead",null,(0,r.createElement)("tr",null,(0,r.createElement)("th",{scope:"col"}),(0,r.createElement)("th",{scope:"col"},x?.labels?.name),(0,r.createElement)("th",{scope:"col"},x?.labels?.type||"Type"),(0,r.createElement)("th",{scope:"col"},x?.labels?.subscriptions||"Subscription"),(0,r.createElement)("th",{scope:"col"},x?.labels?.status),(0,r.createElement)("th",{scope:"col"}),(0,r.createElement)("th",{scope:"col"}))),(0,r.createElement)("tbody",null,_e.map((e,t)=>{const n=U(e),i=e.hasSubscription?(0,g.lQ)(e.subscriptions):null,o=null!==i?(0,v.Y)(i.expiresAt):"-",s=(null!==i&&null!=i.renewsAt&&(0,v.Y)(i.renewsAt),"canceled"===i?.status&&i?.expiresAt&&new Date(i.expiresAt)>new Date);return(0,r.createElement)("tr",{id:e.slug,key:e.slug},(0,r.createElement)("td",{style:{width:"80px"}},(0,r.createElement)("img",{src:e.iconUrl||`${de}add_box.svg`,alt:e.name,className:"gv-icon-tile",style:{maxWidth:"auto"}})),(0,r.createElement)("td",null,(0,r.createElement)("p",{className:"gv-text-bold"},(0,r.createElement)("a",{href:he(e.slug),className:"gv-text-on-default"},e.name))),(0,r.createElement)("td",null,"free"===e.licenseType?(0,r.createElement)("div",{className:"gv-badge gv-badge-generic"},x?.labels?.freeLabel||"Free"):(0,r.createElement)("div",{className:"gv-badge gv-badge-info"},x?.labels?.premiumLabel||"Premium")),(0,r.createElement)("td",null,!H?.[e.slug]&&"pending"!==i?.status&&o&&"-"!==o?(0,r.createElement)(r.Fragment,null,"expired"===i?.status?(0,r.createElement)("div",{className:"gv-underline"},(0,r.createElement)("p",{style:{color:"red"}},x?.labels?.subscriptionExpired||"Subscription expired")):"canceled"===i?.status?s?(0,r.createElement)("div",{className:"gv-underline"},(0,r.createElement)("p",{className:"gv-text-on-alternative"},x?.labels?.subscriptionCanceled||"Subscription cancelled")):(0,r.createElement)("div",{className:"gv-underline"},(0,r.createElement)("p",{style:{color:"red"}},x?.labels?.subscriptionExpired||"Subscription expired")):"active"===i?.status?(0,r.createElement)("div",{className:"gv-underline"},(0,r.createElement)("p",{className:"gv-text-secondary"},x?.labels?.subscriptionActive||"Subscription active")):null,"expired"===i?.status?(0,r.createElement)("p",null,x?.labels?.expiredOn||"Expired on",": ",o):"canceled"===i?.status?(0,r.createElement)("p",null,x?.labels?.expiresOn||"Expires",": ",o):"active"===i?.status?(0,r.createElement)("p",null,x?.labels?.renewsOn||"Renews",": ",o):null):(0,r.createElement)("p",null,"-")),(0,r.createElement)("td",null,re[e.slug]?(0,r.createElement)("div",{className:"gv-text-indicator"},(0,r.createElement)("span",{className:"gv-indicator gv-state-attention"}),(0,r.createElement)("span",null," ",x?.labels?.cancellationInProgress||"Cancellation in progress..")):(0,r.createElement)("div",{className:"gv-text-indicator"},(0,r.createElement)("span",{className:H?.[e.slug]||e.activated?"gv-indicator gv-state-positive":"gv-indicator gv-state-informative"}),(0,r.createElement)("span",null," ",((e,t,n,r)=>{const i=n?.labels||{};if(H?.[e.slug])return i?.orderBeingProcessed||"Order being processed…";if(t){const n=t.status;if("pending"===n)return i?.subscriptionInProgress||"Subscription in progress";if("failed"===n)return i?.failed||"Failed";if("active"===n)return e.installed?e.activated?i?.active||"Active":i?.notActive||"Not Active":i?.notInstalled||"Not Installed"}return e.activated?i?.active||"Active":r?i?.notInstalled||"Not Installed":i?.notActive||"Not Active"})(e,i,x,n)))),(0,r.createElement)("td",null,!H?.[e.slug]&&((e,t,n,i,o,s)=>{const a=i||{};if(t){const n=t.status;if("pending"===n)return null;if("failed"===n)return null;if("active"===n){const n=t?.accessDetails?.downloadUrl;return e.installed?e.activated?null:(0,r.createElement)("a",{href:"#",className:"gv-action",onClick:t=>{t.preventDefault(),s("activate",e,"addons")}},a?.activateButton||"Activate"):(0,r.createElement)("a",{href:"#",className:"gv-action",onClick:t=>{t.preventDefault(),s("install",e,"addons",n)}},a?.installButton||"Install")}if("canceled"===n){if(t?.expiresAt&&new Date(t.expiresAt)>new Date){if(!e.installed)return(0,r.createElement)("a",{href:"#",className:"gv-action",onClick:n=>{n.preventDefault(),s("install",e,"addons",t?.accessDetails?.downloadUrl)}},a?.installButton||"Install");if(!e.activated)return(0,r.createElement)("a",{href:"#",className:"gv-action",onClick:t=>{t.preventDefault(),s("activate",e,"addons")}},a?.activateButton||"Activate")}return null}}return n?(0,r.createElement)("a",{href:"#",className:"gv-action",onClick:o},a?.installAndActivate||"Install and activate"):e.activated?null:(0,r.createElement)("a",{href:"#",className:"gv-action",onClick:t=>{t.preventDefault(),s("activate",e,"addons")}},a?.activateButton||"Activate")})(e,i,n,x,t=>{t.preventDefault();const n=new CustomEvent("onecom-plugin-provision",{detail:{slug:e.slug},bubbles:!0,cancelable:!0,composed:!0});document.dispatchEvent(n)},E)),(0,r.createElement)("td",null,(e.activated||e.installed&&!n||"active"===i?.status)&&(0,r.createElement)("div",{className:"gv-pos-relative",ref:X===t?ee:null},(0,r.createElement)("button",{type:"button","aria-label":x?.labels?.toggleMenu||"Toggle menu",className:"gv-reset-button",onClick:()=>Q(X===t?null:t)},(0,r.createElement)("gv-icon",{"aria-hidden":"true",src:`${de}more_horiz.svg`})),(0,r.createElement)("div",{className:"gv-contextual-menu gv-pos-right "+(X===t?"":"gv-invisible")},(0,r.createElement)("div",{className:"gv-menu"},(0,r.createElement)("button",{type:"button",className:"gv-btn-close","aria-label":x?.labels?.close||"Close",onClick:()=>Q(null)},(0,r.createElement)("gv-icon",{"aria-hidden":"true",src:`${de}close.svg`})),(0,r.createElement)("ul",null,e.activated&&(0,r.createElement)("li",{className:"gv-mb-0"},(0,r.createElement)("a",{href:"#",className:"gv-menu-item",onClick:t=>{t.preventDefault(),Q(null),(e=>{"undefined"!=typeof window&&window.marketplaceConfig?.data_consent_status&&(0,h.Mh)({buttonName:"Manage",buttonAction:"manage_product",context:{product_slug:e.slug,product_name:e.name,has_redirect_url:!(!e.redirectUrl||""===e.redirectUrl.trim()),has_onboarding_url:!(!e.onboardingUrl||""===e.onboardingUrl.trim())}});const t=(0,f.v)(e,!1);(0,f.J)(t)})(e)}},(0,r.createElement)("gv-icon",{"aria-hidden":"true",src:`${de}settings.svg`}),(0,r.createElement)("span",null,x?.labels?.manage||"Manage"))),e.activated&&(0,r.createElement)("li",{className:"gv-mb-0"},(0,r.createElement)("a",{href:"#",className:"gv-menu-item",onClick:t=>{t.preventDefault(),Q(null),E("deactivate",e,"addons")}},(0,r.createElement)("gv-icon",{"aria-hidden":"true",src:`${de}cancel.svg`}),(0,r.createElement)("span",null,x?.deactivate||"Deactivate"))),(0,r.createElement)("li",{className:"gv-mb-0"},!e.activated&&e.installed&&(0,r.createElement)("a",{href:"#",className:"gv-menu-item",onClick:t=>{t.preventDefault(),Q(null),z(e)}},(0,r.createElement)("gv-icon",{"aria-hidden":"true",src:`${de}delete.svg`}),(0,r.createElement)("span",null,x?.deleteButton||"Delete"))),(0,r.createElement)("li",{className:"gv-mb-0"},"active"===i?.status&&!re[e.slug]&&(0,r.createElement)("button",{className:"gv-menu-item",onClick:t=>{t.preventDefault(),Q(null),q(e,i.subscriptionId,i.expiresAt,()=>((e,t)=>{(0,h.Mh)({buttonName:"Cancel",buttonAction:"product_cancel",plugin:e});const n=V?.ajaxUrl;n&&t&&fetch(n,{method:"POST",body:new URLSearchParams({action:(0,g.R5)("unsubscribe"),nonce:V.nonce,subscriptionId:t})}).then(e=>e.json()).then(r=>{if(!r.success)return void W({visible:!0,type:"cancel_subscription",pluginSlug:e.slug,message:r?.error||r?.error||r?.data?.message||r?.data?.error||null});const i=r?.data?.data,o=i?.status;return"canceled"===o?((0,h.sx)("Subscription cancelled",{product_slug:e.slug||"",product_name:e.name||"",item_name:e.slug||"",subscription_id:t,timestamp:Date.now()}),void A()):"pending_cancellation"===o?(ie(t=>({...t,[e.slug]:!0})),fetch(n,{method:"POST",body:new URLSearchParams({action:(0,g.R5)("save_pending_cancellation"),nonce:V.nonce,slug:e.slug,subscriptionId:t})}),void fe(e.slug,t)):void W({visible:!0,type:"cancel_subscription",pluginSlug:e.slug,message:r?.error||r?.data?.message||r?.data?.error||null})}).catch(t=>{console.error("[Marketplace] Unsubscribe error",t),W({visible:!0,type:"cancel_subscription",pluginSlug:e.slug,message:t.message||null})})})(e,i.subscriptionId))}},(0,r.createElement)("gv-icon",{"aria-hidden":"true",src:`${de}free_cancellation.svg`}),(0,r.createElement)("span",null,x?.cancel||"Cancel")))))))))}))))),(0,r.createElement)(c.A,null),(0,r.createElement)(l.A,null),Y&&!F&&(()=>{const e=(t=Y)&&"seo-by-rank-math"===t.slug?a.A:s.A;var t;return(0,r.createElement)(e,{plugin:Y,onClose:()=>Z(null),loading:T})})())}},3804:(e,t,n)=>{"use strict";n(4915),Object.create(null)},4469:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var r=n(1609),i=n(7979),o=n(7008),s=n(3220);function a({plugin:e}){const{assetsBaseUrl:t,noticeState:n,setNoticeState:a,handlePluginAction:c,cancelReload:l,uiI18n:u}=(0,i.D)();if(!n||!n.visible||n.pluginSlug!==e?.slug)return null;const p=t||void 0!==window.marketplaceConfig&&window.marketplaceConfig?.assetsBaseUrl||"",d=p?`${p}assets/`:"",h="installed"===n.type,f="activated"===n.type,g=(e,t)=>e?e.replace("{0}",t||""):"",m=e?.name||"";return(0,r.createElement)("div",{className:"gv-notice gv-notice-success gv-p-lg gv-max-mob-pt-lg gv-mb-0 gv-mt-lg",style:{gridColumn:"1 / -1",width:"100%"}},(0,r.createElement)("img",{className:"gv-notice-icon",src:`${d}icons/success.svg`,alt:"Success"}),(0,r.createElement)("div",{className:"gv-notice-content"},(0,r.createElement)("div",{className:"gv-notice-title"},h&&g(u?.notifications?.pluginInstalled||"Plugin was installed.",m),f&&g(u?.notifications?.pluginActivated||"Plugin was activated.",m)),(0,r.createElement)("p",{className:"gv-text-sm"},h&&(u?.notifications?.activateNow||"Activate it now to start using it."),f&&g(u?.notifications?.manageInMyProducts||"{0} plugin was activated for this site. You can manage it on the My products page.",m))),h&&(0,r.createElement)("button",{type:"button",className:"gv-action gv-button gv-button-neutral",onClick:()=>{c("activate",e,"product_detail")}},u?.activatePluginButton),f&&(0,r.createElement)("button",{type:"button",className:"gv-action gv-button gv-button-neutral",onClick:()=>{(0,o.Mh)({buttonName:"Get started",buttonAction:"manage_product",plugin:e,context:{product_slug:e.slug,product_name:e.name,has_redirect_url:!(!e.redirectUrl||""===e.redirectUrl.trim()),has_onboarding_url:!(!e.onboardingUrl||""===e.onboardingUrl.trim())}}),l();const t=(0,s.v)(e,!0);(0,s.J)(t)}},(0,r.createElement)("span",null,u?.featuredCta||"Get Started"),(0,r.createElement)("gv-icon",{"aria-hidden":"true",src:`${d}icons/arrow_forward.svg`})),(0,r.createElement)("button",{type:"button",className:"gv-notice-close","aria-label":u?.labels?.close||"Close",onClick:()=>{a({visible:!1,type:null,pluginSlug:null}),sessionStorage.removeItem("mp_success_notice")}},(0,r.createElement)("gv-icon",{"aria-hidden":"true",src:`${d}icons/close.svg`})))}},4598:(e,t,n)=>{"use strict";n.d(t,{A:()=>h});var r=n(1609),i=n(5795),o=n(1338),s=n(4469),a=n(4677),c=n(4694),l=n(6409),u=n(7979),p=n(488),d=n(3331);function h({plugin:e,onClose:t,usePortal:n=!0,loading:h=!1}){const{assetsBaseUrl:f,useWPHandlers:g,pluginInAction:m,uiI18n:v,setNoticeState:y,setErrorState:b}=(0,u.D)(),_=f||void 0!==window.marketplaceConfig&&window.marketplaceConfig?.assetsBaseUrl||"",w=_?`${_}assets/icons/`:"",k="undefined"!=typeof window&&window.marketplaceConfig?.brand||"",S=k?` brand-${k.replace(/[^a-zA-Z0-9_-]/g,"")}`:"";if(h){const e=(0,r.createElement)("div",{className:`gv-surface-dim${S}`},(0,r.createElement)("article",{className:"gv-layout-product gv-p-0 gv-product-single gv-w-max-container gv-mx-auto gv-p-fluid"},(0,r.createElement)("nav",{className:"gv-breadcrumbs gv-area-nav gv-flex-col gv-items-start"},(0,r.createElement)("div",{className:"gv-flex gv-items-center gv-gap-xs"},(0,r.createElement)("div",{className:"gv-skeleton",style:{width:"60px"}}))),(0,r.createElement)("header",{className:"gv-product-header gv-area-header"},(0,r.createElement)("div",{className:"gv-content gv-stack-space-sm gv-text-sm"},(0,r.createElement)("div",{className:"gv-skeleton gv-heading-lg gv-mb-sm",style:{marginBottom:"24px"}}),(0,r.createElement)("div",{className:"gv-skeleton"}),(0,r.createElement)("div",{className:"gv-skeleton"}),(0,r.createElement)("div",{className:"gv-skeleton",style:{width:"80%"}})),(0,r.createElement)("div",{className:"gv-image"},(0,r.createElement)("div",{className:"gv-card-image gv-h-full",style:{marginTop:"75px"}},(0,r.createElement)("div",{className:"gv-skeleton gv-radius-0 gv-h-full",style:{minHeight:"300px"}})))),(0,r.createElement)("section",{className:"gv-product-table gv-features-table gv-products-1 gv-area-table"},(0,r.createElement)("div",{className:"gv-table-container"},(0,r.createElement)("div",{className:"gv-table",role:"table"},(0,r.createElement)("div",{className:"gv-table-header",role:"rowgroup"},(0,r.createElement)("div",{className:"gv-table-row",role:"row"},(0,r.createElement)("div",{className:"gv-product gv-p-0 oc-border-none",role:"columnheader"},(0,r.createElement)("div",{className:"gv-content"},(0,r.createElement)("div",{className:"gv-skeleton gv-heading-md gv-mb-sm"}),(0,r.createElement)("div",{className:"gv-skeleton",style:{width:"70%"}})),(0,r.createElement)("div",{className:"gv-bottom"},(0,r.createElement)("div",{className:"gv-price-container"},(0,r.createElement)("div",{className:"gv-skeleton",style:{width:"120px",height:"32px"}})),(0,r.createElement)("div",{className:"gv-skeleton gv-heading-md gv-mt-md"}))))),(0,r.createElement)("div",{className:"gv-section oc-left-border-0",role:"rowgroup"},(0,r.createElement)("div",{className:"gv-section-header gv-table-row",role:"row"},(0,r.createElement)("div",{className:"gv-cell",role:"cell"},(0,r.createElement)("div",{className:"gv-skeleton gv-heading-md",style:{width:"150px"}}))),[...Array(3)].map((e,t)=>(0,r.createElement)("div",{className:"gv-table-row",role:"row",key:t},(0,r.createElement)("div",{className:"gv-cell",role:"cell"},(0,r.createElement)("div",{className:"gv-skeleton gv-text-sm gv-w-full"})))))))),(0,r.createElement)("div",{className:"gv-area-details gv-grid gv-gap-fluid"},(0,r.createElement)("section",{className:"gv-stack-space-md"},(0,r.createElement)("div",{className:"gv-skeleton gv-heading-md gv-mb-md",style:{width:"180px"}}),(0,r.createElement)("ul",{className:"gv-list-items gv-list-check gv-mode-condensed"},[...Array(3)].map((e,t)=>(0,r.createElement)("li",{key:t},(0,r.createElement)("div",{className:"gv-skeleton gv-text-sm"})))))),(0,r.createElement)("div",{className:"gv-area-content gv-grid gv-gap-fluid"},(0,r.createElement)("section",{className:"gv-text-sm gv-stack-space-md"},(0,r.createElement)("div",{className:"gv-skeleton gv-heading-md gv-mb-md",style:{width:"250px"}}),(0,r.createElement)("div",{className:"gv-grid gv-gap-lg gv-tab-grid-cols-2 gv-desk-lg-grid-cols-3"},[...Array(3)].map((e,t)=>(0,r.createElement)("div",{className:"gv-item gv-stack-space-sm",key:t},(0,r.createElement)("div",{className:"gv-skeleton gv-heading-md gv-mb-sm"}),(0,r.createElement)("div",{className:"gv-skeleton gv-text-sm gv-mb-xs"}),(0,r.createElement)("div",{className:"gv-skeleton gv-text-sm"}))))))));return n?(0,i.createPortal)(e,document.body):e}if(!e)return null;(0,r.useEffect)(()=>{window.scrollTo(0,0)},[e]),(0,r.useEffect)(()=>{y(t=>t.visible&&t.pluginSlug===e.slug?t:{visible:!1,type:null,pluginSlug:null}),b(t=>t.visible&&t.pluginSlug===e.slug?t:{visible:!1,type:null,pluginSlug:null})},[e.slug,y,b]),(0,r.useEffect)(()=>{const e=()=>{y({visible:!1,type:null,pluginSlug:null}),b({visible:!1,type:null,pluginSlug:null})};return window.addEventListener("popstate",e),()=>window.removeEventListener("popstate",e)},[y,b]),void 0!==window.onecomWpVars&&window.onecomWpVars,e.thumbnail;const x=e.bannerUrl||e.image||e.thumbnail||"https://gravity.group.one/guide-images/product-image@2x.png",C=e.name||"Product",E=e.i18n?.description||e.i18n?.subtitle||e.description||e.shortDescription||v?.labels?.noDescription||"No description available.",I=e.i18n?.subtitle,N="free"===e.licenseType,O=e.i18n?.freeTrialText||"",A=O&&""!==O.trim(),R=e.i18n?.freeTrialPeriod||"",M=R&&""!==R.trim(),T=M||A?v?.headings?.freeTrial||"Free trial*":(0,p.M)(e,v?.labels?.free||"Free",v,!0),P=T===(v?.labels?.freeUntilRenewal||"Free until renewal"),L=(0,p.Tc)(e,!0),D=(0,p.Dn)(e,!0),F=(0,p.uA)(e),U="premium"===e.licenseType&&L&&null!==D&&F>0&&!M&&!A,j=(e,t)=>{if(!e||"object"!=typeof e)return[];const n=[];let r=1;for(;e[`${t}${r}`];){const i=e[`${t}${r}`];i&&""!==i.trim()&&n.push(i),r++}return n},B=j(e.i18n,"keyBenefitContent"),$=j(e.i18n,"keyFeatureContent"),z=[];if(e.i18n&&"object"==typeof e.i18n){let t=1;for(;e.i18n[`coreFeatureTitle${t}`]||e.i18n[`coreFeatureContent${t}`];){const n=e.i18n[`coreFeatureTitle${t}`],r=e.i18n[`coreFeatureContent${t}`];n&&""!==n.trim()&&r&&""!==r.trim()&&z.push({name:n,desc:r}),t++}}const q=$,V=B,W=z,H=(0,r.createElement)("div",{className:S},(0,r.createElement)("article",{className:"gv-layout-product gv-p-0 gv-product-single gv-w-max-container gv-mx-auto gv-p-fluid"},(0,r.createElement)(c.A,{iconBase:w,label:v.backButton,onClose:t,disabled:m[e.slug],className:"gv-flex-col gv-items-start"},(0,r.createElement)(s.A,{plugin:e}),(0,r.createElement)(a.A,{plugin:e}),(0,r.createElement)(l.A,{plugin:e})),(0,r.createElement)("header",{className:"gv-product-header gv-area-header"},(0,r.createElement)("div",{className:"gv-content gv-stack-space-md gv-text-sm"},(0,r.createElement)("h3",{className:"gv-title gv-header-lg"},C),(0,r.createElement)("p",{className:"gv-text-sm"},E)),(0,r.createElement)("div",{className:"gv-image"},(0,r.createElement)("picture",null,(0,r.createElement)("source",{media:"(min-width: 600px)",srcSet:`${x} 1x, ${x} 2x`}),(0,r.createElement)("img",{src:x,srcSet:`${x} 1x, ${x} 2x`,alt:`${C} image`})))),(0,r.createElement)("section",{className:"gv-product-table gv-features-table gv-products-1 gv-area-table"},(0,r.createElement)("div",{className:"gv-table-container"},(0,r.createElement)("div",{className:"gv-table",role:"table"},(0,r.createElement)("div",{className:"gv-table-header",role:"rowgroup"},(0,r.createElement)("div",{className:"gv-table-row",role:"row"},(0,r.createElement)("div",{className:"gv-product gv-p-0 oc-border-none",role:"columnheader"},(0,r.createElement)("div",{className:"gv-content"},(0,r.createElement)("h3",{className:"gv-title"},C),(0,r.createElement)("p",null,I)),(0,r.createElement)("div",{className:"gv-bottom"},(0,r.createElement)("div",{className:"gv-price-container"},U&&(0,r.createElement)("div",{className:"gv-price-with-badge single-page-sale"},(0,r.createElement)("span",{className:"gv-price-old"},(0,r.createElement)(d.j6,{htmlString:L})),(0,r.createElement)("div",{className:"gv-badge gv-badge-discount"},v?.labels?.save||"Save"," ",F,"%")),(0,r.createElement)("div",{className:"gv-price"},M||A?(0,r.createElement)("span",{className:"gv-price-text"},T):(0,r.createElement)(r.Fragment,null,(0,r.createElement)("span",{className:"gv-price-text"},(0,r.createElement)(d.j6,{htmlString:"premium"===e.licenseType&&null!==D?null!==D?D:L:T})),!N&&!P&&T&&(0,r.createElement)("span",{className:"gv-period gv-max-mob-p-0"},"/ ",v?.labels?.timeMonth))),M||A?(0,r.createElement)("div",{className:"gv-price-info"},(0,r.createElement)("div",{className:"gv-info"},O)):!N&&T&&L&&null!==D&&(0,r.createElement)("div",{className:"gv-price-info"},(0,r.createElement)("div",{className:"gv-info"},v.labels.untilRenewal," [",(0,r.createElement)(d.j6,{htmlString:D}),"]/",v?.labels?.timeMonth),(0,r.createElement)("div",{className:"gv-info"},v.labels.afterThat," [",(0,r.createElement)(d.j6,{htmlString:L}),"]/",v?.labels?.timeMonth))),g?(0,r.createElement)(o.A,{plugin:e}):e.download&&(0,r.createElement)("a",{href:e.download,download:!0,className:"gv-button gv-button-secondary"},"Download"))))),q.length>0&&(0,r.createElement)("div",{className:"gv-section oc-left-border-0",role:"rowgroup"},(0,r.createElement)("div",{className:"gv-section-header gv-table-row",role:"row"},(0,r.createElement)("div",{className:"gv-cell",role:"cell"},(0,r.createElement)("h4",{className:"gv-title"},v?.headings?.key_features||e.i18n?.keyFeatureHeading||"Key features"))),q.map((e,t)=>(0,r.createElement)("div",{className:"gv-table-row",role:"row",key:t},(0,r.createElement)("div",{className:"gv-cell",role:"cell"},(0,r.createElement)("span",{className:"gv-cell-text"},e)))))))),(0,r.createElement)("div",{className:"gv-area-details gv-grid gv-gap-fluid"},V.length>0&&(0,r.createElement)("section",{className:"gv-stack-space-md"},(0,r.createElement)("h2",{className:"gv-title gv-text-bold gv-text-lg"},v?.headings?.benefit||e.i18n?.benefitHeading||"Key benefits"),(0,r.createElement)("ul",{className:"gv-list-items gv-list-check gv-mode-condensed"},V.map((e,t)=>(0,r.createElement)("li",{key:t},e))))),W.length>0&&(0,r.createElement)("div",{className:"gv-area-content gv-grid gv-gap-fluid"},(0,r.createElement)("section",{className:"gv-text-sm gv-stack-space-md"},(0,r.createElement)("h2",{className:"gv-title gv-text-bold gv-text-lg"},v?.headings?.feature_overview||e.i18n?.featureOverviewHeading||"Core features overview"),(0,r.createElement)("div",{className:"gv-grid gv-gap-lg gv-tab-grid-cols-2 gv-desk-lg-grid-cols-3"},W.map((e,t)=>(0,r.createElement)("div",{className:"gv-item gv-stack-space-sm",key:t},(0,r.createElement)("h3",{className:"gv-title gv-text-bold gv-text-lg"},e.name),(0,r.createElement)("p",{className:"gv-text-sm"},e.desc))))))));return n?(0,i.createPortal)(H,document.body):H}},4601:(e,t,n)=>{"use strict";n.d(t,{D:()=>o});var r=n(7008),i=n(3331);const o=async({plugin:e,apiBaseUrl:t,useWPHandlers:n,wpConfig:o,source:s,uiI18n:a,setLoadingAction:c,setLoadingPlugin:l,setPluginInAction:u,setSuccessState:p,setErrorState:d,reloadTimeoutRef:h})=>{const f="activate";let g=`${t}${f}/${e.slug}`;const m=`download_url=${encodeURIComponent(e.download||"")}`;g=n?`${o.ajaxUrl}?action=${(0,i.R5)(`${f}_plugin`)}&_wpnonce=${o.nonce}&nonce=${o.nonce}&slug=${e.slug}&${m}`:g+(g.includes("?")?"&":"?")+m,setTimeout(async()=>{try{await fetch(g,{method:"POST"})}catch(e){}let n=0;const i=async()=>{try{const n=`${t}active/${e.slug}`,i=await fetch(n),o=await i.json();if(o&&o.activated)return(0,r.Mh)({buttonName:"Activate",buttonAction:"product_activate",plugin:e,context:{action:f,result:"success",special_case:"imagify_redirect"}}),void("product_detail"===s?(sessionStorage.setItem("mp_skip_page_view","true"),sessionStorage.setItem("mp_success_notice",JSON.stringify({visible:!0,type:"activated",pluginSlug:e.slug,successType:"activate"})),h.current=setTimeout(()=>{window.location.reload()},500)):(p({visible:!0,type:"activate",pluginSlug:e.slug}),h.current=setTimeout(()=>{sessionStorage.setItem("mp_skip_page_view","true"),window.location.reload()},3e3),c(""),l("")))}catch(e){console.error("Error checking activation status",e)}n++,n<6?setTimeout(i,1e3):(d({visible:!0,type:"activate",pluginSlug:e.slug}),(0,r.Mh)({buttonName:"Activate",buttonAction:"product_activate",plugin:e,context:{action:f,result:"error",error_message:"Imagify activation timeout after polling"}}),c(""),l(""),u(t=>({...t,[e.slug]:!1})))};setTimeout(i,1e3)},100)}},4677:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=n(1609),i=n(7979);function o({plugin:e}){const{assetsBaseUrl:t,errorState:n,setErrorState:o,uiI18n:s,plugins:a}=(0,i.D)(),c=e||a.find(e=>e.slug===n.pluginSlug),l=n&&n.visible&&n.pluginSlug===c?.slug;if((0,r.useEffect)(()=>{if(l){const e=setTimeout(()=>{d()},5e3);return()=>clearTimeout(e)}},[l]),!l)return null;const u=t||void 0!==window.marketplaceConfig&&window.marketplaceConfig?.assetsBaseUrl||"",p=u?`${u}assets/`:"",d=()=>{o({visible:!1,type:null,pluginSlug:null,message:null})},h="activate"===n.type,f="deactivate"===n.type,g="install"===n.type,m="delete"===n.type,v="buy_now"===n.type,y="cancel_subscription"===n.type,b=(e,t)=>e?e.replace("{0}",t||""):"",_=c?.name||"",w="string"==typeof n.message&&n.message.includes("_")&&!/\s/.test(n.message),k=s?.notifications?.somethingWentWrong||"Something went wrong; please try again.",S=n.message&&!w?n.message:w?k:null;return(0,r.createElement)("div",{className:"gv-toast-container"},(0,r.createElement)("div",{className:"gv-toast gv-toast-alert gv-visible"},(0,r.createElement)("gv-icon",{className:"gv-notice-icon","aria-hidden":"true",src:`${p}icons/error.svg`}),(0,r.createElement)("div",{className:"gv-toast-content"},S||(0,r.createElement)(r.Fragment,null,h&&b(s?.notifications?.pluginActivationFailed||"Couldn't activate plugin.",_),f&&b(s?.notifications?.pluginDeactivationFailed||"Couldn't deactivate plugin.",_),g&&b(s?.notifications?.pluginInstallationFailed||"Couldn't install plugin.",_),m&&b(s?.notifications?.pluginDeletionFailed||"Couldn't delete plugin.",_),v&&(s?.notifications?.procurementFailed||"Couldn't complete the purchase. Please try again."),y&&(s?.notifications?.cancelSubscriptionFailed||"Couldn't cancel the subscription. Please try again later."))),(0,r.createElement)("button",{type:"button",className:"gv-toast-close","aria-label":s?.labels?.close||"Close",onClick:d},(0,r.createElement)("gv-icon",{"aria-hidden":"true",src:`${p}icons/close.svg`}))))}},4694:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=n(1609),i=n(7979);const o=({iconBase:e,label:t,onClose:n,className:o="",disabled:s=!1,children:a})=>{const{uiI18n:c}=(0,i.D)();return(0,r.createElement)("nav",{className:`gv-breadcrumbs gv-area-nav ${o}`},(0,r.createElement)("a",{href:"#",onClick:e=>{if(e.preventDefault(),!s)if("undefined"!=typeof window&&window.history&&window.history.length>1)try{window.history.back()}catch(e){n&&n()}else n&&n()},className:"gv-flex gv-items-center gv-gap-xs",role:"button","aria-label":c?.labels?.goBack||"Go back",style:{opacity:s?.5:1,pointerEvents:s?"none":"auto",cursor:s?"not-allowed":"pointer"},"aria-disabled":s?"true":"false"},(0,r.createElement)("img",{style:{minWidth:"24px"},className:"gv-tile",src:`${e}arrow_back.svg`,alt:"Back"}),(0,r.createElement)("span",null,t)),a)}},4800:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=n(1609),i=n(7979);function o({plugin:e}){const{assetsBaseUrl:t,successState:n,setSuccessState:o,uiI18n:s,plugins:a}=(0,i.D)(),c=e||a.find(e=>e.slug===n.pluginSlug),l=n&&n.visible&&n.pluginSlug===c?.slug;if((0,r.useEffect)(()=>{if(l){const e=setTimeout(()=>{d()},5e3);return()=>clearTimeout(e)}},[l]),!l)return null;const u=t||void 0!==window.marketplaceConfig&&window.marketplaceConfig?.assetsBaseUrl||"",p=u?`${u}assets/`:"",d=()=>{o({visible:!1,type:null,pluginSlug:null})},h="install"===n.type,f="activate"===n.type,g="deactivate"===n.type,m="delete"===n.type,v=(e,t)=>e?e.replace("{0}",t||""):"",y=c?.name||"";return(0,r.createElement)("div",{className:"gv-toast-container"},(0,r.createElement)("div",{className:"gv-toast gv-toast-success gv-visible"},(0,r.createElement)("gv-icon",{className:"gv-notice-icon","aria-hidden":"true",src:`${p}icons/check_circle.svg`}),(0,r.createElement)("div",{className:"gv-toast-content"},h&&v(s?.notifications?.pluginInstalled||"Plugin installed successfully.",y),f&&v(s?.notifications?.pluginActivatedShort||"Plugin activated.",y),g&&v(s?.notifications?.pluginDeactivated||"Plugin deactivated.",y),m&&v(s?.notifications?.pluginDeleted||"Plugin deleted successfully.",y)),(0,r.createElement)("button",{type:"button",className:"gv-toast-close","aria-label":s?.labels?.close||"Close",onClick:d},(0,r.createElement)("gv-icon",{"aria-hidden":"true",src:`${p}icons/close.svg`}))))}},4811:e=>{"use strict";e.exports=JSON.parse('{"ui.button.refreshPage":"Actualiser la page","ui.notifications.couldNotLoad":"Impossible de charger la page","ui.notifications.refreshPage":"Veuillez rafraîchir la page et contact notre support si le problème persiste."}')},4814:(e,t,n)=>{"use strict";n(1609),n(3804),n(9454),n(7565)},4915:e=>{e.exports={area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0}},5036:(e,t,n)=>{"use strict";var r=n(2635),i=n(8291),o=n(7823),s=n(8491),a=n(5205),c=n(3591),l=n(3461),u=n(4811),p=n(7529),d=n(1199),h=n(333);const f={en_GB:{translation:o},da_DK:{translation:s},de_DE:{translation:a},es_ES:{translation:c},fi_FI:{translation:l},fr_FR:{translation:u},it_IT:{translation:p},nl_NL:{translation:d},no_NO:{translation:h},nb_NO:{translation:h},pt_PT:{translation:n(5383)},sv_SE:{translation:n(8300)},fi:{translation:l}};r.default.use(i.r9).init({resources:f,lng:"en_GB",fallbackLng:"en_GB",interpolation:{escapeValue:!1}})},5205:e=>{"use strict";e.exports=JSON.parse('{"ui.button.refreshPage":"Seite aktualisieren","ui.notifications.couldNotLoad":"Die Seite konnte nicht geladen werden","ui.notifications.refreshPage":"Bitte aktualisieren Sie die Seite und Kontakt Sie unser Support, falls das Problem weiterhin besteht."}')},5383:e=>{"use strict";e.exports=JSON.parse('{"ui.button.refreshPage":"Atualizar página","ui.notifications.couldNotLoad":"Não foi possível carregar a página","ui.notifications.refreshPage":"Atualize a página e contacte a nossa equipa de suporte se o problema persistir."}')},5404:(e,t,n)=>{"use strict";n.d(t,{A:()=>c});var r=n(1609),i=n(5795),o=n(488),s=n(7008),a=n(3331);function c({isOpen:e,plugin:t,uiI18n:n,assetsBaseUrl:c,onClose:l,onPurchase:u}){const p=c||"",d=p?`${p}assets/icons/`:"";if((0,r.useEffect)(()=>{const t=e=>{"Escape"===e.key&&l()};return e&&(window.addEventListener("keydown",t),document.body.style.overflow="hidden"),()=>{window.removeEventListener("keydown",t),document.body.style.overflow=""}},[e,l]),!e||!t)return null;const h=t.name||"Product",f=t.i18n?.subtitle||t.i18n?.description||t.description||"",g=t.bannerUrl||t.image||t.thumbnail||"",m=(0,o.M)(t,n?.labels?.free||"Free",n,!0),v=(0,o.Tc)(t,!0),y=(0,o.Dn)(t,!0),b=t.i18n?.freeTrialPeriod&&""!==t.i18n.freeTrialPeriod.trim(),_=t.i18n?.freeTrialText||"",w="undefined"!=typeof window&&window.marketplaceConfig?.brand||"",k=w?`brand-${w.replace(/[^a-zA-Z0-9_-]/g,"")}`:"",S=(0,r.createElement)("div",{className:k},(0,r.createElement)("div",{className:"gv-activated"},(0,r.createElement)("div",{className:"gv-modal gv-upgrade-modal",onClick:e=>{e.target.classList.contains("gv-modal")&&l()}},(0,r.createElement)("div",{className:"gv-modal-content",role:"dialog","aria-labelledby":"id-purchase-modal-title","aria-modal":"true",onClick:e=>e.stopPropagation()},(0,r.createElement)("button",{type:"button",className:"gv-modal-close","aria-label":n?.labels?.close||"Close",onClick:l},(0,r.createElement)("gv-icon",{"aria-hidden":"true",src:`${d}close.svg`})),(0,r.createElement)("div",{className:"gv-modal-body"},(0,r.createElement)("h5",{id:"id-purchase-modal-title"},n?.labels?.purchaseModalTitle||"Get superior website speed"),f&&(0,r.createElement)("p",{className:"gv-product-intro"},f),(0,r.createElement)("div",{className:"gv-product-price"},v&&null!==y&&(0,r.createElement)("div",{className:"gv-price-discount"},(0,r.createElement)("span",{className:"gv-price-old"},(0,r.createElement)(a.j6,{htmlString:v}),"/",n?.labels?.timeMonth)),(0,r.createElement)("div",{className:"gv-price-current"},(0,r.createElement)("span",{className:"gv-price"},b?n?.headings?.freeTrial||"Free trial*":(0,r.createElement)(a.j6,{htmlString:m})),!b&&m&&m!==(n?.labels?.free||"Free")&&m!==(n?.labels?.freeUntilRenewal||"Free until renewal")&&(0,r.createElement)("span",{className:"gv-price-period"},"/",n?.labels?.timeMonth||"mo"))),b&&_&&(0,r.createElement)("div",{className:"gv-product-more-info"},(0,r.createElement)("p",null,_)),(0,r.createElement)("div",{className:"gv-notice gv-notice-info"},(0,r.createElement)("gv-icon",{className:"gv-notice-icon",style:{flexShrink:0},"aria-hidden":"true",src:`${d}info.svg`}),(0,r.createElement)("p",{className:"gv-notice-content"},n?.labels?.purchaseMessage||"Payment will be processed using your saved RankMath method.")),(0,r.createElement)("p",{className:"gv-caption-lg"})),(0,r.createElement)("div",{className:"gv-button-group"},(0,r.createElement)("button",{type:"button",className:"gv-button gv-button-cancel",onClick:()=>{(0,s.Mh)({buttonName:"Cancel",buttonAction:"product_buy_cancel",plugin:t,context:{action:"Cancel"}}),l()}},n?.cancel||"Close"),(0,r.createElement)("button",{type:"button",className:"gv-button gv-button-primary",onClick:u},n?.labels?.buyNowButton||"Buy Now")),g&&(0,r.createElement)("div",{className:"gv-modal-image"},(0,r.createElement)("img",{src:g,alt:`${h}`}))))));return(0,i.createPortal)(S,document.body)}},5694:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=n(1609),i=n(7979);function o({message:e,buttonLabel:t,onRetry:n}){const{assetsBaseUrl:o}=(0,i.D)(),s=e||"We're making some improvements. Please try again in a few minutes.",a=t||"Retry",c=o||void 0!==window.marketplaceConfig&&window.marketplaceConfig?.assetsBaseUrl||"",l=c?`${c}assets/icons/`:"";return(0,r.createElement)("div",{className:"marketplace-container gv-flex gv-flex-col gv-flex-wrap gv-gap-lg gv-items-center gv-surface-bright gv-justify-center gv-p-fluid"},(0,r.createElement)("div",{className:"gv-text-center"},(0,r.createElement)("p",{className:"gv-text-md gv-mb-lg gv-text-bold"},s),(0,r.createElement)("button",{type:"button",className:"gv-button gv-button-primary gv-mode-condensed",onClick:n},(0,r.createElement)("gv-icon",{"aria-hidden":"true",src:`${l}refresh.svg`}),(0,r.createElement)("span",null,a))))}},5696:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var r=n(1609),i=n(7979),o=n(8299);const s=()=>{const{cancelSubsModalState:e,closeCancelSubsModal:t,assetsBaseUrl:n,uiI18n:s}=(0,i.D)(),{isOpen:a,plugin:c,expiresAt:l,onConfirm:u}=e,p=n||void 0!==window.marketplaceConfig&&window.marketplaceConfig?.assetsBaseUrl||"",d=p?`${p}assets/icons/`:"",h=s?.labels||{};if((0,r.useEffect)(()=>{const e=e=>{"Escape"===e.key&&t()};return a&&(window.addEventListener("keydown",e),document.body.style.overflow="hidden"),()=>{window.removeEventListener("keydown",e),document.body.style.overflow=""}},[a,t]),!a||!c)return null;const f=c.name,g=(0,o.Y)(l);return(0,r.createElement)("div",{className:"gv-modal",onClick:e=>{e.target.classList.contains("gv-modal")&&t()}},(0,r.createElement)("div",{className:"gv-modal-content",role:"dialog","aria-labelledby":"id-cancel-subs-modal-title","aria-modal":"true",onClick:e=>e.stopPropagation()},(0,r.createElement)("button",{type:"button",className:"gv-modal-close","aria-label":s?.labels?.close||"Close",onClick:t},(0,r.createElement)("gv-icon",{"aria-hidden":"true",src:`${d}close.svg`})),(0,r.createElement)("div",{className:"gv-modal-body"},(0,r.createElement)("h2",{id:"id-cancel-subs-modal-title",className:"gv-modal-title"},h?.cancelSubscriptionTitle?h.cancelSubscriptionTitle.replace("{0}",f):`Cancel ${f} subscription?`),g&&(0,r.createElement)("p",null,h?.cancelSubscriptionBody?h.cancelSubscriptionBody.replace("{0}",g):(0,r.createElement)(r.Fragment,null,"By cancelling, you will lose access to premium features after your current period ends on ",(0,r.createElement)("span",{className:"gv-text-bold gv-white-space-nowrap"},g),".")),(0,r.createElement)("div",{className:"gv-notice gv-notice-info gv-mt-md"},(0,r.createElement)("gv-icon",{className:"gv-notice-icon","aria-hidden":"true",src:`${d}error.svg`}),(0,r.createElement)("p",{className:"gv-notice-content"},h?.cancelSubscriptionIrreversible?(0,r.createElement)("strong",null,h.cancelSubscriptionIrreversible):(0,r.createElement)(r.Fragment,null,(0,r.createElement)("strong",null,"Cannot be reactivated"),". Returning later means a new subscription at current price — license and settings won't carry over."))),(0,r.createElement)("p",null,h?.cancelSubscriptionInfo||"After the cancellation, you can continue using the plugin until the expiration date. No further charges will be applied.")),(0,r.createElement)("div",{className:"gv-button-group"},(0,r.createElement)("button",{type:"button",className:"gv-button gv-button-cancel",onClick:()=>{"function"==typeof u&&u(),t()}},h?.cancelSubscriptionConfirm||"Confirm cancellation"),(0,r.createElement)("button",{type:"button",className:"gv-button gv-button-primary",onClick:t},h?.cancelSubscriptionKeep||"Keep subscription"))))}},5795:e=>{"use strict";e.exports=window.ReactDOM},5924:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var r=n(1609),i=(n(5795),n(3331)),o=n(7979);const s=()=>{const{deleteModalState:e,closeDeleteModal:t,handlePluginAction:n,assetsBaseUrl:s,uiI18n:a}=(0,o.D)(),{isOpen:c,plugin:l}=e,u=s||void 0!==window.marketplaceConfig&&window.marketplaceConfig?.assetsBaseUrl||"",p=u?`${u}assets/icons/`:"";if((0,r.useEffect)(()=>{const e=e=>{"Escape"===e.key&&t()};return c&&(window.addEventListener("keydown",e),document.body.style.overflow="hidden"),()=>{window.removeEventListener("keydown",e),document.body.style.overflow=""}},[c,t]),!c||!l)return null;const d="premium"===l.licenseType,h=l.name,f="undefined"!=typeof window&&window.marketplaceConfig?.brand||"";return(0,r.createElement)("div",{className:"gv-modal",onClick:e=>{e.target.classList.contains("gv-modal")&&t()}},(0,r.createElement)("div",{className:"gv-modal-content",role:"dialog","aria-labelledby":"id-modal-title","aria-modal":"true",onClick:e=>e.stopPropagation()},(0,r.createElement)("button",{type:"button",className:"gv-modal-close","aria-label":a?.labels?.close||"Close",onClick:t},(0,r.createElement)("gv-icon",{"aria-hidden":"true",src:`${p}close.svg`})),(0,r.createElement)("div",{className:"gv-modal-body"},(0,r.createElement)("h2",{id:"id-modal-title",className:"gv-modal-title"},(0,i.hw)(a?.deletePlugin,"{0}",h),"?"),(0,r.createElement)("p",null,(0,i.hw)(a?.notifications?.deleteModalConfirm,"{0}",h)),d&&"onecom"===f&&(0,r.createElement)("div",{className:"gv-notice gv-notice-info"},(0,r.createElement)("gv-icon",{class:"gv-notice-icon","aria-hidden":"true",src:`${p}/info.svg`}),(0,r.createElement)("p",{className:"gv-notice-content"},(0,r.createElement)(i.j6,{htmlString:(0,i.lb)((0,i.hw)(a?.notifications?.deleteModalInfo,"{0}",h),'',"")})))),(0,r.createElement)("div",{className:"gv-button-group"},(0,r.createElement)("button",{type:"button",className:"gv-button gv-button-cancel",onClick:t},a?.cancel),(0,r.createElement)("button",{type:"button",className:"gv-button gv-button-destructive",onClick:()=>{n("delete",l,"addons"),t()}},a?.deleteButton))))}},6255:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var r=n(1609),i=n(3699),o=n(9599),s=n(7979);const a=({apiBaseUrl:e,useWPHandlers:t,wpConfig:n,enableDefaultStyles:a,assetsBaseUrl:c})=>(0,r.createElement)(s.t,{apiBaseUrl:e,useWPHandlers:t,wpConfig:n,enableDefaultStyles:a,assetsBaseUrl:c},(0,r.createElement)(o.A,null,(0,r.createElement)(i.A,null)))},6409:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=n(1609),i=n(7979);const o=({plugin:e})=>{const{wpConfig:t,assetsBaseUrl:n}=(0,i.D)(),o=n||"undefined"!=typeof window&&window.marketplaceConfig?.assetsBaseUrl||"",s=o?`${o}assets/`:"",a=e?.announcement||null,c=e?.productId||null,l=!!a&&(!a?.expiresAt||new Date(a.expiresAt)>new Date),[u,p]=(0,r.useState)(()=>{if(!c)return!1;const e="undefined"!=typeof window&&window.marketplaceConfig?.dismissedBanners||[];return Array.isArray(e)&&e.includes(c)}),[d,h]=(0,r.useState)(!1);return!c||!l||u||e?.installed?null:(0,r.createElement)("div",{className:"gv-notice gv-notice-upgrade gv-w-full mp-announcement-banner",role:"region","aria-label":`Release announcement: ${a.title}`,style:{gap:"var(--size-sm)",alignItems:"flex-start"}},(0,r.createElement)("style",null,"\n .mp-announcement-banner { padding: var(--size-md) !important; padding-bottom: 10px !important; }\n .mp-announcement-banner .gv-notice-close { padding: var(--size-xs) !important; }\n .mp-announcement-banner .banner-cta { height: 32px !important; font-size: 13px !important; }\n .mp-announcement-banner .gv-acc-content p { white-space: pre-line; }\n @media (max-width: 599px) {\n .mp-announcement-banner { padding: var(--size-lg) !important; }\n .mp-announcement-banner .gv-notice-close { padding: var(--size-sm) !important; }\n }\n "),(0,r.createElement)("gv-icon",{className:"gv-notice-icon","aria-hidden":"true",src:`${s}icons/campaign.svg`,style:{flexShrink:0}}),(0,r.createElement)("div",{className:"gv-notice-content gv-accordion"},(0,r.createElement)("div",{className:"gv-acc-header"},(0,r.createElement)("button",{type:"button",className:"gv-acc-trigger"+(d?" gv-expanded":""),onClick:()=>h(e=>!e),"aria-expanded":d,style:{padding:"var(--size-sm) 0 var(--size-sm) 0"}},(0,r.createElement)("span",{className:"gv-acc-title",style:{fontSize:"13px"}},a.title))),d&&(0,r.createElement)("div",{className:"gv-acc-content gv-pb-0 gv-mb-sm"},(0,r.createElement)("p",null,a.body),(0,r.createElement)("a",{href:a.ctaUrl,target:"_blank",rel:"noopener noreferrer",className:"gv-button gv-button-neutral gv-button-sm gv-mt-md banner-cta",style:{height:"var(--form-element-height)"}},a.ctaLabel,(0,r.createElement)("gv-icon",{"aria-hidden":"true",src:`${s}icons/open_in_new.svg`})))),(0,r.createElement)("button",{type:"button",className:"gv-notice-close",onClick:()=>{if(p(!0),"undefined"!=typeof window&&window.marketplaceConfig){const e=window.marketplaceConfig.dismissedBanners||[];e.includes(c)||(window.marketplaceConfig.dismissedBanners=[...e,c])}try{const e=t?.ajaxUrl||window?.marketplaceConfig?.wpConfig?.ajaxUrl,n=t?.nonce||window?.marketplaceConfig?.wpConfig?.nonce,r=t?.ajaxActionPrefix||window?.marketplaceConfig?.wpConfig?.ajaxActionPrefix||"marketplace";if(e){const t=new URLSearchParams({action:`${r}_dismiss_banner`,nonce:n,banner_slug:c});fetch(e,{method:"POST",body:t}).catch(()=>{})}}catch{}},"aria-label":"Dismiss release announcement"},(0,r.createElement)("gv-icon",{"aria-hidden":"true",src:`${s}icons/close.svg`,style:{width:"var(--size-icon-sm)",height:"var(--size-icon-sm)"}})))}},6530:()=>{var e=Object.defineProperty,t=(t,n,r)=>(((t,n,r)=>{n in t?e(t,n,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[n]=r})(t,"symbol"!=typeof n?n+"":n,r),r);const n={};async function r(e){if(n.hasOwnProperty(e))return n[e];let t;return t=e.startsWith("data:")||!("caches"in self)?fetch(e).then(e=>e.text()):caches.open("gravity").then(async t=>{let n=await t.match(e);return n||(n=await fetch(e),n.ok&&await t.put(e,n.clone())),n.text()}),n[e]=t,t}class i extends HTMLElement{static get observedAttributes(){return["src"]}fetchFlag(e){e&&r(e).then(e=>this.innerHTML=e)}connectedCallback(){this.fetchFlag(this.getAttribute("src"))}attributeChangedCallback(e,t,n){"src"===e&&t!==n&&this.fetchFlag(n)}}t(i,"TAG_NAME","gv-flag");class o extends HTMLElement{static get observedAttributes(){return["src"]}fetchIcon(e){e&&r(e).then(e=>this.innerHTML=e)}connectedCallback(){this.fetchIcon(this.getAttribute("src"))}attributeChangedCallback(e,t,n){"src"===e&&t!==n&&this.fetchIcon(n)}}t(o,"TAG_NAME","gv-icon");class s extends HTMLElement{static get observedAttributes(){return["src"]}fetchIllustration(e){e&&r(e).then(e=>this.innerHTML=e)}connectedCallback(){this.fetchIllustration(this.getAttribute("src"))}attributeChangedCallback(e,t,n){"src"===e&&t!==n&&this.fetchIllustration(n)}}t(s,"TAG_NAME","gv-illustration");class a extends HTMLElement{static get observedAttributes(){return["src"]}fetchIndicator(e){e&&r(e).then(e=>this.innerHTML=e)}connectedCallback(){this.fetchIndicator(this.getAttribute("src"))}attributeChangedCallback(e,t,n){"src"===e&&t!==n&&this.fetchIndicator(n)}}t(a,"TAG_NAME","gv-indicator");class c extends HTMLElement{static get observedAttributes(){return["src"]}fetchLoader(e){e&&r(e).then(e=>this.innerHTML=e)}connectedCallback(){this.fetchLoader(this.getAttribute("src"))}attributeChangedCallback(e,t,n){"src"===e&&t!==n&&this.fetchLoader(n)}}t(c,"TAG_NAME","gv-loader");class l extends HTMLElement{static get observedAttributes(){return["src"]}fetchLogo(e){e&&r(e).then(e=>this.innerHTML=e)}connectedCallback(){this.fetchLogo(this.getAttribute("src"))}attributeChangedCallback(e,t,n){"src"===e&&t!==n&&this.fetchLogo(n)}}t(l,"TAG_NAME","gv-logo");class u extends HTMLElement{static get observedAttributes(){return["src"]}fetchPayIcon(e){e&&r(e).then(e=>this.innerHTML=e)}connectedCallback(){this.fetchPayIcon(this.getAttribute("src"))}attributeChangedCallback(e,t,n){"src"===e&&t!==n&&this.fetchPayIcon(n)}}t(u,"TAG_NAME","gv-pay-icon");class p extends HTMLElement{static get observedAttributes(){return["src"]}fetchTile(e){e&&r(e).then(e=>this.innerHTML=e)}connectedCallback(){this.fetchTile(this.getAttribute("src"))}attributeChangedCallback(e,t,n){"src"===e&&t!==n&&this.fetchTile(n)}}function d(e,t){customElements.get(e)||customElements.define(e,t)}t(p,"TAG_NAME","gv-tile"),d(i.TAG_NAME,i),d(o.TAG_NAME,o),d(s.TAG_NAME,s),d(a.TAG_NAME,a),d(c.TAG_NAME,c),d(l.TAG_NAME,l),d(u.TAG_NAME,u),d(p.TAG_NAME,p)},6751:(e,t,n)=>{"use strict";var r;if(n.d(t,{A:()=>Hh}),"undefined"==typeof window){var i={hostname:""};r={crypto:{randomUUID:function(){throw Error("unsupported")}},navigator:{userAgent:"",onLine:!0},document:{createElement:function(){return{}},location:i,referrer:""},screen:{width:0,height:0},location:i,addEventListener:function(){},removeEventListener:function(){}}}else r=window;function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0||(i[n]=e[n]);return i}function g(e,t){return g=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},g(e,t)}function m(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e}function v(e){var t="function"==typeof Map?new Map:void 0;return v=function(e){if(null===e||(n=e,-1===Function.toString.call(n).indexOf("[native code]")))return e;var n;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,r)}function r(){return c(e,arguments,p(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),g(r,e)},v(e)}function y(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(y=function(){return!!e})()}function b(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return o(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?o(e,t):void 0}}(e))||t){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _(e,t){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}var k,S=Object.defineProperty,x=function(e,t,n){return function(e,t,n){return t in e?S(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n}(e,"symbol"!==(void 0===t?"undefined":m(t))?t+"":t,n)},C=Object.defineProperty,E=function(e,t,n){return function(e,t,n){return t in e?C(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n}(e,"symbol"!==(void 0===t?"undefined":m(t))?t+"":t,n)},I=function(e){return e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment",e}(I||{}),N={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},O={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},A={};function R(e){if(A[e])return A[e];var t=globalThis[e],n=t.prototype,r=e in N?N[e]:void 0,i=Boolean(r&&r.every(function(e){var t,r;return Boolean(null==(r=null==(t=Object.getOwnPropertyDescriptor(n,e))?void 0:t.get)?void 0:r.toString().includes("[native code]"))})),o=e in O?O[e]:void 0,s=Boolean(o&&o.every(function(e){var t;return"function"==typeof n[e]&&(null==(t=n[e])?void 0:t.toString().includes("[native code]"))}));if(i&&s&&!globalThis.Zone)return A[e]=t.prototype,t.prototype;try{var a=document.createElement("iframe");document.body.appendChild(a);var c=a.contentWindow;if(!c)return t.prototype;var l=c[e].prototype;return document.body.removeChild(a),l?A[e]=l:n}catch(e){return n}}var M={};function T(e,t,n){var r,i=e+"."+String(n);if(M[i])return M[i].call(t);var o=R(e),s=null==(r=Object.getOwnPropertyDescriptor(o,n))?void 0:r.get;return s?(M[i]=s,s.call(t)):t[n]}var P=function(e){return T("Node",e,"childNodes")},L=function(e){return T("Node",e,"parentNode")},D=function(e){return T("Node",e,"parentElement")},F=function(e){return T("Node",e,"textContent")},U=function(e){return e&&"host"in e?T("ShadowRoot",e,"host"):null},j=function(e){return e&&"shadowRoot"in e?T("Element",e,"shadowRoot"):null};function B(e){return e.nodeType===e.ELEMENT_NODE}function $(e){var t=e&&"host"in e&&"mode"in e&&U(e)||null;return Boolean(t&&"shadowRoot"in t&&j(t)===e)}function z(e){return"[object ShadowRoot]"===Object.prototype.toString.call(e)}function q(e){try{var t=e.rules||e.cssRules;if(!t)return null;var n=e.href;return!n&&e.ownerNode&&e.ownerNode.ownerDocument&&(n=e.ownerNode.ownerDocument.location.href),(r=Array.from(t,function(e){return V(e,n)}).join("")).includes(" background-clip: text;")&&!r.includes(" -webkit-background-clip: text;")&&(r=r.replace(/\sbackground-clip:\s*text;/g," -webkit-background-clip: text; background-clip: text;")),r}catch(e){return null}var r}function V(e,t){if(function(e){return"styleSheet"in e}(e)){var n;try{n=q(e.styleSheet)||function(e){var t=e.cssText;if(t.split('"').length<3)return t;var n=["@import","url("+JSON.stringify(e.href)+")"];return""===e.layerName?n.push("layer"):e.layerName&&n.push("layer("+e.layerName+")"),e.supportsText&&n.push("supports("+e.supportsText+")"),e.media.length&&n.push(e.media.mediaText),n.join(" ")+";"}(e)}catch(t){n=e.cssText}return e.styleSheet.href?te(n,e.styleSheet.href):n}var r,i=e.cssText;return function(e){return"selectorText"in e}(e)&&e.selectorText.includes(":")&&(r=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm,i=i.replace(r,"$1\\$2")),t?te(i,t):i}var W=function(){function e(){E(this,"idNodeMap",new Map),E(this,"nodeMetaMap",new WeakMap)}var t=e.prototype;return t.getId=function(e){var t;if(!e)return-1;var n=null==(t=this.getMeta(e))?void 0:t.id;return null!=n?n:-1},t.getNode=function(e){return this.idNodeMap.get(e)||null},t.getIds=function(){return Array.from(this.idNodeMap.keys())},t.getMeta=function(e){return this.nodeMetaMap.get(e)||null},t.removeNodeFromMap=function(e){var t=this,n=this.getId(e);this.idNodeMap.delete(n),e.childNodes&&e.childNodes.forEach(function(e){return t.removeNodeFromMap(e)})},t.has=function(e){return this.idNodeMap.has(e)},t.hasNode=function(e){return this.nodeMetaMap.has(e)},t.add=function(e,t){var n=t.id;this.idNodeMap.set(n,e),this.nodeMetaMap.set(e,t)},t.replace=function(e,t){var n=this.getNode(e);if(n){var r=this.nodeMetaMap.get(n);r&&this.nodeMetaMap.set(t,r)}this.idNodeMap.set(e,t)},t.reset=function(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap},e}();function H(e){var t=e.element,n=e.maskInputOptions,r=e.tagName,i=e.type,o=e.value,s=e.maskInputFn,a=o||"",c=i&&G(i);return(n[r.toLowerCase()]||c&&n[c])&&(a=s?s(a,t):"*".repeat(a.length)),a}function G(e){return e.toLowerCase()}var K="__rrweb_original__";function J(e){var t=e.type;return e.hasAttribute("data-rr-is-password")?"password":t?G(t):null}function Y(e,t){var n;try{n=new URL(e,null!=t?t:window.location.href)}catch(e){return null}var r,i=n.pathname.match(/\.([0-9a-z]+)(?:$)/i);return null!=(r=null==i?void 0:i[1])?r:null}var Z=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,X=/^(?:[a-z+]+:)?\/\//i,Q=/^www\..*/i,ee=/^(data:)([^,]*),(.*)/i;function te(e,t){return(e||"").replace(Z,function(e,n,r,i,o,s){var a,c=r||o||s,l=n||i||"";if(!c)return e;if(X.test(c)||Q.test(c))return"url("+l+c+l+")";if(ee.test(c))return"url("+l+c+l+")";if("/"===c[0])return"url("+l+(((a=t).indexOf("//")>-1?a.split("/").slice(0,3).join("/"):a.split("/")[0]).split("?")[0]+c)+l+")";var u=t.split("/"),p=c.split("/");u.pop();for(var d,h=b(p);!(d=h()).done;){var f=d.value;"."!==f&&(".."===f?u.pop():u.push(f))}return"url("+l+u.join("/")+l+")"})}function ne(e,t){return void 0===t&&(t=!1),t?e.replace(/(\/\*[^*]*\*\/)|[\s;]/g,""):e.replace(/(\/\*[^*]*\*\/)|[\s;]/g,"").replace(/0px/g,"0")}var re,ie,oe=1,se=new RegExp("[^a-z0-9-_:]");function ae(){return oe++}var ce=/^[^ \t\n\r\u000c]+/,le=/^[, \t\n\r\u000c]+/,ue=new WeakMap;function pe(e,t){return t&&""!==t.trim()?de(e,t):t}function de(e,t){var n=ue.get(e);if(n||(n=e.createElement("a"),ue.set(e,n)),t){if(t.startsWith("blob:")||t.startsWith("data:"))return t}else t="";return n.setAttribute("href",t),n.href}function he(e,t,n,r){return r?"src"===n||"href"===n&&("use"!==t||"#"!==r[0])||"xlink:href"===n&&"#"!==r[0]?pe(e,r):"background"!==n||"table"!==t&&"td"!==t&&"th"!==t?"srcset"===n?function(e,t){if(""===t.trim())return t;var n=0;function r(e){var r,i=e.exec(t.substring(n));return i?(r=i[0],n+=r.length,r):""}for(var i=[];r(le),!(n>=t.length);){var o=r(ce);if(","===o.slice(-1))o=pe(e,o.substring(0,o.length-1)),i.push(o);else{var s="";o=pe(e,o);for(var a=!1;;){var c=t.charAt(n);if(""===c){i.push((o+s).trim());break}if(a)")"===c&&(a=!1);else{if(","===c){n+=1,i.push((o+s).trim());break}"("===c&&(a=!0)}s+=c,n+=1}}}return i.join(", ")}(e,r):"style"===n?te(r,de(e)):"object"===t&&"data"===n?pe(e,r):r:pe(e,r):r}function fe(e,t,n){return("video"===e||"audio"===e)&&"autoplay"===t}function ge(e,t,n){if(!e)return!1;if(e.nodeType!==e.ELEMENT_NODE)return!!n&&ge(L(e),t,n);for(var r=e.classList.length;r--;){var i=e.classList[r];if(t.test(i))return!0}return!!n&&ge(L(e),t,n)}function me(e,t,n,r){var i;if(B(e)){if(!P(i=e).length)return!1}else{if(null===D(e))return!1;i=D(e)}try{if("string"==typeof t){if(r){if(i.closest("."+t))return!0}else if(i.classList.contains(t))return!0}else if(ge(i,t,r))return!0;if(n)if(r){if(i.closest(n))return!0}else if(i.matches(n))return!0}catch(e){}return!1}function ve(e,t){var n=t.doc,r=t.mirror,i=t.blockClass,o=t.blockSelector,s=t.needsMask,a=t.inlineStylesheet,c=t.maskInputOptions,l=void 0===c?{}:c,u=t.maskTextFn,p=t.maskInputFn,d=t.dataURLOptions,f=void 0===d?{}:d,g=t.inlineImages,m=t.recordCanvas,v=t.keepIframeSrcFn,y=t.newlyAddedElement,b=void 0!==y&&y,_=t.cssCaptured,w=void 0!==_&&_,k=function(e,t){if(t.hasNode(e)){var n=t.getId(e);return 1===n?void 0:n}}(n,r);switch(e.nodeType){case e.DOCUMENT_NODE:return"CSS1Compat"!==e.compatMode?{type:I.Document,childNodes:[],compatMode:e.compatMode}:{type:I.Document,childNodes:[]};case e.DOCUMENT_TYPE_NODE:return{type:I.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId,rootId:k};case e.ELEMENT_NODE:return function(e,t){for(var n,r=t.doc,i=t.inlineStylesheet,o=t.maskInputOptions,s=void 0===o?{}:o,a=t.maskInputFn,c=t.dataURLOptions,l=void 0===c?{}:c,u=t.inlineImages,p=t.recordCanvas,d=t.keepIframeSrcFn,f=t.newlyAddedElement,g=void 0!==f&&f,m=t.rootId,v=function(e,t,n){try{if("string"==typeof t){if(e.classList.contains(t))return!0}else for(var r=e.classList.length;r--;){var i=e.classList[r];if(t.test(i))return!0}if(n)return e.matches(n)}catch(e){}return!1}(e,t.blockClass,t.blockSelector),y=function(e){if(h(e,HTMLFormElement))return"form";var t=G(e.tagName);return se.test(t)?"div":t}(e),b={},_=e.attributes.length,w=0;w<_;w++){var k=e.attributes[w];fe(y,k.name,k.value)||(b[k.name]=he(r,y,G(k.name),k.value))}if("link"===y&&i){var S=Array.from(r.styleSheets).find(function(t){return t.href===e.href}),x=null;S&&(x=q(S)),x&&(delete b.rel,delete b.href,b._cssText=x)}if("style"===y&&e.sheet){var C=q(e.sheet);C&&(e.childNodes.length>1&&(C=function(e,t){return function(e,t,n){void 0===n&&(n=!1);var r=Array.from(t.childNodes),i=[],o=0;if(r.length>1&&e&&"string"==typeof e)for(var s=ne(e,n),a=s.length/e.length,c=1;c2&&""===d[0]&&""!==r[c-1].textContent)h=s.indexOf(p,1);else if(1===d.length){if(p=p.substring(0,p.length-1),(d=s.split(p)).length<=1)return i.push(e),i;u=101}else u===l.length-1&&(h=s.indexOf(p));if(d.length>=2&&u>100){var f=r[c-1].textContent;if(f&&"string"==typeof f){var g=ne(f).length;h=s.indexOf(p,g)}-1===h&&(h=d[0].length)}if(-1!==h){for(var m=Math.floor(h/a);m>0&&m50*r.length)return i.push(e),i;var v=ne(e.substring(0,m),n);if(v.length===h){i.push(e.substring(0,m)),e=e.substring(m),s=s.substring(h);break}v.length",T=R.crossOrigin,P=function(){R.removeEventListener("load",P);try{re.width=R.naturalWidth,re.height=R.naturalHeight,ie.drawImage(R,0,0),b.rr_dataURL=re.toDataURL(l.type,l.quality)}catch(e){if("anonymous"!==R.crossOrigin)return R.crossOrigin="anonymous",void(R.complete&&0!==R.naturalWidth?P():R.addEventListener("load",P));console.warn("Cannot inline img src="+M+"! Error: "+e)}"anonymous"===R.crossOrigin&&(T?b.crossOrigin=T:R.removeAttribute("crossorigin"))};R.complete&&0!==R.naturalWidth?P():R.addEventListener("load",P)}if("audio"===y||"video"===y){var L=b;L.rr_mediaState=e.paused?"paused":"played",L.rr_mediaCurrentTime=e.currentTime,L.rr_mediaPlaybackRate=e.playbackRate,L.rr_mediaMuted=e.muted,L.rr_mediaLoop=e.loop,L.rr_mediaVolume=e.volume}if(g||(e.scrollLeft&&(b.rr_scrollLeft=e.scrollLeft),e.scrollTop&&(b.rr_scrollTop=e.scrollTop)),v){var D=e.getBoundingClientRect(),F=D.width,U=D.height;b={class:b.class,rr_width:F+"px",rr_height:U+"px"}}"iframe"!==y||d(b.src)||(e.contentDocument||(b.rr_src=b.src),delete b.src);try{customElements.get(y)&&(n=!0)}catch(e){}return{type:I.Element,tagName:y,attributes:b,childNodes:[],isSVG:(j=e,Boolean("svg"===j.tagName||j.ownerSVGElement)||void 0),needBlock:v,rootId:m,isCustom:n};var j}(e,{doc:n,blockClass:i,blockSelector:o,inlineStylesheet:a,maskInputOptions:l,maskInputFn:p,dataURLOptions:f,inlineImages:g,recordCanvas:m,keepIframeSrcFn:v,newlyAddedElement:b,rootId:k});case e.TEXT_NODE:return function(e,t){var n=t.needsMask,r=t.maskTextFn,i=t.rootId,o=t.cssCaptured,s=L(e),a=s&&s.tagName,c="",l="STYLE"===a||void 0,u="SCRIPT"===a||void 0;return u?c="SCRIPT_PLACEHOLDER":o||(c=F(e),l&&c&&(c=te(c,de(t.doc)))),!l&&!u&&c&&n&&(c=r?r(c,D(e)):c.replace(/[\S]/g,"*")),{type:I.Text,textContent:c||"",rootId:i}}(e,{doc:n,needsMask:s,maskTextFn:u,rootId:k,cssCaptured:w});case e.CDATA_SECTION_NODE:return{type:I.CDATA,textContent:"",rootId:k};case e.COMMENT_NODE:return{type:I.Comment,textContent:F(e)||"",rootId:k};default:return!1}}function ye(e){return null==e?"":e.toLowerCase()}function be(e,t){var n=t.doc,r=t.mirror,i=t.blockClass,o=t.blockSelector,s=t.maskTextClass,a=t.maskTextSelector,c=t.skipChild,l=void 0!==c&&c,u=t.inlineStylesheet,p=void 0===u||u,d=t.maskInputOptions,h=void 0===d?{}:d,f=t.maskTextFn,g=t.maskInputFn,m=t.slimDOMOptions,v=t.dataURLOptions,y=void 0===v?{}:v,_=t.inlineImages,w=void 0!==_&&_,k=t.recordCanvas,S=void 0!==k&&k,x=t.onSerialize,C=t.onIframeLoad,E=t.iframeLoadTimeout,N=void 0===E?5e3:E,O=t.onStylesheetLoad,A=t.stylesheetLoadTimeout,R=void 0===A?5e3:A,M=t.keepIframeSrcFn,T=void 0===M?function(){return!1}:M,D=t.newlyAddedElement,F=void 0!==D&&D,U=t.cssCaptured,q=void 0!==U&&U,V=t.needsMask,W=t.preserveWhiteSpace,H=void 0===W||W;V||(V=me(e,s,a,void 0===V));var G,K=ve(e,{doc:n,mirror:r,blockClass:i,blockSelector:o,needsMask:V,inlineStylesheet:p,maskInputOptions:h,maskTextFn:f,maskInputFn:g,dataURLOptions:y,inlineImages:w,recordCanvas:S,keepIframeSrcFn:T,newlyAddedElement:F,cssCaptured:q});if(!K)return console.warn(e,"not serialized"),null;G=r.hasNode(e)?r.getId(e):function(e,t){if(t.comment&&e.type===I.Comment)return!0;if(e.type===I.Element){if(t.script&&("script"===e.tagName||"link"===e.tagName&&("preload"===e.attributes.rel&&"script"===e.attributes.as||"modulepreload"===e.attributes.rel)||"link"===e.tagName&&"prefetch"===e.attributes.rel&&"string"==typeof e.attributes.href&&"js"===Y(e.attributes.href)))return!0;if(t.headFavicon&&("link"===e.tagName&&"shortcut icon"===e.attributes.rel||"meta"===e.tagName&&(ye(e.attributes.name).match(/^msapplication-tile(image|color)$/)||"application-name"===ye(e.attributes.name)||"icon"===ye(e.attributes.rel)||"apple-touch-icon"===ye(e.attributes.rel)||"shortcut icon"===ye(e.attributes.rel))))return!0;if("meta"===e.tagName){if(t.headMetaDescKeywords&&ye(e.attributes.name).match(/^description|keywords$/))return!0;if(t.headMetaSocial&&(ye(e.attributes.property).match(/^(og|twitter|fb):/)||ye(e.attributes.name).match(/^(og|twitter):/)||"pinterest"===ye(e.attributes.name)))return!0;if(t.headMetaRobots&&("robots"===ye(e.attributes.name)||"googlebot"===ye(e.attributes.name)||"bingbot"===ye(e.attributes.name)))return!0;if(t.headMetaHttpEquiv&&void 0!==e.attributes["http-equiv"])return!0;if(t.headMetaAuthorship&&("author"===ye(e.attributes.name)||"generator"===ye(e.attributes.name)||"framework"===ye(e.attributes.name)||"publisher"===ye(e.attributes.name)||"progid"===ye(e.attributes.name)||ye(e.attributes.property).match(/^article:/)||ye(e.attributes.property).match(/^product:/)))return!0;if(t.headMetaVerification&&("google-site-verification"===ye(e.attributes.name)||"yandex-verification"===ye(e.attributes.name)||"csrf-token"===ye(e.attributes.name)||"p:domain_verify"===ye(e.attributes.name)||"verify-v1"===ye(e.attributes.name)||"verification"===ye(e.attributes.name)||"shopify-checkout-api-token"===ye(e.attributes.name)))return!0}}return!1}(K,m)||!H&&K.type===I.Text&&!K.textContent.replace(/^\s+|\s+$/gm,"").length?-2:ae();var J=Object.assign(K,{id:G});if(r.add(e,J),-2===G)return null;x&&x(e);var Z=!l;if(J.type===I.Element){Z=Z&&!J.needBlock,delete J.needBlock;var X=j(e);X&&z(X)&&(J.isShadowHost=!0)}if((J.type===I.Document||J.type===I.Element)&&Z){m.headWhitespace&&J.type===I.Element&&"head"===J.tagName&&(H=!1);var Q={doc:n,mirror:r,blockClass:i,blockSelector:o,needsMask:V,maskTextClass:s,maskTextSelector:a,skipChild:l,inlineStylesheet:p,maskInputOptions:h,maskTextFn:f,maskInputFn:g,slimDOMOptions:m,dataURLOptions:y,inlineImages:w,recordCanvas:S,preserveWhiteSpace:H,onSerialize:x,onIframeLoad:C,iframeLoadTimeout:N,onStylesheetLoad:O,stylesheetLoadTimeout:R,keepIframeSrcFn:T,cssCaptured:!1};if(J.type===I.Element&&"textarea"===J.tagName&&void 0!==J.attributes.value);else{J.type===I.Element&&void 0!==J.attributes._cssText&&"string"==typeof J.attributes._cssText&&(Q.cssCaptured=!0);for(var ee,te=b(Array.from(P(e)));!(ee=te()).done;){var ne=be(ee.value,Q);ne&&J.childNodes.push(ne)}}var re=null;if(B(e)&&(re=j(e)))for(var ie,oe=b(Array.from(P(re)));!(ie=oe()).done;){var se=be(ie.value,Q);se&&(z(re)&&(se.isShadow=!0),J.childNodes.push(se))}}var ce=L(e);return ce&&$(ce)&&z(ce)&&(J.isShadow=!0),J.type===I.Element&&"iframe"===J.tagName&&function(e,t,n){var r=e.contentWindow;if(r){var i,o=!1;try{i=r.document.readyState}catch(e){return}if("complete"===i){var s="about:blank";if(r.location.href!==s||e.src===s||""===e.src)return setTimeout(t,0),e.addEventListener("load",t);e.addEventListener("load",t)}else{var a=setTimeout(function(){o||(t(),o=!0)},n);e.addEventListener("load",function(){clearTimeout(a),o=!0,t()})}}}(e,function(){var t=e.contentDocument;if(t&&C){var n=be(t,{doc:t,mirror:r,blockClass:i,blockSelector:o,needsMask:V,maskTextClass:s,maskTextSelector:a,skipChild:!1,inlineStylesheet:p,maskInputOptions:h,maskTextFn:f,maskInputFn:g,slimDOMOptions:m,dataURLOptions:y,inlineImages:w,recordCanvas:S,preserveWhiteSpace:H,onSerialize:x,onIframeLoad:C,iframeLoadTimeout:N,onStylesheetLoad:O,stylesheetLoadTimeout:R,keepIframeSrcFn:T});n&&C(e,n)}},N),J.type===I.Element&&"link"===J.tagName&&"string"==typeof J.attributes.rel&&("stylesheet"===J.attributes.rel||"preload"===J.attributes.rel&&"string"==typeof J.attributes.href&&"css"===Y(J.attributes.href))&&function(e,t,n){var r,i=!1;try{r=e.sheet}catch(e){return}if(!r){var o=setTimeout(function(){i||(t(),i=!0)},n);e.addEventListener("load",function(){clearTimeout(o),i=!0,t()})}}(e,function(){if(O){var t=be(e,{doc:n,mirror:r,blockClass:i,blockSelector:o,needsMask:V,maskTextClass:s,maskTextSelector:a,skipChild:!1,inlineStylesheet:p,maskInputOptions:h,maskTextFn:f,maskInputFn:g,slimDOMOptions:m,dataURLOptions:y,inlineImages:w,recordCanvas:S,preserveWhiteSpace:H,onSerialize:x,onIframeLoad:C,iframeLoadTimeout:N,onStylesheetLoad:O,stylesheetLoadTimeout:R,keepIframeSrcFn:T});t&&O(e,t)}},R),J}function _e(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function we(e){if(e.__esModule)return e;var t=e.default;if("function"==typeof t){var n=function e(){return h(this,e)?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(t){var r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,r.get?r:{enumerable:!0,get:function(){return e[t]}})}),n}var ke={exports:{}},Se=String,xe=function(){return{isColorSupported:!1,reset:Se,bold:Se,dim:Se,italic:Se,underline:Se,inverse:Se,hidden:Se,strikethrough:Se,black:Se,red:Se,green:Se,yellow:Se,blue:Se,magenta:Se,cyan:Se,white:Se,gray:Se,bgBlack:Se,bgRed:Se,bgGreen:Se,bgYellow:Se,bgBlue:Se,bgMagenta:Se,bgCyan:Se,bgWhite:Se}};ke.exports=xe(),ke.exports.createColors=xe;var Ce=ke.exports,Ee=we(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"}))),Ie=Ce,Ne=Ee,Oe=function(e){function t(n,r,i,o,s,a){var c;return(c=e.call(this,n)||this).name="CssSyntaxError",c.reason=n,s&&(c.file=s),o&&(c.source=o),a&&(c.plugin=a),void 0!==r&&void 0!==i&&("number"==typeof r?(c.line=r,c.column=i):(c.line=r.line,c.column=r.column,c.endLine=i.line,c.endColumn=i.column)),c.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(c,t),c}d(t,e);var n=t.prototype;return n.setMessage=function(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"",void 0!==this.line&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason},n.showSourceCode=function(e){var t=this;if(!this.source)return"";var n=this.source;null==e&&(e=Ie.isColorSupported),Ne&&e&&(n=Ne(n));var r,i,o=n.split(/\r?\n/),s=Math.max(this.line-3,0),a=Math.min(this.line+2,o.length),c=String(a).length;if(e){var l=Ie.createColors(!0),u=l.bold,p=l.gray,d=l.red;r=function(e){return u(d(e))},i=function(e){return p(e)}}else r=i=function(e){return e};return o.slice(s,a).map(function(e,n){var o=s+1+n,a=" "+(" "+o).slice(-c)+" | ";if(o===t.line){var l=i(a.replace(/\d/g," "))+e.slice(0,t.column-1).replace(/[^\t]/g," ");return r(">")+i(a)+e+"\n "+l+r("^")}return" "+i(a)+e}).join("\n")},n.toString=function(){var e=this.showSourceCode();return e&&(e="\n\n"+e+"\n"),this.name+": "+this.message+e},t}(v(Error)),Ae=Oe;Oe.default=Oe;var Re={};Re.isClean=Symbol("isClean"),Re.my=Symbol("my");var Me={after:"\n",beforeClose:"\n",beforeComment:"\n",beforeDecl:"\n",beforeOpen:" ",beforeRule:"\n",colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1},Te=function(){function e(e){this.builder=e}var t=e.prototype;return t.atrule=function(e,t){var n="@"+e.name,r=e.params?this.rawValue(e,"params"):"";if(void 0!==e.raws.afterName?n+=e.raws.afterName:r&&(n+=" "),e.nodes)this.block(e,n+r);else{var i=(e.raws.between||"")+(t?";":"");this.builder(n+r+i,e)}},t.beforeAfter=function(e,t){var n;n="decl"===e.type?this.raw(e,null,"beforeDecl"):"comment"===e.type?this.raw(e,null,"beforeComment"):"before"===t?this.raw(e,null,"beforeRule"):this.raw(e,null,"beforeClose");for(var r=e.parent,i=0;r&&"root"!==r.type;)i+=1,r=r.parent;if(n.includes("\n")){var o=this.raw(e,null,"indent");if(o.length)for(var s=0;s0&&"comment"===e.nodes[t].type;)t-=1;for(var n=this.raw(e,"semicolon"),r=0;r0&&void 0!==e.raws.after)return(t=e.raws.after).includes("\n")&&(t=t.replace(/[^\n]+$/,"")),!1}),t&&(t=t.replace(/\S/g,"")),t},t.rawBeforeComment=function(e,t){var n;return e.walkComments(function(e){if(void 0!==e.raws.before)return(n=e.raws.before).includes("\n")&&(n=n.replace(/[^\n]+$/,"")),!1}),void 0===n?n=this.raw(t,null,"beforeDecl"):n&&(n=n.replace(/\S/g,"")),n},t.rawBeforeDecl=function(e,t){var n;return e.walkDecls(function(e){if(void 0!==e.raws.before)return(n=e.raws.before).includes("\n")&&(n=n.replace(/[^\n]+$/,"")),!1}),void 0===n?n=this.raw(t,null,"beforeRule"):n&&(n=n.replace(/\S/g,"")),n},t.rawBeforeOpen=function(e){var t;return e.walk(function(e){if("decl"!==e.type&&void 0!==(t=e.raws.between))return!1}),t},t.rawBeforeRule=function(e){var t;return e.walk(function(n){if(n.nodes&&(n.parent!==e||e.first!==n)&&void 0!==n.raws.before)return(t=n.raws.before).includes("\n")&&(t=t.replace(/[^\n]+$/,"")),!1}),t&&(t=t.replace(/\S/g,"")),t},t.rawColon=function(e){var t;return e.walkDecls(function(e){if(void 0!==e.raws.between)return t=e.raws.between.replace(/[^\s:]/g,""),!1}),t},t.rawEmptyBody=function(e){var t;return e.walk(function(e){if(e.nodes&&0===e.nodes.length&&void 0!==(t=e.raws.after))return!1}),t},t.rawIndent=function(e){return e.raws.indent?e.raws.indent:(e.walk(function(n){var r=n.parent;if(r&&r!==e&&r.parent&&r.parent===e&&void 0!==n.raws.before){var i=n.raws.before.split("\n");return t=(t=i[i.length-1]).replace(/\S/g,""),!1}}),t);var t},t.rawSemicolon=function(e){var t;return e.walk(function(e){if(e.nodes&&e.nodes.length&&"decl"===e.last.type&&void 0!==(t=e.raws.semicolon))return!1}),t},t.rawValue=function(e,t){var n=e[t],r=e.raws[t];return r&&r.value===n?r.raw:n},t.root=function(e){this.body(e),e.raws.after&&this.builder(e.raws.after)},t.rule=function(e){this.block(e,this.rawValue(e,"selector")),e.raws.ownSemicolon&&this.builder(e.raws.ownSemicolon,e,"end")},t.stringify=function(e,t){if(!this[e.type])throw new Error("Unknown AST node type "+e.type+". Maybe you need to change PostCSS stringifier.");this[e.type](e,t)},e}(),Pe=Te;Te.default=Te;var Le=Pe;function De(e,t){new Le(t).stringify(e)}var Fe=De;De.default=De;var Ue=Re.isClean,je=Re.my,Be=Ae,$e=Pe,ze=Fe;function qe(e,t){var n=new e.constructor;for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)&&"proxyCache"!==r){var i=e[r],o=void 0===i?"undefined":m(i);"parent"===r&&"object"===o?t&&(n[r]=t):"source"===r?n[r]=i:Array.isArray(i)?n[r]=i.map(function(e){return qe(e,n)}):("object"===o&&null!==i&&(i=qe(i)),n[r]=i)}return n}var Ve=function(){function e(e){for(var t in void 0===e&&(e={}),this.raws={},this[Ue]=!1,this[je]=!0,e)if("nodes"===t){this.nodes=[];for(var n,r=b(e[t]);!(n=r()).done;){var i=n.value;"function"==typeof i.clone?this.append(i.clone()):this.append(i)}}else this[t]=e[t]}var t=e.prototype;return t.addToError=function(e){if(e.postcssNode=this,e.stack&&this.source&&/\n\s{4}at /.test(e.stack)){var t=this.source;e.stack=e.stack.replace(/\n\s{4}at /,"$&"+t.input.from+":"+t.start.line+":"+t.start.column+"$&")}return e},t.after=function(e){return this.parent.insertAfter(this,e),this},t.assign=function(e){for(var t in void 0===e&&(e={}),e)this[t]=e[t];return this},t.before=function(e){return this.parent.insertBefore(this,e),this},t.cleanRaws=function(e){delete this.raws.before,delete this.raws.after,e||delete this.raws.between},t.clone=function(e){void 0===e&&(e={});var t=qe(this);for(var n in e)t[n]=e[n];return t},t.cloneAfter=function(e){void 0===e&&(e={});var t=this.clone(e);return this.parent.insertAfter(this,t),t},t.cloneBefore=function(e){void 0===e&&(e={});var t=this.clone(e);return this.parent.insertBefore(this,t),t},t.error=function(e,t){if(void 0===t&&(t={}),this.source){var n=this.rangeBy(t),r=n.end,i=n.start;return this.source.input.error(e,{column:i.column,line:i.line},{column:r.column,line:r.line},t)}return new Be(e)},t.getProxyProcessor=function(){return{get:function(e,t){return"proxyOf"===t?e:"root"===t?function(){return e.root().toProxy()}:e[t]},set:function(e,t,n){return e[t]===n||(e[t]=n,"prop"!==t&&"value"!==t&&"name"!==t&&"params"!==t&&"important"!==t&&"text"!==t||e.markDirty()),!0}}},t.markDirty=function(){if(this[Ue]){this[Ue]=!1;for(var e=this;e=e.parent;)e[Ue]=!1}},t.next=function(){if(this.parent){var e=this.parent.index(this);return this.parent.nodes[e+1]}},t.positionBy=function(e,t){var n=this.source.start;if(e.index)n=this.positionInside(e.index,t);else if(e.word){var r=(t=this.toString()).indexOf(e.word);-1!==r&&(n=this.positionInside(r,t))}return n},t.positionInside=function(e,t){for(var n=t||this.toString(),r=this.source.start.column,i=this.source.start.line,o=0;o-1&&r>-1&&(this.annotation=this.getAnnotationURL(e.substring(n,r)))}},t.loadFile=function(e){if(this.root=Xe(e),Ye(e))return this.mapFile=e,Ze(e,"utf-8").toString().trim()},t.loadMap=function(e,t){if(!1===t)return!1;if(t){if("string"==typeof t)return t;if("function"!=typeof t){if(h(t,Ke))return Je.fromSourceMap(t).toString();if(h(t,Je))return t.toString();if(this.isMap(t))return JSON.stringify(t);throw new Error("Unsupported previous source map format: "+t.toString())}var n=t(e);if(n){var r=this.loadFile(n);if(!r)throw new Error("Unable to load previous source map: "+n.toString());return r}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){var i=this.annotation;return e&&(i=Qe(Xe(e),i)),this.loadFile(i)}}},t.startWith=function(e,t){return!!e&&e.substr(0,t.length)===t},t.withContent=function(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)},e}(),tt=et;et.default=et;var nt=Ee.SourceMapConsumer,rt=Ee.SourceMapGenerator,it=Ee.fileURLToPath,ot=Ee.pathToFileURL,st=Ee.isAbsolute,at=Ee.resolve,ct=function(e){void 0===e&&(e=21);for(var t="",n=e;n--;)t+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[64*Math.random()|0];return t},lt=Ee,ut=Ae,pt=tt,dt=Symbol("fromOffsetCache"),ht=Boolean(nt&&rt),ft=Boolean(at&&st),gt=function(){function e(e,t){if(void 0===t&&(t={}),null==e||"object"===(void 0===e?"undefined":m(e))&&!e.toString)throw new Error("PostCSS received "+e+" instead of CSS string");if(this.css=e.toString(),"\ufeff"===this.css[0]||"￾"===this.css[0]?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,t.from&&(!ft||/^\w+:\/\//.test(t.from)||st(t.from)?this.file=t.from:this.file=at(t.from)),ft&&ht){var n=new pt(this.css,t);if(n.text){this.map=n;var r=n.consumer().file;!this.file&&r&&(this.file=this.mapResolve(r))}}this.file||(this.id=""),this.map&&(this.map.file=this.from)}var t=e.prototype;return t.error=function(e,t,n,r){var i,o,s;if(void 0===r&&(r={}),t&&"object"===(void 0===t?"undefined":m(t))){var a=t,c=n;if("number"==typeof a.offset){var l=this.fromOffset(a.offset);t=l.line,n=l.col}else t=a.line,n=a.column;if("number"==typeof c.offset){var u=this.fromOffset(c.offset);o=u.line,s=u.col}else o=c.line,s=c.column}else if(!n){var p=this.fromOffset(t);t=p.line,n=p.col}var d=this.origin(t,n,o,s);return(i=d?new ut(e,void 0===d.endLine?d.line:{column:d.column,line:d.line},void 0===d.endLine?d.column:{column:d.endColumn,line:d.endLine},d.source,d.file,r.plugin):new ut(e,void 0===o?t:{column:n,line:t},void 0===o?n:{column:s,line:o},this.css,this.file,r.plugin)).input={column:n,endColumn:s,endLine:o,line:t,source:this.css},this.file&&(ot&&(i.input.url=ot(this.file).toString()),i.input.file=this.file),i},t.fromOffset=function(e){var t;if(this[dt])t=this[dt];else{var n=this.css.split("\n");t=new Array(n.length);for(var r=0,i=0,o=n.length;i=t[t.length-1])s=t.length-1;else for(var a,c=t.length-2;s>1)])c=a-1;else{if(!(e>=t[a+1])){s=a;break}s=a+1}return{col:e-t[s]+1,line:s+1}},t.mapResolve=function(e){return/^\w+:\/\//.test(e)?e:at(this.map.consumer().sourceRoot||this.map.root||".",e)},t.origin=function(e,t,n,r){if(!this.map)return!1;var i,o,s=this.map.consumer(),a=s.originalPositionFor({column:t,line:e});if(!a.source)return!1;"number"==typeof n&&(i=s.originalPositionFor({column:r,line:n})),o=st(a.source)?ot(a.source):new URL(a.source,this.map.consumer().sourceRoot||ot(this.map.mapFile));var c={column:a.column,endColumn:i&&i.column,endLine:i&&i.line,line:a.line,url:o.toString()};if("file:"===o.protocol){if(!it)throw new Error("file: protocol is not available in this PostCSS build");c.file=it(o)}var l=s.sourceContentFor(a.source);return l&&(c.source=l),c},t.toJSON=function(){for(var e={},t=0,n=["hasBOM","css","file","id"];t=0;t--)"comment"===(e=this.root.nodes[t]).type&&0===e.text.indexOf("# sourceMappingURL=")&&this.root.removeChild(t);else this.css&&(this.css=this.css.replace(/\n*?\/\*#[\S\s]*?\*\/$/gm,""))},t.generate=function(){if(this.clearAnnotation(),Et&&Ct&&this.isMap())return this.generateMap();var e="";return this.stringify(this.root,function(t){e+=t}),[e]},t.generateMap=function(){if(this.root)this.generateString();else if(1===this.previous().length){var e=this.previous()[0].consumer();e.file=this.outputFile(),this.map=yt.fromSourceMap(e,{ignoreInvalidMapping:!0})}else this.map=new yt({file:this.outputFile(),ignoreInvalidMapping:!0}),this.map.addMapping({generated:{column:0,line:1},original:{column:0,line:1},source:this.opts.from?this.toUrl(this.path(this.opts.from)):""});return this.isSourcesContent()&&this.setSourcesContent(),this.root&&this.previous().length>0&&this.applyPrevMaps(),this.isAnnotation()&&this.addAnnotation(),this.isInline()?[this.css]:[this.css,this.map]},t.generateString=function(){var e=this;this.css="",this.map=new yt({file:this.outputFile(),ignoreInvalidMapping:!0});var t,n,r=1,i=1,o="",s={generated:{column:0,line:0},original:{column:0,line:0},source:""};this.stringify(this.root,function(a,c,l){if(e.css+=a,c&&"end"!==l&&(s.generated.line=r,s.generated.column=i-1,c.source&&c.source.start?(s.source=e.sourcePath(c),s.original.line=c.source.start.line,s.original.column=c.source.start.column-1,e.map.addMapping(s)):(s.source=o,s.original.line=1,s.original.column=0,e.map.addMapping(s))),(t=a.match(/\n/g))?(r+=t.length,n=a.lastIndexOf("\n"),i=a.length-n):i+=a.length,c&&"start"!==l){var u=c.parent||{raws:{}};("decl"===c.type||"atrule"===c.type&&!c.nodes)&&c===u.last&&!u.raws.semicolon||(c.source&&c.source.end?(s.source=e.sourcePath(c),s.original.line=c.source.end.line,s.original.column=c.source.end.column-1,s.generated.line=r,s.generated.column=i-2,e.map.addMapping(s)):(s.source=o,s.original.line=1,s.original.column=0,s.generated.line=r,s.generated.column=i-1,e.map.addMapping(s)))}})},t.isAnnotation=function(){return!!this.isInline()||(void 0!==this.mapOpts.annotation?this.mapOpts.annotation:!this.previous().length||this.previous().some(function(e){return e.annotation}))},t.isInline=function(){if(void 0!==this.mapOpts.inline)return this.mapOpts.inline;var e=this.mapOpts.annotation;return(void 0===e||!0===e)&&(!this.previous().length||this.previous().some(function(e){return e.inline}))},t.isMap=function(){return void 0!==this.opts.map?!!this.opts.map:this.previous().length>0},t.isSourcesContent=function(){return void 0!==this.mapOpts.sourcesContent?this.mapOpts.sourcesContent:!this.previous().length||this.previous().some(function(e){return e.withContent()})},t.outputFile=function(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"},t.path=function(e){if(this.mapOpts.absolute)return e;if(60===e.charCodeAt(0))return e;if(/^\w+:\/\//.test(e))return e;var t=this.memoizedPaths.get(e);if(t)return t;var n=this.opts.to?bt(this.opts.to):".";"string"==typeof this.mapOpts.annotation&&(n=bt(wt(n,this.mapOpts.annotation)));var r=_t(n,e);return this.memoizedPaths.set(e,r),r},t.previous=function(){var e=this;if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(function(t){if(t.source&&t.source.input.map){var n=t.source.input.map;e.previousMaps.includes(n)||e.previousMaps.push(n)}});else{var t=new xt(this.originalCSS,this.opts);t.map&&this.previousMaps.push(t.map)}return this.previousMaps},t.setSourcesContent=function(){var e=this,t={};if(this.root)this.root.walk(function(n){if(n.source){var r=n.source.input.from;if(r&&!t[r]){t[r]=!0;var i=e.usesFileUrls?e.toFileUrl(r):e.toUrl(e.path(r));e.map.setSourceContent(i,n.source.input.css)}}});else if(this.css){var n=this.opts.from?this.toUrl(this.path(this.opts.from)):"";this.map.setSourceContent(n,this.css)}},t.sourcePath=function(e){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(e.source.input.from):this.toUrl(this.path(e.source.input.from))},t.toBase64=function(e){return Buffer?Buffer.from(e).toString("base64"):window.btoa(unescape(encodeURIComponent(e)))},t.toFileUrl=function(e){var t=this.memoizedFileURLs.get(e);if(t)return t;if(St){var n=St(e).toString();return this.memoizedFileURLs.set(e,n),n}throw new Error("`map.absolute` option is not available in this PostCSS build")},t.toUrl=function(e){var t=this.memoizedURLs.get(e);if(t)return t;"\\"===kt&&(e=e.replace(/\\/g,"/"));var n=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,n),n},e}(),Nt=function(e){function t(t){var n;return(n=e.call(this,t)||this).type="comment",n}return d(t,e),t}(We),Ot=Nt;Nt.default=Nt;var At,Rt,Mt,Tt,Pt=Re.isClean,Lt=Re.my,Dt=Ge,Ft=Ot;function Ut(e){return e.map(function(e){return e.nodes&&(e.nodes=Ut(e.nodes)),delete e.source,e})}function jt(e){if(e[Pt]=!1,e.proxyOf.nodes)for(var t,n=b(e.proxyOf.nodes);!(t=n()).done;)jt(t.value)}var Bt=function(e){function t(){return e.apply(this,arguments)||this}d(t,e);var n=t.prototype;return n.append=function(){for(var e=arguments.length,t=new Array(e),n=0;n1?t-1:0),i=1;i=e&&(this.indexes[n]=t-1);return this.markDirty(),this},n.replaceValues=function(e,t,n){return n||(n=t,t={}),this.walkDecls(function(r){t.props&&!t.props.includes(r.prop)||t.fast&&!r.value.includes(t.fast)||(r.value=r.value.replace(e,n))}),this.markDirty(),this},n.some=function(e){return this.nodes.some(e)},n.walk=function(e){return this.each(function(t,n){var r;try{r=e(t,n)}catch(e){throw t.addToError(e)}return!1!==r&&t.walk&&(r=t.walk(e)),r})},n.walkAtRules=function(e,t){return t?h(e,RegExp)?this.walk(function(n,r){if("atrule"===n.type&&e.test(n.name))return t(n,r)}):this.walk(function(n,r){if("atrule"===n.type&&n.name===e)return t(n,r)}):(t=e,this.walk(function(e,n){if("atrule"===e.type)return t(e,n)}))},n.walkComments=function(e){return this.walk(function(t,n){if("comment"===t.type)return e(t,n)})},n.walkDecls=function(e,t){return t?h(e,RegExp)?this.walk(function(n,r){if("decl"===n.type&&e.test(n.prop))return t(n,r)}):this.walk(function(n,r){if("decl"===n.type&&n.prop===e)return t(n,r)}):(t=e,this.walk(function(e,n){if("decl"===e.type)return t(e,n)}))},n.walkRules=function(e,t){return t?h(e,RegExp)?this.walk(function(n,r){if("rule"===n.type&&e.test(n.selector))return t(n,r)}):this.walk(function(n,r){if("rule"===n.type&&n.selector===e)return t(n,r)}):(t=e,this.walk(function(e,n){if("rule"===e.type)return t(e,n)}))},l(t,[{key:"first",get:function(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}},{key:"last",get:function(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}}]),t}(We);Bt.registerParse=function(e){At=e},Bt.registerRule=function(e){Rt=e},Bt.registerAtRule=function(e){Mt=e},Bt.registerRoot=function(e){Tt=e};var $t=Bt;Bt.default=Bt,Bt.rebuild=function(e){"atrule"===e.type?Object.setPrototypeOf(e,Mt.prototype):"rule"===e.type?Object.setPrototypeOf(e,Rt.prototype):"decl"===e.type?Object.setPrototypeOf(e,Dt.prototype):"comment"===e.type?Object.setPrototypeOf(e,Ft.prototype):"root"===e.type&&Object.setPrototypeOf(e,Tt.prototype),e[Lt]=!0,e.nodes&&e.nodes.forEach(function(e){Bt.rebuild(e)})};var zt,qt,Vt=function(e){function t(t){var n;return(n=e.call(this,u({type:"document"},t))||this).nodes||(n.nodes=[]),n}return d(t,e),t.prototype.toResult=function(e){return void 0===e&&(e={}),new zt(new qt,this,e).stringify()},t}($t);Vt.registerLazyResult=function(e){zt=e},Vt.registerProcessor=function(e){qt=e};var Wt=Vt;Vt.default=Vt;var Ht=function(){function e(e,t){if(void 0===t&&(t={}),this.type="warning",this.text=e,t.node&&t.node.source){var n=t.node.rangeBy(t);this.line=n.start.line,this.column=n.start.column,this.endLine=n.end.line,this.endColumn=n.end.column}for(var r in t)this[r]=t[r]}return e.prototype.toString=function(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text},e}(),Gt=Ht;Ht.default=Ht;var Kt=Gt,Jt=function(){function e(e,t,n){this.processor=e,this.messages=[],this.root=t,this.opts=n,this.css=void 0,this.map=void 0}var t=e.prototype;return t.toString=function(){return this.css},t.warn=function(e,t){void 0===t&&(t={}),t.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(t.plugin=this.lastPlugin.postcssPlugin);var n=new Kt(e,t);return this.messages.push(n),n},t.warnings=function(){return this.messages.filter(function(e){return"warning"===e.type})},l(e,[{key:"content",get:function(){return this.css}}]),e}(),Yt=Jt;Jt.default=Jt;var Zt="'".charCodeAt(0),Xt='"'.charCodeAt(0),Qt="\\".charCodeAt(0),en="/".charCodeAt(0),tn="\n".charCodeAt(0),nn=" ".charCodeAt(0),rn="\f".charCodeAt(0),on="\t".charCodeAt(0),sn="\r".charCodeAt(0),an="[".charCodeAt(0),cn="]".charCodeAt(0),ln="(".charCodeAt(0),un=")".charCodeAt(0),pn="{".charCodeAt(0),dn="}".charCodeAt(0),hn=";".charCodeAt(0),fn="*".charCodeAt(0),gn=":".charCodeAt(0),mn="@".charCodeAt(0),vn=/[\t\n\f\r "#'()/;[\\\]{}]/g,yn=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,bn=/.[\r\n"'(/\\]/,wn=/[\da-f]/i,kn=$t,Sn=function(e){function t(t){var n;return(n=e.call(this,t)||this).type="atrule",n}d(t,e);var n=t.prototype;return n.append=function(){for(var t=arguments.length,n=new Array(t),r=0;r1?n.raws.before=this.nodes[1].raws.before:delete n.raws.before;else if(this.first!==n)for(var o,s=b(i);!(o=s()).done;)o.value.raws.before=n.raws.before;return i},n.removeChild=function(t,n){var r=this.index(t);return!n&&0===r&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[r].raws.before),e.prototype.removeChild.call(this,t)},n.toResult=function(e){return void 0===e&&(e={}),new Cn(new En,this,e).stringify()},t}(In);Nn.registerLazyResult=function(e){Cn=e},Nn.registerProcessor=function(e){En=e};var On=Nn;Nn.default=Nn,In.registerRoot(Nn);var An={comma:function(e){return An.split(e,[","],!0)},space:function(e){return An.split(e,[" ","\n","\t"])},split:function(e,t,n){for(var r,i=[],o="",s=!1,a=0,c=!1,l="",u=!1,p=b(e);!(r=p()).done;){var d=r.value;u?u=!1:"\\"===d?u=!0:c?d===l&&(c=!1):'"'===d||"'"===d?(c=!0,l=d):"("===d?a+=1:")"===d?a>0&&(a-=1):0===a&&t.includes(d)&&(s=!0),s?(""!==o&&i.push(o.trim()),o="",s=!1):o+=d}return(n||""!==o)&&i.push(o.trim()),i}},Rn=An;An.default=An;var Mn=$t,Tn=Rn,Pn=function(e){function t(t){var n;return(n=e.call(this,t)||this).type="rule",n.nodes||(n.nodes=[]),n}return d(t,e),l(t,[{key:"selectors",get:function(){return Tn.comma(this.selector)},set:function(e){var t=this.selector?this.selector.match(/,\s*/):null,n=t?t[0]:","+this.raw("between","beforeOpen");this.selector=e.join(n)}}]),t}(Mn),Ln=Pn;Pn.default=Pn,Mn.registerRule(Pn);var Dn=Ge,Fn=Ot,Un=xn,jn=On,Bn=Ln,$n={empty:!0,space:!0},zn=function(){function e(e){this.input=e,this.root=new jn,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:e,start:{column:1,line:1,offset:0}}}var t=e.prototype;return t.atrule=function(e){var t,n,r,i=new Un;i.name=e[1].slice(1),""===i.name&&this.unnamedAtrule(i,e),this.init(i,e[2]);for(var o=!1,s=!1,a=[],c=[];!this.tokenizer.endOfFile();){if("("===(t=(e=this.tokenizer.nextToken())[0])||"["===t?c.push("("===t?")":"]"):"{"===t&&c.length>0?c.push("}"):t===c[c.length-1]&&c.pop(),0===c.length){if(";"===t){i.source.end=this.getPosition(e[2]),i.source.end.offset++,this.semicolon=!0;break}if("{"===t){s=!0;break}if("}"===t){if(a.length>0){for(n=a[r=a.length-1];n&&"space"===n[0];)n=a[--r];n&&(i.source.end=this.getPosition(n[3]||n[2]),i.source.end.offset++)}this.end(e);break}a.push(e)}else a.push(e);if(this.tokenizer.endOfFile()){o=!0;break}}i.raws.between=this.spacesAndCommentsFromEnd(a),a.length?(i.raws.afterName=this.spacesAndCommentsFromStart(a),this.raw(i,"params",a),o&&(e=a[a.length-1],i.source.end=this.getPosition(e[3]||e[2]),i.source.end.offset++,this.spaces=i.raws.between,i.raws.between="")):(i.raws.afterName="",i.params=""),s&&(i.nodes=[],this.current=i)},t.checkMissedSemicolon=function(e){var t=this.colon(e);if(!1!==t){for(var n,r=0,i=t-1;i>=0&&("space"===(n=e[i])[0]||2!==(r+=1));i--);throw this.input.error("Missed semicolon","word"===n[0]?n[3]+1:n[2])}},t.colon=function(e){for(var t,n,r,i,o=0,s=b(e.entries());!(i=s()).done;){var a=i.value,c=a[0];if("("===(n=(t=a[1])[0])&&(o+=1),")"===n&&(o-=1),0===o&&":"===n){if(r){if("word"===r[0]&&"progid"===r[1])continue;return c}this.doubleColon(t)}r=t}return!1},t.comment=function(e){var t=new Fn;this.init(t,e[2]),t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++;var n=e[1].slice(2,-2);if(/^\s*$/.test(n))t.text="",t.raws.left=n,t.raws.right="";else{var r=n.match(/^(\s*)([^]*\S)(\s*)$/);t.text=r[2],t.raws.left=r[1],t.raws.right=r[3]}},t.createTokenizer=function(){this.tokenizer=function(e,t){void 0===t&&(t={});var n,r,i,o,s,a,c,l,u,p,d=e.css.valueOf(),h=t.ignoreErrors,f=d.length,g=0,m=[],v=[];function y(t){throw e.error("Unclosed "+t,g)}return{back:function(e){v.push(e)},endOfFile:function(){return 0===v.length&&g>=f},nextToken:function(e){if(v.length)return v.pop();if(!(g>=f)){var t=!!e&&e.ignoreUnclosed;switch(n=d.charCodeAt(g)){case tn:case nn:case on:case sn:case rn:r=g;do{r+=1,n=d.charCodeAt(r)}while(n===nn||n===tn||n===on||n===sn||n===rn);p=["space",d.slice(g,r)],g=r-1;break;case an:case cn:case pn:case dn:case gn:case hn:case un:var b=String.fromCharCode(n);p=[b,b,g];break;case ln:if(l=m.length?m.pop()[1]:"",u=d.charCodeAt(g+1),"url"===l&&u!==Zt&&u!==Xt&&u!==nn&&u!==tn&&u!==on&&u!==rn&&u!==sn){r=g;do{if(a=!1,-1===(r=d.indexOf(")",r+1))){if(h||t){r=g;break}y("bracket")}for(c=r;d.charCodeAt(c-1)===Qt;)c-=1,a=!a}while(a);p=["brackets",d.slice(g,r+1),g,r],g=r}else r=d.indexOf(")",g+1),o=d.slice(g,r+1),-1===r||bn.test(o)?p=["(","(",g]:(p=["brackets",o,g,r],g=r);break;case Zt:case Xt:i=n===Zt?"'":'"',r=g;do{if(a=!1,-1===(r=d.indexOf(i,r+1))){if(h||t){r=g+1;break}y("string")}for(c=r;d.charCodeAt(c-1)===Qt;)c-=1,a=!a}while(a);p=["string",d.slice(g,r+1),g,r],g=r;break;case mn:vn.lastIndex=g+1,vn.test(d),r=0===vn.lastIndex?d.length-1:vn.lastIndex-2,p=["at-word",d.slice(g,r+1),g,r],g=r;break;case Qt:for(r=g,s=!0;d.charCodeAt(r+1)===Qt;)r+=1,s=!s;if(n=d.charCodeAt(r+1),s&&n!==en&&n!==nn&&n!==tn&&n!==on&&n!==sn&&n!==rn&&(r+=1,wn.test(d.charAt(r)))){for(;wn.test(d.charAt(r+1));)r+=1;d.charCodeAt(r+1)===nn&&(r+=1)}p=["word",d.slice(g,r+1),g,r],g=r;break;default:n===en&&d.charCodeAt(g+1)===fn?(0===(r=d.indexOf("*/",g+2)+1)&&(h||t?r=d.length:y("comment")),p=["comment",d.slice(g,r+1),g,r],g=r):(yn.lastIndex=g+1,yn.test(d),r=0===yn.lastIndex?d.length-1:yn.lastIndex-2,p=["word",d.slice(g,r+1),g,r],m.push(p),g=r)}return g++,p}},position:function(){return g}}}(this.input)},t.decl=function(e,t){var n=new Dn;this.init(n,e[0][2]);var r,i=e[e.length-1];for(";"===i[0]&&(this.semicolon=!0,e.pop()),n.source.end=this.getPosition(i[3]||i[2]||function(e){for(var t=e.length-1;t>=0;t--){var n=e[t],r=n[3]||n[2];if(r)return r}}(e)),n.source.end.offset++;"word"!==e[0][0];)1===e.length&&this.unknownWord(e),n.raws.before+=e.shift()[1];for(n.source.start=this.getPosition(e[0][2]),n.prop="";e.length;){var o=e[0][0];if(":"===o||"space"===o||"comment"===o)break;n.prop+=e.shift()[1]}for(n.raws.between="";e.length;){if(":"===(r=e.shift())[0]){n.raws.between+=r[1];break}"word"===r[0]&&/\w/.test(r[1])&&this.unknownWord([r]),n.raws.between+=r[1]}"_"!==n.prop[0]&&"*"!==n.prop[0]||(n.raws.before+=n.prop[0],n.prop=n.prop.slice(1));for(var s,a=[];e.length&&("space"===(s=e[0][0])||"comment"===s);)a.push(e.shift());this.precheckMissedSemicolon(e);for(var c=e.length-1;c>=0;c--){if("!important"===(r=e[c])[1].toLowerCase()){n.important=!0;var l=this.stringFrom(e,c);" !important"!==(l=this.spacesFromEnd(e)+l)&&(n.raws.important=l);break}if("important"===r[1].toLowerCase()){for(var u=e.slice(0),p="",d=c;d>0;d--){var h=u[d][0];if(0===p.trim().indexOf("!")&&"space"!==h)break;p=u.pop()[1]+p}0===p.trim().indexOf("!")&&(n.important=!0,n.raws.important=p,e=u)}if("space"!==r[0]&&"comment"!==r[0])break}var f=e.some(function(e){return"space"!==e[0]&&"comment"!==e[0]});f&&(n.raws.between+=a.map(function(e){return e[1]}).join(""),a=[]),this.raw(n,"value",a.concat(e),t),n.value.includes(":")&&!t&&this.checkMissedSemicolon(e)},t.doubleColon=function(e){throw this.input.error("Double colon",{offset:e[2]},{offset:e[2]+e[1].length})},t.emptyRule=function(e){var t=new Bn;this.init(t,e[2]),t.selector="",t.raws.between="",this.current=t},t.end=function(e){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end=this.getPosition(e[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(e)},t.endFile=function(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.root.source.end=this.getPosition(this.tokenizer.position())},t.freeSemicolon=function(e){if(this.spaces+=e[1],this.current.nodes){var t=this.current.nodes[this.current.nodes.length-1];t&&"rule"===t.type&&!t.raws.ownSemicolon&&(t.raws.ownSemicolon=this.spaces,this.spaces="")}},t.getPosition=function(e){var t=this.input.fromOffset(e);return{column:t.col,line:t.line,offset:e}},t.init=function(e,t){this.current.push(e),e.source={input:this.input,start:this.getPosition(t)},e.raws.before=this.spaces,this.spaces="","comment"!==e.type&&(this.semicolon=!1)},t.other=function(e){for(var t=!1,n=null,r=!1,i=null,o=[],s=e[1].startsWith("--"),a=[],c=e;c;){if(n=c[0],a.push(c),"("===n||"["===n)i||(i=c),o.push("("===n?")":"]");else if(s&&r&&"{"===n)i||(i=c),o.push("}");else if(0===o.length){if(";"===n){if(r)return void this.decl(a,s);break}if("{"===n)return void this.rule(a);if("}"===n){this.tokenizer.back(a.pop()),t=!0;break}":"===n&&(r=!0)}else n===o[o.length-1]&&(o.pop(),0===o.length&&(i=null));c=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(t=!0),o.length>0&&this.unclosedBracket(i),t&&r){if(!s)for(;a.length&&("space"===(c=a[a.length-1][0])||"comment"===c);)this.tokenizer.back(a.pop());this.decl(a,s)}else this.unknownWord(a)},t.parse=function(){for(var e;!this.tokenizer.endOfFile();)switch((e=this.tokenizer.nextToken())[0]){case"space":this.spaces+=e[1];break;case";":this.freeSemicolon(e);break;case"}":this.end(e);break;case"comment":this.comment(e);break;case"at-word":this.atrule(e);break;case"{":this.emptyRule(e);break;default:this.other(e)}this.endFile()},t.precheckMissedSemicolon=function(){},t.raw=function(e,t,n,r){for(var i,o,s,a,c=n.length,l="",u=!0,p=0;p0},t.runAsync=function(){var e=this;return a(function(){var t,n,r,i,o,s,a,c,l,u,p,d;return _(this,function(h){switch(h.label){case 0:e.plugin=0,t=0,h.label=1;case 1:if(!(t0))return[3,13];if(!sr(a=e.visitTick(s)))return[3,12];h.label=9;case 9:return h.trys.push([9,11,,12]),[4,a];case 10:return h.sent(),[3,12];case 11:throw c=h.sent(),l=s[s.length-1].node,e.handleError(c,l);case 12:return[3,8];case 13:return[3,7];case 14:if(!e.listeners.OnceExit)return[3,18];u=function(){var t,n,r,i,s;return _(this,function(a){switch(a.label){case 0:t=d.value,n=t[0],r=t[1],e.result.lastPlugin=n,a.label=1;case 1:return a.trys.push([1,6,,7]),"document"!==o.type?[3,3]:(i=o.nodes.map(function(t){return r(t,e.helpers)}),[4,Promise.all(i)]);case 2:return a.sent(),[3,5];case 3:return[4,r(o,e.helpers)];case 4:a.sent(),a.label=5;case 5:return[3,7];case 6:throw s=a.sent(),e.handleError(s);case 7:return[2]}})},p=b(e.listeners.OnceExit),h.label=15;case 15:return(d=p()).done?[3,18]:[5,w(u())];case 16:h.sent(),h.label=17;case 17:return[3,15];case 18:return e.processed=!0,[2,e.stringify()]}})})()},t.runOnRoot=function(e){var t=this;this.result.lastPlugin=e;try{if("object"===(void 0===e?"undefined":m(e))&&e.Once){if("document"===this.result.root.type){var n=this.result.root.nodes.map(function(n){return e.Once(n,t.helpers)});return sr(n[0])?Promise.all(n):n}return e.Once(this.result.root,this.helpers)}if("function"==typeof e)return e(this.result.root,this.result)}catch(e){throw this.handleError(e)}},t.stringify=function(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();var e=this.result.opts,t=Zn;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);var n=new Yn(t,this.result.root,this.result.opts).generate();return this.result.css=n[0],this.result.map=n[1],this.result},t.sync=function(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(var e,t=b(this.plugins);!(e=t()).done;){var n=e.value;if(sr(this.runOnRoot(n)))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){for(var r=this.result.root;!r[Kn];)r[Kn]=!0,this.walkSync(r);if(this.listeners.OnceExit)if("document"===r.type)for(var i,o=b(r.nodes);!(i=o()).done;){var s=i.value;this.visitSync(this.listeners.OnceExit,s)}else this.visitSync(this.listeners.OnceExit,r)}return this.result},t.then=function(e,t){return this.async().then(e,t)},t.toString=function(){return this.css},t.visitSync=function(e,t){for(var n,r=b(e);!(n=r()).done;){var i=n.value,o=i[0],s=i[1];this.result.lastPlugin=o;var a=void 0;try{a=s(t,this.helpers)}catch(e){throw this.handleError(e,t.proxyOf)}if("root"!==t.type&&"document"!==t.type&&!t.parent)return!0;if(sr(a))throw this.getAsyncError()}},t.visitTick=function(e){var t=e[e.length-1],n=t.node,r=t.visitors;if("root"===n.type||"document"===n.type||n.parent){if(r.length>0&&t.visitorIndex",void 0!==this.line&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason},n.showSourceCode=function(e){var t=this;if(!this.source)return"";var n=this.source;null==e&&(e=ui.isColorSupported),pi&&e&&(n=pi(n));var r,i,o=n.split(/\r?\n/),s=Math.max(this.line-3,0),a=Math.min(this.line+2,o.length),c=String(a).length;if(e){var l=ui.createColors(!0),u=l.bold,p=l.gray,d=l.red;r=function(e){return u(d(e))},i=function(e){return p(e)}}else r=i=function(e){return e};return o.slice(s,a).map(function(e,n){var o=s+1+n,a=" "+(" "+o).slice(-c)+" | ";if(o===t.line){var l=i(a.replace(/\d/g," "))+e.slice(0,t.column-1).replace(/[^\t]/g," ");return r(">")+i(a)+e+"\n "+l+r("^")}return" "+i(a)+e}).join("\n")},n.toString=function(){var e=this.showSourceCode();return e&&(e="\n\n"+e+"\n"),this.name+": "+this.message+e},t}(v(Error)),hi=di;di.default=di;var fi={};fi.isClean=Symbol("isClean"),fi.my=Symbol("my");var gi={after:"\n",beforeClose:"\n",beforeComment:"\n",beforeDecl:"\n",beforeOpen:" ",beforeRule:"\n",colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1},mi=function(){function e(e){this.builder=e}var t=e.prototype;return t.atrule=function(e,t){var n="@"+e.name,r=e.params?this.rawValue(e,"params"):"";if(void 0!==e.raws.afterName?n+=e.raws.afterName:r&&(n+=" "),e.nodes)this.block(e,n+r);else{var i=(e.raws.between||"")+(t?";":"");this.builder(n+r+i,e)}},t.beforeAfter=function(e,t){var n;n="decl"===e.type?this.raw(e,null,"beforeDecl"):"comment"===e.type?this.raw(e,null,"beforeComment"):"before"===t?this.raw(e,null,"beforeRule"):this.raw(e,null,"beforeClose");for(var r=e.parent,i=0;r&&"root"!==r.type;)i+=1,r=r.parent;if(n.includes("\n")){var o=this.raw(e,null,"indent");if(o.length)for(var s=0;s0&&"comment"===e.nodes[t].type;)t-=1;for(var n=this.raw(e,"semicolon"),r=0;r0&&void 0!==e.raws.after)return(t=e.raws.after).includes("\n")&&(t=t.replace(/[^\n]+$/,"")),!1}),t&&(t=t.replace(/\S/g,"")),t},t.rawBeforeComment=function(e,t){var n;return e.walkComments(function(e){if(void 0!==e.raws.before)return(n=e.raws.before).includes("\n")&&(n=n.replace(/[^\n]+$/,"")),!1}),void 0===n?n=this.raw(t,null,"beforeDecl"):n&&(n=n.replace(/\S/g,"")),n},t.rawBeforeDecl=function(e,t){var n;return e.walkDecls(function(e){if(void 0!==e.raws.before)return(n=e.raws.before).includes("\n")&&(n=n.replace(/[^\n]+$/,"")),!1}),void 0===n?n=this.raw(t,null,"beforeRule"):n&&(n=n.replace(/\S/g,"")),n},t.rawBeforeOpen=function(e){var t;return e.walk(function(e){if("decl"!==e.type&&void 0!==(t=e.raws.between))return!1}),t},t.rawBeforeRule=function(e){var t;return e.walk(function(n){if(n.nodes&&(n.parent!==e||e.first!==n)&&void 0!==n.raws.before)return(t=n.raws.before).includes("\n")&&(t=t.replace(/[^\n]+$/,"")),!1}),t&&(t=t.replace(/\S/g,"")),t},t.rawColon=function(e){var t;return e.walkDecls(function(e){if(void 0!==e.raws.between)return t=e.raws.between.replace(/[^\s:]/g,""),!1}),t},t.rawEmptyBody=function(e){var t;return e.walk(function(e){if(e.nodes&&0===e.nodes.length&&void 0!==(t=e.raws.after))return!1}),t},t.rawIndent=function(e){return e.raws.indent?e.raws.indent:(e.walk(function(n){var r=n.parent;if(r&&r!==e&&r.parent&&r.parent===e&&void 0!==n.raws.before){var i=n.raws.before.split("\n");return t=(t=i[i.length-1]).replace(/\S/g,""),!1}}),t);var t},t.rawSemicolon=function(e){var t;return e.walk(function(e){if(e.nodes&&e.nodes.length&&"decl"===e.last.type&&void 0!==(t=e.raws.semicolon))return!1}),t},t.rawValue=function(e,t){var n=e[t],r=e.raws[t];return r&&r.value===n?r.raw:n},t.root=function(e){this.body(e),e.raws.after&&this.builder(e.raws.after)},t.rule=function(e){this.block(e,this.rawValue(e,"selector")),e.raws.ownSemicolon&&this.builder(e.raws.ownSemicolon,e,"end")},t.stringify=function(e,t){if(!this[e.type])throw new Error("Unknown AST node type "+e.type+". Maybe you need to change PostCSS stringifier.");this[e.type](e,t)},e}(),vi=mi;mi.default=mi;var yi=vi;function bi(e,t){new yi(t).stringify(e)}var _i=bi;bi.default=bi;var wi=fi.isClean,ki=fi.my,Si=hi,xi=vi,Ci=_i;function Ei(e,t){var n=new e.constructor;for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)&&"proxyCache"!==r){var i=e[r],o=void 0===i?"undefined":m(i);"parent"===r&&"object"===o?t&&(n[r]=t):"source"===r?n[r]=i:Array.isArray(i)?n[r]=i.map(function(e){return Ei(e,n)}):("object"===o&&null!==i&&(i=Ei(i)),n[r]=i)}return n}var Ii=function(){function e(e){for(var t in void 0===e&&(e={}),this.raws={},this[wi]=!1,this[ki]=!0,e)if("nodes"===t){this.nodes=[];for(var n,r=b(e[t]);!(n=r()).done;){var i=n.value;"function"==typeof i.clone?this.append(i.clone()):this.append(i)}}else this[t]=e[t]}var t=e.prototype;return t.addToError=function(e){if(e.postcssNode=this,e.stack&&this.source&&/\n\s{4}at /.test(e.stack)){var t=this.source;e.stack=e.stack.replace(/\n\s{4}at /,"$&"+t.input.from+":"+t.start.line+":"+t.start.column+"$&")}return e},t.after=function(e){return this.parent.insertAfter(this,e),this},t.assign=function(e){for(var t in void 0===e&&(e={}),e)this[t]=e[t];return this},t.before=function(e){return this.parent.insertBefore(this,e),this},t.cleanRaws=function(e){delete this.raws.before,delete this.raws.after,e||delete this.raws.between},t.clone=function(e){void 0===e&&(e={});var t=Ei(this);for(var n in e)t[n]=e[n];return t},t.cloneAfter=function(e){void 0===e&&(e={});var t=this.clone(e);return this.parent.insertAfter(this,t),t},t.cloneBefore=function(e){void 0===e&&(e={});var t=this.clone(e);return this.parent.insertBefore(this,t),t},t.error=function(e,t){if(void 0===t&&(t={}),this.source){var n=this.rangeBy(t),r=n.end,i=n.start;return this.source.input.error(e,{column:i.column,line:i.line},{column:r.column,line:r.line},t)}return new Si(e)},t.getProxyProcessor=function(){return{get:function(e,t){return"proxyOf"===t?e:"root"===t?function(){return e.root().toProxy()}:e[t]},set:function(e,t,n){return e[t]===n||(e[t]=n,"prop"!==t&&"value"!==t&&"name"!==t&&"params"!==t&&"important"!==t&&"text"!==t||e.markDirty()),!0}}},t.markDirty=function(){if(this[wi]){this[wi]=!1;for(var e=this;e=e.parent;)e[wi]=!1}},t.next=function(){if(this.parent){var e=this.parent.index(this);return this.parent.nodes[e+1]}},t.positionBy=function(e,t){var n=this.source.start;if(e.index)n=this.positionInside(e.index,t);else if(e.word){var r=(t=this.toString()).indexOf(e.word);-1!==r&&(n=this.positionInside(r,t))}return n},t.positionInside=function(e,t){for(var n=t||this.toString(),r=this.source.start.column,i=this.source.start.line,o=0;o-1&&r>-1&&(this.annotation=this.getAnnotationURL(e.substring(n,r)))}},t.loadFile=function(e){if(this.root=Li(e),Ti(e))return this.mapFile=e,Pi(e,"utf-8").toString().trim()},t.loadMap=function(e,t){if(!1===t)return!1;if(t){if("string"==typeof t)return t;if("function"!=typeof t){if(h(t,Ri))return Mi.fromSourceMap(t).toString();if(h(t,Mi))return t.toString();if(this.isMap(t))return JSON.stringify(t);throw new Error("Unsupported previous source map format: "+t.toString())}var n=t(e);if(n){var r=this.loadFile(n);if(!r)throw new Error("Unable to load previous source map: "+n.toString());return r}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){var i=this.annotation;return e&&(i=Di(Li(e),i)),this.loadFile(i)}}},t.startWith=function(e,t){return!!e&&e.substr(0,t.length)===t},t.withContent=function(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)},e}(),Ui=Fi;Fi.default=Fi;var ji=li.SourceMapConsumer,Bi=li.SourceMapGenerator,$i=li.fileURLToPath,zi=li.pathToFileURL,qi=li.isAbsolute,Vi=li.resolve,Wi=function(e){void 0===e&&(e=21);for(var t="",n=e;n--;)t+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[64*Math.random()|0];return t},Hi=li,Gi=hi,Ki=Ui,Ji=Symbol("fromOffsetCache"),Yi=Boolean(ji&&Bi),Zi=Boolean(Vi&&qi),Xi=function(){function e(e,t){if(void 0===t&&(t={}),null==e||"object"===(void 0===e?"undefined":m(e))&&!e.toString)throw new Error("PostCSS received "+e+" instead of CSS string");if(this.css=e.toString(),"\ufeff"===this.css[0]||"￾"===this.css[0]?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,t.from&&(!Zi||/^\w+:\/\//.test(t.from)||qi(t.from)?this.file=t.from:this.file=Vi(t.from)),Zi&&Yi){var n=new Ki(this.css,t);if(n.text){this.map=n;var r=n.consumer().file;!this.file&&r&&(this.file=this.mapResolve(r))}}this.file||(this.id=""),this.map&&(this.map.file=this.from)}var t=e.prototype;return t.error=function(e,t,n,r){var i,o,s;if(void 0===r&&(r={}),t&&"object"===(void 0===t?"undefined":m(t))){var a=t,c=n;if("number"==typeof a.offset){var l=this.fromOffset(a.offset);t=l.line,n=l.col}else t=a.line,n=a.column;if("number"==typeof c.offset){var u=this.fromOffset(c.offset);o=u.line,s=u.col}else o=c.line,s=c.column}else if(!n){var p=this.fromOffset(t);t=p.line,n=p.col}var d=this.origin(t,n,o,s);return(i=d?new Gi(e,void 0===d.endLine?d.line:{column:d.column,line:d.line},void 0===d.endLine?d.column:{column:d.endColumn,line:d.endLine},d.source,d.file,r.plugin):new Gi(e,void 0===o?t:{column:n,line:t},void 0===o?n:{column:s,line:o},this.css,this.file,r.plugin)).input={column:n,endColumn:s,endLine:o,line:t,source:this.css},this.file&&(zi&&(i.input.url=zi(this.file).toString()),i.input.file=this.file),i},t.fromOffset=function(e){var t;if(this[Ji])t=this[Ji];else{var n=this.css.split("\n");t=new Array(n.length);for(var r=0,i=0,o=n.length;i=t[t.length-1])s=t.length-1;else for(var a,c=t.length-2;s>1)])c=a-1;else{if(!(e>=t[a+1])){s=a;break}s=a+1}return{col:e-t[s]+1,line:s+1}},t.mapResolve=function(e){return/^\w+:\/\//.test(e)?e:Vi(this.map.consumer().sourceRoot||this.map.root||".",e)},t.origin=function(e,t,n,r){if(!this.map)return!1;var i,o,s=this.map.consumer(),a=s.originalPositionFor({column:t,line:e});if(!a.source)return!1;"number"==typeof n&&(i=s.originalPositionFor({column:r,line:n})),o=qi(a.source)?zi(a.source):new URL(a.source,this.map.consumer().sourceRoot||zi(this.map.mapFile));var c={column:a.column,endColumn:i&&i.column,endLine:i&&i.line,line:a.line,url:o.toString()};if("file:"===o.protocol){if(!$i)throw new Error("file: protocol is not available in this PostCSS build");c.file=$i(o)}var l=s.sourceContentFor(a.source);return l&&(c.source=l),c},t.toJSON=function(){for(var e={},t=0,n=["hasBOM","css","file","id"];t=0;t--)"comment"===(e=this.root.nodes[t]).type&&0===e.text.indexOf("# sourceMappingURL=")&&this.root.removeChild(t);else this.css&&(this.css=this.css.replace(/\n*?\/\*#[\S\s]*?\*\/$/gm,""))},t.generate=function(){if(this.clearAnnotation(),lo&&co&&this.isMap())return this.generateMap();var e="";return this.stringify(this.root,function(t){e+=t}),[e]},t.generateMap=function(){if(this.root)this.generateString();else if(1===this.previous().length){var e=this.previous()[0].consumer();e.file=this.outputFile(),this.map=to.fromSourceMap(e,{ignoreInvalidMapping:!0})}else this.map=new to({file:this.outputFile(),ignoreInvalidMapping:!0}),this.map.addMapping({generated:{column:0,line:1},original:{column:0,line:1},source:this.opts.from?this.toUrl(this.path(this.opts.from)):""});return this.isSourcesContent()&&this.setSourcesContent(),this.root&&this.previous().length>0&&this.applyPrevMaps(),this.isAnnotation()&&this.addAnnotation(),this.isInline()?[this.css]:[this.css,this.map]},t.generateString=function(){var e=this;this.css="",this.map=new to({file:this.outputFile(),ignoreInvalidMapping:!0});var t,n,r=1,i=1,o="",s={generated:{column:0,line:0},original:{column:0,line:0},source:""};this.stringify(this.root,function(a,c,l){if(e.css+=a,c&&"end"!==l&&(s.generated.line=r,s.generated.column=i-1,c.source&&c.source.start?(s.source=e.sourcePath(c),s.original.line=c.source.start.line,s.original.column=c.source.start.column-1,e.map.addMapping(s)):(s.source=o,s.original.line=1,s.original.column=0,e.map.addMapping(s))),(t=a.match(/\n/g))?(r+=t.length,n=a.lastIndexOf("\n"),i=a.length-n):i+=a.length,c&&"start"!==l){var u=c.parent||{raws:{}};("decl"===c.type||"atrule"===c.type&&!c.nodes)&&c===u.last&&!u.raws.semicolon||(c.source&&c.source.end?(s.source=e.sourcePath(c),s.original.line=c.source.end.line,s.original.column=c.source.end.column-1,s.generated.line=r,s.generated.column=i-2,e.map.addMapping(s)):(s.source=o,s.original.line=1,s.original.column=0,s.generated.line=r,s.generated.column=i-1,e.map.addMapping(s)))}})},t.isAnnotation=function(){return!!this.isInline()||(void 0!==this.mapOpts.annotation?this.mapOpts.annotation:!this.previous().length||this.previous().some(function(e){return e.annotation}))},t.isInline=function(){if(void 0!==this.mapOpts.inline)return this.mapOpts.inline;var e=this.mapOpts.annotation;return(void 0===e||!0===e)&&(!this.previous().length||this.previous().some(function(e){return e.inline}))},t.isMap=function(){return void 0!==this.opts.map?!!this.opts.map:this.previous().length>0},t.isSourcesContent=function(){return void 0!==this.mapOpts.sourcesContent?this.mapOpts.sourcesContent:!this.previous().length||this.previous().some(function(e){return e.withContent()})},t.outputFile=function(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"},t.path=function(e){if(this.mapOpts.absolute)return e;if(60===e.charCodeAt(0))return e;if(/^\w+:\/\//.test(e))return e;var t=this.memoizedPaths.get(e);if(t)return t;var n=this.opts.to?no(this.opts.to):".";"string"==typeof this.mapOpts.annotation&&(n=no(io(n,this.mapOpts.annotation)));var r=ro(n,e);return this.memoizedPaths.set(e,r),r},t.previous=function(){var e=this;if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(function(t){if(t.source&&t.source.input.map){var n=t.source.input.map;e.previousMaps.includes(n)||e.previousMaps.push(n)}});else{var t=new ao(this.originalCSS,this.opts);t.map&&this.previousMaps.push(t.map)}return this.previousMaps},t.setSourcesContent=function(){var e=this,t={};if(this.root)this.root.walk(function(n){if(n.source){var r=n.source.input.from;if(r&&!t[r]){t[r]=!0;var i=e.usesFileUrls?e.toFileUrl(r):e.toUrl(e.path(r));e.map.setSourceContent(i,n.source.input.css)}}});else if(this.css){var n=this.opts.from?this.toUrl(this.path(this.opts.from)):"";this.map.setSourceContent(n,this.css)}},t.sourcePath=function(e){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(e.source.input.from):this.toUrl(this.path(e.source.input.from))},t.toBase64=function(e){return Buffer?Buffer.from(e).toString("base64"):window.btoa(unescape(encodeURIComponent(e)))},t.toFileUrl=function(e){var t=this.memoizedFileURLs.get(e);if(t)return t;if(so){var n=so(e).toString();return this.memoizedFileURLs.set(e,n),n}throw new Error("`map.absolute` option is not available in this PostCSS build")},t.toUrl=function(e){var t=this.memoizedURLs.get(e);if(t)return t;"\\"===oo&&(e=e.replace(/\\/g,"/"));var n=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,n),n},e}(),po=function(e){function t(t){var n;return(n=e.call(this,t)||this).type="comment",n}return d(t,e),t}(Ni),ho=po;po.default=po;var fo,go,mo,vo,yo=fi.isClean,bo=fi.my,_o=Ai,wo=ho;function ko(e){return e.map(function(e){return e.nodes&&(e.nodes=ko(e.nodes)),delete e.source,e})}function So(e){if(e[yo]=!1,e.proxyOf.nodes)for(var t,n=b(e.proxyOf.nodes);!(t=n()).done;)So(t.value)}var xo=function(e){function t(){return e.apply(this,arguments)||this}d(t,e);var n=t.prototype;return n.append=function(){for(var e=arguments.length,t=new Array(e),n=0;n1?t-1:0),i=1;i=e&&(this.indexes[n]=t-1);return this.markDirty(),this},n.replaceValues=function(e,t,n){return n||(n=t,t={}),this.walkDecls(function(r){t.props&&!t.props.includes(r.prop)||t.fast&&!r.value.includes(t.fast)||(r.value=r.value.replace(e,n))}),this.markDirty(),this},n.some=function(e){return this.nodes.some(e)},n.walk=function(e){return this.each(function(t,n){var r;try{r=e(t,n)}catch(e){throw t.addToError(e)}return!1!==r&&t.walk&&(r=t.walk(e)),r})},n.walkAtRules=function(e,t){return t?h(e,RegExp)?this.walk(function(n,r){if("atrule"===n.type&&e.test(n.name))return t(n,r)}):this.walk(function(n,r){if("atrule"===n.type&&n.name===e)return t(n,r)}):(t=e,this.walk(function(e,n){if("atrule"===e.type)return t(e,n)}))},n.walkComments=function(e){return this.walk(function(t,n){if("comment"===t.type)return e(t,n)})},n.walkDecls=function(e,t){return t?h(e,RegExp)?this.walk(function(n,r){if("decl"===n.type&&e.test(n.prop))return t(n,r)}):this.walk(function(n,r){if("decl"===n.type&&n.prop===e)return t(n,r)}):(t=e,this.walk(function(e,n){if("decl"===e.type)return t(e,n)}))},n.walkRules=function(e,t){return t?h(e,RegExp)?this.walk(function(n,r){if("rule"===n.type&&e.test(n.selector))return t(n,r)}):this.walk(function(n,r){if("rule"===n.type&&n.selector===e)return t(n,r)}):(t=e,this.walk(function(e,n){if("rule"===e.type)return t(e,n)}))},l(t,[{key:"first",get:function(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}},{key:"last",get:function(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}}]),t}(Ni);xo.registerParse=function(e){fo=e},xo.registerRule=function(e){go=e},xo.registerAtRule=function(e){mo=e},xo.registerRoot=function(e){vo=e};var Co=xo;xo.default=xo,xo.rebuild=function(e){"atrule"===e.type?Object.setPrototypeOf(e,mo.prototype):"rule"===e.type?Object.setPrototypeOf(e,go.prototype):"decl"===e.type?Object.setPrototypeOf(e,_o.prototype):"comment"===e.type?Object.setPrototypeOf(e,wo.prototype):"root"===e.type&&Object.setPrototypeOf(e,vo.prototype),e[bo]=!0,e.nodes&&e.nodes.forEach(function(e){xo.rebuild(e)})};var Eo,Io,No=function(e){function t(t){var n;return(n=e.call(this,u({type:"document"},t))||this).nodes||(n.nodes=[]),n}return d(t,e),t.prototype.toResult=function(e){return void 0===e&&(e={}),new Eo(new Io,this,e).stringify()},t}(Co);No.registerLazyResult=function(e){Eo=e},No.registerProcessor=function(e){Io=e};var Oo=No;No.default=No;var Ao=function(){function e(e,t){if(void 0===t&&(t={}),this.type="warning",this.text=e,t.node&&t.node.source){var n=t.node.rangeBy(t);this.line=n.start.line,this.column=n.start.column,this.endLine=n.end.line,this.endColumn=n.end.column}for(var r in t)this[r]=t[r]}return e.prototype.toString=function(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text},e}(),Ro=Ao;Ao.default=Ao;var Mo=Ro,To=function(){function e(e,t,n){this.processor=e,this.messages=[],this.root=t,this.opts=n,this.css=void 0,this.map=void 0}var t=e.prototype;return t.toString=function(){return this.css},t.warn=function(e,t){void 0===t&&(t={}),t.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(t.plugin=this.lastPlugin.postcssPlugin);var n=new Mo(e,t);return this.messages.push(n),n},t.warnings=function(){return this.messages.filter(function(e){return"warning"===e.type})},l(e,[{key:"content",get:function(){return this.css}}]),e}(),Po=To;To.default=To;var Lo="'".charCodeAt(0),Do='"'.charCodeAt(0),Fo="\\".charCodeAt(0),Uo="/".charCodeAt(0),jo="\n".charCodeAt(0),Bo=" ".charCodeAt(0),$o="\f".charCodeAt(0),zo="\t".charCodeAt(0),qo="\r".charCodeAt(0),Vo="[".charCodeAt(0),Wo="]".charCodeAt(0),Ho="(".charCodeAt(0),Go=")".charCodeAt(0),Ko="{".charCodeAt(0),Jo="}".charCodeAt(0),Yo=";".charCodeAt(0),Zo="*".charCodeAt(0),Xo=":".charCodeAt(0),Qo="@".charCodeAt(0),es=/[\t\n\f\r "#'()/;[\\\]{}]/g,ts=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,ns=/.[\r\n"'(/\\]/,rs=/[\da-f]/i,is=Co,os=function(e){function t(t){var n;return(n=e.call(this,t)||this).type="atrule",n}d(t,e);var n=t.prototype;return n.append=function(){for(var t=arguments.length,n=new Array(t),r=0;r1?n.raws.before=this.nodes[1].raws.before:delete n.raws.before;else if(this.first!==n)for(var o,s=b(i);!(o=s()).done;)o.value.raws.before=n.raws.before;return i},n.removeChild=function(t,n){var r=this.index(t);return!n&&0===r&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[r].raws.before),e.prototype.removeChild.call(this,t)},n.toResult=function(e){return void 0===e&&(e={}),new as(new cs,this,e).stringify()},t}(ls);us.registerLazyResult=function(e){as=e},us.registerProcessor=function(e){cs=e};var ps=us;us.default=us,ls.registerRoot(us);var ds={comma:function(e){return ds.split(e,[","],!0)},space:function(e){return ds.split(e,[" ","\n","\t"])},split:function(e,t,n){for(var r,i=[],o="",s=!1,a=0,c=!1,l="",u=!1,p=b(e);!(r=p()).done;){var d=r.value;u?u=!1:"\\"===d?u=!0:c?d===l&&(c=!1):'"'===d||"'"===d?(c=!0,l=d):"("===d?a+=1:")"===d?a>0&&(a-=1):0===a&&t.includes(d)&&(s=!0),s?(""!==o&&i.push(o.trim()),o="",s=!1):o+=d}return(n||""!==o)&&i.push(o.trim()),i}},hs=ds;ds.default=ds;var fs=Co,gs=hs,ms=function(e){function t(t){var n;return(n=e.call(this,t)||this).type="rule",n.nodes||(n.nodes=[]),n}return d(t,e),l(t,[{key:"selectors",get:function(){return gs.comma(this.selector)},set:function(e){var t=this.selector?this.selector.match(/,\s*/):null,n=t?t[0]:","+this.raw("between","beforeOpen");this.selector=e.join(n)}}]),t}(fs),vs=ms;ms.default=ms,fs.registerRule(ms);var ys=Ai,bs=ho,_s=ss,ws=ps,ks=vs,Ss={empty:!0,space:!0},xs=function(){function e(e){this.input=e,this.root=new ws,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:e,start:{column:1,line:1,offset:0}}}var t=e.prototype;return t.atrule=function(e){var t,n,r,i=new _s;i.name=e[1].slice(1),""===i.name&&this.unnamedAtrule(i,e),this.init(i,e[2]);for(var o=!1,s=!1,a=[],c=[];!this.tokenizer.endOfFile();){if("("===(t=(e=this.tokenizer.nextToken())[0])||"["===t?c.push("("===t?")":"]"):"{"===t&&c.length>0?c.push("}"):t===c[c.length-1]&&c.pop(),0===c.length){if(";"===t){i.source.end=this.getPosition(e[2]),i.source.end.offset++,this.semicolon=!0;break}if("{"===t){s=!0;break}if("}"===t){if(a.length>0){for(n=a[r=a.length-1];n&&"space"===n[0];)n=a[--r];n&&(i.source.end=this.getPosition(n[3]||n[2]),i.source.end.offset++)}this.end(e);break}a.push(e)}else a.push(e);if(this.tokenizer.endOfFile()){o=!0;break}}i.raws.between=this.spacesAndCommentsFromEnd(a),a.length?(i.raws.afterName=this.spacesAndCommentsFromStart(a),this.raw(i,"params",a),o&&(e=a[a.length-1],i.source.end=this.getPosition(e[3]||e[2]),i.source.end.offset++,this.spaces=i.raws.between,i.raws.between="")):(i.raws.afterName="",i.params=""),s&&(i.nodes=[],this.current=i)},t.checkMissedSemicolon=function(e){var t=this.colon(e);if(!1!==t){for(var n,r=0,i=t-1;i>=0&&("space"===(n=e[i])[0]||2!==(r+=1));i--);throw this.input.error("Missed semicolon","word"===n[0]?n[3]+1:n[2])}},t.colon=function(e){for(var t,n,r,i,o=0,s=b(e.entries());!(i=s()).done;){var a=i.value,c=a[0];if("("===(n=(t=a[1])[0])&&(o+=1),")"===n&&(o-=1),0===o&&":"===n){if(r){if("word"===r[0]&&"progid"===r[1])continue;return c}this.doubleColon(t)}r=t}return!1},t.comment=function(e){var t=new bs;this.init(t,e[2]),t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++;var n=e[1].slice(2,-2);if(/^\s*$/.test(n))t.text="",t.raws.left=n,t.raws.right="";else{var r=n.match(/^(\s*)([^]*\S)(\s*)$/);t.text=r[2],t.raws.left=r[1],t.raws.right=r[3]}},t.createTokenizer=function(){this.tokenizer=function(e,t){void 0===t&&(t={});var n,r,i,o,s,a,c,l,u,p,d=e.css.valueOf(),h=t.ignoreErrors,f=d.length,g=0,m=[],v=[];function y(t){throw e.error("Unclosed "+t,g)}return{back:function(e){v.push(e)},endOfFile:function(){return 0===v.length&&g>=f},nextToken:function(e){if(v.length)return v.pop();if(!(g>=f)){var t=!!e&&e.ignoreUnclosed;switch(n=d.charCodeAt(g)){case jo:case Bo:case zo:case qo:case $o:r=g;do{r+=1,n=d.charCodeAt(r)}while(n===Bo||n===jo||n===zo||n===qo||n===$o);p=["space",d.slice(g,r)],g=r-1;break;case Vo:case Wo:case Ko:case Jo:case Xo:case Yo:case Go:var b=String.fromCharCode(n);p=[b,b,g];break;case Ho:if(l=m.length?m.pop()[1]:"",u=d.charCodeAt(g+1),"url"===l&&u!==Lo&&u!==Do&&u!==Bo&&u!==jo&&u!==zo&&u!==$o&&u!==qo){r=g;do{if(a=!1,-1===(r=d.indexOf(")",r+1))){if(h||t){r=g;break}y("bracket")}for(c=r;d.charCodeAt(c-1)===Fo;)c-=1,a=!a}while(a);p=["brackets",d.slice(g,r+1),g,r],g=r}else r=d.indexOf(")",g+1),o=d.slice(g,r+1),-1===r||ns.test(o)?p=["(","(",g]:(p=["brackets",o,g,r],g=r);break;case Lo:case Do:i=n===Lo?"'":'"',r=g;do{if(a=!1,-1===(r=d.indexOf(i,r+1))){if(h||t){r=g+1;break}y("string")}for(c=r;d.charCodeAt(c-1)===Fo;)c-=1,a=!a}while(a);p=["string",d.slice(g,r+1),g,r],g=r;break;case Qo:es.lastIndex=g+1,es.test(d),r=0===es.lastIndex?d.length-1:es.lastIndex-2,p=["at-word",d.slice(g,r+1),g,r],g=r;break;case Fo:for(r=g,s=!0;d.charCodeAt(r+1)===Fo;)r+=1,s=!s;if(n=d.charCodeAt(r+1),s&&n!==Uo&&n!==Bo&&n!==jo&&n!==zo&&n!==qo&&n!==$o&&(r+=1,rs.test(d.charAt(r)))){for(;rs.test(d.charAt(r+1));)r+=1;d.charCodeAt(r+1)===Bo&&(r+=1)}p=["word",d.slice(g,r+1),g,r],g=r;break;default:n===Uo&&d.charCodeAt(g+1)===Zo?(0===(r=d.indexOf("*/",g+2)+1)&&(h||t?r=d.length:y("comment")),p=["comment",d.slice(g,r+1),g,r],g=r):(ts.lastIndex=g+1,ts.test(d),r=0===ts.lastIndex?d.length-1:ts.lastIndex-2,p=["word",d.slice(g,r+1),g,r],m.push(p),g=r)}return g++,p}},position:function(){return g}}}(this.input)},t.decl=function(e,t){var n=new ys;this.init(n,e[0][2]);var r,i=e[e.length-1];for(";"===i[0]&&(this.semicolon=!0,e.pop()),n.source.end=this.getPosition(i[3]||i[2]||function(e){for(var t=e.length-1;t>=0;t--){var n=e[t],r=n[3]||n[2];if(r)return r}}(e)),n.source.end.offset++;"word"!==e[0][0];)1===e.length&&this.unknownWord(e),n.raws.before+=e.shift()[1];for(n.source.start=this.getPosition(e[0][2]),n.prop="";e.length;){var o=e[0][0];if(":"===o||"space"===o||"comment"===o)break;n.prop+=e.shift()[1]}for(n.raws.between="";e.length;){if(":"===(r=e.shift())[0]){n.raws.between+=r[1];break}"word"===r[0]&&/\w/.test(r[1])&&this.unknownWord([r]),n.raws.between+=r[1]}"_"!==n.prop[0]&&"*"!==n.prop[0]||(n.raws.before+=n.prop[0],n.prop=n.prop.slice(1));for(var s,a=[];e.length&&("space"===(s=e[0][0])||"comment"===s);)a.push(e.shift());this.precheckMissedSemicolon(e);for(var c=e.length-1;c>=0;c--){if("!important"===(r=e[c])[1].toLowerCase()){n.important=!0;var l=this.stringFrom(e,c);" !important"!==(l=this.spacesFromEnd(e)+l)&&(n.raws.important=l);break}if("important"===r[1].toLowerCase()){for(var u=e.slice(0),p="",d=c;d>0;d--){var h=u[d][0];if(0===p.trim().indexOf("!")&&"space"!==h)break;p=u.pop()[1]+p}0===p.trim().indexOf("!")&&(n.important=!0,n.raws.important=p,e=u)}if("space"!==r[0]&&"comment"!==r[0])break}var f=e.some(function(e){return"space"!==e[0]&&"comment"!==e[0]});f&&(n.raws.between+=a.map(function(e){return e[1]}).join(""),a=[]),this.raw(n,"value",a.concat(e),t),n.value.includes(":")&&!t&&this.checkMissedSemicolon(e)},t.doubleColon=function(e){throw this.input.error("Double colon",{offset:e[2]},{offset:e[2]+e[1].length})},t.emptyRule=function(e){var t=new ks;this.init(t,e[2]),t.selector="",t.raws.between="",this.current=t},t.end=function(e){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end=this.getPosition(e[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(e)},t.endFile=function(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.root.source.end=this.getPosition(this.tokenizer.position())},t.freeSemicolon=function(e){if(this.spaces+=e[1],this.current.nodes){var t=this.current.nodes[this.current.nodes.length-1];t&&"rule"===t.type&&!t.raws.ownSemicolon&&(t.raws.ownSemicolon=this.spaces,this.spaces="")}},t.getPosition=function(e){var t=this.input.fromOffset(e);return{column:t.col,line:t.line,offset:e}},t.init=function(e,t){this.current.push(e),e.source={input:this.input,start:this.getPosition(t)},e.raws.before=this.spaces,this.spaces="","comment"!==e.type&&(this.semicolon=!1)},t.other=function(e){for(var t=!1,n=null,r=!1,i=null,o=[],s=e[1].startsWith("--"),a=[],c=e;c;){if(n=c[0],a.push(c),"("===n||"["===n)i||(i=c),o.push("("===n?")":"]");else if(s&&r&&"{"===n)i||(i=c),o.push("}");else if(0===o.length){if(";"===n){if(r)return void this.decl(a,s);break}if("{"===n)return void this.rule(a);if("}"===n){this.tokenizer.back(a.pop()),t=!0;break}":"===n&&(r=!0)}else n===o[o.length-1]&&(o.pop(),0===o.length&&(i=null));c=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(t=!0),o.length>0&&this.unclosedBracket(i),t&&r){if(!s)for(;a.length&&("space"===(c=a[a.length-1][0])||"comment"===c);)this.tokenizer.back(a.pop());this.decl(a,s)}else this.unknownWord(a)},t.parse=function(){for(var e;!this.tokenizer.endOfFile();)switch((e=this.tokenizer.nextToken())[0]){case"space":this.spaces+=e[1];break;case";":this.freeSemicolon(e);break;case"}":this.end(e);break;case"comment":this.comment(e);break;case"at-word":this.atrule(e);break;case"{":this.emptyRule(e);break;default:this.other(e)}this.endFile()},t.precheckMissedSemicolon=function(){},t.raw=function(e,t,n,r){for(var i,o,s,a,c=n.length,l="",u=!0,p=0;p0},t.runAsync=function(){var e=this;return a(function(){var t,n,r,i,o,s,a,c,l,u,p,d;return _(this,function(h){switch(h.label){case 0:e.plugin=0,t=0,h.label=1;case 1:if(!(t0))return[3,13];if(!zs(a=e.visitTick(s)))return[3,12];h.label=9;case 9:return h.trys.push([9,11,,12]),[4,a];case 10:return h.sent(),[3,12];case 11:throw c=h.sent(),l=s[s.length-1].node,e.handleError(c,l);case 12:return[3,8];case 13:return[3,7];case 14:if(!e.listeners.OnceExit)return[3,18];u=function(){var t,n,r,i,s;return _(this,function(a){switch(a.label){case 0:t=d.value,n=t[0],r=t[1],e.result.lastPlugin=n,a.label=1;case 1:return a.trys.push([1,6,,7]),"document"!==o.type?[3,3]:(i=o.nodes.map(function(t){return r(t,e.helpers)}),[4,Promise.all(i)]);case 2:return a.sent(),[3,5];case 3:return[4,r(o,e.helpers)];case 4:a.sent(),a.label=5;case 5:return[3,7];case 6:throw s=a.sent(),e.handleError(s);case 7:return[2]}})},p=b(e.listeners.OnceExit),h.label=15;case 15:return(d=p()).done?[3,18]:[5,w(u())];case 16:h.sent(),h.label=17;case 17:return[3,15];case 18:return e.processed=!0,[2,e.stringify()]}})})()},t.runOnRoot=function(e){var t=this;this.result.lastPlugin=e;try{if("object"===(void 0===e?"undefined":m(e))&&e.Once){if("document"===this.result.root.type){var n=this.result.root.nodes.map(function(n){return e.Once(n,t.helpers)});return zs(n[0])?Promise.all(n):n}return e.Once(this.result.root,this.helpers)}if("function"==typeof e)return e(this.result.root,this.result)}catch(e){throw this.handleError(e)}},t.stringify=function(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();var e=this.result.opts,t=Ts;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);var n=new Ms(t,this.result.root,this.result.opts).generate();return this.result.css=n[0],this.result.map=n[1],this.result},t.sync=function(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(var e,t=b(this.plugins);!(e=t()).done;){var n=e.value;if(zs(this.runOnRoot(n)))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){for(var r=this.result.root;!r[As];)r[As]=!0,this.walkSync(r);if(this.listeners.OnceExit)if("document"===r.type)for(var i,o=b(r.nodes);!(i=o()).done;){var s=i.value;this.visitSync(this.listeners.OnceExit,s)}else this.visitSync(this.listeners.OnceExit,r)}return this.result},t.then=function(e,t){return this.async().then(e,t)},t.toString=function(){return this.css},t.visitSync=function(e,t){for(var n,r=b(e);!(n=r()).done;){var i=n.value,o=i[0],s=i[1];this.result.lastPlugin=o;var a=void 0;try{a=s(t,this.helpers)}catch(e){throw this.handleError(e,t.proxyOf)}if("root"!==t.type&&"document"!==t.type&&!t.parent)return!0;if(zs(a))throw this.getAsyncError()}},t.visitTick=function(e){var t=e[e.length-1],n=t.node,r=t.visitors;if("root"===n.type||"document"===n.type||n.parent){if(r.length>0&&t.visitorIndext?(r&&(clearTimeout(r),r=null),i=c,e.apply(u,s)):r||!1===n.trailing||(r=setTimeout(function(){i=!1===n.leading?0:Date.now(),r=null,e.apply(u,s)},l))}}function sc(e,t,n,r,i){void 0===i&&(i=window);var o=i.Object.getOwnPropertyDescriptor(e,t);return i.Object.defineProperty(e,t,r?n:{set:function(e){var t=this;setTimeout(function(){n.set.call(t,e)},0),o&&o.set&&o.set.call(this,e)}}),function(){return sc(e,t,o||{},!0)}}"undefined"!=typeof window&&window.Proxy&&window.Reflect&&(ic=new Proxy(ic,{get:function(e,t,n){return"map"===t&&console.error(rc),Reflect.get(e,t,n)}}));var ac=Date.now;function cc(e){var t,n,r,i,o=e.document;return{left:o.scrollingElement?o.scrollingElement.scrollLeft:void 0!==e.pageXOffset?e.pageXOffset:o.documentElement.scrollLeft||(null==o?void 0:o.body)&&(null==(t=Ya(o.body))?void 0:t.scrollLeft)||(null==(n=null==o?void 0:o.body)?void 0:n.scrollLeft)||0,top:o.scrollingElement?o.scrollingElement.scrollTop:void 0!==e.pageYOffset?e.pageYOffset:(null==o?void 0:o.documentElement.scrollTop)||(null==o?void 0:o.body)&&(null==(r=Ya(o.body))?void 0:r.scrollTop)||(null==(i=null==o?void 0:o.body)?void 0:i.scrollTop)||0}}function lc(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function uc(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function pc(e){return e?e.nodeType===e.ELEMENT_NODE?e:Ya(e):null}function dc(e,t,n,r){if(!e)return!1;var i=pc(e);if(!i)return!1;try{if("string"==typeof t){if(i.classList.contains(t))return!0;if(r&&null!==i.closest("."+t))return!0}else if(ge(i,t,r))return!0}catch(e){}if(n){if(i.matches(n))return!0;if(r&&null!==i.closest(n))return!0}return!1}function hc(e,t,n){return!("TITLE"!==e.tagName||!n.headTitleMutations)||-2===t.getId(e)}function fc(e,t){if($(e))return!1;var n=t.getId(e);if(!t.has(n))return!0;var r=Ja(e);return(!r||r.nodeType!==e.DOCUMENT_NODE)&&(!r||fc(r,t))}function gc(e){return Boolean(e.changedTouches)}function mc(e,t){return Boolean("IFRAME"===e.nodeName&&t.getMeta(e))}function vc(e,t){return Boolean("LINK"===e.nodeName&&e.nodeType===e.ELEMENT_NODE&&e.getAttribute&&"stylesheet"===e.getAttribute("rel")&&t.getMeta(e))}function yc(e){return!!e&&(h(e,Fa)&&"shadowRoot"in e?Boolean(e.shadowRoot):Boolean(tc(e)))}/[1-9][0-9]{12}/.test(Date.now().toString())||(ac=function(){return(new Date).getTime()});var bc=function(){function e(){x(this,"id",1),x(this,"styleIDMap",new WeakMap),x(this,"idStyleMap",new Map)}var t=e.prototype;return t.getId=function(e){var t;return null!=(t=this.styleIDMap.get(e))?t:-1},t.has=function(e){return this.styleIDMap.has(e)},t.add=function(e,t){return this.has(e)?this.getId(e):(n=void 0===t?this.id++:t,this.styleIDMap.set(e,n),this.idStyleMap.set(n,e),n);var n},t.getStyle=function(e){return this.idStyleMap.get(e)||null},t.reset=function(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1},t.generateId=function(){return this.id++},e}();function _c(e){var t,n=null;return"getRootNode"in e&&(null==(t=Qa(e))?void 0:t.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&ec(Qa(e))&&(n=ec(Qa(e))),n}function wc(e){var t=e.ownerDocument;return!!t&&(Xa(t,e)||function(e){var t=e.ownerDocument;if(!t)return!1;var n=function(e){for(var t,n=e;t=_c(n);)n=t;return n}(e);return Xa(t,n)}(e))}var kc=function(e){return e[e.DomContentLoaded=0]="DomContentLoaded",e[e.Load=1]="Load",e[e.FullSnapshot=2]="FullSnapshot",e[e.IncrementalSnapshot=3]="IncrementalSnapshot",e[e.Meta=4]="Meta",e[e.Custom=5]="Custom",e[e.Plugin=6]="Plugin",e}(kc||{}),Sc=function(e){return e[e.Mutation=0]="Mutation",e[e.MouseMove=1]="MouseMove",e[e.MouseInteraction=2]="MouseInteraction",e[e.Scroll=3]="Scroll",e[e.ViewportResize=4]="ViewportResize",e[e.Input=5]="Input",e[e.TouchMove=6]="TouchMove",e[e.MediaInteraction=7]="MediaInteraction",e[e.StyleSheetRule=8]="StyleSheetRule",e[e.CanvasMutation=9]="CanvasMutation",e[e.Font=10]="Font",e[e.Log=11]="Log",e[e.Drag=12]="Drag",e[e.StyleDeclaration=13]="StyleDeclaration",e[e.Selection=14]="Selection",e[e.AdoptedStyleSheet=15]="AdoptedStyleSheet",e[e.CustomElement=16]="CustomElement",e}(Sc||{}),xc=function(e){return e[e.MouseUp=0]="MouseUp",e[e.MouseDown=1]="MouseDown",e[e.Click=2]="Click",e[e.ContextMenu=3]="ContextMenu",e[e.DblClick=4]="DblClick",e[e.Focus=5]="Focus",e[e.Blur=6]="Blur",e[e.TouchStart=7]="TouchStart",e[e.TouchMove_Departed=8]="TouchMove_Departed",e[e.TouchEnd=9]="TouchEnd",e[e.TouchCancel=10]="TouchCancel",e}(xc||{}),Cc=function(e){return e[e.Mouse=0]="Mouse",e[e.Pen=1]="Pen",e[e.Touch=2]="Touch",e}(Cc||{}),Ec=function(e){return e[e["2D"]=0]="2D",e[e.WebGL=1]="WebGL",e[e.WebGL2=2]="WebGL2",e}(Ec||{}),Ic=function(e){return e[e.Play=0]="Play",e[e.Pause=1]="Pause",e[e.Seeked=2]="Seeked",e[e.VolumeChange=3]="VolumeChange",e[e.RateChange=4]="RateChange",e}(Ic||{}),Nc=function(e){return e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment",e}(Nc||{});function Oc(e){return"__ln"in e}var Ac,Rc=function(){function e(){x(this,"length",0),x(this,"head",null),x(this,"tail",null)}var t=e.prototype;return t.get=function(e){if(e>=this.length)throw new Error("Position outside of list range");for(var t=this.head,n=0;n0&&this.stylesheetManager.adoptStyleSheets(e.contentDocument.adoptedStyleSheets,this.mirror.getId(e.contentDocument))},t.handleMessage=function(e){var t=e;if("rrweb"===t.data.type&&t.origin===t.data.origin&&e.source){var n=this.crossOriginIframeMap.get(e.source);if(n){var r=this.transformCrossOriginEvent(n,t.data.event);r&&this.wrappedEmit(r,t.data.isCheckout)}}},t.transformCrossOriginEvent=function(e,t){var n,r=this;switch(t.type){case kc.FullSnapshot:this.crossOriginIframeMirror.reset(e),this.crossOriginIframeStyleMirror.reset(e),this.replaceIdOnNode(t.data.node,e);var i=t.data.node.id;return this.crossOriginIframeRootIdMap.set(e,i),this.patchRootIdOnNode(t.data.node,i),{timestamp:t.timestamp,type:kc.IncrementalSnapshot,data:{source:Sc.Mutation,adds:[{parentId:this.mirror.getId(e),nextId:null,node:t.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}};case kc.Meta:case kc.Load:case kc.DomContentLoaded:return!1;case kc.Plugin:return t;case kc.Custom:return this.replaceIds(t.data.payload,e,["id","parentId","previousId","nextId"]),t;case kc.IncrementalSnapshot:switch(t.data.source){case Sc.Mutation:return t.data.adds.forEach(function(t){r.replaceIds(t,e,["parentId","nextId","previousId"]),r.replaceIdOnNode(t.node,e);var n=r.crossOriginIframeRootIdMap.get(e);n&&r.patchRootIdOnNode(t.node,n)}),t.data.removes.forEach(function(t){r.replaceIds(t,e,["parentId","id"])}),t.data.attributes.forEach(function(t){r.replaceIds(t,e,["id"])}),t.data.texts.forEach(function(t){r.replaceIds(t,e,["id"])}),t;case Sc.Drag:case Sc.TouchMove:case Sc.MouseMove:return t.data.positions.forEach(function(t){r.replaceIds(t,e,["id"])}),t;case Sc.ViewportResize:return!1;case Sc.MediaInteraction:case Sc.MouseInteraction:case Sc.Scroll:case Sc.CanvasMutation:case Sc.Input:return this.replaceIds(t.data,e,["id"]),t;case Sc.StyleSheetRule:case Sc.StyleDeclaration:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleId"]),t;case Sc.Font:return t;case Sc.Selection:return t.data.ranges.forEach(function(t){r.replaceIds(t,e,["start","end"])}),t;case Sc.AdoptedStyleSheet:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleIds"]),null==(n=t.data.styles)||n.forEach(function(t){r.replaceStyleIds(t,e,["styleId"])}),t}}return!1},t.replace=function(e,t,n,r){for(var i,o=b(r);!(i=o()).done;){var s=i.value;(Array.isArray(t[s])||"number"==typeof t[s])&&(Array.isArray(t[s])?t[s]=e.getIds(n,t[s]):t[s]=e.getId(n,t[s]))}return t},t.replaceIds=function(e,t,n){return this.replace(this.crossOriginIframeMirror,e,t,n)},t.replaceStyleIds=function(e,t,n){return this.replace(this.crossOriginIframeStyleMirror,e,t,n)},t.replaceIdOnNode=function(e,t){var n=this;this.replaceIds(e,t,["id","rootId"]),"childNodes"in e&&e.childNodes.forEach(function(e){n.replaceIdOnNode(e,t)})},t.patchRootIdOnNode=function(e,t){var n=this;e.type===Nc.Document||e.rootId||(e.rootId=t),"childNodes"in e&&e.childNodes.forEach(function(e){n.patchRootIdOnNode(e,t)})},e}(),Qc=function(){function e(e){x(this,"shadowDoms",new WeakSet),x(this,"mutationCb"),x(this,"scrollCb"),x(this,"bypassOptions"),x(this,"mirror"),x(this,"restoreHandlers",[]),this.mutationCb=e.mutationCb,this.scrollCb=e.scrollCb,this.bypassOptions=e.bypassOptions,this.mirror=e.mirror,this.init()}var t=e.prototype;return t.init=function(){this.reset(),this.patchAttachShadow(Element,document)},t.addShadowRoot=function(e,t){var n=this;if(z(e)&&!this.shadowDoms.has(e)){this.shadowDoms.add(e);var r=$c(u({},this.bypassOptions,{doc:t,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this}),e);this.restoreHandlers.push(function(){return r.disconnect()}),this.restoreHandlers.push(zc(u({},this.bypassOptions,{scrollCb:this.scrollCb,doc:e,mirror:this.mirror}))),setTimeout(function(){e.adoptedStyleSheets&&e.adoptedStyleSheets.length>0&&n.bypassOptions.stylesheetManager.adoptStyleSheets(e.adoptedStyleSheets,n.mirror.getId(ec(e))),n.restoreHandlers.push(Gc({mirror:n.mirror,stylesheetManager:n.bypassOptions.stylesheetManager},e))},0)}},t.observeAttachShadow=function(e){e.contentWindow&&e.contentDocument&&this.patchAttachShadow(e.contentWindow.Element,e.contentDocument)},t.patchAttachShadow=function(e,t){var n=this;this.restoreHandlers.push(Ga(e.prototype,"attachShadow",function(e){return function(r){var i=e.call(this,r),o=tc(this);return o&&wc(this)&&n.addShadowRoot(o,t),i}}))},t.reset=function(){this.restoreHandlers.forEach(function(e){try{e()}catch(e){}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet},e}(),el="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",tl="undefined"==typeof Uint8Array?[]:new Uint8Array(256),nl=0;nl<64;nl++)tl[el.charCodeAt(nl)]=nl;var rl=new Map,il=function(e,t,n){if(e&&(al(e,t)||"object"===(void 0===e?"undefined":m(e)))){var r=function(e,t){var n=rl.get(e);return n||(n=new Map,rl.set(e,n)),n.has(t)||n.set(t,[]),n.get(t)}(n,e.constructor.name),i=r.indexOf(e);return-1===i&&(i=r.length,r.push(e)),i}};function ol(e,t,n){return h(e,Array)?e.map(function(e){return ol(e,t,n)}):null===e?e:h(e,Float32Array)||h(e,Float64Array)||h(e,Int32Array)||h(e,Uint32Array)||h(e,Uint8Array)||h(e,Uint16Array)||h(e,Int16Array)||h(e,Int8Array)||h(e,Uint8ClampedArray)?{rr_type:e.constructor.name,args:[Object.values(e)]}:h(e,ArrayBuffer)?{rr_type:e.constructor.name,base64:function(e){var t,n=new Uint8Array(e),r=n.length,i="";for(t=0;t>2],i+=el[(3&n[t])<<4|n[t+1]>>4],i+=el[(15&n[t+1])<<2|n[t+2]>>6],i+=el[63&n[t+2]];return r%3==2?i=i.substring(0,i.length-1)+"=":r%3==1&&(i=i.substring(0,i.length-2)+"=="),i}(e)}:h(e,DataView)?{rr_type:e.constructor.name,args:[ol(e.buffer,t,n),e.byteOffset,e.byteLength]}:h(e,HTMLImageElement)?{rr_type:e.constructor.name,src:e.src}:h(e,HTMLCanvasElement)?{rr_type:"HTMLImageElement",src:e.toDataURL()}:h(e,ImageData)?{rr_type:e.constructor.name,args:[ol(e.data,t,n),e.width,e.height]}:al(e,t)||"object"===(void 0===e?"undefined":m(e))?{rr_type:e.constructor.name,index:il(e,t,n)}:e}var sl=function(e,t,n){return e.map(function(e){return ol(e,t,n)})},al=function(e,t){var n=["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter(function(e){return"function"==typeof t[e]});return Boolean(n.find(function(n){return h(e,t[n])}))};function cl(e,t,n,r){var i=[];try{var o=Ga(e.HTMLCanvasElement.prototype,"getContext",function(e){return function(i){for(var o=arguments.length,s=new Array(o>1?o-1:0),a=1;a0&&(o.styles=s),this.adoptedStyleSheetCb(o)}},t.reset=function(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet},t.trackStylesheetInLinkElement=function(e){},e}(),bl=function(){function e(){x(this,"nodeMap",new WeakMap),x(this,"active",!1)}var t=e.prototype;return t.inOtherBuffer=function(e,t){var n=this.nodeMap.get(e);return n&&Array.from(n).some(function(e){return e!==t})},t.add=function(e,t){var n=this;this.active||(this.active=!0,requestAnimationFrame(function(){n.nodeMap=new WeakMap,n.active=!1})),this.nodeMap.set(e,(this.nodeMap.get(e)||new Set).add(t))},t.destroy=function(){},e}(),_l=!1;try{if(2!==Array.from([1],function(e){return 2*e})[0]){var wl=document.createElement("iframe");document.body.appendChild(wl),Array.from=(null==(k=wl.contentWindow)?void 0:k.Array.from)||Array.from,document.body.removeChild(wl)}}catch(e){console.debug("Unable to override Array.from",e)}var kl,Sl,xl=new W;function Cl(e){void 0===e&&(e={});var t=e.emit,n=e.checkoutEveryNms,r=e.checkoutEveryNth,i=e.blockClass,o=void 0===i?"rr-block":i,s=e.blockSelector,a=void 0===s?null:s,c=e.ignoreClass,l=void 0===c?"rr-ignore":c,p=e.ignoreSelector,d=void 0===p?null:p,h=e.maskTextClass,f=void 0===h?"rr-mask":h,g=e.maskTextSelector,m=void 0===g?null:g,v=e.inlineStylesheet,y=void 0===v||v,_=e.maskAllInputs,w=e.maskInputOptions,k=e.slimDOMOptions,S=e.maskInputFn,x=e.maskTextFn,C=e.hooks,E=e.packFn,I=e.sampling,N=void 0===I?{}:I,O=e.dataURLOptions,A=void 0===O?{}:O,R=e.mousemoveWait,M=e.recordDOM,T=void 0===M||M,P=e.recordCanvas,L=void 0!==P&&P,D=e.recordCrossOriginIframes,F=void 0!==D&&D,U=e.recordAfter,j=void 0===U?"DOMContentLoaded"===e.recordAfter?e.recordAfter:"load":U,B=e.userTriggeredOnInput,$=void 0!==B&&B,z=e.collectFonts,q=void 0!==z&&z,V=e.inlineImages,H=void 0!==V&&V,G=e.plugins,K=e.keepIframeSrcFn,J=void 0===K?function(){return!1}:K,Y=e.ignoreCSSAttributes,Z=void 0===Y?new Set([]):Y,X=e.errorHandler;Ac=X;var Q=!F||window.parent===window,ee=!1;if(!Q)try{window.parent.document&&(ee=!1)}catch(e){ee=!0}if(Q&&!t)throw new Error("emit function is required");if(!Q&&!ee)return function(){};void 0!==R&&void 0===N.mousemove&&(N.mousemove=R),xl.reset();var te,ne=!0===_?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,password:!0,hidden:!0}:void 0!==w?w:{password:!0},re=!0===k||"all"===k?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:"all"===k,headMetaDescKeywords:"all"===k,headTitleMutations:"all"===k}:k||{};!function(e){void 0===e&&(e=window),"NodeList"in e&&!e.NodeList.prototype.forEach&&(e.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in e&&!e.DOMTokenList.prototype.forEach&&(e.DOMTokenList.prototype.forEach=Array.prototype.forEach)}();var ie=0,oe=function(e){for(var t,n=b(G||[]);!(t=n()).done;){var r=t.value;r.eventProcessor&&(e=r.eventProcessor(e))}return E&&!ee&&(e=E(e)),e};fl=function(e,i){var o,s=e;if(s.timestamp=ac(),!(null==(o=jc[0])?void 0:o.isFrozen())||s.type===kc.FullSnapshot||s.type===kc.IncrementalSnapshot&&s.data.source===Sc.Mutation||jc.forEach(function(e){return e.unfreeze()}),Q)null==t||t(oe(s),i);else if(ee){var a={type:"rrweb",event:oe(s),origin:window.location.origin,isCheckout:i};window.parent.postMessage(a,"*")}if(s.type===kc.FullSnapshot)te=s,ie=0;else if(s.type===kc.IncrementalSnapshot){if(s.data.source===Sc.Mutation&&s.data.isAttachIframe)return;ie++;var c=r&&ie>=r,l=n&&s.timestamp-te.timestamp>n;(c||l)&&gl(!0)}};for(var se,ae=function(e){fl({type:kc.IncrementalSnapshot,data:u({source:Sc.Mutation},e)})},ce=function(e){return fl({type:kc.IncrementalSnapshot,data:u({source:Sc.Scroll},e)})},le=function(e){return fl({type:kc.IncrementalSnapshot,data:u({source:Sc.CanvasMutation},e)})},ue=new yl({mutationCb:ae,adoptedStyleSheetCb:function(e){return fl({type:kc.IncrementalSnapshot,data:u({source:Sc.AdoptedStyleSheet},e)})}}),pe=new Xc({mirror:xl,mutationCb:ae,stylesheetManager:ue,recordCrossOriginIframes:F,wrappedEmit:fl}),de=b(G||[]);!(se=de()).done;){var he=se.value;he.getMirror&&he.getMirror({nodeMirror:xl,crossOriginIframeMirror:pe.crossOriginIframeMirror,crossOriginIframeStyleMirror:pe.crossOriginIframeStyleMirror})}var fe=new bl;ml=new vl({recordCanvas:L,mutationCb:le,win:window,blockClass:o,blockSelector:a,mirror:xl,sampling:N.canvas,dataURLOptions:A});var ge=new Qc({mutationCb:ae,scrollCb:ce,bypassOptions:{blockClass:o,blockSelector:a,maskTextClass:f,maskTextSelector:m,inlineStylesheet:y,maskInputOptions:ne,dataURLOptions:A,maskTextFn:x,maskInputFn:S,recordCanvas:L,inlineImages:H,sampling:N,slimDOMOptions:re,iframeManager:pe,stylesheetManager:ue,canvasManager:ml,keepIframeSrcFn:J,processedNodeManager:fe},mirror:xl});gl=function(e){if(void 0===e&&(e=!1),T){fl({type:kc.Meta,data:{href:window.location.href,width:uc(),height:lc()}},e),ue.reset(),ge.init(),jc.forEach(function(e){return e.lock()});var t=function(e,t){var n=t||{},r=n.mirror,i=void 0===r?new W:r,o=n.blockClass,s=n.blockSelector,a=n.maskTextClass,c=n.maskTextSelector,l=n.inlineStylesheet,u=n.inlineImages,p=n.recordCanvas,d=n.maskAllInputs,h=void 0!==d&&d,f=n.slimDOM,g=void 0!==f&&f,m=n.keepIframeSrcFn;return be(e,{doc:e,mirror:i,blockClass:void 0===o?"rr-block":o,blockSelector:void 0===s?null:s,maskTextClass:void 0===a?"rr-mask":a,maskTextSelector:void 0===c?null:c,skipChild:!1,inlineStylesheet:void 0===l||l,maskInputOptions:!0===h?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,password:!0,hidden:!0}:!1===h?{password:!0}:h,maskTextFn:n.maskTextFn,maskInputFn:n.maskInputFn,slimDOMOptions:!0===g||"all"===g?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:"all"===g,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:!1===g?{}:g,dataURLOptions:n.dataURLOptions,inlineImages:void 0!==u&&u,recordCanvas:void 0!==p&&p,preserveWhiteSpace:n.preserveWhiteSpace,onSerialize:n.onSerialize,onIframeLoad:n.onIframeLoad,iframeLoadTimeout:n.iframeLoadTimeout,onStylesheetLoad:n.onStylesheetLoad,stylesheetLoadTimeout:n.stylesheetLoadTimeout,keepIframeSrcFn:void 0===m?function(){return!1}:m,newlyAddedElement:!1})}(document,{mirror:xl,blockClass:o,blockSelector:a,maskTextClass:f,maskTextSelector:m,inlineStylesheet:y,maskAllInputs:ne,maskTextFn:x,maskInputFn:S,slimDOM:re,dataURLOptions:A,recordCanvas:L,inlineImages:H,onSerialize:function(e){mc(e,xl)&&pe.addIframe(e),vc(e,xl)&&ue.trackLinkElement(e),yc(e)&&ge.addShadowRoot(tc(e),document)},onIframeLoad:function(e,t){pe.attachIframe(e,t),ge.observeAttachShadow(e)},onStylesheetLoad:function(e,t){ue.attachLinkElement(e,t)},keepIframeSrcFn:J});if(!t)return console.warn("Failed to snapshot the document");fl({type:kc.FullSnapshot,data:{node:t,initialOffset:cc(window)}},e),jc.forEach(function(e){return e.unlock()}),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&ue.adoptStyleSheets(document.adoptedStyleSheets,xl.getId(document))}};try{var me=[],ve=function(e){var t;return Uc(Kc)({mutationCb:ae,mousemoveCb:function(e,t){return fl({type:kc.IncrementalSnapshot,data:{source:t,positions:e}})},mouseInteractionCb:function(e){return fl({type:kc.IncrementalSnapshot,data:u({source:Sc.MouseInteraction},e)})},scrollCb:ce,viewportResizeCb:function(e){return fl({type:kc.IncrementalSnapshot,data:u({source:Sc.ViewportResize},e)})},inputCb:function(e){return fl({type:kc.IncrementalSnapshot,data:u({source:Sc.Input},e)})},mediaInteractionCb:function(e){return fl({type:kc.IncrementalSnapshot,data:u({source:Sc.MediaInteraction},e)})},styleSheetRuleCb:function(e){return fl({type:kc.IncrementalSnapshot,data:u({source:Sc.StyleSheetRule},e)})},styleDeclarationCb:function(e){return fl({type:kc.IncrementalSnapshot,data:u({source:Sc.StyleDeclaration},e)})},canvasMutationCb:le,fontCb:function(e){return fl({type:kc.IncrementalSnapshot,data:u({source:Sc.Font},e)})},selectionCb:function(e){fl({type:kc.IncrementalSnapshot,data:u({source:Sc.Selection},e)})},customElementCb:function(e){fl({type:kc.IncrementalSnapshot,data:u({source:Sc.CustomElement},e)})},blockClass:o,ignoreClass:l,ignoreSelector:d,maskTextClass:f,maskTextSelector:m,maskInputOptions:ne,inlineStylesheet:y,sampling:N,recordDOM:T,recordCanvas:L,inlineImages:H,userTriggeredOnInput:$,collectFonts:q,doc:e,maskInputFn:S,maskTextFn:x,keepIframeSrcFn:J,blockSelector:a,slimDOMOptions:re,dataURLOptions:A,mirror:xl,iframeManager:pe,stylesheetManager:ue,shadowDomManager:ge,processedNodeManager:fe,canvasManager:ml,ignoreCSSAttributes:Z,plugins:(null==(t=null==G?void 0:G.filter(function(e){return e.observer}))?void 0:t.map(function(e){return{observer:e.observer,options:e.options,callback:function(t){return fl({type:kc.Plugin,data:{plugin:e.name,payload:t}})}}}))||[]},C)};pe.addLoadListener(function(e){try{me.push(ve(e.contentDocument))}catch(e){console.warn(e)}});var ye=function(){gl(),me.push(ve(document)),_l=!0};return"interactive"===document.readyState||"complete"===document.readyState?ye():(me.push(nc("DOMContentLoaded",function(){fl({type:kc.DomContentLoaded,data:{}}),"DOMContentLoaded"===j&&ye()})),me.push(nc("load",function(){fl({type:kc.Load,data:{}}),"load"===j&&ye()},window))),function(){me.forEach(function(e){try{e()}catch(e){String(e).toLowerCase().includes("cross-origin")||console.warn(e)}}),fe.destroy(),_l=!1,Ac=void 0}}catch(e){console.warn(e)}}Cl.addCustomEvent=function(e,t){if(!_l)throw new Error("please add custom event after start recording");fl({type:kc.Custom,data:{tag:e,payload:t}})},Cl.freezePage=function(){jc.forEach(function(e){return e.freeze()})},Cl.takeFullSnapshot=function(e){if(!_l)throw new Error("please take full snapshot after start recording");gl(e)},Cl.mirror=xl,(Sl=kl||(kl={}))[Sl.NotStarted=0]="NotStarted",Sl[Sl.Running=1]="Running",Sl[Sl.Stopped=2]="Stopped",Cl.addCustomEvent,Cl.freezePage,Cl.takeFullSnapshot;var El=Object.defineProperty,Il=function(e,t,n){return function(e,t,n){return t in e?El(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n}(e,"symbol"!==(void 0===t?"undefined":m(t))?t+"":t,n)},Nl=function(){function e(e){Il(this,"fileName"),Il(this,"functionName"),Il(this,"lineNumber"),Il(this,"columnNumber"),this.fileName=e.fileName||"",this.functionName=e.functionName||"",this.lineNumber=e.lineNumber,this.columnNumber=e.columnNumber}return e.prototype.toString=function(){var e=this.lineNumber||"",t=this.columnNumber||"";return this.functionName?this.functionName+" ("+this.fileName+":"+e+":"+t+")":this.fileName+":"+e+":"+t},e}(),Ol=/(^|@)\S+:\d+/,Al=/^\s*at .*(\S+:\d+|\(native\))/m,Rl=/^(eval@)?(\[native code])?$/,Ml={parse:function(e){return e?void 0!==e.stacktrace||void 0!==e["opera#sourceloc"]?this.parseOpera(e):e.stack&&e.stack.match(Al)?this.parseV8OrIE(e):e.stack?this.parseFFOrSafari(e):(console.warn("[console-record-plugin]: Failed to parse error object:",e),[]):[]},extractLocation:function(e){if(-1===e.indexOf(":"))return[e];var t=/(.+?)(?::(\d+))?(?::(\d+))?$/.exec(e.replace(/[()]/g,""));if(!t)throw new Error("Cannot parse given url: "+e);return[t[1],t[2]||void 0,t[3]||void 0]},parseV8OrIE:function(e){return e.stack.split("\n").filter(function(e){return!!e.match(Al)},this).map(function(e){e.indexOf("(eval ")>-1&&(e=e.replace(/eval code/g,"eval").replace(/(\(eval at [^()]*)|(\),.*$)/g,""));var t=e.replace(/^\s+/,"").replace(/\(eval code/g,"("),n=t.match(/ (\((.+):(\d+):(\d+)\)$)/),r=(t=n?t.replace(n[0],""):t).split(/\s+/).slice(1),i=this.extractLocation(n?n[1]:r.pop()),o=r.join(" ")||void 0,s=["eval",""].indexOf(i[0])>-1?void 0:i[0];return new Nl({functionName:o,fileName:s,lineNumber:i[1],columnNumber:i[2]})},this)},parseFFOrSafari:function(e){return e.stack.split("\n").filter(function(e){return!e.match(Rl)},this).map(function(e){if(e.indexOf(" > eval")>-1&&(e=e.replace(/ line (\d+)(?: > eval line \d+)* > eval:\d+:\d+/g,":$1")),-1===e.indexOf("@")&&-1===e.indexOf(":"))return new Nl({functionName:e});var t=/((.*".+"[^@]*)?[^@]*)(?:@)/,n=e.match(t),r=n&&n[1]?n[1]:void 0,i=this.extractLocation(e.replace(t,""));return new Nl({functionName:r,fileName:i[0],lineNumber:i[1],columnNumber:i[2]})},this)},parseOpera:function(e){return!e.stacktrace||e.message.indexOf("\n")>-1&&e.message.split("\n").length>e.stacktrace.split("\n").length?this.parseOpera9(e):e.stack?this.parseOpera11(e):this.parseOpera10(e)},parseOpera9:function(e){for(var t=/Line (\d+).*script (?:in )?(\S+)/i,n=e.message.split("\n"),r=[],i=2,o=n.length;i/,"$2").replace(/\([^)]*\)/g,"")||void 0;return new Nl({functionName:r,fileName:n[0],lineNumber:n[1],columnNumber:n[2]})},this)}};function Tl(e){if(!e||!e.outerHTML)return"";for(var t="";e.parentElement;){var n=e.localName;if(!n)break;n=n.toLowerCase();var r=e.parentElement,i=[];if(r.children&&r.children.length>0)for(var o=0;o1&&(n+=":eq("+i.indexOf(e)+")"),t=n+(t?">"+t:""),e=r}return t}function Pl(e){return"[object Object]"===Object.prototype.toString.call(e)}function Ll(e,t){if(0===t)return!0;for(var n,r=b(Object.keys(e));!(n=r()).done;){var i=n.value;if(Pl(e[i])&&Ll(e[i],t-1))return!0}return!1}function Dl(e,t){var n={numOfKeysLimit:50,depthOfLimit:4};Object.assign(n,t);var r=[],i=[];return JSON.stringify(e,function(e,t){if(r.length>0){var o=r.indexOf(this);~o?r.splice(o+1):r.push(this),~o?i.splice(o,1/0,e):i.push(e),~r.indexOf(t)&&(t=r[0]===t?"[Circular ~]":"[Circular ~."+i.slice(0,r.indexOf(t)).join(".")+"]")}else r.push(t);if(null===t)return t;if(void 0===t)return"undefined";if(Pl(s=t)&&Object.keys(s).length>n.numOfKeysLimit||"function"==typeof s||Pl(s)&&Ll(s,n.depthOfLimit))return function(e){var t=e.toString();return n.stringLengthLimit&&t.length>n.stringLengthLimit&&(t=t.slice(0,n.stringLengthLimit)+"..."),t}(t);var s;if("bigint"===(void 0===t?"undefined":m(t)))return t.toString()+"n";if(h(t,Event)){var a={};for(var c in t){var l=t[c];Array.isArray(l)?a[c]=Tl(l.length?l[0]:null):a[c]=l}return a}return h(t,Node)?h(t,HTMLElement)?t?t.outerHTML:"":t.nodeName:h(t,Error)?t.stack?t.stack+"\nEnd of stack for Error object":t.name+": "+t.message:t})}var Fl={level:["assert","clear","count","countReset","debug","dir","dirxml","error","group","groupCollapsed","groupEnd","info","log","table","time","timeEnd","timeLog","trace","warn"],lengthThreshold:1e3,logger:"console"};function Ul(e,t,n){var r,i=n?Object.assign({},Fl,n):Fl,o=i.logger;if(!o)return function(){};r="string"==typeof o?t[o]:o;var s=0,a=!1,c=[];if(i.level.includes("error")){var l=function(t){var n=t.message,r=t.error,o=Ml.parse(r).map(function(e){return e.toString()}),s=[Dl(n,i.stringifyOptions)];e({level:"error",trace:o,payload:s})};t.addEventListener("error",l),c.push(function(){t.removeEventListener("error",l)});var u=function(t){var n,r;h(t.reason,Error)?r=[Dl("Uncaught (in promise) "+(n=t.reason).name+": "+n.message,i.stringifyOptions)]:(n=new Error,r=[Dl("Uncaught (in promise)",i.stringifyOptions),Dl(t.reason,i.stringifyOptions)]);var o=Ml.parse(n).map(function(e){return e.toString()});e({level:"error",trace:o,payload:r})};t.addEventListener("unhandledrejection",u),c.push(function(){t.removeEventListener("unhandledrejection",u)})}for(var p,d=b(i.level);!(p=d()).done;){var f=p.value;c.push(g(r,f))}return function(){c.forEach(function(e){return e()})};function g(t,n){var r=this;return t[n]?function(t,o){try{if(!(o in t))return function(){};var c=t[o],l=function(t){var o=r;return function(){for(var r=arguments.length,c=new Array(r),l=0;l0&&Wl(Gl,n))}catch(e){Yl.call(new Xl(n),e)}}}function Yl(e){var t=this;t.triggered||(t.triggered=!0,t.def&&(t=t.def),t.msg=e,t.state=2,t.chain.length>0&&Wl(Gl,t))}function Zl(e,t,n,r){for(var i=0;i0&&(t[n]=e)}),t},Tu.truncate=function(e,t){var n;return"string"==typeof e?n=e.slice(0,t):Tu.isArray(e)?(n=[],Tu.each(e,function(e){n.push(Tu.truncate(e,t))})):Tu.isObject(e)?(n={},Tu.each(e,function(e,r){n[r]=Tu.truncate(e,t)})):n=e,n},Tu.JSONEncode=function(e){var t=function(e){var t=/[\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,n={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"};return t.lastIndex=0,t.test(e)?'"'+e.replace(t,function(e){var t=n[e];return"string"==typeof t?t:"\\u"+("0000"+e.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+e+'"'},n=function(e,r){var i="",o=0,s="",a="",c=0,l=i,u=[],p=r[e];switch(p&&"object"==typeof p&&"function"==typeof p.toJSON&&(p=p.toJSON(e)),typeof p){case"string":return t(p);case"number":return isFinite(p)?String(p):"null";case"boolean":case"null":return String(p);case"object":if(!p)return"null";if(i+=" ",u=[],"[object Array]"===bu.apply(p)){for(c=p.length,o=0;o="0"&&iu<="9";)t+=iu,lu();if("."===iu)for(t+=".";lu()&&iu>="0"&&iu<="9";)t+=iu;if("e"===iu||"E"===iu)for(t+=iu,lu(),"-"!==iu&&"+"!==iu||(t+=iu,lu());iu>="0"&&iu<="9";)t+=iu,lu();if(e=+t,isFinite(e))return e;cu("Bad number")},pu=function(){var e,t,n,r="";if('"'===iu)for(;lu();){if('"'===iu)return lu(),r;if("\\"===iu)if(lu(),"u"===iu){for(n=0,t=0;t<4&&(e=parseInt(lu(),16),isFinite(e));t+=1)n=16*n+e;r+=String.fromCharCode(n)}else{if("string"!=typeof au[iu])break;r+=au[iu]}else r+=iu}cu("Bad string")},du=function(){for(;iu&&iu<=" ";)lu()},su=function(){switch(du(),iu){case"{":return function(){var e,t={};if("{"===iu){if(lu("{"),du(),"}"===iu)return lu("}"),t;for(;iu;){if(e=pu(),du(),lu(":"),Object.hasOwnProperty.call(t,e)&&cu('Duplicate key "'+e+'"'),t[e]=su(),du(),"}"===iu)return lu("}"),t;lu(","),du()}}cu("Bad object")}();case"[":return function(){var e=[];if("["===iu){if(lu("["),du(),"]"===iu)return lu("]"),e;for(;iu;){if(e.push(su()),du(),"]"===iu)return lu("]"),e;lu(","),du()}}cu("Bad array")}();case'"':return pu();case"-":return uu();default:return iu>="0"&&iu<="9"?uu():function(){switch(iu){case"t":return lu("t"),lu("r"),lu("u"),lu("e"),!0;case"f":return lu("f"),lu("a"),lu("l"),lu("s"),lu("e"),!1;case"n":return lu("n"),lu("u"),lu("l"),lu("l"),null}cu('Unexpected "'+iu+'"')}()}},function(e){var t;return ou=e,ru=0,iu=" ",t=su(),du(),iu&&cu("Syntax error"),t}),Tu.base64Encode=function(e){var t,n,r,i,o,s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",a=0,c=0,l="",u=[];if(!e)return e;e=Tu.utf8Encode(e);do{t=(o=e.charCodeAt(a++)<<16|e.charCodeAt(a++)<<8|e.charCodeAt(a++))>>18&63,n=o>>12&63,r=o>>6&63,i=63&o,u[c++]=s.charAt(t)+s.charAt(n)+s.charAt(r)+s.charAt(i)}while(a127&&s<2048?String.fromCharCode(s>>6|192,63&s|128):String.fromCharCode(s>>12|224,s>>6&63|128,63&s|128),null!==a&&(n>t&&(o+=e.substring(t,n)),o+=a,t=n=i+1)}return n>t&&(o+=e.substring(t,e.length)),o},Tu.UUID=function(){try{return r.crypto.randomUUID()}catch(n){for(var e=new Array(36),t=0;t<36;t++)e[t]=Math.floor(16*Math.random());return e[14]=4,e[19]=e[19]&=-5,e[19]=e[19]|=8,e[8]=e[13]=e[18]=e[23]="-",Tu.map(e,function(e){return e.toString(16)}).join("")}};var ju=["ahrefsbot","ahrefssiteaudit","amazonbot","baiduspider","bingbot","bingpreview","chrome-lighthouse","facebookexternal","petalbot","pinterest","screaming frog","yahoo! slurp","yandex","adsbot-google","apis-google","duplexweb-google","feedfetcher-google","google favicon","google web preview","google-read-aloud","googlebot","googleweblight","mediapartners-google","storebot-google"];Tu.isBlockedUA=function(e){var t;for(e=e.toLowerCase(),t=0;t=0}function r(t){if(!Su.getElementsByTagName)return[];var r,i,o,s,a,c,l,u,p,d,h=t.split(" "),f=[Su];for(c=0;c-1){o=(i=r.split("#"))[0];var g=i[1],m=Su.getElementById(g);if(!m||o&&m.nodeName.toLowerCase()!=o)return[];f=[m]}else if(r.indexOf(".")>-1){o=(i=r.split("."))[0];var v=i[1];for(o||(o="*"),s=[],a=0,l=0;l-1};break;default:b=function(e){return e.getAttribute(_)}}for(f=[],d=0,l=0;l=3?t[2]:""},currentUrl:function(){return r.location.href},properties:function(e){return"object"!=typeof e&&(e={}),Tu.extend(Tu.strip_empty_properties({$os:Tu.info.os(),$browser:Tu.info.browser(Eu,ku.vendor,xu),$referrer:Su.referrer,$referring_domain:Tu.info.referringDomain(Su.referrer),$device:Tu.info.device(Eu)}),{$current_url:Tu.info.currentUrl(),$browser_version:Tu.info.browserVersion(Eu,ku.vendor,xu),$screen_height:Cu.height,$screen_width:Cu.width,mp_lib:"web",$lib_version:hu.LIB_VERSION,$insert_id:Ku(),time:Tu.timestamp()/1e3},Tu.strip_empty_properties(e))},people_properties:function(){return Tu.extend(Tu.strip_empty_properties({$os:Tu.info.os(),$browser:Tu.info.browser(Eu,ku.vendor,xu)}),{$browser_version:Tu.info.browserVersion(Eu,ku.vendor,xu)})},mpPageViewProperties:function(){return Tu.strip_empty_properties({current_page_title:Su.title,current_domain:r.location.hostname,current_url_path:r.location.pathname,current_url_protocol:r.location.protocol,current_url_search:r.location.search})}};var Ku=function(e){var t=Math.random().toString(36).substring(2,10)+Math.random().toString(36).substring(2,10);return e?t.substring(0,e):t},Ju=/[a-z0-9][a-z0-9-]*\.[a-z]+$/i,Yu=/[a-z0-9][a-z0-9-]+\.[a-z.]{2,6}$/i,Zu=function(e){var t=Yu,n=e.split("."),r=n[n.length-1];(r.length>4||"com"===r||"org"===r)&&(t=Ju);var i=e.match(t);return i?i[0]:""},Xu=function(){},Qu=null,ep=null;"undefined"!=typeof JSON&&(Qu=JSON.stringify,ep=JSON.parse),Qu=Qu||Tu.JSONEncode,ep=ep||Tu.JSONDecode,Tu.info=Tu.info,Tu.info.browser=Tu.info.browser,Tu.info.browserVersion=Tu.info.browserVersion,Tu.info.device=Tu.info.device,Tu.info.properties=Tu.info.properties,Tu.isBlockedUA=Tu.isBlockedUA,Tu.isEmptyObject=Tu.isEmptyObject,Tu.isObject=Tu.isObject,Tu.JSONDecode=Tu.JSONDecode,Tu.JSONEncode=Tu.JSONEncode,Tu.toArray=Tu.toArray,Tu.NPO=eu;var tp="mixpanelRecordingEvents",np="mixpanelRecordingRegistry",rp=[tp,np],ip=function(e){this.dbPromise=null,this.storeName=e};function op(e,t){mp(!0,e,t)}function sp(e,t){mp(!1,e,t)}function ap(e,t){return"1"===gp(e,t)}function cp(e,t){if(function(e){if(e&&e.ignoreDnt)return!1;var t=e&&e.window||r,n=t.navigator||{},i=!1;return Tu.each([n.doNotTrack,n.msDoNotTrack,t.doNotTrack],function(e){Tu.includes([!0,1,"1","yes"],e)&&(i=!0)}),i}(t))return Pu.warn('This browser has "Do Not Track" enabled. This will prevent the Mixpanel SDK from sending any data. To ignore the "Do Not Track" browser setting, initialize the Mixpanel instance with the config "ignore_dnt: true"'),!0;var n="0"===gp(e,t);return n&&Pu.warn("You are opted out of Mixpanel tracking. This will prevent the Mixpanel SDK from sending any data."),n}function lp(e){return vp(e,function(e){return this.get_config(e)})}function up(e){return vp(e,function(e){return this._get_config(e)})}function pp(e){return vp(e,function(e){return this._get_config(e)})}function dp(e,t){hp(t=t||{}).remove(fp(e,t),!!t.crossSubdomainCookie,t.cookieDomain)}function hp(e){return"localStorage"===(e=e||{}).persistenceType?Tu.localStorage:Tu.cookie}function fp(e,t){return((t=t||{}).persistencePrefix||"__mp_opt_in_out_")+e}function gp(e,t){return hp(t).get(fp(e,t))}function mp(e,t,n){Tu.isString(t)&&t.length?(hp(n=n||{}).set(fp(t,n),e?1:0,Tu.isNumber(n.cookieExpiration)?n.cookieExpiration:null,!!n.crossSubdomainCookie,!!n.secureCookie,!!n.crossSiteCookie,n.cookieDomain),n.track&&e&&n.track(n.trackEventName||"$opt_in",n.trackProperties,{send_immediately:!0})):Pu.error("gdpr."+(e?"optIn":"optOut")+" called with an invalid token")}function vp(e,t){return function(){var n=!1;try{var r=t.call(this,"token"),i=t.call(this,"ignore_dnt"),o=t.call(this,"opt_out_tracking_persistence_type"),s=t.call(this,"opt_out_tracking_cookie_prefix"),a=t.call(this,"window");r&&(n=cp(r,{ignoreDnt:i,persistenceType:o,persistencePrefix:s,window:a}))}catch(e){Pu.error("Unexpected error when checking tracking opt-out status: "+e)}if(!n)return e.apply(this,arguments);var c=arguments[arguments.length-1];"function"==typeof c&&c(0)}}ip.prototype._openDb=function(){return new tu(function(e,t){var n=r.indexedDB.open("mixpanelBrowserDb",1);n.onerror=function(){t(n.error)},n.onsuccess=function(){e(n.result)},n.onupgradeneeded=function(e){var t=e.target.result;rp.forEach(function(e){t.createObjectStore(e)})}})},ip.prototype.init=function(){return r.indexedDB?(this.dbPromise||(this.dbPromise=this._openDb()),this.dbPromise.then(function(e){return e instanceof r.IDBDatabase?tu.resolve():tu.reject(e)})):tu.reject("indexedDB is not supported in this browser")},ip.prototype.isInitialized=function(){return!!this.dbPromise},ip.prototype.makeTransaction=function(e,t){var n=this.storeName,r=function(r){return new tu(function(i,o){var s=r.transaction(n,e);s.oncomplete=function(){i(s)},s.onabort=s.onerror=function(){o(s.error)},t(s.objectStore(n))})};return this.dbPromise.then(r).catch(function(e){return e&&"InvalidStateError"===e.name?(this.dbPromise=this._openDb(),this.dbPromise.then(r)):tu.reject(e)}.bind(this))},ip.prototype.setItem=function(e,t){return this.makeTransaction("readwrite",function(n){n.put(t,e)})},ip.prototype.getItem=function(e){var t;return this.makeTransaction("readonly",function(n){t=n.get(e)}).then(function(){return t.result})},ip.prototype.removeItem=function(e){return this.makeTransaction("readwrite",function(t){t.delete(e)})},ip.prototype.getAll=function(){var e;return this.makeTransaction("readonly",function(t){e=t.getAll()}).then(function(){return e.result})};var yp=Du("lock"),bp=function(e,t){t=t||{},this.storageKey=e,this.storage=t.storage||r.localStorage,this.pollIntervalMS=t.pollIntervalMS||100,this.timeoutMS=t.timeoutMS||2e3,this.promiseImpl=t.promiseImpl||tu};bp.prototype.withLock=function(e,t){return new(0,this.promiseImpl)(Tu.bind(function(n,r){var i=t||(new Date).getTime()+"|"+Math.random(),o=(new Date).getTime(),s=this.storageKey,a=this.pollIntervalMS,c=this.timeoutMS,l=this.storage,u=s+":X",p=s+":Y",d=s+":Z",h=function(e){if((new Date).getTime()-o>c)return yp.error("Timeout waiting for mutex on "+s+"; clearing lock. ["+i+"]"),l.removeItem(d),l.removeItem(p),void m();setTimeout(function(){try{e()}catch(e){r(e)}},a*(Math.random()+.1))},f=function(e,t){e()?t():h(function(){f(e,t)})},g=function(){var e=l.getItem(p);return!(e&&e!==i||(l.setItem(p,i),l.getItem(p)!==i&&(zu(l,!0)||r(new Error("localStorage support dropped while acquiring lock")),1)))},m=function(){l.setItem(u,i),f(g,function(){l.getItem(u)!==i?h(function(){l.getItem(p)===i?f(function(){return!l.getItem(d)},v):m()}):v()})},v=function(){l.setItem(d,"1");var t=function(){l.removeItem(d),l.getItem(p)===i&&l.removeItem(p),l.getItem(u)===i&&l.removeItem(u)};e().then(function(e){t(),n(e)}).catch(function(e){t(),r(e)})};try{if(!zu(l,!0))throw new Error("localStorage support check failed");m()}catch(e){r(e)}},this))};var _p=function(e){this.storage=e||r.localStorage};_p.prototype.init=function(){return tu.resolve()},_p.prototype.isInitialized=function(){return!0},_p.prototype.setItem=function(e,t){return new tu(Tu.bind(function(n,r){try{this.storage.setItem(e,Qu(t))}catch(e){r(e)}n()},this))},_p.prototype.getItem=function(e){return new tu(Tu.bind(function(t,n){var r;try{r=ep(this.storage.getItem(e))}catch(e){n(e)}t(r)},this))},_p.prototype.removeItem=function(e){return new tu(Tu.bind(function(t,n){try{this.storage.removeItem(e)}catch(e){n(e)}t()},this))};var wp=Du("batch"),kp=function(e,t){var n,i,o,s;t=t||{},this.storageKey=e,this.usePersistence=t.usePersistence,this.usePersistence&&(this.queueStorage=t.queueStorage||new _p,this.lock=new bp(e,{storage:t.sharedLockStorage||r.localStorage,timeoutMS:t.sharedLockTimeoutMS})),this.reportError=t.errorReporter||Tu.bind(wp.error,wp),this.pid=t.pid||null,this.memQueue=[],this.initialized=!1,t.enqueueThrottleMs?this.enqueuePersisted=(n=Tu.bind(this._enqueuePersisted,this),i=t.enqueueThrottleMs,o=null,s=[],function(e){var t=this;return s.push(e),o||(o=new tu(function(e){setTimeout(function(){var r=n.apply(t,[s]);o=null,s=[],e(r)},i)})),o}):this.enqueuePersisted=Tu.bind(function(e){return this._enqueuePersisted([e])},this)};kp.prototype.ensureInit=function(){return this.initialized||!this.usePersistence?tu.resolve():this.queueStorage.init().then(Tu.bind(function(){this.initialized=!0},this)).catch(Tu.bind(function(e){this.reportError("Error initializing queue persistence. Disabling persistence",e),this.initialized=!0,this.usePersistence=!1},this))},kp.prototype.enqueue=function(e,t){var n={id:Ku(),flushAfter:(new Date).getTime()+2*t,payload:e};return this.usePersistence?this.enqueuePersisted(n):(this.memQueue.push(n),tu.resolve(!0))},kp.prototype._enqueuePersisted=function(e){var t=Tu.bind(function(){return this.ensureInit().then(Tu.bind(function(){return this.readFromStorage()},this)).then(Tu.bind(function(t){return this.saveToStorage(t.concat(e))},this)).then(Tu.bind(function(t){return t&&(this.memQueue=this.memQueue.concat(e)),t},this)).catch(Tu.bind(function(t){return this.reportError("Error enqueueing items",t,e),!1},this))},this);return this.lock.withLock(t,this.pid).catch(Tu.bind(function(e){return this.reportError("Error acquiring storage lock",e),!1},this))},kp.prototype.fillBatch=function(e){var t=this.memQueue.slice(0,e);return this.usePersistence&&t.lengtho.flushAfter&&!r[o.id]&&(o.orphaned=!0,t.push(o),t.length>=e))break}}return t},this)):tu.resolve(t)};var Sp=function(e,t){var n=[];return Tu.each(e,function(e){e.id&&!t[e.id]&&n.push(e)}),n};kp.prototype.removeItemsByID=function(e){var t={};if(Tu.each(e,function(e){t[e]=!0}),this.memQueue=Sp(this.memQueue,t),this.usePersistence){var n=Tu.bind(function(){return this.ensureInit().then(Tu.bind(function(){return this.readFromStorage()},this)).then(Tu.bind(function(e){return e=Sp(e,t),this.saveToStorage(e)},this)).then(Tu.bind(function(){return this.readFromStorage()},this)).then(Tu.bind(function(e){for(var n=0;n5&&(this.reportError("[dupe] item ID sent too many times, not sending",{item:e,batchSize:o.length,timesSent:this.itemIdsSentSuccessfully[r]}),n=!1):this.reportError("[dupe] found item with no ID",{item:e}),n&&a.push(t)}c[e.id]=t},this),a.length<1)return this.requestInProgress=!1,this.resetFlush(),tu.resolve();var l=Tu.bind(function(){return this.queue.removeItemsByID(Tu.map(o,function(e){return e.id})).then(Tu.bind(function(e){return Tu.each(o,Tu.bind(function(e){var t=e.id;t?(this.itemIdsSentSuccessfully[t]=this.itemIdsSentSuccessfully[t]||0,this.itemIdsSentSuccessfully[t]++,this.itemIdsSentSuccessfully[t]>5&&this.reportError("[dupe] item ID sent too many times",{item:e,batchSize:o.length,timesSent:this.itemIdsSentSuccessfully[t]})):this.reportError("[dupe] found item with no ID while removing",{item:e})},this)),e?(this.consecutiveRemovalFailures=0,this.flushOnlyOnInterval&&!s?(this.resetFlush(),tu.resolve()):this.flush()):(++this.consecutiveRemovalFailures>5?(this.reportError("Too many queue failures; disabling batching system."),this.stopAllBatching()):this.resetFlush(),tu.resolve())},this))},this),u=Tu.bind(function(s){this.requestInProgress=!1;try{if(e.unloading)return this.queue.updatePayloads(c);if(Tu.isObject(s)&&"timeout"===s.error&&(new Date).getTime()-n>=t)return this.reportError("Network timeout; retrying"),this.flush();if(Tu.isObject(s)&&(s.httpStatusCode>=500||429===s.httpStatusCode||s.httpStatusCode<=0&&(p=r.navigator.onLine,!Tu.isUndefined(p)&&!p)||"timeout"===s.error)){var a=2*this.flushInterval;return s.retryAfter&&(a=1e3*parseInt(s.retryAfter,10)||a),a=Math.min(6e5,a),this.reportError("Error; retry in "+a+" ms"),this.scheduleFlush(a),tu.resolve()}if(Tu.isObject(s)&&413===s.httpStatusCode){if(o.length>1){var u=Math.max(1,Math.floor(i/2));return this.batchSize=Math.min(this.batchSize,u,o.length-1),this.reportError("413 response; reducing batch size to "+this.batchSize),this.resetFlush(),tu.resolve()}return this.reportError("Single-event request too large; dropping",o),this.resetBatchSize(),l()}return l()}catch(e){this.reportError("Error handling API response",e),this.resetFlush()}var p},this),p={method:"POST",verbose:!0,ignore_json_errors:!0,timeout_ms:t};return e.unloading&&(p.transport="sendBeacon"),Cp.log("MIXPANEL REQUEST:",a),this.sendRequestPromise(a,p).then(u)},this)).catch(Tu.bind(function(e){this.reportError("Error flushing request queue",e),this.resetFlush()},this))},Ep.prototype.reportError=function(e,t){if(Cp.error.apply(Cp.error,arguments),this.errorReporter)try{t instanceof Error||(t=new Error(e)),this.errorReporter(e,t)}catch(t){Cp.error(t)}};var Ip=function(e){var t=Date.now();return!e||t>e.maxExpires||t>e.idleExpires},Np=Du("recorder"),Op=r.CompressionStream,Ap={batch_size:1e3,batch_flush_interval_ms:1e4,batch_request_timeout_ms:9e4,batch_autostart:!0},Rp=new Set([Sc.MouseMove,Sc.MouseInteraction,Sc.Scroll,Sc.ViewportResize,Sc.Input,Sc.TouchMove,Sc.MediaInteraction,Sc.Drag,Sc.Selection]),Mp=function(e){this._mixpanel=e.mixpanelInstance,this._onIdleTimeout=e.onIdleTimeout||Xu,this._onMaxLengthReached=e.onMaxLengthReached||Xu,this._onBatchSent=e.onBatchSent||Xu,this._rrwebRecord=e.rrwebRecord||null,this._stopRecording=null,this.replayId=e.replayId,this.batchStartUrl=e.batchStartUrl||null,this.replayStartUrl=e.replayStartUrl||null,this.idleExpires=e.idleExpires||null,this.maxExpires=e.maxExpires||null,this.replayStartTime=e.replayStartTime||null,this.lastEventTimestamp=e.lastEventTimestamp||null,this.seqNo=e.seqNo||0,this.idleTimeoutId=null,this.maxTimeoutId=null,this.recordMaxMs=fu,this.recordMinMs=0;var t=zu(e.sharedLockStorage,!0)&&!this.getConfig("disable_persistence");this.batcherKey="__mprec_"+this.getConfig("name")+"_"+this.getConfig("token")+"_"+this.replayId,this.queueStorage=new ip(tp),this.batcher=new Ep(this.batcherKey,{errorReporter:this.reportError.bind(this),flushOnlyOnInterval:!0,libConfig:Ap,sendRequestFunc:this.flushEventsWithOptOut.bind(this),queueStorage:this.queueStorage,sharedLockStorage:e.sharedLockStorage,usePersistence:t,stopAllBatchingFunc:this.stopRecording.bind(this),enqueueThrottleMs:250,sharedLockTimeoutMS:1e4})};Mp.prototype.getUserIdInfo=function(){if(this.finalFlushUserIdInfo)return this.finalFlushUserIdInfo;var e={distinct_id:String(this._mixpanel.get_distinct_id())},t=this._mixpanel.get_property("$device_id");t&&(e.$device_id=t);var n=this._mixpanel.get_property("$user_id");return n&&(e.$user_id=n),e},Mp.prototype.unloadPersistedData=function(){return this.batcher.stop(),this.queueStorage.init().catch(function(){this.reportError("Error initializing IndexedDB storage for unloading persisted data.")}.bind(this)).then(function(){return this.getDurationMs()fu&&(this.recordMaxMs=fu,Np.critical("record_max_ms cannot be greater than "+fu+"ms. Capping value.")),this.maxExpires||(this.maxExpires=(new Date).getTime()+this.recordMaxMs),this.recordMinMs=this._getRecordMinMs(),this.replayStartTime||(this.replayStartTime=(new Date).getTime(),this.batchStartUrl=Tu.info.currentUrl(),this.replayStartUrl=Tu.info.currentUrl()),e||this.recordMinMs>0?this.batcher.stop():this.batcher.start();var t=function(){clearTimeout(this.idleTimeoutId);var e=this.getConfig("record_idle_timeout_ms");this.idleTimeoutId=setTimeout(this._onIdleTimeout,e),this.idleExpires=(new Date).getTime()+e}.bind(this);t();var n,r=this.getConfig("record_block_selector");""!==r&&null!==r||(r=void 0);try{this._stopRecording=this._rrwebRecord({emit:function(e){this.idleExpires&&this.idleExpires=this.recordMinMs&&this.batcher.start(),t()),this.__enqueuePromise=this.batcher.enqueue(e),(null===this.lastEventTimestamp||e.timestamp>this.lastEventTimestamp)&&(this.lastEventTimestamp=e.timestamp))}.bind(this),blockClass:this.getConfig("record_block_class"),blockSelector:r,collectFonts:this.getConfig("record_collect_fonts"),dataURLOptions:{type:"image/webp",quality:.6},maskAllInputs:!0,maskTextClass:this.getConfig("record_mask_text_class"),maskTextSelector:this.getConfig("record_mask_text_selector"),recordCanvas:this.getConfig("record_canvas"),sampling:{canvas:15},plugins:this.getConfig("record_console")?[(n={stringifyOptions:{stringLengthLimit:1e3,numOfKeysLimit:50,depthOfLimit:2}},{name:"rrweb/console@1",observer:Ul,options:n})]:[]})}catch(e){this.reportError("Unexpected error when starting rrweb recording.",e)}if("function"!=typeof this._stopRecording)return this.reportError("rrweb failed to start, skipping this recording."),this._stopRecording=null,void this.stopRecording();var i=this.maxExpires-(new Date).getTime();this.maxTimeoutId=setTimeout(this._onMaxLengthReached.bind(this),i)}else Np.log("Recording already in progress, skipping startRecording.");else this.reportError("rrweb record function not provided. ")},Mp.prototype.stopRecording=function(e){if(this.finalFlushUserIdInfo=this.getUserIdInfo(),!this.isRrwebStopped()){try{this._stopRecording()}catch(e){this.reportError("Error with rrweb stopRecording",e)}this._stopRecording=null}var t;return this.batcher.stopped?t=this.batcher.clear():e||(t=this.batcher.flush()),this.batcher.stop(),clearTimeout(this.idleTimeoutId),clearTimeout(this.maxTimeoutId),t},Mp.prototype.isRrwebStopped=function(){return null===this._stopRecording},Mp.prototype.flushEventsWithOptOut=function(e,t,n){var r=function(e){0===e&&(this.stopRecording(),n({error:"Tracking has been opted out, stopping recording."}))}.bind(this);this._flushEvents(e,t,n,r)},Mp.prototype.serialize=function(){var e;try{e=this._mixpanel.get_tab_id()}catch(t){this.reportError("Error getting tab ID for serialization ",t),e=null}return{replayId:this.replayId,seqNo:this.seqNo,replayStartTime:this.replayStartTime,batchStartUrl:this.batchStartUrl,replayStartUrl:this.replayStartUrl,lastEventTimestamp:this.lastEventTimestamp,idleExpires:this.idleExpires,maxExpires:this.maxExpires,tabId:e}},Mp.deserialize=function(e,t){return new Mp(Tu.extend({},t,{replayId:e.replayId,batchStartUrl:e.batchStartUrl,replayStartUrl:e.replayStartUrl,idleExpires:e.idleExpires,maxExpires:e.maxExpires,replayStartTime:e.replayStartTime,lastEventTimestamp:e.lastEventTimestamp,seqNo:e.seqNo,sharedLockStorage:t.sharedLockStorage}))},Mp.prototype._sendRequest=function(e,t,n,i){var o=function(t,n){200===t.status&&this.replayId===e&&(this.seqNo++,this.batchStartUrl=Tu.info.currentUrl()),this._onBatchSent(),i({status:0,httpStatusCode:t.status,responseBody:n,retryAfter:t.headers.get("Retry-After")})}.bind(this),s=this._mixpanel.get_api_host&&this._mixpanel.get_api_host("record")||this.getConfig("api_host");r.fetch(s+"/"+this.getConfig("api_routes").record+"?"+new URLSearchParams(t),{method:"POST",headers:{Authorization:"Basic "+btoa(this.getConfig("token")+":"),"Content-Type":"application/octet-stream"},body:n}).then(function(e){e.json().then(function(t){o(e,t)}).catch(function(e){i({error:e})})}).catch(function(e){i({error:e,httpStatusCode:0})})},Mp.prototype._flushEvents=lp(function(e,t,n){var i=e.length;if(i>0){for(var o=this.replayId,s=1/0,a=-1/0,c=!1,l=0;l=16.4&&o<16.6)}(Eu,ku.vendor,xu)){var h=new Blob([d],{type:"application/json"}).stream().pipeThrough(new Op("gzip"));new Response(h).blob().then(function(e){p.format="gzip",this._sendRequest(o,p,e,n)}.bind(this))}else p.format="body",this._sendRequest(o,p,d,n)}}),Mp.prototype.reportError=function(e,t){Np.error.apply(Np.error,arguments);try{t||e instanceof Error||(e=new Error(e)),this.getConfig("error_reporter")(e,t)}catch(t){Np.error(t)}},Mp.prototype.getDurationMs=function(){return null===this.replayStartTime?0:null===this.lastEventTimestamp?(new Date).getTime()-this.replayStartTime:this.lastEventTimestamp-this.replayStartTime},Mp.prototype._getRecordMinMs=function(){var e=this.getConfig("record_min_ms");return e>8e3?(Np.critical("record_min_ms cannot be greater than 8000ms. Capping value."),8e3):e};var Tp=function(e){this.idb=new ip(np),this.errorReporter=e.errorReporter,this.mixpanelInstance=e.mixpanelInstance,this.sharedLockStorage=e.sharedLockStorage};Tp.prototype.isPersistenceEnabled=function(){return!this.mixpanelInstance.get_config("disable_persistence")},Tp.prototype.handleError=function(e){this.errorReporter("IndexedDB error: ",e)},Tp.prototype.setActiveRecording=function(e){if(!this.isPersistenceEnabled())return tu.resolve();var t=e.tabId;return t?this.idb.init().then(function(){return this.idb.setItem(t,e)}.bind(this)).catch(this.handleError.bind(this)):(console.warn("No tab ID is set, cannot persist recording metadata."),tu.resolve())},Tp.prototype.getActiveRecording=function(){return this.isPersistenceEnabled()?this.idb.init().then(function(){return this.idb.getItem(this.mixpanelInstance.get_tab_id())}.bind(this)).then(function(e){return Ip(e)?null:e}.bind(this)).catch(this.handleError.bind(this)):tu.resolve(null)},Tp.prototype.clearActiveRecording=function(){return this.isPersistenceEnabled()?this.markActiveRecordingExpired():this.deleteActiveRecording()},Tp.prototype.markActiveRecordingExpired=function(){return this.getActiveRecording().then(function(e){if(e)return e.maxExpires=0,this.setActiveRecording(e)}.bind(this)).catch(this.handleError.bind(this))},Tp.prototype.deleteActiveRecording=function(){return this.idb.isInitialized()?this.idb.removeItem(this.mixpanelInstance.get_tab_id()).catch(this.handleError.bind(this)):tu.resolve()},Tp.prototype.flushInactiveRecordings=function(){return this.isPersistenceEnabled()?this.idb.init().then(function(){return this.idb.getAll()}.bind(this)).then(function(e){var t=e.filter(function(e){return Ip(e)}).map(function(e){return Mp.deserialize(e,{mixpanelInstance:this.mixpanelInstance,sharedLockStorage:this.sharedLockStorage}).unloadPersistedData().then(function(){return this.idb.removeItem(e.tabId)}.bind(this)).catch(this.handleError.bind(this))}.bind(this));return tu.all(t)}.bind(this)).catch(this.handleError.bind(this)):tu.resolve([])};var Pp=Du("recorder"),Lp=function(e,t,n){this.mixpanelInstance=e,this.rrwebRecord=t||Cl,this.sharedLockStorage=n,this.recordingRegistry=new Tp({mixpanelInstance:this.mixpanelInstance,errorReporter:Pp.error,sharedLockStorage:n}),this._flushInactivePromise=this.recordingRegistry.flushInactiveRecordings(),this.activeRecording=null,this.stopRecordingInProgress=!1};Lp.prototype.startRecording=function(e){if(e=e||{},!this.activeRecording||this.activeRecording.isRrwebStopped()){var t=function(){Pp.log("Idle timeout reached, restarting recording."),this.resetRecording()}.bind(this),n=function(){Pp.log("Max recording length reached, stopping recording."),this.resetRecording()}.bind(this),r=function(){this.recordingRegistry.setActiveRecording(this.activeRecording.serialize()),this.__flushPromise=this.activeRecording.batcher._flushPromise}.bind(this),i={mixpanelInstance:this.mixpanelInstance,onBatchSent:r,onIdleTimeout:t,onMaxLengthReached:n,replayId:Tu.UUID(),rrwebRecord:this.rrwebRecord,sharedLockStorage:this.sharedLockStorage};return e.activeSerializedRecording?this.activeRecording=Mp.deserialize(e.activeSerializedRecording,i):this.activeRecording=new Mp(i),this.activeRecording.startRecording(e.shouldStopBatcher),this.recordingRegistry.setActiveRecording(this.activeRecording.serialize())}Pp.log("Recording already in progress, skipping startRecording.")},Lp.prototype.stopRecording=function(){return this.stopRecordingInProgress=!0,this._stopCurrentRecording(!1,!0).then(function(){return this.recordingRegistry.clearActiveRecording()}.bind(this)).then(function(){this.stopRecordingInProgress=!1}.bind(this))},Lp.prototype.pauseRecording=function(){return this._stopCurrentRecording(!1)},Lp.prototype._stopCurrentRecording=function(e,t){if(this.activeRecording){var n=this.activeRecording.stopRecording(e);return t&&(this.activeRecording=null),n}return tu.resolve()},Lp.prototype.resumeRecording=function(e){return this.activeRecording&&this.activeRecording.isRrwebStopped()?(this.activeRecording.startRecording(!1),tu.resolve(null)):this.recordingRegistry.getActiveRecording().then(function(t){return t&&!this.stopRecordingInProgress?this.startRecording({activeSerializedRecording:t}):e?this.startRecording({shouldStopBatcher:!1}):(Pp.log("No resumable recording found."),null)}.bind(this))},Lp.prototype.resetRecording=function(){this.stopRecording(),this.startRecording({shouldStopBatcher:!0})},Lp.prototype.getActiveReplayId=function(){return this.activeRecording&&!this.activeRecording.isRrwebStopped()?this.activeRecording.replayId:null},Object.defineProperty(Lp.prototype,"replayId",{get:function(){return this.getActiveReplayId()}}),r.__mp_recorder=Lp;var Dp="change",Fp="click",Up="hashchange",jp="load",Bp="mp_locationchange",$p="popstate",zp="scrollend",qp="scroll",Vp="submit",Wp="visibilitychange",Hp=["clientX","clientY","offsetX","offsetY","pageX","pageY","screenX","screenY","x","y"],Gp=["mp-include"],Kp=["mp-no-track"],Jp=Kp.concat(["mp-sensitive"]),Yp=["aria-label","aria-labelledby","aria-describedby","href","name","role","title","type"],Zp={button:!0,checkbox:!0,combobox:!0,grid:!0,link:!0,listbox:!0,menu:!0,menubar:!0,menuitem:!0,menuitemcheckbox:!0,menuitemradio:!0,navigation:!0,option:!0,radio:!0,radiogroup:!0,searchbox:!0,slider:!0,spinbutton:!0,switch:!0,tab:!0,tablist:!0,textbox:!0,tree:!0,treegrid:!0,treeitem:!0},Xp={base:!0,head:!0,html:!0,link:!0,meta:!0,script:!0,style:!0,title:!0,br:!0,hr:!0,wbr:!0,noscript:!0,picture:!0,source:!0,template:!0,track:!0},Qp={article:!0,div:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,p:!0,section:!0,span:!0},ed=["onclick","onmousedown","onmouseup","onpointerdown","onpointerup","ontouchend","ontouchstart"],td=Du("autocapture");function nd(e){for(var t={},n=rd(e).split(" "),r=0;r0?t[0]:e.target||e.srcElement}function bd(){this.clicks=[]}function _d(e,t){this.changeCallback=e||function(){},this.observerConfig=t,this.observedShadowRoots=null,this.shadowObservers=[]}bd.prototype.isRageClick=function(e,t){var n=(t=t||{}).threshold_px||30,r=t.timeout_ms||1e3,i=t.click_count||4;if(t.interactive_elements_only){var o=yd(e);if(!o||md(o))return!1}var s=Date.now(),a=e.pageX,c=e.pageY,l=this.clicks[this.clicks.length-1];if(l&&s-l.timestamp=i)return this.clicks=[],!0}else this.clicks=[{x:a,y:c,timestamp:s}];return!1},_d.prototype.getEventTarget=function(e){if(this.observedShadowRoots)return yd(e)},_d.prototype.observeFromEvent=function(e){if(this.observedShadowRoots)for(var t=vd(e),n=0;n=t?this.hasChangesAfter(s.timestamp)||i.push(s):this.pendingClicks.push(s)}return i},Cd.prototype.hasChangesAfter=function(e){return this.lastChangeEventTimestamp>=e-100},Cd.prototype.recordChangeEvent=function(){this.lastChangeEventTimestamp=Date.now()},Cd.prototype.triggerProcessing=function(e){this.processingActive||(this.processingActive=!0,this.processRecursively(e))},Cd.prototype.processRecursively=function(e){if(this.isTracking&&this.onDeadClickCallback){var t=e.timeout_ms,n=this;this.processingTimeout=setTimeout(function(){if(n.processingActive){for(var t=n.getDeadClicks(e),r=0;r0?n.processRecursively(e):n.processingActive=!1}},t)}else this.processingActive=!1},Cd.prototype.startTracking=function(){if(!this.isTracking){this.isTracking=!0;var e=this;wd.forEach(function(t){var n=function(){e.recordChangeEvent()};document.addEventListener(t,n,{capture:!0,passive:!0}),e.eventListeners.push({target:document,event:t,handler:n,options:{capture:!0,passive:!0}})}),Sd.forEach(function(t){var n=function(){e.recordChangeEvent()};window.addEventListener(t,n),e.eventListeners.push({target:window,event:t,handler:n})}),kd.forEach(function(t){var n=function(){e.recordChangeEvent()};window.addEventListener(t,n,{passive:!0}),e.eventListeners.push({target:window,event:t,handler:n,options:{passive:!0}})});var t=function(){e.recordChangeEvent()};if(document.addEventListener("selectionchange",t),e.eventListeners.push({target:document,event:"selectionchange",handler:t}),window.MutationObserver)try{this.mutationObserver=new window.MutationObserver(function(){e.recordChangeEvent()}),this.mutationObserver.observe(document.body||document.documentElement,xd)}catch(e){td.critical("Error while setting up mutation observer",e)}if(window.customElements)try{this.shadowDOMObserver=new _d(function(){e.recordChangeEvent()},xd),this.shadowDOMObserver.start()}catch(e){td.critical("Error while setting up shadow DOM observer",e),this.shadowDOMObserver=null}}},Cd.prototype.stopTracking=function(){if(this.isTracking){this.isTracking=!1,this.pendingClicks=[],this.lastChangeEventTimestamp=0,this.processingActive=!1,this.processingTimeout&&(clearTimeout(this.processingTimeout),this.processingTimeout=null);for(var e=0;ethis.maxScrollViewDepth&&(this.maxScrollViewDepth=e),this.previousScrollHeight=Su.body.scrollHeight}}.bind(this));this.listenerScrollDepth=e.listener,r.addEventListener(e.eventType,this.listenerScrollDepth)}},Zd.prototype.initClickTracking=function(){r.removeEventListener(Fp,this.listenerClick),(this.getConfig(Ud)||this.mp.get_config("record_heatmap_data"))&&(td.log("Initializing click tracking"),this.listenerClick=function(e){(this.getConfig(Ud)||this.mp.is_recording_heatmap_data())&&this.trackDomEvent(e,Kd)}.bind(this),r.addEventListener(Fp,this.listenerClick))},Zd.prototype.initDeadClickTracking=function(){this._getClickTrackingConfig(jd)||this.mp.get_config("record_heatmap_data")?(td.log("Initializing dead click tracking"),this._deadClickTracker||(this._deadClickTracker=new Cd(function(e){this.trackDomEvent(e,Jd)}.bind(this)),this._deadClickTracker.startTracking()),this.listenerDeadClick||(this.listenerDeadClick=function(e){var t=this._getClickTrackingConfig(jd);if((t||this.mp.is_recording_heatmap_data())&&!this.currentUrlBlocked()){var n=t||{};n.timeout_ms||(n.timeout_ms=500),this._deadClickTracker.trackClick(e,n)}}.bind(this),r.addEventListener(Fp,this.listenerDeadClick))):this.stopDeadClickTracking()},Zd.prototype.initInputTracking=function(){r.removeEventListener(Dp,this.listenerChange),this.getConfig(Bd)&&(td.log("Initializing input tracking"),this.listenerChange=function(e){this.getConfig(Bd)&&this.trackDomEvent(e,"$mp_input_change")}.bind(this),r.addEventListener(Dp,this.listenerChange))},Zd.prototype.initPageviewTracking=function(){if(r.removeEventListener(Bp,this.listenerLocationchange),this.pageviewTrackingConfig()){td.log("Initializing pageview tracking");var e="",t=!1;this.currentUrlBlocked()||(t=this.mp.track_pageview(Gd)),t&&(e=Tu.info.currentUrl()),this.listenerLocationchange=Fu(function(){if(!this.currentUrlBlocked()){var t=Tu.info.currentUrl(),n=!1,r=t.split("#")[0].split("?")[0]!==e.split("#")[0].split("?")[0],i=this.pageviewTrackingConfig();i===Id?n=t!==e:"url-with-path-and-query-string"===i?n=t.split("#")[0]!==e.split("#")[0]:"url-with-path"===i&&(n=r),n&&(this.mp.track_pageview(Gd)&&(e=t),r&&(this.lastScrollCheckpoint=0,td.log("Path change: re-initializing scroll depth checkpoints")))}}.bind(this)),r.addEventListener(Bp,this.listenerLocationchange)}},Zd.prototype.initRageClickTracking=function(){r.removeEventListener(Fp,this.listenerRageClick),(this._getClickTrackingConfig(zd)||this.mp.get_config("record_heatmap_data"))&&(td.log("Initializing rage click tracking"),this._rageClickTracker||(this._rageClickTracker=new bd),this.listenerRageClick=function(e){var t=this._getClickTrackingConfig(zd);(t||this.mp.is_recording_heatmap_data())&&(this.currentUrlBlocked()||this._rageClickTracker.isRageClick(e,t)&&this.trackDomEvent(e,Yd))}.bind(this),r.addEventListener(Fp,this.listenerRageClick))},Zd.prototype.initScrollTracking=function(){if(r.removeEventListener(zp,this.listenerScroll),r.removeEventListener(qp,this.listenerScroll),this.getConfig(qd)){td.log("Initializing scroll tracking"),this.lastScrollCheckpoint=0;var e=fd(function(){if(this.getConfig(qd)&&!this.currentUrlBlocked()){var e=this.getConfig(Dd),t=(this.getConfig(Fd)||[]).slice().sort(function(e,t){return e-t}),n=r.scrollY,i=Tu.extend({$scroll_top:n},Gd);try{var o=Su.body.scrollHeight,s=Math.round(n/(o-r.innerHeight)*100);if(i.$scroll_height=o,i.$scroll_percentage=s,s>this.lastScrollCheckpoint)for(var a=0;a=c&&this.lastScrollCheckpoint=0;p--)c=this._mixpanel.persistence.load_queue(uh),l=c.pop(),a._mixpanel.persistence.save(),Tu.isEmptyObject(l)||a.append(l,u);var d=this._mixpanel.persistence.load_queue(dh);if(!Tu.isUndefined(d)&&Tu.isArray(d)&&d.length)for(var h,f=function(e,t){0===e&&a._mixpanel.persistence._add_to_people_queue(dh,h),Tu.isUndefined(s)||s(e,t)},g=d.length-1;g>=0;g--)d=this._mixpanel.persistence.load_queue(dh),h=d.pop(),a._mixpanel.persistence.save(),Tu.isEmptyObject(h)||a.remove(h,f)},gh.prototype._is_reserved_property=function(e){return"$distinct_id"===e||"$token"===e||"$device_id"===e||"$user_id"===e||"$had_persisted_distinct_id"===e},gh.prototype.set=gh.prototype.set,gh.prototype.set_once=gh.prototype.set_once,gh.prototype.unset=gh.prototype.unset,gh.prototype.increment=gh.prototype.increment,gh.prototype.append=gh.prototype.append,gh.prototype.remove=gh.prototype.remove,gh.prototype.union=gh.prototype.union,gh.prototype.track_charge=gh.prototype.track_charge,gh.prototype.clear_charges=gh.prototype.clear_charges,gh.prototype.delete_user=gh.prototype.delete_user,gh.prototype.toString=gh.prototype.toString;var mh,vh="__mps",yh="__mpso",bh="__mpus",_h="__mpa",wh="__mpap",kh="__mpr",Sh="__mpu",xh="$people_distinct_id",Ch="__alias",Eh="__timers",Ih=[vh,yh,bh,_h,wh,kh,Sh,xh,Ch,Eh],Nh=function(e){this.props={},this.campaign_params_saved=!1,e.persistence_name?this.name="mp_"+e.persistence_name:this.name="mp_"+e.token+"_mixpanel";var t=e.persistence;"cookie"!==t&&"localStorage"!==t&&(Pu.critical("Unknown persistence type "+t+"; falling back to cookie"),t=e.persistence="cookie"),"localStorage"===t&&Tu.localStorage.is_supported()?this.storage=Tu.localStorage:this.storage=Tu.cookie,this.load(),this.update_config(e),this.upgrade(),this.save()};Nh.prototype.properties=function(){var e={};return this.load(),Tu.each(this.props,function(t,n){Tu.include(Ih,n)||(e[n]=t)}),e},Nh.prototype.load=function(){if(!this.disabled){var e=this.storage.parse(this.name);e&&(this.props=Tu.extend({},e))}},Nh.prototype.upgrade=function(){var e,t;this.storage===Tu.localStorage?(e=Tu.cookie.parse(this.name),Tu.cookie.remove(this.name),Tu.cookie.remove(this.name,!0),e&&this.register_once(e)):this.storage===Tu.cookie&&(t=Tu.localStorage.parse(this.name),Tu.localStorage.remove(this.name),t&&this.register_once(t))},Nh.prototype.save=function(){this.disabled||this.storage.set(this.name,Qu(this.props),this.expire_days,this.cross_subdomain,this.secure,this.cross_site,this.cookie_domain)},Nh.prototype.load_prop=function(e){return this.load(),this.props[e]},Nh.prototype.remove=function(){this.storage.remove(this.name,!1,this.cookie_domain),this.storage.remove(this.name,!0,this.cookie_domain)},Nh.prototype.clear=function(){this.remove(),this.props={}},Nh.prototype.register_once=function(e,t,n){return!!Tu.isObject(e)&&(void 0===t&&(t="None"),this.expire_days=void 0===n?this.default_expiry:n,this.load(),Tu.each(e,function(e,n){this.props.hasOwnProperty(n)&&this.props[n]!==t||(this.props[n]=e)},this),this.save(),!0)},Nh.prototype.register=function(e,t){return!!Tu.isObject(e)&&(this.expire_days=void 0===t?this.default_expiry:t,this.load(),Tu.extend(this.props,e),this.save(),!0)},Nh.prototype.unregister=function(e){this.load(),e in this.props&&(delete this.props[e],this.save())},Nh.prototype.update_search_keyword=function(e){this.register(Tu.info.searchInfo(e))},Nh.prototype.update_referrer_info=function(e){this.register_once({$initial_referrer:e||"$direct",$initial_referring_domain:Tu.info.referringDomain(e)||"$direct"},"")},Nh.prototype.get_referrer_info=function(){return Tu.strip_empty_properties({$initial_referrer:this.props.$initial_referrer,$initial_referring_domain:this.props.$initial_referring_domain})},Nh.prototype.update_config=function(e){this.default_expiry=this.expire_days=e.cookie_expiration,this.set_disabled(e.disable_persistence),this.set_cookie_domain(e.cookie_domain),this.set_cross_site(e.cross_site_cookie),this.set_cross_subdomain(e.cross_subdomain_cookie),this.set_secure(e.secure_cookie)},Nh.prototype.set_disabled=function(e){this.disabled=e,this.disabled?this.remove():this.save()},Nh.prototype.set_cookie_domain=function(e){e!==this.cookie_domain&&(this.remove(),this.cookie_domain=e,this.save())},Nh.prototype.set_cross_site=function(e){e!==this.cross_site&&(this.cross_site=e,this.remove(),this.save())},Nh.prototype.set_cross_subdomain=function(e){e!==this.cross_subdomain&&(this.cross_subdomain=e,this.remove(),this.save())},Nh.prototype.get_cross_subdomain=function(){return this.cross_subdomain},Nh.prototype.set_secure=function(e){e!==this.secure&&(this.secure=!!e,this.remove(),this.save())},Nh.prototype._add_to_people_queue=function(e,t){var n=this._get_queue_key(e),r=t[e],i=this._get_or_create_queue(sh),o=this._get_or_create_queue(ah),s=this._get_or_create_queue(ch),a=this._get_or_create_queue(lh),c=this._get_or_create_queue(ph),l=this._get_or_create_queue(dh,[]),u=this._get_or_create_queue(uh,[]);n===vh?(Tu.extend(i,r),this._pop_from_people_queue(lh,r),this._pop_from_people_queue(ph,r),this._pop_from_people_queue(ch,r)):n===yh?(Tu.each(r,function(e,t){t in o||(o[t]=e)}),this._pop_from_people_queue(ch,r)):n===bh?Tu.each(r,function(e){Tu.each([i,o,a,c],function(t){e in t&&delete t[e]}),Tu.each(u,function(t){e in t&&delete t[e]}),s[e]=!0}):n===_h?(Tu.each(r,function(e,t){t in i?i[t]+=e:(t in a||(a[t]=0),a[t]+=e)},this),this._pop_from_people_queue(ch,r)):n===Sh?(Tu.each(r,function(e,t){Tu.isArray(e)&&(t in c||(c[t]=[]),Tu.each(e,function(e){Tu.include(c[t],e)||c[t].push(e)}))}),this._pop_from_people_queue(ch,r)):n===kh?(l.push(r),this._pop_from_people_queue(uh,r)):n===wh&&(u.push(r),this._pop_from_people_queue(ch,r)),Pu.log("MIXPANEL PEOPLE REQUEST (QUEUED, PENDING IDENTIFY):"),Pu.log(t),this.save()},Nh.prototype._pop_from_people_queue=function(e,t){var n=this.props[this._get_queue_key(e)];Tu.isUndefined(n)||Tu.each(t,function(t,r){e===uh||e===dh?Tu.each(n,function(e){e[r]===t&&delete e[r]}):delete n[r]},this)},Nh.prototype.load_queue=function(e){return this.load_prop(this._get_queue_key(e))},Nh.prototype._get_queue_key=function(e){return e===sh?vh:e===ah?yh:e===ch?bh:e===lh?_h:e===uh?wh:e===dh?kh:e===ph?Sh:void Pu.error("Invalid queue:",e)},Nh.prototype._get_or_create_queue=function(e,t){var n=this._get_queue_key(e);return t=Tu.isUndefined(t)?{}:t,this.props[n]||(this.props[n]=t)},Nh.prototype.set_event_timer=function(e,t){var n=this.load_prop(Eh)||{};n[e]=t,this.props[Eh]=n,this.save()},Nh.prototype.remove_event_timer=function(e){var t=(this.load_prop(Eh)||{})[e];return Tu.isUndefined(t)||(delete this.props[Eh][e],this.save()),t};var Oh,Ah=function(e,t){throw new Error(e+" not available in this build.")},Rh=function(e){return e},Mh="mixpanel",Th="base64",Ph="$device:",Lh=r.XMLHttpRequest&&"withCredentials"in new XMLHttpRequest,Dh=!Lh&&-1===Eu.indexOf("MSIE")&&-1===Eu.indexOf("Mozilla"),Fh=null;ku.sendBeacon&&(Fh=function(){return ku.sendBeacon.apply(ku,arguments)});var Uh={track:"track/",engage:"engage/",groups:"groups/",record:"record/",flags:"flags/"},jh={api_host:"https://api-js.mixpanel.com",api_hosts:{},api_routes:Uh,api_extra_query_params:{},api_method:"POST",api_transport:"XHR",api_payload_format:Th,app_host:"https://mixpanel.com",autocapture:!1,cdn:"https://cdn.mxpnl.com",cross_site_cookie:!1,cross_subdomain_cookie:!0,error_reporter:Xu,flags:!1,persistence:"cookie",persistence_name:"",cookie_domain:"",cookie_name:"",loaded:Xu,mp_loader:null,track_marketing:!0,track_pageview:!1,skip_first_touch_marketing:!1,store_google:!0,stop_utm_persistence:!1,save_referrer:!0,test:!1,verbose:!1,img:!1,debug:!1,track_links_timeout:300,cookie_expiration:365,upgrade:!1,disable_persistence:!1,disable_cookie:!1,secure_cookie:!1,ip:!0,opt_out_tracking_by_default:!1,opt_out_persistence_by_default:!1,opt_out_tracking_persistence_type:"localStorage",opt_out_tracking_cookie_prefix:null,property_blacklist:[],xhr_headers:{},ignore_dnt:!1,batch_requests:!0,batch_size:50,batch_flush_interval_ms:5e3,batch_request_timeout_ms:9e4,batch_autostart:!0,hooks:{},record_block_class:new RegExp("^(mp-block|fs-exclude|amp-block|rr-block|ph-no-capture)$"),record_block_selector:"img, video, audio",record_canvas:!1,record_collect_fonts:!1,record_console:!0,record_heatmap_data:!1,record_idle_timeout_ms:18e5,record_mask_text_class:new RegExp("^(mp-mask|fs-mask|amp-mask|rr-mask|ph-mask)$"),record_mask_text_selector:"*",record_max_ms:fu,record_min_ms:0,record_sessions_percent:0,recorder_src:"https://cdn.mxpnl.com/libs/mixpanel-recorder.min.js"},Bh=!1,$h=function(){},zh=function(e,t,n){var r,i=n===Mh?Oh:Oh[n];if(i&&0===mh)r=i;else{if(i&&!Tu.isArray(i))return void Pu.error("You have already initialized "+n);r=new $h}if(r._cached_groups={},r._init(e,t,n),r.people=new gh,r.people._init(r),!r.get_config("skip_first_touch_marketing")){var o=Tu.info.campaignParams(null),s={},a=!1;Tu.each(o,function(e,t){s["initial_"+t]=e,e&&(a=!0)}),a&&r.people.set_once(s)}return hu.DEBUG=hu.DEBUG||r.get_config("debug"),!Tu.isUndefined(i)&&Tu.isArray(i)&&(r._execute_array.call(r.people,i.people),r._execute_array(i)),r};$h.prototype.init=function(e,t,n){if(Tu.isUndefined(n))this.report_error("You must name your new library: init(token, config, name)");else{if(n!==Mh){var r=zh(e,t,n);return Oh[n]=r,r._loaded(),r}this.report_error("You must initialize the main mixpanel object right after you include the Mixpanel js snippet")}},$h.prototype._init=function(e,t,n){t=t||{},this.__loaded=!0,this.config={};var i={};if("api_payload_format"in t||(t.api_host||jh.api_host).match(/\.mixpanel\.com/)&&(i.api_payload_format="json"),this.set_config(Tu.extend({},jh,i,t,{name:n,token:e,callback_fn:(n===Mh?n:Mh+"."+n)+"._jsc"})),this._jsc=Xu,this.__dom_loaded_queue=[],this.__request_queue=[],this.__disabled_events=[],this._flags={disable_all_events:!1,identify_called:!1},this.request_batchers={},this._batch_requests=this.get_config("batch_requests"),this._batch_requests)if(Tu.localStorage.is_supported(!0)&&Lh){if(this.init_batchers(),Fh&&r.addEventListener){var o=Tu.bind(function(){this.request_batchers.events.stopped||this.request_batchers.events.flush({unloading:!0})},this);r.addEventListener("pagehide",function(e){e.persisted&&o()}),r.addEventListener("visibilitychange",function(){"hidden"===Su.visibilityState&&o()})}}else this._batch_requests=!1,Pu.log("Turning off Mixpanel request-queueing; needs XHR and localStorage support"),Tu.each(this.get_batcher_configs(),function(e){Pu.log("Clearing batch queue "+e.queue_key),Tu.localStorage.remove(e.queue_key)});this.persistence=this.cookie=new Nh(this.config),this.unpersisted_superprops={},this._gdpr_init();var s=Tu.UUID();this.get_distinct_id()||this.register_once({distinct_id:Ph+s,$device_id:s},""),this.flags=new nh({getFullApiRoute:Tu.bind(function(){return this.get_api_host("flags")+"/"+this.get_config("api_routes").flags},this),getConfigFunc:Tu.bind(this.get_config,this),setConfigFunc:Tu.bind(this.set_config,this),getPropertyFunc:Tu.bind(this.get_property,this),trackingFunc:Tu.bind(this.track,this)}),this.flags.init(),this.flags=this.flags,this.autocapture=new Zd(this),this.autocapture.init(),this._init_tab_id(),this._check_and_start_session_recording()},$h.prototype._init_tab_id=function(){if(this.get_config("disable_persistence"))Pu.log("Tab ID initialization skipped due to disable_persistence config");else if(Tu.sessionStorage.is_supported())try{var e=this.get_config("name")+"_"+this.get_config("token"),t="mp_tab_id_"+e,n="mp_gen_new_tab_id_"+e;!Tu.sessionStorage.get(n)&&Tu.sessionStorage.get(t)||Tu.sessionStorage.set(t,"$tab-"+Tu.UUID()),Tu.sessionStorage.set(n,"1"),this.tab_id=Tu.sessionStorage.get(t),r.addEventListener("beforeunload",function(){Tu.sessionStorage.remove(n)})}catch(e){this.report_error("Error initializing tab id",e)}else this.report_error("Session storage is not supported, cannot keep track of unique tab ID.")},$h.prototype.get_tab_id=function(){return this.tab_id||null},$h.prototype._should_load_recorder=function(){if(this.get_config("disable_persistence"))return Pu.log("Load recorder check skipped due to disable_persistence config"),Promise.resolve(!1);var e=new ip(np),t=this.get_tab_id();return e.init().then(function(){return e.getAll()}).then(function(e){for(var n=0;n0&&100*Math.random()<=this.get_config("record_sessions_percent");e||n?t(!0):this._should_load_recorder().then(function(e){e&&t(!1)})}else Pu.critical("Browser does not support MutationObserver; skipping session recording")}),$h.prototype.start_session_recording=function(){this._check_and_start_session_recording(!0)},$h.prototype.stop_session_recording=function(){return this._recorder?this._recorder.stopRecording():Promise.resolve()},$h.prototype.pause_session_recording=function(){return this._recorder?this._recorder.pauseRecording():Promise.resolve()},$h.prototype.resume_session_recording=function(){return this._recorder?this._recorder.resumeRecording():Promise.resolve()},$h.prototype.is_recording_heatmap_data=function(){return this._get_session_replay_id()&&this.get_config("record_heatmap_data")},$h.prototype.get_session_recording_properties=function(){var e={},t=this._get_session_replay_id();return t&&(e.$mp_replay_id=t),e},$h.prototype.get_session_replay_url=function(){var e=null,t=this._get_session_replay_id();return t&&(e="https://mixpanel.com/projects/replay-redirect?"+Tu.HTTPBuildQuery({replay_id:t,distinct_id:this.get_distinct_id(),token:this.get_config("token")})),e},$h.prototype._get_session_replay_id=function(){var e=null;return this._recorder&&(e=this._recorder.replayId),e||null},$h.prototype.__get_recorder=function(){return this._recorder},$h.prototype._loaded=function(){if(this.get_config("loaded")(this),this._set_default_superprops(),this.people.set_once(this.persistence.get_referrer_info()),this.get_config("store_google")&&this.get_config("stop_utm_persistence")){var e=Tu.info.campaignParams(null);Tu.each(e,function(e,t){this.unregister(t)}.bind(this))}},$h.prototype._set_default_superprops=function(){this.persistence.update_search_keyword(Su.referrer),this.get_config("store_google")&&!this.get_config("stop_utm_persistence")&&this.register(Tu.info.campaignParams()),this.get_config("save_referrer")&&this.persistence.update_referrer_info(Su.referrer)},$h.prototype._dom_loaded=function(){Tu.each(this.__dom_loaded_queue,function(e){this._track_dom.apply(this,e)},this),this.has_opted_out_tracking()||Tu.each(this.__request_queue,function(e){this._send_request.apply(this,e)},this),delete this.__dom_loaded_queue,delete this.__request_queue},$h.prototype._track_dom=function(e,t){if(this.get_config("img"))return this.report_error("You can't use DOM tracking functions with img = true."),!1;if(!Bh)return this.__dom_loaded_queue.push([e,t]),!1;var n=(new e).init(this);return n.track.apply(n,t)},$h.prototype._prepare_callback=function(e,t){if(Tu.isUndefined(e))return null;if(Lh)return function(n){e(n,t)};var n=this._jsc,r=""+Math.floor(1e8*Math.random()),i=this.get_config("callback_fn")+"["+r+"]";return n[r]=function(i){delete n[r],e(i,t)},i},$h.prototype._send_request=function(e,t,n,r){var i=!0;if(Dh)return this.__request_queue.push(arguments),i;var o={method:this.get_config("api_method"),transport:this.get_config("api_transport"),verbose:this.get_config("verbose")},s=null;r||!Tu.isFunction(n)&&"string"!=typeof n||(r=n,n=null),n=Tu.extend(o,n||{}),Lh||(n.method="GET");var a="POST"===n.method,c=Fh&&a&&"sendbeacon"===n.transport.toLowerCase(),l=n.verbose;t.verbose&&(l=!0),this.get_config("test")&&(t.test=1),l&&(t.verbose=1),this.get_config("img")&&(t.img=1),Lh||(r?t.callback=r:(l||this.get_config("test"))&&(t.callback="(function(){})")),t.ip=this.get_config("ip")?1:0,t._=(new Date).getTime().toString(),a&&(s="data="+encodeURIComponent(t.data),delete t.data),Tu.extend(t,this.get_config("api_extra_query_params")),e+="?"+Tu.HTTPBuildQuery(t);var u=this;if("img"in t){var p=Su.createElement("img");p.src=e,Su.body.appendChild(p)}else if(c){try{i=Fh(e,s)}catch(e){u.report_error(e),i=!1}try{r&&r(i?1:0)}catch(e){u.report_error(e)}}else if(Lh)try{var d=new XMLHttpRequest;d.open(n.method,e,!0);var h=this.get_config("xhr_headers");if(a&&(h["Content-Type"]="application/x-www-form-urlencoded"),Tu.each(h,function(e,t){d.setRequestHeader(t,e)}),n.timeout_ms&&void 0!==d.timeout){d.timeout=n.timeout_ms;var f=(new Date).getTime()}d.withCredentials=!0,d.onreadystatechange=function(){var e;if(4===d.readyState)if(200===d.status){if(r)if(l){var t;try{t=Tu.JSONDecode(d.responseText)}catch(e){if(u.report_error(e),!n.ignore_json_errors)return;t=d.responseText}r(t)}else r(Number(d.responseText))}else if(e=d.timeout&&!d.status&&(new Date).getTime()-f>=d.timeout?"timeout":"Bad HTTP status: "+d.status+" "+d.statusText,u.report_error(e),r)if(l){var i=d.responseHeaders||{};r({status:0,httpStatusCode:d.status,error:e,retryAfter:i["Retry-After"]})}else r(0)},d.send(s)}catch(e){u.report_error(e),i=!1}else{var g=Su.createElement("script");g.type="text/javascript",g.async=!0,g.defer=!0,g.src=e;var m=Su.getElementsByTagName("script")[0];m.parentNode.insertBefore(g,m)}return i},$h.prototype._execute_array=function(e){var t,n=[],r=[],i=[];Tu.each(e,function(e){e&&(t=e[0],Tu.isArray(t)?i.push(e):"function"==typeof e?e.call(this):Tu.isArray(e)&&"alias"===t?n.push(e):Tu.isArray(e)&&-1!==t.indexOf("track")&&"function"==typeof this[t]?i.push(e):r.push(e))},this);var o=function(e,t){Tu.each(e,function(e){if(Tu.isArray(e[0])){var n=t;Tu.each(e,function(e){n=n[e[0]].apply(n,e.slice(1))})}else this[e[0]].apply(this,e.slice(1))},t)};o(n,this),o(r,this),o(i,this)},$h.prototype.are_batchers_initialized=function(){return!!this.request_batchers.events},$h.prototype.get_batcher_configs=function(){var e="__mpq_"+this.get_config("token");return this._batcher_configs=this._batcher_configs||{events:{type:"events",api_name:"track",queue_key:e+"_ev"},people:{type:"people",api_name:"engage",queue_key:e+"_pp"},groups:{type:"groups",api_name:"groups",queue_key:e+"_gr"}},this._batcher_configs},$h.prototype.init_batchers=function(){if(!this.are_batchers_initialized()){var e=Tu.bind(function(e){return new Ep(e.queue_key,{libConfig:this.config,errorReporter:this.get_config("error_reporter"),sendRequestFunc:Tu.bind(function(t,n,r){var i=this.get_config("api_routes");this._send_request(this.get_api_host(e.api_name)+"/"+i[e.api_name],this._encode_data_for_request(t),n,this._prepare_callback(r,t))},this),beforeSendHook:Tu.bind(function(t){return this._run_hook("before_send_"+e.type,t)},this),stopAllBatchingFunc:Tu.bind(this.stop_batch_senders,this),usePersistence:!0})},this),t=this.get_batcher_configs();this.request_batchers={events:e(t.events),people:e(t.people),groups:e(t.groups)}}this.get_config("batch_autostart")&&this.start_batch_senders()},$h.prototype.start_batch_senders=function(){this._batchers_were_started=!0,this.are_batchers_initialized()&&(this._batch_requests=!0,Tu.each(this.request_batchers,function(e){e.start()}))},$h.prototype.stop_batch_senders=function(){this._batch_requests=!1,Tu.each(this.request_batchers,function(e){e.stop(),e.clear()})},$h.prototype.push=function(e){this._execute_array([e])},$h.prototype.disable=function(e){void 0===e?this._flags.disable_all_events=!0:this.__disabled_events=this.__disabled_events.concat(e)},$h.prototype._encode_data_for_request=function(e){var t=Qu(e);return this.get_config("api_payload_format")===Th&&(t=Tu.base64Encode(t)),{data:t}},$h.prototype._track_or_batch=function(e,t){var n=Tu.truncate(e.data,255),r=e.endpoint,i=e.batcher,o=e.should_send_immediately,s=e.send_request_options||{};t=t||Xu;var a=!0,c=Tu.bind(function(){return s.skip_hooks||(n=this._run_hook("before_send_"+e.type,n)),n?(Pu.log("MIXPANEL REQUEST:"),Pu.log(n),this._send_request(r,this._encode_data_for_request(n),s,this._prepare_callback(t,n))):null},this);return this._batch_requests&&!o?i.enqueue(n).then(function(e){e?t(1,n):c()}):a=c(),a&&n},$h.prototype.track=lp(function(e,t,n,r){r||"function"!=typeof n||(r=n,n=null);var i=(n=n||{}).transport;i&&(n.transport=i);var o=n.send_immediately;if("function"!=typeof r&&(r=Xu),Tu.isUndefined(e))this.report_error("No event name provided to mixpanel.track");else{if(!this._event_is_disabled(e)){(t=Tu.extend({},t)).token=this.get_config("token");var s=this.persistence.remove_event_timer(e);if(!Tu.isUndefined(s)){var a=(new Date).getTime()-s;t.$duration=parseFloat((a/1e3).toFixed(3))}this._set_default_superprops();var c=this.get_config("track_marketing")?Tu.info.marketingParams():{};t=Tu.extend({},Tu.info.properties({mp_loader:this.get_config("mp_loader")}),c,this.persistence.properties(),this.unpersisted_superprops,this.get_session_recording_properties(),t);var l=this.get_config("property_blacklist");Tu.isArray(l)?Tu.each(l,function(e){delete t[e]}):this.report_error("Invalid value for property_blacklist config: "+l);var u={event:e,properties:t};return this._track_or_batch({type:"events",data:u,endpoint:this.get_api_host("events")+"/"+this.get_config("api_routes").track,batcher:this.request_batchers.events,should_send_immediately:o,send_request_options:n},r)}r(0)}}),$h.prototype.set_group=lp(function(e,t,n){Tu.isArray(t)||(t=[t]);var r={};return r[e]=t,this.register(r),this.people.set(e,t,n)}),$h.prototype.add_group=lp(function(e,t,n){var r=this.get_property(e),i={};return void 0===r?(i[e]=[t],this.register(i)):-1===r.indexOf(t)&&(r.push(t),i[e]=r,this.register(i)),this.people.union(e,t,n)}),$h.prototype.remove_group=lp(function(e,t,n){var r=this.get_property(e);if(void 0!==r){var i=r.indexOf(t);i>-1&&(r.splice(i,1),this.register({group_key:r})),0===r.length&&this.unregister(e)}return this.people.remove(e,t,n)}),$h.prototype.track_with_groups=lp(function(e,t,n,r){var i=Tu.extend({},t||{});return Tu.each(n,function(e,t){null!=e&&(i[t]=e)}),this.track(e,i,r)}),$h.prototype._create_map_key=function(e,t){return e+"_"+JSON.stringify(t)},$h.prototype._remove_group_from_cache=function(e,t){delete this._cached_groups[this._create_map_key(e,t)]},$h.prototype.get_group=function(e,t){var n=this._create_map_key(e,t),r=this._cached_groups[n];return void 0!==r&&r._group_key===e&&r._group_id===t||((r=new fh)._init(this,e,t),this._cached_groups[n]=r),r},$h.prototype.track_pageview=lp(function(e,t){"object"!=typeof e&&(e={});var n=(t=t||{}).event_name||"$mp_web_page_view",r=Tu.extend(Tu.info.mpPageViewProperties(),Tu.info.campaignParams(),Tu.info.clickParams()),i=Tu.extend({},r,e);return this.track(n,i)}),$h.prototype.track_links=function(){return this._track_dom.call(this,ih,arguments)},$h.prototype.track_forms=function(){return this._track_dom.call(this,oh,arguments)},$h.prototype.time_event=function(e){Tu.isUndefined(e)?this.report_error("No event name provided to mixpanel.time_event"):this._event_is_disabled(e)||this.persistence.set_event_timer(e,(new Date).getTime())};var qh={persistent:!0},Vh=function(e){var t;return t=Tu.isObject(e)?e:Tu.isUndefined(e)?{}:{days:e},Tu.extend({},qh,t)};$h.prototype.register=function(e,t){var n=Vh(t);n.persistent?this.persistence.register(e,n.days):Tu.extend(this.unpersisted_superprops,e)},$h.prototype.register_once=function(e,t,n){var r=Vh(n);r.persistent?this.persistence.register_once(e,t,r.days):(void 0===t&&(t="None"),Tu.each(e,function(e,n){this.unpersisted_superprops.hasOwnProperty(n)&&this.unpersisted_superprops[n]!==t||(this.unpersisted_superprops[n]=e)},this))},$h.prototype.unregister=function(e,t){(t=Vh(t)).persistent?this.persistence.unregister(e):delete this.unpersisted_superprops[e]},$h.prototype._register_single=function(e,t){var n={};n[e]=t,this.register(n)},$h.prototype.identify=function(e,t,n,r,i,o,s,a){var c=this.get_distinct_id();if(e&&c!==e){if("string"==typeof e&&0===e.indexOf(Ph))return this.report_error("distinct_id cannot have $device: prefix"),-1;this.register({$user_id:e})}if(!this.get_property("$device_id")){var l=c;this.register_once({$had_persisted_distinct_id:!0,$device_id:l},"")}e!==c&&e!==this.get_property(Ch)&&(this.unregister(Ch),this.register({distinct_id:e})),this._flags.identify_called=!0,this.people._flush(t,n,r,i,o,s,a),e!==c&&this.track("$identify",{distinct_id:e,$anon_distinct_id:c},{skip_hooks:!0}),e!==c&&this.flags.fetchFlags()},$h.prototype.reset=function(){this.stop_session_recording(),this.persistence.clear(),this._flags.identify_called=!1;var e=Tu.UUID();this.register_once({distinct_id:Ph+e,$device_id:e},""),this._check_and_start_session_recording()},$h.prototype.get_distinct_id=function(){return this.get_property("distinct_id")},$h.prototype.alias=function(e,t){if(e===this.get_property(xh))return this.report_error("Attempting to create alias for existing People user - aborting."),-2;var n=this;return Tu.isUndefined(t)&&(t=this.get_distinct_id()),e!==t?(this._register_single(Ch,e),this.track("$create_alias",{alias:e,distinct_id:t},{skip_hooks:!0},function(){n.identify(e)})):(this.report_error("alias matches current distinct_id - skipping api call."),this.identify(e),-1)},$h.prototype.name_tag=function(e){this._register_single("mp_name_tag",e)},$h.prototype.set_config=function(e){Tu.isObject(e)&&(Tu.extend(this.config,e),e.batch_size&&Tu.each(this.request_batchers,function(e){e.resetBatchSize()}),this.get_config("persistence_name")||(this.config.persistence_name=this.config.cookie_name),this.get_config("disable_persistence")||(this.config.disable_persistence=this.config.disable_cookie),this.persistence&&this.persistence.update_config(this.config),hu.DEBUG=hu.DEBUG||this.get_config("debug"),("autocapture"in e||"record_heatmap_data"in e)&&this.autocapture&&this.autocapture.init())},$h.prototype.get_config=function(e){return this.config[e]},$h.prototype._run_hook=function(e){var t=(this.config.hooks[e]||Rh).apply(this,yu.call(arguments,1));return void 0===t&&(this.report_error(e+" hook did not return a value"),t=null),t},$h.prototype.get_property=function(e){return this.persistence.load_prop([e])},$h.prototype.get_api_host=function(e){return this.get_config("api_hosts")[e]||this.get_config("api_host")},$h.prototype.toString=function(){var e=this.get_config("name");return e!==Mh&&(e=Mh+"."+e),e},$h.prototype._event_is_disabled=function(e){return Tu.isBlockedUA(Eu)||this._flags.disable_all_events||Tu.include(this.__disabled_events,e)},$h.prototype._gdpr_init=function(){"localStorage"===this.get_config("opt_out_tracking_persistence_type")&&Tu.localStorage.is_supported()&&(!this.has_opted_in_tracking()&&this.has_opted_in_tracking({persistence_type:"cookie"})&&this.opt_in_tracking({enable_persistence:!1}),!this.has_opted_out_tracking()&&this.has_opted_out_tracking({persistence_type:"cookie"})&&this.opt_out_tracking({clear_persistence:!1}),this.clear_opt_in_out_tracking({persistence_type:"cookie",enable_persistence:!1})),this.has_opted_out_tracking()?this._gdpr_update_persistence({clear_persistence:!0}):this.has_opted_in_tracking()||!this.get_config("opt_out_tracking_by_default")&&!Tu.cookie.get("mp_optout")||(Tu.cookie.remove("mp_optout"),this.opt_out_tracking({clear_persistence:this.get_config("opt_out_persistence_by_default")}))},$h.prototype._gdpr_update_persistence=function(e){var t;if(e&&e.clear_persistence)t=!0;else{if(!e||!e.enable_persistence)return;t=!1}this.get_config("disable_persistence")||this.persistence.disabled===t||this.persistence.set_disabled(t),t?(this.stop_batch_senders(),this.stop_session_recording()):this._batchers_were_started&&this.start_batch_senders()},$h.prototype._gdpr_call_func=function(e,t){return t=Tu.extend({track:Tu.bind(this.track,this),persistence_type:this.get_config("opt_out_tracking_persistence_type"),cookie_prefix:this.get_config("opt_out_tracking_cookie_prefix"),cookie_expiration:this.get_config("cookie_expiration"),cross_site_cookie:this.get_config("cross_site_cookie"),cross_subdomain_cookie:this.get_config("cross_subdomain_cookie"),cookie_domain:this.get_config("cookie_domain"),secure_cookie:this.get_config("secure_cookie"),ignore_dnt:this.get_config("ignore_dnt")},t),Tu.localStorage.is_supported()||(t.persistence_type="cookie"),e(this.get_config("token"),{track:t.track,trackEventName:t.track_event_name,trackProperties:t.track_properties,persistenceType:t.persistence_type,persistencePrefix:t.cookie_prefix,cookieDomain:t.cookie_domain,cookieExpiration:t.cookie_expiration,crossSiteCookie:t.cross_site_cookie,crossSubdomainCookie:t.cross_subdomain_cookie,secureCookie:t.secure_cookie,ignoreDnt:t.ignore_dnt})},$h.prototype.opt_in_tracking=function(e){e=Tu.extend({enable_persistence:!0},e),this._gdpr_call_func(op,e),this._gdpr_update_persistence(e)},$h.prototype.opt_out_tracking=function(e){(e=Tu.extend({clear_persistence:!0,delete_user:!0},e)).delete_user&&this.people&&this.people._identify_called()&&(this.people.delete_user(),this.people.clear_charges()),this._gdpr_call_func(sp,e),this._gdpr_update_persistence(e)},$h.prototype.has_opted_in_tracking=function(e){return this._gdpr_call_func(ap,e)},$h.prototype.has_opted_out_tracking=function(e){return this._gdpr_call_func(cp,e)},$h.prototype.clear_opt_in_out_tracking=function(e){e=Tu.extend({enable_persistence:!0},e),this._gdpr_call_func(dp,e),this._gdpr_update_persistence(e)},$h.prototype.report_error=function(e,t){Pu.error.apply(Pu.error,arguments);try{t||e instanceof Error||(e=new Error(e)),this.get_config("error_reporter")(e,t)}catch(t){Pu.error(t)}},$h.prototype.init=$h.prototype.init,$h.prototype.reset=$h.prototype.reset,$h.prototype.disable=$h.prototype.disable,$h.prototype.time_event=$h.prototype.time_event,$h.prototype.track=$h.prototype.track,$h.prototype.track_links=$h.prototype.track_links,$h.prototype.track_forms=$h.prototype.track_forms,$h.prototype.track_pageview=$h.prototype.track_pageview,$h.prototype.register=$h.prototype.register,$h.prototype.register_once=$h.prototype.register_once,$h.prototype.unregister=$h.prototype.unregister,$h.prototype.identify=$h.prototype.identify,$h.prototype.alias=$h.prototype.alias,$h.prototype.name_tag=$h.prototype.name_tag,$h.prototype.set_config=$h.prototype.set_config,$h.prototype.get_config=$h.prototype.get_config,$h.prototype.get_api_host=$h.prototype.get_api_host,$h.prototype.get_property=$h.prototype.get_property,$h.prototype.get_distinct_id=$h.prototype.get_distinct_id,$h.prototype.toString=$h.prototype.toString,$h.prototype.opt_out_tracking=$h.prototype.opt_out_tracking,$h.prototype.opt_in_tracking=$h.prototype.opt_in_tracking,$h.prototype.has_opted_out_tracking=$h.prototype.has_opted_out_tracking,$h.prototype.has_opted_in_tracking=$h.prototype.has_opted_in_tracking,$h.prototype.clear_opt_in_out_tracking=$h.prototype.clear_opt_in_out_tracking,$h.prototype.get_group=$h.prototype.get_group,$h.prototype.set_group=$h.prototype.set_group,$h.prototype.add_group=$h.prototype.add_group,$h.prototype.remove_group=$h.prototype.remove_group,$h.prototype.track_with_groups=$h.prototype.track_with_groups,$h.prototype.start_batch_senders=$h.prototype.start_batch_senders,$h.prototype.stop_batch_senders=$h.prototype.stop_batch_senders,$h.prototype.start_session_recording=$h.prototype.start_session_recording,$h.prototype.stop_session_recording=$h.prototype.stop_session_recording,$h.prototype.pause_session_recording=$h.prototype.pause_session_recording,$h.prototype.resume_session_recording=$h.prototype.resume_session_recording,$h.prototype.get_session_recording_properties=$h.prototype.get_session_recording_properties,$h.prototype.get_session_replay_url=$h.prototype.get_session_replay_url,$h.prototype.get_tab_id=$h.prototype.get_tab_id,$h.prototype.DEFAULT_API_ROUTES=Uh,$h.prototype.__get_recorder=$h.prototype.__get_recorder,Nh.prototype.properties=Nh.prototype.properties,Nh.prototype.update_search_keyword=Nh.prototype.update_search_keyword,Nh.prototype.update_referrer_info=Nh.prototype.update_referrer_info,Nh.prototype.get_cross_subdomain=Nh.prototype.get_cross_subdomain,Nh.prototype.clear=Nh.prototype.clear;var Wh={},Hh=(Ah=function(e,t){t()},mh=0,(Oh=new $h).init=function(e,t,n){if(n)return Oh[n]||(Oh[n]=Wh[n]=zh(e,t,n),Oh[n]._loaded()),Oh[n];var i=Oh;Wh[Mh]?i=Wh[Mh]:e&&((i=zh(e,t,Mh))._loaded(),Wh[Mh]=i),Oh=i,1===mh&&(r[Mh]=Oh),Tu.each(Wh,function(e,t){t!==Mh&&(Oh[t]=e)}),Oh._=Tu},Oh.init(),function(){function e(){e.done||(e.done=!0,Bh=!0,Dh=!1,Tu.each(Wh,function(e){e._dom_loaded()}))}if(Su.addEventListener)"complete"===Su.readyState?e():Su.addEventListener("DOMContentLoaded",e,!1);else if(Su.attachEvent){Su.attachEvent("onreadystatechange",e);var t=!1;try{t=null===r.frameElement}catch(e){}Su.documentElement.doScroll&&t&&function t(){try{Su.documentElement.doScroll("left")}catch(e){return void setTimeout(t,1)}e()}()}Tu.register_event(r,"load",e,!0)}(),Oh)},6818:(e,t,n)=>{"use strict";function r({ajaxUrl:e,nonce:t,action:n,params:r={},interval:i=1e4,onResult:o,onError:s}){let a=!1;const c=setInterval(async()=>{if(!a)try{const i=new URLSearchParams({action:n,nonce:t,...r}),s=await fetch(e,{method:"POST",body:i}),l=await s.json();if(a)return;await Promise.resolve(o(l))&&(a=!0,clearInterval(c))}catch(e){s&&s(e)}},i);return()=>{a=!0,clearInterval(c)}}n.d(t,{g:()=>r})},7008:(e,t,n)=>{"use strict";n.d(t,{$V:()=>p,Mh:()=>d,bi:()=>s,lL:()=>o,oe:()=>u,qt:()=>a,sx:()=>l});var r=n(6751);let i=!1;const o=()=>{try{if("undefined"==typeof window)return!1;if(i)return!0;const e=window.marketplaceConfig||{};if(!e.data_consent_status)return!1;const t=e.mixpanel||{},n=t.token;if(!n||""===n)return!1;r.A.init(n,{api_host:"https://api-eu.mixpanel.com",debug:t.debug||!1,track_pageview:!1,persistence:"localStorage",property_blacklist:["$initial_referrer","$initial_referring_domain","$current_url","$referrer","$referring_domain","mp_lib","$lib_version","$browser","$browser_version","$device","$screen_height","$screen_width","$os","$search_engine"]});const o=t.distinctId;return o&&""!==o&&r.A.identify(o),i=!0,!0}catch(e){return!1}},s=()=>{try{i&&void 0!==r.A&&(r.A.reset(),i=!1)}catch(e){console.error("[MixpanelTracking] Error disabling Mixpanel:",e)}},a=()=>{try{if("undefined"==typeof window)return!1;const e=((window.marketplaceConfig||{}).mixpanel||{}).token;return!(!e||""===e)&&(i=!1,o())}catch(e){return console.error("[MixpanelTracking] Error enabling Mixpanel:",e),!1}},c=()=>{try{if("undefined"==typeof window)return{};const e=((window.marketplaceConfig||{}).mixpanel||{}).globalProperties||{},t=new URLSearchParams(window.location.search).get("page")||"",n={...e,hit_type:"event",page:t||window.location.pathname,path:window.location.pathname+window.location.search,referrer:document.referrer.split("/").filter(Boolean).pop()||""};return Object.fromEntries(Object.entries(n).filter(([e,t])=>""!==t&&null!=t&&(!Array.isArray(t)||0!==t.length)))}catch(e){return{}}},l=(e,t={})=>{try{if(!(()=>{try{return i&&void 0!==r.A}catch(e){return!1}})())return;const n={...c(),...t};r.A.track(e,n)}catch(t){console.error("[MixpanelTracking] Error tracking event:",e,t)}},u=({pluginSlug:e,pluginName:t,category:n,itemName:r,isContentRendered:i=!0,contentReceivedAt:o=null,contentRenderedAt:s=null,isCached:a=!1,visibleConditionalProducts:c=[]}={})=>{try{const u=Date.now(),p={content_received_at:o||u,is_content_rendered:i,is_cached:a};c&&c.length>0&&(p.visible_conditional_products=c),i&&(p.content_rendered_at=s||u),r?p.item_name=r:e&&(p.item_name=e),e&&(p.product_slug=e),t&&(p.product_name=t),n&&(p.item_category=n),l("Page Viewed",p)}catch(e){console.error("[MixpanelTracking] Error tracking page view:",e)}},p=({action:e,plugin:t,result:n="initiated"}={})=>{try{if(!t)return;const r=`Plugin ${e.charAt(0).toUpperCase()+e.slice(1)}`,i={action:e,product_slug:t.slug||"",product_name:t.name||"",item_name:t.slug||"",result:n,timestamp:Date.now()};if(t.categories&&t.categories.length>0){const e="object"==typeof t.categories[0]?t.categories[0].slug||t.categories[0].title:t.categories[0];i.item_category=e}t.licenseType&&(i.license_type=t.licenseType),void 0!==t.priceAmount&&(i.price_amount=t.priceAmount),t.priceCurrency&&(i.price_currency=t.priceCurrency),l(r,i)}catch(e){console.error("[MixpanelTracking] Error tracking plugin action:",e)}},d=({buttonName:e,buttonAction:t,plugin:n=null,context:r={}}={})=>{try{const i={button_name:e||"",button_action:t||"",item_name:e||"",timestamp:Date.now()};n&&Object.assign(i,(e=>{if(!e)return{};const t={product_slug:e.slug||"",product_name:e.name||""};if(e.categories&&e.categories.length>0){const n="object"==typeof e.categories[0]?e.categories[0].slug||e.categories[0].title:e.categories[0];t.item_category=n}return e.licenseType&&(t.license_type=e.licenseType),void 0!==e.priceAmount&&(t.price_amount=e.priceAmount),e.priceCurrency&&(t.price_currency=e.priceCurrency),t})(n)),Object.assign(i,r),l("Button Clicked",i)}catch(e){console.error("[MixpanelTracking] Error tracking button click:",e)}}},7529:e=>{"use strict";e.exports=JSON.parse('{"ui.button.refreshPage":"Aggiorna pagina","ui.notifications.couldNotLoad":"Impossibile caricare la pagina","ui.notifications.refreshPage":"Aggiorna la pagina e contatta il nostro supporto se il problema persiste."}')},7565:(e,t,n)=>{"use strict";n.d(t,{P:()=>i,r:()=>o});let r={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:n(2875).x};const i=(e={})=>{r={...r,...e}},o=()=>r},7674:(e,t,n)=>{"use strict";n(1609),n(1352)},7823:e=>{"use strict";e.exports=JSON.parse('{"ui.button.refreshPage":"Refresh page","ui.notifications.couldNotLoad":"Couldn’t load the page","ui.notifications.refreshPage":"Please refresh the page and contact our support if the issue persists."}')},7829:(e,t,n)=>{"use strict";n(1609),n(4814),n(1352)},7979:(e,t,n)=>{"use strict";n.d(t,{D:()=>d,t:()=>p});var r=n(1609),i=n(7008),o=n(108),s=n(4601),a=n(3331);const c=(0,r.createContext)(null),l={plugin_already_installed:"pluginAlreadyInstalled",install_in_progress:"installInProgress",install_failed_download:"installFailedDownload",install_failed_not_found:"installFailedNotFound",cannot_delete_active:"cannotDeleteActive"},u=(e,t)=>{const n=e?.data?.code;if(n&&l[n]){const e=t?.notifications?.[l[n]];if(e)return e}return e?.error||e?.data?.message||e?.data?.error||null},p=({children:e,apiBaseUrl:t,useWPHandlers:n,wpConfig:l,enableDefaultStyles:p,assetsBaseUrl:d})=>{const[h,f]=(0,r.useState)({}),[g,m]=(0,r.useState)([]),[v,y]=(0,r.useState)({}),[b,_]=(0,r.useState)({}),[w,k]=(0,r.useState)([]),[S,x]=(0,r.useState)({}),[C,E]=(0,r.useState)(""),[I,N]=(0,r.useState)(""),[O,A]=(0,r.useState)({visible:!1,type:null,pluginSlug:null}),[R,M]=(0,r.useState)({visible:!1,type:null,pluginSlug:null}),[T,P]=(0,r.useState)({visible:!1,type:null,pluginSlug:null}),[L,D]=(0,r.useState)(!1),[F,U]=(0,r.useState)(!1),[j,B]=(0,r.useState)(!0),[$,z]=(0,r.useState)({isOn:!1,message:"",buttonLabel:""}),[q,V]=(0,r.useState)({isOpen:!1,plugin:null}),[W,H]=(0,r.useState)({isOpen:!1,plugin:null,subscriptionId:null,expiresAt:null,onConfirm:null}),[G,K]=(0,r.useState)(()=>"undefined"!=typeof window&&window.marketplaceConfig?.pendingProcurements?window.marketplaceConfig.pendingProcurements:{}),[J,Y]=(0,r.useState)(()=>"undefined"!=typeof window?new URLSearchParams(window.location.search).get("plugin"):null);(0,r.useEffect)(()=>{const e=()=>{const e=new URLSearchParams(window.location.search).get("plugin");Y(e)};window.addEventListener("popstate",e);const t=window.history.pushState;window.history.pushState=function(...n){t.apply(this,n),e()};const n=window.history.replaceState;return window.history.replaceState=function(...t){n.apply(this,t),e()},()=>{window.removeEventListener("popstate",e),window.history.pushState=t,window.history.replaceState=n}},[]);const[Z,X]=(0,r.useState)(()=>{const e="undefined"!=typeof window&&window.marketplaceConfig?.data_consent_status;return!0===e||"true"===e||"1"===e||1===e}),Q=((0,r.useRef)({}),(0,r.useRef)(null)),ee="onecom"===("undefined"!=typeof window&&window.marketplaceConfig?.brand),te="undefined"!=typeof window&&window.marketplaceConfig?.activePlugins?window.marketplaceConfig.activePlugins:[],ne="undefined"!=typeof window&&window.marketplaceConfig?.activeThemeAuthor?window.marketplaceConfig.activeThemeAuthor:"",re="undefined"!=typeof window&&window.marketplaceConfig?.wpVersion?window.marketplaceConfig.wpVersion:"";(0,r.useEffect)(()=>{const e=sessionStorage.getItem("mp_success_notice");if(e)try{const t=JSON.parse(e);A({visible:t.visible,type:t.type,pluginSlug:t.pluginSlug}),P({visible:t.visible,type:t.successType,pluginSlug:t.pluginSlug}),setTimeout(()=>{sessionStorage.removeItem("mp_success_notice")},100)}catch(e){console.error("Error parsing persisted success notice",e)}},[]),(0,r.useEffect)(()=>{!0===Z&&(0,i.lL)();const e=e=>{const t=void 0!==e.detail?.data_consent_status&&e.detail.data_consent_status;X(t),!0===t?("undefined"!=typeof window&&window.marketplaceConfig&&(window.marketplaceConfig.data_consent_status=!0),(0,i.qt)()):("undefined"!=typeof window&&window.marketplaceConfig&&(window.marketplaceConfig.data_consent_status=!1),(0,i.bi)())};window.addEventListener("onConsentStatusChanged",e);const t=t=>{if("onecom_data_consent_status"===t.key){const n="1"===t.newValue;e({detail:{data_consent_status:n}})}};return window.addEventListener("storage",t),()=>{window.removeEventListener("onConsentStatusChanged",e),window.removeEventListener("storage",t)}},[]);const ie=(0,r.useCallback)(async e=>{if(ee&&se(e)){_(t=>({...t,[e]:!0}));try{const t=void 0!==window.marketplaceConfig&&window.marketplaceConfig?.wpConfig?.ajaxUrl;if(!t)return void _(t=>({...t,[e]:!1}));const n=new FormData;n.append("action","get_addon_purchase_status"),n.append("addon_purchase_check","true"),n.append("addon_slug",e);const r=await fetch(t,{method:"POST",body:n}),i=await r.json();y(t=>({...t,[e]:i.is_purchased}))}catch(t){y(t=>({...t,[e]:!1}))}finally{_(t=>({...t,[e]:!1}))}}},[ee]),oe=(0,r.useCallback)(()=>{Q.current&&(clearTimeout(Q.current),Q.current=null),sessionStorage.removeItem("mp_success_notice")},[]),se=(0,r.useCallback)(e=>"wp-rocket"===e||"seo-by-rank-math-pro"===e,[]),ae=(0,r.useCallback)(e=>(0,o.u)(re,e),[re]),ce=(0,r.useCallback)(e=>{V({isOpen:!0,plugin:e})},[]),le=(0,r.useCallback)(()=>{V({isOpen:!1,plugin:null})},[]),ue=(0,r.useCallback)((e,t,n,r)=>{H({isOpen:!0,plugin:e,subscriptionId:t,expiresAt:n,onConfirm:r})},[]),pe=(0,r.useCallback)(()=>{H({isOpen:!1,plugin:null,subscriptionId:null,expiresAt:null,onConfirm:null})},[]),de=(0,r.useCallback)(e=>!(!e||!ee)&&se(e.slug)&&!e.installed&&!0===v[e.slug],[ee,v,se]),he=(0,r.useCallback)(e=>{if(!e.rules)return!0;if(e.rules.mustHavePlugins&&Array.isArray(e.rules.mustHavePlugins)){if(0===e.rules.mustHavePlugins.length)return!0;if(!e.rules.mustHavePlugins.some(e=>te.includes(e)))return!1}if(e.rules.mustHaveThemesByAuthor&&"string"==typeof e.rules.mustHaveThemesByAuthor){const t=e.rules.mustHaveThemesByAuthor;if(ne!==t)return!1}return!0},[te,ne]),fe=(0,r.useCallback)(async()=>{if(!ee)try{const e="undefined"!=typeof window&&window.marketplaceConfig?.wpConfig?.ajaxUrl;if(!e)return void console.error("ajaxUrl is missing");const t=new URLSearchParams({action:(0,a.R5)("get_subscriptions_list"),nonce:window.marketplaceConfig?.wpConfig?.nonce}),n=await fetch(e,{method:"POST",body:t}),r=await n.json();if(!r.success)return void m([]);m(r?.data||[])}catch(e){console.error("Error during fetch subscription list",e),m([])}},[ee]),ge=(0,r.useCallback)(async(e,t,n)=>{try{const e="undefined"!=typeof window&&window.marketplaceConfig?.wpConfig?.ajaxUrl;if(!e)return void console.error("ajaxUrl is missing");const r=new URLSearchParams({action:(0,a.R5)("cancel_subscription"),nonce:window.marketplaceConfig?.wpConfig?.nonce,plugin_slug:t.slug,...n?{subscription_id:n}:{}}),i=await fetch(e,{method:"POST",body:r}),o=await i.json();if(!o.success)return void console.error("Cancel subscription failed:",o?.data?.message||"Unknown error");const s=new URLSearchParams({action:(0,a.R5)("get_subscriptions_list"),nonce:window.marketplaceConfig?.wpConfig?.nonce}),c=await fetch(e,{method:"POST",body:s}),l=await c.json();l.success&&m(l?.data||[])}catch(e){console.error("Error during cancel subscription",e)}},[]),me=(0,r.useCallback)(async(e,r,o="",c="")=>{const p="activate"===e&&"imagify"===r.slug;f(t=>({...t,[r.slug]:e}));let d=!1;const h=r.name||r.slug,g=((e,t,n)=>{let r="";const i=n?.notifications||{};switch(e){case"activate":r=i.activating||"Activating {0}";break;case"deactivate":r=i.deactivating||"Deactivating {0}";break;case"install":r=i.installing||"Installing {0}";break;case"delete":r=i.deleting||"Deleting {0}";break;default:return`${e.charAt(0).toUpperCase()+(e.endsWith("e")?e.slice(1,-1):e.slice(1))+"ing"} ${t}`}return r.replace("{0}",t)+"..."})(e,h,S);if(E(g),N(""),p)(0,s.D)({plugin:r,apiBaseUrl:t,useWPHandlers:n,wpConfig:l,source:o,uiI18n:S,setLoadingAction:E,setLoadingPlugin:N,setPluginInAction:f,setSuccessState:P,setErrorState:M,reloadTimeoutRef:Q,trackButtonClick:i.Mh});else try{let s=`${t}/${e}/${r.slug}`;const p=`download_url=${encodeURIComponent(c||r.download||"")}`;s=n?`${l.ajaxUrl}?action=${(0,a.R5)(`${e}_plugin`)}&_wpnonce=${l.nonce}&nonce=${l.nonce}&slug=${r.slug}&${p}`:s+(s.includes("?")?"&":"?")+p;const h=await fetch(s,{method:"POST"}),f=await h.json();if(f.success){if(k(t=>t.map(t=>t.slug===r.slug?{...t,installed:f.data.installed,activated:f.data.activated}:"deactivate"===e&&"seo-by-rank-math"===r.slug&&"seo-by-rank-math-pro"===t.slug?{...t,activated:!1}:"activate"===e&&"seo-by-rank-math-pro"===r.slug&&"seo-by-rank-math"===t.slug?{...t,activated:!0}:t)),"install"===e&&f.data.installed)return(0,i.Mh)({buttonName:"Install",buttonAction:"product_install",plugin:r,context:{action:e,result:"success"}}),"buy_now"===o?(A({visible:!0,type:"installed",pluginSlug:r.slug}),P({visible:!0,type:"install",pluginSlug:r.slug}),!0):(d=!0,void("product_detail"===o?(sessionStorage.setItem("mp_skip_page_view","true"),sessionStorage.setItem("mp_success_notice",JSON.stringify({visible:!0,type:"installed",pluginSlug:r.slug,successType:"install"})),Q.current=setTimeout(()=>{window.location.reload()},500)):(A({visible:!0,type:"installed",pluginSlug:r.slug}),P({visible:!0,type:"install",pluginSlug:r.slug}),Q.current=setTimeout(()=>{sessionStorage.setItem("mp_skip_page_view","true"),window.location.reload()},3e3),E(""),N(""))));if("delete"!==e||f.data.installed){if("activate"===e&&f.data.activated)return d=!0,(0,i.Mh)({buttonName:"Activate",buttonAction:"product_activate",plugin:r,context:{action:e,result:"success"}}),void("product_detail"===o?(sessionStorage.setItem("mp_skip_page_view","true"),sessionStorage.setItem("mp_success_notice",JSON.stringify({visible:!0,type:"activated",pluginSlug:r.slug,successType:"activate"})),Q.current=setTimeout(()=>{window.location.reload()},500)):(P({visible:!0,type:"activate",pluginSlug:r.slug}),Q.current=setTimeout(()=>{sessionStorage.setItem("mp_skip_page_view","true"),window.location.reload()},3e3),E(""),N("")));if("deactivate"===e&&!f.data.activated)return d=!0,P({visible:!0,type:"deactivate",pluginSlug:r.slug}),(0,i.Mh)({buttonName:"Deactivate",buttonAction:"product_deactivate",plugin:r,context:{action:e,result:"success"}}),Q.current=setTimeout(()=>{sessionStorage.setItem("mp_skip_page_view","true"),window.location.reload()},3e3),E(""),void N("")}else A({visible:!0,type:"deleted",pluginSlug:r.slug}),P({visible:!0,type:"delete",pluginSlug:r.slug}),(0,i.Mh)({buttonName:"Delete",buttonAction:"product_delete",plugin:r,context:{action:e,result:"success"}})}else"activate"===e?(M({visible:!0,type:"activate",pluginSlug:r.slug,message:u(f,S)}),(0,i.Mh)({buttonName:"Activate",buttonAction:"product_activate",plugin:r,context:{action:e,result:"error",error_message:f.data?.message||S?.notifications?.pluginActivationFailed||"Activation failed"}})):"deactivate"===e?(M({visible:!0,type:"deactivate",pluginSlug:r.slug,message:u(f,S)}),(0,i.Mh)({buttonName:"Deactivate",buttonAction:"product_deactivate",plugin:r,context:{action:e,result:"error",error_message:f.data?.message||S?.notifications?.pluginDeactivationFailed||"Deactivation failed"}})):"install"===e?(M({visible:!0,type:"install",pluginSlug:r.slug,message:u(f,S)}),(0,i.Mh)({buttonName:"Install",buttonAction:"product_install",plugin:r,context:{action:e,result:"error",error_message:f.data?.message||"Installation failed"}})):"delete"===e?(M({visible:!0,type:"delete",pluginSlug:r.slug,message:u(f,S)}),(0,i.Mh)({buttonName:"Delete",buttonAction:"product_delete",plugin:r,context:{action:e,result:"error",error_message:f.data?.message||S?.notifications?.pluginDeletionFailed||"Deletion failed"}})):alert(f.data?.message||S?.notifications?.actionFailed||"Failed to perform action")}catch(t){console.error("Plugin action failed",t),"activate"!==e&&"install"!==e&&"delete"!==e||(0,i.Mh)({buttonName:"activate"===e?"Activate":"install"===e?"Install":"Delete",buttonAction:"activate"===e?"product_activate":"install"===e?"product_install":"product_delete",plugin:r,context:{action:e,result:"error",error_message:t.message||"Network error"}})}finally{d||f(e=>({...e,[r.slug]:!1})),E(""),N("")}},[t,n,l,S]),ve={apiBaseUrl:t,useWPHandlers:n,wpConfig:l,enableDefaultStyles:p,assetsBaseUrl:d,pluginInAction:h,setPluginInAction:f,subscriptionsList:g,setSubscriptionsList:m,subscriptionStatus:v,isCheckingSubscription:b,fetchPartnerSubscriptions:fe,fetchSubscriptionStatus:ie,isOnecomBrand:ee,plugins:w,setPlugins:k,uiI18n:S,setUiI18n:x,handlePluginAction:me,handleCancelSubsAction:ge,cancelReload:oe,loadingAction:C,setLoadingAction:E,loadingPlugin:I,setLoadingPlugin:N,noticeState:O,setNoticeState:A,errorState:R,setErrorState:M,successState:T,setSuccessState:P,allPluginsActivated:L,setAllPluginsActivated:D,catalogError:F,setCatalogError:U,catalogLoading:j,setCatalogLoading:B,maintenanceState:$,setMaintenanceState:z,currentPluginSlug:J,setCurrentPluginSlug:Y,deleteModalState:q,openDeleteModal:ce,closeDeleteModal:le,cancelSubsModalState:W,openCancelSubsModal:ue,closeCancelSubsModal:pe,shouldShowProvision:de,isSpecialPlugin:se,shouldShowPlugin:he,isWpVersionSupported:ae,wpVersion:re,activePlugins:te,activeThemeAuthor:ne,pendingProcurements:G,setPendingProcurements:K};return(0,r.createElement)(c.Provider,{value:ve},e)},d=()=>{const e=(0,r.useContext)(c);if(!e)throw new Error("useMarketplace must be used within MarketplaceProvider");return e}},8291:(e,t,n)=>{"use strict";n.d(t,{Bd:()=>r.B,r9:()=>i.r}),n(7829),n(4814);var r=n(8437),i=(n(2648),n(2176),n(3273),n(3227),n(7674),n(1831));n(7565),n(1352)},8299:(e,t,n)=>{"use strict";function r(e){if(!e)return"";const t=e instanceof Date?e:new Date(e);if(isNaN(t.getTime()))return"";const n="undefined"!=typeof window&&window.marketplaceConfig||{},r=n.dateFormat||"F j, Y",i=(n.locale||"").replace("_","-")||void 0,o=(e,n)=>{try{return new Intl.DateTimeFormat(i,{[n]:e}).format(t)}catch{return""}},s=t.getFullYear(),a=t.getMonth()+1,c=t.getDate(),l={Y:String(s),y:String(s).slice(-2),F:()=>o("long","month"),M:()=>o("short","month"),m:String(a).padStart(2,"0"),n:String(a),d:String(c).padStart(2,"0"),j:String(c),l:()=>o("long","weekday"),D:()=>o("short","weekday")};let u="";for(let e=0;er})},8300:e=>{"use strict";e.exports=JSON.parse('{"ui.button.refreshPage":"Uppdatera sidan","ui.notifications.couldNotLoad":"Det gick inte att ladda sidan","ui.notifications.refreshPage":"Uppdatera sidan och kontakta vår support om problemet kvarstår."}')},8437:(e,t,n)=>{"use strict";n.d(t,{B:()=>a});var r=n(1609),i=n(1352),o=n(9454);const s=(e,t,n,r)=>e.getFixedT(t,n,r),a=(e,t={})=>{const{i18n:n}=t,{i18n:a,defaultNS:c}=(0,r.useContext)(i.gJ)||{},l=n||a||(0,i.TO)();if(l&&!l.reportNamespaces&&(l.reportNamespaces=new i.hz),!l){(0,o.mc)(l,"NO_I18NEXT_INSTANCE","useTranslation: You will need to pass in an i18next instance by using initReactI18next");const e=(e,t)=>(0,o.Kg)(t)?t:(0,o.Gv)(t)&&(0,o.Kg)(t.defaultValue)?t.defaultValue:Array.isArray(e)?e[e.length-1]:e,t=[e,{},!1];return t.t=e,t.i18n={},t.ready=!1,t}l.options.react?.wait&&(0,o.mc)(l,"DEPRECATED_OPTION","useTranslation: It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");const u={...(0,i.rV)(),...l.options.react,...t},{useSuspense:p,keyPrefix:d}=u;let h=e||c||l.options?.defaultNS;h=(0,o.Kg)(h)?[h]:h||["translation"],l.reportNamespaces.addUsedNamespaces?.(h);const f=(l.isInitialized||l.initializedStoreOnce)&&h.every(e=>(0,o.NM)(e,l,u)),g=((e,t,n,i)=>(0,r.useCallback)(s(e,t,n,i),[e,t,n,i]))(l,t.lng||null,"fallback"===u.nsMode?h:h[0],d),m=()=>g,v=()=>s(l,t.lng||null,"fallback"===u.nsMode?h:h[0],d),[y,b]=(0,r.useState)(m);let _=h.join();t.lng&&(_=`${t.lng}${_}`);const w=((e,t)=>{const n=(0,r.useRef)();return(0,r.useEffect)(()=>{n.current=e},[e,t]),n.current})(_),k=(0,r.useRef)(!0);(0,r.useEffect)(()=>{const{bindI18n:e,bindI18nStore:n}=u;k.current=!0,f||p||(t.lng?(0,o.GA)(l,t.lng,h,()=>{k.current&&b(v)}):(0,o.dM)(l,h,()=>{k.current&&b(v)})),f&&w&&w!==_&&k.current&&b(v);const r=()=>{k.current&&b(v)};return e&&l?.on(e,r),n&&l?.store.on(n,r),()=>{k.current=!1,l&&e&&e?.split(" ").forEach(e=>l.off(e,r)),n&&l&&n.split(" ").forEach(e=>l.store.off(e,r))}},[l,_]),(0,r.useEffect)(()=>{k.current&&f&&b(m)},[l,d,f]);const S=[y,l,f];if(S.t=y,S.i18n=l,S.ready=f,f)return S;if(!f&&!p)return S;throw new Promise(e=>{t.lng?(0,o.GA)(l,t.lng,h,()=>e()):(0,o.dM)(l,h,()=>e())})}},8484:(e,t,n)=>{"use strict";let r;n.d(t,{T:()=>o,V:()=>i});const i=e=>{r=e},o=()=>r},8491:e=>{"use strict";e.exports=JSON.parse('{"ui.button.refreshPage":"Genindlæs side","ui.notifications.couldNotLoad":"Kunne ikke indlæse siden","ui.notifications.refreshPage":"Opdater venligst siden og kontakt vores support, hvis problemet fortsætter."}')},9454:(e,t,n)=>{"use strict";n.d(t,{GA:()=>a,Gv:()=>u,Kg:()=>l,NM:()=>c,dM:()=>s,mc:()=>i});const r={},i=(e,t,n,i)=>{l(n)&&r[n]||(l(n)&&(r[n]=new Date),((e,t,n,r)=>{const i=[n,{code:t,...r||{}}];if(e?.services?.logger?.forward)return e.services.logger.forward(i,"warn","react-i18next::",!0);l(i[0])&&(i[0]=`react-i18next:: ${i[0]}`),e?.services?.logger?.warn?e.services.logger.warn(...i):console?.warn&&console.warn(...i)})(e,t,n,i))},o=(e,t)=>()=>{if(e.isInitialized)t();else{const n=()=>{setTimeout(()=>{e.off("initialized",n)},0),t()};e.on("initialized",n)}},s=(e,t,n)=>{e.loadNamespaces(t,o(e,n))},a=(e,t,n,r)=>{if(l(n)&&(n=[n]),e.options.preload&&e.options.preload.indexOf(t)>-1)return s(e,n,r);n.forEach(t=>{e.options.ns.indexOf(t)<0&&e.options.ns.push(t)}),e.loadLanguages(t,o(e,r))},c=(e,t,n={})=>t.languages&&t.languages.length?t.hasLoadedNamespace(e,{lng:n.lng,precheck:(t,r)=>{if(n.bindI18n&&n.bindI18n.indexOf("languageChanging")>-1&&t.services.backendConnector.backend&&t.isLanguageChangingTo&&!r(t.isLanguageChangingTo,e))return!1}}):(i(t,"NO_LANGUAGES","i18n.languages were undefined or empty",{languages:t.languages}),!0),l=e=>"string"==typeof e,u=e=>"object"==typeof e&&null!==e},9599:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var r=n(1609),i=n(3526),o=n(5924),s=n(5696);const a=({children:e,className:t=""})=>(0,r.createElement)(r.Fragment,null,(0,r.createElement)(i.A,null),(0,r.createElement)("div",{className:"gv-activated"},(0,r.createElement)(o.A,null),(0,r.createElement)(s.A,null)),(0,r.createElement)("div",{className:"gv-activated"},(0,r.createElement)("div",{className:`marketplace-container gv-layout-product gv-w-max-container gv-mx-auto gv-p-fluid ${t}`},e)))},9962:(e,t,n)=>{"use strict";n.d(t,{A:()=>d});var r=n(1609),i=n(5795),o=n(1338),s=n(4469),a=n(4677),c=n(4694),l=n(6409),u=n(7979),p=n(488);function d({plugin:e,onClose:t,usePortal:n=!0,loading:d=!1}){const{assetsBaseUrl:h,useWPHandlers:f,pluginInAction:g,plugins:m,uiI18n:v,noticeState:y,setNoticeState:b,setErrorState:_}=(0,u.D)(),w=m.find(e=>"seo-by-rank-math"===e.slug)||null,k=m.find(e=>"seo-by-rank-math-pro"===e.slug)||null,S=h||void 0!==window.marketplaceConfig&&window.marketplaceConfig?.assetsBaseUrl||"",x=S?`${S}assets/icons/`:"",C="undefined"!=typeof window&&window.marketplaceConfig?.brand||"",E=C?` brand-${C.replace(/[^a-zA-Z0-9_-]/g,"")}`:"";if(d){const e=(0,r.createElement)("div",{className:`gv-surface-dim${E}`},(0,r.createElement)("article",{className:"gv-w-max-container gv-mx-auto"},(0,r.createElement)("nav",{className:"gv-breadcrumbs gv-area-nav gv-mb-lg"},(0,r.createElement)("a",{href:"#",onClick:e=>{if(e.preventDefault(),"undefined"!=typeof window&&window.history&&window.history.length>1)try{window.history.back()}catch(e){t&&t()}else t&&t()}},(0,r.createElement)("gv-icon",{"aria-hidden":"true",src:`${x}arrow_back.svg`}),(0,r.createElement)("span",null,v.backButton))),(0,r.createElement)("header",{className:"gv-area-header"},(0,r.createElement)("div",{className:"gv-image"},(0,r.createElement)("div",{className:"gv-card-image gv-h-full"},(0,r.createElement)("div",{className:"gv-skeleton gv-radius-0 gv-h-full",style:{minHeight:"300px"}})))),(0,r.createElement)("header",{className:"gv-area-header gv-mt-fluid gv-mb-fluid"},(0,r.createElement)("div",{className:"gv-image"},(0,r.createElement)("div",{className:"gv-card-image gv-h-full"},(0,r.createElement)("div",{className:"gv-skeleton gv-radius-0 gv-h-full",style:{minHeight:"300px"}})))),(0,r.createElement)("div",{className:"gv-area-details gv-grid gv-gap-fluid gv-mb-fluid"},(0,r.createElement)("section",{className:"gv-stack-space-md"},(0,r.createElement)("div",{className:"gv-skeleton gv-heading-md gv-mb-md",style:{width:"160px"}}),(0,r.createElement)("ul",{className:""},[...Array(3)].map((e,t)=>(0,r.createElement)("li",{key:t},(0,r.createElement)("div",{className:"gv-skeleton gv-text-sm"})))))),(0,r.createElement)("div",{className:"gv-area-content gv-grid gv-gap-fluid"},(0,r.createElement)("section",{className:"gv-text-sm gv-stack-space-md"},(0,r.createElement)("div",{className:"gv-skeleton gv-heading-md",style:{width:"160px",marginBottom:"28px"}}),(0,r.createElement)("div",{className:"gv-grid gv-gap-lg gv-tab-grid-cols-2 gv-desk-lg-grid-cols-3"},[...Array(3)].map((e,t)=>(0,r.createElement)("div",{className:"gv-item gv-stack-space-sm",key:t},(0,r.createElement)("div",{className:"gv-skeleton gv-heading-md gv-mb-sm",style:{width:"160px"}}),(0,r.createElement)("div",{className:"gv-skeleton gv-text-sm gv-mb-xs"}),(0,r.createElement)("div",{className:"gv-skeleton gv-text-sm"}))))))));return n?(0,i.createPortal)(e,document.body):e}if(!e)return null;const I=(0,r.useRef)(null),N=(0,r.useRef)(null),O=(0,r.useRef)(null),A=(0,r.useRef)(null),R=(0,r.useRef)(null),[M,T]=((0,r.useRef)([]),(0,r.useState)(0));(0,r.useEffect)(()=>{window.scrollTo(0,0)},[e]),(0,r.useEffect)(()=>{b(e=>!e.visible||e.pluginSlug!==w?.slug&&e.pluginSlug!==k?.slug?{visible:!1,type:null,pluginSlug:null}:e),_(e=>!e.visible||e.pluginSlug!==w?.slug&&e.pluginSlug!==k?.slug?{visible:!1,type:null,pluginSlug:null}:e)},[w?.slug,k?.slug,b,_]),(0,r.useEffect)(()=>{const e=()=>{b({visible:!1,type:null,pluginSlug:null}),_({visible:!1,type:null,pluginSlug:null})};return window.addEventListener("popstate",e),()=>window.removeEventListener("popstate",e)},[b,_]),(0,r.useEffect)(()=>{const e=I.current,t=N.current,n=O.current,r=A.current,i=R.current;if(!(e&&t&&n&&r&&i))return;const o=t.querySelector(".gv-previous"),s=t.querySelector(".gv-next");let a=!1,c="top",l=!1,u=!1,p=!1,d=null,h=!1;const f=()=>{const t=e.scrollLeft,n=e.offsetWidth,r=Math.round(t/n);T(r),o&&(0===r?o.classList.add("gv-disabled"):o.classList.remove("gv-disabled")),s&&(r>=Math.round(e.scrollWidth/n)-1?s.classList.add("gv-disabled"):s.classList.remove("gv-disabled"))},g=()=>{const e=parseFloat(getComputedStyle(n).paddingTop)||0,i=r.offsetHeight/2,o=i+e,s=window.innerHeight/2-o,a=2*i;return t.style.transform=`translateY(${o}px)`,t.style.top=`${s}px`,t.style.bottom=`${a}px`,{bottomValue:a,halfHeaderHeight:i}},m=e=>{const r=n.getBoundingClientRect(),i=window.innerHeight-e,o=r.bottom<=i;o!==a&&(a=o,a?t.classList.add("gv-state-bottom"):t.classList.remove("gv-state-bottom"))},v=()=>{if(p)return;let e;e=l?l&&!u?"overlay":"bottom":"top",e!==c&&(p=!0,c=e,"top"===c?(i.classList.add("gv-state-top"),i.classList.remove("gv-state-overlay")):"overlay"===c?(i.classList.remove("gv-state-top"),i.classList.add("gv-state-overlay")):(i.classList.remove("gv-state-top"),i.classList.remove("gv-state-overlay")),requestAnimationFrame(()=>{setTimeout(()=>{p=!1},50)}))},{bottomValue:y}=g();e.addEventListener("scroll",f);const b=new IntersectionObserver(e=>{e.forEach(e=>{!e.isIntersecting&&e.boundingClientRect.top<0?l=!0:(e.isIntersecting||e.boundingClientRect.top>=0)&&(l=!1),v()})},{threshold:[0,1],rootMargin:"0px"}),_=document.createElement("div");_.style.position="absolute",_.style.bottom="0",_.style.left="0",_.style.width="1px",_.style.height="1px",_.style.pointerEvents="none",n.style.position="relative",n.appendChild(_);const w=new IntersectionObserver(e=>{e.forEach(e=>{u=e.isIntersecting,v()})},{threshold:[0],rootMargin:"-100px 0px 0px 0px"});b.observe(i),w.observe(_);const k=()=>{h||(h=!0,requestAnimationFrame(()=>{m(y)}),d=setTimeout(()=>{h=!1},100))},S=()=>{const{bottomValue:e}=g();m(e)};return window.addEventListener("scroll",k),window.addEventListener("resize",S),f(),m(y),v(),()=>{d&&clearTimeout(d),e.removeEventListener("scroll",f),window.removeEventListener("scroll",k),window.removeEventListener("resize",S),b.disconnect(),w.disconnect(),_&&_.parentNode&&_.parentNode.removeChild(_)}},[]),void 0!==window.onecomWpVars&&window.onecomWpVars,e.thumbnail;const P=k.detailsBannerUrl||k.bannerUrl,L=w?.name||e.name||"Product",D=w?.i18n?.description||w?.i18n?.subtitle,F=w?.i18n?.subtitle,U=k?.name||"Rank Math Pro",j=k?.i18n?.subtitle||k?.i18n?.description,B=k?(0,p.M)(k,v?.labels?.free||"Free",v):"",$=B===(v?.labels?.freeUntilRenewal||"Free until renewal"),z=(0,p.Tc)(k),q=(e,t)=>{if(!e||"object"!=typeof e)return[];const n=[];let r=1;for(;e[`${t}${r}`];){const i=e[`${t}${r}`];i&&""!==i.trim()&&n.push(i),r++}return n},V=w?.i18n||e.i18n,W=q(V,"keyBenefitContent"),H=q(w?.i18n,"keyFeatureContent"),G=q(k?.i18n,"keyFeatureContent"),K=Math.max(H.length,G.length),J=[];if(V&&"object"==typeof V){let e=1;for(;V[`coreFeatureTitle${e}`]||V[`coreFeatureContent${e}`];){const t=V[`coreFeatureTitle${e}`],n=V[`coreFeatureContent${e}`];t&&""!==t.trim()&&n&&""!==n.trim()&&J.push({name:t,desc:n}),e++}}const Y=W,Z=J,X=(0,r.createElement)("div",{className:`gv-surface-dim${E}`},(0,r.createElement)("article",{className:"gv-layout-product gv-w-max-container gv-mx-auto gv-p-fluid gv-p-0"},(0,r.createElement)(c.A,{iconBase:x,label:v.backButton,onClose:t,disabled:g[e.slug]},(0,r.createElement)(s.A,{plugin:y?.pluginSlug===k?.slug?k:w}),(0,r.createElement)(a.A,{plugin:w}),(0,r.createElement)(a.A,{plugin:k}),(0,r.createElement)(l.A,{plugin:e})),(0,r.createElement)("header",{className:"gv-product-header gv-area-header"},(0,r.createElement)("div",{className:"gv-content gv-stack-space-md gv-text-sm"},(0,r.createElement)("h3",{className:"gv-title gv-header-lg"},"Rank Math"),(0,r.createElement)("p",{className:"gv-text-sm"},D)),(0,r.createElement)("div",{className:"gv-image"},(0,r.createElement)("picture",null,(0,r.createElement)("source",{media:"(min-width: 600px)",srcSet:`${P} 2x, ${P} 1x`}),(0,r.createElement)("img",{src:P,srcSet:`${P} 2x, ${P} 1x`,alt:"Product image"})))),(0,r.createElement)("section",{className:"gv-product-table gv-features-table gv-products-2 gv-recommended-2 gv-area-table"},(0,r.createElement)("div",{className:"gv-dots-scroll-area"},(0,r.createElement)("div",{className:"gv-table-container"},(0,r.createElement)("div",{className:"gv-slider-nav",ref:N},(0,r.createElement)("button",{type:"button",className:"gv-nav-button gv-previous gv-disabled",onClick:()=>{const e=I.current;if(!e)return;const t=e.offsetWidth;e.scrollTo({left:e.scrollLeft-t,behavior:"smooth"})}},(0,r.createElement)("gv-icon",{"aria-hidden":"true",src:`${x}chevron_left.svg`})),(0,r.createElement)("button",{type:"button",className:"gv-nav-button gv-next",onClick:()=>{const e=I.current;if(!e)return;const t=e.offsetWidth;e.scrollTo({left:e.scrollLeft+t,behavior:"smooth"})}},(0,r.createElement)("gv-icon",{"aria-hidden":"true",src:`${x}chevron_right.svg`}))),(0,r.createElement)("div",{className:"gv-table-slider",ref:I},(0,r.createElement)("div",{className:"gv-table",role:"table",ref:O},(0,r.createElement)("div",{className:"gv-table-header",role:"rowgroup",ref:A},(0,r.createElement)("div",{className:"gv-table-row",role:"row"},(0,r.createElement)("div",{className:"gv-product gv-p-0",role:"columnheader"},(0,r.createElement)("div",{className:"gv-content"},(0,r.createElement)("h3",{className:"gv-title"},`${L} free`),(0,r.createElement)("p",null,F)),(0,r.createElement)("div",{className:"gv-bottom"},(0,r.createElement)("div",{className:"gv-price-container"},(0,r.createElement)("div",{className:"gv-price"},(0,r.createElement)("span",{className:"gv-price-text"},v?.labels?.free||"Free"))),f&&w?(0,r.createElement)(o.A,{plugin:w}):w?.download&&(0,r.createElement)("button",{type:"button",className:"gv-button gv-button-secondary"},v?.installButton||w?.i18n?.installButton||"Install"))),(0,r.createElement)("div",{className:"gv-product gv-p-0",role:"columnheader"},(0,r.createElement)("div",{className:"gv-recommended-label"},v?.labels?.recommended||"Recommended"),(0,r.createElement)("div",{className:"gv-content"},(0,r.createElement)("h3",{className:"gv-title"},U),(0,r.createElement)("p",null,j.substring(0,120),j.length>120?"…":"")),(0,r.createElement)("div",{className:"gv-bottom"},(0,r.createElement)("div",{className:"gv-price-container"},(0,r.createElement)("div",{className:"gv-price"},(0,r.createElement)("span",{className:"gv-price-text"},B,B&&!$&&",-"),B&&!$&&(0,r.createElement)("span",{className:"gv-period"},"/",v?.labels?.timeMonth)),B&&(0,r.createElement)("div",{className:"gv-price-info"},(0,r.createElement)("div",{className:"gv-info"},v.labels.afterThat," [",z,"]/",v?.labels?.timeMonth))),f&&k?(0,r.createElement)(o.A,{plugin:k}):(0,r.createElement)("button",{type:"button",className:"gv-button gv-button-primary"},v?.selectButton||"Select"))))),K>0&&(0,r.createElement)("div",{className:"gv-section",role:"rowgroup"},(0,r.createElement)("div",{className:"gv-section-header gv-table-row",role:"row"},(0,r.createElement)("div",{className:"gv-cell",role:"cell"},(0,r.createElement)("h4",{className:"gv-title"},v?.keyFeatureHeading||w?.i18n?.keyFeatureHeading||"Key features")),(0,r.createElement)("div",{className:"gv-cell",role:"cell"},(0,r.createElement)("h4",{className:"gv-title"},v?.keyFeatureHeading||k?.i18n?.keyFeatureHeading||"Key features"))),Array.from({length:K}).map((e,t)=>(0,r.createElement)("div",{className:"gv-table-row",role:"row",key:t},(0,r.createElement)("div",{className:"gv-cell",role:"cell"},(0,r.createElement)("span",{className:"gv-cell-text"},H[t]||"")),(0,r.createElement)("div",{className:"gv-cell",role:"cell"},(0,r.createElement)("span",{className:"gv-cell-text"},G[t]||"")))))))),(0,r.createElement)("div",{className:"gv-slider-pagination gv-state-top",ref:R},(0,r.createElement)("div",{className:"gv-dots",role:"tablist"},[0,1].map(e=>(0,r.createElement)("span",{key:e,className:"gv-dot "+(M===e?"gv-active":""),role:"tab","aria-selected":M===e?"true":"false","aria-label":`Go to slide ${e+1}`,onClick:()=>(e=>{const t=I.current;if(!t)return;const n=t.offsetWidth;t.scrollTo({left:n*e,behavior:"smooth"})})(e),style:{cursor:"pointer"}})))))),(0,r.createElement)("div",{className:"gv-area-details gv-grid gv-gap-fluid"},Y.length>0&&(0,r.createElement)("section",{className:"gv-stack-space-md"},(0,r.createElement)("h2",{className:"gv-title gv-text-bold gv-text-lg"},v?.benefitHeading||e.i18n?.benefitHeading||"Key benefits"),(0,r.createElement)("ul",{className:"gv-list-items gv-list-check gv-mode-condensed"},Y.map((e,t)=>(0,r.createElement)("li",{key:t},e))))),Z.length>0&&(0,r.createElement)("div",{className:"gv-area-content gv-grid gv-gap-fluid"},(0,r.createElement)("section",{className:"gv-text-sm gv-stack-space-md"},(0,r.createElement)("h2",{className:"gv-title gv-text-bold gv-text-lg"},v?.featureOverviewHeading||e.i18n?.featureOverviewHeading||"Core features overview"),(0,r.createElement)("div",{className:"gv-grid gv-gap-lg gv-tab-grid-cols-2 gv-desk-lg-grid-cols-3"},Z.map((e,t)=>(0,r.createElement)("div",{className:"gv-item gv-stack-space-sm",key:t},(0,r.createElement)("h3",{className:"gv-title gv-text-bold gv-text-lg"},e.name),(0,r.createElement)("p",{className:"gv-text-sm"},e.desc))))))));return n?(0,i.createPortal)(X,document.body):X}}},t={};function n(r){var i=t[r];if(void 0!==i)return i.exports;var o=t[r]={exports:{}};return e[r](o,o.exports,n),o.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var r={};(()=>{"use strict";n.r(r);var e=n(1609),t=n(5795),i=n.n(t),o=n(6255),s=(n(5036),n(108));document.addEventListener("DOMContentLoaded",()=>{const t=document.getElementById("marketplace-addons-root");if(t){const r=window.marketplaceConfig||{};r.locale&&Promise.resolve().then(n.bind(n,2635)).then(({default:e})=>{e.changeLanguage(r.locale)});const a=(0,s.u)(r.wpVersion,"6.2");"function"==typeof i().createRoot&&a?i().createRoot(t).render((0,e.createElement)(o.A,{...r})):i().render((0,e.createElement)(o.A,{...r}),t)}})})(),window.MarketPlaceWP=r})(); \ No newline at end of file diff --git a/frontend/src/components/Addons.jsx b/frontend/src/components/Addons.jsx index f3a7f6e..0b9dbce 100644 --- a/frontend/src/components/Addons.jsx +++ b/frontend/src/components/Addons.jsx @@ -1,6 +1,6 @@ import React, {useState, useEffect, useRef, useMemo, useCallback} from "react"; import { useMarketplace } from "../context/MarketplaceContext"; -import { formatPluginPrice, getRebatePrice, getFullPrice } from "../utils/priceFormatter"; +import { formatPluginPrice, getRebatePrice, getFullPrice, getDiscountPercentage } from "../utils/priceFormatter"; import ProductDetail from "./ProductDetail"; import ProductDetailRankMath from "./ProductDetailRankMath"; import ErrorToast from "./ErrorToast"; @@ -877,6 +877,10 @@ export default function Addons() { const price = formatPluginPrice(plugin, freeLabel, uiI18n); const fullPriceAmount = getFullPrice(plugin); const rebatePriceAmount = getRebatePrice(plugin); + const discountPct = getDiscountPercentage(plugin); + const hasFreeTrialPeriod = plugin.i18n?.freeTrialPeriod && plugin.i18n.freeTrialPeriod.trim() !== ''; + const hasFreeTrialText = plugin.i18n?.freeTrialText && plugin.i18n.freeTrialText.trim() !== ''; + const hasDiscount = plugin.licenseType === "premium" && fullPriceAmount && rebatePriceAmount && discountPct > 0 && !hasFreeTrialPeriod && !hasFreeTrialText; return (
{plugin.i18n.listingDescription || plugin.i18n.subtitle}

- - <> - {plugin.licenseType === "premium" && (rebatePriceAmount > 0) - ? (rebatePriceAmount !== null ? rebatePriceAmount : fullPriceAmount) - : price} - {plugin.licenseType !== "free" && - price && - price !== freeLabel && - price !== (uiI18n?.labels?.freeUntilRenewal || 'Free until renewal') && - /{uiI18n?.labels?.timeMonth}} - - + {hasDiscount ? ( +
+ {fullPriceAmount} + {rebatePriceAmount}/{uiI18n?.labels?.timeMonth} + {uiI18n?.labels?.save || 'Save'} {discountPct}% +
+ ) : ( + + <> + {price} + {plugin.licenseType !== "free" && + price && + price !== freeLabel && + price !== (uiI18n?.labels?.freeUntilRenewal || 'Free until renewal') && + /{uiI18n?.labels?.timeMonth}} + + + )}