New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@shopware-ag/admin-extension-sdk

Package Overview
Dependencies
Maintainers
8
Versions
71
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@shopware-ag/admin-extension-sdk - npm Package Compare versions

Comparing version 3.0.5 to 3.0.6

2

cdn/index.js

@@ -1,1 +0,1 @@

var qg=Object.defineProperty;var Ke=Object.getOwnPropertySymbols;var Vg=Object.prototype.hasOwnProperty,Wg=Object.prototype.propertyIsEnumerable;var It=(y,b,v)=>b in y?qg(y,b,{enumerable:!0,configurable:!0,writable:!0,value:v}):y[b]=v,Et=(y,b)=>{for(var v in b||(b={}))Vg.call(b,v)&&It(y,v,b[v]);if(Ke)for(var v of Ke(b))Wg.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 B=_r;function pr(t){return t!=null&&typeof t=="object"}var P=pr,hr=B,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 U=Or,jr=B,Cr=U,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 Br(t){if(t!=null){try{return Gr.call(t)}catch{}try{return t+""}catch{}}return""}var Rt=Br,Ur=Lt,Hr=Nr,kr=U,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)||Hr(t))return!1;var e=Ur(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 Bt=Fn,Ln=Bt;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,Bn=Gn.splice;function Un(t){var e=this.__data__,r=Rn(e,t);if(r<0)return!1;var n=e.length-1;return r==n?e.pop():Bn.call(e,r,1),--this.size,!0}var Hn=Un,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=Hn,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,Ut=xn,oi=X,ci=ct;function ui(){this.size=0,this.__data__={hash:new Ut,map:new(ci||oi),string:new Ut}}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 Ht=M,kt=Ht,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,Bi=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}),Ui=Bi;function Hi(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=Hi,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=Ui,ra=Zi;function na(t,e){return Qi(t)?t:ta(t,e)?[t]:ea(ra(t))}var ia=na,aa=B,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 H(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 Ba=X;function Ua(){this.__data__=new Ba,this.size=0}var Ha=Ua;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=Ht,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=Ha,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=Bt,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=B,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]",Bs="[object String]",Us="[object WeakMap]",Hs="[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]",p={};p[Ks]=p[qs]=p[Vs]=p[Ws]=p[Js]=p[Ys]=p[Xs]=p[Zs]=p[Qs]=!0,p[Is]=p[Es]=p[Hs]=p[Ms]=p[ks]=p[xs]=p[Ds]=p[zs]=p[Fs]=p[Ls]=p[Ns]=p[Rs]=p[Gs]=p[Bs]=p[Us]=!1;function to(t){return Ps(t)&&Cs(t.length)&&!!p[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 Bo=Go,Uo=U,Ho=dt,ko=Bo,Ko=Object.prototype,qo=Ko.hasOwnProperty;function Vo(t){if(!Uo(t))return ko(t);var e=Ho(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 Bc(t){return Nc(t,Gc,Rc)}var Uc=Bc,Hc=j,kc=w,Kc=Hc(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=B,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]",Bu="[object String]",Uu="[object Symbol]",Hu="[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 Hu: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 Bu:return new n(t);case Ru:return Mu(t);case Gu:return new n;case Uu:return xu(t)}}var el=tl,rl=U,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=Uc,Rl=wt,Gl=_u,Bl=el,Ul=ul,Hl=O,kl=rt.exports,Kl=bl,ql=U,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=Hl(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?{}:Ul(t),!u)return c?Fl(t,Ml(s,t)):zl(t,El(s,t))}else{if(!d[f])return i?t:{};s=Bl(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(H("__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(H("__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(H("__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(H("__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(H("__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 Bf(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=>Bf(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 Uf(t,e){[...jt].forEach(({source:r,origin:n})=>$(t,e,r,n).catch(()=>{}))}function Ct(t,e){return N(t,e)}function _(t,e){return r=>$(t,Et(Et({},e),r))}function Hf(t){return e=>N(t,e)}function Be(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),Uf("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=_("windowRedirect"),Vf=_("windowRouterPush"),Wf=_("windowReload",{});var Jf=Object.freeze(Object.defineProperty({__proto__:null,redirect:qf,routerPush:Vf,reload:Wf},Symbol.toStringTag,{value:"Module"}));const Yf=_("notificationDispatch");var Xf=Object.freeze(Object.defineProperty({__proto__:null,dispatch:Yf},Symbol.toStringTag,{value:"Module"}));const Zf=_("contextLanguage",{}),Qf=Be("contextLanguage"),tg=_("contextEnvironment",{}),eg=_("contextLocale",{}),rg=Be("contextLocale"),ng=_("contextCurrency",{}),ig=_("contextShopwareVersion",{}),ag=_("contextAppInformation",{}),sg=_("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=_("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:_("uiTabsAddTabItem",{positionId:t})});const fg=_("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,Ue=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:Ue,startAutoResizer:()=>{V=new ResizeObserver(()=>{Ue()}),V.observe(document.body)},stopAutoResizer:()=>{V&&(V.unobserve(document.body),V.disconnect())},MAIN_HIDDEN:"sw-main-hidden"},Symbol.toStringTag,{value:"Module"}));const yg=_("menuItemAdd");var bg=Object.freeze(Object.defineProperty({__proto__:null,addMenuItem:yg},Symbol.toStringTag,{value:"Module"}));const vg=_("settingsItemAdd");var $g=Object.freeze(Object.defineProperty({__proto__:null,addSettingsItem:vg},Symbol.toStringTag,{value:"Module"}));const mg=_("mainModuleAdd"),Sg=_("smartBarButtonAdd");var wg=Object.freeze(Object.defineProperty({__proto__:null,addMainModule:mg,addSmartBarButton:Sg},Symbol.toStringTag,{value:"Module"}));const Tg=_("uiModulePaymentOverviewCard");var Ag=Object.freeze(Object.defineProperty({__proto__:null,add:Tg},Symbol.toStringTag,{value:"Module"})),Og=Object.freeze(Object.defineProperty({__proto__:null,overviewCard:Ag},Symbol.toStringTag,{value:"Module"})),jg=Object.freeze(Object.defineProperty({__proto__:null,payment:Og},Symbol.toStringTag,{value:"Module"}));const Cg=_("uiModalOpen"),Pg=_("uiModalClose");var Ig=Object.freeze(Object.defineProperty({__proto__:null,open:Cg,close:Pg},Symbol.toStringTag,{value:"Module"}));const Eg=_("actionButtonAdd");var Mg=Object.freeze(Object.defineProperty({__proto__:null,add:Eg},Symbol.toStringTag,{value:"Module"}));const xg=_("actionExecute");var Dg=Object.freeze(Object.defineProperty({__proto__:null,actionExecute:xg},Symbol.toStringTag,{value:"Module"})),zg=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 He(t){return(e,r)=>Ct(t,i=>{if(i&&i.id===e){const a=r(i);a&&a.catch(()=>{})}})}const Fg=He("datasetSubscribe"),Lg=_("datasetGet"),Ng=_("datasetUpdate"),Rg=_("datasetRegistration"),Gg=He("datasetUpdate"),Bg=Hf("datasetGet");var Ug=Object.freeze(Object.defineProperty({__proto__:null,subscribe:Fg,get:Lg,update:Ng,register:Rg,updateSubscriber:Gg,handleGet:Bg,repository:zg,Classes:{Criteria:F,Entity:Le,EntityCollection:L}},Symbol.toStringTag,{value:"Module"}));const Hg={webhook:Dg},kg={componentSection:ug,tabs:lg,menu:bg,settings:$g,mainModule:wg,module:jg,modal:Ig,actionButton:Mg};y.app=Hg,y.cms=gg,y.context=og,y.data=Ug,y.location=hg,y.notification=Xf,y.ui=kg,y.window=Jf,Object.defineProperties(y,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
var qg=Object.defineProperty;var Ke=Object.getOwnPropertySymbols;var Vg=Object.prototype.hasOwnProperty,Wg=Object.prototype.propertyIsEnumerable;var Pt=(y,b,v)=>b in y?qg(y,b,{enumerable:!0,configurable:!0,writable:!0,value:v}):y[b]=v,It=(y,b)=>{for(var v in b||(b={}))Vg.call(b,v)&&Pt(y,v,b[v]);if(Ke)for(var v of Ke(b))Wg.call(b,v)&&Pt(y,v,b[v]);return y};var g=(y,b,v)=>(Pt(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]",_r="[object Undefined]",Ft=zt?zt.toStringTag:void 0;function dr(t){return t==null?t===void 0?_r:gr:Ft&&Ft in Object(t)?lr(t):fr(t)}var B=dr;function pr(t){return t!=null&&typeof t=="object"}var E=pr,hr=B,yr=E,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 U=Or,jr=B,Cr=U,Er="[object AsyncFunction]",Pr="[object Function]",Ir="[object GeneratorFunction]",Mr="[object Proxy]";function xr(t){if(!Cr(t))return!1;var e=jr(t);return e==Pr||e==Ir||e==Er||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 Br(t){if(t!=null){try{return Gr.call(t)}catch{}try{return t+""}catch{}}return""}var Rt=Br,Ur=Lt,Hr=Nr,kr=U,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)||Hr(t))return!1;var e=Ur(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,_n=J,dn="__lodash_hash_undefined__",pn=Object.prototype,hn=pn.hasOwnProperty;function yn(t){var e=this.__data__;if(_n){var r=e[t];return r===dn?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,En=gn,Pn=bn,In=wn,Mn=jn;function P(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])}}P.prototype.clear=Cn,P.prototype.delete=En,P.prototype.get=Pn,P.prototype.has=In,P.prototype.set=Mn;var xn=P;function Dn(){this.__data__=[],this.size=0}var zn=Dn;function Fn(t,e){return t===e||t!==t&&e!==e}var Bt=Fn,Ln=Bt;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,Bn=Gn.splice;function Un(t){var e=this.__data__,r=Rn(e,t);if(r<0)return!1;var n=e.length-1;return r==n?e.pop():Bn.call(e,r,1),--this.size,!0}var Hn=Un,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=Hn,ei=qn,ri=Jn,ni=Zn;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=Qn,I.prototype.delete=ti,I.prototype.get=ei,I.prototype.has=ri,I.prototype.set=ni;var X=I,ii=j,ai=w,si=ii(ai,"Map"),ct=si,Ut=xn,oi=X,ci=ct;function ui(){this.size=0,this.__data__={hash:new Ut,map:new(ci||oi),string:new Ut}}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,_i=gi;function di(t,e){var r=t.__data__;return _i(e)?r[typeof e=="string"?"string":"hash"]:r.map}var Z=di,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,Ei=$i,Pi=wi,Ii=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=Ei,M.prototype.has=Pi,M.prototype.set=Ii;var Ht=M,kt=Ht,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,Bi=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}),Ui=Bi;function Hi(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=Hi,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=Ui,ra=Zi;function na(t,e){return Qi(t)?t:ta(t,e)?[t]:ea(ra(t))}var ia=na,aa=B,sa=E,oa="[object Arguments]";function ca(t){return sa(t)&&aa(t)==oa}var ua=ca,Jt=ua,la=E,Yt=Object.prototype,fa=Yt.hasOwnProperty,ga=Yt.propertyIsEnumerable,_a=Jt(function(){return arguments}())?Jt:function(t){return la(t)&&fa.call(t,"callee")&&!ga.call(t,"callee")},Xt=_a,da=9007199254740991,pa=/^(?:0|[1-9]\d*)$/;function ha(t,e){var r=typeof t;return e=e==null?da: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 Ea(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 Pa=Ea,Ia=We,Ma=Pa;function xa(t,e){return t!=null&&Ma(t,e,Ia)}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 H(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 Ba=X;function Ua(){this.__data__=new Ba,this.size=0}var Ha=Ua;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=Ht,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=Ha,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{}}(),_s=gs,ie=_s;function ds(t,e,r){e=="__proto__"&&ie?ie(t,e,{configurable:!0,enumerable:!0,value:r,writable:!0}):t[e]=r}var ae=ds,ps=ae,hs=Bt,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=B,Cs=lt,Es=E,Ps="[object Arguments]",Is="[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]",Bs="[object String]",Us="[object WeakMap]",Hs="[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]",p={};p[Ks]=p[qs]=p[Vs]=p[Ws]=p[Js]=p[Ys]=p[Xs]=p[Zs]=p[Qs]=!0,p[Ps]=p[Is]=p[Hs]=p[Ms]=p[ks]=p[xs]=p[Ds]=p[zs]=p[Fs]=p[Ls]=p[Ns]=p[Rs]=p[Gs]=p[Bs]=p[Us]=!1;function to(t){return Es(t)&&Cs(t.length)&&!!p[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 _t=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=_t,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,Eo=Lt,Po=lt;function Io(t){return t!=null&&Po(t.length)&&!Eo(t)}var fe=Io,Mo=ue,xo=Co,Do=fe;function zo(t){return Do(t)?Mo(t):xo(t)}var dt=zo,Fo=et,Lo=dt;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 Bo=Go,Uo=U,Ho=_t,ko=Bo,Ko=Object.prototype,qo=Ko.hasOwnProperty;function Vo(t){if(!Uo(t))return ko(t);var e=Ho(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,_e=Object.getOwnPropertySymbols,gc=_e?function(t){return t==null?[]:(t=Object(t),cc(_e(t),function(e){return fc.call(t,e)}))}:uc,yt=gc,_c=et,dc=yt;function pc(t,e){return _c(t,dc(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 de=yc,bc=le,vc=bc(Object.getPrototypeOf,Object),pe=vc,$c=de,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 Ec=Cc,Pc=de,Ic=O;function Mc(t,e,r){var n=e(t);return Ic(t)?n:Pc(n,r(t))}var ye=Mc,xc=ye,Dc=yt,zc=dt;function Fc(t){return xc(t,zc,Dc)}var Lc=Fc,Nc=ye,Rc=he,Gc=pt;function Bc(t){return Nc(t,Gc,Rc)}var Uc=Bc,Hc=j,kc=w,Kc=Hc(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=B,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 _u(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 du=_u,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 Eu=Cu,Pu=Tt,Iu=mu,Mu=Tu,xu=Ou,Du=Eu,zu="[object Boolean]",Fu="[object Date]",Lu="[object Map]",Nu="[object Number]",Ru="[object RegExp]",Gu="[object Set]",Bu="[object String]",Uu="[object Symbol]",Hu="[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 Hu:return Pu(t);case zu:case Fu:return new n(+t);case ku:return Iu(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 Bu:return new n(t);case Ru:return Mu(t);case Gu:return new n;case Uu:return xu(t)}}var el=tl,rl=U,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=_t;function cl(t){return typeof t.constructor=="function"&&!ol(t)?al(sl(t)):{}}var ul=cl,ll=wt,fl=E,gl="[object Map]";function _l(t){return fl(t)&&ll(t)==gl}var dl=_l,pl=dl,hl=gt,Ee=k.exports,Pe=Ee&&Ee.isMap,yl=Pe?hl(Pe):pl,bl=yl,vl=wt,$l=E,ml="[object Set]";function Sl(t){return $l(t)&&vl(t)==ml}var wl=Sl,Tl=wl,Al=gt,Ie=k.exports,Me=Ie&&Ie.isSet,Ol=Me?Al(Me):Tl,jl=Ol,Cl=cs,El=ls,Pl=se,Il=Ro,Ml=rc,xl=ht.exports,Dl=ic,zl=hc,Fl=Ec,Ll=Lc,Nl=Uc,Rl=wt,Gl=du,Bl=el,Ul=ul,Hl=O,kl=rt.exports,Kl=bl,ql=U,Vl=jl,Wl=dt,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]",_f="[object DataView]",df="[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]",_={};_[xe]=_[Ql]=_[gf]=_[_f]=_[tf]=_[ef]=_[df]=_[pf]=_[hf]=_[yf]=_[bf]=_[af]=_[sf]=_[ze]=_[of]=_[cf]=_[uf]=_[lf]=_[vf]=_[$f]=_[mf]=_[Sf]=!0,_[rf]=_[De]=_[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=Hl(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?{}:Ul(t),!u)return c?Fl(t,Ml(s,t)):zl(t,Il(s,t))}else{if(!_[f])return i?t:{};s=Bl(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 El(A||t,function(m,S){A&&(S=m,m=t[S]),Pl(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 Ef=()=>({name:"criteria",serialize:({value:t,customizerMethod:e})=>{if(t instanceof F)return{__type__:"__Criteria__",data:e(t.getCriteriaData())}},deserialize:({value:t,customizerMethod:e})=>{if(H("__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 Pf=(t,e,r)=>{t[e]=r};class If{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 Pf(a._draft,o,l),a._isDirty=!0,!0}})}__identifier__(){return"Entity"}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 If(e,r,n,i)},Mf=()=>({name:"entity",serialize:({value:t,customizerMethod:e})=>{if(!(!Q(t)||typeof t.__identifier__!="function"||t.__identifier__()!=="Entity"))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(H("__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");g(this,"__identifier__");this.entity=r,this.source=e,this.context=n,this.criteria=i,this.aggregations=u,this.total=s,this.push(...a),this.__identifier__=()=>"EntityCollection",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||(t==null?void 0:t.__identifier__)&&t.__identifier__()==="EntityCollection")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(H("__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(H("__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=[Ef,xf,Mf,Ga,Df,()=>({name:"handle-error",serialize:()=>{},deserialize:({value:t})=>{if(H("__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 Bf(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 Et=Kg._response;if(Et instanceof Error){T(Et);return}h(Et)}};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=>Bf(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 Uf(t,e){[...jt].forEach(({source:r,origin:n})=>$(t,e,r,n).catch(()=>{}))}function Ct(t,e){return N(t,e)}function d(t,e){return r=>$(t,It(It({},e),r))}function Hf(t){return e=>N(t,e)}function Be(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),Uf("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=d("windowRedirect"),Vf=d("windowRouterPush"),Wf=d("windowReload",{});var Jf=Object.freeze(Object.defineProperty({__proto__:null,redirect:qf,routerPush:Vf,reload:Wf},Symbol.toStringTag,{value:"Module"}));const Yf=d("notificationDispatch");var Xf=Object.freeze(Object.defineProperty({__proto__:null,dispatch:Yf},Symbol.toStringTag,{value:"Module"}));const Zf=d("contextLanguage",{}),Qf=Be("contextLanguage"),tg=d("contextEnvironment",{}),eg=d("contextLocale",{}),rg=Be("contextLocale"),ng=d("contextCurrency",{}),ig=d("contextShopwareVersion",{}),ag=d("contextAppInformation",{}),sg=d("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=d("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:d("uiTabsAddTabItem",{positionId:t})});const fg=d("cmsRegisterElement");var gg=Object.freeze(Object.defineProperty({__proto__:null,registerCmsElement:fg},Symbol.toStringTag,{value:"Module"}));const _g=t=>tt()===t,dg=()=>{var t;return(t=tt())!=null?t:""},pg=()=>window!==window.parent,Ue=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:_g,get:dg,isIframe:pg,updateHeight:Ue,startAutoResizer:()=>{V=new ResizeObserver(()=>{Ue()}),V.observe(document.body)},stopAutoResizer:()=>{V&&(V.unobserve(document.body),V.disconnect())},MAIN_HIDDEN:"sw-main-hidden"},Symbol.toStringTag,{value:"Module"}));const yg=d("menuItemAdd");var bg=Object.freeze(Object.defineProperty({__proto__:null,addMenuItem:yg},Symbol.toStringTag,{value:"Module"}));const vg=d("settingsItemAdd");var $g=Object.freeze(Object.defineProperty({__proto__:null,addSettingsItem:vg},Symbol.toStringTag,{value:"Module"}));const mg=d("mainModuleAdd"),Sg=d("smartBarButtonAdd");var wg=Object.freeze(Object.defineProperty({__proto__:null,addMainModule:mg,addSmartBarButton:Sg},Symbol.toStringTag,{value:"Module"}));const Tg=d("uiModulePaymentOverviewCard");var Ag=Object.freeze(Object.defineProperty({__proto__:null,add:Tg},Symbol.toStringTag,{value:"Module"})),Og=Object.freeze(Object.defineProperty({__proto__:null,overviewCard:Ag},Symbol.toStringTag,{value:"Module"})),jg=Object.freeze(Object.defineProperty({__proto__:null,payment:Og},Symbol.toStringTag,{value:"Module"}));const Cg=d("uiModalOpen"),Eg=d("uiModalClose");var Pg=Object.freeze(Object.defineProperty({__proto__:null,open:Cg,close:Eg},Symbol.toStringTag,{value:"Module"}));const Ig=d("actionButtonAdd");var Mg=Object.freeze(Object.defineProperty({__proto__:null,add:Ig},Symbol.toStringTag,{value:"Module"}));const xg=d("actionExecute");var Dg=Object.freeze(Object.defineProperty({__proto__:null,actionExecute:xg},Symbol.toStringTag,{value:"Module"})),zg=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 He(t){return(e,r)=>Ct(t,i=>{if(i&&i.id===e){const a=r(i);a&&a.catch(()=>{})}})}const Fg=He("datasetSubscribe"),Lg=d("datasetGet"),Ng=d("datasetUpdate"),Rg=d("datasetRegistration"),Gg=He("datasetUpdate"),Bg=Hf("datasetGet");var Ug=Object.freeze(Object.defineProperty({__proto__:null,subscribe:Fg,get:Lg,update:Ng,register:Rg,updateSubscriber:Gg,handleGet:Bg,repository:zg,Classes:{Criteria:F,Entity:Le,EntityCollection:L}},Symbol.toStringTag,{value:"Module"}));const Hg={webhook:Dg},kg={componentSection:ug,tabs:lg,menu:bg,settings:$g,mainModule:wg,module:jg,modal:Pg,actionButton:Mg};y.app=Hg,y.cms=gg,y.context=og,y.data=Ug,y.location=hg,y.notification=Xf,y.ui=kg,y.window=Jf,Object.defineProperties(y,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});

@@ -7,3 +7,3 @@ import { hasType } from '../utils';

serialize: ({ value, customizerMethod }) => {
if (value instanceof EntityCollection) {
if (value instanceof EntityCollection || ((value === null || value === void 0 ? void 0 : value.__identifier__) && value.__identifier__() === 'EntityCollection')) {
return customizerMethod({

@@ -10,0 +10,0 @@ __type__: '__EntityCollection__',

@@ -6,2 +6,3 @@ import EntityCollection from '../../data/_internals/EntityCollection';

import { handle, send } from '../../channel';
import Vue from 'vue';
const { serialize, deserialize } = SerializerFactory({

@@ -12,47 +13,74 @@ handle: handle,

describe('entity-collection-serializer.ts', () => {
it('should convert collections', () => {
var _a, _b;
const collection = new EntityCollection('test',
// @ts-expect-error - we know that this entity does not exist
'jest', {}, new Criteria(), [], 42, ['test', 'foo']);
// @ts-expect-error - we know that this entity does not exist
collection.add(new Entity('1', 'test', {}));
// @ts-expect-error - we know that this entity does not exist
collection.add(new Entity('2', 'test', {}));
const messageData = {
collection,
};
const serializedMessageData = serialize(messageData);
expect(typeof serializedMessageData.collection).toBe('object');
expect(typeof serializedMessageData.collection.getIds).toBe('undefined');
expect(serializedMessageData.collection.hasOwnProperty('__type__')).toBe(true);
expect(serializedMessageData.collection.__type__).toBe('__EntityCollection__');
expect(serializedMessageData.collection.hasOwnProperty('__source__')).toBe(true);
expect(serializedMessageData.collection.__source__).toBe('test');
expect(serializedMessageData.collection.hasOwnProperty('__entityName__')).toBe(true);
expect(serializedMessageData.collection.__entityName__).toBe('jest');
expect(serializedMessageData.collection.hasOwnProperty('__context__')).toBe(true);
expect(typeof serializedMessageData.collection.__context__).toBe('object');
expect(serializedMessageData.collection.hasOwnProperty('__criteria__')).toBe(true);
expect(serializedMessageData.collection.__criteria__ instanceof Criteria).toBe(false);
expect(serializedMessageData.collection.hasOwnProperty('__entities__')).toBe(true);
expect(Array.isArray(serializedMessageData.collection.__entities__)).toBe(true);
expect(serializedMessageData.collection.__entities__.length).toBe(2);
expect(serializedMessageData.collection.__entities__[0].__id__).toBe('1');
expect(serializedMessageData.collection.__entities__[1].__id__).toBe('2');
expect(serializedMessageData.collection.hasOwnProperty('__total__')).toBe(true);
expect(serializedMessageData.collection.__total__).toBe(42);
expect(serializedMessageData.collection.hasOwnProperty('__aggregations__')).toBe(true);
expect(serializedMessageData.collection.__aggregations__).toStrictEqual(['test', 'foo']);
const deserializedMessageData = deserialize(serializedMessageData, new MessageEvent(''));
expect(deserializedMessageData.collection instanceof EntityCollection).toBe(true);
expect(deserializedMessageData.collection.total).toBe(42);
expect(deserializedMessageData.collection.criteria instanceof Criteria).toBe(true);
expect(deserializedMessageData.collection.aggregations).toStrictEqual(['test', 'foo']);
expect(deserializedMessageData.collection.source).toBe('test');
expect(deserializedMessageData.collection.entity).toBe('jest');
expect(typeof ((_a = deserializedMessageData.collection.first()) === null || _a === void 0 ? void 0 : _a.getDraft)).toBe('function');
expect(typeof ((_b = deserializedMessageData.collection.last()) === null || _b === void 0 ? void 0 : _b.getDraft)).toBe('function');
[
{
testName: 'should convert collections',
createMessageData: () => {
const collection = new EntityCollection('test',
// @ts-expect-error - we know that this entity does not exist
'jest', {}, new Criteria(), [], 42, ['test', 'foo']);
// @ts-expect-error - we know that this entity does not exist
collection.add(new Entity('1', 'test', {}));
// @ts-expect-error - we know that this entity does not exist
collection.add(new Entity('2', 'test', {}));
const messageData = {
collection,
};
return messageData;
}
},
{
testName: 'should convert collections even when they are converted with Vue.observable',
createMessageData: () => {
const collection = new EntityCollection('test',
// @ts-expect-error - we know that this entity does not exist
'jest', {}, new Criteria(), [], 42, ['test', 'foo']);
// @ts-expect-error - we know that this entity does not exist
collection.add(new Entity('1', 'test', {}));
// @ts-expect-error - we know that this entity does not exist
collection.add(new Entity('2', 'test', {}));
const observableCollection = Vue.observable(collection);
const messageData = {
collection: observableCollection,
};
return messageData;
}
}
].forEach(({ testName, createMessageData }) => {
it(testName, () => {
var _a, _b;
const messageData = createMessageData();
const serializedMessageData = serialize(messageData);
expect(typeof serializedMessageData.collection).toBe('object');
expect(typeof serializedMessageData.collection.getIds).toBe('undefined');
expect(serializedMessageData.collection.hasOwnProperty('__type__')).toBe(true);
expect(serializedMessageData.collection.__type__).toBe('__EntityCollection__');
expect(serializedMessageData.collection.hasOwnProperty('__source__')).toBe(true);
expect(serializedMessageData.collection.__source__).toBe('test');
expect(serializedMessageData.collection.hasOwnProperty('__entityName__')).toBe(true);
expect(serializedMessageData.collection.__entityName__).toBe('jest');
expect(serializedMessageData.collection.hasOwnProperty('__context__')).toBe(true);
expect(typeof serializedMessageData.collection.__context__).toBe('object');
expect(serializedMessageData.collection.hasOwnProperty('__criteria__')).toBe(true);
expect(serializedMessageData.collection.__criteria__ instanceof Criteria).toBe(false);
expect(serializedMessageData.collection.hasOwnProperty('__entities__')).toBe(true);
expect(Array.isArray(serializedMessageData.collection.__entities__)).toBe(true);
expect(serializedMessageData.collection.__entities__.length).toBe(2);
expect(serializedMessageData.collection.__entities__[0].__id__).toBe('1');
expect(serializedMessageData.collection.__entities__[1].__id__).toBe('2');
expect(serializedMessageData.collection.hasOwnProperty('__total__')).toBe(true);
expect(serializedMessageData.collection.__total__).toBe(42);
expect(serializedMessageData.collection.hasOwnProperty('__aggregations__')).toBe(true);
expect(serializedMessageData.collection.__aggregations__).toStrictEqual(['test', 'foo']);
const deserializedMessageData = deserialize(serializedMessageData, new MessageEvent(''));
expect(deserializedMessageData.collection instanceof EntityCollection).toBe(true);
expect(deserializedMessageData.collection.total).toBe(42);
expect(deserializedMessageData.collection.criteria instanceof Criteria).toBe(true);
expect(deserializedMessageData.collection.aggregations).toStrictEqual(['test', 'foo']);
expect(deserializedMessageData.collection.source).toBe('test');
expect(deserializedMessageData.collection.entity).toBe('jest');
expect(typeof ((_a = deserializedMessageData.collection.first()) === null || _a === void 0 ? void 0 : _a.getDraft)).toBe('function');
expect(typeof ((_b = deserializedMessageData.collection.last()) === null || _b === void 0 ? void 0 : _b.getDraft)).toBe('function');
});
});
});
//# sourceMappingURL=entity-collection-serializer.spec.js.map

@@ -7,3 +7,3 @@ import { isObject, hasType } from '../utils';

serialize: ({ value, customizerMethod }) => {
if (!isObject(value) || typeof value.getDraft !== 'function') {
if (!isObject(value) || typeof value.__identifier__ !== 'function' || value.__identifier__() !== 'Entity') {
return;

@@ -10,0 +10,0 @@ }

@@ -20,2 +20,7 @@ /**

/**
* Identifier method for the entity class. Needed when some reactive data layer (Vue) converts the EntityClass to a
* plain object. With this identifier method we can (de)serialie it back to the correct entity class.
*/
__identifier__(): string;
/**
* Marks the entity as new. New entities will be provided as create request to the server

@@ -22,0 +27,0 @@ */

@@ -77,2 +77,9 @@ import cloneDeep from 'lodash/cloneDeep';

/**
* Identifier method for the entity class. Needed when some reactive data layer (Vue) converts the EntityClass to a
* plain object. With this identifier method we can (de)serialie it back to the correct entity class.
*/
__identifier__() {
return 'Entity';
}
/**
* Marks the entity as new. New entities will be provided as create request to the server

@@ -79,0 +86,0 @@ */

@@ -43,2 +43,3 @@ import Criteria from '../Criteria';

moveItem: (oldIndex: number, newIndex: number) => Entity<EntityName> | null;
__identifier__: () => string;
constructor(source: string, entityName: EntityName, context: ApiContext, criteria?: Criteria | null, entities?: Entity<EntityName>[], total?: number | null, aggregations?: string[] | null);

@@ -45,0 +46,0 @@ /**

@@ -101,2 +101,8 @@ import Criteria from '../Criteria';

});
Object.defineProperty(this, "__identifier__", {
enumerable: true,
configurable: true,
writable: true,
value: void 0
});
this.entity = entityName;

@@ -110,2 +116,9 @@ this.source = source;

/**
* Identifier method for the EntityCollection class. Needed when some reactive data layer (Vue) converts the EntityCollection to a
* plain array. With this identifier method we can (de)serialie it back to the correct EntityCollection.
*/
this.__identifier__ = () => {
return 'EntityCollection';
};
/**
* Returns the first item of the collection.

@@ -112,0 +125,0 @@ * Returns null if the collection is empty

{
"name": "@shopware-ag/admin-extension-sdk",
"license": "MIT",
"version": "3.0.5",
"version": "3.0.6",
"repository": "git://github.com/shopware/admin-extension-sdk.git",

@@ -45,3 +45,3 @@ "description": "The SDK for App iframes to communicate with the Shopware Administration",

"test:watch": "jest --watch",
"e2e": "concurrently --handle-input --kill-others --success first \"npm run dev\" \"wait-on tcp:8181 && wait-on tcp:8182 && playwright test\"",
"e2e": "concurrently --handle-input --kill-others --success first \"npm run dev\" \"wait-on http://127.0.0.1:8181 && wait-on http://127.0.0.1:8181 && playwright test\"",
"e2e:dev": "playwright test --project=chromium --reporter=list",

@@ -75,2 +75,3 @@ "e2e:dev-watch": "chokidar \"{e2e,src}/**/*.{js,ts}\" -c 'clear && npm run e2e:dev' --initial",

"vite-tsconfig-paths": "^3.4.1",
"vue": "^2.7.14",
"wait-on": "^6.0.1"

@@ -77,0 +78,0 @@ },

@@ -21,3 +21,3 @@ var __importDefault = (this && this.__importDefault) || function (mod) {

serialize: ({ value, customizerMethod }) => {
if (value instanceof EntityCollection_1.default) {
if (value instanceof EntityCollection_1.default || ((value === null || value === void 0 ? void 0 : value.__identifier__) && value.__identifier__() === 'EntityCollection')) {
return customizerMethod({

@@ -24,0 +24,0 @@ __type__: '__EntityCollection__',

@@ -10,3 +10,3 @@ var __importDefault = (this && this.__importDefault) || function (mod) {

else if (typeof define === "function" && define.amd) {
define(["require", "exports", "../../data/_internals/EntityCollection", "../../data/Criteria", "../../data/_internals/Entity", "./index", "../../channel"], factory);
define(["require", "exports", "../../data/_internals/EntityCollection", "../../data/Criteria", "../../data/_internals/Entity", "./index", "../../channel", "vue"], factory);
}

@@ -21,2 +21,3 @@ })(function (require, exports) {

const channel_1 = require("../../channel");
const vue_1 = __importDefault(require("vue"));
const { serialize, deserialize } = (0, index_1.default)({

@@ -27,45 +28,72 @@ handle: channel_1.handle,

describe('entity-collection-serializer.ts', () => {
it('should convert collections', () => {
var _a, _b;
const collection = new EntityCollection_1.default('test',
// @ts-expect-error - we know that this entity does not exist
'jest', {}, new Criteria_1.default(), [], 42, ['test', 'foo']);
// @ts-expect-error - we know that this entity does not exist
collection.add(new Entity_1.default('1', 'test', {}));
// @ts-expect-error - we know that this entity does not exist
collection.add(new Entity_1.default('2', 'test', {}));
const messageData = {
collection,
};
const serializedMessageData = serialize(messageData);
expect(typeof serializedMessageData.collection).toBe('object');
expect(typeof serializedMessageData.collection.getIds).toBe('undefined');
expect(serializedMessageData.collection.hasOwnProperty('__type__')).toBe(true);
expect(serializedMessageData.collection.__type__).toBe('__EntityCollection__');
expect(serializedMessageData.collection.hasOwnProperty('__source__')).toBe(true);
expect(serializedMessageData.collection.__source__).toBe('test');
expect(serializedMessageData.collection.hasOwnProperty('__entityName__')).toBe(true);
expect(serializedMessageData.collection.__entityName__).toBe('jest');
expect(serializedMessageData.collection.hasOwnProperty('__context__')).toBe(true);
expect(typeof serializedMessageData.collection.__context__).toBe('object');
expect(serializedMessageData.collection.hasOwnProperty('__criteria__')).toBe(true);
expect(serializedMessageData.collection.__criteria__ instanceof Criteria_1.default).toBe(false);
expect(serializedMessageData.collection.hasOwnProperty('__entities__')).toBe(true);
expect(Array.isArray(serializedMessageData.collection.__entities__)).toBe(true);
expect(serializedMessageData.collection.__entities__.length).toBe(2);
expect(serializedMessageData.collection.__entities__[0].__id__).toBe('1');
expect(serializedMessageData.collection.__entities__[1].__id__).toBe('2');
expect(serializedMessageData.collection.hasOwnProperty('__total__')).toBe(true);
expect(serializedMessageData.collection.__total__).toBe(42);
expect(serializedMessageData.collection.hasOwnProperty('__aggregations__')).toBe(true);
expect(serializedMessageData.collection.__aggregations__).toStrictEqual(['test', 'foo']);
const deserializedMessageData = deserialize(serializedMessageData, new MessageEvent(''));
expect(deserializedMessageData.collection instanceof EntityCollection_1.default).toBe(true);
expect(deserializedMessageData.collection.total).toBe(42);
expect(deserializedMessageData.collection.criteria instanceof Criteria_1.default).toBe(true);
expect(deserializedMessageData.collection.aggregations).toStrictEqual(['test', 'foo']);
expect(deserializedMessageData.collection.source).toBe('test');
expect(deserializedMessageData.collection.entity).toBe('jest');
expect(typeof ((_a = deserializedMessageData.collection.first()) === null || _a === void 0 ? void 0 : _a.getDraft)).toBe('function');
expect(typeof ((_b = deserializedMessageData.collection.last()) === null || _b === void 0 ? void 0 : _b.getDraft)).toBe('function');
[
{
testName: 'should convert collections',
createMessageData: () => {
const collection = new EntityCollection_1.default('test',
// @ts-expect-error - we know that this entity does not exist
'jest', {}, new Criteria_1.default(), [], 42, ['test', 'foo']);
// @ts-expect-error - we know that this entity does not exist
collection.add(new Entity_1.default('1', 'test', {}));
// @ts-expect-error - we know that this entity does not exist
collection.add(new Entity_1.default('2', 'test', {}));
const messageData = {
collection,
};
return messageData;
}
},
{
testName: 'should convert collections even when they are converted with Vue.observable',
createMessageData: () => {
const collection = new EntityCollection_1.default('test',
// @ts-expect-error - we know that this entity does not exist
'jest', {}, new Criteria_1.default(), [], 42, ['test', 'foo']);
// @ts-expect-error - we know that this entity does not exist
collection.add(new Entity_1.default('1', 'test', {}));
// @ts-expect-error - we know that this entity does not exist
collection.add(new Entity_1.default('2', 'test', {}));
const observableCollection = vue_1.default.observable(collection);
const messageData = {
collection: observableCollection,
};
return messageData;
}
}
].forEach(({ testName, createMessageData }) => {
it(testName, () => {
var _a, _b;
const messageData = createMessageData();
const serializedMessageData = serialize(messageData);
expect(typeof serializedMessageData.collection).toBe('object');
expect(typeof serializedMessageData.collection.getIds).toBe('undefined');
expect(serializedMessageData.collection.hasOwnProperty('__type__')).toBe(true);
expect(serializedMessageData.collection.__type__).toBe('__EntityCollection__');
expect(serializedMessageData.collection.hasOwnProperty('__source__')).toBe(true);
expect(serializedMessageData.collection.__source__).toBe('test');
expect(serializedMessageData.collection.hasOwnProperty('__entityName__')).toBe(true);
expect(serializedMessageData.collection.__entityName__).toBe('jest');
expect(serializedMessageData.collection.hasOwnProperty('__context__')).toBe(true);
expect(typeof serializedMessageData.collection.__context__).toBe('object');
expect(serializedMessageData.collection.hasOwnProperty('__criteria__')).toBe(true);
expect(serializedMessageData.collection.__criteria__ instanceof Criteria_1.default).toBe(false);
expect(serializedMessageData.collection.hasOwnProperty('__entities__')).toBe(true);
expect(Array.isArray(serializedMessageData.collection.__entities__)).toBe(true);
expect(serializedMessageData.collection.__entities__.length).toBe(2);
expect(serializedMessageData.collection.__entities__[0].__id__).toBe('1');
expect(serializedMessageData.collection.__entities__[1].__id__).toBe('2');
expect(serializedMessageData.collection.hasOwnProperty('__total__')).toBe(true);
expect(serializedMessageData.collection.__total__).toBe(42);
expect(serializedMessageData.collection.hasOwnProperty('__aggregations__')).toBe(true);
expect(serializedMessageData.collection.__aggregations__).toStrictEqual(['test', 'foo']);
const deserializedMessageData = deserialize(serializedMessageData, new MessageEvent(''));
expect(deserializedMessageData.collection instanceof EntityCollection_1.default).toBe(true);
expect(deserializedMessageData.collection.total).toBe(42);
expect(deserializedMessageData.collection.criteria instanceof Criteria_1.default).toBe(true);
expect(deserializedMessageData.collection.aggregations).toStrictEqual(['test', 'foo']);
expect(deserializedMessageData.collection.source).toBe('test');
expect(deserializedMessageData.collection.entity).toBe('jest');
expect(typeof ((_a = deserializedMessageData.collection.first()) === null || _a === void 0 ? void 0 : _a.getDraft)).toBe('function');
expect(typeof ((_b = deserializedMessageData.collection.last()) === null || _b === void 0 ? void 0 : _b.getDraft)).toBe('function');
});
});

@@ -72,0 +100,0 @@ });

@@ -21,3 +21,3 @@ var __importDefault = (this && this.__importDefault) || function (mod) {

serialize: ({ value, customizerMethod }) => {
if (!(0, utils_1.isObject)(value) || typeof value.getDraft !== 'function') {
if (!(0, utils_1.isObject)(value) || typeof value.__identifier__ !== 'function' || value.__identifier__() !== 'Entity') {
return;

@@ -24,0 +24,0 @@ }

@@ -20,2 +20,7 @@ /**

/**
* Identifier method for the entity class. Needed when some reactive data layer (Vue) converts the EntityClass to a
* plain object. With this identifier method we can (de)serialie it back to the correct entity class.
*/
__identifier__(): string;
/**
* Marks the entity as new. New entities will be provided as create request to the server

@@ -22,0 +27,0 @@ */

@@ -93,2 +93,9 @@ var __importDefault = (this && this.__importDefault) || function (mod) {

/**
* Identifier method for the entity class. Needed when some reactive data layer (Vue) converts the EntityClass to a
* plain object. With this identifier method we can (de)serialie it back to the correct entity class.
*/
__identifier__() {
return 'Entity';
}
/**
* Marks the entity as new. New entities will be provided as create request to the server

@@ -95,0 +102,0 @@ */

@@ -43,2 +43,3 @@ import Criteria from '../Criteria';

moveItem: (oldIndex: number, newIndex: number) => Entity<EntityName> | null;
__identifier__: () => string;
constructor(source: string, entityName: EntityName, context: ApiContext, criteria?: Criteria | null, entities?: Entity<EntityName>[], total?: number | null, aggregations?: string[] | null);

@@ -45,0 +46,0 @@ /**

@@ -115,2 +115,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {

});
Object.defineProperty(this, "__identifier__", {
enumerable: true,
configurable: true,
writable: true,
value: void 0
});
this.entity = entityName;

@@ -124,2 +130,9 @@ this.source = source;

/**
* Identifier method for the EntityCollection class. Needed when some reactive data layer (Vue) converts the EntityCollection to a
* plain array. With this identifier method we can (de)serialie it back to the correct EntityCollection.
*/
this.__identifier__ = () => {
return 'EntityCollection';
};
/**
* Returns the first item of the collection.

@@ -126,0 +139,0 @@ * Returns null if the collection is empty

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc