1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[490],{4917:function(f,h,g){var c,d,e,b=g(855);function i(b){if(!Object.prototype.hasOwnProperty.call(a.message,b))throw new Error("invalid status code: "+b);return a.message[b]}function a(b){if("number"==typeof b)return i(b);if("string"!=typeof b)throw new TypeError("code must be a number or string");var c=parseInt(b,10);return isNaN(c)?function(b){var c=b.toLowerCase();if(!Object.prototype.hasOwnProperty.call(a.code,c))throw new Error('invalid status message: "'+b+'"');return a.code[c]}(b):i(c)}f.exports=a,a.message=b,a.code=(c=b,d={},Object.keys(c).forEach(function(a){var b=c[a],e=Number(a);d[b.toLowerCase()]=e}),d),a.codes=(e=b,Object.keys(e).map(function(a){return Number(a)})),a.redirect={300:!0,301:!0,302:!0,303:!0,305:!0,307:!0,308:!0},a.empty={204:!0,205:!0,304:!0},a.retry={502:!0,503:!0,504:!0}},909:function(M,v,j){j.d(v,{i:function(){return aU}});var w,x,y,z,A,B,f,k,g,l,p,q,m,d,C,r,s,N=j(7294),O=j(4917);let P=0;const Q=(a,b,c="")=>({requestID:`${c}${P++}`,type:a,data:b}),R=(d,e,a=200)=>{var b,c;if(a>=400)throw new TypeError(`Invalid success status code, expected status to be within \`[100;400[\`, got \`${a}\``);return{requestID:d,status:a,msg:null!=(c=null==(b=O.message[a])?void 0:b.replace(/\.$/,"").toLowerCase())?c:"",data:e}},S=(d,e,a=400)=>{var b,c;if(a<400)throw new TypeError(`Invalid error status code, expected status to be within \`[500;600[\`, got \`${a}\``);return{requestID:d,status:a,msg:null!=(c=null==(b=O.message[a])?void 0:b.replace(/\.$/,"").toLowerCase())?c:"",error:e}},T=a=>{if("object"!=typeof a||null===a)throw new TypeError(`Invalid message received, expected message to be of type \`object\`, got \`${typeof a}\``);if(Object.keys(a).every(a=>["requestID","type","data","status","msg","error"].includes(a))){if("string"!=typeof a.requestID)throw new TypeError(`Invalid message received, expected \`message.requestID\` to be of type \`string\`, got \`${typeof a.id}\``)}else throw new TypeError(`Invalid message received: ${JSON.stringify(a)}`);return a},U=a=>"type"in a,V=a=>!("type"in a),W=a=>V(a)&&!("error"in a);class X extends Error{constructor(a){super(a.msg),this.response=a}}class Y extends Error{constructor(a){super("Too many concurrent requests"),this.request=a}}
1class Z extends Error{constructor(a){super(`Request \`${a.requestID}\` timed out`),this.request=a}}class $ extends Error{}class _ extends Error{constructor(){super("Port is not set")}}class D{constructor(a,b){this._port=null,this._pendingRequests=new Map,this.requestHandlers=a,this.options={debug:!1,maximumRequestConcurrency:20,defaultTimeout:5e3,requestIDPrefix:"channel-",...b}}get port(){if(!this._port)throw new _;return this._port}set port(a){this._port&&(this._port.onmessage=null),this._port=a,this._port&&(this._port.onmessage=this.onMessage.bind(this))}createRequestMessage(a,b){return Q(a,b,this.options.requestIDPrefix)}async onMessage(c){this.options.debug&&console.debug(c.data);try{const a=T(c.data);if(U(a))if(this.requestHandlers[a.type])try{const d=await this.requestHandlers[a.type](a,{success:R.bind(this,a.requestID),error:S.bind(this,a.requestID)});this.postResponse(d)}catch(e){this.postResponse(S(a.requestID,e,500))}else this.postResponse(S(a.requestID,void 0,501));else this._pendingRequests.has(a.requestID)?(this._pendingRequests.get(a.requestID)(a),this._pendingRequests.delete(a.requestID)):console.error(`Unknown request ID received in response: ${JSON.stringify(a)}`)}catch(b){if(b instanceof TypeError)console.warn(b.message);else throw b}}postRequest(a,b=a=>this.port.postMessage(a),c={}){if(this.options.debug&&console.debug(a),this._pendingRequests.size>=this.options.maximumRequestConcurrency)throw new Y(a);return new Promise((d,e)=>{const f=setTimeout(()=>{this._pendingRequests.has(a.requestID)&&this._pendingRequests.delete(a.requestID),e(new Z(a))},c.timeout||this.options.defaultTimeout);this._pendingRequests.set(a.requestID,a=>{clearTimeout(f),W(a)?d(a):e(new X(a))}),b(a)})}postResponse(a,b=a=>this.port.postMessage(a)){return this.options.debug&&console.debug(a),b(a),a}}(p||(p={})).Connect="connect",(q||(q={})).Ready="ready";class E extends D{constructor(a,b){super(a,{readyTimeout:2e4,requestIDPrefix:"receiver-",...b}),this._ready=!1,window.addEventListener("message",a=>{this._onPublicMessage(a)})}async ready(){if(window.parent===window)throw new Error("Receiver is currently not embedded as an iframe");this._ready=!1;const a=this.createRequestMessage(q.Ready,void 0),b=await this.postRequest(a,a=>{window.parent.postMessage(a,"*")},{timeout:this.options.readyTimeout});return this._ready=!0,b}_onPublicMessage(a){try{const b=T(a.data);if(U(b))switch(this.options.debug&&console.debug(a.data),b.type){case p.Connect:this.port=a.ports[0];const d=R(b.requestID,void 0);this.postResponse(d);break;default:this.postResponse(S(b.requestID,void 0),b=>{a.source.postMessage(b,a.origin)});break}else this._ready||this.onMessage(a)}catch(c){if(c instanceof TypeError);else throw c}}postFormattedRequest(a,b,c={}){if(!this._ready)throw new $("Receiver is not ready, use `ChannelReceiver.ready()` first");return this.postRequest(this.createRequestMessage(a,b),void 0,c)}}(m||(m={})).SetActiveSlice="setActiveSlice",(ab=d||(d={})).Ping="ping",ab.GetLibraries="getLibraries",ab.SetSliceZone="setSliceZone",ab.SetSliceZoneFromSliceIDs="setSliceZoneFromSliceIDs",ab.ScrollToSlice="scrollToSlice",d.Ping,d.GetLibraries,d.SetSliceZone,d.SetSliceZoneFromSliceIDs,d.ScrollToSlice;class aa extends E{constructor(f,a){var b,c;const e=(null==a?void 0:a.debug)||/[\?&]debug=true/i.test(decodeURIComponent(window.location.search));super({[d.Ping]:(b,a)=>a.success("pong"),...f},{requestIDPrefix:"api-",...a,debug:e}),this[C]=async a=>await this.postFormattedRequest(m.SetActiveSlice,a),e&&(window.prismic||(window.prismic={}),(b=window.prismic).sliceSimulator||(b.sliceSimulator={}),(c=window.prismic.sliceSimulator).api||(c.api=[]),window.prismic.sliceSimulator.api.push(this))}}C=m.SetActiveSlice,Object.prototype.hasOwnProperty;var ab,F,ac=function(a){return"Left"===a._tag},c=(F=function(a,b){return(F=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(a,b){a.__proto__=b}||function(c,a){for(var b in a)Object.prototype.hasOwnProperty.call(a,b)&&(c[b]=a[b])})(a,b)},function(b,a){function c(){this.constructor=b}F(b,a),b.prototype=null===a?Object.create(a):(c.prototype=a.prototype,new c)}),ad=function(){return(ad=Object.assign||function(d){for(var a,b=1,e=arguments.length;b<e;b++)for(var c in a=arguments[b])Object.prototype.hasOwnProperty.call(a,c)&&(d[c]=a[c]);return d}).apply(this,arguments)},ae=function(){for(var c=0,a=0,d=arguments.length;a<d;a++)c+=arguments[a].length;for(var e=Array(c),f=0,a=0;a<d;a++)for(var g=arguments[a],b=0,h=g.length;b<h;b++,f++)e[f]=g[b];return e},af=function(a){return{_tag:"Left",left:a}},ag=function(a,b,c){return af([{value:a,context:b,message:c}])},ah=function(a){return{_tag:"Right",right:a}},a=function(){function a(a,b,c,d){this.name=a,this.is=b,this.validate=c,this.encode=d,this.decode=this.decode.bind(this)}return a.prototype.pipe=function(b,c){var d=this;return void 0===c&&(c="pipe("+this.name+", "+b.name+")"),new a(c,b.is,function(e,c){var a=d.val
1idate(e,c);return ac(a)?a:b.validate(a.right,c)},this.encode===t&&b.encode===t?t:function(a){return d.encode(b.encode(a))})},a.prototype.asDecoder=function(){return this},a.prototype.asEncoder=function(){return this},a.prototype.decode=function(a){return this.validate(a,[{key:"",type:this,actual:a}])},a}(),t=function(a){return a};function ai(d,e,f,g){for(var b=d.length,c=Array(b+1),a=0;a<b;a++)c[a]=d[a];return c[b]={key:e,type:f,actual:g},c}function aj(c,b){for(var d=b.length,a=0;a<d;a++)c.push(b[a])}var ak=Object.prototype.hasOwnProperty;function al(b){for(var a=0;a<b.length;a++)if(b[a].encode!==t)return!1;return!0}function am(b){var a;return"{ "+(a=b,Object.keys(a).map(function(b){return b+": "+a[b].name}).join(", "))+" }"}function an(a){var c;if(au(a)){var d=a.value;if(b.is(d))return(c={})[d]=null,c}else if(av(a))return a.keys;else if(aw(a)){var e=a.types.map(function(a){return an(a)});return e.some(ay.is)?void 0:Object.assign.apply(Object,ae([{}],e))}}function ao(c,d){for(var h=!0,i=!0,l=!aA.is(c),e=0,j=d;e<j.length;e++){var a=j[e];a!==c&&(h=!1),aA.is(a)&&(i=!1)}if(h)return c;if(i)return d[d.length-1];for(var f={},g=0,k=d;g<k.length;g++){var a=k[g];for(var b in a)(!f.hasOwnProperty(b)||l||a[b]!==c[b])&&(f[b]=a[b])}return f}function ap(a){switch(a._tag){case"RefinementType":case"ReadonlyType":return ap(a.type);case"InterfaceType":case"StrictType":case"PartialType":return a.props;case"IntersectionType":return a.types.reduce(function(a,b){return Object.assign(a,ap(b))},{})}}function aq(a){return a.length>0}var ar={};function as(e,f){for(var b=[],a=0,c=e;a<c.length;a++){var d=c[a];-1!==f.indexOf(d)&&b.push(d)}return b}function at(a){return"AnyType"===a._tag}function au(a){return"LiteralType"===a._tag}function av(a){return"KeyofType"===a._tag}function aw(a){return"UnionType"===a._tag}function ax(a){if(-1!==null.indexOf(a))return ar;if("InterfaceType"===a._tag||"StrictType"===a._tag){var b=ar;for(var c in a.props){var d=a.props[c];au(d)&&(b===ar&&(b={}),b[c]=[d.value])}return b}if("ExactType"===a._tag||"RefinementType"===a._tag)return ax(a.type);if("IntersectionType"===a._tag)return a.types.reduce(function(a,b){return function(b,c){if(b===ar)return c;if(c===ar)return b;var d=Object.assign({},b);for(var a in c)if(b.hasOwnProperty(a)){var e=as(b[a],c[a]);if(aq(e))d[a]=e;else{d=ar;break}}else d[a]=c[a];return d}(a,ax(b))},ar);if(aw(a))return a.types.slice(1).reduce(function(a,b){return function(b,c){if(b===ar||c===ar)return ar;var d=ar;for(var a in b)c.hasOwnProperty(a)&&0===as(b[a],c[a]).length&&(d===ar&&(d={}),d[a]=b[a].concat(c[a]));return d}(a,ax(b))},ax(a.types[0]));if("RecursiveType"===a._tag){null.push(a);var e=ax(a.type);return null.pop(),e}return ar}new(function(b){function a(){var a=b.call(this,"null",function(a){return null===a},function(b,c){return a.is(b)?ah(b):ag(b,c)},t)||this;return a._tag="NullType",a}return c(a,b),a}(a));var ay=new(function(b){function a(){var a=b.call(this,"undefined",function(a){return void 0===a},function(b,c){return a.is(b)?ah(b):ag(b,c)},t)||this;return a._tag="UndefinedType",a}return c(a,b),a}(a));new(function(b){function a(){var a=b.call(this,"void",ay.is,ay.validate,t)||this;return a._tag="VoidType",a}return c(a,b),a}(a)),new(function(b){function a(){var a=b.call(this,"unknown",function(a){return!0},ah,t)||this;return a._tag="UnknownType",a}return c(a,b),a}(a));var G,H,b=new(function(b){function a(){var a=b.call(this,"string",function(a){return"string"==typeof a},function(b,c){return a.is(b)?ah(b):ag(b,c)},t)||this;return a._tag="StringType",a}return c(a,b),a}(a)),u=new(function(b){function a(){var a=b.call(this,"number",function(a){return"number"==typeof a},function(b,c){return a.is(b)?ah(b):ag(b,c)},t)||this;return a._tag="NumberType",a}return c(a,b),a}(a));new(function(b){function a(){var a=b.call(this,"bigint",function(a){return"bigint"==typeof a},function(b,c){return a.is(b)?ah(b):ag(b,c)},t)||this;return a._tag="BigIntType",a}return c(a,b),a}(a)),new(function(b){function a(){var a=b.call(this,"boolean",function(a){return"boolean"==typeof a},function(b,c){return a.is(b)?ah(b):ag(b,c)},t)||this;return a._tag="BooleanType",a}return c(a,b),a}(a));var az=new(function(b){function a(){var a=b.call(this,"UnknownArray",Array.isArray,function(b,c){return a.is(b)?ah(b):ag(b,c)},t)||this;return a._tag="AnyArrayType",a}return c(a,b),a}(a)),aA=new(function(b){function a(){var a=b.call(this,"UnknownRecord",function(b){var a=Object.prototype.toString.call(b);return"[object Object]"===a||"[object Window]"===a},function(b,c){return a.is(b)?ah(b):ag(b,c)},t)||this;return a._tag="AnyDictionaryType",a}return c(a,b),a}(a)),aB=(c(function(b,c,d,e,f){var a=G.call(this,b,c,d,e)||this;return a.value=f,a._tag="LiteralType",a}
1,G=a),c(function(b,c,d,e,f){var a=H.call(this,b,c,d,e)||this;return a.keys=f,a._tag="KeyofType",a},H=a),function(b){function a(c,d,e,f,g,h){var a=b.call(this,c,d,e,f)||this;return a.type=g,a.predicate=h,a._tag="RefinementType",a}return c(a,b),a}(a));!function(a,b,c){return L(a,b,"Int")}(u,function(a){return Number.isInteger(a)},"Int");var I=function(b){function a(c,d,e,f,g){var a=b.call(this,c,d,e,f)||this;return a.runDefinition=g,a._tag="RecursiveType",a}return c(a,b),a}(a);Object.defineProperty(I.prototype,"type",{get:function(){return this.runDefinition()},enumerable:!0,configurable:!0});var J=function(b){function a(c,d,e,f,g){var a=b.call(this,c,d,e,f)||this;return a.type=g,a._tag="ArrayType",a}return c(a,b),a}(a),aC=function(b){function a(c,d,e,f,g){var a=b.call(this,c,d,e,f)||this;return a.props=g,a._tag="InterfaceType",a}return c(a,b),a}(a);function e(a,b){void 0===b&&(b=am(a));var c=Object.keys(a),d=c.map(function(b){return a[b]}),e=c.length;return new aC(b,function(b){if(aA.is(b)){for(var a=0;a<e;a++){var f=c[a],g=b[f];if(void 0===g&&!ak.call(b,f)||!d[a].is(g))return!1}return!0}return!1},function(o,m){var g=aA.validate(o,m);if(ac(g))return g;for(var h=g.right,a=h,i=[],b=0;b<e;b++){var f=c[b],j=a[f],n=d[b],k=n.validate(j,ai(m,f,n,j));if(ac(k))aj(i,k.left);else{var l=k.right;l===j&&(void 0!==l||ak.call(a,f))||(a===h&&(a=ad({},h)),a[f]=l)}}return i.length>0?af(i):ah(a)},al(d)?t:function(b){for(var f=ad({},b),a=0;a<e;a++){var g=c[a],h=d[a].encode;h!==t&&(f[g]=h(b[g]))}return f},a)}var aD=function(b){function a(c,d,e,f,g){var a=b.call(this,c,d,e,f)||this;return a.props=g,a._tag="PartialType",a}return c(a,b),a}(a);function h(a,b){void 0===b&&(b="Partial<"+am(a)+">");var c=Object.keys(a),d=c.map(function(b){return a[b]}),e=c.length;return new aD(b,function(d){if(aA.is(d)){for(var b=0;b<e;b++){var f=c[b],g=d[f];if(void 0!==g&&!a[f].is(g))return!1}return!0}return!1},function(o,l){var g=aA.validate(o,l);if(ac(g))return g;for(var h=g.right,b=h,i=[],j=0;j<e;j++){var d=c[j],f=b[d],m=a[d],k=m.validate(f,ai(l,d,m,f));if(ac(k))void 0!==f&&aj(i,k.left);else{var n=k.right;n!==f&&(b===h&&(b=ad({},h)),b[d]=n)}}return i.length>0?af(i):ah(b)},al(d)?t:function(b){for(var f=ad({},b),a=0;a<e;a++){var g=c[a],h=b[g];void 0!==h&&(f[g]=d[a].encode(h))}return f},a)}var aE=function(b){function a(c,d,e,f,g,h){var a=b.call(this,c,d,e,f)||this;return a.domain=g,a.codomain=h,a._tag="DictionaryType",a}return c(a,b),a}(a);function n(d,h,i){var j,e,a,f,l,b,c,g,k=an(d);return k?(j=Object.keys(k),e=d,a=h,void 0===(f=i)&&(f="{ [K in "+e.name+"]: "+a.name+" }"),l=j.length,new aE(f,function(b){return aA.is(b)&&j.every(function(c){return a.is(b[c])})},function(o,k){var b=aA.validate(o,k);if(ac(b))return b;for(var c=b.right,m={},d=[],e=!1,f=0;f<l;f++){var g=j[f],h=c[g],i=a.validate(h,ai(k,g,a,h));if(ac(i))aj(d,i.left);else{var n=i.right;e=e||n!==h,m[g]=n}}return d.length>0?af(d):ah(e||Object.keys(c).length!==l?m:c)},a.encode===t?t:function(e){for(var c={},b=0;b<l;b++){var d=j[b];c[d]=a.encode(e[d])}return c},e,a)):(b=d,c=h,void 0===(g=i)&&(g="{ [K in "+b.name+"]: "+c.name+" }"),new aE(g,function(a){return aA.is(a)?Object.keys(a).every(function(d){return b.is(d)&&c.is(a[d])}):at(c)&&Array.isArray(a)},function(d,g){if(aA.is(d)){for(var l={},f=[],m=Object.keys(d),p=m.length,e=!1,h=0;h<p;h++){var a=m[h],i=d[a],j=b.validate(a,ai(g,a,b,a));if(ac(j))aj(f,j.left);else{var n=j.right;e=e||n!==a,a=n;var k=c.validate(i,ai(g,a,c,i));if(ac(k))aj(f,k.left);else{var o=k.right;e=e||o!==i,l[a]=o}}}return f.length>0?af(f):ah(e?l:d)}return at(c)&&Array.isArray(d)?ah(d):ag(d,g)},b.encode===t&&c.encode===t?t:function(d){for(var e={},f=Object.keys(d),h=f.length,a=0;a<h;a++){var g=f[a];e[String(b.encode(g))]=c.encode(d[g])}return e},b,c))}var K=function(b){function a(c,d,e,f,g){var a=b.call(this,c,d,e,f)||this;return a.types=g,a._tag="UnionType",a}return c(a,b),a}(a),aF=function(b){function a(c,d,e,f,g){var a=b.call(this,c,d,e,f)||this;return a.types=g,a._tag="IntersectionType",a}return c(a,b),a}(a);function i(a,b){void 0===b&&(b="("+a.map(function(a){return a.name}).join(" & ")+")");var c=a.length;return new aF(b,function(b){return a.every(function(a){return a.is(b)})},0===a.length?ah:function(d,i){for(var g=[],e=[],b=0;b<c;b++){var h=a[b],f=h.validate(d,ai(i,String(b),h,d));ac(f)?aj(e,f.left):g.push(f.right)}return e.length>0?af(e):ah(ao(d,g))},0===a.length?t:function(b){return ao(b,a.map(function(a){return a.encode(b)}))},a)}function L(a,d,b){if(void 0===b){var c;b="("+a.name+" | "+((c=d).displayName||c.name||"<function"+c.length+">")+")"}return new aB(b,function(b){return a.is(b)&&d(b)},function(f,e){var b=a.validate(f,e);if(ac(b))return b;var c=b.right;return d(c)?ah(c):ag(c,e)},a.encode,a,d)}c(function(b,c,d,e,f){var a=x.call(this,b,c,d,e)||this;return a.types=f,a._tag="TupleType",a},x=a),c(function(b,c,d,e,f){var a=y.call(this,b,c,d,e)||this;return a.type=f,a._tag="ReadonlyType",a},y=a),c(function(b,c,d,e,f){var a=z.call(this,b,c,d,e)||this;return a.type=f,a._tag="ReadonlyArrayType",a},z=a),c(function(b,c,d,e,f){var a=w.call(this,b,c,d,e)||this;return a.type=f,a._tag="ExactType",a},w=a),new(function(b){function a(){var a=b.call(this,"Function",function(a){return"function"==typeof a},function(b,c){return a.is(b)?ah(b):ag(b,c)},t)||this;return a._tag="FunctionType",a}return c(a,b),a}(a)),c(function(b,c,d,e,f,g){var a=A.call(this,b,c,d,e,f)||this;return a.tag=g,a},A=K),new(function(b){function a(){var a=b.call(this,"never",function(a){return!1},function(a,b){return ag(a,b)},function(){throw new Error("cannot encode never")})||this;return a._tag="NeverType",a}return c(a,b),a}(a)),new(function(b){function a(){var a=b.call(this,"any",function(a){return!0},ah,t)||this;return a._tag="AnyType",a}return c(a,b),a}(a)),new(function(b){function a(){var a=b.call(this,"object",function(a){return null!==a&&"object"==typeof a},function(b,c){return a.is(b)?ah(b):ag(b,c)},t)||this;return a._tag="ObjectType",a}return c(a,b),a}(a)),L(u,Number.isInteger,"Integer"),c(function(b,c,d,e,f){var a=B.call(this,b,c,d,e)||this;
1return a.props=f,a._tag="StrictType",a},B=a);const aG=n(b,i([h({name:b}),e({components:n(b,i([e({id:b,model:i([e({id:b,variations:(f=i([e({id:b}),h({name:b})]),void 0===k&&(k="Array<"+f.name+">"),new J(k,function(a){return az.is(a)&&a.every(f.is)},function(k,i){var d=az.validate(k,i);if(ac(d))return d;for(var a=d.right,l=a.length,c=a,e=[],b=0;b<l;b++){var g=a[b],h=f.validate(g,ai(i,String(b),f,g));if(ac(h))aj(e,h.left);else{var j=h.right;j!==g&&(c===a&&(c=a.slice()),c[b]=j)}}return e.length>0?af(e):ah(c)},f.encode===t?t:function(a){return a.map(f.encode)},f))}),h({name:b})]),mocks:n(b,e({variation:b}))}),h({name:b})]))})]));(g=r||(r={})).ManagedState="managedState",g.Slices="slices",g.ActiveSlice="activeSlice",g.Message="message",(l=s||(s={})).Pending="pending",l.Loaded="loaded",l.Error="error";const aH=()=>({zIndex:100,background:"#ffffff"}),aI=()=>({data:null,status:s.Pending,error:null}),aJ=()=>[],aK=()=>"",aL="slice-simulator",aM="slice-simulator--root",aN=b=>{let a=document.querySelector(`.${aL} [data-slice-zone]`);if(a)return a.children.length!==b&&console.warn(`Flagged SliceZone has an unexpected number of children, found ${a.children.length} but expected ${b}. This might lead to unexpected behaviors. Are you sure you tagged the right element?`),a;if(!(a=document.querySelector(`.${aL} .${aM}`)))return null;for(let c=0;c<5;c++){if(a.children.length===b)return a;
1if(a.children.length)a=a.children[0];else break}return null},aO=(d,a)=>{const b=document.elementsFromPoint(a.x,a.y).reverse(),c=b.indexOf(d);if(-1===c)return null;const e=b[c+1];return e||null},o=(a,b)=>`<a href="${a}" style="text-decoration: underline;">${b||a}<a>`,aP=`<div style="word-spacing: initial; white-space: pre; line-height: initial; font-family: monospace; color: #ffffff; mix-blend-mode: difference; padding: 1rem; font-size: 1rem;">${[" _____ ___ _____ _ __ __ \n / ___// (_)_______ / ___/(_)___ ___ __ __/ /___ _/ /_____ _____\n \\__ \\/ / / ___/ _ \\\\__ \\/ / __ `__ \\/ / / / / __ `/ __/ __ \\/ ___/\n ___/ / / / /__/ __/__/ / / / / / / / /_/ / / /_/ / /_/ /_/ / / \n/____/_/_/\\___/\\___/____/_/_/ /_/ /_/\\__,_/_/\\__,_/\\__/\\____/_/ \n / /_ __ __ / __ \\_____(_)________ ___ (_)____\n / __ \\/ / / / / /_/ / ___/ / ___/ __ `__ \\/ / ___/\n / /_/ / /_/ / / ____/ / / (__ ) / / / / / / /__ \n /_.___/\\__, / /_/ /_/ /_/____/_/ /_/ /_/_/\\___/ \n /____/\n\n",`You're seeing this page because you're accessing Slice Simulator 2directly, e.g: 3 4 - ${o("http://localhost:3000/slice-simulator")} 5 6 7 8Slice Simulator is not meant to be accessed this way, to preview your 9slices, head over to Slice Machine UI: 10 11 - ${o("http://localhost:9999")} 12 13 14 15If you believe this is an error, please reach out to us: 16 17 - ${o("https://github.com/prismicio/slice-machine/issues/new/choose")}`,"\n\n\n\n\n\n - The Prismic team"].join("")}</div>`;class aQ{constructor(){this._listeners={}}on(a,c,d=null){var b;this._listeners[a]=[...null!=(b=this._listeners[a])?b:[],[c,d]]}off(a,c){var b;this._listeners[a]=(null!=(b=this._listeners[a])?b:[]).filter(([a,b])=>"function"==typeof c?a!==c:b!==c)}emit(b,c){var a;(null!=(a=this._listeners[b])?a:[]).forEach(a=>a[0](c))}}const aR=a=>{a.preventDefault(),a.stopPropagation()},aS=a=>{a.path&&a.path.slice(0,5).some(a=>a instanceof HTMLAnchorElement)&&(a.preventDefault(),a.stopPropagation())},aT=new class{constructor(a=aI(),b=aJ()){this.stateManager=new class extends aQ{constructor(a=aI(),b=aJ()){super(),this._setActiveSlice=()=>{if(0===this.slices.length){this.activeSlice=null;return}const a=aN(this.slices.length);if(!a){this.activeSlice=null;return}const b=aO(a,this._mouse);if(!b){this.activeSlice=null;return}const c=Array.prototype.indexOf.call(a.children,b);this.activeSlice={rect:b.getBoundingClientRect(),sliceID:this.slices[c].slice_type,variationID:this.slices[c].variation,index:c}},this.setActiveSlice=((a,b=16)=>{let c=0,d=null;return function(...g){const e=Date.now(),f=e-c;f>=b?(a.apply(this,g),c=e):(d&&clearTimeout(d),d=setTimeout(()=>{a.apply(this,g),c=Date.now()},b-f))}})(this._setActiveSlice,16),this._setSliceZoneFromSliceIDsLastCall=null,this._managedState=a,this._slices=b,this._activeSlice=null,this._message="",this._mouse={x:0,y:0}}set managedState(a){this._managedState=a,this.emit(r.ManagedState,a)}get managedState(){return this._managedState}set slices(a){this._slices=a,this.message="",this.emit(r.Slices,a),this.setActiveSlice()}get slices(){return this._slices}set activeSlice(a){this._activeSlice=a,this.emit(r.ActiveSlice,a)}get activeSlice(){return this._activeSlice}set message(a){this._message=a,this.emit(r.Message,a)}get message(){return this._message}async init(a){this._managedState=await this.load(a),await this.forceSliceChunksDownload(),this.setDefaultSliceZone(),this.emit(r.ManagedState,this._managedState),window.addEventListener("mousemove",a=>{this._mouse={x:a.clientX,y:a.clientY}})}async load(a){try{const d=await ("function"==typeof a?a():a),b=aG.decode(d);if("Left"===b._tag)throw console.error(b.left),new Error("State does not validate expected format, see console logs for detailed report");return{data:b.right,status:s.Loaded,error:null}}catch(c){return console.error(c),{data:null,status:s.Error,error:c}}}async reload(a){this.managedState=await this.load(a),this.recoverSliceZone()}_throwIfNotLoaded(b){var a;if(this.managedState.status===s.Error)throw null!=(a=this.managedState.error)?a:new Error("Unknown state error, see console logs for detailed report");if(this.managedState.status===s.Pending||!this.managedState.data)throw new Error(`\`StateManager.${b}()\` can only be called when the state is loaded, use \`StateManager.load()\` first`)}getLibraries(){return this._throwIfNotLoaded("getLibraries"),Object.entries(this.managedState.data).map(([a,b])=>{const c=b.components;return{path:a,slices:Object.values(c).map(a=>({id:a.id,name:a.name||a.id,variations:a.model.variations.map(a=>({id:a.id,name:a.name||a.id}))}))}})}getMocks(){return this._throwIfNotLoaded("getMocks"),Object.values(this.managedState.data).reduce((a,b)=>{const c=b.components;
17return Object.values(c).forEach(b=>{a[b.id]=Object.values(b.mocks).reduce((a,b)=>(a[b.variation]=b,a),{})}),a},{})}async forceSliceChunksDownload(){this.setSliceZoneFromSliceIDs(this.getLibraries().map(a=>a.slices.map(a=>({sliceID:a.id,variationID:a.variations[0].id}))).flat()),await new Promise(a=>setTimeout(a,0)),this.slices=[]}setDefaultSliceZone(){if(this._throwIfNotLoaded("setDefaultSliceZone"),"undefined"!=typeof window){const a=new URL(window.location.href);a.searchParams.has("sid")&&a.searchParams.has("vid")&&this.setSliceZoneFromSliceIDs([{sliceID:a.searchParams.get("sid"),variationID:a.searchParams.get("vid")}])}}recoverSliceZone(){this._setSliceZoneFromSliceIDsLastCall&&this.setSliceZoneFromSliceIDs(this._setSliceZoneFromSliceIDsLastCall)}setSliceZone(a){this._setSliceZoneFromSliceIDsLastCall=null,this.slices=a}setSliceZoneFromSliceIDs(a){this._setSliceZoneFromSliceIDsLastCall=a;const b=this.getMocks();this.slices=a.map(c=>{const a=c.sliceID,d=c.variationID;if(a in b&&d in b[a])return b[a][d]}).filter(Boolean)}}(a,b),this._api=null}async init(b){if(this.stateManager.managedState.status===s.Loaded){await this.stateManager.reload(b);return}await this.stateManager.init(b);try{await this._initAPI()}catch(a){a instanceof Error&&"Receiver is currently not embedded as an iframe"===a.message&&!this.stateManager.slices.length&&(this.stateManager.message=aP),console.error(a);return}this._initListeners()}async _initAPI(){this._api=new aa({[d.GetLibraries]:(b,a)=>a.success(this.stateManager.getLibraries()),[d.SetSliceZone]:(a,b)=>(this.stateManager.setSliceZone(a.data),b.success()),[d.SetSliceZoneFromSliceIDs]:(a,b)=>(this.stateManager.setSliceZoneFromSliceIDs(a.data),b.success()),[d.ScrollToSlice]:(a,b)=>{if(a.data.sliceIndex<0)return b.error("`sliceIndex` must be > 0",400);if(a.data.sliceIndex>=this.stateManager.slices.length)return b.error(`\`sliceIndex\` must be < ${this.stateManager.slices.length} (\`<SliceZone />\` current length)`,400);const c=aN(this.stateManager.slices.length);if(!c)return b.error("Failed to find `<SliceZone />`",500);this.stateManager.activeSlice=null;const d=c.children[a.data.sliceIndex];return d?(d.scrollIntoView({behavior:a.data.behavior,block:a.data.block,inline:a.data.inline}),setTimeout(this.stateManager.setActiveSlice,750),b.success()):b.error("Failed fo find slice at index $`{req.data.sliceIndex}` in `<SliceZone />`",500)}}),await this._api.ready()}_initListeners(){window.addEventListener("mousemove",this.stateManager.setActiveSlice),window.addEventListener("resize",this.stateManager.setActiveSlice),window.addEventListener("mousewheel",()=>{setTimeout(this.stateManager.setActiveSlice,200)}),this.stateManager.on(r.ActiveSlice,async b=>{if(this._api)try{await this._api.setActiveSlice(b)}catch(a){if(a instanceof X&&400===a.response.status)console.error(a.response);else throw a}})}},aU=a=>{var b,c;const d=aH(),[g,h]=N.useState(aI()),[e,i]=N.useState(aJ()),[f,j]=N.useState(aK());N.useEffect(()=>(aT.stateManager.on(r.ManagedState,a=>{h(a)},"simulator-managed-state"),aT.stateManager.on(r.Slices,a=>{i(a)},"simulator-slices"),aT.stateManager.on(r.Message,a=>{j(a)},"simulator-message"),aT.init(a.state),()=>{aT.stateManager.off(r.ManagedState,"simulator-managed-state"),aT.stateManager.off(r.Slices,"simulator-slices"),aT.stateManager.off(r.Message,"simulator-message")}),[]);const k=N.useRef(!1);return N.useEffect(()=>{k.current?aT.stateManager.reload(a.state):k.current=!0},[a.state]),N.createElement("div",{className:[aL,a.className].filter(Boolean).join(" "),style:{zIndex:void 0===a.zIndex?d.zIndex:null!=(b=a.zIndex)?b:void 0,position:"fixed",top:0,left:0,width:"100%",height:"100vh",overflow:"auto",background:void 0===a.background?d.background:null!=(c=a.background)?c:void 0}},f?N.createElement("article",{dangerouslySetInnerHTML:{__html:f}}):e.length?N.createElement("div",{id:"root",className:aM,style:g.status!==s.Loaded?{display:"none"}:void 0,onClickCapture:aS,onSubmitCapture:aR},a.sliceZone({slices:e})):null)}},855:function(a){a.exports=JSON.parse('{"100":"Continue","101":"Switching Protocols","102":"Processing","103":"Early Hints","200":"OK","201":"Created","202":"Accepted","203":"Non-Authoritative Information","204":"No Content","205":"Reset Content","206":"Partial Content","207":"Multi-Status","208":"Already Reported","226":"IM Used","300":"Multiple Choices","301":"Moved Permanently","302":"Found","303":"See Other","304":"Not Modified","305":"Use Proxy","307":"Temporary Redirect","308":"Permanent Redirect","400":"Bad Request","401":"Unauthorized","402":"Payment Required","403":"Forbidden","404":"Not Found","405":"Method Not Allowed","406":"Not Acceptable","407":"Proxy Authentication Required","408":"Request Timeout","409":"Conflict","410":"Gone","411":"Length Required","412":"Precondition Failed","413":"Payload Too Large","414":"URI Too Long","415":"Unsupported Media Type","416":"Range Not Satisfiable","417":"Expectation Failed","418":"I\'m a Teapot","421":"Misdirected Request","422":"Unprocessable Entity","423":"Locked","424":"Failed Depen
17dency","425":"Too Early","426":"Upgrade Required","428":"Precondition Required","429":"Too Many Requests","431":"Request Header Fields Too Large","451":"Unavailable For Legal Reasons","500":"Internal Server Error","501":"Not Implemented","502":"Bad Gateway","503":"Service Unavailable","504":"Gateway Timeout","505":"HTTP Version Not Supported","506":"Variant Also Negotiates","507":"Insufficient Storage","508":"Loop Detected","509":"Bandwidth Limit Exceeded","510":"Not Extended","511":"Network Authentication Required"}')}}])
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.