1!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.PmcAPIClient=t():e.PmcAPIClient=t()}(self,()=>(()=>{var e,t,i={171(e,t,i){"use strict";i.d(t,{A:()=>n});class n{getPathname(e){return/^(https?):\/\//.test(e)?new URL(e).pathname:e.split("?")[0]}getParameterByName(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:window.location.href;if(!e)throw new Error("ConfigError",{cause:"A name should be specified"});var i=e.replace(/[[\]]/g,"\\$&"),n=new RegExp("[#?&]".concat(i,"(=([^&#]*)|&|#|$)")).exec(t);return n?n[2]?decodeURIComponent(n[2].replace(/\+/g," ")):"":null}}},182(e){var t={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"GetProfile"},variableDefinitions:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"me"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"email"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"avatar"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"firstname"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"lastname"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"nickname"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"profile"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"connection"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"roles"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"active"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"hashEmailSHA256"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"personalInformationShared"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"publicId"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"passPrisma"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"isActive"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"paymentStatus"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"endAt"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"paymentSubscriptions"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"rights"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"token"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"signup"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"service"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:322}};t.loc.source={body:"query GetProfile {\n\tme {\n\t\temail\n\t\tavatar\n\t\tfirstname\n\t\tlastname\n\t\tnickname\n\t\tprofile\n\t\tid\n\t\tconnection {\n\t\t\troles\n\t\t\tactive\n\t\t}\n\t\thashEmailSHA256\n\t\tpersonalInformationShared\n\t\tpublicId\n\t\tpassPrisma {\n\t\t\tisActive\n\t\t\tpaymentStatus\n\t\t\tendAt\n\t\t}\n\t\tpaymentSubscriptions {\n\t\t\trights\n\t\t\ttoken\n\t\t}\n\t\tsignup {\n\t\t\tservice\n\t\t}\n\t}\n}\n",name:"GraphQL request",locationOffset:{line:1,column:1}};function i(e,t){if("FragmentSpread"===e.kind)t.add(e.name.value);else if("VariableDefinition"===e.kind){var n=e.type;"NamedType"===n.kind&&t.add(n.name.value)}e.selectionSet&&e.selectionSet.selections.forEach(function(e){i(e,t)}),e.variableDefinitions&&e.variableDefinitions.forEach(function(e){i(e,t)}),e.definitions&&e.definitions.forEach(function(e){i(e,t)})}var n={};function r(e,t){for(var i=0;i<e.definitions.length;i++){var n=e.definitions[i];if(n.name&&n.name.value==t)return n}}t.definitions.forEach(function(e){if(e.name){var t=new Set;i(e,t),n[e.name.value]=t}}),e.exports=t,e.exports.GetProfile=function(e,t){var i={kind:e.kind,definitions:[r(e,t)]};e.hasOwnProperty("loc")&&(i.loc=e.loc);var o=n[t]||new Set,s=new Set,a=new Set;
1for(o.forEach(function(e){a.add(e)});a.size>0;){var c=a;a=new Set,c.forEach(function(e){s.has(e)||(s.add(e),(n[e]||new Set).forEach(function(e){a.add(e)}))})}return s.forEach(function(t){var n=r(e,t);n&&i.definitions.push(n)}),i}(t,"GetProfile")},359(e,t,i){"use strict";i.d(t,{EX:()=>o,R1:()=>u,cY:()=>a,vK:()=>c});var n=i(171);function r(e,t,i,n,r,o,s){try{var a=e[o](s),c=a.value}catch(e){return void i(e)}a.done?t(c):Promise.resolve(c).then(n,r)}function o(e){return s.apply(this,arguments)}function s(){var e;return e=function*(e){var t;switch(e){case"rec1":t=yield i.e(378).then(i.bind(i,559));break;case"rec2":t=yield i.e(217).then(i.bind(i,650));break;case"rec3":t=yield i.e(408).then(i.bind(i,433));break;default:t=yield i.e(646).then(i.bind(i,291))}return t.default},s=function(){var t=this,i=arguments;return new Promise(function(n,o){var s=e.apply(t,i);function a(e){r(s,n,o,a,c,"next",e)}function c(e){r(s,n,o,a,c,"throw",e)}a(void 0)})},s.apply(this,arguments)}function a(e){"log"===localStorage.getItem("pmcDebug")&&console.debug(...e)}function c(e,t){var i,n=()=>{var r;null!==(r=window)&&void 0!==r&&null!==(r=r.pmdConsent)&&void 0!==r&&null!==(r=r.queue)&&void 0!==r&&r.find(t=>"object"==typeof t&&t.type===e)?(clearTimeout(i),t instanceof Function&&t()):i=setTimeout(()=>{requestAnimationFrame(n)},100)};window.requestAnimationFrame(n)}var l=function(){var e="test",t=window.localStorage;try{return t.setItem(e,"1"),t.removeItem(e),!0}catch(e){return!1}}(),u={set:()=>{if(l){var e=JSON.parse(window.localStorage.getItem("pmc-sessions-count")||"[]"),t=new Date,i=u.getLastUtmCampaign(),n=u.getCurrentUtmCampaign();if(e.length>0){var r=e[e.length-1],o=new Date(r);t.getTime()-o.getTime()>18e5||t.toDateString()!==o.toDateString()||n&&i!==n?(n&&u.setLastUtmCampaign(n),e.push(t)):e[e.length-1]=t}else e.push(t);window.localStorage.setItem("pmc-sessions-count",JSON.stringify(u.purgeSessionsOlderThan30Days(e)))}},purgeSessionsOlderThan30Days:e=>{var t=new Date;return e.filter(e=>{var i=new Date(e);return t.getTime()-i.getTime()<=2592e6})},count:()=>l?Number(JSON.parse(window.localStorage.getItem("pmc-sessions-count")||"[]").length):NaN,getLastUtmCampaign:()=>window.localStorage.getItem("user_web_session_utm_campaign")||null,getCurrentUtmCampaign:()=>(new n.A).getParameterByName("utm_campaign")||null,setLastUtmCampaign(e){window.localStorage.setItem("user_web_session_utm_campaign",e)}}},368(e){"use strict";var t=Object.prototype.hasOwnProperty,i="~";function n(){}function r(e,t,i){this.fn=e,this.context=t,this.once=i||!1}function o(e,t,n,o,s){if("function"!=typeof n)throw new TypeError("The listener must be a function");var a=new r(n,o||e,s),c=i?i+t:t;return e._events[c]?e._events[c].fn?e._events[c]=[e._events[c],a]:e._events[c].push(a):(e._events[c]=a,e._eventsCount++),e}function s(e,t){0===--e._eventsCount?e._events=new n:delete e._events[t]}function a(){this._events=new n,this._eventsCount=0}Object.create&&(n.prototype=Object.create(null),(new n).__proto__||(i=!1)),a.prototype.eventNames=function(){var e,n,r=[];if(0===this._eventsCount)return r;for(n in e=this._events)t.call(e,n)&&r.push(i?n.slice(1):n);return Object.getOwnPropertySymbols?r.concat(Object.getOwnPropertySymbols(e)):r},a.prototype.listeners=function(e){var t=i?i+e:e,n=this._events[t];if(!n)return[];if(n.fn)return[n.fn];for(var r=0,o=n.length,s=new Array(o);r<o;r++)s[r]=n[r].fn;return s},a.prototype.listenerCount=function(e){var t=i?i+e:e,n=this._events[t];return n?n.fn?1:n.length:0},a.prototype.emit=function(e,t,n,r,o,s){var a=i?i+e:e;if(!this._events[a])return!1;var c,l,u=this._events[a],d=arguments.length;if(u.fn){switch(u.once&&this.removeListener(e,u.fn,void 0,!0),d){case 1:return u.fn.call(u.context),!0;case 2:return u.fn.call(u.context,t),!0;case 3:return u.fn.call(u.context,t,n),!0;case 4:return u.fn.call(u.context,t,n,r),!0;case 5:return u.fn.call(u.context,t,n,r,o),!0;case 6:return u.fn.call(u.context,t,n,r,o,s),!0}for(l=1,c=new Array(d-1);l<d;l++)c[l-1]=arguments[l];u.fn.apply(u.context,c)}else{var m,h=u.length;for(l=0;l<h;l++)switch(u[l].once&&this.removeListener(e,u[l].fn,void 0,!0),d){case 1:u[l].fn.call(u[l].context);break;case 2:u[l].fn.call(u[l].context,t);break;case 3:u[l].fn.call(u[l].context,t,n);break;case 4:u[l].fn.call(u[l].context,t,n,r);break;default:if(!c)for(m=1,c=new Array(d-1);m<d;m++)c[m-1]=arguments[m];u[l].fn.apply(u[l].context,c)}}return!0},a.prototype.on=function(e,t,i){return o(this,e,t,i,!1)},a.prototype.once=function(e,t,i){return o(this,e,t,i,!0)},a.prototype.removeListener=function(e,t,n,r){var o=i?i+e:e;if(!this._events[o])return this;if(!t)return s(this,o),this;var a=this._events[o];if(a.fn)a.fn!==t||r&&!a.once||n&&a.context!==n||s(this,o);else{for(var c=0,l=[],u=a.length;c<u;c++)(a[c].fn!==t||r&&!a[c].once||n&&a[c].context!==n)&&l.push(a[c]);l.length?this._events[o]=1===l.length?l[0]:l:s(this,o)}return this},a.prototype.removeAllListeners=function(e){var t;return e?(t=i?i+e:e,this._events[t]&&s(this,t)):(this._events=new n,this._eventsCount=0),this},a.prototype.off=a.prototype.removeListener,a.prototype.addListener=a.prototype.on,a.prefixed=i,a.EventEmitter=a,e.exports=a}},n={};function r(e){var t=n[e];if(void 0!==t)return t.exports;var o=n[e]={exports:{}};return i[e](o,o.exports,r),o.exports}r.m=i,r.n=e=>
1{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var i in t)r.o(t,i)&&!r.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},r.f={},r.e=e=>Promise.all(Object.keys(r.f).reduce((t,i)=>(r.f[i](e,t),t),[])),r.u=e=>"assets/scripts/esm."+{41:"engageconf_0",53:"engageconf_4",161:"buttons_",209:"engageconf_8",210:"engageconf_12",217:"pmc_conf_rec2",222:"engageconf_16",245:"engageconf_24",378:"pmc_conf_rec1",408:"pmc_conf_rec3",416:"api_",425:"engageconf_20",457:"engage_",646:"pmc_conf_prod",775:"oneTap_",841:"engageconf_28"}[e]+"_"+{41:"68c8b7b3492ad6702de4",53:"5b7c1d077193219e5a46",161:"6c2c9db64a4bc7ba038c",209:"555a869d0964e63e4700",210:"2a2ae0f5c543e5a7add1",217:"ae778e0d9f37765a1070",222:"6598baf19925be9f5ae4",245:"a6170af5e3538c021862",378:"731dade9bdf694937493",408:"dd6aa740271c6d69eebe",416:"fddc7edbe16ab3a5722e",425:"b3c5a0d142e41a306e72",457:"3365049c845917226e4c",646:"f9473c44d900d570845b",775:"ef6418f649ccc4c7593b",841:"ef4d3abe7557f82c4712"}[e]+".js",r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),e={},t="PmcAPIClient:",r.l=(i,n,o,s)=>{if(e[i])e[i].push(n);else{var a,c;if(void 0!==o)for(var l=document.getElementsByTagName("script"),u=0;u<l.length;u++){var d=l[u];if(d.getAttribute("src")==i||d.getAttribute("data-webpack")==t+o){a=d;break}}a||(c=!0,(a=document.createElement("script")).charset="utf-8",r.nc&&a.setAttribute("nonce",r.nc),a.setAttribute("data-webpack",t+o),a.src=i),e[i]=[n];var m=(t,n)=>{a.onerror=a.onload=null,clearTimeout(h);var r=e[i];if(delete e[i],a.parentNode&&a.parentNode.removeChild(a),r&&r.forEach(e=>e(n)),t)return t(n)},h=setTimeout(m.bind(null,void 0,{type:"timeout",target:a}),12e4);a.onerror=m.bind(null,a.onerror),a.onload=m.bind(null,a.onload),c&&document.head.appendChild(a)}},r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.p="https://tra.scds.pmdstatic.net/pmc-starter/6.1.0/",(()=>{var e={57:0};r.f.j=(t,i)=>{var n=r.o(e,t)?e[t]:void 0;if(0!==n)if(n)i.push(n[2]);else{var o=new Promise((i,r)=>n=e[t]=[i,r]);i.push(n[2]=o);var s=r.p+r.u(t),a=new Error;r.l(s,i=>{if(r.o(e,t)&&(0!==(n=e[t])&&(e[t]=void 0),n)){var o=i&&("load"===i.type?"missing":i.type),s=i&&i.target&&i.target.src;a.message="Loading chunk "+t+" failed.\n("+o+": "+s+")",a.name="ChunkLoadError",a.type=o,a.request=s,n[1](a)}},"chunk-"+t,t)}};var t=(t,i)=>{var n,o,[s,a,c]=i,l=0;if(s.some(t=>0!==e[t])){for(n in a)r.o(a,n)&&(r.m[n]=a[n]);if(c)c(r)}for(t&&t(i);l<s.length;l++)o=s[l],r.o(e,o)&&e[o]&&e[o][0](),e[o]=0},i=self.webpackChunkPmcAPIClient=self.webpackChunkPmcAPIClient||[];i.forEach(t.bind(null,0)),i.push=t.bind(null,i.push.bind(i))})();var o={};return(()=>{"use strict";var e=r(368);class t extends Error{name="TimeoutError";constructor(e,i){super(e,i),Error.captureStackTrace?.(this,t)}}const i=e=>e.reason??new DOMException("This operation was aborted.","AbortError");class n{#e=[];enqueue(e,t){const{priority:i=0,id:n}=t??{},r={priority:i,id:n,run:e};if(0===this.size||this.#e[this.size-1].priority>=i)return void this.#e.push(r);const o=function(e,t,i){let n=0,r=e.length;for(;r>0;){const o=Math.trunc(r/2);let s=n+o;i(e[s],t)<=0?(n=++s,r-=o+1):r=o}return n}(this.#e,r,(e,t)=>t.priority-e.priority);this.#e.splice(o,0,r)}setPriority(e,t){const i=this.#e.findIndex(t=>t.id===e);if(-1===i)throw new ReferenceError(`No promise function with the id "${e}" exists in the queue.`);const[n]=this.#e.splice(i,1);this.enqueue(n.run,{priority:t,id:e})}dequeue(){const e=this.#e.shift();return e?.run}filter(e){return this.#e.filter(t=>t.priority===e.priority).map(e=>e.run)}get size(){return this.#e.length}}class o extends e{#t;#i;#n=0;#r;#o=!1;#s=!1;#a;#c=0;#l=0;#u;#d;#m;#h=[];#p=0;#e;#g;#v=0;#f;#y;#T=1n;#w=new Map;timeout;constructor(e){if(super(),!("number"==typeof(e={carryoverIntervalCount:!1,intervalCap:Number.POSITIVE_INFINITY,interval:0,concurrency:Number.POSITIVE_INFINITY,autoStart:!0,queueClass:n,strict:!1,...e}).intervalCap&&e.intervalCap>=1))throw new TypeError(`Expected \`intervalCap\` to be a number from 1 and up, got \`${e.intervalCap?.toString()??""}\` (${typeof e.intervalCap})`);
1if(void 0===e.interval||!(Number.isFinite(e.interval)&&e.interval>=0))throw new TypeError(`Expected \`interval\` to be a finite number >= 0, got \`${e.interval?.toString()??""}\` (${typeof e.interval})`);if(e.strict&&0===e.interval)throw new TypeError("The `strict` option requires a non-zero `interval`");if(e.strict&&e.intervalCap===Number.POSITIVE_INFINITY)throw new TypeError("The `strict` option requires a finite `intervalCap`");if(this.#t=e.carryoverIntervalCount??e.carryoverConcurrencyCount??!1,this.#i=e.intervalCap===Number.POSITIVE_INFINITY||0===e.interval,this.#r=e.intervalCap,this.#a=e.interval,this.#m=e.strict,this.#e=new e.queueClass,this.#g=e.queueClass,this.concurrency=e.concurrency,void 0!==e.timeout&&!(Number.isFinite(e.timeout)&&e.timeout>0))throw new TypeError(`Expected \`timeout\` to be a positive finite number, got \`${e.timeout}\` (${typeof e.timeout})`);this.timeout=e.timeout,this.#y=!1===e.autoStart,this.#I()}#S(e){for(;this.#p<this.#h.length;){const t=this.#h[this.#p];if(!(void 0!==t&&e-t>=this.#a))break;this.#p++}(this.#p>100&&this.#p>this.#h.length/2||this.#p===this.#h.length)&&(this.#h=this.#h.slice(this.#p),this.#p=0)}#E(e){this.#m?this.#h.push(e):this.#n++}#P(){this.#m?this.#h.length>this.#p&&this.#h.pop():this.#n>0&&this.#n--}#k(){return this.#h.length-this.#p}get#b(){return!!this.#i||(this.#m?this.#k()<this.#r:this.#n<this.#r)}get#C(){return this.#v<this.#f}#A(){this.#v--,0===this.#v&&this.emit("pendingZero"),this.#R(),this.emit("next")}#N(){this.#d=void 0,this.#_(),this.#q()}#x(e){if(this.#m){this.#S(e);if(this.#k()>=this.#r){const t=this.#h[this.#p],i=this.#a-(e-t);return this.#O(i),!0}return!1}if(void 0===this.#u){const t=this.#c-e;if(!(t<0))return this.#O(t),!0;if(this.#l>0){const t=e-this.#l;if(t<this.#a)return this.#O(this.#a-t),!0}this.#n=this.#t?this.#v:0}return!1}#O(e){void 0===this.#d&&(this.#d=setTimeout(()=>{this.#N()},e))}#M(){this.#u&&(clearInterval(this.#u),this.#u=void 0)}#L(){this.#d&&(clearTimeout(this.#d),this.#d=void 0)}#R(){if(0===this.#e.size){if(this.#M(),this.emit("empty"),0===this.#v){if(this.#L(),this.#m&&this.#p>0){const e=Date.now();this.#S(e)}
1this.emit("idle")}return!1}let e=!1;if(!this.#y){const t=Date.now(),i=!this.#x(t);if(this.#b&&this.#C){const n=this.#e.dequeue();this.#i||(this.#E(t),this.#D()),this.emit("active"),n(),i&&this.#q(),e=!0}}return e}#q(){this.#i||void 0!==this.#u||this.#m||(this.#u=setInterval(()=>{this.#_()},this.#a),this.#c=Date.now()+this.#a)}#_(){this.#m||(0===this.#n&&0===this.#v&&this.#u&&this.#M(),this.#n=this.#t?this.#v:0),this.#F(),this.#D()}#F(){for(;this.#R(););}get concurrency(){return this.#f}set concurrency(e){if(!("number"==typeof e&&e>=1))throw new TypeError(`Expected \`concurrency\` to be a number from 1 and up, got \`${e}\` (${typeof e})`);this.#f=e,this.#F()}setPriority(e,t){if("number"!=typeof t||!Number.isFinite(t))throw new TypeError(`Expected \`priority\` to be a finite number, got \`${t}\` (${typeof t})`);this.#e.setPriority(e,t)}async add(e,n={}){return n={timeout:this.timeout,...n,id:n.id??(this.#T++).toString()},new Promise((r,o)=>{const s=Symbol(`task-${n.id}`);this.#e.enqueue(async()=>{let a;this.#v++,this.#w.set(s,{id:n.id,priority:n.priority??0,startTime:Date.now(),timeout:n.timeout});try{try{n.signal?.throwIfAborted()}catch(e){throw this.#j(),this.#w.delete(s),e}this.#l=Date.now();let o=e({signal:n.signal});if(n.timeout&&(o=function(e,n){const{milliseconds:r,fallback:o,message:s,customTimers:a={setTimeout,clearTimeout},signal:c}=n;let l,u;const d=new Promise((n,d)=>{if("number"!=typeof r||1!==Math.sign(r))throw new TypeError(`Expected \`milliseconds\` to be a positive number, got \`${r}\``);if(c?.aborted)return void d(i(c));if(c&&(u=()=>{d(i(c))},c.addEventListener("abort",u,{once:!0})),e.then(n,d),r===Number.POSITIVE_INFINITY)return;const m=new t;l=a.setTimeout.call(void 0,()=>{if(o)try{n(o())}catch(e){d(e)}else"function"==typeof e.cancel&&e.cancel(),!1===s?n():s instanceof Error?d(s):(m.message=s??`Promise timed out after ${r} milliseconds`,d(m))},r)}).finally(()=>{d.clear(),u&&c&&c.removeEventListener("abort",u)});return d.clear=()=>{a.clearTimeout.call(void 0,l),l=void 0},d}(Promise.resolve(o),{milliseconds:n.timeout,message:`Task timed out after ${n.timeout}ms (queue has ${this.#v} running, ${this.#e.size} waiting)`})),n.signal){const{signal:e}=n;o=Promise.race([o,new Promise((t,i)=>{a=()=>{i(e.reason)},e.addEventListener("abort",a,{once:!0})})])}const c=await o;r(c),this.emit("completed",c)}catch(e){o(e),this.emit("error",e)}finally{a&&n.signal?.removeEventListener("abort",a),this.#w.delete(s),queueMicrotask(()=>{this.#A()})}},n),this.emit("add"),this.#R()})}async addAll(e,t){return Promise.all(e.map(async e=>this.add(e,t)))}start(){return this.#y?(this.#y=!1,this.#F(),this):this}pause(){this.#y=!0}clear(){this.#e=new this.#g,this.#M(),this.#U(),this.emit("empty"),0===this.#v&&(this.#L(),this.emit("idle")),this.emit("next")}async onEmpty(){0!==this.#e.size&&await this.#H("empty")}async onSizeLessThan(e){this.#e.size<e||await this.#H("next",()=>this.#e.size<e)}async onIdle(){0===this.#v&&0===this.#e.size||await this.#H("idle")}async onPendingZero(){0!==this.#v&&await this.#H("pendingZero")}async onRateLimit(){this.isRateLimited||await this.#H("rateLimit")}async onRateLimitCleared(){this.isRateLimited&&await this.#H("rateLimitCleared")}onError(){return new Promise((e,t)=>{const i=e=>{this.off("error",i),t(e)};this.on("error",i)})}async#H(e,t){return new Promise(i=>{const n=()=>{t&&!t()||(this.off(e,n),i())};this.on(e,n)})}get size(){return this.#e.size}sizeBy(e){return this.#e.filter(e).length}get pending(){return this.#v}get isPaused(){return this.#y}#I(){this.#i||(this.on("add",()=>{this.#e.size>0&&this.#D()}),this.on("next",()=>{this.#D()}))}#D(){this.#i||this.#s||(this.#s=!0,queueMicrotask(()=>{this.#s=!1,this.#U()}))}#j(){this.#i||(this.#P(),this.#D())}#U(){const e=this.#o;if(this.#i||0===this.#e.size)return void(e&&(this.#o=!1,this.emit("rateLimitCleared")));let t;if(this.#m){const e=Date.now();this.#S(e),t=this.#k()}else t=this.#n;const i=t>=this.#r;i!==e&&(this.#o=i,this.emit(i?"rateLimit":"rateLimitCleared"))}get isRateLimited(){return this.#o}get isSaturated(){return this.#v===this.#f&&this.#e.size>0||this.isRateLimited&&this.#e.size>0}get runningTasks(){return[...this.#w.values()].map(e=>({...e}))}}const s={"caminteresse.fr":{trigram:"cam",externalApis:{google:"897111268988-m758qmle9gpe83f455kcsqo2r3nlbehj.apps.googleusercontent.com",apple:"fr.caminteresse.connect.service"},options:{displayGot:"everywhere",hasEngage:!0}},"cesoirtv.com":{trigram:"ctv",externalApis:{google:"74453523677-jmpjr4q4lhkrpuk4korhhi24ebedsqsr.apps.googleusercontent.com",apple:"com.cesoirtv.connect.service"}},"capital.fr":{trigram:"cap",externalApis:{google:"351800777254-al2kjb31m48oqhpqfg3qt61140dui8jn.apps.googleusercontent.com",apple:"fr.capital.connect.service"},options:{displayGot:"everywhere",hasEngage:!0,hasPmshButton:!0}},"cuisineactuelle.fr":{trigram:"cac",externalApis:{google:"761834681107.apps.googleusercontent.com",apple:"fr.cuisineactuelle.connect.service"},options:{displayGot:"everywhere"}},"femmeactuelle.fr":{trigram:"fac",externalApis:{google:"145938928632-7lkmo0tg1gd0qvj6shru9bbq6ihvdph2.apps.googleusercontent.com",apple:"fr.femmeactuelle.connect.service"},options:{displayGot:"everywhere",hasEngage:!0}},"gentside.com":{trigram:"gen",externalApis:{google:"86900070422-3mhsl5jk58gdgc5kghcaiar64jasbd7c.apps.googleusercontent.com",apple:"com.gentside.connect.service"}},"geo.fr":{trigram:"geo",externalApis:{google:"857847012683-q3iuhca6hqia7tb7r2gdgj934om67pst.apps.googleusercontent.com",apple:"fr.geo.connect.service"},options:{displayGot:"everywhere",hasEngage:!0,hasPmshButton:!0}},"ohmymag.com":{trigram:"omm",externalApis:{google:"86900070422-jdl1h0oear6n08eib7e6udkvf3oc3ooe.apps.googleusercontent.com",apple:"com.ohmymag.connect.service"}},"programme.tv":{trigram:"ptv",externalApis:{google:"1077444050983-d9frlpt4apnrcrdlep9jbl58ts9pt8h4.apps.googleusercontent.com",apple:"tv.programme.connect.service"},options:{displayGot:"everywhere",hasEngage:!0}},tele2semaines:{trigram:"ptv",externalApis:{google:"1077444050983-d9frlpt4apnrcrdlep9jbl58ts9pt8h4.apps.googleusercontent.com",apple:"tv.programme.connect.service"}},"programme-tv.net":{trigram:"tel",externalApis:{google:"308879839479-49484bvg9hjm0ccvhdg7dis7l9e9noh6.apps.googleusercontent.com",apple:"net.programme-tv.connect.service"},options:{displayGot:"everywhere",hasEngage:!1}},"voici.fr":{trigram:"voi",externalApis:{google:"60892240466-5fqck6h7utnmssf596k75ke7gnvj9dkm.apps.googleusercontent.com",apple:"fr.voici.connect.service"},options:{displayGot:"everywhere",hasEngage:!0}},"prismaconnect.fr":{trigram:"pmc",externalApis:{google:"833374308937-ttqg343t1m1gu892a1dv1l3du24cbug0.apps.googleusercontent.com",apple:"fr.prismaconnect.www.service"}},"hbrfrance.fr":{trigram:"hbr",externalApis:{google:"347663822843-n03m4es039i1b2b6q56735qtg9jh518f.apps.googleusercontent.com",apple:"fr.hbrfrance.connect.service"},options:{displayGot:"everywhere",hasEngage:!0,hasPmshButton:!0}},"maxisciences.com":{trigram:"frgsd",externalApis:{google:"86900070422-3mhsl5jk58gdgc5kghcaiar64jasbd7c.apps.googleusercontent.com",apple:"com.maxisciences.connect.service"}},"passpresse.me":{trigram:"ppr",externalApis:{google:"999960906363-q7et1jk4kctbku10fsehtd6ud7aom1r7.apps.googleusercontent.com",apple:"me.passpresse.connect.service"}},"harpersbazaar.fr":{trigram:"hbz",externalApis:{google:"1089260611275-4ef91sju1umk9quimk42sljglrfm6q53.apps.googleusercontent.com",apple:"fr.harpersbazaar.connect.service"}},"gentside.de":{trigram:"degs",externalApis:{google:"86900070422-3mhsl5jk58gdgc5kghcaiar64jasbd7c.apps.googleusercontent.com",apple:"de.gentside.connect.service"}},"gentside.co.uk":{trigram:"ukgs",externalApis:{google:"86900070422-3mhsl5jk58gdgc5kghcaiar64jasbd7c.apps.googleusercontent.com",apple:"uk.co.gentside.connect.service"}},"ohmymag.de":{trigram:"deomm",externalApis:{google:"86900070422-jdl1h0oear6n08eib7e6udkvf3oc3ooe.apps.googleusercontent.com",apple:"de.ohmymag.connect.service"}},"ohmymag.co.uk":{trigram:"ukomm",externalApis:{google:"86900070422-jdl1h0oear6n08eib7e6udkvf3oc3ooe.apps.googleusercontent.com",apple:"uk.co.ohmymag.connect.service"}},"de.seeandso.com":{trigram:"desas",externalApis:{google:"375928139831-6db9hlaf1abum2nrn3i81k35rli6sa16.apps.googleusercontent.com",apple:"com.seeandso.de.connect.service"},host:"de.seeandso.com"},"seeandso.com":{trigram:"uksas",externalApis:{google:"1061266366772-por7use3l12h597lgt30sfhfuqnai3af.apps.googleusercontent.com",apple:"com.seeandso.connect.service"}},"uppercutmma.com":{trigram:"frgss",externalApis:{google:"1024681547716-0fu7tvclr50p8fmufq8tos9p9531h21o.apps.googleusercontent.com",apple:"com.uppercutmma.connect.service"}},"gamesider.com":{trigram:"frgsg",externalApis:{google:"706605381661-8078qpdlk5ldcjutrnsv78o3e27r1ju6.apps.googleusercontent.com",apple:"com.gamesider.connect.service"}},"cuisineaz.com":{trigram:"caz"},"cotemaison.fr":{trigram:"ctm",externalApis:{google:"510868754236-c6v8cc8dghg0c80lthaj20lkk8ts01tn.apps.googleusercontent.com",apple:"fr.cotemaison.connect.service"}},"prismashop.fr":{trigram:"pms",externalApis:{google:"130986618932-pe0vdeveu6eimmsqvrstuqitmqsh63sv.apps.googleusercontent.com",apple:"fr.prismashop.connect.service"}},"prismamediadigital.com":{trigram:"xxx",externalApis:{google:"668605590637-vjafpjmbig169uud7b86illlnuc1b5mi.apps.googleusercontent.com"},host:"prismamediadigital.com",options:{hasPmshButton:!0}}};var a=r(182),c=r.n(a);function l(e,t,i){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var i=e[Symbol.toPrimitive];if(void 0!==i){var n=i.call(e,t||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}class u{constructor(e){var t=this;l(this,"domain",void 0),l(this,"doesExist",e=>document.cookie.split(";").some(t=>t.trim().startsWith("".concat(e,"=")))),l(this,"get",e=>{var t;return!!this.doesExist(e)&&(null===(t=document.cookie.split(";").find(t=>t.trim().startsWith("".concat(e,"="))))||void 0===t?void 0:t.split("=")[1])}),l(this,"getParsed",e=>{var t=this.get(e);return!!t&&JSON.parse(t)}),l(this,"set",function(e,i){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"oneMinute",r="";r="function"==typeof n?n():void 0===t[n]||"oneMinute"!==n&&"untilMidnight"!==n?t.oneMinute():t[n](),document.cookie="".concat(e,"=").concat(i).c
1oncat(r,"; path=/; domain=.").concat(t.domain,";")}),l(this,"del",e=>{document.cookie="".concat(e,"=;expires=Thu, 01 Jan 1970 00:00:01 GMT; path=/; domain=.").concat(this.domain,";")}),l(this,"oneMinute",()=>{var e=new Date;return e.setMinutes(e.getMinutes()+1),"; expires=".concat(e.toUTCString())}),l(this,"untilMidnight",()=>{var e=new Date;return e.setHours(24,0,0,0),"; expires=".concat(e.toUTCString())}),this.domain=e||window.location.hostname.split(".").slice(-2).join(".")}}function d(e,t,i,n,r,o,s){try{var a=e[o](s),c=a.value}catch(e){return void i(e)}a.done?t(c):Promise.resolve(c).then(n,r)}class m{init(e){var t,i=this;return(t=function*(){var t,n,r,o;if(yield i.setPMCTracker(),!e.connected)return null===(o=window.dataLayer)||void 0===o||o.push({login_role:"none"}),void window.sessionStorage.removeItem("GaConnectedEventSent");var s,a="none";e.roles.includes("ADMIN")?a="ADMIN":e.roles.includes("ALIVE")?a="ALIVE":e.roles.includes("AUTOLOGIN_NL")&&(a="AUTOLOGIN_NL"),null===(t=window.dataLayer)||void 0===t||t.push({login_role:a}),null===(n=window.dataLayer)||void 0===n||n.push({web_pmc_id:e.userId}),"true"!==(null===(r=window.sessionStorage)||void 0===r?void 0:r.getItem("GaConnectedEventSent"))&&(null===(s=window.dataLayer)||void 0===s||s.push({event:"pmc_session_start",login_role:a,web_pmc_id:e.userId}),window.sessionStorage.setItem("GaConnectedEventSent","true"))},function(){var e=this,i=arguments;return new Promise(function(n,r){var o=t.apply(e,i);function s(e){d(o,n,r,s,a,"next",e)}function a(e){d(o,n,r,s,a,"throw",e)}s(void 0)})})()}setPMCTracker(){return new Promise(e=>{var t=()=>{window.__tcfapi?window.__tcfapi("addEventListener",2,t=>{if(t&&t.purpose&&void 0!==t.purpose&&"string"!=typeof t.purpose){var i=t.purpose.consents;i[1]&&i[3]&&i[7]&&i[9]&&i[10]&&e(),window.__tcfapi("removeEventListener",2,()=>{},t.listenerId)}}):setTimeout(()=>{requestAnimationFrame(t)},100)};window.requestAnimationFrame(t)})}}var h=r(171),p=r(359);function g(e,t,i,n,r,o,s){try{var a=e[o](s),c=a.value}catch(e){return void i(e)}a.done?t(c):Promise.resolve(c).then(n,r)}function v(e){return function(){var t=this,i=arguments;return new Promise(function(n,r){var o=e.apply(t,i);function s(e){g(o,n,r,s,a,"next",e)}function a(e){g(o,n,r,s,a,"throw",e)}s(void 0)})}}function f(e,t,i){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var i=e[Symbol.toPrimitive];if(void 0!==i){var n=i.call(e,t||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}window.dataLayer=window.dataLayer||[];var y="passprisma";class T{constructor(){var e=this;f(this,"version",void 0),f(this,"config",void 0),f(this,"gqlClient",void 0),f(this,"gqlFactory",void 0),f(this,"cookie",void 0),f(this,"pingAnswer",void 0),f(this,"emailHash",void 0),f(this,"ga",void 0),f(this,"url",void 0),f(this,"buttons",void 0),f(this,"pmcDomain",void 0),f(this,"passPrismaCookieName",void 0),f(this,"logoutUrl","/logout"),f(this,"_apiModule",null),f(this,"_init",v(function*(){if((0,p.cY)(["PMC-STARTER: INIT STARTER"]),"visible"===document.visibilityState){var t=Number(sessionStorage.getItem("pmc-page-num"))||0;sessionStorage.setItem("pmc-page-num","".concat(++t)),p.R1.set(),(0,p.cY)(["PMC-STARTER: NB SESSIONS ON A 30 rolling days period",p.R1.count()])}if(e.config=yield e._extractConfFromGatewayUri(),(0,p.cY)(["PMC-STARTER: CONFIG",e.config]),e.gqlFactory=new window.GqlFactory({config:e.config.gateway,isCredentialsRequired:!0,mode:!0}),e.gqlFactory)try{e.gqlClient=yield e.gqlFactory.getClient(),(0,p.cY)(["PMC-STARTER: GraphQL client initialized successfully"])}catch(e){console.error("PMC-STARTER: Failed to initialize GraphQL client",e)}e.cookie=new u(e.config.host),e.ga=new m,e.logoutUrl=e._defineLogoutUrl(e.config.pmcUris.brandConnect),e.pmcDomain=e.config.pmcUris.brandConnect,e.passPrismaCookieName="".concat(e.config.vars.PASSPRISMAPREFIX,"pmc-premium"),document.location.search.indexOf("pmc-action=logout")>-1&&e.cookie&&e.cookie.del("".concat(e.config.vars.COOKIEPREFIX,"ping")),(0,p.cY)(["PMC-STARTER: INIT FINISHED"]);var i=yield e.isConnected();return(0,p.cY)(["PMC-STARTER: IS CONNECTED FINISHED",i]),i?yield e._setPassPrismaCookie():((0,p.cY)(["PMC-STARTER: deletePassPrismaCookie if exists"]),e._deletePassPrismaCookie()),!0})),f(this,"_startSession",v(function*(){var t,i,n;return null!==(t=e.pingAnswer)&&void 0!==t&&t.message?((0,p.cY)(["PMC-STARTER: GA Initialisation",e.pingAnswer]),(0,p.cY)(["PMC-STARTER: GA Initialisation"]),null===(i=e.ga)||void 0===i||i.init({connected:!0,userId:e.pingAnswer._user.id,roles:e.pingAnswer._roles}),!0):(null===(n=e.ga)||void 0===n||n.init({connected:!1}),!1)})),f(this,"_initButtons",v(function*(){if((0,p.cY)(["PMC-STARTER: INIT BUTTONS STARTED"]),e.pingAnswer){var{default:t}=yield r.e(161).then(r.bind(r,329)),i=e.config.testHost||e.config.host;e.buttons=new t(e.config,e.pingAnswer,i,e.logout),e.buttons.initAll(),(0,p.cY)(["PMC-STARTER: INIT BUTTONS FINISHED"])}})),f(this,"_initOneTap",v(function*(){var t,i,n,o,s;if((0,p.cY)(["PMC-STARTER: INIT ONE TAP STARTED"]),null!==(t=e.config.options)&&void 0!==t&&t.dis
1playGot)if("desktop"===(null===(i=e.config.options)||void 0===i?void 0:i.displayGot)&&e.isMobile())(0,p.cY)(["PMC-STARTER: INIT ONE TAP STOP BECAUSE GOT IS CONFIGURED FOR DESKTOP ON THIS BRAND AND THIS IS A MOBILE DEVICE"]);else if("mobile"!==(null===(n=e.config.options)||void 0===n?void 0:n.displayGot)||e.isMobile()){var a=yield e.isConnected();if((0,p.cY)(["PMC-STARTER: INIT ONE TAP CONTINUE WITH CONNEXION",a]),(0,p.cY)(["PMC-STARTER: INIT ONE TAP CONTINUE WITH Google App Id",null===(o=e.config.externalApis)||void 0===o?void 0:o.google]),!a&&null!==(s=e.config.externalApis)&&void 0!==s&&s.google){(0,p.cY)(["PMC-STARTER: INIT ONE TAP is gonna import dynamically the module"]);try{var{initOneTap:c}=yield r.e(775).then(r.bind(r,659));(0,p.cY)(["PMC-STARTER: INIT ONE TAP STARTED",c]),c({config:e.config,gqlClient:e.gqlClient,cookieModule:e.cookie,pmcDomain:e.pmcDomain,tcString:""})}catch(e){(0,p.cY)(["PMC-STARTER: INIT ONE TAP CRASHED",e])}}}else(0,p.cY)(["PMC-STARTER: INIT ONE TAP STOP BECAUSE GOT IS CONFIGURED FOR MOBILE ON THIS BRAND AND THIS IS A DESKTOP DEVICE"]);else(0,p.cY)(["PMC-STARTER: INIT ONE TAP STOP BECAUSE GOT IS NOT CONFIGURED ON THIS BRAND"])})),f(this,"_initEngage",v(function*(){var t;if((0,p.cY)(["PMC-STARTER: ENGAGE STARTED"]),null===(t=e.config.options)||void 0===t||!t.hasEngage||location.hostname.includes("boutique.")||location.hostname.includes("actu.")||location.hostname.includes("podcast."))(0,p.cY)(["no engage"]);else{(0,p.cY)(["engage"]);try{var{default:i}=yield r.e(457).then(r.bind(r,801));i({trigram:e.config.trigram,pmc:e})}catch(e){(0,p.cY)([e])}}})),f(this,"_updateHashedEmail",()=>{(0,p.vK)("noConsentGiven",()=>{(0,p.cY)(["PMC-STARTER: userHashedEmail - no consent - localStorage removed"]),window.localStorage.removeItem("userHashedEmail")}),(0,p.vK)("allConsentGiven",v(function*(){(0,p.cY)(["PMC-STARTER: userHashedEmail - allConsentGiven Case"]);var t=yield e.getProfile();(0,p.cY)(["PMC-STARTER: userHashedEmail - allConsentGiven Case",t]),t?!1===t.personalInformationShared?((0,p.cY)(["PMC-STARTER: userHashedEmail - personalInformationShared false - localStorage removed"]),window.localStorage.removeItem("userHashedEmail")):window.localStorage.getItem("userHashedEmail")&&window.localStorage.getItem("userHashedEmail")===t.hashEmailSHA256||((0,p.cY)(["PMC-STARTER: userHashedEmail - localStorage filled with new value"]),window.localStorage.setItem("userHashedEmail",t.hashEmailSHA256)):!e.url.getParameterByName("nlsha")||null===e.url.getParameterByName("nlsha")||e.url.getParameterByName("perso-ad")||window.localStorage.getItem("userHashedEmail")?e.url.getParameterByName("perso-ad")?((0,p.cY)(["PMC-STARTER: userHashedEmail - localStorage emptied because perso-ad=disabled"]),window.localStorage.removeItem("userHashedEmail")):window.location.hash.includes("fromLogout")&&((0,p.cY)(["PMC-STARTER: userHashedEmail - localStorage emptied because logout"]),window.localStorage.removeItem("userHashedEmail")):((0,p.cY)(["PMC-STARTER: userHashedEmail - localStorage filled with value from url"]),window.localStorage.setItem("userHashedEmail",e.url.getParameterByName("nlsha")))}))}),f(this,"_extractConfFromGatewayUri",v(function*(){var e,t,i=JSON.parse(localStorage.getItem("pmc-starter-conf")||"{}"),n=(null==i||null===(e=i.gateway)||void 0===e?void 0:e.uri)||(null===(t=window.frontConfig)||void 0===t||null===(t=t.env)||void 0===t||null===(t=t.gateway)||void 0===t?void 0:t.uri)||null;if(!n)throw new Error("PMC-STARTER: Missing gateway uri, please check your configuration");var r=n.match(/^https:\/\/(rec[123])?(?:-)?gateway\.(.*)$/);if(null==r||!r[2])throw new Error("PMC-STARTER: Invalid gateway uri, expected https://(rec[123]-)?gateway.<brand-domain>");var o=r[1]||"prod",a=r[2].replace(/\/+$/,"");if(!(a in s))throw new Error('PMC-STARTER: Gateway host "'.concat(a,'" is not a known brand domain, please check your configuration'));var c={env:o,host:a,gateway:{uri:n}};if(null!=i&&i.trigram&&(c.trigram=i.trigram),null!=i&&i.host&&(c.host=i.host),null!=i&&i.testHost)c.testHost=i.testHost;else if("prismamediadigital.com"===a){var l=window.location.hostname.replace(".".concat(a),"").split("-"),u="tv.net"==="".concat(l[l.length-2],".").concat(l[l.length-1])?"programme-tv.net":"".concat(l[l.length-2],".").concat(l[l.length-1]),d=s[u];c.trigram=d.trigram,c.testHost=d.host||u}var m=yield(0,p.EX)(o),h={brandConnect:m.BRAND_PMC.replace("BRAND_URL",a),globalConnect:"".concat(m.PMC_URL)};return Object.assign({},s[a],c,{pmcUris:h},{vars:m})})),f(this,"_getDomain",()=>this.config.host||window.location.hostname.split(".").slice(-2).join(".")),f(this,"_defineLogoutUrl",e=>"".concat(e,"/logout")),f(this,"extractRootDomain",e=>{var t=new URL(e).hostname;return Object.keys(s).find(e=>t.endsWith(e))}),f(this,"isConnected",function(){var t=v(function*(t){var i;(0,p.cY)(["PMC-STARTER: IS CONNECTED STARTED"]),e.pingAnswer=e.__getPingCookieValue();var n=!(null===(i=e.pingAnswer)||void 0===i||!i.message);return(0,p.cY)(["PMC-STARTER: IS CONNECTED FINISHED",e.pingAnswer]),null==t||t(n),n});return function(e){return t.apply(this,arguments)}}()),f(this,"__getPingCookieValue",()=>{var e;return(0,p.cY)(["ENVIRONMENT",this.config,"".concat(this.config.vars.COOKIEPREFIX,"ping")]),null!==(e=this.cookie)&&void 0!==e&&e.get("".concat(this.config.vars.COOKIEPREFIX,"ping"))?((0,p.cY)(["ping cookie",this.cookie.get("".concat(this.config.vars.COOKIEPREFIX,"ping"))]),this.cookie.getParsed("".concat(this.config.vars.COOKIEPREFIX,"ping"))):{message:!1}}),f(this,"logout",()=>{(0,p.cY)(["PMC-STARTER: logout",this.logoutUrl]),this.cookie&&this.cookie.del("".concat(this.config.vars.COOKIEPREFIX,"ping")),this._deletePassPrismaCookie(),window.location.assign(this.logoutUrl)}),f(this,"getLogoutUrl",function(){var t=v(function*(t){return null==t||t(e.logoutUrl),e.logoutUrl});return function(e){return t.apply(this,arguments)}}()),f(this,"_requestProfile",v(function*(){var t,i,n,r=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if((0,p.cY)(["PMC-STARTER: _requestProfile STARTED"]),!e.gqlClient)return!1;var o=yield e.gqlClient.query({query:c(),fetchPolicy:r?"network-only":"cache-first"});return!(null==o||null===(t=o.data)||void 0===t||!t.me)&&(e.emailHash={md5:null,
1sha256:o.data.me.hashEmailSHA256?decodeURIComponent(o.data.me.hashEmailSHA256):null},null!==(i=null===(n=o.data)||void 0===n?void 0:n.me)&&void 0!==i&&i)})),f(this,"getProfile",function(){var t=v(function*(t){var i;if((0,p.cY)(["PMC-STARTER: GET Profile STARTED"]),null===(i=e.pingAnswer)||void 0===i||!i.message)return null==t||t(!1),(0,p.cY)(["PMC-STARTER: GET Profile FINISHED - no pingAnswer"]),!1;var n=yield e._requestProfile();return(0,p.cY)(["PMC-STARTER: GET Profile FINISHED"]),null==t||t(n),n});return function(e){return t.apply(this,arguments)}}()),f(this,"refreshProfile",function(){var t=v(function*(t){var i;if((0,p.cY)(["PMC-STARTER: Refresh Profile STARTED"]),null===(i=e.pingAnswer)||void 0===i||!i.message)return null==t||t(!1),!1;var n=yield e._requestProfile(!0);return(0,p.cY)(["PMC-STARTER: Refresh Profile FINISHED"]),null==t||t(n),n});return function(e){return t.apply(this,arguments)}}()),f(this,"getProfileId",function(){var t=v(function*(t){var i=yield e.getProfile(),n=!!i&&i.id;return null==t||t(n),n});return function(e){return t.apply(this,arguments)}}()),f(this,"getUserSignupService",function(){var t=v(function*(t){var i,n=yield e.getProfile(),r=n&&(null===(i=n.signup)||void 0===i?void 0:i.service)||!1;return null==t||t(r),r});return function(e){return t.apply(this,arguments)}}()),f(this,"getAvatar",function(){var t=v(function*(t,i){if(!t||"string"!=typeof t)throw new Error("Fallback is mandatory");var n=yield e.getProfile(),r=n&&n.avatar||t;return null==i||i(r),r});return function(e,i){return t.apply(this,arguments)}}()),f(this,"getEmailHash",v(function*(){var t,i,n=(arguments.length<=0?void 0:arguments[0])&&"string"==typeof(arguments.length<=0?void 0:arguments[0])?arguments.length<=0?void 0:arguments[0]:"md5";if(arguments.length>1&&"function"==typeof(arguments.length<=1?void 0:arguments[1])?i=arguments.length<=1?void 0:arguments[1]:1===arguments.length&&"function"==typeof(arguments.length<=0?void 0:arguments[0])&&(i=arguments.length<=0?void 0:arguments[0]),(yield e.getProfile())&&e.emailHash){var r,o,s=null!==(r=e.emailHash[n])&&void 0!==r?r:null;return null===(o=i)||void 0===o||o(s),s}return null===(t=i)||void 0===t||t(null),null})),f(this,"getRoles",function(){var t=v(function*(t){var i;if((yield e.isConnected())&&null!==(i=e.pingAnswer)&&void 0!==i&&i.message){var n=e.pingAnswer._roles;return null==t||t(n),n}return null==t||t(!1),!1});return function(e){return t.apply(this,arguments)}}()),f(this,"hasRole",function(){var t=v(function*(t,i){var n=yield e.getRoles(),r=Array.isArray(n)&&n.length>0&&n.includes(t);return null==i||i(r),r});return function(e,i){return t.apply(this,arguments)}}()),f(this,"_setPassPrismaCookie",v(function*(){var t,i,n,r=yield e.getProfile();if(r)if(null!==(t=r.passPrisma)&&void 0!==t&&t.isActive&&null!==(i=r.passPrisma)&&void 0!==i&&i.endAt&&(null===(n=r.passPrisma)||void 0===n?void 0:n.endAt)>Date.now()&&e.cookie){var o=new Date(r.passPrisma.endAt);e.cookie.set(e.passPrismaCookieName,JSON.stringify({status:!0,endsAt:r.passPrisma.endAt,paymentStatus:r.passPrisma.paymentStatus}),()=>"; expires=".concat(o.toUTCString(),"; Secure"))}else e._deletePassPrismaCookie();else e._deletePassPrismaCookie()})),f(this,"_deletePassPrismaCookie",()=>{var e;null===(e=this.cookie)||void 0===e||e.del(this.passPrismaCookieName)}),f(this,"hasPassPrisma",function(){var t=v(function*(t){var i,n=!1;if(null!==(i=e.cookie)&&void 0!==i&&i.get(e.passPrismaCookieName)){var r=JSON.parse(e.cookie.get(e.passPrismaCookieName));console.debug("hasPassPrisma",r),n=r.endsAt>Date.now()}return null==t||t(n),n});return function(e){return t.apply(this,arguments)}}()),f(this,"getPassPrismaPaymentStatus",function(){var t=v(function*(t){var i,n="nopayment";if(null!==(i=e.cookie)&&void 0!==i&&i.get(e.passPrismaCookieName)){var r=JSON.parse(e.cookie.get(e.passPrismaCookieName));n=r.endsAt>Date.now()?r.paymentStatus:"nopayment"}return null==t||t(n),n});return function(e){return t.apply(this,arguments)}}()),f(this,"_definePassPrismaOrderLink",v(function*(){var t,i,n="".concat(e.pmcDomain,"/checkout/").concat(y,"?"),r="".concat(e.pmcDomain,"/?inc-order=").concat(y,"&"),o="redirectTo=".concat(encodeURIComponent(window.location.href)),s=e.config,a="&signupservice=".concat(null===(t=s.trigram)||void 0===t?void 0:t.toUpperCase(),"_PAYWALL_MODALE_SITE-").concat(null===(i=s.trigram)||void 0===i?void 0:i.toUpperCase(),"_ZERO-PUB");try{if(yield e.isConnected()){var c=yield e.hasRole("ADMIN"),l=yield e.hasPassPrisma();return c?!l&&n+o+a:r+o+a}return r+o+a}catch(e){return console.debug(e),r+o+a}})),f(this,"getPassPrismaOrderLink",function(){var t=v(function*(t){var i=yield e._definePassPrismaOrderLink();return null==t||t(i),i});return function(e){return t.apply(this,arguments)}}()),f(this,"gotoPassPrismaOrder",function(){var t=v(function*(t){var i=yield e._definePassPrismaOrderLink();return null==t||t(i),i&&window.location.assign(i),i});return function(e){return t.apply(this,arguments)}}()),f(this,"getApiModule",v(function*(){if(e._apiModule)return e._apiModule;if(!e.gqlClient)throw new Error("PMC STARTER: GraphQL client not initialized");var{default:t}=yield r.e(416).then(r.bind(r,30));return e._apiModule=new t(e.gqlClient),e._apiModule})),f(this,"bindButton",e=>e.addEventListener("click",t=>{this.buttons&&this.buttons.bindButton(t,e)})),f(this,"useButton",(e,t,i)=>{this.buttons&&this.buttons.redirectAuth(e,t,i)}),f(this,"getRedirectLink",function(){var t=v(function*(t,i){var n,r;if(null!==(n=e.pingAnswer)&&void 0!==n&&n.message&&!t.force)return null==i||i(t.redirectTo),t.redirectTo;var o=[];if(t.redirectTo){var s=t.redirectTo;(s.startsWith("http://")||s.startsWith("https://"))&&(s=encodeURIComponent(s)),o.push("redirectTo=".concat(s))}t.signupService&&o.push("signupservice=".concat(t.signupService)),t.serviceType&&o.push("service[type]=".concat(t.serviceType)),t.serviceContext&&o.push("service[contextKey]=".concat(t.serviceContext)),t.extraQueryVars&&o.push("".concat(t.extraQueryVars)),t.login&&o.push("login=1");var a="?".concat(o.join("&")),c=(null===(r=e.buttons)||void 0===r?void 0:r.getUrlRedirection("/",a))||"";return null==i||i(c),c});return function(e,i){return t.apply(this,arguments)}}()),f(this,"checkSignupService",e=>!!this.buttons&&this.buttons.signupServiceInspector.check(e)),f(this,"isMobile",()=>{var e=navigator.userAgent.toLowerCase();return["Android","webOS","iPhone","iPad","iPod","BlackBerry","Windows Phone","Opera Mini","IEMobile"].some(t=>e.includes(t.toLowerCase()))}),f(this,"prefillEmail",e=>{e&&this.cookie&&this.cookie.set("".concat(this.config.vars.COOKIEPREFIX,"prefill-email"),e,"oneMinute")}),f(this,"cancelGoogleIdentity",()=>{var e;null!==(e=window.google)&&void 0!==e&&null!==(e=e.accounts)&&void 0!==e&&e.id&&"function"==typeof window.google.accounts.id.cancel&&window.google.accounts.id.cancel()}),f(this,"activateDebug",()=>{localStorage.setItem("pmcDebug","log")}),f(this,"deactivateDebug",()=>{localStorage.removeItem("pmcDebug")}),f(this,"forceEnv",e=>{var t={env:e,gateway:{uri:"https://".concat("prod"===e?"":"".concat(e,"-"),"gateway.").concat(this.config.host||this._getDomain())}};localStorage.setItem("pmc-starter-conf",JSON.stringify(t)),window.location.reload()}),f(this,"cleanEnv",()=>{localStorage.removeItem("pmc-starter-conf"),window.location.reload()}),(0,p.cY)(["PMC-STARTER: PMC Starter init"]),this.version="6.1.0",this.gqlClient=null,this.gqlFactory=null,this.cookie=null,this.pingAnswer=null,this.emailHash=null,this.ga=null,this.url=new h.A,this.buttons=null,this.pmcDomain=null,this.passPrismaCookieName=null}}function w(e,t,i,n,r,o,s){try{var a=e[o](s),c=a.value}catch(e){return void i(e)}a.done?t(c):Promise.resolve(c).then(n,r)}function I(e){return function(){var t=this,i=arguments;return new Promise(function(n,r){var o=e.apply(t,i);function s(e){w(o,n,r,s,a,"next",e)}function a(e){w(o,n,r,s,a,"throw",e)}s(void 0)})}}function S(e,t,i){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var i=e[Symbol.toPrimitive];if(void 0!==i){var n=i.call(e,t||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}var E=window.pmcstarter.q;window.pmcstarter.q=new class{constructor(){if(S(this,"queue",void 0),S(this,"pmc",void 0),this.queue=new o({concurrency:1}),this.pmc=new T,"log"===localStorage.getItem("pmcDebug")){this.queue.on("add",()=>{console.debug("Task is added. Size: ".concat(this.queue.size," Pending: ").concat(this.queue.pending))}),this.queue.on("next",()=>{console.debug("Task is completed. Size: ".concat(this.queue.size," Pending: ").concat(this.queue.pending))});var e=0;this.queue.on("active",()=>{console.debug("Working on item #".concat(++e,". Size: ").concat(this.queue.size," Pending: ").concat(this.queue.pending))})}this.start()}start(){var e=this;return I(function*(){yield e.queue.addAll([()=>e.pmc._init(),()=>e.pmc._startSession(),()=>e.pmc._initButtons(),()=>e.pmc.getProfile(),()=>e.pmc._updateHashedEmail(),()=>e.pmc._initOneTap(),()=>e.pmc._initEngage()],{priority:10})})()}push(){var e=arguments,t=this;return I(function*(){for(var i=function*(){try{var i=Array.from(n<0||e.length<=n?void 0:e[n]);if("function"==typeof i[0]){var r=i[0];yield t.queue.add(I(function*(){return r(t.pmc)}),{priority:1})}else{var o=i[0];yield t.queue.add(I(function*(){return t.pmc[o].apply(t.pmc,i.slice(1))}),{priority:2})}}catch(e){console.error(e)}},n=0;n<e.length;n++)yield*i()})()}},window.pmcstarter.q&&window.pmcstarter.q.push.apply(window.pmcstarter.q,E)})(),o=o.default})()); 2//# sourceMappingURL=esm.index.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.