PageSourceSearch

https://www.machining.com/assets/scrivito-DvgTsX0i.js

js machining.com collected 2026-10-09 04:56:16 UTC 373,401 bytes, 3 lines download raw bytes

1import{g as oi,r as Jd,c as _a}from"./i18n-BRH4Ir7-.js";import{r as Qd,a as Yd}from"./react-CHkMNVvR.js";var ma={exports:{}},Ms={},fu;function Zd(){if(fu)return Ms;fu=1,Object.defineProperty(Ms,"__esModule",{value:!0}),Ms.slugify=s;function s(mt){return G.length||gt(),mt.normalize("NFKC").replace(/\W/g,f).replace(/\W+/g,"-").replace(/^-|-$/g,"").toLowerCase()}function f(mt){for(let xt=0,Ht=G.length;xt<Ht;){const Jt=xt+Ht>>1,ye=O(mt,G[Jt][0]);if(ye===0)return G[Jt][1];ye<0?Ht=Jt:xt=Jt+1}return"-"}const{compare:O}=Intl.Collator("de",{collation:"phonebk",sensitivity:"base"}),G=[];function gt(){[[214,"Oe.....Ue.ThSs....Ae"],[305,"i"],[401,"f"],[913,"avgdeziThiklmnxopr.styfChPso"],[1072,"abvgdeZhzijklmnoprstufhcChShSHh_y_eYuYa..Dj.ezi.jlnc...Dj"],[1329,"abgdYezeytZhilKhTskhDzGhChmynShVoChpjRrsvtrTswpkof"],[1569,"_aawayabttThjhKhdDhrzsShsdtz_Gh....._fqklmnhwyy"],[4304,"abgdevztiklmnopZhrstupkGhqShChTsDzTsChKhjheywhof"],[9312,"===================="],[9424,"==========================="]].forEach(([xt,Ht])=>Ht.match(/[A-Z]*./g).forEach((Jt,ye)=>{if(Jt===".")return;const Ee=String.fromCharCode(xt+ye).normalize("NFKC");G.push([Ee,Jt==="="?Ee:Jt==="_"?"":Jt])})),G.sort(([xt],[Ht])=>O(xt,Ht))}return Ms}function Hi(){return Hi=Object.assign?Object.assign.bind():function(s){for(var f=1;f<arguments.length;f++){var O=arguments[f];for(var G in O)({}).hasOwnProperty.call(O,G)&&(s[G]=O[G])}return s},Hi.apply(null,arguments)}var Rr;(function(s){s.Pop="POP",s.Push="PUSH",s.Replace="REPLACE"})(Rr||(Rr={}));var Qo=function(s){return s},Ws="beforeunload",Xd="hashchange",$u="popstate";function qd(s){s===void 0&&(s={});var f=s,O=f.window,G=O===void 0?document.defaultView:O,gt=G.history;function mt(){var Oe=G.location,ne=Oe.pathname,De=Oe.search,me=Oe.hash,He=gt.state||{};return[He.idx,Qo({pathname:ne,search:De,hash:me,state:He.usr||null,key:He.key||"default"})]}var xt=null;function Ht(){if(xt)ze.call(xt),xt=null;else{var Oe=Rr.Pop,ne=mt(),De=ne[0],me=ne[1];if(ze.length){if(De!=null){var He=Ee-De;He&&(xt={action:Oe,location:me,retry:function(){nn(He*-1)}},nn(He))}}else Un(Oe)}}G.addEventListener($u,Ht);var Jt=Rr.Pop,ye=mt(),Ee=ye[0],ke=ye[1],Qe=Yo(),ze=Yo();Ee==null&&(Ee=0,gt.replaceState(Hi({},gt.state,{idx:Ee}),""));function dn(Oe){return typeof Oe=="string"?Oe:Jo(Oe)}function Dn(Oe,ne){return ne===void 0&&(ne=null),Qo(Hi({pathname:ke.pathname,hash:"",search:""},typeof Oe=="string"?Zo(Oe):Oe,{state:ne,key:ks()}))}function Ln(Oe,ne){return[{usr:Oe.state,key:Oe.key,idx:ne},dn(Oe)]}function mn(Oe,ne,De){return!ze.length||(ze.call({action:Oe,location:ne,retry:De}),!1)}function Un(Oe){Jt=Oe;var ne=mt();Ee=ne[0],ke=ne[1],Qe.call({action:Jt,location:ke})}function Ue(Oe,ne){var De=Rr.Push,me=Dn(Oe,ne);function He(){Ue(Oe,ne)}if(mn(De,me,He)){var Xn=Ln(me,Ee+1),Ar=Xn[0],Jr=Xn[1];try{gt.pushState(Ar,"",Jr)}catch{G.location.assign(Jr)}Un(De)}}function Tt(Oe,ne){var De=Rr.Replace,me=Dn(Oe,ne);function He(){Tt(Oe,ne)}if(mn(De,me,He)){var Xn=Ln(me,Ee),Ar=Xn[0],Jr=Xn[1];gt.replaceState(Ar,"",Jr),Un(De)}}function nn(Oe){gt.go(Oe)}var $e={get action(){return Jt},get location(){return ke},createHref:dn,push:Ue,replace:Tt,go:nn,back:function(){nn(-1)},forward:function(){nn(1)},listen:function(ne){return Qe.push(ne)},block:function(ne){var De=ze.push(ne);return ze.length===1&&G.addEventListener(Ws,Bs),function(){De(),ze.length||G.removeEventListener(Ws,Bs)}}};return $e}function tf(s){s===void 0&&(s={});var f=s,O=f.window,G=O===void 0?document.defaultView:O,gt=G.history;function mt(){var ne=Zo(G.location.hash.substr(1)),De=ne.pathname,me=De===void 0?"/":De,He=ne.search,Xn=He===void 0?"":He,Ar=ne.hash,Jr=Ar===void 0?"":Ar,si=gt.state||{};return[si.idx,Qo({pathname:me,search:Xn,hash:Jr,state:si.usr||null,key:si.key||"default"})]}var xt=null;function Ht(){if(xt)ze.call(xt),xt=null;else{var ne=Rr.Pop,De=mt(),me=De[0],He=De[1];if(ze.length){if(me!=null){var Xn=Ee-me;Xn&&(xt={action:ne,location:He,retry:function(){$e(Xn*-1)}},$e(Xn))}}else Ue(ne)}}G.addEventListener($u,Ht),G.addEventListener(Xd,function(){var ne=mt(),De=ne[1];Jo(De)!==Jo(ke)&&Ht()});var Jt=Rr.Pop,ye=mt(),Ee=ye[0],ke=ye[1],Qe=Yo(),ze=Yo();Ee==null&&(Ee=0,gt.replaceState(Hi({},gt.state,{idx:Ee}),""));function dn(){var ne=document.querySelector("base"),De="";if(ne&&ne.getAttribute("href")){var me=G.location.href,He=me.indexOf("#");De=He===-1?me:me.slice(0,He)}return De}function Dn(ne){return dn()+"#"+(typeof ne=="string"?ne:Jo(ne))}function Ln(ne,De){return De===void 0&&(De=null),Qo(Hi({pathname:ke.pathname,hash:"",search:""}
1,typeof ne=="string"?Zo(ne):ne,{state:De,key:ks()}))}function mn(ne,De){return[{usr:ne.state,key:ne.key,idx:De},Dn(ne)]}function Un(ne,De,me){return!ze.length||(ze.call({action:ne,location:De,retry:me}),!1)}function Ue(ne){Jt=ne;var De=mt();Ee=De[0],ke=De[1],Qe.call({action:Jt,location:ke})}function Tt(ne,De){var me=Rr.Push,He=Ln(ne,De);function Xn(){Tt(ne,De)}if(Un(me,He,Xn)){var Ar=mn(He,Ee+1),Jr=Ar[0],si=Ar[1];try{gt.pushState(Jr,"",si)}catch{G.location.assign(si)}Ue(me)}}function nn(ne,De){var me=Rr.Replace,He=Ln(ne,De);function Xn(){nn(ne,De)}if(Un(me,He,Xn)){var Ar=mn(He,Ee),Jr=Ar[0],si=Ar[1];gt.replaceState(Jr,"",si),Ue(me)}}function $e(ne){gt.go(ne)}var Oe={get action(){return Jt},get location(){return ke},createHref:Dn,push:Tt,replace:nn,go:$e,back:function(){$e(-1)},forward:function(){$e(1)},listen:function(De){return Qe.push(De)},block:function(De){var me=ze.push(De);return ze.length===1&&G.addEventListener(Ws,Bs),function(){me(),ze.length||G.removeEventListener(Ws,Bs)}}};return Oe}function ef(s){s===void 0&&(s={});var f=s,O=f.initialEntries,G=O===void 0?["/"]:O,gt=f.initialIndex,mt=G.map(function(Ue){var Tt=Qo(Hi({pathname:"/",search:"",hash:"",state:null,key:ks()},typeof Ue=="string"?Zo(Ue):Ue));return Tt}),xt=hu(gt??mt.length-1,0,mt.length-1),Ht=Rr.Pop,Jt=mt[xt],ye=Yo(),Ee=Yo();function ke(Ue){return typeof Ue=="string"?Ue:Jo(Ue)}function Qe(Ue,Tt){return Tt===void 0&&(Tt=null),Qo(Hi({pathname:Jt.pathname,search:"",hash:""},typeof Ue=="string"?Zo(Ue):Ue,{state:Tt,key:ks()}))}function ze(Ue,Tt,nn){return!Ee.length||(Ee.call({action:Ue,location:Tt,retry:nn}),!1)}function dn(Ue,Tt){Ht=Ue,Jt=Tt,ye.call({action:Ht,location:Jt})}function Dn(Ue,Tt){var nn=Rr.Push,$e=Qe(Ue,Tt);function Oe(){Dn(Ue,Tt)}ze(nn,$e,Oe)&&(xt+=1,mt.splice(xt,mt.length,$e),dn(nn,$e))}function Ln(Ue,Tt){var nn=Rr.Replace,$e=Qe(Ue,Tt);function Oe(){Ln(Ue,Tt)}ze(nn,$e,Oe)&&(mt[xt]=$e,dn(nn,$e))}function mn(Ue){var Tt=hu(xt+Ue,0,mt.length-1),nn=Rr.Pop,$e=mt[Tt];function Oe(){mn(Ue)}ze(nn,$e,Oe)&&(xt=Tt,dn(nn,$e))}var Un={get index(){return xt},get action(){return Ht},get location(){return Jt},createHref:ke,push:Dn,replace:Ln,go:mn,back:function(){mn(-1)},forward:function(){mn(1)},listen:function(Tt){return ye.push(Tt)},block:function(Tt){return Ee.push(Tt)}};return Un}function hu(s,f,O){return Math.min(Math.max(s,f),O)}function Bs(s){s.preventDefault(),s.returnValue=""}function Yo(){var s=[];return{get length(){return s.length},push:function(O){return s.push(O),function(){s=s.filter(function(G){return G!==O})}},call:function(O){s.forEach(function(G){return G&&G(O)})}}}function ks(){return Math.random().toString(36).substr(2,8)}function Jo(s){var f=s.pathname,O=f===void 0?"/":f,G=s.search,gt=G===void 0?"":G,mt=s.hash,xt=mt===void 0?"":mt;return gt&&gt!=="?"&&(O+=gt.charAt(0)==="?"?gt:"?"+gt),xt&&xt!=="#"&&(O+=xt.charAt(0)==="#"?xt:"#"+xt),O}function Zo(s){var f={};if(s){var O=s.indexOf("#");O>=0&&(f.hash=s.substr(O),s=s.substr(0,O));var G=s.indexOf("?");G>=0&&(f.search=s.substr(G),s=s.substr(0,G)),s&&(f.pathname=s)}return f}const nf=Object.freeze(Object.defineProperty({__proto__:null,get Action(){return Rr},createBrowserHistory:qd,createHashHistory:tf,createMemoryHistory:ef,createPath:Jo,parsePath:Zo},Symbol.toStringTag,{value:"Module"})),rf=oi(nf);function pi(s){var f=typeof s;return s!=null&&(f=="object"||f=="function")}var Vu=typeof global=="object"&&global&&global.Object===Object&&global,of=typeof self=="object"&&self&&self.Object===Object&&self,vi=Vu||of||Function("return this")(),ya=function(){return vi.Date.now()},sf=/\s/;function af(s){for(var f=s.length;f--&&sf.test(s.charAt(f)););return f}var uf=/^\s+/;function cf(s){return s&&s.slice(0,af(s)+1).replace(uf,"")}var Oi=vi.Symbol,zu=Object.prototype,lf=zu.hasOwnProperty,df=zu.toString,Ps=Oi?Oi.toStringTag:void 0;function ff(s){var f=lf.call(s,Ps),O=s[Ps];try{s[Ps]=void 0;var G=!0}catch{}var gt=df.call(s);return G&&(f?s[Ps]=O:delete s[Ps]),gt}var hf=Object.prototype,pf=hf.toString;function vf(s){return pf.call(s)}var gf="[object Null]",_f="[object Undefined]",pu=Oi?Oi.toStringTag:void 0;function Gi(s){return s==null?s===void 0?_f:gf:pu&&pu in Object(s)?ff(s):vf(s)}function Li(s){return s!=null&&typeof s=="object"}var mf="[object Symbol]";function Xo(s){return typeof s=="symbol"||Li(s)&&Gi(s)==mf}var vu=NaN,yf=/^[-+]0x[0-9a-f]+$/i,bf=/^0b[01]+$/i,Pf=/^0o[0-7]+$/i,wf=parseInt;function gu(s){if(typeof s=="number")return s;if(Xo(s))return vu;if(pi(s)){var f=typeof s.valueOf=="function"?s.valueOf():s;s=pi(f)?f+"":f}
1if(typeof s!="string")return s===0?s:+s;s=cf(s);var O=bf.test(s);return O||Pf.test(s)?wf(s.slice(2),O?2:8):yf.test(s)?vu:+s}var Of="Expected a function",Cf=Math.max,Ef=Math.min;function Sf(s,f,O){var G,gt,mt,xt,Ht,Jt,ye=0,Ee=!1,ke=!1,Qe=!0;if(typeof s!="function")throw new TypeError(Of);f=gu(f)||0,pi(O)&&(Ee=!!O.leading,ke="maxWait"in O,mt=ke?Cf(gu(O.maxWait)||0,f):mt,Qe="trailing"in O?!!O.trailing:Qe);function ze($e){var Oe=G,ne=gt;return G=gt=void 0,ye=$e,xt=s.apply(ne,Oe),xt}function dn($e){return ye=$e,Ht=setTimeout(mn,f),Ee?ze($e):xt}function Dn($e){var Oe=$e-Jt,ne=$e-ye,De=f-Oe;return ke?Ef(De,mt-ne):De}function Ln($e){var Oe=$e-Jt,ne=$e-ye;return Jt===void 0||Oe>=f||Oe<0||ke&&ne>=mt}function mn(){var $e=ya();if(Ln($e))return Un($e);Ht=setTimeout(mn,Dn($e))}function Un($e){return Ht=void 0,Qe&&G?ze($e):(G=gt=void 0,xt)}function Ue(){Ht!==void 0&&clearTimeout(Ht),ye=0,G=Jt=gt=Ht=void 0}function Tt(){return Ht===void 0?xt:Un(ya())}function nn(){var $e=ya(),Oe=Ln($e);if(G=arguments,gt=this,Jt=$e,Oe){if(Ht===void 0)return dn(Jt);if(ke)return clearTimeout(Ht),Ht=setTimeout(mn,f),ze(Jt)}return Ht===void 0&&(Ht=setTimeout(mn,f)),xt}return nn.cancel=Ue,nn.flush=Tt,nn}const Df=Object.freeze(Object.defineProperty({__proto__:null,default:Sf},Symbol.toStringTag,{value:"Module"})),If=oi(Df);function Ku(s){return function(f){return s?.[f]}}var Af={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},jf=Ku(Af);function Us(s,f){for(var O=-1,G=s==null?0:s.length,gt=Array(G);++O<G;)gt[O]=f(s[O],O,s);return gt}var kr=Array.isArray,_u=Oi?Oi.prototype:void 0,mu=_u?_u.toString:void 0;function Hu(s){if(typeof s=="string")return s;if(kr(s))return Us(s,Hu)+"";if(Xo(s))return mu?mu.call(s):"";var f=s+"";return f=="0"&&1/s==-1/0?"-0":f}function zs(s){return s==null?"":Hu(s)}var Gu=/[&<>"']/g,Tf=RegExp(Gu.source);function Rf(s){return s=zs(s),s&&Tf.test(s)?s.replace(Gu,jf):s}const xf=Object.freeze(Object.defineProperty({__proto__:null,default:Rf},Symbol.toStringTag,{value:"Module"})),Mf=oi(xf);var Lf="[object Date]";function Uf(s){return Li(s)&&Gi(s)==Lf}function Ra(s){return function(f){return s(f)}}var Ju=typeof exports=="object"&&exports&&!exports.nodeType&&exports,ws=Ju&&typeof module=="object"&&module&&!module.nodeType&&module,Wf=ws&&ws.exports===Ju,ba=Wf&&Vu.process,Fs=(function(){try{var s=ws&&ws.require&&ws.require("util").types;return s||ba&&ba.binding&&ba.binding("util")}catch{}})(),yu=Fs&&Fs.isDate,Bf=yu?Ra(yu):Uf;const kf=Object.freeze(Object.defineProperty({__proto__:null,default:Bf},Symbol.toStringTag,{value:"Module"})),Ff=oi(kf);var Nf=Object.prototype;function Ks(s){var f=s&&s.constructor,O=typeof f=="function"&&f.prototype||Nf;return s===O}function Qu(s,f){return function(O){return s(f(O))}}var $f=Qu(Object.keys,Object),Vf=Object.prototype,zf=Vf.hasOwnProperty;function Yu(s){if(!Ks(s))return $f(s);var f=[];for(var O in Object(s))zf.call(s,O)&&O!="constructor"&&f.push(O);return f}var Kf="[object AsyncFunction]",Hf="[object Function]",Gf="[object GeneratorFunction]",Jf="[object Proxy]";function xa(s){if(!pi(s))return!1;var f=Gi(s);return f==Hf||f==Gf||f==Kf||f==Jf}var Pa=vi["__core-js_shared__"],bu=(function(){var s=/[^.]+$/.exec(Pa&&Pa.keys&&Pa.keys.IE_PROTO||"");return s?"Symbol(src)_1."+s:""})();function Qf(s){return!!bu&&bu in s}var Yf=Function.prototype,Zf=Yf.toString;function mo(s){if(s!=null){try{return Zf.call(s)}catch{}try{return s+""}catch{}}return""}var Xf=/[\\^$.*+?()[\]{}|]/g,qf=/^\[object .+?Constructor\]$/,th=Function.prototype,eh=Object.prototype,nh=th.toString,rh=eh.hasOwnProperty,ih=RegExp("^"+nh.call(rh).replace(Xf,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function oh(s){if(!pi(s)||Qf(s))return!1;var f=xa(s)?ih:qf;return f.test(mo(s))}function sh(s,f){return s?.[f]}function yo(s,f){var O=sh(s,f);return oh(O)?O:void 0}var Oa=yo(vi,"DataView"),Os=yo(vi,"Map"),Ca=yo(vi,"Promise"),Ea=yo(vi,"Set"),Sa=yo(vi,"WeakMap"),Pu="[object Map]",ah="[object Object]",wu="[object Promise]",Ou="[object Set]",Cu="[object WeakMap]",Eu="[object DataView]",uh=mo(Oa),ch=mo(Os),lh=mo(Ca),dh=mo(Ea),fh=mo(Sa),Mi=Gi;(Oa&&Mi(new Oa(new ArrayBuffer(1)))!=Eu||Os&&Mi(new Os)!=Pu||Ca&&Mi(Ca.resolve())!=wu||Ea&&Mi(new Ea)!=Ou||Sa&&Mi(new Sa)!=Cu)&&(Mi=function(s){var f=Gi(s),O=f==ah?s.constructor:void 0,G=O?mo(O):"";if(G)switch(G){case uh:return Eu;case ch:return Pu;case lh:return wu;case dh:return Ou;case fh:return Cu}return f});var hh="[object Arguments]";function Su(s){return Li(s)&&Gi(s)==hh}var Zu=Object.prototype,ph=Zu.hasOwnProperty,vh=Zu.propertyIsEnumerable,qo=Su((function(){return arguments}
vendor: 8,992 bytes, line 1
1)())?Su:function(s){return Li(s)&&ph.call(s,"callee")&&!vh.call(s,"callee")},gh=9007199254740991;function Ma(s){return typeof s=="number"&&s>-1&&s%1==0&&s<=gh}function bo(s){return s!=null&&Ma(s.length)&&!xa(s)}function _h(){return!1}var Xu=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Du=Xu&&typeof module=="object"&&module&&!module.nodeType&&module,mh=Du&&Du.exports===Xu,Iu=mh?vi.Buffer:void 0,yh=Iu?Iu.isBuffer:void 0,Cs=yh||_h,bh="[object Arguments]",Ph="[object Array]",wh="[object Boolean]",Oh="[object Date]",Ch="[object Error]",Eh="[object Function]",Sh="[object Map]",Dh="[object Number]",Ih="[object Object]",Ah="[object RegExp]",jh="[object Set]",Th="[object String]",Rh="[object WeakMap]",xh="[object ArrayBuffer]",Mh="[object DataView]",Lh="[object Float32Array]",Uh="[object Float64Array]",Wh="[object Int8Array]",Bh="[object Int16Array]",kh="[object Int32Array]",Fh="[object Uint8Array]",Nh="[object Uint8ClampedArray]",$h="[object Uint16Array]",Vh="[object Uint32Array]",Sn={};Sn[Lh]=Sn[Uh]=Sn[Wh]=Sn[Bh]=Sn[kh]=Sn[Fh]=Sn[Nh]=Sn[$h]=Sn[Vh]=!0;Sn[bh]=Sn[Ph]=Sn[xh]=Sn[wh]=Sn[Mh]=Sn[Oh]=Sn[Ch]=Sn[Eh]=Sn[Sh]=Sn[Dh]=Sn[Ih]=Sn[Ah]=Sn[jh]=Sn[Th]=Sn[Rh]=!1;function zh(s){return Li(s)&&Ma(s.length)&&!!Sn[Gi(s)]}var Au=Fs&&Fs.isTypedArray,Hs=Au?Ra(Au):zh,Kh="[object Map]",Hh="[object Set]",Gh=Object.prototype,Jh=Gh.hasOwnProperty;function Qh(s){if(s==null)return!0;if(bo(s)&&(kr(s)||typeof s=="string"||typeof s.splice=="function"||Cs(s)||Hs(s)||qo(s)))return!s.length;var f=Mi(s);if(f==Kh||f==Hh)return!s.size;if(Ks(s))return!Yu(s).length;for(var O in s)if(Jh.call(s,O))return!1;return!0}const Yh=Object.freeze(Object.defineProperty({__proto__:null,default:Qh},Symbol.toStringTag,{value:"Module"})),Zh=oi(Yh);function Xh(){this.__data__=[],this.size=0}function Ss(s,f){return s===f||s!==s&&f!==f}function Gs(s,f){for(var O=s.length;O--;)if(Ss(s[O][0],f))return O;return-1}var qh=Array.prototype,tp=qh.splice;function ep(s){var f=this.__data__,O=Gs(f,s);if(O<0)return!1;var G=f.length-1;return O==G?f.pop():tp.call(f,O,1),--this.size,!0}function np(s){var f=this.__data__,O=Gs(f,s);return O<0?void 0:f[O][1]}function rp(s){return Gs(this.__data__,s)>-1}function ip(s,f){var O=this.__data__,G=Gs(O,s);return G<0?(++this.size,O.push([s,f])):O[G][1]=f,this}function Ui(s){var f=-1,O=s==null?0:s.length;for(this.clear();++f<O;){var G=s[f];this.set(G[0],G[1])}}Ui.prototype.clear=Xh;Ui.prototype.delete=ep;Ui.prototype.get=np;Ui.prototype.has=rp;Ui.prototype.set=ip;function op(){this.__data__=new Ui,this.size=0}function sp(s){var f=this.__data__,O=f.delete(s);return this.size=f.size,O}function ap(s){return this.__data__.get(s)}function up(s){return this.__data__.has(s)}var Es=yo(Object,"create");function cp(){this.__data__=Es?Es(null):{},this.size=0}function lp(s){var f=this.has(s)&&delete this.__data__[s];return this.size-=f?1:0,f}var dp="__lodash_hash_undefined__",fp=Object.prototype,hp=fp.hasOwnProperty;function pp(s){var f=this.__data__;if(Es){var O=f[s];return O===dp?void 0:O}return hp.call(f,s)?f[s]:void 0}var vp=Object.prototype,gp=vp.hasOwnProperty;function _p(s){var f=this.__data__;return Es?f[s]!==void 0:gp.call(f,s)}var mp="__lodash_hash_undefined__";function yp(s,f){var O=this.__data__;return this.size+=this.has(s)?0:1,O[s]=Es&&f===void 0?mp:f,this}function _o(s){var f=-1,O=s==null?0:s.length;for(this.clear();++f<O;){var G=s[f];this.set(G[0],G[1])}}_o.prototype.clear=cp;_o.prototype.delete=lp;_o.prototype.get=pp;_o.prototype.has=_p;_o.prototype.set=yp;function bp(){this.size=0,this.__data__={hash:new _o,map:new(Os||Ui),string:new _o}}function Pp(s){var f=typeof s;return f=="string"||f=="number"||f=="symbol"||f=="boolean"?s!=="__proto__":s===null}function Js(s,f){var O=s.__data__;return Pp(f)?O[typeof f=="string"?"string":"hash"]:O.map}function wp(s){var f=Js(this,s).delete(s);return this.size-=f?1:0,f}function Op(s){return Js(this,s).get(s)}function Cp(s){return Js(this,s).has(s)}function Ep(s,f){var O=Js(this,s),G=O.size;return O.set(s,f),this.size+=O.size==G?0:1,this}function Wi(s){var f=-1,O=s==null?0:s.length;for(this.clear();++f<O;){var G=s[f];this.set(G[0],G[1])}}Wi.prototype.clear=bp;Wi.prototype.delete=wp;Wi.prototype.get=Op;Wi.prototype.has=Cp;Wi.prototype.set=Ep;var Sp=200;function Dp(s,f){var O=this.__data__;if(O instanceof Ui){var G=O.__data__;if(!Os||G.length<Sp-1)return G.push([s,f]),this.size=++O.size,this;O=this.__data__=new Wi(G)}return O.set(s,f),this.size=O.size,this}function wi(s){var f=this.__data__=new Ui(s);this.size=f.size}wi.prototype.clear=op;wi.prototype.delete=sp;wi.prototype.get=ap;wi.prototype.has=up;wi.prototype.set=Dp;var Ip="__lodash_hash_undefined__";function Ap(s){return this.__data__.set(s,Ip),this}function jp(s){return this.__data__.has(s)}function Ns(s){var f=-1,O=s==null?0:s.length;for(this.__data__=new Wi;++f<O;)this.add(s[f])}Ns.prototype.add=Ns.prototype.push=Ap;Ns.prototype.has=jp;function Tp(s,f){for(var O=-1,G=s==null?0:s.length;++O<G;)if(f(s[O],O,s))return!0;return!1}function Rp(s,f){return s.has(f)}var xp=1,Mp=2;function qu(s,f,O,G,gt,mt){var xt=O&xp,Ht=s.length,Jt=f.length;if(Ht!=Jt&&!(xt&&Jt>Ht))return!1;var ye=mt.get(s),Ee=mt.get(f);if(ye&&Ee)return ye==f&&Ee==s;var ke=-1,Qe=!0,ze=O&Mp?new Ns:void 0;for(mt.set(s,f),mt.set(f,s);++ke<Ht;){var dn=s[ke],Dn=f[ke];if(G)var Ln=xt?G(Dn,dn,ke,f,s,mt):G(dn,Dn,ke,s,f,mt);if(Ln!==void 0){if(Ln)continue;Qe=!1;break}if(ze){if(!Tp(f,function(mn,Un){if(!Rp(ze,Un)&&(dn===mn||gt(dn,mn,O,G,mt)))return ze.push(Un)})){Qe=!1;break}}else if(!(dn===Dn||gt(dn,Dn,O,G,mt))){Qe=!1;break}}return mt.delete(s),mt.delete(f),Qe}var $s=vi.Uint8Array;function Lp(s){var f=-1,O=Array(s.size);return s.forEach(function(G,gt){O[++f]=[gt,G]}),O}function Up(s){var f=-1,O=Array(s.size);return s.forEach(function(G){O[++f]=G}),O}var Wp=1,Bp=2,kp="[object Boolean]",Fp="[object Date]",Np="[object Error]",$p="[object Map]",Vp="[object Number]",zp="[object RegExp]",Kp="[object Set]",Hp="[object String]",Gp="[object Symbol]",Jp="[object ArrayBuffer]",Qp="[object DataView]",ju=Oi?Oi.prototype:void 0,wa=ju?ju.valueOf:void 0;function Yp(s,f,O,G,gt,mt,xt){switch(O){case Qp:if(s.byteLength!=f.byteLength||s.byteOffset!=f.byteOffset)return!1;s=s.buffer,f=f.buffer;case Jp:return!(s.byteLength!=f.byteLength||!mt(new $s(s),new $s(f)));case kp:case Fp:case Vp:return Ss(+s,+f);case Np:return s.name==f.name&&s.message==f.message;case zp:case Hp:return s==f+"";case $p:var Ht=Lp;case Kp:var Jt=G&Wp;if(Ht||(Ht=Up),s.size!=f.size&&!Jt)return!1;var ye=xt.get(s);if(ye)return ye==f;G|=Bp,xt.set(s,f);var Ee=qu(Ht(s),Ht(f),G,gt,mt,xt);return xt.delete(s),Ee;case Gp:if(wa)return wa.call(s)==wa.call(f)}return!1}function tc(s,f){for(var O=-1,G=f.length,gt=s.length;++O<G;)s[gt+O]=f[O];return s}function Zp(s,f,O){var G=f(s);return kr(s)?G:tc(G,O(s))}function Xp(s,f){for(var O=-1,G=s==null?0:s.length,gt=0,mt=[];++O<G;){var xt=s[O];f(xt,O,s)&&(mt[gt++]=xt)}return mt}function qp(){return[]}var tv=Object.prototype,ev=tv.propertyIsEnumerable,Tu=Object.getOwnPropertySymbols,nv=Tu?function(s){return s==null?[]:(s=Object(s),Xp(Tu(s),function(f){return ev.call(s,f)}))}:qp;function rv(s,f){for(var O=-1,G=Array(s);++O<s;)G[O]=f(O);return G}var iv=9007199254740991,ov=/^(?:0|[1-9]\d*)$/;function La(s,f){var O=typeof s;return f=f??iv,!!f&&(O=="number"||O!="symbol"&&ov.test(s))&&s>-1&&s%1==0&&s<f}var sv=Object.prototype,av=sv.hasOwnProperty;function ec(s,f){var O=kr(s),G=!O&&qo(s),gt=!O&&!G&&Cs(s),mt=!O&&!G&&!gt&&Hs(s),xt=O||G||gt||mt,Ht=xt?rv(s.length,String):[],Jt=Ht.length;for(var ye in s)(f||av.call(s,ye))&&!(xt&&(ye=="length"||gt&&(ye=="offset"||ye=="parent")||mt&&(ye=="buffer"||ye=="byteLength"||ye=="byteOffset")||La(ye,Jt)))&&Ht.push(ye);return Ht}function Ua(s){return bo(s)?ec(s):Yu(s)}function Ru(s){return Zp(s,Ua,nv)}var uv=1,cv=Object.prototype,lv=cv.hasOwnProperty;function dv(s,f,O,G,gt,mt){var xt=O&uv,Ht=Ru(s),Jt=Ht.length,ye=Ru(f),Ee=ye.length;if(Jt!=Ee&&!xt)return!1;for(var ke=Jt;ke--;){var Qe=Ht[ke];if(!(xt?Qe in f:lv.call(f,Qe)))return!1}var ze=mt.get(s),dn=mt.get(f);if(ze&&dn)return ze==f&&dn==s;var Dn=!0;mt.set(s,f),mt.set(f,s);for(var Ln=xt;++ke<Jt;){Qe=Ht[ke];var mn=s[Qe],Un=f[Qe];if(G)var Ue=xt?G(Un,mn,Qe,f,s,mt):G(mn,Un,Qe,s,f,mt);if(!(Ue===void 0?mn===Un||gt(mn,Un,O,G,mt):Ue)){Dn=!1;break}Ln||(Ln=Qe=="constructor")}if(Dn&&!Ln){var Tt=s.constructor,nn=f.constructor;Tt!=nn&&"constructor"in s&&"constructor"in f&&!(typeof Tt=="function"&&Tt instanceof Tt&&typeof nn=="function"&&nn instanceof nn)&&(Dn=!1)}return mt.delete(s),mt.delete(f),Dn}var fv=1,xu="[object Arguments]",Mu="[object Array]",Ls="[object Object]",hv=Object.prototype,Lu=hv.hasOwnProperty;function pv(s,f,O,G,gt,mt){var xt=kr(s),Ht=kr(f),Jt=xt?Mu:Mi(s),ye=Ht?Mu:Mi(f);Jt=Jt==xu?Ls:Jt,ye=ye==xu?Ls:ye;var Ee=Jt==Ls,ke=ye==Ls,Qe=Jt==ye;if(Qe&&Cs(s)){if(!Cs(f))return!1;xt=!0,Ee=!1}if(Qe&&!Ee)return mt||(mt=new wi),xt||Hs(s)?qu(s,f,O,G,gt,mt):Yp(s,f,Jt,O,G,gt,mt);if(!(O&fv)){var ze=Ee&&Lu.call(s,"__wrapped__"),dn=ke&&Lu.call(f,"__wrapped__");
1if(ze||dn){var Dn=ze?s.value():s,Ln=dn?f.value():f;return mt||(mt=new wi),gt(Dn,Ln,O,G,mt)}}return Qe?(mt||(mt=new wi),dv(s,f,O,G,gt,mt)):!1}function Qs(s,f,O,G,gt){return s===f?!0:s==null||f==null||!Li(s)&&!Li(f)?s!==s&&f!==f:pv(s,f,O,G,Qs,gt)}function vv(s,f){return Qs(s,f)}const gv=Object.freeze(Object.defineProperty({__proto__:null,default:vv},Symbol.toStringTag,{value:"Module"})),_v=oi(gv);var Vs=(function(){try{var s=yo(Object,"defineProperty");return s({},"",{}),s}catch{}})();function Ys(s,f,O){f=="__proto__"&&Vs?Vs(s,f,{configurable:!0,enumerable:!0,value:O,writable:!0}):s[f]=O}function mv(s){return function(f,O,G){for(var gt=-1,mt=Object(f),xt=G(f),Ht=xt.length;Ht--;){var Jt=xt[++gt];if(O(mt[Jt],Jt,mt)===!1)break}return f}}var nc=mv();function rc(s,f){return s&&nc(s,f,Ua)}var yv=1,bv=2;function Pv(s,f,O,G){var gt=O.length,mt=gt;if(s==null)return!mt;for(s=Object(s);gt--;){var xt=O[gt];if(xt[2]?xt[1]!==s[xt[0]]:!(xt[0]in s))return!1}for(;++gt<mt;){xt=O[gt];var Ht=xt[0],Jt=s[Ht],ye=xt[1];if(xt[2]){if(Jt===void 0&&!(Ht in s))return!1}else{var Ee=new wi,ke;if(!(ke===void 0?Qs(ye,Jt,yv|bv,G,Ee):ke))return!1}}return!0}function ic(s){return s===s&&!pi(s)}function wv(s){for(var f=Ua(s),O=f.length;O--;){var G=f[O],gt=s[G];f[O]=[G,gt,ic(gt)]}return f}function oc(s,f){return function(O){return O==null?!1:O[s]===f&&(f!==void 0||s in Object(O))}}function Ov(s){var f=wv(s);return f.length==1&&f[0][2]?oc(f[0][0],f[0][1]):function(O){return O===s||Pv(O,s,f)}}var Cv=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Ev=/^\w*$/;function Wa(s,f){if(kr(s))return!1;var O=typeof s;return O=="number"||O=="symbol"||O=="boolean"||s==null||Xo(s)?!0:Ev.test(s)||!Cv.test(s)||f!=null&&s in Object(f)}var Sv="Expected a function";function Zs(s,f){if(typeof s!="function"||f!=null&&typeof f!="function")throw new TypeError(Sv);var O=function(){var G=arguments,gt=f?f.apply(this,G):G[0],mt=O.cache;if(mt.has(gt))return mt.get(gt);var xt=s.apply(this,G);return O.cache=mt.set(gt,xt)||mt,xt};return O.cache=new(Zs.Cache||Wi),O}Zs.Cache=Wi;const Dv=Object.freeze(Object.defineProperty({__proto__:null,default:Zs},Symbol.toStringTag,{value:"Module"}));var Iv=500;function Av(s){var f=Zs(s,function(G){return O.size===Iv&&O.clear(),G}),O=f.cache;return f}var jv=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Tv=/\\(\\)?/g,Rv=Av(function(s){var f=[];return s.charCodeAt(0)===46&&f.push(""),s.replace(jv,function(O,G,gt,mt){f.push(gt?mt.replace(Tv,"$1"):G||O)}),f});function sc(s,f){return kr(s)?s:Wa(s,f)?[s]:Rv(zs(s))}function Xs(s){if(typeof s=="string"||Xo(s))return s;var f=s+"";return f=="0"&&1/s==-1/0?"-0":f}function Ba(s,f){f=sc(f,s);for(var O=0,G=f.length;s!=null&&O<G;)s=s[Xs(f[O++])];return O&&O==G?s:void 0}function xv(s,f,O){var G=s==null?void 0:Ba(s,f);return G===void 0?O:G}function Mv(s,f){return s!=null&&f in Object(s)}function Lv(s,f,O){f=sc(f,s);for(var G=-1,gt=f.length,mt=!1;++G<gt;){var xt=Xs(f[G]);if(!(mt=s!=null&&O(s,xt)))break;s=s[xt]}return mt||++G!=gt?mt:(gt=s==null?0:s.length,!!gt&&Ma(gt)&&La(xt,gt)&&(kr(s)||qo(s)))}function Uv(s,f){return s!=null&&Lv(s,f,Mv)}var Wv=1,Bv=2;function kv(s,f){return Wa(s)&&ic(f)?oc(Xs(s),f):function(O){var G=xv(O,s);return G===void 0&&G===f?Uv(O,s):Qs(f,G,Wv|Bv)}}function qs(s){return s}function Fv(s){return function(f){return f?.[s]}}function Nv(s){return function(f){return Ba(f,s)}}function $v(s){return Wa(s)?Fv(Xs(s)):Nv(s)}function ac(s){return typeof s=="function"?s:s==null?qs:typeof s=="object"?kr(s)?kv(s[0],s[1]):Ov(s):$v(s)}function Vv(s,f){var O={};return f=ac(f),rc(s,function(G,gt,mt){Ys(O,gt,f(G,gt,mt))}),O}const zv=Object.freeze(Object.defineProperty({__proto__:null,default:Vv},Symbol.toStringTag,{value:"Module"})),Kv=oi(zv),Hv=oi(Dv);function Da(s,f,O){(O!==void 0&&!Ss(s[f],O)||O===void 0&&!(f in s))&&Ys(s,f,O)}var uc=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Uu=uc&&typeof module=="object"&&module&&!module.nodeType&&module,Gv=Uu&&Uu.exports===uc,Wu=Gv?vi.Buffer:void 0;Wu&&Wu.allocUnsafe;function Jv(s,f){return s.slice()}function Qv(s){var f=new s.constructor(s.byteLength);return new $s(f).set(new $s(s)),f}function Yv(s,f){var O=Qv(s.buffer);return new s.constructor(O,s.byteOffset,s.length)}function Zv(s,f){var O=-1,G=s.length;for(f||(f=Array(G));++O<G;)f[O]=s[O];return f}var Bu=Object.create,Xv=(function(){function s(){}return function(f){if(!pi(f))return{};if(Bu)return Bu(f);s.prototype=f;var O=new s;return s.prototype=void 0,O}})(),cc=Qu(Object.getPrototypeOf,Object);function qv(s){return typeof s.constructor=="function"&&!Ks(s)?Xv(cc(s)):{}}function tg(s){return Li(s)&&bo(s)}var eg="[object Object]",ng=Function.prototype,rg=Object.prototype,lc=ng.toString,ig=rg.hasOwnProperty,og=lc.call(Object);function sg(s){if(!Li(s)||Gi(s)!=eg)return!1;var f=cc(s);if(f===null)return!0;var O=ig.call(f,"constructor")&&f.constructor;return typeof O=="function"&&O instanceof O&&lc.call(O)==og}function Ia(s,f){if(!(f==="constructor"&&typeof s[f]=="function")&&f!="__proto__")return s[f]}var ag=Object.prototype,ug=ag.hasOwnProperty;function cg(s,f,O){var G=s[f];(!(ug.call(s,f)&&Ss(G,O))||O===void 0&&!(f in s))&&Ys(s,f,O)}function lg(s,f,O,G){var gt=!O;O||(O={});for(var mt=-1,xt=f.length;++mt<xt;){var Ht=f[mt],Jt=void 0;Jt===void 0&&(Jt=s[Ht]),gt?Ys(O,Ht,Jt):cg(O,Ht,Jt)}return O}function dg(s){var f=[];if(s!=null)for(var O in Object(s))f.push(O);return f}var fg=Object.prototype,hg=fg.hasOwnProperty;function pg(s){if(!pi(s))return dg(s);var f=Ks(s),O=[];for(var G in s)G=="constructor"&&(f||!hg.call(s,G))||O.push(G);return O}function dc(s){return bo(s)?ec(s,!0):pg(s)}function vg(s){return lg(s,dc(s))}function gg(s,f,O,G,gt,mt,xt){var Ht=Ia(s,O),Jt=Ia(f,O),ye=xt.get(Jt);if(ye){Da(s,O,ye);return}var Ee=mt?mt(Ht,Jt,O+"",s,f,xt):void 0,ke=Ee===void 0;if(ke){var Qe=kr(Jt),ze=!Qe&&Cs(Jt),dn=!Qe&&!ze&&Hs(Jt);Ee=Jt,Qe||ze||dn?kr(Ht)?Ee=Ht:tg(Ht)?Ee=Zv(Ht):ze?(ke=!1,Ee=Jv(Jt)):dn?(ke=!1,Ee=Yv(Jt)):Ee=[]:sg(Jt)||qo(Jt)?(Ee=Ht,qo(Ht)?Ee=vg(Ht):(!pi(Ht)||xa(Ht))&&(Ee=qv(Jt))):ke=!1}ke&&(xt.set(Jt,Ee),gt(Ee,Jt,G,mt,xt),xt.delete(Jt)),Da(s,O,Ee)}function fc(s,f,O,G,gt){s!==f&&nc(f,function(mt,xt){if(gt||(gt=new wi),pi(mt))gg(s,f,xt,O,fc,G,gt);else{var Ht=G?G(Ia(s,xt),mt,xt+"",s,f,gt):void 0;Ht===void 0&&(Ht=mt),Da(s,xt,Ht)}},dc)}function _g(s,f,O){switch(O.length){case 0:return s.call(f);case 1:return s.call(f,O[0]);case 2:return s.call(f,O[0],O[1]);case 3:return s.call(f,O[0],O[1],O[2])}return s.apply(f,O)}var ku=Math.max;function mg(s,f,O){return f=ku(f===void 0?s.length-1:f,0),function(){for(var G=arguments,gt=-1,mt=ku(G.length-f,0),xt=Array(mt);++gt<mt;)xt[gt]=G[f+gt];gt=-1;for(var Ht=Array(f+1);++gt<f;)Ht[gt]=G[gt];return Ht[f]=O(xt),_g(s,this,Ht)}}function yg(s){return function(){return s}}var bg=Vs?function(s,f){return Vs(s,"toString",{configurable:!0,enumerable:!1,value:yg(f),writable:!0})}:qs,Pg=800,wg=16,Og=Date.now;function Cg(s){var f=0,O=0;return function(){var G=Og(),gt=wg-(G-O);
1if(O=G,gt>0){if(++f>=Pg)return arguments[0]}else f=0;return s.apply(void 0,arguments)}}var Eg=Cg(bg);function hc(s,f){return Eg(mg(s,f,qs),s+"")}function Aa(s,f,O){if(!pi(O))return!1;var G=typeof f;return(G=="number"?bo(O)&&La(f,O.length):G=="string"&&f in O)?Ss(O[f],s):!1}function Sg(s){return hc(function(f,O){var G=-1,gt=O.length,mt=gt>1?O[gt-1]:void 0,xt=gt>2?O[2]:void 0;for(mt=s.length>3&&typeof mt=="function"?(gt--,mt):void 0,xt&&Aa(O[0],O[1],xt)&&(mt=gt<3?void 0:mt,gt=1),f=Object(f);++G<gt;){var Ht=O[G];Ht&&s(f,Ht,G,mt)}return f})}var Dg=Sg(function(s,f,O){fc(s,f,O)});const Ig=Object.freeze(Object.defineProperty({__proto__:null,default:Dg},Symbol.toStringTag,{value:"Module"})),Ag=oi(Ig);var Fu=Oi?Oi.isConcatSpreadable:void 0;function jg(s){return kr(s)||qo(s)||!!(Fu&&s&&s[Fu])}function Tg(s,f,O,G,gt){var mt=-1,xt=s.length;for(O||(O=jg),gt||(gt=[]);++mt<xt;){var Ht=s[mt];O(Ht)?tc(gt,Ht):gt[gt.length]=Ht}return gt}function Rg(s,f){return function(O,G){if(O==null)return O;if(!bo(O))return s(O,G);for(var gt=O.length,mt=-1,xt=Object(O);++mt<gt&&G(xt[mt],mt,xt)!==!1;);return O}}var xg=Rg(rc);function Mg(s,f){var O=-1,G=bo(s)?Array(s.length):[];return xg(s,function(gt,mt,xt){G[++O]=f(gt,mt,xt)}),G}function Lg(s,f){var O=s.length;for(s.sort(f);O--;)s[O]=s[O].value;return s}function Ug(s,f){if(s!==f){var O=s!==void 0,G=s===null,gt=s===s,mt=Xo(s),xt=f!==void 0,Ht=f===null,Jt=f===f,ye=Xo(f);if(!Ht&&!ye&&!mt&&s>f||mt&&xt&&Jt&&!Ht&&!ye||G&&xt&&Jt||!O&&Jt||!gt)return 1;if(!G&&!mt&&!ye&&s<f||ye&&O&&gt&&!G&&!mt||Ht&&O&&gt||!xt&&gt||!Jt)return-1}return 0}function Wg(s,f,O){for(var G=-1,gt=s.criteria,mt=f.criteria,xt=gt.length,Ht=O.length;++G<xt;){var Jt=Ug(gt[G],mt[G]);if(Jt){if(G>=Ht)return Jt;var ye=O[G];return Jt*(ye=="desc"?-1:1)}}return s.index-f.index}function Bg(s,f,O){f.length?f=Us(f,function(mt){return kr(mt)?function(xt){return Ba(xt,mt.length===1?mt[0]:mt)}:mt}):f=[qs];var G=-1;f=Us(f,Ra(ac));var gt=Mg(s,function(mt,xt,Ht){var Jt=Us(f,function(ye){return ye(mt)});return{criteria:Jt,index:++G,value:mt}});return Lg(gt,function(mt,xt){return Wg(mt,xt,O)})}var kg=hc(function(s,f){if(s==null)return[];var O=f.length;return O>1&&Aa(s,f[0],f[1])?f=[]:O>2&&Aa(f[0],f[1],f[2])&&(f=[f[0]]),Bg(s,Tg(f),[])});const Fg=Object.freeze(Object.defineProperty({__proto__:null,default:kg},Symbol.toStringTag,{value:"Module"})),Ng=oi(Fg);var $g={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"},Vg=Ku($g),pc=/&(?:amp|lt|gt|quot|#39);/g,zg=RegExp(pc.source);function Kg(s){return s=zs(s),s&&zg.test(s)?s.replace(pc,Vg):s}const Hg=Object.freeze(Object.defineProperty({__proto__:null,default:Kg},Symbol.toStringTag,{value:"Module"})),Gg=oi(Hg);function Jg(s,f,O){var G=-1,gt=s.length;f<0&&(f=-f>gt?0:gt+f),O=O>gt?gt:O,O<0&&(O+=gt),gt=f>O?0:O-f>>>0,f>>>=0;for(var mt=Array(gt);++G<gt;)mt[G]=s[G+f];return mt}function Qg(s,f,O){var G=s.length;return O=O===void 0?G:O,!f&&O>=G?s:Jg(s,f,O)}var Yg="\\ud800-\\udfff",Zg="\\u0300-\\u036f",Xg="\\ufe20-\\ufe2f",qg="\\u20d0-\\u20ff",t_=Zg+Xg+qg,e_="\\ufe0e\\ufe0f",n_="\\u200d",r_=RegExp("["+n_+Yg+t_+e_+"]");function vc(s){return r_.test(s)}function i_(s){return s.split("")}var gc="\\ud800-\\udfff",o_="\\u0300-\\u036f",s_="\\ufe20-\\ufe2f",a_="\\u20d0-\\u20ff",u_=o_+s_+a_,c_="\\ufe0e\\ufe0f",l_="["+gc+"]",ja="["+u_+"]",Ta="\\ud83c[\\udffb-\\udfff]",d_="(?:"+ja+"|"+Ta+")",_c="[^"+gc+"]",mc="(?:\\ud83c[\\udde6-\\uddff]){2}",yc="[\\ud800-\\udbff][\\udc00-\\udfff]",f_="\\u200d",bc=d_+"?",Pc="["+c_+"]?",h_="(?:"+f_+"(?:"+[_c,mc,yc].join("|")+")"+Pc+bc+")*",p_=Pc+bc+h_,v_="(?:"+[_c+ja+"?",ja,mc,yc,l_].join("|")+")",g_=RegExp(Ta+"(?="+Ta+")|"+v_+p_,"g");function __(s){return s.match(g_)||[]}function m_(s){return vc(s)?__(s):i_(s)}function y_(s){return function(f){f=zs(f);var O=vc(f)?m_(f):void 0,G=O?O[0]:f.charAt(0),gt=O?Qg(O,1).join(""):f.slice(1);return G[s]()+gt}}var b_=y_("toUpperCase");const P_=Object.freeze(Object.defineProperty({__proto__:null,default:b_},Symbol.toStringTag,{value:"Module"})),w_=oi(P_);var Nu;function D_(){return Nu||(Nu=1,(function(s,f){(function(G,gt){s.exports=gt(Zd(),rf,If,Mf,Ff,Zh,_v,Kv,Hv,Ag,Ng,Gg,w_,Jd(),Qd(),Yd())})(typeof self<"u"?self:_a,(O,G,gt,mt,xt,Ht,Jt,ye,Ee,ke,Qe,ze,dn,Dn,Ln,mn)=>(()=>{var Un={5614(E,C,r){r.d(C,{r:()=>p});var a=r(6687);function p(D){return new URL(D,(0,a.pb)()).href}},9191(E,C,r){r.d(C,{KO:()=>T,Pu:()=>B,Tq:()=>A,zS:()=>S});var a=r(6687),p=(J,dt,ht)=>new Promise((_t,Ot)=>{var R=q=>{try{vt(ht.next(q))}catch(Y){Ot(Y)}},st=q=>{try{vt(ht.throw(q))}catch(Y){Ot(Y)}},vt=q=>q.done?_t(q.value):Promise.resolve(q.value).then(R,st);vt((ht=ht.apply(J,dt)).next())});const D=new a.s9;function A(){return D.get()}function T(){return p(this,null,function*(){yield D.fetch()})}function S(J){D.set(J),r.p=`${J}/`}function B(){r.p="https://example.org/scrivito-internal-error/"}function Z(){D.reset(),B()}(0,a.Nj)(Z)},8058(E,C,r){r.d(C,{E:()=>D,N:()=>A});var a=r(6324);
1const p=(0,a.Ld)();function D(T){p.set(T)}function A(){return p.get()}},3221(E,C,r){r.d(C,{Dn:()=>Ot,fH:()=>_t,vU:()=>R});var a=r(4599),p=r(2183),D=r(7619),A=r(1446),T=r(6687),S=r(6084),B=r(5436),Z=r(687),J=r(6324),dt=(H,I,at)=>new Promise((Q,V)=>{var tt=Zt=>{try{kt(at.next(Zt))}catch(se){V(se)}},Et=Zt=>{try{kt(at.throw(Zt))}catch(se){V(se)}},kt=Zt=>Zt.done?Q(Zt.value):Promise.resolve(Zt.value).then(tt,Et);kt((at=at.apply(H,I)).next())});let ht=0;function _t(){return ht++,ht}function Ot(H){return ht===H}function R(H){return dt(this,arguments,function*(I,at=_t()){(0,J.q2)("basicNavigateTo");const Q=yield(0,S.Hh)(()=>st(I));if(Ot(at))switch(Q.type){case"remote":(0,p.Uc)(Q.url);break;case"local":vt(Q.resource);break;case"crossSite":(0,T.dT)(Q.url);break;case"unavailable":(0,T.vV)(`Could not navigate to Obj ${Q.objId}, no URL found`)}})}function st(H){if(q(H))return Y(H.url);const{objId:I,query:at,hash:Q}=H,V=B.kI.get(I);if(!V)return(0,A.yW)({objId:I,query:at,hash:Q});if((0,Z.Xg)(V)){const tt=V.blob();return tt?{type:"remote",url:tt.url()}:(0,D.c)({objId:I})}return(0,A.uT)({obj:V,query:at,hash:Q})}function vt(H){const I=a.Jt();H===I?a.HC(H):a.VC(H)}function q(H){return!!H.url}function Y(H){return URL.canParse(H)?(0,A.Im)(H)?(0,A.zX)(H)?{type:"local",resource:(0,T.B6)(new URL(H))}:{type:"crossSite",url:H}:{type:"remote",url:H}:{type:"local",resource:H}}},8549(E,C,r){r.d(C,{P:()=>ht,a:()=>_t});var a=r(1446),p=r(6687),D=r(5436),A=r(687),T=Object.defineProperty,S=Object.getOwnPropertySymbols,B=Object.prototype.hasOwnProperty,Z=Object.prototype.propertyIsEnumerable,J=(q,Y,H)=>Y in q?T(q,Y,{enumerable:!0,configurable:!0,writable:!0,value:H}):q[Y]=H,dt=(q,Y)=>{for(var H in Y||(Y={}))B.call(Y,H)&&J(q,H,Y[H]);if(S)for(var H of S(Y))Z.call(Y,H)&&J(q,H,Y[H]);return q};function ht(q,Y){return q instanceof D.Re?R(q,Y):q instanceof D.yI?q.url():_t(q,Y)}function _t(q,Y){if((0,A.Xg)(q)){const H=Ot(q,Y.preserveObjId);if(H)return H}return st(q,Y)}function Ot(q,Y){const H=q.blob();if(H)return Y?H.urlWithoutPlaceholder():H.url()}function R(q,Y){if(q.isExternal())return q.url();const H=q.obj();if(H instanceof D.kI)return _t(H,vt(Y,q));throw new p.c1("Missing link target.")}function st(q,{query:Y,queryParameters:H,withoutOriginIfLocal:I,hash:at}){const Q=H??Y;if(!I)return(0,a.xu)({obj:q,query:Q,hash:at});const V=(0,a.uT)({obj:q,query:Q,hash:at});switch(V.type){case"local":return V.resource;case"crossSite":return V.url;default:return V.fallbackUrl}}function vt(q,Y){const H=dt({},q);return!q.queryParameters&&typeof q.query!="string"&&(H.query=Y.query()||void 0),typeof q.hash!="string"&&(H.hash=Y.hash()||void 0),H}},4599(E,C,r){r.d(C,{GL:()=>Z,HC:()=>_t,Jt:()=>J,VC:()=>ht,W6:()=>B,lQ:()=>dt,zE:()=>R});var a=r(9226),p=r(6687),D=r(6324);let A,T,S;function B(V){if(V.createHref({pathname:"/"})!=="/")throw new p.c1(`Expected a history without a preconfigured basename. For further details, see: ${(0,p.yJ)("js-sdk/useHistory")}`);if(V===A)return;const tt=!A;H(V),A=V,tt||I()}function Z(){return{historyChangesCount:dt(),location:J(),isRevisit:S==="POP"}}function J(){return(0,p.B6)(Y().location)}function dt(){return at.get()||0}function ht(V){Y().push(Ot(V))}function _t(V){Y().replace(Ot(V))}function Ot(V){const tt=new URL(J(),"http://example.com"),{pathname:Et,search:kt,hash:Zt}=new URL(V,tt);return{pathname:Et,search:kt,hash:Zt}}function R(V){return V.historyChangesCount===dt()}function st(){A=void 0,S=void 0,T=void 0,at.clear()}function vt(){return(0,a.createBrowserHistory)()}function q(){A||B(vt())}function Y(){return q(),A}function H(V){T&&T(),Q(V)?T=V.listen((tt,Et)=>{I(Et)}):T=V.listen(({action:tt})=>{I(tt)})}function I(V){S=V,at.set(dt()+1)}const at=(0,D.Ld)();function Q(V){return V.hasOwnProperty("length")}(0,p.Nj)(st)},9162(E,C,r){r.d(C,{V:()=>B,p:()=>S});var a=r(1391),p=r(6687),D=r(6084),A=r(5436),T=r(687);function S(J){return Z(J),B((0,T.zo)(J).id())}function B(J){const dt=a.B;return dt&&(0,D.qt)(!1,()=>dt.canEdit((0,A.o_)(),J))||!1}function Z(J){(0,A.mD)(J)||(0,p.Ht)("canEdit","'obj' must be an instance of 'Obj'.",{docPermalink:"js-sdk/canEdit"})}},2183(E,C,r){r.d(C,{EV:()=>S,NA:()=>A,Uc:()=>T});var a=r(1391),p=r(6687),D=r(1446);function A(Z){a.B?T(Z):(0,p._0)(Z)}function T(Z){a.B?a.B.navigateToExternalUrl(Z):(0,p.dT)(Z)}function S(Z){a.B&&(0,D.Im)(Z)?a.B.openInNewUiWindow(B(Z)):(0,p.D1)(Z,"_blank")}function B(Z){const J=(0,p.u4)();if(J===void 0)throw new p.Gd;return new URL(Z,J).href}},2469(E,C,r){r.d(C,{jK:()=>re,D0:()=>fe,r$:()=>xe,qu:()=>Se});var a=r(4599),p=r(6687);let D=S();function A(){return{loadId:D,urlPath:new URL((0,p.pb)()).pathname,nav:(0,a.lQ)()}}function T(){return{loadId:D}}function S(){return Math.floor(Math.random()*Number.MAX_SAFE_INTEGER)}(0,p.Nj)(()=>D=S());var B=r(9191),Z=r(7334),J=r(2945),dt=r(5396),ht=r(3225),_t=r(5089),Ot=r(7531),R=r(7558),st=(k,yt,Ct)=>new Promise((te,ae)=>{var _e=Fe=>{try{Je(Ct.next(Fe))}catch(en){ae(en)}},Ge=Fe=>{try{Je(Ct.throw(Fe))}catch(en){ae(en)}},Je=Fe=>Fe.done?te(Fe.value):Promise.resolve(Fe.value).then(_e,Ge);Je((Ct=Ct.apply(k,yt)).next())});function vt(){return st(this,null,function*(){q();const{initializeEditors:k}=yield Y();k()})}function q(){(0,p.qg)(`${(0,B.Tq)()}/scrivito_editing.css`,(0,p.YE)())}function Y(){return r.e(723).then(r.bind(r,7363))}var H=r(8895),I=r(8001),at=r(1624),Q=r(1446),V=r(5597),tt=r(1391),Et=r(6875),kt=r(1522),Zt=r(9421),se=r(9180),ve=r(1871),ue=r(6084),St=r(5436),Kt=r(687),zt=r(6693),de=(k,yt,Ct)=>new Promise((te,ae)=>{var _e=Fe=>{try{Je(Ct.next(Fe))}catch(en){ae(en)}},Ge=Fe=>{try{Je(Ct.throw(Fe))}catch(en){ae(en)}},Je=Fe=>Fe.done?te(Fe.value):Promise.resolve(Fe.value).then(_e,Ge);Je((Ct=Ct.apply(k,yt)).next())});let Ut=new p.cY,Vt;function re(k){var yt;je(k);const Ct=ut(k);Ve(k);const te=k.unstable,ae=te?.getSiteIdForObj;ae&&(0,Et.Y7)(ae);const _e=xe(k);if(_e===se.hQ)(0,se.mG)(),(0,Kt.kI)(()=>se.hQ),(0,se.k0)();
1else{(0,p.rK)(_e),(0,I.HF)()&&(0,H.BL)(),(0,B.zS)((yt=te?.assetUrlBase)!=null?yt:(0,p.IH)()),Zt.yO.set({iamAuthLocation:Ke(k.iamAuthLocation),iamTokenFetcher:(0,ht.iM)(),loginHandler:(0,ht.aO)()});const Ge=k.treatLocalhostLike;Ge&&(0,V.X)(Ge),tt.B?Pt(_e,tt.B):et(k)}(0,Q.VJ)(Ct),wt(k),k.responsiveBreakpoints&&(0,at.$)(k.responsiveBreakpoints),k.contentTagsForEmptyAttributes===!1&&(0,Z.l)(),k.strictSearchOperators&&(0,Kt.w5)(),k.activateDataIntegration&&(0,ve.Ey)(),(0,St.F1)(!!k.autoConvertAttributes),(0,Ot.T)(k.editorLanguage||null),(0,_t.s)(k.extensionsUrl||void 0),te?.enforceBoundedQueries&&(0,St.gy)(),te?.initialContentDumpUrl&&(0,R.d)(te.initialContentDumpUrl)}function fe(){return Ut.promise}function Se(){return Vt}function Ve(k){if(!Ut.isPending())throw new p.aS("Scrivito.configure has already been called.");Vt=k,Ut.resolve(k)}function Ye(){Ut=new p.cY,Vt=void 0,Zt.yO.reset()}function je(k){k&&typeof k=="object"&&xe(k)||Dt("The param 'tenant' or 'instanceId' is required."),k.apiKey&&(0,I.HF)()&&Dt("The option 'apiKey' is only available under Node.js."),k.origin&&!$(k.origin)&&Dt("The option 'origin' is must be a valid origin string."),k.adoptUi&&!(typeof k.adoptUi=="boolean"||$(k.adoptUi))&&Dt("The option 'adoptUi' is must be an origin string.")}function Dt(k){(0,p.Ht)("configure",k,{docPermalink:"js-sdk/configure"})}function $(k){try{return new URL(k).origin===k}catch{return!1}}function Pt(k,yt){yt.configureTenant({tenant:k}),(0,Et.DZ)()&&qt(),Ft(yt),vt()}function et({endpoint:k,optimizedWidgetLoading:yt,visitorAuthentication:Ct,priority:te,apiKey:ae}){yt&&(0,se.D9)(!0),it({endpoint:k,visitorAuthentication:Ct,priority:te,apiKey:ae})}function it({endpoint:k,visitorAuthentication:yt,priority:Ct,apiKey:te}){const ae=k||"api.scrivito.com";Zt.gd.init({apiBaseUrl:ae.startsWith("http")?ae:`https://${ae}`,authorizationProvider:z(te,yt),analyticsProvider:(0,I.HF)()?A:T,priority:Ct})}function z(k,yt){return I.y6&&k?new I.y6.ApiKeyAuthorizationProvider(k):(0,I.HF)()&&(0,ht.x3)()?(0,Zt.R)({audience:"https://api.justrelate.com"}):(0,kt.mR)(yt)}function ut({homepage:k,origin:yt,routingBasePath:Ct,baseUrlForSite:te,siteForUrl:ae}){const _e=k?()=>(0,Kt.zo)(k()):()=>(0,St.Mp)((0,J.p)().and((0,St.rs)("default")));return te&&ae?((Ct||yt)&&Dt(`The '${Ct?"routingBasePath":"origin"}' cannot be combined with the "baseUrlForSite" option`),{homepageCallback:_e,baseUrlForSite:te,siteForUrl:ae}):((te||ae)&&Dt(`Unexpected value for argument 'configuration': a value for '${ae?"baseUrlForSite":"siteForUrl"}' is required if '${ae?"siteForUrl":"baseUrlForSite"}' is present.`),yt!==void 0&&!$(yt)&&Dt(`Unexpected value: '${yt}' is not a valid origin.`),{homepageCallback:_e,origin:yt,routingBasePath:Ct})}function wt(k){const yt=k.constraintsValidation;yt&&(0,zt.L)(yt)}function Ft(k){return de(this,null,function*(){const{startAppAdapter:yt}=yield bt(),Ct=yt();k.setAppAdapter(Ct)})}function bt(){return r.e(723).then(r.bind(r,7440))}function qt(){return de(this,null,function*(){const k=(0,p.wg)(()=>de(null,null,function*(){(yield(0,ue.Hh)(dt.OI))==="default"&&(0,p.vV)("Warning: No site ID was selected within 30 seconds. In the multi-site mode a site ID must be selected before Scrivito can render content. Forgot to use Scrivito.unstable_selectSiteId?")}),3e4);yield(0,ue.Hh)(Et.MT),clearTimeout(k)})}function Ke(k){if(typeof k=="string")return k;const yt=(0,p.u4)();return yt?`${yt}/auth`:void 0}function xe(k){return"tenant"in k&&typeof k.tenant=="string"?k.tenant:k.instanceId}(0,p.Nj)(Ye)},5968(E,C,r){r.d(C,{_:()=>Ot,w:()=>R});var a=r(7885),p=r.n(a),D=r(5614),A=r(1391),T=r(1702),S=r(6687),B=Object.getOwnPropertySymbols,Z=Object.prototype.hasOwnProperty,J=Object.prototype.propertyIsEnumerable,dt=(q,Y)=>{var H={};for(var I in q)Z.call(q,I)&&Y.indexOf(I)<0&&(H[I]=q[I]);if(q!=null&&B)for(var I of B(q))Y.indexOf(I)<0&&J.call(q,I)&&(H[I]=q[I]);return H};let ht,_t;function Ot(q){if(_t){const Y={};q&&(Y._validObjClasses=q);const H=_t(Y);if(H)return{filters:vt(H)}}else if(ht)return{filters:ht}}function R(q){if(!A.B)return;q.filters&&(st(q.filters)?(_t=q.filters,ht=void 0):(ht=vt(q.filters),_t=void 0));const Y=q.baseFilter;if(Y){const H=Y.query;H&&A.B.configureContentBrowser((0,T.n)({baseQuery:H}))}}function st(q){return typeof q=="function"}function vt(q){return p()(q,Y=>{var H=dt(Y,[]);const{icon:I,options:at}=H,Q=I&&!I.match(/^\w+$/);return I&&(H.icon=Q?(0,D.r)(I):I),at&&(H.options=vt(at)),H})}(0,S.Nj)(()=>{ht=void 0,_t=void 0})},8361(E,C,r){r.d(C,{I:()=>T,p:()=>A});var a=r(6687),p=r(6324);const D=(0,p.Ld)();function A(){return D.get()}function T(B){if(S(B),!B["*/*"])throw new a.c1('No ObjClass has been configured for the contentType "*/*"');
1if(D.get()!==void 0)throw new a.aS("configureObjClassForContentType must be called only once");D.set(B)}function S(B){Object.keys(B).forEach(Z=>{/^(\*\/\*|[^\/\*]+\/(\*|[^\*;]+))$/.test(Z)||(0,a.Ht)("configureObjClassForContentType",`Content type '${Z}' is not valid.`,{docPermalink:"js-sdk/configureObjClassForContentType"})})}},6693(E,C,r){r.d(C,{L:()=>D,v:()=>A});var a=r(6687);let p;function D(T){p=T}function A(){if(p)return p;throw new a.aS('Constraints validation callback is not configured. Forgot to call Scrivito.configure with the "constraintsCallback" option?')}(0,a.Nj)(()=>p=void 0)},7334(E,C,r){r.d(C,{C:()=>A,l:()=>D});var a=r(6324);const p=(0,a.Ld)();function D(){p.set(!1)}function A(){return p.get()===!1}},8457(E,C,r){r.d(C,{T:()=>A,x:()=>D});var a=r(6687);let p;function D(T){p=[...T]}function A(){return p}(0,a.Nj)(()=>{p=void 0})},2945(E,C,r){r.d(C,{p:()=>D});var a=r(1457),p=r(5436);function D(){const A=(0,p.aG)((0,p.eb)());return(0,a.gY)()?A:A.and(p.cb)}},5396(E,C,r){r.d(C,{F2:()=>B,Jm:()=>vt,OI:()=>_t,P$:()=>Z,R3:()=>J,wF:()=>Ot,wj:()=>R});var a=r(671),p=r(6687),D=r(9180),A=r(5436),T=r(687),S=r(6324);function B(){var Y;(0,D.C_)("Scrivito.currentPage");const H=(Y=(0,a.Vd)())==null?void 0:Y.currentPage;return H?(0,T.Dy)(H):null}function Z(Y){var H;return(0,D.C_)("Scrivito.isCurrentPage"),q(Y),((H=B())==null?void 0:H.id())===Y.id()}function J(){var Y;return(0,D.C_)("Scrivito.currentPageParams"),(0,p.zw)(((Y=(0,a.$V)())==null?void 0:Y.query)||"")}const dt=new p.hl,ht=new p.hl;function _t(){var Y,H,I,at;const Q=ht.current();if(Q)throw new p.aS(Q);const V=st.get();return V!==void 0?V:(at=(I=dt.current())!=null?I:(H=(Y=(0,a.$V)())==null?void 0:Y.siteData)==null?void 0:H.siteId)!=null?at:null}function Ot(Y){return dt.runWith("default",Y)}function R(Y,H){return ht.runWith(Y,H)}const st=(0,S.Ld)();function vt(Y){st.set(Y)}function q(Y){(0,A.mD)(Y)||(0,p.Ht)("isCurrentPage","'obj' must be an instance of 'Obj'.",{docPermalink:"js-sdk/isCurrentPage"})}},671(E,C,r){r.d(C,{$V:()=>H,OU:()=>I,Vd:()=>Y,tj:()=>vt,uR:()=>at});var a=r(2945),p=r(1446),D=r(6687),A=r(6084),T=r(5436),S=Object.defineProperty,B=Object.defineProperties,Z=Object.getOwnPropertyDescriptors,J=Object.getOwnPropertySymbols,dt=Object.prototype.hasOwnProperty,ht=Object.prototype.propertyIsEnumerable,_t=(Q,V,tt)=>V in Q?S(Q,V,{enumerable:!0,configurable:!0,writable:!0,value:tt}):Q[V]=tt,Ot=(Q,V)=>{for(var tt in V||(V={}))dt.call(V,tt)&&_t(Q,tt,V[tt]);if(J)for(var tt of J(V))ht.call(V,tt)&&_t(Q,tt,V[tt]);return Q},R=(Q,V)=>B(Q,Z(V));let st=()=>{};function vt(Q){st=Q}const q=new D.hl;function Y(){return(0,A.s4)(void 0,()=>{var Q;const V=(Q=q.current())!=null?Q:st();if(!V)return;const tt=V.locationRoute;if(tt.objId){const Et=(0,T.ED)((0,a.p)(),tt.objId);return Et?{navigationState:V,currentPage:Et}:{navigationState:R(Ot({},V),{locationRoute:R(Ot({},tt),{objId:void 0})})}}return{navigationState:V}})}function H(){var Q;const V=(Q=q.current())!=null?Q:(0,A.s4)(void 0,st);return V?.locationRoute}function I(Q,V){return q.runWith({locationRoute:{objId:Q.page.id(),sitePath:Q.sitePath,siteData:{siteId:Q.siteId,baseUrl:Q.baseUrl}},historyState:{historyChangesCount:0,location:`${Q.baseUrl}${Q.sitePath}`,isRevisit:!1}},V)}function at(){var Q;if(q.current())return;const V=(Q=Y())==null?void 0:Q.navigationState;if(V&&(0,p.UO)(V.locationRoute))return V}},3225(E,C,r){r.d(C,{Ny:()=>Vt,z5:()=>fe,iM:()=>Se,aO:()=>Ve,x3:()=>re,ri:()=>Ye});var a=r(8895),p=r(9421),D=r(6687),A=r(6084),T=($,Pt,et)=>new Promise((it,z)=>{var ut=bt=>{try{Ft(et.next(bt))}catch(qt){z(qt)}},wt=bt=>{try{Ft(et.throw(bt))}catch(qt){z(qt)}},Ft=bt=>bt.done?it(bt.value):Promise.resolve(bt.value).then(ut,wt);Ft((et=et.apply($,Pt)).next())});function S(){return Z.get()}function B(){return T(this,null,function*(){return`iam/instances/${yield(0,D.lT)()}/userinfo`})}const Z=(0,A.vD)({name:"userinfo",loader:()=>T(null,null,function*(){return p.hm.getWithoutLogin(yield B())})});var J=($,Pt,et)=>new Promise((it,z)=>{var ut=bt=>{try{Ft(et.next(bt))}catch(qt){z(qt)}},wt=bt=>{try{Ft(et.throw(bt))}catch(qt){z(qt)}},Ft=bt=>bt.done?it(bt.value):Promise.resolve(bt.value).then(ut,wt);Ft((et=et.apply($,Pt)).next())});let dt;function ht(){dt||(dt=(0,D.yb)(_t,6e4))}function _t($){return J(this,null,function*(){yield p.hm.get(yield B(),$)})}var Ot=($,Pt,et)=>new Promise((it,z)=>{var ut=bt=>{try{Ft(et.next(bt))}catch(qt){z(qt)}},wt=bt=>{try{Ft(et.throw(bt))}catch(qt){z(qt)}},Ft=bt=>bt.done?it(bt.value):Promise.resolve(bt.value).then(ut,wt);Ft((et=et.apply($,Pt)).next())});const R={getUserData(){},isUserLoggedIn(){return!1},ensureUserIsLoggedIn($){st($)},iamTokenFetcher(){},loginHandler(){return"redirect"}}
1;function st($){return Ot(this,null,function*(){yield _t($),(0,a.bb)(!0)})}var vt=r(9984),q=r(1391),Y=Object.defineProperty,H=Object.defineProperties,I=Object.getOwnPropertyDescriptors,at=Object.getOwnPropertySymbols,Q=Object.prototype.hasOwnProperty,V=Object.prototype.propertyIsEnumerable,tt=($,Pt,et)=>Pt in $?Y($,Pt,{enumerable:!0,configurable:!0,writable:!0,value:et}):$[Pt]=et,Et=($,Pt)=>{for(var et in Pt||(Pt={}))Q.call(Pt,et)&&tt($,et,Pt[et]);if(at)for(var et of at(Pt))V.call(Pt,et)&&tt($,et,Pt[et]);return $},kt=($,Pt)=>H($,I(Pt)),Zt=($,Pt,et)=>new Promise((it,z)=>{var ut=bt=>{try{Ft(et.next(bt))}catch(qt){z(qt)}},wt=bt=>{try{Ft(et.throw(bt))}catch(qt){z(qt)}},Ft=bt=>bt.done?it(bt.value):Promise.resolve(bt.value).then(ut,wt);Ft((et=et.apply($,Pt)).next())});const se={getUserData(){const $=(0,D.W3)(q.B).currentEditor();if($)return kt(Et({},$),{id:$.id.replace(/^scrivito:/,"")})},isUserLoggedIn(){return!0},ensureUserIsLoggedIn(){},iamTokenFetcher(){return $=>Zt(null,null,function*(){return(0,D.W3)(yield(0,A.Hh)(()=>(0,vt.d)($)))})},loginHandler(){}};var ve=r(1226),ue=($,Pt,et)=>new Promise((it,z)=>{var ut=bt=>{try{Ft(et.next(bt))}catch(qt){z(qt)}},wt=bt=>{try{Ft(et.throw(bt))}catch(qt){z(qt)}},Ft=bt=>bt.done?it(bt.value):Promise.resolve(bt.value).then(ut,wt);Ft((et=et.apply($,Pt)).next())});const St={getUserData(){const $=S();if(!$)return;const{sub:Pt,name:et,email:it,picture:z,team_ids:ut}=$;return{id:Pt,name:et,email:it,picture:z||null,teamsIds:ut}},isUserLoggedIn(){return Kt(),(0,ve.j1)()||ht(),!0},ensureUserIsLoggedIn(){},iamTokenFetcher(){},loginHandler(){return"redirect"}};function Kt(){return ue(this,null,function*(){(yield Promise.race([(0,A.Hh)(St.getUserData),(0,D.uk)(30)]))||(0,a.bb)(!1)})}var zt=r(8001),de=r(7842),Ut=($,Pt,et)=>new Promise((it,z)=>{var ut=bt=>{try{Ft(et.next(bt))}catch(qt){z(qt)}},wt=bt=>{try{Ft(et.throw(bt))}catch(qt){z(qt)}},Ft=bt=>bt.done?it(bt.value):Promise.resolve(bt.value).then(ut,wt);Ft((et=et.apply($,Pt)).next())});function Vt(){const $=Dt().getUserData();return $?new de.K($):null}function re(){return Dt().isUserLoggedIn()}function fe($={}){return Dt().ensureUserIsLoggedIn($)}function Se(){return Dt().iamTokenFetcher()}function Ve(){return Dt().loginHandler()}function Ye($){q.B||je($)}function je($){return Ut(this,null,function*(){const Pt=yield(0,p.tf)("logout");(0,D.dT)($?`${Pt}?return_to=${encodeURIComponent($)}`:Pt)})}function Dt(){return zt.y6?zt.y6.nodeAuthHandler:q.B?se:(0,a.Ar)()?St:R}},7619(E,C,r){r.d(C,{R:()=>D,c:()=>p});var a=r(6687);function p(T){return{type:"unavailable",fallbackUrl:A(T),objId:T.objId}}function D(T){const S=new URL(T,"http://example.com");if(S.pathname!=="/")return null;const B=S.hash;if(B.indexOf(a.l9)===0){const Z=B.substr(a.l9.length),J=new URL(Z,"http://example.com"),ht={objId:J.pathname.substring(1)};return J.search&&(ht.query=J.search.substring(1)),J.hash&&(ht.hash=J.hash),ht}return null}function A({hash:T,objId:S,query:B}){const Z=B?`?${typeof B=="string"?B:(0,a.Go)(B)}`:"";return`${a.l9}${S}${Z}${T||""}`}},4317(E,C,r){r.d(C,{E:()=>A,g:()=>D});var a=r(6324);const p=(0,a.Ld)();function D(){const S=new MutationObserver(T);return S.observe(document.head,{attributes:!0,attributeFilter:["title"],characterData:!0,childList:!0,subtree:!0}),()=>S.disconnect()}function A(){return p.get()||""}function T(){p.set(document.title)}},4644(E,C,r){r.d(C,{O:()=>T,u:()=>S});var a=r(6687),p=r(6324);class D{constructor(){this.store={},this.updateCounter=(0,p.Ld)()}set(Z,J){this.store[Z]=J,this.incrementUpdateCounter()}get(Z){return this.updateCounter.get(),this.store[Z]}clear(){this.store={},this.incrementUpdateCounter()}incrementUpdateCounter(){this.updateCounter.set((this.updateCounter.get()||0)+1)}}const A=new D;function T(B,Z){A.set(B,Z)}function S(B){return A.get(B)}(0,a.Nj)(()=>A.clear())},1457(E,C,r){r.d(C,{HD:()=>B,a_:()=>T,gY:()=>Z});var a=r(6687),p=r(5436);let D=!1,A=!1;function T(J){const dt=S(J);return dt.workspaceId?((0,p.st)(dt.workspaceId),D=!!dt.inPlaceEditingActive,A=!D&&!!dt.comparisonActive,!0):((0,p.st)("published"),!1)}function S(J){const dt=J.indexOf(" _scrivito {");if(dt===-1)return{};const{editing:ht,comparison:_t,workspaceId:Ot}=JSON.parse(J.substring(dt+11));return{workspaceId:Ot,inPlaceEditingActive:!!ht,comparisonActive:!!_t}}function B(){return D}function Z(){return A}(0,a.Nj)(()=>{D=!1,A=!1})},5089(E,C,r){r.d(C,{q:()=>T,s:()=>A});var a=r(6687),p=r(6324);const D=(0,p.Ld)();function A(S){D.set(S)}function T(){const S=D.get();if(S)return new URL(S,(0,a.u4)()).toString()}},7531(E,C,r){r.d(C,{T:()=>D,V:()=>A});var a=r(6324);
1const p=(0,a.Ld)();function D(T){p.set(T)}function A(){return p.get()}},7886(E,C,r){r.d(C,{u:()=>A});var a=r(6687),p=r(1871),D=r(687);function A(T){var S;if(typeof T=="string")return T;if(T instanceof p.bA){const Z=T.name();if(!Z)throw new a.c1("Anonymous data classes have no name");return Z}if(T instanceof p.sO){const Z=T.dataClassName();if(!Z)throw new a.c1("Invalid class name, class or instance");return Z}const B=(S=D.Sj.forClass(T))==null?void 0:S.name();if(typeof B!="string")throw new a.c1("Invalid class name, class or instance");return B}},3459(E,C,r){r.d(C,{d:()=>D});var a=r(1391),p=r(5436);function D(){var A;return((A=a.B)==null?void 0:A.comparisonRange())||(0,p.w2)()}},5553(E,C,r){r.d(C,{s:()=>D});var a=r(2993),p=r(6084);function D(){return(0,p.s4)(void 0,()=>{var A,T;return(T=(A=(0,a.$0)())==null?void 0:A.locationRoute)==null?void 0:T.objId})}},6802(E,C,r){r.d(C,{Z:()=>T,p:()=>A});var a=r(8549),p=r(6687),D=r(5436);function A(S,B){const Z=T(S,B);if(!Z)return null;const{detailsPage:J,queryString:dt}=Z;return(0,a.a)(J,{query:dt})}function T(S,B){const Z=S.dataClassName();if(!Z)throw new p.c1("getDetailsPageUrl is not supported for anonymous data classes");const J=(0,D.mM)(Z,B);if(!J)return null;const dt=(0,p.gi)(Z),ht=S.id(),_t={[dt]:ht},Ot=[dt,ht].join("=");return{detailsPage:J,queryParameters:_t,queryString:Ot}}},9984(E,C,r){r.d(C,{d:()=>A});var a=r(5597),p=r(1391),D=r(6687);function A({audience:T,authViaAccount:S,authViaInstance:B}){var Z;const J=(Z=p.B)==null?void 0:Z.getEditorAuthToken({audience:T,authViaAccount:S,authViaInstance:B,treatLocalhostLike:(0,a.d)()});if(J){if("error"in J)throw new D.aS(J.error);return J}}},5639(E,C,r){r.d(C,{z:()=>p});var a=r(6687);function p(){const D=(0,a.YY)();if(D)return D;throw new a.aS("Function invoked before calling 'Scrivito.configure'")}},4825(E,C,r){r.d(C,{A:()=>A,I:()=>D});var a=r(6687);let p;function D(T){if(!p)throw new a.Gd;return p(T)}function A(T){p=T}},7558(E,C,r){r.d(C,{L:()=>T,d:()=>A});var a=r(6687),p=r(6324);const D=(0,p.Ld)();function A(S){try{new URL(S)}catch{throw new a.c1("'initialContentDumpUrl' must be an absolute URL with protocol")}D.set(S)}function T(){return D.get()}},9909(E,C,r){r.d(C,{OG:()=>_t,T6:()=>Ot,hF:()=>J});var a=r(5020),p=r.n(a),D=r(4644),A=r(6051),T=r(6084),S=r(5436),B=r(687),Z=(vt,q,Y)=>new Promise((H,I)=>{var at=tt=>{try{V(Y.next(tt))}catch(Et){I(Et)}},Q=tt=>{try{V(Y.throw(tt))}catch(Et){I(Et)}},V=tt=>tt.done?H(tt.value):Promise.resolve(tt.value).then(at,Q);V((Y=Y.apply(vt,q)).next())});function J(vt,q){var Y;const H=(Y=(0,D.u)(vt))==null?void 0:Y.initialContent;if(H){const I=H[q];return typeof I=="function"?I():ht(I)?(0,B.Dy)(I._scrivitoPrivateContent.copy()):dt(I)?I.map(at=>{const V=at._scrivitoPrivateContent.copy();return(0,B.Dy)(V)}):I}}function dt(vt){return Array.isArray(vt)&&vt.every(ht)}function ht(vt){return!!vt&&vt._scrivitoPrivateContent instanceof S.$R}function _t(vt){return Z(this,null,function*(){const q=yield(0,T.Hh)(()=>S.kI.get(vt));q&&(R(q),st(q))})}function Ot(vt,q){return Z(this,null,function*(){const Y=yield(0,T.Hh)(()=>S.kI.get(vt));if(!Y)return;yield(0,A.H)().finishReplicatingObj((0,S.eb)(),vt);const H=Y.widget(q);H&&(R(H),st(H))})}function R(vt){const q=vt.objClass(),Y=(0,B.e6)(vt);if(!Y)return;const H={};Object.keys(Y.attributes()).forEach(at=>{const Q=Y.attributes()[at],V=vt.get(at,Q);if(p()(V)){const tt=J(q,at);tt!==void 0&&(H[at]=tt)}});const I=(0,B.OE)(H,Y,q);vt.update(I)}function st(vt){var q;const Y=(q=(0,D.u)(vt.objClass()))==null?void 0:q.initialize;Y&&Y((0,B.Dy)(vt))}},8895(E,C,r){r.d(C,{Ar:()=>B,BL:()=>S,bb:()=>Z});var a=r(1391),p=r(9421),D=r(6687);let A;const T="__scrivitoUserIsLoggedIn";function S(){(0,p.If)(T);const ht=new URL((0,D.pb)()),_t=ht.searchParams;if(_t.has(T)){A=!0,J(),_t.delete(T),(0,D.G$)({},"",ht.toString());return}A=window.localStorage.getItem(dt())!==null}function B(){if(A===void 0)throw new D.aS("not configured");return A}function Z(ht){ht?J():window.localStorage.removeItem(dt()),(0,D.yQ)()}function J(){a.B||window.localStorage.setItem(dt(),"")}function dt(){return`SCRIVITO.${(0,D.Ly)()}.IS_USER_LOGGED_IN`}(0,D.Nj)(()=>A=void 0)},6556(E,C,r){r.d(C,{ak:()=>st,sO:()=>R,xi:()=>vt});var a=r(6324);class p{constructor(I){this.id=I}insert(I){I&&I.id===this.id&&(this.onClick=I.onClick)}modify(){}remove(){}getHandler(){return this.onClick}}
1var D=r(5614),A=Object.defineProperty,T=Object.getOwnPropertySymbols,S=Object.prototype.hasOwnProperty,B=Object.prototype.propertyIsEnumerable,Z=(H,I,at)=>I in H?A(H,I,{enumerable:!0,configurable:!0,writable:!0,value:at}):H[I]=at,J=(H,I)=>{for(var at in I||(I={}))S.call(I,at)&&Z(H,at,I[at]);if(T)for(var at of T(I))B.call(I,at)&&Z(H,at,I[at]);return H};class dt{constructor(){this.patch={insertIds:[],removeIds:[],items:{},modifyItems:{}}}insert(I){this.patch.insertIds=Array.from(new Set(this.patch.insertIds).add(I.id));const{description:at,group:Q,position:V,title:tt}=I,Et={};at!==void 0&&(Et.description=at),Q!==void 0&&(Et.group=Q),V&&(Et.position=V),tt!==void 0&&(Et.title=tt),"enabled"in I&&(Et.enabled=!!I.enabled),this.patch.items[I.id]=J(J({},Et),ht(I.icon))}modify(I){const{group:at,position:Q,title:V}=I,tt={};at!==void 0&&(tt.group=at),Q&&(tt.position=Q),V!==void 0&&(tt.title=V),this.patch.modifyItems[I.id]=J(J(J({},this.patch.modifyItems[I.id]),tt),ht(I.icon))}remove(I){this.patch.removeIds.push(I)}getPatch(){return this.patch}}function ht(H){return H?{icon:(0,D.r)(H)}:{}}var _t=r(8214);const Ot=(0,a.Ld)();function R(){Y();const H=new dt;return q(H),H.getPatch()}function st(H){const I=new p(H);return q(I),I.getHandler()}function vt(){Ot.set((Y()||0)+1)}function q(H){(0,_t.A)().forEach(I=>I.call(null,H))}function Y(){return Ot.get()}},8214(E,C,r){r.d(C,{A:()=>A,m:()=>D});var a=r(6687);let p=[];function D(T){p.push(T)}function A(){return p}(0,a.Nj)(()=>p=[])},9964(E,C,r){r.d(C,{V:()=>I});var a=r(5020),p=r.n(a),D=r(3221),A=r(5396),T=r(6802),S=r(6687),B=r(1871),Z=r(6084),J=r(5436),dt=r(687),ht=r(6324),_t=Object.defineProperty,Ot=Object.getOwnPropertySymbols,R=Object.prototype.hasOwnProperty,st=Object.prototype.propertyIsEnumerable,vt=(St,Kt,zt)=>Kt in St?_t(St,Kt,{enumerable:!0,configurable:!0,writable:!0,value:zt}):St[Kt]=zt,q=(St,Kt)=>{for(var zt in Kt||(Kt={}))R.call(Kt,zt)&&vt(St,zt,Kt[zt]);if(Ot)for(var zt of Ot(Kt))st.call(Kt,zt)&&vt(St,zt,Kt[zt]);return St},Y=(St,Kt)=>{var zt={};for(var de in St)R.call(St,de)&&Kt.indexOf(de)<0&&(zt[de]=St[de]);if(St!=null&&Ot)for(var de of Ot(St))Kt.indexOf(de)<0&&st.call(St,de)&&(zt[de]=St[de]);return zt},H=(St,Kt,zt)=>new Promise((de,Ut)=>{var Vt=Se=>{try{fe(zt.next(Se))}catch(Ve){Ut(Ve)}},re=Se=>{try{fe(zt.throw(Se))}catch(Ve){Ut(Ve)}},fe=Se=>Se.done?de(Se.value):Promise.resolve(Se.value).then(Vt,re);fe((zt=zt.apply(St,Kt)).next())});function I(St,Kt){at(St,Kt)}
1function at(St,Kt){return H(this,null,function*(){const zt=(0,D.fH)();if((0,ht.q2)("navigateTo"),St===null)return;const de=Zt(Kt);St instanceof B.sO?yield V(St,de,zt):Q(St,zt,de)})}function Q(St,Kt,zt){return H(this,null,function*(){try{const de=yield(0,Z.Hh)(()=>typeof St=="function"?St():St),Ut=(0,dt.zo)(de);return typeof Ut=="string"?(ue(Ut),(0,D.vU)({url:Ut},Kt)):kt(Ut)?(0,D.vU)(yield Et(Ut,zt),Kt):void 0}catch(de){(0,D.Dn)(Kt)&&(0,S.JL)(de)}})}function V(St,Kt,zt){return H(this,arguments,function*(de,{queryParameters:Ut,hash:Vt},re){const fe=yield(0,Z.Hh)(()=>(0,T.Z)(de,(0,A.OI)()));if(fe){const{detailsPage:Se,queryParameters:Ve}=fe;return Ut&&tt(Ve,Ut),(0,D.vU)({objId:Se.id(),query:q(q({},Ve),Ut),hash:Vt},re)}})}function tt(St,Kt){Object.entries(Kt).forEach(([zt,de])=>{if(St[zt]===de)throw new S.c1(`Query parameter "${zt}" is reserved for internal usage`)})}function Et(St,Kt){return H(this,null,function*(){const zt=yield(0,Z.Hh)(()=>se(St,Kt.queryParameters,Kt.hash));if(!zt)throw new S.c1("The link provided to navigateTo has no destination.");return zt})}function kt(St){return St instanceof J.kI||St instanceof J.Re}function Zt(St){if(!St)return{hash:null,queryParameters:void 0};const Kt=St,{hash:zt,params:de}=Kt,Ut=Y(Kt,["hash","params"]);return{hash:zt||null,queryParameters:q(q({},Ut),de)}}function se(St,Kt,zt){return St instanceof J.Re?ve(St,Kt,zt):{objId:St.id(),query:Kt,hash:zt}}function ve(St,Kt,zt){if(St.isExternal())return{url:St.url()};const de=St.obj(),Ut=de instanceof J.kI?de.id():St.objId();if(Ut)return{objId:Ut,query:p()(Kt)?St.queryParameters():Kt,hash:zt||St.hash()}}function ue(St){if(!URL.canParse(St))throw new S.c1(`Scrivito.navigateTo was called with a relative URL "${St}". When called with a string, Scrivito.navigateTo only accepts absolute URLs.`)}},2993(E,C,r){r.d(C,{$0:()=>H,aM:()=>at});var a=r(3221),p=r(4599),D=r(2183),A=r(2945),T=r(1446),S=r(6687),B=r(6084),Z=r(5436),J=r(687),dt=Object.defineProperty,ht=Object.defineProperties,_t=Object.getOwnPropertyDescriptors,Ot=Object.getOwnPropertySymbols,R=Object.prototype.hasOwnProperty,st=Object.prototype.propertyIsEnumerable,vt=(ue,St,Kt)=>St in ue?dt(ue,St,{enumerable:!0,configurable:!0,writable:!0,value:Kt}):ue[St]=Kt,q=(ue,St)=>{for(var Kt in St||(St={}))R.call(St,Kt)&&vt(ue,Kt,St[Kt]);if(Ot)for(var Kt of Ot(St))st.call(St,Kt)&&vt(ue,Kt,St[Kt]);return ue},Y=(ue,St)=>ht(ue,_t(St));function H(){return Et.get()}let I=!1;function at(){I=!0,Et.reset()}function Q(){if(I)return{historyState:(0,p.GL)(),locationRoute:{sitePath:null}};const ue=(0,p.GL)(),St=tt(ue.location);return typeof St=="string"?St:{historyState:ue,locationRoute:St}}function V(ue){return typeof ue=="string"?((0,D.NA)(ue),!1):!0}function tt(ue){var St,Kt;const zt=(0,T.vA)(ue);if((0,T.hZ)(zt))throw new S.Gd;if(!zt.objId)return zt;const de=(0,Z.ED)((0,A.p)().and((0,Z.y7)(zt.siteData.siteId)),zt.objId);return de?(0,J.Xg)(de)?(Kt=(St=de.blob())==null?void 0:St.url())!=null?Kt:Y(q({},zt),{objId:void 0}):zt:Y(q({},zt),{objId:void 0})}const Et=(0,B.vD)({stream:(0,B.eX)(Q).filter(V).filter(Zt)});let kt;function Zt(ue){const St=(0,B.s4)(null,()=>kt&&se(kt,ue));return St?((0,a.vU)({objId:St.id()}),!1):(kt=ue,!0)}function se(ue,St){return St.historyState.location===ue.historyState.location&&ue.locationRoute.objId&&!St.locationRoute.objId&&(0,Z.ED)((0,A.p)(),ue.locationRoute.objId)}function ve(){Et.reset()}(0,S.Nj)(()=>{I=!1,ve()})},8001(E,C,r){r.d(C,{HF:()=>D,y6:()=>p});var a=r(6687);let p;function D(){return p===void 0}(0,a.Nj)(()=>p=void 0)},1226(E,C,r){r.d(C,{C1:()=>R,Dk:()=>J,gV:()=>ht,j1:()=>Ot,pM:()=>Z,uX:()=>_t});var a=r(2469),p=r(8001),D=r(1391),A=r(6687),T=r(6084),S=(I,at,Q)=>new Promise((V,tt)=>{var Et=se=>{try{Zt(Q.next(se))}catch(ve){tt(ve)}},kt=se=>{try{Zt(Q.throw(se))}catch(ve){tt(ve)}},Zt=se=>se.done?V(se.value):Promise.resolve(se.value).then(Et,kt);Zt((Q=Q.apply(I,at)).next())});let B;function Z(){(0,T.XR)(S(null,null,function*(){return st(yield(0,a.D0)())}))}function J(){if(!_t()){if(!(0,T.Em)())throw new A.aS("Offline store has not been enabled: Forgot to call Scrivito.enabledOfflineStore()?");window.localStorage.setItem(Y(),"true"),dt()}}function dt(){return S(this,null,function*(){yield(0,T.mn)(),(0,A.yQ)()})}function ht(){_t()&&(window.localStorage.removeItem(Y()),(0,A.yQ)())}
1function _t(){if(B===void 0)throw new A.aS("Offline mode has not been allowed in the editing config");return B}function Ot(){return B}function R(){return S(this,null,function*(){if(_t())throw new A.aS("Cannot delete the offline store in offline mode");return(0,T.$t)()})}function st(I){return B===void 0&&(B=vt(I)),B}function vt(I){var at;return!((at=I.unstable)!=null&&at.allowOfflineMode)||D.B||!(0,p.HF)()?!1:!!q()}function q(){return window.localStorage.getItem(Y())}function Y(){return`SCRIVITO.${(0,A.Ly)()}.OFFLINE_MODE`}(0,A.Nj)(H);function H(){B=void 0}},6051(E,C,r){r.d(C,{H:()=>D});var a=r(6687),p=r(1391);function D(){if(!p.B)throw new a.Gd;return p.B}},7720(E,C,r){r.d(C,{f:()=>st,t:()=>Ot});var a=r(6687),p=r(6324),D=Object.defineProperty,A=Object.defineProperties,T=Object.getOwnPropertyDescriptors,S=Object.getOwnPropertySymbols,B=Object.prototype.hasOwnProperty,Z=Object.prototype.propertyIsEnumerable,J=(q,Y,H)=>Y in q?D(q,Y,{enumerable:!0,configurable:!0,writable:!0,value:H}):q[Y]=H,dt=(q,Y)=>{for(var H in Y||(Y={}))B.call(Y,H)&&J(q,H,Y[H]);if(S)for(var H of S(Y))Z.call(Y,H)&&J(q,H,Y[H]);return q},ht=(q,Y)=>A(q,T(Y));const _t=(0,p.Ld)();function Ot(q){if(!q.length)throw new a.c1('No sizes has been provided for "configurePreviewSizes"');if(!q.every(I=>typeof I.title=="string"&&I.title.length>0))throw new a.c1("Each preview size must have a non-empty title");const Y=q.map(({width:I})=>I).filter(I=>typeof I=="number");if(new Set(Y).size!==Y.length)throw new a.c1('A "width" must be unique for sizes');if(!q.every(R))throw new a.c1('A "width" must be a positive integer');const H=q.map(vt);_t.set(H)}function R(q){const Y=q?.width;return Y==null?!0:(0,a.zh)(Y)&&Y>0}function st(){return _t.get()}function vt(q){return q.width===null?ht(dt({},q),{width:void 0}):q}},1288(E,C,r){r.d(C,{K:()=>B,w:()=>Z});var a=r(4644),p=r(7886),D=Object.getOwnPropertySymbols,A=Object.prototype.hasOwnProperty,T=Object.prototype.propertyIsEnumerable,S=(J,dt)=>{var ht={};for(var _t in J)A.call(J,_t)&&dt.indexOf(_t)<0&&(ht[_t]=J[_t]);if(J!=null&&D)for(var _t of D(J))dt.indexOf(_t)<0&&T.call(J,_t)&&(ht[_t]=J[_t]);return ht};function B(J,dt){(0,a.O)((0,p.u)(J),dt)}function Z(J,dt,ht){var _t;const R=(((_t=(0,a.u)(J))==null?void 0:_t.attributes)||{})[dt];if(!R?.options)return;let st=R.options;if(R.editor==="colorPicker"){const vt=R.options,{allowAlpha:q}=vt;st=S(vt,["allowAlpha"])}else if(R.editor==="dimensionPicker"){const vt=R.options,{units:q}=vt;st=S(vt,["units"])}else if(ht==="html"){const vt=R.options,{allowedTags:q,showHtmlSource:Y,toolbar:H}=vt;st=S(vt,["allowedTags","showHtmlSource","toolbar"])}else if(ht==="string"){const vt=R.options,{multiLine:q}=vt;st=S(vt,["multiLine"])}if(Object.keys(st).length===0)return R.options}},9063(E,C,r){r.d(C,{I:()=>q,n:()=>Y});var a=r(8549),p=r(2945),D=r(1446),A=r(6687),T=r(1871),S=r(5924),B=r(5436),Z=Object.defineProperty,J=Object.defineProperties,dt=Object.getOwnPropertyDescriptors,ht=Object.getOwnPropertySymbols,_t=Object.prototype.hasOwnProperty,Ot=Object.prototype.propertyIsEnumerable,R=(at,Q,V)=>Q in at?Z(at,Q,{enumerable:!0,configurable:!0,writable:!0,value:V}):at[Q]=V,st=(at,Q)=>{for(var V in Q||(Q={}))_t.call(Q,V)&&R(at,V,Q[V]);if(ht)for(var V of ht(Q))Ot.call(Q,V)&&R(at,V,Q[V]);return at},vt=(at,Q)=>J(at,dt(Q));function q(at){return I(at),Y(at)}function Y(at,Q){return(0,S.wx)(at,V=>H(V,Q))}function H({obj_id:at,query:Q,hash:V},tt){const Et=(0,B.ED)((0,p.p)(),at);if(!Et)return(0,D.Jv)({objId:at,query:Q,hash:V});const kt=tt?.dataStack;return(0,a.a)(Et,vt(st({query:kt?(0,T.qD)(Et,kt,Q):Q,hash:V},tt),{withoutOriginIfLocal:!0}))}function I(at){typeof at!="string"&&(0,A.Ht)("resolveHtmlUrls","'htmlString' must be a 'String'.",{docPermalink:"js-sdk/resolveHtmlUrls"})}},1624(E,C,r){r.d(C,{$:()=>A,P:()=>T});var a=r(6687),p=r(6324);const D=(0,p.Ld)();function A(Z){S(Z),D.set(Z)}function T(){return D.get()}function S({mobileMaxWidth:Z,tabletMaxWidth:J}){if(!B(Z))throw new a.c1("'responsiveBreakpoints.mobileMaxWidth' must be a positive integer.");if(!B(J))throw new a.c1("'responsiveBreakpoints.tabletMaxWidth' must be a positive integer.");if(Z>=J)throw new a.c1("'responsiveBreakpoints.mobileMaxWidth' must be less than 'tabletMaxWidth'.")}function B(Z){return(0,a.zh)(Z)&&Z>0}},1446(E,C,r){r.d(C,{I:()=>qt,uT:()=>Pt,yW:()=>ut,WH:()=>Dt,Jv:()=>je,xu:()=>et,VJ:()=>bt,hZ:()=>Se,tV:()=>Ve,UO:()=>Ye,Im:()=>Ke,zX:()=>xe,vA:()=>Ft});var a=r(671),p=r(7619),D=r(6687),A=r(9180),T=r(6084),S=r(5436);let B={},Z;const J=new D.hl;function dt(k,yt,Ct){if(!J.current()){if(!(0,D.aI)(k.objSpaceId(),(0,S.eb)()))throw new D.Gd;k.siteId()&&(R(),B[Ct]||(B[Ct]={}),B[Ct][yt]=k.id())}}function ht(k,yt){var Ct;if(!J.current())return R(),(Ct=B[yt])==null?void 0:Ct[k]}function _t(k){return J.runWith(!0,k)}function Ot(){B={},Z=void 0}function R(){const k=(0,T.s4)(void 0,()=>(0,A.Qb)((0,S.eb)()))||"";k!==Z&&(B={},Z=k)}(0,D.Nj)(Ot);var st=r(6974),vt=r(2945),q=r(6875),Y=r(687);function H(k,yt){if(V(k,yt))return"/";const Ct=at(k,yt);if(Ct)return Ct;const te=tt(k);return te?`/${te}-${k.id()}`:`/${k.id()}`}function I({sitePath:k,siteData:{siteId:yt}}){var Ct,te,ae,_e;const Ge=k.replace(/^\/+([^/]|$)|([^/]|^)\/+$/g,"$1$2");return Ge===""?kt(yt)?(Ct=(0,st.Q)())==null?void 0:Ct.id():(te=(0,S.Mp)((0,vt.p)().and((0,S.rs)(yt))))==null?void 0:te.id():(_e=Et(Ge))!=null?_e:(ae=Q(Ge,yt))==null?void 0:ae.id()}function at(k,yt){if(k.isDeleted())return;const Ct=k.permalink();if(Ct&&!(Zt(yt)&&!(0,q.Ln)(k)))return dt(k,Ct,yt),`/${Ct}`}function Q(k,yt){var Ct,te;const ae=(0,vt.p)().and((0,S.y7)(yt)),_e=ht(k,yt);return _e?(Ct=(0,S.ED)(ae,_e))!=null?Ct:void 0:Zt(yt)?(0,q.mu)(k,ae):(te=(0,S.Z0)(ae,"_permalink",k))!=null?te:void 0}function V(k,yt){if(!kt(yt))return k.path()==="/";
1const Ct=(0,T.s4)(null,st.Q);return Ct&&Ct.id()===k.id()}function tt(k){const yt=(0,Y.Dy)(k);if(!yt.slug||typeof yt.slug!="function")return;const Ct=yt.slug();if(typeof Ct=="string")return Ct}function Et(k){if(k.length<16||k.length>16&&k.slice(-17,-16)!=="-")return null;const yt=k.slice(-16);return yt.match(/[^0-9a-f]/)?null:yt}function kt(k){return k==="default"}function Zt(k){return kt(k)&&(0,q.DZ)()}var se=r(9403),ve=Object.defineProperty,ue=Object.defineProperties,St=Object.getOwnPropertyDescriptors,Kt=Object.getOwnPropertySymbols,zt=Object.prototype.hasOwnProperty,de=Object.prototype.propertyIsEnumerable,Ut=(k,yt,Ct)=>yt in k?ve(k,yt,{enumerable:!0,configurable:!0,writable:!0,value:Ct}):k[yt]=Ct,Vt=(k,yt)=>{for(var Ct in yt||(yt={}))zt.call(yt,Ct)&&Ut(k,Ct,yt[Ct]);if(Kt)for(var Ct of Kt(yt))de.call(yt,Ct)&&Ut(k,Ct,yt[Ct]);return k},re=(k,yt)=>ue(k,St(yt)),fe=(k,yt)=>{var Ct={};for(var te in k)zt.call(k,te)&&yt.indexOf(te)<0&&(Ct[te]=k[te]);if(k!=null&&Kt)for(var te of Kt(k))yt.indexOf(te)<0&&de.call(k,te)&&(Ct[te]=k[te]);return Ct};function Se(k){return!!k.objId&&!k.siteData}function Ve(k){return!k.sitePath}function Ye(k){return!!k.sitePath&&!k.objId}function je(k){return $(k.obj?Pt(k):ut(k))}function Dt(k){const yt=Pt({obj:k});return yt.type==="local"?yt.resource:void 0}function $(k){switch(k.type){case"local":return k.resource;case"crossSite":return k.url;default:return k.fallbackUrl}}function Pt(k){var yt;const Ct=k.obj,te=(0,a.$V)(),ae=te?.siteData,_e=ae?.siteId,Ge=(yt=Ct.siteId())!=null?yt:_e;if(!Ge)return z(k);if(Ge!==_e){const en=it(Ge,k);return en?{type:"crossSite",url:en}:z(k)}const Je=ae?.baseUrl;if(!Je)return z(k);const Fe=new URL(wt(Je,H(Ct,Ge),k));return te?.sitePath||Fe.origin===(0,D.u4)()?{type:"local",resource:(0,D.B6)(Fe)}:{type:"crossSite",url:Fe.href}}function et(k){var yt,Ct,te,ae;const _e=(te=k.obj.siteId())!=null?te:(Ct=(yt=(0,a.$V)())==null?void 0:yt.siteData)==null?void 0:Ct.siteId;return _e&&(ae=it(_e,k))!=null?ae:z(k).fallbackUrl}function it(k,yt){const Ct=(0,se.ne)(k);return Ct&&wt(Ct,H(yt.obj,k),yt)}function z(k){return(0,p.c)({objId:k.obj.id(),query:k.query,hash:k.hash})}function ut(k){const{objId:yt,query:Ct,hash:te}=k,ae=(0,a.$V)();if(!ae?.siteData)return(0,p.c)({objId:yt,query:Ct,hash:te});const _e=new URL(wt(ae.siteData.baseUrl,`/${yt}`,{query:Ct,hash:te}));return ae.sitePath||_e.origin===(0,D.u4)()?{type:"local",resource:(0,D.B6)(_e)}:{type:"crossSite",url:_e.href}}function wt(k,yt,{query:Ct,hash:te}){const ae=yt==="/"?k:`${k}${yt}`,_e=URL.parse(ae);return _e?(typeof Ct=="string"&&Ct!=="?"&&(_e.search=Ct),typeof Ct=="object"&&(_e.search=(0,D.Go)(Ct)),te&&te!=="#"&&(_e.hash=te),_e.href):ae}function Ft(k){const yt=(0,p.R)(k);if(yt){const{objId:ae,query:_e}=yt;return{objId:ae,sitePath:null,query:_e}}const Ct=(0,se.y1)(k),te=new URL(k,"http://example.com").search.replace(/^\?/,"");return Ct.sitePath===null?re(Vt({},Ct),{query:te}):re(Vt({},Ct),{objId:I(Ct),query:te})}function bt(k){var yt=k,{homepageCallback:Ct}=yt,te=fe(yt,["homepageCallback"]);(0,st.m)(Ct),(0,se.uL)(te)}function qt(k){_t(()=>{const yt=et({obj:k});if(Ft(yt).objId!==k.id())throw new D.aS(`baseUrlForSite produced ${yt} for ${k.id()}, but siteForUrl did not recognize that URL correctly.`)})}function Ke(k){const yt=URL.parse(k);return!yt||yt.origin===(0,D.u4)()}function xe(k){var yt,Ct;const te=(Ct=(yt=(0,a.$V)())==null?void 0:yt.siteData)==null?void 0:Ct.baseUrl;return!!te&&k.indexOf(te)===0}},6974(E,C,r){r.d(C,{Q:()=>T,m:()=>A});var a=r(5396),p=r(6687);let D;function A(S){D=S}function T(){return D?(0,a.wF)(D):null}(0,p.Nj)(()=>D=void 0)},9008(E,C,r){r.d(C,{iv:()=>A,js:()=>T,s1:()=>S});var a=r(6687);const p=new a.hl,D=128;function A(J){return p.runWith(!0,J)}function T(J){return J.isRaw()||J.isExplicitlyTransformed()?!!J.urlWithoutPlaceholder():!!B(J).urlWithoutPlaceholder()}function S(J){if(J.isRaw()||J.isExplicitlyTransformed())return{initialUrl:J.url()};const dt=B(J).url();if(p.current())return{initialUrl:dt};const ht=Z(J).urlWithoutPlaceholder();return!ht||dt===ht?{initialUrl:dt}:{initialUrl:dt,highResUrlToDecode:ht}}function B(J){return J.optimizeFor({width:D})}function Z(J){const dt=Math.max((0,a.nj)().width*(0,a.Y5)(),D);return J.optimizeFor({width:dt})}},3973(E,C,r){r.d(C,{R:()=>A,a:()=>D});var a=r(5553),p=r(6687);function D(Z,J,dt){const ht=T(Z),_t=(0,p.nw)(),Ot=()=>{(0,p.hT)(J,{behavior:"smooth",block:"center",inline:"center"}),dt&&dt()},R=S[ht]||[];return R.push({id:_t,reveal:Ot}),S[ht]=R,B===ht&&(Ot(),B=""),()=>{const st=S[ht],vt=st?.filter(q=>q.id!==_t);vt?.length?S[ht]=vt:delete S[ht]}}function A(Z){if(Z.objId!==(0,a.s)())return;const J=T(Z),dt=S[J];dt?dt.forEach(ht=>ht.reveal()):B=J}function T(Z){return[Z.objId,Z.attributeName,Z.widgetId].toString()}let S={},B;(0,p.Nj)(()=>{S={},B=""})},9403(E,C,r){r.d(C,{ne:()=>S,uL:()=>T,y1:()=>B});var a=r(5396),p=r(6687);let D,A;function T(Q={}){var V;if(Q.baseUrlForSite){D=Q.baseUrlForSite,A=Q.siteForUrl;return}const tt=(V=Q.routingBasePath)!=null?V:"";let Et;D=kt=>{var Zt,se;if(kt===null||kt==="default")return Et||(Et=`${(se=(Zt=Q.origin)!=null?Zt:(0,p.u4)())!=null?se:H()}/${tt.replace(/^\/+/,"")}`),Et},A=kt=>{const{origin:Zt}=new URL(kt);if(!(Zt!==Q.origin&&Zt!==(0,p.u4)()))return tt?{siteId:"default",baseUrl:new URL(tt,Zt).href}:{siteId:"default",baseUrl:Zt}}}function S(Q){const V=vt(Q);return V===void 0||V===""?null:typeof V=="string"?R(V):(st("baseUrlForSite",V,"String | Void"),null)}function B(Q){A||Y();const V=ht(Q),tt=_t(V);return tt?{siteData:{siteId:tt.siteId,baseUrl:tt.baseUrl},sitePath:Z(tt.baseUrl,V)}:{sitePath:null}}function Z(Q,V){if(!J(Q,V))return null;const tt=V.substring(Q.length),Et=dt(tt);return Et===""?"/":Et.charAt(0)!=="/"?null:Et}function J(Q,V){return V.substring(0,Q.length)===Q}function dt(Q){const{pathname:V}=new URL(Q,"http://example.com");return Q.startsWith("/")?V:V.substring(1)}function ht(Q){var V;const tt=URL.canParse(Q)?void 0:(V=(0,p.u4)())!=null?V:H(),Et=new URL(Q,tt);return Et.pathname=Et.pathname.replace(/\/+/g,"/"),Et.href}function _t(Q){const V=(0,a.wj)("Access to current site inside siteForUrl. Forgot to use onAllSites?",()=>A?.call(null,Ot(Q)));if(!I(V)){st("siteForUrl",V,"{siteId: String, baseUrl: String} | Void");return}return V&&{siteId:V.siteId,baseUrl:R(V.baseUrl)}}function Ot(Q){const V=new URL(Q);return V.search="",V.hash="",V.href}function R(Q){return Q.replace(/([^/]|^)\/+$/,"$1")}function st(Q,V,tt){const Et=`Unexpected return value from ${Q}: got ${(0,p.aO)(V)}, expected type ${tt}. ${at}`;(0,p.JL)(new p.c1(Et))}function vt(Q){return D||Y(),D.call(null,Q)}function q(){D=void 0,A=void 0}function Y(){throw new p.aS("Cannot use routing before Scrivito.configure was called.")}function H(){throw new p.aS(`Cannot compute an absolute URL without a configured origin or base URL. ${at}`)}function I(Q){const V=Q;return V===void 0?!0:typeof V?.siteId=="string"&&typeof V?.baseUrl=="string"}const at=`Visit ${(0,p.yJ)("js-sdk/configure")} for more information.`;(0,p.Nj)(q)},5597(E,C,r){r.d(C,{X:()=>D,d:()=>A});var a=r(6687);let p;function D(T){p=T}function A(){return p}(0,a.Nj)(()=>p=void 0)},1391(E,C,r){r.d(C,{B:()=>p,U:()=>D});var a=r(6687);let p;function D(A){p=A}(0,a.Nj)(()=>D(void 0))},1702(E,C,r){r.d(C,{n:()=>R});var a=r(8307),p=r.n(a),D=r(5436),A=Object.defineProperty,T=Object.defineProperties,S=Object.getOwnPropertyDescriptors,B=Object.getOwnPropertySymbols,Z=Object.prototype.hasOwnProperty,J=Object.prototype.propertyIsEnumerable,dt=(I,at,Q)=>at in I?A(I,at,{enumerable:!0,configurable:!0,writable:!0,value:Q}):I[at]=Q,ht=(I,at)=>{for(var Q in at||(at={}))Z.call(at,Q)&&dt(I,Q,at[Q]);if(B)for(var Q of B(at))J.call(at,Q)&&dt(I,Q,at[Q]);return I},_t=(I,at)=>T(I,S(at)),Ot=(I,at)=>{var Q={};for(var V in I)Z.call(I,V)&&at.indexOf(V)<0&&(Q[V]=I[V]);if(I!=null&&B)for(var V of B(I))at.indexOf(V)<0&&J.call(I,V)&&(Q[V]=I[V]);return Q};function R(I){if(!I)return I;switch(typeof I){case"string":case"number":case"boolean":return I;case"object":return q(I)?Y(I):p()(I)?I:Array.isArray(I)?st(I):vt(I)}}function st(I){const at=[];return I.forEach(Q=>{const V=R(Q);V!==void 0&&at.push(V)}),at}function vt(I){const at={};
1return Object.keys(I).forEach(Q=>{const V=I[Q],tt=R(V);tt!==void 0&&(at[Q]=tt)}),at}function q(I){return I._scrivitoPrivateContent instanceof D.Ei}function Y(I){const at=I._scrivitoPrivateContent.params(),{query:Q}=at,V=Ot(at,["query"]),tt=Q.filter(Et=>!H(Et.field));return R(_t(ht({},V),{query:tt}))}function H(I){return typeof I=="string"?I==="_site_id":I.indexOf("_site_id")!==-1}},6875(E,C,r){r.d(C,{DZ:()=>Z,Ln:()=>q,MT:()=>_t,Y7:()=>B,mu:()=>vt,uo:()=>J,yG:()=>ht});var a=r(6687),p=r(6084),D=r(5436),A=r(687);class T extends a.aS{constructor(I){super(I)}}let S;function B(H){S=H}function Z(){return!!S}function J(H){if(Z()){const I=D.kI.get(H);if(I)return dt(I)}return null}function dt(H){const I=S((0,A.Dy)(H));return typeof I=="string"&&I.length>0?I:null}function ht(H){if(!S)throw new T("Scrivito.unstable_selectSiteId is only available in the multi-site mode");const I=(0,p.s4)(null,_t);if(I&&I!==H)throw new T(`Scrivito.unstable_selectSiteId called with ${H}, but ${I} was already selected`);if(typeof H!="string"||!H)throw new T("Scrivito.unstable_selectSiteId can only be called with a non-empty string");st().set(H)}function _t(){if(!S)throw new a.Gd;return st().get()||null}function Ot(){S=void 0}const R=(0,p.rL)({name:"multiSiteMode",loadElement:()=>({loader:()=>(0,a.Zm)()})});function st(){return R.get("selectedSiteId")}function vt(H,I){var at;const Q=Y(),tt=(0,D.eF)(I,"_permalink",H).filter(kt=>{const Zt=dt(kt);return Zt?Zt===Q:!0});return(at=tt.filter(kt=>!kt.isDeleted())[0])!=null?at:tt[0]}function q(H){const I=dt(H),at=Y();return!I||I===at}function Y(){const H=(0,p.s4)(void 0,_t);if(H===void 0)throw new a.aS("Access to routing in the multi-site mode, but the site ID is not yet selected. Forgot to use Scrivito.unstable_selectSiteId?");return H}(0,a.Nj)(Ot)},1368(E,C,r){r.d(C,{d:()=>S});var a=r(8549),p=r(6687),D=r(9180),A=r(5436),T=r(687);function S(Z,J){(0,D.C_)("Scrivito.urlFor"),B(Z);let dt,ht;return J&&(dt=J.query,ht=J.hasOwnProperty("hash")?J.hash:J.fragment),(0,a.P)((0,T.zo)(Z),{query:dt,hash:ht})}function B(Z){(0,A.mD)(Z)||(0,A.fZ)(Z)||Z instanceof A.yI||(0,p.Ht)("urlFor","'target' must be an instance of 'Obj', 'Link' or 'Binary'.",{docPermalink:"js-sdk/urlFor"})}},7842(E,C,r){r.d(C,{K:()=>a});class a{constructor(D){this.userData=D}id(){return this.userData.id}name(){return this.userData.name}email(){return this.userData.email}picture(){return this.userData.picture}teamIds(){return this.userData.teamsIds}}},1522(E,C,r){r.d(C,{LQ:()=>J,ip:()=>dt,mR:()=>B});var a=r(1391),p=r(9421),D=r(6687);const A="js-sdk/setVisitorIdToken";let T,S;function B(Ot){if(!a.B&&Ot)return Z()}function Z(){T=new p.gz;const Ot=(0,D.wg)(()=>{throw new D.aS(`Scrivito.setVisitorIdToken was not called within 30 seconds. Visit ${(0,D.yJ)(A)} for more information.`)},3e4);return S=()=>clearTimeout(Ot),T}function J(Ot){if(!a.B){if(!T)throw new D.aS(`Scrivito needs to be configured to use visitor authentication before Scrivito.setVisitorIdToken can be called. Visit ${(0,D.yJ)("js-sdk/configure")} and ${(0,D.yJ)(A)} for more information.`);ht(),T.setToken(Ot)}}function dt(){return!!T}function ht(){S&&(S(),S=void 0)}function _t(){ht(),T=void 0}(0,D.Nj)(_t)},8891(E,C,r){r.d(C,{Rt:()=>T,b_:()=>D,aG:()=>A,qk:()=>p});var a=r(4899);const p={canEdit:a.fG,canWrite:a.fG,comparisonBase:a.fG,comparisonRange:a.fG,getEditorAuthToken:a.fG,getContentStateId:a.fG,translate:a.fG,currentEditor:a.fG,currentEditorTeams:a.fG,currentWorkspace:a.fG,currentEditingContext:a.fG,getUiContext:a.fG,getUiLanguage:a.fG,getEditableArea:a.fG,getHighlightedWidget:a.fG,getResolvedUrl:a.fG,retrieveObjQuery:a.JV,retrieveFacetQuery:a.JV,retrieveSuggest:a.JV,retrieveBinaryMetadata:a.JV,retrieveBinaryUrls:a.JV,retrieveObjFieldDiffs:a.JV,copyBinary:a.JV,uploadBinary:a.JV,objReplicationMessageStream:a.dY,finishSavingObj:a.JV,copyObj:a.JV,finishReplicatingObj:a.JV,insertWidget:a.JV,navigateToExternalUrl:a.JV,openInNewUiWindow:a.JV,configureContentBrowser:a.JV,openContentBrowser:a.JV,openCustomDialog:a.JV,setAppAdapter:a.JV,configureTenant:a.JV,showWidgetMenu:a.JV,showWidgetlistMenu:a.JV,showChildListMenu:a.JV,startDrag:a.JV,endDrag:a.JV,dragTo:a.JV,drop:a.JV,windowFocusStream:a.dY},D={getAdapterSpec:a.fG,getCapabilities:a.fG,getCropAspectRatios:a.fG,getPreviewSizes:a.fG,getResponsiveBreakpoints:a.fG,descriptionForObj:a.fG,getClasses:a.fG,getContentBrowserConfiguration:a.fG,getHomepageId:a.fG,getSiteIdForObj:a.fG,titleForObj:a.fG,titleForWidget:a.fG,thumbnailForObj:a.fG,getAuthGroups:a.fG,getContentZoneData:a.fG,getCurrentAppLocation:a.fG,getCustomComponentDimensions:a.fG,getDocumentTitle:a.fG,getElementBoundaries:a.fG,getExtensionsUrl:a.fG,getMenuPatch:a.fG,getObjClassF
1orContentTypeMapping:a.fG,getResolvedUrl:a.fG,getScrollPosition:a.fG,getValidationReport:a.fG,getUrlFor:a.fG,getForcedEditorLanguage:a.fG,generalPropertiesForObj:a.fG,generalPropertiesForWidget:a.fG,propertiesGroupsForObj:a.fG,propertiesGroupsForWidget:a.fG,getInitialContentDumpUrl:a.fG,hasLayoutComponents:a.fG,objReplicationMessageStream:a.dY,executeCustomCommand:a.JV,initializeContentForObj:a.JV,initializeContentForWidget:a.JV,initializeCopy:a.JV,initializeObjCopy:a.JV,initializeWidgetCopy:a.JV,navigateTo:a.JV,scrollIntoView:a.JV,scrollToTop:a.JV,showCustomComponent:a.JV,showWidgetContent:a.JV,wantsAutoAttributeConversion:a.fG};function A(S){return!!S&&typeof S=="object"&&"type"in S&&S.type==="ScrivitoSelectedObj"&&"objId"in S&&(S.objId===null||typeof S.objId=="string")}const T="scrivito.general"},4899(E,C,r){r.d(C,{fG:()=>a,JV:()=>p,dY:()=>D,mj:()=>zt,m6:()=>Ve,xN:()=>B,Mf:()=>Z,qo:()=>Q,V_:()=>_t,KA:()=>J,TB:()=>dt,UK:()=>ve,zV:()=>ht});const a="GET",p="SEND",D="STREAM";var A=r(6687),T=r(6084),S=r(6324);function B(Dt,$){const Pt=(0,S.Ld)(),et={};return Object.keys(Dt).forEach(it=>{const z=Dt[it];z===a&&(et[it]=(...ut)=>{const wt=it,Ft=Pt.subState(wt).subState((0,A.xn)(ut));return(0,T.vD)({state:Ft,stream:$.stream(wt,...ut)}).get()}),z===p&&(et[it]=(...ut)=>$.send(it,...ut)),z===D&&(et[it]=(...ut)=>$.stream(it,...ut))}),et}function Z(Dt,$){return{stream(Pt,...et){const it=$[Pt],z=Dt[Pt];if(z===a)return(0,T.eX)(()=>it.call($,...et));if(z===D)return it.call($,...et);throw new A.Gd},send(Pt,...et){const it=$[Pt];return new Promise(ut=>{(0,A.dY)(()=>ut(it.call($,...et)))})}}}function J(Dt){return{incomingMessages:new A.RE($=>{function Pt(et){$.next({data:et.data})}return Dt.addEventListener("message",Pt),Dt.start(),()=>{Dt.removeEventListener("message",Pt)}}),sendMessage($){$.transfer===void 0?Dt.postMessage($.data):Dt.postMessage($.data,$.transfer)}}}function dt(Dt){return{incomingMessages:new A.RE($=>{function Pt(et){et.source!==null&&$.next({remoteOrigin:et.origin,remoteWindow:et.source,data:et.data,ports:et.ports})}return Dt.addEventListener("message",Pt),()=>{Dt.removeEventListener("message",Pt)}}),sendMessage($){$.remoteWindow.postMessage($.data,$.remoteOrigin,[...$.ports||[]])}}}function ht(Dt,$,Pt,et){const it=new MessageChannel;return ve(J(it.port1),Z(Dt,$),Dt,Pt,et),it.port2}function _t(Dt,$,Pt){const et=zt($.then(J));return B(Dt,Q(et,Pt))}function Ot(Dt,$){return{incomingMessages:Dt.incomingMessages.takeUntil($),sendMessage:Pt=>Dt.sendMessage(Pt)}}function R(Dt){return!!Dt&&typeof Dt.channel=="number"&&typeof Dt.verb=="string"}function st(Dt){return typeof Dt.method=="string"&&Array.isArray(Dt.params)}function vt(Dt){return Dt.verb==="SEND"&&st(Dt)}function q(Dt){return Dt.verb==="OPEN"&&st(Dt)}function Y(Dt){return Dt.verb==="CLOSE"}function H(Dt){return Dt.verb==="RESPOND"&&typeof Dt.sequence=="number"}function I(Dt){return Dt.verb==="ERROR"}class at{constructor($){this.muxedStream=$,this.openStreams={}}streamWithId($){return new A.RE(Pt=>{this.ensureSubscribed();const it=this.subjectForStreamId($).subscribe(Pt);return()=>{it.unsubscribe(),this.removeSubjectIfAbandoned($)}})}removeSubjectIfAbandoned($){this.subjectForStreamId($).subscriberCount()===0&&(delete this.openStreams[$],this.unsubscribeIfAbandoned())}subjectForStreamId($){const Pt=this.openStreams[$];if(Pt)return Pt;const et=new A.B7;return this.openStreams[$]=et,et}ensureSubscribed(){this.subscription||(this.subscription=this.muxedStream.subscribe({next:$=>{const Pt=$.streamId,et=this.openStreams[Pt];et&&et.next($.data)},complete:()=>Object.keys(this.openStreams).forEach($=>{const Pt=this.openStreams[$];Pt&&(Pt.complete(),delete this.openStreams[$])})}))}unsubscribeIfAbandoned(){Object.keys(this.openStreams).length===0&&this.subscription&&(this.subscription.unsubscribe(),this.subscription=void 0)}}function Q(Dt,$){const Pt=$?Ot(Dt,$):Dt;return new V(Pt)}class V{constructor($){this.portLink=$,this.channelCounter=1,this.incomingChannels=new at(this.portLink.incomingMessages.map(Pt=>Pt.data).filter(R).map(Pt=>({streamId:Pt.channel,data:Pt})))}stream($,...Pt){return new A.RE(et=>{const it=this.getNextChannelId();this.postMessage({channel:it,verb:"OPEN",method:$,params:Pt});let z;const ut=this.incomingChannels.streamWithId(it).subscribe(wt=>{if(H(wt)){if(z!==void 0&&wt.sequence<=z)return;et.next(wt.data),z=wt.sequence}});return()=>{this.postMessage({channel:it,verb:"CLOSE"}),ut.unsubscribe()}})}send($,...Pt){const et=this.getNextChannelId();return this.postMessage({channel:et,verb:"SEND",method:$,params:Pt}),this.incomingChannels.streamWithId(et).filter(Zt).waitForFirst().then(z=>{if(I(z))throw new tt(z.errorMessage);return z.data})}postMessage($){this.portLink.sendMessage({data:$,transfer:Et($)}
1)}getNextChannelId(){return this.channelCounter++}}class tt extends A.aS{}function Et(Dt){if(Dt.verb==="SEND")return Dt.params.filter(kt)}function kt(Dt){return Dt instanceof MessagePort}function Zt(Dt){return H(Dt)||I(Dt)}function se(Dt,$,Pt){return Dt[Pt.methodName]===$}function ve(Dt,$,Pt,et,it){const z=it?Ot(Dt,it):Dt;new ue(z,$,Pt,et).start()}class ue{constructor($,Pt,et,it){this.portLink=$,this.adapterConnection=Pt,this.description=et,this.errorHandler=it,this.incomingMessages=$.incomingMessages.map(z=>z.data).filter(R),this.incomingChannels=new at(this.incomingMessages.map(z=>({streamId:z.channel,data:z})))}start(){this.incomingMessages.subscribe($=>{q($)?this.handleOpenStreamMessage($):vt($)&&this.handleSendMessage($)})}handleOpenStreamMessage($){const Pt=St($),et=this.adapterStreamForInvocation(Pt);if(!et)return;const it=$.channel;let z=1;const ut=et.subscribe(wt=>{this.postMessage({verb:"RESPOND",data:wt,channel:it,sequence:z}),z++});this.incomingChannels.streamWithId(it).filter(Y).waitForFirst().then(()=>ut.unsubscribe()).catch(wt=>{if(ut.unsubscribe(),!(wt instanceof A.d1))throw wt})}adapterStreamForInvocation($){if(se(this.description,a,$))return this.adapterConnection.stream($.methodName,...$.params);if(se(this.description,D,$))return this.adapterConnection.stream($.methodName,...$.params)}handleSendMessage($){const Pt=St($);se(this.description,p,Pt)&&this.adapterConnection.send(Pt.methodName,...Pt.params).then(et=>this.postMessage({verb:"RESPOND",data:et,channel:$.channel,sequence:1}),et=>{const it=this.errorHandler(et);this.postMessage({verb:"ERROR",errorMessage:it,channel:$.channel})})}postMessage($){this.portLink.sendMessage({data:$})}}function St(Dt){return{methodName:Dt.method,params:Dt.params}}var Kt=(Dt,$,Pt)=>new Promise((et,it)=>{var z=Ft=>{try{wt(Pt.next(Ft))}catch(bt){it(bt)}},ut=Ft=>{try{wt(Pt.throw(Ft))}catch(bt){it(bt)}},wt=Ft=>Ft.done?et(Ft.value):Promise.resolve(Ft.value).then(z,ut);wt((Pt=Pt.apply(Dt,$)).next())});function zt(Dt){return{incomingMessages:(0,A.bQ)(Kt(null,null,function*(){return(yield Dt).incomingMessages})),sendMessage:$=>Kt(null,null,function*(){return(yield Dt).sendMessage($)})}}var de=Object.defineProperty,Ut=Object.getOwnPropertySymbols,Vt=Object.prototype.hasOwnProperty,re=Object.prototype.propertyIsEnumerable,fe=(Dt,$,Pt)=>$ in Dt?de(Dt,$,{enumerable:!0,configurable:!0,writable:!0,value:Pt}):Dt[$]=Pt,Se=(Dt,$)=>{for(var Pt in $||($={}))Vt.call($,Pt)&&fe(Dt,Pt,$[Pt]);if(Ut)for(var Pt of Ut($))re.call($,Pt)&&fe(Dt,Pt,$[Pt]);return Dt};function Ve(Dt,$,Pt){const et=(0,A.zE)();return $.sendMessage({remoteWindow:Dt,remoteOrigin:"*",data:Ye(et,Pt)}),$.incomingMessages.filter(it=>it.remoteWindow===Dt).map(it=>{const z=it.data;if(je(z)&&z.requestId===et&&it.ports&&it.ports.length>0)return{port:it.ports[0],origin:it.remoteOrigin}}).filter(A.Wo).waitForFirst()}function Ye(Dt,$){return Se({type:"ScrivitoConnectRequest",requestId:Dt},$)}function je(Dt){return!!Dt&&Dt.type==="ScrivitoConnectResponse"}},9421(E,C,r){r.d(C,{MZ:()=>ve,HY:()=>y,_c:()=>re,hm:()=>Pr,JD:()=>oe,Or:()=>Me,gz:()=>x,yO:()=>rn,gd:()=>Ie,g2:()=>Ur,gM:()=>Vn,x6:()=>Ft,tf:()=>Tn,R:()=>ti,X5:()=>zr,LD:()=>N,HM:()=>yr,dQ:()=>Bt,MV:()=>ir,_p:()=>Mr,g7:()=>Pe,a8:()=>dr,Xj:()=>Yn,zt:()=>j,Qk:()=>Gt,E2:()=>en,Ep:()=>ui,yd:()=>vn,If:()=>Wn,HG:()=>nr,QM:()=>b,Yy:()=>nt,yB:()=>ae});var a=r(2925),p=r.n(a),D=Object.defineProperty,A=Object.defineProperties,T=Object.getOwnPropertyDescriptors,S=Object.getOwnPropertySymbols,B=Object.prototype.hasOwnProperty,Z=Object.prototype.propertyIsEnumerable,J=(h,v,g)=>v in h?D(h,v,{enumerable:!0,configurable:!0,writable:!0,value:g}):h[v]=g,dt=(h,v)=>{for(var g in v||(v={}))B.call(v,g)&&J(h,g,v[g]);if(S)for(var g of S(v))Z.call(v,g)&&J(h,g,v[g]);return h},ht=(h,v)=>A(h,T(v)),_t=(h,v,g)=>new Promise((W,K)=>{var Nt=X=>{try{Rt(g.next(X))}catch(Wt){K(Wt)}},Yt=X=>{try{Rt(g.throw(X))}catch(Wt){K(Wt)}},Rt=X=>X.done?W(X.value):Promise.resolve(X.value).then(Nt,Yt);Rt((g=g.apply(h,v)).next())});function Ot(h){if(!h)return;const{authViaAccount:v,authViaInstance:g}=h;if(v&&g)throw new Error("authViaAccount and authViaInstance are mutually exclusive")}class R{constructor(v,g){this.fetchCallback=v,this.options=g}fetch(v,g){const W=p()({},this.options,g);return Ot(W),this.fetchCallback(v,W)}fetchWithDefaults(v,g){return this.fetch(v,p()({},g,this.options))}get(v,g){return this.fetch(v,ht(dt({},g),{method:"GET"}))}getWithoutLogin(v,g){return this.fetch(v,ht(dt({},g),{loginHandler:()=>_t(this,null,function*(){return null})}))}post(v,g){return this.fetch(v,ht(dt({},g),{method:"POST"}))}put(v,g){return this.fetch(v,ht(dt({},g),{method:"PUT"}))}patch(v,g){return this.fetch(v,ht(dt({},g),{method:"PATCH"}))}delete(v,g){return this.fetch(v,ht(dt({},g),{method:"DELETE"}))}}var st=r(6687),vt=Object.defineProperty,q=Object.defineProperties,Y=Object.getOwnPropertyDescriptors,H=Object.getOwnPropertySymbols,I=Object.prototype.hasOwnProperty,at=Object.prototype.propertyIsEnumerable,Q=(h,v,g)=>v in h?vt(h,v,{enumerable:!0,configurable:!0,writable:!0,value:g}):h[v]=g,V=(h,v)=>{for(var g in v||(v={}))I.call(v,g)&&Q(h,g,v[g]);if(H)for(var g of H(v))at.call(v,g)&&Q(h,g,v[g]);return h},tt=(h,v)=>q(h,Y(v)),Et=(h,v,g)=>new Promise((W,K)=>{var Nt=X=>{try{Rt(g.next(X))}catch(Wt){K(Wt)}},Yt=X=>{try{Rt(g.throw(X))}catch(Wt){K(Wt)}},Rt=X=>X.done?W(X.value):Promise.resolve(X.value).then(Nt,Yt);Rt((g=g.apply(h,v)).next())});function kt(h,v){return Et(this,null,function*(){const g=new AbortController,W=(0,st.wg)(()=>g.abort(),15e3),K=tt(V({},v),{signal:g.signal});try{return yield fetch(h,K)}catch(Nt){throw new oe(Zt(Nt),{url:h,method:v?.method||"GET"})}finally{clearTimeout(W)}
1})}function Zt(h){return h instanceof Error?se(h)?`${h.message}. ${String(h.cause)}`:h.message:""}function se(h){return"cause"in h&&h.cause instanceof Error}class ve extends st.aS{constructor(v,g,W,K,Nt={}){super(v),this.message=v,this.code=g,this.details=W,this.httpStatus=K,this.requestDetails=Nt}}function ue(h){try{return JSON.parse(h)}catch{throw new oe(h)}}function St(h){if(!(0,st.Gv)(h))return!1;const v=typeof h.error,g=typeof h.code,W=h.details;return v==="string"&&(g==="string"||g==="undefined")&&((0,st.Gv)(W)||W===void 0)}function Kt(h){const v=ue(h);if(St(v)){const{error:g,code:W,details:K}=v;return{message:g,code:W,details:K||{}}}throw new oe("Could not parse error response")}var zt=(h,v,g)=>new Promise((W,K)=>{var Nt=X=>{try{Rt(g.next(X))}catch(Wt){K(Wt)}},Yt=X=>{try{Rt(g.throw(X))}catch(Wt){K(Wt)}},Rt=X=>X.done?W(X.value):Promise.resolve(X.value).then(Nt,Yt);Rt((g=g.apply(h,v)).next())});class de extends ve{}function Ut(h,v){return zt(this,null,function*(){const g=yield(0,st.lK)(()=>h.text());if(h.ok)return g.length?ue(g):null;const W=h.status;if(W<500){const{message:Yt,code:Rt,details:X}=Kt(g),Wt=(0,st.hf)(Yt);throw W===403?new de(Wt,Rt,X):new ve(Wt,Rt,X,W,v)}const K=ue(g),Nt=W===500&&St(K)?K.error:g;throw new oe((0,st.hf)(Nt))})}function Vt(h){const v=URL.parse(h);if(v===null)throw new st.c1(`Invalid URL: "${h}"`);return v}class re{constructor(){this.retryCount=0}numberOfRetries(){return this.retryCount}nextDelay(){const v=Math.pow(2,Math.min(this.retryCount,16))*500;return this.retryCount++,(0,st.Cu)(v)}}var fe=(h,v,g)=>new Promise((W,K)=>{var Nt=X=>{try{Rt(g.next(X))}catch(Wt){K(Wt)}},Yt=X=>{try{Rt(g.throw(X))}catch(Wt){K(Wt)}},Rt=X=>X.done?W(X.value):Promise.resolve(X.value).then(Nt,Yt);Rt((g=g.apply(h,v)).next())});function Se(h){return fe(this,null,function*(){const v=new re;for(;;){const g=yield h();if(g.status!==429)return g;yield v.nextDelay()}})}function Ve(h){return fe(this,null,function*(){const v=new re;for(;;)try{return yield h()}catch(g){if(!(g instanceof oe))throw g;(0,st.fH)(`"${String(g)}". Retrying the request...`),yield v.nextDelay()}})}var Ye=Object.defineProperty,je=Object.defineProperties,Dt=Object.getOwnPropertyDescriptors,$=Object.getOwnPropertySymbols,Pt=Object.prototype.hasOwnProperty,et=Object.prototype.propertyIsEnumerable,it=(h,v,g)=>v in h?Ye(h,v,{enumerable:!0,configurable:!0,writable:!0,value:g}):h[v]=g,z=(h,v)=>{for(var g in v||(v={}))Pt.call(v,g)&&it(h,g,v[g]);if($)for(var g of $(v))et.call(v,g)&&it(h,g,v[g]);return h},ut=(h,v)=>je(h,Dt(v)),wt=(h,v,g)=>new Promise((W,K)=>{var Nt=X=>{try{Rt(g.next(X))}catch(Wt){K(Wt)}},Yt=X=>{try{Rt(g.throw(X))}catch(Wt){K(Wt)}},Rt=X=>X.done?W(X.value):Promise.resolve(X.value).then(Nt,Yt);Rt((g=g.apply(h,v)).next())});function Ft(h,v){return wt(this,null,function*(){var g;const W=v?.data;if(W)return Ft(h,bt(W,v));const K=v?.params;if(K)return Ft(yt(h,K),ut(z({},v),{params:void 0}));const Nt=qt(h,v),Yt=(g=v?.isIdempotent)!=null?g:v?.method!=="POST",Rt=()=>wt(null,null,function*(){return Ut(yield Se(Nt),{url:h,method:v?.method})});return Yt?Ve(Rt):Rt()})}function bt(h,v){const g=h instanceof FormData;return ut(z({},v),{headers:z(z({},v.headers),!g&&{"Content-Type":"application/json; charset=utf-8"}),body:g?h:JSON.stringify(h),data:void 0})}function qt(h,v){var g;const W=Ke(h,v);if(v?.skipAuthorization)return W;const K=(g=v?.headers)==null?void 0:g.Authorization;if(K)return()=>W(K);const Nt=v?.authProvider;return Nt?()=>Nt.authorize(W):W}function Ke(h,v){return g=>kt(h,xe(g,v))}function xe(h,v){const g=k(h,v);return h?ut(z({},v),{headers:ut(z({},v?.headers),{Authorization:h}),credentials:g}):ut(z({},v),{credentials:g})}function k(h,v){const g=v?.credentials;return g||(h||v?.skipAuthorization?"omit":"include")}function yt(h,v){const g=Vt(h);for(const[W,K]of Object.entries(v))typeof K=="string"&&g.searchParams.append(W,K);return g.toString()}function Ct(h,v){return v===""?h:`${h}/${v.replace(/^\//,"")}`}var te=(h,v,g)=>new Promise((W,K)=>{var Nt=X=>{try{Rt(g.next(X))}catch(Wt){K(Wt)}},Yt=X=>{try{Rt(g.throw(X))}catch(Wt){K(Wt)}},Rt=X=>X.done?W(X.value):Promise.resolve(X.value).then(Nt,Yt);Rt((g=g.apply(h,v)).next())});
1function ae(h,v){return te(this,null,function*(){if(!h)return v();try{return yield v()}catch(g){if(h&&Je(g))return h(g.details.visit);throw g}})}const _e="auth_check_required",Ge="auth_missing";function Je(h){return h instanceof ve&&(h.code===Ge||h.code===_e)&&"visit"in h.details&&typeof h.details.visit=="string"}var Fe=(h,v,g)=>new Promise((W,K)=>{var Nt=X=>{try{Rt(g.next(X))}catch(Wt){K(Wt)}},Yt=X=>{try{Rt(g.throw(X))}catch(Wt){K(Wt)}},Rt=X=>X.done?W(X.value):Promise.resolve(X.value).then(Nt,Yt);Rt((g=g.apply(h,v)).next())});function en(h,v,g){return Fe(this,null,function*(){return(0,st.dT)(yield Bn(h,v,g)),(0,st.Zm)()})}let yn,ln;function Wn(h){ln=h}function Bn(h,v,g){return Fe(this,null,function*(){const W=h.replace("$RETURN_TO",encodeURIComponent(bn())).replace("$JR_API_LOCATION/iam/auth",yield Tn()),K=yn||v;if(!K&&!g)return W;const Nt=new URL(W);return K&&Nt.searchParams.set("idp",K),g&&Nt.searchParams.set("prompt",g),Nt.toString()})}function bn(){const h=new URL((0,st.pb)());return ln&&h.searchParams.set(ln,""),h.toString()}(0,st.Nj)(()=>{yn=void 0,ln=void 0});var gr=Object.defineProperty,$n=Object.getOwnPropertySymbols,Ae=Object.prototype.hasOwnProperty,tn=Object.prototype.propertyIsEnumerable,on=(h,v,g)=>v in h?gr(h,v,{enumerable:!0,configurable:!0,writable:!0,value:g}):h[v]=g,qn=(h,v)=>{for(var g in v||(v={}))Ae.call(v,g)&&on(h,g,v[g]);if($n)for(var g of $n(v))tn.call(v,g)&&on(h,g,v[g]);return h},un=(h,v,g)=>new Promise((W,K)=>{var Nt=X=>{try{Rt(g.next(X))}catch(Wt){K(Wt)}},Yt=X=>{try{Rt(g.throw(X))}catch(Wt){K(Wt)}},Rt=X=>X.done?W(X.value):Promise.resolve(X.value).then(Nt,Yt);Rt((g=g.apply(h,v)).next())});function Vn(h,v){return new R((g,W)=>un(null,null,function*(){return zn(Ct(h,g),W)}),v)}function zn(h){return un(this,arguments,function*(v,{audience:g,data:W,headers:K,loginHandler:Nt,idp:Yt,prompt:Rt,method:X,params:Wt,authViaAccount:Nn,authViaInstance:_i,credentials:ei}={}){var ci;const Ei=(ci=X?.toUpperCase())!=null?ci:"GET",Si=K&&"Authorization"in K?K.Authorization:void 0,Di=sr({url:v,authorization:Si,audience:g,authViaAccount:Nn,authViaInstance:_i}),Ii=()=>Ft(v,{data:W,authProvider:Di,headers:gn(K),skipAuthorization:Si===null,params:Wt,method:Ei,credentials:ei});return Si!==void 0?Ii():Ei==="GET"?ae(yield Kn({loginHandler:Nt,idp:Yt,prompt:Rt}),Ii):Ii()})}function Kn(h){return un(this,arguments,function*({loginHandler:v,idp:g,prompt:W}){if(v)return v;if((yield rn.fetch()).loginHandler==="redirect")return K=>en(K,g,W)})}function sr({url:h,authorization:v,audience:g,authViaAccount:W,authViaInstance:K}){if(v===void 0)return ti(qn(qn({audience:g||Vt(h).origin},W&&{authViaAccount:W}),K&&{authViaInstance:K}))}function gn(h={}){return Object.fromEntries(Object.entries(h).filter(([,v])=>v!==null))}function tr(){return"jssdk/1.63.0"}let er={};function In(h,v){let g=er[h];return g||(g=new st.cY,er[h]=g,(0,st.kW)(v)),g.promise}function nr(){window._scrivitoRegisterVerificator=(h,v)=>er[h].resolve(v)}(0,st.Nj)(()=>er={});var rr=(h,v,g)=>new Promise((W,K)=>{var Nt=X=>{try{Rt(g.next(X))}catch(Wt){K(Wt)}},Yt=X=>{try{Rt(g.throw(X))}catch(Wt){K(Wt)}},Rt=X=>X.done?W(X.value):Promise.resolve(X.value).then(Nt,Yt);Rt((g=g.apply(h,v)).next())});const _r="client_verification_required";let pn,An;const Rn={authorize(h){return rr(this,null,function*(){const v=yield h(kn());if(v.status===401){const g=yield(0,st.lK)(()=>v.clone().text()),{details:W,code:K}=Kt(g);if(K===_r){if(!Hn(W))throw new oe("verification without challenge");return An=yield mr(W),this.authorize(h)}}return v})},currentState(){const h=kn();if(h)return`Authorization: ${h}`;if(pn){const v=pn.challenge;return`Pending computation: ${v.verificator.id} with ${String(v.data)}`}return null}};function mr(h){return rr(this,null,function*(){if(!pn){const{verificator:v,data:g}=h,W=rr(null,null,function*(){const K=yield In(v.id,v.url);return new Promise(Nt=>{K(g,Yt=>Nt(Yt))})});pn={challenge:{verificator:v,data:g},promise:(0,st.Qk)(W,()=>{pn=void 0})}}return pn.promise})}function Hn(h){return!!h.verificator}function kn(){if(An){if(An.expiresAfter<new Date){An=void 0;return}return An.authorization}}(0,st.Nj)(()=>{pn=void 0,An=void 0});var ar=Object.defineProperty,ur=Object.defineProperties,Jn=Object.getOwnPropertyDescriptors,cr=Object.getOwnPropertySymbols,Er=Object.prototype.hasOwnProperty,sn=Object.prototype.propertyIsEnumerable,Pn=(h,v,g)=>v in h?ar(h,v,{enumerable:!0,configurable:!0,writable:!0,value:g}):h[v]=g,an=(h,v)=>{for(var g in v||(v={}))Er.call(v,g)&&Pn(h,g,v[g]);if(cr)for(var g of cr(v))sn.call(v,g)&&Pn(h,g,v[g]);return h},_n=(h,v)=>ur(h,Jn(v)),wn=(h,v,g)=>new Promise((W,K)=>{var Nt=X=>{try{Rt(g.next(X))}catch(Wt){K(Wt)}},Yt=X=>{try{Rt(g.throw(X))}catch(Wt){K(Wt)}},Rt=X=>X.done?W(X.value):Promise.resolve(X.value).then(Nt,Yt);Rt((g=g.apply(h,v)).next())});class On extends st.aS{}let ot,M;class ft{constructor(){this.configDeferred=new st.cY}init({apiBaseUrl:v,authorizationProvider:g,priority:W,accessAsEditor:K,analyticsProvider:Nt}){this.config={apiBaseUrl:v,analyticsProvider:Nt,accessAsEditor:K,priority:W,authorizationProvider:g??Rn},this.configDeferred.resolve(this.config)}rejectRequests(){ot=!0}get(v,g){return wn(this,null,function*(){return this.requestWithTaskHandling({method:"GET",path:v,requestParam
1s:g})})}put(v,g){return wn(this,null,function*(){return this.requestWithTaskHandling({method:"PUT",path:v,requestParams:g})})}post(v,g){return wn(this,null,function*(){return this.requestWithTaskHandling({method:"POST",path:v,requestParams:g})})}delete(v,g){return wn(this,null,function*(){return this.requestWithTaskHandling({method:"DELETE",path:v,requestParams:g})})}requestVisitorSession(v,g){return wn(this,null,function*(){return this.request({method:"PUT",path:`sessions/${v}`,authorizationProvider:{authorize(W){return W(`id_token ${g}`)}}})})}currentPublicAuthorizationState(){var v,g,W,K;return(v=this.config)!=null&&v.authorizationProvider?(g=this.config)!=null&&g.authorizationProvider.currentState?`[API] ${(K=(W=this.config)==null?void 0:W.authorizationProvider.currentState())!=null?K:"null"}`:"[API]: authorization provider without currentState()":"[API]: no authorization provider"}requestWithTaskHandling(v){return wn(this,arguments,function*({method:g,path:W,requestParams:K}){const Nt=yield this.request({method:g,path:W,requestParams:K});return Re(Nt)?this.handleTask(Nt.task):Nt})}request(v){return wn(this,arguments,function*({method:g,path:W,requestParams:K,authorizationProvider:Nt}){if(ot)throw new st.Gd("Unexpected CMS backend access.");const Yt=yield this.configDeferred.promise,Rt=yield(0,st.lT)(),X=`${Yt.apiBaseUrl}/tenants/${Rt}/perform`;try{return yield ae(en,()=>Ft(X,{method:g==="POST"?"POST":"PUT",headers:Qt(Yt),data:an({path:W,verb:g,params:K},Yt.analyticsProvider&&Yt.analyticsProvider()),authProvider:he(Nt,Yt),credentials:"omit"}))}catch(Wt){throw Wt instanceof ve&&Wt.code==="precondition_not_met.workspace_not_found"?new On:Wt}})}handleTask(v){return wn(this,null,function*(){switch(v.status){case"success":return v.result;case"error":throw new ve(v.message,v.code,{});case"exception":throw new oe(v.message);case"open":{yield(0,st.uk)(2);const g=yield this.get(`tasks/${v.id}`);return this.handleTask(g)}default:throw new oe("Invalid task response (unknown status)")}})}}function Qt(h){let v={"Scrivito-Client":tr()};const g=h.priority||M;return g==="background"&&(v=_n(an({},v),{"Scrivito-Priority":g})),h.accessAsEditor&&(v=_n(an({},v),{"Scrivito-Access-As":"editor"})),v}function he(h,v){if(h===void 0)return v.authorizationProvider;if(h!==null)return h}function Re(h){return!!h&&!!h.task&&Object.keys(h).length===1}let Ie=new ft;function Te(){Ie=new ft,ot=void 0}(0,st.Nj)(Te);class oe extends st.aS{constructor(v,g){super(v),this.requestDetails=g}}const We=["gt","lt","gte","lte"],lr=["neq",...We];function yr(h){return(0,st.Gv)(h)&&"field"in h&&typeof h.field=="string"&&"operator"in h&&Qn(h.operator)&&"value"in h&&Fn(h.value)}function Qn(h){return typeof h=="string"&&lr.includes(h)}function Mr(h){return We.includes(h)}function Fn(h){return typeof h=="string"||typeof h=="number"||typeof h=="boolean"||h===null}function jn(h){return{_deleted:h,_version:""}}function ir(h){return!h._deleted}function dr(h){return!!h._deleted}function Yn(h){return h[0]==="widget"}function j(h){return h[0]==="widgetlist"}const y=["empty"];function N(h){if(!Gt(h))throw new st.Gd;return h[1]}function Bt(h){return h[0]==="empty"}function Gt(h){return h[0]==="workspace"}function Pe(h){return h[0]==="revision"}function Ne(h){return h.join(":")}var Xe=(h,v,g)=>new Promise((W,K)=>{var Nt=X=>{try{Rt(g.next(X))}catch(Wt){K(Wt)}},Yt=X=>{try{Rt(g.throw(X))}catch(Wt){K(Wt)}},Rt=X=>X.done?W(X.value):Promise.resolve(X.value).then(Nt,Yt);Rt((g=g.apply(h,v)).next())});let qe={};function vn(h,v,g){return Xe(this,null,function*(){if(Bt(h))return jn(v);try{return yield br(h).retrieve([v,g])}catch(W){if(W instanceof On)return jn(v);throw W}})}function br(h){const v=(0,st.xn)(h);let g=qe[v];return g||(g=fr(h),qe[v]=g),g}function fr(h){const[v,g]=h,W=`${v}s/${(0,st.W3)(g)}/objs/mget`,K=v==="workspace"||void 0;return new st.vL(Nt=>Xe(null,null,function*(){return(yield Ie.get(W,{ids:Nt.map(([Rt,X])=>X==="full"?Rt:[Rt]),include_deleted:K})).results.map((Rt,X)=>Rt||jn(Nt[X][0]))}),{batchSize:17})}(0,st.Nj)(()=>qe={});function hr(h,v){const g={};
1return v?.accessVia&&(g.access_via=Ne(v.accessVia)),Ie.get(`blobs/${encodeURIComponent(h||"")}/meta_data`,g)}var Cn=(h,v,g)=>new Promise((W,K)=>{var Nt=X=>{try{Rt(g.next(X))}catch(Wt){K(Wt)}},Yt=X=>{try{Rt(g.throw(X))}catch(Wt){K(Wt)}},Rt=X=>X.done?W(X.value):Promise.resolve(X.value).then(Nt,Yt);Rt((g=g.apply(h,v)).next())});const ai=new st.vL(h=>Cn(null,null,function*(){const{results:v}=yield Ie.get("blobs/mget",{blobs:h});return v.map(g=>g)}));function Nr(h,v,g){const W={id:h};return v&&(W.transformation=v),g?.accessVia&&(W.access_via=Ne(g.accessVia)),ai.retrieve(W)}var Qr=(h,v,g)=>new Promise((W,K)=>{var Nt=X=>{try{Rt(g.next(X))}catch(Wt){K(Wt)}},Yt=X=>{try{Rt(g.throw(X))}catch(Wt){K(Wt)}},Rt=X=>X.done?W(X.value):Promise.resolve(X.value).then(Nt,Yt);Rt((g=g.apply(h,v)).next())});function $r(h,v){return Qr(this,null,function*(){try{return yield Ie.get(`workspaces/${h}/objs/search`,v)}catch(g){if(g instanceof On)return{facets:[[]]};throw g}})}var Yr=(h,v,g)=>new Promise((W,K)=>{var Nt=X=>{try{Rt(g.next(X))}catch(Wt){K(Wt)}},Yt=X=>{try{Rt(g.throw(X))}catch(Wt){K(Wt)}},Rt=X=>X.done?W(X.value):Promise.resolve(X.value).then(Nt,Yt);Rt((g=g.apply(h,v)).next())});function Zr(h,v,g){return Yr(this,null,function*(){try{return yield Ie.get(`objs/${g}/diff`,{from:Ne(h),to:Ne(v)})}catch(W){if(W instanceof On)return{};throw W}})}var Gn=(h,v,g)=>new Promise((W,K)=>{var Nt=X=>{try{Rt(g.next(X))}catch(Wt){K(Wt)}},Yt=X=>{try{Rt(g.throw(X))}catch(Wt){K(Wt)}},Rt=X=>X.done?W(X.value):Promise.resolve(X.value).then(Nt,Yt);Rt((g=g.apply(h,v)).next())});function xn(h,v){return Gn(this,null,function*(){try{const{results:g,total:W,continuation:K,objs:Nt}=yield Ie.get(`workspaces/${h}/objs/search`,v);return{results:g.map(Yt=>Yt.id),continuation:K,total:W,objs:Nt}}catch(g){if(g instanceof On)return{results:[],total:0};throw g}})}var Xr=(h,v,g)=>new Promise((W,K)=>{var Nt=X=>{try{Rt(g.next(X))}catch(Wt){K(Wt)}},Yt=X=>{try{Rt(g.throw(X))}catch(Wt){K(Wt)}},Rt=X=>X.done?W(X.value):Promise.resolve(X.value).then(Nt,Yt);Rt((g=g.apply(h,v)).next())});function Lr(h,v){return Xr(this,null,function*(){try{return yield Ie.put(`workspaces/${h}/objs/search/suggest`,v)}catch(g){if(g instanceof On)return{results:[]};throw g}})}let Ur={retrieveObjQuery(h,v){return xn(h,v)},retrieveFacetQuery(h,v){return $r(h,v)},retrieveSuggest(h,v){return Lr(h,v)},retrieveBinaryMetadata(h,v){return hr(h,v)},retrieveBinaryUrls(h,v,g){return Nr(h,v,g)},retrieveObjFieldDiffs(h,v,g){return Zr(h,v,g)}};function ui(h){Ur=h}const Pr=Vn("https://api.justrelate.com");var Sr=(h,v,g)=>new Promise((W,K)=>{var Nt=X=>{try{Rt(g.next(X))}catch(Wt){K(Wt)}},Yt=X=>{try{Rt(g.throw(X))}catch(Wt){K(Wt)}},Rt=X=>X.done?W(X.value):Promise.resolve(X.value).then(Nt,Yt);Rt((g=g.apply(h,v)).next())});function Vr(h){qr(h);const{access_token:v,expires_in:g}=h;return{token:v,expiresAt:new Date(Date.now()+g*1e3)}}function qr(h){if(!(h&&typeof h=="object"&&"access_token"in h&&typeof h.access_token=="string"&&"expires_in"in h&&typeof h.expires_in=="number"))throw new st.Gd(JSON.stringify(h))}const rn=new st.s9;function Tn(h=""){return Sr(this,null,function*(){const v=(yield rn.fetch()).iamAuthLocation;if(!v)throw new st.Gd;return Ct(v,h)})}function zr(h,v){const g=N(h);return Ie.get(`workspaces/${g}/changes`,{from:v})}var wr=(h,v,g)=>new Promise((W,K)=>{var Nt=X=>{try{Rt(g.next(X))}catch(Wt){K(Wt)}},Yt=X=>{try{Rt(g.throw(X))}catch(Wt){K(Wt)}},Rt=X=>X.done?W(X.value):Promise.resolve(X.value).then(Nt,Yt);Rt((g=g.apply(h,v)).next())});function Wr(h){return wr(this,arguments,function*({audience:v,origin:g,authViaAccount:W,authViaInstance:K}){const Nt=yield Tn(),Yt=W?`account/${W}`:`instance/${K||(yield(0,st.lT)())}`;try{const Rt=yield Ft(`${Nt}/${Yt}/token`,{params:{audience:v,origin:g}});return Vr(Rt)}catch(Rt){throw Kr(Rt,Nt)}})}function Kr(h,v){return Je(h)?new ve(h.message,h.code,{visit:h.details.visit.replace("$JR_AUTH_LOCATION",v)}):h}var pr=(h,v,g)=>new Promise((W,K)=>{var Nt=X=>{try{Rt(g.next(X))}catch(Wt){K(Wt)}},Yt=X=>{try{Rt(g.throw(X))}catch(Wt){K(Wt)}},Rt=X=>X.done?W(X.value):Promise.resolve(X.value).then(Nt,Yt);Rt((g=g.apply(h,v)).next())});let Hr={};function ti(h){const v=(0,st.xn)(h),g=Hr[v];if(g)return g;const W=new Me(()=>pr(null,null,function*(){const{iamTokenFetcher:K}=yield rn.fetch();return K?K(h):Wr(h)}));return Hr[v]=W,W}(0,st.Nj)(()=>Hr={});var w=(h,v,g)=>new Promise((W,K)=>{var Nt=X=>{try{Rt(g.next(X))}catch(Wt){K(Wt)}},Yt=X=>{try{Rt(g.throw(X))}catch(Wt){K(Wt)}},Rt=X=>X.done?W(X.value):Promise.resolve(X.value).then(Nt,Yt);Rt((g=g.apply(h,v)).next())});class x{constructor(){this.sessionId=(0,st.zE)(),this.idToken=new st.cY,this.state="waiting for token",this.sessionRequest=this.fetchSession()}setToken(v){this.idToken.isPending()||(this.idToken=new st.cY,this.renewSession()),this.idToken.resolve(v),this.state=`active - token: ${v.substr(0,3)}...`}currentState(){return this.state}authorize(v){return w(this,null,function*(){const g=this.sessionRequest;let W;try{W=yield g}catch{return Rn.authorize(v)}const K=yield v(`Session ${W.token}`);return K.status===401?(this.sessionRequest===g&&this.renewSession(),this.authorize(v)):K})}renewSession(){this.sessionRequest=this.fetchSession()}fetchSession(){return w(this,null,function*(){try{const v=yield this.idToken;return yield Ie.requestVisitorSession(this.sessionId,v)}catch(v){throw(0,st.JL)(new st.aS(`Failed to establish visitor session: ${v.message}`)),v}})}}
1function nt(h,v){ir(h)&&Object.keys(h).forEach(g=>{if(!(0,st.iI)(g)){const K=h[g];if(!K)return;v(K,g);return}if(g!=="_widget_pool")return;const W=h._widget_pool;W&&Object.keys(W).forEach(K=>{const Nt=W[K];Nt&&Object.keys(Nt).forEach(Yt=>{if((0,st.iI)(Yt))return;const Rt=Nt[Yt];Rt&&v(Rt,Yt,K)})})})}var Lt=(h,v,g)=>new Promise((W,K)=>{var Nt=X=>{try{Rt(g.next(X))}catch(Wt){K(Wt)}},Yt=X=>{try{Rt(g.throw(X))}catch(Wt){K(Wt)}},Rt=X=>X.done?W(X.value):Promise.resolve(X.value).then(Nt,Yt);Rt((g=g.apply(h,v)).next())});class ce extends st.aS{constructor(v,g,W,K={}){super(v),this.message=v,this.code=g,this.httpStatus=W,this.requestDetails=K}}class Me{constructor(v){this.fetchToken=v}authorize(v){return Lt(this,null,function*(){return this.authorizeAbstract(g=>Lt(this,null,function*(){const W=yield v(g?`Bearer ${g}`:void 0);if(W.status!==401)return{result:W};const K=W.headers.get("content-type");if(!K?.includes("application/json"))return{authenticationFailed:Le()};const Nt=W.clone(),Yt=yield(0,st.lK)(()=>Lt(this,null,function*(){try{return Nt.json()}catch{return Promise.resolve()}}));return!St(Yt)||!Yt.code?{authenticationFailed:Le()}:{authenticationFailed:{error:Yt.error,code:Yt.code,details:Yt.details}}}))})}authorizeAbstract(v){return Lt(this,null,function*(){const g=new re;let W=!1;for(;;){yield this.resetTokenIfExpired(),this.fetchTokenPromise||(this.fetchTokenPromise=Lt(this,null,function*(){W&&(yield g.nextDelay()),W=!0;try{return yield this.fetchToken()}catch(Nn){throw Nn instanceof ve&&Nn.httpStatus===404?new ce(Nn.message,Nn.code,Nn.httpStatus,Nn.requestDetails):Nn}}));const K=this.fetchTokenPromise,Nt=yield K,Yt=yield v(Nt?.token);if("result"in Yt)return Yt.result;const{authenticationFailed:{error:Rt,code:X,details:Wt={}}}=Yt;if(Yt.authenticationFailed.code===_e)throw new ve(Rt,X,Wt);K===this.fetchTokenPromise&&(this.fetchTokenPromise=void 0)}})}resetTokenIfExpired(){return Lt(this,null,function*(){if(!this.fetchTokenPromise)return;let v;try{v=yield this.fetchTokenPromise}catch{return}v&&v.expiresAt.getTime()<=Date.now()&&(this.fetchTokenPromise=void 0)})}injectToken(v){this.fetchTokenPromise=Promise.resolve({token:v,expiresAt:new Date(864e13)})}}function Le(){return{error:"authentication invalid",code:"auth_missing"}}var be=(h,v,g)=>new Promise((W,K)=>{var Nt=X=>{try{Rt(g.next(X))}catch(Wt){K(Wt)}},Yt=X=>{try{Rt(g.throw(X))}catch(Wt){K(Wt)}},Rt=X=>X.done?W(X.value):Promise.resolve(X.value).then(Nt,Yt);Rt((g=g.apply(h,v)).next())});function b(h){return be(this,null,function*(){const v=yield l();return yield P(v,h),lt(v.uploadId)})}function l(){return be(this,null,function*(){return yield Pr.get(`${yield pt()}/upload-permission`)})}function P(h,v){return be(this,null,function*(){const W=new re;for(;W.numberOfRetries()<=3;){let K;try{K=yield fetch(h.putUrl,{method:"PUT",body:v})}catch{}if(K){if(K.ok)return;if(K.status<500&&K.status!==429)throw new st.aS(`Binary upload failed with status ${K.status}`)}yield W.nextDelay()}throw new oe("Binary upload failed after maximum retries")})}function lt(h){return be(this,null,function*(){const{results:[v]}=yield Pr.get(`${yield pt()}/file`,{params:{upload_id:h}});return v.id})}function pt(){return be(this,null,function*(){return`ingest/instance/${yield(0,st.lT)()}`})}},6687(E,C,r){r.d(C,{c1:()=>A,Oh:()=>ui,vL:()=>Kn,tQ:()=>Jn,s9:()=>Er,hl:()=>ht,_U:()=>Tn,l9:()=>ti,cY:()=>_t,l6:()=>Pt,d1:()=>mr,Gd:()=>T,EH:()=>zr,aS:()=>D,RE:()=>Rn,B7:()=>ur,fk:()=>Ye,bQ:()=>ar,Y3:()=>Vn,dT:()=>he,W3:()=>qn,uV:()=>un,Go:()=>In,xQ:()=>Se,IH:()=>Ne,H5:()=>er,Lu:()=>a,OV:()=>p,FQ:()=>j,xn:()=>sr,h_:()=>te,P3:()=>yn,pb:()=>On,u4:()=>Qr,uS:()=>_e,A_:()=>Ct,w0:()=>k,Y5:()=>wn,yJ:()=>dt,aI:()=>Bn,uw:()=>bn,_Q:()=>Dt,PX:()=>cr,lT:()=>Cn,A:()=>Je,Ly:()=>hr,YE:()=>oe,YX:()=>kt,Hj:()=>Mr,eU:()=>We,On:()=>Yr,qf:()=>Vr,Dz:()=>re,Po:()=>Yn,fo:()=>qr,p1:()=>Pr,M7:()=>Xe,Gv:()=>xn,Wo:()=>ue,qA:()=>Xr,Bo:()=>jn,iI:()=>je,Qr:()=>Fe,Rq:()=>ae,zh:()=>yt,zB:()=>Sr,qg:()=>Zt,kW:()=>se,vV:()=>S,fH:()=>B,Zm:()=>sn,dY:()=>st,LD:()=>Kr,Nj:()=>Ft,D1:()=>M,BA:()=>lr,kA:()=>yr,gi:()=>Gn,zw:()=>rr,Qf:()=>Ge,aO:()=>Y,Qk:()=>on,Pi:()=>Zr,M4:()=>_n,nw:()=>ut,zE:()=>wt,lK:()=>N,yQ:()=>ft,K5:()=>Qt,G$:()=>Ie,_0:()=>Re,Bd:()=>Et,Jf:()=>Ot,nj:()=>Te,hT:()=>Bt,VG:()=>Qn,o3:()=>Ve,rK:()=>ai,yb:()=>Pe,cN:()=>$r,wg:()=>Gt,VC:()=>pr,nF:()=>Ke,Ht:()=>J,JL:()=>q,B6:()=>wr,YB:()=>$,YY:()=>fr,z9:()=>fe,hf:()=>qt,uk:()=>ln,Cu:()=>Wn,e_:()=>ot});function a(w,x){let nt=!1,Lt;return(...ce)=>{Lt=ce,!nt&&(w(()=>{nt=!1;const Me=Lt;Lt=void 0,x(...Me)}),nt=!0)}}function p(w,x){let nt=[],Lt=!1;return Le=>{nt.push(Le),ce()};function ce(){Lt||(Lt=!0,w(()=>{try{Me()}finally{Lt=!1,nt.length>0&&ce()}}))}function Me(){const Le=[];try{for(;nt.length>0;){const be=nt;nt=[],x(be).forEach(b=>Le.push(b))}}finally{nt.forEach(be=>Le.push(be)),nt=Le}}}
1class D extends Error{constructor(x){super(x);const nt=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,nt):this.__proto__=nt}get name(){return this.constructor.name}}class A extends D{constructor(x){super(x)}}class T extends D{constructor(x){super(x??"Scrivito internal error")}}function S(...w){return Z("error",...w)}function B(...w){return Z("info",...w)}function Z(w,...x){console[w](...x)}function J(w,x,{docPermalink:nt,severity:Lt}){const ce=`Invalid arguments for '${w}': ${x}. Visit ${dt(nt)} for more information.`;if(Lt==="warning")S(ce);else throw new A(ce)}function dt(w){return`https://docs.scrivito.com/${w}`}class ht{current(){return this.currentContext}runWith(x,nt){const Lt=this.currentContext;try{return this.currentContext=x,nt()}finally{this.currentContext=Lt}}}class _t{constructor(){this.promise=new Promise((x,nt)=>{this.resolve=Lt=>{this.settled=!0,x(Lt)},this.reject=Lt=>{this.settled=!0,nt(Lt)}})}isPending(){return!this.settled}then(x,nt){return this.promise.then(x,nt)}}function Ot(w){var x;const nt=w.trim();if(URL.canParse(nt))return nt;if(nt.match(/^[^/@]+@[^/@]+$/)){const Lt=`mailto:${nt}`;if(URL.canParse(Lt))return Lt}if(nt.startsWith("/")||nt.match(/^\w+:/))return nt;if(nt.includes(".")){const Lt=`https://${nt}`,ce=(x=URL.parse(Lt))==null?void 0:x.hostname;if(ce&&!ce.includes("_"))return Lt}return nt}let R=vt;function st(w){R(w)}function vt(w){Gt(w,0)}function q(w){st(()=>{throw w})}function Y(w){try{return typeof w=="function"?I(w):xn(w)?H(w):V(w)}catch{return""}}function H(w){const x=w._scrivitoPrivateContent;return x&&typeof x.toPrettyPrint=="function"?x.toPrettyPrint():"outerHTML"in w?`[object HTMLElement ${V(w.outerHTML)}]`:V(w)}function I(w){return at(w)?`[class ${w._scrivitoPrivateSchema.name()}]`:Q(w)?`[class React.Component "${w.displayName||w.name}"]`:tt(w.toString())}function at(w){return!!w._scrivitoPrivateSchema}function Q(w){const x=w.prototype;return x&&x.isReactComponent}function V(w){const x=JSON.stringify(w);return x&&tt(x)}function tt(w){return w.length>100?`${w.slice(0,100)}...`:w}function Et(w){try{return{errorThrown:!1,result:w()}}catch(x){return{errorThrown:!0,error:x}}}function kt(){return"1.63.0"}function Zt(w,x=window.document){const nt=x.createElement("link");nt.rel="stylesheet",nt.href=w,ve(x.head,nt)}function se(w,x=window.document){const nt=x.createElement("script");nt.src=w,ve(x.head,nt)}function ve(w,x){w.appendChild(x)}function ue(w){return w!=null}const St=/(_+)(\w)/g,Kt=/([A-Z])/g,zt=/[A-Z]+|\d+/g,de=/^_?(_+[A-Z0-9]|[^_])+$/,Ut=/[_\s]+/g,Vt=/[A-Z][a-z]+/g;function re(w){return de.test(w)}function fe(w){const x=w.replace(Kt,(nt,Lt)=>`_${Lt.toLowerCase()}`);return x[0]==="_"&&w[0]!=="_"?x.substring(1):x}function Se(w){return w.replace(St,(x,nt,Lt,ce)=>!ce||Lt.toUpperCase()===Lt?x:`${nt.substr(1)}${Lt.toUpperCase()}`)}function Ve(w){return w.replace(Ut," ").replace(Vt,x=>` ${x.toLowerCase()}`).replace(zt,x=>` ${x}`).trim().replace(/./,x=>x.toUpperCase())}class Ye{constructor(x){this.next=typeof x=="object"?x.next.bind(x):x}map(x){return new Ye(()=>{const nt=this.next();return nt.done?{done:!0}:{value:x(nt.value)}})}filter(x){const nt=()=>{const Lt=this.next();if(Lt.done)return{done:!0};const ce=Lt.value;return x(ce)?{value:ce}:nt()};return new Ye(nt)}takeWhile(x){let nt=!1;return new Ye(()=>{if(nt)return{done:!0};const Lt=this.next();if(Lt.done)return{done:!0};const ce=Lt.value;return x(ce)?{value:ce}:(nt=!0,{done:!0})})}}function je(w){return w[0]==="_"}function Dt(w,x){const nt=[];for(;nt.length!==x;){const Lt=w.next();if(Lt.done)return nt;nt.push(Lt.value)}return nt}function $(w,x){return new it(w,x)}class Pt{iterator(){return new et}iteratorFromContinuation(x){return new et}}class et{next(){return{done:!0}}continuation(){}}class it{constructor(x,nt){this.iterable=x,this.transform=nt}iterator(){return new z(this.iterable.iterator(),this.transform)}iteratorFromContinuation(x){return new z(this.iterable.iteratorFromContinuation(x),this.transform)}}class z{constructor(x,nt){this.iterator=x,this.transformedIterator=nt(new Ye(x))}next(){return this.transformedIterator.next()}continuation(){return this.iterator.continuation()}}function ut(){let w=Math.floor(Math.random()*Math.pow(16,8)).toString(16);for(;w.length<8;)w=`0${w}`;return w}function wt(){return ut()+ut()}function Ft(w){}let bt=!1;function qt(w){return bt?`${w} #HoneybadgerUnique`:w}function Ke(w,x){let nt=0,Lt,ce;function Me(){clearTimeout(Lt),Lt=void 0,nt=Date.now(),w(...ce)}return function(...Le){ce=Le;const be=nt+x-Date.now();be<=0?Me():Lt||(Lt=Gt(Me,be))}}const xe=/^(\d{4})(\d\d)(\d\d)(\d\d)(\d\d)(\d\d)$/;function k(w){return typeof w=="string"&&w.match(/^-?\d+$/)||typeof w=="number"?yn(w):null}function yt(w){return ae(w)&&Number.isSafeInteger(w)}function Ct(w){return te(parseFloat(w))}function te(w){return ae(w)?w:null}function ae(w){return typeof w=="number"&&isFinite(w)}
1function _e(w){if(typeof w!="string")return null;if(!Fe(w))throw new T;return Ge(w)}function Ge(w){if(!w)return null;const x=w.match(xe);if(!x)return null;const[,nt,Lt,ce,Me,Le,be]=x,b=parseInt(nt,10),l=parseInt(Lt,10),P=parseInt(ce,10),lt=parseInt(Me,10),pt=parseInt(Le,10),h=parseInt(be,10);return new Date(Date.UTC(b,l-1,P,lt,pt,h))}function Je(w){const x=`${w.getUTCFullYear()}${en(w.getUTCMonth()+1)}`,nt=`${en(w.getUTCDate())}${en(w.getUTCHours())}`,Lt=`${en(w.getUTCMinutes())}${en(w.getUTCSeconds())}`;return`${x}${nt}${Lt}`}function Fe(w){return typeof w=="string"&&!!w.match(/^\d{14}$/)}function en(w){return w<10?`0${w}`:w}function yn(w){const x=parseInt(w.toString(),10);return x===0?0:yt(x)?x:null}function ln(w){return Wn(w*1e3)}function Wn(w){return new Promise(x=>{Gt(x,w)})}function Bn(w,x){return w===x?!0:$n(w)&&$n(x)?w.equals(x):tn(w)&&tn(x)?Bn(w._scrivitoPrivateContent,x._scrivitoPrivateContent):Array.isArray(w)&&Array.isArray(x)?w.length===x.length&&w.every((nt,Lt)=>Bn(nt,x[Lt])):Ae(w)&&Ae(x)?w.valueOf()===x.valueOf():!1}function bn(w,x){return gr(w,x)}function gr(w,x,nt=1){return w===x?!0:$n(w)&&$n(x)?w.equals(x):tn(w)&&tn(x)?gr(w._scrivitoPrivateContent,x._scrivitoPrivateContent,nt):Array.isArray(w)&&Array.isArray(x)&&nt<=3&&w.length<=3&&x.length<=3&&w.length===x.length?w.every((Lt,ce)=>gr(Lt,x[ce],nt+1)):Ae(w)&&Ae(x)?w.valueOf()===x.valueOf():!1}function $n(w){return w?typeof w.equals=="function":!1}function Ae(w){return w?typeof w.valueOf=="function":!1}function tn(w){return w?w.hasOwnProperty("_scrivitoPrivateContent"):!1}function on(w,x){return w.then(nt=>(x(),nt),nt=>{throw x(),nt})}function qn(w){if(w==null)throw new T;return w}function un(w){if(typeof w!="string")throw new T;return w}function Vn(w){const x=new URL(w),nt=x.pathname.replace(/^(\/scrivito(?=\/|$))+/i,"");return nt===x.pathname?null:(x.pathname=nt,x.href)}var zn=(w,x,nt)=>new Promise((Lt,ce)=>{var Me=b=>{try{be(nt.next(b))}catch(l){ce(l)}},Le=b=>{try{be(nt.throw(b))}catch(l){ce(l)}},be=b=>b.done?Lt(b.value):Promise.resolve(b.value).then(Me,Le);be((nt=nt.apply(w,x)).next())});class Kn{constructor(x,{batchSize:nt}={}){this.scheduleItem=p(st,Lt=>{const ce=Lt.splice(0,this.batchSize),Me=ce.map(Le=>Le.key);return zn(this,null,function*(){try{const Le=yield this.mget(Me);ce.forEach((be,b)=>zn(this,[be,b],function*({key:l,deferred:P},lt){if(lt<Le.length){const pt=Le[lt];P.resolve(pt)}else try{const pt=yield this.retrieve(l);P.resolve(pt)}catch(pt){P.reject(pt)}}))}catch(Le){ce.forEach(be=>be.deferred.reject(Le))}}),Lt}),this.mget=x,this.batchSize=nt||100}retrieve(x){const nt=new _t;return this.scheduleItem({key:x,deferred:nt}),nt.promise}}function sr(w){const x=gn(w);return JSON.stringify(x)}function gn(w){return Array.isArray(w)?w.map(gn):tr(w)?Object.keys(w).sort().map(x=>[x,gn(w[x])]):w}function tr(w){return xn(w)}function er(w,x){const{clientX:nt,clientY:Lt}=w,{left:ce,top:Me}=x.getBoundingClientRect();return{x:nt-ce,y:Lt-Me}}function In(w){return Object.entries(w).flatMap(([x,nt])=>(Array.isArray(nt)?nt:[nt]).map(Lt=>nr(x,Lt))).join("&")}function nr(w,x){return x===null?encodeURIComponent(w):[encodeURIComponent(w),encodeURIComponent(x)].join("=")}function rr(w){const x=_r(w),nt={};for(const[Lt,ce]of new URLSearchParams(x)){const Me=pn(Lt),Le=An(ce);if(Me in nt){const be=nt[Me];nt[Me]=Array.isArray(be)?[...be,Le]:[be,Le]}else nt[Me]=Le}return nt}function _r(w){return w.replace(/=/g,"==")}function pn(w){return w.replace(/==/g,"=")}function An(w){return w?pn(w.slice(1)):null}class Rn{constructor(x){this.subscribeFunction=x}subscribe(x){const nt=new Hn(typeof x=="object"?x:{next:x}),Lt=this.subscribeFunction(nt);return nt.setUnsubscribeCallback(typeof Lt=="object"?()=>Lt.unsubscribe():Lt),nt}map(x){return new Rn(nt=>this.subscribe({next:Lt=>nt.next(x(Lt)),complete:()=>nt.complete()}))}filter(x){return new Rn(nt=>this.subscribe({next:Lt=>{x(Lt)&&nt.next(Lt)},complete:()=>nt.complete()}))}toPromise(){return new Promise(x=>{let nt;this.subscribe({next(Lt){nt=Lt},complete(){x(nt)}})})}takeOne(){return new Rn(x=>{let nt=null;return nt=this.subscribe({next:Lt=>{nt&&nt.unsubscribe(),x.next(Lt),x.complete()},complete:()=>{x.complete()}}),x.isClosed()&&nt.unsubscribe(),nt})}waitForFirst(){return new Promise((x,nt)=>{let Lt=!1;this.takeOne().subscribe({next(ce){Lt=!0,x(ce)}
1,complete(){Lt||nt(new mr)}})})}takeUntil(x){return new Rn(nt=>{let Lt,ce;if(ce=this.subscribe({next(be){nt.next(be)},complete(){Me()}}),ce.isClosed())return()=>{};Lt=x.subscribe({next(){Me()},complete(){Me()}});function Me(){nt.complete(),Le()}function Le(){ce&&ce.unsubscribe(),Lt&&Lt.unsubscribe()}return Le})}}class mr extends D{}class Hn{constructor(x){this.subscriber=x}next(x){this.subscriber&&this.subscriber.next&&this.subscriber.next(x)}complete(){this.subscriber&&this.subscriber.complete&&this.subscriber.complete(),this.subscriber=void 0}unsubscribe(){this.subscriber&&(this.subscriber=void 0,this.unsubscribeCallback&&this.unsubscribeCallback.apply(void 0))}isClosed(){return!this.subscriber}setUnsubscribeCallback(x){this.unsubscribeCallback=x}}var kn=(w,x,nt)=>new Promise((Lt,ce)=>{var Me=b=>{try{be(nt.next(b))}catch(l){ce(l)}},Le=b=>{try{be(nt.throw(b))}catch(l){ce(l)}},be=b=>b.done?Lt(b.value):Promise.resolve(b.value).then(Me,Le);be((nt=nt.apply(w,x)).next())});function ar(w){return new Rn(x=>{let nt;return kn(null,null,function*(){try{const Lt=yield w;if(x.isClosed())return;nt=Lt.subscribe(x)}catch(Lt){throw x.complete(),Lt}}),()=>{nt&&nt.unsubscribe()}})}class ur extends Rn{constructor(){super(x=>{if(this.isCompleted)return x.complete(),()=>{};const nt=(this.subscriberIdCounter++).toString();return this.subscribers[nt]=x,this.onNewSubscriber(x),()=>{delete this.subscribers[nt]}}),this.subscribers={},this.subscriberIdCounter=1,this.isCompleted=!1}next(x){Object.keys(this.subscribers).forEach(nt=>{this.subscribers[nt].next(x)})}complete(){Object.keys(this.subscribers).forEach(x=>this.subscribers[x].complete()),this.subscribers={},this.isCompleted=!0}subscriberCount(){return Object.keys(this.subscribers).length}isClosed(){return this.isCompleted}onNewSubscriber(x){}}class Jn extends ur{constructor(x){super(),this.value=x}next(x){this.value!==x&&(this.value=x,super.next(x))}onNewSubscriber(x){x.next(this.value)}}function cr(w){const x=/^([\s\S]+?[.!?])\s+([\s\S]+)/.exec(w);return x?[x[1],x[2]||void 0]:[w,void 0]}class Er{constructor(){this.configDeferred=new _t}set(x){if(this.storedConfig!==void 0)throw new T;this.configDeferred.resolve(x),this.storedConfig={config:x}}get(){if(this.storedConfig===void 0)throw new T;return this.storedConfig.config}fetch(){return this.configDeferred}hasBeenSet(){return this.storedConfig!==void 0}reset(){this.configDeferred=new _t,this.storedConfig=void 0}}function sn(){return new Promise(()=>{})}const Pn=/\s+/g,an=" ";function _n(w){return w.trim().replace(Pn,an)}function wn(w=window){return w.devicePixelRatio||1}function On(){return Fn().href}function ot(){return Fn().origin}function M(w,x){return window.open(w,x)}function ft(){Fn().reload()}function Qt(w){window.name=w}function he(w){Fn().assign(w)}function Re(w){Fn().replace(w)}function Ie(w,x,nt){window.history.replaceState(w,x,nt)}function Te(){return window.screen}function oe(){return document}function We(){return window.innerHeight}function lr(){return window.pageXOffset}function yr(){return window.pageYOffset}function Qn(w,x){window.scrollTo(w,x)}function Mr(){return oe().body.scrollHeight}function Fn(){return window.location}function jn(w){return Array.isArray(w)&&w.every(x=>typeof x=="string")}var ir=r(5020),dr=r.n(ir);function Yn(w){return w===null||(typeof w=="string"||Array.isArray(w))&&dr()(w)}function j(w){const x=["/"];if(w==="/")return x;const nt=w.split("/").slice(1);let Lt="";return nt.forEach(ce=>{Lt=`${Lt}/${ce}`,x.push(Lt)}),x}var y=(w,x,nt)=>new Promise((Lt,ce)=>{var Me=b=>{try{be(nt.next(b))}catch(l){ce(l)}},Le=b=>{try{be(nt.throw(b))}catch(l){ce(l)}},be=b=>b.done?Lt(b.value):Promise.resolve(b.value).then(Me,Le);be((nt=nt.apply(w,x)).next())});function N(w){return y(this,null,function*(){return w()})}function Bt(w,x){w.scrollIntoView(x)}function Gt(w,x){return setTimeout(w,x)}function Pe(w,x){return setInterval(w,x)}function Ne(){return`https://assets.scrivito.com/sjs/${kt()}`}function Xe(w){return w.ctrlKey||w.metaKey||w.shiftKey}var qe=(w,x,nt)=>new Promise((Lt,ce)=>{var Me=b=>{try{be(nt.next(b))}catch(l){ce(l)}},Le=b=>{try{be(nt.throw(b))}catch(l){ce(l)}},be=b=>b.done?Lt(b.value):Promise.resolve(b.value).then(Me,Le);be((nt=nt.apply(w,x)).next())});let vn,br=new _t;function fr(){return vn}function hr(){if(!vn)throw new T;return vn}function Cn(){return qe(this,null,function*(){const w=yield br;if(!w)throw new T;return w})}function ai(w){vn=w,br.resolve(w)}let Nr;function Qr(){if(!Nr)throw new T;return Nr()}function $r(w){Nr=w}function Yr(w){return!!w.attributeName}function Zr(w,x){return Object.keys(w).every(nt=>bn(w[nt],x[nt]))}function Gn(w){return`${fe(w)}_id`}function xn(w){return w!==null&&typeof w=="object"&&!Array.isArray(w)}function Xr(w){if(!Lr(w))return!1;const{component:x,key:nt}=w;
1return typeof nt=="string"&&(x===null||typeof x=="string"||typeof x=="function"||xn(x))}function Lr(w){return xn(w)&&typeof w!="function"&&!Array.isArray(w)}var Ur=(w,x,nt)=>new Promise((Lt,ce)=>{var Me=b=>{try{be(nt.next(b))}catch(l){ce(l)}},Le=b=>{try{be(nt.throw(b))}catch(l){ce(l)}},be=b=>b.done?Lt(b.value):Promise.resolve(b.value).then(Me,Le);be((nt=nt.apply(w,x)).next())});class ui{constructor(){this.taskCounter=0}registerTask(x){return Ur(this,null,function*(){var nt;this.onDone||(this.onDone=new _t),this.taskCounter++;try{return yield x()}finally{this.taskCounter--,this.taskCounter===0&&((nt=this.onDone)==null||nt.resolve(),this.onDone=void 0)}})}waitForRegisteredTasks(){return Ur(this,null,function*(){this.onDone&&(yield this.onDone)})}hasRegisteredTasks(){return this.taskCounter>0}}function Pr(w){return/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(.\d{3})?Z$/.test(w)&&!Number.isNaN(Date.parse(w))}function Sr(w,x){return xn(w)&&"_scrivitoPrivateContent"in w&&w._scrivitoPrivateContent instanceof x}function Vr(w){return xn(w)&&"size"in w&&typeof w.size=="number"&&"type"in w&&typeof w.type=="string"}function qr(w){return Vr(w)&&"name"in w&&typeof w.name=="string"}const rn="__([a-zA-Z](?:[a-zA-Z0-9]|\\.[a-zA-Z]|(\\._id)|_(?!_)){0,100})__",Tn=new RegExp(rn,"gi"),zr=new RegExp(`^${rn}$`,"i");function wr(w){return`${w.pathname}${w.search}${w.hash}`}let Wr=[];function Kr(){window.addEventListener("focus",Hr)}function pr(w){Wr.push(w)}function Hr(){Object.values(Wr).forEach(w=>w())}const ti="#SCRIVITO_UNAVAILABLE_"},9180(E,C,r){r.d(C,{gD:()=>pn,hQ:()=>D,O2:()=>$r,UX:()=>Zr,sX:()=>ir,aM:()=>ti,C_:()=>B,D9:()=>Ge,c2:()=>cr,k0:()=>yr,HI:()=>z,fT:()=>ar,Qb:()=>Kn,km:()=>nt,ov:()=>sn,s5:()=>wr,x1:()=>zr,sv:()=>an,Fh:()=>Le,xX:()=>T,M_:()=>ce,Mm:()=>$,e7:()=>oe,X2:()=>ut,YR:()=>sr,L_:()=>zn,JL:()=>Hr,ZA:()=>Hn,Zt:()=>gn,le:()=>tr,mG:()=>S,B5:()=>Pt});var a=r(9421),p=r(6687);const D="inMemory";let A=!1;function T(){return A}function S(){A=!0}function B(b){if(A)throw new Z(b)}class Z extends p.aS{constructor(l){super(`${l} is not supported when using the in-memory tenant`)}}(0,p.Nj)(()=>A=!1);var J=r(5020),dt=r.n(J),ht=r(9477),_t=r.n(ht),Ot=Object.defineProperty,R=Object.defineProperties,st=Object.getOwnPropertyDescriptors,vt=Object.getOwnPropertySymbols,q=Object.prototype.hasOwnProperty,Y=Object.prototype.propertyIsEnumerable,H=(b,l,P)=>l in b?Ot(b,l,{enumerable:!0,configurable:!0,writable:!0,value:P}):b[l]=P,I=(b,l)=>{for(var P in l||(l={}))q.call(l,P)&&H(b,P,l[P]);if(vt)for(var P of vt(l))Y.call(l,P)&&H(b,P,l[P]);return b},at=(b,l)=>R(b,st(l));function Q(b,l){var P;if(!l||(0,a.a8)(l)||(0,a.a8)(b))return b;const lt=l._widget_pool;if(!lt)return b;const pt=I({},(P=b._widget_pool)!=null?P:{});let h,v=0;do{if(h=!1,++v>1e3)throw new p.Gd;(0,a.Yy)(at(I({},b),{_widget_pool:pt}),([g,W])=>{g==="widgetlist"&&W.forEach(K=>{pt[K]===void 0&&lt[K]!==void 0&&(pt[K]=lt[K],h=!0)})})}while(h);return at(I({},b),{_widget_pool:pt})}class V{toJSON(){return null}}const tt=new V;function Et(b){return b===tt}function kt(b,l,P){if(l===void 0)return b;if(b===void 0)return l;if(!P||(0,a.a8)(P)){if((0,a.a8)(b))return l;if((0,a.a8)(l))return b}else{if((0,a.a8)(b))return b;if((0,a.a8)(l))return l}const lt=se(P,b),pt=Zt(l,lt);return Q(pt,P)}function Zt(b,l){return Se(b,l)}function se(b,l){return b?re(b,l):l}function ve(b,l){return re(b,l)}function ue(b,l){return b?l?re(b,l):null:l||null}function St(b,l){const P=ve(b,l);return Object.keys(P).some(Kt)}function Kt(b){return!(0,p.iI)(b)||b==="_obj_class"}function zt(b,l,P){const lt=Object.keys(b),pt=new Set(Object.keys(l));lt.forEach(h=>{pt.has(h)||P(h,b[h],l[h],!1)}),pt.forEach(h=>{P(h,b[h],l[h],!0)})}function de(b,l){if(!l||dt()(l))return b;const P={};return zt(b,l,(lt,pt,h,v)=>{if(v){if(Et(h))return;h&&(pt?P[lt]=fe(pt,h):Ye(h)&&(P[lt]=h))}else P[lt]=pt}),P}function Ut(b,l,P){return b===void 0?l:l===void 0?tt:P()}function Vt(b,l){if(b===l)return;if(!b)return l;const P={};return zt(b,l||{},(lt,pt,h)=>{const v=Ut(pt,h,()=>{const g=ue(pt,h);if(!dt()(g))return g});v!==void 0&&(P[lt]=v)}),P}function re(b,l){const P={};return zt(b,l,(lt,pt,h)=>
1{if(lt==="_widget_pool"){const v=Vt(pt,h);dt()(v)||(P._widget_pool=v)}else{const v=Ut(pt,h,()=>{if(!_t()(pt,h))return h});v!==void 0&&(P[lt]=v)}}),P}function fe(b,l){return Se(b,l)}function Se(b,l){const P={};return zt(b,l,(lt,pt,h,v)=>{if(lt==="_widget_pool")P._widget_pool=de(pt||{},h);else if(v){const g=h;Ve(g)&&(P[lt]=g)}else P[lt]=pt}),P}function Ve(b){return b!==void 0&&!Et(b)}function Ye(b){return typeof b._obj_class=="string"}class je{constructor(l){this.factory=l,this.cache={}}get(l,P){const lt=this.getObjSpaceCache(l),pt=lt[P];if(pt)return pt;const h=this.factory(l,P);return lt[P]=h,h}clear(){this.cache={}}getObjSpaceCache(l){const P=l.join(":"),lt=this.cache[P];if(lt)return lt;const pt={};return this.cache[P]=pt,pt}}class Dt{constructor(){this.replicationCache=new je(()=>{throw new p.Gd})}setReplicationStrategy(l){this.replicationCache=new je((P,lt)=>new l(P,lt))}get(l,P){return this.replicationCache.get(l,P)}clearCache(){this.replicationCache.clear()}}const $=new Dt;function Pt(b){$.setReplicationStrategy(b)}(0,p.Nj)(()=>{$.clearCache()});function et(b,l,P){}const it=new p.hl;function z(b){if(it.current())throw new p.Gd(b)}function ut(b){return it.runWith(!0,b)}let wt;function Ft(){return wt}(0,p.Nj)(()=>{wt=void 0});var bt=r(6084),qt=r(6324),Ke=Object.defineProperty,xe=Object.getOwnPropertySymbols,k=Object.prototype.hasOwnProperty,yt=Object.prototype.propertyIsEnumerable,Ct=(b,l,P)=>l in b?Ke(b,l,{enumerable:!0,configurable:!0,writable:!0,value:P}):b[l]=P,te=(b,l)=>{for(var P in l||(l={}))k.call(l,P)&&Ct(b,P,l[P]);if(xe)for(var P of xe(l))yt.call(l,P)&&Ct(b,P,l[P]);return b},ae=(b,l,P)=>new Promise((lt,pt)=>{var h=W=>{try{g(P.next(W))}catch(K){pt(K)}},v=W=>{try{g(P.throw(W))}catch(K){pt(K)}},g=W=>W.done?lt(W.value):Promise.resolve(W.value).then(h,v);g((P=P.apply(b,l)).next())});let _e=!1;function Ge(b){_e=b}const Je=(0,bt.rL)({name:"widgetdata",loadElement:([b,l])=>({loader:()=>($.get(b,l).start(),(0,p.Zm)())})}),Fe=(0,bt.rL)({name:"baseobj",loadElement:([b,l])=>({loader:()=>ae(null,null,function*(){return _e?(0,a.yd)(b,l,"widgetless"):(yield(0,bt.Hh)(()=>Je.get([b,l]).get()),(0,p.Zm)())})})});function en(b){return Fe.findValuesInOfflineStore(b)}class yn{constructor(l,P){this._objSpaceId=l,this._id=P,this.baseData=Fe.get([l,P]),this.widgetData=Je.get([l,P])}id(){return this._id}getOrThrow(){const l=this.get();if(!l)throw new p.Gd;return l}get(){z("for performance reasons, avoid this method when rendering");const l=this.widgetData.get();if(!l)return;const P=this.baseData.get();if(P)return(0,a.MV)(P)?this.joinDataWithCaching(P,l):P}getWidgetPoolWithBadPerformance(){return Wn("_widget_pool",this.widgetData).get()}getWidget(l){return z("for performance reasons, avoid this method when rendering"),ln(l,this.widgetData).get()}getWidgetWithBadPerformance(l){return ln(l,this.widgetData).get()}getAttribute(l){if((0,p.iI)(l))return this.getAttributeWithoutWidgetData(l);if(!this.ensureAvailable())return;const P=Wn(l,this.baseData).get();return P!==void 0?P:Wn(l,this.widgetData).get()}getAttributeWithoutWidgetData(l){if(l==="_widget_pool")throw new p.Gd;return Wn(l,this.baseData).get()}getAttributeWithWidgetData(l){return Wn(l,this.widgetData).get()}getWidgetAttribute(l,P){return ln(l,this.widgetData).subState(P).get()}getIfExistent(){if(!this.isUnavailable())return this.get()}isForbidden(){return!!this.getAttributeWithoutWidgetData("_forbidden")}isUnavailable(){return!!this.getAttributeWithoutWidgetData("_deleted")}setBaseData(l){this.baseData.set(l)}set(l){(0,qt.q2)("Changing CMS content"),(0,bt.s4)(void 0,()=>this.get())!==void 0&&(this._objSpaceId,this._id,void 0);const[lt,pt]=gr(l);this.baseData.set(lt),this.widgetData.set(pt),this._replication().notifyLocalState(l)}ensureAvailable(){return this.baseData.ensureAvailable()&&(_e||this.widgetData.ensureAvailable())}isAvailable(){return this.baseData.isAvailable()}update(l){if(!Ft()&&!T()&&(0,a.Qk)(this._objSpaceId)&&this._objSpaceId[1]==="published")throw new p.aS("The published content cannot be modified.");const P=Zt(this.getOrThrow(),l);this.set(P)}finishSaving(){return this._replication().finishSaving()}objSpaceId(){return this._objSpaceId}equals(l){return l instanceof yn?this._id===l._id&&(0,p.aI)(this._objSpaceId,l._objSpaceId):!1}widgetExists(l){return!!this.getWidgetAttribute(l,"_obj_class")}isBeingLoaded(){return this.baseData.numSubscribers()+this.widgetData.numSubscribers()>0}unload(){this.baseData.reset(),this.widgetData.reset()}joinDataWithCaching(l,P){const lt=this.lastJoin;if(lt&&lt.baseObjJson===l&&lt.widgetObjJson===P)return lt.joined;const pt=te(te({},l),P);return this.lastJoin={baseObjJson:l,widgetObjJson:P,joined:pt},pt}_replication(){return $.get(this._objSpaceId,this._id)}}function ln(b,l){return Wn("_widget_pool",l).subState(b)}function Wn(b,l){return l.reader().subState(b)}function Bn(b){const l={},P=bn(Je),lt=bn(Fe);P.forEach(pt=>{l[pt]||(l[pt]=!0,$.get(b,pt).start())}),lt.forEach(pt=>ae(null,null,function*(){l[pt]||(l[pt]=!0,Fe.get([b,pt]).set(yield(0,a.yd)(b,pt,"widgetless")))}))}
1function bn(b){return b.dangerouslyGetRawValues().map(l=>l._id).filter(p.Wo)}function gr(b){const l={},P={_id:b._id};return Object.keys(b).forEach(lt=>{const pt=b[lt],h=$n(lt,pt)?P:l;h[lt]=pt}),[l,P]}function $n(b,l){return b==="_widget_pool"||!(0,p.iI)(b)&&Array.isArray(l)&&(l[0]==="widget"||l[0]==="widgetlist")}(0,p.Nj)(()=>{_e=!1});var Ae=(b,l,P)=>new Promise((lt,pt)=>{var h=W=>{try{g(P.next(W))}catch(K){pt(K)}},v=W=>{try{g(P.throw(W))}catch(K){pt(K)}},g=W=>W.done?lt(W.value):Promise.resolve(W.value).then(h,v);g((P=P.apply(b,l)).next())});class tn{constructor(l,P){this.objSpace=l,this.contentState=P}setContentStateIdOrThrowIfTracking(l){if(this.initialization)throw new p.Gd;this.setContentStateId(l)}trackContentStateId(){return this.initialization||(this.initialization=this.initializeContentStateId()),this.initialization}updateContent(){return Ae(this,null,function*(){if(this.updating)return this.updating;const l=this.getContentStateId();if(l)return this.updating=(0,p.Qk)(Ae(this,null,function*(){const{to:P,current:lt,objs:pt}=yield(0,a.X5)(this.objSpace,l);pt==="*"||P&&P!==lt?Bn(this.objSpace):Array.isArray(pt)&&this.applyChanges(pt),this.setContentStateId(lt)}),()=>{this.updating=void 0}),this.updating})}applyChanges(l){l.forEach(P=>{const lt=(0,a.a8)(P)?P._deleted:P._id;$.get(this.objSpace,lt).notifyBackendState(P)})}initializeContentStateId(){return Ae(this,null,function*(){if(this.getContentStateId())return;const l=yield(0,a.X5)(this.objSpace);this.setContentStateId(l.current)})}getContentStateId(){return this.contentState.get()}setContentStateId(l){this.contentState.set(l)}}var on=(b,l,P)=>new Promise((lt,pt)=>{var h=W=>{try{g(P.next(W))}catch(K){pt(K)}},v=W=>{try{g(P.throw(W))}catch(K){pt(K)}},g=W=>W.done?lt(W.value):Promise.resolve(W.value).then(h,v);g((P=P.apply(b,l)).next())});const qn=(0,qt.Ld)();let un,Vn={};function zn(b){un=b}function Kn(b){return(0,a.Qk)(b)&&(un?un.getContentStateId(b):nr(b).get())||""}function sr(b,l){un||In(b).setContentStateIdOrThrowIfTracking(l)}function gn(b){return on(this,null,function*(){if(!un)return In(b).trackContentStateId()})}function tr(b){return on(this,null,function*(){if(!un)return In(b).updateContent()})}function er(){Vn={},un=void 0}function In(b){const l=(0,p.xn)(b);return Vn[l]||(Vn[l]=new tn(b,nr(b))),Vn[l]}function nr(b){return qn.subState((0,p.xn)(b))}(0,p.Nj)(er);const rr=(0,bt.rL)({name:"facetquery",loadElement:([b,l,P])=>({loader:()=>a.g2.retrieveFacetQuery((0,a.LD)(b),Rn(l,P)),invalidation:()=>(0,bt.s4)(void 0,()=>Kn(b))||""})}),_r={facets:[[]]};class pn{constructor(l,P,lt,pt){(0,a.dQ)(l)||(this.loadableData=An(l,P,lt,pt))}result(){B("Search API");const l=this.loadableData?this.loadableData.get():_r;return l?l.facets[0].map(P=>{const lt=P.value,pt=P.total,h=P.results.map(v=>v.id);return{name:lt,count:pt,includedObjIds:h}}):[]}}function An(b,l,P,lt){const pt={attribute:l,include_objs:P.includeObjs||0,limit:P.limit||10};return rr.get([b,pt,lt||[]])}function Rn(b,l){const P={facets:[b],options:{site_aware:!0},size:0};return dt()(l)||(P.query=l),P}const mr=(0,bt.rL)({name:"suggest",loadElement:([b,l])=>({loader:()=>a.g2.retrieveSuggest((0,a.LD)(b),l),invalidation:()=>(0,bt.s4)("",()=>Kn(b))})});function Hn(b,l,P,lt){B("Search API");const pt=[];return(0,a.Qk)(b)?kn(b,l,P,lt).getWithDefault({results:pt}).results:pt}function kn(b,l,{attributes:P,limit:lt},pt){const h={prefix:l,options:{site_aware:!0}};return pt&&(h.from_search=pt),P&&(h.fields=P),typeof lt=="number"&&(h.limit=lt),mr.get([b,h])}function ar(b,l){let P=ur(b,l);if(P)return P;const lt=b._widget_pool;return lt&&Object.keys(lt).find(pt=>{const h=lt[pt];return h&&(P=ur(h,l),P)?(P.parentWidgetId=pt,!0):!1}),P}function ur(b,l){let P;return Object.keys(b).find(lt=>{const pt=b[lt];if(!pt||(0,p.iI)(lt))return!1;const h=pt;if(!(0,a.Xj)(h)&&!(0,a.zt)(h))return!1;const v=h[1];if(Array.isArray(v)){const g=h[1];if(!g)return!1;const W=g.indexOf(l);if(W!==-1)return P={attributeName:lt,attributeType:"widgetlist",index:W},!0}else if(l===v)return P={attributeName:lt,attributeType:"widget",index:0},!0;return!1}),P}function Jn(b,l){(0,bt.Hh)(()=>sn(b,l))}function cr(b,l,P){const lt=Pn(b,l);return lt.set(P),lt}function Er(b,l,P){Pn(b,l).set(P)}function sn(b,l){const P=Pn(b,l);if(P.ensureAvailable())return P}function Pn(b,l){return new yn(b,l)}function an(b,l){return(0,bt.J6)(()=>Pn(b,l).getAttribute("_version")||"")}var _n=Object.defineProperty,wn=Object.defineProperties,On=Object.getOwnPropertyDescriptors,ot=Object.getOwnPropertySymbols,M=Object.prototype.hasOwnProperty,ft=Object.prototype.propertyIsEnumerable,Qt=(b,l,P)=>l in b?_n(b,l,{enumerable:!0,configurable:!0,writable:!0,value:P}):b[l]=P,he=(b,l)=>{for(var P in l||(l={}))M.call(l,P)&&Qt(b,P,l[P]);if(ot)for(var P of ot(l))ft.call(l,P)&&Qt(b,P,l[P]);return b},Re=(b,l)=>wn(b,On(l));const Ie=(0,qt.Ld)();function Te(){var b;return(b=Ie.get())!=null?b:{count:0,hasErrors:!1}}function oe(b){const l=Te();return Ie.set({count:l.count+1,hasErrors:l.count>0?l.hasErrors:!1}),b.then(()=>{const P=Te();Ie.set(Re(he({},P),{count:P.count-1}))},()=>{const P=Te();Ie.set({count:P.count-1,hasErrors:!0})}),b}let We=!1;function lr(){return We}function yr(){We=!0}class Qn{constructor(l){this.onChange=l}get(){return this.value}set(l){var P;
1const lt=this.value;this.value=l,(P=this.onChange)==null||P.call(this,lt,l)}}class Mr{constructor(){this.count=(0,qt.Ld)()}isAnyTrue(){var l;return((l=this.count.get())!=null?l:0)>0}memberChanged(l,P){var lt;if(l===P)return;const pt=(lt=this.count.get())!=null?lt:0;this.count.set(pt+(P?1:-1))}}var Fn=(b,l,P)=>new Promise((lt,pt)=>{var h=W=>{try{g(P.next(W))}catch(K){pt(K)}},v=W=>{try{g(P.throw(W))}catch(K){pt(K)}},g=W=>W.done?lt(W.value):Promise.resolve(W.value).then(h,v);g((P=P.apply(b,l)).next())});const jn=new Mr;class ir{constructor(l,P){this.objSpaceId=l,this.objId=P,this.replicationActiveState=(0,qt.Ld)(),this.replicationActive=new Qn((pt,h)=>this.replicationActiveState.set(h)),this.isUnreplicatedState=(0,qt.Ld)(),this.isUnreplicated=new Qn((pt,h)=>{this.isUnreplicatedState.set(h),jn.memberChanged(pt,h)}),this.scheduledReplication=!1,this.performThrottledReplication=(0,p.nF)(()=>this.performReplication(),1e3);const lt=()=>this.isUnreplicated.set(!dr(this.backendState.get(),this.localState.get()));this.localState=new Qn(lt),this.backendState=new Qn(lt)}start(){return Fn(this,null,function*(){const l=yield(0,a.yd)(this.objSpaceId,this.objId,"full");(0,qt.Rs)(()=>{this.notifyBackendState(l)})})}notifyLocalState(l){lr()||dr(this.localState.get(),l)||(this.localState.set(l),this.shouldAutoReplicate()&&this.startReplication())}notifyBackendState(l){if(!this.localState.get()){this.backendState.set(l),this.updateLocalState(l);return}const P=this.bufferedBackendState||this.backendState.get();if(!(P&&j(P,l)>0)){if(this.replicationActive.get()){this.bufferedBackendState=l;return}this.updateLocalState(kt(l,this.localState.get(),this.backendState.get())),this.backendState.set(l)}}finishSaving(){return Fn(this,null,function*(){let l;if(this.nextRequestDeferred)l=this.nextRequestDeferred.promise;else if(this.currentRequestDeferred)l=this.currentRequestDeferred.promise;else return;return l})}replicateNow(){return Fn(this,null,function*(){if(this.localState.get()!==void 0)return this.startReplication(),this.finishSaving()})}discardPendingChanges(){if(this.replicationActive.get())throw new p.Gd;const l=this.backendState.get();l!==void 0&&(dr(this.localState.get(),l)||this.updateLocalState(l))}finishReplicating(){throw new p.Gd}replicationMessageStream(){throw new p.Gd}getBackendState(){return this.backendState.get()}getLocalState(){return this.localState.get()}updateLocalState(l){this.localState.set(l),Er(this.objSpaceId,this.objId,l)}shouldAutoReplicate(){return(0,a.LD)(this.objSpaceId)!=="published"}startReplication(){dr(this.backendState.get(),this.getLocalObjJson())?this.nextRequestDeferred&&(this.nextRequestDeferred.resolve(),this.nextRequestDeferred=void 0):this.replicationActive.get()?this.nextRequestDeferred||(this.nextRequestDeferred=new p.cY):this.scheduledReplication||(this.scheduledReplication=!0,this.initDeferredForRequest(),oe(this.currentRequestDeferred.promise),(0,p.dY)(()=>this.performThrottledReplication()))}performReplication(){return Fn(this,null,function*(){const l=this.getLocalObjJson();this.scheduledReplication=!1,this.replicationActive.set(!0);try{const P=yield this.replicateLocalStateToBackend(l);this.handleBackendUpdate(l,P),this.currentRequestDeferred.resolve(),this.currentRequestDeferred=void 0,this.replicationActive.set(!1),this.shouldAutoReplicate()&&this.startReplication()}catch(P){if(!(P instanceof Error))throw P;this.currentRequestDeferred.reject(P),this.currentRequestDeferred=void 0,this.replicationActive.set(!1)}})}replicateLocalStateToBackend(l){return Fn(this,null,function*(){const P=se(this.backendState.get(),l);return dt()(P)?Promise.resolve(this.backendState.get()):this.replicatePatchToBackend(P)})}replicatePatchToBackend(l){return Fn(this,null,function*(){const P=(0,a.LD)(this.objSpaceId);if(P!=="published")return a.gd.put(`workspaces/${P}/objs/${this.objId}`,{obj:l});const lt=Ft();if(!lt)throw new p.Gd(`Unexpected backend replication for workspace ${P}`);return yield lt(this.objId,l),(0,a.yd)(this.objSpaceId,this.objId,"full")})}initDeferredForRequest(){if(this.nextRequestDeferred){const l=this.nextRequestDeferred;this.nextRequestDeferred=void 0,this.currentRequestDeferred=l}else this.currentRequestDeferred=new p.cY}handleBackendUpdate(l,P){this.backendState.set(Yn(P,this.bufferedBackendState)),this.bufferedBackendState=void 0,this.updateLocalState(kt(this.getLocalObjJson(),this.backendState.get(),l))}getLocalObjJson(){if(this.localState.get()===void 0)throw new p.Gd;return this.localState.get()}hasPendingChanges(){var l;return(l=this.isUnreplicatedState.get())!=null?l:!1}isReplicating(){var l;return(l=this.replicationActiveState.get())!=null?l:!1}}function dr(b,l){return b===l||!!b&&!!l&&dt()(se(b,l))}function Yn(b,l){return!l||j(b,l)>0?b:l}function j(b,l){return y(b._version,l._version)}function y(b,l){if(b!==void 0&&l!==void 0){if(b>l)return 1;if(l>b)return-1}return 0}const N=1;class Bt{constructor(){this.archive={}}versionForData(l){if(this.currentVersion===void 0)this.currentVersion=N,this.oldestVersion=N;else{const lt=this.archive[this.currentVersion];if(l===lt)return this.currentVersion;this.currentVersion++}const P=this.currentVersion;return this.archive[P]=l,P}retrieveVersion(l){if(!this.archive.hasOwnProperty(l))throw new Gt;return this.archive[l]}validVersion(l){return this.currentVersion!==void 0&&l>=N&&l<=this.currentVersion}versionCount(){return Object.keys(this.archive).length}purgeVersionsOlderThan(l){if(!(this.currentVersion===void 0||l>this.currentVersion||this.oldestVersion===void 0||l<=this.oldestVersion)){for(let P=this.oldestVersion;P<l;P++)delete this.archive[P];this.oldestVersion=l}}}class Gt extends p.aS{}class Pe{constructor(l,P,lt){this.localState=l,this.mergeFunction=P,this.currentlyMyTurn=lt,this.outgoingMessages=new p.B7,this.acknowledgedVersions=new p.B7,this.localVersionArchive=ne
1w Bt}currentVersion(){return this.localDataAndVersion().currentVersion}replicatedVersions(){return this.acknowledgedVersions}myTurn(){return this.currentlyMyTurn}versionArchiveSize(){return this.localVersionArchive.versionCount()}handleLocalChange(){this.sendCurrentState()}replicationMessages(){return this.outgoingMessages}handleIncomingMessage(l){const P=l.containedReceiverVersion;if(P!==void 0){if(!this.localVersionArchive.validVersion(P))return;this.localVersionArchive.purgeVersionsOlderThan(P),this.acknowledgedVersions.next(P)}this.lastRemoteMove===void 0&&this.currentlyMyTurn||Xe(this.lastRemoteMove,l)&&(this.incomingMessageAlreadyContained(l)||Ne(this.myLastMove,l)&&(this.performMerge(l),this.currentlyMyTurn=!0,this.lastRemoteMove=l,this.sendCurrentState()))}performMerge(l){const{localData:P,currentVersion:lt}=this.localDataAndVersion();l.containedReceiverVersion===lt?this.localState.set(l.data):this.localState.set(this.threeWayMerge(P,l)),this.containedRemoteVersion=l.senderVersion}threeWayMerge(l,P){const lt=P.containedReceiverVersion;return lt?this.mergeFunction(l,P.data,this.localVersionArchive.retrieveVersion(lt)):this.mergeFunction(l,P.data)}sendCurrentState(){const l=this.messageForCurrentState();this.currentlyMyTurn&&Ne(this.lastRemoteMove,l)&&(this.myLastMove=l,this.currentlyMyTurn=!1),this.outgoingMessages.next(l)}messageForCurrentState(){const{localData:l,currentVersion:P}=this.localDataAndVersion();return this.containedRemoteVersion?{data:l,senderVersion:P,containedReceiverVersion:this.containedRemoteVersion}:{data:l,senderVersion:P}}incomingMessageAlreadyContained(l){return this.containedRemoteVersion!==void 0&&l.senderVersion<=this.containedRemoteVersion}localDataAndVersion(){const l=this.localState.get();return{localData:l,currentVersion:this.localVersionArchive.versionForData(l)}}}function Ne(b,l){if(b===void 0)return!0;const P=l.containedReceiverVersion!==void 0&&l.containedReceiverVersion>=b.senderVersion,lt=b.containedReceiverVersion===void 0||b.containedReceiverVersion<l.senderVersion;return P&&lt}function Xe(b,l){return b===void 0?!0:l.senderVersion<b.senderVersion?!1:b.containedReceiverVersion===void 0?!0:l.containedReceiverVersion!==void 0&&l.containedReceiverVersion>=b.containedReceiverVersion}var qe=(b,l,P)=>new Promise((lt,pt)=>{var h=W=>{try{g(P.next(W))}catch(K){pt(K)}},v=W=>{try{g(P.throw(W))}catch(K){pt(K)}},g=W=>W.done?lt(W.value):Promise.resolve(W.value).then(h,v);g((P=P.apply(b,l)).next())});class vn{constructor(l,P,lt,pt){this.localState=l,this.remoteMessages=P,this.outgoingMessages=new p.tQ(void 0),this.stateChangeCausedByAgent=new p.hl,this.replicatedVersions=new p.tQ(void 0),this.agent=new Pe({get:l.get,set:h=>{this.stateChangeCausedByAgent.runWith(!0,()=>this.localState.set(h))}},lt,pt),this.agent.replicationMessages().subscribe(this.outgoingMessages),this.agent.replicatedVersions().subscribe(this.replicatedVersions)}myTurn(){return this.agent.myTurn()}versionArchiveSize(){return this.agent.versionArchiveSize()}subscriberCount(){return this.outgoingMessages.subscriberCount()}finishReplicating(){return qe(this,null,function*(){const l=this.agent.currentVersion();yield this.replicatedVersions.filter(p.Wo).filter(P=>P>=l).waitForFirst()})}replicationMessages(){return new p.RE(l=>{this.ensureStarted();const P=this.outgoingMessages.filter(p.Wo).subscribe(l);return()=>{P.unsubscribe(),this.outgoingMessages.subscriberCount()===0&&this.ensureStopped()}})}ensureStarted(){this.activeSubscriptions||(this.activeSubscriptions=[this.localState.changes.subscribe(()=>{this.stateChangeCausedByAgent.current()||this.agent.handleLocalChange()}),this.remoteMessages.subscribe(l=>this.agent.handleIncomingMessage(l))],this.agent.handleLocalChange())}ensureStopped(){this.activeSubscriptions&&(this.activeSubscriptions.forEach(l=>l.unsubscribe()),this.activeSubscriptions=void 0)}}function br(b,l,P,lt){const pt=new p.RE(h=>P.subscribe(v=>(0,qt.Rs)(()=>h.next(v))));return new vn(hr(b,l),pt,fr(lt),lt==="source")}function fr(b){return b==="consumer"?Cn:ai}function hr(b,l){const P=Pn(b,l);return{get:()=>(0,bt.s4)(void 0,()=>P.get()),set:lt=>{lt!==void 0&&P.set(lt)},changes:(0,bt.eX)(()=>P.get()).map(()=>{})}}function Cn(b,l,P){return kt(b,l,P)}function ai(b,l,P){return kt(l,b,P)}var Nr=(b,l,P)=>new Promise((lt,pt)=>{var h=W=>{try{g(P.next(W))}catch(K){pt(K)}},v=W=>{try{g(P.throw(W))}catch(K){pt(K)}},g=W=>W.done?lt(W.value):Promise.resolve(W.value).then(h,v);g((P=P.apply(b,l)).next())});const Qr={results:[],total:void 0};class $r{constructor({name:l,loadBatch:P,loadOffline:lt,skipOfflineHandling:pt,invali
1dation:h}){this.loadBatch=P,this.loadableCollection=(0,bt.rL)({name:l,loadElement:([v,g],W)=>({loader:()=>this.loader(v,g,W),offlineLoader:lt?()=>lt(v):void 0,skipOfflineHandling:pt?.(v),invalidation:()=>h(v)})})}getQueryCount(l){return this.getBatch(l,0,0).count()}getBatch(l,P,lt){return new Yr(this.loadableCollection.get([l,lt],P),this.fakeQuery&&this.fakeQuery(l))}storeBatch(l,P,lt){this.loadableCollection.get([l,P]).set(lt)}setupFakeQuery(l){this.fakeQuery=l}clearFakeQuery(){this.fakeQuery=void 0}usesFakeQuery(){return!!this.fakeQuery}loader(l,P,lt){return Nr(this,null,function*(){if(P===0)return this.loadBatch(l,void 0,lt);const pt=this.getBatch(l,lt,P-1),h=yield(0,bt.Hh)(()=>pt.continuationForNextBatch());return h?this.loadBatch(l,h,lt):{results:[],total:-1}})}}class Yr{constructor(l,P){this.data=l,this.fakeData=P}ids(){return this.response().results}count(){return this.response().total}hasNextBatch(){return!!this.continuationForNextBatch()}continuationForNextBatch(){return this.response().continuation}response(){return this.fakeData&&!this.data.isAvailable()?this.fakeData:this.data.getWithDefault(Qr)}}class Zr{constructor(l){this.getBatch=l}iterator(){return new Gn(this.getBatch)}iteratorFromContinuation(l){return new Gn(this.getBatch,l)}}class Gn{constructor(l,P){this.getBatch=l,this.batchNumber=0,this.currentIndex=0,P&&([this.batchNumber,this.currentIndex]=P),this.currentBatch=this.getBatch(this.batchNumber)}next(){if(!this.currentBatch)return{done:!0};if(this.currentIds||(this.currentIds=this.currentBatch.ids()),this.currentIndex>=this.currentIds.length)return this.currentIds=void 0,this.currentIndex=0,this.currentBatch.hasNextBatch()?(this.batchNumber=this.batchNumber+1,this.currentBatch=this.getBatch(this.batchNumber)):this.currentBatch=void 0,this.next();if(!this.priorIdIndex){const P={};this.batchNumber>0&&this.getBatch(this.batchNumber-1).ids().forEach(h=>{P[h]=!0}),this.currentBatch.ids().slice(0,this.currentIndex).forEach(pt=>{P[pt]=!0}),this.priorIdIndex=P}const l=this.currentIds[this.currentIndex];return this.currentIndex++,this.priorIdIndex[l]?this.next():(this.priorIdIndex[l]=!0,{value:l,done:!1})}continuation(){return this.currentBatch?[this.batchNumber,this.currentIndex]:void 0}}var xn=(b,l,P)=>new Promise((lt,pt)=>{var h=W=>{try{g(P.next(W))}catch(K){pt(K)}},v=W=>{try{g(P.throw(W))}catch(K){pt(K)}},g=W=>W.done?lt(W.value):Promise.resolve(W.value).then(h,v);g((P=P.apply(b,l)).next())});function Xr(b){return xn(this,arguments,function*({query:l,offset:P,orderBy:lt}){P&&P>0&&Sr("offset"),lt&&lt.length>0&&Sr("order");const pt=yield en(h=>(0,a.MV)(h)&&Lr(h,l));return{results:pt.map(([h,[v,g]])=>g),total:pt.length}})}function Lr(b,l){return l.every(({field:P,operator:lt,value:pt,negate:h})=>{lt!=="equals"&&Sr(`operator ${lt}`),typeof P!="string"&&Sr("multiple fields");const v=Array.isArray(pt)?pt:[pt],g=Ur(b,P),W=!h,K=v.some(Nt=>g===Nt);return W===K})}function Ur(b,l){if(l==="_parent_path"){const P=b._path;return!P||P==="/"?null:P.split("/").slice(0,-1).join("/")||"/"}if(Pr(l)){let P=b[l];return Array.isArray(P)&&(P=P[0]),P??null}Sr(`field ${l}`)}const ui={_id:!0,_obj_class:!0,_path:!0,_site_id:!0,_language:!0,_content_id:!0,_permalink:!0,_data_param:!0};function Pr(b){return ui[b]===!0}function Sr(b){throw new Vr(b)}class Vr extends p.aS{}var qr=(b,l,P)=>new Promise((lt,pt)=>{var h=W=>{try{g(P.next(W))}catch(K){pt(K)}},v=W=>{try{g(P.throw(W))}catch(K){pt(K)}},g=W=>W.done?lt(W.value):Promise.resolve(W.value).then(h,v);g((P=P.apply(b,l)).next())});let rn=!0;const Tn=new $r({name:"objquery",loadBatch:Wr,loadOffline:([b,l])=>Xr(l),invalidation:([b])=>(0,bt.s4)(void 0,()=>Kn(b))||""});Tn.clearFakeQuery.bind(Tn),Tn.setupFakeQuery.bind(Tn),Tn.usesFakeQuery.bind(Tn),Tn.storeBatch.bind(Tn);function zr(b,l){var P;return(0,a.dQ)(b)?0:(P=Tn.getQueryCount([b,l]))!=null?P:0}function wr(b,l,P){if(B("Search API"),(0,a.dQ)(b))return new p.l6;const lt=new Zr(pt=>Tn.getBatch([b,l],P,pt));return(0,p.YB)(lt,pt=>pt.map(h=>sn(b,h)).takeWhile(p.Wo).filter(h=>!h.isUnavailable()))}function Wr(b,l,P){return qr(this,arguments,function*([lt,pt],h,v){const{query:g,boost:W,offset:K,orderBy:Nt,includeDeleted:Yt,includeEditingAssets:Rt}
1=pt,X={query:g,options:{site_aware:!0},size:v,continuation:h,include_objs:rn,boost:W,offset:K,order_by:Nt};Yt&&(X.options.include_deleted=!0),Rt&&(X.options.include_editing_assets=!0);const Wt=(0,a.LD)(lt),Nn=yield a.g2.retrieveObjQuery(Wt,X);rn=!1;const _i=Nn.objs;return(0,qt.Rs)(()=>{_i&&_i.forEach(ei=>{$.get(lt,ei._id).notifyBackendState(ei)}),Nn.results.forEach(ei=>Jn(lt,ei))}),{results:Nn.results,total:Nn.total,continuation:Nn.continuation}})}var Kr=(b,l,P)=>new Promise((lt,pt)=>{var h=W=>{try{g(P.next(W))}catch(K){pt(K)}},v=W=>{try{g(P.throw(W))}catch(K){pt(K)}},g=W=>W.done?lt(W.value):Promise.resolve(W.value).then(h,v);g((P=P.apply(b,l)).next())});let pr;function Hr(b){pr=b}class ti{constructor(l,P){this.objSpaceId=l,this.objId=P,this.runningEnsured=!1,this.replicationProcess=br(l,P,w().objReplicationMessageStream(l,P),"consumer")}processSubscriberCount(){return this.replicationProcess.subscriberCount()}notifyLocalState(){this.ensureRunning()}notifyBackendState(l){}finishReplicating(){return this.replicationProcess.finishReplicating()}finishSaving(){return Kr(this,null,function*(){return yield this.finishReplicating(),w().finishSavingObj(this.objSpaceId,this.objId)})}replicationMessageStream(){return this.replicationProcess.replicationMessages()}start(){this.ensureRunning()}replicateNow(){throw new p.Gd}discardPendingChanges(){throw new p.Gd}hasPendingChanges(){throw new p.Gd}isReplicating(){throw new p.Gd}ensureRunning(){this.runningEnsured||(this.replicationProcess.replicationMessages().subscribe(()=>0),this.runningEnsured=!0)}}function w(){if(!pr)throw new p.Gd;return pr}const x=(0,bt.rL)({loadElement:([b,l,P])=>({loader:()=>a.g2.retrieveObjFieldDiffs(b,l,P),invalidation:()=>`${Me(b,P)}:${Me(l,P)}`})});function nt(b,l,P,lt,pt){const v=Lt(b,l,lt,pt)[(0,p.z9)(P)];return v?v[1]:null}function Lt(b,l,P,lt){if((0,p.aI)(b,l))return{};const pt=x.get([b,l,P]).getWithDefault({});if(lt){const h=pt._widget_pool;return h&&h[lt]||{}}return pt}function ce(b){return!!b&&b.format==="widgetlist_diff"}function Me(b,l){return(0,a.Qk)(b)?an(b,l):""}function Le(b,l,P,lt){const pt=sn(b,P),h=sn(l,P);return!pt||!h||pt.isUnavailable()&&h.isUnavailable()?null:pt.isUnavailable()&&!h.isUnavailable()?"new":!pt.isUnavailable()&&h.isUnavailable()?"deleted":be(pt,h,lt)}function be(b,l,P){const lt=b.getWidgetWithBadPerformance(P),pt=l.getWidgetWithBadPerformance(P);return lt?pt?St(lt,pt)?"edited":null:"deleted":pt?"new":null}},1871(E,C,r){r.d(C,{bA:()=>Bn,BA:()=>Xe,sO:()=>Ae,bq:()=>bn,Ao:()=>m,Gf:()=>yi,FU:()=>Gr,zv:()=>Go,Ey:()=>wd,Co:()=>Y,u5:()=>J,VU:()=>Ro,ZJ:()=>od,gk:()=>Z,En:()=>kn,_f:()=>xi,A_:()=>vo,bU:()=>or,w1:()=>fn,uw:()=>Ri,Qt:()=>vn,ud:()=>Pt,dw:()=>ys,D5:()=>Ti,sf:()=>di,nx:()=>Vt,K1:()=>pe,qD:()=>ie,iW:()=>ca,m8:()=>re,R7:()=>Hd,BF:()=>ou,o3:()=>Tr,Wq:()=>To,VI:()=>Or,y8:()=>N,Uq:()=>Ir,G7:()=>Od,Qk:()=>gd,Ew:()=>lu,h8:()=>Md,rz:()=>Nd,wc:()=>ru,$T:()=>fa,V8:()=>Cd,Zk:()=>zn,_L:()=>jd});var a=r(687),p=Object.defineProperty,D=Object.getOwnPropertySymbols,A=Object.prototype.hasOwnProperty,T=Object.prototype.propertyIsEnumerable,S=(t,e,i)=>e in t?p(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i,B=(t,e)=>{for(var i in e||(e={}))A.call(e,i)&&S(t,i,e[i]);if(D)for(var i of D(e))T.call(e,i)&&S(t,i,e[i]);return t};function Z(t){return B({_class:t.objClass(),_id:t.id()},J(t))}function J(t){const e=(0,a.e6)(t);if(!e)return;const i=e.attributes(),_={};
1return Object.keys(i).forEach(U=>{const[ct]=i[U];if(ct==="string"){const jt=t.get(U,"string");_[U]=jt}}),_}var dt=r(9477),ht=r.n(dt),_t=r(7885),Ot=r.n(_t),R=r(6687);const st="named/",vt="anon/";let q=0;function Y(t){return t===null?(q++,`${vt}${q}`):t.startsWith(st)||t.startsWith(vt)?t:`${st}${t}`}function H(t){return t.startsWith(vt)?null:t.startsWith(st)?t.slice(st.length):t}(0,R.Nj)(()=>q=0);var I=(t,e,i)=>new Promise((_,U)=>{var ct=rt=>{try{Mt(i.next(rt))}catch($t){U($t)}},jt=rt=>{try{Mt(i.throw(rt))}catch($t){U($t)}},Mt=rt=>rt.done?_(rt.value):Promise.resolve(rt.value).then(ct,jt);Mt((i=i.apply(t,e)).next())});function at(t,e){const i=Q(t);return()=>I(null,null,function*(){return Q(e(yield i()))()})}function Q(t){return()=>I(null,null,function*(){return V(t)?t():t})}function V(t){return typeof t=="function"}var tt=r(6084),Et=r(6324),kt=Object.defineProperty,Zt=Object.getOwnPropertySymbols,se=Object.prototype.hasOwnProperty,ve=Object.prototype.propertyIsEnumerable,ue=(t,e,i)=>e in t?kt(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i,St=(t,e)=>{for(var i in e||(e={}))se.call(e,i)&&ue(t,i,e[i]);if(Zt)for(var i of Zt(e))ve.call(e,i)&&ue(t,i,e[i]);return t},Kt=(t,e,i)=>new Promise((_,U)=>{var ct=rt=>{try{Mt(i.next(rt))}catch($t){U($t)}},jt=rt=>{try{Mt(i.throw(rt))}catch($t){U($t)}},Mt=rt=>rt.done?_(rt.value):Promise.resolve(rt.value).then(ct,jt);Mt((i=i.apply(t,e)).next())});function zt(t){return typeof t=="string"&&["boolean","date","enum","multienum","number","reference","string","unknown"].includes(t)}function de(t,e){const i=St({},fe.get());i[t]=Q(e),fe.set(i),Ye()}function Ut(t){var e;return(e=Ve.get(t).get())==null?void 0:e.attributes}function Vt(t){var e;return(e=Ve.get(t).get())==null?void 0:e.title}function re(t){return Ot()(Ut(t),Dt)}const fe=(0,Et.Ld)(),Se=(0,Et.Ld)(),Ve=(0,tt.rL)({name:"dataClassSchema",loadElement:t=>({loader(){return Kt(this,null,function*(){var e;const i=(e=fe.get())==null?void 0:e[t];if(i){const _=yield i();return{attributes:_.attributes instanceof Function?yield _.attributes():yield _.attributes,title:_.title instanceof Function?yield _.title():yield _.title}}return{attributes:{}}})},invalidation:()=>je().toString()})});function Ye(){Se.set(je()+1)}function je(){return Se.get()||0}function Dt(t){if(typeof t=="string")return[t,{}];const[e,i]=t;return e==="enum"||e==="multienum"?[e,$(i)]:[...t]}function $({title:t,values:e}){const i={values:e.map(_=>typeof _=="string"?{value:_,title:_}:_)};return t&&(i.title=t),i}function Pt(t){const e={attributes:{},title:void 0};return(0,R.Gv)(t)?"attributes"in t?("title"in t&&typeof t.title=="string"&&(e.title=t.title),e.attributes=et(t.attributes),e):((0,R.vV)(`Invalid schema response: no "attributes" key: ${JSON.stringify(t)}`),e):((0,R.vV)(`Invalid schema response: expected an object: ${JSON.stringify(t)}`),e)}function et(t){const e={};return(0,R.Gv)(t)?(Object.entries(t).forEach(([i,_])=>{if(i==="_id")yt(i,_,'Key "_id" is not allowed in schema attributes');else if(typeof _=="string")it(_)?e[i]=_:yt(i,_,"Unknown attribute type.");else if(Array.isArray(_)){const U=z(i,_);U&&(e[i]=U)}else yt(i,_,"Expected an array or a string")}),e):((0,R.vV)(`Invalid schema response: expected "attributes" to be an object: ${JSON.stringify(t)}`),e)}function it(t){return typeof t=="string"&&["boolean","date","number","string"].includes(t)}function z(t,e){if(e.length<2){yt(t,e,"Expected an array with two elements.");return}const[i,_]=e;if(!zt(i)){yt(t,i,"Unknown attribute type.");return}switch(i){case"enum":case"multienum":return Ft(t,i,_);case"reference":return bt(t,_);default:return ut(t,i,_)}}function ut(t,e,i){const _=xe(i)?i:void 0;if(_)return[e,_];yt(t,i,"Invalid localization.")}function wt(t){return(0,R.Gv)(t)&&k(t)&&"values"in t&&Array.isArray(t.values)&&t.values.every(e=>typeof e=="string"&&e.length||qt(e))}function Ft(t,e,i){if(wt(i))return[e,i];yt(t,i,`Invalid "${e}" attribute config.`)}function bt(t,e){const i=Ke(e)?e:void 0;if(i)return["reference",i];yt(t,e,'Invalid "reference" attribute config.')}function qt(t){return(0,R.Gv)(t)&&"value"in t&&typeof t.value=="string"&&!!t.value.length&&k(t)}function Ke(t){return(0,R.Gv)(t)&&"to"in t&&typeof t.to=="string"&&k(t)&&(!("reverseTitle"in t)||typeof t.reverseTitle=="string")}function xe(t){return(0,R.Gv)(t)&&(!Object.keys(t).length||k(t))}function k(t){return!("title"in t)||typeof t.title=="string"}function yt(t,e,i){(0,R.vV)(`Invalid schema definition for attribute "${t}": ${JSON.stringify(e)}${i?`
2Details: ${i}`:""}`)}var Ct=r(5436),te=Object.defineProperty,ae=Object.defineProperties,_e=Object.getOwnPropertyDescriptors,Ge=Object.getOwnPropertySymbols,Je=Object.prototype.hasOwnProperty,Fe=Object.prototype.propertyIsEnumerable,en=(t,e,i)=>e in t?te(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i,yn=(t,e)=>{for(var i in e||(e={}))Je.call(e,i)&&en(t,i,e[i]);if(Ge)for(var i of Ge(e))Fe.call(e,i)&&en(t,i,e[i]);return t},ln=(t,e)=>
2ae(t,_e(e)),Wn=(t,e,i)=>new Promise((_,U)=>{var ct=rt=>{try{Mt(i.next(rt))}catch($t){U($t)}},jt=rt=>{try{Mt(i.throw(rt))}catch($t){U($t)}},Mt=rt=>rt.done?_(rt.value):Promise.resolve(rt.value).then(ct,jt);Mt((i=i.apply(t,e)).next())});class Bn{name(){return H(this.internalName())}attributeDefinitions(){return re(this.internalName())}title(){return Vt(this.internalName())}forAttribute(e){return this.all().transform({attributeName:e})}}class bn{dataClassName(){const e=this.internalDataClassName();return e?H(e):null}dataItemAttribute(){const e=this.attributeName();if(!e)return null;const i=this.dataItem();return i?new gr(i,e):null}isEmpty(){return this.transform({limit:1}).take().length===0}containsData(){return!this.isEmpty()}normalizeFilters(e){if(e)return Ot()(e,(i,_)=>{if(tr(i))return i;const U=gn(i),ct=U?i.value:i;let jt=ct;if(ct instanceof Date&&(jt=ct.toISOString()),ct instanceof Ae&&(jt=ct.id()),jt===null||typeof jt=="string"||typeof jt=="number"||typeof jt=="boolean")return{operator:U?i.operator:"equals",value:jt};throw new R.c1(`Invalid filter value for "${_}": ${JSON.stringify(i)}`)})}attributesFromFilters(e){if(!e)return;const i={};return Object.keys(e).reduce((_,U)=>{const ct=e[U];return(gn(ct)?[ct]:ct.value).forEach(Mt=>{Mt.operator==="equals"&&(_[U]=Mt.value)}),_},i)}}class gr{constructor(e,i){this._dataItem=e,this._attributeName=i}dataClass(){return this._dataItem.dataClass()}internalDataClassName(){return this._dataItem.internalDataClassName()}dataClassName(){return this._dataItem.dataClassName()}dataItem(){return this._dataItem}attributeName(){return this._attributeName}get(){return this._dataItem.get(this._attributeName)}update(e){return Wn(this,null,function*(){return this._dataItem.update({[this._attributeName]:e})})}attributeDefinition(){return this.dataClass().attributeDefinitions()[this._attributeName]||null}}const $n=20;class Ae{dataClassName(){return H(this.internalDataClassName())}attributeDefinitions(){return this.dataClass().attributeDefinitions()}title(){return this.dataClass().title()}getRaw(e){}getLocalized(e){return this.get(e)}}class tn extends R.aS{constructor(e){super(e),this.message=e}}function on(t){if(!(0,R.Gv)(t))throw new R.c1("Data item attributes must be an object");if(!Object.keys(t).every(Ct.Wf))throw new R.c1("Keys of data item attributes must be valid data identifiers")}function qn(t,e){if(!t)return e;if(!e)return t;let i=yn({},t);return Object.keys(e).forEach(_=>{if(_ in i&&!ht()(i[_],e[_])){const U=i[_],ct=e[_];i=ln(yn({},i),{[_]:{operator:"and",value:[...gn(U)?[U]:U.value,...gn(ct)?[ct]:ct.value]}});return}i[_]=e[_]}),i}function un(t,e){return t&&e?`${t} ${e}`:t||e}function Vn({_class:t,_id:e}){return{_class:t,filters:{_id:{operator:"equals",value:e}}}}function zn({_class:t,filters:e}){const i=Kn(e);if(i)return{_class:t,_id:i}}function Kn(t){var e;const i=(e=t?._id)==null?void 0:e.value;if(typeof i=="string")return i}function sr(t){return typeof t=="string"&&["equals","notEquals","isGreaterThan","isLessThan","isGreaterThanOrEquals","isLessThanOrEquals"].includes(t)}function gn(t){return(0,R.Gv)(t)&&"operator"in t&&sr(t.operator)&&"value"in t&&(t.value===null||["string","number","boolean"].includes(typeof t.value))}function tr(t){return(0,R.Gv)(t)&&"operator"in t&&t.operator==="and"&&"value"in t&&Array.isArray(t.value)&&t.value.every(gn)}var er=Object.defineProperty,In=Object.defineProperties,nr=Object.getOwnPropertyDescriptors,rr=Object.getOwnPropertySymbols,_r=Object.prototype.hasOwnProperty,pn=Object.prototype.propertyIsEnumerable,An=(t,e,i)=>e in t?er(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i,Rn=(t,e)=>{for(var i in e||(e={}))_r.call(e,i)&&An(t,i,e[i]);if(rr)for(var i of rr(e))pn.call(e,i)&&An(t,i,e[i]);return t},mr=(t,e)=>In(t,nr(e)),Hn=(t,e,i)=>new Promise((_,U)=>{var ct=rt=>{try{Mt(i.next(rt))}catch($t){U($t)}},jt=rt=>{try{Mt(i.throw(rt))}catch($t){U($t)}},Mt=rt=>rt.done?_(rt.value):Promise.resolve(rt.value).then(ct,jt);Mt((i=i.apply(t,e)).next())});function kn(t){return{create:e=>Hn(null,null,function*(){return t.fetch("",{method:"post",data:e})}),index:e=>Hn(null,null,function*(){return t.fetch("",{params:ar(e)})}),get:e=>Hn(null,null,function*(){return t.fetch(e)}),update:(e,i)=>Hn(null,null,function*(){return t.fetch(e,{method:"patch",data:i})}),delete:e=>t.fetch(e,{method:"delete"})}}function ar(t){return mr(Rn({},ur(t.filters())),{_continuation:t.continuation(),_order:Jn(t.order()),_limit:t.limit().toString(),_search:t.search()||void 0,_count:t.includeCount()?t.includeCount().toString():void 0})}function ur(t){const e={};return Object.keys(t).forEach(i=>
2{const _=t[i];let U;_.operator==="and"?(Er(_.value),U=_.value):U=[_],U.forEach(ct=>{const{opCode:jt,value:Mt}=ct,rt=jt==="eq"?i:[i,jt].join(".");e[rt]=cr(Mt)})}),e}function Jn(t){if(t.length)return t.map(e=>e.join(".")).join(",")}function cr(t){return typeof t=="string"?t:t===null?"":JSON.stringify(t)}function Er(t){if(!(t.length<2)&&t.some((e,i)=>t.slice(i+1).some(_=>_.operator===e.operator&&_.value!==e.value)))throw new R.c1(`Multiple filters on the same attribute with the same operator but different values are currently not supported: ${JSON.stringify(t)}`)}var sn=r(9421),Pn=r(8307),an=r.n(Pn);function _n(t){return typeof t=="string"&&!t.includes("^")&&/^[\x21-\x7D]+$/.test(t)}const wn={boolean:M,date:ft,enum:Qt,multienum:he,number:Re,reference:Ie,string:Te,unknown:t=>t};function On({dataClassName:t,attributeName:e,value:i,attributes:_}){Bt(t,e,i);const U=_[e];if(U){const ct=dr(U),jt=wn[ct];if(jt)return jt(i,t,e,U)}return i??null}function ot({value:t,dataClassName:e,attributeName:i,attributes:_}){Bt(e,i,t);const U=_[i];if(U){const ct=dr(U),jt=oe[ct];if(jt)return jt(t,e,i,U)}return t??null}function M(t,e,i){if(typeof t=="boolean")return t;Pe(e,i,"a boolean",t)}function ft(t,e,i){if(t===null||typeof t=="string"&&(0,R.p1)(t))return t;if(an()(t))return t.toISOString();Pe(e,i,"an instance of Date, an ISO8601 date string or null",t)}function Qt(t,e,i,_){const U=j(Yn(_));if(t===null||typeof t=="string"&&U.includes(t))return t;Pe(e,i,`one of ${JSON.stringify(U)} or null`,t)}function he(t,e,i,_){if(t===null)return null;const U=j(Yn(_));if(Array.isArray(t)&&t.every(ct=>typeof ct=="string"&&U.includes(ct)))return t;Pe(e,i,`an array of values from ${JSON.stringify(U)}`,t)}function Re(t,e,i){if(t===null||typeof t=="number")return t;Pe(e,i,"a number or null",t)}function Ie(t,e,i,_){return t===null||_n(t)?t:t instanceof Ae&&t.dataClassName()===y(Yn(_))?t.id():(Pe(e,i,`an instance of DataItem of data class "${e}", a valid data ID or null`,t),null)}function Te(t,e,i){if(typeof t=="string")return t;Pe(e,i,"a string",t)}const oe={boolean:We,date:lr,enum:yr,multienum:Qn,number:Fn,reference:Mr,string:jn,unknown:t=>t};function We(t,e,i){return typeof t=="boolean"?t:(Gt(e,i,"a boolean",t),!1)}function lr(t,e,i){return ir(t)?null:typeof t=="string"&&(0,R.p1)(t)?new Date(t):(Gt(e,i,"an ISO8601 date string",t),null)}function yr(t,e,i,_){if(ir(t))return null;const U=j(Yn(_));return typeof t=="string"&&U.includes(t)?t:(Gt(e,i,`one of ${JSON.stringify(U)}`,t),null)}function Qn(t,e,i,_){if(!Array.isArray(t))return Gt(e,i,"an array",t),[];const U=j(Yn(_));return t.filter(ct=>typeof ct=="string"&&U.includes(ct)?!0:(Gt(e,i,`one of ${JSON.stringify(U)}`,ct),!1))}function Mr(t,e,i,_){return ir(t)?null:_n(t)?di(y(Yn(_))).get(t)||null:(Gt(e,i,"a valid data ID",t),null)}function Fn(t,e,i){return typeof t=="number"?t:(Gt(e,i,"a number",t),null)}function jn(t,e,i){return typeof t=="string"?t:(Gt(e,i,"a string",t),"")}function ir(t){return t===null||t===""}function dr(t){return typeof t=="string"?t:t[0]}function Yn(t){if(typeof t!="string")return t[1]}function j(t){if(wt(t))return t.values.map(e=>typeof e=="string"?e:e.value);throw new R.c1('Enum attribute config is missing the "values" property')}function y(t){if(t&&N(t))return t.to;throw new R.c1('Reference attribute config is missing the "to" property')}function N(t){return!!(t&&"to"in t&&typeof t.to=="string")}function Bt(t,e,i){if(Array.isArray(i)&&Bt(t,e,i[0]),(0,R.Gv)(i)&&i.hasOwnProperty("_type"))throw new R.c1(`Value for attribute "${e}" of data class "${t}" contains an object with property "_type"`)}function Gt(t,e,i,_){_!=null&&(0,R.vV)(Ne(t,e,i,_))}function Pe(t,e,i,_){throw new R.c1(Ne(t,e,i,_))}function Ne(t,e,i,_){return`Expected attribute "${e}" of data class "${t}" to be ${i}, but got ${JSON.stringify(_)}`}class Xe extends R.aS{constructor(e){super(e),this.message=e}}const qe=new R.hl;function vn(t){return qe.runWith(!0,t)}function br(){return qe.current()||!1}var fr=(t,e,i)=>new Promise((_,U)=>{var ct=rt=>{try{Mt(i.next(rt))}catch($t){U($t)}},jt=rt=>{try{Mt(i.throw(rt))}catch($t){U($t)}},Mt=rt=>rt.done?_(rt.value):Promise.resolve(rt.value).then(ct,jt);Mt((i=i.apply(t,e)).next())});let hr={};function Cn(t,e){const i=Q(e.skipOfflineHandling);hr[t]={refetchOnWindowFocus:Q(e.refetchOnWindowFocus),skipOfflineHandling:()=>fr(null,null,function*(){return(yield i())===!0})}}function ai(){return Object.keys(hr)}function Nr(t){return fr(this,null,function*(){var e;const i=hr[t];return i?((e=yield i.refetchOnWindowFocus())!=null?e:!0)!==!1:!1})}function Qr(t){return fr(this,null,function*(){const e=hr[t];return e?e.skipOfflineHandling():!1})}(0,R.Nj)(()=>hr={});var $r=r(721),Yr=r.n($r);function Zr(t,e){return{get:t.get||Gn("get",e),update:t.update||Gn("update",e),index:t.index||Gn("index",e),create:t.create||Gn("create",e),delete:t.delete||Gn("delete",e)}
2}function Gn(t,e){return()=>{throw new R.aS(`No "${t}" callback function defined for data class "${e}".`)}}var xn=(t,e,i)=>new Promise((_,U)=>{var ct=rt=>{try{Mt(i.next(rt))}catch($t){U($t)}},jt=rt=>{try{Mt(i.throw(rt))}catch($t){U($t)}},Mt=rt=>rt.done?_(rt.value):Promise.resolve(rt.value).then(ct,jt);Mt((i=i.apply(t,e)).next())});function Xr(t,e){const i=Yr()(()=>xn(null,null,function*(){return Zr(yield Q(t)(),e)}));return{get:(..._)=>xn(null,null,function*(){return(yield i()).get(..._)}),index:(..._)=>xn(null,null,function*(){return(yield i()).index(..._)}),create:(..._)=>xn(null,null,function*(){return(yield i()).create(..._)}),update:(..._)=>xn(null,null,function*(){return(yield i()).update(..._)}),delete:(..._)=>xn(null,null,function*(){return(yield i()).delete(..._)})}}var Lr=Object.defineProperty,Ur=Object.defineProperties,ui=Object.getOwnPropertyDescriptors,Pr=Object.getOwnPropertySymbols,Sr=Object.prototype.hasOwnProperty,Vr=Object.prototype.propertyIsEnumerable,qr=(t,e,i)=>e in t?Lr(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i,rn=(t,e)=>{for(var i in e||(e={}))Sr.call(e,i)&&qr(t,i,e[i]);if(Pr)for(var i of Pr(e))Vr.call(e,i)&&qr(t,i,e[i]);return t},Tn=(t,e)=>Ur(t,ui(e)),zr=(t,e)=>{var i={};for(var _ in t)Sr.call(t,_)&&e.indexOf(_)<0&&(i[_]=t[_]);if(t!=null&&Pr)for(var _ of Pr(t))e.indexOf(_)<0&&Vr.call(t,_)&&(i[_]=t[_]);return i},wr=(t,e,i)=>new Promise((_,U)=>{var ct=rt=>{try{Mt(i.next(rt))}catch($t){U($t)}},jt=rt=>{try{Mt(i.throw(rt))}catch($t){U($t)}},Mt=rt=>rt.done?_(rt.value):Promise.resolve(rt.value).then(ct,jt);Mt((i=i.apply(t,e)).next())});function Wr(t){if(t<0||!Number.isSafeInteger(t))throw new R.c1(`Numeric IDs must be a non-negative "safe" integer: ${t.toString()}`)}function Kr(t){if(!(0,R.Gv)(t))throw new R.c1("A result item must be an object");if("_id"in t){const e=t,{_id:i}=e,_=zr(e,["_id"]);return pr(i,_)}if("id"in t){const e=t,{id:i}=e,_=zr(e,["id"]);return pr(i,_)}throw new R.c1('"_id" key missing')}function pr(t,e){return{systemData:{_id:Hr(t)},customData:l(e)}}function Hr(t){if(typeof t=="number")return Wr(t),t.toString();if(!_n(t))throw new R.c1('"_id" key invalid (must be numeric or hex)');return t}function ti(t){if(!(0,R.Gv)(t))throw new R.c1("An index result must be an object");const{results:e,continuation:i,count:_}=t;if(!Array.isArray(e))throw new R.c1("Results of an index result must be an array");const U=e.map(ct=>typeof ct=="number"?(Wr(ct),ct):typeof ct=="string"?(x(ct),ct):Kr(ct));if(typeof i=="string"){if(i.length===0)throw new R.c1("Continuation of an index result must be a non-empty string, null or undefined")}else if((0,R.Wo)(i))throw new R.c1("Continuation of an index result must be a string, null or undefined");return{results:U,continuation:i,count:w(_)}}function w(t){if(t==null)return;if(typeof t!="number"&&typeof t!="string")throw new R.c1("Count of an index result must be a non-negative integer, null or undefined");const e=Number(t);if(e>=0&&(0,R.zh)(e))return e;throw new R.c1("Count of an index result must be a non-negative integer")}function x(t){if(!_n(t))throw new R.c1("Strings in results of an index result must be valid data IDs")}const nt=(0,Et.Ld)();function Lt(t,e){const i=Xr(e,t);nt.set(Tn(rn({},nt.get()),{[t]:i}))}function ce(t){return!!Me(t)}function Me(t){const e=nt.get();if(e)return e[t]}function Le(){const t=nt.get();return t?Object.keys(t):[]}function be(t){const e=Me(t);if(!e)throw new R.c1(`Missing data class with name ${t}`);return e}function b(t,e){return wr(this,null,function*(){if(!_n(e))throw new R.c1(`Invalid data ID "${e}"`);let i;try{i=yield be(t).get(e)}catch(_){if(_ instanceof sn.MZ&&_.httpStatus===404)return null;throw _}if(i===null)return null;if(!(0,R.Gv)(i))throw new R.c1("External data must be an object or null");return{systemData:{_id:e},customData:l(i)}})}function l(t){return Object.fromEntries(Object.entries(t).filter(([e])=>(0,Ct.Wf)(e)))}function P(t,e){return wr(this,null,function*(){const i=yield be(t).index(e);if(i instanceof Xe)throw i;return ti(i)})}function lt(t,e){return wr(this,null,function*(){const i=yield be(t).create(e),{systemData:_,customData:U}=Kr(i);return{systemData:_,customData:Object.keys(U).length===0?e:U}})}function pt(t,e,i){return wr(this,null,function*(){const _=yield be(t).update(e,i),U=_??{};
2if(!(0,R.Gv)(U))throw new R.c1("External data must be an object or null");const ct=l(U),{_id:jt}=ct,Mt=zr(ct,["_id"]);return rn(rn({},i),Mt)})}function h(t,e){return be(t).delete(e)}function v(t,e,i){W.get([t,e]).set(i)}function g(t,e){if(!br())return W.get([t,e]).get()}const W=(0,tt.rL)({name:"externaldata",loadElement:([t,e])=>({loader:()=>b(t,e),skipOfflineHandling:Qr(t)})});function K(t){return W.findValuesInOfflineStore(t)}var Nt=r(9180),Yt=(t,e,i)=>new Promise((_,U)=>{var ct=rt=>{try{Mt(i.next(rt))}catch($t){U($t)}},jt=rt=>{try{Mt(i.throw(rt))}catch($t){U($t)}},Mt=rt=>rt.done?_(rt.value):Promise.resolve(rt.value).then(ct,jt);Mt((i=i.apply(t,e)).next())});function Rt(t){return Yt(this,arguments,function*([e,i,_,U,ct]){const jt=yield K((rt,[$t,go])=>rt===null||$t!==e?!1:Nn(go,rt,i)),Mt=X(Wt(jt,_),U).map(([rt,[$t,go]])=>go);return{results:Mt,count:Mt.length}})}function X(t,e){return e===void 0||e.length===0?t:t.sort((i,_)=>Ei(e,i,_))}function Wt(t,e){if(!e)return t;const i=e.trim().split(" ");return t.filter(([_])=>{if(_)return i.every(U=>Object.values(_.customData).some(ct=>typeof ct=="string"&&ct.toLowerCase().includes(U.toLowerCase())))})}function Nn(t,e,i){return i?Object.keys(i).every(_=>{const U=i[_];return U.operator==="and"?U.value.every(ct=>Nn(t,e,{[_]:ct})):_i(U,Di(t,e,_))}):!0}function _i(t,e){switch(t.operator){case"equals":return e===t.value;case"notEquals":return e!==t.value;case"isGreaterThan":return ci(e,t.value)===!0;case"isGreaterThanOrEquals":return e===t.value||ci(e,t.value)===!0;case"isLessThan":return e!==t.value&&ci(e,t.value)===!1;case"isLessThanOrEquals":return ci(e,t.value)===!1;default:ei(t.operator)}}function ei(t){Ii(`operator ${t}`)}function ci(t,e){if(typeof e=="number"&&typeof t=="number"||typeof e=="string"&&typeof t=="string")return t>e}function Ei([[t,e],...i],[_,[U,ct]],[jt,[Mt,rt]]){const $t=Si(Di(ct,_,t),Di(rt,jt,t));return $t===0&&i.length>0?Ei(i,[_,[U,ct]],[jt,[Mt,rt]]):(e==="asc"?1:-1)*$t}function Si(t,e){return typeof t=="number"&&typeof e=="number"?t-e:typeof t=="string"&&typeof e=="string"?e===t?0:t>e?1:-1:typeof t=="number"?-1:typeof e=="number"||typeof t=="string"?1:typeof e=="string"?-1:0}function Di(t,e,i){if(!e)return null;const _=i==="_id"?t:e.customData[i];return _===void 0?null:_}function Ii(t){throw new Xe(`Not supported: ${t}`)}var Po=Object.defineProperty,wo=Object.defineProperties,rs=Object.getOwnPropertyDescriptors,Oo=Object.getOwnPropertySymbols,is=Object.prototype.hasOwnProperty,Co=Object.prototype.propertyIsEnumerable,Ai=(t,e,i)=>e in t?Po(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i,ji=(t,e)=>{for(var i in e||(e={}))is.call(e,i)&&Ai(t,i,e[i]);if(Oo)for(var i of Oo(e))Co.call(e,i)&&Ai(t,i,e[i]);return t},Bi=(t,e)=>wo(t,rs(e));class Eo{constructor(e,i){this._continuation=e,this._params=i}continuation(){return this._continuation}filters(){return Object.entries(this._params.filters||{}).reduce((e,[i,_])=>i?Bi(ji({},e),{[i]:gn(_)?Bi(ji({},_),{opCode:mi[_.operator]}):{operator:"and",value:_.value.map(U=>Bi(ji({},U),{opCode:mi[U.operator]}))}}):e,{})}search(){return this._params.search||""}order(){return(this._params.order||[]).filter(([e])=>!!e)}limit(){return this._params.limit}includeCount(){return this._params.count}}const mi={equals:"eq",notEquals:"neq",isGreaterThan:"gt",isLessThan:"lt",isGreaterThanOrEquals:"gte",isLessThanOrEquals:"lte"};function So(t){return t.operator==="and"}var os=(t,e,i)=>new Promise((_,U)=>{var ct=rt=>{try{Mt(i.next(rt))}catch($t){U($t)}},jt=rt=>{try{Mt(i.throw(rt))}catch($t){U($t)}},Mt=rt=>rt.done?_(rt.value):Promise.resolve(rt.value).then(ct,jt);Mt((i=i.apply(t,e)).next())});const Ji={},Qi=new Nt.O2({name:"externaldataquery",loadBatch:as,loadOffline:Rt,skipOfflineHandling:t=>Qr(t[0]),invalidation:([t])=>(0,tt.s4)(void 0,()=>Zi(t).toString())||""});function Do(t,e,i,_){var U;return Yi(t,e,_),(U=Qi.getQueryCount([t,e,i,void 0,!0]))!=null?U:null}function ss({_class:t,filters:e,search:i,order:_,limit:U},ct){if(br())return new R.l6;Yi(t,e,ct);const jt=U??$n,Mt=new Nt.UX(rt=>Qi.getBatch([t,e,i,_,!1],jt,rt));return(0,R.YB)(Mt,rt=>rt.map($t=>Xi($t,t)).takeWhile(({data:$t})=>$t!==void 0).filter(({data:$t})=>$t!==null).map(({id:$t})=>$t))}function Yi(t,e,i){Ot()(e,(_,U)=>{(gn(_)?[_]:_.value).forEach(jt=>{const Mt=gn(jt)?jt.value:jt;On({dataClassName:t,attributeName:U,value:Mt,attributes:i})})})}function Io(t){const e=ni(t),i=Zi(t);e.set(i+1)}function as(t,e,i){return os(this,arguments,function*([_,U,ct,jt,Mt],rt,$t){var go;const ga=yield P(_,new Eo(rt,{filters:U,search:ct,order:jt,limit:$t,count:!!Mt})),Gd=Ao(ga.results,_);return{continuation:(go=ga.continuation)!=null?go:void 0,results:Gd,total:ga.count}})}function Ao(t,e){return t.map(i=>typeof i=="number"?ki(e,i.toString()):typeof i=="string"?ki(e,i):En(e,i))}function ki(t,e){return us(t,e),e}function En(t,e){const i=e.systemData._id;return v(t,i,e),i}function us(t,e){(0,tt.Hh)(()=>g(t,e))}function Zi(t){return ni(t).get()||0}function ni(t){let e=Ji[t];return e||(e=(0,Et.Ld)(),Ji[t]=e),e}function Xi(t,e){return typeof t=="string"?{id:t,data:g(e,t)}:{id:t.systemData._id,data:t}}var qi=Object.defineProperty,jo=Object.getOwnPropertySymbols,Fi=Object.prototype.hasOwnProperty,to=Object.prototype.propertyIsEnumerable,eo=(t,e,i)=>e in t?qi(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i,li=(t,e)=>{for(var i in e||(e={}))Fi.call(e,i)&&eo(t,i,e[i]);if(jo)for(var i of jo(e))to.call(e,i)&&eo(t,i,e[i]);return t}
2,ri=(t,e,i)=>new Promise((_,U)=>{var ct=rt=>{try{Mt(i.next(rt))}catch($t){U($t)}},jt=rt=>{try{Mt(i.throw(rt))}catch($t){U($t)}},Mt=rt=>rt.done?_(rt.value):Promise.resolve(rt.value).then(ct,jt);Mt((i=i.apply(t,e)).next())});class yi extends Bn{constructor(e){super(),this._internalName=e}internalName(){return this._internalName}create(e){return ri(this,null,function*(){return this.all().create(e)})}all(){return new Ni(this)}get(e){return g(this._internalName,e)?Gr.build(this,e):null}getUnchecked(e){return Gr.buildUnchecked(this,e)}forceReloadAllQueries(){Io(this._internalName)}}function To(t){return ce(t)}function Ro(){return Le().map(t=>new yi(t))}class Ni extends bn{constructor(e,i,_={}){super(),this._dataClass=e,this._attributeName=i,this._params=_}dataClass(){return this._dataClass}internalDataClassName(){return this._dataClass.internalName()}dataClassName(){return this._dataClass.name()}create(e){return ri(this,null,function*(){this.assertNoIdFilter(),on(e);const{filters:i}=this._params,_=this.internalDataClassName(),U=yield Mo(_),ct=no(_,e,U),jt=li(li({},ct),this.attributesFromFilters(i)),Mt=yield lt(_,jt),rt=Mt.systemData._id;return v(_,rt,Mt),this._dataClass.forceReloadAllQueries(),Gr.buildWithLoadedAttributes(this._dataClass,rt,U)})}get(e){const{filters:i,search:_}=this._params;if(!_&&!i)return this._dataClass.get(e);const U=this.itemIdFromFilters();return U&&this.hasSingleFilter()?U===e?this._dataClass.get(e):null:this.transform({filters:{_id:e},limit:1}).take()[0]||null}dataItem(){const e=this.itemIdFromFilters();return e?this.get(e):null}isDataItem(){return!!this.itemIdFromFilters()}attributeName(){return this._attributeName||null}take(){const e=Ut(this.internalDataClassName());if(!e)return[];const i=this.itemIdFromFilters();if(i&&this.hasSingleFilter()){if(this.limit()===0)return[];const _=this.get(i);return _?[_]:[]}return xo(()=>this.takeUnsafe(e))}transform({filters:e,search:i,order:_,limit:U,attributeName:ct}){return new Ni(this._dataClass,ct||this._attributeName,{filters:qn(this._params.filters,this.normalizeFilters(e)),search:un(this._params.search,i),order:_||this._params.order,limit:U??this._params.limit})}objSearch(){}count(){const{filters:e,search:i}=this._params,_=this.internalDataClassName(),U=Ut(_);return U?xo(()=>Do(_,e,i,U)):null}limit(){return this._params.limit}toPojo(){return li({_class:(0,R.uV)(this.dataClassName()),_attribute:this._attributeName},this._params)}takeUnsafe(e){return(0,R._Q)(this.getIterator(e),this._params.limit)}getIterator(e){return(0,R.YB)(ss(li({_class:this.internalDataClassName(),_attribute:this._attributeName},this._params),e),i=>i.map(_=>Gr.buildWithLoadedAttributes(this._dataClass,_,e))).iterator()}assertNoIdFilter(){const{filters:e}=this._params;if(e&&Object.keys(e).includes("_id"))throw new R.c1(`Cannot create a ${this.internalDataClassName()} from a scope that includes "_id" in its filters`)}itemIdFromFilters(){return Kn(this._params.filters)}hasSingleFilter(){const{filters:e,search:i}=this._params;return e&&Object.keys(e).length===1&&!i}}class Gr extends Ae{constructor(e,i){super(),this._dataClass=e,this._dataId=i}static build(e,i){return Ut(e.internalName())?new Gr(e,i):null}static buildWithLoadedAttributes(e,i,_){if(!_)throw new R.Gd;return new Gr(e,i)}static buildUnchecked(e,i){return new Gr(e,i)}id(){return this._dataId}dataClass(){return this._dataClass}internalDataClassName(){return this._dataClass.internalName()}obj(){}get(e){const i=this.getExternalData();if(!i)return null;const _=this.internalDataClassName(),U=Ut(_),{customData:ct}=i;return U?ot({dataClassName:_,attributeName:e,value:ct[e],attributes:U}):null}getRaw(e){var i;return(i=this.getExternalData())==null?void 0:i.customData[e]}getLocalized(e){const i=this.getSystemOrCustom(e),_=this.attributeDefinitions()[e];if(!_)return i;const[U,ct]=_;return U==="enum"&&typeof i=="string"?$i(i,ct):U==="multienum"&&Array.isArray(i)?i.map(jt=>typeof jt=="string"?$i(jt,ct):jt):i}update(e){return ri(this,null,function*(){if(on(e),Object.keys(e).length===0)return;const i=yield(0,tt.Hh)(()=>this.getExternalData());if(!i)throw new R.c1(`Missing data with ID ${this._dataId}`);const _=this.internalDataClassName(),U=yield Mo(_),ct=no(_,e,U),jt=yield pt(this.internalDataClassName(),this._dataId,ct);v(_,this._dataId,{systemData:i.systemData,customData:li(li({},i.customData),jt)}),this._dataClass.forceReloadAllQueries()})}delete(){return ri(this,null,function*(){yield h(this.internalDataClassName(),this._dataId),v(this.internalDataClassName(),this._dataId,null),this._dataClass.forceReloadAllQueries()})}forceReload(){return ri(this,null,function*(){const e=this.internalDataClassName();v(e,this._dataId,yield b(e,this._dataId))})}getCustomAttributes(){var e,i;return(i=(e=this.getExternalData())==null?void 0:e.customData)!=null?i:{}}getExternalData(){return g(this.internalDataClassName(),this._dataId)}getSystemOrCustom(e){return e==="_id"?this.id():this.get(e)}}function no(t,e,i){return Ot()(e,(_,U)=>On({dataClassName:t,attributeName:U,value:_,attributes:i}))}function cs(t){return t instanceof sn.MZ||t instanceof Xe}function xo(t){try{return t()}catch(e){throw cs(e)?new tn(e.message):e}}function Mo(t){return ri(this,null,function*(){const e=yield(0,tt.Hh)(()=>Ut(t));if(!e)throw new R.Gd;return e})}function $i(t,e){const i=e.values.find(U=>U.value===t);if(!i)throw new R.Gd;const{title:_}=i;return typeof _=="string"?_:t}var Lo=Object.defineProperty,Uo=Object.getOwnPropertySymbols,ls=Object.prototype.hasOwnProperty,Wo=Object.prototype.propertyIsEnumerable,Bo=(t,e,i)=>e in t?Lo(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i,ro=(t,e)=>{for(var i in e||(e={}))ls.call(e,i)&&Bo(t,i,e[i]);if(Uo)for(var i of Uo(e))Wo.call(e,i)&&Bo(t,i,e[i]);return t},Vi=(t,e,i)=>new Promise((_,U)=>{var ct=rt=>{try{Mt(i.next(rt))}catch($t){U($t)}},jt=rt=>{try{Mt(i.throw(rt))}catch($t){U($t)}},Mt=rt=>rt.done?_(rt.value):Promise.resolve(rt.value).then(ct,jt);Mt((i=i.apply(t,e)).next())});const ds=["boolean","enum","float","integer","multienum","string","reference"],fs=["stringlist"],ko=[...ds,...fs],hs=200;class io extends Bn{constructor(e){super(),this._internalName=e}internalName(){return this._internalName}name(){return this._internalName}create(e){return Vi(this,null,function*(){return this.all().create(e)})}all(){return new ii(this)}get(e){return bi(this,e)?new zi(this,e):null}getUnchecked(e){return new zi(this,e)}attributeDefinitions(){return No(this._internalName)}forceReloadAllQueries(){throw new R.c1("Cannot force-reload queries on a built-in data class")}}function bi(t,e){return(0,Ct.ED)(ao(t).and(Ct.cb),e)}class ii extends bn{constructor(e,i,_={}){super(),this._dataClass=e,this._attributeName=i,this._params=_}dataClass(){return this._dataClass}internalDataClassName(){return this._dataClass.internalName()}dataClassName(){return this._dataClass.internalName()}create(e){return Vi(this,null,function*(){if(this.isBuiltInClass())throw new R.c1("Cannot create data items using the built-in Obj class");const i=(0,Ct.ZU)(this.objClassScope(),uo(ro(ro({},e),this.attributesFromFilters(this._params.filters)),this._dataClass.internalName()));return yield i.finishSaving(),this.wrapInDataItem(i)})}get(e){const[i]=this.getSearch().and("_id","equals",e).take(1);return i?this.wrapInDataItem(i):null}take(){var e;const i=this.getSearch(),_=this.parentObj(),U=(e=this._params.limit)!=null?e:$n;let ct;return!this._params.search&&!this._params.order&&_?.hasChildOrder()?ct=_.sortByChildOrder(i.take(
2Math.max(U,hs))).slice(0,U):ct=i.take(U),ct.map(jt=>this.wrapInDataItem(jt))}dataItem(){const e=this.itemIdFromFilters();return e?this._dataClass.get(e):null}isDataItem(){return!!this.itemIdFromFilters()}attributeName(){return this._attributeName||null}count(){return this.getSearch().count()}transform({filters:e,search:i,order:_,limit:U,attributeName:ct}){return new ii(this._dataClass,ct||this._attributeName,{filters:qn(this._params.filters,this.normalizeFilters(e)),search:un(this._params.search,i),order:_||this._params.order,limit:U??this._params.limit})}limit(){return this._params.limit}objSearch(){const e=this.getSearch();if(!(0,sn.dQ)(e.objSpaceId()))return new a.G5(e)}toPojo(){return ro({_class:this.dataClassName(),_attribute:this._attributeName},this._params)}getSearch(){let e=this.getInitialSearch();const{filters:i,search:_,order:U}=this._params;if(_&&(e=e.and("*","matches",_)),U){const ct=U.filter(([jt])=>!!jt);ct.length&&(e=e.order(ct))}return i?Object.keys(i).filter(ct=>!!ct).reduce((ct,jt)=>this.applyFilter(ct,jt,i[jt]),e):e}getInitialSearch(){return(this.isBuiltInClass()?lo():this.objClassScope()).and(Ct.cb).search()}isBuiltInClass(){return Vo(this.internalDataClassName())}applyFilter(e,i,_){const{operator:U,value:ct}=_;if(U==="and")return ct.reduce((jt,Mt)=>this.applyFilter(jt,i,Mt),e);if(U==="equals")return i==="_obj_parent_id"?this.applySubpagesFilter(e):e.and(i,"equals",ct);if(U==="notEquals")return e.andNot(i,"equals",ct);if(U==="isGreaterThan")return e.and(i,"isGreaterThan",ct);if(U==="isLessThan")return e.and(i,"isLessThan",ct);if(U==="isGreaterThanOrEquals")return e.andNot(i,"isLessThan",ct);if(U==="isLessThanOrEquals")return e.andNot(i,"isGreaterThan",ct);throw new R.c1(`Unknown filter operator "${U}"`)}applySubpagesFilter(e){const i=this.parentObj(),_=i?.siteId(),U=i?.path();return!_||!U?(0,Ct.aG)(sn.HY).search():e.and("_siteId","equals",_).and("_parentPath","equals",U)}objClassScope(){return ao(this._dataClass)}wrapInDataItem(e){const i=new zi(this._dataClass,e.id());return i.setBasicObj(e),i}itemIdFromFilters(){return Kn(this._params.filters)}parentObj(){var e,i;const _=(i=(e=this._params.filters)==null?void 0:e._obj_parent_id)==null?void 0:i.value;if(typeof _=="string")return(0,Ct.ED)(lo().and(Ct.cb),_)}}class zi extends Ae{constructor(e,i){super(),this._dataClass=e,this._dataId=i}id(){return this._dataId}dataClass(){return this._dataClass}internalDataClassName(){return this._dataClass.internalName()}dataClassName(){return this._dataClass.internalName()}obj(){return(0,a.Dy)(this.getOrThrow())}getBasicObj(){return this._obj===void 0&&(this._obj=bi(this._dataClass,this._dataId)),this._obj}setBasicObj(e){this._obj=e}get(e){const i=this.getBasicObj();if(!i)return null;const _=Fo(i.objClass(),e);if(!_)return null;const[U,ct]=_;return ko.includes(U)?U==="reference"?ps(i,e,ct):i.get(e,_):null}update(e){const i=this.getOrThrow();return i.update(uo(e,this.internalDataClassName())),i.finishSaving()}delete(){return Vi(this,null,function*(){const e=this.getBasicObj();if(e)return e.delete(),e.finishSaving()})}forceReload(){throw new R.c1("Cannot force-reload a built-in data item")}getOrThrow(){const e=this.getBasicObj();if(!e)throw new R.c1(`Missing obj with ID ${this._dataId}`);return e}}function Fo(t,e){return so(t).attribute(e)}function oo(t){return!!(0,a.an)(t)}function so(t){const e=(0,a.an)(t);if(!e)throw new R.c1(`Class ${t} does not exist`);const i=a.Sj.forClass(e);if(!i)throw new R.c1(`Class ${t} has no schema`);return i}function ao(t){const e=lo(),i=t.internalName();return i==="Obj"?e:e.and((0,Ct.Lw)(i))}function uo(t,e){const i={};return Object.keys(t).forEach(_=>{const U=t[_];if((0,R.iI)(_))i[_]=U;else{const ct=Fo(e,_);if(!ct)throw new R.c1(`Attribute ${_} of class ${e} does not exist`);const[jt,Mt]=ct;if(!ko.includes(jt))throw new R.c1(`Attribute ${_} of class ${e} has unsupported type ${jt}`);i[_]=[jt==="reference"?vs(U,Mt):U,ct]}}),i}function ps(t,e,i){if(!i)return null;const _=t.get(e,"reference");if(!(_ instanceof Ct.kI))return null;const U=_.objClass();if(U!==co(i))return null;const ct=zo(U);return ct?ct.get(_.id()):null}function vs(t,e){return t instanceof Ae&&t.dataClassName()===co(e)?(0,a.zo)(t.obj()):null}function co(t){if(t){const{validClasses:e}=t;if(e.length===1)return e[0]}}function No(t){if(Vo(t))return{};const e={},i=so(t).normalizedAttributes();
2return Object.keys(i).forEach(_=>{const U=$o(i[_]);U&&(e[_]=U)}),e}function $o([t,e]){if(t==="boolean"||t==="string")return[t,{}];if(t==="float"||t==="integer")return["number",{}];if(t==="enum"||t==="multienum")return[t,{values:[...e.values.map(i=>({value:i,title:i}))]}];if(t==="reference"){const{only:i}=e;if(typeof i=="string")return["reference",{to:i}];if(Array.isArray(i)&&i.length===1)return["reference",{to:i[0]}]}return null}function lo(){return(0,Ct.aG)((0,Ct.eb)())}function Vo(t){return t==="Obj"}function Ti(t){return c(t)||zo(t)||null}function di(t){const e=Ti(t);if(e)return e;throw new R.c1(`No "${t}" found`)}function zo(t){if(t==="Obj"||oo(t))return new io(t)}function c(t){const e=Y(t);if(To(e))return new yi(e)}var d=(t,e,i)=>new Promise((_,U)=>{var ct=rt=>{try{Mt(i.next(rt))}catch($t){U($t)}},jt=rt=>{try{Mt(i.throw(rt))}catch($t){U($t)}},Mt=rt=>rt.done?_(rt.value):Promise.resolve(rt.value).then(ct,jt);Mt((i=i.apply(t,e)).next())});class m extends bn{constructor(e={}){super(),this.params=e}dataClass(){return this.params.dataClass||null}internalDataClassName(){var e;return((e=this.dataClass())==null?void 0:e.internalName())||null}create(e){return d(this,null,function*(){throw new R.c1("Cannot create items from an empty data scope")})}get(e){return null}take(){return this.throwErrorIfPresent(),[]}dataItem(){return null}isDataItem(){return!!this.params.isDataItem}attributeName(){return null}transform(e){return this.clone()}filter(e,i){return this.clone()}search(e){return this.clone()}objSearch(){}count(){return this.throwErrorIfPresent(),0}limit(){}toPojo(){var e;return{_class:this.dataClassName(),_error:(e=this.params.error)==null?void 0:e.message,isEmpty:!0,isDataItem:this.isDataItem()}}clone(){return new m(this.params)}throwErrorIfPresent(){if(this.params.error)throw new tn(this.params.error.message)}}var F=Object.defineProperty,It=Object.defineProperties,ee=Object.getOwnPropertyDescriptors,Ce=Object.getOwnPropertySymbols,le=Object.prototype.hasOwnProperty,Xt=Object.prototype.propertyIsEnumerable,we=(t,e,i)=>e in t?F(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i,Mn=(t,e)=>{for(var i in e||(e={}))le.call(e,i)&&we(t,i,e[i]);if(Ce)for(var i of Ce(e))Xt.call(e,i)&&we(t,i,e[i]);return t},Dr=(t,e)=>It(t,ee(e)),Br=(t,e)=>{var i={};for(var _ in t)le.call(t,_)&&e.indexOf(_)<0&&(i[_]=t[_]);
2if(t!=null&&Ce)for(var _ of Ce(t))e.indexOf(_)<0&&Xt.call(t,_)&&(i[_]=t[_]);return i};function Tr(t){return!!t._id}function Ir(t){return Tr(t)||Zn(t)}function Or(t){var e;return fi(t)&&!((e=t?.filters)!=null&&e._id)}function Zn(t){var e;return fi(t)&&!!((e=t?.filters)!=null&&e._id)}function fi(t){return hi(t)&&!fo(t)}function fo(t){return"isEmpty"in t&&t.isEmpty===!0}function hi(t){return!Tr(t)}function Ri(t){return Tr(t)?or(t):fn(t)}function Pi(t,e){return e.filter(Tr).find(_=>_._class===t)}function Ze(t,e){const i=e.find(_=>_._class===t);if(i&&hi(i))return i}function fn(t){var e=t,{_class:i}=e,_=Br(e,["_class"]);if(i){const U=di(i);if("isEmpty"in _){const jt=_._error?new tn(_._error):void 0;return new m({dataClass:U,error:jt,isDataItem:_.isDataItem})}const ct="_attribute"in _&&_._attribute||void 0;return U.all().transform(Dr(Mn({},_),{attributeName:ct}))}}function or({_class:t,_id:e}){return di(t).get(e)||void 0}var ho=Object.defineProperty,Ko=Object.defineProperties,Ho=Object.getOwnPropertyDescriptors,gs=Object.getOwnPropertySymbols,ia=Object.prototype.hasOwnProperty,oa=Object.prototype.propertyIsEnumerable,_s=(t,e,i)=>e in t?ho(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i,sa=(t,e)=>{for(var i in e||(e={}))ia.call(e,i)&&_s(t,i,e[i]);if(gs)for(var i of gs(e))oa.call(e,i)&&_s(t,i,e[i]);return t},aa=(t,e)=>Ko(t,Ho(e));const po=(0,Et.Ld)();function ua(t){const e=(0,R.uV)(t.dataClassName()),i=t.id();po.set(aa(sa({},po.get()),{[e]:i}))}function ca(){const t=po.get();return t?Object.entries(t).map(([e,i])=>di(e).get(i)).filter(e=>!!e):[]}function ms(t){var e;return((e=po.get())==null?void 0:e[t])||null}function ys(t){const e=ms(t);if(e)return{_class:t,_id:e}}function la(t){const e=ys(t);if(e)return Vn(e)}var da=Object.defineProperty,Ki=Object.getOwnPropertySymbols,o=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable,u=(t,e,i)=>e in t?da(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i,L=(t,e)=>{for(var i in e||(e={}))o.call(e,i)&&u(t,i,e[i]);if(Ki)for(var i of Ki(e))n.call(e,i)&&u(t,i,e[i]);return t};function At(t){return typeof t=="string"||t===void 0}function ie(t,e,i){const _=pe(t,e);return _?(0,R.Go)(i?L(L({},_),(0,R.zw)(i)):_):i}function pe(t,e){if(e.length===0)return;const i=rd(t);if(!i)return;let _={};if([i,...i.ancestors()].forEach(U=>{const ct=U?.dataParam();if(!ct)return;const[jt]=ct;if(!jt)return;const Mt=Pi(jt,e);_=L(L({},_),Be(Mt,jt))}),Object.keys(_).length>0)return _}function Be(t,e){if(t&&t._class===e)return{[(0,R.gi)(e)]:t._id}}function ge(t,e){return Pi(t,e)||ys(t)}function cn(t,e,i){if(i==="multi"){const U=Ze(t,e);if(U)return U}const _=Pi(t,e);return _?Vn(_):la(t)}function xi(t,e){const i=t.dataParam();if(!i)return;const[_]=i;if(!_)return;const U=td(_,e);if(!_n(U))return"unavailable";const ct=Ti(_);if(!ct)return;const jt=(0,tt.qt)("loading",()=>ct.get(U));return jt==="loading"?"loading":jt?vo(jt):"unavailable"}function vo(t){return t instanceof zi?Xl(t):ql(t)}function Xl(t){const e=t.getBasicObj();return e?Z(e):{}}function ql(t){return L({_class:(0,R.uV)(t.dataClassName()),_id:t.id()},t.getCustomAttributes())}function td(t,e){return ed(t,e)||nd(t)}function ed(t,e){const i=e[(0,R.gi)(t)];if(typeof i=="string"&&i.length>0)return i}function nd(t){const[e]=di(t).all().transform({limit:1}).take();if(e)return e.id()}function rd(t){if(t instanceof Ct.kI)return t;if(t.isInternal()){const e=t.obj();if(e instanceof Ct.kI)return e}}function id(t,e){if(!(0,Ct.Wf)(t))return;const i=e[t];if(At(i))return i;(0,R.JL)(new R.c1(`Expected a data context value to be a string or undefined, but got ${i}`))}function fa(t,e){Lt(t,at(e,i=>i.connection)),Cn(t,{refetchOnWindowFocus:at(e,i=>i.refetchOnWindowFocus),skipOfflineHandling:at(e,i=>i.skipOfflineHandling)}),de(t,at(e,i=>i.schema))}function od(t,e){if(!e)return new m;const i=e.class();if(i===null)return new m;try{const _=e.viaRef(),U=_?dd(i,t,_):di(i).all();return sd(U,t,e)}catch(_){if(_ instanceof R.c1)return new m({error:new tn(_.message)});throw _}}function sd(t,e,i){let _=t;const U=i.field();U&&(_=_.transform({attributeName:U}));const ct=i.query();ct&&(_=ct.reduce((rt,$t)=>ad(rt,$t,e),_));const jt=i.orderBy();jt&&(_=_.transform({order:jt}));const Mt=i.size();return Mt!==void 0&&(_=_.transform({limit:Mt})),_}function ad(t,e,i){return(0,sn.HM)(e)?ud(t,e):(0,Ct.gP)(e)?cd(t,e,i):js(t,e)}function ud(t,{field:e,operator:i,value:_}
2){const[U]=Object.entries(mi).find(([ct,jt])=>jt===i)||[];return t.transform({filters:{[e]:{operator:sr(U)?U:"equals",value:_}}})}function js(t,{field:e,value:i}){return t.transform({filters:{[e]:i}})}function cd(t,{field:e,value_via:{class:i,field:_}},U){var ct,jt;const Mt=ld(i,U);if(_==="_obj_parent_id"){const rt=(ct=Mt.obj())==null?void 0:ct.parent();return rt?js(t,{field:"_id",value:rt.id()}):new m}if(_==="_id")return js(t,{field:e,value:Mt.id()});if(e==="_id"){const rt=Mt.getRaw(_),$t=(jt=t.dataClass())!=null?jt:void 0;return rt==null?new m({dataClass:$t,isDataItem:!0}):_n(rt)?js(t,{field:e,value:rt}):new m({dataClass:$t,isDataItem:!0,error:new R.c1(`${JSON.stringify(rt)} is not a valid data ID`)})}throw new R.c1("Irregular relationship")}function ld(t,e){const i=ge(t,e);if(!i)throw new R.c1(`No ${t} item found`);const _=Ri(i);if(_ instanceof Ae)return _;throw new R.c1(`No ${t} item with ID ${i._id} found`)}function dd(t,e,i){const _=cn(t,e,i);if(!_)throw new R.c1(`No ${t} scope found`);const U=Ri(_);if(U instanceof bn)return U;throw new R.c1(`No ${t} scope found`)}var fd=(t,e,i)=>new Promise((_,U)=>{var ct=rt=>{try{Mt(i.next(rt))}catch($t){U($t)}},jt=rt=>{try{Mt(i.throw(rt))}catch($t){U($t)}},Mt=rt=>rt.done?_(rt.value):Promise.resolve(rt.value).then(ct,jt);Mt((i=i.apply(t,e)).next())});function hd(t,e){return fd(this,null,function*(){return{results:(yield(0,tt.Hh)(()=>Object.entries(e).every(([_,U])=>U?_==="_id"||Ts(t.get(_),U):!1)))?[Go]:[]}})}function Ts(t,e){if(So(e))return e.value.every(ct=>Ts(t,ct));const{value:i,opCode:_}=e;if(Array.isArray(t))return _==="neq"?t.every(ct=>Ts(ct,e)):t.some(ct=>Ts(ct,e));if((0,sn._p)(_))return Za(t),Za(i),pd[_](t,i);const U=i===t;return _==="neq"?!U:U}const pd={gt:(t,e)=>t>e,lt:(t,e)=>t<e,gte:(t,e)=>t>=e,lte:(t,e)=>t<=e};function Za(t){if(!(typeof t=="string"||typeof t=="number"))throw new R.c1(`Must be a string or number, but got ${String(t)}`)}const Xa=(0,Et.Ld)();function vd(t){Xa.set([...qa(),t])}function gd(t){return qa().includes(t)}function qa(){return Xa.get()||[]}var _d=Object.defineProperty,Rs=Object.getOwnPropertySymbols,tu=Object.prototype.hasOwnProperty,eu=Object.prototype.propertyIsEnumerable,nu=(t,e,i)=>e in t?_d(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i,md=(t,e)=>{for(var i in e||(e={}))tu.call(e,i)&&nu(t,i,e[i]);if(Rs)for(var i of Rs(e))eu.call(e,i)&&nu(t,i,e[i]);return t},yd=(t,e)=>{var i={};for(var _ in t)tu.call(t,_)&&e.indexOf(_)<0&&(i[_]=t[_]);if(t!=null&&Rs)for(var _ of Rs(t))e.indexOf(_)<0&&eu.call(t,_)&&(i[_]=t[_]);return i},bs=(t,e,i)=>new Promise((_,U)=>{var ct=rt=>{try{Mt(i.next(rt))}catch($t){U($t)}},jt=rt=>{try{Mt(i.throw(rt))}catch($t){U($t)}},Mt=rt=>rt.done?_(rt.value):Promise.resolve(rt.value).then(ct,jt);Mt((i=i.apply(t,e)).next())});const Go="0";function ru(t,e){const i=t.internalName();fa(i,at(e,({connection:_,schema:U})=>({connection:bd(_,t),schema:U}))()),vd(i),ua(t.getUnchecked(Go))}function iu(t){return t===Go}function bd(t,e){const i=()=>bs(null,null,function*(){return(yield Q(t)()).get()}),_=ct=>bs(null,null,function*(){const{update:jt}=yield Q(t)();if(jt)return jt(ct);Gn("update",e.internalName())()});return md({get:ct=>bs(null,null,function*(){return iu(ct)?Pd(yield i()):null}),index:ct=>bs(null,null,function*(){const jt=yield(0,tt.Hh)(()=>e.get(Go));return jt?hd(jt,ct.filters()):{results:[]}})},_&&{update:(ct,jt)=>bs(null,null,function*(){return iu(ct)?_(jt):null})})}function Pd(t){if((0,R.Gv)(t)&&"_id"in t){const e=t,{_id:i}=e;return yd(e,["_id"])}return t}let ha=!1;function wd(){ha=!0}function ou(){return ha}(0,R.Nj)(()=>ha=!1);function Od(t){return!!t.match(R.EH)}function Cd(t,{placeholders:e,dataStack:i,transform:_}={}){return ou()?t.replace(R._U,(U,ct)=>{const jt=Ed({identifier:ct,placeholder:U,placeholders:e,dataStack:i});return _?_(jt):jt}):t}function Ed({identifier:t,placeholder:e,placeholders:i,dataStack:_}){if(t.includes(".")){const[U,ct]=t.split(".");return Sd({dataClassName:U,attributeName:ct,dataStack:_||[]})}return Id({identifier:t,placeholder:e,placeholders:i})}function Sd({dataClassName:t,attributeName:e,dataStack:i}){const _=Dd(t,i);if(_==="loading"||!_)return"";const U=_.getLocalized(e);
2return typeof U!="string"?"":U}function Dd(t,e){return(0,tt.s4)("loading",()=>{var i;const _=ge(t,e);if(_)return(i=Ti(t))==null?void 0:i.get(_._id)})}function Id({identifier:t,placeholder:e,placeholders:i}){const _=id(t,i||{});return _===void 0?e:_}let pa;function Ad(){if(!pa)throw new R.Gd;return pa()}function jd(t){pa=t}var Td=(t,e,i)=>new Promise((_,U)=>{var ct=rt=>{try{Mt(i.next(rt))}catch($t){U($t)}},jt=rt=>{try{Mt(i.throw(rt))}catch($t){U($t)}},Mt=rt=>rt.done?_(rt.value):Promise.resolve(rt.value).then(ct,jt);Mt((i=i.apply(t,e)).next())});const su=Yr()(function(t){return Td(this,null,function*(){const e=yield(0,tt.Hh)(Ad);let i;try{i=yield t.fetchWithDefaults("schema",{headers:e?{"Accept-Language":e}:{}})}catch(_){if(_ instanceof sn.MZ)return(0,R.vV)("Error while fetching schema (using empty schema)",_.message,JSON.stringify(_.details)),{attributes:{}};throw _}return Pt(i)})});var au=(t,e,i)=>new Promise((_,U)=>{var ct=rt=>{try{Mt(i.next(rt))}catch($t){U($t)}},jt=rt=>{try{Mt(i.throw(rt))}catch($t){U($t)}},Mt=rt=>rt.done?_(rt.value):Promise.resolve(rt.value).then(ct,jt);Mt((i=i.apply(t,e)).next())});function uu({attributes:t,title:e},i){return{attributes:t||(()=>au(null,null,function*(){return(yield su(i)).attributes})),title:t?e:e||(()=>au(null,null,function*(){return(yield su(i)).title}))}}var cu=(t,e,i)=>new Promise((_,U)=>{var ct=rt=>{try{Mt(i.next(rt))}catch($t){U($t)}},jt=rt=>{try{Mt(i.throw(rt))}catch($t){U($t)}},Mt=rt=>rt.done?_(rt.value):Promise.resolve(rt.value).then(ct,jt);Mt((i=i.apply(t,e)).next())});function lu(t,e){const i=typeof t=="string"?t:null,_=typeof t=="string"?e:t;if(i==="Obj")throw new R.c1('"Obj" is not a valid data class name');if(i&&((0,Ct.AR)(i),(0,a.an)(i)))throw new R.c1(`Class with name "${i}" already exists`);const U=Y(i);return fa(U,at(_,Rd)),new yi(U)}function Rd(t){return cu(this,null,function*(){var e;if("restApi"in t){const i=yield xd(Promise.resolve(t.restApi));return{connection:Promise.resolve(kn(i)),schema:uu({attributes:t.attributes,title:t.title},i),refetchOnWindowFocus:t.refetchOnWindowFocus,skipOfflineHandling:t.unstable_skipOfflineHandling}}return{connection:Promise.resolve(t.connection),schema:{attributes:(e=t.attributes)!=null?e:{},title:t.title},refetchOnWindowFocus:t.refetchOnWindowFocus,skipOfflineHandling:t.unstable_skipOfflineHandling}})}function xd(t){return cu(this,null,function*(){const e=yield t;return typeof e=="string"?(0,sn.gM)(e):(0,sn.gM)(e.url,e)})}var xs=(t,e,i)=>new Promise((_,U)=>{var ct=rt=>{try{Mt(i.next(rt))}catch($t){U($t)}},jt=rt=>{try{Mt(i.throw(rt))}catch($t){U($t)}},Mt=rt=>rt.done?_(rt.value):Promise.resolve(rt.value).then(ct,jt);Mt((i=i.apply(t,e)).next())});function Md(t,e){(0,Ct.AR)(t);const i=new yi(Y(t));return ru(i,at(Promise.resolve(e),Ld)()),i.getUnchecked(Go)}function Ld(t){return xs(this,null,function*(){var e;if(typeof t=="function")return{connection:{get:t},schema:{attributes:{}}};if("restApi"in t){const i=yield Ud(Promise.resolve(t.restApi));return{connection:Wd(i),schema:uu({attributes:t.attributes,title:t.title},i)}}return"connection"in t?{connection:t.connection,schema:{attributes:(e=t.attributes)!=null?e:{},title:t.title}}:{connection:t,schema:{attributes:{}}}})}function Ud(t){return xs(this,null,function*(){const e=yield t;return typeof e=="string"?(0,sn.gM)(e):(0,sn.gM)(e.url,e)})}function Wd(t){return{get:()=>xs(null,null,function*(){return t.fetch("")}),update:e=>xs(null,null,function*(){return t.fetch("",{method:"patch",data:e})})}}var Bd=r(5769),kd=r.n(Bd);const va=new Set;function Fd(t){if(va.has(t))throw new R.c1(`Namespace "${t}" was already used in a previous provideDataService call`);va.add(t)}(0,R.Nj)(()=>{va.clear()});var du=(t,e,i)=>new Promise((_,U)=>{var ct=rt=>{try{Mt(i.next(rt))}catch($t){U($t)}},jt=rt=>{try{Mt(i.throw(rt))}catch($t){U($t)}},Mt=rt=>rt.done?_(rt.value):Promise.resolve(rt.value).then(ct,jt);Mt((i=i.apply(t,e)).next())});function Nd(t,e){return du(this,null,function*(){var i;const _=(i=e?.namespace)!=null?i:"";Fd(_);const U=t.replace(/\/+$/,"");return(yield Vd(U)).reduce((jt,Mt)=>{const rt=$d(Mt,U,e);return rt?[...jt,rt]:jt},[])})}function $d(t,e,i){const _=zd(t,i?.namespace);if(!(0,Ct.Wf)(_))throw new R.c1(`Invalid data class name "${_}" from resource "${t}"`);return Ti(_)?((0,R.fH)(`Data class "${_}" from data service manifest (resource: "${t}") is ignored because a data class with this name already exists (defined via provideDataClass).`),null):lu(_,{restApi:{url:`${e}/${t}`,headers:i?.headers}})}function Vd(t){return du(this,null,function*(){let e;try{e=new URL(t).origin}catch{throw new R.c1(`Invalid baseUrl: "${t}"`)}const i=`${t}/_manifest`,_=yield(0,sn.x6)(i,{method:"GET",authProvider:(0,sn.R)({audience:e})});if(_&&typeof _=="object"&&"resources"in _&&Array.isArray(_.resources)&&_.resources.every(U=>typeof U=="string"))return _.resources;throw new R.c1(`Invalid data service manifest for url "${t}". Received: ${JSON.stringify(_)}`)})}function zd(t,e){const i=t.split(/[-_]/).map(kd()).join("");return e?`${e}_${i}`:i}
2var Kd=(t,e,i)=>new Promise((_,U)=>{var ct=rt=>{try{Mt(i.next(rt))}catch($t){U($t)}},jt=rt=>{try{Mt(i.throw(rt))}catch($t){U($t)}},Mt=rt=>rt.done?_(rt.value):Promise.resolve(rt.value).then(ct,jt);Mt((i=i.apply(t,e)).next())});function Hd(){return Kd(this,null,function*(){for(const t of ai())(yield Nr(t))&&Io(t)})}},279(E,C,r){r.d(C,{eW:()=>T});var a=r(1391),p=r(6084);const D={reactEditing:()=>r.e(723).then(r.bind(r,6679)),editingSupport:()=>r.e(723).then(r.bind(r,8403))},A=(0,p.rL)({loadElement:S=>({loader:D[S]})});function T(S,B){if(!a.B)return;const J=A.get(S).get();if(J)return J[B]}},5924(E,C,r){r.d(C,{lx:()=>a,HQ:()=>je,wx:()=>D,I8:()=>J,AF:()=>Ye});const a=/\bobjid:[a-f0-9]{16}\b/g,p=new RegExp(`${a.source}[^"']*`,"g");function D(z,ut){return z.replace(p,wt=>{var Ft;return(Ft=ut(T(wt)))!=null?Ft:wt})}function A(z){const ut=z.query?`?${z.query}`:"",wt=z.hash?`#${z.hash}`:"";return`objid:${z.obj_id}${ut}${wt}`}function T(z){const ut=new URL(z);return{obj_id:z.slice(6,22),query:ut.search.slice(1),hash:ut.hash.slice(1)}}var S=r(6687);function B(z){if(!Z)throw new S.Gd;return Z(z)}let Z;function J(z){Z=z}var dt=r(9421),ht=r(9180),_t=r(9477),Ot=r.n(_t),R=r(3444),st=r.n(R),vt=r(3655),q=r.n(vt);function Y(z){const ut=q()(z),wt=B(ut);if(!wt)return null;const{fragment:Ft,obj_id:bt,query:qt}=wt;return st()(A({obj_id:bt,query:qt,hash:Ft}))}var H=Object.defineProperty,I=Object.defineProperties,at=Object.getOwnPropertyDescriptors,Q=Object.getOwnPropertySymbols,V=Object.prototype.hasOwnProperty,tt=Object.prototype.propertyIsEnumerable,Et=(z,ut,wt)=>ut in z?H(z,ut,{enumerable:!0,configurable:!0,writable:!0,value:wt}):z[ut]=wt,kt=(z,ut)=>{for(var wt in ut||(ut={}))V.call(ut,wt)&&Et(z,wt,ut[wt]);if(Q)for(var wt of Q(ut))tt.call(ut,wt)&&Et(z,wt,ut[wt]);return z},Zt=(z,ut)=>I(z,at(ut));function se(z){return St(St(z,"a","href"),"img","src")}function ve(z){return z.map(ue)}function ue(z){if(!z.url)return z;const ut=B(z.url);return ut===null?z:Zt(kt({},z),{url:null,obj_id:ut.obj_id,fragment:ut.fragment||null,query:ut.query||null})}function St(z,ut,wt){const Ft=new RegExp(`<${ut}\\s+(?:[^>]*?\\s+)?${wt}=(["'])(.*?)\\1`,"gi");return z.replace(Ft,(qt,Ke,xe)=>{if(!xe)return qt;const k=xe.charAt(0);if(k==="#"||k==="?"||xe.substr(0,6)==="objid:")return qt;const yt=Y(xe);return yt?qt.replace(xe,yt):qt})}var Kt=r(6084),zt=(z,ut,wt)=>new Promise((Ft,bt)=>{var qt=k=>{try{xe(wt.next(k))}catch(yt){bt(yt)}},Ke=k=>{try{xe(wt.throw(k))}catch(yt){bt(yt)}},xe=k=>k.done?Ft(k.value):Promise.resolve(k.value).then(qt,Ke);xe((wt=wt.apply(z,ut)).next())});function de(z){return["html","link","linklist"].includes(z[0])}function Ut(z,ut,wt,Ft){return zt(this,null,function*(){const bt=fe(z),qt=(0,Kt.s4)(void 0,bt);if(qt!==void 0){Ot()(qt,z)||re(ut,wt,Ft,qt);return}const Ke=yield(0,Kt.Hh)(bt);Ot()(Ke,z)||Vt(z,ut,wt,Ft)||re(ut,wt,Ft,Ke)})}function Vt(z,ut,wt,Ft){const bt=Ft?ut.getWidgetAttribute(Ft,wt):ut.getAttribute(wt);return!Ot()(z,bt)}function re(z,ut,wt,Ft){const bt={[ut]:Ft};wt?z.update({_widget_pool:{[wt]:bt}}):z.update(bt)}function fe(z){switch(z[0]){case"html":{const ut=z[1];return()=>["html",se(ut)]}case"link":{const ut=z[1];return()=>["link",ue(ut)]}case"linklist":{const ut=z[1];return()=>["linklist",ve(ut)]}}}var Se=(z,ut,wt)=>new Promise((Ft,bt)=>{var qt=k=>{try{xe(wt.next(k))}catch(yt){bt(yt)}},Ke=k=>{try{xe(wt.throw(k))}catch(yt){bt(yt)}},xe=k=>k.done?Ft(k.value):Promise.resolve(k.value).then(qt,Ke);xe((wt=wt.apply(z,ut)).next())});let Ve={};function Ye(z,ut){$(z).start(ut)}function je(z,ut){return $(z).finish(ut)}function Dt(){Ve={}}function $(z){const ut=(0,S.xn)(z);return Ve[ut]||(Ve[ut]=new Pt(z)),Ve[ut]}class Pt{constructor(ut){this.objSpaceId=ut,this.cache={}}start(ut){return Se(this,null,function*(){const wt=this.getDataAndPerformResolution(ut),Ft=this.cache[ut],bt=Ft?Se(this,null,function*(){yield Promise.all([Ft,wt])}):wt;this.cache[ut]=bt,et(bt)})}finish(ut){return Se(this,null,function*(){return this.cache[ut]})}getDataAndPerformResolution(ut){return Se(this,null,function*(){yield it(yield(0,Kt.Hh)(()=>(0,ht.ov)(this.objSpaceId,ut)))})}}function et(z){(0,ht.e7)(z)}function it(z){return Se(this,null,function*(){if(!z)return;const ut=z.get();if(!ut)return;const wt=[];(0,dt.Yy)(ut,(Ft,bt,qt)=>{de(Ft)&&wt.push(Ut(Ft,z,bt,qt))}),wt.length&&(yield Promise.all(wt))})}(0,S.Nj)(Dt)},6084(E,C,r){r.d(C,{PF:()=>J,Fg:()=>A,rL:()=>mr,vD:()=>bn,$t:()=>yt,a9:()=>se,PN:()=>sn,ql:()=>I,ih:()=>S,Em:()=>St,Hh:()=>Y,eX:()=>an,oB:()=>cr,qt:()=>qn,rP:()=>Vn,s4:()=>Kn,HP:()=>_n,kE:()=>on,Kn:()=>sr,XR:()=>ue,mn:()=>Ct,xT:()=>On,J6:()=>wn});var a=r(6687);const p=new a.hl,D=()=>p.current();function A(ot){const M={datas:[],incomplete:!1,outdated:!1},ft=p.runWith(M,ot);return new Z(M,ft)}function T(){throw new a.aS(`Content not yet loaded. Forgot to use Scrivito.load or Scrivito.connect? See ${(0,a.yJ)("content-not-yet-loaded-error")}`)}function S(){return D()!==void 0}
2function B(ot,M){const ft=D();ft&&(ft.datas.push(M),ot==="outdated"?ft.outdated=!0:ot==="incomplete"&&(ft.incomplete=!0))}class Z{constructor(M,ft){this.captureList=M,this.outdated=M.outdated,this.incomplete=M.incomplete,this.result=ft}treatIncompleteAsOutdated(){const M={datas:[...this.captureList.datas],incomplete:!1,outdated:this.captureList.outdated||this.captureList.incomplete};return new Z(M,this.result)}forwardToCurrent(){const M=D();if(!M){this.incomplete&&T();return}dt(M,this.captureList)}getRequiredDatas(){return this.captureList.datas}isAllDataLoaded(){return!this.incomplete}isAllDataUpToDate(){return!this.incomplete&&!this.outdated}subscribeLoading(M){const ft=this.captureList.datas.map(Qt=>Qt.subscribeLoading());M.unsubscribe(),M.storeUnsubscribe(()=>{ft.forEach(Qt=>Qt())})}}class J{storeUnsubscribe(M){this.unsubscribeCallback=M}unsubscribe(){this.unsubscribeCallback&&this.unsubscribeCallback()}}function dt(ot,M){M.datas.forEach(ft=>ot.datas.push(ft)),ot.incomplete=ot.incomplete||M.incomplete,ot.outdated=ot.outdated||M.outdated}function ht(ot){return Ot(ot),ot.value}function _t(ot){return ot.meta.error===void 0}function Ot(ot){R(ot.meta)}function R(ot){if(ot.error!==void 0)throw ot.error}var st=r(6324);function vt(ot){return new a.RE(M=>{const ft=new J,Qt=(0,st.lB)(()=>A(()=>(0,a.Bd)(ot))).subscribe(he=>{he.subscribeLoading(ft);const Re=he.result;M.next(Re.errorThrown?{meta:{error:Re.error,incomplete:he.incomplete,outdated:he.outdated}}:{value:Re.result,meta:{incomplete:he.incomplete,outdated:he.outdated}})});return()=>{Qt.unsubscribe(),ft.unsubscribe()}})}var q=(ot,M,ft)=>new Promise((Qt,he)=>{var Re=oe=>{try{Te(ft.next(oe))}catch(We){he(We)}},Ie=oe=>{try{Te(ft.throw(oe))}catch(We){he(We)}},Te=oe=>oe.done?Qt(oe.value):Promise.resolve(oe.value).then(Re,Ie);Te((ft=ft.apply(ot,M)).next())});function Y(ot){return q(this,null,function*(){H(ot);const M=yield vt(()=>(0,st.Ij)({contextName:"Scrivito.load",message:"Use an async callback: await Scrivito.load(/* ... */)"},ot)).filter(ft=>!ft.meta.incomplete&&!ft.meta.outdated).waitForFirst();return ht(M)})}function H(ot){typeof ot!="function"&&(0,a.Ht)("Scrivito.load","Use an async callback: await Scrivito.load(/* ... */)",{docPermalink:"js-sdk/load"})}function I(ot){const M=A(ot);return M.treatIncompleteAsOutdated().forwardToCurrent(),M.result}var at=(ot,M,ft)=>new Promise((Qt,he)=>{var Re=oe=>{try{Te(ft.next(oe))}catch(We){he(We)}},Ie=oe=>{try{Te(ft.throw(oe))}catch(We){he(We)}},Te=oe=>oe.done?Qt(oe.value):Promise.resolve(oe.value).then(Re,Ie);Te((ft=ft.apply(ot,M)).next())});let Q=0;class V{constructor(M,ft,Qt,he){this.stateContainer=M,this.loader=ft,this.invalidation=Qt,this.onChange=he}notifyDataRequired(){this.triggerLoadingIfNeeded()}notifyDataNoLongerRequired(){}notifyDataWasSet(){this.currentLoad=void 0;const M=this.onChange;M&&M()}setTidyCallback(){}triggerLoadingIfNeeded(){return at(this,null,function*(){if(this.isLoading())return;const M=Et(this.invalidation);if(!this.loadingNeeded(M))return;const ft=Q++,Qt=he=>{this.currentLoad===ft&&(0,st.Rs)(()=>{he(),this.currentLoad=void 0,this.onChange&&this.onChange()})};this.currentLoad=ft;try{const he=yield this.loader();Qt(()=>this.stateContainer.set({value:he,meta:{version:M}}))}catch(he){Qt(()=>this.stateContainer.set({meta:{error:he,version:M}}))}})}loadingNeeded(M){const Qt=this.stateContainer.subState("meta").get();return Qt===void 0?!0:M===void 0?!1:M!==Qt.version}isLoading(){return this.currentLoad!==void 0}}function tt(ot,M){return!M||ot===void 0?!1:Et(M)!==ot.version}function Et(ot){if(!ot)return;const M=ot();if(typeof M=="number"&&isNaN(M))throw new a.Gd;return M}var kt=(ot,M,ft)=>new Promise((Qt,he)=>{var Re=oe=>{try{Te(ft.next(oe))}catch(We){he(We)}},Ie=oe=>{try{Te(ft.throw(oe))}catch(We){he(We)}},Te=oe=>oe.done?Qt(oe.value):Promise.resolve(oe.value).then(Re,Ie);Te((ft=ft.apply(ot,M)).next())});let Zt=!1;function se(){Zt=!0}let ve=!1;function ue(ot){ve=ot}function St(){return!!Zt}(0,a.Nj)(()=>{ve=!1,Zt=!1});function Kt(ot,M){var ft;const Qt=M.loader,he=M.offlineLoader,Re=(ft=M.skipOfflineHandling)!=null?ft:!1,Ie=()=>kt(null,null,function*(){return(yield Re)?"skip":(yield ve)?"offline":"online"});if(he)return{loader:()=>kt(null,null,function*(){return(yield Ie())==="offline"?he():Qt()})};const Te=M.offlineEntry;return Te?{loader:()=>kt(null,null,function*(){return(yield Ie())==="offline"?Ut(Te):Qt()}),onChange:(0,a.Lu)(a.dY,()=>kt(null,null,function*(){Zt&&(yield Ie())==="online"&&zt(ot,Te)}))}:{loader:Qt}}function zt(ot,M){return kt(this,null,function*(){try{M.write(ot.getOrThrow())}catch{M.delete()}})}class de extends a.aS{}function Ut(ot){return kt(this,null,function*(){const M=yield ot.read();if(M===void 0)throw new de(`missing: ${ot.debugIdentifier()})}`);return M})}var Vt=(ot,M,ft)=>new Promise((Qt,he)=>{var Re=oe=>{try{Te(ft.next(oe))}catch(We){he(We)}},Ie=oe=>{try{Te(ft.throw(oe))}catch(We){he(We)}},Te=oe=>oe.done?Qt(oe.value):Promise.resolve(oe.value).then(Re,Ie);Te((ft=ft.apply(ot,M)).next())});class re{constructor(M,ft){this.stateContainer=M,this.stream=ft,this.notifyRequiredCounter=0,this.scheduleNextState=(0,a.Lu)(st.Rs,Qt=>{this.isStreamOpen()&&this.stateContainer.set(Qt)}),this.enqueueStreamRequired=(0,a.Lu)(a.dY,Qt=>Qt?this.ensureStreamIsOpen():this.ensureStreamIsClosed())}notifyDataRequired(){this.notifyRequiredCounter++,this.enqueueStreamRequired(!0)}notifyDataNoLongerRequired(){const M=this.notifyRequiredCounter;Ve(()=>{M===this.notifyRequiredCounter&&this.enqueueStreamRequired(!1)})}notifyDataWasSet(){}setTidyCallback(M){this.tidyCallback=M}isStreamOpen(){return!!this.subscription}ensureStreamIsOpen(){this.subscription||(this.subscription=this.stream.subscribe(M=>this.scheduleNextState(M)))}ensureStreamIsClosed(){this.subscription&&(this.subscription.unsubscribe(),this.subscription=void 0,this.tidyCallback&&this.tidyCallback()),this.stateContainer.set(void 0)}}const fe=1e4,Se=new a.B7;function Ve(ot){return Vt(this,null,function*(){const M=(0,a.Cu)(fe),ft=Se.waitForFirst();yield Promise.race([M,ft]),ot()})}function Ye(ot,M,ft){if(M.stream)return new re(ft,M.stream.map(Re=>({meta:{},value:Re})));if(M.loadableStream)return new re(ft,M.loadableStream);const{loader:Qt,onChange:he}=Kt(ot,M);return new V(ft,Qt,M.invalidation,he)}let je={},Dt={};
2function $(ot){return Dt[ot]||0}function Pt(ot,M){let ft=!0;it(ot,1);const Qt=et(ot,M);return Qt.notifyDataRequired(),()=>{if(!ft)return;ft=!1,it(ot,-1)<1&&Qt.notifyDataNoLongerRequired()}}function et(ot,M){const ft=je[ot];if(ft)return ft;const Qt=M();return je[ot]=Qt,Qt.setTidyCallback(()=>{je[ot]===Qt&&delete je[ot]}),Qt}function it(ot,M){const Qt=(Dt[ot]||0)+M;return Dt[ot]=Qt,Qt}function z(ot,M){et(ot,M).notifyDataWasSet()}(0,a.Nj)(()=>{je={},Dt={}});class ut extends a.aS{constructor(){super("Data is not yet loaded.")}}var wt=(ot,M,ft)=>new Promise((Qt,he)=>{var Re=oe=>{try{Te(ft.next(oe))}catch(We){he(We)}},Ie=oe=>{try{Te(ft.throw(oe))}catch(We){he(We)}},Te=oe=>oe.done?Qt(oe.value):Promise.resolve(oe.value).then(Re,Ie);Te((ft=ft.apply(ot,M)).next())});const Ft=new a.Oh;class bt{constructor(M){this.storeName=M}getEntry(M){return new Ke(this.storeName,M)}findValues(M){return wt(this,null,function*(){const ft=yield k(this.storeName),Qt=yield ft.keys();return(yield Promise.all(Qt.map(Re=>wt(this,null,function*(){const Ie=yield ft.match(Re);if(!Ie)return;const Te=yield Ie.json(),[oe,We]=Te;if(M(oe,We))return Te})))).filter(qt)})}}function qt(ot){return ot!==void 0}class Ke{constructor(M,ft){this.storeName=M,this.key=ft}read(){return wt(this,null,function*(){return(0,a.lK)(()=>wt(this,null,function*(){const ft=yield(yield this.fetchCache()).match(this.offlineCacheKey());if(ft)return(yield ft.json())[0]}))})}write(M){return wt(this,null,function*(){yield Ft.registerTask(()=>wt(this,null,function*(){yield(0,a.lK)(()=>wt(this,null,function*(){yield(yield this.fetchCache()).put(this.offlineCacheKey(),new Response(JSON.stringify([M,this.key]),{headers:{"Content-Type":"application/json"}}))}))}))})}delete(){return wt(this,null,function*(){yield(0,a.lK)(()=>wt(this,null,function*(){yield(yield this.fetchCache()).delete(this.offlineCacheKey())}))})}debugIdentifier(){return JSON.stringify({[this.storeName]:this.key})}fetchCache(){return k(this.storeName)}offlineCacheKey(){return`/_scrivito-offline/${(0,a.xn)(this.key)}`}}const xe="scrivito-offline";function k(ot){return caches.open(`${xe}-${(0,a.YX)()}-${ot}`)}function yt(){return wt(this,null,function*(){const ot=yield te();yield Promise.all(ot.map(M=>caches.delete(M)))})}function Ct(){return wt(this,null,function*(){return Ft.waitForRegisteredTasks()})}function te(){return wt(this,null,function*(){return(yield caches.keys()).filter(M=>M.startsWith(xe))})}var ae=Object.defineProperty,_e=Object.defineProperties,Ge=Object.getOwnPropertyDescriptors,Je=Object.getOwnPropertySymbols,Fe=Object.prototype.hasOwnProperty,en=Object.prototype.propertyIsEnumerable,yn=(ot,M,ft)=>M in ot?ae(ot,M,{enumerable:!0,configurable:!0,writable:!0,value:ft}):ot[M]=ft,ln=(ot,M)=>{for(var ft in M||(M={}))Fe.call(M,ft)&&yn(ot,ft,M[ft]);if(Je)for(var ft of Je(M))en.call(M,ft)&&yn(ot,ft,M[ft]);return ot},Wn=(ot,M)=>_e(ot,Ge(M));const Bn=new bt("singleton");function bn(ot){return new gr(ot)}class gr{constructor(M){var ft;this.stateContainer=(ft=M.state)!=null?ft:(0,st.Ld)(),this.id=this.stateContainer.id(),this.affiliation=M.affiliation,this.invalidation=M.invalidation,this.processFactory=()=>{var Qt;const he=(Qt=M.offlineEntry)!=null?Qt:M.name?Bn.getEntry(M.name):void 0;return Ye(this,M.loader?Wn(ln({},M),{offlineEntry:he}):M,this.stateContainer)}}ensureAvailable(){return tn(this.id,this),this.checkIfAvailableMeta(this.getMeta())}get(){return this.getWithDefault(void 0)}getAffiliation(){return this.affiliation}getWithDefault(M){const ft=this.stateContainer.get();return this.checkIfAvailableState(ft)?(tn(this.id,this),ft.value):M}getOrThrow(){const M=this.stateContainer.get();if(!this.checkIfAvailableState(M))throw new ut;return tn(this.id,this),M.value}reader(){return this.ensureAvailable(),this.stateContainer.reader().subState("value")}set(M){this.stateContainer.set({value:M,meta:{version:this.currentVersion()}}),z(this.id,this.processFactory)}setError(M){this.stateContainer.set({meta:{error:M,version:this.currentVersion()}}),z(this.id,this.processFactory)}reset(){this.stateContainer.set(void 0)}isMissing(){return this.getMeta()===void 0}isAvailable(){const M=this.getMeta();return M!==void 0&&M.error===void 0}isError(){var M;return((M=this.getMeta())==null?void 0:M.error)!==void 0}
2numSubscribers(){return $(this.id)}subscribeLoading(){return Pt(this.id,this.processFactory)}rawStateContainer(){return this.stateContainer}getMeta(){return this.stateContainer.subState("meta").get()}checkIfAvailableState(M){return this.checkIfAvailableMeta(M?.meta)}checkIfAvailableMeta(M){return M===void 0?(S()||(this.subscribeLoading(),T()),B("incomplete",this),!1):(B($n(M,this.invalidation),this),R(M),!0)}currentVersion(){return Et(this.invalidation)}}function $n(ot,M){return tt(ot,M)?"outdated":ot.incomplete?"incomplete":"available"}const Ae=new a.hl;function tn(ot,M){const ft=Ae.current();ft&&(ft[ot]=M)}function on(ot){const M={};return{result:Ae.runWith(M,ot),usedData:Object.values(M)}}function qn(ot,M){const ft=sr(M);return ft.allDataLoaded?ft.result:ot}function un(ot){return new a.RE(M=>{let ft=!1;return ot.subscribe(Qt=>{if(Qt.meta.incomplete===!0){if(ft)return}else ft=!0;M.next(Qt)})})}function Vn(ot,M,ft){return ft?zn(ot,M,ft):zn(ot,()=>"",M)}function zn(ot,M,ft){const Qt=(0,st.Ld)();return(...he)=>S()?bn({state:Qt.subState(M(...he)),loadableStream:un(vt(()=>ft(...he)))}).getWithDefault(ot):ft(...he)}function Kn(ot,M){return On(()=>qn(ot,M))}function sr(ot){const M=A(()=>(0,a.Bd)(ot));M.forwardToCurrent();const ft=M.result,Qt=M.isAllDataLoaded();if(!ft.errorThrown)return{success:!0,result:ft.result,allDataLoaded:Qt};if(!Qt)return{success:!1,allDataLoaded:!1};throw ft.error}var gn=Object.defineProperty,tr=Object.defineProperties,er=Object.getOwnPropertyDescriptors,In=Object.getOwnPropertySymbols,nr=Object.prototype.hasOwnProperty,rr=Object.prototype.propertyIsEnumerable,_r=(ot,M,ft)=>M in ot?gn(ot,M,{enumerable:!0,configurable:!0,writable:!0,value:ft}):ot[M]=ft,pn=(ot,M)=>{for(var ft in M||(M={}))nr.call(M,ft)&&_r(ot,ft,M[ft]);if(In)for(var ft of In(M))rr.call(M,ft)&&_r(ot,ft,M[ft]);return ot},An=(ot,M)=>tr(ot,er(M)),Rn=(ot,M,ft)=>new Promise((Qt,he)=>{var Re=oe=>{try{Te(ft.next(oe))}catch(We){he(We)}},Ie=oe=>{try{Te(ft.throw(oe))}catch(We){he(We)}},Te=oe=>oe.done?Qt(oe.value):Promise.resolve(oe.value).then(Re,Ie);Te((ft=ft.apply(ot,M)).next())});function mr(ot){return new Hn(ot)}class Hn{constructor({name:M,loadElement:ft}){this.name=M,this.state=(0,st.Ld)(),this.loadElement=ft,M&&(ur(M,this),this.offlineStore=new bt(M))}get(M,ft){var Qt;const he=kn(M),Re=this.loadElement(M,ft),Ie=Re.loader?An(pn({},Re),{offlineEntry:(Qt=this.offlineStore)==null?void 0:Qt.getEntry(M)}):Re;return bn(An(pn({},Ie),{state:this.state.subState(he),affiliation:this.name?{collectionName:this.name,key:M}:void 0}))}clear(){this.state.clear()}dangerouslyGetRawValues(){const M=this.state.get();return M?Object.keys(M).map(ft=>M[ft]).filter(a.Wo).filter(_t).map(ft=>ft.value):[]}findValuesInOfflineStore(M){return Rn(this,null,function*(){if(!this.offlineStore)throw new a.Gd;return this.offlineStore.findValues(M)})}}function kn(ot){return typeof ot=="string"?ot:(0,a.xn)(ot)}const ar={};function ur(ot,M){if(ar[ot])throw new a.Gd;ar[ot]=M}function Jn(ot){const M=ar[ot];if(!M)throw new a.Gd;return M}function cr(ot){(0,st.I7)(()=>ot.forEach(Er))}function Er([ot,M,ft]){Jn(ot).get(M).set(ft)}function sn(ot){return ot.map(Pn)}function Pn(ot){const M=ot.getAffiliation();if(!M)throw new a.Gd;return[M.collectionName,M.key,ot.get()]}function an(ot){return vt(ot).filter(M=>!M.meta.incomplete).map(ht)}function _n(ot,M){const ft=new J;let Qt=(0,st.j2)(ot).result;const he=(0,st.Ml)(()=>A(ot),Re=>{Re.subscribeLoading(ft);const Ie=Re.result;(Qt===void 0||!(0,a.uw)(Ie,Qt))&&(M(Ie),Qt=Ie)});return{unsubscribe:()=>{he.unsubscribe(),ft.unsubscribe()}}}function wn(ot){return A(ot).result}function On(ot){const M=A(ot);return S()&&M.forwardToCurrent(),M.result}},4603(E,C,r){r.d(C,{bW:()=>B,eb:()=>S,o_:()=>Z,st:()=>J});var a=r(6687),p=r(5436),D=r(4476),A=r(6324);const T=(0,A.Ld)();function S(){var ht;return(ht=T.get())!=null?ht:(0,p.z7)()}function B(){const[ht,_t]=S();return ht==="workspace"&&_t==="published"}function Z(){return S()[1]}function J(ht){T.set((0,D.v)(ht))}function dt(){T.set((0,p.z7)())}(0,a.Nj)(dt)},5436(E,C,r){r.d(C,{$e:()=>ln,Re:()=>nt,kI:()=>rn,Ei:()=>In,$R:()=>En,yI:()=>jn,HX:()=>l,Wc:()=>sr,HI:()=>ot,gT:()=>Qt,Wk:()=>at,aR:()=>sa,uz:()=>xo,AR:()=>ua,w2:()=>da,rB:()=>F,fK:()=>br,ZU:()=>vn,eb:()=>Cn.eb,o_:()=>Cn.o_,Kp:()=>Mo,gy:()=>bn,cb:()=>H,S$:()=>$i,eF:()=>Fe,Ed:()=>qi,mM:()=>aa,Z0:()=>Je,ud:()=>yn,ED:()=>_e,B9:()=>Ge,t3:()=>Or,Mp:()=>en,uD:()=>jo,gP:()=>P,Wf:()=>po,kq:()=>ca,fZ:()=>la,mD:()=>ms,vs:()=>It.v,aG:()=>se,Wr:()=>St,z7:()=>Ki,Vg:()=>_s,Lw:()=>Ir,rs:()=>Lr,y7:()=>ko,mv:()=>On,d4:()=>m,st:()=>Cn.st,F1:()=>B,s8:()=>ps,$9:()=>Ri,GY:()=>hi,rF:()=>Z});var a=r(6687);function p(o={}){for(let n=0;n<10;n++){const u=(0,a.nw)();if(!o[u])return u}throw new a.Gd}
2var D=r(7885),A=r.n(D),T=r(9421);let S=!1;function B(o){S=o}function Z(){return!!S}function J(o){if(!Z())return o;const n=st(o);if(Y(n)!=="link")return n;const u=n[1].obj_id;return u?["reference",u]:n}function dt(o){if(!Z())return o;const n=q(o);return Y(n)!=="linklist"?n:["referencelist",n[1].map(({obj_id:L})=>L).filter(L=>!!L)]}function ht(o){if(!Z())return o;const n=st(o);return Y(n)!=="reference"?n:["link",Ot(n[1])]}function _t(o){if(!Z())return o;const n=q(o);return Y(n)!=="referencelist"?n:["linklist",n[1].map(Ot)]}function Ot(o){return{fragment:null,obj_id:o,query:null,target:null,title:null,url:null}}const R={linklist:"link",referencelist:"reference",stringlist:"string"};function st(o){const n=Z()&&Y(o);if(n==="html")return["string",o[1]];const u=n&&R[n];if(!u)return o;const L=o[1];return L.length?[u,L[0]]:o}const vt={html:"stringlist",link:"linklist",reference:"referencelist",string:"stringlist"};function q(o){const n=Z()&&Y(o),u=n&&vt[n];if(!u)return o;const L=o[1];return L?[u,[L]]:o}function Y(o){return Array.isArray(o)?o[0]:void 0}(0,a.Nj)(()=>S=!1);const H={isInScope(o){return!o.isDeleted()},applyToSearch(o){return o.excludeDeleted()},applyToCreate(o){return o}};var I=r(9180);class at{constructor(n,u){this._id=n,this._reason=u}id(){return this._id}isForbidden(){return this._reason==="forbidden"}isNonexistent(){return this._reason==="nonexistent"}isNotLoaded(){return this._reason==="notLoaded"}reason(){return this._reason}}var Q=Object.defineProperty,V=Object.getOwnPropertySymbols,tt=Object.prototype.hasOwnProperty,Et=Object.prototype.propertyIsEnumerable,kt=(o,n,u)=>n in o?Q(o,n,{enumerable:!0,configurable:!0,writable:!0,value:u}):o[n]=u,Zt=(o,n)=>{for(var u in n||(n={}))tt.call(n,u)&&kt(o,u,n[u]);if(V)for(var u of V(n))Et.call(n,u)&&kt(o,u,n[u]);return o};function se(o){return new ve(o)}class ve{constructor(n){this.objSpaceId=n}get(n){const u=(0,I.ov)(this.objSpaceId,n);return u?u.isUnavailable()?u.isForbidden()?new at(n,"forbidden"):new at(n,"nonexistent"):new rn(u):new at(n,"notLoaded")}search(){return new In((0,T.g7)(this.objSpaceId)?T.HY:this.objSpaceId).includeDeleted()}create(n,u){const L=u._obj_class;if(!L)throw new a.Gd;if((0,T.dQ)(this.objSpaceId))throw new a.aS("Cannot create an obj, because the current site is not yet determined.");const At=Zt({_obj_class:L,_id:n,_site_id:null},u);return new rn((0,I.c2)(this.objSpaceId,n,At))}and(n){return new ue(this,n)}}class ue{constructor(n,u){this.originalScope=n,this.transformation=u}get(n){const u=this.originalScope.get(n);return u instanceof rn&&!this.transformation.isInScope(u)?new at(n,"nonexistent"):u}search(){const n=this.originalScope.search();return this.transformation.applyToSearch(n),n}create(n,u){return this.originalScope.create(n,this.transformation.applyToCreate(u))}and(n){return new ue(this,n)}}function St(o){return se(o).and(H)}function Kt(o,n,u){switch(u[0]){case"binary":{const L=zt(n,u);return L?new jn(L.id,o.objSpaceId()):null}case"reference":{const L=zt(n,u);return L?et(L,o):null}case"referencelist":return zt(n,u).map(L=>et(L,o));case"widget":{const L=zt(n,u);return L?o.widget(L):null}case"widgetlist":return zt(n,u).map(L=>(0,a.W3)(o.widget(L)));default:return zt(n,u)}}function zt(o,n){switch(n[0]){case"binary":return de(o);case"boolean":return Ut(o);case"datalocator":return Vt(o);case"date":return re(o);case"datetime":return re(o);case"float":return Ye(st(o));case"enum":return Se(st(o),n);case"html":return fe(st(o));case"integer":return je(st(o));case"link":return Dt(ht(o));case"linklist":return $(_t(o));case"multienum":return Ve(q(o),n);case"reference":return it(J(o));case"referencelist":return z(dt(o));case"string":return fe(st(o));case"stringlist":return ut(q(o));case"widget":return wt(o);case"widgetlist":return Ft(o);default:throw new a.Gd}}function de(o){return bt("binary",o)?o[1]:null}function Ut(o){return bt("boolean",o)?o[1]:!1}function Vt(o){return bt("datalocator",o)?new l(o[1]||{class:null}):new l({class:null})}function re(o){return bt("date",o)?(0,a.uS)(o[1]):null}function fe(o){return bt("html",o)||bt("string",o)?o[1]:""}function Se(o,n){if(bt("string",o)){const[,u]=o,[,{values:L}]=n;if(L.includes(u))return u}return null}function Ve(o,n){if(bt("stringlist",o)){const[,{values:u}]=n;return o[1].filter(L=>u.includes(L))}return[]}function Ye(o){if(bt("number",o))return(0,a.A_)(o[1].toString());if(bt("string",o)){const[,n]=o;if(n.match(/^-?\d+(\.\d+)?$/))return(0,a.A_)(n)}return null}function je(o){return bt("number",o)||bt("string",o)?(0,a.w0)(o[1]):null}function Dt(o){return bt("link",o)?Pt(o[1]):null}function $(o){return bt("linklist",o)?o[1].map(Pt):[]}
2function Pt(o){const{query:n,rel:u,target:L,title:At,url:ie}=o,pe={query:n,rel:u,target:L,title:At,url:ie};return"fragment"in o&&(pe.hash=o.fragment),"obj_id"in o&&(pe.objId=o.obj_id),new nt(pe)}function et(o,n){return Ge(St(n.objSpaceId()),o)}function it(o){return bt("reference",o)?o[1]:null}function z(o){return bt("referencelist",o)?o[1]:[]}function ut(o){return bt("stringlist",o)?o[1]:[]}function wt(o){return bt("widget",o)?o[1]:bt("widgetlist",o)&&o[1].length>0?o[1][0]:null}function Ft(o){return bt("widgetlist",o)?o[1]:bt("widget",o)&&o[1]?[o[1]]:[]}function bt(o,n){return Array.isArray(n)&&n[0]===o}var qt=r(8307),Ke=r.n(qt),xe=r(5020),k=r.n(xe),yt=r(9477),Ct=r.n(yt),te=r(5929),ae=r(5924);function _e(o,n){const u=o.get(n);return u instanceof rn?u:null}function Ge(o,n){return o.get(n)}function Je(o,n,u){var L;const At=o.search().and(n,"equals",u),ie=At.first();return ie&&ie.isDeleted()&&(L=At.excludeDeleted().first())!=null?L:ie}function Fe(o,n,u){return o.search().and(n,"equals",u).dangerouslyUnboundedTake()}function en(o){return Je(o.and($i),"_path","/")}function yn(o,n){return Je(o,"_path",n)}class ln{constructor(n,u,L){this.container=n,this.attributeName=u,this.typeInfo=L,n instanceof En&&(this.widgetId=n.id())}get(){return ni(this.container,this.attributeName,this.typeInfo)}getValueOrConnection(){return this.container.getValueOrConnection(this.attributeName,this.typeInfo)}update(n){this.container.update({[this.attributeName]:[n,this.typeInfo]})}getContainer(){return this.container}obj(){return this.container.obj()}objSpaceId(){return this.container.objSpaceId()}name(){return this.attributeName}maximum(){const n=this.typeInfo[1];return n?.maximum}type(){return this.typeInfo[0]}equals(n){return n instanceof ln?this.container.equals(n.getContainer())&&this.attributeName===n.name():!1}validClasses(){const n=this.typeInfo[1];return n?.validClasses}getDiff([n,u]){const L=this.obj();return(0,I.km)(n,u,this.attributeName,L.id(),this.widgetId)}getHtmlDiffContent(n){const u=this.getDiff(n);return u?.format==="html"?u.content:null}toString(){const n=this.obj().id(),u=this.name();return this.widgetId?`<BasicField name=${u} objId=${n} widgetId=${this.widgetId}>`:`<BasicField name=${u} objId=${n}>`}id(){return this.widgetId?`${this.attributeName}|${this.obj().id()}|${this.widgetId}`:`${this.attributeName}|${this.obj().id()}`}inObjSpace(n){return this.inObjScope(St(n))}inObjScope(n){const u=_e(n,this.obj().id());if(!u)return null;const L=this.getContainer()instanceof rn?u:u.widget(this.getContainer().id());return L?new ln(L,this.name(),this.typeInfo):null}}class Wn{constructor(n,u){this.objSpaceId=n,this.facet=u}name(){return this.facet.name}count(){return this.facet.count}includedObjs(){const n=St(this.objSpaceId);return this.facet.includedObjIds.map(u=>_e(n,u)).filter(u=>!!u)}}let Bn=!1;function bn(){Bn=!0}function gr(){return Bn}(0,a.Nj)(()=>{Bn=!1});var $n=Object.defineProperty,Ae=Object.defineProperties,tn=Object.getOwnPropertyDescriptors,on=Object.getOwnPropertySymbols,qn=Object.prototype.hasOwnProperty,un=Object.prototype.propertyIsEnumerable,Vn=(o,n,u)=>n in o?$n(o,n,{enumerable:!0,configurable:!0,writable:!0,value:u}):o[n]=u,zn=(o,n)=>{for(var u in n||(n={}))qn.call(n,u)&&Vn(o,u,n[u]);if(on)for(var u of on(n))un.call(n,u)&&Vn(o,u,n[u]);return o},Kn=(o,n)=>Ae(o,tn(n));const sr=["contains","containsPrefix","matches"],gn=["contains","containsPrefix","matches","equals","startsWith","isGreaterThan","isLessThan","linksTo","refersTo"],tr=["equals","startsWith","isGreaterThan","isLessThan"],er=["contains","containsPrefix","matches"];class In{constructor(n,u){this._objSpaceId=n,this._query=u?[...u.query]:[],this._boost=u?.boost||[],this._batchSize=u?.batchSize,this._offset=u?.offset,this._orderBy=u?.orderBy,this._includeDeleted=u?.includeDeleted,this._includeEditingAssets=u?.includeEditingAssets}static fromParams(n,u){return new In((0,It.v)(n),u)}and(n,u,L,At){if(n instanceof In)this._query=[...this._query,...n._query];else{if(u===void 0)throw new a.c1("Missing operator to search with");if(L===void 0)throw new a.c1('Missing value to search (specify "null" for missing)');const pe=nr(n,u,L);At&&(rr(u),pe.boost=ur(At)),this._query.push(pe)}return this}andNot(n,u,L){const At=nr(n,u,L);return _r(u),At.negate=!0,this._query.push(At),this}andIsChildOf(n){const u=n.siteId(),L=n.path();return u&&L?this.onSite(u).and("_parentPath","equals",L):this.and("_id","equals",null)}andIsInsideSubtreeOf(n){const u=n.siteId(),L=n.path();return u&&L?this.onSite(u).and("_path","startsWith",L):this.and("_id","equals",n.id())}boost(n,u,L,At){const ie=nr(n,u,L);return this._boost.push({condition:[ie],factor:At}),this}offset(n){return this._offset=n||void 0,this}order(n,u){const L=Array.isArray(n)?n:[[n,u]];return this._orderBy=L.map(At=>{if(Array.isArray(At)){const[ie,pe]=At;return cr(ie,pe)}return cr(At)}),this}batchSize(n){return this._batchSize=n,this}includeDeleted(){return this._includeDeleted=!0,this}excludeDeleted(){return this._includeDeleted=void 0,this}includeEditingAssets(){return this._includeEditingAssets=!0,this}count(){return(0,I.x1)(this.objSpaceId(),this.queryParams())||0}first(){return this.take(1)[0]||null}take(n){return this.internalTake(n)}dangerouslyUnboundedTake(){return gr()&&(0,I.HI)("for performance reasons, avoid dangerouslyUnboundedTake during render. Use take(limit) instead."),this.internalTake(void 0)}iterator(){return this.getObjDataQuery().iterator()}iteratorFromContinuation(n){return this.getObjDataQuery().iteratorFromContinuation(n)}getObjDataQuery(){const n=(0,I.s5)(this.objSpaceId(),this.queryParams(),this.getBatchSize());return(0,a.YB)(n,u=>u.map(L=>new rn(L)))}getBatchSize(){return this._batchSize||100}suggest(n,u){const{attributes:L,limit:At}=zn({attributes:["*"],limit:5},u);return(0,I.ZA)(this.objSpaceId(),n,{attributes:L,limit:At},this.queryParams())}facet(n,u){let L;return u===void 0?L={}:L=sn(u),new I.gD(this.objSpaceId(),Jn(n),L,this._query).result().map(ie=>new Wn(this.objSpaceId(),ie))}objSpaceId(){return this._objSpaceId}params(){return Kn(zn({},this.queryParams()),{batchSize:this._batchSize})}queryParams(){const n={query:this._query};return this._boost!==void 0&&this._boost.length&&(n.boost=this._boost),this._offset!==void 0&&(n.offset=this._offset),this._orderBy!==void 0&&(n.orderBy=this._orderBy),this._includeDeleted!==void 0&&(n.includeDeleted=this._includeDeleted),this._includeEditingAssets!==void 0&&(n.includeEditingAssets=this._includeEditingAssets),n}internalTake(n){const u=this._batchSize;try{return this._batchSize=n===void 0?1e3:n,(0,a._Q)(this.iterator(),n)}finally{this._batchSize=u}}onSite(n){return this.and("_siteId","equals",n)}}function nr(o,n,u){const L=ar(o),At=Hn(n),ie=pn(u,At);return{field:L,operator:At,value:ie}}function rr(o){if(!er.includes(o))throw new a.c1(`Boosting operator "${o}
2" is invalid. ${kn(er)}`)}function _r(o){if(!tr.includes(o))throw new a.c1(`Negating operator "${o}" is invalid. ${kn(tr)}`)}function pn(o,n){return Array.isArray(o)?o.map(u=>An(u,n)):An(o,n)}function An(o,n){return Ke()(o)?Rn(o,n):o instanceof rn?o.id():o}function Rn(o,n){if(n!=="is_greater_than"&&n!=="is_less_than")return(0,a.A)(o);const u=mr(o),L=Math.abs(Date.now()-o.getTime())<3e4;return(0,a.A)(L?u:o)}function mr(o){return new Date(Math.round(o.getTime()/6e4)*6e4)}function Hn(o){if(!gn.includes(o))throw new a.c1(`Operator "${o}" is invalid. ${kn(gn)}`);return(0,a.z9)(o)}function kn(o){return`Valid operators are ${o.join(", ")}.`}function ar(o){return Array.isArray(o)?o.map(n=>Jn(n)):Jn(o)}function ur(o){const n={};return Object.keys(o).forEach(u=>{const L=o[u],At=Jn(u);n[At]=L}),n}function Jn(o){if(!(0,a.Dz)(o))throw new a.c1(`Attribute name "${o}" is not camel case.`);return(0,a.z9)(o)}function cr(o,n="asc"){return[Jn(o),n]}const Er=["limit","includeObjs"];function sn(o){const n=Object.keys(o).filter(u=>!Er.includes(u));if(n.length)throw new a.c1(`Invalid facet options: ${(0,a.aO)(n)}. Valid options: ${Er.join()}`);return o}var Pn=r(6084),an=r(6324),_n=(o,n,u)=>new Promise((L,At)=>{var ie=ge=>{try{Be(u.next(ge))}catch(cn){At(cn)}},pe=ge=>{try{Be(u.throw(ge))}catch(cn){At(cn)}},Be=ge=>ge.done?L(ge.value):Promise.resolve(ge.value).then(ie,pe);Be((u=u.apply(o,n)).next())});let wn;function On(o){wn=o}class ot{constructor(n,u={}){let L=u.filename;if(this.contentType=u.contentType,ft(n))this.idToCopy=n.idToCopy;else{const{source:At}=n;this.source=At,this.contentType||(this.contentType=At.type),L||(L=At.name)}L&&(this.filename=L.replace(/[^\w\-_\.$]/g,"-"))}into(n){return M(n),(0,an.q2)("Changing CMS content"),this.intoId(n._scrivitoPrivateContent.id())}intoId(n){return _n(this,null,function*(){if(!wn)throw new a.Gd;let u;if(this.idToCopy)u=yield wn.copyBinary(this.idToCopy,n,this.filename,this.contentType);else{if(!this.source)throw new a.Gd;u=yield wn.uploadBinary(n,this.source,this.filename,this.contentType)}return new jn(u.id,(0,Cn.eb)())})}}function M(o){ms(o)||(0,a.Ht)("FutureBinary#into","'target' must be an instance of 'Obj'.",{docPermalink:"js-sdk/FutureBinary-into"})}function ft(o){return!!o.idToCopy}class Qt{constructor(n,u=Ki()){this._binaryId=n,this.objSpaceId=u,this._binaryId&&(this.loadableData=he.get(this._binaryId,this.objSpaceId))}get(n){(0,I.C_)("MetadataCollection#get"),Ie(n);const u=this.getData();if(u){const L=(0,a.z9)(n);return u.hasOwnProperty(L)?u[L]:null}return null}keys(){const n=this.getData();return n?Object.keys(n).map(a.xQ):[]}contentLength(){const n=this.get("contentLength");return typeof n!="number"?0:n}contentType(){const n=this.get("contentType");return typeof n!="string"?"":n}binaryId(){return this._binaryId}getData(){if(this.loadableData){const n=this.loadableData.get();if(n)return Re(n)}}}const he=(0,Pn.rL)({name:"metadata",loadElement:(o,n)=>({loader:()=>T.g2.retrieveBinaryMetadata(o,{accessVia:n})})});function Re(o){const n=o.meta_data;if(!(0,a.Gv)(n))throw new a.Gd;const u={};for(const L of Object.keys(n)){const[At,ie]=n[L];if(ie==null)throw new a.Gd;let pe;if(At==="date")if(typeof ie=="string")pe=(0,a.uS)(ie);else throw new a.Gd;else pe=ie;u[L]=pe}return u}function Ie(o){if(!(0,a.Dz)(o))throw new a.c1(`Metadata key "${o}" is not in camel case.`)}var Te=Object.defineProperty,oe=Object.getOwnPropertySymbols,We=Object.prototype.hasOwnProperty,lr=Object.prototype.propertyIsEnumerable,yr=(o,n,u)=>n in o?Te(o,n,{enumerable:!0,configurable:!0,writable:!0,value:u}):o[n]=u,Qn=(o,n)=>{for(var u in n||(n={}))We.call(n,u)&&yr(o,u,n[u]);if(oe)for(var u of oe(n))lr.call(n,u)&&yr(o,u,n[u]);return o};const Mr=(0,Pn.rL)({name:"binary",loadElement:([o,n],u)=>({loader:()=>T.g2.retrieveBinaryUrls(o,n,{accessVia:u})})}),Fn="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7";class jn{constructor(n,u=Ki(),L={}){this._id=n,this._objSpaceId=u,this._transformation=L||void 0,this._loadableData=Mr.get([this._id,this._transformation],this._objSpaceId)}static upload(n,u){if(ir(n,u),!(0,a.fo)(n)&&!(u&&u.filename))throw new a.c1("Expected a filename to be passed with Blob as the source.");return new ot({source:n},u)}id(){return this._id}copy(n){return new ot({idToCopy:this._id},n)}isPrivate(){return!(0,a.aI)(this._objSpaceId,Ki())}optimizeFor(n){return new jn(this._id,this._objSpaceId,Qn(Qn({},this._transformation),n))}original(){return new jn(this._id,this._objSpaceId,{})}raw(){return new jn(this._id,this._objSpaceId,null)}isExplicitlyTransformed(){return this.isTransformed()&&!k()(this._transformation)}isRaw(){return!this.isTransformed()}url(){return(0,I.C_)("Binary#url"),this.urlWithoutPlaceholder()||Fn}urlWithoutPlaceholder(){const n=this._loadableData.get();if(!n)return;const u=n[this.accessType()];if(!u)throw new a.Gd;return u.get.url}filename(){const n=this.url();
2return!n||n.match(/^data:/)?"":new URL(n,"http://example.com").pathname.split("/").pop()||""}metadata(){return this.assertNotTransformed("Metadata"),new Qt(this._id,this._objSpaceId)}contentType(){return this.assertNotTransformed("Content type"),this.metadata().contentType()}contentLength(){return this.assertNotTransformed("Content length"),this.metadata().contentLength()}extname(){if(this.raw().filename().indexOf(".")>-1){const n=this.raw().filename().split(/[.\\]+/);if(n.length>1)return n[n.length-1].toLowerCase()}return""}equals(n){return this.id()===n.id()&&(0,a.aI)(this._objSpaceId,n.objSpaceId())&&Ct()(this.definition(),n.definition())}isImage(){const n=this.raw().contentType();return n?n.split("/")[0]==="image":!1}definition(){return this._transformation||null}objSpaceId(){return this._objSpaceId}accessType(){return this.isPrivate()?"private_access":"public_access"}assertNotTransformed(n){if(this.isTransformed())throw new a.aS(`"${n}" is not available for transformed images. Use "Scrivito.Binary#raw" to access the untransformed version of the image.`)}isTransformed(){return!!this._transformation}}function ir(o,n){(0,a.qf)(o)||(0,a.fo)(o)||(0,a.Ht)("Binary.upload","'source' must be a 'Blob' or a 'File'.",{docPermalink:"js-sdk/Binary-static-upload"}),["string","undefined"].includes(typeof n?.contentType)||(0,a.Ht)("Binary.upload","'options.contentType' must be a 'String'.",{docPermalink:"js-sdk/Binary-static-upload"}),["string","undefined"].includes(typeof n?.filename)||(0,a.Ht)("Binary.upload","'options.filename' must be a 'String'.",{docPermalink:"js-sdk/Binary-static-upload"})}var dr=Object.defineProperty,Yn=Object.defineProperties,j=Object.getOwnPropertyDescriptors,y=Object.getOwnPropertySymbols,N=Object.prototype.hasOwnProperty,Bt=Object.prototype.propertyIsEnumerable,Gt=(o,n,u)=>n in o?dr(o,n,{enumerable:!0,configurable:!0,writable:!0,value:u}):o[n]=u,Pe=(o,n)=>{for(var u in n||(n={}))N.call(n,u)&&Gt(o,u,n[u]);if(y)for(var u of y(n))Bt.call(n,u)&&Gt(o,u,n[u]);return o},Ne=(o,n)=>Yn(o,j(n)),Xe=(o,n)=>{var u={};for(var L in o)N.call(o,L)&&n.indexOf(L)<0&&(u[L]=o[L]);if(o!=null&&y)for(var L of y(o))n.indexOf(L)<0&&Bt.call(o,L)&&(u[L]=o[L]);return u},qe=(o,n,u)=>new Promise((L,At)=>{var ie=ge=>{try{Be(u.next(ge))}catch(cn){At(cn)}},pe=ge=>{try{Be(u.throw(ge))}catch(cn){At(cn)}},Be=ge=>ge.done?L(ge.value):Promise.resolve(ge.value).then(ie,pe);Be((u=u.apply(o,n)).next())});function vn(o,n){var u=n,{_id:L,_objClass:At}=u,ie=Xe(u,["_id","_objClass"]);const pe=o.create(fr(L)||rn.generateId(),{_obj_class:fr(At)});return pe.update(ie),pe}function br(o,n,u){return qe(this,null,function*(){const At=fr(u._id)||rn.generateId(),ie=yield jn.upload(n).intoId(At),pe=vn(o,Ne(Pe({},u),{_id:[At],blob:[ie,["binary"]]}));return yield pe.finishSaving(),pe})}function fr(o){const n=Array.isArray(o)?o[0]:o;return typeof n=="string"?n:void 0}function hr(o){return!o||o==="/"?null:o.split("/").slice(0,-1).join("/")||"/"}var Cn=r(4603),ai=Object.defineProperty,Nr=Object.defineProperties,Qr=Object.getOwnPropertyDescriptors,$r=Object.getOwnPropertySymbols,Yr=Object.prototype.hasOwnProperty,Zr=Object.prototype.propertyIsEnumerable,Gn=(o,n,u)=>n in o?ai(o,n,{enumerable:!0,configurable:!0,writable:!0,value:u}):o[n]=u,xn=(o,n)=>{for(var u in n||(n={}))Yr.call(n,u)&&Gn(o,u,n[u]);if($r)for(var u of $r(n))Zr.call(n,u)&&Gn(o,u,n[u]);return o},Xr=(o,n)=>Nr(o,Qr(n));function Lr(o){return{isInScope(n){return n.siteId()===o},applyToSearch(n){return n.and("_siteId","equals",o)},applyToCreate(n){return Xr(xn({},n),{_site_id:o})}}}var Ur=Object.getOwnPropertySymbols,ui=Object.prototype.hasOwnProperty,Pr=Object.prototype.propertyIsEnumerable,Sr=(o,n)=>{var u={};for(var L in o)ui.call(o,L)&&n.indexOf(L)<0&&(u[L]=o[L]);if(o!=null&&Ur)for(var L of Ur(o))n.indexOf(L)<0&&Pr.call(o,L)&&(u[L]=o[L]);return u},Vr=(o,n,u)=>new Promise((L,At)=>{var ie=ge=>{try{Be(u.next(ge))}catch(cn){At(cn)}},pe=ge=>{try{Be(u.throw(ge))}catch(cn){At(cn)}},Be=ge=>ge.done?L(ge.value):Promise.resolve(ge.value).then(ie,pe);Be((u=u.apply(o,n)).next())});class qr{constructor(n){this._data=n}}class rn{static get(n){return _e(wr(),n)}static getIncludingDeleted(n){return _e(se((0,Cn.eb)()),n)}static createInObjSpace(n,u){return vn(se(n),u)}static generateId(){return(0,a.zE)()}static all(){return new In((0,Cn.eb)()).batchSize(1e3)}static where(n,u,L,At){return new In((0,Cn.eb)()).and(n,u,L,At)}static getByPermalink(n){return Je(wr(),"_permalink",n)}static getAllByPermalink(n){return Fe(wr(),"_permalink",n)}constructor(n){this.objData=n}id(){return this.objData.id()}objClass(){const n=this.getAttributeData("_obj_class");if(n)return n;throw new a.aS("Object was deleted, possibly by another user.")}obj(){return this}createdAt(){return(0,a.Qf)(this.getAttributeData("_created_at"))}createdBy(){return this.getAttributeData("_created_by")||null}lastChanged(){const n=this.getAttributeData("_last_changed");return n?(0,a.Qf)(n):null}lastChangedBy(){return this.getAttributeData("_last_changed_by")||null}firstPublishedAt(){return(0,a.Qf)(this.getAttributeData("_first_published_at"))}publishedAt(){return(0,a.Qf)(this.getAttributeData("_published_at"))}firstPublishedBy(){return this.getAttributeData("_first_published_by")||null}publishedBy(){return this.getAttributeData("_published_by")||null}objSpaceId(){return this.objData.objSpaceId()}version(){return this.getAttributeData("_version")}path(){return this.getAttributeData("_path")||null}permalink(){return this.getAttributeData("_permalink")||null}siteId(){var n;return(n=this.getAttributeData("_site_id"))!=null?n:null}language(){var n;return(n=this.getAttributeData("_language"))!=null?n:null}parentPath(){return hr(this.path())}parent(){const n=this.parentPath(),u=this.siteId();return n===null||u===null?null:Wr(this.objSpaceId(),u,n)}hasConflicts(){return!!this.getAttributeData("_conflicts")}modification(){return this.objData.isUnavailable()||this.getAttributeData("_marked_deleted")?"deleted":this.getAttributeData("_modification")||null}dataClass(){return this.get("dataClass","string")||null}dataParam(){var n;return(n=this.getAttributeData("_data_param"))!=null?n:null}get(n,u){return ni(this,n,u)}getValueOrConnection(n,u){return qi(this,n,u)}isModified(){return!!this.modification()}isNew(){return this.modification()==="new"}isEdited(){return this.modification()==="edited"}isEditingAsset(){return this.getAttributeData("_editing_asset")===!0}isDeleted(){return this.modification()==="deleted"}contentLength(){return this.metadata().contentLength()}contentType(){return this.metadata().contentType()}contentUrl(){var n;return((n=this.blob())==null?void 0:n.url())||""}contentId(){return this.getAttributeData("_content_id")||this.id()}metadata(){const n=this.blob();return n?new Qt(n.id(),this.objSpaceId()):new Qt}children(){const n=this.getChildrenSearch();return n?n.dangerouslyUnboundedTake():[]}hasChildren(){const n=this.getChildrenSearch();return n?n.batchSize(0).count()>0:!1}countChildren(){const n=this.getChildrenSearch();return n?n.batchSize(0).count():0}orderedChildren(){return this.sortByChildOrder(this.children())}sortByChildOrder(n){if(n.length===0)return[];const u=this.childOrder().map(L=>L.id());return n.map(L=>{const At=u.indexOf(L.id());return[At===-1?n.length:At,L]}).sort(([L],[At])=>L-At).map(([,L])=>L)}hasChildOrder(){return this.childOrder().length>0}backlinks(){return this.backlinksSearch().dangerouslyUnboundedTake()}backlinksSearch(){return St(this.objSpaceId()).search().and("*","linksTo",this)}ancestors(){const n=this.parentPath(),u=this.siteId();return n===null||u===null?[]:(0,a.FQ)(n).map(L=>
2Wr(this.objSpaceId(),u,L))}restriction(){const n=this.getAttributeData("_restriction");return yi(n)}restrict(n="_auth"){this.update({_restriction:n==="_public"?null:[[n]]})}unrestrict(){this.restrict("_public")}isRestricted(){return this.restriction()!=="_public"}update(n){const u=ri(n);this.updateWithUnknownValues(u)}updateWithUnknownValues(n){(0,an.I7)(()=>{to(this,n);const u=v(n);this.objData.update(u),this.startLinkResolution()})}delete(){this.update({_markedDeleted:[!0]})}insertWidget(n,u){const L=Tn(u),At=this.widgetPlacementFor(L);if(At){const{attributeValue:ie,attributeName:pe,container:Be,index:ge}=At;if(!Array.isArray(ie))throw new a.Gd;const cn=u.before?ge:ge+1,xi=[...ie.slice(0,cn),n,...ie.slice(cn)];Be.update({[pe]:[xi,["widgetlist"]]})}}deleteWidget(n){const u=this.fieldContainingWidget(n);if(u)if(u.type()==="widgetlist"){const L=u,ie=L.get().filter(pe=>!pe.equals(n));L.update(ie)}else u.update(null)}siblingWidget(n,u){const L=this.widgetPlacementFor(n.id());if(L){const{attributeValue:At,index:ie}=L;if(Array.isArray(At))return At[ie+u]}}markResolvedAsync(){return this.update({_conflicts:[null]}),this.finishSaving()}finishSaving(){return Vr(this,null,function*(){return yield this.finishLinkResolution(),this.objData.finishSaving()})}equals(n){return n instanceof rn&&this.id()===n.id()&&(0,a.aI)(this.objSpaceId(),n.objSpaceId())}widget(n){return this.getWidgetAttribute(n,"_obj_class")?En.build(n,this):null}getWidgetAttribute(n,u){return this.objData.getWidgetAttribute(n,u)}widgets(){const n=this.objData.getIfExistent();if(!n)return[];const u=n._widget_pool;if(!u)return[];const L=[],At={};return this.collectWidgets(L,n,u,At),L}widgetClassNamesWithBadPerformance(){const n=this.objData.getWidgetPoolWithBadPerformance();if(!n)return[];const u=new Set(Object.values(n).filter(L=>!!L).map(L=>L._obj_class).filter(L=>!!L));return Array.from(u)}fieldContainingWidget(n){const u=n.id(),L=this.widgetPlacementFor(u);if(L){const{container:At,attributeName:ie,attributeValue:pe}=L;return Array.isArray(pe)?new ln(At,ie,["widgetlist"]):new ln(At,ie,["widget"])}}generateWidgetId(){return p(this.getData()._widget_pool)}serializeAttributes(){const n=Fi(this),{_conflicts:u,_modification:L,_created_at:At,_created_by:ie,_last_changed:pe,_last_changed_by:Be}=n;return Sr(n,["_conflicts","_modification","_created_at","_created_by","_last_changed","_last_changed_by"])}slug(){const n=this.get("title","string");return(0,te.slugify)(n)}getWidgetData(n){return this.objData.getWidget(n)}startLinkResolution(){(0,I.xX)()||(0,ae.AF)((0,Cn.eb)(),this.id())}finishLinkResolution(){return(0,ae.HQ)((0,Cn.eb)(),this.id())}toPrettyPrint(){return`[object ${this.objClass()} id="${this.id()}"]`}getAttributeData(n,u){return u==="widget"||u==="widgetlist"?this.objData.getAttributeWithWidgetData(n):this.objData.getAttributeWithoutWidgetData(n)}getData(){return(0,a.W3)(this.objData.get())}getRawData(){return this.objData.get()}createSnapshot(){return new qr(this.objData.getOrThrow())}revertTo(n){this.objData.set(n._data)}blob(){return this.get("blob",["binary"])}collectWidgets(n,u,L,At){Object.keys(u).map(ie=>{const pe=u[ie];if(!pe||(0,a.iI)(ie))return;const Be=pe;if((0,T.zt)(Be))return Be[1]}).forEach(ie=>{ie&&ie.forEach(pe=>{if(At[pe])return;At[pe]=!0;const Be=this.widget(pe);if(!Be)return;n.push(Be);const ge=L[pe];this.collectWidgets(n,ge,L,At)})})}widgetPlacementFor(n){const u=this.objData.getIfExistent();if(!u)return;const L=(0,I.fT)(u,n);if(!L)return;const At=(0,a.xQ)(L.attributeName),{attributeType:ie,index:pe,parentWidgetId:Be}=L;let ge;if(Be){if(ge=this.widget(Be),!ge)return}else ge=this;return{container:ge,attributeName:At,attributeType:ie,attributeValue:ge.get(At,[ie]),index:pe,parentWidgetId:Be}}childOrder(){return this.get("childOrder","referencelist")}getChildrenSearch(){const n=this.path(),u=this.siteId();if(!(!n||u===null))return St(this.objSpaceId()).search().andIsChildOf(this)}}function Tn(o){return zr(o)?o.before.id():o.after.id()}function zr(o){return!!o.before}function wr(){return St((0,Cn.eb)())}function Wr(o,n,u){return Je(St(o).and(Lr(n)),"_path",u)}var Kr=Object.defineProperty,pr=Object.getOwnPropertySymbols,Hr=Object.prototype.hasOwnProperty,ti=Object.prototype.propertyIsEnumerable,w=(o,n,u)=>n in o?Kr(o,n,{enumerable:!0,configurable:!0,writable:!0,value:u}):o[n]=u,x=(o,n)=>{for(var u in n||(n={}))Hr.call(n,u)&&w(o,u,n[u]);if(pr)for(var u of pr(n))ti.call(n,u)&&w(o,u,n[u]);return o};
2class nt{constructor(n){this.attributes=x({},n)}title(){return this.attributes.title||null}query(){return this.attributes.query||null}hash(){return this.attributes.hash||null}rel(){return this.attributes.rel||null}target(){return this.attributes.target||null}url(){return this.attributes.url||null}objId(){return this.attributes.objId||null}obj(){const n=this.objId();if(!n)return null;const u=St((0,Cn.eb)());return Ge(u,n)}queryParameters(){const n=new URLSearchParams(this.query()||""),u={};for(const[L,At]of n.entries())u[L]=At||null;return u}isExternal(){return!!this.url()}isInternal(){return!this.isExternal()}equals(n){return n instanceof nt&&Ct()(n.attributesForComparison(),this.attributesForComparison())}copy(n={}){const u=x(x({},this.attributes),n);if(n.objId&&n.url)throw new a.c1('Link#copy refused: both "objId" and "url" have been specified with truthy values');return n.objId?u.url=null:n.url&&(u.objId=null),new nt(u)}isEmpty(){return!this.isExternal()&&!this.objId()}hasDestination(){return this.isExternal()||this.obj()instanceof rn}toPrettyPrint(){var n;const u=this.objId();return u?`[object Link objId="${u}"]`:`[object Link url="${(n=this.url())!=null?n:"<empty>"}"]`}attributesForComparison(){return Object.fromEntries(Object.entries(this.attributes).filter(([,n])=>n!=null))}}var Lt=Object.defineProperty,ce=Object.getOwnPropertySymbols,Me=Object.prototype.hasOwnProperty,Le=Object.prototype.propertyIsEnumerable,be=(o,n,u)=>n in o?Lt(o,n,{enumerable:!0,configurable:!0,writable:!0,value:u}):o[n]=u,b=(o,n)=>{for(var u in n||(n={}))Me.call(n,u)&&be(o,u,n[u]);if(ce)for(var u of ce(n))Le.call(n,u)&&be(o,u,n[u]);return o};class l{constructor(n){this._class=n.class,this._field=n.field,this._viaRef=n.via_ref,this._query=n.query,this._order_by=n.order_by,this._size=n.size}class(){return this._class}field(){return this._field}viaRef(){const n=this._viaRef;return typeof n=="boolean"?"multi":n}query(){if(this._query)return[...this._query]}orderBy(){if(this._order_by)return[...this._order_by]}size(){return this._size}toPojo(){return this._class===null?null:b(b(b(b(b({class:this._class},this._field&&{field:this._field}),this.query()&&{query:this.query()}),this.orderBy()&&{order_by:this.orderBy()}),this._size!==void 0&&{size:this._size}),this._viaRef&&{via_ref:this._viaRef})}}function P(o){return(0,a.Gv)(o)&&typeof o.field=="string"&&lt(o.value_via)}function lt(o){return(0,a.Gv)(o)&&typeof o.class=="string"&&typeof o.field=="string"}const pt=/^[0-9a-f]{16}$/;function h(o){return typeof o!="string"?!1:pt.test(o)}function v(o){const n={};return Object.keys(o).forEach(u=>{const L=os(u);if((0,a.iI)(L)){const[At]=o[u];n[L]=At}else{const[At,ie]=o[u];At!==void 0&&(n[L]=g(At,u,ie))}}),n}function g(o,n,u){if(o===null)return null;const L=W(o,n,u);return(0,a.Po)(L[1])?null:L}function W(o,n,u){switch(u[0]){case"binary":return["binary",Nt(o,n)];case"boolean":return["boolean",Yt(o,n)];case"datalocator":return["datalocator",Rt(o,n)];case"date":return["date",X(o,n)];case"datetime":return["date",X(o,n)];case"enum":return["string",Wt(o,n,u[1])];case"float":return["number",Nn(o,n)];case"html":return["html",_i(o,n)];case"integer":return["number",ei(o,n)];case"link":return["link",ci(o,n)];case"linklist":return["linklist",Ei(o,n)];case"multienum":return["stringlist",Si(o,n,u[1])];case"reference":return["reference",Di(o,n)];case"referencelist":return["referencelist",Ii(o,n)];case"string":return["string",Oo(o,n)];case"stringlist":return["stringlist",is(o,n)];case"widget":return["widget",Ai(o,n)];case"widgetlist":return["widgetlist",ji(o,n)];default:throw new a.c1(`Attribute "${n}" is of unsupported type "${u[0]}".`)}}function K(o,n,u){throw new a.c1(`Unexpected value ${(0,a.aO)(o)} for attribute "${n}". Expected: ${u}`)}function Nt(o,n){if(o instanceof jn)return{id:o.id()};K(o,n,"A Binary.")}function Yt(o,n){if(o===!1||o===!0)return o;K(o,n,"A Boolean.")}function Rt(o,n){if(o instanceof l)return o.toPojo();K(o,n,"A DataLocator.")}function X(o,n){if(Ke()(o))return(0,a.A)(o);if((0,a.Qr)(o))return o;K(o,n,"A Date.")}function Wt(o,n,{values:u}){if(u.includes(o))return o;const L=`Valid attribute values are contained in its "values" array [${u.join()}].`;K(o,n,L)}function Nn(o,n){if((0,a.Rq)(o))return o;let u=o;typeof o=="number"&&(u=String(o)),K(u,n,"A Number, that is #isFinite().")}
2function _i(o,n){if(typeof o=="string")return o;K(o,n,"A String.")}function ei(o,n){if((0,a.zh)(o))return o;K(o,n,"A Number, that is #isSafeInteger().")}function ci(o,n){if(mi(o))return Ji(o);K(o,n,"A Link instance with a destination.")}function Ei(o,n){if(Array.isArray(o)&&o.every(mi))return o.map(Ji);K(o,n,"An array of Link instances with destinations set.")}function Si(o,n,{values:u}){(0,a.Bo)(o)||K(o,n,`An array with values from ${(0,a.aO)(u)}.`);const L=new Set(u),At=o.filter(ie=>!L.has(ie));return At.length&&K(o,n,`An array with values from ${(0,a.aO)(u)}. Forbidden values: ${(0,a.aO)(At)}.`),o}function Di(o,n){if(wo(o))return Po(o);K(o,n,"An Obj.")}function Ii(o,n){if(rs(o))return o.map(Po);K(o,n,"An array with Objs.")}function Po(o){return typeof o=="string"?o:o.id()}function wo(o){return o===""||h(o)||o instanceof rn||o instanceof at}function rs(o){return Array.isArray(o)&&o.every(n=>wo(n))}function Oo(o,n){if(Co(o))return o.toString();K(o,n,"A String.")}function is(o,n){if(Eo(o)){const u=o.map(L=>L.toString());return u.some(L=>L.trim().length===0)&&K(o,n,"An array of non-blank strings."),u}K(o,n,"An array of strings.")}function Co(o){return typeof o=="string"||typeof o=="number"}function Ai(o,n){if(o instanceof En)return o.id();K(o,n,"An instance of Widget.")}function ji(o,n){if(o instanceof En)return ji([o],n);if(Bi(o))return o.map(u=>u.id());K(o,n,"An array of Widget instances.")}function Bi(o){return Array.isArray(o)&&o.every(n=>n instanceof En)}function Eo(o){return Array.isArray(o)&&o.every(n=>Co(n))}function mi(o){return o instanceof nt?!o.isEmpty():!(0,a.Gv)(o)||k()(Object.values(o).filter(Boolean))?!1:Object.keys(o).every(n=>So.includes(n))}const So=["hash","obj_id","query","rel","target","title","url"];function os(o){if(!(0,a.Dz)(o))throw new a.c1("Attribute names have to be in camel case.");return(0,a.z9)(o)}function Ji(o){const n=o instanceof nt?Qi(o):Do(o);return n.rel||delete n.rel,n}function Qi(o){return{rel:o.rel()||void 0,query:o.query(),target:o.target(),title:o.title(),url:o.url(),obj_id:o.objId(),fragment:o.hash()}}function Do(o){return{obj_id:o.obj_id||null,query:o.query||null,rel:o.rel||void 0,target:o.target||null,title:o.title||null,url:o.url||null,fragment:o.hash||null}}var ss=Object.defineProperty,Yi=Object.getOwnPropertySymbols,Io=Object.prototype.hasOwnProperty,as=Object.prototype.propertyIsEnumerable,Ao=(o,n,u)=>n in o?ss(o,n,{enumerable:!0,configurable:!0,writable:!0,value:u}):o[n]=u,ki=(o,n)=>{for(var u in n||(n={}))Io.call(n,u)&&Ao(o,u,n[u]);if(Yi)for(var u of Yi(n))as.call(n,u)&&Ao(o,u,n[u]);return o};class En{constructor(n,u,L,At){if(this._id=n,this._obj=u,this.preserializedAttributes=At,!u)if(L&&Zi(L))this.attributesToBeSaved=L;else throw new a.c1('Please provide a widget class as the "_objClass" property.')}static build(n,u){return new En(n,u)}static newWithSerializedAttributes(n){const u={},L={};return Object.keys(n).forEach(At=>{const ie=n[At];if(At==="_obj_class"){u._objClass=[ie];return}if(Array.isArray(ie)){const[pe,Be]=ie;if(pe==="widget"){const ge=Be,cn=En.newWithSerializedAttributes(ge),xi=(0,a.xQ)(At);u[xi]=[cn,["widget"]];return}if(pe==="widgetlist"){const cn=Be.map(vo=>En.newWithSerializedAttributes(vo)),xi=(0,a.xQ)(At);u[xi]=[cn,["widgetlist"]];return}}L[At]=ie}),new En(void 0,void 0,u,L)}static create(n){return new En(void 0,void 0,ri(n))}static createWithUnknownValues(n){return new En(void 0,void 0,n)}id(){return this.failIfNotPersisted(),this._id}objClass(){if(this.isPersisted()){const u=this.getAttributeData("_obj_class");if(u)return u;throw new a.aS("Widget was deleted, possibly by another user.")}const[n]=this.attributesToBeSaved._objClass;return n}obj(){return this.failIfNotPersisted(),this._obj}objSpaceId(){return this.obj().objSpaceId()}widget(n){return this.obj().widget(n)}modification([n,u]){return(0,I.Fh)(n,u,this.obj().id(),this.id())}get(n,u){return ni(this,n,u)}getValueOrConnection(n,u){return qi(this,n,u)}container(){(0,I.HI)("for performance reasons, avoid this method when rendering");const n=this.containingField();return n?n.getContainer():this.obj()}update(n){const u=ri(n);this.updateWithUnknownValues(u)}updateWithUnknownValues(n){(0,an.I7)(()=>{to(this.obj(),n);const u=v(n);this.updateSelf(u)})}insertBefore(n){n.obj().insertWidget(this,{before:n})}insertAfter(n){n.obj().insertWidget(this,{after:n})}delete(){this.obj().deleteWidget(this)}copy(){return this.isPersisted()?this.copyPersisted():this.copyUnpersisted()}persistInObjIfNecessary(n){if(this.isPersisted())return;const u=this.attributesToBeSaved;to(n,u);const L=ki(ki({},v(u)),this.preserializedAttributes);this._obj=n,this._id=n.generateWidgetId(),this.updateSelf(L),this.executeDidPersistCallback()}isPersisted(){return!!this._obj}onDidPersist(n){if(this.isPersisted())throw new a.aS('Cannot call "onDidPersist" of an already persisted 
2widget');this.onDidPersistCallback=n}hasOnDidPersistCallback(){return!!this.onDidPersistCallback}finishSaving(){return this.obj().finishSaving()}equals(n){return n instanceof En&&this.id()===n.id()&&this.obj().equals(n.obj())}containingField(){return this.obj().fieldContainingWidget(this)}toPrettyPrint(){return`[object ${this.objClass()} id="${this.id()}" objId="${this.obj().id()}"]`}getAttributeData(n){return this.obj().getWidgetAttribute(this.id(),n)}getData(){return this.obj().getWidgetData(this.id())}getAttributesToBeSaved(){return this.attributesToBeSaved}failIfNotPersisted(){if(!this.isPersisted())throw new a.aS("Can not access a new widget before it has been saved.")}updateSelf(n){const u={_widgetPool:[{[this.id()]:n}]};this.obj().update(u)}executeDidPersistCallback(){this.onDidPersistCallback&&(this.onDidPersistCallback(this),delete this.onDidPersistCallback)}copyPersisted(){const n=Fi(this);return En.newWithSerializedAttributes(n)}copyUnpersisted(){const n=new En(void 0,void 0,A()(this.attributesToBeSaved,us));return this.onDidPersistCallback&&n.onDidPersist(this.onDidPersistCallback),n}}function us(o){if(eo(o)){const[n,u]=o;return[n.copy(),u]}if(li(o)){const[n,u]=o;return[(Array.isArray(n)?n:[n]).map(At=>At.copy()),u]}return o.slice(0)}function Zi(o){const n=o._objClass;if(!n)return!1;const[u]=n;return typeof u=="string"}function ni(o,n,u){return typeof u=="string"?ni(o,n,[u]):Xi(o,(0,a.z9)(n),u)}function Xi(o,n,u){const L=o.getAttributeData(n,u[0]);return Kt(o,L,u)}function qi(o,n,u){const L=(0,a.z9)(n),At=o.getAttributeData(L);return Array.isArray(At)&&At[0]==="datalocator"?["connection",ni(o,n,"datalocator")]:["value",ni(o,n,u)]}function jo(o){return o[0]==="connection"}function Fi(o){return A()(o.getData(),(n,u)=>{if(n&&!(0,a.iI)(u)&&typeof n=="object"){if((0,T.Xj)(n)){const L=Xi(o,u,["widget"]);return["widget",L?Fi(L):null]}if((0,T.zt)(n))return["widgetlist",Xi(o,u,["widgetlist"]).map(Fi)]}return n})}function to(o,n){Object.keys(n).forEach(u=>{const L=n[u];if(eo(L)&&L[0].persistInObjIfNecessary(o),li(L)){const[At]=L;(Array.isArray(At)?At:[At]).forEach(pe=>{pe.persistInObjIfNecessary(o)})}})}function eo(o){if(o.length<2)return!1;const[n,u]=o,[L]=u;return L!=="widget"?!1:n instanceof En}function li(o){if(o.length<2)return!1;const[n,u]=o,[L]=u;return L!=="widgetlist"?!1:n instanceof En?!0:Array.isArray(n)?n.every(At=>At instanceof En):!1}function ri(o){return A()(o,(n,u)=>{if((0,a.iI)(u))return Array.isArray(n)?n:[n];if(!Array.isArray(n))throw new a.Gd;const[L,At]=n;return typeof At=="string"?[L,[At]]:[L,At]})}function yi(o){return o?o[0]:"_public"}var To=Object.defineProperty,Ro=Object.getOwnPropertySymbols,Ni=Object.prototype.hasOwnProperty,Gr=Object.prototype.propertyIsEnumerable,no=(o,n,u)=>n in o?To(o,n,{enumerable:!0,configurable:!0,writable:!0,value:u}):o[n]=u,cs=(o,n)=>{for(var u in n||(n={}))Ni.call(n,u)&&no(o,u,n[u]);if(Ro)for(var u of Ro(n))Gr.call(n,u)&&no(o,u,n[u]);return o};const xo={isInScope:()=>!0,applyToSearch:o=>o,applyToCreate:o=>cs({_site_id:null},o)};function Mo(){return se(["empty"])}const $i={isInScope(o){return o.siteId()!==null},applyToSearch(o){return o.andNot("_siteId","equals",null)},applyToCreate(){throw new a.Gd}};var Lo=Object.defineProperty,Uo=Object.defineProperties,ls=Object.getOwnPropertyDescriptors,Wo=Object.getOwnPropertySymbols,Bo=Object.prototype.hasOwnProperty,ro=Object.prototype.propertyIsEnumerable,Vi=(o,n,u)=>n in o?Lo(o,n,{enumerable:!0,configurable:!0,writable:!0,value:u}):o[n]=u,ds=(o,n)=>{for(var u in n||(n={}))Bo.call(n,u)&&Vi(o,u,n[u]);if(Wo)for(var u of Wo(n))ro.call(n,u)&&Vi(o,u,n[u]);return o},fs=(o,n)=>Uo(o,ls(n));function ko(o){return{isInScope(n){const u=n.siteId();return u===o||u===null},applyToSearch(n){return n.and("_siteId","equals",[o,null])},applyToCreate(n){return fs(ds({},n),{_site_id:o})}}}var hs=Object.defineProperty,io=Object.defineProperties,bi=Object.getOwnPropertyDescriptors,ii=Object.getOwnPropertySymbols,zi=Object.prototype.hasOwnProperty,Fo=Object.prototype.propertyIsEnumerable,oo=(o,n,u)=>n in o?hs(o,n,{enumerable:!0,configurable:!0,writable:!0,value:u}):o[n]=u,so=(o,n)=>{for(var u in n||(n={}))zi.call(n,u)&&oo(o,u,n[u]);if(ii)for(var u of ii(n))Fo.call(n,u)&&oo(o,u,n[u]);return o},ao=(o,n)=>io(o,bi(n)),uo=(o,n,u)=>new Promise((L,At)=>{var ie=ge=>{try{Be(u.next(ge))}catch(cn){At(cn)}},pe=ge=>{try{Be(u.throw(ge))}catch(cn){At(cn)}},Be=ge=>ge.done?L(ge.value):Promise.resolve(ge.value).then(ie,pe);Be((u=u.apply(o,n)).next())});function ps(o,n){return vs(o,u=>{let L;try{L=(0,Pn.s4)(void 0,()=>n(u))}catch(At){(0,a.JL)(At)}if(L!==void 0){if(h(L))return L;(0,a.JL)(new a.aS(`Unexpected result from mapping function passed to updateReferences (not a valid obj id): ${String(L)}`))}return u})}function vs(o,n){return uo(this,null,function*(){const u=yield(0,Pn.Hh)(()=>o.getData());if(!u)return;const L=co(u,o,n);L.length&&(yield Promise.all(L))})}function co(o,n,u){const L=[];return(0,T.Yy)(o,(At,ie,pe)=>{const Be=No(At);if(!Be)return;const ge=uo(null,null,function*(){const cn=yield(0,Pn.Hh)(()=>Be(At,u)),xi=pe?n.getWidgetAttribute(pe,ie):n.getAttributeData(ie);if(!(0,a.aI)(xi,At))return;const vo={[ie]:cn};pe?n.objData.update({_widget_pool:{[pe]:vo}}):n.objData.update(vo)});L.push(ge)}),L}function No(o){return $o[o[0]]}const $o={html:lo,link:Vo,linklist:Ti,reference:di,referencelist:zo};function lo(o,n){return["html",o[1].replace(ae.lx,u=>`objid:${n(u.slice(6,22))}`)]}function Vo(o,n){const u=o[1],{obj_id:L}=u;return L?["link",ao(so({},u),{obj_id:n(L)})]:o}function Ti(o,n){return["linklist",o[1].map(u=>{const{obj_id:L}=u;return L?ao(so({},u),{obj_id:n(L)}):u})]}function di(o,n){return["reference",n(o[1])]}function zo(o,n){return["referencelist",o[1].map(n)]}var c=(o,n,u)=>new Promise((L,At)=>{var ie=ge=>{try{Be(u.next(ge))}catch(cn){At(cn)}},pe=ge=>{try{Be(u.throw(ge))}catch(cn){At(cn)}},Be=ge=>ge.done?L(ge.value):Promise.resolve(ge.value).then(ie,pe);Be((u=u.apply(o,n)).next())});let d;function m(o){d=o}function F(o){return c(this,null,function*(){if((0,Cn.bW)())throw new a.aS("The published content cannot be modified.");
2if((0,an.q2)("Changing CMS content"),!d)throw new a.Gd;const n=(0,Cn.eb)(),u=yield d.copyObj({fromObjId:o.id(),fromObjSpaceId:o.objSpaceId(),toObjSpaceId:n}),L=yield(0,Pn.Hh)(()=>_e(se(n),u));if(!L)throw new a.Gd;return L})}var It=r(4476),ee=Object.defineProperty,Ce=Object.defineProperties,le=Object.getOwnPropertyDescriptors,Xt=Object.getOwnPropertySymbols,we=Object.prototype.hasOwnProperty,Mn=Object.prototype.propertyIsEnumerable,Dr=(o,n,u)=>n in o?ee(o,n,{enumerable:!0,configurable:!0,writable:!0,value:u}):o[n]=u,Br=(o,n)=>{for(var u in n||(n={}))we.call(n,u)&&Dr(o,u,n[u]);if(Xt)for(var u of Xt(n))Mn.call(n,u)&&Dr(o,u,n[u]);return o},Tr=(o,n)=>Ce(o,le(n));function Ir(o){return{isInScope(n){return n.objClass()===o},applyToSearch(n){return n.and("_objClass","equals",o)},applyToCreate(n){return Tr(Br({},n),{_obj_class:o})}}}function Or(o,n,u){const L=o.get();if(u==="deleted")return Zn(L);const At=o.getDiff(n);if(!(0,I.M_)(At)||!At.content)return Zn(L);const ie=[];return At.content.forEach(([pe,Be])=>{const ge=fi(o,n,pe,Be);ge&&ie.push(ge)}),ie}function Zn(o){return o.map(n=>({widget:n,modification:null}))}function fi(o,n,u,L){if(u==="-"){const pe=fo(n,o.obj().id(),L);return pe?{modification:o.getContainer()instanceof En&&o.getContainer().modification(n)==="deleted"?null:"deleted",widget:pe}:null}const At=o.get().find(pe=>pe.id()===L);return At?{modification:u==="="?null:"new",widget:At}:null}function fo([o],n,u){const L=_e(St(o),n);return L?.widget(u)}function hi(o){return o.contentId()?Pi(o).search().dangerouslyUnboundedTake():[]}function Ri(o,n){return o.contentId()&&Pi(o).and(Lr(n)).search().take(1)[0]||null}function Pi(o){return St(o.objSpaceId()).and(_s(o.contentId())).and($i)}var Ze=Object.defineProperty,fn=Object.defineProperties,or=Object.getOwnPropertyDescriptors,ho=Object.getOwnPropertySymbols,Ko=Object.prototype.hasOwnProperty,Ho=Object.prototype.propertyIsEnumerable,gs=(o,n,u)=>n in o?Ze(o,n,{enumerable:!0,configurable:!0,writable:!0,value:u}):o[n]=u,ia=(o,n)=>{for(var u in n||(n={}))Ko.call(n,u)&&gs(o,u,n[u]);if(ho)for(var u of ho(n))Ho.call(n,u)&&gs(o,u,n[u]);return o},oa=(o,n)=>fn(o,or(n));function _s(o){return{isInScope(n){return n.contentId()===o},applyToSearch(n){return n.and("_contentId","equals",o)},applyToCreate(n){return oa(ia({},n),{_content_id:o})}}}class sa{constructor(n){this.workspaceData=n}id(){return this.workspaceData.id}title(){return this.workspaceData.title}}function aa(o,n){return St((0,Cn.eb)()).search().and("_dataParam","equals",o).and("_siteId","equals",n).first()}function po(o){return(o==="_id"||!!o.match(/^[a-z]([a-z0-9]|_(?!_)){0,49}$/i))&&o.slice(-1)!=="_"}function ua(o){if(!po(o))throw new a.c1(`Invalid data identifier "${o}"`)}function ca(o){return ms(o)||ys(o)}function ms(o){return(0,a.zB)(o,rn)}function ys(o){return(0,a.zB)(o,En)}function la(o){return(0,a.zB)(o,nt)}function da(){return[Ki(),(0,Cn.eb)()]}function Ki(){return(0,It.v)("published")}},4476(E,C,r){r.d(C,{v:()=>p});var a=r(6687);function p(D,A){if(!A)return["workspace",D];if(D==="workspace"||D==="revision")return[D,A];throw new a.Gd}},9242(E,C,r){r.d(C,{B$:()=>T,Ey:()=>dt,Jo:()=>Z,Jr:()=>B,K8:()=>S,X5:()=>vt,cb:()=>J,oC:()=>st,tc:()=>Y});var a=r(6687),p=r(6324);const D=new Map,A=(0,p.Ld)();function T(I,at){var Q;D.set(I,at);const V=ht(I),tt=(Q=V.get())!=null?Q:0;V.set(tt+1)}function S(I){return ht(I).get(),D.get(I)||null}function B(I,at){T(_t(I),at)}function Z(I){T("dataErrorComponent",I)}function J(I){return S(_t(I))}function dt(){return S("dataErrorComponent")}function ht(I){return A.subState(I)}function _t(I){return`componentForAppClass-${I}`}const Ot=new Map,R=(0,p.Ld)();function st(I){return H(I).get(),Ot.get(I)||null}function vt(I,at){var Q;Ot.set(I,at);const V=H(I),tt=(Q=V.get())!=null?Q:0;V.set(tt+1),q.get()||q.set(!0)}const q=(0,p.Ld)();function Y(){var I;return(I=q.get())!=null?I:!1}function H(I){return R.subState(I)}(0,a.Nj)(()=>{D.clear(),Ot.clear()})},4116(E,C,r){r.d(C,{T:()=>T});var a=r(2198),p=r(7723),D=r(8857),A=r(5841);const T=(0,A.Ng)(function({content:B,children:Z}){const J=B.get("data","datalocator"),dt=(0,D.u)(J);return J.class()===null?Z:(0,a.jsx)(p.NN,{data:dt,children:Z})})},2747(E,C,r){r.d(C,{K:()=>Q,i:()=>H});var a=r(2198),p=r(629),D=r(1457),A=r(6687),T=r(9242),S=r(4116),B=r
2(8581),Z=r(994),J=r(687),dt=Object.defineProperty,ht=Object.defineProperties,_t=Object.getOwnPropertyDescriptors,Ot=Object.getOwnPropertySymbols,R=Object.prototype.hasOwnProperty,st=Object.prototype.propertyIsEnumerable,vt=(V,tt,Et)=>tt in V?dt(V,tt,{enumerable:!0,configurable:!0,writable:!0,value:Et}):V[tt]=Et,q=(V,tt)=>{for(var Et in tt||(tt={}))R.call(tt,Et)&&vt(V,Et,tt[Et]);if(Ot)for(var Et of Ot(tt))st.call(tt,Et)&&vt(V,Et,tt[Et]);return V},Y=(V,tt)=>ht(V,_t(tt));const H=(0,Z.M)(function({fieldType:tt,placementModification:Et,widget:kt,widgetProps:Zt}){const se=kt.objClass(),ve=(0,T.cb)(se);return(0,a.jsx)(Q.Provider,{value:{widget:kt,placementModification:Et,fieldType:tt},children:(0,a.jsx)(I,{widget:kt,widgetClass:se,widgetComponent:ve,widgetProps:Zt})})});H.displayName="Scrivito.ContentTag.WidgetContent";class I extends p.Component{constructor(tt){super(tt),this.state={hasError:!1}}static getDerivedStateFromError(){return{hasError:!0}}componentDidCatch(tt){(0,A.JL)(tt)}componentDidUpdate(tt){tt.widgetComponent!==this.props.widgetComponent&&this.setState({hasError:!1})}render(){return this.state.hasError?(0,D.HD)()?(0,a.jsx)(B.z,{children:(0,a.jsx)("div",{className:"content_error",children:"Widget could not be rendered due to application error."})}):(0,a.jsx)(B.z,{}):(0,a.jsx)(at,q({},this.props))}}function at({widget:V,widgetClass:tt,widgetComponent:Et,widgetProps:kt}){if(!Et)throw new A.c1(`No component registered for widget class "${tt}"`);kt?.hasOwnProperty("widget")&&(0,A.JL)(new A.c1('The prop "widget" is not allowed inside "widgetProps"'));const Zt=Y(q({},kt),{widget:(0,J.Dy)(V)});return(0,a.jsx)(S.T,{content:V,children:(0,p.createElement)(Et,Zt)})}const Q=(0,p.createContext)({})},8560(E,C,r){r.d(C,{U:()=>B,Z:()=>S});var a=r(2198),p=r(629),D=r(1457),A=r(5841);const T=(0,p.createContext)("outermostLayout"),S=(0,A.Ng)(function({value:J,children:dt}){return(0,D.HD)()?(0,a.jsx)(T.Provider,{value:typeof J=="function"?J():J,children:dt}):(0,a.jsx)(a.Fragment,{children:dt})});function B(){return(0,p.useContext)(T)}},8581(E,C,r){r.d(C,{z:()=>ht});var a=r(2198),p=r(279),D=r(5841),A=Object.defineProperty,T=Object.getOwnPropertySymbols,S=Object.prototype.hasOwnProperty,B=Object.prototype.propertyIsEnumerable,Z=(_t,Ot,R)=>Ot in _t?A(_t,Ot,{enumerable:!0,configurable:!0,writable:!0,value:R}):_t[Ot]=R,J=(_t,Ot)=>{for(var R in Ot||(Ot={}))S.call(Ot,R)&&Z(_t,R,Ot[R]);if(T)for(var R of T(Ot))B.call(Ot,R)&&Z(_t,R,Ot[R]);return _t},dt=(_t,Ot)=>{var R={};for(var st in _t)S.call(_t,st)&&Ot.indexOf(st)<0&&(R[st]=_t[st]);if(_t!=null&&T)for(var st of T(_t))Ot.indexOf(st)<0&&B.call(_t,st)&&(R[st]=_t[st]);return R};const ht=(0,D.Ng)(function(Ot){const R=Ot,{tag:st="div"}=R,vt=dt(R,["tag"]),q=(0,p.eW)("reactEditing","WidgetTagWithEditing");return q?(0,a.jsx)(q,J({tag:st},vt)):(0,a.jsx)(st,J({},vt))})},994(E,C,r){r.d(C,{M:()=>D});var a=r(2279),p=r(5841);function D(A,T){const S=(0,p.Ng)(A,T);if((0,p.Gf)(S))return S;const B=(0,a.p)(S);return B.displayName=(0,p.NY)(S),B}},7723(E,C,r){r.d(C,{CW:()=>vt,NN:()=>at,OF:()=>st,OW:()=>I,Xu:()=>q,_W:()=>Y,iH:()=>R,sT:()=>Q,t0:()=>H});var a=r(2198),p=r(629),D=r(6687),A=r(1871),T=r(5436),S=r(687),B=Object.defineProperty,Z=Object.getOwnPropertySymbols,J=Object.prototype.hasOwnProperty,dt=Object.prototype.propertyIsEnumerable,ht=(tt,Et,kt)=>Et in tt?B(tt,Et,{enumerable:!0,configurable:!0,writable:!0,value:kt}):tt[Et]=kt,_t=(tt,Et)=>{for(var kt in Et||(Et={}))J.call(Et,kt)&&ht(tt,kt,Et[kt]);if(Z)for(var kt of Z(Et))dt.call(Et,kt)&&ht(tt,kt,Et[kt]);return tt};const Ot=(0,p.createContext)(void 0);function R(){return(0,p.useContext)(Ot)}function st(){var tt;return(tt=(0,p.useContext)(Ot))==null?void 0:tt.placeholders}function vt(){var tt;return(tt=(0,p.useContext)(Ot))==null?void 0:tt.dataStack}function q(){var tt;const Et=(tt=(0,p.useContext)(Ot))==null?void 0:tt.dataStack;if(!Et)throw new D.c1("Missing data context: Please use this hook inside a Scrivito application.");return Et}function Y(){var tt;const Et=(tt=(0,p.useContext)(Ot))==null?void 0:tt.dataStack;return Et&&Et.find(kt=>!("isBackground"in kt))}function H(tt){var Et,kt;return(kt=(Et=(0,p.useContext)(Ot))==null?void 0:Et.dataStack)==null?void 0:kt.find(Zt=>(0,A.VI)(Zt)&&(tt===void 0||Zt._class===tt))}function I(tt){var Et,kt;return(kt=(Et=(0,p.useContext)(Ot))==null?void 0:Et.dataStack)==null?void 0:kt.find(Zt=>
2(0,A.Uq)(Zt)&&(tt===void 0&&!("isBackground"in Zt)||Zt._class===tt))}function at({data:tt,children:Et}){var kt;const Zt=((kt=(0,p.useContext)(Ot))==null?void 0:kt.dataStack)||[],se=ve();return(0,a.jsx)(Ot.Provider,{value:{dataStack:[se,...Zt],placeholders:{}},children:Et});function ve(){return tt instanceof A.sO?{_class:(0,D.uV)(tt.dataClassName()),_id:tt.id()}:tt instanceof A.bq?tt.toPojo():tt}}function Q({source:tt,isBackground:Et,children:kt}){var Zt;const se=((Zt=(0,p.useContext)(Ot))==null?void 0:Zt.dataStack)||[];return(0,a.jsx)(Ot.Provider,{value:ve(),children:kt});function ve(){if(tt instanceof A.bq)return{dataStack:[tt.toPojo(),...se],placeholders:{}};const ue=V((0,S.zo)(tt)),{_class:St,_id:Kt}=ue,zt=St&&Kt&&_t({_class:St,_id:Kt},Et&&{isBackground:Et});return{dataStack:zt?[zt,...se]:se,placeholders:ue}}}function V(tt){return tt instanceof A.sO?(0,A.A_)(tt):tt instanceof T.kI?(0,A.gk)(tt):tt}},3962(E,C,r){r.d(C,{m:()=>p});var a=r(629);const p=(0,a.createContext)(!1)},1881(E,C,r){r.d(C,{h:()=>a});function a(p,D){typeof D=="function"?D(p):D&&(D.current=p)}},93(E,C,r){r.d(C,{I:()=>p});var a=r(9242);function p(D){return!!(0,a.cb)(D)}},8857(E,C,r){r.d(C,{u:()=>D});var a=r(1871),p=r(7723);function D(A){const T=(0,p.CW)()||[];return(0,a.ZJ)(T,A)}},4861(E,C,r){r.d(C,{S:()=>Z});var a=r(629),p=r(5396),D=r(1391);function A(){var dt;return(dt=D.B)==null?void 0:dt.getEditableArea()}var T=r(8560),S=r(3962),B=r(5159);function Z(dt){const ht=(0,T.U)(),_t=(0,a.useContext)(B.F),Ot=(0,a.useContext)(S.m);if(!_t||dt===null)return!1;switch(A()){case"layout":return ht==="outermostLayout"||ht==="currentPageLayout";case"page":return(Ot||ht==="currentPage")&&J(dt);default:return!0}}function J(dt){var ht;return!!(dt&&dt.id()===((ht=(0,p.F2)())==null?void 0:ht.id()))}},5159(E,C,r){r.d(C,{F:()=>p});var a=r(629);const p=(0,a.createContext)(!0)},322(E,C,r){r.d(C,{eK:()=>br,CJ:()=>qt,fK:()=>sn,Qo:()=>Tn,Tb:()=>pt,ZO:()=>Nn,Nl:()=>Si,Fd:()=>K,E0:()=>Ji,LS:()=>us,CY:()=>as,bI:()=>rr,zK:()=>Zi,R$:()=>Ao,i1:()=>lr.i,zG:()=>A.z,K8:()=>D.K8,IS:()=>zo.I,tc:()=>D.tc,lo:()=>B,NX:()=>Y,nq:()=>q,Nj:()=>H,FM:()=>W,rj:()=>Fi,HZ:()=>Bo,Ez:()=>ni,p$:()=>Xi,uv:()=>qi.u,WS:()=>jo,w6:()=>Mo,yf:()=>$i,O4:()=>cs});var a=r(629),p=r(7886),D=r(9242),A=r(8581),T=r(2279),S=r(5841);function B(c,d,m){const F=(0,p.u)(c);Ot(d)&&(d.displayName=F);const It=(0,S.Ng)(d,m),ee=Z(It);(0,D.Jr)(F,ee)}function Z(c){const d=(0,S.Gf)(c)?dt(c):J(c);return d.displayName=(0,S.NY)(c),d}function J(c){return(0,T.p)(d=>ht(d)?_t(c(d)):c(d))}function dt(c){return class extends c{render(){return ht(this.props)?_t(super.render()):super.render()}}}function ht(c){return!!c.widget}function _t(c){return(0,S.BK)(c)===A.z?c:(0,a.createElement)(A.z,{children:c})}function Ot(c){return!c.displayName&&(!c.name||c.name==="_class"||c.name.substring(0,6)==="class_")}var R=r(6687),st=r(994),vt=r(687);function q(c,d,m){(0,vt.I6)(c)||(0,R.Ht)("provideLayoutComponent","A layout component must be provided only for Objs",{docPermalink:"js-sdk/provideLayoutComponent"});const F=(0,p.u)(c);Ot(d)&&(d.displayName=F),(0,D.X5)(F,(0,st.M)(d,m))}function Y(c){(0,D.Jo)((0,st.M)(c))}function H(c,d){(0,D.B$)(c,(0,S.Ng)(d))}var I=r(2198);function at(c){const d=document.createElement("canvas");d.height=c.height,d.width=c.width;const m=d.getContext("2d");return Q(c,m),d}function Q(c,d){d.drawImage(c,0,0)}function V(c,d,m,F){if(!kt())throw new Error("Browser does not support getCSSCanvasContext!");return kt()(c,d,m,F)}function tt(c){V("2d",c,0,0)}function Et(){return!!kt()}function kt(){return document.getCSSCanvasContext&&document.getCSSCanvasContext.bind(document)}var Zt=(c,d,m)=>new Promise((F,It)=>{var ee=Xt=>{try{le(m.next(Xt))}catch(we){It(we)}},Ce=Xt=>{try{le(m.throw(Xt))}catch(we){It(we)}},le=Xt=>Xt.done?F(Xt.value):Promise.resolve(Xt.value).then(ee,Ce);le((m=m.apply(c,d)).next())});function se(c){const d=new Image;return ve(d)?ue(d,c):Kt(d,c)}function ve(c){return!!c.decode}function ue(c,d){return Zt(this,null,function*(){if(!ve(c))throw new Error("Browser does not support decode!");return c.src=d,yield St(c)(),c})}function St(c){return c.decode&&c.decode.bind(c)}function Kt(c,d){return new Promise((m,F)=>{c.onload=()=>m(c),c.onerror=It=>F(It),c.src=d})}var zt=(c,d,m)=>new Promise((F,It)=>{var ee=Xt=>{try{le(m.next(Xt))}catch(we){It(we)}},Ce=Xt=>{try{le(m.throw(Xt))}catch(we){It(we)}},le=Xt=>Xt.done?F(Xt.value):Promise.resolve(Xt.value).then(ee,Ce);le((m=m.apply(c,d)).next())});function de(c){return zt(this,null,function*(){try{const d=yield se(c);
2return Et()?Ut(d):ve(d)?{decodedBackgroundUrl:`url(${c})`}:Vt(d)}catch{return{decodedBackgroundUrl:`url(${c})`}}})}function Ut(c){const d=`ScrivitoBackgroundImage${fe()}`,m=V("2d",d,c.width,c.height);return Q(c,m),{decodedBackgroundUrl:`-webkit-canvas(${d})`,clear:()=>tt(d)}}function Vt(c){return at(c),{decodedBackgroundUrl:`url(${c.src})`}}let re=0;function fe(){return re+=1,re}var Se=(c,d,m)=>new Promise((F,It)=>{var ee=Xt=>{try{le(m.next(Xt))}catch(we){It(we)}},Ce=Xt=>{try{le(m.throw(Xt))}catch(we){It(we)}},le=Xt=>Xt.done?F(Xt.value):Promise.resolve(Xt.value).then(ee,Ce);le((m=m.apply(c,d)).next())});class Ve{constructor(d){this.decodedUrls={},this.loadingRegistry={},this.clears=[],this.isOnUpdateCallbackActive=!0,this.onUpdateCallback=d}getBackgroundImage(d){const m=this.decodedUrls[d];return m||this.ensureLoading(d),m}clear(){this.clears.forEach(d=>d()),this.clears=[],this.decodedUrls={},this.isOnUpdateCallbackActive=!1}resumeUpdateCallback(){this.isOnUpdateCallbackActive=!0}ensureLoading(d){if(this.decodedUrls[d]||this.loadingRegistry[d])return;const m=Se(this,null,function*(){const{decodedBackgroundUrl:F,clear:It}=yield de(d);this.isOnUpdateCallbackActive?(It&&this.clears.push(It),this.decodedUrls[d]=F,this.onUpdateCallback()):(It&&It(),this.decodedUrls[d]=void 0)});this.loadingRegistry[d]=(0,R.Qk)(m,()=>delete this.loadingRegistry[d])}}var Ye=r(9008),je=r(5436),Dt=Object.defineProperty,$=Object.defineProperties,Pt=Object.getOwnPropertyDescriptors,et=Object.getOwnPropertySymbols,it=Object.prototype.hasOwnProperty,z=Object.prototype.propertyIsEnumerable,ut=(c,d,m)=>d in c?Dt(c,d,{enumerable:!0,configurable:!0,writable:!0,value:m}):c[d]=m,wt=(c,d)=>{for(var m in d||(d={}))it.call(d,m)&&ut(c,m,d[m]);if(et)for(var m of et(d))z.call(d,m)&&ut(c,m,d[m]);return c},Ft=(c,d)=>$(c,Pt(d)),bt=(c,d)=>{var m={};for(var F in c)it.call(c,F)&&d.indexOf(F)<0&&(m[F]=c[F]);if(c!=null&&et)for(var F of et(c))d.indexOf(F)<0&&z.call(c,F)&&(m[F]=c[F]);return m};const qt=(0,S.Ng)(function(d){var m=d,{style:F,tag:It}=m,ee=bt(m,["style","tag"]);const[,Ce]=(0,a.useReducer)(Mn=>Mn+1,0),le=(0,a.useMemo)(()=>Ke(Ce),[]);(0,a.useEffect)(()=>(le.resumeUpdateCallback(),()=>le.clear()),[le]);const Xt=It||"div";return en(F),(0,I.jsx)(Xt,Ft(wt({},ee),{style:xe(F||{},we)}));function we(Mn){const{initialUrl:Dr,highResUrlToDecode:Br}=(0,Ye.s1)(Mn);return Br&&le.getBackgroundImage(Br)||`url(${Dr})`}});function Ke(c){return new Ve(c)}function xe(c,d){if((0,R.Gv)(c)){const m=c,{background:F}=m,It=bt(m,["background"]);return wt(wt({},It),k(F,d))}return{}}function k(c,d){return c===void 0?{}:Array.isArray(c)?yt(c.map(m=>ae(m,d))):ae(c,d)}function yt(c){return{backgroundImage:Ct(c,"backgroundImage"),backgroundAttachment:Ct(c,"backgroundAttachment"),backgroundClip:Ct(c,"backgroundClip"),backgroundOrigin:Ct(c,"backgroundOrigin"),backgroundPosition:Ct(c,"backgroundPosition"),backgroundRepeat:Ct(c,"backgroundRepeat"),backgroundSize:Ct(c,"backgroundSize"),backgroundColor:te(c)}}function Ct(c,d){return c.map(m=>m[d]).join(", ")}function te(c){const d=c[c.length-1];if(d)return d.backgroundColor}function ae(c,d){return Fe(c)?_e(c):Ge(c,d)}function _e(c){return{backgroundImage:c.image,backgroundAttachment:c.attachment||"scroll",backgroundClip:c.clip||"border-box",backgroundColor:c.color||"transparent",backgroundOrigin:c.origin||"padding-box",backgroundPosition:c.position||"0% 0%",backgroundRepeat:c.repeat||"repeat",backgroundSize:c.size||"auto"}}function Ge(c,d){const m=c.image;if(m instanceof je.yI)return Je(m,c,d);if(m instanceof vt.OH){const F=(0,vt.zo)(m);if((0,vt.Xg)(F)){const It=F.blob();if(It)return Je(It,c,d)}}return _e({image:"none"})}function Je(c,d,m){return{backgroundImage:m(c),backgroundAttachment:d.attachment||"scroll",backgroundClip:d.clip||"border-box",backgroundColor:d.color||"transparent",backgroundOrigin:d.origin||"padding-box",backgroundPosition:d.position||"center center",backgroundRepeat:d.repeat||"no-repeat",backgroundSize:d.size||"cover"}}function Fe(c){return typeof c.image=="string"}function en(c){if((0,R.Gv)(c))for(const d of Object.keys(c))d.match(/^background.+/)&&
2(0,R.JL)(new R.c1(`Invalid background related CSS property "${d}". Expected property "background" alongside with any non-background propertiesFor further details, see ${(0,R.yJ)("js-sdk/BackgroundImageTag")}`))}var yn=r(5396),ln=r(279),Wn=r(8549),Bn=r(2183),bn=r(6802),gr=r(9964),$n=r(1391),Ae=r(1871),tn=r(6084),on=r(7723),qn=Object.defineProperty,un=Object.defineProperties,Vn=Object.getOwnPropertyDescriptors,zn=Object.getOwnPropertySymbols,Kn=Object.prototype.hasOwnProperty,sr=Object.prototype.propertyIsEnumerable,gn=(c,d,m)=>d in c?qn(c,d,{enumerable:!0,configurable:!0,writable:!0,value:m}):c[d]=m,tr=(c,d)=>{for(var m in d||(d={}))Kn.call(d,m)&&gn(c,m,d[m]);if(zn)for(var m of zn(d))sr.call(d,m)&&gn(c,m,d[m]);return c},er=(c,d)=>un(c,Vn(d)),In=(c,d)=>{var m={};for(var F in c)Kn.call(c,F)&&d.indexOf(F)<0&&(m[F]=c[F]);if(c!=null&&zn)for(var F of zn(c))d.indexOf(F)<0&&sr.call(c,F)&&(m[F]=c[F]);return m},nr=(c,d,m)=>new Promise((F,It)=>{var ee=Xt=>{try{le(m.next(Xt))}catch(we){It(we)}},Ce=Xt=>{try{le(m.throw(Xt))}catch(we){It(we)}},le=Xt=>Xt.done?F(Xt.value):Promise.resolve(Xt.value).then(ee,Ce);le((m=m.apply(c,d)).next())});const rr=(0,S.Ng)(function(d){const m=(0,on.CW)(),F=(0,on.OF)(),It=d,{children:ee,to:Ce,params:le}=It,Xt=In(It,["children","to","params"]);return(0,I.jsx)("a",er(tr({},Xt),{href:Mn(),target:Dr(),rel:Br(),onClick:Tr,ref:d.ref,children:we()}));function we(){if(ee!==void 0)return ee;if(d.to instanceof vt.N_)return d.to.title()}function Mn(){var Ze;return((Ze=Or())==null?void 0:Ze.href)||"#"}function Dr(){if(d.target)return d.target;if(d.to instanceof vt.N_)return(0,vt.zo)(d.to).target()||void 0}function Br(){if("rel"in d)return d.rel;if(d.to instanceof vt.N_)return(0,vt.zo)(d.to).rel()||void 0}function Tr(Ze){return nr(this,null,function*(){if(d.onClick&&(d.onClick(Ze),Ze.defaultPrevented))return;Ze.preventDefault();const fn=yield(0,tn.Hh)(Or);if(!fn)return;const or=Dr(),{to:ho,href:Ko,queryParameters:Ho}=fn;if(or==="_blank"||(0,R.M7)(Ze))return(0,Bn.EV)(Ko);if(or==="_top"&&$n.B)return Ir(ho,Ho);if(or)return(0,R.D1)(Ko,or);Ir(ho,Ho)})}function Ir(Ze,fn){(0,gr.V)(Ze,fn&&{params:fn})}function Or(){if(!d.to)return null;if(typeof d.to=="string")return{to:d.to,href:d.to};if(d.to instanceof Ae.sO){const or=d.to.obj();return or?fi((0,vt.zo)(or),or):Zn(d.to)}const Ze=(0,vt.zo)(d.to),fn=Pi(Ze);return fn?fo(fn):Ze instanceof je.Re||Ze instanceof je.kI?fi(Ze,d.to):null}function Zn(Ze){var fn;const or=(0,bn.p)(Ze,((fn=Ze.obj())==null?void 0:fn.siteId())||(0,yn.OI)());return or?{to:Ze,href:or,queryParameters:void 0}:null}function fi(Ze,fn){return{to:fn,href:Ri(Ze),queryParameters:hi(Ze)}}function fo(Ze){const fn=(0,Ae.V8)(Ze,{placeholders:F,dataStack:m});return{to:new vt.N_({url:fn}),href:fn,queryParameters:void 0}}function hi(Ze){let fn=d.params||void 0;if(m){const or=(0,Ae.K1)(Ze,m);or&&(fn=tr(tr({},or),fn))}return fn}function Ri(Ze){return(0,Wn.P)(Ze,{queryParameters:hi(Ze),withoutOriginIfLocal:!0})}function Pi(Ze){if(Ze instanceof je.Re&&Ze.isExternal()){const fn=Ze.url();if((0,Ae.G7)(fn))return fn}}}),_r=(0,S.Ng)(function(d){const m=(0,vt.Dy)(d.child);return d.renderChild?d.renderChild(m):(0,I.jsx)("li",{children:(0,I.jsx)(rr,{to:m,children:d.child.get("title","string")})})});_r.displayName="Scrivito.ChildListTag.ChildItem";function pn(c,d){return d.displayName=c,d}var An=Object.defineProperty,Rn=Object.defineProperties,mr=Object.getOwnPropertyDescriptors,Hn=Object.getOwnPropertySymbols,kn=Object.prototype.hasOwnProperty,ar=Object.prototype.propertyIsEnumerable,ur=(c,d,m)=>d in c?An(c,d,{enumerable:!0,configurable:!0,writable:!0,value:m}):c[d]=m,Jn=(c,d)=>{for(var m in d||(d={}))kn.call(d,m)&&ur(c,m,d[m]);if(Hn)for(var m of Hn(d))ar.call(d,m)&&ur(c,m,d[m]);return c},cr=(c,d)=>Rn(c,mr(d)),Er=(c,d)=>{var m={};for(var F in c)kn.call(c,F)&&d.indexOf(F)<0&&(m[F]=c[F]);if(c!=null&&Hn)for(var F of Hn(c))d.indexOf(F)<0&&ar.call(c,F)&&(m[F]=c[F]);return m};const sn=(0,S.Ng)(pn("Scrivito.ChildListTag",c=>{const d=c,{parent:m=(0,yn.F2)(),tag:F="ul",renderChild:It}=d,ee=Er(d,["parent","tag","renderChild"]);if(!m)return null;const Ce=m._scrivitoPrivateContent,Xt=Ce.orderedChildren().map(Mn=>(0,I.jsx)(_r,{child:Mn,renderChild:It},Mn.id())),we=(0,ln.eW)("reactEditing","ChildListTagWithEditing");return we?(0,I.jsx)(we,cr(Jn({tag:F,basicParent:Ce},ee),{children:Xt})):(0,I.jsx)(F,cr(Jn({},ee),{children:Xt}))}));var Pn=r(7334),an=r(1457),_n=r(3459),wn=r(3444),On=r.n(wn),ot=r(4599),M=r(671),ft=r(1446);function Qt(c){return c?!!c.openInNewWindow:!1}function he(c){const d=c.target,m=c.currentTarget,F=(0,R.M7)(c);return Re(d,m,F)}function Re(c,d,m){if(c===d)return null;if(Ie(c)){const F=c.href;return(0,ft.Im)(F)?m||c.getAttribute("target")==="_blank"?{openInNewWindow:F}:{openInCurrentWindow:(0,R.B6)(new URL(F))}:null}return c.parentNode?Re(c.parentNode,d,m):null}function Ie(c){return c.nodeName==="A"}var Te=r(9063),oe=r(3973),We=r(9162),lr=r(2747),yr=r(4861);const Qn=(0,S.Ng)(function({field:d,widgetProps:m}){const F=(0,yr.S)(d.obj());if((0,an.gY)())throw new R.Gd("Not yet implemented");return!(0,an.HD)()||!(0,We.V)(d.obj().id())?(0,I.jsx)(Mr,{field:d,widgetProps:m,isInPlace
2EditingEnabled:!1}):(0,I.jsx)(Mr,{field:d,widgetProps:m,isInPlaceEditingEnabled:F})}),Mr=(0,S.Ng)(function({field:d,widgetProps:m,isInPlaceEditingEnabled:F}){const It=d.get();if(It)return(0,I.jsx)(lr.i,{widget:It,widgetProps:m,fieldType:"widget"},It.id());if(!F)return null;const ee=(0,ln.eW)("reactEditing","WidgetPlaceholder");return ee?(0,I.jsx)(ee,{field:d}):null}),Fn=(0,S.Ng)(function({field:d,widgetProps:m}){const F=(0,yr.S)(d.obj());return(0,an.gY)()?(0,I.jsx)(jn,{field:d,widgetProps:m}):!(0,an.HD)()||!(0,We.V)(d.obj().id())?(0,I.jsx)(dr,{field:d,widgetProps:m,isInPlaceEditingEnabled:!1}):(0,I.jsx)(dr,{field:d,widgetProps:m,isInPlaceEditingEnabled:F})}),jn=(0,S.Ng)(function({field:d,widgetProps:m}){const{placementModification:F}=(0,a.useContext)(lr.K),It=(0,a.useContext)(ir)+1;if(It>=100)throw new R.Gd;const ee=(0,je.t3)(d,(0,_n.d)(),F??null);return(0,I.jsx)(ir.Provider,{value:It,children:ee.map(le=>(0,I.jsx)(lr.i,{widget:le.widget,widgetProps:m,placementModification:le.modification,fieldType:"widgetlist"},Ce(le.widget.id(),le.modification)))});function Ce(le,Xt){return`${le}-${Xt??"unmodified"}`}}),ir=(0,a.createContext)(0),dr=(0,S.Ng)(function({field:d,widgetProps:m,isInPlaceEditingEnabled:F}){const It=d.get();if(It.length)return(0,I.jsx)(I.Fragment,{children:It.map(Ce=>(0,I.jsx)(lr.i,{widget:Ce,widgetProps:m,fieldType:"widgetlist"},Ce.id()))});if(!F)return null;const ee=(0,ln.eW)("reactEditing","WidgetlistPlaceholder");return ee?(0,I.jsx)(ee,{field:d}):null});var Yn=r(1881),j=Object.defineProperty,y=Object.defineProperties,N=Object.getOwnPropertyDescriptors,Bt=Object.getOwnPropertySymbols,Gt=Object.prototype.hasOwnProperty,Pe=Object.prototype.propertyIsEnumerable,Ne=(c,d,m)=>d in c?j(c,d,{enumerable:!0,configurable:!0,writable:!0,value:m}):c[d]=m,Xe=(c,d)=>{for(var m in d||(d={}))Gt.call(d,m)&&Ne(c,m,d[m]);if(Bt)for(var m of Bt(d))Pe.call(d,m)&&Ne(c,m,d[m]);return c},qe=(c,d)=>y(c,N(d)),vn=(c,d)=>{var m={};for(var F in c)Gt.call(c,F)&&d.indexOf(F)<0&&(m[F]=c[F]);if(c!=null&&Bt)for(var F of Bt(c))d.indexOf(F)<0&&Pe.call(c,F)&&(m[F]=c[F]);return m};const br=(0,S.Ng)(pn("Scrivito.ContentTag.AttributeValue",c=>{const d=(0,on.iH)(),m=a.useRef(void 0);a.useEffect(()=>{if(!m.current)return;const Mn=c.field.obj().id(),Dr=c.field.name();return(0,oe.a)({objId:Mn,attributeName:Dr},m.current)},[c.field.obj().id(),c.field.name(),m.current]);const F=c.customProps,{children:It,dangerouslySetInnerHTML:ee}=F,Ce=vn(F,["children","dangerouslySetInnerHTML"]),le=hr(c.field,It,fr(ee)?ee:void 0,c.customProps.onClick,c.widgetProps,d),Xt=c.onClick?{onClick:c.onClick,"data-scrivito-is-clickable":!0}:{};return a.createElement(c.tag,qe(Xe(Xe(Xe({},Ce),le),Xt),{ref:we}));function we(Mn){(0,Yn.h)(Mn,c.ref),m.current=Mn,c.elementCallback&&c.elementCallback(Mn)}}));function fr(c){return(0,R.Gv)(c)&&typeof c.__html=="string"}function hr(c,d,m,F,It,ee){const Ce=ee?.dataStack,le=d||m?{children:d,dangerouslySetInnerHTML:m?{__html:(0,Te.n)(m.__html,{dataStack:Ce})}:void 0}:void 0;switch(c.type()){case"html":return Cn(c,le,F,ee);case"string":return ai(c,le,ee);case"float":case"integer":return le??Nr(c);case"widget":return{children:(0,I.jsx)(Qn,{field:c,widgetProps:It})};case"widgetlist":return{children:(0,I.jsx)(Fn,{field:c,widgetProps:It})};default:return le??{}}}function Cn(c,d,m,F){const It=(0,an.gY)()?c.getHtmlDiffContent((0,_n.d)()):void 0,ee=Xt=>{const we=he(Xt);if(!we)return null;Qt(we)?$r(Xt,we):Qr(we.openInCurrentWindow)?Yr(Xt,we):(0,R.dT)(we.openInCurrentWindow)};if(d&&!It)return qe(Xe({},d),{onClick:m||ee});const Ce=F?.placeholders,le=F?.dataStack;return{dangerouslySetInnerHTML:{__html:(0,Te.n)((0,Ae.V8)(It||c.get(),{placeholders:Ce,dataStack:le,transform:On()}),{dataStack:le})},onClick:ee}}function ai(c,d,m){const F=(0,an.gY)()?c.getHtmlDiffContent((0,_n.d)()):void 0,It=m?.placeholders,ee=m?.dataStack;return F?{dangerouslySetInnerHTML:{__html:(0,Ae.V8)(F,{placeholders:It,dataStack:ee,transform:On()})}}:d??{children:(0,Ae.V8)(c.get(),{placeholders:It,dataStack:ee})}}function Nr(c){const d=c.get();return{children:d===0?"0":d}}function Qr(c){var d,m;const F=(m=(d=(0,M.$V)())==null?void 0:d.siteData)==null?void 0:m.baseUrl;if(!F)return!1;const It=new URL(c,F);return`${It.origin}${It.pathname}/`.startsWith(`${F}/`)}function $r(c,{openInNewWindow:d}){$n.B&&(c.preventDefault(),(0,Bn.EV)(d))}function Yr(c,{openInCurrentWindow:d}){c.preventDefault(),ot.VC(d)}var Zr=Object.defineProperty,Gn=Object.getOwnPropertySymbols,xn=Object.prototype.hasOwnProperty,Xr=Object.prototype.propertyIsEnumerable,Lr=(c,d,m)=>d in c?Zr(c,d,{enumerable:!0,configurable:!0,writable:!0,value:m}):c[d]=m,Ur=(c,d)=>{for(var m in d||(d={}
2))xn.call(d,m)&&Lr(c,m,d[m]);if(Gn)for(var m of Gn(d))Xr.call(d,m)&&Lr(c,m,d[m]);return c},ui=(c,d)=>{var m={};for(var F in c)xn.call(c,F)&&d.indexOf(F)<0&&(m[F]=c[F]);if(c!=null&&Gn)for(var F of Gn(c))d.indexOf(F)<0&&Xr.call(c,F)&&(m[F]=c[F]);return m};const Pr=(0,S.Ng)(function(d){var m=d,{content:F,attribute:It,tag:ee,dataContext:Ce,widgetProps:le,elementCallback:Xt,renderEmptyAttribute:we,ref:Mn}=m,Dr=ui(m,["content","attribute","tag","dataContext","widgetProps","elementCallback","renderEmptyAttribute","ref"]),Br,Tr;const Ir=(0,yr.S)((Tr=(Br=(0,vt.zo)(F))==null?void 0:Br.obj())!=null?Tr:null);if(!F)return null;const Or=Sr(F,It);if(!Or)return null;if((0,an.gY)()){const[Ri,Pi]=Vr(Or);if(rn(Ri,Pi,we))return null}if((!(0,an.HD)()||!Ir)&&!(0,an.gY)()&&(0,R.Po)(Or.get())&&wr(we))return null;qr(le,Or);const Zn={elementCallback:Xt,field:Or,tag:ee||"div",customProps:Dr,widgetProps:le,ref:Mn},fo=(0,ln.eW)("reactEditing","AttributeValueWithEditing")||br,hi=(0,I.jsx)(fo,Ur({},Zn));return zr(Ce)&&(Ce._class||Ce._id)?((0,R.JL)(new R.c1('The object provided via "dataContext" prop must not contain keys "_class" and "_id"')),hi):Ce?(0,I.jsx)(on.sT,{source:Ce,children:hi}):hi});function Sr(c,d){const m=vt.Sj.basicFieldFor(c,d);return m||((0,R.JL)(new R.c1(`Component "Scrivito.ContentTag" received prop "attribute" with invalid value: Attribute "${d}" is not defined for content specified in prop "content".`)),null)}function Vr(c){return(0,_n.d)().map(d=>c.inObjSpace(d))}function qr(c,d){if(!c)return;const m=d.type();m==="widget"||m==="widgetlist"||(0,R.JL)(new R.c1('The prop "widgetProps" is only allowed for widget and widgetlist attributes'))}function rn(c,d,m){return(0,R.Po)(c?.get())&&(0,R.Po)(d?.get())&&wr(m)}const Tn=(0,S.Ng)(Pr);Tn.displayName="Scrivito.ContentTag";function zr(c){return!!c&&!(c instanceof Ae.sO)&&!(c instanceof Ae.bq)&&!(c instanceof vt.OH)}function wr(c){return c===void 0?(0,Pn.C)():!c}var Wr=r(4116),Kr=r(8560);let pr;function Hr(c){(0,ot.zE)(c.historyState)&&(ti(c)&&(0,R.VG)(0,0),pr=c)}function ti(c){if(c.historyState.historyChangesCount===0||c.historyState.isRevisit||c.historyState.location.indexOf("#")!==-1)return!1;const m=c.locationRoute;return(0,ft.UO)(m)?!0:(0,ft.tV)(m)?!1:c.historyState.historyChangesCount!==pr?.historyState.historyChangesCount}(0,R.Nj)(()=>pr=void 0);function w({navigationState:c}){return(0,a.useEffect)(()=>{Hr(c)}),null}function x(c){const d=(0,D.cb)(c);if(d)return d;(0,R.JL)(new R.c1(`No component registered for obj class "${c}"`))}const nt=(0,S.Ng)(function({page:d,params:m,children:F}){if(!d)return F;const It=(0,Ae._f)(d,m);return It==="loading"?null:It==="unavailable"?Lt():It?(0,I.jsx)(on.sT,{source:It,children:F}):F});function Lt(){const c=(0,D.Ey)();return c?(0,I.jsx)(c,{}):(0,I.jsx)(I.Fragment,{children:"Data Not Found"})}const ce=(0,S.Ng)(function({page:d,children:m}){return d?(0,I.jsx)(on.sT,{source:(0,Ae.gk)(d),isBackground:!0,children:m}):m});var Me=r(2945),Le=r(5553);const be=(0,a.createContext)(0);function b(c,d){const m=(0,a.useContext)(be);if(!(0,D.tc)())return;m===0&&c.ancestors();const F=l(c,m);if(F!==void 0)return F==="loading"?"loading":(0,I.jsx)(lt,{page:F,params:d,layoutIndex:m})}function l(c,d){const m=c.path();if(m){const F=(0,R.FQ)(m);if(d>=F.length)return;const It=F[d];return It===m?c:P(c,It)}if(d===0)return c}function P(c,d){const m=c.siteId();if(!m)throw new R.Gd;return(0,tn.qt)("loading",()=>(0,je.ud)((0,Me.p)().and((0,je.rs)(m)),d))}const lt=(0,S.Ng)(function({page:d,params:m,layoutIndex:F}){const It=d&&(0,D.oC)(d.objClass());return(0,I.jsx)(ce,{page:d,children:(0,I.jsx)(nt,{page:d,params:m,children:(0,I.jsx)(Kr.Z,{value:ee,children:(0,I.jsx)(be.Provider,{value:F+1,children:It?(0,I.jsx)(It,{page:(0,vt.Dy)(d)}):(0,I.jsx)(pt,{})})})})});function ee(){return d&&d.id()===(0,Le.s)()?"currentPageLayout":"parentPageLayout"}}),pt=(0,S.Ng)(function(){const d=(0,M.Vd)();if(!d)return null;const{currentPage:m,navigationState:F}=d;return m?(0,I.jsx)(h,{currentPage:m,navigationState:F}):null}),h=(0,S.Ng)(function({currentPage:d,navigationState:m}){var F,It;
2const ee=(0,R.zw)((It=(F=m?.locationRoute)==null?void 0:F.query)!=null?It:""),Ce=b(d,ee);if(Ce)return Ce==="loading"?null:Ce;const le=x(d.objClass());return(0,I.jsx)(ce,{page:d,children:(0,I.jsx)(nt,{page:d,params:ee,children:(0,I.jsx)(Wr.T,{content:d,children:(0,I.jsxs)(Kr.Z,{value:"currentPage",children:[(0,I.jsx)(w,{navigationState:m}),le&&(0,I.jsx)(le,{page:(0,vt.Dy)(d),params:ee})]})})})})});pt.displayName="Scrivito.CurrentPage";var v=r(400);let g;function W(c){g&&g(c)}function K(){const[c,d]=(0,a.useState)(null),[m,F]=(0,a.useState)(null);return(0,a.useEffect)(()=>{const It=(0,R.YE)(),ee=It.createElement("div");return It.body.append(ee),g=F,d(ee),()=>{g=void 0,ee.remove()}},[]),c?v.createPortal(m,c):null}(0,R.Nj)(()=>g=void 0);var Nt=r(2469),Yt=r(5639);function Rt(c,d){const m=(0,Nt.qu)();if(!m)throw new R.aS("must call 'Scrivito.configure' beforehand");const F=m.adoptUi;return`${typeof F=="string"?F:X}/${(0,Yt.z)()}/${c}~${d??""}`}const X="https://web-builder.justrelate.com";function Wt({screen:c,appUrl:d,iframeRef:m}){return(0,I.jsx)("iframe",{ref:m,src:Rt(c,d),style:{width:"100%",height:"100%",border:"none"}})}function Nn({unstable_appUrl:c}){return(0,I.jsx)(Wt,{screen:"browseContent",appUrl:c})}var _i=r(8891),ei=r(4899),ci=(c,d,m)=>new Promise((F,It)=>{var ee=Xt=>{try{le(m.next(Xt))}catch(we){It(we)}},Ce=Xt=>{try{le(m.throw(Xt))}catch(we){It(we)}},le=Xt=>Xt.done?F(Xt.value):Promise.resolve(Xt.value).then(ee,Ce);le((m=m.apply(c,d)).next())});function Ei(c,d){return(0,ei.TB)(window).incomingMessages.filter(m=>c(m.remoteWindow)).map(m=>m.data).filter(_i.aG).takeOne().subscribe(m=>ci(null,null,function*(){const F=m.objId,It=F?yield(0,tn.Hh)(()=>vt.OH.onAllSites().get(F)):null;d(It)}))}function Si({onSelect:c,unstable_appUrl:d}){const m=(0,a.useRef)(null),F=(0,a.useRef)(c);F.current=c;const It=(0,a.useCallback)(ee=>{var Ce;return ee===((Ce=m.current)==null?void 0:Ce.contentWindow)},[]);return(0,a.useEffect)(()=>{const ee=Ei(It,Ce=>F.current(Ce));return()=>ee.unsubscribe()},[It]),(0,I.jsx)(Wt,{screen:"selectImage",appUrl:d,iframeRef:m})}var Di=(c,d,m)=>new Promise((F,It)=>{var ee=Xt=>{try{le(m.next(Xt))}catch(we){It(we)}},Ce=Xt=>{try{le(m.throw(Xt))}catch(we){It(we)}},le=Xt=>Xt.done?F(Xt.value):Promise.resolve(Xt.value).then(ee,Ce);le((m=m.apply(c,d)).next())});function Ii(c){return Di(this,null,function*(){try{const d=yield se(c);return ve(d)||at(d),c}catch{return c}})}var Po=(c,d,m)=>new Promise((F,It)=>{var ee=Xt=>{try{le(m.next(Xt))}catch(we){It(we)}},Ce=Xt=>{try{le(m.throw(Xt))}catch(we){It(we)}},le=Xt=>Xt.done?F(Xt.value):Promise.resolve(Xt.value).then(ee,Ce);le((m=m.apply(c,d)).next())});class wo{constructor(d){this.decodedUrls={},this.loadingRegistry={},this.isOnUpdateCallbackActive=!0,this.onUpdateCallback=d}getImage(d){const m=this.decodedUrls[d];return m||this.ensureLoading(d),m}cancelUpdateCallback(){this.isOnUpdateCallbackActive=!1}resumeUpdateCallback(){this.isOnUpdateCallbackActive=!0}ensureLoading(d){if(this.decodedUrls[d]||this.loadingRegistry[d])return;const m=Po(this,null,function*(){const F=yield Ii(d);this.decodedUrls[d]=F,this.isOnUpdateCallbackActive&&this.onUpdateCallback()});this.loadingRegistry[d]=(0,R.Qk)(m,()=>delete this.loadingRegistry[d])}}const rs="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAADIAQMAAACXljzdAAAAA1BMVEUAAACnej3aAAAAAXRSTlMAQObYZgAAABxJREFUWMPtwYEAAAAAw6D5U1/hAFUBAAAAAHwGFFAAAQCfIxUAAAAASUVORK5CYII";var Oo=Object.defineProperty,is=Object.defineProperties,Co=Object.getOwnPropertyDescriptors,Ai=Object.getOwnPropertySymbols,ji=Object.prototype.hasOwnProperty,Bi=Object.prototype.propertyIsEnumerable,Eo=(c,d,m)=>d in c?Oo(c,d,{enumerable:!0,configurable:!0,writable:!0,value:m}):c[d]=m,mi=(c,d)=>{for(var m in d||(d={}))ji.call(d,m)&&Eo(c,m,d[m]);if(Ai)for(var m of Ai(d))Bi.call(d,m)&&Eo(c,m,d[m]);return c},So=(c,d)=>is(c,Co(d)),os=(c,d)=>{var m={};for(var F in c)ji.call(c,F)&&d.indexOf(F)<0&&(m[F]=c[F]);if(c!=null&&Ai)for(var F of Ai(c))d.indexOf(F)<0&&Bi.call(c,F)&&(m[F]=c[F]);return m};const Ji=(0,S.Ng)(function(d){var m=d,{content:F,attribute:It="blob",width:ee,onLoad:Ce,ref:le}=m,Xt=os(m,["content","attribute","width","onLoad","ref"]);const[we,Mn]=(0,a.useState)(Xt.loading==="lazy"),Dr=(0,a.useCallback)(Zn=>(Mn(!1),Ce?.call(null,Zn)),[Ce]),Br=(0,a.useCallback)(Zn=>{Yi(Zn)&&Mn(!1)},[]),[,Tr]=(0,a.useState)(0),Ir=(0,a.useMemo)(()=>we?void 0:new wo(()=>Tr(Zn=>Zn+1)),[we]);if((0,a.useEffect)(()=>(Ir?.resumeUpdateCallback(),()=>
2Ir?.cancelUpdateCallback()),[Ir]),!F)return null;if(F instanceof je.yI){const Zn=Do(F,ee,we);return Zn===null?null:(0,I.jsx)("img",So(mi({src:Qi(Ir,F),width:Zn},Xt),{onLoad:Dr,ref:fi=>((0,Yn.h)(fi,le),Br(fi))}))}const Or=ss(F,It);if(Or===void 0)return null;if(Or!==null){const Zn=Do(Or,ee,we);if(Zn!==null)return(0,I.jsx)(Pr,So(mi({attribute:It,content:F,width:Zn,tag:"img",src:Qi(Ir,Or)},Xt),{onLoad:Dr,elementCallback:Br,ref:le}));if(we)return null}return(0,I.jsx)(Tn,mi({attribute:It,content:F,tag:"img",src:rs,"data-scrivito-image-placeholder":!0,width:ee,ref:le},Xt))});function Qi(c,d){const{initialUrl:m,highResUrlToDecode:F}=(0,Ye.s1)(d);return F&&c?.getImage(F)||m}function Do(c,d,m){if(m&&!(0,Ye.js)(c))return null;if(d!==void 0)return d;if(c.isRaw()||c.isExplicitlyTransformed())return;const F=c.raw().metadata();if(F.contentType()==="image/svg+xml")return;const It=F.get("width");return typeof It=="number"?It:null}function ss(c,d){const m=vt.Sj.basicFieldFor(c,d);if(!m){vt.Sj.forInstance(c)&&(0,R.JL)(new R.c1(`Component "Scrivito.ImageTag" received prop "content" with an object missing attribute "${d}".`));return}const F=m.type();if(F==="binary")return m.get();if(F==="reference"){const It=m.get();return It instanceof je.kI?It.blob():null}(0,R.JL)(new R.c1(`Component "Scrivito.ImageTag" received prop "content" with an object, whose attribute "${d}" is of unexpected type "${F}". Valid attribute types are "binary" and "reference".`))}function Yi(c){return c&&c.complete}var Io=r(5159);const as=ki({value:!1}),Ao=ki({value:!0});function ki({value:c}){return({children:d})=>(0,an.HD)()?(0,I.jsx)(Io.F.Provider,{value:c,children:d}):(0,I.jsx)(I.Fragment,{children:d})}var En=r(3962);const us=({children:c})=>(0,an.HD)()?(0,I.jsx)(En.m.Provider,{value:!0,children:c}):(0,I.jsx)(I.Fragment,{children:c}),Zi=(0,S.Ng)(function({children:d}){const m=(0,M.uR)();return!m||!(0,ot.zE)(m.historyState)?null:(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(w,{navigationState:m}),d||(0,I.jsxs)("div",{children:[(0,I.jsx)("h1",{children:"The page you were looking for doesn't exist."}),(0,I.jsx)("p",{children:"You may have mistyped the address or the page may have moved."})]})]})});Zi.displayName="Scrivito.NotFoundErrorPage";function ni(){const c=(0,on._W)();if(!c)return new Ae.Ao;const d=(0,Ae.uw)(c);return d?d instanceof Ae.sO?d.dataClass().all().transform({filters:{_id:d.id()}}):d:new Ae.Ao}function Xi(c){const d=(0,on.OW)(c)||c&&(0,Ae.dw)(c);if(!d)return;if((0,Ae.o3)(d))return(0,Ae.bU)(d);const m=(0,Ae.Zk)(d);if(m)return(0,Ae.bU)(m)}var qi=r(8857);function jo(c){const d=(0,on.t0)(c);if(d)return(0,Ae.w1)(d)}function Fi(){var c;const d=ni(),m=d.attributeName();return m!==null&&((c=d.dataClass())==null?void 0:c.attributeDefinitions()[m])||[void 0,{}]}var to=r(1368),eo=Object.defineProperty,li=Object.defineProperties,ri=Object.getOwnPropertyDescriptors,yi=Object.getOwnPropertySymbols,To=Object.prototype.hasOwnProperty,Ro=Object.prototype.propertyIsEnumerable,Ni=(c,d,m)=>d in c?eo(c,d,{enumerable:!0,configurable:!0,writable:!0,value:m}):c[d]=m,Gr=(c,d)=>{for(var m in d||(d={}))To.call(d,m)&&Ni(c,m,d[m]);if(yi)for(var m of yi(d))Ro.call(d,m)&&Ni(c,m,d[m]);return c},no=(c,d)=>li(c,ri(d));function cs(c,d){const m=(0,on.CW)(),F=xo(d?.query,m,(0,vt.zo)(c));return(0,to.d)(c,no(Gr({},d),{query:F}))}function xo(c,d,m){return m instanceof je.yI||!d?c:(0,Ae.qD)((0,vt.zo)(m),d,c)}function Mo(c){return Lo(c,On())}function $i(c){return Lo(c)}function Lo(c,d){const m=(0,on.iH)(),F=m?.dataStack,It=m?.placeholders;return(0,Te.n)((0,Ae.V8)(c,{dataStack:F,placeholders:It,transform:d}),{dataStack:F})}var Uo=r(8307),ls=r.n(Uo),Wo=r(4825);function Bo(c,d){return ro(c,d,(0,on.Xu)())}function ro(c,d,m){const F=$o(c,d);return F?(0,vt.Dy)(Vi((0,vt.zo)(c),d,F,m)):null}function Vi(c,d,m,F){const It=(0,je.Ed)(c,d,m);return(0,je.uD)(It)?ds((0,Ae.ZJ)(F,It[1]),m):It[1]}function ds(c,d){const m=c.dataItemAttribute();if(m)return ko(m.dataItem(),m.attributeName(),d);const F=c.dataItem();return F?hs(F,d[0]):fs(c,d)}function fs(c,[d]){const m=c.take();return d==="linklist"?m.map(bi).filter(R.Wo):d==="referencelist"?m.map(io).filter(R.Wo):No(d)}function ko(c,d,m){const F=c.obj();return F?zi(F,d,m):Fo(c,d,m)}function hs(c,d){switch(d){case"reference":return io(c);case"referencelist":return ii(io(c));case"link":return bi(c);case"linklist":return ii(bi(c));default:return null}}function io(c){return(0,vt.zo)(c.obj())||null}function bi(c){const d=c.obj();let m=null;d&&((0,Wo.I)(d.objClass())||d.isBinary())&&(m=new je.Re({objId:d.id()}));const F=(0,bn.Z)(c,(0,yn.OI)());if(F){const{detailsPage:It,queryString:ee}=F;m=new je.Re({objId:It.id(),query:ee})}return m}function ii(c){return c===null?[]:[c]}function zi(c,d,m){var F;const It=(0,vt.zo)(c);return((F=$o(c,d))==null?void 0:F[0])==="datalocator"?((0,R.vV)('Connecting a "datalocator" attribute is not possible'),null):It.get(d,m)}function Fo(c,d,m){var F;const It=(F=c.dataClass().attributeDefinitions()[d])==null?void 0:F[0],ee=c.get(d);return It==="string"?oo(ee,m):It==="enum"?so(ee,m):It==="number"?ao(ee,m):It==="boolean"?uo(ee,m):It==="date"?ps(ee,m):It==="reference"?vs(ee,m):null}function oo(c,d){const m=(0,R.uV)(c),[F,It]=d;switch(F){case"string":return m;case"html":return On()(m);case"enum":return co(m,It);case"multienum":return ii(co(m,It));case"stringlist":return ii(m);default:return null}}function so(c,d){const m=lo(c),[F]=d;if(m===null)switch(F){case"string":return"";case"multienum":return[];default:return null}return oo(c,d)}function ao(c,d){const m=Ti(c),[F]=d;switch(F){case"float":return(0,R.h_)(m);case"integer":return(0,R.P3)(m);default:return null}}function uo(c,d){const m=Vo(c),[F]=d;return F==="boolean"?m:No("boolean")}function ps(c,d){const m=di(c),[F]=d;return F==="date"||F==="datetime"?m:null}function vs(c,d){if(c instanceof Ae.sO)switch(d[0]){case"link":return bi(c);case"linklist":return ii(bi(c));default:return null}return null}function co(c,d){return d.values.includes(c)?c:null}function No(c){switch(c){case"linklist":case"referencelist":return[];case"boolean":return!1;default:return null}}function $o(c,d){var m;return(m=vt.Sj.forInstance(c))==null?void 0:m.attributes()[d]}function lo(c){if(c===null||typeof c=="string")return c;throw new R.Gd}function Vo(c){if(typeof c=="boolean")return c;throw new R.Gd}function Ti(c){if(typeof c=="number")return c;throw new R.Gd}function di(c){if(c===null||ls()(c))return c;throw new R.Gd}var zo=r(93)},2279(E,C,r){r.d(C,{p:()=>D});var a=r(629),p=r(6687);function D(A){return a.memo(A,p.Pi)}},5841(E,C,r){r.d(C,{Ng:()=>Zt,NY:()=>S,O$:()=>Ot,BK:()=>B,Gf:()=>dt});var a=r(2198),p=r(629),D=r(6687),A=r(9180),T=r(6084);function S(Ut){return Ut.displayName||Ut.name}function B(Ut){if((0,p.isValidElement)(Ut))return Ut.props.__scrivitoForwardElementType||Ut.type}function Z(Ut){return{__scrivitoForwardElementType:B(Ut)}}function J(){const[,Ut]=(0,p.useState)(0);return()=>Ut(Vt=>Vt+1)}function dt(Ut){return typeof Ut=="function"&&Ut.prototype&&Ut.prototype.isReactComponent}let ht=0,_t;function Ot(){return _t||(_t=new D.cY,(0,D.dY)(vt)),_t.promise}function R(){return ht+=1,st()}function st(){let Ut=!1;return function(){if(Ut)throw new D.Gd;ht-=1,Ut=!0,ht===0&&(0,D.dY)(vt)}}function vt(){_t&&ht===0&&(_t.resolve(),_t=void 0)}(0,D.Nj)(()=>{_t=void 0,ht=0});var q=r(6324),Y=Object.defineProperty,H=Object.defineProperties,I=Object.getOwnPropertyDescriptors,at=Object.getOwnPropertySymbols,Q=Object.prototype.hasOwnProperty,V=Object.prototype.propertyIsEnumerable,tt=(Ut,Vt,re)=>Vt in Ut?Y(Ut,Vt,{enumerable:!0,configurable:!0,writable:!0,value:re}):Ut[Vt]=re,Et=(Ut,Vt)=>{for(var re in Vt||(Vt={}))Q.call(Vt,re)&&tt(Ut,re,Vt[re]);
2if(at)for(var re of at(Vt))V.call(Vt,re)&&tt(Ut,re,Vt[re]);return Ut},kt=(Ut,Vt)=>H(Ut,I(Vt));function Zt(Ut,Vt){if(typeof Ut!="function")throw new D.c1("Scrivito.connect expects either a plain function or a subclass of React.Component");return St(Ut)?Ut:dt(Ut)?se(Ut,Vt):ve(Ut,Vt)}function se(Ut,Vt){var re;const fe=(re=class extends Ut{constructor(Se){super(Se);const Ve=Vt?.loading,Ye=Ve?()=>(0,p.createElement)(Ve,this.props):this._scrivitoRenderWhileLoading;this._scrivitoPrivateConnector=new zt(Object.assign(this,{_scrivitoRenderWhileLoading:Ye}));const{componentDidMount:je,componentWillUnmount:Dt}=this;je!==fe.prototype.componentDidMount&&(this.componentDidMount=()=>{fe.prototype.componentDidMount.call(this),je.call(this)}),Dt!==fe.prototype.componentWillUnmount&&(this.componentWillUnmount=()=>{fe.prototype.componentWillUnmount.call(this),Dt.call(this)})}componentDidMount(){this._scrivitoPrivateConnector.componentDidMount(),super.componentDidMount&&super.componentDidMount()}componentWillUnmount(){this._scrivitoPrivateConnector.componentWillUnmount(),super.componentWillUnmount&&super.componentWillUnmount()}render(){return this._scrivitoPrivateConnector.render(()=>super.render())}},re._isScrivitoConnectedComponent=!0,re);return fe.displayName=S(Ut),fe}function ve(Ut,Vt){const re=Vt?.loading,fe=Se=>ue(()=>Ut(Se),re?()=>(0,p.createElement)(re,Se):void 0);return fe._isScrivitoConnectedComponent=!0,fe.displayName=S(Ut),fe}function ue(Ut,Vt){const re=J(),fe=(0,p.useRef)(void 0);fe.current||(fe.current=new zt({forceUpdate:re,_scrivitoRenderWhileLoading:Vt}));const Se=fe.current;return Se.updateLoaderComponent(Vt),(0,p.useEffect)(()=>(Se.componentDidMount(),()=>Se.componentWillUnmount()),[]),Se.render(Ut)}function St(Ut){return Ut._isScrivitoConnectedComponent===!0}const Kt=(0,p.createContext)({hierarchyLevel:0});class zt{constructor(Vt){this.component=Vt,this.wasComponentShown=!1,this.loadingSubscriber=new T.PF}updateLoaderComponent(Vt){this.component._scrivitoRenderWhileLoading=Vt}componentDidMount(){var Vt;if(this.context===void 0)throw new D.Gd;this.stateSubscriber=(0,q.wr)(()=>(0,q.L9)(()=>this.component.forceUpdate()),this.context.hierarchyLevel),this.awakeSubscription=(Vt=this.context.awakeness)==null?void 0:Vt.subscribe(re=>{var fe;return(fe=this.stateSubscriber)==null?void 0:fe.setAwake(re)}),this.lastRenderedState&&this.subscribeState(this.lastRenderedState)}componentWillUnmount(){var Vt;(Vt=this.awakeSubscription)==null||Vt.unsubscribe(),this.unsubscribeState(),this.stateSubscriber=void 0}render(Vt){const re=this.renderLoadingAware(Vt);return(0,a.jsx)(Kt.Consumer,kt(Et({},Z(re)),{children:fe=>(0,a.jsx)(Kt.Provider,{value:this.grabAndProvideChildContext(fe),children:re})}))}grabAndProvideChildContext(Vt){return this.context=Vt,this.childContext||(this.childContext=kt(Et({},Vt),{hierarchyLevel:Vt.hierarchyLevel+1})),this.childContext}renderLoadingAware(Vt){if((0,T.ih)())return de(Vt);const re=(0,T.Fg)(()=>(0,q.j2)(()=>(0,A.X2)(()=>de(Vt))));this.lastRenderedState=re,this.subscribeState(re);const{result:fe}=re.result;return re.isAllDataLoaded()?(this.wasComponentShown=!0,fe):this.handleLoading(fe)}subscribeState(Vt){this.stateSubscriber&&(this.stateSubscriber.subscribeChanges(Vt.result.accessedState),Vt.subscribeLoading(this.loadingSubscriber),Vt.isAllDataLoaded()?this.unregisterLoadingActivity():this.registerLoadingActivity())}unsubscribeState(){this.stateSubscriber&&this.stateSubscriber.unsubscribe(),this.unregisterLoadingActivity(),this.loadingSubscriber.unsubscribe()}handleLoading(Vt){return this.component._scrivitoRenderWhileLoading&&!this.wasComponentShown?this.component._scrivitoRenderWhileLoading():Vt}registerLoadingActivity(){this.unregisterLoadingActivityCallback||(this.unregisterLoadingActivityCallback=R())}unregisterLoadingActivity(){const Vt=this.unregisterLoadingActivityCallback;Vt&&(delete this.unregisterLoadingActivityCallback,Vt())}}function de(Ut){const Vt=(0,T.Kn)(()=>(0,q.Ij)({contextName:"React.Component#render",message:"Use one of the React lifecycle hooks."},Ut));return Vt.success?Vt.result:null}},687(E,C,r){r.d(C,{N_:()=>pn,OH:()=>un,mZ:()=>Ft,G5:()=>xe,Sj:()=>Y,x0:()=>zt,Pi:()=>Ve,Yh:()=>Ye,KZ:()=>Te,dl:()=>oe,w5:()=>qt,an:()=>re,Xg:()=>dr,I6:()=>Yn,Hk:()=>Mr,C4:()=>Fn,e6:()=>ir,kI:()=>$n,OE:()=>et,zo:()=>Pt,Dy:()=>$});var a=r(5436),p=r(6687),D=r(7885),A=r.n(D);function T(j){if(!(0,p.Dz)(j))throw new p.c1("Attribute names have to be in camel case.");if((0,p.iI)(j))throw new p.c1(`Attribute name "${j}" is not a valid custom attribute name.`)}var S=r(1645);function B(j,y,N){const Bt={};
2return Object.keys(y.attributes()).forEach(Gt=>{if(!Object.prototype.hasOwnProperty.call(j,Gt)){const Pe=(0,S.h)(N,Gt);Pe!==void 0&&(Bt[Gt]=Pe)}}),Bt}var Z=Object.defineProperty,J=Object.defineProperties,dt=Object.getOwnPropertyDescriptors,ht=Object.getOwnPropertySymbols,_t=Object.prototype.hasOwnProperty,Ot=Object.prototype.propertyIsEnumerable,R=(j,y,N)=>y in j?Z(j,y,{enumerable:!0,configurable:!0,writable:!0,value:N}):j[y]=N,st=(j,y)=>{for(var N in y||(y={}))_t.call(y,N)&&R(j,N,y[N]);if(ht)for(var N of ht(y))Ot.call(y,N)&&R(j,N,y[N]);return j},vt=(j,y)=>J(j,dt(y)),q=(j,y)=>{var N={};for(var Bt in j)_t.call(j,Bt)&&y.indexOf(Bt)<0&&(N[Bt]=j[Bt]);if(j!=null&&ht)for(var Bt of ht(j))y.indexOf(Bt)<0&&Ot.call(j,Bt)&&(N[Bt]=j[Bt]);return N};class Y{constructor(y,N){this.parentClass=N;const Bt=this.parentClass._scrivitoPrivateSchema,Gt=Bt?st({},Bt.attributes()):{},Pe=y,{attributes:Ne,onlyInside:Xe,onlyChildren:qe}=Pe,vn=q(Pe,["attributes","onlyInside","onlyChildren"]);Ne&&Object.keys(Ne).forEach(hr=>{Gt[hr]=I(Ne[hr])});const br=Q(qe),fr=Q(Xe);br?this.basicClassDefinition=vt(st({},vn),{attributes:Gt,onlyChildren:br,onlyInside:fr}):this.basicClassDefinition=vt(st({},vn),{attributes:Gt,onlyInside:fr})}static forInstance(y){return Y.forClass(y.constructor)}static forClass(y){return y._scrivitoPrivateSchema}static basicFieldFor(y,N){const Bt=Y.forInstance(y);if(!Bt)return null;const Gt=Bt.attribute(N);return Gt?new a.$e(y._scrivitoPrivateContent,N,Gt):null}attributes(){return this.basicClassDefinition.attributes}normalizedAttributes(){const y=this.attributes(),N={};return Object.keys(y).forEach(Bt=>{N[Bt]=at(y[Bt])}),N}extractTextAttributes(){return this.basicClassDefinition.extractTextAttributes||[]}name(){return this.basicClassDefinition.name}onlyInside(){return this.basicClassDefinition.onlyInside}onlyChildren(){return this.basicClassDefinition.onlyChildren}validAsRoot(){return this.basicClassDefinition.validAsRoot}onlyAsRoot(){return this.basicClassDefinition.onlyAsRoot}attribute(y){return this.attributes()[y]}isBinary(){const y=this.attribute("blob");return y?y[0]==="binary":!1}parent(){return this.parentClass}}function H(j){return!!(j&&j._scrivitoPrivateSchema)}function I(j){if(typeof j=="string")return[j];const y=j[0];if(y==="enum"||y==="multienum")return[y,j[1]];const N=j[1],{only:Bt}=N,Gt=q(N,["only"]),Pe=typeof Bt=="string"?[Bt]:Bt;return y==="widgetlist"&&!Pe&&j[1].maximum?["widgetlist",{maximum:j[1].maximum}]:Pe?[y,vt(st({},Gt),{validClasses:Pe})]:[y]}function at(j){if(j.length===1)return[j[0],{}];switch(j[0]){case"reference":case"referencelist":case"widget":case"widgetlist":{const y=j[1],{validClasses:N}=y,Bt=q(y,["validClasses"]);return[j[0],N?st({only:N},Bt):Bt]}}return j}function Q(j){if(typeof j=="string")return[j];if(j?.length)return j}function V(j){const y=ir(j);if(!y)return[];const N=y.attributes();return Object.keys(N).reduce((Bt,Gt)=>{const[Pe]=N[Gt];if(Pe==="widget"){const Ne=j.get(Gt,"widget");if(Ne)return[...Bt,Ne,...V(Ne)]}if(Pe==="widgetlist"){const Ne=j.get(Gt,"widgetlist");return Array.prototype.concat(Bt,...Ne.map(Xe=>[Xe,...V(Xe)]))}return Bt},[])}var tt=Object.defineProperty,Et=Object.defineProperties,kt=Object.getOwnPropertyDescriptors,Zt=Object.getOwnPropertySymbols,se=Object.prototype.hasOwnProperty,ve=Object.prototype.propertyIsEnumerable,ue=(j,y,N)=>y in j?tt(j,y,{enumerable:!0,configurable:!0,writable:!0,value:N}):j[y]=N,St=(j,y)=>{for(var N in y||(y={}))se.call(y,N)&&ue(j,N,y[N]);if(Zt)for(var N of Zt(y))ve.call(y,N)&&ue(j,N,y[N]);return j},Kt=(j,y)=>Et(j,kt(y));class zt{constructor(y={}){const N=fe(this.constructor);if(!N)throw new p.c1("Use a specific class (like TextWidget or ImageWidget) to create a Widget.");de(y);const Bt=Y.forInstance(this);if(!Bt)throw new p.Gd;const Gt=et(Kt(St({},y),{_objClass:N}),Bt,N),Pe=a.$R.createWithUnknownValues(Gt);Pe.onDidPersist(Ne=>{const Xe=$(Ne),qe=B(Gt,Bt,N);wt(Xe,qe)}),this._scrivitoPrivateContent=Pe}static attributeDefinitions(){const y=Y.forClass(this);return y?y.normalizedAttributes():{}}id(){return this._scrivitoPrivateContent.id()}objClass(){return this._scrivitoPrivateContent.objClass()}get(y){return T(y),ut(this,y)}update(y){wt(this,y)}obj(){const y=this._scrivitoPrivateContent.obj();return $(y)}widgets(){return $(V(this._scrivitoPrivateContent))}copy(){const y=this._scrivitoPrivateContent.copy();return $(y)}destroy(){this.delete()}delete(){this._scrivitoPrivateContent.delete()}container(){const y=this._scrivitoPrivateContent.container();return $(y)}attributeDefinitions(){const y=Y.forInstance(this);return y?y.normalizedAttributes():{}}}function de(j){if(j.constructor!==Object)throw new p.c1("The provided attributes are invalid. They have to be an Object with valid Scrivito attribute values.");if(j._objClass)throw new p.c1(`Invalid attribute "_objClass". "new ${String(j._objClass)}" will automatically set the CMS object class correctly.`)}let Ut={};function Vt(j,y){Ut[j]=y}function re(j){return Ut[j]||null}function fe(j){return Object.keys(Ut).find(y=>Ut[y]===j)||null}function Se(j,y){const N=re(j);return N&&y.isPrototypeOf(N)?N:y}function Ve(){return Object.fromEntries(Object.entries(Ut).filter(([,j])=>un.isPrototypeOf(j)))}function Ye(){return Object.fromEntries(Object.entries(Ut).filter(([,j])=>zt.isPrototypeOf(j)))}function je(j){return Se(j,un)}function Dt(j){return Se(j,zt)}(0,p.Nj)(()=>Ut={});function $(j){return Array.isArray(j)?j.map(y=>$(y)).filter(y=>y!==null):j instanceof a.kI?it(j,je(j.objClass())):j instanceof a.$R?it(j,Dt(j.objClass())):j instanceof a.Re?j.hasDestination()?it(j,pn):null:j instanceof a.Wk?null:j}function Pt(j){return Array.isArray(j)?j.map(y=>Pt(y)):z(j)?j._scrivitoPrivateContent:j}function et(j,y,N){return A()(j,(Bt,Gt)=>{if((0,p.iI)(Gt))return[Bt];const Pe=y.attribute(Gt);if(!Pe)throw new p.c1(`Attribute "${Gt}" is not defined for CMS object class "${N}".`);return[Pt(Bt),Pe]})}function it(j,y){const N=Object.create(y.prototype);return N._scrivitoPrivateContent=j,N}function z(j){return!!j&&!!j._scrivitoPrivateContent}function ut(j,y){const N=Y.basicFieldFor(j,y);return N&&$(N.get())}function wt(j,y){const N=j.objClass();if(!re(N)){let Ne;throw j.constructor===un?Ne="Obj":Ne="Widget",new p.c1(`Updating is not supported on the base class "${Ne}".`)}if(y.constructor!==Object)throw new p.c1("The provided attributes are invalid. They have to be an Object with valid Scrivito attribute values.");const Gt=Y.forInstance(j),Pe=et(y,Gt,N);j._scrivitoPrivateContent.updateWithUnknownValues(Pe)}class Ft{constructor(y){this._basicObjFacetValue=y}name(){return this._basicObjFacetValue.name()}count(){return this._basicObjFacetValue.count()}includedObjs(){const y=this._basicObjFacetValue.includedObjs();return $(y)}}let bt=!1;function qt(){bt=!0}function Ke(){return bt}(0,p.Nj)(()=>bt=!1);class xe{constructor(y){this._scrivitoPrivateContent=y}and(y,N,Bt,Gt){if(y instanceof xe){const Pe=y;this._scrivitoPrivateContent.and(Pe._scrivitoPrivateContent)}else{if(N===void 0)throw new p.c1("Missing operator to search with");if(Bt===void 0)throw new p.c1('Missing value to search (specify "null" for missing)');Ke()&&yt("objSearch.and",N,"js-sdk/ObjSearch-and");const Pe=y,Ne=k(Bt);this._scrivitoPrivateContent.and(Pe,N,Ne,Gt)}return this}andFullTextOf(y,N,Bt,Gt){Ct("objSearch.andFullTextOf",N,"js-sdk/ObjSearch-andFullTextOf");const Pe=k(Bt);return this._scrivitoPrivateContent.and(y,N,Pe,Gt),this}andNot(y,N,Bt){const Gt=k(Bt);return this._scrivitoPrivateContent.andNot(y,N,Gt),this}andIsChildOf(y){return this._scrivitoPrivateContent.andIsChildOf(Pt(y)),this}andIsInsideSubtreeOf(y){return this._scrivitoPrivateContent.andIsInsideSubtreeOf(Pt(y)),this}
2boost(y,N,Bt,Gt){return this._scrivitoPrivateContent.boost(y,N,k(Bt),Gt),this}facet(y,N){return this._scrivitoPrivateContent.facet(y,N).map(Gt=>new Ft(Gt))}suggest(y,N){return this._scrivitoPrivateContent.suggest(y,N)}first(){const y=this._scrivitoPrivateContent.first();return y?$(y):null}take(y){return(y===void 0?this._scrivitoPrivateContent.dangerouslyUnboundedTake():this._scrivitoPrivateContent.take(y)).map(Bt=>$(Bt))}toArray(){return this._scrivitoPrivateContent.dangerouslyUnboundedTake().map(N=>$(N))}offset(y){return this._scrivitoPrivateContent.offset(y),this}order(y,N){if(Array.isArray(y)){if(N!==void 0)throw new p.c1("Direction can not be set independent of attributes.");return this._scrivitoPrivateContent.order(y),this}return this._scrivitoPrivateContent.order(y,N),this}count(){return this._scrivitoPrivateContent.count()}}if(typeof Symbol=="function"){const j=Symbol.iterator;if(j){const y=xe.prototype;y[j]=function(){const Bt=this._scrivitoPrivateContent.iterator();return{next(){const Gt=Bt.next();return Gt.done?{done:Gt.done}:{done:Gt.done,value:$(Gt.value)}}}}}}function k(j){return Array.isArray(j)?j.map(y=>Pt(y)):Pt(j)}function yt(j,y,N){a.Wc.indexOf(y)!==-1&&(0,p.Ht)(j,`operator '${y}' must be a search operator except: ${a.Wc.join(", ")}`,{docPermalink:N})}function Ct(j,y,N){a.Wc.indexOf(y)===-1&&(0,p.Ht)(j,`operator '${y}' must be a full text search operator: ${a.Wc.join(", ")}`,{docPermalink:N})}var te=Object.defineProperty,ae=Object.getOwnPropertySymbols,_e=Object.prototype.hasOwnProperty,Ge=Object.prototype.propertyIsEnumerable,Je=(j,y,N)=>y in j?te(j,y,{enumerable:!0,configurable:!0,writable:!0,value:N}):j[y]=N,Fe=(j,y)=>{for(var N in y||(y={}))_e.call(y,N)&&Je(j,N,y[N]);if(ae)for(var N of ae(y))Ge.call(y,N)&&Je(j,N,y[N]);return j},en=(j,y,N)=>new Promise((Bt,Gt)=>{var Pe=qe=>{try{Xe(N.next(qe))}catch(vn){Gt(vn)}},Ne=qe=>{try{Xe(N.throw(qe))}catch(vn){Gt(vn)}},Xe=qe=>qe.done?Bt(qe.value):Promise.resolve(qe.value).then(Pe,Ne);Xe((N=N.apply(j,y)).next())});class yn{constructor(y,N){this.objClass=y,this.scopeIncludingDeletedObjs=N}get(y){return this.getObj(y,this.scope())}getIncludingDeleted(y){return this.getObj(y,this.scopeIncludingDeletedObjs)}getByPath(y){const N=(0,a.Z0)(this.scope().and(a.S$),"_path",y);return $(N)}getByPermalink(y){const N=(0,a.Z0)(this.scope(),"_permalink",y);return $(N)}root(){return $((0,a.Mp)(this.scope()))}all(){return this.getSearch(1e3)}where(y,N,Bt,Gt){return this.getSearch().and(y,N,Bt,Gt)}whereFullTextOf(y,N,Bt,Gt){return this.getSearch().andFullTextOf(y,N,Bt,Gt)}create(y={}){const N=this.objClassNameForCreate();Wn(y);const Bt=ln(y,N,Y.forClass(this.objClass)),Gt=(0,a.ZU)(this.scope().and((0,a.Lw)(N)),Bt);return $(Gt)}createFromFile(y){return en(this,arguments,function*(N,Bt={}){const Gt=this.objClassNameForCreate();if(Bn(N),Wn(Bt),Object.prototype.hasOwnProperty.call(Bt,"blob"))throw new p.c1('Setting attribute "blob" is not allowed when creating CMS objects from file, because the file will be assigned to that attribute');const Pe=Y.forClass(this.objClass);if(!Pe.isBinary())throw new p.c1('Creating CMS objects from file is only available for classes with a binary attribute "blob"');const Ne=ln(Bt,Gt,Pe),Xe=yield(0,a.fK)(this.scope().and((0,a.Lw)(Gt)),N,Ne);return $(Xe)})}toSiteContext(){return{all:this.all.bind(this),create:this.create.bind(this),createFromFile:this.createFromFile.bind(this),get:this.get.bind(this),getByPath:this.getByPath.bind(this),getByPermalink:this.getByPermalink.bind(this),getIncludingDeleted:this.getIncludingDeleted.bind(this),root:this.root.bind(this),where:this.where.bind(this),whereFullTextOf:this.whereFullTextOf.bind(this)}}getObj(y,N){return $((0,a.ED)(this.getScopeRestrictedToSameClass(N),y))}getSearch(y){const N=this.getScopeRestrictedToSameClass(this.scope()).search();return y!==void 0&&N.batchSize(y),new xe(N)}getScopeRestrictedToSameClass(y){const N=this.objClassName();return N?y.and((0,a.Lw)(N)):y}objClassName(){return fe(this.objClass)}objClassNameForCreate(){const y=this.objClassName();if(!y)throw new p.c1("Use a specific class (like Page or Image) in order to create an Obj.");return y}scope(){return this.scopeIncludingDeletedObjs.and(a.cb)}}function ln(j,y,N){const Bt=B(j,N,y),Gt=Fe(Fe({},j),Bt);return et(Gt,N,y)}function Wn(j){if(j.constructor!==Object)throw new p.c1("The provided attributes are invalid. They have to be an Object with valid Scrivito attribute values.");if(j._objClass)throw new p.c1(`Invalid attribute "_objClass". "${String(j._objClass)}.create" will automatically set the CMS object class correctly.`)}function Bn(j){if(!(0,p.fo)(j))throw(0,p.qf)(j)?new p.c1('Creating CMS objects from file is only available with instances of "File", but an instance of "Blob" is given'):new p.c1('Creating CMS objects from file is only available with instances of "File"')}let bn;function gr(){return bn()}function $n(j){bn=j}var Ae=(j,y,N)=>new Promise((Bt,Gt)=>{var Pe=qe=>{try{Xe(N.next(qe))}catch(vn){Gt(vn)}},Ne=qe=>{try{Xe(N.throw(qe))}catch(vn){Gt(vn)}},Xe=qe=>qe.done?Bt(qe.value):Promise.resolve(qe.value).then(Pe,Ne);Xe((N=N.apply(j,y)).next())});function tn(j){const y=gr();return y?qn(j,(0,a.y7)(y)):new yn(j,(0,a.Kp)())}function on(j,y){return qn(j,y).toSiteContext()}function qn(j,y){const N=(0,a.aG)((0,a.eb)()).and(y);return new yn(j,N)}class un{static get(y){return tn(this).get(y)}static getIncludingDeleted(y){return tn(this).getIncludingDeleted(y)}static getByPath(y){return tn(this).getByPath(y)}static getByPermalink(y){return tn(this).getByPermalink(y)}static all(){return tn(this).all()}static root(){return tn(this).root()}static where(y,N,Bt,Gt){return Ke()&&yt("Obj.where",N,"js-sdk/Obj-where"),tn(this).where(y,N,Bt,Gt)}static whereFullTextOf(y,N,Bt,Gt){return Ct("Obj.whereFullTextOf",N,"js-sdk/Obj-whereFullTextOf"),tn(this).whereFullTextOf(y,N,Bt,Gt)}static create(y){return tn(this).create(y)}static createFromFile(y,N){return tn(this).createFromFile(y,N)}static onAllSites(){return on(this,a.uz)}static onSite(y){return on(this,(0,a.y7)(y))}static attributeDefinitions(){const y=Y.forClass(this);return y?y.normalizedAttributes():{}}id(){return this._scrivitoPrivateContent.id()}objClass(){return this._scrivitoPrivateContent.objClass()}get(y){return T(y),ut(this,y)}update(y){wt(this,y)}versionsOnAllSites(){return $((0,a.GY)(this._scrivitoPrivateContent))}versionOnSite(y){return $((0,a.$9)(this._scrivitoPrivateContent,y))}createdAt(){return this._scrivitoPrivateContent.createdAt()}firstPublishedAt(){return this._scrivitoPrivateContent.firstPublishedAt()}publishedAt(){return this._scrivitoPrivateContent.publishedAt()}lastChanged(){return this._scrivitoPrivateContent.lastChanged()}path(){return this._scrivitoPrivateContent.path()}parent(){return $(this._scrivitoPrivateContent.parent())}ancestors(){return this._scrivitoPrivateContent.ancestors().map(y=>$(y))}finishSaving(){return this._scrivitoPrivateContent.finishSaving()}modification(){return this._scrivitoPrivateContent.modification()}
2backlinks(){return $(this._scrivitoPrivateContent.backlinks())}children(){return $(this._scrivitoPrivateContent.children())}orderedChildren(){return $(this._scrivitoPrivateContent.orderedChildren())}permalink(){return this._scrivitoPrivateContent.permalink()}siteId(){return this._scrivitoPrivateContent.siteId()}language(){return this._scrivitoPrivateContent.language()}slug(){return this._scrivitoPrivateContent.slug()}isBinary(){const y=Y.forInstance(this);return y?y.isBinary():!1}isRestricted(){return this._scrivitoPrivateContent.isRestricted()}contentLength(){return this.isBinary()?this._scrivitoPrivateContent.contentLength():0}contentType(){return this.isBinary()?this._scrivitoPrivateContent.contentType():""}contentUrl(){return this.isBinary()?this._scrivitoPrivateContent.contentUrl():""}contentId(){return this._scrivitoPrivateContent.contentId()}metadata(){return this.isBinary()?this._scrivitoPrivateContent.metadata():new a.gT}restrict(){this._scrivitoPrivateContent.restrict()}unrestrict(){this._scrivitoPrivateContent.unrestrict()}updateReferences(y){return(0,a.s8)(this._scrivitoPrivateContent,y)}widget(y){const N=this._scrivitoPrivateContent.widget(y);return N&&$(N)}widgets(){return $(V(this._scrivitoPrivateContent))}copy(){return Ae(this,null,function*(){const y=yield(0,a.rB)(this._scrivitoPrivateContent);return $(y)})}destroy(){this.delete()}delete(){this._scrivitoPrivateContent.delete()}attributeDefinitions(){const y=Y.forInstance(this);return y?y.normalizedAttributes():{}}}var Vn=r(5020),zn=r.n(Vn),Kn=Object.defineProperty,sr=Object.defineProperties,gn=Object.getOwnPropertyDescriptors,tr=Object.getOwnPropertySymbols,er=Object.prototype.hasOwnProperty,In=Object.prototype.propertyIsEnumerable,nr=(j,y,N)=>y in j?Kn(j,y,{enumerable:!0,configurable:!0,writable:!0,value:N}):j[y]=N,rr=(j,y)=>{for(var N in y||(y={}))er.call(y,N)&&nr(j,N,y[N]);if(tr)for(var N of tr(y))In.call(y,N)&&nr(j,N,y[N]);return j},_r=(j,y)=>sr(j,gn(y));class pn{constructor(y){const N=mr(y);this._scrivitoPrivateContent=new a.Re(N)}title(){return this._scrivitoPrivateContent.title()}query(){return this._scrivitoPrivateContent.query()}hash(){return this._scrivitoPrivateContent.hash()}rel(){return this._scrivitoPrivateContent.rel()}target(){return this._scrivitoPrivateContent.target()}url(){return this._scrivitoPrivateContent.url()}obj(){const y=this._scrivitoPrivateContent.obj();return y instanceof a.kI?$(y):null}queryParameters(){return this._scrivitoPrivateContent.queryParameters()}copy(y){const N=this._scrivitoPrivateContent.copy(mr(y)),Bt=Object.create(pn.prototype);return Bt._scrivitoPrivateContent=N,Bt}isExternal(){return this._scrivitoPrivateContent.isExternal()}isInternal(){return this._scrivitoPrivateContent.isInternal()}}const An=["hash","obj","query","rel","target","title","url"];function Rn(j){const y=Object.keys(j).filter(N=>!An.includes(N));if(!zn()(y))throw new p.c1(`Unexpected attributes ${(0,p.aO)(y)}. Available attributes: ${(0,p.aO)(An)}`)}function mr(j){return Rn(j),j.hasOwnProperty("obj")?_r(rr({},j),{objId:Hn(j.obj)}):j}function Hn(j){return j?Pt(j).id():null}function kn(j,y){Object.entries(j).forEach(([N,Bt])=>{Jn(N,y);const[Gt,Pe]=Bt;Gt==="widgetlist"&&typeof Pe!="string"&&ar(N,Pe,y),(Gt==="enum"||Gt==="multienum")&&typeof Pe!="string"&&ur(N,Pe,y)})}function ar(j,y,N){if(y.maximum!==void 0){const{maximum:Bt}=y;if(Number.isInteger(Bt)&&Bt>0)return;(0,p.Ht)(N,`invalid value "${Bt}" supplied to ${j}: The "maximum" must be a positive integer.`,{docPermalink:`js-sdk/${N}`})}}function ur(j,{values:y},N){y.includes("")&&(0,p.Ht)(N,`invalid "values" config supplied for ${j}: An empty string is not a valid enum or multienum value.`,{docPermalink:`js-sdk/${N}`})}function Jn(j,y){cr(j)||(0,p.Ht)(y,`attribute name "${j}" is invalid. Must be a string (alphanumeric, starting with a lower-case character).`,{docPermalink:`js-sdk/${y}`})}function cr(j){return/^[a-z](_+[A-Z0-9]|[A-Za-z0-9])*$/.test(j)&&(0,p.z9)(j).length<=50}const Er=["string","html","widget","widgetlist"];function sn(j){j.extractTextAttributes().forEach(y=>{if(y.substring(0,5)==="blob:")return an(j,y);_n(y,j.attribute(y))})}
2function Pn(j){j.extractTextAttributes().forEach(y=>{if(y.substring(0,5)==="blob:")throw new p.c1(`Invalid value for "extractTextAttributes": ${y} is not supported.`);_n(y,j.attribute(y))})}function an(j,y){if(y==="blob:text"){if(j.isBinary())return;throw new p.c1('Invalid value for "extractTextAttributes": blob:text is only supported for binary objs.')}throw new p.c1(`Invalid value for "extractTextAttributes": ${y} is not supported.`)}function _n(j,y){if(!y)throw new p.c1(`Invalid value for "extractTextAttributes": Attribute ${j} is not defined.`);const[N]=y;if(!Er.includes(N))throw new p.c1(`Invalid value for "extractTextAttributes": Attribute ${j} of type ${N} is not supported.`)}var wn=Object.defineProperty,On=Object.defineProperties,ot=Object.getOwnPropertyDescriptors,M=Object.getOwnPropertySymbols,ft=Object.prototype.hasOwnProperty,Qt=Object.prototype.propertyIsEnumerable,he=(j,y,N)=>y in j?wn(j,y,{enumerable:!0,configurable:!0,writable:!0,value:N}):j[y]=N,Re=(j,y)=>{for(var N in y||(y={}))ft.call(y,N)&&he(j,N,y[N]);if(M)for(var N of M(y))Qt.call(y,N)&&he(j,N,y[N]);return j},Ie=(j,y)=>On(j,ot(y));function Te(j){return j.attributes&&kn(j.attributes,"createObjClass"),We(j)}function oe(j){return j.attributes&&kn(j.attributes,"createWidgetClass"),lr(j)}function We(j){if(j.extend&&!yr(j.extend,un))throw new p.c1('Invalid value for "extend": not a Scrivito Obj class');if(j.onlyInside&&Qn(j))throw new p.c1("onlyInside must not be specified for binary object classes.");if(j.onlyChildren&&Qn(j))throw new p.c1("onlyChildren must not be specified for binary object classes.");if(j.onlyAsRoot===!0&&j.validAsRoot===!1)throw new p.c1("validAsRoot must not be set to false for an object class permitted onlyAsRoot.");if(j.onlyAsRoot&&Qn(j))throw new p.c1("onlyAsRoot must not be specified for binary object classes.");if(j.validAsRoot&&Qn(j))throw new p.c1("validAsRoot must not be specified for binary object classes.");const y=j.extend||un,N=new Y(j,y);return sn(N),class extends y{static get _scrivitoPrivateSchema(){return N}}}function lr(j){if(j.extend&&!yr(j.extend,zt))throw new p.c1('Invalid value for "extend": not a Scrivito Widget class');const y=j.extend||zt,N=new Y(j,y);return Pn(N),class extends y{static get _scrivitoPrivateSchema(){return N}}}function yr(j,y){return j?j===y?!0:j.prototype instanceof y:!1}function Qn(j){var y;return((y=j.attributes)==null?void 0:y.blob)==="binary"}function Mr(j,y){jn(y);const N=H(y)?y:We(Ie(Re({},y),{name:j}));return Vt(j,N),N}function Fn(j,y){jn(y);const N=H(y)?y:lr(Ie(Re({},y),{name:j}));return Vt(j,N),N}function jn(j){if("extend"in j&&j.extend&&!H(j.extend))throw new p.c1("Unexpected value for key 'extend'. It must be a valid ObjClass.");!H(j)&&j.attributes&&kn(j.attributes,"provideObjClass")}function ir(j){const y=j.objClass();if(!y)return;const N=re(y);if(N)return Y.forClass(N)}function dr(j){const y=ir(j);return!!y&&y.isBinary()}function Yn(j){if(j===un)return!0;if(j===zt)return!1;const y=Y.forClass(j);if(!y)throw new p.Gd;return Yn(y.parent())}},1645(E,C,r){r.d(C,{h:()=>D,l:()=>p});let a=()=>{};function p(A){a=A}function D(A,T){return a(A,T)}},6324(E,C,r){r.d(C,{Rs:()=>Ye,VM:()=>H,Ld:()=>Pt,wr:()=>I,q2:()=>_t,lB:()=>je,Ml:()=>Dt,j2:()=>ve,I7:()=>V,Ij:()=>dt,L9:()=>ht});var a=r(6687);function p(et){return(0,a.Gv)(et)&&!D(et)}function D(et){const it=Object.getPrototypeOf(et);return it===null?!1:Object.getPrototypeOf(it)!==null}function A(et,it){return T(et,it)}function T(et,it){return et===it?it:p(it)?B(p(et)?et:void 0,it):S(it)?Z(S(et)?et:void 0,it):it}function S(et){return Array.isArray(et)}function B(et,it){const z={};let ut=!1;et===void 0&&(ut=!0);const wt=Object.keys(it),Ft=new Set;return et&&Object.keys(et).forEach(qt=>Ft.add(qt)),Ft.size!==wt.length&&(ut=!0),wt.forEach(qt=>{Ft.has(qt)||(ut=!0);const Ke=et?et[qt]:void 0,xe=T(Ke,it[qt]);xe!==Ke&&(ut=!0),z[qt]=xe}),ut?Object.freeze(z):et}function Z(et,it){let z=!1;(et===void 0||et.length!==it.length)&&(z=!0);const ut=it.map((Ft,bt)=>{const qt=et?et[bt]:void 0,Ke=T(qt,Ft);return Ke!==qt&&(z=!0),Ke});return z?Object.freeze(ut):et}const J=new a.hl;function dt(et,it){return J.runWith(et,it)}function ht(et){return J.runWith(void 0,et)}function _t(et){const it=J.current();if(it)throw new Ot(it,et)}class Ot extends a.aS{constructor(it,z){super(`${z} is not permitted inside '${it.contextName}'. `+(it.message||"")),this.frozenContext=it,this.operationName=z}}class R{constructor(it,z){this.value=it,this.copy=z,this.valueForReading=new a.hl}read(it){const z=this.value;return this.valueForReading.runWith(z,()=>it(z))}write(it){this.valueForReading.current()===this.value&&(this.value=this.copy(this.value)),it(this.value)}}class st{constructor(){this.subscribersStore=new R([],it=>it.slice())}
2create(it,z=0){return new vt(this,it,z)}count(){return this.subscribersStore.read(it=>it.length)}reset(){this.subscribersStore.write(it=>{it.length=0})}forEach(it){this.subscribersStore.read(z=>z.forEach(it))}add(it){this.subscribersStore.write(z=>{const ut=z.findIndex(Ft=>Ft.rank>it.rank),wt=ut===-1?z.length:ut;z.splice(wt,0,it)})}remove(it){this.subscribersStore.write(z=>{const ut=z.indexOf(it);ut>=0&&z.splice(ut,1)})}}class vt{constructor(it,z,ut=0){this.subscriberSet=it,this.listener=z,this.rank=ut,this.awake=!0,this.notificationDuringSleep=!1,this.scheduleNotify=(0,a.Lu)(a.dY,()=>this.notify())}subscribeChanges(it){this.activeReference||this.subscriberSet.add(this),this.activeReference=it,this.hasChanges()&&this.listener()}unsubscribe(){this.activeReference&&(this.subscriberSet.remove(this),this.activeReference=void 0)}setAwake(it){this.awake=it,it&&this.notificationDuringSleep&&(this.notify(),this.notificationDuringSleep=!1)}notify(){if(this.activeReference){if(!this.awake){this.notificationDuringSleep=!0;return}this.listener()}}hasChanges(){var it;return!!((it=this.activeReference)!=null&&it.hasChanges())}}const q=new st,Y=new st;function H(et){return Y.create(et)}function I(et,it=0){return q.create(et,it)}const at=new a.hl;let Q=!1;function V(et){try{at.runWith(!0,et)}finally{!at.current()&&Q&&(Q=!1,tt())}}function tt(){if(at.current()){Q=!0;return}dt({contextName:"state listeners"},()=>{kt(),Zt()})}function Et(){q.reset(),Y.reset()}function kt(){q.forEach(et=>{et.hasChanges()&&et.notify()})}const Zt=(0,a.Lu)(a.dY,()=>Y.forEach(et=>{et.hasChanges()&&et.scheduleNotify()}));class se{constructor(it){this.detector=it}hasChanges(){return this.detector()}}function ve(et){const{detector:it,result:z,accessCount:ut}=Kt(et);return{result:z,accessedState:new se(it),accessCount:ut}}const ue=new a.hl;function St(et){const it=ue.current();it!==void 0&&it.push(et)}function Kt(et){const{result:it,detectors:z}=zt(et);return{result:it,detector:()=>z.some(ut=>ut()),accessCount:z.length}}function zt(et){const it=[],z=ue.runWith(it,et),ut=ue.current();return ut!==void 0&&it.forEach(wt=>ut.push(wt)),{result:z,detectors:it}}class de{get(){const it=this.untrackedGet();return St(()=>it!==this.untrackedGet()),it}set(it){const z=this.untrackedGet(),ut=A(z,it);ut!==z&&this.uncheckedSet(ut)}clear(){this.set(void 0)}subState(it){return new re(this,it)}reader(){return this}setSubState(it,z){const ut=this.untrackedGet();if(ut===void 0){const wt={[it]:z};this.uncheckedSet(wt);return}if(ut===null)throw new a.Gd;if(z===void 0){const wt=Object.keys(ut);if(wt.length===1&&wt[0]===it){this.uncheckedSet(void 0);return}}Vt(()=>{z===void 0?delete ut[it]:ut[it]=z})}getSubState(it){const z=this.untrackedGet();if((0,a.Wo)(z))return z[it]}}class Ut extends de{constructor(){super()}untrackedGet(){return this.state}uncheckedSet(it){Vt(()=>{this.state=it})}id(){return""}}function Vt(et){_t("Changing state"),et(),tt()}class re extends de{constructor(it,z){super(),this.parentState=it,this.key=z}untrackedGet(){return this.parentState.getSubState(this.key)}uncheckedSet(it){this.parentState.setSubState(this.key,it)}id(){if(this.cachedId===void 0){const it=this.key.replace(/\\/g,"\\\\").replace(/\//g,"\\/");this.cachedId=`${this.parentState.id()}/${it}`}return this.cachedId}}const fe=new Ut,Se=fe;function Ve(){Et(),fe.clear()}(0,a.Nj)(Ve);const Ye=(0,a.OV)(a.dY,et=>(V(()=>et.forEach(it=>it())),[]));function je(et){return new a.RE(it=>{let z=!0,ut,wt=!1;const Ft=H(bt);function bt(){if(!z)return;const qt=ve(()=>dt({contextName:"observe",message:"Extract all side-effects into the listener function"},et));Ft.subscribeChanges(qt.accessedState);const Ke=qt.result;wt&&(0,a.uw)(Ke,ut)||(it.next(Ke),ut=Ke,wt=!0)}return(0,a.dY)(bt),()=>{z=!1,Ft.unsubscribe()}})}function Dt(et,it){const z=ve(()=>dt({contextName:"observeSync",message:"Use non-sync observe or nextTick"},et));let ut=z.result;const wt=I(()=>{const Ft=ve(et);wt.subscribeChanges(Ft.accessedState);const bt=Ft.result;(0,a.uw)(bt,ut)||(it(bt),ut=bt)});return wt.subscribeChanges(z.accessedState),{initialValue:ut,unsubscribe:()=>{wt.unsubscribe()}}}let $=0;function Pt(){return $++,Se.subState("dynamic").subState($.toString())}},5929(E){E.exports=O},9226(E){E.exports=G},16(E){E.exports=gt},3444(E){E.exports=mt},8307(E){E.exports=xt},5020(E){E.exports=Ht},9477(E){E.exports=Jt},7885(E){E.exports=ye},721(E){E.exports=Ee},2925(E){E.exports=ke},5682(E){E.exports=Qe},3655(E){E.exports=ze},5769(E){E.exports=dn},629(E){E.exports=Dn},400(E){E.exports=Ln},2198(E){E.exports=mn}},Ue={};function Tt(E){var C=Ue[E];if(C!==void 0)return C.exports;var r=Ue[E]={exports:{}};
2return Un[E].call(r.exports,r,r.exports,Tt),r.exports}Tt.m=Un,Tt.n=E=>{var C=E&&E.__esModule?(()=>E.default):(()=>E);return Tt.d(C,{a:C}),C},Tt.d=(E,C)=>{for(var r in C)Tt.o(C,r)&&!Tt.o(E,r)&&Object.defineProperty(E,r,{enumerable:!0,get:C[r]})},Tt.f={},Tt.e=E=>Promise.all(Object.keys(Tt.f).reduce((C,r)=>(Tt.f[r](E,C),C),[])),Tt.u=E=>"scrivito_editing.js",Tt.miniCssF=E=>{},Tt.o=(E,C)=>Object.prototype.hasOwnProperty.call(E,C),(()=>{var E={},C="scrivito:";Tt.l=(r,a,p,D)=>{if(E[r]){E[r].push(a);return}var A,T;if(p!==void 0)for(var S=document.getElementsByTagName("script"),B=0;B<S.length;B++){var Z=S[B];if(Z.getAttribute("src")==r||Z.getAttribute("data-webpack")==C+p){A=Z;break}}A||(T=!0,A=document.createElement("script"),A.charset="utf-8",Tt.nc&&A.setAttribute("nonce",Tt.nc),A.setAttribute("data-webpack",C+p),A.src=r),E[r]=[a];var J=(ht,_t)=>{A.onerror=A.onload=null,clearTimeout(dt);var Ot=E[r];if(delete E[r],A.parentNode&&A.parentNode.removeChild(A),Ot&&Ot.forEach(R=>R(_t)),ht)return ht(_t)},dt=setTimeout(J.bind(null,void 0,{type:"timeout",target:A}),12e4);A.onerror=J.bind(null,A.onerror),A.onload=J.bind(null,A.onload),T&&document.head.appendChild(A)}})(),Tt.r=E=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(E,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(E,"__esModule",{value:!0})},Tt.p="",(()=>{var E={611:0};Tt.f.j=(a,p)=>{var D=Tt.o(E,a)?E[a]:void 0;if(D!==0)if(D)p.push(D[2]);else{var A=new Promise((Z,J)=>D=E[a]=[Z,J]);p.push(D[2]=A);var T=Tt.p+Tt.u(a),S=new Error,B=Z=>{if(Tt.o(E,a)&&(D=E[a],D!==0&&(E[a]=void 0),D)){var J=Z&&(Z.type==="load"?"missing":Z.type),dt=Z&&Z.target&&Z.target.src;S.message="Loading chunk "+a+` failed.
3(`+J+": "+dt+")",S.name="ChunkLoadError",S.type=J,S.request=dt,D[1](S)}};Tt.l(T,B,"chunk-"+a,a)}};var C=(a,p)=>{var[D,A,T]=p,S,B,Z=0;if(D.some(dt=>E[dt]!==0)){for(S in A)Tt.o(A,S)&&(Tt.m[S]=A[S]);if(T)var J=T(Tt)}for(a&&a(p);Z<D.length;Z++)B=D[Z],Tt.o(E,B)&&E[B]&&E[B][0](),E[B]=0},r=(typeof self<"u"?self:_a).webpackChunkscrivito=(typeof self<"u"?self:_a).webpackChunkscrivito||[];r.forEach(C.bind(null,0)),r.push=C.bind(null,r.push.bind(r))})();var nn={};Tt.r(nn),Tt.d(nn,{ArgumentError:()=>me.c1,BackgroundImageTag:()=>hn.CJ,Binary:()=>vr.yI,ChildListTag:()=>hn.fK,ClientError:()=>Ci.MZ,ContentTag:()=>hn.Qo,CurrentPage:()=>hn.Tb,DataClass:()=>xr.bA,DataConnectionError:()=>xr.BA,DataItem:()=>xr.sO,DataLocator:()=>vr.HX,DataScope:()=>xr.bq,Extensions:()=>hn.Fd,FutureBinary:()=>vr.HI,ImageTag:()=>hn.E0,InPlaceEditAsPageContent:()=>hn.LS,InPlaceEditingOff:()=>hn.CY,Link:()=>jr.N_,LinkTag:()=>hn.bI,NotFoundErrorPage:()=>hn.zK,Obj:()=>jr.OH,ObjFacetValue:()=>jr.mZ,ObjSearch:()=>jr.G5,RestoreInPlaceEditing:()=>hn.R$,ScrivitoError:()=>me.aS,Widget:()=>jr.x0,WidgetTag:()=>hn.zG,canEdit:()=>tl.p,canWrite:()=>el,configure:()=>ts.jK,configureContentBrowser:()=>nl.w,configureCropAspectRatios:()=>rl.x,configureObjClassForContentType:()=>il.I,configurePreviewSizes:()=>ol.t,connect:()=>za.Ng,createObjClass:()=>jr.KZ,createRestApiClient:()=>Ci.gM,createWidgetClass:()=>jr.dl,currentEditor:()=>sl,currentLanguage:()=>ka,currentPage:()=>gi.F2,currentPageParams:()=>gi.R3,currentSiteId:()=>gi.OI,currentUser:()=>ns.Ny,currentWorkspace:()=>al,currentWorkspaceId:()=>ul.o_,editorLanguage:()=>$l,ensureUserIsLoggedIn:()=>ns.z5,extendMenu:()=>ll,extractText:()=>gl,finishLoading:()=>za.O$,getClass:()=>jr.an,getDataClass:()=>xr.D5,getInstanceId:()=>Va.z,isComparisonActive:()=>Ds.gY,isCurrentPage:()=>gi.P$,isEditorLoggedIn:()=>ml,isInPlaceEditingActive:()=>Ds.HD,isOnCurrentPath:()=>Gl,isUserLoggedIn:()=>ns.x3,load:()=>He.Hh,logout:()=>ns.ri,navigateTo:()=>Pl.V,openDialog:()=>wl,performWithIamToken:()=>Yl,preload:()=>Tl,provideAuthGroups:()=>Rl.E,provideComponent:()=>hn.lo,provideDataClass:()=>xr.Ew,provideDataErrorComponent:()=>hn.NX,provideDataItem:()=>xr.h8,provideDataService:()=>xr.rz,provideEditingConfig:()=>Hl.K,provideLayoutComponent:()=>hn.nq,provideObjClass:()=>zl,provideWidgetClass:()=>Kl,registerComponent:()=>hn.Nj,renderPage:()=>Ul,resolveHtmlUrls:()=>Vl.I,setVisitorIdToken:()=>Ga.LQ,uiContext:()=>Nl,unstable_Dam:()=>hn.ZO,unstable_DamImageSelector:()=>hn.Nl,unstable_deleteOfflineStore:()=>es.C1,unstable_enableOfflineStore:()=>He.a9,unstable_enterOfflineMode:()=>es.Dk,unstable_isInOfflineMode:()=>es.uX,unstable_isOfflineStoreEnabled:()=>He.Em,unstable_leaveOfflineMode:()=>es.gV,unstable_selectImageFromContentBrowser:()=>qc,unstable_selectSiteId:()=>Zl.yG,updateContent:()=>Bl,updateMenuExtensions:()=>Ha.xi,uploadFile:()=>Ci.QM,urlFor:()=>Qa.d,urlForDataItem:()=>kl,useAttributeDefinition:()=>hn.rj,useContent:()=>hn.HZ,useData:()=>hn.Ez,useDataItem:()=>hn.p$,useDataLocator:()=>hn.uv,useDataScope:()=>hn.WS,useHistory:()=>
3Oe.W6,useIsInPlaceEditingActive:()=>bl,useResolvedHtmlValue:()=>hn.w6,useResolvedStringValue:()=>hn.yf,useUrlFor:()=>hn.O4,validationResultsFor:()=>Fl});var $e=Tt(9191),Oe=Tt(4599),ne=Tt(671),De=Tt(1446),me=Tt(6687),He=Tt(6084),Xn=Tt(6324),Ar=(E,C,r)=>new Promise((a,p)=>{var D=S=>{try{T(r.next(S))}catch(B){p(B)}},A=S=>{try{T(r.throw(S))}catch(B){p(B)}},T=S=>S.done?a(S.value):Promise.resolve(S.value).then(D,A);T((r=r.apply(E,C)).next())});function Jr(){let E;(0,Xn.lB)(()=>(0,He.Fg)(ne.Vd).result).filter(me.Wo).filter(C=>{if(!C.currentPage)return!1;const r=C.navigationState,a=E===void 0||E.locationRoute.objId!==r.locationRoute.objId||E.historyState.location!==r.historyState.location;return E=r,a}).subscribe(si)}function si(E){return Ar(this,null,function*(){const C=E.navigationState.historyState.location,r=yield(0,He.Hh)(()=>{if(Oe.Jt()===C)return(0,De.WH)(E.currentPage)});if(!r||Oe.Jt()!==C)return;const a=new URL(C,"http://example.com");r!==a.pathname&&(a.pathname=r,Oe.HC((0,me.B6)(a)))})}var gi=Tt(5396),vr=Tt(5436),wc=Tt(2945);function ka(){var E,C;const r=(0,gi.OI)();return r&&(C=(E=(0,vr.Mp)((0,wc.p)().and((0,vr.rs)(r))))==null?void 0:E.language())!=null?C:null}var Oc=Tt(4317),Ds=Tt(1457),ts=Tt(2469),Cc=(E,C,r)=>new Promise((a,p)=>{var D=S=>{try{T(r.next(S))}catch(B){p(B)}},A=S=>{try{T(r.throw(S))}catch(B){p(B)}},T=S=>S.done?a(S.value):Promise.resolve(S.value).then(D,A);T((r=r.apply(E,C)).next())});function Ec(E){return Cc(this,null,function*(){var C,r;if(E===window.location.origin||Is(E,"https://*.scrivito.com")||Is(E,"https://*.justrelate.com"))return!0;const a=yield(0,ts.D0)(),p=a.adoptUi;return typeof p=="string"&&Is(E,p)?!0:[...(r=(C=a.unstable)==null?void 0:C.trustedUiOrigins)!=null?r:[],...Sc()].some(T=>Is(E,T))})}function Is(E,C){const r=C.split("//*");if(r.length!==2)return E===C;const[a,p]=r,D=new URL(E);return D.protocol===a&&p.startsWith(".")&&D.host.endsWith(p)}function Sc(){var E,C;return(C=(E=window.localStorage.getItem("SCRIVITO_TRUSTED_UI_ORIGINS"))==null?void 0:E.split(" "))!=null?C:[]}var Fa=Tt(8891),As=Tt(4899),Dc=(E,C,r)=>new Promise((a,p)=>{var D=S=>{try{T(r.next(S))}catch(B){p(B)}},A=S=>{try{T(r.throw(S))}catch(B){p(B)}},T=S=>S.done?a(S.value):Promise.resolve(S.value).then(D,A);T((r=r.apply(E,C)).next())});function Ic(E){const C=Dc(null,null,function*(){const{port:r,origin:a}=yield(0,As.m6)(E,(0,As.TB)(window),{clientVersion:(0,me.YX)(),clientCapabilities:["adapterSpec"]});if(!(yield Ec(a)))throw new me.aS(`Refusing to connect to Web Builder UI at unknown origin ${a}.`);return r});return(0,As.V_)(Fa.qk,C)}function Ac(E){return Array.prototype.slice.call(E)}const jc=["HEAD","SCRIPT"];function ta(E){const C=E.nodeName;return jc.indexOf(C)>-1?"":C==="#text"?E.textContent||"":Ac(E.childNodes).map(r=>Tc.includes(r.nodeName)?ta(r):` ${ta(r)} `).join("")}const Tc=["#text","A","ABBR","B","BDI","BDO","CITE","CODE","DATA","DFN","EM","I","KBD","MARK","Q","RP","RT","RUBY","S","SAMP","SMALL","SPAN","STRONG","SUB","SUP","TIME","U","VAR","WBR"];let ea;function Rc(E){return ea||(ea=new DOMParser),ea.parseFromString(E,"text/html").documentElement}function xc(E){const C=Rc(E);return ta(C)}let na;function Mc(E){na=E}function Lc(E){if(!na)throw new me.Gd;if(E==="")return"";const C=na(E);return(0,me.M4)(C)}var Na=Tt(4825),Uc=Tt(9909),Wc=(E,C,r)=>new Promise((a,p)=>{var D=S=>{try{T(r.next(S))}catch(B){p(B)}},A=S=>{try{T(r.throw(S))}catch(B){p(B)}},T=S=>S.done?a(S.value):Promise.resolve(S.value).then(D,A);T((r=r.apply(E,C)).next())});function Bc(){return Wc(this,null,function*(){return yield(0,$e.KO)(),Tt.e(723).then(Tt.bind(Tt,8403))})}var $a=Tt(2993),es=Tt(1226),Cr=Tt(1391),xr=Tt(1871);function kc(){Cr.B?Cr.B.windowFocusStream().subscribe(xr.R7):((0,me.LD)(),(0,me.VC)(xr.R7))}function Fc(){if(Nc())return null;const E=(0,me.pb)();return Cr.B?E:(0,me.Y3)(E)||null}function Nc(){const E=window.parent;return E===window?!1:$c(E)!==window.location.host}function $c(E){try{return E.location.host}catch{}}function Vc(E,C,r){window.parent.location.replace(`${E}/${C}~${r}`)}var zc=(E,C,r)=>new Promise((a,p)=>{var D=S=>{try{T(r.next(S))}catch(B){p(B)}},A=S=>{try{T(r.throw(S))}catch(B){p(B)}},T=S=>S.done?a(S.value):Promise.resolve(S.value).then(D,A);T((r=r.apply(E,C)).next())});function Kc(){return zc(this,null,function*(){const E=yield(0,ts.D0)();Hc(E)})}function Hc(E){const{adoptUi:C}=E,r=(0,ts.r$)(E);if(C){const a=Fc();a&&(Vc(C===!0?"https://edit.scrivito.com":C,r,a),(0,$a.aM)())}}var Ci=Tt(9421),Fr=Tt(9180),Gc=Tt(5924),Jc=Tt(93),jr=Tt(687),Qc=Tt(1645),Yc=(E,C,r)=>new Promise((a,p)=>{var D=S=>{try{T(r.next(S))}catch(B){p(B)}},A=S=>{try{T(r.throw(S))}catch(B){p(B)}},T=S=>S.done?a(S.value):Promise.resolve(S.value).then(D,A);T((r=r.apply(E,C)).next())});function Zc(){return Yc(this,null,function*(){(0,Ci.HG)(),(0,$e.Pu)(),(0,me.cN)(me.e_),(0,jr.kI)(gi.OI),(0,ne.tj)($a.$0),Mc(xc),Kc();const E=window.parent,C=E!==window,r=window.name;if(!(C&&(0,Ds.a_)(r)))(0,Fr.B5)(Fr.sX);else{const p=Ic(E);(0,Cr.U)(p),(0,Ci.Ep)(p),Ci.gd.rejectRequests(),(0,vr.mv)(p),(0,vr.d4)(p),(0,Gc.I8)(A=>p.getResolvedUrl(A)||null),(0,Fr.L_)(p),(0,Fr.JL)(p),(0,Fr.B5)(Fr.aM);const D=yield Bc();D.installDndHandler(),D.installScrollHandler(),D.setModeIndicators(),D.reloadIfContextChangesFrom(r),(0,Oc.g)(),(0,Qc.l)(Uc.hF)}Jr(),(0,es.pM)(),(0,Na.A)(Jc.I),(0,xr._L)(ka),kc()})}var Va=Tt(5639),Xc=(E,C,r)=>new Promise((a,p)=>{var D=S=>{try{T(r.next(S))}catch(B){p(B)}},A=S=>{try{T(r.throw(S))}catch(B){p(B)}},T=S=>S.done?a(S.value):Promise.resolve(S.value).then(D,A);T((r=r.apply(E,C)).next())});function qc(){return Xc(this,null,function*(){const C=(yield(0,ts.D0)()).adoptUi,a=`${typeof C=="string"?C:"https://edit.scrivito.com"}/${(0,Va.z)()}/selectImage~`,p=window.open(a,"_blank");if(!p)throw new Error("Failed to open UI window");const D=yield(0,As.TB)(window).incomingMessages.filter(T=>T.remoteWindow===p).map(T=>T.data).filter(Fa.aG).waitForFirst();p.close();const A=D.objId;return A?yield(0,He.Hh)(()=>jr.OH.onAllSites().get(A)):null})}var hn=Tt(322),za=Tt(5841),tl=Tt(9162);function el(){return Cr.B&&Cr.B.canWrite((0,vr.o_)())||!1}var nl=Tt(5968),rl=Tt(8457),il=Tt(8361),ol=Tt(7720),Ka=Tt(279);function sl(){if(!Cr.B)return null;
3const E=Cr.B.currentEditor(),C=Cr.B.currentEditorTeams(),r=(0,Ka.eW)("editingSupport","Editor");return r&&E&&C?new r(E,C):null}var ns=Tt(3225);function al(){var E,C;return new vr.aR((C=(E=Cr.B)==null?void 0:E.currentWorkspace())!=null?C:{id:(0,vr.o_)(),title:""})}var ul=Tt(4603),Ha=Tt(6556),cl=Tt(8214);function ll(E){Cr.B&&((0,cl.m)(E),(0,Ha.xi)())}class dl{constructor(C){this.maxLength=C,this.currentLength=0,this.extracts=[]}isMaxLengthReached(){return this.currentLength>=this.maxLength}push(C){C&&(this.currentLength+=C.length+(this.extracts.length?1:0),this.extracts.push(C))}toString(){return this.extracts.join(" ").substring(0,this.maxLength).replace(/ $/,"")}}function fl(E){if(E instanceof vr.$R)return"";const C=E.metadata().get("text");return typeof C!="string"?"":(0,me.M4)(C)}function hl(E,C){for(const r of E)if(ra(r,C),C.isMaxLengthReached())break}function pl(E,C,r,a){if(r==="blob:text")return a.push(fl(E));const p=C.attribute(r);if(!p)return;const[D]=p;switch(D){case"html":a.push(Lc(E.get(r,"html")));break;case"string":a.push((0,me.M4)(E.get(r,"string")));break;case"widget":{const A=E.get(r,"widget");A&&ra(A,a);break}case"widgetlist":hl(E.get(r,"widgetlist"),a);break}}function ra(E,C){const r=(0,jr.e6)(E);if(r){for(const a of r.extractTextAttributes())if(pl(E,r,a,C),C.isMaxLengthReached())break}}function vl(E,C){const r=new dl(C);return ra(E,r),r.toString()}function gl(E,C){_l(E);const r=(0,jr.zo)(E),a=C&&C.length?C.length:1e9;return vl(r,a)}function _l(E,C){(0,vr.mD)(E)||(0,me.Ht)("extractText","'obj' must be an instance of 'Obj'.",{docPermalink:"js-sdk/extractText"})}function ml(){return!!Cr.B}var yl=Tt(4861);function bl(){var E,C;const r=(0,yl.S)((C=(E=(0,ne.Vd)())==null?void 0:E.currentPage)!=null?C:null);return(0,Ds.HD)()&&r}var Pl=Tt(9964);function wl(E){Cr.B&&Cr.B.openCustomDialog(E)}function Ol(E,C){return El({version:(0,me.YX)(),csid:C,recording:(0,He.PN)(E)})}function Cl(E){const C=Sl(E);if(!C){(0,me.vV)("could not preload: parsing dump failed");return}if(!Al(C)){(0,me.vV)(`could not preload: dump is from version ${String(C.version)}, this is version ${(0,me.YX)()}`);return}(0,Xn.I7)(()=>{(0,Fr.YR)((0,vr.eb)(),C.csid),(0,He.oB)(C.recording)})}function El(E){return JSON.stringify(E)}function Sl(E){const C=Dl(E);if(C&&Il(C))return C}function Dl(E){if(E.charAt(0)==="{")try{return JSON.parse(E)}catch{return}}function Il(E){return!!E.version}function Al(E){return E.version===(0,me.YX)()}var Ga=Tt(1522),jl=(E,C,r)=>new Promise((a,p)=>{var D=S=>{try{T(r.next(S))}catch(B){p(B)}},A=S=>{try{T(r.throw(S))}catch(B){p(B)}},T=S=>S.done?a(S.value):Promise.resolve(S.value).then(D,A);T((r=r.apply(E,C)).next())});function Tl(E){return jl(this,null,function*(){if((0,Ga.ip)())return{dumpLoaded:!1};const C=!(0,ns.x3)();return C&&Cl(E),yield(0,He.Hh)(gi.F2),{dumpLoaded:C}})}var Rl=Tt(8058),xl=Tt(9008),Ml=Tt(9403),Ll=(E,C,r)=>new Promise((a,p)=>{var D=S=>{try{T(r.next(S))}catch(B){p(B)}},A=S=>{try{T(r.throw(S))}catch(B){p(B)}},T=S=>S.done?a(S.value):Promise.resolve(S.value).then(D,A);T((r=r.apply(E,C)).next())});function Ul(E,C){return Ll(this,null,function*(){(0,Fr.C_)("Scrivito.renderPage"),Wl(E,C);const r=(0,vr.eb)(),a=(0,jr.zo)(E);Ja(a,me.c1),yield(0,Fr.Zt)(r);const p=(0,Fr.Qb)(r),D=Ja(a),{result:A,usedData:T}=yield(0,He.Hh)(()=>(0,He.kE)(()=>(0,xr.Qt)(()=>{const S=(0,Ml.ne)(D);if(!S)throw new me.aS(`The obj "${a.id()}" cannot be rendered because the baseUrlForSite callback did not return a URL for its site "${D}".`);const B=`/${a.id()}`;return(0,ne.OU)({page:a,siteId:D,baseUrl:S,sitePath:B},()=>((0,De.I)(a),(0,xl.iv)(C)))})));return{result:A,preloadDump:Ol(T,p)}})}function Ja(E,C=me.aS){const r=E.siteId();if(r)return r;throw new C(`The obj "${E.id()}" cannot be rendered because it does not have a site ID.`)}function Wl(E,C){(0,vr.mD)(E)||(0,me.Ht)("renderPage","'obj' must be an instance of 'Obj'.",{docPermalink:"js-sdk/renderPage"}),typeof C!="function"&&(0,me.Ht)("renderPage","'render' must be a function.",{docPermalink:"js-sdk/renderPage"})}function Bl(){return(0,Fr.le)((0,vr.eb)())}var Qa=Tt(1368),Ya=Tt(6802);function kl(E){(0,Fr.C_)("Scrivito.urlForDataItem");const C=E.dataClassName();if(!C)throw new me.c1("urlForDataItem is not supported for anonymous data classes");const r=E.obj(),a=(0,gi.OI)();return r?(0,Na.I)(C)||r.isBinary()?(0,Qa.d)(r):(0,Ya.p)(E,r.siteId()||a):a?(0,Ya.p)(E,a):null}function Fl(E,C){const r=(0,Ka.eW)("editingSupport","validationResultsFor");
3return r?r(E,C):[]}function Nl(){var E;return((E=Cr.B)==null?void 0:E.getUiContext())||null}function $l(){var E;return((E=Cr.B)==null?void 0:E.getUiLanguage())||null}var Vl=Tt(9063);function zl(E,C){if(E==="Obj")throw new me.c1('"Obj" is not a valid Obj class name');if((0,xr.Wq)((0,xr.Co)(E)))throw new me.c1(`Class with name ${E} already exists`);return(0,jr.Hk)(E,C)}function Kl(E,C){return(0,jr.C4)(E,C)}var Hl=Tt(1288);function Gl(E){var C;(0,Fr.C_)("Scrivito.isOnCurrentPath"),Jl(E);const r=(C=(0,gi.F2)())==null?void 0:C.path(),a=E.path();return!r||!a||!r.startsWith(a)?!1:r===a||a==="/"?!0:r.charAt(a.length)==="/"}function Jl(E){(0,vr.mD)(E)||(0,me.Ht)("isOnCurrentPath","'obj' must be an instance of 'Obj'.",{docPermalink:"js-sdk/isOnCurrentPath"})}var Ql=(E,C,r)=>new Promise((a,p)=>{var D=S=>{try{T(r.next(S))}catch(B){p(B)}},A=S=>{try{T(r.throw(S))}catch(B){p(B)}},T=S=>S.done?a(S.value):Promise.resolve(S.value).then(D,A);T((r=r.apply(E,C)).next())});function Yl(E,C){return Ql(this,null,function*(){return(0,Ci.yB)(Ci.E2,()=>(0,Ci.R)({audience:E}).authorizeAbstract(C))})}var Zl=Tt(6875);return Zc(),nn})())})(ma)),ma.exports}export{vv as a,rv as b,qd as c,qs as i,D_ as r,gu as t};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.