var x=Object.defineProperty;var O=n=>{throw TypeError(n)};var J=(n,t,e)=>t in n?x(n,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[t]=e;var y=(n,t,e)=>J(n,typeof t!="symbol"?t+"":t,e),m=(n,t,e)=>t.has(n)||O("Cannot "+e);var u=(n,t,e)=>(m(n,t,"read from private field"),e?e.call(n):t.get(n)),h=(n,t,e)=>t.has(n)?O("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(n):t.set(n,e),j=(n,t,e,s)=>(m(n,t,"write to private field"),s?s.call(n,e):t.set(n,e),e),l=(n,t,e)=>(m(n,t,"access private method"),e);import{J as N}from"./vue.esm-bundler.js?ver=1.4.1";import{A}from"./Arr.js?ver=1.4.1";class w{constructor(){y(this,"_data",{})}static form(t){const e=new this;return e._data=t,e}get(t=null,e=""){return t===null?this._data:A.get(this._data,t,e)}}var t,i,d,a,C,g;const r=class r{static onShopUpdate(t){u(r,d).push(t)}static setConfig(t){var e;if(l(e=r,a,g).call(e,t),Object.keys(r._data).forEach(s=>delete r._data[s]),Object.assign(r._data,t),u(r,i))try{u(r,i).postMessage({type:"set",config:JSON.parse(JSON.stringify(t))})}catch{}}static mergeConfig(t){var e;if(l(e=r,a,g).call(e,t),Object.assign(r._data,t),u(r,i))try{u(r,i).postMessage({type:"merge",config:JSON.parse(JSON.stringify(t))})}catch{}}static get(t=null,e=null){return t===null?r._data:w.form(r._data).get(t,e)}static assetUrl(t=""){return r.get("asset_url")+t}static get shop(){return w.form(r.get("shop"))}static get config(){return w.form(r.get("app_config"))}};i=new WeakMap,d=new WeakMap,a=new WeakSet,C=function(){u(r,d).forEach(t=>t())},g=function(t){if(!t||typeof t!="object")return;const e=document.createElement("textarea");t.shop&&t.shop.currency_sign&&(e.innerHTML=t.shop.currency_sign,t.shop.currency_sign=e.value),t.currency_signs&&typeof t.currency_signs=="object"&&Object.keys(t.currency_signs).forEach(function(s){e.innerHTML=t.currency_signs[s],t.currency_signs[s]=e.value})},h(r,a),y(r,"_data",N(window.fluentCartAdminApp||{})),h(r,i,null),h(r,d,[]),l(t=r,a,g).call(t,r._data),typeof BroadcastChannel<"u"&&(j(r,i,new BroadcastChannel("fluent-cart-config:"+window.location.origin)),u(r,i).onmessage=function(e){var c,o,p,S;const s=e.data;if(s){if(s.type==="merge"&&s.config)l(c=r,a,g).call(c,s.config),Object.assign(r._data,s.config),s.config.shop&&(l(o=r,a,C).call(o),window.dispatchEvent(new CustomEvent("fluentCartCurrencyChange")));else if(s.type==="set"&&s.config){l(p=r,a,g).call(p,s.config);const v=r._data.shop&&r._data.shop.currency_sign;Object.keys(r._data).forEach(_=>delete r._data[_]),Object.assign(r._data,s.config);const E=r._data.shop&&r._data.shop.currency_sign;v!==E&&(l(S=r,a,C).call(S),window.dispatchEvent(new CustomEvent("fluentCartCurrencyChange")))}}});let f=r;window.fluentCartAdminApp=f._data;function b(n){f.get("app_config.env")==="dev"&&f.get("trans")[n],n=f.get("trans")[n]||n;const t=Array.prototype.slice.call(arguments,1);if(t.length===0)return n;const e=/%(\d*\$?)s|%d/g;let s=0;return n=n.replace(e,(c,o)=>{if(o){const p=parseInt(o,10)-1;return p<t.length?t[p]:c}else return s<t.length?t[s++]:c}),n}function T(n,t,e,s=null){let c=parseInt(e.toString().replace(/,/g,""),10);return c>1?b(t,e):b(c===0?s??n:n,e)}function B(n){const t=f.get("datei18");n=n.toString();const s=(t.numericSystem||"0_1_2_3_4_5_6_7_8_9").split("_");return n.split("").map(o=>s[o]||o).join("")}export{f as A,B as a,T as p,b as t};
