@polyv/product-sdk 1.3.0-rc-20250814.1 → 1.4.0-rc-20250904.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.es.js CHANGED
@@ -1,4 +1,163 @@
1
- var PolyvApiUrl = /* @__PURE__ */ function(PolyvApiUrl2) {
1
+ var hasOwnProperty = Object.prototype.hasOwnProperty;
2
+ function hasOwnProp(r, n) {
3
+ return hasOwnProperty.call(r, n);
4
+ }
5
+ function assignProps(r) {
6
+ if (null == r) throw new TypeError("Cannot convert undefined or null to object");
7
+ for (var o = 0; o < (arguments.length <= 1 ? 0 : arguments.length - 1); o++) {
8
+ var t = o + 1 < 1 || arguments.length <= o + 1 ? void 0 : arguments[o + 1];
9
+ if (null != t) for (var n in t) "__proto__" !== n && hasOwnProp(t, n) && (r[n] = t[n]);
10
+ }
11
+ return r;
12
+ }
13
+ function _typeof$8(o) {
14
+ "@babel/helpers - typeof";
15
+ return _typeof$8 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o2) {
16
+ return typeof o2;
17
+ } : function(o2) {
18
+ return o2 && "function" == typeof Symbol && o2.constructor === Symbol && o2 !== Symbol.prototype ? "symbol" : typeof o2;
19
+ }, _typeof$8(o);
20
+ }
21
+ function addToResult(n, o, e, t) {
22
+ if (null == e && (e = ""), "" !== e || !t.ignoreEmpty) {
23
+ if ("function" == typeof t.encode) {
24
+ o = t.encode(o);
25
+ e = -1 !== ["boolean", "string", "number"].indexOf(_typeof$8(e)) ? t.encode(String(e)) : "";
26
+ }
27
+ n.push(o + "=" + e);
28
+ }
29
+ }
30
+ function handleMultiValues(n, o, e, t) {
31
+ e.forEach(function(e2) {
32
+ addToResult(n, o, e2, t);
33
+ });
34
+ }
35
+ function stringify(n, o) {
36
+ var e = assignProps({
37
+ encode: encodeURIComponent
38
+ }, o), t = [];
39
+ var i, r;
40
+ for (i in n) hasOwnProp(n, i) && (r = n[i], Array.isArray(r) ? handleMultiValues(t, i, r, e) : addToResult(t, i, r, e));
41
+ return t.join("&");
42
+ }
43
+ function splitURL(e) {
44
+ var t = {
45
+ leftContext: ""
46
+ };
47
+ var n = e.indexOf("#");
48
+ return -1 !== n && (t.hash = e.slice(n + 1), e = e.slice(0, n)), n = e.indexOf("?"), -1 !== n && (t.search = e.slice(n + 1), e = e.slice(0, n)), t.leftContext = e, t;
49
+ }
50
+ function joinURL(e) {
51
+ var t = e.leftContext;
52
+ return null != e.search && (t += "?" + e.search), null != e.hash && (t += "#" + e.hash), t;
53
+ }
54
+ function concat(i, r, t) {
55
+ if (i = String(i), null == r) return i;
56
+ if (!(r = "string" == typeof r ? r.replace(/^[?&]/, "") : stringify(r, t))) return i;
57
+ var n = splitURL(i);
58
+ var e = n.search || "";
59
+ return e && "&" !== e.slice(-1) && (e += "&"), e += r, n.search = e, joinURL(n);
60
+ }
61
+ function boolToYN(o) {
62
+ if ("boolean" != typeof o) throw new Error("The value argument must be a boolean type");
63
+ return o ? "Y" : "N";
64
+ }
65
+ function ynToBool(o, n) {
66
+ var e = String(o).toUpperCase();
67
+ if ("Y" !== e && "N" !== e) {
68
+ if (null == n) throw new Error('The value argument must be "Y" or "N"');
69
+ e = String(n).toUpperCase();
70
+ }
71
+ return "Y" === e;
72
+ }
73
+ function _typeof$7(o) {
74
+ "@babel/helpers - typeof";
75
+ return _typeof$7 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o2) {
76
+ return typeof o2;
77
+ } : function(o2) {
78
+ return o2 && "function" == typeof Symbol && o2.constructor === Symbol && o2 !== Symbol.prototype ? "symbol" : typeof o2;
79
+ }, _typeof$7(o);
80
+ }
81
+ function _classCallCheck$a(a, n) {
82
+ if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function");
83
+ }
84
+ function _defineProperties$5(e, r) {
85
+ for (var t = 0; t < r.length; t++) {
86
+ var o = r[t];
87
+ o.enumerable = o.enumerable || false, o.configurable = true, "value" in o && (o.writable = true), Object.defineProperty(e, _toPropertyKey$7(o.key), o);
88
+ }
89
+ }
90
+ function _createClass$a(e, r, t) {
91
+ return r && _defineProperties$5(e.prototype, r), Object.defineProperty(e, "prototype", { writable: false }), e;
92
+ }
93
+ function _toPropertyKey$7(t) {
94
+ var i = _toPrimitive$7(t, "string");
95
+ return "symbol" == _typeof$7(i) ? i : i + "";
96
+ }
97
+ function _toPrimitive$7(t, r) {
98
+ if ("object" != _typeof$7(t) || !t) return t;
99
+ var e = t[Symbol.toPrimitive];
100
+ if (void 0 !== e) {
101
+ var i = e.call(t, r);
102
+ if ("object" != _typeof$7(i)) return i;
103
+ throw new TypeError("@@toPrimitive must return a primitive value.");
104
+ }
105
+ return String(t);
106
+ }
107
+ var EventEmitter = /* @__PURE__ */ (function() {
108
+ function EventEmitter2() {
109
+ _classCallCheck$a(this, EventEmitter2);
110
+ this.__eventStore = {};
111
+ }
112
+ return _createClass$a(EventEmitter2, [{
113
+ key: "__addOnEvent",
114
+ value: function __addOnEvent(t, e, n, o) {
115
+ if (!e || !n) return;
116
+ var r = this.__eventStore[e];
117
+ r || (r = []), r.push({
118
+ type: t,
119
+ handler: n,
120
+ callbackHandler: n.bind(o)
121
+ }), this.__eventStore[e] = r;
122
+ }
123
+ }, {
124
+ key: "on",
125
+ value: function on(t, e) {
126
+ var n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : this;
127
+ this.__addOnEvent("normal", t, e, n);
128
+ }
129
+ }, {
130
+ key: "once",
131
+ value: function once(t, e) {
132
+ var n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : this;
133
+ this.__addOnEvent("once", t, e, n);
134
+ }
135
+ }, {
136
+ key: "off",
137
+ value: function off(t, e) {
138
+ var n = this.__eventStore[t];
139
+ n && (n = n.filter(function(t2) {
140
+ return t2.handler !== e;
141
+ }), this.__eventStore[t] = n);
142
+ }
143
+ }, {
144
+ key: "emit",
145
+ value: function emit(t, e, n) {
146
+ var _this = this;
147
+ var o = this.__eventStore[t];
148
+ o && o.forEach(function(o2) {
149
+ var r = o2.type, _ = o2.handler, s = o2.callbackHandler;
150
+ "function" == typeof s && s(e, n), "once" === r && _this.off(t, _);
151
+ });
152
+ }
153
+ }, {
154
+ key: "destroy",
155
+ value: function destroy() {
156
+ this.__eventStore = {};
157
+ }
158
+ }]);
159
+ })();
160
+ var PolyvApiUrl = /* @__PURE__ */ (function(PolyvApiUrl2) {
2
161
  PolyvApiUrl2["GetProductTagList"] = "/live/v4/watch/channel/product/tag/list";
3
162
  PolyvApiUrl2["GetProductListByShowId"] = "/live/v3/sdk/watch/interactive/product/list-by-showId";
4
163
  PolyvApiUrl2["GetProductListByTag"] = "/live/v4/watch/channel/product/list";
@@ -20,6 +179,7 @@ var PolyvApiUrl = /* @__PURE__ */ function(PolyvApiUrl2) {
20
179
  PolyvApiUrl2["EndProductExplain"] = "/live/v4/channel/product/product-explain/end-now";
21
180
  PolyvApiUrl2["RestartProductExplain"] = "/live/v4/channel/product/product-explain/restart-now";
22
181
  PolyvApiUrl2["DeleteProductExplain"] = "/live/v4/channel/product/product-explain/delete";
182
+ PolyvApiUrl2["GetCurrentProductExplain"] = "/live/v4/channel/product/product-explain/get-current-product-id";
23
183
  PolyvApiUrl2["OpenProductPrice"] = "/live/v4/channel/product/open-price";
24
184
  PolyvApiUrl2["HideProductPrice"] = "/live/v4/channel/product/un-open-price";
25
185
  PolyvApiUrl2["ProductPushRule"] = "/live/v4/channel/product/push/rule";
@@ -28,19 +188,102 @@ var PolyvApiUrl = /* @__PURE__ */ function(PolyvApiUrl2) {
28
188
  PolyvApiUrl2["BatchDeleteProduct"] = "/live/v4/channel/product/delete-batch";
29
189
  PolyvApiUrl2["BatchShelfProduct"] = "/live/v4/channel/product/shelf-batch";
30
190
  return PolyvApiUrl2;
31
- }({});
32
- function boolToYN(o) {
33
- if ("boolean" != typeof o) throw new Error("The value argument must be a boolean type");
34
- return o ? "Y" : "N";
35
- }
36
- function ynToBool(o, n) {
37
- var e = String(o).toUpperCase();
38
- if ("Y" !== e && "N" !== e) {
39
- if (null == n) throw new Error('The value argument must be "Y" or "N"');
40
- e = String(n).toUpperCase();
41
- }
42
- return "Y" === e;
43
- }
191
+ })({});
192
+ var ProductPushRule = /* @__PURE__ */ (function(ProductPushRule2) {
193
+ ProductPushRule2["BigCard"] = "bigCard";
194
+ ProductPushRule2["SmallCard"] = "smallCard";
195
+ return ProductPushRule2;
196
+ })({});
197
+ var ProductEvents = /* @__PURE__ */ (function(ProductEvents2) {
198
+ ProductEvents2["OnSaleProduct"] = "OnSaleProduct";
199
+ ProductEvents2["OffSaleProduct"] = "OffSaleProduct";
200
+ ProductEvents2["AddProduct"] = "AddProduct";
201
+ ProductEvents2["DeleteProduct"] = "DeleteProduct";
202
+ ProductEvents2["ChangeProduct"] = "ChangeProduct";
203
+ ProductEvents2["MoveProduct"] = "MoveProduct";
204
+ ProductEvents2["ChangeProductRank"] = "ChangeProductRank";
205
+ ProductEvents2["ProductSoldOut"] = "ProductSoldOut";
206
+ ProductEvents2["PushProduct"] = "PushProduct";
207
+ ProductEvents2["CancelPushProduct"] = "CancelPushProduct";
208
+ ProductEvents2["ProductListEnabled"] = "ProductListEnabled";
209
+ ProductEvents2["RefreshProductList"] = "RefreshProductList";
210
+ ProductEvents2["ProductClick"] = "ProductClick";
211
+ ProductEvents2["ProductClickTimes"] = "ProductClickTimes";
212
+ return ProductEvents2;
213
+ })({});
214
+ var ProductType = /* @__PURE__ */ (function(ProductType2) {
215
+ ProductType2["Normal"] = "normal";
216
+ ProductType2["Finance"] = "finance";
217
+ ProductType2["Position"] = "position";
218
+ return ProductType2;
219
+ })({});
220
+ var ProductLinkType = /* @__PURE__ */ (function(ProductLinkType2) {
221
+ ProductLinkType2[ProductLinkType2["Normal"] = 10] = "Normal";
222
+ ProductLinkType2[ProductLinkType2["MultiPlatform"] = 11] = "MultiPlatform";
223
+ ProductLinkType2[ProductLinkType2["Native"] = 12] = "Native";
224
+ return ProductLinkType2;
225
+ })({});
226
+ var ProductLinkJumpWay = /* @__PURE__ */ (function(ProductLinkJumpWay2) {
227
+ ProductLinkJumpWay2["PopUp"] = "POP_UP";
228
+ ProductLinkJumpWay2["NewWindow"] = "NEW_WINDOW";
229
+ ProductLinkJumpWay2["CurrentWindow"] = "CURRENT_WINDOW";
230
+ return ProductLinkJumpWay2;
231
+ })({});
232
+ var ProductStatus = /* @__PURE__ */ (function(ProductStatus2) {
233
+ ProductStatus2[ProductStatus2["OnSale"] = 1] = "OnSale";
234
+ ProductStatus2[ProductStatus2["OffSale"] = 2] = "OffSale";
235
+ return ProductStatus2;
236
+ })({});
237
+ var ProductMediaType = /* @__PURE__ */ (function(ProductMediaType2) {
238
+ ProductMediaType2["Image"] = "image";
239
+ ProductMediaType2["MaterialVideo"] = "material-video";
240
+ return ProductMediaType2;
241
+ })({});
242
+ var ProductExplainStatus = /* @__PURE__ */ (function(ProductExplainStatus2) {
243
+ ProductExplainStatus2["NotExplained"] = "notExplained";
244
+ ProductExplainStatus2["Explaining"] = "explaining";
245
+ ProductExplainStatus2["Explained"] = "explained";
246
+ return ProductExplainStatus2;
247
+ })({});
248
+ var ProductExplainType = /* @__PURE__ */ (function(ProductExplainType2) {
249
+ ProductExplainType2["Live"] = "live";
250
+ ProductExplainType2["Playback"] = "recordFile";
251
+ return ProductExplainType2;
252
+ })({});
253
+ var ProductExplainOperation = /* @__PURE__ */ (function(ProductExplainOperation2) {
254
+ ProductExplainOperation2["Start"] = "start";
255
+ ProductExplainOperation2["End"] = "end";
256
+ ProductExplainOperation2["Restart"] = "restart";
257
+ return ProductExplainOperation2;
258
+ })({});
259
+ var ProductBuyType = /* @__PURE__ */ (function(ProductBuyType2) {
260
+ ProductBuyType2["DirectBuy"] = "inner";
261
+ ProductBuyType2["Link"] = "link";
262
+ return ProductBuyType2;
263
+ })({});
264
+ var ProductPriceType = /* @__PURE__ */ (function(ProductPriceType2) {
265
+ ProductPriceType2["Amount"] = "AMOUNT";
266
+ ProductPriceType2["Custom"] = "CUSTOM";
267
+ return ProductPriceType2;
268
+ })({});
269
+ var ProductDeliveryType = /* @__PURE__ */ (function(ProductDeliveryType2) {
270
+ ProductDeliveryType2["Express"] = "express";
271
+ ProductDeliveryType2["Virtual"] = "virtual";
272
+ return ProductDeliveryType2;
273
+ })({});
274
+ var ProductServiceType = /* @__PURE__ */ (function(ProductServiceType2) {
275
+ ProductServiceType2["WxWorkCode"] = "wxWorkCode";
276
+ ProductServiceType2["Custom"] = "custom";
277
+ return ProductServiceType2;
278
+ })({});
279
+ var AuthType = /* @__PURE__ */ (function(AuthType2) {
280
+ AuthType2["None"] = "none";
281
+ AuthType2["Custom"] = "custom";
282
+ AuthType2["External"] = "external";
283
+ AuthType2["Direct"] = "direct";
284
+ AuthType2["EnterpriseWeChat"] = "enterpriseWeChat";
285
+ return AuthType2;
286
+ })({});
44
287
  function canMatchKeywords(e, t) {
45
288
  e = e.toLowerCase();
46
289
  var n = /[/\s;_-]/, s = /[/\s;_-]/;
@@ -81,36 +324,36 @@ var osRules = [{
81
324
  name: "android",
82
325
  regExp: /\bAdr\s([\d.]+)(?:\b|_)/
83
326
  }];
84
- function _typeof$8(o) {
327
+ function _typeof$6(o) {
85
328
  "@babel/helpers - typeof";
86
- return _typeof$8 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o2) {
329
+ return _typeof$6 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o2) {
87
330
  return typeof o2;
88
331
  } : function(o2) {
89
332
  return o2 && "function" == typeof Symbol && o2.constructor === Symbol && o2 !== Symbol.prototype ? "symbol" : typeof o2;
90
- }, _typeof$8(o);
333
+ }, _typeof$6(o);
91
334
  }
92
- function _classCallCheck$a(a, n) {
335
+ function _classCallCheck$9(a, n) {
93
336
  if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function");
94
337
  }
95
- function _defineProperties$5(e, r) {
338
+ function _defineProperties$4(e, r) {
96
339
  for (var t = 0; t < r.length; t++) {
97
340
  var o = r[t];
98
- o.enumerable = o.enumerable || false, o.configurable = true, "value" in o && (o.writable = true), Object.defineProperty(e, _toPropertyKey$7(o.key), o);
341
+ o.enumerable = o.enumerable || false, o.configurable = true, "value" in o && (o.writable = true), Object.defineProperty(e, _toPropertyKey$6(o.key), o);
99
342
  }
100
343
  }
101
- function _createClass$a(e, r, t) {
102
- return r && _defineProperties$5(e.prototype, r), Object.defineProperty(e, "prototype", { writable: false }), e;
344
+ function _createClass$9(e, r, t) {
345
+ return r && _defineProperties$4(e.prototype, r), Object.defineProperty(e, "prototype", { writable: false }), e;
103
346
  }
104
- function _toPropertyKey$7(t) {
105
- var i = _toPrimitive$7(t, "string");
106
- return "symbol" == _typeof$8(i) ? i : i + "";
347
+ function _toPropertyKey$6(t) {
348
+ var i = _toPrimitive$6(t, "string");
349
+ return "symbol" == _typeof$6(i) ? i : i + "";
107
350
  }
108
- function _toPrimitive$7(t, r) {
109
- if ("object" != _typeof$8(t) || !t) return t;
351
+ function _toPrimitive$6(t, r) {
352
+ if ("object" != _typeof$6(t) || !t) return t;
110
353
  var e = t[Symbol.toPrimitive];
111
354
  if (void 0 !== e) {
112
355
  var i = e.call(t, r);
113
- if ("object" != _typeof$8(i)) return i;
356
+ if ("object" != _typeof$6(i)) return i;
114
357
  throw new TypeError("@@toPrimitive must return a primitive value.");
115
358
  }
116
359
  return String(t);
@@ -123,12 +366,12 @@ function compareVersions(r, e) {
123
366
  }
124
367
  return n.length - s.length;
125
368
  }
126
- var Version = /* @__PURE__ */ function() {
369
+ var Version = /* @__PURE__ */ (function() {
127
370
  function Version2(r) {
128
- _classCallCheck$a(this, Version2);
371
+ _classCallCheck$9(this, Version2);
129
372
  this._ver = (r || "").replace(/_/g, ".").replace(/\.+$/, ""), Object.freeze(this);
130
373
  }
131
- return _createClass$a(Version2, [{
374
+ return _createClass$9(Version2, [{
132
375
  key: "_compare",
133
376
  value: function _compare(r, e) {
134
377
  if (!this._ver || !r) return false;
@@ -168,11 +411,11 @@ var Version = /* @__PURE__ */ function() {
168
411
  return this._ver;
169
412
  }
170
413
  }]);
171
- }();
172
- function _createClass$9(e, r, t) {
414
+ })();
415
+ function _createClass$8(e, r, t) {
173
416
  return Object.defineProperty(e, "prototype", { writable: false }), e;
174
417
  }
175
- function _classCallCheck$9(a, n) {
418
+ function _classCallCheck$8(a, n) {
176
419
  if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function");
177
420
  }
178
421
  var propMap$3 = {
@@ -196,8 +439,8 @@ function platformToOS(s) {
196
439
  return "windows";
197
440
  }
198
441
  }
199
- var OSInfo = /* @__PURE__ */ _createClass$9(function OSInfo2(s, o) {
200
- _classCallCheck$9(this, OSInfo2);
442
+ var OSInfo = /* @__PURE__ */ _createClass$8(function OSInfo2(s, o) {
443
+ _classCallCheck$8(this, OSInfo2);
201
444
  var i;
202
445
  var e;
203
446
  if (this.isIOS = false, this.isAndroid = false, this.isHarmonyOS = false, this.isOpenHarmony = false, this.isWindows = false, this.isMacOS = false, null == o ? void 0 : o.platform) {
@@ -329,10 +572,10 @@ var androidRules = [{
329
572
  name: "vivo",
330
573
  modelRegExp: /^V[12]\d{3}[A-Z]{0,2}$/
331
574
  }];
332
- function _createClass$8(e, r, t) {
575
+ function _createClass$7(e, r, t) {
333
576
  return Object.defineProperty(e, "prototype", { writable: false }), e;
334
577
  }
335
- function _classCallCheck$8(a, n) {
578
+ function _classCallCheck$7(a, n) {
336
579
  if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function");
337
580
  }
338
581
  var propMap$2 = {
@@ -346,8 +589,8 @@ var propMap$2 = {
346
589
  oneplus: "isOnePlus",
347
590
  samsung: "isSamsung"
348
591
  };
349
- var BrandInfo = /* @__PURE__ */ _createClass$8(function BrandInfo2(i, s) {
350
- _classCallCheck$8(this, BrandInfo2);
592
+ var BrandInfo = /* @__PURE__ */ _createClass$7(function BrandInfo2(i, s) {
593
+ _classCallCheck$7(this, BrandInfo2);
351
594
  var e;
352
595
  if (this.isHuawei = false, this.isMi = false, this.isOppo = false, this.isVivo = false, this.isOnePlus = false, this.isSamsung = false, this.isIPod = false, this.isIPhone = false, this.isIPad = false, this.isMac = false, this.isApple = false, s.isIOS ? (e = appleRules, this.isApple = true) : s.isMacOS ? (this.isMac = true, this.isApple = true) : (s.isAndroid || s.isOpenHarmony) && (e = androidRules), e) {
353
596
  var o = execRules(i, e);
@@ -377,10 +620,10 @@ var browserRules = [{
377
620
  name: "opera-presto",
378
621
  regExp: /\bOpera\/([\d.]+)/
379
622
  }];
380
- function _createClass$7(e, r, t) {
623
+ function _createClass$6(e, r, t) {
381
624
  return Object.defineProperty(e, "prototype", { writable: false }), e;
382
625
  }
383
- function _classCallCheck$7(a, n) {
626
+ function _classCallCheck$6(a, n) {
384
627
  if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function");
385
628
  }
386
629
  var propMap$1 = {
@@ -391,8 +634,8 @@ var propMap$1 = {
391
634
  firefox: "isFirefox",
392
635
  "opera-presto": "isPrestoOpera"
393
636
  };
394
- var BrowserInfo = /* @__PURE__ */ _createClass$7(function BrowserInfo2(e) {
395
- _classCallCheck$7(this, BrowserInfo2);
637
+ var BrowserInfo = /* @__PURE__ */ _createClass$6(function BrowserInfo2(e) {
638
+ _classCallCheck$6(this, BrowserInfo2);
396
639
  this.isChrome = false, this.isSafari = false, this.isEdge = false, this.isIE = false, this.isFirefox = false, this.isPrestoOpera = false;
397
640
  var s = execRules(e, browserRules);
398
641
  s ? (this[propMap$1[s.name]] = true, this.version = new Version(s.version)) : this.version = new Version(""), Object.freeze(this);
@@ -453,10 +696,10 @@ var clientRules = [{
453
696
  regExp: /\bbaiduboxpad\b/i
454
697
  }];
455
698
  clientRules = clientRules.concat(browserRules);
456
- function _createClass$6(e, r, t) {
699
+ function _createClass$5(e, r, t) {
457
700
  return Object.defineProperty(e, "prototype", { writable: false }), e;
458
701
  }
459
- function _classCallCheck$6(a, n) {
702
+ function _classCallCheck$5(a, n) {
460
703
  if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function");
461
704
  }
462
705
  var propMap = {
@@ -480,202 +723,69 @@ var propMap = {
480
723
  ie: "isIE",
481
724
  firefox: "isFirefox"
482
725
  };
483
- var ClientInfo = /* @__PURE__ */ _createClass$6(function ClientInfo2(i) {
484
- _classCallCheck$6(this, ClientInfo2);
726
+ var ClientInfo = /* @__PURE__ */ _createClass$5(function ClientInfo2(i) {
727
+ _classCallCheck$5(this, ClientInfo2);
485
728
  this.isWxWork = false, this.isWx = false, this.isWxMiniProgram = false, this.isDing = false, this.isQQ = false, this.isWeibo = false, this.isEdge = false, this.isOpera = false, this.isQQBrowser = false, this.isUCBrowser = false, this.isQuark = false, this.isMaxthon = false, this.isTheWorld = false, this.isBaiduBrowser = false, this.isBaiduApp = false, this.isChrome = false, this.isSafari = false, this.isIE = false, this.isFirefox = false;
486
729
  var s = execRules(i, clientRules);
487
- s ? (this[propMap[s.name]] = true, this.version = new Version(s.version)) : this.version = new Version(""), this.isWxMiniProgram = (this.isWx || this.isWxWork) && /\bMiniProgramEnv\b/.test(i), Object.freeze(this);
488
- });
489
- function _createClass$5(e, r, t) {
490
- return Object.defineProperty(e, "prototype", { writable: false }), e;
491
- }
492
- function _classCallCheck$5(a, n) {
493
- if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function");
494
- }
495
- var UAInfo = /* @__PURE__ */ _createClass$5(function UAInfo2(t, i) {
496
- _classCallCheck$5(this, UAInfo2);
497
- this.os = Object.freeze(new OSInfo(t, i)), this.brand = Object.freeze(new BrandInfo(t, this.os)), this.browser = Object.freeze(new BrowserInfo(t)), this.client = Object.freeze(new ClientInfo(t)), this.isTablet = this.brand.isIPad || /\bTablet\b/i.test(t) || this.os.isAndroid && !/\bMobile\b/i.test(t), this.os.isIOS || this.os.isAndroid || this.isTablet ? this.isPortable = true : /\(X11[;)]/i.test(t) || /\b(Windows\sNT|Macintosh)\b/.test(t) ? this.isPortable = false : this.isPortable = /mobile|android/i.test(t), Object.freeze(this);
498
- });
499
- var currentUAInfo;
500
- function getCurrentUAInfo() {
501
- return currentUAInfo || (currentUAInfo = Object.freeze("undefined" != typeof window ? new UAInfo(window.navigator.userAgent, window.navigator) : new UAInfo(""))), currentUAInfo;
502
- }
503
- var hasOwnProperty = Object.prototype.hasOwnProperty;
504
- function hasOwnProp(r, n) {
505
- return hasOwnProperty.call(r, n);
506
- }
507
- function assignProps(r) {
508
- if (null == r) throw new TypeError("Cannot convert undefined or null to object");
509
- for (var o = 0; o < (arguments.length <= 1 ? 0 : arguments.length - 1); o++) {
510
- var t = o + 1 < 1 || arguments.length <= o + 1 ? void 0 : arguments[o + 1];
511
- if (null != t) for (var n in t) "__proto__" !== n && hasOwnProp(t, n) && (r[n] = t[n]);
512
- }
513
- return r;
514
- }
515
- function _typeof$7(o) {
516
- "@babel/helpers - typeof";
517
- return _typeof$7 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o2) {
518
- return typeof o2;
519
- } : function(o2) {
520
- return o2 && "function" == typeof Symbol && o2.constructor === Symbol && o2 !== Symbol.prototype ? "symbol" : typeof o2;
521
- }, _typeof$7(o);
522
- }
523
- function addToResult(n, o, e, t) {
524
- if (null == e && (e = ""), "" !== e || !t.ignoreEmpty) {
525
- if ("function" == typeof t.encode) {
526
- o = t.encode(o);
527
- e = -1 !== ["boolean", "string", "number"].indexOf(_typeof$7(e)) ? t.encode(String(e)) : "";
528
- }
529
- n.push(o + "=" + e);
530
- }
531
- }
532
- function handleMultiValues(n, o, e, t) {
533
- e.forEach(function(e2) {
534
- addToResult(n, o, e2, t);
535
- });
536
- }
537
- function stringify(n, o) {
538
- var e = assignProps({
539
- encode: encodeURIComponent
540
- }, o), t = [];
541
- var i, r;
542
- for (i in n) hasOwnProp(n, i) && (r = n[i], Array.isArray(r) ? handleMultiValues(t, i, r, e) : addToResult(t, i, r, e));
543
- return t.join("&");
544
- }
545
- function splitURL(e) {
546
- var t = {
547
- leftContext: ""
548
- };
549
- var n = e.indexOf("#");
550
- return -1 !== n && (t.hash = e.slice(n + 1), e = e.slice(0, n)), n = e.indexOf("?"), -1 !== n && (t.search = e.slice(n + 1), e = e.slice(0, n)), t.leftContext = e, t;
730
+ s ? (this[propMap[s.name]] = true, this.version = new Version(s.version)) : this.version = new Version(""), this.isWxMiniProgram = (this.isWx || this.isWxWork) && /\bMiniProgramEnv\b/.test(i), Object.freeze(this);
731
+ });
732
+ function _createClass$4(e, r, t) {
733
+ return Object.defineProperty(e, "prototype", { writable: false }), e;
551
734
  }
552
- function joinURL(e) {
553
- var t = e.leftContext;
554
- return null != e.search && (t += "?" + e.search), null != e.hash && (t += "#" + e.hash), t;
735
+ function _classCallCheck$4(a, n) {
736
+ if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function");
555
737
  }
556
- function concat(i, r, t) {
557
- if (i = String(i), null == r) return i;
558
- if (!(r = "string" == typeof r ? r.replace(/^[?&]/, "") : stringify(r, t))) return i;
559
- var n = splitURL(i);
560
- var e = n.search || "";
561
- return e && "&" !== e.slice(-1) && (e += "&"), e += r, n.search = e, joinURL(n);
738
+ var UAInfo = /* @__PURE__ */ _createClass$4(function UAInfo2(t, i) {
739
+ _classCallCheck$4(this, UAInfo2);
740
+ this.os = Object.freeze(new OSInfo(t, i)), this.brand = Object.freeze(new BrandInfo(t, this.os)), this.browser = Object.freeze(new BrowserInfo(t)), this.client = Object.freeze(new ClientInfo(t)), this.isTablet = this.brand.isIPad || /\bTablet\b/i.test(t) || this.os.isAndroid && !/\bMobile\b/i.test(t), this.os.isIOS || this.os.isAndroid || this.isTablet ? this.isPortable = true : /\(X11[;)]/i.test(t) || /\b(Windows\sNT|Macintosh)\b/.test(t) ? this.isPortable = false : this.isPortable = /mobile|android/i.test(t), Object.freeze(this);
741
+ });
742
+ var currentUAInfo;
743
+ function getCurrentUAInfo() {
744
+ return currentUAInfo || (currentUAInfo = Object.freeze("undefined" != typeof window ? new UAInfo(window.navigator.userAgent, window.navigator) : new UAInfo(""))), currentUAInfo;
562
745
  }
563
746
  (function(i, n, o, t) {
564
747
  return new (o || (o = Promise))(function(e, a) {
565
748
  function r(i2) {
566
749
  try {
567
- k(t.next(i2));
750
+ d(t.next(i2));
568
751
  } catch (i3) {
569
752
  a(i3);
570
753
  }
571
754
  }
572
755
  function l(i2) {
573
756
  try {
574
- k(t["throw"](i2));
757
+ d(t["throw"](i2));
575
758
  } catch (i3) {
576
759
  a(i3);
577
760
  }
578
761
  }
579
- function k(i2) {
762
+ function d(i2) {
580
763
  var n2;
581
764
  i2.done ? e(i2.value) : (n2 = i2.value, n2 instanceof o ? n2 : new o(function(i3) {
582
765
  i3(n2);
583
766
  })).then(r, l);
584
767
  }
585
- k((t = t.apply(i, n || [])).next());
768
+ d((t = t.apply(i, n || [])).next());
586
769
  });
587
770
  });
588
771
  var uaInfo = getCurrentUAInfo();
589
772
  uaInfo.os.isAndroid;
590
773
  uaInfo.os.isIOS;
591
774
  var LinkType;
592
- !function(i) {
775
+ !(function(i) {
593
776
  i[i.Normal = 10] = "Normal", i[i.MultiPlatform = 11] = "MultiPlatform", i[i.Native = 12] = "Native";
594
- }(LinkType || (LinkType = {}));
777
+ })(LinkType || (LinkType = {}));
595
778
  var LinkJumpWay;
596
- !function(i) {
779
+ !(function(i) {
597
780
  i.PopUp = "POP_UP", i.NewWindow = "NEW_WINDOW", i.CurrentWindow = "CURRENT_WINDOW";
598
- }(LinkJumpWay || (LinkJumpWay = {}));
599
- var ProductType = /* @__PURE__ */ function(ProductType2) {
600
- ProductType2["Normal"] = "normal";
601
- ProductType2["Finance"] = "finance";
602
- ProductType2["Position"] = "position";
603
- return ProductType2;
604
- }({});
605
- var ProductLinkType = /* @__PURE__ */ function(ProductLinkType2) {
606
- ProductLinkType2[ProductLinkType2["Normal"] = 10] = "Normal";
607
- ProductLinkType2[ProductLinkType2["MultiPlatform"] = 11] = "MultiPlatform";
608
- ProductLinkType2[ProductLinkType2["Native"] = 12] = "Native";
609
- return ProductLinkType2;
610
- }({});
611
- var ProductLinkJumpWay = /* @__PURE__ */ function(ProductLinkJumpWay2) {
612
- ProductLinkJumpWay2["PopUp"] = "POP_UP";
613
- ProductLinkJumpWay2["NewWindow"] = "NEW_WINDOW";
614
- ProductLinkJumpWay2["CurrentWindow"] = "CURRENT_WINDOW";
615
- return ProductLinkJumpWay2;
616
- }({});
617
- var ProductStatus = /* @__PURE__ */ function(ProductStatus2) {
618
- ProductStatus2[ProductStatus2["OnSale"] = 1] = "OnSale";
619
- ProductStatus2[ProductStatus2["OffSale"] = 2] = "OffSale";
620
- return ProductStatus2;
621
- }({});
622
- var ProductMediaType = /* @__PURE__ */ function(ProductMediaType2) {
623
- ProductMediaType2["Image"] = "image";
624
- ProductMediaType2["MaterialVideo"] = "material-video";
625
- return ProductMediaType2;
626
- }({});
627
- var ProductExplainStatus = /* @__PURE__ */ function(ProductExplainStatus2) {
628
- ProductExplainStatus2["NotExplained"] = "notExplained";
629
- ProductExplainStatus2["Explaining"] = "explaining";
630
- ProductExplainStatus2["Explained"] = "explained";
631
- return ProductExplainStatus2;
632
- }({});
633
- var ProductExplainType = /* @__PURE__ */ function(ProductExplainType2) {
634
- ProductExplainType2["Live"] = "live";
635
- ProductExplainType2["Playback"] = "recordFile";
636
- return ProductExplainType2;
637
- }({});
638
- var ProductExplainOperation = /* @__PURE__ */ function(ProductExplainOperation2) {
639
- ProductExplainOperation2["Start"] = "start";
640
- ProductExplainOperation2["End"] = "end";
641
- ProductExplainOperation2["Restart"] = "restart";
642
- return ProductExplainOperation2;
643
- }({});
644
- var ProductBuyType = /* @__PURE__ */ function(ProductBuyType2) {
645
- ProductBuyType2["DirectBuy"] = "inner";
646
- ProductBuyType2["Link"] = "link";
647
- return ProductBuyType2;
648
- }({});
649
- var ProductPriceType = /* @__PURE__ */ function(ProductPriceType2) {
650
- ProductPriceType2["Amount"] = "AMOUNT";
651
- ProductPriceType2["Custom"] = "CUSTOM";
652
- return ProductPriceType2;
653
- }({});
654
- var ProductDeliveryType = /* @__PURE__ */ function(ProductDeliveryType2) {
655
- ProductDeliveryType2["Express"] = "express";
656
- ProductDeliveryType2["Virtual"] = "virtual";
657
- return ProductDeliveryType2;
658
- }({});
659
- var ProductServiceType = /* @__PURE__ */ function(ProductServiceType2) {
660
- ProductServiceType2["WxWorkCode"] = "wxWorkCode";
661
- ProductServiceType2["Custom"] = "custom";
662
- return ProductServiceType2;
663
- }({});
664
- var AuthType = /* @__PURE__ */ function(AuthType2) {
665
- AuthType2["None"] = "none";
666
- AuthType2["Custom"] = "custom";
667
- AuthType2["External"] = "external";
668
- AuthType2["Direct"] = "direct";
669
- AuthType2["EnterpriseWeChat"] = "enterpriseWeChat";
670
- return AuthType2;
671
- }({});
672
- function _typeof$6(o) {
781
+ })(LinkJumpWay || (LinkJumpWay = {}));
782
+ function _typeof$5(o) {
673
783
  "@babel/helpers - typeof";
674
- return _typeof$6 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o2) {
784
+ return _typeof$5 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o2) {
675
785
  return typeof o2;
676
786
  } : function(o2) {
677
787
  return o2 && "function" == typeof Symbol && o2.constructor === Symbol && o2 !== Symbol.prototype ? "symbol" : typeof o2;
678
- }, _typeof$6(o);
788
+ }, _typeof$5(o);
679
789
  }
680
790
  function ownKeys$4(e, r) {
681
791
  var t = Object.keys(e);
@@ -699,18 +809,18 @@ function _objectSpread$4(e) {
699
809
  return e;
700
810
  }
701
811
  function _defineProperty$5(e, r, t) {
702
- return (r = _toPropertyKey$6(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: true, configurable: true, writable: true }) : e[r] = t, e;
812
+ return (r = _toPropertyKey$5(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: true, configurable: true, writable: true }) : e[r] = t, e;
703
813
  }
704
- function _toPropertyKey$6(t) {
705
- var i = _toPrimitive$6(t, "string");
706
- return "symbol" == _typeof$6(i) ? i : i + "";
814
+ function _toPropertyKey$5(t) {
815
+ var i = _toPrimitive$5(t, "string");
816
+ return "symbol" == _typeof$5(i) ? i : i + "";
707
817
  }
708
- function _toPrimitive$6(t, r) {
709
- if ("object" != _typeof$6(t) || !t) return t;
818
+ function _toPrimitive$5(t, r) {
819
+ if ("object" != _typeof$5(t) || !t) return t;
710
820
  var e = t[Symbol.toPrimitive];
711
821
  if (void 0 !== e) {
712
822
  var i = e.call(t, r);
713
- if ("object" != _typeof$6(i)) return i;
823
+ if ("object" != _typeof$5(i)) return i;
714
824
  throw new TypeError("@@toPrimitive must return a primitive value.");
715
825
  }
716
826
  return ("string" === r ? String : Number)(t);
@@ -846,115 +956,6 @@ function filterInternalData(internalData) {
846
956
  }
847
957
  return productData;
848
958
  }
849
- function _typeof$5(o) {
850
- "@babel/helpers - typeof";
851
- return _typeof$5 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o2) {
852
- return typeof o2;
853
- } : function(o2) {
854
- return o2 && "function" == typeof Symbol && o2.constructor === Symbol && o2 !== Symbol.prototype ? "symbol" : typeof o2;
855
- }, _typeof$5(o);
856
- }
857
- function _classCallCheck$4(a, n) {
858
- if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function");
859
- }
860
- function _defineProperties$4(e, r) {
861
- for (var t = 0; t < r.length; t++) {
862
- var o = r[t];
863
- o.enumerable = o.enumerable || false, o.configurable = true, "value" in o && (o.writable = true), Object.defineProperty(e, _toPropertyKey$5(o.key), o);
864
- }
865
- }
866
- function _createClass$4(e, r, t) {
867
- return r && _defineProperties$4(e.prototype, r), Object.defineProperty(e, "prototype", { writable: false }), e;
868
- }
869
- function _toPropertyKey$5(t) {
870
- var i = _toPrimitive$5(t, "string");
871
- return "symbol" == _typeof$5(i) ? i : i + "";
872
- }
873
- function _toPrimitive$5(t, r) {
874
- if ("object" != _typeof$5(t) || !t) return t;
875
- var e = t[Symbol.toPrimitive];
876
- if (void 0 !== e) {
877
- var i = e.call(t, r);
878
- if ("object" != _typeof$5(i)) return i;
879
- throw new TypeError("@@toPrimitive must return a primitive value.");
880
- }
881
- return String(t);
882
- }
883
- var EventEmitter = /* @__PURE__ */ function() {
884
- function EventEmitter2() {
885
- _classCallCheck$4(this, EventEmitter2);
886
- this.__eventStore = {};
887
- }
888
- return _createClass$4(EventEmitter2, [{
889
- key: "__addOnEvent",
890
- value: function __addOnEvent(t, e, n, o) {
891
- if (!e || !n) return;
892
- var r = this.__eventStore[e];
893
- r || (r = []), r.push({
894
- type: t,
895
- handler: n,
896
- callbackHandler: n.bind(o)
897
- }), this.__eventStore[e] = r;
898
- }
899
- }, {
900
- key: "on",
901
- value: function on(t, e) {
902
- var n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : this;
903
- this.__addOnEvent("normal", t, e, n);
904
- }
905
- }, {
906
- key: "once",
907
- value: function once(t, e) {
908
- var n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : this;
909
- this.__addOnEvent("once", t, e, n);
910
- }
911
- }, {
912
- key: "off",
913
- value: function off(t, e) {
914
- var n = this.__eventStore[t];
915
- n && (n = n.filter(function(t2) {
916
- return t2.handler !== e;
917
- }), this.__eventStore[t] = n);
918
- }
919
- }, {
920
- key: "emit",
921
- value: function emit(t, e) {
922
- var _this = this;
923
- var n = this.__eventStore[t];
924
- n && n.forEach(function(n2) {
925
- var o = n2.type, r = n2.handler, _ = n2.callbackHandler;
926
- "function" == typeof _ && _(e), "once" === o && _this.off(t, r);
927
- });
928
- }
929
- }, {
930
- key: "destroy",
931
- value: function destroy() {
932
- this.__eventStore = {};
933
- }
934
- }]);
935
- }();
936
- var ProductPushRule = /* @__PURE__ */ function(ProductPushRule2) {
937
- ProductPushRule2["BigCard"] = "bigCard";
938
- ProductPushRule2["SmallCard"] = "smallCard";
939
- return ProductPushRule2;
940
- }({});
941
- var ProductEvents = /* @__PURE__ */ function(ProductEvents2) {
942
- ProductEvents2["OnSaleProduct"] = "OnSaleProduct";
943
- ProductEvents2["OffSaleProduct"] = "OffSaleProduct";
944
- ProductEvents2["AddProduct"] = "AddProduct";
945
- ProductEvents2["DeleteProduct"] = "DeleteProduct";
946
- ProductEvents2["ChangeProduct"] = "ChangeProduct";
947
- ProductEvents2["MoveProduct"] = "MoveProduct";
948
- ProductEvents2["ChangeProductRank"] = "ChangeProductRank";
949
- ProductEvents2["ProductSoldOut"] = "ProductSoldOut";
950
- ProductEvents2["PushProduct"] = "PushProduct";
951
- ProductEvents2["CancelPushProduct"] = "CancelPushProduct";
952
- ProductEvents2["ProductListEnabled"] = "ProductListEnabled";
953
- ProductEvents2["RefreshProductList"] = "RefreshProductList";
954
- ProductEvents2["ProductClick"] = "ProductClick";
955
- ProductEvents2["ProductClickTimes"] = "ProductClickTimes";
956
- return ProductEvents2;
957
- }({});
958
959
  function _typeof$4(o) {
959
960
  "@babel/helpers - typeof";
960
961
  return _typeof$4 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o2) {
@@ -989,7 +990,7 @@ function _regenerator$3() {
989
990
  var e, t, r = "function" == typeof Symbol ? Symbol : {}, n = r.iterator || "@@iterator", o = r.toStringTag || "@@toStringTag";
990
991
  function i(r2, n2, o2, i2) {
991
992
  var c2 = n2 && n2.prototype instanceof Generator ? n2 : Generator, u2 = Object.create(c2.prototype);
992
- return _regeneratorDefine2$3(u2, "_invoke", function(r3, n3, o3) {
993
+ return _regeneratorDefine2$3(u2, "_invoke", (function(r3, n3, o3) {
993
994
  var i3, c3, u3, f2 = 0, p = o3 || [], y = false, G = { p: 0, n: 0, v: e, a: d, f: d.bind(e, 4), d: function d2(t2, r4) {
994
995
  return i3 = t2, c3 = 0, u3 = e, G.n = r4, a;
995
996
  } };
@@ -1022,7 +1023,7 @@ function _regenerator$3() {
1022
1023
  }
1023
1024
  return { value: t, done: y };
1024
1025
  };
1025
- }(r2, o2, i2), true), u2;
1026
+ })(r2, o2, i2), true), u2;
1026
1027
  }
1027
1028
  var a = {};
1028
1029
  function Generator() {
@@ -1054,15 +1055,12 @@ function _regeneratorDefine2$3(e, r, n, t) {
1054
1055
  i = 0;
1055
1056
  }
1056
1057
  _regeneratorDefine2$3 = function _regeneratorDefine(e2, r2, n2, t2) {
1057
- if (r2) i ? i(e2, r2, { value: n2, enumerable: !t2, configurable: !t2, writable: !t2 }) : e2[r2] = n2;
1058
- else {
1059
- var o = function o2(r3, n3) {
1060
- _regeneratorDefine2$3(e2, r3, function(e3) {
1061
- return this._invoke(r3, n3, e3);
1062
- });
1063
- };
1064
- o("next", 0), o("throw", 1), o("return", 2);
1058
+ function o(r3, n3) {
1059
+ _regeneratorDefine2$3(e2, r3, function(e3) {
1060
+ return this._invoke(r3, n3, e3);
1061
+ });
1065
1062
  }
1063
+ r2 ? i ? i(e2, r2, { value: n2, enumerable: !t2, configurable: !t2, writable: !t2 }) : e2[r2] = n2 : (o("next", 0), o("throw", 1), o("return", 2));
1066
1064
  }, _regeneratorDefine2$3(e, r, n, t);
1067
1065
  }
1068
1066
  function asyncGeneratorStep$3(n, t, e, r, o, a, c) {
@@ -1118,8 +1116,8 @@ function _toPrimitive$4(t, r) {
1118
1116
  return String(t);
1119
1117
  }
1120
1118
  var appName = "product";
1121
- var Product = /* @__PURE__ */ function() {
1122
- function Product2(iarCore, config) {
1119
+ var Product = /* @__PURE__ */ (function() {
1120
+ function Product2(interactionCore, config) {
1123
1121
  var _this = this;
1124
1122
  _classCallCheck$3(this, Product2);
1125
1123
  _defineProperty$4(this, "ProductType", ProductType);
@@ -1250,12 +1248,12 @@ var Product = /* @__PURE__ */ function() {
1250
1248
  times: socketData.times
1251
1249
  });
1252
1250
  });
1253
- this.iarCore = iarCore;
1251
+ this.interactionCore = interactionCore;
1254
1252
  this.config = config;
1255
- iarCore.addSocketHandles(appName, {
1253
+ interactionCore.addSocketHandles(appName, {
1256
1254
  PRODUCT_MESSAGE: this.__handleProductMessage
1257
1255
  });
1258
- iarCore.addSocketHandles(appName, {
1256
+ interactionCore.addSocketHandles(appName, {
1259
1257
  REFRESH_PRODUCT_LIST: this.__handleRefreshProductList,
1260
1258
  PRODUCT_CLICK: this.__handleProductClickEvent,
1261
1259
  PRODUCT_CLICK_TIMES: this.__handleProductClickTimes
@@ -1278,7 +1276,7 @@ var Product = /* @__PURE__ */ function() {
1278
1276
  */
1279
1277
  }, {
1280
1278
  key: "getProductTagList",
1281
- value: function() {
1279
+ value: (function() {
1282
1280
  var _getProductTagList = _asyncToGenerator$3(/* @__PURE__ */ _regenerator$3().m(function _callee() {
1283
1281
  var _params$pageNumber, _params$pageSize;
1284
1282
  var params, pageNumber, pageSize, _args = arguments;
@@ -1288,7 +1286,7 @@ var Product = /* @__PURE__ */ function() {
1288
1286
  params = _args.length > 0 && _args[0] !== void 0 ? _args[0] : {};
1289
1287
  pageNumber = (_params$pageNumber = params.pageNumber) !== null && _params$pageNumber !== void 0 ? _params$pageNumber : 1;
1290
1288
  pageSize = (_params$pageSize = params.pageSize) !== null && _params$pageSize !== void 0 ? _params$pageSize : 10;
1291
- return _context.a(2, this.iarCore.polyvApi.get(PolyvApiUrl.GetProductTagList, {
1289
+ return _context.a(2, this.interactionCore.polyvApi.get(PolyvApiUrl.GetProductTagList, {
1292
1290
  pageNumber,
1293
1291
  pageSize
1294
1292
  }));
@@ -1299,10 +1297,10 @@ var Product = /* @__PURE__ */ function() {
1299
1297
  return _getProductTagList.apply(this, arguments);
1300
1298
  }
1301
1299
  return getProductTagList;
1302
- }()
1300
+ })()
1303
1301
  }, {
1304
1302
  key: "getProductList",
1305
- value: function() {
1303
+ value: (function() {
1306
1304
  var _getProductList = _asyncToGenerator$3(/* @__PURE__ */ _regenerator$3().m(function _callee2() {
1307
1305
  var params, _params$count, count, productList, toppingProduct, total, _params$page, page, data, _data, _args2 = arguments;
1308
1306
  return _regenerator$3().w(function(_context2) {
@@ -1318,7 +1316,7 @@ var Product = /* @__PURE__ */ function() {
1318
1316
  }
1319
1317
  _params$page = params.page, page = _params$page === void 0 ? 1 : _params$page;
1320
1318
  _context2.n = 1;
1321
- return this.iarCore.polyvApi.get(PolyvApiUrl.GetProductListByTag, {
1319
+ return this.interactionCore.polyvApi.get(PolyvApiUrl.GetProductListByTag, {
1322
1320
  keyword: params.keyword,
1323
1321
  tagId: params.tagId,
1324
1322
  pageNumber: page,
@@ -1332,7 +1330,7 @@ var Product = /* @__PURE__ */ function() {
1332
1330
  break;
1333
1331
  case 2:
1334
1332
  _context2.n = 3;
1335
- return this.iarCore.polyvApi.get(PolyvApiUrl.GetProductListByShowId, {
1333
+ return this.interactionCore.polyvApi.get(PolyvApiUrl.GetProductListByShowId, {
1336
1334
  count,
1337
1335
  showId: params.displayNumber
1338
1336
  }, {
@@ -1358,10 +1356,10 @@ var Product = /* @__PURE__ */ function() {
1358
1356
  return _getProductList.apply(this, arguments);
1359
1357
  }
1360
1358
  return getProductList;
1361
- }()
1359
+ })()
1362
1360
  }, {
1363
1361
  key: "getLaunchProductList",
1364
- value: function() {
1362
+ value: (function() {
1365
1363
  var _getLaunchProductList = _asyncToGenerator$3(/* @__PURE__ */ _regenerator$3().m(function _callee3(params) {
1366
1364
  var _params$pageNumber2, pageNumber, _params$pageSize2, pageSize, status, keyword, data;
1367
1365
  return _regenerator$3().w(function(_context3) {
@@ -1369,7 +1367,7 @@ var Product = /* @__PURE__ */ function() {
1369
1367
  case 0:
1370
1368
  _params$pageNumber2 = params.pageNumber, pageNumber = _params$pageNumber2 === void 0 ? 1 : _params$pageNumber2, _params$pageSize2 = params.pageSize, pageSize = _params$pageSize2 === void 0 ? 10 : _params$pageSize2, status = params.status, keyword = params.keyword;
1371
1369
  _context3.n = 1;
1372
- return this.iarCore.polyvApi.get(PolyvApiUrl.GetProductListByLaunch, {
1370
+ return this.interactionCore.polyvApi.get(PolyvApiUrl.GetProductListByLaunch, {
1373
1371
  pageNumber,
1374
1372
  pageSize,
1375
1373
  status,
@@ -1395,10 +1393,10 @@ var Product = /* @__PURE__ */ function() {
1395
1393
  return _getLaunchProductList.apply(this, arguments);
1396
1394
  }
1397
1395
  return getLaunchProductList;
1398
- }()
1396
+ })()
1399
1397
  }, {
1400
1398
  key: "getProductData",
1401
- value: function() {
1399
+ value: (function() {
1402
1400
  var _getProductData = _asyncToGenerator$3(/* @__PURE__ */ _regenerator$3().m(function _callee4(productId) {
1403
1401
  var _productData$detail;
1404
1402
  var data, productData, res;
@@ -1406,7 +1404,7 @@ var Product = /* @__PURE__ */ function() {
1406
1404
  while (1) switch (_context4.n) {
1407
1405
  case 0:
1408
1406
  _context4.n = 1;
1409
- return this.iarCore.polyvApi.get(PolyvApiUrl.GetProductDataById, {
1407
+ return this.interactionCore.polyvApi.get(PolyvApiUrl.GetProductDataById, {
1410
1408
  productId
1411
1409
  }, {
1412
1410
  useAESDecrypt: true
@@ -1419,7 +1417,7 @@ var Product = /* @__PURE__ */ function() {
1419
1417
  break;
1420
1418
  }
1421
1419
  _context4.n = 2;
1422
- return this.iarCore.otherApi.get(productData.detail, {});
1420
+ return this.interactionCore.otherApi.get(productData.detail, {});
1423
1421
  case 2:
1424
1422
  res = _context4.v;
1425
1423
  productData.detail = res.productDetail;
@@ -1432,10 +1430,10 @@ var Product = /* @__PURE__ */ function() {
1432
1430
  return _getProductData.apply(this, arguments);
1433
1431
  }
1434
1432
  return getProductData;
1435
- }()
1433
+ })()
1436
1434
  }, {
1437
1435
  key: "sendProductClickEvent",
1438
- value: function() {
1436
+ value: (function() {
1439
1437
  var _sendProductClickEvent = _asyncToGenerator$3(/* @__PURE__ */ _regenerator$3().m(function _callee5(params) {
1440
1438
  var _this$config, _this$config$getProdu;
1441
1439
  var userInfo, channelInfo, productConfig;
@@ -1443,11 +1441,11 @@ var Product = /* @__PURE__ */ function() {
1443
1441
  while (1) switch (_context5.n) {
1444
1442
  case 0:
1445
1443
  _context5.n = 1;
1446
- return this.iarCore.getUserInfo();
1444
+ return this.interactionCore.getUserInfo();
1447
1445
  case 1:
1448
1446
  userInfo = _context5.v;
1449
1447
  _context5.n = 2;
1450
- return this.iarCore.getChannelInfo();
1448
+ return this.interactionCore.getChannelInfo();
1451
1449
  case 2:
1452
1450
  channelInfo = _context5.v;
1453
1451
  _context5.n = 3;
@@ -1460,7 +1458,7 @@ var Product = /* @__PURE__ */ function() {
1460
1458
  }
1461
1459
  return _context5.a(2);
1462
1460
  case 4:
1463
- this.iarCore.emitSocket({
1461
+ this.interactionCore.emitSocket({
1464
1462
  EVENT: "PRODUCT_CLICK",
1465
1463
  data: {
1466
1464
  productId: params.productId,
@@ -1479,7 +1477,7 @@ var Product = /* @__PURE__ */ function() {
1479
1477
  return _sendProductClickEvent.apply(this, arguments);
1480
1478
  }
1481
1479
  return sendProductClickEvent;
1482
- }()
1480
+ })()
1483
1481
  }, {
1484
1482
  key: "closeProductPush",
1485
1483
  value: function closeProductPush() {
@@ -1497,7 +1495,7 @@ var Product = /* @__PURE__ */ function() {
1497
1495
  */
1498
1496
  }, {
1499
1497
  key: "getProductExplainEnabled",
1500
- value: function() {
1498
+ value: (function() {
1501
1499
  var _getProductExplainEnabled = _asyncToGenerator$3(/* @__PURE__ */ _regenerator$3().m(function _callee6() {
1502
1500
  var _this$config2, _this$config2$getProd, _productConfig$produc;
1503
1501
  var productConfig;
@@ -1516,18 +1514,18 @@ var Product = /* @__PURE__ */ function() {
1516
1514
  return _getProductExplainEnabled.apply(this, arguments);
1517
1515
  }
1518
1516
  return getProductExplainEnabled;
1519
- }()
1517
+ })()
1520
1518
  }, {
1521
1519
  key: "generateProductExplainPageUrl",
1522
- value: function() {
1520
+ value: (function() {
1523
1521
  var _generateProductExplainPageUrl = _asyncToGenerator$3(/* @__PURE__ */ _regenerator$3().m(function _callee7(params) {
1524
1522
  var domainInfo, channelInfo, queryParams;
1525
1523
  return _regenerator$3().w(function(_context7) {
1526
1524
  while (1) switch (_context7.n) {
1527
1525
  case 0:
1528
- domainInfo = this.iarCore.getDomainInfo();
1526
+ domainInfo = this.interactionCore.getDomainInfo();
1529
1527
  _context7.n = 1;
1530
- return this.iarCore.getChannelInfo();
1528
+ return this.interactionCore.getChannelInfo();
1531
1529
  case 1:
1532
1530
  channelInfo = _context7.v;
1533
1531
  queryParams = _objectSpread$3({
@@ -1541,10 +1539,10 @@ var Product = /* @__PURE__ */ function() {
1541
1539
  return _generateProductExplainPageUrl.apply(this, arguments);
1542
1540
  }
1543
1541
  return generateProductExplainPageUrl;
1544
- }()
1542
+ })()
1545
1543
  }, {
1546
1544
  key: "getOutLinkProductRedirectEnabled",
1547
- value: function() {
1545
+ value: (function() {
1548
1546
  var _getOutLinkProductRedirectEnabled = _asyncToGenerator$3(/* @__PURE__ */ _regenerator$3().m(function _callee8() {
1549
1547
  var _this$config3, _this$config3$getProd, _productConfig$outLin;
1550
1548
  var productConfig;
@@ -1563,10 +1561,10 @@ var Product = /* @__PURE__ */ function() {
1563
1561
  return _getOutLinkProductRedirectEnabled.apply(this, arguments);
1564
1562
  }
1565
1563
  return getOutLinkProductRedirectEnabled;
1566
- }()
1564
+ })()
1567
1565
  }, {
1568
1566
  key: "getProductPayOrderEnabled",
1569
- value: function() {
1567
+ value: (function() {
1570
1568
  var _getProductPayOrderEnabled = _asyncToGenerator$3(/* @__PURE__ */ _regenerator$3().m(function _callee9() {
1571
1569
  var _this$config4, _this$config4$getProd, _productConfig$produc2;
1572
1570
  var productConfig;
@@ -1591,10 +1589,10 @@ var Product = /* @__PURE__ */ function() {
1591
1589
  return _getProductPayOrderEnabled.apply(this, arguments);
1592
1590
  }
1593
1591
  return getProductPayOrderEnabled;
1594
- }()
1592
+ })()
1595
1593
  }, {
1596
1594
  key: "getProductHotSaleConfig",
1597
- value: function() {
1595
+ value: (function() {
1598
1596
  var _getProductHotSaleConfig = _asyncToGenerator$3(/* @__PURE__ */ _regenerator$3().m(function _callee0() {
1599
1597
  var _this$config5, _this$config5$getProd, _productConfig$produc3;
1600
1598
  var productConfig;
@@ -1622,7 +1620,7 @@ var Product = /* @__PURE__ */ function() {
1622
1620
  return _getProductHotSaleConfig.apply(this, arguments);
1623
1621
  }
1624
1622
  return getProductHotSaleConfig;
1625
- }()
1623
+ })()
1626
1624
  }, {
1627
1625
  key: "getCurrentPushingProductId",
1628
1626
  value: function getCurrentPushingProductId() {
@@ -1630,6 +1628,7 @@ var Product = /* @__PURE__ */ function() {
1630
1628
  }
1631
1629
  /**
1632
1630
  * 获取当前推送中的商品数据
1631
+ * @param productId 可选,指定商品ID,如果不提供则获取当前配置中的推送商品
1633
1632
  * @example
1634
1633
  * ```js
1635
1634
  * const productData = await productTarget.getCurrentPushingProduct();
@@ -1638,7 +1637,7 @@ var Product = /* @__PURE__ */ function() {
1638
1637
  */
1639
1638
  }, {
1640
1639
  key: "getCurrentPushingProduct",
1641
- value: function() {
1640
+ value: (function() {
1642
1641
  var _getCurrentPushingProduct = _asyncToGenerator$3(/* @__PURE__ */ _regenerator$3().m(function _callee1(productId) {
1643
1642
  var _this$config6, _this$config6$getProd;
1644
1643
  var productConfig, pid, pushRule, _productConfig$channe, _productConfig$channe2, result;
@@ -1676,17 +1675,17 @@ var Product = /* @__PURE__ */ function() {
1676
1675
  return _getCurrentPushingProduct.apply(this, arguments);
1677
1676
  }
1678
1677
  return getCurrentPushingProduct;
1679
- }()
1678
+ })()
1680
1679
  }, {
1681
1680
  key: "_explainProduct",
1682
- value: function() {
1681
+ value: (function() {
1683
1682
  var _explainProduct2 = _asyncToGenerator$3(/* @__PURE__ */ _regenerator$3().m(function _callee10(productId, recordType) {
1684
1683
  var channelInfo, data, apiPath, _t;
1685
1684
  return _regenerator$3().w(function(_context10) {
1686
1685
  while (1) switch (_context10.n) {
1687
1686
  case 0:
1688
1687
  _context10.n = 1;
1689
- return this.iarCore.getChannelInfo();
1688
+ return this.interactionCore.getChannelInfo();
1690
1689
  case 1:
1691
1690
  channelInfo = _context10.v;
1692
1691
  data = {
@@ -1707,7 +1706,7 @@ var Product = /* @__PURE__ */ function() {
1707
1706
  data.recordType = recordType;
1708
1707
  return _context10.a(3, 5);
1709
1708
  case 5:
1710
- return _context10.a(2, this.iarCore.polyvApi.post(apiPath, {
1709
+ return _context10.a(2, this.interactionCore.polyvApi.post(apiPath, {
1711
1710
  data
1712
1711
  }));
1713
1712
  }
@@ -1717,7 +1716,7 @@ var Product = /* @__PURE__ */ function() {
1717
1716
  return _explainProduct2.apply(this, arguments);
1718
1717
  }
1719
1718
  return _explainProduct;
1720
- }()
1719
+ })()
1721
1720
  /**
1722
1721
  * 开始商品讲解
1723
1722
  * @param productId 商品 id
@@ -1767,13 +1766,15 @@ var Product = /* @__PURE__ */ function() {
1767
1766
  */
1768
1767
  }, {
1769
1768
  key: "deleteExplain",
1770
- value: function() {
1769
+ value: (function() {
1771
1770
  var _deleteExplain = _asyncToGenerator$3(/* @__PURE__ */ _regenerator$3().m(function _callee11(productId) {
1772
1771
  return _regenerator$3().w(function(_context11) {
1773
1772
  while (1) switch (_context11.n) {
1774
1773
  case 0:
1775
- return _context11.a(2, this.iarCore.polyvApi.post(PolyvApiUrl.DeleteProductExplain, {
1776
- productId
1774
+ return _context11.a(2, this.interactionCore.polyvApi.post(PolyvApiUrl.DeleteProductExplain, {
1775
+ data: {
1776
+ productId
1777
+ }
1777
1778
  }));
1778
1779
  }
1779
1780
  }, _callee11, this);
@@ -1782,231 +1783,252 @@ var Product = /* @__PURE__ */ function() {
1782
1783
  return _deleteExplain.apply(this, arguments);
1783
1784
  }
1784
1785
  return deleteExplain;
1785
- }()
1786
+ })()
1786
1787
  }, {
1787
- key: "openProductPrice",
1788
- value: function() {
1789
- var _openProductPrice = _asyncToGenerator$3(/* @__PURE__ */ _regenerator$3().m(function _callee12(productId) {
1788
+ key: "getCurrentProductExplain",
1789
+ value: (function() {
1790
+ var _getCurrentProductExplain = _asyncToGenerator$3(/* @__PURE__ */ _regenerator$3().m(function _callee12() {
1791
+ var explainingId;
1790
1792
  return _regenerator$3().w(function(_context12) {
1791
1793
  while (1) switch (_context12.n) {
1792
1794
  case 0:
1793
- return _context12.a(2, this.iarCore.polyvApi.post(PolyvApiUrl.OpenProductPrice, {
1795
+ _context12.n = 1;
1796
+ return this.interactionCore.polyvApi.get(PolyvApiUrl.GetCurrentProductExplain, {});
1797
+ case 1:
1798
+ explainingId = _context12.v;
1799
+ return _context12.a(2, explainingId);
1800
+ }
1801
+ }, _callee12, this);
1802
+ }));
1803
+ function getCurrentProductExplain() {
1804
+ return _getCurrentProductExplain.apply(this, arguments);
1805
+ }
1806
+ return getCurrentProductExplain;
1807
+ })()
1808
+ }, {
1809
+ key: "openProductPrice",
1810
+ value: (function() {
1811
+ var _openProductPrice = _asyncToGenerator$3(/* @__PURE__ */ _regenerator$3().m(function _callee13(productId) {
1812
+ return _regenerator$3().w(function(_context13) {
1813
+ while (1) switch (_context13.n) {
1814
+ case 0:
1815
+ return _context13.a(2, this.interactionCore.polyvApi.post(PolyvApiUrl.OpenProductPrice, {
1794
1816
  productId
1795
1817
  }));
1796
1818
  }
1797
- }, _callee12, this);
1819
+ }, _callee13, this);
1798
1820
  }));
1799
1821
  function openProductPrice(_x9) {
1800
1822
  return _openProductPrice.apply(this, arguments);
1801
1823
  }
1802
1824
  return openProductPrice;
1803
- }()
1825
+ })()
1804
1826
  }, {
1805
1827
  key: "hideProductPrice",
1806
- value: function() {
1807
- var _hideProductPrice = _asyncToGenerator$3(/* @__PURE__ */ _regenerator$3().m(function _callee13(productId) {
1808
- return _regenerator$3().w(function(_context13) {
1809
- while (1) switch (_context13.n) {
1828
+ value: (function() {
1829
+ var _hideProductPrice = _asyncToGenerator$3(/* @__PURE__ */ _regenerator$3().m(function _callee14(productId) {
1830
+ return _regenerator$3().w(function(_context14) {
1831
+ while (1) switch (_context14.n) {
1810
1832
  case 0:
1811
- return _context13.a(2, this.iarCore.polyvApi.post(PolyvApiUrl.HideProductPrice, {
1833
+ return _context14.a(2, this.interactionCore.polyvApi.post(PolyvApiUrl.HideProductPrice, {
1812
1834
  productId
1813
1835
  }));
1814
1836
  }
1815
- }, _callee13, this);
1837
+ }, _callee14, this);
1816
1838
  }));
1817
1839
  function hideProductPrice(_x0) {
1818
1840
  return _hideProductPrice.apply(this, arguments);
1819
1841
  }
1820
1842
  return hideProductPrice;
1821
- }()
1843
+ })()
1822
1844
  }, {
1823
1845
  key: "getProductSetting",
1824
- value: function() {
1825
- var _getProductSetting = _asyncToGenerator$3(/* @__PURE__ */ _regenerator$3().m(function _callee14() {
1846
+ value: (function() {
1847
+ var _getProductSetting = _asyncToGenerator$3(/* @__PURE__ */ _regenerator$3().m(function _callee15() {
1826
1848
  var data;
1827
- return _regenerator$3().w(function(_context14) {
1828
- while (1) switch (_context14.n) {
1849
+ return _regenerator$3().w(function(_context15) {
1850
+ while (1) switch (_context15.n) {
1829
1851
  case 0:
1830
- _context14.n = 1;
1831
- return this.iarCore.polyvApi.get(PolyvApiUrl.ProductPushRule, {});
1852
+ _context15.n = 1;
1853
+ return this.interactionCore.polyvApi.get(PolyvApiUrl.ProductPushRule, {});
1832
1854
  case 1:
1833
- data = _context14.v;
1834
- return _context14.a(2, {
1855
+ data = _context15.v;
1856
+ return _context15.a(2, {
1835
1857
  pushingProduct: data.channelProductPushingStatusVO,
1836
1858
  productPushRule: data.productPushRule,
1837
1859
  productExplainEnabled: ynToBool(data.productExplainEnabled, "N"),
1838
1860
  productExplainingAutoPushAndSticky: ynToBool(data.productExplainingAutoPushAndSticky, "N")
1839
1861
  });
1840
1862
  }
1841
- }, _callee14, this);
1863
+ }, _callee15, this);
1842
1864
  }));
1843
1865
  function getProductSetting() {
1844
1866
  return _getProductSetting.apply(this, arguments);
1845
1867
  }
1846
1868
  return getProductSetting;
1847
- }()
1869
+ })()
1848
1870
  }, {
1849
1871
  key: "pushProduct",
1850
- value: function() {
1851
- var _pushProduct = _asyncToGenerator$3(/* @__PURE__ */ _regenerator$3().m(function _callee15(productId, rule) {
1852
- return _regenerator$3().w(function(_context15) {
1853
- while (1) switch (_context15.n) {
1872
+ value: (function() {
1873
+ var _pushProduct = _asyncToGenerator$3(/* @__PURE__ */ _regenerator$3().m(function _callee16(productId, rule) {
1874
+ return _regenerator$3().w(function(_context16) {
1875
+ while (1) switch (_context16.n) {
1854
1876
  case 0:
1855
- return _context15.a(2, this.iarCore.polyvApi.post(PolyvApiUrl.PushProduct, {
1877
+ return _context16.a(2, this.interactionCore.polyvApi.post(PolyvApiUrl.PushProduct, {
1856
1878
  productId,
1857
1879
  productPushRule: rule || ProductPushRule.SmallCard
1858
1880
  }));
1859
1881
  }
1860
- }, _callee15, this);
1882
+ }, _callee16, this);
1861
1883
  }));
1862
1884
  function pushProduct(_x1, _x10) {
1863
1885
  return _pushProduct.apply(this, arguments);
1864
1886
  }
1865
1887
  return pushProduct;
1866
- }()
1888
+ })()
1867
1889
  }, {
1868
1890
  key: "cancelPushProduct",
1869
- value: function() {
1870
- var _cancelPushProduct = _asyncToGenerator$3(/* @__PURE__ */ _regenerator$3().m(function _callee16(productId) {
1871
- return _regenerator$3().w(function(_context16) {
1872
- while (1) switch (_context16.n) {
1891
+ value: (function() {
1892
+ var _cancelPushProduct = _asyncToGenerator$3(/* @__PURE__ */ _regenerator$3().m(function _callee17(productId) {
1893
+ return _regenerator$3().w(function(_context17) {
1894
+ while (1) switch (_context17.n) {
1873
1895
  case 0:
1874
- return _context16.a(2, this.iarCore.polyvApi.post(PolyvApiUrl.CancelPushProduct, {
1896
+ return _context17.a(2, this.interactionCore.polyvApi.post(PolyvApiUrl.CancelPushProduct, {
1875
1897
  productId
1876
1898
  }));
1877
1899
  }
1878
- }, _callee16, this);
1900
+ }, _callee17, this);
1879
1901
  }));
1880
1902
  function cancelPushProduct(_x11) {
1881
1903
  return _cancelPushProduct.apply(this, arguments);
1882
1904
  }
1883
1905
  return cancelPushProduct;
1884
- }()
1906
+ })()
1885
1907
  }, {
1886
1908
  key: "batchDeleteProduct",
1887
- value: function() {
1888
- var _batchDeleteProduct = _asyncToGenerator$3(/* @__PURE__ */ _regenerator$3().m(function _callee17(productIds) {
1889
- return _regenerator$3().w(function(_context17) {
1890
- while (1) switch (_context17.n) {
1909
+ value: (function() {
1910
+ var _batchDeleteProduct = _asyncToGenerator$3(/* @__PURE__ */ _regenerator$3().m(function _callee18(productIds) {
1911
+ return _regenerator$3().w(function(_context18) {
1912
+ while (1) switch (_context18.n) {
1891
1913
  case 0:
1892
- return _context17.a(2, this.iarCore.polyvApi.post(PolyvApiUrl.BatchDeleteProduct, {
1914
+ return _context18.a(2, this.interactionCore.polyvApi.post(PolyvApiUrl.BatchDeleteProduct, {
1893
1915
  productIds
1894
1916
  }));
1895
1917
  }
1896
- }, _callee17, this);
1918
+ }, _callee18, this);
1897
1919
  }));
1898
1920
  function batchDeleteProduct(_x12) {
1899
1921
  return _batchDeleteProduct.apply(this, arguments);
1900
1922
  }
1901
1923
  return batchDeleteProduct;
1902
- }()
1924
+ })()
1903
1925
  }, {
1904
1926
  key: "batchOnShelfProduct",
1905
- value: function() {
1906
- var _batchOnShelfProduct = _asyncToGenerator$3(/* @__PURE__ */ _regenerator$3().m(function _callee18(productIds) {
1907
- return _regenerator$3().w(function(_context18) {
1908
- while (1) switch (_context18.n) {
1927
+ value: (function() {
1928
+ var _batchOnShelfProduct = _asyncToGenerator$3(/* @__PURE__ */ _regenerator$3().m(function _callee19(productIds) {
1929
+ return _regenerator$3().w(function(_context19) {
1930
+ while (1) switch (_context19.n) {
1909
1931
  case 0:
1910
- return _context18.a(2, this.iarCore.polyvApi.post(PolyvApiUrl.BatchShelfProduct, {
1932
+ return _context19.a(2, this.interactionCore.polyvApi.post(PolyvApiUrl.BatchShelfProduct, {
1911
1933
  productIds,
1912
1934
  status: ProductStatus.OnSale
1913
1935
  }));
1914
1936
  }
1915
- }, _callee18, this);
1937
+ }, _callee19, this);
1916
1938
  }));
1917
1939
  function batchOnShelfProduct(_x13) {
1918
1940
  return _batchOnShelfProduct.apply(this, arguments);
1919
1941
  }
1920
1942
  return batchOnShelfProduct;
1921
- }()
1943
+ })()
1922
1944
  }, {
1923
1945
  key: "batchOffShelfProduct",
1924
- value: function() {
1925
- var _batchOffShelfProduct = _asyncToGenerator$3(/* @__PURE__ */ _regenerator$3().m(function _callee19(productIds) {
1926
- return _regenerator$3().w(function(_context19) {
1927
- while (1) switch (_context19.n) {
1946
+ value: (function() {
1947
+ var _batchOffShelfProduct = _asyncToGenerator$3(/* @__PURE__ */ _regenerator$3().m(function _callee20(productIds) {
1948
+ return _regenerator$3().w(function(_context20) {
1949
+ while (1) switch (_context20.n) {
1928
1950
  case 0:
1929
- return _context19.a(2, this.iarCore.polyvApi.post(PolyvApiUrl.BatchShelfProduct, {
1951
+ return _context20.a(2, this.interactionCore.polyvApi.post(PolyvApiUrl.BatchShelfProduct, {
1930
1952
  productIds,
1931
1953
  status: ProductStatus.OffSale
1932
1954
  }));
1933
1955
  }
1934
- }, _callee19, this);
1956
+ }, _callee20, this);
1935
1957
  }));
1936
1958
  function batchOffShelfProduct(_x14) {
1937
1959
  return _batchOffShelfProduct.apply(this, arguments);
1938
1960
  }
1939
1961
  return batchOffShelfProduct;
1940
- }()
1962
+ })()
1941
1963
  }, {
1942
1964
  key: "getSupportToDirectBuy",
1943
- value: function() {
1944
- var _getSupportToDirectBuy = _asyncToGenerator$3(/* @__PURE__ */ _regenerator$3().m(function _callee20() {
1965
+ value: (function() {
1966
+ var _getSupportToDirectBuy = _asyncToGenerator$3(/* @__PURE__ */ _regenerator$3().m(function _callee21() {
1945
1967
  var _this$config7, _this$config7$getProd;
1946
1968
  var userInfo, productConfig, authType, notSupportAuthTypes;
1947
- return _regenerator$3().w(function(_context20) {
1948
- while (1) switch (_context20.n) {
1969
+ return _regenerator$3().w(function(_context21) {
1970
+ while (1) switch (_context21.n) {
1949
1971
  case 0:
1950
- _context20.n = 1;
1972
+ _context21.n = 1;
1951
1973
  return this.getProductPayOrderEnabled();
1952
1974
  case 1:
1953
- if (_context20.v) {
1954
- _context20.n = 2;
1975
+ if (_context21.v) {
1976
+ _context21.n = 2;
1955
1977
  break;
1956
1978
  }
1957
- return _context20.a(2, false);
1979
+ return _context21.a(2, false);
1958
1980
  case 2:
1959
- _context20.n = 3;
1960
- return this.iarCore.getUserInfo();
1981
+ _context21.n = 3;
1982
+ return this.interactionCore.getUserInfo();
1961
1983
  case 3:
1962
- userInfo = _context20.v;
1984
+ userInfo = _context21.v;
1963
1985
  if (userInfo.unionId) {
1964
- _context20.n = 4;
1986
+ _context21.n = 4;
1965
1987
  break;
1966
1988
  }
1967
- return _context20.a(2, false);
1989
+ return _context21.a(2, false);
1968
1990
  case 4:
1969
- _context20.n = 5;
1991
+ _context21.n = 5;
1970
1992
  return (_this$config7 = this.config) === null || _this$config7 === void 0 || (_this$config7$getProd = _this$config7.getProductConfig) === null || _this$config7$getProd === void 0 ? void 0 : _this$config7$getProd.call(_this$config7);
1971
1993
  case 5:
1972
- productConfig = _context20.v;
1994
+ productConfig = _context21.v;
1973
1995
  if (productConfig !== null && productConfig !== void 0 && productConfig.directBuyEnabled) {
1974
- _context20.n = 6;
1996
+ _context21.n = 6;
1975
1997
  break;
1976
1998
  }
1977
- return _context20.a(2, false);
1999
+ return _context21.a(2, false);
1978
2000
  case 6:
1979
2001
  authType = userInfo.authType;
1980
2002
  if (!(!authType || authType === AuthType.None)) {
1981
- _context20.n = 7;
2003
+ _context21.n = 7;
1982
2004
  break;
1983
2005
  }
1984
- return _context20.a(2, true);
2006
+ return _context21.a(2, true);
1985
2007
  case 7:
1986
2008
  notSupportAuthTypes = [AuthType.Custom, AuthType.External, AuthType.Direct, AuthType.EnterpriseWeChat];
1987
2009
  if (!notSupportAuthTypes.includes(authType)) {
1988
- _context20.n = 8;
2010
+ _context21.n = 8;
1989
2011
  break;
1990
2012
  }
1991
- return _context20.a(2, false);
2013
+ return _context21.a(2, false);
1992
2014
  case 8:
1993
- return _context20.a(2, true);
2015
+ return _context21.a(2, true);
1994
2016
  }
1995
- }, _callee20, this);
2017
+ }, _callee21, this);
1996
2018
  }));
1997
2019
  function getSupportToDirectBuy() {
1998
2020
  return _getSupportToDirectBuy.apply(this, arguments);
1999
2021
  }
2000
2022
  return getSupportToDirectBuy;
2001
- }()
2023
+ })()
2002
2024
  }]);
2003
- }();
2004
- var PaymentProvider = /* @__PURE__ */ function(PaymentProvider2) {
2025
+ })();
2026
+ var PaymentProvider = /* @__PURE__ */ (function(PaymentProvider2) {
2005
2027
  PaymentProvider2["Wechat"] = "WECHAT";
2006
2028
  PaymentProvider2["Alipay"] = "ALIPAY";
2007
2029
  return PaymentProvider2;
2008
- }({});
2009
- var OrderStatus = /* @__PURE__ */ function(OrderStatus2) {
2030
+ })({});
2031
+ var OrderStatus = /* @__PURE__ */ (function(OrderStatus2) {
2010
2032
  OrderStatus2["WaitPay"] = "wait_pay";
2011
2033
  OrderStatus2["WaitDelivery"] = "wait_delivery";
2012
2034
  OrderStatus2["Delivering"] = "delivering";
@@ -2015,27 +2037,27 @@ var OrderStatus = /* @__PURE__ */ function(OrderStatus2) {
2015
2037
  OrderStatus2["Refunding"] = "refunding";
2016
2038
  OrderStatus2["Refunded"] = "refunded";
2017
2039
  return OrderStatus2;
2018
- }({});
2019
- var PayStatus = /* @__PURE__ */ function(PayStatus2) {
2040
+ })({});
2041
+ var PayStatus = /* @__PURE__ */ (function(PayStatus2) {
2020
2042
  PayStatus2["WaitPay"] = "wait_pay";
2021
2043
  PayStatus2["Payed"] = "payed";
2022
2044
  PayStatus2["Free"] = "free";
2023
2045
  return PayStatus2;
2024
- }({});
2025
- var RefundStatus = /* @__PURE__ */ function(RefundStatus2) {
2046
+ })({});
2047
+ var RefundStatus = /* @__PURE__ */ (function(RefundStatus2) {
2026
2048
  RefundStatus2["Success"] = "SUCCESS";
2027
2049
  RefundStatus2["Fail"] = "FAIL";
2028
2050
  RefundStatus2["Processing"] = "PROCESSING";
2029
2051
  return RefundStatus2;
2030
- }({});
2031
- var CreateOrderFailReason = /* @__PURE__ */ function(CreateOrderFailReason2) {
2052
+ })({});
2053
+ var CreateOrderFailReason = /* @__PURE__ */ (function(CreateOrderFailReason2) {
2032
2054
  CreateOrderFailReason2["Unknown"] = "unknown";
2033
2055
  return CreateOrderFailReason2;
2034
- }({});
2035
- var OrderRefundFailReason = /* @__PURE__ */ function(OrderRefundFailReason2) {
2056
+ })({});
2057
+ var OrderRefundFailReason = /* @__PURE__ */ (function(OrderRefundFailReason2) {
2036
2058
  OrderRefundFailReason2["Unknown"] = "unknown";
2037
2059
  return OrderRefundFailReason2;
2038
- }({});
2060
+ })({});
2039
2061
  function _typeof$3(o) {
2040
2062
  "@babel/helpers - typeof";
2041
2063
  return _typeof$3 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o2) {
@@ -2253,7 +2275,7 @@ function _regenerator$2() {
2253
2275
  var e, t, r = "function" == typeof Symbol ? Symbol : {}, n = r.iterator || "@@iterator", o = r.toStringTag || "@@toStringTag";
2254
2276
  function i(r2, n2, o2, i2) {
2255
2277
  var c2 = n2 && n2.prototype instanceof Generator ? n2 : Generator, u2 = Object.create(c2.prototype);
2256
- return _regeneratorDefine2$2(u2, "_invoke", function(r3, n3, o3) {
2278
+ return _regeneratorDefine2$2(u2, "_invoke", (function(r3, n3, o3) {
2257
2279
  var i3, c3, u3, f2 = 0, p = o3 || [], y = false, G = { p: 0, n: 0, v: e, a: d, f: d.bind(e, 4), d: function d2(t2, r4) {
2258
2280
  return i3 = t2, c3 = 0, u3 = e, G.n = r4, a;
2259
2281
  } };
@@ -2286,7 +2308,7 @@ function _regenerator$2() {
2286
2308
  }
2287
2309
  return { value: t, done: y };
2288
2310
  };
2289
- }(r2, o2, i2), true), u2;
2311
+ })(r2, o2, i2), true), u2;
2290
2312
  }
2291
2313
  var a = {};
2292
2314
  function Generator() {
@@ -2318,15 +2340,12 @@ function _regeneratorDefine2$2(e, r, n, t) {
2318
2340
  i = 0;
2319
2341
  }
2320
2342
  _regeneratorDefine2$2 = function _regeneratorDefine(e2, r2, n2, t2) {
2321
- if (r2) i ? i(e2, r2, { value: n2, enumerable: !t2, configurable: !t2, writable: !t2 }) : e2[r2] = n2;
2322
- else {
2323
- var o = function o2(r3, n3) {
2324
- _regeneratorDefine2$2(e2, r3, function(e3) {
2325
- return this._invoke(r3, n3, e3);
2326
- });
2327
- };
2328
- o("next", 0), o("throw", 1), o("return", 2);
2343
+ function o(r3, n3) {
2344
+ _regeneratorDefine2$2(e2, r3, function(e3) {
2345
+ return this._invoke(r3, n3, e3);
2346
+ });
2329
2347
  }
2348
+ r2 ? i ? i(e2, r2, { value: n2, enumerable: !t2, configurable: !t2, writable: !t2 }) : e2[r2] = n2 : (o("next", 0), o("throw", 1), o("return", 2));
2330
2349
  }, _regeneratorDefine2$2(e, r, n, t);
2331
2350
  }
2332
2351
  function asyncGeneratorStep$2(n, t, e, r, o, a, c) {
@@ -2381,8 +2400,8 @@ function _toPrimitive$2(t, r) {
2381
2400
  }
2382
2401
  return String(t);
2383
2402
  }
2384
- var Order = /* @__PURE__ */ function() {
2385
- function Order2(iarCore, config) {
2403
+ var Order = /* @__PURE__ */ (function() {
2404
+ function Order2(interactionCore, config) {
2386
2405
  _classCallCheck$2(this, Order2);
2387
2406
  _defineProperty$2(this, "OrderStatus", OrderStatus);
2388
2407
  _defineProperty$2(this, "PayStatus", PayStatus);
@@ -2393,12 +2412,12 @@ var Order = /* @__PURE__ */ function() {
2393
2412
  _defineProperty$2(this, "RefundStatus", RefundStatus);
2394
2413
  _defineProperty$2(this, "CreateOrderFailReason", CreateOrderFailReason);
2395
2414
  _defineProperty$2(this, "OrderRefundFailReason", OrderRefundFailReason);
2396
- this.iarCore = iarCore;
2415
+ this.interactionCore = interactionCore;
2397
2416
  this.config = config;
2398
2417
  }
2399
2418
  return _createClass$2(Order2, [{
2400
2419
  key: "getOrderList",
2401
- value: function() {
2420
+ value: (function() {
2402
2421
  var _getOrderList = _asyncToGenerator$2(/* @__PURE__ */ _regenerator$2().m(function _callee() {
2403
2422
  var params, _params$pageNumber, pageNumber, _params$pageSize, pageSize, orderStatus, res, _args = arguments;
2404
2423
  return _regenerator$2().w(function(_context) {
@@ -2407,7 +2426,7 @@ var Order = /* @__PURE__ */ function() {
2407
2426
  params = _args.length > 0 && _args[0] !== void 0 ? _args[0] : {};
2408
2427
  _params$pageNumber = params.pageNumber, pageNumber = _params$pageNumber === void 0 ? 1 : _params$pageNumber, _params$pageSize = params.pageSize, pageSize = _params$pageSize === void 0 ? 10 : _params$pageSize, orderStatus = params.orderStatus;
2409
2428
  _context.n = 1;
2410
- return this.iarCore.polyvApi.get(PolyvApiUrl.GetOrderList, {
2429
+ return this.interactionCore.polyvApi.get(PolyvApiUrl.GetOrderList, {
2411
2430
  pageNumber,
2412
2431
  pageSize,
2413
2432
  orderStatus
@@ -2428,17 +2447,17 @@ var Order = /* @__PURE__ */ function() {
2428
2447
  return _getOrderList.apply(this, arguments);
2429
2448
  }
2430
2449
  return getOrderList;
2431
- }()
2450
+ })()
2432
2451
  }, {
2433
2452
  key: "getOrderDetail",
2434
- value: function() {
2453
+ value: (function() {
2435
2454
  var _getOrderDetail = _asyncToGenerator$2(/* @__PURE__ */ _regenerator$2().m(function _callee2(params) {
2436
2455
  var internalDetail;
2437
2456
  return _regenerator$2().w(function(_context2) {
2438
2457
  while (1) switch (_context2.n) {
2439
2458
  case 0:
2440
2459
  _context2.n = 1;
2441
- return this.iarCore.polyvApi.get(PolyvApiUrl.GetOrderDetail, {
2460
+ return this.interactionCore.polyvApi.get(PolyvApiUrl.GetOrderDetail, {
2442
2461
  orderNo: params.orderNo,
2443
2462
  syncPayStatus: boolToYN(params.syncPayStatus)
2444
2463
  });
@@ -2452,18 +2471,18 @@ var Order = /* @__PURE__ */ function() {
2452
2471
  return _getOrderDetail.apply(this, arguments);
2453
2472
  }
2454
2473
  return getOrderDetail;
2455
- }()
2474
+ })()
2456
2475
  }, {
2457
2476
  key: "createOrder",
2458
- value: function() {
2477
+ value: (function() {
2459
2478
  var _createOrder = _asyncToGenerator$2(/* @__PURE__ */ _regenerator$2().m(function _callee3(params) {
2460
2479
  var res, _t;
2461
2480
  return _regenerator$2().w(function(_context3) {
2462
- while (1) switch (_context3.n) {
2481
+ while (1) switch (_context3.p = _context3.n) {
2463
2482
  case 0:
2464
2483
  _context3.p = 0;
2465
2484
  _context3.n = 1;
2466
- return this.iarCore.polyvApi.post(PolyvApiUrl.CreateOrder, params);
2485
+ return this.interactionCore.polyvApi.post(PolyvApiUrl.CreateOrder, params);
2467
2486
  case 1:
2468
2487
  res = _context3.v;
2469
2488
  return _context3.a(2, _objectSpread$1({
@@ -2484,15 +2503,15 @@ var Order = /* @__PURE__ */ function() {
2484
2503
  return _createOrder.apply(this, arguments);
2485
2504
  }
2486
2505
  return createOrder;
2487
- }()
2506
+ })()
2488
2507
  }, {
2489
2508
  key: "confirmOrder",
2490
- value: function() {
2509
+ value: (function() {
2491
2510
  var _confirmOrder = _asyncToGenerator$2(/* @__PURE__ */ _regenerator$2().m(function _callee4(orderNo) {
2492
2511
  return _regenerator$2().w(function(_context4) {
2493
2512
  while (1) switch (_context4.n) {
2494
2513
  case 0:
2495
- return _context4.a(2, this.iarCore.polyvApi.post(concat(PolyvApiUrl.ConfirmOrder, {
2514
+ return _context4.a(2, this.interactionCore.polyvApi.post(concat(PolyvApiUrl.ConfirmOrder, {
2496
2515
  orderNo
2497
2516
  }), {}));
2498
2517
  }
@@ -2502,18 +2521,18 @@ var Order = /* @__PURE__ */ function() {
2502
2521
  return _confirmOrder.apply(this, arguments);
2503
2522
  }
2504
2523
  return confirmOrder;
2505
- }()
2524
+ })()
2506
2525
  }, {
2507
2526
  key: "applyOrderRefund",
2508
- value: function() {
2527
+ value: (function() {
2509
2528
  var _applyOrderRefund = _asyncToGenerator$2(/* @__PURE__ */ _regenerator$2().m(function _callee5(orderNo) {
2510
2529
  var res, _t2;
2511
2530
  return _regenerator$2().w(function(_context5) {
2512
- while (1) switch (_context5.n) {
2531
+ while (1) switch (_context5.p = _context5.n) {
2513
2532
  case 0:
2514
2533
  _context5.p = 0;
2515
2534
  _context5.n = 1;
2516
- return this.iarCore.polyvApi.post(PolyvApiUrl.ApplyOrderRefund, {
2535
+ return this.interactionCore.polyvApi.post(PolyvApiUrl.ApplyOrderRefund, {
2517
2536
  orderNo
2518
2537
  });
2519
2538
  case 1:
@@ -2536,9 +2555,9 @@ var Order = /* @__PURE__ */ function() {
2536
2555
  return _applyOrderRefund.apply(this, arguments);
2537
2556
  }
2538
2557
  return applyOrderRefund;
2539
- }()
2558
+ })()
2540
2559
  }]);
2541
- }();
2560
+ })();
2542
2561
  function mapInternalAddressToAddressData(data) {
2543
2562
  if (!data) {
2544
2563
  return {
@@ -2570,7 +2589,7 @@ function _regenerator$1() {
2570
2589
  var e, t, r = "function" == typeof Symbol ? Symbol : {}, n = r.iterator || "@@iterator", o = r.toStringTag || "@@toStringTag";
2571
2590
  function i(r2, n2, o2, i2) {
2572
2591
  var c2 = n2 && n2.prototype instanceof Generator ? n2 : Generator, u2 = Object.create(c2.prototype);
2573
- return _regeneratorDefine2$1(u2, "_invoke", function(r3, n3, o3) {
2592
+ return _regeneratorDefine2$1(u2, "_invoke", (function(r3, n3, o3) {
2574
2593
  var i3, c3, u3, f2 = 0, p = o3 || [], y = false, G = { p: 0, n: 0, v: e, a: d, f: d.bind(e, 4), d: function d2(t2, r4) {
2575
2594
  return i3 = t2, c3 = 0, u3 = e, G.n = r4, a;
2576
2595
  } };
@@ -2603,7 +2622,7 @@ function _regenerator$1() {
2603
2622
  }
2604
2623
  return { value: t, done: y };
2605
2624
  };
2606
- }(r2, o2, i2), true), u2;
2625
+ })(r2, o2, i2), true), u2;
2607
2626
  }
2608
2627
  var a = {};
2609
2628
  function Generator() {
@@ -2635,15 +2654,12 @@ function _regeneratorDefine2$1(e, r, n, t) {
2635
2654
  i = 0;
2636
2655
  }
2637
2656
  _regeneratorDefine2$1 = function _regeneratorDefine(e2, r2, n2, t2) {
2638
- if (r2) i ? i(e2, r2, { value: n2, enumerable: !t2, configurable: !t2, writable: !t2 }) : e2[r2] = n2;
2639
- else {
2640
- var o = function o2(r3, n3) {
2641
- _regeneratorDefine2$1(e2, r3, function(e3) {
2642
- return this._invoke(r3, n3, e3);
2643
- });
2644
- };
2645
- o("next", 0), o("throw", 1), o("return", 2);
2657
+ function o(r3, n3) {
2658
+ _regeneratorDefine2$1(e2, r3, function(e3) {
2659
+ return this._invoke(r3, n3, e3);
2660
+ });
2646
2661
  }
2662
+ r2 ? i ? i(e2, r2, { value: n2, enumerable: !t2, configurable: !t2, writable: !t2 }) : e2[r2] = n2 : (o("next", 0), o("throw", 1), o("return", 2));
2647
2663
  }, _regeneratorDefine2$1(e, r, n, t);
2648
2664
  }
2649
2665
  function ownKeys(e, r) {
@@ -2719,15 +2735,15 @@ function _toPrimitive$1(t, r) {
2719
2735
  }
2720
2736
  return String(t);
2721
2737
  }
2722
- var Address = /* @__PURE__ */ function() {
2723
- function Address2(iarCore, config) {
2738
+ var Address = /* @__PURE__ */ (function() {
2739
+ function Address2(interactionCore, config) {
2724
2740
  _classCallCheck$1(this, Address2);
2725
- this.iarCore = iarCore;
2741
+ this.interactionCore = interactionCore;
2726
2742
  this.config = config;
2727
2743
  }
2728
2744
  return _createClass$1(Address2, [{
2729
2745
  key: "getAddressList",
2730
- value: function() {
2746
+ value: (function() {
2731
2747
  var _getAddressList = _asyncToGenerator$1(/* @__PURE__ */ _regenerator$1().m(function _callee() {
2732
2748
  var options, _options$pageNumber, pageNumber, _options$pageSize, pageSize, res, _args = arguments;
2733
2749
  return _regenerator$1().w(function(_context) {
@@ -2736,7 +2752,7 @@ var Address = /* @__PURE__ */ function() {
2736
2752
  options = _args.length > 0 && _args[0] !== void 0 ? _args[0] : {};
2737
2753
  _options$pageNumber = options.pageNumber, pageNumber = _options$pageNumber === void 0 ? 1 : _options$pageNumber, _options$pageSize = options.pageSize, pageSize = _options$pageSize === void 0 ? 10 : _options$pageSize;
2738
2754
  _context.n = 1;
2739
- return this.iarCore.polyvApi.get(PolyvApiUrl.GetAddressList, {
2755
+ return this.interactionCore.polyvApi.get(PolyvApiUrl.GetAddressList, {
2740
2756
  pageNumber,
2741
2757
  pageSize
2742
2758
  });
@@ -2752,17 +2768,17 @@ var Address = /* @__PURE__ */ function() {
2752
2768
  return _getAddressList.apply(this, arguments);
2753
2769
  }
2754
2770
  return getAddressList;
2755
- }()
2771
+ })()
2756
2772
  }, {
2757
2773
  key: "getDefaultAddress",
2758
- value: function() {
2774
+ value: (function() {
2759
2775
  var _getDefaultAddress = _asyncToGenerator$1(/* @__PURE__ */ _regenerator$1().m(function _callee2() {
2760
2776
  var res;
2761
2777
  return _regenerator$1().w(function(_context2) {
2762
2778
  while (1) switch (_context2.n) {
2763
2779
  case 0:
2764
2780
  _context2.n = 1;
2765
- return this.iarCore.polyvApi.get(PolyvApiUrl.GetDefaultAddress, {});
2781
+ return this.interactionCore.polyvApi.get(PolyvApiUrl.GetDefaultAddress, {});
2766
2782
  case 1:
2767
2783
  res = _context2.v;
2768
2784
  return _context2.a(2, mapInternalAddressToAddressData(res));
@@ -2773,17 +2789,17 @@ var Address = /* @__PURE__ */ function() {
2773
2789
  return _getDefaultAddress.apply(this, arguments);
2774
2790
  }
2775
2791
  return getDefaultAddress;
2776
- }()
2792
+ })()
2777
2793
  }, {
2778
2794
  key: "addAddress",
2779
- value: function() {
2795
+ value: (function() {
2780
2796
  var _addAddress = _asyncToGenerator$1(/* @__PURE__ */ _regenerator$1().m(function _callee3(params) {
2781
2797
  var res;
2782
2798
  return _regenerator$1().w(function(_context3) {
2783
2799
  while (1) switch (_context3.n) {
2784
2800
  case 0:
2785
2801
  _context3.n = 1;
2786
- return this.iarCore.polyvApi.post(PolyvApiUrl.AddAddress, params);
2802
+ return this.interactionCore.polyvApi.post(PolyvApiUrl.AddAddress, params);
2787
2803
  case 1:
2788
2804
  res = _context3.v;
2789
2805
  return _context3.a(2, mapInternalAddressToAddressData(res));
@@ -2794,16 +2810,16 @@ var Address = /* @__PURE__ */ function() {
2794
2810
  return _addAddress.apply(this, arguments);
2795
2811
  }
2796
2812
  return addAddress;
2797
- }()
2813
+ })()
2798
2814
  }, {
2799
2815
  key: "updateAddress",
2800
- value: function() {
2816
+ value: (function() {
2801
2817
  var _updateAddress = _asyncToGenerator$1(/* @__PURE__ */ _regenerator$1().m(function _callee4(params) {
2802
2818
  return _regenerator$1().w(function(_context4) {
2803
2819
  while (1) switch (_context4.n) {
2804
2820
  case 0:
2805
2821
  _context4.n = 1;
2806
- return this.iarCore.polyvApi.post(PolyvApiUrl.UpdateAddress, params);
2822
+ return this.interactionCore.polyvApi.post(PolyvApiUrl.UpdateAddress, params);
2807
2823
  case 1:
2808
2824
  return _context4.a(2, _context4.v);
2809
2825
  }
@@ -2813,16 +2829,16 @@ var Address = /* @__PURE__ */ function() {
2813
2829
  return _updateAddress.apply(this, arguments);
2814
2830
  }
2815
2831
  return updateAddress;
2816
- }()
2832
+ })()
2817
2833
  }, {
2818
2834
  key: "deleteAddress",
2819
- value: function() {
2835
+ value: (function() {
2820
2836
  var _deleteAddress = _asyncToGenerator$1(/* @__PURE__ */ _regenerator$1().m(function _callee5(id) {
2821
2837
  return _regenerator$1().w(function(_context5) {
2822
2838
  while (1) switch (_context5.n) {
2823
2839
  case 0:
2824
2840
  _context5.n = 1;
2825
- return this.iarCore.polyvApi.post(PolyvApiUrl.DeleteAddress, {
2841
+ return this.interactionCore.polyvApi.post(PolyvApiUrl.DeleteAddress, {
2826
2842
  id
2827
2843
  });
2828
2844
  case 1:
@@ -2834,9 +2850,9 @@ var Address = /* @__PURE__ */ function() {
2834
2850
  return _deleteAddress.apply(this, arguments);
2835
2851
  }
2836
2852
  return deleteAddress;
2837
- }()
2853
+ })()
2838
2854
  }]);
2839
- }();
2855
+ })();
2840
2856
  function _typeof(o) {
2841
2857
  "@babel/helpers - typeof";
2842
2858
  return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o2) {
@@ -2850,7 +2866,7 @@ function _regenerator() {
2850
2866
  var e, t, r = "function" == typeof Symbol ? Symbol : {}, n = r.iterator || "@@iterator", o = r.toStringTag || "@@toStringTag";
2851
2867
  function i(r2, n2, o2, i2) {
2852
2868
  var c2 = n2 && n2.prototype instanceof Generator ? n2 : Generator, u2 = Object.create(c2.prototype);
2853
- return _regeneratorDefine2(u2, "_invoke", function(r3, n3, o3) {
2869
+ return _regeneratorDefine2(u2, "_invoke", (function(r3, n3, o3) {
2854
2870
  var i3, c3, u3, f2 = 0, p = o3 || [], y = false, G = { p: 0, n: 0, v: e, a: d, f: d.bind(e, 4), d: function d2(t2, r4) {
2855
2871
  return i3 = t2, c3 = 0, u3 = e, G.n = r4, a;
2856
2872
  } };
@@ -2883,7 +2899,7 @@ function _regenerator() {
2883
2899
  }
2884
2900
  return { value: t, done: y };
2885
2901
  };
2886
- }(r2, o2, i2), true), u2;
2902
+ })(r2, o2, i2), true), u2;
2887
2903
  }
2888
2904
  var a = {};
2889
2905
  function Generator() {
@@ -2915,15 +2931,12 @@ function _regeneratorDefine2(e, r, n, t) {
2915
2931
  i = 0;
2916
2932
  }
2917
2933
  _regeneratorDefine2 = function _regeneratorDefine(e2, r2, n2, t2) {
2918
- if (r2) i ? i(e2, r2, { value: n2, enumerable: !t2, configurable: !t2, writable: !t2 }) : e2[r2] = n2;
2919
- else {
2920
- var o = function o2(r3, n3) {
2921
- _regeneratorDefine2(e2, r3, function(e3) {
2922
- return this._invoke(r3, n3, e3);
2923
- });
2924
- };
2925
- o("next", 0), o("throw", 1), o("return", 2);
2934
+ function o(r3, n3) {
2935
+ _regeneratorDefine2(e2, r3, function(e3) {
2936
+ return this._invoke(r3, n3, e3);
2937
+ });
2926
2938
  }
2939
+ r2 ? i ? i(e2, r2, { value: n2, enumerable: !t2, configurable: !t2, writable: !t2 }) : e2[r2] = n2 : (o("next", 0), o("throw", 1), o("return", 2));
2927
2940
  }, _regeneratorDefine2(e, r, n, t);
2928
2941
  }
2929
2942
  function asyncGeneratorStep(n, t, e, r, o, a, c) {
@@ -2978,23 +2991,23 @@ function _toPrimitive(t, r) {
2978
2991
  }
2979
2992
  return String(t);
2980
2993
  }
2981
- var Payment = /* @__PURE__ */ function() {
2982
- function Payment2(iarCore, config) {
2994
+ var Payment = /* @__PURE__ */ (function() {
2995
+ function Payment2(interactionCore, config) {
2983
2996
  _classCallCheck(this, Payment2);
2984
2997
  _defineProperty(this, "PaymentProvider", PaymentProvider);
2985
- this.iarCore = iarCore;
2998
+ this.interactionCore = interactionCore;
2986
2999
  this.config = config;
2987
3000
  }
2988
3001
  return _createClass(Payment2, [{
2989
3002
  key: "getPayOrderParams",
2990
- value: function() {
3003
+ value: (function() {
2991
3004
  var _getPayOrderParams = _asyncToGenerator(/* @__PURE__ */ _regenerator().m(function _callee(options) {
2992
3005
  var res;
2993
3006
  return _regenerator().w(function(_context) {
2994
3007
  while (1) switch (_context.n) {
2995
3008
  case 0:
2996
3009
  _context.n = 1;
2997
- return this.iarCore.polyvApi.get(PolyvApiUrl.PayOrder, options);
3010
+ return this.interactionCore.polyvApi.get(PolyvApiUrl.PayOrder, options);
2998
3011
  case 1:
2999
3012
  res = _context.v;
3000
3013
  return _context.a(2, mapInternalCreateOrderResponse(res));
@@ -3005,7 +3018,7 @@ var Payment = /* @__PURE__ */ function() {
3005
3018
  return _getPayOrderParams.apply(this, arguments);
3006
3019
  }
3007
3020
  return getPayOrderParams;
3008
- }()
3021
+ })()
3009
3022
  }, {
3010
3023
  key: "getPayProviders",
3011
3024
  value: (
@@ -3017,7 +3030,7 @@ var Payment = /* @__PURE__ */ function() {
3017
3030
  * console.log('支付方式', data);
3018
3031
  * ```
3019
3032
  */
3020
- function() {
3033
+ (function() {
3021
3034
  var _getPayProviders = _asyncToGenerator(/* @__PURE__ */ _regenerator().m(function _callee2() {
3022
3035
  var _this = this;
3023
3036
  var fetchPromise;
@@ -3030,7 +3043,7 @@ var Payment = /* @__PURE__ */ function() {
3030
3043
  }
3031
3044
  return _context2.a(2, this.__payProviderCache);
3032
3045
  case 1:
3033
- fetchPromise = this.iarCore.polyvApi.get(PolyvApiUrl.GetOrderPaymentProviders, {})["catch"](function(error) {
3046
+ fetchPromise = this.interactionCore.polyvApi.get(PolyvApiUrl.GetOrderPaymentProviders, {})["catch"](function(error) {
3034
3047
  _this.__payProviderCache = void 0;
3035
3048
  throw error;
3036
3049
  });
@@ -3046,16 +3059,16 @@ var Payment = /* @__PURE__ */ function() {
3046
3059
  return _getPayProviders.apply(this, arguments);
3047
3060
  }
3048
3061
  return getPayProviders;
3049
- }()
3062
+ })()
3050
3063
  )
3051
3064
  }]);
3052
- }();
3065
+ })();
3053
3066
  ;
3054
3067
  console.log(
3055
3068
  "%c@polyv/product-sdk",
3056
3069
  "background:#67C23A;padding: 2px 6px;border-radius: 3px;color: #fff",
3057
- "[version: 1.3.0-rc-20250814.1]",
3058
- "[buildTime: 2025-08-14 03:10:27]"
3070
+ "[version: 1.4.0-rc-20250904.1]",
3071
+ "[buildTime: 2025-09-04 03:22:26]"
3059
3072
  );
3060
3073
  export {
3061
3074
  Address,