@shopware-ag/meteor-admin-sdk
Version:
The Meteor SDK for the Shopware Administration.
1 lines • 186 kB
JavaScript
var oE=Object.defineProperty;var aE=(J,Pe,gt)=>Pe in J?oE(J,Pe,{enumerable:!0,configurable:!0,writable:!0,value:gt}):J[Pe]=gt;var W=(J,Pe,gt)=>(aE(J,typeof Pe!="symbol"?Pe+"":Pe,gt),gt);(function(J,Pe){typeof exports=="object"&&typeof module!="undefined"?Pe(exports):typeof define=="function"&&define.amd?define(["exports"],Pe):(J=typeof globalThis!="undefined"?globalThis:J||self,Pe(J.sw={}))})(this,function(J){var lu;"use strict";var Pe=Object.prototype,gt=Pe.hasOwnProperty;function Nu(e,t){return e!=null&>.call(e,t)}var Pu=Array.isArray,mt=Pu,xu=typeof global=="object"&&global&&global.Object===Object&&global,ho=xu,ju=typeof self=="object"&&self&&self.Object===Object&&self,Lu=ho||ju||Function("return this")(),ze=Lu,Du=ze.Symbol,nt=Du,vo=Object.prototype,Mu=vo.hasOwnProperty,Fu=vo.toString,tr=nt?nt.toStringTag:void 0;function Uu(e){var t=Mu.call(e,tr),r=e[tr];try{e[tr]=void 0;var n=!0}catch{}var i=Fu.call(e);return n&&(t?e[tr]=r:delete e[tr]),i}var Bu=Object.prototype,zu=Bu.toString;function Hu(e){return zu.call(e)}var ku="[object Null]",Gu="[object Undefined]",go=nt?nt.toStringTag:void 0;function Lt(e){return e==null?e===void 0?Gu:ku:go&&go in Object(e)?Uu(e):Hu(e)}function Dt(e){return e!=null&&typeof e=="object"}var Wu="[object Symbol]";function $n(e){return typeof e=="symbol"||Dt(e)&&Lt(e)==Wu}var qu=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Xu=/^\w*$/;function Yu(e,t){if(mt(e))return!1;var r=typeof e;return r=="number"||r=="symbol"||r=="boolean"||e==null||$n(e)?!0:Xu.test(e)||!qu.test(e)||t!=null&&e in Object(t)}function _t(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var Ku="[object AsyncFunction]",Ju="[object Function]",Zu="[object GeneratorFunction]",Qu="[object Proxy]";function mo(e){if(!_t(e))return!1;var t=Lt(e);return t==Ju||t==Zu||t==Ku||t==Qu}var Vu=ze["__core-js_shared__"],In=Vu,_o=function(){var e=/[^.]+$/.exec(In&&In.keys&&In.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function ef(e){return!!_o&&_o in e}var tf=Function.prototype,rf=tf.toString;function yt(e){if(e!=null){try{return rf.call(e)}catch{}try{return e+""}catch{}}return""}var nf=/[\\^$.*+?()[\]{}|]/g,of=/^\[object .+?Constructor\]$/,af=Function.prototype,sf=Object.prototype,cf=af.toString,uf=sf.hasOwnProperty,ff=RegExp("^"+cf.call(uf).replace(nf,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function lf(e){if(!_t(e)||ef(e))return!1;var t=mo(e)?ff:of;return t.test(yt(e))}function df(e,t){return e==null?void 0:e[t]}function bt(e,t){var r=df(e,t);return lf(r)?r:void 0}var pf=bt(Object,"create"),rr=pf;function hf(){this.__data__=rr?rr(null):{},this.size=0}function vf(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var gf="__lodash_hash_undefined__",mf=Object.prototype,_f=mf.hasOwnProperty;function yf(e){var t=this.__data__;if(rr){var r=t[e];return r===gf?void 0:r}return _f.call(t,e)?t[e]:void 0}var bf=Object.prototype,Ef=bf.hasOwnProperty;function wf(e){var t=this.__data__;return rr?t[e]!==void 0:Ef.call(t,e)}var Sf="__lodash_hash_undefined__";function $f(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=rr&&t===void 0?Sf:t,this}function Et(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}Et.prototype.clear=hf,Et.prototype.delete=vf,Et.prototype.get=yf,Et.prototype.has=wf,Et.prototype.set=$f;function If(){this.__data__=[],this.size=0}function yo(e,t){return e===t||e!==e&&t!==t}function xr(e,t){for(var r=e.length;r--;)if(yo(e[r][0],t))return r;return-1}var Tf=Array.prototype,Of=Tf.splice;function Af(e){var t=this.__data__,r=xr(t,e);if(r<0)return!1;var n=t.length-1;return r==n?t.pop():Of.call(t,r,1),--this.size,!0}function Cf(e){var t=this.__data__,r=xr(t,e);return r<0?void 0:t[r][1]}function Rf(e){return xr(this.__data__,e)>-1}function Nf(e,t){var r=this.__data__,n=xr(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}function qe(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}qe.prototype.clear=If,qe.prototype.delete=Af,qe.prototype.get=Cf,qe.prototype.has=Rf,qe.prototype.set=Nf;var Pf=bt(ze,"Map"),nr=Pf;function xf(){this.size=0,this.__data__={hash:new Et,map:new(nr||qe),string:new Et}}function jf(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function jr(e,t){var r=e.__data__;return jf(t)?r[typeof t=="string"?"string":"hash"]:r.map}function Lf(e){var t=jr(this,e).delete(e);return this.size-=t?1:0,t}function Df(e){return jr(this,e).get(e)}function Mf(e){return jr(this,e).has(e)}function Ff(e,t){var r=jr(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this}function it(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}it.prototype.clear=xf,it.prototype.delete=Lf,it.prototype.get=Df,it.prototype.has=Mf,it.prototype.set=Ff;var Uf="Expected a function";function Tn(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(Uf);var r=function(){var n=arguments,i=t?t.apply(this,n):n[0],o=r.cache;if(o.has(i))return o.get(i);var a=e.apply(this,n);return r.cache=o.set(i,a)||o,a};return r.cache=new(Tn.Cache||it),r}Tn.Cache=it;var Bf=500;function zf(e){var t=Tn(e,function(n){return r.size===Bf&&r.clear(),n}),r=t.cache;return t}var Hf=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,kf=/\\(\\)?/g,Gf=zf(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(Hf,function(r,n,i,o){t.push(i?o.replace(kf,"$1"):n||r)}),t}),Wf=Gf;function qf(e,t){for(var r=-1,n=e==null?0:e.length,i=Array(n);++r<n;)i[r]=t(e[r],r,e);return i}var Xf=1/0,bo=nt?nt.prototype:void 0,Eo=bo?bo.toString:void 0;function wo(e){if(typeof e=="string")return e;if(mt(e))return qf(e,wo)+"";if($n(e))return Eo?Eo.call(e):"";var t=e+"";return t=="0"&&1/e==-Xf?"-0":t}function Yf(e){return e==null?"":wo(e)}function On(e,t){return mt(e)?e:Yu(e,t)?[e]:Wf(Yf(e))}var Kf="[object Arguments]";function So(e){return Dt(e)&&Lt(e)==Kf}var $o=Object.prototype,Jf=$o.hasOwnProperty,Zf=$o.propertyIsEnumerable,Qf=So(function(){return arguments}())?So:function(e){return Dt(e)&&Jf.call(e,"callee")&&!Zf.call(e,"callee")},Io=Qf,Vf=9007199254740991,el=/^(?:0|[1-9]\d*)$/;function An(e,t){var r=typeof e;return t=t==null?Vf:t,!!t&&(r=="number"||r!="symbol"&&el.test(e))&&e>-1&&e%1==0&&e<t}var tl=9007199254740991;function Cn(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=tl}var rl=1/0;function Rn(e){if(typeof e=="string"||$n(e))return e;var t=e+"";return t=="0"&&1/e==-rl?"-0":t}function nl(e,t,r){t=On(t,e);for(var n=-1,i=t.length,o=!1;++n<i;){var a=Rn(t[n]);if(!(o=e!=null&&r(e,a)))break;e=e[a]}return o||++n!=i?o:(i=e==null?0:e.length,!!i&&Cn(i)&&An(a,i)&&(mt(e)||Io(e)))}function il(e,t){return e!=null&&nl(e,t,Nu)}function Nn(){return String(Date.now().toString(36)+Math.random().toString(36).substr(2))}function Lr(e){return e!==null&&typeof e=="object"}function ir(){return new URLSearchParams(window.location.search).get("location-id")}function ol(){const e=window.location;return new URL(e.pathname,e.origin).toString()}function or(e,t){return Lr(t)&&t.__type__&&t.__type__===e}function al(e,t){return il(e,t)}function Pn(e,t,r="root"){for(let n in e){const i=e[n];if(t.apply(this,[e,n,i,r]),Lr(i)){let o=r+"."+n;Pn(i,t,o)}}}function sl(e){return e!==Object(e)||e===null||e===void 0}function To(e){return typeof e!="string"?e:e.replace(/^root\./,"")}function Oo(e){if(typeof e!="string"||e==="")return;const t=new URL(e);return t.origin===window.location.origin?{baseUrl:t.hostname,permissions:{additional:["*"],create:["*"],read:["*"],update:["*"],delete:["*"]}}:Object.values(window._swsdk.adminExtensions).find(r=>new URL(r.baseUrl).hostname===t.hostname)}function cl(e,t){var n;if(typeof e!="string"||e==="")return;let r;try{r=new URL(e)}catch{return}if(r.origin===window.location.origin){if(t)try{const i=t.location.href.split("?")[0],o=Object.entries(window._swsdk.adminExtensions).filter(([,a])=>{const s=a.baseUrl.replace(/\/$/,"");return i===s||i.startsWith(`${s}/`)}).sort(([,a],[,s])=>s.baseUrl.length-a.baseUrl.length)[0];return o==null?void 0:o[0]}catch{}return}return(n=Object.entries(window._swsdk.adminExtensions).find(([,i])=>{try{return new URL(i.baseUrl).origin===r.origin}catch{return!1}}))==null?void 0:n[0]}class Xe extends Error{constructor(r,n){super(`Your app is missing the privileges ${n.join(", ")} for action "${r}".`);W(this,"missingPrivileges");W(this,"messageType");this.missingPrivileges=n,this.messageType=r,Object.setPrototypeOf(this,Xe.prototype)}toJSON(){return{__type__:"__MissingPrivilegesError__",__messageType__:this.messageType,__data__:this.missingPrivileges}}}const ul=({send:e,handle:t})=>{const r={};let n=!1;function i(){n||(n=!0,t("__function__",async({args:o,id:a})=>await Promise.resolve(r[a](...o))))}return{name:"function",serialize:({value:o})=>{if(typeof o=="function"){const a=Nn();return r[a]=o,i(),{__type__:"__function__",id:a,origin:window.origin}}},deserialize:({value:o,event:a})=>{var c;const s=(c=a==null?void 0:a.source)!=null?c:window;if(Lr(o)&&o.__type__&&o.__type__==="__function__"&&typeof o.id=="string"){const d=o.id,l=o.origin;return(...p)=>e("__function__",{args:p,id:d},s,l)}}}};function fl(){this.__data__=new qe,this.size=0}function ll(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}function dl(e){return this.__data__.get(e)}function pl(e){return this.__data__.has(e)}var hl=200;function vl(e,t){var r=this.__data__;if(r instanceof qe){var n=r.__data__;if(!nr||n.length<hl-1)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new it(n)}return r.set(e,t),this.size=r.size,this}function Mt(e){var t=this.__data__=new qe(e);this.size=t.size}Mt.prototype.clear=fl,Mt.prototype.delete=ll,Mt.prototype.get=dl,Mt.prototype.has=pl,Mt.prototype.set=vl;function gl(e,t){for(var r=-1,n=e==null?0:e.length;++r<n&&t(e[r],r,e)!==!1;);return e}var ml=function(){try{var e=bt(Object,"defineProperty");return e({},"",{}),e}catch{}}(),Ao=ml;function Co(e,t,r){t=="__proto__"&&Ao?Ao(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}var _l=Object.prototype,yl=_l.hasOwnProperty;function xn(e,t,r){var n=e[t];(!(yl.call(e,t)&&yo(n,r))||r===void 0&&!(t in e))&&Co(e,t,r)}function Dr(e,t,r,n){var i=!r;r||(r={});for(var o=-1,a=t.length;++o<a;){var s=t[o],c=n?n(r[s],e[s],s,r,e):void 0;c===void 0&&(c=e[s]),i?Co(r,s,c):xn(r,s,c)}return r}function bl(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}function El(){return!1}var Ro=typeof J=="object"&&J&&!J.nodeType&&J,No=Ro&&typeof module=="object"&&module&&!module.nodeType&&module,wl=No&&No.exports===Ro,Po=wl?ze.Buffer:void 0,Sl=Po?Po.isBuffer:void 0,$l=Sl||El,xo=$l,Il="[object Arguments]",Tl="[object Array]",Ol="[object Boolean]",Al="[object Date]",Cl="[object Error]",Rl="[object Function]",Nl="[object Map]",Pl="[object Number]",xl="[object Object]",jl="[object RegExp]",Ll="[object Set]",Dl="[object String]",Ml="[object WeakMap]",Fl="[object ArrayBuffer]",Ul="[object DataView]",Bl="[object Float32Array]",zl="[object Float64Array]",Hl="[object Int8Array]",kl="[object Int16Array]",Gl="[object Int32Array]",Wl="[object Uint8Array]",ql="[object Uint8ClampedArray]",Xl="[object Uint16Array]",Yl="[object Uint32Array]",ce={};ce[Bl]=ce[zl]=ce[Hl]=ce[kl]=ce[Gl]=ce[Wl]=ce[ql]=ce[Xl]=ce[Yl]=!0,ce[Il]=ce[Tl]=ce[Fl]=ce[Ol]=ce[Ul]=ce[Al]=ce[Cl]=ce[Rl]=ce[Nl]=ce[Pl]=ce[xl]=ce[jl]=ce[Ll]=ce[Dl]=ce[Ml]=!1;function Kl(e){return Dt(e)&&Cn(e.length)&&!!ce[Lt(e)]}function jn(e){return function(t){return e(t)}}var jo=typeof J=="object"&&J&&!J.nodeType&&J,ar=jo&&typeof module=="object"&&module&&!module.nodeType&&module,Jl=ar&&ar.exports===jo,Ln=Jl&&ho.process,Zl=function(){try{var e=ar&&ar.require&&ar.require("util").types;return e||Ln&&Ln.binding&&Ln.binding("util")}catch{}}(),Ft=Zl,Lo=Ft&&Ft.isTypedArray,Ql=Lo?jn(Lo):Kl,Vl=Ql,ed=Object.prototype,td=ed.hasOwnProperty;function Do(e,t){var r=mt(e),n=!r&&Io(e),i=!r&&!n&&xo(e),o=!r&&!n&&!i&&Vl(e),a=r||n||i||o,s=a?bl(e.length,String):[],c=s.length;for(var d in e)(t||td.call(e,d))&&!(a&&(d=="length"||i&&(d=="offset"||d=="parent")||o&&(d=="buffer"||d=="byteLength"||d=="byteOffset")||An(d,c)))&&s.push(d);return s}var rd=Object.prototype;function Dn(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||rd;return e===r}function Mo(e,t){return function(r){return e(t(r))}}var nd=Mo(Object.keys,Object),id=nd,od=Object.prototype,ad=od.hasOwnProperty;function sd(e){if(!Dn(e))return id(e);var t=[];for(var r in Object(e))ad.call(e,r)&&r!="constructor"&&t.push(r);return t}function Fo(e){return e!=null&&Cn(e.length)&&!mo(e)}function Mn(e){return Fo(e)?Do(e):sd(e)}function cd(e,t){return e&&Dr(t,Mn(t),e)}function ud(e){var t=[];if(e!=null)for(var r in Object(e))t.push(r);return t}var fd=Object.prototype,ld=fd.hasOwnProperty;function dd(e){if(!_t(e))return ud(e);var t=Dn(e),r=[];for(var n in e)n=="constructor"&&(t||!ld.call(e,n))||r.push(n);return r}function Fn(e){return Fo(e)?Do(e,!0):dd(e)}function pd(e,t){return e&&Dr(t,Fn(t),e)}var Uo=typeof J=="object"&&J&&!J.nodeType&&J,Bo=Uo&&typeof module=="object"&&module&&!module.nodeType&&module,hd=Bo&&Bo.exports===Uo,zo=hd?ze.Buffer:void 0,Ho=zo?zo.allocUnsafe:void 0;function vd(e,t){if(t)return e.slice();var r=e.length,n=Ho?Ho(r):new e.constructor(r);return e.copy(n),n}function gd(e,t){var r=-1,n=e.length;for(t||(t=Array(n));++r<n;)t[r]=e[r];return t}function md(e,t){for(var r=-1,n=e==null?0:e.length,i=0,o=[];++r<n;){var a=e[r];t(a,r,e)&&(o[i++]=a)}return o}function ko(){return[]}var _d=Object.prototype,yd=_d.propertyIsEnumerable,Go=Object.getOwnPropertySymbols,bd=Go?function(e){return e==null?[]:(e=Object(e),md(Go(e),function(t){return yd.call(e,t)}))}:ko,Un=bd;function Ed(e,t){return Dr(e,Un(e),t)}function Wo(e,t){for(var r=-1,n=t.length,i=e.length;++r<n;)e[i+r]=t[r];return e}var wd=Mo(Object.getPrototypeOf,Object),qo=wd,Sd=Object.getOwnPropertySymbols,$d=Sd?function(e){for(var t=[];e;)Wo(t,Un(e)),e=qo(e);return t}:ko,Xo=$d;function Id(e,t){return Dr(e,Xo(e),t)}function Yo(e,t,r){var n=t(e);return mt(e)?n:Wo(n,r(e))}function Td(e){return Yo(e,Mn,Un)}function Od(e){return Yo(e,Fn,Xo)}var Ad=bt(ze,"DataView"),Bn=Ad,Cd=bt(ze,"Promise"),zn=Cd,Rd=bt(ze,"Set"),Hn=Rd,Nd=bt(ze,"WeakMap"),kn=Nd,Ko="[object Map]",Pd="[object Object]",Jo="[object Promise]",Zo="[object Set]",Qo="[object WeakMap]",Vo="[object DataView]",xd=yt(Bn),jd=yt(nr),Ld=yt(zn),Dd=yt(Hn),Md=yt(kn),wt=Lt;(Bn&&wt(new Bn(new ArrayBuffer(1)))!=Vo||nr&&wt(new nr)!=Ko||zn&&wt(zn.resolve())!=Jo||Hn&&wt(new Hn)!=Zo||kn&&wt(new kn)!=Qo)&&(wt=function(e){var t=Lt(e),r=t==Pd?e.constructor:void 0,n=r?yt(r):"";if(n)switch(n){case xd:return Vo;case jd:return Ko;case Ld:return Jo;case Dd:return Zo;case Md:return Qo}return t});var Gn=wt,Fd=Object.prototype,Ud=Fd.hasOwnProperty;function Bd(e){var t=e.length,r=new e.constructor(t);return t&&typeof e[0]=="string"&&Ud.call(e,"index")&&(r.index=e.index,r.input=e.input),r}var zd=ze.Uint8Array,ea=zd;function Wn(e){var t=new e.constructor(e.byteLength);return new ea(t).set(new ea(e)),t}function Hd(e,t){var r=t?Wn(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.byteLength)}var kd=/\w*$/;function Gd(e){var t=new e.constructor(e.source,kd.exec(e));return t.lastIndex=e.lastIndex,t}var ta=nt?nt.prototype:void 0,ra=ta?ta.valueOf:void 0;function Wd(e){return ra?Object(ra.call(e)):{}}function qd(e,t){var r=t?Wn(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}var Xd="[object Boolean]",Yd="[object Date]",Kd="[object Map]",Jd="[object Number]",Zd="[object RegExp]",Qd="[object Set]",Vd="[object String]",ep="[object Symbol]",tp="[object ArrayBuffer]",rp="[object DataView]",np="[object Float32Array]",ip="[object Float64Array]",op="[object Int8Array]",ap="[object Int16Array]",sp="[object Int32Array]",cp="[object Uint8Array]",up="[object Uint8ClampedArray]",fp="[object Uint16Array]",lp="[object Uint32Array]";function dp(e,t,r){var n=e.constructor;switch(t){case tp:return Wn(e);case Xd:case Yd:return new n(+e);case rp:return Hd(e,r);case np:case ip:case op:case ap:case sp:case cp:case up:case fp:case lp:return qd(e,r);case Kd:return new n;case Jd:case Vd:return new n(e);case Zd:return Gd(e);case Qd:return new n;case ep:return Wd(e)}}var na=Object.create,pp=function(){function e(){}return function(t){if(!_t(t))return{};if(na)return na(t);e.prototype=t;var r=new e;return e.prototype=void 0,r}}(),hp=pp;function vp(e){return typeof e.constructor=="function"&&!Dn(e)?hp(qo(e)):{}}var gp="[object Map]";function mp(e){return Dt(e)&&Gn(e)==gp}var ia=Ft&&Ft.isMap,_p=ia?jn(ia):mp,yp=_p,bp="[object Set]";function Ep(e){return Dt(e)&&Gn(e)==bp}var oa=Ft&&Ft.isSet,wp=oa?jn(oa):Ep,Sp=wp,$p=1,Ip=2,Tp=4,aa="[object Arguments]",Op="[object Array]",Ap="[object Boolean]",Cp="[object Date]",Rp="[object Error]",sa="[object Function]",Np="[object GeneratorFunction]",Pp="[object Map]",xp="[object Number]",ca="[object Object]",jp="[object RegExp]",Lp="[object Set]",Dp="[object String]",Mp="[object Symbol]",Fp="[object WeakMap]",Up="[object ArrayBuffer]",Bp="[object DataView]",zp="[object Float32Array]",Hp="[object Float64Array]",kp="[object Int8Array]",Gp="[object Int16Array]",Wp="[object Int32Array]",qp="[object Uint8Array]",Xp="[object Uint8ClampedArray]",Yp="[object Uint16Array]",Kp="[object Uint32Array]",ae={};ae[aa]=ae[Op]=ae[Up]=ae[Bp]=ae[Ap]=ae[Cp]=ae[zp]=ae[Hp]=ae[kp]=ae[Gp]=ae[Wp]=ae[Pp]=ae[xp]=ae[ca]=ae[jp]=ae[Lp]=ae[Dp]=ae[Mp]=ae[qp]=ae[Xp]=ae[Yp]=ae[Kp]=!0,ae[Rp]=ae[sa]=ae[Fp]=!1;function sr(e,t,r,n,i,o){var a,s=t&$p,c=t&Ip,d=t&Tp;if(r&&(a=i?r(e,n,i,o):r(e)),a!==void 0)return a;if(!_t(e))return e;var l=mt(e);if(l){if(a=Bd(e),!s)return gd(e,a)}else{var p=Gn(e),E=p==sa||p==Np;if(xo(e))return vd(e,s);if(p==ca||p==aa||E&&!i){if(a=c||E?{}:vp(e),!s)return c?Id(e,pd(a,e)):Ed(e,cd(a,e))}else{if(!ae[p])return i?e:{};a=dp(e,p,s)}}o||(o=new Mt);var $=o.get(e);if($)return $;o.set(e,a),Sp(e)?e.forEach(function(P){a.add(sr(P,t,r,P,e,o))}):yp(e)&&e.forEach(function(P,M){a.set(M,sr(P,t,r,M,e,o))});var x=d?c?Od:Td:c?Fn:Mn,I=l?void 0:x(e);return gl(I||e,function(P,M){I&&(M=P,P=e[M]),xn(a,M,sr(P,t,r,M,e,o))}),a}var Jp=1,Zp=4;function qn(e){return sr(e,Jp|Zp)}let Qp=1,Vp=null;class St{constructor(t=Qp,r=Vp){W(this,"title");W(this,"page");W(this,"limit");W(this,"term");W(this,"filters");W(this,"ids");W(this,"queries");W(this,"associations");W(this,"postFilter");W(this,"sortings");W(this,"aggregations");W(this,"grouping");W(this,"fields");W(this,"groupFields");W(this,"totalCountMode");W(this,"includes");this.page=t,this.limit=r,this.term=null,this.title=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(t){return qn(t)}parse(){const t={};return this.ids.length>0&&(t.ids=this.ids.join("|")),this.page!==null&&(t.page=this.page),this.limit!==null&&(t.limit=this.limit),this.term!==null&&(t.term=this.term),this.queries.length>0&&(t.query=this.queries),this.filters.length>0&&(t.filter=this.filters),this.postFilter.length>0&&(t["post-filter"]=this.postFilter),this.sortings.length>0&&(t.sort=this.sortings),this.aggregations.length>0&&(t.aggregations=this.aggregations),this.groupFields.length>0&&(t.groupFields=this.groupFields),this.grouping.length>0&&(t.grouping=this.grouping),this.fields.length>0&&(t.fields=this.fields),this.associations.length>0&&(t.associations={},this.associations.forEach(r=>{!t.associations||(t.associations[r.association]=r.criteria.parse())})),this.includes!==null&&(t.includes=this.includes),this.totalCountMode!==null&&(t["total-count-mode"]=this.totalCountMode),t}setTitle(t){return this.title=t,this}getTitle(){return this.title}setIds(t){return this.ids=t,this}setTotalCountMode(t){return typeof t!="number"&&(this.totalCountMode=null),this.totalCountMode=t<0||t>2?null:t,this}setPage(t){return this.page=t,this}setLimit(t){return this.limit=t,this}setTerm(t){return this.term=t,this}addFilter(t){return this.filters.push(t),this}addIncludes(t){return Object.entries(t).forEach(([r,n])=>{this.includes===null&&(this.includes={}),this.includes[r]||(this.includes[r]=[]),this.includes[r].push(...n)}),this}addPostFilter(t){return this.postFilter.push(t),this}addSorting(t){return this.sortings.push(t),this}addQuery(t,r,n=null){const i={score:r,query:t};return n&&(i.scoreField=n),this.queries.push(i),this}addGroupField(t){return this.groupFields.push(t),this}addGrouping(t){return this.grouping.push(t),this}addFields(...t){return this.fields.push(...t),this}addAggregation(t){return this.aggregations.push(t),this}addAssociation(t){const r=t.split(".");let n=this;return r.forEach(i=>{n=n.getAssociation(i)}),this}getAssociation(t){const r=t.split(".");let n=this;return r.forEach(i=>{n.hasAssociation(i)||n.associations.push({association:i,criteria:new St(null,null)}),n=n.getAssociationCriteria(i)}),n}getAssociationCriteria(t){let r=null;return this.associations.forEach(n=>{n.association===t&&(r=n.criteria)}),r}getLimit(){var t;return(t=this.limit)!=null?t:0}getPage(){var t;return(t=this.page)!=null?t:0}getCriteriaData(){return{page:this.page,limit:this.limit,term:this.term,title:this.title,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(t){return this.associations.some(r=>r.association===t)}resetSorting(){this.sortings=[]}static avg(t,r){return{type:"avg",name:t,field:r}}static count(t,r){return{type:"count",name:t,field:r}}static max(t,r){return{type:"max",name:t,field:r}}static min(t,r){return{type:"min",name:t,field:r}}static stats(t,r){return{type:"stats",name:t,field:r}}static sum(t,r){return{type:"sum",name:t,field:r}}static terms(t,r,n=null,i=null,o=null){return{type:"terms",name:t,field:r,limit:n,sort:i,aggregation:o}}static entityAggregation(t,r,n){return{type:"entity",name:t,field:r,definition:n}}static filter(t,r,n){return{type:"filter",name:t,filter:r,aggregation:n}}static histogram(t,r,n,i,o,a){return{type:"histogram",name:t,field:r,interval:n,format:i,aggregation:o,timeZone:a}}static sort(t,r="ASC",n=!1){return{field:t,order:r,naturalSorting:n}}static naturalSorting(t,r="ASC"){return{field:t,order:r,naturalSorting:!0}}static countSorting(t,r="ASC"){return{field:t,order:r,naturalSorting:!1,type:"count"}}static contains(t,r){return{type:"contains",field:t,value:r}}static prefix(t,r){return{type:"prefix",field:t,value:r}}static suffix(t,r){return{type:"suffix",field:t,value:r}}static equalsAny(t,r){return{type:"equalsAny",field:t,value:r.join("|")}}static range(t,r){return{type:"range",field:t,parameters:r}}static equals(t,r){return{type:"equals",field:t,value:r}}static not(t,r=[]){return{type:"not",operator:t,queries:r}}static multi(t,r=[]){return{type:"multi",operator:t,queries:r}}}const eh=()=>({name:"criteria",serialize:({value:e,customizerMethod:t,seen:r,path:n})=>{if(e instanceof St)return{__type__:"__Criteria__",data:t(e.getCriteriaData(),r,n)}},deserialize:({value:e,customizerMethod:t})=>{if(or("__Criteria__",e)&&typeof e.data=="object"){const r=e.data,n=new St;return n.setPage(r.page),n.setLimit(r.limit),n.setTerm(r.term),r.title!==null&&n.setTitle(r.title),r.filters.forEach(i=>{n.addFilter(i)}),n.setIds(r.ids),r.queries.forEach(({query:i,score:o})=>{n.addQuery(i,o)}),r.associations.forEach(i=>{n.associations.push(t(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 th=(e,t,r)=>{e[t]=r};class rh{constructor(t,r,n,i={}){W(this,"id");W(this,"_origin");W(this,"_entityName");W(this,"_draft");W(this,"_isDirty");W(this,"_isNew");var a,s;this.id=t,this._origin=i.originData?qn(i.originData):qn(n),this._entityName=r,this._draft=n,this._isDirty=(a=i.isDirty)!=null?a:!1,this._isNew=(s=i.isNew)!=null?s:!1;const o=this;return new Proxy(this._draft,{get(c,d){return d in o._draft?o._draft[d]:o[d]},set(c,d,l){return th(o._draft,d,l),o._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 ua=function(t,r,n,i){return new rh(t,r,n,i)},nh=()=>({name:"entity",serialize:({value:e,customizerMethod:t,seen:r,path:n})=>{if(!(!Lr(e)||typeof e.__identifier__!="function"||e.__identifier__()!=="Entity"))return{__type__:"__Entity__",__id__:e.id,__entityName__:e._entityName,__isDirty__:e._isDirty,__isNew__:e._isNew,__origin__:t(e._origin,r,n),__draft__:t(e._draft,r,n)}},deserialize:({value:e,customizerMethod:t})=>{if(or("__Entity__",e)&&typeof e.__origin__=="object")return new ua(e.__id__,e.__entityName__,t(e.__draft__),{originData:t(e.__origin__),isDirty:e.__isDirty__,isNew:e.__isNew__})}});class Ut extends Array{constructor(r,n,i,o=null,a=[],s=null,c=null){super();W(this,"entity");W(this,"source");W(this,"context");W(this,"criteria");W(this,"aggregations");W(this,"total");W(this,"first");W(this,"last");W(this,"remove");W(this,"has");W(this,"get");W(this,"getAt");W(this,"getIds");W(this,"add");W(this,"addAt");W(this,"moveItem");W(this,"__identifier__");this.entity=n,this.source=r,this.context=i,this.criteria=o,this.aggregations=c,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(l){const p=this.findIndex(E=>E.id===l);return p<0?!1:(this.splice(p,1),!0)},this.has=function(l){return this.some(p=>p.id===l)},this.get=function(l){const p=this.find(E=>E.id===l);return typeof p!="undefined"?p:null},this.getAt=function(l){const p=this[l];return typeof p!="undefined"?p:null},this.getIds=function(){return this.map(l=>l.id)},this.add=function(l){this.push(l)},this.addAt=function(l,p){if(typeof p=="undefined"){this.add(l);return}this.splice(p,0,l)},this.moveItem=function(l,p=null){if(p===null&&(p=this.length),l<0||l>=this.length)return null;if(p===l)return this.getAt(l);const E=this.find((I,P)=>P===l);if(typeof E=="undefined")return null;const $=this.filter((I,P)=>P!==l),x=[...$.slice(0,p),E,...$.slice(p)];return this.splice(0,this.length,...x),E},this.filter=function(l,p){const E=Object.getPrototypeOf(this).filter.call(this,l,p);return new Ut(this.source,this.entity,this.context,this.criteria,E,this.total,this.aggregations)}}static fromCollection(r){return new Ut(r.source,r.entity,r.context,r.criteria===null?r.criteria:St.fromCriteria(r.criteria),r,r.total,r.aggregations)}}const ih=()=>({name:"entity-collection",serialize:({value:e,customizerMethod:t,seen:r,path:n})=>{if(e instanceof Ut||(e==null?void 0:e.__identifier__)&&e.__identifier__()==="EntityCollection")return t({__type__:"__EntityCollection__",__source__:e.source,__entityName__:e.entity,__context__:e.context,__criteria__:e.criteria,__entities__:Array.from(e),__total__:e.total,__aggregations__:e.aggregations},r,n)},deserialize:({value:e,customizerMethod:t})=>{if(or("__EntityCollection__",e))return new Ut(e.__source__,e.__entityName__,e.__context__,t(e.__criteria__),t(e.__entities__),e.__total__,e.__aggregations__)}});class cr extends Error{constructor(r,n){super(r);W(this,"code",500);n&&(this.code=n)}toJSON(){return{__type__:"__HandleError__",__code__:this.code,__message__:this.message}}}const oh=()=>({name:"handle-error",serialize:()=>{},deserialize:({value:e})=>{if(or("__HandleError__",e))return new cr(e.__message__,e.__code__)}});var ah=1,sh=4;function fa(e,t){return t=typeof t=="function"?t:void 0,sr(e,ah|sh,t)}function ch(e,t){t=On(t,e);for(var r=0,n=t.length;e!=null&&r<n;)e=e[Rn(t[r++])];return r&&r==n?e:void 0}function uh(e,t,r){var n=e==null?void 0:ch(e,t);return n===void 0?r:n}function fh(e,t,r,n){if(!_t(e))return e;t=On(t,e);for(var i=-1,o=t.length,a=o-1,s=e;s!=null&&++i<o;){var c=Rn(t[i]),d=r;if(c==="__proto__"||c==="constructor"||c==="prototype")return e;if(i!=a){var l=s[c];d=n?n(l,c,s):void 0,d===void 0&&(d=_t(l)?l:An(t[i+1])?[]:{})}xn(s,c,d),s=s[c]}return e}function lh(e,t,r){return e==null?e:fh(e,t,r)}const dh=[eh,ih,nh,ul,oh,()=>({name:"handle-error",serialize:()=>{},deserialize:({value:e})=>{if(or("__MissingPrivilegesError__",e))return new Xe(e.__messageType__,e.__data__)}})];function la(e){const t=dh.map(s=>s(e));function r(){return t}function n(s){var c;return(c=t.find(d=>d.name===s))!=null?c:null}function i(s,c=new Map,d="root"){return fa(s,(l,p,E,$)=>{let x=d+"."+p;if(sl(l))return l;if(c.has(l))return{__$CR__:c.get(l)};c.set(l,x);for(const I of t){const P=I.serialize({value:l,key:p,object:E,stack:$,customizerMethod:i,seen:c,path:x});if(P)return P}})}function o(s,c){const d=a(s,c);return Pn(d,(l,p,E,$)=>{if(p!=="__$CR__")return;const x=To(E),I=To($);lh(d,I,uh(d,x))}),d}function a(s,c){return fa(s,(d,l,p,E)=>{for(const $ of t){const x=$.deserialize({value:d,key:l,object:p,stack:E,event:c,customizerMethod:a});if(x)return x}})}return{getSerializers:r,getSerializerByName:n,serialize:i,deserialize:o}}function ph(e,t){if(typeof t=="string")return new cr(t);if(!(t instanceof Error))return new cr("An unknown error occurred.");if(al(t,"response.data.errors.0.code")&&t.response.data.errors.length){const r=t.response.data.errors.filter(i=>i.code==="FRAMEWORK__MISSING_PRIVILEGE_ERROR"),n=[];return r.forEach(i=>{const o=JSON.parse(i.detail);n.push(...o.missingPrivileges)}),n.length?new Xe(e,n):new cr(t.response.data.errors[0].code,t.response.data.errors[0].status)}return new cr(t.message)}function Xn({serializedData:e,origin:t,type:r,privilegesToCheck:n=[]}){if(t===void 0)return null;const i=Oo(t);if(!i)return console.warn(`No extension found for origin "${t}"`),null;const o=[];return Pn(e,(a,s,c)=>{if(s==="__type__"&&["__EntityCollection__","__Entity__"].includes(c)){const d=a.__entityName__;if(!d)return;[...n].sort().forEach(l=>{const p=i.permissions[l];(!p||!p.includes(d))&&!o.includes(`${l}:${d}`)&&!(p!=null&&p.includes("*"))&&o.push(`${l}:${d}`)})}}),o.length>0?new Xe(r,o):null}function da(e,t,r="datasetSubscribe",n=""){if(!t)return e;const i={},o=Oo(n!=null?n:""),a=[];return t.forEach(s=>{Yn(e,s,o,a,n,r,i)}),o?a.length?new Xe(r,a):i:(console.warn(`No extension found for origin "${n}"`),i)}function Yn(e,t,r,n,i,o,a={}){var l,p,E;const s=t.split(".");let c=a,d=e;for(let $=0;$<s.length;$++){const x=/\[\d*\]/,I=s[$],P=s[$+1];if(P&&(P==="*"||P.match(x))){if(!s[$+2]){Mr(d,r,n),Mr(d==null?void 0:d[I],r,n),c[I]=d==null?void 0:d[I];break}c[I]=(l=c[I])!=null?l:[],d=d==null?void 0:d[I],c=c[I];continue}if(Array.isArray(d)&&P){const M=s.slice($+1).join(".");if(I==="*"){for(let U=0;U<d.length;U++)Yn(d[U],M,r,n,i,o,(p=c[U])!=null?p:c);break}if(I.match(x)){const U=hh(I);Yn(d[U],M,r,n,i,o,(E=c[U])!=null?E:c);break}}if($===s.length-1){if(Mr(d,r,n),Mr(d==null?void 0:d[I],r,n),Array.isArray(c)){c.push({[I]:d==null?void 0:d[I]});break}c[I]=d==null?void 0:d[I];break}c[I]={},d=d==null?void 0:d[I],c=c[I]}return a}function Mr(e,t,r){if(!e)return;const n=["read"];let i="";e.__identifier__&&e.__identifier__()==="Entity"&&(i=e.getEntityName()),e.__identifier__&&e.__identifier__()==="EntityCollection"&&(i=e.entity),i&&n.forEach(o=>{var s;const a=(s=t==null?void 0:t.permissions)==null?void 0:s[o];(!a||!a.includes(i))&&!r.includes(`${o}:${i}`)&&!(a!=null&&a.includes("*"))&&r.push(`${o}:${i}`)})}function hh(e){return Number.parseInt(e.replace("[","").replace("]",""))}var vh={name:"@shopware-ag/meteor-admin-sdk",version:"6.9.1",description:"The Meteor SDK for the Shopware Administration.",keywords:["iframe","shopware","admin","bridge","app","sdk"],repository:{type:"git",url:"git+ssh://git@github.com:shopware/meteor.git"},license:"MIT",exports:{"./es/channel":{import:"./es/channel.js",require:"./umd/channel.js"},"./es/data":{import:"./es/data/index.js",require:"./umd/data/index.js"},"./es/location":{import:"./es/location/index.js",require:"./umd/location/index.js"},"./es/_internals/privileges/missing-privileges-error":{import:"./es/_internals/privileges/missing-privileges-error.js",require:"./umd/_internals/privileges/missing-privileges-error.js"},"./es/_internals/data/selectData":{import:"./es/_internals/data/selectData.js",require:"./umd/_internals/data/selectData.js"},"./es/data/Criteria":{import:"./es/data/Criteria.js",require:"./umd/data/Criteria.js"},"./es/_internals/data/Entity":{import:"./es/_internals/data/Entity.js",require:"./umd/_internals/data/Entity.js"},"./es/_internals/data/EntityCollection":{import:"./es/_internals/data/EntityCollection.js",require:"./umd/_internals/data/EntityCollection.js"},"./es/data/repository":{import:"./es/data/repository.js",require:"./umd/data/repository.js"},"./es/data/data-table-filter.helper":{import:"./es/data/data-table-filter.helper.js",require:"./umd/data/data-table-filter.helper.js"},"./es/data/composables":{import:"./es/data/composables/index.js",require:"./umd/data/composables/index.js"},"./es/data/composables/useSharedState":{import:"./es/data/composables/useSharedState.js",require:"./umd/data/composables/useSharedState.js"},"./es/data/composables/useRepository":{import:"./es/data/composables/useRepository.js",require:"./umd/data/composables/useRepository.js"},"./es/data/composables/getRepository":{import:"./es/data/composables/getRepository.js",require:"./umd/data/composables/getRepository.js"},".":{import:"./es/index.js",require:"./umd/index.js"}},main:"./umd/index.js",module:"./es/index.js",types:"./es/index.d.ts",files:["umd","es","cdn"],scripts:{build:"rm -rf es && rm -rf umd && rm -rf cdn && npm run build:umd && npm run build:es && npm run build:cdn","build:cdn":"vite build --mode cdn","build:es":'tsc --project tsconfig.json --outDir "./es"',"build:umd":'tsc --project tsconfig.json --module umd --outDir "./umd"',"circular-dependencies":"madge --circular --warning src","circular-dependencies:image":"madge --circular --warning --image ./dependency-graph.png src",dev:'concurrently "npm run dev:build-watch" "npm run dev:serve -- --port=8181" "npm run dev:serve -- --port=8182"',"dev:build-watch":"vite build --watch --mode example --emptyOutDir","dev:serve":"http-server testpageDist --silent","docs:env":'[ -d "../../../developer-portal" ] && ../../../developer-portal/docs-cli.cjs pull || (git clone git@github.com:shopware/developer-portal.git ../../../developer-portal && pnpm i -C ../../../developer-portal)',"docs:link":"../../../developer-portal/docs-cli.cjs link --src ../../docs/admin-sdk --dst resources/admin-extension-sdk --symlink","docs:preview":"../../../developer-portal/docs-cli.cjs preview","lint:all":"npm run lint:types && npm run lint:eslint","lint:eslint":"eslint ./src --ext .ts","lint:types":"tsc --noEmit",prepublish:"npm run build","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:8182 && playwright test"',"test:e2e:dev":"playwright test --project=chromium --reporter=list","test:e2e:dev-debug":"PWDEBUG=1 npm run test:e2e:dev","test:e2e:dev-watch":`chokidar "{e2e,src}/**/*.{js,ts}" -c 'clear && npm run test:e2e:dev' --initial`,"test:unit":"jest --collectCoverage","test:unit:watch":"npm run circular-dependencies && jest --watch"},dependencies:{"jwt-decode":"^4.0.0",localforage:"^1.10.0","lodash-es":"^4.17.21",semver:"^7.7.1"},devDependencies:{"@playwright/test":"^1.45.0","@types/jest":"^27.4.1","@types/lodash-es":"^4.17.12","@types/node":"^18.11.17","@typescript-eslint/eslint-plugin":"^5.47.0","@typescript-eslint/parser":"^8.36.0","chokidar-cli":"^3.0.0",concurrently:"^7.0.0",eslint:"^8.11.0","eslint-plugin-check-file":"^2.7.0","eslint-plugin-import":"^2.31.0","flush-promises":"^1.0.2","http-server":"^14.1.0",jest:"^27.5.1","jest-fail-on-console":"^2.2.3",madge:"^5.0.1","ts-jest":"^27.1.3",typescript:"^4.9.4",vite:"^2.8.6","vite-plugin-dts":"^0.9.10","vite-tsconfig-paths":"^3.4.1",vue:"^2.7.14","wait-on":"^6.0.1"}},gh=vh.version;const mh=gh,{serialize:ur,deserialize:pa}=la({handle:Bt,send:_e}),_h={},ha=new Set,Kn=new Set;function _e(e,t,r,n){const i=Nn(),o=t!=null?t:{};let s=ur({_type:e,_data:o,_callbackId:i});if(n){const p=Xn({serializedData:s,origin:n,privilegesToCheck:["read"],type:e});p&&(["datasetSubscribe","datasetUpdate","datasetRegistration","datasetGet"].includes(s._type)?s=ur({_type:s._type,_callbackId:s._callbackId,_data:{id:s._data.id,data:p}}):s=ur({_type:s._type,_callbackId:s._callbackId,_data:p}))}const c=JSON.stringify(s);let d=!1;const l=7e3;return new Promise((p,E)=>{const $=function(P){if(typeof P.data!="string"||P.data.indexOf(`"_callbackId":"${i}"`)===-1)return;let M;try{M=JSON.parse(P.data)}catch{return}if(!Eh(M)||!M.hasOwnProperty("_response"))return;const U=pa(M,P);if(window.removeEventListener("message",$),!d){d=!0;const q=U._response;if(q instanceof Error){E(q);return}p(q)}};window.addEventListener("message",$);let x=!0;try{x=!window.parent.origin}catch{}let I=x?document.referrer:window.parent.origin;n&&(I=n),r?r.postMessage(c,I):window.parent.postMessage(c,I),setTimeout(()=>{d||E("Send timeout expired. It could be possible that no handler for the postMessage request exists or that the handler freezed.")},l)})}function Bt(e,t){const r=async function(n){var l;if(typeof n.data!="string"||n.data.indexOf(`"_type":"${e}"`)===-1)return;let i;try{i=JSON.parse(n.data)}catch{return}if(!bh(i))return;const o=pa(i,n),a=await Promise.resolve((()=>{if(!["datasetSubscribe","datasetGet","datasetUpdate","_collectionTest"].includes(e))return t(o._data,{_event_:n});const E=Xn({serializedData:i,origin:n.origin,type:e,privilegesToCheck:["create","delete","update","read"]});return E||t(o._data,{_event_:n})})()).catch(p=>ph(e,p)),s={_callbackId:o._callbackId,_type:o._type,_response:a!=null?a:null},c=(()=>{let p=ur(s);if(!["datasetSubscribe","datasetGet","_collectionTest"].includes(e))return p;const $=Xn({serializedData:p,origin:n.origin,privilegesToCheck:["read"],type:e});return $&&(p._response=$,p=ur(p)),p})(),d=JSON.stringify(c);n.source?n.source.postMessage(d,{targetOrigin:(l=n.origin)!=null?l:"*"}):window.postMessage(d,window.origin)};return window.addEventListener("message",r),()=>window.removeEventListener("message",r)}function Jn(e,t){return Bt(e,t)}function z(e,t){return r=>_e(e,{...t,...r})}function va(e){return t=>Bt(e,t)}function ga(e){return(t,r)=>r?Jn(e,i=>{i.id===r&&t(i)}):Jn(e,t)}const Zn=new Map;(async()=>{Bt("__registerWindow__",({sdkVersion:e},t)=>{let r,n;t._event_.source?(r=t._event_.source,n=t._event_.origin):(r=window,n=window.origin),ha.add({source:r,origin:n,sdkVersion:e})}),Bt("datasetSubscribeRegistration",(e,{_event_:t})=>{let r,n;t.source?(r=t.source,n=t.origin):(r=window,n=window.origin),Kn.add({id:e.id,source:r,origin:n,selectors:e.selectors});const i=Zn.get(e.id);if(i){const o=da(i,e.selectors,"datasetSubscribe",n);if(o instanceof Xe){console.error(o);return}_e("datasetSubscribe",{id:e.id,data:o,selectors:e.selectors},r,n)}}),await _e("__registerWindow__",{sdkVersion:mh})})().catch(e=>console.error(e));async function yh(e){return Zn.set(e.id,e.data),Kn.forEach(({id:t,selectors:r,source:n,origin:i})=>{if(t!==e.id)return;const o=da(e.data,r,"datasetSubscribe",i);o instanceof Xe&&console.error(o),_e("datasetSubscribe",{id:t,data:o,selectors:r},n,i).catch(()=>{})}),Promise.resolve()}window._swsdk={sourceRegistry:ha,subscriberRegistry:Kn,datasets:Zn,adminExtensions:_h};function bh(e){const t=e;return!!t._type&&!!t._data&&!!t._callbackId}function Eh(e){const t=e;return!!t._type&&!!t.hasOwnProperty("_response")&&!!t._callbackId}const wh=z("windowRedirect"),Sh=z("windowRouterPush"),$h=z("windowReload",{}),Ih=z("windowGetId"),Th=z("windowRouterGetPath");var Oh=Object.freeze(Object.defineProperty({__proto__:null,redirect:wh,routerPush:Sh,reload:$h,getId:Ih,getPath:Th},Symbol.toStringTag,{value:"Module"}));const Ah=z("notificationDispatch");var Ch=Object.freeze(Object.defineProperty({__proto__:null,dispatch:Ah},Symbol.toStringTag,{value:"Module"}));const Rh=z("toastDispatch");var Nh=Object.freeze(Object.defineProperty({__proto__:null,dispatch:Rh},Symbol.toStringTag,{value:"Module"})),Fr=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{};function Ur(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var ma=typeof process=="object"&&process.env&&{}.NODE_DEBUG&&/\bsemver\b/i.test({}.NODE_DEBUG)?(...e)=>console.error("SEMVER",...e):()=>{};const Ph="2.0.0",_a=256,xh=Number.MAX_SAFE_INTEGER||9007199254740991,jh=16,Lh=_a-6;var ya={MAX_LENGTH:_a,MAX_SAFE_COMPONENT_LENGTH:jh,MAX_SAFE_BUILD_LENGTH:Lh,MAX_SAFE_INTEGER:xh,RELEASE_TYPES:["major","premajor","minor","preminor","patch","prepatch","prerelease"],SEMVER_SPEC_VERSION:Ph,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2},Qn={exports:{}};(function(e,t){const{MAX_SAFE_COMPONENT_LENGTH:r,MAX_SAFE_BUILD_LENGTH:n,MAX_LENGTH:i}=ya,o=ma;t=e.exports={};const a=t.re=[],s=t.safeRe=[],c=t.src=[],d=t.safeSrc=[],l=t.t={};let p=0;const E="[a-zA-Z0-9-]",$=[["\\s",1],["\\d",i],[E,n]],x=P=>{for(const[M,U]of $)P=P.split(`${M}*`).join(`${M}{0,${U}}`).split(`${M}+`).join(`${M}{1,${U}}`);return P},I=(P,M,U)=>{const q=x(M),oe=p++;o(P,oe,M),l[P]=oe,c[oe]=M,d[oe]=q,a[oe]=new RegExp(M,U?"g":void 0),s[oe]=new RegExp(q,U?"g":void 0)};I("NUMERICIDENTIFIER","0|[1-9]\\d*"),I("NUMERICIDENTIFIERLOOSE","\\d+"),I("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${E}*`),I("MAINVERSION",`(${c[l.NUMERICIDENTIFIER]})\\.(${c[l.NUMERICIDENTIFIER]})\\.(${c[l.NUMERICIDENTIFIER]})`),I("MAINVERSIONLOOSE",`(${c[l.NUMERICIDENTIFIERLOOSE]})\\.(${c[l.NUMERICIDENTIFIERLOOSE]})\\.(${c[l.NUMERICIDENTIFIERLOOSE]})`),I("PRERELEASEIDENTIFIER",`(?:${c[l.NUMERICIDENTIFIER]}|${c[l.NONNUMERICIDENTIFIER]})`),I("PRERELEASEIDENTIFIERLOOSE",`(?:${c[l.NUMERICIDENTIFIERLOOSE]}|${c[l.NONNUMERICIDENTIFIER]})`),I("PRERELEASE",`(?:-(${c[l.PRERELEASEIDENTIFIER]}(?:\\.${c[l.PRERELEASEIDENTIFIER]})*))`),I("PRERELEASELOOSE",`(?:-?(${c[l.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${c[l.PRERELEASEIDENTIFIERLOOSE]})*))`),I("BUILDIDENTIFIER",`${E}+`),I("BUILD",`(?:\\+(${c[l.BUILDIDENTIFIER]}(?:\\.${c[l.BUILDIDENTIFIER]})*))`),I("FULLPLAIN",`v?${c[l.MAINVERSION]}${c[l.PRERELEASE]}?${c[l.BUILD]}?`),I("FULL",`^${c[l.FULLPLAIN]}$`),I("LOOSEPLAIN",`[v=\\s]*${c[l.MAINVERSIONLOOSE]}${c[l.PRERELEASELOOSE]}?${c[l.BUILD]}?`),I("LOOSE",`^${c[l.LOOSEPLAIN]}$`),I("GTLT","((?:<|>)?=?)"),I("XRANGEIDENTIFIERLOOSE",`${c[l.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),I("XRANGEIDENTIFIER",`${c[l.NUMERICIDENTIFIER]}|x|X|\\*`),I("XRANGEPLAIN",`[v=\\s]*(${c[l.XRANGEIDENTIFIER]})(?:\\.(${c[l.XRANGEIDENTIFIER]})(?:\\.(${c[l.XRANGEIDENTIFIER]})(?:${c[l.PRERELEASE]})?${c[l.BUILD]}?)?)?`),I("XRANGEPLAINLOOSE",`[v=\\s]*(${c[l.XRANGEIDENTIFIERLOOSE]})(?:\\.(${c[l.XRANGEIDENTIFIERLOOSE]})(?:\\.(${c[l.XRANGEIDENTIFIERLOOSE]})(?:${c[l.PRERELEASELOOSE]})?${c[l.BUILD]}?)?)?`),I("XRANGE",`^${c[l.GTLT]}\\s*${c[l.XRANGEPLAIN]}$`),I("XRANGELOOSE",`^${c[l.GTLT]}\\s*${c[l.XRANGEPLAINLOOSE]}$`),I("COERCEPLAIN",`(^|[^\\d])(\\d{1,${r}})(?:\\.(\\d{1,${r}}))?(?:\\.(\\d{1,${r}}))?`),I("COERCE",`${c[l.COERCEPLAIN]}(?:$|[^\\d])`),I("COERCEFULL",c[l.COERCEPLAIN]+`(?:${c[l.PRERELEASE]})?(?:${c[l.BUILD]})?(?:$|[^\\d])`),I("COERCERTL",c[l.COERCE],!0),I("COERCERTLFULL",c[l.COERCEFULL],!0),I("LONETILDE","(?:~>?)"),I("TILDETRIM",`(\\s*)${c[l.LONETILDE]}\\s+`,!0),t.tildeTrimReplace="$1~",I("TILDE",`^${c[l.LONETILDE]}${c[l.XRANGEPLAIN]}$`),I("TILDELOOSE",`^${c[l.LONETILDE]}${c[l.XRANGEPLAINLOOSE]}$`),I("LONECARET","(?:\\^)"),I("CARETTRIM",`(\\s*)${c[l.LONECARET]}\\s+`,!0),t.caretTrimReplace="$1^",I("CARET",`^${c[l.LONECARET]}${c[l.XRANGEPLAIN]}$`),I("CARETLOOSE",`^${c[l.LONECARET]}${c[l.XRANGEPLAINLOOSE]}$`),I("COMPARATORLOOSE",`^${c[l.GTLT]}\\s*(${c[l.LOOSEPLAIN]})$|^$`),I("COMPARATOR",`^${c[l.GTLT]}\\s*(${c[l.FULLPLAIN]})$|^$`),I("COMPARATORTRIM",`(\\s*)${c[l.GTLT]}\\s*(${c[l.LOOSEPLAIN]}|${c[l.XRANGEPLAIN]})`,!0),t.comparatorTrimReplace="$1$2$3",I("HYPHENRANGE",`^\\s*(${c[l.XRANGEPLAIN]})\\s+-\\s+(${c[l.XRANGEPLAIN]})\\s*$`),I("HYPHENRANGELOOSE",`^\\s*(${c[l.XRANGEPLAINLOOSE]})\\s+-\\s+(${c[l.XRANGEPLAINLOOSE]})\\s*$`),I("STAR","(<|>)?=?\\s*\\*"),I("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),I("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")})(Qn,Qn.exports);const Dh=Object.freeze({loose:!0}),Mh=Object.freeze({});var Fh=e=>e?typeof e!="object"?Dh:e:Mh;const ba=/^[0-9]+$/,Ea=(e,t)=>{const r=ba.test(e),n=ba.test(t);return r&&n&&(e=+e,t=+t),e===t?0:r&&!n?-1:n&&!r?1:e<t?-1:1};var Uh={compareIdentifiers:Ea,rcompareIdentifiers:(e,t)=>Ea(t,e)};const Br=ma,{MAX_LENGTH:wa,MAX_SAFE_INTEGER:zr}=ya,{safeRe:Sa,safeSrc:$a,t:Hr}=Qn.exports,Bh=Fh,{compareIdentifiers:zt}=Uh;class Be{constructor(t,r){if(r=Bh(r),t instanceof Be){if(t.loose===!!r.loose&&t.includePrerelease===!!r.includePrerelease)return t;t=t.version}else if(typeof t!="string")throw new TypeError(`Invalid version. Must be a string. Got type "${typeof t}".`);if(t.length>wa)throw new TypeError(`version is longer than ${wa} characters`);Br("SemVer",t,r),this.options=r,this.loose=!!r.loose,this.includePrerelease=!!r.includePrerelease;const n=t.trim().match(r.loose?Sa[Hr.LOOSE]:Sa[Hr.FULL]);if(!n)throw new TypeError(`Invalid Version: ${t}`);if(this.raw=t,this.major=+n[1],this.minor=+n[2],this.patch=+n[3],this.major>zr||this.major<0)throw new TypeError("Invalid major version");if(this.minor>zr||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>zr||this.patch<0)throw new TypeError("Invalid patch version");n[4]?this.prerelease=n[4].split(".").map(i=>{if(/^[0-9]+$/.test(i)){const o=+i;if(o>=0&&o<zr)return o}return i}):this.prerelease=[],this.build=n[5]?n[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(".")}`),this.version}toString(){return this.version}compare(t){if(Br("SemVer.compare",this.version,this.options,t),!(t instanceof Be)){if(typeof t=="string"&&t===this.version)return 0;t=new Be(t,this.options)}return t.version===this.version?0:this.compareMain(t)||this.comparePre(t)}compareMain(t){return t instanceof Be||(t=new Be(t,this.options)),zt(this.major,t.major)||zt(this.minor,t.minor)||zt(this.patch,t.patch)}comparePre(t){if(t instanceof Be||(t=new Be(t,this.options)),this.prerelease.length&&!t.prerelease.length)return-1;if(!this.prerelease.length&&t.prerelease.length)return 1;if(!this.prerelease.length&&!t.prerelease.length)return 0;let r=0;do{const n=this.prerelease[r],i=t.prerelease[r];if(Br("prerelease compare",r,n,i),n===void 0&&i===void 0)return 0;if(i===void 0)return 1;if(n===void 0)return-1;if(n===i)continue;return zt(n,i)}while(++r)}compareBuild(t){t instanceof Be||(t=new Be(t,this.options));let r=0;do{const n=this.build[r],i=t.build[r];if(Br("build compare",r,n,i),n===void 0&&i===void 0)return 0;if(i===void 0)return 1;if(n===void 0)return-1;if(n===i)continue;return zt(n,i)}while(++r)}inc(t,r,n){if(t.startsWith("pre")){if(!r&&n===!1)throw new Error("invalid increment argument: identifier is empty");if(r){const i=new RegExp(`^${this.options.loose?$a[Hr.PRERELEASELOOSE]:$a[Hr.PRERELEASE]}$`),o=`-${r}`.match(i);if(!o||o[1]!==r)throw new Error(`invalid identifier: ${r}`)}}switch(t){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",r,n);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",r,n);break;case"prepatch":this.prerelease.length=0,this.inc("patch",r,n),this.inc("pre",r,n);break;case"prerelease":this.prerelease.length===0&&this.inc("patch",r,n),this.inc("pre",r,n);break;case"release":if(this.prerelease.length===0)throw new Error(`version ${this.raw} is not a prerelease`);this.prerelease.length=0;break;case"major":(this.minor!==0||this.patch!==0||this.prerelease.length===0)&&this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":(this.patch!==0||this.prerelease.length===0)&&this.minor++,this.patch=0,this.prerelease=[];break;case"patch":this.prerelease.length===0&&this.patch++,this.prerelease=[];break;case"pre":{const i=Number(n)?1:0;if(this.prerelease.length===0)this.prerelease=[i];else{let o=this.prerelease.length;for(;--o>=0;)typeof this.prerelease[o]=="number"&&(this.prerelease[o]++,o=-2);if(o===-1){if(r===this.prerelease.join(".")&&n===!1)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(i)}}if(r){let o=[r,i];n===!1&&(o=[r]),zt(this.prerelease[0],r)===0?isNaN(this.prerelease[1])&&(this.prerelease=o):this.prerelease=o}break}default:throw new Error(`invalid increment argument: ${t}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}}var Ia=Be;const Ta=Ia;var Ht=(e,t,r)=>new Ta(e,r).compare(new Ta(t,r));const zh=Ht;var Hh=(e,t,r)=>zh(e,t,r)===0;const kh=Ht;var Gh=(e,t,r)=>kh(e,t,r)!==0;const Wh=Ht;var qh=(e,t,r)=>Wh(e,t,r)>0;const Xh=Ht;var Yh=(e,t,r)=>Xh(e,t,r)>=0;const Kh=Ht;var Jh=(e,t,r)=>Kh(e,t,r)<0;const Zh=Ht;var Qh=(e,t,r)=>Zh(e,t,r)<=0;const Vh=Hh,ev=Gh,tv=qh,rv=Yh,nv=Jh,iv=Qh;var ov=(e,t,r,n)=>{switch(t){case"===":return typeof e=="object"&&(e=e.version),typeof r=="object"&&(r=r.version),e===r;case"!==":return typeof e=="object"&&(e=e.version),typeof r=="object"&&(r=r.version),e!==r;case"":case"=":case"==":return Vh(e,r,n);case"!=":return ev(e,r,n);case">":return tv(e,r,n);case">=":return rv(e,r,n);case"<":return nv(e,r,n);case"<=":return iv(e,r,n);def