"use strict";(()=>{var $Pr=Object.create;var rX=Object.defineProperty;var WPr=Object.getOwnPropertyDescriptor;var zPr=Object.getOwnPropertyNames;var YPr=Object.getPrototypeOf,qPr=Object.prototype.hasOwnProperty;var T=(e=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(e,{get:(t,n)=>(typeof require<"u"?require:t)[n]}):e)(function(e){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')});var ge=(e,t)=>()=>(e&&(t=e(e=0)),t);var J=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Le=(e,t)=>{for(var n in t)rX(e,n,{get:t[n],enumerable:!0})},nX=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of zPr(t))!qPr.call(e,o)&&o!==n&&rX(e,o,{get:()=>t[o],enumerable:!(r=WPr(t,o))||r.enumerable});return e},gp=(e,t,n)=>(nX(e,t,"default"),n&&nX(n,t,"default")),R=(e,t,n)=>(n=e!=null?$Pr(YPr(e)):{},nX(t||!e||!e.__esModule?rX(n,"default",{value:e,enumerable:!0}):n,e)),po=e=>nX(rX({},"__esModule",{value:!0}),e);function tot(){throw new Error("setTimeout has not been defined")}function not(){throw new Error("clearTimeout has not been defined")}function rot(e){if(OO===setTimeout)return setTimeout(e,0);if((OO===tot||!OO)&&setTimeout)return OO=setTimeout,setTimeout(e,0);try{return OO(e,0)}catch{try{return OO.call(null,e,0)}catch{return OO.call(this,e,0)}}}function QPr(e){if(_O===clearTimeout)return clearTimeout(e);if((_O===not||!_O)&&clearTimeout)return _O=clearTimeout,clearTimeout(e);try{return _O(e)}catch{try{return _O.call(null,e)}catch{return _O.call(this,e)}}}function KPr(){!O1||!KD||(O1=!1,KD.length?AT=KD.concat(AT):oX=-1,AT.length&&oot())}function oot(){if(!O1){var e=rot(KPr);O1=!0;for(var t=AT.length;t;){for(KD=AT,AT=[];++oX1)for(var n=1;n{OO=tot,_O=not;typeof globalThis.setTimeout=="function"&&(OO=setTimeout);typeof globalThis.clearTimeout=="function"&&(_O=clearTimeout);AT=[],O1=!1,oX=-1;iot.prototype.run=function(){this.fun.apply(null,this.array)};ZPr="browser",JPr="browser",ebr=!0,tbr={},nbr=[],rbr="",obr={},ibr={},abr={};sbr=XD,lbr=XD,cbr=XD,ubr=XD,pbr=XD,dbr=XD,mbr=XD;R1=globalThis.performance||{},Sbr=R1.now||R1.mozNow||R1.msNow||R1.oNow||R1.webkitNow||function(){return new Date().getTime()};bbr=new Date;process={nextTick:XPr,title:ZPr,browser:ebr,env:tbr,argv:nbr,version:rbr,versions:obr,on:sbr,addListener:lbr,once:cbr,off:ubr,removeListener:pbr,removeAllListeners:dbr,emit:mbr,binding:fbr,cwd:gbr,chdir:ybr,umask:hbr,hrtime:Pbr,platform:JPr,release:ibr,config:abr,uptime:Ebr},eot={};Object.keys(eot).forEach(e=>{let t=e.split("."),n=process;for(let r=0;r{"use strict";c();var _1=typeof Reflect=="object"?Reflect:null,aot=_1&&typeof _1.apply=="function"?_1.apply:function(t,n,r){return Function.prototype.apply.call(t,n,r)},iX;_1&&typeof _1.ownKeys=="function"?iX=_1.ownKeys:Object.getOwnPropertySymbols?iX=function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:iX=function(t){return Object.getOwnPropertyNames(t)};function Abr(e){console&&console.warn&&console.warn(e)}var lot=Number.isNaN||function(t){return t!==t};function Ja(){Ja.init.call(this)}ZEe.exports=Ja;ZEe.exports.once=vbr;Ja.EventEmitter=Ja;Ja.prototype._events=void 0;Ja.prototype._eventsCount=0;Ja.prototype._maxListeners=void 0;var sot=10;function aX(e){if(typeof e!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}Object.defineProperty(Ja,"defaultMaxListeners",{enumerable:!0,get:function(){return sot},set:function(e){if(typeof e!="number"||e<0||lot(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");sot=e}});Ja.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0};Ja.prototype.setMaxListeners=function(t){if(typeof t!="number"||t<0||lot(t))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+t+".");return this._maxListeners=t,this};function cot(e){return e._maxListeners===void 0?Ja.defaultMaxListeners:e._maxListeners}Ja.prototype.getMaxListeners=function(){return cot(this)};Ja.prototype.emit=function(t){for(var n=[],r=1;r0&&(a=n[0]),a instanceof Error)throw a;var s=new Error("Unhandled error."+(a?" ("+a.message+")":""));throw s.context=a,s}var l=i[t];if(l===void 0)return!1;if(typeof l=="function")aot(l,this,n);else for(var u=l.length,p=fot(l,u),r=0;r0&&a.length>o&&!a.warned){a.warned=!0;var s=new Error("Possible EventEmitter memory leak detected. "+a.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");s.name="MaxListenersExceededWarning",s.emitter=e,s.type=t,s.count=a.length,Abr(s)}return e}Ja.prototype.addListener=function(t,n){return uot(this,t,n,!1)};Ja.prototype.on=Ja.prototype.addListener;Ja.prototype.prependListener=function(t,n){return uot(this,t,n,!0)};function Ibr(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function pot(e,t,n){var r={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},o=Ibr.bind(r);return o.listener=n,r.wrapFn=o,o}Ja.prototype.once=function(t,n){return aX(n),this.on(t,pot(this,t,n)),this};Ja.prototype.prependOnceListener=function(t,n){return aX(n),this.prependListener(t,pot(this,t,n)),this};Ja.prototype.removeListener=function(t,n){var r,o,i,a,s;if(aX(n),o=this._events,o===void 0)return this;if(r=o[t],r===void 0)return this;if(r===n||r.listener===n)--this._eventsCount===0?this._events=Object.create(null):(delete o[t],o.removeListener&&this.emit("removeListener",t,r.listener||n));else if(typeof r!="function"){for(i=-1,a=r.length-1;a>=0;a--)if(r[a]===n||r[a].listener===n){s=r[a].listener,i=a;break}if(i<0)return this;i===0?r.shift():Cbr(r,i),r.length===1&&(o[t]=r[0]),o.removeListener!==void 0&&this.emit("removeListener",t,s||n)}return this};Ja.prototype.off=Ja.prototype.removeListener;Ja.prototype.removeAllListeners=function(t){var n,r,o;if(r=this._events,r===void 0)return this;if(r.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):r[t]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete r[t]),this;if(arguments.length===0){var i=Object.keys(r),a;for(o=0;o=0;o--)this.removeListener(t,n[o]);return this};function dot(e,t,n){var r=e._events;if(r===void 0)return[];var o=r[t];return o===void 0?[]:typeof o=="function"?n?[o.listener||o]:[o]:n?Tbr(o):fot(o,o.length)}Ja.prototype.listeners=function(t){return dot(this,t,!0)};Ja.prototype.rawListeners=function(t){return dot(this,t,!1)};Ja.listenerCount=function(e,t){return typeof e.listenerCount=="function"?e.listenerCount(t):mot.call(e,t)};Ja.prototype.listenerCount=mot;function mot(e){var t=this._events;if(t!==void 0){var n=t[e];if(typeof n=="function")return 1;if(n!==void 0)return n.length}return 0}Ja.prototype.eventNames=function(){return this._eventsCount>0?iX(this._events):[]};function fot(e,t){for(var n=new Array(t),r=0;r{"use strict";c();yot=R(T("lodash"))});var lX,JEe,eAe=ge(()=>{"use strict";c();lX=e=>new Promise(t=>setTimeout(t,e)),JEe=(e,t)=>Promise.race([e,new Promise((n,r)=>setTimeout(r,t))])});var cX,ee,Ur,$n,X$=ge(()=>{"use strict";c();cX=class e extends Error{constructor(t){super(t.message),this.issueSeverity=t.issueSeverity,this.errorType=t.errorType,this.tags=t.tags,this.extras=t.extras,Object.setPrototypeOf(this,e.prototype)}},ee=class e extends cX{constructor(t){super({issueSeverity:"error",...t}),Object.setPrototypeOf(this,e.prototype)}},Ur=class e extends cX{constructor(t){super({issueSeverity:"warning",...t}),Object.setPrototypeOf(this,e.prototype)}},$n=(e,t)=>{let n=e.message??e.toString(),r=t.message?`${t.message}|${n}`:n,o;return e instanceof Ur?o=new Ur({...t,message:r}):o=new ee({...t,message:r}),o.originalMessage=n,o.stack=e.stack,o.tags=Object.assign({},o.tags,e.tags),o.extras=Object.assign({},o.extras,e.extras),o}});var uX,_A,_br,xO,Sot=ge(()=>{"use strict";c();X$();uX=R(T("lodash")),_A=class{constructor(){this.promise=new Promise((t,n)=>{this.resolve=t,this.reject=n})}},_br=1e3*10,xO=class{constructor(t,n={},r=_br){this.logger=t;this.callbacks=n;this.timeout=r;this.map=new Map;this.logDeferredEnded=(t,n)=>{this.logger?.interactionEnded("Deferred",{tags:{action:n?"resolve":"reject"},extras:{key:t}})};this.createATimeout=(t,n,r)=>{let o=setTimeout(async()=>{let i=!0,a=()=>{i=!1};if(await this.callbacks.onTimeout?.(t,a),i){this.map.delete(t);let s=new ee({message:`Request timed out for correlationId ${t}`,errorType:"DeferredTimeoutError",tags:{source:"Notifier"},extras:{key:t,...r?.extras}});this.logger?.captureError(s),n.reject(s),await r?.rejectionOnTimeoutCb?.(s)}},r?.timeout??this.timeout);return uX.default.isNumber(o)?o:o[Symbol.toPrimitive]()}}pop(t){let n=this.map.get(t);return n&&(this.map.delete(t),clearTimeout(n.timeout)),n}register(t,n){let r=new _A,o=this.createATimeout(t,r,n);return this.map.set(t,{deferred:r,timeout:o,options:n}),this.logger?.interactionStarted("Deferred",{tags:{action:"register"},extras:{key:t,timeout:o,...n?.extras}}),r.promise}resetTimer(t,n){if(!this.isRegistered(t))return;let{deferred:r,timeout:o,options:i}=this.map.get(t);clearTimeout(o);let a=this.createATimeout(t,r,uX.default.merge(i,n));this.map.set(t,{deferred:r,timeout:a,options:i})}resolve(t,n){let r=this.pop(t);r&&(this.callbacks.onResolve?.(t),r.deferred.resolve(n),this.logDeferredEnded(t,!0))}reject(t,n){let r=this.pop(t);r&&(this.callbacks.onReject?.(t),r.deferred.reject(n),this.logDeferredEnded(t,!1))}isRegistered(t){return this.map.has(t)}getRegisteredPromise(t){return this.map.get(t)?.deferred.promise}async waitForCurrentPending(){if(this.map.size===0)return Promise.resolve();this.logger?.interactionStarted("waitForCurrentPendingDeferred",{extras:{keys:[...this.map.keys()]}});let t=uX.default.map([...this.map.values()],"deferred.promise");await Promise.all(t)}}});var pb,Hr,db,IT,Pot=ge(()=>{"use strict";c();pb={USER_NOT_AUTHORIZED_FOR_SITE:-17,SITE_DELETED:-10156,SITE_UNAVAILABLE:-10157,DATA_REFERENCE_MISMATCH:-10104,WORKSPACE_ID_MISMATCH:-10105,CORRUPTED_TRANSACTIONS_ERROR:-10904},Hr={UNKNOWN_SERVER_ERROR:"UNKNOWN_SERVER_ERROR",HTTP_REQUEST_ERROR:"HTTP_REQUEST_ERROR",SAVE_DISABLED_IN_DOCUMENT_SERVICES:"SAVE_DISABLED_IN_DOCUMENT_SERVICES",SAVE_IN_PROGRESS:"SAVE_IN_PROGRESS",NOT_LOGGED_IN:"NOT_LOGGED_IN",SESSION_EXPIRED:"SESSION_EXPIRED",USER_NOT_AUTHORIZED_FOR_SITE:"USER_NOT_AUTHORIZED_FOR_SITE",SITE_DELETED:"SITE_DELETED",SITE_UNAVAILABLE:"SITE_UNAVAILABLE",FAILED_TO_PARSE_REVIEW_TOKEN:"FAILED_TO_PARSE_REVIEW_TOKEN",REVIEW_TOKEN_EXPIRED:"REVIEW_TOKEN_EXPIRED",CONCURRENT_SAVE:"CONCURRENT_SAVE_ERROR",SITE_NAME_TAKEN:"SITE_NAME_TAKEN_ERROR",DUPLICATE_COMPONENTS:"DUPLICATE_COMPONENTS",DATA_REFERENCE_MISMATCH:"DATA_REFERENCE_MISMATCH",MISSING_CONTAINERS:"MISSING_CONTAINERS",APP_CONTROLLER_REFERENCE_MISMATCH:"APP_CONTROLLER_REFERENCE_MISMATCH",DESIGN_REFERENCE_MISMATCHES:"DESIGN_REFERENCE_MISMATCHES",MISSING_REFERENCE:"MISSING_REFERENCE",BEHAVIOR_REFERENCE_MISMATHCHES:"BEHAVIOR_REFERENCE_MISMATHCHES",PROPERTY_REFERENCE_MISMATCHES:"PROPERTY_REFERENCE_MISMATCHES",STYLE_REFERENCE_MISMATCHES:"STYLE_REFERENCE_MISMATCHES",CONNECTION_LIST_REFERENCE_MISMATCHES:"CONNECTION_LIST_REFERENCE_MISMATCHES",SITE_DESERIALIZATION_ERROR:"SITE_DESERIALIZATION_ERROR",SAVE_PUBLISH_DISABLED_ON_SERVER:"SAVE_PUBLISH_DISABLED_ON_SERVER",SAVE_PUBLISH_RC_FAILED_ON_SERVER:"SAVE_PUBLISH_RC_FAILED_ON_SERVER",CONCURRENT_AUTO_SAVE:"CONCURRENT_AUTO_SAVE",SITE_STALE_STATE_FROM_AUTO_SAVE:"SITE_STALE_STATE_FROM_AUTO_SAVE",SITE_STALE_STATE_LOCAL_CHANGE:"SITE_STALE_STATE_LOCAL_CHANGE",AUTOSAVE_DISABLE_FROM_SERVER:"AUTOSAVE_DISABLE_FROM_SERVER",TOO_MANY_SITES_FOR_FREE_USER:"TOO_MANY_SITES_FOR_FREE_USER",USER_BLOCKED_FOR_PUBLISH:"USER_BLOCKED_FOR_PUBLISH",OUTDATED_LAST_TX_ID:"OUTDATED_LAST_TX_ID",RC_EXISTS:"RC_EXISTS",RC_ROLLED_OUT:"RC_ROLLED_OUT",IDENTITY_UNKNOWN_RUNTIME_ERROR:"IDENTITY_UNKNOWN_RUNTIME_ERROR",CLONE_GRID_APP_FAILED:"CLONE_GRID_APP_FAILED",TOO_MANY_PAGES:"TOO_MANY_PAGES",STATIC_DOWNLOAD_FAILED:"STATIC_DOWNLOAD_FAILED",TRANSPORTATION_ERROR:"TRANSPORTATION_ERROR",CANARY_ERROR:"CANARY_ERROR",UPSTREAM_CONNECT_ERROR:"UPSTREAM_CONNECT_ERROR",DEFERRED_TIMEOUT_ERROR:"DEFERRED_TIMEOUT_ERROR",TOO_MANY_TRANSACTIONS:"TOO_MANY_TRANSACTIONS",PUBLISH_PIPELINE_FAILED:"PUBLISH_PIPELINE_FAILED",WORKSPACE_ID_MISMATCH:"WORKSPACE_ID_MISMATCH",META_SITE_NAME_ALREADY_EXIST:"META_SITE_NAME_ALREADY_EXIST",CORRUPTED_TRANSACTIONS_ERROR:"CORRUPTED_TRANSACTIONS_ERROR"},db={SAVE_DISABLED_IN_DOCUMENT_SERVICES:-10900,SAVE_IN_PROGRESS:-10901,UNKNOWN_SERVER_ERROR:-10903,HTTP_REQUEST_ERROR:-1e4},IT={IDENTITY_UNKNOWN_RUNTIME_ERROR:"-1888",TRANSPORTATION_ERROR:"-7002",HTTP_REQUEST_ERROR:"-74770"}});var Z$,ZD,tAe,xbr,bot=ge(()=>{"use strict";c();Z$="editor_x",ZD="Editor1.4",tAe="wem",xbr="studio2"});function Nbr(e,...t){try{return{value:e(...t),didThrow:!1,error:null}}catch(n){return{error:n,didThrow:!0,value:null}}}function nAe(e,t,...n){try{return t(...n)}catch{return e}}async function pX(e,...t){try{return{value:await e(...t),didThrow:!1,error:null}}catch(n){return{error:n,didThrow:!0,value:null}}}async function Lbr(e,t,...n){try{return await t(...n)}catch{return e}}function J$(e){let t=Promise.resolve();return async(...n)=>(t=t.then(()=>e(...n)),t)}var wbr,Dbr,rAe=ge(()=>{"use strict";c();wbr=e=>({value:e,didThrow:!1,error:null}),Dbr=e=>({error:e,didThrow:!0,value:null})});var Aot,Iot,Cot,xA,Mbr,Eot,oAe,iAe=ge(()=>{"use strict";c();eAe();rAe();Aot=R(T("lodash")),Iot=3,Cot=0,xA=async(e,t=()=>!0,n=Iot,r=Cot)=>{try{return await e()}catch(o){if(n<=0||!t(o))throw o;return await lX(r),await xA(e,t,n-1,r)}},Mbr=e=>{if(e.didThrow)return e.error;if(Aot.default.get(e,["value","success"])===!1)return e.value},Eot=(e,t)=>{let n=Mbr(e);return n?t(n):{shouldRetry:!1}},oAe=async(e,t=()=>({shouldRetry:!0}),n=Iot,r=Cot)=>{let o=await pX(e),i=Eot(o,t),a=0,s;for(;a{"use strict";c();iAe();dX=R(T("lodash")),kbr=e=>!(e.error||dX.default.get(e,["value","success"])===!1),Sg=async e=>{let{task:t,checkIfShouldRetry:n,interactionName:r,maxRetries:o,waitInterval:i,logger:a}=e,s=dX.default.random(1e4,!0);a?.interactionStarted(r,{extras:{eventGuid:s}});let{result:l,retries:u,reason:p}=await oAe(t,n,o,i),d=dX.default.get(l,["value","status"]),m={[r]:!0,retries:u,eventualSuccess:kbr(l),reason:p,...d!==void 0&&{status:d}};if(a?.interactionEnded(r,{tags:m,extras:{eventGuid:s}}),l.didThrow)throw l.error;return l.value}});var eW,aAe,sAe,vot=ge(()=>{"use strict";c();eW=R(T("lodash")),aAe=(e,t)=>{let n=eW.default.chain(t).find({type:"siteextension"}).get(["appDefinitionId"]).value();e[n]=eW.default.assign({},e.wixCode),delete e.wixCode},sAe=e=>eW.default.transform(e,(t,n,r)=>{eW.default.forOwn(n,(o,i)=>{t[i]=t[i]||[],t[i].push(r)})},{})});var x1,Rot=ge(()=>{"use strict";c();x1=class{constructor(t){this._name=t;this._stack=[]}push(t){this._stack.push(t)}pop(){return this._stack.pop()}top(){let t=this._stack.length;return t?this._stack[t-1]:void 0}isEmpty(){return this._stack.length===0}clear(){this._stack=[]}size(){return this._stack.length}getItems(){return[...this._stack]}setItems(t){this._stack=[...t]}toString(){return`${this._name} stack: ${this._stack.map(t=>JSON.stringify(t)).join(` `)}`}}});var Oot,mX,lAe,_ot=ge(()=>{"use strict";c();Oot={message:"Task timed out"},mX=async(e,t,n=Oot)=>{let r,o=e();if(o){let i=new Promise((a,s)=>{r=setTimeout(()=>s(new Error(n.message)),t)});return Promise.race([o,i]).then(a=>(clearTimeout(r),a))}},lAe=(e,t,n=Oot)=>()=>mX(e,t,n)});var Bbr,cAe,Gi,tW,xot=ge(()=>{"use strict";c();Bbr=new RegExp("\\p{Emoji_Presentation}","u"),cAe=e=>Bbr.test(e),Gi=(e,t)=>e?.startsWith(t)?e.slice(t.length):e,tW=(e,t)=>e.startsWith(t)?e:`${t}${e}`});var wot,AS,uAe,pAe,Kr,Dot=ge(()=>{"use strict";c();wot=()=>{if(typeof window<"u")return window.location.host},AS={WIDGET:"WIDGET",WIDGET_OUT_OF_IFRAME:"WIDGET_OUT_OF_IFRAME",PAGE:"PAGE",PAGE_OUT_OF_IFRAME:"PAGE_OUT_OF_IFRAME"},uAe=new Set([AS.WIDGET_OUT_OF_IFRAME,AS.PAGE_OUT_OF_IFRAME]),pAe=new Set([AS.WIDGET,AS.WIDGET_OUT_OF_IFRAME,AS.PAGE,AS.PAGE_OUT_OF_IFRAME]),Kr={TYPE:{TPA_SECTION:"TPASection",TPA_MULTI_SECTION:"TPAMultiSection",TPA_WIDGET:"TPAWidget",TPA_GLUED_WIDGET:"TPAGluedWidget"},DATA_TYPE:{TPA_SECTION:"TPA",TPA_MULTI_SECTION:"TPAMultiSection",TPA_WIDGET:"TPAWidget"},COMP_TYPES:{TPA_SECTION:"wysiwyg.viewer.components.tpapps.TPASection",TPA_MULTI_SECTION:"wysiwyg.viewer.components.tpapps.TPAMultiSection",TPA_WIDGET:"wysiwyg.viewer.components.tpapps.TPAWidget",TPA_GLUED_WIDGET:"wysiwyg.viewer.components.tpapps.TPAGluedWidget"},TPA_COMP_TYPES:{TPA_SECTION:"tpa.viewer.components.tpapps.TPASection",TPA_MULTI_SECTION:"tpa.viewer.components.tpapps.TPAMultiSection",TPA_WIDGET:"tpa.viewer.components.tpapps.TPAWidget",TPA_GLUED_WIDGET:"tpa.viewer.components.tpapps.TPAGluedWidget"},SKINS:{TPA_SECTION:"wysiwyg.viewer.skins.TPASectionSkin",TPA_WIDGET:"wysiwyg.viewer.skins.TPAWidgetSkin"},APP_MARKET:{EDITOR_BASE_URL:`http://${wot()}/app-market-editor`,DOMAIN:`http://${wot()}/`},STYLE:{TPA_WIDGET:"tpaw0",TPA_GLUED_WIDGET:"tpagw0",TPA_SECTION:"tpas0"},CYCLE:{MONTHLY:"monthly",YEARLY:"yearly",ONE_TIME:"oneTime"},APP_DEF_ID:{CHAT:"14517e1a-3ff0-af98-408e-2bd6953c36a2",AI_CHAT_ASSISTANT:"31ceda3c-e2c8-4e83-816d-ba293597730c"}}});var tl,Not=ge(()=>{"use strict";c();tl={URLS:{MAX_LENGTH:100},URL_FORMATS:{SLASH:"slash",HASH_BANG:"hashBang"},DEVICES:["desktop","mobile"],MASTER_PAGE_ID:"masterPage",COMP_IDS:{PAGE_GROUP:"SITE_PAGES",PAGES_CONTAINER:"PAGES_CONTAINER",HEADER:"SITE_HEADER",FOOTER:"SITE_FOOTER",BACKGROUND:"SITE_BACKGROUND",QUICK_ACTION_BAR:"QUICK_ACTION_BAR",WIX_ADS:"WIX_ADS",WINDOW:"WINDOW"},SAFE_PADDING_FOR_URI_LENGTH:5,CUSTOM_MAIN_MENU:"CUSTOM_MAIN_MENU",HINTS_PROPERTIES:{GENERAL_HINTS_PROPERTIES:["id","metaData","type"],GENERAL_PRESET_DATA:["author"],SIZE_DATA:["recommendedHeight","recommendedWidth","recommendedScale","originalCompId"],OFFSET_DATA:["offsetX","offsetY","offsetOrigin","orderIndex"]},BUILDER_TYPES:{EDITOR_REACT_COMPONENT:"EDITOR_REACT_COMPONENT",EDITOR_CONTEXT_PROVIDER:"EDITOR_CONTEXT_PROVIDER",EDITOR_FUNCTION_LIBRARY:"EDITOR_FUNCTION_LIBRARY"}}});var dAe=ge(()=>{"use strict";c();Dot();Not()});var fAe,gAe,bg,w1,Fbr,wO,Pg,mAe,Vbr,wA,Lot=ge(()=>{"use strict";c();fAe=R(T("lodash"));X$();gAe="GET",bg=e=>{let t=e?.headers,n=t?.keys?.(),r=n?[...n]:[],o=(0,fAe.default)(r).invokeMap("toLowerCase").find(i=>/.*request[-_]?id.*/.test(i)&&t?.get(i));return o?t?.get(o):"no-request-id"},w1=e=>e?.headers?.get("x-seen-by")||"no-x-seen-by",Fbr=e=>fAe.default.pick(e,["status","statusText","redirected","type","url"]),wO=e=>({...Fbr(e),requestId:bg(e),xSeenBy:w1(e)}),Pg=class e extends ee{constructor(t,n="httpError",r){super({errorType:n,message:r??t.statusText,extras:{...wO(t)}}),this.status=t.status,Object.setPrototypeOf(this,e.prototype)}},mAe=class e extends ee{constructor(t,n,r){super({errorType:"fetchJsonWithAuthorization",message:t,extras:{...wO(n),result:JSON.stringify(r)}}),Object.setPrototypeOf(this,e.prototype),this.status=n.status,this.result=r}},Vbr=new Set(["Failed to fetch","NetworkError when attempting to fetch resource.","Load failed"]),wA=e=>e instanceof TypeError&&Vbr.has(e.message)});var Mot=ge(()=>{"use strict";c()});function nW(){return jbr}function SAe(e){return new yAe(e)}function Bot(e){return kot.default.isNil(e)?nW():SAe(e)}function Ubr(e){return e?SAe(e):nW()}function fX(e,t){return Bot(e.find(t))}var kot,yAe,hAe,jbr,Fot=ge(()=>{"use strict";c();kot=R(T("lodash")),yAe=class e{constructor(t){this.value=t}getOrElseOption(){return this}map(t){return new e(t(this.value))}flatMap(t){return t(this.value)}getOrDefault(){return this.value}getOrElse(){return this.value}getOrThrow(){return this.value}get(){return this.value}isNone(){return!1}isSome(){return!0}forEach(t){t(this.value)}},hAe=class{map(){return nW()}flatMap(){return nW()}getOrDefault(t){return t}getOrElseOption(t){return t()}getOrElse(t){return t()}getOrThrow(t){throw t}get(){throw new Error("Cannot get value from None")}isNone(){return!0}isSome(){return!1}forEach(){}},jbr=new hAe});var jot={};Le(jot,{decodeFixerVersioning:()=>D1,encodeFixerVersioning:()=>gX});var Vot,Gbr,Hbr,$br,gX,D1,PAe=ge(()=>{"use strict";c();X$();Vot=e=>Number(atob(e).split("_")[0]),Gbr=e=>{let t={};return Object.keys(e).forEach(n=>{let r=Vot(e[n]);t[r]=n}),t},Hbr=e=>{let t={};return Object.keys(e).forEach(n=>{let r=Vot(e[n]);t[n]=r}),t},$br=e=>{let t=Object.values(e);if(new Set(t).size!==t.length)throw new Error("Fixer indexes must be unique")},gX=(e,t)=>{let n=Array(t.lastFixerIndex+1).fill(0),r=Hbr(t.fixers);return $br(r),Object.keys(e).forEach(o=>{let i=r[o],a=e[o];if(i!==void 0){if(a<0||a>255)throw new Error(`Fixer version must be a number between 0 and 255, got ${a} for fixer ${o}`);if(i>t.lastFixerIndex)throw new Error(`Fixer index is not allowed to be greater than the last fixer index, got ${i} for fixer ${o}, while lastFixerIndex is ${t.lastFixerIndex}`);n[i]=a}}),btoa(String.fromCharCode(...new Uint8Array(n)))},D1=(e,t,n)=>{let o=(s=>{try{return atob(s)}catch(l){return n(new ee({message:"Failed to decode fixer versioning",errorType:"decodeFixerVersioning",extras:{encodedFixerVersioning:s,error:l}})),""}})(e).split("").map(s=>s.charCodeAt(0)),i={},a=Gbr(t);return o.forEach((s,l)=>{if(s===0)return;let u=a[l];u&&(i[u]=s)}),i}});function rW(e){let t="0123456789abcdef";function n(A){let P,C="";for(P=0;P<=3;P++)C+=t.charAt(A>>P*8+4&15)+t.charAt(A>>P*8&15);return C}function r(A,P){let C=(A&65535)+(P&65535);return(A>>16)+(P>>16)+(C>>16)<<16|C&65535}function o(A,P){return A<>>32-P}function i(A,P,C,v,O,_){return r(o(r(r(P,A),r(v,_)),O),C)}function a(A,P,C,v,O,_,D){return i(P&C|~P&v,A,P,O,_,D)}function s(A,P,C,v,O,_,D){return i(P&v|C&~v,A,P,O,_,D)}function l(A,P,C,v,O,_,D){return i(P^C^v,A,P,O,_,D)}function u(A,P,C,v,O,_,D){return i(C^(P|~v),A,P,O,_,D)}function p(A){let P,C=(A.length+8>>6)+1,v=new Array(C*16);for(P=0;P>2]|=A.charCodeAt(P)<>2]|=128<{"use strict";c()});function Uot(e){return rW(JSON.stringify(e))}function Wbr(e){return e.split("").map(t=>t.charCodeAt(0)).reduce((t,n)=>t+n,0)}function zbr(e,t){let n=Wbr(e);return btoa(`${t}_${Uot({fixerName:e,indexAndNameSum:n+t})}`)}var Got=ge(()=>{"use strict";c();bAe()});var EAe,oW,JD,Hot=ge(()=>{"use strict";c();EAe=R(T("lodash")),oW=e=>EAe.default.omitBy(e,EAe.default.isUndefined),JD=e=>{if(typeof e!="object"||e===null)return e;let t=Reflect.ownKeys(e);for(let n of t){let r=e[n];r&&(typeof r=="object"||typeof r=="function")&&JD(r)}return Object.freeze(e)}});var $ot,Wot,Ybr,zot,Yot,iW,qot,AAe,IAe,Qot=ge(()=>{"use strict";c();$ot=R(T("lodash")),Wot=/(^|[^-\w])((\d+(?:\.\d+)?)(?:px|spx))/,Ybr=e=>parseFloat((Wot.exec(e)??["0","0","0","0"])[3]),zot=e=>{let t=Wot.exec(e);if(!t)return"";let n=t[3];return t[0].slice(n.length)},Yot=e=>{if($ot.default.isString(e))return Ybr(e)},iW=[{minSourceFontSize:0,maxSourceFontSize:14},{minSourceFontSize:14,maxSourceFontSize:19,targetFontSize:16},{minSourceFontSize:19,maxSourceFontSize:22,targetFontSize:18},{minSourceFontSize:22,maxSourceFontSize:26,targetFontSize:20},{minSourceFontSize:26,maxSourceFontSize:30,targetFontSize:22},{minSourceFontSize:30,maxSourceFontSize:38,targetFontSize:24},{minSourceFontSize:38,maxSourceFontSize:46,targetFontSize:26},{minSourceFontSize:46,maxSourceFontSize:54,targetFontSize:28},{minSourceFontSize:54,maxSourceFontSize:70,targetFontSize:30},{minSourceFontSize:70,maxSourceFontSize:78,targetFontSize:32},{minSourceFontSize:78,maxSourceFontSize:86,targetFontSize:34},{minSourceFontSize:86,maxSourceFontSize:94,targetFontSize:36},{minSourceFontSize:95,maxSourceFontSize:102,targetFontSize:38},{minSourceFontSize:102,scaleProportionally:!0}],qot=(e,t,n)=>{let r=Yot(e);return!r||rn)},AAe=e=>!!iW.find(({minSourceFontSize:t,maxSourceFontSize:n})=>qot(e,t,n))?.scaleProportionally,IAe=e=>{let{targetFontSize:t,scaleProportionally:n}=iW.find(({minSourceFontSize:r,maxSourceFontSize:o})=>qot(e,r,o))??{};return n?{}:{targetFontSize:t??Yot(e),unit:zot(e)}}});var aW,CAe,sW,lW,DO,TAe,N1,vAe,Kot=ge(()=>{"use strict";c();aW=R(T("lodash"));dAe();({BUILDER_TYPES:CAe}=tl),sW=e=>(0,aW.default)(e).keys().map(t=>parseInt(t,10)).compact().concat(0).max(),lW=(e,t=Math.random)=>{let n=t()*999+1+t()*99+1|0;return aW.default.max([e,999])+n},DO=e=>e?.type===CAe.EDITOR_REACT_COMPONENT||e?.type===CAe.EDITOR_CONTEXT_PROVIDER||e?.type===CAe.EDITOR_FUNCTION_LIBRARY,TAe=(e,t)=>{let n=(e??[]).filter(r=>!DO(r));return[...t??[],...n]},N1=(e,t)=>[...(e??[]).filter(DO),...t??[]],vAe=(e,t)=>{let n=aW.default.assign({},e,t);return aW.default.forEach(t,(r,o)=>{let i=e[o];n[o]={...r,components:N1(i?.components,r.components),...i?.dependencies&&{dependencies:i?.dependencies}}}),n}});var Xot,cW,Zot=ge(()=>{"use strict";c();Xot=R(T("lodash")),cW=e=>{if(Xot.default.isFunction(e))return"function";try{let t=JSON.stringify(e);return t?.length>200?`${t.substr(0,200)}...`:t}catch{return"error"}}});var DA={};Le(DA,{CSM_COMPONENT_TYPES:()=>AS,CSM_TYPES_WITH_REF_TYPES:()=>pAe,Deferred:()=>_A,FONT_SIZE_CLASSES_RULES:()=>iW,GET:()=>gAe,HttpRequestError:()=>Pg,Notifier:()=>xO,OOI_CSM_TYPES:()=>uAe,ReportableError:()=>ee,ReportableWarning:()=>Ur,ServerError:()=>mAe,Stack:()=>x1,TPA_CONSTANTS:()=>Kr,addPrefix:()=>tW,asArray:()=>xs,asyncAttempt:()=>pX,asyncDefaultAttempt:()=>Lbr,attempt:()=>Nbr,classic:()=>ZD,clientSaveErrors:()=>db,constants:()=>tl,createSignature:()=>zbr,decodeFixerVersioning:()=>D1,deepFreeze:()=>JD,defaultAttempt:()=>nAe,editorX:()=>Z$,encodeFixerVersioning:()=>gX,extractFontSizeUnitFromString:()=>zot,failedAttempt:()=>Dbr,findOption:()=>fX,fromNullable:()=>Bot,fromTruthValue:()=>Ubr,generateApplicationId:()=>lW,getArgValue:()=>cW,getChecksum:()=>Uot,getHttpResponseExtras:()=>wO,getLargestApplicationId:()=>sW,getMobileFontSize:()=>IAe,getReportableFromError:()=>$n,getXSeenBy:()=>w1,hasEmojis:()=>cAe,isBuilderComponent:()=>DO,isFetchNetworkError:()=>wA,isLargeFontSize:()=>AAe,md5:()=>rW,mergeComponentsByReplacingBuilderComponents:()=>TAe,mergeComponentsByReplacingNonBuilderComponents:()=>N1,none:()=>nW,omitUndefined:()=>oW,removePrefix:()=>Gi,replaceCSMAndPreserveExistingBuilderComponents:()=>vAe,replaceWixCodeAppId:()=>aAe,retryTaskAndReport:()=>Sg,runWithTimeout:()=>mX,saveErrorCodes:()=>pb,saveErrors:()=>Hr,searchRequestId:()=>bg,serverSaveErrorCodes:()=>IT,some:()=>SAe,studio2:()=>xbr,successfulAttempt:()=>wbr,synchronized:()=>J$,taskWithRetries:()=>xA,taskWithRetriesAndInfo:()=>oAe,timeout:()=>JEe,toArray:()=>Obr,transformPagePlatformApplicationByPage:()=>sAe,wait:()=>lX,wem:()=>tAe,withTimeout:()=>lAe});var ze=ge(()=>{"use strict";c();hot();eAe();Sot();Pot();bot();Tot();vot();X$();rAe();Rot();iAe();_ot();xot();dAe();Lot();Mot();Fot();PAe();Got();bAe();Hot();Qot();Kot();Zot()});var pW={};Le(pW,{createImmutableProxy:()=>Pl,createImmutableProxyForMap:()=>xAe,createImmutableProxyForMapOfMaps:()=>wAe,deepClone:()=>xe,isImmutableProxy:()=>DAe,referenceCompare:()=>Kbr});function RAe(e,t){return`Attempt to ${t} key "${e}" on immutable object. Clone using deepClone() and then modify.`}function Qbr(e){let t=e.slice(0);for(let n=0;n{c();e0=Symbol("TARGET");t0=e=>typeof e=="object"&&e!==null,yX=class{get(t,n){if(n===e0)return t;let r=t[n];return t0(r)?new Proxy(r,this):r}set(t,n){throw new Error(RAe(n,"set"))}deleteProperty(t,n){if(n in t)throw new Error(RAe(n,"delete"));return!1}defineProperty(t,n){throw new Error(RAe(n,"define"))}},eit=new yX,hX=class extends yX{get(t,n){if(n===e0)return t;let r=t.get(n);return t0(r)?new Proxy(r,eit):r}ownKeys(t){return[...t.keys()]}has(t,n){return t.has(n)}getPrototypeOf(){return Object.prototype}getOwnPropertyDescriptor(t,n){return t.has(n)?{writable:!1,configurable:!0,enumerable:!0,value:this.get(t,n)}:void 0}},tit=new hX,OAe=class extends hX{get(t,n){if(n===e0)return t;let r=t.get(n);return t0(r)?new Proxy(r,tit):r}},qbr=new OAe,uW={rawObject:void 0,proxy:void 0},_Ae=e=>t=>{if(t0(t)){if(uW.rawObject===t)return uW.proxy;if(t&&!t[e0])return uW.rawObject=t,uW.proxy=new Proxy(t,e),uW.proxy}return t},Pl=_Ae(eit),xAe=_Ae(tit),wAe=_Ae(qbr);Jot=e=>t0(e)&&e[e0]||e});var ye={};Le(ye,{copyFragmentPointerInfo:()=>iit,getCompPointer:()=>eEr,getFragmentPointer:()=>NAe,getInnerPath:()=>mW,getInnerPointer:()=>n0,getInnerPointerPathRoot:()=>aEr,getInnerValue:()=>PX,getOriginalPointerFromInner:()=>nEr,getOverrideComponentPointer:()=>uEr,getPagePointer:()=>tEr,getPointer:()=>Tc,getPointerFromPointer:()=>LAe,getRepeatedItemPointerIfNeeded:()=>sEr,getRootRefHostPointerFromPointer:()=>lEr,getSignaturePointer:()=>BAe,hasInnerPath:()=>kAe,isFragmentPointer:()=>ef,isPointer:()=>oEr,isSameComponent:()=>MAe,isSamePointer:()=>iEr,normalizeInnerPath:()=>lit,stripInnerPath:()=>dW});var NO,oit,Xbr,Zbr,Jbr,Tc,NAe,eEr,LAe,tEr,iit,n0,PX,nEr,ait,rEr,oEr,ef,MAe,nit,sit,rit,iEr,aEr,dW,lit,mW,kAe,sEr,lEr,cEr,BAe,uEr,r0=ge(()=>{"use strict";c();NO=R(T("lodash")),oit=T("@wix/santa-core-utils");Mt();({getRepeaterTemplateId:Xbr,getRootRefHostCompId:Zbr,isRepeatedComponent:Jbr}=oit.displayedOnlyStructureUtil),Tc=(e,t,n)=>(!e&&!t&&console.log("illegal pointer creation !"),n?{...n,id:e,type:t}:{id:e,type:t}),NAe=({fragmentInstance:e,fragmentType:t,id:n,type:r},o)=>o?{...o,fragmentInstance:e,fragmentType:t,id:n,type:r}:{fragmentInstance:e,fragmentType:t,id:n,type:r},eEr=(e,t,n)=>Tc(e,t,n),LAe=(e,t)=>({...t,id:e}),tEr=(e,t)=>({id:e,type:t,pageId:e}),iit=(e,t)=>(t.fragmentType&&(e.fragmentType=t.fragmentType),t.fragmentInstance&&(e.fragmentInstance=t.fragmentInstance),e),n0=(e,t)=>{NO.default.isString(t)&&(t=t.split("."));let n={id:e.id,type:e.type,noRefFallbacks:e.noRefFallbacks,innerPath:e.innerPath?e.innerPath.concat(t):t};return e.scope&&(n.scope=e.scope),iit(n,e)},PX=(e,t)=>NO.default.isNil(t)||!e.innerPath?t:NO.default.get(t,e.innerPath),nEr=e=>Tc(e.id,e.type),ait=["id","type","innerPath","pageId","useLanguage","multilingual","noRefFallbacks","doNotSync","variants","scope","fragmentType","fragmentInstance"],rEr=new Set(ait),oEr=(e,t=!0)=>!e?.id||!e.type?!1:t?Object.keys(e).every(n=>rEr.has(n)):!0,ef=e=>!!e.fragmentType,MAe=(e,t,n)=>!e||!t||e.type!==t.type||e.id!==t.id||!NO.default.isEqual(e.innerPath,t.innerPath)?!1:!n||!e.scope&&!t.scope?!0:MAe(e.scope,t.scope,n),nit=e=>{Array.isArray(e?.variants)&&e.variants.sort((t,n)=>t.idn.id?1:0)},sit=(e,t)=>ait.every(n=>n==="scope"||NO.default.isEqual(e?.[n],t?.[n])),rit=(e,t,n)=>{let r=xe(e),o=xe(t);return nit(r),nit(o),n?NO.default.isEqual(r,o):sit(r,o)},iEr=(e,t,n)=>!e||!t?!1:n?NO.default.isEqual(e,t)||rit(e,t,n):!sit(e,t)&&!rit(e,t,n)?!1:MAe(e,t,n),aEr=({innerPath:e})=>e?e[0]:null,dW=e=>{if(e.innerPath){let t={id:e.id,type:e.type};for(let n in e)n!=="innerPath"&&!t.hasOwnProperty(n)&&(t[n]=e[n]);return t}return e},lit=e=>e===void 0?[]:Array.isArray(e)?e:[].concat(e),mW=e=>lit(e.innerPath),kAe=e=>mW(e).length>0,sEr=e=>Jbr(e.id)?LAe(Xbr(e.id),e):e,lEr=e=>LAe(Zbr(e.id),e),cEr=["metaData","sig"],BAe=e=>n0(e,cEr),uEr=(e,t,n)=>e.endsWith(n)?Tc(e.replace(new RegExp(`-${n}$`),""),t):null});var CT={};Le(CT,{createStore:()=>ka,createStoreFromJS:()=>tf,jsToDalStore:()=>EX,mapToJson:()=>LO});function ka(e){return new bX(e)}function tf(e){return bX.createFromJS(e)}var L1,cit,uit,LO,EX,bX,TT=ge(()=>{"use strict";c();Mt();L1=R(T("lodash"));r0();cit=e=>{let t=new Map;return e.forEach((n,r)=>{t.set(r,n instanceof Map?cit(n):xe(n))}),t},uit=async e=>{let t=new Map;for(let[n,r]of e)t.set(n,r instanceof Map?await uit(r):await Promise.resolve(xe(r)));return t},LO=(e,t)=>{let n={};return e.forEach((r,o)=>{n[o]=r instanceof Map?LO(r,t):t(r)}),n},EX=e=>{let t=new Map;return Object.entries(e).forEach(([n,r])=>{t.set(n,new Map(Object.entries(r)))}),t},bX=class e{constructor(t){this.__type="DmStore";this._store=t??new Map}static createFromJS(t){return new e(EX(t))}get(t){return this._store.get(t.type)?.get(t.id)}has(t){let n=this._store.get(t.type);return n?n.has(t.id):!1}isRemoved(t){return this.has(t)&&L1.default.isUndefined(this.get(t))}set(t,n){let{type:r,id:o}=t,i=this._store.get(r);i||(i=new Map,this._store.set(r,i)),i.set(o,n)}remove(t){this.set(t,void 0)}deleteKey(t){let n=this._store.get(t.type);n?.delete(t.id),n?.size===0&&this._store.delete(t.type)}some(t){for(let[n,r]of this._store)for(let[o,i]of r)if(t({type:n,id:o},i))return!0;return!1}getValues(){let t=[];for(let[n,r]of this._store.entries())for(let[o,i]of r.entries())t.push({key:{id:o,type:n},value:i});return t}keys(){let t=[];for(let[n,r]of this._store.entries())for(let o of r.keys())t.push(Tc(o,n));return t}intersection(t){return this.filter(n=>t.has(n))}forEach(t){this._store.forEach((n,r)=>{n.forEach((o,i)=>{t(Tc(i,r),o)})})}filter(t){let n=new e;return this.forEach((r,o)=>{t(r,o)&&n.set(r,o)}),n}omit(t){let n=new Map,r=new Set(t);return this._store.forEach((o,i)=>{r.has(i)||n.set(i,o)}),new e(n)}isEmpty(){return L1.default.isEmpty(this._store)}_applyValuesMap(t,n){t.forEach((r,o)=>{r===void 0?delete n[o]:n[o]=r})}applyTypeValuesWithDelete(t,n){let r=this._store.get(t);r&&this._applyValuesMap(r,n)}applyValuesWithDelete(t){this._store.forEach((n,r)=>{let o=t[r];o||(o={},t[r]=o),this._applyValuesMap(n,o)})}applyValues(t){this._store.forEach((n,r)=>{let o=t[r];o||(o={},t[r]=o),n.forEach((i,a)=>{o[a]=i})})}merge(t){t._store.forEach((n,r)=>{let o=this._store.get(r);o?n.forEach((i,a)=>{o.set(a,i)}):this._store.set(r,new Map(n))})}cloneNamespaceAsJson(t){let n=this._store.get(t);return n instanceof Map?LO(n,xe):n}namespaceAsJson(t){let n=this._store.get(t);return n instanceof Map?LO(n,L1.default.identity):n}asJson(){return LO(this._store,L1.default.identity)}cloneAsJson(){return LO(this._store,xe)}clone(){return new e(cit(this._store))}size(){return(0,L1.default)(Array.from(this._store.values())).map("size").sum()}async cloneAsync(){return new e(await uit(this._store))}}});function ec(e,t=console){return fit!==e?{info:FAe.noop,error:FAe.noop}:{info(n,...r){t.info(pit(e,n),...r)},error(n,r,...o){t.error(pit(e,n),r,...o)}}}function AX(e){dit&&(window.localStorage.setItem(VAe,e),fit=mit(VAe))}var FAe,VAe,dit,mit,fit,pit,IX=ge(()=>{"use strict";c();FAe=T("lodash"),VAe="dm-debug",dit=function(){try{return typeof window<"u"&&!!window.localStorage}catch{return!1}}(),mit=e=>{if(typeof process<"u"&&!process.browser)return process.env.DEBUG;if(dit)return window.localStorage.getItem(e)},fit=mit(VAe),pit=(e,t)=>`[${e}] ${t}`});var CX,git=ge(()=>{"use strict";c();CX=class{constructor(){this.innerMap=new Map}toKey(t){return`${t.type}.${t.id}`}apply(t,n){let r=this.toKey(t);return n(r)}set(t,n){this.apply(t,r=>this.innerMap.set(r,n))}has(t){return this.apply(t,n=>this.innerMap.has(n))}get(t){return this.apply(t,n=>this.innerMap.get(n))}delete(t){return this.apply(t,n=>this.innerMap.delete(n))}}});function Sit(){let e=new Map,t=[],n=ka(),r=new CX,o=(m,f)=>{let g=r.get(m);g||(g=[],r.set(m,g)),f(g)},i=m=>{let f=r.get(m);if(f){for(let g=0;g{let{type:h,id:S}=f,E=m.getPassedFilters(h,g,S),b=jAe(e,m.indexName);E.forEach(I=>{let A=I.id,P=jAe(b,A),C=jAe(P,h);C.set(S,g),y.push(C,S,P,h,b,A)})},s=m=>{t.push(m),n.forEach((f,g)=>{M1.default.isNil(g)||o(f,y=>a(m,f,g,y))})};return{getIndexedValues:m=>{if(m?.verificationKey!==yit)throw new Error("Invalid Query filter indexKey");let{indexName:f,id:g}=m;return e.get(f)?.get(g)??pEr},getIndexKeys:m=>Array.from(e.get(m)?.keys()??[]),updateIndex:(m,f)=>{let g=n.get(m);return g===f||(n.set(m,f),M1.default.isNil(g)||i(m),M1.default.isNil(f))||o(m,y=>{t.forEach(h=>{a(h,m,f,y)})}),g},createFilterFactory:(m,f)=>{let g={indexName:m,getPassedFilters:(y,h,S)=>mEr(m,f,y,h,S),getFilter:y=>hit(m,y)};return s(g),g}}}var M1,yit,pEr,jAe,hit,dEr,mEr,UAe=ge(()=>{"use strict";c();M1=R(T("lodash"));TT();git();yit=Symbol(),pEr=new Map,jAe=(e,t)=>{let n=e.get(t);return n||(n=new Map,e.set(t,n)),n},hit=(e,t)=>{if(M1.default.isNil(t))throw new Error(`id is required for index results from ${e}`);return{verificationKey:yit,indexName:e,id:t}},dEr=6,mEr=(e,t,n,r,o)=>{let i=t(n,r,o);return M1.default.map(i,a=>hit(e,a))}});var Pit,fEr,fW,GAe=ge(()=>{"use strict";c();Pit=R(T("lodash")),fEr=e=>Pit.default.times(e,()=>Math.floor(Math.random()*36).toString(36)).join(""),fW=(e=3,t)=>{let n=t??fEr(e),r=0;return o=>{let i=`${n}-${r++}`;return o?`${i}-${o}`:i}}});function vc(e,t){if(e===null||typeof e!="object")return e===t;if(Array.isArray(e)){if(!Array.isArray(t)||e.length!==t.length)return!1;for(let n=0;n{"use strict";c()});var TX,gEr,yEr,bit,Eit,hEr,SEr,Ait,B1,vX=ge(()=>{"use strict";c();TX=R(T("lodash"));k1();gEr=["metaData"],yEr=["sig"],bit=e=>TX.default.isObject(e)&&!Array.isArray(e),Eit=(e,t)=>(0,TX.default)(e).keys().without(...t).size(),hEr=(e,t,n)=>Eit(e,n)===Eit(t,n),SEr=(e,t,n)=>(0,TX.default)(e).keys().without(...n).every(r=>vc(e[r],t[r])),Ait=(e,t,n)=>hEr(e,t,n)&&SEr(e,t,n),B1=(e,t)=>!bit(e)||!bit(t)?vc(e,t):Ait(e,t,gEr)&&Ait(e.metaData??{},t.metaData??{},yEr)});function Rc(e,t,n){let r=[],o=t,i=!1;for(;o!==null&&o.id!==e?.id;)i=i||e?.id===o.id,r.push(o),o=o.getPreviousSnapshot();if(o===null&&o!==e)throw new ee({message:"Could not locate the source snapshot",errorType:"failedToCreateSnapshotChain",extras:{source:n,fromSnapshot:e?.id,toSnapshot:t?.id,containsSnapshotId:i}});return r.reverse()}var Tit,$Ae,Iit,PEr,Cit,HAe,NA,gW=ge(()=>{"use strict";c();ze();Mt();Tit=R(T("lodash"));k1();TT();vT();vX();$Ae=(e,t)=>{let n=e;for(;n;){if(n._snapshotStore.has(t))return n._snapshotStore.get(t);n=n.getPreviousSnapshot()}},Iit=(e,t,n)=>{let r=Rc(t,e,"getRawDiff"),o={};return r.forEach(i=>{n?i.getAllFragmentsStore().getFragmentStore(n)?.applyValues(o):i.getStore().applyValues(o)}),o},PEr=(e,t)=>{let n=Rc(t,e,"getFragmentsRawDiff"),r={};return n.forEach(o=>{o._snapshotStore.forEach((i,a)=>{let s=r[a]??{};o.getFragmentStore(a)?.applyValues(s),r[a]=s})}),r},Cit=(e,t,n,r,o,i=vc)=>{Object.entries(t).forEach(([a,s])=>{let l=$Ae(e,{id:a,type:n,fragmentType:o}),u=i(l,s);r(u,n,a,l,o)})},HAe=(e,t,n,r,o)=>{t?Object.entries(e).forEach(([i,a])=>{Object.entries(a).forEach(([s,l])=>{Cit(n,l,s,r,i,o)})}):Object.entries(e).forEach(([i,a])=>{Cit(n,a,i,r,void 0,o)})},NA=class{constructor(t,n,r=""){this._previousSnapshot=t;this._snapshotStore=n;this.id=r;this._isForeign=!1;this._isUndoable=!1;this._wasRevertedByCheckpoint=!1}getPreviousSnapshot(){return this._previousSnapshot}exists(t){return $Ae(this,t)!==void 0}contains(t){return this._snapshotStore.has(t)}getValue(t){let n=$Ae(this,t);if(typeof n!="object"||n===null)return t.innerPath?.length?void 0:n;let{innerPath:r}=t;return r&&(typeof r=="string"&&(r=[r]),r.length&&(n=Tit.default.get(n,r))),Pl(n)}createRevertJS(t){let n=Iit(this,t),r={};return HAe(n,!1,t,(o,i,a,s)=>{if(!o){let l=r[i];l||(l={},r[i]=l),l[a]=s}}),Pl(r)}mutableDiff(t,n,r){if(!t)return this.toJS(n);let o=Iit(this,t,n);return HAe(o,!1,t,(i,a,s)=>{i&&delete o[a][s]},r),o}fragmentMutableDiff(t,n){if(!t)return this.toJS();let r=PEr(this,t);return HAe(r,!0,t,(o,i,a,s,l)=>{l&&(o&&delete r[l][i][a],Object.keys(r[l][i]).length===0&&delete r[l][i],Object.keys(r[l]).length===0&&delete r[l])},n),r}diff(t,n){let r=n?this.mutableDiff(t,n):this.fragmentMutableDiff(t);return Pl(r)}diffDeepCompare(t,n){let r=n?this.mutableDiff(t,n,B1):this.fragmentMutableDiff(t,B1);return Pl(r)}toJSForType(t){let n=Rc(null,this,"toJSForType"),r={};return n.forEach(o=>{o.getStore().applyTypeValuesWithDelete(t,r)}),Pl(r)}toJS(t){let n=Rc(null,this,"toJS"),r={};return n.forEach(o=>{(t?o.getFragmentStore(t):o._snapshotStore).applyValuesWithDelete(r)}),Pl(r)}isPredecessorOf(t){let n=t.getPreviousSnapshot();for(;n;){if(n===this)return!0;n=n.getPreviousSnapshot()}return!1}equals(t){return this===t}createSnapshotChainTo(t){return Rc(this,t,"createSnapshotChainTo")}setPreviousSnapshot(t){this._previousSnapshot=t}get isForeign(){return this._isForeign}setAsForeign(){this._isForeign=!0}get wasRevertedByCheckpoint(){return this._wasRevertedByCheckpoint}setAsRevertedByCheckpoint(){this._wasRevertedByCheckpoint=!0}get isUndoable(){return this._isUndoable}setAsUndoable(){this._isUndoable=!0}findNext(t){return t.find(n=>n._previousSnapshot===this)}getStore(){return this.getFragmentStore(tn)}getAllFragmentsStore(){return this._snapshotStore}getFragmentStore(t){return this._snapshotStore.getFragmentStore(t)??ka()}_toArray(){let t=[],n=this;for(;n!==null;)t.push(n),n=n.getPreviousSnapshot();return t.reverse()}[Symbol.iterator](){let t,n=this;return{next(){return t=t?t._previousSnapshot:n,{done:!t,value:t}}}}}});var nf,WAe,vit=ge(()=>{"use strict";c();nf=R(T("lodash"));ze();vT();WAe=(e,t=[],n=tn)=>{let{logger:r,experimentInstance:o}=e,i={},a={},s={},l=[],u=[],p=(M,N,B)=>(0,nf.default)(l).map(H=>H(M,N,B)).filter("isWhiteListed").map("issue").value(),d=(M,N,B,H,K)=>{try{return nf.default.map(B(M,N,n)??[],U=>{let z={...U,tags:nf.default.assign({validatorName:H,dataType:N?.type,namespace:M.type,dalValidation:!0,shouldFail:U.shouldFail},K,U.tags),extras:nf.default.assign({offendingData:N},U.extras)},k=p(M,N,z);return{...z,extras:nf.default.assign({issues:k},z.extras),isWhitelisted:k.length>0}})}catch(U){throw r.captureError(U,{tags:{validationFailure:!0}}),U}},m=({message:M,type:N,tags:B,extras:H,isWhitelisted:K,shouldFail:U})=>{let z=K||!U;return new ee({message:M,errorType:N,tags:z?{...B,warning:!0}:B,extras:H})},f=M=>{(o.isOpen("dm_ignoreStrictModeWarnings")?M.filter(({shouldFail:B,isWhitelisted:H})=>B&&!H):M).forEach(B=>r.captureError(m(B)))},g=(M,N,B)=>{M.forEach(H=>{B(m(H),N,H)})},y=M=>{M.length>0&&(M[0].tags.firstFail=!0)},h=(M,N,B,H)=>{for(let[K,U]of Object.entries(i)){let z=d(M,N,U,K,H),[k,G]=(0,nf.default)(z).filter("shouldFail").partition("isWhitelisted").value();y(G),f(z.filter(Y=>{if(Y.isWhitelisted){let X=nf.default.get(Y,["extras","issues",0]);return!nf.default.get(s,[M.type,M.id,X])}return!0})),g(k,M,Y=>{let X=nf.default.get(Y,["extras","issues",0]);nf.default.set(s,[M.type,M.id,X],!0)}),g(G,M,B)}},S=(M,N,B)=>{M.omit(t).forEach((H,K)=>{h(H,K,N,B)})},E=(M,N,B)=>{for(let H of u)if(H(B,N,M)?.isBlacklisted)return!0;return!1},b=M=>{throw M},I=(M,N,B)=>{(e.strictBlacklistBaselineForEmployees||E(M,N,B))&&b(M,N,B),nf.default.set(a,[N.type,N.id,B.type],{message:B.message})},A=(M,N)=>(B,H,K)=>{(!N||!nf.default.has(a,[H.type,H.id,K.type]))&&M(B,H,K)},P=(M,N,B)=>S(M,A(b,N),B),C=M=>{if(o.isOpen("dm_moveValidationBaseline")&&!nf.default.isEmpty(a))throw new ee({errorType:"doubleBaselineCreation",message:"baseline cannot be created twice"});S(M,I,{baseline:!0})},v=()=>{a={}};return{registerValidator:(M,N)=>{i[M]=N},validateStore:P,createBaseline:C,recreateBaseline:M=>{v(),C(M)},registerWhitelistCheck:M=>{l.push(M)},registerBaselineBlacklistCheck:M=>{u.push(M)},getBaseLineViolations:()=>nf.default.cloneDeep(a)}}});var Rit,o0,zAe=ge(()=>{"use strict";c();IX();Rit=ec("csave"),o0=(e,t,n)=>{if(!e)return!1;let r=t?.metaData?.sig;if(n===void 0&&r===void 0)return!1;if(t){let o=r??null;return n!==o&&Rit.info("isConflicting",n,o),n!==o}return n!==void 0&&Rit.info("isConflicting",n),n!==void 0}});function Oit(e,t){let n=new Map;for(let[r,o]of e)typeof o<"u"&&t(o,r)&&n.set(r,o);return n}function RX(e,t){let n={};for(let r in e){let o=e[r];typeof o<"u"&&t(o,r)&&(n[r]=o)}return n}function _it(e,t){if(e){for(let[n,r]of e)if(typeof r<"u"&&t(r,n))return{key:n,value:r}}}function xit(e,t){for(let n in e){let r=e[n];if(typeof r<"u"&&t(r,n))return{key:n,value:r}}}var YAe=ge(()=>{"use strict";c()});var Eg,wit,Dit,Nit,bEr,Lit,QAe,Mit,qAe,kit,Bit=ge(()=>{"use strict";c();IX();UAe();TT();GAe();gW();vit();Eg=R(T("lodash"));vT();zAe();r0();ze();Mt();k1();vX();YAe();wit=new Map,Dit="DAL_READ_VALUES",Nit="DAL_READ_INDEX",bEr=e=>e.documentPointer,Lit=e=>{if(bEr(e))throw new ee({errorType:"editorPointer",message:"Editor pointer detected, please unwrap the pointer before using it",extras:{pointer:e}})},QAe=(e,t,n)=>e.map(r=>Tc(r,t,n===tn?{}:{fragmentType:n})),Mit=(e,t,n)=>e?QAe([...e.keys()],t,n):[],qAe=class{constructor(t,n,r,o,i,a,s,l,u,p,d){this.fragmentType=t;this.coreConfig=n;this.queryFilterGetters=r;this.postSetOperations=o;this.dmTypes=i;this.customGetters=a;this.eventEmitter=s;this.lastApproved=l;this.snapshots=u;this.tagManager=p;this.customGettersEnabled=d;this.debugLogger=ec(`fragment-dal-${this.fragmentType}`);this.postTransactionOperations={};this.transactionDerivedMetadataOperations={};this.updateCallbacks=[];this.shouldNotifyAboutReads=!1;this.queryIndex=Sit(),this.store=ka(),this.createOpenTxId=fW(3),this.tentativeStore=ka(),this.currentOpenTransaction=this.createNewOpenTransaction(),this.validator=WAe(this.coreConfig,[OX],this.fragmentType),this.rebaseValidator=WAe(this.coreConfig,[OX],this.fragmentType),this.createSignature=fW(3,this.coreConfig.signatureSeed)}get _queryIndex(){return this.queryIndex}get _currentTransaction(){return this.currentOpenTransaction}get _store(){return this.store}get _tentativeStore(){return this.tentativeStore}get _snapshots(){return this.snapshots}updateLastApprovedSnapshot(t){this.lastApproved=t}approve(t){let n=tf(t.mutableDiff(this.lastApproved,this.fragmentType));this.store.merge(n),this.tentativeStore=tf(this.snapshots.last()?.mutableDiff(t,this.fragmentType))}enableShouldNotifyAboutReads(){this.shouldNotifyAboutReads=!0}validateTransactionStoreSize(t,n){let r=t.size();if(r>this.coreConfig.transactionActionsLimit){let o=new Ur({errorType:"exceedsMaxActionsPerTransaction",message:`Exceeds actions reached ${r}`,extras:{tags:n}});if(this.coreConfig.logger.captureError(o),this.coreConfig.experimentInstance.isOpen("dm_failOnExceedsMaxActionsPerTransaction"))throw o}}find(t,n,r){this.verifyQueryParams(t);let i=this.queryIndex.getIndexedValues(n).get(t),a=_it(i,r);return Pl(a)}getIndexed(t){let n=this.queryIndex.getIndexedValues(t);return this.shouldNotifyAboutReads&&this.eventEmitter.emit(Nit,{namespacesKeys:Array.from(n.keys()),indexKey:t}),wAe(n??wit)}getIndexKeys(t){return this.queryIndex.getIndexKeys(t)}get(t){return Pl(this.getRawValue(t))}getWithPath(t,n){return this.get(n0(t,n))}has(t){return!Eg.default.isNil(this.getRawValue(t))}isDirty(t){return this.currentOpenTransaction.store.has(t)}query(t,n,r){let o=this.queryRaw(t,n,r);return xAe(o??wit)}queryKeys(t,n,r){let o=this.queryRaw(t,n,r);return o?[...o.keys()]:[]}getIndexPointers(t,n,r){let o=this.queryIndex.getIndexedValues(t),i;if(n){let a=o.get(n);i=Mit(a,n,r)}else i=[...o.entries()].flatMap(([a,s])=>Mit(s,a));return this.shouldNotifyAboutReads&&this.eventEmitter.emit(Dit,i),i}remove(t){let n=mW(t),r=dW(t),o;n.length>0&&(o=xe(this.getRawValue(r)),Eg.default.unset(o,n)),this.signAndUpdateTransactionAndIndex(r,o)}_set(t,n){Lit(t);let r=mW(t),o=dW(t),i=xe(n);if(r.length>0){let a=xe(this.getRawValue(o))||{};i=Eg.default.setWith(a,r,i,Object)}this.signAndUpdateTransactionAndIndex(o,i)}set(t,n){this.setIfChanged(t,n)}setIfChanged(t,n){this.isChanged(t,n)&&this._set(t,n)}modify(t,n){return this.set(t,n(this.get(t)))}touch(t){return this._set(t,this.getterForSetAndTouch(t))}getLastSnapshot(){return this.snapshots.last()}validate(t){let n=this.getMergedStore(!1);this.validator.validateStore(n,!1,t)}validatePendingCommit(t){return this.validateTransactionStoreSize(this.currentOpenTransaction.store,t),this.validator.validateStore(this.currentOpenTransaction.store,!0,t)}createValidationBaseline(){let t=this.getMergedStore(!1);this.validator.createBaseline(t)}recreateValidationBaseline(){let t=this.getMergedStore(!1);this.validator.recreateBaseline(t)}sign(t,n,r){let o;if(n&&this.hasSignature(t)){let i=r?r.getValue(t):this.getCommittedValue(t);o=i?i.metaData?.sig??null:void 0,n.metaData=Object.assign(n.metaData||{},{sig:this.createSignature()})}return{value:n,basedOnSignature:o}}getBasedOnSignatureId(t,n){return`${t}$${n}`}getBasedOnSignaturePointer(t){let{id:n,type:r,fragmentType:o}=t;return Tc(this.getBasedOnSignatureId(r,n),OX,{fragmentType:o})}getBasedOnSignature(t){return this.get(this.getBasedOnSignaturePointer(t))}setBasedOnSignature(t,n){this._set(this.getBasedOnSignaturePointer(t),n)}getCurrentOpenTransaction(){return Pl({id:"openTransaction",items:this.currentOpenTransaction.store.getValues()})}getLastApprovedSnapshot(){if(!this.lastApproved)throw new Error("Empty DAL does not have a last approved snapshot");return this.lastApproved}dropUncommittedTransaction(t,n,r={}){if(this.currentOpenTransaction.store.isEmpty())return;let o=this.currentOpenTransaction.store.keys(),i=(0,Eg.default)(o).reject(s=>s.type==="basedOnSignature").map("id").join(",");console.error("dropUncommittedTransaction",n,r),this.coreConfig.logger.captureError(new ee({message:"dropUncommittedTransaction",errorType:"dropUncommittedTransaction",tags:{attempt:this.currentOpenTransaction.attempt,id:this.currentOpenTransaction.id},extras:{reason:t,appDefinitionId:Eg.default.get(r,["appDefinitionId"],""),stack:n?.stack?n.stack.slice(0,3e3):"",pointersToUpdate:i}})),this.createNewOpenTransaction(),this.updateIndex(o);let a=ka();o.forEach(s=>{a.set(s,this.getMergedStoreValue(s))}),this.report(a,mb.TRANSACTION_REJECTED)}hasNothingToCommit(){return this.currentOpenTransaction.store.isEmpty()}withoutCustomGetters(t){return(...n)=>{try{return this.customGettersEnabled=!1,t(...n)}finally{this.customGettersEnabled=!0}}}hasSignature(t){let n=this.dmTypes[t.type]?.idsWithSignature;return n?n.has(t.id):this.dmTypes[t.type]?.hasSignature??!1}isRegisteredNamespace(t){return!!this.dmTypes[t]}getRegisteredTypes(){return this.dmTypes}verifyQueryParams(t){if(!this.isRegisteredNamespace(t))throw console.log(`Namespace ${t} is not registered`),new Error(`Namespace ${t} is not registered`)}queryRaw(t,n,r){let i=this.queryIndex.getIndexedValues(n).get(t);return r&&i&&(i=Oit(i,r)),this.shouldNotifyAboutReads&&this.eventEmitter.emit(Nit,{namespacesKeys:[t],indexKey:n}),i}getFromStores(t,n){let r=t.find(o=>o.has(n));return r?r.get(n):void 0}getMergedStoreValue(t){return this.getFromStores([this.currentOpenTransaction.store,this.tentativeStore,this.store],t)}getCommittedValue(t){return this.getFromStores([this.tentativeStore,this.store],t)}getApprovedValue(t){return this.getFromStores([this.store],t)}getRootValueFromCustomGetterOrStore(t){let n={queryFilterGetters:this.queryFilterGetters,query:this.query.bind(this),get:r=>Pl(this.getMergedStoreValue(r))};if(this.customGettersEnabled){let r=this.customGetters[t.type];if(r)return r(n,t)}return this.getCommittedValue(t)}getRawValue(t){Lit(t),this.shouldNotifyAboutReads&&this.eventEmitter.emit(Dit,[t]);let n=this.currentOpenTransaction.store,r=dW(t),o;return n.has(r)?o=n.get(r):o=this.getRootValueFromCustomGetterOrStore(r),PX(t,o)}createNewOpenTransaction(){let t={attempt:0,id:this.createOpenTxId(),store:ka()};return this.currentOpenTransaction=t,t}callPostTransactionOperationsAndAccumulateAsyncSideEffects(t){let n=(0,Eg.default)(this.postTransactionOperations).map(o=>o(t)).compact().value();return Eg.default.isEmpty(n)?null:async()=>{await Promise.all(n.map(o=>o()))}}callTransactionDerivedMetadata(t){Eg.default.forEach(this.transactionDerivedMetadataOperations,n=>n(t))}report(t,n){if(t.isEmpty())return;let r={id:"post-transaction-report",items:t.getValues()},o=this.callPostTransactionOperationsAndAccumulateAsyncSideEffects(r);this.eventEmitter.emit(n,o)}isConflicting(t,n){return t.some((r,o)=>{let{id:i,type:a}=r,s=Tc(i,a,{fragmentType:this.fragmentType});return this.hasSignature(s)&&o0(o,n(s),t.get(this.getBasedOnSignaturePointer(s)))})}isConflictingWithMergedValue(t){return this.isConflicting(t,n=>this.getMergedStoreValue(n))}isConflictingWithCommittedValue(t){return this.isConflicting(t,n=>this.getCommittedValue(n))}isConflictingWithApprovedValue(t){return this.isConflicting(t,n=>this.getApprovedValue(n))}updateSingleIndexValue(t){let n=this.getMergedStoreValue(t),r=this.queryIndex.updateIndex(t,n);this.updateCallbacks.forEach(o=>{o(t,r,n)})}updateIndex(t){t.forEach(n=>this.updateSingleIndexValue(n))}runPostSetOperations(t,n){try{Eg.default.forEach(this.postSetOperations,r=>r(t,n))}catch(r){throw this.coreConfig.logger.captureError(r,{tags:{postSetOp:!0},extras:{pointer:t,value:n}}),r}}setWithSignature(t,n){let{value:r,basedOnSignature:o}=this.sign(t,n);r&&this.hasSignature(t)&&this.setBasedOnSignature(t,o),this.currentOpenTransaction.store.set(t,r)}signAndUpdateTransactionAndIndex(t,n){this.setWithSignature(t,n),this.updateSingleIndexValue(t),this.runPostSetOperations(t,n)}getterForSetAndTouch(t){return this.coreConfig.experimentInstance.isOpen("dm_useCustomGettersForSetAndTouch")?this.getRawValue(t):this.getMergedStoreValue(t)}isChanged(t,n){let r=this.getterForSetAndTouch(t);if(kAe(t)){let o=PX(t,r);return!vc(o,n)}return!B1(r,n)}isSameValue(t,n){let r=t?.metaData?.sig,o=n?.metaData?.sig;return r||o?r===o:vc(t,n)}collectChanges(t,n){let r=ka();return t.forEach((o,i)=>{let a=this.getCommittedValue(o);this.isSameValue(a,i)||r.set(o,a)}),n&&n.forEach((o,i)=>{t.has(o)||r.set(o,i)}),r}getMergedStore(t){let n=ka();return n.merge(this.store),n.merge(this.tentativeStore),t&&n.merge(this.currentOpenTransaction.store),n}getMergedNamespace(t){let n={};return this.store.applyTypeValuesWithDelete(t,n),this.tentativeStore.applyTypeValuesWithDelete(t,n),this.currentOpenTransaction.store.applyTypeValuesWithDelete(t,n),n}hasRebaseValidationErrors(t){try{let n=t.getStore();return this.rebaseValidator.validateStore(n,!0,{isRebasing:!0,correlationId:t.id}),!1}catch{return!0}}rebuildOpenStore(t,n){let r=this.currentOpenTransaction.store.keys();this.createNewOpenTransaction(),t.forEach(o=>{let i=n?o.getFragmentStore(n):o.getStore();this.currentOpenTransaction.store.merge(i),r.push(...i.keys())}),this.updateIndex(r)}removeTentativeSnapshotWithoutUpdatingTheIndex(t){this.snapshots.remove(t),this.tagManager.remove(t)}resetToApprovedState(){let t=Eg.default.concat(this.tentativeStore.keys(),this.currentOpenTransaction.store.keys());this.tentativeStore=ka(),this.createNewOpenTransaction(),this.updateIndex(t)}removeConflictsAndReport(t,n){let r=this.tentativeStore;this.removeConflicts();let o=this.collectChanges(r,n);this.report(o,t)}createSnapshotTrace(){let t=(0,Eg.default)(Rc(null,this.snapshots.last(),"createSnapshotTrace")).slice(-30).map("id").value();return{lastApproved:this.lastApproved?.id,snapshotChain:t,currentTags:this.tagManager._getAllTags()}}createMergeToApprovedError(t,n){return new ee({errorType:"cannotMergeToApprovedError",message:`MergeToApprovedStore called for ${n} outside initialization flow`,extras:{id:n,...this.createSnapshotTrace(),content:Eg.default.keys(t.asJson())}})}createRemovedApprovedError(t,n){return new ee({errorType:"removedApprovedSnapshotError",message:"We just removed the approved snapshot due to a conflict",extras:{position:t,id:n,...this.createSnapshotTrace()}})}removeConflictsReportAndVerify(t,n,r,o){if(this.removeConflictsAndReport(r,t),!this.snapshots.findById(o))throw this.createRemovedApprovedError(n,o)}_getApprovedStoreAsJson(){return this.store.asJson()}_getTentativeStoreAsJson(){return this.tentativeStore.asJson()}_getCommittedStoreAsJson(){return this.getMergedStore(!1).asJson()}_getMergedStoreAsJson(){return this.getMergedStore(!0).asJson()}commitTransactionForFragment(t,n){let r=this.currentOpenTransaction.store;if(!r.isEmpty()){let a={id:this.currentOpenTransaction.id,items:r.getValues()};this.callTransactionDerivedMetadata(a)}if(r.isEmpty())return null;let o=++this.currentOpenTransaction.attempt;n||this.validatePendingCommit({committer:t,attempt:o,openTxId:this.currentOpenTransaction.id});let i=r.keys();return this.createNewOpenTransaction(),this.isConflictingWithCommittedValue(r)?(this.updateIndex(i),null):(this.tentativeStore.merge(r),r)}mergeToApprovedStore(t){this.store.merge(t),this.updateIndex(t.keys())}getAllItemsInNamespace(t){let n=this.getMergedNamespace(t);return Object.keys(n).map(r=>NAe({id:r,type:t,fragmentType:this.fragmentType,fragmentInstance:n[r].metaData?.fragmentInstance}))}validateAndMergeToApprovedStore(t,n){this.validateMergeToApproved(t,n),this.mergeToApprovedStore(t)}validateMergeToApproved(t,n){if((!this.tentativeStore.isEmpty()||!this.currentOpenTransaction.store.isEmpty())&&(!t.intersection(this.tentativeStore).isEmpty()||!t.intersection(this.currentOpenTransaction.store).isEmpty()))throw this.createMergeToApprovedError(t,n)}removeConflicts(){let t=this.currentOpenTransaction,n=[],r=Rc(this.lastApproved,this.snapshots.last(),"removeConflicts");this.resetToApprovedState();for(let[o,i]of r.entries()){let a=i.getFragmentStore(this.fragmentType);if(this.isConflictingWithMergedValue(a))n.push(i),this.removeTentativeSnapshotWithoutUpdatingTheIndex(i);else if(this.currentOpenTransaction.store.merge(a),this.updateIndex(a.keys()),this.hasRebaseValidationErrors(i)){this.debugLogger.info(`dmDal rebase is removing a snapshot due to validation conflict. Snapshot id: ${i.id}`),n.push(i),this.removeTentativeSnapshotWithoutUpdatingTheIndex(i);let s=(0,Eg.default)(r).take(o).without(...n).value();this.rebuildOpenStore(s,this.fragmentType)}}this.tentativeStore.merge(this.currentOpenTransaction.store),this.currentOpenTransaction=t,this.updateIndex(t.store.keys()),n.length&&this.eventEmitter.emit(F1,n)}getNamespaces(){return Array.from(this.getMergedStore(!0)._store.keys())}},kit=({fragmentType:e,coreConfig:t,queryFilterGetters:n,postSetOperations:r,dmTypes:o,customGetters:i,eventEmitter:a,lastApproved:s,snapshots:l,tagManager:u,customGettersEnabled:p})=>new qAe(e,t,n,r,o,i,a,s,l,u,p)});var _X,V1,KAe=ge(()=>{"use strict";c();_X=R(T("lodash")),V1=()=>{let e=new Map,t=u=>{let p=e.get(u);return p||(p=[],e.set(u,p)),p};return{remove:u=>{e.forEach(p=>{p.forEach((d,m)=>{d===u&&(p[m]=u.getPreviousSnapshot())})})},addSnapshot:(u,p)=>{let d=t(u);return d.push(p),d.length-1},getCount:u=>{let p=e.get(u);return _X.default.size(p)},getSnapshot:(u,p)=>{let d=t(u);if(p>=d.length)throw new Error(`snapshot index out of bounds (${p} >= ${d.length}) for tag ${u}.`);return d[p]},getLastSnapshot:u=>{let p=e.get(u);return _X.default.last(p)??null},removeLastSnapshot:u=>t(u).pop(),_getAllTags:()=>{let u={};return e.forEach((p,d)=>{u[d]=(0,_X.default)(p).takeRight(10).map("id").value()}),u}}}});function si(e){return new i0(e)}function j1(e){return i0.createFromJS(e)}function Vit(e){let t={[tn]:e};return i0.createFromJS(t)}var Fit,EEr,AEr,IEr,i0,U1=ge(()=>{"use strict";c();TT();Mt();Fit=R(T("lodash"));vT();EEr=e=>{let t=new Map;return Object.entries(e).forEach(([n,r])=>{t.set(n,tf(r))}),t},AEr=(e,t)=>{let n={};return e.forEach((r,o)=>{r._store&&(r=r._store),n[o]=r instanceof Map?LO(r,t):t(r)}),n},IEr=e=>{let t=new Map;return e.forEach((n,r)=>{t.set(r,n.clone())}),t},i0=class e{constructor(t){this.__type="FragmentStore";this._store=t??new Map}static createFromJS(t){return new e(EEr(t))}get(t){return this._store.get(t.fragmentType||tn)?.get(t)}has(t){return this._store.get(t.fragmentType||tn)?.has(t)??!1}set(t,n){let r=t.fragmentType||tn;this.getFragmentStore(r)||this.setFragmentStore(r,ka()),this.getFragmentStore(r).set(t,n)}remove(t){this.getFragmentStore(t.fragmentType||tn)?.set(t,void 0)}deleteKey(t){this.getFragmentStore(t.fragmentType||tn)?.deleteKey(t)}some(t){for(let[n,r]of this._store.entries())if(r.some((o,i)=>t({...o,fragmentType:n},i)))return!0;return!1}getValues(){return[...this._store.values()].flatMap(t=>t.getValues())}keys(){return[...this._store.values()].flatMap(t=>t.keys())}filter(t){let n=new e;return this._store.forEach((r,o)=>{let i=r.filter(t);i.size()>0&&n._store.set(o,i)}),n}omit(t){let n=new Map;return this._store.forEach((r,o)=>{n.set(o,r.omit(t))}),new e(n)}intersection(t){return this.filter(n=>t.has(n))}cloneAsJson(){return AEr(this._store,xe)}clone(){return new e(IEr(this._store))}size(){let t=0;return this._store.forEach(n=>t+=n.size()),t}getFragmentStoreMap(){return this._store}hasFragmentStore(t){return!!this.getFragmentStore(t)}setFragmentStore(t,n){this._store.set(t,n)}getFragmentStore(t){return this._store.get(t)}asJson(){let t={};return this._store.forEach((n,r)=>{t[r]=n.asJson()}),t}applyValuesWithDelete(t){this._store.forEach((n,r)=>{let o=t[r];o||(o={},t[r]=o),n._store.forEach((i,a)=>{let s=o[a];s||(s={},o[a]=s),n._applyValuesMap(i,s)})})}applyTypeValuesWithDelete(t,n){this._store.forEach(r=>{let o=r._store.get(t);o&&r._applyValuesMap(o,n)})}merge(t){t._store.forEach((n,r)=>{let o=this._store.get(r);o?o.merge(n):this.setFragmentStore(r,n.clone())})}isEmpty(){return[...this._store.values()].every(t=>t.isEmpty())}forEach(t){this._store.forEach((n,r)=>{t(n,r)})}isRemoved(t){return this.has(t)&&Fit.default.isUndefined(this.get(t))}delete(t){this._store.delete(t)}entries(){return this._store.entries()}}});var G1,XAe=ge(()=>{"use strict";c();gW();GAe();G1=()=>{let e=fW(12),t=null,n=S=>(S.setPreviousSnapshot(t),t=S,S),r=(S,E=e())=>{let b=new NA(t,S,E);return t=b,b},o=(S,{limit:E,inclusive:b}={})=>{let I=t;for(;I!==null&&!S(I);){if(E&&I===E)return null;I=I.getPreviousSnapshot()}return E&&!b&&I===E?null:I},i=S=>o(({id:E})=>E===S),a=(S,E)=>o(({id:b})=>b===S,{limit:E}),s=(S,E)=>o(({id:b})=>b===S,{limit:E,inclusive:!0}),l=(S,{limit:E,inclusive:b}={})=>{let I=t;for(;I!==null&&!S(I);){if(E&&I.id===E.id)return null;I=I.getPreviousSnapshot()}return E&&!b&&I?.id===E.id?null:I},u=(S,E)=>l(({id:b})=>b===S,{limit:E}),p=S=>o(E=>E._previousSnapshot===S),d=(S,E,b=e())=>{if(!t)throw new Error("Insert is not allowed for an empty snapshotList");if(!E)throw new Error("Insert is not allowed without a previous id snapshotList");if(E===t.id)return r(S,b);let I=i(E),A=new NA(I,S,b),P=p(I);if(!P)throw new Error("insert failed to find the next snapshot in the chain");return P._previousSnapshot=A,A},m=S=>{if(S===t)t=S.getPreviousSnapshot();else{let E=p(S);E&&(E._previousSnapshot=S._previousSnapshot)}return t},f=()=>{let S;return{next(){return S=S?S._previousSnapshot:t,{done:S===null,value:S}}}},g=()=>{let S=[],E=t;for(;E!==null;)S.push(E),E=E.getPreviousSnapshot();return S.reverse()},y=S=>{S.forEach(E=>{n(E)})},h=S=>e(S);return{last:()=>t,add:r,insert:d,addAll:y,addSnapshot:n,find:o,remove:m,findById:i,findByIdLimit:a,findByIdLimitInclusive:s,findByIdLimitCompareIds:u,[Symbol.iterator]:f,isEmpty:()=>!t,toArray:g,listIds:()=>g().map(S=>S.id),generateId:h}}});var jit,Uit=ge(()=>{"use strict";c();jit=e=>{let{schemaService:t}=e,n=a=>t.isSystemStyle(a),r=(a,s)=>s.type,o=(a,s)=>{let l=r(a,s);return t.extractReferences(a,l,s)},i=(a,s)=>o(a,s).filter(({refInfo:l})=>l.isRefOwner);return{isSystemStyle:n,validate:t.validateNoDefaults,validateStrict:t.validateStrict,hasNamespace:t.hasNamespace,isDraftItem:t.isDraftItem,addDefaultsAndValidate:t.addDefaultsAndValidate,createItemAccordingToSchema:t.createItemAccordingToSchema,getReferences:o,getOwnedReferences:i,getSchemaType:r,extractReferenceFieldsInfo:t.extractReferenceFieldsInfo,getComponentDefinition:t.getDefinition,isPermanentDataType:t.isPermanentDataType,validateBinding:t.validateBinding}}});var md,mb,F1,ZAe,LA,MO,OX,tn,JAe,eIe,tIe,xX,vT=ge(()=>{"use strict";c();ze();TT();Bit();md=R(T("lodash"));KAe();U1();XAe();Uit();gW();r0();Mt();mb={TRANSACTION_REJECTED:"TRANSACTION_REJECTED",TRANSACTION_BY_OTHER:"TRANSACTION_BY_OTHER",LOCAL_TRANSACTION_APPROVED:"LOCAL_TRANSACTION_APPROVED"},F1="SNAPSHOT_REMOVED_DUE_TO_CONFLICT",ZAe=class e extends ee{constructor(){super({errorType:"CommitsDisabledError",message:"commitTransaction was called when commits were disabled. Perhaps disableCommits was called without a subsequent call to enableCommits?"}),Object.setPrototypeOf(this,e.prototype)}},LA=class e extends Error{constructor(n,r){let o=r?`. Reason: ${r}`:"";super(`Transaction was rejected by server, transaction id ${n}${o}`);this.reason=r;Object.setPrototypeOf(this,e.prototype)}},MO=class e extends Error{constructor(t){super(`Snapshot was removed by client due to conflict, snapshot correlation id ${t}`),Object.setPrototypeOf(this,e.prototype)}},OX="basedOnSignature",tn="Pages",JAe=class e extends ee{constructor(t,n,r,o){super({errorType:"cannotApproveError",message:`Cannot approve, ${n} is not a pending transaction`,extras:{id:n,...r,unlinked:!t,foundByCompareIds:!!o,content:[...t?.getAllFragmentsStore()?.entries()??[]].map(([i,a])=>({[i]:md.default.keys(a.asJson())}))}}),Object.setPrototypeOf(this,e.prototype)}},eIe=class{constructor(t,n){this.dalManager=t;this.fragmentDALs=n;this.pagesDal=this.fragmentDALs[tn]}registerFilter(t,n){Object.values(md.default.omit(this.fragmentDALs,tn)).forEach(o=>{o._queryIndex.createFilterFactory(t,n)});let r=this.pagesDal._queryIndex.createFilterFactory(t,n);this.dalManager.queryFilterGetters[r.indexName]=r.getFilter}registerValidator(t,n,r){md.default.forEach(this.fragmentDALs,(o,i)=>{r.exclude?.includes(i)||(r.include.includes("*")||r.include.includes(i))&&o.validator.registerValidator(t,n)})}registerRebaseValidator(t,n){this.pagesDal.rebaseValidator.registerValidator(t,n)}registerValidationWhitelistCheck(t){this.pagesDal.validator.registerWhitelistCheck(t)}registerPostTransactionOperation(t,n){Object.values(this.fragmentDALs).forEach(r=>{r.postTransactionOperations[t]=n})}registerTransactionDerivedMetadata(t,n,r){if(r){let o=this.fragmentDALs[r];if(!o)throw new Error(`Fragment type ${r} is not supported`);o.transactionDerivedMetadataOperations[t]=n}else Object.values(this.fragmentDALs).forEach(o=>{o.transactionDerivedMetadataOperations[t]=n})}registerBaselineBlacklistCheck(t){this.pagesDal.validator.registerBaselineBlacklistCheck(t)}registerForChangesCallback(t){this.pagesDal.updateCallbacks.push(t)}unregisterForChangesCallback(t){md.default.remove(this.pagesDal.updateCallbacks,n=>n===t)}},tIe=class{constructor(t,n,r,o,i,a){this.coreConfig=t;this.postSetOperations=n;this.dmTypes=r;this.customGetters=o;this.eventEmitter=i;this.queryFilterGetters={};this.tagManager=V1();this.fragmentDALs={};this.basedOnSignatureMap={};this.lastApproved=null;this.customGettersEnabled=!0;this.commitsEnabled=!0;this.snapshots=G1(),this.schema=jit({schemaService:this.coreConfig.schemaService,experiments:{}}),this.rebaseValidator=null,(t.supportedFragments?md.default.keys(t.supportedFragments).concat(tn):[tn]).forEach(l=>{this.fragmentDALs[l]=kit(this.getFragmentArgs(l))}),this.registrar=new eIe(this,this.fragmentDALs),a&&this.mergeToApprovedStore(si(a))}getFragmentArgs(t){return{fragmentType:t,coreConfig:this.coreConfig,queryFilterGetters:this.queryFilterGetters,postSetOperations:this.postSetOperations,dmTypes:this.dmTypes,customGetters:this.customGetters,eventEmitter:this.eventEmitter,lastApproved:this.lastApproved,snapshots:this.snapshots,tagManager:this.tagManager,customGettersEnabled:this.customGettersEnabled}}updateLastApprovedSnapshot(t){this.lastApproved=t,this.applyToAllDALs(n=>n.updateLastApprovedSnapshot(t))}applyToAllDALs(t){let n=new Map;return(0,md.default)(this.fragmentDALs).toPairs().forEach(([r,o])=>{let i=t(o);md.default.isNil(i)||n.set(r,i)}),n}applyFragmentChangesOnDALs(t,n){let r=new Map;return t.forEach((o,i)=>{let a=i===tn?this.pagesDal:this.getFragmentDal(i);r.set(i,n(a,o))}),r}validateFragmentInstance(t,n){let{fragmentInstance:r}=t,o=n?.metaData?.fragmentInstance;if(r&&o&&r!==o)throw new Error(`Fragment instance ${t.fragmentInstance} sent in pointer doesn't match fragment instance in metaData ${n.metaData.fragmentInstance}`)}getMergedStoreAsJson(t){return this.pagesDal.getMergedStore(t).asJson()}enableShouldNotifyAboutReads(){this.applyToAllDALs(t=>t.enableShouldNotifyAboutReads())}approve(t){let n=this.snapshots.findByIdLimit(t,this.lastApproved);if(!n)throw this.createCannotApproveError(t);n.getAllFragmentsStore().forEach((r,o)=>{o===tn?this.pagesDal.approve(n):this.getFragmentDal(o).approve(n)}),this.updateLastApprovedSnapshot(n)}reject(t){let n=this.snapshots.findByIdLimit(t,this.lastApproved);n&&(this.applyOnSnapshotsRange(this.lastApproved,n,r=>{this.snapshots.remove(r),this.tagManager.remove(r)}),this.applyToAllDALs(r=>r.removeConflictsAndReport(mb.TRANSACTION_REJECTED)))}commitTransaction(t,n){if(!this.commitsEnabled)return this.coreConfig.logger.captureError(new ZAe),this.snapshots.last();if(md.default.every(Array.from(this.applyToAllDALs(s=>s.hasNothingToCommit()).values())))return this.snapshots.last();let o=this.applyToAllDALs(s=>s.commitTransactionForFragment(t,n));if(!o.size)return this.snapshots.last();let i=si(o),a=this.snapshots.add(i);return this.applyFragmentChangesOnDALs(i,(s,l)=>s.report(l,mb.LOCAL_TRANSACTION_APPROVED)),a}safeCommitTransactionWithErrorReport(t,n){try{return this.commitTransaction(n)}catch(r){let o=new ee(r);return o.tags??={},md.default.assign(o.tags,t),this.coreConfig.logger.captureError(o),this.commitTransaction(n,!0)}}find(t,n,r,o=tn){return this.getFragmentDal(o).find(t,n,r)}getIndexed(t,n=tn){return this.getFragmentDal(n).getIndexed(t)}getIndexKeys(t,n=tn){return this.getFragmentDal(n).getIndexKeys(t)}getFragmentDal(t){let n=this.fragmentDALs[t];if(!n)throw new Error(`Fragment type ${t} is not supported`);return n}get(t){if(ef(t)){let n=this.getFragmentDal(t.fragmentType).get(t);return this.validateFragmentInstance(t,n),n}return this.pagesDal.get(t)}getWithPath(t,n){return ef(t)?this.getFragmentDal(t.fragmentType).getWithPath(t,n):this.pagesDal.getWithPath(t,n)}has(t){return ef(t)?this.getFragmentDal(t.fragmentType).has(t):this.pagesDal.has(t)}isDirty(t){return ef(t)?this.getFragmentDal(t.fragmentType).isDirty(t):this.pagesDal.isDirty(t)}query(t,n,r,o=tn){return this.getFragmentDal(o).query(t,n,r)}queryKeys(t,n,r,o=tn){return this.getFragmentDal(o).queryKeys(t,n,r)}getIndexPointers(t,n,r=tn){return this.getFragmentDal(r).getIndexPointers(t,n,r)}rebase(t,n,r){let o=this.wrapStoreToFragmentStore(t);return this._rebase(o,n,mb.LOCAL_TRANSACTION_APPROVED,this.snapshots.generateId(r))}rebaseForeignChange(t,n,r){let o=this.wrapStoreToFragmentStore(t),i=r??this.snapshots.generateId("unknown-foreign"),a=this._rebase(o,n,mb.TRANSACTION_BY_OTHER,i);return a.setAsForeign(),a}wrapStoreToFragmentStore(t){if("getFragmentStoreMap"in t)return t;let n=si();return n.setFragmentStore(tn,t),n}_rebase(t,n,r,o){if(!this.snapshots.findByIdLimitInclusive(n,this.lastApproved))return this.rebaseApprovedHistory(t,n,r,o);let a=this.snapshots.insert(t,n,o);return this.runValidation(()=>this.applyFragmentChangesOnDALs(t,(s,l)=>s.removeConflictsReportAndVerify(l,n,r,a.id))),a}remove(t){ef(t)?this.getFragmentDal(t.fragmentType).remove(t):this.pagesDal.remove(t)}set(t,n){ef(t)?(this.validateFragmentInstance(t,n),this.getFragmentDal(t.fragmentType).set(t,n),this.addBasedOnSignatureToMap(t)):this.pagesDal.set(t,n)}addBasedOnSignatureToMap(t){let{id:n,type:r,fragmentType:o}=t;!o||!this.hasSignature(t)||(this.basedOnSignatureMap[this.getBasedOnSignatureId(r,n)]=o)}setIfChanged(t,n){ef(t)?this.getFragmentDal(t.fragmentType).setIfChanged(t,n):this.pagesDal.setIfChanged(t,n)}modify(t,n){return this.set(t,n(this.get(t)))}touch(t){return ef(t)?this.getFragmentDal(t.fragmentType).touch(t):this.pagesDal.touch(t)}getLastSnapshot(){return this.snapshots.last()}takeSnapshot(t){let n=this.commitTransaction("takeSnapshot");return this.tagManager.addSnapshot(t,n)}takeLastApprovedSnapshot(t){this.tagManager.addSnapshot(t,this.getLastApprovedSnapshot())}runValidation(t){if(this.coreConfig.experimentInstance.isOpen("dm_validateWithoutCustomGetters"))return this.withoutCustomGetters(t)();t()}validate(t,n){this.runValidation(()=>{if(n){this.fragmentDALs[n].validate(t);return}this.applyToAllDALs(r=>r.validate(t))})}validatePendingCommit(t){this.runValidation(()=>this.applyToAllDALs(n=>n.validatePendingCommit(t)))}createValidationBaseline(){this.pagesDal.createValidationBaseline()}recreateValidationBaseline(){this.applyToAllDALs(t=>t.recreateValidationBaseline())}sign(t,n,r){return ef(t)?this.getFragmentDal(t.fragmentType).sign(t,n,r):this.pagesDal.sign(t,n,r)}getBasedOnSignatureId(t,n){return`${t}$${n}`}getBasedOnSignaturePointer(t){return ef(t)?this.getFragmentDal(t.fragmentType).getBasedOnSignaturePointer(t):this.pagesDal.getBasedOnSignaturePointer(t)}getBasedOnSignature(t){return ef(t)?this.getFragmentDal(t.fragmentType).getBasedOnSignature(t):this.pagesDal.getBasedOnSignature(t)}setBasedOnSignature(t,n){ef(t)?this.getFragmentDal(t.fragmentType).setBasedOnSignature(t,n):this.pagesDal.setBasedOnSignature(t,n)}getTentativeAndAcceptedAsTransaction(){let n={id:"tentativeAndAccepted",items:this.pagesDal.getMergedStore(!1).getValues()};return Pl(n)}getCurrentOpenTransaction(){return this.pagesDal.getCurrentOpenTransaction()}getLastApprovedSnapshot(){if(!this.lastApproved)throw new Error("Empty DAL does not have a last approved snapshot");return this.lastApproved}mergeToApprovedStore(t,n){let r=this.snapshots.generateId(n),o=t.clone();this.applyFragmentChangesOnDALs(o,(a,s)=>a.validateAndMergeToApprovedStore(s,r));let i=this.lastApproved?this.snapshots.insert(o,this.lastApproved.id,r):this.snapshots.add(o,r);return this.updateLastApprovedSnapshot(i),i}dropUncommittedTransaction(t,n,r={}){this.applyToAllDALs(o=>o.dropUncommittedTransaction(t,n,r))}enableCommits(){this.commitsEnabled=!0}disableCommits(){this.commitsEnabled=!1}withoutCustomGetters(t){return(...n)=>{try{return this.customGettersEnabled=!1,this.applyToAllDALs(r=>{r.customGettersEnabled=!1}),t(...n)}finally{this.customGettersEnabled=!0,this.applyToAllDALs(r=>{r.customGettersEnabled=!0})}}}hasSignature(t){return ef(t)?this.getFragmentDal(t.fragmentType).hasSignature(t):this.pagesDal.hasSignature(t)}getRegisteredTypes(){return this.dmTypes}getAllItemsInNamespace(t){let n=this.applyToAllDALs(o=>o.getMergedNamespace(t)),r=Object.assign({},...n.values());return QAe(Object.keys(r),t)}getItemsInNamespace(t,n){return this.getFragmentDal(t).getAllItemsInNamespace(n)}getNamespacesInFragment(t){return this.getFragmentDal(t).getNamespaces()}checkForConflictingChanges(t){let n=this.applyFragmentChangesOnDALs(t,(r,o)=>r.isConflictingWithApprovedValue(o));return md.default.some(Array.from(n.values()))}applyOnSnapshotsRange(t,n,r){let o=Rc(t,n,"applyOnSnapshotsRange");(0,md.default)(o).reverse().forEach(r)}createSnapshotTrace(){let t=(0,md.default)(Rc(null,this.snapshots.last(),"createSnapshotTrace")).slice(-30).map("id").value();return{lastApproved:this.lastApproved?.id,snapshotChain:t,currentTags:this.tagManager._getAllTags()}}createCannotApproveError(t){let n=this.snapshots.findById(t),r=this.snapshots.findByIdLimitCompareIds(t,this.lastApproved);return new JAe(n,t,this.createSnapshotTrace(),r)}createCannotRebaseError(t,n){return new ee({errorType:"cannotRebaseError",message:`Cannot rebase, ${t} does not come before pending transaction`,extras:{position:t,id:n}})}createRebaseUnlinkedError(t,n){return new ee({errorType:"rebaseUnlinkedError",message:`Cannot rebase, ${t} is unlinked`,extras:{position:t,id:n,...this.createSnapshotTrace()}})}createRemovedApprovedError(t,n){return new ee({errorType:"removedApprovedSnapshotError",message:"We just removed the approved snapshot due to a conflict",extras:{position:t,id:n,...this.createSnapshotTrace()}})}rebaseApprovedHistory(t,n,r,o){let i=this.snapshots.findById(n);if(!i)throw this.createRebaseUnlinkedError(n,o);if(this.checkForConflictingChanges(t))throw this.createRemovedApprovedError(n,o);this.coreConfig.logger.captureError(this.createCannotRebaseError(n,o));let a=md.default.reduce(Rc(i,this.lastApproved,"rebaseApprovedHistory"),(u,p)=>(p.getAllFragmentsStore().forEach((d,m)=>{u.hasFragmentStore(m)||u.setFragmentStore(m,ka()),u.getFragmentStore(m).merge(d)}),u),si()),s=si();t.forEach((u,p)=>{u.forEach((d,m)=>{a.getFragmentStore(p)?.has(d)||(s.hasFragmentStore(p)||s.setFragmentStore(p,ka()),s.getFragmentStore(p).set(d,m))})}),this.applyFragmentChangesOnDALs(s,(u,p)=>u.mergeToApprovedStore(p));let l=this.snapshots.insert(s,n,o);return this.runValidation(()=>this.applyFragmentChangesOnDALs(s,(u,p)=>u.removeConflictsReportAndVerify(p,n,r,l.id))),l}getMergedStore(t){return si(this.applyToAllDALs(n=>n.getMergedStore(t)))}_getFragmentsMergedStoreAsJson(){return this.getMergedStore(!1).asJson()}get _store(){return this.pagesDal._store}get _tentativeStore(){return this.pagesDal._tentativeStore}get _snapshots(){return this.snapshots}_getApprovedStoreAsJson(){return this.pagesDal._getApprovedStoreAsJson()}_getTentativeStoreAsJson(){return this.pagesDal._getTentativeStoreAsJson()}_getCommittedStoreAsJson(){return this.pagesDal._getCommittedStoreAsJson()}_getMergedStoreAsJson(){return this.pagesDal._getMergedStoreAsJson()}get _queryIndex(){return this.pagesDal._queryIndex}get _currentTransaction(){return this.pagesDal._currentTransaction}_getBaseLineViolations(){return this.pagesDal.validator.getBaseLineViolations()}_getMergedOpenTransactionStoreAsJson(){let t=this.pagesDal._currentTransaction.store.asJson();return Object.values(this.fragmentDALs).forEach(n=>{md.default.merge(t,n._currentTransaction.store.asJson())}),t}_getMergedTentativeStoreAsJson(){let t=this.pagesDal._getTentativeStoreAsJson();return Object.values(this.fragmentDALs).forEach(n=>{md.default.merge(t,n._getTentativeStoreAsJson())}),t}_getMergedApprovedStoreAsJson(){let t=this.pagesDal._getApprovedStoreAsJson();return Object.values(this.fragmentDALs).forEach(n=>{md.default.merge(t,n._getApprovedStoreAsJson())}),t}get pagesDal(){return this.fragmentDALs[tn]}_getAllFragmentsOpenTransactionStoreAsJson(){let t={};return Object.entries(this.fragmentDALs).forEach(([n,r])=>{t[n]=r._currentTransaction.store.asJson()}),t}_getAllFragmentsApprovedStoreAsJson(){let t={};return Object.entries(this.fragmentDALs).forEach(([n,r])=>{t[n]=r._getApprovedStoreAsJson()}),t}_getAllTags(){return this.tagManager._getAllTags()}},xX=({coreConfig:e,postSetOperations:t,dmTypes:n,customGetters:r,eventEmitter:o,initialStore:i})=>new tIe(e,t,n,r,o,i)});var H1,Git,Hit=ge(()=>{"use strict";c();H1=R(T("lodash"));ze();Git=e=>{let{logger:t,experimentInstance:n}=e,r=new Map,o={},i={},a=g=>{if(!r.has(g))throw new Error(`no resourceLoader defined for resourceType {${g}}`)},s=(g,y)=>{if(!y)throw new Error("no resourced ids specified to load");let S=r.get(g).getAvailableResources(),E=H1.default.difference(y,S);if(E.length)throw new Error(`no resources with ids [${E}] available for resourceType {${g}}`)};return{registerResourceLoader:async g=>{o[g.resourceType]={},i[g.resourceType]={},r.set(g.resourceType,g)},load:async(g,y,h=!1)=>{a(g);let S=r.get(g);s(g,y);let E=o[g],b=H1.default.pick(i[g],y),I=H1.default.size(b)>0?Promise.all(H1.default.values(b)):Promise.resolve(),A=H1.default.filter(y,v=>!b[v]&&E[v]?.status!=="loaded"),P=h?y:A;if(!P.length){await I;return}P.forEach(v=>{o[g][v]={status:"pending"}});let C;try{let v=S.load(P);P.forEach(O=>{i[g][O]=v}),await v,P.forEach(O=>{o[g][O]={status:"loaded"},delete i[g][O]}),await I}catch(v){P.forEach(O=>{o[g][O]={status:"error",reason:v.message}}),C=v}if(C)throw C},loadAll:async g=>{a(g);let y=r.get(g),h=y.getAvailableResources();h.forEach(E=>{o[g][E]={status:"pending"}});let S;try{await y.loadAll(),h.forEach(E=>{o[g][E]={status:"loaded"}})}catch(E){h.forEach(b=>{o[g][b]={status:"error",reason:E.message}}),S=E}if(S)throw S},listResources:async g=>{a(g);let y=r.get(g);return y.getAvailableResources()||await y.initAvailableResources(),y.getAvailableResources()},getResourceStatus:(g,y)=>{let h=o[g][y];if(!h){if(!r.get(g).getAvailableResources().includes(y))throw new Error(`no resourceLoader with id {${y}} available for resourceType {${g}}`);return{status:"unloaded"}}return h},loadInitialResources:async()=>{let y=Array.from(r.entries()).map(async([h,S])=>{try{a(h),await S.initAvailableResources()}catch(E){let b=E?.message||E?.details?.applicationError?.description||E?.details?.applicationError?.code||"unknown error",I=new ee({message:`Failed to load resource type: ${h}`,errorType:"resourceLoadFailed",extras:{resourceType:h,error:b}});if(t.captureError(I),console.error(`Failed to load resource type: ${h}`,E),n.isOpen("dm_crashEditorOnResourceLoadFailure"))throw I}});await Promise.all(y)}}}});var $it,Ta,CEr,$1,nIe=ge(()=>{"use strict";c();$it=R(sX()),Ta=R(T("lodash"));vT();Hit();r0();U1();CEr=(e,t,n)=>{Ta.default.forOwn(t,(r,o)=>{if(e[o])throw new Error(`Trying to add an existing "${n}" with key "${o}"`);e[o]=r})},$1=e=>{let{experimentInstance:t,logger:n,schemaService:r}=e,o=[],i=[],a={},s={},l={},u={},p={},d={},m=new $it.EventEmitter;m.setMaxListeners(20);let f={},g={emitter:m},y=e.tracking??(async(x,L)=>await L()),h=Git(e),E=xX({coreConfig:e,postSetOperations:i,dmTypes:s,customGetters:a,eventEmitter:m}),b={coreConfig:e,dal:E,pointers:l,extensionAPI:u,EVENTS:f,resourceLoader:h},I={...b,eventEmitter:m},A=x=>{if(x.name){if((0,Ta.default)(o).map("name").includes(x.name))throw new Error(`extension name should be unique ${x.name}`)}else throw new Error("extension should have a name")},P=x=>{A(x),o.push(x),CEr(a,Ta.default.invoke(x,["createGetters"],b),"customGetter"),Ta.default.merge(s,Ta.default.invoke(x,["getDocumentDataTypes"],b)),Ta.default.merge(l,Ta.default.invoke(x,["createPointersMethods"],b)),Ta.default.merge(u,Ta.default.invoke(x,["createExtensionAPI"],I)),Ta.default.merge(p,Ta.default.invoke(x,["createPublicAPI"],I)),Ta.default.merge(f,x.EVENTS),Ta.default.merge(g,x.EVENTS);let L=Ta.default.invoke(x,["createFilters"],b);Ta.default.forEach(L,(z,k)=>E.registrar.registerFilter(k,z));let M={include:[tn],exclude:[]},N=Ta.default.invoke(x,["createValidator"],b);Ta.default.forEach(N,(z,k)=>E.registrar.registerValidator(k,z,x.validatorScope??M));let B=Ta.default.invoke(x,["createRebaseValidator"],b);Ta.default.forEach(B,(z,k)=>E.registrar.registerRebaseValidator(k,z));let H=Ta.default.invoke(x,["createPostTransactionOperations"],{...b,eventEmitter:m});Ta.default.forEach(H,(z,k)=>E.registrar.registerPostTransactionOperation(k,z));let K=Ta.default.invoke(x,["createTransactionDerivedMetadata"],{...b,eventEmitter:m});K&&Ta.default.forEach(K,([z,k],G)=>E.registrar.registerTransactionDerivedMetadata(G,z,k));let U=Ta.default.invoke(x,["createChangesListener"],b);if(U&&E.registrar.registerForChangesCallback(U),x.createPostSetOperation&&i.push(x.createPostSetOperation(b)),x.createResourceLoader){let z=x.createResourceLoader(I);Ta.default.forEach(z,k=>h.registerResourceLoader(k))}if(x.initialState){let z=si();Ta.default.forEach(x.initialState,(k,G)=>{Ta.default.forEach(k,(Y,X)=>{z.set(Tc(X,G),Y)})}),E.mergeToApprovedStore(z,x.name)}x.subscribeToEvents&&x.subscribeToEvents(I)},C=(x,L,M)=>{let N={},B=performance.now(),H=o.filter(U=>U[x]).map(U=>{let z=performance.now(),k=y(`${x}-${U.name}`,()=>Ta.default.invoke(U,x,...L));return N[U.name]=performance.now()-z,M?.(U.name),k}),K=performance.now()-B;return n.interactionEnded(`dm-extensions-${x}`,{extras:{totalDuration:K,timings:N}}),H};return{registerExtension:P,initialize:async()=>{await Promise.all(C("initialize",[I],x=>{E.safeCommitTransactionWithErrorReport({failedValidationAfterEarlyBaseline:!0,phase:"extensions",extensionName:x},`after-${x}`)}))},initializeAfterDataLoaded:async()=>{await Promise.all(C("initializeAfterDataLoaded",[I],x=>{E.safeCommitTransactionWithErrorReport({failedValidationAfterEarlyBaseline:!0,phase:"extensions",extensionName:x},`after-${x}-data-loaded`)}))},initializeModels:x=>{let L=si(),M={},N=performance.now();o.filter(H=>H.initializeModels).forEach(H=>{let K=performance.now();Ta.default.invoke(H,["initializeModels"],L,x,I),M[H.name]=performance.now()-K});let B=performance.now()-N;n.interactionEnded("dm-extensions-initializeModels",{extras:{totalDuration:B,timings:M}}),E.mergeToApprovedStore(L,"model-initializer")},initializeChannelSubscriptions:async()=>{await Promise.all(C("initializeChannelSubscriptions",[I]))},resourceLoader:h,extensionAPI:u,publicAPI:p,documentAPI:d,dal:E,eventEmitter:m,EVENTS:f,events:g,pointers:l,experimentInstance:t,logger:n,schemaService:r,config:e}}});var yW,wX,Wit,zit,TEr,vEr,a0,Yit=ge(()=>{"use strict";c();yW=R(T("lodash"));k1();wX=(e,t)=>({OLD:e,NEW:t}),Wit=(e,t)=>yW.default.isObject(e)&&yW.default.isObject(t)&&!Array.isArray(e)&&!Array.isArray(t),zit=(e,t)=>(t.forEach(n=>{e.includes(n)||e.push(n)}),e),TEr=(e,t)=>{let n={};return zit(Object.keys(t),Object.keys(e)).forEach(o=>{o==="sig"||o==="basedOnSignature"||vc(e[o],t[o])||(n[o]=wX(e[o],t[o]))}),n},vEr=(e,t)=>{let n={};return zit(Object.keys(t),Object.keys(e)).forEach(o=>{let i=e[o],a=t[o];if(!vc(i,a))if(e===void 0||t===void 0)n[o]=wX(i,a);else if(Wit(a,i)){let s=TEr(i,a);yW.default.isEmpty(s)||(n[o]=s)}else n[o]=wX(i,a)}),n},a0=(e,t,n,r="")=>{let o=`{ ${e.type} : ${e.id} }`;if(t===void 0)n!==void 0&&console.log(`%c${r}ADDED ${o}`,"color: lime",n);else if(n===void 0)t!==void 0&&console.log(`%c${r}REMOVED ${o}`,"color: red",t);else if(Wit(n,t)){let i=vEr(t,n);yW.default.isEmpty(i)||console.log(`%c${r}CHANGED ${o} [${Object.keys(i)}]`,"color: yellow",i)}else vc(t,n)||console.log(`%c${r}CHANGED ${o}`,"color: yellow",wX(t,n))}});var qit=ge(()=>{"use strict";c()});var rIe,REr,Qit=ge(()=>{"use strict";c();rIe=(e,t)=>t.some(n=>e.isOpen(n)),REr=(e,t)=>t.every(n=>e.isOpen(n))});var W1,s0,DX=ge(()=>{"use strict";c();W1=R(T("lodash")),s0=(e={})=>({captureError:W1.default.noop,interactionEnded:W1.default.noop,interactionStarted:W1.default.noop,breadcrumb:W1.default.noop,flush:async()=>{},reportBI:W1.default.noop,...e})});var Kit=J((wYa,OEr)=>{OEr.exports={accessibility:{name:"accessibility",filename:"accessibilitySchemas",query:"accessibilityQuery",featureType:"Component"},classnames:{name:"classnames",filename:"classnamesSchemas",query:"classnamesQuery",featureType:"Component"},contentRole:{name:"contentRole",filename:"contentRoleSchemas",query:"contentRoleQuery",featureType:"Component"},cursor:{name:"cursor",filename:"cursorSchemas",query:"cursorQuery",featureType:"Component"},discussions:{name:"discussions",filename:"discussionsSchemas",query:"discussionsQuery",featureType:"Component"},editorsettings:{name:"editorsettings",filename:"editorsettingsSchemas",query:"editorsettingsQuery",featureType:"Component"},grouping:{name:"grouping",filename:"groupingSchemas",query:"groupingQuery",featureType:"Component"},intent:{name:"intent",filename:"intentSchemas",query:"intentQuery",featureType:"Component"},layoutSettings:{name:"layoutSettings",filename:"layoutSettingsSchemas",query:"layoutSettingsQuery",featureType:"Component"},manifest:{name:"manifest",filename:"manifestSchemas",query:"manifestQuery",featureType:"Component"},measurements:{name:"measurements",filename:"measurementsSchemas",query:"measurementsQuery",featureType:"Component"},migration:{name:"migration",filename:"migrationSchemas",query:"migrationQuery",featureType:"Component"},naming:{name:"naming",filename:"namingSchemas",query:"namingQuery",featureType:"Component"},notifications:{name:"notifications",filename:"notificationsSchemas",query:"notificationsQuery",featureType:"Component"},pageSections:{name:"pageSections",filename:"pageSectionsSchemas",query:"pageSectionsQuery",featureType:"Component"},presets:{name:"presets",filename:"presetsSchemas",query:"presetsQuery",featureType:"Component"},source:{name:"source",filename:"sourceSchemas",query:"sourceQuery",featureType:"Component"},themeConfig:{name:"themeConfig",filename:"themeConfigSchemas",query:"themeConfigQuery",featureType:"Site"}}});var qd=J((DYa,_Er)=>{_Er.exports={NAMESPACE_MAPPING:{accessibility:"accessibility",anchors:"anchors_data",atomicScopes:"atomicScopes",behaviors:"behaviors_data",bindings:"bindings",classnames:"classnames",connections:"connections_data",contentRole:"contentRole",contexts:"contexts",controllers:"controllers",cursor:"cursor",data:"document_data",dependedBy:"dependedBy",dependsOn:"dependsOn",design:"design_data",discussions:"discussions",editorsettings:"editorsettings",effects:"effects",fixerVersions:"fixerVersions",grouping:"grouping",imageVisualEffects:"imageVisualEffects",innerElements:"innerElements",intent:"intent",layout:"layout_data",layoutSettings:"layoutSettings",manifest:"manifest",measurements:"measurements",migration:"migration",mobileHints:"mobile_hints",naming:"naming",notifications:"notifications",pageSections:"pageSections",patterns:"patterns",presets:"presets",props:"component_properties",reactions:"reactions",runtimeBindings:"runtimeBindings",slots:"slots",source:"source",states:"states",style:"theme_data",themeConfig:"themeConfig",themeGroups:"themeGroups",transformations:"transformations_data",transitions:"transitions_data",triggers:"triggers",variables:"variables",variants:"variants_data"},PAGE_DATA_DATA_TYPES:{accessibility:"accessibility",anchors:"anchors_data",atomicScopes:"atomicScopes",behaviors:"behaviors_data",bindings:"bindings",classnames:"classnames",connections:"connections_data",contentRole:"contentRole",contexts:"contexts",controllers:"controllers",cursor:"cursor",data:"document_data",dependedBy:"dependedBy",dependsOn:"dependsOn",design:"design_data",discussions:"discussions",editorsettings:"editorsettings",effects:"effects",fixerVersions:"fixerVersions",grouping:"grouping",imageVisualEffects:"imageVisualEffects",innerElements:"innerElements",intent:"intent",layout:"layout_data",layoutSettings:"layoutSettings",manifest:"manifest",measurements:"measurements",migration:"migration",mobileHints:"mobile_hints",naming:"naming",notifications:"notifications",pageSections:"pageSections",patterns:"patterns",presets:"presets",props:"component_properties",reactions:"reactions",runtimeBindings:"runtimeBindings",slots:"slots",source:"source",states:"states",style:"theme_data",themeConfig:"themeConfig",themeGroups:"themeGroups",transformations:"transformations_data",transitions:"transitions_data",triggers:"triggers",variables:"variables",variants:"variants_data"},VIEWER_PAGE_DATA_TYPES:{anchors:"anchors_data",behaviors:"behaviors_data",bindings:"bindings",classnames:"classnames",connections:"connections_data",contexts:"contexts",controllers:"controllers",cursor:"cursor",data:"document_data",dependedBy:"dependedBy",dependsOn:"dependsOn",design:"design_data",effects:"effects",fixerVersions:"fixerVersions",innerElements:"innerElements",intent:"intent",layout:"layout_data",mobileHints:"mobile_hints",patterns:"patterns",presets:"presets",props:"component_properties",reactions:"reactions",runtimeBindings:"runtimeBindings",slots:"slots",states:"states",style:"theme_data",transformations:"transformations_data",transitions:"transitions_data",triggers:"triggers",variables:"variables",variants:"variants_data"},VIEWER_DATA_TYPES:{anchors:"anchors",behaviors:"behaviors",bindings:"bindings",classnames:"classnames",connections:"connections",contexts:"contexts",controllers:"controllers",cursor:"cursor",data:"data",dependedBy:"dependedBy",dependsOn:"dependsOn",design:"design",effects:"effects",fixerVersions:"fixerVersions",innerElements:"innerElements",intent:"intent",layout:"layout",mobileHints:"mobileHints",patterns:"patterns",presets:"presets",prop:"props",reactions:"reactions",runtimeBindings:"runtimeBindings",slots:"slots",states:"states",theme:"style",transformations:"transformations",transitions:"transitions",triggers:"triggers",variables:"variables",variants:"variants"},EDITOR_DATA_TYPES:{accessibility:"accessibility",atomicScopes:"atomicScopes",contentRole:"contentRole",discussions:"discussions",editorsettings:"editorsettings",grouping:"grouping",imageVisualEffects:"imageVisualEffects",layoutSettings:"layoutSettings",manifest:"manifest",measurements:"measurements",migration:"migration",naming:"naming",notifications:"notifications",pageSections:"pageSections",source:"source",themeConfig:"themeConfig",themeGroups:"themeGroups"},DATA_TYPES:{accessibility:"accessibility",anchors:"anchors",atomicScopes:"atomicScopes",behaviors:"behaviors",bindings:"bindings",classnames:"classnames",connections:"connections",contentRole:"contentRole",contexts:"contexts",controllers:"controllers",cursor:"cursor",data:"data",dependedBy:"dependedBy",dependsOn:"dependsOn",design:"design",discussions:"discussions",editorsettings:"editorsettings",effects:"effects",fixerVersions:"fixerVersions",grouping:"grouping",imageVisualEffects:"imageVisualEffects",innerElements:"innerElements",intent:"intent",layout:"layout",layoutSettings:"layoutSettings",manifest:"manifest",measurements:"measurements",migration:"migration",mobileHints:"mobileHints",naming:"naming",notifications:"notifications",pageSections:"pageSections",patterns:"patterns",presets:"presets",prop:"props",reactions:"reactions",runtimeBindings:"runtimeBindings",slots:"slots",source:"source",states:"states",theme:"style",themeConfig:"themeConfig",themeGroups:"themeGroups",transformations:"transformations",transitions:"transitions",triggers:"triggers",variables:"variables",variants:"variants"},FEATURES_PAGE_DATA_TYPES:{accessibility:"accessibility",classnames:"classnames",contentRole:"contentRole",cursor:"cursor",discussions:"discussions",editorsettings:"editorsettings",grouping:"grouping",intent:"intent",layoutSettings:"layoutSettings",manifest:"manifest",measurements:"measurements",migration:"migration",naming:"naming",notifications:"notifications",pageSections:"pageSections",presets:"presets",source:"source",themeConfig:"themeConfig"},COMP_DATA_QUERY_KEYS:{accessibility:"accessibilityQuery",anchors:"anchorQuery",behaviors:"behaviorQuery",bindings:"bindingsQuery",classnames:"classnamesQuery",connections:"connectionQuery",contentRole:"contentRoleQuery",contexts:"contextsQuery",controllers:"controllersQuery",cursor:"cursorQuery",data:"dataQuery",design:"designQuery",discussions:"discussionsQuery",editorsettings:"editorsettingsQuery",effects:"effectsQuery",fixerVersions:"fixerVersionsQuery",grouping:"groupingQuery",innerElements:"innerElementsQuery",intent:"intentQuery",layout:"layoutQuery",layoutSettings:"layoutSettingsQuery",manifest:"manifestQuery",measurements:"measurementsQuery",migration:"migrationQuery",mobileHints:"mobileHintsQuery",naming:"namingQuery",notifications:"notificationsQuery",pageSections:"pageSectionsQuery",patterns:"patternsQuery",presets:"presetsQuery",props:"propertyQuery",reactions:"reactionsQuery",runtimeBindings:"runtimeBindingsQuery",slots:"slotsQuery",source:"sourceQuery",states:"statesQuery",themeConfig:"themeConfigQuery",themeGroups:"themeGroupsQuery",transformations:"transformationQuery",transitions:"transitionQuery",triggers:"triggersQuery",variables:"variablesQuery",variants:"breakpointVariantsQuery"},COMP_DATA_QUERY_KEYS_WITH_STYLE:{accessibility:"accessibilityQuery",anchors:"anchorQuery",behaviors:"behaviorQuery",bindings:"bindingsQuery",classnames:"classnamesQuery",connections:"connectionQuery",contentRole:"contentRoleQuery",contexts:"contextsQuery",controllers:"controllersQuery",cursor:"cursorQuery",data:"dataQuery",design:"designQuery",discussions:"discussionsQuery",editorsettings:"editorsettingsQuery",effects:"effectsQuery",fixerVersions:"fixerVersionsQuery",grouping:"groupingQuery",innerElements:"innerElementsQuery",intent:"intentQuery",layout:"layoutQuery",layoutSettings:"layoutSettingsQuery",manifest:"manifestQuery",measurements:"measurementsQuery",migration:"migrationQuery",mobileHints:"mobileHintsQuery",naming:"namingQuery",notifications:"notificationsQuery",pageSections:"pageSectionsQuery",patterns:"patternsQuery",presets:"presetsQuery",props:"propertyQuery",reactions:"reactionsQuery",runtimeBindings:"runtimeBindingsQuery",slots:"slotsQuery",source:"sourceQuery",states:"statesQuery",style:"styleId",themeConfig:"themeConfigQuery",themeGroups:"themeGroupsQuery",transformations:"transformationQuery",transitions:"transitionQuery",triggers:"triggersQuery",variables:"variablesQuery",variants:"breakpointVariantsQuery"},DATA_TYPE_BY_COMP_DATA_QUERY:{accessibilityQuery:"accessibility",anchorQuery:"anchors",behaviorQuery:"behaviors",bindingsQuery:"bindings",classnamesQuery:"classnames",connectionQuery:"connections",contentRoleQuery:"contentRole",contextsQuery:"contexts",controllersQuery:"controllers",cursorQuery:"cursor",dataQuery:"data",designQuery:"design",discussionsQuery:"discussions",editorsettingsQuery:"editorsettings",effectsQuery:"effects",fixerVersionsQuery:"fixerVersions",groupingQuery:"grouping",innerElementsQuery:"innerElements",intentQuery:"intent",layoutQuery:"layout",layoutSettingsQuery:"layoutSettings",manifestQuery:"manifest",measurementsQuery:"measurements",migrationQuery:"migration",mobileHintsQuery:"mobileHints",namingQuery:"naming",notificationsQuery:"notifications",pageSectionsQuery:"pageSections",patternsQuery:"patterns",presetsQuery:"presets",propertyQuery:"props",reactionsQuery:"reactions",runtimeBindingsQuery:"runtimeBindings",slotsQuery:"slots",sourceQuery:"source",statesQuery:"states",styleId:"style",themeConfigQuery:"themeConfig",themeGroupsQuery:"themeGroups",transformationQuery:"transformations",transitionQuery:"transitions",triggersQuery:"triggers",variablesQuery:"variables",breakpointVariantsQuery:"variants",variantsQuery:"variants"},SERIALIZED_SCOPED_DATA_KEYS:{accessibility:"scopedAccessibility",cursor:"scopedCursor",design:"scopedDesigns",effects:"scopedEffects",layout:"scopedLayouts",layoutSettings:"scopedLayoutSettings",presets:"scopedPresets",reactions:"scopedReactions",style:"scopedStyles",transformations:"scopedTransformations",transitions:"scopedTransitions"},ALIAS_NAMESPACES:{DESKTOP:"structure",MOBILE:"structure"},OVERRIDE_NAMESPACES:{multilingualTranslations:"data"},VARIANTS_DATA_TYPES:{accessibility:"accessibility",cursor:"cursor",design:"design",discussions:"discussions",effects:"effects",layout:"layout",layoutSettings:"layoutSettings",presets:"presets",reactions:"reactions",style:"style",transformations:"transformations",transitions:"transitions",variables:"variables"},DATA_TYPES_SUPPORT_VARIANTS_BUT_NOT_SCOPED_ON_ROOT:{effects:"effects",variables:"variables"},EXCLUDED_NAMESPACES_FROM_VIEWER_REF_FETCH:{accessibility:"accessibility",bindings:"bindings",classnames:"classnames",contexts:"contexts",runtimeBindings:"runtimeBindings",themeGroups:"themeGroups"}}});var hW=J((NYa,xEr)=>{xEr.exports={accessibility:{namespace:"accessibility",mapName:"accessibility",featureType:"Component",supportsComponentInnerElements:!1,supportsVariants:!0,isRelationalSplitFromQuery:!0,scopedSerializationKey:"scopedAccessibility",query:"accessibilityQuery",hasFeaturePublicAPI:!0,isPublicViewerData:!1,preventRefFetchFromViewer:!0,signature:"263a5a7dfea6ec95495d573a81fe9c17"},anchors:{namespace:"anchors",hasFeaturePublicAPI:!1,isPublicViewerData:!0,mapName:"anchors_data",query:"anchorQuery",featureType:"Component",signature:"5da1729ad4a881c68aa598ed9f69f965"},atomicScopes:{namespace:"atomicScopes",mapName:"atomicScopes",supportsVariants:!1,isPublicViewerData:!1,signature:"a0212dca0d37ce4b164cb509c4fd3160"},behaviors:{mapName:"behaviors_data",query:"behaviorQuery",featureType:"Component",namespace:"behaviors",hasFeaturePublicAPI:!1,isPublicViewerData:!0,supportOverrides:!0,signature:"fef7bf7601af1c70ad29bad6265de46a"},bindings:{namespace:"bindings",mapName:"bindings",featureType:"Component",supportsComponentInnerElements:!0,supportsVariants:!1,query:"bindingsQuery",hasFeaturePublicAPI:!1,isPublicViewerData:!0,supportOverrides:!1,preventRefFetchFromViewer:!0,signature:"14f8804c90293b5eb2be853cb1ebf41c"},classnames:{namespace:"classnames",mapName:"classnames",featureType:"Component",supportsComponentInnerElements:!1,supportsVariants:!1,query:"classnamesQuery",hasFeaturePublicAPI:!0,isPublicViewerData:!0,supportOverrides:!0,preventRefFetchFromViewer:!0,signature:"76146f81704e25c8c5216ebb2824ba5b"},connections:{mapName:"connections_data",query:"connectionQuery",featureType:"Component",namespace:"connections",hasFeaturePublicAPI:!1,isPublicViewerData:!0,supportOverrides:!0,signature:"04052522e4a1323f74cd2110932954b3"},contentRole:{mapName:"contentRole",query:"contentRoleQuery",featureType:"Component",namespace:"contentRole",hasFeaturePublicAPI:!0,isPublicViewerData:!1,signature:"acd78a1cf35f2d7a802efd3d5172ef1f"},contexts:{namespace:"contexts",mapName:"contexts",featureType:"Component",supportsComponentInnerElements:!1,supportsVariants:!1,query:"contextsQuery",hasFeaturePublicAPI:!1,isPublicViewerData:!0,supportOverrides:!1,preventRefFetchFromViewer:!0,signature:"5cfb377257971400c0e7cb833ea5c08c"},controllers:{namespace:"controllers",mapName:"controllers",featureType:"Component",supportsComponentInnerElements:!1,supportsVariants:!1,query:"controllersQuery",hasFeaturePublicAPI:!1,isPublicViewerData:!0,supportOverrides:!1,preventRefFetchFromViewer:!1,signature:"b0f229ff30403bffed489af828c5c270"},cursor:{namespace:"cursor",mapName:"cursor",featureType:"Component",supportsVariants:!0,isRelationalSplitFromQuery:!0,scopedSerializationKey:"scopedCursor",query:"cursorQuery",hasFeaturePublicAPI:!0,isPublicViewerData:!0,supportOverrides:!0,signature:"596e840b895f1c48502ca19eaf021133"},data:{mapName:"document_data",query:"dataQuery",featureType:"Component",supportsComponentInnerElements:!0,namespace:"data",hasFeaturePublicAPI:!1,isPublicViewerData:!0,overrideNamespace:"multilingualTranslations",supportsRepeaterItem:!0,supportOverrides:!0,signature:"74431bce8b7d4a67331bf417d2d9b5c9"},dependedBy:{namespace:"dependedBy",mapName:"dependedBy",supportsVariants:!1,isPublicViewerData:!0,signature:"5bfd046ecb587b3f54f6677ed172a482"},dependsOn:{namespace:"dependsOn",mapName:"dependsOn",supportsVariants:!1,isPublicViewerData:!0,signature:"0fde84a224b05c7e2fca563e1961750c"},design:{mapName:"design_data",query:"designQuery",featureType:"Component",namespace:"design",hasFeaturePublicAPI:!1,isPublicViewerData:!0,supportsRepeaterItem:!0,supportsVariants:!0,scopedSerializationKey:"scopedDesigns",isRelationalSplitFromQuery:!0,supportOverrides:!0,signature:"7a1544955e56857cecff454b8d1bb623"},discussions:{mapName:"discussions",query:"discussionsQuery",featureType:"Component",namespace:"discussions",supportsVariants:!0,hasFeaturePublicAPI:!0,isPublicViewerData:!1,isRelationalSplitFromQuery:!0,signature:"c699722f19b1e5af8764932e7bf13b24"},editorsettings:{namespace:"editorsettings",mapName:"editorsettings",featureType:"Component",supportsVariants:!1,query:"editorsettingsQuery",hasFeaturePublicAPI:!0,isPublicViewerData:!1,signature:"dd0065212d157450f790480c3088bb36"},effects:{namespace:"effects",mapName:"effects",supportsVariants:!0,query:"effectsQuery",featureType:"Component",supportsComponentInnerElements:!0,hasFeaturePublicAPI:!1,isPublicViewerData:!0,isRelationalSplitFromQuery:!1,scopedSerializationKey:"scopedEffects",supportOverrides:!0,signature:"d9ceb6b4d3846da45922f962ee15ad8b"},fixerVersions:{namespace:"fixerVersions",mapName:"fixerVersions",supportsVariants:!1,featureType:"Page",query:"fixerVersionsQuery",hasFeaturePublicAPI:!1,isPublicViewerData:!0,signature:"a0b0372ecfc729d4e42ec956415bcf65"},grouping:{mapName:"grouping",query:"groupingQuery",featureType:"Component",namespace:"grouping",hasFeaturePublicAPI:!0,isPublicViewerData:!1,signature:"a63f1ed0b078b1eae90e347f9031c4ef"},imageVisualEffects:{namespace:"imageVisualEffects",mapName:"imageVisualEffects",supportsVariants:!1,hasFeaturePublicAPI:!1,isPublicViewerData:!1,signature:"747c59ec0df456825c9953110bb78a6e"},innerElements:{namespace:"innerElements",mapName:"innerElements",featureType:"Component",supportsComponentInnerElements:!0,supportsVariants:!1,query:"innerElementsQuery",hasFeaturePublicAPI:!1,isPublicViewerData:!0,supportOverrides:!1,signature:"59ff518091f7bc89b91af276d3e39dd6"},intent:{namespace:"intent",mapName:"intent",featureType:"Component",supportsComponentInnerElements:!1,supportsVariants:!1,query:"intentQuery",hasFeaturePublicAPI:!0,isPublicViewerData:!0,supportOverrides:!1,signature:"cc07cfd3735d81f4f500177aee3e1077"},layout:{mapName:"layout_data",supportsVariants:!0,scopedSerializationKey:"scopedLayouts",query:"layoutQuery",featureType:"Component",namespace:"layout",hasFeaturePublicAPI:!1,isPublicViewerData:!0,isRelationalSplitFromQuery:!0,signature:"f0c70980155fbc557c1f43413773e9b2"},layoutSettings:{namespace:"layoutSettings",mapName:"layoutSettings",featureType:"Component",supportsComponentInnerElements:!1,supportsVariants:!0,isRelationalSplitFromQuery:!0,scopedSerializationKey:"scopedLayoutSettings",query:"layoutSettingsQuery",hasFeaturePublicAPI:!0,isPublicViewerData:!1,preventRefFetchFromViewer:!1,signature:"e877f61c454520ff530edbc731d3980e"},manifest:{mapName:"manifest",query:"manifestQuery",featureType:"Component",namespace:"manifest",hasFeaturePublicAPI:!0,isPublicViewerData:!1,signature:"f644c6367b19254698f642083d55a735"},measurements:{namespace:"measurements",mapName:"measurements",featureType:"Component",supportsComponentInnerElements:!1,supportsVariants:!1,query:"measurementsQuery",hasFeaturePublicAPI:!0,isPublicViewerData:!1,preventRefFetchFromViewer:!1,signature:"f554b5ff4298f53b9372fb9159465352"},migration:{mapName:"migration",query:"migrationQuery",featureType:"Component",namespace:"migration",hasFeaturePublicAPI:!0,isPublicViewerData:!1,signature:"437af5838723b36a95238f420e062007"},mobileHints:{mapName:"mobile_hints",query:"mobileHintsQuery",featureType:"Component",namespace:"mobileHints",hasFeaturePublicAPI:!1,isPublicViewerData:!0,signature:"563a50c0214f8c5495d0621770d696c2"},naming:{mapName:"naming",query:"namingQuery",featureType:"Component",namespace:"naming",hasFeaturePublicAPI:!0,isPublicViewerData:!1,signature:"5ce2351a719aeeb2706d46eb69a03b0c"},notifications:{namespace:"notifications",mapName:"notifications",featureType:"Component",supportsVariants:!1,query:"notificationsQuery",hasFeaturePublicAPI:!0,isPublicViewerData:!1,signature:"5567fea6c4260fa0065535966e46a0e8"},pageSections:{namespace:"pageSections",mapName:"pageSections",supportsVariants:!1,query:"pageSectionsQuery",featureType:"Component",hasFeaturePublicAPI:!0,isPublicViewerData:!1,signature:"51f7377e070550edf75655231cff141d"},patterns:{namespace:"patterns",mapName:"patterns",query:"patternsQuery",featureType:"Repeater",hasFeaturePublicAPI:!1,isPublicViewerData:!0,supportsVariants:!1,supportOverrides:!0,signature:"38dc6d6e73901c4cae3ff3ccb036c0e4"},presets:{namespace:"presets",mapName:"presets",featureType:"Component",supportsComponentInnerElements:!0,supportsVariants:!0,isRelationalSplitFromQuery:!0,scopedSerializationKey:"scopedPresets",query:"presetsQuery",hasFeaturePublicAPI:!0,isPublicViewerData:!0,supportOverrides:!0,signature:"c4412fa37ba2939857239ce61dad9496"},props:{namespace:"props",mapName:"component_properties",dataTypeName:"prop",query:"propertyQuery",featureType:"Component",hasFeaturePublicAPI:!1,isPublicViewerData:!0,supportOverrides:!0,signature:"a43cb4cd966b21ecf7d04b0b7de617fa"},reactions:{namespace:"reactions",mapName:"reactions",supportsVariants:!0,scopedSerializationKey:"scopedReactions",query:"reactionsQuery",featureType:"Component",supportsComponentInnerElements:!0,hasFeaturePublicAPI:!1,isPublicViewerData:!0,isRelationalSplitFromQuery:!0,supportOverrides:!0,signature:"69c963bc60bbb29391672a149693b452"},runtimeBindings:{namespace:"runtimeBindings",mapName:"runtimeBindings",featureType:"Component",supportsComponentInnerElements:!0,supportsVariants:!1,query:"runtimeBindingsQuery",hasFeaturePublicAPI:!1,isPublicViewerData:!0,supportOverrides:!1,preventRefFetchFromViewer:!0,signature:"b15d0dc683d3bd5b35e7f6790479d62d"},slots:{namespace:"slots",mapName:"slots",supportsVariants:!1,query:"slotsQuery",featureType:"Component",hasFeaturePublicAPI:!1,isPublicViewerData:!0,supportOverrides:!0,supportsComponentInnerElements:!0,signature:"1161e29e16d3138cda2a322cef8175b5"},source:{namespace:"source",mapName:"source",featureType:"Component",supportsVariants:!1,query:"sourceQuery",hasFeaturePublicAPI:!0,isPublicViewerData:!1,signature:"0638798231010622b046bd5bf3dd190d"},states:{namespace:"states",mapName:"states",supportsVariants:!1,query:"statesQuery",featureType:"Component",supportsComponentInnerElements:!0,hasFeaturePublicAPI:!1,isPublicViewerData:!0,supportOverrides:!0,signature:"dec6ea139198f4e5a98a8dcd507e2985"},structure:{namespace:"structure",mapName:"structure",aliases:["DESKTOP","MOBILE"],hasFeaturePublicAPI:!1,isPublicViewerData:!1,signature:"a599cc551a13467b0985ed1377a8b9db"},style:{mapName:"theme_data",dataTypeName:"theme",supportsVariants:!0,scopedSerializationKey:"scopedStyles",query:"styleId",supportsComponentInnerElements:!0,featureType:"Component",namespace:"style",hasFeaturePublicAPI:!1,isPublicViewerData:!0,isRelationalSplitFromQuery:!0,supportOverrides:!0,signature:"08415ab9830569a8000cb870c705ecd6"},themeConfig:{namespace:"themeConfig",mapName:"themeConfig",featureType:"Site",supportsVariants:!1,query:"themeConfigQuery",hasFeaturePublicAPI:!0,isPublicViewerData:!1,signature:"f55b06ba2956d930a13d1cb3f590b0e3"},themeGroups:{namespace:"themeGroups",mapName:"themeGroups",featureType:"Site",query:"themeGroupsQuery",supportsVariants:!1,hasFeaturePublicAPI:!1,isPublicViewerData:!1,preventRefFetchFromViewer:!0,signature:"e5d14d0e46fe338f384d5b7591e1a597"},transformations:{mapName:"transformations_data",supportsVariants:!0,scopedSerializationKey:"scopedTransformations",query:"transformationQuery",featureType:"Component",supportsComponentInnerElements:!0,namespace:"transformations",hasFeaturePublicAPI:!1,isPublicViewerData:!0,isRelationalSplitFromQuery:!0,supportOverrides:!0,signature:"6ce4697f77ecd228d4f9844ac8a0acf9"},transitions:{mapName:"transitions_data",supportsVariants:!0,scopedSerializationKey:"scopedTransitions",query:"transitionQuery",featureType:"Component",supportsComponentInnerElements:!0,namespace:"transitions",hasFeaturePublicAPI:!1,isPublicViewerData:!0,isRelationalSplitFromQuery:!0,supportOverrides:!0,signature:"79680596fc32a1321c672c3fd8878c86"},triggers:{namespace:"triggers",mapName:"triggers",supportsVariants:!1,query:"triggersQuery",featureType:"Component",supportsComponentInnerElements:!0,hasFeaturePublicAPI:!1,isPublicViewerData:!0,supportOverrides:!0,signature:"67568237c3c3c868e6b9fb55ee2acc07"},variables:{namespace:"variables",mapName:"variables",supportsVariants:!0,isRelationalSplitFromQuery:!1,query:"variablesQuery",featureType:"Component",hasFeaturePublicAPI:!1,isPublicViewerData:!0,supportOverrides:!0,signature:"bc77a967bed2b2b32e88b91818314b68"},variants:{mapName:"variants_data",namespace:"variants",query:"breakpointVariantsQuery",featureType:"Component",hasFeaturePublicAPI:!1,isPublicViewerData:!0,signature:"d8ac52d2053328bb95294f7cc5f0e317"}}});var SW=J((LYa,tat)=>{"use strict";c();var z1=T("lodash"),Xit=Kit(),Zit=qd(),NX=hW(),Jit=Zit.NAMESPACE_MAPPING,wEr=z1.invert(Jit),DEr=z1.keys(Xit),NEr=Object.freeze({supportOverrides:!1,supportsVariants:!1,isPublicViewerData:!1,hasFeaturePublicAPI:!1}),LEr=z1(NX).pickBy({supportOverrides:!0}).mapValues("namespace").value(),MEr=z1.memoize(e=>z1.defaults(NX[e],NEr)),kEr=()=>z1.keys(NX),eat=(e,t)=>NX[e][t],BEr=(e,t)=>{if(!eat(e,t))throw new Error(`${e} namespace should have ${t}`)},FEr=e=>wEr[e]??e,VEr=e=>Jit[e]??e;tat.exports={...Zit,featureNamespaces:DEr,featuresData:Xit,getNamespaceConfig:MEr,getNamespaces:kEr,validateNamespaceFlag:BEr,getNamespaceFlag:eat,convertNamespaceFromServerStyle:FEr,convertNamespaceToServerStyle:VEr,NAMESPACES_WITH_OVERRIDES:LEr}});var oIe,nat=ge(()=>{oIe={$id:"urn:dm:schemas:common.json",color:{type:"string",pattern:"^$|^((((0|1)?\\d{1,2}|2[0-4]\\d|25[0-5]),((0|1)?\\d{1,2}|2[0-4]\\d|25[0-5]),((0|1)?\\d{1,2}|2[0-4]\\d|25[0-5])(,0*(0?\\.\\d+|0|1))?)|(color_([0-9]{1,2}|100))|(\\{color_([0-9]{1,2}|100)\\})|(\\[color_([0-9]{1,2}|100)\\])|(#(([0-9|a-f|A-F]){3}){1,2}))$"},nullableColor:{type:["string","null"],pattern:"^(^$|^((((0|1)?\\d{1,2}|2[0-4]\\d|25[0-5]),((0|1)?\\d{1,2}|2[0-4]\\d|25[0-5]),((0|1)?\\d{1,2}|2[0-4]\\d|25[0-5])(,0*(0?\\.\\d+|0|1))?)|(color_([0-9]{1,2}|100))|(\\{color_([0-9]{1,2}|100)\\})|(\\[color_([0-9]{1,2}|100)\\])|(#(([0-9|a-f|A-F]){3}){1,2}))$)$"},hexColor:{type:"string",pattern:"^(#(([0-9|a-f|A-F]){3}){1,2})$"},nullableHexColor:{type:["string","null"],pattern:"^(#(([0-9|a-f|A-F]){3}){1,2})$"},numeric:{type:"string",pattern:"^\\d+$"},uri:{type:"string",pattern:"[-a-zA-Z0-9@:%_\\+.~#?&//=]{2,256}\\.[a-z]{2,4}\\b(\\/[-a-zA-Z0-9@:%_\\+.~#?&//=]*)?"},border:{type:"string",pattern:"^$|^(0|([0-9]*([.][0-9]+){0,1}(px|em)[\\s]*){1,4})([Ss][Oo][Ll][Ii][Dd]|[Dd][Aa][Ss][Hh][Ee][Dd]|[Dd][Oo][Tt][Tt][Ee][Dd]|[Dd][Oo][Uu][Bb][Ll][Ee]|[Gg][Rr][Oo][Oo][Vv][Ee]|[Ii][Nn][Ss][Ee][Tt]|[Nn][Oo][Nn][Ee]|[Oo][Uu][Tt][Ss][Ee][Tt]|[Rr][Ii][Dd][Gg][Ee]){0,1}[\\s]*([{\\[]color_([0-9]{1,2}|100)[}\\]]|(#(([0-9|a-f]){3}){1,2}){0,1})|\\[borderColor\\]?$"},nullableBorder:{type:["string","null"],pattern:"^$|^(0|([0-9]*([.][0-9]+){0,1}(px|em)[\\s]*){1,4})([Ss][Oo][Ll][Ii][Dd]|[Dd][Aa][Ss][Hh][Ee][Dd]|[Dd][Oo][Tt][Tt][Ee][Dd]|[Dd][Oo][Uu][Bb][Ll][Ee]|[Gg][Rr][Oo][Oo][Vv][Ee]|[Ii][Nn][Ss][Ee][Tt]|[Nn][Oo][Nn][Ee]|[Oo][Uu][Tt][Ss][Ee][Tt]|[Rr][Ii][Dd][Gg][Ee]){0,1}[\\s]*([{\\[]color_([0-9]{1,2}|100)[}\\]]|(#(([0-9|a-f]){3}){1,2}){0,1})|\\[borderColor\\]?$"},padding:{type:"string",pattern:"^$|^\\d*(.\\d+)?$|^(\\d+(.\\d+)?(em|px)|0(.0+)?)( +(\\d+(.\\d+)?(em|px)|0(.0+)?)){0,3}$"},radius:{type:"string",pattern:"^$|^\\d*(.\\d+)?$|^(\\d+(.\\d+)?(em|px)|0(.0+)?)( +(\\d+(.\\d+)?(em|px)|0(.0+)?)){0,3}$"},webThemeUrl:{type:"string",pattern:"^[\\/\\-|0-9|a-z|A-Z]*$"},themeUrl:{type:"string",pattern:"^[\\/\\-|0-9|a-z|A-Z]*$"},font:{type:["string"]},nullableFont:{type:["string","null"]},cssMeasure:{type:"string",pattern:"^\\d+(.\\d+)?(em|px)?$"},cssMeasureWithUnit:{type:"string",pattern:"^(-?\\d+(.\\d+)?(px|em|pt|ex|in|cm|mm|pc|spx))$|^normal$"},Int:{type:"number",multipleOf:1},NullableInt:{type:["number","null"],multipleOf:1},JavaInt:{type:"number",default:0,multipleOf:1,minimum:-2147483648,maximum:2147483647},JavaBool:{type:"boolean",default:!1},NullableBool:{type:["boolean","null"]},reference:{type:["string"],pseudoType:["ref"],_wixReference:!0},nullableReference:{type:["null","string"],pseudoType:["ref"],_wixReference:!0},weakReference:{type:["string"],pseudoType:["weakRef"],_wixReference:!0},nullableWeakReference:{type:["null","string"],pseudoType:["weakRef"],_wixReference:!0},referenceList:{type:["array"],items:[{type:["null","string"],pseudoType:["ref"]}],pseudoType:["refList"],_wixReference:!0},nullableReferenceList:{type:["array","null"],items:[{type:["null","string"],pseudoType:["ref"]}],pseudoType:["refList"],_wixReference:!0},referenceMap:{type:["object"],additionalProperties:{type:["null","string"],pseudoType:["ref"]},pseudoType:["refMap"],_wixReference:!0},nullableReferenceMap:{type:["object","null"],additionalProperties:{type:["null","string"],pseudoType:["ref"]},pseudoType:["refMap"],_wixReference:!0},DataNode:{type:"object",properties:{type:{type:"string"},id:{type:"string"},metaData:{type:"object",properties:{pageId:{type:"string"},isPreset:{type:"boolean"},schemaVersion:{type:"string"},isHidden:{type:"boolean"},logicalName:{type:"string"},description:{type:"string",maxLength:4e3},sig:{type:"string"},fragmentType:{type:"string"},fragmentInstance:{type:"string"}}}}},PropDataNode:{type:"object",properties:{type:{type:"string"},id:{type:"string"},metaData:{type:"object",properties:{schemaVersion:{type:["string","null"],default:"1.0"},autoGenerated:{type:["boolean","null"]},pageId:{type:"string"},sig:{type:"string"},fragmentType:{type:"string"},fragmentInstance:{type:"string"}}}}}}});var oat,rat=ge(()=>{oat={$id:"urn:dm:schemas:commonSchemas.json",RefArray:{allOf:[{$ref:"urn:dm:schemas:common.json#/DataNode"},{type:"object",isTopLevelDataNode:!0,properties:{values:{items:[{type:["null","string"],pseudoType:["ref"]}],default:[],type:["array"],pseudoType:["refList"],_wixReference:!0,shouldCollect:!0,shouldValidate:!0,referencedMap:"#",refTypes:[]}}}]},VariantRelation:{allOf:[{$ref:"urn:dm:schemas:common.json#/DataNode"},{type:"object",isTopLevelDataNode:!0,required:["variants","from","to"],properties:{variants:{type:"array",items:{shouldCollect:!0,isRefOwner:!1,shouldValidate:!0,referencedMap:"variants_data",refTypes:["Hover","Mobile","State","Selected","Trigger","Preset","RepeaterPattern","BreakpointRange","NamedRange"],$ref:"urn:dm:schemas:common.json#/weakReference"},default:[]},remoteVariants:{type:"array",items:{shouldCollect:!1,isRefOwner:!1,shouldValidate:!1,referencedMap:"variants_data",$ref:"urn:dm:schemas:common.json#/weakReference"}},from:{type:["string"]},to:{$ref:"urn:dm:schemas:common.json#/reference",shouldCollect:!0,shouldValidate:!0,referencedMap:"#",refTypes:[]}}}]},MinimalUnitSize:{type:"object",required:["value","type"],isTopLevelDataNode:!1,properties:{value:{type:"number"},type:{enum:["px","percentage"]}}},UnitSize:{type:"object",required:["value","type"],isTopLevelDataNode:!1,properties:{value:{type:"number"},type:{enum:["px","em","rem","fr","percentage","vh","vw","spx","siteWidthPercentage"]}}},SPXReferenceDefinition:{type:"object",required:["refWidth","resolverType"],isTopLevelDataNode:!1,properties:{refWidth:{type:"number",multipleOf:1,minimum:1},resolverType:{type:"string",enum:["scale","fixed"]}}},UnitLength:{type:"object",required:["value","type"],isTopLevelDataNode:!1,properties:{value:{type:"number"},type:{enum:["px","em","rem","vh","vw","vmin","vmax"]}}},UnitLengthPercentage:{type:"object",required:["value","type"],isTopLevelDataNode:!1,properties:{value:{type:"number"},type:{enum:["px","em","rem","percentage","vh","vw","vmin","vmax"]}}},UnitAngle:{type:"object",required:["value","type"],isTopLevelDataNode:!1,properties:{value:{type:"number"},type:{enum:["deg","percentage"]}}},UnitSizeArea:{type:"object",isTopLevelDataNode:!1,properties:{width:{$ref:"#/UnitLengthPercentage"},height:{$ref:"#/UnitLengthPercentage"}}},UnitSizePoint:{type:"object",isTopLevelDataNode:!1,properties:{x:{$ref:"#/UnitLengthPercentage"},y:{$ref:"#/UnitLengthPercentage"}}},NumberThatCanConnectToAVariable:{type:"number"},LinkReference:{pattern:"^$|^#",refTypes:["ExternalLink","EmailLink","PhoneLink","WhatsAppLink","PageLink","AddressLink","AnchorLink","DynamicPageLink","TpaPageLink","DocumentLink","FormSubmitButtonLink","LoginToWixLink"],isTopLevelDataNode:!1,$ref:"urn:dm:schemas:common.json#/nullableReference",shouldCollect:!0,shouldValidate:!0,referencedMap:"#"},Common_Image:{allOf:[{$ref:"urn:dm:schemas:common.json#/DataNode"},{type:"object",isTopLevelDataNode:!0,properties:{link:{$ref:"#/LinkReference"},title:{type:"string",default:"",maxLength:100,description:"Title or caption for the image."},name:{type:"string",maxLength:100,description:"Name identifier for the image."},uri:{type:"string",pattern:"^[\\w:~\\-_+%.\\/,\\?=\\()]+$",default:"3963cf22f5e14a25a77ebe37298a8d3b.png",description:"Represents the URI or path to the image."},description:{type:"string",maxLength:1200,description:"Textual description or details about the image."},height:{type:"number",default:200,description:"Height dimension of the image."},width:{type:"number",default:200,description:"Width dimension of the image."},borderSize:{type:"string",description:"Size of the border around the image."},alt:{type:"string",default:"",description:"Alternative text for the image (for accessibility purposes)."},decorative:{type:"boolean"},hasAnimation:{type:"boolean",description:"Indicates whether the image has animation valid for images in webP format"},originalImageDataRef:{description:"Original Image before edit",refTypes:["Image"],$ref:"urn:dm:schemas:common.json#/nullableReference",shouldCollect:!0,shouldValidate:!0,referencedMap:"#"},opacity:{type:"number",description:"Opacity level of the image."},crop:{oneOf:[{type:"null"},{type:"object",minProperties:4,properties:{x:{type:"number",minimum:0},y:{type:"number",minimum:0},width:{type:"number",minimum:0},height:{type:"number",minimum:0},svgId:{type:"string",description:"Defines an svg uri for a mask inside the crop boundaries"},flip:{type:"string",enum:["x","y","xy","none"],description:"Defines whether the mask is flipped on the v or h axis"},rotate:{type:"number",minimum:0,maximum:360,description:"Defines a rotation angle for the mask"}}}],description:"Defines cropping boundaries and additional transformations for the image."},upscaleMethod:{type:"string",description:"used for upscaling method when building an image url , expected values default|super"},focalPoint:{oneOf:[{type:"null"},{type:"object",minProperties:2,properties:{x:{type:"number",minimum:0,maximum:100},y:{type:"number",minimum:0,maximum:100}}}],description:"Specifies the focal point within the image."},artist:{type:"object",description:"Information about the artist of the image.",properties:{name:{type:"string"},id:{type:"string"}}}}}]},Common_SVGItem:{allOf:[{$ref:"urn:dm:schemas:common.json#/DataNode"},{type:"object",isTopLevelDataNode:!0,properties:{svgId:{type:"string",maxLength:100}}}]},ColorLayers:{shouldCollect:!0,shouldValidate:!0,refTypes:["GradientLinearLayer","GradientCircleLayer","GradientEllipseLayer","GradientConicLayer","GradientMeshLayer","SolidColorLayer"],type:["array","null"],items:[{type:["null","string"],pseudoType:["ref"]}],pseudoType:["refList"],_wixReference:!0,referencedMap:"#"},GradientLinearLayer:{allOf:[{$ref:"urn:dm:schemas:common.json#/DataNode"},{type:"object",isTopLevelDataNode:!0,properties:{opacity:{type:"number",minimum:0,maximum:1},fill:{$ref:"#/GradientLinear"}}}]},GradientCircleLayer:{allOf:[{$ref:"urn:dm:schemas:common.json#/DataNode"},{type:"object",isTopLevelDataNode:!0,properties:{opacity:{type:"number",minimum:0,maximum:1},fill:{$ref:"#/GradientCircle"}}}]},GradientEllipseLayer:{allOf:[{$ref:"urn:dm:schemas:common.json#/DataNode"},{type:"object",isTopLevelDataNode:!0,properties:{opacity:{type:"number",minimum:0,maximum:1},fill:{$ref:"#/GradientEllipse"}}}]},GradientMeshLayer:{allOf:[{$ref:"urn:dm:schemas:common.json#/DataNode"},{type:"object",isTopLevelDataNode:!0,properties:{opacity:{type:"number",minimum:0,maximum:1},fill:{type:"object",isTopLevelDataNode:!1,properties:{type:{type:"string",enum:["GradientMesh"]},gradients:{type:"array",items:{$ref:"#/GradientCircle"}}}}}}]},GradientConicLayer:{allOf:[{$ref:"urn:dm:schemas:common.json#/DataNode"},{type:"object",isTopLevelDataNode:!0,properties:{opacity:{type:"number",minimum:0,maximum:1},fill:{$ref:"#/GradientConic"}}}]},SolidColorLayer:{allOf:[{$ref:"urn:dm:schemas:common.json#/DataNode"},{type:"object",isTopLevelDataNode:!0,properties:{opacity:{type:"number",minimum:0,maximum:1},fill:{$ref:"#/SolidColor"}}}]},GradientLinear:{type:"object",isTopLevelDataNode:!1,properties:{type:{type:"string",enum:["GradientLinear"]},repeat:{type:"boolean"},blendMode:{$ref:"#/BlendMode"},angle:{type:"number",minimum:0,maximum:360},colorStops:{type:"array",items:{$ref:"#/GradientColorStop"}}}},GradientCircleSize:{type:"object",oneOf:[{required:["value","type"]},{required:["keyword"]},{required:[],maxProperties:0}],isTopLevelDataNode:!1,properties:{keyword:{type:"string",enum:["closest-side","closest-corner","farthest-side","farthest-corner"]},value:{type:"number"},type:{enum:["px","em","rem","vh","vw","vmin","vmax"]}}},GradientCircle:{type:"object",isTopLevelDataNode:!1,properties:{type:{type:"string",enum:["GradientCircle"]},repeat:{type:"boolean"},blendMode:{$ref:"#/BlendMode"},size:{$ref:"#/GradientCircleSize"},position:{$ref:"#/UnitSizePoint"},colorStops:{type:"array",items:{$ref:"#/GradientColorStop"}}}},GradientEllipseSize:{type:"object",oneOf:[{required:["width","height"]},{required:["keyword"]}],isTopLevelDataNode:!1,properties:{keyword:{type:"string",enum:["closest-side","closest-corner","farthest-side","farthest-corner"]},width:{$ref:"#/UnitLengthPercentage"},height:{$ref:"#/UnitLengthPercentage"}}},GradientEllipse:{type:"object",isTopLevelDataNode:!1,properties:{type:{type:"string",enum:["GradientEllipse"]},repeat:{type:"boolean"},blendMode:{$ref:"#/BlendMode"},size:{$ref:"#/GradientEllipseSize"},position:{$ref:"#/UnitSizePoint"},colorStops:{type:"array",items:{$ref:"#/GradientColorStop"}}}},GradientConic:{type:"object",isTopLevelDataNode:!1,properties:{type:{type:"string",enum:["GradientConic"]},repeat:{type:"boolean"},blendMode:{$ref:"#/BlendMode"},angle:{type:"number",minimum:0,maximum:360},position:{$ref:"#/UnitSizePoint"},colorStops:{type:"array",items:{$ref:"#/GradientAngularColorStop"}}}},SolidColor:{type:"object",isTopLevelDataNode:!1,properties:{type:{type:"string",enum:["SolidColor"]},color:{$ref:"urn:dm:schemas:common.json#/color"}}},BlendMode:{type:"string",enum:["normal","multiply","screen","darken","lighten","overlay","colorDodge","colorBurn","hardLight","softLight","difference","exclusion","hue","saturation","color","luminosity"],isTopLevelDataNode:!1},GradientColorStop:{type:"object",isTopLevelDataNode:!1,properties:{size:{$ref:"#/UnitLengthPercentage"},color:{$ref:"urn:dm:schemas:common.json#/color"},opacity:{type:"number",minimum:0,maximum:1}}},GradientAngularColorStop:{type:"object",isTopLevelDataNode:!1,properties:{size:{$ref:"#/UnitAngle"},color:{$ref:"urn:dm:schemas:common.json#/color"},opacity:{type:"number",minimum:0,maximum:1}}}}});var aat=J((FYa,iat)=>{"use strict";c();var LX=T("lodash"),iIe=(e,t,n,r,o)=>(LX.isPlainObject(t)&&LX.forOwn(t,(i,a)=>{iIe(e,i,a,t,o)}),LX.isArray(t)&&LX.forEach(t,(i,a)=>{iIe(e,i,a,t,o)}),n&&e[n]&&e[n](t,n,r,o),t),GEr=(e,t,n)=>iIe(e,t,null,null,n);iat.exports={walk:GEr}});var aIe=J((jYa,HEr)=>{HEr.exports={Int:{type:"number",multipleOf:1},NullableInt:{type:["number","null"],multipleOf:1},JavaInt:{type:"number",default:0,multipleOf:1,minimum:-2147483648,maximum:2147483647},JavaBool:{type:"boolean",default:!1},NullableBool:{type:["boolean","null"]},reference:{type:["string"],pseudoType:["ref"],_wixReference:!0},nullableReference:{type:["null","string"],pseudoType:["ref"],_wixReference:!0},weakReference:{type:["string"],pseudoType:["weakRef"],_wixReference:!0},nullableWeakReference:{type:["null","string"],pseudoType:["weakRef"],_wixReference:!0},referenceList:{type:["array"],items:[{type:["null","string"],pseudoType:["ref"]}],pseudoType:["refList"],_wixReference:!0},nullableReferenceList:{type:["array","null"],items:[{type:["null","string"],pseudoType:["ref"]}],pseudoType:["refList"],_wixReference:!0},referenceMap:{type:["object"],additionalProperties:{type:["null","string"],pseudoType:["ref"]},pseudoType:["refMap"],_wixReference:!0},nullableReferenceMap:{type:["object","null"],additionalProperties:{type:["null","string"],pseudoType:["ref"]},pseudoType:["refMap"],_wixReference:!0},DataNode:{type:"object",properties:{type:{type:"string"},id:{type:"string"},metaData:{type:"object",properties:{pageId:{type:"string"},isPreset:{type:"boolean"},schemaVersion:{type:"string"},isHidden:{type:"boolean"},logicalName:{type:"string"},description:{type:"string",maxLength:4e3},sig:{type:"string"},fragmentType:{type:"string"},fragmentInstance:{type:"string"}}}}},PropDataNode:{type:"object",properties:{type:{type:"string"},id:{type:"string"},metaData:{type:"object",properties:{schemaVersion:{type:["string","null"],default:"1.0"},autoGenerated:{type:["boolean","null"]},pageId:{type:"string"},sig:{type:"string"},fragmentType:{type:"string"},fragmentInstance:{type:"string"}}}}}}});var uIe=J((UYa,lat)=>{"use strict";c();var Eo=T("lodash"),$Er=["allOf","anyOf","oneOf"];function lIe(e){if(Eo.has(e,["type"])){let t=e.type;return Eo.isArray(t)?t:[t]}return[]}function WEr(e){return lIe(e).includes("object")||Eo.has(e,["properties"])}function zEr(e){return lIe(e).includes("array")||Eo.has(e,["items"])}function sat(e){return Eo.omit(e,["type"])}function YEr(e){return Eo.omit(e,["pseudoType"])}function qEr(e){return YEr(sat(e))}function QEr(e){return Eo.omit(e,"format")}function KEr(e,t){return e.every(n=>t.includes(n))}function XEr(e,t){return e.some(n=>t.includes(n))}function ZEr(e,t,...n){return Eo.mapValues(e,r=>Eo.mapValues(r,(o,i)=>t(o,i,...n)))}function JEr(e,t){return Eo(e).mapValues(t).omitBy(Eo.isEmpty).value()}function cIe(e){let t=Eo.get(e,["type"],[]),n=Eo.isArray(t)?t:[t];if(Eo.includes(n,"object")||Eo.has(e,["properties"]))return!0;let r=Eo.find(["allOf","anyOf","oneOf"],o=>Eo.has(e,o));return r?Eo.some(e[r],cIe):!1}function sIe(e,t=!1){let n=Eo.get(e,["type"],[]),r=Eo.isArray(n)?n:[n];if(r.length&&!r.includes("object")||Eo.has(e,["enum"])||Eo.has(e,["items"])||Eo.has(e,["minLength"])||Eo.has(e,["maxLength"])||Eo.has(e,["minimum"])||Eo.has(e,["maximum"])||Eo.has(e,["pattern"])||Eo.has(e,["format"])||r?.length>1&&!Eo.has(e,["properties"]))return!1;if(n==="object"||Eo.includes(r,"object")||Eo.has(e,["properties"])||Eo.has(e,["required"])||Eo.has(e,["additionalProperties"])||Eo.has(e,["patternProperties"]))return!0;let o=Eo.find(["allOf","anyOf","oneOf"],i=>Eo.has(e,i));return o==="allOf"?Eo.every(e[o],i=>sIe(i,t)):o?(t?Eo.some:Eo.every)(e[o],a=>sIe(a,t)):r.length===0}function eAr(e){return e?.isTopLevelDataNode&&cIe(e)}function tAr(e,t,n){let r=(o,i)=>eAr(o)?n(o,i,t):o;return Eo.mapValues(e,r)}function nAr(e,t,n){return Eo.mapValues(e,(r,o)=>(t[o]||n)(r,o))}function rAr(e){let t=$Er.filter(n=>Eo.has(e,n));if(t.length>1)throw new Error(`Expected exactly one alternation keyword, got: ${t.length}`);return Eo.head(t)}lat.exports={getTypesFromSchemaNode:lIe,isObjectNode:WEr,isArrayNode:zEr,removeTypes:sat,mapNestedValues:ZEr,mapAndClean:JEr,removeAllTypes:qEr,removeFormats:QEr,allElementsAreInIncluded:KEr,someElementsAreInIncluded:XEr,mapValuesWithSpecialCases:nAr,mapDataTypesThatAreObjects:tAr,isObjectSchema:cIe,isObjectSchemaStrict:sIe,getCombinator:rAr}});var dIe={};Le(dIe,{combineAllOf:()=>l0,dereference:()=>kX,extendDataNodeSchemas:()=>Y1});var Ag,pIe,uat,MX,pat,dat,kX,l0,oAr,cat,Y1,BX=ge(()=>{"use strict";c();Ag=R(T("lodash")),pIe=R(aat()),uat=R(SW()),MX=R(aIe()),pat=R(uIe()),dat={$ref:(e,t,n,r)=>{let o=e.split("#/").pop();if(r.refChain??=new Set([r.name]),r.memo??=new Map,r.refChain.has(o))return;let i=r.ns[o]??r.common[o];if(!i&&e.includes("urn:dm:schemas:"))return;delete n[t],r.refChain.add(o);let a=r.memo.get(o)??(0,pIe.walk)(dat,Ag.default.cloneDeep(i),r);r.refChain.delete(o),Ag.default.assign(n,Ag.default.cloneDeep(a)),r.memo.set(o,a)}},kX=(e,t)=>(0,pIe.walk)(dat,Ag.default.cloneDeep(e),t),l0=e=>{if(e.allOf){if(!e.allOf.every(a=>(0,pat.isObjectSchema)(a)))return e;let n=Ag.default.union(Ag.default.flatMap(e.allOf,a=>a.required||[]),e.required||[]),r=Ag.default.map(e.allOf,a=>l0(a)),o={...Ag.default.omit(e,"allOf"),type:"object",properties:Ag.default.assign({},...Ag.default.map(r,"properties"))};return Ag.default.some(r,a=>a.additionalProperties===!1)&&(o.additionalProperties=!1),n.length&&(o.required=n),o}return e.items?{...e,items:l0(e.items)}:e.properties?{...e,properties:Ag.default.mapValues(e.properties,l0)}:e},oAr=(e,t)=>{if(e.properties)return{...e,properties:{...e.properties,...t.properties}};if(e.allOf){let n=e.allOf.slice();return n.push(t),{...e,allOf:n}}return e},cat={[uat.DATA_TYPES.prop]:MX.PropDataNode,default:MX.DataNode},Y1=(e,t)=>{let n=cat[t]??cat.default;return Ag.default.mapValues(e,r=>oAr(r,n))}});var q1,Q1,mIe=ge(()=>{"use strict";c();ze();q1=class e extends ee{constructor(n){super({errorType:"schemaValidationError",message:JSON.stringify(n,null,4)});this.errors=n;Object.setPrototypeOf(this,e.prototype)}},Q1=class e extends ee{constructor(t,n){super({errorType:"cannotFindSchema",message:`Cannot find schema ${n} for namespace: ${t}`}),Object.setPrototypeOf(this,e.prototype)}}});var FX,mat=ge(()=>{FX={type:"object",properties:{_draftRefs:{type:"array",items:{type:"object",properties:{path:{type:"array",items:{type:"string"}},jsonPointer:{type:"string"},namespace:{type:"string"}}}},_isDraftItem:{type:"boolean",default:!0}},additionalProperties:!0}});var Sat=J((qYa,hat)=>{"use strict";c();var MA=T("lodash"),{isObjectNode:aAr,isArrayNode:sAr,getCombinator:lAr,mapAndClean:fat}=uIe(),gat="",yat="\\/",cAr="\\d+?",fIe=(e=[],t=[])=>MA.concat(e,t),uAr=(e,t)=>{let n=e.split("/").pop();if(!n)return null;for(let r of Object.values(t||{}))if(r?.[n]||r?.definitions?.[n])return r[n]||r.definitions[n];return null},K1=(e,t={},n=[],r=new Set,o)=>{let i={};if(t.$ref){if(r.has(t.$ref))return i;let u=uAr(t.$ref,e);if(u){r.add(t.$ref);let p=K1(e,u,n,r,o);return r.delete(t.$ref),p}else if(o){let p=o(t.$ref)||{},{variableName:d}=p;if(d){let m=n.join(yat);i[d]||(i[d]=[]),i[d].push(m)}}return i}let{variableOptions:a={}}=t,{variableName:s}=a;if(s){let u=n.join(yat);i[s]||(i[s]=[]),i[s].push(u)}if(aAr(t)){let u=t.properties||{};for(let[p,d]of Object.entries(u)){let m=MA.clone(n);MA.last(m)===gat&&m.pop(),m.push(p),MA.assignWith(i,K1(e,d,m,r,o),fIe)}}else sAr(t)&&MA.assignWith(i,K1(e,t.items,[...n,cAr,gat],r,o),fIe);let l=lAr(t);if(l){let u=t[l];for(let p of u)MA.assignWith(i,K1(e,p,n,r,o),fIe)}return i},pAr=(e,t,n)=>MA.mapValues(K1(e,t,[],void 0,n),MA.uniq),dAr=(e,t)=>fat(e,n=>fat(n,r=>r.isTopLevelDataNode?MA.mapValues(K1(e,r,[],void 0,t),MA.uniq):{}));hat.exports={buildVariableReferenceProperties:dAr,buildVariableReferencePropertiesForSingleSchema:pAr}});var vat=J((KYa,Tat)=>{"use strict";c();var PW=T("lodash"),gIe="#(([0-9|a-f|A-F]){3}){1,2}",jX=e=>`(${e})`,Cat=e=>`^${e}$`,VX=e=>Cat(jX(e)),mAr=e=>`[${PW.toUpper(e)}${PW.toLower(e)}]`,fAr=e=>PW(e).split("").map(mAr).join(""),IS=(e,{nullable:t=!1}={})=>({type:t?["string","null"]:"string",pattern:e}),gAr=()=>{let t=jX("(0|1)?\\d{1,2}|2[0-4]\\d|25[0-5]"),n=`,${t}`;return[t,n,n,"(,0*(0?\\.\\d+|0|1))?"].join("")},Pat=()=>{let e="color_([0-9]{1,2}|100)",t=`\\{${e}\\}`,n=`\\[${e}\\]`,r=[gAr(),e,t,n,gIe],o=PW(r).map(jX).join("|");return`^$|${VX(o)}`},bat=()=>{let e="(0|([0-9]*([.][0-9]+){0,1}(px|em)[\\s]*){1,4})",t=PW("solid dashed dotted double groove inset none outset ridge").split(" ").map(fAr).join("|"),n=`${jX(t)}{0,1}[\\s]*`,o=[e,n,"([{\\[]color_([0-9]{1,2}|100)[}\\]]|(#(([0-9|a-f]){3}){1,2}){0,1})|\\[borderColor\\]?"].join("");return`^$|${Cat(o)}`},yAr=IS("[-a-zA-Z0-9@:%_\\+.~#?&//=]{2,256}\\.[a-z]{2,4}\\b(\\/[-a-zA-Z0-9@:%_\\+.~#?&//=]*)?"),Eat="(\\d+(.\\d+)?(em|px)|0(.0+)?)",hAr="\\d*(.\\d+)?",Aat=IS(`^$|^${hAr}$|^${Eat}( +${Eat}){0,3}$`),Iat=IS("^[\\/\\-|0-9|a-z|A-Z]*$"),SAr=IS("^\\d+(.\\d+)?(em|px)?$"),PAr=IS("^(-?\\d+(.\\d+)?(px|em|pt|ex|in|cm|mm|pc|spx))$|^normal$"),bAr=()=>({color:IS(Pat()),nullableColor:IS(VX(Pat()),{nullable:!0}),hexColor:IS(VX(gIe)),nullableHexColor:IS(VX(gIe),{nullable:!0}),numeric:IS("^\\d+$"),uri:yAr,border:IS(bat()),nullableBorder:IS(bat(),{nullable:!0}),padding:Aat,radius:Aat,webThemeUrl:Iat,themeUrl:Iat,font:{type:["string"]},nullableFont:{type:["string","null"]},cssMeasure:SAr,cssMeasureWithUnit:PAr});Tat.exports={createFormatsSchema:bAr}});var yIe=J((ZYa,Rat)=>{"use strict";c();var EAr=e=>`urn:dm:schemas:${e}`,AAr=e=>e.startsWith("urn:"),IAr=e=>e.startsWith("#/"),CAr=e=>{let t=e.match(/^urn:dm:schemas:([^#]+)#\/(.+)$/);if(t)return{namespace:t[1],dataType:t[2].split("/")};throw new Error(`Invalid URN absolute reference "${e}"`)},TAr=e=>e.substring(2).split("/");Rat.exports={convertIdToAbsoluteUrn:EAr,isAbsoluteUrn:AAr,isRelativeReference:IAr,extractNamespaceFromAbsoluteUrn:CAr,extractPathFromRelativeReference:TAr}});var Dat=J((e8a,wat)=>{"use strict";c();var Ig=T("lodash"),vAr=vat().createFormatsSchema(),RAr=aIe(),{convertIdToAbsoluteUrn:OAr}=yIe(),Oat={$id:"common.json",...vAr,...RAr},hIe=["shouldCollect","isRefOwner","shouldValidate","referencedMap","isRelationalSplit","dontSerialize"],_Ar=hIe.concat(["isTopLevelDataNode","_wixReference","pseudoType","refTypes","isPermanentDataNode","variableOptions"]),_at={shouldCollect:!0,shouldValidate:!0,referencedMap:"#"},xAr={shouldCollect:!1,shouldValidate:!0,referencedMap:"#"},wAr=Ig.keys(_at);function DAr(e){return Ig.pick(e,hIe)}function NAr(e){if(!Ig.has(Oat,e))throw new Error(`common.json does not have ${e}`);return OAr(`common.json#/${e}`)}function LAr(e){return Ig.get(e,["_wixReference"],!1)}function MAr(e,t,n){let r=[];return n&&r.push(n),r.push({$ref:t}),r.push(e),{allOf:r}}function xat(e){return[Ig.isNull,Ig.isUndefined,Ig.isBoolean,Ig.isNumber,Ig.isString].some(n=>n(e)===!0)}function UX(e){if(xat(e))return e;if(Ig.isArray(e))return e.map(UX);if(!Ig.isPlainObject(e))throw new Error(`Illegal state or input: Expected a plain object in this point of annotation removal. Got: ${e}`);let t=Ig.mapValues(e,(n,r)=>r==="properties"?Ig.mapValues(n,UX):UX(n));return Ig.omit(t,_Ar)}wat.exports={isPrimitive:xat,isWixReference:LAr,createRefToCommon:NAr,combineDataTypeWithDataNode:MAr,getReferenceAnnotations:DAr,removeAllAnnotations:UX,WIX_REFERENCE_ANNOTATION_PROPS:hIe,STRONG_WIX_REFERENCE_ANNOTATIONS:_at,WEAK_WIX_REFERENCE_ANNOTATIONS:xAr,REQUIRED_ANNOTATIONS:wAr,COMMON:Oat}});var GX=J((n8a,kAr)=>{kAr.exports={schemaNameConfig:{cssPropertySchemas:{useSchemasFromDefinitions:!0,useAbsoluteUrn:!0}},variables:{commonSchemas:{UnitSize:{variableName:"UnitSizeVar",variableValueName:"UnitSizeValue"},NumberThatCanConnectToAVariable:{variableName:"NumberVar",variableValueName:"NumberValue"}},layout:{ItemsAlignment:{variableName:"ItemsAlignmentVar",variableValueName:"ItemsAlignmentValue"},JustifyContent:{variableName:"JustifyContentVar",variableValueName:"JustifyContentValue"},PositionType:{variableName:"PositionTypeVar",variableValueName:"PositionTypeValue"},LayoutSize:{variableName:"LayoutSizeVar",variableValueName:"LayoutSizeValue"},Height:{variableName:"HeightVar",variableValueName:"HeightValue"},KeywordLength:{variableName:"KeywordLengthVar",variableValueName:"KeywordLengthValue"}},cssPropertySchemas:{"CSS.Number":{variableName:"NumVar",variableValueName:"NumValue"},"CSS.Length":{variableName:"LengthVar",variableValueName:"LengthValue"},"CSS.PositiveLength":{variableName:"PositiveLengthVar",variableValueName:"PositiveLengthValue"},"CSS.Angle":{variableName:"AngleVar",variableValueName:"AngleValue"},"CSS.Color":{variableName:"ColorVar",variableValueName:"ColorValue"},"CSS.Percentage":{variableName:"PercentageVar",variableValueName:"PercentageValue"},"CSS.BorderTopStyle":{variableName:"BorderEdgeStyleVar",variableValueName:"BorderEdgeStyleValue"},"CSS.BorderTopWidth":{variableName:"BorderEdgeWidthVar",variableValueName:"BorderEdgeWidthValue"},"CSS.BorderWidth":{variableName:"BorderWidthVar",variableValueName:"BorderWidthValue"},"CSS.BorderStyle":{variableName:"BorderStyleVar",variableValueName:"BorderStyleValue"},"CSS.BorderColor":{variableName:"BorderColorVar",variableValueName:"BorderColorValue"},"CSS.Border":{variableName:"BorderVar",variableValueName:"BorderValue"},"CSS.BorderTopLeftRadius":{variableName:"BorderCornerRadiusVar",variableValueName:"BorderCornerRadiusValue"},"CSS.BorderRadius":{variableName:"BorderRadiusVar",variableValueName:"BorderRadiusValue"},"CSS.Font":{variableName:"FontVar",variableValueName:"FontValue"},"CSS.FontSize":{variableName:"FontSizeVar",variableValueName:"FontSizeValue"},"CSS.FontStretch":{variableName:"FontStretchVar",variableValueName:"FontStretchValue"},"CSS.FontStyle":{variableName:"FontStyleVar",variableValueName:"FontStyleValue"},"CSS.FontVariant":{variableName:"FontVariantVar",variableValueName:"FontVariantValue"},"CSS.FontWeight":{variableName:"FontWeightVar",variableValueName:"FontWeightValue"},"CSS.FontFamily":{variableName:"FontFamilyVar",variableValueName:"FontFamilyValue"},"CSS.LineHeight":{variableName:"LineHeightVar",variableValueName:"LineHeightValue"},"CSS.LetterSpacing":{variableName:"LetterSpacingVar",variableValueName:"LetterSpacingValue"},"CSS.TextAlign":{variableName:"TextAlignVar",variableValueName:"TextAlignValue"},"CSS.TextTransform":{variableName:"TextTransformVar",variableValueName:"TextTransformValue"},"CSS.TextShadow":{variableName:"TextShadowVar",variableValueName:"TextShadowValue"},"CSS.TextDecoration":{variableName:"TextDecorationVar",variableValueName:"TextDecorationValue"},"CSS.TextDecorationLine":{variableName:"TextDecorationLineVar",variableValueName:"TextDecorationLineValue"},"CSS.TextDecorationStyle":{variableName:"TextDecorationStyleVar",variableValueName:"TextDecorationStyleValue"},"CSS.TextDecorationThickness":{variableName:"TextDecorationThicknessVar",variableValueName:"TextDecorationThicknessValue"},"CSS.TextIndent":{variableName:"TextIndentVar",variableValueName:"TextIndentValue"},"CSS.Padding":{variableName:"PaddingVar",variableValueName:"PaddingValue"},"CSS.PaddingTop":{variableName:"PaddingEdgeVar",variableValueName:"PaddingEdgeValue"},"CSS.Margin":{variableName:"MarginVar",variableValueName:"MarginValue"},"CSS.MarginTop":{variableName:"MarginEdgeVar",variableValueName:"MarginEdgeValue"},"CSS.BoxShadow":{variableName:"BoxShadowVar",variableValueName:"BoxShadowValue"},"CSS.Opacity":{variableName:"OpacityVar",variableValueName:"OpacityValue"},"CSS.JustifyContent":{variableName:"CssJustifyContentVar",variableValueName:"CssJustifyContentValue"},"CSS.Background":{variableName:"BackgroundVar",variableValueName:"BackgroundValue"},"CSS.BackgroundImage":{variableName:"BackgroundImageVar",variableValueName:"BackgroundImageValue"},"CSS.WritingMode":{variableName:"WritingModeVar",variableValueName:"WritingModeValue"},"CSS.Display":{variableName:"DisplayVar",variableValueName:"DisplayValue"},"CSS.Filter":{variableName:"FilterVar",variableValueName:"FilterValue"},"CSS.Gap":{variableName:"GapVar",variableValueName:"GapValue"},"CSS.SingleValueGap":{variableName:"SingleValueGapVar",variableValueName:"SingleValueGapValue"}}},schemasThatUseVariables:{layout:{GridTrackSize:"UnitSize"}}}});var Mat=J((r8a,Lat)=>{"use strict";c();var SIe=T("lodash"),{createRefToCommon:BAr}=Dat(),FAr=GX(),{cssPropertySchemas:VAr}=FAr.variables,jAr=new Set(SIe.map(VAr,"variableName")),UAr=e=>`^(?:${e.join("|")})$`,GAr=(e,t)=>{let n=UAr(e),r={type:"object",properties:{path:{type:"string",pattern:n},variableId:{shouldCollect:!1,shouldValidate:!0,referencedMap:"variables",$ref:BAr("reference"),refTypes:[]}},required:["path","variableId"]};return jAr.has(t)||SIe.assign(r.properties.variableId,{refTypes:[t],variableTypesByPattern:{items:[{pattern:n,refTypes:[t]}]}}),r},Nat=e=>({type:"object",properties:{variableConnections:{type:"array",items:{anyOf:SIe.map(e,GAr)}}}}),HAr=(e,t,n)=>{let r=e?.[n]?.[t];if(r)return Nat(r)};Lat.exports={buildVariableConnections:HAr,buildVariableConnectionsForSchema:Nat}});var HX,$Ar,kat,Bat,Fat,Vat=ge(()=>{"use strict";c();HX=R(T("lodash")),$Ar="#",kat=(e,t,n,r)=>{if(HX.default.isString(n)){let o=t.referencedMap;e.push({refInfo:t,id:n.startsWith("#")?n.slice(1):n,referencedMap:o===$Ar?r:o})}},Bat=(e,t,n,r,o)=>{if(t.variableTypesByPattern?.items&&r?.path){let a=t.variableTypesByPattern.items.filter(({pattern:s})=>new RegExp(s).test(r.path)).flatMap(({refTypes:s})=>s);t={...t,refTypes:a.length?a:t.refTypes}}let{path:i}=t;for(;r&&o{let o=e[t]?.[n]||[],i=[];return HX.default.forOwn(o,a=>{Bat(i,a,t,r,0)}),i}});var PIe,jat,bW,Uat=ge(()=>{"use strict";c();PIe=R(T("@wix/dm-ajv")),jat=R(T("lodash")),bW=(e={},t={})=>{let n=new PIe.default.Ajv2019(e);return PIe.default.formats(n),jat.default.forEach(t,(r,o)=>{n.addFormat(o,r)}),n}});function Gat(e,t){if(!t?.length)return e;let n=a=>a.replace(/^\//,"").replace(/\//g,"."),r=t.reduce((a,{instancePath:s,schemaPath:l,message:u})=>(u==="must match a schema in anyOf"&&a.push($X.default.matches({instancePath:s,schemaPath:l.replace(/\/anyOf$/,"/unevaluatedProperties"),keyword:"unevaluatedProperties"})),a),[]),o=a=>$X.default.some(r,s=>s(a));return t.filter(a=>(a.keyword==="unevaluatedProperties"||a.schemaPath?.includes("/unevaluatedProperties/"))&&!o(a)).map(a=>{if(a.keyword==="unevaluatedProperties"&&a.params?.unevaluatedProperty){let s=n(a.instancePath||"");return s?`${s}.${a.params.unevaluatedProperty}`:a.params.unevaluatedProperty}return n(a.instancePath||"")}).filter(Boolean).forEach(a=>$X.default.unset(e,a)),e}var $X,Hat=ge(()=>{"use strict";c();$X=R(T("lodash"))});function Wat(e,t){if(!t.type)return;let n=zAr[e]?.[t.type];if(n)for(let r of n)$at.default.has(t,[r])&&delete t[r]}var $at,zAr,zat=ge(()=>{"use strict";c();$at=R(T("lodash")),zAr={design:{MediaContainerWithDividers:["charas"]}}});var bIe={};Le(bIe,{$id:()=>YAr,default:()=>XAr,definitions:()=>KAr,description:()=>QAr,title:()=>qAr});var YAr,qAr,QAr,KAr,XAr,Yat=ge(()=>{YAr="urn:dm:schemas:cssPropertySchemas.json",qAr="CSS Property Schemas",QAr="Individual JSON Schema definitions for CSS property value types used within Wix",KAr={"CSS.Color":{allOf:[{anyOf:[{$ref:"urn:dm:schemas:css-value-definitions.schema.json#/definitions/"},{type:"string",$ref:"urn:dm:schemas:css-value-definitions.schema.json#/definitions/",format:"css-color"},{$ref:"urn:dm:schemas:css-value-definitions.schema.json#/definitions/"}]},{maxLength:150}]},"CSS.BlendMode":{allOf:[{anyOf:[{$ref:"urn:dm:schemas:css-value-definitions.schema.json#/definitions/"},{type:"string",$ref:"urn:dm:schemas:css-value-definitions.schema.json#/definitions/",format:"css-blend-mode"},{$ref:"urn:dm:schemas:css-value-definitions.schema.json#/definitions/"}]},{maxLength:150}]},"CSS.Angle":{allOf:[{anyOf:[{$ref:"urn:dm:schemas:css-value-definitions.schema.json#/definitions/"},{type:"string",$ref:"urn:dm:schemas:css-value-definitions.schema.json#/definitions/",format:"css-angle"},{$ref:"urn:dm:schemas:css-value-definitions.schema.json#/definitions/"}]},{maxLength:150}]},"CSS.LengthPercentage":{allOf:[{anyOf:[{$ref:"urn:dm:schemas:cssPropertySchemas.json#/definitions/CSS.Length"},{$ref:"urn:dm:schemas:cssPropertySchemas.json#/definitions/CSS.Percentage"},{$ref:"urn:dm:schemas:css-value-definitions.schema.json#/definitions/"},{type:"string",$ref:"urn:dm:schemas:css-value-definitions.schema.json#/definitions/",format:"css-length-percentage"},{$ref:"urn:dm:schemas:css-value-definitions.schema.json#/definitions/"}]},{maxLength:150}]},"CSS.PositiveLengthPercentage":{allOf:[{anyOf:[{$ref:"urn:dm:schemas:cssPropertySchemas.json#/definitions/CSS.PositiveLength"},{$ref:"urn:dm:schemas:cssPropertySchemas.json#/definitions/CSS.PositivePercentage"},{$ref:"urn:dm:schemas:css-value-definitions.schema.json#/definitions/"},{type:"string",$ref:"urn:dm:schemas:css-value-definitions.schema.json#/definitions/",format:"css-length-percentage"},{$ref:"urn:dm:schemas:css-value-definitions.schema.json#/definitions/"}]},{maxLength:150}]},"CSS.Length":{allOf:[{anyOf:[{$ref:"urn:dm:schemas:css-value-definitions.schema.json#/definitions/"},{type:"string",$ref:"urn:dm:schemas:css-value-definitions.schema.json#/definitions/",format:"css-length"},{$ref:"urn:dm:schemas:css-value-definitions.schema.json#/definitions/"}]},{maxLength:150}]},"CSS.PositiveLength":{allOf:[{anyOf:[{$ref:"urn:dm:schemas:css-value-definitions.schema.json#/definitions/"},{type:"string",$ref:"urn:dm:schemas:css-value-definitions.schema.json#/definitions/",format:"css-length"},{$ref:"urn:dm:schemas:css-value-definitions.schema.json#/definitions/"}]},{maxLength:150}]},"CSS.Number":{allOf:[{anyOf:[{$ref:"urn:dm:schemas:css-value-definitions.schema.json#/definitions/"},{type:"string",$ref:"urn:dm:schemas:css-value-definitions.schema.json#/definitions/",format:"css-number"},{$ref:"urn:dm:schemas:css-value-definitions.schema.json#/definitions/"}]},{maxLength:150}]},"CSS.PositiveNumber":{allOf:[{anyOf:[{$ref:"urn:dm:schemas:css-value-definitions.schema.json#/definitions/"},{type:"string",$ref:"urn:dm:schemas:css-value-definitions.schema.json#/definitions/",format:"css-number"},{$ref:"urn:dm:schemas:css-value-definitions.schema.json#/definitions/"}]},{maxLength:150}]},"CSS.Percentage":{allOf:[{anyOf:[{$ref:"urn:dm:schemas:css-value-definitions.schema.json#/definitions/"},{type:"string",$ref:"urn:dm:schemas:css-value-definitions.schema.json#/definitions/",format:"css-percentage"},{$ref:"urn:dm:schemas:css-value-definitions.schema.json#/definitions/"}]},{maxLength:150}]},"CSS.PositivePercentage":{allOf:[{anyOf:[{$ref:"urn:dm:schemas:css-value-definitions.schema.json#/definitions/"},{type:"string",$ref:"urn:dm:schemas:css-value-definitions.schema.json#/definitions/",format:"css-percentage"},{$ref:"urn:dm:schemas:css-value-definitions.schema.json#/definitions/"}]},{maxLength:150}]},"CSS.String":{allOf:[{anyOf:[{$ref:"urn:dm:schemas:css-value-definitions.schema.json#/definitions/"},{type:"string",$ref:"urn:dm:schemas:css-value-definitions.schema.json#/definitions/",format:"css-string"},{$ref:"urn:dm:schemas:css-value-definitions.schema.json#/definitions/"}]},{maxLength:150}]},"CSS.Time":{allOf:[{anyOf:[{$ref:"urn:dm:schemas:css-value-definitions.schema.json#/definitions/"},{type:"string",$ref:"urn:dm:schemas:css-value-definitions.schema.json#/definitions/