mirror of
https://github.com/wechat-miniprogram/minigame-tuanjie-transform-sdk.git
synced 2025-11-13 03:35:55 +08:00
1 line
68 KiB
JavaScript
1 line
68 KiB
JavaScript
|
|
(()=>{var e={7:(e,t,n)=>{"use strict";function s(){}function i(e=20,t){const n=(t?"":"!#%()*+,-./:;=?@[]^_`{|}~")+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",s=n.length,i=[];for(let t=0;t<e;t++)i[t]=n.charAt(Math.random()*s);return i.join("")}function o(e="0.0.0",t){if("string"!=typeof e||"string"!=typeof t)return"string"!=typeof e&&"string"!=typeof t?0:"string"!=typeof e?1:-1;const n=e.split("."),s=t.split("."),i=Math.max(n.length,s.length);for(;n.length<i;)n.push("0");for(;s.length<i;)s.push("0");for(let e=0;e<i;e++){const t=parseInt(n[e],10),i=parseInt(s[e],10);if(t>i)return 1;if(t<i)return-1}return 0}function r(e){return"number"==typeof e&&isFinite(e)}function a(e,t=0,n=0,...s){return new Promise(((i,o)=>{const r=(t=0)=>{e.apply(null,[...s,t]).then(i).catch((e=>{t>0?setTimeout((()=>{r(t-1)}),n):o(e)}))};r(t)}))}function c(e){return e.then((e=>[null,e])).catch((e=>[e,null]))}function l(e,t="yyyy-MM-dd"){if(!e)return"";let n=t;const s=10===String(e).toString().length?new Date(1e3*e):new Date(e),i={"y+":s.getFullYear(),"M+":s.getMonth()+1,"d+":s.getDate(),"h+":s.getHours(),"m+":s.getMinutes(),"s+":s.getSeconds(),"q+":Math.floor((s.getMonth()+3)/3),"S+":s.getMilliseconds()};for(const[e,t]of Object.entries(i)){const s=new RegExp(`(${e})`);if(s.test(n)){const[e]=n.match(s);n=n.replace(s,(()=>`00${t}`.slice(-`${e}`.length)))}}return n}function u(e){if(null==e)return!0;if("boolean"==typeof e)return!1;if("number"==typeof e)return!e;if(e instanceof Error)return""===e.message;switch(Object.prototype.toString.call(e)){case"[object String]":case"[object Array]":return!e.length;case"[object File]":case"[object Map]":case"[object Set]":return!e.size;case"[object Object]":return!Object.keys(e).length}return!1}function h(e){return"[object String]"===Object.prototype.toString.call(e)}function d(e){return"[object Object]"===Object.prototype.toString.call(e)}function p(e){return e&&"[object Function]"===Object.prototype.toString.call(e)}function g(e){let t=e;try{"object"==typeof e&&(t="string"==typeof e.errMsg?e.errMsg:"string"==typeof e.errmsg?e.errmsg:"string"==typeof e.message?e.message:JSON.stringify(e))}catch(e){console.error(e)}return t}function m(e,t,n){if(!n)return e;let s=e;const i=new RegExp(`([?&])${t}=.*?(&|$)`,"i");if(s.match(i))return s.replace(i,`$1${t}=${n}$2`);const o=-1!==s.indexOf("?")?"&":"?",r=s.split("#");return s=`${r[0]+o+t}=${n}`,r[1]&&(s+=`#${r[1]}`),s}n.d(t,{Et:()=>r,Gm:()=>o,Gv:()=>d,Im:()=>u,Kg:()=>h,L8:()=>g,Ld:()=>i,Mx:()=>a,NW:()=>c,Q$:()=>m,Tn:()=>p,Yq:()=>l,dv:()=>s})},72:(e,t,n)=>{"use strict";var s,i,o,r,a;n.d(t,{OD:()=>s,aM:()=>o,jt:()=>r,rC:()=>a}),function(e){e.devtools="devtools",e.android="android",e.ios="ios",e.windows="windows",e.mac="mac"}(s||(s={})),function(e){e.portrait="portrait",e.landscape="landscape",e.landscapeLeft="landscapeLeft",e.landscapeRight="landscapeRight"}(i||(i={})),function(e){e.DEVELOP="develop",e.TRIAL="trial",e.RELEASE="release"}(o||(o={})),function(e){e[e.release=1]="release",e[e.develop=2]="develop",e[e.trial=3]="trial"}(r||(r={})),function(e){e[e.Android=0]="Android",e[e.IOSJscore=1]="IOSJscore",e[e.IOSWK=2]="IOSWK",e[e.UnKnow=3]="UnKnow",e[e.PC=4]="PC",e[e.Devtools=5]="Devtools",e[e.IPadJscore=6]="IPadJscore",e[e.IPadWK=7]="IPadWK",e[e.IOSWKPlus=8]="IOSWKPlus",e[e.IPadWKPlus=9]="IPadWKPlus"}(a||(a={}))},347:(e,t,n)=>{"use strict";n.d(t,{A:()=>Ie});var s={};n.r(s),n.d(s,{navigateToMiniProgram:()=>I});var i=n(7),o=n(72);function r(e){var t,s,i,r,a;const c=null===(t=e.platform)||void 0===t?void 0:t.toLocaleLowerCase();return c===o.OD.devtools?o.rC.Devtools:c===o.OD.ios?e.model&&e.model.indexOf("iPad")>-1?(null===(s=n.g)||void 0===s?void 0:s.isIOSHighPerformanceModePlus)?o.rC.IPadWKPlus:(null===(i=n.g)||void 0===i?void 0:i.isIOSHighPerformanceMode)?o.rC.IPadWK:o.rC.IPadJscore:(null===(r=n.g)||void 0===r?void 0:r.isIOSHighPerformanceModePlus)?o.rC.IOSWKPlus:(null===(a=n.g)||void 0===a?void 0:a.isIOSHighPerformanceMode)?o.rC.IOSWK:o.rC.IOSJscore:c===o.OD.android?o.rC.Android:c===o.OD.windows||c===o.OD.mac?o.rC.PC:o.rC.UnKnow}var a,c,l,u,h;const d="unde
|