mindoc/static/js/dingtalk-jsapi.js

1 line
106 KiB
Go
Raw Normal View History

(function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.dd=t():e.dd=t()})(this,function(){return function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,t),o.l=!0,o.exports}var n={};return t.m=e,t.c=n,t.i=function(e){return e},t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=707)}([function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(2),o=n(180),i=n(2);t.ENV_ENUM=i.ENV_ENUM,t.ENV_ENUM_SUB=i.ENV_ENUM_SUB;var a=n(3);n(186),t.ddSdk=new a.Sdk(r.getENV(),o.log)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.addWatchParamsDeal=function(e){var t=Object.assign({},e);return t.watch=!0,t},t.addDefaultCorpIdParamsDeal=function(e){var t=Object.assign({},e);return t.corpId="corpId",t},t.genDefaultParamsDealFn=function(e){var t=Object.assign({},e);return function(e){return Object.assign({},t,e)}},t.forceChangeParamsDealFn=function(e){var t=Object.assign({},e);return function(e){return Object.assign(e,t)}},t.genBoolResultDealFn=function(e){return function(t){var n=Object.assign({},t);return e.forEach(function(e){void 0!==n[e]&&(n[e]=!!n[e])}),n}},t.genBizStoreParamsDealFn=function(e){var t=Object.assign({},e);return"string"!=typeof t.params?(t.params=JSON.stringify(t),t):t}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(3),o=n(3);t.ENV_ENUM=o.ENV_ENUM,t.APP_TYPE=o.APP_TYPE,t.ENV_ENUM_SUB=o.ENV_ENUM_SUB;var i,a=n(183);(function(e){e.singlePage="singlePage",e.miniApp="miniApp",e.miniWidget="miniWidget"})(i||(i={})),t.getUA=function(){var e="";try{"undefined"!=typeof navigator&&(e=navigator&&(navigator.userAgent||navigator.swuserAgent)||"")}catch(t){e=""}return e},t.getENV=function(){var e=t.getUA(),n=/iPhone|iPad|iPod|iOS/i.test(e),o=/Android/i.test(e),s=/Nebula/i.test(e),d=/DingTalk/i.test(e),u=/dd-web/i.test(e),c="object"==typeof nuva,l="object"==typeof dd&&"function"==typeof dd.dtBridge,f=l&&n||c&&n,v=d||a.default.isDingTalk,p=n&&v||a.default.isWeexiOS||f,_=o&&v||a.default.isWeexAndroid,E=s&&v||l,N=u,P=r.APP_TYPE.WEB;if(N)P=r.APP_TYPE.WEBVIEW_IN_MINIAPP;else if(E)P=r.APP_TYPE.MINI_APP;else if(a.default.isWeexiOS||a.default.isWeexAndroid)try{var M=weex.config.ddWeexEnv;P=M===i.miniWidget?r.APP_TYPE.WEEX_WIDGET:r.APP_TYPE.WEEX}catch(e){P=r.APP_TYPE.WEEX}var h,m="*",k=e.match(/AliApp\(\w+\/([a-zA-Z0-9.-]+)\)/);null===k&&(k=e.match(/DingTalk\/([a-zA-Z0-9.-]+)/));var b;k&&k[1]&&(b=k[1]);var g="";if("undefined"!=typeof name&&(g=name),g)try{var I=JSON.parse(g);I.hostVersion&&(b=I.hostVersion),m=I.language||navigator.language||"*",h=I.containerId}catch(e){}var y=!!h;y&&!b&&(k=e.match(/DingTalk\(([a-zA-Z0-9\.-]+)\)/))&&k[1]&&(b=k[1]);var A,S=r.ENV_ENUM_SUB.noSub;if(p)A=r.ENV_ENUM.ios;else if(_)A=r.ENV_ENUM.android;else if(y){var V=e.indexOf("Macintosh; Intel Mac OS")>-1;S=V?r.ENV_ENUM_SUB.mac:r.ENV_ENUM_SUB.win,A=r.ENV_ENUM.pc}else A=r.ENV_ENUM.notInDingTalk;return{platform:A,platformSub:S,version:b,appType:P,language:m}}},function(e,t,n){"use strict";function r(e,t){var n=e&&e.vs;return"object"==typeof n&&(n=n[t.platformSub]),n}Object.defineProperty(t,"__esModule",{value:!0});var o=n(189);t.APP_TYPE=o.APP_TYPE,t.LogLevel=o.LogLevel,t.isFunction=o.isFunction,t.compareVersion=o.compareVersion,t.ENV_ENUM=o.ENV_ENUM,t.ENV_ENUM_SUB=o.ENV_ENUM_SUB;var i=function(){function e(e,t){var n=this;this.configJsApiList=[],this.hadConfig=!1,this.p={},this.config$=new Promise(function(e,t){n.p.reject=t,n.p.resolve=e}),this.logQueue=[],this.devConfig={debug:!1},this.platformConfigMap={},this.invokeAPIConfigMapByMethod={},this.isBridgeDrity=!0,this.getExportSdk=function(){return n.exportSdk},this.setAPI=function(e,t){n.invokeAPIConfigMapByMe