mazey-wechat-launch-app 2.3.3 → 2.3.5

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/LICENSE CHANGED
@@ -1,21 +1,21 @@
1
- The MIT License (MIT)
2
-
3
- Copyright (c) 2018-2023 Cheng
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in
13
- all copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
- THE SOFTWARE.
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2018-2023 Cheng
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
package/README.md CHANGED
@@ -1,174 +1,174 @@
1
- <!-- omit from toc -->
2
- # mazey-wechat-launch-app
3
-
4
- [![NPM version][npm-image]][npm-url]
5
- [![l][l-image]][l-url]
6
-
7
- [npm-image]: https://img.shields.io/npm/v/mazey-wechat-launch-app
8
- [npm-url]: https://npmjs.org/package/mazey-wechat-launch-app
9
- [l-image]: https://img.shields.io/npm/l/mazey-wechat-launch-app
10
- [l-url]: https://github.com/mazeyqian/mazey-wechat-launch-app
11
-
12
- 生成微信(WeChat/Weixin)跳转 App 所需要的按钮,经过灵活配置,可支持生成单/多个按钮。
13
-
14
- **Table of Contents**
15
-
16
- - [Install](#install)
17
- - [Usage](#usage)
18
- - [使用 npm](#使用-npm)
19
- - [使用 CDN](#使用-cdn)
20
- - [API](#api)
21
- - [参数](#参数)
22
- - [方法](#方法)
23
- - [FAQ](#faq)
24
- - [Contributing](#contributing)
25
- - [Development Environment](#development-environment)
26
- - [Scripts](#scripts)
27
- - [License](#license)
28
-
29
- ## Install
30
-
31
- 使用 [npm](https://www.npmjs.com/package/mazey-wechat-launch-app) 安装 mazey-wechat-launch-app:
32
-
33
- ```bash
34
- npm install mazey-wechat-launch-app --save
35
- ```
36
-
37
- ## Usage
38
-
39
- ### 使用 npm
40
-
41
- ```javascript
42
- import LAUNCH_APP from 'mazey-wechat-launch-app';
43
-
44
- const options = {
45
- weixinJsSdkTicket: 'bxLdikRXVb',
46
- launchContainerQuery: '.example-btn',
47
- serviceAccountAppId: 'wx123',
48
- openPlatformMobileAppId: 'wx456',
49
- extInfo: 'example://example/example',
50
- };
51
- const app = LAUNCH_APP(options);
52
- app.start();
53
- ```
54
-
55
- `<div class="example-btn><span>打开</span></div>` 生成的 HTML 结构如下:
56
-
57
- ```html
58
- <div class="example-btn mazey-launch-app-tag-0">
59
- <span>打开</span>
60
- <wx-open-launch-app
61
- id="mazey-launch-app-btn-prefix-mazey-launch-app-tag-0"
62
- appid="wx456"
63
- extinfo="example://example/example"
64
- style="z-index: 99; position: absolute; width: 100%; height: 100%; opacity: 1; background: transparent; overflow: hidden; left: 0;"
65
- >
66
- <script type="text/wxtag-template">
67
- <style>.mazey-launch-app-inner-btn { opacity: 0; width: 100%; height: 100%; backgroud: transparent; color: #300f54; border: none; box-sizing: border-box; text-align: center; vertical-align: middle; }</style>
68
- <button class="mazey-launch-app-inner-btn">Launch App <br /><br /><br /></button>
69
- </script>
70
- </wx-open-launch-app>
71
- </div>
72
- ```
73
-
74
- 注意:本项目依赖 [WeChat JS-SDK](https://developers.weixin.qq.com/doc/offiaccount/OA_Web_Apps/JS-SDK.html#3),请确保已经引入,程序会在初始化的时候探测 `window.wx`。
75
-
76
- ### 使用 CDN
77
-
78
- ```html
79
- <script type="text/javascript" src="//res.wx.qq.com/open/js/jweixin-1.6.0.js"></script>
80
- <script type="text/javascript" src="//cdn.jsdelivr.net/npm/mazey-wechat-launch-app@latest/lib/launch-app.min.js"></script>
81
- <script>
82
- var options = {
83
- weixinJsSdkTicket: 'bxLdikRXVb',
84
- launchContainerQuery: '.example-btn',
85
- serviceAccountAppId: 'wx123',
86
- openPlatformMobileAppId: 'wx456',
87
- extInfo: 'example://example/example',
88
- };
89
- var app = window.LAUNCH_APP(options);
90
- app.start();
91
- </script>
92
- ```
93
-
94
- 提示:如果项目里面已经使用了 jQuery、js-sha1、mazey 依赖库,可以使用体积更小的版本 [`v2.1.4`](https://cdn.jsdelivr.net/npm/mazey-wechat-launch-app@2.1.4/lib/launch-app.min.js)。
95
-
96
- ## API
97
-
98
- ### 参数
99
-
100
- | 参数 | 说明 | 类型 | 值 |
101
- | :------------ | :------------ | :------------ | :------------ |
102
- | `weixinJsSdkTicket` | [jsapi_ticket](https://developers.weixin.qq.com/doc/offiaccount/OA_Web_Apps/JS-SDK.html#62) 公众号用于调用微信 JS 接口的临时票据 | string | (必填)例如:`bxLdikRXVb` |
103
- | `launchContainerQuery` | [selectors](https://developer.mozilla.org/zh-CN/docs/Web/CSS/CSS_Selectors) 有效的 CSS 选择器字符串,通常是填充按钮的父容器 | string | (必填)例如:`.example-btn`, `#example-btn` |
104
- | `serviceAccountAppId` | 公众号的唯一标识 AppId | string | (必填)例如:`wx123` |
105
- | `openPlatformMobileAppId` | 开放平台内所需跳转的移动应用的 AppId | string | (可选)例如:`wx456` |
106
- | `extInfo` | [extinfo](https://developers.weixin.qq.com/doc/offiaccount/OA_Web_Apps/Wechat_Open_Tag.html#%E8%B7%B3%E8%BD%ACAPP%EF%BC%9Awx-open-launch-app) 跳转所需额外信息 | string | (可选)例如:`example://example/example` |
107
- | `launchBtnStyle` | 按钮内联样式 | string | (可选)例如:`top:0;right:0;bottom:0;left:0;` |
108
- | `launchBtnText` | 按钮文字 | string | (可选)例如:`打开 App` |
109
-
110
- ### 方法
111
-
112
- | 方法 | 说明 | 类型 |
113
- | :------------ | :------------ | :------------ |
114
- | `start` | 生成 | function |
115
- | `update` | 更新 | function |
116
- | `destroy` | 销毁 | function |
117
-
118
- ## FAQ
119
-
120
- **1\. 为什么微信里面通过分享卡片能唤起,直接打开链接却无法唤起的?**
121
-
122
- 截止 2023-08-10,只有微信 SDK 生成的卡片和服务号推送的消息才能唤起 App。
123
-
124
- **2\. 如何修改按钮样式?**
125
-
126
- 方法一(推荐):
127
-
128
- 如官方所说,模版的样式是和页面隔离的,建议将此处透明的开放标签覆盖在原按钮上,这样就可以保留原按钮的样式,同时又可以实现点击跳转。
129
-
130
- 方法二:
131
-
132
- 通过 `launchBtnStyle` 参数添加内联样式,通过 `launchBtnText` 参数修改按钮文字。
133
-
134
- **3\. 如何确保满足唤起的所有前置条件?**
135
-
136
- (1)开放平台、服务号已认证,并且主体一致;
137
-
138
- (2)开放平台绑定服务号;
139
-
140
- (3)开放平台绑定移动应用,并且已认证;
141
-
142
- (4)服务号绑定域名。
143
-
144
- ## Contributing
145
-
146
- ### Development Environment
147
-
148
- | Dependencies | Version |
149
- |------------|----------|
150
- | Node.js | v14.21.3 |
151
-
152
- ### Scripts
153
-
154
- Install Dependencies:
155
-
156
- ```bash
157
- npm i
158
- ```
159
-
160
- Development:
161
-
162
- ```bash
163
- npm run dev
164
- ```
165
-
166
- Build:
167
-
168
- ```bash
169
- npm run build
170
- ```
171
-
172
- ## License
173
-
174
- This software is released under the terms of the [MIT license](https://github.com/mazeyqian/mazey-wechat-launch-app/blob/main/LICENSE).
1
+ <!-- omit from toc -->
2
+ # mazey-wechat-launch-app
3
+
4
+ [![NPM version][npm-image]][npm-url]
5
+ [![l][l-image]][l-url]
6
+
7
+ [npm-image]: https://img.shields.io/npm/v/mazey-wechat-launch-app
8
+ [npm-url]: https://npmjs.org/package/mazey-wechat-launch-app
9
+ [l-image]: https://img.shields.io/npm/l/mazey-wechat-launch-app
10
+ [l-url]: https://github.com/chengchuu/mazey-wechat-launch-app
11
+
12
+ 生成微信(WeChat/Weixin)跳转 App 所需要的按钮,经过灵活配置,可支持生成单/多个按钮。
13
+
14
+ **Table of Contents**
15
+
16
+ - [Install](#install)
17
+ - [Usage](#usage)
18
+ - [使用 npm](#使用-npm)
19
+ - [使用 CDN](#使用-cdn)
20
+ - [API](#api)
21
+ - [参数](#参数)
22
+ - [方法](#方法)
23
+ - [FAQ](#faq)
24
+ - [Contributing](#contributing)
25
+ - [Development Environment](#development-environment)
26
+ - [Scripts](#scripts)
27
+ - [License](#license)
28
+
29
+ ## Install
30
+
31
+ 使用 [npm](https://www.npmjs.com/package/mazey-wechat-launch-app) 安装 mazey-wechat-launch-app:
32
+
33
+ ```bash
34
+ npm install mazey-wechat-launch-app --save
35
+ ```
36
+
37
+ ## Usage
38
+
39
+ ### 使用 npm
40
+
41
+ ```javascript
42
+ import LAUNCH_APP from 'mazey-wechat-launch-app';
43
+
44
+ const options = {
45
+ weixinJsSdkTicket: 'bxLdikRXVb',
46
+ launchContainerQuery: '.example-btn',
47
+ serviceAccountAppId: 'wx123',
48
+ openPlatformMobileAppId: 'wx456',
49
+ extInfo: 'example://example/example',
50
+ };
51
+ const app = LAUNCH_APP(options);
52
+ app.start();
53
+ ```
54
+
55
+ `<div class="example-btn><span>打开</span></div>` 生成的 HTML 结构如下:
56
+
57
+ ```html
58
+ <div class="example-btn mazey-launch-app-tag-0">
59
+ <span>打开</span>
60
+ <wx-open-launch-app
61
+ id="mazey-launch-app-btn-prefix-mazey-launch-app-tag-0"
62
+ appid="wx456"
63
+ extinfo="example://example/example"
64
+ style="z-index: 99; position: absolute; width: 100%; height: 100%; opacity: 1; background: transparent; overflow: hidden; left: 0;"
65
+ >
66
+ <script type="text/wxtag-template">
67
+ <style>.mazey-launch-app-inner-btn { opacity: 0; width: 100%; height: 100%; backgroud: transparent; color: #300f54; border: none; box-sizing: border-box; text-align: center; vertical-align: middle; }</style>
68
+ <button class="mazey-launch-app-inner-btn">Launch App <br /><br /><br /></button>
69
+ </script>
70
+ </wx-open-launch-app>
71
+ </div>
72
+ ```
73
+
74
+ 注意:本项目依赖 [WeChat JS-SDK](https://developers.weixin.qq.com/doc/offiaccount/OA_Web_Apps/JS-SDK.html#3),请确保已经引入,程序会在初始化的时候探测 `window.wx`。
75
+
76
+ ### 使用 CDN
77
+
78
+ ```html
79
+ <script type="text/javascript" src="//res.wx.qq.com/open/js/jweixin-1.6.0.js"></script>
80
+ <script type="text/javascript" src="//cdn.jsdelivr.net/npm/mazey-wechat-launch-app@latest/lib/launch-app.min.js"></script>
81
+ <script>
82
+ var options = {
83
+ weixinJsSdkTicket: 'bxLdikRXVb',
84
+ launchContainerQuery: '.example-btn',
85
+ serviceAccountAppId: 'wx123',
86
+ openPlatformMobileAppId: 'wx456',
87
+ extInfo: 'example://example/example',
88
+ };
89
+ var app = window.LAUNCH_APP(options);
90
+ app.start();
91
+ </script>
92
+ ```
93
+
94
+ 提示:如果项目里面已经使用了 jQuery、js-sha1、mazey 依赖库,可以使用体积更小的版本 [`v2.1.4`](https://cdn.jsdelivr.net/npm/mazey-wechat-launch-app@2.1.4/lib/launch-app.min.js)。
95
+
96
+ ## API
97
+
98
+ ### 参数
99
+
100
+ | 参数 | 说明 | 类型 | 值 |
101
+ | :------------ | :------------ | :------------ | :------------ |
102
+ | `weixinJsSdkTicket` | [jsapi_ticket](https://developers.weixin.qq.com/doc/offiaccount/OA_Web_Apps/JS-SDK.html#62) 公众号用于调用微信 JS 接口的临时票据 | string | (必填)例如:`bxLdikRXVb` |
103
+ | `launchContainerQuery` | [selectors](https://developer.mozilla.org/zh-CN/docs/Web/CSS/CSS_Selectors) 有效的 CSS 选择器字符串,通常是填充按钮的父容器 | string | (必填)例如:`.example-btn`, `#example-btn` |
104
+ | `serviceAccountAppId` | 公众号的唯一标识 AppId | string | (必填)例如:`wx123` |
105
+ | `openPlatformMobileAppId` | 开放平台内所需跳转的移动应用的 AppId | string | (可选)例如:`wx456` |
106
+ | `extInfo` | [extinfo](https://developers.weixin.qq.com/doc/offiaccount/OA_Web_Apps/Wechat_Open_Tag.html#%E8%B7%B3%E8%BD%ACAPP%EF%BC%9Awx-open-launch-app) 跳转所需额外信息 | string | (可选)例如:`example://example/example` |
107
+ | `launchBtnStyle` | 按钮内联样式 | string | (可选)例如:`top:0;right:0;bottom:0;left:0;` |
108
+ | `launchBtnText` | 按钮文字 | string | (可选)例如:`打开 App` |
109
+
110
+ ### 方法
111
+
112
+ | 方法 | 说明 | 类型 |
113
+ | :------------ | :------------ | :------------ |
114
+ | `start` | 生成 | function |
115
+ | `update` | 更新 | function |
116
+ | `destroy` | 销毁 | function |
117
+
118
+ ## FAQ
119
+
120
+ **1\. 为什么微信里面通过分享卡片能唤起,直接打开链接却无法唤起的?**
121
+
122
+ 截止 2023-08-10,只有微信 SDK 生成的卡片和服务号推送的消息才能唤起 App。
123
+
124
+ **2\. 如何修改按钮样式?**
125
+
126
+ 方法一(推荐):
127
+
128
+ 如官方所说,模版的样式是和页面隔离的,建议将此处透明的开放标签覆盖在原按钮上,这样就可以保留原按钮的样式,同时又可以实现点击跳转。
129
+
130
+ 方法二:
131
+
132
+ 通过 `launchBtnStyle` 参数添加内联样式,通过 `launchBtnText` 参数修改按钮文字。
133
+
134
+ **3\. 如何确保满足唤起的所有前置条件?**
135
+
136
+ (1)开放平台、服务号已认证,并且主体一致;
137
+
138
+ (2)开放平台绑定服务号;
139
+
140
+ (3)开放平台绑定移动应用,并且已认证;
141
+
142
+ (4)服务号绑定域名。
143
+
144
+ ## Contributing
145
+
146
+ ### Development Environment
147
+
148
+ | Dependencies | Version |
149
+ |------------|----------|
150
+ | Node.js | v14.21.3 |
151
+
152
+ ### Scripts
153
+
154
+ Install Dependencies:
155
+
156
+ ```bash
157
+ npm i
158
+ ```
159
+
160
+ Development:
161
+
162
+ ```bash
163
+ npm run dev
164
+ ```
165
+
166
+ Build:
167
+
168
+ ```bash
169
+ npm run build
170
+ ```
171
+
172
+ ## License
173
+
174
+ This software is released under the terms of the [MIT license](https://github.com/chengchuu/mazey-wechat-launch-app/blob/main/LICENSE).
package/lib/index.cjs.js CHANGED
@@ -1,6 +1,6 @@
1
1
  /*!
2
- * mazey-wechat-launch-app v2.3.3 https://www.npmjs.com/package/mazey-wechat-launch-app
2
+ * mazey-wechat-launch-app v2.3.5 https://www.npmjs.com/package/mazey-wechat-launch-app
3
3
  * (c) 2018-2025 Cheng
4
4
  * Released under the MIT License.
5
5
  */
6
- "use strict";var t=require("mazey"),e=require("jquery"),n=require("js-sha1");function r(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var o=r(e),i=r(n),a="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function c(t,e){return t(e={exports:{}},e.exports),e.exports}var u,f,l=function(t){return t&&t.Math==Math&&t},s=l("object"==typeof globalThis&&globalThis)||l("object"==typeof window&&window)||l("object"==typeof self&&self)||l("object"==typeof a&&a)||function(){return this}()||Function("return this")(),p=function(t){try{return!!t()}catch(t){return!0}},d=!p((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),h=!p((function(){var t=function(){}.bind();return"function"!=typeof t||t.hasOwnProperty("prototype")})),v=Function.prototype.call,y=h?v.bind(v):function(){return v.apply(v,arguments)},g={}.propertyIsEnumerable,m=Object.getOwnPropertyDescriptor,b=m&&!g.call({1:2},1)?function(t){var e=m(this,t);return!!e&&e.enumerable}:g,w={f:b},S=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}},A=Function.prototype,O=A.call,E=h&&A.bind.bind(O,O),P=h?E:function(t){return function(){return O.apply(t,arguments)}},T=P({}.toString),_=P("".slice),L=function(t){return _(T(t),8,-1)},j=Object,x=P("".split),C=p((function(){return!j("z").propertyIsEnumerable(0)}))?function(t){return"String"==L(t)?x(t,""):j(t)}:j,I=function(t){return null==t},k=TypeError,R=function(t){if(I(t))throw k("Can't call method on "+t);return t},N=function(t){return C(R(t))},M="object"==typeof document&&document.all,U={all:M,IS_HTMLDDA:void 0===M&&void 0!==M},D=U.all,H=U.IS_HTMLDDA?function(t){return"function"==typeof t||t===D}:function(t){return"function"==typeof t},B=U.all,W=U.IS_HTMLDDA?function(t){return"object"==typeof t?null!==t:H(t)||t===B}:function(t){return"object"==typeof t?null!==t:H(t)},F=function(t,e){return arguments.length<2?(n=s[t],H(n)?n:void 0):s[t]&&s[t][e];var n},z=P({}.isPrototypeOf),G="undefined"!=typeof navigator&&String(navigator.userAgent)||"",q=s.process,V=s.Deno,X=q&&q.versions||V&&V.version,J=X&&X.v8;J&&(f=(u=J.split("."))[0]>0&&u[0]<4?1:+(u[0]+u[1])),!f&&G&&(!(u=G.match(/Edge\/(\d+)/))||u[1]>=74)&&(u=G.match(/Chrome\/(\d+)/))&&(f=+u[1]);var Y=f,K=!!Object.getOwnPropertySymbols&&!p((function(){var t=Symbol();return!String(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&Y&&Y<41})),Q=K&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,$=Object,Z=Q?function(t){return"symbol"==typeof t}:function(t){var e=F("Symbol");return H(e)&&z(e.prototype,$(t))},tt=String,et=function(t){try{return tt(t)}catch(t){return"Object"}},nt=TypeError,rt=function(t){if(H(t))return t;throw nt(et(t)+" is not a function")},ot=function(t,e){var n=t[e];return I(n)?void 0:rt(n)},it=TypeError,at=Object.defineProperty,ct=function(t,e){try{at(s,t,{value:e,configurable:!0,writable:!0})}catch(n){s[t]=e}return e},ut="__core-js_shared__",ft=s[ut]||ct(ut,{}),lt=c((function(t){(t.exports=function(t,e){return ft[t]||(ft[t]=void 0!==e?e:{})})("versions",[]).push({version:"3.30.1",mode:"global",copyright:"© 2014-2023 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.30.1/LICENSE",source:"https://github.com/zloirock/core-js"})})),st=Object,pt=function(t){return st(R(t))},dt=P({}.hasOwnProperty),ht=Object.hasOwn||function(t,e){return dt(pt(t),e)},vt=0,yt=Math.random(),gt=P(1..toString),mt=function(t){return"Symbol("+(void 0===t?"":t)+")_"+gt(++vt+yt,36)},bt=s.Symbol,wt=lt("wks"),St=Q?bt.for||bt:bt&&bt.withoutSetter||mt,At=function(t){return ht(wt,t)||(wt[t]=K&&ht(bt,t)?bt[t]:St("Symbol."+t)),wt[t]},Ot=TypeError,Et=At("toPrimitive"),Pt=function(t,e){if(!W(t)||Z(t))return t;var n,r=ot(t,Et);if(r){if(void 0===e&&(e="default"),n=y(r,t,e),!W(n)||Z(n))return n;throw Ot("Can't convert object to primitive value")}return void 0===e&&(e="number"),function(t,e){var n,r;if("string"===e&&H(n=t.toString)&&!W(r=y(n,t)))return r;if(H(n=t.valueOf)&&!W(r=y(n,t)))return r;if("string"!==e&&H(n=t.toString)&&!W(r=y(n,t)))return r;throw it("Can't convert object to primitive value")}(t,e)},Tt=function(t){var e=Pt(t,"string");return Z(e)?e:e+""},_t=s.document,Lt=W(_t)&&W(_t.createElement),jt=function(t){return Lt?_t.createElement(t):{}},xt=!d&&!p((function(){return 7!=Object.defineProperty(jt("div"),"a",{get:function(){return 7}}).a})),Ct=Object.getOwnPropertyDescriptor,It={f:d?Ct:function(t,e){if(t=N(t),e=Tt(e),xt)try{return Ct(t,e)}catch(t){}if(ht(t,e))return S(!y(w.f,t,e),t[e])}},kt=d&&p((function(){return 42!=Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype})),Rt=String,Nt=TypeError,Mt=function(t){if(W(t))return t;throw Nt(Rt(t)+" is not an object")},Ut=TypeError,Dt=Object.defineProperty,Ht=Object.getOwnPropertyDescriptor,Bt="enumerable",Wt="configurable",Ft="writable",zt={f:d?kt?function(t,e,n){if(Mt(t),e=Tt(e),Mt(n),"function"==typeof t&&"prototype"===e&&"value"in n&&Ft in n&&!n[Ft]){var r=Ht(t,e);r&&r[Ft]&&(t[e]=n.value,n={configurable:Wt in n?n[Wt]:r[Wt],enumerable:Bt in n?n[Bt]:r[Bt],writable:!1})}return Dt(t,e,n)}:Dt:function(t,e,n){if(Mt(t),e=Tt(e),Mt(n),xt)try{return Dt(t,e,n)}catch(t){}if("get"in n||"set"in n)throw Ut("Accessors not supported");return"value"in n&&(t[e]=n.value),t}},Gt=d?function(t,e,n){return zt.f(t,e,S(1,n))}:function(t,e,n){return t[e]=n,t},qt=Function.prototype,Vt=d&&Object.getOwnPropertyDescriptor,Xt=ht(qt,"name"),Jt={EXISTS:Xt,PROPER:Xt&&"something"===function(){}.name,CONFIGURABLE:Xt&&(!d||d&&Vt(qt,"name").configurable)},Yt=P(Function.toString);H(ft.inspectSource)||(ft.inspectSource=function(t){return Yt(t)});var Kt,Qt,$t,Zt=ft.inspectSource,te=s.WeakMap,ee=H(te)&&/native code/.test(String(te)),ne=lt("keys"),re=function(t){return ne[t]||(ne[t]=mt(t))},oe={},ie="Object already initialized",ae=s.TypeError,ce=s.WeakMap;if(ee||ft.state){var ue=ft.state||(ft.state=new ce);ue.get=ue.get,ue.has=ue.has,ue.set=ue.set,Kt=function(t,e){if(ue.has(t))throw ae(ie);return e.facade=t,ue.set(t,e),e},Qt=function(t){return ue.get(t)||{}},$t=function(t){return ue.has(t)}}else{var fe=re("state");oe[fe]=!0,Kt=function(t,e){if(ht(t,fe))throw ae(ie);return e.facade=t,Gt(t,fe,e),e},Qt=function(t){return ht(t,fe)?t[fe]:{}},$t=function(t){return ht(t,fe)}}var le={set:Kt,get:Qt,has:$t,enforce:function(t){return $t(t)?Qt(t):Kt(t,{})},getterFor:function(t){return function(e){var n;if(!W(e)||(n=Qt(e)).type!==t)throw ae("Incompatible receiver, "+t+" required");return n}}},se=c((function(t){var e=Jt.CONFIGURABLE,n=le.enforce,r=le.get,o=String,i=Object.defineProperty,a=P("".slice),c=P("".replace),u=P([].join),f=d&&!p((function(){return 8!==i((function(){}),"length",{value:8}).length})),l=String(String).split("String"),s=t.exports=function(t,r,s){"Symbol("===a(o(r),0,7)&&(r="["+c(o(r),/^Symbol\(([^)]*)\)/,"$1")+"]"),s&&s.getter&&(r="get "+r),s&&s.setter&&(r="set "+r),(!ht(t,"name")||e&&t.name!==r)&&(d?i(t,"name",{value:r,configurable:!0}):t.name=r),f&&s&&ht(s,"arity")&&t.length!==s.arity&&i(t,"length",{value:s.arity});try{s&&ht(s,"constructor")&&s.constructor?d&&i(t,"prototype",{writable:!1}):t.prototype&&(t.prototype=void 0)}catch(t){}var p=n(t);return ht(p,"source")||(p.source=u(l,"string"==typeof r?r:"")),t};Function.prototype.toString=s((function(){return H(this)&&r(this).source||Zt(this)}),"toString")})),pe=function(t,e,n,r){r||(r={});var o=r.enumerable,i=void 0!==r.name?r.name:e;if(H(n)&&se(n,i,r),r.global)o?t[e]=n:ct(e,n);else{try{r.unsafe?t[e]&&(o=!0):delete t[e]}catch(t){}o?t[e]=n:zt.f(t,e,{value:n,enumerable:!1,configurable:!r.nonConfigurable,writable:!r.nonWritable})}return t},de=Math.ceil,he=Math.floor,ve=Math.trunc||function(t){var e=+t;return(e>0?he:de)(e)},ye=function(t){var e=+t;return e!=e||0===e?0:ve(e)},ge=Math.max,me=Math.min,be=Math.min,we=function(t){return(e=t.length)>0?be(ye(e),9007199254740991):0;var e},Se=function(t){return function(e,n,r){var o,i=N(e),a=we(i),c=function(t,e){var n=ye(t);return n<0?ge(n+e,0):me(n,e)}(r,a);if(t&&n!=n){for(;a>c;)if((o=i[c++])!=o)return!0}else for(;a>c;c++)if((t||c in i)&&i[c]===n)return t||c||0;return!t&&-1}},Ae={includes:Se(!0),indexOf:Se(!1)}.indexOf,Oe=P([].push),Ee=function(t,e){var n,r=N(t),o=0,i=[];for(n in r)!ht(oe,n)&&ht(r,n)&&Oe(i,n);for(;e.length>o;)ht(r,n=e[o++])&&(~Ae(i,n)||Oe(i,n));return i},Pe=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],Te=Pe.concat("length","prototype"),_e={f:Object.getOwnPropertyNames||function(t){return Ee(t,Te)}},Le={f:Object.getOwnPropertySymbols},je=P([].concat),xe=F("Reflect","ownKeys")||function(t){var e=_e.f(Mt(t)),n=Le.f;return n?je(e,n(t)):e},Ce=function(t,e,n){for(var r=xe(e),o=zt.f,i=It.f,a=0;a<r.length;a++){var c=r[a];ht(t,c)||n&&ht(n,c)||o(t,c,i(e,c))}},Ie=/#|\.prototype\./,ke=function(t,e){var n=Ne[Re(t)];return n==Ue||n!=Me&&(H(e)?p(e):!!e)},Re=ke.normalize=function(t){return String(t).replace(Ie,".").toLowerCase()},Ne=ke.data={},Me=ke.NATIVE="N",Ue=ke.POLYFILL="P",De=ke,He=It.f,Be=function(t,e){var n,r,o,i,a,c=t.target,u=t.global,f=t.stat;if(n=u?s:f?s[c]||ct(c,{}):(s[c]||{}).prototype)for(r in e){if(i=e[r],o=t.dontCallGetSet?(a=He(n,r))&&a.value:n[r],!De(u?r:c+(f?".":"#")+r,t.forced)&&void 0!==o){if(typeof i==typeof o)continue;Ce(i,o)}(t.sham||o&&o.sham)&&Gt(i,"sham",!0),pe(n,r,i,t)}},We=Object.keys||function(t){return Ee(t,Pe)},Fe=Object.assign,ze=Object.defineProperty,Ge=P([].concat),qe=!Fe||p((function(){if(d&&1!==Fe({b:1},Fe(ze({},"a",{enumerable:!0,get:function(){ze(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var t={},e={},n=Symbol(),r="abcdefghijklmnopqrst";return t[n]=7,r.split("").forEach((function(t){e[t]=t})),7!=Fe({},t)[n]||We(Fe({},e)).join("")!=r}))?function(t,e){for(var n=pt(t),r=arguments.length,o=1,i=Le.f,a=w.f;r>o;)for(var c,u=C(arguments[o++]),f=i?Ge(We(u),i(u)):We(u),l=f.length,s=0;l>s;)c=f[s++],d&&!y(a,u,c)||(n[c]=u[c]);return n}:Fe;Be({target:"Object",stat:!0,arity:2,forced:Object.assign!==qe},{assign:qe});var Ve=Array.isArray||function(t){return"Array"==L(t)},Xe=TypeError,Je=function(t){if(t>9007199254740991)throw Xe("Maximum allowed index exceeded");return t},Ye=function(t,e,n){var r=Tt(e);r in t?zt.f(t,r,S(0,n)):t[r]=n},Ke={};Ke[At("toStringTag")]="z";var Qe="[object z]"===String(Ke),$e=At("toStringTag"),Ze=Object,tn="Arguments"==L(function(){return arguments}()),en=Qe?L:function(t){var e,n,r;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(n=function(t,e){try{return t[e]}catch(t){}}(e=Ze(t),$e))?n:tn?L(e):"Object"==(r=L(e))&&H(e.callee)?"Arguments":r},nn=function(){},rn=[],on=F("Reflect","construct"),an=/^\s*(?:class|function)\b/,cn=P(an.exec),un=!an.exec(nn),fn=function(t){if(!H(t))return!1;try{return on(nn,rn,t),!0}catch(t){return!1}},ln=function(t){if(!H(t))return!1;switch(en(t)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return un||!!cn(an,Zt(t))}catch(t){return!0}};ln.sham=!0;var sn,pn=!on||p((function(){var t;return fn(fn.call)||!fn(Object)||!fn((function(){t=!0}))||t}))?ln:fn,dn=At("species"),hn=Array,vn=function(t,e){return new(function(t){var e;return Ve(t)&&(e=t.constructor,(pn(e)&&(e===hn||Ve(e.prototype))||W(e)&&null===(e=e[dn]))&&(e=void 0)),void 0===e?hn:e}(t))(0===e?0:e)},yn=At("species"),gn=At("isConcatSpreadable"),mn=Y>=51||!p((function(){var t=[];return t[gn]=!1,t.concat()[0]!==t})),bn=function(t){if(!W(t))return!1;var e=t[gn];return void 0!==e?!!e:Ve(t)},wn=!(mn&&(sn="concat",Y>=51||!p((function(){var t=[];return(t.constructor={})[yn]=function(){return{foo:1}},1!==t[sn](Boolean).foo}))));Be({target:"Array",proto:!0,arity:1,forced:wn},{concat:function(t){var e,n,r,o,i,a=pt(this),c=vn(a,0),u=0;for(e=-1,r=arguments.length;e<r;e++)if(bn(i=-1===e?a:arguments[e]))for(o=we(i),Je(u+o),n=0;n<o;n++,u++)n in i&&Ye(c,u,i[n]);else Je(u+1),Ye(c,u++,i);return c.length=u,c}});var Sn,An=d&&!kt?Object.defineProperties:function(t,e){Mt(t);for(var n,r=N(e),o=We(e),i=o.length,a=0;i>a;)zt.f(t,n=o[a++],r[n]);return t},On={f:An},En=F("document","documentElement"),Pn="prototype",Tn="script",_n=re("IE_PROTO"),Ln=function(){},jn=function(t){return"<"+Tn+">"+t+"</"+Tn+">"},xn=function(t){t.write(jn("")),t.close();var e=t.parentWindow.Object;return t=null,e},Cn=function(){try{Sn=new ActiveXObject("htmlfile")}catch(t){}var t,e,n;Cn="undefined"!=typeof document?document.domain&&Sn?xn(Sn):(e=jt("iframe"),n="java"+Tn+":",e.style.display="none",En.appendChild(e),e.src=String(n),(t=e.contentWindow.document).open(),t.write(jn("document.F=Object")),t.close(),t.F):xn(Sn);for(var r=Pe.length;r--;)delete Cn[Pn][Pe[r]];return Cn()};oe[_n]=!0;var In=Object.create||function(t,e){var n;return null!==t?(Ln[Pn]=Mt(t),n=new Ln,Ln[Pn]=null,n[_n]=t):n=Cn(),void 0===e?n:On.f(n,e)},kn=zt.f,Rn=At("unscopables"),Nn=Array.prototype;null==Nn[Rn]&&kn(Nn,Rn,{configurable:!0,value:In(null)});var Mn,Un,Dn,Hn=function(t){Nn[Rn][t]=!0},Bn={},Wn=!p((function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype})),Fn=re("IE_PROTO"),zn=Object,Gn=zn.prototype,qn=Wn?zn.getPrototypeOf:function(t){var e=pt(t);if(ht(e,Fn))return e[Fn];var n=e.constructor;return H(n)&&e instanceof n?n.prototype:e instanceof zn?Gn:null},Vn=At("iterator"),Xn=!1;[].keys&&("next"in(Dn=[].keys())?(Un=qn(qn(Dn)))!==Object.prototype&&(Mn=Un):Xn=!0);var Jn=!W(Mn)||p((function(){var t={};return Mn[Vn].call(t)!==t}));Jn&&(Mn={}),H(Mn[Vn])||pe(Mn,Vn,(function(){return this}));var Yn={IteratorPrototype:Mn,BUGGY_SAFARI_ITERATORS:Xn},Kn=zt.f,Qn=At("toStringTag"),$n=function(t,e,n){t&&!n&&(t=t.prototype),t&&!ht(t,Qn)&&Kn(t,Qn,{configurable:!0,value:e})},Zn=Yn.IteratorPrototype,tr=function(){return this},er=String,nr=TypeError,rr=Object.setPrototypeOf||("__proto__"in{}?function(){var t,e=!1,n={};try{t=function(t,e,n){try{return P(rt(Object.getOwnPropertyDescriptor(t,e)[n]))}catch(t){}}(Object.prototype,"__proto__","set"),t(n,[]),e=n instanceof Array}catch(t){}return function(n,r){return Mt(n),function(t){if("object"==typeof t||H(t))return t;throw nr("Can't set "+er(t)+" as a prototype")}(r),e?t(n,r):n.__proto__=r,n}}():void 0),or=Jt.PROPER,ir=Jt.CONFIGURABLE,ar=Yn.IteratorPrototype,cr=Yn.BUGGY_SAFARI_ITERATORS,ur=At("iterator"),fr="keys",lr="values",sr="entries",pr=function(){return this},dr=function(t,e,n,r,o,i,a){!function(t,e,n,r){var o=e+" Iterator";t.prototype=In(Zn,{next:S(+!r,n)}),$n(t,o,!1),Bn[o]=tr}(n,e,r);var c,u,f,l=function(t){if(t===o&&v)return v;if(!cr&&t in d)return d[t];switch(t){case fr:case lr:case sr:return function(){return new n(this,t)}}return function(){return new n(this)}},s=e+" Iterator",p=!1,d=t.prototype,h=d[ur]||d["@@iterator"]||o&&d[o],v=!cr&&h||l(o),g="Array"==e&&d.entries||h;if(g&&(c=qn(g.call(new t)))!==Object.prototype&&c.next&&(qn(c)!==ar&&(rr?rr(c,ar):H(c[ur])||pe(c,ur,pr)),$n(c,s,!0)),or&&o==lr&&h&&h.name!==lr&&(ir?Gt(d,"name",lr):(p=!0,v=function(){return y(h,this)})),o)if(u={values:l(lr),keys:i?v:l(fr),entries:l(sr)},a)for(f in u)(cr||p||!(f in d))&&pe(d,f,u[f]);else Be({target:e,proto:!0,forced:cr||p},u);return d[ur]!==v&&pe(d,ur,v,{name:o}),Bn[e]=v,u},hr=function(t,e){return{value:t,done:e}},vr=zt.f,yr="Array Iterator",gr=le.set,mr=le.getterFor(yr),br=dr(Array,"Array",(function(t,e){gr(this,{type:yr,target:N(t),index:0,kind:e})}),(function(){var t=mr(this),e=t.target,n=t.kind,r=t.index++;return!e||r>=e.length?(t.target=void 0,hr(void 0,!0)):hr("keys"==n?r:"values"==n?e[r]:[r,e[r]],!1)}),"values"),wr=Bn.Arguments=Bn.Array;if(Hn("keys"),Hn("values"),Hn("entries"),d&&"values"!==wr.name)try{vr(wr,"name",{value:"values"})}catch(t){}var Sr=Qe?{}.toString:function(){return"[object "+en(this)+"]"};Qe||pe(Object.prototype,"toString",Sr,{unsafe:!0});var Ar,Or,Er,Pr,Tr="undefined"!=typeof process&&"process"==L(process),_r=At("species"),Lr=TypeError,jr=TypeError,xr=At("species"),Cr=function(t,e){var n,r=Mt(t).constructor;return void 0===r||I(n=Mt(r)[xr])?e:function(t){if(pn(t))return t;throw jr(et(t)+" is not a constructor")}(n)},Ir=Function.prototype,kr=Ir.apply,Rr=Ir.call,Nr="object"==typeof Reflect&&Reflect.apply||(h?Rr.bind(kr):function(){return Rr.apply(kr,arguments)}),Mr=function(t){if("Function"===L(t))return P(t)},Ur=Mr(Mr.bind),Dr=function(t,e){return rt(t),void 0===e?t:h?Ur(t,e):function(){return t.apply(e,arguments)}},Hr=P([].slice),Br=TypeError,Wr=/(?:ipad|iphone|ipod).*applewebkit/i.test(G),Fr=s.setImmediate,zr=s.clearImmediate,Gr=s.process,qr=s.Dispatch,Vr=s.Function,Xr=s.MessageChannel,Jr=s.String,Yr=0,Kr={},Qr="onreadystatechange";p((function(){Ar=s.location}));var $r=function(t){if(ht(Kr,t)){var e=Kr[t];delete Kr[t],e()}},Zr=function(t){return function(){$r(t)}},to=function(t){$r(t.data)},eo=function(t){s.postMessage(Jr(t),Ar.protocol+"//"+Ar.host)};Fr&&zr||(Fr=function(t){!function(t,e){if(t<e)throw Br("Not enough arguments")}(arguments.length,1);var e=H(t)?t:Vr(t),n=Hr(arguments,1);return Kr[++Yr]=function(){Nr(e,void 0,n)},Or(Yr),Yr},zr=function(t){delete Kr[t]},Tr?Or=function(t){Gr.nextTick(Zr(t))}:qr&&qr.now?Or=function(t){qr.now(Zr(t))}:Xr&&!Wr?(Pr=(Er=new Xr).port2,Er.port1.onmessage=to,Or=Dr(Pr.postMessage,Pr)):s.addEventListener&&H(s.postMessage)&&!s.importScripts&&Ar&&"file:"!==Ar.protocol&&!p(eo)?(Or=eo,s.addEventListener("message",to,!1)):Or=Qr in jt("script")?function(t){En.appendChild(jt("script"))[Qr]=function(){En.removeChild(this),$r(t)}}:function(t){setTimeout(Zr(t),0)});var no={set:Fr,clear:zr},ro=function(){this.head=null,this.tail=null};ro.prototype={add:function(t){var e={item:t,next:null},n=this.tail;n?n.next=e:this.head=e,this.tail=e},get:function(){var t=this.head;if(t)return null===(this.head=t.next)&&(this.tail=null),t.item}};var oo,io,ao,co,uo,fo=ro,lo=/ipad|iphone|ipod/i.test(G)&&"undefined"!=typeof Pebble,so=/web0s(?!.*chrome)/i.test(G),po=It.f,ho=no.set,vo=s.MutationObserver||s.WebKitMutationObserver,yo=s.document,go=s.process,mo=s.Promise,bo=po(s,"queueMicrotask"),wo=bo&&bo.value;if(!wo){var So=new fo,Ao=function(){var t,e;for(Tr&&(t=go.domain)&&t.exit();e=So.get();)try{e()}catch(t){throw So.head&&oo(),t}t&&t.enter()};Wr||Tr||so||!vo||!yo?!lo&&mo&&mo.resolve?((co=mo.resolve(void 0)).constructor=mo,uo=Dr(co.then,co),oo=function(){uo(Ao)}):Tr?oo=function(){go.nextTick(Ao)}:(ho=Dr(ho,s),oo=function(){ho(Ao)}):(io=!0,ao=yo.createTextNode(""),new vo(Ao).observe(ao,{characterData:!0}),oo=function(){ao.data=io=!io}),wo=function(t){So.head||oo(),So.add(t)}}var Oo=wo,Eo=function(t){try{return{error:!1,value:t()}}catch(t){return{error:!0,value:t}}},Po=s.Promise,To="object"==typeof Deno&&Deno&&"object"==typeof Deno.version,_o=!To&&!Tr&&"object"==typeof window&&"object"==typeof document;Po&&Po.prototype;var Lo,jo,xo,Co,Io,ko,Ro,No=At("species"),Mo=!1,Uo=H(s.PromiseRejectionEvent),Do=De("Promise",(function(){var t=Zt(Po),e=t!==String(Po);if(!e&&66===Y)return!0;if(!Y||Y<51||!/native code/.test(t)){var n=new Po((function(t){t(1)})),r=function(t){t((function(){}),(function(){}))};if((n.constructor={})[No]=r,!(Mo=n.then((function(){}))instanceof r))return!0}return!e&&(_o||To)&&!Uo})),Ho={CONSTRUCTOR:Do,REJECTION_EVENT:Uo,SUBCLASSING:Mo},Bo=TypeError,Wo=function(t){var e,n;this.promise=new t((function(t,r){if(void 0!==e||void 0!==n)throw Bo("Bad Promise constructor");e=t,n=r})),this.resolve=rt(e),this.reject=rt(n)},Fo={f:function(t){return new Wo(t)}},zo=no.set,Go="Promise",qo=Ho.CONSTRUCTOR,Vo=Ho.REJECTION_EVENT,Xo=Ho.SUBCLASSING,Jo=le.getterFor(Go),Yo=le.set,Ko=Po&&Po.prototype,Qo=Po,$o=Ko,Zo=s.TypeError,ti=s.document,ei=s.process,ni=Fo.f,ri=ni,oi=!!(ti&&ti.createEvent&&s.dispatchEvent),ii="unhandledrejection",ai=function(t){var e;return!(!W(t)||!H(e=t.then))&&e},ci=function(t,e){var n,r,o,i=e.value,a=1==e.state,c=a?t.ok:t.fail,u=t.resolve,f=t.reject,l=t.domain;try{c?(a||(2===e.rejection&&pi(e),e.rejection=1),!0===c?n=i:(l&&l.enter(),n=c(i),l&&(l.exit(),o=!0)),n===t.promise?f(Zo("Promise-chain cycle")):(r=ai(n))?y(r,n,u,f):u(n)):f(i)}catch(t){l&&!o&&l.exit(),f(t)}},ui=function(t,e){t.notified||(t.notified=!0,Oo((function(){for(var n,r=t.reactions;n=r.get();)ci(n,t);t.notified=!1,e&&!t.rejection&&li(t)})))},fi=function(t,e,n){var r,o;oi?((r=ti.createEvent("Event")).promise=e,r.reason=n,r.initEvent(t,!1,!0),s.dispatchEvent(r)):r={promise:e,reason:n},!Vo&&(o=s["on"+t])?o(r):t===ii&&function(t,e){try{1==arguments.length?console.error(t):console.error(t,e)}catch(t){}}("Unhandled promise rejection",n)},li=function(t){y(zo,s,(function(){var e,n=t.facade,r=t.value;if(si(t)&&(e=Eo((function(){Tr?ei.emit("unhandledRejection",r,n):fi(ii,n,r)})),t.rejection=Tr||si(t)?2:1,e.error))throw e.value}))},si=function(t){return 1!==t.rejection&&!t.parent},pi=function(t){y(zo,s,(function(){var e=t.facade;Tr?ei.emit("rejectionHandled",e):fi("rejectionhandled",e,t.value)}))},di=function(t,e,n){return function(r){t(e,r,n)}},hi=function(t,e,n){t.done||(t.done=!0,n&&(t=n),t.value=e,t.state=2,ui(t,!0))},vi=function(t,e,n){if(!t.done){t.done=!0,n&&(t=n);try{if(t.facade===e)throw Zo("Promise can't be resolved itself");var r=ai(e);r?Oo((function(){var n={done:!1};try{y(r,e,di(vi,n,t),di(hi,n,t))}catch(e){hi(n,e,t)}})):(t.value=e,t.state=1,ui(t,!1))}catch(e){hi({done:!1},e,t)}}};if(qo&&($o=(Qo=function(t){!function(t,e){if(z(e,t))return t;throw Lr("Incorrect invocation")}(this,$o),rt(t),y(Lo,this);var e=Jo(this);try{t(di(vi,e),di(hi,e))}catch(t){hi(e,t)}}).prototype,(Lo=function(t){Yo(this,{type:Go,done:!1,notified:!1,parent:!1,reactions:new fo,rejection:!1,state:0,value:void 0})}).prototype=pe($o,"then",(function(t,e){var n=Jo(this),r=ni(Cr(this,Qo));return n.parent=!0,r.ok=!H(t)||t,r.fail=H(e)&&e,r.domain=Tr?ei.domain:void 0,0==n.state?n.reactions.add(r):Oo((function(){ci(r,n)})),r.promise})),jo=function(){var t=new Lo,e=Jo(t);this.promise=t,this.resolve=di(vi,e),this.reject=di(hi,e)},Fo.f=ni=function(t){return t===Qo||undefined===t?new jo(t):ri(t)},H(Po)&&Ko!==Object.prototype)){xo=Ko.then,Xo||pe(Ko,"then",(function(t,e){var n=this;return new Qo((function(t,e){y(xo,n,t,e)})).then(t,e)}),{unsafe:!0});try{delete Ko.constructor}catch(t){}rr&&rr(Ko,$o)}Be({global:!0,constructor:!0,wrap:!0,forced:qo},{Promise:Qo}),$n(Qo,Go,!1),Ro=F(Go),d&&Ro&&!Ro[_r]&&(Co=Ro,Io=_r,(ko={configurable:!0,get:function(){return this}}).get&&se(ko.get,Io,{getter:!0}),ko.set&&se(ko.set,Io,{setter:!0}),zt.f(Co,Io,ko));var yi=At("iterator"),gi=Array.prototype,mi=At("iterator"),bi=function(t){if(!I(t))return ot(t,mi)||ot(t,"@@iterator")||Bn[en(t)]},wi=TypeError,Si=function(t,e,n){var r,o;Mt(t);try{if(!(r=ot(t,"return"))){if("throw"===e)throw n;return n}r=y(r,t)}catch(t){o=!0,r=t}if("throw"===e)throw n;if(o)throw r;return Mt(r),n},Ai=TypeError,Oi=function(t,e){this.stopped=t,this.result=e},Ei=Oi.prototype,Pi=function(t,e,n){var r,o,i,a,c,u,f,l,s=n&&n.that,p=!(!n||!n.AS_ENTRIES),d=!(!n||!n.IS_RECORD),h=!(!n||!n.IS_ITERATOR),v=!(!n||!n.INTERRUPTED),g=Dr(e,s),m=function(t){return r&&Si(r,"normal",t),new Oi(!0,t)},b=function(t){return p?(Mt(t),v?g(t[0],t[1],m):g(t[0],t[1])):v?g(t,m):g(t)};if(d)r=t.iterator;else if(h)r=t;else{if(!(o=bi(t)))throw Ai(et(t)+" is not iterable");if(void 0!==(l=o)&&(Bn.Array===l||gi[yi]===l)){for(i=0,a=we(t);a>i;i++)if((c=b(t[i]))&&z(Ei,c))return c;return new Oi(!1)}r=function(t,e){var n=arguments.length<2?bi(t):e;if(rt(n))return Mt(y(n,t));throw wi(et(t)+" is not iterable")}(t,o)}for(u=d?t.next:r.next;!(f=y(u,r)).done;){try{c=b(f.value)}catch(t){Si(r,"throw",t)}if("object"==typeof c&&c&&z(Ei,c))return c}return new Oi(!1)},Ti=At("iterator"),_i=!1;try{var Li=0,ji={next:function(){return{done:!!Li++}},return:function(){_i=!0}};ji[Ti]=function(){return this},Array.from(ji,(function(){throw 2}))}catch(t){}var xi=Ho.CONSTRUCTOR||!function(t,e){if(!e&&!_i)return!1;var n=!1;try{var r={};r[Ti]=function(){return{next:function(){return{done:n=!0}}}},t(r)}catch(t){}return n}((function(t){Po.all(t).then(void 0,(function(){}))}));Be({target:"Promise",stat:!0,forced:xi},{all:function(t){var e=this,n=Fo.f(e),r=n.resolve,o=n.reject,i=Eo((function(){var n=rt(e.resolve),i=[],a=0,c=1;Pi(t,(function(t){var u=a++,f=!1;c++,y(n,e,t).then((function(t){f||(f=!0,i[u]=t,--c||r(i))}),o)})),--c||r(i)}));return i.error&&o(i.value),n.promise}});var Ci=Ho.CONSTRUCTOR,Ii=Po&&Po.prototype;if(Be({target:"Promise",proto:!0,forced:Ci,real:!0},{catch:function(t){return this.then(void 0,t)}}),H(Po)){var ki=F("Promise").prototype.catch;Ii.catch!==ki&&pe(Ii,"catch",ki,{unsafe:!0})}Be({target:"Promise",stat:!0,forced:xi},{race:function(t){var e=this,n=Fo.f(e),r=n.reject,o=Eo((function(){var o=rt(e.resolve);Pi(t,(function(t){y(o,e,t).then(n.resolve,r)}))}));return o.error&&r(o.value),n.promise}}),Be({target:"Promise",stat:!0,forced:Ho.CONSTRUCTOR},{reject:function(t){var e=Fo.f(this);return y(e.reject,void 0,t),e.promise}});var Ri=Ho.CONSTRUCTOR;F("Promise"),Be({target:"Promise",stat:!0,forced:Ri},{resolve:function(t){return function(t,e){if(Mt(t),W(e)&&e.constructor===t)return e;var n=Fo.f(t);return(0,n.resolve)(e),n.promise}(this,t)}});var Ni=String,Mi=function(t){if("Symbol"===en(t))throw TypeError("Cannot convert a Symbol value to a string");return Ni(t)},Ui=P("".charAt),Di=P("".charCodeAt),Hi=P("".slice),Bi=function(t){return function(e,n){var r,o,i=Mi(R(e)),a=ye(n),c=i.length;return a<0||a>=c?t?"":void 0:(r=Di(i,a))<55296||r>56319||a+1===c||(o=Di(i,a+1))<56320||o>57343?t?Ui(i,a):r:t?Hi(i,a,a+2):o-56320+(r-55296<<10)+65536}},Wi={codeAt:Bi(!1),charAt:Bi(!0)}.charAt,Fi="String Iterator",zi=le.set,Gi=le.getterFor(Fi);dr(String,"String",(function(t){zi(this,{type:Fi,string:Mi(t),index:0})}),(function(){var t,e=Gi(this),n=e.string,r=e.index;return r>=n.length?hr(void 0,!0):(t=Wi(n,r),e.index+=t.length,hr(t,!1))}));var qi={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0},Vi=jt("span").classList,Xi=Vi&&Vi.constructor&&Vi.constructor.prototype,Ji=Xi===Object.prototype?void 0:Xi,Yi=At("iterator"),Ki=At("toStringTag"),Qi=br.values,$i=function(t,e){if(t){if(t[Yi]!==Qi)try{Gt(t,Yi,Qi)}catch(e){t[Yi]=Qi}if(t[Ki]||Gt(t,Ki,e),qi[e])for(var n in br)if(t[n]!==br[n])try{Gt(t,n,br[n])}catch(e){t[n]=br[n]}}};for(var Zi in qi)$i(s[Zi]&&s[Zi].prototype,Zi);$i(Ji,"DOMTokenList");var ta=function(){return ta=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},ta.apply(this,arguments)},ea={weixinJsSdkTicket:"",launchContainerQuery:".mazey-launch-app-selector",launchShowWeixinToBrowserImgUrl:"",canShowWeixinToBrowser:!1,extInfo:"",serviceAccountAppId:"",wexinServiceAccountAppId:"",openPlatformMobileAppId:"",genTagPrefixStr:"mazey-launch-app-btn-prefix-",launchShowWeixinToBrowserClassName:"mazey-launch-app-wx-to-browser",launchBtnClassName:"mazey-launch-app-inner-btn",launchBtnStyle:"",launchBtnText:"Launch App <br /><br /><br />",launchErrorLink:"",canContinuousUpdating:!1,onMenuShareTimelineOptions:void 0,onMenuShareAppMessageOptions:void 0,isConClosed:!0,isWxDebug:!1,openTagList:["wx-open-launch-app"],canLaunchApp:function(){return!0},canFireErrorLinkDirectly:function(){return!1},launchBtnClick:function(){},launchReady:function(){}};module.exports=function(e){void 0===e&&(e=ea);var n=Object.assign(ea,e),r=n.weixinJsSdkTicket,a=n.launchContainerQuery,c=n.genTagPrefixStr,u=n.launchShowWeixinToBrowserImgUrl,f=n.canShowWeixinToBrowser,l=n.launchShowWeixinToBrowserClassName,s=n.launchBtnClassName,p=n.launchBtnStyle,d=n.launchBtnText,h=n.launchErrorLink,v=n.wexinServiceAccountAppId,y=n.openPlatformMobileAppId,g=n.canContinuousUpdating,m=n.onMenuShareTimelineOptions,b=n.onMenuShareAppMessageOptions,w=n.isConClosed,S=n.isWxDebug,A=n.openTagList,O=n.canLaunchApp,E=n.canFireErrorLinkDirectly,P=n.launchBtnClick,T=n.launchReady,_=n.serviceAccountAppId,L=n.extInfo,j=t.genCustomConsole("LaunchCon:",{isClosed:w}),x=window.wx;x||console.error("Launch App: wx is not found");var C=function(){};j.log("Launch App");var I={title:"",link:"",imgUrl:"",success:function(){},cancel:function(){}},k={title:"",desc:"",link:"",imgUrl:"",type:"",dataUrl:"",success:function(){},cancel:function(){}},R={title:document.title,link:location.href};I=ta(ta({},I),R),k=ta(ta({},k),R);var N=function(t,e,n){return void 0===t&&(t=""),void 0===e&&(e=""),void 0===n&&(n="button"),"<style>.".concat(s,"{")+"opacity: 0;width: 100%;height: 100%;backgroud: transparent;color: #300f54;border: none;box-sizing: border-box;text-align: center;vertical-align: middle;"+p+e+"}</style>"+"<".concat(n,' class="').concat(s,'"')+(t&&"button"===n?' onclick="'.concat(t,'"'):"")+(t&&"a"===n?' target="_self" href="'.concat(t,'"'):"")+">"+d+"</".concat(n,">")},M=N();function U(){t.addStyle('.mazey-launch-app-mask{position:fixed;top:0;right:0;bottom:0;left:0;background-color:rgba(0, 0, 0, .5);text-align:right;font-size:0;white-space:nowrap;overflow:auto;z-index:999;}.mazey-launch-app-img{display:inline-block;vertical-align:middle;text-align:left;font-size:14px;white-space:normal;width:50vw;margin:0.5rem 0.5rem 0 0;}.mazey-launch-app-img:after{content:"";display:inline-block;height:100%;vertical-align:middle;}',{id:"mazey-launch-app-mask-style"}),window.LAUNCH_APP_HIDE_WEIXIN_BROWSER||(window.LAUNCH_APP_HIDE_WEIXIN_BROWSER=function(){o.default(".mazey-launch-app-mask").hide()}),0===o.default(".mazey-launch-app-mask").length?o.default("body").append("<div class='mazey-launch-app-mask' onclick='window.LAUNCH_APP_HIDE_WEIXIN_BROWSER()'><img "+"class='mazey-launch-app-img ".concat(l,"' ")+"src='".concat(u,"' ")+"alt='Launch App' /></div>"):o.default(".mazey-launch-app-mask").show()}function D(){j.log("renderWeixinLaunchTemplate"),!_&&v&&(console.warn("wexinServiceAccountAppId will be deprecated, use serviceAccountAppId instead."),_=v),function(e,n){void 0===e&&(e=""),void 0===n&&(n=""),j.log("renderWXOpenLaunchApp"),Promise.all([Promise.resolve(r||window.LAUNCH_APP_WEIXIN_JS_SDK_TICKET||t.getQueryParam("weixinJsSdkTicket")||""),Promise.resolve(i.default)]).then((function(r){j.log("allRes",r);var i=r[0];if(i){var u=r[1];if(u){var l=t.generateRndNum(7),s=i,p=(new Date).getTime(),d=u("jsapi_ticket="+s+"&noncestr="+l+"&timestamp="+p+"&url="+location.href);return x.config({debug:S,appId:e,timestamp:p,nonceStr:l,signature:d,jsApiList:["showOptionMenu","onMenuShareTimeline","onMenuShareAppMessage"],openTagList:A}),x.ready((function(){if(b&&(j.log("onMenuShareAppMessageOptions",b),x.onMenuShareAppMessage(b)),window.LAUNCH_APP_SHARE_APP_MESSAGE=function(t){t=ta(ta({},k),t),j.log("window LAUNCH_APP_SHARE_APP_MESSAGE",t),x.onMenuShareAppMessage(t)},m&&(j.log("onMenuShareTimelineOptions",m),x.onMenuShareTimeline(m)),window.LAUNCH_APP_SHARE_TIMELINE=function(t){t=ta(ta({},I),t),j.log("window LAUNCH_APP_SHARE_TIMELINE",t),x.onMenuShareTimeline(t)},n){window.LAUNCH_APP_READY=!0,T&&T();var t=function(){var t=o.default(a);j.log("containers",a,t,t.length),t.length>0&&t.each((function(t,e){var r=o.default(e).attr("data-launch-app-key");if(!r){var i=o.default(e).parents("[data-launch-app-key]:eq(0)");i.length>0&&(r=i.attr("data-launch-app-key"),j.log("keyEle",i,r))}r||(r=String(t));var a="mazey-launch-app-tag-".concat(r),u=o.default(".".concat(a," wx-open-launch-app")),l=o.default(e).attr("data-launch-app-ext-info");if(!l){var s=o.default(e).parents("[data-launch-app-ext-info]:eq(0)");s.length>0&&(l=s.attr("data-launch-app-ext-info"),j.log("eleExtInfoEle parents",s,l))}l&&(L=l);var p=o.default(e).attr("data-launch-app-error-link");if(!p){var d=o.default(e).parents("[data-launch-app-error-link]:eq(0)");d.length>0&&(p=d.attr("data-launch-app-error-link"),j.log("eleErrorLinkEle parents",d,p))}var v=h;p&&(v=p),0===u.length&&(o.default(e).addClass(a),j.log("success:",a),function(t){var e=c,r=e+t,i="<wx-open-launch-app id='"+r+"' appid='"+n+"' extinfo='".concat(L)+"' style='z-index:99;position:absolute;width:100%;height:100%;opacity:1;background:transparent;overflow:hidden;left:0;'><script type='text/wxtag-template'>"+M+"<\/script></wx-open-launch-app>";o.default("."+t+":eq(0)").append(i);var a=document.getElementById(r);a&&(a.addEventListener("ready",(function(t){j.log("ready event",t)})),a.addEventListener("launch",(function(t){j.log("launch event",t),t.detail&&t.detail.extInfo&&j.log("launch extInfo",t.detail.extInfo)})),a.addEventListener("error",(function(t){j.error(t.detail),o.default("[id^='"+e+"']").hide(),f&&U(),v&&(j.log("realErrorLink",v),location.href=v)})),a.addEventListener("click",(function(t){j.log("click event",t),P&&P()})))}(a))}))};t(),C=t}else j.log("openPlatformMobileAppId is required for weixin launch app")})),x.error((function(t){j.error(t)})),"success:launch_app"}j.error("sha1 is required")}else j.error("weixinJsSdkTicket is required")})).catch((function(t){j.error(t)}))}(_,y)}function H(t){if(j.log("appUpdated",t),!window.LAUNCH_APP_LOAD&&O(t)&&(D(),window.LAUNCH_APP_LOAD=!0),g&&window.LAUNCH_APP_LOAD&&O(t)&&C(),E()){var e=o.default(a);e.length>0&&e.each((function(t,e){var n=o.default(e).children("."+s);if(!n||!n.length){var r=o.default(e).attr("data-launch-app-error-link");if(!r){var i=o.default(e).parents("[data-launch-app-error-link]:eq(0)");i.length>0&&(r=i.attr("data-launch-app-error-link"))}if(r&&"string"==typeof r&&r.length){var a=N(r,"position:absolute;left:0;z-index:999;","a");o.default(e).append(a)}}}))}}function B(){j.log("appBeforeDestroy",B),window.LAUNCH_APP_LOAD=null,window.LAUNCH_APP_HIDE_WEIXIN_BROWSER=null}return window.LAUNCH_APP_UPDATE=H,window.LAUNCH_APP_BEFORE_DESTROY=B,window.LAUNCH_APP_SHOW_WEIXIN_TO_BROWSER=U,{LAUNCH_APP_UPDATE:H,LAUNCH_APP_BEFORE_DESTROY:B,LAUNCH_APP_SHOW_WEIXIN_TO_BROWSER:U,LAUNCH_APP_SHARE_TIMELINE:function(t){j.log("opt",t)},LAUNCH_APP_SHARE_APP_MESSAGE:function(t){j.log("opt",t)},start:H,update:H,destroy:B}};
6
+ "use strict";var t=require("mazey"),e=require("jquery"),n=require("js-sha1");function r(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var o=r(e),i=r(n),a="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function c(t,e){return t(e={exports:{}},e.exports),e.exports}var u,f,s=function(t){return t&&t.Math===Math&&t},l=s("object"==typeof globalThis&&globalThis)||s("object"==typeof window&&window)||s("object"==typeof self&&self)||s("object"==typeof a&&a)||s("object"==typeof a&&a)||function(){return this}()||Function("return this")(),p=function(t){try{return!!t()}catch(t){return!0}},d=!p(function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]}),h=!p(function(){var t=function(){}.bind();return"function"!=typeof t||t.hasOwnProperty("prototype")}),v=Function.prototype.call,y=h?v.bind(v):function(){return v.apply(v,arguments)},g={}.propertyIsEnumerable,m=Object.getOwnPropertyDescriptor,w=m&&!g.call({1:2},1)?function(t){var e=m(this,t);return!!e&&e.enumerable}:g,b={f:w},S=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}},O=Function.prototype,A=O.call,E=h&&O.bind.bind(A,A),P=h?E:function(t){return function(){return A.apply(t,arguments)}},T=P({}.toString),_=P("".slice),L=function(t){return _(T(t),8,-1)},j=Object,x=P("".split),C=p(function(){return!j("z").propertyIsEnumerable(0)})?function(t){return"String"===L(t)?x(t,""):j(t)}:j,I=function(t){return null==t},R=TypeError,k=function(t){if(I(t))throw new R("Can't call method on "+t);return t},N=function(t){return C(k(t))},M="object"==typeof document&&document.all,U=void 0===M&&void 0!==M?function(t){return"function"==typeof t||t===M}:function(t){return"function"==typeof t},D=function(t){return"object"==typeof t?null!==t:U(t)},B=function(t,e){return arguments.length<2?(n=l[t],U(n)?n:void 0):l[t]&&l[t][e];var n},H=P({}.isPrototypeOf),W=l.navigator,F=W&&W.userAgent,z=F?String(F):"",G=l.process,q=l.Deno,V=G&&G.versions||q&&q.version,X=V&&V.v8;X&&(f=(u=X.split("."))[0]>0&&u[0]<4?1:+(u[0]+u[1])),!f&&z&&(!(u=z.match(/Edge\/(\d+)/))||u[1]>=74)&&(u=z.match(/Chrome\/(\d+)/))&&(f=+u[1]);var J=f,Y=l.String,K=!!Object.getOwnPropertySymbols&&!p(function(){var t=Symbol("symbol detection");return!Y(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&J&&J<41}),Q=K&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,$=Object,Z=Q?function(t){return"symbol"==typeof t}:function(t){var e=B("Symbol");return U(e)&&H(e.prototype,$(t))},tt=String,et=function(t){try{return tt(t)}catch(t){return"Object"}},nt=TypeError,rt=function(t){if(U(t))return t;throw new nt(et(t)+" is not a function")},ot=function(t,e){var n=t[e];return I(n)?void 0:rt(n)},it=TypeError,at=Object.defineProperty,ct=function(t,e){try{at(l,t,{value:e,configurable:!0,writable:!0})}catch(n){l[t]=e}return e},ut=c(function(t){var e="__core-js_shared__",n=t.exports=l[e]||ct(e,{});(n.versions||(n.versions=[])).push({version:"3.45.0",mode:"global",copyright:"© 2014-2025 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.45.0/LICENSE",source:"https://github.com/zloirock/core-js"})}),ft=function(t,e){return ut[t]||(ut[t]=e||{})},st=Object,lt=function(t){return st(k(t))},pt=P({}.hasOwnProperty),dt=Object.hasOwn||function(t,e){return pt(lt(t),e)},ht=0,vt=Math.random(),yt=P(1.1.toString),gt=function(t){return"Symbol("+(void 0===t?"":t)+")_"+yt(++ht+vt,36)},mt=l.Symbol,wt=ft("wks"),bt=Q?mt.for||mt:mt&&mt.withoutSetter||gt,St=function(t){return dt(wt,t)||(wt[t]=K&&dt(mt,t)?mt[t]:bt("Symbol."+t)),wt[t]},Ot=TypeError,At=St("toPrimitive"),Et=function(t,e){if(!D(t)||Z(t))return t;var n,r=ot(t,At);if(r){if(void 0===e&&(e="default"),n=y(r,t,e),!D(n)||Z(n))return n;throw new Ot("Can't convert object to primitive value")}return void 0===e&&(e="number"),function(t,e){var n,r;if("string"===e&&U(n=t.toString)&&!D(r=y(n,t)))return r;if(U(n=t.valueOf)&&!D(r=y(n,t)))return r;if("string"!==e&&U(n=t.toString)&&!D(r=y(n,t)))return r;throw new it("Can't convert object to primitive value")}(t,e)},Pt=function(t){var e=Et(t,"string");return Z(e)?e:e+""},Tt=l.document,_t=D(Tt)&&D(Tt.createElement),Lt=function(t){return _t?Tt.createElement(t):{}},jt=!d&&!p(function(){return 7!==Object.defineProperty(Lt("div"),"a",{get:function(){return 7}}).a}),xt=Object.getOwnPropertyDescriptor,Ct={f:d?xt:function(t,e){if(t=N(t),e=Pt(e),jt)try{return xt(t,e)}catch(t){}if(dt(t,e))return S(!y(b.f,t,e),t[e])}},It=d&&p(function(){return 42!==Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype}),Rt=String,kt=TypeError,Nt=function(t){if(D(t))return t;throw new kt(Rt(t)+" is not an object")},Mt=TypeError,Ut=Object.defineProperty,Dt=Object.getOwnPropertyDescriptor,Bt="enumerable",Ht="configurable",Wt="writable",Ft={f:d?It?function(t,e,n){if(Nt(t),e=Pt(e),Nt(n),"function"==typeof t&&"prototype"===e&&"value"in n&&Wt in n&&!n[Wt]){var r=Dt(t,e);r&&r[Wt]&&(t[e]=n.value,n={configurable:Ht in n?n[Ht]:r[Ht],enumerable:Bt in n?n[Bt]:r[Bt],writable:!1})}return Ut(t,e,n)}:Ut:function(t,e,n){if(Nt(t),e=Pt(e),Nt(n),jt)try{return Ut(t,e,n)}catch(t){}if("get"in n||"set"in n)throw new Mt("Accessors not supported");return"value"in n&&(t[e]=n.value),t}},zt=d?function(t,e,n){return Ft.f(t,e,S(1,n))}:function(t,e,n){return t[e]=n,t},Gt=Function.prototype,qt=d&&Object.getOwnPropertyDescriptor,Vt=dt(Gt,"name"),Xt={EXISTS:Vt,PROPER:Vt&&"something"===function(){}.name,CONFIGURABLE:Vt&&(!d||d&&qt(Gt,"name").configurable)},Jt=P(Function.toString);U(ut.inspectSource)||(ut.inspectSource=function(t){return Jt(t)});var Yt,Kt,Qt,$t=ut.inspectSource,Zt=l.WeakMap,te=U(Zt)&&/native code/.test(String(Zt)),ee=ft("keys"),ne=function(t){return ee[t]||(ee[t]=gt(t))},re={},oe="Object already initialized",ie=l.TypeError,ae=l.WeakMap;if(te||ut.state){var ce=ut.state||(ut.state=new ae);ce.get=ce.get,ce.has=ce.has,ce.set=ce.set,Yt=function(t,e){if(ce.has(t))throw new ie(oe);return e.facade=t,ce.set(t,e),e},Kt=function(t){return ce.get(t)||{}},Qt=function(t){return ce.has(t)}}else{var ue=ne("state");re[ue]=!0,Yt=function(t,e){if(dt(t,ue))throw new ie(oe);return e.facade=t,zt(t,ue,e),e},Kt=function(t){return dt(t,ue)?t[ue]:{}},Qt=function(t){return dt(t,ue)}}var fe={set:Yt,get:Kt,has:Qt,enforce:function(t){return Qt(t)?Kt(t):Yt(t,{})},getterFor:function(t){return function(e){var n;if(!D(e)||(n=Kt(e)).type!==t)throw new ie("Incompatible receiver, "+t+" required");return n}}},se=c(function(t){var e=Xt.CONFIGURABLE,n=fe.enforce,r=fe.get,o=String,i=Object.defineProperty,a=P("".slice),c=P("".replace),u=P([].join),f=d&&!p(function(){return 8!==i(function(){},"length",{value:8}).length}),s=String(String).split("String"),l=t.exports=function(t,r,l){"Symbol("===a(o(r),0,7)&&(r="["+c(o(r),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),l&&l.getter&&(r="get "+r),l&&l.setter&&(r="set "+r),(!dt(t,"name")||e&&t.name!==r)&&(d?i(t,"name",{value:r,configurable:!0}):t.name=r),f&&l&&dt(l,"arity")&&t.length!==l.arity&&i(t,"length",{value:l.arity});try{l&&dt(l,"constructor")&&l.constructor?d&&i(t,"prototype",{writable:!1}):t.prototype&&(t.prototype=void 0)}catch(t){}var p=n(t);return dt(p,"source")||(p.source=u(s,"string"==typeof r?r:"")),t};Function.prototype.toString=l(function(){return U(this)&&r(this).source||$t(this)},"toString")}),le=function(t,e,n,r){r||(r={});var o=r.enumerable,i=void 0!==r.name?r.name:e;if(U(n)&&se(n,i,r),r.global)o?t[e]=n:ct(e,n);else{try{r.unsafe?t[e]&&(o=!0):delete t[e]}catch(t){}o?t[e]=n:Ft.f(t,e,{value:n,enumerable:!1,configurable:!r.nonConfigurable,writable:!r.nonWritable})}return t},pe=Math.ceil,de=Math.floor,he=Math.trunc||function(t){var e=+t;return(e>0?de:pe)(e)},ve=function(t){var e=+t;return e!=e||0===e?0:he(e)},ye=Math.max,ge=Math.min,me=Math.min,we=function(t){return e=t.length,(n=ve(e))>0?me(n,9007199254740991):0;var e,n},be=function(t){return function(e,n,r){var o=N(e),i=we(o);if(0===i)return!t&&-1;var a,c=function(t,e){var n=ve(t);return n<0?ye(n+e,0):ge(n,e)}(r,i);if(t&&n!=n){for(;i>c;)if((a=o[c++])!=a)return!0}else for(;i>c;c++)if((t||c in o)&&o[c]===n)return t||c||0;return!t&&-1}},Se={includes:be(!0),indexOf:be(!1)}.indexOf,Oe=P([].push),Ae=function(t,e){var n,r=N(t),o=0,i=[];for(n in r)!dt(re,n)&&dt(r,n)&&Oe(i,n);for(;e.length>o;)dt(r,n=e[o++])&&(~Se(i,n)||Oe(i,n));return i},Ee=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],Pe=Ee.concat("length","prototype"),Te={f:Object.getOwnPropertyNames||function(t){return Ae(t,Pe)}},_e={f:Object.getOwnPropertySymbols},Le=P([].concat),je=B("Reflect","ownKeys")||function(t){var e=Te.f(Nt(t)),n=_e.f;return n?Le(e,n(t)):e},xe=function(t,e,n){for(var r=je(e),o=Ft.f,i=Ct.f,a=0;a<r.length;a++){var c=r[a];dt(t,c)||n&&dt(n,c)||o(t,c,i(e,c))}},Ce=/#|\.prototype\./,Ie=function(t,e){var n=ke[Re(t)];return n===Me||n!==Ne&&(U(e)?p(e):!!e)},Re=Ie.normalize=function(t){return String(t).replace(Ce,".").toLowerCase()},ke=Ie.data={},Ne=Ie.NATIVE="N",Me=Ie.POLYFILL="P",Ue=Ie,De=Ct.f,Be=function(t,e){var n,r,o,i,a,c=t.target,u=t.global,f=t.stat;if(n=u?l:f?l[c]||ct(c,{}):l[c]&&l[c].prototype)for(r in e){if(i=e[r],o=t.dontCallGetSet?(a=De(n,r))&&a.value:n[r],!Ue(u?r:c+(f?".":"#")+r,t.forced)&&void 0!==o){if(typeof i==typeof o)continue;xe(i,o)}(t.sham||o&&o.sham)&&zt(i,"sham",!0),le(n,r,i,t)}},He=Array.isArray||function(t){return"Array"===L(t)},We=TypeError,Fe=function(t){if(t>9007199254740991)throw We("Maximum allowed index exceeded");return t},ze=function(t,e,n){d?Ft.f(t,e,S(0,n)):t[e]=n},Ge={};Ge[St("toStringTag")]="z";var qe="[object z]"===String(Ge),Ve=St("toStringTag"),Xe=Object,Je="Arguments"===L(function(){return arguments}()),Ye=qe?L:function(t){var e,n,r;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(n=function(t,e){try{return t[e]}catch(t){}}(e=Xe(t),Ve))?n:Je?L(e):"Object"===(r=L(e))&&U(e.callee)?"Arguments":r},Ke=function(){},Qe=B("Reflect","construct"),$e=/^\s*(?:class|function)\b/,Ze=P($e.exec),tn=!$e.test(Ke),en=function(t){if(!U(t))return!1;try{return Qe(Ke,[],t),!0}catch(t){return!1}},nn=function(t){if(!U(t))return!1;switch(Ye(t)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return tn||!!Ze($e,$t(t))}catch(t){return!0}};nn.sham=!0;var rn,on=!Qe||p(function(){var t;return en(en.call)||!en(Object)||!en(function(){t=!0})||t})?nn:en,an=St("species"),cn=Array,un=function(t,e){return new(function(t){var e;return He(t)&&(e=t.constructor,(on(e)&&(e===cn||He(e.prototype))||D(e)&&null===(e=e[an]))&&(e=void 0)),void 0===e?cn:e}(t))(0===e?0:e)},fn=St("species"),sn=St("isConcatSpreadable"),ln=J>=51||!p(function(){var t=[];return t[sn]=!1,t.concat()[0]!==t}),pn=function(t){if(!D(t))return!1;var e=t[sn];return void 0!==e?!!e:He(t)},dn=!(ln&&(rn="concat",J>=51||!p(function(){var t=[];return(t.constructor={})[fn]=function(){return{foo:1}},1!==t[rn](Boolean).foo})));Be({target:"Array",proto:!0,arity:1,forced:dn},{concat:function(t){var e,n,r,o,i,a=lt(this),c=un(a,0),u=0;for(e=-1,r=arguments.length;e<r;e++)if(pn(i=-1===e?a:arguments[e]))for(o=we(i),Fe(u+o),n=0;n<o;n++,u++)n in i&&ze(c,u,i[n]);else Fe(u+1),ze(c,u++,i);return c.length=u,c}});var hn,vn=Object.keys||function(t){return Ae(t,Ee)},yn=d&&!It?Object.defineProperties:function(t,e){Nt(t);for(var n,r=N(e),o=vn(e),i=o.length,a=0;i>a;)Ft.f(t,n=o[a++],r[n]);return t},gn={f:yn},mn=B("document","documentElement"),wn="prototype",bn="script",Sn=ne("IE_PROTO"),On=function(){},An=function(t){return"<"+bn+">"+t+"</"+bn+">"},En=function(t){t.write(An("")),t.close();var e=t.parentWindow.Object;return t=null,e},Pn=function(){try{hn=new ActiveXObject("htmlfile")}catch(t){}var t,e,n;Pn="undefined"!=typeof document?document.domain&&hn?En(hn):(e=Lt("iframe"),n="java"+bn+":",e.style.display="none",mn.appendChild(e),e.src=String(n),(t=e.contentWindow.document).open(),t.write(An("document.F=Object")),t.close(),t.F):En(hn);for(var r=Ee.length;r--;)delete Pn[wn][Ee[r]];return Pn()};re[Sn]=!0;var Tn=Object.create||function(t,e){var n;return null!==t?(On[wn]=Nt(t),n=new On,On[wn]=null,n[Sn]=t):n=Pn(),void 0===e?n:gn.f(n,e)},_n=Ft.f,Ln=St("unscopables"),jn=Array.prototype;void 0===jn[Ln]&&_n(jn,Ln,{configurable:!0,value:Tn(null)});var xn,Cn,In,Rn=function(t){jn[Ln][t]=!0},kn={},Nn=!p(function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype}),Mn=ne("IE_PROTO"),Un=Object,Dn=Un.prototype,Bn=Nn?Un.getPrototypeOf:function(t){var e=lt(t);if(dt(e,Mn))return e[Mn];var n=e.constructor;return U(n)&&e instanceof n?n.prototype:e instanceof Un?Dn:null},Hn=St("iterator"),Wn=!1;[].keys&&("next"in(In=[].keys())?(Cn=Bn(Bn(In)))!==Object.prototype&&(xn=Cn):Wn=!0);var Fn=!D(xn)||p(function(){var t={};return xn[Hn].call(t)!==t});Fn&&(xn={}),U(xn[Hn])||le(xn,Hn,function(){return this});var zn={IteratorPrototype:xn,BUGGY_SAFARI_ITERATORS:Wn},Gn=Ft.f,qn=St("toStringTag"),Vn=function(t,e,n){t&&!n&&(t=t.prototype),t&&!dt(t,qn)&&Gn(t,qn,{configurable:!0,value:e})},Xn=zn.IteratorPrototype,Jn=function(){return this},Yn=String,Kn=TypeError,Qn=function(t){if(function(t){return D(t)||null===t}(t))return t;throw new Kn("Can't set "+Yn(t)+" as a prototype")},$n=Object.setPrototypeOf||("__proto__"in{}?function(){var t,e=!1,n={};try{t=function(t,e,n){try{return P(rt(Object.getOwnPropertyDescriptor(t,e)[n]))}catch(t){}}(Object.prototype,"__proto__","set"),t(n,[]),e=n instanceof Array}catch(t){}return function(n,r){return k(n),Qn(r),D(n)?(e?t(n,r):n.__proto__=r,n):n}}():void 0),Zn=Xt.PROPER,tr=Xt.CONFIGURABLE,er=zn.IteratorPrototype,nr=zn.BUGGY_SAFARI_ITERATORS,rr=St("iterator"),or="keys",ir="values",ar="entries",cr=function(){return this},ur=function(t,e,n,r,o,i,a){!function(t,e,n,r){var o=e+" Iterator";t.prototype=Tn(Xn,{next:S(+!r,n)}),Vn(t,o,!1),kn[o]=Jn}(n,e,r);var c,u,f,s=function(t){if(t===o&&v)return v;if(!nr&&t&&t in d)return d[t];switch(t){case or:case ir:case ar:return function(){return new n(this,t)}}return function(){return new n(this)}},l=e+" Iterator",p=!1,d=t.prototype,h=d[rr]||d["@@iterator"]||o&&d[o],v=!nr&&h||s(o),g="Array"===e&&d.entries||h;if(g&&(c=Bn(g.call(new t)))!==Object.prototype&&c.next&&(Bn(c)!==er&&($n?$n(c,er):U(c[rr])||le(c,rr,cr)),Vn(c,l,!0)),Zn&&o===ir&&h&&h.name!==ir&&(tr?zt(d,"name",ir):(p=!0,v=function(){return y(h,this)})),o)if(u={values:s(ir),keys:i?v:s(or),entries:s(ar)},a)for(f in u)(nr||p||!(f in d))&&le(d,f,u[f]);else Be({target:e,proto:!0,forced:nr||p},u);return d[rr]!==v&&le(d,rr,v,{name:o}),kn[e]=v,u},fr=function(t,e){return{value:t,done:e}},sr=Ft.f,lr="Array Iterator",pr=fe.set,dr=fe.getterFor(lr),hr=ur(Array,"Array",function(t,e){pr(this,{type:lr,target:N(t),index:0,kind:e})},function(){var t=dr(this),e=t.target,n=t.index++;if(!e||n>=e.length)return t.target=null,fr(void 0,!0);switch(t.kind){case"keys":return fr(n,!1);case"values":return fr(e[n],!1)}return fr([n,e[n]],!1)},"values"),vr=kn.Arguments=kn.Array;if(Rn("keys"),Rn("values"),Rn("entries"),d&&"values"!==vr.name)try{sr(vr,"name",{value:"values"})}catch(t){}var yr=Object.assign,gr=Object.defineProperty,mr=P([].concat),wr=!yr||p(function(){if(d&&1!==yr({b:1},yr(gr({},"a",{enumerable:!0,get:function(){gr(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var t={},e={},n=Symbol("assign detection"),r="abcdefghijklmnopqrst";return t[n]=7,r.split("").forEach(function(t){e[t]=t}),7!==yr({},t)[n]||vn(yr({},e)).join("")!==r})?function(t,e){for(var n=lt(t),r=arguments.length,o=1,i=_e.f,a=b.f;r>o;)for(var c,u=C(arguments[o++]),f=i?mr(vn(u),i(u)):vn(u),s=f.length,l=0;s>l;)c=f[l++],d&&!y(a,u,c)||(n[c]=u[c]);return n}:yr;Be({target:"Object",stat:!0,arity:2,forced:Object.assign!==wr},{assign:wr});var br=qe?{}.toString:function(){return"[object "+Ye(this)+"]"};qe||le(Object.prototype,"toString",br,{unsafe:!0});var Sr,Or,Ar,Er,Pr=function(t){return z.slice(0,t.length)===t},Tr=Pr("Bun/")?"BUN":Pr("Cloudflare-Workers")?"CLOUDFLARE":Pr("Deno/")?"DENO":Pr("Node.js/")?"NODE":l.Bun&&"string"==typeof Bun.version?"BUN":l.Deno&&"object"==typeof Deno.version?"DENO":"process"===L(l.process)?"NODE":l.window&&l.document?"BROWSER":"REST",_r="NODE"===Tr,Lr=l,jr=St("species"),xr=TypeError,Cr=TypeError,Ir=St("species"),Rr=function(t,e){var n,r=Nt(t).constructor;return void 0===r||I(n=Nt(r)[Ir])?e:function(t){if(on(t))return t;throw new Cr(et(t)+" is not a constructor")}(n)},kr=Function.prototype,Nr=kr.apply,Mr=kr.call,Ur="object"==typeof Reflect&&Reflect.apply||(h?Mr.bind(Nr):function(){return Mr.apply(Nr,arguments)}),Dr=function(t){if("Function"===L(t))return P(t)},Br=Dr(Dr.bind),Hr=function(t,e){return rt(t),void 0===e?t:h?Br(t,e):function(){return t.apply(e,arguments)}},Wr=P([].slice),Fr=TypeError,zr=/(?:ipad|iphone|ipod).*applewebkit/i.test(z),Gr=l.setImmediate,qr=l.clearImmediate,Vr=l.process,Xr=l.Dispatch,Jr=l.Function,Yr=l.MessageChannel,Kr=l.String,Qr=0,$r={},Zr="onreadystatechange";p(function(){Sr=l.location});var to=function(t){if(dt($r,t)){var e=$r[t];delete $r[t],e()}},eo=function(t){return function(){to(t)}},no=function(t){to(t.data)},ro=function(t){l.postMessage(Kr(t),Sr.protocol+"//"+Sr.host)};Gr&&qr||(Gr=function(t){!function(t,e){if(t<e)throw new Fr("Not enough arguments")}(arguments.length,1);var e=U(t)?t:Jr(t),n=Wr(arguments,1);return $r[++Qr]=function(){Ur(e,void 0,n)},Or(Qr),Qr},qr=function(t){delete $r[t]},_r?Or=function(t){Vr.nextTick(eo(t))}:Xr&&Xr.now?Or=function(t){Xr.now(eo(t))}:Yr&&!zr?(Er=(Ar=new Yr).port2,Ar.port1.onmessage=no,Or=Hr(Er.postMessage,Er)):l.addEventListener&&U(l.postMessage)&&!l.importScripts&&Sr&&"file:"!==Sr.protocol&&!p(ro)?(Or=ro,l.addEventListener("message",no,!1)):Or=Zr in Lt("script")?function(t){mn.appendChild(Lt("script"))[Zr]=function(){mn.removeChild(this),to(t)}}:function(t){setTimeout(eo(t),0)});var oo={set:Gr,clear:qr},io=Object.getOwnPropertyDescriptor,ao=function(){this.head=null,this.tail=null};ao.prototype={add:function(t){var e={item:t,next:null},n=this.tail;n?n.next=e:this.head=e,this.tail=e},get:function(){var t=this.head;if(t)return null===(this.head=t.next)&&(this.tail=null),t.item}};var co,uo,fo,so,lo,po=ao,ho=/ipad|iphone|ipod/i.test(z)&&"undefined"!=typeof Pebble,vo=/web0s(?!.*chrome)/i.test(z),yo=oo.set,go=l.MutationObserver||l.WebKitMutationObserver,mo=l.document,wo=l.process,bo=l.Promise,So=function(t){if(!d)return l[t];var e=io(l,t);return e&&e.value}("queueMicrotask");if(!So){var Oo=new po,Ao=function(){var t,e;for(_r&&(t=wo.domain)&&t.exit();e=Oo.get();)try{e()}catch(t){throw Oo.head&&co(),t}t&&t.enter()};zr||_r||vo||!go||!mo?!ho&&bo&&bo.resolve?((so=bo.resolve(void 0)).constructor=bo,lo=Hr(so.then,so),co=function(){lo(Ao)}):_r?co=function(){wo.nextTick(Ao)}:(yo=Hr(yo,l),co=function(){yo(Ao)}):(uo=!0,fo=mo.createTextNode(""),new go(Ao).observe(fo,{characterData:!0}),co=function(){fo.data=uo=!uo}),So=function(t){Oo.head||co(),Oo.add(t)}}var Eo=So,Po=function(t){try{return{error:!1,value:t()}}catch(t){return{error:!0,value:t}}},To=l.Promise;To&&To.prototype;var _o,Lo,jo,xo,Co,Io,Ro,ko,No=St("species"),Mo=!1,Uo=U(l.PromiseRejectionEvent),Do=Ue("Promise",function(){var t=$t(To),e=t!==String(To);if(!e&&66===J)return!0;if(!J||J<51||!/native code/.test(t)){var n=new To(function(t){t(1)}),r=function(t){t(function(){},function(){})};if((n.constructor={})[No]=r,!(Mo=n.then(function(){})instanceof r))return!0}return!(e||"BROWSER"!==Tr&&"DENO"!==Tr||Uo)}),Bo={CONSTRUCTOR:Do,REJECTION_EVENT:Uo,SUBCLASSING:Mo},Ho=TypeError,Wo=function(t){var e,n;this.promise=new t(function(t,r){if(void 0!==e||void 0!==n)throw new Ho("Bad Promise constructor");e=t,n=r}),this.resolve=rt(e),this.reject=rt(n)},Fo={f:function(t){return new Wo(t)}},zo=oo.set,Go="Promise",qo=Bo.CONSTRUCTOR,Vo=Bo.REJECTION_EVENT,Xo=Bo.SUBCLASSING,Jo=fe.getterFor(Go),Yo=fe.set,Ko=To&&To.prototype,Qo=To,$o=Ko,Zo=l.TypeError,ti=l.document,ei=l.process,ni=Fo.f,ri=ni,oi=!!(ti&&ti.createEvent&&l.dispatchEvent),ii="unhandledrejection",ai=function(t){var e;return!(!D(t)||!U(e=t.then))&&e},ci=function(t,e){var n,r,o,i=e.value,a=1===e.state,c=a?t.ok:t.fail,u=t.resolve,f=t.reject,s=t.domain;try{c?(a||(2===e.rejection&&pi(e),e.rejection=1),!0===c?n=i:(s&&s.enter(),n=c(i),s&&(s.exit(),o=!0)),n===t.promise?f(new Zo("Promise-chain cycle")):(r=ai(n))?y(r,n,u,f):u(n)):f(i)}catch(t){s&&!o&&s.exit(),f(t)}},ui=function(t,e){t.notified||(t.notified=!0,Eo(function(){for(var n,r=t.reactions;n=r.get();)ci(n,t);t.notified=!1,e&&!t.rejection&&si(t)}))},fi=function(t,e,n){var r,o;oi?((r=ti.createEvent("Event")).promise=e,r.reason=n,r.initEvent(t,!1,!0),l.dispatchEvent(r)):r={promise:e,reason:n},!Vo&&(o=l["on"+t])?o(r):t===ii&&function(t,e){try{1===arguments.length?console.error(t):console.error(t,e)}catch(t){}}("Unhandled promise rejection",n)},si=function(t){y(zo,l,function(){var e,n=t.facade,r=t.value;if(li(t)&&(e=Po(function(){_r?ei.emit("unhandledRejection",r,n):fi(ii,n,r)}),t.rejection=_r||li(t)?2:1,e.error))throw e.value})},li=function(t){return 1!==t.rejection&&!t.parent},pi=function(t){y(zo,l,function(){var e=t.facade;_r?ei.emit("rejectionHandled",e):fi("rejectionhandled",e,t.value)})},di=function(t,e,n){return function(r){t(e,r,n)}},hi=function(t,e,n){t.done||(t.done=!0,n&&(t=n),t.value=e,t.state=2,ui(t,!0))},vi=function(t,e,n){if(!t.done){t.done=!0,n&&(t=n);try{if(t.facade===e)throw new Zo("Promise can't be resolved itself");var r=ai(e);r?Eo(function(){var n={done:!1};try{y(r,e,di(vi,n,t),di(hi,n,t))}catch(e){hi(n,e,t)}}):(t.value=e,t.state=1,ui(t,!1))}catch(e){hi({done:!1},e,t)}}};if(qo&&($o=(Qo=function(t){!function(t,e){if(H(e,t))return t;throw new xr("Incorrect invocation")}(this,$o),rt(t),y(_o,this);var e=Jo(this);try{t(di(vi,e),di(hi,e))}catch(t){hi(e,t)}}).prototype,(_o=function(t){Yo(this,{type:Go,done:!1,notified:!1,parent:!1,reactions:new po,rejection:!1,state:0,value:null})}).prototype=le($o,"then",function(t,e){var n=Jo(this),r=ni(Rr(this,Qo));return n.parent=!0,r.ok=!U(t)||t,r.fail=U(e)&&e,r.domain=_r?ei.domain:void 0,0===n.state?n.reactions.add(r):Eo(function(){ci(r,n)}),r.promise}),Lo=function(){var t=new _o,e=Jo(t);this.promise=t,this.resolve=di(vi,e),this.reject=di(hi,e)},Fo.f=ni=function(t){return t===Qo||t===jo?new Lo(t):ri(t)},U(To)&&Ko!==Object.prototype)){xo=Ko.then,Xo||le(Ko,"then",function(t,e){var n=this;return new Qo(function(t,e){y(xo,n,t,e)}).then(t,e)},{unsafe:!0});try{delete Ko.constructor}catch(t){}$n&&$n(Ko,$o)}Be({global:!0,constructor:!0,wrap:!0,forced:qo},{Promise:Qo}),jo=Lr.Promise,Vn(Qo,Go,!1),ko=B(Go),d&&ko&&!ko[jr]&&(Co=ko,Io=jr,(Ro={configurable:!0,get:function(){return this}}).get&&se(Ro.get,Io,{getter:!0}),Ro.set&&se(Ro.set,Io,{setter:!0}),Ft.f(Co,Io,Ro));var yi=St("iterator"),gi=Array.prototype,mi=St("iterator"),wi=function(t){if(!I(t))return ot(t,mi)||ot(t,"@@iterator")||kn[Ye(t)]},bi=TypeError,Si=function(t,e,n){var r,o;Nt(t);try{if(!(r=ot(t,"return"))){if("throw"===e)throw n;return n}r=y(r,t)}catch(t){o=!0,r=t}if("throw"===e)throw n;if(o)throw r;return Nt(r),n},Oi=TypeError,Ai=function(t,e){this.stopped=t,this.result=e},Ei=Ai.prototype,Pi=function(t,e,n){var r,o,i,a,c,u,f,s,l=n&&n.that,p=!(!n||!n.AS_ENTRIES),d=!(!n||!n.IS_RECORD),h=!(!n||!n.IS_ITERATOR),v=!(!n||!n.INTERRUPTED),g=Hr(e,l),m=function(t){return r&&Si(r,"normal"),new Ai(!0,t)},w=function(t){return p?(Nt(t),v?g(t[0],t[1],m):g(t[0],t[1])):v?g(t,m):g(t)};if(d)r=t.iterator;else if(h)r=t;else{if(!(o=wi(t)))throw new Oi(et(t)+" is not iterable");if(void 0!==(s=o)&&(kn.Array===s||gi[yi]===s)){for(i=0,a=we(t);a>i;i++)if((c=w(t[i]))&&H(Ei,c))return c;return new Ai(!1)}r=function(t,e){var n=arguments.length<2?wi(t):e;if(rt(n))return Nt(y(n,t));throw new bi(et(t)+" is not iterable")}(t,o)}for(u=d?t.next:r.next;!(f=y(u,r)).done;){try{c=w(f.value)}catch(t){Si(r,"throw",t)}if("object"==typeof c&&c&&H(Ei,c))return c}return new Ai(!1)},Ti=St("iterator"),_i=!1;try{var Li=0,ji={next:function(){return{done:!!Li++}},return:function(){_i=!0}};ji[Ti]=function(){return this},Array.from(ji,function(){throw 2})}catch(t){}var xi=Bo.CONSTRUCTOR||!function(t,e){try{if(!e&&!_i)return!1}catch(t){return!1}var n=!1;try{var r={};r[Ti]=function(){return{next:function(){return{done:n=!0}}}},t(r)}catch(t){}return n}(function(t){To.all(t).then(void 0,function(){})});Be({target:"Promise",stat:!0,forced:xi},{all:function(t){var e=this,n=Fo.f(e),r=n.resolve,o=n.reject,i=Po(function(){var n=rt(e.resolve),i=[],a=0,c=1;Pi(t,function(t){var u=a++,f=!1;c++,y(n,e,t).then(function(t){f||(f=!0,i[u]=t,--c||r(i))},o)}),--c||r(i)});return i.error&&o(i.value),n.promise}});var Ci=Bo.CONSTRUCTOR,Ii=To&&To.prototype;if(Be({target:"Promise",proto:!0,forced:Ci,real:!0},{catch:function(t){return this.then(void 0,t)}}),U(To)){var Ri=B("Promise").prototype.catch;Ii.catch!==Ri&&le(Ii,"catch",Ri,{unsafe:!0})}Be({target:"Promise",stat:!0,forced:xi},{race:function(t){var e=this,n=Fo.f(e),r=n.reject,o=Po(function(){var o=rt(e.resolve);Pi(t,function(t){y(o,e,t).then(n.resolve,r)})});return o.error&&r(o.value),n.promise}}),Be({target:"Promise",stat:!0,forced:Bo.CONSTRUCTOR},{reject:function(t){var e=Fo.f(this);return(0,e.reject)(t),e.promise}});var ki=Bo.CONSTRUCTOR;B("Promise"),Be({target:"Promise",stat:!0,forced:ki},{resolve:function(t){return function(t,e){if(Nt(t),D(e)&&e.constructor===t)return e;var n=Fo.f(t);return(0,n.resolve)(e),n.promise}(this,t)}});var Ni=String,Mi=function(t){if("Symbol"===Ye(t))throw new TypeError("Cannot convert a Symbol value to a string");return Ni(t)},Ui=P("".charAt),Di=P("".charCodeAt),Bi=P("".slice),Hi=function(t){return function(e,n){var r,o,i=Mi(k(e)),a=ve(n),c=i.length;return a<0||a>=c?t?"":void 0:(r=Di(i,a))<55296||r>56319||a+1===c||(o=Di(i,a+1))<56320||o>57343?t?Ui(i,a):r:t?Bi(i,a,a+2):o-56320+(r-55296<<10)+65536}},Wi={codeAt:Hi(!1),charAt:Hi(!0)}.charAt,Fi="String Iterator",zi=fe.set,Gi=fe.getterFor(Fi);ur(String,"String",function(t){zi(this,{type:Fi,string:Mi(t),index:0})},function(){var t,e=Gi(this),n=e.string,r=e.index;return r>=n.length?fr(void 0,!0):(t=Wi(n,r),e.index+=t.length,fr(t,!1))});var qi={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0},Vi=Lt("span").classList,Xi=Vi&&Vi.constructor&&Vi.constructor.prototype,Ji=Xi===Object.prototype?void 0:Xi,Yi=St("iterator"),Ki=hr.values,Qi=function(t,e){if(t){if(t[Yi]!==Ki)try{zt(t,Yi,Ki)}catch(e){t[Yi]=Ki}if(Vn(t,e,!0),qi[e])for(var n in hr)if(t[n]!==hr[n])try{zt(t,n,hr[n])}catch(e){t[n]=hr[n]}}};for(var $i in qi)Qi(l[$i]&&l[$i].prototype,$i);Qi(Ji,"DOMTokenList");var Zi=function(){return Zi=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},Zi.apply(this,arguments)},ta={weixinJsSdkTicket:"",launchContainerQuery:".mazey-launch-app-selector",launchShowWeixinToBrowserImgUrl:"",canShowWeixinToBrowser:!1,extInfo:"",serviceAccountAppId:"",wexinServiceAccountAppId:"",openPlatformMobileAppId:"",genTagPrefixStr:"mazey-launch-app-btn-prefix-",launchShowWeixinToBrowserClassName:"mazey-launch-app-wx-to-browser",launchBtnClassName:"mazey-launch-app-inner-btn",launchBtnStyle:"",launchBtnText:"Launch App <br /><br /><br />",launchErrorLink:"",canContinuousUpdating:!1,onMenuShareTimelineOptions:void 0,onMenuShareAppMessageOptions:void 0,isConClosed:!0,isWxDebug:!1,openTagList:["wx-open-launch-app"],canLaunchApp:function(){return!0},canFireErrorLinkDirectly:function(){return!1},launchBtnClick:function(){},launchReady:function(){}};module.exports=function(e){void 0===e&&(e=ta);var n=Object.assign(ta,e),r=n.weixinJsSdkTicket,a=n.launchContainerQuery,c=n.genTagPrefixStr,u=n.launchShowWeixinToBrowserImgUrl,f=n.canShowWeixinToBrowser,s=n.launchShowWeixinToBrowserClassName,l=n.launchBtnClassName,p=n.launchBtnStyle,d=n.launchBtnText,h=n.launchErrorLink,v=n.wexinServiceAccountAppId,y=n.openPlatformMobileAppId,g=n.canContinuousUpdating,m=n.onMenuShareTimelineOptions,w=n.onMenuShareAppMessageOptions,b=n.isConClosed,S=n.isWxDebug,O=n.openTagList,A=n.canLaunchApp,E=n.canFireErrorLinkDirectly,P=n.launchBtnClick,T=n.launchReady,_=n.serviceAccountAppId,L=n.extInfo,j=t.genCustomConsole("LaunchCon:",{isClosed:b}),x=window.wx;x||console.error("Launch App: wx is not found");var C=function(){};j.log("Launch App");var I={title:"",link:"",imgUrl:"",success:function(){},cancel:function(){}},R={title:"",desc:"",link:"",imgUrl:"",type:"",dataUrl:"",success:function(){},cancel:function(){}},k={title:document.title,link:location.href};I=Zi(Zi({},I),k),R=Zi(Zi({},R),k);var N=function(t,e,n){return void 0===t&&(t=""),void 0===e&&(e=""),void 0===n&&(n="button"),"<style>.".concat(l,"{")+"opacity: 0;width: 100%;height: 100%;backgroud: transparent;color: #300f54;border: none;box-sizing: border-box;text-align: center;vertical-align: middle;"+p+e+"}</style>"+"<".concat(n,' class="').concat(l,'"')+(t&&"button"===n?' onclick="'.concat(t,'"'):"")+(t&&"a"===n?' target="_self" href="'.concat(t,'"'):"")+">"+d+"</".concat(n,">")},M=N();function U(){t.addStyle('.mazey-launch-app-mask{position:fixed;top:0;right:0;bottom:0;left:0;background-color:rgba(0, 0, 0, .5);text-align:right;font-size:0;white-space:nowrap;overflow:auto;z-index:999;}.mazey-launch-app-img{display:inline-block;vertical-align:middle;text-align:left;font-size:14px;white-space:normal;width:50vw;margin:0.5rem 0.5rem 0 0;}.mazey-launch-app-img:after{content:"";display:inline-block;height:100%;vertical-align:middle;}',{id:"mazey-launch-app-mask-style"}),window.LAUNCH_APP_HIDE_WEIXIN_BROWSER||(window.LAUNCH_APP_HIDE_WEIXIN_BROWSER=function(){o.default(".mazey-launch-app-mask").hide()}),0===o.default(".mazey-launch-app-mask").length?o.default("body").append("<div class='mazey-launch-app-mask' onclick='window.LAUNCH_APP_HIDE_WEIXIN_BROWSER()'><img "+"class='mazey-launch-app-img ".concat(s,"' ")+"src='".concat(u,"' ")+"alt='Launch App' /></div>"):o.default(".mazey-launch-app-mask").show()}function D(){j.log("renderWeixinLaunchTemplate"),!_&&v&&(console.warn("wexinServiceAccountAppId will be deprecated, use serviceAccountAppId instead."),_=v),function(e,n){void 0===e&&(e=""),void 0===n&&(n=""),j.log("renderWXOpenLaunchApp"),Promise.all([Promise.resolve(r||window.LAUNCH_APP_WEIXIN_JS_SDK_TICKET||t.getQueryParam("weixinJsSdkTicket")||""),Promise.resolve(i.default)]).then(function(r){j.log("allRes",r);var i=r[0];if(i){var u=r[1];if(u){var s=t.generateRndNum(7),l=i,p=(new Date).getTime(),d=u("jsapi_ticket="+l+"&noncestr="+s+"&timestamp="+p+"&url="+location.href);return x.config({debug:S,appId:e,timestamp:p,nonceStr:s,signature:d,jsApiList:["showOptionMenu","onMenuShareTimeline","onMenuShareAppMessage"],openTagList:O}),x.ready(function(){if(w&&(j.log("onMenuShareAppMessageOptions",w),x.onMenuShareAppMessage(w)),window.LAUNCH_APP_SHARE_APP_MESSAGE=function(t){t=Zi(Zi({},R),t),j.log("window LAUNCH_APP_SHARE_APP_MESSAGE",t),x.onMenuShareAppMessage(t)},m&&(j.log("onMenuShareTimelineOptions",m),x.onMenuShareTimeline(m)),window.LAUNCH_APP_SHARE_TIMELINE=function(t){t=Zi(Zi({},I),t),j.log("window LAUNCH_APP_SHARE_TIMELINE",t),x.onMenuShareTimeline(t)},n){window.LAUNCH_APP_READY=!0,T&&T();var t=function(){var t=o.default(a);j.log("containers",a,t,t.length),t.length>0&&t.each(function(t,e){var r=o.default(e).attr("data-launch-app-key");if(!r){var i=o.default(e).parents("[data-launch-app-key]:eq(0)");i.length>0&&(r=i.attr("data-launch-app-key"),j.log("keyEle",i,r))}r||(r=String(t));var a="mazey-launch-app-tag-".concat(r),u=o.default(".".concat(a," wx-open-launch-app")),s=o.default(e).attr("data-launch-app-ext-info");if(!s){var l=o.default(e).parents("[data-launch-app-ext-info]:eq(0)");l.length>0&&(s=l.attr("data-launch-app-ext-info"),j.log("eleExtInfoEle parents",l,s))}s&&(L=s);var p=o.default(e).attr("data-launch-app-error-link");if(!p){var d=o.default(e).parents("[data-launch-app-error-link]:eq(0)");d.length>0&&(p=d.attr("data-launch-app-error-link"),j.log("eleErrorLinkEle parents",d,p))}var v=h;p&&(v=p),0===u.length&&(o.default(e).addClass(a),j.log("success:",a),function(t){var e=c,r=e+t,i="<wx-open-launch-app id='"+r+"' appid='"+n+"' extinfo='".concat(L)+"' style='z-index:99;position:absolute;width:100%;height:100%;opacity:1;background:transparent;overflow:hidden;left:0;'><script type='text/wxtag-template'>"+M+"<\/script></wx-open-launch-app>";o.default("."+t+":eq(0)").append(i);var a=document.getElementById(r);a&&(a.addEventListener("ready",function(t){j.log("ready event",t)}),a.addEventListener("launch",function(t){j.log("launch event",t),t.detail&&t.detail.extInfo&&j.log("launch extInfo",t.detail.extInfo)}),a.addEventListener("error",function(t){j.error(t.detail),o.default("[id^='"+e+"']").hide(),f&&U(),v&&(j.log("realErrorLink",v),location.href=v)}),a.addEventListener("click",function(t){j.log("click event",t),P&&P()}))}(a))})};t(),C=t}else j.log("openPlatformMobileAppId is required for weixin launch app")}),x.error(function(t){j.error(t)}),"success:launch_app"}j.error("sha1 is required")}else j.error("weixinJsSdkTicket is required")}).catch(function(t){j.error(t)})}(_,y)}function B(t){if(void 0===t&&(t={}),j.log("appUpdated",t),!window.LAUNCH_APP_LOAD&&A(t)&&(D(),window.LAUNCH_APP_LOAD=!0),g&&window.LAUNCH_APP_LOAD&&A(t)&&C(),E()){var e=o.default(a);e.length>0&&e.each(function(t,e){var n=o.default(e).children("."+l);if(!n||!n.length){var r=o.default(e).attr("data-launch-app-error-link");if(!r){var i=o.default(e).parents("[data-launch-app-error-link]:eq(0)");i.length>0&&(r=i.attr("data-launch-app-error-link"))}if(r&&"string"==typeof r&&r.length){var a=N(r,"position:absolute;left:0;z-index:999;","a");o.default(e).append(a)}}})}}function H(){j.log("appBeforeDestroy",H),window.LAUNCH_APP_LOAD=null,window.LAUNCH_APP_HIDE_WEIXIN_BROWSER=null}return window.LAUNCH_APP_UPDATE=B,window.LAUNCH_APP_BEFORE_DESTROY=H,window.LAUNCH_APP_SHOW_WEIXIN_TO_BROWSER=U,{LAUNCH_APP_UPDATE:B,LAUNCH_APP_BEFORE_DESTROY:H,LAUNCH_APP_SHOW_WEIXIN_TO_BROWSER:U,LAUNCH_APP_SHARE_TIMELINE:function(t){j.log("opt",t)},LAUNCH_APP_SHARE_APP_MESSAGE:function(t){j.log("opt",t)},start:B,update:B,destroy:H}};