slice-machine-ui 1.19.2-dev-next-release.1 → 1.19.2-dev-next-release.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (47) hide show
  1. package/components/Simulator/components/IframeRenderer/index.tsx +0 -3
  2. package/components/Simulator/components/Toolbar/index.tsx +0 -42
  3. package/components/Simulator/index.tsx +0 -2
  4. package/lib/models/common/Screenshots.ts +1 -10
  5. package/out/404.html +1 -1
  6. package/out/_next/static/chunks/585-f3dca093db4b3792.js +10 -0
  7. package/out/_next/static/chunks/{80-4cd4c6f95d162ef7.js → 80-c513d12da6156fb7.js} +1 -1
  8. package/out/_next/static/chunks/{904-b2d5235c13e62ee8.js → 904-cfe9632d3f82e990.js} +1 -1
  9. package/out/_next/static/chunks/pages/{_app-d27e49f9f618a421.js → _app-37aead075684fb8d.js} +3 -3
  10. package/out/_next/static/chunks/pages/{changes-768c9cb6fef169d1.js → changes-cacc63c37e28fbbd.js} +1 -1
  11. package/out/_next/static/chunks/pages/{labs-395232bcec99d42a.js → labs-083545e0987b7886.js} +1 -1
  12. package/out/_next/static/chunks/pages/slices/[lib]/[sliceName]/[variation]/simulator-5e441f8b049cf91b.js +1 -0
  13. package/out/_next/static/chunks/pages/slices/[lib]/[sliceName]/{[variation]-4dfda949290eb037.js → [variation]-3d4698bb55b09014.js} +1 -1
  14. package/out/_next/static/sVN8SG2Rfq9IshnbTCNsD/_buildManifest.js +1 -0
  15. package/out/changelog.html +1 -1
  16. package/out/changes.html +1 -1
  17. package/out/custom-types/[customTypeId].html +1 -1
  18. package/out/custom-types.html +1 -1
  19. package/out/index.html +1 -1
  20. package/out/labs.html +1 -1
  21. package/out/page-types/[pageTypeId].html +1 -1
  22. package/out/slices/[lib]/[sliceName]/[variation]/simulator.html +1 -1
  23. package/out/slices/[lib]/[sliceName]/[variation].html +1 -1
  24. package/out/slices.html +1 -1
  25. package/package.json +4 -4
  26. package/src/apiClient.ts +1 -40
  27. package/src/modules/loading/types.ts +0 -1
  28. package/src/modules/screenshots/actions.ts +4 -25
  29. package/src/modules/screenshots/sagas.ts +1 -63
  30. package/src/modules/selectedSlice/actions.ts +1 -5
  31. package/src/modules/selectedSlice/reducer.ts +1 -5
  32. package/src/modules/slices/index.ts +1 -6
  33. package/src/modules/toaster/index.tsx +6 -22
  34. package/src/modules/useSliceMachineActions.ts +2 -25
  35. package/components/ScreenshotToaster/index.tsx +0 -53
  36. package/out/_next/static/OxAI7JbjsT4zST5HlKNEI/_buildManifest.js +0 -1
  37. package/out/_next/static/chunks/746-2ca4784811bde7c1.js +0 -8
  38. package/out/_next/static/chunks/770-c75d8245a822c5d9.js +0 -3
  39. package/out/_next/static/chunks/pages/slices/[lib]/[sliceName]/[variation]/screenshot-76d40513025fd76d.js +0 -1
  40. package/out/_next/static/chunks/pages/slices/[lib]/[sliceName]/[variation]/simulator-39efc79412072ae1.js +0 -1
  41. package/out/slices/[lib]/[sliceName]/[variation]/screenshot.html +0 -1
  42. package/pages/slices/[lib]/[sliceName]/[variation]/screenshot.tsx +0 -61
  43. package/test/src/modules/screenshots/__fixtures__/mocks.json +0 -41
  44. package/test/src/modules/screenshots/__fixtures__/model.json +0 -35
  45. package/test/src/modules/screenshots/__testutils__/getSelectedSliceDummyData.ts +0 -29
  46. package/test/src/modules/screenshots/sagas.test.ts +0 -82
  47. /package/out/_next/static/{OxAI7JbjsT4zST5HlKNEI → sVN8SG2Rfq9IshnbTCNsD}/_ssgManifest.js +0 -0
