hylid-bridge 4.0.28-alpha.0 → 4.0.28-alpha.1
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/canIUse.json +1 -1
- package/lib/common/apis/custom/web/h5/getStorageSync.js +11 -2
- package/lib/common/apis/custom/web/h5/removeStorageSync.js +5 -1
- package/lib/common/apis/custom/web/h5/setStorageSync.js +7 -3
- package/lib/umd/index.js +1 -1
- package/lib/umd/mp_web_alipay.js +1 -1
- package/lib/umd/mp_web_mpay.js +1 -1
- package/lib/umd/web_alipay.js +1 -1
- package/lib/umd/web_alipayhk.js +1 -1
- package/lib/umd/web_demo.js +1 -1
- package/lib/umd/web_h5.js +1 -1
- package/lib/umd/web_tngdh5ng.js +1 -1
- package/package.json +6 -6
package/lib/umd/web_tngdh5ng.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.my=e():t.my=e()}(self,(()=>(()=>{"use strict";var t={d:(e,n)=>{for(var i in n)t.o(n,i)&&!t.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:n[i]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e)},e={};function n(t,e,n){!function(t){if(window.AlipayJSBridge)return t();document.addEventListener("AlipayJSBridgeReady",(function(){return t()}),!1)}((function(){var i=(n||{}).type,o=void 0===i?"async":i;"async"===o&&window.AlipayJSBridge.call(t,e,(function(t){var n=e||{},i=n.success,o=n.fail,r=n.complete;t.error||t.errorCode?null==o||o(t):null==i||i(t),null==r||r(t)})),"callback"===o&&window.AlipayJSBridge.call(t,e)}))}t.d(e,{default:()=>_e});function i(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function o(t,e){if(null==t)return{};var n,i,o=function(t,e){if(null==t)return{};var n,i,o={},r=Object.keys(t);for(i=0;i<r.length;i++)n=r[i],e.indexOf(n)>=0||(o[n]=t[n]);return o}(t,e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);for(i=0;i<r.length;i++)n=r[i],e.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(o[n]=t[n])}return o}var r=["content","buttonText"];function a(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}var s=["confirmButtonText","cancelButtonText","content"];function c(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}var l=["type"];function p(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}var u=["success"];function f(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}function h(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?f(Object(n),!0).forEach((function(e){i(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):f(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var d=Object.prototype.hasOwnProperty,v=Object.assign||function(t,e){for(var n,i=function(t){if(null==t)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(t)}(t),o=1;o<arguments.length;o++)for(var r in n=Object(arguments[o]))d.call(n,r)&&(i[r]=n[r]);return i},y=function(t,e){return y=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},y(t,e)};function g(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}y(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var I=function(){return I=Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},I.apply(this,arguments)};"function"==typeof SuppressedError&&SuppressedError;var m=Function.prototype.apply.call.bind(Function.prototype.apply),b=Function.prototype.bind;function E(t,e){for(var n=[],i=2;i<arguments.length;i++)n[i-2]=arguments[i];return m(t,e,n)}function _(t,e,n){return m(t,e,n)}function P(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return m(b,t,e)}var k,C,O,x,A,w,S,M,N,T,R=JSON.stringify,L=JSON.parse;function D(){return C||(t="undefined"!=typeof Set,C=t?Set:function(){function t(){this.itemList=[]}return Object.defineProperty(t.prototype,"size",{get:function(){return this.itemList.length},enumerable:!1,configurable:!0}),t.prototype.add=function(t){return-1===this.itemList.indexOf(t)&&this.itemList.push(t),this},t.prototype.delete=function(t){var e=this.itemList.indexOf(t);return-1!==e&&(this.itemList.splice(e,1),!0)},t.prototype.clear=function(){this.itemList=[]},t.prototype.has=function(t){return-1!==this.itemList.indexOf(t)},t.prototype.forEach=function(t){for(var e=0,n=this.itemList.slice();e<n.length;e++){var i=n[e];t(i,i,this)}},t}()),new C;var t}function j(t){return"number"==typeof t&&t>=0&&t<=8}function B(t){var e=t.split(".");if(!e.length)return!1;var n=function(t){for(var e=(T||"undefined"!=typeof __APPX_CAN_I_USE_DATA__&&(T=__APPX_CAN_I_USE_DATA__),T),n=0,i=t;n<i.length;n++){var o=i[n];if(void 0===(e=e&&e[o]))return;var r=e._;if(r){var a=r[N.default];if(a||(a=r[N[void 0]]),!a)return!1;if(void 0!==a[N.const])return Boolean(a[N.const]);var s=a[N.version_added];return void 0!==s&&void 0>=s}}}(e);return void 0!==n?n:function(t,e){if(!e.length)return!1;for(var n=void 0,i=0,o=e;i<o.length;i++){var r=o[i];if(void 0===(n=n&&n[r]))return;if("number"==typeof n._||"boolean"==typeof n._)return Boolean(n._);if("number"==typeof n||"boolean"==typeof n)return Boolean(n)}}(0,e)}O||(O="undefined"!=typeof WeakMap?WeakMap:function(){var t=Object.prototype.hasOwnProperty,e=function(t,e,n){Object.defineProperty?Object.defineProperty(t,e,{configurable:!0,value:n,writable:!0}):t[e]=n};function n(t){return Object(t)===t}function i(){if(void 0===this)throw new TypeError("Constructor WeakMap requires 'new'");if(e(this,"_id","_WeakMap_"+r()+"."+r()),arguments.length>0)throw new TypeError("WeakMap iterable is not supported")}function o(e,i){if(!n(e)||!t.call(e,"_id"))throw new TypeError(i+" method called on incompatible receiver "+typeof e)}function r(){return Math.random().toString().substring(2)}return e(i.prototype,"delete",(function(t){if(o(this,"delete"),!n(t))return!1;var e=t[this._id];return!(!e||e[0]!==t||(delete t[this._id],0))})),e(i.prototype,"get",(function(t){if(o(this,"get"),n(t)){var e=t[this._id];return e&&e[0]===t?e[1]:void 0}})),e(i.prototype,"has",(function(t){if(o(this,"has"),!n(t))return!1;var e=t[this._id];return!(!e||e[0]!==t)})),e(i.prototype,"set",(function(t,i){if(o(this,"set"),!n(t))throw new TypeError("Invalid value used as weak map key");var r=t[this._id];return r&&r[0]===t?(r[1]=i,this):(e(t,this._id,[t,i]),this)})),e(i,"_polyfill",!0),i}()),new O,"undefined"!=typeof SECURITY_FUNCTION_CALL&&(SECURITY_FUNCTION_CALL=function(t,e){for(var n=[],i=2;i<arguments.length;i++)n[i-2]=arguments[i];return"function"==typeof t?(m||(m=Function.prototype.apply.call.bind(Function.prototype.apply)),m(t,e,n)):t.call.apply(t,function(t,e,n){if(n||2===arguments.length)for(var i,o=0,r=e.length;o<r;o++)!i&&o in e||(i||(i=Array.prototype.slice.call(e,0,o)),i[o]=e[o]);return t.concat(i||Array.prototype.slice.call(e))}([e],n,!1))}),"undefined"!=typeof SECURITY_FUNCTION_APPLY&&(SECURITY_FUNCTION_APPLY=function(t,e,n){return"function"==typeof t?(m||(m=Function.prototype.apply.call.bind(Function.prototype.apply)),m(t,e,n)):t.apply(e,n)}),function(t){t.CanvasContext="CanvasContext"}(x||(x={})),function(t){t[t.PLUGIN=1]="PLUGIN",t[t.SUB_PACKAGE=2]="SUB_PACKAGE"}(A||(A={})),function(t){t.PLUGIN="plugin",t.SUB_PACKAGE="subpackage"}(w||(w={})),function(t){t[t.Info=0]="Info",t[t.Warn=1]="Warn",t[t.Error=2]="Error"}(S||(S={})),function(t){t.AppxLifecycle="AppxLifecycle"}(M||(M={})),"undefined"!=typeof HAS_INSIDE_FEATURE&&HAS_INSIDE_FEATURE,function(t){t.version_added="v",t.const="c",t.android="a",t.ios="i",t.default="d"}(N||(N={}));var U,V={scope:void 0,type:"empty"};function F(t){return t&&"empty"===t.type}function H(t){return t&&"extension"===t.type}function W(t){return t&&"openCapability"===t.type}function G(){return U||(U=function(){try{return INSIDE_CONFIG_STATIC||{}}catch(t){return{}}}()),U}"undefined"!=typeof ZEPHYR_HAS_INSIDE_FEATURE&&ZEPHYR_HAS_INSIDE_FEATURE,"undefined"!=typeof ZEPHYR_IS_INSIDE_UNSUPPORT_ELEMENT&&ZEPHYR_IS_INSIDE_UNSUPPORT_ELEMENT;var Y,K,J,z=function(){function t(t){this.taskMap=Object.create(null),this.addEventListener=t}return t.prototype.hasMatcher=function(t,e){var n=this.taskMap[t];if(!n)return!1;if(void 0===e){var i=Object.keys(n.callbacks).some((function(t){var e=n.callbacks[t];return!!(e&&e.length>0)}));return i}var o=n.callbacks[e];return!!o&&o.length>0},t.prototype.removeMatcher=function(t,e,n){var i=this.taskMap[t];if(!i)return 0;var o=i.callbacks[e];if(!o)return 0;if(n){var r=o.length;return i.callbacks[e]=o.filter((function(t){return t!==n})),r-i.callbacks[e].length}return r=o.length,o.length=0,r},t.prototype.addMatcher=function(t,e,n,i,o,r){var a=this.taskMap[t];a||(a=this.taskMap[t]={callbacks:Object.create(null)},this.addEventListener(t,P(this.onEventHandler,this,t,i,o),r));var s=a.callbacks[e];return s||(s=a.callbacks[e]=[]),s.indexOf(n)<0?(s.push(n),1):0},t.prototype.onEventHandler=function(t,e,n,i){var o=this.taskMap[t],r=e(i,o);if(r)for(var a=o.callbacks,s=0,c=r;s<c.length;s++){var l=a[c[s]];if(l){var p=n(i);if(p)for(var u=0,f=l;u<f.length;u++)(0,f[u])(p)}}},t}();function q(t){return void 0===t}function Z(t){return t&&"object"==typeof t}function Q(t){return"function"==typeof t}function $(t){return!!(t&&t.get&&t.update)}var X=function(t,e,n,i,o,r,a){e().getKernel().__BRIDGE_CALL__(r,n,i,o)},tt=function(t,e,n,i,o,r){return e().getKernel().__BRIDGE_CALL_SYNC__(o,n,i)};function et(t,e){var n=t.jsApiCacheWhitelist;return!!(n&&"string"==typeof n&&n.indexOf(e)>=0)}function nt(t,e){return t[e]}var it={internalAPI:!0,openInBrowser:!0},ot={};function rt(t,e,n,i,o,r,a,s){var c="".concat(r),l=!!(1&o),p=!!(2&o),u=!!(4&o),f=!1===l&&!0===p,h=f?t.getPublicCallProxyAPIInfoByName(c):t.getAPIInfoByName(c),d=f?"my.callSync":ct(h,r);if(h||(h=ot),!it[c]){(l||p)&&(s=null);var v=Rt(h,n,i,l,u,s,e,c,a,{caller:d});try{return v.invoke()}finally{}}}function at(t,e,n,i,o,r,a,s,c){var l="".concat(r),p=!!(1&o),u=!!(2&o),f=!!(4&o),h=!1===p&&!0===u,d=ot;t&&(d=h?t.getPublicCallProxyAPIInfoByName(l):t.getAPIInfoByName(l));var v=h?"my.call":ct(d,r);if(d||(d=ot),!it[l]){(p||u)&&(c=null);var y=Tt(d,n,i,p,f,c,e,l,a,s,{caller:v});try{return y.invoke()}finally{}}}function st(t,e,n,i,o,r,a,s){var c=function(t,e,n,i,o,r,a,s,c,l){return new Mt(e,n,r,a,s,t,{caller:null==l?void 0:l.caller,callerContext:null==l?void 0:l.callerContext,directly:!0,inside:!1,shouldNotRewriteIdOrClass:c,viewId:null})}(t,i,o,0,0,n,e,r,a,s);return c.invoke()}function ct(t,e){if(t)return t.avaliableNamespace?"my.".concat(t.avaliableNamespace,".").concat(e):"my.".concat(e)}var lt,pt,ut=function(){function t(t){this._context=t,this.__appxDomain=t.appxDomain.scope;var e=this._context.runtime().getEnv(),n=e.isIOS,i=e.isAndroid,o=e.isIDE;this.isIOS=n,this.isAndroid=i,this.isIDE=o}return t.prototype.callBridge=function(t,e,n){this._context.callDefaultBridge(t,e,n)},t.prototype.callBridgeSync=function(t,e){return this._context.callDefaultBridgeSync(t,e)},t.prototype.on=function(t,e){return this._context.runtime().getBridge().event.addEventListener(t,0,e)},t.prototype.off=function(t,e){return this._context.runtime().getBridge().event.removeEventListener(t,0,e)},t.prototype.getStartupParams=function(){return this._context.runtime().getEnv().originalStartupParams},t}();function ft(t){var e;lt||(k||(e="undefined"!=typeof Map,k=e?Map:function(){function t(){this.keyList=[],this.valueList=[]}return t.prototype.set=function(t,e){var n=this.keyList,i=n.indexOf(t);if(-1===i){var o=n.push(t)-1;this.valueList[o]=e}else this.valueList[i]=e;return this},t.prototype.get=function(t){var e=this.keyList.indexOf(t);return-1===e?void 0:this.valueList[e]},t.prototype.forEach=function(t){for(var e=this.keyList.slice(),n=this.valueList.slice(),i=e.length,o=0;o<i;o++){var r=e[o];t(n[o],r,this)}},Object.defineProperty(t.prototype,"size",{get:function(){return this.keyList.length},enumerable:!1,configurable:!0}),t.prototype.has=function(t){return-1!==this.keyList.indexOf(t)},t.prototype.delete=function(t){var e=this.keyList.indexOf(t);return-1!==e&&(this.keyList.splice(e,1),this.valueList.splice(e,1),!0)},t.prototype.clear=function(){this.keyList=[],this.valueList=[]},t}()),lt=new k);var n=lt.get(t);if(!n){n=D(),lt.set(t,n);for(var i=0,o=t;i<o.length;i++){var r=o[i];"string"==typeof r&&n.add(r)}}return n}function ht(){return pt||((pt=D()).add("success"),pt.add("error"),pt.add("errorMessage")),pt}function dt(t,e,n){if(t&&"object"==typeof t){for(var i=ft(e),o={},r=0,a=Object.keys(t);r<a.length;r++){var s=a[r];i.has(s)||n&&n.has(s)?o[s]=t[s]:"undefined"!=typeof process&&process&&process.env}return o}return t}function vt(t,e,n){var i=t,o=e;return Q(t)&&(q(e)||n()&&(o=t,i={})),function(t,e){var n=t,i=e;return q(e)&&Q(t)&&(i=t,n={}),Z(t)||void 0===t||(n={}),q(n)&&(n={}),{callback:i,option:n}}(i,o)}function yt(t,e,n){try{var i=G().config;if(!i||"ap"!==i.clientName)return!0;if(e().getBehaviorManager().report("duplicated my.call(".concat(n,")")),t.getFlag("ignoreCallbackWhenInvokeMyCall"))return!0}catch(t){}return!1}function gt(t){var e={};return Q((t=t||{}).success)&&(e.success=t.success,delete t.success),Q(t.fail)&&(e.fail=t.fail,delete t.fail),Q(t.complete)&&(e.complete=t.complete,delete t.complete),e}var It=1,mt={};function bt(){}var Et=Object.defineProperty;function _t(t,e,n){Et(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n})}var Pt,kt=function(){function t(t,e,n,i,o,r,a,s){if(l=o,"[object Object]"===Object.prototype.toString.call(l)){var c=I({},o);void 0!==c.page&&(c.page=void 0),this.option=c}else this.option=o;var l;_t(this,"ctx",t),_t(this,"runtime",e),_t(this,"extraInfo",s),_t(this,"apiName",i),_t(this,"appxDomain",n),_t(this,"appxDomainIsNotEmpty",!F(n)),_t(this,"callback",a),_t(this,"apiInfo",this.getFlag("freezeAPIInfo")?function(t){try{Object.isFrozen(t)||(Object.setPrototypeOf(t,null),Object.freeze(t))}finally{return t}}(I({},r)):r||{}),r.t&&(this.taskId=It++),this.startTime=(new Date).getTime(),this.initDependency(o,s.viewId,r,a),this.callStack=new Error("")}return t.prototype.invoke=function(){},t.prototype.callScopedBridge=function(t,e,n,i){var o=this.appxDomain;return o&&!F(o)&&(e=I(I({},e),{__appxDomain:o.scope})),this.callDefaultBridge(t,e,n,i)},t.prototype.callScopedBridgeSync=function(t,e,n){var i=this.appxDomain;return i&&!F(i)&&(e=I(I({},e),{__appxDomain:i.scope})),this.callDefaultBridgeSync(t,e,n)},t.prototype.callBridge=function(t,e,n,i){return this.callDefaultBridge(t,e,n,i)},t.prototype.callDefaultBridge=function(t,e,n,i){var o=this.runtime();if(o){var r=o.getBridge();r&&r.callBridge(t,e,n,void 0,{caller:this.extraInfo.caller})}},t.prototype.callDefaultBridgeSync=function(t,e,n){var i=this.runtime();if(i){var o=i.getBridge();if(o)return o.callBridgeSync(t,e,n,{caller:this.extraInfo.caller})}},t.prototype.callInternalAPI=function(t,e,n,i){var o=this.runtime();if(o){var r=o.getBridge();r&&r.callInternalAPI(t,e,n,i,{caller:this.extraInfo.caller})}},t.prototype.callInternalAPISync=function(t,e,n){var i=this.runtime();if(i){var o=i.getBridge();if(o)return o.callInternalAPISync(t,e,n,{caller:this.extraInfo.caller})}},t.prototype.getEnvAppBiz=function(){return"TinyAppBiz-".concat(this.getEnvAppId())},t.prototype.getEnvAppId=function(){var t=this.runtime().getEnv().startupParams.appId;return void 0===t?"":t},t.prototype.getEnvPlatformIOS=function(){return"ios"===this.runtime().getEnv().platform},t.prototype.invokeExternalElementMethod=function(t,e,n,i){if(t&&void 0!==t.$viewId){var o=t.$viewId,r=this.runtime().getPageManager().getInstanceById("".concat(o));r&&r.invokeClientElementMethod(e,"onHostExternalMessage",[n,i])}},t.prototype.getBridgeExtraInfo=function(){return this.runtime().getBridge().extraInfo},t.prototype.getEnvPlatformAndroid=function(){return"android"===this.runtime().getEnv().platform},t.prototype.getEnvOnlyCube=function(){return this.runtime().getEnv().isOnlyCube},t.prototype.invokeCallback=function(t,e){t?this.callbackUnion[t]&&this.callbackUnion[t](e):this.callback&&this.callback(e)},t.prototype.dispatchResultCallback=function(t){var e=!1;if("object"==typeof t&&(e="error"in t||"errorMessage"in t),e?(this.shouldEmitEvent()&&this.runtime().getTypedEventManager().invokeInternalEvent(8,[{key:this.apiName,option:this.option,result:t,type:"fail"}]),t=this.callHookAfterLog(t),this.invokeCallback("fail",t)):(this.shouldEmitEvent()&&this.runtime().getTypedEventManager().invokeInternalEvent(8,[{key:this.apiName,option:this.option,result:t,type:"success"}]),this.invokeCallback("success",t)),this.invokeCallback("complete",t),this.invokeCallback(null,t),!e)return t;if(!this.shouldNotReturnPromise()){var n=this.runtime();if(n&&"function"==typeof n.getLogger){var i=n.getLogger();i&&i.attachErrorSource&&i.attachErrorSource(t,{from:"api",method:this.apiName,payload:this.option,stack:this.callStack})}throw t}},t.prototype.shouldNotReturnPromise=function(){if(this.apiInfo.noPromise)return!0;var t=!!(this.callbackUnion.complete||this.callbackUnion.success||this.callbackUnion.fail||this.callback),e=this.apiInfo.allowAbort||this.apiInfo.progress||this.apiInfo.returnProto;return t&&!e},t.prototype.shouldEmitEvent=function(){return this.extraInfo.directly&&"object"==typeof this.option&&!mt[this.apiName]},t.prototype.prepareOption=function(){return this.shouldEmitEvent()&&this.runtime().getTypedEventManager().invokeInternalEvent(8,[{key:this.apiName,type:"invoke"}]),this.callHookBefore()},t.prototype.getInsideContext=function(){var t=this.insideContext;return t||(t=this.insideContext=new ut(this)),t},t.prototype.callHookValidate=function(){var t=this.apiInfo.tapMark;if("function"!=typeof t||this.extraInfo.inside||(t=E(t,this)),!0===t){var e=this.getPageInstance();e&&!e.getTapMarkManager().checkTapMark()&&(this.validateResult={error:5,errorMessage:"".concat(this.apiName," can only be invoked by user tap gesture")})}return void 0===this.validateResult&&this.apiInfo.v&&!this.extraInfo.inside&&(this.apiInfo.b_v&&(this.validateResult=E(this.apiInfo.b_v,this,this.option)),void 0===this.validateResult&&(this.validateResult=E(this.apiInfo.v,this,this.option)),void 0===this.validateResult&&this.apiInfo.a_v&&(this.validateResult=E(this.apiInfo.a_v,this,this.option))),this.validateResult},t.prototype.callHookBefore=function(){var t=this.option;return this.optionPageViewId||this.apiInfo.b?(t=I({},t),Array.isArray(this.apiInfo.in)&&(t=dt(t,this.apiInfo.in,ht())),this.optionPageViewId&&(t.viewId=this.optionPageViewId),this.apiInfo.b&&(this.apiInfo.b_b&&(t=this.extraInfo.inside?E(this.apiInfo.b_b,this.getInsideContext(),t,this.callback)||t:E(this.apiInfo.b_b,this,t,this.callback)||t),t=this.extraInfo.inside?E(this.apiInfo.b,this.getInsideContext(),t,this.callback)||t:E(this.apiInfo.b,this,t,this.callback)||t,this.apiInfo.a_b&&(t=this.extraInfo.inside?E(this.apiInfo.a_b,this.getInsideContext(),t,this.callback)||t:E(this.apiInfo.a_b,this,t,this.callback)||t))):Array.isArray(this.apiInfo.in)&&(t=dt(t,this.apiInfo.in,ht())),W(this.appxDomain)?t.__openCapabilityId=this.appxDomain.origin:t.__openCapabilityId&&delete t.__openCapabilityId,t},t.prototype.callHookAfter=function(t){var e=t;return this.apiInfo.a&&(this.apiInfo.b_a&&(this.apiInfo.ignoreShadowCopyResponse||(e=I({},e)),e=!0===this.extraInfo.inside?E(this.apiInfo.b_a,this.getInsideContext(),e,this.finalOption,this.option)||e:E(this.apiInfo.b_a,this,e,this.finalOption,this.option)||e),this.apiInfo.ignoreShadowCopyResponse||(e=I({},e)),e=!0===this.extraInfo.inside?E(this.apiInfo.a,this.getInsideContext(),e,this.finalOption,this.option)||e:E(this.apiInfo.a,this,e,this.finalOption,this.option)||e,this.apiInfo.a_a&&(this.apiInfo.ignoreShadowCopyResponse||(e=I({},e)),e=!0===this.extraInfo.inside?E(this.apiInfo.a_a,this.getInsideContext(),e,this.finalOption,this.option)||e:E(this.apiInfo.a_a,this,e,this.finalOption,this.option)||e)),Array.isArray(this.apiInfo.out)&&(e=dt(e,this.apiInfo.out,ht())),e},t.prototype.callHookAfterLog=function(t){var e=t;return this.apiInfo.a_l&&(e=E(this.apiInfo.a_l,this,e,this.finalOption,this.option)||e),e},t.prototype.processResult=function(t){var e,n=t||{};n=this.callHookAfter(n);var i=!0;return(null===(e=this.extraInfo)||void 0===e?void 0:e.directly)&&this.getFlag("disablePublicCallErrorCodeNormalize")&&(i=!1),i&&(n=function(t){return"string"==typeof t.error&&(t.error=parseInt(t.error,10)),0===t.error&&(delete t.error,delete t.errorMessage),t}(n)),n},t.prototype.getRewriteIdWithAppxDomain=function(t){var e,n,i=t,o=this.appxDomain;return!H(o)&&!W(o)||this.extraInfo.shouldNotRewriteIdOrClass||(i=(e={type:4,value:o.origin},n={type:8,value:i},{type:9,value:"p-".concat(e.value,"-").concat(n.value)}).value),i},t.prototype.getPageInstance=function(){var t=this.pageInstance;return t&&!t.hasPageUnloaded()||(t&&(this.pageInstance=null),t=this.runtime().getNav().getTopInstance()),t},t.prototype.initDependency=function(t,e,n,i){var o,r,a=this.runtime(),s=t&&t.page&&t.page.$viewId||void 0,c=s||e||void 0;c&&(r=a.getPageManager().getInstanceById(c)),r&&!r.hasPageUnloaded()||(r=null===(o=a.getNav())||void 0===o?void 0:o.getTopInstance()),r&&(c=r.pageId,this.pageInstance=r),this.assignedViewId=c,this.optionPageViewId=s},t.prototype.getState=function(){return this.extraInfo.parentState},t.prototype.getProtoContext=function(){return this.extraInfo.parentProtoContext},t.prototype.getCallerContext=function(){return this.extraInfo.callerContext},t.prototype.callProtoAPI=function(t,e){return st(t,this.apiName,this.appxDomain,this.ctx,this.runtime,e,this.extraInfo.shouldNotRewriteIdOrClass,{caller:this.extraInfo.caller,callerContext:this})},t.prototype.reportHostError=function(t,e,n,i,o){return this.runtime().getKernel().reportHostError(t,e,n,i,o)},t.prototype.getFlag=function(t){return this.ctx.getFlags()[t]},t.prototype.invokeCompositeElementMethod=function(t,e,n){var i;void 0===e&&(e=bt);var o=null===(i=this.extraInfo)||void 0===i?void 0:i.scopedElementId;if(o){var r=n||this.apiName,a=function(t,e,n,i){if(t){var o=t.success,r=t.fail;return{complete:t.complete,data:function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(i=Object.getOwnPropertySymbols(t);o<i.length;o++)e.indexOf(i[o])<0&&Object.prototype.propertyIsEnumerable.call(t,i[o])&&(n[i[o]]=t[i[o]])}return n}(t,["success","fail","complete"]),element:n,fail:r,success:o,viewId:e,action:i}}return{element:n,viewId:e,action:i}}(t,this.assignedViewId,o,r);this.pageInstance?this.pageInstance.invokeCompositeElementMethod(a,this,e):e({error:1,errorMessage:"page not found"})}},t}();var Ct,Ot,xt=/^(?:on|off)([A-Z])(\w+)/;var At,wt,St={},Mt=function(t){function e(e,n,i,o,r,a,s){return t.call(this,e,n,i,o,r,a,void 0,s)||this}return g(e,t),e.prototype.invoke=function(){for(var t=this,e=_(this.apiInfo.state,this,this.option),n={},i=function(i){var r=o.apiInfo.proto[i];if("function"==typeof r.feature&&!E(r.feature,o))return"continue";var a=o.apiName?"".concat(o.extractProtoEntityNameFromAPIInfo(o.apiName),".").concat(i):void 0,s=function(i){i.extraInfo.caller=a,i.extraInfo.scopedElementId=t.apiInfo.compositeElement?t.getRewriteIdWithAppxDomain(t.option[0]):void 0,i.extraInfo.parentState=e,i.extraInfo.parentProtoContext=n,i.extraInfo.callerContext=t.extraInfo.callerContext||t};if(r.getter){var c,l=function(t,e,n,i,o,r,a){return new Nt(e,n,r,a,t,{caller:void 0,directly:!1,viewId:o,inside:!1,scopedElementId:void 0})}(r,o.ctx,o.runtime,0,o.assignedViewId,o.appxDomain,i);s(l);var p=!1;Object.defineProperty(n,i,{configurable:!0,enumerable:!0,get:function(){return p||(c=l.invoke()),c},set:function(t){return c=t,p=!0,!0}})}else n[i]=function(e,n){if(t.apiInfo.compositeElement&&!t.hasPermission())return t.invokeNoPermissionCallbackDirectly(a,i,e,n);var o=Tt(r,t.ctx,t.runtime,!1,!1,t.assignedViewId,t.appxDomain,i,e,n);return s(o),o.invoke()}},o=this,r=0,a=Object.keys(this.apiInfo.proto);r<a.length;r++)i(a[r]);return n},e.prototype.initDependency=function(e,n,i,o){var r=i.createOptionIndex,a=!1===r?null:e[r];t.prototype.initDependency.call(this,a,n,i,null)},e.prototype.extractProtoEntityNameFromAPIInfo=function(t){var e=t.match(/^(create|get)(.*)$/);return e?e[2]:"".concat(t[0].toUpperCase()).concat(t.slice(1))},e.prototype.hasPermission=function(){var t=this.runtime().getPermissionManager();return!t||t.checkElementPermission4ContextAPI(this.apiInfo.compositeElement,this.appxDomain)},e.prototype.invokeNoPermissionCallbackDirectly=function(t,e,n,i){var o=this,r={error:4,errorMessage:"无权调用 ".concat(t)},a=vt(n,i,(function(){return yt(o.ctx,o.runtime,e)})),s=a.option,c=a.callback,l=gt(s),p=function(t){return o.runtime().getKernel().setTimeout(t,0)};l.fail&&p((function(){l.fail(r)})),l.complete&&p((function(){l.complete(r)})),c&&p((function(){c(r)}))},e}(kt);var Nt=function(t){function e(e,n,i,o,r,a){return t.call(this,e,n,i,o,null,r,null,a)||this}return g(e,t),e.prototype.invoke=function(){return E(this.apiInfo.getter,this)},e}(kt);function Tt(t,e,n,i,o,r,a,s,c,l,p){if(t.fn)return new(Ot||(Ot=function(t){function e(e,n,i,o,r,a,s,c){return t.call(this,e,n,i,o,r,s,a,c)||this}return g(e,t),e.prototype.invoke=function(){return!0===this.extraInfo.inside?E(this.apiInfo.fn,this.getInsideContext(),this.option,this.callback):E(this.apiInfo.fn,this,this.option,this.callback)},e.prototype.initDependency=function(e,n,i,o){var r=i.fnOptionIndex,a=0===r?e:1===r?o:null;t.prototype.initDependency.call(this,a,n,i,null)},e}(kt)),Ot)(e,n,a,s,c,l,t,{caller:void 0,directly:i,inside:o,viewId:r,scopedElementId:null==p?void 0:p.scopedElementId});var u=vt(c,l,(function(){return yt(e,n,s)})),f=u.option,h=u.callback;return function(t){return/^(?:on|off)[A-Z](?:\w+)/.test(t)}(s)?new(Ct||(Ct=function(t){function e(e,n,i,o,r,a,s,c){var l=t.call(this,e,n,i,o,r,a,s,c)||this;return"function"==typeof a.e?l.eventName=E(a.e,l):l.eventName=function(t,e){var n="";if(e&&xt.test(t)){var i=t.match(xt);"string"==typeof e.m&&(n=e.m),!n&&i[1]&&i[2]&&(n=i[1].toLowerCase()+i[2])}return n}(o,l.apiInfo),l}return g(e,t),e.prototype.invoke=function(){if(this.finalOption=this.prepareOption(),this.callbackUnion=gt(this.finalOption),/^on/.test(this.apiName)){if(j(this.apiInfo.m))return"function"==typeof this.callback?this.runtime().getTypedEventManager().addEventListener(this.apiInfo.m,this.callback,!0):{remove:function(){}};if(this.apiInfo.task){if("function"==typeof this.callback){var t=this.apiInfo.task,e=t.id,n=t.getTaskId,i=t.getPayload,o=t.isolate,r="function"==typeof e?E(e,this):e;this.callHookEventTask("start",o,r),this.runtime().getBridge().event.taskManager.addMatcher(this.eventName,r,this.callback,n,i)}}else this.callHookEvent("start"),this.runtime().getBridge().event.addEventListener(this.eventName,1,P(this.processEventResult,this),this.callback)}else if(j(this.apiInfo.m))"function"==typeof this.callback&&this.runtime().getTypedEventManager().removeEventListener(this.apiInfo.m,this.callback);else if(this.apiInfo.task){if("function"==typeof this.callback){var a=this.apiInfo.task;e=a.id,o=a.isolate,r="function"==typeof e?E(e,this):e,this.runtime().getBridge().event.taskManager.removeMatcher(this.eventName,r,this.callback),this.callHookEventTask("end",o,r)}}else this.runtime().getBridge().event.removeEventListener(this.eventName,1,this.callback),this.callHookEvent("end")},e.prototype.processEventResult=function(t){var e,n;n={},q((e=t).data)||(n=Z(n=e.data)?n:{data:n}),t=n;var i=this.processResult(t);this.dispatchResultCallback(i)},e.prototype.callHookEventTask=function(t,e,n){var i=this.runtime().getBridge().event.taskManager;(2===e?i.hasMatcher(this.eventName,n):1===e&&i.hasMatcher(this.eventName))||Q(this.apiInfo[t])&&(this.extraInfo.inside?E(this.apiInfo[t],this.getInsideContext()):E(this.apiInfo[t],this))},e.prototype.callHookEvent=function(t){this.runtime().getBridge().event.hasEventListener(this.eventName,1)||Q(this.apiInfo[t])&&(this.extraInfo.inside?E(this.apiInfo[t],this.getInsideContext()):E(this.apiInfo[t],this))},e}(kt)),Ct)(e,n,a,s,f,t,h,{caller:null==p?void 0:p.caller,directly:i,inside:o,viewId:r,scopedElementId:null==p?void 0:p.scopedElementId}):new(Pt||(Pt=function(t){function e(e,n,i,o,r,a,s,c){return t.call(this,e,n,i,o,r,a,s,c)||this}return g(e,t),e.prototype.invoke=function(){var t=this,e=this.invokeMethodAsync();if(!this.shouldNotReturnPromise()){var n=this.apiInfo,i=n.allowAbort,o=n.progress,r=n.returnEvent,a=n.returnProto;if(i||o||r||a){if(i){var s=this.apiInfo.cancelname||"abort";e[s]=function(){Q(t.apiInfo.c)&&E(t.apiInfo.c,t),t.resolveImmediate&&t.resolveImmediate({error:9,errorMessage:"".concat(t.apiName,":fail abort")})}}if("object"==typeof r&&r)for(var c=function(n){var i=r[n],o=i.taskId,a=i.getTaskId,s=i.eventName,c=i.getPayload,p=i.feature;if("function"==typeof p&&!E(p,l))return"continue";var u=n[0].toUpperCase()+n.slice(1);e["on".concat(u)]=function(e){var n=t.runtime();if(n){var i=n.getBridge().event;if(i){var r="function"==typeof o?E(o,t):o;i.taskManager.addMatcher(s,r,e,a,c)}}},e["off".concat(u)]=function(e){var n=t.runtime();if(n){var i=n.getBridge().event;if(i){var r="function"==typeof o?E(o,t):o;i.taskManager.removeMatcher(s,r)}}}},l=this,p=0,u=Object.keys(r);p<u.length;p++)c(u[p]);if(o){var f=this.taskId,h=o.key,d=o.getPayload,y=o.getTaskId;e.onProgressUpdate=function(e){var n=t.runtime();if(n){var i=n.getBridge().event;i&&i.taskManager.addMatcher("".concat(h,"StateChange"),f,e,y,d)}}}if(a){var g=E(a,this);v(e,g)}}return e}},e.prototype.callHookDoingAsync=function(t){this.apiInfo.allowAbort&&(this.resolveImmediate=t);var e=this.getFlag("idempotentAPIWhiteList"),n=this.apiInfo.m||this.apiName;if(this.apiInfo.i||Array.isArray(e)&&e.indexOf(n)>-1){var i=this.getFlag("idempotentAPIBlackList");Array.isArray(i)&&i.indexOf(n)>-1?this.doingAsync(t):this.invokeIdempotentAPI(this.apiInfo.i,t)}else this.doingAsync(t)},e.prototype.doingAsync=function(t){Q(this.apiInfo.d)?!0===this.extraInfo.inside?E(this.apiInfo.d,this.getInsideContext(),this.finalOption,t):E(this.apiInfo.d,this,this.finalOption,t):Q(this.apiInfo.d_with_cache)?this.interceptBridgeCall4Cache(this.apiInfo.cache,t)||(!0===this.extraInfo.inside?E(this.apiInfo.d_with_cache,this.getInsideContext(),this.finalOption,t):E(this.apiInfo.d_with_cache,this,this.finalOption,t)):this.apiInfo.compositeElementAction?this.invokeCompositeElementMethod(this.finalOption,t):this.interceptBridgeCall4Cache(this.apiInfo.cache,t)||(this.shouldForbidAsyncJSAPI(this.apiInfo.m||this.apiName,this.finalOption)?(this.runtime().getEnv().packageAndRunSceneType,t({error:4,errorMessage:"API调用受限"})):X(this.ctx,this.runtime,this.apiInfo.m||this.apiName,this.appxDomainIsNotEmpty?I(I({},this.finalOption),{__appxDomain:this.appxDomain.scope}):this.finalOption,t,this.assignedViewId,{caller:this.extraInfo.caller}))},e.prototype.shouldForbidAsyncJSAPI=function(t,e){var n=!1;if("hideOptionMenuItem"===t){var i=this.getFlag("forbidAPIList");"favorite"===e.name&&i&&i.indexOf("hideOptionMenuItem")>-1&&(n=!0)}return n},e.prototype.interceptBridgeCall4Cache=function(t,e){var n=this;if(!t)return!1;var i=this.runtime(),o=i.getBridge(),r=t.key,a=i.getEnv().originalStartupParams;if(!et(a,r))return!1;var s=o.extraInfo[r];if(s||(s=o.extraInfo[r]={cache:nt(a,r)}),$(t)){var c=E(t.get,null,s,this.finalOption);return c?((0,this.runtime().getKernel().setTimeout)((function(){e(c)}),0),!0):(X(this.ctx,this.runtime,this.apiInfo.m||this.apiName,this.appxDomainIsNotEmpty?I(I({},this.finalOption),{__appxDomain:this.appxDomain.scope}):this.finalOption,(function(i){E(t.update,null,s,n.finalOption,i),e(i)}),this.assignedViewId,{caller:this.extraInfo.caller}),!0)}return t.set?(E(t.set,null,s,this.finalOption),!1):void 0},e.prototype.invokeMethodAsync=function(){var t=this,e=this.runtime(),n=e.getKernel(),i=n.Promise;return this.callHookValidate()?(this.callbackUnion=gt(this.option),i.resolve().then((function(){return t.dispatchResultCallback(t.validateResult)}))):(this.callbackUnion=gt(this.option),this.finalOption=this.prepareOption(),new i((function(i,o){var r=1;t.callHookDoingAsync((function(a){var s=t.apiInfo,c=s.progress;if(c){var l=c.key,p=e.getBridge().event;p&&p.taskManager.removeMatcher("".concat(l,"StateChange"),t.taskId)}if(s.allowAbort){if(!t.resolveImmediate)return;t.resolveImmediate=null}var u=t.processResult(a);try{if(r)return void n.setTimeout((function(){try{i(t.dispatchResultCallback(u))}catch(t){o(t)}}),2);i(t.dispatchResultCallback(u))}catch(t){o(t)}})),r=0})))},e.prototype.invokeIdempotentAPI=function(t,e){if(this.finalOption&&Object.keys(this.finalOption).length>0)return this.doingAsync(e);var n=this.runtime(),i=n.getBridge(),o=i.extraInfo.idempotenceInfo;o||(o=i.extraInfo.idempotenceInfo={});var r=this.apiInfo.m||this.apiName,a=void 0!==this.optionPageViewId?this.optionPageViewId:void 0!==this.assignedViewId?this.assignedViewId:"default",s=this.appxDomainIsNotEmpty?this.appxDomain.scope:"default",c="".concat(r,"-").concat(a,"-").concat(s),l=o[c];l||(l=o[c]={processing:!1,resolveQueue:[]}),l.processing?l.resolveQueue.push(e):(l.processing=!0,this.doingAsync((function(t){var i;l.processing=!1;try{i=L(R(t))}catch(t){i={},n.getLogger().reportError(12,t)}e(t),l.resolveQueue&&l.resolveQueue.length>0&&(l.resolveQueue.forEach((function(t){t(L(R(i)))})),l.resolveQueue=[])})))},e.prototype.abort=function(){this.resolveImmediate&&this.resolveImmediate({error:9,errorMessage:"".concat(this.apiName,":fail abort")})},e}(kt)),Pt)(e,n,a,s,f,t,h,{caller:null==p?void 0:p.caller,directly:i,inside:o,viewId:r,scopedElementId:null==p?void 0:p.scopedElementId})}function Rt(t,e,n,i,o,r,a,s,c,l){var p=vt(c,void 0,(function(){return yt(e,n,s)})).option;return new(wt||(wt=function(t){function e(e,n,i,o,r,a,s){return t.call(this,e,n,i,o,r,a,null,s)||this}return g(e,t),e.prototype.interceptBridgeCallSync4Cache=function(t){if(t){var e=this.runtime(),n=e.getBridge(),i=t.key,o=e.getEnv().originalStartupParams;if(et(o,i)){var r=n.extraInfo[i];if(r||(r=n.extraInfo[i]={cache:nt(o,i)}),$(t)){var a=E(t.get,null,r,this.finalOption);if(a)return{hit:!0,result:a};var s=tt(this.ctx,this.runtime,this.apiInfo.m||this.apiName,this.appxDomainIsNotEmpty?I(I({},this.finalOption),{__appxDomain:this.appxDomain.scope}):this.finalOption,this.assignedViewId,{caller:this.extraInfo.caller});return E(t.update,null,r,this.finalOption,s),{hit:!1,result:s}}t.set&&E(t.set,null,r,this.finalOption)}}},e.prototype.callHookDoingSync=function(){var t;if(Q(this.apiInfo.d))t=!0===this.extraInfo.inside?E(this.apiInfo.d,this.getInsideContext(),this.finalOption,void 0):E(this.apiInfo.d,this,this.finalOption,void 0);else if(Q(this.apiInfo.d_with_cache_sync))(t=(e=this.interceptBridgeCallSync4Cache(this.apiInfo.cache))?e.result:!0===this.extraInfo.inside?E(this.apiInfo.d_with_cache_sync,this.getInsideContext(),this.finalOption,void 0):E(this.apiInfo.d_with_cache_sync,this,this.finalOption,void 0))&&(t=this.processResult(t)||t);else{var e;(t=(e=this.interceptBridgeCallSync4Cache(this.apiInfo.cache))?e.result:tt(this.ctx,this.runtime,this.apiInfo.m||this.apiName,this.appxDomainIsNotEmpty?I(I({},this.finalOption),{__appxDomain:this.appxDomain.scope}):this.finalOption,this.assignedViewId,{caller:this.extraInfo.caller}))&&(t=this.processResult(t)||t)}return t||(t={error:999,errorMessage:"System Error: Return ".concat(t)}),t},e.prototype.invoke=function(){return this.callHookValidate()?this.validateResult:(this.finalOption=this.prepareOption(),Q(this.apiInfo.responseProxy)&&!0!==this.extraInfo.inside&&this.getFlag("enableBridgeResponseProxy")&&(t=E(this.apiInfo.responseProxy,this,this.finalOption,P(this.callHookDoingSync,this),P(this.callHookDoingAsync4ResponseProxy,this))),t||(t=this.callHookDoingSync()),t);var t},e.prototype.callHookDoingAsync4ResponseProxy=function(t){var e=this,n=function(n){var i=e.processResult(n);t(i)};this.interceptBridgeCall4CacheAsync(this.apiInfo.cache,n)||X(this.ctx,this.runtime,this.apiInfo.m||this.apiName,this.appxDomainIsNotEmpty?I(I({},this.finalOption),{__appxDomain:this.appxDomain.scope}):this.finalOption,n,this.assignedViewId,{caller:this.extraInfo.caller})},e.prototype.interceptBridgeCall4CacheAsync=function(t,e){var n=this;if(!t)return!1;var i=this.runtime(),o=i.getBridge(),r=t.key,a=i.getEnv().originalStartupParams;if(!et(a,r))return!1;var s=o.extraInfo[r];if(s||(s=o.extraInfo[r]={cache:nt(a,r)}),$(t)){var c=E(t.get,null,s,this.finalOption);return c?((0,this.runtime().getKernel().setTimeout)((function(){e(c)}),0),!0):(X(this.ctx,this.runtime,this.apiInfo.m||this.apiName,this.appxDomainIsNotEmpty?I(I({},this.finalOption),{__appxDomain:this.appxDomain.scope}):this.finalOption,(function(i){E(t.update,null,s,n.finalOption,i),e(i)}),this.assignedViewId,{caller:this.extraInfo.caller}),!0)}return t.set?(E(t.set,null,s,this.finalOption),!1):void 0},e}(kt)),wt)(e,n,a,s,p,t,{caller:null==l?void 0:l.caller,directly:i,inside:o,viewId:r})}function Lt(t){var e=function(){};return e.prototype=t,jt(new e),t}function Dt(t){return t.__MAGIC_SLOW_PROPERTY=1,delete t.__MAGIC_SLOW_PROPERTY,t}function jt(t){if(t===jt)throw jt;return t}var Bt={SDKVersion:!0,call:!0,callSync:!0,canIUse:!0,emit:!0,off:!0,on:!0,renderTarget:!0};function Ut(t,e){if(!e.length)return!1;for(var n=t,i=0,o=e;i<o.length;i++){var r=o[i];if(!(n=n&&n[r]))return!1}return!0}function Vt(t,e){if(!e.length)return!1;for(var n=t,i=0,o=e;i<o.length;i++){var r=o[i];if(null==(n=n&&n[r]))return!1}return!0}var Ft=function(){function t(t,e,n,i,o){this.collection=new Wt,this.collectedCanIUseKeys=D(),this.hasRegisteredCanIUseReportHandler=!1,this.ctx=n,this.getRuntime=i,this.appxDomain=e,this.unrefRuntime=o,this.callSync4PublicNamed=P(this.callSync4PublicNamed,this),this.callSync4PublicNamedInside=P(this.callSync4PublicNamedInside,this),this.call4PublicNamed=P(this.call4PublicNamed,this),this.call4PublicNamedInside=P(this.call4PublicNamedInside,this),this.call=P(this.call,this),this.callSync=P(this.callSync,this),this.canIUse=P(this.canIUse,this),this.call4LinkedContext=P(this.call4LinkedContext,this),this.call4ProtoContext=P(this.call4ProtoContext,this),this.call4PublicCall=P(this.call4PublicCall,this),this.callSync4PublicCall=P(this.callSync4PublicCall,this),W(e)?this.publicInstance={canIUse:this.canIUse}:this.publicInstance={call:this.call4PublicCall,callSync:this.callSync4PublicCall,canIUse:this.canIUse,emit:t.emit,off:t.off,on:t.on}}return t.prototype.callSync4PublicNamed=function(t,e,n){return rt(this.collection,this.appxDomain,this.ctx,this.getRuntime,1,t,e,n)},t.prototype.callSync4PublicNamedInside=function(t,e,n){return rt(this.collection,this.appxDomain,this.ctx,this.getRuntime,5,t,e,n)},t.prototype.callSync4PublicCall=function(t,e,n){return rt(this.collection,this.appxDomain,this.ctx,this.getRuntime,2,t,e,n)},t.prototype.call4PublicCall=function(t,e,n,i){return at(this.collection,this.appxDomain,this.ctx,this.getRuntime,2,t,e,n,i)},t.prototype.call4PublicNamed=function(t,e,n,i){return at(this.collection,this.appxDomain,this.ctx,this.getRuntime,1,t,e,n,i)},t.prototype.call4PublicNamedInside=function(t,e,n,i){return at(this.collection,this.appxDomain,this.ctx,this.getRuntime,5,t,e,n,i)},t.prototype.removeAPIs=function(t,e){this.collection.removeAPIs(t);for(var n=e?this.publicInstance[e]:this.publicInstance,i=0,o=t;i<o.length;i++){var r=o[i];n&&n[r]&&(n[r]=void 0)}},t.prototype.replaceAPI=function(t,e){this.collection.replaceAPI(t,e)},t.prototype.replacePublicCallProxyAPI=function(t,e){this.collection.replacePublicCallProxyAPI(t,e)},t.prototype.replaceLinkedContextAPI2Proto=function(t,e){this.replaceAPI(t,e),this.publicInstance[t]=P(this.call4ProtoContext,null,t,!1)},t.prototype.getCollection=function(){return this.collection},t.prototype.callSync=function(t,e,n){return rt(this.collection,this.appxDomain,this.ctx,this.getRuntime,0,t,e,n)},t.prototype.canIUse=function(t){return"string"!=typeof t&&(t=String(t)),this.registerCanIUseReportHandler(),this.collectedCanIUseKeys.add(t),function(t,e,n,i,o,r){if(!i.getFlag("disableCanIUseByMetaInBridge")){var a=B(r);if(void 0!==a)return a}var s=String(r).split(".");if(1===s.length&&Bt[s[0]])return!0;var c=0,l=o();if(l){var p=l.getNav().getTopInstance();p&&(c=p.getEngineType())}return!!Ut(t.getCanIUseMap(i,o,c),s)||!!t.evaluateCanIUse(i,o,e,s)||!!(i.getFlag("enableCanIUseFix4PublicInstanceCheck")?Vt:Ut)(n,s)}(this.collection,this.appxDomain,this.publicInstance,this.ctx,this.getRuntime,t)},t.prototype.call=function(t,e,n,i){return at(this.collection,this.appxDomain,this.ctx,this.getRuntime,0,t,e,n,i)},t.prototype.call4LinkedContext=function(t,e){for(var n=[],i=2;i<arguments.length;i++)n[i-2]=arguments[i];return function(t,e,n,i,o,r,a){var s="".concat(o),c=t.getAPIInfoByName(s)||ot;if(!it[s]){ct(c,o);var l=function(t,e,n,i,o,r,a,s,c){return new(At||(At=function(t){function e(e,n,i,o,r,a,s){var c=t.call(this,e,n,i,o,r,a,void 0,s)||this;return c.cache4ApiInfo=Object.create(null),c.callLinkedCollection=P(c.callLinkedCollection,c),c.callAfterCompositeElementReady=P(c.callAfterCompositeElementReady,c),c.callSyncLinkedCollection=P(c.callSyncLinkedCollection,c),c}return g(e,t),e.prototype.invoke=function(){return _(this.apiInfo.create,this,this.option)},e.prototype.callScopedBridge=function(t,e,n,i){var o=this.appxDomain;o&&!F(o)&&(e=I(I({},e),{__appxDomain:o.scope}));var r=this.runtime();if(r){var a=r.getBridge();a&&a.callBridge(t,e,n)}},e.prototype.callLinkedCollection=function(t,e,n){return Tt(this.getApiInfoFromLinkedCollection(t),this.ctx,this.runtime,!1,!1,this.assignedViewId,this.appxDomain,t,e,n).invoke()},e.prototype.callSyncLinkedCollection=function(t,e){return Rt(this.getApiInfoFromLinkedCollection(t),this.ctx,this.runtime,!1,!1,this.assignedViewId,this.appxDomain,t,e).invoke()},e.prototype.callAfterCompositeElementReady=function(t,e){var n=this,i=this.getPageInstance();i&&i.whenCompositeElementReady(e.element,(function(){n.callLinkedCollection(t,e)}))},e.prototype.initDependency=function(e,n,i,o){var r=i.createOptionIndex,a=!1===r?null:e[r];t.prototype.initDependency.call(this,a,n,i,null)},e.prototype.getApiInfoFromLinkedCollection=function(t){if(!this.cache4ApiInfo[t]){var e,n=this.apiInfo.linked;e=n&&n[t]||St,this.cache4ApiInfo[t]=e}return this.cache4ApiInfo[t]},e}(kt)),At)(e,n,r,a,s,t,{caller:void 0,directly:!0,shouldNotRewriteIdOrClass:c,viewId:null})}(c,n,i,0,0,e,s,r,a);return l.invoke()}}(this.collection,this.appxDomain,this.ctx,this.getRuntime,t,n,e)},t.prototype.call4ProtoContext=function(t,e){for(var n=[],i=2;i<arguments.length;i++)n[i-2]=arguments[i];var o=this.collection.getAPIInfoByName(t),r=ct(o,t);return st(o,t,this.appxDomain,this.ctx,this.getRuntime,n,e,{caller:r})},t.prototype.destroy=function(){this.publicInstance=null,this.collection=null,this.unrefRuntime&&this.unrefRuntime()},t.prototype.registerCanIUseReportHandler=function(){var t=this;if(!this.hasRegisteredCanIUseReportHandler){var e=this.getRuntime();this.ctx.getFlag("enableCanIUseReport")&&e.getEventManager().addEventListener("pause",(function(){var n,i,o,r=[];t.collectedCanIUseKeys.forEach((function(t){r.push(t)})),r.length>0&&t.call("remoteLog",{actionId:"event",bizType:"TAC",param4:(n={key:r.join("|"),appxDomain:H(t.appxDomain)||W(t.appxDomain)?t.appxDomain.origin:e.getEnv().startupParams.appId},i=!0,n?"string"==typeof n?n:(o=n,o&&"object"==typeof o?Object.keys(o):[]).filter((function(t){return void 0!==n[t]||!i})).map((function(t){var e="".concat(t,"=");return e+=function(t){return null!==t&&"object"==typeof t?"function"==typeof t.toString?String(t):"":String(t)}(n[t]).replace(/,/g,";").replace(/\^/g,"@").replace(/\=/g,"~"),e})).join("^"):""),seedId:"miniapi.canIUse",type:"behavior"}),t.collectedCanIUseKeys.clear()})),this.hasRegisteredCanIUseReportHandler=!0}},t}();var Ht=function(){function t(t,e,n){var i=this;this.extraInfo={},this.scope4Domain=Object.create(null),this.scopeList4Plugin=[],this.dynamicAPIs={},this.ctx=t,this.getRuntime=e,this.unrefRuntime=n,this.callBridge=function(t,e,n,o,r){return i.callBridgeImpl(t,e,n,o,r)},this.callBridgeSync=function(t,e,n,o){return i.callBridgeSyncImpl(t,e,n,o)},this.on=P(this.on,this),this.off=P(this.off,this),this.emit=P(this.emit,this),this.defaultScope=new Ft(this,V,this.ctx,this.getRuntime)}return Object.defineProperty(t.prototype,"event",{get:function(){return this.getEventManager()},enumerable:!1,configurable:!0}),t.prototype.off=function(t,e){return this.getEventManager().removeEventListener(t,1,e)},t.prototype.on=function(t,e,n){var i=this.extraInfo;if(!i.reportMyOnComposite){var o=!0;try{var r=this.getRuntime().getBehaviorManager().get("reportMyOnComposite");r.report&&(t.startsWith("nbcomponent.")?r.report("myoncomposite"):o=!1)}catch(t){}o&&(i.reportMyOnComposite=!0)}return this.getEventManager().addEventListener(t,1,e,n)},t.prototype.emit=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return this.getEventManager().invokeTypedEvent(t,1,e)},t.prototype.callBridgeImpl=function(t,e,n,i,o){return X(this.ctx,this.getRuntime,t,e,n,void 0,o)},t.prototype.callBridgeSyncImpl=function(t,e,n,i){return tt(this.ctx,this.getRuntime,t,e,n,i)},t.prototype.dispose=function(){this.unrefRuntime&&this.unrefRuntime()},t.prototype.callInternalAPI=function(t,e,n,i,o){return function(t,e,n,i,o,r,a){if(e().getEnv()){var s=G().config;s&&!0===s.noUseInternalAPI?X(t,e,n,i,o,r,a):X(t,e,"internalAPI",{method:n,param:i,viewId:i&&i.viewId},o,r,a)}}(this.ctx,this.getRuntime,t,e,n,i,o)},t.prototype.callInternalAPISync=function(t,e,n,i){return function(t,e,n,i,o,r){if(e().getEnv()){var a=G().config;return a&&!0===a.noUseInternalAPI?tt(t,e,n,i,o,r):tt(t,e,"internalAPI",{method:n,param:i,viewId:i&&i.viewId},void 0,r)}}(this.ctx,this.getRuntime,t,e,n,i)},t.prototype.getPluginScopes=function(){return this.scopeList4Plugin},t.prototype.createScope=function(t){if(F(t))return this.defaultScope;var e=this.scope4Domain,n=H(t),i=n||W(t)?t.origin:t.scope;if(!e[i]){var o=e[i]=new Ft(this,t,this.ctx,this.getRuntime);n&&this.scopeList4Plugin.push(o)}return e[i]},t.prototype.getScope=function(t){return F(t)?this.defaultScope:this.scope4Domain[H(t)||W(t)?t.origin:t.scope]},t.prototype.getScopeByProviderInfo=function(t){if(function(t){return t&&1===t.providerType}(t)||function(t){return t&&2===t.providerType}(t))return this.scope4Domain[t.providerId];var e=this.getRuntime();return e?e.getKernel().isUsingExtensionMode?this.scope4Domain.app:this.defaultScope:void 0},t.prototype.setDynamicDistributedAPIs=function(t){this.dynamicAPIs=I(I({},this.dynamicAPIs),t)},t.prototype.getDynamicDistributedAPIs=function(){return this.dynamicAPIs},t.prototype.getEventManager=function(){var t;return this.eventInstance||(this.eventInstance=(t=this.getRuntime,new(function(){function e(){var t=this;this.eventMap=Object.create(null),this.eventInvokeMap=Object.create(null),this.taskManager=new z((function(e,n,i){t.addEventListener(e,i?0:1,n)}))}return e.prototype.hasEventListener=function(t,e){var n=this.getCustomTypeContext(t);return e?!(!n[e]||!n[e].length):!!(n[0].length||n[1].length||n[2].length)},e.prototype.addEventListener=function(t,e,n,i){var o=this;if(void 0===i&&(i=n),this.hasCustomEventMatched(t,e,i)||this.eventMap[t][e].push({cache:i,invoke:n}),this.registerListener(t),1===e)return{remove:function(){o.removeEventListener(t,e,i)}}},e.prototype.removeEventListener=function(t,e,n){e?(this.removeEventListener4Type(t,e,n),this.hasEventListener(t)||this.unregisterListener(t)):(this.eventMap[t]=null,this.unregisterListener(t))},e.prototype.removeEventListener4Type=function(t,e,n){var i=this.getCustomTypeContext(t);n||(i[e]=[]),i[e].length&&(i[e]=i[e].filter((function(t){return t.cache!==n})))},e.prototype.invokeTypedEvent=function(t,e,n){if(this.hasEventListener(t)){var i=this.getCustomTypeContext(t)[e];if(i&&i.length)for(var o=0,r=i;o<r.length;o++)r[o].invoke.apply(null,n)}},e.prototype.getCustomTypeContext=function(t){return this.eventMap[t]||(this.eventMap[t]=[[],[],[]]),this.eventMap[t]},e.prototype.hasCustomEventMatched=function(t,e,n){return this.getCustomTypeContext(t)[e].some((function(t){return t.cache===n}))},e.prototype.registerListener=function(e){if(!this.eventInvokeMap[e]){var n=this.eventInvokeMap[e]=P(this.invokeEventImpl,this,e);t().getKernel().__EVENT_ADD_LISTENER__(e,n)}},e.prototype.unregisterListener=function(e){var n=this.eventInvokeMap[e];n&&(t().getKernel().__EVENT_REMOVE_LISTENER__(e,n),this.eventInvokeMap[e]=null)},e.prototype.invokeEventImpl=function(t,e){if(this.hasEventListener(t)){for(var n=this.getCustomTypeContext(t),i=0,o=n[0];i<o.length;i++)E(o[i].invoke,null,e);var r=n[1].length,a=n[2].length;(r||a)&&function(t,e){var n;if(!(!t||!t.data)){var i=t.data,o=(delete(n=I({},i)).appInstanceId,delete n.instanceId,delete n.pageName,n);t.data=o,e(t),t.data=i}else e(t)}(e,(function(t){for(var e=0,i=n[1];e<i.length;e++)E(i[e].invoke,null,t);for(var o=0,r=n[2];o<r.length;o++)E(r[o].invoke,null,t.data)}))}},e}()))),this.eventInstance},t}(),Wt=function(){function t(){this.apiMap=Object.create(null),this.publicProxyMap=Object.create(null)}return t.prototype.setCanIUses=function(t){this.typedCanIUseMapInfo=t},t.prototype.removeAPIs=function(t){for(var e=this.apiMap,n=0,i=t;n<i.length;n++)e[i[n]]=void 0},t.prototype.setAPIs=function(t){var e=this.apiMap;Dt(e);for(var n=0,i=t;n<i.length;n++){for(var o=i[n],r=o.values,a=0,s=o.keys;a<s.length;a++)e[p=s[a]]=r[p];if(o.namespace)for(var c=0,l=o.keys;c<l.length;c++){var p;e[p=l[c]].avaliableNamespace=o.namespace}}return Lt(e),e},t.prototype.replaceAPI=function(t,e){var n=this.apiMap;n[t]&&e&&(n[t]=e)},t.prototype.setPublicCallProxyAPIs=function(t){var e=this.publicProxyMap;Dt(e);for(var n=0,i=t;n<i.length;n++)for(var o=i[n],r=o.values,a=0,s=o.keys;a<s.length;a++){var c=s[a];e[c]=r[c]}return Lt(e),this.publicProxyMap=e,e},t.prototype.getPublicCallProxyAPIInfoByName=function(t){return this.publicProxyMap[t]},t.prototype.hasPublicCallProxyAPI=function(t){return!!this.publicProxyMap[t]},t.prototype.replacePublicCallProxyAPI=function(t,e){var n=this.publicProxyMap;n[t]&&e&&(n[t]=e)},t.prototype.has=function(t){return!!this.apiMap[t]},t.prototype.evaluateCanIUse=function(t,e,n,i){if(e()){var o=!n||F(n)?"empty":"".concat(n.type,"_").concat(n.scope);this.typedCanIUseMap||(this.typedCanIUseMap=Gt(this.typedCanIUseMapInfo,t,e));var r=this.typedCanIUseMap.evaluate,a=r[o];r[o]||(a=r[o]={});var s=this.typedCanIUseMapInfo.evaluate;if(s)for(var c=0,l=s;c<l.length;c++){var p=(0,l[c])(t,e,n,i,a);if(void 0!==p)return p}}return 0},t.prototype.getCanIUseMap=function(t,e,n){if(e()){if(this.typedCanIUseMap||(this.typedCanIUseMap=Gt(this.typedCanIUseMapInfo,t,e)),1!==n&&2!==n){if(!this.typedCanIUseMap)return{};n=this.typedCanIUseMap.defaultType}return this.typedCanIUseMap?this.typedCanIUseMap[n]:{}}return{}},t.prototype.getAPIMap=function(){return this.apiMap},t.prototype.getAPIInfoByName=function(t){return this.apiMap[t]},t}();function Gt(t,e,n){for(var i,o=((i={defaultType:t.defaultType,evaluate:{}})[1]=Object.create(null),i[2]=Object.create(null),i),r=0,a=[1,2];r<a.length;r++){var s=a[r],c=t[s];if(c){for(var l=o[s],p=0,u=c(e,n);p<u.length;p++)l=Yt(l,u[p]);o[s]=l}}return o}function Yt(t,e){if(!t)return e;if(!e)return t;var n=1===t?{}:I({},t);if("object"==typeof e)for(var i=0,o=Object.keys(e);i<o.length;i++){var r=o[i];n[r]=Yt(n[r],e[r])}return n}var Kt=function(){function t(t){this.callbackMap=Object.create(null),this.implMap=Object.create(null),this.appInstanceId=t}return t.prototype.dispose=function(){var t=this;Object.keys(this.implMap).forEach((function(e){t.removeEventListeners(e)})),this.implMap=null,this.callbackMap=null},t.prototype.addEventListener=function(t,e){if("function"!=typeof e)throw new Error("callback is not function");if(!this.implMap[t]){var n=this.invokeEvent.bind(this,t);this.addEventImpl(t,n),this.implMap[t]=n}this.callbackMap[t]=this.callbackMap[t]||[];var i=this.callbackMap[t];i.indexOf(e)<0&&i.push(e)},t.prototype.removeEventListener=function(t,e){if("function"!=typeof e)throw new Error("callback is not function");this.callbackMap[t]=this.callbackMap[t]||[],this.callbackMap[t]=this.callbackMap[t].filter((function(t){return t!==e})),0===this.callbackMap[t].length&&(this.removeEventImpl(t,this.implMap[t]),delete this.implMap[t])},t.prototype.removeEventListeners=function(t){this.callbackMap[t]=[],this.removeEventImpl(t,this.implMap[t]),delete this.implMap[t]},t.prototype.invokeEvent=function(t,e){for(var n=0,i=this.callbackMap[t]||[];n<i.length;n++)(0,i[n])(e)},t.prototype.addEventImpl=function(t,e){document.addEventListener(t,e)},t.prototype.removeEventImpl=function(t,e){document.removeEventListener(t,e)},t}(),Jt=function(){function t(){this.flag=0}return t.prototype.invokeInternalEvent=function(t,e){},t.prototype.addEventListener=function(t,e,n){var i=this;if(n)return{remove:function(){i.removeEventListener(t,e)}}},t.prototype.removeEventListener=function(t,e){},t}(),zt=function(){function t(){}return t.prototype.isFirstPage=function(){return!0},t.prototype.getTopViewId=function(){},t.prototype.getTopInstance=function(){},t}(),qt=function(){},Zt=function(){function t(t,e){this.id="1",this.type=0,this._kernel=t,this._eventManager=e,this._nav=new zt,this._page={getInstanceById:function(){}},this._switch={get:qt}}return t.prototype.getLogger=function(){},t.prototype.getMeta=function(){return{getAppBehavior:qt,getTabBar:qt,isTabPage:qt,removeTabBarItem:qt,getAppExt:qt}},t.prototype.getBehaviorManager=function(){return{report:qt}},t.prototype.getApp=function(){return{appInstanceId:this.getKernel().appInstanceId}},t.prototype.getSubPackageManager=function(){},t.prototype.getTypedEventManager=function(){return this._typedEventManager||(this._typedEventManager=new Jt),this._typedEventManager},t.prototype.getRegistry=function(){},t.prototype.setRegistry=function(){},t.prototype.getMiniExtensionManager=function(){},t.prototype.getSwitchManager=function(){return this._switch},t.prototype.getPageManager=function(){return this._page},t.prototype.getNav=function(){return this._nav},t.prototype.getEnv=function(){return this._env},t.prototype.setEnv=function(t){this._env=t},t.prototype.setBridge=function(t){this._bridge=t},t.prototype.getBridge=function(){return this._bridge},t.prototype.getKernel=function(){return this._kernel},t.prototype.getEventManager=function(){return this._eventManager},t}(),Qt=function(){};function $t(t,e,n,i,o){var r="smallfish",a=new Kt(r),s={appInstanceId:r,userAgent:"",isDisableAppContext:!1,isUsingExtensionMode:!1,__BRIDGE_CALL__:function(t,e,n,i){"undefined"!=typeof AlipayJSBridge?AlipayJSBridge.call(e,n,i):document.addEventListener("AlipayJSBridgeReady",(function(){AlipayJSBridge.call(e,n,i)}))},__BRIDGE_CALL_SYNC__:function(t,e,n){return{error:10,errorMessage:"callSync is not avaliable in H5WebView"}},__EVENT_ADD_LISTENER__:a.addEventListener.bind(a),__EVENT_REMOVE_LISTENER__:a.removeEventListener.bind(a),__FATAL_ERROR__:Qt,__GET_PLATFORM_ELEMENTS__:function(){return[]},__GET_STARTUP_PARAMS__:function(){return"undefined"!=typeof AlipayJSBridge?AlipayJSBridge.startupParams:{}},__EVAL__:Qt,__IMPORT_SCRIPT__:Qt,__PERFORMANCE__:Qt,__REPORT_ERROR__:Qt,__SET_PAGE_CONTEXT_GETTER__:Qt,__SET_CURRENT_PAGE_ID_GETTER__:Qt,__SET_RUNTIME_ERROR_REPORTER__:Qt,Promise:t,setTimeout:"undefined"==typeof window?e:e.bind(window),clearTimeout:"undefined"==typeof window?n:n.bind(window),setInterval:"undefined"==typeof window?i:i.bind(window),clearInterval:"undefined"==typeof window?o:o.bind(window),getFrameworkContextSymbol:Qt,reportHostError:Qt},c=new Zt(s,a);return c.setEnv(function(t){var e,n="undefined"!=typeof navigator?navigator.userAgent:"",i=function(t){if(Y)return Y;var e=t.match(/Griver\/(\d+\.\d+\.\d+)/),n=t.match(/AliApp\((\S*)/),i=t.match(/AriverApp\((\S*)/),o=t.match(/GriverApp\((\S*)/),r=!!n&&2===n.length&&n[1].split("/")||!!i&&2===i.length&&i[1].split("/")||!!o&&2===o.length&&o[1].split("/"),a="unknown",s="0.0.0",c=0,l="",p=function(t){if(!K){var e=t.match(/UCBS\/((\d+)\.(\d+))/);if(e){var n=e[1]||"",i=parseInt(e[2],10),o=parseInt(e[3],10);K=[n,i,o]}else K=["",0,0]}return K}(t),u=!(!p||!p[0]),f=t.indexOf("AlipayIDE")>-1,h=t.match(/Language\/(\S+)/),d=t.indexOf("Android")>-1,v=!d&&!!t.match(/iPhone|iPad/i),y=v?"ios":d?"android":"unknown",g=function(t,e){if(!J){if(e){var n=t.match(/OS (\d+)_(\d+)(?:_(\d+))?/);if(n){var i=parseInt(n[1],10),o=parseInt(n[2],10),r=parseInt(n[3]||"0",10);J=[i,o,r]}}J=J||[0,0,0]}return J}(t,v);if(r?(a=r[0],s=r[1].match(/(\d+\.\d+\.\d+)/)[0],l=r[1].match(/([\w.]+)/)[0]):e&&(a="Griver",l=s=e[0]),"string"==typeof s){var I=function(t){for(var e=[],n=0,i=t.split(".");n<i.length;n++){var o=i[n];e.push(parseInt(o,10))}return e}(s);c=(I[0]?1e6*I[0]:0)+(I[1]?1e3*I[1]:0)+(I[2]?1*I[2]:0)}return Y={alipayVersionSequence:c,clientName:a.toLowerCase(),clientVersion:s,clientVersionSequence:c,iosMajorVersion:g[0],iosMinorVersion:g[1],iosPatchVersion:g[2],isAndroid:d,isIDE:f,isIOS:v,isUCWebView:u,language:h?h[1]:"",originalClientName:a,originalClientVersion:l,platform:y,ucMajorVersion:p[1],ucMinorVersion:p[2],ucVersion:p[0]}}(n),o=i.alipayVersionSequence,r=i.clientName,a=i.clientVersion,s=i.clientVersionSequence,c=i.isAndroid,l=i.isIDE,p=i.isIOS,u=i.isUCWebView,f=i.language,h=i.originalClientName,d=i.platform,v=i.ucMajorVersion,y=i.ucMinorVersion,g=i.ucVersion;return{alipayVersionSequence:o,appxVersion:"2.0.0",clientName:r,clientVersion:a,clientVersionSequence:s,isAndroid:c,isIDE:l,isIOS:p,isUCWebView:u,language:f,iosMajorVersion:i.iosMajorVersion,iosMinorVersion:i.iosMinorVersion,iosPatchVersion:i.iosPatchVersion,isPortalWorkerScene:void 0,get originalStartupParams(){return e||(e=t.__GET_STARTUP_PARAMS__()),e},originalClientName:h,packageAndRunSceneType:17,platform:d,startupParams:{get appId(){return e||(e=t.__GET_STARTUP_PARAMS__()),e&&e.appId||""}},ucMajorVersion:v,ucMinorVersion:y,ucVersion:g,userAgent:n}}(s)),c}var Xt=function(){function t(){var t,e=this;this.flags=((t={}).idempotentAPIWhiteList=["getStartupParams","getUserInfo","getRunScene","getSystemInfo","getClientInfo"],t.idempotentAPIBlackList=void 0,t.forbidAPIList=void 0,t.filterAppxDomainForSecurity=void 0,t.invokeBridgeWithCaller=void 0,t.disablePublicCallErrorCodeNormalize=void 0,t.ignoreCallbackWhenInvokeMyCall=void 0,t.enableBridgeResponseProxy=1,t.disableCanIUseByMetaInBridge=void 0,t.authCodeMapping4Aplus=void 0,t.uep=void 0,t.fixTempFilePath=void 0,t.selectorQueryContextClearActions=void 0,t.validSignContractURL=void 0,t.enableOpenEmbeddedMiniProgramScopedBridgeCall=void 0,t.openEmbeddedMiniProgramDefaultBridgeCallExtensionsWhiteList=void 0,t.disableGetWidthFromUA=void 0,t.enableGetterFromState4Audio=void 0,t.compositeElement=void 0,t.cameraContextPermissionCheck=void 0,t.navigateToMiniProgramQuery=1,t.enableExtConfigFromStartupParms=void 0,t.enableNavigateToMiniProgramScopedBridgeCall=void 0,t.disableLoadFontFaceLoadCanvasFont=void 0,t.disableSubscribeMsgJSAPI=void 0,t.fixNavigateBackMiniProgram=void 0,t.iosVersion4GetSystemInfoProxy=void 0,t.disableSystemInfoTaskCache282=void 0,t.enableAppXStorageCache=void 0,t),this.getFlags=function(){return e.flags}}return t.prototype.getFlag=function(t){return this.flags[t]},t.prototype.getCurrentCallStep=function(){},t}();function te(t,e,n,i){var o;X=ee,tt=ne;var r=function(t,e,n){var i=function(t,e,n){return new Ht(t,e,n)}(t,e,n);return i}(new Xt,(function(){return i})),a=r.defaultScope;return function(t,e,n,i){var o=i.getCollection();o.setCanIUses(n),o.setPublicCallProxyAPIs(e),function(t,e){var n=e.getCollection();n.setAPIs(t);var i=n.getAPIMap(),o=e.callSync4PublicNamed,r=e.callSync4PublicNamedInside,a=e.call4PublicNamed,s=e.call4PublicNamedInside,c=e.call4LinkedContext,l=e.call4ProtoContext,p=e.publicInstance;Dt(p);for(var u=0,f=t;u<f.length;u++){var h=f[u],d=h.namespace,v=p;if(d&&(v[d]||(v[d]={}),Dt(v=v[d])),h.linked)for(var y=0,g=h.keys;y<g.length;y++)i[k=g[y]]&&(v[k]=P(c,null,k,!1));else if(h.proto)for(var I=0,m=h.keys;I<m.length;I++)i[k=m[I]]&&(v[k]=P(l,null,k,!1));else for(var b=h.sync?h.inside?r:o:h.inside?s:a,E=0,_=h.keys;E<_.length;E++){var k;if(i[k=_[E]]){var C=i[k].feature;if("function"==typeof C&&!C())continue;v[k]=P(b,null,k)}}d&&Lt(v)}Lt(p)}(t,i),i.publicInstance}(t,e,((o={defaultType:1,evaluate:[]})[1]=function(){return n},o[2]=function(){return[]},o),a),i.setBridge(r),r}function ee(t,e,n,i,o,r){e().getKernel().__BRIDGE_CALL__(r,n,i,o)}function ne(t,e,n,i,o){return e().getKernel().__BRIDGE_CALL_SYNC__(o,n,i)}Object.prototype.hasOwnProperty;Object.assign;var ie=function(){return ie=Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},ie.apply(this,arguments)};"function"==typeof SuppressedError&&SuppressedError;var oe=Function.prototype.apply.call.bind(Function.prototype.apply);Function.prototype.bind;var re,ae,se,ce=JSON.stringify;JSON.parse,encodeURIComponent,re||function(){var t="undefined"!=typeof WeakMap;re=t?WeakMap:function(){var t=Object.prototype.hasOwnProperty,e=function(t,e,n){Object.defineProperty?Object.defineProperty(t,e,{configurable:!0,value:n,writable:!0}):t[e]=n};function n(t){return Object(t)===t}function i(){if(void 0===this)throw new TypeError("Constructor WeakMap requires 'new'");if(e(this,"_id","_WeakMap_"+r()+"."+r()),arguments.length>0)throw new TypeError("WeakMap iterable is not supported")}function o(e,i){if(!n(e)||!t.call(e,"_id"))throw new TypeError(i+" method called on incompatible receiver "+typeof e)}function r(){return Math.random().toString().substring(2)}return e(i.prototype,"delete",(function(t){if(o(this,"delete"),!n(t))return!1;var e=t[this._id];return!(!e||e[0]!==t||(delete t[this._id],0))})),e(i.prototype,"get",(function(t){if(o(this,"get"),n(t)){var e=t[this._id];return e&&e[0]===t?e[1]:void 0}})),e(i.prototype,"has",(function(t){if(o(this,"has"),!n(t))return!1;var e=t[this._id];return!(!e||e[0]!==t)})),e(i.prototype,"set",(function(t,i){if(o(this,"set"),!n(t))throw new TypeError("Invalid value used as weak map key");var r=t[this._id];return r&&r[0]===t?(r[1]=i,this):(e(t,this._id,[t,i]),this)})),e(i,"_polyfill",!0),i}()}(),new re,"undefined"!=typeof SECURITY_FUNCTION_CALL&&(SECURITY_FUNCTION_CALL=function(t,e){for(var n=[],i=2;i<arguments.length;i++)n[i-2]=arguments[i];return"function"==typeof t?(oe||(oe=Function.prototype.apply.call.bind(Function.prototype.apply)),oe(t,e,n)):t.call.apply(t,function(t,e,n){if(n||2===arguments.length)for(var i,o=0,r=e.length;o<r;o++)!i&&o in e||(i||(i=Array.prototype.slice.call(e,0,o)),i[o]=e[o]);return t.concat(i||Array.prototype.slice.call(e))}([e],n,!1))}),"undefined"!=typeof SECURITY_FUNCTION_APPLY&&(SECURITY_FUNCTION_APPLY=function(t,e,n){return"function"==typeof t?(oe||(oe=Function.prototype.apply.call.bind(Function.prototype.apply)),oe(t,e,n)):t.apply(e,n)}),function(t){t[t.Info=0]="Info",t[t.Warn=1]="Warn",t[t.Error=2]="Error"}(ae||(ae={})),function(t){t.AppxLifecycle="AppxLifecycle"}(se||(se={})),"undefined"!=typeof HAS_INSIDE_FEATURE&&HAS_INSIDE_FEATURE,"undefined"!=typeof ZEPHYR_HAS_INSIDE_FEATURE&&ZEPHYR_HAS_INSIDE_FEATURE,"undefined"!=typeof ZEPHYR_IS_INSIDE_UNSUPPORT_ELEMENT&&ZEPHYR_IS_INSIDE_UNSUPPORT_ELEMENT;var le,pe,ue,fe,he,de="undefined"!=typeof nativeLog&&"undefined"!=typeof mqEnvironment;function ve(t){return t&&"object"==typeof t?Object.keys(t):[]}function ye(t,e){var n,i;return"%s"===t?e="object"==typeof(i=e)?ce(i):i+"":"%c"===t?e=function(t){var e=""+t;0===e.indexOf("#")&&(e=e.substr(1)),3===e.length&&(e=e.replace(/(.)/g,"$1$1"));var n,i=parseInt(e,16);return isNaN(i)&&(n="".concat(t," is invalid hex color."),de?nativeLog(n,Date.now()):console.error(n,Date.now())),i}(e):"%b"===t?("string"==typeof(n=e)&&(n=n.replace(/^data:(\/|\w|\-|\.)+;base64,/i,"")),e=n):"%d"===t?e=parseInt(e,10):"%f"===t&&(e=parseFloat(e)),e}function ge(t,e,n){var i;return n=n||{},ve(e).forEach((function(o){var r,a,s,c=e[o];a=((r=c)||"").match(/(\w+)(%\w)$/i),s={k:r},a&&(s.k=a[1],s.t=a[2]),void 0!==(c=(i=s).k)&&(o in t||o in n)&&void 0===t[c]&&(t[c]=ye(i.t,void 0===n[o]?t[o]:n[o]),c!==o&&delete t[o])})),t}function Ie(){if(!fe){var t=$t(Promise,setTimeout,clearTimeout,setInterval,clearInterval);fe=te([],[],[],t)}return fe}function me(t,e){var n=function(t){if("undefined"==typeof navigator||!navigator||void 0===navigator.userAgent)return function(){throw new Error("API ".concat(t," should not initialized by smallfish. Please check your environment"))}}(t);if(n)return n;var i=(he||(he=Ie().defaultScope.publicInstance),he);if(!i[t]){var o=Ie().defaultScope;o.getCollection().apiMap[t]=e;var r=o.call4PublicNamed;i[t]=r.bind(null,t)}return i[t]}le||(le={}),pe||(pe={}),ue||(ue={});var be=["content"];function Ee(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}const _e={exitApp:function(t){return n("exitApp",t,{type:"async"})},getSystemInfo:function(t){return n("getSystemInfo",t,{type:"async"})},hideLoading:function(t){return n("hideLoading",t,{type:"async"})},hideToast:function(t){return n("hideToast",t,{type:"async"})},makePhoneCall:function(t){return n("makePhoneCall",t,{type:"async"})},prompt:function(t){return n("prompt",t,{type:"async"})},setClipboard:function(t){return n("setClipboard",t,{type:"async"})},showLoading:function(t){return n("showLoading",t,{type:"async"})},vibrate:function(t){return n("vibrate",t,{type:"async"})},alert:function(t){var e=t||{};n("alert",function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?a(Object(n),!0).forEach((function(e){i(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):a(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}({message:e.content,button:e.buttonText},o(e,r)))},confirm:function(t){var e=t||{};n("confirm",function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?c(Object(n),!0).forEach((function(e){i(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):c(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}({okButton:e.confirmButtonText,cancelButton:e.cancelButtonText,message:e.content},o(e,s)))},getLocation:function(t){var e=t||{},r=e.type,a=o(e,l);n("getCurrentLocation",function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?p(Object(n),!0).forEach((function(e){i(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):p(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}({bizType:(null==t?void 0:t.bizType)||"alipayIntl",requestType:r},a))},getNetworkType:function(t){var e=t.success;n("getNetworkType",h(h({},o(t,u)),{},{success:function(t){e&&e(h(h({},t),{},{networkType:t.networkInfo.toLocaleUpperCase()}))}}))},navigateBack:function(t){n("popWindow",{options:t})},navigateTo:function(t){n("pushWindow",t)},setNavigationBar:me("setNavigationBar",{v:function(t){if(void 0!==t.frontColor){var e=ye("%c",t.frontColor);if(16777215!==e&&0!==e)return{error:2,errorMessage:"frontColor 参数 ".concat(t.frontColor," 颜色值不合法")}}},b:function(t){t.reset&&(t.backgroundColor="#ffffff"),delete t.reset;var e,n="setTitle",i="setTitleColor",o="setBarBottomLineColor",r=this.optionPageViewId;return(e=r?{setTitle:{viewId:r},setTitleColor:{viewId:r},setBarBottomLineColor:{viewId:r}}:{setTitle:{},setTitleColor:{},setBarBottomLineColor:{}})[n]=ge(e[n],{title:"title%s",image:"image%b"},t),e[i]=ge(e[i],{backgroundColor:"color%c",frontColor:"frontColor%c"},t),e[o]=ge(e[o],{borderBottomColor:"color%c"},t),e},d:function(t,e){var n="setTitle",i="setTitleColor",o="setBarBottomLineColor",r={};0!==ve(t[n]).length&&this.callDefaultBridge(n,t[n],void 0,this.optionPageViewId),0!==ve(t[o]).length&&(isNaN(t[o].color)?(r.error=2,r.errorMessage="borderBottomColor 颜色值不合法"):this.callDefaultBridge(o,t[o],void 0,this.optionPageViewId)),0!==ve(t[i]).length?isNaN(t[i].color)?(r.error=2,r.errorMessage="frontColor 需和 backgroundColor 同时设置",e(r)):this.callDefaultBridge(i,t[i],(function(t){r=ie(ie({},t),r),e(r)}),this.optionPageViewId):e(r)}}),showToast:function(t){var e=t||{};n("toast",function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Ee(Object(n),!0).forEach((function(e){i(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Ee(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}({content:e.content||""},o(e,be)))}};return e.default})()));
|
|
1
|
+
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.my=e():t.my=e()}(self,(()=>(()=>{"use strict";var t={d:(e,n)=>{for(var i in n)t.o(n,i)&&!t.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:n[i]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e)},e={};function n(t,e,n){!function(t){if(window.AlipayJSBridge)return t();document.addEventListener("AlipayJSBridgeReady",(function(){return t()}),!1)}((function(){var i,o=n||{},r=o.type,a=void 0===r?"async":r,s=o.timeout,c=void 0===s?0:s,l=!1,p=function(t){if(!l){l=!0,i&&clearTimeout(i);var n=e||{},o=n.success,r=n.fail,a=n.complete;t.error||t.errorCode?null==r||r(t):null==o||o(t),null==a||a(t)}};"async"===a&&(c>0&&(i=setTimeout((function(){var e={error:-101,errorMessage:"[".concat(t,"]: Timeout")};p(e)}),c)),window.AlipayJSBridge.call(t,e,p)),"callback"===a&&window.AlipayJSBridge.call(t,e)}))}t.d(e,{default:()=>_e});function i(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function o(t,e){if(null==t)return{};var n,i,o=function(t,e){if(null==t)return{};var n,i,o={},r=Object.keys(t);for(i=0;i<r.length;i++)n=r[i],e.indexOf(n)>=0||(o[n]=t[n]);return o}(t,e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);for(i=0;i<r.length;i++)n=r[i],e.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(o[n]=t[n])}return o}var r=["content","buttonText"];function a(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}var s=["confirmButtonText","cancelButtonText","content"];function c(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}var l=["type"];function p(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}var u=["success"];function f(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}function h(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?f(Object(n),!0).forEach((function(e){i(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):f(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var d=Object.prototype.hasOwnProperty,v=Object.assign||function(t,e){for(var n,i=function(t){if(null==t)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(t)}(t),o=1;o<arguments.length;o++)for(var r in n=Object(arguments[o]))d.call(n,r)&&(i[r]=n[r]);return i},y=function(t,e){return y=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},y(t,e)};function g(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}y(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var I=function(){return I=Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},I.apply(this,arguments)};"function"==typeof SuppressedError&&SuppressedError;var m=Function.prototype.apply.call.bind(Function.prototype.apply),b=Function.prototype.bind;function E(t,e){for(var n=[],i=2;i<arguments.length;i++)n[i-2]=arguments[i];return m(t,e,n)}function _(t,e,n){return m(t,e,n)}function P(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return m(b,t,e)}var k,C,O,x,A,w,S,M,T,N,R=JSON.stringify,L=JSON.parse;function D(){return C||(t="undefined"!=typeof Set,C=t?Set:function(){function t(){this.itemList=[]}return Object.defineProperty(t.prototype,"size",{get:function(){return this.itemList.length},enumerable:!1,configurable:!0}),t.prototype.add=function(t){return-1===this.itemList.indexOf(t)&&this.itemList.push(t),this},t.prototype.delete=function(t){var e=this.itemList.indexOf(t);return-1!==e&&(this.itemList.splice(e,1),!0)},t.prototype.clear=function(){this.itemList=[]},t.prototype.has=function(t){return-1!==this.itemList.indexOf(t)},t.prototype.forEach=function(t){for(var e=0,n=this.itemList.slice();e<n.length;e++){var i=n[e];t(i,i,this)}},t}()),new C;var t}function j(t){return"number"==typeof t&&t>=0&&t<=8}function B(t){var e=t.split(".");if(!e.length)return!1;var n=function(t){for(var e=(N||"undefined"!=typeof __APPX_CAN_I_USE_DATA__&&(N=__APPX_CAN_I_USE_DATA__),N),n=0,i=t;n<i.length;n++){var o=i[n];if(void 0===(e=e&&e[o]))return;var r=e._;if(r){var a=r[T.default];if(a||(a=r[T[void 0]]),!a)return!1;if(void 0!==a[T.const])return Boolean(a[T.const]);var s=a[T.version_added];return void 0!==s&&void 0>=s}}}(e);return void 0!==n?n:function(t,e){if(!e.length)return!1;for(var n=void 0,i=0,o=e;i<o.length;i++){var r=o[i];if(void 0===(n=n&&n[r]))return;if("number"==typeof n._||"boolean"==typeof n._)return Boolean(n._);if("number"==typeof n||"boolean"==typeof n)return Boolean(n)}}(0,e)}O||(O="undefined"!=typeof WeakMap?WeakMap:function(){var t=Object.prototype.hasOwnProperty,e=function(t,e,n){Object.defineProperty?Object.defineProperty(t,e,{configurable:!0,value:n,writable:!0}):t[e]=n};function n(t){return Object(t)===t}function i(){if(void 0===this)throw new TypeError("Constructor WeakMap requires 'new'");if(e(this,"_id","_WeakMap_"+r()+"."+r()),arguments.length>0)throw new TypeError("WeakMap iterable is not supported")}function o(e,i){if(!n(e)||!t.call(e,"_id"))throw new TypeError(i+" method called on incompatible receiver "+typeof e)}function r(){return Math.random().toString().substring(2)}return e(i.prototype,"delete",(function(t){if(o(this,"delete"),!n(t))return!1;var e=t[this._id];return!(!e||e[0]!==t||(delete t[this._id],0))})),e(i.prototype,"get",(function(t){if(o(this,"get"),n(t)){var e=t[this._id];return e&&e[0]===t?e[1]:void 0}})),e(i.prototype,"has",(function(t){if(o(this,"has"),!n(t))return!1;var e=t[this._id];return!(!e||e[0]!==t)})),e(i.prototype,"set",(function(t,i){if(o(this,"set"),!n(t))throw new TypeError("Invalid value used as weak map key");var r=t[this._id];return r&&r[0]===t?(r[1]=i,this):(e(t,this._id,[t,i]),this)})),e(i,"_polyfill",!0),i}()),new O,"undefined"!=typeof SECURITY_FUNCTION_CALL&&(SECURITY_FUNCTION_CALL=function(t,e){for(var n=[],i=2;i<arguments.length;i++)n[i-2]=arguments[i];return"function"==typeof t?(m||(m=Function.prototype.apply.call.bind(Function.prototype.apply)),m(t,e,n)):t.call.apply(t,function(t,e,n){if(n||2===arguments.length)for(var i,o=0,r=e.length;o<r;o++)!i&&o in e||(i||(i=Array.prototype.slice.call(e,0,o)),i[o]=e[o]);return t.concat(i||Array.prototype.slice.call(e))}([e],n,!1))}),"undefined"!=typeof SECURITY_FUNCTION_APPLY&&(SECURITY_FUNCTION_APPLY=function(t,e,n){return"function"==typeof t?(m||(m=Function.prototype.apply.call.bind(Function.prototype.apply)),m(t,e,n)):t.apply(e,n)}),function(t){t.CanvasContext="CanvasContext"}(x||(x={})),function(t){t[t.PLUGIN=1]="PLUGIN",t[t.SUB_PACKAGE=2]="SUB_PACKAGE"}(A||(A={})),function(t){t.PLUGIN="plugin",t.SUB_PACKAGE="subpackage"}(w||(w={})),function(t){t[t.Info=0]="Info",t[t.Warn=1]="Warn",t[t.Error=2]="Error"}(S||(S={})),function(t){t.AppxLifecycle="AppxLifecycle"}(M||(M={})),"undefined"!=typeof HAS_INSIDE_FEATURE&&HAS_INSIDE_FEATURE,function(t){t.version_added="v",t.const="c",t.android="a",t.ios="i",t.default="d"}(T||(T={}));var U,V={scope:void 0,type:"empty"};function F(t){return t&&"empty"===t.type}function H(t){return t&&"extension"===t.type}function W(t){return t&&"openCapability"===t.type}function G(){return U||(U=function(){try{return INSIDE_CONFIG_STATIC||{}}catch(t){return{}}}()),U}"undefined"!=typeof ZEPHYR_HAS_INSIDE_FEATURE&&ZEPHYR_HAS_INSIDE_FEATURE,"undefined"!=typeof ZEPHYR_IS_INSIDE_UNSUPPORT_ELEMENT&&ZEPHYR_IS_INSIDE_UNSUPPORT_ELEMENT;var Y,K,J,z=function(){function t(t){this.taskMap=Object.create(null),this.addEventListener=t}return t.prototype.hasMatcher=function(t,e){var n=this.taskMap[t];if(!n)return!1;if(void 0===e){var i=Object.keys(n.callbacks).some((function(t){var e=n.callbacks[t];return!!(e&&e.length>0)}));return i}var o=n.callbacks[e];return!!o&&o.length>0},t.prototype.removeMatcher=function(t,e,n){var i=this.taskMap[t];if(!i)return 0;var o=i.callbacks[e];if(!o)return 0;if(n){var r=o.length;return i.callbacks[e]=o.filter((function(t){return t!==n})),r-i.callbacks[e].length}return r=o.length,o.length=0,r},t.prototype.addMatcher=function(t,e,n,i,o,r){var a=this.taskMap[t];a||(a=this.taskMap[t]={callbacks:Object.create(null)},this.addEventListener(t,P(this.onEventHandler,this,t,i,o),r));var s=a.callbacks[e];return s||(s=a.callbacks[e]=[]),s.indexOf(n)<0?(s.push(n),1):0},t.prototype.onEventHandler=function(t,e,n,i){var o=this.taskMap[t],r=e(i,o);if(r)for(var a=o.callbacks,s=0,c=r;s<c.length;s++){var l=a[c[s]];if(l){var p=n(i);if(p)for(var u=0,f=l;u<f.length;u++)(0,f[u])(p)}}},t}();function q(t){return void 0===t}function Z(t){return t&&"object"==typeof t}function Q(t){return"function"==typeof t}function $(t){return!!(t&&t.get&&t.update)}var X=function(t,e,n,i,o,r,a){e().getKernel().__BRIDGE_CALL__(r,n,i,o)},tt=function(t,e,n,i,o,r){return e().getKernel().__BRIDGE_CALL_SYNC__(o,n,i)};function et(t,e){var n=t.jsApiCacheWhitelist;return!!(n&&"string"==typeof n&&n.indexOf(e)>=0)}function nt(t,e){return t[e]}var it={internalAPI:!0,openInBrowser:!0},ot={};function rt(t,e,n,i,o,r,a,s){var c="".concat(r),l=!!(1&o),p=!!(2&o),u=!!(4&o),f=!1===l&&!0===p,h=f?t.getPublicCallProxyAPIInfoByName(c):t.getAPIInfoByName(c),d=f?"my.callSync":ct(h,r);if(h||(h=ot),!it[c]){(l||p)&&(s=null);var v=Rt(h,n,i,l,u,s,e,c,a,{caller:d});try{return v.invoke()}finally{}}}function at(t,e,n,i,o,r,a,s,c){var l="".concat(r),p=!!(1&o),u=!!(2&o),f=!!(4&o),h=!1===p&&!0===u,d=ot;t&&(d=h?t.getPublicCallProxyAPIInfoByName(l):t.getAPIInfoByName(l));var v=h?"my.call":ct(d,r);if(d||(d=ot),!it[l]){(p||u)&&(c=null);var y=Nt(d,n,i,p,f,c,e,l,a,s,{caller:v});try{return y.invoke()}finally{}}}function st(t,e,n,i,o,r,a,s){var c=function(t,e,n,i,o,r,a,s,c,l){return new Mt(e,n,r,a,s,t,{caller:null==l?void 0:l.caller,callerContext:null==l?void 0:l.callerContext,directly:!0,inside:!1,shouldNotRewriteIdOrClass:c,viewId:null})}(t,i,o,0,0,n,e,r,a,s);return c.invoke()}function ct(t,e){if(t)return t.avaliableNamespace?"my.".concat(t.avaliableNamespace,".").concat(e):"my.".concat(e)}var lt,pt,ut=function(){function t(t){this._context=t,this.__appxDomain=t.appxDomain.scope;var e=this._context.runtime().getEnv(),n=e.isIOS,i=e.isAndroid,o=e.isIDE;this.isIOS=n,this.isAndroid=i,this.isIDE=o}return t.prototype.callBridge=function(t,e,n){this._context.callDefaultBridge(t,e,n)},t.prototype.callBridgeSync=function(t,e){return this._context.callDefaultBridgeSync(t,e)},t.prototype.on=function(t,e){return this._context.runtime().getBridge().event.addEventListener(t,0,e)},t.prototype.off=function(t,e){return this._context.runtime().getBridge().event.removeEventListener(t,0,e)},t.prototype.getStartupParams=function(){return this._context.runtime().getEnv().originalStartupParams},t}();function ft(t){var e;lt||(k||(e="undefined"!=typeof Map,k=e?Map:function(){function t(){this.keyList=[],this.valueList=[]}return t.prototype.set=function(t,e){var n=this.keyList,i=n.indexOf(t);if(-1===i){var o=n.push(t)-1;this.valueList[o]=e}else this.valueList[i]=e;return this},t.prototype.get=function(t){var e=this.keyList.indexOf(t);return-1===e?void 0:this.valueList[e]},t.prototype.forEach=function(t){for(var e=this.keyList.slice(),n=this.valueList.slice(),i=e.length,o=0;o<i;o++){var r=e[o];t(n[o],r,this)}},Object.defineProperty(t.prototype,"size",{get:function(){return this.keyList.length},enumerable:!1,configurable:!0}),t.prototype.has=function(t){return-1!==this.keyList.indexOf(t)},t.prototype.delete=function(t){var e=this.keyList.indexOf(t);return-1!==e&&(this.keyList.splice(e,1),this.valueList.splice(e,1),!0)},t.prototype.clear=function(){this.keyList=[],this.valueList=[]},t}()),lt=new k);var n=lt.get(t);if(!n){n=D(),lt.set(t,n);for(var i=0,o=t;i<o.length;i++){var r=o[i];"string"==typeof r&&n.add(r)}}return n}function ht(){return pt||((pt=D()).add("success"),pt.add("error"),pt.add("errorMessage")),pt}function dt(t,e,n){if(t&&"object"==typeof t){for(var i=ft(e),o={},r=0,a=Object.keys(t);r<a.length;r++){var s=a[r];i.has(s)||n&&n.has(s)?o[s]=t[s]:"undefined"!=typeof process&&process&&process.env}return o}return t}function vt(t,e,n){var i=t,o=e;return Q(t)&&(q(e)||n()&&(o=t,i={})),function(t,e){var n=t,i=e;return q(e)&&Q(t)&&(i=t,n={}),Z(t)||void 0===t||(n={}),q(n)&&(n={}),{callback:i,option:n}}(i,o)}function yt(t,e,n){try{var i=G().config;if(!i||"ap"!==i.clientName)return!0;if(e().getBehaviorManager().report("duplicated my.call(".concat(n,")")),t.getFlag("ignoreCallbackWhenInvokeMyCall"))return!0}catch(t){}return!1}function gt(t){var e={};return Q((t=t||{}).success)&&(e.success=t.success,delete t.success),Q(t.fail)&&(e.fail=t.fail,delete t.fail),Q(t.complete)&&(e.complete=t.complete,delete t.complete),e}var It=1,mt={};function bt(){}var Et=Object.defineProperty;function _t(t,e,n){Et(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n})}var Pt,kt=function(){function t(t,e,n,i,o,r,a,s){if(l=o,"[object Object]"===Object.prototype.toString.call(l)){var c=I({},o);void 0!==c.page&&(c.page=void 0),this.option=c}else this.option=o;var l;_t(this,"ctx",t),_t(this,"runtime",e),_t(this,"extraInfo",s),_t(this,"apiName",i),_t(this,"appxDomain",n),_t(this,"appxDomainIsNotEmpty",!F(n)),_t(this,"callback",a),_t(this,"apiInfo",this.getFlag("freezeAPIInfo")?function(t){try{Object.isFrozen(t)||(Object.setPrototypeOf(t,null),Object.freeze(t))}finally{return t}}(I({},r)):r||{}),r.t&&(this.taskId=It++),this.startTime=(new Date).getTime(),this.initDependency(o,s.viewId,r,a),this.callStack=new Error("")}return t.prototype.invoke=function(){},t.prototype.callScopedBridge=function(t,e,n,i){var o=this.appxDomain;return o&&!F(o)&&(e=I(I({},e),{__appxDomain:o.scope})),this.callDefaultBridge(t,e,n,i)},t.prototype.callScopedBridgeSync=function(t,e,n){var i=this.appxDomain;return i&&!F(i)&&(e=I(I({},e),{__appxDomain:i.scope})),this.callDefaultBridgeSync(t,e,n)},t.prototype.callBridge=function(t,e,n,i){return this.callDefaultBridge(t,e,n,i)},t.prototype.callDefaultBridge=function(t,e,n,i){var o=this.runtime();if(o){var r=o.getBridge();r&&r.callBridge(t,e,n,void 0,{caller:this.extraInfo.caller})}},t.prototype.callDefaultBridgeSync=function(t,e,n){var i=this.runtime();if(i){var o=i.getBridge();if(o)return o.callBridgeSync(t,e,n,{caller:this.extraInfo.caller})}},t.prototype.callInternalAPI=function(t,e,n,i){var o=this.runtime();if(o){var r=o.getBridge();r&&r.callInternalAPI(t,e,n,i,{caller:this.extraInfo.caller})}},t.prototype.callInternalAPISync=function(t,e,n){var i=this.runtime();if(i){var o=i.getBridge();if(o)return o.callInternalAPISync(t,e,n,{caller:this.extraInfo.caller})}},t.prototype.getEnvAppBiz=function(){return"TinyAppBiz-".concat(this.getEnvAppId())},t.prototype.getEnvAppId=function(){var t=this.runtime().getEnv().startupParams.appId;return void 0===t?"":t},t.prototype.getEnvPlatformIOS=function(){return"ios"===this.runtime().getEnv().platform},t.prototype.invokeExternalElementMethod=function(t,e,n,i){if(t&&void 0!==t.$viewId){var o=t.$viewId,r=this.runtime().getPageManager().getInstanceById("".concat(o));r&&r.invokeClientElementMethod(e,"onHostExternalMessage",[n,i])}},t.prototype.getBridgeExtraInfo=function(){return this.runtime().getBridge().extraInfo},t.prototype.getEnvPlatformAndroid=function(){return"android"===this.runtime().getEnv().platform},t.prototype.getEnvOnlyCube=function(){return this.runtime().getEnv().isOnlyCube},t.prototype.invokeCallback=function(t,e){t?this.callbackUnion[t]&&this.callbackUnion[t](e):this.callback&&this.callback(e)},t.prototype.dispatchResultCallback=function(t){var e=!1;if("object"==typeof t&&(e="error"in t||"errorMessage"in t),e?(this.shouldEmitEvent()&&this.runtime().getTypedEventManager().invokeInternalEvent(8,[{key:this.apiName,option:this.option,result:t,type:"fail"}]),t=this.callHookAfterLog(t),this.invokeCallback("fail",t)):(this.shouldEmitEvent()&&this.runtime().getTypedEventManager().invokeInternalEvent(8,[{key:this.apiName,option:this.option,result:t,type:"success"}]),this.invokeCallback("success",t)),this.invokeCallback("complete",t),this.invokeCallback(null,t),!e)return t;if(!this.shouldNotReturnPromise()){var n=this.runtime();if(n&&"function"==typeof n.getLogger){var i=n.getLogger();i&&i.attachErrorSource&&i.attachErrorSource(t,{from:"api",method:this.apiName,payload:this.option,stack:this.callStack})}throw t}},t.prototype.shouldNotReturnPromise=function(){if(this.apiInfo.noPromise)return!0;var t=!!(this.callbackUnion.complete||this.callbackUnion.success||this.callbackUnion.fail||this.callback),e=this.apiInfo.allowAbort||this.apiInfo.progress||this.apiInfo.returnProto;return t&&!e},t.prototype.shouldEmitEvent=function(){return this.extraInfo.directly&&"object"==typeof this.option&&!mt[this.apiName]},t.prototype.prepareOption=function(){return this.shouldEmitEvent()&&this.runtime().getTypedEventManager().invokeInternalEvent(8,[{key:this.apiName,type:"invoke"}]),this.callHookBefore()},t.prototype.getInsideContext=function(){var t=this.insideContext;return t||(t=this.insideContext=new ut(this)),t},t.prototype.callHookValidate=function(){var t=this.apiInfo.tapMark;if("function"!=typeof t||this.extraInfo.inside||(t=E(t,this)),!0===t){var e=this.getPageInstance();e&&!e.getTapMarkManager().checkTapMark()&&(this.validateResult={error:5,errorMessage:"".concat(this.apiName," can only be invoked by user tap gesture")})}return void 0===this.validateResult&&this.apiInfo.v&&!this.extraInfo.inside&&(this.apiInfo.b_v&&(this.validateResult=E(this.apiInfo.b_v,this,this.option)),void 0===this.validateResult&&(this.validateResult=E(this.apiInfo.v,this,this.option)),void 0===this.validateResult&&this.apiInfo.a_v&&(this.validateResult=E(this.apiInfo.a_v,this,this.option))),this.validateResult},t.prototype.callHookBefore=function(){var t=this.option;return this.optionPageViewId||this.apiInfo.b?(t=I({},t),Array.isArray(this.apiInfo.in)&&(t=dt(t,this.apiInfo.in,ht())),this.optionPageViewId&&(t.viewId=this.optionPageViewId),this.apiInfo.b&&(this.apiInfo.b_b&&(t=this.extraInfo.inside?E(this.apiInfo.b_b,this.getInsideContext(),t,this.callback)||t:E(this.apiInfo.b_b,this,t,this.callback)||t),t=this.extraInfo.inside?E(this.apiInfo.b,this.getInsideContext(),t,this.callback)||t:E(this.apiInfo.b,this,t,this.callback)||t,this.apiInfo.a_b&&(t=this.extraInfo.inside?E(this.apiInfo.a_b,this.getInsideContext(),t,this.callback)||t:E(this.apiInfo.a_b,this,t,this.callback)||t))):Array.isArray(this.apiInfo.in)&&(t=dt(t,this.apiInfo.in,ht())),W(this.appxDomain)?t.__openCapabilityId=this.appxDomain.origin:t.__openCapabilityId&&delete t.__openCapabilityId,t},t.prototype.callHookAfter=function(t){var e=t;return this.apiInfo.a&&(this.apiInfo.b_a&&(this.apiInfo.ignoreShadowCopyResponse||(e=I({},e)),e=!0===this.extraInfo.inside?E(this.apiInfo.b_a,this.getInsideContext(),e,this.finalOption,this.option)||e:E(this.apiInfo.b_a,this,e,this.finalOption,this.option)||e),this.apiInfo.ignoreShadowCopyResponse||(e=I({},e)),e=!0===this.extraInfo.inside?E(this.apiInfo.a,this.getInsideContext(),e,this.finalOption,this.option)||e:E(this.apiInfo.a,this,e,this.finalOption,this.option)||e,this.apiInfo.a_a&&(this.apiInfo.ignoreShadowCopyResponse||(e=I({},e)),e=!0===this.extraInfo.inside?E(this.apiInfo.a_a,this.getInsideContext(),e,this.finalOption,this.option)||e:E(this.apiInfo.a_a,this,e,this.finalOption,this.option)||e)),Array.isArray(this.apiInfo.out)&&(e=dt(e,this.apiInfo.out,ht())),e},t.prototype.callHookAfterLog=function(t){var e=t;return this.apiInfo.a_l&&(e=E(this.apiInfo.a_l,this,e,this.finalOption,this.option)||e),e},t.prototype.processResult=function(t){var e,n=t||{};n=this.callHookAfter(n);var i=!0;return(null===(e=this.extraInfo)||void 0===e?void 0:e.directly)&&this.getFlag("disablePublicCallErrorCodeNormalize")&&(i=!1),i&&(n=function(t){return"string"==typeof t.error&&(t.error=parseInt(t.error,10)),0===t.error&&(delete t.error,delete t.errorMessage),t}(n)),n},t.prototype.getRewriteIdWithAppxDomain=function(t){var e,n,i=t,o=this.appxDomain;return!H(o)&&!W(o)||this.extraInfo.shouldNotRewriteIdOrClass||(i=(e={type:4,value:o.origin},n={type:8,value:i},{type:9,value:"p-".concat(e.value,"-").concat(n.value)}).value),i},t.prototype.getPageInstance=function(){var t=this.pageInstance;return t&&!t.hasPageUnloaded()||(t&&(this.pageInstance=null),t=this.runtime().getNav().getTopInstance()),t},t.prototype.initDependency=function(t,e,n,i){var o,r,a=this.runtime(),s=t&&t.page&&t.page.$viewId||void 0,c=s||e||void 0;c&&(r=a.getPageManager().getInstanceById(c)),r&&!r.hasPageUnloaded()||(r=null===(o=a.getNav())||void 0===o?void 0:o.getTopInstance()),r&&(c=r.pageId,this.pageInstance=r),this.assignedViewId=c,this.optionPageViewId=s},t.prototype.getState=function(){return this.extraInfo.parentState},t.prototype.getProtoContext=function(){return this.extraInfo.parentProtoContext},t.prototype.getCallerContext=function(){return this.extraInfo.callerContext},t.prototype.callProtoAPI=function(t,e){return st(t,this.apiName,this.appxDomain,this.ctx,this.runtime,e,this.extraInfo.shouldNotRewriteIdOrClass,{caller:this.extraInfo.caller,callerContext:this})},t.prototype.reportHostError=function(t,e,n,i,o){return this.runtime().getKernel().reportHostError(t,e,n,i,o)},t.prototype.getFlag=function(t){return this.ctx.getFlags()[t]},t.prototype.invokeCompositeElementMethod=function(t,e,n){var i;void 0===e&&(e=bt);var o=null===(i=this.extraInfo)||void 0===i?void 0:i.scopedElementId;if(o){var r=n||this.apiName,a=function(t,e,n,i){if(t){var o=t.success,r=t.fail;return{complete:t.complete,data:function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(i=Object.getOwnPropertySymbols(t);o<i.length;o++)e.indexOf(i[o])<0&&Object.prototype.propertyIsEnumerable.call(t,i[o])&&(n[i[o]]=t[i[o]])}return n}(t,["success","fail","complete"]),element:n,fail:r,success:o,viewId:e,action:i}}return{element:n,viewId:e,action:i}}(t,this.assignedViewId,o,r);this.pageInstance?this.pageInstance.invokeCompositeElementMethod(a,this,e):e({error:1,errorMessage:"page not found"})}},t}();var Ct,Ot,xt=/^(?:on|off)([A-Z])(\w+)/;var At,wt,St={},Mt=function(t){function e(e,n,i,o,r,a,s){return t.call(this,e,n,i,o,r,a,void 0,s)||this}return g(e,t),e.prototype.invoke=function(){for(var t=this,e=_(this.apiInfo.state,this,this.option),n={},i=function(i){var r=o.apiInfo.proto[i];if("function"==typeof r.feature&&!E(r.feature,o))return"continue";var a=o.apiName?"".concat(o.extractProtoEntityNameFromAPIInfo(o.apiName),".").concat(i):void 0,s=function(i){i.extraInfo.caller=a,i.extraInfo.scopedElementId=t.apiInfo.compositeElement?t.getRewriteIdWithAppxDomain(t.option[0]):void 0,i.extraInfo.parentState=e,i.extraInfo.parentProtoContext=n,i.extraInfo.callerContext=t.extraInfo.callerContext||t};if(r.getter){var c,l=function(t,e,n,i,o,r,a){return new Tt(e,n,r,a,t,{caller:void 0,directly:!1,viewId:o,inside:!1,scopedElementId:void 0})}(r,o.ctx,o.runtime,0,o.assignedViewId,o.appxDomain,i);s(l);var p=!1;Object.defineProperty(n,i,{configurable:!0,enumerable:!0,get:function(){return p||(c=l.invoke()),c},set:function(t){return c=t,p=!0,!0}})}else n[i]=function(e,n){if(t.apiInfo.compositeElement&&!t.hasPermission())return t.invokeNoPermissionCallbackDirectly(a,i,e,n);var o=Nt(r,t.ctx,t.runtime,!1,!1,t.assignedViewId,t.appxDomain,i,e,n);return s(o),o.invoke()}},o=this,r=0,a=Object.keys(this.apiInfo.proto);r<a.length;r++)i(a[r]);return n},e.prototype.initDependency=function(e,n,i,o){var r=i.createOptionIndex,a=!1===r?null:e[r];t.prototype.initDependency.call(this,a,n,i,null)},e.prototype.extractProtoEntityNameFromAPIInfo=function(t){var e=t.match(/^(create|get)(.*)$/);return e?e[2]:"".concat(t[0].toUpperCase()).concat(t.slice(1))},e.prototype.hasPermission=function(){var t=this.runtime().getPermissionManager();return!t||t.checkElementPermission4ContextAPI(this.apiInfo.compositeElement,this.appxDomain)},e.prototype.invokeNoPermissionCallbackDirectly=function(t,e,n,i){var o=this,r={error:4,errorMessage:"无权调用 ".concat(t)},a=vt(n,i,(function(){return yt(o.ctx,o.runtime,e)})),s=a.option,c=a.callback,l=gt(s),p=function(t){return o.runtime().getKernel().setTimeout(t,0)};l.fail&&p((function(){l.fail(r)})),l.complete&&p((function(){l.complete(r)})),c&&p((function(){c(r)}))},e}(kt);var Tt=function(t){function e(e,n,i,o,r,a){return t.call(this,e,n,i,o,null,r,null,a)||this}return g(e,t),e.prototype.invoke=function(){return E(this.apiInfo.getter,this)},e}(kt);function Nt(t,e,n,i,o,r,a,s,c,l,p){if(t.fn)return new(Ot||(Ot=function(t){function e(e,n,i,o,r,a,s,c){return t.call(this,e,n,i,o,r,s,a,c)||this}return g(e,t),e.prototype.invoke=function(){return!0===this.extraInfo.inside?E(this.apiInfo.fn,this.getInsideContext(),this.option,this.callback):E(this.apiInfo.fn,this,this.option,this.callback)},e.prototype.initDependency=function(e,n,i,o){var r=i.fnOptionIndex,a=0===r?e:1===r?o:null;t.prototype.initDependency.call(this,a,n,i,null)},e}(kt)),Ot)(e,n,a,s,c,l,t,{caller:void 0,directly:i,inside:o,viewId:r,scopedElementId:null==p?void 0:p.scopedElementId});var u=vt(c,l,(function(){return yt(e,n,s)})),f=u.option,h=u.callback;return function(t){return/^(?:on|off)[A-Z](?:\w+)/.test(t)}(s)?new(Ct||(Ct=function(t){function e(e,n,i,o,r,a,s,c){var l=t.call(this,e,n,i,o,r,a,s,c)||this;return"function"==typeof a.e?l.eventName=E(a.e,l):l.eventName=function(t,e){var n="";if(e&&xt.test(t)){var i=t.match(xt);"string"==typeof e.m&&(n=e.m),!n&&i[1]&&i[2]&&(n=i[1].toLowerCase()+i[2])}return n}(o,l.apiInfo),l}return g(e,t),e.prototype.invoke=function(){if(this.finalOption=this.prepareOption(),this.callbackUnion=gt(this.finalOption),/^on/.test(this.apiName)){if(j(this.apiInfo.m))return"function"==typeof this.callback?this.runtime().getTypedEventManager().addEventListener(this.apiInfo.m,this.callback,!0):{remove:function(){}};if(this.apiInfo.task){if("function"==typeof this.callback){var t=this.apiInfo.task,e=t.id,n=t.getTaskId,i=t.getPayload,o=t.isolate,r="function"==typeof e?E(e,this):e;this.callHookEventTask("start",o,r),this.runtime().getBridge().event.taskManager.addMatcher(this.eventName,r,this.callback,n,i)}}else this.callHookEvent("start"),this.runtime().getBridge().event.addEventListener(this.eventName,1,P(this.processEventResult,this),this.callback)}else if(j(this.apiInfo.m))"function"==typeof this.callback&&this.runtime().getTypedEventManager().removeEventListener(this.apiInfo.m,this.callback);else if(this.apiInfo.task){if("function"==typeof this.callback){var a=this.apiInfo.task;e=a.id,o=a.isolate,r="function"==typeof e?E(e,this):e,this.runtime().getBridge().event.taskManager.removeMatcher(this.eventName,r,this.callback),this.callHookEventTask("end",o,r)}}else this.runtime().getBridge().event.removeEventListener(this.eventName,1,this.callback),this.callHookEvent("end")},e.prototype.processEventResult=function(t){var e,n;n={},q((e=t).data)||(n=Z(n=e.data)?n:{data:n}),t=n;var i=this.processResult(t);this.dispatchResultCallback(i)},e.prototype.callHookEventTask=function(t,e,n){var i=this.runtime().getBridge().event.taskManager;(2===e?i.hasMatcher(this.eventName,n):1===e&&i.hasMatcher(this.eventName))||Q(this.apiInfo[t])&&(this.extraInfo.inside?E(this.apiInfo[t],this.getInsideContext()):E(this.apiInfo[t],this))},e.prototype.callHookEvent=function(t){this.runtime().getBridge().event.hasEventListener(this.eventName,1)||Q(this.apiInfo[t])&&(this.extraInfo.inside?E(this.apiInfo[t],this.getInsideContext()):E(this.apiInfo[t],this))},e}(kt)),Ct)(e,n,a,s,f,t,h,{caller:null==p?void 0:p.caller,directly:i,inside:o,viewId:r,scopedElementId:null==p?void 0:p.scopedElementId}):new(Pt||(Pt=function(t){function e(e,n,i,o,r,a,s,c){return t.call(this,e,n,i,o,r,a,s,c)||this}return g(e,t),e.prototype.invoke=function(){var t=this,e=this.invokeMethodAsync();if(!this.shouldNotReturnPromise()){var n=this.apiInfo,i=n.allowAbort,o=n.progress,r=n.returnEvent,a=n.returnProto;if(i||o||r||a){if(i){var s=this.apiInfo.cancelname||"abort";e[s]=function(){Q(t.apiInfo.c)&&E(t.apiInfo.c,t),t.resolveImmediate&&t.resolveImmediate({error:9,errorMessage:"".concat(t.apiName,":fail abort")})}}if("object"==typeof r&&r)for(var c=function(n){var i=r[n],o=i.taskId,a=i.getTaskId,s=i.eventName,c=i.getPayload,p=i.feature;if("function"==typeof p&&!E(p,l))return"continue";var u=n[0].toUpperCase()+n.slice(1);e["on".concat(u)]=function(e){var n=t.runtime();if(n){var i=n.getBridge().event;if(i){var r="function"==typeof o?E(o,t):o;i.taskManager.addMatcher(s,r,e,a,c)}}},e["off".concat(u)]=function(e){var n=t.runtime();if(n){var i=n.getBridge().event;if(i){var r="function"==typeof o?E(o,t):o;i.taskManager.removeMatcher(s,r)}}}},l=this,p=0,u=Object.keys(r);p<u.length;p++)c(u[p]);if(o){var f=this.taskId,h=o.key,d=o.getPayload,y=o.getTaskId;e.onProgressUpdate=function(e){var n=t.runtime();if(n){var i=n.getBridge().event;i&&i.taskManager.addMatcher("".concat(h,"StateChange"),f,e,y,d)}}}if(a){var g=E(a,this);v(e,g)}}return e}},e.prototype.callHookDoingAsync=function(t){this.apiInfo.allowAbort&&(this.resolveImmediate=t);var e=this.getFlag("idempotentAPIWhiteList"),n=this.apiInfo.m||this.apiName;if(this.apiInfo.i||Array.isArray(e)&&e.indexOf(n)>-1){var i=this.getFlag("idempotentAPIBlackList");Array.isArray(i)&&i.indexOf(n)>-1?this.doingAsync(t):this.invokeIdempotentAPI(this.apiInfo.i,t)}else this.doingAsync(t)},e.prototype.doingAsync=function(t){Q(this.apiInfo.d)?!0===this.extraInfo.inside?E(this.apiInfo.d,this.getInsideContext(),this.finalOption,t):E(this.apiInfo.d,this,this.finalOption,t):Q(this.apiInfo.d_with_cache)?this.interceptBridgeCall4Cache(this.apiInfo.cache,t)||(!0===this.extraInfo.inside?E(this.apiInfo.d_with_cache,this.getInsideContext(),this.finalOption,t):E(this.apiInfo.d_with_cache,this,this.finalOption,t)):this.apiInfo.compositeElementAction?this.invokeCompositeElementMethod(this.finalOption,t):this.interceptBridgeCall4Cache(this.apiInfo.cache,t)||(this.shouldForbidAsyncJSAPI(this.apiInfo.m||this.apiName,this.finalOption)?(this.runtime().getEnv().packageAndRunSceneType,t({error:4,errorMessage:"API调用受限"})):X(this.ctx,this.runtime,this.apiInfo.m||this.apiName,this.appxDomainIsNotEmpty?I(I({},this.finalOption),{__appxDomain:this.appxDomain.scope}):this.finalOption,t,this.assignedViewId,{caller:this.extraInfo.caller}))},e.prototype.shouldForbidAsyncJSAPI=function(t,e){var n=!1;if("hideOptionMenuItem"===t){var i=this.getFlag("forbidAPIList");"favorite"===e.name&&i&&i.indexOf("hideOptionMenuItem")>-1&&(n=!0)}return n},e.prototype.interceptBridgeCall4Cache=function(t,e){var n=this;if(!t)return!1;var i=this.runtime(),o=i.getBridge(),r=t.key,a=i.getEnv().originalStartupParams;if(!et(a,r))return!1;var s=o.extraInfo[r];if(s||(s=o.extraInfo[r]={cache:nt(a,r)}),$(t)){var c=E(t.get,null,s,this.finalOption);return c?((0,this.runtime().getKernel().setTimeout)((function(){e(c)}),0),!0):(X(this.ctx,this.runtime,this.apiInfo.m||this.apiName,this.appxDomainIsNotEmpty?I(I({},this.finalOption),{__appxDomain:this.appxDomain.scope}):this.finalOption,(function(i){E(t.update,null,s,n.finalOption,i),e(i)}),this.assignedViewId,{caller:this.extraInfo.caller}),!0)}return t.set?(E(t.set,null,s,this.finalOption),!1):void 0},e.prototype.invokeMethodAsync=function(){var t=this,e=this.runtime(),n=e.getKernel(),i=n.Promise;return this.callHookValidate()?(this.callbackUnion=gt(this.option),i.resolve().then((function(){return t.dispatchResultCallback(t.validateResult)}))):(this.callbackUnion=gt(this.option),this.finalOption=this.prepareOption(),new i((function(i,o){var r=1;t.callHookDoingAsync((function(a){var s=t.apiInfo,c=s.progress;if(c){var l=c.key,p=e.getBridge().event;p&&p.taskManager.removeMatcher("".concat(l,"StateChange"),t.taskId)}if(s.allowAbort){if(!t.resolveImmediate)return;t.resolveImmediate=null}var u=t.processResult(a);try{if(r)return void n.setTimeout((function(){try{i(t.dispatchResultCallback(u))}catch(t){o(t)}}),2);i(t.dispatchResultCallback(u))}catch(t){o(t)}})),r=0})))},e.prototype.invokeIdempotentAPI=function(t,e){if(this.finalOption&&Object.keys(this.finalOption).length>0)return this.doingAsync(e);var n=this.runtime(),i=n.getBridge(),o=i.extraInfo.idempotenceInfo;o||(o=i.extraInfo.idempotenceInfo={});var r=this.apiInfo.m||this.apiName,a=void 0!==this.optionPageViewId?this.optionPageViewId:void 0!==this.assignedViewId?this.assignedViewId:"default",s=this.appxDomainIsNotEmpty?this.appxDomain.scope:"default",c="".concat(r,"-").concat(a,"-").concat(s),l=o[c];l||(l=o[c]={processing:!1,resolveQueue:[]}),l.processing?l.resolveQueue.push(e):(l.processing=!0,this.doingAsync((function(t){var i;l.processing=!1;try{i=L(R(t))}catch(t){i={},n.getLogger().reportError(12,t)}e(t),l.resolveQueue&&l.resolveQueue.length>0&&(l.resolveQueue.forEach((function(t){t(L(R(i)))})),l.resolveQueue=[])})))},e.prototype.abort=function(){this.resolveImmediate&&this.resolveImmediate({error:9,errorMessage:"".concat(this.apiName,":fail abort")})},e}(kt)),Pt)(e,n,a,s,f,t,h,{caller:null==p?void 0:p.caller,directly:i,inside:o,viewId:r,scopedElementId:null==p?void 0:p.scopedElementId})}function Rt(t,e,n,i,o,r,a,s,c,l){var p=vt(c,void 0,(function(){return yt(e,n,s)})).option;return new(wt||(wt=function(t){function e(e,n,i,o,r,a,s){return t.call(this,e,n,i,o,r,a,null,s)||this}return g(e,t),e.prototype.interceptBridgeCallSync4Cache=function(t){if(t){var e=this.runtime(),n=e.getBridge(),i=t.key,o=e.getEnv().originalStartupParams;if(et(o,i)){var r=n.extraInfo[i];if(r||(r=n.extraInfo[i]={cache:nt(o,i)}),$(t)){var a=E(t.get,null,r,this.finalOption);if(a)return{hit:!0,result:a};var s=tt(this.ctx,this.runtime,this.apiInfo.m||this.apiName,this.appxDomainIsNotEmpty?I(I({},this.finalOption),{__appxDomain:this.appxDomain.scope}):this.finalOption,this.assignedViewId,{caller:this.extraInfo.caller});return E(t.update,null,r,this.finalOption,s),{hit:!1,result:s}}t.set&&E(t.set,null,r,this.finalOption)}}},e.prototype.callHookDoingSync=function(){var t;if(Q(this.apiInfo.d))t=!0===this.extraInfo.inside?E(this.apiInfo.d,this.getInsideContext(),this.finalOption,void 0):E(this.apiInfo.d,this,this.finalOption,void 0);else if(Q(this.apiInfo.d_with_cache_sync))(t=(e=this.interceptBridgeCallSync4Cache(this.apiInfo.cache))?e.result:!0===this.extraInfo.inside?E(this.apiInfo.d_with_cache_sync,this.getInsideContext(),this.finalOption,void 0):E(this.apiInfo.d_with_cache_sync,this,this.finalOption,void 0))&&(t=this.processResult(t)||t);else{var e;(t=(e=this.interceptBridgeCallSync4Cache(this.apiInfo.cache))?e.result:tt(this.ctx,this.runtime,this.apiInfo.m||this.apiName,this.appxDomainIsNotEmpty?I(I({},this.finalOption),{__appxDomain:this.appxDomain.scope}):this.finalOption,this.assignedViewId,{caller:this.extraInfo.caller}))&&(t=this.processResult(t)||t)}return t||(t={error:999,errorMessage:"System Error: Return ".concat(t)}),t},e.prototype.invoke=function(){return this.callHookValidate()?this.validateResult:(this.finalOption=this.prepareOption(),Q(this.apiInfo.responseProxy)&&!0!==this.extraInfo.inside&&this.getFlag("enableBridgeResponseProxy")&&(t=E(this.apiInfo.responseProxy,this,this.finalOption,P(this.callHookDoingSync,this),P(this.callHookDoingAsync4ResponseProxy,this))),t||(t=this.callHookDoingSync()),t);var t},e.prototype.callHookDoingAsync4ResponseProxy=function(t){var e=this,n=function(n){var i=e.processResult(n);t(i)};this.interceptBridgeCall4CacheAsync(this.apiInfo.cache,n)||X(this.ctx,this.runtime,this.apiInfo.m||this.apiName,this.appxDomainIsNotEmpty?I(I({},this.finalOption),{__appxDomain:this.appxDomain.scope}):this.finalOption,n,this.assignedViewId,{caller:this.extraInfo.caller})},e.prototype.interceptBridgeCall4CacheAsync=function(t,e){var n=this;if(!t)return!1;var i=this.runtime(),o=i.getBridge(),r=t.key,a=i.getEnv().originalStartupParams;if(!et(a,r))return!1;var s=o.extraInfo[r];if(s||(s=o.extraInfo[r]={cache:nt(a,r)}),$(t)){var c=E(t.get,null,s,this.finalOption);return c?((0,this.runtime().getKernel().setTimeout)((function(){e(c)}),0),!0):(X(this.ctx,this.runtime,this.apiInfo.m||this.apiName,this.appxDomainIsNotEmpty?I(I({},this.finalOption),{__appxDomain:this.appxDomain.scope}):this.finalOption,(function(i){E(t.update,null,s,n.finalOption,i),e(i)}),this.assignedViewId,{caller:this.extraInfo.caller}),!0)}return t.set?(E(t.set,null,s,this.finalOption),!1):void 0},e}(kt)),wt)(e,n,a,s,p,t,{caller:null==l?void 0:l.caller,directly:i,inside:o,viewId:r})}function Lt(t){var e=function(){};return e.prototype=t,jt(new e),t}function Dt(t){return t.__MAGIC_SLOW_PROPERTY=1,delete t.__MAGIC_SLOW_PROPERTY,t}function jt(t){if(t===jt)throw jt;return t}var Bt={SDKVersion:!0,call:!0,callSync:!0,canIUse:!0,emit:!0,off:!0,on:!0,renderTarget:!0};function Ut(t,e){if(!e.length)return!1;for(var n=t,i=0,o=e;i<o.length;i++){var r=o[i];if(!(n=n&&n[r]))return!1}return!0}function Vt(t,e){if(!e.length)return!1;for(var n=t,i=0,o=e;i<o.length;i++){var r=o[i];if(null==(n=n&&n[r]))return!1}return!0}var Ft=function(){function t(t,e,n,i,o){this.collection=new Wt,this.collectedCanIUseKeys=D(),this.hasRegisteredCanIUseReportHandler=!1,this.ctx=n,this.getRuntime=i,this.appxDomain=e,this.unrefRuntime=o,this.callSync4PublicNamed=P(this.callSync4PublicNamed,this),this.callSync4PublicNamedInside=P(this.callSync4PublicNamedInside,this),this.call4PublicNamed=P(this.call4PublicNamed,this),this.call4PublicNamedInside=P(this.call4PublicNamedInside,this),this.call=P(this.call,this),this.callSync=P(this.callSync,this),this.canIUse=P(this.canIUse,this),this.call4LinkedContext=P(this.call4LinkedContext,this),this.call4ProtoContext=P(this.call4ProtoContext,this),this.call4PublicCall=P(this.call4PublicCall,this),this.callSync4PublicCall=P(this.callSync4PublicCall,this),W(e)?this.publicInstance={canIUse:this.canIUse}:this.publicInstance={call:this.call4PublicCall,callSync:this.callSync4PublicCall,canIUse:this.canIUse,emit:t.emit,off:t.off,on:t.on}}return t.prototype.callSync4PublicNamed=function(t,e,n){return rt(this.collection,this.appxDomain,this.ctx,this.getRuntime,1,t,e,n)},t.prototype.callSync4PublicNamedInside=function(t,e,n){return rt(this.collection,this.appxDomain,this.ctx,this.getRuntime,5,t,e,n)},t.prototype.callSync4PublicCall=function(t,e,n){return rt(this.collection,this.appxDomain,this.ctx,this.getRuntime,2,t,e,n)},t.prototype.call4PublicCall=function(t,e,n,i){return at(this.collection,this.appxDomain,this.ctx,this.getRuntime,2,t,e,n,i)},t.prototype.call4PublicNamed=function(t,e,n,i){return at(this.collection,this.appxDomain,this.ctx,this.getRuntime,1,t,e,n,i)},t.prototype.call4PublicNamedInside=function(t,e,n,i){return at(this.collection,this.appxDomain,this.ctx,this.getRuntime,5,t,e,n,i)},t.prototype.removeAPIs=function(t,e){this.collection.removeAPIs(t);for(var n=e?this.publicInstance[e]:this.publicInstance,i=0,o=t;i<o.length;i++){var r=o[i];n&&n[r]&&(n[r]=void 0)}},t.prototype.replaceAPI=function(t,e){this.collection.replaceAPI(t,e)},t.prototype.replacePublicCallProxyAPI=function(t,e){this.collection.replacePublicCallProxyAPI(t,e)},t.prototype.replaceLinkedContextAPI2Proto=function(t,e){this.replaceAPI(t,e),this.publicInstance[t]=P(this.call4ProtoContext,null,t,!1)},t.prototype.getCollection=function(){return this.collection},t.prototype.callSync=function(t,e,n){return rt(this.collection,this.appxDomain,this.ctx,this.getRuntime,0,t,e,n)},t.prototype.canIUse=function(t){return"string"!=typeof t&&(t=String(t)),this.registerCanIUseReportHandler(),this.collectedCanIUseKeys.add(t),function(t,e,n,i,o,r){if(!i.getFlag("disableCanIUseByMetaInBridge")){var a=B(r);if(void 0!==a)return a}var s=String(r).split(".");if(1===s.length&&Bt[s[0]])return!0;var c=0,l=o();if(l){var p=l.getNav().getTopInstance();p&&(c=p.getEngineType())}return!!Ut(t.getCanIUseMap(i,o,c),s)||!!t.evaluateCanIUse(i,o,e,s)||!!(i.getFlag("enableCanIUseFix4PublicInstanceCheck")?Vt:Ut)(n,s)}(this.collection,this.appxDomain,this.publicInstance,this.ctx,this.getRuntime,t)},t.prototype.call=function(t,e,n,i){return at(this.collection,this.appxDomain,this.ctx,this.getRuntime,0,t,e,n,i)},t.prototype.call4LinkedContext=function(t,e){for(var n=[],i=2;i<arguments.length;i++)n[i-2]=arguments[i];return function(t,e,n,i,o,r,a){var s="".concat(o),c=t.getAPIInfoByName(s)||ot;if(!it[s]){ct(c,o);var l=function(t,e,n,i,o,r,a,s,c){return new(At||(At=function(t){function e(e,n,i,o,r,a,s){var c=t.call(this,e,n,i,o,r,a,void 0,s)||this;return c.cache4ApiInfo=Object.create(null),c.callLinkedCollection=P(c.callLinkedCollection,c),c.callAfterCompositeElementReady=P(c.callAfterCompositeElementReady,c),c.callSyncLinkedCollection=P(c.callSyncLinkedCollection,c),c}return g(e,t),e.prototype.invoke=function(){return _(this.apiInfo.create,this,this.option)},e.prototype.callScopedBridge=function(t,e,n,i){var o=this.appxDomain;o&&!F(o)&&(e=I(I({},e),{__appxDomain:o.scope}));var r=this.runtime();if(r){var a=r.getBridge();a&&a.callBridge(t,e,n)}},e.prototype.callLinkedCollection=function(t,e,n){return Nt(this.getApiInfoFromLinkedCollection(t),this.ctx,this.runtime,!1,!1,this.assignedViewId,this.appxDomain,t,e,n).invoke()},e.prototype.callSyncLinkedCollection=function(t,e){return Rt(this.getApiInfoFromLinkedCollection(t),this.ctx,this.runtime,!1,!1,this.assignedViewId,this.appxDomain,t,e).invoke()},e.prototype.callAfterCompositeElementReady=function(t,e){var n=this,i=this.getPageInstance();i&&i.whenCompositeElementReady(e.element,(function(){n.callLinkedCollection(t,e)}))},e.prototype.initDependency=function(e,n,i,o){var r=i.createOptionIndex,a=!1===r?null:e[r];t.prototype.initDependency.call(this,a,n,i,null)},e.prototype.getApiInfoFromLinkedCollection=function(t){if(!this.cache4ApiInfo[t]){var e,n=this.apiInfo.linked;e=n&&n[t]||St,this.cache4ApiInfo[t]=e}return this.cache4ApiInfo[t]},e}(kt)),At)(e,n,r,a,s,t,{caller:void 0,directly:!0,shouldNotRewriteIdOrClass:c,viewId:null})}(c,n,i,0,0,e,s,r,a);return l.invoke()}}(this.collection,this.appxDomain,this.ctx,this.getRuntime,t,n,e)},t.prototype.call4ProtoContext=function(t,e){for(var n=[],i=2;i<arguments.length;i++)n[i-2]=arguments[i];var o=this.collection.getAPIInfoByName(t),r=ct(o,t);return st(o,t,this.appxDomain,this.ctx,this.getRuntime,n,e,{caller:r})},t.prototype.destroy=function(){this.publicInstance=null,this.collection=null,this.unrefRuntime&&this.unrefRuntime()},t.prototype.registerCanIUseReportHandler=function(){var t=this;if(!this.hasRegisteredCanIUseReportHandler){var e=this.getRuntime();this.ctx.getFlag("enableCanIUseReport")&&e.getEventManager().addEventListener("pause",(function(){var n,i,o,r=[];t.collectedCanIUseKeys.forEach((function(t){r.push(t)})),r.length>0&&t.call("remoteLog",{actionId:"event",bizType:"TAC",param4:(n={key:r.join("|"),appxDomain:H(t.appxDomain)||W(t.appxDomain)?t.appxDomain.origin:e.getEnv().startupParams.appId},i=!0,n?"string"==typeof n?n:(o=n,o&&"object"==typeof o?Object.keys(o):[]).filter((function(t){return void 0!==n[t]||!i})).map((function(t){var e="".concat(t,"=");return e+=function(t){return null!==t&&"object"==typeof t?"function"==typeof t.toString?String(t):"":String(t)}(n[t]).replace(/,/g,";").replace(/\^/g,"@").replace(/\=/g,"~"),e})).join("^"):""),seedId:"miniapi.canIUse",type:"behavior"}),t.collectedCanIUseKeys.clear()})),this.hasRegisteredCanIUseReportHandler=!0}},t}();var Ht=function(){function t(t,e,n){var i=this;this.extraInfo={},this.scope4Domain=Object.create(null),this.scopeList4Plugin=[],this.dynamicAPIs={},this.ctx=t,this.getRuntime=e,this.unrefRuntime=n,this.callBridge=function(t,e,n,o,r){return i.callBridgeImpl(t,e,n,o,r)},this.callBridgeSync=function(t,e,n,o){return i.callBridgeSyncImpl(t,e,n,o)},this.on=P(this.on,this),this.off=P(this.off,this),this.emit=P(this.emit,this),this.defaultScope=new Ft(this,V,this.ctx,this.getRuntime)}return Object.defineProperty(t.prototype,"event",{get:function(){return this.getEventManager()},enumerable:!1,configurable:!0}),t.prototype.off=function(t,e){return this.getEventManager().removeEventListener(t,1,e)},t.prototype.on=function(t,e,n){var i=this.extraInfo;if(!i.reportMyOnComposite){var o=!0;try{var r=this.getRuntime().getBehaviorManager().get("reportMyOnComposite");r.report&&(t.startsWith("nbcomponent.")?r.report("myoncomposite"):o=!1)}catch(t){}o&&(i.reportMyOnComposite=!0)}return this.getEventManager().addEventListener(t,1,e,n)},t.prototype.emit=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return this.getEventManager().invokeTypedEvent(t,1,e)},t.prototype.callBridgeImpl=function(t,e,n,i,o){return X(this.ctx,this.getRuntime,t,e,n,void 0,o)},t.prototype.callBridgeSyncImpl=function(t,e,n,i){return tt(this.ctx,this.getRuntime,t,e,n,i)},t.prototype.dispose=function(){this.unrefRuntime&&this.unrefRuntime()},t.prototype.callInternalAPI=function(t,e,n,i,o){return function(t,e,n,i,o,r,a){if(e().getEnv()){var s=G().config;s&&!0===s.noUseInternalAPI?X(t,e,n,i,o,r,a):X(t,e,"internalAPI",{method:n,param:i,viewId:i&&i.viewId},o,r,a)}}(this.ctx,this.getRuntime,t,e,n,i,o)},t.prototype.callInternalAPISync=function(t,e,n,i){return function(t,e,n,i,o,r){if(e().getEnv()){var a=G().config;return a&&!0===a.noUseInternalAPI?tt(t,e,n,i,o,r):tt(t,e,"internalAPI",{method:n,param:i,viewId:i&&i.viewId},void 0,r)}}(this.ctx,this.getRuntime,t,e,n,i)},t.prototype.getPluginScopes=function(){return this.scopeList4Plugin},t.prototype.createScope=function(t){if(F(t))return this.defaultScope;var e=this.scope4Domain,n=H(t),i=n||W(t)?t.origin:t.scope;if(!e[i]){var o=e[i]=new Ft(this,t,this.ctx,this.getRuntime);n&&this.scopeList4Plugin.push(o)}return e[i]},t.prototype.getScope=function(t){return F(t)?this.defaultScope:this.scope4Domain[H(t)||W(t)?t.origin:t.scope]},t.prototype.getScopeByProviderInfo=function(t){if(function(t){return t&&1===t.providerType}(t)||function(t){return t&&2===t.providerType}(t))return this.scope4Domain[t.providerId];var e=this.getRuntime();return e?e.getKernel().isUsingExtensionMode?this.scope4Domain.app:this.defaultScope:void 0},t.prototype.setDynamicDistributedAPIs=function(t){this.dynamicAPIs=I(I({},this.dynamicAPIs),t)},t.prototype.getDynamicDistributedAPIs=function(){return this.dynamicAPIs},t.prototype.getEventManager=function(){var t;return this.eventInstance||(this.eventInstance=(t=this.getRuntime,new(function(){function e(){var t=this;this.eventMap=Object.create(null),this.eventInvokeMap=Object.create(null),this.taskManager=new z((function(e,n,i){t.addEventListener(e,i?0:1,n)}))}return e.prototype.hasEventListener=function(t,e){var n=this.getCustomTypeContext(t);return e?!(!n[e]||!n[e].length):!!(n[0].length||n[1].length||n[2].length)},e.prototype.addEventListener=function(t,e,n,i){var o=this;if(void 0===i&&(i=n),this.hasCustomEventMatched(t,e,i)||this.eventMap[t][e].push({cache:i,invoke:n}),this.registerListener(t),1===e)return{remove:function(){o.removeEventListener(t,e,i)}}},e.prototype.removeEventListener=function(t,e,n){e?(this.removeEventListener4Type(t,e,n),this.hasEventListener(t)||this.unregisterListener(t)):(this.eventMap[t]=null,this.unregisterListener(t))},e.prototype.removeEventListener4Type=function(t,e,n){var i=this.getCustomTypeContext(t);n||(i[e]=[]),i[e].length&&(i[e]=i[e].filter((function(t){return t.cache!==n})))},e.prototype.invokeTypedEvent=function(t,e,n){if(this.hasEventListener(t)){var i=this.getCustomTypeContext(t)[e];if(i&&i.length)for(var o=0,r=i;o<r.length;o++)r[o].invoke.apply(null,n)}},e.prototype.getCustomTypeContext=function(t){return this.eventMap[t]||(this.eventMap[t]=[[],[],[]]),this.eventMap[t]},e.prototype.hasCustomEventMatched=function(t,e,n){return this.getCustomTypeContext(t)[e].some((function(t){return t.cache===n}))},e.prototype.registerListener=function(e){if(!this.eventInvokeMap[e]){var n=this.eventInvokeMap[e]=P(this.invokeEventImpl,this,e);t().getKernel().__EVENT_ADD_LISTENER__(e,n)}},e.prototype.unregisterListener=function(e){var n=this.eventInvokeMap[e];n&&(t().getKernel().__EVENT_REMOVE_LISTENER__(e,n),this.eventInvokeMap[e]=null)},e.prototype.invokeEventImpl=function(t,e){if(this.hasEventListener(t)){for(var n=this.getCustomTypeContext(t),i=0,o=n[0];i<o.length;i++)E(o[i].invoke,null,e);var r=n[1].length,a=n[2].length;(r||a)&&function(t,e){var n;if(!(!t||!t.data)){var i=t.data,o=(delete(n=I({},i)).appInstanceId,delete n.instanceId,delete n.pageName,n);t.data=o,e(t),t.data=i}else e(t)}(e,(function(t){for(var e=0,i=n[1];e<i.length;e++)E(i[e].invoke,null,t);for(var o=0,r=n[2];o<r.length;o++)E(r[o].invoke,null,t.data)}))}},e}()))),this.eventInstance},t}(),Wt=function(){function t(){this.apiMap=Object.create(null),this.publicProxyMap=Object.create(null)}return t.prototype.setCanIUses=function(t){this.typedCanIUseMapInfo=t},t.prototype.removeAPIs=function(t){for(var e=this.apiMap,n=0,i=t;n<i.length;n++)e[i[n]]=void 0},t.prototype.setAPIs=function(t){var e=this.apiMap;Dt(e);for(var n=0,i=t;n<i.length;n++){for(var o=i[n],r=o.values,a=0,s=o.keys;a<s.length;a++)e[p=s[a]]=r[p];if(o.namespace)for(var c=0,l=o.keys;c<l.length;c++){var p;e[p=l[c]].avaliableNamespace=o.namespace}}return Lt(e),e},t.prototype.replaceAPI=function(t,e){var n=this.apiMap;n[t]&&e&&(n[t]=e)},t.prototype.setPublicCallProxyAPIs=function(t){var e=this.publicProxyMap;Dt(e);for(var n=0,i=t;n<i.length;n++)for(var o=i[n],r=o.values,a=0,s=o.keys;a<s.length;a++){var c=s[a];e[c]=r[c]}return Lt(e),this.publicProxyMap=e,e},t.prototype.getPublicCallProxyAPIInfoByName=function(t){return this.publicProxyMap[t]},t.prototype.hasPublicCallProxyAPI=function(t){return!!this.publicProxyMap[t]},t.prototype.replacePublicCallProxyAPI=function(t,e){var n=this.publicProxyMap;n[t]&&e&&(n[t]=e)},t.prototype.has=function(t){return!!this.apiMap[t]},t.prototype.evaluateCanIUse=function(t,e,n,i){if(e()){var o=!n||F(n)?"empty":"".concat(n.type,"_").concat(n.scope);this.typedCanIUseMap||(this.typedCanIUseMap=Gt(this.typedCanIUseMapInfo,t,e));var r=this.typedCanIUseMap.evaluate,a=r[o];r[o]||(a=r[o]={});var s=this.typedCanIUseMapInfo.evaluate;if(s)for(var c=0,l=s;c<l.length;c++){var p=(0,l[c])(t,e,n,i,a);if(void 0!==p)return p}}return 0},t.prototype.getCanIUseMap=function(t,e,n){if(e()){if(this.typedCanIUseMap||(this.typedCanIUseMap=Gt(this.typedCanIUseMapInfo,t,e)),1!==n&&2!==n){if(!this.typedCanIUseMap)return{};n=this.typedCanIUseMap.defaultType}return this.typedCanIUseMap?this.typedCanIUseMap[n]:{}}return{}},t.prototype.getAPIMap=function(){return this.apiMap},t.prototype.getAPIInfoByName=function(t){return this.apiMap[t]},t}();function Gt(t,e,n){for(var i,o=((i={defaultType:t.defaultType,evaluate:{}})[1]=Object.create(null),i[2]=Object.create(null),i),r=0,a=[1,2];r<a.length;r++){var s=a[r],c=t[s];if(c){for(var l=o[s],p=0,u=c(e,n);p<u.length;p++)l=Yt(l,u[p]);o[s]=l}}return o}function Yt(t,e){if(!t)return e;if(!e)return t;var n=1===t?{}:I({},t);if("object"==typeof e)for(var i=0,o=Object.keys(e);i<o.length;i++){var r=o[i];n[r]=Yt(n[r],e[r])}return n}var Kt=function(){function t(t){this.callbackMap=Object.create(null),this.implMap=Object.create(null),this.appInstanceId=t}return t.prototype.dispose=function(){var t=this;Object.keys(this.implMap).forEach((function(e){t.removeEventListeners(e)})),this.implMap=null,this.callbackMap=null},t.prototype.addEventListener=function(t,e){if("function"!=typeof e)throw new Error("callback is not function");if(!this.implMap[t]){var n=this.invokeEvent.bind(this,t);this.addEventImpl(t,n),this.implMap[t]=n}this.callbackMap[t]=this.callbackMap[t]||[];var i=this.callbackMap[t];i.indexOf(e)<0&&i.push(e)},t.prototype.removeEventListener=function(t,e){if("function"!=typeof e)throw new Error("callback is not function");this.callbackMap[t]=this.callbackMap[t]||[],this.callbackMap[t]=this.callbackMap[t].filter((function(t){return t!==e})),0===this.callbackMap[t].length&&(this.removeEventImpl(t,this.implMap[t]),delete this.implMap[t])},t.prototype.removeEventListeners=function(t){this.callbackMap[t]=[],this.removeEventImpl(t,this.implMap[t]),delete this.implMap[t]},t.prototype.invokeEvent=function(t,e){for(var n=0,i=this.callbackMap[t]||[];n<i.length;n++)(0,i[n])(e)},t.prototype.addEventImpl=function(t,e){document.addEventListener(t,e)},t.prototype.removeEventImpl=function(t,e){document.removeEventListener(t,e)},t}(),Jt=function(){function t(){this.flag=0}return t.prototype.invokeInternalEvent=function(t,e){},t.prototype.addEventListener=function(t,e,n){var i=this;if(n)return{remove:function(){i.removeEventListener(t,e)}}},t.prototype.removeEventListener=function(t,e){},t}(),zt=function(){function t(){}return t.prototype.isFirstPage=function(){return!0},t.prototype.getTopViewId=function(){},t.prototype.getTopInstance=function(){},t}(),qt=function(){},Zt=function(){function t(t,e){this.id="1",this.type=0,this._kernel=t,this._eventManager=e,this._nav=new zt,this._page={getInstanceById:function(){}},this._switch={get:qt}}return t.prototype.getLogger=function(){},t.prototype.getMeta=function(){return{getAppBehavior:qt,getTabBar:qt,isTabPage:qt,removeTabBarItem:qt,getAppExt:qt}},t.prototype.getBehaviorManager=function(){return{report:qt}},t.prototype.getApp=function(){return{appInstanceId:this.getKernel().appInstanceId}},t.prototype.getSubPackageManager=function(){},t.prototype.getTypedEventManager=function(){return this._typedEventManager||(this._typedEventManager=new Jt),this._typedEventManager},t.prototype.getRegistry=function(){},t.prototype.setRegistry=function(){},t.prototype.getMiniExtensionManager=function(){},t.prototype.getSwitchManager=function(){return this._switch},t.prototype.getPageManager=function(){return this._page},t.prototype.getNav=function(){return this._nav},t.prototype.getEnv=function(){return this._env},t.prototype.setEnv=function(t){this._env=t},t.prototype.setBridge=function(t){this._bridge=t},t.prototype.getBridge=function(){return this._bridge},t.prototype.getKernel=function(){return this._kernel},t.prototype.getEventManager=function(){return this._eventManager},t}(),Qt=function(){};function $t(t,e,n,i,o){var r="smallfish",a=new Kt(r),s={appInstanceId:r,userAgent:"",isDisableAppContext:!1,isUsingExtensionMode:!1,__BRIDGE_CALL__:function(t,e,n,i){"undefined"!=typeof AlipayJSBridge?AlipayJSBridge.call(e,n,i):document.addEventListener("AlipayJSBridgeReady",(function(){AlipayJSBridge.call(e,n,i)}))},__BRIDGE_CALL_SYNC__:function(t,e,n){return{error:10,errorMessage:"callSync is not avaliable in H5WebView"}},__EVENT_ADD_LISTENER__:a.addEventListener.bind(a),__EVENT_REMOVE_LISTENER__:a.removeEventListener.bind(a),__FATAL_ERROR__:Qt,__GET_PLATFORM_ELEMENTS__:function(){return[]},__GET_STARTUP_PARAMS__:function(){return"undefined"!=typeof AlipayJSBridge?AlipayJSBridge.startupParams:{}},__EVAL__:Qt,__IMPORT_SCRIPT__:Qt,__PERFORMANCE__:Qt,__REPORT_ERROR__:Qt,__SET_PAGE_CONTEXT_GETTER__:Qt,__SET_CURRENT_PAGE_ID_GETTER__:Qt,__SET_RUNTIME_ERROR_REPORTER__:Qt,Promise:t,setTimeout:"undefined"==typeof window?e:e.bind(window),clearTimeout:"undefined"==typeof window?n:n.bind(window),setInterval:"undefined"==typeof window?i:i.bind(window),clearInterval:"undefined"==typeof window?o:o.bind(window),getFrameworkContextSymbol:Qt,reportHostError:Qt},c=new Zt(s,a);return c.setEnv(function(t){var e,n="undefined"!=typeof navigator?navigator.userAgent:"",i=function(t){if(Y)return Y;var e=t.match(/Griver\/(\d+\.\d+\.\d+)/),n=t.match(/AliApp\((\S*)/),i=t.match(/AriverApp\((\S*)/),o=t.match(/GriverApp\((\S*)/),r=!!n&&2===n.length&&n[1].split("/")||!!i&&2===i.length&&i[1].split("/")||!!o&&2===o.length&&o[1].split("/"),a="unknown",s="0.0.0",c=0,l="",p=function(t){if(!K){var e=t.match(/UCBS\/((\d+)\.(\d+))/);if(e){var n=e[1]||"",i=parseInt(e[2],10),o=parseInt(e[3],10);K=[n,i,o]}else K=["",0,0]}return K}(t),u=!(!p||!p[0]),f=t.indexOf("AlipayIDE")>-1,h=t.match(/Language\/(\S+)/),d=t.indexOf("Android")>-1,v=!d&&!!t.match(/iPhone|iPad/i),y=v?"ios":d?"android":"unknown",g=function(t,e){if(!J){if(e){var n=t.match(/OS (\d+)_(\d+)(?:_(\d+))?/);if(n){var i=parseInt(n[1],10),o=parseInt(n[2],10),r=parseInt(n[3]||"0",10);J=[i,o,r]}}J=J||[0,0,0]}return J}(t,v);if(r?(a=r[0],s=r[1].match(/(\d+\.\d+\.\d+)/)[0],l=r[1].match(/([\w.]+)/)[0]):e&&(a="Griver",l=s=e[0]),"string"==typeof s){var I=function(t){for(var e=[],n=0,i=t.split(".");n<i.length;n++){var o=i[n];e.push(parseInt(o,10))}return e}(s);c=(I[0]?1e6*I[0]:0)+(I[1]?1e3*I[1]:0)+(I[2]?1*I[2]:0)}return Y={alipayVersionSequence:c,clientName:a.toLowerCase(),clientVersion:s,clientVersionSequence:c,iosMajorVersion:g[0],iosMinorVersion:g[1],iosPatchVersion:g[2],isAndroid:d,isIDE:f,isIOS:v,isUCWebView:u,language:h?h[1]:"",originalClientName:a,originalClientVersion:l,platform:y,ucMajorVersion:p[1],ucMinorVersion:p[2],ucVersion:p[0]}}(n),o=i.alipayVersionSequence,r=i.clientName,a=i.clientVersion,s=i.clientVersionSequence,c=i.isAndroid,l=i.isIDE,p=i.isIOS,u=i.isUCWebView,f=i.language,h=i.originalClientName,d=i.platform,v=i.ucMajorVersion,y=i.ucMinorVersion,g=i.ucVersion;return{alipayVersionSequence:o,appxVersion:"2.0.0",clientName:r,clientVersion:a,clientVersionSequence:s,isAndroid:c,isIDE:l,isIOS:p,isUCWebView:u,language:f,iosMajorVersion:i.iosMajorVersion,iosMinorVersion:i.iosMinorVersion,iosPatchVersion:i.iosPatchVersion,isPortalWorkerScene:void 0,get originalStartupParams(){return e||(e=t.__GET_STARTUP_PARAMS__()),e},originalClientName:h,packageAndRunSceneType:17,platform:d,startupParams:{get appId(){return e||(e=t.__GET_STARTUP_PARAMS__()),e&&e.appId||""}},ucMajorVersion:v,ucMinorVersion:y,ucVersion:g,userAgent:n}}(s)),c}var Xt=function(){function t(){var t,e=this;this.flags=((t={}).idempotentAPIWhiteList=["getStartupParams","getUserInfo","getRunScene","getSystemInfo","getClientInfo"],t.idempotentAPIBlackList=void 0,t.forbidAPIList=void 0,t.filterAppxDomainForSecurity=void 0,t.invokeBridgeWithCaller=void 0,t.disablePublicCallErrorCodeNormalize=void 0,t.ignoreCallbackWhenInvokeMyCall=void 0,t.enableBridgeResponseProxy=1,t.disableCanIUseByMetaInBridge=void 0,t.authCodeMapping4Aplus=void 0,t.uep=void 0,t.fixTempFilePath=void 0,t.selectorQueryContextClearActions=void 0,t.validSignContractURL=void 0,t.enableOpenEmbeddedMiniProgramScopedBridgeCall=void 0,t.openEmbeddedMiniProgramDefaultBridgeCallExtensionsWhiteList=void 0,t.disableGetWidthFromUA=void 0,t.enableGetterFromState4Audio=void 0,t.compositeElement=void 0,t.cameraContextPermissionCheck=void 0,t.navigateToMiniProgramQuery=1,t.enableExtConfigFromStartupParms=void 0,t.enableNavigateToMiniProgramScopedBridgeCall=void 0,t.disableLoadFontFaceLoadCanvasFont=void 0,t.disableSubscribeMsgJSAPI=void 0,t.fixNavigateBackMiniProgram=void 0,t.iosVersion4GetSystemInfoProxy=void 0,t.disableSystemInfoTaskCache282=void 0,t.enableAppXStorageCache=void 0,t),this.getFlags=function(){return e.flags}}return t.prototype.getFlag=function(t){return this.flags[t]},t.prototype.getCurrentCallStep=function(){},t}();function te(t,e,n,i){var o;X=ee,tt=ne;var r=function(t,e,n){var i=function(t,e,n){return new Ht(t,e,n)}(t,e,n);return i}(new Xt,(function(){return i})),a=r.defaultScope;return function(t,e,n,i){var o=i.getCollection();o.setCanIUses(n),o.setPublicCallProxyAPIs(e),function(t,e){var n=e.getCollection();n.setAPIs(t);var i=n.getAPIMap(),o=e.callSync4PublicNamed,r=e.callSync4PublicNamedInside,a=e.call4PublicNamed,s=e.call4PublicNamedInside,c=e.call4LinkedContext,l=e.call4ProtoContext,p=e.publicInstance;Dt(p);for(var u=0,f=t;u<f.length;u++){var h=f[u],d=h.namespace,v=p;if(d&&(v[d]||(v[d]={}),Dt(v=v[d])),h.linked)for(var y=0,g=h.keys;y<g.length;y++)i[k=g[y]]&&(v[k]=P(c,null,k,!1));else if(h.proto)for(var I=0,m=h.keys;I<m.length;I++)i[k=m[I]]&&(v[k]=P(l,null,k,!1));else for(var b=h.sync?h.inside?r:o:h.inside?s:a,E=0,_=h.keys;E<_.length;E++){var k;if(i[k=_[E]]){var C=i[k].feature;if("function"==typeof C&&!C())continue;v[k]=P(b,null,k)}}d&&Lt(v)}Lt(p)}(t,i),i.publicInstance}(t,e,((o={defaultType:1,evaluate:[]})[1]=function(){return n},o[2]=function(){return[]},o),a),i.setBridge(r),r}function ee(t,e,n,i,o,r){e().getKernel().__BRIDGE_CALL__(r,n,i,o)}function ne(t,e,n,i,o){return e().getKernel().__BRIDGE_CALL_SYNC__(o,n,i)}Object.prototype.hasOwnProperty;Object.assign;var ie=function(){return ie=Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},ie.apply(this,arguments)};"function"==typeof SuppressedError&&SuppressedError;var oe=Function.prototype.apply.call.bind(Function.prototype.apply);Function.prototype.bind;var re,ae,se,ce=JSON.stringify;JSON.parse,encodeURIComponent,re||function(){var t="undefined"!=typeof WeakMap;re=t?WeakMap:function(){var t=Object.prototype.hasOwnProperty,e=function(t,e,n){Object.defineProperty?Object.defineProperty(t,e,{configurable:!0,value:n,writable:!0}):t[e]=n};function n(t){return Object(t)===t}function i(){if(void 0===this)throw new TypeError("Constructor WeakMap requires 'new'");if(e(this,"_id","_WeakMap_"+r()+"."+r()),arguments.length>0)throw new TypeError("WeakMap iterable is not supported")}function o(e,i){if(!n(e)||!t.call(e,"_id"))throw new TypeError(i+" method called on incompatible receiver "+typeof e)}function r(){return Math.random().toString().substring(2)}return e(i.prototype,"delete",(function(t){if(o(this,"delete"),!n(t))return!1;var e=t[this._id];return!(!e||e[0]!==t||(delete t[this._id],0))})),e(i.prototype,"get",(function(t){if(o(this,"get"),n(t)){var e=t[this._id];return e&&e[0]===t?e[1]:void 0}})),e(i.prototype,"has",(function(t){if(o(this,"has"),!n(t))return!1;var e=t[this._id];return!(!e||e[0]!==t)})),e(i.prototype,"set",(function(t,i){if(o(this,"set"),!n(t))throw new TypeError("Invalid value used as weak map key");var r=t[this._id];return r&&r[0]===t?(r[1]=i,this):(e(t,this._id,[t,i]),this)})),e(i,"_polyfill",!0),i}()}(),new re,"undefined"!=typeof SECURITY_FUNCTION_CALL&&(SECURITY_FUNCTION_CALL=function(t,e){for(var n=[],i=2;i<arguments.length;i++)n[i-2]=arguments[i];return"function"==typeof t?(oe||(oe=Function.prototype.apply.call.bind(Function.prototype.apply)),oe(t,e,n)):t.call.apply(t,function(t,e,n){if(n||2===arguments.length)for(var i,o=0,r=e.length;o<r;o++)!i&&o in e||(i||(i=Array.prototype.slice.call(e,0,o)),i[o]=e[o]);return t.concat(i||Array.prototype.slice.call(e))}([e],n,!1))}),"undefined"!=typeof SECURITY_FUNCTION_APPLY&&(SECURITY_FUNCTION_APPLY=function(t,e,n){return"function"==typeof t?(oe||(oe=Function.prototype.apply.call.bind(Function.prototype.apply)),oe(t,e,n)):t.apply(e,n)}),function(t){t[t.Info=0]="Info",t[t.Warn=1]="Warn",t[t.Error=2]="Error"}(ae||(ae={})),function(t){t.AppxLifecycle="AppxLifecycle"}(se||(se={})),"undefined"!=typeof HAS_INSIDE_FEATURE&&HAS_INSIDE_FEATURE,"undefined"!=typeof ZEPHYR_HAS_INSIDE_FEATURE&&ZEPHYR_HAS_INSIDE_FEATURE,"undefined"!=typeof ZEPHYR_IS_INSIDE_UNSUPPORT_ELEMENT&&ZEPHYR_IS_INSIDE_UNSUPPORT_ELEMENT;var le,pe,ue,fe,he,de="undefined"!=typeof nativeLog&&"undefined"!=typeof mqEnvironment;function ve(t){return t&&"object"==typeof t?Object.keys(t):[]}function ye(t,e){var n,i;return"%s"===t?e="object"==typeof(i=e)?ce(i):i+"":"%c"===t?e=function(t){var e=""+t;0===e.indexOf("#")&&(e=e.substr(1)),3===e.length&&(e=e.replace(/(.)/g,"$1$1"));var n,i=parseInt(e,16);return isNaN(i)&&(n="".concat(t," is invalid hex color."),de?nativeLog(n,Date.now()):console.error(n,Date.now())),i}(e):"%b"===t?("string"==typeof(n=e)&&(n=n.replace(/^data:(\/|\w|\-|\.)+;base64,/i,"")),e=n):"%d"===t?e=parseInt(e,10):"%f"===t&&(e=parseFloat(e)),e}function ge(t,e,n){var i;return n=n||{},ve(e).forEach((function(o){var r,a,s,c=e[o];a=((r=c)||"").match(/(\w+)(%\w)$/i),s={k:r},a&&(s.k=a[1],s.t=a[2]),void 0!==(c=(i=s).k)&&(o in t||o in n)&&void 0===t[c]&&(t[c]=ye(i.t,void 0===n[o]?t[o]:n[o]),c!==o&&delete t[o])})),t}function Ie(){if(!fe){var t=$t(Promise,setTimeout,clearTimeout,setInterval,clearInterval);fe=te([],[],[],t)}return fe}function me(t,e){var n=function(t){if("undefined"==typeof navigator||!navigator||void 0===navigator.userAgent)return function(){throw new Error("API ".concat(t," should not initialized by smallfish. Please check your environment"))}}(t);if(n)return n;var i=(he||(he=Ie().defaultScope.publicInstance),he);if(!i[t]){var o=Ie().defaultScope;o.getCollection().apiMap[t]=e;var r=o.call4PublicNamed;i[t]=r.bind(null,t)}return i[t]}le||(le={}),pe||(pe={}),ue||(ue={});var be=["content"];function Ee(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}const _e={exitApp:function(t){return n("exitApp",t,{type:"async"})},getSystemInfo:function(t){return n("getSystemInfo",t,{type:"async"})},hideLoading:function(t){return n("hideLoading",t,{type:"async"})},hideToast:function(t){return n("hideToast",t,{type:"async"})},makePhoneCall:function(t){return n("makePhoneCall",t,{type:"async"})},prompt:function(t){return n("prompt",t,{type:"async"})},setClipboard:function(t){return n("setClipboard",t,{type:"async"})},showLoading:function(t){return n("showLoading",t,{type:"async"})},vibrate:function(t){return n("vibrate",t,{type:"async"})},alert:function(t){var e=t||{};n("alert",function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?a(Object(n),!0).forEach((function(e){i(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):a(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}({message:e.content,button:e.buttonText},o(e,r)))},confirm:function(t){var e=t||{};n("confirm",function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?c(Object(n),!0).forEach((function(e){i(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):c(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}({okButton:e.confirmButtonText,cancelButton:e.cancelButtonText,message:e.content},o(e,s)))},getLocation:function(t){var e=t||{},r=e.type,a=o(e,l);n("getCurrentLocation",function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?p(Object(n),!0).forEach((function(e){i(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):p(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}({bizType:(null==t?void 0:t.bizType)||"alipayIntl",requestType:r},a))},getNetworkType:function(t){var e=t.success;n("getNetworkType",h(h({},o(t,u)),{},{success:function(t){e&&e(h(h({},t),{},{networkType:t.networkInfo.toLocaleUpperCase()}))}}))},navigateBack:function(t){n("popWindow",{options:t})},navigateTo:function(t){n("pushWindow",t)},setNavigationBar:me("setNavigationBar",{v:function(t){if(void 0!==t.frontColor){var e=ye("%c",t.frontColor);if(16777215!==e&&0!==e)return{error:2,errorMessage:"frontColor 参数 ".concat(t.frontColor," 颜色值不合法")}}},b:function(t){t.reset&&(t.backgroundColor="#ffffff"),delete t.reset;var e,n="setTitle",i="setTitleColor",o="setBarBottomLineColor",r=this.optionPageViewId;return(e=r?{setTitle:{viewId:r},setTitleColor:{viewId:r},setBarBottomLineColor:{viewId:r}}:{setTitle:{},setTitleColor:{},setBarBottomLineColor:{}})[n]=ge(e[n],{title:"title%s",image:"image%b"},t),e[i]=ge(e[i],{backgroundColor:"color%c",frontColor:"frontColor%c"},t),e[o]=ge(e[o],{borderBottomColor:"color%c"},t),e},d:function(t,e){var n="setTitle",i="setTitleColor",o="setBarBottomLineColor",r={};0!==ve(t[n]).length&&this.callDefaultBridge(n,t[n],void 0,this.optionPageViewId),0!==ve(t[o]).length&&(isNaN(t[o].color)?(r.error=2,r.errorMessage="borderBottomColor 颜色值不合法"):this.callDefaultBridge(o,t[o],void 0,this.optionPageViewId)),0!==ve(t[i]).length?isNaN(t[i].color)?(r.error=2,r.errorMessage="frontColor 需和 backgroundColor 同时设置",e(r)):this.callDefaultBridge(i,t[i],(function(t){r=ie(ie({},t),r),e(r)}),this.optionPageViewId):e(r)}}),showToast:function(t){var e=t||{};n("toast",function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Ee(Object(n),!0).forEach((function(e){i(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Ee(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}({content:e.content||""},o(e,be)))}};return e.default})()));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "hylid-bridge",
|
|
3
|
-
"version": "4.0.28-alpha.
|
|
3
|
+
"version": "4.0.28-alpha.1",
|
|
4
4
|
"main": "lib/index.js",
|
|
5
5
|
"description": "Unite Api For MiniProgram Project",
|
|
6
6
|
"files": [
|
|
@@ -56,12 +56,12 @@
|
|
|
56
56
|
"dependencies": {
|
|
57
57
|
"@babel/runtime": "7.18.9",
|
|
58
58
|
"@goldfishjs/utils": "^2.18.0",
|
|
59
|
-
"@hylid/call": "^4.0.28-alpha.
|
|
60
|
-
"@hylid/custom-jsapi": "^4.0.28-alpha.
|
|
61
|
-
"@hylid/env": "^4.0.28-alpha.
|
|
62
|
-
"@hylid/types": "^4.0.28-alpha.
|
|
59
|
+
"@hylid/call": "^4.0.28-alpha.1",
|
|
60
|
+
"@hylid/custom-jsapi": "^4.0.28-alpha.1",
|
|
61
|
+
"@hylid/env": "^4.0.28-alpha.1",
|
|
62
|
+
"@hylid/types": "^4.0.28-alpha.1",
|
|
63
63
|
"@types/miniprogram": "^1.0.3",
|
|
64
|
-
"miniapp-web-jsapi": "^4.0.28-alpha.
|
|
64
|
+
"miniapp-web-jsapi": "^4.0.28-alpha.1",
|
|
65
65
|
"qs-es5": "^6.8.4",
|
|
66
66
|
"url-parse": "^1.5.10"
|
|
67
67
|
},
|