@shopware-ag/admin-extension-sdk
Advanced tools
Comparing version 3.0.2 to 3.0.3
@@ -1,1 +0,1 @@ | ||
var kg=Object.defineProperty;var Ke=Object.getOwnPropertySymbols;var Kg=Object.prototype.hasOwnProperty,qg=Object.prototype.propertyIsEnumerable;var It=(y,b,v)=>b in y?kg(y,b,{enumerable:!0,configurable:!0,writable:!0,value:v}):y[b]=v,Et=(y,b)=>{for(var v in b||(b={}))Kg.call(b,v)&&It(y,v,b[v]);if(Ke)for(var v of Ke(b))qg.call(b,v)&&It(y,v,b[v]);return y};var g=(y,b,v)=>(It(y,typeof b!="symbol"?b+"":b,v),v);(function(y,b){typeof exports=="object"&&typeof module!="undefined"?b(exports):typeof define=="function"&&define.amd?define(["exports"],b):(y=typeof globalThis!="undefined"?globalThis:y||self,b(y.sw={}))})(this,function(y){var ke;"use strict";var b=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{},v=Object.prototype,qe=v.hasOwnProperty;function Ve(t,e){return t!=null&&qe.call(t,e)}var We=Ve,Je=Array.isArray,O=Je,Ye=typeof b=="object"&&b&&b.Object===Object&&b,Mt=Ye,Xe=Mt,Ze=typeof self=="object"&&self&&self.Object===Object&&self,Qe=Xe||Ze||Function("return this")(),w=Qe,tr=w,er=tr.Symbol,W=er,xt=W,Dt=Object.prototype,rr=Dt.hasOwnProperty,nr=Dt.toString,G=xt?xt.toStringTag:void 0;function ir(t){var e=rr.call(t,G),r=t[G];try{t[G]=void 0;var n=!0}catch{}var i=nr.call(t);return n&&(e?t[G]=r:delete t[G]),i}var ar=ir,sr=Object.prototype,or=sr.toString;function cr(t){return or.call(t)}var ur=cr,zt=W,lr=ar,fr=ur,gr="[object Null]",dr="[object Undefined]",Ft=zt?zt.toStringTag:void 0;function _r(t){return t==null?t===void 0?dr:gr:Ft&&Ft in Object(t)?lr(t):fr(t)}var U=_r;function pr(t){return t!=null&&typeof t=="object"}var P=pr,hr=U,yr=P,br="[object Symbol]";function vr(t){return typeof t=="symbol"||yr(t)&&hr(t)==br}var at=vr,$r=O,mr=at,Sr=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,wr=/^\w*$/;function Tr(t,e){if($r(t))return!1;var r=typeof t;return r=="number"||r=="symbol"||r=="boolean"||t==null||mr(t)?!0:wr.test(t)||!Sr.test(t)||e!=null&&t in Object(e)}var Ar=Tr;function Or(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}var H=Or,jr=U,Cr=H,Pr="[object AsyncFunction]",Ir="[object Function]",Er="[object GeneratorFunction]",Mr="[object Proxy]";function xr(t){if(!Cr(t))return!1;var e=jr(t);return e==Ir||e==Er||e==Pr||e==Mr}var Lt=xr,Dr=w,zr=Dr["__core-js_shared__"],Fr=zr,st=Fr,Nt=function(){var t=/[^.]+$/.exec(st&&st.keys&&st.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}();function Lr(t){return!!Nt&&Nt in t}var Nr=Lr,Rr=Function.prototype,Gr=Rr.toString;function Ur(t){if(t!=null){try{return Gr.call(t)}catch{}try{return t+""}catch{}}return""}var Rt=Ur,Hr=Lt,Br=Nr,kr=H,Kr=Rt,qr=/[\\^$.*+?()[\]{}|]/g,Vr=/^\[object .+?Constructor\]$/,Wr=Function.prototype,Jr=Object.prototype,Yr=Wr.toString,Xr=Jr.hasOwnProperty,Zr=RegExp("^"+Yr.call(Xr).replace(qr,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Qr(t){if(!kr(t)||Br(t))return!1;var e=Hr(t)?Zr:Vr;return e.test(Kr(t))}var tn=Qr;function en(t,e){return t==null?void 0:t[e]}var rn=en,nn=tn,an=rn;function sn(t,e){var r=an(t,e);return nn(r)?r:void 0}var j=sn,on=j,cn=on(Object,"create"),J=cn,Gt=J;function un(){this.__data__=Gt?Gt(null):{},this.size=0}var ln=un;function fn(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}var gn=fn,dn=J,_n="__lodash_hash_undefined__",pn=Object.prototype,hn=pn.hasOwnProperty;function yn(t){var e=this.__data__;if(dn){var r=e[t];return r===_n?void 0:r}return hn.call(e,t)?e[t]:void 0}var bn=yn,vn=J,$n=Object.prototype,mn=$n.hasOwnProperty;function Sn(t){var e=this.__data__;return vn?e[t]!==void 0:mn.call(e,t)}var wn=Sn,Tn=J,An="__lodash_hash_undefined__";function On(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=Tn&&e===void 0?An:e,this}var jn=On,Cn=ln,Pn=gn,In=bn,En=wn,Mn=jn;function I(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}I.prototype.clear=Cn,I.prototype.delete=Pn,I.prototype.get=In,I.prototype.has=En,I.prototype.set=Mn;var xn=I;function Dn(){this.__data__=[],this.size=0}var zn=Dn;function Fn(t,e){return t===e||t!==t&&e!==e}var Ut=Fn,Ln=Ut;function Nn(t,e){for(var r=t.length;r--;)if(Ln(t[r][0],e))return r;return-1}var Y=Nn,Rn=Y,Gn=Array.prototype,Un=Gn.splice;function Hn(t){var e=this.__data__,r=Rn(e,t);if(r<0)return!1;var n=e.length-1;return r==n?e.pop():Un.call(e,r,1),--this.size,!0}var Bn=Hn,kn=Y;function Kn(t){var e=this.__data__,r=kn(e,t);return r<0?void 0:e[r][1]}var qn=Kn,Vn=Y;function Wn(t){return Vn(this.__data__,t)>-1}var Jn=Wn,Yn=Y;function Xn(t,e){var r=this.__data__,n=Yn(r,t);return n<0?(++this.size,r.push([t,e])):r[n][1]=e,this}var Zn=Xn,Qn=zn,ti=Bn,ei=qn,ri=Jn,ni=Zn;function E(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}E.prototype.clear=Qn,E.prototype.delete=ti,E.prototype.get=ei,E.prototype.has=ri,E.prototype.set=ni;var X=E,ii=j,ai=w,si=ii(ai,"Map"),ot=si,Ht=xn,oi=X,ci=ot;function ui(){this.size=0,this.__data__={hash:new Ht,map:new(ci||oi),string:new Ht}}var li=ui;function fi(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}var gi=fi,di=gi;function _i(t,e){var r=t.__data__;return di(e)?r[typeof e=="string"?"string":"hash"]:r.map}var Z=_i,pi=Z;function hi(t){var e=pi(this,t).delete(t);return this.size-=e?1:0,e}var yi=hi,bi=Z;function vi(t){return bi(this,t).get(t)}var $i=vi,mi=Z;function Si(t){return mi(this,t).has(t)}var wi=Si,Ti=Z;function Ai(t,e){var r=Ti(this,t),n=r.size;return r.set(t,e),this.size+=r.size==n?0:1,this}var Oi=Ai,ji=li,Ci=yi,Pi=$i,Ii=wi,Ei=Oi;function M(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}M.prototype.clear=ji,M.prototype.delete=Ci,M.prototype.get=Pi,M.prototype.has=Ii,M.prototype.set=Ei;var Bt=M,kt=Bt,Mi="Expected a function";function ct(t,e){if(typeof t!="function"||e!=null&&typeof e!="function")throw new TypeError(Mi);var r=function(){var n=arguments,i=e?e.apply(this,n):n[0],a=r.cache;if(a.has(i))return a.get(i);var s=t.apply(this,n);return r.cache=a.set(i,s)||a,s};return r.cache=new(ct.Cache||kt),r}ct.Cache=kt;var xi=ct,Di=xi,zi=500;function Fi(t){var e=Di(t,function(n){return r.size===zi&&r.clear(),n}),r=e.cache;return e}var Li=Fi,Ni=Li,Ri=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Gi=/\\(\\)?/g,Ui=Ni(function(t){var e=[];return t.charCodeAt(0)===46&&e.push(""),t.replace(Ri,function(r,n,i,a){e.push(i?a.replace(Gi,"$1"):n||r)}),e}),Hi=Ui;function Bi(t,e){for(var r=-1,n=t==null?0:t.length,i=Array(n);++r<n;)i[r]=e(t[r],r,t);return i}var ki=Bi,Kt=W,Ki=ki,qi=O,Vi=at,Wi=1/0,qt=Kt?Kt.prototype:void 0,Vt=qt?qt.toString:void 0;function Wt(t){if(typeof t=="string")return t;if(qi(t))return Ki(t,Wt)+"";if(Vi(t))return Vt?Vt.call(t):"";var e=t+"";return e=="0"&&1/t==-Wi?"-0":e}var Ji=Wt,Yi=Ji;function Xi(t){return t==null?"":Yi(t)}var Zi=Xi,Qi=O,ta=Ar,ea=Hi,ra=Zi;function na(t,e){return Qi(t)?t:ta(t,e)?[t]:ea(ra(t))}var ia=na,aa=U,sa=P,oa="[object Arguments]";function ca(t){return sa(t)&&aa(t)==oa}var ua=ca,Jt=ua,la=P,Yt=Object.prototype,fa=Yt.hasOwnProperty,ga=Yt.propertyIsEnumerable,da=Jt(function(){return arguments}())?Jt:function(t){return la(t)&&fa.call(t,"callee")&&!ga.call(t,"callee")},Xt=da,_a=9007199254740991,pa=/^(?:0|[1-9]\d*)$/;function ha(t,e){var r=typeof t;return e=e==null?_a:e,!!e&&(r=="number"||r!="symbol"&&pa.test(t))&&t>-1&&t%1==0&&t<e}var Zt=ha,ya=9007199254740991;function ba(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=ya}var ut=ba,va=at,$a=1/0;function ma(t){if(typeof t=="string"||va(t))return t;var e=t+"";return e=="0"&&1/t==-$a?"-0":e}var Sa=ma,wa=ia,Ta=Xt,Aa=O,Oa=Zt,ja=ut,Ca=Sa;function Pa(t,e,r){e=wa(e,t);for(var n=-1,i=e.length,a=!1;++n<i;){var s=Ca(e[n]);if(!(a=t!=null&&r(t,s)))break;t=t[s]}return a||++n!=i?a:(i=t==null?0:t.length,!!i&&ja(i)&&Oa(s,i)&&(Aa(t)||Ta(t)))}var Ia=Pa,Ea=We,Ma=Ia;function xa(t,e){return t!=null&&Ma(t,e,Ea)}var Da=xa;function Qt(){return String(Date.now().toString(36)+Math.random().toString(36).substr(2))}function Q(t){return t!==null&&typeof t=="object"}function lt(){return new URLSearchParams(window.location.search).get("location-id")}function za(){const t=window.location;return new URL(t.pathname,t.origin).toString()}function B(t,e){return Q(e)&&e.__type__&&e.__type__===t}function Fa(t,e){return Da(t,e)}function te(t,e){for(let r in t){const n=t[r];e.apply(this,[t,r,n]),Q(n)&&te(n,e)}}const ft={notificationDispatch:{},windowRedirect:{},windowReload:{},contextLanguage:{},contextEnvironment:{},contextLocale:{},contextCurrency:{},contextShopwareVersion:{},contextAppInformation:{},getPageTitle:{},uiComponentSectionRenderer:{},uiTabsAddTabItem:{},cmsRegisterElement:{},locationUpdateHeight:{},menuItemAdd:{},settingsItemAdd:{},mainModuleAdd:{},uiModalOpen:{},uiModalClose:{},actionButtonAdd:{},actionExecute:{},datasetRegistration:{},datasetSubscribe:{},datasetUpdate:{},__function__:{},__registerWindow__:{},_criteriaTest:{},_collectionTest:{},_multiply:{},_subtract:{},_privileges:{additional:["not_entity_related"],create:["user"],read:["user"],update:["user"],delete:["user"]}};function La(t){const e=ee(t),r=Ra(window.location);return!e||Object.keys(e).length<=0?null:re(e,r)}function Na(t,e){const r=ee(t),n=ne(e);return n?re(r,n.permissions):null}function ee(t){var e;return(e=ft[t])!=null?e:{}}function Ra(t){const r=new URLSearchParams(t.search).get("privileges");return r?JSON.parse(r):{}}function re(t,e){const r=Object.keys(t),n=[];return r.forEach(i=>{var a;(a=t[i])==null||a.forEach(s=>{var u;(u=e[i])!=null&&u.includes(s)||n.push(`${i}:${s}`)})}),n.length>=1?n:null}function ne(t){return Object.values(Ge).find(e=>e.baseUrl===t)}class x extends Error{constructor(e,r){super(`Your app is missing the privileges ${r.join(", ")} for action "${e}".`);g(this,"missingPrivileges");g(this,"messageType");this.missingPrivileges=r,this.messageType=e,Object.setPrototypeOf(this,x.prototype)}toJSON(){return{__type__:"__MissingPrivilegesError__",__messageType__:this.messageType,__data__:this.missingPrivileges}}}const Ga=({send:t,handle:e})=>{const r={};let n=!1;function i(){n||(n=!0,e("__function__",async({args:a,id:s})=>await Promise.resolve(r[s](...a))))}return{name:"function",serialize:({value:a})=>{if(typeof a=="function"){const s=Qt();return r[s]=a,i(),{__type__:"__function__",id:s,origin:window.origin}}},deserialize:({value:a,event:s})=>{var c;const u=(c=s==null?void 0:s.source)!=null?c:window;if(Q(a)&&a.__type__&&a.__type__==="__function__"&&typeof a.id=="string"){const o=a.id,l=a.origin;return(...f)=>t("__function__",{args:f,id:o},u,l)}}}};var Ua=X;function Ha(){this.__data__=new Ua,this.size=0}var Ba=Ha;function ka(t){var e=this.__data__,r=e.delete(t);return this.size=e.size,r}var Ka=ka;function qa(t){return this.__data__.get(t)}var Va=qa;function Wa(t){return this.__data__.has(t)}var Ja=Wa,Ya=X,Xa=ot,Za=Bt,Qa=200;function ts(t,e){var r=this.__data__;if(r instanceof Ya){var n=r.__data__;if(!Xa||n.length<Qa-1)return n.push([t,e]),this.size=++r.size,this;r=this.__data__=new Za(n)}return r.set(t,e),this.size=r.size,this}var es=ts,rs=X,ns=Ba,is=Ka,as=Va,ss=Ja,os=es;function D(t){var e=this.__data__=new rs(t);this.size=e.size}D.prototype.clear=ns,D.prototype.delete=is,D.prototype.get=as,D.prototype.has=ss,D.prototype.set=os;var cs=D;function us(t,e){for(var r=-1,n=t==null?0:t.length;++r<n&&e(t[r],r,t)!==!1;);return t}var ls=us,fs=j,gs=function(){try{var t=fs(Object,"defineProperty");return t({},"",{}),t}catch{}}(),ds=gs,ie=ds;function _s(t,e,r){e=="__proto__"&&ie?ie(t,e,{configurable:!0,enumerable:!0,value:r,writable:!0}):t[e]=r}var ae=_s,ps=ae,hs=Ut,ys=Object.prototype,bs=ys.hasOwnProperty;function vs(t,e,r){var n=t[e];(!(bs.call(t,e)&&hs(n,r))||r===void 0&&!(e in t))&&ps(t,e,r)}var se=vs,$s=se,ms=ae;function Ss(t,e,r,n){var i=!r;r||(r={});for(var a=-1,s=e.length;++a<s;){var u=e[a],c=n?n(r[u],t[u],u,r,t):void 0;c===void 0&&(c=t[u]),i?ms(r,u,c):$s(r,u,c)}return r}var tt=Ss;function ws(t,e){for(var r=-1,n=Array(t);++r<t;)n[r]=e(r);return n}var Ts=ws,et={exports:{}};function As(){return!1}var Os=As;(function(t,e){var r=w,n=Os,i=e&&!e.nodeType&&e,a=i&&!0&&t&&!t.nodeType&&t,s=a&&a.exports===i,u=s?r.Buffer:void 0,c=u?u.isBuffer:void 0,o=c||n;t.exports=o})(et,et.exports);var js=U,Cs=ut,Ps=P,Is="[object Arguments]",Es="[object Array]",Ms="[object Boolean]",xs="[object Date]",Ds="[object Error]",zs="[object Function]",Fs="[object Map]",Ls="[object Number]",Ns="[object Object]",Rs="[object RegExp]",Gs="[object Set]",Us="[object String]",Hs="[object WeakMap]",Bs="[object ArrayBuffer]",ks="[object DataView]",Ks="[object Float32Array]",qs="[object Float64Array]",Vs="[object Int8Array]",Ws="[object Int16Array]",Js="[object Int32Array]",Ys="[object Uint8Array]",Xs="[object Uint8ClampedArray]",Zs="[object Uint16Array]",Qs="[object Uint32Array]",_={};_[Ks]=_[qs]=_[Vs]=_[Ws]=_[Js]=_[Ys]=_[Xs]=_[Zs]=_[Qs]=!0,_[Is]=_[Es]=_[Bs]=_[Ms]=_[ks]=_[xs]=_[Ds]=_[zs]=_[Fs]=_[Ls]=_[Ns]=_[Rs]=_[Gs]=_[Us]=_[Hs]=!1;function to(t){return Ps(t)&&Cs(t.length)&&!!_[js(t)]}var eo=to;function ro(t){return function(e){return t(e)}}var gt=ro,k={exports:{}};(function(t,e){var r=Mt,n=e&&!e.nodeType&&e,i=n&&!0&&t&&!t.nodeType&&t,a=i&&i.exports===n,s=a&&r.process,u=function(){try{var c=i&&i.require&&i.require("util").types;return c||s&&s.binding&&s.binding("util")}catch{}}();t.exports=u})(k,k.exports);var no=eo,io=gt,oe=k.exports,ce=oe&&oe.isTypedArray,ao=ce?io(ce):no,so=ao,oo=Ts,co=Xt,uo=O,lo=et.exports,fo=Zt,go=so,_o=Object.prototype,po=_o.hasOwnProperty;function ho(t,e){var r=uo(t),n=!r&&co(t),i=!r&&!n&&lo(t),a=!r&&!n&&!i&&go(t),s=r||n||i||a,u=s?oo(t.length,String):[],c=u.length;for(var o in t)(e||po.call(t,o))&&!(s&&(o=="length"||i&&(o=="offset"||o=="parent")||a&&(o=="buffer"||o=="byteLength"||o=="byteOffset")||fo(o,c)))&&u.push(o);return u}var ue=ho,yo=Object.prototype;function bo(t){var e=t&&t.constructor,r=typeof e=="function"&&e.prototype||yo;return t===r}var dt=bo;function vo(t,e){return function(r){return t(e(r))}}var le=vo,$o=le,mo=$o(Object.keys,Object),So=mo,wo=dt,To=So,Ao=Object.prototype,Oo=Ao.hasOwnProperty;function jo(t){if(!wo(t))return To(t);var e=[];for(var r in Object(t))Oo.call(t,r)&&r!="constructor"&&e.push(r);return e}var Co=jo,Po=Lt,Io=ut;function Eo(t){return t!=null&&Io(t.length)&&!Po(t)}var fe=Eo,Mo=ue,xo=Co,Do=fe;function zo(t){return Do(t)?Mo(t):xo(t)}var _t=zo,Fo=tt,Lo=_t;function No(t,e){return t&&Fo(e,Lo(e),t)}var Ro=No;function Go(t){var e=[];if(t!=null)for(var r in Object(t))e.push(r);return e}var Uo=Go,Ho=H,Bo=dt,ko=Uo,Ko=Object.prototype,qo=Ko.hasOwnProperty;function Vo(t){if(!Ho(t))return ko(t);var e=Bo(t),r=[];for(var n in t)n=="constructor"&&(e||!qo.call(t,n))||r.push(n);return r}var Wo=Vo,Jo=ue,Yo=Wo,Xo=fe;function Zo(t){return Xo(t)?Jo(t,!0):Yo(t)}var pt=Zo,Qo=tt,tc=pt;function ec(t,e){return t&&Qo(e,tc(e),t)}var rc=ec,ht={exports:{}};(function(t,e){var r=w,n=e&&!e.nodeType&&e,i=n&&!0&&t&&!t.nodeType&&t,a=i&&i.exports===n,s=a?r.Buffer:void 0,u=s?s.allocUnsafe:void 0;function c(o,l){if(l)return o.slice();var f=o.length,h=u?u(f):new o.constructor(f);return o.copy(h),h}t.exports=c})(ht,ht.exports);function nc(t,e){var r=-1,n=t.length;for(e||(e=Array(n));++r<n;)e[r]=t[r];return e}var ic=nc;function ac(t,e){for(var r=-1,n=t==null?0:t.length,i=0,a=[];++r<n;){var s=t[r];e(s,r,t)&&(a[i++]=s)}return a}var sc=ac;function oc(){return[]}var ge=oc,cc=sc,uc=ge,lc=Object.prototype,fc=lc.propertyIsEnumerable,de=Object.getOwnPropertySymbols,gc=de?function(t){return t==null?[]:(t=Object(t),cc(de(t),function(e){return fc.call(t,e)}))}:uc,yt=gc,dc=tt,_c=yt;function pc(t,e){return dc(t,_c(t),e)}var hc=pc;function yc(t,e){for(var r=-1,n=e.length,i=t.length;++r<n;)t[i+r]=e[r];return t}var _e=yc,bc=le,vc=bc(Object.getPrototypeOf,Object),pe=vc,$c=_e,mc=pe,Sc=yt,wc=ge,Tc=Object.getOwnPropertySymbols,Ac=Tc?function(t){for(var e=[];t;)$c(e,Sc(t)),t=mc(t);return e}:wc,he=Ac,Oc=tt,jc=he;function Cc(t,e){return Oc(t,jc(t),e)}var Pc=Cc,Ic=_e,Ec=O;function Mc(t,e,r){var n=e(t);return Ec(t)?n:Ic(n,r(t))}var ye=Mc,xc=ye,Dc=yt,zc=_t;function Fc(t){return xc(t,zc,Dc)}var Lc=Fc,Nc=ye,Rc=he,Gc=pt;function Uc(t){return Nc(t,Gc,Rc)}var Hc=Uc,Bc=j,kc=w,Kc=Bc(kc,"DataView"),qc=Kc,Vc=j,Wc=w,Jc=Vc(Wc,"Promise"),Yc=Jc,Xc=j,Zc=w,Qc=Xc(Zc,"Set"),tu=Qc,eu=j,ru=w,nu=eu(ru,"WeakMap"),iu=nu,bt=qc,vt=ot,$t=Yc,mt=tu,St=iu,be=U,z=Rt,ve="[object Map]",au="[object Object]",$e="[object Promise]",me="[object Set]",Se="[object WeakMap]",we="[object DataView]",su=z(bt),ou=z(vt),cu=z($t),uu=z(mt),lu=z(St),C=be;(bt&&C(new bt(new ArrayBuffer(1)))!=we||vt&&C(new vt)!=ve||$t&&C($t.resolve())!=$e||mt&&C(new mt)!=me||St&&C(new St)!=Se)&&(C=function(t){var e=be(t),r=e==au?t.constructor:void 0,n=r?z(r):"";if(n)switch(n){case su:return we;case ou:return ve;case cu:return $e;case uu:return me;case lu:return Se}return e});var wt=C,fu=Object.prototype,gu=fu.hasOwnProperty;function du(t){var e=t.length,r=new t.constructor(e);return e&&typeof t[0]=="string"&&gu.call(t,"index")&&(r.index=t.index,r.input=t.input),r}var _u=du,pu=w,hu=pu.Uint8Array,yu=hu,Te=yu;function bu(t){var e=new t.constructor(t.byteLength);return new Te(e).set(new Te(t)),e}var Tt=bu,vu=Tt;function $u(t,e){var r=e?vu(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.byteLength)}var mu=$u,Su=/\w*$/;function wu(t){var e=new t.constructor(t.source,Su.exec(t));return e.lastIndex=t.lastIndex,e}var Tu=wu,Ae=W,Oe=Ae?Ae.prototype:void 0,je=Oe?Oe.valueOf:void 0;function Au(t){return je?Object(je.call(t)):{}}var Ou=Au,ju=Tt;function Cu(t,e){var r=e?ju(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.length)}var Pu=Cu,Iu=Tt,Eu=mu,Mu=Tu,xu=Ou,Du=Pu,zu="[object Boolean]",Fu="[object Date]",Lu="[object Map]",Nu="[object Number]",Ru="[object RegExp]",Gu="[object Set]",Uu="[object String]",Hu="[object Symbol]",Bu="[object ArrayBuffer]",ku="[object DataView]",Ku="[object Float32Array]",qu="[object Float64Array]",Vu="[object Int8Array]",Wu="[object Int16Array]",Ju="[object Int32Array]",Yu="[object Uint8Array]",Xu="[object Uint8ClampedArray]",Zu="[object Uint16Array]",Qu="[object Uint32Array]";function tl(t,e,r){var n=t.constructor;switch(e){case Bu:return Iu(t);case zu:case Fu:return new n(+t);case ku:return Eu(t,r);case Ku:case qu:case Vu:case Wu:case Ju:case Yu:case Xu:case Zu:case Qu:return Du(t,r);case Lu:return new n;case Nu:case Uu:return new n(t);case Ru:return Mu(t);case Gu:return new n;case Hu:return xu(t)}}var el=tl,rl=H,Ce=Object.create,nl=function(){function t(){}return function(e){if(!rl(e))return{};if(Ce)return Ce(e);t.prototype=e;var r=new t;return t.prototype=void 0,r}}(),il=nl,al=il,sl=pe,ol=dt;function cl(t){return typeof t.constructor=="function"&&!ol(t)?al(sl(t)):{}}var ul=cl,ll=wt,fl=P,gl="[object Map]";function dl(t){return fl(t)&&ll(t)==gl}var _l=dl,pl=_l,hl=gt,Pe=k.exports,Ie=Pe&&Pe.isMap,yl=Ie?hl(Ie):pl,bl=yl,vl=wt,$l=P,ml="[object Set]";function Sl(t){return $l(t)&&vl(t)==ml}var wl=Sl,Tl=wl,Al=gt,Ee=k.exports,Me=Ee&&Ee.isSet,Ol=Me?Al(Me):Tl,jl=Ol,Cl=cs,Pl=ls,Il=se,El=Ro,Ml=rc,xl=ht.exports,Dl=ic,zl=hc,Fl=Pc,Ll=Lc,Nl=Hc,Rl=wt,Gl=_u,Ul=el,Hl=ul,Bl=O,kl=et.exports,Kl=bl,ql=H,Vl=jl,Wl=_t,Jl=pt,Yl=1,Xl=2,Zl=4,xe="[object Arguments]",Ql="[object Array]",tf="[object Boolean]",ef="[object Date]",rf="[object Error]",De="[object Function]",nf="[object GeneratorFunction]",af="[object Map]",sf="[object Number]",ze="[object Object]",of="[object RegExp]",cf="[object Set]",uf="[object String]",lf="[object Symbol]",ff="[object WeakMap]",gf="[object ArrayBuffer]",df="[object DataView]",_f="[object Float32Array]",pf="[object Float64Array]",hf="[object Int8Array]",yf="[object Int16Array]",bf="[object Int32Array]",vf="[object Uint8Array]",$f="[object Uint8ClampedArray]",mf="[object Uint16Array]",Sf="[object Uint32Array]",d={};d[xe]=d[Ql]=d[gf]=d[df]=d[tf]=d[ef]=d[_f]=d[pf]=d[hf]=d[yf]=d[bf]=d[af]=d[sf]=d[ze]=d[of]=d[cf]=d[uf]=d[lf]=d[vf]=d[$f]=d[mf]=d[Sf]=!0,d[rf]=d[De]=d[ff]=!1;function rt(t,e,r,n,i,a){var s,u=e&Yl,c=e&Xl,o=e&Zl;if(r&&(s=i?r(t,n,i,a):r(t)),s!==void 0)return s;if(!ql(t))return t;var l=Bl(t);if(l){if(s=Gl(t),!u)return Dl(t,s)}else{var f=Rl(t),h=f==De||f==nf;if(kl(t))return xl(t,u);if(f==ze||f==xe||h&&!i){if(s=c||h?{}:Hl(t),!u)return c?Fl(t,Ml(s,t)):zl(t,El(s,t))}else{if(!d[f])return i?t:{};s=Ul(t,f,u)}}a||(a=new Cl);var T=a.get(t);if(T)return T;a.set(t,s),Vl(t)?t.forEach(function(m){s.add(rt(m,e,r,m,t,a))}):Kl(t)&&t.forEach(function(m,S){s.set(S,rt(m,e,r,S,t,a))});var R=o?c?Nl:Ll:c?Jl:Wl,A=l?void 0:R(t);return Pl(A||t,function(m,S){A&&(S=m,m=t[S]),Il(s,S,rt(m,e,r,S,t,a))}),s}var Fe=rt,wf=Fe,Tf=1,Af=4;function Of(t){return wf(t,Tf|Af)}var At=Of;let jf=1,Cf=null;class F{constructor(e=jf,r=Cf){g(this,"page");g(this,"limit");g(this,"term");g(this,"filters");g(this,"ids");g(this,"queries");g(this,"associations");g(this,"postFilter");g(this,"sortings");g(this,"aggregations");g(this,"grouping");g(this,"fields");g(this,"groupFields");g(this,"totalCountMode");g(this,"includes");this.page=e,this.limit=r,this.term=null,this.filters=[],this.includes=null,this.ids=[],this.queries=[],this.associations=[],this.postFilter=[],this.sortings=[],this.aggregations=[],this.grouping=[],this.groupFields=[],this.fields=[],this.totalCountMode=1}static fromCriteria(e){return At(e)}parse(){const e={};return this.ids.length>0&&(e.ids=this.ids.join("|")),this.page!==null&&(e.page=this.page),this.limit!==null&&(e.limit=this.limit),this.term!==null&&(e.term=this.term),this.queries.length>0&&(e.query=this.queries),this.filters.length>0&&(e.filter=this.filters),this.postFilter.length>0&&(e["post-filter"]=this.postFilter),this.sortings.length>0&&(e.sort=this.sortings),this.aggregations.length>0&&(e.aggregations=this.aggregations),this.groupFields.length>0&&(e.groupFields=this.groupFields),this.grouping.length>0&&(e.grouping=this.grouping),this.fields.length>0&&(e.fields=this.fields),this.associations.length>0&&(e.associations={},this.associations.forEach(r=>{!e.associations||(e.associations[r.association]=r.criteria.parse())})),this.includes!==null&&(e.includes=this.includes),this.totalCountMode!==null&&(e["total-count-mode"]=this.totalCountMode),e}setIds(e){return this.ids=e,this}setTotalCountMode(e){return typeof e!="number"&&(this.totalCountMode=null),this.totalCountMode=e<0||e>2?null:e,this}setPage(e){return this.page=e,this}setLimit(e){return this.limit=e,this}setTerm(e){return this.term=e,this}addFilter(e){return this.filters.push(e),this}addIncludes(e){return Object.entries(e).forEach(([r,n])=>{this.includes===null&&(this.includes={}),this.includes[r]||(this.includes[r]=[]),this.includes[r].push(...n)}),this}addPostFilter(e){return this.postFilter.push(e),this}addSorting(e){return this.sortings.push(e),this}addQuery(e,r,n=null){const i={score:r,query:e};return n&&(i[n]=n),this.queries.push(i),this}addGroupField(e){return this.groupFields.push(e),this}addGrouping(e){return this.grouping.push(e),this}addFields(...e){return this.fields.push(...e),this}addAggregation(e){return this.aggregations.push(e),this}addAssociation(e){const r=e.split(".");let n=this;return r.forEach(i=>{n=n.getAssociation(i)}),this}getAssociation(e){const r=e.split(".");let n=this;return r.forEach(i=>{n.hasAssociation(i)||n.associations.push({association:i,criteria:new F(null,null)}),n=n.getAssociationCriteria(i)}),n}getAssociationCriteria(e){let r=null;return this.associations.forEach(n=>{n.association===e&&(r=n.criteria)}),r}getLimit(){var e;return(e=this.limit)!=null?e:0}getPage(){var e;return(e=this.page)!=null?e:0}getCriteriaData(){return{page:this.page,limit:this.limit,term:this.term,filters:this.filters,ids:this.ids,queries:this.queries,associations:this.associations,postFilter:this.postFilter,sortings:this.sortings,aggregations:this.aggregations,grouping:this.grouping,fields:this.fields,groupFields:this.groupFields,totalCountMode:this.totalCountMode,includes:this.includes}}hasAssociation(e){return this.associations.some(r=>r.association===e)}resetSorting(){this.sortings=[]}static avg(e,r){return{type:"avg",name:e,field:r}}static count(e,r){return{type:"count",name:e,field:r}}static max(e,r){return{type:"max",name:e,field:r}}static min(e,r){return{type:"min",name:e,field:r}}static stats(e,r){return{type:"stats",name:e,field:r}}static sum(e,r){return{type:"sum",name:e,field:r}}static terms(e,r,n=null,i=null,a=null){return{type:"terms",name:e,field:r,limit:n,sort:i,aggregation:a}}static filter(e,r,n){return{type:"filter",name:e,filter:r,aggregation:n}}static histogram(e,r,n,i,a,s){return{type:"histogram",name:e,field:r,interval:n,format:i,aggregation:a,timeZone:s}}static sort(e,r="ASC",n=!1){return{field:e,order:r,naturalSorting:n}}static naturalSorting(e,r="ASC"){return{field:e,order:r,naturalSorting:!0}}static countSorting(e,r="ASC"){return{field:e,order:r,naturalSorting:!1,type:"count"}}static contains(e,r){return{type:"contains",field:e,value:r}}static prefix(e,r){return{type:"prefix",field:e,value:r}}static suffix(e,r){return{type:"suffix",field:e,value:r}}static equalsAny(e,r){return{type:"equalsAny",field:e,value:r.join("|")}}static range(e,r){return{type:"range",field:e,parameters:r}}static equals(e,r){return{type:"equals",field:e,value:r}}static not(e,r=[]){return{type:"not",operator:e,queries:r}}static multi(e,r=[]){return{type:"multi",operator:e,queries:r}}}const Pf=()=>({name:"criteria",serialize:({value:t,customizerMethod:e})=>{if(t instanceof F)return{__type__:"__Criteria__",data:e(t.getCriteriaData())}},deserialize:({value:t,customizerMethod:e})=>{if(B("__Criteria__",t)&&typeof t.data=="object"){const r=t.data,n=new F;return n.setPage(r.page),n.setLimit(r.limit),n.setTerm(r.term),r.filters.forEach(i=>{n.addFilter(i)}),n.setIds(r.ids),r.queries.forEach(({query:i,score:a})=>{n.addQuery(i,a)}),r.associations.forEach(i=>{n.associations.push(e(i))}),r.postFilter.forEach(i=>{n.addPostFilter(i)}),r.sortings.forEach(i=>{n.addSorting(i)}),r.aggregations.forEach(i=>{n.addAggregation(i)}),r.grouping.forEach(i=>{n.addGrouping(i)}),r.fields.forEach(i=>{n.addFields(i)}),r.groupFields.forEach(i=>{n.addGroupField(i)}),r.includes&&n.addIncludes(r.includes),n.setTotalCountMode(r.totalCountMode),n}}});let If=(t,e,r)=>{t[e]=r};class Ef{constructor(e,r,n,i={}){g(this,"id");g(this,"_origin");g(this,"_entityName");g(this,"_draft");g(this,"_isDirty");g(this,"_isNew");var s,u;this.id=e,this._origin=i.originData?At(i.originData):At(n),this._entityName=r,this._draft=n,this._isDirty=(s=i.isDirty)!=null?s:!1,this._isNew=(u=i.isNew)!=null?u:!1;const a=this;return new Proxy(this._draft,{get(c,o){return o in a._draft?a._draft[o]:a[o]},set(c,o,l){return If(a._draft,o,l),a._isDirty=!0,!0}})}markAsNew(){this._isNew=!0}isNew(){return this._isNew}getIsDirty(){return this._isDirty}getOrigin(){return this._origin}getDraft(){return this._draft}getEntityName(){return this._entityName}}const Le=function(e,r,n,i){return new Ef(e,r,n,i)},Mf=()=>({name:"entity",serialize:({value:t,customizerMethod:e})=>{if(!(!Q(t)||typeof t.getDraft!="function"))return{__type__:"__Entity__",__id__:t.id,__entityName__:t._entityName,__isDirty__:t._isDirty,__isNew__:t._isNew,__origin__:e(t._origin),__draft__:e(t._draft)}},deserialize:({value:t,customizerMethod:e})=>{if(B("__Entity__",t)&&typeof t.__origin__=="object")return new Le(t.__id__,t.__entityName__,e(t.__draft__),{originData:e(t.__origin__),isDirty:t.__isDirty__,isNew:t.__isNew__})}});class L extends Array{constructor(e,r,n,i=null,a=[],s=null,u=null){super();g(this,"entity");g(this,"source");g(this,"context");g(this,"criteria");g(this,"aggregations");g(this,"total");g(this,"first");g(this,"last");g(this,"remove");g(this,"has");g(this,"get");g(this,"getAt");g(this,"getIds");g(this,"add");g(this,"addAt");g(this,"moveItem");this.entity=r,this.source=e,this.context=n,this.criteria=i,this.aggregations=u,this.total=s,this.push(...a),this.first=function(){return this.length<=0?null:this[0]},this.last=function(){return this.length<=0?null:this[this.length-1]},this.remove=function(o){const l=this.findIndex(f=>f.id===o);return l<0?!1:(this.splice(l,1),!0)},this.has=function(o){return this.some(l=>l.id===o)},this.get=function(o){const l=this.find(f=>f.id===o);return typeof l!="undefined"?l:null},this.getAt=function(o){const l=this[o];return typeof l!="undefined"?l:null},this.getIds=function(){return this.map(o=>o.id)},this.add=function(o){this.push(o)},this.addAt=function(o,l){if(typeof l=="undefined"){this.add(o);return}this.splice(l,0,o)},this.moveItem=function(o,l=null){if(l===null&&(l=this.length),o<0||o>=this.length)return null;if(l===o)return this.getAt(o);const f=this.find((R,A)=>A===o);if(typeof f=="undefined")return null;const h=this.filter((R,A)=>A!==o),T=[...h.slice(0,l),f,...h.slice(l)];return this.splice(0,this.length,...T),f},this.filter=function(o,l){const f=Object.getPrototypeOf(this).filter.call(this,o,l);return new L(this.source,this.entity,this.context,this.criteria,f,this.total,this.aggregations)}}static fromCollection(e){return new L(e.source,e.entity,e.context,e.criteria===null?e.criteria:F.fromCriteria(e.criteria),e,e.total,e.aggregations)}}const xf=()=>({name:"entity-collection",serialize:({value:t,customizerMethod:e})=>{if(t instanceof L)return e({__type__:"__EntityCollection__",__source__:t.source,__entityName__:t.entity,__context__:t.context,__criteria__:t.criteria,__entities__:Array.from(t),__total__:t.total,__aggregations__:t.aggregations})},deserialize:({value:t,customizerMethod:e})=>{if(B("__EntityCollection__",t))return new L(t.__source__,t.__entityName__,t.__context__,e(t.__criteria__),e(t.__entities__),t.__total__,t.__aggregations__)}});class K extends Error{constructor(e,r){super(e);g(this,"code",500);!r||(this.code=r)}toJSON(){return{__type__:"__HandleError__",__code__:this.code,__message__:this.message}}}const Df=()=>({name:"handle-error",serialize:()=>{},deserialize:({value:t})=>{if(B("__HandleError__",t))return new K(t.__message__,t.__code__)}});var zf=Fe,Ff=1,Lf=4;function Nf(t,e){return e=typeof e=="function"?e:void 0,zf(t,Ff|Lf,e)}var Ne=Nf;const Rf=[Pf,xf,Mf,Ga,Df,()=>({name:"handle-error",serialize:()=>{},deserialize:({value:t})=>{if(B("__MissingPrivilegesError__",t))return new x(t.__messageType__,t.__data__)}})];function Gf(t){const e=Rf.map(s=>s(t));function r(){return e}function n(s){var u;return(u=e.find(c=>c.name===s))!=null?u:null}function i(s){return Ne(s,(u,c,o,l)=>{for(const f of e){const h=f.serialize({value:u,key:c,object:o,stack:l,customizerMethod:i});if(h)return h}})}function a(s,u){return Ne(s,(c,o,l,f)=>{for(const h of e){const T=h.deserialize({value:c,key:o,object:l,stack:f,event:u,customizerMethod:a});if(T)return T}})}return{getSerializers:r,getSerializerByName:n,serialize:i,deserialize:a}}function Uf(t,e){if(typeof e=="string")return new K(e);if(!(e instanceof Error))return new K("An unknown error occurred.");if(Fa(e,"response.data.errors.0.code")&&e.response.data.errors.length){const r=e.response.data.errors.filter(i=>i.code==="FRAMEWORK__MISSING_PRIVILEGE_ERROR"),n=[];return r.forEach(i=>{const a=JSON.parse(i.detail);n.push(...a.missingPrivileges)}),n.length?new x(t,n):new K(e.response.data.errors[0].code,e.response.data.errors[0].status)}return new K(e.message)}function Ot({serializedData:t,origin:e,type:r,privilegesToCheck:n=[]}){const i=ne(e);if(!i)return null;const a=[];return te(t,(s,u,c)=>{if(u==="__type__"&&["__EntityCollection__","__Entity__"].includes(c)){const o=s.__entityName__;[...n].sort().forEach(l=>{const f=i.permissions[l];(!f||!f.includes(o))&&a.push(`${l}:${o}`)})}}),a.length>0?new x(r,a):null}const{serialize:q,deserialize:Re}=Gf({handle:N,send:$});let Ge={};const jt=new Set;function $(t,e,r,n){const i=La(t);if(i!==null){const h=new x(t,i);return Promise.reject(h)}const a=Qt(),s=e!=null?e:{};let c=q({_type:t,_data:s,_callbackId:a});if(n){const h=Ot({serializedData:c,origin:n,privilegesToCheck:["read"],type:t});h&&(["datasetSubscribe","datasetUpdate","datasetRegistration","datasetGet"].includes(c._type)?c=q({_type:c._type,_callbackId:c._callbackId,_data:{id:c._data.id,data:h}}):c=q({_type:c._type,_callbackId:c._callbackId,_data:h}))}const o=JSON.stringify(c);let l=!1;const f=7e3;return new Promise((h,T)=>{const R=function(S){if(typeof S.data!="string"||S.data.indexOf(`"_callbackId":"${a}"`)===-1)return;let it;try{it=JSON.parse(S.data)}catch{return}if(!Kf(it)||!it.hasOwnProperty("_response"))return;const Bg=Re(it,S);if(window.removeEventListener("message",R),!l){l=!0;const Pt=Bg._response;if(Pt instanceof Error){T(Pt);return}h(Pt)}};window.addEventListener("message",R);let A=!0;try{A=!window.parent.origin}catch{}let m=A?document.referrer:window.parent.origin;n&&(m=n),r?r.postMessage(o,m):window.parent.postMessage(o,m),setTimeout(()=>{l||T("Send timeout expired. It could be possible that no handler for the postMessage request exists or that the handler freezed.")},f)})}function N(t,e){const r=async function(n){var l;if(ft[t]&&Object.keys(ft[t]).length&&(!Ge||Na(t,n.origin)!==null)||typeof n.data!="string"||n.data.indexOf(`"_type":"${t}"`)===-1)return;let i;try{i=JSON.parse(n.data)}catch{return}if(!kf(i))return;const a=Re(i,n),s=await Promise.resolve((()=>{const f=Ot({serializedData:i,origin:n.origin,type:t,privilegesToCheck:["create","delete","update","read"]});return f||e(a._data,{_event_:n})})()).catch(f=>Uf(t,f)),u={_callbackId:a._callbackId,_type:a._type,_response:s!=null?s:null},c=(()=>{let f=q(u);const h=Ot({serializedData:f,origin:n.origin,privilegesToCheck:["read"],type:t});return h&&(f._response=h,f=q(f)),f})(),o=JSON.stringify(c);n.source?n.source.postMessage(o,{targetOrigin:(l=n.origin)!=null?l:"*"}):window.postMessage(o,window.origin)};return window.addEventListener("message",r),()=>window.removeEventListener("message",r)}function Hf(t,e){[...jt].forEach(({source:r,origin:n})=>$(t,e,r,n).catch(()=>{}))}function Ct(t,e){return N(t,e)}function p(t,e){return r=>$(t,Et(Et({},e),r))}function Bf(t){return e=>N(t,e)}function Ue(t){return(e,r)=>r?Ct(t,i=>{i.id===r&&e(i)}):Ct(t,e)}const nt=new Map;(async()=>{N("__registerWindow__",(t,e)=>{let r,n;e._event_.source?(r=e._event_.source,n=e._event_.origin):(r=window,n=window.origin),jt.add({source:r,origin:n}),nt.forEach((i,a)=>{$("datasetSubscribe",{id:a,data:i},r,n).catch(()=>{})})}),N("datasetRegistration",t=>(nt.set(t.id,t.data),Hf("datasetSubscribe",t),{id:t.id,data:t.data})),N("datasetSubscribe",t=>{var e;return(e=nt.get(t.id))!=null?e:null}),await $("__registerWindow__",{})})().catch(t=>console.error(t)),window._swsdk={sourceRegistry:jt,datasets:nt};function kf(t){const e=t;return!!e._type&&!!e._data&&!!e._callbackId}function Kf(t){const e=t;return!!e._type&&!!e.hasOwnProperty("_response")&&!!e._callbackId}const qf=p("windowRedirect"),Vf=p("windowRouterPush"),Wf=p("windowReload",{});var Jf=Object.freeze(Object.defineProperty({__proto__:null,redirect:qf,routerPush:Vf,reload:Wf},Symbol.toStringTag,{value:"Module"}));const Yf=p("notificationDispatch");var Xf=Object.freeze(Object.defineProperty({__proto__:null,dispatch:Yf},Symbol.toStringTag,{value:"Module"}));const Zf=p("contextLanguage",{}),Qf=Ue("contextLanguage"),tg=p("contextEnvironment",{}),eg=p("contextLocale",{}),rg=Ue("contextLocale"),ng=p("contextCurrency",{}),ig=p("contextShopwareVersion",{}),ag=p("contextAppInformation",{}),sg=p("contextModuleInformation",{});var og=Object.freeze(Object.defineProperty({__proto__:null,getLanguage:Zf,subscribeLanguage:Qf,getEnvironment:tg,getLocale:eg,subscribeLocale:rg,getCurrency:ng,getShopwareVersion:ig,getAppInformation:ag,getModuleInformation:sg},Symbol.toStringTag,{value:"Module"}));const cg=p("uiComponentSectionRenderer",{src:(ke=za())!=null?ke:void 0});var ug=Object.freeze(Object.defineProperty({__proto__:null,add:cg},Symbol.toStringTag,{value:"Module"})),lg=t=>({addTabItem:p("uiTabsAddTabItem",{positionId:t})});const fg=p("cmsRegisterElement");var gg=Object.freeze(Object.defineProperty({__proto__:null,registerCmsElement:fg},Symbol.toStringTag,{value:"Module"}));const dg=t=>lt()===t,_g=()=>window!==window.parent,He=t=>{if(t)return $("locationUpdateHeight",{height:t,locationId:lt()});const e=document.documentElement.offsetHeight;return $("locationUpdateHeight",{height:e,locationId:lt()})};let V=null;var pg=Object.freeze(Object.defineProperty({__proto__:null,is:dg,isIframe:_g,updateHeight:He,startAutoResizer:()=>{V=new ResizeObserver(()=>{He()}),V.observe(document.body)},stopAutoResizer:()=>{V&&(V.unobserve(document.body),V.disconnect())},MAIN_HIDDEN:"sw-main-hidden"},Symbol.toStringTag,{value:"Module"}));const hg=p("menuItemAdd");var yg=Object.freeze(Object.defineProperty({__proto__:null,addMenuItem:hg},Symbol.toStringTag,{value:"Module"}));const bg=p("settingsItemAdd");var vg=Object.freeze(Object.defineProperty({__proto__:null,addSettingsItem:bg},Symbol.toStringTag,{value:"Module"}));const $g=p("mainModuleAdd");var mg=Object.freeze(Object.defineProperty({__proto__:null,addMainModule:$g},Symbol.toStringTag,{value:"Module"}));const Sg=p("uiModulePaymentOverviewCard");var wg=Object.freeze(Object.defineProperty({__proto__:null,add:Sg},Symbol.toStringTag,{value:"Module"})),Tg=Object.freeze(Object.defineProperty({__proto__:null,overviewCard:wg},Symbol.toStringTag,{value:"Module"})),Ag=Object.freeze(Object.defineProperty({__proto__:null,payment:Tg},Symbol.toStringTag,{value:"Module"}));const Og=p("uiModalOpen"),jg=p("uiModalClose");var Cg=Object.freeze(Object.defineProperty({__proto__:null,open:Og,close:jg},Symbol.toStringTag,{value:"Module"}));const Pg=p("actionButtonAdd");var Ig=Object.freeze(Object.defineProperty({__proto__:null,add:Pg},Symbol.toStringTag,{value:"Module"}));const Eg=p("actionExecute");var Mg=Object.freeze(Object.defineProperty({__proto__:null,actionExecute:Eg},Symbol.toStringTag,{value:"Module"})),xg=t=>({search:(e,r)=>$("repositorySearch",{entityName:t,context:r,criteria:e}),get:(e,r,n)=>$("repositoryGet",{entityName:t,id:e,context:r,criteria:n}),save:(e,r)=>$("repositorySave",{entityName:t,entity:e,context:r}),clone:(e,r,n)=>$("repositoryClone",{entityName:t,entityId:e,context:r,behavior:n}),hasChanges:e=>$("repositoryHasChanges",{entityName:t,entity:e}),saveAll:(e,r)=>$("repositorySaveAll",{entityName:t,entities:e,context:r}),delete:(e,r)=>$("repositoryDelete",{entityName:t,entityId:e,context:r}),create:(e,r)=>$("repositoryCreate",{entityName:t,entityId:r,context:e})});function Be(t){return(e,r)=>Ct(t,i=>{if(i&&i.id===e){const a=r(i);a&&a.catch(()=>{})}})}const Dg=Be("datasetSubscribe"),zg=p("datasetGet"),Fg=p("datasetUpdate"),Lg=p("datasetRegistration"),Ng=Be("datasetUpdate"),Rg=Bf("datasetGet");var Gg=Object.freeze(Object.defineProperty({__proto__:null,subscribe:Dg,get:zg,update:Fg,register:Lg,updateSubscriber:Ng,handleGet:Rg,repository:xg,Classes:{Criteria:F,Entity:Le,EntityCollection:L}},Symbol.toStringTag,{value:"Module"}));const Ug={webhook:Mg},Hg={componentSection:ug,tabs:lg,menu:yg,settings:vg,mainModule:mg,module:Ag,modal:Cg,actionButton:Ig};y.app=Ug,y.cms=gg,y.context=og,y.data=Gg,y.location=pg,y.notification=Xf,y.ui=Hg,y.window=Jf,Object.defineProperties(y,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}); | ||
var Kg=Object.defineProperty;var Ke=Object.getOwnPropertySymbols;var qg=Object.prototype.hasOwnProperty,Vg=Object.prototype.propertyIsEnumerable;var It=(y,b,v)=>b in y?Kg(y,b,{enumerable:!0,configurable:!0,writable:!0,value:v}):y[b]=v,Et=(y,b)=>{for(var v in b||(b={}))qg.call(b,v)&&It(y,v,b[v]);if(Ke)for(var v of Ke(b))Vg.call(b,v)&&It(y,v,b[v]);return y};var g=(y,b,v)=>(It(y,typeof b!="symbol"?b+"":b,v),v);(function(y,b){typeof exports=="object"&&typeof module!="undefined"?b(exports):typeof define=="function"&&define.amd?define(["exports"],b):(y=typeof globalThis!="undefined"?globalThis:y||self,b(y.sw={}))})(this,function(y){var ke;"use strict";var b=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{},v=Object.prototype,qe=v.hasOwnProperty;function Ve(t,e){return t!=null&&qe.call(t,e)}var We=Ve,Je=Array.isArray,O=Je,Ye=typeof b=="object"&&b&&b.Object===Object&&b,Mt=Ye,Xe=Mt,Ze=typeof self=="object"&&self&&self.Object===Object&&self,Qe=Xe||Ze||Function("return this")(),w=Qe,tr=w,er=tr.Symbol,W=er,xt=W,Dt=Object.prototype,rr=Dt.hasOwnProperty,nr=Dt.toString,G=xt?xt.toStringTag:void 0;function ir(t){var e=rr.call(t,G),r=t[G];try{t[G]=void 0;var n=!0}catch{}var i=nr.call(t);return n&&(e?t[G]=r:delete t[G]),i}var ar=ir,sr=Object.prototype,or=sr.toString;function cr(t){return or.call(t)}var ur=cr,zt=W,lr=ar,fr=ur,gr="[object Null]",dr="[object Undefined]",Ft=zt?zt.toStringTag:void 0;function _r(t){return t==null?t===void 0?dr:gr:Ft&&Ft in Object(t)?lr(t):fr(t)}var U=_r;function pr(t){return t!=null&&typeof t=="object"}var P=pr,hr=U,yr=P,br="[object Symbol]";function vr(t){return typeof t=="symbol"||yr(t)&&hr(t)==br}var st=vr,$r=O,mr=st,Sr=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,wr=/^\w*$/;function Tr(t,e){if($r(t))return!1;var r=typeof t;return r=="number"||r=="symbol"||r=="boolean"||t==null||mr(t)?!0:wr.test(t)||!Sr.test(t)||e!=null&&t in Object(e)}var Ar=Tr;function Or(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}var H=Or,jr=U,Cr=H,Pr="[object AsyncFunction]",Ir="[object Function]",Er="[object GeneratorFunction]",Mr="[object Proxy]";function xr(t){if(!Cr(t))return!1;var e=jr(t);return e==Ir||e==Er||e==Pr||e==Mr}var Lt=xr,Dr=w,zr=Dr["__core-js_shared__"],Fr=zr,ot=Fr,Nt=function(){var t=/[^.]+$/.exec(ot&&ot.keys&&ot.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}();function Lr(t){return!!Nt&&Nt in t}var Nr=Lr,Rr=Function.prototype,Gr=Rr.toString;function Ur(t){if(t!=null){try{return Gr.call(t)}catch{}try{return t+""}catch{}}return""}var Rt=Ur,Hr=Lt,Br=Nr,kr=H,Kr=Rt,qr=/[\\^$.*+?()[\]{}|]/g,Vr=/^\[object .+?Constructor\]$/,Wr=Function.prototype,Jr=Object.prototype,Yr=Wr.toString,Xr=Jr.hasOwnProperty,Zr=RegExp("^"+Yr.call(Xr).replace(qr,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Qr(t){if(!kr(t)||Br(t))return!1;var e=Hr(t)?Zr:Vr;return e.test(Kr(t))}var tn=Qr;function en(t,e){return t==null?void 0:t[e]}var rn=en,nn=tn,an=rn;function sn(t,e){var r=an(t,e);return nn(r)?r:void 0}var j=sn,on=j,cn=on(Object,"create"),J=cn,Gt=J;function un(){this.__data__=Gt?Gt(null):{},this.size=0}var ln=un;function fn(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}var gn=fn,dn=J,_n="__lodash_hash_undefined__",pn=Object.prototype,hn=pn.hasOwnProperty;function yn(t){var e=this.__data__;if(dn){var r=e[t];return r===_n?void 0:r}return hn.call(e,t)?e[t]:void 0}var bn=yn,vn=J,$n=Object.prototype,mn=$n.hasOwnProperty;function Sn(t){var e=this.__data__;return vn?e[t]!==void 0:mn.call(e,t)}var wn=Sn,Tn=J,An="__lodash_hash_undefined__";function On(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=Tn&&e===void 0?An:e,this}var jn=On,Cn=ln,Pn=gn,In=bn,En=wn,Mn=jn;function I(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}I.prototype.clear=Cn,I.prototype.delete=Pn,I.prototype.get=In,I.prototype.has=En,I.prototype.set=Mn;var xn=I;function Dn(){this.__data__=[],this.size=0}var zn=Dn;function Fn(t,e){return t===e||t!==t&&e!==e}var Ut=Fn,Ln=Ut;function Nn(t,e){for(var r=t.length;r--;)if(Ln(t[r][0],e))return r;return-1}var Y=Nn,Rn=Y,Gn=Array.prototype,Un=Gn.splice;function Hn(t){var e=this.__data__,r=Rn(e,t);if(r<0)return!1;var n=e.length-1;return r==n?e.pop():Un.call(e,r,1),--this.size,!0}var Bn=Hn,kn=Y;function Kn(t){var e=this.__data__,r=kn(e,t);return r<0?void 0:e[r][1]}var qn=Kn,Vn=Y;function Wn(t){return Vn(this.__data__,t)>-1}var Jn=Wn,Yn=Y;function Xn(t,e){var r=this.__data__,n=Yn(r,t);return n<0?(++this.size,r.push([t,e])):r[n][1]=e,this}var Zn=Xn,Qn=zn,ti=Bn,ei=qn,ri=Jn,ni=Zn;function E(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}E.prototype.clear=Qn,E.prototype.delete=ti,E.prototype.get=ei,E.prototype.has=ri,E.prototype.set=ni;var X=E,ii=j,ai=w,si=ii(ai,"Map"),ct=si,Ht=xn,oi=X,ci=ct;function ui(){this.size=0,this.__data__={hash:new Ht,map:new(ci||oi),string:new Ht}}var li=ui;function fi(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}var gi=fi,di=gi;function _i(t,e){var r=t.__data__;return di(e)?r[typeof e=="string"?"string":"hash"]:r.map}var Z=_i,pi=Z;function hi(t){var e=pi(this,t).delete(t);return this.size-=e?1:0,e}var yi=hi,bi=Z;function vi(t){return bi(this,t).get(t)}var $i=vi,mi=Z;function Si(t){return mi(this,t).has(t)}var wi=Si,Ti=Z;function Ai(t,e){var r=Ti(this,t),n=r.size;return r.set(t,e),this.size+=r.size==n?0:1,this}var Oi=Ai,ji=li,Ci=yi,Pi=$i,Ii=wi,Ei=Oi;function M(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}M.prototype.clear=ji,M.prototype.delete=Ci,M.prototype.get=Pi,M.prototype.has=Ii,M.prototype.set=Ei;var Bt=M,kt=Bt,Mi="Expected a function";function ut(t,e){if(typeof t!="function"||e!=null&&typeof e!="function")throw new TypeError(Mi);var r=function(){var n=arguments,i=e?e.apply(this,n):n[0],a=r.cache;if(a.has(i))return a.get(i);var s=t.apply(this,n);return r.cache=a.set(i,s)||a,s};return r.cache=new(ut.Cache||kt),r}ut.Cache=kt;var xi=ut,Di=xi,zi=500;function Fi(t){var e=Di(t,function(n){return r.size===zi&&r.clear(),n}),r=e.cache;return e}var Li=Fi,Ni=Li,Ri=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Gi=/\\(\\)?/g,Ui=Ni(function(t){var e=[];return t.charCodeAt(0)===46&&e.push(""),t.replace(Ri,function(r,n,i,a){e.push(i?a.replace(Gi,"$1"):n||r)}),e}),Hi=Ui;function Bi(t,e){for(var r=-1,n=t==null?0:t.length,i=Array(n);++r<n;)i[r]=e(t[r],r,t);return i}var ki=Bi,Kt=W,Ki=ki,qi=O,Vi=st,Wi=1/0,qt=Kt?Kt.prototype:void 0,Vt=qt?qt.toString:void 0;function Wt(t){if(typeof t=="string")return t;if(qi(t))return Ki(t,Wt)+"";if(Vi(t))return Vt?Vt.call(t):"";var e=t+"";return e=="0"&&1/t==-Wi?"-0":e}var Ji=Wt,Yi=Ji;function Xi(t){return t==null?"":Yi(t)}var Zi=Xi,Qi=O,ta=Ar,ea=Hi,ra=Zi;function na(t,e){return Qi(t)?t:ta(t,e)?[t]:ea(ra(t))}var ia=na,aa=U,sa=P,oa="[object Arguments]";function ca(t){return sa(t)&&aa(t)==oa}var ua=ca,Jt=ua,la=P,Yt=Object.prototype,fa=Yt.hasOwnProperty,ga=Yt.propertyIsEnumerable,da=Jt(function(){return arguments}())?Jt:function(t){return la(t)&&fa.call(t,"callee")&&!ga.call(t,"callee")},Xt=da,_a=9007199254740991,pa=/^(?:0|[1-9]\d*)$/;function ha(t,e){var r=typeof t;return e=e==null?_a:e,!!e&&(r=="number"||r!="symbol"&&pa.test(t))&&t>-1&&t%1==0&&t<e}var Zt=ha,ya=9007199254740991;function ba(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=ya}var lt=ba,va=st,$a=1/0;function ma(t){if(typeof t=="string"||va(t))return t;var e=t+"";return e=="0"&&1/t==-$a?"-0":e}var Sa=ma,wa=ia,Ta=Xt,Aa=O,Oa=Zt,ja=lt,Ca=Sa;function Pa(t,e,r){e=wa(e,t);for(var n=-1,i=e.length,a=!1;++n<i;){var s=Ca(e[n]);if(!(a=t!=null&&r(t,s)))break;t=t[s]}return a||++n!=i?a:(i=t==null?0:t.length,!!i&&ja(i)&&Oa(s,i)&&(Aa(t)||Ta(t)))}var Ia=Pa,Ea=We,Ma=Ia;function xa(t,e){return t!=null&&Ma(t,e,Ea)}var Da=xa;function Qt(){return String(Date.now().toString(36)+Math.random().toString(36).substr(2))}function Q(t){return t!==null&&typeof t=="object"}function tt(){return new URLSearchParams(window.location.search).get("location-id")}function za(){const t=window.location;return new URL(t.pathname,t.origin).toString()}function B(t,e){return Q(e)&&e.__type__&&e.__type__===t}function Fa(t,e){return Da(t,e)}function te(t,e){for(let r in t){const n=t[r];e.apply(this,[t,r,n]),Q(n)&&te(n,e)}}const ft={notificationDispatch:{},windowRedirect:{},windowReload:{},contextLanguage:{},contextEnvironment:{},contextLocale:{},contextCurrency:{},contextShopwareVersion:{},contextAppInformation:{},getPageTitle:{},uiComponentSectionRenderer:{},uiTabsAddTabItem:{},cmsRegisterElement:{},locationUpdateHeight:{},menuItemAdd:{},settingsItemAdd:{},mainModuleAdd:{},uiModalOpen:{},uiModalClose:{},actionButtonAdd:{},actionExecute:{},datasetRegistration:{},datasetSubscribe:{},datasetUpdate:{},__function__:{},__registerWindow__:{},_criteriaTest:{},_collectionTest:{},_multiply:{},_subtract:{},_privileges:{additional:["not_entity_related"],create:["user"],read:["user"],update:["user"],delete:["user"]}};function La(t){const e=ee(t),r=Ra(window.location);return!e||Object.keys(e).length<=0?null:re(e,r)}function Na(t,e){const r=ee(t),n=ne(e);return n?re(r,n.permissions):null}function ee(t){var e;return(e=ft[t])!=null?e:{}}function Ra(t){const r=new URLSearchParams(t.search).get("privileges");return r?JSON.parse(r):{}}function re(t,e){const r=Object.keys(t),n=[];return r.forEach(i=>{var a;(a=t[i])==null||a.forEach(s=>{var u;(u=e[i])!=null&&u.includes(s)||n.push(`${i}:${s}`)})}),n.length>=1?n:null}function ne(t){return Object.values(Ge).find(e=>e.baseUrl===t)}class x extends Error{constructor(e,r){super(`Your app is missing the privileges ${r.join(", ")} for action "${e}".`);g(this,"missingPrivileges");g(this,"messageType");this.missingPrivileges=r,this.messageType=e,Object.setPrototypeOf(this,x.prototype)}toJSON(){return{__type__:"__MissingPrivilegesError__",__messageType__:this.messageType,__data__:this.missingPrivileges}}}const Ga=({send:t,handle:e})=>{const r={};let n=!1;function i(){n||(n=!0,e("__function__",async({args:a,id:s})=>await Promise.resolve(r[s](...a))))}return{name:"function",serialize:({value:a})=>{if(typeof a=="function"){const s=Qt();return r[s]=a,i(),{__type__:"__function__",id:s,origin:window.origin}}},deserialize:({value:a,event:s})=>{var c;const u=(c=s==null?void 0:s.source)!=null?c:window;if(Q(a)&&a.__type__&&a.__type__==="__function__"&&typeof a.id=="string"){const o=a.id,l=a.origin;return(...f)=>t("__function__",{args:f,id:o},u,l)}}}};var Ua=X;function Ha(){this.__data__=new Ua,this.size=0}var Ba=Ha;function ka(t){var e=this.__data__,r=e.delete(t);return this.size=e.size,r}var Ka=ka;function qa(t){return this.__data__.get(t)}var Va=qa;function Wa(t){return this.__data__.has(t)}var Ja=Wa,Ya=X,Xa=ct,Za=Bt,Qa=200;function ts(t,e){var r=this.__data__;if(r instanceof Ya){var n=r.__data__;if(!Xa||n.length<Qa-1)return n.push([t,e]),this.size=++r.size,this;r=this.__data__=new Za(n)}return r.set(t,e),this.size=r.size,this}var es=ts,rs=X,ns=Ba,is=Ka,as=Va,ss=Ja,os=es;function D(t){var e=this.__data__=new rs(t);this.size=e.size}D.prototype.clear=ns,D.prototype.delete=is,D.prototype.get=as,D.prototype.has=ss,D.prototype.set=os;var cs=D;function us(t,e){for(var r=-1,n=t==null?0:t.length;++r<n&&e(t[r],r,t)!==!1;);return t}var ls=us,fs=j,gs=function(){try{var t=fs(Object,"defineProperty");return t({},"",{}),t}catch{}}(),ds=gs,ie=ds;function _s(t,e,r){e=="__proto__"&&ie?ie(t,e,{configurable:!0,enumerable:!0,value:r,writable:!0}):t[e]=r}var ae=_s,ps=ae,hs=Ut,ys=Object.prototype,bs=ys.hasOwnProperty;function vs(t,e,r){var n=t[e];(!(bs.call(t,e)&&hs(n,r))||r===void 0&&!(e in t))&&ps(t,e,r)}var se=vs,$s=se,ms=ae;function Ss(t,e,r,n){var i=!r;r||(r={});for(var a=-1,s=e.length;++a<s;){var u=e[a],c=n?n(r[u],t[u],u,r,t):void 0;c===void 0&&(c=t[u]),i?ms(r,u,c):$s(r,u,c)}return r}var et=Ss;function ws(t,e){for(var r=-1,n=Array(t);++r<t;)n[r]=e(r);return n}var Ts=ws,rt={exports:{}};function As(){return!1}var Os=As;(function(t,e){var r=w,n=Os,i=e&&!e.nodeType&&e,a=i&&!0&&t&&!t.nodeType&&t,s=a&&a.exports===i,u=s?r.Buffer:void 0,c=u?u.isBuffer:void 0,o=c||n;t.exports=o})(rt,rt.exports);var js=U,Cs=lt,Ps=P,Is="[object Arguments]",Es="[object Array]",Ms="[object Boolean]",xs="[object Date]",Ds="[object Error]",zs="[object Function]",Fs="[object Map]",Ls="[object Number]",Ns="[object Object]",Rs="[object RegExp]",Gs="[object Set]",Us="[object String]",Hs="[object WeakMap]",Bs="[object ArrayBuffer]",ks="[object DataView]",Ks="[object Float32Array]",qs="[object Float64Array]",Vs="[object Int8Array]",Ws="[object Int16Array]",Js="[object Int32Array]",Ys="[object Uint8Array]",Xs="[object Uint8ClampedArray]",Zs="[object Uint16Array]",Qs="[object Uint32Array]",_={};_[Ks]=_[qs]=_[Vs]=_[Ws]=_[Js]=_[Ys]=_[Xs]=_[Zs]=_[Qs]=!0,_[Is]=_[Es]=_[Bs]=_[Ms]=_[ks]=_[xs]=_[Ds]=_[zs]=_[Fs]=_[Ls]=_[Ns]=_[Rs]=_[Gs]=_[Us]=_[Hs]=!1;function to(t){return Ps(t)&&Cs(t.length)&&!!_[js(t)]}var eo=to;function ro(t){return function(e){return t(e)}}var gt=ro,k={exports:{}};(function(t,e){var r=Mt,n=e&&!e.nodeType&&e,i=n&&!0&&t&&!t.nodeType&&t,a=i&&i.exports===n,s=a&&r.process,u=function(){try{var c=i&&i.require&&i.require("util").types;return c||s&&s.binding&&s.binding("util")}catch{}}();t.exports=u})(k,k.exports);var no=eo,io=gt,oe=k.exports,ce=oe&&oe.isTypedArray,ao=ce?io(ce):no,so=ao,oo=Ts,co=Xt,uo=O,lo=rt.exports,fo=Zt,go=so,_o=Object.prototype,po=_o.hasOwnProperty;function ho(t,e){var r=uo(t),n=!r&&co(t),i=!r&&!n&&lo(t),a=!r&&!n&&!i&&go(t),s=r||n||i||a,u=s?oo(t.length,String):[],c=u.length;for(var o in t)(e||po.call(t,o))&&!(s&&(o=="length"||i&&(o=="offset"||o=="parent")||a&&(o=="buffer"||o=="byteLength"||o=="byteOffset")||fo(o,c)))&&u.push(o);return u}var ue=ho,yo=Object.prototype;function bo(t){var e=t&&t.constructor,r=typeof e=="function"&&e.prototype||yo;return t===r}var dt=bo;function vo(t,e){return function(r){return t(e(r))}}var le=vo,$o=le,mo=$o(Object.keys,Object),So=mo,wo=dt,To=So,Ao=Object.prototype,Oo=Ao.hasOwnProperty;function jo(t){if(!wo(t))return To(t);var e=[];for(var r in Object(t))Oo.call(t,r)&&r!="constructor"&&e.push(r);return e}var Co=jo,Po=Lt,Io=lt;function Eo(t){return t!=null&&Io(t.length)&&!Po(t)}var fe=Eo,Mo=ue,xo=Co,Do=fe;function zo(t){return Do(t)?Mo(t):xo(t)}var _t=zo,Fo=et,Lo=_t;function No(t,e){return t&&Fo(e,Lo(e),t)}var Ro=No;function Go(t){var e=[];if(t!=null)for(var r in Object(t))e.push(r);return e}var Uo=Go,Ho=H,Bo=dt,ko=Uo,Ko=Object.prototype,qo=Ko.hasOwnProperty;function Vo(t){if(!Ho(t))return ko(t);var e=Bo(t),r=[];for(var n in t)n=="constructor"&&(e||!qo.call(t,n))||r.push(n);return r}var Wo=Vo,Jo=ue,Yo=Wo,Xo=fe;function Zo(t){return Xo(t)?Jo(t,!0):Yo(t)}var pt=Zo,Qo=et,tc=pt;function ec(t,e){return t&&Qo(e,tc(e),t)}var rc=ec,ht={exports:{}};(function(t,e){var r=w,n=e&&!e.nodeType&&e,i=n&&!0&&t&&!t.nodeType&&t,a=i&&i.exports===n,s=a?r.Buffer:void 0,u=s?s.allocUnsafe:void 0;function c(o,l){if(l)return o.slice();var f=o.length,h=u?u(f):new o.constructor(f);return o.copy(h),h}t.exports=c})(ht,ht.exports);function nc(t,e){var r=-1,n=t.length;for(e||(e=Array(n));++r<n;)e[r]=t[r];return e}var ic=nc;function ac(t,e){for(var r=-1,n=t==null?0:t.length,i=0,a=[];++r<n;){var s=t[r];e(s,r,t)&&(a[i++]=s)}return a}var sc=ac;function oc(){return[]}var ge=oc,cc=sc,uc=ge,lc=Object.prototype,fc=lc.propertyIsEnumerable,de=Object.getOwnPropertySymbols,gc=de?function(t){return t==null?[]:(t=Object(t),cc(de(t),function(e){return fc.call(t,e)}))}:uc,yt=gc,dc=et,_c=yt;function pc(t,e){return dc(t,_c(t),e)}var hc=pc;function yc(t,e){for(var r=-1,n=e.length,i=t.length;++r<n;)t[i+r]=e[r];return t}var _e=yc,bc=le,vc=bc(Object.getPrototypeOf,Object),pe=vc,$c=_e,mc=pe,Sc=yt,wc=ge,Tc=Object.getOwnPropertySymbols,Ac=Tc?function(t){for(var e=[];t;)$c(e,Sc(t)),t=mc(t);return e}:wc,he=Ac,Oc=et,jc=he;function Cc(t,e){return Oc(t,jc(t),e)}var Pc=Cc,Ic=_e,Ec=O;function Mc(t,e,r){var n=e(t);return Ec(t)?n:Ic(n,r(t))}var ye=Mc,xc=ye,Dc=yt,zc=_t;function Fc(t){return xc(t,zc,Dc)}var Lc=Fc,Nc=ye,Rc=he,Gc=pt;function Uc(t){return Nc(t,Gc,Rc)}var Hc=Uc,Bc=j,kc=w,Kc=Bc(kc,"DataView"),qc=Kc,Vc=j,Wc=w,Jc=Vc(Wc,"Promise"),Yc=Jc,Xc=j,Zc=w,Qc=Xc(Zc,"Set"),tu=Qc,eu=j,ru=w,nu=eu(ru,"WeakMap"),iu=nu,bt=qc,vt=ct,$t=Yc,mt=tu,St=iu,be=U,z=Rt,ve="[object Map]",au="[object Object]",$e="[object Promise]",me="[object Set]",Se="[object WeakMap]",we="[object DataView]",su=z(bt),ou=z(vt),cu=z($t),uu=z(mt),lu=z(St),C=be;(bt&&C(new bt(new ArrayBuffer(1)))!=we||vt&&C(new vt)!=ve||$t&&C($t.resolve())!=$e||mt&&C(new mt)!=me||St&&C(new St)!=Se)&&(C=function(t){var e=be(t),r=e==au?t.constructor:void 0,n=r?z(r):"";if(n)switch(n){case su:return we;case ou:return ve;case cu:return $e;case uu:return me;case lu:return Se}return e});var wt=C,fu=Object.prototype,gu=fu.hasOwnProperty;function du(t){var e=t.length,r=new t.constructor(e);return e&&typeof t[0]=="string"&&gu.call(t,"index")&&(r.index=t.index,r.input=t.input),r}var _u=du,pu=w,hu=pu.Uint8Array,yu=hu,Te=yu;function bu(t){var e=new t.constructor(t.byteLength);return new Te(e).set(new Te(t)),e}var Tt=bu,vu=Tt;function $u(t,e){var r=e?vu(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.byteLength)}var mu=$u,Su=/\w*$/;function wu(t){var e=new t.constructor(t.source,Su.exec(t));return e.lastIndex=t.lastIndex,e}var Tu=wu,Ae=W,Oe=Ae?Ae.prototype:void 0,je=Oe?Oe.valueOf:void 0;function Au(t){return je?Object(je.call(t)):{}}var Ou=Au,ju=Tt;function Cu(t,e){var r=e?ju(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.length)}var Pu=Cu,Iu=Tt,Eu=mu,Mu=Tu,xu=Ou,Du=Pu,zu="[object Boolean]",Fu="[object Date]",Lu="[object Map]",Nu="[object Number]",Ru="[object RegExp]",Gu="[object Set]",Uu="[object String]",Hu="[object Symbol]",Bu="[object ArrayBuffer]",ku="[object DataView]",Ku="[object Float32Array]",qu="[object Float64Array]",Vu="[object Int8Array]",Wu="[object Int16Array]",Ju="[object Int32Array]",Yu="[object Uint8Array]",Xu="[object Uint8ClampedArray]",Zu="[object Uint16Array]",Qu="[object Uint32Array]";function tl(t,e,r){var n=t.constructor;switch(e){case Bu:return Iu(t);case zu:case Fu:return new n(+t);case ku:return Eu(t,r);case Ku:case qu:case Vu:case Wu:case Ju:case Yu:case Xu:case Zu:case Qu:return Du(t,r);case Lu:return new n;case Nu:case Uu:return new n(t);case Ru:return Mu(t);case Gu:return new n;case Hu:return xu(t)}}var el=tl,rl=H,Ce=Object.create,nl=function(){function t(){}return function(e){if(!rl(e))return{};if(Ce)return Ce(e);t.prototype=e;var r=new t;return t.prototype=void 0,r}}(),il=nl,al=il,sl=pe,ol=dt;function cl(t){return typeof t.constructor=="function"&&!ol(t)?al(sl(t)):{}}var ul=cl,ll=wt,fl=P,gl="[object Map]";function dl(t){return fl(t)&&ll(t)==gl}var _l=dl,pl=_l,hl=gt,Pe=k.exports,Ie=Pe&&Pe.isMap,yl=Ie?hl(Ie):pl,bl=yl,vl=wt,$l=P,ml="[object Set]";function Sl(t){return $l(t)&&vl(t)==ml}var wl=Sl,Tl=wl,Al=gt,Ee=k.exports,Me=Ee&&Ee.isSet,Ol=Me?Al(Me):Tl,jl=Ol,Cl=cs,Pl=ls,Il=se,El=Ro,Ml=rc,xl=ht.exports,Dl=ic,zl=hc,Fl=Pc,Ll=Lc,Nl=Hc,Rl=wt,Gl=_u,Ul=el,Hl=ul,Bl=O,kl=rt.exports,Kl=bl,ql=H,Vl=jl,Wl=_t,Jl=pt,Yl=1,Xl=2,Zl=4,xe="[object Arguments]",Ql="[object Array]",tf="[object Boolean]",ef="[object Date]",rf="[object Error]",De="[object Function]",nf="[object GeneratorFunction]",af="[object Map]",sf="[object Number]",ze="[object Object]",of="[object RegExp]",cf="[object Set]",uf="[object String]",lf="[object Symbol]",ff="[object WeakMap]",gf="[object ArrayBuffer]",df="[object DataView]",_f="[object Float32Array]",pf="[object Float64Array]",hf="[object Int8Array]",yf="[object Int16Array]",bf="[object Int32Array]",vf="[object Uint8Array]",$f="[object Uint8ClampedArray]",mf="[object Uint16Array]",Sf="[object Uint32Array]",d={};d[xe]=d[Ql]=d[gf]=d[df]=d[tf]=d[ef]=d[_f]=d[pf]=d[hf]=d[yf]=d[bf]=d[af]=d[sf]=d[ze]=d[of]=d[cf]=d[uf]=d[lf]=d[vf]=d[$f]=d[mf]=d[Sf]=!0,d[rf]=d[De]=d[ff]=!1;function nt(t,e,r,n,i,a){var s,u=e&Yl,c=e&Xl,o=e&Zl;if(r&&(s=i?r(t,n,i,a):r(t)),s!==void 0)return s;if(!ql(t))return t;var l=Bl(t);if(l){if(s=Gl(t),!u)return Dl(t,s)}else{var f=Rl(t),h=f==De||f==nf;if(kl(t))return xl(t,u);if(f==ze||f==xe||h&&!i){if(s=c||h?{}:Hl(t),!u)return c?Fl(t,Ml(s,t)):zl(t,El(s,t))}else{if(!d[f])return i?t:{};s=Ul(t,f,u)}}a||(a=new Cl);var T=a.get(t);if(T)return T;a.set(t,s),Vl(t)?t.forEach(function(m){s.add(nt(m,e,r,m,t,a))}):Kl(t)&&t.forEach(function(m,S){s.set(S,nt(m,e,r,S,t,a))});var R=o?c?Nl:Ll:c?Jl:Wl,A=l?void 0:R(t);return Pl(A||t,function(m,S){A&&(S=m,m=t[S]),Il(s,S,nt(m,e,r,S,t,a))}),s}var Fe=nt,wf=Fe,Tf=1,Af=4;function Of(t){return wf(t,Tf|Af)}var At=Of;let jf=1,Cf=null;class F{constructor(e=jf,r=Cf){g(this,"page");g(this,"limit");g(this,"term");g(this,"filters");g(this,"ids");g(this,"queries");g(this,"associations");g(this,"postFilter");g(this,"sortings");g(this,"aggregations");g(this,"grouping");g(this,"fields");g(this,"groupFields");g(this,"totalCountMode");g(this,"includes");this.page=e,this.limit=r,this.term=null,this.filters=[],this.includes=null,this.ids=[],this.queries=[],this.associations=[],this.postFilter=[],this.sortings=[],this.aggregations=[],this.grouping=[],this.groupFields=[],this.fields=[],this.totalCountMode=1}static fromCriteria(e){return At(e)}parse(){const e={};return this.ids.length>0&&(e.ids=this.ids.join("|")),this.page!==null&&(e.page=this.page),this.limit!==null&&(e.limit=this.limit),this.term!==null&&(e.term=this.term),this.queries.length>0&&(e.query=this.queries),this.filters.length>0&&(e.filter=this.filters),this.postFilter.length>0&&(e["post-filter"]=this.postFilter),this.sortings.length>0&&(e.sort=this.sortings),this.aggregations.length>0&&(e.aggregations=this.aggregations),this.groupFields.length>0&&(e.groupFields=this.groupFields),this.grouping.length>0&&(e.grouping=this.grouping),this.fields.length>0&&(e.fields=this.fields),this.associations.length>0&&(e.associations={},this.associations.forEach(r=>{!e.associations||(e.associations[r.association]=r.criteria.parse())})),this.includes!==null&&(e.includes=this.includes),this.totalCountMode!==null&&(e["total-count-mode"]=this.totalCountMode),e}setIds(e){return this.ids=e,this}setTotalCountMode(e){return typeof e!="number"&&(this.totalCountMode=null),this.totalCountMode=e<0||e>2?null:e,this}setPage(e){return this.page=e,this}setLimit(e){return this.limit=e,this}setTerm(e){return this.term=e,this}addFilter(e){return this.filters.push(e),this}addIncludes(e){return Object.entries(e).forEach(([r,n])=>{this.includes===null&&(this.includes={}),this.includes[r]||(this.includes[r]=[]),this.includes[r].push(...n)}),this}addPostFilter(e){return this.postFilter.push(e),this}addSorting(e){return this.sortings.push(e),this}addQuery(e,r,n=null){const i={score:r,query:e};return n&&(i[n]=n),this.queries.push(i),this}addGroupField(e){return this.groupFields.push(e),this}addGrouping(e){return this.grouping.push(e),this}addFields(...e){return this.fields.push(...e),this}addAggregation(e){return this.aggregations.push(e),this}addAssociation(e){const r=e.split(".");let n=this;return r.forEach(i=>{n=n.getAssociation(i)}),this}getAssociation(e){const r=e.split(".");let n=this;return r.forEach(i=>{n.hasAssociation(i)||n.associations.push({association:i,criteria:new F(null,null)}),n=n.getAssociationCriteria(i)}),n}getAssociationCriteria(e){let r=null;return this.associations.forEach(n=>{n.association===e&&(r=n.criteria)}),r}getLimit(){var e;return(e=this.limit)!=null?e:0}getPage(){var e;return(e=this.page)!=null?e:0}getCriteriaData(){return{page:this.page,limit:this.limit,term:this.term,filters:this.filters,ids:this.ids,queries:this.queries,associations:this.associations,postFilter:this.postFilter,sortings:this.sortings,aggregations:this.aggregations,grouping:this.grouping,fields:this.fields,groupFields:this.groupFields,totalCountMode:this.totalCountMode,includes:this.includes}}hasAssociation(e){return this.associations.some(r=>r.association===e)}resetSorting(){this.sortings=[]}static avg(e,r){return{type:"avg",name:e,field:r}}static count(e,r){return{type:"count",name:e,field:r}}static max(e,r){return{type:"max",name:e,field:r}}static min(e,r){return{type:"min",name:e,field:r}}static stats(e,r){return{type:"stats",name:e,field:r}}static sum(e,r){return{type:"sum",name:e,field:r}}static terms(e,r,n=null,i=null,a=null){return{type:"terms",name:e,field:r,limit:n,sort:i,aggregation:a}}static filter(e,r,n){return{type:"filter",name:e,filter:r,aggregation:n}}static histogram(e,r,n,i,a,s){return{type:"histogram",name:e,field:r,interval:n,format:i,aggregation:a,timeZone:s}}static sort(e,r="ASC",n=!1){return{field:e,order:r,naturalSorting:n}}static naturalSorting(e,r="ASC"){return{field:e,order:r,naturalSorting:!0}}static countSorting(e,r="ASC"){return{field:e,order:r,naturalSorting:!1,type:"count"}}static contains(e,r){return{type:"contains",field:e,value:r}}static prefix(e,r){return{type:"prefix",field:e,value:r}}static suffix(e,r){return{type:"suffix",field:e,value:r}}static equalsAny(e,r){return{type:"equalsAny",field:e,value:r.join("|")}}static range(e,r){return{type:"range",field:e,parameters:r}}static equals(e,r){return{type:"equals",field:e,value:r}}static not(e,r=[]){return{type:"not",operator:e,queries:r}}static multi(e,r=[]){return{type:"multi",operator:e,queries:r}}}const Pf=()=>({name:"criteria",serialize:({value:t,customizerMethod:e})=>{if(t instanceof F)return{__type__:"__Criteria__",data:e(t.getCriteriaData())}},deserialize:({value:t,customizerMethod:e})=>{if(B("__Criteria__",t)&&typeof t.data=="object"){const r=t.data,n=new F;return n.setPage(r.page),n.setLimit(r.limit),n.setTerm(r.term),r.filters.forEach(i=>{n.addFilter(i)}),n.setIds(r.ids),r.queries.forEach(({query:i,score:a})=>{n.addQuery(i,a)}),r.associations.forEach(i=>{n.associations.push(e(i))}),r.postFilter.forEach(i=>{n.addPostFilter(i)}),r.sortings.forEach(i=>{n.addSorting(i)}),r.aggregations.forEach(i=>{n.addAggregation(i)}),r.grouping.forEach(i=>{n.addGrouping(i)}),r.fields.forEach(i=>{n.addFields(i)}),r.groupFields.forEach(i=>{n.addGroupField(i)}),r.includes&&n.addIncludes(r.includes),n.setTotalCountMode(r.totalCountMode),n}}});let If=(t,e,r)=>{t[e]=r};class Ef{constructor(e,r,n,i={}){g(this,"id");g(this,"_origin");g(this,"_entityName");g(this,"_draft");g(this,"_isDirty");g(this,"_isNew");var s,u;this.id=e,this._origin=i.originData?At(i.originData):At(n),this._entityName=r,this._draft=n,this._isDirty=(s=i.isDirty)!=null?s:!1,this._isNew=(u=i.isNew)!=null?u:!1;const a=this;return new Proxy(this._draft,{get(c,o){return o in a._draft?a._draft[o]:a[o]},set(c,o,l){return If(a._draft,o,l),a._isDirty=!0,!0}})}markAsNew(){this._isNew=!0}isNew(){return this._isNew}getIsDirty(){return this._isDirty}getOrigin(){return this._origin}getDraft(){return this._draft}getEntityName(){return this._entityName}}const Le=function(e,r,n,i){return new Ef(e,r,n,i)},Mf=()=>({name:"entity",serialize:({value:t,customizerMethod:e})=>{if(!(!Q(t)||typeof t.getDraft!="function"))return{__type__:"__Entity__",__id__:t.id,__entityName__:t._entityName,__isDirty__:t._isDirty,__isNew__:t._isNew,__origin__:e(t._origin),__draft__:e(t._draft)}},deserialize:({value:t,customizerMethod:e})=>{if(B("__Entity__",t)&&typeof t.__origin__=="object")return new Le(t.__id__,t.__entityName__,e(t.__draft__),{originData:e(t.__origin__),isDirty:t.__isDirty__,isNew:t.__isNew__})}});class L extends Array{constructor(e,r,n,i=null,a=[],s=null,u=null){super();g(this,"entity");g(this,"source");g(this,"context");g(this,"criteria");g(this,"aggregations");g(this,"total");g(this,"first");g(this,"last");g(this,"remove");g(this,"has");g(this,"get");g(this,"getAt");g(this,"getIds");g(this,"add");g(this,"addAt");g(this,"moveItem");this.entity=r,this.source=e,this.context=n,this.criteria=i,this.aggregations=u,this.total=s,this.push(...a),this.first=function(){return this.length<=0?null:this[0]},this.last=function(){return this.length<=0?null:this[this.length-1]},this.remove=function(o){const l=this.findIndex(f=>f.id===o);return l<0?!1:(this.splice(l,1),!0)},this.has=function(o){return this.some(l=>l.id===o)},this.get=function(o){const l=this.find(f=>f.id===o);return typeof l!="undefined"?l:null},this.getAt=function(o){const l=this[o];return typeof l!="undefined"?l:null},this.getIds=function(){return this.map(o=>o.id)},this.add=function(o){this.push(o)},this.addAt=function(o,l){if(typeof l=="undefined"){this.add(o);return}this.splice(l,0,o)},this.moveItem=function(o,l=null){if(l===null&&(l=this.length),o<0||o>=this.length)return null;if(l===o)return this.getAt(o);const f=this.find((R,A)=>A===o);if(typeof f=="undefined")return null;const h=this.filter((R,A)=>A!==o),T=[...h.slice(0,l),f,...h.slice(l)];return this.splice(0,this.length,...T),f},this.filter=function(o,l){const f=Object.getPrototypeOf(this).filter.call(this,o,l);return new L(this.source,this.entity,this.context,this.criteria,f,this.total,this.aggregations)}}static fromCollection(e){return new L(e.source,e.entity,e.context,e.criteria===null?e.criteria:F.fromCriteria(e.criteria),e,e.total,e.aggregations)}}const xf=()=>({name:"entity-collection",serialize:({value:t,customizerMethod:e})=>{if(t instanceof L)return e({__type__:"__EntityCollection__",__source__:t.source,__entityName__:t.entity,__context__:t.context,__criteria__:t.criteria,__entities__:Array.from(t),__total__:t.total,__aggregations__:t.aggregations})},deserialize:({value:t,customizerMethod:e})=>{if(B("__EntityCollection__",t))return new L(t.__source__,t.__entityName__,t.__context__,e(t.__criteria__),e(t.__entities__),t.__total__,t.__aggregations__)}});class K extends Error{constructor(e,r){super(e);g(this,"code",500);!r||(this.code=r)}toJSON(){return{__type__:"__HandleError__",__code__:this.code,__message__:this.message}}}const Df=()=>({name:"handle-error",serialize:()=>{},deserialize:({value:t})=>{if(B("__HandleError__",t))return new K(t.__message__,t.__code__)}});var zf=Fe,Ff=1,Lf=4;function Nf(t,e){return e=typeof e=="function"?e:void 0,zf(t,Ff|Lf,e)}var Ne=Nf;const Rf=[Pf,xf,Mf,Ga,Df,()=>({name:"handle-error",serialize:()=>{},deserialize:({value:t})=>{if(B("__MissingPrivilegesError__",t))return new x(t.__messageType__,t.__data__)}})];function Gf(t){const e=Rf.map(s=>s(t));function r(){return e}function n(s){var u;return(u=e.find(c=>c.name===s))!=null?u:null}function i(s){return Ne(s,(u,c,o,l)=>{for(const f of e){const h=f.serialize({value:u,key:c,object:o,stack:l,customizerMethod:i});if(h)return h}})}function a(s,u){return Ne(s,(c,o,l,f)=>{for(const h of e){const T=h.deserialize({value:c,key:o,object:l,stack:f,event:u,customizerMethod:a});if(T)return T}})}return{getSerializers:r,getSerializerByName:n,serialize:i,deserialize:a}}function Uf(t,e){if(typeof e=="string")return new K(e);if(!(e instanceof Error))return new K("An unknown error occurred.");if(Fa(e,"response.data.errors.0.code")&&e.response.data.errors.length){const r=e.response.data.errors.filter(i=>i.code==="FRAMEWORK__MISSING_PRIVILEGE_ERROR"),n=[];return r.forEach(i=>{const a=JSON.parse(i.detail);n.push(...a.missingPrivileges)}),n.length?new x(t,n):new K(e.response.data.errors[0].code,e.response.data.errors[0].status)}return new K(e.message)}function Ot({serializedData:t,origin:e,type:r,privilegesToCheck:n=[]}){const i=ne(e);if(!i)return null;const a=[];return te(t,(s,u,c)=>{if(u==="__type__"&&["__EntityCollection__","__Entity__"].includes(c)){const o=s.__entityName__;[...n].sort().forEach(l=>{const f=i.permissions[l];(!f||!f.includes(o))&&a.push(`${l}:${o}`)})}}),a.length>0?new x(r,a):null}const{serialize:q,deserialize:Re}=Gf({handle:N,send:$});let Ge={};const jt=new Set;function $(t,e,r,n){const i=La(t);if(i!==null){const h=new x(t,i);return Promise.reject(h)}const a=Qt(),s=e!=null?e:{};let c=q({_type:t,_data:s,_callbackId:a});if(n){const h=Ot({serializedData:c,origin:n,privilegesToCheck:["read"],type:t});h&&(["datasetSubscribe","datasetUpdate","datasetRegistration","datasetGet"].includes(c._type)?c=q({_type:c._type,_callbackId:c._callbackId,_data:{id:c._data.id,data:h}}):c=q({_type:c._type,_callbackId:c._callbackId,_data:h}))}const o=JSON.stringify(c);let l=!1;const f=7e3;return new Promise((h,T)=>{const R=function(S){if(typeof S.data!="string"||S.data.indexOf(`"_callbackId":"${a}"`)===-1)return;let at;try{at=JSON.parse(S.data)}catch{return}if(!Kf(at)||!at.hasOwnProperty("_response"))return;const kg=Re(at,S);if(window.removeEventListener("message",R),!l){l=!0;const Pt=kg._response;if(Pt instanceof Error){T(Pt);return}h(Pt)}};window.addEventListener("message",R);let A=!0;try{A=!window.parent.origin}catch{}let m=A?document.referrer:window.parent.origin;n&&(m=n),r?r.postMessage(o,m):window.parent.postMessage(o,m),setTimeout(()=>{l||T("Send timeout expired. It could be possible that no handler for the postMessage request exists or that the handler freezed.")},f)})}function N(t,e){const r=async function(n){var l;if(ft[t]&&Object.keys(ft[t]).length&&(!Ge||Na(t,n.origin)!==null)||typeof n.data!="string"||n.data.indexOf(`"_type":"${t}"`)===-1)return;let i;try{i=JSON.parse(n.data)}catch{return}if(!kf(i))return;const a=Re(i,n),s=await Promise.resolve((()=>{const f=Ot({serializedData:i,origin:n.origin,type:t,privilegesToCheck:["create","delete","update","read"]});return f||e(a._data,{_event_:n})})()).catch(f=>Uf(t,f)),u={_callbackId:a._callbackId,_type:a._type,_response:s!=null?s:null},c=(()=>{let f=q(u);const h=Ot({serializedData:f,origin:n.origin,privilegesToCheck:["read"],type:t});return h&&(f._response=h,f=q(f)),f})(),o=JSON.stringify(c);n.source?n.source.postMessage(o,{targetOrigin:(l=n.origin)!=null?l:"*"}):window.postMessage(o,window.origin)};return window.addEventListener("message",r),()=>window.removeEventListener("message",r)}function Hf(t,e){[...jt].forEach(({source:r,origin:n})=>$(t,e,r,n).catch(()=>{}))}function Ct(t,e){return N(t,e)}function p(t,e){return r=>$(t,Et(Et({},e),r))}function Bf(t){return e=>N(t,e)}function Ue(t){return(e,r)=>r?Ct(t,i=>{i.id===r&&e(i)}):Ct(t,e)}const it=new Map;(async()=>{N("__registerWindow__",(t,e)=>{let r,n;e._event_.source?(r=e._event_.source,n=e._event_.origin):(r=window,n=window.origin),jt.add({source:r,origin:n}),it.forEach((i,a)=>{$("datasetSubscribe",{id:a,data:i},r,n).catch(()=>{})})}),N("datasetRegistration",t=>(it.set(t.id,t.data),Hf("datasetSubscribe",t),{id:t.id,data:t.data})),N("datasetSubscribe",t=>{var e;return(e=it.get(t.id))!=null?e:null}),await $("__registerWindow__",{})})().catch(t=>console.error(t)),window._swsdk={sourceRegistry:jt,datasets:it};function kf(t){const e=t;return!!e._type&&!!e._data&&!!e._callbackId}function Kf(t){const e=t;return!!e._type&&!!e.hasOwnProperty("_response")&&!!e._callbackId}const qf=p("windowRedirect"),Vf=p("windowRouterPush"),Wf=p("windowReload",{});var Jf=Object.freeze(Object.defineProperty({__proto__:null,redirect:qf,routerPush:Vf,reload:Wf},Symbol.toStringTag,{value:"Module"}));const Yf=p("notificationDispatch");var Xf=Object.freeze(Object.defineProperty({__proto__:null,dispatch:Yf},Symbol.toStringTag,{value:"Module"}));const Zf=p("contextLanguage",{}),Qf=Ue("contextLanguage"),tg=p("contextEnvironment",{}),eg=p("contextLocale",{}),rg=Ue("contextLocale"),ng=p("contextCurrency",{}),ig=p("contextShopwareVersion",{}),ag=p("contextAppInformation",{}),sg=p("contextModuleInformation",{});var og=Object.freeze(Object.defineProperty({__proto__:null,getLanguage:Zf,subscribeLanguage:Qf,getEnvironment:tg,getLocale:eg,subscribeLocale:rg,getCurrency:ng,getShopwareVersion:ig,getAppInformation:ag,getModuleInformation:sg},Symbol.toStringTag,{value:"Module"}));const cg=p("uiComponentSectionRenderer",{src:(ke=za())!=null?ke:void 0});var ug=Object.freeze(Object.defineProperty({__proto__:null,add:cg},Symbol.toStringTag,{value:"Module"})),lg=t=>({addTabItem:p("uiTabsAddTabItem",{positionId:t})});const fg=p("cmsRegisterElement");var gg=Object.freeze(Object.defineProperty({__proto__:null,registerCmsElement:fg},Symbol.toStringTag,{value:"Module"}));const dg=t=>tt()===t,_g=()=>{var t;return(t=tt())!=null?t:""},pg=()=>window!==window.parent,He=t=>{if(t)return $("locationUpdateHeight",{height:t,locationId:tt()});const e=document.documentElement.offsetHeight;return $("locationUpdateHeight",{height:e,locationId:tt()})};let V=null;var hg=Object.freeze(Object.defineProperty({__proto__:null,is:dg,get:_g,isIframe:pg,updateHeight:He,startAutoResizer:()=>{V=new ResizeObserver(()=>{He()}),V.observe(document.body)},stopAutoResizer:()=>{V&&(V.unobserve(document.body),V.disconnect())},MAIN_HIDDEN:"sw-main-hidden"},Symbol.toStringTag,{value:"Module"}));const yg=p("menuItemAdd");var bg=Object.freeze(Object.defineProperty({__proto__:null,addMenuItem:yg},Symbol.toStringTag,{value:"Module"}));const vg=p("settingsItemAdd");var $g=Object.freeze(Object.defineProperty({__proto__:null,addSettingsItem:vg},Symbol.toStringTag,{value:"Module"}));const mg=p("mainModuleAdd");var Sg=Object.freeze(Object.defineProperty({__proto__:null,addMainModule:mg},Symbol.toStringTag,{value:"Module"}));const wg=p("uiModulePaymentOverviewCard");var Tg=Object.freeze(Object.defineProperty({__proto__:null,add:wg},Symbol.toStringTag,{value:"Module"})),Ag=Object.freeze(Object.defineProperty({__proto__:null,overviewCard:Tg},Symbol.toStringTag,{value:"Module"})),Og=Object.freeze(Object.defineProperty({__proto__:null,payment:Ag},Symbol.toStringTag,{value:"Module"}));const jg=p("uiModalOpen"),Cg=p("uiModalClose");var Pg=Object.freeze(Object.defineProperty({__proto__:null,open:jg,close:Cg},Symbol.toStringTag,{value:"Module"}));const Ig=p("actionButtonAdd");var Eg=Object.freeze(Object.defineProperty({__proto__:null,add:Ig},Symbol.toStringTag,{value:"Module"}));const Mg=p("actionExecute");var xg=Object.freeze(Object.defineProperty({__proto__:null,actionExecute:Mg},Symbol.toStringTag,{value:"Module"})),Dg=t=>({search:(e,r)=>$("repositorySearch",{entityName:t,context:r,criteria:e}),get:(e,r,n)=>$("repositoryGet",{entityName:t,id:e,context:r,criteria:n}),save:(e,r)=>$("repositorySave",{entityName:t,entity:e,context:r}),clone:(e,r,n)=>$("repositoryClone",{entityName:t,entityId:e,context:r,behavior:n}),hasChanges:e=>$("repositoryHasChanges",{entityName:t,entity:e}),saveAll:(e,r)=>$("repositorySaveAll",{entityName:t,entities:e,context:r}),delete:(e,r)=>$("repositoryDelete",{entityName:t,entityId:e,context:r}),create:(e,r)=>$("repositoryCreate",{entityName:t,entityId:r,context:e})});function Be(t){return(e,r)=>Ct(t,i=>{if(i&&i.id===e){const a=r(i);a&&a.catch(()=>{})}})}const zg=Be("datasetSubscribe"),Fg=p("datasetGet"),Lg=p("datasetUpdate"),Ng=p("datasetRegistration"),Rg=Be("datasetUpdate"),Gg=Bf("datasetGet");var Ug=Object.freeze(Object.defineProperty({__proto__:null,subscribe:zg,get:Fg,update:Lg,register:Ng,updateSubscriber:Rg,handleGet:Gg,repository:Dg,Classes:{Criteria:F,Entity:Le,EntityCollection:L}},Symbol.toStringTag,{value:"Module"}));const Hg={webhook:xg},Bg={componentSection:ug,tabs:lg,menu:bg,settings:$g,mainModule:Sg,module:Og,modal:Pg,actionButton:Eg};y.app=Hg,y.cms=gg,y.context=og,y.data=Ug,y.location=hg,y.notification=Xf,y.ui=Bg,y.window=Jf,Object.defineProperties(y,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}); |
export declare const is: (location: string) => boolean; | ||
export declare const get: () => string; | ||
export declare const isIframe: () => boolean; | ||
@@ -3,0 +4,0 @@ export declare const updateHeight: (height?: number) => Promise<void | null>; |
@@ -7,2 +7,6 @@ import { send } from '../channel'; | ||
}; | ||
export const get = () => { | ||
var _a; | ||
return (_a = getLocationId()) !== null && _a !== void 0 ? _a : ''; | ||
}; | ||
export const isIframe = () => { | ||
@@ -9,0 +13,0 @@ return window !== window.parent; |
{ | ||
"name": "@shopware-ag/admin-extension-sdk", | ||
"license": "MIT", | ||
"version": "3.0.2", | ||
"version": "3.0.3", | ||
"repository": "git://github.com/shopware/admin-extension-sdk.git", | ||
@@ -6,0 +6,0 @@ "description": "The SDK for App iframes to communicate with the Shopware Administration", |
export declare const is: (location: string) => boolean; | ||
export declare const get: () => string; | ||
export declare const isIframe: () => boolean; | ||
@@ -3,0 +4,0 @@ export declare const updateHeight: (height?: number) => Promise<void | null>; |
@@ -12,3 +12,3 @@ (function (factory) { | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.MAIN_HIDDEN = exports.stopAutoResizer = exports.startAutoResizer = exports.updateHeight = exports.isIframe = exports.is = void 0; | ||
exports.MAIN_HIDDEN = exports.stopAutoResizer = exports.startAutoResizer = exports.updateHeight = exports.isIframe = exports.get = exports.is = void 0; | ||
const channel_1 = require("../channel"); | ||
@@ -21,2 +21,7 @@ const utils_1 = require("../_internals/utils"); | ||
exports.is = is; | ||
const get = () => { | ||
var _a; | ||
return (_a = (0, utils_1.getLocationId)()) !== null && _a !== void 0 ? _a : ''; | ||
}; | ||
exports.get = get; | ||
const isIframe = () => { | ||
@@ -23,0 +28,0 @@ return window !== window.parent; |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
582824
9048