@car-cutter/react-webplayer 3.0.1 → 3.0.3

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/dist/legacy.js CHANGED
@@ -1,19 +1,19 @@
1
- import { W, a as S, b as w, c as L, d as I, e as M, f as D } from "./shared-Cla45QLW.js";
2
- import { D as oe, j as re, E as se, k as ie, n as ae, m as ce, r as le, q as ue, p as pe, o as me, l as fe, g as be, h as Ee, i as de, s as he } from "./shared-Cla45QLW.js";
1
+ import { W as S, a as W, b as I, c as L, d as w, e as D, f as R } from "./shared-rIRhmgIF.js";
2
+ import { A as oe, s as re, t as se, D as ie, j as ae, E as le, k as ce, n as ue, m as pe, r as Ee, q as me, p as be, o as fe, l as de, g as he, h as ye, i as _e, u as ge } from "./shared-rIRhmgIF.js";
3
3
  import "react/jsx-runtime";
4
4
  import P from "react";
5
- import O from "react-dom";
6
- var R = Object.defineProperty, V = (e, t, n) => t in e ? R(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, f = (e, t, n) => (V(e, typeof t != "symbol" ? t + "" : t, n), n);
5
+ import T from "react-dom";
6
+ var V = Object.defineProperty, M = (e, t, n) => t in e ? V(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, m = (e, t, n) => (M(e, typeof t != "symbol" ? t + "" : t, n), n);
7
7
  const v = {
8
8
  stringify: (e) => e,
9
9
  parse: (e) => e
10
- }, j = {
10
+ }, x = {
11
11
  stringify: (e) => `${e}`,
12
12
  parse: (e) => parseFloat(e)
13
- }, k = {
13
+ }, j = {
14
14
  stringify: (e) => e ? "true" : "false",
15
15
  parse: (e) => /^[ty1-9]/i.test(e)
16
- }, x = {
16
+ }, k = {
17
17
  stringify: (e) => e.name,
18
18
  parse: (e, t, n) => {
19
19
  const s = (() => {
@@ -29,9 +29,9 @@ const v = {
29
29
  parse: (e) => JSON.parse(e)
30
30
  }, g = {
31
31
  string: v,
32
- number: j,
33
- boolean: k,
34
- function: x,
32
+ number: x,
33
+ boolean: j,
34
+ function: k,
35
35
  json: F
36
36
  };
37
37
  function G(e) {
@@ -40,86 +40,86 @@ function G(e) {
40
40
  (t, n, s) => `${n}-${s.toLowerCase()}`
41
41
  );
42
42
  }
43
- const b = Symbol.for("r2wc.render"), E = Symbol.for("r2wc.connected"), u = Symbol.for("r2wc.context"), l = Symbol.for("r2wc.props");
44
- function $(e, t, n) {
45
- var s, T, N;
43
+ const b = Symbol.for("r2wc.render"), f = Symbol.for("r2wc.connected"), u = Symbol.for("r2wc.context"), c = Symbol.for("r2wc.props");
44
+ function Y(e, t, n) {
45
+ var s, C, A;
46
46
  t.props || (t.props = e.propTypes ? Object.keys(e.propTypes) : []);
47
- const d = Array.isArray(t.props) ? t.props.slice() : Object.keys(t.props), m = {}, h = {}, y = {};
47
+ const d = Array.isArray(t.props) ? t.props.slice() : Object.keys(t.props), E = {}, h = {}, y = {};
48
48
  for (const r of d) {
49
- m[r] = Array.isArray(t.props) ? "string" : t.props[r];
49
+ E[r] = Array.isArray(t.props) ? "string" : t.props[r];
50
50
  const o = G(r);
51
51
  h[r] = o, y[o] = r;
52
52
  }
53
- class A extends HTMLElement {
53
+ class N extends HTMLElement {
54
54
  constructor() {
55
- super(), f(this, s, !0), f(this, T), f(this, N, {}), f(this, "container"), t.shadow ? this.container = this.attachShadow({
55
+ super(), m(this, s, !0), m(this, C), m(this, A, {}), m(this, "container"), t.shadow ? this.container = this.attachShadow({
56
56
  mode: t.shadow
57
- }) : this.container = this, this[l].container = this.container;
57
+ }) : this.container = this, this[c].container = this.container;
58
58
  for (const o of d) {
59
- const p = h[o], c = this.getAttribute(p), i = m[o], a = i ? g[i] : null;
60
- a != null && a.parse && c && (this[l][o] = a.parse(c, p, this));
59
+ const p = h[o], l = this.getAttribute(p), i = E[o], a = i ? g[i] : null;
60
+ a != null && a.parse && l && (this[c][o] = a.parse(l, p, this));
61
61
  }
62
62
  }
63
63
  static get observedAttributes() {
64
64
  return Object.keys(y);
65
65
  }
66
66
  connectedCallback() {
67
- this[E] = !0, this[b]();
67
+ this[f] = !0, this[b]();
68
68
  }
69
69
  disconnectedCallback() {
70
- this[E] = !1, this[u] && n.unmount(this[u]), delete this[u];
70
+ this[f] = !1, this[u] && n.unmount(this[u]), delete this[u];
71
71
  }
72
- attributeChangedCallback(o, p, c) {
73
- const i = y[o], a = m[i], _ = a ? g[a] : null;
74
- i in m && _ != null && _.parse && c && (this[l][i] = _.parse(c, o, this), this[b]());
72
+ attributeChangedCallback(o, p, l) {
73
+ const i = y[o], a = E[i], _ = a ? g[a] : null;
74
+ i in E && _ != null && _.parse && l && (this[c][i] = _.parse(l, o, this), this[b]());
75
75
  }
76
- [(s = E, T = u, N = l, b)]() {
77
- this[E] && (this[u] ? n.update(this[u], this[l]) : this[u] = n.mount(
76
+ [(s = f, C = u, A = c, b)]() {
77
+ this[f] && (this[u] ? n.update(this[u], this[c]) : this[u] = n.mount(
78
78
  this.container,
79
79
  e,
80
- this[l]
80
+ this[c]
81
81
  ));
82
82
  }
83
83
  }
84
84
  for (const r of d) {
85
- const o = h[r], p = m[r];
86
- Object.defineProperty(A.prototype, r, {
85
+ const o = h[r], p = E[r];
86
+ Object.defineProperty(N.prototype, r, {
87
87
  enumerable: !0,
88
88
  configurable: !0,
89
89
  get() {
90
- return this[l][r];
90
+ return this[c][r];
91
91
  },
92
- set(c) {
93
- this[l][r] = c;
92
+ set(l) {
93
+ this[c][r] = l;
94
94
  const i = p ? g[p] : null;
95
95
  if (i != null && i.stringify) {
96
- const a = i.stringify(c, o, this);
96
+ const a = i.stringify(l, o, this);
97
97
  this.getAttribute(o) !== a && this.setAttribute(o, a);
98
98
  } else
99
99
  this[b]();
100
100
  }
101
101
  });
102
102
  }
103
- return A;
103
+ return N;
104
104
  }
105
- function Y(e, t, n) {
105
+ function $(e, t, n) {
106
106
  const s = P.createElement(t, n);
107
- return O.render(s, e), {
107
+ return T.render(s, e), {
108
108
  container: e,
109
109
  ReactComponent: t
110
110
  };
111
111
  }
112
112
  function B({ container: e, ReactComponent: t }, n) {
113
113
  const s = P.createElement(t, n);
114
- O.render(s, e);
114
+ T.render(s, e);
115
115
  }
116
- function H({ container: e }) {
117
- O.unmountComponentAtNode(e);
116
+ function U({ container: e }) {
117
+ T.unmountComponentAtNode(e);
118
118
  }
119
- function C(e, t = {}) {
120
- return $(e, t, { mount: Y, update: B, unmount: H });
119
+ function O(e, t = {}) {
120
+ return Y(e, t, { mount: $, update: B, unmount: U });
121
121
  }
122
- const U = C(W, {
122
+ const H = O(S, {
123
123
  shadow: "closed",
124
124
  props: {
125
125
  compositionUrl: "string",
@@ -139,46 +139,56 @@ const U = C(W, {
139
139
  extendBehavior: "string",
140
140
  eventPrefix: "string",
141
141
  demoSpin: "boolean",
142
- reverse360: "boolean"
142
+ reverse360: "boolean",
143
+ // Analytics
144
+ analyticsEventPrefix: "string",
145
+ analyticsUrl: "string",
146
+ analyticsBearer: "string",
147
+ analyticsSimpleRequestsOnly: "boolean",
148
+ analyticsDryRun: "boolean",
149
+ analyticsDebug: "boolean"
143
150
  }
144
- }), J = C(S, {
151
+ }), J = O(W, {
145
152
  shadow: "closed",
146
153
  props: {
147
154
  index: "number",
148
155
  thumbnailSrc: "string"
149
156
  }
150
- }), X = C(w, {
157
+ }), X = O(I, {
151
158
  shadow: "closed",
152
159
  props: {
153
160
  name: "string"
154
161
  }
155
162
  });
156
163
  function q() {
157
- customElements.define(I, U), customElements.define(
158
- M,
164
+ customElements.define(w, H), customElements.define(
165
+ D,
159
166
  J
160
- ), customElements.define(D, X);
167
+ ), customElements.define(R, X);
161
168
  }
162
169
  function z() {
163
170
  L() || q();
164
171
  }
165
172
  z();
166
173
  export {
167
- oe as DEFAULT_EVENT_PREFIX,
168
- re as EVENT_COMPOSITION_LOADED,
169
- se as EVENT_COMPOSITION_LOADING,
170
- ie as EVENT_COMPOSITION_LOAD_ERROR,
171
- ae as EVENT_EXTEND_MODE_OFF,
172
- ce as EVENT_EXTEND_MODE_ON,
173
- le as EVENT_GALLERY_CLOSE,
174
- ue as EVENT_GALLERY_OPEN,
175
- pe as EVENT_HOTSPOTS_OFF,
176
- me as EVENT_HOTSPOTS_ON,
177
- fe as EVENT_ITEM_CHANGE,
178
- D as WEB_PLAYER_ICON_WC_TAG,
179
- I as WEB_PLAYER_WC_TAG,
180
- be as WebPlayer,
181
- Ee as WebPlayerCustomMedia,
182
- de as WebPlayerIcon,
183
- he as generateCompositionUrl
174
+ oe as ANALYTICS_EVENT_IDENTIFY,
175
+ re as ANALYTICS_EVENT_PAGE,
176
+ se as ANALYTICS_EVENT_TRACK,
177
+ ie as DEFAULT_EVENT_PREFIX,
178
+ ae as EVENT_COMPOSITION_LOADED,
179
+ le as EVENT_COMPOSITION_LOADING,
180
+ ce as EVENT_COMPOSITION_LOAD_ERROR,
181
+ ue as EVENT_EXTEND_MODE_OFF,
182
+ pe as EVENT_EXTEND_MODE_ON,
183
+ Ee as EVENT_GALLERY_CLOSE,
184
+ me as EVENT_GALLERY_OPEN,
185
+ be as EVENT_HOTSPOTS_OFF,
186
+ fe as EVENT_HOTSPOTS_ON,
187
+ de as EVENT_ITEM_CHANGE,
188
+ R as WEB_PLAYER_ICON_WC_TAG,
189
+ w as WEB_PLAYER_WC_TAG,
190
+ he as WebPlayer,
191
+ ye as WebPlayerCustomMedia,
192
+ _e as WebPlayerIcon,
193
+ ge as generateCompositionUrl
184
194
  };