@@ -1,3 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[770],{80832:function(e,t,n){"use strict";function r(e,t){return e.filter((e,n)=>n!==t)}function i(e,t,n){if(t===n||a(e,t)||a(e,n))return e;let r=e.slice(),i=r.splice(t,1)[0];return r.splice(n,0,i),r}function a(e,t){return t<0||t>=e.length}function s(e,...t){let n=e.slice();return 0===t.length&&(t=[e=>e]),n.sort((e,n)=>{for(let r of t){let i=r(e),a=r(n);if(null==i)return 1;if(null==a)return -1;if("string"==typeof i){let s=i.localeCompare(a);if(0!==s)return s}else{if(i<a)return -1;if(i>a)return 1}}return 0}),n}n.d(t,{$E:function(){return r},DY:function(){return s},pB:function(){return i}})},19245:function(e,t,n){"use strict";n.d(t,{WY:function(){return i},xb:function(){return o}});var r=n(97867);async function i(e,t){let{okType:n,signal:i,headers:o,body:l,timeout:u=15e3,...c}=t,d=new Headers(o);d.has("Content-Type")||d.set("Content-Type","application/json"),"multipart/form-data"===d.get("Content-Type")&&d.delete("Content-Type");let p=s();p&&d.set("Authorization",`Bearer ${p}`);let h="application/json"===d.get("Content-Type")?JSON.stringify(l):l,f=!1;try{let m=t.method&&"GET"!==t.method?void 0:new AbortController,g=function(e){let t=new AbortController;function n(){for(let r of(t.abort(),e))r.removeEventListener("abort",n)}for(let r of e){if(r.aborted){n();break}r.addEventListener("abort",n)}return t.signal}([null==m?void 0:m.signal,i].filter(r.$));m&&setTimeout(()=>{f=!0,m.abort()},u);let v=await fetch(e,{...c,body:h,headers:d,signal:g}),{status:y}=v,_=v.clone(),b=await v.json().catch(e=>_.text());if(v.ok){let x=n.safeParse(b);if(!x.success)throw new a({type:"validation",status:y,cause:x.error});return x.data}throw new a({type:"http",status:y,body:b})}catch(T){var k,w;throw(k=T,k instanceof a)?T:new a((w=T,w instanceof DOMException&&"AbortError"===w.name)?{type:f?"timeout":"abort"}:{type:"unknown",cause:T})}}class a extends Error{constructor(e){super(JSON.stringify(e,null,2)),this.detail=e,this.name="RequestError"}}let s=()=>"";function o(e){return"dev"===e?"same-origin":"include"}},59131:function(e,t,n){"use strict";n.d(t,{d:function(){return i}});let r=0;function i(){return r++}},34736:function(e,t,n){"use strict";function r(e,t){let n={};for(let r in e)n[r]=t(e[r],r);return n}n.d(t,{Q8:function(){return r}})},32001:function(e,t,n){"use strict";n.d(t,{$P:function(){return o},NW:function(){return a},R9:function(){return i},pQ:function(){return s}});var r=n(2784);function i(e){let t=(0,r.useRef)(e);return(0,r.useLayoutEffect)(()=>{t.current=e}),(0,r.useMemo)(()=>(...e)=>{var n;return null==(n=t.current)?void 0:n.call(t,...e)},[])}function a(){let[e,t]=(0,r.useState)({});return(0,r.useCallback)(()=>t({}),[])}function s(e,t){let[n,i]=(0,r.useState)(e);n!==e&&(i(e),t(e))}function o(e){var t,n,a;let{ms:s=300,initialState:o,startTransition:l=e=>e()}=e,[u,c]=(0,r.useState)(o),[d,p]=(0,r.useState)(o);return a=i(()=>l(()=>p(u))),(0,r.useEffect)(()=>{let e=setTimeout(()=>a(u),s);return()=>clearTimeout(e)},[a,s,u]),{debouncedValue:d,set:c,value:u}}},60848:function(e,t,n){"use strict";n.d(t,{fW:function(){return tp},tf:function(){return tf},Ag:function(){return tv},W7:function(){return td},Vu:function(){return ty}}),(e8=tt||(tt={})).assertEqual=e=>e,e8.assertIs=function(e){},e8.assertNever=function(e){throw Error()},e8.arrayToEnum=e=>{let t={};for(let n of e)t[n]=n;return t},e8.getValidEnumValues=e=>{let t=e8.objectKeys(e).filter(t=>"number"!=typeof e[e[t]]),n={};for(let r of t)n[r]=e[r];return e8.objectValues(n)},e8.objectValues=e=>e8.objectKeys(e).map(function(t){return e[t]}),e8.objectKeys="function"==typeof Object.keys?e=>Object.keys(e):e=>{let t=[];for(let n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.push(n);return t},e8.find=(e,t)=>{for(let n of e)if(t(n))return n},e8.isInteger="function"==typeof Number.isInteger?e=>Number.isInteger(e):e=>"number"==typeof e&&isFinite(e)&&Math.floor(e)===e,e8.joinValues=function(e,t=" | "){return e.map(e=>"string"==typeof e?`'${e}'`:e).join(t)},e8.jsonStringifyReplacer=(e,t)=>"bigint"==typeof t?t.toString():t,(e7=tn||(tn={})).mergeShapes=(e,t)=>({...e,...t});let r=tt.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set",]),i=e=>{switch(typeof e){case"undefined":return r.undefined;case"string":return r.string;case"number":return isNaN(e)?r.nan:r.number;case"boolean":return r.boolean;case"function":return r.function;case"bigint":return r.bigint;case"symbol":return r.symbol;case"object":if(Array.isArray(e))return r.array;if(null===e)return r.null;if(e.then&&"function"==typeof e.then&&e.catch&&"function"==typeof e.catch)return r.promise;if("undefined"!=typeof Map&&e instanceof Map)return r.map;if("undefined"!=typeof Set&&e instanceof Set)return r.set;if("undefined"!=typeof Date&&e instanceof Date)return r.date;return r.object;default:return r.unknown}},a=tt.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite",]),s=e=>{let t=JSON.stringify(e,null,2);return t.replace(/"([^"]+)":/g,"$1:")};class o extends Error{constructor(e){super(),this.issues=[],this.addIssue=e=>{this.issues=[...this.issues,e]},this.addIssues=(e=[])=>{this.issues=[...this.issues,...e]};let t=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,t):this.__proto__=t,this.name="ZodError",this.issues=e}get errors(){return this.issues}format(e){let t=e||function(e){return e.message},n={_errors:[]},r=e=>{for(let i of e.issues)if("invalid_union"===i.code)i.unionErrors.map(r);else if("invalid_return_type"===i.code)r(i.returnTypeError);else if("invalid_arguments"===i.code)r(i.argumentsError);else if(0===i.path.length)n._errors.push(t(i));else{let a=n,s=0;for(;s<i.path.length;){let o=i.path[s],l=s===i.path.length-1;l?(a[o]=a[o]||{_errors:[]},a[o]._errors.push(t(i))):a[o]=a[o]||{_errors:[]},a=a[o],s++}}};return r(this),n}toString(){return this.message}get message(){return JSON.stringify(this.issues,tt.jsonStringifyReplacer,2)}get isEmpty(){return 0===this.issues.length}flatten(e=e=>e.message){let t={},n=[];for(let r of this.issues)r.path.length>0?(t[r.path[0]]=t[r.path[0]]||[],t[r.path[0]].push(e(r))):n.push(e(r));return{formErrors:n,fieldErrors:t}}get formErrors(){return this.flatten()}}o.create=e=>{let t=new o(e);return t};let l=(e,t)=>{let n;switch(e.code){case a.invalid_type:n=e.received===r.undefined?"Required":`Expected ${e.expected}, received ${e.received}`;break;case a.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,tt.jsonStringifyReplacer)}`;break;case a.unrecognized_keys:n=`Unrecognized key(s) in object: ${tt.joinValues(e.keys,", ")}`;break;case a.invalid_union:n="Invalid input";break;case a.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${tt.joinValues(e.options)}`;break;case a.invalid_enum_value:n=`Invalid enum value. Expected ${tt.joinValues(e.options)}, received '${e.received}'`;break;case a.invalid_arguments:n="Invalid function arguments";break;case a.invalid_return_type:n="Invalid function return type";break;case a.invalid_date:n="Invalid date";break;case a.invalid_string:"object"==typeof e.validation?"includes"in e.validation?(n=`Invalid input: must include "${e.validation.includes}"`,"number"==typeof e.validation.position&&(n=`${n} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?n=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?n=`Invalid input: must end with "${e.validation.endsWith}"`:tt.assertNever(e.validation):n="regex"!==e.validation?`Invalid ${e.validation}`:"Invalid";break;case a.too_small:n="array"===e.type?`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:"string"===e.type?`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:"number"===e.type?`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:"date"===e.type?`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:"Invalid input";break;case a.too_big:n="array"===e.type?`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:"string"===e.type?`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:"number"===e.type?`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:"bigint"===e.type?`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:"date"===e.type?`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:"Invalid input";break;case a.custom:n="Invalid input";break;case a.invalid_intersection_types:n="Intersection results could not be merged";break;case a.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case a.not_finite:n="Number must be finite";break;default:n=t.defaultError,tt.assertNever(e)}return{message:n}},u=l;function c(e){u=e}function d(){return u}let p=e=>{let{data:t,path:n,errorMaps:r,issueData:i}=e,a=[...n,...i.path||[]],s={...i,path:a},o="",l=r.filter(e=>!!e).slice().reverse();for(let u of l)o=u(s,{data:t,defaultError:o}).message;return{...i,path:a,message:i.message||o}};function h(e,t){let n=p({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,u,l].filter(e=>!!e)});e.common.issues.push(n)}class f{constructor(){this.value="valid"}dirty(){"valid"===this.value&&(this.value="dirty")}abort(){"aborted"!==this.value&&(this.value="aborted")}static mergeArray(e,t){let n=[];for(let r of t){if("aborted"===r.status)return m;"dirty"===r.status&&e.dirty(),n.push(r.value)}return{status:e.value,value:n}}static async mergeObjectAsync(e,t){let n=[];for(let r of t)n.push({key:await r.key,value:await r.value});return f.mergeObjectSync(e,n)}static mergeObjectSync(e,t){let n={};for(let r of t){let{key:i,value:a}=r;if("aborted"===i.status||"aborted"===a.status)return m;"dirty"===i.status&&e.dirty(),"dirty"===a.status&&e.dirty(),(void 0!==a.value||r.alwaysSet)&&(n[i.value]=a.value)}return{status:e.value,value:n}}}let m=Object.freeze({status:"aborted"}),g=e=>({status:"dirty",value:e}),v=e=>({status:"valid",value:e}),y=e=>"aborted"===e.status,_=e=>"dirty"===e.status,b=e=>"valid"===e.status,x=e=>"undefined"!=typeof Promise&&e instanceof Promise;(e6=tr||(tr={})).errToObj=e=>"string"==typeof e?{message:e}:e||{},e6.toString=e=>"string"==typeof e?e:null==e?void 0:e.message;class k{constructor(e,t,n,r){this._cachedPath=[],this.parent=e,this.data=t,this._path=n,this._key=r}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}let w=(e,t)=>{if(b(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;let n=new o(e.common.issues);return this._error=n,this._error}}};function T(e){if(!e)return{};let{errorMap:t,invalid_type_error:n,required_error:r,description:i}=e;if(t&&(n||r))throw Error('Can\'t use "invalid_type_error" or "required_error" in conjunction with custom error map.');if(t)return{errorMap:t,description:i};let a=(e,t)=>"invalid_type"!==e.code?{message:t.defaultError}:void 0===t.data?{message:null!=r?r:t.defaultError}:{message:null!=n?n:t.defaultError};return{errorMap:a,description:i}}class C{constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this)}get description(){return this._def.description}_getType(e){return i(e.data)}_getOrReturnCtx(e,t){return t||{common:e.parent.common,data:e.data,parsedType:i(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new f,ctx:{common:e.parent.common,data:e.data,parsedType:i(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){let t=this._parse(e);if(x(t))throw Error("Synchronous parse encountered promise.");return t}_parseAsync(e){let t=this._parse(e);return Promise.resolve(t)}parse(e,t){let n=this.safeParse(e,t);if(n.success)return n.data;throw n.error}safeParse(e,t){var n;let r={common:{issues:[],async:null!==(n=null==t?void 0:t.async)&&void 0!==n&&n,contextualErrorMap:null==t?void 0:t.errorMap},path:(null==t?void 0:t.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:i(e)},a=this._parseSync({data:e,path:r.path,parent:r});return w(r,a)}async parseAsync(e,t){let n=await this.safeParseAsync(e,t);if(n.success)return n.data;throw n.error}async safeParseAsync(e,t){let n={common:{issues:[],contextualErrorMap:null==t?void 0:t.errorMap,async:!0},path:(null==t?void 0:t.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:i(e)},r=this._parse({data:e,path:n.path,parent:n}),a=await (x(r)?r:Promise.resolve(r));return w(n,a)}refine(e,t){let n=e=>"string"==typeof t||void 0===t?{message:t}:"function"==typeof t?t(e):t;return this._refinement((t,r)=>{let i=e(t),s=()=>r.addIssue({code:a.custom,...n(t)});return"undefined"!=typeof Promise&&i instanceof Promise?i.then(e=>!!e||(s(),!1)):!!i||(s(),!1)})}refinement(e,t){return this._refinement((n,r)=>!!e(n)||(r.addIssue("function"==typeof t?t(n,r):t),!1))}_refinement(e){return new ep({schema:this,typeName:ti.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}optional(){return eh.create(this,this._def)}nullable(){return ef.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Y.create(this,this._def)}promise(){return ed.create(this,this._def)}or(e){return X.create([this,e],this._def)}and(e){return ee.create(this,e,this._def)}transform(e){return new ep({...T(this._def),schema:this,typeName:ti.ZodEffects,effect:{type:"transform",transform:e}})}default(e){return new em({...T(this._def),innerType:this,defaultValue:"function"==typeof e?e:()=>e,typeName:ti.ZodDefault})}brand(){return new e_({typeName:ti.ZodBranded,type:this,...T(this._def)})}catch(e){return new eg({...T(this._def),innerType:this,catchValue:"function"==typeof e?e:()=>e,typeName:ti.ZodCatch})}describe(e){let t=this.constructor;return new t({...this._def,description:e})}pipe(e){return eb.create(this,e)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}let E=/^c[^\s-]{8,}$/i,S=/^[a-z][a-z0-9]*$/,O=/[0-9A-HJKMNP-TV-Z]{26}/,R=/^([a-f0-9]{8}-[a-f0-9]{4}-[1-5][a-f0-9]{3}-[a-f0-9]{4}-[a-f0-9]{12}|00000000-0000-0000-0000-000000000000)$/i,N=/^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\])|(\[IPv6:(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))\])|([A-Za-z0-9]([A-Za-z0-9-]*[A-Za-z0-9])*(\.[A-Za-z]{2,})+))$/,P=/^(\p{Extended_Pictographic}|\p{Emoji_Component})+$/u,A=/^(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))$/,I=/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,j=e=>e.precision?e.offset?RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${e.precision}}(([+-]\\d{2}(:?\\d{2})?)|Z)$`):RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${e.precision}}Z$`):0===e.precision?e.offset?RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(([+-]\\d{2}(:?\\d{2})?)|Z)$"):RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}Z$"):e.offset?RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(([+-]\\d{2}(:?\\d{2})?)|Z)$"):RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?Z$");function Z(e,t){return!!(("v4"===t||!t)&&A.test(e)||("v6"===t||!t)&&I.test(e))}class M extends C{constructor(){super(...arguments),this._regex=(e,t,n)=>this.refinement(t=>e.test(t),{validation:t,code:a.invalid_string,...tr.errToObj(n)}),this.nonempty=e=>this.min(1,tr.errToObj(e)),this.trim=()=>new M({...this._def,checks:[...this._def.checks,{kind:"trim"}]}),this.toLowerCase=()=>new M({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]}),this.toUpperCase=()=>new M({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}_parse(e){this._def.coerce&&(e.data=String(e.data));let t=this._getType(e);if(t!==r.string){let n=this._getOrReturnCtx(e);return h(n,{code:a.invalid_type,expected:r.string,received:n.parsedType}),m}let i=new f,s;for(let o of this._def.checks)if("min"===o.kind)e.data.length<o.value&&(h(s=this._getOrReturnCtx(e,s),{code:a.too_small,minimum:o.value,type:"string",inclusive:!0,exact:!1,message:o.message}),i.dirty());else if("max"===o.kind)e.data.length>o.value&&(h(s=this._getOrReturnCtx(e,s),{code:a.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!1,message:o.message}),i.dirty());else if("length"===o.kind){let l=e.data.length>o.value,u=e.data.length<o.value;(l||u)&&(s=this._getOrReturnCtx(e,s),l?h(s,{code:a.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!0,message:o.message}):u&&h(s,{code:a.too_small,minimum:o.value,type:"string",inclusive:!0,exact:!0,message:o.message}),i.dirty())}else if("email"===o.kind)N.test(e.data)||(h(s=this._getOrReturnCtx(e,s),{validation:"email",code:a.invalid_string,message:o.message}),i.dirty());else if("emoji"===o.kind)P.test(e.data)||(h(s=this._getOrReturnCtx(e,s),{validation:"emoji",code:a.invalid_string,message:o.message}),i.dirty());else if("uuid"===o.kind)R.test(e.data)||(h(s=this._getOrReturnCtx(e,s),{validation:"uuid",code:a.invalid_string,message:o.message}),i.dirty());else if("cuid"===o.kind)E.test(e.data)||(h(s=this._getOrReturnCtx(e,s),{validation:"cuid",code:a.invalid_string,message:o.message}),i.dirty());else if("cuid2"===o.kind)S.test(e.data)||(h(s=this._getOrReturnCtx(e,s),{validation:"cuid2",code:a.invalid_string,message:o.message}),i.dirty());else if("ulid"===o.kind)O.test(e.data)||(h(s=this._getOrReturnCtx(e,s),{validation:"ulid",code:a.invalid_string,message:o.message}),i.dirty());else if("url"===o.kind)try{new URL(e.data)}catch(c){h(s=this._getOrReturnCtx(e,s),{validation:"url",code:a.invalid_string,message:o.message}),i.dirty()}else if("regex"===o.kind){o.regex.lastIndex=0;let d=o.regex.test(e.data);d||(h(s=this._getOrReturnCtx(e,s),{validation:"regex",code:a.invalid_string,message:o.message}),i.dirty())}else if("trim"===o.kind)e.data=e.data.trim();else if("includes"===o.kind)e.data.includes(o.value,o.position)||(h(s=this._getOrReturnCtx(e,s),{code:a.invalid_string,validation:{includes:o.value,position:o.position},message:o.message}),i.dirty());else if("toLowerCase"===o.kind)e.data=e.data.toLowerCase();else if("toUpperCase"===o.kind)e.data=e.data.toUpperCase();else if("startsWith"===o.kind)e.data.startsWith(o.value)||(h(s=this._getOrReturnCtx(e,s),{code:a.invalid_string,validation:{startsWith:o.value},message:o.message}),i.dirty());else if("endsWith"===o.kind)e.data.endsWith(o.value)||(h(s=this._getOrReturnCtx(e,s),{code:a.invalid_string,validation:{endsWith:o.value},message:o.message}),i.dirty());else if("datetime"===o.kind){let p=j(o);p.test(e.data)||(h(s=this._getOrReturnCtx(e,s),{code:a.invalid_string,validation:"datetime",message:o.message}),i.dirty())}else"ip"===o.kind?Z(e.data,o.version)||(h(s=this._getOrReturnCtx(e,s),{validation:"ip",code:a.invalid_string,message:o.message}),i.dirty()):tt.assertNever(o);return{status:i.value,value:e.data}}_addCheck(e){return new M({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...tr.errToObj(e)})}url(e){return this._addCheck({kind:"url",...tr.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...tr.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...tr.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...tr.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...tr.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...tr.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...tr.errToObj(e)})}datetime(e){var t;return"string"==typeof e?this._addCheck({kind:"datetime",precision:null,offset:!1,message:e}):this._addCheck({kind:"datetime",precision:void 0===(null==e?void 0:e.precision)?null:null==e?void 0:e.precision,offset:null!==(t=null==e?void 0:e.offset)&&void 0!==t&&t,...tr.errToObj(null==e?void 0:e.message)})}regex(e,t){return this._addCheck({kind:"regex",regex:e,...tr.errToObj(t)})}includes(e,t){return this._addCheck({kind:"includes",value:e,position:null==t?void 0:t.position,...tr.errToObj(null==t?void 0:t.message)})}startsWith(e,t){return this._addCheck({kind:"startsWith",value:e,...tr.errToObj(t)})}endsWith(e,t){return this._addCheck({kind:"endsWith",value:e,...tr.errToObj(t)})}min(e,t){return this._addCheck({kind:"min",value:e,...tr.errToObj(t)})}max(e,t){return this._addCheck({kind:"max",value:e,...tr.errToObj(t)})}length(e,t){return this._addCheck({kind:"length",value:e,...tr.errToObj(t)})}get isDatetime(){return!!this._def.checks.find(e=>"datetime"===e.kind)}get isEmail(){return!!this._def.checks.find(e=>"email"===e.kind)}get isURL(){return!!this._def.checks.find(e=>"url"===e.kind)}get isEmoji(){return!!this._def.checks.find(e=>"emoji"===e.kind)}get isUUID(){return!!this._def.checks.find(e=>"uuid"===e.kind)}get isCUID(){return!!this._def.checks.find(e=>"cuid"===e.kind)}get isCUID2(){return!!this._def.checks.find(e=>"cuid2"===e.kind)}get isULID(){return!!this._def.checks.find(e=>"ulid"===e.kind)}get isIP(){return!!this._def.checks.find(e=>"ip"===e.kind)}get minLength(){let e=null;for(let t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxLength(){let e=null;for(let t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return e}}function L(e,t){let n=(e.toString().split(".")[1]||"").length,r=(t.toString().split(".")[1]||"").length,i=n>r?n:r,a=parseInt(e.toFixed(i).replace(".","")),s=parseInt(t.toFixed(i).replace(".",""));return a%s/Math.pow(10,i)}M.create=e=>{var t;return new M({checks:[],typeName:ti.ZodString,coerce:null!==(t=null==e?void 0:e.coerce)&&void 0!==t&&t,...T(e)})};class D extends C{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){this._def.coerce&&(e.data=Number(e.data));let t=this._getType(e);if(t!==r.number){let n=this._getOrReturnCtx(e);return h(n,{code:a.invalid_type,expected:r.number,received:n.parsedType}),m}let i,s=new f;for(let o of this._def.checks)if("int"===o.kind)tt.isInteger(e.data)||(h(i=this._getOrReturnCtx(e,i),{code:a.invalid_type,expected:"integer",received:"float",message:o.message}),s.dirty());else if("min"===o.kind){let l=o.inclusive?e.data<o.value:e.data<=o.value;l&&(h(i=this._getOrReturnCtx(e,i),{code:a.too_small,minimum:o.value,type:"number",inclusive:o.inclusive,exact:!1,message:o.message}),s.dirty())}else if("max"===o.kind){let u=o.inclusive?e.data>o.value:e.data>=o.value;u&&(h(i=this._getOrReturnCtx(e,i),{code:a.too_big,maximum:o.value,type:"number",inclusive:o.inclusive,exact:!1,message:o.message}),s.dirty())}else"multipleOf"===o.kind?0!==L(e.data,o.value)&&(h(i=this._getOrReturnCtx(e,i),{code:a.not_multiple_of,multipleOf:o.value,message:o.message}),s.dirty()):"finite"===o.kind?Number.isFinite(e.data)||(h(i=this._getOrReturnCtx(e,i),{code:a.not_finite,message:o.message}),s.dirty()):tt.assertNever(o);return{status:s.value,value:e.data}}gte(e,t){return this.setLimit("min",e,!0,tr.toString(t))}gt(e,t){return this.setLimit("min",e,!1,tr.toString(t))}lte(e,t){return this.setLimit("max",e,!0,tr.toString(t))}lt(e,t){return this.setLimit("max",e,!1,tr.toString(t))}setLimit(e,t,n,r){return new D({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:n,message:tr.toString(r)},]})}_addCheck(e){return new D({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:tr.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:tr.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:tr.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:tr.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:tr.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:tr.toString(t)})}finite(e){return this._addCheck({kind:"finite",message:tr.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:tr.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:tr.toString(e)})}get minValue(){let e=null;for(let t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(let t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return e}get isInt(){return!!this._def.checks.find(e=>"int"===e.kind||"multipleOf"===e.kind&&tt.isInteger(e.value))}get isFinite(){let e=null,t=null;for(let n of this._def.checks){if("finite"===n.kind||"int"===n.kind||"multipleOf"===n.kind)return!0;"min"===n.kind?(null===t||n.value>t)&&(t=n.value):"max"===n.kind&&(null===e||n.value<e)&&(e=n.value)}return Number.isFinite(t)&&Number.isFinite(e)}}D.create=e=>new D({checks:[],typeName:ti.ZodNumber,coerce:(null==e?void 0:e.coerce)||!1,...T(e)});class z extends C{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){this._def.coerce&&(e.data=BigInt(e.data));let t=this._getType(e);if(t!==r.bigint){let n=this._getOrReturnCtx(e);return h(n,{code:a.invalid_type,expected:r.bigint,received:n.parsedType}),m}let i,s=new f;for(let o of this._def.checks)if("min"===o.kind){let l=o.inclusive?e.data<o.value:e.data<=o.value;l&&(h(i=this._getOrReturnCtx(e,i),{code:a.too_small,type:"bigint",minimum:o.value,inclusive:o.inclusive,message:o.message}),s.dirty())}else if("max"===o.kind){let u=o.inclusive?e.data>o.value:e.data>=o.value;u&&(h(i=this._getOrReturnCtx(e,i),{code:a.too_big,type:"bigint",maximum:o.value,inclusive:o.inclusive,message:o.message}),s.dirty())}else"multipleOf"===o.kind?e.data%o.value!==BigInt(0)&&(h(i=this._getOrReturnCtx(e,i),{code:a.not_multiple_of,multipleOf:o.value,message:o.message}),s.dirty()):tt.assertNever(o);return{status:s.value,value:e.data}}gte(e,t){return this.setLimit("min",e,!0,tr.toString(t))}gt(e,t){return this.setLimit("min",e,!1,tr.toString(t))}lte(e,t){return this.setLimit("max",e,!0,tr.toString(t))}lt(e,t){return this.setLimit("max",e,!1,tr.toString(t))}setLimit(e,t,n,r){return new z({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:n,message:tr.toString(r)},]})}_addCheck(e){return new z({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:tr.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:tr.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:tr.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:tr.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:tr.toString(t)})}get minValue(){let e=null;for(let t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(let t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return e}}z.create=e=>{var t;return new z({checks:[],typeName:ti.ZodBigInt,coerce:null!==(t=null==e?void 0:e.coerce)&&void 0!==t&&t,...T(e)})};class F extends C{_parse(e){this._def.coerce&&(e.data=Boolean(e.data));let t=this._getType(e);if(t!==r.boolean){let n=this._getOrReturnCtx(e);return h(n,{code:a.invalid_type,expected:r.boolean,received:n.parsedType}),m}return v(e.data)}}F.create=e=>new F({typeName:ti.ZodBoolean,coerce:(null==e?void 0:e.coerce)||!1,...T(e)});class V extends C{_parse(e){this._def.coerce&&(e.data=new Date(e.data));let t=this._getType(e);if(t!==r.date){let n=this._getOrReturnCtx(e);return h(n,{code:a.invalid_type,expected:r.date,received:n.parsedType}),m}if(isNaN(e.data.getTime())){let i=this._getOrReturnCtx(e);return h(i,{code:a.invalid_date}),m}let s=new f,o;for(let l of this._def.checks)"min"===l.kind?e.data.getTime()<l.value&&(h(o=this._getOrReturnCtx(e,o),{code:a.too_small,message:l.message,inclusive:!0,exact:!1,minimum:l.value,type:"date"}),s.dirty()):"max"===l.kind?e.data.getTime()>l.value&&(h(o=this._getOrReturnCtx(e,o),{code:a.too_big,message:l.message,inclusive:!0,exact:!1,maximum:l.value,type:"date"}),s.dirty()):tt.assertNever(l);return{status:s.value,value:new Date(e.data.getTime())}}_addCheck(e){return new V({...this._def,checks:[...this._def.checks,e]})}min(e,t){return this._addCheck({kind:"min",value:e.getTime(),message:tr.toString(t)})}max(e,t){return this._addCheck({kind:"max",value:e.getTime(),message:tr.toString(t)})}get minDate(){let e=null;for(let t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return null!=e?new Date(e):null}get maxDate(){let e=null;for(let t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return null!=e?new Date(e):null}}V.create=e=>new V({checks:[],coerce:(null==e?void 0:e.coerce)||!1,typeName:ti.ZodDate,...T(e)});class $ extends C{_parse(e){let t=this._getType(e);if(t!==r.symbol){let n=this._getOrReturnCtx(e);return h(n,{code:a.invalid_type,expected:r.symbol,received:n.parsedType}),m}return v(e.data)}}$.create=e=>new $({typeName:ti.ZodSymbol,...T(e)});class B extends C{_parse(e){let t=this._getType(e);if(t!==r.undefined){let n=this._getOrReturnCtx(e);return h(n,{code:a.invalid_type,expected:r.undefined,received:n.parsedType}),m}return v(e.data)}}B.create=e=>new B({typeName:ti.ZodUndefined,...T(e)});class U extends C{_parse(e){let t=this._getType(e);if(t!==r.null){let n=this._getOrReturnCtx(e);return h(n,{code:a.invalid_type,expected:r.null,received:n.parsedType}),m}return v(e.data)}}U.create=e=>new U({typeName:ti.ZodNull,...T(e)});class q extends C{constructor(){super(...arguments),this._any=!0}_parse(e){return v(e.data)}}q.create=e=>new q({typeName:ti.ZodAny,...T(e)});class W extends C{constructor(){super(...arguments),this._unknown=!0}_parse(e){return v(e.data)}}W.create=e=>new W({typeName:ti.ZodUnknown,...T(e)});class H extends C{_parse(e){let t=this._getOrReturnCtx(e);return h(t,{code:a.invalid_type,expected:r.never,received:t.parsedType}),m}}H.create=e=>new H({typeName:ti.ZodNever,...T(e)});class K extends C{_parse(e){let t=this._getType(e);if(t!==r.undefined){let n=this._getOrReturnCtx(e);return h(n,{code:a.invalid_type,expected:r.void,received:n.parsedType}),m}return v(e.data)}}K.create=e=>new K({typeName:ti.ZodVoid,...T(e)});class Y extends C{_parse(e){let{ctx:t,status:n}=this._processInputParams(e),i=this._def;if(t.parsedType!==r.array)return h(t,{code:a.invalid_type,expected:r.array,received:t.parsedType}),m;if(null!==i.exactLength){let s=t.data.length>i.exactLength.value,o=t.data.length<i.exactLength.value;(s||o)&&(h(t,{code:s?a.too_big:a.too_small,minimum:o?i.exactLength.value:void 0,maximum:s?i.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:i.exactLength.message}),n.dirty())}if(null!==i.minLength&&t.data.length<i.minLength.value&&(h(t,{code:a.too_small,minimum:i.minLength.value,type:"array",inclusive:!0,exact:!1,message:i.minLength.message}),n.dirty()),null!==i.maxLength&&t.data.length>i.maxLength.value&&(h(t,{code:a.too_big,maximum:i.maxLength.value,type:"array",inclusive:!0,exact:!1,message:i.maxLength.message}),n.dirty()),t.common.async)return Promise.all([...t.data].map((e,n)=>i.type._parseAsync(new k(t,e,t.path,n)))).then(e=>f.mergeArray(n,e));let l=[...t.data].map((e,n)=>i.type._parseSync(new k(t,e,t.path,n)));return f.mergeArray(n,l)}get element(){return this._def.type}min(e,t){return new Y({...this._def,minLength:{value:e,message:tr.toString(t)}})}max(e,t){return new Y({...this._def,maxLength:{value:e,message:tr.toString(t)}})}length(e,t){return new Y({...this._def,exactLength:{value:e,message:tr.toString(t)}})}nonempty(e){return this.min(1,e)}}Y.create=(e,t)=>new Y({type:e,minLength:null,maxLength:null,exactLength:null,typeName:ti.ZodArray,...T(t)});class G extends C{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(null!==this._cached)return this._cached;let e=this._def.shape(),t=tt.objectKeys(e);return this._cached={shape:e,keys:t}}_parse(e){let t=this._getType(e);if(t!==r.object){let n=this._getOrReturnCtx(e);return h(n,{code:a.invalid_type,expected:r.object,received:n.parsedType}),m}let{status:i,ctx:s}=this._processInputParams(e),{shape:o,keys:l}=this._getCached(),u=[];if(!(this._def.catchall instanceof H&&"strip"===this._def.unknownKeys))for(let c in s.data)l.includes(c)||u.push(c);let d=[];for(let p of l){let g=o[p],v=s.data[p];d.push({key:{status:"valid",value:p},value:g._parse(new k(s,v,s.path,p)),alwaysSet:p in s.data})}if(this._def.catchall instanceof H){let y=this._def.unknownKeys;if("passthrough"===y)for(let _ of u)d.push({key:{status:"valid",value:_},value:{status:"valid",value:s.data[_]}});else if("strict"===y)u.length>0&&(h(s,{code:a.unrecognized_keys,keys:u}),i.dirty());else if("strip"===y);else throw Error("Internal ZodObject error: invalid unknownKeys value.")}else{let b=this._def.catchall;for(let x of u){let w=s.data[x];d.push({key:{status:"valid",value:x},value:b._parse(new k(s,w,s.path,x)),alwaysSet:x in s.data})}}return s.common.async?Promise.resolve().then(async()=>{let e=[];for(let t of d){let n=await t.key;e.push({key:n,value:await t.value,alwaysSet:t.alwaysSet})}return e}).then(e=>f.mergeObjectSync(i,e)):f.mergeObjectSync(i,d)}get shape(){return this._def.shape()}strict(e){return tr.errToObj,new G({...this._def,unknownKeys:"strict",...void 0!==e?{errorMap:(t,n)=>{var r,i,a,s;let o=null!==(a=null===(i=(r=this._def).errorMap)||void 0===i?void 0:i.call(r,t,n).message)&&void 0!==a?a:n.defaultError;return"unrecognized_keys"===t.code?{message:null!==(s=tr.errToObj(e).message)&&void 0!==s?s:o}:{message:o}}}:{}})}strip(){return new G({...this._def,unknownKeys:"strip"})}passthrough(){return new G({...this._def,unknownKeys:"passthrough"})}extend(e){return new G({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){let t=new G({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:ti.ZodObject});return t}setKey(e,t){return this.augment({[e]:t})}catchall(e){return new G({...this._def,catchall:e})}pick(e){let t={};return tt.objectKeys(e).forEach(n=>{e[n]&&this.shape[n]&&(t[n]=this.shape[n])}),new G({...this._def,shape:()=>t})}omit(e){let t={};return tt.objectKeys(this.shape).forEach(n=>{e[n]||(t[n]=this.shape[n])}),new G({...this._def,shape:()=>t})}deepPartial(){return function e(t){if(t instanceof G){let n={};for(let r in t.shape){let i=t.shape[r];n[r]=eh.create(e(i))}return new G({...t._def,shape:()=>n})}if(t instanceof Y)return new Y({...t._def,type:e(t.element)});if(t instanceof eh)return eh.create(e(t.unwrap()));if(t instanceof ef)return ef.create(e(t.unwrap()));if(t instanceof et)return et.create(t.items.map(t=>e(t)));else return t}(this)}partial(e){let t={};return tt.objectKeys(this.shape).forEach(n=>{let r=this.shape[n];e&&!e[n]?t[n]=r:t[n]=r.optional()}),new G({...this._def,shape:()=>t})}required(e){let t={};return tt.objectKeys(this.shape).forEach(n=>{if(e&&!e[n])t[n]=this.shape[n];else{let r=this.shape[n],i=r;for(;i instanceof eh;)i=i._def.innerType;t[n]=i}}),new G({...this._def,shape:()=>t})}keyof(){return el(tt.objectKeys(this.shape))}}G.create=(e,t)=>new G({shape:()=>e,unknownKeys:"strip",catchall:H.create(),typeName:ti.ZodObject,...T(t)}),G.strictCreate=(e,t)=>new G({shape:()=>e,unknownKeys:"strict",catchall:H.create(),typeName:ti.ZodObject,...T(t)}),G.lazycreate=(e,t)=>new G({shape:e,unknownKeys:"strip",catchall:H.create(),typeName:ti.ZodObject,...T(t)});class X extends C{_parse(e){let{ctx:t}=this._processInputParams(e),n=this._def.options;if(t.common.async)return Promise.all(n.map(async e=>{let n={...t,common:{...t.common,issues:[]},parent:null};return{result:await e._parseAsync({data:t.data,path:t.path,parent:n}),ctx:n}})).then(function(e){for(let n of e)if("valid"===n.result.status)return n.result;for(let r of e)if("dirty"===r.result.status)return t.common.issues.push(...r.ctx.common.issues),r.result;let i=e.map(e=>new o(e.ctx.common.issues));return h(t,{code:a.invalid_union,unionErrors:i}),m});{let r,i=[];for(let s of n){let l={...t,common:{...t.common,issues:[]},parent:null},u=s._parseSync({data:t.data,path:t.path,parent:l});if("valid"===u.status)return u;"dirty"!==u.status||r||(r={result:u,ctx:l}),l.common.issues.length&&i.push(l.common.issues)}if(r)return t.common.issues.push(...r.ctx.common.issues),r.result;let c=i.map(e=>new o(e));return h(t,{code:a.invalid_union,unionErrors:c}),m}}get options(){return this._def.options}}X.create=(e,t)=>new X({options:e,typeName:ti.ZodUnion,...T(t)});let J=e=>{if(e instanceof es)return J(e.schema);if(e instanceof ep)return J(e.innerType());if(e instanceof eo)return[e.value];if(e instanceof eu)return e.options;if(e instanceof ec)return Object.keys(e.enum);else if(e instanceof em)return J(e._def.innerType);else if(e instanceof B)return[void 0];else if(e instanceof U)return[null];else return null};class Q extends C{_parse(e){let{ctx:t}=this._processInputParams(e);if(t.parsedType!==r.object)return h(t,{code:a.invalid_type,expected:r.object,received:t.parsedType}),m;let n=this.discriminator,i=t.data[n],s=this.optionsMap.get(i);return s?t.common.async?s._parseAsync({data:t.data,path:t.path,parent:t}):s._parseSync({data:t.data,path:t.path,parent:t}):(h(t,{code:a.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[n]}),m)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,t,n){let r=new Map;for(let i of t){let a=J(i.shape[e]);if(!a)throw Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(let s of a){if(r.has(s))throw Error(`Discriminator property ${String(e)} has duplicate value ${String(s)}`);r.set(s,i)}}return new Q({typeName:ti.ZodDiscriminatedUnion,discriminator:e,options:t,optionsMap:r,...T(n)})}}class ee extends C{_parse(e){let{status:t,ctx:n}=this._processInputParams(e),s=(e,s)=>{if(y(e)||y(s))return m;let o=function e(t,n){let a=i(t),s=i(n);if(t===n)return{valid:!0,data:t};if(a===r.object&&s===r.object){let o=tt.objectKeys(n),l=tt.objectKeys(t).filter(e=>-1!==o.indexOf(e)),u={...t,...n};for(let c of l){let d=e(t[c],n[c]);if(!d.valid)return{valid:!1};u[c]=d.data}return{valid:!0,data:u}}if(a===r.array&&s===r.array){if(t.length!==n.length)return{valid:!1};let p=[];for(let h=0;h<t.length;h++){let f=t[h],m=n[h],g=e(f,m);if(!g.valid)return{valid:!1};p.push(g.data)}return{valid:!0,data:p}}if(a===r.date&&s===r.date&&+t==+n)return{valid:!0,data:t};return{valid:!1}}(e.value,s.value);return o.valid?((_(e)||_(s))&&t.dirty(),{status:t.value,value:o.data}):(h(n,{code:a.invalid_intersection_types}),m)};return n.common.async?Promise.all([this._def.left._parseAsync({data:n.data,path:n.path,parent:n}),this._def.right._parseAsync({data:n.data,path:n.path,parent:n}),]).then(([e,t])=>s(e,t)):s(this._def.left._parseSync({data:n.data,path:n.path,parent:n}),this._def.right._parseSync({data:n.data,path:n.path,parent:n}))}}ee.create=(e,t,n)=>new ee({left:e,right:t,typeName:ti.ZodIntersection,...T(n)});class et extends C{_parse(e){let{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==r.array)return h(n,{code:a.invalid_type,expected:r.array,received:n.parsedType}),m;if(n.data.length<this._def.items.length)return h(n,{code:a.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),m;let i=this._def.rest;!i&&n.data.length>this._def.items.length&&(h(n,{code:a.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),t.dirty());let s=[...n.data].map((e,t)=>{let r=this._def.items[t]||this._def.rest;return r?r._parse(new k(n,e,n.path,t)):null}).filter(e=>!!e);return n.common.async?Promise.all(s).then(e=>f.mergeArray(t,e)):f.mergeArray(t,s)}get items(){return this._def.items}rest(e){return new et({...this._def,rest:e})}}et.create=(e,t)=>{if(!Array.isArray(e))throw Error("You must pass an array of schemas to z.tuple([ ... ])");return new et({items:e,typeName:ti.ZodTuple,rest:null,...T(t)})};class en extends C{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==r.object)return h(n,{code:a.invalid_type,expected:r.object,received:n.parsedType}),m;let i=[],s=this._def.keyType,o=this._def.valueType;for(let l in n.data)i.push({key:s._parse(new k(n,l,n.path,l)),value:o._parse(new k(n,n.data[l],n.path,l))});return n.common.async?f.mergeObjectAsync(t,i):f.mergeObjectSync(t,i)}get element(){return this._def.valueType}static create(e,t,n){return new en(t instanceof C?{keyType:e,valueType:t,typeName:ti.ZodRecord,...T(n)}:{keyType:M.create(),valueType:e,typeName:ti.ZodRecord,...T(t)})}}class er extends C{_parse(e){let{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==r.map)return h(n,{code:a.invalid_type,expected:r.map,received:n.parsedType}),m;let i=this._def.keyType,s=this._def.valueType,o=[...n.data.entries()].map(([e,t],r)=>({key:i._parse(new k(n,e,n.path,[r,"key"])),value:s._parse(new k(n,t,n.path,[r,"value"]))}));if(n.common.async){let l=new Map;return Promise.resolve().then(async()=>{for(let e of o){let n=await e.key,r=await e.value;if("aborted"===n.status||"aborted"===r.status)return m;("dirty"===n.status||"dirty"===r.status)&&t.dirty(),l.set(n.value,r.value)}return{status:t.value,value:l}})}{let u=new Map;for(let c of o){let d=c.key,p=c.value;if("aborted"===d.status||"aborted"===p.status)return m;("dirty"===d.status||"dirty"===p.status)&&t.dirty(),u.set(d.value,p.value)}return{status:t.value,value:u}}}}er.create=(e,t,n)=>new er({valueType:t,keyType:e,typeName:ti.ZodMap,...T(n)});class ei extends C{_parse(e){let{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==r.set)return h(n,{code:a.invalid_type,expected:r.set,received:n.parsedType}),m;let i=this._def;null!==i.minSize&&n.data.size<i.minSize.value&&(h(n,{code:a.too_small,minimum:i.minSize.value,type:"set",inclusive:!0,exact:!1,message:i.minSize.message}),t.dirty()),null!==i.maxSize&&n.data.size>i.maxSize.value&&(h(n,{code:a.too_big,maximum:i.maxSize.value,type:"set",inclusive:!0,exact:!1,message:i.maxSize.message}),t.dirty());let s=this._def.valueType;function o(e){let n=new Set;for(let r of e){if("aborted"===r.status)return m;"dirty"===r.status&&t.dirty(),n.add(r.value)}return{status:t.value,value:n}}let l=[...n.data.values()].map((e,t)=>s._parse(new k(n,e,n.path,t)));return n.common.async?Promise.all(l).then(e=>o(e)):o(l)}min(e,t){return new ei({...this._def,minSize:{value:e,message:tr.toString(t)}})}max(e,t){return new ei({...this._def,maxSize:{value:e,message:tr.toString(t)}})}size(e,t){return this.min(e,t).max(e,t)}nonempty(e){return this.min(1,e)}}ei.create=(e,t)=>new ei({valueType:e,minSize:null,maxSize:null,typeName:ti.ZodSet,...T(t)});class ea extends C{constructor(){super(...arguments),this.validate=this.implement}_parse(e){let{ctx:t}=this._processInputParams(e);if(t.parsedType!==r.function)return h(t,{code:a.invalid_type,expected:r.function,received:t.parsedType}),m;function n(e,n){return p({data:e,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,u,l,].filter(e=>!!e),issueData:{code:a.invalid_arguments,argumentsError:n}})}function i(e,n){return p({data:e,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,u,l,].filter(e=>!!e),issueData:{code:a.invalid_return_type,returnTypeError:n}})}let s={errorMap:t.common.contextualErrorMap},c=t.data;return this._def.returns instanceof ed?v(async(...e)=>{let t=new o([]),r=await this._def.args.parseAsync(e,s).catch(r=>{throw t.addIssue(n(e,r)),t}),a=await c(...r),l=await this._def.returns._def.type.parseAsync(a,s).catch(e=>{throw t.addIssue(i(a,e)),t});return l}):v((...e)=>{let t=this._def.args.safeParse(e,s);if(!t.success)throw new o([n(e,t.error)]);let r=c(...t.data),a=this._def.returns.safeParse(r,s);if(!a.success)throw new o([i(r,a.error)]);return a.data})}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new ea({...this._def,args:et.create(e).rest(W.create())})}returns(e){return new ea({...this._def,returns:e})}implement(e){let t=this.parse(e);return t}strictImplement(e){let t=this.parse(e);return t}static create(e,t,n){return new ea({args:e||et.create([]).rest(W.create()),returns:t||W.create(),typeName:ti.ZodFunction,...T(n)})}}class es extends C{get schema(){return this._def.getter()}_parse(e){let{ctx:t}=this._processInputParams(e),n=this._def.getter();return n._parse({data:t.data,path:t.path,parent:t})}}es.create=(e,t)=>new es({getter:e,typeName:ti.ZodLazy,...T(t)});class eo extends C{_parse(e){if(e.data!==this._def.value){let t=this._getOrReturnCtx(e);return h(t,{received:t.data,code:a.invalid_literal,expected:this._def.value}),m}return{status:"valid",value:e.data}}get value(){return this._def.value}}function el(e,t){return new eu({values:e,typeName:ti.ZodEnum,...T(t)})}eo.create=(e,t)=>new eo({value:e,typeName:ti.ZodLiteral,...T(t)});class eu extends C{_parse(e){if("string"!=typeof e.data){let t=this._getOrReturnCtx(e),n=this._def.values;return h(t,{expected:tt.joinValues(n),received:t.parsedType,code:a.invalid_type}),m}if(-1===this._def.values.indexOf(e.data)){let r=this._getOrReturnCtx(e),i=this._def.values;return h(r,{received:r.data,code:a.invalid_enum_value,options:i}),m}return v(e.data)}get options(){return this._def.values}get enum(){let e={};for(let t of this._def.values)e[t]=t;return e}get Values(){let e={};for(let t of this._def.values)e[t]=t;return e}get Enum(){let e={};for(let t of this._def.values)e[t]=t;return e}extract(e){return eu.create(e)}exclude(e){return eu.create(this.options.filter(t=>!e.includes(t)))}}eu.create=el;class ec extends C{_parse(e){let t=tt.getValidEnumValues(this._def.values),n=this._getOrReturnCtx(e);if(n.parsedType!==r.string&&n.parsedType!==r.number){let i=tt.objectValues(t);return h(n,{expected:tt.joinValues(i),received:n.parsedType,code:a.invalid_type}),m}if(-1===t.indexOf(e.data)){let s=tt.objectValues(t);return h(n,{received:n.data,code:a.invalid_enum_value,options:s}),m}return v(e.data)}get enum(){return this._def.values}}ec.create=(e,t)=>new ec({values:e,typeName:ti.ZodNativeEnum,...T(t)});class ed extends C{unwrap(){return this._def.type}_parse(e){let{ctx:t}=this._processInputParams(e);if(t.parsedType!==r.promise&&!1===t.common.async)return h(t,{code:a.invalid_type,expected:r.promise,received:t.parsedType}),m;let n=t.parsedType===r.promise?t.data:Promise.resolve(t.data);return v(n.then(e=>this._def.type.parseAsync(e,{path:t.path,errorMap:t.common.contextualErrorMap})))}}ed.create=(e,t)=>new ed({type:e,typeName:ti.ZodPromise,...T(t)});class ep extends C{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===ti.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){let{status:t,ctx:n}=this._processInputParams(e),r=this._def.effect||null;if("preprocess"===r.type){let i=r.transform(n.data);return n.common.async?Promise.resolve(i).then(e=>this._def.schema._parseAsync({data:e,path:n.path,parent:n})):this._def.schema._parseSync({data:i,path:n.path,parent:n})}let a={addIssue(e){h(n,e),e.fatal?t.abort():t.dirty()},get path(){return n.path}};if(a.addIssue=a.addIssue.bind(a),"refinement"===r.type){let s=e=>{let t=r.refinement(e,a);if(n.common.async)return Promise.resolve(t);if(t instanceof Promise)throw Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return e};if(!1!==n.common.async)return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(e=>"aborted"===e.status?m:("dirty"===e.status&&t.dirty(),s(e.value).then(()=>({status:t.value,value:e.value}))));{let o=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});return"aborted"===o.status?m:("dirty"===o.status&&t.dirty(),s(o.value),{status:t.value,value:o.value})}}if("transform"===r.type){if(!1!==n.common.async)return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(e=>b(e)?Promise.resolve(r.transform(e.value,a)).then(e=>({status:t.value,value:e})):e);{let l=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});if(!b(l))return l;let u=r.transform(l.value,a);if(u instanceof Promise)throw Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:t.value,value:u}}}tt.assertNever(r)}}ep.create=(e,t,n)=>new ep({schema:e,typeName:ti.ZodEffects,effect:t,...T(n)}),ep.createWithPreprocess=(e,t,n)=>new ep({schema:t,effect:{type:"preprocess",transform:e},typeName:ti.ZodEffects,...T(n)});class eh extends C{_parse(e){let t=this._getType(e);return t===r.undefined?v(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}eh.create=(e,t)=>new eh({innerType:e,typeName:ti.ZodOptional,...T(t)});class ef extends C{_parse(e){let t=this._getType(e);return t===r.null?v(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}ef.create=(e,t)=>new ef({innerType:e,typeName:ti.ZodNullable,...T(t)});class em extends C{_parse(e){let{ctx:t}=this._processInputParams(e),n=t.data;return t.parsedType===r.undefined&&(n=this._def.defaultValue()),this._def.innerType._parse({data:n,path:t.path,parent:t})}removeDefault(){return this._def.innerType}}em.create=(e,t)=>new em({innerType:e,typeName:ti.ZodDefault,defaultValue:"function"==typeof t.default?t.default:()=>t.default,...T(t)});class eg extends C{_parse(e){let{ctx:t}=this._processInputParams(e),n={...t,common:{...t.common,issues:[]}},r=this._def.innerType._parse({data:n.data,path:n.path,parent:{...n}});return x(r)?r.then(e=>({status:"valid",value:"valid"===e.status?e.value:this._def.catchValue({get error(){return new o(n.common.issues)},input:n.data})})):{status:"valid",value:"valid"===r.status?r.value:this._def.catchValue({get error(){return new o(n.common.issues)},input:n.data})}}removeCatch(){return this._def.innerType}}eg.create=(e,t)=>new eg({innerType:e,typeName:ti.ZodCatch,catchValue:"function"==typeof t.catch?t.catch:()=>t.catch,...T(t)});class ev extends C{_parse(e){let t=this._getType(e);if(t!==r.nan){let n=this._getOrReturnCtx(e);return h(n,{code:a.invalid_type,expected:r.nan,received:n.parsedType}),m}return{status:"valid",value:e.data}}}ev.create=e=>new ev({typeName:ti.ZodNaN,...T(e)});let ey=Symbol("zod_brand");class e_ extends C{_parse(e){let{ctx:t}=this._processInputParams(e),n=t.data;return this._def.type._parse({data:n,path:t.path,parent:t})}unwrap(){return this._def.type}}class eb extends C{_parse(e){let{status:t,ctx:n}=this._processInputParams(e);if(n.common.async){let r=async()=>{let e=await this._def.in._parseAsync({data:n.data,path:n.path,parent:n});return"aborted"===e.status?m:"dirty"===e.status?(t.dirty(),g(e.value)):this._def.out._parseAsync({data:e.value,path:n.path,parent:n})};return r()}{let i=this._def.in._parseSync({data:n.data,path:n.path,parent:n});return"aborted"===i.status?m:"dirty"===i.status?(t.dirty(),{status:"dirty",value:i.value}):this._def.out._parseSync({data:i.value,path:n.path,parent:n})}}static create(e,t){return new eb({in:e,out:t,typeName:ti.ZodPipeline})}}let ex=(e,t={},n)=>e?q.create().superRefine((r,i)=>{var a,s;if(!e(r)){let o="function"==typeof t?t(r):"string"==typeof t?{message:t}:t,l=null===(s=null!==(a=o.fatal)&&void 0!==a?a:n)||void 0===s||s;i.addIssue({code:"custom",..."string"==typeof o?{message:o}:o,fatal:l})}}):q.create(),ek={object:G.lazycreate};(te=ti||(ti={})).ZodString="ZodString",te.ZodNumber="ZodNumber",te.ZodNaN="ZodNaN",te.ZodBigInt="ZodBigInt",te.ZodBoolean="ZodBoolean",te.ZodDate="ZodDate",te.ZodSymbol="ZodSymbol",te.ZodUndefined="ZodUndefined",te.ZodNull="ZodNull",te.ZodAny="ZodAny",te.ZodUnknown="ZodUnknown",te.ZodNever="ZodNever",te.ZodVoid="ZodVoid",te.ZodArray="ZodArray",te.ZodObject="ZodObject",te.ZodUnion="ZodUnion",te.ZodDiscriminatedUnion="ZodDiscriminatedUnion",te.ZodIntersection="ZodIntersection",te.ZodTuple="ZodTuple",te.ZodRecord="ZodRecord",te.ZodMap="ZodMap",te.ZodSet="ZodSet",te.ZodFunction="ZodFunction",te.ZodLazy="ZodLazy",te.ZodLiteral="ZodLiteral",te.ZodEnum="ZodEnum",te.ZodEffects="ZodEffects",te.ZodNativeEnum="ZodNativeEnum",te.ZodOptional="ZodOptional",te.ZodNullable="ZodNullable",te.ZodDefault="ZodDefault",te.ZodCatch="ZodCatch",te.ZodPromise="ZodPromise",te.ZodBranded="ZodBranded",te.ZodPipeline="ZodPipeline";let ew=(e,t={message:`Input not instance of ${e.name}`})=>ex(t=>t instanceof e,t),eT=M.create,eC=D.create,eE=ev.create,eS=z.create,eO=F.create,eR=V.create,eN=$.create,eP=B.create,eA=U.create,eI=q.create,ej=W.create,eZ=H.create,eM=K.create,eL=Y.create,eD=G.create,ez=G.strictCreate,eF=X.create,eV=Q.create,e$=ee.create,eB=et.create,eU=en.create,eq=er.create,eW=ei.create,eH=ea.create,eK=es.create,eY=eo.create,eG=eu.create,eX=ec.create,eJ=ed.create,eQ=ep.create,e0=eh.create,e1=ef.create,e2=ep.createWithPreprocess,e9=eb.create,e4=()=>eT().optional(),e3=()=>eC().optional(),e5=()=>eO().optional();var e8,e7,e6,te,tt,tn,tr,ti,ta=Object.freeze({__proto__:null,defaultErrorMap:l,setErrorMap:c,getErrorMap:d,makeIssue:p,EMPTY_PATH:[],addIssueToContext:h,ParseStatus:f,INVALID:m,DIRTY:g,OK:v,isAborted:y,isDirty:_,isValid:b,isAsync:x,get util(){return tt},get objectUtil(){return tn},ZodParsedType:r,getParsedType:i,ZodType:C,ZodString:M,ZodNumber:D,ZodBigInt:z,ZodBoolean:F,ZodDate:V,ZodSymbol:$,ZodUndefined:B,ZodNull:U,ZodAny:q,ZodUnknown:W,ZodNever:H,ZodVoid:K,ZodArray:Y,ZodObject:G,ZodUnion:X,ZodDiscriminatedUnion:Q,ZodIntersection:ee,ZodTuple:et,ZodRecord:en,ZodMap:er,ZodSet:ei,ZodFunction:ea,ZodLazy:es,ZodLiteral:eo,ZodEnum:eu,ZodNativeEnum:ec,ZodPromise:ed,ZodEffects:ep,ZodTransformer:ep,ZodOptional:eh,ZodNullable:ef,ZodDefault:em,ZodCatch:eg,ZodNaN:ev,BRAND:ey,ZodBranded:e_,ZodPipeline:eb,custom:ex,Schema:C,ZodSchema:C,late:ek,get ZodFirstPartyTypeKind(){return ti},coerce:{string:e=>M.create({...e,coerce:!0}),number:e=>D.create({...e,coerce:!0}),boolean:e=>F.create({...e,coerce:!0}),bigint:e=>z.create({...e,coerce:!0}),date:e=>V.create({...e,coerce:!0})},any:eI,array:eL,bigint:eS,boolean:eO,date:eR,discriminatedUnion:eV,effect:eQ,enum:eG,function:eH,instanceof:ew,intersection:e$,lazy:eK,literal:eY,map:eq,nan:eE,nativeEnum:eX,never:eZ,null:eA,nullable:e1,number:eC,object:eD,oboolean:e5,onumber:e3,optional:e0,ostring:e4,pipeline:e9,preprocess:e2,promise:eJ,record:eU,set:eW,strictObject:ez,string:eT,symbol:eN,transformer:eQ,tuple:eB,undefined:eP,union:eF,unknown:ej,void:eM,NEVER:m,ZodIssueCode:a,quotelessJson:s,ZodError:o}),ts=n(80832),to=n(19245);let tl=eV("status",[eD({status:eY("unclassified")}),eD({status:eY("published")}),eD({status:eY("release"),release_id:eT()}),eD({status:eY("archived")})]).and(eD({version_id:eT(),tags:eL(eT()),custom_type_label:eT(),preview_summary:eT().optional(),preview_image:eT().optional()})),tu=eD({id:eT(),custom_type_id:eT(),title:eT(),versions:eL(tl),locale:eT(),group_lang_id:eT()}),tc=eD({total:eC(),cursor:eT().optional(),results:eL(tu)});function td(e,t,n,r,i){let a=new URLSearchParams({limit:i.toString(),...t&&{cursor:t}});return(0,to.WY)(`${e}/documents?${a.toString()}&${r}`,{credentials:(0,to.xb)(n),okType:tc})}function tp(e){return e.reduce((e,t)=>{let n=t.values.map(e=>[t.name,e]);return e.concat(n)},[])}let th=eD({id:eT(),title:eT(),versions:ta.array(tl)});function tf(e,t,n){return(0,to.WY)(`${e}/documents/${n}`,{credentials:(0,to.xb)(t),okType:th})}let tm=eD({id:eT(),name:eT(),is_master:eO()}),tg=eD({simulator_url:eT().url().nullish(),languages:eL(tm).transform(e=>(0,ts.DY)(e,e=>e.name))});function tv(e,t){return(0,to.WY)(e,{credentials:(0,to.xb)(t),okType:tg})}let ty={unclassified:["unclassified","published"],archived:["unclassified","published"],release:["published"],published:["published"]}},34234:function(e,t,n){"use strict";function r(e,t){for(let n of e)if(t(n))return!0;return!1}function i(e,t){let n=new Set;for(let r of e.values())n.add(t(r));return n}function a(e){let t=e.values().next();if(!t.done)return t.value}function s(...e){return e.reduce((e,t)=>new Set([...e,...t]),new Set)}function o(e,t){for(let n of e)if(t(n))return n}n.d(t,{G:function(){return r},G0:function(){return s},Ps:function(){return a},UI:function(){return i},sE:function(){return o}})},68865:function(e,t,n){"use strict";n.d(t,{Fs:function(){return u},QT:function(){return a},U9:function(){return p},VA:function(){return s}});var r=n(2784),i=n(32001);function a(e,t){(function(e,t){let n=(0,i.NW)();(0,r.useEffect)(()=>{let r=l.getFetcherConfig(e).revalidationStrategy;if((null==r?void 0:r.type)!=="never"&&null!=r&&r.onFocus)return document.addEventListener("visibilitychange",i),()=>document.removeEventListener("visibilitychange",i);function i(){if("hidden"===document.visibilityState)return;let r=l.get(e,t);if(!r||"fetched"!==r.state)return;let i=e(...t);r.ok?l.set(e,t,{state:"revalidating",promise:i,ok:!0,body:r.body}):l.set(e,t,{state:"revalidating",promise:i,ok:!1,error:r.error}),o(e,t,i).then(n).catch(()=>null)}})})(e,t),function(e,t){let n=(0,i.NW)(),a=c(e,t);(0,r.useEffect)(()=>{function t(t,r){if(e!==t)return;let i=c(e,r);a===i&&n()}return d.push(t),()=>{let e=d.indexOf(t);d.splice(e,1)}},[e,n,a])}(e,t),function(e,t){let n=(0,r.useContext)(p);if(!n){console.warn("It is not recommended to use editor-support->Suspense without a editor-ui->ErrorBoundary above it.");return}n.registerRequest(e,t)}(e,t);let n=l.get(e,t);if(!n)throw function(e,t){let n=e(...t);return l.set(e,t,{state:"fetching",promise:n}),o(e,t,n).catch(()=>null),n}(e,t);if("fetching"===n.state)throw n.promise;if(n.ok)return n.body;throw n.error}function s(e,t,n,r){let{notify:i=!0}=r??{};l.set(e,t,{state:"fetched",ok:!0,body:n}),i&&d.forEach(n=>n(e,t))}function o(e,t,n){return n.then(n=>l.set(e,t,{state:"fetched",ok:!0,body:n})).catch(n=>l.set(e,t,{state:"fetched",ok:!1,error:n}))}let l=function(){let e=new Map,t=new Map,n={cacheCapacity:500,revalidationStrategy:{type:"swr",onFocus:!0}};function r(t){return e.get(t)??n}return{get(e,n){let r=c(e,n),i=t.get(e);if(!i||!i.has(r))return;let a=i.get(r);return i.delete(r),void 0!==a&&i.set(r,a),a},set(e,n,i){let a=t.get(e);a||(a=new Map,t.set(e,a));let s=r(e),o=c(e,n);a.size!==s.cacheCapacity||a.has(o)||a.delete(a.keys().next().value),a.set(o,i)},has(e,n){let r=c(e,n),i=t.get(e),a=null==i?void 0:i.get(r);if(!a)return!1;let s="fetched"===a.state,o="revalidating"===a.state&&a.ok;return s||o},getFetcherConfig:r,registerFetcherConfig(t,n){e.set(t,n)},clear(e,n){let r=t.get(e);if(!r)return;let i=c(e,n);r.delete(i)},clearAll(){t.clear()}}}(),u=l;function c(e,t){let n=e.length-t.length;if(0===n)return t.join(`
2
- `);let r=[...t];for(let i=0;i<n;i++)r.push(void 0);return r.join(`
3
- `)}let d=[],p=(0,r.createContext)(void 0)},97867:function(e,t,n){"use strict";function r(e){return null!=e}n.d(t,{$:function(){return r}})},55798:function(e,t,n){"use strict";function r(e){return e.charAt(0).toUpperCase()+e.slice(1)}function i(e){try{return new URL(e)}catch{return}}function a(e){try{return e.host.split(".").slice(0,-1).filter(e=>"www"!==e).map(r).at(0)??""}catch{return""}}n.d(t,{S:function(){return a},j:function(){return i}})},34821:function(e,t){"use strict";var n,r;Object.defineProperty(t,"__esModule",{value:!0}),t.Doctype=t.CDATA=t.Tag=t.Style=t.Script=t.Comment=t.Directive=t.Text=t.Root=t.isTag=t.ElementType=void 0,(r=n=t.ElementType||(t.ElementType={})).Root="root",r.Text="text",r.Directive="directive",r.Comment="comment",r.Script="script",r.Style="style",r.Tag="tag",r.CDATA="cdata",r.Doctype="doctype",t.isTag=function(e){return e.type===n.Tag||e.type===n.Script||e.type===n.Style},t.Root=n.Root,t.Text=n.Text,t.Directive=n.Directive,t.Comment=n.Comment,t.Script=n.Script,t.Style=n.Style,t.Tag=n.Tag,t.CDATA=n.CDATA,t.Doctype=n.Doctype},79959:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.DomHandler=void 0;var a=n(34821),s=n(75538);i(n(75538),t);var o={withStartIndices:!1,withEndIndices:!1,xmlMode:!1},l=function(){function e(e,t,n){this.dom=[],this.root=new s.Document(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null,"function"==typeof t&&(n=t,t=o),"object"==typeof e&&(t=e,e=void 0),this.callback=null!=e?e:null,this.options=null!=t?t:o,this.elementCB=null!=n?n:null}return e.prototype.onparserinit=function(e){this.parser=e},e.prototype.onreset=function(){this.dom=[],this.root=new s.Document(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null},e.prototype.onend=function(){this.done||(this.done=!0,this.parser=null,this.handleCallback(null))},e.prototype.onerror=function(e){this.handleCallback(e)},e.prototype.onclosetag=function(){this.lastNode=null;var e=this.tagStack.pop();this.options.withEndIndices&&(e.endIndex=this.parser.endIndex),this.elementCB&&this.elementCB(e)},e.prototype.onopentag=function(e,t){var n=this.options.xmlMode?a.ElementType.Tag:void 0,r=new s.Element(e,t,void 0,n);this.addNode(r),this.tagStack.push(r)},e.prototype.ontext=function(e){var t=this.lastNode;if(t&&t.type===a.ElementType.Text)t.data+=e,this.options.withEndIndices&&(t.endIndex=this.parser.endIndex);else{var n=new s.Text(e);this.addNode(n),this.lastNode=n}},e.prototype.oncomment=function(e){if(this.lastNode&&this.lastNode.type===a.ElementType.Comment){this.lastNode.data+=e;return}var t=new s.Comment(e);this.addNode(t),this.lastNode=t},e.prototype.oncommentend=function(){this.lastNode=null},e.prototype.oncdatastart=function(){var e=new s.Text(""),t=new s.CDATA([e]);this.addNode(t),e.parent=t,this.lastNode=e},e.prototype.oncdataend=function(){this.lastNode=null},e.prototype.onprocessinginstruction=function(e,t){var n=new s.ProcessingInstruction(e,t);this.addNode(n)},e.prototype.handleCallback=function(e){if("function"==typeof this.callback)this.callback(e,this.dom);else if(e)throw e},e.prototype.addNode=function(e){var t=this.tagStack[this.tagStack.length-1],n=t.children[t.children.length-1];this.options.withStartIndices&&(e.startIndex=this.parser.startIndex),this.options.withEndIndices&&(e.endIndex=this.parser.endIndex),t.children.push(e),n&&(e.prev=n,n.next=e),e.parent=t,this.lastNode=null},e}();t.DomHandler=l,t.default=l},75538:function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),a=this&&this.__assign||function(){return(a=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.cloneNode=t.hasChildren=t.isDocument=t.isDirective=t.isComment=t.isText=t.isCDATA=t.isTag=t.Element=t.Document=t.CDATA=t.NodeWithChildren=t.ProcessingInstruction=t.Comment=t.Text=t.DataNode=t.Node=void 0;var s=n(34821),o=function(){function e(){this.parent=null,this.prev=null,this.next=null,this.startIndex=null,this.endIndex=null}return Object.defineProperty(e.prototype,"parentNode",{get:function(){return this.parent},set:function(e){this.parent=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"previousSibling",{get:function(){return this.prev},set:function(e){this.prev=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"nextSibling",{get:function(){return this.next},set:function(e){this.next=e},enumerable:!1,configurable:!0}),e.prototype.cloneNode=function(e){return void 0===e&&(e=!1),k(this,e)},e}();t.Node=o;var l=function(e){function t(t){var n=e.call(this)||this;return n.data=t,n}return i(t,e),Object.defineProperty(t.prototype,"nodeValue",{get:function(){return this.data},set:function(e){this.data=e},enumerable:!1,configurable:!0}),t}(o);t.DataNode=l;var u=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=s.ElementType.Text,t}return i(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 3},enumerable:!1,configurable:!0}),t}(l);t.Text=u;var c=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=s.ElementType.Comment,t}return i(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 8},enumerable:!1,configurable:!0}),t}(l);t.Comment=c;var d=function(e){function t(t,n){var r=e.call(this,n)||this;return r.name=t,r.type=s.ElementType.Directive,r}return i(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 1},enumerable:!1,configurable:!0}),t}(l);t.ProcessingInstruction=d;var p=function(e){function t(t){var n=e.call(this)||this;return n.children=t,n}return i(t,e),Object.defineProperty(t.prototype,"firstChild",{get:function(){var e;return null!==(e=this.children[0])&&void 0!==e?e:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"lastChild",{get:function(){return this.children.length>0?this.children[this.children.length-1]:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"childNodes",{get:function(){return this.children},set:function(e){this.children=e},enumerable:!1,configurable:!0}),t}(o);t.NodeWithChildren=p;var h=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=s.ElementType.CDATA,t}return i(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 4},enumerable:!1,configurable:!0}),t}(p);t.CDATA=h;var f=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=s.ElementType.Root,t}return i(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 9},enumerable:!1,configurable:!0}),t}(p);t.Document=f;var m=function(e){function t(t,n,r,i){void 0===r&&(r=[]),void 0===i&&(i="script"===t?s.ElementType.Script:"style"===t?s.ElementType.Style:s.ElementType.Tag);var a=e.call(this,r)||this;return a.name=t,a.attribs=n,a.type=i,a}return i(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 1},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"tagName",{get:function(){return this.name},set:function(e){this.name=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"attributes",{get:function(){var e=this;return Object.keys(this.attribs).map(function(t){var n,r;return{name:t,value:e.attribs[t],namespace:null===(n=e["x-attribsNamespace"])||void 0===n?void 0:n[t],prefix:null===(r=e["x-attribsPrefix"])||void 0===r?void 0:r[t]}})},enumerable:!1,configurable:!0}),t}(p);function g(e){return(0,s.isTag)(e)}function v(e){return e.type===s.ElementType.CDATA}function y(e){return e.type===s.ElementType.Text}function _(e){return e.type===s.ElementType.Comment}function b(e){return e.type===s.ElementType.Directive}function x(e){return e.type===s.ElementType.Root}function k(e,t){if(void 0===t&&(t=!1),y(e))n=new u(e.data);else if(_(e))n=new c(e.data);else if(g(e)){var n,r=t?w(e.children):[],i=new m(e.name,a({},e.attribs),r);r.forEach(function(e){return e.parent=i}),null!=e.namespace&&(i.namespace=e.namespace),e["x-attribsNamespace"]&&(i["x-attribsNamespace"]=a({},e["x-attribsNamespace"])),e["x-attribsPrefix"]&&(i["x-attribsPrefix"]=a({},e["x-attribsPrefix"])),n=i}else if(v(e)){var r=t?w(e.children):[],s=new h(r);r.forEach(function(e){return e.parent=s}),n=s}else if(x(e)){var r=t?w(e.children):[],o=new f(r);r.forEach(function(e){return e.parent=o}),e["x-mode"]&&(o["x-mode"]=e["x-mode"]),n=o}else if(b(e)){var l=new d(e.name,e.data);null!=e["x-name"]&&(l["x-name"]=e["x-name"],l["x-publicId"]=e["x-publicId"],l["x-systemId"]=e["x-systemId"]),n=l}else throw Error("Not implemented yet: ".concat(e.type));return n.startIndex=e.startIndex,n.endIndex=e.endIndex,null!=e.sourceCodeLocation&&(n.sourceCodeLocation=e.sourceCodeLocation),n}function w(e){for(var t=e.map(function(e){return k(e,!0)}),n=1;n<t.length;n++)t[n].prev=t[n-1],t[n-1].next=t[n];return t}t.Element=m,t.isTag=g,t.isCDATA=v,t.isText=y,t.isComment=_,t.isDirective=b,t.isDocument=x,t.hasChildren=function(e){return Object.prototype.hasOwnProperty.call(e,"children")},t.cloneNode=k},8401:function(e,t){t.CASE_SENSITIVE_TAG_NAMES=["animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussainBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","linearGradient","radialGradient","textPath"]},58166:function(e){var t,n="html",r="head",i="body",a=/<([a-zA-Z]+[0-9]?)/,s=/<head[^]*>/i,o=/<body[^]*>/i,l=function(){throw Error("This browser does not support `document.implementation.createHTMLDocument`")},u=function(){throw Error("This browser does not support `DOMParser.prototype.parseFromString`")},c="object"==typeof window&&window.DOMParser;if("function"==typeof c){var d=new c;l=u=function(e,t){return t&&(e="<"+t+">"+e+"</"+t+">"),d.parseFromString(e,"text/html")}}if("object"==typeof document&&document.implementation){var p=document.implementation.createHTMLDocument();l=function(e,t){return t?(p.documentElement.querySelector(t).innerHTML=e,p):(p.documentElement.innerHTML=e,p)}}var h="object"==typeof document?document.createElement("template"):{};h.content&&(t=function(e){return h.innerHTML=e,h.content.childNodes}),e.exports=function(e){var c,d,p,h,f=e.match(a);switch(f&&f[1]&&(c=f[1].toLowerCase()),c){case n:return d=u(e),!s.test(e)&&(p=d.querySelector(r))&&p.parentNode.removeChild(p),!o.test(e)&&(p=d.querySelector(i))&&p.parentNode.removeChild(p),d.querySelectorAll(n);case r:case i:if(h=(d=l(e)).querySelectorAll(c),o.test(e)&&s.test(e))return h[0].parentNode.childNodes;return h;default:if(t)return t(e);return(p=l(e,i).querySelector(i)).childNodes}}},50307:function(e,t,n){var r=n(58166),i=n(41594).formatDOM,a=/<(![a-zA-Z\s]+)>/;e.exports=function(e){if("string"!=typeof e)throw TypeError("First argument must be a string");if(""===e)return[];var t,n=e.match(a);return n&&n[1]&&(t=n[1]),i(r(e),null,t)}},41594:function(e,t,n){for(var r,i=n(79959),a=n(8401).CASE_SENSITIVE_TAG_NAMES,s=i.Comment,o=i.Element,l=i.ProcessingInstruction,u=i.Text,c={},d=0,p=a.length;d<p;d++)c[(r=a[d]).toLowerCase()]=r;function h(e){for(var t,n={},r=0,i=e.length;r<i;r++)n[(t=e[r]).name]=t.value;return n}function f(e){var t,n=c[t=e=e.toLowerCase()];return n||e}t.formatAttributes=h,t.formatDOM=function e(t,n,r){n=n||null;for(var i=[],a=0,c=t.length;a<c;a++){var d,p,m=t[a];switch(m.nodeType){case 1:d=f(m.nodeName),(p=new o(d,h(m.attributes))).children=e("template"===d?m.content.childNodes:m.childNodes,p);break;case 3:p=new u(m.nodeValue);break;case 8:p=new s(m.nodeValue);break;default:continue}var g=i[a-1]||null;g&&(g.next=p),p.parent=n,p.prev=g,p.next=null,i.push(p)}return r&&((p=new l(r.substring(0,r.indexOf(" ")).toLowerCase(),r)).next=i[0]||null,p.parent=n,i.unshift(p),i[1]&&(i[1].prev=i[0])),i}},72670:function(e,t,n){var r=n(79959),i=n(50307),a=n(13683),s=n(69239);i="function"==typeof i.default?i.default:i;var o={lowerCaseAttributeNames:!1};function l(e,t){if("string"!=typeof e)throw TypeError("First argument must be a string");return""===e?[]:s(i(e,(t=t||{}).htmlparser2||o),t)}l.domToReact=s,l.htmlToDOM=i,l.attributesToProps=a,l.Comment=r.Comment,l.Element=r.Element,l.ProcessingInstruction=r.ProcessingInstruction,l.Text=r.Text,e.exports=l,l.default=l},13683:function(e,t,n){var r=n(18701),i=n(54848),a=["checked","value"],s=["input","select","textarea"],o={reset:!0,submit:!0};function l(e){return r.possibleStandardNames[e]}e.exports=function(e,t){var n,u,c,d,p,h={},f=(e=e||{}).type&&o[e.type];for(n in e){if(c=e[n],r.isCustomAttribute(n)){h[n]=c;continue}if(d=l(u=n.toLowerCase())){switch(p=r.getPropertyInfo(d),-1===a.indexOf(d)||-1===s.indexOf(t)||f||(d=l("default"+u)),h[d]=c,p&&p.type){case r.BOOLEAN:h[d]=!0;break;case r.OVERLOADED_BOOLEAN:""===c&&(h[d]=!0)}continue}i.PRESERVE_CUSTOM_ATTRIBUTES&&(h[n]=c)}return i.setStyleProp(e.style,h),h}},69239:function(e,t,n){var r=n(2784),i=n(13683),a=n(54848),s=a.setStyleProp,o=a.canTextBeChildOfNode;function l(e){return a.PRESERVE_CUSTOM_ATTRIBUTES&&"tag"===e.type&&a.isCustomComponent(e.name,e.attribs)}e.exports=function e(t,n){for(var a,u,c,d,p,h=(n=n||{}).library||r,f=h.cloneElement,m=h.createElement,g=h.isValidElement,v=[],y="function"==typeof n.replace,_=n.trim,b=0,x=t.length;b<x;b++){if(a=t[b],y&&g(c=n.replace(a))){x>1&&(c=f(c,{key:c.key||b})),v.push(c);continue}if("text"===a.type){if((u=!a.data.trim().length)&&a.parent&&!o(a.parent)||_&&u)continue;v.push(a.data);continue}switch(d=a.attribs,l(a)?s(d.style,d):d&&(d=i(d,a.name)),p=null,a.type){case"script":case"style":a.children[0]&&(d.dangerouslySetInnerHTML={__html:a.children[0].data});break;case"tag":"textarea"===a.name&&a.children[0]?d.defaultValue=a.children[0].data:a.children&&a.children.length&&(p=e(a.children,n));break;default:continue}x>1&&(d.key=b),v.push(m(a.name,d,p))}return 1===v.length?v[0]:v}},54848:function(e,t,n){var r=n(2784),i=n(91618).default,a={reactCompat:!0},s=r.version.split(".")[0]>=16,o=new Set(["tr","tbody","thead","tfoot","colgroup","table","head","html","frameset"]);e.exports={PRESERVE_CUSTOM_ATTRIBUTES:s,invertObject:function(e,t){if(!e||"object"!=typeof e)throw TypeError("First argument must be an object");var n,r,i="function"==typeof t,a={},s={};for(n in e){if(r=e[n],i&&(a=t(n,r))&&2===a.length){s[a[0]]=a[1];continue}"string"==typeof r&&(s[r]=n)}return s},isCustomComponent:function(e,t){if(-1===e.indexOf("-"))return t&&"string"==typeof t.is;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}},setStyleProp:function(e,t){if(null!=e)try{t.style=i(e,a)}catch(n){t.style={}}},canTextBeChildOfNode:function(e){return!o.has(e.name)},elementsWithNoTextChildren:o}},6299:function(e){var t=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,n=/\n/g,r=/^\s*/,i=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,a=/^:\s*/,s=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,o=/^[;\s]*/,l=/^\s+|\s+$/g;function u(e){return e?e.replace(l,""):""}e.exports=function(e,l){if("string"!=typeof e)throw TypeError("First argument must be a string");if(!e)return[];l=l||{};var c=1,d=1;function p(e){var t=e.match(n);t&&(c+=t.length);var r=e.lastIndexOf("\n");d=~r?e.length-r:d+e.length}function h(){var e={line:c,column:d};return function(t){return t.position=new f(e),y(),t}}function f(e){this.start=e,this.end={line:c,column:d},this.source=l.source}f.prototype.content=e;var m=[];function g(t){var n=Error(l.source+":"+c+":"+d+": "+t);if(n.reason=t,n.filename=l.source,n.line=c,n.column=d,n.source=e,l.silent)m.push(n);else throw n}function v(t){var n=t.exec(e);if(n){var r=n[0];return p(r),e=e.slice(r.length),n}}function y(){v(r)}function _(e){var t;for(e=e||[];t=b();)!1!==t&&e.push(t);return e}function b(){var t=h();if("/"==e.charAt(0)&&"*"==e.charAt(1)){for(var n=2;""!=e.charAt(n)&&("*"!=e.charAt(n)||"/"!=e.charAt(n+1));)++n;if(n+=2,""===e.charAt(n-1))return g("End of comment missing");var r=e.slice(2,n-2);return d+=2,p(r),e=e.slice(n),d+=2,t({type:"comment",comment:r})}}function x(){var e=h(),n=v(i);if(n){if(b(),!v(a))return g("property missing ':'");var r=v(s),l=e({type:"declaration",property:u(n[0].replace(t,"")),value:r?u(r[0].replace(t,"")):""});return v(o),l}}return y(),function(){var e,t=[];for(_(t);e=x();)!1!==e&&(t.push(e),_(t));return t}()}},18701:function(e,t,n){"use strict";function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function i(e,t,n,r,i,a,s){this.acceptsBooleans=2===t||3===t||4===t,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=a,this.removeEmptyString=s}Object.defineProperty(t,"__esModule",{value:!0});var a={};["children","dangerouslySetInnerHTML","defaultValue","defaultChecked","innerHTML","suppressContentEditableWarning","suppressHydrationWarning","style"].forEach(function(e){a[e]=new i(e,0,!1,e,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t,n,s=function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n,r,i=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=i){var a=[],s=!0,o=!1;try{for(i=i.call(e);!(s=(n=i.next()).done)&&(a.push(n.value),!t||a.length!==t);s=!0);}catch(l){o=!0,r=l}finally{try{s||null==i.return||i.return()}finally{if(o)throw r}}return a}}(e,2)||function(e,t){if(e){if("string"==typeof e)return r(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return r(e,t)}}(e,2)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),o=s[0],l=s[1];a[o]=new i(o,1,!1,l,null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(e){a[e]=new i(e,2,!1,e.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){a[e]=new i(e,2,!1,e,null,!1,!1)}),["allowFullScreen","async","autoFocus","autoPlay","controls","default","defer","disabled","disablePictureInPicture","disableRemotePlayback","formNoValidate","hidden","loop","noModule","noValidate","open","playsInline","readOnly","required","reversed","scoped","seamless","itemScope"].forEach(function(e){a[e]=new i(e,3,!1,e.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(e){a[e]=new i(e,3,!0,e,null,!1,!1)}),["capture","download"].forEach(function(e){a[e]=new i(e,4,!1,e,null,!1,!1)}),["cols","rows","size","span"].forEach(function(e){a[e]=new i(e,6,!1,e,null,!1,!1)}),["rowSpan","start"].forEach(function(e){a[e]=new i(e,5,!1,e.toLowerCase(),null,!1,!1)});var s=/[\-\:]([a-z])/g,o=function(e){return e[1].toUpperCase()};["accent-height","alignment-baseline","arabic-form","baseline-shift","cap-height","clip-path","clip-rule","color-interpolation","color-interpolation-filters","color-profile","color-rendering","dominant-baseline","enable-background","fill-opacity","fill-rule","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","glyph-name","glyph-orientation-horizontal","glyph-orientation-vertical","horiz-adv-x","horiz-origin-x","image-rendering","letter-spacing","lighting-color","marker-end","marker-mid","marker-start","overline-position","overline-thickness","paint-order","panose-1","pointer-events","rendering-intent","shape-rendering","stop-color","stop-opacity","strikethrough-position","strikethrough-thickness","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","text-anchor","text-decoration","text-rendering","underline-position","underline-thickness","unicode-bidi","unicode-range","units-per-em","v-alphabetic","v-hanging","v-ideographic","v-mathematical","vector-effect","vert-adv-y","vert-origin-x","vert-origin-y","word-spacing","writing-mode","xmlns:xlink","x-height"].forEach(function(e){var t=e.replace(s,o);a[t]=new i(t,1,!1,e,null,!1,!1)}),["xlink:actuate","xlink:arcrole","xlink:role","xlink:show","xlink:title","xlink:type"].forEach(function(e){var t=e.replace(s,o);a[t]=new i(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(s,o);a[t]=new i(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(e){a[e]=new i(e,1,!1,e.toLowerCase(),null,!1,!1)}),a.xlinkHref=new i("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(e){a[e]=new i(e,1,!1,e.toLowerCase(),null,!0,!0)});var l=n(52558),u=l.CAMELCASE,c=l.SAME,d=l.possibleStandardNames,p=RegExp.prototype.test.bind(RegExp("^(data|aria)-[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$")),h=Object.keys(d).reduce(function(e,t){var n=d[t];return n===c?e[t]=t:n===u?e[t.toLowerCase()]=t:e[t]=n,e},{});t.BOOLEAN=3,t.BOOLEANISH_STRING=2,t.NUMERIC=5,t.OVERLOADED_BOOLEAN=4,t.POSITIVE_NUMERIC=6,t.RESERVED=0,t.STRING=1,t.getPropertyInfo=function(e){return a.hasOwnProperty(e)?a[e]:null},t.isCustomAttribute=p,t.possibleStandardNames=h},52558:function(e,t){t.SAME=0,t.CAMELCASE=1,t.possibleStandardNames={accept:0,acceptCharset:1,"accept-charset":"acceptCharset",accessKey:1,action:0,allowFullScreen:1,alt:0,as:0,async:0,autoCapitalize:1,autoComplete:1,autoCorrect:1,autoFocus:1,autoPlay:1,autoSave:1,capture:0,cellPadding:1,cellSpacing:1,challenge:0,charSet:1,checked:0,children:0,cite:0,class:"className",classID:1,className:1,cols:0,colSpan:1,content:0,contentEditable:1,contextMenu:1,controls:0,controlsList:1,coords:0,crossOrigin:1,dangerouslySetInnerHTML:1,data:0,dateTime:1,default:0,defaultChecked:1,defaultValue:1,defer:0,dir:0,disabled:0,disablePictureInPicture:1,disableRemotePlayback:1,download:0,draggable:0,encType:1,enterKeyHint:1,for:"htmlFor",form:0,formMethod:1,formAction:1,formEncType:1,formNoValidate:1,formTarget:1,frameBorder:1,headers:0,height:0,hidden:0,high:0,href:0,hrefLang:1,htmlFor:1,httpEquiv:1,"http-equiv":"httpEquiv",icon:0,id:0,innerHTML:1,inputMode:1,integrity:0,is:0,itemID:1,itemProp:1,itemRef:1,itemScope:1,itemType:1,keyParams:1,keyType:1,kind:0,label:0,lang:0,list:0,loop:0,low:0,manifest:0,marginWidth:1,marginHeight:1,max:0,maxLength:1,media:0,mediaGroup:1,method:0,min:0,minLength:1,multiple:0,muted:0,name:0,noModule:1,nonce:0,noValidate:1,open:0,optimum:0,pattern:0,placeholder:0,playsInline:1,poster:0,preload:0,profile:0,radioGroup:1,readOnly:1,referrerPolicy:1,rel:0,required:0,reversed:0,role:0,rows:0,rowSpan:1,sandbox:0,scope:0,scoped:0,scrolling:0,seamless:0,selected:0,shape:0,size:0,sizes:0,span:0,spellCheck:1,src:0,srcDoc:1,srcLang:1,srcSet:1,start:0,step:0,style:0,summary:0,tabIndex:1,target:0,title:0,type:0,useMap:1,value:0,width:0,wmode:0,wrap:0,about:0,accentHeight:1,"accent-height":"accentHeight",accumulate:0,additive:0,alignmentBaseline:1,"alignment-baseline":"alignmentBaseline",allowReorder:1,alphabetic:0,amplitude:0,arabicForm:1,"arabic-form":"arabicForm",ascent:0,attributeName:1,attributeType:1,autoReverse:1,azimuth:0,baseFrequency:1,baselineShift:1,"baseline-shift":"baselineShift",baseProfile:1,bbox:0,begin:0,bias:0,by:0,calcMode:1,capHeight:1,"cap-height":"capHeight",clip:0,clipPath:1,"clip-path":"clipPath",clipPathUnits:1,clipRule:1,"clip-rule":"clipRule",color:0,colorInterpolation:1,"color-interpolation":"colorInterpolation",colorInterpolationFilters:1,"color-interpolation-filters":"colorInterpolationFilters",colorProfile:1,"color-profile":"colorProfile",colorRendering:1,"color-rendering":"colorRendering",contentScriptType:1,contentStyleType:1,cursor:0,cx:0,cy:0,d:0,datatype:0,decelerate:0,descent:0,diffuseConstant:1,direction:0,display:0,divisor:0,dominantBaseline:1,"dominant-baseline":"dominantBaseline",dur:0,dx:0,dy:0,edgeMode:1,elevation:0,enableBackground:1,"enable-background":"enableBackground",end:0,exponent:0,externalResourcesRequired:1,fill:0,fillOpacity:1,"fill-opacity":"fillOpacity",fillRule:1,"fill-rule":"fillRule",filter:0,filterRes:1,filterUnits:1,floodOpacity:1,"flood-opacity":"floodOpacity",floodColor:1,"flood-color":"floodColor",focusable:0,fontFamily:1,"font-family":"fontFamily",fontSize:1,"font-size":"fontSize",fontSizeAdjust:1,"font-size-adjust":"fontSizeAdjust",fontStretch:1,"font-stretch":"fontStretch",fontStyle:1,"font-style":"fontStyle",fontVariant:1,"font-variant":"fontVariant",fontWeight:1,"font-weight":"fontWeight",format:0,from:0,fx:0,fy:0,g1:0,g2:0,glyphName:1,"glyph-name":"glyphName",glyphOrientationHorizontal:1,"glyph-orientation-horizontal":"glyphOrientationHorizontal",glyphOrientationVertical:1,"glyph-orientation-vertical":"glyphOrientationVertical",glyphRef:1,gradientTransform:1,gradientUnits:1,hanging:0,horizAdvX:1,"horiz-adv-x":"horizAdvX",horizOriginX:1,"horiz-origin-x":"horizOriginX",ideographic:0,imageRendering:1,"image-rendering":"imageRendering",in2:0,in:0,inlist:0,intercept:0,k1:0,k2:0,k3:0,k4:0,k:0,kernelMatrix:1,kernelUnitLength:1,kerning:0,keyPoints:1,keySplines:1,keyTimes:1,lengthAdjust:1,letterSpacing:1,"letter-spacing":"letterSpacing",lightingColor:1,"lighting-color":"lightingColor",limitingConeAngle:1,local:0,markerEnd:1,"marker-end":"markerEnd",markerHeight:1,markerMid:1,"marker-mid":"markerMid",markerStart:1,"marker-start":"markerStart",markerUnits:1,markerWidth:1,mask:0,maskContentUnits:1,maskUnits:1,mathematical:0,mode:0,numOctaves:1,offset:0,opacity:0,operator:0,order:0,orient:0,orientation:0,origin:0,overflow:0,overlinePosition:1,"overline-position":"overlinePosition",overlineThickness:1,"overline-thickness":"overlineThickness",paintOrder:1,"paint-order":"paintOrder",panose1:0,"panose-1":"panose1",pathLength:1,patternContentUnits:1,patternTransform:1,patternUnits:1,pointerEvents:1,"pointer-events":"pointerEvents",points:0,pointsAtX:1,pointsAtY:1,pointsAtZ:1,prefix:0,preserveAlpha:1,preserveAspectRatio:1,primitiveUnits:1,property:0,r:0,radius:0,refX:1,refY:1,renderingIntent:1,"rendering-intent":"renderingIntent",repeatCount:1,repeatDur:1,requiredExtensions:1,requiredFeatures:1,resource:0,restart:0,result:0,results:0,rotate:0,rx:0,ry:0,scale:0,security:0,seed:0,shapeRendering:1,"shape-rendering":"shapeRendering",slope:0,spacing:0,specularConstant:1,specularExponent:1,speed:0,spreadMethod:1,startOffset:1,stdDeviation:1,stemh:0,stemv:0,stitchTiles:1,stopColor:1,"stop-color":"stopColor",stopOpacity:1,"stop-opacity":"stopOpacity",strikethroughPosition:1,"strikethrough-position":"strikethroughPosition",strikethroughThickness:1,"strikethrough-thickness":"strikethroughThickness",string:0,stroke:0,strokeDasharray:1,"stroke-dasharray":"strokeDasharray",strokeDashoffset:1,"stroke-dashoffset":"strokeDashoffset",strokeLinecap:1,"stroke-linecap":"strokeLinecap",strokeLinejoin:1,"stroke-linejoin":"strokeLinejoin",strokeMiterlimit:1,"stroke-miterlimit":"strokeMiterlimit",strokeWidth:1,"stroke-width":"strokeWidth",strokeOpacity:1,"stroke-opacity":"strokeOpacity",suppressContentEditableWarning:1,suppressHydrationWarning:1,surfaceScale:1,systemLanguage:1,tableValues:1,targetX:1,targetY:1,textAnchor:1,"text-anchor":"textAnchor",textDecoration:1,"text-decoration":"textDecoration",textLength:1,textRendering:1,"text-rendering":"textRendering",to:0,transform:0,typeof:0,u1:0,u2:0,underlinePosition:1,"underline-position":"underlinePosition",underlineThickness:1,"underline-thickness":"underlineThickness",unicode:0,unicodeBidi:1,"unicode-bidi":"unicodeBidi",unicodeRange:1,"unicode-range":"unicodeRange",unitsPerEm:1,"units-per-em":"unitsPerEm",unselectable:0,vAlphabetic:1,"v-alphabetic":"vAlphabetic",values:0,vectorEffect:1,"vector-effect":"vectorEffect",version:0,vertAdvY:1,"vert-adv-y":"vertAdvY",vertOriginX:1,"vert-origin-x":"vertOriginX",vertOriginY:1,"vert-origin-y":"vertOriginY",vHanging:1,"v-hanging":"vHanging",vIdeographic:1,"v-ideographic":"vIdeographic",viewBox:1,viewTarget:1,visibility:0,vMathematical:1,"v-mathematical":"vMathematical",vocab:0,widths:0,wordSpacing:1,"word-spacing":"wordSpacing",writingMode:1,"writing-mode":"writingMode",x1:0,x2:0,x:0,xChannelSelector:1,xHeight:1,"x-height":"xHeight",xlinkActuate:1,"xlink:actuate":"xlinkActuate",xlinkArcrole:1,"xlink:arcrole":"xlinkArcrole",xlinkHref:1,"xlink:href":"xlinkHref",xlinkRole:1,"xlink:role":"xlinkRole",xlinkShow:1,"xlink:show":"xlinkShow",xlinkTitle:1,"xlink:title":"xlinkTitle",xlinkType:1,"xlink:type":"xlinkType",xmlBase:1,"xml:base":"xmlBase",xmlLang:1,"xml:lang":"xmlLang",xmlns:0,"xml:space":"xmlSpace",xmlnsXlink:1,"xmlns:xlink":"xmlnsXlink",xmlSpace:1,y1:0,y2:0,y:0,yChannelSelector:1,z:0,zoomAndPan:1}},58831:function(e,t,n){"use strict";var r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.ArrowContainer=void 0;var i=n(52322),a=n(2784),s=n(64379),o=function(e){var t=e.childRect,n=e.popoverRect,o=e.position,l=e.arrowColor,u=e.arrowSize,c=e.arrowClassName,d=e.arrowStyle,p=e.className,h=e.children,f=e.style,m=s.useArrowContainer({childRect:t,popoverRect:n,position:o,arrowColor:l,arrowSize:u}),g=m.arrowContainerStyle,v=m.arrowStyle,y=a.useMemo(function(){return r(r({},g),f)},[g,f]),_=a.useMemo(function(){return r(r({},v),d)},[v,d]);return i.jsxs("div",r({className:p,style:y},{children:[i.jsx("div",{style:_,className:c},void 0),h]}),void 0)};t.ArrowContainer=o},19909:function(e,t,n){"use strict";var r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.Popover=t.usePopover=t.ArrowContainer=t.useArrowContainer=void 0;var i=n(52322),a=n(2784),s=n(44635),o=n(27574),l=n(61462);Object.defineProperty(t,"usePopover",{enumerable:!0,get:function(){return l.usePopover}});var u=n(70414),c=n(64379);Object.defineProperty(t,"useArrowContainer",{enumerable:!0,get:function(){return c.useArrowContainer}});var d=n(58831);Object.defineProperty(t,"ArrowContainer",{enumerable:!0,get:function(){return d.ArrowContainer}});var p=["top","left","right","bottom"],h=a.forwardRef(function(e,t){var n=e.isOpen,c=e.children,d=e.content,h=e.positions,f=e.align,m=void 0===f?"center":f,g=e.padding,v=void 0===g?0:g,y=e.reposition,_=void 0===y||y,b=e.parentElement,x=void 0===b?window.document.body:b,k=e.boundaryElement,w=e.containerClassName,T=e.containerStyle,C=e.contentLocation,E=e.boundaryInset,S=void 0===E?0:E,O=e.onClickOutside,R=e.clickOutsideCapture,N=void 0!==R&&R,P=u.useMemoizedArray(void 0===h?p:h),A=a.useRef(!1),I=a.useRef(),j=a.useRef(),Z=a.useRef(_),M=a.useRef(),L=a.useState({align:m,nudgedLeft:0,nudgedTop:0,position:P[0],padding:v,childRect:o.EMPTY_CLIENT_RECT,popoverRect:o.EMPTY_CLIENT_RECT,parentRect:o.EMPTY_CLIENT_RECT,boundaryRect:o.EMPTY_CLIENT_RECT,boundaryInset:S,violations:o.EMPTY_CLIENT_RECT,hasViolations:!1}),D=L[0],z=L[1],F=a.useCallback(function(e){return z(e)},[]),V=l.usePopover({isOpen:n,childRef:M,containerClassName:void 0===w?"react-tiny-popover-container":w,parentElement:x,boundaryElement:void 0===k?x:k,contentLocation:C,positions:P,align:m,padding:v,boundaryInset:S,reposition:_,onPositionPopover:F}),$=V.positionPopover,B=V.popoverRef,U=V.scoutRef;a.useLayoutEffect(function(){var e=!0,t=function(){var r,i;if(n&&e){var a=null===(r=null==M?void 0:M.current)||void 0===r?void 0:r.getBoundingClientRect(),s=null===(i=null==B?void 0:B.current)||void 0===i?void 0:i.getBoundingClientRect();null==a||null==s||o.rectsAreEqual(a,{top:D.childRect.top,left:D.childRect.left,width:D.childRect.width,height:D.childRect.height,bottom:D.childRect.top+D.childRect.height,right:D.childRect.left+D.childRect.width})&&s.width===D.popoverRect.width&&s.height===D.popoverRect.height&&D.padding===v&&D.align===m&&P===I.current&&C===j.current&&_===Z.current||$(),P!==I.current&&(I.current=P),C!==j.current&&(j.current=C),_!==Z.current&&(Z.current=_),e&&window.requestAnimationFrame(t)}A.current=n};return window.requestAnimationFrame(t),function(){e=!1}},[m,C,n,v,B,D.align,D.childRect.height,D.childRect.left,D.childRect.top,D.childRect.width,D.padding,D.popoverRect.height,D.popoverRect.width,$,P,_,]),a.useEffect(function(){var e=B.current;return Object.assign(e.style,T),function(){Object.keys(null!=T?T:{}).forEach(function(t){return delete e.style[t]})}},[T,n,B]);var q=a.useCallback(function(e){var t,r;!n||(null===(t=B.current)||void 0===t?void 0:t.contains(e.target))||(null===(r=M.current)||void 0===r?void 0:r.contains(e.target))||null==O||O(e)},[n,O,B]),W=a.useCallback(function(){M.current&&window.requestAnimationFrame(function(){return $()})},[$]);a.useEffect(function(){var e=x.ownerDocument.body;return e.addEventListener("click",q,N),e.addEventListener("contextmenu",q,N),e.addEventListener("resize",W),function(){e.removeEventListener("click",q,N),e.removeEventListener("contextmenu",q,N),e.removeEventListener("resize",W)}},[N,q,W,x]);var H=a.useCallback(function(e){M.current=e,null!=t&&("object"==typeof t?t.current=e:"function"==typeof t&&t(e))},[t]);return i.jsxs(i.Fragment,{children:[a.cloneElement(c,{ref:H}),n?i.jsx(s.PopoverPortal,r({element:B.current,scoutElement:U.current,container:x},{children:"function"==typeof d?d(D):d}),void 0):null]},void 0)});t.Popover=a.forwardRef(function(e,t){return"undefined"==typeof window?e.children:i.jsx(h,r({},e,{ref:t}),void 0)})},44635:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PopoverPortal=void 0;var r=n(2784),i=n(28316),a=function(e){var t=e.container,n=e.element,a=e.scoutElement,s=e.children;return r.useLayoutEffect(function(){return t.appendChild(n),t.appendChild(a),function(){t.removeChild(n),t.removeChild(a)}},[t,n,a]),i.createPortal(s,n)};t.PopoverPortal=a},64379:function(e,t,n){"use strict";var r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.useArrowContainer=void 0;var i=n(2784),a=function(e){var t=e.childRect,n=e.popoverRect,a=e.position,s=e.arrowSize,o=e.arrowColor,l=i.useMemo(function(){return{padding:s}},[s]),u=i.useMemo(function(){return r({position:"absolute"},function(){var e=2*s,r=t.top-n.top+t.height/2-e/2,i=t.left-n.left+t.width/2-e/2,l=n.width-s,u=n.height-s;switch(i=(i=i<s?s:i)+e>l?l-e:i,r=Number.isNaN(r=(r=r<s?s:r)+e>u?u-e:r)?0:r,i=Number.isNaN(i)?0:i,a){case"right":return{borderTop:s+"px solid transparent",borderBottom:s+"px solid transparent",borderRight:s+"px solid "+o,left:0,top:r};case"left":return{borderTop:s+"px solid transparent",borderBottom:s+"px solid transparent",borderLeft:s+"px solid "+o,right:0,top:r};case"bottom":return{borderLeft:s+"px solid transparent",borderRight:s+"px solid transparent",borderBottom:s+"px solid "+o,top:0,left:i};case"top":return{borderLeft:s+"px solid transparent",borderRight:s+"px solid transparent",borderTop:s+"px solid "+o,bottom:0,left:i};default:return{display:"hidden"}}}())},[o,s,t.height,t.left,t.top,t.width,n.height,n.left,n.top,n.width,a,]);return{arrowContainerStyle:l,arrowStyle:u}};t.useArrowContainer=a},79601:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.useElementRef=void 0;var r=n(2784),i=n(27574),a=function(e,t){var n=r.useRef(),a=r.useMemo(function(){return i.createContainer(t,e)},[e,t]);return n.current=a,n};t.useElementRef=a},70414:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.useMemoizedArray=void 0;var r=n(2784),i=function(e){var t=r.useRef(e);return r.useMemo(function(){if(t.current===e)return t.current;if(t.current.length!==e.length)return t.current=e,e;for(var n=0;n<e.length;n+=1)if(e[n]!==t.current[n])return t.current=e,e;return t.current},[e])};t.useMemoizedArray=i},61462:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.usePopover=void 0;var r=n(2784),i=n(27574),a=n(79601),s={position:"fixed",overflow:"visible",top:"0px",left:"0px"},o={position:"fixed",top:"0px",left:"0px",width:"0px",height:"0px",visibility:"hidden"},l=function(e){var t=e.isOpen,n=e.childRef,l=e.positions,u=e.containerClassName,c=e.parentElement,d=e.contentLocation,p=e.align,h=e.padding,f=e.reposition,m=e.boundaryInset,g=e.boundaryElement,v=e.onPositionPopover,y=a.useElementRef(u,s),_=a.useElementRef("react-tiny-popover-scout",o),b=r.useCallback(function(e){var r,a,s=void 0===e?{}:e,o=s.positionIndex,u=void 0===o?0:o,x=s.parentRect,k=void 0===x?c.getBoundingClientRect():x,w=s.childRect,T=void 0===w?null===(r=null==n?void 0:n.current)||void 0===r?void 0:r.getBoundingClientRect():w,C=s.scoutRect,E=void 0===C?null===(a=null==_?void 0:_.current)||void 0===a?void 0:a.getBoundingClientRect():C,S=s.popoverRect,O=void 0===S?y.current.getBoundingClientRect():S,R=s.boundaryRect,N=void 0===R?g===c?k:g.getBoundingClientRect():R;if(T&&k&&t){if(d){var P="function"==typeof d?d({childRect:T,popoverRect:O,parentRect:k,boundaryRect:N,padding:h,nudgedTop:0,nudgedLeft:0,boundaryInset:m,violations:i.EMPTY_CLIENT_RECT,hasViolations:!1}):d,A=P.top,I=P.left,j=Math.round(k.left+I-E.left),Z=Math.round(k.top+A-E.top);y.current.style.transform="translate("+j+"px, "+Z+"px)",v({childRect:T,popoverRect:O,parentRect:k,boundaryRect:N,padding:h,nudgedTop:0,nudgedLeft:0,boundaryInset:m,violations:i.EMPTY_CLIENT_RECT,hasViolations:!1});return}var M=u===l.length,L=M?l[0]:l[u],D=i.getNewPopoverRect({childRect:T,popoverRect:O,boundaryRect:N,position:L,align:p,padding:h,reposition:f},m),z=D.rect;if(D.boundaryViolation&&f&&!M){b({positionIndex:u+1,childRect:T,popoverRect:O,parentRect:k,boundaryRect:N});return}var F=z.top,V=z.left,$=z.width,B=z.height,U=i.getNudgedPopoverRect(z,N,m),q=U.left,W=U.top,H=F,K=V;f&&!M&&(H=W,K=q),H=Math.round(H-E.top),K=Math.round(K-E.left),y.current.style.transform="translate("+K+"px, "+H+"px)";var Y={top:N.top+m-H,left:N.left+m-K,right:K+$-N.right+m,bottom:H+B-N.bottom+m};v({childRect:T,popoverRect:{top:H,left:K,width:$,height:B,right:K+$,bottom:H+B},parentRect:k,boundaryRect:N,position:L,align:p,padding:h,nudgedTop:W-F,nudgedLeft:q-V,boundaryInset:m,violations:{top:Y.top<=0?0:Y.top,left:Y.left<=0?0:Y.left,right:Y.right<=0?0:Y.right,bottom:Y.bottom<=0?0:Y.bottom},hasViolations:Y.top>0||Y.left>0||Y.right>0||Y.bottom>0})}},[c,n,_,y,g,t,d,l,p,h,f,m,v,]);return{positionPopover:b,popoverRef:y,scoutRef:_}};t.usePopover=l},27574:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getNudgedPopoverRect=t.getNewPopoverRect=t.popoverRectForPosition=t.createContainer=t.rectsAreEqual=t.EMPTY_CLIENT_RECT=void 0,t.EMPTY_CLIENT_RECT={top:0,left:0,bottom:0,height:0,right:0,width:0};var n=function(e,t){return e===t||(null==e?void 0:e.bottom)===(null==t?void 0:t.bottom)&&(null==e?void 0:e.height)===(null==t?void 0:t.height)&&(null==e?void 0:e.left)===(null==t?void 0:t.left)&&(null==e?void 0:e.right)===(null==t?void 0:t.right)&&(null==e?void 0:e.top)===(null==t?void 0:t.top)&&(null==e?void 0:e.width)===(null==t?void 0:t.width)};t.rectsAreEqual=n;var r=function(e,t){var n=window.document.createElement("div");return t&&(n.className=t),Object.assign(n.style,e),n};t.createContainer=r;var i=function(e,t,n,r,i){var a,s,o=t.left+t.width/2,l=t.top+t.height/2,u=n.width,c=n.height;switch(e){case"left":a=l-c/2,s=t.left-r-u,"start"===i&&(a=t.top),"end"===i&&(a=t.bottom-c);break;case"bottom":a=t.bottom+r,s=o-u/2,"start"===i&&(s=t.left),"end"===i&&(s=t.right-u);break;case"right":a=l-c/2,s=t.right+r,"start"===i&&(a=t.top),"end"===i&&(a=t.bottom-c);break;default:a=t.top-c-r,s=o-u/2,"start"===i&&(s=t.left),"end"===i&&(s=t.right-u)}return{top:a,left:s,width:u,height:c,right:s+u,bottom:a+c}};t.popoverRectForPosition=i;var a=function(e,n){var r=e.position,i=e.align,a=e.childRect,s=e.popoverRect,o=e.boundaryRect,l=e.padding,u=e.reposition,c=t.popoverRectForPosition(r,a,s,l,i),d=u&&("top"===r&&c.top<o.top+n||"left"===r&&c.left<o.left+n||"right"===r&&c.right>o.right-n||"bottom"===r&&c.bottom>o.bottom-n);return{rect:c,boundaryViolation:d}};t.getNewPopoverRect=a;var s=function(e,t,n){var r=t.top+n,i=t.left+n,a=t.right-n,s=t.bottom-n,o=e.top<r?r:e.top;o=o+e.height>s?s-e.height:o;var l=e.left<i?i:e.left;return{top:o,left:l=l+e.width>a?a-e.width:l,width:e.width,height:e.height,right:l+e.width,bottom:o+e.height}};t.getNudgedPopoverRect=s},91618:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};t.__esModule=!0;var i=r(n(85653)),a=n(31380);t.default=function(e,t){var n={};return e&&"string"==typeof e&&(0,i.default)(e,function(e,r){e&&r&&(n[(0,a.camelCase)(e,t)]=r)}),n}},31380:function(e,t){"use strict";t.__esModule=!0,t.camelCase=void 0;var n=/^--[a-zA-Z0-9-]+$/,r=/-([a-z])/g,i=/^[^-]+$/,a=/^-(webkit|moz|ms|o|khtml)-/,s=/^-(ms)-/,o=function(e,t){return t.toUpperCase()},l=function(e,t){return"".concat(t,"-")},u=function(e,t){var u;return(void 0===t&&(t={}),!(u=e)||i.test(u)||n.test(u))?e:(e=e.toLowerCase(),(e=t.reactCompat?e.replace(s,l):e.replace(a,l)).replace(r,o))};t.camelCase=u},85653:function(e,t,n){var r=n(6299);function i(e,t){var n,i,a,s=null;if(!e||"string"!=typeof e)return s;for(var o=r(e),l="function"==typeof t,u=0,c=o.length;u<c;u++)i=(n=o[u]).property,a=n.value,l?t(i,a,n):a&&(s||(s={}),s[i]=a);return s}e.exports=i,e.exports.default=i},86741:function(e,t,n){"use strict";n.d(t,{W_:function(){return a},du:function(){return i}});var r=n(72670),i=r.domToReact;r.htmlToDOM,r.attributesToProps,r.Comment;var a=r.Element;r.ProcessingInstruction,r.Text,t.ZP=r},33402:function(e,t,n){"use strict";function r(e,t){return null!=t&&"undefined"!=typeof Symbol&&t[Symbol.hasInstance]?!!t[Symbol.hasInstance](e):e instanceof t}n.d(t,{Z:function(){return r}})}}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[29],{12408:function(n,e,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/slices/[lib]/[sliceName]/[variation]/screenshot",function(){return r(35717)}])},4597:function(n,e,r){"use strict";r.d(e,{Z:function(){return v}});var t,i=r(22710),o=r(62230),c=r(17064),u=r(99267),a=r(52322),s=r(2784),l=r(75289),d=r(16),f=r(90374),v=function(n){var e,r,t,v,h,m,p=n.apiContent,b=n.screenDimensions,g=n.simulatorUrl,_=n.dryRun,w=n.isScreenshot,S=void 0!==w&&w,x=(0,c.Z)((r=(e=(0,s.useState)())[0],t=e[1],v=(0,s.useRef)(),h=(0,s.useRef)(),[r,(0,s.useCallback)((m=(0,i.Z)(function(n){var e,r,o,c;return(0,u.__generator)(this,function(a){switch(a.label){case 0:if(null===(e=v.current)||void 0===e||e.disconnect(),null===(r=h.current)||void 0===r||r.disconnect(),t(void 0),!(null!=n))return[3,4];v.current=new d.SH(n),a.label=1;case 1:return a.trys.push([1,3,,4]),[4,v.current.connect()];case 2:var s;return a.sent(),t(v.current),s=(0,i.Z)(function(){var n;return(0,u.__generator)(this,function(e){switch(e.label){case 0:return t(void 0),[4,null===(n=v.current)||void 0===n?void 0:n.connect({},!0)];case 1:return e.sent(),t(v.current),[2]}})}),o=function(){return s.apply(this,arguments)},h.current=new MutationObserver(function(n){n.forEach(function(n){"src"===n.attributeName&&o().catch(function(n){throw n})})}),h.current.observe(n,{attributeFilter:["src"]}),[3,4];case 3:return c=a.sent(),console.error(c),[3,4];case 4:return[2]}})}),function(n){return m.apply(this,arguments)}),[])]),2),y=x[0],k=x[1],Z=(0,f.Z)(),C=Z.connectToSimulatorSuccess,N=Z.connectToSimulatorFailure;(0,s.useEffect)(function(){var n;if(!g){N();return}if(void 0!==y){if(!y.connected){N(),console.warn("Trying to use a disconnected simulator client.");return}(n=(0,i.Z)(function(){return(0,u.__generator)(this,function(n){switch(n.label){case 0:return[4,y.setSliceZone([p])];case 1:return n.sent(),[2]}})}),function(){return n.apply(this,arguments)})().then(function(){C()}).catch(function(){N()})}},[y,p,g]);var R,E,j,z,T,q,W,D,H,I=(0,s.useState)(),M=I[0],O=I[1],P=(R=function(n){var e;O({height:n.blockSize,width:n.inlineSize})},j=(0,s.useRef)(),(0,s.useCallback)(function(n){var e;null===(e=j.current)||void 0===e||e.disconnect(),null!==n&&(j.current=new ResizeObserver(function(e){var r,t=(0,c.Z)(e,1)[0].contentRect;R({blockSize:t.height,inlineSize:t.width},n)}),j.current.observe(n))},[]));return(0,a.jsxs)(l.kC,{ref:P,sx:(0,o.Z)({alignItems:"center",backgroundColor:"headSection",backgroundImage:"url(/pattern.png)",backgroundRepeat:"repeat",backgroundSize:"10px",border:S?void 0:function(n){var e;return"1px solid ".concat(String(null===(e=n.colors)||void 0===e?void 0:e.darkBorder))},borderRadius:S?void 0:8,display:"flex",height:"100%",justifyContent:"center",overflow:"hidden"},void 0!==_&&_?{display:"none"}:{}),children:[g?(0,a.jsx)("iframe",{id:"__iframe-renderer",ref:k,src:g,style:(0,o.Z)({border:"none",maxHeight:"".concat(b.height,"px"),maxWidth:"".concat(b.width,"px"),minHeight:"".concat(b.height,"px"),minWidth:"".concat(b.width,"px"),overflowY:"auto"},M?{transform:"scale(".concat((z=b,T=M,q=z.height,W=z.width,D=T.height,H=T.width,W>H||q>D?W-H>q-D?H/W:D/q:1),")")}:{display:"none"})}):null,(null==y?void 0:y.connected)?(0,a.jsx)("div",{id:"__iframe-ready"}):null]})}},35717:function(n,e,r){"use strict";r.r(e),r.d(e,{default:function(){return w}});var t=r(52322),i=r(4597),o=r(62230),c=r(85244),u=r(2784),a=r(87608),s=r(25242),l=r(53559),d=function(n){var e=n.variationID,r=n.slice;return(0,u.useMemo)(function(){var n,t=(null===(n=r.mocks)||void 0===n?void 0:n.find(function(n){return n.variation===e}))||(0,a.W)(e),i=(0,c.Z)((0,o.Z)({},(0,s.renderSliceMock)(l.id.fromSM(r.model),t)),{id:r.model.id});return{editorContent:t,apiContent:i}},[r.mocks,r.model,e])},f=r(57880),v=r(39092),h=r(5632),m=r(56580),p=r(75289),b=function(n){var e=n.children;return(0,t.jsx)(t.Fragment,{children:e})},g=function(n){var e=n.slice,r=n.variation,o=(0,m.v9)(function(n){return{simulatorUrl:(0,v.x0)(n)}}).simulatorUrl,c=(0,h.useRouter)(),u=Number(c.query.screenWidth),a=Number(c.query.screenHeight),s=d({slice:e,variationID:r.id}).apiContent;return void 0===o?null:(0,t.jsx)(p.xu,{as:"main",sx:{height:"100vh",width:"100vw",border:"none"},children:(0,t.jsx)(i.Z,{simulatorUrl:o,apiContent:s,screenDimensions:{width:u,height:a},isScreenshot:!0})})},_=(0,f.y)(g);_.CustomLayout=b;var w=_},28684:function(n,e,r){"use strict";var t=r(92521),i=r(90374),o=r(5632),c=r(2784),u=r(56580),a=function(){var n=(0,o.useRouter)(),e=(0,i.Z)().initSliceStore,r=(0,u.v9)(function(e){return{slice:(0,t.tL)(e,n.query.lib,n.query.sliceName)}}).slice;if((0,c.useEffect)(function(){r?e(r):n.replace("/")},[e,r,n]),!r)return{};var a=r.model.variations.find(function(e){return e.id===n.query.variation});return a?{slice:r,variation:a}:(n.replace("/"),{})};e.Z=a},57880:function(n,e,r){"use strict";r.d(e,{y:function(){return u}});var t=r(62230),i=r(52322);r(2784);var o=r(28684),c=r(95583),u=function(n){return function(e){var r=e.pageProps,u=(0,o.Z)(),a=u.slice,s=u.variation;return a&&s?(0,i.jsx)(n,(0,t.Z)({slice:a,variation:s},r)):((0,c.gx)("/"),null)}}},87608:function(n,e,r){"use strict";r.d(e,{W:function(){return t}});var t=function(n){return{__TYPE__:"SharedSliceContent",variation:n,primary:{},items:[]}}}},function(n){n.O(0,[746,774,888,179],function(){return n(n.s=12408)}),_N_E=n.O()}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[33],{30755:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/slices/[lib]/[sliceName]/[variation]/simulator",function(){return t(3622)}])},56577:function(e,n,t){"use strict";t.d(n,{z:function(){return d}});var r=t(62230),i=t(85244),o=t(98240),s=t(52322),c=t(2784),a=t(75289),l=function(e,n){return e?"".concat(e,"-").concat(n):""},u=function(e){switch(e){case"white":case"secondaryMedium":case"secondarySmall":case"secondary":return"#1A1523";default:return"grey01"}},d=(0,c.forwardRef)(function(e,n){var t=e.label,c=e.Icon,d=e.type,x=e.form,f=e.isLoading,h=void 0!==f&&f,p=e.disabled,v=e.onClick,m=e.sx,g=e.iconSize,b=void 0===g?16:g,C=e.iconFill,j=e.variant,S=void 0===j?"primary":j,k=(0,o.Z)(e,["label","Icon","type","form","isLoading","disabled","onClick","sx","iconSize","iconFill","variant"]);return(0,s.jsx)(a.zx,(0,i.Z)((0,r.Z)({ref:n,sx:(0,r.Z)((0,i.Z)((0,r.Z)({},void 0===m?{}:m),{display:"flex",alignItems:"center",justifyContent:"center",gap:"8px"}),h?{cursor:"wait !important"}:{}),type:d,form:x,disabled:void 0!==p&&p||h,onClick:h?void 0:v,variant:S},k),{children:h?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(a.$j,{size:b,color:u(S),"data-cy":l(k["data-cy"],"spinner")}),c&&t]}):(0,s.jsxs)(s.Fragment,{children:[c&&(0,s.jsx)(c,{size:b,fill:C,"data-cy":l(k["data-cy"],"icon")}),t]})}))})},61931:function(e,n,t){"use strict";t.d(n,{q:function(){return l}});var r=t(62230),i=t(52322),o=t(2784),s=t(75289),c=t(65186),a=(0,o.memo)(function(e){var n=e.src;return(0,i.jsx)(s.Ee,{src:n,alt:"Preview image",sx:{maxHeight:"100%"}})}),l=function(e){var n=e.src,t=e.sx;return(0,i.jsx)(s.kC,{sx:(0,r.Z)({position:"relative",alignItems:"center",justifyContent:"center",overflow:"hidden",backgroundImage:"url(/pattern.png)",backgroundColor:"headSection",backgroundRepeat:"repeat",backgroundSize:"20px",borderRadius:"4px"},t),children:void 0!==n?(0,i.jsx)(a,{src:n}):(0,i.jsxs)(s.xv,{sx:{display:"flex",flexDirection:"column",alignItems:"center"},children:[(0,i.jsx)(c.eJU,{}),"You have no screenshot yet."]})})}},4597:function(e,n,t){"use strict";t.d(n,{Z:function(){return f}});var r,i=t(22710),o=t(62230),s=t(17064),c=t(99267),a=t(52322),l=t(2784),u=t(75289),d=t(16),x=t(90374),f=function(e){var n,t,r,f,h,p,v,m=e.apiContent,g=e.screenDimensions,b=e.simulatorUrl,C=e.dryRun,j=e.isScreenshot,S=void 0!==j&&j,k=(0,s.Z)((t=(n=(0,l.useState)())[0],r=n[1],f=(0,l.useRef)(),h=(0,l.useRef)(),v=(0,l.useCallback)((p=(0,i.Z)(function(e){var n,t,o,s;return(0,c.__generator)(this,function(a){switch(a.label){case 0:if(null===(n=f.current)||void 0===n||n.disconnect(),null===(t=h.current)||void 0===t||t.disconnect(),r(void 0),!(null!=e))return[3,4];f.current=new d.SH(e),a.label=1;case 1:return a.trys.push([1,3,,4]),[4,f.current.connect()];case 2:var l;return a.sent(),r(f.current),l=(0,i.Z)(function(){var e;return(0,c.__generator)(this,function(n){switch(n.label){case 0:return r(void 0),[4,null===(e=f.current)||void 0===e?void 0:e.connect({},!0)];case 1:return n.sent(),r(f.current),[2]}})}),o=function(){return l.apply(this,arguments)},h.current=new MutationObserver(function(e){e.forEach(function(e){"src"===e.attributeName&&o().catch(function(e){throw e})})}),h.current.observe(e,{attributeFilter:["src"]}),[3,4];case 3:return s=a.sent(),console.error(s),[3,4];case 4:return[2]}})}),function(e){return p.apply(this,arguments)}),[]),[t,v]),2),y=k[0],E=k[1],w=(0,x.Z)(),_=w.connectToSimulatorSuccess,I=w.connectToSimulatorFailure;(0,l.useEffect)(function(){var e;if(!b){I();return}if(void 0!==y){if(!y.connected){I(),console.warn("Trying to use a disconnected simulator client.");return}(e=(0,i.Z)(function(){return(0,c.__generator)(this,function(e){switch(e.label){case 0:return[4,y.setSliceZone([m])];case 1:return e.sent(),[2]}})}),function(){return e.apply(this,arguments)})().then(function(){_()}).catch(function(){I()})}},[y,m,b]);var D,Z,F,R,z,N,O,T,A,L=(0,l.useState)(),M=L[0],U=L[1],P=(D=function(e){var n;U({height:e.blockSize,width:e.inlineSize})},F=(0,l.useRef)(),(0,l.useCallback)(function(e){var n;null===(n=F.current)||void 0===n||n.disconnect(),null!==e&&(F.current=new ResizeObserver(function(n){var t,r=(0,s.Z)(n,1)[0].contentRect;D({blockSize:r.height,inlineSize:r.width},e)}),F.current.observe(e))},[]));return(0,a.jsxs)(u.kC,{ref:P,sx:(0,o.Z)({alignItems:"center",backgroundColor:"headSection",backgroundImage:"url(/pattern.png)",backgroundRepeat:"repeat",backgroundSize:"10px",border:S?void 0:function(e){var n;return"1px solid ".concat(String(null===(n=e.colors)||void 0===n?void 0:n.darkBorder))},borderRadius:S?void 0:8,display:"flex",height:"100%",justifyContent:"center",overflow:"hidden"},void 0!==C&&C?{display:"none"}:{}),children:[b?(0,a.jsx)("iframe",{id:"__iframe-renderer",ref:E,src:b,style:(0,o.Z)({border:"none",maxHeight:"".concat(g.height,"px"),maxWidth:"".concat(g.width,"px"),minHeight:"".concat(g.height,"px"),minWidth:"".concat(g.width,"px"),overflowY:"auto"},M?{transform:"scale(".concat((R=g,z=M,N=R.height,O=R.width,T=z.height,A=z.width,O>A||N>T?O-A>N-T?A/O:T/N:1),")")}:{display:"none"})}):null,(null==y?void 0:y.connected)?(0,a.jsx)("div",{id:"__iframe-ready"}):null]})}},3622:function(e,n,t){"use strict";t.r(n),t.d(n,{default:function(){return eb}});var r,i,o,s,c=t(52322),a=t(97729),l=t.n(a),u=t(62230),d=t(85244),x=t(2784),f=t(71463),h=t(71651),p=t(87608),v=t(75289),m=t(65077),g=t(5632),b=t.n(g),C=t(56577),j=t(19909),S=function(e){var n=e.defaultValue,t=e.variations,r=e.MenuItemAction,i=e.onChange;return(0,c.jsxs)(v.xu,{sx:{py:0,flexDirection:"column",backgroundColor:"headSection",overflow:"auto",display:"flex",borderRadius:"4px",border:function(e){var n;return"1px solid ".concat(null===(n=e.colors)||void 0===n?void 0:n.borders)},boxShadow:"0 10px 10px rgba(0, 0, 0, 0.05)",maxHeight:340,minWidth:250,maxWidth:350,color:"text"},children:[(0,c.jsxs)(v.xv,{sx:{p:3,fontSize:12,color:"textClear"},children:[t.length," VARIATION",t.length>1?"S":""]}),(0,c.jsxs)(v.kC,{sx:{p:0,flexDirection:"column"},children:[t.map(function(e){return(0,c.jsx)(k,{value:e,isActive:e.id===n.id,onClick:i},e.id)}),r||null]})]})},k=function(e){var n=e.value,t=e.isActive,r=e.onClick;return(0,c.jsx)(v.xu,{sx:{px:3,py:2,color:t?"primary":"",cursor:"pointer",borderLeft:function(e){var n=e.colors;return"2px solid ".concat(t?null==n?void 0:n.primary:null==n?void 0:n.background)},borderRadius:0,bg:"background",":hover":{bg:"hoverBackground",borderLeft:function(e){var n=e.colors;return"2px solid ".concat(null==n?void 0:n.primary)}}},onClick:function(){return r(n)},children:n.name})},y=t(75100),E=function(e){var n=e.buttonSx,t=e.defaultValue,r=e.variations,i=e.onNewVariation,o=e.onChange,s=e.sx,a=e.disabled,l=(0,x.useState)(!1),d=l[0],f=l[1],h=(0,x.useState)(t||r[0]),p=h[0],m=h[1];(0,x.useEffect)(function(){t&&m(t)},[t]);var g=function(e){f(!1),m(e),setTimeout(function(){return o(e)},210)},b=(0,c.jsx)(v.xu,{sx:{p:2},children:(0,c.jsx)(v.zx,{variant:"transparent",sx:{color:"text"},onClick:function(){f(!1),i&&i()},children:"+ Add new variation"})});return(0,c.jsx)(v.xu,{sx:s,children:(0,c.jsx)(j.Popover,{align:"start",isOpen:d,onClickOutside:function(){return f(!1)},positions:["bottom"],padding:10,content:function(){return(0,c.jsx)(S,{defaultValue:p,variations:r,onChange:g,MenuItemAction:i?b:void 0})},containerClassName:"variationSelectorContainer",children:(0,c.jsxs)(v.zx,{sx:(0,u.Z)({},n),variant:"dropDownButton",onClick:function(){return f(!d)},disabled:a,children:[p.name," ",d?(0,c.jsx)(y.bOz,{size:"16px","aria-label":"Collapse variations"}):(0,c.jsx)(y.mEq,{size:"16px","aria-label":"Expand variations"})]})})})},w=function(e){return(0,c.jsxs)("svg",(0,d.Z)((0,u.Z)({viewBox:"0 0 72 72",xmlns:"http://www.w3.org/2000/svg"},e),{children:[(0,c.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M51.3304 19.693C50.9182 18.9787 50.2527 18.6526 50.2527 18.6526L64.7906 10.2077C65.5266 9.78011 66.4679 10.0339 66.8929 10.7745C67.3179 11.5151 67.0657 12.4622 66.3294 12.8898L52.639 20.8424C52.639 20.8424 51.7428 20.4072 51.3304 19.693Z",fill:"current"}),(0,c.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M47.6775 54.7814C58.0794 48.7394 61.6433 35.3572 55.6378 24.8917C54.7801 23.397 53.7736 22.0427 52.6481 20.8367L32.9428 32.2832C32.2068 32.7108 31.2655 32.457 30.8405 31.7165C30.4155 30.9757 30.6677 30.0287 31.4039 29.6011L50.2693 18.6425C43.486 13.2668 33.8645 12.2736 25.9299 16.8827C15.5282 22.9249 11.9642 36.3071 17.9697 46.7727C18.8274 48.2671 19.8339 49.6216 20.9595 50.8276L41.1791 39.0822C41.9151 38.6546 42.8564 38.9086 43.2814 39.6492C43.7064 40.3897 43.4542 41.3368 42.7182 41.7644L23.3384 53.0217C30.1217 58.3975 39.7432 59.3906 47.6775 54.7814Z",fill:"current"}),(0,c.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M5.20645 61.7656C4.78145 61.0248 5.03367 60.078 5.76978 59.6502L20.9371 50.8398C20.9371 50.8398 21.8578 51.2406 22.3053 51.7062C22.7528 52.1717 23.361 53.0078 23.361 53.0078L7.30887 62.3323C6.57274 62.7599 5.63144 62.5061 5.20645 61.7656Z",fill:"current"})]}))},_=t(56580),I=t(52039),D=function(e,n,t){if(!n){b().push("/".concat(e.href,"/").concat(e.model.name));return}var r,i,o,s,c,a,l,u,d,x=(i=(r={lib:e.href,sliceName:e.model.name,variationId:null==n?void 0:n.id,isSimulator:t}).lib,o=r.sliceName,s=r.variationId,a=void 0===(c=r.options)?{}:c,l=r.isSimulator,u="/slices/[lib]/[sliceName]/[variation]".concat(l?"/simulator":""),d="/slices/".concat(i,"/").concat(o,"/").concat(s).concat(l?"/simulator":""),{href:u,as:d,options:a,all:[u,d,a]});b().push(x.href,x.as,x.options)},Z=function(e){var n=e.slice,t=e.variation,r=e.isDisplayEditor,i=e.toggleIsDisplayEditor,o=e.onSaveMock,s=e.actionsDisabled,a=(0,_.v9)(function(e){return{savingMock:(0,I.S3)(e)}}).savingMock;return(0,c.jsxs)(v.kC,{sx:{p:"16px",display:"flex",bg:"grey07",gridTemplateRows:"1fr",borderBottom:"1px solid #DCDBDD",justifyContent:"space-between"},children:[(0,c.jsxs)(v.kC,{sx:{alignItems:"center"},children:[(0,c.jsx)(w,{height:"20px",width:"20px",fill:"#1A1523"}),(0,c.jsx)(v.xv,{sx:{ml:2,mr:"12px",fontSize:"14px",color:"#1A1523",fontWeight:"600",letterSpacing:"-0.15px"},children:n.model.name}),(0,c.jsx)(E,{defaultValue:t,variations:n.model.variations,onChange:function(e){return D(n,e,!0)},disabled:n.model.variations.length<=1||s})]}),(0,c.jsxs)(v.kC,{sx:{alignItems:"center",justifyContent:"space-between"},children:[(0,c.jsx)(v.kC,{sx:{alignItems:"center",justifyContent:"space-around"},children:(0,c.jsxs)(v.kC,{sx:{alignItems:"center",mr:4},children:[(0,c.jsx)(v.__,{htmlFor:"show-mock-editor",sx:{color:"#6F6E77",lineHeight:"16px",fontSize:"12px",fontWeight:"600",letterSpacing:"0px"},children:"Editor"}),(0,c.jsx)(v.rs,{id:"show-mock-editor",checked:r,onChange:i,disabled:s})]})}),(0,c.jsx)(C.z,{"data-cy":"save-mock",onClick:o,label:"Save mock content",disabled:a||s,variant:"primary",sx:{borderRadius:"6px",color:"#F1EEFE",fontWeight:"bold",border:"1px solid #5842C3",backgroundColor:"#6E56CF",boxShadow:"0px 1px 0px rgba(0, 0, 0, 0.04)","&:hover":{"&:not([disabled])":{backgroundColor:"#5842C3"}}}})]})]})},F=t(82770),R=t(39092),z=function(e){var n=e.defaultValue,t=e.options,r=e.onChange;return(0,c.jsx)(v.xu,{sx:{py:0,flexDirection:"column",backgroundColor:"headSection",overflow:"auto",display:"flex",borderRadius:"6px",border:function(e){var n;return"1px solid ".concat(String(null===(n=e.colors)||void 0===n?void 0:n.darkBorder))},boxShadow:"0 10px 10px rgba(0, 0, 0, 0.05)",maxHeight:340,minWidth:180,maxWidth:350,color:"text"},children:(0,c.jsx)(v.kC,{sx:{p:0,flexDirection:"column"},children:t.map(function(e){return(0,c.jsx)(N,{value:e,isActive:e===n,onClick:r})})})})},N=function(e){var n=e.value,t=e.isActive,r=e.onClick;return(0,c.jsx)(v.xu,{sx:{p:2,cursor:"pointer",fontSize:"14px",borderRadius:0,bg:t?"hoverBackground":"background",":hover":{bg:"hoverBackground"}},onClick:function(){return r(n)},children:n})},O=function(e){var n=e.buttonSx,t=e.currentValue,r=e.options,i=e.onChange,o=e.disabled,s=(0,x.useState)(!1),a=s[0],l=s[1],u=function(e){l(!1),setTimeout(function(){return i(e)},210)};return(0,c.jsx)(v.xu,{children:(0,c.jsx)(j.Popover,{align:"start",isOpen:a,onClickOutside:function(){return l(!1)},positions:["bottom"],padding:2,content:function(){return(0,c.jsx)(z,{defaultValue:t,options:r,onChange:u})},children:(0,c.jsxs)(v.zx,{sx:n,variant:"dropDownButton",onClick:function(){return l(!a)},disabled:o,children:[t," ",a?(0,c.jsx)(y.bOz,{size:"24px"}):(0,c.jsx)(y.mEq,{size:"24px"})]})})})},T=t(67557);(s=r||(r={})).DESKTOP="Desktop",s.TABLET="Tablet",s.MOBILE="Mobile",s.CUSTOM="Custom";var A=(i={},(0,T.Z)(i,r.DESKTOP,{width:1280,height:800}),(0,T.Z)(i,r.TABLET,{width:1080,height:810}),(0,T.Z)(i,r.MOBILE,{width:390,height:844}),i),L=function(e){var n=e.label,t=e.startValue,r=e.onChange,i=e.sx,o=e.disabled,s=["e","-","+",",","."];return(0,c.jsxs)(v.kC,{sx:(0,u.Z)({alignItems:"center"},i),children:[(0,c.jsx)(v.__,{sx:{backgroundColor:"grey07",border:"transparent",borderRight:function(e){var n;return"1px solid ".concat(String(null===(n=e.colors)||void 0===n?void 0:n.darkBorder))},borderRadius:"6px 0px 0px 6px",width:26,height:30,color:"greyIcon",fontWeight:"bold",fontSize:"14px",alignItems:"center",justifyContent:"center",position:"absolute",ml:"1px"},htmlFor:"".concat(n,"-screensize-input"),children:n}),(0,c.jsx)(v.II,{type:"number",name:"".concat(n,"-screensize-input"),disabled:o,sx:{width:80,height:32,p:0,border:"1px solid #E4E2E4",borderRadius:"6px","&::-webkit-outer-spin-button,&::-webkit-inner-spin-button":{WebkitAppearance:"none",margin:0},color:"greyIcon",textAlign:"center",paddingLeft:26,"&:disabled":{cursor:"not-allowed","&:hover":{border:"1px solid #E4E2E4"},"&:active":{border:"1px solid #E4E2E4",boxShadow:"none"}}},onChange:r,value:t,min:"0",onKeyDown:function(e){s.includes(e.key)&&e.preventDefault()}})]})},M=function(e){e.slice,e.variation;var n=e.handleScreenSizeChange,t=e.screenDimensions,i=e.actionsDisabled,o=(0,x.useState)(r.DESKTOP),s=o[0],a=o[1],l=function(e){a(e),e!==r.CUSTOM&&n(A[e])},f=function(e){var t=Object.values(A).findIndex(function(n){return JSON.stringify(n)===JSON.stringify(e)}),i=t<0?r.CUSTOM:Object.keys(A)[t];a(i),n(e)};return(0,c.jsx)(v.kC,{sx:{alignItems:"center",pb:"16px",justifyContent:"space-between",variant:"small"},children:(0,c.jsxs)(v.kC,{sx:{alignItems:"center",flex:1},children:[(0,c.jsx)(O,{options:Object.values(r),onChange:l,buttonSx:{alignSelf:"start"},currentValue:s,disabled:i}),(0,c.jsx)(L,{label:"W",startValue:t.width.toString(),onChange:function(e){f((0,d.Z)((0,u.Z)({},t),{width:Number(e.target.value)}))},disabled:i,sx:{mx:2}}),(0,c.jsx)(y.eSQ,{size:16,color:"#6F6E77"}),(0,c.jsx)(L,{label:"H",startValue:t.height.toString(),onChange:function(e){f((0,d.Z)((0,u.Z)({},t),{height:Number(e.target.value)}))},disabled:i,sx:{ml:2}})]})})},U=t(25812),P=t(77174),W=t(24340),B=t(90374),H=t(54132),V=t(61931),q=function(e){var n=e.sliceName,t=e.screenshotUrl,r=(0,_.v9)(function(e){return{isScreenshotModalOpen:(0,P.gP)(e,W.q.SCREENSHOT_PREVIEW)}}).isScreenshotModalOpen,i=(0,B.Z)().closeModals;return(0,c.jsx)(U.Z,{isOpen:r,shouldCloseOnOverlayClick:!0,contentLabel:"Screenshot Preview",portalClassName:"ScreenshotPreviewModal",onRequestClose:i,children:(0,c.jsx)(H.Z,{radius:"0px",bodySx:{p:0,bg:"#FFF",position:"relative",height:"100%",padding:16},footerSx:{position:"sticky",bottom:0,p:0},sx:{border:"none"},Header:function(){return(0,c.jsxs)(v.kC,{sx:{position:"sticky",top:0,zIndex:1,p:"16px",alignItems:"center",justifyContent:"space-between",borderBottom:function(e){var n;return"1px solid ".concat(String(null===(n=e.colors)||void 0===n?void 0:n.borders))}},children:[(0,c.jsxs)(v.X6,{sx:{fontSize:"14px"},children:["Screenshot Preview for ",n]}),(0,c.jsx)(v.x8,{type:"button",onClick:function(){return i()}})]})},Footer:function(){return(0,c.jsx)(v.kC,{style:{justifyContent:"flex-end",height:64,alignItems:"center",paddingRight:16,borderTop:"1px solid #DCDBDD"},children:(0,c.jsx)(v.zx,{variant:"secondary",sx:{fontWeight:600},onClick:function(){return i()},children:"Close"})})},children:(0,c.jsx)(V.q,{src:t,sx:{height:"320px"}})})})},X=t(25242),G=t(81541),K=function(e,n,t){var r=(0,x.useState)(e()),i=r[0],o=r[1],s=(0,x.useRef)(Date.now());return(0,x.useEffect)(function(){var t=setTimeout(function(){Date.now()-s.current>=n&&(o(e()),s.current=Date.now())},n-(Date.now()-s.current));return function(){clearTimeout(t)}},[n].concat((0,G.Z)(t))),i},Y=t(4597),J=function(e){var n=e.children,t=e.sx;return(0,c.jsx)(v.kC,{sx:(0,u.Z)({bg:"grey07",height:"90%",width:"100%",justifyContent:"center",alignItems:"center",zIndex:"1"},t),children:(0,c.jsx)(v.kC,{sx:{marginTop:"-128px",justifyContent:"center",flexDirection:"column",alignItems:"center"},children:n})})},Q=t(85819),$=function(e){var n=e.onRetrigger;return(0,c.jsxs)(J,{children:[(0,c.jsx)(v.Ee,{src:"/iframe-not-running.png",sx:{width:"320px"}}),(0,c.jsx)(v.xv,{sx:{color:"textClear",mb:2,fontSize:"14px",lineHeight:"24px",fontWeight:"600"},children:"Slice Machine can't render your Slice"}),(0,c.jsxs)(v.xv,{sx:{color:"failedConnectText",maxWidth:"400px",textAlign:"center",fontSize:"12px",lineHeight:"22px"},children:["Ensure your website's development server is running by typing",(0,c.jsx)("br",{}),(0,c.jsx)(v.xv,{as:"code",variant:"styles.inlineCode",sx:{padding:"4px",borderRadius:"6px"},children:"npm run dev"}),"\xa0 in your terminal at the root of your website directory.",(0,c.jsx)("br",{})," If that doesn't work, see the\xa0",(0,c.jsx)(v.rU,{target:"_blank",href:"https://prismic.io/docs/slice-machine",sx:{color:"link"},children:"troubleshooting instructions."})]}),(0,c.jsx)(C.z,{onClick:n,label:"Refresh",Icon:Q.Fer,iconSize:20,iconFill:"#6F6E77",variant:"secondaryMedium",sx:{mt:"16px"}})]})},ee=t(98240),en=t(92928),et=t(33402),er=t(59326),ei=t(86741),eo=t(65186),es=function(e){var n=e.children;return(0,c.jsx)(v.xu,{as:"code",sx:{bg:"rgba(0, 0, 0, 0.05)",borderRadius:3,padding:"2px 4px"},children:n})},ec=function(e){var n,t=e.children,r=(0,ee.Z)(e,["children"]),i=(0,er.B7)().theme,o=(0,x.useState)(!1),s=o[0],a=o[1],l=(0,x.useRef)(null),f=function(){l.current&&navigator.clipboard.writeText(l.current.innerText).then(function(){a(!0),setTimeout(function(){a(!1)},1200)}).catch(function(){})};return(0,c.jsxs)(v.xu,(0,d.Z)((0,u.Z)({},r),{sx:{backgroundColor:"codeBlockBackground",borderRadius:8},children:[(0,c.jsxs)(v.kC,{sx:{px:"26px",py:"22px",color:"#FFF",flexDirection:"row",justifyContent:"space-between",alignItems:"center",borderBottom:"1px solid rgba(111, 110, 119, 0.2)"},children:[(0,c.jsx)(v.kC,{sx:{alignItems:"center"}}),(0,c.jsxs)(v.zx,{onClick:f,variant:"transparent",sx:{display:"flex",justifyContent:"center",alignItems:"center",p:0,fontSize:"12px",color:"#FFF"},children:["Copy\xa0",s?(0,c.jsx)(eo.HhX,{size:16,color:String(null==i?void 0:null===(n=i.colors)||void 0===n?void 0:n.success)}):(0,c.jsx)(eo.Fqs,{size:16,style:{marginLeft:"8px"}})]})]}),(0,c.jsx)(v.xu,{ref:l,as:"pre",sx:{color:"#c9d1d9",padding:"16px 20px",overflow:"auto"},children:t})]}))},ea={code:function(e){var n=e.children;return(0,c.jsx)(es,{children:n})},pre:function(e){var n=e.children,t=(0,ee.Z)(e,["children"]);return(0,c.jsx)(ec,(0,d.Z)((0,u.Z)({},t),{children:n}))}},el=function(e){var n=e.html,t=e.components,r=void 0===t?{}:t,i={replace:function(e){if((0,et.Z)(e,ei.W_)&&e.attribs){var n=(0,ei.du)(e.children,i),t=(0,u.Z)({},r,ea)[e.name];if(t)return(0,c.jsx)(t,(0,d.Z)((0,u.Z)({name:e.name},e.attribs),{children:n}))}}};return(0,c.jsx)(c.Fragment,{children:(0,ei.ZP)(n,i)})},eu=function(e){var n=e.children.split("`").map(function(e,n){return n%2==1?(0,c.jsx)(es,{children:e}):e});return(0,c.jsx)(c.Fragment,{children:n})},ed=function(e){var n=e.number,t=e.title,r=e.excerpt,i=(0,ee.Z)(e,["number","title","excerpt"]);return(0,c.jsx)(en.OK,(0,d.Z)((0,u.Z)({className:"react-tabs__vertical__tab",selectedClassName:"react-tabs__vertical__tab--selected"},i),{children:(0,c.jsxs)(v.kC,{sx:{alignItems:"flex-start"},children:[(0,c.jsx)(ef,{number:n}),(0,c.jsxs)(v.xu,{sx:{ml:3,alignSelf:"center"},children:[(0,c.jsx)(v.X6,{as:"h4",sx:{color:"whiteButtonText",fontSize:"14px",fontWeight:"600"},children:(0,c.jsx)(eu,{children:t})}),r&&(0,c.jsx)(v.xv,{as:"p",sx:{mt:2,color:"textClear",fontSize:"13px",lineHeight:"24px"},children:(0,c.jsx)(eu,{children:r})})]})]})}))};ed.tabsRole="Tab";var ex,ef=function(e){var n=e.number;return(0,c.jsx)(v.kC,{sx:{height:"32px",width:"32px",alignItems:"center",justifyContent:"center",border:"1px solid #E4E2E4",borderRadius:"6px",bg:"grey07",color:"textClear",flexShrink:"0",fontSize:"13px"},children:n})},eh=function(e){var n=e.isOpen,t=(0,_.v9)(function(e){return{isSimulatorAvailableForFramework:(0,R.Ql)(e),setupSteps:(0,I.qe)(e)}}),r=t.isSimulatorAvailableForFramework,i=t.setupSteps||[];return(0,x.useEffect)(function(){n&&F.Xe.track({event:"slice-simulator:setup"})},[n]),(0,c.jsx)(U.Z,{isOpen:n,children:(0,c.jsx)(H.Z,{bodySx:{p:0,bg:"grey07",height:4===i.length?"640px":"480px"},Header:function(e){var n=e.radius;return(0,c.jsx)(v.kC,{sx:{position:"sticky",top:0,zIndex:1,p:"16px",pl:4,bg:"grey07",alignItems:"center",justifyContent:"space-between",borderTopLeftRadius:n,borderTopRightRadius:n,borderBottom:function(e){var n;return"1px solid ".concat(String(null===(n=e.colors)||void 0===n?void 0:n.borders))}},children:(0,c.jsx)(v.X6,{sx:{fontSize:"14px",fontWeight:"600"},as:"h5",children:"Set up the simulator"})})},children:(0,c.jsxs)(en.mQ,{defaultFocus:!0,className:"react-tabs__vertical",children:[(0,c.jsx)(en.td,{className:"react-tabs__vertical__tab-list",children:i.map(function(e,n){return(0,c.jsx)(ed,{number:n+1,title:e.title,excerpt:e.description},e.title)})}),r?(0,c.jsx)(c.Fragment,{children:i.map(function(e){return(0,c.jsx)(en.x4,{selectedClassName:"react-tabs__vertical__tab-panel--selected",className:"react-tabs__vertical__tab-panel",children:(0,c.jsx)(el,{html:e.body})},e.title)})}):(0,c.jsx)(en.x4,{selectedClassName:"react-tabs__vertical__tab-panel--selected",className:"react-tabs__vertical__tab-panel",children:"Framework not supported."})]})})})},ep=t(53559);(ex=o||(o={})).LOADING_SETUP="LOADING_SETUP",ex.LOADING_IFRAME="LOADING_IFRAME",ex.FAILED_SETUP="FAILED_SETUP",ex.FAILED_CONNECT="FAILED_CONNECT",ex.SUCCESS="SUCCESS";var ev=function(e){var n,t,i=e.slice,s=e.variation,a=(0,B.Z)(),l=a.checkSimulatorSetup,g=a.connectToSimulatorIframe,b=a.saveSliceMock,C=(0,_.v9)(function(e){return{simulatorUrl:(0,R.x0)(e),iframeStatus:(0,I.NL)(e),manifestStatus:(0,I.tD)(e).manifest,isWaitingForIFrameCheck:(0,I.oM)(e),endpoints:(0,R.gZ)(e)}}),j=C.simulatorUrl,S=C.iframeStatus,k=C.manifestStatus,y=C.isWaitingForIFrameCheck,E=C.endpoints,w=(0,x.useMemo)(function(){return{embedsUrl:E.PrismicOembed,env:"prod",unsplashUrl:E.PrismicUnsplash}},[E.PrismicOembed,E.PrismicUnsplash]),D=(0,x.useRef)(null),z=(0,x.useCallback)(function(){return l()},[]);(0,x.useEffect)(function(){l(),F.Xe.track({event:"slice-simulator:open"})},[]);var N=(0,x.useRef)(!1);(0,x.useEffect)(function(){N.current=!0},[]);var O=function(e){N.current&&(N.current=!1,F.Xe.track({event:"editor:widget-used",sliceId:e}))},T="ko"===k?o.FAILED_SETUP:"ok"===k?y||!S?o.LOADING_IFRAME:"ok"!==S?o.FAILED_CONNECT:o.SUCCESS:(0,o.LOADING_SETUP);(0,x.useEffect)(function(){if(T===o.FAILED_SETUP&&!D.current){var e=setInterval(function(){z()},3e3);D.current=e}},[T]),(0,x.useEffect)(function(){"ok"===k&&(D.current&&clearInterval(D.current),g())},[k]),(0,x.useEffect)(function(){T===o.FAILED_CONNECT&&F.Xe.track({event:"slice-simulator:is-not-running"})},[T]),(0,x.useEffect)(function(){T===o.SUCCESS&&es(!0)},[T]);var L=function(){g()},U=(0,x.useState)(A[r.DESKTOP]),P=U[0],W=U[1],H=(0,x.useMemo)(function(){return ep.id.fromSM(i.model)},[i.model]),V=(0,x.useState)(null),G=V[0],Q=V[1],ee=(0,x.useMemo)(function(){var e;return(null==G?void 0:G.variation)===s.id?G:(null===(e=i.mocks)||void 0===e?void 0:e.find(function(e){return e.variation===s.id}))||(0,p.W)(s.id)},[G,s.id]),en=(0,x.useMemo)(function(){return(0,X.renderSliceMock)(H,ee).id},[]),et=(0,x.useCallback)(function(){return function(){return(0,d.Z)((0,u.Z)({},(0,X.renderSliceMock)(H,ee)),{id:en})}},[H,ee]),er=K(et,800,[H,ee,]),ei=(0,x.useState)(!1),eo=ei[0],es=ei[1];return(0,c.jsxs)(v.kC,{sx:{flexDirection:"column",height:"100vh"},children:[(0,c.jsx)(eh,{isOpen:T===o.FAILED_SETUP}),(0,c.jsx)(Z,{slice:i,variation:s,isDisplayEditor:eo,actionsDisabled:T!==o.SUCCESS,toggleIsDisplayEditor:function(){return es(!eo)},onSaveMock:function(){return G&&b({libraryID:i.from,sliceID:i.model.id,mocks:(i.mocks||[]).filter(function(e){return e.variation!==G.variation}).concat(G)})}}),(0,c.jsx)(v.xu,{sx:{flex:1,bg:"grey07",p:3,display:"flex",flexDirection:"column",height:"calc(100% - 73px - 16px)"},children:(0,c.jsxs)(v.kC,{sx:{flex:1,flexDirection:"row",position:"relative",width:"100%",height:"100%"},children:[(0,c.jsxs)(m.xR,{sx:{display:"flex",height:"100%",flexDirection:"column",flex:1,minWidth:0},children:[(0,c.jsx)(M,{slice:i,variation:s,handleScreenSizeChange:W,screenDimensions:P,actionsDisabled:T!==o.SUCCESS}),T===o.FAILED_CONNECT?(0,c.jsx)($,{onRetrigger:L}):null,T===o.SUCCESS?(0,c.jsx)(Y.Z,{apiContent:er,screenDimensions:P,simulatorUrl:j}):(0,c.jsx)(c.Fragment,{children:T===o.LOADING_IFRAME?(0,c.jsxs)(J,{children:[(0,c.jsx)(v.$j,{variant:"styles.spinner"}),(0,c.jsx)(Y.Z,{apiContent:er,screenDimensions:P,simulatorUrl:j,dryRun:!0})]}):null})]}),T===o.SUCCESS?(0,c.jsx)(v.xu,{className:"editor",sx:(0,u.Z)({marginLeft:"16px",maxWidth:"440px",minWidth:"440px",overflowY:"auto"},eo?{display:"flex",flexDirection:"column"}:{display:"none"}),children:(0,c.jsx)(h.SV,{renderError:function(){return(0,c.jsx)(h.Iq,{title:"Editor error",description:"An error occurred while rendering the editor."})},children:(0,c.jsx)(x.Suspense,{children:(0,c.jsx)(f.kS,{config:w,content:ee,onContentChange:function(e){Q(e),O(i.model.id)},sharedSlice:H},s.id)})})}):null]})}),!!(null===(n=i.screenshots[s.id])||void 0===n?void 0:n.url)&&(0,c.jsx)(q,{sliceName:i.model.name,screenshotUrl:null===(t=i.screenshots[s.id])||void 0===t?void 0:t.url})]})},em=t(28684),eg=(0,t(57880).y)(ev);function eb(){var e=(0,em.Z)().slice;return(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)(l(),{children:(0,c.jsxs)("title",{children:[e?"Simulator: ".concat(e.model.name):"Simulator"," - Slice Machine"]})}),(0,c.jsx)(eg,{})]})}},28684:function(e,n,t){"use strict";var r=t(92521),i=t(90374),o=t(5632),s=t(2784),c=t(56580),a=function(){var e=(0,o.useRouter)(),n=(0,i.Z)().initSliceStore,t=(0,c.v9)(function(n){return{slice:(0,r.tL)(n,e.query.lib,e.query.sliceName)}}).slice;if((0,s.useEffect)(function(){t?n(t):e.replace("/")},[n,t,e]),!t)return{};var a=t.model.variations.find(function(n){return n.id===e.query.variation});return a?{slice:t,variation:a}:(e.replace("/"),{})};n.Z=a},57880:function(e,n,t){"use strict";t.d(n,{y:function(){return c}});var r=t(62230),i=t(52322);t(2784);var o=t(28684),s=t(95583),c=function(e){return function(n){var t=n.pageProps,c=(0,o.Z)(),a=c.slice,l=c.variation;return a&&l?(0,i.jsx)(e,(0,r.Z)({slice:a,variation:l},t)):((0,s.gx)("/"),null)}}},87608:function(e,n,t){"use strict";t.d(n,{W:function(){return r}});var r=function(e){return{__TYPE__:"SharedSliceContent",variation:e,primary:{},items:[]}}}},function(e){e.O(0,[789,872,851,746,770,774,888,179],function(){return e(e.s=30755)}),_N_E=e.O()}]);
@@ -1 +0,0 @@
1
- <!DOCTYPE html><html><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width"/><title>Slice Machine</title><meta name="next-head-count" content="3"/><link rel="preload" href="/_next/static/css/66b3836ab88b0c5c.css" as="style"/><link rel="stylesheet" href="/_next/static/css/66b3836ab88b0c5c.css" data-n-g=""/><noscript data-n-css=""></noscript><script defer="" nomodule="" src="/_next/static/chunks/polyfills-c67a75d1b6f99dc8.js"></script><script src="/_next/static/chunks/webpack-2f903acb0cccbf9e.js" defer=""></script><script src="/_next/static/chunks/framework-cdccea7a52cc6e81.js" defer=""></script><script src="/_next/static/chunks/main-5e6780279ca21cb9.js" defer=""></script><script src="/_next/static/chunks/pages/_app-d27e49f9f618a421.js" defer=""></script><script src="/_next/static/chunks/746-2ca4784811bde7c1.js" defer=""></script><script src="/_next/static/chunks/pages/slices/%5Blib%5D/%5BsliceName%5D/%5Bvariation%5D/screenshot-76d40513025fd76d.js" defer=""></script><script src="/_next/static/OxAI7JbjsT4zST5HlKNEI/_buildManifest.js" defer=""></script><script src="/_next/static/OxAI7JbjsT4zST5HlKNEI/_ssgManifest.js" defer=""></script></head><body><div id="__next"><style data-emotion="css-global 413pep">html{--theme-ui-colors-text:#25252D;--theme-ui-colors-textClear:#6F6E77;--theme-ui-colors-grayLight:#E8E8ED;--theme-ui-colors-hoverBackground:#f2f2f2;--theme-ui-colors-background:#FFF;--theme-ui-colors-backgroundClear:#FFF;--theme-ui-colors-primary:#5D40F7;--theme-ui-colors-purpleLight:#F6F1FC;--theme-ui-colors-purpleLight01:#6548FF1A;--theme-ui-colors-purple12:#F1EEFE;--theme-ui-colors-purpleStrong:#5842C3;--theme-ui-colors-whiteButtonText:#1A1523;--theme-ui-colors-codeBlockBackground:#32275F;--theme-ui-colors-failedConnectText:#86848D;--theme-ui-colors-changesWarning-background:#FFECC7;--theme-ui-colors-changesWarning-color:#5C0C17;--theme-ui-colors-greyIcon:#6F6E77;--theme-ui-colors-greyIconDisabled:#C9D0D8;--theme-ui-colors-missingScreenshotBanner-color:#5C0C17;--theme-ui-colors-missingScreenshotBanner-bg:#FFECC7;--theme-ui-colors-badge-new-bg:#DBEDDB;--theme-ui-colors-badge-new-color:#05644D;--theme-ui-colors-badge-modified-bg:#FFECC7;--theme-ui-colors-badge-modified-color:#5C0C17;--theme-ui-colors-badge-synced-bg:purple12;--theme-ui-colors-badge-synced-color:#5842C3;--theme-ui-colors-badge-deleted-bg:rgba(203, 36, 49, 0.1);--theme-ui-colors-badge-unknown-bg:#F3F5F7;--theme-ui-colors-badge-unknown-color:#9AA4AF;--theme-ui-colors-codeBlockBorder:#545454;--theme-ui-colors-secondary:#F9FAFB;--theme-ui-colors-danger:#CB2431;--theme-ui-colors-highlight:hsl(10, 40%, 90%);--theme-ui-colors-purple:#5B3DF5;--theme-ui-colors-purple08:#5842C3;--theme-ui-colors-muted:#F9F9FB;--theme-ui-colors-icons:#8091A5;--theme-ui-colors-gray:#F8F9FA;--theme-ui-colors-grey01:#F3F5F7;--theme-ui-colors-grey02:#E6E6EA;--theme-ui-colors-grey03:#F4F2F4;--theme-ui-colors-grey04:#9AA4AF;--theme-ui-colors-grey05:#667587;--theme-ui-colors-grey07:#F9F8F9;--theme-ui-colors-grey10:#86848D;--theme-ui-colors-grey12:#1A1523;--theme-ui-colors-greyTransparent:rgba(37, 37, 45, 0.4);--theme-ui-colors-borders:#E4E2E4;--theme-ui-colors-bordersFocused:#6E56CF;--theme-ui-colors-deep:#0E2150;--theme-ui-colors-deep1:#A0ADE7;--theme-ui-colors-lightGreen:#EBF8F1;--theme-ui-colors-lightOrange:#FDF4EC;--theme-ui-colors-darkOrange:#C17C10;--theme-ui-colors-error:#E55737;--theme-ui-colors-success:#3AB97A;--theme-ui-colors-headSection:#fff;--theme-ui-colors-warning:#E67E22;--theme-ui-colors-warning02:#ED811C;--theme-ui-colors-sidebar:#F1F1F4;--theme-ui-colors-link:#6E56CF;--theme-ui-colors-choggleBox:#5163BA;--theme-ui-colors-darkBorder:#DCDBDD;--theme-ui-colors-code-border:#DFE1E5;--theme-ui-colors-code-blue:#3B41BD;--theme-ui-colors-code-gray:#667587;--theme-ui-colors-code-orange:#EA6D46;--theme-ui-colors-code-green:#3AB97A;color:var(--theme-ui-colors-text);background-color:var(--theme-ui-colors-background);}html.theme-ui-light,.theme-ui-light html{--theme-ui-colors-text:#25252D;--theme-ui-colors-textClear:#6F6E77;--theme-ui-colors-grayLight:#E8E8ED;--theme-ui-colors-hoverBackground:#f2f2f2;--theme-ui-colors-background:#FFF;--theme-ui-colors-backgroundClear:#FFF;--theme-ui-colors-primary:#5D40F7;--theme-ui-colors-purpleLight:#F6F1FC;--theme-ui-colors-purpleLight01:#6548FF1A;--theme-ui-colors-purple12:#F1EEFE;--theme-ui-colors-purpleStrong:#5842C3;--theme-ui-colors-whiteButtonText:#1A1523;--theme-ui-colors-codeBlockBackground:#32275F;--theme-ui-colors-failedConnectText:#86848D;--theme-ui-colors-changesWarning-background:#FFECC7;--theme-ui-colors-changesWarning-color:#5C0C17;--theme-ui-colors-greyIcon:#6F6E77;--theme-ui-colors-greyIconDisabled:#C9D0D8;--theme-ui-colors-missingScreenshotBanner-color:#5C0C17;--theme-ui-colors-missingScreenshotBanner-bg:#FFECC7;--theme-ui-colors-badge-new-bg:#DBEDDB;--theme-ui-colors-badge-new-color:#05644D;--theme-ui-colors-badge-modified-bg:#FFECC7;--theme-ui-colors-badge-modified-color:#5C0C17;--theme-ui-colors-badge-synced-bg:purple12;--theme-ui-colors-badge-synced-color:#5842C3;--theme-ui-colors-badge-deleted-bg:rgba(203, 36, 49, 0.1);--theme-ui-colors-badge-unknown-bg:#F3F5F7;--theme-ui-colors-badge-unknown-color:#9AA4AF;--theme-ui-colors-codeBlockBorder:#545454;--theme-ui-colors-secondary:#F9FAFB;--theme-ui-colors-danger:#CB2431;--theme-ui-colors-highlight:hsl(10, 40%, 90%);--theme-ui-colors-purple:#5B3DF5;--theme-ui-colors-purple08:#5842C3;--theme-ui-colors-muted:#F9F9FB;--theme-ui-colors-icons:#8091A5;--theme-ui-colors-gray:#F8F9FA;--theme-ui-colors-grey01:#F3F5F7;--theme-ui-colors-grey02:#E6E6EA;--theme-ui-colors-grey03:#F4F2F4;--theme-ui-colors-grey04:#9AA4AF;--theme-ui-colors-grey05:#667587;--theme-ui-colors-grey07:#F9F8F9;--theme-ui-colors-grey10:#86848D;--theme-ui-colors-grey12:#1A1523;--theme-ui-colors-greyTransparent:rgba(37, 37, 45, 0.4);--theme-ui-colors-borders:#E4E2E4;--theme-ui-colors-bordersFocused:#6E56CF;--theme-ui-colors-deep:#0E2150;--theme-ui-colors-deep1:#A0ADE7;--theme-ui-colors-lightGreen:#EBF8F1;--theme-ui-colors-lightOrange:#FDF4EC;--theme-ui-colors-darkOrange:#C17C10;--theme-ui-colors-error:#E55737;--theme-ui-colors-success:#3AB97A;--theme-ui-colors-headSection:#fff;--theme-ui-colors-warning:#E67E22;--theme-ui-colors-warning02:#ED811C;--theme-ui-colors-sidebar:#F1F1F4;--theme-ui-colors-link:#6E56CF;--theme-ui-colors-choggleBox:#5163BA;--theme-ui-colors-darkBorder:#DCDBDD;--theme-ui-colors-code-border:#DFE1E5;--theme-ui-colors-code-blue:#3B41BD;--theme-ui-colors-code-gray:#667587;--theme-ui-colors-code-orange:#EA6D46;--theme-ui-colors-code-green:#3AB97A;}html.theme-ui-dark,.theme-ui-dark html{--theme-ui-colors-text:#fff;--theme-ui-colors-textClear:#6E707B;--theme-ui-colors-hoverBackground:#202020;--theme-ui-colors-grey02:#E6E6EA;--theme-ui-colors-background:#202022;--theme-ui-colors-backgroundClear:#28282C;--theme-ui-colors-primary:#4E54D7;--theme-ui-colors-secondary:#28282C;--theme-ui-colors-icons:#5D5D71;--theme-ui-colors-gray:#1D1D1F;--theme-ui-colors-borders:#3A3A46;--theme-ui-colors-deep:#28282C;--theme-ui-colors-headSection:#28282C;--theme-ui-colors-warning:#E67E22;--theme-ui-colors-sidebar:#28282C;--theme-ui-colors-code-border:#5D5D6F;--theme-ui-colors-code-blue:#3B41BD;--theme-ui-colors-code-gray:#667587;--theme-ui-colors-code-orange:#EA6D46;--theme-ui-colors-code-green:#3AB97A;--theme-ui-colors-link:#A9A9C6;--theme-ui-colors-choggleBox:#fff;}</style><style data-emotion="css-global h19pgh">*{box-sizing:border-box;}html{font-family:system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",sans-serif;line-height:1.5;font-weight:400;}body{margin:0;}</style><style data-emotion="css yvak7d">.css-yvak7d{box-sizing:border-box;margin:0;min-width:0;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;height:calc(100vh - 57px);width:100vw;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;-webkit-justify-content:center;justify-content:center;}</style><div class="css-yvak7d"><style data-emotion="css uqm8ih">.css-uqm8ih{box-sizing:border-box;margin:0;min-width:0;color:var(--theme-ui-colors-primary);overflow:visible;}</style><svg stroke-width="4" viewBox="0 0 32 32" width="48" height="48" fill="none" stroke="currentColor" role="img" id="spinner" class="css-uqm8ih"><title>Loading</title><circle stroke-width="4" r="12" cx="16" cy="16" fill="none" opacity="0.125"></circle><circle stroke-width="4" r="12" cx="16" cy="16" fill="none" stroke-dasharray="20 110"><animateTransform attributeName="transform" attributeType="XML" type="rotate" from="0 16 16" to="360 16 16" dur="750ms" repeatCount="indefinite"></animateTransform></circle></svg></div></div><script id="__NEXT_DATA__" type="application/json">{"props":{"pageProps":{}},"page":"/slices/[lib]/[sliceName]/[variation]/screenshot","query":{},"buildId":"OxAI7JbjsT4zST5HlKNEI","runtimeConfig":{"sentryEnvironment":"alpha"},"nextExport":true,"isFallback":false,"appGip":true,"scriptLoader":[]}</script></body></html>
@@ -1,61 +0,0 @@
1
- import IframeRenderer from "@components/Simulator/components/IframeRenderer";
2
-
3
- import useEditorContentOnce from "@src/hooks/useEditorContent";
4
- import {
5
- ComponentWithSliceProps,
6
- createComponentWithSlice,
7
- } from "@src/layouts/WithSlice";
8
- import { selectSimulatorUrl } from "@src/modules/environment";
9
- import { SliceMachineStoreType } from "@src/redux/type";
10
- import { FC, ReactNode } from "react";
11
- import { useRouter } from "next/router";
12
- import { useSelector } from "react-redux";
13
- import { Box } from "theme-ui";
14
-
15
- const CustomLayout: FC<{ children: ReactNode }> = ({ children }) => (
16
- <>{children}</>
17
- );
18
-
19
- const Screenshot: ComponentWithSliceProps = ({ slice, variation }) => {
20
- const { simulatorUrl } = useSelector((store: SliceMachineStoreType) => ({
21
- simulatorUrl: selectSimulatorUrl(store),
22
- }));
23
- const router = useRouter();
24
- const screenWidth = Number(router.query.screenWidth);
25
- const screenHeight = Number(router.query.screenHeight);
26
-
27
- const { apiContent } = useEditorContentOnce({
28
- slice,
29
- variationID: variation.id,
30
- });
31
-
32
- if (simulatorUrl === undefined) {
33
- return null;
34
- }
35
-
36
- return (
37
- <Box
38
- as="main"
39
- sx={{
40
- height: "100vh",
41
- width: "100vw",
42
- border: "none",
43
- }}
44
- >
45
- <IframeRenderer
46
- simulatorUrl={simulatorUrl}
47
- apiContent={apiContent}
48
- screenDimensions={{
49
- width: screenWidth,
50
- height: screenHeight,
51
- }}
52
- isScreenshot
53
- />
54
- </Box>
55
- );
56
- };
57
-
58
- const WithSlice = createComponentWithSlice(Screenshot);
59
- WithSlice.CustomLayout = CustomLayout;
60
-
61
- export default WithSlice;
@@ -1,41 +0,0 @@
1
- [
2
- {
3
- "__TYPE__": "SharedSliceContent",
4
- "variation": "default-slice",
5
- "primary": {
6
- "section_title": {
7
- "__TYPE__": "FieldContent",
8
- "value": "enhance real-time architectures",
9
- "type": "Text"
10
- }
11
- },
12
- "items": [
13
- {
14
- "__TYPE__": "GroupItemContent",
15
- "value": [
16
- [
17
- "link",
18
- {
19
- "__TYPE__": "LinkContent",
20
- "value": {
21
- "id": "mock_document_id",
22
- "__TYPE__": "DocumentLink"
23
- }
24
- }
25
- ],
26
- [
27
- "link",
28
- {
29
- "__TYPE__": "LinkContent",
30
- "value": {
31
- "url": "https://slicemachine.dev",
32
- "__TYPE__": "ExternalLink",
33
- "type": "web"
34
- }
35
- }
36
- ]
37
- ]
38
- }
39
- ]
40
- }
41
- ]
@@ -1,35 +0,0 @@
1
- {
2
- "id": "dummy_slice",
3
- "type": "SharedSlice",
4
- "name": "DummySlice",
5
- "description": "DummySlice",
6
- "variations": [
7
- {
8
- "id": "default-slice",
9
- "name": "Default slice",
10
- "docURL": "...",
11
- "version": "sktwi1xtmkfgx8626",
12
- "description": "DummySlice",
13
- "primary": {
14
- "section_title": {
15
- "config": {
16
- "label": "Section Title",
17
- "placeholder": ""
18
- },
19
- "type": "Text"
20
- }
21
- },
22
- "items": {
23
- "link": {
24
- "config": {
25
- "label": "Link",
26
- "placeholder": "",
27
- "select": "document",
28
- "allowTargetBlank": false
29
- },
30
- "type": "Link"
31
- }
32
- }
33
- }
34
- ]
35
- }
@@ -1,29 +0,0 @@
1
- import jsonModel from "../__fixtures__/model.json";
2
- import mocks from "../__fixtures__/mocks.json";
3
- import { Slices } from "@lib/models/common/Slice";
4
- import { SharedSlice } from "@prismicio/types-internal/lib/customtypes";
5
- import { ComponentUI } from "@lib/models/common/ComponentUI";
6
- import { SharedSliceContent } from "@prismicio/types-internal/lib/content";
7
-
8
- export const getSelectedSliceDummyData = () => {
9
- const dummyModel = Slices.toSM(jsonModel as unknown as SharedSlice);
10
-
11
- const dummyModelVariationID = "default-slice";
12
-
13
- const dummySliceState: ComponentUI = {
14
- from: "slices/libName",
15
- href: "slices--libName",
16
- pathToSlice: "./slices/libName",
17
- fileName: "index",
18
- extension: "js",
19
- model: dummyModel,
20
- screenshots: {},
21
- mocks: mocks as unknown as SharedSliceContent[],
22
- };
23
-
24
- return {
25
- dummyModel,
26
- dummyModelVariationID,
27
- dummySliceState,
28
- };
29
- };