superapp-miniapp-invoke-native 1.0.73 → 1.0.74
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/main.js +7 -0
- package/lib/main.umd.cjs +1 -1
- package/package.json +1 -1
package/lib/main.js
CHANGED
|
@@ -645,6 +645,13 @@ const $e = new xe(), Ue = Object.freeze(Object.defineProperty({ __proto__: null,
|
|
|
645
645
|
return s(this, null, function* () {
|
|
646
646
|
});
|
|
647
647
|
}
|
|
648
|
+
getMiniAppKong(n) {
|
|
649
|
+
return s(this, null, function* () {
|
|
650
|
+
return new Promise((e) => {
|
|
651
|
+
e(n);
|
|
652
|
+
});
|
|
653
|
+
});
|
|
654
|
+
}
|
|
648
655
|
} }, Symbol.toStringTag, { value: "Module" }));
|
|
649
656
|
export {
|
|
650
657
|
xe as NativeApi,
|
package/lib/main.umd.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(h,m){typeof exports=="object"&&typeof module!="undefined"?m(exports):typeof define=="function"&&define.amd?define(["exports"],m):m((h=typeof globalThis!="undefined"?globalThis:h||self).main={})})(this,function(h){"use strict";var Re=Object.defineProperty;var $e=(h,m,g)=>m in h?Re(h,m,{enumerable:!0,configurable:!0,writable:!0,value:g}):h[m]=g;var M=(h,m,g)=>($e(h,typeof m!="symbol"?m+"":m,g),g);var s=(h,m,g)=>new Promise((Y,I)=>{var A=C=>{try{H(g.next(C))}catch(u){I(u)}},D=C=>{try{H(g.throw(C))}catch(u){I(u)}},H=C=>C.done?Y(C.value):Promise.resolve(C.value).then(A,D);H((g=g.apply(h,m)).next())});var m=(t=>(t.DEV="dev",t.SIT="sit",t.UAT="uat",t.PROD="prod",t.TEST="test",t))(m||{}),g=(t=>(t.EU="eu",t.ASIA="asia",t))(g||{});/*! Capacitor: https://capacitorjs.com/ - MIT License */const Y=t=>t.CapacitorPlatforms=(e=>{const n=new Map;n.set("web",{name:"web"});const r=e.CapacitorPlatforms||{currentPlatform:{name:"web"},platforms:n};return r.addPlatform=(a,o)=>{r.platforms.set(a,o)},r.setPlatform=a=>{r.platforms.has(a)&&(r.currentPlatform=r.platforms.get(a))},r})(t),I=Y(typeof globalThis!="undefined"?globalThis:typeof self!="undefined"?self:typeof window!="undefined"?window:typeof global!="undefined"?global:{});var A;I.addPlatform,I.setPlatform,function(t){t.Unimplemented="UNIMPLEMENTED",t.Unavailable="UNAVAILABLE"}(A||(A={}));class D extends Error{constructor(e,n,r){super(e),this.message=e,this.code=n,this.data=r}}const H=t=>{var e,n,r,a,o;const d=t.CapacitorCustomPlatform||null,i=t.Capacitor||{},f=i.Plugins=i.Plugins||{},p=t.CapacitorPlatforms,y=((e=p==null?void 0:p.currentPlatform)===null||e===void 0?void 0:e.getPlatform)||(()=>d!==null?d.name:(c=>{var l,w;return c!=null&&c.androidBridge?"android":!((w=(l=c==null?void 0:c.webkit)===null||l===void 0?void 0:l.messageHandlers)===null||w===void 0)&&w.bridge?"ios":"web"})(t)),_=((n=p==null?void 0:p.currentPlatform)===null||n===void 0?void 0:n.isNativePlatform)||(()=>y()!=="web"),E=((r=p==null?void 0:p.currentPlatform)===null||r===void 0?void 0:r.isPluginAvailable)||(c=>{const l=b.get(c);return!!(l!=null&&l.platforms.has(y()))||!!x(c)}),x=((a=p==null?void 0:p.currentPlatform)===null||a===void 0?void 0:a.getPluginHeader)||(c=>{var l;return(l=i.PluginHeaders)===null||l===void 0?void 0:l.find(w=>w.name===c)}),b=new Map,P=((o=p==null?void 0:p.currentPlatform)===null||o===void 0?void 0:o.registerPlugin)||((c,l={})=>{const w=b.get(c);if(w)return console.warn(`Capacitor plugin "${c}" already registered. Cannot register plugins twice.`),w.proxy;const k=y(),R=x(c);let j;const ne=L=>{let N;const U=(...J)=>{const $=(()=>s(this,null,function*(){return!j&&k in l?j=j=typeof l[k]=="function"?yield l[k]():l[k]:d!==null&&!j&&"web"in l&&(j=j=typeof l.web=="function"?yield l.web():l.web),j}))().then(F=>{const we=((S,K)=>{var re,se;if(!R){if(S)return(se=S[K])===null||se===void 0?void 0:se.bind(S);throw new D(`"${c}" plugin is not implemented on ${k}`,A.Unimplemented)}{const ge=R==null?void 0:R.methods.find(B=>K===B.name);if(ge)return ge.rtype==="promise"?B=>i.nativePromise(c,K.toString(),B):(B,He)=>i.nativeCallback(c,K.toString(),B,He);if(S)return(re=S[K])===null||re===void 0?void 0:re.bind(S)}})(F,L);if(we){const S=we(...J);return N=S==null?void 0:S.remove,S}throw new D(`"${c}.${L}()" is not implemented on ${k}`,A.Unimplemented)});return L==="addListener"&&($.remove=()=>s(this,null,function*(){return N()})),$};return U.toString=()=>`${L.toString()}() { [capacitor code] }`,Object.defineProperty(U,"name",{value:L,writable:!1,configurable:!1}),U},me=ne("addListener"),fe=ne("removeListener"),De=(L,N)=>{const U=me({eventName:L},N),J=()=>s(this,null,function*(){const F=yield U;fe({eventName:L,callbackId:F},N)}),$=new Promise(F=>U.then(()=>F({remove:J})));return $.remove=()=>s(this,null,function*(){console.warn("Using addListener() without 'await' is deprecated."),yield J()}),$},ae=new Proxy({},{get(L,N){switch(N){case"$$typeof":return;case"toJSON":return()=>({});case"addListener":return R?De:me;case"removeListener":return fe;default:return ne(N)}}});return f[c]=ae,b.set(c,{name:c,proxy:ae,platforms:new Set([...Object.keys(l),...R?[k]:[]])}),ae});return i.convertFileSrc||(i.convertFileSrc=c=>c),i.getPlatform=y,i.handleError=c=>t.console.error(c),i.isNativePlatform=_,i.isPluginAvailable=E,i.pluginMethodNoop=(c,l,w)=>Promise.reject(`${w} does not have an implementation of "${l}".`),i.registerPlugin=P,i.Exception=D,i.DEBUG=!!i.DEBUG,i.isLoggingEnabled=!!i.isLoggingEnabled,i.platform=i.getPlatform(),i.isNative=i.isNativePlatform(),i},C=t=>t.Capacitor=H(t),u=C(typeof globalThis!="undefined"?globalThis:typeof self!="undefined"?self:typeof window!="undefined"?window:typeof global!="undefined"?global:{}),Z=u.registerPlugin;u.Plugins;class O{constructor(e){this.listeners={},this.windowListeners={},e&&(console.warn(`Capacitor WebPlugin "${e.name}" config object was deprecated in v3 and will be removed in v4.`),this.config=e)}addListener(e,n){this.listeners[e]||(this.listeners[e]=[]),this.listeners[e].push(n);const r=this.windowListeners[e];r&&!r.registered&&this.addWindowListener(r);const a=()=>s(this,null,function*(){return this.removeListener(e,n)}),o=Promise.resolve({remove:a});return Object.defineProperty(o,"remove",{value:()=>s(this,null,function*(){console.warn("Using addListener() without 'await' is deprecated."),yield a()})}),o}removeAllListeners(){return s(this,null,function*(){this.listeners={};for(const e in this.windowListeners)this.removeWindowListener(this.windowListeners[e]);this.windowListeners={}})}notifyListeners(e,n){const r=this.listeners[e];r&&r.forEach(a=>a(n))}hasListeners(e){return!!this.listeners[e].length}registerWindowListener(e,n){this.windowListeners[n]={registered:!1,windowEventName:e,pluginEventName:n,handler:r=>{this.notifyListeners(n,r)}}}unimplemented(e="not implemented"){return new u.Exception(e,A.Unimplemented)}unavailable(e="not available"){return new u.Exception(e,A.Unavailable)}removeListener(e,n){return s(this,null,function*(){const r=this.listeners[e];if(!r)return;const a=r.indexOf(n);this.listeners[e].splice(a,1),this.listeners[e].length||this.removeWindowListener(this.windowListeners[e])})}addWindowListener(e){window.addEventListener(e.windowEventName,e.handler),e.registered=!0}removeWindowListener(e){e&&(window.removeEventListener(e.windowEventName,e.handler),e.registered=!1)}}const oe=t=>encodeURIComponent(t).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape),ie=t=>t.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent);class ve extends O{getCookies(){return s(this,null,function*(){const e=document.cookie,n={};return e.split(";").forEach(r=>{if(r.length<=0)return;let[a,o]=r.replace(/=/,"CAP_COOKIE").split("CAP_COOKIE");a=ie(a).trim(),o=ie(o).trim(),n[a]=o}),n})}setCookie(e){return s(this,null,function*(){try{const n=oe(e.key),r=oe(e.value),a=`; expires=${(e.expires||"").replace("expires=","")}`,o=(e.path||"/").replace("path=",""),d=e.url!=null&&e.url.length>0?`domain=${e.url}`:"";document.cookie=`${n}=${r||""}${a}; path=${o}; ${d};`}catch(n){return Promise.reject(n)}})}deleteCookie(e){return s(this,null,function*(){try{document.cookie=`${e.key}=; Max-Age=0`}catch(n){return Promise.reject(n)}})}clearCookies(){return s(this,null,function*(){try{const e=document.cookie.split(";")||[];for(const n of e)document.cookie=n.replace(/^ +/,"").replace(/=.*/,`=;expires=${new Date().toUTCString()};path=/`)}catch(e){return Promise.reject(e)}})}clearAllCookies(){return s(this,null,function*(){try{yield this.clearCookies()}catch(e){return Promise.reject(e)}})}}Z("CapacitorCookies",{web:()=>new ve});const he=(t,e={})=>{const n=Object.assign({method:t.method||"GET",headers:t.headers},e),r=((a={})=>{const o=Object.keys(a);return Object.keys(a).map(d=>d.toLocaleLowerCase()).reduce((d,i,f)=>(d[i]=a[o[f]],d),{})})(t.headers)["content-type"]||"";if(typeof t.data=="string")n.body=t.data;else if(r.includes("application/x-www-form-urlencoded")){const a=new URLSearchParams;for(const[o,d]of Object.entries(t.data||{}))a.set(o,d);n.body=a.toString()}else if(r.includes("multipart/form-data")){const a=new FormData;if(t.data instanceof FormData)t.data.forEach((d,i)=>{a.append(i,d)});else for(const d of Object.keys(t.data))a.append(d,t.data[d]);n.body=a;const o=new Headers(n.headers);o.delete("content-type"),n.headers=o}else(r.includes("application/json")||typeof t.data=="object")&&(n.body=JSON.stringify(t.data));return n};class ye extends O{request(e){return s(this,null,function*(){const n=he(e,e.webFetchExtra),r=((_,E=!0)=>_?Object.entries(_).reduce((x,b)=>{const[P,c]=b;let l,w;return Array.isArray(c)?(w="",c.forEach(k=>{l=E?encodeURIComponent(k):k,w+=`${P}=${l}&`}),w.slice(0,-1)):(l=E?encodeURIComponent(c):c,w=`${P}=${l}`),`${x}&${w}`},"").substr(1):null)(e.params,e.shouldEncodeUrlParams),a=r?`${e.url}?${r}`:e.url,o=yield fetch(a,n),d=o.headers.get("content-type")||"";let i,f,{responseType:p="text"}=o.ok?e:{};switch(d.includes("application/json")&&(p="json"),p){case"arraybuffer":case"blob":f=yield o.blob(),i=yield(_=>s(this,null,function*(){return new Promise((E,x)=>{const b=new FileReader;b.onload=()=>{const P=b.result;E(P.indexOf(",")>=0?P.split(",")[1]:P)},b.onerror=P=>x(P),b.readAsDataURL(_)})}))(f);break;case"json":i=yield o.json();break;default:i=yield o.text()}const y={};return o.headers.forEach((_,E)=>{y[E]=_}),{data:i,headers:y,status:o.status,url:o.url}})}get(e){return s(this,null,function*(){return this.request(Object.assign(Object.assign({},e),{method:"GET"}))})}post(e){return s(this,null,function*(){return this.request(Object.assign(Object.assign({},e),{method:"POST"}))})}put(e){return s(this,null,function*(){return this.request(Object.assign(Object.assign({},e),{method:"PUT"}))})}patch(e){return s(this,null,function*(){return this.request(Object.assign(Object.assign({},e),{method:"PATCH"}))})}delete(e){return s(this,null,function*(){return this.request(Object.assign(Object.assign({},e),{method:"DELETE"}))})}}function Q(){return u.getPlatform()==="android"?JSON.parse(AndroidInitialContext.initialContext()):window.portalInitialContext}Z("CapacitorHttp",{web:()=>new ye}),Z("Portals",{web:()=>Promise.resolve().then(function(){return _e}).then(t=>new t.PortalsWeb)});const _e=Object.freeze({__proto__:null,PortalsWeb:class extends O{publishNative(t){return s(this,null,function*(){})}}}),ee=t=>{var e,n,r;if(typeof window!="undefined"&&Q&&((e=Q())!=null&&e.value)){const a=(r=(n=Q())==null?void 0:n.value)!=null?r:null;if(!a)return void console.error("native initialContext is undefine");if(!t)return void console.error("initialContext call back is undefine");t(a)}},be=t=>new Promise(e=>s(this,null,function*(){let n=null;n=t!=null&&t.mockData?t.mockData:((r,{asiaUatData:a,euSitData:o,euUatData:d})=>{var y,_;const i=(y=r.mockServerInfo)==null?void 0:y.env,f=(_=r.mockServerInfo)==null?void 0:_.area;let p=null;return i&&f&&(g.ASIA===f?m.UAT===i&&(p=a):g.EU===f&&(m.SIT===i?p=o:m.UAT===i&&(p=d))),p})(t,{asiaUatData:yield Promise.resolve().then(()=>je),euSitData:yield Promise.resolve().then(()=>xe),euUatData:yield Promise.resolve().then(()=>Ue)}),e(n?n!=null&&n.default?n==null?void 0:n.default:n:null)})),X=class X{isNative(){return s(this,null,function*(){return yield(()=>{let e=!1;return ee(n=>{e=!!(n!=null&&n.isNative)}),e})()})}redirectPage(e){return s(this,null,function*(){yield(({callBack:n})=>{ee(r=>{var o;if(!(r!=null&&r.params))return void console.info("initial context native params is undefine");const a=(o=r==null?void 0:r.params)!=null?o:null;a&&(n?n(a):console.error("initial context call back is undefine"))})})(e)})}getNativeInfo(e){return s(this,null,function*(){const n=e!=null&&e.mockServerInfo||e!=null&&e.mockData?e:X.defaultNativeAppInfoConfig;return(yield this.isNative())?yield(()=>{let r=null;return ee(a=>{r=a!=null?a:null}),r})():yield be(n)})}};M(X,"defaultNativeAppInfoConfig",{mockServerInfo:{area:g.ASIA,env:m.UAT}});let te=X;const V=()=>{let t={};return typeof window!="undefined"&&(t=window),t},W="CommunicatePlugin",v=u.registerPlugin(W,{web:()=>Promise.resolve().then(()=>Ie).then(t=>new t.PluginsWeb)}),q=V();q.removeAddListenerFab=()=>null;const Pe=t=>{var n,r;q.removeAddListenerFab&&q.removeAddListenerFab();const e=[];(n=v.showFABMenu)==null||n.call(v,{fabMenu:e}),t&&((r=Object.keys(t))!=null&&r.length)&&(Object.keys(t).forEach(a=>{var o,d,i,f,p,y;e.push({icon:(d=(o=t==null?void 0:t[a])==null?void 0:o.icon)!=null?d:"",id:(f=(i=t==null?void 0:t[a])==null?void 0:i.id)!=null?f:"",name:(y=(p=t==null?void 0:t[a])==null?void 0:p.title)!=null?y:""})}),queueMicrotask(()=>{var a;(a=v.showFABMenu)==null||a.call(v,{fabMenu:e})}),setTimeout(()=>{(a=>s(this,null,function*(){a&&(q.removeAddListenerFab=yield(o=>s(this,null,function*(){if(u.addListener){const d=yield u.addListener(W,"nativeSendFab",i=>o&&o(i));return d!=null&&d.remove?d.remove:()=>null}}))(a))}))(a=>{let o;a!=null&&a.id&&(Object.keys(t).forEach(d=>{var i,f,p;(i=t==null?void 0:t[d])!=null&&i.id&&a.id===t[d].id&&(o=(p=(f=t[d])==null?void 0:f.fn)!=null?p:()=>null)}),typeof o=="function"&&o())})}))},T=V();T.addListenerBackRemoveHandle=()=>null;const de=(t=()=>null)=>s(this,null,function*(){T!=null&&T.addListenerBackRemoveHandle&&typeof T.addListenerBackRemoveHandle=="function"&&T.addListenerBackRemoveHandle(),T.addListenerBackRemoveHandle=yield(e=>s(this,null,function*(){if(u.addListener){const n=yield u.addListener(W,"nativeSendBack",r=>e&&e(r));return n!=null&&n.remove?n.remove:()=>null}}))(t)}),z=V();z.addListenerHomeHandle=()=>null;const ke=t=>{z.addListenerHomeHandle&&z.addListenerHomeHandle(),setTimeout(()=>{(e=>s(this,null,function*(){e&&(z.addListenerHomeHandle=yield(n=>s(this,null,function*(){if(u.addListener){const r=yield u.addListener(W,"nativeSendHome",a=>n&&n(a));return r!=null&&r.remove?r.remove:()=>null}}))(e))}))(t)})};class Se{constructor(){this.homeBtnSwitch({isClick:!0})}homeBtnSwitch(e){return s(this,null,function*(){var n;return yield(n=v.homeIsClick)==null?void 0:n.call(v,e)})}setBackBtn(e){(n=>{const{mounted:r,beforeUnmount:a,callBack:o}=n;r(()=>{de(o)}),a(()=>{de()})})(e)}setHomeBtn(e){ke(e)}setFabBtn(e){Pe(e)}openMiniApp(e){return s(this,null,function*(){return yield v.openMiniApp(e)})}showTitle(e){return s(this,null,function*(){return yield v.showTitle(e)})}showSubMask(e){return s(this,null,function*(){return yield v.showSubMask(e)})}setMiniAppVersion(e){return s(this,null,function*(){return yield v.setMiniAppVersion(e)})}showNativeLoading(){return s(this,null,function*(){return yield v.showDialog()})}cancelNativeLoading(){return s(this,null,function*(){return yield v.cancelDialog()})}}const Ce=u.registerPlugin("CameraScanPlugin",{web:new class extends O{pickCameraScan(t){return s(this,null,function*(){return new Promise(e=>{e(t)})})}}});window.removeAddListenerCameraScan=()=>null;class Le{pickCameraScan(e){return s(this,null,function*(){return yield Ce.pickCameraScan(e)})}}const Ae=u.registerPlugin("CameraScanMultiplePlugin",{web:new class extends O{pickCameraScanMultiple(){return s(this,null,function*(){})}}});class Oe{pickCameraScanMultiple(e){return s(this,null,function*(){return yield Ae.pickCameraScanMultiple(e)})}}const Ee=u.registerPlugin("CameraScanMultipleNoCountPlugin",{web:new class extends O{pickCameraScanMultipleNoCount(){return s(this,null,function*(){})}}});class Ne{pickCameraScanMultipleNoCount(e){return s(this,null,function*(){return yield Ee.pickCameraScanMultipleNoCount(e)})}}const ce="LaserScanPlugin",le=u.registerPlugin(ce,{web:new class extends O{pickLaserScan(){return s(this,null,function*(){})}unPickLaserScan(){return s(this,null,function*(){})}}}),G=V();G.removeAddListenerLaserScan=()=>null;const pe=(t=()=>null)=>{G.removeAddListenerLaserScan&&G.removeAddListenerLaserScan();const e=n=>s(this,null,function*(){n&&(G.removeAddListenerLaserScan=yield(r=>s(this,null,function*(){if(u.addListener){const a=yield u.addListener(ce,"nativeSendLaser",o=>r&&r(o));return a!=null&&a.remove?a.remove:()=>null}}))(n))});setTimeout(()=>{e(t)})};class Me{constructor(){this.pickLaserScan()}pickLaserScan(){return s(this,null,function*(){le.pickLaserScan({isContinue:!1})})}unPickLaserScan(){return s(this,null,function*(){le.unPickLaserScan()})}setLaserScan(e){(n=>{const{mounted:r,beforeUnmount:a,callBack:o}=n;r(()=>{pe(o)}),a(()=>{pe()})})(e)}}class ue{constructor(){M(this,"initialContextPlugins",new te);M(this,"communicatePlugins",new Se);M(this,"cameraScanPlugins",new Le);M(this,"cameraScanMultiplePlugins",new Oe);M(this,"cameraScanMultipleNoCountPlugins",new Ne);M(this,"laserScanPlugins",new Me)}}const Te=new ue,je=Object.freeze(Object.defineProperty({__proto__:null,default:{data_info:{bu:{default_tenant_code:"WTCHK",tenants:[{store_detail_list:[{name:"APELDOORN HOOFDSTRAAT 136",code:"3462"}],name:"WTCHK",stores:["3462"],timezone:"Europe/Amsterdam",code:"WTCHK"}]},menus:[{code:"osp-superapp-inventory",id:"6113847737833037825",name:"Inventory",parent_id:"0"},{code:"osp-superapp-event-count",id:"6113867563402076161",name:"Event Count",parent_id:"6113847737833037825"},{code:"osp-superapp-shelf-fulfillment",id:"6113867975718936577",name:"Shelf Fulfillment",parent_id:"6113847737833037825"},{code:"osp-superapp-reports",id:"6113868456755273729",name:"Reports",parent_id:"0"},{code:"osp-superapp-user-management",id:"6113868869072134145",name:"User Management",parent_id:"0"},{code:"osp-superapp-online-orders",id:"6318558832782852097",name:"Online Orders",parent_id:"0"},{code:"osp-superapp-pick-pack-orders",id:"6318559348178927617",name:"Pick & Pack Orders",parent_id:"6318558832782852097"},{code:"osp-superapp-collect-orders",id:"6318559863575003137",name:"Collect Orders",parent_id:"6318558832782852097"},{code:"osp-superapp-collect-orders@unpack_orders/home",id:"6318560756928200705",name:"Unpack Orders",parent_id:"6318558832782852097"},{code:"osp-superapp-collect-orders@orders_collect/search",id:"6318561856439828481",name:"Search Orders",parent_id:"6318558832782852097"}],serverInfo:{serverArea:"asia",serverEnv:"uat"},token:{access_token:"2c0d362e-5835-4bac-b168-a00ac9856998",expires_in:86399,refresh_token:"992e3a36-fd27-4074-af15-f09a4a939b67",scope:"read write",token_type:"bearer"},user:{create_time:"2023-08-22 11: 08: 21",email:"ospsuperapp2@163.com",gender:"",id:"6113892817809776640",introduction:"",language:"en",last_modify_time:"2023-08-24 10: 53: 32",password_strength_name:"MIDDLE",password_validity_period:"PERMANENT",password_validity_period_time:"2856-12-22 11: 08: 21",phone:"",real_name:"ospsuperapp2",special:"false",status:"NORMAL",tenant_id:"0",time_zone:"Europe/Amsterdam",type:"STAFF",user_name:"ospsuperapp2",errorCode:0,errorMessage:"",requseCodeTag:4,success:!1}},data_store:{name:"APELDOORN HOOFDSTRAAT 3462",code:"3462"},data_language:{code:"en",id:"en_US",name:"English"},data_kong:{token:{access_token:"OLXyjfmHGolOdt7NMLvzh4VEAFRRHZAf",expires_in:86400,token_type:"bearer"}}}},Symbol.toStringTag,{value:"Module"})),xe=Object.freeze(Object.defineProperty({__proto__:null,default:{data_info:{bu:{default_tenant_code:"KVN",tenants:[{code:"KVN",name:"KVN",store_detail_list:[{buCode:"KVN",code:"9998",name:"KVNL 9998"}],stores:["9998"],timezone:"Europe/Amsterdam"}],errorCode:0,errorMessage:"",requseCodeTag:6,success:!1},menus:[{code:"osp-superapp-inventory",id:"6113847737833037825",name:"Inventory",parent_id:"0"},{code:"osp-superapp-event-count",id:"6113867563402076161",name:"Event Count",parent_id:"6113847737833037825"},{code:"osp-superapp-shelf-fulfillment",id:"6113867975718936577",name:"Shelf Fulfillment",parent_id:"6113847737833037825"},{code:"osp-superapp-reports",id:"6113868456755273729",name:"Reports",parent_id:"0"},{code:"osp-superapp-user-management",id:"6113868869072134145",name:"User Management",parent_id:"0"},{code:"osp-superapp-online-orders",id:"6318558832782852097",name:"Online Orders",parent_id:"0"},{code:"osp-superapp-pick-pack-orders",id:"6318559348178927617",name:"Pick & Pack Orders",parent_id:"6318558832782852097"},{code:"osp-superapp-collect-orders",id:"6318559863575003137",name:"Collect Orders",parent_id:"6318558832782852097"},{code:"osp-superapp-collect-orders@unpack_orders/home",id:"6318560756928200705",name:"Unpack Orders",parent_id:"6318558832782852097"},{code:"osp-superapp-collect-orders@orders_collect/search",id:"6318561856439828481",name:"Search Orders",parent_id:"6318558832782852097"}],serverInfo:{serverArea:"eu",serverEnv:"sit"},token:{access_token:"2c0d362e-5835-4bac-b168-a00ac9856998",expires_in:86399,refresh_token:"992e3a36-fd27-4074-af15-f09a4a939b67",scope:"read write",token_type:"bearer"},user:{create_time:"2023-08-22 11: 08: 21",email:"ospsuperapp2@163.com",gender:"",id:"6113892817809776640",introduction:"",language:"en",last_modify_time:"2023-08-24 10: 53: 32",password_strength_name:"MIDDLE",password_validity_period:"PERMANENT",password_validity_period_time:"2856-12-22 11: 08: 21",phone:"",real_name:"ospsuperapp2",special:"false",status:"NORMAL",tenant_id:"0",time_zone:"Europe/Amsterdam",type:"STAFF",user_name:"ospsuperapp2",errorCode:0,errorMessage:"",requseCodeTag:4,success:!1}},data_store:{buCode:"KVN",code:"9998",name:"KVNL 9998"},data_language:{code:"en",id:"en_US",name:"English"},data_kong:{"X-ASW-APIKey":"6j2AHemxmsGMmIs9rtdys0DK04Hag6s1","EVC-X-ASW-APIKey":"6j2AHemxmsGMmIs9rtdys0DK04Hag6s1"}}},Symbol.toStringTag,{value:"Module"})),Ue=Object.freeze(Object.defineProperty({__proto__:null,default:{data_info:{bu:{default_tenant_code:"KVN",tenants:[{code:"KVN",name:"KVN",store_detail_list:[{buCode:"KVN",code:"9998",name:"KVNL 9998"}],stores:["9998"],timezone:"Europe/Amsterdam"}],errorCode:0,errorMessage:"",requseCodeTag:6,success:!1},menus:[{code:"osp-superapp-inventory",id:"6113847737833037825",name:"Inventory",parent_id:"0"},{code:"osp-superapp-event-count",id:"6113867563402076161",name:"Event Count",parent_id:"6113847737833037825"},{code:"osp-superapp-shelf-fulfillment",id:"6113867975718936577",name:"Shelf Fulfillment",parent_id:"6113847737833037825"},{code:"osp-superapp-reports",id:"6113868456755273729",name:"Reports",parent_id:"0"},{code:"osp-superapp-user-management",id:"6113868869072134145",name:"User Management",parent_id:"0"},{code:"osp-superapp-online-orders",id:"6318558832782852097",name:"Online Orders",parent_id:"0"},{code:"osp-superapp-pick-pack-orders",id:"6318559348178927617",name:"Pick & Pack Orders",parent_id:"6318558832782852097"},{code:"osp-superapp-collect-orders",id:"6318559863575003137",name:"Collect Orders",parent_id:"6318558832782852097"},{code:"osp-superapp-collect-orders@unpack_orders/home",id:"6318560756928200705",name:"Unpack Orders",parent_id:"6318558832782852097"},{code:"osp-superapp-collect-orders@orders_collect/search",id:"6318561856439828481",name:"Search Orders",parent_id:"6318558832782852097"}],serverInfo:{serverArea:"eu",serverEnv:"sit"},token:{access_token:"2c0d362e-5835-4bac-b168-a00ac9856998",expires_in:86399,refresh_token:"992e3a36-fd27-4074-af15-f09a4a939b67",scope:"read write",token_type:"bearer"},user:{create_time:"2023-08-22 11: 08: 21",email:"ospsuperapp2@163.com",gender:"",id:"6113892817809776640",introduction:"",language:"en",last_modify_time:"2023-08-24 10: 53: 32",password_strength_name:"MIDDLE",password_validity_period:"PERMANENT",password_validity_period_time:"2856-12-22 11: 08: 21",phone:"",real_name:"ospsuperapp2",special:"false",status:"NORMAL",tenant_id:"0",time_zone:"Europe/Amsterdam",type:"STAFF",user_name:"ospsuperapp2",errorCode:0,errorMessage:"",requseCodeTag:4,success:!1}},data_store:{buCode:"KVN",code:"9998",name:"KVNL 9998"},data_language:{code:"en",id:"en_US",name:"English"},data_kong:{"X-ASW-APIKey":"axiBpmRYqN99pWG9r3horNTNgWxpvlfG","EVC-X-ASW-APIKey":"6j2AHemxmsGMmIs9rtdys0DK04Hag6s1"}}},Symbol.toStringTag,{value:"Module"})),Ie=Object.freeze(Object.defineProperty({__proto__:null,PluginsWeb:class extends O{homeIsClick(){return s(this,null,function*(){})}openMiniApp(t){return s(this,null,function*(){return new Promise(e=>{e(t)})})}showTitle(t){return s(this,null,function*(){return new Promise(e=>{e(t)})})}showFABMenu(t){return s(this,null,function*(){return new Promise(e=>{e(t)})})}showSubMask(t){return s(this,null,function*(){return new Promise(e=>{e(t)})})}setMiniAppVersion(t){return s(this,null,function*(){return new Promise(e=>{e(t)})})}showDialog(){return s(this,null,function*(){})}cancelDialog(){return s(this,null,function*(){})}}},Symbol.toStringTag,{value:"Module"}));h.NativeApi=ue,h.default=Te,Object.defineProperties(h,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
|
1
|
+
(function(h,m){typeof exports=="object"&&typeof module!="undefined"?m(exports):typeof define=="function"&&define.amd?define(["exports"],m):m((h=typeof globalThis!="undefined"?globalThis:h||self).main={})})(this,function(h){"use strict";var Re=Object.defineProperty;var $e=(h,m,g)=>m in h?Re(h,m,{enumerable:!0,configurable:!0,writable:!0,value:g}):h[m]=g;var M=(h,m,g)=>($e(h,typeof m!="symbol"?m+"":m,g),g);var s=(h,m,g)=>new Promise((Y,I)=>{var A=C=>{try{H(g.next(C))}catch(u){I(u)}},D=C=>{try{H(g.throw(C))}catch(u){I(u)}},H=C=>C.done?Y(C.value):Promise.resolve(C.value).then(A,D);H((g=g.apply(h,m)).next())});var m=(t=>(t.DEV="dev",t.SIT="sit",t.UAT="uat",t.PROD="prod",t.TEST="test",t))(m||{}),g=(t=>(t.EU="eu",t.ASIA="asia",t))(g||{});/*! Capacitor: https://capacitorjs.com/ - MIT License */const Y=t=>t.CapacitorPlatforms=(e=>{const n=new Map;n.set("web",{name:"web"});const r=e.CapacitorPlatforms||{currentPlatform:{name:"web"},platforms:n};return r.addPlatform=(a,o)=>{r.platforms.set(a,o)},r.setPlatform=a=>{r.platforms.has(a)&&(r.currentPlatform=r.platforms.get(a))},r})(t),I=Y(typeof globalThis!="undefined"?globalThis:typeof self!="undefined"?self:typeof window!="undefined"?window:typeof global!="undefined"?global:{});var A;I.addPlatform,I.setPlatform,function(t){t.Unimplemented="UNIMPLEMENTED",t.Unavailable="UNAVAILABLE"}(A||(A={}));class D extends Error{constructor(e,n,r){super(e),this.message=e,this.code=n,this.data=r}}const H=t=>{var e,n,r,a,o;const d=t.CapacitorCustomPlatform||null,i=t.Capacitor||{},f=i.Plugins=i.Plugins||{},p=t.CapacitorPlatforms,y=((e=p==null?void 0:p.currentPlatform)===null||e===void 0?void 0:e.getPlatform)||(()=>d!==null?d.name:(c=>{var l,w;return c!=null&&c.androidBridge?"android":!((w=(l=c==null?void 0:c.webkit)===null||l===void 0?void 0:l.messageHandlers)===null||w===void 0)&&w.bridge?"ios":"web"})(t)),_=((n=p==null?void 0:p.currentPlatform)===null||n===void 0?void 0:n.isNativePlatform)||(()=>y()!=="web"),E=((r=p==null?void 0:p.currentPlatform)===null||r===void 0?void 0:r.isPluginAvailable)||(c=>{const l=b.get(c);return!!(l!=null&&l.platforms.has(y()))||!!x(c)}),x=((a=p==null?void 0:p.currentPlatform)===null||a===void 0?void 0:a.getPluginHeader)||(c=>{var l;return(l=i.PluginHeaders)===null||l===void 0?void 0:l.find(w=>w.name===c)}),b=new Map,P=((o=p==null?void 0:p.currentPlatform)===null||o===void 0?void 0:o.registerPlugin)||((c,l={})=>{const w=b.get(c);if(w)return console.warn(`Capacitor plugin "${c}" already registered. Cannot register plugins twice.`),w.proxy;const k=y(),R=x(c);let j;const ne=L=>{let N;const U=(...J)=>{const $=(()=>s(this,null,function*(){return!j&&k in l?j=j=typeof l[k]=="function"?yield l[k]():l[k]:d!==null&&!j&&"web"in l&&(j=j=typeof l.web=="function"?yield l.web():l.web),j}))().then(F=>{const we=((S,K)=>{var re,se;if(!R){if(S)return(se=S[K])===null||se===void 0?void 0:se.bind(S);throw new D(`"${c}" plugin is not implemented on ${k}`,A.Unimplemented)}{const ge=R==null?void 0:R.methods.find(B=>K===B.name);if(ge)return ge.rtype==="promise"?B=>i.nativePromise(c,K.toString(),B):(B,He)=>i.nativeCallback(c,K.toString(),B,He);if(S)return(re=S[K])===null||re===void 0?void 0:re.bind(S)}})(F,L);if(we){const S=we(...J);return N=S==null?void 0:S.remove,S}throw new D(`"${c}.${L}()" is not implemented on ${k}`,A.Unimplemented)});return L==="addListener"&&($.remove=()=>s(this,null,function*(){return N()})),$};return U.toString=()=>`${L.toString()}() { [capacitor code] }`,Object.defineProperty(U,"name",{value:L,writable:!1,configurable:!1}),U},me=ne("addListener"),fe=ne("removeListener"),De=(L,N)=>{const U=me({eventName:L},N),J=()=>s(this,null,function*(){const F=yield U;fe({eventName:L,callbackId:F},N)}),$=new Promise(F=>U.then(()=>F({remove:J})));return $.remove=()=>s(this,null,function*(){console.warn("Using addListener() without 'await' is deprecated."),yield J()}),$},ae=new Proxy({},{get(L,N){switch(N){case"$$typeof":return;case"toJSON":return()=>({});case"addListener":return R?De:me;case"removeListener":return fe;default:return ne(N)}}});return f[c]=ae,b.set(c,{name:c,proxy:ae,platforms:new Set([...Object.keys(l),...R?[k]:[]])}),ae});return i.convertFileSrc||(i.convertFileSrc=c=>c),i.getPlatform=y,i.handleError=c=>t.console.error(c),i.isNativePlatform=_,i.isPluginAvailable=E,i.pluginMethodNoop=(c,l,w)=>Promise.reject(`${w} does not have an implementation of "${l}".`),i.registerPlugin=P,i.Exception=D,i.DEBUG=!!i.DEBUG,i.isLoggingEnabled=!!i.isLoggingEnabled,i.platform=i.getPlatform(),i.isNative=i.isNativePlatform(),i},C=t=>t.Capacitor=H(t),u=C(typeof globalThis!="undefined"?globalThis:typeof self!="undefined"?self:typeof window!="undefined"?window:typeof global!="undefined"?global:{}),Z=u.registerPlugin;u.Plugins;class O{constructor(e){this.listeners={},this.windowListeners={},e&&(console.warn(`Capacitor WebPlugin "${e.name}" config object was deprecated in v3 and will be removed in v4.`),this.config=e)}addListener(e,n){this.listeners[e]||(this.listeners[e]=[]),this.listeners[e].push(n);const r=this.windowListeners[e];r&&!r.registered&&this.addWindowListener(r);const a=()=>s(this,null,function*(){return this.removeListener(e,n)}),o=Promise.resolve({remove:a});return Object.defineProperty(o,"remove",{value:()=>s(this,null,function*(){console.warn("Using addListener() without 'await' is deprecated."),yield a()})}),o}removeAllListeners(){return s(this,null,function*(){this.listeners={};for(const e in this.windowListeners)this.removeWindowListener(this.windowListeners[e]);this.windowListeners={}})}notifyListeners(e,n){const r=this.listeners[e];r&&r.forEach(a=>a(n))}hasListeners(e){return!!this.listeners[e].length}registerWindowListener(e,n){this.windowListeners[n]={registered:!1,windowEventName:e,pluginEventName:n,handler:r=>{this.notifyListeners(n,r)}}}unimplemented(e="not implemented"){return new u.Exception(e,A.Unimplemented)}unavailable(e="not available"){return new u.Exception(e,A.Unavailable)}removeListener(e,n){return s(this,null,function*(){const r=this.listeners[e];if(!r)return;const a=r.indexOf(n);this.listeners[e].splice(a,1),this.listeners[e].length||this.removeWindowListener(this.windowListeners[e])})}addWindowListener(e){window.addEventListener(e.windowEventName,e.handler),e.registered=!0}removeWindowListener(e){e&&(window.removeEventListener(e.windowEventName,e.handler),e.registered=!1)}}const oe=t=>encodeURIComponent(t).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape),ie=t=>t.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent);class ve extends O{getCookies(){return s(this,null,function*(){const e=document.cookie,n={};return e.split(";").forEach(r=>{if(r.length<=0)return;let[a,o]=r.replace(/=/,"CAP_COOKIE").split("CAP_COOKIE");a=ie(a).trim(),o=ie(o).trim(),n[a]=o}),n})}setCookie(e){return s(this,null,function*(){try{const n=oe(e.key),r=oe(e.value),a=`; expires=${(e.expires||"").replace("expires=","")}`,o=(e.path||"/").replace("path=",""),d=e.url!=null&&e.url.length>0?`domain=${e.url}`:"";document.cookie=`${n}=${r||""}${a}; path=${o}; ${d};`}catch(n){return Promise.reject(n)}})}deleteCookie(e){return s(this,null,function*(){try{document.cookie=`${e.key}=; Max-Age=0`}catch(n){return Promise.reject(n)}})}clearCookies(){return s(this,null,function*(){try{const e=document.cookie.split(";")||[];for(const n of e)document.cookie=n.replace(/^ +/,"").replace(/=.*/,`=;expires=${new Date().toUTCString()};path=/`)}catch(e){return Promise.reject(e)}})}clearAllCookies(){return s(this,null,function*(){try{yield this.clearCookies()}catch(e){return Promise.reject(e)}})}}Z("CapacitorCookies",{web:()=>new ve});const he=(t,e={})=>{const n=Object.assign({method:t.method||"GET",headers:t.headers},e),r=((a={})=>{const o=Object.keys(a);return Object.keys(a).map(d=>d.toLocaleLowerCase()).reduce((d,i,f)=>(d[i]=a[o[f]],d),{})})(t.headers)["content-type"]||"";if(typeof t.data=="string")n.body=t.data;else if(r.includes("application/x-www-form-urlencoded")){const a=new URLSearchParams;for(const[o,d]of Object.entries(t.data||{}))a.set(o,d);n.body=a.toString()}else if(r.includes("multipart/form-data")){const a=new FormData;if(t.data instanceof FormData)t.data.forEach((d,i)=>{a.append(i,d)});else for(const d of Object.keys(t.data))a.append(d,t.data[d]);n.body=a;const o=new Headers(n.headers);o.delete("content-type"),n.headers=o}else(r.includes("application/json")||typeof t.data=="object")&&(n.body=JSON.stringify(t.data));return n};class ye extends O{request(e){return s(this,null,function*(){const n=he(e,e.webFetchExtra),r=((_,E=!0)=>_?Object.entries(_).reduce((x,b)=>{const[P,c]=b;let l,w;return Array.isArray(c)?(w="",c.forEach(k=>{l=E?encodeURIComponent(k):k,w+=`${P}=${l}&`}),w.slice(0,-1)):(l=E?encodeURIComponent(c):c,w=`${P}=${l}`),`${x}&${w}`},"").substr(1):null)(e.params,e.shouldEncodeUrlParams),a=r?`${e.url}?${r}`:e.url,o=yield fetch(a,n),d=o.headers.get("content-type")||"";let i,f,{responseType:p="text"}=o.ok?e:{};switch(d.includes("application/json")&&(p="json"),p){case"arraybuffer":case"blob":f=yield o.blob(),i=yield(_=>s(this,null,function*(){return new Promise((E,x)=>{const b=new FileReader;b.onload=()=>{const P=b.result;E(P.indexOf(",")>=0?P.split(",")[1]:P)},b.onerror=P=>x(P),b.readAsDataURL(_)})}))(f);break;case"json":i=yield o.json();break;default:i=yield o.text()}const y={};return o.headers.forEach((_,E)=>{y[E]=_}),{data:i,headers:y,status:o.status,url:o.url}})}get(e){return s(this,null,function*(){return this.request(Object.assign(Object.assign({},e),{method:"GET"}))})}post(e){return s(this,null,function*(){return this.request(Object.assign(Object.assign({},e),{method:"POST"}))})}put(e){return s(this,null,function*(){return this.request(Object.assign(Object.assign({},e),{method:"PUT"}))})}patch(e){return s(this,null,function*(){return this.request(Object.assign(Object.assign({},e),{method:"PATCH"}))})}delete(e){return s(this,null,function*(){return this.request(Object.assign(Object.assign({},e),{method:"DELETE"}))})}}function Q(){return u.getPlatform()==="android"?JSON.parse(AndroidInitialContext.initialContext()):window.portalInitialContext}Z("CapacitorHttp",{web:()=>new ye}),Z("Portals",{web:()=>Promise.resolve().then(function(){return _e}).then(t=>new t.PortalsWeb)});const _e=Object.freeze({__proto__:null,PortalsWeb:class extends O{publishNative(t){return s(this,null,function*(){})}}}),ee=t=>{var e,n,r;if(typeof window!="undefined"&&Q&&((e=Q())!=null&&e.value)){const a=(r=(n=Q())==null?void 0:n.value)!=null?r:null;if(!a)return void console.error("native initialContext is undefine");if(!t)return void console.error("initialContext call back is undefine");t(a)}},be=t=>new Promise(e=>s(this,null,function*(){let n=null;n=t!=null&&t.mockData?t.mockData:((r,{asiaUatData:a,euSitData:o,euUatData:d})=>{var y,_;const i=(y=r.mockServerInfo)==null?void 0:y.env,f=(_=r.mockServerInfo)==null?void 0:_.area;let p=null;return i&&f&&(g.ASIA===f?m.UAT===i&&(p=a):g.EU===f&&(m.SIT===i?p=o:m.UAT===i&&(p=d))),p})(t,{asiaUatData:yield Promise.resolve().then(()=>je),euSitData:yield Promise.resolve().then(()=>xe),euUatData:yield Promise.resolve().then(()=>Ue)}),e(n?n!=null&&n.default?n==null?void 0:n.default:n:null)})),X=class X{isNative(){return s(this,null,function*(){return yield(()=>{let e=!1;return ee(n=>{e=!!(n!=null&&n.isNative)}),e})()})}redirectPage(e){return s(this,null,function*(){yield(({callBack:n})=>{ee(r=>{var o;if(!(r!=null&&r.params))return void console.info("initial context native params is undefine");const a=(o=r==null?void 0:r.params)!=null?o:null;a&&(n?n(a):console.error("initial context call back is undefine"))})})(e)})}getNativeInfo(e){return s(this,null,function*(){const n=e!=null&&e.mockServerInfo||e!=null&&e.mockData?e:X.defaultNativeAppInfoConfig;return(yield this.isNative())?yield(()=>{let r=null;return ee(a=>{r=a!=null?a:null}),r})():yield be(n)})}};M(X,"defaultNativeAppInfoConfig",{mockServerInfo:{area:g.ASIA,env:m.UAT}});let te=X;const V=()=>{let t={};return typeof window!="undefined"&&(t=window),t},W="CommunicatePlugin",v=u.registerPlugin(W,{web:()=>Promise.resolve().then(()=>Ie).then(t=>new t.PluginsWeb)}),q=V();q.removeAddListenerFab=()=>null;const Pe=t=>{var n,r;q.removeAddListenerFab&&q.removeAddListenerFab();const e=[];(n=v.showFABMenu)==null||n.call(v,{fabMenu:e}),t&&((r=Object.keys(t))!=null&&r.length)&&(Object.keys(t).forEach(a=>{var o,d,i,f,p,y;e.push({icon:(d=(o=t==null?void 0:t[a])==null?void 0:o.icon)!=null?d:"",id:(f=(i=t==null?void 0:t[a])==null?void 0:i.id)!=null?f:"",name:(y=(p=t==null?void 0:t[a])==null?void 0:p.title)!=null?y:""})}),queueMicrotask(()=>{var a;(a=v.showFABMenu)==null||a.call(v,{fabMenu:e})}),setTimeout(()=>{(a=>s(this,null,function*(){a&&(q.removeAddListenerFab=yield(o=>s(this,null,function*(){if(u.addListener){const d=yield u.addListener(W,"nativeSendFab",i=>o&&o(i));return d!=null&&d.remove?d.remove:()=>null}}))(a))}))(a=>{let o;a!=null&&a.id&&(Object.keys(t).forEach(d=>{var i,f,p;(i=t==null?void 0:t[d])!=null&&i.id&&a.id===t[d].id&&(o=(p=(f=t[d])==null?void 0:f.fn)!=null?p:()=>null)}),typeof o=="function"&&o())})}))},T=V();T.addListenerBackRemoveHandle=()=>null;const de=(t=()=>null)=>s(this,null,function*(){T!=null&&T.addListenerBackRemoveHandle&&typeof T.addListenerBackRemoveHandle=="function"&&T.addListenerBackRemoveHandle(),T.addListenerBackRemoveHandle=yield(e=>s(this,null,function*(){if(u.addListener){const n=yield u.addListener(W,"nativeSendBack",r=>e&&e(r));return n!=null&&n.remove?n.remove:()=>null}}))(t)}),z=V();z.addListenerHomeHandle=()=>null;const ke=t=>{z.addListenerHomeHandle&&z.addListenerHomeHandle(),setTimeout(()=>{(e=>s(this,null,function*(){e&&(z.addListenerHomeHandle=yield(n=>s(this,null,function*(){if(u.addListener){const r=yield u.addListener(W,"nativeSendHome",a=>n&&n(a));return r!=null&&r.remove?r.remove:()=>null}}))(e))}))(t)})};class Se{constructor(){this.homeBtnSwitch({isClick:!0})}homeBtnSwitch(e){return s(this,null,function*(){var n;return yield(n=v.homeIsClick)==null?void 0:n.call(v,e)})}setBackBtn(e){(n=>{const{mounted:r,beforeUnmount:a,callBack:o}=n;r(()=>{de(o)}),a(()=>{de()})})(e)}setHomeBtn(e){ke(e)}setFabBtn(e){Pe(e)}openMiniApp(e){return s(this,null,function*(){return yield v.openMiniApp(e)})}showTitle(e){return s(this,null,function*(){return yield v.showTitle(e)})}showSubMask(e){return s(this,null,function*(){return yield v.showSubMask(e)})}setMiniAppVersion(e){return s(this,null,function*(){return yield v.setMiniAppVersion(e)})}showNativeLoading(){return s(this,null,function*(){return yield v.showDialog()})}cancelNativeLoading(){return s(this,null,function*(){return yield v.cancelDialog()})}}const Ce=u.registerPlugin("CameraScanPlugin",{web:new class extends O{pickCameraScan(t){return s(this,null,function*(){return new Promise(e=>{e(t)})})}}});window.removeAddListenerCameraScan=()=>null;class Le{pickCameraScan(e){return s(this,null,function*(){return yield Ce.pickCameraScan(e)})}}const Ae=u.registerPlugin("CameraScanMultiplePlugin",{web:new class extends O{pickCameraScanMultiple(){return s(this,null,function*(){})}}});class Oe{pickCameraScanMultiple(e){return s(this,null,function*(){return yield Ae.pickCameraScanMultiple(e)})}}const Ee=u.registerPlugin("CameraScanMultipleNoCountPlugin",{web:new class extends O{pickCameraScanMultipleNoCount(){return s(this,null,function*(){})}}});class Ne{pickCameraScanMultipleNoCount(e){return s(this,null,function*(){return yield Ee.pickCameraScanMultipleNoCount(e)})}}const ce="LaserScanPlugin",le=u.registerPlugin(ce,{web:new class extends O{pickLaserScan(){return s(this,null,function*(){})}unPickLaserScan(){return s(this,null,function*(){})}}}),G=V();G.removeAddListenerLaserScan=()=>null;const pe=(t=()=>null)=>{G.removeAddListenerLaserScan&&G.removeAddListenerLaserScan();const e=n=>s(this,null,function*(){n&&(G.removeAddListenerLaserScan=yield(r=>s(this,null,function*(){if(u.addListener){const a=yield u.addListener(ce,"nativeSendLaser",o=>r&&r(o));return a!=null&&a.remove?a.remove:()=>null}}))(n))});setTimeout(()=>{e(t)})};class Me{constructor(){this.pickLaserScan()}pickLaserScan(){return s(this,null,function*(){le.pickLaserScan({isContinue:!1})})}unPickLaserScan(){return s(this,null,function*(){le.unPickLaserScan()})}setLaserScan(e){(n=>{const{mounted:r,beforeUnmount:a,callBack:o}=n;r(()=>{pe(o)}),a(()=>{pe()})})(e)}}class ue{constructor(){M(this,"initialContextPlugins",new te);M(this,"communicatePlugins",new Se);M(this,"cameraScanPlugins",new Le);M(this,"cameraScanMultiplePlugins",new Oe);M(this,"cameraScanMultipleNoCountPlugins",new Ne);M(this,"laserScanPlugins",new Me)}}const Te=new ue,je=Object.freeze(Object.defineProperty({__proto__:null,default:{data_info:{bu:{default_tenant_code:"WTCHK",tenants:[{store_detail_list:[{name:"APELDOORN HOOFDSTRAAT 136",code:"3462"}],name:"WTCHK",stores:["3462"],timezone:"Europe/Amsterdam",code:"WTCHK"}]},menus:[{code:"osp-superapp-inventory",id:"6113847737833037825",name:"Inventory",parent_id:"0"},{code:"osp-superapp-event-count",id:"6113867563402076161",name:"Event Count",parent_id:"6113847737833037825"},{code:"osp-superapp-shelf-fulfillment",id:"6113867975718936577",name:"Shelf Fulfillment",parent_id:"6113847737833037825"},{code:"osp-superapp-reports",id:"6113868456755273729",name:"Reports",parent_id:"0"},{code:"osp-superapp-user-management",id:"6113868869072134145",name:"User Management",parent_id:"0"},{code:"osp-superapp-online-orders",id:"6318558832782852097",name:"Online Orders",parent_id:"0"},{code:"osp-superapp-pick-pack-orders",id:"6318559348178927617",name:"Pick & Pack Orders",parent_id:"6318558832782852097"},{code:"osp-superapp-collect-orders",id:"6318559863575003137",name:"Collect Orders",parent_id:"6318558832782852097"},{code:"osp-superapp-collect-orders@unpack_orders/home",id:"6318560756928200705",name:"Unpack Orders",parent_id:"6318558832782852097"},{code:"osp-superapp-collect-orders@orders_collect/search",id:"6318561856439828481",name:"Search Orders",parent_id:"6318558832782852097"}],serverInfo:{serverArea:"asia",serverEnv:"uat"},token:{access_token:"2c0d362e-5835-4bac-b168-a00ac9856998",expires_in:86399,refresh_token:"992e3a36-fd27-4074-af15-f09a4a939b67",scope:"read write",token_type:"bearer"},user:{create_time:"2023-08-22 11: 08: 21",email:"ospsuperapp2@163.com",gender:"",id:"6113892817809776640",introduction:"",language:"en",last_modify_time:"2023-08-24 10: 53: 32",password_strength_name:"MIDDLE",password_validity_period:"PERMANENT",password_validity_period_time:"2856-12-22 11: 08: 21",phone:"",real_name:"ospsuperapp2",special:"false",status:"NORMAL",tenant_id:"0",time_zone:"Europe/Amsterdam",type:"STAFF",user_name:"ospsuperapp2",errorCode:0,errorMessage:"",requseCodeTag:4,success:!1}},data_store:{name:"APELDOORN HOOFDSTRAAT 3462",code:"3462"},data_language:{code:"en",id:"en_US",name:"English"},data_kong:{token:{access_token:"OLXyjfmHGolOdt7NMLvzh4VEAFRRHZAf",expires_in:86400,token_type:"bearer"}}}},Symbol.toStringTag,{value:"Module"})),xe=Object.freeze(Object.defineProperty({__proto__:null,default:{data_info:{bu:{default_tenant_code:"KVN",tenants:[{code:"KVN",name:"KVN",store_detail_list:[{buCode:"KVN",code:"9998",name:"KVNL 9998"}],stores:["9998"],timezone:"Europe/Amsterdam"}],errorCode:0,errorMessage:"",requseCodeTag:6,success:!1},menus:[{code:"osp-superapp-inventory",id:"6113847737833037825",name:"Inventory",parent_id:"0"},{code:"osp-superapp-event-count",id:"6113867563402076161",name:"Event Count",parent_id:"6113847737833037825"},{code:"osp-superapp-shelf-fulfillment",id:"6113867975718936577",name:"Shelf Fulfillment",parent_id:"6113847737833037825"},{code:"osp-superapp-reports",id:"6113868456755273729",name:"Reports",parent_id:"0"},{code:"osp-superapp-user-management",id:"6113868869072134145",name:"User Management",parent_id:"0"},{code:"osp-superapp-online-orders",id:"6318558832782852097",name:"Online Orders",parent_id:"0"},{code:"osp-superapp-pick-pack-orders",id:"6318559348178927617",name:"Pick & Pack Orders",parent_id:"6318558832782852097"},{code:"osp-superapp-collect-orders",id:"6318559863575003137",name:"Collect Orders",parent_id:"6318558832782852097"},{code:"osp-superapp-collect-orders@unpack_orders/home",id:"6318560756928200705",name:"Unpack Orders",parent_id:"6318558832782852097"},{code:"osp-superapp-collect-orders@orders_collect/search",id:"6318561856439828481",name:"Search Orders",parent_id:"6318558832782852097"}],serverInfo:{serverArea:"eu",serverEnv:"sit"},token:{access_token:"2c0d362e-5835-4bac-b168-a00ac9856998",expires_in:86399,refresh_token:"992e3a36-fd27-4074-af15-f09a4a939b67",scope:"read write",token_type:"bearer"},user:{create_time:"2023-08-22 11: 08: 21",email:"ospsuperapp2@163.com",gender:"",id:"6113892817809776640",introduction:"",language:"en",last_modify_time:"2023-08-24 10: 53: 32",password_strength_name:"MIDDLE",password_validity_period:"PERMANENT",password_validity_period_time:"2856-12-22 11: 08: 21",phone:"",real_name:"ospsuperapp2",special:"false",status:"NORMAL",tenant_id:"0",time_zone:"Europe/Amsterdam",type:"STAFF",user_name:"ospsuperapp2",errorCode:0,errorMessage:"",requseCodeTag:4,success:!1}},data_store:{buCode:"KVN",code:"9998",name:"KVNL 9998"},data_language:{code:"en",id:"en_US",name:"English"},data_kong:{"X-ASW-APIKey":"6j2AHemxmsGMmIs9rtdys0DK04Hag6s1","EVC-X-ASW-APIKey":"6j2AHemxmsGMmIs9rtdys0DK04Hag6s1"}}},Symbol.toStringTag,{value:"Module"})),Ue=Object.freeze(Object.defineProperty({__proto__:null,default:{data_info:{bu:{default_tenant_code:"KVN",tenants:[{code:"KVN",name:"KVN",store_detail_list:[{buCode:"KVN",code:"9998",name:"KVNL 9998"}],stores:["9998"],timezone:"Europe/Amsterdam"}],errorCode:0,errorMessage:"",requseCodeTag:6,success:!1},menus:[{code:"osp-superapp-inventory",id:"6113847737833037825",name:"Inventory",parent_id:"0"},{code:"osp-superapp-event-count",id:"6113867563402076161",name:"Event Count",parent_id:"6113847737833037825"},{code:"osp-superapp-shelf-fulfillment",id:"6113867975718936577",name:"Shelf Fulfillment",parent_id:"6113847737833037825"},{code:"osp-superapp-reports",id:"6113868456755273729",name:"Reports",parent_id:"0"},{code:"osp-superapp-user-management",id:"6113868869072134145",name:"User Management",parent_id:"0"},{code:"osp-superapp-online-orders",id:"6318558832782852097",name:"Online Orders",parent_id:"0"},{code:"osp-superapp-pick-pack-orders",id:"6318559348178927617",name:"Pick & Pack Orders",parent_id:"6318558832782852097"},{code:"osp-superapp-collect-orders",id:"6318559863575003137",name:"Collect Orders",parent_id:"6318558832782852097"},{code:"osp-superapp-collect-orders@unpack_orders/home",id:"6318560756928200705",name:"Unpack Orders",parent_id:"6318558832782852097"},{code:"osp-superapp-collect-orders@orders_collect/search",id:"6318561856439828481",name:"Search Orders",parent_id:"6318558832782852097"}],serverInfo:{serverArea:"eu",serverEnv:"sit"},token:{access_token:"2c0d362e-5835-4bac-b168-a00ac9856998",expires_in:86399,refresh_token:"992e3a36-fd27-4074-af15-f09a4a939b67",scope:"read write",token_type:"bearer"},user:{create_time:"2023-08-22 11: 08: 21",email:"ospsuperapp2@163.com",gender:"",id:"6113892817809776640",introduction:"",language:"en",last_modify_time:"2023-08-24 10: 53: 32",password_strength_name:"MIDDLE",password_validity_period:"PERMANENT",password_validity_period_time:"2856-12-22 11: 08: 21",phone:"",real_name:"ospsuperapp2",special:"false",status:"NORMAL",tenant_id:"0",time_zone:"Europe/Amsterdam",type:"STAFF",user_name:"ospsuperapp2",errorCode:0,errorMessage:"",requseCodeTag:4,success:!1}},data_store:{buCode:"KVN",code:"9998",name:"KVNL 9998"},data_language:{code:"en",id:"en_US",name:"English"},data_kong:{"X-ASW-APIKey":"axiBpmRYqN99pWG9r3horNTNgWxpvlfG","EVC-X-ASW-APIKey":"6j2AHemxmsGMmIs9rtdys0DK04Hag6s1"}}},Symbol.toStringTag,{value:"Module"})),Ie=Object.freeze(Object.defineProperty({__proto__:null,PluginsWeb:class extends O{homeIsClick(){return s(this,null,function*(){})}openMiniApp(t){return s(this,null,function*(){return new Promise(e=>{e(t)})})}showTitle(t){return s(this,null,function*(){return new Promise(e=>{e(t)})})}showFABMenu(t){return s(this,null,function*(){return new Promise(e=>{e(t)})})}showSubMask(t){return s(this,null,function*(){return new Promise(e=>{e(t)})})}setMiniAppVersion(t){return s(this,null,function*(){return new Promise(e=>{e(t)})})}showDialog(){return s(this,null,function*(){})}cancelDialog(){return s(this,null,function*(){})}getMiniAppKong(t){return s(this,null,function*(){return new Promise(e=>{e(t)})})}}},Symbol.toStringTag,{value:"Module"}));h.NativeApi=ue,h.default=Te,Object.defineProperties(h,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|