var ww=function(e){"use strict";var n,t="undefined"!=typeof window?window:void 0,r="undefined"!=typeof document?document:void 0,i="undefined"!=typeof navigator?navigator:void 0,o="undefined"!=typeof location?location:void 0;function a(){return(null==o?void 0:o.href)||""}function u(){return(null==r?void 0:r.title)||""}var c,s,l,d=(null==i?void 0:i.userAgent)||"",p=(null==i?void 0:i.platform)||"",f=null==(n=null==d?void 0:d.match(/wxwork\/([\d.]+)/i))?void 0:n[1],h=!!f,g=!h&&/micromessenger/i.test(d),v=/\bAndroid\b/i.test(d),y=/Win/i.test(p),m=function(){var e,n=null!=(e=null==i?void 0:i.maxTouchPoints)?e:1,t=/Mac/i.test(p);if(t&&n>2)return{isMac:!1,isIOS:!0};return{isMac:t,isIOS:/\b(iPhone|iPad|iPod)\b/i.test(d)}}(),w=m.isIOS,C=m.isMac;function S(){return c}function b(){var e;return null==(e=null==s?void 0:s.getResult())?void 0:e.params}function T(){var e;return null==(e=null==l?void 0:l.getResult())?void 0:e.params}function I(){var e=S();if(h&&(null==e?void 0:e.getAgentConfigSignature)){var n=T();return null==n?void 0:n.corpid}var t=b();return null==t?void 0:t.appId}function A(){var e=function(){var e=S();return h&&(null==e?void 0:e.getAgentConfigSignature)?T():b()}();if(e){var n=I();return{appId:n,verifyAppId:n,verifySignType:"sha1",verifyTimestamp:e.timestamp,verifyNonceStr:e.nonceStr,verifySignature:e.signature}}}function W(e,n,t,r,i,o,a){try{var u=e[o](a),c=u.value}catch(s){return void t(s)}u.done?n(c):Promise.resolve(c).then(r,i)}function k(e){return function(){var n=this,t=arguments;return new Promise((function(r,i){var o=e.apply(n,t);function a(e){W(o,r,i,a,u,"next",e)}function u(e){W(o,r,i,a,u,"throw",e)}a(void 0)}))}}function P(e,n){var t,r,i,o,a=function(e){return function(n){return u([e,n])}},u=function(a){if(t)throw new TypeError("Generator is already executing.");for(;o&&(o=0,a[0]&&(c=0)),c;)try{if(t=1,r&&(i=2&a[0]?r.return:a[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;switch(r=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return c.label++,{value:a[1],done:!1};case 5:c.label++,r=a[1],a=[0];continue;case 7:a=c.ops.pop(),c.trys.pop();continue;default:if(!(i=c.trys,(i=i.length>0&&i[i.length-1])||6!==a[0]&&2!==a[0])){c=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]e.length)&&(n=e.length);for(var t=0,r=new Array(n);t=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}for(var x,D={config:"preVerifyJsApi",onMenuShareTimeline:"menu:share:timeline",onMenuShareAppMessage:"menu:share:appmessage",onMenuShareWechat:"menu:share:wechat",onMenuShareQQ:"menu:share:qq",onMenuShareWeibo:"menu:share:weiboApp",onMenuShareQZone:"menu:share:QZone",previewImage:"imagePreview",getLocation:"geoLocation",openProductSpecificView:"openProductViewWithPid",addCard:"batchAddCard",openCard:"batchViewCard",chooseWXPay:"getBrandWCPayRequest",openEnterpriseRedPacket:"getRecevieBizHongBaoRequest",startSearchBeacons:"startMonitoringBeacons",stopSearchBeacons:"stopMonitoringBeacons",onSearchBeacons:"onBeaconsInRange",consumeAndShareCard:"consumedShareCard",openAddress:"editAddress",getBrandWCPayRequest:"getBrandWCPayRequest"},E={},O=M(Object.keys(D));!(x=O()).done;){var R=x.value;E[D[R]]=R}function V(e){return D[e]||e}function N(e){return E[e]||e}function j(e){return e.map(V)}function U(e){return function(e){if(Array.isArray(e))return _(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||B(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var q=a();function J(e){if("undefined"!=typeof Buffer)return Buffer.from(e).toString("base64");for(var n="",t=new Uint8Array(e),r=t.byteLength,i=0;iu)return 1;if(a=0&&un.splice(e,1)});return e.addEventListener("load",(function(){l||i({type:"ww-iframe-handle:init"})})),{el:e,invoke:a,dispose:d}}function ln(){return ln=k((function(e){var n,t;return P(this,(function(r){switch(r.label){case 0:if(!(null==(n=S())?void 0:n.getSuiteConfigSignature))throw new Be("Missing getSuiteConfigSignature");return[4,n.getSuiteConfigSignature(e)];case 1:return t=r.sent(),[2,{suiteid:n.suiteId,timestamp:""+t.timestamp,nonceStr:t.nonceStr,signature:t.signature,jsApiList:j(n.jsApiList||["agentConfig"])}]}}))})),ln.apply(this,arguments)}function dn(e,n){G(n[e.name],e.payload||e.data)}function pn(e,n){var t=function(){var e;a.dispose(),null==(e=r.parentNode)||e.removeChild(r)};null==on||on();var r=nn("100vw","100vh",document.body),i=r.style;i.position="fixed",i.left="0",i.top="0",i.zIndex="1000",r.classList.add("wecom-jssdk-modal"),r.setAttribute("src",e);var o=new URL(e).origin,a=sn(r,o,(function(e){return"close"===e.type&&t(),null==n?void 0:n(e)}));return on=t,a}var fn={agentConfig:je,suiteConfig:function(e){return ln.apply(this,arguments)}};function hn(e,n){return gn.apply(this,arguments)}function gn(){return gn=k((function(e,n){var t,r,i,o,a,u;return P(this,(function(c){switch(c.label){case 0:t=new Error("Missing signature handler"),r=M(n),c.label=1;case 1:if((i=r()).done)return[3,6];o=i.value,c.label=2;case 2:return c.trys.push([2,4,,5]),function(e,n){return Object.prototype.hasOwnProperty.call(e,n)}(fn,o)?(a={type:o},[4,fn[o](e)]):[3,5];case 3:return[2,(a.params=c.sent(),a)];case 4:return u=c.sent(),t=u,[3,5];case 5:return[3,1];case 6:throw t}}))})),gn.apply(this,arguments)}var vn,yn,mn,wn,Cn,Sn="1.4.3";e.WWLoginType=void 0,(vn=e.WWLoginType||(e.WWLoginType={})).serviceApp="ServiceApp",vn.corpApp="CorpApp",e.WWLoginLangType=void 0,(yn=e.WWLoginLangType||(e.WWLoginLangType={})).zh="zh",yn.en="en",e.WWLoginRedirectType=void 0,(mn=e.WWLoginRedirectType||(e.WWLoginRedirectType={})).top="top",mn.callback="callback",mn.self="self",e.WWLoginPanelSizeType=void 0,(wn=e.WWLoginPanelSizeType||(e.WWLoginPanelSizeType={})).middle="middle",wn.small="small";var bn=((Cn={})[e.WWLoginPanelSizeType.middle]=["480px","416px"],Cn[e.WWLoginPanelSizeType.small]=["320px","380px"],Cn);function Tn(e){return function(e){for(var n,t="0123456789abcdef",r="",i=0;i>>4&15)+t.charAt(15&n);return r}(function(e){return function(e){for(var n="",t=0;t<32*e.length;t+=8)n+=String.fromCharCode(e[t>>5]>>>24-t%32&255);return n}(function(e,n){e[n>>5]|=128<<24-n%32,e[15+(n+64>>9<<4)]=n;for(var t=new Array(80),r=1732584193,i=-271733879,o=-1732584194,a=271733878,u=-1009589776,c=0;c>2),t=0;t>5]|=(255&e.charCodeAt(r/8))<<24-r%32;return n}(e),8*e.length))}(e))}function In(e,n,t,r){return e<20?n&t|~n&r:e<40?n^t^r:e<60?n&t|n&r|t&r:n^t^r}function An(e){return e<20?1518500249:e<40?1859775393:e<60?-1894007588:-899497514}function Wn(e,n){var t=(65535&e)+(65535&n);return(e>>16)+(n>>16)+(t>>16)<<16|65535&t}function kn(e,n){return e<>>32-n}var Pn={isWeChat:g,isWeCom:h};return e.IS_WECOM_SDK=!0,e.SDK_VERSION=Sn,e.addCard=function(e){return He(e,k((function(){var n,t,r,i;return P(this,(function(o){switch(o.label){case 0:return[4,Je()];case 1:return o.sent(),[4,ne("batchAddCard",{card_list:e.cardList.map((function(e){return{card_id:e.cardId,card_ext:e.cardExt}}))})];case 2:if(!(n=o.sent()).card_list)return[2,n];for(t=M(n.card_list);!(r=t()).done;)(i=r.value).cardId=i.card_id,delete i.card_id,i.cardExt=i.card_ext,delete i.card_ext,i.isSuccess=!!i.is_succ,delete i.is_succ;return n.cardList=n.card_list,delete n.card_list,[2,n]}}))})))},e.addDevice=function(e){return Fe("addDevice",e)},e.checkJsApi=function(e){return Ze.apply(this,arguments)},e.checkSchedule=function(e){return Fe("checkSchedule",e)},e.chooseCard=function(e){return He(e,k((function(){var n;return P(this,(function(t){switch(t.label){case 0:return[4,Je()];case 1:return t.sent(),[4,ne("chooseCard",{app_id:I(),location_id:e.shopId||"",sign_type:e.signType||"SHA1",card_id:e.cardId||"",card_type:e.cardType||"",card_sign:e.cardSign,time_stamp:""+e.timestamp,nonce_str:e.nonceStr})];case 2:return(n=t.sent()).cardList=n.choose_card_info,delete n.choose_card_info,[2,n]}}))})))},e.chooseImage=function(e){return void 0===e&&(e={}),He(e,k((function(){var n;return P(this,(function(t){switch(t.label){case 0:return[4,Je()];case 1:return t.sent(),[4,ne("chooseImage",{scene:"1|2",count:e.count||9,sizeType:e.sizeType||["original","compressed"],sourceType:e.sourceType||["album","camera"],defaultCameraMode:e.defaultCameraMode||"normal",isSaveToAlbum:K(e.isSaveToAlbum)?0:1})];case 2:if(n=t.sent(),v&&n.localIds){n.localIds=n.localIds||"[]";try{n.localIds=JSON.parse(n.localIds)}catch(r){}}return[2,n]}}))})))},e.chooseInvoice=function(e){return Fe("chooseInvoice",e)},e.chooseWXPay=function(e){return Fe("getBrandWCPayRequest",e,Ke(e))},e.claimClassAdmin=function(e){return void 0===e&&(e={}),Fe("claimClassAdmin",e)},e.closeBLEConnection=function(e){return Fe("closeBLEConnection",e)},e.closeBluetoothAdapter=function(e){return void 0===e&&(e={}),Fe("closeBluetoothAdapter",e)},e.closeWindow=function(e){return void 0===e&&(e={}),Fe("closeWindow",e)},e.connectWifi=function(e){return Fe("connectWifi",e)},e.consumeAndShareCard=function(e){return Fe("consumedShareCard",e,{consumedCardId:e.cardId,consumedCode:e.code})},e.createBLEConnection=function(e){return Fe("createBLEConnection",e)},e.createChatWithMsg=function(e){return Fe("createChatWithMsg",e)},e.createCorpGroupChat=function(e){return Fe("createCorpGroupChat",e,{groupName:e.groupName||"",userIds:e.userIds,openUserIds:e.openUserIds,corpGroupUserIds:e.corpGroupUserIds})},e.createExternalPayment=function(e){return void 0===e&&(e={}),Fe("createExternalPayment",e)},e.createJSAPIPanel=function(e,n){var t=nn("100%","100%",n.el),r=new Map,i=sn(t,"https://login.work.weixin.qq.com",(function(t){switch(t.type){case"getStaticOptions":return{name:e,options:L({},n,{el:void 0,params:void 0})};case"getJSAPIParams":return function(e){return o.apply(this,arguments)}(t);case"openModalFrame":return function(e){pn(e.payload.url)}(t);case"jsapiCallback":return function(e){if(r.has(e.seq)){var n=r.get(e.seq);r.delete(e.seq),G("success"===e.kind?null==n?void 0:n.success:null==n?void 0:n.fail,e.payload),G(null==n?void 0:n.complete,e.payload)}}(t);case"call":return dn(t,n)}})).dispose;function o(){return(o=k((function(t){var i,o,a,u,c,s,l;return P(this,(function(d){switch(d.label){case 0:return Z(n.params)?[4,n.params()]:[3,2];case 1:return u=d.sent(),[3,3];case 2:u=n.params,d.label=3;case 3:return a=u,c=Q(),r.set(t.seq,a),s={webToken:n.webToken,url:c},(null==(i=t.payload)?void 0:i.skipSignature)?(l=void 0,[3,6]):[3,4];case 4:return[4,hn(c,(null==(o=t.payload)?void 0:o.preferSignatureTypeList)||["agentConfig"])];case 5:l=d.sent(),d.label=6;case 6:return[2,(s.configParams=l,s.jsapi=e,s.jsapiParams=a,s)]}}))}))).apply(this,arguments)}return t.style.opacity="0",t.src="https://login.work.weixin.qq.com/wwopen/ww-jsapi-transparent-frame",{el:t,unmount:function(){var e;i(),null==(e=t.parentNode)||e.removeChild(t)}}},e.createSchoolPayment=function(e){return Fe("createSchoolPayment",e)},e.createWWLoginPanel=function(n){for(var t,r,i=function(n){void 0===n&&(n=e.WWLoginPanelSizeType.middle);var t=bn[n]||bn[e.WWLoginPanelSizeType.middle];return{width:t[0],height:t[1]}}(null==(t=n.params)?void 0:t.panel_size),o=nn(i.width,i.height,n.el),a=sn(o,"https://login.work.weixin.qq.com",(function(e){if("call"===e.type)return dn(e,n);throw new Error("Unknown message type '"+e.type+"'")})).dispose,u=new URL("https://login.work.weixin.qq.com/wwlogin/sso/login"),c=M(Object.keys(n.params||{}));!(r=c()).done;){var s=r.value;u.searchParams.set(s,n.params[s])}return u.searchParams.set("version",Sn),o.src=u.href,{el:o,unmount:function(){var e;a(),null==(e=o.parentNode)||e.removeChild(o)}}},e.discoverDevice=function(e){return Fe("discoverDevice",e)},e.downloadImage=function(e){return Fe("downloadImage",e,{serverId:e.serverId,isShowProgressTips:K(e.isShowProgressTips)?0:1})},e.downloadLivingReplay=function(e){return Fe("downloadLivingReplay",e)},e.downloadVoice=function(e){return Fe("downloadVoice",e,{serverId:e.serverId,isShowProgressTips:K(e.isShowProgressTips)?0:1})},e.ensureAgentConfigReady=Ve,e.ensureConfigReady=qe,e.ensureCorpConfigReady=Oe,e.enterHWOpenTalk=function(e){return Fe("enterHWOpenTalk",e)},e.enterpriseVerify=function(e){return void 0===e&&(e={}),Fe("enterpriseVerify",e)},e.env=Pn,e.getApprovalSelectedItems=function(e){return He(e,k((function(){var n;return P(this,(function(t){switch(t.label){case 0:return[4,Je()];case 1:return t.sent(),[4,ne("getApprovalSelectedItems",{key:e.key})];case 2:if(!(n=t.sent()).selectedData)return[2,n];try{n.selectedData=JSON.parse(n.selectedData)}catch(r){n.selectedData=[]}return[2,n]}}))})))},e.getBLEDeviceCharacteristics=function(e){return Fe("getBLEDeviceCharacteristics",e)},e.getBLEDeviceServices=function(e){return Fe("getBLEDeviceServices",e)},e.getBeacons=function(e){return void 0===e&&(e={}),Fe("getBeacons",e)},e.getBluetoothAdapterState=function(e){return void 0===e&&(e={}),Fe("getBluetoothAdapterState",e)},e.getBluetoothDevices=function(e){return void 0===e&&(e={}),He(e,k((function(){var e,n,t,r;return P(this,(function(i){switch(i.label){case 0:return[4,Je()];case 1:return i.sent(),[4,ne("getBluetoothDevices")];case 2:for(e=i.sent(),n=M(e.devices||[]);!(t=n()).done;)(r=t.value).advertisData=F(r.advertisData),r.serviceData=F(r.serviceData);return[2,e]}}))})))},e.getClipboardData=function(e){return void 0===e&&(e={}),Fe("getClipboardData",e)},e.getConnectedBluetoothDevices=function(e){return Fe("getConnectedBluetoothDevices",e)},e.getConnectedWifi=function(e){return void 0===e&&(e={}),Fe("getConnectedWifi",e)},e.getContext=function(e){return void 0===e&&(e={}),Fe("getContext",e)},e.getCurCorpGroupChat=function(e){return void 0===e&&(e={}),Fe("getCurCorpGroupChat",e)},e.getCurCorpGroupContact=function(e){return Fe("getCurCorpGroupContact",e)},e.getCurExternalChat=function(e){return void 0===e&&(e={}),Fe("getCurExternalChat",e)},e.getCurExternalContact=function(e){return void 0===e&&(e={}),Fe("getCurExternalContact",e)},e.getLocalImgData=function(e){return Fe("getLocalImgData",e)},e.getLocation=function(e){return void 0===e&&(e={}),He(e,k((function(){var n;return P(this,(function(t){switch(t.label){case 0:return[4,Je()];case 1:return t.sent(),[4,ne("geoLocation",{type:e.type||"wgs84"})];case 2:return delete(n=t.sent()).type,[2,n]}}))})))},e.getNetworkType=function(e){return void 0===e&&(e={}),Fe("getNetworkType",e)},e.getShareInfo=function(e){return Fe("getShareInfo",e)},e.getSignature=function(e){var n=e;"string"==typeof e&&(n={ticket:e});var t=n.nonceStr||Math.random().toString(36).slice(2),r=n.timestamp||Math.floor(Date.now()/1e3),i=n.url||a().split("#")[0];return{timestamp:r,nonceStr:t,signature:Tn("jsapi_ticket="+n.ticket+"&noncestr="+t+"×tamp="+r+"&url="+i)}},e.getVerifyParams=A,e.getWifiList=function(e){return void 0===e&&(e={}),Fe("getWifiList",e)},e.hideAllNonBaseMenuItem=function(e){return void 0===e&&(e={}),Fe("hideAllNonBaseMenuItem",e)},e.hideChatAttachmentMenu=function(e){return Fe("hideChatAttachmentMenu",e)},e.hideMenuItems=function(e){return Fe("hideMenuItems",e)},e.hideOptionMenu=function(e){return void 0===e&&(e={}),Fe("hideOptionMenu",e)},e.initOpenData=function(e){return void 0===e&&(e={}),He(e,k((function(){var e;return P(this,(function(n){switch(n.label){case 0:return h?[4,Ve()]:[2,Ye()];case 1:if(e=n.sent().result,!y&&!(null==t?void 0:t.WeixinSandBox))throw new Be("Missing WeixinSandBox");return(null==t?void 0:t.WWOpenData)?[3,3]:[4,ne("wwapp.initWwOpenData")];case 2:n.sent(),n.label=3;case 3:if(!(null==t?void 0:t.WWOpenData))throw new Be("Init WWOpenData failed");return t.WWOpenData.initJSSDK&&t.WWOpenData.initJSSDK({invoke:ne,ensureAgentConfigReady:Ve}),[2,e]}}))})))},e.invoke=ne,e.launchMiniprogram=function(e){return Fe("launchMiniprogram",e,{appid:e.appid,path:$e(e.path),envVersion:e.envVersion})},e.navigateToAddCustomer=function(e){return void 0===e&&(e={}),Fe("navigateToAddCustomer",e)},e.navigateToKfChat=function(e){return Fe("navigateToKfChat",e)},e.notifyBLECharacteristicValueChange=function(e){return Fe("notifyBLECharacteristicValueChange",e)},e.on=Y,e.onBLECharacteristicValueChange=function(e){Y("onBLECharacteristicValueChange",(function(n){(null==n?void 0:n.value)&&(n.value=F(n.value)),e(n)}))},e.onBLEConnectionStateChange=function(e){Y("onBLEConnectionStateChange",e)},e.onBeaconServiceChange=function(e){Y("onBeaconServiceChange",e)},e.onBeaconUpdate=function(e){Y("onBeaconUpdate",e)},e.onBluetoothAdapterStateChange=function(e){Y("onBluetoothAdapterStateChange",e)},e.onBluetoothDeviceFound=function(e){Y("onBluetoothDeviceFound",e)},e.onGetWifiList=function(e){Y("onGetWifiList",e)},e.onHistoryBack=function(e){Y("historyBack",e)},e.onLocationChange=function(e){Y("auto:location:report",e)},e.onMenuShareAppMessage=function(e){ze("menu:share:appmessage",e,(function(){return ne("sendAppMessage",{title:e.title||u(),desc:e.desc||"",link:e.link||a(),img_url:e.imgUrl||"",type:e.type||"link",data_url:e.dataUrl||""})}))},e.onMenuShareQQ=function(e){ze("menu:share:qq",e,(function(){return ne("shareQQ",{title:e.title||u(),desc:e.desc||"",img_url:e.imgUrl||"",link:e.link||a()})}))},e.onMenuShareQZone=function(e){ze("menu:share:QZone",e,(function(){return ne("shareQZone",{title:e.title||u(),desc:e.desc||"",img_url:e.imgUrl||"",link:e.link||a()})}))},e.onMenuShareTimeline=function(e){ze("menu:share:timeline",e,(function(){return ne("shareTimeline",{title:e.title||u(),desc:e.title||u(),img_url:e.imgUrl||"",link:e.link||a(),type:e.type||"link",data_url:e.dataUrl||""})}))},e.onMenuShareWechat=function(e){ze("menu:share:wechat",e,(function(){return ne("shareWechat",{title:e.title||u(),desc:e.desc||"",link:e.link||a(),img_url:e.imgUrl||"",type:e.type||"link",data_url:e.dataUrl||""})}))},e.onMenuShareWeibo=function(e){ze("menu:share:weiboApp",e,(function(){return ne("shareWeiboApp",{title:e.title||u(),desc:e.desc||"",img_url:e.imgUrl||"",link:e.link||a()})}))},e.onNetworkStatusChange=function(e){Y("onNetworkStatusChange",e)},e.onSearchBeacons=function(e){Y("onBeaconsInRange",e)},e.onUserCaptureScreen=function(e){Y("onUserCaptureScreen",e)},e.onVoicePlayEnd=function(e){Y("onVoicePlayEnd",e)},e.onVoiceRecordEnd=function(e){Y("onVoiceRecordEnd",e)},e.onWifiConnected=function(e){Y("onWifiConnected",e)},e.openAddress=function(e){return void 0===e&&(e={}),He(e,k((function(){var e;return P(this,(function(n){switch(n.label){case 0:return[4,Je()];case 1:return n.sent(),[4,ne("editAddress")];case 2:return(e=n.sent()).postalCode=e.addressPostalCode,delete e.addressPostalCode,e.provinceName=e.proviceFirstStageName,delete e.proviceFirstStageName,e.cityName=e.addressCitySecondStageName,delete e.addressCitySecondStageName,e.countryName=e.addressCountiesThirdStageName,delete e.addressCountiesThirdStageName,e.detailInfo=e.addressDetailInfo,delete e.addressDetailInfo,[2,e]}}))})))},e.openAppComment=function(e){return void 0===e&&(e={}),Fe("openAppComment",e)},e.openAppDeviceDataAuth=function(e){return void 0===e&&(e={}),Fe("openAppDeviceDataAuth",e)},e.openAppManage=function(e){return void 0===e&&(e={}),Fe("openAppManage",e)},e.openBluetoothAdapter=function(e){return void 0===e&&(e={}),Fe("openBluetoothAdapter",e)},e.openBusinessView=function(e){return He(e,k((function(){var n;return P(this,(function(t){switch(t.label){case 0:return[4,Je()];case 1:return t.sent(),[4,ne("openBusinessView",{businessType:e.businessType,queryString:e.queryString||"",envVersion:e.envVersion})];case 2:if(n=t.sent(),!v||!n.extraData)return[2,n];try{n.extraData=JSON.parse(n.extraData)}catch(r){n.extraData={}}return[2,n]}}))})))},e.openCard=function(e){return Fe("batchViewCard",e,{card_list:e.cardList.map((function(e){return{card_id:e.cardId,code:e.code}}))})},e.openDefaultBrowser=function(e){return Fe("openDefaultBrowser",e)},e.openDeviceProfile=function(e){return Fe("openDeviceProfile",e)},e.openEnterpriseChat=function(e){return void 0===e&&(e={}),Fe("openEnterpriseChat",e,{chatId:e.chatId||"",chatname:e.groupName||"",groupName:e.groupName||"",useridlist:$(e.userIds),userIds:$(e.userIds),openIds:$(e.openIds),externalUserIds:$(e.externalUserIds)})},e.openEnterpriseRedPacket=function(e){return Fe("getRecevieBizHongBaoRequest",e,Ke(e))},e.openExistedChatWithMsg=function(e){return Fe("openExistedChatWithMsg",e)},e.openLocation=function(e){return Fe("openLocation",e,{latitude:e.latitude,longitude:e.longitude,name:e.name||"",address:e.address||"",scale:e.scale||28,infoUrl:e.infoUrl||""})},e.openProductSpecificView=function(e){return Fe("openProductViewWithPid",e,{pid:e.productId,view_type:e.viewType||0,ext_info:e.extInfo})},e.openThirdAppServiceChat=function(e){return void 0===e&&(e={}),Fe("openThirdAppServiceChat",e)},e.openUserProfile=function(e){return Fe("openUserProfile",e)},e.pauseVoice=function(e){return Fe("pauseVoice",e)},e.playVoice=function(e){return Fe("playVoice",e)},e.previewFile=function(e){return Fe("previewFile",e)},e.previewImage=function(e){return Fe("imagePreview",e)},e.printFile=function(e){return Fe("printFile",e)},e.queryCurrHWOpenTalk=function(e){return void 0===e&&(e={}),Fe("queryCurrHWOpenTalk",e)},e.readBLECharacteristicValue=function(e){return Fe("readBLECharacteristicValue",e)},e.refundExternalPayment=function(e){return Fe("refundExternalPayment",e)},e.register=function(e){!function(e){c=e}(e),(g||h)&&qe()},e.replayLiving=function(e){return Fe("replayLiving",e)},e.saveApprovalSelectedItems=function(e){return Fe("saveApprovalSelectedItems",e,{key:e.key,selectedData:"string"==typeof e.selectedData?e.selectedData:JSON.stringify(e.selectedData)})},e.scanQRCode=function(e){return void 0===e&&(e={}),He(e,k((function(){var n,t,r,i;return P(this,(function(o){switch(o.label){case 0:return[4,Je()];case 1:return o.sent(),[4,ne("scanQRCode",{needResult:e.needResult?1:0,scanType:e.scanType||["qrCode","barCode"]})];case 2:if(t=o.sent(),!w)return[2,t];if(!(r=t.resultStr))return[2,t];try{i=JSON.parse(r)}catch(a){}return t.resultStr=null==i||null==(n=i.scan_code)?void 0:n.scan_result,[2,t]}}))})))},e.selectCorpGroupContact=function(e){return He(e,k((function(){var n;return P(this,(function(t){switch(t.label){case 0:return[4,Je()];case 1:return t.sent(),[4,ne("selectCorpGroupContact",e)];case 2:if(!X((n=t.sent()).result))return[2,n];try{n.result=JSON.parse(n.result)}catch(r){}return[2,n]}}))})))},e.selectEnterpriseContact=function(e){return He(e,k((function(){var n;return P(this,(function(t){switch(t.label){case 0:return[4,Je()];case 1:return t.sent(),[4,ne("selectEnterpriseContact",e)];case 2:if(!X((n=t.sent()).result))return[2,n];try{n.result=JSON.parse(n.result)}catch(r){}return[2,n]}}))})))},e.selectExternalContact=function(e){return void 0===e&&(e={}),Fe("selectExternalContact",e)},e.selectPrivilegedContact=function(e){return Fe("selectPrivilegedContact",e)},e.sendChatMessage=function(e){return Fe("sendChatMessage",e)},e.setClipboardData=function(e){return Fe("setClipboardData",e)},e.setShareAttr=function(e){return void 0===e&&(e={}),Fe("setShareAttr",e)},e.shareAppMessage=function(e){return Fe("shareAppMessage",e)},e.shareToExternalChat=function(e){return Fe("shareToExternalChat",e)},e.shareToExternalContact=function(e){return Fe("shareToExternalContact",e)},e.shareToExternalMoments=function(e){return Fe("shareToExternalMoments",e)},e.shareWechatMessage=function(e){return Fe("shareWechatMessage",e)},e.showAllNonBaseMenuItem=function(e){return void 0===e&&(e={}),Fe("showAllNonBaseMenuItem",e)},e.showMenuItems=function(e){return Fe("showMenuItems",e)},e.showOptionMenu=function(e){return void 0===e&&(e={}),Fe("showOptionMenu",e)},e.showSecurityGatewayConfirmModal=function(e){var n=new URL("https://open.work.weixin.qq.com/wwopen/secureGateway/confirm");if(n.searchParams.set("confirm_id",e.confirmId),!w&&!v){n.searchParams.set("modal","true");var t=pn(n.href,(function(n){switch(n.type){case"call":return dn(n,e);case"close":return;default:throw new Error("Unknown message type '"+n.type+"'")}}));return{el:t.el,unmount:function(){var e;t.dispose(),null==(e=t.el.parentNode)||e.removeChild(t.el)}}}location.href=n.href},e.startAutoLBS=function(e){return Fe("startAutoLBS",e)},e.startBeaconDiscovery=function(e){return Fe("startBeaconDiscovery",e)},e.startBluetoothDevicesDiscovery=function(e){return void 0===e&&(e={}),Fe("startBluetoothDevicesDiscovery",e)},e.startLiving=function(e){return void 0===e&&(e={}),Fe("startLiving",e)},e.startMeeting=function(e){return void 0===e&&(e={}),Fe("startMeeting",e)},e.startRecord=function(e){return void 0===e&&(e={}),Fe("startRecord",e)},e.startSearchBeacons=function(e){return void 0===e&&(e={}),Fe("startMonitoringBeacons",e)},e.startWecast=function(e){return void 0===e&&(e={}),Fe("startWecast",e)},e.startWifi=function(e){return void 0===e&&(e={}),Fe("startWifi",e)},e.stopAutoLBS=function(e){return void 0===e&&(e={}),Fe("stopAutoLBS",e)},e.stopBeaconDiscovery=function(e){return void 0===e&&(e={}),Fe("stopBeaconDiscovery",e)},e.stopBluetoothDevicesDiscovery=function(e){return void 0===e&&(e={}),Fe("stopBluetoothDevicesDiscovery",e)},e.stopRecord=function(e){return void 0===e&&(e={}),Fe("stopRecord",e)},e.stopSearchBeacons=function(e){return void 0===e&&(e={}),Fe("stopMonitoringBeacons",e)},e.stopVoice=function(e){return Fe("stopVoice",e)},e.stopWifi=function(e){return void 0===e&&(e={}),Fe("stopWifi",e)},e.thirdPartyOpenPage=function(e){return Fe("thirdPartyOpenPage",e)},e.translateVoice=function(e){return Fe("translateVoice",e,{localId:e.localId,isShowProgressTips:K(e.isShowProgressTips)?0:1})},e.updateAppMessageShareData=function(e){return void 0===e&&(e={}),Fe("updateAppMessageShareData",e)},e.updateCorpGroupChat=function(e){return Fe("updateCorpGroupChat",e)},e.updateEnterpriseChat=function(e){return Fe("updateEnterpriseChat",e,{chatId:e.chatId,userIdsToAdd:$(e.userIdsToAdd)})},e.updateMomentsSetting=function(e){return Fe("updateMomentsSetting",e)},e.updateTimelineShareData=function(e){return void 0===e&&(e={}),Fe("updateTimelineShareData",e)},e.uploadImage=function(e){return Fe("uploadImage",e,{localId:e.localId,isShowProgressTips:K(e.isShowProgressTips)?0:1})},e.uploadVoice=function(e){return Fe("uploadVoice",e,{localId:e.localId,isShowProgressTips:K(e.isShowProgressTips)?0:1})},e.wedocSelectDoc=function(e){return void 0===e&&(e={}),Fe("wedocSelectDoc",e)},e.wedriveSelectDir=function(e){return void 0===e&&(e={}),Fe("wedriveSelectDir",e)},e.wedriveSelectFileForDownload=function(e){return Fe("wedriveSelectFileForDownload",e)},e.wedriveSelectFileForShare=function(e){return Fe("wedriveSelectFileForShare",e)},e.writeBLECharacteristicValue=function(e){return Fe("writeBLECharacteristicValue",e,{deviceId:e.deviceId,serviceId:e.serviceId,characteristicId:e.characteristicId,value:J(e.value)})},e}({});